Files
pluma/00_unanchay/pluma/pluma-editor-cuerpo/README.md
T
sergio 30467600bc feat: pluma standalone — autoría multilienzo (haz de cuerpos) + notebook reactivo (front-door, git-dep al monorepo)
Front-door limpio: solo crates del dominio; Llimphi y lo fundacional por
git-dep del monorepo gioser.git. cargo check pasa (40 crates, 0 errores).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:18:01 +00:00

814 B

pluma-editor-cuerpo

Text ↔ atoms editor with diff (greedy) for pluma.

EditorCuerpo { texto, atom_ids }. from_cuerpo(c, atoms) concatenates with SEPARADOR = "\n\n". parrafos() retrieves the current split. diff(atoms_originales) -> Vec<CambioAtom> with greedy content-matching: matching paragraphs are skipped, differing ones emit Mutar reusing the Uuid (live threads), excess emits Crear or Eliminar. aplicar_cambios(cambios, nuevos_ids) extends/removes atom_ids after persisting.

API

use pluma_editor_cuerpo::EditorCuerpo;

let mut e = EditorCuerpo::from_cuerpo(&c, &atoms);
e.set_texto(nuevo);
let cambios = e.diff(&atoms_originales);

Deps