umberto 10.7.2 → 10.7.4

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,20 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## [10.7.4](https://github.com/cksource/umberto/compare/v10.7.3...v10.7.4) (July 27, 2026)
5
+
6
+ ### Other changes
7
+
8
+ * This release does not include any user-facing changes. It was published solely to verify the release process.
9
+
10
+
11
+ ## [10.7.3](https://github.com/cksource/umberto/compare/v10.7.2...v10.7.3) (July 22, 2026)
12
+
13
+ ### Bug fixes
14
+
15
+ * Fixed live snippets failing to load in browsers that require import maps before module scripts.
16
+
17
+
4
18
  ## [10.7.2](https://github.com/cksource/umberto/compare/v10.7.1...v10.7.2) (July 16, 2026)
5
19
 
6
20
  ### Other changes
@@ -34,29 +48,6 @@ Changelog
34
48
 
35
49
  * The tabbed content component now sets a `data-tab-label` attribute on each tab panel, carrying the label of its tab. This exposes the label to tools that process the rendered HTML, where it otherwise lives only inside the tab button.
36
50
 
37
-
38
- ## [10.6.1](https://github.com/cksource/umberto/compare/v10.6.0...v10.6.1) (June 18, 2026)
39
-
40
- ### Other changes
41
-
42
- * Updated homepage link.
43
- * Restored the web-based Google Tag Manager snippets in both Gloria and legacy Umberto themes.
44
-
45
-
46
- ## [10.6.0](https://github.com/cksource/umberto/compare/v10.5.1...v10.6.0) (June 8, 2026)
47
-
48
- ### Features
49
-
50
- * Improved rendering of complex TypeScript types in API docs.
51
-
52
- Intersection (`A & B`), tuple (`[ key: T, value: U ]`), and conditional (`T extends U ? X : Y`) types now render with their full structure preserved and each reference linkable, instead of collapsing to a generic `object` or `tuple` placeholder. Optional tuple elements display the trailing `?` from the source. The `infer X` keyword inside conditionals renders as such and no longer triggers "unsupported type" warnings during the docs build.
53
-
54
- Properties tables on intersection type aliases now list the fields from the inline-literal half — including nested cases like `abc: A & { b: T }`, which now exposes `abc.b` as a sub-row, and cases where the inline literal is wrapped in `Partial<...>`, `Readonly<...>`, or `Required<...>`, where the wrapper's modifier is applied to each field. Per-field inline TSDoc comments (`/** ... */`) above each field render their descriptions in the Properties table, where they were previously dropped.
55
-
56
- ### Other changes
57
-
58
- * Updated the GTM integration to use the new server-side setup in both Gloria and legacy Umberto themes.
59
-
60
51
  ---
61
52
 
62
53
  To see all releases, visit the [release page](https://github.com/cksource/umberto/releases).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umberto",
3
- "version": "10.7.2",
3
+ "version": "10.7.4",
4
4
  "description": "CKSource Documentation builder",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -61,4 +61,3 @@ function onError( match, source ) {
61
61
 
62
62
  return match;
63
63
  }
64
-
@@ -34,4 +34,3 @@ hexo.extend.helper.register( 'markEmptyCategories', ( () => {
34
34
  return categories;
35
35
  } );
36
36
  } )() );
37
-
@@ -200,8 +200,6 @@ module.exports = function markdownItTocAndAnchor( md, options ) {
200
200
  }
201
201
 
202
202
  const tocArray = [];
203
- let tocMarkdown = '';
204
- let tocTokens = [];
205
203
 
206
204
  const slugifyFn = typeof options.slugify === 'function' ? options.slugify : defaultSlugify;
207
205
 
@@ -242,8 +240,8 @@ module.exports = function markdownItTocAndAnchor( md, options ) {
242
240
  } );
243
241
  }
244
242
 
245
- tocMarkdown = generateTocMarkdownFromArray( tocArray, options );
246
- tocTokens = markdownItSecondInstance.parse( tocMarkdown, {} );
243
+ const tocMarkdown = generateTocMarkdownFromArray( tocArray, options );
244
+ const tocTokens = markdownItSecondInstance.parse( tocMarkdown, {} );
247
245
 
