typedoc 0.26.1 → 0.26.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/lib/converter/comments/discovery.d.ts +4 -7
  2. package/dist/lib/converter/comments/discovery.js +144 -75
  3. package/dist/lib/converter/comments/index.d.ts +7 -4
  4. package/dist/lib/converter/comments/index.js +22 -16
  5. package/dist/lib/converter/comments/parser.js +5 -0
  6. package/dist/lib/converter/comments/textParser.js +12 -6
  7. package/dist/lib/converter/context.js +5 -5
  8. package/dist/lib/converter/converter.d.ts +0 -2
  9. package/dist/lib/converter/converter.js +5 -12
  10. package/dist/lib/converter/plugins/CommentPlugin.js +1 -1
  11. package/dist/lib/internationalization/locales/jp.cjs +2 -2
  12. package/dist/lib/internationalization/locales/jp.d.cts +1 -320
  13. package/dist/lib/internationalization/locales/ko.d.cts +1 -230
  14. package/dist/lib/internationalization/locales/zh.cjs +2 -2
  15. package/dist/lib/internationalization/locales/zh.d.cts +1 -320
  16. package/dist/lib/internationalization/translatable.d.ts +4 -4
  17. package/dist/lib/internationalization/translatable.js +2 -2
  18. package/dist/lib/models/FileRegistry.js +3 -4
  19. package/dist/lib/models/comments/comment.d.ts +7 -0
  20. package/dist/lib/models/comments/comment.js +15 -1
  21. package/dist/lib/output/events.d.ts +20 -7
  22. package/dist/lib/output/events.js +20 -0
  23. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +3 -2
  24. package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +0 -2
  25. package/dist/lib/output/themes/default/partials/members.d.ts +1 -1
  26. package/dist/lib/output/themes/default/partials/members.js +39 -9
  27. package/dist/lib/output/themes/default/partials/navigation.js +27 -7
  28. package/dist/lib/utils/array.d.ts +3 -0
  29. package/dist/lib/utils/array.js +19 -0
  30. package/dist/lib/utils/enum.d.ts +3 -3
  31. package/dist/lib/utils/highlighter.js +1 -1
  32. package/dist/lib/utils/options/declaration.d.ts +2 -1
  33. package/dist/lib/utils/options/sources/typedoc.js +5 -0
  34. package/dist/lib/utils/options/tsdoc-defaults.d.ts +1 -1
  35. package/dist/lib/utils/options/tsdoc-defaults.js +2 -1
  36. package/package.json +7 -7
  37. package/static/style.css +10 -0
  38. package/tsdoc.json +4 -0
  39. package/dist/lib/output/themes/default/partials/members.group.d.ts +0 -4
  40. package/dist/lib/output/themes/default/partials/members.group.js +0 -25
