Add the plan MDX dialect
The document model: a restricted MDX dialect, its Lexical schema, and the canonical serialisation between them. One registry drives both the browser editor and headless conversion on the server, because divergence there means the two disagree about what a plan is. Images are plain https URLs rather than uploaded assets. Validation mirrors the link check but demands an absolute URL, since an image has nothing to resolve a relative path against. The import visitor turns a URL the dialect will not accept back into the text it came from: it would otherwise import cleanly, serialise cleanly, and fail validation on the server, rebuilding the epoch over something the author could have fixed if they could see it. Component ids are minted wherever the component is created rather than only by the server. A ULID has enough entropy that two editors inserting at the same instant cannot collide, so this needs no round trip. The generator and the validator are two halves of one contract, so a test asserts they agree. Node types, state keys and data attributes are prefixed `plan-`.
Parentf6b9e56
28 files changed+4636-0
StackedSplit