@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,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom JSX module designed specifically for TypeDoc's needs.
|
|
3
|
+
* When overriding a default TypeDoc theme output, your implementation must create valid {@link Element}
|
|
4
|
+
* instances, which can be most easily done by using TypeDoc's JSX implementation. To use it, set up
|
|
5
|
+
* your tsconfig with the following compiler options:
|
|
6
|
+
* ```json
|
|
7
|
+
* {
|
|
8
|
+
* "jsx": "react",
|
|
9
|
+
* "jsxFactory": "JSX.createElement",
|
|
10
|
+
* "jsxFragmentFactory": "JSX.Fragment"
|
|
11
|
+
* }
|
|
12
|
+
* ```
|
|
13
|
+
* @summary Custom JSX module designed specifically for TypeDoc's needs.
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
import { JsxFragment } from "./jsx.elements.js";
|
|
17
|
+
import { escapeHtml } from "./string.js";
|
|
18
|
+
export { JsxFragment as Fragment } from "./jsx.elements.js";
|
|
19
|
+
/**
|
|
20
|
+
* Used to inject HTML directly into the document.
|
|
21
|
+
*/
|
|
22
|
+
export function Raw(_props) {
|
|
23
|
+
// This is handled specially by the renderElement function. Instead of being
|
|
24
|
+
// called, the tag is compared to this function and the `html` prop will be
|
|
25
|
+
// returned directly.
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const voidElements = new Set([
|
|
29
|
+
"area",
|
|
30
|
+
"base",
|
|
31
|
+
"br",
|
|
32
|
+
"col",
|
|
33
|
+
"embed",
|
|
34
|
+
"hr",
|
|
35
|
+
"img",
|
|
36
|
+
"input",
|
|
37
|
+
"link",
|
|
38
|
+
"meta",
|
|
39
|
+
"param",
|
|
40
|
+
"source",
|
|
41
|
+
"track",
|
|
42
|
+
"wbr",
|
|
43
|
+
]);
|
|
44
|
+
const blockElements = new Set([
|
|
45
|
+
"h1",
|
|
46
|
+
"h2",
|
|
47
|
+
"h3",
|
|
48
|
+
"h4",
|
|
49
|
+
"h5",
|
|
50
|
+
"h6",
|
|
51
|
+
"div",
|
|
52
|
+
"section",
|
|
53
|
+
"nav",
|
|
54
|
+
"details",
|
|
55
|
+
"p",
|
|
56
|
+
"ul",
|
|
57
|
+
"ol",
|
|
58
|
+
"li",
|
|
59
|
+
]);
|
|
60
|
+
/**
|
|
61
|
+
* JSX factory function to create an "element" that can later be rendered with {@link renderElement}
|
|
62
|
+
* @param tag
|
|
63
|
+
* @param props
|
|
64
|
+
* @param children
|
|
65
|
+
*/
|
|
66
|
+
export function createElement(tag, props, ...children) {
|
|
67
|
+
return { tag, props, children };
|
|
68
|
+
}
|
|
69
|
+
let renderPretty = true;
|
|
70
|
+
export function setRenderSettings(options) {
|
|
71
|
+
renderPretty = options.pretty;
|
|
72
|
+
}
|
|
73
|
+
export function renderElement(element) {
|
|
74
|
+
if (!element) {
|
|
75
|
+
return "";
|
|
76
|
+
}
|
|
77
|
+
const { tag, props, children } = element;
|
|
78
|
+
let html = "";
|
|
79
|
+
if (typeof tag === "function") {
|
|
80
|
+
if (tag === Raw) {
|
|
81
|
+
return String(props.html);
|
|
82
|
+
}
|
|
83
|
+
if (tag === JsxFragment) {
|
|
84
|
+
renderChildren(children);
|
|
85
|
+
return html;
|
|
86
|
+
}
|
|
87
|
+
return renderElement(tag(Object.assign({ children }, props)));
|
|
88
|
+
}
|
|
89
|
+
if (blockElements.has(tag) && renderPretty && html) {
|
|
90
|
+
html += "\n";
|
|
91
|
+
}
|
|
92
|
+
html += "<";
|
|
93
|
+
html += tag;
|
|
94
|
+
for (const [key, val] of Object.entries(props ?? {})) {
|
|
95
|
+
if (val == null)
|
|
96
|
+
continue;
|
|
97
|
+
if (typeof val == "boolean") {
|
|
98
|
+
if (val) {
|
|
99
|
+
html += " ";
|
|
100
|
+
html += key;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
html += " ";
|
|
105
|
+
html += key;
|
|
106
|
+
html += '="';
|
|
107
|
+
html += (typeof val === "string" ? val : JSON.stringify(val)).replaceAll('"', """);
|
|
108
|
+
html += '"';
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (children.length) {
|
|
112
|
+
html += ">";
|
|
113
|
+
renderChildren(children);
|
|
114
|
+
html += "</";
|
|
115
|
+
html += tag;
|
|
116
|
+
html += ">";
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
if (voidElements.has(tag)) {
|
|
120
|
+
html += "/>";
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
html += "></";
|
|
124
|
+
html += tag;
|
|
125
|
+
html += ">";
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return html;
|
|
129
|
+
function renderChildren(children) {
|
|
130
|
+
for (const child of children) {
|
|
131
|
+
if (typeof child === "boolean")
|
|
132
|
+
continue;
|
|
133
|
+
if (Array.isArray(child)) {
|
|
134
|
+
renderChildren(child);
|
|
135
|
+
}
|
|
136
|
+
else if (typeof child === "string" || typeof child === "number" || typeof child === "bigint") {
|
|
137
|
+
html += escapeHtml(child.toString());
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
html += renderElement(child);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Render an element to text, stripping out any HTML tags.
|
|
147
|
+
* This is roughly equivalent to getting `innerText` on a rendered element.
|
|
148
|
+
* @internal
|
|
149
|
+
*/
|
|
150
|
+
export function renderElementToText(element) {
|
|
151
|
+
if (!element) {
|
|
152
|
+
return "";
|
|
153
|
+
}
|
|
154
|
+
const { tag, props, children } = element;
|
|
155
|
+
let html = "";
|
|
156
|
+
if (typeof tag === "function") {
|
|
157
|
+
if (tag === Raw) {
|
|
158
|
+
return String(props.html);
|
|
159
|
+
}
|
|
160
|
+
if (tag === JsxFragment) {
|
|
161
|
+
renderChildren(children);
|
|
162
|
+
return html;
|
|
163
|
+
}
|
|
164
|
+
return renderElementToText(tag(Object.assign({ children }, props)));
|
|
165
|
+
}
|
|
166
|
+
else if (tag === "br") {
|
|
167
|
+
return "\n";
|
|
168
|
+
}
|
|
169
|
+
renderChildren(children);
|
|
170
|
+
return html;
|
|
171
|
+
function renderChildren(children) {
|
|
172
|
+
for (const child of children) {
|
|
173
|
+
if (typeof child === "boolean")
|
|
174
|
+
continue;
|
|
175
|
+
if (Array.isArray(child)) {
|
|
176
|
+
renderChildren(child);
|
|
177
|
+
}
|
|
178
|
+
else if (typeof child === "string" || typeof child === "number" || typeof child === "bigint") {
|
|
179
|
+
// Turn non-breaking spaces into regular spaces
|
|
180
|
+
html += child.toString().replaceAll("\u00A0", " ");
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
html += renderElementToText(child);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { IfInternal } from "./general.js";
|
|
2
|
+
import type { TranslatedString } from "./i18n.js";
|
|
3
|
+
import type { MinimalNode, MinimalSourceFile } from "./minimalSourceFile.js";
|
|
4
|
+
/**
|
|
5
|
+
* List of known log levels. Used to specify the urgency of a log message.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum LogLevel {
|
|
8
|
+
Verbose = 0,
|
|
9
|
+
Info = 1,
|
|
10
|
+
Warn = 2,
|
|
11
|
+
Error = 3,
|
|
12
|
+
None = 4
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A logger that will not produce any output.
|
|
16
|
+
*
|
|
17
|
+
* This logger also serves as the base class of other loggers as it implements
|
|
18
|
+
* all the required utility functions.
|
|
19
|
+
*/
|
|
20
|
+
export declare class Logger {
|
|
21
|
+
/**
|
|
22
|
+
* How many error messages have been logged?
|
|
23
|
+
*/
|
|
24
|
+
errorCount: number;
|
|
25
|
+
/**
|
|
26
|
+
* How many warning messages have been logged?
|
|
27
|
+
*/
|
|
28
|
+
warningCount: number;
|
|
29
|
+
/**
|
|
30
|
+
* How many validation warning messages have been logged?
|
|
31
|
+
*/
|
|
32
|
+
validationWarningCount: number;
|
|
33
|
+
/**
|
|
34
|
+
* The minimum logging level to print.
|
|
35
|
+
*/
|
|
36
|
+
level: LogLevel;
|
|
37
|
+
/**
|
|
38
|
+
* Has an error been raised through the log method?
|
|
39
|
+
*/
|
|
40
|
+
hasErrors(): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Has a warning been raised through the log method?
|
|
43
|
+
*/
|
|
44
|
+
hasWarnings(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Reset the error counter.
|
|
47
|
+
*/
|
|
48
|
+
resetErrors(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Reset the warning counter.
|
|
51
|
+
*/
|
|
52
|
+
resetWarnings(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Log the given verbose message.
|
|
55
|
+
*
|
|
56
|
+
* @param text The message that should be logged.
|
|
57
|
+
*/
|
|
58
|
+
verbose(text: string): void;
|
|
59
|
+
/** Log the given info message. */
|
|
60
|
+
info(text: IfInternal<TranslatedString, string>): void;
|
|
61
|
+
/**
|
|
62
|
+
* Log the given warning.
|
|
63
|
+
*
|
|
64
|
+
* @param text The warning that should be logged.
|
|
65
|
+
*/
|
|
66
|
+
warn(text: IfInternal<TranslatedString, string>, node?: MinimalNode): void;
|
|
67
|
+
warn(text: IfInternal<TranslatedString, string>, pos: number, file: MinimalSourceFile): void;
|
|
68
|
+
/**
|
|
69
|
+
* Log the given warning and records that a validation warning has occurred.
|
|
70
|
+
*
|
|
71
|
+
* @param text The warning that should be logged.
|
|
72
|
+
*/
|
|
73
|
+
validationWarning(text: IfInternal<TranslatedString, string>, node?: MinimalNode): void;
|
|
74
|
+
validationWarning(text: IfInternal<TranslatedString, string>, pos: number, file: MinimalSourceFile): void;
|
|
75
|
+
/**
|
|
76
|
+
* Log the given error.
|
|
77
|
+
*
|
|
78
|
+
* @param text The error that should be logged.
|
|
79
|
+
*/
|
|
80
|
+
error(text: IfInternal<TranslatedString, string>, node?: MinimalNode): void;
|
|
81
|
+
error(text: IfInternal<TranslatedString, string>, pos: number, file: MinimalSourceFile): void;
|
|
82
|
+
/**
|
|
83
|
+
* Print a log message.
|
|
84
|
+
*
|
|
85
|
+
* @param _message The message itself.
|
|
86
|
+
* @param level The urgency of the log message.
|
|
87
|
+
*/
|
|
88
|
+
log(_message: string, level: LogLevel): void;
|
|
89
|
+
protected addContext(message: string, _level: Exclude<LogLevel, LogLevel.None>, ..._args: [MinimalNode?] | [number, MinimalSourceFile]): string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Logger implementation which logs to the console
|
|
93
|
+
*/
|
|
94
|
+
export declare class ConsoleLogger extends Logger {
|
|
95
|
+
log(message: string, level: Exclude<LogLevel, LogLevel.None>): void;
|
|
96
|
+
protected addContext(message: string, level: Exclude<LogLevel, LogLevel.None>, ..._args: [MinimalNode?] | [number, MinimalSourceFile]): string;
|
|
97
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of known log levels. Used to specify the urgency of a log message.
|
|
3
|
+
*/
|
|
4
|
+
export var LogLevel;
|
|
5
|
+
(function (LogLevel) {
|
|
6
|
+
LogLevel[LogLevel["Verbose"] = 0] = "Verbose";
|
|
7
|
+
LogLevel[LogLevel["Info"] = 1] = "Info";
|
|
8
|
+
LogLevel[LogLevel["Warn"] = 2] = "Warn";
|
|
9
|
+
LogLevel[LogLevel["Error"] = 3] = "Error";
|
|
10
|
+
LogLevel[LogLevel["None"] = 4] = "None";
|
|
11
|
+
})(LogLevel || (LogLevel = {}));
|
|
12
|
+
const messagePrefixes = {
|
|
13
|
+
[LogLevel.Error]: "[error]",
|
|
14
|
+
[LogLevel.Warn]: "[warning]",
|
|
15
|
+
[LogLevel.Info]: "[info]",
|
|
16
|
+
[LogLevel.Verbose]: "[debug]",
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A logger that will not produce any output.
|
|
20
|
+
*
|
|
21
|
+
* This logger also serves as the base class of other loggers as it implements
|
|
22
|
+
* all the required utility functions.
|
|
23
|
+
*/
|
|
24
|
+
export class Logger {
|
|
25
|
+
/**
|
|
26
|
+
* How many error messages have been logged?
|
|
27
|
+
*/
|
|
28
|
+
errorCount = 0;
|
|
29
|
+
/**
|
|
30
|
+
* How many warning messages have been logged?
|
|
31
|
+
*/
|
|
32
|
+
warningCount = 0;
|
|
33
|
+
/**
|
|
34
|
+
* How many validation warning messages have been logged?
|
|
35
|
+
*/
|
|
36
|
+
validationWarningCount = 0;
|
|
37
|
+
/**
|
|
38
|
+
* The minimum logging level to print.
|
|
39
|
+
*/
|
|
40
|
+
level = LogLevel.Info;
|
|
41
|
+
/**
|
|
42
|
+
* Has an error been raised through the log method?
|
|
43
|
+
*/
|
|
44
|
+
hasErrors() {
|
|
45
|
+
return this.errorCount > 0;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Has a warning been raised through the log method?
|
|
49
|
+
*/
|
|
50
|
+
hasWarnings() {
|
|
51
|
+
return this.warningCount > 0;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Reset the error counter.
|
|
55
|
+
*/
|
|
56
|
+
resetErrors() {
|
|
57
|
+
this.errorCount = 0;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Reset the warning counter.
|
|
61
|
+
*/
|
|
62
|
+
resetWarnings() {
|
|
63
|
+
this.warningCount = 0;
|
|
64
|
+
this.validationWarningCount = 0;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Log the given verbose message.
|
|
68
|
+
*
|
|
69
|
+
* @param text The message that should be logged.
|
|
70
|
+
*/
|
|
71
|
+
verbose(text) {
|
|
72
|
+
this.log(this.addContext(text, LogLevel.Verbose), LogLevel.Verbose);
|
|
73
|
+
}
|
|
74
|
+
/** Log the given info message. */
|
|
75
|
+
info(text) {
|
|
76
|
+
this.log(this.addContext(text, LogLevel.Info), LogLevel.Info);
|
|
77
|
+
}
|
|
78
|
+
warn(text, ...args) {
|
|
79
|
+
const text2 = this.addContext(text, LogLevel.Warn, ...args);
|
|
80
|
+
this.log(text2, LogLevel.Warn);
|
|
81
|
+
}
|
|
82
|
+
validationWarning(...args) {
|
|
83
|
+
this.validationWarningCount += 1;
|
|
84
|
+
this.warn(...args);
|
|
85
|
+
}
|
|
86
|
+
error(text, ...args) {
|
|
87
|
+
const text2 = this.addContext(text, LogLevel.Error, ...args);
|
|
88
|
+
this.log(text2, LogLevel.Error);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Print a log message.
|
|
92
|
+
*
|
|
93
|
+
* @param _message The message itself.
|
|
94
|
+
* @param level The urgency of the log message.
|
|
95
|
+
*/
|
|
96
|
+
log(_message, level) {
|
|
97
|
+
if (level === LogLevel.Error) {
|
|
98
|
+
this.errorCount += 1;
|
|
99
|
+
}
|
|
100
|
+
if (level === LogLevel.Warn) {
|
|
101
|
+
this.warningCount += 1;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
addContext(message, _level, ..._args) {
|
|
105
|
+
return message;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Logger implementation which logs to the console
|
|
110
|
+
*/
|
|
111
|
+
export class ConsoleLogger extends Logger {
|
|
112
|
+
log(message, level) {
|
|
113
|
+
super.log(message, level);
|
|
114
|
+
if (level < this.level) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const method = {
|
|
118
|
+
[LogLevel.Error]: "error",
|
|
119
|
+
[LogLevel.Warn]: "warn",
|
|
120
|
+
[LogLevel.Info]: "info",
|
|
121
|
+
[LogLevel.Verbose]: "log",
|
|
122
|
+
}[level];
|
|
123
|
+
// eslint-disable-next-line no-console
|
|
124
|
+
console[method](message);
|
|
125
|
+
}
|
|
126
|
+
addContext(message, level, ..._args) {
|
|
127
|
+
return `${messagePrefixes[level]} ${message}`;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare class DefaultMap<K, V> extends Map<K, V> {
|
|
2
|
+
private creator;
|
|
3
|
+
constructor(creator: (key: K) => V);
|
|
4
|
+
get(key: K): V;
|
|
5
|
+
getNoInsert(key: K): V | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare class StableKeyMap<K extends {
|
|
8
|
+
getStableKey(): string;
|
|
9
|
+
}, V> {
|
|
10
|
+
[Symbol.toStringTag]: string;
|
|
11
|
+
private impl;
|
|
12
|
+
get size(): number;
|
|
13
|
+
set(key: K, value: V): this;
|
|
14
|
+
get(key: K): V | undefined;
|
|
15
|
+
has(key: K): boolean;
|
|
16
|
+
clear(): void;
|
|
17
|
+
delete(key: K): boolean;
|
|
18
|
+
forEach(callbackfn: (value: V, key: K, map: StableKeyMap<K, V>) => void, thisArg?: any): void;
|
|
19
|
+
entries(): IterableIterator<[K, V]>;
|
|
20
|
+
keys(): IterableIterator<K>;
|
|
21
|
+
values(): IterableIterator<V>;
|
|
22
|
+
[Symbol.iterator](): IterableIterator<[K, V]>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export class DefaultMap extends Map {
|
|
2
|
+
creator;
|
|
3
|
+
constructor(creator) {
|
|
4
|
+
super();
|
|
5
|
+
this.creator = creator;
|
|
6
|
+
}
|
|
7
|
+
get(key) {
|
|
8
|
+
const saved = super.get(key);
|
|
9
|
+
if (saved != null) {
|
|
10
|
+
return saved;
|
|
11
|
+
}
|
|
12
|
+
const created = this.creator(key);
|
|
13
|
+
this.set(key, created);
|
|
14
|
+
return created;
|
|
15
|
+
}
|
|
16
|
+
getNoInsert(key) {
|
|
17
|
+
return super.get(key);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export class StableKeyMap {
|
|
21
|
+
[Symbol.toStringTag] = "StableKeyMap";
|
|
22
|
+
impl = new Map();
|
|
23
|
+
get size() {
|
|
24
|
+
return this.impl.size;
|
|
25
|
+
}
|
|
26
|
+
set(key, value) {
|
|
27
|
+
this.impl.set(key.getStableKey(), [key, value]);
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
get(key) {
|
|
31
|
+
return this.impl.get(key.getStableKey())?.[1];
|
|
32
|
+
}
|
|
33
|
+
has(key) {
|
|
34
|
+
return this.get(key) != null;
|
|
35
|
+
}
|
|
36
|
+
clear() {
|
|
37
|
+
this.impl.clear();
|
|
38
|
+
}
|
|
39
|
+
delete(key) {
|
|
40
|
+
return this.impl.delete(key.getStableKey());
|
|
41
|
+
}
|
|
42
|
+
forEach(callbackfn, thisArg) {
|
|
43
|
+
for (const [k, v] of this.entries()) {
|
|
44
|
+
callbackfn.apply(thisArg, [v, k, this]);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
entries() {
|
|
48
|
+
return this.impl.values();
|
|
49
|
+
}
|
|
50
|
+
*keys() {
|
|
51
|
+
for (const [k] of this.entries()) {
|
|
52
|
+
yield k;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
*values() {
|
|
56
|
+
for (const [, v] of this.entries()) {
|
|
57
|
+
yield v;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
[Symbol.iterator]() {
|
|
61
|
+
return this.entries();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LineAndCharacter, SourceFileLike } from "typescript";
|
|
2
|
+
import type { NormalizedPath } from "./path.js";
|
|
3
|
+
export interface MinimalNode {
|
|
4
|
+
getStart(): number;
|
|
5
|
+
getSourceFile(): MinimalSourceFile;
|
|
6
|
+
}
|
|
7
|
+
export declare class MinimalSourceFile implements SourceFileLike {
|
|
8
|
+
readonly text: string;
|
|
9
|
+
readonly fileName: string;
|
|
10
|
+
constructor(text: string, fileName: NormalizedPath);
|
|
11
|
+
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
|
|
12
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { binaryFindPartition } from "./array.js";
|
|
2
|
+
// I don't like this, but it's necessary so that the lineStarts property isn't
|
|
3
|
+
// visible in the `MinimalSourceFile` type. Even when private it causes compilation
|
|
4
|
+
// errors downstream.
|
|
5
|
+
const lineStarts = new WeakMap();
|
|
6
|
+
export class MinimalSourceFile {
|
|
7
|
+
text;
|
|
8
|
+
// This type is just string to ensure assignability from SourceFile
|
|
9
|
+
fileName;
|
|
10
|
+
constructor(text, fileName) {
|
|
11
|
+
// This is unfortunate, but the yaml library we use relies on the source
|
|
12
|
+
// text using LF line endings https://github.com/eemeli/yaml/issues/127.
|
|
13
|
+
// If we don't do this, in a simple document which includes a single key
|
|
14
|
+
// like:
|
|
15
|
+
// ---<CR><LF>
|
|
16
|
+
// title: Windows line endings<CR><LF>
|
|
17
|
+
// ---<CR><LF>
|
|
18
|
+
// we'll end up with a parsed title of "Windows line endings\r"
|
|
19
|
+
this.text = text.replaceAll("\r\n", "\n");
|
|
20
|
+
lineStarts.set(this, [0]);
|
|
21
|
+
this.fileName = fileName;
|
|
22
|
+
}
|
|
23
|
+
getLineAndCharacterOfPosition(pos) {
|
|
24
|
+
if (pos < 0 || pos >= this.text.length) {
|
|
25
|
+
throw new Error("pos must be within the range of the file.");
|
|
26
|
+
}
|
|
27
|
+
const starts = lineStarts.get(this);
|
|
28
|
+
while (pos >= starts[starts.length - 1]) {
|
|
29
|
+
const nextStart = this.text.indexOf("\n", starts[starts.length - 1]);
|
|
30
|
+
if (nextStart === -1) {
|
|
31
|
+
starts.push(Infinity);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
starts.push(nextStart + 1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const line = binaryFindPartition(starts, (x) => x > pos) - 1;
|
|
38
|
+
return {
|
|
39
|
+
character: pos - starts[line],
|
|
40
|
+
line,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Application } from "../application.js";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a normalized path with path separators being `/`
|
|
4
|
+
* On Windows, drives are represented like `C:/Users` for consistency
|
|
5
|
+
* with TypeScript.
|
|
6
|
+
*
|
|
7
|
+
* The empty string `""` is a valid normalized path.
|
|
8
|
+
*/
|
|
9
|
+
export type NormalizedPath = "" | "/" | string & {
|
|
10
|
+
readonly __normPath: unique symbol;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Represents either a {@link NormalizedPath} or a Node module name
|
|
14
|
+
* (e.g. `typedoc-plugin-mdn-links` or `@gerrit0/typedoc-plugin`)
|
|
15
|
+
*/
|
|
16
|
+
export type NormalizedPathOrModule = NormalizedPath | string & {
|
|
17
|
+
readonly __normPathOrModule: unique symbol;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Represents either a {@link NormalizedPath} or a Node module name
|
|
21
|
+
* (e.g. `typedoc-plugin-mdn-links` or `@gerrit0/typedoc-plugin`)
|
|
22
|
+
*/
|
|
23
|
+
export type NormalizedPathOrModuleOrFunction = NormalizedPathOrModule | ((app: Application) => Promise<void> | void);
|
|
24
|
+
/**
|
|
25
|
+
* Represents a glob path configured by a user.
|
|
26
|
+
*/
|
|
27
|
+
export type GlobString = string & {
|
|
28
|
+
readonly __globString: unique symbol;
|
|
29
|
+
};
|
|
30
|
+
export declare namespace NormalizedPathUtils {
|
|
31
|
+
function dirname(path: NormalizedPath): NormalizedPath;
|
|
32
|
+
function basename(path: NormalizedPath): NormalizedPath;
|
|
33
|
+
function relative(from: NormalizedPath, to: NormalizedPath): NormalizedPath;
|
|
34
|
+
function normalize(path: NormalizedPath): NormalizedPath;
|
|
35
|
+
function resolve(from: NormalizedPath, to: NormalizedPath): NormalizedPath;
|
|
36
|
+
function isAbsolute(from: NormalizedPath): boolean;
|
|
37
|
+
function splitFilename(name: string): {
|
|
38
|
+
name: string;
|
|
39
|
+
ext: string;
|
|
40
|
+
};
|
|
41
|
+
function isDeclarationFilePath(path: NormalizedPath): boolean;
|
|
42
|
+
}
|