@@ -1,321 +1,2 @@
1
- declare const _default: {
2
- loaded_multiple_times_0: "TypeDoc 已加载多次。这通常是由具有自己的 TypeDoc 安装的插件引起的。加载的路径为:\n{0}";
3
- unsupported_ts_version_0: "您正在使用不受支持的 TypeScript 版本运行!如果 TypeDoc 崩溃,这就是原因。TypeDoc 支持 {0}";
4
- no_compiler_options_set: string;
5
- loaded_plugin_0: "已加载插件 {0}";
6
- solution_not_supported_in_watch_mode: string;
7
- strategy_not_supported_in_watch_mode: string;
8
- found_0_errors_and_1_warnings: "发现 {0} 个错误和 {1} 个警告";
9
- docs_could_not_be_generated: string;
10
- docs_generated_at_0: "文档生成于 {0}";
11
- json_written_to_0: "JSON 已写入 {0}";
12
- no_entry_points_for_packages: string;
13
- failed_to_find_packages: string;
14
- nested_packages_unsupported_0: "位于 {0} 的项目已将 entryPointStrategy 设置为包,但不支持嵌套包";
15
- previous_error_occurred_when_reading_options_for_0: "读取 {0} 处的包的选项时发生上一个错误";
16
- converting_project_at_0: "正在转换 {0} 处的项目";
17
- failed_to_convert_packages: string;
18
- merging_converted_projects: string;
19
- no_entry_points_to_merge: string;
20
- entrypoint_did_not_match_files_0: "入口点 glob {0} 与任何文件均不匹配";
21
- failed_to_parse_json_0: "无法将 {0} 处的文件解析为 json";
22
- failed_to_read_0_when_processing_document_tag_in_1: "处理 {1} 中注释的 @document 标记时无法读取文件 {0}";
23
- failed_to_read_0_when_processing_project_document: "添加项目文档时无法读取文件 {0}";
24
- failed_to_read_0_when_processing_document_child_in_1: "处理 {1} 中的文档子项时无法读取文件 {0}";
25
- frontmatter_children_0_should_be_an_array_of_strings_or_object_with_string_values: "{0} 中的 Frontmatter 子项应为字符串数组或具有字符串值的对象";
26
- converting_union_as_interface: string;
27
- converting_0_as_class_requires_value_declaration: "将 {0} 转换为类需要表示非类型值的声明";
28
- converting_0_as_class_without_construct_signatures: "{0} 正在转换为类,但没有任何构造签名";
29
- comment_for_0_should_not_contain_block_or_modifier_tags: "{0} 的注释不应包含任何块或修饰符标签";
30
- symbol_0_has_multiple_declarations_with_comment: "{0} 有多个带注释的声明。将使用任意注释";
31
- comments_for_0_are_declared_at_1: "{0} 的注释声明于:\n{1}";
32
- multiple_type_parameters_on_template_tag_unsupported: string;
33
- failed_to_find_jsdoc_tag_for_name_0: "解析注释后无法找到 {0} 的 JSDoc 标签,请提交错误报告";
34
- relative_path_0_does_not_exist: "相对路径 {0} 不存在";
35
- inline_inheritdoc_should_not_appear_in_block_tag_in_comment_at_0: "内联 @inheritDoc 标记不应出现在块标记内,因为它不会在 {0} 处的注释中被处理。";
36
- at_most_one_remarks_tag_expected_in_comment_at_0: "注释中最多应有一个 @remarks 标签,忽略 {0} 处注释中除第一个标签之外的所有标签";
37
- at_most_one_returns_tag_expected_in_comment_at_0: "注释中最多应有一个 @returns 标签,忽略 {0} 处注释中除第一个标签之外的所有标签";
38
- at_most_one_inheritdoc_tag_expected_in_comment_at_0: "注释中最多应有一个 @inheritDoc 标签,忽略 {0} 处注释中除第一个标签之外的所有标签";
39
- content_in_summary_overwritten_by_inheritdoc_in_comment_at_0: "摘要部分的内容将被 {0} 处注释中的 @inheritDoc 标记覆盖";
40
- content_in_remarks_block_overwritten_by_inheritdoc_in_comment_at_0: "@remarks 块中的内容将被 {0} 处注释中的 @inheritDoc 标记覆盖";
41
- example_tag_literal_name: string;
42
- inheritdoc_tag_properly_capitalized: string;
43
- treating_unrecognized_tag_0_as_modifier: "将无法识别的标签 {0} 视为修饰标签";
44
- unmatched_closing_brace: string;
45
- unescaped_open_brace_without_inline_tag: string;
46
- unknown_block_tag_0: "遇到未知的区块标记 {0}";
47
- unknown_inline_tag_0: "遇到未知的内联标记 {0}";
48
- open_brace_within_inline_tag: string;
49
- inline_tag_not_closed: string;
50
- failed_to_resolve_link_to_0_in_comment_for_1: "无法解析“{1}”评论中的“{0}”链接";
51
- type_0_defined_in_1_is_referenced_by_2_but_not_included_in_docs: "{0} 在 {1} 中定义,被 {2} 引用,但未包含在文档中";
52
- reflection_0_kind_1_defined_in_2_does_not_have_any_documentation: "{0} ({1}),在 {2} 中定义,没有任何文档";
53
- invalid_intentionally_not_exported_symbols_0: "以下符号被标记为有意不导出,但未在文档中引用,或已被导出:\n{0}";
54
- not_all_search_category_boosts_used_0: "文档中并未使用 searchCategoryBoosts 中指定的所有类别。未使用的类别包括:\n{0}";
55
- not_all_search_group_boosts_used_0: "文档中并未使用 searchGroupBoosts 中指定的所有组。未使用的组为:\n{0}";
56
- comment_for_0_includes_categoryDescription_for_1_but_no_child_in_group: "{0} 的评论包含“{1}”的 @categoryDe​​scription,但该类别中没有子项";
57
- comment_for_0_includes_groupDescription_for_1_but_no_child_in_group: "对 {0} 的评论包含“{1}”的 @groupDescription,但该组中没有子项";
58
- label_0_for_1_cannot_be_referenced: "无法使用声明引用来引用 {1} 的标签“{0}”。标签只能包含 A-Z、0-9 和 _,并且不能以数字开头";
59
- modifier_tag_0_is_mutually_exclusive_with_1_in_comment_for_2: "修饰符标记 {0} 与 {2} 注释中的 {1} 互斥";
60
- signature_0_has_unused_param_with_name_1: "签名 {0} 有一个名为“{1}”的 @param,但未被使用";
61
- declaration_reference_in_inheritdoc_for_0_not_fully_parsed: "@inheritDoc 中对 {0} 的声明引用未完全解析,可能会解析不正确";
62
- failed_to_find_0_to_inherit_comment_from_in_1: "在 {1} 的评论中找不到要继承的评论“{0}”";
63
- failed_to_resolve_link_to_0_in_comment_for_1_may_have_meant_2: "无法解析 {1} 的注释中指向\"{0}\"的链接。您可能想要\"{2}\"";
64
- failed_to_resolve_link_to_0_in_readme_for_1: "无法解析 {1} 的自述文件中指向\"{0}\"的链接";
65
- failed_to_resolve_link_to_0_in_readme_for_1_may_have_meant_2: "无法解析 {1} 的自述文件中指向\"{0}\"的链接。您可能想要\"{2}\"";
66
- reflection_0_tried_to_copy_comment_from_1_but_source_had_no_comment: "{0} 尝试使用 @inheritDoc 从 {1} 复制注释,但源没有相关注释";
67
- inheritdoc_circular_inheritance_chain_0: "@inheritDoc 指定循环继承链:{0}";
68
- provided_readme_at_0_could_not_be_read: "提供的 README 路径无法读取 {0}";
69
- defaulting_project_name: string;
70
- disable_git_set_but_not_source_link_template: string;
71
- disable_git_set_and_git_revision_used: string;
72
- git_remote_0_not_valid: "提供的 git 远程“{0}”无效。源链接将失效";
73
- custom_css_file_0_does_not_exist: "{0} 处的自定义 CSS 文件不存在";
74
- unsupported_highlight_language_0_not_highlighted_in_comment_for_1: "不支持的突出显示语言 {0} 将不会在 {1} 的评论中突出显示";
75
- unloaded_language_0_not_highlighted_in_comment_for_1: "语言为 {0} 的代码块将不会在 {1} 的注释中突出显示,因为它未包含在 highlightLanguages 选项中";
76
- yaml_frontmatter_not_an_object: string;
77
- could_not_write_0: "无法写入 {0}";
78
- could_not_empty_output_directory_0: "无法清空输出目录 {0}";
79
- could_not_create_output_directory_0: "无法创建输出目录 {0}";
80
- theme_0_is_not_defined_available_are_1: "主题“{0}”未定义。可用主题为:{1}";
81
- custom_theme_does_not_define_getSlugger: string;
82
- no_entry_points_provided: string;
83
- unable_to_find_any_entry_points: string;
84
- watch_does_not_support_packages_mode: string;
85
- watch_does_not_support_merge_mode: string;
86
- entry_point_0_not_in_program: "入口点 {0} 未被 tsconfig 中的“files”或“include”选项引用";
87
- use_expand_or_glob_for_files_in_dir: string;
88
- glob_0_did_not_match_any_files: "glob {0} 与任何文件均不匹配";
89
- entry_point_0_did_not_match_any_files_after_exclude: "应用排除模式后,glob {0} 没有匹配任何文件";
90
- entry_point_0_did_not_exist: "提供的入口点 {0} 不存在";
91
- entry_point_0_did_not_match_any_packages: "入口点 glob {0} 与任何包含 package.json 的目录不匹配";
92
- file_0_not_an_object: "文件 {0} 不是对象";
93
- serialized_project_referenced_0_not_part_of_project: "序列化项目引用了反射 {0},但它不是项目的一部分";
94
- saved_relative_path_0_resolved_from_1_does_not_exist: "序列化项目引用了 {0},相对于 {1} 而言,它并不存在";
95
- circular_reference_extends_0: "{0} 的“extends”字段出现循环引用";
96
- failed_resolve_0_to_file_in_1: "无法将 {0} 解析为 {1} 中的文件";
97
- option_0_can_only_be_specified_by_config_file: "“{0}”选项只能通过配置文件指定";
98
- option_0_expected_a_value_but_none_provided: "--{0} 需要一个值,但没有给出任何参数";
99
- unknown_option_0_may_have_meant_1: "未知选项:{0},你可能指的是:\n{1}";
100
- typedoc_key_in_0_ignored: "{0} 中的“typedoc”键已被旧包 entryPointStrategy 使用,将被忽略";
101
- typedoc_options_must_be_object_in_0: "无法解析 {0} 中的“typedocOptions”字段,请确保它存在且包含对象";
102
- tsconfig_file_0_does_not_exist: "tsconfig 文件 {0} 不存在";
103
- tsconfig_file_specifies_options_file: string;
104
- tsconfig_file_specifies_tsconfig_file: string;
105
- tags_0_defined_in_typedoc_json_overwritten_by_tsdoc_json: "typedoc.json 中定义的 {0} 将被 tsdoc.json 中的配置覆盖";
106
- failed_read_tsdoc_json_0: "无法读取位于 {0} 的 tsdoc.json 文件";
107
- invalid_tsdoc_json_0: "文件 {0} 不是有效的 tsdoc.json 文件";
108
- options_file_0_does_not_exist: "选项文件 {0} 不存在";
109
- failed_read_options_file_0: "无法解析 {0},请确保其存在并导出对象";
110
- invalid_plugin_0_missing_load_function: "插件 {0} 中的结构无效,未找到加载函数";
111
- plugin_0_could_not_be_loaded: "无法加载插件 {0}";
112
- help_options: string;
113
- help_tsconfig: string;
114
- help_compilerOptions: string;
115
- help_lang: string;
116
- help_locales: string;
117
- help_packageOptions: string;
118
- help_entryPoints: string;
119
- help_entryPointStrategy: string;
120
- help_alwaysCreateEntryPointModule: string;
121
- help_projectDocuments: string;
122
- help_exclude: string;
123
- help_externalPattern: string;
124
- help_excludeExternals: string;
125
- help_excludeNotDocumented: string;
126
- help_excludeNotDocumentedKinds: string;
127
- help_excludeInternal: string;
128
- help_excludeCategories: string;
129
- help_excludePrivate: string;
130
- help_excludeProtected: string;
131
- help_excludeReferences: string;
132
- help_externalSymbolLinkMappings: string;
133
- help_out: string;
134
- help_json: string;
135
- help_pretty: string;
136
- help_emit: string;
137
- help_theme: string;
138
- help_lightHighlightTheme: string;
139
- help_darkHighlightTheme: string;
140
- help_highlightLanguages: string;
141
- help_customCss: string;
142
- help_markdownItOptions: string;
143
- help_markdownItLoader: string;
144
- help_maxTypeConversionDepth: string;
145
- help_name: string;
146
- help_includeVersion: string;
147
- help_disableSources: string;
148
- help_sourceLinkTemplate: string;
149
- help_gitRevision: string;
150
- help_gitRemote: string;
151
- help_disableGit: string;
152
- help_basePath: string;
153
- help_excludeTags: string;
154
- help_readme: string;
155
- help_cname: string;
156
- help_sourceLinkExternal: string;
157
- help_githubPages: string;
158
- help_hostedBaseUrl: string;
159
- help_useHostedBaseUrlForAbsoluteLinks: string;
160
- help_hideGenerator: string;
161
- help_customFooterHtml: string;
162
- help_customFooterHtmlDisableWrapper: string;
163
- help_hideParameterTypesInTitle: string;
164
- help_cacheBust: string;
165
- help_searchInComments: string;
166
- help_searchInDocuments: string;
167
- help_cleanOutputDir: string;
168
- help_titleLink: string;
169
- help_navigationLinks: string;
170
- help_sidebarLinks: string;
171
- help_navigationLeaves: string;
172
- help_navigation: string;
173
- help_visibilityFilters: string;
174
- help_searchCategoryBoosts: string;
175
- help_searchGroupBoosts: string;
176
- help_jsDocCompatibility: string;
177
- help_commentStyle: string;
178
- help_useTsLinkResolution: string;
179
- help_preserveLinkText: string;
180
- help_blockTags: string;
181
- help_inlineTags: string;
182
- help_modifierTags: string;
183
- help_categorizeByGroup: string;
184
- help_defaultCategory: string;
185
- help_categoryOrder: string;
186
- help_groupOrder: string;
187
- help_sort: string;
188
- help_sortEntryPoints: string;
189
- help_kindSortOrder: string;
190
- help_watch: string;
191
- help_preserveWatchOutput: string;
192
- help_skipErrorChecking: string;
193
- help_help: string;
194
- help_version: string;
195
- help_showConfig: string;
196
- help_plugin: string;
197
- help_logLevel: string;
198
- help_treatWarningsAsErrors: string;
199
- help_treatValidationWarningsAsErrors: string;
200
- help_intentionallyNotExported: string;
201
- help_requiredToBeDocumented: string;
202
- help_validation: string;
203
- unknown_option_0_you_may_have_meant_1: "未知选项“{0}” 你可能指的是:\n{1}";
204
- option_0_must_be_between_1_and_2: "{0} 必须介于 {1} 和 {2} 之间";
205
- option_0_must_be_equal_to_or_greater_than_1: "{0} 必须等于或大于 {1}";
206
- option_0_must_be_less_than_or_equal_to_1: "{0} 必须小于或等于 {1}";
207
- option_0_must_be_one_of_1: "{0} 必须是 {1} 之一";
208
- flag_0_is_not_valid_for_1_expected_2: "标志“{0}”对 {1} 无效,应为 {2} 之一";
209
- expected_object_with_flag_values_for_0: "预期为一个带有标志值为 {0} 或 true/false 的对象";
210
- flag_values_for_0_must_be_booleans: "{0} 的标志值必须是布尔值";
211
- locales_must_be_an_object: string;
212
- exclude_not_documented_specified_0_valid_values_are_1: "excludeNotDocumentedKinds 只能指定已知值,并且提供了无效值 ({0})。有效类型为:\n{1}";
213
- external_symbol_link_mappings_must_be_object: string;
214
- highlight_theme_0_must_be_one_of_1: "{0} 必须是下列之一:{1}";
215
- highlightLanguages_contains_invalid_languages_0: "highlightLanguages 包含无效语言:{0},运行 typedoc --help 获取受支持语言的列表";
216
- hostedBaseUrl_must_start_with_http: string;
217
- useHostedBaseUrlForAbsoluteLinks_requires_hostedBaseUrl: string;
218
- option_0_must_be_an_object: "“{0}”选项必须是非数组对象";
219
- option_0_must_be_a_function: "‘{0}’ 选项必须是一个函数";
220
- option_0_must_be_object_with_urls: "{0} 必须是具有字符串标签作为键和 URL 值的对象";
221
- visibility_filters_only_include_0: "visibilityFilters 只能包含以下非@键:{0}";
222
- visibility_filters_must_be_booleans: string;
223
- option_0_values_must_be_numbers: "{0} 的所有值都必须是数字";
224
- option_0_values_must_be_array_of_tags: "{0} 必须是有效标签名称的数组";
225
- option_0_specified_1_but_only_2_is_valid: "{0} 只能指定已知值,并且提供了无效值 ({1})。有效的排序策略为:\n{2}";
226
- kind_project: string;
227
- kind_module: string;
228
- kind_namespace: string;
229
- kind_enum: string;
230
- kind_enum_member: string;
231
- kind_variable: string;
232
- kind_function: string;
233
- kind_class: string;
234
- kind_interface: string;
235
- kind_constructor: string;
236
- kind_property: string;
237
- kind_method: string;
238
- kind_call_signature: string;
239
- kind_index_signature: string;
240
- kind_constructor_signature: string;
241
- kind_parameter: string;
242
- kind_type_literal: string;
243
- kind_type_parameter: string;
244
- kind_accessor: string;
245
- kind_get_signature: string;
246
- kind_set_signature: string;
247
- kind_type_alias: string;
248
- kind_reference: string;
249
- kind_document: string;
250
- kind_plural_project: string;
251
- kind_plural_module: string;
252
- kind_plural_namespace: string;
253
- kind_plural_enum: string;
254
- kind_plural_enum_member: string;
255
- kind_plural_variable: string;
256
- kind_plural_function: string;
257
- kind_plural_class: string;
258
- kind_plural_interface: string;
259
- kind_plural_constructor: string;
260
- kind_plural_property: string;
261
- kind_plural_method: string;
262
- kind_plural_call_signature: string;
263
- kind_plural_index_signature: string;
264
- kind_plural_constructor_signature: string;
265
- kind_plural_parameter: string;
266
- kind_plural_type_literal: string;
267
- kind_plural_type_parameter: string;
268
- kind_plural_accessor: string;
269
- kind_plural_get_signature: string;
270
- kind_plural_set_signature: string;
271
- kind_plural_type_alias: string;
272
- kind_plural_reference: string;
273
- kind_plural_document: string;
274
- flag_protected: string;
275
- flag_private: string;
276
- flag_external: string;
277
- flag_inherited: string;
278
- flag_public: string;
279
- flag_static: string;
280
- flag_optional: string;
281
- flag_rest: string;
282
- flag_abstract: string;
283
- flag_const: string;
284
- flag_readonly: string;
285
- theme_implements: string;
286
- theme_indexable: string;
287
- theme_type_declaration: string;
288
- theme_index: string;
289
- theme_hierarchy: string;
290
- theme_hierarchy_view_full: string;
291
- theme_implemented_by: string;
292
- theme_defined_in: string;
293
- theme_implementation_of: string;
294
- theme_inherited_from: string;
295
- theme_overrides: string;
296
- theme_returns: string;
297
- theme_re_exports: string;
298
- theme_renames_and_re_exports: string;
299
- theme_generated_using_typedoc: string;
300
- theme_preparing_search_index: string;
301
- theme_search_index_not_available: string;
302
- theme_settings: string;
303
- theme_member_visibility: string;
304
- theme_theme: string;
305
- theme_os: string;
306
- theme_light: string;
307
- theme_dark: string;
308
- theme_on_this_page: string;
309
- theme_search: string;
310
- theme_menu: string;
311
- theme_permalink: string;
312
- tag_see: string;
313
- tag_group: string;
314
- tag_example: string;
315
- theme_copy: string;
316
- theme_copied: string;
317
- theme_normally_hidden: string;
318
- theme_class_hierarchy_title: string;
319
- theme_loading: string;
320
- };
1
+ declare const _default: Partial<import("../translatable").BuiltinTranslatableStringConstraints>;
321
2
  export = _default;
