umberto 4.4.0 → 4.4.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 +8 -0
- package/package.json +1 -1
- package/themes/umberto/layout/page.pug +0 -1
- package/themes/umberto/src/css/_api-info-box.scss +14 -10
- package/themes/umberto/src/css/_api-props-filter.scss +26 -71
- package/themes/umberto/src/css/_api-subheader.scss +7 -4
- package/themes/umberto/src/css/_api-tree.scss +21 -16
- package/themes/umberto/src/css/_badge.scss +16 -12
- package/themes/umberto/src/css/_code-switcher.scss +15 -8
- package/themes/umberto/src/css/_collapsinglist.scss +34 -29
- package/themes/umberto/src/css/_content.scss +50 -43
- package/themes/umberto/src/css/_docsearch.scss +9 -6
- package/themes/umberto/src/css/_dropdown.scss +8 -5
- package/themes/umberto/src/css/_feedback-widget.scss +6 -3
- package/themes/umberto/src/css/_font-external.scss +8 -0
- package/themes/umberto/src/css/_footer.scss +21 -16
- package/themes/umberto/src/css/_formatted.scss +48 -40
- package/themes/umberto/src/css/_guide-content.scss +5 -2
- package/themes/umberto/src/css/_guide-sdk-tree.scss +3 -3
- package/themes/umberto/src/css/_main.scss +20 -15
- package/themes/umberto/src/css/_navigation.scss +11 -7
- package/themes/umberto/src/css/_notice.scss +35 -30
- package/themes/umberto/src/css/_prism.scss +5 -3
- package/themes/umberto/src/css/_rwd-breadcrumbs.scss +3 -1
- package/themes/umberto/src/css/_rwd-menu.scss +20 -15
- package/themes/umberto/src/css/_secondary-navigation.scss +44 -38
- package/themes/umberto/src/css/_toggler.scss +6 -4
- package/themes/umberto/src/css/_top.scss +49 -43
- package/themes/umberto/src/css/_tree.scss +24 -21
- package/themes/umberto/src/css/_warning-banner.scss +6 -3
- package/themes/umberto/src/css/helpers/_color.scss +4 -1
- package/themes/umberto/src/css/helpers/_font.scss +15 -12
- package/themes/umberto/src/css/helpers/_globals.scss +10 -9
- package/themes/umberto/src/css/helpers/_spacing.scss +3 -1
- package/themes/umberto/src/css/pages/_sdk.scss +12 -8
- package/themes/umberto/src/css/styles.scss +48 -47
- package/themes/umberto/src/js/_codeswitcherbuttons.js +12 -2
|
@@ -3,23 +3,24 @@
|
|
|
3
3
|
|
|
4
4
|
// Division using / is deprecated, math.div() has to be used instead.
|
|
5
5
|
// See: https://sass-lang.com/documentation/breaking-changes/slash-div
|
|
6
|
-
@use 'sass:math';
|
|
7
6
|
|
|
8
7
|
@use '~tippy.js/dist/tippy.css';
|
|
9
8
|
@use '~tippy.js/themes/light-border.css';
|
|
10
9
|
@use '~tippy.js/animations/scale.css';
|
|
11
|
-
|
|
12
|
-
@
|
|
13
|
-
@
|
|
14
|
-
@
|
|
15
|
-
@
|
|
16
|
-
@
|
|
10
|
+
@use 'font-external';
|
|
11
|
+
@use 'helpers/color';
|
|
12
|
+
@use 'helpers/font';
|
|
13
|
+
@use 'helpers/globals';
|
|
14
|
+
@use 'helpers/reset';
|
|
15
|
+
@use 'helpers/spacing';
|
|
16
|
+
@use 'sass:math';
|
|
17
|
+
@use 'sass:meta';
|
|
17
18
|
|
|
18
19
|
@mixin u-std-font {
|
|
19
20
|
font-weight: 400;
|
|
20
|
-
line-height:
|
|
21
|
-
font-family:
|
|
22
|
-
font-size:
|
|
21
|
+
line-height: font.$u-line-height-base;
|
|
22
|
+
font-family: font.$u-font-face;
|
|
23
|
+
font-size: font.$u-font-size-base;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
body, html {
|
|
@@ -32,11 +33,11 @@ body, html {
|
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
body {
|
|
35
|
-
padding:
|
|
36
|
-
color: u-color( text, 10% );
|
|
36
|
+
padding: globals.$u-top-height 0 0;
|
|
37
|
+
color: color.u-color( text, 10% );
|
|
37
38
|
|
|
38
|
-
@include u-responsive-tablet {
|
|
39
|
-
padding:
|
|
39
|
+
@include globals.u-responsive-tablet {
|
|
40
|
+
padding: globals.$u-top-main 0 0;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -45,7 +46,7 @@ button, input {
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
a {
|
|
48
|
-
color: u-color( 'link' );
|
|
49
|
+
color: color.u-color( 'link' );
|
|
49
50
|
text-decoration: none;
|
|
50
51
|
|
|
51
52
|
&:hover {
|
|
@@ -57,60 +58,60 @@ a {
|
|
|
57
58
|
display: none;
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
@
|
|
61
|
-
@
|
|
62
|
-
@
|
|
63
|
-
@
|
|
64
|
-
@
|
|
65
|
-
@
|
|
66
|
-
@
|
|
67
|
-
@
|
|
68
|
-
@
|
|
69
|
-
@
|
|
70
|
-
@
|
|
71
|
-
@
|
|
61
|
+
@include meta.load-css('tree');
|
|
62
|
+
@include meta.load-css('top');
|
|
63
|
+
@include meta.load-css('main');
|
|
64
|
+
@include meta.load-css('formatted');
|
|
65
|
+
@include meta.load-css('collapsinglist');
|
|
66
|
+
@include meta.load-css('footer');
|
|
67
|
+
@include meta.load-css('toggler');
|
|
68
|
+
@include meta.load-css('badge');
|
|
69
|
+
@include meta.load-css('dropdown');
|
|
70
|
+
@include meta.load-css('secondary-navigation');
|
|
71
|
+
@include meta.load-css('docsearch');
|
|
72
|
+
@include meta.load-css('loading-spinner');
|
|
72
73
|
// PAGES
|
|
73
74
|
|
|
74
75
|
// GUIDES
|
|
75
|
-
@
|
|
76
|
-
@
|
|
77
|
-
@
|
|
76
|
+
@include meta.load-css('notice');
|
|
77
|
+
@include meta.load-css('guide-sdk-tree');
|
|
78
|
+
@include meta.load-css('guide-content');
|
|
78
79
|
|
|
79
80
|
// API
|
|
80
|
-
@
|
|
81
|
-
@
|
|
82
|
-
@
|
|
83
|
-
@
|
|
84
|
-
@
|
|
85
|
-
@
|
|
81
|
+
@include meta.load-css('api-content');
|
|
82
|
+
@include meta.load-css('api-info-box');
|
|
83
|
+
@include meta.load-css('api-props-filter');
|
|
84
|
+
@include meta.load-css('api-tree');
|
|
85
|
+
@include meta.load-css('api-subheader');
|
|
86
|
+
@include meta.load-css('api-see-source');
|
|
86
87
|
|
|
87
88
|
// RWD
|
|
88
|
-
@
|
|
89
|
-
@
|
|
89
|
+
@include meta.load-css('rwd-menu');
|
|
90
|
+
@include meta.load-css('rwd-breadcrumbs');
|
|
90
91
|
|
|
91
92
|
// SDK
|
|
92
|
-
@
|
|
93
|
+
@include meta.load-css('pages/sdk');
|
|
93
94
|
|
|
94
95
|
// External Styles
|
|
95
|
-
@
|
|
96
|
+
@include meta.load-css('prism');
|
|
96
97
|
|
|
97
98
|
// Dark mode
|
|
98
|
-
@
|
|
99
|
+
@include meta.load-css('theme-dark');
|
|
99
100
|
|
|
100
101
|
// Dedicated print styles
|
|
101
|
-
@
|
|
102
|
+
@include meta.load-css('print');
|
|
102
103
|
|
|
103
104
|
// Components
|
|
104
|
-
@
|
|
105
|
+
@include meta.load-css('feedback-widget');
|
|
105
106
|
|
|
106
107
|
// Lightbox plugin for {@img ... } element
|
|
107
|
-
@
|
|
108
|
+
@include meta.load-css('components/lightbox');
|
|
108
109
|
|
|
109
110
|
// Toolbar icons inside guides.
|
|
110
|
-
@
|
|
111
|
+
@include meta.load-css("editor-icon");
|
|
111
112
|
|
|
112
113
|
// The warning banner feature (displayed in the header).
|
|
113
|
-
@
|
|
114
|
+
@include meta.load-css("warning-banner");
|
|
114
115
|
|
|
115
116
|
// The code switcher component
|
|
116
|
-
@
|
|
117
|
+
@include meta.load-css("code-switcher");
|
|
@@ -17,19 +17,29 @@ const codeSwitcherToolbarClass = 'code-switcher__toolbar';
|
|
|
17
17
|
|
|
18
18
|
function switchSnippetContent( originalSnippetContent, newType ) {
|
|
19
19
|
let newSnippetContent;
|
|
20
|
+
const gplComment = ' // Or \'GPL\'.';
|
|
21
|
+
const licenseKey = 'licenseKey: \'<YOUR_LICENSE_KEY>\',';
|
|
20
22
|
|
|
21
23
|
if ( newType === type.cloud ) {
|
|
22
24
|
newSnippetContent = originalSnippetContent
|
|
23
25
|
.replace( /import {/g, 'const {' )
|
|
24
26
|
.replace( /} from/g, '} =' )
|
|
25
27
|
.replace( /'ckeditor5';/g, 'CKEDITOR;' )
|
|
26
|
-
.replace( /'ckeditor5-premium-features'/g, 'CKEDITOR_PREMIUM_FEATURES' )
|
|
28
|
+
.replace( /'ckeditor5-premium-features'/g, 'CKEDITOR_PREMIUM_FEATURES' )
|
|
29
|
+
.replace( `${ licenseKey }${ gplComment }`, licenseKey );
|
|
27
30
|
} else if ( newType === type.selfHosted ) {
|
|
28
31
|
newSnippetContent = originalSnippetContent
|
|
29
32
|
.replace( /const {/g, 'import {' )
|
|
30
33
|
.replace( /} =/g, '} from' )
|
|
31
34
|
.replace( /CKEDITOR;/g, '\'ckeditor5\';' )
|
|
32
|
-
.replace( /CKEDITOR_PREMIUM_FEATURES/g, '\'ckeditor5-premium-features\'' )
|
|
35
|
+
.replace( /CKEDITOR_PREMIUM_FEATURES/g, '\'ckeditor5-premium-features\'' )
|
|
36
|
+
.replace( licenseKey, ( match, _, wholeString ) => {
|
|
37
|
+
if ( wholeString.includes( gplComment ) ) {
|
|
38
|
+
return match;
|
|
39
|
+
} else {
|
|
40
|
+
return `${ match }${ gplComment }`;
|
|
41
|
+
}
|
|
42
|
+
} );
|
|
33
43
|
}
|
|
34
44
|
|
|
35
45
|
return newSnippetContent;
|