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 +0,0 @@
export * from './block-std-scope.js';

View File

@@ -1,5 +1,5 @@
{
"name": "@blocksuite/block-std",
"name": "@blocksuite/std",
"description": "Std for blocksuite blocks",
"type": "module",
"scripts": {

View File

@@ -2,7 +2,7 @@ import { beforeEach, describe, expect, test, vi } from 'vitest';
import type { Command } from '../command/index.js';
import { CommandManager } from '../command/index.js';
import type { BlockStdScope } from '../scope/block-std-scope.js';
import type { BlockStdScope } from '../scope/std-scope.js';
type Command1 = Command<
{

View File

@@ -4,7 +4,7 @@
// type TestA = MakeOptionalIfEmpty<A>; // void | {}
// type TestB = MakeOptionalIfEmpty<B>; // void | { prop?: string }
// type TestC = MakeOptionalIfEmpty<C>; // { prop: string }
import type { BlockStdScope } from '../scope/block-std-scope.js';
import type { BlockStdScope } from '../scope/std-scope.js';
import type { cmdSymbol } from './consts.js';
export interface InitCommandCtx {

View File

@@ -13,7 +13,7 @@ import type { BlockViewType } from '../spec/type.js';
*
* @example
* ```ts
* import { BlockViewExtension } from '@blocksuite/block-std';
* import { BlockViewExtension } from '@blocksuite/std';
*
* const MyListBlockViewExtension = BlockViewExtension(
* 'affine:list',

View File

@@ -20,7 +20,7 @@ export interface ConfigFactory<Config extends Record<string, any>> {
*
* @example
* ```ts
* import { ConfigExtensionFactory } from '@blocksuite/block-std';
* import { ConfigExtensionFactory } from '@blocksuite/std';
* const MyConfigExtensionFactory = ConfigExtensionFactory<ConfigType>('my-flavour');
* const MyConfigExtension = MyConfigExtensionFactory({
* option1: 'value1',

View File

@@ -1,7 +1,7 @@
import { DisposableGroup } from '@blocksuite/global/disposable';
import { Subject } from 'rxjs';
import type { BlockStdScope } from '../scope/block-std-scope';
import type { BlockStdScope } from '../scope/std-scope';
import { LifeCycleWatcher } from './lifecycle-watcher';
export class EditorLifeCycleExtension extends LifeCycleWatcher {

View File

@@ -10,7 +10,7 @@ import { BlockFlavourIdentifier } from '../identifier.js';
*
* @example
* ```ts
* import { FlavourExtension } from '@blocksuite/block-std';
* import { FlavourExtension } from '@blocksuite/std';
*
* const MyFlavourExtension = FlavourExtension('my-flavour');
* ```

View File

@@ -20,7 +20,7 @@ let id = 1;
*
* @example
* ```ts
* import { KeymapExtension } from '@blocksuite/block-std';
* import { KeymapExtension } from '@blocksuite/std';
*
* const MyKeymapExtension = KeymapExtension(std => {
* return {

View File

@@ -15,7 +15,7 @@ import type { WidgetViewType } from '../spec/type.js';
*
* @example
* ```ts
* import { WidgetViewExtension } from '@blocksuite/block-std';
* import { WidgetViewExtension } from '@blocksuite/std';
*
* const MyWidgetViewExtension = WidgetViewExtension('my-flavour', 'my-widget', literal`my-widget-view`);
*/

View File

@@ -11,7 +11,7 @@ import { Signal } from '@preact/signals-core';
import last from 'lodash-es/last';
import { LifeCycleWatcher } from '../extension/lifecycle-watcher.js';
import type { BlockStdScope } from '../scope/block-std-scope.js';
import type { BlockStdScope } from '../scope/std-scope.js';
import { onSurfaceAdded } from '../utils/gfx.js';
import type { BlockComponent } from '../view/index.js';
import type { CursorType } from './cursor.js';

View File

@@ -1,7 +1,7 @@
import { DisposableGroup } from '@blocksuite/global/disposable';
import { Signal } from '@preact/signals-core';
import type { BlockStdScope } from '../scope/block-std-scope.js';
import type { BlockStdScope } from '../scope/std-scope.js';
export class KeyboardController {
private readonly _disposable = new DisposableGroup();

View File

@@ -4,7 +4,7 @@ import { Extension } from '@blocksuite/store';
import { LifeCycleWatcher } from '../extension/lifecycle-watcher.js';
import { StdIdentifier } from '../identifier.js';
import type { BlockStdScope } from '../scope/block-std-scope.js';
import type { BlockStdScope } from '../scope/std-scope.js';
import { onSurfaceAdded } from '../utils/gfx.js';
import { GfxControllerIdentifier } from './identifiers.js';
import type { SurfaceMiddleware } from './model/surface/surface-model.js';

View File

@@ -2,7 +2,7 @@ import type {
AttributeRenderer,
InlineEditor,
InlineRange,
} from '@blocksuite/block-std/inline';
} from '@blocksuite/std/inline';
import type { BaseTextAttributes, DeltaInsert } from '@blocksuite/store';
import type * as Y from 'yjs';
import type { ZodTypeAny } from 'zod';

Some files were not shown because too many files have changed in this diff Show More