umberto 9.4.0 → 10.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 -20
- package/LICENSE.md +0 -44
- package/README.md +0 -1
- package/hexo-config.json +2 -1
- package/hexo-shim.js +2 -2
- package/package.json +4 -11
- 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} +7 -6
- 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/{normalizebadges.js → normalizebadges.cjs} +4 -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/layout/gloria/_components/callout/_style.scss +4 -0
- package/themes/umberto/layout/gloria/_components/callout/index.pug +6 -0
- package/themes/umberto/src/gloria/css/a11y/_mixins.scss +5 -1
- 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/{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
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [10.1.0](https://github.com/cksource/umberto/compare/v10.0.0...v10.1.0) (March 4, 2026)
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* Add support for experimental features in the callout component and in the badges normalization script.
|
|
9
|
+
|
|
10
|
+
### Bug fixes
|
|
11
|
+
|
|
12
|
+
* Fixed the deprecation warning regarding the `Sass if() syntax` thrown during building docs.
|
|
13
|
+
* Disabled inserting a space between the anchor link and heading when converting a document from Markdown to HTML.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [10.0.0](https://github.com/cksource/umberto/compare/v9.4.0...v10.0.0) (February 16, 2026)
|
|
17
|
+
|
|
18
|
+
### BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
* Migrate the package to [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules).
|
|
21
|
+
* Remove the `validateW3C` option.
|
|
22
|
+
|
|
23
|
+
|
|
4
24
|
## [9.4.0](https://github.com/cksource/umberto/compare/v9.3.0...v9.4.0) (February 2, 2026)
|
|
5
25
|
|
|
6
26
|
### Features
|
|
@@ -43,26 +63,6 @@ Changelog
|
|
|
43
63
|
* Fix crashes of Table of Contents on some pages where headings are not placed in expected HTML structure.
|
|
44
64
|
* No longer stop building of the document when invalid links are found during link validation if some parts of the documentation are skipped (API, SDK, Guides).
|
|
45
65
|
|
|
46
|
-
|
|
47
|
-
## [9.1.3](https://github.com/cksource/umberto/compare/v9.1.2...v9.1.3) (December 19, 2025)
|
|
48
|
-
|
|
49
|
-
### Bug fixes
|
|
50
|
-
|
|
51
|
-
* Fixed the conflict where typing the forward slash in the Kapa widget would trigger the Algolia search.
|
|
52
|
-
|
|
53
|
-
### Other changes
|
|
54
|
-
|
|
55
|
-
* Added CKBox (`CKBOX_VERSION`) and CKEditor 5 (`CKEDITOR_VERSION`) versions to events sent to Sentry integration.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## [9.1.2](https://github.com/cksource/umberto/compare/v9.1.1...v9.1.2) (December 8, 2025)
|
|
59
|
-
|
|
60
|
-
### Bug fixes
|
|
61
|
-
|
|
62
|
-
* Fix a race condition in the Tooltip/Popover component between `createTooltipPopover` and `TooltipPopover.attach` that could cause duplicate initialization. Tooltips now initialize only once per element and more reliably detect when trigger elements have been detached.
|
|
63
|
-
* Minification should preserve closing tags and output spec-compliant HTML.
|
|
64
|
-
* Fix encoding of SDK sources.
|
|
65
|
-
|
|
66
66
|
---
|
|
67
67
|
|
|
68
68
|
To see all releases, visit the [release page](https://github.com/cksource/umberto/releases).
|
package/LICENSE.md
CHANGED
|
@@ -9,47 +9,3 @@ Sources of Intellectual Property Included in Umberto
|
|
|
9
9
|
-----------------------------------------------------
|
|
10
10
|
|
|
11
11
|
Where not otherwise indicated, all Umberto content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, Umberto will incorporate work done by developers outside of CKSource with their express permission.
|
|
12
|
-
|
|
13
|
-
The following libraries are included in Umberto under the [MIT license](https://opensource.org/licenses/MIT):
|
|
14
|
-
|
|
15
|
-
* @babel/core - Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
|
16
|
-
* @babel/preset-env - Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
|
17
|
-
* babel-loader - Copyright (c) 2014-2019 Luís Couto <hello@luiscouto.pt>
|
|
18
|
-
* cheerio - Copyright (c) 2022 The Cheerio contributors
|
|
19
|
-
* escape-string-regexp - Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
20
|
-
* fs-extra - Copyright (c) 2011-2024 JP Richardson
|
|
21
|
-
* hexo - Copyright (c) 2012-present Tommy Chen
|
|
22
|
-
* hexo-generator-archive - Copyright (c) 2014 Tommy Chen
|
|
23
|
-
* hexo-generator-category - Copyright (c) 2014 Tommy Chen
|
|
24
|
-
* hexo-generator-index - Copyright (c) 2014 Tommy Chen
|
|
25
|
-
* hexo-generator-tag - Copyright (c) 2014 Tommy Chen
|
|
26
|
-
* hexo-renderer-pug - Copyright (c) 2012 Tommy Chen
|
|
27
|
-
* hexo-renderer-markdown-it-plus - Copyright (c) 2017 CHENXCHEN
|
|
28
|
-
* htmlparser2 - Copyright 2010, 2011, Chris Winberry <chris@winberry.net>
|
|
29
|
-
* javascript-stringify - Copyright (c) 2013 Blake Embrey (hello@blakeembrey.com)
|
|
30
|
-
* jquery - Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
|
31
|
-
* js-beautify - Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.
|
|
32
|
-
* lodash - Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
33
|
-
* markdown-it - Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
|
|
34
|
-
* markdown-it-toc-and-anchor - Copyright (c) 2015 Maxime Thirouin
|
|
35
|
-
* medium-zoom - Copyright (c) 2016-present François Chalifour
|
|
36
|
-
* moment - Copyright (c) JS Foundation and other contributors
|
|
37
|
-
* pug - Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
|
|
38
|
-
* sass - Copyright (c) 2016, Google Inc.
|
|
39
|
-
* sitemap - Copyright (c) 2011 Eugene Kalinin
|
|
40
|
-
* tippy.js - Copyright (c) 2017-present atomiks
|
|
41
|
-
* tree-model - Copyright (c) 2013 João Nuno Silva
|
|
42
|
-
* upath - Copyright(c) 2014-2020 Angelos Pikoulas (agelos.pikoulas@gmail.com)
|
|
43
|
-
* vnu-jar - Copyright (c) 2007-2016 Mozilla Foundation
|
|
44
|
-
* webpack - Copyright JS Foundation and other contributors
|
|
45
|
-
|
|
46
|
-
The following libraries are included in Umberto under the [Apache License, version 2.0](https://opensource.org/license/apache-2-0/):
|
|
47
|
-
|
|
48
|
-
* fuse.js - Copyright 2017 Kirollos Risk
|
|
49
|
-
|
|
50
|
-
The following libraries are included in Umberto under the [ISC license](https://opensource.org/license/isc-license-txt):
|
|
51
|
-
|
|
52
|
-
* glob - Copyright (c) 2009-2023 Isaac Z. Schlueter and Contributors
|
|
53
|
-
* markdown-it-expand-tabs - Copyright (c) 2016, Revin Guillen
|
|
54
|
-
* minimatch - Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
|
|
55
|
-
* nyc - Copyright (c) 2015, Contributors
|
package/README.md
CHANGED
|
@@ -178,7 +178,6 @@ Sample documentation setup for the example above:
|
|
|
178
178
|
* `verbose` - displays more information during generating documentation.
|
|
179
179
|
* `createSymLinks` - add symbolic links ('latest') to necessary projects in output folder.
|
|
180
180
|
* `watch` - activate watch mode in Umberto. Markdown files are rebuild and refreshed in destination directory without rebuilding rest of the documentation.
|
|
181
|
-
* `validateW3C` - activate validation of builded page with [The Nu Html Checker](https://github.com/validator/validator).
|
|
182
181
|
|
|
183
182
|
The documentation will be output to the `build/docs` directory.
|
|
184
183
|
|
package/hexo-config.json
CHANGED
package/hexo-shim.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "umberto",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "CKSource Documentation builder",
|
|
5
5
|
"main": "src/index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"files": [
|
|
7
8
|
"scripts",
|
|
8
9
|
"src",
|
|
@@ -32,20 +33,19 @@
|
|
|
32
33
|
"hexo-generator-category": "^2.0.0",
|
|
33
34
|
"hexo-generator-index": "^4.0.0",
|
|
34
35
|
"hexo-generator-tag": "^2.0.0",
|
|
35
|
-
"hexo-renderer-markdown-it-plus": "^1.0.
|
|
36
|
+
"hexo-renderer-markdown-it-plus": "^1.0.6",
|
|
36
37
|
"hexo-renderer-pug": "^3.0.0",
|
|
37
38
|
"htmlparser2": "^10.0.0",
|
|
38
39
|
"javascript-stringify": "^2.1.0",
|
|
39
40
|
"jquery": "~3.7.1",
|
|
40
41
|
"js-beautify": "^1.14.4",
|
|
41
42
|
"lodash": "^4.17.21",
|
|
42
|
-
"markdown-it": "^14.1.
|
|
43
|
+
"markdown-it": "^14.1.1",
|
|
43
44
|
"markdown-it-expand-tabs": "^1.0.13",
|
|
44
45
|
"markdown-it-toc-and-anchor": "^4.2.0",
|
|
45
46
|
"medium-zoom": "^1.0.6",
|
|
46
47
|
"minimatch": "^10.0.1",
|
|
47
48
|
"moment": "^2.29.4",
|
|
48
|
-
"nyc": "^17.1.0",
|
|
49
49
|
"pug": "^3.0.2",
|
|
50
50
|
"sass": "^1.54.0",
|
|
51
51
|
"shiki": "^3.4.0",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"tippy.js": "^6.3.7",
|
|
55
55
|
"tree-model": "^1.0.7",
|
|
56
56
|
"upath": "^2.0.1",
|
|
57
|
-
"vnu-jar": "^21.10.12",
|
|
58
57
|
"webpack": "^5.94.0"
|
|
59
58
|
},
|
|
60
59
|
"engines": {
|
|
@@ -62,12 +61,6 @@
|
|
|
62
61
|
},
|
|
63
62
|
"author": "CKSource (http://cksource.com/)",
|
|
64
63
|
"license": "MIT",
|
|
65
|
-
"homepage": "https://github.com/cksource/umberto",
|
|
66
|
-
"bugs": "https://github.com/cksource/umberto/issues",
|
|
67
|
-
"repository": {
|
|
68
|
-
"type": "git",
|
|
69
|
-
"url": "https://github.com/cksource/umberto.git"
|
|
70
|
-
},
|
|
71
64
|
"lint-staged": {
|
|
72
65
|
"**/*": [
|
|
73
66
|
"eslint --quiet"
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
const { parseDocument } = require( 'htmlparser2' );
|
|
9
9
|
const { default: render } = require( 'dom-serializer' );
|
|
10
10
|
|
|
11
|
-
const appendCopyHeadingButtons = require( '../../utils/gloria-after-post-render/append-copy-heading-buttons' );
|
|
12
|
-
const applyDesignDocClasses = require( '../../utils/gloria-after-post-render/apply-design-doc-classes' );
|
|
13
|
-
const wrapTableIntoWrappers = require( '../../utils/gloria-after-post-render/wrap-table-into-wrappers' );
|
|
11
|
+
const appendCopyHeadingButtons = require( '../../utils/gloria-after-post-render/append-copy-heading-buttons.cjs' );
|
|
12
|
+
const applyDesignDocClasses = require( '../../utils/gloria-after-post-render/apply-design-doc-classes.cjs' );
|
|
13
|
+
const wrapTableIntoWrappers = require( '../../utils/gloria-after-post-render/wrap-table-into-wrappers.cjs' );
|
|
14
14
|
|
|
15
15
|
hexo.extend.filter.register( 'after_post_render', page => {
|
|
16
16
|
if ( page.projectTheme !== 'gloria' ) {
|
|
@@ -10,7 +10,7 @@ const { parseDocument } = require( 'htmlparser2' );
|
|
|
10
10
|
const { default: render } = require( 'dom-serializer' );
|
|
11
11
|
const { selectAll } = require( 'css-select' );
|
|
12
12
|
const { getAttributeValue } = require( 'domutils' );
|
|
13
|
-
const applyDesignDocClasses = require( '../../utils/gloria-after-post-render/apply-design-doc-classes' );
|
|
13
|
+
const applyDesignDocClasses = require( '../../utils/gloria-after-post-render/apply-design-doc-classes.cjs' );
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Support @errors tag.
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const hexoManager = require( '../../../src/hexo-manager' );
|
|
9
|
-
const { shouldBuildSnippets, getSnippetPlaceholder, getSnippetSourcePaths } = require( '../../../src/helpers/snippets' );
|
|
8
|
+
const { hexoManager } = require( '../../../src/hexo-manager.js' );
|
|
9
|
+
const { shouldBuildSnippets, getSnippetPlaceholder, getSnippetSourcePaths } = require( '../../../src/helpers/snippets.js' );
|
|
10
10
|
|
|
11
11
|
const upath = require( 'upath' );
|
|
12
12
|
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
const { parseDocument } = require( 'htmlparser2' );
|
|
9
9
|
const { default: render } = require( 'dom-serializer' );
|
|
10
|
-
const inlineSvg = require( '../../utils/inline-svg' );
|
|
11
|
-
const spritesheetSvg = require( '../../utils/spritesheet-svg' );
|
|
12
|
-
const hexoManager = require( '../../../src/hexo-manager' );
|
|
10
|
+
const inlineSvg = require( '../../utils/inline-svg.cjs' );
|
|
11
|
+
const spritesheetSvg = require( '../../utils/spritesheet-svg.cjs' );
|
|
12
|
+
const { hexoManager } = require( '../../../src/hexo-manager.js' );
|
|
13
13
|
|
|
14
14
|
hexo.extend.filter.register( 'after_render:html', html => {
|
|
15
15
|
let doc = parseDocument( html );
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const upath = require( 'upath' );
|
|
9
|
-
const shouldDisplayNewIndicator = require( '../../utils/shoulddisplaynewindicator' );
|
|
10
|
-
const getReportIssueWidgetUrl = require( '../../utils/getreportissuewidgeturl' );
|
|
9
|
+
const shouldDisplayNewIndicator = require( '../../utils/shoulddisplaynewindicator.cjs' );
|
|
10
|
+
const getReportIssueWidgetUrl = require( '../../utils/getreportissuewidgeturl.cjs' );
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Adds project information (e.g. BASE_PATH, project name, group id) to each page.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const
|
|
8
|
+
const { getIssueUrl, getContributeUrl } = require( '../../../src/helpers/github-url.js' );
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Gets url to project repository.
|
|
@@ -32,7 +32,7 @@ hexo.extend.filter.register( 'before_post_render', data => {
|
|
|
32
32
|
.replace( '.html', '.md' );
|
|
33
33
|
|
|
34
34
|
if ( data.issuesUrl === undefined || data.issuesUrl === true ) {
|
|
35
|
-
data.issuesUrl =
|
|
35
|
+
data.issuesUrl = getIssueUrl( projectConfig.config );
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const repoUrlDocs = guidesToRepos.default;
|
|
@@ -55,13 +55,13 @@ hexo.extend.filter.register( 'before_post_render', data => {
|
|
|
55
55
|
// Since each CKEditor 5's package has own `docs/` directory, we need to add the directory manually.
|
|
56
56
|
// Before: `/package/ckeditor5-package/features/foo.md`
|
|
57
57
|
// After: `/package/ckeditor5-package/docs/features/foo.md`
|
|
58
|
-
// That's why we need to disable adding `docs/` part in the `
|
|
58
|
+
// That's why we need to disable adding `docs/` part in the `getContributeUrl()` util.
|
|
59
59
|
pathKey = pathKey.split( '/' );
|
|
60
60
|
pathKey.splice( 3, 0, 'docs' );
|
|
61
61
|
pathKey = pathKey.join( '/' );
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
if ( data.contributeUrl === undefined || data.issuesUrl === true ) {
|
|
65
|
-
data.contributeUrl =
|
|
65
|
+
data.contributeUrl = getContributeUrl( { contributeUrl, repoUrlDocs, doNotAddDocsInPath }, pathKey );
|
|
66
66
|
}
|
|
67
67
|
} );
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const executeAndInsertFunctionResults = require( '../../utils/execute-and-insert-function-results' );
|
|
8
|
+
const executeAndInsertFunctionResults = require( '../../utils/execute-and-insert-function-results.cjs' );
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Replaces the `{@exec path/to/function.js}` expression with the module results.
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
8
|
const upath = require( 'upath' );
|
|
9
|
-
const decodeHtmlEntities = require( '../../../utils/decode-html-entities' );
|
|
10
|
-
const dropUrlProtocol = require( '../../../utils/drop-url-protocol' );
|
|
11
|
-
const concatUrlParts = require( '../../../utils/concat-url-parts' );
|
|
9
|
+
const decodeHtmlEntities = require( '../../../utils/decode-html-entities.cjs' );
|
|
10
|
+
const dropUrlProtocol = require( '../../../utils/drop-url-protocol.cjs' );
|
|
11
|
+
const concatUrlParts = require( '../../../utils/concat-url-parts.cjs' );
|
|
12
12
|
const relative_url = require( 'hexo/dist/plugins/helper/relative_url' ); // eslint-disable-line camelcase
|
|
13
|
-
const dropInitSlash = require( '../../../utils/drop-init-slash' );
|
|
13
|
+
const dropInitSlash = require( '../../../utils/drop-init-slash.cjs' );
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* `hexo.model` calls are REALLY slow, so we cache them. It takes approx
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
const {
|
|
9
9
|
transformMarkdownAdmonitions,
|
|
10
10
|
fastCheckIfContainsAdmonition
|
|
11
|
-
} = require( '../../../utils/transform-markdown-admonitions' );
|
|
11
|
+
} = require( '../../../utils/transform-markdown-admonitions.cjs' );
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Make sure it's executed after `execute-and-insert-function-results.js` filter.
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
|
|
43
43
|
'use strict';
|
|
44
44
|
|
|
45
|
-
const
|
|
46
|
-
const removeIndentation = require( '../../../utils/remove-indentation' );
|
|
47
|
-
const createPrerenderPugTemplate = require( '../../../utils/pug-renderer/create-prerender-pug-template' );
|
|
45
|
+
const upath = require( 'upath' );
|
|
46
|
+
const removeIndentation = require( '../../../utils/remove-indentation.cjs' );
|
|
47
|
+
const createPrerenderPugTemplate = require( '../../../utils/pug-renderer/create-prerender-pug-template.cjs' );
|
|
48
48
|
const {
|
|
49
49
|
renderXMLPugComponentsInMarkdown,
|
|
50
50
|
extractReplacementBase64Tag
|
|
51
|
-
} = require( '../../../utils/pug-to-xml-binding/render-xml-pug-components-in-markdown' );
|
|
51
|
+
} = require( '../../../utils/pug-to-xml-binding/render-xml-pug-components-in-markdown.cjs' );
|
|
52
52
|
|
|
53
53
|
const PATTERN_ELEMENTS = [
|
|
54
54
|
// Info boxes
|
|
@@ -65,7 +65,8 @@ const PATTERN_ELEMENTS = [
|
|
|
65
65
|
attributesMapper: ( { attributes } ) => {
|
|
66
66
|
const variants = [
|
|
67
67
|
'info', 'warning', 'error', 'success',
|
|
68
|
-
'note', 'tip', 'important', 'caution'
|
|
68
|
+
'note', 'tip', 'important', 'caution',
|
|
69
|
+
'experimental'
|
|
69
70
|
];
|
|
70
71
|
|
|
71
72
|
// First check if variant is directly specified
|
|
@@ -320,7 +321,7 @@ hexo.extend.filter.register( 'before_post_render', page => {
|
|
|
320
321
|
return page;
|
|
321
322
|
}
|
|
322
323
|
|
|
323
|
-
const basePath =
|
|
324
|
+
const basePath = upath.join( hexo.theme_dir, 'layout', 'gloria', '_components' );
|
|
324
325
|
const result = renderXMLPugComponentsInMarkdown( page.content, {
|
|
325
326
|
hexo,
|
|
326
327
|
basePath,
|
|
@@ -10,7 +10,7 @@ const { cloneNode } = require( 'domhandler' );
|
|
|
10
10
|
const { default: render } = require( 'dom-serializer' );
|
|
11
11
|
const { selectAll, selectOne } = require( 'css-select' );
|
|
12
12
|
const { getAttributeValue, getChildren, replaceElement } = require( 'domutils' );
|
|
13
|
-
const createPrerenderPugTemplate = require( '../../../utils/pug-renderer/create-prerender-pug-template' );
|
|
13
|
+
const createPrerenderPugTemplate = require( '../../../utils/pug-renderer/create-prerender-pug-template.cjs' );
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Components to be processed after markdown rendering
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const insertChangelog = require( '../../utils/insertchangelog' );
|
|
8
|
+
const insertChangelog = require( '../../utils/insertchangelog.cjs' );
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Replaces the `{@changelog X.Y.Z}` expression with the changelog entries for the specified version.
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
'use strict';
|
|
7
7
|
|
|
8
|
-
const dropInitSlash = require( './drop-init-slash' );
|
|
9
|
-
const dropTrailingSlash = require( './drop-trailing-slash' );
|
|
10
|
-
const compose = require( './compose' );
|
|
8
|
+
const dropInitSlash = require( './drop-init-slash.cjs' );
|
|
9
|
+
const dropTrailingSlash = require( './drop-trailing-slash.cjs' );
|
|
10
|
+
const compose = require( './compose.cjs' );
|
|
11
11
|
|
|
12
12
|
module.exports = function concatUrlParts( ...urls ) {
|
|
13
13
|
return (
|
|
@@ -26,6 +26,8 @@ const PATH_REGEXP = /[\w.\\/-]+\.c?js$/;
|
|
|
26
26
|
* @returns {Object}
|
|
27
27
|
*/
|
|
28
28
|
module.exports = function executeAndInsertFunctionResults( page, hexo ) {
|
|
29
|
+
const { fs, require } = module.exports._dependencies;
|
|
30
|
+
|
|
29
31
|
page.content = page.content.replace( EXEC_REGEXP, ( match, path ) => {
|
|
30
32
|
if ( !page.projectName ) {
|
|
31
33
|
console.error( `"${ match }" expression cannot be executed on a page that is assigned to no project.` );
|
|
@@ -75,3 +77,8 @@ module.exports = function executeAndInsertFunctionResults( page, hexo ) {
|
|
|
75
77
|
|
|
76
78
|
return page;
|
|
77
79
|
};
|
|
80
|
+
|
|
81
|
+
module.exports._dependencies = {
|
|
82
|
+
fs,
|
|
83
|
+
require
|
|
84
|
+
};
|
|
@@ -16,25 +16,15 @@ const {
|
|
|
16
16
|
textContent
|
|
17
17
|
} = require( 'domutils' );
|
|
18
18
|
|
|
19
|
-
const createPrerenderPugTemplate = require( '../pug-renderer/create-prerender-pug-template' );
|
|
19
|
+
const createPrerenderPugTemplate = require( '../pug-renderer/create-prerender-pug-template.cjs' );
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
* Renders the button using Pug template.
|
|
23
|
-
*/
|
|
24
|
-
const renderButton = createPrerenderPugTemplate( {
|
|
25
|
-
requires: [
|
|
26
|
-
'_components/svg/index',
|
|
27
|
-
'_components/icon/index',
|
|
28
|
-
'_components/tooltip-popover/index',
|
|
29
|
-
'_components/heading-link/index'
|
|
30
|
-
],
|
|
31
|
-
component: 'heading-link',
|
|
32
|
-
componentAttrs: {
|
|
33
|
-
mask: [ 'headingId' ]
|
|
34
|
-
}
|
|
35
|
-
} );
|
|
21
|
+
const renderButtonCache = new WeakMap();
|
|
36
22
|
|
|
37
23
|
module.exports = function appendCopyHeadingButtons( doc ) {
|
|
24
|
+
const { createPrerenderPugTemplate } = module.exports._dependencies;
|
|
25
|
+
|
|
26
|
+
const renderButton = getRenderButton( createPrerenderPugTemplate );
|
|
27
|
+
|
|
38
28
|
// Do not process h1 tags as it's processed further by Umberto and may be removed.
|
|
39
29
|
for ( const heading of selectAll( 'h2, h3, h4, h5, h6', doc ) ) {
|
|
40
30
|
if ( hasClassOrParentWithClass( heading, 'no-transform' ) ) {
|
|
@@ -61,6 +51,33 @@ module.exports = function appendCopyHeadingButtons( doc ) {
|
|
|
61
51
|
return doc;
|
|
62
52
|
};
|
|
63
53
|
|
|
54
|
+
module.exports._dependencies = {
|
|
55
|
+
createPrerenderPugTemplate
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
function getRenderButton( createPrerenderPugTemplate ) {
|
|
59
|
+
if ( renderButtonCache.has( createPrerenderPugTemplate ) ) {
|
|
60
|
+
return renderButtonCache.get( createPrerenderPugTemplate );
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const renderButton = createPrerenderPugTemplate( {
|
|
64
|
+
requires: [
|
|
65
|
+
'_components/svg/index',
|
|
66
|
+
'_components/icon/index',
|
|
67
|
+
'_components/tooltip-popover/index',
|
|
68
|
+
'_components/heading-link/index'
|
|
69
|
+
],
|
|
70
|
+
component: 'heading-link',
|
|
71
|
+
componentAttrs: {
|
|
72
|
+
mask: [ 'headingId' ]
|
|
73
|
+
}
|
|
74
|
+
} );
|
|
75
|
+
|
|
76
|
+
renderButtonCache.set( createPrerenderPugTemplate, renderButton );
|
|
77
|
+
|
|
78
|
+
return renderButton;
|
|
79
|
+
}
|
|
80
|
+
|
|
64
81
|
/**
|
|
65
82
|
* Removes all empty anchors that were created to hold the heading links buttons.
|
|
66
83
|
* "Empty" = no element children AND text content (after trimming and removing a single '#') is empty.
|
|
@@ -21,6 +21,8 @@ const fs = require( 'node:fs' );
|
|
|
21
21
|
* @returns {*}
|
|
22
22
|
*/
|
|
23
23
|
module.exports = function hasOwnFavicons( page, hexo ) {
|
|
24
|
+
const { fs } = module.exports._dependencies;
|
|
25
|
+
|
|
24
26
|
const projectConfig = hexo.projectGlobals[ page.projectName ];
|
|
25
27
|
|
|
26
28
|
let hasOwnAssets = false;
|
|
@@ -40,6 +42,10 @@ module.exports = function hasOwnFavicons( page, hexo ) {
|
|
|
40
42
|
return page;
|
|
41
43
|
};
|
|
42
44
|
|
|
45
|
+
module.exports._dependencies = {
|
|
46
|
+
fs
|
|
47
|
+
};
|
|
48
|
+
|
|
43
49
|
/**
|
|
44
50
|
* @typedef {object} ProjectGlobalConfig
|
|
45
51
|
* @property {string} projectRootPath
|