typedoc-config-nick2bad4u 1.1.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package.json",
3
3
  "name": "typedoc-config-nick2bad4u",
4
- "version": "1.1.0",
4
+ "version": "2.0.0",
5
5
  "private": false,
6
6
  "description": "Shared TypeDoc config for Nick2bad4u TypeScript projects.",
7
7
  "keywords": [
@@ -38,29 +38,12 @@
38
38
  "require": null
39
39
  },
40
40
  "./typedoc.json": "./typedoc.json",
41
- "./typedoc-plugins/hash-to-bang-links.mjs": {
42
- "types": "./typedoc-plugins/hash-to-bang-links.d.mts",
43
- "import": "./typedoc-plugins/hash-to-bang-links.mjs"
44
- },
45
- "./typedoc-plugins/hash-to-bang-links-core.mjs": {
46
- "types": "./typedoc-plugins/hash-to-bang-links-core.d.mts",
47
- "import": "./typedoc-plugins/hash-to-bang-links-core.mjs"
48
- },
49
- "./typedoc-plugins/prefix-doc-links.mjs": {
50
- "types": "./typedoc-plugins/prefix-doc-links.d.mts",
51
- "import": "./typedoc-plugins/prefix-doc-links.mjs"
52
- },
53
- "./typedoc-plugins/prefix-doc-links-core.mjs": {
54
- "types": "./typedoc-plugins/prefix-doc-links-core.d.mts",
55
- "import": "./typedoc-plugins/prefix-doc-links-core.mjs"
56
- },
57
41
  "./package.json": "./package.json"
58
42
  },
59
43
  "main": "./dist/preset.js",
60
44
  "types": "./dist/preset.d.ts",
61
45
  "files": [
62
46
  "dist",
63
- "typedoc-plugins",
64
47
  "typedoc.json"
65
48
  ],
