markdown-up 4.0.1 → 4.0.3
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/lib/app.js +4 -3
- package/package.json +1 -1
package/lib/app.js
CHANGED
|
@@ -71,7 +71,7 @@ enum MarkdownUpView
|
|
|
71
71
|
* @property {?number} [fontSize = 12] - The font size, in points
|
|
72
72
|
* @property {?Object} [globals = null] - Global script runtime variables
|
|
73
73
|
* @property {?string} [helpURL] - The help URL
|
|
74
|
-
* @property {?number} [lineHeight = 1.
|
|
74
|
+
* @property {?number} [lineHeight = 1.3] - The line height, in em
|
|
75
75
|
* @property {?string} [markdownText = null] - The default Markdown text
|
|
76
76
|
* @property {?boolean} [menu = true] - If true, show the menu
|
|
77
77
|
* @property {?string} [systemPrefix] - The markdown-script system include prefix
|
|
@@ -108,7 +108,7 @@ export class MarkdownUp {
|
|
|
108
108
|
this.fontSize = (options !== null ? options.fontSize : null) ?? 12;
|
|
109
109
|
this.globals = (options !== null ? options.globals : null) ?? null;
|
|
110
110
|
this.helpURL = (options !== null ? options.helpURL : null) ?? defaultHelpURL;
|
|
111
|
-
this.lineHeight = (options !== null ? options.lineHeight : null) ?? 1.
|
|
111
|
+
this.lineHeight = (options !== null ? options.lineHeight : null) ?? 1.3;
|
|
112
112
|
this.markdownText = (options !== null ? options.markdownText : null) ?? null;
|
|
113
113
|
this.menu = (options !== null ? options.menu : null) ?? true;
|
|
114
114
|
this.systemPrefix = (options !== null ? options.systemPrefix : null) ?? defaultSystemPrefix;
|
|
@@ -153,6 +153,7 @@ export class MarkdownUp {
|
|
|
153
153
|
// Set the colors
|
|
154
154
|
const isDarkMode = this.paramsLocal.darkMode ?? this.darkMode;
|
|
155
155
|
this.window.document.documentElement.style.setProperty('--barescript-dark-mode', isDarkMode ? '1' : '0');
|
|
156
|
+
this.window.document.documentElement.style.colorScheme = isDarkMode ? 'dark' : 'light';
|
|
156
157
|
|
|
157
158
|
// Set the font size
|
|
158
159
|
const fontSize = this.paramsLocal.fontSize ?? this.fontSize;
|
|
@@ -607,7 +608,7 @@ export class MarkdownUp {
|
|
|
607
608
|
'path': 'M4,22 L10,2 L14,2 L20,22 M6,12.5 L18,12.5',
|
|
608
609
|
'strokeWidth': 4
|
|
609
610
|
}),
|
|
610
|
-
this.menuValueCycle('lineHeight', 1.
|
|
611
|
+
this.menuValueCycle('lineHeight', 1.3, [1.2, 1.3, 1.5, 1.7, 2.0], null, {
|
|
611
612
|
'path2': 'M2,3 L22,3 M2,9 L22,9 M2,15 L22,15 M2,21 L22,21'
|
|
612
613
|
}),
|
|
613
614
|
this.menuValueToggle('debug', {
|