├── .changeset ├── README.md ├── changelog.js └── config.json ├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ ├── feature_request.yml │ └── question.yml └── workflows │ ├── ci.docusaurus-plugin-typedoc.yml │ ├── ci.typedoc-docusaurus-theme.yml │ ├── ci.typedoc-github-wiki-theme.yml │ ├── ci.typedoc-gitlab-wiki-theme.yml │ ├── ci.typedoc-plugin-frontmatter.yml │ ├── ci.typedoc-plugin-remark.yml │ ├── ci.typedoc-vitepress-theme.yml │ ├── ci.yml │ └── release.yml ├── .gitignore ├── .husky └── commit-msg ├── .prettierrc.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── commitlint.config.cjs ├── devtools ├── examples │ ├── README.md │ ├── docusaurus-ts │ │ ├── .gitignore │ │ ├── README.md │ │ ├── blog │ │ │ ├── 2019-05-28-first-blog-post.md │ │ │ ├── 2019-05-29-long-blog-post.md │ │ │ ├── 2021-08-01-mdx-blog-post.mdx │ │ │ ├── 2021-08-26-welcome │ │ │ │ ├── docusaurus-plushie-banner.jpeg │ │ │ │ └── index.md │ │ │ ├── authors.yml │ │ │ └── tags.yml │ │ ├── docusaurus.config.ts │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── sidebars.ts │ │ ├── src │ │ │ ├── components │ │ │ │ └── HomepageFeatures │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── styles.module.css │ │ │ ├── css │ │ │ │ └── custom.css │ │ │ └── pages │ │ │ │ ├── index.module.css │ │ │ │ ├── index.tsx │ │ │ │ └── markdown-page.md │ │ ├── static │ │ │ ├── .nojekyll │ │ │ └── img │ │ │ │ ├── docusaurus-social-card.jpg │ │ │ │ ├── docusaurus.png │ │ │ │ ├── favicon.ico │ │ │ │ ├── logo.svg │ │ │ │ ├── undraw_docusaurus_mountain.svg │ │ │ │ ├── undraw_docusaurus_react.svg │ │ │ │ └── undraw_docusaurus_tree.svg │ │ ├── stubs │ │ │ ├── custom-plugin.mjs │ │ │ ├── src │ │ │ │ ├── 2-number-prefix-module.ts │ │ │ │ └── standard-module.ts │ │ │ └── tsconfig.json │ │ └── tsconfig.json │ ├── docusaurus │ │ ├── .gitignore │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── css │ │ │ └── typedoc.css │ │ ├── docusaurus.config.js │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── sidebars.js │ │ ├── src │ │ │ └── pages │ │ │ │ └── index.js │ │ └── static │ │ │ ├── .nojekyll │ │ │ └── img │ │ │ ├── docusaurus.png │ │ │ ├── favicon.ico │ │ │ └── logo.svg │ ├── vitepress │ │ ├── .gitignore │ │ ├── .vitepress │ │ │ └── config.mts │ │ ├── api-examples.md │ │ ├── index.md │ │ ├── markdown-examples.md │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── typedoc-1.json │ │ ├── typedoc-2.json │ │ ├── typedoc-3.json │ │ └── typedoc-4.json │ ├── vuepress1 │ │ ├── .gitignore │ │ ├── docs │ │ │ ├── .vuepress │ │ │ │ └── config.js │ │ │ ├── README.md │ │ │ └── guide │ │ │ │ └── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ └── typedoc.json │ └── vuepress2 │ │ ├── .gitignore │ │ ├── docs │ │ ├── .vuepress │ │ │ └── config.ts │ │ ├── README.md │ │ └── guide │ │ │ └── README.md │ │ ├── package-lock.json │ │ ├── package.json │ │ └── typedoc.json ├── packages │ ├── helpers │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── methods.ts │ │ ├── models.ts │ │ └── package.json │ ├── prebuild-options │ │ ├── cli.ts │ │ ├── package.json │ │ └── tasks │ │ │ ├── generate-docs.ts │ │ │ ├── generate-models.ts │ │ │ └── generate-presets.ts │ └── testing │ │ ├── index.ts │ │ └── package.json ├── scripts │ ├── generate-readmes.ts │ └── tocs.mjs └── typedoc-plugins │ ├── typedoc-ignore-typeparam.mjs │ ├── typedoc-nextra.mjs │ ├── typedoc-replace-filetree.mjs │ └── typedoc-symbols.mjs ├── docs ├── .gitignore ├── app │ ├── [[...mdxPath]] │ │ └── page.jsx │ ├── _meta.js │ └── layout.tsx ├── components │ ├── option-link.jsx │ └── package-version.jsx ├── content │ ├── docs │ │ ├── CHANGELOG.md │ │ ├── _meta.js │ │ ├── customizing-output.mdx │ │ ├── index.mdx │ │ ├── migration-guide.mdx │ │ ├── option-typings.mdx │ │ ├── options │ │ │ ├── _meta.js │ │ │ ├── display-options.mdx │ │ │ ├── file-options.mdx │ │ │ ├── index.mdx │ │ │ └── utility-options.mdx │ │ ├── output-file-structure.mdx │ │ ├── quick-start.mdx │ │ ├── troubleshooting.mdx │ │ ├── typedoc-options.mdx │ │ ├── utilizing-navigation.md │ │ └── versioning.mdx │ ├── index.mdx │ └── plugins │ │ ├── _meta.js │ │ ├── docusaurus │ │ ├── CHANGELOG.md │ │ ├── _meta.js │ │ ├── guides │ │ │ ├── _meta.js │ │ │ ├── mdx.mdx │ │ │ ├── multi-instance.mdx │ │ │ ├── sidebar.mdx │ │ │ └── watch-mode.mdx │ │ ├── index.mdx │ │ ├── migration-guide.mdx │ │ ├── options.mdx │ │ └── quick-start.mdx │ │ ├── frontmatter │ │ ├── CHANGELOG.md │ │ ├── _meta.js │ │ ├── block-tags-warning.mdx │ │ ├── customizing.mdx │ │ ├── index.mdx │ │ ├── options.mdx │ │ └── quick-start.mdx │ │ ├── github-wiki │ │ ├── _meta.js │ │ ├── index.mdx │ │ ├── options.mdx │ │ └── quick-start.mdx │ │ ├── gitlab-wiki │ │ ├── _meta.js │ │ ├── index.mdx │ │ ├── options.mdx │ │ └── quick-start.mdx │ │ ├── index.mdx │ │ ├── remark │ │ ├── CHANGELOG.md │ │ ├── _meta.js │ │ ├── index.mdx │ │ ├── options.mdx │ │ ├── quick-start.mdx │ │ ├── remark-plugins-usage.mdx │ │ └── writing-a-plugin.mdx │ │ └── vitepress │ │ ├── CHANGELOG.md │ │ ├── _meta.js │ │ ├── index.mdx │ │ ├── options.mdx │ │ └── quick-start.mdx ├── copy-changelogs.cjs ├── globals.css ├── mdx-components.js ├── next-env.d.ts ├── next.config.mjs ├── package-lock.json ├── package.json ├── postcss.config.js ├── public │ ├── logos │ │ ├── docusaurus-logo.svg │ │ ├── github-logo.svg │ │ ├── gitlab-logo.png │ │ ├── markdown-logo.svg │ │ ├── remark-logo.png │ │ ├── ts-logo.png │ │ ├── typedoc-logo.png │ │ └── vuepress-logo.png │ └── schema.json ├── tailwind.config.js ├── tsconfig.json ├── utils │ └── package-versions.ts └── vercel.json ├── eslint.config.mjs ├── jest.config.base.js ├── jest.config.js ├── jest.helpers.ts ├── package-lock.json ├── package.json ├── packages ├── docusaurus-plugin-typedoc │ ├── .gitignore │ ├── CHANGELOG.md │ ├── CHANGELOG_ARCHIVE.md │ ├── README.md │ ├── internal-docs │ │ └── introduction.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── options.ts │ │ ├── plugin.ts │ │ ├── typedoc.cjs │ │ └── types │ │ │ ├── docusaurus.ts │ │ │ ├── index.ts │ │ │ └── plugin.ts │ ├── test │ │ └── test.mjs │ ├── tsconfig.json │ └── typedoc.json ├── typedoc-docusaurus-theme │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── internal-docs │ │ └── introduction.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── _typedoc.d.ts │ │ ├── index.ts │ │ ├── options.ts │ │ ├── options │ │ │ ├── declarations.ts │ │ │ ├── index.ts │ │ │ ├── presets.ts │ │ │ └── readers.ts │ │ ├── sidebar.ts │ │ └── types │ │ │ ├── index.ts │ │ │ ├── options.ts │ │ │ └── sidebar.ts │ ├── test │ │ ├── __scripts__ │ │ │ └── prepare.ts │ │ ├── specs │ │ │ ├── __snapshots__ │ │ │ │ └── docusaurus.spec.ts.snap │ │ │ └── docusaurus.spec.ts │ │ ├── stubs │ │ │ ├── 3-module.ts │ │ │ ├── module-1.ts │ │ │ ├── module-2.ts │ │ │ └── tsconfig.json │ │ └── typedoc.test.cjs │ ├── tsconfig.json │ ├── tsconfig.test.json │ └── typedoc.json ├── typedoc-github-wiki-theme │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── internal-docs │ │ └── introduction.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── _typedoc.d.ts │ │ ├── index.ts │ │ ├── options.ts │ │ ├── options │ │ │ ├── declarations.ts │ │ │ ├── index.ts │ │ │ └── presets.ts │ │ ├── sidebar.ts │ │ └── types │ │ │ ├── index.ts │ │ │ └── options.ts │ ├── test │ │ ├── __scripts__ │ │ │ └── prepare.ts │ │ ├── specs │ │ │ ├── __snapshots__ │ │ │ │ └── github-wiki.spec.ts.snap │ │ │ └── github-wiki.spec.ts │ │ ├── stubs │ │ │ ├── module-1.ts │ │ │ ├── module-2.ts │ │ │ └── tsconfig.json │ │ ├── typedoc.base.json │ │ ├── typedoc.globals.json │ │ ├── typedoc.single-modules.json │ │ └── typedoc.single-page.json │ ├── tsconfig.json │ ├── tsconfig.test.json │ └── typedoc.json ├── typedoc-gitlab-wiki-theme │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── internal-docs │ │ └── introduction.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── _typedoc.d.ts │ │ ├── index.ts │ │ ├── options.ts │ │ ├── options │ │ │ ├── declarations.ts │ │ │ ├── index.ts │ │ │ └── presets.ts │ │ ├── sidebar.ts │ │ └── types │ │ │ ├── index.ts │ │ │ └── options.ts │ ├── test │ │ ├── __scripts__ │ │ │ └── prepare.ts │ │ ├── specs │ │ │ ├── __snapshots__ │ │ │ │ └── gitlab-wiki.spec.ts.snap │ │ │ └── gitlab-wiki.spec.ts │ │ ├── stubs │ │ │ ├── module-1.ts │ │ │ ├── module-2.ts │ │ │ └── tsconfig.json │ │ ├── typedoc.base.json │ │ ├── typedoc.globals.json │ │ ├── typedoc.single-modules.json │ │ └── typedoc.single-page.json │ ├── tsconfig.json │ ├── tsconfig.test.json │ └── typedoc.json ├── typedoc-plugin-frontmatter │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── internal-docs │ │ └── introduction.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── _typedoc.d.ts │ │ ├── index.ts │ │ ├── options │ │ │ ├── declarations.ts │ │ │ ├── index.ts │ │ │ └── maps.ts │ │ ├── public-api.ts │ │ ├── tags.ts │ │ └── types │ │ │ ├── index.ts │ │ │ └── options.ts │ ├── test │ │ ├── __scripts__ │ │ │ └── prepare.ts │ │ ├── custom-plugin.mjs │ │ ├── some-readme.md │ │ ├── specs │ │ │ ├── __snapshots__ │ │ │ │ ├── no-data.spec.ts.snap │ │ │ │ └── options.spec.ts.snap │ │ │ ├── no-data.spec.ts │ │ │ └── options.spec.ts │ │ ├── stubs.ts │ │ ├── typedoc-base.json │ │ ├── typedoc-options-2.cjs │ │ ├── typedoc-options-3.cjs │ │ └── typedoc-options.cjs │ ├── tsconfig.json │ ├── tsconfig.test.json │ ├── tsdoc.json │ └── typedoc.json ├── typedoc-plugin-markdown │ ├── .gitignore │ ├── CHANGELOG.md │ ├── CHANGELOG_ARCHIVE..md │ ├── LICENSE │ ├── README.md │ ├── __scripts__ │ │ ├── prebuild-resources.ts │ │ ├── prebuild.ts │ │ └── schema │ │ │ ├── generate-schema.ts │ │ │ ├── get-scheme.cjs │ │ │ └── tsconfig.schema.json │ ├── internal-docs │ │ ├── adding-options.md │ │ ├── custom-theme.md │ │ ├── getting-started.md │ │ ├── introduction.md │ │ └── test-and-validation.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── _typedoc.d.ts │ │ ├── events │ │ │ ├── index.ts │ │ │ ├── markdown-page-event.ts │ │ │ └── markdown-renderer-event.ts │ │ ├── index.ts │ │ ├── internationalization │ │ │ ├── index.ts │ │ │ ├── locales │ │ │ │ ├── de.ts │ │ │ │ ├── en.ts │ │ │ │ ├── index.ts │ │ │ │ ├── ja.ts │ │ │ │ ├── ko.ts │ │ │ │ └── zh.ts │ │ │ └── setup.ts │ │ ├── libs │ │ │ ├── index.ts │ │ │ ├── markdown │ │ │ │ ├── back-ticks.ts │ │ │ │ ├── block-quote-block.ts │ │ │ │ ├── bold.ts │ │ │ │ ├── code-block.ts │ │ │ │ ├── heading.ts │ │ │ │ ├── horizontal-rule.ts │ │ │ │ ├── html-table.ts │ │ │ │ ├── indent-block.ts │ │ │ │ ├── index.ts │ │ │ │ ├── italic.ts │ │ │ │ ├── link.ts │ │ │ │ ├── strike-through.ts │ │ │ │ ├── table.ts │ │ │ │ └── unordered-list.ts │ │ │ └── utils │ │ │ │ ├── camel-to-title-case.spec.ts │ │ │ │ ├── camel-to-title-case.ts │ │ │ │ ├── encode-angle-brackets.ts │ │ │ │ ├── escape-chars.spec.ts │ │ │ │ ├── escape-chars.ts │ │ │ │ ├── format-markdown.ts │ │ │ │ ├── format-table-cell.spec.ts │ │ │ │ ├── format-table-cell.ts │ │ │ │ ├── get-path-without-ext.spec.ts │ │ │ │ ├── get-path-without-ext.ts │ │ │ │ ├── index.ts │ │ │ │ ├── is-quoted.spec.ts │ │ │ │ ├── is-quoted.ts │ │ │ │ ├── remove-first-scoped-directory.spec.ts │ │ │ │ ├── remove-first-scoped-directory.ts │ │ │ │ ├── remove-line-breaks.spec.ts │ │ │ │ ├── remove-line-breaks.ts │ │ │ │ ├── replace-file-name.spec.ts │ │ │ │ ├── replace-file-name.ts │ │ │ │ ├── sanitize-comments.spec.ts │ │ │ │ ├── sanitize-comments.ts │ │ │ │ ├── slugify.spec.ts │ │ │ │ ├── slugify.ts │ │ │ │ ├── to-pascal-case.spec.ts │ │ │ │ ├── to-pascal-case.ts │ │ │ │ ├── un-escape-chars.spec.ts │ │ │ │ └── un-escape-chars.ts │ │ ├── options │ │ │ ├── constants.ts │ │ │ ├── declarations.ts │ │ │ ├── index.ts │ │ │ └── maps.ts │ │ ├── public-api.ts │ │ ├── renderer │ │ │ ├── index.ts │ │ │ ├── prettier.ts │ │ │ ├── render.ts │ │ │ ├── setup.ts │ │ │ └── utils.ts │ │ ├── router │ │ │ ├── core-routers.ts │ │ │ ├── index.ts │ │ │ ├── markdown-router.ts │ │ │ ├── member-router.ts │ │ │ └── module-router.ts │ │ ├── theme │ │ │ ├── context │ │ │ │ ├── helpers │ │ │ │ │ ├── get-angle-bracket.ts │ │ │ │ │ ├── get-comment-parts.ts │ │ │ │ │ ├── get-declaration-type.ts │ │ │ │ │ ├── get-description-for-comment.ts │ │ │ │ │ ├── get-flattened-declarations.ts │ │ │ │ │ ├── get-hierarchy-type.ts │ │ │ │ │ ├── get-keyword.ts │ │ │ │ │ ├── get-modifier.ts │ │ │ │ │ ├── get-parameter-default-value.ts │ │ │ │ │ ├── get-project-name.ts │ │ │ │ │ ├── get-property-default-value.ts │ │ │ │ │ ├── get-reflection-flags.ts │ │ │ │ │ ├── get-return-type.ts │ │ │ │ │ ├── has-useful-type-details.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── is-group-kind.ts │ │ │ │ │ └── use-table-format.ts │ │ │ │ ├── index.ts │ │ │ │ ├── partials │ │ │ │ │ ├── comments.comment.ts │ │ │ │ │ ├── container.body.ts │ │ │ │ │ ├── container.categories.ts │ │ │ │ │ ├── container.groups.ts │ │ │ │ │ ├── container.members.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── member.accessor.ts │ │ │ │ │ ├── member.constructors.ts │ │ │ │ │ ├── member.container.ts │ │ │ │ │ ├── member.declaration.ts │ │ │ │ │ ├── member.declarationTitle.ts │ │ │ │ │ ├── member.documents.ts │ │ │ │ │ ├── member.enumMembersTable.ts │ │ │ │ │ ├── member.groupIndex.ts │ │ │ │ │ ├── member.hierarchy.ts │ │ │ │ │ ├── member.indexSignature.ts │ │ │ │ │ ├── member.inheritance.ts │ │ │ │ │ ├── member.memberTitle.ts │ │ │ │ │ ├── member.memberWithGroups.ts │ │ │ │ │ ├── member.parametersList.ts │ │ │ │ │ ├── member.parametersTable.ts │ │ │ │ │ ├── member.propertiesTable.ts │ │ │ │ │ ├── member.reference.ts │ │ │ │ │ ├── member.signature.ts │ │ │ │ │ ├── member.signatureParameters.ts │ │ │ │ │ ├── member.signatureReturns.ts │ │ │ │ │ ├── member.signatureTitle.ts │ │ │ │ │ ├── member.signatures.ts │ │ │ │ │ ├── member.sources.ts │ │ │ │ │ ├── member.ts │ │ │ │ │ ├── member.typeAndParent.ts │ │ │ │ │ ├── member.typeArguments.ts │ │ │ │ │ ├── member.typeDeclaration.ts │ │ │ │ │ ├── member.typeDeclarationContainer.ts │ │ │ │ │ ├── member.typeDeclarationList.ts │ │ │ │ │ ├── member.typeDeclarationTable.ts │ │ │ │ │ ├── member.typeDeclarationUnionContainer.ts │ │ │ │ │ ├── member.typeParametersList.ts │ │ │ │ │ ├── member.typeParametersTable.ts │ │ │ │ │ ├── page.breadcrumbs.ts │ │ │ │ │ ├── page.footer.ts │ │ │ │ │ ├── page.header.ts │ │ │ │ │ ├── page.packagesIndex.ts │ │ │ │ │ ├── page.pageTitle.ts │ │ │ │ │ ├── type.array.ts │ │ │ │ │ ├── type.conditional.ts │ │ │ │ │ ├── type.index-access.ts │ │ │ │ │ ├── type.inferred.ts │ │ │ │ │ ├── type.intersection.ts │ │ │ │ │ ├── type.intrinsic.ts │ │ │ │ │ ├── type.literal.ts │ │ │ │ │ ├── type.named-tuple.ts │ │ │ │ │ ├── type.optional.ts │ │ │ │ │ ├── type.query.ts │ │ │ │ │ ├── type.reference.ts │ │ │ │ │ ├── type.reflection.declaration.ts │ │ │ │ │ ├── type.reflection.function.ts │ │ │ │ │ ├── type.reflection.ts │ │ │ │ │ ├── type.some.ts │ │ │ │ │ ├── type.tuple.ts │ │ │ │ │ ├── type.type-operator.ts │ │ │ │ │ ├── type.union.ts │ │ │ │ │ └── type.unknown.ts │ │ │ │ ├── resources.ts │ │ │ │ └── templates │ │ │ │ │ ├── document.template.ts │ │ │ │ │ ├── hierarchy.template.ts │ │ │ │ │ ├── index.template.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── reflection.template.ts │ │ │ ├── index.ts │ │ │ ├── lib │ │ │ │ ├── get-hierarchy-roots.ts │ │ │ │ ├── index.ts │ │ │ │ ├── is-none-section.ts │ │ │ │ └── sort-none-section-first.ts │ │ │ ├── markdown-theme-context.ts │ │ │ ├── markdown-theme.ts │ │ │ └── navigation │ │ │ │ └── navigation-builder.ts │ │ └── types │ │ │ ├── index.ts │ │ │ ├── internationalization.ts │ │ │ ├── markdown-application.ts │ │ │ ├── markdown-renderer-hooks.ts │ │ │ ├── markdown-renderer.ts │ │ │ ├── options.ts │ │ │ └── theme.ts │ ├── test │ │ ├── __scripts__ │ │ │ ├── build-fixtures.mjs │ │ │ └── lint │ │ │ │ ├── lint.md.mjs │ │ │ │ └── lint.mdx.mjs │ │ ├── fixtures │ │ │ ├── PACKAGE_DOC_1.md │ │ │ ├── PROJECT_DOC_1.md │ │ │ ├── README.md │ │ │ ├── config.mjs │ │ │ ├── configs │ │ │ │ ├── comments.cjs │ │ │ │ ├── customize.cjs │ │ │ │ ├── documents.cjs │ │ │ │ ├── documentsSingleModule.cjs │ │ │ │ ├── entryfiles-1.cjs │ │ │ │ ├── entryfiles-2.cjs │ │ │ │ ├── groups-1.cjs │ │ │ │ ├── groups-2.cjs │ │ │ │ ├── modules.cjs │ │ │ │ ├── navigation.cjs │ │ │ │ ├── objectsAndParams.cjs │ │ │ │ ├── outputs.cjs │ │ │ │ ├── package.cjs │ │ │ │ ├── packages-1.cjs │ │ │ │ ├── packages-2.cjs │ │ │ │ ├── readme.cjs │ │ │ │ ├── reflections-1.cjs │ │ │ │ ├── reflections-2.cjs │ │ │ │ ├── text-1.cjs │ │ │ │ ├── text-2.cjs │ │ │ │ └── utils.cjs │ │ │ ├── custom-plugins │ │ │ │ ├── custom-router.mjs │ │ │ │ ├── custom-theme.mjs │ │ │ │ ├── navigation-plugin.mjs │ │ │ │ ├── normalize-sources.mjs │ │ │ │ ├── stub-documents-theme.mjs │ │ │ │ ├── stub-groups-theme.mjs │ │ │ │ └── urls-plugin.mjs │ │ │ ├── docs │ │ │ │ ├── project │ │ │ │ │ ├── PROJECT_DOC_2.md │ │ │ │ │ └── PROJECT_DOC_3.md │ │ │ │ └── reflection │ │ │ │ │ ├── CLASS_DOC.md │ │ │ │ │ ├── ENUM_DOC.md │ │ │ │ │ ├── FUNCTION_DOC_1.md │ │ │ │ │ ├── FUNCTION_DOC_2.md │ │ │ │ │ ├── FUNCTION_DOC_3.md │ │ │ │ │ ├── INTERFACE_DOC.md │ │ │ │ │ ├── MODULE_DOC.md │ │ │ │ │ ├── NAMESPACE_DOC.md │ │ │ │ │ ├── TYPE_DOC.md │ │ │ │ │ └── VARIABLE_DOC.md │ │ │ ├── inc │ │ │ │ └── example.md │ │ │ ├── media │ │ │ │ ├── logo.png │ │ │ │ └── logo.svg │ │ │ ├── package.json │ │ │ ├── prettier-config │ │ │ │ └── .prettierrc.json │ │ │ ├── src │ │ │ │ ├── categories │ │ │ │ │ ├── module-1.ts │ │ │ │ │ ├── module-2.ts │ │ │ │ │ └── module-3.ts │ │ │ │ ├── comments │ │ │ │ │ └── index.ts │ │ │ │ ├── customize │ │ │ │ │ └── index.ts │ │ │ │ ├── documents │ │ │ │ │ ├── module-1.ts │ │ │ │ │ ├── module-2.ts │ │ │ │ │ └── module-3.ts │ │ │ │ ├── entryfiles │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── module-1.ts │ │ │ │ │ └── module-2.ts │ │ │ │ ├── groups │ │ │ │ │ ├── basic.ts │ │ │ │ │ ├── has-categories.ts │ │ │ │ │ ├── has-custom-groups.ts │ │ │ │ │ ├── has-disabled-groups.ts │ │ │ │ │ ├── has-namespaces.ts │ │ │ │ │ ├── has-references.ts │ │ │ │ │ ├── has-same-exports.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── name-has-angle-brackets.ts │ │ │ │ │ └── name-has-leading-number.ts │ │ │ │ ├── modules │ │ │ │ │ ├── module-1 │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ └── submodules │ │ │ │ │ │ │ ├── submodule-1.ts │ │ │ │ │ │ │ ├── submodule-2.ts │ │ │ │ │ │ │ └── submodule-3-with-modules │ │ │ │ │ │ │ ├── nested-submodule-1.ts │ │ │ │ │ │ │ └── nested-submodule-2.ts │ │ │ │ │ ├── module-2 │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── module-3 │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── project-module │ │ │ │ │ │ └── index.ts │ │ │ │ ├── navigation │ │ │ │ │ ├── module-1 │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── module-2 │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── module-3 │ │ │ │ │ │ └── index.ts │ │ │ │ ├── outputs │ │ │ │ │ └── index.ts │ │ │ │ ├── packages-simple │ │ │ │ │ ├── package-1 │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ │ └── package-2 │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── src │ │ │ │ │ │ ├── module-1.ts │ │ │ │ │ │ └── module-2.ts │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ ├── packages │ │ │ │ │ ├── package-1 │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ │ ├── package-1b │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ │ ├── package-2 │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ ├── module-1.ts │ │ │ │ │ │ │ └── module-2.ts │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ │ ├── package-3 │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ ├── module-1.ts │ │ │ │ │ │ │ └── module-2.ts │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ │ ├── package-4 │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ │ ├── package-5 │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ ├── module-1.ts │ │ │ │ │ │ │ └── module-2.ts │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ │ ├── package-6 │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ ├── module-1.ts │ │ │ │ │ │ │ └── module-2.ts │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ │ ├── package-7 │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── src │ │ │ │ │ │ │ └── modules │ │ │ │ │ │ │ │ ├── module-1 │ │ │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ │ │ └── submodules │ │ │ │ │ │ │ │ │ └── submodule-3-with-modules │ │ │ │ │ │ │ │ │ ├── nested-submodule-1.ts │ │ │ │ │ │ │ │ │ └── nested-submodule-2.ts │ │ │ │ │ │ │ │ └── module-2 │ │ │ │ │ │ │ │ └── index.ts │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ │ └── package-8 │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ ├── src │ │ │ │ │ │ ├── index.ts │ │ │ │ │ │ ├── module-1.ts │ │ │ │ │ │ └── module-2.ts │ │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ │ └── typedoc.json │ │ │ │ ├── readme │ │ │ │ │ └── index.ts │ │ │ │ ├── reflections │ │ │ │ │ ├── classes.ts │ │ │ │ │ ├── enums.ts │ │ │ │ │ ├── functions.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── interfaces.ts │ │ │ │ │ ├── namespaces.ts │ │ │ │ │ ├── types.ts │ │ │ │ │ └── variables.ts │ │ │ │ ├── text │ │ │ │ │ ├── module-1.ts │ │ │ │ │ └── module-2.ts │ │ │ │ └── utils │ │ │ │ │ ├── asserts-template-literal.ts │ │ │ │ │ ├── brackets.ts │ │ │ │ │ ├── constructor-override.ts │ │ │ │ │ ├── index-signature.ts │ │ │ │ │ └── prettier.ts │ │ │ ├── tsconfig.json │ │ │ └── typedoc.cjs │ │ └── specs │ │ │ ├── __snapshots__ │ │ │ ├── comments.spec.ts.snap │ │ │ ├── customization.spec.ts.snap │ │ │ ├── documents.spec.ts.snap │ │ │ ├── entryfiles.spec.ts.snap │ │ │ ├── groups.spec.ts.snap │ │ │ ├── navigation.spec.ts.snap │ │ │ ├── objects-and-params.spec.ts.snap │ │ │ ├── outputs.spec.ts.snap │ │ │ ├── packages.spec.ts.snap │ │ │ ├── readme.spec.ts.snap │ │ │ ├── reflection.class.spec.ts.snap │ │ │ ├── reflection.enum.spec.ts.snap │ │ │ ├── reflection.function.spec.ts.snap │ │ │ ├── reflection.index.spec.ts.snap │ │ │ ├── reflection.interface.spec.ts.snap │ │ │ ├── reflection.type-alias.spec.ts.snap │ │ │ ├── reflection.variable.spec.ts.snap │ │ │ ├── text.spec.ts.snap │ │ │ ├── urls.spec.ts.snap │ │ │ └── utils.spec.ts.snap │ │ │ ├── comments.spec.ts │ │ │ ├── customization.spec.ts │ │ │ ├── documents.spec.ts │ │ │ ├── entryfiles.spec.ts │ │ │ ├── groups.spec.ts │ │ │ ├── navigation.spec.ts │ │ │ ├── objects-and-params.spec.ts │ │ │ ├── outputs.spec.ts │ │ │ ├── packages.spec.ts │ │ │ ├── readme.spec.ts │ │ │ ├── reflection.class.spec.ts │ │ │ ├── reflection.enum.spec.ts │ │ │ ├── reflection.function.spec.ts │ │ │ ├── reflection.index.spec.ts │ │ │ ├── reflection.interface.spec.ts │ │ │ ├── reflection.type-alias.spec.ts │ │ │ ├── reflection.variable.spec.ts │ │ │ ├── text.spec.ts │ │ │ ├── urls.spec.ts │ │ │ └── utils.spec.ts │ ├── tsconfig.json │ ├── tsconfig.test.json │ └── typedoc.json ├── typedoc-plugin-remark │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── internal-docs │ │ └── introduction.md │ ├── jest.config.js │ ├── package.json │ ├── src │ │ ├── _typedoc.d.ts │ │ ├── helpers.ts │ │ ├── index.ts │ │ ├── options │ │ │ ├── constants.ts │ │ │ ├── declarations.ts │ │ │ ├── index.ts │ │ │ └── validation.ts │ │ └── types │ │ │ ├── index.ts │ │ │ └── options.ts │ ├── test │ │ ├── __scripts__ │ │ │ └── prepare.ts │ │ ├── specs │ │ │ ├── __snapshots__ │ │ │ │ └── remark.spec.ts.snap │ │ │ └── remark.spec.ts │ │ ├── stubs │ │ │ ├── README.md │ │ │ ├── remark.ts │ │ │ ├── toc-doc-2.md │ │ │ ├── toc-doc.md │ │ │ ├── tsconfig.json │ │ │ └── typedoc-plugin.mjs │ │ └── typedoc.test.json │ ├── tsconfig.json │ ├── tsconfig.test.json │ └── typedoc.json └── typedoc-vitepress-theme │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── internal-docs │ └── introduction.md │ ├── jest.config.js │ ├── package.json │ ├── src │ ├── _typedoc.d.ts │ ├── index.ts │ ├── options.ts │ ├── options │ │ ├── declarations.ts │ │ ├── index.ts │ │ └── presets.ts │ ├── sidebars │ │ ├── sidebar.vitepress.ts │ │ ├── sidebar.vuepress1.ts │ │ ├── sidebar.vuepress2.ts │ │ └── sidebars.ts │ ├── types │ │ ├── index.ts │ │ └── options.ts │ └── utils │ │ ├── utils.spec.ts │ │ └── utils.ts │ ├── test │ ├── __scripts__ │ │ └── prepare.ts │ ├── specs │ │ ├── __snapshots__ │ │ │ └── vitepress.spec.ts.snap │ │ └── vitepress.spec.ts │ ├── stubs │ │ ├── module-1.ts │ │ ├── module-2.ts │ │ └── tsconfig.json │ ├── typedoc.base.json │ ├── typedoc.sidebar-options-2.json │ └── typedoc.sidebar-options.json │ ├── tsconfig.json │ ├── tsconfig.test.json │ └── typedoc.json ├── tsconfig.json └── tsconfig.test.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/changelog.js: -------------------------------------------------------------------------------- 1 | const getReleaseLine = async (changeset, _type) => { 2 | return changeset.summary.replace( 3 | /\(\#(.+?)\)/g, 4 | '([#$1](https://github.com/typedoc2md/typedoc-plugin-markdown/issues/$1))', 5 | ); 6 | }; 7 | 8 | const getDependencyReleaseLine = async (changesets, dependenciesUpdated) => { 9 | if (dependenciesUpdated.length === 0) return ''; 10 | 11 | const updatedDependenciesList = dependenciesUpdated.map( 12 | (dependency) => ` - ${dependency.name}@${dependency.newVersion}`, 13 | ); 14 | 15 | return [['- Updated peer dependencies'], ...updatedDependenciesList].join( 16 | '\n', 17 | ); 18 | }; 19 | 20 | const defaultChangelogFunctions = { 21 | getReleaseLine, 22 | getDependencyReleaseLine, 23 | }; 24 | 25 | exports.default = defaultChangelogFunctions; 26 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": [ 4 | "./changelog.js", 5 | { "repo": "typedoc2md/typedoc-plugin-markdown" } 6 | ], 7 | "commit": false, 8 | "fixed": [["docusaurus-plugin-typedoc", "typedoc-docusaurus-theme"]], 9 | "linked": [], 10 | "access": "public", 11 | "baseBranch": "main", 12 | "updateInternalDependencies": "minor", 13 | "ignore": [ 14 | "@devtools/*", 15 | "typedoc-plugin-frontmatter", 16 | "typedoc-github-wiki-theme", 17 | "typedoc-gitlab-wiki-theme", 18 | "typedoc-vitepress-theme" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | 9 | [*.ts] 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.md] 14 | max_line_length = off 15 | trim_trailing_whitespace = false 16 | insert_final_newline = false 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.yml: -------------------------------------------------------------------------------- 1 | name: Question 2 | description: Ask a question. 3 | labels: [question] 4 | body: 5 | - type: dropdown 6 | attributes: 7 | label: What package is your question related to? 8 | multiple: false 9 | options: 10 | - 'typedoc-plugin-markdown' 11 | - 'typedoc-plugin-frontmatter' 12 | - 'typdedoc-plugin-remark' 13 | - 'typedoc-vitepress-theme' 14 | - 'typedoc-github-wiki-theme' 15 | - 'typedoc-gitlab-wiki-theme' 16 | - 'docusaurus-plugin-typedoc' 17 | default: 0 18 | validations: 19 | required: true 20 | - type: textarea 21 | attributes: 22 | label: What would you like to ask? 23 | description: Ask a question or start a conversation. 24 | validations: 25 | required: true 26 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | push: 4 | branches: 5 | - main 6 | concurrency: ${{ github.workflow }}-${{ github.ref }} 7 | jobs: 8 | release: 9 | name: Release 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout Repo 13 | uses: actions/checkout@v3 14 | - name: Setup Node.js 20.x 15 | uses: actions/setup-node@v3 16 | with: 17 | node-version: 20.x 18 | - name: Install Dependencies 19 | run: npm ci 20 | - name: Create Release Pull Request or Publish to npm 21 | id: changesets 22 | uses: changesets/action@v1 23 | with: 24 | publish: npm run release 25 | env: 26 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 27 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | dist 5 | .nyc_output/ 6 | 7 | # yalc 8 | yalc.lock 9 | .yalc 10 | 11 | # testing 12 | samples 13 | typedoc-examples 14 | out 15 | html 16 | /devguide-html 17 | 18 | # dependencies 19 | node_modules 20 | 21 | # IDEs and editors 22 | .settings/ 23 | 24 | # misc 25 | npm-debug.log 26 | /typings 27 | .npmrc 28 | 29 | #System Files 30 | .DS_Store 31 | Thumbs.db 32 | 33 | #ignore js files inside src/spec 34 | /spec/**/*.js 35 | /spec/**/*.d.ts 36 | /spec/**/*.js.map 37 | /src/**/*.d.ts 38 | /src/**/*.js.map 39 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | npx commitlint --edit ${1} 2 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "plugins": ["prettier-plugin-organize-imports"] 5 | } 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | We expect all contributors and users of this repository to be respectful and considerate towards others. 4 | 5 | ## Expected Behavior 6 | 7 | - Treat others with kindness and respect. 8 | - Be considerate of differing viewpoints and experiences. 9 | - Provide constructive feedback in a polite and helpful manner. 10 | 11 | ## Unacceptable Behavior 12 | 13 | - Harassment, discrimination, or derogatory language of any kind. 14 | - Personal attacks or insults. 15 | - Disruptive behavior or trolling. 16 | 17 | ## Enforcement 18 | 19 | Violations of this code of conduct may result in removal of comments, issues, or contributions, and may lead to temporary or permanent bans from the repository. 20 | -------------------------------------------------------------------------------- /commitlint.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['@commitlint/config-conventional'], 3 | rules: { 4 | 'type-enum': [ 5 | 2, 6 | 'always', 7 | ['chore', 'docs', 'feat', 'fix', 'test', 'refactor'], 8 | ], 9 | 'scope-empty': [2, 'never'], 10 | 'scope-enum': [ 11 | 2, 12 | 'always', 13 | [ 14 | 'all', 15 | 'core', 16 | 'frontmatter', 17 | 'remark', 18 | 'docusaurus', 19 | 'vitepress', 20 | 'githubwiki', 21 | 'gitlabwiki', 22 | 'docs', 23 | 'refactor', 24 | 'quality', 25 | ], 26 | ], 27 | }, 28 | 29 | ignores: [(commit) => commit.startsWith('Version Packages')], 30 | }; 31 | -------------------------------------------------------------------------------- /devtools/examples/README.md: -------------------------------------------------------------------------------- 1 | These folder is intended for internal dev purposes. 2 | 3 | For plugin examples please visit: 4 | 5 | - https://github.com/typedoc2md/typedoc-plugin-markdown-examples 6 | - https://github.com/typedoc2md/typedoc-vitepress-theme-example 7 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | docs 7 | 8 | # Generated files 9 | .docusaurus 10 | .cache-loader 11 | 12 | # Misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/blog/2019-05-28-first-blog-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: first-blog-post 3 | title: First Blog Post 4 | authors: [slorber, yangshun] 5 | tags: [hola, docusaurus] 6 | --- 7 | 8 | Lorem ipsum dolor sit amet... 9 | 10 | 11 | 12 | ...consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet 13 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/blog/2021-08-01-mdx-blog-post.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | slug: mdx-blog-post 3 | title: MDX Blog Post 4 | authors: [slorber] 5 | tags: [docusaurus] 6 | --- 7 | 8 | Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/). 9 | 10 | :::tip 11 | 12 | Use the power of React to create interactive blog posts. 13 | 14 | ::: 15 | 16 | {/* truncate */} 17 | 18 | For example, use JSX to create an interactive button: 19 | 20 | ```js 21 | 22 | ``` 23 | 24 | 25 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/devtools/examples/docusaurus-ts/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/blog/authors.yml: -------------------------------------------------------------------------------- 1 | yangshun: 2 | name: Yangshun Tay 3 | title: Front End Engineer @ Facebook 4 | url: https://github.com/yangshun 5 | image_url: https://github.com/yangshun.png 6 | page: true 7 | socials: 8 | x: yangshunz 9 | github: yangshun 10 | 11 | slorber: 12 | name: Sébastien Lorber 13 | title: Docusaurus maintainer 14 | url: https://sebastienlorber.com 15 | image_url: https://github.com/slorber.png 16 | page: 17 | # customize the url of the author page at /blog/authors/ 18 | permalink: '/all-sebastien-lorber-articles' 19 | socials: 20 | x: sebastienlorber 21 | linkedin: sebastienlorber 22 | github: slorber 23 | newsletter: https://thisweekinreact.com 24 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/blog/tags.yml: -------------------------------------------------------------------------------- 1 | facebook: 2 | label: Facebook 3 | permalink: /facebook 4 | description: Facebook tag description 5 | 6 | hello: 7 | label: Hello 8 | permalink: /hello 9 | description: Hello tag description 10 | 11 | docusaurus: 12 | label: Docusaurus 13 | permalink: /docusaurus 14 | description: Docusaurus tag description 15 | 16 | hola: 17 | label: Hola 18 | permalink: /hola 19 | description: Hola tag description 20 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/sidebars.ts: -------------------------------------------------------------------------------- 1 | import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'; 2 | import typedocSidebar from './docs/api-2/typedoc-sidebar'; 3 | 4 | const sidebars: SidebarsConfig = { 5 | typedocSidebar: [ 6 | { 7 | type: 'category', 8 | label: 'Typedoc API', 9 | link: { 10 | type: 'doc', 11 | id: 'api-2/index', 12 | }, 13 | items: typedocSidebar.items, 14 | }, 15 | ], 16 | }; 17 | 18 | export default sidebars; 19 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/src/components/HomepageFeatures/styles.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding: 2rem 0; 5 | width: 100%; 6 | } 7 | 8 | .featureSvg { 9 | height: 200px; 10 | width: 200px; 11 | } 12 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS files with the .module.css suffix will be treated as CSS modules 3 | * and scoped locally. 4 | */ 5 | 6 | .heroBanner { 7 | padding: 4rem 0; 8 | text-align: center; 9 | position: relative; 10 | overflow: hidden; 11 | } 12 | 13 | @media screen and (max-width: 996px) { 14 | .heroBanner { 15 | padding: 2rem; 16 | } 17 | } 18 | 19 | .buttons { 20 | display: flex; 21 | align-items: center; 22 | justify-content: center; 23 | } 24 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/devtools/examples/docusaurus-ts/static/.nojekyll -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/static/img/docusaurus-social-card.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/devtools/examples/docusaurus-ts/static/img/docusaurus-social-card.jpg -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/devtools/examples/docusaurus-ts/static/img/docusaurus.png -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/devtools/examples/docusaurus-ts/static/img/favicon.ico -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/stubs/custom-plugin.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as fs from 'fs'; 3 | import { MarkdownRendererEvent } from 'typedoc-plugin-markdown'; 4 | 5 | export function load(app) { 6 | app.renderer.on(MarkdownRendererEvent.END, (renderer) => { 7 | fs.writeFileSync( 8 | `${renderer.outputDirectory}/custom-plugin.txt`, 9 | 'custom-plugin', 10 | ); 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/stubs/src/2-number-prefix-module.ts: -------------------------------------------------------------------------------- 1 | export interface SomeInterfaceA { 2 | propa: string; 3 | propb: string; 4 | } 5 | 6 | export interface SomeInterfaceB { 7 | propa: string; 8 | propb: string; 9 | } 10 | 11 | export enum SomeEnumA { 12 | Member, 13 | MemberB, 14 | } 15 | 16 | export enum SomeEnumB { 17 | Member, 18 | MemberB, 19 | } 20 | 21 | export class SomeClassA {} 22 | 23 | export class SomeClassB {} 24 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/stubs/src/standard-module.ts: -------------------------------------------------------------------------------- 1 | export interface SomeInterface { 2 | propa: string; 3 | propb: T; 4 | } 5 | 6 | export enum SomeEnum { 7 | Member, 8 | MemberB, 9 | } 10 | 11 | export class SomeClass {} 12 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/stubs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "experimentalDecorators": false, 4 | "esModuleInterop": true, 5 | "declaration": true, 6 | "lib": ["es2022", "dom"], 7 | "module": "node16", 8 | "strict": true, 9 | "noUnusedLocals": false, 10 | "noUnusedParameters": false, 11 | "target": "es2022", 12 | "jsx": "react", 13 | "types": ["node", "react"] 14 | }, 15 | "include": ["./src/*.ts"] 16 | } 17 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus-ts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // This file is not used in compilation. It is here just for a nice editor experience. 3 | "extends": "@docusaurus/tsconfig", 4 | "compilerOptions": { 5 | "baseUrl": "." 6 | }, 7 | "exclude": [".docusaurus", "build"] 8 | } 9 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # docs 8 | docs 9 | 10 | # Generated files 11 | .docusaurus 12 | .cache-loader 13 | 14 | # Misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')], 3 | }; 4 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus/css/typedoc.css: -------------------------------------------------------------------------------- 1 | .typedoc-sidebar-is-deprecated { 2 | text-decoration: line-through; 3 | } 4 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus/src/pages/index.js: -------------------------------------------------------------------------------- 1 | import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; 2 | import Layout from '@theme/Layout'; 3 | import React from 'react'; 4 | 5 | function HomepageHeader() { 6 | const { siteConfig } = useDocusaurusContext(); 7 | return ( 8 |
9 |
10 |

{siteConfig.title}

11 |

{siteConfig.tagline}

12 |
13 |
14 | ); 15 | } 16 | 17 | export default function Home() { 18 | const { siteConfig } = useDocusaurusContext(); 19 | return ( 20 | 24 | 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /devtools/examples/docusaurus/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/devtools/examples/docusaurus/static/.nojekyll -------------------------------------------------------------------------------- /devtools/examples/docusaurus/static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/devtools/examples/docusaurus/static/img/docusaurus.png -------------------------------------------------------------------------------- /devtools/examples/docusaurus/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/devtools/examples/docusaurus/static/img/favicon.ico -------------------------------------------------------------------------------- /devtools/examples/vitepress/.gitignore: -------------------------------------------------------------------------------- 1 | api* 2 | .vitepress/cache -------------------------------------------------------------------------------- /devtools/examples/vitepress/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | # https://vitepress.dev/reference/default-theme-home-page 3 | layout: home 4 | 5 | hero: 6 | name: "My Awesome Project" 7 | text: "A VitePress Site" 8 | tagline: My great project tagline 9 | actions: 10 | - theme: brand 11 | text: Markdown Examples 12 | link: /markdown-examples 13 | - theme: alt 14 | text: API Examples 15 | link: /api-examples 16 | 17 | features: 18 | - title: Feature A 19 | details: Lorem ipsum dolor sit amet, consectetur adipiscing elit 20 | - title: Feature B 21 | details: Lorem ipsum dolor sit amet, consectetur adipiscing elit 22 | - title: Feature C 23 | details: Lorem ipsum dolor sit amet, consectetur adipiscing elit 24 | --- 25 | 26 | -------------------------------------------------------------------------------- /devtools/examples/vitepress/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vitepress", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "publish-typedoc": "typedoc --options typedoc-1.json && typedoc --options typedoc-2.json && typedoc --options typedoc-3.json && typedoc --options typedoc-4.json", 6 | "build-plugin": "cd ../../../packages/typedoc-vitepress-theme && npm run build", 7 | "predocs:dev": "npm run build-plugin && npm run publish-typedoc", 8 | "docs:dev": "vitepress dev", 9 | "docs:build": "vitepress build", 10 | "docs:preview": "vitepress preview" 11 | }, 12 | "author": "Thomas Grey", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "vitepress": "^1.0.0-rc.32" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /devtools/examples/vitepress/typedoc-1.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "../../../packages/typedoc-plugin-markdown/test/fixtures/typedoc.cjs" 4 | ], 5 | "tsconfig": "../../../packages/typedoc-plugin-markdown/test/fixtures/tsconfig.json", 6 | "entryPoints": [ 7 | "../../../packages/typedoc-plugin-markdown/test/fixtures/src/groups/**/*.ts" 8 | ], 9 | 10 | "plugin": [ 11 | "../../../packages/typedoc-plugin-markdown/dist/index.js", 12 | "../../../packages/typedoc-vitepress-theme/dist/index.js" 13 | ], 14 | "readme": "none", 15 | "logLevel": "Info", 16 | "sidebar": { 17 | "collapse": false, 18 | "pretty": true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /devtools/examples/vitepress/typedoc-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "../../../packages/typedoc-plugin-markdown/test/fixtures/typedoc.cjs" 4 | ], 5 | "tsconfig": "../../../packages/typedoc-plugin-markdown/test/fixtures/tsconfig.json", 6 | "entryPoints": [ 7 | "../../../packages/typedoc-plugin-markdown/test/fixtures/src/modules/module-1", 8 | "../../../packages/typedoc-plugin-markdown/test/fixtures/src/modules/module-2" 9 | ], 10 | 11 | "plugin": [ 12 | "../../../packages/typedoc-plugin-markdown/dist/index.js", 13 | "../../../packages/typedoc-vitepress-theme/dist/index.js" 14 | ], 15 | "logLevel": "Info", 16 | "readme": "none", 17 | "sidebar": { 18 | "collapse": false, 19 | "pretty": true 20 | }, 21 | "out": "api-2" 22 | } 23 | -------------------------------------------------------------------------------- /devtools/examples/vitepress/typedoc-3.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "../../../packages/typedoc-plugin-markdown/test/fixtures/typedoc.cjs" 4 | ], 5 | "tsconfig": "../../../packages/typedoc-plugin-markdown/test/fixtures/tsconfig.json", 6 | "entryPoints": [ 7 | "../../../packages/typedoc-plugin-markdown/test/fixtures/src/modules/*" 8 | ], 9 | 10 | "plugin": [ 11 | "../../../packages/typedoc-plugin-markdown/dist/index.js", 12 | "../../../packages/typedoc-vitepress-theme/dist/index.js" 13 | ], 14 | "logLevel": "Info", 15 | "readme": "none", 16 | "sidebar": { 17 | "collapse": false, 18 | "pretty": true 19 | }, 20 | "out": "api-3" 21 | } 22 | -------------------------------------------------------------------------------- /devtools/examples/vuepress1/.gitignore: -------------------------------------------------------------------------------- 1 | api -------------------------------------------------------------------------------- /devtools/examples/vuepress1/docs/README.md: -------------------------------------------------------------------------------- 1 | # Hello VuePress 1 2 | -------------------------------------------------------------------------------- /devtools/examples/vuepress1/docs/guide/README.md: -------------------------------------------------------------------------------- 1 | # Guide v1 2 | -------------------------------------------------------------------------------- /devtools/examples/vuepress1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuepress-example-v1", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "publish-typedoc": "typedoc --plugin ../../packages/typedoc-plugin-markdown/dist --plugin ../../packages/typedoc-vitepress-theme/dist --options \"./typedoc.json\"", 7 | "predocs:dev": "npm run publish-typedoc", 8 | "docs:dev": "vuepress dev docs", 9 | "docs:build": "vuepress build docs && npx http-server ./docs/.vuepress/dist -o" 10 | }, 11 | "devDependencies": { 12 | "vuepress": "^1.9.9" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /devtools/examples/vuepress1/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "../../stubs/src/classes.ts", 4 | "../../stubs/src/declarations.ts" 5 | ], 6 | "tsconfig": "../../stubs/tsconfig.json", 7 | "sidebar": { 8 | "format": "vuepress1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /devtools/examples/vuepress2/.gitignore: -------------------------------------------------------------------------------- 1 | api 2 | node_modules 3 | .temp 4 | .cache 5 | -------------------------------------------------------------------------------- /devtools/examples/vuepress2/docs/.vuepress/config.ts: -------------------------------------------------------------------------------- 1 | import { defaultTheme } from 'vuepress'; 2 | import typedocSidebar from '../api/typedoc-sidebar.json'; 3 | 4 | module.exports = { 5 | title: 'VuePress Docs v2', 6 | theme: defaultTheme({ 7 | navbar: [ 8 | { 9 | text: 'Guide', 10 | link: '/guide/', 11 | }, 12 | { 13 | text: 'API', 14 | link: '/api/', 15 | }, 16 | ], 17 | sidebar: { 18 | '/guide/': [ 19 | { 20 | text: 'Guide', 21 | children: ['/guide/README.md'], 22 | }, 23 | ], 24 | '/api/': [ 25 | { 26 | text: 'API', 27 | children: typedocSidebar, 28 | }, 29 | ], 30 | }, 31 | }), 32 | }; 33 | -------------------------------------------------------------------------------- /devtools/examples/vuepress2/docs/README.md: -------------------------------------------------------------------------------- 1 | # Hello VuePress 2 2 | -------------------------------------------------------------------------------- /devtools/examples/vuepress2/docs/guide/README.md: -------------------------------------------------------------------------------- 1 | # Guide v2 2 | -------------------------------------------------------------------------------- /devtools/examples/vuepress2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuepress-example-v2", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "publish-typedoc": "typedoc --plugin ../../packages/typedoc-plugin-markdown/dist --plugin ../../packages/typedoc-vitepress-theme/dist --options \"./typedoc.json\"", 7 | "predocs:dev": "npm run publish-typedoc", 8 | "docs:dev": "vuepress dev docs", 9 | "docs:build": "vuepress build docs && npx http-server ./docs/.vuepress/dist -o" 10 | }, 11 | "devDependencies": { 12 | "vuepress": "next", 13 | "vuepress-bar": "^0.4.5" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /devtools/examples/vuepress2/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "../../stubs/src/classes.ts", 4 | "../../stubs/src/declarations.ts" 5 | ], 6 | "tsconfig": "../../stubs/tsconfig.json", 7 | "sidebar": { 8 | "format": "vuepress2" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /devtools/packages/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './constants.js'; 2 | export * from './methods.js'; 3 | export * from './models.js'; 4 | -------------------------------------------------------------------------------- /devtools/packages/helpers/methods.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | 3 | export function getPackageName() { 4 | const cwdParts = process.cwd().split(path.sep); 5 | return cwdParts[cwdParts.length - 1]; 6 | } 7 | -------------------------------------------------------------------------------- /devtools/packages/helpers/models.ts: -------------------------------------------------------------------------------- 1 | export interface DocsConfig { 2 | declarationsPath?: string; 3 | translatablePath?: string; 4 | presetsPath?: string; 5 | optionsPath?: string; 6 | optionsFile?: string; 7 | docsPath: string; 8 | declarations?: boolean; 9 | presets?: boolean; 10 | categories?: Record; 11 | } 12 | 13 | export interface OptionDocument { 14 | name: string; 15 | comments: string; 16 | tags: { name: string; comments: string }[]; 17 | example: string; 18 | category: string; 19 | help: string; 20 | } 21 | -------------------------------------------------------------------------------- /devtools/packages/helpers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@devtools/helpers", 3 | "version": "0.0.0", 4 | "private": true, 5 | "type": "module", 6 | "main": "index.ts", 7 | "files": [ 8 | "/" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /devtools/packages/prebuild-options/cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env tsx 2 | 3 | import { DOCS_CONFIG, DocsConfig, getPackageName } from '@devtools/helpers'; 4 | import { consola } from 'consola'; 5 | import { generateOptionsDocs } from './tasks/generate-docs.js'; 6 | import { generateOptionsModels } from './tasks/generate-models.js'; 7 | 8 | main(); 9 | 10 | async function main() { 11 | const docsConfig: DocsConfig = DOCS_CONFIG[getPackageName()]; 12 | 13 | if (docsConfig.declarations) { 14 | await generateOptionsModels(docsConfig); 15 | await generateOptionsDocs(docsConfig); 16 | } 17 | 18 | consola.success(`[${getPackageName()}] Prebuild options complete`); 19 | } 20 | -------------------------------------------------------------------------------- /devtools/packages/prebuild-options/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@devtools/prebuild-options", 3 | "version": "0.0.0", 4 | "private": true, 5 | "type": "module", 6 | "files": [ 7 | "/" 8 | ], 9 | "bin": { 10 | "prebuild-options": "cli.ts" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /devtools/packages/testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@devtools/testing", 3 | "version": "0.0.0", 4 | "private": true, 5 | "main": "index.ts", 6 | "files": [ 7 | "/" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /devtools/scripts/tocs.mjs: -------------------------------------------------------------------------------- 1 | import { consola } from 'consola'; 2 | import { remark } from 'remark'; 3 | import remarkToc from 'remark-toc'; 4 | import { read, writeSync } from 'to-vfile'; 5 | 6 | main(); 7 | 8 | async function main() { 9 | const file = await remark() 10 | .use(remarkToc, { maxDepth: 3 }) 11 | .process(await read('./CONTRIBUTING.md')); 12 | writeSync(file); 13 | 14 | consola.success(`Updated TOCs complete`); 15 | } 16 | -------------------------------------------------------------------------------- /devtools/typedoc-plugins/typedoc-replace-filetree.mjs: -------------------------------------------------------------------------------- 1 | import { Converter } from 'typedoc'; 2 | 3 | export function load(app) { 4 | app.converter.on( 5 | Converter.EVENT_CREATE_DECLARATION, 6 | (_context, reflection) => { 7 | if ( 8 | reflection.comment && 9 | reflection?.comment?.summary && 10 | reflection?.comment?.summary.length 11 | ) { 12 | reflection.comment.summary = reflection.comment.summary.map( 13 | (summary) => ({ 14 | ...summary, 15 | text: summary.text.replace( 16 | /]*>.*?<\/FileTree>/gs, 17 | '*See public docs for file tree example.*', 18 | ), 19 | }), 20 | ); 21 | } 22 | }, 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | .next 2 | _pagefind/ -------------------------------------------------------------------------------- /docs/app/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | index: { 3 | title: 'Homepage', 4 | type: 'page', 5 | display: 'hidden', 6 | theme: { 7 | breadcrumb: false, 8 | sidebar: false, 9 | footer: false, 10 | timestamp: false, 11 | }, 12 | }, 13 | docs: { 14 | type: 'page', 15 | title: 'Docs', 16 | }, 17 | plugins: { 18 | title: 'Utils & Themes', 19 | type: 'page', 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /docs/components/option-link.jsx: -------------------------------------------------------------------------------- 1 | export const OptionLink = ({ type, name }) => { 2 | return ( 3 | 7 | {name} 8 | 9 | ); 10 | }; 11 | -------------------------------------------------------------------------------- /docs/components/package-version.jsx: -------------------------------------------------------------------------------- 1 | import { packageVersions } from '../utils/package-versions'; 2 | 3 | export function PackageVersion({ name }) { 4 | const version = packageVersions[name]; 5 | 6 | return ( 7 | 8 | Version: {version} 9 | 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /docs/content/docs/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | index: 'Introduction', 3 | '-- Getting Started': { 4 | type: 'separator', 5 | title: 'Getting Started', 6 | }, 7 | 'quick-start': '', 8 | 'typedoc-options': '', 9 | options: '', 10 | '-- Guides': { 11 | type: 'separator', 12 | title: 'Guides', 13 | }, 14 | 'output-file-structure': '', 15 | 'customizing-output': '', 16 | 'utilizing-navigation': '', 17 | 'option-typings': '', 18 | '-- Support': { 19 | type: 'separator', 20 | title: 'Support', 21 | }, 22 | troubleshooting: '', 23 | versioning: '', 24 | CHANGELOG: 'Changelog', 25 | 'migration-guide': 'Migration Guide (v4)', 26 | }; 27 | -------------------------------------------------------------------------------- /docs/content/docs/options/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'file-options': '', 3 | 'display-options': '', 4 | 'utility-options': '', 5 | }; 6 | -------------------------------------------------------------------------------- /docs/content/docs/quick-start.mdx: -------------------------------------------------------------------------------- 1 | # Quick Start 2 | 3 | ## Installation 4 | 5 | ```sh npm2yarn 6 | npm install typedoc typedoc-plugin-markdown --save-dev 7 | ``` 8 | 9 | ## Usage 10 | 11 | Plugins are loaded by using the TypeDoc `plugin` configuration option: 12 | 13 | ```shell filename="CLI" 14 | typedoc --plugin typedoc-plugin-markdown --out ./docs 15 | ``` 16 | 17 | Or: 18 | 19 | ```json filename="typedoc.json" 20 | { 21 | "plugin": ["typedoc-plugin-markdown"], 22 | "out": "./docs" 23 | } 24 | ``` 25 | 26 | ```json filename="package.json" 27 | { 28 | "docs": "typedoc" 29 | } 30 | ``` 31 | 32 | ```bash filename="CLI" 33 | npm run docs 34 | ``` 35 | -------------------------------------------------------------------------------- /docs/content/plugins/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | index: 'Utils & Themes Index', 3 | '-- Utils': { 4 | type: 'separator', 5 | title: 'Utils', 6 | }, 7 | frontmatter: 'Frontmatter', 8 | remark: 'Remark', 9 | '-- Themes': { 10 | type: 'separator', 11 | title: 'Themes', 12 | }, 13 | 'github-wiki': 'Github Wiki', 14 | 'gitlab-wiki': 'Gitlab Wiki', 15 | vitepress: 'VitePress', 16 | docusaurus: 'Docusaurus', 17 | }; 18 | -------------------------------------------------------------------------------- /docs/content/plugins/docusaurus/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'quick-start': '', 3 | options: '', 4 | guides: '', 5 | 'migration-guide': '', 6 | }; 7 | -------------------------------------------------------------------------------- /docs/content/plugins/docusaurus/guides/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | sidebar: '', 3 | 'multi-instance': '', 4 | 'watch-mode': '', 5 | mdx: '', 6 | }; 7 | -------------------------------------------------------------------------------- /docs/content/plugins/docusaurus/guides/mdx.mdx: -------------------------------------------------------------------------------- 1 | # MDX vs. CommonMark 2 | 3 | By default, Docusaurus treats Markdown files as MDX. 4 | 5 | This means that non-conformant MDX syntax in your documentation comments will cause a compilation error. 6 | 7 | If you don't need MDX features, you can opt into CommonMark, which allows for more relaxed Markdown parsing. 8 | 9 | ```js filename="docusaurus.config.js" 10 | markdown: { 11 | format: 'detect', 12 | } 13 | ``` 14 | 15 | See https://docusaurus.io/docs/markdown-features#mdx-vs-commonmark for more information. 16 | -------------------------------------------------------------------------------- /docs/content/plugins/docusaurus/guides/multi-instance.mdx: -------------------------------------------------------------------------------- 1 | import { Callout } from 'nextra/components'; 2 | 3 | # Multi Instance 4 | 5 | It is possible to build multi TypeDoc instances by passing in multiple configs with unique ids: 6 | 7 | ```js filename="docusaurus.config.js" 8 | module.exports = { 9 | plugins: [ 10 | [ 11 | 'docusaurus-plugin-typedoc', 12 | { 13 | id: 'api-1', 14 | entryPoints: ['../api-1/src/index.ts'], 15 | tsconfig: '../api-1/tsconfig.json', 16 | out: 'api-1', 17 | }, 18 | ], 19 | [ 20 | 'docusaurus-plugin-typedoc', 21 | { 22 | id: 'api-2', 23 | entryPoints: ['../api-2/src/index.ts'], 24 | tsconfig: '../api-2/tsconfig.json', 25 | out: 'api-2', 26 | }, 27 | ], 28 | ], 29 | }; 30 | ``` 31 | -------------------------------------------------------------------------------- /docs/content/plugins/docusaurus/guides/watch-mode.mdx: -------------------------------------------------------------------------------- 1 | import { Callout } from 'nextra/components'; 2 | 3 | # Watch Mode 4 | 5 | Watching files is supported by passing in the `watch: true` option see https://typedoc.org/guides/options/#watch. 6 | 7 | Targetting the option in development mode only can be achieved using Node.js Environment Variables: 8 | 9 | ```json filename="package.json" 10 | { 11 | "scripts": { 12 | "start": "TYPEDOC_WATCH=true docusaurus start", 13 | "build": "TYPEDOC_WATCH=false docusaurus build" 14 | } 15 | } 16 | ``` 17 | 18 | ```js filename="docusaurus.config.js" 19 | module.exports = { 20 | plugins: [ 21 | [ 22 | 'docusaurus-plugin-typedoc', 23 | { 24 | entryPoints: ['../src/index.ts'], 25 | tsconfig: '../tsconfig.json', 26 | watch: process.env.TYPEDOC_WATCH, 27 | }, 28 | ], 29 | ], 30 | }; 31 | ``` 32 | -------------------------------------------------------------------------------- /docs/content/plugins/frontmatter/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'quick-start': '', 3 | options: '', 4 | customizing: '', 5 | ['block-tags-warning']: 'Block Tags Warning', 6 | }; 7 | -------------------------------------------------------------------------------- /docs/content/plugins/frontmatter/quick-start.mdx: -------------------------------------------------------------------------------- 1 | # Quick Start 2 | 3 | ## Installation 4 | 5 | ```sh npm2yarn 6 | npm install typedoc-plugin-frontmatter --save-dev 7 | ``` 8 | 9 | ## Usage 10 | 11 | ```json filename="typedoc.json" 12 | { 13 | "plugin": ["typedoc-plugin-markdown", "typedoc-plugin-frontmatter"] 14 | } 15 | ``` 16 | 17 | ```bash filename="CLI" 18 | npm run typedoc 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/content/plugins/github-wiki/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'quick-start': '', 3 | options: '', 4 | }; 5 | -------------------------------------------------------------------------------- /docs/content/plugins/github-wiki/quick-start.mdx: -------------------------------------------------------------------------------- 1 | # Quick Start 2 | 3 | ## Installation 4 | 5 | ```sh npm2yarn 6 | npm install typedoc typedoc-plugin-markdown typedoc-github-wiki-theme --save-dev 7 | ``` 8 | 9 | ## Usage 10 | 11 | ```json filename="typedoc.json" 12 | { 13 | "plugin": ["typedoc-plugin-markdown", "typedoc-github-wiki-theme"] 14 | } 15 | ``` 16 | 17 | ```bash filename="CLI" 18 | npm run typedoc 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/content/plugins/gitlab-wiki/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'quick-start': '', 3 | options: '', 4 | }; 5 | -------------------------------------------------------------------------------- /docs/content/plugins/gitlab-wiki/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | asIndexPage: true 3 | --- 4 | 5 | # typedoc-gitlab-wiki-theme 6 | 7 | 8 | 9 | ## Overview 10 | 11 | This plugin generates Markdown tailored to GitLab Wiki. 12 | 13 | ## Features 14 | 15 | - Generates Wiki friendly file names. 16 | - Updates internal urls to a compatible format. 17 | - Writes a `_sidebar.md` file to display sidebar navigation. 18 | -------------------------------------------------------------------------------- /docs/content/plugins/gitlab-wiki/quick-start.mdx: -------------------------------------------------------------------------------- 1 | # Quick Start 2 | 3 | ## Installation 4 | 5 | ```sh npm2yarn 6 | npm install typedoc typedoc-plugin-markdown typedoc-gitlab-wiki-theme --save-dev 7 | ``` 8 | 9 | ## Usage 10 | 11 | ```json filename="typedoc.json" 12 | { 13 | "plugin": ["typedoc-plugin-markdown", "typedoc-gitlab-wiki-theme"] 14 | } 15 | ``` 16 | 17 | ```bash filename="CLI" 18 | npm run typedoc 19 | ``` 20 | -------------------------------------------------------------------------------- /docs/content/plugins/remark/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'quick-start': '', 3 | options: '', 4 | 'remark-plugins-usage': '', 5 | 'writing-a-plugin': '', 6 | CHANGELOG: '', 7 | }; 8 | -------------------------------------------------------------------------------- /docs/content/plugins/remark/quick-start.mdx: -------------------------------------------------------------------------------- 1 | # Quick Start 2 | 3 | ## Installation 4 | 5 | ```sh npm2yarn 6 | npm install typedoc-plugin-remark --save-dev 7 | ``` 8 | 9 | ## Usage 10 | 11 | ```json filename="typedoc.json" 12 | { 13 | "plugin": ["typedoc-plugin-markdown", "typedoc-plugin-remark"] 14 | } 15 | ``` 16 | -------------------------------------------------------------------------------- /docs/content/plugins/remark/writing-a-plugin.mdx: -------------------------------------------------------------------------------- 1 | # Writing A Plugin 2 | 3 | It is straightforward to create a remark plugin locally if you would like to create your own functionality. 4 | 5 | This example shows how to create a very simple plugin that adds a `meta` property to all code blocks in the documentation. 6 | 7 | ```js filename="my-custom-plugin.mjs" 8 | import { visit } from 'unist-util-visit'; 9 | 10 | export default function mySimpleRemarkPlugin() { 11 | return (tree) => { 12 | visit(tree, 'code', (node) => { 13 | node.meta = `playground`; 14 | }); 15 | }; 16 | } 17 | ``` 18 | 19 | ```json filename="typedoc.json" 20 | { 21 | "remarkPlugins": ["./my-custom-plugin.mjs"] 22 | } 23 | ``` 24 | -------------------------------------------------------------------------------- /docs/content/plugins/vitepress/_meta.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'quick-start': '', 3 | options: '', 4 | }; 5 | -------------------------------------------------------------------------------- /docs/copy-changelogs.cjs: -------------------------------------------------------------------------------- 1 | var copyfiles = require('copyfiles'); 2 | 3 | const changelogs = [ 4 | { 5 | from: '../packages/typedoc-plugin-markdown/CHANGELOG.md', 6 | to: 'content/docs', 7 | }, 8 | { 9 | from: '../packages/typedoc-vitepress-theme/CHANGELOG.md', 10 | to: 'content/plugins/vitepress', 11 | }, 12 | { 13 | from: '../packages/typedoc-docusaurus-theme/CHANGELOG.md', 14 | to: 'content/plugins/docusaurus', 15 | }, 16 | { 17 | from: '../packages/typedoc-plugin-remark/CHANGELOG.md', 18 | to: 'content/plugins/remark', 19 | }, 20 | { 21 | from: '../packages/typedoc-plugin-frontmatter/CHANGELOG.md', 22 | to: 'content/plugins/frontmatter', 23 | }, 24 | ]; 25 | 26 | changelogs.forEach(({ from, to }) => { 27 | copyfiles([from, to], { up: 3 }, () => {}); 28 | }); 29 | -------------------------------------------------------------------------------- /docs/globals.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss'; 2 | 3 | .nextra-toc a[href='#parameters'], 4 | .nextra-toc a[href^='#parameters-'], 5 | .nextra-toc a[href^='#returns'], 6 | .nextra-toc a[href^='#source'], 7 | .nextra-toc a[href^='#overrides'], 8 | .nextra-toc a[href^='#see'], 9 | .nextra-toc a[href^='#new-features'], 10 | .nextra-toc a[href^='#bug-fixes'], 11 | .nextra-toc a[href^='#major-changes'], 12 | .nextra-toc a[href^='#minor-changes'], 13 | .nextra-toc a[href^='#patch-changes'], 14 | .nextra-toc a[href^='#non-breaking-changes'], 15 | .nextra-toc a[href^='#architectural-changes'], 16 | .nextra-toc a[href^='#structural-changes'], 17 | .nextra-toc a[href^='#breaking-changes'] { 18 | display: none; 19 | } 20 | blockquote { 21 | font-style: normal !important; 22 | } 23 | -------------------------------------------------------------------------------- /docs/mdx-components.js: -------------------------------------------------------------------------------- 1 | import { useMDXComponents as getThemeComponents } from 'nextra-theme-docs'; 2 | import { OptionLink } from './components/option-link'; 3 | import { PackageVersion } from './components/package-version'; 4 | 5 | // Get the default MDX components 6 | const themeComponents = getThemeComponents(); 7 | 8 | // Merge components 9 | export function useMDXComponents(components) { 10 | return { 11 | ...themeComponents, 12 | ...components, 13 | PackageVersion, 14 | OptionLink, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /docs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. 6 | -------------------------------------------------------------------------------- /docs/next.config.mjs: -------------------------------------------------------------------------------- 1 | import nextra from 'nextra'; 2 | 3 | const withNextra = nextra({ 4 | // ... Other Nextra config options 5 | }); 6 | 7 | // You can include other Next.js configuration options here, in addition to Nextra settings: 8 | export default withNextra({}); 9 | -------------------------------------------------------------------------------- /docs/postcss.config.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: { 3 | '@tailwindcss/postcss': {}, 4 | }, 5 | }; 6 | export default config; 7 | -------------------------------------------------------------------------------- /docs/public/logos/gitlab-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/docs/public/logos/gitlab-logo.png -------------------------------------------------------------------------------- /docs/public/logos/markdown-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/public/logos/remark-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/docs/public/logos/remark-logo.png -------------------------------------------------------------------------------- /docs/public/logos/ts-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/docs/public/logos/ts-logo.png -------------------------------------------------------------------------------- /docs/public/logos/typedoc-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/docs/public/logos/typedoc-logo.png -------------------------------------------------------------------------------- /docs/public/logos/vuepress-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/docs/public/logos/vuepress-logo.png -------------------------------------------------------------------------------- /docs/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: ['./app/**/*.{js,jsx,ts,tsx,md,mdx}', './content/**/*.{md,mdx}'], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": false, 7 | "noEmit": true, 8 | "incremental": true, 9 | "esModuleInterop": true, 10 | "module": "nodenext", 11 | "moduleResolution": "nodenext", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "target": "ES2017", 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "strictNullChecks": true 22 | }, 23 | "include": ["**/*.ts", "**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts"], 24 | "exclude": ["node_modules"] 25 | } 26 | -------------------------------------------------------------------------------- /docs/utils/package-versions.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'fs'; 2 | import path from 'path'; 3 | 4 | function getVersion(name: string): string { 5 | const packageJsonPath = path.join( 6 | process.cwd(), 7 | '../packages', 8 | name, 9 | 'package.json', 10 | ); 11 | const json = JSON.parse(readFileSync(packageJsonPath, 'utf8')); 12 | return json.version; 13 | } 14 | 15 | export const packageVersions = { 16 | 'typedoc-plugin-markdown': getVersion('typedoc-plugin-markdown'), 17 | }; 18 | -------------------------------------------------------------------------------- /docs/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "public": true 3 | } 4 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import eslint from '@eslint/js'; 2 | import tseslint from 'typescript-eslint'; 3 | 4 | export default tseslint.config( 5 | eslint.configs.recommended, 6 | ...tseslint.configs.recommended, 7 | { 8 | rules: { 9 | 'no-undef': 'off', 10 | 'object-shorthand': ['warn', 'always'], 11 | '@typescript-eslint/no-explicit-any': 'off', 12 | '@typescript-eslint/no-empty-object-type': 'off', 13 | '@typescript-eslint/no-require-imports': 'off', 14 | }, 15 | }, 16 | ); 17 | -------------------------------------------------------------------------------- /jest.config.base.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | transform: { 3 | '^.+\\.tsx?$': [ 4 | 'ts-jest', 5 | { 6 | tsconfig: '/tsconfig.test.json', 7 | }, 8 | ], 9 | }, 10 | verbose: true, 11 | testTimeout: 30000, 12 | detectOpenHandles: true, 13 | forceExit: true, 14 | }; 15 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | const base = require('./jest.config.base.js'); 2 | 3 | module.exports = { 4 | ...base, 5 | projects: ['/packages/*/jest.config.js'], 6 | coverageDirectory: '/coverage/', 7 | }; 8 | -------------------------------------------------------------------------------- /jest.helpers.ts: -------------------------------------------------------------------------------- 1 | require('ts-node/register'); 2 | -------------------------------------------------------------------------------- /packages/docusaurus-plugin-typedoc/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/packages/docusaurus-plugin-typedoc/.gitignore -------------------------------------------------------------------------------- /packages/docusaurus-plugin-typedoc/README.md: -------------------------------------------------------------------------------- 1 | # docusaurus-plugin-typedoc 2 | 3 | [![npm](https://img.shields.io/npm/v/docusaurus-plugin-typedoc.svg?logo=npm)](https://www.npmjs.com/package/docusaurus-plugin-typedoc) [![Build Status](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.docusaurus-plugin-typedoc.yml/badge.svg?branch=main&style=flat-square)](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.docusaurus-plugin-typedoc.yml) 4 | 5 | > A Docusaurus plugin to integrate TypeDoc ( + typedoc-plugin-markdown ) into the Docusaurus CLI. 6 | 7 | ## Documentation 8 | 9 | Please visit [https://typedoc-plugin-markdown.org/plugins/docusaurus](https://typedoc-plugin-markdown.org/plugins/docusaurus) for comprehensive documentation, including options and usage guides. 10 | 11 | ## License 12 | 13 | MIT -------------------------------------------------------------------------------- /packages/docusaurus-plugin-typedoc/internal-docs/introduction.md: -------------------------------------------------------------------------------- 1 | # docusaurus-plugin-typedoc 2 | 3 | "docusaurus-plugin-typedoc" is a Docusaurus plugin that bootstraps TypeDoc within the Docusaurus eco-system. 4 | 5 | Package features include: 6 | 7 | - Bootstraps TypeDoc from the Docusaurus CLI. 8 | -------------------------------------------------------------------------------- /packages/docusaurus-plugin-typedoc/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './plugin.js'; 2 | export { PluginOptions } from './types/index.js'; 3 | -------------------------------------------------------------------------------- /packages/docusaurus-plugin-typedoc/src/types/docusaurus.ts: -------------------------------------------------------------------------------- 1 | export interface LoadContext { 2 | siteDir: string; 3 | siteConfig: { 4 | plugins?: any[]; 5 | presets?: any[]; 6 | }; 7 | } 8 | 9 | export type Cli = { 10 | command(name: string): Cli; 11 | description(desc: string): Cli; 12 | option(flag: string, desc?: string): Cli; 13 | action(fn: (...args: any[]) => void): void; 14 | }; 15 | -------------------------------------------------------------------------------- /packages/docusaurus-plugin-typedoc/src/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from here. 3 | * 4 | * @module 5 | */ 6 | 7 | export * from './docusaurus.js'; 8 | export * from './plugin.js'; 9 | -------------------------------------------------------------------------------- /packages/docusaurus-plugin-typedoc/src/types/plugin.ts: -------------------------------------------------------------------------------- 1 | import { PluginOptions as TypedocDocusaurusThemeOptions } from 'typedoc-docusaurus-theme'; 2 | import { PluginOptions as TypedocPluginMarkdownOptions } from 'typedoc-plugin-markdown'; 3 | 4 | export interface PluginOptions 5 | extends TypedocPluginMarkdownOptions, 6 | TypedocDocusaurusThemeOptions {} 7 | -------------------------------------------------------------------------------- /packages/docusaurus-plugin-typedoc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./dist", 5 | "esModuleInterop": true, 6 | "target": "es2022" 7 | }, 8 | "exclude": ["./dist", "./test", "**/*.spec.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/docusaurus-plugin-typedoc/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/index.ts", "./src/options", "./src/types"], 3 | "readme": "./internal-docs/introduction.md" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/.gitignore: -------------------------------------------------------------------------------- 1 | docs -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/README.md: -------------------------------------------------------------------------------- 1 | # typedoc-docusaurus-theme 2 | 3 | [![npm](https://img.shields.io/npm/v/typedoc-docusaurus-theme.svg?logo=npm)](https://www.npmjs.com/package/typedoc-docusaurus-theme) [![Build Status](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-docusaurus-theme.yml/badge.svg?branch=main&style=flat-square)](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-docusaurus-theme.yml) 4 | 5 | > A TypeDoc ( + typedoc-plugin-markdown ) theme that generates Markdown compatible with Docusaurus. 6 | 7 | ## Documentation 8 | 9 | Please visit [https://typedoc-plugin-markdown.org/plugins/docusaurus](https://typedoc-plugin-markdown.org/plugins/docusaurus) for comprehensive documentation, including options and usage guides. 10 | 11 | ## License 12 | 13 | MIT -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/internal-docs/introduction.md: -------------------------------------------------------------------------------- 1 | # typedoc-docusaurus-theme 2 | 3 | "typedoc-docusaurus-theme" is a "theme" in the sense that it targets output for VitePress. 4 | 5 | Package features include: 6 | 7 | - Exposes some additional options to TypeDoc. 8 | - Presets relevant typedoc-plugin-markdown options. 9 | - Generates a docusaurus sidebar json file. 10 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/jest.config.js: -------------------------------------------------------------------------------- 1 | import base from '../../jest.config.base.js'; 2 | 3 | export default { 4 | ...base, 5 | displayName: 'typedoc-docusaurus-theme', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/src/_typedoc.d.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY. 2 | import { ManuallyValidatedOption } from 'typedoc'; 3 | import { Sidebar } from './types/options.js'; 4 | declare module 'typedoc' { 5 | export interface TypeDocOptionMap { 6 | docsPath: string; 7 | numberPrefixParser: boolean; 8 | sidebar: ManuallyValidatedOption; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/src/options.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_SIDEBAR_OPTIONS = { 2 | autoConfiguration: true, 3 | pretty: false, 4 | typescript: false, 5 | deprecatedItemClassName: 'typedoc-sidebar-item-deprecated', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/src/options/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * as declarations from './declarations.js'; 8 | export * as presets from './presets.js'; 9 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/src/options/presets.ts: -------------------------------------------------------------------------------- 1 | export const presets = { 2 | hideBreadcrumbs: true, 3 | hidePageHeader: true, 4 | entryFileName: 'index.md', 5 | out: 'docs/api', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/src/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * from './options.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/src/types/options.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY 3 | */ 4 | 5 | /** 6 | * Describes the options declared by the plugin. 7 | */ 8 | export interface PluginOptions { 9 | /** 10 | * The value of the Docusaurus `docs.path` config option. 11 | */ 12 | docsPath?: string; 13 | 14 | /** 15 | * The value of the Docusaurus `numberPrefixParser` option. 16 | */ 17 | numberPrefixParser?: boolean; 18 | 19 | /** 20 | * Configures the autogenerated sidebar. 21 | */ 22 | sidebar?: Sidebar; 23 | } 24 | 25 | export interface Sidebar { 26 | autoConfiguration: boolean; 27 | pretty: boolean; 28 | typescript: boolean; 29 | deprecatedItemClassName: string; 30 | } 31 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/test/stubs/3-module.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated 3 | */ 4 | export class ClassA {} 5 | export class ClassB {} 6 | /** 7 | * @deprecated 8 | */ 9 | export interface InterfaceA {} 10 | export interface InterfaceB {} 11 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/test/stubs/module-1.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated 3 | */ 4 | export class ClassA {} 5 | export class ClassB {} 6 | /** 7 | * @deprecated 8 | */ 9 | export interface InterfaceA {} 10 | export interface InterfaceB {} 11 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/test/stubs/module-2.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated 3 | */ 4 | export class ClassA {} 5 | export class ClassB {} 6 | /** 7 | * @deprecated 8 | */ 9 | export interface InterfaceA {} 10 | export interface InterfaceB {} 11 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/test/stubs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "experimentalDecorators": true, 4 | "esModuleInterop": true, 5 | "lib": ["es2020", "dom"], 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "noImplicitAny": false, 9 | "noUnusedLocals": false, 10 | "noUnusedParameters": false, 11 | "strictNullChecks": false, 12 | "target": "es2020" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./dist", 5 | "esModuleInterop": true 6 | }, 7 | "exclude": ["./dist", "./test", "**/*.spec.ts", "./docs"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.test.json", 3 | "compilerOptions": { 4 | "esModuleInterop": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/typedoc-docusaurus-theme/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/index.ts", "./src/options", "./src/types"], 3 | "readme": "./internal-docs/introduction.md" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 2.1.0 (2024-11-27) 4 | 5 | ### Minor Changes 6 | 7 | - typedoc@0.27 / typedoc-plugin-markdown@4.3 support 8 | 9 | ## 2.0.0 (2024-05-03) 10 | 11 | ### Breaking Changes 12 | 13 | - typedoc-plugin-markdown dependency updated to V4. 14 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/README.md: -------------------------------------------------------------------------------- 1 | # typedoc-github-wiki-theme 2 | 3 | [![npm](https://img.shields.io/npm/v/typedoc-github-wiki-theme.svg?logo=npm)](https://www.npmjs.com/package/typedoc-github-wiki-theme) [![Build Status](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-github-wiki-theme.yml/badge.svg?branch=main&style=flat-square)](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-github-wiki-theme.yml) 4 | 5 | > A TypeDoc ( + typedoc-plugin-markdown ) theme that generates Markdown compatible with Github Wiki. 6 | 7 | ## Documentation 8 | 9 | Please visit [https://typedoc-plugin-markdown.org/plugins/github-wiki](https://typedoc-plugin-markdown.org/plugins/github-wiki) for comprehensive documentation, including options and usage guides. 10 | 11 | ## License 12 | 13 | MIT -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/internal-docs/introduction.md: -------------------------------------------------------------------------------- 1 | # typedoc-github-wiki-theme 2 | 3 | "typedoc-github-wiki-theme" is a "theme" in the sense that it targets output for GitHub Wiki. 4 | 5 | Package features include: 6 | 7 | - Exposes some additional options to TypeDoc. 8 | - Presets relevant typedoc-plugin-markdown options. 9 | - Generates a Wiki sidebar md file. 10 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/jest.config.js: -------------------------------------------------------------------------------- 1 | import base from '../../jest.config.base.js'; 2 | 3 | export default { 4 | ...base, 5 | displayName: 'typedoc-github-wiki', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/src/_typedoc.d.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY. 2 | import { ManuallyValidatedOption } from 'typedoc'; 3 | import { Sidebar } from './types/options.js'; 4 | declare module 'typedoc' { 5 | export interface TypeDocOptionMap { 6 | sidebar: ManuallyValidatedOption; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/src/options.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_SIDEBAR_OPTIONS: any = { 2 | autoConfiguration: true, 3 | heading: 'API', 4 | }; 5 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/src/options/declarations.ts: -------------------------------------------------------------------------------- 1 | import { ParameterType } from 'typedoc'; 2 | import { DEFAULT_SIDEBAR_OPTIONS } from '../options.js'; 3 | 4 | /** 5 | * **sidebar.autoConfiguration** 6 | * 7 | * Set to `false` to disable sidebar generation. Defaults to true. 8 | * 9 | * **sidebar.heading** 10 | * 11 | * The heading displayed above the sidebar. 12 | * 13 | */ 14 | export const sidebar = { 15 | help: 'Configures the autogenerated `_sidebar.md file`.', 16 | type: ParameterType.Mixed, 17 | defaultValue: DEFAULT_SIDEBAR_OPTIONS, 18 | }; 19 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/src/options/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * as declarations from './declarations.js'; 8 | export * as presets from './presets.js'; 9 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/src/options/presets.ts: -------------------------------------------------------------------------------- 1 | export const presets = { 2 | entryFileName: 'Home.md', 3 | hidePageHeader: true, 4 | flattenOutputFiles: true, 5 | }; 6 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/src/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * from './options.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/src/types/options.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY 3 | */ 4 | 5 | /** 6 | * Describes the options declared by the plugin. 7 | */ 8 | export interface PluginOptions { 9 | /** 10 | * Configures the autogenerated `_sidebar.md file`. 11 | */ 12 | sidebar?: Sidebar; 13 | } 14 | 15 | export interface Sidebar { 16 | autoConfiguration: boolean; 17 | heading: string; 18 | } 19 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/test/stubs/module-1.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | 4 | export interface InterfaceA {} 5 | export interface InterfaceB {} 6 | 7 | // eslint-disable-next-line @typescript-eslint/no-namespace 8 | export namespace Validation { 9 | export interface NamespaceInterface { 10 | item: string; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/test/stubs/module-2.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | 4 | export interface InterfaceA {} 5 | export interface InterfaceB {} 6 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/test/stubs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "experimentalDecorators": true, 4 | "esModuleInterop": true, 5 | "lib": ["es2020", "dom"], 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "noImplicitAny": false, 9 | "noUnusedLocals": false, 10 | "noUnusedParameters": false, 11 | "strictNullChecks": false, 12 | "target": "es2020" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/test/typedoc.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./stubs/*.ts"], 3 | "tsconfig": "./stubs/tsconfig.json", 4 | "out": "./out", 5 | "plugin": ["typedoc-plugin-markdown", "typedoc-github-wiki-theme"], 6 | "readme": "none", 7 | "disableSources": true, 8 | "cleanOutputDir": true, 9 | "logLevel": "Warn" 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/test/typedoc.globals.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./typedoc.base.json", 3 | "entryPoints": ["./stubs/module-2.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/test/typedoc.single-modules.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./typedoc.base.json", 3 | "outputFileStrategy": "modules" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/test/typedoc.single-page.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./typedoc.base.json", 3 | "entryPoints": ["./stubs/module-2.ts"], 4 | "outputFileStrategy": "modules" 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | }, 6 | "exclude": ["./dist", "./test", "**/*.spec.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.test.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-github-wiki-theme/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/index.ts", "./src/options", "./src/types"], 3 | "readme": "./internal-docs/introduction.md" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## 2.1.0 (2024-11-27) 4 | 5 | ### Minor Changes 6 | 7 | - typedoc@0.27 / typedoc-plugin-markdown@4.3 support 8 | 9 | ## 2.0.1 (2024-6-08) 10 | 11 | ### Patch Changes 12 | 13 | - Remove extension from all urls ([#628](https://github.com/typedoc2md/typedoc-plugin-markdown/issues/628)) 14 | 15 | ## 2.0.0 (2024-05-03) 16 | 17 | ### Breaking Changes 18 | 19 | - typedoc-plugin-markdown dependency updated to V4. 20 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/README.md: -------------------------------------------------------------------------------- 1 | # typedoc-gitlab-wiki-theme 2 | 3 | [![npm](https://img.shields.io/npm/v/typedoc-gitlab-wiki-theme.svg?logo=npm)](https://www.npmjs.com/package/typedoc-gitlab-wiki-theme) [![Build Status](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-gitlab-wiki-theme.yml/badge.svg?branch=main&style=flat-square)](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-gitlab-wiki-theme.yml) 4 | 5 | > A TypeDoc ( + typedoc-plugin-markdown ) theme that generates Markdown compatible with Gitlab Wiki. 6 | 7 | ## Documentation 8 | 9 | Please visit [https://typedoc-plugin-markdown.org/plugins/gitlab-wiki](https://typedoc-plugin-markdown.org/plugins/gitlab-wiki) for comprehensive documentation, including options and usage guides. 10 | 11 | ## License 12 | 13 | MIT -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/internal-docs/introduction.md: -------------------------------------------------------------------------------- 1 | # typedoc-gitlab-wiki-theme 2 | 3 | "typedoc-gitlab-wiki-theme" is a "theme" in the sense that it targets output for GitLab Wiki. 4 | 5 | Package features include: 6 | 7 | - Exposes some additional options to TypeDoc. 8 | - Presets relevant typedoc-plugin-markdown options. 9 | - Generates a Wiki sidebar md file. 10 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/jest.config.js: -------------------------------------------------------------------------------- 1 | import base from '../../jest.config.base.js'; 2 | 3 | export default { 4 | ...base, 5 | displayName: 'typedoc-gitlab-wiki', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/src/_typedoc.d.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY. 2 | import { ManuallyValidatedOption } from 'typedoc'; 3 | import { Sidebar } from './types/options.js'; 4 | declare module 'typedoc' { 5 | export interface TypeDocOptionMap { 6 | sidebar: ManuallyValidatedOption; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/src/options.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_SIDEBAR_OPTIONS: any = { 2 | autoConfiguration: true, 3 | heading: 'API', 4 | }; 5 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/src/options/declarations.ts: -------------------------------------------------------------------------------- 1 | import { ParameterType } from 'typedoc'; 2 | import { DEFAULT_SIDEBAR_OPTIONS } from '../options.js'; 3 | 4 | /** 5 | * **sidebar.autoConfiguration** 6 | * 7 | * Set to `false` to disable sidebar generation. Defaults to true. 8 | * 9 | * **sidebar.heading** 10 | * 11 | * The heading displayed above the sidebar. 12 | * 13 | */ 14 | export const sidebar = { 15 | help: 'Configures the autogenerated `_Sidebar.md file`.', 16 | type: ParameterType.Mixed, 17 | defaultValue: DEFAULT_SIDEBAR_OPTIONS, 18 | }; 19 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/src/options/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * as declarations from './declarations.js'; 8 | export * as presets from './presets.js'; 9 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/src/options/presets.ts: -------------------------------------------------------------------------------- 1 | export const presets = { 2 | entryFileName: 'home.md', 3 | hidePageHeader: true, 4 | }; 5 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/src/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * from './options.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/src/types/options.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY 3 | */ 4 | 5 | /** 6 | * Describes the options declared by the plugin. 7 | */ 8 | export interface PluginOptions { 9 | /** 10 | * Configures the autogenerated `_Sidebar.md file`. 11 | */ 12 | sidebar?: Sidebar; 13 | } 14 | 15 | export interface Sidebar { 16 | autoConfiguration: boolean; 17 | heading: string; 18 | } 19 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/test/stubs/module-1.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | 4 | export interface InterfaceA {} 5 | export interface InterfaceB {} 6 | 7 | // eslint-disable-next-line @typescript-eslint/no-namespace 8 | export namespace Validation { 9 | export interface NamespaceInterface { 10 | item: string; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/test/stubs/module-2.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | 4 | export interface InterfaceA {} 5 | export interface InterfaceB {} 6 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/test/stubs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "experimentalDecorators": true, 4 | "esModuleInterop": true, 5 | "lib": ["es2020", "dom"], 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "noImplicitAny": false, 9 | "noUnusedLocals": false, 10 | "noUnusedParameters": false, 11 | "strictNullChecks": false, 12 | "target": "es2020" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/test/typedoc.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./stubs/*.ts"], 3 | "tsconfig": "./stubs/tsconfig.json", 4 | "out": "./out", 5 | "plugin": ["typedoc-plugin-markdown", "typedoc-gitlab-wiki-theme"], 6 | "readme": "none", 7 | "disableSources": true, 8 | "cleanOutputDir": true 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/test/typedoc.globals.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./typedoc.base.json", 3 | "entryPoints": ["./stubs/module-2.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/test/typedoc.single-modules.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./typedoc.base.json", 3 | "outputFileStrategy": "modules" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/test/typedoc.single-page.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./typedoc.base.json", 3 | "entryPoints": ["./stubs/module-2.ts"], 4 | "outputFileStrategy": "modules" 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | }, 6 | "exclude": ["./dist", "./test", "**/*.spec.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.test.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-gitlab-wiki-theme/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/index.ts", "./src/options", "./src/types"], 3 | "readme": "./internal-docs/introduction.md" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/README.md: -------------------------------------------------------------------------------- 1 | # typedoc-plugin-frontmatter 2 | 3 | [![npm](https://img.shields.io/npm/v/typedoc-plugin-frontmatter.svg?logo=npm)](https://www.npmjs.com/package/typedoc-plugin-frontmatter) [![Build Status](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-plugin-frontmatter.yml/badge.svg?branch=main&style=flat-square)](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-plugin-frontmatter.yml) 4 | 5 | > A plugin for TypeDoc ( + typedoc-plugin-markdown ) that prepends configurable frontmatter to page content. 6 | 7 | ## Documentation 8 | 9 | Please visit [https://typedoc-plugin-markdown.org/plugins/frontmatter](https://typedoc-plugin-markdown.org/plugins/frontmatter) for comprehensive documentation, including options and usage guides. 10 | 11 | ## License 12 | 13 | MIT -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/internal-docs/introduction.md: -------------------------------------------------------------------------------- 1 | # typedoc-plugin-frontmatter 2 | 3 | "typedoc-plugin-frontmatter" is a utility package the prepends frontmatter to pages. 4 | 5 | Package features includes: 6 | 7 | - Exposes some additional options to TypeDoc. 8 | - Prepends a YAML block to pages. 9 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/jest.config.js: -------------------------------------------------------------------------------- 1 | import base from '../../jest.config.base.js'; 2 | 3 | export default { 4 | ...base, 5 | displayName: 'typedoc-plugin-frontmatter', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/src/_typedoc.d.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY. 2 | import { ManuallyValidatedOption } from 'typedoc'; 3 | import { ToStringOptions } from 'yaml'; 4 | declare module 'typedoc' { 5 | export interface TypeDocOptionMap { 6 | frontmatterCommentTags: string[]; 7 | frontmatterGlobals: ManuallyValidatedOption>; 8 | frontmatterNamingConvention: 'camelCase' | 'snakeCase'; 9 | indexFrontmatter: ManuallyValidatedOption>; 10 | preserveFrontmatterCommentTags: boolean; 11 | readmeFrontmatter: ManuallyValidatedOption>; 12 | yamlStringifyOptions: ManuallyValidatedOption; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/src/options/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains all the option declarations and types used in the plugin. 3 | * 4 | * @module 5 | */ 6 | export * as declarations from './declarations.js'; 7 | export * as maps from './maps.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/src/options/maps.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines option maps TypeDoc parameter Map types. 3 | * 4 | * @module 5 | */ 6 | 7 | export enum FrontmatterNamingConvention { 8 | CamelCase = 'camelCase', 9 | SnakeCase = 'snakeCase', 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/src/public-api.ts: -------------------------------------------------------------------------------- 1 | export { PluginOptions } from './types/options.js'; 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/src/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * from './options.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/test/custom-plugin.mjs: -------------------------------------------------------------------------------- 1 | import { MarkdownPageEvent } from 'typedoc-plugin-markdown'; 2 | 3 | export function load(app) { 4 | app.renderer.on(MarkdownPageEvent.BEGIN, (page) => { 5 | page.frontmatter = { 6 | title: page.model.name, 7 | ...page.frontmatter, 8 | }; 9 | }); 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/test/some-readme.md: -------------------------------------------------------------------------------- 1 | # The Readme 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/test/specs/__snapshots__/no-data.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`No Frontmatter Data should not write any YAML to page if no data found 1`] = ` 4 | "# Interface: SomeInterface 5 | 6 | ## Tag One 7 | 8 | 0 9 | 10 | ## Tag Two 11 | 12 | 'Frontmatter' tag 13 | " 14 | `; 15 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/test/specs/no-data.spec.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | import * as path from 'path'; 3 | 4 | describe(`No Frontmatter Data`, () => { 5 | test(`should not write any YAML to page if no data found`, async () => { 6 | const contents = fs 7 | .readFileSync( 8 | path.join(__dirname, '../out/no-data/interfaces/SomeInterface.md'), 9 | ) 10 | .toString(); 11 | expect(contents).toMatchSnapshot(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/test/stubs.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @tagOne 0 3 | * 4 | * @tagTwo 5 | * 6 | * 'Frontmatter' tag 7 | * 8 | */ 9 | export interface SomeInterface {} 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/test/typedoc-base.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./stubs.ts"], 3 | "tsconfig": "../tsconfig.test.json", 4 | "out": "./out", 5 | "readme": "./some-readme.md", 6 | "plugin": ["typedoc-plugin-markdown", "typedoc-plugin-frontmatter"], 7 | "hidePageHeader": true, 8 | "hideBreadcrumbs": true, 9 | "disableSources": true 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/test/typedoc-options-3.cjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | /** @type {import('typedoc').TypeDocOptions & import('typedoc-plugin-markdown').PluginOptions & import('typedoc-plugin-frontmatter').PluginOptions} */ 4 | module.exports = { 5 | entryPoints: ['./stubs.ts'], 6 | tsconfig: '../tsconfig.test.json', 7 | readme: 'none', 8 | plugin: ['typedoc-plugin-markdown', 'typedoc-plugin-frontmatter'], 9 | hidePageHeader: true, 10 | hideBreadcrumbs: true, 11 | frontmatterGlobals: { 12 | isTrue: true, 13 | veryLong: 14 | 'This is a long string that would normally wrap over multiple lines when the text exceeds a certain length.', 15 | }, 16 | yamlStringifyOptions: { 17 | trueStr: 'yes', 18 | defaultStringType: 'QUOTE_SINGLE', 19 | defaultKeyType: 'PLAIN', 20 | }, 21 | disableSources: true, 22 | }; 23 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/test/typedoc-options.cjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | /** @type {import('typedoc').TypeDocOptions & import('typedoc-plugin-markdown').PluginOptions & import('typedoc-plugin-frontmatter').PluginOptions} */ 4 | module.exports = { 5 | entryPoints: ['./stubs.ts'], 6 | tsconfig: '../tsconfig.test.json', 7 | out: './out', 8 | readme: './some-readme.md', 9 | hidePageHeader: true, 10 | hideBreadcrumbs: true, 11 | plugin: [ 12 | 'typedoc-plugin-markdown', 13 | 'typedoc-plugin-frontmatter', 14 | './custom-plugin.mjs', 15 | ], 16 | frontmatterGlobals: { 17 | layout: 'blog', 18 | navOrder: 1, 19 | hide: true, 20 | }, 21 | frontmatterCommentTags: ['tagOne', 'tagTwo', 'tagThree'], 22 | disableSources: true, 23 | }; 24 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | }, 6 | "exclude": ["./dist", "./test", "**/*.spec.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.test.json", 3 | "compilerOptions": { 4 | "esModuleInterop": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/tsdoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://developer.microsoft.com/en-us/json-schemas/tsdoc/v0/tsdoc.schema.json", 3 | "extends": ["typedoc/tsdoc.json"], 4 | "noStandardTags": false, 5 | "tagDefinitions": [ 6 | { 7 | "tagName": "@tagOne", 8 | "syntaxKind": "block" 9 | }, 10 | { 11 | "tagName": "@tagTwo", 12 | "syntaxKind": "block" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-frontmatter/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "./src/index.ts", 4 | "./src/options", 5 | "./src/tags.ts", 6 | "./src/types" 7 | ], 8 | "exclude": ["./src/public-api.ts"], 9 | "readme": "./internal-docs/introduction.md" 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/.gitignore: -------------------------------------------------------------------------------- 1 | playground/docs 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/README.md: -------------------------------------------------------------------------------- 1 | # typedoc-plugin-markdown 2 | 3 | [![npm](https://img.shields.io/npm/v/typedoc-plugin-markdown.svg?logo=npm)](https://www.npmjs.com/package/typedoc-plugin-markdown) [![Build Status](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.yml/badge.svg?branch=main&style=flat-square)](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.yml) 4 | 5 | > A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown. 6 | 7 | ## Installation 8 | 9 | ```shell 10 | npm install typedoc typedoc-plugin-markdown --save-dev 11 | ``` 12 | 13 | ## Documentation 14 | 15 | Please visit [https://typedoc-plugin-markdown.org](https://typedoc-plugin-markdown.org) for comprehensive documentation, including options and usage guides. 16 | 17 | ## License 18 | 19 | MIT -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/__scripts__/prebuild.ts: -------------------------------------------------------------------------------- 1 | import { consola } from 'consola'; 2 | import { prebuildResources } from './prebuild-resources.js'; 3 | 4 | main(); 5 | 6 | async function main() { 7 | await prebuildResources(); 8 | consola.success('[typedoc-plugin-markdown] Prebuild code complete'); 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/__scripts__/schema/get-scheme.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | getSchema: async () => { 3 | /** @type {import('ts-json-schema-generator/dist/src/Config').Config} */ 4 | const config = { 5 | path: './src/types/options.ts', 6 | tsconfig: './__scripts__/schema/tsconfig.schema.json', 7 | type: 'PluginOptions', 8 | topRef: false, 9 | additionalProperties: true, 10 | }; 11 | const { createGenerator } = await import('ts-json-schema-generator'); 12 | const schema = createGenerator(config).createSchema(config.type); 13 | return schema; 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/__scripts__/schema/tsconfig.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "lib": ["es2021", "dom"], 5 | "module": "ESNext", 6 | "moduleResolution": "node", 7 | "target": "es2021" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/internal-docs/introduction.md: -------------------------------------------------------------------------------- 1 | # typedoc-plugin-markdown 2 | 3 | The core package of this monorepo and is the package that is used to generate the markdown documentation. 4 | 5 | Package features include: 6 | 7 | - Extends some methods on the TypeDoc renderer to make compatible with Markdown output. 8 | - Exposes some additional options to TypeDoc. 9 | - Creates a new MarkdownTheme class that overrides the HTML DefaultTheme. 10 | - Exposes some types on a public API. 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/jest.config.js: -------------------------------------------------------------------------------- 1 | import base from '../../jest.config.base.js'; 2 | 3 | export default { 4 | ...base, 5 | displayName: 'typedoc-plugin-markdown', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/events/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the events classes used by the plugin. 3 | * 4 | * @module 5 | */ 6 | export * from './markdown-page-event.js'; 7 | export * from './markdown-renderer-event.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/internationalization/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Exposes additional i18n keys and translations used by the theme. 3 | * 4 | * The translatable strings configured in the plugin are only additional strings that are not present in TypeDoc core. 5 | * 6 | * To add a new locale or edit and existing locale (if you think the strings are incorrect). 7 | * 8 | * @module 9 | */ 10 | export * from './locales/index.js'; 11 | export * from './setup.js'; 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/internationalization/locales/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * List of plugin specific translations per locale. 3 | * 4 | * The translatable strings configured in the plugin are only additional strings that are not present in TypeDoc core. 5 | * 6 | * To add a new locale or edit and existing locale (if you think the strings are incorrect) please update the individual locale file. 7 | * 8 | * @module 9 | */ 10 | 11 | import de from './de.js'; 12 | import en from './en.js'; 13 | import ja from './ja.js'; 14 | import ko from './ko.js'; 15 | import zh from './zh.js'; 16 | 17 | export { de, en, ja, ko, zh }; 18 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/internationalization/locales/ko.ts: -------------------------------------------------------------------------------- 1 | import { TranslatableStrings } from '@plugin/types/index.js'; 2 | /** 3 | * Translations for 'ko' locale. 4 | * 5 | * @category Locales 6 | */ 7 | export const translatable: Partial = { 8 | theme_default_value: '기본 값', 9 | theme_default_type: '기본 유형', 10 | theme_description: '설명', 11 | theme_event: '이벤트', 12 | theme_re_exports: '다시 내보내진 원본:', 13 | theme_renames_and_re_exports: '새 이름으로 내보내진 원본:', 14 | theme_extends: '확장', 15 | theme_extended_by: '에 의해 확장됨', 16 | theme_globals: '전역', 17 | theme_member: '멤버', 18 | theme_member_plural: '멤버들', 19 | theme_modifier: '수정자', 20 | theme_name: '이름', 21 | theme_package: '패키지', 22 | theme_packages: '패키지', 23 | theme_type: '유형', 24 | theme_value: '값', 25 | theme_version: '버전', 26 | }; 27 | 28 | export default translatable; 29 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/internationalization/locales/zh.ts: -------------------------------------------------------------------------------- 1 | import { TranslatableStrings } from '@plugin/types/index.js'; 2 | /** 3 | * Translations for 'zh' locale. 4 | * 5 | * @category Locales 6 | */ 7 | export const translatable: Partial = { 8 | theme_default_value: '默认值', 9 | theme_default_type: '默认类型', 10 | theme_description: '描述', 11 | theme_event: '事件', 12 | theme_re_exports: '重新导出', 13 | theme_renames_and_re_exports: '重命名并重新导出', 14 | theme_extends: '继承', 15 | theme_extended_by: '继承于', 16 | theme_globals: '全局变量', 17 | theme_member: '成员', 18 | theme_member_plural: '成员', 19 | theme_modifier: '修饰符', 20 | theme_name: '名称', 21 | theme_package: '包', 22 | theme_packages: '包', 23 | theme_type: '类型', 24 | theme_value: '值', 25 | theme_version: '版本', 26 | }; 27 | 28 | export default translatable; 29 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * General pure library functions to be consumed across the plugin. 3 | * 4 | * @module 5 | */ 6 | export * as markdown from './markdown/index.js'; 7 | export * as utils from './utils/index.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/back-ticks.ts: -------------------------------------------------------------------------------- 1 | import { escapeChars } from '@plugin/libs/utils/index.js'; 2 | 3 | /** 4 | * Wraps a string in backticks. 5 | */ 6 | export function backTicks(text: string) { 7 | // If the input string itself contains a pipe, or backslash (which can result in unwanted side effects) the string is escaped instead. 8 | if (/(\||\\)/g.test(text)) { 9 | return escapeChars(text); 10 | } 11 | // If the input string itself contains a backtick, the string is wrapped in double backticks. 12 | if (/`/g.test(text)) { 13 | return `\`\` ${text} \`\``; 14 | } 15 | // Otherwise, the string is wrapped in single backticks. 16 | return `\`${text}\``; 17 | } 18 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/block-quote-block.ts: -------------------------------------------------------------------------------- 1 | export function blockQuoteBlock(content: string) { 2 | const lines = ( 3 | content.replace(/[\r\n]{3,}/g, '\n\n').replace(/^\s+|\s+$/g, '') + '\n' 4 | ).split('\n'); 5 | return lines 6 | .map((line) => (line.length ? `> ${line.trim()}` : '>')) 7 | .join('\n'); 8 | } 9 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/bold.ts: -------------------------------------------------------------------------------- 1 | export function bold(text: string) { 2 | return `**${text}**`; 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/code-block.ts: -------------------------------------------------------------------------------- 1 | import { unEscapeChars } from '@plugin/libs/utils/index.js'; 2 | 3 | export function codeBlock(content: string) { 4 | const trimLastLine = (content: string) => { 5 | const lines = content.split('\n'); 6 | return lines 7 | .map((line, index) => (index === lines.length - 1 ? line.trim() : line)) 8 | .join('\n'); 9 | }; 10 | const trimmedContent = 11 | content.endsWith('}') || 12 | content.endsWith('};') || 13 | content.endsWith('>') || 14 | content.endsWith('>;') 15 | ? trimLastLine(content) 16 | : content; 17 | return '```ts\n' + unEscapeChars(trimmedContent) + '\n```'; 18 | } 19 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/heading.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Returns a heading in markdown format 3 | * @param level The level of the heading 4 | * @param text The text of the heading 5 | */ 6 | export function heading(level: number, text: string) { 7 | level = level > 6 ? 6 : level; 8 | return `${[...Array(level)].map(() => '#').join('')} ${text}`; 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/horizontal-rule.ts: -------------------------------------------------------------------------------- 1 | export function horizontalRule() { 2 | return '\n\n***\n\n'; 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/html-table.ts: -------------------------------------------------------------------------------- 1 | export function htmlTable( 2 | headers: string[], 3 | rows: string[][], 4 | leftAlignHeadings = false, 5 | ) { 6 | return ` 7 | 8 | ${headers 9 | .map( 10 | (header) => ` 11 | ${header}`, 12 | ) 13 | .join('')} 14 | 15 | 16 | ${rows 17 | .map( 18 | (row) => 19 | ` 20 | ${row 21 | .map( 22 | (cell) => 23 | ` 24 | `, 29 | ) 30 | .join('')} 31 | `, 32 | ) 33 | .join('')} 34 | 35 |
25 | 26 | ${cell === '-' ? '‐' : cell} 27 | 28 |
`; 36 | } 37 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/indent-block.ts: -------------------------------------------------------------------------------- 1 | export function indentBlock(content: string) { 2 | const lines = content.split('\n'); 3 | return lines 4 | .filter((line) => Boolean(line.length)) 5 | .map((line) => ` ${line}`) 6 | .join('\n'); 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Helpers for generating markdown. 3 | * 4 | * @module 5 | */ 6 | 7 | export * from './back-ticks.js'; 8 | export * from './block-quote-block.js'; 9 | export * from './bold.js'; 10 | export * from './code-block.js'; 11 | export * from './heading.js'; 12 | export * from './horizontal-rule.js'; 13 | export * from './html-table.js'; 14 | export * from './indent-block.js'; 15 | export * from './italic.js'; 16 | export * from './link.js'; 17 | export * from './strike-through.js'; 18 | export * from './table.js'; 19 | export * from './unordered-list.js'; 20 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/italic.ts: -------------------------------------------------------------------------------- 1 | export function italic(text: string) { 2 | return `*${text}*`; 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/link.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The link element 3 | * @param label The text to display for the link 4 | * @param url The url to link to 5 | */ 6 | export function link(label: string, url: string | null) { 7 | return `[${label.trim()}](${url || ''})`; 8 | } 9 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/strike-through.ts: -------------------------------------------------------------------------------- 1 | export function strikeThrough(content: string) { 2 | return `~~${content}~~`; 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/table.ts: -------------------------------------------------------------------------------- 1 | import { formatTableCell } from '@plugin/libs/utils/index.js'; 2 | /** 3 | * Comments for table 4 | * @param headers 5 | * @param rows 6 | */ 7 | export function table( 8 | headers: string[], 9 | rows: string[][], 10 | headerLeftAlign = false, 11 | ) { 12 | return `\n| ${headers.join(' | ')} |\n| ${headers 13 | .map(() => `${headerLeftAlign ? ':' : ''}------`) 14 | .join( 15 | ' | ', 16 | )} |\n${rows.map((row) => `| ${row.map((cell) => formatTableCell(cell)).join(' | ')} |\n`).join('')}`; 17 | } 18 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/markdown/unordered-list.ts: -------------------------------------------------------------------------------- 1 | export function unorderedList(items: string[]) { 2 | return items.map((item) => `- ${item}`).join('\n'); 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/camel-to-title-case.spec.ts: -------------------------------------------------------------------------------- 1 | import { camelToTitleCase } from './camel-to-title-case'; 2 | 3 | describe('camelToTitleCase', () => { 4 | it('should convert camel case to title case correctly', () => { 5 | const input = 'camelCaseText'; 6 | const expectedOutput = 'Camel Case Text'; 7 | const result = camelToTitleCase(input); 8 | expect(result).toEqual(expectedOutput); 9 | }); 10 | 11 | it('should handle single word correctly', () => { 12 | const input = 'word'; 13 | const expectedOutput = 'Word'; 14 | const result = camelToTitleCase(input); 15 | expect(result).toEqual(expectedOutput); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/camel-to-title-case.ts: -------------------------------------------------------------------------------- 1 | export function camelToTitleCase(text: string): string { 2 | return ( 3 | text.substring(0, 1).toUpperCase() + 4 | text.substring(1).replace(/[a-z][A-Z]/g, (x) => `${x[0]} ${x[1]}`) 5 | ); 6 | } 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/encode-angle-brackets.ts: -------------------------------------------------------------------------------- 1 | export function encodeAngleBrackets(str: string) { 2 | return str.replace(//g, '>'); 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/escape-chars.spec.ts: -------------------------------------------------------------------------------- 1 | import { escapeChars } from './escape-chars'; 2 | 3 | describe('escapeChars', () => { 4 | it('should escape special characters correctly', () => { 5 | const input = 'This is a string with >, <, {, }, _, `, |, [, ], and *'; 6 | const expectedOutput = 7 | 'This is a string with \\>, \\<, \\{, \\}, \\_, \\`, \\|, \\[, \\], and \\*'; 8 | const result = escapeChars(input); 9 | expect(result).toEqual(expectedOutput); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/escape-chars.ts: -------------------------------------------------------------------------------- 1 | export function escapeChars(str: string) { 2 | return str 3 | .replace(/>/g, '\\>') 4 | .replace(/ { 4 | it('should correctly format the cell content', () => { 5 | const input = ` 6 | This is a test 7 | \`\`\`ts 8 | const x = 10; 9 | \`\`\` 10 | with multiple spaces. 11 | `; 12 | const expectedOutput = 13 | 'This is a test `const x = 10;` with multiple spaces.'; 14 | expect(formatTableCell(input)).toBe(expectedOutput); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/format-table-cell.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * - Replace new lines with spaces 3 | * - Replaces code blocks with single backticks 4 | * - Replaces multiple spaces with single spaces 5 | */ 6 | export function formatTableCell(str: string) { 7 | return str 8 | .replace(/\r?\n/g, ' ') 9 | .replace( 10 | /```(\w+\s)?([\s\S]*?)```/gs, 11 | (match, p1, p2) => `\`${p2.trim()}\``, 12 | ) 13 | .replace(/ +/g, ' ') 14 | .trim(); 15 | } 16 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/get-path-without-ext.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | 3 | /** 4 | * Returns file path without extension 5 | */ 6 | export function getPathWithoutExt(filePathWithExtension: string) { 7 | if (!filePathWithExtension) { 8 | return ''; 9 | } 10 | const filePath = path.join( 11 | path.dirname(filePathWithExtension), 12 | path.basename(filePathWithExtension, path.extname(filePathWithExtension)), 13 | ); 14 | return filePath.replace(/\\/g, '/'); 15 | } 16 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * General utility pure functions. 3 | * 4 | * @module 5 | */ 6 | export * from './camel-to-title-case.js'; 7 | export * from './encode-angle-brackets.js'; 8 | export * from './escape-chars.js'; 9 | export * from './format-markdown.js'; 10 | export * from './format-table-cell.js'; 11 | export * from './get-path-without-ext.js'; 12 | export * from './is-quoted.js'; 13 | export * from './remove-first-scoped-directory.js'; 14 | export * from './remove-line-breaks.js'; 15 | export * from './replace-file-name.js'; 16 | export * from './sanitize-comments.js'; 17 | export * from './slugify.js'; 18 | export * from './to-pascal-case.js'; 19 | export * from './un-escape-chars.js'; 20 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/is-quoted.spec.ts: -------------------------------------------------------------------------------- 1 | import { isQuoted } from './is-quoted'; 2 | 3 | describe('isQuoted', () => { 4 | it('should return true for quoted strings', () => { 5 | const input = '"This is a quoted string"'; 6 | const expectedOutput = true; 7 | 8 | const result = isQuoted(input); 9 | 10 | expect(result).toEqual(expectedOutput); 11 | }); 12 | 13 | it('should return false for unquoted strings', () => { 14 | const input = 'This is an unquoted string'; 15 | const expectedOutput = false; 16 | 17 | const result = isQuoted(input); 18 | 19 | expect(result).toEqual(expectedOutput); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/is-quoted.ts: -------------------------------------------------------------------------------- 1 | export function isQuoted(str: string) { 2 | return str.startsWith('"') && str.endsWith('"'); 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/remove-first-scoped-directory.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path'; 2 | 3 | export function removeFirstScopedDirectory( 4 | urlString: string, 5 | sep?: string, 6 | ): string { 7 | sep = sep || path.sep; 8 | const pathParts = urlString.replace(/\//g, path.sep).split(sep); 9 | const scopedDirectoryIndex = pathParts.findIndex((part) => 10 | part.startsWith('@'), 11 | ); 12 | if (scopedDirectoryIndex !== -1) { 13 | pathParts.splice(scopedDirectoryIndex, 1); 14 | } 15 | return pathParts.join(sep); 16 | } 17 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/remove-line-breaks.spec.ts: -------------------------------------------------------------------------------- 1 | import { removeLineBreaks } from './remove-line-breaks'; 2 | 3 | describe('removeLineBreaks', () => { 4 | it('should remove line breaks and replace with a single space', () => { 5 | const input = 'This is a string\nwith multiple\n\nline breaks'; 6 | const expectedOutput = 'This is a string with multiple line breaks'; 7 | 8 | const result = removeLineBreaks(input); 9 | 10 | expect(result).toEqual(expectedOutput); 11 | }); 12 | 13 | it('should replace multiple spaces with a single space', () => { 14 | const input = 'This is a string with multiple spaces'; 15 | const expectedOutput = 'This is a string with multiple spaces'; 16 | 17 | const result = removeLineBreaks(input); 18 | 19 | expect(result).toEqual(expectedOutput); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/remove-line-breaks.ts: -------------------------------------------------------------------------------- 1 | export function removeLineBreaks(str: string) { 2 | return str?.replace(/\r?\n/g, ' ').replace(/ {2,}/g, ' '); 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/replace-file-name.ts: -------------------------------------------------------------------------------- 1 | export function replaceFilename(originalPath: string, newFileName: string) { 2 | return originalPath 3 | .replace(/\\/g, '/') 4 | .replace(/\/[^/]+(\.[^/.]+)$/, `/${newFileName}$1`); 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/sanitize-comments.ts: -------------------------------------------------------------------------------- 1 | export function sanitizeComments(str: string) { 2 | const codeBlocks: string[] = []; 3 | const placeholder = '___CODEBLOCKPLACEHOLDER___'; 4 | 5 | // Replace code blocks with placeholders 6 | str = str.replace(/(```[\s\S]*?```|`[^`]*?`)/g, (match) => { 7 | codeBlocks.push(match); 8 | return placeholder; 9 | }); 10 | 11 | // If line starts with a > treat it as a blockquote 12 | // Otherwise escape all <, >, {, and } characters 13 | str = str 14 | .replace(/(?!^)>/gm, '\\>') 15 | .replace(/ codeBlocks.shift() || '', 23 | ); 24 | 25 | return str; 26 | } 27 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/slugify.spec.ts: -------------------------------------------------------------------------------- 1 | import { slugify } from './slugify'; 2 | 3 | describe('slugifyUrl', () => { 4 | it('should convert to slug correctly', () => { 5 | const input = ' Type Alias '; 6 | const expectedOutput = 'type-alias'; 7 | 8 | const result = slugify(input); 9 | 10 | expect(result).toEqual(expectedOutput); 11 | }); 12 | 13 | it('should handle URL with special characters', () => { 14 | const input = 'Reflection!'; 15 | const expectedOutput = 'reflection'; 16 | 17 | const result = slugify(input); 18 | 19 | expect(result).toEqual(expectedOutput); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/slugify.ts: -------------------------------------------------------------------------------- 1 | export function slugify(url: string) { 2 | return url 3 | .toLowerCase() 4 | .trim() 5 | .replace(/[^\w\s-]/g, '') 6 | .replace(/[\s_-]+/g, '-') 7 | .replace(/^-+|-+$/g, ''); 8 | } 9 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/to-pascal-case.spec.ts: -------------------------------------------------------------------------------- 1 | import { toPascalCase } from './to-pascal-case'; 2 | 3 | describe('toPascalCase', () => { 4 | it('should convert a string to start case', () => { 5 | expect(toPascalCase('Type Alias')).toBe('TypeAlias'); 6 | }); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/to-pascal-case.ts: -------------------------------------------------------------------------------- 1 | export function toPascalCase(text: string): string { 2 | return text 3 | .split(' ') 4 | .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) 5 | .join(''); 6 | } 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/libs/utils/un-escape-chars.spec.ts: -------------------------------------------------------------------------------- 1 | import { unEscapeChars } from './un-escape-chars'; 2 | 3 | describe('unEscapeChars', () => { 4 | it('should unescape characters correctly', () => { 5 | const input = '\\*\\<\\>\\_\\{\\}\\`\\*\\|\\]\\['; 6 | const expectedOutput = '*<>_{}`*|]['; 7 | 8 | const result = unEscapeChars(input); 9 | 10 | expect(result).toEqual(expectedOutput); 11 | }); 12 | 13 | it('should handle string without escaped characters', () => { 14 | const input = 'This is a string without escaped characters'; 15 | const expectedOutput = 'This is a string without escaped characters'; 16 | 17 | const result = unEscapeChars(input); 18 | 19 | expect(result).toEqual(expectedOutput); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/options/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains all the option declarations and types used in the plugin. 3 | * 4 | * @document ../../internal-docs/adding-options.md 5 | * 6 | * @module 7 | */ 8 | export * as constants from './constants.js'; 9 | export * as declarations from './declarations.js'; 10 | export * as maps from './maps.js'; 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/options/maps.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines option maps TypeDoc parameter Map types. 3 | * 4 | * @module 5 | */ 6 | 7 | /** 8 | * The allowed values of the `--outputFileStrategy` option. 9 | */ 10 | export enum OutputFileStrategy { 11 | Members = 'members', 12 | Modules = 'modules', 13 | } 14 | 15 | /** 16 | * The allowed values for formatting reflections and indexes. 17 | */ 18 | export enum DisplayFormat { 19 | List = 'list', 20 | Table = 'table', 21 | HtmlTable = 'htmlTable', 22 | } 23 | 24 | /** 25 | * The allowed values for formatting reflections and indexes. 26 | */ 27 | export enum TypeDeclarationVisibility { 28 | Compact = 'compact', 29 | Verbose = 'verbose', 30 | } 31 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/public-api.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * The public API of typedoc-plugin-markdown exposes some classes and types that can be used to customize the output of the plugin. 3 | * 4 | * @module 5 | */ 6 | 7 | export { 8 | MarkdownPageEvent, 9 | MarkdownRendererEvent, 10 | } from '@plugin/events/index.js'; 11 | export { MemberRouter, ModuleRouter } from '@plugin/router/index.js'; 12 | export { MarkdownTheme, MarkdownThemeContext } from '@plugin/theme/index.js'; 13 | export { 14 | MarkdownApplication, 15 | MarkdownRendererHooks, 16 | NavigationItem, 17 | PluginOptions, 18 | } from '@plugin/types/index.js'; 19 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/renderer/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Includes functionality and override methods on the TypeDoc Renderer. 3 | * 4 | * @module 5 | */ 6 | 7 | export * from './render.js'; 8 | export * from './setup.js'; 9 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/router/index.ts: -------------------------------------------------------------------------------- 1 | export * from './core-routers.js'; 2 | export * from './markdown-router.js'; 3 | export * from './member-router.js'; 4 | export * from './module-router.js'; 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-angle-bracket.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | 3 | export function getAngleBracket( 4 | this: MarkdownThemeContext, 5 | bracket: '<' | '>', 6 | ): string { 7 | const useEntities = this.options.getValue('useHTMLEncodedBrackets'); 8 | if (bracket === '<') { 9 | return useEntities ? '<' : '\\<'; 10 | } 11 | return useEntities ? '>' : '\\>'; 12 | } 13 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-declaration-type.ts: -------------------------------------------------------------------------------- 1 | import { DeclarationReflection } from 'typedoc'; 2 | 3 | export function getDeclarationType(model: DeclarationReflection) { 4 | if (model.signatures) { 5 | return model.signatures[0].type; 6 | } 7 | if (model.getSignature) { 8 | return model.getSignature.type; 9 | } 10 | if (model.setSignature) { 11 | return model.setSignature.type; 12 | } 13 | return model.type; 14 | } 15 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-description-for-comment.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { Comment } from 'typedoc'; 3 | 4 | export function getDescriptionForComment( 5 | this: MarkdownThemeContext, 6 | comment: Comment, 7 | ): string | null { 8 | if (comment?.summary?.length) { 9 | return this.helpers 10 | .getCommentParts(comment.summary) 11 | ?.split(/(\r?\n){2}/)[0] 12 | .replace(/\r?\n/g, ' '); 13 | } 14 | return null; 15 | } 16 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-hierarchy-type.ts: -------------------------------------------------------------------------------- 1 | import { backTicks } from '@plugin/libs/markdown/index.js'; 2 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 3 | import { SomeType } from 'typedoc'; 4 | 5 | export function getHierarchyType( 6 | this: MarkdownThemeContext, 7 | model: SomeType, 8 | options?: { isTarget: boolean }, 9 | ): string { 10 | return options?.isTarget 11 | ? backTicks(model.toString()) 12 | : this.partials.someType(model); 13 | } 14 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-keyword.ts: -------------------------------------------------------------------------------- 1 | import { ReflectionKind } from 'typedoc'; 2 | 3 | export function getKeyword(model: ReflectionKind): string { 4 | const KEYWORD_MAP = { 5 | [ReflectionKind.Class]: 'class', 6 | [ReflectionKind.Enum]: 'enum', 7 | [ReflectionKind.Function]: 'function', 8 | [ReflectionKind.TypeAlias]: 'type', 9 | }; 10 | return KEYWORD_MAP[model]; 11 | } 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-modifier.ts: -------------------------------------------------------------------------------- 1 | import { DeclarationReflection } from 'typedoc'; 2 | 3 | export function getModifier(model: DeclarationReflection): string | null { 4 | if (model.flags.isAbstract) { 5 | return 'abstract'; 6 | } 7 | if (model.flags.isPrivate) { 8 | return 'private'; 9 | } 10 | if (model.flags.isReadonly) { 11 | return 'readonly'; 12 | } 13 | if (model.flags.isStatic) { 14 | return 'static'; 15 | } 16 | if (model.flags.isProtected) { 17 | return 'protected'; 18 | } 19 | if (model.flags.isPublic) { 20 | return 'public'; 21 | } 22 | return null; 23 | } 24 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-parameter-default-value.ts: -------------------------------------------------------------------------------- 1 | import { ParameterReflection } from 'typedoc'; 2 | 3 | export function getParameterDefaultValue(model: ParameterReflection) { 4 | return model.defaultValue ? model.defaultValue : 'undefined'; 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-project-name.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownPageEvent } from '@plugin/events/index.js'; 2 | import { Reflection } from 'typedoc'; 3 | 4 | export function getProjectName( 5 | stringWithPlaceholders: string, 6 | page: MarkdownPageEvent, 7 | includeVersion = true, 8 | ) { 9 | return stringWithPlaceholders 10 | .replace('{projectName}', page.project.name) 11 | .replace( 12 | '{version}', 13 | includeVersion && page.project.packageVersion 14 | ? `v${page.project.packageVersion}` 15 | : '', 16 | ) 17 | .replace(/\s+/g, ' ') 18 | .trim(); 19 | } 20 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-property-default-value.ts: -------------------------------------------------------------------------------- 1 | import { backTicks } from '@plugin/libs/markdown/index.js'; 2 | import { DeclarationReflection } from 'typedoc'; 3 | 4 | export function getPropertyDefaultValue(model: DeclarationReflection) { 5 | const defaultValueTag = model.comment?.blockTags?.find( 6 | (tag) => tag.tag === '@defaultValue', 7 | ); 8 | if (defaultValueTag) { 9 | return defaultValueTag?.content.map((content) => content.text).join(''); 10 | } 11 | return model.defaultValue && model.defaultValue !== '...' 12 | ? backTicks(model.defaultValue) 13 | : null; 14 | } 15 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/get-return-type.ts: -------------------------------------------------------------------------------- 1 | import { codeBlock } from '@plugin/libs/markdown/index.js'; 2 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 3 | import { ReflectionType, SomeType } from 'typedoc'; 4 | 5 | export function getReturnType( 6 | this: MarkdownThemeContext, 7 | model?: SomeType, 8 | ): string { 9 | if (model) { 10 | const returnType = this.partials.someType(model); 11 | if ( 12 | this.options.getValue('useCodeBlocks') && 13 | this.options.getValue('expandObjects') && 14 | model instanceof ReflectionType 15 | ) { 16 | return codeBlock(returnType); 17 | } 18 | return returnType; 19 | } 20 | return ''; 21 | } 22 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-angle-bracket.js'; 2 | export * from './get-comment-parts.js'; 3 | export * from './get-declaration-type.js'; 4 | export * from './get-description-for-comment.js'; 5 | export * from './get-flattened-declarations.js'; 6 | export * from './get-hierarchy-type.js'; 7 | export * from './get-keyword.js'; 8 | export * from './get-modifier.js'; 9 | export * from './get-parameter-default-value.js'; 10 | export * from './get-project-name.js'; 11 | export * from './get-property-default-value.js'; 12 | export * from './get-reflection-flags.js'; 13 | export * from './get-return-type.js'; 14 | export * from './has-useful-type-details.js'; 15 | export * from './is-group-kind.js'; 16 | export * from './use-table-format.js'; 17 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/helpers/is-group-kind.ts: -------------------------------------------------------------------------------- 1 | import { 2 | DeclarationReflection, 3 | ReflectionKind, 4 | SignatureReflection, 5 | } from 'typedoc'; 6 | 7 | export function isGroupKind( 8 | model: DeclarationReflection | SignatureReflection, 9 | ) { 10 | const groupKinds = [ 11 | ReflectionKind.Class, 12 | ReflectionKind.Interface, 13 | ReflectionKind.Enum, 14 | ReflectionKind.Function, 15 | ReflectionKind.Variable, 16 | ReflectionKind.TypeAlias, 17 | ]; 18 | return groupKinds.includes(model.kind); 19 | } 20 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Support and resources for the theme MarkdownThemeContext class. 3 | * 4 | * @module 5 | */ 6 | export * as helpers from './helpers/index.js'; 7 | export * as partials from './partials/index.js'; 8 | export * as templates from './templates/index.js'; 9 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/member.typeArguments.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { ReflectionType, SomeType } from 'typedoc'; 3 | 4 | export function typeArguments( 5 | this: MarkdownThemeContext, 6 | model: SomeType[], 7 | options?: { forceCollapse?: boolean }, 8 | ): string { 9 | return `${this.helpers.getAngleBracket('<')}${model 10 | .map((typeArgument) => { 11 | if (typeArgument instanceof ReflectionType) { 12 | return this.partials.reflectionType(typeArgument, { 13 | forceCollapse: options?.forceCollapse, 14 | }); 15 | } 16 | return this.partials.someType(typeArgument); 17 | }) 18 | .join(', ')}${this.helpers.getAngleBracket('>')}`; 19 | } 20 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/page.footer.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | 3 | export function footer(this: MarkdownThemeContext): string { 4 | const textContentMappings = this.options.getValue('textContentMappings'); 5 | const text = textContentMappings['footer.text']; 6 | return text ? `***\n\n${text}` : ``; 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.array.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { ArrayType } from 'typedoc'; 3 | 4 | export function arrayType( 5 | this: MarkdownThemeContext, 6 | model: ArrayType, 7 | ): string { 8 | const theType = this.partials.someType(model.elementType); 9 | return model.elementType.type === 'union' ? `(${theType})[]` : `${theType}[]`; 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.index-access.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { IndexedAccessType } from 'typedoc'; 3 | 4 | export function indexAccessType( 5 | this: MarkdownThemeContext, 6 | model: IndexedAccessType, 7 | ): string { 8 | const md: string[] = []; 9 | if (model.objectType) { 10 | md.push(this.partials.someType(model.objectType)); 11 | } 12 | if (model.indexType) { 13 | md.push(`\\[${this.partials.someType(model.indexType)}\\]`); 14 | } 15 | return md.join(''); 16 | } 17 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.inferred.ts: -------------------------------------------------------------------------------- 1 | import { escapeChars } from '@plugin/libs/utils/index.js'; 2 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 3 | import { InferredType } from 'typedoc'; 4 | 5 | export function inferredType( 6 | this: MarkdownThemeContext, 7 | model: InferredType, 8 | ): string { 9 | return `infer ${escapeChars(model.name)}`; 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.intersection.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { IntersectionType } from 'typedoc'; 3 | 4 | export function intersectionType( 5 | this: MarkdownThemeContext, 6 | model: IntersectionType, 7 | ): string { 8 | return model.types 9 | .map((intersectionType) => this.partials.someType(intersectionType)) 10 | .join(' & '); 11 | } 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.intrinsic.ts: -------------------------------------------------------------------------------- 1 | import { backTicks } from '@plugin/libs/markdown/index.js'; 2 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 3 | import { IntrinsicType } from 'typedoc'; 4 | 5 | export function intrinsicType( 6 | this: MarkdownThemeContext, 7 | model: IntrinsicType, 8 | ): string { 9 | return backTicks(model.name); 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.literal.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { LiteralType } from 'typedoc'; 3 | 4 | export function literalType( 5 | this: MarkdownThemeContext, 6 | model: LiteralType, 7 | ): string { 8 | if (typeof model.value === 'bigint') { 9 | return `\`${model.value}n\``; 10 | } 11 | return `\`\`${JSON.stringify(model.value)}\`\``; 12 | } 13 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.named-tuple.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { NamedTupleMember } from 'typedoc'; 3 | 4 | export function namedTupleType( 5 | this: MarkdownThemeContext, 6 | model: NamedTupleMember, 7 | ): string { 8 | return this.partials.someType(model.element); 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.optional.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { OptionalType } from 'typedoc'; 3 | 4 | export function optionalType( 5 | this: MarkdownThemeContext, 6 | model: OptionalType, 7 | options?: { forceCollapse?: boolean }, 8 | ): string { 9 | const result = this.partials.someType(model.elementType, { 10 | forceCollapse: options?.forceCollapse, 11 | }); 12 | return model.elementType.type === 'union' ? `(${result})?` : `${result}?`; 13 | } 14 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.query.ts: -------------------------------------------------------------------------------- 1 | import { italic } from '@plugin/libs/markdown/index.js'; 2 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 3 | import { QueryType } from 'typedoc'; 4 | 5 | export function queryType( 6 | this: MarkdownThemeContext, 7 | model: QueryType, 8 | ): string { 9 | return `${italic('typeof')} ${this.partials.someType(model.queryType)}`; 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.tuple.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { TupleType } from 'typedoc'; 3 | 4 | export function tupleType( 5 | this: MarkdownThemeContext, 6 | model: TupleType, 7 | ): string { 8 | return `\\[${model.elements 9 | .map((element) => this.partials.someType(element, { forceCollapse: true })) 10 | .join(', ')}\\]`; 11 | } 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.type-operator.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { TypeOperatorType } from 'typedoc'; 3 | 4 | export function typeOperatorType( 5 | this: MarkdownThemeContext, 6 | model: TypeOperatorType, 7 | ): string { 8 | return `${model.operator} ${this.partials.someType(model.target)}`; 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.union.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 2 | import { UnionType } from 'typedoc'; 3 | 4 | export function unionType( 5 | this: MarkdownThemeContext, 6 | model: UnionType, 7 | ): string { 8 | const useCodeBlocks = this.options.getValue('useCodeBlocks'); 9 | const typesOut = model.types.map((unionType) => 10 | this.partials.someType(unionType, { forceCollapse: true }), 11 | ); 12 | const shouldFormat = 13 | useCodeBlocks && 14 | (typesOut?.join('').length > 70 || typesOut?.join('').includes('\n')); 15 | const md = typesOut.join(shouldFormat ? `\n \\| ` : ` \\| `); 16 | return shouldFormat ? `\n \\| ` + md : md; 17 | } 18 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/partials/type.unknown.ts: -------------------------------------------------------------------------------- 1 | import { escapeChars } from '@plugin/libs/utils/index.js'; 2 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 3 | import { UnknownType } from 'typedoc'; 4 | 5 | export function unknownType( 6 | this: MarkdownThemeContext, 7 | model: UnknownType, 8 | ): string { 9 | return escapeChars(model.name); 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/templates/document.template.ts: -------------------------------------------------------------------------------- 1 | import { MarkdownPageEvent } from '@plugin/events/index.js'; 2 | import { MarkdownThemeContext } from '@plugin/theme/index.js'; 3 | import { DocumentReflection } from 'typedoc'; 4 | 5 | export function document( 6 | this: MarkdownThemeContext, 7 | page: MarkdownPageEvent, 8 | ) { 9 | const md: string[] = []; 10 | 11 | if (!this.options.getValue('hidePageHeader')) { 12 | md.push(this.partials.header()); 13 | } 14 | 15 | if (!this.options.getValue('hideBreadcrumbs')) { 16 | md.push(this.partials.breadcrumbs()); 17 | } 18 | 19 | md.push(this.helpers.getCommentParts(page.model.content)); 20 | 21 | md.push(this.partials.footer()); 22 | 23 | return md.join('\n\n'); 24 | } 25 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/context/templates/index.ts: -------------------------------------------------------------------------------- 1 | export * from './document.template.js'; 2 | export * from './hierarchy.template.js'; 3 | export * from './index.template.js'; 4 | export * from './reflection.template.js'; 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains all functionality relevant to the markdown theme. 3 | * 4 | * @document ../../internal-docs/custom-theme.md 5 | * 6 | * @module 7 | */ 8 | export * from './markdown-theme-context.js'; 9 | export * from './markdown-theme.js'; 10 | export * from './navigation/navigation-builder.js'; 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/lib/index.ts: -------------------------------------------------------------------------------- 1 | export * from './get-hierarchy-roots.js'; 2 | export * from './is-none-section.js'; 3 | export * from './sort-none-section-first.js'; 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/lib/is-none-section.ts: -------------------------------------------------------------------------------- 1 | import { MemberSection } from '@plugin/types/index.js'; 2 | 3 | export function isNoneSection(section: MemberSection): boolean { 4 | return section.title.toLocaleLowerCase() === 'none'; 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/theme/lib/sort-none-section-first.ts: -------------------------------------------------------------------------------- 1 | import { MemberSection } from '@plugin/types/theme.js'; 2 | import { isNoneSection } from './is-none-section.js'; 3 | 4 | export function sortNoneSectionFirst(a: MemberSection, b: MemberSection) { 5 | if (isNoneSection(a)) { 6 | return -1; 7 | } 8 | if (isNoneSection(b)) { 9 | return 1; 10 | } 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | export * from './internationalization.js'; 7 | export * from './markdown-application.js'; 8 | export * from './markdown-renderer-hooks.js'; 9 | export * from './markdown-renderer.js'; 10 | export * from './options.js'; 11 | export * from './theme.js'; 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/types/internationalization.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Internationalization types. 3 | * 4 | * @module 5 | */ 6 | 7 | /** 8 | * The model of translatable strings specific to the Markdown theme. 9 | */ 10 | export interface TranslatableStrings { 11 | theme_default_value: string; 12 | theme_default_type: string; 13 | theme_description: string; 14 | theme_event: string; 15 | theme_re_exports: string; 16 | theme_renames_and_re_exports: string; 17 | theme_extends: string; 18 | theme_extended_by: string; 19 | theme_globals: string; 20 | theme_member: string; 21 | theme_member_plural: string; 22 | theme_modifier: string; 23 | theme_name: string; 24 | theme_package: string; 25 | theme_packages: string; 26 | theme_type: string; 27 | theme_value: string; 28 | theme_version: string; 29 | } 30 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/types/markdown-application.ts: -------------------------------------------------------------------------------- 1 | import { Application, Renderer } from 'typedoc'; 2 | import { MarkdownRenderer } from './markdown-renderer.js'; 3 | 4 | /** 5 | * The MarkdownApplication extends TypeDoc's {@link typedoc!Application Application} instance with a custom renderer. 6 | */ 7 | export interface MarkdownApplication extends Application { 8 | renderer: MarkdownRenderer & Renderer; 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/src/types/theme.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Options, 3 | ReflectionCategory, 4 | ReflectionGroup, 5 | ReflectionKind, 6 | } from 'typedoc'; 7 | 8 | /** 9 | * The model used to define the package metadata when in packages mode. 10 | * 11 | */ 12 | export interface PackageMetaData { 13 | description: string; 14 | options: Options; 15 | } 16 | 17 | /** 18 | * The model used to define the navigation structure. 19 | * 20 | */ 21 | export interface NavigationItem { 22 | title: string; 23 | path?: string | null; 24 | kind?: ReflectionKind; 25 | isDeprecated?: boolean; 26 | children?: NavigationItem[]; 27 | } 28 | 29 | /** 30 | * Defines the template type to use for rendering. 31 | */ 32 | export type RenderTemplate = (data: T) => string; 33 | 34 | export type MemberSection = ReflectionGroup | ReflectionCategory; 35 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/PACKAGE_DOC_1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Package Document 1' 3 | description: 'A description of the document' 4 | --- 5 | 6 | ## Package Document 1 7 | 8 | Document content 9 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/PROJECT_DOC_1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Project Document 1' 3 | description: 'A description of the document' 4 | --- 5 | 6 | ## Project Document 1 7 | 8 | Document content 9 | 10 | ### Anchor 11 | 12 | Link to anchor 13 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/README.md: -------------------------------------------------------------------------------- 1 | # MY README 2 | 3 | > Some block quote 4 | 5 | Some text. 6 | 7 | ## Readme heading 8 | 9 | Some text. 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/configs/customize.cjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | const baseOptions = require('../typedoc.cjs'); 4 | 5 | const commonOptions = { 6 | entryPoints: ['../src/customize/index.ts'], 7 | plugin: [ 8 | 'typedoc-plugin-markdown', 9 | '../custom-plugins/custom-theme.mjs', 10 | '../custom-plugins/custom-router.mjs', 11 | '../custom-plugins/navigation-plugin.mjs', 12 | '../custom-plugins/urls-plugin.mjs', 13 | ], 14 | disableSources: true, 15 | readme: 'none', 16 | theme: 'custom-theme', 17 | router: 'custom-router', 18 | }; 19 | 20 | /** @type {import('typedoc').TypeDocOptions} */ 21 | module.exports = { 22 | ...baseOptions, 23 | ...commonOptions, 24 | outputs: [ 25 | { 26 | name: 'markdown', 27 | path: '../out/md/customize/members/opts-1', 28 | }, 29 | ], 30 | }; 31 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/navigation-plugin.mjs: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | 3 | // @ts-check 4 | 5 | /** 6 | * @param {import('typedoc-plugin-markdown').MarkdownApplication} app 7 | */ 8 | export function load(app) { 9 | app.renderer.postRenderAsyncJobs.push(async (output) => { 10 | if (output.navigation) { 11 | fs.writeFileSync( 12 | `${output.outputDirectory}/sidebar.json`, 13 | JSON.stringify(output.navigation, null, 2), 14 | ); 15 | } 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/normalize-sources.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import { MarkdownPageEvent } from 'typedoc-plugin-markdown'; 3 | 4 | /** 5 | * @param {import('typedoc-plugin-markdown').MarkdownApplication} app 6 | */ 7 | export function load(app) { 8 | app.renderer.on(MarkdownPageEvent.END, (page) => { 9 | page.contents = page.contents?.replace( 10 | /\[(?:.*\/)?([a-zA-Z0-9_]+\.ts):\d+\]\(http:\/\/source-url\)/g, 11 | '[$1:1](http://source-url)', 12 | ); 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/stub-groups-theme.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import { MarkdownTheme, MarkdownThemeContext } from 'typedoc-plugin-markdown'; 3 | 4 | /** 5 | * @param {import('typedoc-plugin-markdown').MarkdownApplication} app 6 | */ 7 | export function load(app) { 8 | app.renderer.defineTheme('stub-groups', StubTheme); 9 | } 10 | 11 | class StubTheme extends MarkdownTheme { 12 | /** 13 | * @param {import('typedoc-plugin-markdown').MarkdownPageEvent} page 14 | */ 15 | getRenderContext(page) { 16 | return new MyMarkdownThemeContext(this, page, this.application.options); 17 | } 18 | } 19 | 20 | class MyMarkdownThemeContext extends MarkdownThemeContext { 21 | partials = { 22 | ...this.partials, 23 | signature: () => { 24 | return `_SIGNATURE_MEMBER_PARTIAL_`; 25 | }, 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/urls-plugin.mjs: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs'; 2 | 3 | // @ts-check 4 | 5 | /** 6 | * @param {import('typedoc-plugin-markdown').MarkdownApplication} app 7 | */ 8 | export function load(app) { 9 | app.renderer.postRenderAsyncJobs.push(async (output) => { 10 | fs.writeFileSync( 11 | `${output.outputDirectory}/urls.json`, 12 | JSON.stringify( 13 | output.pages.map((page) => page.url), 14 | null, 15 | 2, 16 | ), 17 | ); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/project/PROJECT_DOC_2.md: -------------------------------------------------------------------------------- 1 | ## Project Document 2 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/project/PROJECT_DOC_3.md: -------------------------------------------------------------------------------- 1 | ## Project Document 3 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/CLASS_DOC.md: -------------------------------------------------------------------------------- 1 | > Class Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/ENUM_DOC.md: -------------------------------------------------------------------------------- 1 | > Enum Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/FUNCTION_DOC_1.md: -------------------------------------------------------------------------------- 1 | > Function Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/FUNCTION_DOC_2.md: -------------------------------------------------------------------------------- 1 | > Function Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/FUNCTION_DOC_3.md: -------------------------------------------------------------------------------- 1 | > Function Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/INTERFACE_DOC.md: -------------------------------------------------------------------------------- 1 | > Interface Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/MODULE_DOC.md: -------------------------------------------------------------------------------- 1 | > Module Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/NAMESPACE_DOC.md: -------------------------------------------------------------------------------- 1 | > Namespace Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/TYPE_DOC.md: -------------------------------------------------------------------------------- 1 | > Type Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/docs/reflection/VARIABLE_DOC.md: -------------------------------------------------------------------------------- 1 | > Variable Documentation 2 | 3 | Document content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/inc/example.md: -------------------------------------------------------------------------------- 1 | This is a simple example on how to use include. 2 | 3 | ![My image alt text](media://logo.png) 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/media/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/packages/typedoc-plugin-markdown/test/fixtures/media/logo.png -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typedoc-stubs", 3 | "version": "0.0", 4 | "type": "module" 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/prettier-config/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": false 3 | } 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/categories/module-3.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module 3 | */ 4 | 5 | export function someFunction() {} 6 | 7 | export class SomeClass { 8 | someProperty: string; 9 | someMethod() {} 10 | } 11 | 12 | export interface SomeInterface {} 13 | 14 | export function someFunction2() {} 15 | 16 | export class SomeClass2 {} 17 | 18 | export interface SomeInterface2 {} 19 | 20 | export enum SomeEnum {} 21 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/customize/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Module commments 3 | * 4 | * **Experimental** \`my-package\` is under active development. 5 | * 6 | * Some other comments 7 | * 8 | * @module 9 | */ 10 | 11 | export function someFunction() {} 12 | 13 | export class SomeClass {} 14 | 15 | export interface SomeInterface {} 16 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/documents/module-3.ts: -------------------------------------------------------------------------------- 1 | export class MyClass {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/entryfiles/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module entry-module 3 | */ 4 | 5 | export class ModuleClass {} 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/entryfiles/module-1.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module @scope/module-1 3 | */ 4 | export class ModuleClass {} 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/entryfiles/module-2.ts: -------------------------------------------------------------------------------- 1 | export class ModuleClass {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/groups/has-namespaces.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A module that contains namespaces 3 | * 4 | * @module 5 | */ 6 | 7 | /* eslint-disable @typescript-eslint/no-namespace */ 8 | export class __Class_A_ {} 9 | export class ClassB {} 10 | export interface _Interface_A_ {} 11 | export interface InterfaceB {} 12 | export enum _Enum_A_ {} 13 | export enum EnumB {} 14 | export function _function_A_() {} 15 | export function functionB() {} 16 | export const _variable_A_ = true; 17 | export const variableB = true; 18 | export type _Type_A_ = string; 19 | export type TypeB = string; 20 | export namespace _Namespace_A_ { 21 | export interface NamespaceInterface {} 22 | export namespace NestedNamespace { 23 | export interface NamespaceInterface {} 24 | } 25 | } 26 | export namespace NamespaceB {} 27 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/groups/has-references.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A module that contains references 3 | * 4 | * @module 5 | */ 6 | 7 | import { InterfaceA, InterfaceB } from './basic.js'; 8 | 9 | export function defaultFunction() { 10 | return ''; 11 | } 12 | 13 | export { InterfaceA, InterfaceB as RenamedInterfaceB }; 14 | 15 | export default defaultFunction; 16 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/groups/has-same-exports.ts: -------------------------------------------------------------------------------- 1 | class ClassA {} 2 | class ClassB {} 3 | 4 | export { ClassA as SomeClass, ClassB as someClass }; 5 | 6 | /** 7 | * @group group1 8 | * @group group2 9 | */ 10 | export function someFunction() {} 11 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/groups/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A module named index 3 | * 4 | * @module 5 | */ 6 | 7 | export class SomeClass {} 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/groups/name-has-angle-brackets.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @module 4 | */ 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/groups/name-has-leading-number.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @module 42-module-name 4 | */ 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/modules/module-1/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module @scope/namespace 3 | */ 4 | export interface InterfaceA { 5 | propA: string; 6 | propB: string; 7 | } 8 | export interface InterfaceB {} 9 | export enum EnumA {} 10 | export enum EnumB {} 11 | 12 | /** 13 | * @deprecated 14 | */ 15 | export class ClassA {} 16 | /** 17 | * @deprecated 18 | */ 19 | export class ClassB {} 20 | export type TypeA = string; 21 | export type TypeB = string; 22 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/modules/module-1/submodules/submodule-1.ts: -------------------------------------------------------------------------------- 1 | export interface InterfaceA { 2 | propA: string; 3 | propB: string; 4 | } 5 | export interface InterfaceB {} 6 | export enum EnumA {} 7 | export enum EnumB {} 8 | export class ClassA {} 9 | export class ClassB {} 10 | export type TypeA = string; 11 | export type TypeB = string; 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/modules/module-1/submodules/submodule-2.ts: -------------------------------------------------------------------------------- 1 | export interface InterfaceA { 2 | propA: string; 3 | propB: string; 4 | } 5 | export interface InterfaceB {} 6 | export enum EnumA {} 7 | export enum EnumB {} 8 | export class ClassA {} 9 | export class ClassB {} 10 | export type TypeA = string; 11 | export type TypeB = string; 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/modules/module-1/submodules/submodule-3-with-modules/nested-submodule-1.ts: -------------------------------------------------------------------------------- 1 | export interface InterfaceA { 2 | propA: string; 3 | propB: string; 4 | } 5 | export interface InterfaceB {} 6 | export enum EnumA {} 7 | export enum EnumB {} 8 | export class ClassA {} 9 | export class ClassB {} 10 | export type TypeA = string; 11 | export type TypeB = string; 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/modules/module-1/submodules/submodule-3-with-modules/nested-submodule-2.ts: -------------------------------------------------------------------------------- 1 | export interface InterfaceA { 2 | propA: string; 3 | propB: string; 4 | } 5 | export interface InterfaceB {} 6 | export enum EnumA {} 7 | export enum EnumB {} 8 | export class ClassA {} 9 | export class ClassB {} 10 | export type TypeA = string; 11 | export type TypeB = string; 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/modules/module-2/index.ts: -------------------------------------------------------------------------------- 1 | export interface InterfaceA { 2 | propA: string; 3 | propB: string; 4 | } 5 | export interface InterfaceB {} 6 | export enum EnumA {} 7 | export enum EnumB {} 8 | export class ClassA {} 9 | export class ClassB {} 10 | export type TypeA = string; 11 | export type TypeB = string; 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/modules/module-3/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module "/Test/Module/Name" 3 | */ 4 | export interface InterfaceA {} 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/modules/project-module/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module 3 | * @mergeModuleWith 4 | */ 5 | 6 | export interface ProjectInterface {} 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/navigation/module-1/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @group Group 1 3 | * 4 | * @deprecated 5 | * 6 | * @module Module1 7 | */ 8 | 9 | /** 10 | * @category Category 1 11 | * 12 | * @deprecated 13 | */ 14 | export interface SomeInterface1 {} 15 | 16 | /** 17 | * @category Category 1 18 | */ 19 | export interface SomeInterface2 {} 20 | 21 | /** 22 | * @category Category 2 23 | */ 24 | export interface SomeInterface3 {} 25 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/navigation/module-2/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @group Group 2 3 | * @module Module2 4 | */ 5 | 6 | export interface SomeInterface {} 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/navigation/module-3/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @group Group 3 3 | * 4 | * @module Module3 5 | */ 6 | 7 | /** 8 | * @category Category1 9 | */ 10 | export interface SomeInterfaceA {} 11 | 12 | /** 13 | * @category Category2 14 | * 15 | * @deprecated 16 | */ 17 | export interface SomeInterfaceB {} 18 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/outputs/index.ts: -------------------------------------------------------------------------------- 1 | export class BaseClass { 2 | prop: string; 3 | } 4 | 5 | export class ExtendedClass extends BaseClass {} 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-1/README.md: -------------------------------------------------------------------------------- 1 | # Package 1 Readme 2 | 3 | This is the Readme for package-1 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-1/index.ts: -------------------------------------------------------------------------------- 1 | export interface PackageInterface1 {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-1", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-1/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-1/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./index.ts"], 3 | "readme": "./README.md" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-2/README.md: -------------------------------------------------------------------------------- 1 | # PACKAGE 2 README 2 | 3 | Readme content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-2/index.ts: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-2", 3 | "version": "1.0.0", 4 | "description": "Package 2 Description" 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-2/src/module-1.ts: -------------------------------------------------------------------------------- 1 | export interface PackageInterface1 {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-2/src/module-2.ts: -------------------------------------------------------------------------------- 1 | export interface PackageInterface2 {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-2/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages-simple/package-2/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/module-1.ts", "./src/module-2.ts"], 3 | "includeVersion": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1/README.md: -------------------------------------------------------------------------------- 1 | # PACKAGE 1 README 2 | 3 | Readme content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Comments for package-1 3 | * 4 | * Some more comments for package-1 5 | * 6 | * @module 7 | */ 8 | 9 | export interface PackageInterface { 10 | prop: string; 11 | } 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scope/package-1", 3 | "version": "1.0.0", 4 | "description": "Description for package-1" 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./index.ts"], 3 | "includeVersion": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1b/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Comments for package-1b 3 | * 4 | * @module 5 | */ 6 | 7 | export interface PackageInterface { 8 | prop: string; 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1b/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-1b", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1b/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-1b/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./index.ts"], 3 | "readme": "none" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-2/README.md: -------------------------------------------------------------------------------- 1 | # PACKAGE 2 README 2 | 3 | Readme content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-2/index.ts: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-2", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-2/src/module-1.ts: -------------------------------------------------------------------------------- 1 | export interface PackageInterface1 {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-2/src/module-2.ts: -------------------------------------------------------------------------------- 1 | export interface PackageInterface2 {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-2/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-2/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/module-1.ts", "./src/module-2.ts"], 3 | "includeVersion": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-3/README.md: -------------------------------------------------------------------------------- 1 | # PACKAGE 1 README 2 | 3 | Readme content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-3/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/typedoc2md/typedoc-plugin-markdown/c83cff97b72ab25b224463ceec118c34e940cb8a/packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-3/index.ts -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-3/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@scope/package-3", 3 | "version": "3.0.0", 4 | "description": "Description for package 3" 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-3/src/index.ts: -------------------------------------------------------------------------------- 1 | export interface PackageInterfaceForIndexModule {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-3/src/module-1.ts: -------------------------------------------------------------------------------- 1 | export interface PackageInterface1 {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-3/src/module-2.ts: -------------------------------------------------------------------------------- 1 | export interface PackageInterface2 {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-3/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-3/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/index.ts", "./src/module-1.ts", "./src/module-2.ts"], 3 | "readme": "none", 4 | "projectDocuments": "../../../PACKAGE_DOC_1.md" 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-4/index.ts: -------------------------------------------------------------------------------- 1 | export interface PackageInterface {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-4/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-4", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-4/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-4/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["index.ts"], 3 | "readme": "none" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-5/index.ts: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-5", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-5/src/module-1.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module module1 3 | */ 4 | export interface PackageInterface1 {} 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-5/src/module-2.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module module2 3 | */ 4 | export interface PackageInterface2 {} 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-5/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-5/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/module-1.ts", "./src/module-2.ts"], 3 | "readme": "none", 4 | "entryModule": "module1", 5 | "entryFileName": "package-5" 6 | } 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-6/index.ts: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-6/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-6", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-6/src/module-1.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module module1 3 | */ 4 | export interface PackageInterface1 {} 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-6/src/module-2.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module module2 3 | */ 4 | export interface PackageInterface2 {} 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-6/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-6/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/module-1.ts", "./src/module-2.ts"], 3 | "readme": "none", 4 | "entryModule": "module1", 5 | "entryFileName": "../package-6" 6 | } 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-7/index.ts: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-7/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-7", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-7/src/modules/module-1/index.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-7/src/modules/module-1/submodules/submodule-3-with-modules/nested-submodule-1.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-7/src/modules/module-1/submodules/submodule-3-with-modules/nested-submodule-2.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-7/src/modules/module-2/index.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-7/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-7/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/modules/module-1", "./src/modules/module-2"], 3 | "entryPointStrategy": "expand", 4 | "readme": "none" 5 | } 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-8/README.md: -------------------------------------------------------------------------------- 1 | # PACKAGE 8 README 2 | 3 | Readme content 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-8/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "package-8", 3 | "version": "1.0.0" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-8/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module 3 | * @mergeModuleWith 4 | */ 5 | export interface RootModuleInterface {} 6 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-8/src/module-1.ts: -------------------------------------------------------------------------------- 1 | export interface Module1Interface {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-8/src/module-2.ts: -------------------------------------------------------------------------------- 1 | export interface Module2Interface {} 2 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-8/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "moduleResolution": "node" 5 | }, 6 | "include": ["**/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/packages/package-8/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/index.ts", "./src/module-1.ts", "./src/module-2.ts"], 3 | "includeVersion": true 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/readme/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Module comments for documentation. 3 | * 4 | * @module 5 | */ 6 | 7 | export function someFunction() {} 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/reflections/enums.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @module 3 | */ 4 | 5 | /** 6 | * Comments for enum 7 | */ 8 | export enum BasicEnum { 9 | /** 10 | * Comments for MemberA 11 | */ 12 | MemberA, 13 | /** 14 | * Comments for MemberB 15 | */ 16 | MemberB, 17 | } 18 | 19 | /** 20 | * Comments for enum 21 | */ 22 | export enum EnumWithValues { 23 | MemberA = 'UP', 24 | MemberB = 'DOWN', 25 | } 26 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/reflections/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Module comments 3 | * 4 | * - {@link BasicClass#prop} 5 | * - {@link BasicClass#Prop} 6 | * - {@link BasicEnum#MemberB} 7 | * - {@link BasicInterface#functionProp} 8 | * - {@link LiteralType#y} 9 | * - {@link objectLiteralVariable#valueX} 10 | * 11 | * @module 12 | */ 13 | 14 | export * from './classes.js'; 15 | export * from './enums.js'; 16 | export * from './functions.js'; 17 | export * from './interfaces.js'; 18 | export * from './types.js'; 19 | export * from './variables.js'; 20 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/reflections/namespaces.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-namespace */ 2 | export namespace Namespace1 { 3 | export class ClassA { 4 | prop: string; 5 | } 6 | } 7 | 8 | export namespace Namespace2 { 9 | export class ClassA { 10 | prop: string; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/text/module-1.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @group SomeGroup 3 | */ 4 | export type SomeType = boolean; 5 | export const someVar = true; 6 | 7 | /** 8 | * @group SomeOtherGroup 9 | */ 10 | export type SomeOtherType = boolean; 11 | export const someOtherVar = true; 12 | export interface SomeInterface { 13 | /** 14 | * Description for prop someProp 15 | */ 16 | someProp?: boolean; 17 | /** 18 | * @eventProperty 19 | */ 20 | someEvent: MouseEvent; 21 | } 22 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/text/module-2.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated 3 | * 4 | * @module 5 | */ 6 | export const constA = true; 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/utils/brackets.ts: -------------------------------------------------------------------------------- 1 | export interface InterfaceWithChars { 2 | prop: T; 3 | '>': string; 4 | '<': string; 5 | '': string; 6 | } 7 | 8 | export class ClassWithChars { 9 | prop!: T; 10 | } 11 | 12 | export const variableWithChars = { 13 | ['']: '>', 14 | ['']: '<', 15 | ['']: '', 16 | }; 17 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/utils/constructor-override.ts: -------------------------------------------------------------------------------- 1 | class LRUCache { 2 | constructor() {} 3 | } 4 | 5 | type CacheFetchContext = {}; 6 | 7 | export class Cache extends LRUCache< 8 | CacheFetchContext, 9 | CacheFetchContext, 10 | CacheFetchContext 11 | > { 12 | constructor() { 13 | super(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/utils/index-signature.ts: -------------------------------------------------------------------------------- 1 | type Delimiter = '·'; 2 | 3 | type Id = 4 | | `${'git'}${Delimiter}${string}${Delimiter}${string}` 5 | | `${'remote'}${Delimiter}${string}${Delimiter}${string}`; 6 | 7 | export type LongIndexSignature = { 8 | [key: `${Id} ${string}`]: `${'dev' | 'prod'} ${Id}`; 9 | }; 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/src/utils/prettier.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * ```ts 3 | * reallyUgly ( 4 | * javascript 5 | * ) 6 | * ``` 7 | * 8 | * ```ts 9 | * const originalSingleQuote = 'hello' 10 | * const originalDoubleQuote = "hello" 11 | * ``` 12 | * 13 | *```css 14 | *.h1 { color : red } 15 | *``` 16 | */ 17 | export function some_prettier_function(param: string) { 18 | return param; 19 | } 20 | 21 | export type SomePrettierTypeAlias = string | { x: 1 } | boolean | { y: 2 }; 22 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "experimentalDecorators": false, 4 | "esModuleInterop": true, 5 | "declaration": true, 6 | "lib": ["es2022", "dom"], 7 | "module": "node16", 8 | "strict": false, 9 | "noUnusedLocals": false, 10 | "noUnusedParameters": false, 11 | "target": "es2022" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/fixtures/typedoc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | cleanOutputDir: true, 3 | sourceLinkTemplate: 'http://source-url', 4 | tsconfig: process.cwd() + '/test/fixtures/tsconfig.json', 5 | navigationLinks: { 6 | 'Fixtures Home': process.cwd() + '/test/fixtures/out/', 7 | }, 8 | externalSymbolLinkMappings: { 9 | typedoc: { 10 | Application: 'https://typedoc.org/api/classes/Application.html', 11 | }, 12 | typescript: { 13 | Promise: 14 | 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise', 15 | URL: 'https://developer.mozilla.org/en-US/docs/Web/API/URL', 16 | }, 17 | }, 18 | logLevel: 'Warn', 19 | }; 20 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/specs/entryfiles.spec.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToEqual } from '@devtools/testing'; 2 | 3 | describe(`EntryFiles`, () => { 4 | test(`should get entry module`, () => { 5 | expectFileToEqual('entryfiles', 'members', ['README.mdx', 'index.mdx']); 6 | }); 7 | 8 | test(`should get module member for members`, () => { 9 | expectFileToEqual( 10 | 'entryfiles', 11 | 'members', 12 | 'entry-module/classes/ModuleClass.mdx', 13 | ); 14 | }); 15 | 16 | test(`should get readme file`, () => { 17 | expectFileToEqual('entryfiles', 'members', 'README-1.mdx', 1); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/specs/outputs.spec.ts: -------------------------------------------------------------------------------- 1 | import { expectDirToEqual, getOutDir } from '@devtools/testing'; 2 | import * as fs from 'fs'; 3 | 4 | describe(`Outputs`, () => { 5 | test(`should output html`, () => { 6 | expectDirToEqual(`html/outputs`); 7 | }); 8 | 9 | test(`should output md (kind)`, () => { 10 | expectDirToEqual(`md/outputs/kind`); 11 | }); 12 | 13 | test(`should output md (kind-dir)`, () => { 14 | expectDirToEqual(`md/outputs/kind-dir`); 15 | }); 16 | 17 | test(`should output md with anchors (kind-dir)`, () => { 18 | const readmeDoc = fs.existsSync( 19 | `${getOutDir()}/md/outputs/kind-dir/classes/ExtendedClass/index.md`, 20 | ); 21 | expect(readmeDoc).toBeTruthy(); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/specs/readme.spec.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToEqual } from '@devtools/testing'; 2 | 3 | describe(`Readmes`, () => { 4 | test(`should get merged readme for members`, () => { 5 | expectFileToEqual('readme', 'members', ['index.md']); 6 | }); 7 | 8 | test(`should get merged readme for modules`, () => { 9 | expectFileToEqual('readme', 'modules', ['index.md']); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/specs/reflection.enum.spec.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToEqual } from '@devtools/testing'; 2 | 3 | describe(`Enum Reflection`, () => { 4 | test(`should compile basic enum`, () => { 5 | expectFileToEqual('reflections', 'members', 'enumerations/BasicEnum.md'); 6 | }); 7 | 8 | test(`should compile enum with values`, () => { 9 | expectFileToEqual( 10 | 'reflections', 11 | 'members', 12 | '/enumerations/EnumWithValues.md', 13 | ); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/test/specs/reflection.index.spec.ts: -------------------------------------------------------------------------------- 1 | import { expectFileToEqual } from '@devtools/testing'; 2 | 3 | describe(`Reflection Indexes`, () => { 4 | test(`should compile reflection indexes`, () => { 5 | expectFileToEqual('reflections', 'members', ['globals.md', 'README.md']); 6 | }); 7 | test(`should compile reflection indexes for modules`, () => { 8 | expectFileToEqual( 9 | 'reflections', 10 | 'modules', 11 | ['globals.md', 'README.md'], 12 | 2, 13 | [1, 10], 14 | ); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./dist", 5 | "baseUrl": "src", 6 | "paths": { 7 | "@plugin/*": ["./*"] 8 | } 9 | }, 10 | "include": ["src/**/*.ts"], 11 | "exclude": ["./dist", "./test", "__scripts__", "**/*.spec.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.test.json", 3 | "compilerOptions": {} 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-markdown/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "./src/index.ts", 4 | "./src/renderer", 5 | "./src/events", 6 | "./src/options", 7 | "./src/internationalization", 8 | "./src/theme", 9 | "./src/libs", 10 | "./src/types" 11 | ], 12 | "exclude": ["./src/public-api.ts"], 13 | "categoryOrder": ["File", "Display", "Utility", "Functions", "Locales"], 14 | "projectDocuments": ["./internal-docs/test-and-validation.md"], 15 | "readme": "./internal-docs/introduction.md" 16 | } 17 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/README.md: -------------------------------------------------------------------------------- 1 | # typedoc-plugin-remark 2 | 3 | [![npm](https://img.shields.io/npm/v/typedoc-plugin-remark.svg?logo=npm)](https://www.npmjs.com/package/typedoc-plugin-remark) [![Build Status](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-plugin-remark.yml/badge.svg?branch=main&style=flat-square)](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-plugin-remark.yml) 4 | 5 | > A plugin for TypeDoc ( + typedoc-plugin-markdown ) that enables additional markdown transformations with remark plugins. 6 | 7 | ## Documentation 8 | 9 | Please visit [https://typedoc-plugin-markdown.org/plugins/remark](https://typedoc-plugin-markdown.org/plugins/remark) for comprehensive documentation, including options and usage guides. 10 | 11 | ## License 12 | 13 | MIT -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/internal-docs/introduction.md: -------------------------------------------------------------------------------- 1 | # typedoc-plugin-remark 2 | 3 | "typedoc-plugin-remark" is a utility package that pipes output though specified remark plugins. 4 | 5 | Package features include: 6 | 7 | - Exposes some additional options to TypeDoc. 8 | - Initializes a new remark processor and transform that syntax tree (mdast) using plugins. 9 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/jest.config.js: -------------------------------------------------------------------------------- 1 | import base from '../../jest.config.base.js'; 2 | 3 | export default { 4 | ...base, 5 | displayName: 'typedoc-plugin-remark', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/src/_typedoc.d.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY. 2 | import { ManuallyValidatedOption } from 'typedoc'; 3 | import { RemarkPlugin } from './types/options.js'; 4 | declare module 'typedoc' { 5 | export interface TypeDocOptionMap { 6 | remarkPlugins: ManuallyValidatedOption; 7 | remarkStringifyOptions: ManuallyValidatedOption>; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/src/options/constants.ts: -------------------------------------------------------------------------------- 1 | import { ReflectionKind } from 'typedoc'; 2 | 3 | export const FRONTMATTER_REGEX = /^---\s*[\r\n]+[^]*?[\r\n]+---\s*[\r\n]/; 4 | 5 | export const KIND_TO_STRING = new Map([ 6 | [ReflectionKind.Project, 'Project'], 7 | [ReflectionKind.Module, 'Module'], 8 | [ReflectionKind.Namespace, 'Namespace'], 9 | [ReflectionKind.Document, 'Document'], 10 | [ReflectionKind.Class, 'Class'], 11 | [ReflectionKind.Interface, 'Interface'], 12 | [ReflectionKind.Enum, 'Enum'], 13 | [ReflectionKind.TypeAlias, 'TypeAlias'], 14 | [ReflectionKind.Function, 'Function'], 15 | [ReflectionKind.Variable, 'Variable'], 16 | ]); 17 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/src/options/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * as declarations from './declarations.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/src/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * from './options.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/src/types/options.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY 3 | */ 4 | 5 | /** 6 | * Describes the options declared by the plugin. 7 | */ 8 | export interface PluginOptions { 9 | /** 10 | * An array of remark plugin names to be executed. 11 | */ 12 | remarkPlugins?: RemarkPlugin[]; 13 | 14 | /** 15 | * Custom options for the remark-stringify plugin. 16 | */ 17 | remarkStringifyOptions?: Record; 18 | } 19 | 20 | export type RemarkPlugin = 21 | | string 22 | | [string, Record] 23 | | { 24 | applyTo: string[]; 25 | plugins: (string | [string, Record])[]; 26 | }; 27 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/test/stubs/README.md: -------------------------------------------------------------------------------- 1 | # Project README 2 | 3 | Some text 4 | 5 | ## Some heading 2 6 | 7 | Some text 8 | 9 | - list item 1 10 | - list item 2 11 | 12 | ## Another heading 2 13 | 14 | thanks @tgreyuk 15 | 16 | ```ts 17 | const x = 1; 18 | ``` 19 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/test/stubs/remark.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-namespace */ 2 | /** 3 | * @module 4 | */ 5 | 6 | export const someVariable = true; 7 | 8 | /** 9 | * @example x=1 10 | */ 11 | export const someVariableWithHeading = true; 12 | 13 | export const someFunction = (a: string, b: number) => { 14 | return a + b; 15 | }; 16 | 17 | export class Class { 18 | a: string; 19 | b: number; 20 | } 21 | 22 | export type SimpleTypeAlias = string | boolean; 23 | 24 | export type TypeAliasWithTypeDeclaration = { 25 | a: string; 26 | b: number; 27 | }; 28 | 29 | export interface Interface { 30 | a: string; 31 | b: number; 32 | } 33 | 34 | export enum Enum { 35 | A, 36 | B, 37 | } 38 | 39 | export namespace Namespace { 40 | export const someVariable = true; 41 | } 42 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/test/stubs/toc-doc-2.md: -------------------------------------------------------------------------------- 1 | # TOC Document 2 2 | 3 | Some text 4 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/test/stubs/toc-doc.md: -------------------------------------------------------------------------------- 1 | # TOC Document 2 | 3 | Some text 4 | 5 | ## Some heading 2 6 | 7 | Some text 8 | 9 | ## Another heading 2 10 | 11 | thanks @tgreyuk 12 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/test/stubs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "experimentalDecorators": true, 4 | "esModuleInterop": true, 5 | "lib": ["es2020", "dom"], 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "noImplicitAny": false, 9 | "noUnusedLocals": false, 10 | "noUnusedParameters": false, 11 | "strictNullChecks": false, 12 | "target": "es2020" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/test/stubs/typedoc-plugin.mjs: -------------------------------------------------------------------------------- 1 | export function load(app) { 2 | app.renderer.markdownHooks.on( 3 | 'page.begin', 4 | () => `---\ntitle: "test"\n---\n`, 5 | ); 6 | app.renderer.markdownHooks.on( 7 | 'index.page.begin', 8 | () => `---\ntitle: "test"\n---\n`, 9 | ); 10 | app.renderer.markdownHooks.on('page.end', () => `> thanks @tgreyuk`); 11 | app.renderer.markdownHooks.on('index.page.end', () => `> thanks @tgreyuk`); 12 | } 13 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./dist" 5 | }, 6 | "include": ["./src/**/*"], 7 | "exclude": ["./dist", "./test", "**/*.spec.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.test.json", 3 | "compilerOptions": { 4 | "esModuleInterop": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/typedoc-plugin-remark/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/index.ts", "./src/options", "./src/types"], 3 | "readme": "./internal-docs/introduction.md" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/.gitignore: -------------------------------------------------------------------------------- 1 | docs/api -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/README.md: -------------------------------------------------------------------------------- 1 | # typedoc-vitepress-theme 2 | 3 | [![npm](https://img.shields.io/npm/v/typedoc-vitepress-theme.svg?logo=npm)](https://www.npmjs.com/package/typedoc-vitepress-theme) [![Build Status](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-vitepress-theme.yml/badge.svg?branch=main&style=flat-square)](https://github.com/typedoc2md/typedoc-plugin-markdown/actions/workflows/ci.typedoc-vitepress-theme.yml) 4 | 5 | > A TypeDoc ( + typedoc-plugin-markdown ) theme that generates Markdown compatible with VitePress. 6 | 7 | ## Documentation 8 | 9 | Please visit [https://typedoc-plugin-markdown.org/plugins/vitepress](https://typedoc-plugin-markdown.org/plugins/vitepress) for comprehensive documentation, including options and usage guides. 10 | 11 | ## License 12 | 13 | MIT -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/internal-docs/introduction.md: -------------------------------------------------------------------------------- 1 | # typedoc-vitepress-theme 2 | 3 | "typedoc-vitepress-theme" is a "theme" in the sense that it targets output for VitePress. 4 | 5 | Package features include: 6 | 7 | - Exposes some additional options to TypeDoc. 8 | - Presets relevant typedoc-plugin-markdown options. 9 | - Generates a sidebar json file. 10 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/jest.config.js: -------------------------------------------------------------------------------- 1 | import base from '../../jest.config.base.js'; 2 | 3 | export default { 4 | ...base, 5 | displayName: 'typedoc-vitepress-theme', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/_typedoc.d.ts: -------------------------------------------------------------------------------- 1 | // THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY. 2 | import { ManuallyValidatedOption } from 'typedoc'; 3 | import { Sidebar } from './types/options.js'; 4 | declare module 'typedoc' { 5 | export interface TypeDocOptionMap { 6 | docsRoot: string; 7 | sidebar: ManuallyValidatedOption; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/options.ts: -------------------------------------------------------------------------------- 1 | import { Sidebar } from './types/index.js'; 2 | 3 | export const DEFAULT_SIDEBAR_OPTIONS: Sidebar = { 4 | autoConfiguration: true, 5 | format: 'vitepress', 6 | pretty: false, 7 | collapsed: true, 8 | }; 9 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/options/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * as declarations from './declarations.js'; 8 | export * as presets from './presets.js'; 9 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/options/presets.ts: -------------------------------------------------------------------------------- 1 | export const presets = { 2 | hidePageHeader: true, 3 | entryFileName: 'index.md', 4 | out: './api', 5 | }; 6 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/sidebars/sidebar.vuepress1.ts: -------------------------------------------------------------------------------- 1 | import { NavigationItem } from 'typedoc-plugin-markdown'; 2 | 3 | export default (navigation: NavigationItem[], basePath: string) => { 4 | return navigation?.map((navigationItem) => { 5 | return getNavigationItem(navigationItem, basePath); 6 | }); 7 | }; 8 | 9 | function getNavigationItem(navigationItem: NavigationItem, basePath: string) { 10 | return { 11 | title: navigationItem.title, 12 | sidebarDepth: 0, 13 | path: navigationItem.path 14 | ? `/${basePath}/${getUrlKey(navigationItem.path as string)}` 15 | : null, 16 | children: navigationItem?.children?.map((groupChild) => { 17 | return getNavigationItem(groupChild, basePath); 18 | }), 19 | }; 20 | } 21 | 22 | function getUrlKey(url: string) { 23 | return url.replace('.md', ''); 24 | } 25 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/sidebars/sidebar.vuepress2.ts: -------------------------------------------------------------------------------- 1 | import { NavigationItem } from 'typedoc-plugin-markdown'; 2 | 3 | export default (navigation: NavigationItem[], basePath: string) => { 4 | return navigation.map((navigationItem) => { 5 | return getNavigationItem(navigationItem, basePath); 6 | }); 7 | }; 8 | 9 | function getNavigationItem(navigationItem: NavigationItem, basePath: string) { 10 | return { 11 | text: navigationItem.title, 12 | link: navigationItem.path ? `/${basePath}/${navigationItem.path}` : null, 13 | collapsible: true, 14 | children: navigationItem?.children?.map((group) => { 15 | return getNavigationItem(group, basePath); 16 | }), 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/sidebars/sidebars.ts: -------------------------------------------------------------------------------- 1 | import { NavigationItem } from 'typedoc-plugin-markdown'; 2 | import { Sidebar } from '../types/index.js'; 3 | import sidebarVitepress from './sidebar.vitepress.js'; 4 | import sidebarVuepress1 from './sidebar.vuepress1.js'; 5 | import sidebarVuepress2 from './sidebar.vuepress2.js'; 6 | 7 | export function getSidebar( 8 | navigation: NavigationItem[], 9 | basePath: string, 10 | options: Sidebar, 11 | ) { 12 | if (options.format === 'vuepress1') { 13 | return sidebarVuepress1(navigation, basePath); 14 | } 15 | if (options.format === 'vuepress2') { 16 | return sidebarVuepress2(navigation, basePath); 17 | } 18 | return sidebarVitepress(navigation, basePath, options); 19 | } 20 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/types/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * All plugin types are exported from this module. 3 | * 4 | * @module 5 | */ 6 | 7 | export * from './options.js'; 8 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/types/options.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * THIS FILE IS AUTO GENERATED FROM THE OPTIONS CONFIG. DO NOT EDIT DIRECTLY 3 | */ 4 | 5 | /** 6 | * Describes the options declared by the plugin. 7 | */ 8 | export interface PluginOptions { 9 | /** 10 | * The path to the VitePress project root. 11 | */ 12 | docsRoot?: string; 13 | 14 | /** 15 | * Configures the autogenerated VitePress sidebar. 16 | */ 17 | sidebar?: Sidebar; 18 | } 19 | 20 | export interface Sidebar { 21 | autoConfiguration: boolean; 22 | format: string; 23 | pretty: boolean; 24 | collapsed: boolean; 25 | } 26 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/utils/utils.spec.ts: -------------------------------------------------------------------------------- 1 | import { slugifyAnchor } from './utils'; 2 | 3 | describe('slugifyAnchor', () => { 4 | it('should anchors with underscores', () => { 5 | expect(slugifyAnchor('_prop_with_underscore_')).toBe( 6 | 'prop-with-underscore', 7 | ); 8 | }); 9 | 10 | it('should anchors with colons', () => { 11 | expect(slugifyAnchor('prop:colon')).toBe('prop-colon'); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/src/utils/utils.ts: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line no-control-regex 2 | const rControl = /[\u0000-\u001f]/g; 3 | const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g; 4 | const rCombining = /[\u0300-\u036F]/g; 5 | 6 | export const slugifyAnchor = (str: string): string => 7 | str 8 | .normalize('NFKD') 9 | // Remove accents 10 | .replace(rCombining, '') 11 | // Remove control characters 12 | .replace(rControl, '') 13 | // Replace special characters 14 | .replace(rSpecial, '-') 15 | // Remove continuos separators 16 | .replace(/-{2,}/g, '-') 17 | // Remove prefixing and trailing separators 18 | .replace(/^-+|-+$/g, '') 19 | // ensure it doesn't start with a number (#121) 20 | .replace(/^(\d)/, '_$1') 21 | // lowercase 22 | .toLowerCase(); 23 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/test/stubs/module-1.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | 4 | /** 5 | * See {@link InterfaceB._prop_with_underscore_} 6 | */ 7 | export interface InterfaceA {} 8 | 9 | export interface InterfaceB { 10 | _prop_with_underscore_: string; 11 | } 12 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/test/stubs/module-2.ts: -------------------------------------------------------------------------------- 1 | export class ClassA {} 2 | export class ClassB {} 3 | 4 | export interface InterfaceA {} 5 | export interface InterfaceB {} 6 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/test/stubs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "experimentalDecorators": true, 4 | "esModuleInterop": true, 5 | "lib": ["es2020", "dom"], 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "noImplicitAny": false, 9 | "noUnusedLocals": false, 10 | "noUnusedParameters": false, 11 | "strictNullChecks": false, 12 | "target": "es2020" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/test/typedoc.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./stubs/*.ts"], 3 | "tsconfig": "./stubs/tsconfig.json", 4 | "plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme"], 5 | "readme": "none", 6 | "disableSources": true, 7 | "cleanOutputDir": true, 8 | "hidePageHeader": true, 9 | "hideBreadcrumbs": true 10 | } 11 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/test/typedoc.sidebar-options-2.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./typedoc.base.json", 3 | "docsRoot": "./out/sidebar-options-2" 4 | } 5 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/test/typedoc.sidebar-options.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./typedoc.base.json", 3 | "sidebar": { 4 | "collapsed": false, 5 | "pretty": true 6 | }, 7 | "docsRoot": "./out", 8 | "navigation": { 9 | "includeGroups": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./dist", 5 | "esModuleInterop": true 6 | }, 7 | "exclude": ["./dist", "./test", "**/*.spec.ts"] 8 | } 9 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.test.json", 3 | "compilerOptions": { 4 | "esModuleInterop": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/typedoc-vitepress-theme/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["./src/index.ts", "./src/options", "./src/types"], 3 | "readme": "./internal-docs/introduction.md" 4 | } 5 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "Node16", 4 | "lib": ["es2023", "dom"], 5 | "target": "es2022", 6 | "typeRoots": ["node_modules/@types"], 7 | "declaration": true, 8 | "experimentalDecorators": true, 9 | "esModuleInterop": true, 10 | "noImplicitAny": false, 11 | "noUnusedLocals": true, 12 | "removeComments": false, 13 | "sourceMap": false, 14 | "strictNullChecks": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "noUnusedLocals": false, 5 | "strictNullChecks": false, 6 | "resolveJsonModule": true 7 | } 8 | } 9 | --------------------------------------------------------------------------------