66
49
  "scripts": {
@@ -111,8 +94,10 @@
111
94
  "dependencies": {
112
95
  "typedoc-docusaurus-theme": "^1.4.2",
113
96
  "typedoc-plugin-coverage": "^4.0.3",
97
+ "typedoc-plugin-docusaurus-doc-links": "^1.0.1",
114
98
  "typedoc-plugin-dt-links": "^2.0.59",
115
99
  "typedoc-plugin-external-package-links": "^0.2.0",
100
+ "typedoc-plugin-hash-link-references": "^1.0.1",
116
101
  "typedoc-plugin-markdown": "^4.12.0",
117
102
  "typedoc-plugin-mdn-links": "^5.1.1",
118
103
  "typedoc-plugin-missing-exports": "^4.1.3",
package/typedoc.json CHANGED
@@ -40,12 +40,136 @@
40
40
  "**/node_modules/**"
41
41
  ],
42
42
  "externalSymbolLinkMappings": {
43
+ "@docusaurus/plugin-content-docs": {
44
+ "Options": "https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs",
45
+ "SidebarsConfig": "https://docusaurus.io/docs/sidebar"
46
+ },
47
+ "@docusaurus/types": {
48
+ "Config": "https://docusaurus.io/docs/api/docusaurus-config",
49
+ "LoadContext": "https://docusaurus.io/docs/api/plugin-methods",
50
+ "Plugin": "https://docusaurus.io/docs/api/plugin-methods",
51
+ "PluginConfig": "https://docusaurus.io/docs/configuration#theme-plugin-and-preset-configurations",
52
+ "PluginModule": "https://docusaurus.io/docs/api/plugin-methods",
53
+ "PresetConfig": "https://docusaurus.io/docs/configuration#theme-plugin-and-preset-configurations",
54
+ "ThemeConfig": "https://docusaurus.io/docs/api/docusaurus-config#themeconfig"
55
+ },
56
+ "@eslint/compat": {
57
+ "fixupConfigRules": "https://eslint.org/blog/2024/05/eslint-compatibility-utilities/",
58
+ "fixupPluginRules": "https://eslint.org/blog/2024/05/eslint-compatibility-utilities/",
59
+ "includeIgnoreFile": "https://eslint.org/blog/2024/05/eslint-compatibility-utilities/"
60
+ },
61
+ "@eslint/config-helpers": {
62
+ "defineConfig": "https://eslint.org/docs/latest/use/configure/configuration-files",
63
+ "globalIgnores": "https://eslint.org/docs/latest/use/configure/ignore"
64
+ },
65
+ "@playwright/test": {
66
+ "ElectronApplication": "https://playwright.dev/docs/api/class-electronapplication",
67
+ "FullConfig": "https://playwright.dev/docs/api/class-fullconfig",
68
+ "Locator": "https://playwright.dev/docs/api/class-locator",
69
+ "Page": "https://playwright.dev/docs/api/class-page",
70
+ "PlaywrightTestConfig": "https://playwright.dev/docs/test-configuration",
71
+ "_electron": "https://playwright.dev/docs/api/class-electron",
72
+ "defineConfig": "https://playwright.dev/docs/test-configuration",
73
+ "devices": "https://playwright.dev/docs/emulation",
74
+ "expect": "https://playwright.dev/docs/test-assertions",
75
+ "test": "https://playwright.dev/docs/api/class-test"
76
+ },
43
77
  "@testing-library/react": {
44
78
  "fireEvent": "https://testing-library.com/docs/dom-testing-library/api-events",
45
79
  "render": "https://testing-library.com/docs/react-testing-library/api#render",
46
80
  "screen": "https://testing-library.com/docs/queries/about#screen",
47
81
  "waitFor": "https://testing-library.com/docs/dom-testing-library/api-async#waitfor"
48
82
  },
83
+ "@types/express-serve-static-core": {
84
+ "Express": "https://expressjs.com/en/api/",
85
+ "NextFunction": "https://expressjs.com/en/guide/error-handling.html",
86
+ "Request": "https://expressjs.com/en/api/#req",
87
+ "RequestHandler": "https://expressjs.com/en/guide/routing.html",
88
+ "Response": "https://expressjs.com/en/api/#res",
89
+ "Router": "https://expressjs.com/en/api/#router"
90
+ },
91
+ "@typescript-eslint/parser": {
92
+ "ParserOptions": "https://typescript-eslint.io/packages/parser/",
93
+ "parseForESLint": "https://typescript-eslint.io/packages/parser/"
94
+ },
95
+ "@typescript-eslint/rule-tester": {
96
+ "RuleTester": "https://typescript-eslint.io/packages/rule-tester/"
97
+ },
98
+ "@typescript-eslint/type-utils": {
99
+ "getConstrainedTypeAtLocation": "https://typescript-eslint.io/packages/type-utils/",
100
+ "isTypeReferenceType": "https://typescript-eslint.io/packages/type-utils/"
101
+ },
102
+ "@typescript-eslint/utils": {
103
+ "AST_NODE_TYPES": "https://typescript-eslint.io/packages/utils/",
104
+ "AST_TOKEN_TYPES": "https://typescript-eslint.io/packages/utils/",
105
+ "ESLintUtils": "https://typescript-eslint.io/developers/custom-rules/#utils-package",
106
+ "JSONSchema": "https://typescript-eslint.io/developers/custom-rules/#rulecreator",
107
+ "TSESLint": "https://typescript-eslint.io/developers/custom-rules/#utils-package",
108
+ "TSESTree": "https://typescript-eslint.io/developers/custom-rules/#utils-package"
109
+ },
110
+ "ajv": {
111
+ "Ajv": "https://ajv.js.org/api.html",
112
+ "ErrorObject": "https://ajv.js.org/api.html#validation-errors",
113
+ "ValidateFunction": "https://ajv.js.org/api.html"
114
+ },
115
+ "axios": {
116
+ "AxiosError": "https://axios-http.com/docs/handling_errors",
117
+ "AxiosInstance": "https://axios-http.com/docs/instance",
118
+ "AxiosRequestConfig": "https://axios-http.com/docs/req_config",
119
+ "AxiosResponse": "https://axios-http.com/docs/res_schema",
120
+ "InternalAxiosRequestConfig": "https://axios-http.com/docs/req_config",
121
+ "isAxiosError": "https://axios-http.com/docs/handling_errors"
122
+ },
123
+ "commander": {
124
+ "Command": "https://github.com/tj/commander.js/blob/master/Readme.md#command",
125
+ "CommanderError": "https://github.com/tj/commander.js/blob/master/Readme.md#override-exit-and-output-handling",
126
+ "InvalidArgumentError": "https://github.com/tj/commander.js/blob/master/Readme.md#custom-option-processing",
127
+ "Option": "https://github.com/tj/commander.js/blob/master/Readme.md#options",
128
+ "program": "https://github.com/tj/commander.js/blob/master/Readme.md#quick-start"
129
+ },
130
+ "esbuild": {
131
+ "BuildOptions": "https://esbuild.github.io/api/#build",
132
+ "BuildResult": "https://esbuild.github.io/api/#build",
133
+ "Plugin": "https://esbuild.github.io/plugins/#using-plugins",
134
+ "TransformOptions": "https://esbuild.github.io/api/#transform",
135
+ "build": "https://esbuild.github.io/api/#build",
136
+ "context": "https://esbuild.github.io/api/#build",
137
+ "transform": "https://esbuild.github.io/api/#transform"
138
+ },
139
+ "eslint": {
140
+ "ESLint": "https://eslint.org/docs/latest/integrate/nodejs-api#eslint-class",
141
+ "Linter": "https://eslint.org/docs/latest/integrate/nodejs-api#linter",
142
+ "RuleTester": "https://eslint.org/docs/latest/integrate/nodejs-api#ruletester",
143
+ "SourceCode": "https://eslint.org/docs/latest/integrate/nodejs-api#sourcecode",
144
+ "loadESLint": "https://eslint.org/docs/latest/integrate/nodejs-api#loadeslint"
145
+ },
146
+ "express": {
147
+ "Express": "https://expressjs.com/en/api/",
148
+ "NextFunction": "https://expressjs.com/en/guide/error-handling.html",
149
+ "Request": "https://expressjs.com/en/api/#req",
150
+ "RequestHandler": "https://expressjs.com/en/guide/routing.html",
151
+ "Response": "https://expressjs.com/en/api/#res",
152
+ "Router": "https://expressjs.com/en/api/#router"
153
+ },
154
+ "fast-check": {
155
+ "Arbitrary": "https://fast-check.dev/docs/core-blocks/arbitraries/",
156
+ "assert": "https://fast-check.dev/docs/introduction/getting-started/",
157
+ "asyncProperty": "https://fast-check.dev/docs/core-blocks/properties/",
158
+ "constant": "https://fast-check.dev/docs/core-blocks/arbitraries/",
159
+ "integer": "https://fast-check.dev/docs/core-blocks/arbitraries/",
160
+ "oneof": "https://fast-check.dev/docs/core-blocks/arbitraries/",
161
+ "property": "https://fast-check.dev/docs/core-blocks/properties/",
162
+ "string": "https://fast-check.dev/docs/core-blocks/arbitraries/",
163
+ "test": "https://fast-check.dev/docs/tutorials/setting-up-your-test-environment/property-based-testing-with-vitest/"
164
+ },
165
+ "fastify": {
166
+ "FastifyInstance": "https://fastify.dev/docs/latest/Reference/TypeScript/",
167
+ "FastifyPluginAsync": "https://fastify.dev/docs/latest/Reference/TypeScript/#creating-type-definitions-for-a-fastify-plugin",
168
+ "FastifyPluginCallback": "https://fastify.dev/docs/latest/Reference/TypeScript/#creating-type-definitions-for-a-fastify-plugin",
169
+ "FastifyReply": "https://fastify.dev/docs/latest/Reference/TypeScript/",
170
+ "FastifyRequest": "https://fastify.dev/docs/latest/Reference/TypeScript/",
171
+ "RouteShorthandOptions": "https://fastify.dev/docs/latest/Reference/Routes/"
172
+ },
49
173
  "javascript": {
50
174
  "Array": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",
51
175
  "Boolean": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean",
@@ -61,6 +185,25 @@
61
185
  "WeakMap": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap",
62
186
  "WeakSet": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet"
63
187
  },
188
+ "jsonc-eslint-parser": {
189
+ "AST": "https://github.com/ota-meshi/jsonc-eslint-parser/blob/master/docs/AST.md",
190
+ "RuleListener": "https://github.com/ota-meshi/jsonc-eslint-parser",
191
+ "getStaticJSONValue": "https://github.com/ota-meshi/jsonc-eslint-parser",
192
+ "parseForESLint": "https://eslint.org/docs/latest/extend/custom-parsers"
193
+ },
194
+ "minimatch": {
195
+ "Minimatch": "https://github.com/isaacs/minimatch",
196
+ "MinimatchOptions": "https://github.com/isaacs/minimatch",
197
+ "minimatch": "https://github.com/isaacs/minimatch"
198
+ },
199
+ "next": {
200
+ "GetServerSideProps": "https://nextjs.org/docs/pages/api-reference/functions/get-server-side-props",
201
+ "GetStaticProps": "https://nextjs.org/docs/pages/api-reference/functions/get-static-props",
202
+ "Metadata": "https://nextjs.org/docs/app/api-reference/functions/generate-metadata",
203
+ "NextApiRequest": "https://nextjs.org/docs/pages/building-your-application/routing/api-routes",
204
+ "NextApiResponse": "https://nextjs.org/docs/pages/building-your-application/routing/api-routes",
205
+ "NextConfig": "https://nextjs.org/docs/app/api-reference/config/next-config-js"
206
+ },
64
207
  "node": {
65
208
  "Buffer": "https://nodejs.org/docs/latest/api/buffer.html#class-buffer",
66
209
  "Error": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error",
@@ -73,9 +216,27 @@
73
216
  "process": "https://nodejs.org/docs/latest/api/process.html",
74
217
  "url": "https://nodejs.org/docs/latest/api/url.html"
75
218
  },
219
+ "picocolors": {
220
+ "blue": "https://github.com/alexeyraspopov/picocolors",
221
+ "bold": "https://github.com/alexeyraspopov/picocolors",
222
+ "createColors": "https://github.com/alexeyraspopov/picocolors",
223
+ "cyan": "https://github.com/alexeyraspopov/picocolors",
224
+ "green": "https://github.com/alexeyraspopov/picocolors",
225
+ "isColorSupported": "https://github.com/alexeyraspopov/picocolors",
226
+ "red": "https://github.com/alexeyraspopov/picocolors",
227
+ "yellow": "https://github.com/alexeyraspopov/picocolors"
228
+ },
76
229
  "postcss": {
77
230
  "Plugin": "https://postcss.org/api/#plugin"
78
231
  },
232
+ "prettier": {
233
+ "Config": "https://prettier.io/docs/configuration",
234
+ "Options": "https://prettier.io/docs/options",
235
+ "Parser": "https://prettier.io/docs/plugins#parsers",
236
+ "Plugin": "https://prettier.io/docs/plugins",
237
+ "format": "https://prettier.io/docs/api.html#prettierformatsource-options",
238
+ "resolveConfig": "https://prettier.io/docs/api.html#prettierresolveconfigfileurlorpath-options"
239
+ },
79
240
  "react": {
80
241
  "Component": "https://react.dev/reference/react/Component",
81
242
  "JSX": "https://react.dev/learn/writing-markup-with-jsx",
@@ -88,6 +249,29 @@
88
249
  "useRef": "https://react.dev/reference/react/useRef",
89
250
  "useState": "https://react.dev/reference/react/useState"
90
251
  },
252
+ "react-dom": {
253
+ "createPortal": "https://react.dev/reference/react-dom/createPortal",
254
+ "flushSync": "https://react.dev/reference/react-dom/flushSync"
255
+ },
256
+ "remark": {
257
+ "remark": "https://unifiedjs.com/explore/package/remark/"
258
+ },
259
+ "rollup": {
260
+ "OutputOptions": "https://rollupjs.org/javascript-api/#outputoptions-object",
261
+ "Plugin": "https://rollupjs.org/plugin-development/",
262
+ "RollupOptions": "https://rollupjs.org/configuration-options/",
263
+ "defineConfig": "https://rollupjs.org/configuration-options/",
264
+ "rollup": "https://rollupjs.org/javascript-api/#rolluprollup",
265
+ "watch": "https://rollupjs.org/javascript-api/#rollupwatch"
266
+ },
267
+ "stylelint": {
268
+ "Config": "https://stylelint.io/user-guide/configure/",
269
+ "Plugin": "https://stylelint.io/developer-guide/plugins",
270
+ "PostcssResult": "https://stylelint.io/user-guide/node-api/",
271
+ "RuleBase": "https://stylelint.io/developer-guide/plugins",
272
+ "lint": "https://stylelint.io/user-guide/node-api/",
273
+ "stylelint": "https://stylelint.io/user-guide/node-api/"
274
+ },
91
275
  "ts-extras": {
92
276
  "arrayAt": "https://github.com/sindresorhus/ts-extras/blob/main/source/array-at.ts",
93
277
  "arrayConcat": "https://github.com/sindresorhus/ts-extras/blob/main/source/array-concat.ts",
@@ -124,11 +308,11 @@
124
308
  "stringSplit": "https://github.com/sindresorhus/ts-extras/blob/main/source/string-split.ts"
125
309
  },
126
310
  "type-fest": {
127
- "AbstractClass": "https://github.com/sindresorhus/type-fest/blob/main/source/abstract-class.d.ts",
128
- "AbstractConstructor": "https://github.com/sindresorhus/type-fest/blob/main/source/abstract-constructor.d.ts",
311
+ "AbstractClass": "https://github.com/sindresorhus/type-fest/blob/main/source/basic.d.ts",
312
+ "AbstractConstructor": "https://github.com/sindresorhus/type-fest/blob/main/source/basic.d.ts",
129
313
  "AllExtend": "https://github.com/sindresorhus/type-fest/blob/main/source/all-extend.d.ts",
130
314
  "AllUnionFields": "https://github.com/sindresorhus/type-fest/blob/main/source/all-union-fields.d.ts",
131
- "Alphanumeric": "https://github.com/sindresorhus/type-fest/blob/main/source/alphanumeric.d.ts",
315
+ "Alphanumeric": "https://github.com/sindresorhus/type-fest/blob/main/source/characters.d.ts",
132
316
  "And": "https://github.com/sindresorhus/type-fest/blob/main/source/and.d.ts",
133
317
  "ArrayElement": "https://github.com/sindresorhus/type-fest/blob/main/source/array-element.d.ts",
134
318
  "ArrayIndices": "https://github.com/sindresorhus/type-fest/blob/main/source/array-indices.d.ts",
@@ -142,18 +326,18 @@
142
326
  "CamelCase": "https://github.com/sindresorhus/type-fest/blob/main/source/camel-case.d.ts",
143
327
  "CamelCasedProperties": "https://github.com/sindresorhus/type-fest/blob/main/source/camel-cased-properties.d.ts",
144
328
  "CamelCasedPropertiesDeep": "https://github.com/sindresorhus/type-fest/blob/main/source/camel-cased-properties-deep.d.ts",
145
- "Class": "https://github.com/sindresorhus/type-fest/blob/main/source/class.d.ts",
329
+ "Class": "https://github.com/sindresorhus/type-fest/blob/main/source/basic.d.ts",
146
330
  "ConditionalExcept": "https://github.com/sindresorhus/type-fest/blob/main/source/conditional-except.d.ts",
147
331
  "ConditionalKeys": "https://github.com/sindresorhus/type-fest/blob/main/source/conditional-keys.d.ts",
148
332
  "ConditionalPick": "https://github.com/sindresorhus/type-fest/blob/main/source/conditional-pick.d.ts",
149
333
  "ConditionalPickDeep": "https://github.com/sindresorhus/type-fest/blob/main/source/conditional-pick-deep.d.ts",
150
334
  "ConditionalSimplify": "https://github.com/sindresorhus/type-fest/blob/main/source/conditional-simplify.d.ts",
151
335
  "ConditionalSimplifyDeep": "https://github.com/sindresorhus/type-fest/blob/main/source/conditional-simplify-deep.d.ts",
152
- "Constructor": "https://github.com/sindresorhus/type-fest/blob/main/source/constructor.d.ts",
336
+ "Constructor": "https://github.com/sindresorhus/type-fest/blob/main/source/basic.d.ts",
153
337
  "DelimiterCase": "https://github.com/sindresorhus/type-fest/blob/main/source/delimiter-case.d.ts",
154
338
  "DelimiterCasedProperties": "https://github.com/sindresorhus/type-fest/blob/main/source/delimiter-cased-properties.d.ts",
155
339
  "DelimiterCasedPropertiesDeep": "https://github.com/sindresorhus/type-fest/blob/main/source/delimiter-cased-properties-deep.d.ts",
156
- "DigitCharacter": "https://github.com/sindresorhus/type-fest/blob/main/source/digit-character.d.ts",
340
+ "DigitCharacter": "https://github.com/sindresorhus/type-fest/blob/main/source/characters.d.ts",
157
341
  "DistributedOmit": "https://github.com/sindresorhus/type-fest/blob/main/source/distributed-omit.d.ts",
158
342
  "DistributedPick": "https://github.com/sindresorhus/type-fest/blob/main/source/distributed-pick.d.ts",
159
343
  "EmptyObject": "https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts",
@@ -167,11 +351,11 @@
167
351
  "ExtendsStrict": "https://github.com/sindresorhus/type-fest/blob/main/source/extends-strict.d.ts",
168
352
  "ExtractRestElement": "https://github.com/sindresorhus/type-fest/blob/main/source/extract-rest-element.d.ts",
169
353
  "ExtractStrict": "https://github.com/sindresorhus/type-fest/blob/main/source/extract-strict.d.ts",
170
- "FindGlobalInstanceType": "https://github.com/sindresorhus/type-fest/blob/main/source/find-global-instance-type.d.ts",
354
+ "FindGlobalInstanceType": "https://github.com/sindresorhus/type-fest/blob/main/source/find-global-type.d.ts",
171
355
  "FindGlobalType": "https://github.com/sindresorhus/type-fest/blob/main/source/find-global-type.d.ts",
172
- "Finite": "https://github.com/sindresorhus/type-fest/blob/main/source/finite.d.ts",
356
+ "Finite": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
173
357
  "FixedLengthArray": "https://github.com/sindresorhus/type-fest/blob/main/source/fixed-length-array.d.ts",
174
- "Float": "https://github.com/sindresorhus/type-fest/blob/main/source/float.d.ts",
358
+ "Float": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
175
359
  "Get": "https://github.com/sindresorhus/type-fest/blob/main/source/get.d.ts",
176
360
  "GlobalThis": "https://github.com/sindresorhus/type-fest/blob/main/source/global-this.d.ts",
177
361
  "GreaterThan": "https://github.com/sindresorhus/type-fest/blob/main/source/greater-than.d.ts",
@@ -184,27 +368,27 @@
184
368
  "Includes": "https://github.com/sindresorhus/type-fest/blob/main/source/includes.d.ts",
185
369
  "IntClosedRange": "https://github.com/sindresorhus/type-fest/blob/main/source/int-closed-range.d.ts",
186
370
  "IntRange": "https://github.com/sindresorhus/type-fest/blob/main/source/int-range.d.ts",
187
- "Integer": "https://github.com/sindresorhus/type-fest/blob/main/source/integer.d.ts",
371
+ "Integer": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
188
372
  "InvariantOf": "https://github.com/sindresorhus/type-fest/blob/main/source/invariant-of.d.ts",
189
373
  "IsAny": "https://github.com/sindresorhus/type-fest/blob/main/source/is-any.d.ts",
190
- "IsBooleanLiteral": "https://github.com/sindresorhus/type-fest/blob/main/source/is-boolean-literal.d.ts",
191
- "IsEmptyObject": "https://github.com/sindresorhus/type-fest/blob/main/source/is-empty-object.d.ts",
374
+ "IsBooleanLiteral": "https://github.com/sindresorhus/type-fest/blob/main/source/is-literal.d.ts",
375
+ "IsEmptyObject": "https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts",
192
376
  "IsEqual": "https://github.com/sindresorhus/type-fest/blob/main/source/is-equal.d.ts",
193
377
  "IsFloat": "https://github.com/sindresorhus/type-fest/blob/main/source/is-float.d.ts",
194
378
  "IsInteger": "https://github.com/sindresorhus/type-fest/blob/main/source/is-integer.d.ts",
195
379
  "IsLiteral": "https://github.com/sindresorhus/type-fest/blob/main/source/is-literal.d.ts",
196
380
  "IsLowercase": "https://github.com/sindresorhus/type-fest/blob/main/source/is-lowercase.d.ts",
197
- "IsNegative": "https://github.com/sindresorhus/type-fest/blob/main/source/is-negative.d.ts",
381
+ "IsNegative": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
198
382
  "IsNever": "https://github.com/sindresorhus/type-fest/blob/main/source/is-never.d.ts",
199
383
  "IsNull": "https://github.com/sindresorhus/type-fest/blob/main/source/is-null.d.ts",
200
384
  "IsNullable": "https://github.com/sindresorhus/type-fest/blob/main/source/is-nullable.d.ts",
201
- "IsNumericLiteral": "https://github.com/sindresorhus/type-fest/blob/main/source/is-numeric-literal.d.ts",
385
+ "IsNumericLiteral": "https://github.com/sindresorhus/type-fest/blob/main/source/is-literal.d.ts",
202
386
  "IsOptional": "https://github.com/sindresorhus/type-fest/blob/main/source/is-optional.d.ts",
203
387
  "IsOptionalKeyOf": "https://github.com/sindresorhus/type-fest/blob/main/source/is-optional-key-of.d.ts",
204
388
  "IsReadonlyKeyOf": "https://github.com/sindresorhus/type-fest/blob/main/source/is-readonly-key-of.d.ts",
205
389
  "IsRequiredKeyOf": "https://github.com/sindresorhus/type-fest/blob/main/source/is-required-key-of.d.ts",
206
- "IsStringLiteral": "https://github.com/sindresorhus/type-fest/blob/main/source/is-string-literal.d.ts",
207
- "IsSymbolLiteral": "https://github.com/sindresorhus/type-fest/blob/main/source/is-symbol-literal.d.ts",
390
+ "IsStringLiteral": "https://github.com/sindresorhus/type-fest/blob/main/source/is-literal.d.ts",
391
+ "IsSymbolLiteral": "https://github.com/sindresorhus/type-fest/blob/main/source/is-literal.d.ts",
208
392
  "IsTuple": "https://github.com/sindresorhus/type-fest/blob/main/source/is-tuple.d.ts",
209
393
  "IsUndefined": "https://github.com/sindresorhus/type-fest/blob/main/source/is-undefined.d.ts",
210
394
  "IsUnion": "https://github.com/sindresorhus/type-fest/blob/main/source/is-union.d.ts",
@@ -230,22 +414,22 @@
230
414
  "LiteralToPrimitive": "https://github.com/sindresorhus/type-fest/blob/main/source/literal-to-primitive.d.ts",
231
415
  "LiteralToPrimitiveDeep": "https://github.com/sindresorhus/type-fest/blob/main/source/literal-to-primitive-deep.d.ts",
232
416
  "LiteralUnion": "https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts",
233
- "LowercaseLetter": "https://github.com/sindresorhus/type-fest/blob/main/source/lowercase-letter.d.ts",
417
+ "LowercaseLetter": "https://github.com/sindresorhus/type-fest/blob/main/source/characters.d.ts",
234
418
  "Merge": "https://github.com/sindresorhus/type-fest/blob/main/source/merge.d.ts",
235
419
  "MergeDeep": "https://github.com/sindresorhus/type-fest/blob/main/source/merge-deep.d.ts",
236
420
  "MergeExclusive": "https://github.com/sindresorhus/type-fest/blob/main/source/merge-exclusive.d.ts",
237
421
  "MultidimensionalArray": "https://github.com/sindresorhus/type-fest/blob/main/source/multidimensional-array.d.ts",
238
422
  "MultidimensionalReadonlyArray": "https://github.com/sindresorhus/type-fest/blob/main/source/multidimensional-readonly-array.d.ts",
239
- "Negative": "https://github.com/sindresorhus/type-fest/blob/main/source/negative.d.ts",
240
- "NegativeFloat": "https://github.com/sindresorhus/type-fest/blob/main/source/negative-float.d.ts",
241
- "NegativeInfinity": "https://github.com/sindresorhus/type-fest/blob/main/source/negative-infinity.d.ts",
242
- "NegativeInteger": "https://github.com/sindresorhus/type-fest/blob/main/source/negative-integer.d.ts",
423
+ "Negative": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
424
+ "NegativeFloat": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
425
+ "NegativeInfinity": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
426
+ "NegativeInteger": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
243
427
  "NonEmptyObject": "https://github.com/sindresorhus/type-fest/blob/main/source/non-empty-object.d.ts",
244
428
  "NonEmptyString": "https://github.com/sindresorhus/type-fest/blob/main/source/non-empty-string.d.ts",
245
429
  "NonEmptyTuple": "https://github.com/sindresorhus/type-fest/blob/main/source/non-empty-tuple.d.ts",
246
- "NonNegative": "https://github.com/sindresorhus/type-fest/blob/main/source/non-negative.d.ts",
247
- "NonNegativeInteger": "https://github.com/sindresorhus/type-fest/blob/main/source/non-negative-integer.d.ts",
248
- "ObservableLike": "https://github.com/sindresorhus/type-fest/blob/main/source/observable-like.d.ts",
430
+ "NonNegative": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
431
+ "NonNegativeInteger": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
432
+ "ObservableLike": "https://github.com/sindresorhus/type-fest/tree/main/source",
249
433
  "OmitDeep": "https://github.com/sindresorhus/type-fest/blob/main/source/omit-deep.d.ts",
250
434
  "OmitIndexSignature": "https://github.com/sindresorhus/type-fest/blob/main/source/omit-index-signature.d.ts",
251
435
  "OptionalKeysOf": "https://github.com/sindresorhus/type-fest/blob/main/source/optional-keys-of.d.ts",
@@ -260,7 +444,7 @@
260
444
  "Paths": "https://github.com/sindresorhus/type-fest/blob/main/source/paths.d.ts",
261
445
  "PickDeep": "https://github.com/sindresorhus/type-fest/blob/main/source/pick-deep.d.ts",
262
446
  "PickIndexSignature": "https://github.com/sindresorhus/type-fest/blob/main/source/pick-index-signature.d.ts",
263
- "PositiveInfinity": "https://github.com/sindresorhus/type-fest/blob/main/source/positive-infinity.d.ts",
447
+ "PositiveInfinity": "https://github.com/sindresorhus/type-fest/blob/main/source/numeric.d.ts",
264
448
  "Primitive": "https://github.com/sindresorhus/type-fest/blob/main/source/primitive.d.ts",
265
449
  "Promisable": "https://github.com/sindresorhus/type-fest/blob/main/source/promisable.d.ts",
266
450
  "ReadonlyDeep": "https://github.com/sindresorhus/type-fest/blob/main/source/readonly-deep.d.ts",
@@ -319,8 +503,8 @@
319
503
  "UnknownRecord": "https://github.com/sindresorhus/type-fest/blob/main/source/unknown-record.d.ts",
320
504
  "UnknownSet": "https://github.com/sindresorhus/type-fest/blob/main/source/unknown-set.d.ts",
321
505
  "UnwrapRequired": "https://github.com/sindresorhus/type-fest/blob/main/source/unwrap-required.d.ts",
322
- "UnwrapTagged": "https://github.com/sindresorhus/type-fest/blob/main/source/unwrap-tagged.d.ts",
323
- "UppercaseLetter": "https://github.com/sindresorhus/type-fest/blob/main/source/uppercase-letter.d.ts",
506
+ "UnwrapTagged": "https://github.com/sindresorhus/type-fest/blob/main/source/tagged.d.ts",
507
+ "UppercaseLetter": "https://github.com/sindresorhus/type-fest/blob/main/source/characters.d.ts",
324
508
  "ValueOf": "https://github.com/sindresorhus/type-fest/blob/main/source/value-of.d.ts",
325
509
  "Words": "https://github.com/sindresorhus/type-fest/blob/main/source/words.d.ts",
326
510
  "Writable": "https://github.com/sindresorhus/type-fest/blob/main/source/writable.d.ts",
@@ -328,6 +512,14 @@
328
512
  "WritableKeysOf": "https://github.com/sindresorhus/type-fest/blob/main/source/writable-keys-of.d.ts",
329
513
  "Xor": "https://github.com/sindresorhus/type-fest/blob/main/source/xor.d.ts"
330
514
  },
515
+ "typedoc": {
516
+ "Application": "https://typedoc.org/api/classes/Application.html",
517
+ "Comment": "https://typedoc.org/api/classes/Models.Comment.html",
518
+ "CommentDisplayPart": "https://typedoc.org/api/types/Models.CommentDisplayPart.html",
519
+ "Converter": "https://typedoc.org/api/classes/Converter.html",
520
+ "PageEvent": "https://typedoc.org/api/classes/PageEvent.html",
521
+ "Reflection": "https://typedoc.org/api/classes/Models.Reflection.html"
522
+ },
331
523
  "typescript": {
332
524
  "ArrayBufferView": "#",
333
525
  "Exclude": "https://www.typescriptlang.org/docs/handbook/utility-types.html#excludetype-excludedunion",
@@ -342,6 +534,21 @@
342
534
  "Required": "https://www.typescriptlang.org/docs/handbook/utility-types.html#requiredtype",
343
535
  "ReturnType": "https://www.typescriptlang.org/docs/handbook/utility-types.html#returntypetype"
344
536
  },
537
+ "typescript-eslint": {
538
+ "config": "https://typescript-eslint.io/packages/typescript-eslint/",
539
+ "configs": "https://typescript-eslint.io/packages/typescript-eslint/",
540
+ "parser": "https://typescript-eslint.io/packages/typescript-eslint/",
541
+ "plugin": "https://typescript-eslint.io/packages/typescript-eslint/"
542
+ },
543
+ "unified": {
544
+ "Pluggable": "https://unifiedjs.com/explore/package/unified/",
545
+ "Plugin": "https://unifiedjs.com/explore/package/unified/",
546
+ "Preset": "https://unifiedjs.com/explore/package/unified/",
547
+ "unified": "https://unifiedjs.com/explore/package/unified/"
548
+ },
549
+ "vfile": {
550
+ "VFile": "https://unifiedjs.com/explore/package/vfile/"
551
+ },
345
552
  "vite": {
346
553
  "Plugin": "https://vitejs.dev/guide/api-plugin.html",
347
554
  "UserConfig": "https://vitejs.dev/config/",
@@ -357,6 +564,28 @@
357
564
  "it": "https://vitest.dev/api/#test",
358
565
  "test": "https://vitest.dev/api/#test"
359
566
  },
567
+ "vue": {
568
+ "Component": "https://vuejs.org/api/",
569
+ "Ref": "https://vuejs.org/api/reactivity-core.html#ref",
570
+ "computed": "https://vuejs.org/api/reactivity-core.html#computed",
571
+ "defineComponent": "https://vuejs.org/api/general.html#definecomponent",
572
+ "nextTick": "https://vuejs.org/api/general.html#nexttick",
573
+ "reactive": "https://vuejs.org/api/reactivity-core.html#reactive",
574
+ "ref": "https://vuejs.org/api/reactivity-core.html#ref",
575
+ "watch": "https://vuejs.org/api/reactivity-core.html#watch",
576
+ "watchEffect": "https://vuejs.org/api/reactivity-core.html#watcheffect"
577
+ },
578
+ "yaml": {
579
+ "Document": "https://eemeli.org/yaml/",
580
+ "parse": "https://eemeli.org/yaml/",
581
+ "parseDocument": "https://eemeli.org/yaml/",
582
+ "stringify": "https://eemeli.org/yaml/"
583
+ },
584
+ "yaml-eslint-parser": {
585
+ "AST": "https://github.com/ota-meshi/yaml-eslint-parser/blob/master/docs/AST.md",
586
+ "getStaticYAMLValue": "https://github.com/ota-meshi/yaml-eslint-parser",
587
+ "parseForESLint": "https://eslint.org/docs/latest/extend/custom-parsers"
588
+ },
360
589
  "zod": {
361
590
  "ZodArray": "https://zod.dev/?id=arrays",
362
591
  "ZodBoolean": "https://zod.dev/?id=booleans",
@@ -446,8 +675,8 @@
446
675
  },
447
676
  "placeInternalsInOwningModule": true,
448
677
  "plugin": [
449
- "./typedoc-plugins/hash-to-bang-links.mjs",
450
- "./typedoc-plugins/prefix-doc-links.mjs",
678
+ "typedoc-plugin-hash-link-references",
679
+ "typedoc-plugin-docusaurus-doc-links",
451
680
  "typedoc-plugin-remark",
452
681
  "typedoc-plugin-missing-exports",
453
682
  "typedoc-plugin-replace-text",
@@ -465,7 +694,7 @@
465
694
  "replaceText": {
466
695
  "inCodeCommentTags": true,
467
696
  "inCodeCommentText": true,
468
- "inMarkdownText": false,
697
+ "inMarkdown": false,
469
698
  "replacements": [
470
699
  {
471
700
  "pattern": "\\bTODO:",
@@ -486,14 +715,17 @@
486
715
  "alphabetical"
487
716
  ],
488
717
  "sortEntryPoints": true,
718
+ "sourceLinkExternal": true,
489
719
  "strikeDeprecatedPageTitles": true,
490
720
  "suppressCommentWarningsInDeclarationFiles": true,
491
721
  "theme": "markdown",
492
722
  "treatValidationWarningsAsErrors": true,
493
723
  "treatWarningsAsErrors": false,
724
+ "useCodeBlocks": true,
494
725
  "useCustomAnchors": true,
495
726
  "useFirstParagraphOfCommentAsSummary": true,
496
727
  "useHTMLAnchors": true,
728
+ "useHTMLEncodedBrackets": true,
497
729
  "useHostedBaseUrlForAbsoluteLinks": false,
498
730
  "useTsLinkResolution": true,
499
731
  "validation": {
@@ -1,33 +0,0 @@
1
- /**
2
- * Type declarations for the runtime TypeDoc plugin helper module.
3
- */
4
-
5
- /**
6
- * Mutates a TypeDoc comment in-place, rewriting repo-style `path#Symbol` links
7
- * into TypeDoc declaration references (`path!Symbol`).
8
- *
9
- * @param comment - A TypeDoc Comment object.
10
- */
11
- export declare function convertHashLinksToBangLinksInComment(
12
- comment: unknown
13
- ): void;
14
-
15
- /**
16
- * Rewrites `module#Export` to `module!Export` for module-source-like
17
- * references.
18
- *
19
- * @param inlineTagText - The inline-tag payload stored by TypeDoc.
20
- */
21
- export declare function convertHashLinksToBangLinksInInlineTagText(
22
- inlineTagText: string
23
- ): string;
24
-
25
- /**
26
- * Mutates an array of TypeDoc comment display parts in-place.
27
- *
28
- * @param parts - Display parts collection whose inline-tag text may be
29
- * rewritten.
30
- */
31
- export declare function convertHashLinksToBangLinksInParts(
32
- parts: readonly Record<string, unknown>[]
33
- ): void;
@@ -1,157 +0,0 @@
1
- // @ts-check
2
-
3
- /**
4
- * @typedef {import("typedoc").Comment} Comment
5
- *
6
- * @typedef {import("typedoc").CommentDisplayPart} CommentDisplayPart
7
- */
8
-
9
- /** @type {ReadonlySet<string>} */
10
- const URL_LIKE_SCHEMES = new Set([
11
- "blob",
12
- "data",
13
- "file",
14
- "mailto",
15
- "tel",
16
- "urn",
17
- ]);
18
-
19
- /** @type {ReadonlySet<string>} */
20
- const INLINE_LINK_TAGS = new Set([
21
- "@link",
22
- "@linkcode",
23
- "@linkplain",
24
- ]);
25
-
26
- /**
27
- * @param {Comment} comment
28
- */
29
- export function convertHashLinksToBangLinksInComment(comment) {
30
- convertHashLinksToBangLinksInParts(comment.summary);
31
- for (const tag of comment.blockTags) {
32
- convertHashLinksToBangLinksInParts(tag.content);
33
- }
34
- }
35
-
36
- /**
37
- * Rewrites `module#path` -> `module!path` for module-source-like references.
38
- * Preserves whitespace and any `| label` suffix.
39
- *
40
- * @param {string} inlineTagText - The inline-tag payload stored by TypeDoc.
41
- */
42
- export function convertHashLinksToBangLinksInInlineTagText(inlineTagText) {
43
- const pipeIndex = inlineTagText.indexOf("|");
44
- const beforePipe =
45
- pipeIndex === -1 ? inlineTagText : inlineTagText.slice(0, pipeIndex);
46
-
47
- const trimmedStart = beforePipe.trimStart();
48
- const leadingWs = beforePipe.slice(
49
- 0,
50
- beforePipe.length - trimmedStart.length
51
- );
52
-
53
- const trimmedEnd = beforePipe.trimEnd();
54
- const trailingWs = beforePipe.slice(trimmedEnd.length);
55
-
56
- const trimmed = beforePipe.slice(
57
- leadingWs.length,
58
- beforePipe.length - trailingWs.length
59
- );
60
-
61
- const hashIndex = trimmed.indexOf("#");
62
- if (hashIndex === -1) {
63
- return inlineTagText;
64
- }
65
-
66
- const moduleSource = trimmed.slice(0, hashIndex);
67
- if (isUrlLike(moduleSource)) {
68
- return inlineTagText;
69
- }
70
- if (!isModuleSourceLike(moduleSource)) {
71
- return inlineTagText;
72
- }
73
-
74
- const afterHash = trimmed.slice(hashIndex + 1);
75
- if (!afterHash) {
76
- return inlineTagText;
77
- }
78
-
79
- const rewrittenCore = `${moduleSource}!${afterHash}`;
80
-
81
- const rebuiltBeforePipe = `${leadingWs}${rewrittenCore}${trailingWs}`;
82
- return pipeIndex === -1
83
- ? rebuiltBeforePipe
84
- : `${rebuiltBeforePipe}${inlineTagText.slice(pipeIndex)}`;
85
- }
86
-
87
- /**
88
- * @param {CommentDisplayPart[]} parts
89
- */
90
- export function convertHashLinksToBangLinksInParts(parts) {
91
- for (const part of parts) {
92
- if (part.kind === "inline-tag" && INLINE_LINK_TAGS.has(part.tag)) {
93
- const rewritten = convertHashLinksToBangLinksInInlineTagText(
94
- part.text
95
- );
96
- if (rewritten !== part.text) {
97
- part.text = rewritten;
98
- // Ensure TypeDoc re-resolves this link based on updated text.
99
- delete part.target;
100
- delete part.tsLinkText;
101
- }
102
- }
103
- }
104
- }
105
-
106
- /**
107
- * Determines whether a `#` in a link target is likely being used as a
108
- * module/export separator (repo convention) rather than as a TypeDoc
109
- * declaration-reference instance member separator.
110
- *
111
- * @param {string} moduleSource
112
- */
113
- function isModuleSourceLike(moduleSource) {
114
- return (
115
- moduleSource.includes("/") ||
116
- moduleSource.includes("\\") ||
117
- moduleSource.startsWith("@") ||
118
- moduleSource.includes("-") ||
119
- // Supports things like `node:fs` or other specifiers.
120
- moduleSource.includes(":")
121
- );
122
- }
123
-
124
- /**
125
- * @param {string} moduleSource
126
- */
127
- function isUrlLike(moduleSource) {
128
- // Cheap and safe heuristic: enough to avoid rewriting `...#...` anchors.
129
- if (moduleSource.includes("://")) {
130
- return true;
131
- }
132
-
133
- // Detect common URI schemes that do not use `://`, while avoiding false
134
- // positives such as Windows paths (e.g. `C:\\path\\to\\file`).
135
- const firstColon = moduleSource.indexOf(":");
136
- if (firstColon <= 0) {
137
- return false;
138
- }
139
-
140
- const scheme = moduleSource.slice(0, firstColon);
141
-
142
- // Windows drive letter followed by `:` (e.g. `C:`) with a path segment is
143
- // not a URL.
144
- if (
145
- /^[A-Za-z]$/v.test(scheme) &&
146
- (moduleSource.slice(firstColon + 1).includes("/") ||
147
- moduleSource.slice(firstColon + 1).includes("\\"))
148
- ) {
149
- return false;
150
- }
151
-
152
- const lowerScheme = scheme.toLowerCase();
153
-
154
- // Restrict to well-known URL-like schemes so that specifiers such as
155
- // `node:fs` continue to be treated as module-like, not URL-like.
156
- return URL_LIKE_SCHEMES.has(lowerScheme);
157
- }
@@ -1,8 +0,0 @@
1
- import type { Application } from "typedoc";
2
-
3
- /**
4
- * TypeDoc plugin entrypoint.
5
- *
6
- * @param app - TypeDoc app instance.
7
- */
8
- export declare function load(app: Application): void;
@@ -1,63 +0,0 @@
1
- // @ts-check
2
-
3
- /**
4
- * @file TypeDoc plugin which rewrites a repo-specific `path#Export` convention
5
- * into TypeDoc's declaration-reference module source syntax: `path!Export`.
6
- *
7
- * Why:
8
- *
9
- * - In TypeDoc declaration references, `#` means "instance member" navigation.
10
- * - `!` separates the _module source_ from the component path.
11
- * - So `src/foo#bar` is interpreted as: navigate to `src/foo` in the current
12
- * scope, then find instance member `bar` — which almost never exists.
13
- *
14
- * This repository intentionally uses `path#Symbol` because VS Code can resolve
15
- * it as a workspace link. TypeDoc cannot.
16
- *
17
- * This plugin runs during conversion and adjusts link texts before TypeDoc's
18
- * own link resolver executes, so we get valid internal links in generated
19
- * docs while keeping the source comments unchanged for the IDE.
20
- */
21
-
22
- import { Converter } from "typedoc";
23
-
24
- import { convertHashLinksToBangLinksInComment } from "./hash-to-bang-links-core.mjs";
25
-
26
- // TypeDoc's built-in LinkResolverPlugin runs at priority -300. This plugin must
27
- // run before it, so our priority must be > -300.
28
- const RUN_BEFORE_LINK_RESOLVER_PRIORITY = 50;
29
-
30
- /**
31
- * TypeDoc plugin entrypoint.
32
- *
33
- * @param {import("typedoc").Application} app
34
- *
35
- * @returns {void}
36
- */
37
- export function load(app) {
38
- // Run before TypeDoc's built-in LinkResolverPlugin (priority -300).
39
- app.converter.on(
40
- Converter.EVENT_RESOLVE_END,
41
- (context) => {
42
- const { project } = context;
43
- const { reflections } = project;
44
- /** @type {Record<string, import("typedoc").Reflection>} */
45
- const reflectionMap = reflections;
46
- // Avoid Object.values allocation on large projects.
47
- for (const reflectionId in reflectionMap) {
48
- if (Object.hasOwn(reflectionMap, reflectionId)) {
49
- const reflection =
50
- /** @type {import("typedoc").Reflection} */ (
51
- reflectionMap[reflectionId]
52
- );
53
- if (reflection.comment) {
54
- convertHashLinksToBangLinksInComment(
55
- reflection.comment
56
- );
57
- }
58
- }
59
- }
60
- },
61
- RUN_BEFORE_LINK_RESOLVER_PRIORITY
62
- );
63
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Type declarations for the runtime TypeDoc plugin helper module.
3
- *
4
- * @remarks
5
- * This file exists so TypeScript consumers (tests/tooling) can import the
6
- * `.mjs` module without TS7016.
7
- */
8
-
9
- /**
10
- * Prefixes bare intra-doc Markdown file links with `./`.
11
- *
12
- * @param input - Markdown source to normalize for relative link resolution.
13
- *
14
- * @returns Markdown with unresolved bare file links prefixed by `./`.
15
- */
16
- export declare function prefixBareMarkdownFileLinksInMarkdown(
17
- input: string
18
- ): string;
@@ -1,407 +0,0 @@
1
- // @ts-check
2
-
3
- const SCHEME_RE = /^[A-Za-z][+\-.A-Za-z]*:/v;
4
-
5
- /**
6
- * @typedef {{ marker: "`" | "~"; length: number }} FenceState
7
- */
8
-
9
- /**
10
- * Prefixes bare intra-doc Markdown file links with `./`.
11
- *
12
- * This function is designed to operate on TypeDoc's markdown renderer output,
13
- * where links are mostly simple inline links. It intentionally avoids parsing
14
- * inside fenced code blocks and inline code spans.
15
- *
16
- * @param {string} input
17
- *
18
- * @returns {string}
19
- */
20
- export function prefixBareMarkdownFileLinksInMarkdown(input) {
21
- const newline = input.includes("\r\n") ? "\r\n" : "\n";
22
- const lines = input.split(/\r?\n/v);
23
-
24
- /** @type {null | FenceState} */
25
- let fenceState = null;
26
-
27
- const outLines = lines.map((line) => {
28
- // Only treat runs of a single marker character as fences.
29
- const fenceMatch = /^\s*(?<marker>[`~])\k<marker>{2,}/v.exec(line);
30
- if (fenceMatch) {
31
- const [matchText] = fenceMatch;
32
- const run = matchText.trimStart();
33
- const { groups } = fenceMatch;
34
- const typedGroups =
35
- /** @type {undefined | { marker: string | undefined }} */ (
36
- groups
37
- );
38
- const markerChar = typedGroups?.marker ?? run.charAt(0);
39
- /** @type {"`" | "~"} */
40
- const marker = markerChar === "`" ? "`" : "~";
41
- const { length } = run;
42
-
43
- if (fenceState === null) {
44
- fenceState = { length, marker };
45
- } else if (
46
- marker === fenceState.marker &&
47
- length >= fenceState.length
48
- ) {
49
- fenceState = null;
50
- }
51
-
52
- return line;
53
- }
54
-
55
- if (fenceState !== null) {
56
- return line;
57
- }
58
-
59
- return prefixInlineMarkdownLinksInLine(line);
60
- });
61
-
62
- return outLines.join(newline);
63
- }
64
-
65
- /**
66
- * Returns a matching closing `)` for a Markdown inline link target starting at
67
- * `startIndex` (immediately after the opening `](`).
68
- *
69
- * Handles balanced parentheses and backslash escapes.
70
- *
71
- * @param {string} input
72
- * @param {number} startIndex
73
- *
74
- * @returns {number} Index of the closing `)`, or -1 if not found
75
- */
76
- function findInlineLinkClosingParen(input, startIndex) {
77
- let depth = 0;
78
- let i = startIndex;
79
-
80
- while (i < input.length) {
81
- const ch = input.charAt(i);
82
-
83
- if (ch === "(") {
84
- depth += 1;
85
- i += 1;
86
- continue;
87
- }
88
-
89
- if (ch === ")") {
90
- if (depth === 0) {
91
- return i;
92
- }
93
-
94
- depth -= 1;
95
- i += 1;
96
- continue;
97
- }
98
-
99
- if (ch === "\\") {
100
- // Skip escaped character (including escaped parens).
101
- i += 2;
102
- continue;
103
- }
104
-
105
- i += 1;
106
- }
107
-
108
- return -1;
109
- }
110
-
111
- /**
112
- * Finds the opening `[` which matches the `]` at `closeBracketIndex`.
113
- *
114
- * Handles nested brackets and backslash escapes.
115
- *
116
- * @param {string} line
117
- * @param {number} closeBracketIndex
118
- */
119
- function findInlineLinkLabelOpenBracket(line, closeBracketIndex) {
120
- let depth = 0;
121
-
122
- for (let i = closeBracketIndex - 1; i >= 0; i -= 1) {
123
- const ch = line.charAt(i);
124
-
125
- const isBracket = ch === "[" || ch === "]";
126
- const escapedBracket = isBracket && isEscaped(line, i);
127
- if (!escapedBracket) {
128
- if (ch === "]") {
129
- depth += 1;
130
- } else if (ch === "[") {
131
- if (depth === 0) {
132
- return i;
133
- }
134
-
135
- depth -= 1;
136
- }
137
- }
138
- }
139
-
140
- return -1;
141
- }
142
-
143
- /**
144
- * Returns whether the character at `index` is escaped by an odd number of
145
- * preceding backslashes.
146
- *
147
- * @param {string} input
148
- * @param {number} index
149
- */
150
- function isEscaped(input, index) {
151
- let backslashCount = 0;
152
- let i = index - 1;
153
-
154
- while (i >= 0 && input.charAt(i) === "\\") {
155
- backslashCount += 1;
156
- i -= 1;
157
- }
158
-
159
- return backslashCount % 2 === 1;
160
- }
161
-
162
- /**
163
- * Prefixes bare relative Markdown file link destinations with `./` so
164
- * Docusaurus treats them as file paths.
165
- *
166
- * @param {string} destination - The inline link destination (may contain
167
- * spaces).
168
- */
169
- function prefixIfBareRelativeMarkdownFile(destination) {
170
- const trimmedStart = destination.trimStart();
171
- const leadingWs = destination.slice(
172
- 0,
173
- destination.length - trimmedStart.length
174
- );
175
-
176
- const trimmedEnd = destination.trimEnd();
177
- const trailingWs = destination.slice(trimmedEnd.length);
178
-
179
- const trimmed = destination.slice(
180
- leadingWs.length,
181
- destination.length - trailingWs.length
182
- );
183
-
184
- // Ignore fragments, absolute paths, already-relative paths, protocol-relative URLs.
185
- if (
186
- trimmed.startsWith("#") ||
187
- trimmed.startsWith("/") ||
188
- trimmed.startsWith("./") ||
189
- trimmed.startsWith("../") ||
190
- trimmed.startsWith("//")
191
- ) {
192
- return destination;
193
- }
194
-
195
- // Ignore any explicit scheme (HTTP:, HTTPS:, mailto:, VS Code:, etc.).
196
- if (SCHEME_RE.test(trimmed)) {
197
- return destination;
198
- }
199
-
200
- const hashIndex = trimmed.indexOf("#");
201
- const beforeHash = hashIndex === -1 ? trimmed : trimmed.slice(0, hashIndex);
202
-
203
- const queryIndex = beforeHash.indexOf("?");
204
- const pathname =
205
- queryIndex === -1 ? beforeHash : beforeHash.slice(0, queryIndex);
206
-
207
- // Only touch markdown-file links.
208
- if (!pathname.endsWith(".md") && !pathname.endsWith(".mdx")) {
209
- return destination;
210
- }
211
-
212
- return `${leadingWs}./${trimmed}${trailingWs}`;
213
- }
214
-
215
- /**
216
- * Applies the `./` prefix rule to an inline-link payload.
217
- *
218
- * Preserves any optional title portion unchanged.
219
- *
220
- * @param {string} payload
221
- */
222
- function prefixInlineLinkPayload(payload) {
223
- const trimmedStart = payload.trimStart();
224
- const leadingWs = payload.slice(0, payload.length - trimmedStart.length);
225
-
226
- const trimmedEnd = payload.trimEnd();
227
- const trailingWs = payload.slice(trimmedEnd.length);
228
-
229
- const core = payload.trim();
230
- const { destination, remainder } = splitInlineLinkDestination(core);
231
- if (destination.length === 0) {
232
- return payload;
233
- }
234
-
235
- const isAngleWrapped =
236
- destination.startsWith("<") &&
237
- destination.endsWith(">") &&
238
- destination.length >= 2;
239
- const inner = isAngleWrapped ? destination.slice(1, -1) : destination;
240
-
241
- const rewrittenInner = prefixIfBareRelativeMarkdownFile(inner);
242
- if (rewrittenInner === inner) {
243
- return payload;
244
- }
245
-
246
- const rewrittenDestination = isAngleWrapped
247
- ? `<${rewrittenInner}>`
248
- : rewrittenInner;
249
-
250
- return `${leadingWs}${rewrittenDestination}${remainder}${trailingWs}`;
251
- }
252
-
253
- /**
254
- * Prefixes bare Markdown-file link targets on a single line, avoiding
255
- * modifications inside inline code spans.
256
- *
257
- * @param {string} line
258
- */
259
- function prefixInlineMarkdownLinksInLine(line) {
260
- let out = "";
261
- let i = 0;
262
-
263
- /** @type {null | number} */
264
- let codeSpanLength = null;
265
-
266
- /**
267
- * Counts how many times `char` repeats starting at `startIndex`.
268
- *
269
- * @param {number} startIndex
270
- * @param {string} char
271
- */
272
- const countRun = (startIndex, char) => {
273
- let count = 0;
274
- while (
275
- startIndex + count < line.length &&
276
- line.charAt(startIndex + count) === char
277
- ) {
278
- count += 1;
279
- }
280
- return count;
281
- };
282
-
283
- while (i < line.length) {
284
- // Inline code spans (backticks). Track the opening run length and only close on the same length.
285
- const tickRun = line.charAt(i) === "`" ? countRun(i, "`") : 0;
286
- if (tickRun > 0) {
287
- if (codeSpanLength === null) {
288
- codeSpanLength = tickRun;
289
- } else if (tickRun === codeSpanLength) {
290
- codeSpanLength = null;
291
- }
292
-
293
- out += line.slice(i, i + tickRun);
294
- i += tickRun;
295
- } else if (
296
- codeSpanLength === null &&
297
- line.charAt(i) === "]" &&
298
- line.charAt(i + 1) === "("
299
- ) {
300
- // Ensure this is actually a `[label](` sequence, not random text containing `](`.
301
- const labelOpen = findInlineLinkLabelOpenBracket(line, i);
302
-
303
- if (labelOpen === -1) {
304
- out += line.charAt(i);
305
- i += 1;
306
- } else {
307
- const urlStart = i + 2;
308
- const end = findInlineLinkClosingParen(line, urlStart);
309
-
310
- if (end === -1) {
311
- out += line.charAt(i);
312
- i += 1;
313
- } else {
314
- const payload = line.slice(urlStart, end);
315
- const rewrittenPayload = prefixInlineLinkPayload(payload);
316
-
317
- out += `](${rewrittenPayload})`;
318
- i = end + 1;
319
- }
320
- }
321
- } else {
322
- out += line.charAt(i);
323
- i += 1;
324
- }
325
- }
326
-
327
- return out;
328
- }
329
-
330
- /**
331
- * Splits a Markdown inline link payload into destination + remainder.
332
- *
333
- * The payload is the text inside `(...)` for an inline link.
334
- *
335
- * - Destination may be `&lt;...>` or a raw destination.
336
- * - Remainder (if any) includes the title and its leading whitespace.
337
- *
338
- * @param {string} payload
339
- *
340
- * @returns {{ destination: string; remainder: string }}
341
- */
342
- function splitInlineLinkDestination(payload) {
343
- const core = payload.trim();
344
- if (core.length === 0) {
345
- return { destination: "", remainder: "" };
346
- }
347
-
348
- // Destination in angle brackets: <...>
349
- if (core.startsWith("<")) {
350
- let i = 1;
351
- while (i < core.length) {
352
- const ch = core.charAt(i);
353
-
354
- if (ch === "\\") {
355
- i += 2;
356
- } else if (ch === ">") {
357
- return {
358
- destination: core.slice(0, i + 1),
359
- remainder: core.slice(i + 1),
360
- };
361
- } else {
362
- i += 1;
363
- }
364
- }
365
-
366
- // Unclosed `<...`; treat whole thing as destination.
367
- return { destination: core, remainder: "" };
368
- }
369
-
370
- // Raw destination: ends at first whitespace at depth 0.
371
- let depth = 0;
372
- let i = 0;
373
- while (i < core.length) {
374
- const ch = core.charAt(i);
375
-
376
- if (ch === "(") {
377
- depth += 1;
378
- i += 1;
379
- continue;
380
- }
381
-
382
- if (ch === ")") {
383
- if (depth > 0) {
384
- depth -= 1;
385
- }
386
-
387
- i += 1;
388
- continue;
389
- }
390
-
391
- if (ch === "\\") {
392
- i += 2;
393
- continue;
394
- }
395
-
396
- if (depth === 0 && /\s/v.test(ch)) {
397
- return {
398
- destination: core.slice(0, i),
399
- remainder: core.slice(i),
400
- };
401
- }
402
-
403
- i += 1;
404
- }
405
-
406
- return { destination: core, remainder: "" };
407
- }
@@ -1,8 +0,0 @@
1
- import type { Application } from "typedoc";
2
-
3
- /**
4
- * TypeDoc plugin entrypoint.
5
- *
6
- * @param app - TypeDoc app instance.
7
- */
8
- export declare function load(app: Application): void;
@@ -1,55 +0,0 @@
1
- // @ts-check
2
-
3
- /*
4
- * TypeDoc renderer plugin: prefix bare intra-doc Markdown file links with `./`.
5
- *
6
- * Docusaurus only rewrites Markdown links to other doc files when they are explicit file paths
7
- * (typically starting with `./` or `../`).
8
- *
9
- * TypeDoc's markdown output frequently contains links like:
10
- * - `electron/Foo/index.md`
11
- * - `shared/bar/Baz.md`
12
- *
13
- * Without the leading `./`, Docusaurus treats those as URL paths, cannot resolve them to files,
14
- * and reports them as broken/unresolved.
15
- */
16
-
17
- import { PageEvent } from "typedoc";
18
-
19
- import { prefixBareMarkdownFileLinksInMarkdown } from "./prefix-doc-links-core.mjs";
20
-
21
- /**
22
- * Renderer hook: runs after a page has been rendered.
23
- *
24
- * @param {import("typedoc").PageEvent} page
25
- */
26
- /**
27
- * TypeDoc plugin entrypoint.
28
- *
29
- * @param {import("typedoc").Application} app
30
- *
31
- * @returns {void}
32
- */
33
- export function load(app) {
34
- app.renderer.on(PageEvent.END, onPageEnd);
35
- }
36
-
37
- /**
38
- * Renderer hook: runs after a page has been rendered.
39
- *
40
- * @param {import("typedoc").PageEvent} page
41
- *
42
- * @returns {void}
43
- */
44
- function onPageEnd(page) {
45
- if (typeof page.contents !== "string") {
46
- return;
47
- }
48
-
49
- // Markdown output only.
50
- if (!page.url.endsWith(".md") && !page.url.endsWith(".mdx")) {
51
- return;
52
- }
53
-
54
- page.contents = prefixBareMarkdownFileLinksInMarkdown(page.contents);
55
- }