umberto 5.0.2 → 6.1.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 +20 -0
- package/README.md +9 -22
- package/package.json +1 -1
- package/scripts/filter/before-post-render/set-layout.js +9 -11
- package/scripts/utils/logcrossprojectreference.js +29 -0
- package/scripts/utils/parseicontag.js +6 -43
- package/scripts/utils/parselinks.js +27 -48
- package/src/api-builder/classes/description-parser.js +13 -5
- package/src/api-builder/classes/doc-data-factory.js +1 -1
- package/src/data-converter/converters/typedoc/typedocconverter.js +2 -2
- package/src/index.js +108 -146
- package/src/tasks/build-api-docs.js +4 -4
- package/src/tasks/build-documentation.js +9 -3
- package/src/tasks/build-sdk.js +25 -9
- package/src/tasks/copy-assets.js +9 -9
- package/src/tasks/create-sym-links.js +2 -3
- package/themes/umberto/layout/{404.pug → gloria/404.pug} +1 -1
- package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/class.pug +1 -1
- package/themes/umberto/layout/gloria/_api-docs/interface.pug +10 -0
- package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/mixin.pug +1 -1
- package/themes/umberto/layout/gloria/_api-docs/module.pug +10 -0
- package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/namespace.pug +1 -1
- package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/typedef.pug +1 -1
- package/themes/umberto/layout/{_partial → gloria/_partial}/gh-contribute.pug +2 -2
- package/themes/umberto/layout/{_partial → gloria/_partial}/head.pug +2 -2
- package/themes/umberto/layout/{_partial → gloria/_partial}/search-box.pug +1 -1
- package/themes/umberto/layout/{api.pug → gloria/api.pug} +1 -1
- package/themes/umberto/layout/{base.pug → gloria/base.pug} +1 -1
- package/themes/umberto/layout/{sdk.pug → gloria/sdk.pug} +1 -1
- package/themes/umberto/layout/umberto/404.pug +22 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_api-see-source.pug +11 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_api-title.pug +17 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_api-tree-item.pug +30 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_badge.pug +17 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_class-item.pug +29 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_dev-names.pug +9 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_error.pug +23 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_fires-item.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_hierarchy-item.pug +14 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_hierarchy-list.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_link-or-text.pug +43 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_method.pug +89 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_params.pug +44 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_property.pug +51 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_related.pug +8 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_return.pug +14 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_sidebox-list-item.pug +8 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_sidebox-list.pug +8 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/_type.pug +180 -0
- package/themes/umberto/layout/umberto/_api-docs/_mixin/type-parameter.pug +18 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/api-info-box.pug +30 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/api-subheader.pug +22 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/classes.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/config-options.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/constants.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/description.pug +9 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/events.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/filter.pug +40 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/functions.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/interfaces.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/loading-spinner.pug +2 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/methods.pug +19 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/namespaces.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/navtree.pug +13 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/properties.pug +19 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/type-parameters.pug +26 -0
- package/themes/umberto/layout/umberto/_api-docs/_partial/typedefs.pug +7 -0
- package/themes/umberto/layout/umberto/_api-docs/api-base.pug +45 -0
- package/themes/umberto/layout/{_api-docs/interface.pug → umberto/_api-docs/class.pug} +1 -1
- package/themes/umberto/layout/umberto/_api-docs/errors.pug +6 -0
- package/themes/umberto/layout/umberto/_api-docs/interface.pug +10 -0
- package/themes/umberto/layout/{_api-docs/module.pug → umberto/_api-docs/mixin.pug} +1 -1
- package/themes/umberto/layout/umberto/_api-docs/module.pug +10 -0
- package/themes/umberto/layout/umberto/_api-docs/namespace.pug +10 -0
- package/themes/umberto/layout/umberto/_api-docs/typedef.pug +37 -0
- package/themes/umberto/layout/umberto/_mixin/nav-tree-item.pug +13 -0
- package/themes/umberto/layout/umberto/_mixin/nav-tree-level.pug +38 -0
- package/themes/umberto/layout/umberto/_partial/docsearch.pug +21 -0
- package/themes/umberto/layout/umberto/_partial/dropdown.pug +12 -0
- package/themes/umberto/layout/umberto/_partial/feedback-widget.pug +20 -0
- package/themes/umberto/layout/umberto/_partial/footer.pug +6 -0
- package/themes/umberto/layout/umberto/_partial/gh-contribute.pug +8 -0
- package/themes/umberto/layout/umberto/_partial/google-analytics.pug +19 -0
- package/themes/umberto/layout/umberto/_partial/google-tag-manager.pug +18 -0
- package/themes/umberto/layout/umberto/_partial/head.pug +67 -0
- package/themes/umberto/layout/umberto/_partial/header.pug +64 -0
- package/themes/umberto/layout/umberto/_partial/nav-tree.pug +9 -0
- package/themes/umberto/layout/umberto/_partial/report-issue-widget.pug +26 -0
- package/themes/umberto/layout/umberto/_partial/rwd-breadcrumbs.pug +13 -0
- package/themes/umberto/layout/umberto/_partial/search-box.pug +6 -0
- package/themes/umberto/layout/umberto/_partial/vwo.pug +11 -0
- package/themes/umberto/layout/umberto/_sdk/_mixin/_sdk-sample-item.pug +5 -0
- package/themes/umberto/layout/umberto/_sdk/_mixin/_sdk-samples.pug +7 -0
- package/themes/umberto/layout/umberto/_sdk/_mixin/_sdk-tree-item.pug +7 -0
- package/themes/umberto/layout/umberto/_sdk/_mixin/_sdk-tree-level.pug +29 -0
- package/themes/umberto/layout/umberto/_sdk/_partial/navtree.pug +4 -0
- package/themes/umberto/layout/umberto/_sdk/page.pug +23 -0
- package/themes/umberto/layout/umberto/api.pug +27 -0
- package/themes/umberto/layout/umberto/base.pug +42 -0
- package/themes/umberto/layout/umberto/index.pug +17 -0
- package/themes/umberto/layout/umberto/page.pug +28 -0
- package/themes/umberto/layout/umberto/sdk.pug +29 -0
- package/themes/umberto/source/umberto/assets/_img/info-circle.svg +4 -0
- package/themes/umberto/source/umberto/assets/_img/triangle-right.svg +1 -0
- package/themes/umberto/src/umberto/css/_api-content.scss +32 -0
- package/themes/umberto/src/umberto/css/_api-info-box.scss +86 -0
- package/themes/umberto/src/umberto/css/_api-props-filter.scss +106 -0
- package/themes/umberto/src/umberto/css/_api-see-source.scss +35 -0
- package/themes/umberto/src/umberto/css/_api-subheader.scss +167 -0
- package/themes/umberto/src/umberto/css/_api-tree.scss +121 -0
- package/themes/umberto/src/umberto/css/_badge.scss +74 -0
- package/themes/umberto/src/umberto/css/_code-switcher.scss +61 -0
- package/themes/umberto/src/umberto/css/_collapsinglist.scss +262 -0
- package/themes/umberto/src/umberto/css/_content.scss +236 -0
- package/themes/umberto/src/umberto/css/_docsearch.scss +109 -0
- package/themes/umberto/src/umberto/css/_dropdown.scss +63 -0
- package/themes/umberto/src/umberto/css/_editor-icon.scss +26 -0
- package/themes/umberto/src/umberto/css/_feedback-widget.scss +11 -0
- package/themes/umberto/src/umberto/css/_font-external.scss +8 -0
- package/themes/umberto/src/umberto/css/_footer.scss +40 -0
- package/themes/umberto/src/umberto/css/_formatted.scss +285 -0
- package/themes/umberto/src/umberto/css/_guide-content.scss +37 -0
- package/themes/umberto/src/umberto/css/_guide-sdk-tree.scss +14 -0
- package/themes/umberto/src/umberto/css/_loading-spinner.scss +33 -0
- package/themes/umberto/src/umberto/css/_main.scss +59 -0
- package/themes/umberto/src/umberto/css/_navigation.scss +35 -0
- package/themes/umberto/src/umberto/css/_notice.scss +116 -0
- package/themes/umberto/src/umberto/css/_print.scss +20 -0
- package/themes/umberto/src/umberto/css/_prism.scss +223 -0
- package/themes/umberto/src/umberto/css/_rwd-breadcrumbs.scss +28 -0
- package/themes/umberto/src/umberto/css/_rwd-menu.scss +89 -0
- package/themes/umberto/src/umberto/css/_secondary-navigation.scss +152 -0
- package/themes/umberto/src/umberto/css/_theme-dark.scss +175 -0
- package/themes/umberto/src/umberto/css/_toggler.scss +46 -0
- package/themes/umberto/src/umberto/css/_top.scss +350 -0
- package/themes/umberto/src/umberto/css/_tree.scss +218 -0
- package/themes/umberto/src/umberto/css/_warning-banner.scss +46 -0
- package/themes/umberto/src/umberto/css/components/_lightbox.scss +12 -0
- package/themes/umberto/src/umberto/css/helpers/_color.scss +49 -0
- package/themes/umberto/src/umberto/css/helpers/_font.scss +60 -0
- package/themes/umberto/src/umberto/css/helpers/_globals.scss +129 -0
- package/themes/umberto/src/umberto/css/helpers/_reset.scss +52 -0
- package/themes/umberto/src/umberto/css/helpers/_spacing.scss +21 -0
- package/themes/umberto/src/umberto/css/pages/_sdk.scss +111 -0
- package/themes/umberto/src/umberto/css/styles.scss +117 -0
- package/themes/umberto/src/umberto/js/_anchors.js +57 -0
- package/themes/umberto/src/umberto/js/_apisearch.js +126 -0
- package/themes/umberto/src/umberto/js/_apitree.js +67 -0
- package/themes/umberto/src/umberto/js/_attachpermalinklistener.js +50 -0
- package/themes/umberto/src/umberto/js/_codeswitcherbuttons.js +146 -0
- package/themes/umberto/src/umberto/js/_collapsables.js +135 -0
- package/themes/umberto/src/umberto/js/_copymobileapinavigation.js +26 -0
- package/themes/umberto/src/umberto/js/_devnames.js +37 -0
- package/themes/umberto/src/umberto/js/_dropdowns.js +55 -0
- package/themes/umberto/src/umberto/js/_filtering.js +139 -0
- package/themes/umberto/src/umberto/js/_imageModal.js +16 -0
- package/themes/umberto/src/umberto/js/_pagenavigation.js +93 -0
- package/themes/umberto/src/umberto/js/_prism.js +104 -0
- package/themes/umberto/src/umberto/js/_rwdmenu.js +15 -0
- package/themes/umberto/src/umberto/js/_samplecode.js +23 -0
- package/themes/umberto/src/umberto/js/_sidenavigation.js +59 -0
- package/themes/umberto/src/umberto/js/_toc.js +93 -0
- package/themes/umberto/src/umberto/js/_tooltips.js +39 -0
- package/themes/umberto/src/umberto/js/_warningbanner.js +18 -0
- package/themes/umberto/src/umberto/js/app.js +70 -0
- package/themes/umberto/src/umberto/js/vendor/prism.js +45 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_api-see-source.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_api-title.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_api-tree-item.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_badge.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_class-item.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_dev-names.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_error.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_fires-item.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_hierarchy-item.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_hierarchy-list.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_link-or-text.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_method.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_params.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_property.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_related.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_return.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_sidebox-list-item.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_sidebox-list.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/_type.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_mixin/type-parameter.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/api-info-box.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/api-subheader.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/classes.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/config-options.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/constants.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/description.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/events.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/filter.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/functions.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/interfaces.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/loading-spinner.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/methods.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/namespaces.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/navtree.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/properties.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/type-parameters.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/_partial/typedefs.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/api-base.pug +0 -0
- /package/themes/umberto/layout/{_api-docs → gloria/_api-docs}/errors.pug +0 -0
- /package/themes/umberto/layout/{_mixin → gloria/_mixin}/nav-tree-item.pug +0 -0
- /package/themes/umberto/layout/{_mixin → gloria/_mixin}/nav-tree-level.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/docsearch.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/dropdown.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/feedback-widget.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/footer.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/google-analytics.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/google-tag-manager.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/header.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/nav-tree.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/report-issue-widget.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/rwd-breadcrumbs.pug +0 -0
- /package/themes/umberto/layout/{_partial → gloria/_partial}/vwo.pug +0 -0
- /package/themes/umberto/layout/{_sdk → gloria/_sdk}/_mixin/_sdk-sample-item.pug +0 -0
- /package/themes/umberto/layout/{_sdk → gloria/_sdk}/_mixin/_sdk-samples.pug +0 -0
- /package/themes/umberto/layout/{_sdk → gloria/_sdk}/_mixin/_sdk-tree-item.pug +0 -0
- /package/themes/umberto/layout/{_sdk → gloria/_sdk}/_mixin/_sdk-tree-level.pug +0 -0
- /package/themes/umberto/layout/{_sdk → gloria/_sdk}/_partial/navtree.pug +0 -0
- /package/themes/umberto/layout/{_sdk → gloria/_sdk}/page.pug +0 -0
- /package/themes/umberto/layout/{index.pug → gloria/index.pug} +0 -0
- /package/themes/umberto/layout/{page.pug → gloria/page.pug} +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/arrows.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/book.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/box-brown.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/box-orange.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/box-red.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/bulb.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/clipboard.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/cog.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/data.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/documentation.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/download.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/edit.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/exclamation-circle.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/eye.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/filter.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/filtering.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/folder.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/github.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/header-info-configs.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/header-info-events.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/header-info-methods.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/header-info-properties.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/heart.svg +0 -0
- /package/themes/umberto/source/{assets → gloria/assets}/_img/info-circle.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/info.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/list-nest.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/loupe.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/menu.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/plug.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/star-in-circle.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/tick.svg +0 -0
- /package/themes/{nova/source → umberto/source/gloria}/assets/_img/triangle-down.svg +0 -0
- /package/themes/umberto/source/{assets → gloria/assets}/_img/triangle-right.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/arrows.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/book.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/box-brown.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/box-orange.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/box-red.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/bulb.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/clipboard.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/cog.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/data.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/documentation.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/download.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/edit.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/exclamation-circle.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/eye.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/filter.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/filtering.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/folder.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/github.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/header-info-configs.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/header-info-events.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/header-info-methods.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/header-info-properties.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/heart.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/info.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/list-nest.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/loupe.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/menu.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/plug.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/star-in-circle.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/tick.svg +0 -0
- /package/themes/umberto/source/{assets → umberto/assets}/_img/triangle-down.svg +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_api-content.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_api-info-box.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_api-props-filter.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_api-see-source.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_api-subheader.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_api-tree.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_badge.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_code-switcher.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_collapsinglist.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_content.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_docsearch.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_dropdown.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_editor-icon.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_feedback-widget.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_font-external.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_footer.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_formatted.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_guide-content.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_guide-sdk-tree.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_loading-spinner.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_main.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_navigation.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_notice.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_print.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_prism.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_rwd-breadcrumbs.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_rwd-menu.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_secondary-navigation.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_theme-dark.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_toggler.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_top.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_tree.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/_warning-banner.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/components/_lightbox.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/helpers/_color.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/helpers/_font.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/helpers/_globals.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/helpers/_reset.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/helpers/_spacing.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/pages/_sdk.scss +0 -0
- /package/themes/umberto/src/{css → gloria/css}/styles.scss +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_anchors.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_apisearch.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_apitree.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_attachpermalinklistener.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_codeswitcherbuttons.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_collapsables.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_copymobileapinavigation.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_devnames.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_dropdowns.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_filtering.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_imageModal.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_pagenavigation.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_prism.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_rwdmenu.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_samplecode.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_sidenavigation.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_toc.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_tooltips.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/_warningbanner.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/app.js +0 -0
- /package/themes/umberto/src/{js → gloria/js}/vendor/prism.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [6.1.0](https://github.com/cksource/umberto/compare/v6.0.0...v6.1.0) (2025-04-15)
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Added the `skipSitemap` (for ignoring generating the sitemap) and `skipThemes` (for skipping preparing assets) flags. ([commit](https://github.com/cksource/umberto/commit/8ec19222e970d2f68ace87a108ead619827124f0))
|
|
9
|
+
* Ability to define a theme per project. Closes [#1242](https://github.com/cksource/umberto/issues/1242). ([commit](https://github.com/cksource/umberto/commit/3bec129a57e224f574674543d9224bda55d1e081))
|
|
10
|
+
* Use the provided `mainConfig` if available when creating symlinks. ([commit](https://github.com/cksource/umberto/commit/5b61d25ff96cbc0cdce7dc5a218e1ab6ca544189))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [6.0.0](https://github.com/cksource/umberto/compare/v5.0.2...v6.0.0) (2025-04-01)
|
|
14
|
+
|
|
15
|
+
### BREAKING CHANGES
|
|
16
|
+
|
|
17
|
+
* The support for cross-project links in all tags (all variants of the `@link`, `@glink` and `@icon` tags) is now dropped. In case you want to insert a link to another project, use Markdown syntax (`[link text](link target)`) or a regular HTML `<a>` tag.
|
|
18
|
+
|
|
19
|
+
### Other changes
|
|
20
|
+
|
|
21
|
+
* Cross-project links in `@link` (and all its variants), `@glink` and `@icon` tags are no longer supported. When detected, error message is printed in the console. Closes [#1243](https://github.com/cksource/umberto/issues/1243). ([commit](https://github.com/cksource/umberto/commit/0929fafee7e770a618496bd1ad43abac280d58c6))
|
|
22
|
+
|
|
23
|
+
|
|
4
24
|
## [5.0.2](https://github.com/cksource/umberto/compare/v5.0.1...v5.0.2) (2025-03-24)
|
|
5
25
|
|
|
6
26
|
### Bug fixes
|
package/README.md
CHANGED
|
@@ -163,6 +163,8 @@ Sample documentation setup for the example above:
|
|
|
163
163
|
`require ( 'umberto' ).buildSingleProject( options )`
|
|
164
164
|
|
|
165
165
|
* `skipApi` - skip building API docs,
|
|
166
|
+
* `skipSitemap` - skip building sitemap file,
|
|
167
|
+
* `skipThemes` - skip building themes,
|
|
166
168
|
* `skipValidation` - skip links validation,
|
|
167
169
|
* `skipLivesSnippets` - skip building live code samples,
|
|
168
170
|
* `snippetOptions` - options object passed to snippetAdapter building live code samples,
|
|
@@ -254,6 +256,7 @@ Every guide should have a front-matter at the top, which looks like this:
|
|
|
254
256
|
|
|
255
257
|
```
|
|
256
258
|
---
|
|
259
|
+
layout: page [optional]
|
|
257
260
|
category: builds-guides
|
|
258
261
|
title: Overview [optional]
|
|
259
262
|
slug: overview [optional]
|
|
@@ -338,13 +341,13 @@ Tags are strings which can be used in guides and are replaced by Umberto with ge
|
|
|
338
341
|
Syntax:
|
|
339
342
|
|
|
340
343
|
```
|
|
341
|
-
{@link
|
|
344
|
+
{@link longname linkText}
|
|
342
345
|
```
|
|
343
346
|
|
|
344
347
|
Example:
|
|
345
348
|
|
|
346
349
|
```
|
|
347
|
-
{@link
|
|
350
|
+
{@link module:ui/template~Template#render Render method}
|
|
348
351
|
```
|
|
349
352
|
|
|
350
353
|
**Note:** If `longname` doesn't start with `module:`, please use `@linkapi` instead of `@link`.
|
|
@@ -357,9 +360,7 @@ Example links for CKEditor 4:
|
|
|
357
360
|
|
|
358
361
|
`{@linkapi CKEDITOR.dialog.definition#resizable resizable}` -> https://docs.ckeditor.com/ckeditor4/latest/api/CKEDITOR_dialog_definition.html#resizable
|
|
359
362
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
It is optional and must be used only if creating a link to other project's API (in case of a multi-project documentation).
|
|
363
|
+
**Important:** Cross-project links `{@link @projectName longname linkText}` are no longer supported.
|
|
363
364
|
|
|
364
365
|
##### longname
|
|
365
366
|
|
|
@@ -426,28 +427,12 @@ A link to https://github.com/ckeditor/ckeditor5/blob/master/docs/builds/guides/o
|
|
|
426
427
|
{@link builds/guides/overview Builds overview}
|
|
427
428
|
```
|
|
428
429
|
|
|
429
|
-
In order to link to a guide of another project please follow this syntax:
|
|
430
|
-
|
|
431
|
-
```
|
|
432
|
-
{@link @projectslug pathToGuide linkText}
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
where `@projectslug` is the slug of another project and can be find in the project's `umberto.json`
|
|
436
|
-
|
|
437
|
-
Example:
|
|
438
|
-
|
|
439
|
-
```
|
|
440
|
-
{@link @letters index Home page of Letters}
|
|
441
|
-
```
|
|
442
|
-
|
|
443
430
|
**Note:** It is possible to link to a guide from a JSDoc comment using `{@glink}` tag (so that Umberto can distinguish it from a regular JSDoc's `{@link}` tag):
|
|
444
431
|
|
|
445
432
|
```
|
|
446
|
-
{@glink
|
|
433
|
+
{@glink finalPathToGuide linkText}
|
|
447
434
|
```
|
|
448
435
|
|
|
449
|
-
where `@projectslug` is the slug of another project and can be find in the project's `umberto.json`. This parameter is optional.
|
|
450
|
-
|
|
451
436
|
**Important:** In this case `finalPathToGuide` **must be** a guide's final URL. Final URL may be different than guide's physical path (usually it's the same though)
|
|
452
437
|
|
|
453
438
|
Example:
|
|
@@ -456,6 +441,8 @@ Example:
|
|
|
456
441
|
{@glink builds/guides/migrate Migration guide}
|
|
457
442
|
```
|
|
458
443
|
|
|
444
|
+
**Important:** Cross-project links (`{@link @projectName pathToGuide linkText}` or `{@glink @projectName finalPathToGuide linkText}`) are no longer supported.
|
|
445
|
+
|
|
459
446
|
#### Links escaping
|
|
460
447
|
|
|
461
448
|
Umberto allows on link escaping, when curly brackets are preceed with backslash.
|
package/package.json
CHANGED
|
@@ -10,19 +10,17 @@
|
|
|
10
10
|
* page.layout indicates the template which should be used to render the page.
|
|
11
11
|
*/
|
|
12
12
|
hexo.extend.filter.register( 'before_post_render', page => {
|
|
13
|
-
|
|
13
|
+
const theme = page.projectName === 'ckeditor4' ? 'umberto' : 'gloria';
|
|
14
|
+
|
|
14
15
|
if ( page.category === 'api-reference' ) {
|
|
15
|
-
page.layout = 'api';
|
|
16
|
+
page.layout = theme + '/api';
|
|
16
17
|
page.isApi = true;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if ( page.category === 'sdk' ) {
|
|
20
|
-
page.layout = 'sdk';
|
|
18
|
+
} else if ( page.category === 'sdk' ) {
|
|
19
|
+
page.layout = theme + '/sdk';
|
|
21
20
|
page.isSdk = true;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
page.layout = 'index';
|
|
21
|
+
} else if ( page.path === 'index.html' ) {
|
|
22
|
+
page.layout = theme + '/index';
|
|
23
|
+
} else {
|
|
24
|
+
page.layout = theme + '/' + page.layout;
|
|
27
25
|
}
|
|
28
26
|
} );
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const chalk = require( 'chalk' );
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Logs an error message about a cross-project reference found in the parsed expression.
|
|
12
|
+
* See: https://github.com/cksource/umberto/issues/1243.
|
|
13
|
+
*
|
|
14
|
+
* @param {Object} data
|
|
15
|
+
* @param {String} data.expression
|
|
16
|
+
* @param {String} [data.source]
|
|
17
|
+
* @returns {String}
|
|
18
|
+
*/
|
|
19
|
+
module.exports = function logCrossProjectReference( { expression, source } ) {
|
|
20
|
+
process.exitCode = 1;
|
|
21
|
+
|
|
22
|
+
const message = `${ chalk.red( 'Error:' ) } Failed while convert ${ chalk.cyanBright( expression ) } tag`;
|
|
23
|
+
const messageLocation = source ? ` in ${ chalk.magentaBright( source ) }.` : '.';
|
|
24
|
+
const messageDescription = ' Cross-project references are not supported.';
|
|
25
|
+
|
|
26
|
+
console.log( message + messageLocation + messageDescription );
|
|
27
|
+
|
|
28
|
+
return expression;
|
|
29
|
+
};
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
const crypto = require( 'crypto' );
|
|
9
9
|
const upath = require( 'upath' );
|
|
10
|
+
const logCrossProjectReference = require( './logcrossprojectreference' );
|
|
10
11
|
|
|
11
12
|
const ICON_REGEXP = /\\?{@icon(?:\s+@(\w+))?\s+([^}\s]+)\s*([^}]*)\\?}/g;
|
|
12
13
|
|
|
@@ -21,26 +22,18 @@ const ICON_REGEXP = /\\?{@icon(?:\s+@(\w+))?\s+([^}\s]+)\s*([^}]*)\\?}/g;
|
|
|
21
22
|
*/
|
|
22
23
|
module.exports = function parseIconTag( page, hexo ) {
|
|
23
24
|
const relativeUrlHelper = hexo.extend.helper.store.relative_url;
|
|
24
|
-
const availableProjects = Object.keys( hexo.projectGlobals ).filter( projectName => projectName !== 'common' );
|
|
25
25
|
|
|
26
26
|
page.content = page.content.replace( ICON_REGEXP, ( match, iconProject, iconPath, alternativeText ) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
iconProject,
|
|
31
|
-
availableProjects
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
if ( !shouldTransformIcon( options ) ) {
|
|
35
|
-
return match;
|
|
27
|
+
// Cross project references are not supported.
|
|
28
|
+
if ( iconProject ) {
|
|
29
|
+
return logCrossProjectReference( { expression: match, source: page.source } );
|
|
36
30
|
}
|
|
37
31
|
|
|
38
32
|
if ( match.startsWith( '\\{' ) ) {
|
|
39
33
|
return match.replace( /^\\{/, '{' ).replace( /\\}$/, '}' );
|
|
40
34
|
}
|
|
41
35
|
|
|
42
|
-
const
|
|
43
|
-
const projectDetails = hexo.projectGlobals[ projectName ];
|
|
36
|
+
const projectDetails = hexo.projectGlobals[ page.projectName ];
|
|
44
37
|
const fileName = sha1( iconPath ).substr( 0, 10 ) + upath.extname( iconPath );
|
|
45
38
|
|
|
46
39
|
// Map the original file name with the hashed version to predict the path when copying assets.
|
|
@@ -52,7 +45,7 @@ module.exports = function parseIconTag( page, hexo ) {
|
|
|
52
45
|
alt = `alt="${ alternativeText }" `;
|
|
53
46
|
}
|
|
54
47
|
|
|
55
|
-
const absoluteLikePath = upath.join( projectName, projectDetails.config.version, 'assets', 'icons', fileName );
|
|
48
|
+
const absoluteLikePath = upath.join( page.projectName, projectDetails.config.version, 'assets', 'icons', fileName );
|
|
56
49
|
|
|
57
50
|
return [
|
|
58
51
|
'<span class="editor-icon">' +
|
|
@@ -64,36 +57,6 @@ module.exports = function parseIconTag( page, hexo ) {
|
|
|
64
57
|
return page;
|
|
65
58
|
};
|
|
66
59
|
|
|
67
|
-
/**
|
|
68
|
-
* Checks whether the `{@icon}` expression should be transformed to proper `<img>` tag.
|
|
69
|
-
*
|
|
70
|
-
* @param {Object} options
|
|
71
|
-
* @param {Boolean} options.isSingleProject Whether building for a single project.
|
|
72
|
-
* @param {String} options.pageProject The project of the current processed page.
|
|
73
|
-
* @param {String} options.iconProject The project specified in the `{@icon}` expression.
|
|
74
|
-
* @param {Array.<String>} options.availableProjects Available projects when building the non-single project documentation.
|
|
75
|
-
* @return {Boolean}
|
|
76
|
-
*/
|
|
77
|
-
function shouldTransformIcon( options ) {
|
|
78
|
-
// {@icon path} - missing the @projectName part.
|
|
79
|
-
// Assuming, that loading an icon for the page's project.
|
|
80
|
-
if ( !options.iconProject ) {
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Building a page that belongs to the same project as specified in the icon.
|
|
85
|
-
if ( options.iconProject === options.pageProject ) {
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Building many projects. Check whether the project exists.
|
|
90
|
-
if ( !options.isSingleProject && options.availableProjects.includes( options.iconProject ) ) {
|
|
91
|
-
return true;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return false;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
60
|
/**
|
|
98
61
|
* @param {String} value
|
|
99
62
|
* @return {String}
|
|
@@ -13,6 +13,7 @@ const LINK_REGEXP = /\\?{(?:@linkapi|@link|@linksdk|@linkexample)\s+[^{]+?({[^}]
|
|
|
13
13
|
|
|
14
14
|
const findTargetDoclet = require( '../../src/api-builder/utils/findtargetdoclet' );
|
|
15
15
|
const { hasDedicatedApiPages, LONG_NAME_LABEL_REGEXP } = require( '../../src/api-builder/utils/utils' );
|
|
16
|
+
const logCrossProjectReference = require( './logcrossprojectreference' );
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Converts @link or @linkapi tags into working links to guides or API docs.
|
|
@@ -70,7 +71,13 @@ function linkToApi( str, data, hexo, { relativeUrlHelper, isSilentError } ) {
|
|
|
70
71
|
} );
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
const projectName = linkContentMatchResult[ 1 ]
|
|
74
|
+
const projectName = linkContentMatchResult[ 1 ];
|
|
75
|
+
|
|
76
|
+
// Cross project references are not supported.
|
|
77
|
+
if ( projectName ) {
|
|
78
|
+
return logCrossProjectReference( { expression: str, source: data.source } );
|
|
79
|
+
}
|
|
80
|
+
|
|
74
81
|
const { name, label } = splitLongname( linkContentMatchResult[ 2 ] );
|
|
75
82
|
const itemName = linkContentMatchResult[ 2 ].replace( LONG_NAME_LABEL_REGEXP, '' );
|
|
76
83
|
let linkText = linkContentMatchResult[ 3 ] || name;
|
|
@@ -92,7 +99,7 @@ function linkToApi( str, data, hexo, { relativeUrlHelper, isSilentError } ) {
|
|
|
92
99
|
const baseItemName = getBaseItemName( itemName );
|
|
93
100
|
let hashWithoutPrefix = itemName.replace( baseItemName, '' ).slice( 1 );
|
|
94
101
|
const hash = hashWithoutPrefix ? `#${ hashWithoutPrefix }` : '';
|
|
95
|
-
const project = hexo.projectGlobals[ projectName ];
|
|
102
|
+
const project = hexo.projectGlobals[ data.projectName ];
|
|
96
103
|
|
|
97
104
|
if ( hashWithoutPrefix.includes( '-' ) ) {
|
|
98
105
|
let [ type, description ] = hashWithoutPrefix.split( '-' );
|
|
@@ -113,18 +120,18 @@ function linkToApi( str, data, hexo, { relativeUrlHelper, isSilentError } ) {
|
|
|
113
120
|
|
|
114
121
|
if ( project && project.config ) {
|
|
115
122
|
apiSlug = getSlug( project.config, 'api-reference' ) || 'api-reference';
|
|
116
|
-
} else if ( isIgnoredProject( projectName, hexo ) || hexo.projectGlobals.common.isSingleProject ) {
|
|
123
|
+
} else if ( isIgnoredProject( data.projectName, hexo ) || hexo.projectGlobals.common.isSingleProject ) {
|
|
117
124
|
return str;
|
|
118
125
|
} else {
|
|
119
126
|
return onError( {
|
|
120
127
|
value: str,
|
|
121
128
|
source: data.source,
|
|
122
129
|
isSilent: isSilentError,
|
|
123
|
-
description: `Project ${ chalk.redBright( projectName ) } is not defined.`
|
|
130
|
+
description: `Project ${ chalk.redBright( data.projectName ) } is not defined.`
|
|
124
131
|
} );
|
|
125
132
|
}
|
|
126
133
|
|
|
127
|
-
const basePath =
|
|
134
|
+
const basePath = data.BASE_PATH;
|
|
128
135
|
const fileName = getFileName( baseItemName );
|
|
129
136
|
|
|
130
137
|
let href = relativeUrlHelper( data.path, upath.join( basePath, apiSlug, fileName + hash ) );
|
|
@@ -236,9 +243,15 @@ function linkToSdk( str, data, hexo, { relativeUrlHelper, isSilentError } ) {
|
|
|
236
243
|
} );
|
|
237
244
|
}
|
|
238
245
|
|
|
239
|
-
const projectName = match[ 1 ]
|
|
240
|
-
|
|
241
|
-
|
|
246
|
+
const projectName = match[ 1 ];
|
|
247
|
+
|
|
248
|
+
// Cross project references are not supported.
|
|
249
|
+
if ( projectName ) {
|
|
250
|
+
return logCrossProjectReference( { expression: str, source: data.source } );
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
const sdkSlug = getSlug( hexo.projectGlobals[ data.projectName ].config, 'sdk' );
|
|
254
|
+
const basePath = data.BASE_PATH;
|
|
242
255
|
const sdkFileName = match[ 2 ];
|
|
243
256
|
const sdkFileHash = match[ 3 ] || '';
|
|
244
257
|
const sdkLinkName = match[ 4 ];
|
|
@@ -271,23 +284,15 @@ function linkToGuide( str, data, hexo, { relativeUrlHelper, isSilentError } ) {
|
|
|
271
284
|
const pathToGuide = pathToGuideSplit[ 0 ];
|
|
272
285
|
const hash = pathToGuideSplit.length > 1 ? `#${ pathToGuideSplit[ 1 ] }` : '';
|
|
273
286
|
const linkText = match[ 3 ] ? match[ 3 ] : pathToGuide;
|
|
274
|
-
const projectName = match[ 1 ]
|
|
275
|
-
const pagePaths = hexo.projectGlobals[ projectName ] ? hexo.projectGlobals[ projectName ].pagePaths : null;
|
|
287
|
+
const projectName = match[ 1 ];
|
|
276
288
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
return onError( {
|
|
283
|
-
value: str,
|
|
284
|
-
source: data.source,
|
|
285
|
-
isSilent: isSilentError,
|
|
286
|
-
description: `Project ${ chalk.redBright( projectName ) } is not defined.`
|
|
287
|
-
} );
|
|
289
|
+
// Cross project references are not supported.
|
|
290
|
+
if ( projectName ) {
|
|
291
|
+
return logCrossProjectReference( { expression: str, source: data.source } );
|
|
288
292
|
}
|
|
289
293
|
|
|
290
|
-
const
|
|
294
|
+
const pagePaths = hexo.projectGlobals[ data.projectName ] ? hexo.projectGlobals[ data.projectName ].pagePaths : null;
|
|
295
|
+
const projectBasePath = data.BASE_PATH;
|
|
291
296
|
|
|
292
297
|
let targetPath;
|
|
293
298
|
|
|
@@ -360,29 +365,3 @@ function getSlug( config, name ) {
|
|
|
360
365
|
|
|
361
366
|
return null;
|
|
362
367
|
}
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* When linking to an external project and the documentation is being built for a single project, the link should remain untouched.
|
|
366
|
-
*
|
|
367
|
-
* However, if the link points to the same project, let's transform it. See #914.
|
|
368
|
-
*
|
|
369
|
-
* @param {Object} match
|
|
370
|
-
* @param {Object} page
|
|
371
|
-
* @param {String} projectName
|
|
372
|
-
* @param {Object} hexo
|
|
373
|
-
* @return {Boolean}
|
|
374
|
-
*/
|
|
375
|
-
function shouldIgnoreGuideLink( match, page, projectName, hexo ) {
|
|
376
|
-
// If the project `{@link @projectName ...}` is not specified, the URL should be transformed.
|
|
377
|
-
if ( !match[ 1 ] ) {
|
|
378
|
-
return false;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// Also, if the `page` belongs to the same project as `@projectName`, the link should be transformed.
|
|
382
|
-
if ( match[ 1 ] === page.projectName ) {
|
|
383
|
-
return false;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
// Building the single project or the project does not exist. Do not transform links.
|
|
387
|
-
return ( hexo.projectGlobals.common.isSingleProject || !hexo.projectGlobals[ projectName ] );
|
|
388
|
-
}
|
|
@@ -11,6 +11,7 @@ const chalk = require( 'chalk' );
|
|
|
11
11
|
const macroReplacer = require( '../../tasks/macro-replacer' );
|
|
12
12
|
const findTargetDoclet = require( '../utils/findtargetdoclet' );
|
|
13
13
|
const { hasDedicatedApiPages, LONG_NAME_LABEL_REGEXP, LONG_NAME_MEMBER_SEPARATOR_REGEXP } = require( '../utils/utils' );
|
|
14
|
+
const logCrossProjectReference = require( '../../../scripts/utils/logcrossprojectreference' );
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* Class responsible for parsing doc descriptions.
|
|
@@ -83,20 +84,27 @@ module.exports = class DescriptionParser {
|
|
|
83
84
|
return result;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
let match
|
|
87
|
+
let match;
|
|
87
88
|
|
|
88
|
-
while ( match !== null ) {
|
|
89
|
+
while ( ( match = guideLinkRegExp.exec( str ) ) !== null ) {
|
|
89
90
|
const detailedRegExp = /@glink\s+(?:@(\w+)\s+)?([^}\s]+)\s*([^}]*)}/;
|
|
90
91
|
const detailedMatch = detailedRegExp.exec( match[ 0 ] );
|
|
91
|
-
const projectSlug = detailedMatch[ 1 ]
|
|
92
|
+
const projectSlug = detailedMatch[ 1 ];
|
|
93
|
+
|
|
94
|
+
// Cross project references are not supported.
|
|
95
|
+
if ( projectSlug ) {
|
|
96
|
+
logCrossProjectReference( { expression: match[ 0 ] } );
|
|
97
|
+
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
|
|
92
101
|
const pathToGuideSplit = detailedMatch[ 2 ].split( '#' );
|
|
93
102
|
const pathToGuide = pathToGuideSplit[ 0 ];
|
|
94
103
|
const hash = pathToGuideSplit.length > 1 ? `#${ pathToGuideSplit[ 1 ] }` : '';
|
|
95
104
|
const linkText = detailedMatch[ 3 ] ? detailedMatch[ 3 ] : pathToGuide;
|
|
96
|
-
const href =
|
|
105
|
+
const href = `../${ pathToGuide }.html`;
|
|
97
106
|
|
|
98
107
|
result = result.replace( match[ 0 ], `<a href=${ href }${ hash } data-glink>${ linkText }</a>` );
|
|
99
|
-
match = guideLinkRegExp.exec( str );
|
|
100
108
|
}
|
|
101
109
|
|
|
102
110
|
return result;
|
|
@@ -784,7 +784,7 @@ function sorter( a, b ) {
|
|
|
784
784
|
/**
|
|
785
785
|
* This is a JavaScript version of the `renderInlineFunction()` pug mixin.
|
|
786
786
|
*
|
|
787
|
-
* See: themes/umberto
|
|
787
|
+
* See: `themes/umberto/<theme name>/layout/_api-docs/_mixin/_type.pug`.
|
|
788
788
|
*
|
|
789
789
|
* The goal is to render an inline object describing a callable type.
|
|
790
790
|
*
|
|
@@ -462,7 +462,7 @@ class TypeConverter {
|
|
|
462
462
|
* The returned object contains a `value` property which must be an array.
|
|
463
463
|
* Thanks to that, it can be pass through the `type()` mixin.
|
|
464
464
|
*
|
|
465
|
-
* See: `themes/umberto
|
|
465
|
+
* See: `themes/umberto/<theme name>/layout/_api-docs/_mixin/_type.pug`.
|
|
466
466
|
*
|
|
467
467
|
* @param {Array.<TypedocReflectionTypeParameter>|null} parameters
|
|
468
468
|
* @returns {Array.<Object>|null}
|
|
@@ -641,7 +641,7 @@ class TypeConverter {
|
|
|
641
641
|
// See the `TypedocTypeDetails` type in the `typedoc.ts` file for checking the supported types.
|
|
642
642
|
//
|
|
643
643
|
// Results of this function is processed by Pug.
|
|
644
|
-
// See: `themes/umberto
|
|
644
|
+
// See: `themes/umberto/<theme name>/layout/_api-docs/_mixin/_type.pug`.
|
|
645
645
|
//
|
|
646
646
|
// When introducing support for more TypeScript constructions,
|
|
647
647
|
// consider introducing a new structure that contains an opening symbol,
|