refactor(editor): rename model.doc to store (#12172)

This commit is contained in:
Saul-Mirone
2025-05-07 09:17:01 +00:00
parent eb62d0e853
commit 95b9e4b3d0
95 changed files with 264 additions and 246 deletions
@@ -97,16 +97,16 @@ export class BlockModel<Props extends object = object> {
return this._childModels.value;
}
get doc() {
get store() {
return this._store;
}
set doc(doc: Store) {
set store(doc: Store) {
this._store = doc;
}
get parent() {
return this.doc.getParent(this);
return this.store.getParent(this);
}
get role() {
@@ -63,7 +63,7 @@ export class FlatSyncController {
model.stash = this.stash;
model.pop = this.pop;
if (this.doc) {
model.doc = this.doc;
model.store = this.doc;
}
const defaultProps = schema.model.props?.(internalPrimitives);
@@ -168,7 +168,7 @@ export class SyncController {
model.stash = this.stash;
model.pop = this.pop;
if (this.doc) {
model.doc = this.doc;
model.store = this.doc;
}
const proxy = new Proxy(signalWithProps, {