refactor(editor): rename block-std to std (#11250)

Closes: BS-2946
This commit is contained in:
Saul-Mirone
2025-03-28 07:20:34 +00:00
parent 4498676a96
commit 205cd7a86d
1029 changed files with 1580 additions and 1698 deletions

View File

@@ -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';

View File

@@ -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';

View File

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

View File

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

View File

@@ -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';

View File

@@ -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}]`;

View File

@@ -1,4 +1,4 @@
import type { EditorHost } from '@blocksuite/block-std';
import type { EditorHost } from '@blocksuite/std';
/**
* Get editor viewport element.

View File

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

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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');

View File

@@ -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';