@depup/typedoc 0.28.17-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +34 -0
- package/bin/package.json +3 -0
- package/bin/typedoc +24 -0
- package/changes.json +22 -0
- package/dist/browser-locales/de.d.ts +2 -0
- package/dist/browser-locales/de.js +62 -0
- package/dist/browser-locales/en.d.ts +2 -0
- package/dist/browser-locales/en.js +62 -0
- package/dist/browser-locales/ja.d.ts +2 -0
- package/dist/browser-locales/ja.js +62 -0
- package/dist/browser-locales/ko.d.ts +2 -0
- package/dist/browser-locales/ko.js +62 -0
- package/dist/browser-locales/zh.d.ts +2 -0
- package/dist/browser-locales/zh.js +62 -0
- package/dist/browser-utils.d.ts +3 -0
- package/dist/browser-utils.js +3 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +46 -0
- package/dist/lib/application-events.d.ts +5 -0
- package/dist/lib/application-events.js +5 -0
- package/dist/lib/application.d.ts +195 -0
- package/dist/lib/application.js +715 -0
- package/dist/lib/cli.d.ts +1 -0
- package/dist/lib/cli.js +111 -0
- package/dist/lib/converter/comments/blockLexer.d.ts +4 -0
- package/dist/lib/converter/comments/blockLexer.js +391 -0
- package/dist/lib/converter/comments/declarationReferenceResolver.d.ts +3 -0
- package/dist/lib/converter/comments/declarationReferenceResolver.js +218 -0
- package/dist/lib/converter/comments/discovery.d.ts +14 -0
- package/dist/lib/converter/comments/discovery.js +563 -0
- package/dist/lib/converter/comments/index.d.ts +37 -0
- package/dist/lib/converter/comments/index.js +241 -0
- package/dist/lib/converter/comments/lexer.d.ts +17 -0
- package/dist/lib/converter/comments/lexer.js +10 -0
- package/dist/lib/converter/comments/lineLexer.d.ts +3 -0
- package/dist/lib/converter/comments/lineLexer.js +279 -0
- package/dist/lib/converter/comments/linkResolver.d.ts +20 -0
- package/dist/lib/converter/comments/linkResolver.js +186 -0
- package/dist/lib/converter/comments/parser.d.ts +18 -0
- package/dist/lib/converter/comments/parser.js +538 -0
- package/dist/lib/converter/comments/rawLexer.d.ts +8 -0
- package/dist/lib/converter/comments/rawLexer.js +218 -0
- package/dist/lib/converter/comments/tagName.d.ts +8 -0
- package/dist/lib/converter/comments/tagName.js +58 -0
- package/dist/lib/converter/comments/textParser.d.ts +33 -0
- package/dist/lib/converter/comments/textParser.js +372 -0
- package/dist/lib/converter/components.d.ts +4 -0
- package/dist/lib/converter/components.js +3 -0
- package/dist/lib/converter/context.d.ts +101 -0
- package/dist/lib/converter/context.js +311 -0
- package/dist/lib/converter/convert-expression.d.ts +9 -0
- package/dist/lib/converter/convert-expression.js +58 -0
- package/dist/lib/converter/converter-events.d.ts +13 -0
- package/dist/lib/converter/converter-events.js +13 -0
- package/dist/lib/converter/converter.d.ts +238 -0
- package/dist/lib/converter/converter.js +705 -0
- package/dist/lib/converter/factories/index-signature.d.ts +3 -0
- package/dist/lib/converter/factories/index-signature.js +50 -0
- package/dist/lib/converter/factories/signature.d.ts +14 -0
- package/dist/lib/converter/factories/signature.js +353 -0
- package/dist/lib/converter/factories/symbol-id.d.ts +3 -0
- package/dist/lib/converter/factories/symbol-id.js +47 -0
- package/dist/lib/converter/index.d.ts +5 -0
- package/dist/lib/converter/index.js +3 -0
- package/dist/lib/converter/jsdoc.d.ts +4 -0
- package/dist/lib/converter/jsdoc.js +135 -0
- package/dist/lib/converter/plugins/CategoryPlugin.d.ts +48 -0
- package/dist/lib/converter/plugins/CategoryPlugin.js +278 -0
- package/dist/lib/converter/plugins/CommentPlugin.d.ts +128 -0
- package/dist/lib/converter/plugins/CommentPlugin.js +770 -0
- package/dist/lib/converter/plugins/GroupPlugin.d.ts +48 -0
- package/dist/lib/converter/plugins/GroupPlugin.js +281 -0
- package/dist/lib/converter/plugins/ImplementsPlugin.d.ts +42 -0
- package/dist/lib/converter/plugins/ImplementsPlugin.js +438 -0
- package/dist/lib/converter/plugins/IncludePlugin.d.ts +14 -0
- package/dist/lib/converter/plugins/IncludePlugin.js +254 -0
- package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +32 -0
- package/dist/lib/converter/plugins/InheritDocPlugin.js +220 -0
- package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +13 -0
- package/dist/lib/converter/plugins/LinkResolverPlugin.js +88 -0
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.d.ts +12 -0
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +50 -0
- package/dist/lib/converter/plugins/PackagePlugin.d.ts +31 -0
- package/dist/lib/converter/plugins/PackagePlugin.js +188 -0
- package/dist/lib/converter/plugins/SourcePlugin.d.ts +36 -0
- package/dist/lib/converter/plugins/SourcePlugin.js +215 -0
- package/dist/lib/converter/plugins/TypePlugin.d.ts +16 -0
- package/dist/lib/converter/plugins/TypePlugin.js +108 -0
- package/dist/lib/converter/plugins/index.d.ts +10 -0
- package/dist/lib/converter/plugins/index.js +10 -0
- package/dist/lib/converter/symbols.d.ts +3 -0
- package/dist/lib/converter/symbols.js +861 -0
- package/dist/lib/converter/types.d.ts +10 -0
- package/dist/lib/converter/types.js +833 -0
- package/dist/lib/converter/utils/nodes.d.ts +7 -0
- package/dist/lib/converter/utils/nodes.js +26 -0
- package/dist/lib/converter/utils/reflections.d.ts +2 -0
- package/dist/lib/converter/utils/reflections.js +17 -0
- package/dist/lib/converter/utils/repository.d.ts +96 -0
- package/dist/lib/converter/utils/repository.js +295 -0
- package/dist/lib/converter/utils/symbols.d.ts +2 -0
- package/dist/lib/converter/utils/symbols.js +12 -0
- package/dist/lib/debug/index.d.ts +2 -0
- package/dist/lib/debug/index.js +2 -0
- package/dist/lib/debug/reflectionLifetimes.d.ts +3 -0
- package/dist/lib/debug/reflectionLifetimes.js +27 -0
- package/dist/lib/debug/rendererUrls.d.ts +6 -0
- package/dist/lib/debug/rendererUrls.js +68 -0
- package/dist/lib/internationalization/index.d.ts +7 -0
- package/dist/lib/internationalization/index.js +7 -0
- package/dist/lib/internationalization/internationalization.d.ts +65 -0
- package/dist/lib/internationalization/internationalization.js +64 -0
- package/dist/lib/internationalization/locale-utils.cjs +8 -0
- package/dist/lib/internationalization/locale-utils.d.cts +8 -0
- package/dist/lib/internationalization/locales/de.cjs +401 -0
- package/dist/lib/internationalization/locales/de.d.cts +368 -0
- package/dist/lib/internationalization/locales/en.cjs +411 -0
- package/dist/lib/internationalization/locales/en.d.cts +380 -0
- package/dist/lib/internationalization/locales/ja.cjs +320 -0
- package/dist/lib/internationalization/locales/ja.d.cts +307 -0
- package/dist/lib/internationalization/locales/ko.cjs +233 -0
- package/dist/lib/internationalization/locales/ko.d.cts +221 -0
- package/dist/lib/internationalization/locales/zh.cjs +488 -0
- package/dist/lib/internationalization/locales/zh.d.cts +452 -0
- package/dist/lib/internationalization/translatable.d.ts +21 -0
- package/dist/lib/internationalization/translatable.js +8 -0
- package/dist/lib/models/Comment.d.ts +241 -0
- package/dist/lib/models/Comment.js +534 -0
- package/dist/lib/models/ContainerReflection.d.ts +56 -0
- package/dist/lib/models/ContainerReflection.js +159 -0
- package/dist/lib/models/DeclarationReflection.d.ts +149 -0
- package/dist/lib/models/DeclarationReflection.js +287 -0
- package/dist/lib/models/DocumentReflection.d.ts +32 -0
- package/dist/lib/models/DocumentReflection.js +66 -0
- package/dist/lib/models/FileRegistry.d.ts +46 -0
- package/dist/lib/models/FileRegistry.js +133 -0
- package/dist/lib/models/ParameterReflection.d.ts +21 -0
- package/dist/lib/models/ParameterReflection.js +39 -0
- package/dist/lib/models/ProjectReflection.d.ts +112 -0
- package/dist/lib/models/ProjectReflection.js +417 -0
- package/dist/lib/models/ReferenceReflection.d.ts +49 -0
- package/dist/lib/models/ReferenceReflection.js +85 -0
- package/dist/lib/models/Reflection.d.ts +229 -0
- package/dist/lib/models/Reflection.js +495 -0
- package/dist/lib/models/ReflectionCategory.d.ts +31 -0
- package/dist/lib/models/ReflectionCategory.js +56 -0
- package/dist/lib/models/ReflectionGroup.d.ts +38 -0
- package/dist/lib/models/ReflectionGroup.js +72 -0
- package/dist/lib/models/ReflectionSymbolId.d.ts +63 -0
- package/dist/lib/models/ReflectionSymbolId.js +85 -0
- package/dist/lib/models/SignatureReflection.d.ts +50 -0
- package/dist/lib/models/SignatureReflection.js +96 -0
- package/dist/lib/models/SourceReference.d.ts +33 -0
- package/dist/lib/models/SourceReference.js +50 -0
- package/dist/lib/models/TypeParameterReflection.d.ts +30 -0
- package/dist/lib/models/TypeParameterReflection.js +45 -0
- package/dist/lib/models/index.d.ts +19 -0
- package/dist/lib/models/index.js +19 -0
- package/dist/lib/models/kind.d.ts +84 -0
- package/dist/lib/models/kind.js +231 -0
- package/dist/lib/models/types.d.ts +553 -0
- package/dist/lib/models/types.js +1296 -0
- package/dist/lib/models/utils.d.ts +1 -0
- package/dist/lib/models/utils.js +26 -0
- package/dist/lib/models/variant.d.ts +21 -0
- package/dist/lib/models/variant.js +1 -0
- package/dist/lib/output/components.d.ts +53 -0
- package/dist/lib/output/components.js +133 -0
- package/dist/lib/output/events.d.ts +175 -0
- package/dist/lib/output/events.js +195 -0
- package/dist/lib/output/formatter.d.ts +88 -0
- package/dist/lib/output/formatter.js +660 -0
- package/dist/lib/output/index.d.ts +9 -0
- package/dist/lib/output/index.js +7 -0
- package/dist/lib/output/output.d.ts +14 -0
- package/dist/lib/output/output.js +92 -0
- package/dist/lib/output/plugins/AssetsPlugin.d.ts +20 -0
- package/dist/lib/output/plugins/AssetsPlugin.js +160 -0
- package/dist/lib/output/plugins/HierarchyPlugin.d.ts +7 -0
- package/dist/lib/output/plugins/HierarchyPlugin.js +65 -0
- package/dist/lib/output/plugins/IconsPlugin.d.ts +12 -0
- package/dist/lib/output/plugins/IconsPlugin.js +54 -0
- package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +22 -0
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +222 -0
- package/dist/lib/output/plugins/NavigationPlugin.d.ts +7 -0
- package/dist/lib/output/plugins/NavigationPlugin.js +23 -0
- package/dist/lib/output/plugins/SitemapPlugin.d.ts +8 -0
- package/dist/lib/output/plugins/SitemapPlugin.js +82 -0
- package/dist/lib/output/plugins/index.d.ts +7 -0
- package/dist/lib/output/plugins/index.js +7 -0
- package/dist/lib/output/renderer.d.ts +227 -0
- package/dist/lib/output/renderer.js +387 -0
- package/dist/lib/output/router.d.ts +187 -0
- package/dist/lib/output/router.js +520 -0
- package/dist/lib/output/theme.d.ts +22 -0
- package/dist/lib/output/theme.js +17 -0
- package/dist/lib/output/themes/MarkedPlugin.d.ts +62 -0
- package/dist/lib/output/themes/MarkedPlugin.js +461 -0
- package/dist/lib/output/themes/default/DefaultTheme.d.ts +72 -0
- package/dist/lib/output/themes/default/DefaultTheme.js +367 -0
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +105 -0
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +151 -0
- package/dist/lib/output/themes/default/Slugger.d.ts +13 -0
- package/dist/lib/output/themes/default/Slugger.js +60 -0
- package/dist/lib/output/themes/default/layouts/default.d.ts +6 -0
- package/dist/lib/output/themes/default/layouts/default.js +89 -0
- package/dist/lib/output/themes/default/partials/anchor-icon.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/anchor-icon.js +9 -0
- package/dist/lib/output/themes/default/partials/breadcrumb.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/breadcrumb.js +11 -0
- package/dist/lib/output/themes/default/partials/comment.d.ts +8 -0
- package/dist/lib/output/themes/default/partials/comment.js +80 -0
- package/dist/lib/output/themes/default/partials/footer.d.ts +3 -0
- package/dist/lib/output/themes/default/partials/footer.js +37 -0
- package/dist/lib/output/themes/default/partials/header.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/header.js +39 -0
- package/dist/lib/output/themes/default/partials/hierarchy.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/hierarchy.js +32 -0
- package/dist/lib/output/themes/default/partials/icon.d.ts +20 -0
- package/dist/lib/output/themes/default/partials/icon.js +101 -0
- package/dist/lib/output/themes/default/partials/index.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/index.js +24 -0
- package/dist/lib/output/themes/default/partials/member.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/member.declaration.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/member.declaration.js +35 -0
- package/dist/lib/output/themes/default/partials/member.getterSetter.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/member.getterSetter.js +12 -0
- package/dist/lib/output/themes/default/partials/member.js +36 -0
- package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +6 -0
- package/dist/lib/output/themes/default/partials/member.signature.body.js +33 -0
- package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/member.signature.title.js +9 -0
- package/dist/lib/output/themes/default/partials/member.signatures.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/member.signatures.js +9 -0
- package/dist/lib/output/themes/default/partials/member.sources.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/member.sources.js +55 -0
- package/dist/lib/output/themes/default/partials/members.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/members.js +17 -0
- package/dist/lib/output/themes/default/partials/moduleReflection.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/moduleReflection.js +68 -0
- package/dist/lib/output/themes/default/partials/navigation.d.ts +10 -0
- package/dist/lib/output/themes/default/partials/navigation.js +144 -0
- package/dist/lib/output/themes/default/partials/reflectionPreview.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/reflectionPreview.js +26 -0
- package/dist/lib/output/themes/default/partials/toolbar.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/toolbar.js +13 -0
- package/dist/lib/output/themes/default/partials/type.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/type.js +9 -0
- package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/typeAndParent.js +28 -0
- package/dist/lib/output/themes/default/partials/typeDetails.d.ts +8 -0
- package/dist/lib/output/themes/default/partials/typeDetails.js +284 -0
- package/dist/lib/output/themes/default/partials/typeParameters.d.ts +4 -0
- package/dist/lib/output/themes/default/partials/typeParameters.js +26 -0
- package/dist/lib/output/themes/default/templates/document.d.ts +5 -0
- package/dist/lib/output/themes/default/templates/document.js +3 -0
- package/dist/lib/output/themes/default/templates/hierarchy.d.ts +5 -0
- package/dist/lib/output/themes/default/templates/hierarchy.js +31 -0
- package/dist/lib/output/themes/default/templates/index.d.ts +5 -0
- package/dist/lib/output/themes/default/templates/index.js +3 -0
- package/dist/lib/output/themes/default/templates/reflection.d.ts +5 -0
- package/dist/lib/output/themes/default/templates/reflection.js +53 -0
- package/dist/lib/output/themes/lib.d.ts +44 -0
- package/dist/lib/output/themes/lib.js +218 -0
- package/dist/lib/serialization/components.d.ts +22 -0
- package/dist/lib/serialization/components.js +1 -0
- package/dist/lib/serialization/deserializer.d.ts +70 -0
- package/dist/lib/serialization/deserializer.js +235 -0
- package/dist/lib/serialization/events.d.ts +17 -0
- package/dist/lib/serialization/events.js +18 -0
- package/dist/lib/serialization/index.d.ts +5 -0
- package/dist/lib/serialization/index.js +4 -0
- package/dist/lib/serialization/schema.d.ts +283 -0
- package/dist/lib/serialization/schema.js +32 -0
- package/dist/lib/serialization/serializer.d.ts +52 -0
- package/dist/lib/serialization/serializer.js +65 -0
- package/dist/lib/utils/ValidatingFileRegistry.d.ts +12 -0
- package/dist/lib/utils/ValidatingFileRegistry.js +52 -0
- package/dist/lib/utils/component.d.ts +38 -0
- package/dist/lib/utils/component.js +41 -0
- package/dist/lib/utils/compress.d.ts +7 -0
- package/dist/lib/utils/compress.js +13 -0
- package/dist/lib/utils/declaration-maps.d.ts +3 -0
- package/dist/lib/utils/declaration-maps.js +51 -0
- package/dist/lib/utils/entry-point.d.ts +50 -0
- package/dist/lib/utils/entry-point.js +330 -0
- package/dist/lib/utils/fs.d.ts +65 -0
- package/dist/lib/utils/fs.js +372 -0
- package/dist/lib/utils/general.d.ts +4 -0
- package/dist/lib/utils/general.js +25 -0
- package/dist/lib/utils/highlighter.d.ts +9 -0
- package/dist/lib/utils/highlighter.js +150 -0
- package/dist/lib/utils/html-entities.d.ts +8926 -0
- package/dist/lib/utils/html-entities.js +2329 -0
- package/dist/lib/utils/html.d.ts +67 -0
- package/dist/lib/utils/html.js +635 -0
- package/dist/lib/utils/index.d.ts +17 -0
- package/dist/lib/utils/index.js +15 -0
- package/dist/lib/utils/loggers.d.ts +10 -0
- package/dist/lib/utils/loggers.js +71 -0
- package/dist/lib/utils/options/declaration.d.ts +514 -0
- package/dist/lib/utils/options/declaration.js +443 -0
- package/dist/lib/utils/options/defaults.d.ts +20 -0
- package/dist/lib/utils/options/defaults.js +104 -0
- package/dist/lib/utils/options/help.d.ts +7 -0
- package/dist/lib/utils/options/help.js +63 -0
- package/dist/lib/utils/options/index.d.ts +6 -0
- package/dist/lib/utils/options/index.js +4 -0
- package/dist/lib/utils/options/options.d.ts +199 -0
- package/dist/lib/utils/options/options.js +273 -0
- package/dist/lib/utils/options/readers/arguments.d.ts +15 -0
- package/dist/lib/utils/options/readers/arguments.js +109 -0
- package/dist/lib/utils/options/readers/index.d.ts +4 -0
- package/dist/lib/utils/options/readers/index.js +4 -0
- package/dist/lib/utils/options/readers/package-json.d.ts +9 -0
- package/dist/lib/utils/options/readers/package-json.js +40 -0
- package/dist/lib/utils/options/readers/tsconfig.d.ts +14 -0
- package/dist/lib/utils/options/readers/tsconfig.js +172 -0
- package/dist/lib/utils/options/readers/typedoc.d.ts +33 -0
- package/dist/lib/utils/options/readers/typedoc.js +136 -0
- package/dist/lib/utils/options/sources/index.d.ts +1 -0
- package/dist/lib/utils/options/sources/index.js +1 -0
- package/dist/lib/utils/options/sources/typedoc.d.ts +2 -0
- package/dist/lib/utils/options/sources/typedoc.js +876 -0
- package/dist/lib/utils/options/tsdoc-defaults.d.ts +6 -0
- package/dist/lib/utils/options/tsdoc-defaults.js +94 -0
- package/dist/lib/utils/package-manifest.d.ts +11 -0
- package/dist/lib/utils/package-manifest.js +84 -0
- package/dist/lib/utils/paths.d.ts +27 -0
- package/dist/lib/utils/paths.js +127 -0
- package/dist/lib/utils/perf.d.ts +6 -0
- package/dist/lib/utils/perf.js +86 -0
- package/dist/lib/utils/plugins.d.ts +3 -0
- package/dist/lib/utils/plugins.js +61 -0
- package/dist/lib/utils/reflections.d.ts +5 -0
- package/dist/lib/utils/reflections.js +64 -0
- package/dist/lib/utils/sort.d.ts +11 -0
- package/dist/lib/utils/sort.js +153 -0
- package/dist/lib/utils/tsconfig.d.ts +5 -0
- package/dist/lib/utils/tsconfig.js +60 -0
- package/dist/lib/utils/tsutils.d.ts +3 -0
- package/dist/lib/utils/tsutils.js +23 -0
- package/dist/lib/utils-common/array.d.ts +57 -0
- package/dist/lib/utils-common/array.js +152 -0
- package/dist/lib/utils-common/declarationReference.d.ts +42 -0
- package/dist/lib/utils-common/declarationReference.js +341 -0
- package/dist/lib/utils-common/enum.d.ts +9 -0
- package/dist/lib/utils-common/enum.js +27 -0
- package/dist/lib/utils-common/events.d.ts +29 -0
- package/dist/lib/utils-common/events.js +49 -0
- package/dist/lib/utils-common/general.d.ts +40 -0
- package/dist/lib/utils-common/general.js +22 -0
- package/dist/lib/utils-common/hooks.d.ts +51 -0
- package/dist/lib/utils-common/hooks.js +90 -0
- package/dist/lib/utils-common/i18n.d.ts +18 -0
- package/dist/lib/utils-common/i18n.js +39 -0
- package/dist/lib/utils-common/index.d.ts +16 -0
- package/dist/lib/utils-common/index.js +17 -0
- package/dist/lib/utils-common/jsx.d.ts +53 -0
- package/dist/lib/utils-common/jsx.elements.d.ts +949 -0
- package/dist/lib/utils-common/jsx.elements.js +3 -0
- package/dist/lib/utils-common/jsx.js +187 -0
- package/dist/lib/utils-common/logger.d.ts +97 -0
- package/dist/lib/utils-common/logger.js +129 -0
- package/dist/lib/utils-common/map.d.ts +23 -0
- package/dist/lib/utils-common/map.js +63 -0
- package/dist/lib/utils-common/minimalSourceFile.d.ts +12 -0
- package/dist/lib/utils-common/minimalSourceFile.js +43 -0
- package/dist/lib/utils-common/path.d.ts +42 -0
- package/dist/lib/utils-common/path.js +130 -0
- package/dist/lib/utils-common/set.d.ts +3 -0
- package/dist/lib/utils-common/set.js +23 -0
- package/dist/lib/utils-common/string.d.ts +11 -0
- package/dist/lib/utils-common/string.js +84 -0
- package/dist/lib/utils-common/validation.d.ts +33 -0
- package/dist/lib/utils-common/validation.js +50 -0
- package/dist/lib/validation/documentation.d.ts +3 -0
- package/dist/lib/validation/documentation.js +91 -0
- package/dist/lib/validation/exports.d.ts +3 -0
- package/dist/lib/validation/exports.js +65 -0
- package/dist/lib/validation/links.d.ts +3 -0
- package/dist/lib/validation/links.js +78 -0
- package/dist/lib/validation/unusedMergeModuleWith.d.ts +3 -0
- package/dist/lib/validation/unusedMergeModuleWith.js +12 -0
- package/package.json +161 -0
- package/static/main.js +58 -0
- package/static/style.css +1633 -0
- package/tsdoc.json +247 -0
- package/typedoc-config.schema.json +941 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
import { Theme } from "../../theme.js";
|
|
36
|
+
import { ReferenceReflection, ReflectionCategory, ReflectionGroup, ReflectionKind, } from "../../../models/index.js";
|
|
37
|
+
import { DefaultThemeRenderContext } from "./DefaultThemeRenderContext.js";
|
|
38
|
+
import { getIcons } from "./partials/icon.js";
|
|
39
|
+
import { filterMap, JSX } from "#utils";
|
|
40
|
+
import { classNames, getDisplayName, toStyleClass } from "../lib.js";
|
|
41
|
+
import { PageKind } from "../../router.js";
|
|
42
|
+
import { loadHighlighter, Option } from "#node-utils";
|
|
43
|
+
let DefaultTheme = (() => {
|
|
44
|
+
let _classSuper = Theme;
|
|
45
|
+
let _lightTheme_decorators;
|
|
46
|
+
let _lightTheme_initializers = [];
|
|
47
|
+
let _lightTheme_extraInitializers = [];
|
|
48
|
+
let _darkTheme_decorators;
|
|
49
|
+
let _darkTheme_initializers = [];
|
|
50
|
+
let _darkTheme_extraInitializers = [];
|
|
51
|
+
let _highlightLanguages_decorators;
|
|
52
|
+
let _highlightLanguages_initializers = [];
|
|
53
|
+
let _highlightLanguages_extraInitializers = [];
|
|
54
|
+
let _ignoredHighlightLanguages_decorators;
|
|
55
|
+
let _ignoredHighlightLanguages_initializers = [];
|
|
56
|
+
let _ignoredHighlightLanguages_extraInitializers = [];
|
|
57
|
+
return class DefaultTheme extends _classSuper {
|
|
58
|
+
static {
|
|
59
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
60
|
+
_lightTheme_decorators = [Option("lightHighlightTheme")];
|
|
61
|
+
_darkTheme_decorators = [Option("darkHighlightTheme")];
|
|
62
|
+
_highlightLanguages_decorators = [Option("highlightLanguages")];
|
|
63
|
+
_ignoredHighlightLanguages_decorators = [Option("ignoredHighlightLanguages")];
|
|
64
|
+
__esDecorate(this, 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);
|
|
65
|
+
__esDecorate(this, 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);
|
|
66
|
+
__esDecorate(this, null, _highlightLanguages_decorators, { kind: "accessor", name: "highlightLanguages", static: false, private: false, access: { has: obj => "highlightLanguages" in obj, get: obj => obj.highlightLanguages, set: (obj, value) => { obj.highlightLanguages = value; } }, metadata: _metadata }, _highlightLanguages_initializers, _highlightLanguages_extraInitializers);
|
|
67
|
+
__esDecorate(this, null, _ignoredHighlightLanguages_decorators, { kind: "accessor", name: "ignoredHighlightLanguages", static: false, private: false, access: { has: obj => "ignoredHighlightLanguages" in obj, get: obj => obj.ignoredHighlightLanguages, set: (obj, value) => { obj.ignoredHighlightLanguages = value; } }, metadata: _metadata }, _ignoredHighlightLanguages_initializers, _ignoredHighlightLanguages_extraInitializers);
|
|
68
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
69
|
+
}
|
|
70
|
+
// Note: This will always contain lowercased names to avoid issues with
|
|
71
|
+
// case-insensitive file systems.
|
|
72
|
+
usedFileNames = new Set();
|
|
73
|
+
/** @internal */
|
|
74
|
+
markedPlugin;
|
|
75
|
+
router;
|
|
76
|
+
/**
|
|
77
|
+
* The icons which will actually be rendered. The source of truth lives on the theme, and
|
|
78
|
+
* the {@link DefaultThemeRenderContext.icons} member will produce references to these.
|
|
79
|
+
*
|
|
80
|
+
* These icons will be written twice. Once to an `icons.svg` file in the assets directory
|
|
81
|
+
* which will be referenced by icons on the context, and once to an `icons.js` file so that
|
|
82
|
+
* references to the icons can be dynamically embedded within the page for use by the search
|
|
83
|
+
* dropdown and when loading the page on `file://` urls.
|
|
84
|
+
*
|
|
85
|
+
* Custom themes may overwrite this entire object or individual properties on it to customize
|
|
86
|
+
* the icons used within the page, however TypeDoc currently assumes that all icons are svg
|
|
87
|
+
* elements, so custom themes must also use svg elements.
|
|
88
|
+
*/
|
|
89
|
+
icons;
|
|
90
|
+
ContextClass = DefaultThemeRenderContext;
|
|
91
|
+
#lightTheme_accessor_storage = __runInitializers(this, _lightTheme_initializers, void 0);
|
|
92
|
+
get lightTheme() { return this.#lightTheme_accessor_storage; }
|
|
93
|
+
set lightTheme(value) { this.#lightTheme_accessor_storage = value; }
|
|
94
|
+
#darkTheme_accessor_storage = (__runInitializers(this, _lightTheme_extraInitializers), __runInitializers(this, _darkTheme_initializers, void 0));
|
|
95
|
+
get darkTheme() { return this.#darkTheme_accessor_storage; }
|
|
96
|
+
set darkTheme(value) { this.#darkTheme_accessor_storage = value; }
|
|
97
|
+
#highlightLanguages_accessor_storage = (__runInitializers(this, _darkTheme_extraInitializers), __runInitializers(this, _highlightLanguages_initializers, void 0));
|
|
98
|
+
get highlightLanguages() { return this.#highlightLanguages_accessor_storage; }
|
|
99
|
+
set highlightLanguages(value) { this.#highlightLanguages_accessor_storage = value; }
|
|
100
|
+
#ignoredHighlightLanguages_accessor_storage = (__runInitializers(this, _highlightLanguages_extraInitializers), __runInitializers(this, _ignoredHighlightLanguages_initializers, void 0));
|
|
101
|
+
get ignoredHighlightLanguages() { return this.#ignoredHighlightLanguages_accessor_storage; }
|
|
102
|
+
set ignoredHighlightLanguages(value) { this.#ignoredHighlightLanguages_accessor_storage = value; }
|
|
103
|
+
getRenderContext(pageEvent) {
|
|
104
|
+
return new this.ContextClass(this.router, this, pageEvent, this.application.options);
|
|
105
|
+
}
|
|
106
|
+
documentTemplate = (__runInitializers(this, _ignoredHighlightLanguages_extraInitializers), (pageEvent) => {
|
|
107
|
+
return this.getRenderContext(pageEvent).documentTemplate(pageEvent);
|
|
108
|
+
});
|
|
109
|
+
reflectionTemplate = (pageEvent) => {
|
|
110
|
+
return this.getRenderContext(pageEvent).reflectionTemplate(pageEvent);
|
|
111
|
+
};
|
|
112
|
+
indexTemplate = (pageEvent) => {
|
|
113
|
+
return this.getRenderContext(pageEvent).indexTemplate(pageEvent);
|
|
114
|
+
};
|
|
115
|
+
hierarchyTemplate = (pageEvent) => {
|
|
116
|
+
return this.getRenderContext(pageEvent).hierarchyTemplate(pageEvent);
|
|
117
|
+
};
|
|
118
|
+
defaultLayoutTemplate = (pageEvent, template) => {
|
|
119
|
+
return this.getRenderContext(pageEvent).defaultLayout(template, pageEvent);
|
|
120
|
+
};
|
|
121
|
+
getReflectionClasses(reflection) {
|
|
122
|
+
const filters = this.application.options.getValue("visibilityFilters");
|
|
123
|
+
return getReflectionClasses(reflection, filters);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* This is used so that themes may define multiple icons for modified icons (e.g. method, and inherited method)
|
|
127
|
+
*/
|
|
128
|
+
getReflectionIcon(reflection) {
|
|
129
|
+
return reflection.kind;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Create a new DefaultTheme instance.
|
|
133
|
+
*
|
|
134
|
+
* @param renderer The renderer this theme is attached to.
|
|
135
|
+
*/
|
|
136
|
+
constructor(renderer) {
|
|
137
|
+
super(renderer);
|
|
138
|
+
this.icons = getIcons();
|
|
139
|
+
this.markedPlugin = renderer.markedPlugin;
|
|
140
|
+
this.router = renderer.router;
|
|
141
|
+
}
|
|
142
|
+
render(page) {
|
|
143
|
+
const templateMapping = {
|
|
144
|
+
[PageKind.Index]: this.indexTemplate,
|
|
145
|
+
[PageKind.Document]: this.documentTemplate,
|
|
146
|
+
[PageKind.Hierarchy]: this.hierarchyTemplate,
|
|
147
|
+
[PageKind.Reflection]: this.reflectionTemplate,
|
|
148
|
+
};
|
|
149
|
+
const template = templateMapping[page.pageKind];
|
|
150
|
+
if (!template) {
|
|
151
|
+
throw new Error(`TypeDoc's DefaultTheme does not support the page kind ${page.pageKind}`);
|
|
152
|
+
}
|
|
153
|
+
if (!page.isReflectionEvent()) {
|
|
154
|
+
throw new Error(`TypeDoc's DefaultTheme requires that a page model be a reflection when rendering ${page.pageKind}`);
|
|
155
|
+
}
|
|
156
|
+
const templateOutput = this.defaultLayoutTemplate(page, template);
|
|
157
|
+
return "<!DOCTYPE html>" + JSX.renderElement(templateOutput) + "\n";
|
|
158
|
+
}
|
|
159
|
+
async preRender(_event) {
|
|
160
|
+
await loadHighlighter(this.lightTheme, this.darkTheme,
|
|
161
|
+
// Checked in option validation
|
|
162
|
+
this.highlightLanguages, this.ignoredHighlightLanguages);
|
|
163
|
+
}
|
|
164
|
+
_navigationCache;
|
|
165
|
+
/**
|
|
166
|
+
* If implementing a custom theme, it is recommended to override {@link buildNavigation} instead.
|
|
167
|
+
*/
|
|
168
|
+
getNavigation(project) {
|
|
169
|
+
// This is ok because currently TypeDoc wipes out the theme after each render.
|
|
170
|
+
// Might need to change in the future, but it's fine for now.
|
|
171
|
+
if (this._navigationCache) {
|
|
172
|
+
return this._navigationCache;
|
|
173
|
+
}
|
|
174
|
+
return (this._navigationCache = this.buildNavigation(project));
|
|
175
|
+
}
|
|
176
|
+
buildNavigation(project) {
|
|
177
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
178
|
+
const theme = this;
|
|
179
|
+
const router = this.router;
|
|
180
|
+
const opts = this.application.options.getValue("navigation");
|
|
181
|
+
const leaves = this.application.options.getValue("navigationLeaves");
|
|
182
|
+
return getNavigationElements(project) || [];
|
|
183
|
+
function toNavigation(element) {
|
|
184
|
+
if (opts.excludeReferences && element instanceof ReferenceReflection) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const children = getNavigationElements(element);
|
|
188
|
+
if (element instanceof ReflectionCategory || element instanceof ReflectionGroup) {
|
|
189
|
+
if (!children?.length) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
text: element.title,
|
|
194
|
+
children,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
const icon = theme.getReflectionIcon(element) === element.kind
|
|
198
|
+
? undefined
|
|
199
|
+
: theme.getReflectionIcon(element);
|
|
200
|
+
return {
|
|
201
|
+
text: getDisplayName(element),
|
|
202
|
+
path: router.getFullUrl(element),
|
|
203
|
+
kind: element.kind & ReflectionKind.Project ? undefined : element.kind,
|
|
204
|
+
class: classNames({ deprecated: element.isDeprecated() }, theme.getReflectionClasses(element)),
|
|
205
|
+
children: children?.length ? children : undefined,
|
|
206
|
+
icon,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
function getNavigationElements(parent) {
|
|
210
|
+
if (parent instanceof ReflectionCategory) {
|
|
211
|
+
return filterMap(parent.children, toNavigation);
|
|
212
|
+
}
|
|
213
|
+
if (parent instanceof ReflectionGroup) {
|
|
214
|
+
if (shouldShowCategories(parent.owningReflection, opts) && parent.categories) {
|
|
215
|
+
return filterMap(parent.categories, toNavigation);
|
|
216
|
+
}
|
|
217
|
+
return filterMap(parent.children, toNavigation);
|
|
218
|
+
}
|
|
219
|
+
if (leaves.includes(parent.getFullName())) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (!parent.kindOf(ReflectionKind.MayContainDocuments)) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
if (parent.isDocument()) {
|
|
226
|
+
return filterMap(parent.children, toNavigation);
|
|
227
|
+
}
|
|
228
|
+
if (!parent.kindOf(ReflectionKind.SomeModule | ReflectionKind.Project)) {
|
|
229
|
+
// Tricky: Non-module children don't show up in the navigation pane,
|
|
230
|
+
// but any documents added by them should.
|
|
231
|
+
return filterMap(parent.documents, toNavigation);
|
|
232
|
+
}
|
|
233
|
+
if (parent.categories && shouldShowCategories(parent, opts)) {
|
|
234
|
+
return filterMapWithNoneCollection(parent.categories);
|
|
235
|
+
}
|
|
236
|
+
if (parent.groups && shouldShowGroups(parent, opts)) {
|
|
237
|
+
return filterMapWithNoneCollection(parent.groups);
|
|
238
|
+
}
|
|
239
|
+
if (opts.includeFolders && parent.childrenIncludingDocuments?.some((child) => child.name.includes("/"))) {
|
|
240
|
+
return deriveModuleFolders(parent.childrenIncludingDocuments);
|
|
241
|
+
}
|
|
242
|
+
return filterMap(parent.childrenIncludingDocuments, toNavigation);
|
|
243
|
+
}
|
|
244
|
+
function filterMapWithNoneCollection(reflection) {
|
|
245
|
+
const none = reflection.find((x) => x.title.toLocaleLowerCase() === "none");
|
|
246
|
+
const others = reflection.filter((x) => x.title.toLocaleLowerCase() !== "none");
|
|
247
|
+
const mappedOthers = filterMap(others, toNavigation);
|
|
248
|
+
if (none) {
|
|
249
|
+
const noneMappedChildren = filterMap(none.children, toNavigation);
|
|
250
|
+
return [...noneMappedChildren, ...mappedOthers];
|
|
251
|
+
}
|
|
252
|
+
return mappedOthers;
|
|
253
|
+
}
|
|
254
|
+
function deriveModuleFolders(children) {
|
|
255
|
+
const result = [];
|
|
256
|
+
const resolveOrCreateParents = (path, root = result) => {
|
|
257
|
+
if (path.length > 1) {
|
|
258
|
+
const inner = root.find((el) => el.text === path[0]);
|
|
259
|
+
if (inner) {
|
|
260
|
+
inner.children ||= [];
|
|
261
|
+
return resolveOrCreateParents(path.slice(1), inner.children);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
root.push({
|
|
265
|
+
text: path[0],
|
|
266
|
+
children: [],
|
|
267
|
+
});
|
|
268
|
+
return resolveOrCreateParents(path.slice(1), root[root.length - 1].children);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return root;
|
|
272
|
+
};
|
|
273
|
+
// Note: This might end up putting a module within another module if we document
|
|
274
|
+
// both foo/index.ts and foo/bar.ts.
|
|
275
|
+
for (const child of children.filter((c) => router.hasOwnDocument(c))) {
|
|
276
|
+
const nav = toNavigation(child);
|
|
277
|
+
if (nav) {
|
|
278
|
+
const parts = child.name.split("/");
|
|
279
|
+
const collection = resolveOrCreateParents(parts);
|
|
280
|
+
nav.text = parts[parts.length - 1];
|
|
281
|
+
collection.push(nav);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
// Now merge single-possible-paths together so we don't have folders in our navigation
|
|
285
|
+
// which contain only another single folder.
|
|
286
|
+
if (opts.compactFolders) {
|
|
287
|
+
const queue = [...result];
|
|
288
|
+
while (queue.length) {
|
|
289
|
+
const review = queue.shift();
|
|
290
|
+
queue.push(...(review.children || []));
|
|
291
|
+
if (review.kind || review.path)
|
|
292
|
+
continue;
|
|
293
|
+
if (review.children?.length === 1) {
|
|
294
|
+
const copyFrom = review.children[0];
|
|
295
|
+
const fullName = `${review.text}/${copyFrom.text}`;
|
|
296
|
+
delete review.children;
|
|
297
|
+
Object.assign(review, copyFrom);
|
|
298
|
+
review.text = fullName;
|
|
299
|
+
queue.push(review);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return result;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
})();
|
|
308
|
+
export { DefaultTheme };
|
|
309
|
+
function getReflectionClasses(reflection, filters) {
|
|
310
|
+
const classes = new Set();
|
|
311
|
+
// Filter classes should match up with the settings function in
|
|
312
|
+
// partials/navigation.tsx.
|
|
313
|
+
for (const key of Object.keys(filters)) {
|
|
314
|
+
if (key === "inherited") {
|
|
315
|
+
if (reflection.flags.isInherited) {
|
|
316
|
+
classes.add("tsd-is-inherited");
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
else if (key === "protected") {
|
|
320
|
+
if (reflection.flags.isProtected) {
|
|
321
|
+
classes.add("tsd-is-protected");
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
else if (key === "private") {
|
|
325
|
+
if (reflection.flags.isPrivate) {
|
|
326
|
+
classes.add("tsd-is-private");
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
else if (key === "external") {
|
|
330
|
+
if (reflection.flags.isExternal) {
|
|
331
|
+
classes.add("tsd-is-external");
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
else if (key.startsWith("@")) {
|
|
335
|
+
if (key === "@deprecated") {
|
|
336
|
+
if (reflection.isDeprecated()) {
|
|
337
|
+
classes.add(toStyleClass(`tsd-is-${key.substring(1)}`));
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
else if (reflection.comment?.hasModifier(key) ||
|
|
341
|
+
reflection.comment?.getTag(key)) {
|
|
342
|
+
classes.add(toStyleClass(`tsd-is-${key.substring(1)}`));
|
|
343
|
+
}
|
|
344
|
+
else if (reflection.isDeclaration()) {
|
|
345
|
+
const ownSignatures = reflection.getNonIndexSignatures();
|
|
346
|
+
// Check methods and accessors, find common tags, elevate
|
|
347
|
+
if (ownSignatures.length &&
|
|
348
|
+
ownSignatures.every((refl) => refl.comment?.hasModifier(key) || refl.comment?.getTag(key))) {
|
|
349
|
+
classes.add(toStyleClass(`tsd-is-${key.substring(1)}`));
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return Array.from(classes).join(" ");
|
|
355
|
+
}
|
|
356
|
+
function shouldShowCategories(reflection, opts) {
|
|
357
|
+
if (opts.includeCategories) {
|
|
358
|
+
return !reflection.comment?.hasModifier("@hideCategories");
|
|
359
|
+
}
|
|
360
|
+
return reflection.comment?.hasModifier("@showCategories") === true;
|
|
361
|
+
}
|
|
362
|
+
function shouldShowGroups(reflection, opts) {
|
|
363
|
+
if (opts.includeGroups) {
|
|
364
|
+
return !reflection.comment?.hasModifier("@hideGroups");
|
|
365
|
+
}
|
|
366
|
+
return reflection.comment?.hasModifier("@showGroups") === true;
|
|
367
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { PageEvent, Renderer } from "../../index.js";
|
|
2
|
+
import type { CommentDisplayPart, Reflection } from "../../../models/index.js";
|
|
3
|
+
import { type Options } from "../../../utils/index.js";
|
|
4
|
+
import type { DefaultTheme } from "./DefaultTheme.js";
|
|
5
|
+
import { type Icons } from "./partials/icon.js";
|
|
6
|
+
import type { Router } from "../../router.js";
|
|
7
|
+
import type { JSX, NeverIfInternal } from "#utils";
|
|
8
|
+
export declare class DefaultThemeRenderContext {
|
|
9
|
+
readonly router: Router;
|
|
10
|
+
readonly theme: DefaultTheme;
|
|
11
|
+
page: PageEvent<Reflection>;
|
|
12
|
+
private _refIcons;
|
|
13
|
+
options: Options;
|
|
14
|
+
model: Reflection;
|
|
15
|
+
constructor(router: Router, theme: DefaultTheme, page: PageEvent<Reflection>, options: Options);
|
|
16
|
+
/**
|
|
17
|
+
* Icons available for use within the page.
|
|
18
|
+
* When getting an icon for a reflection, {@link reflectionIcon} should be used so
|
|
19
|
+
* that themes which define multiple icon variants can correctly specify which icon
|
|
20
|
+
* they want to be used.
|
|
21
|
+
*
|
|
22
|
+
* Note: This creates a reference to icons declared by {@link DefaultTheme.icons},
|
|
23
|
+
* to customize icons, that object must be modified instead.
|
|
24
|
+
*/
|
|
25
|
+
get icons(): Readonly<Icons>;
|
|
26
|
+
/**
|
|
27
|
+
* Do not override this method, override {@link DefaultTheme.getReflectionIcon} instead.
|
|
28
|
+
*/
|
|
29
|
+
reflectionIcon: (reflection: Reflection) => JSX.Element;
|
|
30
|
+
get slugger(): import("./Slugger.js").Slugger;
|
|
31
|
+
hook: Renderer["hooks"]["emit"];
|
|
32
|
+
/** Avoid this in favor of urlTo if possible */
|
|
33
|
+
relativeURL: (url: string, cacheBust?: boolean) => string;
|
|
34
|
+
getAnchor: (reflection: Reflection) => string | undefined;
|
|
35
|
+
urlTo: (reflection: Reflection) => string | undefined;
|
|
36
|
+
markdown: (md: readonly CommentDisplayPart[] | NeverIfInternal<string | undefined>) => string;
|
|
37
|
+
/** Renders user comment markdown wrapped in a tsd-comment div */
|
|
38
|
+
displayParts: (parts: readonly CommentDisplayPart[] | undefined) => JSX.Element | undefined;
|
|
39
|
+
getNavigation: () => import("./DefaultTheme.js").NavigationElement[];
|
|
40
|
+
getReflectionClasses: (refl: Reflection) => string;
|
|
41
|
+
documentTemplate: (props: PageEvent<import("../../../models/DocumentReflection.js").DocumentReflection>) => JSX.Element;
|
|
42
|
+
reflectionTemplate: (props: PageEvent<import("../../../models/ContainerReflection.js").ContainerReflection>) => JSX.Element;
|
|
43
|
+
indexTemplate: (props: PageEvent<import("../../../models/ProjectReflection.js").ProjectReflection>) => JSX.Element;
|
|
44
|
+
hierarchyTemplate: (props: PageEvent<import("../../../models/ProjectReflection.js").ProjectReflection>) => JSX.Element;
|
|
45
|
+
defaultLayout: (template: import("./DefaultTheme.js").RenderTemplate<PageEvent<Reflection>>, props: PageEvent<Reflection>) => JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* Rendered just after the description for a reflection.
|
|
48
|
+
* This can be used to render a shortened type display of a reflection that the
|
|
49
|
+
* rest of the page expands on.
|
|
50
|
+
*
|
|
51
|
+
* Note: Will not be called for variables/type aliases, as they are summarized
|
|
52
|
+
* by their type declaration, which is already rendered by {@link DefaultThemeRenderContext.memberDeclaration}
|
|
53
|
+
*/
|
|
54
|
+
reflectionPreview: (props: Reflection) => JSX.Element | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Used to render additional details about a type. This is used to implement
|
|
57
|
+
* the `@expand` tag, comments on union members, comments on object type members...
|
|
58
|
+
*/
|
|
59
|
+
typeDetails: (reflectionOwningType: Reflection, type: import("../../../models/types.js").SomeType, renderAnchors: boolean) => JSX.Children;
|
|
60
|
+
/**
|
|
61
|
+
* Should call the {@link typeDetails} helper if rendering additional details
|
|
62
|
+
* about the type will provide the user with more information about the type.
|
|
63
|
+
*/
|
|
64
|
+
typeDetailsIfUseful: (reflectionOwningType: Reflection, type: import("../../../models/types.js").SomeType | undefined) => JSX.Children;
|
|
65
|
+
/**
|
|
66
|
+
* Wrapper around {@link typeDetails} which checks if it is useful
|
|
67
|
+
* and includes a "Type Declaration" header.
|
|
68
|
+
*/
|
|
69
|
+
typeDeclaration: (reflectionOwningType: Reflection, type: import("../../../models/types.js").SomeType) => JSX.Children;
|
|
70
|
+
breadcrumbs: (props: Reflection) => JSX.Element;
|
|
71
|
+
commentShortSummary: (props: Reflection) => JSX.Element | undefined;
|
|
72
|
+
commentSummary: (props: Reflection) => JSX.Element | undefined;
|
|
73
|
+
commentTags: (props: Reflection) => JSX.Element | undefined;
|
|
74
|
+
reflectionFlags: (props: Reflection) => JSX.Element;
|
|
75
|
+
footer: () => JSX.Element;
|
|
76
|
+
header: (props: PageEvent<Reflection>) => JSX.Element;
|
|
77
|
+
hierarchy: (typeHierarchy: import("../../../models/DeclarationReflection.js").DeclarationHierarchy | undefined) => JSX.Element | undefined;
|
|
78
|
+
index: (props: import("../../../models/ContainerReflection.js").ContainerReflection) => JSX.Element;
|
|
79
|
+
member: (props: import("../../../models/DocumentReflection.js").DocumentReflection | import("../../../models/DeclarationReflection.js").DeclarationReflection) => JSX.Element;
|
|
80
|
+
moduleReflection: (mod: import("../../../models/DeclarationReflection.js").DeclarationReflection | import("../../../models/ProjectReflection.js").ProjectReflection) => JSX.Element;
|
|
81
|
+
moduleMemberSummary: (member: import("../../../models/DocumentReflection.js").DocumentReflection | import("../../../models/DeclarationReflection.js").DeclarationReflection) => JSX.Element;
|
|
82
|
+
memberDeclaration: (props: import("../../../models/DeclarationReflection.js").DeclarationReflection) => JSX.Element;
|
|
83
|
+
memberGetterSetter: (props: import("../../../models/DeclarationReflection.js").DeclarationReflection) => JSX.Element;
|
|
84
|
+
memberSignatureBody: (props: import("../../../models/SignatureReflection.js").SignatureReflection, r_1?: {
|
|
85
|
+
hideSources?: boolean;
|
|
86
|
+
} | undefined) => JSX.Element;
|
|
87
|
+
memberSignatureTitle: (props: import("../../../models/SignatureReflection.js").SignatureReflection, options?: {
|
|
88
|
+
hideName?: boolean;
|
|
89
|
+
} | undefined) => JSX.Element;
|
|
90
|
+
memberSignatures: (props: import("../../../models/DeclarationReflection.js").DeclarationReflection) => JSX.Element;
|
|
91
|
+
memberSources: (props: import("../../../models/DeclarationReflection.js").DeclarationReflection | import("../../../models/SignatureReflection.js").SignatureReflection) => JSX.Element;
|
|
92
|
+
members: (props: import("../../../models/ContainerReflection.js").ContainerReflection) => JSX.Element;
|
|
93
|
+
sidebar: (props: PageEvent<Reflection>) => JSX.Element;
|
|
94
|
+
pageSidebar: (props: PageEvent<Reflection>) => JSX.Element;
|
|
95
|
+
sidebarLinks: () => JSX.Element | null;
|
|
96
|
+
settings: () => JSX.Element;
|
|
97
|
+
navigation: (props: PageEvent<Reflection>) => JSX.Element;
|
|
98
|
+
pageNavigation: (props: PageEvent<Reflection>) => JSX.Element;
|
|
99
|
+
toolbar: (props: PageEvent<Reflection>) => JSX.Element;
|
|
100
|
+
type: (type: import("../../../models/types.js").SomeType | undefined, options?: {
|
|
101
|
+
topLevelLinks: boolean;
|
|
102
|
+
} | undefined) => JSX.Element;
|
|
103
|
+
typeAndParent: (props: import("../../../models/types.js").Type) => JSX.Element;
|
|
104
|
+
typeParameters: (typeParameters: import("../../../models/TypeParameterReflection.js").TypeParameterReflection[]) => JSX.Element;
|
|
105
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import {} from "../../../utils/index.js";
|
|
2
|
+
import { defaultLayout } from "./layouts/default.js";
|
|
3
|
+
import { index } from "./partials/index.js";
|
|
4
|
+
import { breadcrumbs } from "./partials/breadcrumb.js";
|
|
5
|
+
import { commentShortSummary, commentSummary, commentTags, reflectionFlags, renderDisplayParts, } from "./partials/comment.js";
|
|
6
|
+
import { footer } from "./partials/footer.js";
|
|
7
|
+
import { header } from "./partials/header.js";
|
|
8
|
+
import { hierarchy } from "./partials/hierarchy.js";
|
|
9
|
+
import { buildRefIcons } from "./partials/icon.js";
|
|
10
|
+
import { member } from "./partials/member.js";
|
|
11
|
+
import { memberDeclaration } from "./partials/member.declaration.js";
|
|
12
|
+
import { memberGetterSetter } from "./partials/member.getterSetter.js";
|
|
13
|
+
import { memberSignatureBody } from "./partials/member.signature.body.js";
|
|
14
|
+
import { memberSignatureTitle } from "./partials/member.signature.title.js";
|
|
15
|
+
import { memberSignatures } from "./partials/member.signatures.js";
|
|
16
|
+
import { memberSources } from "./partials/member.sources.js";
|
|
17
|
+
import { members } from "./partials/members.js";
|
|
18
|
+
import { navigation, pageNavigation, pageSidebar, settings, sidebar, sidebarLinks } from "./partials/navigation.js";
|
|
19
|
+
import { reflectionPreview } from "./partials/reflectionPreview.js";
|
|
20
|
+
import { toolbar } from "./partials/toolbar.js";
|
|
21
|
+
import { type } from "./partials/type.js";
|
|
22
|
+
import { typeAndParent } from "./partials/typeAndParent.js";
|
|
23
|
+
import { typeParameters } from "./partials/typeParameters.js";
|
|
24
|
+
import { indexTemplate } from "./templates/index.js";
|
|
25
|
+
import { documentTemplate } from "./templates/document.js";
|
|
26
|
+
import { hierarchyTemplate } from "./templates/hierarchy.js";
|
|
27
|
+
import { reflectionTemplate } from "./templates/reflection.js";
|
|
28
|
+
import { typeDeclaration, typeDetails, typeDetailsIfUseful } from "./partials/typeDetails.js";
|
|
29
|
+
import { moduleMemberSummary, moduleReflection } from "./partials/moduleReflection.js";
|
|
30
|
+
function bind(fn, first) {
|
|
31
|
+
return (...r) => fn(first, ...r);
|
|
32
|
+
}
|
|
33
|
+
export class DefaultThemeRenderContext {
|
|
34
|
+
router;
|
|
35
|
+
theme;
|
|
36
|
+
page;
|
|
37
|
+
_refIcons;
|
|
38
|
+
options;
|
|
39
|
+
model;
|
|
40
|
+
constructor(router, theme, page, options) {
|
|
41
|
+
this.router = router;
|
|
42
|
+
this.theme = theme;
|
|
43
|
+
this.page = page;
|
|
44
|
+
this._refIcons = buildRefIcons(theme.icons, this);
|
|
45
|
+
this.options = options;
|
|
46
|
+
this.model = page.model;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Icons available for use within the page.
|
|
50
|
+
* When getting an icon for a reflection, {@link reflectionIcon} should be used so
|
|
51
|
+
* that themes which define multiple icon variants can correctly specify which icon
|
|
52
|
+
* they want to be used.
|
|
53
|
+
*
|
|
54
|
+
* Note: This creates a reference to icons declared by {@link DefaultTheme.icons},
|
|
55
|
+
* to customize icons, that object must be modified instead.
|
|
56
|
+
*/
|
|
57
|
+
get icons() {
|
|
58
|
+
return this._refIcons;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Do not override this method, override {@link DefaultTheme.getReflectionIcon} instead.
|
|
62
|
+
*/
|
|
63
|
+
reflectionIcon = (reflection) => {
|
|
64
|
+
return this.icons[this.theme.getReflectionIcon(reflection)]();
|
|
65
|
+
};
|
|
66
|
+
get slugger() {
|
|
67
|
+
return this.router.getSlugger(this.page.model);
|
|
68
|
+
}
|
|
69
|
+
hook = (...params) => {
|
|
70
|
+
return this.theme.owner.hooks.emit(...params);
|
|
71
|
+
};
|
|
72
|
+
/** Avoid this in favor of urlTo if possible */
|
|
73
|
+
relativeURL = (url, cacheBust = false) => {
|
|
74
|
+
const result = this.router.baseRelativeUrl(this.page.model, url);
|
|
75
|
+
if (cacheBust && this.theme.owner.cacheBust) {
|
|
76
|
+
return result + `?cache=${this.theme.owner.renderStartTime}`;
|
|
77
|
+
}
|
|
78
|
+
return result;
|
|
79
|
+
};
|
|
80
|
+
getAnchor = (reflection) => {
|
|
81
|
+
return this.router.getAnchor(reflection);
|
|
82
|
+
};
|
|
83
|
+
urlTo = (reflection) => {
|
|
84
|
+
return this.router.relativeUrl(this.page.model, reflection);
|
|
85
|
+
};
|
|
86
|
+
markdown = (md) => {
|
|
87
|
+
return this.theme.markedPlugin.parseMarkdown(md || "", this.page, this);
|
|
88
|
+
};
|
|
89
|
+
/** Renders user comment markdown wrapped in a tsd-comment div */
|
|
90
|
+
displayParts = bind(renderDisplayParts, this);
|
|
91
|
+
getNavigation = () => this.theme.getNavigation(this.page.project);
|
|
92
|
+
getReflectionClasses = (refl) => this.theme.getReflectionClasses(refl);
|
|
93
|
+
documentTemplate = bind(documentTemplate, this);
|
|
94
|
+
reflectionTemplate = bind(reflectionTemplate, this);
|
|
95
|
+
indexTemplate = bind(indexTemplate, this);
|
|
96
|
+
hierarchyTemplate = bind(hierarchyTemplate, this);
|
|
97
|
+
defaultLayout = bind(defaultLayout, this);
|
|
98
|
+
/**
|
|
99
|
+
* Rendered just after the description for a reflection.
|
|
100
|
+
* This can be used to render a shortened type display of a reflection that the
|
|
101
|
+
* rest of the page expands on.
|
|
102
|
+
*
|
|
103
|
+
* Note: Will not be called for variables/type aliases, as they are summarized
|
|
104
|
+
* by their type declaration, which is already rendered by {@link DefaultThemeRenderContext.memberDeclaration}
|
|
105
|
+
*/
|
|
106
|
+
reflectionPreview = bind(reflectionPreview, this);
|
|
107
|
+
/**
|
|
108
|
+
* Used to render additional details about a type. This is used to implement
|
|
109
|
+
* the `@expand` tag, comments on union members, comments on object type members...
|
|
110
|
+
*/
|
|
111
|
+
typeDetails = bind(typeDetails, this);
|
|
112
|
+
/**
|
|
113
|
+
* Should call the {@link typeDetails} helper if rendering additional details
|
|
114
|
+
* about the type will provide the user with more information about the type.
|
|
115
|
+
*/
|
|
116
|
+
typeDetailsIfUseful = bind(typeDetailsIfUseful, this);
|
|
117
|
+
/**
|
|
118
|
+
* Wrapper around {@link typeDetails} which checks if it is useful
|
|
119
|
+
* and includes a "Type Declaration" header.
|
|
120
|
+
*/
|
|
121
|
+
typeDeclaration = bind(typeDeclaration, this);
|
|
122
|
+
breadcrumbs = bind(breadcrumbs, this);
|
|
123
|
+
commentShortSummary = bind(commentShortSummary, this);
|
|
124
|
+
commentSummary = bind(commentSummary, this);
|
|
125
|
+
commentTags = bind(commentTags, this);
|
|
126
|
+
reflectionFlags = bind(reflectionFlags, this);
|
|
127
|
+
footer = bind(footer, this);
|
|
128
|
+
header = bind(header, this);
|
|
129
|
+
hierarchy = bind(hierarchy, this);
|
|
130
|
+
index = bind(index, this);
|
|
131
|
+
member = bind(member, this);
|
|
132
|
+
moduleReflection = bind(moduleReflection, this);
|
|
133
|
+
moduleMemberSummary = bind(moduleMemberSummary, this);
|
|
134
|
+
memberDeclaration = bind(memberDeclaration, this);
|
|
135
|
+
memberGetterSetter = bind(memberGetterSetter, this);
|
|
136
|
+
memberSignatureBody = bind(memberSignatureBody, this);
|
|
137
|
+
memberSignatureTitle = bind(memberSignatureTitle, this);
|
|
138
|
+
memberSignatures = bind(memberSignatures, this);
|
|
139
|
+
memberSources = bind(memberSources, this);
|
|
140
|
+
members = bind(members, this);
|
|
141
|
+
sidebar = bind(sidebar, this);
|
|
142
|
+
pageSidebar = bind(pageSidebar, this);
|
|
143
|
+
sidebarLinks = bind(sidebarLinks, this);
|
|
144
|
+
settings = bind(settings, this);
|
|
145
|
+
navigation = bind(navigation, this);
|
|
146
|
+
pageNavigation = bind(pageNavigation, this);
|
|
147
|
+
toolbar = bind(toolbar, this);
|
|
148
|
+
type = bind(type, this);
|
|
149
|
+
typeAndParent = bind(typeAndParent, this);
|
|
150
|
+
typeParameters = bind(typeParameters, this);
|
|
151
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TypeDocOptionMap } from "#node-utils";
|
|
2
|
+
/**
|
|
3
|
+
* Responsible for getting a unique anchor for elements within a page.
|
|
4
|
+
*/
|
|
5
|
+
export declare class Slugger {
|
|
6
|
+
private options;
|
|
7
|
+
private seen;
|
|
8
|
+
private serialize;
|
|
9
|
+
constructor(options: TypeDocOptionMap["sluggerConfiguration"]);
|
|
10
|
+
slug(value: string): string;
|
|
11
|
+
hasAnchor(anchor: string): boolean;
|
|
12
|
+
getSimilarAnchors(anchor: string): string[];
|
|
13
|
+
}
|