diff --git a/blocksuite/affine/blocks/attachment/package.json b/blocksuite/affine/blocks/attachment/package.json index ebefe8098d..07d2ad1d09 100644 --- a/blocksuite/affine/blocks/attachment/package.json +++ b/blocksuite/affine/blocks/attachment/package.json @@ -21,6 +21,7 @@ "@blocksuite/icons": "^2.2.12", "@blocksuite/std": "workspace:*", "@blocksuite/store": "workspace:*", + "@blocksuite/sync": "workspace:*", "@floating-ui/dom": "^1.6.13", "@lit/context": "^1.1.2", "@preact/signals-core": "^1.8.0", diff --git a/blocksuite/affine/blocks/attachment/src/attachment-block.ts b/blocksuite/affine/blocks/attachment/src/attachment-block.ts index 951144a732..adba0a6d96 100644 --- a/blocksuite/affine/blocks/attachment/src/attachment-block.ts +++ b/blocksuite/affine/blocks/attachment/src/attachment-block.ts @@ -35,7 +35,9 @@ import { when } from 'lit/directives/when.js'; import { AttachmentEmbedProvider } from './embed'; import { styles } from './styles'; import { downloadAttachmentBlob, refreshData } from './utils'; + type State = 'loading' | 'uploading' | 'warning' | 'oversize' | 'none'; + @Peekable({ enableOn: ({ model }: AttachmentBlockComponent) => { return !model.doc.readonly && model.props.type.endsWith('pdf'); @@ -102,7 +104,7 @@ export class AttachmentBlockComponent extends CaptionedBlockComponent