mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-06 08:50:50 +08:00
refactor(editor): orgnize exports (#10709)
This commit is contained in:
@@ -13,7 +13,7 @@ import { WorkspaceQuotaService } from '@affine/core/modules/quota';
|
||||
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||
import { i18nTime, Trans, useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import type { Store, Workspace } from '@blocksuite/affine/store';
|
||||
import { CloseIcon, ToggleRightIcon } from '@blocksuite/icons/rc';
|
||||
import * as Collapsible from '@radix-ui/react-collapsible';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { PeekViewService } from '@affine/core/modules/peek-view/services/peek-vi
|
||||
import { useInsidePeekView } from '@affine/core/modules/peek-view/view/modal-container';
|
||||
import { WorkbenchLink } from '@affine/core/modules/workbench';
|
||||
import { track } from '@affine/track';
|
||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import type { Workspace } from '@blocksuite/affine/store';
|
||||
import { LiveData, useLiveData, useService } from '@toeverything/infra';
|
||||
import clsx from 'clsx';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Button } from '@affine/component';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import type { AttachmentBlockModel } from '@blocksuite/affine/blocks';
|
||||
import type { AttachmentBlockModel } from '@blocksuite/affine/model';
|
||||
import { ArrowDownBigIcon } from '@blocksuite/icons/rc';
|
||||
import clsx from 'clsx';
|
||||
import type { PropsWithChildren, ReactElement } from 'react';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { IconButton, Menu, MenuItem } from '@affine/component';
|
||||
import type { AttachmentBlockModel } from '@blocksuite/affine/blocks';
|
||||
import type { AttachmentBlockModel } from '@blocksuite/affine/model';
|
||||
import {
|
||||
//EditIcon,
|
||||
LocalDataIcon,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AttachmentBlockModel } from '@blocksuite/affine/blocks';
|
||||
import type { AttachmentBlockModel } from '@blocksuite/affine/model';
|
||||
|
||||
export type AttachmentViewerProps = {
|
||||
model: AttachmentBlockModel;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { PageSize } from '@affine/core/modules/pdf/renderer/types';
|
||||
import type { AttachmentBlockModel } from '@blocksuite/affine/blocks';
|
||||
import type { AttachmentBlockModel } from '@blocksuite/affine/model';
|
||||
import { filesize } from 'filesize';
|
||||
|
||||
import { downloadBlob } from '../../utils/resource';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AuthService } from '@affine/core/modules/cloud';
|
||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import { useLiveData, useService } from '@toeverything/infra';
|
||||
|
||||
import { ImportTemplateButton } from './import-template';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
} from '@affine/component';
|
||||
import { DocService } from '@affine/core/modules/doc';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import { useLiveData, useService } from '@toeverything/infra';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useDocMetaHelper } from '@affine/core/components/hooks/use-block-suite-
|
||||
import { useDocCollectionHelper } from '@affine/core/components/hooks/use-block-suite-workspace-helper';
|
||||
import { DocsService } from '@affine/core/modules/doc';
|
||||
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import { useCallback } from 'react';
|
||||
import { applyUpdate, encodeStateAsUpdate } from 'yjs';
|
||||
|
||||
@@ -10,17 +10,19 @@ import { track } from '@affine/track';
|
||||
import type { BlockStdScope } from '@blocksuite/affine/block-std';
|
||||
import {
|
||||
createAssetsArchive,
|
||||
docLinkBaseURLMiddleware,
|
||||
download,
|
||||
embedSyncedDocMiddleware,
|
||||
ExportManager,
|
||||
HtmlAdapterFactoryIdentifier,
|
||||
HtmlTransformer,
|
||||
MarkdownAdapterFactoryIdentifier,
|
||||
MarkdownTransformer,
|
||||
titleMiddleware,
|
||||
ZipTransformer,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/blocks/root';
|
||||
import { ExportManager } from '@blocksuite/affine/blocks/surface';
|
||||
import {
|
||||
docLinkBaseURLMiddleware,
|
||||
embedSyncedDocMiddleware,
|
||||
HtmlAdapterFactoryIdentifier,
|
||||
MarkdownAdapterFactoryIdentifier,
|
||||
titleMiddleware,
|
||||
} from '@blocksuite/affine/shared/adapters';
|
||||
import { printToPdf } from '@blocksuite/affine/shared/utils';
|
||||
import { type Store, Transformer } from '@blocksuite/affine/store';
|
||||
import { useLiveData, useService } from '@toeverything/infra';
|
||||
|
||||
@@ -9,13 +9,13 @@ import {
|
||||
GfxBlockElementModel,
|
||||
GfxControllerIdentifier,
|
||||
} from '@blocksuite/affine/block-std/gfx';
|
||||
import { type DocMode } from '@blocksuite/affine/model';
|
||||
import {
|
||||
type DocMode,
|
||||
getBlockSelectionsCommand,
|
||||
getImageSelectionsCommand,
|
||||
getSelectedModelsCommand,
|
||||
getTextSelectionCommand,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
} from '@blocksuite/affine/shared/commands';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { toURLSearchParams } from '@affine/core/modules/navigation';
|
||||
import { getOpenUrlInDesktopAppLink } from '@affine/core/modules/open-in-app';
|
||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import { createContext, useCallback, useContext, useMemo } from 'react';
|
||||
import type { NavigateFunction, NavigateOptions } from 'react-router-dom';
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import 'fake-indexeddb/auto';
|
||||
|
||||
import { StoreExtensions } from '@blocksuite/affine/blocks';
|
||||
import { StoreExtensions } from '@blocksuite/affine/extensions';
|
||||
import { type Store, Text } from '@blocksuite/affine/store';
|
||||
import { TestWorkspace } from '@blocksuite/affine/store/test';
|
||||
import { renderHook } from '@testing-library/react';
|
||||
|
||||
@@ -17,7 +17,7 @@ import { inferOpenMode } from '@affine/core/utils';
|
||||
import type { Collection } from '@affine/env/filter';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import {
|
||||
ArrowDownSmallIcon,
|
||||
SearchIcon,
|
||||
|
||||
@@ -31,7 +31,8 @@ import {
|
||||
} from '@affine/core/modules/workspace';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import track from '@affine/track';
|
||||
import { type DocMode, ZipTransformer } from '@blocksuite/affine/blocks';
|
||||
import { ZipTransformer } from '@blocksuite/affine/blocks/root';
|
||||
import type { DocMode } from '@blocksuite/affine/model';
|
||||
import {
|
||||
effect,
|
||||
fromPromise,
|
||||
|
||||
Reference in New Issue
Block a user