mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
@@ -1,6 +1,6 @@
|
||||
import { DatabaseBlockModel, ListBlockModel } from '@blocksuite/affine-model';
|
||||
import type { BlockComponent } from '@blocksuite/block-std';
|
||||
import { type Point, Rect } from '@blocksuite/global/gfx';
|
||||
import type { BlockComponent } from '@blocksuite/std';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
|
||||
import { BLOCK_CHILDREN_CONTAINER_PADDING_LEFT } from '../../consts/index.js';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { DatabaseBlockModel } from '@blocksuite/affine-model';
|
||||
import { BLOCK_ID_ATTR } from '@blocksuite/block-std';
|
||||
import type { Point } from '@blocksuite/global/gfx';
|
||||
import { BLOCK_ID_ATTR } from '@blocksuite/std';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
|
||||
import { getRectByBlockComponent } from '../dom/index.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { BlockComponent } from '@blocksuite/block-std';
|
||||
import type { Rect } from '@blocksuite/global/gfx';
|
||||
import type { BlockComponent } from '@blocksuite/std';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
|
||||
export interface EditingState {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { EditorHost } from '@blocksuite/block-std';
|
||||
import type { EditorHost } from '@blocksuite/std';
|
||||
|
||||
export function isInsidePageEditor(host: EditorHost) {
|
||||
return Array.from(host.children).some(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { NoteBlockModel, RootBlockModel } from '@blocksuite/affine-model';
|
||||
import { BLOCK_ID_ATTR, type BlockComponent } from '@blocksuite/block-std';
|
||||
import { SurfaceBlockModel } from '@blocksuite/block-std/gfx';
|
||||
import { clamp, type Point, type Rect } from '@blocksuite/global/gfx';
|
||||
import { BLOCK_ID_ATTR, type BlockComponent } from '@blocksuite/std';
|
||||
import { SurfaceBlockModel } from '@blocksuite/std/gfx';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
|
||||
import { BLOCK_CHILDREN_CONTAINER_PADDING_LEFT } from '../../consts/index.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { RootBlockModel } from '@blocksuite/affine-model';
|
||||
import { BLOCK_ID_ATTR, type BlockComponent } from '@blocksuite/block-std';
|
||||
import { BLOCK_ID_ATTR, type BlockComponent } from '@blocksuite/std';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
|
||||
const ATTR_SELECTOR = `[${BLOCK_ID_ATTR}]`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { EditorHost } from '@blocksuite/block-std';
|
||||
import type { EditorHost } from '@blocksuite/std';
|
||||
|
||||
/**
|
||||
* Get editor viewport element.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { FrameBlockModel, GroupElementModel } from '@blocksuite/affine-model';
|
||||
import type { GfxBlockElementModel, GfxModel } from '@blocksuite/block-std/gfx';
|
||||
import {
|
||||
deserializeXYWH,
|
||||
getQuadBoundWithRotation,
|
||||
} from '@blocksuite/global/gfx';
|
||||
import type { GfxBlockElementModel, GfxModel } from '@blocksuite/std/gfx';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
|
||||
export function getSelectedRect(selected: GfxModel[]): DOMRect {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FrameBlockModel } from '@blocksuite/affine-model';
|
||||
import type { EditorHost } from '@blocksuite/block-std';
|
||||
import type { EditorHost } from '@blocksuite/std';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
|
||||
import { DocModeProvider } from '../../services/doc-mode-service.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NoteBlockModel, NoteDisplayMode } from '@blocksuite/affine-model';
|
||||
import type { BlockComponent, BlockStdScope } from '@blocksuite/block-std';
|
||||
import type { BlockComponent, BlockStdScope } from '@blocksuite/std';
|
||||
import type { BlockModel, Store } from '@blocksuite/store';
|
||||
|
||||
import { matchModels } from './checker.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ListBlockModel } from '@blocksuite/affine-model';
|
||||
import type { BlockStdScope } from '@blocksuite/block-std';
|
||||
import type { BlockStdScope } from '@blocksuite/std';
|
||||
import type { BlockModel, Store } from '@blocksuite/store';
|
||||
|
||||
import { matchModels } from './checker.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { EditorHost } from '@blocksuite/block-std';
|
||||
import type { InlineEditor } from '@blocksuite/block-std/inline';
|
||||
import type { EditorHost } from '@blocksuite/std';
|
||||
import type { InlineEditor } from '@blocksuite/std/inline';
|
||||
|
||||
function getDocTitleByEditorHost(editorHost: EditorHost): HTMLElement | null {
|
||||
const docViewport = editorHost.closest('.affine-page-viewport');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { BlockComponent } from '@blocksuite/block-std';
|
||||
import type { BlockComponent } from '@blocksuite/std';
|
||||
import { autoUpdate } from '@floating-ui/dom';
|
||||
import { signal } from '@preact/signals-core';
|
||||
import type { ReactiveController } from 'lit';
|
||||
|
||||
Reference in New Issue
Block a user