248
246
  if ( typeof tocTokens[ 0 ] === 'object' && tocTokens[ 0 ].type === 'bullet_list_open' ) {
249
247
  const attrs = ( tocTokens[ 0 ].attrs = tocTokens[ 0 ].attrs || [] );
@@ -280,11 +278,11 @@ module.exports = function markdownItTocAndAnchor( md, options ) {
280
278
  return false;
281
279
  }
282
280
 
283
- let token = state.push( 'toc_open', 'toc', 1 );
281
+ const token = state.push( 'toc_open', 'toc', 1 );
284
282
 
285
283
  token.markup = TOC;
286
- token = state.push( 'toc_body', '', 0 );
287
- token = state.push( 'toc_close', 'toc', -1 );
284
+ state.push( 'toc_body', '', 0 );
285
+ state.push( 'toc_close', 'toc', -1 );
288
286
 
289
287
  state.pos += match[ 0 ].length;
290
288
 
@@ -123,7 +123,7 @@ function renderXMLPugComponentsInMarkdown( xml, options ) {
123
123
  );
124
124
 
125
125
  // Render component wrapper
126
- let finalReplacement = null;
126
+ let finalReplacement;
127
127
 
128
128
  try {
129
129
  const template = getCompiledPugTemplate( hexo, content, basePath );
@@ -65,7 +65,7 @@ export function findTargetDoclet( docletCollection, options ) {
65
65
  }
66
66
 
67
67
  if ( collection.isEmpty ) {
68
- const typedefCollection = collection = docletCollection.get( `ln:${ structure }` );
68
+ const typedefCollection = docletCollection.get( `ln:${ structure }` );
69
69
 
70
70
  if ( typedefCollection.isEmpty ) {
71
71
  return null;
@@ -71,13 +71,13 @@ const keyNameMap = {
71
71
  * @returns {Array}
72
72
  */
73
73
  export const jsduck2umberto = data => {
74
- let parsed = {};
74
+ let parsed;
75
75
  const doclets = [];
76
76
 
77
77
  try {
78
78
  parsed = JSON.parse( data );
79
79
  } catch ( err ) {
80
- throw new Error( `Failed to convert JSDuck docs to Umberto format. ${ err.stack }` );
80
+ throw new Error( `Failed to convert JSDuck docs to Umberto format. ${ err.stack }`, { cause: err } );
81
81
  }
82
82
 
83
83
  const mainDoclet = parsed;
@@ -52,4 +52,3 @@ export class DataCollection {
52
52
  return this._allData;
53
53
  }
54
54
  }
55
-
@@ -112,4 +112,3 @@ function sortByName( a, b ) {
112
112
 
113
113
  return 0;
114
114
  }
115
-
@@ -137,7 +137,7 @@ function getConfigurationFile( configPath ) {
137
137
  // The configuration file should be a proper JSON object.
138
138
  return JSON.parse( fs.readFileSync( configPath, 'utf8' ) );
139
139
  } catch ( err ) {
140
- throw new Error( 'Error when reading umberto.json: ' + err );
140
+ throw new Error( 'Error when reading umberto.json: ' + err, { cause: err } );
141
141
  }
142
142
  }
143
143
 
@@ -49,6 +49,9 @@ if ( page[ 'dc-description' ] || ogConfig.description )
49
49
  if page.BASE_PATH && page.BASE_PATH !== '.' && !page.BASE_PATH.includes( 'latest' )
50
50
  link( rel = 'canonical' href = page.canonicalUrlBeginning + page.path.replace( page.BASE_PATH, projectLocals.latestBasePath ) )
51
51
 
52
+ if page.isSnippetPage
53
+ //UMBERTO: SNIPPET: HEAD
54
+
52
55
  +head-preloads()
53
56
  if kapa
54
57
  +load-kapa-script(kapa)
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @license Copyright (c) 2017-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md.
4
+ */
5
+
1
6
  /* Style for the floating button. */
2
7
  #kapa-button div > img + p {
3
8
  position: relative;
@@ -11,9 +16,9 @@
11
16
 
12
17
  /* Style for hyperlinks inside the AI's answer. */
13
18
  #kapa-modal-content
14
- .scrollable-container
15
- .mantine-Title-root + div
16
- a
19
+ .scrollable-container
20
+ .mantine-Title-root + div
21
+ a
17
22
  {
18
23
  font-weight: normal !important;
19
24
  color: #743CCD !important;
@@ -66,6 +66,8 @@ if projectLocals
66
66
  link( rel= 'stylesheet', href = relative_url( page.path, path ), type='text/css' )
67
67
 
68
68
  if page.isSnippetPage
69
+ //UMBERTO: SNIPPET: HEAD
70
+
69
71
  //UMBERTO: SNIPPET: CSS
70
72
 
71
73
  include vwo
@@ -570,7 +570,7 @@ class ObjectViewer extends HTMLElement {
570
570
  }
571
571
 
572
572
  createObjectPreview( data, isArray ) {
573
- let previewContent = '';
573
+ let previewContent;
574
574
 
575
575
  if ( isArray ) {
576
576
  previewContent = html.span( { class: 'c-object-viewer__preview' },
@@ -640,8 +640,8 @@ class ObjectViewer extends HTMLElement {
640
640
  }
641
641
 
642
642
  formatPrimitiveValue( value ) {
643
- let className = '';
644
- let textContent = '';
643
+ let className;
644
+ let textContent;
645
645
 
646
646
  switch ( typeof value ) {
647
647
  case 'string':
@@ -44,7 +44,7 @@ export function scrollApiTree() {
44
44
  const sideNavScrollTop = Number( window.localStorage.getItem( storageKey ) );
45
45
  const activeTreeItemClass = 'tree__item__wrapper--active';
46
46
  const activeTreeItem = $( `div.side-navigation .${ activeTreeItemClass }` );
47
- let activeTreeItemTop = 0;
47
+ let activeTreeItemTop;
48
48
  const bound = 50; // Offset from top and bottom of side nav.
49
49
 
50
50
  if ( activeTreeItem.length ) {
@@ -90,4 +90,3 @@ export function pageNavigation() {
90
90
  }
91
91
  }
92
92
  }
93
-