umberto 9.4.0 → 10.0.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/CHANGELOG.md +8 -9
- package/LICENSE.md +0 -44
- package/README.md +0 -1
- package/hexo-shim.js +2 -2
- package/package.json +2 -9
- package/scripts/filter/after-post-render/{gloria.js → gloria.cjs} +3 -3
- package/scripts/filter/after-post-render/{insert-error-codes.js → insert-error-codes.cjs} +1 -1
- package/scripts/filter/after-post-render/{linker.js → linker.cjs} +1 -1
- package/scripts/filter/after-post-render/{parseicontag.js → parseicontag.cjs} +1 -1
- package/scripts/filter/after-post-render/{snippets.js → snippets.cjs} +2 -2
- package/scripts/filter/after-render/{process-svg.js → process-svg.cjs} +3 -3
- package/scripts/filter/before-post-render/{add-project-info-to-page.js → add-project-info-to-page.cjs} +2 -2
- package/scripts/filter/before-post-render/{add-repo-url.js → add-repo-url.cjs} +4 -4
- package/scripts/filter/before-post-render/{code-switcher.js → code-switcher.cjs} +1 -1
- package/scripts/filter/before-post-render/{execute-and-insert-function-results.js → execute-and-insert-function-results.cjs} +1 -1
- package/scripts/filter/before-post-render/gloria/{add-breadcrumbs-data-to-page.js → add-breadcrumbs-data-to-page.cjs} +4 -4
- package/scripts/filter/before-post-render/gloria/{prerender-admonitions.js → prerender-admonitions.cjs} +1 -1
- package/scripts/filter/before-post-render/gloria/{prerender-xml-pug-components.js → prerender-xml-pug-components.cjs} +5 -5
- package/scripts/filter/before-post-render/gloria/{render-post-render-pug-components.js → render-post-render-pug-components.cjs} +1 -1
- package/scripts/filter/before-post-render/{has-own-favicons.js → has-own-favicons.cjs} +1 -1
- package/scripts/filter/before-post-render/{infobox.js → infobox.cjs} +1 -1
- package/scripts/filter/before-post-render/{insertchangelog.js → insertchangelog.cjs} +1 -1
- package/scripts/filter/before-post-render/{replace-macros.js → replace-macros.cjs} +1 -1
- package/scripts/helper/{find-main-category-page.js → find-main-category-page.cjs} +1 -1
- package/scripts/helper/{normalize-badges.js → normalize-badges.cjs} +1 -1
- package/scripts/helper/{parse-href.js → parse-href.cjs} +1 -1
- package/scripts/helper/{u-capitalize.js → u-capitalize.cjs} +1 -1
- package/scripts/helper/{u-random-id.js → u-random-id.cjs} +1 -1
- package/scripts/helper/{u-remove-indentation.js → u-remove-indentation.cjs} +1 -1
- package/scripts/helper/{u-toc.js → u-toc.cjs} +1 -1
- package/scripts/utils/{concat-url-parts.js → concat-url-parts.cjs} +3 -3
- package/scripts/utils/{execute-and-insert-function-results.js → execute-and-insert-function-results.cjs} +7 -0
- package/scripts/utils/gloria-after-post-render/{append-copy-heading-buttons.js → append-copy-heading-buttons.cjs} +33 -16
- package/scripts/utils/{has-own-favicons.js → has-own-favicons.cjs} +6 -0
- package/scripts/utils/{inline-svg.js → inline-svg.cjs} +2 -2
- package/scripts/utils/{logcrossprojectreference.js → logcrossprojectreference.cjs} +6 -0
- package/scripts/utils/{parse-href.js → parse-href.cjs} +1 -1
- package/scripts/utils/{parseicontag.js → parseicontag.cjs} +7 -1
- package/scripts/utils/{parselinks.js → parselinks.cjs} +14 -6
- package/scripts/utils/pug-renderer/{create-prerender-pug-template.js → create-prerender-pug-template.cjs} +3 -3
- package/scripts/utils/pug-renderer/{render-pug-component.js → render-pug-component.cjs} +4 -4
- package/scripts/utils/pug-to-xml-binding/parser/{xml-components-parser.js → xml-components-parser.cjs} +2 -2
- package/scripts/utils/pug-to-xml-binding/{render-xml-pug-components-in-markdown.js → render-xml-pug-components-in-markdown.cjs} +3 -3
- package/scripts/utils/pug-to-xml-binding/{transform-xml-tree-to-pug.js → transform-xml-tree-to-pug.cjs} +1 -1
- package/scripts/utils/{spritesheet-svg.js → spritesheet-svg.cjs} +2 -2
- package/scripts/utils/{transform-markdown-admonitions.js → transform-markdown-admonitions.cjs} +1 -1
- package/src/api-builder/api-builder.js +28 -30
- package/src/api-builder/build-page-worker.js +9 -9
- package/src/api-builder/classes/description-parser.js +12 -14
- package/src/api-builder/classes/doc-data-factory.js +3 -5
- package/src/api-builder/classes/file-name-manager.js +2 -4
- package/src/api-builder/classes/html-file.js +2 -4
- package/src/api-builder/classes/navigation-tree.js +6 -8
- package/src/api-builder/classes/tree-node.js +1 -3
- package/src/api-builder/utils/findtargetdoclet.js +1 -3
- package/src/api-builder/utils/utils.js +19 -26
- package/src/data-converter/converters/jsdoc2umberto.js +2 -4
- package/src/data-converter/converters/jsduck2umberto.js +5 -7
- package/src/data-converter/converters/typedoc/abstractparser.js +3 -5
- package/src/data-converter/converters/typedoc/accessorparser.js +3 -5
- package/src/data-converter/converters/typedoc/classparser.js +3 -5
- package/src/data-converter/converters/typedoc/computedpropertyparser.js +3 -5
- package/src/data-converter/converters/typedoc/constantparser.js +3 -5
- package/src/data-converter/converters/typedoc/constructorparser.js +3 -5
- package/src/data-converter/converters/typedoc/errorparser.js +2 -4
- package/src/data-converter/converters/typedoc/eventparser.js +2 -4
- package/src/data-converter/converters/typedoc/functionparser.js +3 -5
- package/src/data-converter/converters/typedoc/interfaceparser.js +3 -5
- package/src/data-converter/converters/typedoc/methodparser.js +3 -5
- package/src/data-converter/converters/typedoc/moduleparser.js +3 -5
- package/src/data-converter/converters/typedoc/propertyparser.js +3 -5
- package/src/data-converter/converters/typedoc/referenceparser.js +3 -5
- package/src/data-converter/converters/typedoc/reflectionkind.js +24 -26
- package/src/data-converter/converters/typedoc/typedocconverter.js +3 -7
- package/src/data-converter/converters/typedoc/typeparser.js +3 -5
- package/src/data-converter/converters/typedoc2umberto.js +17 -19
- package/src/data-converter/data-collection.js +2 -5
- package/src/data-converter/data-provider.js +6 -8
- package/src/data-converter/doclet-collection.js +1 -4
- package/src/data-converter/middlewares/relation-fixer.js +3 -5
- package/src/helpers/capitalize.js +1 -3
- package/src/helpers/create-filtering-data-attribs.js +1 -3
- package/src/helpers/doc-formats.js +1 -3
- package/src/helpers/escape-longname.js +1 -3
- package/src/helpers/extract-longname.js +1 -3
- package/src/helpers/get-api-infobox-tooltip.js +3 -5
- package/src/helpers/get-docsearch-config.js +8 -6
- package/src/helpers/get-file-patterns-to-process.js +1 -3
- package/src/helpers/get-short-module-path.js +2 -4
- package/src/helpers/github-url.js +96 -103
- package/src/helpers/glob-to-regexp.js +3 -5
- package/src/helpers/html-safe.js +1 -3
- package/src/helpers/import-module.js +3 -5
- package/src/helpers/is-non-empty-array.js +1 -3
- package/src/helpers/log-with-time.js +2 -4
- package/src/helpers/resolve-path.js +5 -3
- package/src/helpers/snippets.js +50 -56
- package/src/helpers/split-longname.js +2 -4
- package/src/helpers/umberto-version.js +10 -0
- package/src/hexo/filter/extend-config.js +1 -3
- package/src/hexo/filter/project-locals.js +5 -7
- package/src/hexo/get-repo-urls.js +5 -6
- package/src/hexo/helper/get-page-group.js +1 -3
- package/src/hexo/project-globals.js +4 -6
- package/src/hexo-manager.js +12 -13
- package/src/index.js +28 -32
- package/src/sdk-builder/get-sdk-sources.js +11 -13
- package/src/sdk-builder/sdk-builder.js +11 -11
- package/src/tasks/build-api-docs.js +7 -9
- package/src/tasks/build-documentation.js +30 -31
- package/src/tasks/build-sdk.js +5 -5
- package/src/tasks/build-snippets.js +3 -5
- package/src/tasks/cache-files.js +4 -6
- package/src/tasks/compile-sass.js +8 -9
- package/src/tasks/copy-assets.js +3 -5
- package/src/tasks/copy-files.js +5 -7
- package/src/tasks/copy-project-docs.js +5 -7
- package/src/tasks/copy-project-icons.js +5 -7
- package/src/tasks/create-redirect-page.js +3 -5
- package/src/tasks/create-sitemap-index.js +3 -3
- package/src/tasks/create-sitemap-step.js +4 -4
- package/src/tasks/create-sitemap.js +6 -8
- package/src/tasks/create-sym-links.js +5 -7
- package/src/tasks/execute-hooks.js +3 -5
- package/src/tasks/get-extra-files.js +3 -5
- package/src/tasks/get-hexo-config.js +4 -4
- package/src/tasks/get-main-config.js +3 -5
- package/src/tasks/get-project-config.js +6 -8
- package/src/tasks/macro-replacer.js +1 -3
- package/src/tasks/minify-html-worker.js +5 -5
- package/src/tasks/minify-html.js +8 -10
- package/src/tasks/overwrite-api-guides.js +4 -6
- package/src/tasks/read-doc-sources.js +5 -7
- package/src/tasks/run-webpack.js +8 -6
- package/src/tasks/validate-links-collect-worker.js +6 -6
- package/src/tasks/validate-links-worker.js +6 -6
- package/src/tasks/validate-links.js +9 -11
- package/src/tasks/watcher.js +5 -7
- package/src/tasks/write-html-files.js +3 -5
- package/src/template/template-collection.js +13 -15
- package/themes/umberto/src/gloria/js/app.js +32 -32
- package/themes/umberto/src/gloria/js/components/api-nav-tree.js +4 -4
- package/themes/umberto/src/gloria/js/components/api-toggle.js +2 -2
- package/themes/umberto/src/gloria/js/components/breadcrumbs.js +1 -1
- package/themes/umberto/src/gloria/js/components/code-block.js +5 -5
- package/themes/umberto/src/gloria/js/components/code-switcher.js +2 -2
- package/themes/umberto/src/gloria/js/components/dropdown.js +5 -5
- package/themes/umberto/src/gloria/js/components/expandable.js +1 -1
- package/themes/umberto/src/gloria/js/components/fake-devtools.js +4 -4
- package/themes/umberto/src/gloria/js/components/hash-link.js +2 -2
- package/themes/umberto/src/gloria/js/components/heading-link.js +2 -2
- package/themes/umberto/src/gloria/js/components/iframe.js +2 -2
- package/themes/umberto/src/gloria/js/components/mobile-overlay.js +5 -5
- package/themes/umberto/src/gloria/js/components/nav-tree.js +3 -3
- package/themes/umberto/src/gloria/js/components/tabs.js +2 -2
- package/themes/umberto/src/gloria/js/components/tooltip-popover.js +13 -13
- package/themes/umberto/src/gloria/js/helpers/animate-element.js +2 -2
- package/themes/umberto/src/gloria/js/helpers/create-anchor-positioning-watcher.js +1 -1
- package/themes/umberto/src/gloria/js/helpers/create-keyboard-focus-cycler.js +3 -3
- package/themes/umberto/src/gloria/js/helpers/focus-first-interactive.js +2 -2
- package/themes/umberto/src/gloria/js/helpers/highlight-code.js +1 -1
- package/themes/umberto/src/gloria/js/helpers/scroll-to-hash.js +1 -1
- package/themes/umberto/src/gloria/js/helpers/tween.js +2 -2
- package/themes/umberto/src/gloria/js/modules/algolia-search.js +4 -4
- package/themes/umberto/src/gloria/js/modules/api-filter.js +1 -1
- package/themes/umberto/src/gloria/js/modules/header-bar.js +4 -4
- package/themes/umberto/src/gloria/js/modules/header.js +2 -2
- package/themes/umberto/src/gloria/js/modules/links-prefetch.js +1 -1
- package/themes/umberto/src/gloria/js/modules/mobile-nav.js +7 -7
- package/themes/umberto/src/gloria/js/modules/sidebar.js +3 -3
- package/themes/umberto/src/gloria/js/modules/table-of-contents-api.js +9 -9
- package/themes/umberto/src/gloria/js/modules/table-of-contents.js +10 -10
- package/themes/umberto/src/gloria/js/public-api.js +15 -15
- package/themes/umberto/src/gloria/js/web-components/svg-icon.js +3 -3
- package/themes/umberto/src/umberto/js/_apitree.js +1 -1
- package/themes/umberto/src/umberto/js/_attachpermalinklistener.js +1 -1
- package/themes/umberto/src/umberto/js/_copymobileapinavigation.js +1 -1
- package/themes/umberto/src/umberto/js/_imageModal.js +1 -1
- package/themes/umberto/src/umberto/js/_pagenavigation.js +1 -1
- package/themes/umberto/src/umberto/js/_prism.js +1 -1
- package/themes/umberto/src/umberto/js/_samplecode.js +1 -1
- package/themes/umberto/src/umberto/js/_sidenavigation.js +1 -1
- package/themes/umberto/src/umberto/js/_toc.js +1 -1
- package/themes/umberto/src/umberto/js/_warningbanner.js +1 -1
- package/themes/umberto/src/umberto/js/app.js +19 -19
- package/src/tasks/validate-html-w3c.js +0 -35
- /package/scripts/filter/after-post-render/{basepath-replacer.js → basepath-replacer.cjs} +0 -0
- /package/scripts/filter/after-post-render/{fix-code-samples.js → fix-code-samples.cjs} +0 -0
- /package/scripts/filter/after-post-render/{gather-guides.js → gather-guides.cjs} +0 -0
- /package/scripts/filter/after-post-render/{img-linker.js → img-linker.cjs} +0 -0
- /package/scripts/filter/after-post-render/{import-guide.js → import-guide.cjs} +0 -0
- /package/scripts/filter/after-post-render/{process-variables.js → process-variables.cjs} +0 -0
- /package/scripts/filter/after-post-render/{time-end.js → time-end.cjs} +0 -0
- /package/scripts/filter/after-post-render/{time-start.js → time-start.cjs} +0 -0
- /package/scripts/filter/after-post-render/{validate-after-render.js → validate-after-render.cjs} +0 -0
- /package/scripts/filter/before-post-render/{change-output-path.js → change-output-path.cjs} +0 -0
- /package/scripts/filter/before-post-render/{set-layout.js → set-layout.cjs} +0 -0
- /package/scripts/filter/before-post-render/{validate-page-data.js → validate-page-data.cjs} +0 -0
- /package/scripts/helper/{get-pages-for-nav-tree.js → get-pages-for-nav-tree.cjs} +0 -0
- /package/scripts/helper/{mark-empty-categories.js → mark-empty-categories.cjs} +0 -0
- /package/scripts/helper/{u-extract-and-cache-title.js → u-extract-and-cache-title.cjs} +0 -0
- /package/scripts/helper/{u-split-to-title-and-content.js → u-split-to-title-and-content.cjs} +0 -0
- /package/scripts/utils/{add-indention.js → add-indention.cjs} +0 -0
- /package/scripts/utils/{capitalize.js → capitalize.cjs} +0 -0
- /package/scripts/utils/{compose.js → compose.cjs} +0 -0
- /package/scripts/utils/{decode-html-entities.js → decode-html-entities.cjs} +0 -0
- /package/scripts/utils/{drop-init-slash.js → drop-init-slash.cjs} +0 -0
- /package/scripts/utils/{drop-trailing-slash.js → drop-trailing-slash.cjs} +0 -0
- /package/scripts/utils/{drop-url-protocol.js → drop-url-protocol.cjs} +0 -0
- /package/scripts/utils/{findmaincategorypage.js → findmaincategorypage.cjs} +0 -0
- /package/scripts/utils/{getreportissuewidgeturl.js → getreportissuewidgeturl.cjs} +0 -0
- /package/scripts/utils/gloria-after-post-render/{apply-design-doc-classes.js → apply-design-doc-classes.cjs} +0 -0
- /package/scripts/utils/gloria-after-post-render/{wrap-table-into-wrappers.js → wrap-table-into-wrappers.cjs} +0 -0
- /package/scripts/utils/{insertchangelog.js → insertchangelog.cjs} +0 -0
- /package/scripts/utils/{measure-call.js → measure-call.cjs} +0 -0
- /package/scripts/utils/{normalizebadges.js → normalizebadges.cjs} +0 -0
- /package/scripts/utils/{parser-cursor.js → parser-cursor.cjs} +0 -0
- /package/scripts/utils/pug-to-xml-binding/parser/{walk-xml-tree.js → walk-xml-tree.cjs} +0 -0
- /package/scripts/utils/{random-id.js → random-id.cjs} +0 -0
- /package/scripts/utils/{remove-indentation.js → remove-indentation.cjs} +0 -0
- /package/scripts/utils/{shoulddisplaynewindicator.js → shoulddisplaynewindicator.cjs} +0 -0
- /package/scripts/utils/{toc.js → toc.cjs} +0 -0
- /package/scripts/utils/{transformcodeswitcher.js → transformcodeswitcher.cjs} +0 -0
- /package/scripts/utils/{transforminfobox.js → transforminfobox.cjs} +0 -0
- /package/scripts/utils/{uniq-by-last.js → uniq-by-last.cjs} +0 -0
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class ClassParser extends AbstractParser {
|
|
9
|
+
export class ClassParser extends AbstractParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { PropertyParser } from './propertyparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class ComputedPropertyParser extends PropertyParser {
|
|
9
|
+
export class ComputedPropertyParser extends PropertyParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class ConstantParser extends AbstractParser {
|
|
9
|
+
export class ConstantParser extends AbstractParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { MethodParser } from './methodparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class ConstructorParser extends MethodParser {
|
|
9
|
+
export class ConstructorParser extends MethodParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
module.exports = class ErrorParser extends AbstractParser {
|
|
8
|
+
export class ErrorParser extends AbstractParser {
|
|
11
9
|
/**
|
|
12
10
|
* @param {BaseReflection} item
|
|
13
11
|
* @returns {Boolean}
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
module.exports = class EventParser extends AbstractParser {
|
|
8
|
+
export class EventParser extends AbstractParser {
|
|
11
9
|
/**
|
|
12
10
|
* @param {BaseReflection} item
|
|
13
11
|
* @returns {Boolean}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class FunctionParser extends AbstractParser {
|
|
9
|
+
export class FunctionParser extends AbstractParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class InterfaceParser extends AbstractParser {
|
|
9
|
+
export class InterfaceParser extends AbstractParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class MethodParser extends AbstractParser {
|
|
9
|
+
export class MethodParser extends AbstractParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class ModuleParser extends AbstractParser {
|
|
9
|
+
export class ModuleParser extends AbstractParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class PropertyParser extends AbstractParser {
|
|
9
|
+
export class PropertyParser extends AbstractParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class ReferenceParser extends AbstractParser {
|
|
9
|
+
export class ReferenceParser extends AbstractParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,32 +3,30 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
6
|
// To avoid linking Umberto and Typedoc, let's keep this file in sync with the `ReflectionKind` enum.
|
|
9
7
|
// See: https://typedoc.org/api/enums/Models.ReflectionKind.html
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
9
|
+
export const Accessor = 262144;
|
|
10
|
+
export const CallSignature = 4096;
|
|
11
|
+
export const Class = 128;
|
|
12
|
+
export const Constructor = 512;
|
|
13
|
+
export const ConstructorSignature = 16384;
|
|
14
|
+
export const Document = 8388608;
|
|
15
|
+
export const Enum = 8;
|
|
16
|
+
export const EnumMember = 16;
|
|
17
|
+
export const Function = 64;
|
|
18
|
+
export const GetSignature = 524288;
|
|
19
|
+
export const IndexSignature = 8192;
|
|
20
|
+
export const Interface = 256;
|
|
21
|
+
export const Method = 2048;
|
|
22
|
+
export const Module = 2;
|
|
23
|
+
export const Namespace = 4;
|
|
24
|
+
export const Parameter = 32768;
|
|
25
|
+
export const Project = 1;
|
|
26
|
+
export const Property = 1024;
|
|
27
|
+
export const Reference = 4194304;
|
|
28
|
+
export const SetSignature = 1048576;
|
|
29
|
+
export const TypeAlias = 2097152;
|
|
30
|
+
export const TypeLiteral = 65536;
|
|
31
|
+
export const TypeParameter = 131072;
|
|
32
|
+
export const Variable = 32;
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const MarkdownIt = require( 'markdown-it' );
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
6
|
+
import MarkdownIt from 'markdown-it';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
10
8
|
const markdown = new MarkdownIt( {
|
|
11
9
|
html: true
|
|
12
10
|
} );
|
|
@@ -14,7 +12,7 @@ const markdown = new MarkdownIt( {
|
|
|
14
12
|
const ISSUE_URL = 'https://github.com/cksource/umberto/issues/new?assignees=&labels=type:feature,squad:platform';
|
|
15
13
|
const MODULE_INDEX_PATTERN = /^module:(?!icons\b)[\w-]+\/index/;
|
|
16
14
|
|
|
17
|
-
class TypedocConverter {
|
|
15
|
+
export class TypedocConverter {
|
|
18
16
|
/**
|
|
19
17
|
* @param {Array.<AbstractParser>} parsers
|
|
20
18
|
*/
|
|
@@ -866,8 +864,6 @@ class TypeConverter {
|
|
|
866
864
|
}
|
|
867
865
|
}
|
|
868
866
|
|
|
869
|
-
module.exports = TypedocConverter;
|
|
870
|
-
|
|
871
867
|
/**
|
|
872
868
|
* @param {TypeConverter} converter
|
|
873
869
|
* @returns {Function}
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { AbstractParser } from './abstractparser.js';
|
|
7
|
+
import * as ReflectionKind from './reflectionkind.js';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
const ReflectionKind = require( './reflectionkind' );
|
|
10
|
-
|
|
11
|
-
module.exports = class TypeParser extends AbstractParser {
|
|
9
|
+
export class TypeParser extends AbstractParser {
|
|
12
10
|
/**
|
|
13
11
|
* @param {BaseReflection} item
|
|
14
12
|
* @returns {Boolean}
|
|
@@ -3,25 +3,23 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
module.exports = data => {
|
|
6
|
+
import { TypedocConverter } from './typedoc/typedocconverter.js';
|
|
7
|
+
import { ModuleParser } from './typedoc/moduleparser.js';
|
|
8
|
+
import { ClassParser } from './typedoc/classparser.js';
|
|
9
|
+
import { AccessorParser } from './typedoc/accessorparser.js';
|
|
10
|
+
import { InterfaceParser } from './typedoc/interfaceparser.js';
|
|
11
|
+
import { ConstantParser } from './typedoc/constantparser.js';
|
|
12
|
+
import { TypeParser } from './typedoc/typeparser.js';
|
|
13
|
+
import { FunctionParser } from './typedoc/functionparser.js';
|
|
14
|
+
import { PropertyParser } from './typedoc/propertyparser.js';
|
|
15
|
+
import { ComputedPropertyParser } from './typedoc/computedpropertyparser.js';
|
|
16
|
+
import { MethodParser } from './typedoc/methodparser.js';
|
|
17
|
+
import { ConstructorParser } from './typedoc/constructorparser.js';
|
|
18
|
+
import { ErrorParser } from './typedoc/errorparser.js';
|
|
19
|
+
import { EventParser } from './typedoc/eventparser.js';
|
|
20
|
+
import { ReferenceParser } from './typedoc/referenceparser.js';
|
|
21
|
+
|
|
22
|
+
export const typedoc2umberto = data => {
|
|
25
23
|
const projectReflection = JSON.parse( data );
|
|
26
24
|
|
|
27
25
|
if ( !projectReflection.children ) {
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const DocletCollection = require( './doclet-collection' );
|
|
6
|
+
import { DocletCollection } from './doclet-collection.js';
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
9
|
* Collection of DocletCollections as <String, DocletCollection> pairs. Also stores all doclets in an array.
|
|
12
10
|
*/
|
|
13
|
-
class DataCollection {
|
|
11
|
+
export class DataCollection {
|
|
14
12
|
/**
|
|
15
13
|
* Creates collection of DocletCollections.
|
|
16
14
|
*/
|
|
@@ -55,4 +53,3 @@ class DataCollection {
|
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
55
|
|
|
58
|
-
module.exports = DataCollection;
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const typedoc2umberto = require( './converters/typedoc2umberto' );
|
|
12
|
-
const relationFixer = require( './middlewares/relation-fixer' );
|
|
6
|
+
import { DataCollection } from './data-collection.js';
|
|
7
|
+
import { jsdoc2umberto } from './converters/jsdoc2umberto.js';
|
|
8
|
+
import { jsduck2umberto } from './converters/jsduck2umberto.js';
|
|
9
|
+
import { typedoc2umberto } from './converters/typedoc2umberto.js';
|
|
10
|
+
import { relationFixer } from './middlewares/relation-fixer.js';
|
|
13
11
|
const converters = new Map( [
|
|
14
12
|
[ 'jsdoc', jsdoc2umberto ],
|
|
15
13
|
[ 'jsduck', jsduck2umberto ],
|
|
@@ -20,7 +18,7 @@ const converters = new Map( [
|
|
|
20
18
|
* Converts API data generated by various documentation tools into umberto-source-format.
|
|
21
19
|
* umberto-source-format is pretty much equal to JSDoc format.
|
|
22
20
|
*/
|
|
23
|
-
|
|
21
|
+
export class DataProvider {
|
|
24
22
|
/**
|
|
25
23
|
* Converts data to umberto-source-format.
|
|
26
24
|
*
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* Collection of doclets as <String, Doclet[]> pairs. Also stores all doclets and their longnames as arrays.
|
|
10
8
|
*/
|
|
11
|
-
class DocletCollection {
|
|
9
|
+
export class DocletCollection {
|
|
12
10
|
/**
|
|
13
11
|
* Creates collection of doclets.
|
|
14
12
|
*/
|
|
@@ -115,4 +113,3 @@ function sortByName( a, b ) {
|
|
|
115
113
|
return 0;
|
|
116
114
|
}
|
|
117
115
|
|
|
118
|
-
module.exports = DocletCollection;
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const buildRelations = require( '@ckeditor/jsdoc-plugins/lib/relation-fixer/buildrelations' );
|
|
9
|
-
const addMissingDoclets = require( '@ckeditor/jsdoc-plugins/lib/relation-fixer/addmissingdoclets' );
|
|
6
|
+
import buildRelations from '@ckeditor/jsdoc-plugins/lib/relation-fixer/buildrelations.js';
|
|
7
|
+
import addMissingDoclets from '@ckeditor/jsdoc-plugins/lib/relation-fixer/addmissingdoclets.js';
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
10
|
* Builds relation chains between doclets and adds missing derived doclets.
|
|
@@ -15,6 +13,6 @@ const addMissingDoclets = require( '@ckeditor/jsdoc-plugins/lib/relation-fixer/a
|
|
|
15
13
|
* @param doclets
|
|
16
14
|
* @returns {Array.<Doclet>}
|
|
17
15
|
*/
|
|
18
|
-
|
|
16
|
+
export const relationFixer = doclets => {
|
|
19
17
|
return addMissingDoclets( buildRelations( doclets ) );
|
|
20
18
|
};
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* Creates an object with atributes data to be used in template.
|
|
10
8
|
* @param {Object} item
|
|
11
9
|
*/
|
|
12
|
-
|
|
10
|
+
export const createFilteringDataAttribs = item => {
|
|
13
11
|
const attrData = {};
|
|
14
12
|
|
|
15
13
|
if ( item.access ) {
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* Replaces characters in a string. Mainly used to prepare a long-name to be used as a filename.
|
|
10
8
|
*
|
|
11
9
|
* @param {String} text
|
|
12
10
|
* @returns {String}
|
|
13
11
|
*/
|
|
14
|
-
|
|
12
|
+
export const escapeLongname = text => {
|
|
15
13
|
const str = text || '';
|
|
16
14
|
|
|
17
15
|
return str.replace( /\([\s\S]*\)$/, '' )
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* Extracts longname from strings like 'Array.<module:ui...>'.
|
|
10
8
|
* @param {String} str
|
|
@@ -13,7 +11,7 @@
|
|
|
13
11
|
* @returns {Object} result.prefix
|
|
14
12
|
* @returns {Object} result.suffix
|
|
15
13
|
*/
|
|
16
|
-
|
|
14
|
+
export const extractLongname = str => {
|
|
17
15
|
if ( typeof str !== 'string' ) {
|
|
18
16
|
return {
|
|
19
17
|
longnames: [ '' ]
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { getShortModulePath } from './get-short-module-path.js';
|
|
7
|
+
import { splitLongname } from './split-longname.js';
|
|
7
8
|
|
|
8
|
-
const
|
|
9
|
-
const splitLongname = require( './split-longname' );
|
|
10
|
-
|
|
11
|
-
module.exports = ( longname, transformFn ) => {
|
|
9
|
+
export const getApiInfoboxTooltip = ( longname, transformFn ) => {
|
|
12
10
|
const className = splitLongname( longname ).className;
|
|
13
11
|
const str = className ? `${ getShortModulePath( longname ) }~${ className }` : getShortModulePath( longname );
|
|
14
12
|
|
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import lodash from 'lodash';
|
|
7
|
+
import { stringify } from 'javascript-stringify';
|
|
8
|
+
import fs from 'node:fs';
|
|
9
|
+
import upath from 'upath';
|
|
7
10
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const upath = require( 'upath' );
|
|
11
|
+
const __dirname = import.meta.dirname;
|
|
12
|
+
|
|
13
|
+
const { cloneDeep } = lodash;
|
|
12
14
|
|
|
13
15
|
const defaultScriptTemplate = fs.readFileSync( upath.join( __dirname, 'templates', 'scripts', 'default.js' ), 'utf-8' );
|
|
14
16
|
const groupScriptTemplate = fs.readFileSync( upath.join( __dirname, 'templates', 'scripts', 'group.js' ), 'utf-8' );
|
|
15
17
|
const rootScriptTemplate = fs.readFileSync( upath.join( __dirname, 'templates', 'scripts', 'root.js' ), 'utf-8' );
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
export const getDocsearchConfig = ( searchConfig, {
|
|
18
20
|
groups = [],
|
|
19
21
|
slug = '',
|
|
20
22
|
customRanking = []
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* Returns an array containing files to process by Umberto based on the configuration passed to the building task.
|
|
10
8
|
*
|
|
@@ -18,7 +16,7 @@
|
|
|
18
16
|
* @param {Boolean} skipGuides
|
|
19
17
|
* @return {nArray.<String>|null}
|
|
20
18
|
*/
|
|
21
|
-
|
|
19
|
+
export function getFilePatternsToProcess( { guides, skipGuides } ) {
|
|
22
20
|
// When called with `--skip-guides`.
|
|
23
21
|
if ( skipGuides ) {
|
|
24
22
|
return [
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { splitLongname } from './split-longname.js';
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
module.exports = longname => {
|
|
8
|
+
export const getShortModulePath = longname => {
|
|
11
9
|
if ( !longname ) {
|
|
12
10
|
return '';
|
|
13
11
|
}
|