mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-04 02:49:57 +08:00
refactor(editor): add gfx entry in bs global package (#10612)
This commit is contained in:
@@ -23,7 +23,7 @@ import {
|
||||
Bound,
|
||||
getCommonBoundWithRotation,
|
||||
type SerializedXYWH,
|
||||
} from '@blocksuite/affine/global/utils';
|
||||
} from '@blocksuite/affine/global/gfx';
|
||||
import type { Store } from '@blocksuite/affine/store';
|
||||
import type { TemplateResult } from 'lit';
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ import {
|
||||
ResetIcon,
|
||||
TelemetryProvider,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { assertExists, Bound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound } from '@blocksuite/affine/global/gfx';
|
||||
import { assertExists } from '@blocksuite/affine/global/utils';
|
||||
import { html, type TemplateResult } from 'lit';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
TelemetryProvider,
|
||||
uploadBlobForImage,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { Bound, getCommonBound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound, getCommonBound } from '@blocksuite/affine/global/gfx';
|
||||
import { type BlockProps, Text } from '@blocksuite/affine/store';
|
||||
import * as Y from 'yjs';
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ import {
|
||||
NoteBlockModel,
|
||||
NoteDisplayMode,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { assertExists, Bound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound } from '@blocksuite/affine/global/gfx';
|
||||
import { assertExists } from '@blocksuite/affine/global/utils';
|
||||
import type { FrameworkProvider } from '@toeverything/infra';
|
||||
import type { TemplateResult } from 'lit';
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { toGfxBlockComponent } from '@blocksuite/affine/block-std';
|
||||
import { Bound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound } from '@blocksuite/affine/global/gfx';
|
||||
import { html } from 'lit';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
fitContent,
|
||||
ThemeProvider,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import type { Bound } from '@blocksuite/affine/global/utils';
|
||||
import type { Bound } from '@blocksuite/affine/global/gfx';
|
||||
import { html } from 'lit';
|
||||
import { query } from 'lit/decorators.js';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
EdgelessCRUDIdentifier,
|
||||
getSurfaceBlock,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { Bound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound } from '@blocksuite/affine/global/gfx';
|
||||
|
||||
import {
|
||||
type AIChatBlockModel,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Bound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound } from '@blocksuite/affine/global/gfx';
|
||||
import { nanoid } from '@blocksuite/affine/store';
|
||||
|
||||
import { AIProvider } from '../provider';
|
||||
|
||||
@@ -9,8 +9,8 @@ import { IS_MAC } from '@blocksuite/affine/global/env';
|
||||
import {
|
||||
Bound,
|
||||
getCommonBoundWithRotation,
|
||||
Slot,
|
||||
} from '@blocksuite/affine/global/utils';
|
||||
} from '@blocksuite/affine/global/gfx';
|
||||
import { Slot } from '@blocksuite/affine/global/utils';
|
||||
|
||||
import {
|
||||
AFFINE_AI_PANEL_WIDGET,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { GfxModel } from '@blocksuite/affine/block-std/gfx';
|
||||
import type { MindmapStyle } from '@blocksuite/affine/blocks';
|
||||
import type { SerializedXYWH } from '@blocksuite/affine/global/utils';
|
||||
import type { SerializedXYWH } from '@blocksuite/affine/global/gfx';
|
||||
|
||||
import type { TemplateImage } from '../slides/template';
|
||||
|
||||
|
||||
@@ -5,11 +5,8 @@ import {
|
||||
TemplateJob,
|
||||
TemplateMiddlewares,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import {
|
||||
assertExists,
|
||||
Bound,
|
||||
getCommonBound,
|
||||
} from '@blocksuite/affine/global/utils';
|
||||
import { Bound, getCommonBound } from '@blocksuite/affine/global/gfx';
|
||||
import { assertExists } from '@blocksuite/affine/global/utils';
|
||||
|
||||
export function createTemplateJob(host: EditorHost) {
|
||||
const surface = getSurfaceBlock(host.doc);
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import {
|
||||
Bound,
|
||||
getCommonBoundWithRotation,
|
||||
} from '@blocksuite/affine/global/utils';
|
||||
} from '@blocksuite/affine/global/gfx';
|
||||
import {
|
||||
autoUpdate,
|
||||
computePosition,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { ElementOrFactory } from '@affine/component';
|
||||
import { AttachmentEmbedPreview } from '@affine/core/components/attachment-viewer/pdf-viewer-embedded';
|
||||
import { AttachmentEmbedConfigIdentifier } from '@blocksuite/affine/blocks';
|
||||
import { Bound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound } from '@blocksuite/affine/global/gfx';
|
||||
import type { ExtensionType } from '@blocksuite/affine/store';
|
||||
import type { TemplateResult } from 'lit';
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import {
|
||||
isGfxGroupCompatibleModel,
|
||||
} from '@blocksuite/affine/block-std/gfx';
|
||||
import type { MenuContext } from '@blocksuite/affine/blocks';
|
||||
import { Bound, getCommonBound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound, getCommonBound } from '@blocksuite/affine/global/gfx';
|
||||
import { CopyAsImgaeIcon } from '@blocksuite/icons/lit';
|
||||
import type { FrameworkProvider } from '@toeverything/infra';
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import { useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
|
||||
import { type NoteBlockModel } from '@blocksuite/affine/blocks';
|
||||
import { Bound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound } from '@blocksuite/affine/global/gfx';
|
||||
import {
|
||||
InformationIcon,
|
||||
LinkedPageIcon,
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import {
|
||||
type EdgelessRootPreviewBlockComponent,
|
||||
SpecProvider,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { Bound } from '@blocksuite/affine/global/utils';
|
||||
import { Bound } from '@blocksuite/affine/global/gfx';
|
||||
import type { Block, Store } from '@blocksuite/affine/store';
|
||||
import { useFramework } from '@toeverything/infra';
|
||||
import { isEqual } from 'lodash-es';
|
||||
|
||||
@@ -10,8 +10,8 @@ import { GuardService } from '@affine/core/modules/permissions';
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
|
||||
import { RefNodeSlotsProvider } from '@blocksuite/affine/blocks';
|
||||
import { Bound } from '@blocksuite/affine/global/gfx';
|
||||
import {
|
||||
Bound,
|
||||
type Disposable,
|
||||
DisposableGroup,
|
||||
} from '@blocksuite/affine/global/utils';
|
||||
|
||||
Reference in New Issue
Block a user