mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
chore(editor): rename std.doc to std.store (#9596)
This commit is contained in:
@@ -7,7 +7,7 @@ export const newIdCrossDoc =
|
||||
let samePage = false;
|
||||
slots.beforeImport.on(payload => {
|
||||
if (payload.type === 'slice') {
|
||||
samePage = payload.snapshot.pageId === std.doc.id;
|
||||
samePage = payload.snapshot.pageId === std.store.id;
|
||||
}
|
||||
if (payload.type === 'block' && !samePage) {
|
||||
payload.snapshot.id = std.workspace.idGenerator();
|
||||
|
||||
@@ -13,10 +13,10 @@ export const reorderList =
|
||||
matchFlavours(model, ['affine:list']) &&
|
||||
model.type === 'numbered'
|
||||
) {
|
||||
const next = std.doc.getNext(model);
|
||||
correctNumberedListsOrderToPrev(std.doc, model);
|
||||
const next = std.store.getNext(model);
|
||||
correctNumberedListsOrderToPrev(std.store, model);
|
||||
if (next) {
|
||||
correctNumberedListsOrderToPrev(std.doc, next);
|
||||
correctNumberedListsOrderToPrev(std.store, next);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ export const surfaceRefToEmbed =
|
||||
pageId &&
|
||||
payload.type === 'block' &&
|
||||
payload.snapshot.flavour === 'affine:surface-ref' &&
|
||||
!std.doc.hasBlock(payload.snapshot.id)
|
||||
!std.store.hasBlock(payload.snapshot.id)
|
||||
) {
|
||||
const id = payload.snapshot.id;
|
||||
payload.snapshot.id = std.workspace.idGenerator();
|
||||
|
||||
Reference in New Issue
Block a user