umberto 10.0.0 → 10.1.1

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 CHANGED
@@ -1,6 +1,25 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## [10.1.1](https://github.com/cksource/umberto/compare/v10.1.0...v10.1.1) (March 4, 2026)
5
+
6
+ ### Bug fixes
7
+
8
+ * Fixed a deprecation warning displayed during documentation builds by migrating Sass compilation to the modern Dart Sass JavaScript API. The `legacy-js-api` warning is no longer emitted.
9
+
10
+
11
+ ## [10.1.0](https://github.com/cksource/umberto/compare/v10.0.0...v10.1.0) (March 4, 2026)
12
+
13
+ ### Features
14
+
15
+ * Add support for experimental features in the callout component and in the badges normalization script.
16
+
17
+ ### Bug fixes
18
+
19
+ * Fixed the deprecation warning regarding the `Sass if() syntax` thrown during building docs.
20
+ * Disabled inserting a space between the anchor link and heading when converting a document from Markdown to HTML.
21
+
22
+
4
23
  ## [10.0.0](https://github.com/cksource/umberto/compare/v9.4.0...v10.0.0) (February 16, 2026)
5
24
 
6
25
  ### BREAKING CHANGES
@@ -39,29 +58,6 @@ Changelog
39
58
 
40
59
  * Improved rendering of [`templateLiteral`](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html) types that reference a module. They are now rendered as clickable links pointing to the corresponding page.
41
60
 
42
-
43
- ## [9.2.0](https://github.com/cksource/umberto/compare/v9.1.3...v9.2.0) (January 7, 2026)
44
-
45
- ### Features
46
-
47
- * Enabled Shiki syntax highlighting for diff blocks in Gloria. This improves the readability and usability of diffs in the documentation.
48
-
49
- ### Bug fixes
50
-
51
- * Fix crashes of Table of Contents on some pages where headings are not placed in expected HTML structure.
52
- * 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).
53
-
54
-
55
- ## [9.1.3](https://github.com/cksource/umberto/compare/v9.1.2...v9.1.3) (December 19, 2025)
56
-
57
- ### Bug fixes
58
-
59
- * Fixed the conflict where typing the forward slash in the Kapa widget would trigger the Algolia search.
60
-
61
- ### Other changes
62
-
63
- * Added CKBox (`CKBOX_VERSION`) and CKEditor 5 (`CKEDITOR_VERSION`) versions to events sent to Sentry integration.
64
-
65
61
  ---
66
62
 
67
63
  To see all releases, visit the [release page](https://github.com/cksource/umberto/releases).
package/hexo-config.json CHANGED
@@ -29,7 +29,8 @@
29
29
  "options": {
30
30
  "toc": false,
31
31
  "anchorClassName": "headerlink",
32
- "anchorLinkSymbol": "#"
32
+ "anchorLinkSymbol": "#",
33
+ "anchorLinkSpace": false
33
34
  }
34
35
  }
35
36
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umberto",
3
- "version": "10.0.0",
3
+ "version": "10.1.1",
4
4
  "description": "CKSource Documentation builder",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -33,14 +33,14 @@
33
33
  "hexo-generator-category": "^2.0.0",
34
34
  "hexo-generator-index": "^4.0.0",
35
35
  "hexo-generator-tag": "^2.0.0",
36
- "hexo-renderer-markdown-it-plus": "^1.0.5",
36
+ "hexo-renderer-markdown-it-plus": "^1.0.6",
37
37
  "hexo-renderer-pug": "^3.0.0",
38
38
  "htmlparser2": "^10.0.0",
39
39
  "javascript-stringify": "^2.1.0",
40
40
  "jquery": "~3.7.1",
41
41
  "js-beautify": "^1.14.4",
42
42
  "lodash": "^4.17.21",
43
- "markdown-it": "^14.1.0",
43
+ "markdown-it": "^14.1.1",
44
44
  "markdown-it-expand-tabs": "^1.0.13",
45
45
  "markdown-it-toc-and-anchor": "^4.2.0",
46
46
  "medium-zoom": "^1.0.6",
@@ -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
@@ -9,6 +9,10 @@ const KNOWN_BADGES = {
9
9
  premium: {
10
10
  name: 'premium',
11
11
  label: 'Premium feature'
12
+ },
13
+ experimental: {
14
+ name: 'experiment',
15
+ label: 'Experimental feature'
12
16
  }
13
17
  };
14
18
 
@@ -3,17 +3,16 @@
3
3
  * For licensing, see LICENSE.md.
