mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-11 05:58:56 +08:00
refactor(editor): cleanup dead code (#9300)
This commit is contained in:
@@ -12,7 +12,6 @@ import type {
|
||||
import type { listToParagraphCommand } from './commands/list-to-paragraph.js';
|
||||
import type { splitListCommand } from './commands/split-list.js';
|
||||
import { ListBlockComponent } from './list-block.js';
|
||||
import type { ListBlockService } from './list-service.js';
|
||||
|
||||
export function effects() {
|
||||
customElements.define('affine-list', ListBlockComponent);
|
||||
@@ -20,10 +19,6 @@ export function effects() {
|
||||
|
||||
declare global {
|
||||
namespace BlockSuite {
|
||||
interface BlockServices {
|
||||
'affine:list': ListBlockService;
|
||||
}
|
||||
|
||||
interface CommandContext {
|
||||
listConvertedId?: string;
|
||||
indentContext?: IndentContext;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
export * from './adapters/index.js';
|
||||
export { correctNumberedListsOrderToPrev } from './commands/utils';
|
||||
export * from './list-block.js';
|
||||
export * from './list-service.js';
|
||||
export * from './list-spec.js';
|
||||
|
||||
@@ -24,14 +24,10 @@ import { classMap } from 'lit/directives/class-map.js';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
|
||||
import { correctNumberedListsOrderToPrev } from './commands/utils.js';
|
||||
import type { ListBlockService } from './list-service.js';
|
||||
import { listBlockStyles } from './styles.js';
|
||||
import { getListIcon } from './utils/get-list-icon.js';
|
||||
|
||||
export class ListBlockComponent extends CaptionedBlockComponent<
|
||||
ListBlockModel,
|
||||
ListBlockService
|
||||
> {
|
||||
export class ListBlockComponent extends CaptionedBlockComponent<ListBlockModel> {
|
||||
static override styles = listBlockStyles;
|
||||
|
||||
private _inlineRangeProvider: InlineRangeProvider | null = null;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
import { ListBlockSchema } from '@blocksuite/affine-model';
|
||||
import { BlockService } from '@blocksuite/block-std';
|
||||
|
||||
export class ListBlockService extends BlockService {
|
||||
static override readonly flavour = ListBlockSchema.model.flavour;
|
||||
}
|
||||
@@ -9,11 +9,9 @@ import { literal } from 'lit/static-html.js';
|
||||
import { ListBlockAdapterExtensions } from './adapters/extension.js';
|
||||
import { commands } from './commands/index.js';
|
||||
import { ListKeymapExtension, ListTextKeymapExtension } from './list-keymap.js';
|
||||
import { ListBlockService } from './list-service.js';
|
||||
|
||||
export const ListBlockSpec: ExtensionType[] = [
|
||||
FlavourExtension('affine:list'),
|
||||
ListBlockService,
|
||||
CommandExtension(commands),
|
||||
BlockViewExtension('affine:list', literal`affine-list`),
|
||||
ListKeymapExtension,
|
||||
|
||||
Reference in New Issue
Block a user