@@ -1,6 +1,6 @@
1
1
  import type { blockTags, inlineTags, modifierTags } from "../utils/options/tsdoc-defaults";
2
- export declare function buildTranslation<T extends BuiltinTranslatableStringConstraints>(translations: T): T;
3
- export declare function buildIncompleteTranslation<T extends Partial<BuiltinTranslatableStringConstraints>>(translations: T): T;
2
+ export declare function buildTranslation(translations: BuiltinTranslatableStringConstraints): BuiltinTranslatableStringConstraints;
3
+ export declare function buildIncompleteTranslation(translations: Partial<BuiltinTranslatableStringConstraints>): Partial<BuiltinTranslatableStringConstraints>;
4
4
  export declare const translatable: {
5
5
  readonly loaded_multiple_times_0: "TypeDoc has been loaded multiple times. This is commonly caused by plugins which have their own installation of TypeDoc. The loaded paths are:\n\t{0}";
6
6
  readonly unsupported_ts_version_0: "You are running with an unsupported TypeScript version! If TypeDoc crashes, this is why. TypeDoc supports {0}";
@@ -34,7 +34,7 @@ export declare const translatable: {
34
34
  readonly comments_for_0_are_declared_at_1: "The comments for {0} are declared at:\n\t{1}";
35
35
  readonly multiple_type_parameters_on_template_tag_unsupported: "TypeDoc does not support multiple type parameters defined in a single @template tag with a comment";
36
36
  readonly failed_to_find_jsdoc_tag_for_name_0: "Failed to find JSDoc tag for {0} after parsing comment, please file a bug report";
37
- readonly relative_path_0_does_not_exist: "The relative path {0} does not exist";
37
+ readonly relative_path_0_is_not_a_file_and_will_not_be_copied_to_output: "The relative path {0} is not a file and will not be copied to the output directory";
38
38
  readonly inline_inheritdoc_should_not_appear_in_block_tag_in_comment_at_0: "An inline @inheritDoc tag should not appear within a block tag as it will not be processed in comment at {0}";
39
39
  readonly at_most_one_remarks_tag_expected_in_comment_at_0: "At most one @remarks tag is expected in a comment, ignoring all but the first in comment at {0}";
40
40
  readonly at_most_one_returns_tag_expected_in_comment_at_0: "At most one @returns tag is expected in a comment, ignoring all but the first in comment at {0}";
@@ -94,7 +94,7 @@ export declare const translatable: {
94
94
  readonly entry_point_0_did_not_match_any_packages: "The entry point glob {0} did not match any directories containing package.json";
95
95
  readonly file_0_not_an_object: "The file {0} is not an object";
96
96
  readonly serialized_project_referenced_0_not_part_of_project: "Serialized project referenced reflection {0}, which was not a part of the project";
97
- readonly saved_relative_path_0_resolved_from_1_does_not_exist: "Serialized project referenced {0}, which does not exist relative to {1}";
97
+ readonly saved_relative_path_0_resolved_from_1_is_not_a_file: "Serialized project referenced {0}, which does not exist or is not a file relative to {1}";
98
98
  readonly circular_reference_extends_0: "Circular reference encountered for \"extends\" field of {0}";
99
99
  readonly failed_resolve_0_to_file_in_1: "Failed to resolve {0} to a file in {1}";
100
100
  readonly option_0_can_only_be_specified_by_config_file: "The '{0}' option can only be specified via a config file";
@@ -43,7 +43,7 @@ exports.translatable = {
43
43
  // comments/parser.ts
44
44
  multiple_type_parameters_on_template_tag_unsupported: `TypeDoc does not support multiple type parameters defined in a single @template tag with a comment`,
45
45
  failed_to_find_jsdoc_tag_for_name_0: `Failed to find JSDoc tag for {0} after parsing comment, please file a bug report`,
46
- relative_path_0_does_not_exist: `The relative path {0} does not exist`,
46
+ relative_path_0_is_not_a_file_and_will_not_be_copied_to_output: `The relative path {0} is not a file and will not be copied to the output directory`,
47
47
  inline_inheritdoc_should_not_appear_in_block_tag_in_comment_at_0: "An inline @inheritDoc tag should not appear within a block tag as it will not be processed in comment at {0}",
48
48
  at_most_one_remarks_tag_expected_in_comment_at_0: "At most one @remarks tag is expected in a comment, ignoring all but the first in comment at {0}",
49
49
  at_most_one_returns_tag_expected_in_comment_at_0: "At most one @returns tag is expected in a comment, ignoring all but the first in comment at {0}",
@@ -109,7 +109,7 @@ exports.translatable = {
109
109
  file_0_not_an_object: `The file {0} is not an object`,
110
110
  // deserialization
111
111
  serialized_project_referenced_0_not_part_of_project: `Serialized project referenced reflection {0}, which was not a part of the project`,
112
- saved_relative_path_0_resolved_from_1_does_not_exist: `Serialized project referenced {0}, which does not exist relative to {1}`,
112
+ saved_relative_path_0_resolved_from_1_is_not_a_file: `Serialized project referenced {0}, which does not exist or is not a file relative to {1}`,
113
113
  // options
114
114
  circular_reference_extends_0: `Circular reference encountered for "extends" field of {0}`,
115
115
  failed_resolve_0_to_file_in_1: `Failed to resolve {0} to a file in {1}`,
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ValidatingFileRegistry = exports.FileRegistry = void 0;
4
4
  const path_1 = require("path");
5
5
  const utils_1 = require("../utils");
6
- const fs_1 = require("fs");
7
6
  class FileRegistry {
8
7
  constructor() {
9
8
  this.nextId = 1;
@@ -111,7 +110,7 @@ exports.FileRegistry = FileRegistry;
111
110
  class ValidatingFileRegistry extends FileRegistry {
112
111
  register(sourcePath, relativePath) {
113
112
  const absolute = (0, path_1.resolve)((0, path_1.dirname)(sourcePath), relativePath);
114
- if (!(0, fs_1.existsSync)(absolute)) {
113
+ if (!(0, utils_1.isFile)(absolute)) {
115
114
  return;
116
115
  }
117
116
  return this.registerAbsolute(absolute);
@@ -119,8 +118,8 @@ class ValidatingFileRegistry extends FileRegistry {
119
118
  fromObject(de, obj) {
120
119
  for (const [key, val] of Object.entries(obj.entries)) {
121
120
  const absolute = (0, utils_1.normalizePath)((0, path_1.resolve)(de.projectRoot, val));
122
- if (!(0, fs_1.existsSync)(absolute)) {
123
- de.logger.warn(de.logger.i18n.saved_relative_path_0_resolved_from_1_does_not_exist(val, de.projectRoot));
121
+ if (!(0, utils_1.isFile)(absolute)) {
122
+ de.logger.warn(de.logger.i18n.saved_relative_path_0_resolved_from_1_is_not_a_file(val, de.projectRoot));
124
123
  continue;
125
124
  }
126
125
  de.oldFileIdToNewFileId[+key] = this.registerAbsolute(absolute);
@@ -180,6 +180,13 @@ export declare class Comment {
180
180
  * @internal
181
181
  */
182
182
  discoveryId?: number;
183
+ /**
184
+ * If the comment was inherited from a different "parent" declaration
185
+ * (see #2545), then it is desirable to know this as any `@param` tags
186
+ * which do not apply should not cause warnings. This is not serialized,
187
+ * and only set when the comment was created from a `ts.CommentRange`.
188
+ */
189
+ inheritedFromParentDeclaration?: boolean;
183
190
  /**
184
191
  * Creates a new Comment instance.
185
192
  */
@@ -94,6 +94,9 @@ let Comment = (() => {
94
94
  let _discoveryId_decorators;
95
95
  let _discoveryId_initializers = [];
96
96
  let _discoveryId_extraInitializers = [];
97
+ let _inheritedFromParentDeclaration_decorators;
98
+ let _inheritedFromParentDeclaration_initializers = [];
99
+ let _inheritedFromParentDeclaration_extraInitializers = [];
97
100
  return _a = class Comment {
98
101
  /**
99
102
  * Debugging utility for combining parts into a simple string. Not suitable for
@@ -301,7 +304,14 @@ let Comment = (() => {
301
304
  * @internal
302
305
  */
303
306
  this.discoveryId = (__runInitializers(this, _sourcePath_extraInitializers), __runInitializers(this, _discoveryId_initializers, void 0));
304
- __runInitializers(this, _discoveryId_extraInitializers);
307
+ /**
308
+ * If the comment was inherited from a different "parent" declaration
309
+ * (see #2545), then it is desirable to know this as any `@param` tags
310
+ * which do not apply should not cause warnings. This is not serialized,
311
+ * and only set when the comment was created from a `ts.CommentRange`.
312
+ */
313
+ this.inheritedFromParentDeclaration = (__runInitializers(this, _discoveryId_extraInitializers), __runInitializers(this, _inheritedFromParentDeclaration_initializers, void 0));
314
+ __runInitializers(this, _inheritedFromParentDeclaration_extraInitializers);
305
315
  this.summary = summary;
306
316
  this.blockTags = blockTags;
307
317
  this.modifierTags = modifierTags;
@@ -314,6 +324,8 @@ let Comment = (() => {
314
324
  const comment = new _a(_a.cloneDisplayParts(this.summary), this.blockTags.map((tag) => tag.clone()), new Set(this.modifierTags));
315
325
  comment.discoveryId = this.discoveryId;
316
326
  comment.sourcePath = this.sourcePath;
327
+ comment.inheritedFromParentDeclaration =
328
+ this.inheritedFromParentDeclaration;
317
329
  return comment;
318
330
  }
319
331
  /**
@@ -395,8 +407,10 @@ let Comment = (() => {
395
407
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
396
408
  _sourcePath_decorators = [general_1.NonEnumerable];
397
409
  _discoveryId_decorators = [general_1.NonEnumerable];
410
+ _inheritedFromParentDeclaration_decorators = [general_1.NonEnumerable];
398
411
  __esDecorate(null, null, _sourcePath_decorators, { kind: "field", name: "sourcePath", static: false, private: false, access: { has: obj => "sourcePath" in obj, get: obj => obj.sourcePath, set: (obj, value) => { obj.sourcePath = value; } }, metadata: _metadata }, _sourcePath_initializers, _sourcePath_extraInitializers);
399
412
  __esDecorate(null, null, _discoveryId_decorators, { kind: "field", name: "discoveryId", static: false, private: false, access: { has: obj => "discoveryId" in obj, get: obj => obj.discoveryId, set: (obj, value) => { obj.discoveryId = value; } }, metadata: _metadata }, _discoveryId_initializers, _discoveryId_extraInitializers);
413
+ __esDecorate(null, null, _inheritedFromParentDeclaration_decorators, { kind: "field", name: "inheritedFromParentDeclaration", static: false, private: false, access: { has: obj => "inheritedFromParentDeclaration" in obj, get: obj => obj.inheritedFromParentDeclaration, set: (obj, value) => { obj.inheritedFromParentDeclaration = value; } }, metadata: _metadata }, _inheritedFromParentDeclaration_initializers, _inheritedFromParentDeclaration_extraInitializers);
400
414
  if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
401
415
  })(),
402
416
  _a;
@@ -43,6 +43,13 @@ export declare class RendererEvent {
43
43
  */
44
44
  createPageEvent<Model>(mapping: UrlMapping<Model>): [RenderTemplate<PageEvent<Model>>, PageEvent<Model>];
45
45
  }
46
+ export interface PageHeading {
47
+ link: string;
48
+ text: string;
49
+ level?: number;
50
+ kind?: ReflectionKind;
51
+ classes?: string;
52
+ }
46
53
  /**
47
54
  * An event emitted by the {@link Renderer} class before and after the
48
55
  * markup of a page is rendered.
@@ -77,13 +84,19 @@ export declare class PageEvent<out Model = unknown> extends Event {
77
84
  * Links to content within this page that should be rendered in the page navigation.
78
85
  * This is built when rendering the document content.
79
86
  */
80
- pageHeadings: Array<{
81
- link: string;
82
- text: string;
83
- level?: number;
84
- kind?: ReflectionKind;
85
- classes?: string;
86
- }>;
87
+ pageHeadings: PageHeading[];
88
+ /**
89
+ * Sections of the page, generally set by `@group`s
90
+ */
91
+ pageSections: {
92
+ title: string;
93
+ headings: PageHeading[];
94
+ }[];
95
+ /**
96
+ * Start a new section of the page. Sections are collapsible within
97
+ * the "On This Page" sidebar.
98
+ */
99
+ startNewSection(title: string): void;
87
100
  /**
88
101
  * Triggered before a document will be rendered.
89
102
  * @event
@@ -71,6 +71,17 @@ RendererEvent.END = "endRender";
71
71
  * @see {@link Renderer.EVENT_END_PAGE}
72
72
  */
73
73
  class PageEvent extends Event {
74
+ /**
75
+ * Start a new section of the page. Sections are collapsible within
76
+ * the "On This Page" sidebar.
77
+ */
78
+ startNewSection(title) {
79
+ this.pageHeadings = [];
80
+ this.pageSections.push({
81
+ title,
82
+ headings: this.pageHeadings,
83
+ });
84
+ }
74
85
  constructor(name, model) {
75
86
  super(name);
76
87
  /**
@@ -78,6 +89,15 @@ class PageEvent extends Event {
78
89
  * This is built when rendering the document content.
79
90
  */
80
91
  this.pageHeadings = [];
92
+ /**
93
+ * Sections of the page, generally set by `@group`s
94
+ */
95
+ this.pageSections = [
96
+ {
97
+ title: "",
98
+ headings: this.pageHeadings,
99
+ },
100
+ ];
81
101
  this.model = model;
82
102
  }
83
103
  }
@@ -5,7 +5,7 @@ import { type NeverIfInternal, type Options } from "../../../utils";
5
5
  import type { DefaultTheme } from "./DefaultTheme";
6
6
  import { type icons } from "./partials/icon";
7
7
  export declare class DefaultThemeRenderContext {
8
- private theme;
8
+ readonly theme: DefaultTheme;
9
9
  page: PageEvent<Reflection>;
10
10
  private _refIcons;
11
11
  options: Options;
@@ -63,7 +63,8 @@ export declare class DefaultThemeRenderContext {
63
63
  memberSignatures: (props: DeclarationReflection) => import("../../../utils/jsx.elements").JsxElement;
64
64
  memberSources: (props: DeclarationReflection | import("../../../models").SignatureReflection) => import("../../../utils/jsx.elements").JsxElement;
65
65
  members: (props: import("../../../models").ContainerReflection) => import("../../../utils/jsx.elements").JsxElement;
66
- membersGroup: (group: import("../../../models").ReflectionGroup) => import("../../../utils/jsx.elements").JsxElement;
66
+ /** @deprecated Since 0.26.3 members does group/category flattening internally */
67
+ membersGroup?: Function;
67
68
  sidebar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements").JsxElement;
68
69
  pageSidebar: (props: PageEvent<Reflection>) => import("../../../utils/jsx.elements").JsxElement;
69
70
  sidebarLinks: () => import("../../../utils/jsx.elements").JsxElement | null;
@@ -18,7 +18,6 @@ const member_signature_title_1 = require("./partials/member.signature.title");
18
18
  const member_signatures_1 = require("./partials/member.signatures");
19
19
  const member_sources_1 = require("./partials/member.sources");
20
20
  const members_1 = require("./partials/members");
21
- const members_group_1 = require("./partials/members.group");
22
21
  const navigation_1 = require("./partials/navigation");
23
22
  const parameter_1 = require("./partials/parameter");
24
23
  const reflectionPreview_1 = require("./partials/reflectionPreview");
@@ -87,7 +86,6 @@ class DefaultThemeRenderContext {
87
86
  this.memberSignatures = bind(member_signatures_1.memberSignatures, this);
88
87
  this.memberSources = bind(member_sources_1.memberSources, this);
89
88
  this.members = bind(members_1.members, this);
90
- this.membersGroup = bind(members_group_1.membersGroup, this);
91
89
  this.sidebar = bind(navigation_1.sidebar, this);
92
90
  this.pageSidebar = bind(navigation_1.pageSidebar, this);
93
91
  this.sidebarLinks = bind(navigation_1.sidebarLinks, this);
@@ -1,4 +1,4 @@
1
1
  import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext";
2
2
  import { JSX } from "../../../../utils";
3
- import { type ContainerReflection } from "../../../../models";
3
+ import type { ContainerReflection } from "../../../../models";
4
4
  export declare function members(context: DefaultThemeRenderContext, props: ContainerReflection): JSX.Element;
@@ -2,17 +2,47 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.members = members;
4
4
  const utils_1 = require("../../../../utils");
5
- const models_1 = require("../../../../models");
6
- const lib_1 = require("../../lib");
5
+ function getMemberSections(parent) {
6
+ if (parent.categories?.length) {
7
+ return (0, utils_1.filterMap)(parent.categories, (cat) => {
8
+ if (!cat.allChildrenHaveOwnDocument()) {
9
+ return {
10
+ title: cat.title,
11
+ children: cat.children.filter((child) => !child.hasOwnDocument),
12
+ };
13
+ }
14
+ });
15
+ }
16
+ if (parent.groups?.length) {
17
+ return parent.groups.flatMap((group) => {
18
+ if (group.categories?.length) {
19
+ return (0, utils_1.filterMap)(group.categories, (cat) => {
20
+ if (!cat.allChildrenHaveOwnDocument()) {
21
+ return {
22
+ title: `${group.title} - ${cat.title}`,
23
+ children: cat.children.filter((child) => !child.hasOwnDocument),
24
+ };
25
+ }
26
+ });
27
+ }
28
+ return {
29
+ title: group.title,
30
+ children: group.children.filter((child) => !child.hasOwnDocument),
31
+ };
32
+ });
33
+ }
34
+ return [];
35
+ }
7
36
  function members(context, props) {
8
- if (props.categories && props.categories.length) {
9
- return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null, props.categories.map((item) => !item.allChildrenHaveOwnDocument() && (utils_1.JSX.createElement("details", { class: (0, lib_1.classNames)({ "tsd-panel-group": true, "tsd-member-group": true, "tsd-accordion": true }, props instanceof models_1.DeclarationReflection ? context.getReflectionClasses(props) : "") },
10
- utils_1.JSX.createElement("summary", { class: "tsd-accordion-summary", "data-key": "section-" + item.title },
37
+ const sections = getMemberSections(props).filter((sect) => sect.children.length);
38
+ return (utils_1.JSX.createElement(utils_1.JSX.Fragment, null, sections.map(({ title, children }) => {
39
+ context.page.startNewSection(title);
40
+ return (utils_1.JSX.createElement("details", { class: "tsd-panel-group tsd-member-group tsd-accordion", open: true },
41
+ utils_1.JSX.createElement("summary", { class: "tsd-accordion-summary", "data-key": "section-" + title },
11
42
  utils_1.JSX.createElement("h2", null,
12
43
  context.icons.chevronDown(),
13
44
  " ",
14
- item.title)),
15
- utils_1.JSX.createElement("section", null, item.children.map((item) => !item.hasOwnDocument && context.member(item))))))));
16
- }
17
- return utils_1.JSX.createElement(utils_1.JSX.Fragment, null, props.groups?.map((item) => !item.allChildrenHaveOwnDocument() && context.membersGroup(item)));
45
+ title)),
46
+ utils_1.JSX.createElement("section", null, children.map((item) => context.member(item)))));
47
+ })));
18
48
  }