mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
refactor(editor): rename doc to blocks (#9510)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { BlockSuiteError } from '@blocksuite/global/exceptions';
|
||||
|
||||
import type { Doc } from '../store/index.js';
|
||||
import type { Blocks } from '../store/index.js';
|
||||
import type { AssetsManager } from '../transformer/assets.js';
|
||||
import type { DraftModel, Job, Slice } from '../transformer/index.js';
|
||||
import type {
|
||||
@@ -93,7 +93,7 @@ export abstract class BaseAdapter<AdapterTarget = unknown> {
|
||||
| Promise<FromBlockSnapshotResult<AdapterTarget>>
|
||||
| FromBlockSnapshotResult<AdapterTarget>;
|
||||
|
||||
async fromDoc(doc: Doc) {
|
||||
async fromDoc(doc: Blocks) {
|
||||
try {
|
||||
const docSnapshot = this.job.docToSnapshot(doc);
|
||||
if (!docSnapshot) return;
|
||||
@@ -138,7 +138,7 @@ export abstract class BaseAdapter<AdapterTarget = unknown> {
|
||||
|
||||
async toBlock(
|
||||
payload: ToBlockSnapshotPayload<AdapterTarget>,
|
||||
doc: Doc,
|
||||
doc: Blocks,
|
||||
parent?: string,
|
||||
index?: number
|
||||
) {
|
||||
@@ -175,7 +175,7 @@ export abstract class BaseAdapter<AdapterTarget = unknown> {
|
||||
|
||||
async toSlice(
|
||||
payload: ToSliceSnapshotPayload<AdapterTarget>,
|
||||
doc: Doc,
|
||||
doc: Blocks,
|
||||
parent?: string,
|
||||
index?: number
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user