ironcalc / IronCalc

Main engine of the IronCalc ecosystem
Apache License 2.0
48 stars 2 forks source link

Create UserModel API #7

Closed nhatcher closed 3 months ago

nhatcher commented 4 months ago

The UserModel API adds undo/redo history and diffs on the top of Model:

This is the API intended to be used by applications like the Web UI or Tironcalc.

In pseudo code:

let model = UserModel::new();
model.set_input("A1", "=1+1");
assert(model.get("A1") == 2);
model.undo();
model.redo();

In this API changes like setting inputs will also evaluate the model. This also should emit diffs with changes and be able to apply external diffs. Preparing the client for parallel editing

nhatcher commented 3 months ago

Done!