joplin-plugin-ridgeline 0.2.7

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 pmslava
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 ADDED
@@ -0,0 +1,119 @@
1
+ # Ridgeline — a Joplin plugin
2
+
3
+ A hover-expanding minimap outline for the Markdown editor and the rendered viewer.
4
+
5
+ Ridgeline draws a compact stack of thin bars down the edge of your note — one bar per heading, its length encoding the heading level — so the shape of a long note is always in view without taking any real space. The bar for the section you are reading is brightened and thickened, and it tracks your scrolling live. Rest the pointer on the bars and the stack expands into a full table of contents, indented by level, with the current heading highlighted; click any bar or row to jump straight to it. It works the same in the raw editor and in the rendered viewer, follows your Joplin theme, and updates instantly when you change its settings — no reload.
6
+
7
+ ![The compact Ridgeline minimap in the editor](docs/images/minimap-editor.png)
8
+
9
+ *The compact minimap in the editor: one thin bar per heading, length encoding the level, with the current section's bar brightened.*
10
+
11
+ ![The hover-expanded table of contents](docs/images/hover-toc-editor.png)
12
+
13
+ *Resting the pointer on the bars opens the full outline — rows indented by heading level, the current heading in bold.*
14
+
15
+ ![The strip in a split editor + viewer](docs/images/split-view.png)
16
+
17
+ *In a split view the strip tracks the current section in both the editor and the rendered viewer at once.*
18
+
19
+ ## Features
20
+
21
+ - **Compact level-encoded minimap.** One thin bar per heading; the bar length encodes the heading level (H1 longest … H6 shortest), so the note's structure reads at a glance from a sliver of edge space.
22
+ - **Live current-section tracking.** The bar for the section at the top of the viewport is brightened and thickened and follows your scrolling in real time, centred in its slot so it never looks like it dropped toward a neighbour.
23
+ - **Hover-intent table of contents.** Let the pointer rest on the bars (a short dwell, so a mouse merely crossing the strip never pops it open) and the stack expands into a full clickable outline, indented by level, with the current heading highlighted. Click a bar or a row to jump.
24
+ - **Editor and viewer, in step.** The strip is drawn in both the raw Markdown editor and the rendered note viewer, and a jump from either pane moves both.
25
+ - **Overlay or reserve.** Draw the strip over the text, or reserve a thin margin so it never overlaps a word — set independently for the editor and the viewer.
26
+ - **Left or right, your call.** Park the strip on either edge of the pane.
27
+ - **Theme-aware.** Colours are derived from the live editor surface, so the strip looks right on light, dark, and custom themes with no palette to configure.
28
+ - **Live settings and multi-window.** Every setting applies immediately, in every open window, without a reload.
29
+ - **Stays out of the way.** Hide the whole strip with a keystroke, or let it disappear automatically on notes that have no headings so the text uses the full width.
30
+
31
+ ## Install
32
+
33
+ In Joplin, open **Settings → Plugins**, search for **"Ridgeline"**, and click **Install**. Ridgeline is desktop-only (it needs the CodeMirror editor) and requires Joplin 3.3 or newer.
34
+
35
+ To install the file by hand instead, download `io.github.pmslava.ridgeline.jpl` from the [releases page](https://github.com/pmslava/joplin-plugin-ridgeline/releases) and use **Plugins → Install from file**.
36
+
37
+ ## Settings
38
+
39
+ All settings live under **Settings → Ridgeline** and apply live.
40
+
41
+ | Setting | Default | What it does |
42
+ | --- | --- | --- |
43
+ | **Strip side** | Left | Which edge of the editor/viewer the strip sits on — Left or Right. |
44
+ | **Editor strip mode** | Overlay | `Overlay` draws over the text; `Reserve margin` adds a thin margin so text is never covered. |
45
+ | **Viewer strip mode** | Overlay | The same choice for the rendered viewer, set independently of the editor. |
46
+ | **Maximum heading depth** | H1–H6 | The deepest heading level shown. Headings deeper than this are dropped from the minimap and the outline. |
47
+ | **Show minimap** | On | Master switch for the strip in both panes. Toggle without disabling the plugin (see the command below). |
48
+ | **Hide minimap when the note has no headings** | On | On a heading-less note, hide the strip and drop its reserved margin so the text uses the full width. |
49
+ | **Hover open delay (ms)** | 300 | How long the pointer must rest on the bars before the outline opens (100–1000 ms). Higher = a quick trip across the strip never opens it. |
50
+
51
+ ### Commands and shortcuts
52
+
53
+ | Command | Shortcut | Also |
54
+ | --- | --- | --- |
55
+ | **Ridgeline: Toggle minimap** | `Ctrl+Alt+M` | A note-toolbar button (the `fa-stream` icon — a stack of staggered lines that reads as the minimap). |
56
+ | **Ridgeline: Toggle strip side (left/right)** | `Ctrl+Alt+R` | — |
57
+ | **Ridgeline: Toggle hide-when-empty** | `Ctrl+Alt+H` | — |
58
+
59
+ All three are also in the **Tools** menu, and each flips the matching setting so both panes update live.
60
+
61
+ ## Development
62
+
63
+ ```
64
+ npm install
65
+ npm run dist
66
+ ```
67
+
68
+ `npm run dist` builds the publishable plugin to `publish/io.github.pmslava.ridgeline.jpl`.
69
+
70
+ ### End-to-end tests
71
+
72
+ The E2E suite drives a real Joplin desktop (Electron) build with the plugin loaded, under a virtual display. It needs Xvfb and the Playwright Chromium host dependencies installed.
73
+
74
+ First fetch the Joplin AppImage the tests run against (downloaded once, then cached under `.e2e-cache/`):
75
+
76
+ ```
77
+ npm run setup:e2e
78
+ ```
79
+
80
+ The version is pinned in `scripts/setup-e2e.sh` and overridable — it must be at least the manifest's `app_min_version`:
81
+
82
+ ```
83
+ JOPLIN_E2E_VERSION=3.7.6 npm run setup:e2e
84
+ ```
85
+
86
+ `npm run test:e2e` runs the whole suite in one process (it wraps `playwright test` in `xvfb-run`). The suite launches Joplin many times serially, so on a laptop it is more comfortable to run it in **four shards**, each in the foreground:
87
+
88
+ ```
89
+ npm run dist
90
+ npm run setup:e2e
91
+ xvfb-run -a --server-args="-screen 0 1920x1080x24" npx playwright test --shard=1/4
92
+ xvfb-run -a --server-args="-screen 0 1920x1080x24" npx playwright test --shard=2/4
93
+ xvfb-run -a --server-args="-screen 0 1920x1080x24" npx playwright test --shard=3/4
94
+ xvfb-run -a --server-args="-screen 0 1920x1080x24" npx playwright test --shard=4/4
95
+ ```
96
+
97
+ The `-screen 0 1920x1080x24` server args give the virtual display enough room for the split-pane layouts the specs assert against.
98
+
99
+ ### Regenerating the screenshots
100
+
101
+ The README/manifest screenshots are produced by a separate, opt-in spec that captures (rather than asserts) against a throwaway profile forced to Joplin's dark theme:
102
+
103
+ ```
104
+ npm run dist
105
+ npm run setup:e2e
106
+ SHOWCASE=1 xvfb-run -a --server-args="-screen 0 1920x1080x24" npx playwright test e2e/showcase.spec.ts
107
+ ```
108
+
109
+ It writes the PNGs into `docs/images/`. Its content is fictional ("Acme Rocket Skates") — it never touches your real Joplin profile.
110
+
111
+ See [PUBLISHING.md](PUBLISHING.md) for the release flow.
112
+
113
+ ## Credits
114
+
115
+ Ridgeline's click-to-jump machinery — firing `scrollToHash` for the rendered viewer and an editor scroll command for the raw Markdown pane so a jump from either surface keeps both in step — follows the approach in [cqroot/joplin-outline](https://github.com/cqroot/joplin-outline) (MIT).
116
+
117
+ ## License
118
+
119
+ MIT. See [LICENSE](LICENSE).
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "joplin-plugin-ridgeline",
3
+ "version": "0.2.7",
4
+ "description": "Ridgeline: a hover-expanding minimap outline for the Joplin editor and viewer.",
5
+ "homepage": "https://github.com/pmslava/joplin-plugin-ridgeline",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/pmslava/joplin-plugin-ridgeline"
9
+ },
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "scripts": {
14
+ "dist": "webpack --env joplin-plugin-config=buildMain && webpack --env joplin-plugin-config=buildExtraScripts && webpack --env joplin-plugin-config=createArchive",
15
+ "prepare": "npm run dist",
16
+ "updateVersion": "webpack --env joplin-plugin-config=updateVersion",
17
+ "setup:e2e": "bash scripts/setup-e2e.sh",
18
+ "test:e2e": "npm run dist && npm run setup:e2e && xvfb-run -a --server-args=\"-screen 0 1920x1080x24\" playwright test"
19
+ },
20
+ "license": "MIT",
21
+ "keywords": [
22
+ "joplin-plugin",
23
+ "joplin",
24
+ "outline",
25
+ "minimap",
26
+ "toc",
27
+ "heading"
28
+ ],
29
+ "devDependencies": {
30
+ "@codemirror/state": "^6.4.1",
31
+ "@codemirror/view": "^6.26.3",
32
+ "@joplin/lib": "~2.9",
33
+ "@playwright/test": "^1.62.0",
34
+ "@types/node": "^18.7.13",
35
+ "chalk": "^4.1.0",
36
+ "copy-webpack-plugin": "^11.0.0",
37
+ "fs-extra": "^10.1.0",
38
+ "glob": "^8.0.3",
39
+ "playwright": "^1.62.0",
40
+ "tar": "^6.1.11",
41
+ "ts-loader": "^9.3.1",
42
+ "typescript": "^4.8.2",
43
+ "webpack": "^5.74.0",
44
+ "webpack-cli": "^4.10.0"
45
+ },
46
+ "dependencies": {
47
+ "@joplin/fork-uslug": "^1.0.13"
48
+ },
49
+ "files": [
50
+ "publish"
51
+ ]
52
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "manifest_version": 1,
3
+ "id": "io.github.pmslava.ridgeline",
4
+ "app_min_version": "3.3",
5
+ "version": "0.2.7",
6
+ "name": "Ridgeline",
7
+ "description": "A hover-expanding minimap outline for the Markdown editor and viewer: a compact stack of level-encoded bars that tracks the current section and expands into a full clickable table of contents on hover. Theme-aware, live settings, multi-window.",
8
+ "author": "pmslava",
9
+ "homepage_url": "https://github.com/pmslava/joplin-plugin-ridgeline",
10
+ "repository_url": "https://github.com/pmslava/joplin-plugin-ridgeline",
11
+ "keywords": [
12
+ "outline",
13
+ "minimap",
14
+ "toc",
15
+ "heading",
16
+ "navigation"
17
+ ],
18
+ "categories": [
19
+ "editor"
20
+ ],
21
+ "platforms": [
22
+ "desktop"
23
+ ],
24
+ "screenshots": [
25
+ {
26
+ "src": "docs/images/minimap-editor.png",
27
+ "label": "The compact Ridgeline minimap in the Markdown editor: one thin bar per heading, its length encoding the level, with the current section's bar brightened"
28
+ },
29
+ {
30
+ "src": "docs/images/hover-toc-editor.png",
31
+ "label": "Resting the pointer on the bars opens the full table of contents, rows indented by heading level with the current heading highlighted"
32
+ },
33
+ {
34
+ "src": "docs/images/split-view.png",
35
+ "label": "In a split view the strip tracks the current section in both the editor and the rendered viewer at once"
36
+ }
37
+ ],
38
+ "_publish_hash": "sha256:6722f2995489bd3c423fcb9b195fc204dd4ea6deb97030b1b4086d916644d425",
39
+ "_publish_commit": "main:1a2533deb0a421ecdf6bd7dfa213eff1108f4782"
40
+ }