@hachej/boring-diagram 0.1.67
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/README.md +38 -0
- package/dist/front/index.d.ts +5 -0
- package/dist/front/index.js +1042 -0
- package/dist/server/index.d.ts +10 -0
- package/dist/server/index.js +255 -0
- package/dist/shared/index.d.ts +8 -0
- package/dist/shared/index.js +28 -0
- package/package.json +81 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Diagram plugin
|
|
2
|
+
|
|
3
|
+
Boring workspace plugin for `.excalidraw` and `.excalidraw.png` files.
|
|
4
|
+
|
|
5
|
+
- Registers a `workspace.open.path` surface resolver for supported diagram files (`.excalidraw`, `.excalidraw.png`).
|
|
6
|
+
- Uses the native `@excalidraw/excalidraw` React component (no iframe/CDN bridge).
|
|
7
|
+
- Autosaves JSON with debouncing, queued writes, and `expectedMtimeMs` conflict detection.
|
|
8
|
+
- Opening an embedded `.excalidraw.png` imports the scene and saves editable JSON beside it as `<name>.excalidraw`.
|
|
9
|
+
- Listens for workspace file events and reloads when an agent or external process changes the open diagram.
|
|
10
|
+
- Provides a Render drawer that exports the current diagram sketch and calls Pi AI image generation through OpenRouter-backed image models.
|
|
11
|
+
|
|
12
|
+
## Image rendering
|
|
13
|
+
|
|
14
|
+
Rendering is server-side; API keys are never sent to the browser.
|
|
15
|
+
|
|
16
|
+
Set one of:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
OPENROUTER_API_KEY=...
|
|
20
|
+
# or
|
|
21
|
+
BORING_DIAGRAM_OPENROUTER_API_KEY=...
|
|
22
|
+
# legacy alias also works:
|
|
23
|
+
BORING_EXCALIDRAW_OPENROUTER_API_KEY=...
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Optional default model:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
BORING_DIAGRAM_RENDER_MODEL=google/gemini-3-pro-image-preview
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Rendered files are written beside the source diagram:
|
|
33
|
+
|
|
34
|
+
```txt
|
|
35
|
+
diagram.excalidraw
|
|
36
|
+
diagram.render.png
|
|
37
|
+
diagram.render.json
|
|
38
|
+
```
|