typedoc 0.26.5 → 0.26.7

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.
Files changed (45) hide show
  1. package/dist/lib/application.js +3 -4
  2. package/dist/lib/converter/comments/linkResolver.d.ts +1 -1
  3. package/dist/lib/converter/comments/linkResolver.js +5 -0
  4. package/dist/lib/converter/comments/parser.js +2 -1
  5. package/dist/lib/converter/factories/signature.js +6 -2
  6. package/dist/lib/converter/plugins/CommentPlugin.js +14 -3
  7. package/dist/lib/internationalization/internationalization.js +1 -1
  8. package/dist/lib/internationalization/translatable.d.ts +3 -0
  9. package/dist/lib/internationalization/translatable.js +5 -4
  10. package/dist/lib/models/FileRegistry.js +5 -1
  11. package/dist/lib/models/reflections/declaration.js +2 -0
  12. package/dist/lib/models/reflections/project.d.ts +8 -0
  13. package/dist/lib/models/reflections/project.js +14 -1
  14. package/dist/lib/models/reflections/signature.js +2 -0
  15. package/dist/lib/output/events.d.ts +3 -1
  16. package/dist/lib/output/events.js +9 -5
  17. package/dist/lib/output/plugins/AssetsPlugin.d.ts +2 -2
  18. package/dist/lib/output/plugins/AssetsPlugin.js +19 -3
  19. package/dist/lib/output/plugins/JavascriptIndexPlugin.js +4 -2
  20. package/dist/lib/output/renderer.d.ts +2 -4
  21. package/dist/lib/output/renderer.js +2 -4
  22. package/dist/lib/output/themes/MarkedPlugin.d.ts +1 -0
  23. package/dist/lib/output/themes/MarkedPlugin.js +21 -2
  24. package/dist/lib/output/themes/default/DefaultTheme.js +28 -16
  25. package/dist/lib/output/themes/default/layouts/default.js +1 -0
  26. package/dist/lib/serialization/components.d.ts +1 -1
  27. package/dist/lib/serialization/deserializer.js +0 -1
  28. package/dist/lib/serialization/serializer.d.ts +5 -1
  29. package/dist/lib/serialization/serializer.js +3 -0
  30. package/dist/lib/utils/component.d.ts +1 -1
  31. package/dist/lib/utils/enum.d.ts +3 -3
  32. package/dist/lib/utils/fs.d.ts +1 -0
  33. package/dist/lib/utils/fs.js +4 -0
  34. package/dist/lib/utils/options/declaration.d.ts +4 -0
  35. package/dist/lib/utils/options/readers/typedoc.js +1 -0
  36. package/dist/lib/utils/options/sources/typedoc.js +14 -1
  37. package/dist/lib/utils/options/tsdoc-defaults.d.ts +2 -2
  38. package/dist/lib/utils/options/tsdoc-defaults.js +4 -0
  39. package/dist/lib/utils/perf.d.ts +2 -2
  40. package/dist/lib/utils/plugins.js +1 -0
  41. package/dist/lib/utils/sort.js +2 -2
  42. package/dist/lib/validation/links.js +1 -1
  43. package/package.json +12 -12
  44. package/static/main.js +1 -1
  45. package/tsdoc.json +16 -0
@@ -96,12 +96,11 @@ const links_1 = require("./validation/links");
96
96
  const application_events_1 = require("./application-events");
97
97
  const tsconfig_1 = require("./utils/tsconfig");
98
98
  const fs_1 = require("./utils/fs");
99
- const abstract_1 = require("./models/reflections/abstract");
100
99
  const ReflectionSymbolId_1 = require("./models/reflections/ReflectionSymbolId");
101
100
  const internationalization_1 = require("./internationalization/internationalization");
102
101
  const highlighter_1 = require("./utils/highlighter");
103
102
  const FileRegistry_1 = require("./models/FileRegistry");
104
- // eslint-disable-next-line @typescript-eslint/no-var-requires
103
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
105
104
  const packageInfo = require("../../package.json");
106
105
  const supportedVersionMajorMinor = packageInfo.peerDependencies.typescript
107
106
  .split("||")
@@ -535,12 +534,12 @@ let Application = (() => {
535
534
  projects.push(serialized);
536
535
  }
537
536
  // When debugging memory issues, it's useful to set these
538
- // here so that a breakpoint on resetReflectionID below
537
+ // here so that a breakpoint on the continue statement below
539
538
  // gets the memory as it ought to be with all TS objects released.
540
539
  project = undefined;
541
540
  this.files = undefined;
542
541
  // global.gc!();
543
- (0, abstract_1.resetReflectionID)();
542
+ continue;
544
543
  }
545
544
  this.options = origOptions;
546
545
  this.files = origFiles;
@@ -1,4 +1,4 @@
1
- import { type Comment, type CommentDisplayPart, type Reflection, ReflectionSymbolId } from "../../models";
1
+ import { type Comment, type CommentDisplayPart, Reflection, ReflectionSymbolId } from "../../models";
2
2
  import { type DeclarationReference } from "./declarationReference";
