vscode-colaview 0.4.0 โ 0.4.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/.vscode/settings.json +1 -1
- package/CHANGELOG.md +67 -32
- package/README.md +62 -95
- package/README_CN.md +61 -94
- package/RELEASE_NOTES.md +87 -20
- package/assets/gallery/academic-paper.png +0 -0
- package/assets/gallery/builtin-bear.png +0 -0
- package/assets/gallery/builtin-dark.png +0 -0
- package/assets/gallery/builtin-dracula.png +0 -0
- package/assets/gallery/builtin-elegant.png +0 -0
- package/assets/gallery/builtin-gruvbox.png +0 -0
- package/assets/gallery/builtin-light.png +0 -0
- package/assets/gallery/builtin-midnight.png +0 -0
- package/assets/gallery/builtin-nord.png +0 -0
- package/assets/gallery/builtin-notion.png +0 -0
- package/assets/gallery/builtin-sepia.png +0 -0
- package/assets/gallery/builtin-solarized-dark.png +0 -0
- package/assets/gallery/builtin-writer.png +0 -0
- package/assets/gallery/forest-ink.png +0 -0
- package/assets/gallery/pink-script-dark.png +0 -0
- package/assets/gallery/swiss-design.png +0 -0
- package/assets/gallery/trae-blue.png +0 -0
- package/package.json +204 -203
- package/src/assets/local-images.ts +187 -0
- package/src/export/pdf-exporter.ts +18 -0
- package/src/present/presenter.ts +25 -0
- package/src/preview/preview-manager.ts +24 -14
- package/src/preview/webview/app.ts +131 -0
- package/src/slides/deck.ts +11 -0
- package/src/slides/markdown.ts +27 -0
- package/src/slides/render.ts +175 -87
- package/src/themes/built-in/bear.css +89 -89
- package/src/themes/built-in/dark.css +87 -87
- package/src/themes/built-in/dracula.css +93 -93
- package/src/themes/built-in/elegant.css +109 -109
- package/src/themes/built-in/gruvbox.css +97 -97
- package/src/themes/built-in/light.css +80 -80
- package/src/themes/built-in/midnight.css +93 -93
- package/src/themes/built-in/nord.css +93 -93
- package/src/themes/built-in/notion.css +98 -98
- package/src/themes/built-in/sepia.css +99 -99
- package/src/themes/built-in/solarized-dark.css +94 -94
- package/src/themes/built-in/writer.css +99 -99
- package/src/types/pele-lazy.d.ts +21 -0
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## v0.4.3 (2026-12-05)
|
|
4
|
+
|
|
5
|
+
### ๐ฏ Slides Now Match the Reference Deck
|
|
6
|
+
|
|
7
|
+
Slide decks rendered in the preview, in fullscreen presenting and in the exported PDF were only partially themed: the cover and section titles appeared in white body text at the wrong size, while the agenda, KPI, quote and matrix pages lost their intended typography and accent colors.
|
|
8
|
+
|
|
9
|
+
The themed slide design is now applied everywhere, so:
|
|
10
|
+
|
|
11
|
+
- cover and section titles use the theme's display face and accent color;
|
|
12
|
+
- agenda, KPI, quote and matrix pages follow the reference type scale, hairlines and colors;
|
|
13
|
+
- preview, fullscreen presenting and slide PDF share one 1920ร1080 layout, including page margins.
|
|
14
|
+
|
|
15
|
+
The bundled `pink-script-dark` theme now ships exactly as published in ColaMD-themes.
|
|
16
|
+
|
|
17
|
+
## v0.4.2 (2026-12-05)
|
|
18
|
+
|
|
19
|
+
### ๐ผ๏ธ Local Images Now Render Everywhere
|
|
20
|
+
|
|
21
|
+
Markdown images that use a path relative to the document (for example ``) previously appeared as raw `` text in the preview. Such images now display correctly in the document preview, slide deck, fullscreen presenting and HTML/PDF exports.
|
|
22
|
+
|
|
23
|
+
### ๐ฏ Consistent Slide Layout Across Preview, Presenting and PDF
|
|
24
|
+
|
|
25
|
+
Paged preview, fullscreen presenting and slide PDF export now share the same 1920ร1080 paper layout and typography:
|
|
26
|
+
|
|
27
|
+
- **Same typography everywhere** โ preview, presenting and exported slides use one type scale, including cover and closing pages.
|
|
28
|
+
- **One slide per `---`** โ each separator produces exactly one slide; content that does not fit is scaled down as a whole instead of being split into extra pages.
|
|
29
|
+
- **Refined layout** โ cover and closing pages are vertically centred, while section and content pages stay top-aligned.
|
|
30
|
+
|
|
31
|
+
### ๐งน Cleaner Slides
|
|
32
|
+
|
|
33
|
+
Slides no longer include a generated brand header or a page-number footer: preview, presenting and exports show only the Markdown content. Quote blocks no longer display an extra `>` marker, and long titles keep their intended size.
|
|
34
|
+
|
|
35
|
+
### ๐จ Theme Update
|
|
36
|
+
|
|
37
|
+
The `pink-script-dark` theme now uses a serif face for quote text, matching the reference design.
|
|
38
|
+
|
|
39
|
+
### ๐ README Refresh
|
|
40
|
+
|
|
41
|
+
The README now opens with a Chinese/English switch and a theme preview gallery, and adds Marketplace and VSIX installation steps, a quick-start walkthrough, custom-theme guidance and consolidated release-note links.
|
|
42
|
+
|
|
43
|
+
## v0.4.1 (2026-12-03)
|
|
44
|
+
|
|
45
|
+
### ๐ฌ Slides Preview: Mermaid & Math Now Render
|
|
46
|
+
|
|
47
|
+
In the slides deck, ` ```mermaid ` fences and `$$โฆ$$` block math were drawn as raw source lines โ the slides render layer is a standalone renderer and had no widget support. Worse, the deck paginator splits oversized code blocks by line budget, so a long mermaid fence was chopped into invalid partial sources that failed mermaid parsing with "Syntax error in text".
|
|
48
|
+
|
|
49
|
+
Two fixes:
|
|
50
|
+
|
|
51
|
+
- **Mermaid fences are never split** โ `splitBlock` keeps a mermaid block whole (an oversized diagram occupies a page on its own).
|
|
52
|
+
- **Hydration** โ the renderer emits placeholder containers (source kept in a hidden node), and the WebView hydrates them after each deck render: mermaid diagrams become inline SVG (upstream `slides.css` `.mermaid-svg` contract), block math becomes KaTeX HTML. When rendering fails, the source stays visible as a fallback. The WebView bundle grows from 3.6MB to ~11MB because mermaid and KaTeX are now inlined alongside the engine.
|
|
53
|
+
|
|
54
|
+
### ๐ Present (Fullscreen): Browser Opens Reliably + Mermaid Included
|
|
55
|
+
|
|
56
|
+
Two presenting problems fixed:
|
|
57
|
+
|
|
58
|
+
- **"File not found" error on Windows** โ opening a temporary `file:` link through the system shell could fail to resolve file associations. Presenting now opens the file through the platform command โ `start "" "<file>"` on Windows, `open` on macOS, `xdg-open` on Linux โ with `openExternal` as a fallback and the file path in the error message if both fail.
|
|
59
|
+
- **No mermaid content in the present window / slides PDF** โ the standalone documents now embed a CDN hydration script (mermaid + KaTeX) that fills the same placeholder containers, and the slides PDF exporter waits for hydration (`window.__colaviewSlidesHydrated`) before printing. Offline, the source stays visible as a fallback.
|
|
60
|
+
|
|
61
|
+
### ๐ฏ Slide Rendering Aligned with ColaMD-themes / ColaMD-extend
|
|
62
|
+
|
|
63
|
+
Three mechanisms ported from the two upstream implementations:
|
|
64
|
+
|
|
65
|
+
- **Mermaid renders through pele** (the same renderer ColaMD-extend uses via `pele/lazy`) โ instead of configuring mermaid themes, the SVG references `var(--pele-*)` tokens that DECK_CSS injects on the holder (the same mapping as the document preview), so diagrams inherit the active theme exactly and stop looking like pasted-in neutral-theme pictures. The WebView hydrates with `pele/lazy` (bundled); the standalone present/PDF document loads the pele global build from CDN and renders synchronously.
|
|
66
|
+
- **Per-page fit via font-size shrink** (from ColaMD-themes `fitPaper`, `dsh-preview.ts`) โ replaces the previous `zoom` approach: `zoom` changes the pages' cqw/cqh container-query size and is unreliable in presenting and printing. The fit shrinks the page content font by `room/need ร 0.98` per pass (8 passes, 50% floor), re-runs on `fonts.ready` / `load` and is exposed as `window.__colaviewFitSlides`.
|
|
67
|
+
- **Refit after hydration** โ mermaid and KaTeX change each page's content height, so the hydration script re-runs the fit when it finishes.
|
|
68
|
+
- **Blank directive-only pages filtered** (from ColaMD-extend `deckPages`, `slideshow.ts`) โ slides carrying no title, lead, kicker or blocks no longer produce empty paper sheets in presenting and printing. The slides PDF exporter additionally fits under print media before printing.
|
|
69
|
+
|
|
3
70
|
## v0.4.0 (2026-12-01)
|
|
4
71
|
|
|
5
72
|
### ๐ง Engine Upgrade โ ColaMD 2.8.2, No More Patches
|
|
@@ -28,8 +95,8 @@ Two rules mirrored from ColaMD-extend's `docx-style.ts`: dark themes fall back e
|
|
|
28
95
|
|
|
29
96
|
The editor context menu now offers just "Show Preview" and "Show Slides Preview" โ exports and presenting live in the preview panel and the Command Palette. The preview context menu keeps **Present (Fullscreen)** pinned first and scopes exports to the current mode: documents get PDF / HTML / Word, slides get PDF / PPTX.
|
|
30
97
|
|
|
31
|
-
The theme submenu is grouped into Built-in ยท Light / Built-in ยท Dark / Custom with a scrollable max-height (70vh), so a long list of custom `.themes/` files no longer runs off the page.
|
|
32
|
-
|
|
98
|
+
The theme submenu is grouped into Built-in ยท Light / Built-in ยท Dark / Custom with a scrollable max-height (70vh), so a long list of custom `.themes/` files no longer runs off the page.
|
|
99
|
+
|
|
33
100
|
Command titles are localized through `package.nls.json` / `package.nls.zh-cn.json` โ menus and the Command Palette follow the VS Code display language. The preview commands also gain conflict-free keybindings: `Ctrl+Alt+V` opens the preview and `Ctrl+Alt+S` the slides preview, both scoped to Markdown files so Save (`Ctrl+S`) keeps working.
|
|
34
101
|
|
|
35
102
|
### ๐ฏ Rendering Aligned with the DSH Plugin
|
|
@@ -78,23 +145,23 @@ Mermaid diagrams looked centered in the preview but sat flush against the left e
|
|
|
78
145
|
|
|
79
146
|
Diagram colors are derived from the theme's code-block background (`--code-block-bg`), and in ColaMD the diagram is drawn on that block background. ColaView's preview and exports instead floated the diagram on the plain page background โ most visible with Elegant and Bear, whose light pages pair with dark code blocks, so the dark diagram stood on white instead of on the dark block.
|
|
80
147
|
|
|
81
|
-
The preview (`index.html`) now paints `.cm-md-mermaid` with the code-block background (6px radius, `0.8em 1em` padding), and the export CSS (`preview-manager.ts`) applies the same block to the serialized mermaid wrapper, so preview, PDF and HTML exports match ColaMD.
|
|
82
|
-
|
|
83
|
-
### ๐จ Mermaid Colors Now Match the Preview in Every Theme
|
|
84
|
-
|
|
85
|
-
With non-Elegant themes, diagrams in exported PDF/HTML used a different color set than the preview โ nodes, edges and labels drifted toward pele's built-in light palette instead of the theme's own tones.
|
|
86
|
-
|
|
87
|
-
**Root cause:** the export stylesheet re-declared the `--pele-*` color tokens on `div:has(> svg.pele)`, a selector that never matches the serialized `<p><svg class="pele">โฆ</svg></p>` markup. The declarations were dead, and diagrams fell back to pele's defaults.
|
|
88
|
-
|
|
89
|
-
**Fix:** exports now use the tokens that `buildExportHTML` already collects from the preview's `.cm-md-mermaid` into `:root` โ those are the exact colors the preview renders with, including any explicit overrides from custom themes. The derived token block is injected only when the runtime values are missing (e.g. no rendered mermaid node at export time), so no theme-aware value is ever overwritten.
|
|
90
|
-
|
|
91
|
-
### ๐งน Removed Ineffective Settings
|
|
92
|
-
|
|
93
|
-
Four entries in the settings page did nothing, and they are now gone:
|
|
94
|
-
|
|
95
|
-
- `colaview.plugins.math` / `colaview.plugins.mermaid` โ no-ops since v0.3.0, because math and Mermaid are built into the engine and cannot be toggled.
|
|
96
|
-
- `colaview.pdfMethod` / `colaview.customThemesPath` โ never read by the extension (PDF always uses the local Chrome pipeline, themes always come from the workspace `.themes` directory).
|
|
97
|
-
|
|
148
|
+
The preview (`index.html`) now paints `.cm-md-mermaid` with the code-block background (6px radius, `0.8em 1em` padding), and the export CSS (`preview-manager.ts`) applies the same block to the serialized mermaid wrapper, so preview, PDF and HTML exports match ColaMD.
|
|
149
|
+
|
|
150
|
+
### ๐จ Mermaid Colors Now Match the Preview in Every Theme
|
|
151
|
+
|
|
152
|
+
With non-Elegant themes, diagrams in exported PDF/HTML used a different color set than the preview โ nodes, edges and labels drifted toward pele's built-in light palette instead of the theme's own tones.
|
|
153
|
+
|
|
154
|
+
**Root cause:** the export stylesheet re-declared the `--pele-*` color tokens on `div:has(> svg.pele)`, a selector that never matches the serialized `<p><svg class="pele">โฆ</svg></p>` markup. The declarations were dead, and diagrams fell back to pele's defaults.
|
|
155
|
+
|
|
156
|
+
**Fix:** exports now use the tokens that `buildExportHTML` already collects from the preview's `.cm-md-mermaid` into `:root` โ those are the exact colors the preview renders with, including any explicit overrides from custom themes. The derived token block is injected only when the runtime values are missing (e.g. no rendered mermaid node at export time), so no theme-aware value is ever overwritten.
|
|
157
|
+
|
|
158
|
+
### ๐งน Removed Ineffective Settings
|
|
159
|
+
|
|
160
|
+
Four entries in the settings page did nothing, and they are now gone:
|
|
161
|
+
|
|
162
|
+
- `colaview.plugins.math` / `colaview.plugins.mermaid` โ no-ops since v0.3.0, because math and Mermaid are built into the engine and cannot be toggled.
|
|
163
|
+
- `colaview.pdfMethod` / `colaview.customThemesPath` โ never read by the extension (PDF always uses the local Chrome pipeline, themes always come from the workspace `.themes` directory).
|
|
164
|
+
|
|
98
165
|
The dead `togglePlugin` message plumbing and no-op configuration listeners were removed with them. The settings page now shows only `colaview.theme`, `colaview.autoPreview` and `colaview.scrollSync`.
|
|
99
166
|
|
|
100
167
|
### ๐ Preview: Blocks No Longer Vanish After Viewing Their Source
|
|
@@ -109,7 +176,7 @@ Clicking a rendered mermaid diagram or block formula reveals its source (per Col
|
|
|
109
176
|
|
|
110
177
|
Two independent bugs made every formula/diagram image in the exported `.docx` broken:
|
|
111
178
|
|
|
112
|
-
1. **Corrupt image data** โ puppeteer v25's `screenshot()` returns a `Uint8Array`; `Uint8Array.toString('base64')` ignores the argument and emits a comma-joined decimal byte string (`137,80,78,โฆ`), which is not base64. The `.docx` image parser rejected it, so formulas/diagrams appeared as `[
|
|
179
|
+
1. **Corrupt image data** โ puppeteer v25's `screenshot()` returns a `Uint8Array`; `Uint8Array.toString('base64')` ignores the argument and emits a comma-joined decimal byte string (`137,80,78,โฆ`), which is not base64. The `.docx` image parser rejected it, so formulas/diagrams appeared as `[Formula 1]` placeholder text. Screenshots are now converted with `Buffer.from()`.
|
|
113
180
|
2. **Wrong glyph fonts** โ the screenshot page inlines `katex.min.css`, but its relative `url(fonts/*.woff2)` references cannot resolve on a `page.setContent` page (about:blank base URL), so KaTeX fell back to system fonts. KaTeX fonts are now inlined as base64 data URIs at render time; the build also copies the font files to `out/assets/katex-fonts/` for packaged installs.
|
|
114
181
|
|
|
115
182
|
### ๐จ Exports Match the Preview's Theme Colors
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,203 +1,204 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vscode-colaview",
|
|
3
|
-
"displayName": "ColaView MD",
|
|
4
|
-
"version": "0.4.
|
|
5
|
-
"publisher": "bytechain",
|
|
6
|
-
"description": "ColaMD Preview โ Rich Markdown Preview & PDF/HTML Export for VSCode",
|
|
7
|
-
"icon": "icon.png",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/bytechain/vscode-colaview.git"
|
|
11
|
-
},
|
|
12
|
-
"license": "MIT",
|
|
13
|
-
"engines": {
|
|
14
|
-
"vscode": "^1.85.0"
|
|
15
|
-
},
|
|
16
|
-
"categories": [
|
|
17
|
-
"Other"
|
|
18
|
-
],
|
|
19
|
-
"activationEvents": [
|
|
20
|
-
"onLanguage:markdown",
|
|
21
|
-
"onCommand:colaview.showPreview",
|
|
22
|
-
"onCommand:colaview.showSlides",
|
|
23
|
-
"onCommand:colaview.presentDocument",
|
|
24
|
-
"onCommand:colaview.presentSlides",
|
|
25
|
-
"onCommand:colaview.exportPDF",
|
|
26
|
-
"onCommand:colaview.exportHTML",
|
|
27
|
-
"onCommand:colaview.exportWord",
|
|
28
|
-
"onCommand:colaview.exportSlidesPDF",
|
|
29
|
-
"onCommand:colaview.exportSlidesHTML",
|
|
30
|
-
"onCommand:colaview.exportPPTX"
|
|
31
|
-
],
|
|
32
|
-
"main": "./out/extension.js",
|
|
33
|
-
"contributes": {
|
|
34
|
-
"commands": [
|
|
35
|
-
{
|
|
36
|
-
"command": "colaview.showPreview",
|
|
37
|
-
"title": "%colaview.commands.showPreview%",
|
|
38
|
-
"icon": "$(open-preview)"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"command": "colaview.showSlides",
|
|
42
|
-
"title": "%colaview.commands.showSlides%",
|
|
43
|
-
"icon": "$(preview)"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"command": "colaview.presentDocument",
|
|
47
|
-
"title": "%colaview.commands.presentDocument%"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"command": "colaview.presentSlides",
|
|
51
|
-
"title": "%colaview.commands.presentSlides%"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"command": "colaview.exportPDF",
|
|
55
|
-
"title": "%colaview.commands.exportPDF%",
|
|
56
|
-
"icon": "$(export)"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"command": "colaview.exportHTML",
|
|
60
|
-
"title": "%colaview.commands.exportHTML%",
|
|
61
|
-
"icon": "$(export)"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"command": "colaview.exportWord",
|
|
65
|
-
"title": "%colaview.commands.exportWord%",
|
|
66
|
-
"icon": "$(export)"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"command": "colaview.exportSlidesPDF",
|
|
70
|
-
"title": "%colaview.commands.exportSlidesPDF%"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"command": "colaview.exportSlidesHTML",
|
|
74
|
-
"title": "%colaview.commands.exportSlidesHTML%"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"command": "colaview.exportPPTX",
|
|
78
|
-
"title": "%colaview.commands.exportPPTX%"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"command": "colaview.switchTheme",
|
|
82
|
-
"title": "%colaview.commands.switchTheme%"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"command": "colaview.importTheme",
|
|
86
|
-
"title": "%colaview.commands.importTheme%"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"menus": {
|
|
90
|
-
"editor/title": [
|
|
91
|
-
{
|
|
92
|
-
"command": "colaview.showPreview",
|
|
93
|
-
"group": "navigation"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"command": "colaview.showSlides",
|
|
97
|
-
"group": "navigation"
|
|
98
|
-
}
|
|
99
|
-
],
|
|
100
|
-
"editor/context": [
|
|
101
|
-
{
|
|
102
|
-
"command": "colaview.showPreview",
|
|
103
|
-
"group": "1_colaview"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"command": "colaview.showSlides",
|
|
107
|
-
"group": "1_colaview"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"explorer/context": [
|
|
111
|
-
{
|
|
112
|
-
"command": "colaview.exportPDF",
|
|
113
|
-
"group": "1_colaview"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"command": "colaview.exportHTML",
|
|
117
|
-
"group": "1_colaview"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"command": "colaview.exportWord",
|
|
121
|
-
"group": "1_colaview"
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
"configuration": {
|
|
126
|
-
"title": "ColaView MD",
|
|
127
|
-
"properties": {
|
|
128
|
-
"colaview.theme": {
|
|
129
|
-
"type": "string",
|
|
130
|
-
"default": "elegant",
|
|
131
|
-
"enum": [
|
|
132
|
-
"light",
|
|
133
|
-
"dark",
|
|
134
|
-
"elegant",
|
|
135
|
-
"sepia",
|
|
136
|
-
"notion",
|
|
137
|
-
"bear",
|
|
138
|
-
"writer",
|
|
139
|
-
"solarized-dark",
|
|
140
|
-
"nord",
|
|
141
|
-
"gruvbox",
|
|
142
|
-
"dracula",
|
|
143
|
-
"midnight"
|
|
144
|
-
],
|
|
145
|
-
"description": "Visual theme for preview and export"
|
|
146
|
-
},
|
|
147
|
-
"colaview.autoPreview": {
|
|
148
|
-
"type": "boolean",
|
|
149
|
-
"default": false,
|
|
150
|
-
"description": "Auto show preview on opening Markdown"
|
|
151
|
-
},
|
|
152
|
-
"colaview.scrollSync": {
|
|
153
|
-
"type": "boolean",
|
|
154
|
-
"default": false,
|
|
155
|
-
"description": "Enable scroll sync between editor and preview"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
"keybindings": [
|
|
160
|
-
{
|
|
161
|
-
"command": "colaview.showPreview",
|
|
162
|
-
"key": "ctrl+alt+v",
|
|
163
|
-
"when": "editorLangId == markdown"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"command": "colaview.showSlides",
|
|
167
|
-
"key": "ctrl+alt+s",
|
|
168
|
-
"when": "editorLangId == markdown"
|
|
169
|
-
}
|
|
170
|
-
]
|
|
171
|
-
},
|
|
172
|
-
"scripts": {
|
|
173
|
-
"vscode:prepublish": "npm run esbuild-base -- --production",
|
|
174
|
-
"esbuild-base": "node esbuild.js",
|
|
175
|
-
"build": "node esbuild.js",
|
|
176
|
-
"watch": "node esbuild.js --watch",
|
|
177
|
-
"pretest": "npm run build",
|
|
178
|
-
"test": "node ./out/test/runTest.js",
|
|
179
|
-
"package": "vsce package",
|
|
180
|
-
"postinstall": "patch-package"
|
|
181
|
-
},
|
|
182
|
-
"dependencies": {
|
|
183
|
-
"@bytechain.cn/colamd": "2.8.2",
|
|
184
|
-
"docx": "^9.15.2",
|
|
185
|
-
"katex": "^0.16.47",
|
|
186
|
-
"mermaid": "^11.15.0",
|
|
187
|
-
"
|
|
188
|
-
"
|
|
189
|
-
"remark-
|
|
190
|
-
"
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
"@types/
|
|
195
|
-
"@types/
|
|
196
|
-
"@vscode
|
|
197
|
-
"@vscode/
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
|
|
203
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vscode-colaview",
|
|
3
|
+
"displayName": "ColaView MD",
|
|
4
|
+
"version": "0.4.3",
|
|
5
|
+
"publisher": "bytechain",
|
|
6
|
+
"description": "ColaMD Preview โ Rich Markdown Preview & PDF/HTML Export for VSCode",
|
|
7
|
+
"icon": "icon.png",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/bytechain/vscode-colaview.git"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"engines": {
|
|
14
|
+
"vscode": "^1.85.0"
|
|
15
|
+
},
|
|
16
|
+
"categories": [
|
|
17
|
+
"Other"
|
|
18
|
+
],
|
|
19
|
+
"activationEvents": [
|
|
20
|
+
"onLanguage:markdown",
|
|
21
|
+
"onCommand:colaview.showPreview",
|
|
22
|
+
"onCommand:colaview.showSlides",
|
|
23
|
+
"onCommand:colaview.presentDocument",
|
|
24
|
+
"onCommand:colaview.presentSlides",
|
|
25
|
+
"onCommand:colaview.exportPDF",
|
|
26
|
+
"onCommand:colaview.exportHTML",
|
|
27
|
+
"onCommand:colaview.exportWord",
|
|
28
|
+
"onCommand:colaview.exportSlidesPDF",
|
|
29
|
+
"onCommand:colaview.exportSlidesHTML",
|
|
30
|
+
"onCommand:colaview.exportPPTX"
|
|
31
|
+
],
|
|
32
|
+
"main": "./out/extension.js",
|
|
33
|
+
"contributes": {
|
|
34
|
+
"commands": [
|
|
35
|
+
{
|
|
36
|
+
"command": "colaview.showPreview",
|
|
37
|
+
"title": "%colaview.commands.showPreview%",
|
|
38
|
+
"icon": "$(open-preview)"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"command": "colaview.showSlides",
|
|
42
|
+
"title": "%colaview.commands.showSlides%",
|
|
43
|
+
"icon": "$(preview)"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"command": "colaview.presentDocument",
|
|
47
|
+
"title": "%colaview.commands.presentDocument%"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"command": "colaview.presentSlides",
|
|
51
|
+
"title": "%colaview.commands.presentSlides%"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"command": "colaview.exportPDF",
|
|
55
|
+
"title": "%colaview.commands.exportPDF%",
|
|
56
|
+
"icon": "$(export)"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"command": "colaview.exportHTML",
|
|
60
|
+
"title": "%colaview.commands.exportHTML%",
|
|
61
|
+
"icon": "$(export)"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"command": "colaview.exportWord",
|
|
65
|
+
"title": "%colaview.commands.exportWord%",
|
|
66
|
+
"icon": "$(export)"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"command": "colaview.exportSlidesPDF",
|
|
70
|
+
"title": "%colaview.commands.exportSlidesPDF%"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"command": "colaview.exportSlidesHTML",
|
|
74
|
+
"title": "%colaview.commands.exportSlidesHTML%"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"command": "colaview.exportPPTX",
|
|
78
|
+
"title": "%colaview.commands.exportPPTX%"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"command": "colaview.switchTheme",
|
|
82
|
+
"title": "%colaview.commands.switchTheme%"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"command": "colaview.importTheme",
|
|
86
|
+
"title": "%colaview.commands.importTheme%"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"menus": {
|
|
90
|
+
"editor/title": [
|
|
91
|
+
{
|
|
92
|
+
"command": "colaview.showPreview",
|
|
93
|
+
"group": "navigation"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"command": "colaview.showSlides",
|
|
97
|
+
"group": "navigation"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"editor/context": [
|
|
101
|
+
{
|
|
102
|
+
"command": "colaview.showPreview",
|
|
103
|
+
"group": "1_colaview"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"command": "colaview.showSlides",
|
|
107
|
+
"group": "1_colaview"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"explorer/context": [
|
|
111
|
+
{
|
|
112
|
+
"command": "colaview.exportPDF",
|
|
113
|
+
"group": "1_colaview"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"command": "colaview.exportHTML",
|
|
117
|
+
"group": "1_colaview"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"command": "colaview.exportWord",
|
|
121
|
+
"group": "1_colaview"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"configuration": {
|
|
126
|
+
"title": "ColaView MD",
|
|
127
|
+
"properties": {
|
|
128
|
+
"colaview.theme": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"default": "elegant",
|
|
131
|
+
"enum": [
|
|
132
|
+
"light",
|
|
133
|
+
"dark",
|
|
134
|
+
"elegant",
|
|
135
|
+
"sepia",
|
|
136
|
+
"notion",
|
|
137
|
+
"bear",
|
|
138
|
+
"writer",
|
|
139
|
+
"solarized-dark",
|
|
140
|
+
"nord",
|
|
141
|
+
"gruvbox",
|
|
142
|
+
"dracula",
|
|
143
|
+
"midnight"
|
|
144
|
+
],
|
|
145
|
+
"description": "Visual theme for preview and export"
|
|
146
|
+
},
|
|
147
|
+
"colaview.autoPreview": {
|
|
148
|
+
"type": "boolean",
|
|
149
|
+
"default": false,
|
|
150
|
+
"description": "Auto show preview on opening Markdown"
|
|
151
|
+
},
|
|
152
|
+
"colaview.scrollSync": {
|
|
153
|
+
"type": "boolean",
|
|
154
|
+
"default": false,
|
|
155
|
+
"description": "Enable scroll sync between editor and preview"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"keybindings": [
|
|
160
|
+
{
|
|
161
|
+
"command": "colaview.showPreview",
|
|
162
|
+
"key": "ctrl+alt+v",
|
|
163
|
+
"when": "editorLangId == markdown"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"command": "colaview.showSlides",
|
|
167
|
+
"key": "ctrl+alt+s",
|
|
168
|
+
"when": "editorLangId == markdown"
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"scripts": {
|
|
173
|
+
"vscode:prepublish": "npm run esbuild-base -- --production",
|
|
174
|
+
"esbuild-base": "node esbuild.js",
|
|
175
|
+
"build": "node esbuild.js",
|
|
176
|
+
"watch": "node esbuild.js --watch",
|
|
177
|
+
"pretest": "npm run build",
|
|
178
|
+
"test": "node ./out/test/runTest.js",
|
|
179
|
+
"package": "vsce package",
|
|
180
|
+
"postinstall": "patch-package"
|
|
181
|
+
},
|
|
182
|
+
"dependencies": {
|
|
183
|
+
"@bytechain.cn/colamd": "2.8.2",
|
|
184
|
+
"docx": "^9.15.2",
|
|
185
|
+
"katex": "^0.16.47",
|
|
186
|
+
"mermaid": "^11.15.0",
|
|
187
|
+
"pele": "^1.13.0",
|
|
188
|
+
"puppeteer-core": "^25.1.0",
|
|
189
|
+
"remark-gfm": "^4.0.1",
|
|
190
|
+
"remark-parse": "^11.0.0",
|
|
191
|
+
"unified": "^11.0.5"
|
|
192
|
+
},
|
|
193
|
+
"devDependencies": {
|
|
194
|
+
"@types/katex": "^0.16.8",
|
|
195
|
+
"@types/node": "^20.0.0",
|
|
196
|
+
"@types/vscode": "^1.85.0",
|
|
197
|
+
"@vscode/test-electron": "^2.4.0",
|
|
198
|
+
"@vscode/vsce": "^3.0.0",
|
|
199
|
+
"esbuild": "^0.28.0",
|
|
200
|
+
"eslint": "^9.0.0",
|
|
201
|
+
"patch-package": "^8.0.1",
|
|
202
|
+
"typescript": "^5.7.0"
|
|
203
|
+
}
|
|
204
|
+
}
|