@grethel-labs/excaliplant 1.1.0 → 1.2.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.
Files changed (122) hide show
  1. package/README.md +12 -0
  2. package/bin/excaliplant-mcp.mjs +7 -0
  3. package/bin/excaliplant.mjs +35 -1
  4. package/package.json +14 -6
  5. package/skills/README.md +10 -0
  6. package/skills/excaliplant/SKILL.md +71 -0
  7. package/skills/excaliplant/assets/examples/activity-order-processing.puml +22 -0
  8. package/skills/excaliplant/assets/examples/archimate-insurance.puml +17 -0
  9. package/skills/excaliplant/assets/examples/chart-quarterly.puml +9 -0
  10. package/skills/excaliplant/assets/examples/chen-movie-rental.puml +26 -0
  11. package/skills/excaliplant/assets/examples/chronology-project-history.puml +9 -0
  12. package/skills/excaliplant/assets/examples/class-shop-domain.puml +33 -0
  13. package/skills/excaliplant/assets/examples/component-c4-container.puml +15 -0
  14. package/skills/excaliplant/assets/examples/creole-release-notes.puml +14 -0
  15. package/skills/excaliplant/assets/examples/deployment-kubernetes.puml +24 -0
  16. package/skills/excaliplant/assets/examples/ditaa-pipeline.puml +16 -0
  17. package/skills/excaliplant/assets/examples/dot-pipeline.puml +16 -0
  18. package/skills/excaliplant/assets/examples/ebnf-json-grammar.puml +9 -0
  19. package/skills/excaliplant/assets/examples/files-project-layout.puml +10 -0
  20. package/skills/excaliplant/assets/examples/gantt-release-plan.puml +19 -0
  21. package/skills/excaliplant/assets/examples/json-api-response.puml +16 -0
  22. package/skills/excaliplant/assets/examples/latex-gaussian.puml +5 -0
  23. package/skills/excaliplant/assets/examples/legacy-activity-approval.puml +12 -0
  24. package/skills/excaliplant/assets/examples/math-sum-of-cubes.puml +4 -0
  25. package/skills/excaliplant/assets/examples/mindmap-excaliplant.puml +19 -0
  26. package/skills/excaliplant/assets/examples/nwdiag-office-network.puml +23 -0
  27. package/skills/excaliplant/assets/examples/object-runtime-snapshot.puml +16 -0
  28. package/skills/excaliplant/assets/examples/regex-email.puml +4 -0
  29. package/skills/excaliplant/assets/examples/salt-login-dialog.puml +21 -0
  30. package/skills/excaliplant/assets/examples/sequence-checkout-flow.puml +29 -0
  31. package/skills/excaliplant/assets/examples/state-order-lifecycle.puml +27 -0
  32. package/skills/excaliplant/assets/examples/timing-sensor.puml +22 -0
  33. package/skills/excaliplant/assets/examples/usecase-checkout.puml +16 -0
  34. package/skills/excaliplant/assets/examples/wbs-website-relaunch.puml +16 -0
  35. package/skills/excaliplant/assets/examples/yaml-ci-config.puml +13 -0
  36. package/skills/excaliplant/assets/rules.md +18 -0
  37. package/skills/excaliplant/references/cli.md +124 -0
  38. package/skills/excaliplant/references/diagram-types.md +41 -0
  39. package/skills/excaliplant/references/examples.md +237 -0
  40. package/skills/excaliplant/references/excalidraw-spec.md +221 -0
  41. package/skills/excaliplant/references/syntax.md +195 -0
  42. package/skills/manifest.json +42 -0
  43. package/src/diagrams/activity/index.mjs +5 -8
  44. package/src/diagrams/activity/layout.mjs +115 -14
  45. package/src/diagrams/chart/index.mjs +14 -1
  46. package/src/diagrams/chronology/index.mjs +13 -4
  47. package/src/diagrams/creole/index.mjs +29 -2
  48. package/src/diagrams/data/index.mjs +31 -9
  49. package/src/diagrams/gantt/index.mjs +69 -32
  50. package/src/diagrams/graph/draw.mjs +100 -23
  51. package/src/diagrams/graph/layout.mjs +129 -10
  52. package/src/diagrams/graph/route.mjs +549 -0
  53. package/src/diagrams/legacy-activity/index.mjs +2 -0
  54. package/src/diagrams/math/index.mjs +102 -12
  55. package/src/diagrams/nwdiag/index.mjs +14 -0
  56. package/src/diagrams/salt/index.mjs +14 -3
  57. package/src/diagrams/sequence/index.mjs +33 -21
  58. package/src/diagrams/sequence/layout.mjs +29 -3
  59. package/src/diagrams/state/index.mjs +2 -0
  60. package/src/diagrams/timing/index.mjs +13 -5
  61. package/src/layout/labels.mjs +20 -4
  62. package/src/markdown/cache.mjs +100 -0
  63. package/src/markdown/cli.mjs +321 -0
  64. package/src/markdown/document.mjs +299 -0
  65. package/src/markdown/index.mjs +23 -0
  66. package/src/markdown/markdown_it.mjs +209 -0
  67. package/src/markdown/remark.mjs +165 -0
  68. package/src/markdown/render.mjs +385 -0
  69. package/src/markdown/sanitize.mjs +447 -0
  70. package/src/markdown/scan.mjs +374 -0
  71. package/src/mcp/cli.mjs +190 -0
  72. package/src/mcp/examples.generated.mjs +298 -0
  73. package/src/mcp/executor.mjs +227 -0
  74. package/src/mcp/http.mjs +200 -0
  75. package/src/mcp/include.mjs +32 -0
  76. package/src/mcp/index.mjs +19 -0
  77. package/src/mcp/protocol.mjs +106 -0
  78. package/src/mcp/schema.mjs +86 -0
  79. package/src/mcp/server.mjs +446 -0
  80. package/src/mcp/stdio.mjs +159 -0
  81. package/src/mcp/tools.mjs +503 -0
  82. package/src/mcp/worker.mjs +19 -0
  83. package/src/skills/frontmatter.mjs +152 -0
  84. package/src/skills/index.mjs +153 -0
  85. package/src/skills/install.mjs +256 -0
  86. package/src/skills/node_io.mjs +29 -0
  87. package/src/skills/rules.mjs +30 -0
  88. package/src/skills/targets.mjs +162 -0
  89. package/types/diagrams/activity/layout.d.mts +9 -0
  90. package/types/diagrams/creole/index.d.mts +7 -0
  91. package/types/diagrams/graph/draw.d.mts +1 -1
  92. package/types/diagrams/graph/route.d.mts +69 -0
  93. package/types/diagrams/math/index.d.mts +1 -0
  94. package/types/diagrams/sequence/layout.d.mts +2 -0
  95. package/types/layout/labels.d.mts +2 -1
  96. package/types/markdown/cache.d.mts +52 -0
  97. package/types/markdown/cli.d.mts +66 -0
  98. package/types/markdown/document.d.mts +129 -0
  99. package/types/markdown/index.d.mts +28 -0
  100. package/types/markdown/markdown_it.d.mts +59 -0
  101. package/types/markdown/remark.d.mts +29 -0
  102. package/types/markdown/render.d.mts +203 -0
  103. package/types/markdown/sanitize.d.mts +27 -0
  104. package/types/markdown/scan.d.mts +163 -0
  105. package/types/mcp/cli.d.mts +35 -0
  106. package/types/mcp/examples.generated.d.mts +27 -0
  107. package/types/mcp/executor.d.mts +77 -0
  108. package/types/mcp/http.d.mts +44 -0
  109. package/types/mcp/include.d.mts +14 -0
  110. package/types/mcp/index.d.mts +18 -0
  111. package/types/mcp/protocol.d.mts +97 -0
  112. package/types/mcp/schema.d.mts +17 -0
  113. package/types/mcp/server.d.mts +94 -0
  114. package/types/mcp/stdio.d.mts +56 -0
  115. package/types/mcp/tools.d.mts +105 -0
  116. package/types/mcp/worker.d.mts +6 -0
  117. package/types/skills/frontmatter.d.mts +40 -0
  118. package/types/skills/index.d.mts +15 -0
  119. package/types/skills/install.d.mts +176 -0
  120. package/types/skills/node_io.d.mts +9 -0
  121. package/types/skills/rules.d.mts +14 -0
  122. package/types/skills/targets.d.mts +66 -0
