umberto 9.3.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 +24 -16
- 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 +84 -33
- 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 +7 -9
- 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 +80 -8
- 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 +47 -36
- 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 +11 -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/layout/gloria/_api-docs/_mixin/_api-tree-item.pug +18 -1
- package/themes/umberto/layout/gloria/_head/head.pug +5 -0
- package/themes/umberto/layout/umberto/_partial/head.pug +5 -0
- package/themes/umberto/src/gloria/css/components/_api-tree.scss +4 -0
- package/themes/umberto/src/gloria/js/app.js +32 -32
- package/themes/umberto/src/gloria/js/components/api-nav-tree.js +5 -5
- 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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
const crypto = require( 'node:crypto' );
|
|
9
9
|
const upath = require( 'upath' );
|
|
10
|
-
const logCrossProjectReference = require( './logcrossprojectreference' );
|
|
10
|
+
const logCrossProjectReference = require( './logcrossprojectreference.cjs' );
|
|
11
11
|
|
|
12
12
|
const ICON_REGEXP = /\\?{@icon(?:\s+@(\w+))?\s+([^}\s]+)\s*([^}]*)\\?}/g;
|
|
13
13
|
|
|
@@ -21,6 +21,8 @@ const ICON_REGEXP = /\\?{@icon(?:\s+@(\w+))?\s+([^}\s]+)\s*([^}]*)\\?}/g;
|
|
|
21
21
|
* @returns {Object}
|
|
22
22
|
*/
|
|
23
23
|
module.exports = function parseIconTag( page, hexo ) {
|
|
24
|
+
const { logCrossProjectReference } = module.exports._dependencies;
|
|
25
|
+
|
|
24
26
|
const relativeUrlHelper = hexo.extend.helper.store.relative_url;
|
|
25
27
|
|
|
26
28
|
page.content = page.content.replace( ICON_REGEXP, ( match, iconProject, iconPath, alternativeText ) => {
|
|
@@ -57,6 +59,10 @@ module.exports = function parseIconTag( page, hexo ) {
|
|
|
57
59
|
return page;
|
|
58
60
|
};
|
|
59
61
|
|
|
62
|
+
module.exports._dependencies = {
|
|
63
|
+
logCrossProjectReference
|
|
64
|
+
};
|
|
65
|
+
|
|
60
66
|
/**
|
|
61
67
|
* @param {String} value
|
|
62
68
|
* @return {String}
|
|
@@ -7,14 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
const { styleText } = require( 'node:util' );
|
|
9
9
|
const upath = require( 'upath' );
|
|
10
|
-
const splitLongname = require( '../../src/helpers/split-longname' );
|
|
10
|
+
const { splitLongname } = require( '../../src/helpers/split-longname.js' );
|
|
11
|
+
const { findTargetDoclet } = require( '../../src/api-builder/utils/findtargetdoclet.js' );
|
|
12
|
+
const { hasDedicatedApiPages, LONG_NAME_LABEL_REGEXP } = require( '../../src/api-builder/utils/utils.js' );
|
|
13
|
+
const logCrossProjectReference = require( './logcrossprojectreference.cjs' );
|
|
11
14
|
|
|
12
15
|
const LINK_REGEXP = /\\?{(?:@linkapi|@link|@linksdk|@linkexample)\s+[^{]+?({[^}]+})?[^{}]*\\?}/g;
|
|
13
16
|
|
|
14
|
-
const findTargetDoclet = require( '../../src/api-builder/utils/findtargetdoclet' );
|
|
15
|
-
const { hasDedicatedApiPages, LONG_NAME_LABEL_REGEXP } = require( '../../src/api-builder/utils/utils' );
|
|
16
|
-
const logCrossProjectReference = require( './logcrossprojectreference' );
|
|
17
|
-
|
|
18
17
|
/**
|
|
19
18
|
* Converts @link or @linkapi tags into working links to guides or API docs.
|
|
20
19
|
*
|
|
@@ -40,7 +39,7 @@ function parseLinks( page, hexo ) {
|
|
|
40
39
|
} );
|
|
41
40
|
|
|
42
41
|
return page;
|
|
43
|
-
}
|
|
42
|
+
}
|
|
44
43
|
|
|
45
44
|
/**
|
|
46
45
|
* @param {String} str
|
|
@@ -51,6 +50,7 @@ function parseLinks( page, hexo ) {
|
|
|
51
50
|
* @param {Boolean} options.isSilentError
|
|
52
51
|
*/
|
|
53
52
|
function linkToApi( str, data, hexo, { relativeUrlHelper, isSilentError }, onlyHref = false ) {
|
|
53
|
+
const { logCrossProjectReference } = module.exports._dependencies;
|
|
54
54
|
const linkMatchResult = str.match( /^{((?:@linkapi|@link)[\s\S]+)}$/ );
|
|
55
55
|
|
|
56
56
|
if ( !linkMatchResult ) {
|
|
@@ -236,6 +236,7 @@ function getOutputLink( href, description, isCustomDescription ) {
|
|
|
236
236
|
* @param {Boolean} options.isSilentError
|
|
237
237
|
*/
|
|
238
238
|
function linkToSdk( str, data, hexo, { relativeUrlHelper, isSilentError }, onlyHref = false ) {
|
|
239
|
+
const { logCrossProjectReference } = module.exports._dependencies;
|
|
239
240
|
const regExp = /(?:@linksdk|@linkexample) (?:@(\w+) )?(\w+)(?:\.html)?(#\S+)? ([^}]+)/;
|
|
240
241
|
const match = regExp.exec( str );
|
|
241
242
|
|
|
@@ -278,6 +279,7 @@ function linkToSdk( str, data, hexo, { relativeUrlHelper, isSilentError }, onlyH
|
|
|
278
279
|
* @param {Boolean} options.isSilentError
|
|
279
280
|
*/
|
|
280
281
|
function linkToGuide( str, data, hexo, { relativeUrlHelper, isSilentError }, onlyHref = false ) {
|
|
282
|
+
const { logCrossProjectReference } = module.exports._dependencies;
|
|
281
283
|
const rgxp = /@link(?:\s+@(\w+))?\s+([^}\s]+)\s*([^}]*)}/;
|
|
282
284
|
const match = rgxp.exec( str );
|
|
283
285
|
|
|
@@ -354,6 +356,7 @@ function linkToGuide( str, data, hexo, { relativeUrlHelper, isSilentError }, onl
|
|
|
354
356
|
* @return {String}
|
|
355
357
|
*/
|
|
356
358
|
function onError( { value, source, isSilent, description } ) {
|
|
359
|
+
const { styleText } = module.exports._dependencies;
|
|
357
360
|
if ( !isSilent ) {
|
|
358
361
|
process.exitCode = 1;
|
|
359
362
|
|
|
@@ -392,3 +395,8 @@ module.exports = {
|
|
|
392
395
|
linkToSdk,
|
|
393
396
|
linkToGuide
|
|
394
397
|
};
|
|
398
|
+
|
|
399
|
+
module.exports._dependencies = {
|
|
400
|
+
logCrossProjectReference,
|
|
401
|
+
styleText
|
|
402
|
+
};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const { randomId, regenerateRandomIds } = require( '../random-id' );
|
|
9
|
-
const renderPugComponent = require( './render-pug-component' );
|
|
8
|
+
const { randomId, regenerateRandomIds } = require( '../random-id.cjs' );
|
|
9
|
+
const renderPugComponent = require( './render-pug-component.cjs' );
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Creates a template function for a Pug component with a built-in caching mechanism.
|
|
@@ -28,7 +28,7 @@ const renderPugComponent = require( './render-pug-component' );
|
|
|
28
28
|
* such as code in a code block.
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
|
-
* const createPrerenderPugTemplate = require( './create-prerender-pug-template' );
|
|
31
|
+
* const createPrerenderPugTemplate = require( './create-prerender-pug-template.cjs' );
|
|
32
32
|
*
|
|
33
33
|
* // Creates a template for the 'code-block' component.
|
|
34
34
|
* const codeBlockTemplate = createPrerenderPugTemplate( {
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
const hexoManager = require( '../../../src/hexo-manager' );
|
|
8
|
+
const upath = require( 'upath' );
|
|
9
|
+
const { hexoManager } = require( '../../../src/hexo-manager.js' );
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Renders a Pug component with specified includes and parameters.
|
|
@@ -35,8 +35,8 @@ module.exports = function renderPugComponent(
|
|
|
35
35
|
// Default base path is the components directory in the theme
|
|
36
36
|
// Handle case where hexo.theme_dir might be undefined
|
|
37
37
|
const resolvedHexo = hexo || hexoManager.hexo;
|
|
38
|
-
const themeDir = resolvedHexo && resolvedHexo.theme_dir ||
|
|
39
|
-
const componentsPath = basePath ||
|
|
38
|
+
const themeDir = resolvedHexo && resolvedHexo.theme_dir || upath.join( __dirname, '../../themes/umberto' );
|
|
39
|
+
const componentsPath = basePath || upath.join( themeDir, 'layout', 'gloria', '_components' );
|
|
40
40
|
|
|
41
41
|
// Prepare includes statements
|
|
42
42
|
const includeStatements = requires.map( include => `include ${ include }` );
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
const { inspect } = require( 'node:util' );
|
|
9
9
|
|
|
10
|
-
const removeIndentation = require( '../../remove-indentation.
|
|
11
|
-
const ParserCursor = require( '../../parser-cursor.
|
|
10
|
+
const removeIndentation = require( '../../remove-indentation.cjs' );
|
|
11
|
+
const ParserCursor = require( '../../parser-cursor.cjs' );
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* A parser for converting markdown containing HTML-like markup into a tree structure.
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const transformXMLTreeToPug = require( './transform-xml-tree-to-pug.
|
|
9
|
-
const XMLComponentsParser = require( './parser/xml-components-parser.
|
|
10
|
-
const { walkXMLTree, TreeWalkActions } = require( './parser/walk-xml-tree.
|
|
8
|
+
const transformXMLTreeToPug = require( './transform-xml-tree-to-pug.cjs' );
|
|
9
|
+
const XMLComponentsParser = require( './parser/xml-components-parser.cjs' );
|
|
10
|
+
const { walkXMLTree, TreeWalkActions } = require( './parser/walk-xml-tree.cjs' );
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Slices XML components from Markdown content and transforms them to Pug format.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const fs = require( 'node:fs' );
|
|
9
|
-
const
|
|
9
|
+
const upath = require( 'upath' );
|
|
10
10
|
const { parseDocument } = require( 'htmlparser2' );
|
|
11
11
|
const { Element, cloneNode } = require( 'domhandler' );
|
|
12
12
|
const { selectAll, selectOne } = require( 'css-select' );
|
|
@@ -84,7 +84,7 @@ function createSpritesheet( svgFiles, themeDir ) {
|
|
|
84
84
|
const iconViewBoxes = new Map();
|
|
85
85
|
|
|
86
86
|
for ( const [ iconId, svgPath ] of svgFiles.entries() ) {
|
|
87
|
-
const absolutePath =
|
|
87
|
+
const absolutePath = upath.join( themeDir, svgPath );
|
|
88
88
|
|
|
89
89
|
if ( !fs.existsSync( absolutePath ) ) {
|
|
90
90
|
console.warn( `SVG file not found: ${ absolutePath }` );
|
|
@@ -3,38 +3,36 @@
|
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const parseHref = require( '../../scripts/utils/parse-href' );
|
|
30
|
-
const hexoManager = require( '../hexo-manager' );
|
|
6
|
+
import upath from 'upath';
|
|
7
|
+
import fs from 'fs-extra';
|
|
8
|
+
import { parseDocument } from 'htmlparser2';
|
|
9
|
+
import { selectAll } from 'css-select';
|
|
10
|
+
import { textContent, removeElement } from 'domutils';
|
|
11
|
+
import TinyPool from 'tinypool';
|
|
12
|
+
import { FileNameManager } from './classes/file-name-manager.js';
|
|
13
|
+
import { HtmlFile } from './classes/html-file.js';
|
|
14
|
+
import { DocDataFactory } from './classes/doc-data-factory.js';
|
|
15
|
+
import { DescriptionParser } from './classes/description-parser.js';
|
|
16
|
+
import { NavigationTree } from './classes/navigation-tree.js';
|
|
17
|
+
import { capitalize } from '../helpers/capitalize.js';
|
|
18
|
+
import { getShortModulePath } from '../helpers/get-short-module-path.js';
|
|
19
|
+
import { getDocsearchConfig as getDocSearchConfig } from '../helpers/get-docsearch-config.js';
|
|
20
|
+
import { splitLongname } from '../helpers/split-longname.js';
|
|
21
|
+
import { getIssueUrl, getFullGithubLink } from '../helpers/github-url.js';
|
|
22
|
+
import getReportIssueWidgetUrl from '../../scripts/utils/getreportissuewidgeturl.cjs';
|
|
23
|
+
import { randomId } from '../../scripts/utils/random-id.cjs';
|
|
24
|
+
import parseHref from '../../scripts/utils/parse-href.cjs';
|
|
25
|
+
import { getPageGroup as getPageGroupHelper } from '../hexo/helper/get-page-group.js';
|
|
26
|
+
|
|
27
|
+
import { hexoManager } from '../hexo-manager.js';
|
|
28
|
+
import { findTargetDoclet } from './utils/findtargetdoclet.js';
|
|
31
29
|
|
|
32
30
|
/**
|
|
33
31
|
* Renders HTML for every module, class, mixin etc.
|
|
34
32
|
*
|
|
35
33
|
* @type {module.ApiBuilder}
|
|
36
34
|
*/
|
|
37
|
-
|
|
35
|
+
export class ApiBuilder {
|
|
38
36
|
/**
|
|
39
37
|
* @param templateCollection
|
|
40
38
|
* @param dataCollection
|
|
@@ -151,6 +149,7 @@ module.exports = class ApiBuilder {
|
|
|
151
149
|
} );
|
|
152
150
|
|
|
153
151
|
this._navTreeHtml = '';
|
|
152
|
+
this._navTreeHtmlByPackage = {};
|
|
154
153
|
this._filterHtml = '';
|
|
155
154
|
|
|
156
155
|
/**
|
|
@@ -205,7 +204,7 @@ module.exports = class ApiBuilder {
|
|
|
205
204
|
this._filterHtml = this._tmplCol.renderTemplate( '_partial/filter' );
|
|
206
205
|
|
|
207
206
|
const pool = new TinyPool( {
|
|
208
|
-
filename:
|
|
207
|
+
filename: new URL( './build-page-worker.js', import.meta.url ).pathname
|
|
209
208
|
} );
|
|
210
209
|
|
|
211
210
|
await this._getPages( pool, modulesData, 'module' );
|
|
@@ -255,6 +254,15 @@ module.exports = class ApiBuilder {
|
|
|
255
254
|
return this._navTreeHtml;
|
|
256
255
|
}
|
|
257
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Get HTML of API navigation tree by package name.
|
|
259
|
+
*
|
|
260
|
+
* @returns {Object}
|
|
261
|
+
*/
|
|
262
|
+
getNavTreeByPackage() {
|
|
263
|
+
return Object.assign( {}, this._navTreeHtmlByPackage );
|
|
264
|
+
}
|
|
265
|
+
|
|
258
266
|
/**
|
|
259
267
|
* Get HTML of API error codes.
|
|
260
268
|
* @returns {String}
|
|
@@ -385,13 +393,55 @@ module.exports = class ApiBuilder {
|
|
|
385
393
|
}
|
|
386
394
|
}
|
|
387
395
|
|
|
388
|
-
this._navTreeHtml = this.
|
|
396
|
+
this._navTreeHtml = this._renderNavTreeHtml();
|
|
397
|
+
this._navTreeHtmlByPackage = this._buildNavTreeHtmlByPackage();
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Renders API navigation tree HTML.
|
|
402
|
+
*
|
|
403
|
+
* @param {String|null} activeApiPackage Package name used to expand its subtree.
|
|
404
|
+
* @returns {String}
|
|
405
|
+
*/
|
|
406
|
+
_renderNavTreeHtml( activeApiPackage = null ) {
|
|
407
|
+
return this._tmplCol.renderTemplate( '_partial/navtree', {
|
|
389
408
|
projectLocals: {
|
|
390
409
|
apiTree: this._navTree
|
|
391
|
-
}
|
|
410
|
+
},
|
|
411
|
+
activeApiPackage
|
|
392
412
|
} );
|
|
393
413
|
}
|
|
394
414
|
|
|
415
|
+
/**
|
|
416
|
+
* Builds an object of API navigation tree HTML keyed by package name.
|
|
417
|
+
*
|
|
418
|
+
* @returns {Object}
|
|
419
|
+
*/
|
|
420
|
+
_buildNavTreeHtmlByPackage() {
|
|
421
|
+
const htmlByPackage = {};
|
|
422
|
+
const rootChildren = this._navTree.getTree().getChildren();
|
|
423
|
+
|
|
424
|
+
if ( !Array.isArray( rootChildren ) || rootChildren.length === 0 ) {
|
|
425
|
+
return htmlByPackage;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
for ( const child of rootChildren ) {
|
|
429
|
+
if ( child.getProp( 'type' ) !== this._navTree.NODE_TYPES.PACKAGE ) {
|
|
430
|
+
continue;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
const packageName = child.getProp( 'name' );
|
|
434
|
+
|
|
435
|
+
if ( !packageName ) {
|
|
436
|
+
continue;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
htmlByPackage[ packageName ] = this._renderNavTreeHtml( packageName );
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
return htmlByPackage;
|
|
443
|
+
}
|
|
444
|
+
|
|
395
445
|
/**
|
|
396
446
|
* Renders HTML of each API docs page and creates an HtmlFile instance for that page.
|
|
397
447
|
*/
|
|
@@ -412,6 +462,7 @@ module.exports = class ApiBuilder {
|
|
|
412
462
|
const shortModulePath = getShortModulePath( data.longname );
|
|
413
463
|
const split = splitLongname( data.longname );
|
|
414
464
|
const splitParts = [ split.packageName, ...split.directoryNames ];
|
|
465
|
+
const navTreeHtml = this._navTreeHtmlByPackage[ split.packageName ] || this._navTreeHtml;
|
|
415
466
|
const realImportPath = typeof this._getRealImportPath === 'function' ? this._getRealImportPath( shortModulePath ) : '';
|
|
416
467
|
|
|
417
468
|
let title;
|
|
@@ -452,7 +503,7 @@ module.exports = class ApiBuilder {
|
|
|
452
503
|
realImportPath,
|
|
453
504
|
shortHiddenPath: splitParts.length > 0 ? splitParts.join( '/' ) : '',
|
|
454
505
|
isApi: true,
|
|
455
|
-
issuesUrl:
|
|
506
|
+
issuesUrl: getIssueUrl( this._projectConfig ),
|
|
456
507
|
startPage: this._projectConfig.startPage ? '/' + this._projectConfig.startPage : '/index.html',
|
|
457
508
|
canonicalUrlBeginning: this.canonicalUrlBeginning,
|
|
458
509
|
'meta-description': trimDescription( { min: 155, max: 300, text: metaDescription } ),
|
|
@@ -461,7 +512,7 @@ module.exports = class ApiBuilder {
|
|
|
461
512
|
'dc-description': trimDescription( { min: 300, max: 600, text: metaDescription } )
|
|
462
513
|
};
|
|
463
514
|
|
|
464
|
-
// This line needs to be sync with the `scripts/filter/before-post-render/add-project-info-to-page.
|
|
515
|
+
// This line needs to be sync with the `scripts/filter/before-post-render/add-project-info-to-page.cjs` file.
|
|
465
516
|
page.reportIssueWidget = getReportIssueWidgetUrl( page, this._projectConfig );
|
|
466
517
|
|
|
467
518
|
// More locals to be used in templates. Matching locals used by hexo.
|
|
@@ -469,7 +520,7 @@ module.exports = class ApiBuilder {
|
|
|
469
520
|
latestBasePath: upath.join( this._projectSlug, 'latest' ),
|
|
470
521
|
groups,
|
|
471
522
|
seeSourceRepositoryUrl: this._projectConfig.github !== undefined ? this._projectConfig.github.url : realImportPath,
|
|
472
|
-
getLinkToSource:
|
|
523
|
+
getLinkToSource: getFullGithubLink.bind( this ),
|
|
473
524
|
docSearchConfig: getDocSearchConfig( this._docSearch, {
|
|
474
525
|
groups: this._groups,
|
|
475
526
|
slug: this._projectSlug,
|
|
@@ -498,7 +549,7 @@ module.exports = class ApiBuilder {
|
|
|
498
549
|
jobs.push(
|
|
499
550
|
pool.run( {
|
|
500
551
|
content: view.content,
|
|
501
|
-
navTreeHtml
|
|
552
|
+
navTreeHtml,
|
|
502
553
|
outputPath: upath.join( view.dirname, view.basename ),
|
|
503
554
|
themeDir: hexoManager.hexo.theme_dir
|
|
504
555
|
} )
|
|
@@ -3,16 +3,14 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import upath from 'upath';
|
|
8
|
+
import { parseDocument } from 'htmlparser2';
|
|
9
|
+
import render from 'dom-serializer';
|
|
10
|
+
import inlineSvg from '../../scripts/utils/inline-svg.cjs';
|
|
11
|
+
import spritesheetSvg from '../../scripts/utils/spritesheet-svg.cjs';
|
|
7
12
|
|
|
8
|
-
const
|
|
9
|
-
const upath = require( 'upath' );
|
|
10
|
-
const { parseDocument } = require( 'htmlparser2' );
|
|
11
|
-
const { default: render } = require( 'dom-serializer' );
|
|
12
|
-
const inlineSvg = require( '../../scripts/utils/inline-svg' );
|
|
13
|
-
const spritesheetSvg = require( '../../scripts/utils/spritesheet-svg' );
|
|
14
|
-
|
|
15
|
-
module.exports = function( {
|
|
13
|
+
export const buildPageWorker = function( {
|
|
16
14
|
content,
|
|
17
15
|
navTreeHtml,
|
|
18
16
|
outputPath,
|
|
@@ -33,3 +31,5 @@ module.exports = function( {
|
|
|
33
31
|
|
|
34
32
|
fs.writeFileSync( outputPath, content, 'utf-8' );
|
|
35
33
|
};
|
|
34
|
+
|
|
35
|
+
export default buildPageWorker;
|
|
@@ -3,19 +3,17 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const logCrossProjectReference = require( '../../../scripts/utils/logcrossprojectreference' );
|
|
18
|
-
const createPrerenderPugTemplate = require( '../../../scripts/utils/pug-renderer/create-prerender-pug-template' );
|
|
6
|
+
import { styleText } from 'node:util';
|
|
7
|
+
import { parseDocument } from 'htmlparser2';
|
|
8
|
+
import render from 'dom-serializer';
|
|
9
|
+
import { selectAll, selectOne } from 'css-select';
|
|
10
|
+
import { replaceElement, removeElement, appendChild } from 'domutils';
|
|
11
|
+
import { splitLongname } from '../../helpers/split-longname.js';
|
|
12
|
+
import { macroReplacer } from '../../tasks/macro-replacer.js';
|
|
13
|
+
import { findTargetDoclet } from '../utils/findtargetdoclet.js';
|
|
14
|
+
import { hasDedicatedApiPages, LONG_NAME_LABEL_REGEXP, LONG_NAME_MEMBER_SEPARATOR_REGEXP } from '../utils/utils.js';
|
|
15
|
+
import logCrossProjectReference from '../../../scripts/utils/logcrossprojectreference.cjs';
|
|
16
|
+
import createPrerenderPugTemplate from '../../../scripts/utils/pug-renderer/create-prerender-pug-template.cjs';
|
|
19
17
|
|
|
20
18
|
const renderCodeBlockPug = createPrerenderPugTemplate( {
|
|
21
19
|
requires: [
|
|
@@ -39,7 +37,7 @@ const renderCodeBlockPug = createPrerenderPugTemplate( {
|
|
|
39
37
|
* Class responsible for parsing doc descriptions.
|
|
40
38
|
* @type {DescriptionParser}
|
|
41
39
|
*/
|
|
42
|
-
|
|
40
|
+
export class DescriptionParser {
|
|
43
41
|
constructor( fileNameManager, dataCollection, { macrosVariables } = {} ) {
|
|
44
42
|
this._fileNameManager = fileNameManager;
|
|
45
43
|
this._dataCollection = dataCollection;
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const isNonEmptyArray = require( '../../helpers/is-non-empty-array' );
|
|
9
|
-
const splitLongname = require( '../../helpers/split-longname' );
|
|
6
|
+
import { isNonEmptyArray } from '../../helpers/is-non-empty-array.js';
|
|
7
|
+
import { splitLongname } from '../../helpers/split-longname.js';
|
|
10
8
|
|
|
11
9
|
/**
|
|
12
10
|
* Factory creating docs data to be used in templates.
|
|
@@ -14,7 +12,7 @@ const splitLongname = require( '../../helpers/split-longname' );
|
|
|
14
12
|
* For example data of a class has to include all properties, methods, etc.
|
|
15
13
|
* @type {DocDataFactory}
|
|
16
14
|
*/
|
|
17
|
-
|
|
15
|
+
export class DocDataFactory {
|
|
18
16
|
/**
|
|
19
17
|
* @param dataCollection
|
|
20
18
|
* @param descriptionParser
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const escapeLongname = require( '../../helpers/escape-longname' );
|
|
6
|
+
import { escapeLongname } from '../../helpers/escape-longname.js';
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
9
|
* Handles filenames of various entities. Makes sure filenames are unique and do not contain forbidden characters.
|
|
12
10
|
* Allows to get a filename for a doclet's longname.
|
|
13
11
|
*/
|
|
14
|
-
|
|
12
|
+
export class FileNameManager {
|
|
15
13
|
constructor() {
|
|
16
14
|
this.longnameToUrl = new Map();
|
|
17
15
|
this.fileNames = new Set();
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const upath = require( 'upath' );
|
|
6
|
+
import upath from 'upath';
|
|
9
7
|
|
|
10
8
|
/**
|
|
11
9
|
* Stores HTML rendered by a pug template.
|
|
12
10
|
* @type {module.HtmlFile}
|
|
13
11
|
*/
|
|
14
|
-
|
|
12
|
+
export class HtmlFile {
|
|
15
13
|
/**
|
|
16
14
|
* @param {String} content Content of the file.
|
|
17
15
|
* @param {String} pathToFile Path to the file.
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const Node = require( './tree-node' );
|
|
12
|
-
const fs = require( 'fs-extra' );
|
|
6
|
+
import upath from 'upath';
|
|
7
|
+
import { isNonEmptyArray } from '../../helpers/is-non-empty-array.js';
|
|
8
|
+
import TreeModel from 'tree-model';
|
|
9
|
+
import { Node } from './tree-node.js';
|
|
10
|
+
import fs from 'fs-extra';
|
|
13
11
|
|
|
14
12
|
const NODE_TYPES = {
|
|
15
13
|
ROOT: 'root',
|
|
@@ -38,7 +36,7 @@ const NODE_ORDER = {
|
|
|
38
36
|
* Creates a data structure representing API navigation tree.
|
|
39
37
|
* @type {module.NavigationTree}
|
|
40
38
|
*/
|
|
41
|
-
|
|
39
|
+
export class NavigationTree {
|
|
42
40
|
/**
|
|
43
41
|
* @param {String} rootPath Path of the root node.
|
|
44
42
|
* @param {Function} longnameToUrl Function returning a filename for a given longname.
|
|
@@ -267,7 +265,7 @@ module.exports = class NavigationTree {
|
|
|
267
265
|
return '';
|
|
268
266
|
}
|
|
269
267
|
|
|
270
|
-
const packageGuidePath = upath.
|
|
268
|
+
const packageGuidePath = upath.resolve(
|
|
271
269
|
that.projectRootPath,
|
|
272
270
|
packagePath.path,
|
|
273
271
|
'docs',
|
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* Tree node used by API navigation tree.
|
|
10
8
|
* @type {module.Node}
|
|
11
9
|
*/
|
|
12
|
-
|
|
10
|
+
export class Node {
|
|
13
11
|
/**
|
|
14
12
|
* @param {NODE_TYPES} type
|
|
15
13
|
* @param {String} name Name of the node. The name will be displayed to the user in a nav tree.
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
'use strict';
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* A helper function used for searching for a proper doclet structure when creating a link
|
|
10
8
|
* from a guide or an API page.
|
|
@@ -22,7 +20,7 @@
|
|
|
22
20
|
* @param {Boolean} [options.query.memberOnly=false]
|
|
23
21
|
* @returns {Object|null}
|
|
24
22
|
*/
|
|
25
|
-
|
|
23
|
+
export function findTargetDoclet( docletCollection, options ) {
|
|
26
24
|
const { module, structure, member, label, query } = options;
|
|
27
25
|
const { skipModule, memberOnly } = ( query || {} );
|
|
28
26
|
|