Skip to content

Commit 1c25f97

Browse files
authored
0.8.11 (#1896)
* feat: Updated crossnote to 0.9.7 * doc: Fixed CHANGELOG.md * ci: Fixed prettier format
1 parent e131100 commit 1c25f97

File tree

5 files changed

+45
-6
lines changed

5 files changed

+45
-6
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.8.11] - 2023-12-10
11+
12+
Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.9.7](https://github.com/shd101wyy/crossnote/releases/tag/0.9.7).
13+
14+
### New features
15+
16+
- Added `enablePreviewZenMode` option and reorganized the right-click context menu.
17+
18+
![image](https://github.com/shd101wyy/crossnote/assets/1908863/26e2237e-c6e2-433e-a063-6de2c01a64bb)
19+
20+
### Bug fixes
21+
22+
- Fixed rendering `vega-lite` in `Reveal.js` slide: https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1880
23+
- Removed one github-dark background css attribute: https://github.com/shd101wyy/crossnote/issues/344
24+
1025
## [0.8.10] - 2023-10-26
1126

1227
Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.9.6](https://github.com/shd101wyy/crossnote/releases/tag/0.9.6).

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "markdown-preview-enhanced",
33
"displayName": "%displayName%",
4-
"version": "0.8.10",
4+
"version": "0.8.11",
55
"description": "%description%",
66
"categories": [
77
"Other"
@@ -594,6 +594,11 @@
594594
"description": "Always show backlinks in preview.",
595595
"default": false,
596596
"type": "boolean"
597+
},
598+
"markdown-preview-enhanced.enablePreviewZenMode": {
599+
"description": "Enable this option will hide unnecessary UI elements in preview unless your mouse is over it.",
600+
"default": false,
601+
"type": "boolean"
597602
}
598603
}
599604
},
@@ -674,7 +679,7 @@
674679
"@types/crypto-js": "^4.1.2",
675680
"@types/vfile": "^3.0.2",
676681
"async-mutex": "^0.4.0",
677-
"crossnote": "^0.9.6",
682+
"crossnote": "^0.9.7",
678683
"crypto-js": "^4.2.0"
679684
},
680685
"devDependencies": {

src/config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export class MarkdownPreviewEnhancedConfig implements NotebookConfig {
8989
public readonly jsdelivrCdnHost: string;
9090
public readonly krokiServer: string;
9191
public readonly alwaysShowBacklinksInPreview: boolean;
92+
public readonly enablePreviewZenMode: boolean;
9293
public readonly wikiLinkTargetFileExtension: string;
9394
public readonly wikiLinkTargetFileNameChangeCase: WikiLinkTargetFileNameChangeCase;
9495
// Don't set values for these properties in constructor:
@@ -247,6 +248,9 @@ export class MarkdownPreviewEnhancedConfig implements NotebookConfig {
247248
this.alwaysShowBacklinksInPreview =
248249
getMPEConfig<boolean>('alwaysShowBacklinksInPreview') ??
249250
defaultConfig.alwaysShowBacklinksInPreview;
251+
this.enablePreviewZenMode =
252+
getMPEConfig<boolean>('enablePreviewZenMode') ??
253+
defaultConfig.enablePreviewZenMode;
250254
this.wikiLinkTargetFileExtension =
251255
getMPEConfig<string>('wikiLinkTargetFileExtension') ??
252256
defaultConfig.wikiLinkTargetFileExtension;

src/extension-common.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,14 @@ export async function initExtensionCommon(context: vscode.ExtensionContext) {
382382
updateMPEConfig('previewTheme', theme, true);
383383
}
384384

385+
function togglePreviewZenMode(uri) {
386+
updateMPEConfig(
387+
'enablePreviewZenMode',
388+
!getMPEConfig<boolean>('enablePreviewZenMode'),
389+
true,
390+
);
391+
}
392+
385393
function setCodeBlockTheme(uri, theme) {
386394
updateMPEConfig('codeBlockTheme', theme, true);
387395
}
@@ -1131,6 +1139,13 @@ export async function initExtensionCommon(context: vscode.ExtensionContext) {
11311139
),
11321140
);
11331141

1142+
context.subscriptions.push(
1143+
vscode.commands.registerCommand(
1144+
'_crossnote.togglePreviewZenMode',
1145+
togglePreviewZenMode,
1146+
),
1147+
);
1148+
11341149
context.subscriptions.push(
11351150
vscode.commands.registerCommand(
11361151
'_crossnote.setCodeBlockTheme',

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,10 +1920,10 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
19201920
shebang-command "^2.0.0"
19211921
which "^2.0.1"
19221922

1923-
crossnote@^0.9.6:
1924-
version "0.9.6"
1925-
resolved "https://registry.yarnpkg.com/crossnote/-/crossnote-0.9.6.tgz#cda4f4f705762e08c11dacedf0ed9d90fa4fb144"
1926-
integrity sha512-jNJmYj7Q7YWI3Sm7omAezPQbPSo+LO+AmklA/Zr5PpKGGwblyClW/ESmxipxVhQ9zr2SMn9aUVNrglynemusuA==
1923+
crossnote@^0.9.7:
1924+
version "0.9.7"
1925+
resolved "https://registry.yarnpkg.com/crossnote/-/crossnote-0.9.7.tgz#eb52ed28669c6149cfe5eab0542c9d1bf87879a1"
1926+
integrity sha512-CsFBTstVWHpbHGH0h+3scwfu4xVljIIEEydVLkDCJwM50S71uSGCTMfBPtF1EdWd1GA3DNBJ2uDzR2x/6XtNiw==
19271927
dependencies:
19281928
"@headlessui/react" "^1.7.17"
19291929
"@heroicons/react" "^2.0.18"

0 commit comments

Comments
 (0)