package/README.md CHANGED
@@ -99,6 +99,18 @@ await result.toPng({ width: 1200 }); // PNG Buffer
99
99
  result.diagnostics; // warnings with line numbers
100
100
  ```
101
101
 
102
+ ## Use it everywhere
103
+
104
+ One package, several front doors. Everything is built from this repository and released together with the npm package.
105
+
106
+ | Where | What | Docs |
107
+ | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
108
+ | Markdown | `excaliplant markdown README.md` replaces ` ```plantuml ` blocks with diagrams; plugins for `markdown-it` and `remark`; a GitHub Action for CI | [`docs/markdown.md`](docs/markdown.md) |
109
+ | AI assistants | An agent skill for Claude Code, Claude, Codex, Gemini CLI, opencode, Cursor, Copilot, Antigravity and more (`excaliplant skills install`), always bundled with the current Excalidraw element spec | [`docs/skills.md`](docs/skills.md) |
110
+ | MCP clients | `excaliplant mcp` — an MCP server with `render_plantuml`, `validate_plantuml`, `list_diagram_types` and `get_example` | [`docs/mcp.md`](docs/mcp.md) |
111
+ | VS Code | Live Markdown preview and commands for `.puml` files | [`docs/vscode.md`](docs/vscode.md) |
112
+ | Obsidian | Renders `plantuml` code blocks in your notes | [`docs/obsidian.md`](docs/obsidian.md) |
113
+
102
114
  ## How it works