4
4
  */
5
5
 
6
- import { fileURLToPath } from 'node:url';
6
+ import { pathToFileURL } from 'node:url';
7
7
  import * as sass from 'sass';
8
8
  import fs from 'fs-extra';
9
9
  import upath from 'upath';
10
10
 
11
- export function compileSass( src, dst ) {
12
- return new Promise( ( resolve, reject ) => {
13
- const options = {
14
- file: src,
15
- outputStyle: 'compressed',
16
- importer( url, file, done ) {
11
+ export async function compileSass( src, dst ) {
12
+ const options = {
13
+ style: 'compressed',
14
+ importers: [ {
15
+ findFileUrl( url ) {
17
16
  // In case of import from the `themes/umberto/src` directory.
18
17
  const themeMatch = url && url.match( /@([^/]+)\/(.+)/ );
19
18
 
@@ -22,53 +21,24 @@ export function compileSass( src, dst ) {
22
21
  const filePath = upath.join( import.meta.dirname, '../../themes/umberto/src', theme, 'css', remainingPath );
23
22
 
24
23
  if ( fs.existsSync( filePath ) ) {
25
- return done( { file: filePath } );
24
+ return pathToFileURL( filePath );
26
25
  }
27
26
  }
28
27
 
29
28
  // In case of an import from the `node_modules` directory.
30
29
  if ( url.startsWith( '~' ) ) {
31
- // Resolve the path regarding the current working directory.
32
- const absolutePath = fileURLToPath( import.meta.resolve( url.substr( 1 ) ) );
33
-
34
- return fs.readFile( absolutePath, 'utf-8', ( err, data ) => {
35
- if ( err ) {
36
- return done( err );
37
- }
38
-
39
- return done( {
40
- contents: data
41
- } );
42
- } );
30
+ return new URL( import.meta.resolve( url.substr( 1 ) ) );
43
31
  }
44
32
 
45
- // Import a local file (a relative path).
46
- const directory = upath.dirname( file );
47
-
48
- // Replace "directory/filename" with "directory/_filename.scss".
49
- const fileName = url.replace( /(.+)(?:\/(.+))$/, ( match, dirName, fileName ) => {
50
- return dirName + '/_' + fileName + '.scss';
51
- } );
52
-
53
- return done( {
54
- file: upath.join( directory, fileName )
55
- } );
33
+ return null;
56
34
  }
57
- };
35
+ } ]
36
+ };
58
37
 
59
- sass.render( options, ( err, result ) => {
60
- if ( err ) {
61
- return reject( err );
62
- }
38
+ const result = await sass.compileAsync( src, options );
63
39
 
64
- fs.mkdirsSync( upath.dirname( dst ) );
65
- fs.writeFile( upath.resolve( dst ), result.css.toString( 'utf-8' ), err => {
66
- if ( err ) {
67
- return reject( err );
68
- }
40
+ fs.mkdirsSync( upath.dirname( dst ) );
41
+ await fs.writeFile( upath.resolve( dst ), result.css );
69
42
 
70
- return resolve( true );
71
- } );
72
- } );
73
- } );
43
+ return true;
74
44
  }
@@ -28,6 +28,10 @@
28
28
  --callout-variant-color: var(--color-success-500);
29
29
  }
30
30
 
31
+ &--cyan {
32
+ --callout-variant-color: var(--color-cyan-600);
33
+ }
34
+
31
35
  &__title {
32
36
  position: absolute;
33
37
  left: calc(var(--font-size-lg) * -0.5 - 1px);
@@ -65,6 +65,12 @@ mixin callout({ variant })
65
65
  icon: 'close-circle',
66
66
  title: 'Caution',
67
67
  role: 'alert'
68
+ },
69
+ experimental: {
70
+ className: 'c-callout--cyan',
71
+ icon: 'experiment',
72
+ title: 'Experimental',
73
+ role: 'note'
68
74
  }
69
75
  };
70
76
 
@@ -1,7 +1,11 @@
1
1
  @use 'sass:list';
2
2
 
3
3
  @mixin a11y-focus-ring-outline($inset: false) {
4
- $inset-value: if($inset, 'inset', '');
4
+ $inset-value: '';
5
+
6
+ @if $inset {
7
+ $inset-value: 'inset';
8
+ }
5
9
 
6
10
  outline: 0;
7
11
  box-shadow: 0 0 0 .2rem var(--a11y-focus-ring-color, color-mix(in srgb, var(--color-primary-500) 20%, transparent)) #{$inset-value};