From 75cf2553dca5542eaf251d4244adbcb13ca2dd35 Mon Sep 17 00:00:00 2001 From: tgreyuk Date: Sun, 29 Dec 2024 23:47:42 +0000 Subject: [PATCH] chore(docs): moved api docs --- .../prebuild-options/tasks/generate-docs.ts | 4 +- docs/global.css | 1 - docs/next-env.d.ts | 2 +- docs/package-lock.json | 477 +++++++++--------- docs/package.json | 22 +- docs/pages/_meta.js | 4 - .../api-docs/Class.MarkdownPageEvent.mdx | 82 --- .../api-docs/Class.MarkdownRendererEvent.mdx | 55 -- .../api-docs/Document.Customizing-Output.mdx | 94 ---- .../pages/api-docs/Document.Local-Plugins.mdx | 32 -- .../Interface.MarkdownApplication.mdx | 19 - .../api-docs/Interface.MarkdownRenderer.mdx | 139 ----- .../Interface.MarkdownRendererHooks.mdx | 43 -- .../api-docs/Interface.NavigationItem.mdx | 27 - .../api-docs/Interface.PluginOptions.mdx | 391 -------------- docs/pages/api-docs/Interface.UrlMapping.mdx | 37 -- docs/pages/api-docs/_meta.js | 26 - docs/pages/api-docs/index.mdx | 30 -- docs/pages/docs/_meta.js | 2 + docs/pages/docs/customizing-output.mdx | 109 ++++ docs/pages/docs/options.mdx | 82 +-- docs/pages/docs/options/display-options.mdx | 36 +- docs/pages/docs/options/file-options.mdx | 136 +++-- docs/pages/docs/options/utility-options.mdx | 18 +- .../utilizing-navigation.md} | 15 +- docs/pages/docs/versioning.mdx | 2 +- docs/public/schema.json | 8 +- packages/typedoc-plugin-markdown/package.json | 4 +- .../src/options/declarations.ts | 118 ++--- .../typedoc-plugin-markdown/src/public-api.ts | 5 - .../public/customizing-output.md | 99 ---- .../supporting-docs/public/local-plugins.md | 37 -- .../public/utilizing-navigation.md | 44 -- .../fixtures/custom-plugins/custom-theme.mjs | 4 +- .../__snapshots__/customization.spec.ts.snap | 4 +- .../typedoc.public.json | 49 -- 36 files changed, 573 insertions(+), 1684 deletions(-) delete mode 100644 docs/pages/api-docs/Class.MarkdownPageEvent.mdx delete mode 100644 docs/pages/api-docs/Class.MarkdownRendererEvent.mdx delete mode 100644 docs/pages/api-docs/Document.Customizing-Output.mdx delete mode 100644 docs/pages/api-docs/Document.Local-Plugins.mdx delete mode 100644 docs/pages/api-docs/Interface.MarkdownApplication.mdx delete mode 100644 docs/pages/api-docs/Interface.MarkdownRenderer.mdx delete mode 100644 docs/pages/api-docs/Interface.MarkdownRendererHooks.mdx delete mode 100644 docs/pages/api-docs/Interface.NavigationItem.mdx delete mode 100644 docs/pages/api-docs/Interface.PluginOptions.mdx delete mode 100644 docs/pages/api-docs/Interface.UrlMapping.mdx delete mode 100644 docs/pages/api-docs/_meta.js delete mode 100644 docs/pages/api-docs/index.mdx create mode 100644 docs/pages/docs/customizing-output.mdx rename docs/pages/{api-docs/Document.Utilizing-Navigation.mdx => docs/utilizing-navigation.md} (69%) delete mode 100644 packages/typedoc-plugin-markdown/supporting-docs/public/customizing-output.md delete mode 100644 packages/typedoc-plugin-markdown/supporting-docs/public/local-plugins.md delete mode 100644 packages/typedoc-plugin-markdown/supporting-docs/public/utilizing-navigation.md delete mode 100644 packages/typedoc-plugin-markdown/typedoc.public.json diff --git a/devtools/packages/prebuild-options/tasks/generate-docs.ts b/devtools/packages/prebuild-options/tasks/generate-docs.ts index 65e8adb86..ed5dc86cf 100644 --- a/devtools/packages/prebuild-options/tasks/generate-docs.ts +++ b/devtools/packages/prebuild-options/tasks/generate-docs.ts @@ -156,13 +156,13 @@ ${presetsJson} options.forEach((option) => { optionsTable.push( - `| [\`${option.name}\`](./options/${categoryName.toLowerCase()}-options.mdx#--${option.name.toLowerCase()}) | ${ + `| [\`${option.name}\`](./options/${categoryName.toLowerCase()}-options.mdx#${option.name.toLowerCase()}) | ${ option.help } |`, ); out.push( `${optionLevel} ${ - option.deprecated ? `~--${option.name}~` : `--${option.name}` + option.deprecated ? `~${option.name}~` : `${option.name}` }`, ); if (option.deprecated) { diff --git a/docs/global.css b/docs/global.css index 41127566b..f9c2a442a 100644 --- a/docs/global.css +++ b/docs/global.css @@ -8,7 +8,6 @@ .nextra-toc a[href^='#source'], .nextra-toc a[href^='#overrides'], .nextra-toc a[href^='#see'], -.nextra-toc a[href^='#example'], .nextra-toc a[href^='#new-features'], .nextra-toc a[href^='#bug-fixes'], .nextra-toc a[href^='#minor-changes'], diff --git a/docs/next-env.d.ts b/docs/next-env.d.ts index a4a7b3f5c..52e831b43 100644 --- a/docs/next-env.d.ts +++ b/docs/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. +// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information. diff --git a/docs/package-lock.json b/docs/package-lock.json index 98b095576..2e9f2b24e 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -8,24 +8,24 @@ "name": "docs-website", "version": "0.0.0", "dependencies": { - "@fortawesome/fontawesome-svg-core": "^6.7.1", - "@fortawesome/free-brands-svg-icons": "^6.7.1", - "@fortawesome/free-solid-svg-icons": "^6.7.1", + "@fortawesome/fontawesome-svg-core": "^6.7.2", + "@fortawesome/free-brands-svg-icons": "^6.7.2", + "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "@vercel/analytics": "^1.4.1", - "next": "^15.0.3", - "nextra": "3.2.4", - "nextra-theme-docs": "3.2.4", - "react": "^18.3.1", - "react-dom": "^18.3.1" + "next": "^15.1.3", + "nextra": "3.3.1", + "nextra-theme-docs": "3.3.1", + "react": "^19.0.0", + "react-dom": "^19.0.0" }, "devDependencies": { - "@types/node": "^22.10.1", + "@types/node": "^22.10.2", "autoprefixer": "^10.4.20", "copyfiles": "^2.4.1", - "eslint": "^9.16.0", + "eslint": "^9.17.0", "postcss": "^8.4.49", - "tailwindcss": "^3.4.16" + "tailwindcss": "^3.4.17" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -70,9 +70,9 @@ } }, "node_modules/@braintree/sanitize-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.0.tgz", - "integrity": "sha512-o+UlMLt49RvtCASlOMW0AkHnabN9wR9rwCCherxO0yG4Npy34GkvrAqdXQvrhNs+jh+gkK8gB8Lf05qL/O7KWg==" + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.1.tgz", + "integrity": "sha512-i1L7noDNxtFyL5DmZafWy1wRVhGehQmzZaz1HiN5e7iylJMSZR7ekOV7NsIqa5qBldlLrsKv4HbgFUVlQrz8Mw==" }, "node_modules/@chevrotain/cst-dts-gen": { "version": "11.0.3", @@ -262,9 +262,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.16.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", - "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", + "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -292,29 +292,29 @@ } }, "node_modules/@floating-ui/core": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.7.tgz", - "integrity": "sha512-yDzVT/Lm101nQ5TCVeK65LtdN7Tj4Qpr9RTXJ2vPFLqtLxwOrpoxAHAJI8J3yYWUc40J0BDBheaitK5SJmno2g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", + "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==", "dependencies": { - "@floating-ui/utils": "^0.2.7" + "@floating-ui/utils": "^0.2.8" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.10", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.10.tgz", - "integrity": "sha512-fskgCFv8J8OamCmyun8MfjB1Olfn+uZKjOKZ0vhYF3gRmEUXcGOjxWL8bBr7i4kIuPZ2KD2S3EUIOxnjC8kl2A==", + "version": "1.6.12", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.12.tgz", + "integrity": "sha512-NP83c0HjokcGVEMeoStg317VD9W7eDlGK7457dMBANbKA6GJZdc7rjujdgqzTaz93jkGgc5P/jeWbaCHnMNc+w==", "dependencies": { "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.7" + "@floating-ui/utils": "^0.2.8" } }, "node_modules/@floating-ui/react": { - "version": "0.26.23", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.23.tgz", - "integrity": "sha512-9u3i62fV0CFF3nIegiWiRDwOs7OW/KhSUJDNx2MkQM3LbE5zQOY01sL3nelcVBXvX7Ovvo3A49I8ql+20Wg/Hw==", + "version": "0.26.28", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.28.tgz", + "integrity": "sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw==", "dependencies": { - "@floating-ui/react-dom": "^2.1.1", - "@floating-ui/utils": "^0.2.7", + "@floating-ui/react-dom": "^2.1.2", + "@floating-ui/utils": "^0.2.8", "tabbable": "^6.0.0" }, "peerDependencies": { @@ -323,9 +323,9 @@ } }, "node_modules/@floating-ui/react-dom": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.1.tgz", - "integrity": "sha512-4h84MJt3CHrtG18mGsXuLCHMrug49d7DFkU0RMIyshRveBeyV2hmV/pDaF2Uxtu8kgq5r46llp5E5FQiR0K2Yg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz", + "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==", "dependencies": { "@floating-ui/dom": "^1.0.0" }, @@ -335,9 +335,9 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.7.tgz", - "integrity": "sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA==" + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz", + "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==" }, "node_modules/@formatjs/intl-localematcher": { "version": "0.5.8", @@ -348,41 +348,41 @@ } }, "node_modules/@fortawesome/fontawesome-common-types": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.1.tgz", - "integrity": "sha512-gbDz3TwRrIPT3i0cDfujhshnXO9z03IT1UKRIVi/VEjpNHtSBIP2o5XSm+e816FzzCFEzAxPw09Z13n20PaQJQ==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-6.7.2.tgz", + "integrity": "sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==", "engines": { "node": ">=6" } }, "node_modules/@fortawesome/fontawesome-svg-core": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.1.tgz", - "integrity": "sha512-8dBIHbfsKlCk2jHQ9PoRBg2Z+4TwyE3vZICSnoDlnsHA6SiMlTwfmW6yX0lHsRmWJugkeb92sA0hZdkXJhuz+g==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-6.7.2.tgz", + "integrity": "sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.7.1" + "@fortawesome/fontawesome-common-types": "6.7.2" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/free-brands-svg-icons": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.7.1.tgz", - "integrity": "sha512-nJR76eqPzCnMyhbiGf6X0aclDirZriTPRcFm1YFvuupyJOGwlNF022w3YBqu+yrHRhnKRpzFX+8wJKqiIjWZkA==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-6.7.2.tgz", + "integrity": "sha512-zu0evbcRTgjKfrr77/2XX+bU+kuGfjm0LbajJHVIgBWNIDzrhpRxiCPNT8DW5AdmSsq7Mcf9D1bH0aSeSUSM+Q==", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.7.1" + "@fortawesome/fontawesome-common-types": "6.7.2" }, "engines": { "node": ">=6" } }, "node_modules/@fortawesome/free-solid-svg-icons": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.7.1.tgz", - "integrity": "sha512-BTKc0b0mgjWZ2UDKVgmwaE0qt0cZs6ITcDgjrti5f/ki7aF5zs+N91V6hitGo3TItCFtnKg6cUVGdTmBFICFRg==", + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-6.7.2.tgz", + "integrity": "sha512-GsBrnOzU8uj0LECDfD5zomZJIjrPhIlWU82AHwa2s40FKH+kcxQaBvBo3Z4TxyZHIyX8XTDxsyA33/Vx9eFuQA==", "dependencies": { - "@fortawesome/fontawesome-common-types": "6.7.1" + "@fortawesome/fontawesome-common-types": "6.7.2" }, "engines": { "node": ">=6" @@ -401,9 +401,9 @@ } }, "node_modules/@headlessui/react": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-2.1.5.tgz", - "integrity": "sha512-m3vzqwMTyDbgaNiSXQdrw8R4tRdnxVHHm4G/ZGS0TP6T8blEj3Ib1/zIJBzlvTXpBjTpd1DsUnRTonHyONMjSQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-2.2.0.tgz", + "integrity": "sha512-RzCEg+LXsuI7mHiSomsu/gBJSjpupm6A1qIZ5sWjd7JhARNlMiSA4kKfJpCKwU9tE+zMRterhhrP74PvfJrpXQ==", "dependencies": { "@floating-ui/react": "^0.26.16", "@react-aria/focus": "^3.17.1", @@ -414,8 +414,8 @@ "node": ">=10" }, "peerDependencies": { - "react": "^18", - "react-dom": "^18" + "react": "^18 || ^19 || ^19.0.0-rc", + "react-dom": "^18 || ^19 || ^19.0.0-rc" } }, "node_modules/@humanfs/core": { @@ -485,17 +485,29 @@ "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==" }, "node_modules/@iconify/utils": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.1.33.tgz", - "integrity": "sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.2.1.tgz", + "integrity": "sha512-0/7J7hk4PqXmxo5PDBDxmnecw5PxklZJfNjIVG9FM0mEfVrvfudS22rYWsqVk6gR3UJ/mSYS90X4R3znXnqfNA==", "dependencies": { - "@antfu/install-pkg": "^0.4.0", + "@antfu/install-pkg": "^0.4.1", "@antfu/utils": "^0.7.10", "@iconify/types": "^2.0.0", - "debug": "^4.3.6", + "debug": "^4.4.0", + "globals": "^15.13.0", "kolorist": "^1.8.0", - "local-pkg": "^0.5.0", - "mlly": "^1.7.1" + "local-pkg": "^0.5.1", + "mlly": "^1.7.3" + } + }, + "node_modules/@iconify/utils/node_modules/globals": { + "version": "15.14.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.14.0.tgz", + "integrity": "sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@img/sharp-darwin-arm64": { @@ -1150,14 +1162,14 @@ } }, "node_modules/@next/env": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-15.0.3.tgz", - "integrity": "sha512-t9Xy32pjNOvVn2AS+Utt6VmyrshbpfUMhIjFO60gI58deSo/KgLOp31XZ4O+kY/Is8WAGYwA5gR7kOb1eORDBA==" + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/env/-/env-15.1.3.tgz", + "integrity": "sha512-Q1tXwQCGWyA3ehMph3VO+E6xFPHDKdHFYosadt0F78EObYxPio0S09H9UGYznDe6Wc8eLKLG89GqcFJJDiK5xw==" }, "node_modules/@next/swc-darwin-arm64": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.0.3.tgz", - "integrity": "sha512-s3Q/NOorCsLYdCKvQlWU+a+GeAd3C8Rb3L1YnetsgwXzhc3UTWrtQpB/3eCjFOdGUj5QmXfRak12uocd1ZiiQw==", + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-15.1.3.tgz", + "integrity": "sha512-aZtmIh8jU89DZahXQt1La0f2EMPt/i7W+rG1sLtYJERsP7GRnNFghsciFpQcKHcGh4dUiyTB5C1X3Dde/Gw8gg==", "cpu": [ "arm64" ], @@ -1170,9 +1182,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.0.3.tgz", - "integrity": "sha512-Zxl/TwyXVZPCFSf0u2BNj5sE0F2uR6iSKxWpq4Wlk/Sv9Ob6YCKByQTkV2y6BCic+fkabp9190hyrDdPA/dNrw==", + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-15.1.3.tgz", + "integrity": "sha512-aw8901rjkVBK5mbq5oV32IqkJg+CQa6aULNlN8zyCWSsePzEG3kpDkAFkkTOh3eJ0p95KbkLyWBzslQKamXsLA==", "cpu": [ "x64" ], @@ -1185,9 +1197,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.0.3.tgz", - "integrity": "sha512-T5+gg2EwpsY3OoaLxUIofmMb7ohAUlcNZW0fPQ6YAutaWJaxt1Z1h+8zdl4FRIOr5ABAAhXtBcpkZNwUcKI2fw==", + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-15.1.3.tgz", + "integrity": "sha512-YbdaYjyHa4fPK4GR4k2XgXV0p8vbU1SZh7vv6El4bl9N+ZSiMfbmqCuCuNU1Z4ebJMumafaz6UCC2zaJCsdzjw==", "cpu": [ "arm64" ], @@ -1200,9 +1212,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.0.3.tgz", - "integrity": "sha512-WkAk6R60mwDjH4lG/JBpb2xHl2/0Vj0ZRu1TIzWuOYfQ9tt9NFsIinI1Epma77JVgy81F32X/AeD+B2cBu/YQA==", + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-15.1.3.tgz", + "integrity": "sha512-qgH/aRj2xcr4BouwKG3XdqNu33SDadqbkqB6KaZZkozar857upxKakbRllpqZgWl/NDeSCBYPmUAZPBHZpbA0w==", "cpu": [ "arm64" ], @@ -1215,9 +1227,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.0.3.tgz", - "integrity": "sha512-gWL/Cta1aPVqIGgDb6nxkqy06DkwJ9gAnKORdHWX1QBbSZZB+biFYPFti8aKIQL7otCE1pjyPaXpFzGeG2OS2w==", + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-15.1.3.tgz", + "integrity": "sha512-uzafnTFwZCPN499fNVnS2xFME8WLC9y7PLRs/yqz5lz1X/ySoxfaK2Hbz74zYUdEg+iDZPd8KlsWaw9HKkLEVw==", "cpu": [ "x64" ], @@ -1230,9 +1242,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.0.3.tgz", - "integrity": "sha512-QQEMwFd8r7C0GxQS62Zcdy6GKx999I/rTO2ubdXEe+MlZk9ZiinsrjwoiBL5/57tfyjikgh6GOU2WRQVUej3UA==", + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-15.1.3.tgz", + "integrity": "sha512-el6GUFi4SiDYnMTTlJJFMU+GHvw0UIFnffP1qhurrN1qJV3BqaSRUjkDUgVV44T6zpw1Lc6u+yn0puDKHs+Sbw==", "cpu": [ "x64" ], @@ -1245,9 +1257,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.0.3.tgz", - "integrity": "sha512-9TEp47AAd/ms9fPNgtgnT7F3M1Hf7koIYYWCMQ9neOwjbVWJsHZxrFbI3iEDJ8rf1TDGpmHbKxXf2IFpAvheIQ==", + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-15.1.3.tgz", + "integrity": "sha512-6RxKjvnvVMM89giYGI1qye9ODsBQpHSHVo8vqA8xGhmRPZHDQUE4jcDbhBwK0GnFMqBnu+XMg3nYukNkmLOLWw==", "cpu": [ "arm64" ], @@ -1260,9 +1272,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.0.3.tgz", - "integrity": "sha512-VNAz+HN4OGgvZs6MOoVfnn41kBzT+M+tB+OK4cww6DNyWS6wKaDpaAm/qLeOUbnMh0oVx1+mg0uoYARF69dJyA==", + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-15.1.3.tgz", + "integrity": "sha512-VId/f5blObG7IodwC5Grf+aYP0O8Saz1/aeU3YcWqNdIUAmFQY3VEPKPaIzfv32F/clvanOb2K2BR5DtDs6XyQ==", "cpu": [ "x64" ], @@ -1320,38 +1332,38 @@ } }, "node_modules/@react-aria/focus": { - "version": "3.18.2", - "resolved": "https://registry.npmjs.org/@react-aria/focus/-/focus-3.18.2.tgz", - "integrity": "sha512-Jc/IY+StjA3uqN73o6txKQ527RFU7gnG5crEl5Xy3V+gbYp2O5L3ezAo/E0Ipi2cyMbG6T5Iit1IDs7hcGu8aw==", + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/@react-aria/focus/-/focus-3.19.0.tgz", + "integrity": "sha512-hPF9EXoUQeQl1Y21/rbV2H4FdUR2v+4/I0/vB+8U3bT1CJ+1AFj1hc/rqx2DqEwDlEwOHN+E4+mRahQmlybq0A==", "dependencies": { - "@react-aria/interactions": "^3.22.2", - "@react-aria/utils": "^3.25.2", - "@react-types/shared": "^3.24.1", + "@react-aria/interactions": "^3.22.5", + "@react-aria/utils": "^3.26.0", + "@react-types/shared": "^3.26.0", "@swc/helpers": "^0.5.0", "clsx": "^2.0.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "node_modules/@react-aria/interactions": { - "version": "3.22.2", - "resolved": "https://registry.npmjs.org/@react-aria/interactions/-/interactions-3.22.2.tgz", - "integrity": "sha512-xE/77fRVSlqHp2sfkrMeNLrqf2amF/RyuAS6T5oDJemRSgYM3UoxTbWjucPhfnoW7r32pFPHHgz4lbdX8xqD/g==", + "version": "3.22.5", + "resolved": "https://registry.npmjs.org/@react-aria/interactions/-/interactions-3.22.5.tgz", + "integrity": "sha512-kMwiAD9E0TQp+XNnOs13yVJghiy8ET8L0cbkeuTgNI96sOAp/63EJ1FSrDf17iD8sdjt41LafwX/dKXW9nCcLQ==", "dependencies": { - "@react-aria/ssr": "^3.9.5", - "@react-aria/utils": "^3.25.2", - "@react-types/shared": "^3.24.1", + "@react-aria/ssr": "^3.9.7", + "@react-aria/utils": "^3.26.0", + "@react-types/shared": "^3.26.0", "@swc/helpers": "^0.5.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "node_modules/@react-aria/ssr": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.5.tgz", - "integrity": "sha512-xEwGKoysu+oXulibNUSkXf8itW0npHHTa6c4AyYeZIJyRoegeteYuFpZUBPtIDE8RfHdNsSmE1ssOkxRnwbkuQ==", + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.7.tgz", + "integrity": "sha512-GQygZaGlmYjmYM+tiNBA5C6acmiDWF52Nqd40bBp0Znk4M4hP+LTmI0lpI1BuKMw45T8RIhrAsICIfKwZvi2Gg==", "dependencies": { "@swc/helpers": "^0.5.0" }, @@ -1359,41 +1371,41 @@ "node": ">= 12" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "node_modules/@react-aria/utils": { - "version": "3.25.2", - "resolved": "https://registry.npmjs.org/@react-aria/utils/-/utils-3.25.2.tgz", - "integrity": "sha512-GdIvG8GBJJZygB4L2QJP1Gabyn2mjFsha73I2wSe+o4DYeGWoJiMZRM06PyTIxLH4S7Sn7eVDtsSBfkc2VY/NA==", + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/@react-aria/utils/-/utils-3.26.0.tgz", + "integrity": "sha512-LkZouGSjjQ0rEqo4XJosS4L3YC/zzQkfRM3KoqK6fUOmUJ9t0jQ09WjiF+uOoG9u+p30AVg3TrZRUWmoTS+koQ==", "dependencies": { - "@react-aria/ssr": "^3.9.5", - "@react-stately/utils": "^3.10.3", - "@react-types/shared": "^3.24.1", + "@react-aria/ssr": "^3.9.7", + "@react-stately/utils": "^3.10.5", + "@react-types/shared": "^3.26.0", "@swc/helpers": "^0.5.0", "clsx": "^2.0.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "node_modules/@react-stately/utils": { - "version": "3.10.3", - "resolved": "https://registry.npmjs.org/@react-stately/utils/-/utils-3.10.3.tgz", - "integrity": "sha512-moClv7MlVSHpbYtQIkm0Cx+on8Pgt1XqtPx6fy9rQFb2DNc9u1G3AUVnqA17buOkH1vLxAtX4MedlxMWyRCYYA==", + "version": "3.10.5", + "resolved": "https://registry.npmjs.org/@react-stately/utils/-/utils-3.10.5.tgz", + "integrity": "sha512-iMQSGcpaecghDIh3mZEpZfoFH3ExBwTtuBEcvZ2XnGzCgQjeYXcMdIUwAfVQLXFTdHUHGF6Gu6/dFrYsCzySBQ==", "dependencies": { "@swc/helpers": "^0.5.0" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "node_modules/@react-types/shared": { - "version": "3.24.1", - "resolved": "https://registry.npmjs.org/@react-types/shared/-/shared-3.24.1.tgz", - "integrity": "sha512-AUQeGYEm/zDTN6zLzdXolDxz3Jk5dDL7f506F07U8tBwxNNI3WRdhU84G0/AaFikOZzDXhOZDr3MhQMzyE7Ydw==", + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/@react-types/shared/-/shared-3.26.0.tgz", + "integrity": "sha512-6FuPqvhmjjlpEDLTiYx29IJCbCNWPlsyO+ZUmCUXzhUv2ttShOXfw8CmeHWHftT/b2KweAWuzqSlfeXPR76jpw==", "peerDependencies": { - "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "node_modules/@shikijs/core": { @@ -1421,50 +1433,38 @@ "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==" }, "node_modules/@swc/helpers": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz", - "integrity": "sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==", + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", "dependencies": { - "tslib": "^2.4.0" + "tslib": "^2.8.0" } }, "node_modules/@tanstack/react-virtual": { - "version": "3.10.7", - "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.10.7.tgz", - "integrity": "sha512-yeP+M0G8D+15ZFPivpuQ5hoM4Fa/PzERBx8P8EGcfEsXX3JOb9G9UUrqc47ZXAxvK+YqzM9T5qlJUYUFOwCZJw==", + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.11.2.tgz", + "integrity": "sha512-OuFzMXPF4+xZgx8UzJha0AieuMihhhaWG0tCqpp6tDzlFwOmNBPYMuLOtMJ1Tr4pXLHmgjcWhG6RlknY2oNTdQ==", "dependencies": { - "@tanstack/virtual-core": "3.10.7" + "@tanstack/virtual-core": "3.11.2" }, "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" }, "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "node_modules/@tanstack/virtual-core": { - "version": "3.10.7", - "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.10.7.tgz", - "integrity": "sha512-ND5dfsU0n9F4gROzwNNDJmg6y8n9pI8YWxtgbfJ5UcNn7Hx+MxEXtXcQ189tS7sh8pmCObgz2qSiyRKTZxT4dg==", + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.11.2.tgz", + "integrity": "sha512-vTtpNt7mKCiZ1pwU9hfKPhpdVO2sVzFQsxoVBGtOSHxlrRRzYr8iQ2TlwbAcRYCcEiZ9ECAM8kBzH0v2+VzfKw==", "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" } }, - "node_modules/@theguild/remark-mermaid": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@theguild/remark-mermaid/-/remark-mermaid-0.1.3.tgz", - "integrity": "sha512-2FjVlaaKXK7Zj7UJAgOVTyaahn/3/EAfqYhyXg0BfDBVUl+lXcoIWRaxzqfnDr2rv8ax6GsC5mNh6hAaT86PDw==", - "dependencies": { - "mermaid": "^11.0.0", - "unist-util-visit": "^5.0.0" - }, - "peerDependencies": { - "react": "^18.2.0" - } - }, "node_modules/@theguild/remark-npm2yarn": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@theguild/remark-npm2yarn/-/remark-npm2yarn-0.3.2.tgz", @@ -1726,9 +1726,9 @@ } }, "node_modules/@types/geojson": { - "version": "7946.0.14", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", - "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==" + "version": "7946.0.15", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.15.tgz", + "integrity": "sha512-9oSxFzDCT2Rj6DfcHF8G++jxBKS7mBqXl5xrRW+Kbvjry6Uduya2iiwqHPhVXpasAVMBYKkEPGgKhd3+/HZ6xA==" }, "node_modules/@types/hast": { "version": "3.0.4", @@ -1776,9 +1776,9 @@ } }, "node_modules/@types/node": { - "version": "22.10.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", - "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", + "version": "22.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", "dev": true, "dependencies": { "undici-types": "~6.20.0" @@ -3023,11 +3023,11 @@ "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" }, "node_modules/debug": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", - "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -3106,9 +3106,9 @@ "dev": true }, "node_modules/dompurify": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.2.tgz", - "integrity": "sha512-YMM+erhdZ2nkZ4fTNRTSI94mb7VG7uVF5vj5Zde7tImgnhZE3R6YW/IACGIHb2ux+QkEXMhe591N+5jWOmL4Zw==", + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.3.tgz", + "integrity": "sha512-U1U5Hzc2MO0oW3DF+G9qYN0aT7atAou4AgI0XjWz061nyBPbdxkfdhfy5uMgGn6+oLFCfn44ZGbdDqCzVmlOWA==", "optionalDependencies": { "@types/trusted-types": "^2.0.7" } @@ -3163,9 +3163,9 @@ } }, "node_modules/eslint": { - "version": "9.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", - "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", + "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -3173,7 +3173,7 @@ "@eslint/config-array": "^0.19.0", "@eslint/core": "^0.9.0", "@eslint/eslintrc": "^3.2.0", - "@eslint/js": "9.16.0", + "@eslint/js": "9.17.0", "@eslint/plugin-kit": "^0.2.3", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -3182,7 +3182,7 @@ "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.5", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.2.0", @@ -5811,9 +5811,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/mz": { "version": "2.7.0", @@ -5858,13 +5858,13 @@ } }, "node_modules/next": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/next/-/next-15.0.3.tgz", - "integrity": "sha512-ontCbCRKJUIoivAdGB34yCaOcPgYXr9AAkV/IwqFfWWTXEPUgLYkSkqBhIk9KK7gGmgjc64B+RdoeIDM13Irnw==", + "version": "15.1.3", + "resolved": "https://registry.npmjs.org/next/-/next-15.1.3.tgz", + "integrity": "sha512-5igmb8N8AEhWDYzogcJvtcRDU6n4cMGtBklxKD4biYv4LXN8+awc/bbQ2IM2NQHdVPgJ6XumYXfo3hBtErg1DA==", "dependencies": { - "@next/env": "15.0.3", + "@next/env": "15.1.3", "@swc/counter": "0.1.3", - "@swc/helpers": "0.5.13", + "@swc/helpers": "0.5.15", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", "postcss": "8.4.31", @@ -5877,22 +5877,22 @@ "node": "^18.18.0 || ^19.8.0 || >= 20.0.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "15.0.3", - "@next/swc-darwin-x64": "15.0.3", - "@next/swc-linux-arm64-gnu": "15.0.3", - "@next/swc-linux-arm64-musl": "15.0.3", - "@next/swc-linux-x64-gnu": "15.0.3", - "@next/swc-linux-x64-musl": "15.0.3", - "@next/swc-win32-arm64-msvc": "15.0.3", - "@next/swc-win32-x64-msvc": "15.0.3", + "@next/swc-darwin-arm64": "15.1.3", + "@next/swc-darwin-x64": "15.1.3", + "@next/swc-linux-arm64-gnu": "15.1.3", + "@next/swc-linux-arm64-musl": "15.1.3", + "@next/swc-linux-x64-gnu": "15.1.3", + "@next/swc-linux-x64-musl": "15.1.3", + "@next/swc-win32-arm64-msvc": "15.1.3", + "@next/swc-win32-x64-msvc": "15.1.3", "sharp": "^0.33.5" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", "@playwright/test": "^1.41.2", "babel-plugin-react-compiler": "*", - "react": "^18.2.0 || 19.0.0-rc-66855b96-20241106", - "react-dom": "^18.2.0 || 19.0.0-rc-66855b96-20241106", + "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", + "react-dom": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0", "sass": "^1.3.0" }, "peerDependenciesMeta": { @@ -5911,9 +5911,9 @@ } }, "node_modules/next-themes": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.4.3.tgz", - "integrity": "sha512-nG84VPkTdUHR2YeD89YchvV4I9RbiMAql3GiLEQlPvq1ioaqPaIReK+yMRdg/zgiXws620qS1rU30TiWmmG9lA==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.4.4.tgz", + "integrity": "sha512-LDQ2qIOJF0VnuVrrMSMLrWGjRMkq+0mpgl6e0juCLqdJ+oo8Q84JRWT6Wh11VDQKkMMe+dVzDKLWs5n87T+PkQ==", "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" @@ -5947,9 +5947,9 @@ } }, "node_modules/nextra": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/nextra/-/nextra-3.2.4.tgz", - "integrity": "sha512-xvQuPVtRoJTz4ynIbEkxYkEtviIX699lt4coij2IMmafYrBNaD0Ofj93jIz7VngYxyT9f4gWSiwqNgoIlnbsjQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nextra/-/nextra-3.3.1.tgz", + "integrity": "sha512-jiwj+LfUPHHeAxJAEqFuglxnbjFgzAOnDWFsjv7iv3BWiX8OksDwd3I2Sv3j2zba00iIBDEPdNeylfzTtTLZVg==", "dependencies": { "@formatjs/intl-localematcher": "^0.5.4", "@headlessui/react": "^2.1.2", @@ -5973,6 +5973,7 @@ "mdast-util-to-hast": "^13.2.0", "negotiator": "^1.0.0", "p-limit": "^6.0.0", + "react-medium-image-zoom": "^5.2.12", "rehype-katex": "^7.0.0", "rehype-pretty-code": "0.14.0", "rehype-raw": "^7.0.0", @@ -6000,9 +6001,9 @@ } }, "node_modules/nextra-theme-docs": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/nextra-theme-docs/-/nextra-theme-docs-3.2.4.tgz", - "integrity": "sha512-3fg7zMHInuvSDURRJjh6UrbdqkK8uLs8RNriY38kVukWLvaVP2f6mmVJKIYqxVv6qAKWEzDLTr4dlJCY81eXuQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/nextra-theme-docs/-/nextra-theme-docs-3.3.1.tgz", + "integrity": "sha512-P305m2UcW2IDyQhjrcAu0qpdPArikofinABslUCAyixYShsmcdDRUhIMd4QBHYru4gQuVjGWX9PhWZZCbNvzDQ==", "dependencies": { "@headlessui/react": "^2.1.2", "clsx": "^2.0.0", @@ -6014,11 +6015,23 @@ }, "peerDependencies": { "next": ">=13", - "nextra": "3.2.4", + "nextra": "3.3.1", "react": ">=18", "react-dom": ">=18" } }, + "node_modules/nextra/node_modules/@theguild/remark-mermaid": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@theguild/remark-mermaid/-/remark-mermaid-0.1.3.tgz", + "integrity": "sha512-2FjVlaaKXK7Zj7UJAgOVTyaahn/3/EAfqYhyXg0BfDBVUl+lXcoIWRaxzqfnDr2rv8ax6GsC5mNh6hAaT86PDw==", + "dependencies": { + "mermaid": "^11.0.0", + "unist-util-visit": "^5.0.0" + }, + "peerDependencies": { + "react": "^18.2.0" + } + }, "node_modules/nlcst-to-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-4.0.0.tgz", @@ -6215,9 +6228,9 @@ } }, "node_modules/package-manager-detector": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.6.tgz", - "integrity": "sha512-9vPH3qooBlYRJdmdYP00nvjZOulm40r5dhtal8st18ctf+6S1k7pi5yIHLvI4w5D70x0Y+xdVD9qITH0QO/A8A==" + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.8.tgz", + "integrity": "sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==" }, "node_modules/parent-module": { "version": "1.0.1", @@ -6392,12 +6405,12 @@ } }, "node_modules/pkg-types": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.2.1.tgz", - "integrity": "sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.0.tgz", + "integrity": "sha512-kS7yWjVFCkIw9hqdJBoMxDdzEngmkr5FXeWZZfQ6GoYacjVnsW6l2CcYW/0ThD0vF4LPJgVYnrg4d0uuhwYQbg==", "dependencies": { "confbox": "^0.1.8", - "mlly": "^1.7.2", + "mlly": "^1.7.3", "pathe": "^1.1.2" } }, @@ -6622,26 +6635,22 @@ ] }, "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz", + "integrity": "sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==", "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "version": "19.0.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.0.0.tgz", + "integrity": "sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==", "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" + "scheduler": "^0.25.0" }, "peerDependencies": { - "react": "^18.3.1" + "react": "^19.0.0" } }, "node_modules/react-is": { @@ -6649,6 +6658,21 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/react-medium-image-zoom": { + "version": "5.2.13", + "resolved": "https://registry.npmjs.org/react-medium-image-zoom/-/react-medium-image-zoom-5.2.13.tgz", + "integrity": "sha512-KcBL4OsoUQJgIFh6vQgt/6sRGqDy6bQBcsbhGD2tsy4B5Pw3dWrboocVOyIm76RRALEZ6Qwp3EDvIvfEv0m5sg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/rpearce" + } + ], + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -7115,12 +7139,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "dependencies": { - "loose-envify": "^1.1.0" - } + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.25.0.tgz", + "integrity": "sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==" }, "node_modules/scroll-into-view-if-needed": { "version": "3.1.0", @@ -7562,9 +7583,9 @@ "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==" }, "node_modules/tailwindcss": { - "version": "3.4.16", - "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.16.tgz", - "integrity": "sha512-TI4Cyx7gDiZ6r44ewaJmt0o6BrMCT5aK5e0rmJ/G9Xq3w7CX/5VXl/zIPEJZFUK5VEqwByyhqNPycPlvcK4ZNw==", + "version": "3.4.17", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz", + "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==", "dev": true, "dependencies": { "@alloc/quick-lru": "^5.2.0", @@ -7660,9 +7681,9 @@ } }, "node_modules/tinyexec": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.1.tgz", - "integrity": "sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==" + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==" }, "node_modules/title": { "version": "4.0.1", @@ -7722,9 +7743,9 @@ "dev": true }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/twoslash": { "version": "0.2.5", diff --git a/docs/package.json b/docs/package.json index dfe0f839e..fcc931b79 100644 --- a/docs/package.json +++ b/docs/package.json @@ -15,24 +15,24 @@ }, "author": "Thomas Grey", "dependencies": { - "@fortawesome/fontawesome-svg-core": "^6.7.1", - "@fortawesome/free-brands-svg-icons": "^6.7.1", - "@fortawesome/free-solid-svg-icons": "^6.7.1", + "@fortawesome/fontawesome-svg-core": "^6.7.2", + "@fortawesome/free-brands-svg-icons": "^6.7.2", + "@fortawesome/free-solid-svg-icons": "^6.7.2", "@fortawesome/react-fontawesome": "^0.2.2", "@vercel/analytics": "^1.4.1", - "next": "^15.0.3", - "nextra": "3.2.4", - "nextra-theme-docs": "3.2.4", - "react": "^18.3.1", - "react-dom": "^18.3.1" + "next": "^15.1.3", + "nextra": "3.3.1", + "nextra-theme-docs": "3.3.1", + "react": "^19.0.0", + "react-dom": "^19.0.0" }, "devDependencies": { - "@types/node": "^22.10.1", + "@types/node": "^22.10.2", "autoprefixer": "^10.4.20", "copyfiles": "^2.4.1", - "eslint": "^9.16.0", + "eslint": "^9.17.0", "postcss": "^8.4.49", - "tailwindcss": "^3.4.16" + "tailwindcss": "^3.4.17" }, "postcss": { "plugins": { diff --git a/docs/pages/_meta.js b/docs/pages/_meta.js index aa391415a..f908b0c6a 100644 --- a/docs/pages/_meta.js +++ b/docs/pages/_meta.js @@ -18,8 +18,4 @@ export default { title: 'Utils & Themes', type: 'page', }, - 'api-docs': { - type: 'page', - title: 'API', - }, }; diff --git a/docs/pages/api-docs/Class.MarkdownPageEvent.mdx b/docs/pages/api-docs/Class.MarkdownPageEvent.mdx deleted file mode 100644 index e06d83fdc..000000000 --- a/docs/pages/api-docs/Class.MarkdownPageEvent.mdx +++ /dev/null @@ -1,82 +0,0 @@ -# MarkdownPageEvent - -An event emitted before and after the markdown of a page is rendered. - -## Extends - -- `Event` - -## Events - -### BEGIN - -> `readonly` `static` **BEGIN**: `"beginPage"` = `'beginPage'` - -Triggered before a document will be rendered. - -*** - -### END - -> `readonly` `static` **END**: `"endPage"` = `'endPage'` - -Triggered after a document has been rendered, just before it is written to disc. - -## Properties - -### project - -> **project**: [`ProjectReflection`](https://typedoc.org/api/classes/Models.ProjectReflection.html) - -The [`ProjectReflection`](https://typedoc.org/api/classes/Models.ProjectReflection.html) instance the renderer is currently processing. - -*** - -### model - -> `readonly` **model**: `Model` - -The model that that is being rendered on this page. -Either a [`DeclarationReflection`](https://typedoc.org/api/classes/Models.DeclarationReflection.html) or [`ProjectReflection`](https://typedoc.org/api/classes/Models.ProjectReflection.html). - -*** - -### url - -> **url**: `string` - -The url `string` of the page. - -*** - -### filename - -> **filename**: `string` - -The complete `string` filename where the file will be written.. - -*** - -### group? - -> `optional` **group**: `string` - -The group title of the group reflection belongs to. - -*** - -### contents? - -> `optional` **contents**: `string` - -The final markdown `string` content of the page. - -Should be rendered by layout templates and can be modified by plugins. - -*** - -### frontmatter? - -> `optional` **frontmatter**: `Record`\<`string`, `any`\> - -The frontmatter of this page represented as a key value object. This property can be utilised by other plugins. diff --git a/docs/pages/api-docs/Class.MarkdownRendererEvent.mdx b/docs/pages/api-docs/Class.MarkdownRendererEvent.mdx deleted file mode 100644 index 3ce0817b0..000000000 --- a/docs/pages/api-docs/Class.MarkdownRendererEvent.mdx +++ /dev/null @@ -1,55 +0,0 @@ -# MarkdownRendererEvent - -An event emitted at the beginning and end of the rendering process. - -## Extends - -- `Event` - -## Events - -### BEGIN - -> `readonly` `static` **BEGIN**: `"beginRender"` = `'beginRender'` - -Triggered before the renderer starts rendering a project. - -*** - -### END - -> `readonly` `static` **END**: `"endRender"` = `'endRender'` - -Triggered after the renderer has written all documents. - -## Properties - -### project - -> `readonly` **project**: [`ProjectReflection`](https://typedoc.org/api/classes/Models.ProjectReflection.html) - -The project the renderer is currently processing. - -*** - -### outputDirectory - -> `readonly` **outputDirectory**: `string` - -The path of the directory the documentation should be written to. - -*** - -### urls? - -> `optional` **urls**: [`UrlMapping`](/api-docs/Interface.UrlMapping.mdx)\<[`Reflection`](https://typedoc.org/api/classes/Reflection.html)\>[] - -A list of all pages that should be generated. - -*** - -### navigation? - -> `optional` **navigation**: [`NavigationItem`](/api-docs/Interface.NavigationItem.mdx)[] - -The navigation structure of the project that can be utilised by plugins. diff --git a/docs/pages/api-docs/Document.Customizing-Output.mdx b/docs/pages/api-docs/Document.Customizing-Output.mdx deleted file mode 100644 index a7c61b0ed..000000000 --- a/docs/pages/api-docs/Document.Customizing-Output.mdx +++ /dev/null @@ -1,94 +0,0 @@ -# Customizing Output - -It is possible to customize the output of the generated markdown files by creating local plugins. -See the [Local Plugins](/api-docs/Document.Local-Plugins) guide for implementation details. - -## Hooks - -Hooks allows strings to be injected into the output in specific locations and are the most basic form of customization. - -### Example - -```ts filename="custom-plugin.mjs" -// @ts-check -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app) { - app.renderer.markdownHooks.on('page.end', () => `**Generated using \`page.end\` hook**`); -} -``` - -### See - -- [MarkdownRendererHooks](/api-docs/Interface.MarkdownRendererHooks.mdx) - -## Events - -Events are more powerful than hooks and allow for more complex customizations and provide a context that can be used to modify the output. - -### Page Events - -Page events emitted before and after the markdown of each page is rendered. -You would typically use this event to modify content of a page. - -#### Example - -```ts filename="custom-plugin.mjs" -// @ts-check -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app) { - app.renderer.on(MarkdownPageEvent.BEGIN, (page) => { - page.contents = page.contents.replace('foo', 'bar'); - }); -} -``` - -#### See - -- [MarkdownPageEvent](/api-docs/Class.MarkdownPageEvent). - -### Renderer Events - -Renderer events are emitted at the beginning (before pages are rendered) and end (after pages are rendered) of the rendering process. -You could typically use this event to modify urls or navigation structure. - -#### Example - -```ts filename="custom-plugin.mjs" -// @ts-check -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app) { - app.renderer.on(MarkdownRendererEvent.BEGIN, (renderer) => { - ... - }); -} -``` - -#### See - -- [MarkdownRendererEvent](/api-docs/Class.MarkdownRendererEvent). - -## Async Jobs - -Async jobs are used to perform asynchronous tasks before or after rendering with a provided context. - -```ts filename="custom-plugin.mjs" -// @ts-check -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app: MarkdownApplication) { - app.renderer.preRenderAsyncJobs.push(async (renderer) => { - await doSomethingAsync(renderer); - }); - - app.renderer.postRenderAsyncJobs.push(async (renderer) => { - await doSomethingAsync(renderer); - }); -} -``` diff --git a/docs/pages/api-docs/Document.Local-Plugins.mdx b/docs/pages/api-docs/Document.Local-Plugins.mdx deleted file mode 100644 index 0d72226c7..000000000 --- a/docs/pages/api-docs/Document.Local-Plugins.mdx +++ /dev/null @@ -1,32 +0,0 @@ -# Local plugins - -Plugins are the building blocks for extending the TypeDoc output. Plugins export a load function with context of the resolved application. - -Here is a basic plugin skeleton: - -```js filename="local-plugins/my-custom-plugin.mjs" -// @ts-check - -import { MarkdownApplication } from 'typedoc-plugin-markdown'; - -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app) { - // do something with app instance -} -``` - -The plugin can then be consumed by adding the path to the plugin in your `typedoc.json` file: - -```json filename="typedoc.json" -{ - "plugin": ["typedoc-plugin-markdown", "./local-plugins/my-custom-plugin.mjs"] -} -``` - -Note plugins must be consumed as ESM. - -## See - -- [Writing a TypeDoc plugin](https://typedoc.org/documents/Development.Plugins.html) diff --git a/docs/pages/api-docs/Interface.MarkdownApplication.mdx b/docs/pages/api-docs/Interface.MarkdownApplication.mdx deleted file mode 100644 index 9392df18a..000000000 --- a/docs/pages/api-docs/Interface.MarkdownApplication.mdx +++ /dev/null @@ -1,19 +0,0 @@ -# MarkdownApplication - -The MarkdownApplication extends TypeDoc's [Application](https://typedoc.org/api/classes/Application.html) instance with a custom renderer. - -## Extends - -- [`Application`](https://typedoc.org/api/classes/Application.html) - -## Properties - -### renderer - -> **renderer**: [`MarkdownRenderer`](/api-docs/Interface.MarkdownRenderer.mdx) & [`Renderer`](https://typedoc.org/api/classes/Renderer.html) - -The renderer used to generate the HTML documentation output. - -#### Overrides - -`Application.renderer` diff --git a/docs/pages/api-docs/Interface.MarkdownRenderer.mdx b/docs/pages/api-docs/Interface.MarkdownRenderer.mdx deleted file mode 100644 index 0a3038c2e..000000000 --- a/docs/pages/api-docs/Interface.MarkdownRenderer.mdx +++ /dev/null @@ -1,139 +0,0 @@ -# MarkdownRenderer - -The MarkdownRenderer extends TypeDoc's [Renderer](https://typedoc.org/api/classes/Renderer.html) instance with custom hooks and async jobs. - -## Extends - -- [`Renderer`](https://typedoc.org/api/classes/Renderer.html) - -## Methods - -### on() - -#### Call Signature - -> **on**(`event`, `callback`): `void` - -##### Parameters - -| Parameter | Type | Description | -| :------ | :------ | :------ | -| `event` | `"beginPage"` \| `"endPage"` | Triggered before or after a document will be rendered. | -| `callback` | (`page`) => `void` | Receives the [MarkdownPageEvent](/api-docs/Class.MarkdownPageEvent.mdx) object as an argument. | - -##### Returns - -`void` - -##### Example - -```ts -app.renderer.on(MarkdownPageEvent.BEGIN, (renderer) => {}); -``` - -##### Overrides - -`Renderer.on` - -#### Call Signature - -> **on**(`event`, `callback`): `void` - -##### Parameters - -| Parameter | Type | Description | -| :------ | :------ | :------ | -| `event` | `"beginRender"` \| `"endRender"` | Triggered before or after rendering the project. | -| `callback` | (`page`) => `void` | Receives the [MarkdownRendererEvent](/api-docs/Class.MarkdownRendererEvent.mdx) object as an argument. | - -##### Returns - -`void` - -##### Example - -```ts -app.renderer.on(MarkdownRendererEvent.BEGIN, (renderer) => {}); -``` - -##### Overrides - -`Renderer.on` - -## Properties - -### defineTheme() - -> **defineTheme**: (`name`, `theme`) => `void` - -Define a new theme that can be used to render output. - -#### Parameters - -| Parameter | Type | Description | -| :------ | :------ | :------ | -| `name` | `string` | The name of the theme. | -| `theme` | (`renderer`) => `MarkdownTheme` | The theme class to use. | - -#### Returns - -`void` - -#### Overrides - -`Renderer.defineTheme` - -*** - -### markdownHooks - -> **markdownHooks**: [`EventHooks`](https://typedoc.org/api/classes/EventHooks.html)\<[`MarkdownRendererHooks`](/api-docs/Interface.MarkdownRendererHooks.mdx), `string`\> - -*** - -### preRenderAsyncJobs - -> **preRenderAsyncJobs**: (`output`) => `Promise`\<`void`\>[] - -A list of async jobs which must be completed before rendering output. - -Note: This array is cleared after calling the contained functions on each call. - -#### Parameters - -| Parameter | Type | -| :------ | :------ | -| `output` | [`MarkdownRendererEvent`](/api-docs/Class.MarkdownRendererEvent.mdx) | - -#### Returns - -`Promise`\<`void`\> - -#### Overrides - -`Renderer.preRenderAsyncJobs` - -*** - -### postRenderAsyncJobs - -> **postRenderAsyncJobs**: (`output`) => `Promise`\<`void`\>[] - -A list of async jobs which must be completed after rendering output files but before generation is considered successful. -These functions will be called after all documents have been written to the filesystem. - -Note: This array is cleared after calling the contained functions on each call. - -#### Parameters - -| Parameter | Type | -| :------ | :------ | -| `output` | [`MarkdownRendererEvent`](/api-docs/Class.MarkdownRendererEvent.mdx) | - -#### Returns - -`Promise`\<`void`\> - -#### Overrides - -`Renderer.postRenderAsyncJobs` diff --git a/docs/pages/api-docs/Interface.MarkdownRendererHooks.mdx b/docs/pages/api-docs/Interface.MarkdownRendererHooks.mdx deleted file mode 100644 index abb1fcf6e..000000000 --- a/docs/pages/api-docs/Interface.MarkdownRendererHooks.mdx +++ /dev/null @@ -1,43 +0,0 @@ -# MarkdownRendererHooks - -Describes the hooks available to inject output in the markdown theme. - -## Hooks - -### page.begin - -> **begin**: [`MarkdownThemeContext`] - -Applied at the start of the markdown output. - -*** - -### page.end - -> **end**: [`MarkdownThemeContext`] - -Applied at the end of the markdown output. - -*** - -### content.begin - -> **begin**: [`MarkdownThemeContext`] - -Applied before the main markdown content is rendered. - -*** - -### index.page.begin - -> **begin**: [`MarkdownThemeContext`] - -Applied at the start of the markdown output on the index page. - -*** - -### index.page.end - -> **end**: [`MarkdownThemeContext`] - -Applied at the end of the markdown output on the index page. diff --git a/docs/pages/api-docs/Interface.NavigationItem.mdx b/docs/pages/api-docs/Interface.NavigationItem.mdx deleted file mode 100644 index 1a3d04f60..000000000 --- a/docs/pages/api-docs/Interface.NavigationItem.mdx +++ /dev/null @@ -1,27 +0,0 @@ -# NavigationItem - -The model used to define the navigation structure. - -## Properties - -### title - -> **title**: `string` - -*** - -### path? - -> `optional` **path**: `null` \| `string` - -*** - -### kind? - -> `optional` **kind**: [`ReflectionKind`](https://typedoc.org/api/enums/Models.ReflectionKind-1.html) - -*** - -### children? - -> `optional` **children**: [`NavigationItem`](/api-docs/Interface.NavigationItem.mdx)[] diff --git a/docs/pages/api-docs/Interface.PluginOptions.mdx b/docs/pages/api-docs/Interface.PluginOptions.mdx deleted file mode 100644 index e43710188..000000000 --- a/docs/pages/api-docs/Interface.PluginOptions.mdx +++ /dev/null @@ -1,391 +0,0 @@ -# PluginOptions - -Describes the options declared by the plugin. - -## Properties - -### anchorPrefix - -> **anchorPrefix**: `string` - -Custom anchor prefix when anchoring to in-page symbols. - -*** - -### blockTagsPreserveOrder - -> **blockTagsPreserveOrder**: `string`[] - -Specifies comment block tags that should preserve their position. - -*** - -### classPropertiesFormat - -> **classPropertiesFormat**: `"table"` \| `"list"` \| `"htmlTable"` - -Sets the format of property groups for classes. - -*** - -### entryFileName - -> **entryFileName**: `string` - -The file name of the entry page. - -*** - -### entryModule - -> **entryModule**: `string` - -The name of a module that should act as the root page for the documentation. - -*** - -### enumMembersFormat - -> **enumMembersFormat**: `"table"` \| `"list"` \| `"htmlTable"` - -Sets the format of enumeration members. - -*** - -### ~~excludeGroups~~ - -> **excludeGroups**: `boolean` - -#### Deprecated - -This option has been renamed hideGroupHeadings to better reflect its purpose. - -*** - -### excludeScopesInPaths - -> **excludeScopesInPaths**: `boolean` - -Exclude writing @ scope directories in paths. - -*** - -### expandObjects - -> **expandObjects**: `boolean` - -Expand objects inside declarations. - -*** - -### expandParameters - -> **expandParameters**: `boolean` - -Expand parameters in signature parentheses to display type information. - -*** - -### fileExtension - -> **fileExtension**: `string` - -Specify the file extension for generated output files. - -*** - -### flattenOutputFiles - -> **flattenOutputFiles**: `boolean` - -Flatten output files to a single directory. - -*** - -### formatWithPrettier - -> **formatWithPrettier**: `boolean` - -Apply additional output formatting with Prettier. - -*** - -### hideBreadcrumbs - -> **hideBreadcrumbs**: `boolean` - -Do not print breadcrumbs. - -*** - -### hideGroupHeadings - -> **hideGroupHeadings**: `boolean` - -Excludes grouping by kind so all members are rendered at the same level. - -*** - -### hidePageHeader - -> **hidePageHeader**: `boolean` - -Do not print page header. - -*** - -### hidePageTitle - -> **hidePageTitle**: `boolean` - -Do not print page title. - -*** - -### indexFormat - -> **indexFormat**: `"table"` \| `"list"` \| `"htmlTable"` - -Sets the format of index items. - -*** - -### interfacePropertiesFormat - -> **interfacePropertiesFormat**: `"table"` \| `"list"` \| `"htmlTable"` - -Sets the format of property groups for interfaces. - -*** - -### membersWithOwnFile - -> **membersWithOwnFile**: (`"Enum"` \| `"Variable"` \| `"Function"` \| `"Class"` \| `"Interface"` \| `"TypeAlias"`)[] - -Determines which members are exported to their own file. - -*** - -### mergeReadme - -> **mergeReadme**: `boolean` - -Appends the documentation index page to the readme page. - -*** - -### modulesFileName - -> **modulesFileName**: `string` - -The file name of the separate modules / index page. - -*** - -### ~~navigationModel~~ - -> **navigationModel**: `object` - -#### ~~excludeGroups~~ - -> **excludeGroups**: `boolean` - -#### ~~excludeCategories~~ - -> **excludeCategories**: `boolean` - -#### ~~excludeFolders~~ - -> **excludeFolders**: `boolean` - -#### Deprecated - -This option has been deprecated in favour of TypeDoc `navigation` option. - -*** - -### outputFileStrategy - -> **outputFileStrategy**: `"members"` \| `"modules"` - -Determines how output files are generated. - -*** - -### pageTitleTemplates - -> **pageTitleTemplates**: `object` - -Change specific text placeholders in the template. - -#### index - -> **index**: `string` \| (`name`) => `string` - -#### member - -> **member**: `string` \| (`name`) => `string` - -#### module - -> **module**: `string` \| (`name`) => `string` - -*** - -### parametersFormat - -> **parametersFormat**: `"table"` \| `"list"` \| `"htmlTable"` - -Sets the format of parameter and type parameter groups. - -*** - -### preserveAnchorCasing - -> **preserveAnchorCasing**: `boolean` - -Preserve anchor casing when generating link to symbols. - -*** - -### prettierConfigFile - -> **prettierConfigFile**: `string` - -Specify a custom Prettier configuration file location. - -*** - -### propertiesFormat - -> **propertiesFormat**: `"table"` \| `"list"` \| `"htmlTable"` - -Sets the format of property groups for interfaces and classes. - -*** - -### propertyMembersFormat - -> **propertyMembersFormat**: `"table"` \| `"list"` \| `"htmlTable"` - -Sets the format of style for property members for interfaces and classes. - -*** - -### publicPath - -> **publicPath**: `string` - -Specify the base path for all urls. - -*** - -### sanitizeComments - -> **sanitizeComments**: `boolean` - -Sanitize HTML and JSX inside JsDoc comments. - -*** - -### tableColumnSettings - -> **tableColumnSettings**: `object` - -Control how table columns are configured and displayed. - -#### hideDefaults - -> **hideDefaults**: `boolean` - -#### hideInherited - -> **hideInherited**: `boolean` - -#### hideModifiers - -> **hideModifiers**: `boolean` - -#### hideOverrides - -> **hideOverrides**: `boolean` - -#### hideSources - -> **hideSources**: `boolean` - -#### hideValues - -> **hideValues**: `boolean` - -#### leftAlignHeaders - -> **leftAlignHeaders**: `boolean` - -*** - -### textContentMappings - -> **textContentMappings**: `object` - -Change specific text placeholders in the template. - -##### header.title - -> **title**: `string` - -##### breadcrumbs.home - -> **home**: `string` - -##### title.indexPage - -> **indexPage**: `string` - -##### title.memberPage - -> **memberPage**: `string` - -##### title.modulePage - -> **modulePage**: `string` - -*** - -### typeDeclarationFormat - -> **typeDeclarationFormat**: `"table"` \| `"list"` \| `"htmlTable"` - -Sets the format of style for type declaration members. - -*** - -### typeDeclarationVisibility - -> **typeDeclarationVisibility**: `"compact"` \| `"verbose"` - -Set the visibility level for type declaration documentation. - -*** - -### useCodeBlocks - -> **useCodeBlocks**: `boolean` - -Wraps signatures and declarations in code blocks. - -*** - -### useHTMLAnchors - -> **useHTMLAnchors**: `boolean` - -Add HTML named anchors to headings and table rows. - -*** - -### useHTMLEncodedBrackets - -> **useHTMLEncodedBrackets**: `boolean` - -Use HTML encoded entities for angle brackets. diff --git a/docs/pages/api-docs/Interface.UrlMapping.mdx b/docs/pages/api-docs/Interface.UrlMapping.mdx deleted file mode 100644 index 5b0b0bca1..000000000 --- a/docs/pages/api-docs/Interface.UrlMapping.mdx +++ /dev/null @@ -1,37 +0,0 @@ -# UrlMapping - -The model used to define the URL mapping structure. - -## Properties - -### url - -> **url**: `string` - -*** - -### model - -> **model**: `Model` - -*** - -### template() - -> **template**: (`data`) => `string` - -#### Parameters - -| Parameter | Type | -| :------ | :------ | -| `data` | [`MarkdownPageEvent`](/api-docs/Class.MarkdownPageEvent.mdx)\<`Model`\> | - -#### Returns - -`string` - -*** - -### group? - -> `optional` **group**: `string` diff --git a/docs/pages/api-docs/_meta.js b/docs/pages/api-docs/_meta.js deleted file mode 100644 index 7de1f4755..000000000 --- a/docs/pages/api-docs/_meta.js +++ /dev/null @@ -1,26 +0,0 @@ -export default { - index: 'API Index', - Documents: { - type: 'separator', - title: 'Documents', - }, - 'Document.Local-Plugins': 'Local Plugins', - 'Document.Customizing-Output': 'Customizing Output', - 'Document.Utilizing-Navigation': 'Utilizing Navigation', - Events: { - type: 'separator', - title: 'Events', - }, - 'Class.MarkdownPageEvent': 'MarkdownPageEvent', - 'Class.MarkdownRendererEvent': 'MarkdownRendererEvent', - Interfaces: { - type: 'separator', - title: 'Interfaces', - }, - 'Interface.MarkdownApplication': 'MarkdownApplication', - 'Interface.MarkdownRendererHooks': 'MarkdownRendererHooks', - 'Interface.MarkdownRenderer': 'MarkdownRenderer', - 'Interface.PluginOptions': 'PluginOptions', - 'Interface.UrlMapping': 'UrlMapping', - 'Interface.NavigationItem': 'NavigationItem', -}; diff --git a/docs/pages/api-docs/index.mdx b/docs/pages/api-docs/index.mdx deleted file mode 100644 index 21b3dbc1b..000000000 --- a/docs/pages/api-docs/index.mdx +++ /dev/null @@ -1,30 +0,0 @@ -# API - -The public API of typedoc-plugin-markdown exposes some classes and types that can be used to customize the output of the plugin. -If you are interested more generally in the TypeDoc API please visit [https://typedoc.org](https://typedoc.org/api/). - -## Documents - -| Document | Description | -| :------ | :------ | -| [Local Plugins](/api-docs/Document.Local-Plugins.mdx) | How to write local plugins to consume APIs. | -| [Customizing Output](/api-docs/Document.Customizing-Output.mdx) | How to extend and customize output. | -| [Utilizing Navigation](/api-docs/Document.Utilizing-Navigation.mdx) | How to create a custom navigation structure. | - -## Events - -| Class | Description | -| :------ | :------ | -| [MarkdownPageEvent](/api-docs/Class.MarkdownPageEvent.mdx) | An event emitted before and after the markdown of a page is rendered. | -| [MarkdownRendererEvent](/api-docs/Class.MarkdownRendererEvent.mdx) | An event emitted at the beginning and end of the rendering process. | - -## Interfaces - -| Interface | Description | -| :------ | :------ | -| [MarkdownApplication](/api-docs/Interface.MarkdownApplication.mdx) | The MarkdownApplication extends TypeDoc's [Application](https://typedoc.org/api/classes/Application.html) instance with a custom renderer. | -| [MarkdownRendererHooks](/api-docs/Interface.MarkdownRendererHooks.mdx) | Describes the hooks available to inject output in the markdown theme. | -| [MarkdownRenderer](/api-docs/Interface.MarkdownRenderer.mdx) | The MarkdownRenderer extends TypeDoc's [Renderer](https://typedoc.org/api/classes/Renderer.html) instance with custom hooks and async jobs. | -| [PluginOptions](/api-docs/Interface.PluginOptions.mdx) | Describes the options declared by the plugin. | -| [UrlMapping](/api-docs/Interface.UrlMapping.mdx) | The model used to define the URL mapping structure. | -| [NavigationItem](/api-docs/Interface.NavigationItem.mdx) | The model used to define the navigation structure. | diff --git a/docs/pages/docs/_meta.js b/docs/pages/docs/_meta.js index 371df8921..bd257b198 100644 --- a/docs/pages/docs/_meta.js +++ b/docs/pages/docs/_meta.js @@ -11,6 +11,8 @@ export default { title: 'Guides', }, 'typedoc-usage': '', + 'customizing-output': '', + 'utilizing-navigation': '', '-- Support': { type: 'separator', title: 'Support', diff --git a/docs/pages/docs/customizing-output.mdx b/docs/pages/docs/customizing-output.mdx new file mode 100644 index 000000000..937c4cce8 --- /dev/null +++ b/docs/pages/docs/customizing-output.mdx @@ -0,0 +1,109 @@ +# Customizing Output + +## Local plugins + +Plugins are the building blocks for extending the TypeDoc output. Plugins export a load function with context of the resolved application. + +The following is an example a a basic plugin skeleton: + +```js filename="local-plugins/my-custom-plugin.mjs" +// @ts-check + +import { MarkdownApplication } from 'typedoc-plugin-markdown'; + +/** + * @param {import('typedoc-plugin-markdown').MarkdownApplication} app + */ +export function load(app) { + // do something with app instance +} +``` + +The plugin can then be consumed by adding the path to the plugin in your `typedoc.json` file: + +```json filename="typedoc.json" +{ + "plugin": ["typedoc-plugin-markdown", "./local-plugins/my-custom-plugin.mjs"] +} +``` + +Note plugins must be consumed as ESM. + +See [Writing a TypeDoc plugin](https://typedoc.org/documents/Development.Plugins.html) for more information. + +## Hooks + +Hooks allow strings to be injected into the output in specific locations and are the most basic form of customization. + +The following example demonstrates how to use hooks to inject content into the output: + +```ts filename="custom-plugin.mjs" +// @ts-check +import { MarkdownHook } from 'typedoc-plugin-markdown'; +/** + * @param {import('typedoc-plugin-markdown').MarkdownApplication} app + */ +export function load(app) { + app.renderer.markdownHooks.on( + MarkdownHook.PageEnd, + () => `**Generated using \`page.end\` hook**`, + ); +} +``` + +Hooks can be identified and injected using the following predefined keys: + +- `"page.begin"`: Applied at the start of the markdown output. +- `"page.end"`: Applied at the end of the markdown output. +- `"content.begin"`: Applied before the main markdown content is rendered. +- `"index.page.begin"`: Applied at the start of the markdown output on the index page. +- `"index.page.end"`: Applied at the end of the markdown output on the index page. + +## Page Events + +Page events provide a context that can be used to modify the output. The events are emitted before and after the markdown of each page is rendered. + +You would typically use this event to modify content of a page. + +```ts filename="custom-plugin.mjs" +// @ts-check +import { MarkdownPageEvent } from 'typedoc-plugin-markdown'; +/** + * @param {import('typedoc-plugin-markdown').MarkdownApplication} app + */ +export function load(app) { + app.renderer.on(MarkdownPageEvent.BEGIN, (page) => { + page.contents = page.contents.replace('foo', 'bar'); + }); +} +``` + +The following page events are available: + +- `MarkdownPageEvent.BEGIN`: Applied at the start of the markdown output. +- `MarkdownPageEvent.END`: Applied at the end of the markdown output. + +## Async Jobs + +Async jobs are used to perform asynchronous tasks before or after rendering with a provided context. + +```ts filename="custom-plugin.mjs" +// @ts-check +/** + * @param {import('typedoc-plugin-markdown').MarkdownApplication} app + */ +export function load(app) { + app.renderer.preRenderAsyncJobs.push(async (renderer) => { + await doSomethingAsync(renderer); + }); + + app.renderer.postRenderAsyncJobs.push(async (renderer) => { + await doSomethingAsync(renderer); + }); +} +``` + +The following arrays are available: + +- `preRenderAsyncJobs`: A list of async jobs which must be completed before rendering output. +- `postRenderAsyncJobs`: A list of async jobs which must be completed after rendering output files but before generation is considered successful. diff --git a/docs/pages/docs/options.mdx b/docs/pages/docs/options.mdx index 2f5496f1a..60b220db2 100644 --- a/docs/pages/docs/options.mdx +++ b/docs/pages/docs/options.mdx @@ -11,54 +11,54 @@ import { Callout } from "nextra/components"; Options that are used to configure how files are output. -| Option | Description | -| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| [`outputFileStrategy`](./options/file-options.mdx#--outputfilestrategy) | Determines how output files are generated. | -| [`membersWithOwnFile`](./options/file-options.mdx#--memberswithownfile) | Determines which members are exported to their own file. | -| [`flattenOutputFiles`](./options/file-options.mdx#--flattenoutputfiles) | Flatten output files to a single directory. | -| [`fileExtension`](./options/file-options.mdx#--fileextension) | Specify the file extension for generated output files. | -| [`entryFileName`](./options/file-options.mdx#--entryfilename) | The file name of the entry page. | -| [`modulesFileName`](./options/file-options.mdx#--modulesfilename) | The file name of the separate modules / index page. | -| [`mergeReadme`](./options/file-options.mdx#--mergereadme) | Appends the documentation index page to the readme page. | -| [`entryModule`](./options/file-options.mdx#--entrymodule) | The name of a module that should act as the root page for the documentation. | -| [`excludeScopesInPaths`](./options/file-options.mdx#--excludescopesinpaths) | Exclude writing @ scope directories in paths. | +| Option | Description | +| ------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| [`outputFileStrategy`](./options/file-options.mdx#outputfilestrategy) | Determines how output files are generated. | +| [`membersWithOwnFile`](./options/file-options.mdx#memberswithownfile) | Determines which members are exported to their own file. | +| [`flattenOutputFiles`](./options/file-options.mdx#flattenoutputfiles) | Flatten output files to a single directory. | +| [`fileExtension`](./options/file-options.mdx#fileextension) | Specify the file extension for generated output files. | +| [`entryFileName`](./options/file-options.mdx#entryfilename) | The file name of the entry page. | +| [`modulesFileName`](./options/file-options.mdx#modulesfilename) | The file name of the separate modules / index page. | +| [`mergeReadme`](./options/file-options.mdx#mergereadme) | Appends the documentation index page to the readme page. | +| [`entryModule`](./options/file-options.mdx#entrymodule) | The name of a module that should act as the root page for the documentation. | +| [`excludeScopesInPaths`](./options/file-options.mdx#excludescopesinpaths) | Exclude writing @ scope directories in paths. | ## Display Options Options that are used to configure how the output is structured and displayed. -| Option | Description | -| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| [`hidePageHeader`](./options/display-options.mdx#--hidepageheader) | Do not print page header. | -| [`hideBreadcrumbs`](./options/display-options.mdx#--hidebreadcrumbs) | Do not print breadcrumbs. | -| [`hidePageTitle`](./options/display-options.mdx#--hidepagetitle) | Do not print page title. | -| [`hideGroupHeadings`](./options/display-options.mdx#--hidegroupheadings) | Excludes grouping by kind so all members are rendered at the same level. | -| [`useCodeBlocks`](./options/display-options.mdx#--usecodeblocks) | Wraps signatures and declarations in code blocks. | -| [`expandObjects`](./options/display-options.mdx#--expandobjects) | Expand objects inside declarations. | -| [`expandParameters`](./options/display-options.mdx#--expandparameters) | Expand parameters in signature parentheses to display type information. | -| [`blockTagsPreserveOrder`](./options/display-options.mdx#--blocktagspreserveorder) | Specifies comment block tags that should preserve their position. | -| [`indexFormat`](./options/display-options.mdx#--indexformat) | Sets the format of index items. | -| [`parametersFormat`](./options/display-options.mdx#--parametersformat) | Sets the format of parameter and type parameter groups. | -| [`interfacePropertiesFormat`](./options/display-options.mdx#--interfacepropertiesformat) | Sets the format of property groups for interfaces. | -| [`classPropertiesFormat`](./options/display-options.mdx#--classpropertiesformat) | Sets the format of property groups for classes. | -| [`enumMembersFormat`](./options/display-options.mdx#--enummembersformat) | Sets the format of enumeration members. | -| [`propertyMembersFormat`](./options/display-options.mdx#--propertymembersformat) | Sets the format of style for property members for interfaces and classes. | -| [`typeDeclarationFormat`](./options/display-options.mdx#--typedeclarationformat) | Sets the format of style for type declaration members. | -| [`typeDeclarationVisibility`](./options/display-options.mdx#--typedeclarationvisibility) | Set the visibility level for type declaration documentation. | -| [`tableColumnSettings`](./options/display-options.mdx#--tablecolumnsettings) | Control how table columns are configured and displayed. | +| Option | Description | +| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| [`hidePageHeader`](./options/display-options.mdx#hidepageheader) | Do not print page header. | +| [`hideBreadcrumbs`](./options/display-options.mdx#hidebreadcrumbs) | Do not print breadcrumbs. | +| [`hidePageTitle`](./options/display-options.mdx#hidepagetitle) | Do not print page title. | +| [`hideGroupHeadings`](./options/display-options.mdx#hidegroupheadings) | Excludes grouping by kind so all members are rendered at the same level. | +| [`useCodeBlocks`](./options/display-options.mdx#usecodeblocks) | Wraps signatures and declarations in code blocks. | +| [`expandObjects`](./options/display-options.mdx#expandobjects) | Expand objects inside declarations. | +| [`expandParameters`](./options/display-options.mdx#expandparameters) | Expand parameters in signature parentheses to display type information. | +| [`blockTagsPreserveOrder`](./options/display-options.mdx#blocktagspreserveorder) | Specifies comment block tags that should preserve their position. | +| [`indexFormat`](./options/display-options.mdx#indexformat) | Sets the format of index items. | +| [`parametersFormat`](./options/display-options.mdx#parametersformat) | Sets the format of parameter and type parameter groups. | +| [`interfacePropertiesFormat`](./options/display-options.mdx#interfacepropertiesformat) | Sets the format of property groups for interfaces. | +| [`classPropertiesFormat`](./options/display-options.mdx#classpropertiesformat) | Sets the format of property groups for classes. | +| [`enumMembersFormat`](./options/display-options.mdx#enummembersformat) | Sets the format of enumeration members. | +| [`propertyMembersFormat`](./options/display-options.mdx#propertymembersformat) | Sets the format of style for property members for interfaces and classes. | +| [`typeDeclarationFormat`](./options/display-options.mdx#typedeclarationformat) | Sets the format of style for type declaration members. | +| [`typeDeclarationVisibility`](./options/display-options.mdx#typedeclarationvisibility) | Set the visibility level for type declaration documentation. | +| [`tableColumnSettings`](./options/display-options.mdx#tablecolumnsettings) | Control how table columns are configured and displayed. | ## Utility Options Options that are used for general configuration and utility purposes. -| Option | Description | -| ---------------------------------------------------------------------------------- | ------------------------------------------------------- | -| [`formatWithPrettier`](./options/utility-options.mdx#--formatwithprettier) | Apply additional output formatting with Prettier. | -| [`prettierConfigFile`](./options/utility-options.mdx#--prettierconfigfile) | Specify a custom Prettier configuration file location. | -| [`sanitizeComments`](./options/utility-options.mdx#--sanitizecomments) | Sanitize HTML and JSX inside JsDoc comments. | -| [`publicPath`](./options/utility-options.mdx#--publicpath) | Specify the base path for all urls. | -| [`anchorPrefix`](./options/utility-options.mdx#--anchorprefix) | Custom anchor prefix when anchoring to in-page symbols. | -| [`useHTMLEncodedBrackets`](./options/utility-options.mdx#--usehtmlencodedbrackets) | Use HTML encoded entities for angle brackets. | -| [`useHTMLAnchors`](./options/utility-options.mdx#--usehtmlanchors) | Add HTML anchors to page headings. | -| [`preserveAnchorCasing`](./options/utility-options.mdx#--preserveanchorcasing) | Preserve anchor casing when generating link to symbols. | -| [`pageTitleTemplates`](./options/utility-options.mdx#--pagetitletemplates) | Change specific text placeholders in the template. | +| Option | Description | +| -------------------------------------------------------------------------------- | ------------------------------------------------------- | +| [`formatWithPrettier`](./options/utility-options.mdx#formatwithprettier) | Apply additional output formatting with Prettier. | +| [`prettierConfigFile`](./options/utility-options.mdx#prettierconfigfile) | Specify a custom Prettier configuration file location. | +| [`sanitizeComments`](./options/utility-options.mdx#sanitizecomments) | Sanitize HTML and JSX inside JsDoc comments. | +| [`publicPath`](./options/utility-options.mdx#publicpath) | Specify the base path for all urls. | +| [`anchorPrefix`](./options/utility-options.mdx#anchorprefix) | Custom anchor prefix when anchoring to in-page symbols. | +| [`useHTMLEncodedBrackets`](./options/utility-options.mdx#usehtmlencodedbrackets) | Use HTML encoded entities for angle brackets. | +| [`useHTMLAnchors`](./options/utility-options.mdx#usehtmlanchors) | Add HTML anchors to page headings. | +| [`preserveAnchorCasing`](./options/utility-options.mdx#preserveanchorcasing) | Preserve anchor casing when generating link to symbols. | +| [`pageTitleTemplates`](./options/utility-options.mdx#pagetitletemplates) | Change specific text placeholders in the template. | diff --git a/docs/pages/docs/options/display-options.mdx b/docs/pages/docs/options/display-options.mdx index e96dc36e2..87150528b 100644 --- a/docs/pages/docs/options/display-options.mdx +++ b/docs/pages/docs/options/display-options.mdx @@ -4,7 +4,7 @@ import { Callout, FileTree } from "nextra/components"; Options that are used to configure how the output is structured and displayed. -## --hidePageHeader +## hidePageHeader Do not print page header. @@ -16,7 +16,7 @@ Options that are used to configure how the output is structured and displayed. } ``` -## --hideBreadcrumbs +## hideBreadcrumbs Do not print breadcrumbs. @@ -28,7 +28,7 @@ Options that are used to configure how the output is structured and displayed. } ``` -## --hidePageTitle +## hidePageTitle Do not print page title. @@ -40,7 +40,7 @@ Options that are used to configure how the output is structured and displayed. } ``` -## --hideGroupHeadings +## hideGroupHeadings Excludes grouping by kind so all members are rendered at the same level. @@ -58,7 +58,7 @@ This creates a flat structure where all members are displayed at the same headin } ``` -## --useCodeBlocks +## useCodeBlocks Wraps signatures and declarations in code blocks. @@ -76,7 +76,7 @@ As a work around the [`@link`](https://typedoc.org/tags/link/) tag can be be use } ``` -## --expandObjects +## expandObjects Expand objects inside declarations. @@ -92,7 +92,7 @@ This option should be set when a full object representation is preferred. } ``` -## --expandParameters +## expandParameters Expand parameters in signature parentheses to display type information. @@ -110,7 +110,7 @@ This option should be set when a full type representation is preferred. } ``` -## --blockTagsPreserveOrder +## blockTagsPreserveOrder Specifies comment block tags that should preserve their position. @@ -130,7 +130,7 @@ Use this option to preserve the position of the tag content with the comment sum } ``` -## --indexFormat +## indexFormat Sets the format of index items. @@ -141,7 +141,7 @@ This option renders index items either as a simple unordered list or in a table. When table style is selected the following will be the behaviour: - For a **members index**, a description column will be added with key `table` - the first paragraph of the comment summary, or key `htmlTable` - the entire comment contents. -- For a **packages index**, (when `--entryPointStrategy` equals `packages`), the package.json description will be displayed with an additional "Version" column (when `--includeVersion` equals true). +- For a **packages index**, (when `entryPointStrategy` equals `packages`), the package.json description will be displayed with an additional "Version" column (when `--includeVersion` equals true). - For a **documents index** a description column will be added to the table printing the `"description"` frontmatter variable. ```json filename="typedoc.json" @@ -150,7 +150,7 @@ When table style is selected the following will be the behaviour: } ``` -## --parametersFormat +## parametersFormat Sets the format of parameter and type parameter groups. @@ -170,7 +170,7 @@ This option specifies the output format for parameters and type parameters of fu } ``` -## --interfacePropertiesFormat +## interfacePropertiesFormat Sets the format of property groups for interfaces. @@ -188,7 +188,7 @@ This option specifies the output format for interface properties: } ``` -## --classPropertiesFormat +## classPropertiesFormat Sets the format of property groups for classes. @@ -206,7 +206,7 @@ This option specifies the output format for class properties: } ``` -## --enumMembersFormat +## enumMembersFormat Sets the format of enumeration members. @@ -224,7 +224,7 @@ This option specifies the output format for enumeration members: } ``` -## --propertyMembersFormat +## propertyMembersFormat Sets the format of style for property members for interfaces and classes. @@ -246,7 +246,7 @@ Note this options will only take effect when the property declaration is rendere } ``` -## --typeDeclarationFormat +## typeDeclarationFormat Sets the format of style for type declaration members. @@ -266,7 +266,7 @@ This option specifies the output format for type declaration of variables and ty } ``` -## --typeDeclarationVisibility +## typeDeclarationVisibility Set the visibility level for type declaration documentation. @@ -285,7 +285,7 @@ Configures the visibility level for type declaration documentation. Applies to b } ``` -## --tableColumnSettings +## tableColumnSettings Control how table columns are configured and displayed. diff --git a/docs/pages/docs/options/file-options.mdx b/docs/pages/docs/options/file-options.mdx index 060cc82e6..850b24317 100644 --- a/docs/pages/docs/options/file-options.mdx +++ b/docs/pages/docs/options/file-options.mdx @@ -4,48 +4,57 @@ import { Callout, FileTree } from "nextra/components"; Options that are used to configure how files are output. -## --outputFileStrategy +## outputFileStrategy Determines how output files are generated. > Accepts either `"members"` or `"modules"`. Defaults to `"members"`. -TypeDoc creates documentation according to exports derived from the given [`--entryPointsStrategy`](https://typedoc.org/options/input/#entrypointstrategy) TypeDoc configuration. +TypeDoc generates documentation models according to exports derived from the given +[`entryPoints`](https://typedoc.org/documents/Options.Input.html#entrypoints) and [`entryPointsStrategy`](https://typedoc.org/documents/Options.Input.html#entrypointstrategy) TypeDoc configurations. -This option provides some flexibility as to how output files are generated. +This option provides some flexibility as to how files are generated by organising how these exports are organized on individual pages. +Note that each module and namespace will at a minimum have its own page. -It is also possible to further refine what members are exported to individual files with the `membersWithOwnFile` option. - -The following keys are available: +The available keys are `"members"` (default), `"categories"`, and `"modules"`. **"members"** Generates an individual file for each exported module member. This is the standard behavior of the HTML theme and the default setting of the plugin. -``` - ├── README.md - ├── module-a/ - │ ├── classes/ - │ │ ├── ClassA.md - │ │ └── ClassB.md - │ └── functions/ - │ │ ├── FunctionA.md - │ │ └── FunctionB.md - └── module-b/ - └── classes/ - ├── ClassA.md - └── ClassB.md -``` + + + + + + + + + + + + + + + + + + + + +It is also possible to further refine what members are exported to individual files with the [`membersWithOwnFile`](#memberswithownfile) option. **"modules"** -Generates a single file for every Module or Namespace where all members are hoisted to a single module file. This creates a flat navigation structure and reduces the amount of files generated. +Generates a single file for every module and namespace where all module members are hoisted to a single file. +This creates a flat navigation structure and reduces the amount of files generated. -``` - ├── README.md - ├── module-a.md - └── module-b.md -``` +{" "} + + + + + ```json filename="typedoc.json" { @@ -53,7 +62,7 @@ Generates a single file for every Module or Namespace where all members are hois } ``` -## --membersWithOwnFile +## membersWithOwnFile Determines which members are exported to their own file. @@ -63,7 +72,7 @@ Generates a single file for every Module or Namespace where all members are hois This option is useful when only specific types of members should be exported to a single file. -Ignored when `--outputFileStrategy` is equal to `"modules"` +This option only takes effect when [`outputFileStrategy`](#outputfilestrategy) is equal to `"members"` ```json filename="typedoc.json" { @@ -71,7 +80,7 @@ Ignored when `--outputFileStrategy` is equal to `"modules"` } ``` -## --flattenOutputFiles +## flattenOutputFiles Flatten output files to a single directory. @@ -81,34 +90,16 @@ By default output files are generated in a directory structure that mirrors the This option will flatten the output files to a single directory as follows: -Default output: - -``` - ├── README.md - ├── module-a/ - │ ├── classes/ - │ │ ├── ClassA.md - │ │ └── ClassB.md - │ └── functions/ - │ │ ├── FunctionA.md - │ │ └── FunctionB.md - └── module-b/ - └── classes/ - ├── ClassA.md - └── ClassB.md -``` - -Flattened output: - -``` - ├── README.md - ├── module-a.Class.ClassA.md - ├── module-a.Class.ClassB.md - ├── module-a.Function.functionA.md - ├── module-a.Function.functionB.md - ├── module-b.Class.ClassA.md - └── module-b.Class.ClassB.md -``` +{" "} + + + + + + + + + ```json filename="typedoc.json" { @@ -116,7 +107,7 @@ Flattened output: } ``` -## --fileExtension +## fileExtension Specify the file extension for generated output files. @@ -132,7 +123,7 @@ Typically Markdown files are recognised by the `.md` or `.markdown` file extensi } ``` -## --entryFileName +## entryFileName The file name of the entry page. @@ -155,7 +146,7 @@ The content of root documentation file will be resolved in the following order: } ``` -## --modulesFileName +## modulesFileName The file name of the separate modules / index page. @@ -171,7 +162,7 @@ Please note this option is not applicable when [`--readme`](https://typedoc.org/ } ``` -## --mergeReadme +## mergeReadme Appends the documentation index page to the readme page. @@ -191,7 +182,7 @@ This option has no effect when [`--readme`](https://typedoc.org/options/input/#r } ``` -## --entryModule +## entryModule The name of a module that should act as the root page for the documentation. @@ -211,7 +202,7 @@ Please note a separate modules index page will not be generated, therefore would } ``` -## --excludeScopesInPaths +## excludeScopesInPaths Exclude writing @ scope directories in paths. @@ -225,18 +216,19 @@ The following will be the directory structure for packages named `@scope/package Output when set to `false` (default): -``` - └──@scope/ - ├── package-1/ - └── package-2/ -``` + + + + + + Output when set to `true`: -``` - ├── package-1/ - └── package-2/ -``` + + + + Ignored if `flattenOutputFiles` is set to `true`. diff --git a/docs/pages/docs/options/utility-options.mdx b/docs/pages/docs/options/utility-options.mdx index 152e31844..454da25d8 100644 --- a/docs/pages/docs/options/utility-options.mdx +++ b/docs/pages/docs/options/utility-options.mdx @@ -4,7 +4,7 @@ import { Callout, FileTree } from "nextra/components"; Options that are used for general configuration and utility purposes. -## --formatWithPrettier +## formatWithPrettier Apply additional output formatting with Prettier. @@ -27,7 +27,7 @@ Please note that Prettier is not a dependency of this plugin and must be install } ``` -## --prettierConfigFile +## prettierConfigFile Specify a custom Prettier configuration file location. @@ -47,7 +47,7 @@ Please note this option is only applicable when `formatWithPrettier` is set to ` } ``` -## --sanitizeComments +## sanitizeComments Sanitize HTML and JSX inside JsDoc comments. @@ -71,7 +71,7 @@ This option would typically be used when source code comes from an external sour } ``` -## --publicPath +## publicPath Specify the base path for all urls. @@ -85,7 +85,7 @@ If undefined all urls will be relative. } ``` -## --anchorPrefix +## anchorPrefix Custom anchor prefix when anchoring to in-page symbols. @@ -101,7 +101,7 @@ This option should be used when parsers require a custom anchor prefix. } ``` -## --useHTMLEncodedBrackets +## useHTMLEncodedBrackets Use HTML encoded entities for angle brackets. @@ -116,7 +116,7 @@ However, using HTML entities (`<` and `>`) might be preferable to avoid an } ``` -## --useHTMLAnchors +## useHTMLAnchors Add HTML anchors to page headings. @@ -134,7 +134,7 @@ Note that HTML anchors will be added to linkable symbols listed in table rows as } ``` -## --preserveAnchorCasing +## preserveAnchorCasing Preserve anchor casing when generating link to symbols. @@ -152,7 +152,7 @@ This option can be used for engines that require the preservation of anchor link } ``` -## --pageTitleTemplates +## pageTitleTemplates Change specific text placeholders in the template. diff --git a/docs/pages/api-docs/Document.Utilizing-Navigation.mdx b/docs/pages/docs/utilizing-navigation.md similarity index 69% rename from docs/pages/api-docs/Document.Utilizing-Navigation.mdx rename to docs/pages/docs/utilizing-navigation.md index 61cd947f2..1ff6b10b3 100644 --- a/docs/pages/api-docs/Document.Utilizing-Navigation.mdx +++ b/docs/pages/docs/utilizing-navigation.md @@ -2,15 +2,11 @@ By default navigation is not present but can be consumed programmatically. This is useful if you want to provide a custom sidebar/navigation implementation (if relevant to your environment). -## Usage - -### Configuration - -You can configure the navigation structure by utilizing the TypeDoc [--navigation](https://typedoc.org/options/output/#navigation) option, which should provide the same structure navigation as the default HTML theme. +You can configure the navigation structure by utilizing the TypeDoc [navigation](https://typedoc.org/documents/Options.Output.html#navigation) option, which should provide the same structure navigation as the default HTML theme. -### Consuming navigation JSON +## Usage -The navigation can be accessed by utilizing the `postRenderAsyncJobs` on the renderer. +The navigation can be accessed by utilizing the [`postRenderAsyncJobs`](/docs/customizing-output#async-jobs) on the renderer. The navigation is returned as `JSON` and can be mapped to a custom structure and written to a file. @@ -32,8 +28,3 @@ export function load(app) { }); } ``` - -## See - -- [MarkdownRendererEvent](/api-docs/Class.MarkdownRendererEvent.mdx) -- [NavigationItem](/api-docs/Interface.NavigationItem.mdx) diff --git a/docs/pages/docs/versioning.mdx b/docs/pages/docs/versioning.mdx index ee6bfe2e8..0628729ed 100644 --- a/docs/pages/docs/versioning.mdx +++ b/docs/pages/docs/versioning.mdx @@ -16,7 +16,7 @@ Version compatibility for the plugin and TypeDoc is as follows: | Plugin | TypeDoc | Node | TypeScript | | ------------- | ------- | ----- | ------------- | -| 4.3.x | 0.27.x | >= 18 | 5.0.x - 5.7.x | +| 4.3.x - 4.4.x | 0.27.x | >= 18 | 5.0.x - 5.7.x | | 4.1.x - 4.2.x | 0.26.x | >= 18 | 4.6.x - 5.5.x | | 4.0.x | 0.25.x | >= 16 | 4.6.x - 5.4.x | diff --git a/docs/public/schema.json b/docs/public/schema.json index 351b1d780..c83c468d7 100644 --- a/docs/public/schema.json +++ b/docs/public/schema.json @@ -16,7 +16,7 @@ "items": { "type": "string" }, - "description": "[typedoc-plugin-markdown] Specifies comment block tags that should preserve their position in relation to the comment summary.", + "description": "[typedoc-plugin-markdown] Specifies comment block tags that should preserve their position.", "default": [] }, "classPropertiesFormat": { @@ -84,7 +84,7 @@ }, "hideGroupHeadings": { "type": "boolean", - "description": "[typedoc-plugin-markdown] Excludes grouping by kind so all members are rendered and sorted at the same level." + "description": "[typedoc-plugin-markdown] Excludes grouping by kind so all members are rendered at the same level." }, "hidePageHeader": { "type": "boolean", @@ -127,7 +127,7 @@ "TypeAlias" ] }, - "description": "[typedoc-plugin-markdown] Determines which members are exported to their own file when `outputFileStrategy` equals `members`.", + "description": "[typedoc-plugin-markdown] Determines which members are exported to their own file.", "default": [ "Enum", "Variable", @@ -436,7 +436,7 @@ }, "useHTMLAnchors": { "type": "boolean", - "description": "[typedoc-plugin-markdown] Add HTML named anchors to headings and table rows." + "description": "[typedoc-plugin-markdown] Add HTML anchors to page headings." }, "useHTMLEncodedBrackets": { "type": "boolean", diff --git a/packages/typedoc-plugin-markdown/package.json b/packages/typedoc-plugin-markdown/package.json index c3bd75283..d4babd385 100644 --- a/packages/typedoc-plugin-markdown/package.json +++ b/packages/typedoc-plugin-markdown/package.json @@ -20,9 +20,7 @@ "pretest": "npm run fixtures -- -isCI", "test": "npm run validate && jest", "test:update": "npm run build-and-run && npm run validate && jest -u", - "playground": "npm run build && typedoc --options ./playground/typedoc.json", - "schema": "tsx ./.scripts/schema/generate-schema.ts", - "docs": "npm run build && typedoc --options ./typedoc.public.json" + "schema": "tsx ./.scripts/schema/generate-schema.ts" }, "author": "Thomas Grey", "license": "MIT", diff --git a/packages/typedoc-plugin-markdown/src/options/declarations.ts b/packages/typedoc-plugin-markdown/src/options/declarations.ts index b26b55050..9dc1d7bbe 100644 --- a/packages/typedoc-plugin-markdown/src/options/declarations.ts +++ b/packages/typedoc-plugin-markdown/src/options/declarations.ts @@ -32,42 +32,50 @@ import { } from './maps.js'; /** - * TypeDoc creates documentation according to exports derived from the given [`--entryPointsStrategy`](https://typedoc.org/options/input/#entrypointstrategy) TypeDoc configuration. + * TypeDoc generates documentation models according to exports derived from the given + * [`entryPoints`](https://typedoc.org/documents/Options.Input.html#entrypoints) and [`entryPointsStrategy`](https://typedoc.org/documents/Options.Input.html#entrypointstrategy) TypeDoc configurations. * - * This option provides some flexibility as to how output files are generated. + * This option provides some flexibility as to how files are generated by organising how these exports are organized on individual pages. + * Note that each module and namespace will at a minimum have its own page. * - * It is also possible to further refine what members are exported to individual files with the `membersWithOwnFile` option. - * - * The following keys are available: + * The available keys are `"members"` (default) and `"modules"`. * * **"members"** * * Generates an individual file for each exported module member. This is the standard behavior of the HTML theme and the default setting of the plugin. * - * ``` - * ├── README.md - * ├── module-a/ - * │ ├── classes/ - * │ │ ├── ClassA.md - * │ │ └── ClassB.md - * │ └── functions/ - * │ │ ├── FunctionA.md - * │ │ └── FunctionB.md - * └── module-b/ - * └── classes/ - * ├── ClassA.md - * └── ClassB.md - * ``` + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * It is also possible to further refine what members are exported to individual files with the [`membersWithOwnFile`](#memberswithownfile) option. * * **"modules"** * - * Generates a single file for every Module or Namespace where all members are hoisted to a single module file. This creates a flat navigation structure and reduces the amount of files generated. + * Generates a single file for every module and namespace where all module members are hoisted to a single file. + * This creates a flat navigation structure and reduces the amount of files generated. * - * ``` - * ├── README.md - * ├── module-a.md - * └── module-b.md - * ``` + * + * + * + * + * * * @category File */ @@ -81,7 +89,7 @@ export const outputFileStrategy: Partial = { /** * This option is useful when only specific types of members should be exported to a single file. * - * Ignored when `--outputFileStrategy` is equal to `"modules"` + * This option only takes effect when [`outputFileStrategy`](#outputfilestrategy) is equal to `"members"` * * @example ["Class", "Enum", "Interface"] * @@ -110,34 +118,15 @@ export const membersWithOwnFile: Partial = { * * This option will flatten the output files to a single directory as follows: * - * Default output: - * - * ``` - * ├── README.md - * ├── module-a/ - * │ ├── classes/ - * │ │ ├── ClassA.md - * │ │ └── ClassB.md - * │ └── functions/ - * │ │ ├── FunctionA.md - * │ │ └── FunctionB.md - * └── module-b/ - * └── classes/ - * ├── ClassA.md - * └── ClassB.md - * ``` - * - * Flattened output: - * - * ``` - * ├── README.md - * ├── module-a.Class.ClassA.md - * ├── module-a.Class.ClassB.md - * ├── module-a.Function.functionA.md - * ├── module-a.Function.functionB.md - * ├── module-b.Class.ClassA.md - * └── module-b.Class.ClassB.md - * ``` + * + * + * + * + * + * + * + * + * * * @category File */ @@ -245,18 +234,19 @@ export const entryModule: Partial = { * * Output when set to `false` (default): * - * ``` - * └──@scope/ - * ├── package-1/ - * └── package-2/ - * ``` + * + * + * + * + * + * * * Output when set to `true`: * - * ``` - * ├── package-1/ - * └── package-2/ - * ``` + * + * + * + * * * Ignored if `flattenOutputFiles` is set to `true`. * @@ -392,7 +382,7 @@ export const blockTagsPreserveOrder: Partial = { * When table style is selected the following will be the behaviour: * * - For a **members index**, a description column will be added with key `table` - the first paragraph of the comment summary, or key `htmlTable` - the entire comment contents. - * - For a **packages index**, (when `--entryPointStrategy` equals `packages`), the package.json description will be displayed with an additional "Version" column (when `--includeVersion` equals true). + * - For a **packages index**, (when `entryPointStrategy` equals `packages`), the package.json description will be displayed with an additional "Version" column (when `--includeVersion` equals true). * - For a **documents index** a description column will be added to the table printing the `"description"` frontmatter variable. * * @category Display diff --git a/packages/typedoc-plugin-markdown/src/public-api.ts b/packages/typedoc-plugin-markdown/src/public-api.ts index 8748de9e5..605fbd217 100644 --- a/packages/typedoc-plugin-markdown/src/public-api.ts +++ b/packages/typedoc-plugin-markdown/src/public-api.ts @@ -1,10 +1,5 @@ /** * The public API of typedoc-plugin-markdown exposes some classes and types that can be used to customize the output of the plugin. - * If you are interested more generally in the TypeDoc API please visit [https://typedoc.org](https://typedoc.org/api/). - * - * @document ../supporting-docs/public/local-plugins.md - * @document ../supporting-docs/public/customizing-output.md - * @document ../supporting-docs/public/utilizing-navigation.md * * @module */ diff --git a/packages/typedoc-plugin-markdown/supporting-docs/public/customizing-output.md b/packages/typedoc-plugin-markdown/supporting-docs/public/customizing-output.md deleted file mode 100644 index 81bbdcfd9..000000000 --- a/packages/typedoc-plugin-markdown/supporting-docs/public/customizing-output.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -title: Customizing Output -description: How to extend and customize output. ---- - -# Customizing Output - -It is possible to customize the output of the generated markdown files by creating local plugins. -See the [Local Plugins](/api-docs/Document.Local-Plugins) guide for implementation details. - -## Hooks - -Hooks allows strings to be injected into the output in specific locations and are the most basic form of customization. - -### Example - -```ts filename="custom-plugin.mjs" -// @ts-check -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app) { - app.renderer.markdownHooks.on('page.end', () => `**Generated using \`page.end\` hook**`); -} -``` - -### See - -- {@link MarkdownRendererHooks} - -## Events - -Events are more powerful than hooks and allow for more complex customizations and provide a context that can be used to modify the output. - -### Page Events - -Page events emitted before and after the markdown of each page is rendered. -You would typically use this event to modify content of a page. - -#### Example - -```ts filename="custom-plugin.mjs" -// @ts-check -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app) { - app.renderer.on(MarkdownPageEvent.BEGIN, (page) => { - page.contents = page.contents.replace('foo', 'bar'); - }); -} -``` - -#### See - -- [MarkdownPageEvent](/api-docs/Class.MarkdownPageEvent). - -### Renderer Events - -Renderer events are emitted at the beginning (before pages are rendered) and end (after pages are rendered) of the rendering process. -You could typically use this event to modify urls or navigation structure. - -#### Example - -```ts filename="custom-plugin.mjs" -// @ts-check -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app) { - app.renderer.on(MarkdownRendererEvent.BEGIN, (renderer) => { - ... - }); -} -``` - -#### See - -- [MarkdownRendererEvent](/api-docs/Class.MarkdownRendererEvent). - -## Async Jobs - -Async jobs are used to perform asynchronous tasks before or after rendering with a provided context. - -```ts filename="custom-plugin.mjs" -// @ts-check -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app: MarkdownApplication) { - app.renderer.preRenderAsyncJobs.push(async (renderer) => { - await doSomethingAsync(renderer); - }); - - app.renderer.postRenderAsyncJobs.push(async (renderer) => { - await doSomethingAsync(renderer); - }); -} -``` diff --git a/packages/typedoc-plugin-markdown/supporting-docs/public/local-plugins.md b/packages/typedoc-plugin-markdown/supporting-docs/public/local-plugins.md deleted file mode 100644 index 36c297cb1..000000000 --- a/packages/typedoc-plugin-markdown/supporting-docs/public/local-plugins.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: Local Plugins -description: How to write local plugins to consume APIs. ---- - -# Local plugins - -Plugins are the building blocks for extending the TypeDoc output. Plugins export a load function with context of the resolved application. - -Here is a basic plugin skeleton: - -```js filename="local-plugins/my-custom-plugin.mjs" -// @ts-check - -import { MarkdownApplication } from 'typedoc-plugin-markdown'; - -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app) { - // do something with app instance -} -``` - -The plugin can then be consumed by adding the path to the plugin in your `typedoc.json` file: - -```json filename="typedoc.json" -{ - "plugin": ["typedoc-plugin-markdown", "./local-plugins/my-custom-plugin.mjs"] -} -``` - -Note plugins must be consumed as ESM. - -## See - -- [Writing a TypeDoc plugin](https://typedoc.org/documents/Development.Plugins.html) diff --git a/packages/typedoc-plugin-markdown/supporting-docs/public/utilizing-navigation.md b/packages/typedoc-plugin-markdown/supporting-docs/public/utilizing-navigation.md deleted file mode 100644 index 7318fa22a..000000000 --- a/packages/typedoc-plugin-markdown/supporting-docs/public/utilizing-navigation.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Utilizing Navigation -description: How to create a custom navigation structure. ---- - -# Utilizing Navigation - -By default navigation is not present but can be consumed programmatically. This is useful if you want to provide a custom sidebar/navigation implementation (if relevant to your environment). - -## Usage - -### Configuration - -You can configure the navigation structure by utilizing the TypeDoc [--navigation](https://typedoc.org/options/output/#navigation) option, which should provide the same structure navigation as the default HTML theme. - -### Consuming navigation JSON - -The navigation can be accessed by utilizing the `postRenderAsyncJobs` on the renderer. - -The navigation is returned as `JSON` and can be mapped to a custom structure and written to a file. - -```ts filename="custom-plugin.mjs" -// @ts-check - -import { MarkdownApplication } from 'typedoc-plugin-markdown'; - -/** - * @param {import('typedoc-plugin-markdown').MarkdownApplication} app - */ -export function load(app) { - app.renderer.postRenderAsyncJobs.push(async (renderer) => { - // The navigation JSON structure is available on the navigation object. - const navigation = renderer.navigation; - - // This can be parsed to something else or written straight to a file: - fs.writeFileSync('navigation.json', JSON.stringify(navigation)); - }); -} -``` - -## See - -- {@link MarkdownRendererEvent} -- {@link NavigationItem} diff --git a/packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/custom-theme.mjs b/packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/custom-theme.mjs index 6a8b687bc..5b963d878 100644 --- a/packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/custom-theme.mjs +++ b/packages/typedoc-plugin-markdown/test/fixtures/custom-plugins/custom-theme.mjs @@ -49,12 +49,12 @@ export function load(app) { app.renderer.markdownHooks.on( 'index.page.begin', - () => '> `page.index.begin` hook', + () => '> `index.page.begin` hook', ); app.renderer.markdownHooks.on( 'index.page.end', - () => '> **Generated using `page.index.end` hook**', + () => '> **Generated using `index.page.end` hook**', ); app.renderer.preRenderAsyncJobs.push(async (renderer) => { diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/customization.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/customization.spec.ts.snap index 0b74f83d1..ff56a23f1 100644 --- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/customization.spec.ts.snap +++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/customization.spec.ts.snap @@ -10,7 +10,7 @@ exports[`Customization should action renderer-event-end jobs: (Output File Strat exports[`Customization should insert content from hooks and apply custom theme index page: (Output File Strategy "members") (Option Group "1") 1`] = ` "PAGE_BEGIN -> \`page.index.begin\` hook +> \`index.page.begin\` hook
My logo @@ -31,7 +31,7 @@ Some other comments - [someFunction](functions/someFunction.md) -> **Generated using \`page.index.end\` hook** +> **Generated using \`index.page.end\` hook** PAGE_END " diff --git a/packages/typedoc-plugin-markdown/typedoc.public.json b/packages/typedoc-plugin-markdown/typedoc.public.json deleted file mode 100644 index 902c544c1..000000000 --- a/packages/typedoc-plugin-markdown/typedoc.public.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "$schema": "https://typedoc-plugin-markdown.org/schema.json", - - "entryPoints": ["./src/public-api.ts"], - "out": "../../docs/pages/api-docs", - "plugin": [ - "typedoc-plugin-markdown", - "../../devtools/typedoc-plugins/typedoc-nextra.mjs", - "../../devtools/typedoc-plugins/typedoc-ignore-typeparam.mjs", - "../../devtools/typedoc-plugins/typedoc-symbols.mjs" - ], - "sortEntryPoints": false, - "name": "API", - "sort": ["required-first", "source-order"], - "includeVersion": false, - "disableSources": true, - "excludeInternal": true, - "excludeExternals": true, - "excludePrivate": true, - "outputFileStrategy": "members", - "fileExtension": ".mdx", - "publicPath": "/api-docs", - "indexFormat": "table", - "readme": "none", - "entryFileName": "index.md", - "hideBreadcrumbs": true, - "hidePageHeader": true, - "hideGroupHeadings": false, - "expandObjects": false, - "parametersFormat": "table", - "expandParameters": false, - "groupOrder": ["Documents", "Events", "Theme Classes", "Interfaces"], - "tableColumnSettings": { - "hideOverrides": true, - "hideModifiers": true, - "hideDefaults": true, - "hideSources": true, - "leftAlignHeaders": true - }, - "useCodeBlocks": false, - "pageTitleTemplates": { - "member": "{name}" - }, - "flattenOutputFiles": true, - "navigation": { - "includeCategories": true, - "includeGroups": false - } -}