103
115
 
104
116
  <img src="docs/assets/pipeline.png" alt="excaliplant pipeline" />
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ // excaliplant-mcp: MCP server entry point. All logic lives in src/mcp; stdout
3
+ // carries protocol messages only, everything else goes to stderr.
4
+
5
+ import { runMcpProcess } from "../src/mcp/cli.mjs";
6
+
7
+ await runMcpProcess(process.argv.slice(2));
@@ -2,7 +2,7 @@
2
2
  // excaliplant CLI: file/stdin I/O and option parsing only. All rendering
3
3
  // logic lives in src/.
4
4
 
5
- import { readFileSync, writeFileSync, realpathSync, statSync } from "node:fs";
5
+ import { readFileSync, writeFileSync, mkdirSync, realpathSync, statSync } from "node:fs";
6
6
  import path from "node:path";
7
7
  import process from "node:process";
8
8
  import { render, renderAll, listDiagramTypes, THEME_NAMES } from "../src/index.mjs";
@@ -12,6 +12,9 @@ const HELP = `excaliplant — render PlantUML as hand-drawn Excalidraw, SVG or P
12
12
  Usage:
13
13
  excaliplant [input.puml] [-o output] [options]
14
14
  cat diagram.puml | excaliplant -f svg > diagram.svg
15
+ excaliplant markdown <file.md> [-i | -o out.md] [--mode inline|file] (see: excaliplant markdown --help)
16
+ excaliplant skills install --tool <claude|codex|gemini|opencode|cursor|copilot|all> (see: excaliplant skills list)
17
+ excaliplant mcp [--http <port>] (MCP server on stdio; same as excaliplant-mcp)
15
18
 
16
19
  Options:
17
20
  -o, --output <file> Output file (format from extension unless -f is given).
@@ -168,7 +171,38 @@ async function encode(result, opts, format) {
168
171
  return `${JSON.stringify(result.excalidraw, null, 2)}\n`;
169
172
  }
170
173
 
174
+ /**
175
+ * `excaliplant markdown …`: all logic lives in src/markdown; this only
176
+ * supplies the file system.
177
+ * @param {string[]} argv
178
+ */
179
+ async function runMarkdown(argv) {
180
+ const { runMarkdownCommand } = await import("../src/markdown/index.mjs");
181
+ process.exitCode = await runMarkdownCommand(argv, {
182
+ readFile: async (file) => readFileSync(file, "utf8"),
183
+ writeFile: async (file, data) => {
184
+ mkdirSync(path.dirname(file), { recursive: true });
185
+ writeFileSync(file, data);
186
+ },
187
+ readStdin: () => readStdin(10 * 1024 * 1024),
188
+ stdout: process.stdout,
189
+ stderr: process.stderr,
190
+ });
191
+ }
192
+
171
193
  async function main() {
194
+ if (process.argv[2] === "markdown") return runMarkdown(process.argv.slice(3));
195
+ if (process.argv[2] === "mcp") {
196
+ // Same server as the `excaliplant-mcp` bin; the MCP registry can only
197
+ // start a package's default bin.
198
+ const { runMcpProcess } = await import("../src/mcp/cli.mjs");
199
+ return runMcpProcess(process.argv.slice(3));
200
+ }
201
+ if (process.argv[2] === "skills") {
202
+ const { runSkillsCommand } = await import("../src/skills/index.mjs");
203
+ process.exitCode = await runSkillsCommand(process.argv.slice(3));
204
+ return;
205
+ }
172
206
  const opts = parseArgs(process.argv.slice(2));
173
207
  if (opts.help) return void process.stdout.write(HELP);
174
208
  if (opts.version) {
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@grethel-labs/excaliplant",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Render PlantUML as hand-drawn Excalidraw diagrams, SVG and PNG.",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
7
7
  "types": "./types/index.d.mts",
8
8
  "bin": {
9
- "excaliplant": "bin/excaliplant.mjs"
9
+ "excaliplant": "bin/excaliplant.mjs",
10
+ "excaliplant-mcp": "bin/excaliplant-mcp.mjs"
10
11
  },
11
12
  "exports": {
12
13
  ".": {
@@ -17,12 +18,17 @@
17
18
  "./png": "./src/render/png.mjs",
18
19
  "./preprocess": "./src/core/preprocess/preprocessor.mjs",
19
20
  "./registry": "./src/core/registry.mjs",
21
+ "./markdown": "./src/markdown/index.mjs",
22
+ "./markdown-it": "./src/markdown/markdown_it.mjs",
23
+ "./remark": "./src/markdown/remark.mjs",
24
+ "./mcp": "./src/mcp/index.mjs",
20
25
  "./package.json": "./package.json"
21
26
  },
22
27
  "files": [
23
28
  "bin/",
24
29
  "src/",
25
30
  "types/",
31
+ "skills/",
26
32
  "assets/fonts/",
27
33
  "README.md",
28
34
  "LICENSE",
@@ -33,12 +39,13 @@
33
39
  "test": "node scripts/test.mjs",
34
40
  "typecheck": "tsc -p tsconfig.json",
35
41
  "types": "tsc -p tsconfig.types.json",
36
- "docs": "node scripts/docs.mjs",
37
- "docs:check": "node scripts/docs.mjs --check",
42
+ "docs": "node scripts/docs.mjs && node scripts/skills.mjs && node scripts/gen-mcp-examples.mjs",
43
+ "docs:check": "node scripts/docs.mjs --check && node scripts/skills.mjs --check && node scripts/gen-mcp-examples.mjs --check",
38
44
  "format": "prettier --write .",
39
45
  "format:check": "prettier --check .",
40
46
  "check": "npm run format:check && npm run typecheck && npm test && npm run docs:check",
41
- "prepack": "npm run types"
47
+ "prepack": "npm run types",
48
+ "spec:update": "node scripts/update-excalidraw-spec.mjs && node scripts/skills.mjs"
42
49
  },
43
50
  "repository": {
44
51
  "type": "git",
@@ -75,5 +82,6 @@
75
82
  "engines": {
76
83
  "node": ">=20"
77
84
  },
78
- "license": "MIT"
85
+ "license": "MIT",
86
+ "mcpName": "io.github.grethel-labs/excaliplant"
79
87
  }
@@ -0,0 +1,10 @@
1
+ <!-- generated by scripts/skills.mjs from skills-src/ - do not edit -->
2
+
3
+ # excaliplant agent skill
4
+
5
+ This folder is generated from `skills-src/` by `node scripts/skills.mjs` and ships in the npm package. It follows the [Agent Skills](https://agentskills.io/specification) format.
6
+
7
+ - `excaliplant/` is the skill (`SKILL.md`, `references/`, `assets/`).
8
+ - `manifest.json` lists its files for `excaliplant skills install`.
9
+
10
+ Install it for your tools with `npx -y @grethel-labs/excaliplant skills install --tool all`, or see [docs/skills.md](../docs/skills.md) for every tool and for manual steps.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: excaliplant
3
+ description: Render PlantUML as hand-drawn Excalidraw, SVG or PNG. Use for any UML/PlantUML/diagram request (sequence, class, activity, state, C4, Gantt, mind map, ER, wireframe) or .excalidraw files.
4
+ license: MIT
5
+ compatibility: Needs Node.js 20+ (runs with npx). No Java, Graphviz or network at render time.
6
+ metadata:
7
+ version: "{{version}}"
8
+ repository: https://github.com/grethel-labs/excaliplant
9
+ ---
10
+
11
+ <!-- generated by scripts/skills.mjs from skills-src/ - do not edit -->
12
+
13
+ # excaliplant
14
+
15
+ excaliplant turns PlantUML text into a hand-drawn diagram: an editable Excalidraw scene (`.excalidraw`), an SVG or a PNG. It is pure JavaScript and supports 29 diagram types. You write the PlantUML source, the CLI draws it.
16
+
17
+ ## When to use it
18
+
19
+ - The user asks for a diagram, UML, PlantUML, a flowchart, an architecture/C4 picture, a Gantt chart, a mind map, an ER diagram or a wireframe.
20
+ - The user wants an `.excalidraw` file they can open and edit at excalidraw.com, or an SVG/PNG for docs, slides or a README.
21
+ - The user hands you PlantUML and wants it rendered or converted.
22
+
23
+ Do not use it for Mermaid input (not supported; rewrite it as PlantUML first), for photos, or for free-form illustration.
24
+
25
+ ## Workflow
26
+
27
+ 1. Choose the diagram type (see [diagram-types.md](references/diagram-types.md)) and write PlantUML between `@startuml` and `@enduml` (some types use their own keyword, for example `@startmindmap`). Syntax cheat sheet: [syntax.md](references/syntax.md).
28
+ 2. Save it, for example as `diagram.puml`.
29
+ 3. Render it with the CLI:
30
+
31
+ ```sh
32
+ npx -y @grethel-labs/excaliplant diagram.puml -o diagram.excalidraw
33
+ npx -y @grethel-labs/excaliplant diagram.puml -o diagram.svg
34
+ npx -y @grethel-labs/excaliplant diagram.puml -o diagram.png --width 1600
35
+ ```
36
+
37
+ 4. Read stderr. Lines starting with `warning (line N):` mean excaliplant did not understand a line; fix the source and render again. Add `--strict` to turn warnings into errors.
38
+ 5. If you can view images, render a PNG and look at it. Fix overlapping labels or an unreadable layout by shortening labels, adding `left to right direction`, or splitting the diagram.
39
+ 6. Hand the files back. Keep the `.puml` source next to the output so the diagram stays editable.
40
+
41
+ The format follows the file extension of `-o`; use `-f excalidraw|svg|png` to override it. Without `-o` the result goes to stdout (not for PNG). More options: [cli.md](references/cli.md).
42
+
43
+ ## Look and feel
44
+
45
+ Themes: `sketch`, `plain`, `hachure`, `mono`, `dark`, `blueprint`. Pass `-t <theme>`, for example `-t blueprint` for a technical look or `-t dark` for dark backgrounds. `--clean` draws straight instead of hand-drawn strokes. Output is deterministic: the same source always gives the same bytes (`--seed` changes the wobble).
46
+
47
+ ## Writing good PlantUML
48
+
49
+ - One diagram per `@start…@end` block; render several blocks with `--all -o out-{n}.svg`.
50
+ - Start with a `title`. Keep labels short; put detail in notes.
51
+ - Quote names that contain spaces and give them an alias: `participant "Order Service" as Orders`.
52
+ - Prefer one concept per diagram; split a diagram that needs more than about 25 nodes.
53
+ - `skinparam`, `<style>`, colours (`#lightblue`), Creole markup and the preprocessor (`!define`, `!procedure`, loops) work. C4 and ArchiMate macros are bundled: `!include <C4/C4_Container>`.
54
+ - `!include` of files only works with `--include-dir <dir>`; URLs are refused.
55
+ - Sprites and `<&icons>` render as placeholders, and layout differs from the Java PlantUML. Judge the picture, not the line-for-line match.
56
+ - Examples for every type: [examples.md](references/examples.md) and `assets/examples/`.
57
+
58
+ ## Editing Excalidraw output
59
+
60
+ The `.excalidraw` file is plain JSON. To change it by hand or with a script (move boxes, change colours, add elements), follow the schema in [excalidraw-spec.md](references/excalidraw-spec.md); it is generated from the typings of `@excalidraw/element` `0.18.0-f0063e113`. Prefer changing the PlantUML source and re-rendering over patching JSON.
61
+
62
+ ## Limits and errors
63
+
64
+ - Errors print `excaliplant: <message>` and exit with code 1. Typical causes: no `@start…@end` block, unknown diagram kind, input over the size limit (`--max-input-bytes`), or a resource budget exceeded (too many nodes or elements).
65
+ - Unrecognised lines are warnings, never silent. Fix them or accept them knowingly.
66
+ - PNG cannot be written to a terminal; always pass `-o file.png`.
67
+ - Rendering never reads files or the network, except `!include` through `--include-dir`.
68
+
69
+ ## MCP server
70
+
71
+ If an `excaliplant` MCP server is connected to this session, prefer its tools over running the CLI. It is started with `npx -y -p @grethel-labs/excaliplant excaliplant-mcp`. Without MCP, use the CLI as above.
@@ -0,0 +1,22 @@
1
+ @startuml
2
+ title Order processing
3
+ start
4
+ :Receive order;
5
+ if (In stock?) then (yes)
6
+ :Reserve items;
7
+ else (no)
8
+ :Order from supplier;
9
+ :Wait for delivery;
10
+ endif
11
+ fork
12
+ :Charge card;
13
+ fork again
14
+ :Prepare invoice;
15
+ end fork
16
+ while (Items left?) is (yes)
17
+ :Pack item;
18
+ endwhile (no)
19
+ #palegreen:Ship parcel;
20
+ note right: tracking number\nis sent by mail
21
+ stop
22
+ @enduml
@@ -0,0 +1,17 @@
1
+ @startuml
2
+ !include <archimate/Archimate>
3
+ title Claims handling
4
+ Business_Actor(customer, "Customer")
5
+ Business_Role(insurant, "Insurant")
6
+ Business_Service(claimService, "Claim registration service")
7
+ Business_Process(handle, "Handle claim")
8
+ Application_Component(crm, "CRM system")
9
+ Application_Service(policyData, "Policy data service")
10
+ Technology_Node(server, "Mainframe")
11
+ Rel_Assignment(customer, insurant)
12
+ Rel_Serving(claimService, insurant, "serves")
13
+ Rel_Realization(handle, claimService)
14
+ Rel_Serving(policyData, handle)
15
+ Rel_Realization(crm, policyData)
16
+ Rel_Serving(server, crm)
17
+ @enduml
@@ -0,0 +1,9 @@
1
+ @startchart
2
+ title Quarterly results
3
+ h-axis [Q1, Q2, Q3, Q4]
4
+ v-axis 0 --> 100
5
+ grid true
6
+ bar "Revenue" [45, 62, 70, 88] #a5d8ff
7
+ bar "Costs" [30, 35, 41, 47] #ffc9c9
8
+ line "Margin %" [33, 43, 41, 47] #2f9e44
9
+ @endchart
@@ -0,0 +1,26 @@
1
+ @startchen
2
+ entity CUSTOMER {
3
+ Number <<key>>
4
+ Name {
5
+ FirstName
6
+ LastName
7
+ }
8
+ Phone <<multi>>
9
+ Age <<derived>>
10
+ }
11
+ entity MOVIE {
12
+ Code <<key>>
13
+ Title
14
+ }
15
+ entity COPY <<weak>> {
16
+ CopyNo <<partial>>
17
+ }
18
+ relationship RENTS {
19
+ Date
20
+ }
21
+ relationship HAS <<identifying>>
22
+ RENTS -N- CUSTOMER
23
+ RENTS =M= COPY
24
+ MOVIE -1- HAS
25
+ HAS =N= COPY
26
+ @endchen
@@ -0,0 +1,9 @@
1
+ @startchronology
2
+ [Idea] happens on 2026-01-05
3
+ [Prototype] lasts from 2026-01-12 to 2026-02-06
4
+ [First user test] happens on 2026-02-10
5
+ [Private beta] lasts from 2026-02-16 to 2026-03-20
6
+ [Launch] happens on 2026-03-27
7
+ [Idea] -> [Prototype] : greenlit
8
+ [Private beta] -> [Launch] : feedback addressed
9
+ @endchronology
@@ -0,0 +1,33 @@
1
+ @startuml
2
+ title Online shop domain
3
+ package "Ordering" {
4
+ abstract class Order <<aggregate>> {
5
+ - id : UUID
6
+ # createdAt : Instant
7
+ + total() : Money
8
+ + {abstract} validate() : void
9
+ + {static} empty() : Order
10
+ }
11
+ class LineItem {
12
+ + quantity : int
13
+ + price : Money
14
+ }
15
+ enum OrderStatus {
16
+ NEW
17
+ PAID
18
+ SHIPPED
19
+ }
20
+ }
21
+ interface Payable<T> {
22
+ + pay(amount : Money) : Receipt
23
+ }
24
+ class Customer {
25
+ + name : String
26
+ + email : String
27
+ }
28
+ Order "1" *-- "1..*" LineItem : contains >
29
+ Order --> OrderStatus
30
+ Order ..|> Payable
31
+ Customer "1" o-- "*" Order : places
32
+ note right of Customer : Customers may\n**place** many orders.
33
+ @enduml
@@ -0,0 +1,15 @@
1
+ @startuml
2
+ !include <C4/C4_Container>
3
+ title Internet banking (C4 container view)
4
+ Person(customer, "Customer", "A bank customer")
5
+ System_Boundary(bank, "Internet Banking") {
6
+ Container(web, "Web App", "React", "Delivers the SPA")
7
+ Container(api, "API", "Kotlin", "JSON/HTTPS API")
8
+ ContainerDb(db, "Database", "PostgreSQL", "Accounts, transactions")
9
+ }
10
+ System_Ext(mail, "E-mail system", "Sends notifications")
11
+ Rel(customer, web, "Uses", "HTTPS")
12
+ Rel(web, api, "Calls", "JSON")
13
+ Rel(api, db, "Reads/writes", "JDBC")
14
+ Rel(api, mail, "Sends e-mails", "SMTP")
15
+ @enduml
@@ -0,0 +1,14 @@
1
+ @startcreole
2
+ = Release notes
3
+ This release is a **complete rewrite** of //excaliplant//.
4
+ ----
5
+ * New pipeline: ""parse → layout → draw""
6
+ * 30+ diagram types
7
+ ** sequence, class, activity, state …
8
+ ** gantt, mindmap, json, regex …
9
+ |= Format |= Output |
10
+ | excalidraw | editable JSON |
11
+ | svg | hand-drawn vector |
12
+ | png | raster image |
13
+ [[https://github.com/grethel-labs/excaliplant Project page]]
14
+ @endcreole
@@ -0,0 +1,24 @@
1
+ @startuml
2
+ title Kubernetes deployment
3
+ actor User
4
+ cloud "CDN" as cdn
5
+ node "Kubernetes cluster" as k8s {
6
+ node "ingress" as ing
7
+ frame "shop namespace" {
8
+ component "web" as web
9
+ component "api" as api
10
+ queue "orders" as q
11
+ }
12
+ database "postgres" as pg
13
+ }
14
+ storage "backups" as bk
15
+ artifact "api.jar" as jar
16
+ User --> cdn
17
+ cdn --> ing : HTTPS
18
+ ing --> web
19
+ web --> api
20
+ api --> q
21
+ api --> pg
22
+ pg ..> bk : nightly
23
+ jar ..> api : deployed as
24
+ @enduml
@@ -0,0 +1,16 @@
1
+ @startditaa
2
+ +--------+ +-------+ +-------+
3
+ | +---+ ditaa +--->| |
4
+ | Text | +-------+ |diagram|
5
+ |Document| |!magic!| | |
6
+ | {d}| | | | |
7
+ +---+----+ +-------+ +-------+
8
+ : ^
9
+ | Lots of work |
10
+ +-------------------------+
11
+
12
+ /--------\ +--------+
13
+ | cBLU | | cGRE |
14
+ | Client +---->| Server |
15
+ \--------/ +--------+
16
+ @endditaa
@@ -0,0 +1,16 @@
1
+ @startdot
2
+ digraph pipeline {
3
+ rankdir=LR;
4
+ node [shape=box, style=filled, fillcolor="#e7f5ff"];
5
+ source [label="Source", shape=cylinder, fillcolor="#ffe8cc"];
6
+ subgraph cluster_build {
7
+ label="Build";
8
+ compile -> test -> package;
9
+ }
10
+ source -> compile [label="checkout"];
11
+ package -> deploy [label="artifact", style=dashed];
12
+ deploy [shape=component, fillcolor="#d3f9d8"];
13
+ test -> report [color=red];
14
+ report [shape=note, fillcolor="#fff3bf"];
15
+ }
16
+ @enddot
@@ -0,0 +1,9 @@
1
+ @startebnf
2
+ title JSON (simplified)
3
+ value = object | array | string | number | "true" | "false" | "null" ;
4
+ object = "{", [ member, { ",", member } ], "}" ;
5
+ member = string, ":", value ;
6
+ array = "[", [ value, { ",", value } ], "]" ;
7
+ (* digits with optional fraction *)
8
+ number = [ "-" ], digit, { digit }, [ ".", digit, { digit } ] ;
9
+ @endebnf
@@ -0,0 +1,10 @@
1
+ @startfiles
2
+ /src/index.mjs : public API
3
+ /src/core/pipeline.mjs
4
+ /src/core/preprocess/preprocessor.mjs
5
+ /src/diagrams/sequence/index.mjs
6
+ /src/render/svg.mjs : roughjs + Excalifont
7
+ /examples/
8
+ /package.json
9
+ /README.md
10
+ @endfiles
@@ -0,0 +1,19 @@
1
+ @startgantt
2
+ title Release plan
3
+ Project starts 2026-03-02
4
+ saturday are closed
5
+ sunday are closed
6
+ -- Design --
7
+ [Requirements] lasts 4 days and is 100% completed
8
+ [UI mockups] lasts 5 days and starts at [Requirements]'s end and is 60% completed
9
+ -- Build --
10
+ [Backend] as [BE] lasts 8 days and starts at [Requirements]'s end
11
+ [Frontend] lasts 7 days and starts at [UI mockups]'s end
12
+ [Integration] lasts 3 days
13
+ [BE] -> [Integration]
14
+ [Frontend] -> [Integration]
15
+ [Integration] on {Alice} {Bob}
16
+ [Beta release] happens at [Integration]'s end
17
+ [Backend] is colored in #ffc9c9/#c92a2a
18
+ today is 2026-03-11
19
+ @endgantt
@@ -0,0 +1,16 @@
1
+ @startjson
2
+ #highlight "order" / "status"
3
+ {
4
+ "order": {
5
+ "id": "A-1042",
6
+ "status": "shipped",
7
+ "total": 59.9,
8
+ "items": [
9
+ { "sku": "BK-1", "qty": 2 },
10
+ { "sku": "MG-7", "qty": 1 }
11
+ ]
12
+ },
13
+ "customer": { "name": "Ada", "vip": true },
14
+ "tags": ["express", "gift"]
15
+ }
16
+ @endjson
@@ -0,0 +1,5 @@
1
+ @startlatex
2
+ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
3
+ x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
4
+ \left( \sum_{k=0}^{n} \binom{n}{k} \right) \leq \lim_{n \to \infty} a_n
5
+ @endlatex
@@ -0,0 +1,12 @@
1
+ @startuml
2
+ (*) --> "Submit expense"
3
+ if "Amount > 1000?" then
4
+ -->[yes] "Manager approval"
5
+ --> ===SYNC===
6
+ else
7
+ -->[no] "Auto approve"
8
+ --> ===SYNC===
9
+ endif
10
+ ===SYNC=== --> "Pay out"
11
+ --> (*)
12
+ @enduml
@@ -0,0 +1,4 @@
1
+ @startmath
2
+ sum_(i=1)^n i^3=((n(n+1))/2)^2
3
+ f(x) = sqrt(x^2 + 1) / (2 pi)
4
+ @endmath
@@ -0,0 +1,19 @@
1
+ @startmindmap
2
+ * excaliplant
3
+ ** Parse
4
+ *** Preprocessor
5
+ *** Creole markup
6
+ *** 25+ diagram types
7
+ ** Layout
8
+ *** ELK graphs
9
+ *** Sequence engine
10
+ ***_ structured activity flow
11
+ left side
12
+ ** Render
13
+ *** Excalidraw JSON
14
+ *** SVG
15
+ *** PNG
16
+ ** Use
17
+ ***[#ffc9c9] CLI
18
+ *** Node API
19
+ @endmindmap
@@ -0,0 +1,23 @@
1
+ @startnwdiag
2
+ nwdiag {
3
+ internet [shape = cloud];
4
+ internet -- router;
5
+ network dmz {
6
+ address = "210.x.x.x/24"
7
+ router [address = "210.x.x.1"];
8
+ web01 [address = "210.x.x.10"];
9
+ web02 [address = "210.x.x.11"];
10
+ }
11
+ network internal {
12
+ address = "172.16.0.0/24";
13
+ web01 [address = "172.16.0.10"];
14
+ web02 [address = "172.16.0.11"];
15
+ db01 [address = "172.16.0.100", shape = database, description = "Primary DB"];
16
+ }
17
+ group web {
18
+ web01;
19
+ web02;
20
+ description = "Web cluster";
21
+ }
22
+ }
23
+ @endnwdiag
@@ -0,0 +1,16 @@
1
+ @startuml
2
+ object "alice : User" as alice {
3
+ name = "Alice"
4
+ role = ADMIN
5
+ }
6
+ object "cart1 : Cart" as cart {
7
+ items = 3
8
+ total = 59.90
9
+ }
10
+ map "Settings" as settings {
11
+ theme => dark
12
+ locale => de-DE
13
+ }
14
+ alice --> cart : owns
15
+ alice --> settings
16
+ @enduml
@@ -0,0 +1,4 @@
1
+ @startregex
2
+ title Simple e-mail address
3
+ ^[\w.+-]+@(?<domain>[a-z0-9-]+\.)+[a-z]{2,6}$
4
+ @endregex
@@ -0,0 +1,21 @@
1
+ @startsalt
2
+ {+
3
+ {/ <b>Login | Register | Help }
4
+ {
5
+ Username | "ada@example.com "
6
+ Password | "************** "
7
+ Role | ^Administrator^
8
+ }
9
+ [X] Remember me | () Light theme | (X) Dark theme
10
+ ..
11
+ {^"Recent workspaces"
12
+ {T
13
+ + Projects
14
+ ++ excaliplant
15
+ ++ docs
16
+ + Archive
17
+ }
18
+ }
19
+ [Cancel] | [ Sign in ]
20
+ }
21
+ @endsalt
@@ -0,0 +1,29 @@
1
+ @startuml
2
+ title Checkout flow
3
+ autonumber
4
+ actor Customer as C
5
+ box "Shop" #f1f3f5
6
+ participant "Web App" as W
7
+ participant API
8
+ end box
9
+ database Orders as DB
10
+ queue Events as Q
11
+
12
+ C -> W ++ : open checkout
13
+ W -> API ++ : POST /orders
14
+ API -> DB ++ : insert order
15
+ DB --> API -- : order id
16
+ alt payment ok
17
+ API -> Q : OrderPlaced
18
+ API --> W : 201 Created
19
+ else payment declined
20
+ API --> W : 402 Payment Required
21
+ note right of W : show retry\ndialog
22
+ end
23
+ deactivate API
24
+ == Fulfilment ==
25
+ ... some minutes later ...
26
+ Q ->> W : order shipped
27
+ W -> W : refresh view
28
+ W --> C -- : "Your order is on the way"
29
+ @enduml