Skip to content

Repository files navigation

Interactive OS Editable

This repository separates browser-correct editing mechanics from an opinionated Markdown runtime.

  • @interactive-os/json-document is the canonical, headless JSON state protocol.
  • @interactive-os/editable is the lightweight, schema-neutral browser kernel plus composable standard affordances.
  • @interactive-os/markdown-editor is a framework-neutral Markdown adapter and feature preset built on that kernel.
  • src/note-editor is the product-owned React demo, persistence layer, and optional collaboration assembly.

“Lightweight” describes dependencies and policy, not missing muscle memory. The fixed kernel supplies IME composition, Input Events, logical selection, and canonical transaction fencing. Its default lightweight preset composes clipboard normalization, uneditable/inline-atom boundary handling, replaceable history, and standard key bindings. Each document adapter still owns schema meaning and canonical JSON edits.

import {
  createMarkdownDocument,
  mountMarkdownEditor,
} from "@interactive-os/markdown-editor";

const document = createMarkdownDocument({
  id: "note",
  source: "# 제목 없는 노트",
});
const editor = mountMarkdownEditor({ root, document });

editor.dispatch({ inputType: "formatBold" });
editor.dispatch({ inputType: "historyUndo" });
editor.destroy();

The lightweight package does not install the Markdown parser, React, Lucide, or persistence code. The Markdown package depends on the lightweight public facade, spreads the lightweight feature preset, and adds Markdown parsing, Rich/Live Preview projection, commands, policies, and Markdown-specific key bindings.

packages/editable/browser/            schema-neutral kernel contract
packages/editable/browser/features/   lightweight optional affordances
packages/markdown-editor/features/    Markdown feature preset
packages/markdown-editor/             Markdown adapter and runtime facade
src/note-editor/                       app-owned React UI and local persistence
src/note-editor/runtime/               app-owned local/multi provider assembly

For exact composition and dependency rules, see editor feature composition.

The default / route mounts the local-only document and history. The same UI at /?mode=multi swaps in causal text authoring, selective history, and an in-memory peer through an explicit feature list. Neither published editor package depends on the collaboration provider; only the demo application opts into it.

Run

pnpm install
pnpm dev

Verify

pnpm exec tsc --noEmit
pnpm run test:package
pnpm run build:package
pnpm run check:editable-layers
pnpm run build
pnpm run verify:browser

Package verification packs and installs each artifact in a clean project. The lightweight fixture proves that Markdown, UI, and collaboration dependencies are absent. The Markdown fixture proves the parser is present while React, Lucide, and collaboration remain absent.

About

editable

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages