dsh-markdown-typora 0.0.0-stage → 0.3.5
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/LICENSE +21 -0
- package/README.md +112 -2
- package/THIRD-PARTY-NOTICES.md +15 -0
- package/cordis.patch.yml +4 -0
- package/core.json +630 -0
- package/icon.png +0 -0
- package/lib/client.js +1423 -0
- package/lib/index.js +1120 -0
- package/package.json +68 -4
- package/renderer-cm6/cm6/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/renderer-cm6/cm6/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/renderer-cm6/cm6/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/renderer-cm6/cm6/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/renderer-cm6/cm6/app.css +1 -0
- package/renderer-cm6/cm6/app.js +1174 -0
- package/renderer-cm6/cm6/fonts/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/renderer-cm6/cm6/fonts/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/renderer-cm6/cm6/markdown-worker.js +6 -0
- package/renderer-cm6/cm6/mermaid.min.js +3636 -0
- package/renderer-cm6/dsh-bridge.js +406 -0
- package/renderer-cm6/dsh-selection.js +345 -0
- package/renderer-cm6/index.html +173 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ltmroberthk915
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,113 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-markdown-typora
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**A Markdown editor for the DeepSeek Harness right sidebar, built on MarkPilot CM6 3.6.9.**
|
|
4
|
+
|
|
5
|
+
Write Markdown in DSH with Typora-style live rendering; select a passage and send its **Markdown source** straight into the current conversation.
|
|
6
|
+
|
|
7
|
+
## Screenshots
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| **Selection → chat, inside DSH**<br> | **A formula block, Typora-style — click a glyph and the source caret lands on it**<br> |
|
|
12
|
+
| **Notion dark**<br> | **护眼米黄 (sepia light)**<br> |
|
|
13
|
+
| **9 themes, switchable from the toolbar**<br> | **A selection that crosses inline formulas**<br> |
|
|
14
|
+
| **Table cells are real cells**<br> | **Images render in the document**<br> |
|
|
15
|
+
|
|
16
|
+
## Beyond Typora, inside DSH
|
|
17
|
+
|
|
18
|
+
- **Click a formula to edit its source** — block and inline math expand to the editable `$…$` source in place, and return to the rendered form when the caret leaves.
|
|
19
|
+
- **Selections keep formulas whole** — a selection that crosses inline math carries complete formulas; copy and cut hand back the Markdown source, not the rendered glyphs.
|
|
20
|
+
- **Table cells, not table text** — an alignment toolbar appears over the table, with row/column operations, escaped pipes, Chinese IME composition and undo/redo kept in sync with the cell source.
|
|
21
|
+
- **Nine built-in themes** — 宋韵 (dark/light), Notion (dark/light), Solarized (dark/light), GitHub dark, 护眼米黄 and 柔和淡绿. Follow the host, or pick one from the toolbar.
|
|
22
|
+
- **Live Mermaid, KaTeX and the Markdown worker, all offline** — diagrams, math and fonts load from the plugin; there is no CDN in the path.
|
|
23
|
+
- **Large documents** — the Markdown syntax tree is built in a web worker, so a 150,000-character document loads and accepts typing without the UI thread parsing it.
|
|
24
|
+
- **Selection → chat** — the DSH-specific move: the selection's Markdown source goes into the current conversation from the floating button or `Ctrl/Cmd + Shift + Enter`.
|
|
25
|
+
- **Guarded saves** — version-checked writes, a conflict banner instead of an overwrite, and a recovery slot when a tab closes with unsaved edits.
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- **Real editor, not a preview** — CodeMirror 6 with live headings, lists, tables, inline math, code blocks and Mermaid.
|
|
30
|
+
- **Selection → chat** — a floating **Insert into chat** button appears beside a selection; `Ctrl/Cmd + Shift + Enter` does the same. The payload starts with the document's absolute path, then a blank line and the Markdown source (not the rendered text), inserted at the composer caret without stealing focus.
|
|
31
|
+
- **Guarded saves** — debounced autosave with version checks; `Ctrl/Cmd + S` saves immediately with a visible result, whether the caret is in the editor or elsewhere in the panel. An external edit is never overwritten. A dirty buffer is kept in a recovery slot when the tab closes.
|
|
32
|
+
- **Save files outside the session workspace** — a file opened from the sidebar saves directly to its own folder even when it sits outside the workspace root of the current session; version checks and conflict warnings are unchanged. Files that are read-only or locked at the OS level still report an error.
|
|
33
|
+
- **Theme-aware** — follows the host's light/dark theme, including the first frame.
|
|
34
|
+
- **Offline assets** — KaTeX fonts, the Markdown worker and Mermaid ship with the plugin; no CDN.
|
|
35
|
+
- **Document reference** — type `@mp` in the composer to reference the open document.
|
|
36
|
+
- **Local images in the document** — `` and parent-folder references such as `` render in the panel, read through the plugin's own read-only image route; a file that is genuinely missing still shows an explicit placeholder instead of an empty box.
|
|
37
|
+
- **Edit right beside an image** — a click in the blank to the right of an image starts editing on the following line (headings, lists and task items keep their markers), instead of opening the image's Markdown source; clicking the image itself still opens its source.
|
|
38
|
+
|
|
39
|
+
## What's new in the 3.6.9 engine
|
|
40
|
+
|
|
41
|
+
The editor engine is the same accepted build that ships with MarkPilot 3.6.9:
|
|
42
|
+
|
|
43
|
+
- **Image right-side clicks** — the blank to the right of an image edits the following line; the image itself still opens its source, and a click in the editor's right gutter no longer drops the caret.
|
|
44
|
+
- **Source view for long documents** — documents that carry embedded images can now show the rendered page and editable source side by side.
|
|
45
|
+
- **Embedded-image protection** — body text and the source view keep image payloads collapsed, and an image can be backed up to an `assets` folder next to the document before it is removed.
|
|
46
|
+
- **Table editing** — Chinese IME composition, escaped pipes, formatting commands and undo/redo stay in sync with the cell source.
|
|
47
|
+
- **Formula selections** — a selection that crosses an inline formula keeps the whole formula, so copying and continued editing stay predictable.
|
|
48
|
+
|
|
49
|
+
## Install
|
|
50
|
+
|
|
51
|
+
### From npm
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
dsh plugin --profile web add dsh-markdown-typora
|
|
55
|
+
dsh plugin --profile desktop add dsh-markdown-typora
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Or open **Settings → Plugins → Add plugin** and enter `dsh-markdown-typora`. Restart the host afterwards; the plugin then appears on the **Plugins** page and opens from the right sidebar.
|
|
59
|
+
|
|
60
|
+
### From a GitHub release
|
|
61
|
+
|
|
62
|
+
Download `dsh-markdown-typora-0.3.4.tgz` from the [MarkPilot releases](https://github.com/ltmroberthk915/markpilot/releases) and add it to the profile that runs your host:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
dsh plugin --profile web add ./dsh-markdown-typora-0.3.4.tgz
|
|
66
|
+
dsh plugin --profile desktop add ./dsh-markdown-typora-0.3.4.tgz
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Use this only when you cannot install from npm; the package on npm tracks the same source.
|
|
70
|
+
|
|
71
|
+
### Manual (development checkout)
|
|
72
|
+
|
|
73
|
+
The plugin is the `dsh-markdown-typora/` subdirectory of the [MarkPilot repository](https://github.com/ltmroberthk915/markpilot). To load a checkout as a bundle:
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
git clone https://github.com/ltmroberthk915/markpilot.git
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Then add a junction/symlink from the profile's `node_modules` to `markpilot/dsh-markdown-typora`, add `"dsh-markdown-typora"` to the profile `package.json`'s `dsh.profile.bundles`, and restart the host. The plugin must be a bundle, not a raw `cordis.patch.yml` file-URL insert, to appear in the Plugins page.
|
|
80
|
+
|
|
81
|
+
## Use
|
|
82
|
+
|
|
83
|
+
1. Open the right sidebar, press `Ctrl+P` (workspace files) and click a `.md` file.
|
|
84
|
+
2. Write; the editor autosaves after 1.5 s and refuses to overwrite a newer file on disk.
|
|
85
|
+
3. Select a passage → click **Insert into chat** (or `Ctrl/Cmd + Shift + Enter`). The document's absolute path is placed at the top, then a blank line and the selection.
|
|
86
|
+
4. To undo the insertion, click back into the composer and press `Ctrl/Cmd + Z`; focus stays in the editor by design.
|
|
87
|
+
|
|
88
|
+
## How it is built
|
|
89
|
+
|
|
90
|
+
The editor engine is the already-built MarkPilot CM6 3.6.6 renderer, copied byte-for-byte into `renderer-cm6/cm6/`. The plugin adds only:
|
|
91
|
+
|
|
92
|
+
- `renderer-cm6/index.html` + `dsh-bridge.js` + `dsh-selection.js` — the DSH skin and selection bridge;
|
|
93
|
+
- `lib/index.js` — static routes, version-guarded file API, SSE change stream;
|
|
94
|
+
- `lib/client.js` — the right-sidebar tab, iframe lifecycle, save/conflict/recovery, composer insertion.
|
|
95
|
+
|
|
96
|
+
The engine source is not modified. `core.json` records the version and a SHA-256 for every core file. Maintainers of the MarkPilot monorepo can refresh it with:
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
node dsh-markdown-typora/scripts/sync-core.mjs
|
|
100
|
+
node dsh-markdown-typora/scripts/sync-core.mjs --check
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Known limits
|
|
104
|
+
|
|
105
|
+
- Desktop-only MarkPilot features that need Electron native APIs (export, image picker) may be unavailable in DSH.
|
|
106
|
+
- Image references are resolved against the document's folder, so relative paths (`assets/…`, `../figures/…`) work; an absolute Windows path (``) does not render in DSH, and a reference whose filename contains `#`, `?` or `%` cannot be addressed as a URL.
|
|
107
|
+
- A selection over 256 KiB is rejected with a message instead of being silently truncated.
|
|
108
|
+
- Insertion does not steal focus; undo it from the composer.
|
|
109
|
+
- Tested against DSH 0.2.1-rc.3; the plugin requires `dsh >= 0.2.0-rc.2`.
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
MIT. The MarkPilot engine and its bundled Mermaid/KaTeX assets retain their upstream licenses; see [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
`dsh-markdown-typora` is a DSH wrapper around the already-built MarkPilot CM6 renderer.
|
|
4
|
+
The following upstream projects are included in, or bundled by, that renderer:
|
|
5
|
+
|
|
6
|
+
- **MarkPilot** — MIT — <https://github.com/ltmroberthk915/markpilot>
|
|
7
|
+
- **CodeMirror 6** — MIT — <https://github.com/codemirror/dev>
|
|
8
|
+
- **Mermaid** — MIT — <https://github.com/mermaid-js/mermaid>
|
|
9
|
+
- **KaTeX** — MIT — <https://github.com/KaTeX/KaTeX>
|
|
10
|
+
- **KaTeX fonts** — SIL Open Font License 1.1 — <https://github.com/KaTeX/KaTeX/tree/main/fonts>
|
|
11
|
+
|
|
12
|
+
The plugin's own code (`lib/`, `renderer-cm6/index.html`,
|
|
13
|
+
`renderer-cm6/dsh-bridge.js`, `renderer-cm6/dsh-selection.js`) is MIT; see
|
|
14
|
+
[LICENSE](LICENSE). The built files under `renderer-cm6/cm6/` are copied
|
|
15
|
+
byte-for-byte from MarkPilot and retain their upstream notices.
|
package/cordis.patch.yml
ADDED