@liminis/editor 0.4.0 → 0.4.1

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 CHANGED
@@ -8,7 +8,8 @@ It is the editor from [Liminis](https://github.com/verveguy/liminis), extracted
8
8
  into this repository so it can stand on its own. MIT-licensed.
9
9
 
10
10
  Its history, and how to read the `ADR-0NNN`, `FR-NNN` and `#NNN` references that
11
- travelled with the code, are recorded in [`docs/provenance.md`](./docs/provenance.md).
11
+ travelled with the code, are recorded in [`docs/provenance.md`](./docs/provenance.md)
12
+ ([on the docs site](https://v3rv.com/liminis-editor/guide/provenance/)).
12
13
 
13
14
  ## What you get
14
15
 
@@ -490,12 +491,35 @@ over the same round-trip fixture corpus the package's own test suite uses, so
490
491
  every fixture-representable node class renders somewhere in it. See
491
492
  [`examples/demo/README.md`](./examples/demo/README.md).
492
493
 
493
- `examples/demo` is also the source of the public GitHub Pages site: a
494
+ `examples/demo` is also the demo on the public GitHub Pages site, at
495
+ **[v3rv.com/liminis-editor/demo/](https://v3rv.com/liminis-editor/demo/)** — a
494
496
  `release`-triggered (not merge-triggered) build of this same shell, showing a
495
- visible version badge for the published release it represents and a
496
- Documentation tab rendering this README. Between releases the deployed site
497
- stays on the last published version even as `main` keeps moving — that
498
- staleness is intentional, not a bug (see `docs/decisions/adr-082.md`).
497
+ visible version badge for the published release it represents. Between releases
498
+ the deployed site stays on the last published version even as `main` keeps
499
+ moving that staleness is intentional, not a bug (see
500
+ `docs/decisions/adr-082.md`).
501
+
502
+ ## Documentation site
503
+
504
+ **[v3rv.com/liminis-editor](https://v3rv.com/liminis-editor/)** publishes the
505
+ pages in [`docs/`](./docs/) with search, cross-links, and the C4 diagrams
506
+ rendered live rather than as pictures.
507
+
508
+ `docs/*.md` remains the source of truth and is not moved or modified for the
509
+ site: it ships inside the published tarball, `tests/adr-citations.test.ts` walks
510
+ it, and it is cited by path from ADRs, the CHANGELOG and source comments.
511
+ `site/scripts/sync-docs.mjs` generates the site's copy from it, taking each
512
+ page's title from its H1.
513
+
514
+ ```bash
515
+ pnpm --dir site demo # build the demo and stage it at /demo/ (once)
516
+ pnpm --dir site dev # serve the docs at http://localhost:4321/liminis-editor/
517
+ pnpm --dir site diagrams # re-render the committed SVGs after editing a ```c4 fence
518
+ ```
519
+
520
+ `site/` is its own package, deliberately not a workspace member — the same
521
+ reasoning as `examples/`. An Astro toolchain has no business in the dev install
522
+ CI runs for lint, typecheck and test.
499
523
 
500
524
  ## Electron e2e shell
501
525
 
@@ -510,7 +534,8 @@ application, to exist. See
510
534
  ```bash
511
535
  pnpm build:examples # builds and packs the package once, then builds both
512
536
  # examples/demo and examples/electron against it
513
- pnpm build:site # builds examples/demo only — what the release-triggered
537
+ pnpm build:site # builds examples/demo only — wrapped by the site's
538
+ # `pnpm --dir site demo`, which the release-triggered
514
539
  # Pages deploy runs (see the Demo section above)
515
540
  ```
516
541
 
@@ -0,0 +1,80 @@
1
+ # Architecture
2
+
3
+ Which entry point to import, what each one costs you, and where the boundary
4
+ between this package and its host actually falls.
5
+
6
+ ## The package and the world around it
7
+
8
+ `@liminis/editor` is a component, not an application. It has no storage, no file
9
+ dialogs, no network, and no opinion about where a document came from. Everything
10
+ it needs from its environment arrives through the host seam as an injected
11
+ function with a working default, so `<Editor>` renders in a host that supplies
12
+ nothing at all — and a host that supplies everything gets an editor wired into
13
+ its own file system, its own clipboard, and its own annotation store.
14
+
15
+ ```c4 static height=24rem
16
+ Person(author, "Author", "Writes and edits markdown documents")
17
+
18
+ System_Boundary(host, "Host application") {
19
+ Container(shell, "Host shell", "Electron or browser", "Owns documents, storage and windows. Supplies the seam.")
20
+ Container(editor, "@liminis/editor", "React + Lexical", "The editing surface, the markdown pipeline and annotations")
21
+ }
22
+
23
+ System_Ext(store, "Document store", "Files, a database, a sync service — the host's concern, never this package's")
24
+
25
+ Rel(author, shell, "Opens and edits documents")
26
+ Rel(shell, editor, "Mounts <Editor>, injects host services")
27
+ Rel(editor, shell, "Reports changes, requests services through the seam")
28
+ Rel(shell, store, "Reads and writes")
29
+ ```
30
+ <picture><source media="(prefers-color-scheme: dark)" srcset="./diagrams/architecture-1-dark.svg" /><img src="./diagrams/architecture-1.svg" alt="Diagram 1 from architecture.md" /></picture>
31
+
32
+ The arrow that matters is the one from the editor back to the shell. It is not a
33
+ callback bolted on for one feature; it is how every capability the editor cannot
34
+ implement for itself is obtained. A host that ignores it still gets an editor,
35
+ because every one of those services has a default.
36
+
37
+ ## Entry points
38
+
39
+ The package is split so that a consumer pays only for what it imports. The
40
+ divide that does the most work is `./headless`: it is DOM-free, which is what
41
+ lets the Electron **main** process import it at all.
42
+
43
+ ```c4 static height=26rem
44
+ Container_Boundary(pkg, "@liminis/editor") {
45
+ Component(main, ".", "React", "<Editor>, the host seam, the annotation UI")
46
+ Component(md, "./markdown", "mdast", "parseMarkdown / stringifyMarkdown, no editor mounted")
47
+ Component(ann, "./annotations", "TypeScript", "Range anchoring that survives edits")
48
+ Component(headless, "./headless", "DOM-free", "Safe in an Electron main process")
49
+ Component(nodes, "./nodes", "Lexical", "The custom node set, for a host building its own editor")
50
+ }
51
+
52
+ System_Ext(lexical, "Lexical", "Peer dependency — the editing engine")
53
+ System_Ext(mdast, "mdast / micromark", "GFM, math, footnotes, definition lists, wiki-links")
54
+ System_Ext(diagrams, "@liminis/diagrams", "Renders the C4 diagrams on this page")
55
+
56
+ Rel(main, nodes, "Registers")
57
+ Rel(main, md, "Parses and serialises through")
58
+ Rel(main, ann, "Anchors annotations with")
59
+ Rel(nodes, lexical, "Extends")
60
+ Rel(md, mdast, "Built on")
61
+ Rel(headless, diagrams, "Re-exports renderC4DiagramToSVG")
62
+ Rel(headless, mdast, "Parses with")
63
+ ```
64
+ <picture><source media="(prefers-color-scheme: dark)" srcset="./diagrams/architecture-2-dark.svg" /><img src="./diagrams/architecture-2.svg" alt="Diagram 2 from architecture.md" /></picture>
65
+
66
+ `./headless` re-exporting `renderC4DiagramToSVG` is the reason the two packages
67
+ appear together here: a C4 diagram in a document has to render in the main
68
+ process too, where there is no DOM, and `@liminis/diagrams/server` is DOM-free
69
+ for exactly that reason.
70
+
71
+ ## What this means when you install it
72
+
73
+ - Importing `.` brings React and Lexical. That is the editor.
74
+ - Importing `./markdown` or `./annotations` brings neither. They are ordinary
75
+ TypeScript over mdast, usable in a script or a server.
76
+ - Importing `./headless` is a promise enforced by its own doc comment: nothing
77
+ reachable from it may touch `document`, `window`, or Lexical.
78
+ - Lexical is a **peer** dependency. The host owns the version, because a host
79
+ that mounts its own Lexical plugins beside this editor must not end up with
80
+ two copies of it.
@@ -0,0 +1 @@
1
+ <svg width="1286" height="535" viewBox="-50 0 1286 535" xmlns="http://www.w3.org/2000/svg" data-diagram="c4" style="font-family:system-ui, -apple-system, sans-serif"><g class="boundaries-layer"><g><rect x="190" y="40" width="440" height="455" rx="8" ry="8" fill="#131619" stroke="#47657d" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="410" y="64" text-anchor="middle" fill="#d6d6d6" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Host application</text></g></g><g class="nodes-layer"><g><circle cx="50" cy="156" r="14" fill="#006b2d" stroke="#009848" stroke-width="1.5"></circle><rect x="30" y="174" width="40" height="30" rx="20" ry="8" fill="#006b2d" stroke="#009848" stroke-width="1.5"></rect><text x="50" y="232" text-anchor="middle" fill="#d6d6d6" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Author</text><text x="50" y="246" text-anchor="middle" fill="#d6d6d6" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7">Writes and edits ...</text></g><g><rect x="230" y="135" width="360" height="110" rx="8" ry="8" fill="#16191c" stroke="#0098e0" stroke-width="2.5" stroke-dasharray="none"></rect><text x="410" y="178" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Host shell</text><text x="410" y="194" text-anchor="middle" fill="#b2b2b2" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[Electron or browser]</text><text x="410" y="216" text-anchor="middle" fill="#b2b2b2" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="410" dy="0">Owns documents, storage and windows. Supplies the seam.</tspan></text></g><g><rect x="230" y="345" width="360" height="110" rx="8" ry="8" fill="#16191c" stroke="#0098e0" stroke-width="2.5" stroke-dasharray="none"></rect><text x="410" y="388" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">@liminis/editor</text><text x="410" y="404" text-anchor="middle" fill="#b2b2b2" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[React + Lexical]</text><text x="410" y="426" text-anchor="middle" fill="#b2b2b2" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="410" dy="0">The editing surface, the markdown pipeline and</tspan><tspan x="410" dy="14">annotations</tspan></text></g><g><rect x="820" y="143" width="360" height="94" rx="8" ry="8" fill="#2d2d2d" stroke="#667280" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="1000" y="184" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Document store</text><text x="1000" y="204" text-anchor="middle" fill="#b2b2b2" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="1000" dy="0">Files, a database, a sync service — the host&#x27;s concern,</tspan><tspan x="1000" dy="14">never this package&#x27;s</tspan></text></g></g><g class="edges-layer"><g><path d="M 110 190 L 222 190" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="230,190 222,194 222,186" fill="#a7a7a7"></polygon><text x="170" text-anchor="middle" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(0, 170, 190)"><tspan x="170" y="194">Opens and edits documents</tspan></text></g><g><path d="M 397.5 245 L 397.5 337" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="397.5,345 393.5,337 401.5,337" fill="#a7a7a7"></polygon><rect x="387.5" y="285" width="20" height="20" rx="3" fill="#16191c" stroke="#a7a7a7" stroke-width="1.5"></rect><text x="397.5" y="299" text-anchor="middle" fill="#a7a7a7" font-size="10" font-weight="600" font-family="system-ui, -apple-system, sans-serif">B</text></g><g><path d="M 422.5 345 L 422.5 253" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="422.5,245 426.5,253 418.5,253" fill="#a7a7a7"></polygon><rect x="412.5" y="285" width="20" height="20" rx="3" fill="#16191c" stroke="#a7a7a7" stroke-width="1.5"></rect><text x="422.5" y="299" text-anchor="middle" fill="#a7a7a7" font-size="10" font-weight="600" font-family="system-ui, -apple-system, sans-serif">A</text></g><g><path d="M 590 190 L 653.6 190" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><path d="M 756.4 190 L 812 190" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="820,190 812,194 812,186" fill="#a7a7a7"></polygon><text x="705" text-anchor="middle" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(0, 705, 190)"><tspan x="705" y="194">Reads and writes</tspan></text></g></g><g class="legend-layer"><g><rect x="920" y="20" width="18" height="18" rx="3" fill="#16191c" stroke="#a7a7a7" stroke-width="1.5"></rect><text x="929" y="33" text-anchor="middle" fill="#a7a7a7" font-size="10" font-weight="600" font-family="system-ui, -apple-system, sans-serif">A</text><text x="946" y="33" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif">Reports changes, requests services through the seam</text></g><g><rect x="920" y="44" width="18" height="18" rx="3" fill="#16191c" stroke="#a7a7a7" stroke-width="1.5"></rect><text x="929" y="57" text-anchor="middle" fill="#a7a7a7" font-size="10" font-weight="600" font-family="system-ui, -apple-system, sans-serif">B</text><text x="946" y="57" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif">Mounts &lt;Editor&gt;, injects host services</text></g></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="1286" height="535" viewBox="-50 0 1286 535" xmlns="http://www.w3.org/2000/svg" data-diagram="c4" style="font-family:system-ui, -apple-system, sans-serif"><g class="boundaries-layer"><g><rect x="190" y="40" width="440" height="455" rx="8" ry="8" fill="#f4f7fb" stroke="#63869b" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="410" y="64" text-anchor="middle" fill="#3d3d3d" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Host application</text></g></g><g class="nodes-layer"><g><circle cx="50" cy="156" r="14" fill="#006b2d" stroke="#004b1e" stroke-width="1.5"></circle><rect x="30" y="174" width="40" height="30" rx="20" ry="8" fill="#006b2d" stroke="#004b1e" stroke-width="1.5"></rect><text x="50" y="232" text-anchor="middle" fill="#3d3d3d" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Author</text><text x="50" y="246" text-anchor="middle" fill="#3d3d3d" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7">Writes and edits ...</text></g><g><rect x="230" y="135" width="360" height="110" rx="8" ry="8" fill="#ffffff" stroke="#005998" stroke-width="2.5" stroke-dasharray="none"></rect><text x="410" y="178" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Host shell</text><text x="410" y="194" text-anchor="middle" fill="#626262" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[Electron or browser]</text><text x="410" y="216" text-anchor="middle" fill="#626262" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="410" dy="0">Owns documents, storage and windows. Supplies the seam.</tspan></text></g><g><rect x="230" y="345" width="360" height="110" rx="8" ry="8" fill="#ffffff" stroke="#005998" stroke-width="2.5" stroke-dasharray="none"></rect><text x="410" y="388" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">@liminis/editor</text><text x="410" y="404" text-anchor="middle" fill="#626262" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[React + Lexical]</text><text x="410" y="426" text-anchor="middle" fill="#626262" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="410" dy="0">The editing surface, the markdown pipeline and</tspan><tspan x="410" dy="14">annotations</tspan></text></g><g><rect x="820" y="143" width="360" height="94" rx="8" ry="8" fill="#f0f4f8" stroke="#667280" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="1000" y="184" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Document store</text><text x="1000" y="204" text-anchor="middle" fill="#626262" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="1000" dy="0">Files, a database, a sync service — the host&#x27;s concern,</tspan><tspan x="1000" dy="14">never this package&#x27;s</tspan></text></g></g><g class="edges-layer"><g><path d="M 110 190 L 222 190" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="230,190 222,194 222,186" fill="#565656"></polygon><text x="170" text-anchor="middle" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(0, 170, 190)"><tspan x="170" y="194">Opens and edits documents</tspan></text></g><g><path d="M 397.5 245 L 397.5 337" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="397.5,345 393.5,337 401.5,337" fill="#565656"></polygon><rect x="387.5" y="285" width="20" height="20" rx="3" fill="#ffffff" stroke="#565656" stroke-width="1.5"></rect><text x="397.5" y="299" text-anchor="middle" fill="#565656" font-size="10" font-weight="600" font-family="system-ui, -apple-system, sans-serif">B</text></g><g><path d="M 422.5 345 L 422.5 253" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="422.5,245 426.5,253 418.5,253" fill="#565656"></polygon><rect x="412.5" y="285" width="20" height="20" rx="3" fill="#ffffff" stroke="#565656" stroke-width="1.5"></rect><text x="422.5" y="299" text-anchor="middle" fill="#565656" font-size="10" font-weight="600" font-family="system-ui, -apple-system, sans-serif">A</text></g><g><path d="M 590 190 L 653.6 190" fill="none" stroke="#565656" stroke-width="1.5"></path><path d="M 756.4 190 L 812 190" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="820,190 812,194 812,186" fill="#565656"></polygon><text x="705" text-anchor="middle" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(0, 705, 190)"><tspan x="705" y="194">Reads and writes</tspan></text></g></g><g class="legend-layer"><g><rect x="920" y="20" width="18" height="18" rx="3" fill="#ffffff" stroke="#565656" stroke-width="1.5"></rect><text x="929" y="33" text-anchor="middle" fill="#565656" font-size="10" font-weight="600" font-family="system-ui, -apple-system, sans-serif">A</text><text x="946" y="33" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif">Reports changes, requests services through the seam</text></g><g><rect x="920" y="44" width="18" height="18" rx="3" fill="#ffffff" stroke="#565656" stroke-width="1.5"></rect><text x="929" y="57" text-anchor="middle" fill="#565656" font-size="10" font-weight="600" font-family="system-ui, -apple-system, sans-serif">B</text><text x="946" y="57" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif">Mounts &lt;Editor&gt;, injects host services</text></g></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="1761" height="545" viewBox="0 0 1761 545" xmlns="http://www.w3.org/2000/svg" data-diagram="c4" style="font-family:system-ui, -apple-system, sans-serif"><g class="boundaries-layer"></g><g class="nodes-layer"><g><rect x="40" y="40" width="1105" height="455" rx="8" ry="8" fill="#131619" stroke="#47657d" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="592.5" y="64" text-anchor="middle" fill="#d6d6d6" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">@liminis/editor</text></g><g><rect x="388" y="135" width="294" height="110" rx="4" ry="4" fill="#16191c" stroke="#2b89bf" stroke-width="2.5"></rect><text x="535" y="186" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">.</text><text x="535" y="202" text-anchor="middle" fill="#b2b2b2" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[React]</text></g><g><rect x="355" y="345" width="360" height="110" rx="4" ry="4" fill="#16191c" stroke="#2b89bf" stroke-width="2.5"></rect><text x="535" y="396" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">./markdown</text><text x="535" y="412" text-anchor="middle" fill="#b2b2b2" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[mdast]</text></g><g><rect x="80" y="345" width="245" height="110" rx="4" ry="4" fill="#16191c" stroke="#2b89bf" stroke-width="2.5"></rect><text x="202.5" y="396" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">./annotations</text><text x="202.5" y="412" text-anchor="middle" fill="#b2b2b2" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[TypeScript]</text></g><g><rect x="712" y="135" width="240" height="110" rx="4" ry="4" fill="#16191c" stroke="#2b89bf" stroke-width="2.5"></rect><text x="832" y="186" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">./headless</text><text x="832" y="202" text-anchor="middle" fill="#b2b2b2" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[DOM-free]</text></g><g><rect x="745" y="345" width="360" height="110" rx="4" ry="4" fill="#16191c" stroke="#2b89bf" stroke-width="2.5"></rect><text x="925" y="396" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">./nodes</text><text x="925" y="412" text-anchor="middle" fill="#b2b2b2" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[Lexical]</text></g><g><rect x="1371" y="411" width="252" height="94" rx="8" ry="8" fill="#2d2d2d" stroke="#667280" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="1497" y="452" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Lexical</text><text x="1497" y="472" text-anchor="middle" fill="#b2b2b2" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="1497" dy="0">Peer dependency — the editing engine</tspan></text></g><g><rect x="1371" y="277" width="350" height="94" rx="8" ry="8" fill="#2d2d2d" stroke="#667280" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="1546" y="318" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">mdast / micromark</text><text x="1546" y="338" text-anchor="middle" fill="#b2b2b2" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="1546" dy="0">GFM, math, footnotes, definition lists, wiki-links</tspan></text></g><g><rect x="1371" y="143" width="252" height="94" rx="8" ry="8" fill="#2d2d2d" stroke="#667280" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="1497" y="184" text-anchor="middle" dominant-baseline="middle" fill="#d6d6d6" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">@liminis/diagrams</text><text x="1497" y="204" text-anchor="middle" fill="#b2b2b2" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="1497" dy="0">Renders the C4 diagrams on this page</tspan></text></g></g><g class="edges-layer"><g><path d="M 637.143 245 L 703.68 280.828" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><path d="M 756.904 309.487 L 815.813 341.207" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="822.857,345 813.917,344.729 817.71,337.685" fill="#a7a7a7"></polygon><text x="730" text-anchor="middle" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(28.301, 730, 295)"><tspan x="730" y="299">Registers</tspan></text></g><g><path d="M 535 245 L 535 287.2" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><path d="M 535 304.2 L 535 337" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="535,345 531,337 539,337" fill="#a7a7a7"></polygon><text x="535" text-anchor="middle" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(0, 535, 295)"><tspan x="535" y="299">Parses and serialises through</tspan></text></g><g><path d="M 447.917 245 L 432.353 254.83" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><path d="M 304.515 335.569 L 296.347 340.728" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="289.583,345 294.211,337.346 298.483,344.11" fill="#a7a7a7"></polygon><text x="368.75" text-anchor="middle" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(-32.276, 368.75, 295)"><tspan x="368.75" y="299">Anchors annotations with</tspan></text></g><g><path d="M 1105 418.252 L 1214.019 429.306" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><path d="M 1262.122 434.184 L 1363.041 444.417" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="1371,445.224 1362.637,448.397 1363.444,440.437" fill="#a7a7a7"></polygon><text x="1238" text-anchor="middle" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(5.79, 1238, 431.738)"><tspan x="1238" y="435.738">Extends</tspan></text></g><g><path d="M 715 386.469 L 1015.824 363.855" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><path d="M 1070.071 359.777 L 1363.023 337.755" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="1371,337.155 1363.322,341.743 1362.723,333.766" fill="#a7a7a7"></polygon><text x="1043" text-anchor="middle" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(-4.299, 1043, 361.812)"><tspan x="1043" y="365.812">Built on</tspan></text></g><g><path d="M 952 190 L 1098 190" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><path d="M 1225 190 L 1363 190" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="1371,190 1363,194 1363,186" fill="#a7a7a7"></polygon><text x="1161.5" text-anchor="middle" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(0, 1161.5, 190)"><tspan x="1161.5" y="183">Re-exports</tspan><tspan x="1161.5" y="197">renderC4DiagramToSVG</tspan></text></g><g><path d="M 952 212.521 L 1125.974 245.172" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><path d="M 1197.279 258.554 L 1363.137 289.681" fill="none" stroke="#a7a7a7" stroke-width="1.5"></path><polygon points="1371,291.157 1362.399,293.613 1363.875,285.75" fill="#a7a7a7"></polygon><text x="1161.5" text-anchor="middle" fill="#bebebe" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(10.629, 1161.5, 251.839)"><tspan x="1161.5" y="255.839">Parses with</tspan></text></g></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="1761" height="545" viewBox="0 0 1761 545" xmlns="http://www.w3.org/2000/svg" data-diagram="c4" style="font-family:system-ui, -apple-system, sans-serif"><g class="boundaries-layer"></g><g class="nodes-layer"><g><rect x="40" y="40" width="1105" height="455" rx="8" ry="8" fill="#f4f7fb" stroke="#63869b" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="592.5" y="64" text-anchor="middle" fill="#3d3d3d" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">@liminis/editor</text></g><g><rect x="388" y="135" width="294" height="110" rx="4" ry="4" fill="#f8f8f8" stroke="#0068a0" stroke-width="2.5"></rect><text x="535" y="186" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">.</text><text x="535" y="202" text-anchor="middle" fill="#626262" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[React]</text></g><g><rect x="355" y="345" width="360" height="110" rx="4" ry="4" fill="#f8f8f8" stroke="#0068a0" stroke-width="2.5"></rect><text x="535" y="396" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">./markdown</text><text x="535" y="412" text-anchor="middle" fill="#626262" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[mdast]</text></g><g><rect x="80" y="345" width="245" height="110" rx="4" ry="4" fill="#f8f8f8" stroke="#0068a0" stroke-width="2.5"></rect><text x="202.5" y="396" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">./annotations</text><text x="202.5" y="412" text-anchor="middle" fill="#626262" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[TypeScript]</text></g><g><rect x="712" y="135" width="240" height="110" rx="4" ry="4" fill="#f8f8f8" stroke="#0068a0" stroke-width="2.5"></rect><text x="832" y="186" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">./headless</text><text x="832" y="202" text-anchor="middle" fill="#626262" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[DOM-free]</text></g><g><rect x="745" y="345" width="360" height="110" rx="4" ry="4" fill="#f8f8f8" stroke="#0068a0" stroke-width="2.5"></rect><text x="925" y="396" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="13" font-weight="500" font-family="system-ui, -apple-system, sans-serif">./nodes</text><text x="925" y="412" text-anchor="middle" fill="#626262" font-size="10" font-family="system-ui, -apple-system, sans-serif" opacity="0.8">[Lexical]</text></g><g><rect x="1371" y="411" width="252" height="94" rx="8" ry="8" fill="#f0f4f8" stroke="#667280" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="1497" y="452" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">Lexical</text><text x="1497" y="472" text-anchor="middle" fill="#626262" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="1497" dy="0">Peer dependency — the editing engine</tspan></text></g><g><rect x="1371" y="277" width="350" height="94" rx="8" ry="8" fill="#f0f4f8" stroke="#667280" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="1546" y="318" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">mdast / micromark</text><text x="1546" y="338" text-anchor="middle" fill="#626262" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="1546" dy="0">GFM, math, footnotes, definition lists, wiki-links</tspan></text></g><g><rect x="1371" y="143" width="252" height="94" rx="8" ry="8" fill="#f0f4f8" stroke="#667280" stroke-width="2.5" stroke-dasharray="8 4"></rect><text x="1497" y="184" text-anchor="middle" dominant-baseline="middle" fill="#303030" font-size="14" font-weight="600" font-family="system-ui, -apple-system, sans-serif">@liminis/diagrams</text><text x="1497" y="204" text-anchor="middle" fill="#626262" font-size="11" font-family="system-ui, -apple-system, sans-serif" opacity="0.7"><tspan x="1497" dy="0">Renders the C4 diagrams on this page</tspan></text></g></g><g class="edges-layer"><g><path d="M 637.143 245 L 703.68 280.828" fill="none" stroke="#565656" stroke-width="1.5"></path><path d="M 756.904 309.487 L 815.813 341.207" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="822.857,345 813.917,344.729 817.71,337.685" fill="#565656"></polygon><text x="730" text-anchor="middle" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(28.301, 730, 295)"><tspan x="730" y="299">Registers</tspan></text></g><g><path d="M 535 245 L 535 287.2" fill="none" stroke="#565656" stroke-width="1.5"></path><path d="M 535 304.2 L 535 337" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="535,345 531,337 539,337" fill="#565656"></polygon><text x="535" text-anchor="middle" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(0, 535, 295)"><tspan x="535" y="299">Parses and serialises through</tspan></text></g><g><path d="M 447.917 245 L 432.353 254.83" fill="none" stroke="#565656" stroke-width="1.5"></path><path d="M 304.515 335.569 L 296.347 340.728" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="289.583,345 294.211,337.346 298.483,344.11" fill="#565656"></polygon><text x="368.75" text-anchor="middle" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(-32.276, 368.75, 295)"><tspan x="368.75" y="299">Anchors annotations with</tspan></text></g><g><path d="M 1105 418.252 L 1214.019 429.306" fill="none" stroke="#565656" stroke-width="1.5"></path><path d="M 1262.122 434.184 L 1363.041 444.417" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="1371,445.224 1362.637,448.397 1363.444,440.437" fill="#565656"></polygon><text x="1238" text-anchor="middle" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(5.79, 1238, 431.738)"><tspan x="1238" y="435.738">Extends</tspan></text></g><g><path d="M 715 386.469 L 1015.824 363.855" fill="none" stroke="#565656" stroke-width="1.5"></path><path d="M 1070.071 359.777 L 1363.023 337.755" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="1371,337.155 1363.322,341.743 1362.723,333.766" fill="#565656"></polygon><text x="1043" text-anchor="middle" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(-4.299, 1043, 361.812)"><tspan x="1043" y="365.812">Built on</tspan></text></g><g><path d="M 952 190 L 1098 190" fill="none" stroke="#565656" stroke-width="1.5"></path><path d="M 1225 190 L 1363 190" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="1371,190 1363,194 1363,186" fill="#565656"></polygon><text x="1161.5" text-anchor="middle" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(0, 1161.5, 190)"><tspan x="1161.5" y="183">Re-exports</tspan><tspan x="1161.5" y="197">renderC4DiagramToSVG</tspan></text></g><g><path d="M 952 212.521 L 1125.974 245.172" fill="none" stroke="#565656" stroke-width="1.5"></path><path d="M 1197.279 258.554 L 1363.137 289.681" fill="none" stroke="#565656" stroke-width="1.5"></path><polygon points="1371,291.157 1362.399,293.613 1363.875,285.75" fill="#565656"></polygon><text x="1161.5" text-anchor="middle" fill="#4a4a4a" font-size="11" font-family="system-ui, -apple-system, sans-serif" transform="rotate(10.629, 1161.5, 251.839)"><tspan x="1161.5" y="255.839">Parses with</tspan></text></g></g></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liminis/editor",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "//publishing": "Publishing is deliberate, never incidental. `private: true` was this package's guard until verveguy/liminis-editor#39 took the publish decision; it is gone because that decision was taken, not because it was tidied away. The guard is now `prepublishOnly` -> scripts/guard-publish.mjs, which refuses unless LIMINIS_ALLOW_PUBLISH=1 is set explicitly. That variable is set at step scope in .github/workflows/publish.yml and nowhere else, so a release is the only path that publishes. Note that `npm publish --dry-run` does NOT report a private package as blocked (npm 10.8.2), which is why the guard is a script rather than a flag.",
5
5
  "license": "MIT",
6
6
  "description": "Lexical-based markdown WYSIWYG editor with mdast round-trip and a host-injection seam",
@@ -99,7 +99,7 @@
99
99
  "react-dom": "^19.2.0"
100
100
  },
101
101
  "dependencies": {
102
- "@liminis/diagrams": "^0.1.1",
102
+ "@liminis/diagrams": "^0.1.5",
103
103
  "@mathjax/src": "^4.1.1",
104
104
  "lucide-react": "^1.11.0",
105
105
  "mdast-util-definition-list": "^2.0.0",