@quartz-community/obsidian-plugin-excalidraw 0.1.0
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/CHANGELOG.md +23 -0
- package/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +4169 -0
- package/dist/components/index.js.map +1 -0
- package/dist/frames/index.d.ts +5 -0
- package/dist/frames/index.js +107 -0
- package/dist/frames/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +4926 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +78 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +139 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-05-25
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial release as Excalidraw page-type plugin for Quartz v5.
|
|
13
|
+
- Parse `.excalidraw.md` files (both `json` and `compressed-json` LZ-String formats).
|
|
14
|
+
- Parse `.excalidraw` pure JSON files.
|
|
15
|
+
- Synchronous SVG rendering using roughjs and perfect-freehand (no DOM, no native dependencies).
|
|
16
|
+
- Support for rectangles, ellipses, diamonds, text, arrows (curved), freedraw, images, frames, and embeddable elements.
|
|
17
|
+
- Embedded note transclusion via Quartz's wikilink resolver.
|
|
18
|
+
- Embedded webpage rendering via sandboxed iframe.
|
|
19
|
+
- Full dark/light mode theme support using CSS custom properties with pre-computed color mappings for all 65 Excalidraw palette colors.
|
|
20
|
+
- Pan and zoom interaction (mouse drag, scroll wheel, buttons).
|
|
21
|
+
- Full-viewport page frame with toggleable sidebar.
|
|
22
|
+
- Filter integration preventing `.excalidraw.md` from being double-processed as Markdown.
|
|
23
|
+
- 24 unit tests covering parser and renderer.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Quartz Community
|
|
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,70 @@
|
|
|
1
|
+
# @quartz-community/obsidian-plugin-excalidraw
|
|
2
|
+
|
|
3
|
+
A page type plugin that renders [Obsidian Excalidraw](https://github.com/zsviczian/obsidian-excalidraw-plugin) drawings (`.excalidraw.md` and `.excalidraw` files) as full-page interactive SVG visualizations. Supports shapes, text, arrows, freedraw strokes, embedded notes with transcluded content, embedded webpages via iframe, and full dark/light theme adaptation using Excalidraw's color palette.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx quartz plugin add github:quartz-community/obsidian-plugin-excalidraw
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```yaml title="quartz.config.yaml"
|
|
14
|
+
plugins:
|
|
15
|
+
- source: github:quartz-community/obsidian-plugin-excalidraw
|
|
16
|
+
enabled: true
|
|
17
|
+
options:
|
|
18
|
+
enableInteraction: true
|
|
19
|
+
darkMode: "auto"
|
|
20
|
+
exportPadding: 20
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For advanced use cases, you can override in TypeScript:
|
|
24
|
+
|
|
25
|
+
```ts title="quartz.ts (override)"
|
|
26
|
+
import * as ExternalPlugin from "./.quartz/plugins";
|
|
27
|
+
|
|
28
|
+
ExternalPlugin.ExcalidrawPage({
|
|
29
|
+
enableInteraction: true,
|
|
30
|
+
darkMode: "auto",
|
|
31
|
+
exportPadding: 20,
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- **Shapes**: Rectangles, ellipses, and diamonds rendered with roughjs hand-drawn style, respecting fill styles (hachure, cross-hatch, solid), stroke styles (solid, dashed, dotted), and roughness levels.
|
|
38
|
+
- **Text**: Multi-line text with Virgil (hand-drawn), Helvetica, and Cascadia font families. Supports alignment and vertical positioning.
|
|
39
|
+
- **Arrows and lines**: Smooth curved paths for multi-point arrows with arrowhead markers. Straight lines for two-point connections.
|
|
40
|
+
- **Freedraw**: Freeform strokes rendered via perfect-freehand with pressure simulation.
|
|
41
|
+
- **Images**: Embedded images displayed from base64 data URLs stored in the drawing.
|
|
42
|
+
- **Embedded notes**: Obsidian wikilink embeds (`[[note]]`) resolved and transcluded with rendered HTML content.
|
|
43
|
+
- **Embedded webpages**: URL embeds rendered as sandboxed iframes with title bars.
|
|
44
|
+
- **Dark/light mode**: Full theme support using CSS custom properties. All 65 Excalidraw palette colors have pre-computed dark-mode equivalents matching Excalidraw's own `applyDarkModeFilter` algorithm.
|
|
45
|
+
- **Pan and zoom**: Mouse drag to pan, scroll wheel to zoom, with zoom in/out/reset buttons.
|
|
46
|
+
- **Full-viewport layout**: Dedicated page frame with toggleable sidebar (matching canvas-page pattern).
|
|
47
|
+
- **Compressed JSON**: Supports both `json` and `compressed-json` (LZ-String) formats from the Obsidian Excalidraw plugin.
|
|
48
|
+
- **Filter integration**: Prevents `.excalidraw.md` files from being double-processed as regular Markdown pages.
|
|
49
|
+
|
|
50
|
+
## Configuration
|
|
51
|
+
|
|
52
|
+
| Option | Type | Default | Description |
|
|
53
|
+
| ------------------- | --------- | -------- | ---------------------------------------------------------- |
|
|
54
|
+
| `enableInteraction` | `boolean` | `true` | Whether to enable pan and zoom interaction on the drawing. |
|
|
55
|
+
| `darkMode` | `string` | `"auto"` | Theme mode: `"auto"`, `"light"`, or `"dark"`. |
|
|
56
|
+
| `exportPadding` | `number` | `20` | Padding around the drawing content in pixels. |
|
|
57
|
+
|
|
58
|
+
## Supported file formats
|
|
59
|
+
|
|
60
|
+
### `.excalidraw.md` (Obsidian format)
|
|
61
|
+
|
|
62
|
+
The primary format produced by the [Obsidian Excalidraw plugin](https://github.com/zsviczian/obsidian-excalidraw-plugin). Contains YAML frontmatter, text elements section, optional embedded files section, and the drawing data in a `%%`-delimited block as either `json` or `compressed-json` (LZ-String base64).
|
|
63
|
+
|
|
64
|
+
### `.excalidraw` (Pure JSON)
|
|
65
|
+
|
|
66
|
+
Standard Excalidraw JSON format with `type`, `version`, `elements`, `appState`, and `files` fields.
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT
|