typedoc 0.24.1 → 0.24.3
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/dist/index.d.ts +2 -3
- package/dist/index.js +2 -3
- package/dist/lib/application.js +5 -1
- package/dist/lib/converter/plugins/ImplementsPlugin.js +16 -6
- package/dist/lib/converter/plugins/PackagePlugin.js +1 -1
- package/dist/lib/converter/plugins/SourcePlugin.js +2 -3
- package/dist/lib/converter/types.js +3 -1
- package/dist/lib/models/comments/comment.js +6 -1
- package/dist/lib/models/reflections/ReflectionSymbolId.js +3 -2
- package/dist/lib/models/reflections/abstract.d.ts +5 -2
- package/dist/lib/models/reflections/abstract.js +0 -11
- package/dist/lib/models/reflections/container.d.ts +0 -8
- package/dist/lib/models/reflections/container.js +0 -8
- package/dist/lib/models/reflections/declaration.d.ts +0 -8
- package/dist/lib/models/reflections/declaration.js +0 -8
- package/dist/lib/models/reflections/kind.d.ts +2 -0
- package/dist/lib/models/reflections/kind.js +5 -0
- package/dist/lib/models/reflections/parameter.d.ts +0 -8
- package/dist/lib/models/reflections/parameter.js +0 -9
- package/dist/lib/models/reflections/project.d.ts +5 -0
- package/dist/lib/models/reflections/project.js +40 -9
- package/dist/lib/models/reflections/signature.d.ts +0 -8
- package/dist/lib/models/reflections/signature.js +0 -9
- package/dist/lib/models/reflections/type-parameter.d.ts +2 -1
- package/dist/lib/models/reflections/type-parameter.js +3 -0
- package/dist/lib/models/types.d.ts +15 -4
- package/dist/lib/models/types.js +20 -3
- package/dist/lib/output/themes/MarkedPlugin.js +4 -3
- package/dist/lib/output/themes/default/DefaultTheme.js +3 -9
- package/dist/lib/output/themes/default/layouts/default.js +1 -1
- package/dist/lib/output/themes/default/partials/icon.js +1 -1
- package/dist/lib/output/themes/default/partials/member.declaration.js +1 -1
- package/dist/lib/output/themes/default/partials/member.signature.body.js +1 -1
- package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/member.signature.title.js +26 -13
- package/dist/lib/output/themes/default/partials/navigation.js +1 -1
- package/dist/lib/output/themes/default/partials/parameter.js +5 -5
- package/dist/lib/output/themes/default/partials/type.js +44 -31
- package/dist/lib/output/themes/default/partials/typeParameters.js +1 -1
- package/dist/lib/output/themes/lib.d.ts +2 -0
- package/dist/lib/output/themes/lib.js +13 -2
- package/dist/lib/serialization/schema.d.ts +1 -1
- package/dist/lib/serialization/schema.js +0 -1
- package/dist/lib/utils/entry-point.js +6 -16
- package/dist/lib/utils/fs.d.ts +1 -7
- package/dist/lib/utils/fs.js +25 -17
- package/dist/lib/utils/html-entities.json +2233 -0
- package/dist/lib/utils/html.d.ts +1 -0
- package/dist/lib/utils/html.js +28 -0
- package/dist/lib/utils/index.d.ts +3 -2
- package/dist/lib/utils/index.js +3 -2
- package/dist/lib/utils/jsx.js +8 -7
- package/dist/lib/utils/map.d.ts +1 -0
- package/dist/lib/utils/map.js +3 -0
- package/dist/lib/utils/options/declaration.d.ts +1 -0
- package/dist/lib/utils/options/index.d.ts +1 -1
- package/dist/lib/utils/options/readers/tsconfig.js +2 -2
- package/dist/lib/utils/options/readers/typedoc.js +1 -1
- package/dist/lib/utils/options/sources/typedoc.js +6 -0
- package/dist/lib/utils/paths.d.ts +7 -0
- package/dist/lib/utils/paths.js +15 -6
- package/dist/lib/utils/sort.d.ts +1 -1
- package/dist/lib/utils/sort.js +9 -1
- package/package.json +9 -9
- package/static/main.js +3 -3
- package/static/style.css +215 -91
package/dist/lib/utils/fs.d.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
export declare function isFile(file: string): boolean;
|
|
2
2
|
export declare function isDir(path: string): boolean;
|
|
3
|
+
export declare function deriveRootDir(globPaths: string[]): string;
|
|
3
4
|
/**
|
|
4
5
|
* Get the longest directory path common to all files.
|
|
5
6
|
*/
|
|
6
7
|
export declare function getCommonDirectory(files: readonly string[]): string;
|
|
7
|
-
/**
|
|
8
|
-
* Normalize the given path.
|
|
9
|
-
*
|
|
10
|
-
* @param path The path that should be normalized.
|
|
11
|
-
* @returns The normalized path.
|
|
12
|
-
*/
|
|
13
|
-
export declare function normalizePath(path: string): string;
|
|
14
8
|
/**
|
|
15
9
|
* Load the given file and return its contents.
|
|
16
10
|
*
|
package/dist/lib/utils/fs.js
CHANGED
|
@@ -23,12 +23,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.findPackageForPath = exports.discoverPackageJson = exports.discoverInParentDirExactMatch = exports.discoverInParentDir = exports.hasTsExtension = exports.glob = exports.copySync = exports.copy = exports.writeFile = exports.writeFileSync = exports.readFile = exports.
|
|
26
|
+
exports.findPackageForPath = exports.discoverPackageJson = exports.discoverInParentDirExactMatch = exports.discoverInParentDir = exports.hasTsExtension = exports.glob = exports.copySync = exports.copy = exports.writeFile = exports.writeFileSync = exports.readFile = exports.getCommonDirectory = exports.deriveRootDir = exports.isDir = exports.isFile = void 0;
|
|
27
27
|
const fs = __importStar(require("fs"));
|
|
28
28
|
const fs_1 = require("fs");
|
|
29
29
|
const minimatch_1 = require("minimatch");
|
|
30
30
|
const path_1 = require("path");
|
|
31
31
|
const validation_1 = require("./validation");
|
|
32
|
+
const paths_1 = require("./paths");
|
|
33
|
+
const array_1 = require("./array");
|
|
32
34
|
function isFile(file) {
|
|
33
35
|
try {
|
|
34
36
|
return fs.statSync(file).isFile();
|
|
@@ -47,6 +49,22 @@ function isDir(path) {
|
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
exports.isDir = isDir;
|
|
52
|
+
function deriveRootDir(globPaths) {
|
|
53
|
+
const normalized = globPaths.map(paths_1.normalizePath);
|
|
54
|
+
const globs = (0, paths_1.createMinimatch)(normalized);
|
|
55
|
+
const rootPaths = globs.flatMap((glob, i) => (0, array_1.filterMap)(glob.set, (set) => {
|
|
56
|
+
const stop = set.findIndex((part) => typeof part !== "string");
|
|
57
|
+
if (stop === -1) {
|
|
58
|
+
return normalized[i];
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
const kept = set.slice(0, stop).join("/");
|
|
62
|
+
return normalized[i].substring(0, normalized[i].indexOf(kept) + kept.length);
|
|
63
|
+
}
|
|
64
|
+
}));
|
|
65
|
+
return getCommonDirectory(rootPaths);
|
|
66
|
+
}
|
|
67
|
+
exports.deriveRootDir = deriveRootDir;
|
|
50
68
|
/**
|
|
51
69
|
* Get the longest directory path common to all files.
|
|
52
70
|
*/
|
|
@@ -65,16 +83,6 @@ function getCommonDirectory(files) {
|
|
|
65
83
|
return roots[0].slice(0, i).join("/");
|
|
66
84
|
}
|
|
67
85
|
exports.getCommonDirectory = getCommonDirectory;
|
|
68
|
-
/**
|
|
69
|
-
* Normalize the given path.
|
|
70
|
-
*
|
|
71
|
-
* @param path The path that should be normalized.
|
|
72
|
-
* @returns The normalized path.
|
|
73
|
-
*/
|
|
74
|
-
function normalizePath(path) {
|
|
75
|
-
return path.replace(/\\/g, "/");
|
|
76
|
-
}
|
|
77
|
-
exports.normalizePath = normalizePath;
|
|
78
86
|
/**
|
|
79
87
|
* Load the given file and return its contents.
|
|
80
88
|
*
|
|
@@ -118,8 +126,8 @@ exports.readFile = readFile;
|
|
|
118
126
|
* @param data The contents of the file.
|
|
119
127
|
*/
|
|
120
128
|
function writeFileSync(fileName, data) {
|
|
121
|
-
fs.mkdirSync((0, path_1.dirname)(normalizePath(fileName)), { recursive: true });
|
|
122
|
-
fs.writeFileSync(normalizePath(fileName), data);
|
|
129
|
+
fs.mkdirSync((0, path_1.dirname)((0, paths_1.normalizePath)(fileName)), { recursive: true });
|
|
130
|
+
fs.writeFileSync((0, paths_1.normalizePath)(fileName), data);
|
|
123
131
|
}
|
|
124
132
|
exports.writeFileSync = writeFileSync;
|
|
125
133
|
/**
|
|
@@ -131,10 +139,10 @@ exports.writeFileSync = writeFileSync;
|
|
|
131
139
|
* @param data The contents of the file.
|
|
132
140
|
*/
|
|
133
141
|
async function writeFile(fileName, data) {
|
|
134
|
-
await fs_1.promises.mkdir((0, path_1.dirname)(normalizePath(fileName)), {
|
|
142
|
+
await fs_1.promises.mkdir((0, path_1.dirname)((0, paths_1.normalizePath)(fileName)), {
|
|
135
143
|
recursive: true,
|
|
136
144
|
});
|
|
137
|
-
await fs_1.promises.writeFile(normalizePath(fileName), data);
|
|
145
|
+
await fs_1.promises.writeFile((0, paths_1.normalizePath)(fileName), data);
|
|
138
146
|
}
|
|
139
147
|
exports.writeFile = writeFile;
|
|
140
148
|
/**
|
|
@@ -175,8 +183,8 @@ exports.copySync = copySync;
|
|
|
175
183
|
*/
|
|
176
184
|
function glob(pattern, root, options = {}) {
|
|
177
185
|
const result = [];
|
|
178
|
-
const mini = new minimatch_1.Minimatch(normalizePath(pattern));
|
|
179
|
-
const dirs = [normalizePath(root).split("/")];
|
|
186
|
+
const mini = new minimatch_1.Minimatch((0, paths_1.normalizePath)(pattern));
|
|
187
|
+
const dirs = [(0, paths_1.normalizePath)(root).split("/")];
|
|
180
188
|
// cache of real paths to avoid infinite recursion
|
|
181
189
|
const symlinkTargetsSeen = new Set();
|
|
182
190
|
// cache of fs.realpathSync results to avoid extra I/O
|