3
3
  export type ExternalResolveResult = {
4
4
  target: string;
@@ -36,6 +36,11 @@ function processPart(reflection, part, externalResolver, options) {
36
36
  return part;
37
37
  }
38
38
  function resolveLinkTag(reflection, part, externalResolver, options) {
39
+ // This tag may have already been resolved to if we are running in packages mode
40
+ // or when reading in a JSON file. #2680.
41
+ if (typeof part.target === "string" || part.target instanceof models_1.Reflection) {
42
+ return part;
43
+ }
39
44
  let defaultDisplayText = "";
40
45
  let pos = 0;
41
46
  const end = part.text.length;
@@ -34,6 +34,7 @@ const lexer_1 = require("./lexer");
34
34
  const tagName_1 = require("./tagName");
35
35
  const FileRegistry_1 = require("../../models/FileRegistry");
36
36
  const textParser_1 = require("./textParser");
37
+ const fs_1 = require("../../utils/fs");
37
38
  function makeLookaheadGenerator(gen) {
38
39
  let trackHistory = false;
39
40
  const history = [];
@@ -80,7 +81,7 @@ function parseComment(tokens, config, file, logger, files) {
80
81
  return comment;
81
82
  function warningImpl(message, token) {
82
83
  if (config.suppressCommentWarningsInDeclarationFiles &&
83
- file.fileName.endsWith(".d.ts")) {
84
+ (0, fs_1.hasDeclarationFileExtension)(file.fileName)) {
84
85
  return;
85
86
  }
86
87
  logger.warn(message, token.pos, file);
@@ -100,6 +100,10 @@ function createConstructSignatureWithType(context, signature, classType) {
100
100
  context.converter.trigger(converter_events_1.ConverterEvents.CREATE_SIGNATURE, context, sigRef, declaration, signature);
101
101
  }
102
102
  function convertParameters(context, sigRef, parameters, parameterNodes) {
103
+ // #2698 if `satisfies` is used to imply a this parameter, we might have
104
+ // more parameters than parameter nodes and need to shift the parameterNode
105
+ // access index. Very ugly, but it does the job.
106
+ const parameterNodeOffset = parameterNodes?.length !== parameters.length ? -1 : 0;
103
107
  return parameters.map((param, i) => {
104
108
  const declaration = param.valueDeclaration;
105
109
  (0, assert_1.default)(!declaration ||
@@ -139,7 +143,7 @@ function convertParameters(context, sigRef, parameters, parameterNodes) {
139
143
  if (isOptional) {
140
144
  paramRefl.type = (0, reflections_1.removeUndefined)(paramRefl.type);
141
145
  }
142
- paramRefl.defaultValue = (0, convert_expression_1.convertDefaultValue)(parameterNodes?.[i]);
146
+ paramRefl.defaultValue = (0, convert_expression_1.convertDefaultValue)(parameterNodes?.[i + parameterNodeOffset]);
143
147
  paramRefl.setFlag(models_1.ReflectionFlag.Optional, isOptional);
144
148
  // If we have no declaration, then this is an implicitly defined parameter in JS land
145
149
  // because the method body uses `arguments`... which is always a rest argument
@@ -151,7 +155,7 @@ function convertParameters(context, sigRef, parameters, parameterNodes) {
151
155
  typescript_1.default.isJSDocVariadicType(declaration.typeExpression.type);
152
156
  }
153
157
  paramRefl.setFlag(models_1.ReflectionFlag.Rest, isRest);
154
- checkForDestructuredParameterDefaults(paramRefl, parameterNodes?.[i]);
158
+ checkForDestructuredParameterDefaults(paramRefl, parameterNodes?.[i + parameterNodeOffset]);
155
159
  return paramRefl;
156
160
  });
157
161
  }
@@ -237,6 +237,15 @@ let CommentPlugin = (() => {
237
237
  if (reflection.kindOf(models_1.ReflectionKind.Interface)) {
238
238
  comment.removeModifier("@interface");
239
239
  }
240
+ if (comment.hasModifier("@abstract")) {
241
+ if (reflection.kindOf(models_1.ReflectionKind.SomeSignature)) {
242
+ reflection.parent.setFlag(models_1.ReflectionFlag.Abstract);
243
+ }
244
+ else {
245
+ reflection.setFlag(models_1.ReflectionFlag.Abstract);
246
+ }
247
+ comment.removeModifier("@abstract");
248
+ }
240
249
  if (comment.hasModifier("@private")) {
241
250
  reflection.setFlag(models_1.ReflectionFlag.Private);
242
251
  if (reflection.kindOf(models_1.ReflectionKind.CallSignature)) {
@@ -406,12 +415,14 @@ let CommentPlugin = (() => {
406
415
  reflection.comment.removeModifier("@hideconstructor");
407
416
  }
408
417
  }
409
- if (reflection instanceof models_1.DeclarationReflection && reflection.comment) {
410
- let sigs;
418
+ if ((reflection instanceof models_1.DeclarationReflection ||
419
+ reflection instanceof models_1.ParameterReflection) &&
420
+ reflection.comment) {
421
+ let sigs = [];
411
422
  if (reflection.type instanceof models_1.ReflectionType) {
412
423
  sigs = reflection.type.declaration.getNonIndexSignatures();
413
424
  }
414
- else {
425
+ else if (reflection instanceof models_1.DeclarationReflection) {
415
426
  sigs = reflection.getNonIndexSignatures();
416
427
  }
417
428
  // For variables and properties, the symbol might own the comment but we might also
@@ -31,7 +31,7 @@ class Internationalization {
31
31
  (0, assert_1.ok)(/^[A-Za-z-]+$/.test(lang), "Locale names may only contain letters and dashes");
32
32
  try {
33
33
  return new Map(
34
- // eslint-disable-next-line @typescript-eslint/no-var-requires
34
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
35
35
  Object.entries(require(`./locales/${lang}.${ext}`)));
36
36
  }
37
37
  catch {
@@ -76,6 +76,7 @@ export declare const translatable: {
76
76
  readonly disable_git_set_and_git_revision_used: "disableGit is set and sourceLinkTemplate contains {gitRevision}, which will be replaced with an empty string as no revision was provided";
77
77
  readonly git_remote_0_not_valid: "The provided git remote \"{0}\" was not valid. Source links will be broken";
78
78
  readonly custom_css_file_0_does_not_exist: "Custom CSS file at {0} does not exist";
79
+ readonly custom_js_file_0_does_not_exist: "Custom JavaScript file at {0} does not exist";
79
80
  readonly unsupported_highlight_language_0_not_highlighted_in_comment_for_1: "Unsupported highlight language {0} will not be highlighted in comment for {1}";
80
81
  readonly unloaded_language_0_not_highlighted_in_comment_for_1: "Code block with language {0} will not be highlighted in comment for {1} as it was not included in the highlightLanguages option";
81
82
  readonly yaml_frontmatter_not_an_object: "Expected YAML frontmatter to be an object";
@@ -144,6 +145,7 @@ export declare const translatable: {
144
145
  readonly help_darkHighlightTheme: "Specify the code highlighting theme in dark mode";
145
146
  readonly help_highlightLanguages: "Specify the languages which will be loaded to highlight code when rendering";
146
147
  readonly help_customCss: "Path to a custom CSS file to for the theme to import";
148
+ readonly help_customJs: "Path to a custom JS file to import";
147
149
  readonly help_markdownItOptions: "Specify the options passed to markdown-it, the Markdown parser used by TypeDoc";
148
150
  readonly help_markdownItLoader: "Specify a callback to be called when loading the markdown-it instance. Will be passed the instance of the parser which TypeDoc will use";
149
151
  readonly help_maxTypeConversionDepth: "Set the maximum depth of types to be converted";
@@ -159,6 +161,7 @@ export declare const translatable: {
159
161
  readonly help_readme: "Path to the readme file that should be displayed on the index page. Pass `none` to disable the index page and start the documentation on the globals page";
160
162
  readonly help_cname: "Set the CNAME file text, it's useful for custom domains on GitHub Pages";
161
163
  readonly help_sourceLinkExternal: "Specifies that source links should be treated as external links to be opened in a new tab";
164
+ readonly help_markdownLinkExternal: "Specifies that http[s]:// links in comments and markdown files should be treated as external links to be opened in a new tab";
162
165
  readonly help_githubPages: "Generate a .nojekyll file to prevent 404 errors in GitHub Pages. Defaults to `true`";
163
166
  readonly help_hostedBaseUrl: "Specify a base URL to be used in generating a sitemap.xml in our output folder and canonical links. If not specified, no sitemap will be generated";
164
167
  readonly help_useHostedBaseUrlForAbsoluteLinks: "If set, TypeDoc will produce absolute links to pages on your site using the hostedBaseUrl option";
@@ -88,6 +88,7 @@ exports.translatable = {
88
88
  git_remote_0_not_valid: `The provided git remote "{0}" was not valid. Source links will be broken`,
89
89
  // output plugins
90
90
  custom_css_file_0_does_not_exist: `Custom CSS file at {0} does not exist`,
91
+ custom_js_file_0_does_not_exist: `Custom JavaScript file at {0} does not exist`,
91
92
  unsupported_highlight_language_0_not_highlighted_in_comment_for_1: `Unsupported highlight language {0} will not be highlighted in comment for {1}`,
92
93
  unloaded_language_0_not_highlighted_in_comment_for_1: `Code block with language {0} will not be highlighted in comment for {1} as it was not included in the highlightLanguages option`,
93
94
  yaml_frontmatter_not_an_object: `Expected YAML frontmatter to be an object`,
@@ -162,6 +163,7 @@ exports.translatable = {
162
163
  help_darkHighlightTheme: "Specify the code highlighting theme in dark mode",
163
164
  help_highlightLanguages: "Specify the languages which will be loaded to highlight code when rendering",
164
165
  help_customCss: "Path to a custom CSS file to for the theme to import",
166
+ help_customJs: "Path to a custom JS file to import",
165
167
  help_markdownItOptions: "Specify the options passed to markdown-it, the Markdown parser used by TypeDoc",
166
168
  help_markdownItLoader: "Specify a callback to be called when loading the markdown-it instance. Will be passed the instance of the parser which TypeDoc will use",
167
169
  help_maxTypeConversionDepth: "Set the maximum depth of types to be converted",
@@ -177,6 +179,7 @@ exports.translatable = {
177
179
  help_readme: "Path to the readme file that should be displayed on the index page. Pass `none` to disable the index page and start the documentation on the globals page",
178
180
  help_cname: "Set the CNAME file text, it's useful for custom domains on GitHub Pages",
179
181
  help_sourceLinkExternal: "Specifies that source links should be treated as external links to be opened in a new tab",
182
+ help_markdownLinkExternal: "Specifies that http[s]:// links in comments and markdown files should be treated as external links to be opened in a new tab",
180
183
  help_githubPages: "Generate a .nojekyll file to prevent 404 errors in GitHub Pages. Defaults to `true`",
181
184
  help_hostedBaseUrl: "Specify a base URL to be used in generating a sitemap.xml in our output folder and canonical links. If not specified, no sitemap will be generated",
182
185
  help_useHostedBaseUrlForAbsoluteLinks: "If set, TypeDoc will produce absolute links to pages on your site using the hostedBaseUrl option",
@@ -356,9 +359,7 @@ exports.translatable = {
356
359
  // Compiler errors here which says a property is missing indicates that the value on translatable
357
360
  // is not a literal string. It should be so that TypeDoc's placeholder replacement detection
358
361
  // can validate that all placeholders have been specified.
359
- const _validateLiteralStrings = {};
360
- _validateLiteralStrings;
362
+ ({});
361
363
  // Compiler errors here which says a property is missing indicates that the key on translatable
362
364
  // contains a placeholder _0/_1, etc. but the value does not match the expected constraint.
363
- const _validatePlaceholdersPresent = exports.translatable;
364
- _validatePlaceholdersPresent;
365
+ exports.translatable;
@@ -85,7 +85,11 @@ class FileRegistry {
85
85
  result.entries[key] = (0, utils_1.normalizePath)((0, path_1.relative)(ser.projectRoot, val));
86
86
  }
87
87
  for (const [key, val] of this.mediaToReflection.entries()) {
88
- result.reflections[key] = val.id;
88
+ // A registry may be shared by multiple projects. When serializing,
89
+ // only save reflection mapping for reflections in the serialized project.
90
+ if (ser.project.getReflectionById(val.id)) {
91
+ result.reflections[key] = val.id;
92
+ }
89
93
  }
90
94
  return result;
91
95
  }
@@ -150,8 +150,10 @@ class DeclarationReflection extends container_1.ContainerReflection {
150
150
  this.type = de.revive(obj.type, (t) => de.constructType(t));
151
151
  this.signatures = de.reviveMany(obj.signatures, (r) => de.constructReflection(r));
152
152
  // TypeDoc 0.25, remove check with 0.28.
153
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
153
154
  if (obj.indexSignature) {
154
155
  this.indexSignatures = [
156
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
155
157
  de.revive(obj.indexSignature, (r) => de.constructReflection(r)),
156
158
  ];
157
159
  }
@@ -1,5 +1,6 @@
1
1
  import { type Reflection } from "./abstract";
2
2
  import { ContainerReflection } from "./container";
3
+ import { type Type } from "../types";
3
4
  import type * as ts from "typescript";
4
5
  import { ReflectionKind } from "./kind";
5
6
  import { type CommentDisplayPart } from "../comments";
@@ -64,6 +65,13 @@ export declare class ProjectReflection extends ContainerReflection {
64
65
  * Should be called for *every* reflection added to the project.
65
66
  */
66
67
  registerReflection(reflection: Reflection, symbol: ts.Symbol | undefined, filePath: string | undefined): void;
68
+ /**
69
+ * Removes references to reflections contained within the provided type.
70
+ * Plugins which overwrite types on reflections should pass the type to this
71
+ * method before overwriting the property.
72
+ * @since 0.26.6
73
+ */
74
+ removeTypeReflections(type: Type | undefined): void;
67
75
  /**
68
76
  * Removes a reflection from the documentation. Can be used by plugins to filter reflections
69
77
  * out of the generated documentation. Has no effect if the reflection is not present in the
@@ -34,7 +34,7 @@ class ProjectReflection extends container_1.ContainerReflection {
34
34
  *
35
35
  * This may be replaced with a `Map<number, Reflection>` someday.
36
36
  */
37
- this.reflections = {};
37
+ this.reflections = { [this.id]: this };
38
38
  this.reflections[this.id] = this;
39
39
  this.files = registry;
40
40
  }
@@ -92,6 +92,19 @@ class ProjectReflection extends container_1.ContainerReflection {
92
92
  this.files.registerReflection(filePath, reflection);
93
93
  }
94
94
  }
95
+ /**
96
+ * Removes references to reflections contained within the provided type.
97
+ * Plugins which overwrite types on reflections should pass the type to this
98
+ * method before overwriting the property.
99
+ * @since 0.26.6
100
+ */
101
+ removeTypeReflections(type) {
102
+ type?.visit((0, types_1.makeRecursiveVisitor)({
103
+ reflection: (type) => {
104
+ this.removeReflection(type.declaration);
105
+ },
106
+ }));
107
+ }
95
108
  /**
96
109
  * Removes a reflection from the documentation. Can be used by plugins to filter reflections
97
110
  * out of the generated documentation. Has no effect if the reflection is not present in the
@@ -61,7 +61,9 @@ class SignatureReflection extends abstract_1.Reflection {
61
61
  fromObject(de, obj) {
62
62
  super.fromObject(de, obj);
63
63
  this.sources = de.reviveMany(obj.sources, (t) => new file_1.SourceReference(t.fileName, t.line, t.character));
64
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
64
65
  if (obj.typeParameter) {
66
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
65
67
  this.typeParameters = de.reviveMany(obj.typeParameter, (t) => de.constructReflection(t));
66
68
  }
67
69
  else {
@@ -57,7 +57,7 @@ export interface PageHeading {
57
57
  * @see {@link Renderer.EVENT_BEGIN_PAGE}
58
58
  * @see {@link Renderer.EVENT_END_PAGE}
59
59
  */
60
- export declare class PageEvent<out Model = unknown> extends Event {
60
+ export declare class PageEvent<out Model = unknown> {
61
61
  /**
62
62
  * The project the renderer is currently processing.
63
63
  */
@@ -107,6 +107,8 @@ export declare class PageEvent<out Model = unknown> extends Event {
107
107
  * @event
108
108
  */
109
109
  static readonly END = "endPage";
110
+ constructor(model: Model);
111
+ /** @deprecated use the single constructor arg instead, will be removed in 0.27 */
110
112
  constructor(name: string, model: Model);
111
113
  }
112
114
  /**
@@ -45,7 +45,7 @@ class RendererEvent {
45
45
  * @returns A newly created {@link PageEvent} instance.
46
46
  */
47
47
  createPageEvent(mapping) {
48
- const event = new PageEvent(PageEvent.BEGIN, mapping.model);
48
+ const event = new PageEvent(mapping.model);
49
49
  event.project = this.project;
50
50
  event.url = mapping.url;
51
51
  event.filename = Path.join(this.outputDirectory, mapping.url);
@@ -70,7 +70,7 @@ RendererEvent.END = "endRender";
70
70
  * @see {@link Renderer.EVENT_BEGIN_PAGE}
71
71
  * @see {@link Renderer.EVENT_END_PAGE}
72
72
  */
73
- class PageEvent extends Event {
73
+ class PageEvent {
74
74
  /**
75
75
  * Start a new section of the page. Sections are collapsible within
76
76
  * the "On This Page" sidebar.
@@ -82,8 +82,7 @@ class PageEvent extends Event {
82
82
  headings: this.pageHeadings,
83
83
  });
84
84
  }
85
- constructor(name, model) {
86
- super(name);
85
+ constructor(nameOrModel, model) {
87
86
  /**
88
87
  * Links to content within this page that should be rendered in the page navigation.
89
88
  * This is built when rendering the document content.
@@ -98,7 +97,12 @@ class PageEvent extends Event {
98
97
  headings: this.pageHeadings,
99
98
  },
100
99
  ];
101
- this.model = model;
100
+ if (typeof nameOrModel === "string") {
101
+ this.model = model;
102
+ }
103
+ else {
104
+ this.model = nameOrModel;
105
+ }
102
106
  }
103
107
  }
104
108
  exports.PageEvent = PageEvent;
@@ -4,8 +4,8 @@ import { RendererComponent } from "../components";
4
4
  * source folder to the output directory.
5
5
  */
6
6
  export declare class AssetsPlugin extends RendererComponent {
7
- /** @internal */
8
- accessor customCss: string;
7
+ private accessor customCss;
8
+ private accessor customJs;
9
9
  getTranslatedStrings(): {
10
10
  copy: import("../../internationalization").TranslatedString;
11
11
  copied: import("../../internationalization").TranslatedString;
@@ -63,7 +63,7 @@ const path_1 = require("path");
63
63
  * source folder to the output directory.
64
64
  */
65
65
  let AssetsPlugin = (() => {
66
- var _AssetsPlugin_customCss_accessor_storage;
66
+ var _AssetsPlugin_customCss_accessor_storage, _AssetsPlugin_customJs_accessor_storage;
67
67
  let _classDecorators = [(0, components_1.Component)({ name: "assets" })];
68
68
  let _classDescriptor;
69
69
  let _classExtraInitializers = [];
@@ -72,10 +72,14 @@ let AssetsPlugin = (() => {
72
72
  let _customCss_decorators;
73
73
  let _customCss_initializers = [];
74
74
  let _customCss_extraInitializers = [];
75
+ let _customJs_decorators;
76
+ let _customJs_initializers = [];
77
+ let _customJs_extraInitializers = [];
75
78
  var AssetsPlugin = _classThis = class extends _classSuper {
76
- /** @internal */
77
79
  get customCss() { return __classPrivateFieldGet(this, _AssetsPlugin_customCss_accessor_storage, "f"); }
78
80
  set customCss(value) { __classPrivateFieldSet(this, _AssetsPlugin_customCss_accessor_storage, value, "f"); }
81
+ get customJs() { return __classPrivateFieldGet(this, _AssetsPlugin_customJs_accessor_storage, "f"); }
82
+ set customJs(value) { __classPrivateFieldSet(this, _AssetsPlugin_customJs_accessor_storage, value, "f"); }
79
83
  getTranslatedStrings() {
80
84
  return {
81
85
  copy: this.application.i18n.theme_copy(),
@@ -100,6 +104,14 @@ let AssetsPlugin = (() => {
100
104
  this.application.logger.error(this.application.i18n.custom_css_file_0_does_not_exist(this.customCss));
101
105
  }
102
106
  }
107
+ if (this.customJs) {
108
+ if ((0, fs_2.existsSync)(this.customJs)) {
109
+ (0, fs_1.copySync)(this.customJs, (0, path_1.join)(dest, "custom.js"));
110
+ }
111
+ else {
112
+ this.application.logger.error(this.application.i18n.custom_js_file_0_does_not_exist(this.customJs));
113
+ }
114
+ }
103
115
  }
104
116
  /**
105
117
  * Triggered before the renderer starts rendering a project.
@@ -128,15 +140,19 @@ let AssetsPlugin = (() => {
128
140
  constructor() {
129
141
  super(...arguments);
130
142
  _AssetsPlugin_customCss_accessor_storage.set(this, __runInitializers(this, _customCss_initializers, void 0));
131
- __runInitializers(this, _customCss_extraInitializers);
143
+ _AssetsPlugin_customJs_accessor_storage.set(this, (__runInitializers(this, _customCss_extraInitializers), __runInitializers(this, _customJs_initializers, void 0)));
144
+ __runInitializers(this, _customJs_extraInitializers);
132
145
  }
133
146
  };
134
147
  _AssetsPlugin_customCss_accessor_storage = new WeakMap();
148
+ _AssetsPlugin_customJs_accessor_storage = new WeakMap();
135
149
  __setFunctionName(_classThis, "AssetsPlugin");
136
150
  (() => {
137
151
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
138
152
  _customCss_decorators = [(0, utils_1.Option)("customCss")];
153
+ _customJs_decorators = [(0, utils_1.Option)("customJs")];
139
154
  __esDecorate(_classThis, null, _customCss_decorators, { kind: "accessor", name: "customCss", static: false, private: false, access: { has: obj => "customCss" in obj, get: obj => obj.customCss, set: (obj, value) => { obj.customCss = value; } }, metadata: _metadata }, _customCss_initializers, _customCss_extraInitializers);
155
+ __esDecorate(_classThis, null, _customJs_decorators, { kind: "accessor", name: "customJs", static: false, private: false, access: { has: obj => "customJs" in obj, get: obj => obj.customJs, set: (obj, value) => { obj.customJs = value; } }, metadata: _metadata }, _customJs_initializers, _customJs_extraInitializers);
140
156
  __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
141
157
  AssetsPlugin = _classThis = _classDescriptor.value;
142
158
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
@@ -180,10 +180,12 @@ let JavascriptIndexPlugin = (() => {
180
180
  comments.push(reflection.comment);
181
181
  if (reflection.isDeclaration()) {
182
182
  reflection.signatures?.forEach((s) => s.comment && comments.push(s.comment));
183
- reflection.getSignature?.comment &&
183
+ if (reflection.getSignature?.comment) {
184
184
  comments.push(reflection.getSignature.comment);
185
- reflection.setSignature?.comment &&
185
+ }
186
+ if (reflection.setSignature?.comment) {
186
187
  comments.push(reflection.setSignature.comment);
188
+ }
187
189
  }
188
190
  if (!comments.length) {
189
191
  return;
@@ -100,13 +100,11 @@ export interface RendererEvents {
100
100
  *
101
101
  * * {@link Renderer.EVENT_BEGIN_PAGE}<br>
102
102
  * Triggered before a document will be rendered. The listener receives an instance of
103
- * {@link PageEvent}. By calling {@link PageEvent.preventDefault} the generation of the
104
- * document can be canceled.
103
+ * {@link PageEvent}.
105
104
  *
106
105
  * * {@link Renderer.EVENT_END_PAGE}<br>
107
106
  * Triggered after a document has been rendered, just before it is written to disc. The
108
- * listener receives an instance of {@link PageEvent}. When calling
109
- * {@link PageEvent.preventDefault} the the document will not be saved to disc.
107
+ * listener receives an instance of {@link PageEvent}.
110
108
  *
111
109
  * * {@link Renderer.EVENT_END}<br>
112
110
  * Triggered after the renderer has written all documents. The listener receives
@@ -108,13 +108,11 @@ const jsx_1 = require("../utils/jsx");
108
108
  *
109
109
  * * {@link Renderer.EVENT_BEGIN_PAGE}<br>
110
110
  * Triggered before a document will be rendered. The listener receives an instance of
111
- * {@link PageEvent}. By calling {@link PageEvent.preventDefault} the generation of the
112
- * document can be canceled.
111
+ * {@link PageEvent}.
113
112
  *
114
113
  * * {@link Renderer.EVENT_END_PAGE}<br>
115
114
  * Triggered after a document has been rendered, just before it is written to disc. The
116
- * listener receives an instance of {@link PageEvent}. When calling
117
- * {@link PageEvent.preventDefault} the the document will not be saved to disc.
115
+ * listener receives an instance of {@link PageEvent}.
118
116
  *
119
117
  * * {@link Renderer.EVENT_END}<br>
120
118
  * Triggered after the renderer has written all documents. The listener receives
@@ -11,6 +11,7 @@ export declare class MarkedPlugin extends ContextAwareRendererComponent {
11
11
  accessor lightTheme: BundledTheme;
12
12
  accessor darkTheme: BundledTheme;
13
13
  accessor markdownItOptions: Record<string, unknown>;
14
+ accessor markdownLinkExternal: boolean;
14
15
  private parser?;
15
16
  /**
16
17
  * This needing to be here really feels hacky... probably some nicer way to do this.
@@ -75,7 +75,7 @@ function getDefaultSlugger(logger) {
75
75
  * @internal
76
76
  */
77
77
  let MarkedPlugin = (() => {
78
- var _MarkedPlugin_lightTheme_accessor_storage, _MarkedPlugin_darkTheme_accessor_storage, _MarkedPlugin_markdownItOptions_accessor_storage;
78
+ var _MarkedPlugin_lightTheme_accessor_storage, _MarkedPlugin_darkTheme_accessor_storage, _MarkedPlugin_markdownItOptions_accessor_storage, _MarkedPlugin_markdownLinkExternal_accessor_storage;
79
79
  let _classDecorators = [(0, components_1.Component)({ name: "marked" })];
80
80
  let _classDescriptor;
81
81
  let _classExtraInitializers = [];
@@ -90,13 +90,17 @@ let MarkedPlugin = (() => {
90
90
  let _markdownItOptions_decorators;
91
91
  let _markdownItOptions_initializers = [];
92
92
  let _markdownItOptions_extraInitializers = [];
93
+ let _markdownLinkExternal_decorators;
94
+ let _markdownLinkExternal_initializers = [];
95
+ let _markdownLinkExternal_extraInitializers = [];
93
96
  var MarkedPlugin = _classThis = class extends _classSuper {
94
97
  constructor() {
95
98
  super(...arguments);
96
99
  _MarkedPlugin_lightTheme_accessor_storage.set(this, __runInitializers(this, _lightTheme_initializers, void 0));
97
100
  _MarkedPlugin_darkTheme_accessor_storage.set(this, (__runInitializers(this, _lightTheme_extraInitializers), __runInitializers(this, _darkTheme_initializers, void 0)));
98
101
  _MarkedPlugin_markdownItOptions_accessor_storage.set(this, (__runInitializers(this, _darkTheme_extraInitializers), __runInitializers(this, _markdownItOptions_initializers, void 0)));
99
- this.parser = __runInitializers(this, _markdownItOptions_extraInitializers);
102
+ _MarkedPlugin_markdownLinkExternal_accessor_storage.set(this, (__runInitializers(this, _markdownItOptions_extraInitializers), __runInitializers(this, _markdownLinkExternal_initializers, void 0)));
103
+ this.parser = __runInitializers(this, _markdownLinkExternal_extraInitializers);
100
104
  /**
101
105
  * This needing to be here really feels hacky... probably some nicer way to do this.
102
106
  * Revisit when adding support for arbitrary pages in 0.26.
@@ -110,6 +114,8 @@ let MarkedPlugin = (() => {
110
114
  set darkTheme(value) { __classPrivateFieldSet(this, _MarkedPlugin_darkTheme_accessor_storage, value, "f"); }
111
115
  get markdownItOptions() { return __classPrivateFieldGet(this, _MarkedPlugin_markdownItOptions_accessor_storage, "f"); }
112
116
  set markdownItOptions(value) { __classPrivateFieldSet(this, _MarkedPlugin_markdownItOptions_accessor_storage, value, "f"); }
117
+ get markdownLinkExternal() { return __classPrivateFieldGet(this, _MarkedPlugin_markdownLinkExternal_accessor_storage, "f"); }
118
+ set markdownLinkExternal(value) { __classPrivateFieldSet(this, _MarkedPlugin_markdownLinkExternal_accessor_storage, value, "f"); }
113
119
  /**
114
120
  * Create a new MarkedPlugin instance.
115
121
  */
@@ -290,6 +296,16 @@ let MarkedPlugin = (() => {
290
296
  const token = tokens[idx];
291
297
  const href = token.attrGet("href")?.replace(/^#(?:md:)?(.+)/, "#md:$1");
292
298
  if (href) {
299
+ // Note: This doesn't catch @link tags to reflections as those
300
+ // will be relative links. This will likely have to change with
301
+ // the introduction of support for customized routers whenever
302
+ // that becomes a real thing.
303
+ if (this.markdownLinkExternal && /https?:\/\//i.test(href)) {
304
+ token.attrSet("target", "_blank");
305
+ const classes = token.attrGet("class")?.split(" ") || [];
306
+ classes.push("external");
307
+ token.attrSet("class", classes.join(" "));
308
+ }
293
309
  token.attrSet("href", href);
294
310
  }
295
311
  return self.renderToken(tokens, idx, options);
@@ -307,15 +323,18 @@ let MarkedPlugin = (() => {
307
323
  _MarkedPlugin_lightTheme_accessor_storage = new WeakMap();
308
324
  _MarkedPlugin_darkTheme_accessor_storage = new WeakMap();
309
325
  _MarkedPlugin_markdownItOptions_accessor_storage = new WeakMap();
326
+ _MarkedPlugin_markdownLinkExternal_accessor_storage = new WeakMap();
310
327
  __setFunctionName(_classThis, "MarkedPlugin");
311
328
  (() => {
312
329
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
313
330
  _lightTheme_decorators = [(0, utils_1.Option)("lightHighlightTheme")];
314
331
  _darkTheme_decorators = [(0, utils_1.Option)("darkHighlightTheme")];
315
332
  _markdownItOptions_decorators = [(0, utils_1.Option)("markdownItOptions")];
333
+ _markdownLinkExternal_decorators = [(0, utils_1.Option)("markdownLinkExternal")];
316
334
  __esDecorate(_classThis, null, _lightTheme_decorators, { kind: "accessor", name: "lightTheme", static: false, private: false, access: { has: obj => "lightTheme" in obj, get: obj => obj.lightTheme, set: (obj, value) => { obj.lightTheme = value; } }, metadata: _metadata }, _lightTheme_initializers, _lightTheme_extraInitializers);
317
335
  __esDecorate(_classThis, null, _darkTheme_decorators, { kind: "accessor", name: "darkTheme", static: false, private: false, access: { has: obj => "darkTheme" in obj, get: obj => obj.darkTheme, set: (obj, value) => { obj.darkTheme = value; } }, metadata: _metadata }, _darkTheme_initializers, _darkTheme_extraInitializers);
318
336
  __esDecorate(_classThis, null, _markdownItOptions_decorators, { kind: "accessor", name: "markdownItOptions", static: false, private: false, access: { has: obj => "markdownItOptions" in obj, get: obj => obj.markdownItOptions, set: (obj, value) => { obj.markdownItOptions = value; } }, metadata: _metadata }, _markdownItOptions_initializers, _markdownItOptions_extraInitializers);
337
+ __esDecorate(_classThis, null, _markdownLinkExternal_decorators, { kind: "accessor", name: "markdownLinkExternal", static: false, private: false, access: { has: obj => "markdownLinkExternal" in obj, get: obj => obj.markdownLinkExternal, set: (obj, value) => { obj.markdownLinkExternal = value; } }, metadata: _metadata }, _markdownLinkExternal_initializers, _markdownLinkExternal_extraInitializers);
319
338
  __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
320
339
  MarkedPlugin = _classThis = _classDescriptor.value;
321
340
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
@@ -258,7 +258,7 @@ class DefaultTheme extends theme_1.Theme {
258
258
  children,
259
259
  };
260
260
  }
261
- if (!element.hasOwnDocument) {
261
+ if (opts.excludeReferences && element instanceof models_1.ReferenceReflection) {
262
262
  return;
263
263
  }
264
264
  return {
@@ -294,16 +294,26 @@ class DefaultTheme extends theme_1.Theme {
294
294
  return (0, utils_1.filterMap)(parent.documents, toNavigation);
295
295
  }
296
296
  if (parent.categories && shouldShowCategories(parent, opts)) {
297
- return (0, utils_1.filterMap)(parent.categories, toNavigation);
297
+ return filterMapWithNoneCollection(parent.categories);
298
298
  }
299
299
  if (parent.groups && shouldShowGroups(parent, opts)) {
300
- return (0, utils_1.filterMap)(parent.groups, toNavigation);
300
+ return filterMapWithNoneCollection(parent.groups);
301
301
  }
302
302
  if (opts.includeFolders && parent.childrenIncludingDocuments?.some((child) => child.name.includes("/"))) {
303
303
  return deriveModuleFolders(parent.childrenIncludingDocuments);
304
304
  }
305
305
  return (0, utils_1.filterMap)(parent.childrenIncludingDocuments, toNavigation);
306
306
  }
307
+ function filterMapWithNoneCollection(reflection) {
308
+ const none = reflection.find((x) => x.title.toLocaleLowerCase() === "none");
309
+ const others = reflection.filter((x) => x.title.toLocaleLowerCase() !== "none");
310
+ const mappedOthers = (0, utils_1.filterMap)(others, toNavigation);
311
+ if (none) {
312
+ const noneMappedChildren = (0, utils_1.filterMap)(none.children, toNavigation);
313
+ return [...noneMappedChildren, ...mappedOthers];
314
+ }
315
+ return mappedOthers;
316
+ }
307
317
  function deriveModuleFolders(children) {
308
318
  const result = [];
309
319
  const resolveOrCreateParents = (path, root = result) => {
@@ -336,19 +346,21 @@ class DefaultTheme extends theme_1.Theme {
336
346
  }
337
347
  // Now merge single-possible-paths together so we don't have folders in our navigation
338
348
  // which contain only another single folder.
339
- const queue = [...result];
340
- while (queue.length) {
341
- const review = queue.shift();
342
- queue.push(...(review.children || []));
343
- if (review.kind || review.path)
344
- continue;
345
- if (review.children?.length === 1) {
346
- const copyFrom = review.children[0];
347
- const fullName = `${review.text}/${copyFrom.text}`;
348
- delete review.children;
349
- Object.assign(review, copyFrom);
350
- review.text = fullName;
351
- queue.push(review);
349
+ if (opts.compactFolders) {
350
+ const queue = [...result];
351
+ while (queue.length) {
352
+ const review = queue.shift();
353
+ queue.push(...(review.children || []));
354
+ if (review.kind || review.path)
355
+ continue;
356
+ if (review.children?.length === 1) {
357
+ const copyFrom = review.children[0];
358
+ const fullName = `${review.text}/${copyFrom.text}`;
359
+ delete review.children;
360
+ Object.assign(review, copyFrom);
361
+ review.text = fullName;
362
+ queue.push(review);
363
+ }
352
364
  }
353
365
  }
354
366
  return result;
@@ -17,6 +17,7 @@ const defaultLayout = (context, template, props) => (utils_1.JSX.createElement("
17
17
  utils_1.JSX.createElement("link", { rel: "stylesheet", href: context.relativeURL("assets/highlight.css", true) }),
18
18
  context.options.getValue("customCss") && (utils_1.JSX.createElement("link", { rel: "stylesheet", href: context.relativeURL("assets/custom.css", true) })),
19
19
  utils_1.JSX.createElement("script", { defer: true, src: context.relativeURL("assets/main.js", true) }),
20
+ context.options.getValue("customJs") && (utils_1.JSX.createElement("script", { defer: true, src: context.relativeURL("assets/custom.js", true) })),
20
21
  utils_1.JSX.createElement("script", { async: true, src: context.relativeURL("assets/icons.js", true), id: "tsd-icons-script" }),
21
22
  utils_1.JSX.createElement("script", { async: true, src: context.relativeURL("assets/search.js", true), id: "tsd-search-script" }),
22
23
  utils_1.JSX.createElement("script", { async: true, src: context.relativeURL("assets/navigation.js", true), id: "tsd-nav-script" }),
@@ -9,7 +9,7 @@ import type { ModelToObject } from "./schema";
9
9
  * Additionally, each {@link Serializer} plugin must define a predicate that instructs the group
10
10
  * it belongs to.
11
11
  */
12
- export interface SerializerComponent<T extends {}> {
12
+ export interface SerializerComponent<T extends object> {
13
13
  /**
14
14
  * The priority this serializer should be executed with.
15
15
  * A higher priority means the {@link Serializer} will be applied earlier.
@@ -118,7 +118,6 @@ class Deserializer {
118
118
  reviveProject(projectObj, name, projectRoot, registry) {
119
119
  (0, assert_1.ok)(this.deferred.length === 0, "Deserializer.defer was called when not deserializing");
120
120
  const project = new index_1.ProjectReflection(name || projectObj.name, registry);
121
- project.registerReflection(project, undefined, undefined);
122
121
  this.project = project;
123
122
  this.projectRoot = projectRoot;
124
123
  this.oldIdToNewId = { [projectObj.id]: project.id };
@@ -23,7 +23,11 @@ export declare class Serializer extends EventDispatcher<SerializerEvents> {
23
23
  * Only set when serializing.
24
24
  */
25
25
  projectRoot: string;
26
- addSerializer<T extends {}>(serializer: SerializerComponent<T>): void;
26
+ /**
27
+ * Only set when serializing
28
+ */
29
+ project: ProjectReflection;
30
+ addSerializer<T extends object>(serializer: SerializerComponent<T>): void;
27
31
  toObject<T extends {
28
32
  toObject(serializer: Serializer): ModelToObject<T>;
29
33
  }>(value: T): ModelToObject<T>;
@@ -32,11 +32,14 @@ class Serializer extends utils_1.EventDispatcher {
32
32
  */
33
33
  projectToObject(value, projectRoot) {
34
34
  this.projectRoot = projectRoot;
35
+ this.project = value;
35
36
  const eventBegin = new events_1.SerializeEvent(value);
36
37
  this.trigger(Serializer.EVENT_BEGIN, eventBegin);
37
38
  const project = this.toObject(value);
38
39
  const eventEnd = new events_1.SerializeEvent(value, project);
39
40
  this.trigger(Serializer.EVENT_END, eventEnd);
41
+ this.project = undefined;
42
+ this.projectRoot = undefined;
40
43
  return project;
41
44
  }
42
45
  }
@@ -8,7 +8,7 @@ export interface ComponentHost {
8
8
  }
9
9
  export interface Component<E extends Record<keyof E, unknown[]> = {}> extends AbstractComponent<ComponentHost, E> {
10
10
  }
11
- export interface ComponentClass<T extends Component, O extends ComponentHost = ComponentHost> extends Function {
11
+ export interface ComponentClass<T extends Component, O extends ComponentHost = ComponentHost> {
12
12
  new (owner: O): T;
13
13
  }
14
14
  /**
@@ -2,8 +2,8 @@ export declare function getEnumFlags<T extends number>(flags: T): T[];
2
2
  export declare function removeFlag<T extends number>(flag: T, remove: T & {}): T;
3
3
  export declare function hasAllFlags(flags: number, check: number): boolean;
4
4
  export declare function hasAnyFlag(flags: number, check: number): boolean;
5
- export declare function debugFlags(Enum: {}, flags: number): string[];
6
- export declare function getEnumKeys(Enum: {}): string[];
7
- export type EnumKeys<E extends {}> = {
5
+ export declare function debugFlags(Enum: object, flags: number): string[];
6
+ export declare function getEnumKeys(Enum: object): string[];
7
+ export type EnumKeys<E extends object> = {
8
8
  [K in keyof E]: number extends E[K] ? K : never;
9
9
  }[keyof E] & {};
@@ -43,6 +43,7 @@ export declare function glob(pattern: string, root: string, options?: {
43
43
  followSymlinks?: boolean;
44
44
  }): string[];
45
45
  export declare function hasTsExtension(path: string): boolean;
46
+ export declare function hasDeclarationFileExtension(path: string): boolean;
46
47
  export declare function discoverInParentDir<T extends {}>(name: string, dir: string, read: (content: string) => T | undefined): {
47
48
  file: string;
48
49
  content: T;
@@ -34,6 +34,7 @@ exports.copy = copy;
34
34
  exports.copySync = copySync;
35
35
  exports.glob = glob;
36
36
  exports.hasTsExtension = hasTsExtension;
37
+ exports.hasDeclarationFileExtension = hasDeclarationFileExtension;
37
38
  exports.discoverInParentDir = discoverInParentDir;
38
39
  exports.discoverInParentDirExactMatch = discoverInParentDirExactMatch;
39
40
  exports.discoverPackageJson = discoverPackageJson;
@@ -277,6 +278,9 @@ function glob(pattern, root, options = {}) {
277
278
  function hasTsExtension(path) {
278
279
  return /\.[cm]?ts$|\.tsx$/.test(path);
279
280
  }
281
+ function hasDeclarationFileExtension(path) {
282
+ return /\.d\.[cm]?ts$/.test(path);
283
+ }
280
284
  function discoverInParentDir(name, dir, read) {
281
285
  if (!isDir(dir))
282
286
  return;
@@ -85,6 +85,7 @@ export interface TypeDocOptionMap {
85
85
  disableSources: boolean;
86
86
  sourceLinkTemplate: string;
87
87
  sourceLinkExternal: boolean;
88
+ markdownLinkExternal: boolean;
88
89
  disableGit: boolean;
89
90
  gitRevision: string;
90
91
  gitRemote: string;
@@ -98,6 +99,7 @@ export interface TypeDocOptionMap {
98
99
  darkHighlightTheme: ShikiTheme;
99
100
  highlightLanguages: string[];
100
101
  customCss: string;
102
+ customJs: string;
101
103
  markdownItOptions: ManuallyValidatedOption<Record<string, unknown>>;
102
104
  /**
103
105
  * Will be called when TypeDoc is setting up the markdown parser to use to render markdown.
@@ -141,6 +143,8 @@ export interface TypeDocOptionMap {
141
143
  includeCategories: boolean;
142
144
  includeGroups: boolean;
143
145
  includeFolders: boolean;
146
+ compactFolders: boolean;
147
+ excludeReferences: boolean;
144
148
  };
145
149
  visibilityFilters: ManuallyValidatedOption<{
146
150
  protected?: boolean;
@@ -91,6 +91,7 @@ class TypeDocReader {
91
91
  else {
92
92
  try {
93
93
  try {
94
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
94
95
  fileContent = await require(file);
95
96
  }
96
97
  catch (error) {
@@ -298,6 +298,11 @@ function addTypeDocOptions(options) {
298
298
  help: (i18n) => i18n.help_customCss(),
299
299
  type: declaration_1.ParameterType.Path,
300
300
  });
301
+ options.addDeclaration({
302
+ name: "customJs",
303
+ help: (i18n) => i18n.help_customJs(),
304
+ type: declaration_1.ParameterType.Path,
305
+ });
301
306
  options.addDeclaration({
302
307
  name: "markdownItOptions",
303
308
  help: (i18n) => i18n.help_markdownItOptions(),
@@ -393,6 +398,12 @@ function addTypeDocOptions(options) {
393
398
  help: (i18n) => i18n.help_sourceLinkExternal(),
394
399
  type: declaration_1.ParameterType.Boolean,
395
400
  });
401
+ options.addDeclaration({
402
+ name: "markdownLinkExternal",
403
+ help: (i18n) => i18n.help_markdownLinkExternal(),
404
+ type: declaration_1.ParameterType.Boolean,
405
+ defaultValue: true,
406
+ });
396
407
  options.addDeclaration({
397
408
  name: "githubPages",
398
409
  help: (i18n) => i18n.help_githubPages(),
@@ -403,7 +414,7 @@ function addTypeDocOptions(options) {
403
414
  name: "hostedBaseUrl",
404
415
  help: (i18n) => i18n.help_hostedBaseUrl(),
405
416
  validate(value, i18n) {
406
- if (!/https?:\/\//.test(value)) {
417
+ if (!/https?:\/\//i.test(value)) {
407
418
  throw new Error(i18n.hostedBaseUrl_must_start_with_http());
408
419
  }
409
420
  },
@@ -501,6 +512,8 @@ function addTypeDocOptions(options) {
501
512
  includeCategories: false,
502
513
  includeGroups: false,
503
514
  includeFolders: true,
515
+ compactFolders: true,
516
+ excludeReferences: false,
504
517
  },
505
518
  });
506
519
  options.addDeclaration({
@@ -1,6 +1,6 @@
1
1
  export declare const tsdocBlockTags: readonly ["@defaultValue", "@deprecated", "@example", "@param", "@privateRemarks", "@remarks", "@returns", "@see", "@throws", "@typeParam"];
2
- export declare const blockTags: readonly ["@defaultValue", "@deprecated", "@example", "@param", "@privateRemarks", "@remarks", "@returns", "@see", "@throws", "@typeParam", "@author", "@callback", "@category", "@categoryDescription", "@default", "@document", "@group", "@groupDescription", "@import", "@inheritDoc", "@jsx", "@license", "@module", "@prop", "@property", "@return", "@satisfies", "@since", "@template", "@type", "@typedef"];
2
+ export declare const blockTags: readonly ["@defaultValue", "@deprecated", "@example", "@param", "@privateRemarks", "@remarks", "@returns", "@see", "@throws", "@typeParam", "@author", "@callback", "@category", "@categoryDescription", "@default", "@document", "@extends", "@augments", "@yields", "@group", "@groupDescription", "@import", "@inheritDoc", "@jsx", "@license", "@module", "@prop", "@property", "@return", "@satisfies", "@since", "@template", "@type", "@typedef"];
3
3
  export declare const tsdocInlineTags: readonly ["@link", "@inheritDoc", "@label"];
4
4
  export declare const inlineTags: readonly ["@link", "@inheritDoc", "@label", "@linkcode", "@linkplain"];
5
5
  export declare const tsdocModifierTags: readonly ["@alpha", "@beta", "@eventProperty", "@experimental", "@internal", "@override", "@packageDocumentation", "@public", "@readonly", "@sealed", "@virtual"];
6
- export declare const modifierTags: readonly ["@alpha", "@beta", "@eventProperty", "@experimental", "@internal", "@override", "@packageDocumentation", "@public", "@readonly", "@sealed", "@virtual", "@class", "@enum", "@event", "@hidden", "@hideCategories", "@hideconstructor", "@hideGroups", "@ignore", "@interface", "@namespace", "@overload", "@private", "@protected", "@showCategories", "@showGroups"];
6
+ export declare const modifierTags: readonly ["@alpha", "@beta", "@eventProperty", "@experimental", "@internal", "@override", "@packageDocumentation", "@public", "@readonly", "@sealed", "@virtual", "@abstract", "@class", "@enum", "@event", "@hidden", "@hideCategories", "@hideconstructor", "@hideGroups", "@ignore", "@interface", "@namespace", "@overload", "@private", "@protected", "@showCategories", "@showGroups"];
@@ -22,6 +22,9 @@ exports.blockTags = [
22
22
  "@categoryDescription",
23
23
  "@default",
24
24
  "@document",
25
+ "@extends",
26
+ "@augments", //Alias for @extends
27
+ "@yields",
25
28
  "@group",
26
29
  "@groupDescription",
27
30
  "@import",
@@ -59,6 +62,7 @@ exports.tsdocModifierTags = [
59
62
  ];
60
63
  exports.modifierTags = [
61
64
  ...exports.tsdocModifierTags,
65
+ "@abstract",
62
66
  "@class",
63
67
  "@enum",
64
68
  "@event",
@@ -1,3 +1,3 @@
1
- export declare function bench<T extends Function>(fn: T, name?: string): T;
2
- export declare function Bench<T extends Function>(value: T, context: ClassMethodDecoratorContext): (this: any, ...args: any) => any;
1
+ export declare function bench<T extends (..._: any) => any>(fn: T, name?: string): T;
2
+ export declare function Bench<T extends (..._: any) => any>(value: T, context: ClassMethodDecoratorContext): T;
3
3
  export declare function measure<T>(cb: () => T): T;
@@ -10,6 +10,7 @@ async function loadPlugins(app, plugins) {
10
10
  try {
11
11
  let instance;
12
12
  try {
13
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
13
14
  instance = require(plugin);
14
15
  }
15
16
  catch (error) {
@@ -46,14 +46,14 @@ const sorts = {
46
46
  return false;
47
47
  },
48
48
  alphabetical(a, b) {
49
- return a.name < b.name;
49
+ return a.name.localeCompare(b.name) < 0;
50
50
  },
51
51
  "alphabetical-ignoring-documents"(a, b) {
52
52
  if (a.kindOf(kind_1.ReflectionKind.Document) ||
53
53
  b.kindOf(kind_1.ReflectionKind.Document)) {
54
54
  return false;
55
55
  }
56
- return a.name < b.name;
56
+ return a.name.localeCompare(b.name) < 0;
57
57
  },
58
58
  "enum-value-ascending"(a, b) {
59
59
  if (a.kind == kind_1.ReflectionKind.EnumMember &&
@@ -8,7 +8,7 @@ function getBrokenPartLinks(parts) {
8
8
  for (const part of parts) {
9
9
  if (part.kind === "inline-tag" &&
10
10
  linkTags.includes(part.tag) &&
11
- !part.target) {
11
+ (!part.target || part.target instanceof models_1.ReflectionSymbolId)) {
12
12
  links.push(part.text.trim());
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typedoc",
3
3
  "description": "Create api documentation for TypeScript projects.",
4
- "version": "0.26.5",
4
+ "version": "0.26.7",
5
5
  "homepage": "https://typedoc.org",
6
6
  "exports": {
7
7
  ".": "./dist/index.js",
@@ -27,27 +27,27 @@
27
27
  "lunr": "^2.3.9",
28
28
  "markdown-it": "^14.1.0",
29
29
  "minimatch": "^9.0.5",
30
- "shiki": "^1.9.1",
31
- "yaml": "^2.4.5"
30
+ "shiki": "^1.16.2",
31
+ "yaml": "^2.5.1"
32
32
  },
33
33
  "peerDependencies": {
34
- "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x"
34
+ "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/lunr": "^2.3.7",
38
- "@types/markdown-it": "^14.1.1",
38
+ "@types/markdown-it": "^14.1.2",
39
39
  "@types/mocha": "^10.0.7",
40
40
  "@types/node": "18",
41
41
  "@typestrong/fs-fixture-builder": "github:TypeStrong/fs-fixture-builder#34113409e3a171e68ce5e2b55461ef5c35591cfe",
42
42
  "c8": "^10.1.2",
43
- "esbuild": "^0.21.5",
44
- "eslint": "^9.5.0",
45
- "mocha": "^10.5.2",
46
- "prettier": "3.3.2",
47
- "puppeteer": "^22.12.1",
43
+ "esbuild": "^0.23.1",
44
+ "eslint": "^9.9.1",
45
+ "mocha": "^10.7.3",
46
+ "prettier": "3.3.3",
47
+ "puppeteer": "^23.3.0",
48
48
  "ts-node": "^10.9.2",
49
- "typescript": "5.5.2",
50
- "typescript-eslint": "^7.14.1"
49
+ "typescript": "5.6.1-rc",
50
+ "typescript-eslint": "^8.4.0"
51
51
  },
52
52
  "files": [
53
53
  "/bin",
package/static/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";(()=>{var Pe=Object.create;var ie=Object.defineProperty;var Oe=Object.getOwnPropertyDescriptor;var _e=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var Fe=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _e(e))!Me.call(t,i)&&i!==n&&ie(t,i,{get:()=>e[i],enumerable:!(r=Oe(e,i))||r.enumerable});return t};var Ae=(t,e,n)=>(n=t!=null?Pe(Re(t)):{},De(e||!t||!t.__esModule?ie(n,"default",{value:t,enumerable:!0}):n,t));var ue=Fe((ae,le)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var s=r[i],o=e[s];if(Array.isArray(o)){n[s]=o.slice();continue}if(typeof o=="string"||typeof o=="number"||typeof o=="boolean"){n[s]=o;continue}throw new TypeError("clone is not deep and does not support nested objects")}return n},t.FieldRef=function(e,n,r){this.docRef=e,this.fieldName=n,this._stringValue=r},t.FieldRef.joiner="/",t.FieldRef.fromString=function(e){var n=e.indexOf(t.FieldRef.joiner);if(n===-1)throw"malformed field ref string";var r=e.slice(0,n),i=e.slice(n+1);return new t.FieldRef(i,r,e)},t.FieldRef.prototype.toString=function(){return this._stringValue==null&&(this._stringValue=this.fieldName+t.FieldRef.joiner+this.docRef),this._stringValue};t.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var n=0;n<this.length;n++)this.elements[e[n]]=!0}else this.length=0},t.Set.complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},t.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},t.Set.prototype.contains=function(e){return!!this.elements[e]},t.Set.prototype.intersect=function(e){var n,r,i,s=[];if(e===t.Set.complete)return this;if(e===t.Set.empty)return e;this.length<e.length?(n=this,r=e):(n=e,r=this),i=Object.keys(n.elements);for(var o=0;o<i.length;o++){var a=i[o];a in r.elements&&s.push(a)}return new t.Set(s)},t.Set.prototype.union=function(e){return e===t.Set.complete?t.Set.complete:e===t.Set.empty?this:new t.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},t.idf=function(e,n){var r=0;for(var i in e)i!="_index"&&(r+=Object.keys(e[i]).length);var s=(n-r+.5)/(r+.5);return Math.log(1+Math.abs(s))},t.Token=function(e,n){this.str=e||"",this.metadata=n||{}},t.Token.prototype.toString=function(){return this.str},t.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},t.Token.prototype.clone=function(e){return e=e||function(n){return n},new t.Token(e(this.str,this.metadata),this.metadata)};t.tokenizer=function(e,n){if(e==null||e==null)return[];if(Array.isArray(e))return e.map(function(m){return new t.Token(t.utils.asString(m).toLowerCase(),t.utils.clone(n))});for(var r=e.toString().toLowerCase(),i=r.length,s=[],o=0,a=0;o<=i;o++){var l=r.charAt(o),u=o-a;if(l.match(t.tokenizer.separator)||o==i){if(u>0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index.
2
2
  `,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r<n;r++){for(var i=this._stack[r],s=[],o=0;o<e.length;o++){var a=i(e[o],o,e);if(!(a==null||a===""))if(Array.isArray(a))for(var l=0;l<a.length;l++)s.push(a[l]);else s.push(a)}e=s}return e},t.Pipeline.prototype.runString=function(e,n){var r=new t.Token(e,n);return this.run([r]).map(function(i){return i.toString()})},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})};t.Vector=function(e){this._magnitude=0,this.elements=e||[]},t.Vector.prototype.positionForIndex=function(e){if(this.elements.length==0)return 0;for(var n=0,r=this.elements.length/2,i=r-n,s=Math.floor(i/2),o=this.elements[s*2];i>1&&(o<e&&(n=s),o>e&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(o<e)return(s+1)*2},t.Vector.prototype.insert=function(e,n){this.upsert(e,n,function(){throw"duplicate index"})},t.Vector.prototype.upsert=function(e,n,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],n):this.elements.splice(i,0,e,n)},t.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,n=this.elements.length,r=1;r<n;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},t.Vector.prototype.dot=function(e){for(var n=0,r=this.elements,i=e.elements,s=r.length,o=i.length,a=0,l=0,u=0,d=0;u<s&&d<o;)a=r[u],l=i[d],a<l?u+=2:a>l?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n<this.elements.length;n+=2,r++)e[r]=this.elements[n];return e},t.Vector.prototype.toJSON=function(){return this.elements};t.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},r="[^aeiou]",i="[aeiouy]",s=r+"[^aeiouy]*",o=i+"[aeiou]*",a="^("+s+")?"+o+s,l="^("+s+")?"+o+s+"("+o+")?$",u="^("+s+")?"+o+s+o+s,d="^("+s+")?"+i,m=new RegExp(a),p=new RegExp(u),b=new RegExp(l),g=new RegExp(d),L=/^(.+?)(ss|i)es$/,f=/^(.+?)([^s])s$/,y=/^(.+?)eed$/,S=/^(.+?)(ed|ing)$/,w=/.$/,k=/(at|bl|iz)$/,_=new RegExp("([^aeiouylsz])\\1$"),B=new RegExp("^"+s+i+"[^aeiouwxy]$"),A=/^(.+?[^aeiou])y$/,j=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,q=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,V=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,$=/^(.+?)(s|t)(ion)$/,C=/^(.+?)e$/,z=/ll$/,W=new RegExp("^"+s+i+"[^aeiouwxy]$"),H=function(c){var v,P,T,h,x,O,M;if(c.length<3)return c;if(T=c.substr(0,1),T=="y"&&(c=T.toUpperCase()+c.substr(1)),h=L,x=f,h.test(c)?c=c.replace(h,"$1$2"):x.test(c)&&(c=c.replace(x,"$1$2")),h=y,x=S,h.test(c)){var E=h.exec(c);h=m,h.test(E[1])&&(h=w,c=c.replace(h,""))}else if(x.test(c)){var E=x.exec(c);v=E[1],x=g,x.test(v)&&(c=v,x=k,O=_,M=B,x.test(c)?c=c+"e":O.test(c)?(h=w,c=c.replace(h,"")):M.test(c)&&(c=c+"e"))}if(h=A,h.test(c)){var E=h.exec(c);v=E[1],c=v+"i"}if(h=j,h.test(c)){var E=h.exec(c);v=E[1],P=E[2],h=m,h.test(v)&&(c=v+e[P])}if(h=q,h.test(c)){var E=h.exec(c);v=E[1],P=E[2],h=m,h.test(v)&&(c=v+n[P])}if(h=V,x=$,h.test(c)){var E=h.exec(c);v=E[1],h=p,h.test(v)&&(c=v)}else if(x.test(c)){var E=x.exec(c);v=E[1]+E[2],x=p,x.test(v)&&(c=v)}if(h=C,h.test(c)){var E=h.exec(c);v=E[1],h=p,x=b,O=W,(h.test(v)||x.test(v)&&!O.test(v))&&(c=v)}return h=z,x=p,h.test(c)&&x.test(c)&&(h=w,c=c.replace(h,"")),T=="y"&&(c=T.toLowerCase()+c.substr(1)),c};return function(R){return R.update(H)}}(),t.Pipeline.registerFunction(t.stemmer,"stemmer");t.generateStopWordFilter=function(e){var n=e.reduce(function(r,i){return r[i]=i,r},{});return function(r){if(r&&n[r.toString()]!==r.toString())return r}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter");t.trimmer=function(e){return e.update(function(n){return n.replace(/^\W+/,"").replace(/\W+$/,"")})},t.Pipeline.registerFunction(t.trimmer,"trimmer");t.TokenSet=function(){this.final=!1,this.edges={},this.id=t.TokenSet._nextId,t.TokenSet._nextId+=1},t.TokenSet._nextId=1,t.TokenSet.fromArray=function(e){for(var n=new t.TokenSet.Builder,r=0,i=e.length;r<i;r++)n.insert(e[r]);return n.finish(),n.root},t.TokenSet.fromClause=function(e){return"editDistance"in e?t.TokenSet.fromFuzzyString(e.term,e.editDistance):t.TokenSet.fromString(e.term)},t.TokenSet.fromFuzzyString=function(e,n){for(var r=new t.TokenSet,i=[{node:r,editsRemaining:n,str:e}];i.length;){var s=i.pop();if(s.str.length>0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),m=s.str.charAt(1),p;m in s.node.edges?p=s.node.edges[m]:(p=new t.TokenSet,s.node.edges[m]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i<s;i++){var o=e[i],a=i==s-1;if(o=="*")n.edges[o]=n,n.final=a;else{var l=new t.TokenSet;l.final=a,n.edges[o]=l,n=l}}return r},t.TokenSet.prototype.toArray=function(){for(var e=[],n=[{prefix:"",node:this}];n.length;){var r=n.pop(),i=Object.keys(r.node.edges),s=i.length;r.node.final&&(r.prefix.charAt(0),e.push(r.prefix));for(var o=0;o<s;o++){var a=i[o];n.push({prefix:r.prefix.concat(a),node:r.node.edges[a]})}}return e},t.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",n=Object.keys(this.edges).sort(),r=n.length,i=0;i<r;i++){var s=n[i],o=this.edges[s];e=e+s+o.id}return e},t.TokenSet.prototype.intersect=function(e){for(var n=new t.TokenSet,r=void 0,i=[{qNode:e,output:n,node:this}];i.length;){r=i.pop();for(var s=Object.keys(r.qNode.edges),o=s.length,a=Object.keys(r.node.edges),l=a.length,u=0;u<o;u++)for(var d=s[u],m=0;m<l;m++){var p=a[m];if(p==d||d=="*"){var b=r.node.edges[p],g=r.qNode.edges[d],L=b.final&&g.final,f=void 0;p in r.output.edges?(f=r.output.edges[p],f.final=f.final||L):(f=new t.TokenSet,f.final=L,r.output.edges[p]=f),i.push({qNode:g,output:f,node:b})}}}return n},t.TokenSet.Builder=function(){this.previousWord="",this.root=new t.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},t.TokenSet.Builder.prototype.insert=function(e){var n,r=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<e.length&&i<this.previousWord.length&&e[i]==this.previousWord[i];i++)r++;this.minimize(r),this.uncheckedNodes.length==0?n=this.root:n=this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var i=r;i<e.length;i++){var s=new t.TokenSet,o=e[i];n.edges[o]=s,this.uncheckedNodes.push({parent:n,char:o,child:s}),n=s}n.final=!0,this.previousWord=e},t.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},t.TokenSet.Builder.prototype.minimize=function(e){for(var n=this.uncheckedNodes.length-1;n>=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l<this.fields.length;l++)i[this.fields[l]]=new t.Vector;e.call(n,n);for(var l=0;l<n.clauses.length;l++){var u=n.clauses[l],d=null,m=t.Set.empty;u.usePipeline?d=this.pipeline.runString(u.term,{fields:u.fields}):d=[u.term];for(var p=0;p<d.length;p++){var b=d[p];u.term=b;var g=t.TokenSet.fromClause(u),L=this.tokenSet.intersect(g).toArray();if(L.length===0&&u.presence===t.Query.presence.REQUIRED){for(var f=0;f<u.fields.length;f++){var y=u.fields[f];o[y]=t.Set.empty}break}for(var S=0;S<L.length;S++)for(var w=L[S],k=this.invertedIndex[w],_=k._index,f=0;f<u.fields.length;f++){var y=u.fields[f],B=k[y],A=Object.keys(B),j=w+"/"+y,q=new t.Set(A);if(u.presence==t.Query.presence.REQUIRED&&(m=m.union(q),o[y]===void 0&&(o[y]=t.Set.complete)),u.presence==t.Query.presence.PROHIBITED){a[y]===void 0&&(a[y]=t.Set.empty),a[y]=a[y].union(q);continue}if(i[y].upsert(_,u.boost,function(Ie,Ce){return Ie+Ce}),!s[j]){for(var V=0;V<A.length;V++){var $=A[V],C=new t.FieldRef($,y),z=B[$],W;(W=r[C])===void 0?r[C]=new t.MatchData(w,y,z):W.add(w,y,z)}s[j]=!0}}}if(u.presence===t.Query.presence.REQUIRED)for(var f=0;f<u.fields.length;f++){var y=u.fields[f];o[y]=o[y].intersect(m)}}for(var H=t.Set.complete,R=t.Set.empty,l=0;l<this.fields.length;l++){var y=this.fields[l];o[y]&&(H=H.intersect(o[y])),a[y]&&(R=R.union(a[y]))}var c=Object.keys(r),v=[],P=Object.create(null);if(n.isNegated()){c=Object.keys(this.fieldVectors);for(var l=0;l<c.length;l++){var C=c[l],T=t.FieldRef.fromString(C);r[C]=new t.MatchData}}for(var l=0;l<c.length;l++){var T=t.FieldRef.fromString(c[l]),h=T.docRef;if(H.contains(h)&&!R.contains(h)){var x=this.fieldVectors[T],O=i[T.fieldName].similarity(x),M;if((M=P[h])!==void 0)M.score+=O,M.matchData.combine(r[T]);else{var E={ref:h,score:O,matchData:r[T]};P[h]=E,v.push(E)}}}return v.sort(function(ke,Qe){return Qe.score-ke.score})},t.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map(function(r){return[r,this.invertedIndex[r]]},this),n=Object.keys(this.fieldVectors).map(function(r){return[r,this.fieldVectors[r].toJSON()]},this);return{version:t.version,fields:this.fields,fieldVectors:n,invertedIndex:e,pipeline:this.pipeline.toJSON()}},t.Index.load=function(e){var n={},r={},i=e.fieldVectors,s=Object.create(null),o=e.invertedIndex,a=new t.TokenSet.Builder,l=t.Pipeline.load(e.pipeline);e.version!=t.version&&t.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+t.version+"' does not match serialized index '"+e.version+"'");for(var u=0;u<i.length;u++){var d=i[u],m=d[0],p=d[1];r[m]=new t.Vector(p)}for(var u=0;u<o.length;u++){var d=o[u],b=d[0],g=d[1];a.insert(b),s[b]=g}return a.finish(),n.fields=e.fields,n.fieldVectors=r,n.invertedIndex=s,n.tokenSet=a.root,n.pipeline=l,new t.Index(n)};t.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=t.tokenizer,this.pipeline=new t.Pipeline,this.searchPipeline=new t.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},t.Builder.prototype.ref=function(e){this._ref=e},t.Builder.prototype.field=function(e,n){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=n||{}},t.Builder.prototype.b=function(e){e<0?this._b=0:e>1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s<i.length;s++){var o=i[s],a=this._fields[o].extractor,l=a?a(e):e[o],u=this.tokenizer(l,{fields:[o]}),d=this.pipeline.run(u),m=new t.FieldRef(r,o),p=Object.create(null);this.fieldTermFrequencies[m]=p,this.fieldLengths[m]=0,this.fieldLengths[m]+=d.length;for(var b=0;b<d.length;b++){var g=d[b];if(p[g]==null&&(p[g]=0),p[g]+=1,this.invertedIndex[g]==null){var L=Object.create(null);L._index=this.termIndex,this.termIndex+=1;for(var f=0;f<i.length;f++)L[i[f]]=Object.create(null);this.invertedIndex[g]=L}this.invertedIndex[g][o][r]==null&&(this.invertedIndex[g][o][r]=Object.create(null));for(var y=0;y<this.metadataWhitelist.length;y++){var S=this.metadataWhitelist[y],w=g.metadata[S];this.invertedIndex[g][o][r][S]==null&&(this.invertedIndex[g][o][r][S]=[]),this.invertedIndex[g][o][r][S].push(w)}}}},t.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),n=e.length,r={},i={},s=0;s<n;s++){var o=t.FieldRef.fromString(e[s]),a=o.fieldName;i[a]||(i[a]=0),i[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[o]}for(var l=Object.keys(this._fields),s=0;s<l.length;s++){var u=l[s];r[u]=r[u]/i[u]}this.averageFieldLength=r},t.Builder.prototype.createFieldVectors=function(){for(var e={},n=Object.keys(this.fieldTermFrequencies),r=n.length,i=Object.create(null),s=0;s<r;s++){for(var o=t.FieldRef.fromString(n[s]),a=o.fieldName,l=this.fieldLengths[o],u=new t.Vector,d=this.fieldTermFrequencies[o],m=Object.keys(d),p=m.length,b=this._fields[a].boost||1,g=this._documents[o.docRef].boost||1,L=0;L<p;L++){var f=m[L],y=d[f],S=this.invertedIndex[f]._index,w,k,_;i[f]===void 0?(w=t.idf(this.invertedIndex[f],this.documentCount),i[f]=w):w=i[f],k=w*((this._k1+1)*y)/(this._k1*(1-this._b+this._b*(l/this.averageFieldLength[a]))+y),k*=b,k*=g,_=Math.round(k*1e3)/1e3,u.insert(S,_)}e[o]=u}this.fieldVectors=e},t.Builder.prototype.createTokenSet=function(){this.tokenSet=t.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},t.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new t.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},t.Builder.prototype.use=function(e){var n=Array.prototype.slice.call(arguments,1);n.unshift(this),e.apply(this,n)},t.MatchData=function(e,n,r){for(var i=Object.create(null),s=Object.keys(r||{}),o=0;o<s.length;o++){var a=s[o];i[a]=r[a].slice()}this.metadata=Object.create(null),e!==void 0&&(this.metadata[e]=Object.create(null),this.metadata[e][n]=i)},t.MatchData.prototype.combine=function(e){for(var n=Object.keys(e.metadata),r=0;r<n.length;r++){var i=n[r],s=Object.keys(e.metadata[i]);this.metadata[i]==null&&(this.metadata[i]=Object.create(null));for(var o=0;o<s.length;o++){var a=s[o],l=Object.keys(e.metadata[i][a]);this.metadata[i][a]==null&&(this.metadata[i][a]=Object.create(null));for(var u=0;u<l.length;u++){var d=l[u];this.metadata[i][a][d]==null?this.metadata[i][a][d]=e.metadata[i][a][d]:this.metadata[i][a][d]=this.metadata[i][a][d].concat(e.metadata[i][a][d])}}}},t.MatchData.prototype.add=function(e,n,r){if(!(e in this.metadata)){this.metadata[e]=Object.create(null),this.metadata[e][n]=r;return}if(!(n in this.metadata[e])){this.metadata[e][n]=r;return}for(var i=Object.keys(r),s=0;s<i.length;s++){var o=i[s];o in this.metadata[e][n]?this.metadata[e][n][o]=this.metadata[e][n][o].concat(r[o]):this.metadata[e][n][o]=r[o]}},t.Query=function(e){this.clauses=[],this.allFields=e},t.Query.wildcard=new String("*"),t.Query.wildcard.NONE=0,t.Query.wildcard.LEADING=1,t.Query.wildcard.TRAILING=2,t.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},t.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=t.Query.wildcard.NONE),e.wildcard&t.Query.wildcard.LEADING&&e.term.charAt(0)!=t.Query.wildcard&&(e.term="*"+e.term),e.wildcard&t.Query.wildcard.TRAILING&&e.term.slice(-1)!=t.Query.wildcard&&(e.term=""+e.term+"*"),"presence"in e||(e.presence=t.Query.presence.OPTIONAL),this.clauses.push(e),this},t.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=t.Query.presence.PROHIBITED)return!1;return!0},t.Query.prototype.term=function(e,n){if(Array.isArray(e))return e.forEach(function(i){this.term(i,t.utils.clone(n))},this),this;var r=n||{};return r.term=e.toString(),this.clause(r),this},t.QueryParseError=function(e,n,r){this.name="QueryParseError",this.message=e,this.start=n,this.end=r},t.QueryParseError.prototype=new Error,t.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},t.QueryLexer.prototype.run=function(){for(var e=t.QueryLexer.lexText;e;)e=e(this)},t.QueryLexer.prototype.sliceString=function(){for(var e=[],n=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],e.push(this.str.slice(n,r)),n=r+1;return e.push(this.str.slice(n,this.pos)),this.escapeCharPositions.length=0,e.join("")},t.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},t.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},t.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos<this.length},t.QueryLexer.EOS="EOS",t.QueryLexer.FIELD="FIELD",t.QueryLexer.TERM="TERM",t.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",t.QueryLexer.BOOST="BOOST",t.QueryLexer.PRESENCE="PRESENCE",t.QueryLexer.lexField=function(e){return e.backup(),e.emit(t.QueryLexer.FIELD),e.ignore(),t.QueryLexer.lexText},t.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ae=="object"?le.exports=n():e.lunr=n()}(this,function(){return t})})()});var se=[];function G(t,e){se.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){se.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!Ve(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function Ve(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var oe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var pe=Ae(ue());async function ce(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=pe.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function fe(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{ce(e,t)}),ce(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");i.addEventListener("mouseup",()=>{te(t)}),r.addEventListener("focus",()=>t.classList.add("has-focus")),He(t,i,r,e)}function He(t,e,n,r){n.addEventListener("input",oe(()=>{Ne(t,e,n,r)},200)),n.addEventListener("keydown",i=>{i.key=="Enter"?Be(e,t):i.key=="ArrowUp"?(de(e,n,-1),i.preventDefault()):i.key==="ArrowDown"&&(de(e,n,1),i.preventDefault())}),document.body.addEventListener("keypress",i=>{i.altKey||i.ctrlKey||i.metaKey||!n.matches(":focus")&&i.key==="/"&&(i.preventDefault(),n.focus())}),document.body.addEventListener("keyup",i=>{t.classList.contains("has-focus")&&(i.key==="Escape"||!e.matches(":focus-within")&&!n.matches(":focus"))&&(n.blur(),te(t))})}function te(t){t.classList.remove("has-focus")}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s;if(i){let o=i.split(" ").map(a=>a.length?`*${a}*`:"").join(" ");s=r.index.search(o)}else s=[];for(let o=0;o<s.length;o++){let a=s[o],l=r.data.rows[Number(a.ref)],u=1;l.name.toLowerCase().startsWith(i.toLowerCase())&&(u*=1+1/(1+Math.abs(l.name.length-i.length))),a.score*=u}if(s.length===0){let o=document.createElement("li");o.classList.add("no-results");let a=document.createElement("span");a.textContent="No results found",o.appendChild(a),e.appendChild(o)}s.sort((o,a)=>a.score-o.score);for(let o=0,a=Math.min(10,s.length);o<a;o++){let l=r.data.rows[Number(s[o].ref)],u=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon"><use href="#icon-${l.kind}"></use></svg>`,d=he(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=`<span class="parent">
3
3
  ${he(l.parent,i)}.</span>${d}`);let m=document.createElement("li");m.classList.value=l.classes??"";let p=document.createElement("a");p.href=r.base+l.url,p.innerHTML=u+d,m.append(p),p.addEventListener("focus",()=>{e.querySelector(".current")?.classList.remove("current"),m.classList.add("current")}),e.appendChild(m)}}function de(t,e,n){let r=t.querySelector(".current");if(!r)r=t.querySelector(n==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let i=r;if(n===1)do i=i.nextElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);else do i=i.previousElementSibling??void 0;while(i instanceof HTMLElement&&i.offsetParent==null);i?(r.classList.remove("current"),i.classList.add("current")):n===-1&&(r.classList.remove("current"),e.focus())}}function Be(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),te(e)}}function he(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ee(t.substring(s,o)),`<b>${ee(t.substring(o,o+r.length))}</b>`),s=o+r.length,o=n.indexOf(r,s);return i.push(ee(t.substring(s))),i.join("")}var je={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#039;",'"':"&quot;"};function ee(t){return t.replace(/[&<>"'"]/g,e=>je[e])}var I=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",ye="mousemove",N="mouseup",J={x:0,y:0},me=!1,ne=!1,qe=!1,D=!1,ve=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(ve?"is-mobile":"not-mobile");ve&&"ontouchstart"in document.documentElement&&(qe=!0,F="touchstart",ye="touchmove",N="touchend");document.addEventListener(F,t=>{ne=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(ye,t=>{if(ne&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(N,()=>{ne=!1});document.addEventListener("click",t=>{me&&(t.preventDefault(),t.stopImmediatePropagation(),me=!1)});var X=class extends I{constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener(N,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(F,n=>this.onDocumentPointerDown(n)),document.addEventListener(N,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){D||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!D&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var re;try{re=localStorage}catch{re={getItem(){return null},setItem(){}}}var Q=re;var ge=document.head.appendChild(document.createElement("style"));ge.dataset.for="filters";var Y=class extends I{constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ge.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }
4
- `,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='<svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&r.classList.add("current"),t.kind&&(r.innerHTML=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon"><use href="#icon-${t.kind}"></use></svg>`),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})();
4
+ `,this.app.updateIndexVisibility()}fromLocalStorage(){let e=Q.getItem(this.key);return e?e==="true":this.el.checked}setLocalStorage(e){Q.setItem(this.key,e.toString()),this.value=e,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),this.app.updateIndexVisibility()}};var Z=class extends I{constructor(e){super(e),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let n=Q.getItem(this.key);this.el.open=n?n==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let r=this.summary.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function Ee(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,xe(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),xe(t.value)})}function xe(t){document.documentElement.dataset.theme=t}var K;function we(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Le),Le())}async function Le(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();K=t.dataset.base,K.endsWith("/")||(K+="/"),t.innerHTML="";for(let s of i)Se(s,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Se(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='<svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>',be(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)Se(u,l,i)}else be(t,r,t.class)}function be(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=K+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&r.classList.add("current"),t.kind&&(r.innerHTML=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon"><use href="#icon-${t.kind}"></use></svg>`),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Te=document.getElementById("tsd-theme");Te&&Ee(Te);var $e=new U;Object.defineProperty(window,"app",{value:$e});fe();we();})();
5
5
  /*! Bundled license information:
6
6
 
7
7
  lunr/lunr.js:
package/tsdoc.json CHANGED
@@ -67,6 +67,10 @@
67
67
  "tagName": "@class",
68
68
  "syntaxKind": "modifier"
69
69
  },
70
+ {
71
+ "tagName": "@abstract",
72
+ "syntaxKind": "modifier"
73
+ },
70
74
  {
71
75
  "tagName": "@document",
72
76
  "syntaxKind": "block"
@@ -75,11 +79,23 @@
75
79
  "tagName": "@default",
76
80
  "syntaxKind": "block"
77
81
  },
82
+ {
83
+ "tagName": "@extends",
84
+ "syntaxKind": "block"
85
+ },
86
+ {
87
+ "tagName": "@augments",
88
+ "syntaxKind": "block"
89
+ },
78
90
  {
79
91
  // TSDoc defines @returns, we also recognize @return for JSDoc compat
80
92
  "tagName": "@return",
81
93
  "syntaxKind": "block"
82
94
  },
95
+ {
96
+ "tagName": "@yields",
97
+ "syntaxKind": "block"
98
+ },
83
99
  {
84
100
  "tagName": "@enum",
85
101
  "syntaxKind": "modifier"