mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
chore(editor): rename std.doc to std.store (#9596)
This commit is contained in:
@@ -35,7 +35,7 @@ export const insertImagesCommand: Command<
|
||||
place
|
||||
);
|
||||
if (removeEmptyLine && targetModel.text?.length === 0) {
|
||||
std.doc.deleteBlock(targetModel);
|
||||
std.store.deleteBlock(targetModel);
|
||||
}
|
||||
|
||||
return result ?? [];
|
||||
|
||||
@@ -468,7 +468,7 @@ export async function addImages(
|
||||
);
|
||||
const center = Vec.toVec(point);
|
||||
const bound = calcBoundByOrigin(center, inTopLeft);
|
||||
const blockId = std.doc.addBlock(
|
||||
const blockId = std.store.addBlock(
|
||||
'affine:image',
|
||||
{
|
||||
size: file.size,
|
||||
@@ -484,7 +484,7 @@ export async function addImages(
|
||||
const uploadPromises = imageFiles.map(async (file, index) => {
|
||||
const { point, blockId } = dropInfos[index];
|
||||
|
||||
const sourceId = await std.doc.blobSync.set(file);
|
||||
const sourceId = await std.store.blobSync.set(file);
|
||||
const imageSize = await readImageSize(file);
|
||||
|
||||
const center = Vec.toVec(point);
|
||||
@@ -498,7 +498,7 @@ export async function addImages(
|
||||
: imageSize.height;
|
||||
const bound = calcBoundByOrigin(center, inTopLeft, width, height);
|
||||
|
||||
std.doc.withoutTransact(() => {
|
||||
std.store.withoutTransact(() => {
|
||||
gfx.updateElement(blockId, {
|
||||
sourceId,
|
||||
...imageSize,
|
||||
|
||||
Reference in New Issue
Block a user