mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
refactor(editor): remove blocks package (#10708)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-restricted-imports */
|
||||
import '@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js';
|
||||
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { ShadowlessElement } from '@blocksuite/affine/block-std';
|
||||
import {
|
||||
defaultImageProxyMiddleware,
|
||||
docLinkBaseURLMiddlewareBuilder,
|
||||
@@ -13,10 +13,10 @@ import {
|
||||
type PlainTextAdapter,
|
||||
PlainTextAdapterFactoryIdentifier,
|
||||
titleMiddleware,
|
||||
} from '@blocksuite/blocks';
|
||||
import { WithDisposable } from '@blocksuite/global/lit';
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { WithDisposable } from '@blocksuite/affine/global/lit';
|
||||
import type { DocSnapshot } from '@blocksuite/affine/store';
|
||||
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
|
||||
import type { DocSnapshot } from '@blocksuite/store';
|
||||
import { effect } from '@preact/signals-core';
|
||||
import type SlTabPanel from '@shoelace-style/shoelace/dist/components/tab-panel/tab-panel.js';
|
||||
import { css, html, type PropertyValues } from 'lit';
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/* oxlint-disable @typescript-eslint/no-non-null-assertion */
|
||||
import { getAttachmentFileIcon } from '@blocksuite/affine/components/icons';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
|
||||
import type { AttachmentBlockModel } from '@blocksuite/affine-model';
|
||||
import { humanFileSize } from '@blocksuite/affine-shared/utils';
|
||||
import { getAttachmentFileIcon } from '@blocksuite/blocks';
|
||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||
import {
|
||||
ArrowDownBigIcon,
|
||||
ArrowUpBigIcon,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { WithDisposable } from '@blocksuite/global/lit';
|
||||
import { ShadowlessElement } from '@blocksuite/affine/block-std';
|
||||
import { WithDisposable } from '@blocksuite/affine/global/lit';
|
||||
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
|
||||
import { effect } from '@preact/signals-core';
|
||||
import { css, html, nothing } from 'lit';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { WithDisposable } from '@blocksuite/global/lit';
|
||||
import { ShadowlessElement } from '@blocksuite/affine/block-std';
|
||||
import { WithDisposable } from '@blocksuite/affine/global/lit';
|
||||
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
|
||||
import { css, html, nothing } from 'lit';
|
||||
import { customElement, property, state } from 'lit/decorators.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { WithDisposable } from '@blocksuite/global/lit';
|
||||
import { WithDisposable } from '@blocksuite/affine/global/lit';
|
||||
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
|
||||
import { css, html, LitElement, nothing } from 'lit';
|
||||
import { customElement, property, state } from 'lit/decorators.js';
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import {
|
||||
CloseIcon,
|
||||
createDefaultDoc,
|
||||
GenerateDocUrlProvider,
|
||||
} from '@blocksuite/blocks';
|
||||
import { WithDisposable } from '@blocksuite/global/lit';
|
||||
import { ShadowlessElement } from '@blocksuite/affine/block-std';
|
||||
import { WithDisposable } from '@blocksuite/affine/global/lit';
|
||||
import { GenerateDocUrlProvider } from '@blocksuite/affine/shared/services';
|
||||
import { createDefaultDoc } from '@blocksuite/affine/shared/utils';
|
||||
import type { Doc, Workspace } from '@blocksuite/affine/store';
|
||||
import { CloseIcon } from '@blocksuite/icons/lit';
|
||||
import type { TestAffineEditorContainer } from '@blocksuite/integration-test';
|
||||
import type { Doc, Workspace } from '@blocksuite/store';
|
||||
import { css, html, nothing } from 'lit';
|
||||
import { customElement, property } from 'lit/decorators.js';
|
||||
import { repeat } from 'lit/directives/repeat.js';
|
||||
@@ -153,7 +151,7 @@ export class DocsPanel extends WithDisposable(ShadowlessElement) {
|
||||
${doc.meta?.title || 'Untitled'}
|
||||
${docs.length > 1
|
||||
? html`<div @click="${deleteDoc}" class="delete-doc-icon">
|
||||
${CloseIcon}
|
||||
${CloseIcon()}
|
||||
</div>`
|
||||
: nothing}
|
||||
</div>`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { ShadowlessElement } from '@blocksuite/affine/block-std';
|
||||
import { css, html } from 'lit';
|
||||
import { customElement } from 'lit/decorators.js';
|
||||
|
||||
|
||||
@@ -16,40 +16,44 @@ import '@shoelace-style/shoelace/dist/themes/light.css';
|
||||
import '@shoelace-style/shoelace/dist/themes/dark.css';
|
||||
import './left-side-panel.js';
|
||||
|
||||
import { NotionHtmlAdapter } from '@blocksuite/affine-shared/adapters';
|
||||
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
|
||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
||||
import { ShadowlessElement } from '@blocksuite/affine/block-std';
|
||||
import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
|
||||
import {
|
||||
ColorScheme,
|
||||
ColorVariables,
|
||||
createAssetsArchive,
|
||||
defaultImageProxyMiddleware,
|
||||
docLinkBaseURLMiddleware,
|
||||
type DocMode,
|
||||
DocModeProvider,
|
||||
download,
|
||||
ExportManager,
|
||||
FontFamilyVariables,
|
||||
HtmlAdapterFactoryIdentifier,
|
||||
HtmlTransformer,
|
||||
MarkdownAdapterFactoryIdentifier,
|
||||
MarkdownTransformer,
|
||||
NotionHtmlTransformer,
|
||||
openFileOrFiles,
|
||||
PlainTextAdapterFactoryIdentifier,
|
||||
printToPdf,
|
||||
titleMiddleware,
|
||||
ZipTransformer,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { toast } from '@blocksuite/affine/components/toast';
|
||||
import {
|
||||
BlockSuiteError,
|
||||
ErrorCode,
|
||||
} from '@blocksuite/affine/global/exceptions';
|
||||
import type { SerializedXYWH } from '@blocksuite/affine/global/gfx';
|
||||
import type { DeltaInsert } from '@blocksuite/affine/inline/types';
|
||||
import { DocModeProvider } from '@blocksuite/affine/shared/services';
|
||||
import {
|
||||
ColorVariables,
|
||||
FontFamilyVariables,
|
||||
SizeVariables,
|
||||
StyleVariables,
|
||||
titleMiddleware,
|
||||
toast,
|
||||
ZipTransformer,
|
||||
} from '@blocksuite/blocks';
|
||||
import { BlockSuiteError, ErrorCode } from '@blocksuite/global/exceptions';
|
||||
import type { SerializedXYWH } from '@blocksuite/global/gfx';
|
||||
import type { DeltaInsert } from '@blocksuite/inline/types';
|
||||
} from '@blocksuite/affine/shared/theme';
|
||||
import { openFileOrFiles, printToPdf } from '@blocksuite/affine/shared/utils';
|
||||
import { Text, type Workspace } from '@blocksuite/affine/store';
|
||||
import { NotionHtmlAdapter } from '@blocksuite/affine-shared/adapters';
|
||||
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
|
||||
import { TestAffineEditorContainer } from '@blocksuite/integration-test';
|
||||
import { Text, type Workspace } from '@blocksuite/store';
|
||||
import type { SlDropdown } from '@shoelace-style/shoelace';
|
||||
import { setBasePath } from '@shoelace-style/shoelace/dist/utilities/base-path.js';
|
||||
import { css, html } from 'lit';
|
||||
|
||||
Reference in New Issue
Block a user