chore(editor): rename std.doc to std.store (#9596)

This commit is contained in:
Saul-Mirone
2025-01-09 04:16:28 +00:00
parent 58ce86533e
commit d21ef47ae8
89 changed files with 359 additions and 348 deletions

View File

@@ -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 ?? [];

View File

@@ -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,