akumatus
2024-07-23 15:24:57 +00:00
parent 0dbed968a0
commit f89945e730
19 changed files with 123 additions and 128 deletions
@@ -1,4 +1,4 @@
import type { BlockElement } from '@blocksuite/block-std';
import type { BlockComponent } from '@blocksuite/block-std';
import {
AffineReference,
type EmbedLinkedDocModel,
@@ -17,7 +17,7 @@ import type { WorkbenchService } from '../../workbench';
export type PeekViewTarget =
| HTMLElement
| BlockElement
| BlockComponent
| AffineReference
| HTMLAnchorElement
| { docId: string; blockId?: string };
@@ -6,8 +6,8 @@ import { BlockSuiteEditor } from '@affine/core/components/blocksuite/block-suite
import { useNavigateHelper } from '@affine/core/hooks/use-navigate-helper';
import { PageNotFound } from '@affine/core/pages/404';
import { DebugLogger } from '@affine/debug';
import { Bound, type EdgelessRootService } from '@blocksuite/blocks';
import { DisposableGroup } from '@blocksuite/global/utils';
import { type EdgelessRootService } from '@blocksuite/blocks';
import { Bound, DisposableGroup } from '@blocksuite/global/utils';
import type { AffineEditorContainer } from '@blocksuite/presets';
import type { DocMode } from '@toeverything/infra';
import { DocsService, FrameworkScope, useService } from '@toeverything/infra';
@@ -1,5 +1,5 @@
import { toReactNode } from '@affine/component';
import { BlockElement } from '@blocksuite/block-std';
import { BlockComponent } from '@blocksuite/block-std';
import { useLiveData, useService } from '@toeverything/infra';
import { useEffect, useMemo } from 'react';
@@ -91,7 +91,7 @@ export const PeekViewManagerModal = () => {
useEffect(() => {
const subscription = peekViewEntity.show$.subscribe(() => {
if (activePeekView?.target instanceof BlockElement) {
if (activePeekView?.target instanceof BlockComponent) {
activePeekView.target.requestUpdate();
}
});