Merge [K4][6][8] Aktionen erzeugen Ops direkt (Griffe, Objekt-Info, Auswahl, Zeichenbefehle ohne diffToOps), Gruppen mit Schluessel, schnelleres applyOps

Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
Claude committed 2026-10-28 22:12:20 +00:00
commit 94978e844c
60 files changed
+1780 -817

No files matched your search

+10 -1
View File
@@ -79,7 +79,7 @@ pub fn doc_commit(h: u32, ops_json: &str, key: &str, now_ms: f64) -> String {
Ok(ops) => {
let key = (!key.is_empty()).then_some(key);
let now = if now_ms.is_finite() { now_ms } else { 0.0 };
problems_text(with_doc(h, |d| d.commit(&ops, key, now, may_have_marks(ops_json))), None)
problems_text(with_doc(h, |d| d.commit(ops, key, now, may_have_marks(ops_json))), None)
}
}
}
@@ -132,6 +132,15 @@ pub fn doc_group_begin(h: u32) {
with_doc(h, |d| d.history_mut().begin_group());
}
/// Wie `doc_group_begin`, mit Schlüssel und Zeit (ms): aufeinanderfolgende Gruppen mit gleichem
/// Schlüssel im Zeitfenster werden ein Undo-Schritt (Griff-Zug mit mitgeführten Elementen).
#[wasm_bindgen]
pub fn doc_group_begin_keyed(h: u32, key: &str, now_ms: f64) {
let key = (!key.is_empty()).then_some(key);
let now = if now_ms.is_finite() { now_ms } else { 0.0 };
with_doc(h, |d| d.history_mut().begin_group_keyed(key, now));
}
#[wasm_bindgen]
pub fn doc_group_end(h: u32) {
with_doc(h, |d| d.history_mut().end_group());