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

@@ -20,9 +20,9 @@
"@blocksuite/affine-rich-text": "workspace:*",
"@blocksuite/affine-shared": "workspace:*",
"@blocksuite/affine-widget-edgeless-toolbar": "workspace:*",
"@blocksuite/block-std": "workspace:*",
"@blocksuite/global": "workspace:*",
"@blocksuite/icons": "^2.2.8",
"@blocksuite/std": "workspace:*",
"@blocksuite/store": "workspace:*",
"@lit/context": "^1.1.2",
"@preact/signals-core": "^1.8.0",

View File

@@ -8,6 +8,7 @@ import {
MindmapElementModel,
type MindmapNode,
} from '@blocksuite/affine-model';
import type { Bound, IVec } from '@blocksuite/global/gfx';
import {
type DragExtensionInitializeContext,
type ExtensionDragEndContext,
@@ -17,8 +18,7 @@ import {
type GfxPrimitiveElementModel,
isGfxGroupCompatibleModel,
TransformExtension,
} from '@blocksuite/block-std/gfx';
import type { Bound, IVec } from '@blocksuite/global/gfx';
} from '@blocksuite/std/gfx';
import type { MindMapIndicatorOverlay } from '../indicator-overlay';
import { isMindmapNode, isSingleMindMapNode } from '../utils';

View File

@@ -16,8 +16,8 @@ import {
TelemetryProvider,
} from '@blocksuite/affine-shared/services';
import { openFileOrFiles } from '@blocksuite/affine-shared/utils';
import type { BlockComponent } from '@blocksuite/block-std';
import { Bound } from '@blocksuite/global/gfx';
import type { BlockComponent } from '@blocksuite/std';
import type { TemplateResult } from 'lit';
import * as Y from 'yjs';

View File

@@ -13,8 +13,8 @@ import {
type MenuItem,
renderMenu,
} from '@blocksuite/affine-widget-edgeless-toolbar';
import { BlockFlavourIdentifier } from '@blocksuite/block-std';
import { RadiantIcon, RightLayoutIcon, StyleIcon } from '@blocksuite/icons/lit';
import { BlockFlavourIdentifier } from '@blocksuite/std';
import {
MindmapStyleFour,

View File

@@ -1,6 +1,6 @@
import { LightLoadingIcon } from '@blocksuite/affine-components/icons';
import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
import { ShadowlessElement } from '@blocksuite/block-std';
import { ShadowlessElement } from '@blocksuite/std';
import { css, html } from 'lit';
import { importMindMapIcon } from './icons.js';

View File

@@ -9,11 +9,11 @@ import {
EdgelessDraggableElementController,
EdgelessToolbarToolMixin,
} from '@blocksuite/affine-widget-edgeless-toolbar';
import type { BlockStdScope } from '@blocksuite/block-std';
import { modelContext, stdContext } from '@blocksuite/block-std';
import { ErrorCode } from '@blocksuite/global/exceptions';
import type { Bound } from '@blocksuite/global/gfx';
import { SignalWatcher } from '@blocksuite/global/lit';
import type { BlockStdScope } from '@blocksuite/std';
import { modelContext, stdContext } from '@blocksuite/std';
import type { BlockModel } from '@blocksuite/store';
import { consume } from '@lit/context';
import { computed } from '@preact/signals-core';

View File

@@ -12,9 +12,9 @@ import {
EdgelessDraggableElementController,
EdgelessToolbarToolMixin,
} from '@blocksuite/affine-widget-edgeless-toolbar';
import type { GfxToolsFullOptionValue } from '@blocksuite/block-std/gfx';
import type { Bound } from '@blocksuite/global/gfx';
import { SignalWatcher } from '@blocksuite/global/lit';
import type { GfxToolsFullOptionValue } from '@blocksuite/std/gfx';
import { computed } from '@preact/signals-core';
import { css, html, LitElement, nothing } from 'lit';
import { property, query, state } from 'lit/decorators.js';

View File

@@ -3,7 +3,7 @@ import type {
GfxBlockElementModel,
GfxModel,
Viewport,
} from '@blocksuite/block-std/gfx';
} from '@blocksuite/std/gfx';
export function isMindmapNode(element: GfxBlockElementModel | GfxModel | null) {
return element?.group instanceof MindmapElementModel;

View File

@@ -10,12 +10,12 @@ import {
type NodeType,
type ShapeElementModel,
} from '@blocksuite/affine-model';
import type { IVec } from '@blocksuite/global/gfx';
import { assertType } from '@blocksuite/global/utils';
import {
generateKeyBetween,
type SurfaceBlockModel,
} from '@blocksuite/block-std/gfx';
import type { IVec } from '@blocksuite/global/gfx';
import { assertType } from '@blocksuite/global/utils';
} from '@blocksuite/std/gfx';
import isEqual from 'lodash-es/isEqual';
import last from 'lodash-es/last';
import * as Y from 'yjs';

View File

@@ -7,8 +7,8 @@ import {
} from '@blocksuite/affine-model';
import { TelemetryProvider } from '@blocksuite/affine-shared/services';
import { requestThrottledConnectedFrame } from '@blocksuite/affine-shared/utils';
import type { PointerEventState } from '@blocksuite/block-std';
import { GfxElementModelView } from '@blocksuite/block-std/gfx';
import type { PointerEventState } from '@blocksuite/std';
import { GfxElementModelView } from '@blocksuite/std/gfx';
import { handleLayout } from './utils.js';

View File

@@ -17,8 +17,8 @@
{ "path": "../../rich-text" },
{ "path": "../../shared" },
{ "path": "../../widgets/widget-edgeless-toolbar" },
{ "path": "../../../framework/block-std" },
{ "path": "../../../framework/global" },
{ "path": "../../../framework/std" },
{ "path": "../../../framework/store" }
]
}