umberto 4.4.1 → 4.4.2

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,13 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## [4.4.2](https://github.com/cksource/umberto/compare/v4.4.1...v4.4.2) (2024-11-25)
5
+
6
+ ### Bug fixes
7
+
8
+ * Fixed code switcher icons which were incorrectly displayed in the docs. ([commit](https://github.com/cksource/umberto/commit/3319526a4461a47f5a96b8de767fb9e3db51d9c4))
9
+
10
+
4
11
  ## [4.4.1](https://github.com/cksource/umberto/compare/v4.4.0...v4.4.1) (2024-10-30)
5
12
 
6
13
  ### Other changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umberto",
3
- "version": "4.4.1",
3
+ "version": "4.4.2",
4
4
  "description": "CKSource Documentation builder",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -10,7 +10,7 @@ const markdown = new MarkdownIt( {
10
10
  html: true
11
11
  } );
12
12
 
13
- const ISSUE_URL = 'https://github.com/cksource/umberto/issues/new?assignees=&labels=type:feature,squad:devops';
13
+ const ISSUE_URL = 'https://github.com/cksource/umberto/issues/new?assignees=&labels=type:feature,squad:platform';
14
14
 
15
15
  class TypedocConverter {
16
16
  /**
@@ -3,7 +3,7 @@
3
3
  * For licensing, see LICENSE.md.
4
4
  */
5
5
 
6
- /* globals umberto */
6
+ import $ from 'jquery';
7
7
 
8
8
  const type = {
9
9
  selfHosted: 'selfhosted',
@@ -98,20 +98,13 @@ export function createCodeSwitcherButtons() {
98
98
 
99
99
  const activeType = switcher.classList[ switcher.classList.length - 1 ];
100
100
 
101
- const infoCircle = document.createElement( 'img' );
102
-
103
- infoCircle.setAttribute( 'src', `/assets/${ umberto.version }/img/info-circle.svg` );
104
- infoCircle.classList.add( 'code-switcher__info' );
105
-
106
101
  const selfHostedButton = createButton( 'Self-hosted (npm)', activeType === type.selfHosted );
107
102
 
108
103
  selfHostedButton.setAttribute( 'title', 'Self-hosted shows imports for installations using npm or ZIP setups.' );
109
- selfHostedButton.append( infoCircle.cloneNode( true ) );
110
104
 
111
105
  const cloudButton = createButton( 'Cloud (CDN)', activeType === type.cloud );
112
106
 
113
107
  cloudButton.setAttribute( 'title', 'Cloud shows imports for installations using CDN setups.' );
114
- cloudButton.append( infoCircle.cloneNode( true ) );
115
108
 
116
109
  const switcherToolbar = switcher.querySelector( `.${ codeSwitcherToolbarClass }` );
117
110
 
@@ -142,4 +135,12 @@ export function createCodeSwitcherButtons() {
142
135
  saveSnippetType( type.cloud );
143
136
  } );
144
137
  } );
138
+
139
+ /* eslint-disable max-len */
140
+ const infoCircle = $( `
141
+ <svg class="code-switcher__info" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
142
+ <path d="M6 0.75C3.10078 0.75 0.75 3.10078 0.75 6C0.75 8.89922 3.10078 11.25 6 11.25C8.89922 11.25 11.25 8.89922 11.25 6C11.25 3.10078 8.89922 0.75 6 0.75ZM6 10.3594C3.59297 10.3594 1.64063 8.40703 1.64063 6C1.64063 3.59297 3.59297 1.64063 6 1.64063C8.40703 1.64063 10.3594 3.59297 10.3594 6C10.3594 8.40703 8.40703 10.3594 6 10.3594Z" fill="white"/>
143
+ <path d="M5.43732 3.9375C5.43732 4.08668 5.49658 4.22976 5.60207 4.33525C5.70756 4.44074 5.85063 4.5 5.99982 4.5C6.149 4.5 6.29207 4.44074 6.39756 4.33525C6.50305 4.22976 6.56232 4.08668 6.56232 3.9375C6.56232 3.78832 6.50305 3.64524 6.39756 3.53975C6.29207 3.43426 6.149 3.375 5.99982 3.375C5.85063 3.375 5.70756 3.43426 5.60207 3.53975C5.49658 3.64524 5.43732 3.78832 5.43732 3.9375ZM6.28107 5.25H5.71857C5.667 5.25 5.62482 5.29219 5.62482 5.34375V8.53125C5.62482 8.58281 5.667 8.625 5.71857 8.625H6.28107C6.33263 8.625 6.37482 8.58281 6.37482 8.53125V5.34375C6.37482 5.29219 6.33263 5.25 6.28107 5.25Z" fill="white"/>
144
+ </svg>` );
145
+ infoCircle.appendTo( `.${ buttonClass }` );
145
146
  }