typedoc-plugin-hash-link-references 0.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - Initial standalone TypeDoc plugin package.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Nick2bad4u
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,23 @@
1
+ # typedoc-plugin-hash-link-references
2
+
3
+ [![NPM license.](https://flat.badgen.net/npm/license/typedoc-plugin-hash-link-references?color=purple)](https://github.com/Nick2bad4u/typedoc-plugin-hash-link-references/blob/main/LICENSE) [![NPM total downloads.](https://flat.badgen.net/npm/dt/typedoc-plugin-hash-link-references?color=pink)](https://www.npmjs.com/package/typedoc-plugin-hash-link-references) [![Latest GitHub release.](https://flat.badgen.net/github/release/Nick2bad4u/typedoc-plugin-hash-link-references?color=cyan)](https://github.com/Nick2bad4u/typedoc-plugin-hash-link-references/releases) [![GitHub stars.](https://flat.badgen.net/github/stars/Nick2bad4u/typedoc-plugin-hash-link-references?color=yellow)](https://github.com/Nick2bad4u/typedoc-plugin-hash-link-references/stargazers) [![GitHub forks.](https://flat.badgen.net/github/forks/Nick2bad4u/typedoc-plugin-hash-link-references?color=orange)](https://github.com/Nick2bad4u/typedoc-plugin-hash-link-references/forks) [![GitHub open issues.](https://flat.badgen.net/github/open-issues/Nick2bad4u/typedoc-plugin-hash-link-references?color=red)](https://github.com/Nick2bad4u/typedoc-plugin-hash-link-references/issues) [![Codecov.](https://flat.badgen.net/codecov/github/Nick2bad4u/typedoc-plugin-hash-link-references?color=blue)](https://codecov.io/gh/Nick2bad4u/typedoc-plugin-hash-link-references) [![Repo Checks.](https://flat.badgen.net/github/checks/Nick2bad4u/typedoc-plugin-hash-link-references?color=green)](https://github.com/Nick2bad4u/typedoc-plugin-hash-link-references/actions)
4
+
5
+ TypeDoc plugin that rewrites VS Code-friendly `path#Symbol` inline links into
6
+ TypeDoc declaration references using `path!Symbol`.
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ npm install --save-dev typedoc-plugin-hash-link-references
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```json
17
+ {
18
+ "plugin": ["typedoc-plugin-hash-link-references"]
19
+ }
20
+ ```
21
+
22
+ The package entrypoint exports TypeDoc's `load(app)` plugin hook. The `./core`
23
+ subpath exports the link rewriting helpers for direct tests.
package/dist/core.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ import type { Comment, CommentDisplayPart } from "typedoc";
2
+ /**
3
+ * Mutates a TypeDoc comment in-place, rewriting repo-style `path#Symbol` links
4
+ * into TypeDoc declaration references (`path!Symbol`).
5
+ *
6
+ * @param comment - Comment to update.
7
+ */
8
+ export declare function convertHashLinksToBangLinksInComment(comment: Comment): void;
9
+ /**
10
+ * Rewrites `module#Export` to `module!Export` for module-source-like
11
+ * references. Whitespace and `| label` suffixes are preserved.
12
+ *
13
+ * @param inlineTagText - The inline-tag payload stored by TypeDoc.
14
+ */
15
+ export declare function convertHashLinksToBangLinksInInlineTagText(inlineTagText: string): string;
16
+ /**
17
+ * Mutates TypeDoc display parts in-place.
18
+ *
19
+ * @param parts - Display parts collection whose inline-tag text may be
20
+ * rewritten.
21
+ */
22
+ export declare function convertHashLinksToBangLinksInParts(parts: CommentDisplayPart[]): void;
23
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAmB3D;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAK3E;AAED;;;;;GAKG;AACH,wBAAgB,0CAA0C,CACtD,aAAa,EAAE,MAAM,GACtB,MAAM,CAwCR;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAC9C,KAAK,EAAE,kBAAkB,EAAE,GAC5B,IAAI,CAcN"}
package/dist/core.js ADDED
@@ -0,0 +1,100 @@
1
+ import { setHas } from "ts-extras";
2
+ const URL_LIKE_SCHEMES = new Set([
3
+ "blob",
4
+ "data",
5
+ "file",
6
+ "mailto",
7
+ "tel",
8
+ "urn",
9
+ ]);
10
+ const INLINE_LINK_TAGS = new Set([
11
+ "@link",
12
+ "@linkcode",
13
+ "@linkplain",
14
+ ]);
15
+ /**
16
+ * Mutates a TypeDoc comment in-place, rewriting repo-style `path#Symbol` links
17
+ * into TypeDoc declaration references (`path!Symbol`).
18
+ *
19
+ * @param comment - Comment to update.
20
+ */
21
+ export function convertHashLinksToBangLinksInComment(comment) {
22
+ convertHashLinksToBangLinksInParts(comment.summary);
23
+ for (const tag of comment.blockTags) {
24
+ convertHashLinksToBangLinksInParts(tag.content);
25
+ }
26
+ }
27
+ /**
28
+ * Rewrites `module#Export` to `module!Export` for module-source-like
29
+ * references. Whitespace and `| label` suffixes are preserved.
30
+ *
31
+ * @param inlineTagText - The inline-tag payload stored by TypeDoc.
32
+ */
33
+ export function convertHashLinksToBangLinksInInlineTagText(inlineTagText) {
34
+ const pipeIndex = inlineTagText.indexOf("|");
35
+ const beforePipe = pipeIndex === -1 ? inlineTagText : inlineTagText.slice(0, pipeIndex);
36
+ const trimmedStart = beforePipe.trimStart();
37
+ const leadingWhitespace = beforePipe.slice(0, beforePipe.length - trimmedStart.length);
38
+ const trimmedEnd = beforePipe.trimEnd();
39
+ const trailingWhitespace = beforePipe.slice(trimmedEnd.length);
40
+ const trimmed = beforePipe.slice(leadingWhitespace.length, beforePipe.length - trailingWhitespace.length);
41
+ const hashIndex = trimmed.indexOf("#");
42
+ if (hashIndex === -1) {
43
+ return inlineTagText;
44
+ }
45
+ const moduleSource = trimmed.slice(0, hashIndex);
46
+ if (isUrlLike(moduleSource) || !isModuleSourceLike(moduleSource)) {
47
+ return inlineTagText;
48
+ }
49
+ const afterHash = trimmed.slice(hashIndex + 1);
50
+ if (!afterHash) {
51
+ return inlineTagText;
52
+ }
53
+ const rewrittenCore = `${moduleSource}!${afterHash}`;
54
+ const rebuiltBeforePipe = `${leadingWhitespace}${rewrittenCore}${trailingWhitespace}`;
55
+ return pipeIndex === -1
56
+ ? rebuiltBeforePipe
57
+ : `${rebuiltBeforePipe}${inlineTagText.slice(pipeIndex)}`;
58
+ }
59
+ /**
60
+ * Mutates TypeDoc display parts in-place.
61
+ *
62
+ * @param parts - Display parts collection whose inline-tag text may be
63
+ * rewritten.
64
+ */
65
+ export function convertHashLinksToBangLinksInParts(parts) {
66
+ for (const part of parts) {
67
+ if (part.kind === "inline-tag" && setHas(INLINE_LINK_TAGS, part.tag)) {
68
+ const rewritten = convertHashLinksToBangLinksInInlineTagText(part.text);
69
+ if (rewritten !== part.text) {
70
+ part.text = rewritten;
71
+ delete part.target;
72
+ delete part.tsLinkText;
73
+ }
74
+ }
75
+ }
76
+ }
77
+ function isModuleSourceLike(moduleSource) {
78
+ return (moduleSource.includes("/") ||
79
+ moduleSource.includes("\\") ||
80
+ moduleSource.startsWith("@") ||
81
+ moduleSource.includes("-") ||
82
+ moduleSource.includes(":"));
83
+ }
84
+ function isUrlLike(moduleSource) {
85
+ if (moduleSource.includes("://")) {
86
+ return true;
87
+ }
88
+ const firstColon = moduleSource.indexOf(":");
89
+ if (firstColon <= 0) {
90
+ return false;
91
+ }
92
+ const scheme = moduleSource.slice(0, firstColon);
93
+ if (/^[A-Za-z]$/v.test(scheme) &&
94
+ (moduleSource.slice(firstColon + 1).includes("/") ||
95
+ moduleSource.slice(firstColon + 1).includes("\\"))) {
96
+ return false;
97
+ }
98
+ return setHas(URL_LIKE_SCHEMES, scheme.toLowerCase());
99
+ }
100
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CAAC;IAClD,MAAM;IACN,MAAM;IACN,MAAM;IACN,QAAQ;IACR,KAAK;IACL,KAAK;CACR,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAA8B,IAAI,GAAG,CAAC;IACxD,OAAO;IACP,WAAW;IACX,YAAY;CACf,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAAC,OAAgB;IACjE,kCAAkC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QAClC,kCAAkC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,0CAA0C,CACtD,aAAqB;IAErB,MAAM,S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CAAC;QAClB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IACjD,IACI,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;QAC1B,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;YAC7C,YAAY,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EACxD,CAAC;QACC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type Application } from "typedoc";
2
+ /**
3
+ * TypeDoc plugin entrypoint.
4
+ *
5
+ * @param app - TypeDoc app instance.
6
+ */
7
+ export declare function load(app: Application): void;
8
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAa,MAAM,SAAS,CAAC;AAQtD;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAc3C"}
package/dist/plugin.js ADDED
@@ -0,0 +1,21 @@
1
+ import { objectValues } from "ts-extras";
2
+ import { Converter } from "typedoc";
3
+ import { convertHashLinksToBangLinksInComment } from "./core.js";
4
+ // TypeDoc's built-in LinkResolverPlugin runs at priority -300. This plugin must
5
+ // run before it, so its priority must be higher.
6
+ const RUN_BEFORE_LINK_RESOLVER_PRIORITY = 50;
7
+ /**
8
+ * TypeDoc plugin entrypoint.
9
+ *
10
+ * @param app - TypeDoc app instance.
11
+ */
12
+ export function load(app) {
13
+ app.converter.on(Converter.EVENT_RESOLVE_END, (context) => {
14
+ for (const reflection of objectValues(context.project.reflections)) {
15
+ if (reflection.comment) {
16
+ convertHashLinksToBangLinksInComment(reflection.comment);
17
+ }
18
+ }
19
+ }, RUN_BEFORE_LINK_RESOLVER_PRIORITY);
20
+ }
21
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAoB,SAAS,EAAE,MAAM,SAAS,CAAC;AAEtD,OAAO,EAAE,oCAAoC,EAAE,MAAM,WAAW,CAAC;AAEjE,gFAAgF;AAChF,iDAAiD;AACjD,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAE7C;;;;GAIG;AACH,MAAM,UAAU,IAAI,CAAC,GAAgB;IACjC,GAAG,CAAC,SAAS,CAAC,EAAE,CACZ,SAAS,CAAC,iBAAiB,EAC3B,CAAC,OAAO,EAAE,EAAE;QACR,KAAK,MAAM,UAAU,IAAI,YAAY,CACjC,OAAO,CAAC,OAAO,CAAC,WAAW,CAC9B,EAAE,CAAC;YACA,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;gBACrB,oCAAoC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAC7D,CAAC;QACL,CAAC;IACL,CAAC,EACD,iCAAiC,CACpC,CAAC;AACN,CAAC"}
package/package.json ADDED
@@ -0,0 +1,114 @@
1
+ {
2
+ "$schema": "https://www.schemastore.org/package.json",
3
+ "name": "typedoc-plugin-hash-link-references",
4
+ "version": "0.1.0",
5
+ "private": false,
6
+ "description": "TypeDoc plugin that rewrites VS Code-friendly path#Symbol links into TypeDoc path!Symbol declaration references.",
7
+ "keywords": [
8
+ "documentation",
9
+ "typedoc",
10
+ "typedoc-plugin",
11
+ "declaration-reference",
12
+ "markdown"
13
+ ],
14
+ "homepage": "https://github.com/Nick2bad4u/typedoc-plugin-hash-link-references#readme",
15
+ "bugs": {
16
+ "url": "https://github.com/Nick2bad4u/typedoc-plugin-hash-link-references/issues",
17
+ "email": "20943337+Nick2bad4u@users.noreply.github.com"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/Nick2bad4u/typedoc-plugin-hash-link-references.git"
22
+ },
23
+ "license": "MIT",
24
+ "author": "Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com> (https://github.com/Nick2bad4u)",
25
+ "contributors": [
26
+ {
27
+ "name": "Nick2bad4u",
28
+ "email": "20943337+Nick2bad4u@users.noreply.github.com",
29
+ "url": "https://github.com/Nick2bad4u"
30
+ }
31
+ ],
32
+ "sideEffects": false,
33
+ "type": "module",
34
+ "exports": {
35
+ ".": {
36
+ "types": "./dist/plugin.d.ts",
37
+ "import": "./dist/plugin.js"
38
+ },
39
+ "./core": {
40
+ "types": "./dist/core.d.ts",
41
+ "import": "./dist/core.js"
42
+ },
43
+ "./package.json": "./package.json"
44
+ },
45
+ "main": "./dist/plugin.js",
46
+ "types": "./dist/plugin.d.ts",
47
+ "files": [
48
+ "dist",
49
+ "CHANGELOG.md"
50
+ ],
51
+ "scripts": {
52
+ "build": "npm run clean:dist && npx -y tsc -p tsconfig.build.json",
53
+ "build:runtime": "npm run build",
54
+ "changelog:generate": "npx -y git-cliff --config cliff.toml --output CHANGELOG.md",
55
+ "changelog:preview": "npx -y git-cliff --config cliff.toml --unreleased",
56
+ "changelog:release-notes": "npx -y git-cliff --config cliff.toml --current --strip all",
57
+ "clean:dist": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
58
+ "coverage": "npm run build && npx -y vitest run --coverage",
59
+ "lint": "npx -y eslint . --cache --cache-strategy content --cache-location .cache/.eslintcache",
60
+ "lint:package": "npx -y sort-package-json --check package.json && npx -y npmPkgJsonLint . --config .npmpackagejsonlintrc.json",
61
+ "lint:package:fix": "npx -y sort-package-json package.json",
62
+ "lint:prettier": "npx -y prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --check",
63
+ "lint:prettier:fix": "npx -y prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --write",
64
+ "lint:publint": "npx -y publint",
65
+ "prepack": "npm run build",
66
+ "package:check": "npm pack --dry-run && npx -y publint && npx -y attw --pack . --profile esm-only",
67
+ "prepublishOnly": "npm run release:check",
68
+ "release:check": "npm run release:verify",
69
+ "release:verify": "npm run lint && npm run typecheck && npm run test && npm run lint:prettier && npm run lint:package && npm run package:check",
70
+ "test": "npm run build && npx -y vitest run",
71
+ "typecheck": "npx -y tsc -p tsconfig.json --noEmit",
72
+ "types:update": "npx typesync",
73
+ "update-actions": "npx actions-up --yes --style sha",
74
+ "update-deps": "npx ncu -i --install never && npm update --force && npm install --force",
75
+ "verify": "npm run release:verify",
76
+ "lint:remark": "remark . --frail --ignore-path .remarkignore",
77
+ "lint:remark:fix": "remark . --ignore-path .remarkignore --output"
78
+ },
79
+ "dependencies": {
80
+ "ts-extras": "^1.0.0"
81
+ },
82
+ "devDependencies": {
83
+ "@arethetypeswrong/cli": "^0.18.3",
84
+ "@types/node": "^25.9.3",
85
+ "@vitest/coverage-v8": "^4.1.9",
86
+ "eslint": "^10.5.0",
87
+ "eslint-config-nick2bad4u": "^2.0.0",
88
+ "git-cliff": "^2.13.1",
89
+ "npm-package-json-lint": "^10.4.1",
90
+ "npm-package-json-lint-config-nick2bad4u": "^1.0.3",
91
+ "prettier": "^3.8.4",
92
+ "prettier-config-nick2bad4u": "^1.0.17",
93
+ "publint": "^0.3.21",
94
+ "remark": "^15.0.1",
95
+ "remark-cli": "^12.0.1",
96
+ "remark-config-nick2bad4u": "^1.0.8",
97
+ "sort-package-json": "^4.0.0",
98
+ "typedoc": "^0.28.19",
99
+ "typescript": "^6.0.3",
100
+ "vitest": "^4.1.9"
101
+ },
102
+ "peerDependencies": {
103
+ "typedoc": ">=0.28.0"
104
+ },
105
+ "packageManager": "npm@11.17.0",
106
+ "engines": {
107
+ "node": ">=22.0.0"
108
+ },
109
+ "publishConfig": {
110
+ "provenance": true,
111
+ "registry": "https://registry.npmjs.org/"
112
+ },
113
+ "readme": "README.md"
114
+ }