mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
refactor(editor): separate lit and slot in global (#10666)
This commit is contained in:
@@ -32,6 +32,8 @@
|
|||||||
"./global/di": "./src/global/di.ts",
|
"./global/di": "./src/global/di.ts",
|
||||||
"./global/types": "./src/global/types.ts",
|
"./global/types": "./src/global/types.ts",
|
||||||
"./global/gfx": "./src/global/gfx.ts",
|
"./global/gfx": "./src/global/gfx.ts",
|
||||||
|
"./global/slot": "./src/global/slot.ts",
|
||||||
|
"./global/lit": "./src/global/lit.ts",
|
||||||
"./store": "./src/store/index.ts",
|
"./store": "./src/store/index.ts",
|
||||||
"./store/test": "./src/store/test.ts",
|
"./store/test": "./src/store/test.ts",
|
||||||
"./inline": "./src/inline/index.ts",
|
"./inline": "./src/inline/index.ts",
|
||||||
|
|||||||
1
blocksuite/affine/all/src/global/lit.ts
Normal file
1
blocksuite/affine/all/src/global/lit.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from '@blocksuite/global/lit';
|
||||||
1
blocksuite/affine/all/src/global/slot.ts
Normal file
1
blocksuite/affine/all/src/global/slot.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from '@blocksuite/global/slot';
|
||||||
@@ -3,7 +3,7 @@ import { WebIcon16 } from '@blocksuite/affine-components/icons';
|
|||||||
import { ThemeProvider } from '@blocksuite/affine-shared/services';
|
import { ThemeProvider } from '@blocksuite/affine-shared/services';
|
||||||
import { getHostName } from '@blocksuite/affine-shared/utils';
|
import { getHostName } from '@blocksuite/affine-shared/utils';
|
||||||
import { BlockSelection, ShadowlessElement } from '@blocksuite/block-std';
|
import { BlockSelection, ShadowlessElement } from '@blocksuite/block-std';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { OpenInNewIcon } from '@blocksuite/icons/lit';
|
import { OpenInNewIcon } from '@blocksuite/icons/lit';
|
||||||
import { html } from 'lit';
|
import { html } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import data from '@emoji-mart/data';
|
import data from '@emoji-mart/data';
|
||||||
import { Picker } from 'emoji-mart';
|
import { Picker } from 'emoji-mart';
|
||||||
import { html, LitElement, type PropertyValues } from 'lit';
|
import { html, LitElement, type PropertyValues } from 'lit';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
Clipboard,
|
Clipboard,
|
||||||
type UIEventHandler,
|
type UIEventHandler,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
|
|
||||||
export class CodeClipboardController {
|
export class CodeClipboardController {
|
||||||
private _clipboard!: Clipboard;
|
private _clipboard!: Clipboard;
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import type {
|
|||||||
MenuItemGroup,
|
MenuItemGroup,
|
||||||
} from '@blocksuite/affine-components/toolbar';
|
} from '@blocksuite/affine-components/toolbar';
|
||||||
import { renderGroups } from '@blocksuite/affine-components/toolbar';
|
import { renderGroups } from '@blocksuite/affine-components/toolbar';
|
||||||
import { noop, WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
|
import { noop } from '@blocksuite/global/utils';
|
||||||
import { MoreVerticalIcon } from '@blocksuite/icons/lit';
|
import { MoreVerticalIcon } from '@blocksuite/icons/lit';
|
||||||
import { flip, offset } from '@floating-ui/dom';
|
import { flip, offset } from '@floating-ui/dom';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import {
|
|||||||
} from '@blocksuite/affine-components/filterable-list';
|
} from '@blocksuite/affine-components/filterable-list';
|
||||||
import { ArrowDownIcon } from '@blocksuite/affine-components/icons';
|
import { ArrowDownIcon } from '@blocksuite/affine-components/icons';
|
||||||
import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
|
import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
|
||||||
import { noop, SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
|
import { noop } from '@blocksuite/global/utils';
|
||||||
import { css, LitElement, nothing } from 'lit';
|
import { css, LitElement, nothing } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
import { styleMap } from 'lit/directives/style-map.js';
|
import { styleMap } from 'lit/directives/style-map.js';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { PropertyMetaConfig } from '@blocksuite/data-view';
|
import type { PropertyMetaConfig } from '@blocksuite/data-view';
|
||||||
import type { Disposable } from '@blocksuite/global/utils';
|
import type { Disposable } from '@blocksuite/global/slot';
|
||||||
import type { Block, BlockModel } from '@blocksuite/store';
|
import type { Block, BlockModel } from '@blocksuite/store';
|
||||||
|
|
||||||
type PropertyMeta<
|
type PropertyMeta<
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import type { EditorHost } from '@blocksuite/block-std';
|
|||||||
import { DataSourceBase, type PropertyMetaConfig } from '@blocksuite/data-view';
|
import { DataSourceBase, type PropertyMetaConfig } from '@blocksuite/data-view';
|
||||||
import { propertyPresets } from '@blocksuite/data-view/property-presets';
|
import { propertyPresets } from '@blocksuite/data-view/property-presets';
|
||||||
import { BlockSuiteError } from '@blocksuite/global/exceptions';
|
import { BlockSuiteError } from '@blocksuite/global/exceptions';
|
||||||
import { Slot } from '@blocksuite/global/utils';
|
import { Slot } from '@blocksuite/global/slot';
|
||||||
import type { Block, Store } from '@blocksuite/store';
|
import type { Block, Store } from '@blocksuite/store';
|
||||||
|
|
||||||
import type { BlockMeta } from './block-meta/base.js';
|
import type { BlockMeta } from './block-meta/base.js';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
||||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import type { Text } from '@blocksuite/store';
|
import type { Text } from '@blocksuite/store';
|
||||||
import { css, html } from 'lit';
|
import { css, html } from 'lit';
|
||||||
import { property, query, state } from 'lit/decorators.js';
|
import { property, query, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type {
|
|||||||
KanbanSingleView,
|
KanbanSingleView,
|
||||||
TableSingleView,
|
TableSingleView,
|
||||||
} from '@blocksuite/data-view/view-presets';
|
} from '@blocksuite/data-view/view-presets';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { css, html } from 'lit';
|
import { css, html } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
|
|||||||
import { createDefaultDoc, matchModels } from '@blocksuite/affine-shared/utils';
|
import { createDefaultDoc, matchModels } from '@blocksuite/affine-shared/utils';
|
||||||
import { type EditorHost, ShadowlessElement } from '@blocksuite/block-std';
|
import { type EditorHost, ShadowlessElement } from '@blocksuite/block-std';
|
||||||
import type { DetailSlotProps, SingleView } from '@blocksuite/data-view';
|
import type { DetailSlotProps, SingleView } from '@blocksuite/data-view';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import type { BaseTextAttributes } from '@blocksuite/inline';
|
import type { BaseTextAttributes } from '@blocksuite/inline';
|
||||||
import { computed } from '@preact/signals-core';
|
import { computed } from '@preact/signals-core';
|
||||||
import { css, html } from 'lit';
|
import { css, html } from 'lit';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
isGfxBlockComponent,
|
isGfxBlockComponent,
|
||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { html, nothing } from 'lit';
|
import { html, nothing } from 'lit';
|
||||||
import { property, queryAsync } from 'lit/decorators.js';
|
import { property, queryAsync } from 'lit/decorators.js';
|
||||||
import { classMap } from 'lit/directives/class-map.js';
|
import { classMap } from 'lit/directives/class-map.js';
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
type IVec,
|
type IVec,
|
||||||
type SerializedXYWH,
|
type SerializedXYWH,
|
||||||
} from '@blocksuite/global/gfx';
|
} from '@blocksuite/global/gfx';
|
||||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
import { type BlockModel, Text } from '@blocksuite/store';
|
import { type BlockModel, Text } from '@blocksuite/store';
|
||||||
import * as Y from 'yjs';
|
import * as Y from 'yjs';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { ImageBlockModel } from '@blocksuite/affine-model';
|
import type { ImageBlockModel } from '@blocksuite/affine-model';
|
||||||
import { humanFileSize } from '@blocksuite/affine-shared/utils';
|
import { humanFileSize } from '@blocksuite/affine-shared/utils';
|
||||||
import { modelContext, ShadowlessElement } from '@blocksuite/block-std';
|
import { modelContext, ShadowlessElement } from '@blocksuite/block-std';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { consume } from '@lit/context';
|
import { consume } from '@lit/context';
|
||||||
import { css, html } from 'lit';
|
import { css, html } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
TextSelection,
|
TextSelection,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import type { BaseSelection } from '@blocksuite/store';
|
import type { BaseSelection } from '@blocksuite/store';
|
||||||
import { css, html, type PropertyValues } from 'lit';
|
import { css, html, type PropertyValues } from 'lit';
|
||||||
import { property, query, state } from 'lit/decorators.js';
|
import { property, query, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import {
|
|||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
||||||
import { clamp, Point } from '@blocksuite/global/gfx';
|
import { clamp, Point } from '@blocksuite/global/gfx';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import type { BlockModel } from '@blocksuite/store';
|
import type { BlockModel } from '@blocksuite/store';
|
||||||
import { consume } from '@lit/context';
|
import { consume } from '@lit/context';
|
||||||
import { computed } from '@preact/signals-core';
|
import { computed } from '@preact/signals-core';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { NoteBlockModel } from '@blocksuite/affine-model';
|
import type { NoteBlockModel } from '@blocksuite/affine-model';
|
||||||
import { type EditorHost, ShadowlessElement } from '@blocksuite/block-std';
|
import { type EditorHost, ShadowlessElement } from '@blocksuite/block-std';
|
||||||
import { almostEqual, Bound } from '@blocksuite/global/gfx';
|
import { almostEqual, Bound } from '@blocksuite/global/gfx';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { html } from 'lit';
|
import { html } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
import { styleMap } from 'lit/directives/style-map.js';
|
import { styleMap } from 'lit/directives/style-map.js';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
stdContext,
|
stdContext,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { consume } from '@lit/context';
|
import { consume } from '@lit/context';
|
||||||
import { html } from 'lit';
|
import { html } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
} from '@blocksuite/affine-components/icons';
|
} from '@blocksuite/affine-components/icons';
|
||||||
import type { ParagraphBlockModel } from '@blocksuite/affine-model';
|
import type { ParagraphBlockModel } from '@blocksuite/affine-model';
|
||||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||||
import { css, html, nothing, unsafeCSS } from 'lit';
|
import { css, html, nothing, unsafeCSS } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
retainFirstModelCommand,
|
retainFirstModelCommand,
|
||||||
} from '@blocksuite/affine-shared/commands';
|
} from '@blocksuite/affine-shared/commands';
|
||||||
import type { UIEventHandler } from '@blocksuite/block-std';
|
import type { UIEventHandler } from '@blocksuite/block-std';
|
||||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
import type { BlockSnapshot, Store } from '@blocksuite/store';
|
import type { BlockSnapshot, Store } from '@blocksuite/store';
|
||||||
|
|
||||||
import { ReadOnlyClipboard } from './readonly-clipboard';
|
import { ReadOnlyClipboard } from './readonly-clipboard';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
getSelectedModelsCommand,
|
getSelectedModelsCommand,
|
||||||
} from '@blocksuite/affine-shared/commands';
|
} from '@blocksuite/affine-shared/commands';
|
||||||
import type { BlockComponent, UIEventHandler } from '@blocksuite/block-std';
|
import type { BlockComponent, UIEventHandler } from '@blocksuite/block-std';
|
||||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
|
|
||||||
import { ClipboardAdapter } from './adapter.js';
|
import { ClipboardAdapter } from './adapter.js';
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ import {
|
|||||||
type SerializedXYWH,
|
type SerializedXYWH,
|
||||||
Vec,
|
Vec,
|
||||||
} from '@blocksuite/global/gfx';
|
} from '@blocksuite/global/gfx';
|
||||||
import { assertType, DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
|
import { assertType } from '@blocksuite/global/utils';
|
||||||
import {
|
import {
|
||||||
type BlockSnapshot,
|
type BlockSnapshot,
|
||||||
BlockSnapshotSchema,
|
BlockSnapshotSchema,
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import {
|
|||||||
toDegree,
|
toDegree,
|
||||||
Vec,
|
Vec,
|
||||||
} from '@blocksuite/global/gfx';
|
} from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { FrameIcon, PageIcon } from '@blocksuite/icons/lit';
|
import { FrameIcon, PageIcon } from '@blocksuite/icons/lit';
|
||||||
import { consume } from '@lit/context';
|
import { consume } from '@lit/context';
|
||||||
import { baseTheme } from '@toeverything/theme';
|
import { baseTheme } from '@toeverything/theme';
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import { type BlockStdScope, stdContext } from '@blocksuite/block-std';
|
|||||||
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
||||||
import type { Bound, IVec } from '@blocksuite/global/gfx';
|
import type { Bound, IVec } from '@blocksuite/global/gfx';
|
||||||
import { Vec } from '@blocksuite/global/gfx';
|
import { Vec } from '@blocksuite/global/gfx';
|
||||||
import { DisposableGroup, WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
import {
|
import {
|
||||||
ArrowUpBigIcon,
|
ArrowUpBigIcon,
|
||||||
PlusIcon,
|
PlusIcon,
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ import {
|
|||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
||||||
import { Vec } from '@blocksuite/global/gfx';
|
import { Vec } from '@blocksuite/global/gfx';
|
||||||
import { DisposableGroup, WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
import type { Store } from '@blocksuite/store';
|
import type { Store } from '@blocksuite/store';
|
||||||
import { consume } from '@lit/context';
|
import { consume } from '@lit/context';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ import {
|
|||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
||||||
import { Bound, deserializeXYWH } from '@blocksuite/global/gfx';
|
import { Bound, deserializeXYWH } from '@blocksuite/global/gfx';
|
||||||
import { DisposableGroup, WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
import { type Query, type Store } from '@blocksuite/store';
|
import { type Query, type Store } from '@blocksuite/store';
|
||||||
import { css, html, nothing, type PropertyValues } from 'lit';
|
import { css, html, nothing, type PropertyValues } from 'lit';
|
||||||
import { property, query, state } from 'lit/decorators.js';
|
import { property, query, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { getRectByBlockComponent } from '@blocksuite/affine-shared/utils';
|
|||||||
import { WidgetComponent } from '@blocksuite/block-std';
|
import { WidgetComponent } from '@blocksuite/block-std';
|
||||||
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
||||||
import { deserializeXYWH, Point, serializeXYWH } from '@blocksuite/global/gfx';
|
import { deserializeXYWH, Point, serializeXYWH } from '@blocksuite/global/gfx';
|
||||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
import { ScissorsIcon } from '@blocksuite/icons/lit';
|
import { ScissorsIcon } from '@blocksuite/icons/lit';
|
||||||
import { css, html, nothing, type PropertyValues } from 'lit';
|
import { css, html, nothing, type PropertyValues } from 'lit';
|
||||||
import { state } from 'lit/decorators.js';
|
import { state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { EmbedCardStyle } from '@blocksuite/affine-model';
|
import type { EmbedCardStyle } from '@blocksuite/affine-model';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { css, html, LitElement, nothing, type TemplateResult } from 'lit';
|
import { css, html, LitElement, nothing, type TemplateResult } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
import { classMap } from 'lit/directives/class-map.js';
|
import { classMap } from 'lit/directives/class-map.js';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { LINE_WIDTHS, LineWidth } from '@blocksuite/affine-model';
|
import { LINE_WIDTHS, LineWidth } from '@blocksuite/affine-model';
|
||||||
import { on, once } from '@blocksuite/affine-shared/utils';
|
import { on, once } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { css, html, LitElement, nothing, type PropertyValues } from 'lit';
|
import { css, html, LitElement, nothing, type PropertyValues } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
import { repeat } from 'lit/directives/repeat.js';
|
import { repeat } from 'lit/directives/repeat.js';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { NoteDisplayMode } from '@blocksuite/affine-model';
|
import { NoteDisplayMode } from '@blocksuite/affine-model';
|
||||||
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { EdgelessIcon, PageIcon } from '@blocksuite/icons/lit';
|
import { EdgelessIcon, PageIcon } from '@blocksuite/icons/lit';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ColorScheme, NoteShadow } from '@blocksuite/affine-model';
|
import { ColorScheme, NoteShadow } from '@blocksuite/affine-model';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
import { repeat } from 'lit/directives/repeat.js';
|
import { repeat } from 'lit/directives/repeat.js';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ShapeStyle } from '@blocksuite/affine-model';
|
import { ShapeStyle } from '@blocksuite/affine-model';
|
||||||
import { Slot } from '@blocksuite/global/utils';
|
import { Slot } from '@blocksuite/global/slot';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
import { repeat } from 'lit/directives/repeat.js';
|
import { repeat } from 'lit/directives/repeat.js';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { type ColorScheme, type StrokeStyle } from '@blocksuite/affine-model';
|
import { type ColorScheme, type StrokeStyle } from '@blocksuite/affine-model';
|
||||||
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ import {
|
|||||||
deserializeXYWH,
|
deserializeXYWH,
|
||||||
normalizeDegAngle,
|
normalizeDegAngle,
|
||||||
} from '@blocksuite/global/gfx';
|
} from '@blocksuite/global/gfx';
|
||||||
import type { Disposable } from '@blocksuite/global/utils';
|
import { type Disposable, Slot } from '@blocksuite/global/slot';
|
||||||
import { assertType, Slot } from '@blocksuite/global/utils';
|
import { assertType } from '@blocksuite/global/utils';
|
||||||
import { css, html, nothing } from 'lit';
|
import { css, html, nothing } from 'lit';
|
||||||
import { state } from 'lit/decorators.js';
|
import { state } from 'lit/decorators.js';
|
||||||
import { ifDefined } from 'lit/directives/if-defined.js';
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { Bound, Vec } from '@blocksuite/global/gfx';
|
import { Bound, Vec } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { css, html, nothing } from 'lit';
|
import { css, html, nothing } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
import { styleMap } from 'lit/directives/style-map.js';
|
import { styleMap } from 'lit/directives/style-map.js';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||||
import { css, html, nothing } from 'lit';
|
import { css, html, nothing } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { html, nothing } from 'lit';
|
import { html, nothing } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
import { styleMap } from 'lit/directives/style-map.js';
|
import { styleMap } from 'lit/directives/style-map.js';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { Bound, toRadian, Vec } from '@blocksuite/global/gfx';
|
import { Bound, toRadian, Vec } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { html, nothing } from 'lit';
|
import { html, nothing } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
import { styleMap } from 'lit/directives/style-map.js';
|
import { styleMap } from 'lit/directives/style-map.js';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { Bound, toRadian, Vec } from '@blocksuite/global/gfx';
|
import { Bound, toRadian, Vec } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { css, html, nothing } from 'lit';
|
import { css, html, nothing } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
import { styleMap } from 'lit/directives/style-map.js';
|
import { styleMap } from 'lit/directives/style-map.js';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
||||||
import type { GfxToolsFullOptionValue } from '@blocksuite/block-std/gfx';
|
import type { GfxToolsFullOptionValue } from '@blocksuite/block-std/gfx';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import { computed } from '@preact/signals-core';
|
import { computed } from '@preact/signals-core';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
EditPropsStore,
|
EditPropsStore,
|
||||||
ThemeProvider,
|
ThemeProvider,
|
||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import { computed } from '@preact/signals-core';
|
import { computed } from '@preact/signals-core';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { styleMap } from 'lit/directives/style-map.js';
|
import { styleMap } from 'lit/directives/style-map.js';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Bound } from '@blocksuite/global/gfx';
|
import type { Bound } from '@blocksuite/global/gfx';
|
||||||
import type { DisposableClass } from '@blocksuite/global/utils';
|
import type { DisposableClass } from '@blocksuite/global/lit';
|
||||||
import type { TemplateResult } from 'lit';
|
import type { TemplateResult } from 'lit';
|
||||||
|
|
||||||
import type { EdgelessRootBlockComponent } from '../../../../edgeless-root-block.js';
|
import type { EdgelessRootBlockComponent } from '../../../../edgeless-root-block.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { ArrowRightSmallIcon } from '@blocksuite/icons/lit';
|
import { ArrowRightSmallIcon } from '@blocksuite/icons/lit';
|
||||||
import { consume } from '@lit/context';
|
import { consume } from '@lit/context';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
||||||
import type { GfxToolsFullOptionValue } from '@blocksuite/block-std/gfx';
|
import type { GfxToolsFullOptionValue } from '@blocksuite/block-std/gfx';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import {
|
import {
|
||||||
ConnectorCIcon,
|
ConnectorCIcon,
|
||||||
ConnectorEIcon,
|
ConnectorEIcon,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ConnectorMode, getConnectorModeName } from '@blocksuite/affine-model';
|
import { ConnectorMode, getConnectorModeName } from '@blocksuite/affine-model';
|
||||||
import { EditPropsStore } from '@blocksuite/affine-shared/services';
|
import { EditPropsStore } from '@blocksuite/affine-shared/services';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import {
|
import {
|
||||||
ConnectorCIcon,
|
ConnectorCIcon,
|
||||||
ConnectorEIcon,
|
ConnectorEIcon,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { ColorScheme } from '@blocksuite/affine-model';
|
import type { ColorScheme } from '@blocksuite/affine-model';
|
||||||
import type { Slot } from '@blocksuite/global/utils';
|
import type { Slot } from '@blocksuite/global/slot';
|
||||||
import { createContext } from '@lit/context';
|
import { createContext } from '@lit/context';
|
||||||
|
|
||||||
import type { EdgelessToolbarWidget } from './edgeless-toolbar.js';
|
import type { EdgelessToolbarWidget } from './edgeless-toolbar.js';
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
||||||
import { WidgetComponent } from '@blocksuite/block-std';
|
import { WidgetComponent } from '@blocksuite/block-std';
|
||||||
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
||||||
import { Slot } from '@blocksuite/global/utils';
|
import { Slot } from '@blocksuite/global/slot';
|
||||||
import {
|
import {
|
||||||
ArrowLeftSmallIcon,
|
ArrowLeftSmallIcon,
|
||||||
ArrowRightSmallIcon,
|
ArrowRightSmallIcon,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { LassoMode } from '@blocksuite/affine-shared/types';
|
import { LassoMode } from '@blocksuite/affine-shared/types';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { effect } from '@preact/signals-core';
|
import { effect } from '@preact/signals-core';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { query, state } from 'lit/decorators.js';
|
import { query, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import type { BlockStdScope } from '@blocksuite/block-std';
|
|||||||
import { modelContext, stdContext } from '@blocksuite/block-std';
|
import { modelContext, stdContext } from '@blocksuite/block-std';
|
||||||
import { ErrorCode } from '@blocksuite/global/exceptions';
|
import { ErrorCode } from '@blocksuite/global/exceptions';
|
||||||
import type { Bound } from '@blocksuite/global/gfx';
|
import type { Bound } from '@blocksuite/global/gfx';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import type { BlockModel } from '@blocksuite/store';
|
import type { BlockModel } from '@blocksuite/store';
|
||||||
import { consume } from '@lit/context';
|
import { consume } from '@lit/context';
|
||||||
import { computed } from '@preact/signals-core';
|
import { computed } from '@preact/signals-core';
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import type { GfxToolsFullOptionValue } from '@blocksuite/block-std/gfx';
|
import type { GfxToolsFullOptionValue } from '@blocksuite/block-std/gfx';
|
||||||
import type { Bound } from '@blocksuite/global/gfx';
|
import type { Bound } from '@blocksuite/global/gfx';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import { computed } from '@preact/signals-core';
|
import { computed } from '@preact/signals-core';
|
||||||
import { css, html, LitElement, nothing } from 'lit';
|
import { css, html, LitElement, nothing } from 'lit';
|
||||||
import { property, query, state } from 'lit/decorators.js';
|
import { property, query, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import type {
|
|||||||
ToolController,
|
ToolController,
|
||||||
} from '@blocksuite/block-std/gfx';
|
} from '@blocksuite/block-std/gfx';
|
||||||
import {
|
import {
|
||||||
type Constructor,
|
|
||||||
// oxlint-disable-next-line no-unused-vars
|
// oxlint-disable-next-line no-unused-vars
|
||||||
type DisposableClass,
|
type DisposableClass,
|
||||||
WithDisposable,
|
WithDisposable,
|
||||||
} from '@blocksuite/global/utils';
|
} from '@blocksuite/global/lit';
|
||||||
|
import type { Constructor } from '@blocksuite/global/utils';
|
||||||
import { consume } from '@lit/context';
|
import { consume } from '@lit/context';
|
||||||
import { effect } from '@preact/signals-core';
|
import { effect } from '@preact/signals-core';
|
||||||
import { cssVar } from '@toeverything/theme';
|
import { cssVar } from '@toeverything/theme';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
EditPropsStore,
|
EditPropsStore,
|
||||||
ThemeProvider,
|
ThemeProvider,
|
||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import { computed } from '@preact/signals-core';
|
import { computed } from '@preact/signals-core';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { state } from 'lit/decorators.js';
|
import { state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { FrameBlockModel } from '@blocksuite/affine-model';
|
import type { FrameBlockModel } from '@blocksuite/affine-model';
|
||||||
import { createButtonPopper } from '@blocksuite/affine-shared/utils';
|
import { createButtonPopper } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { LayerIcon } from '@blocksuite/icons/lit';
|
import { LayerIcon } from '@blocksuite/icons/lit';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
import { EdgelessCRUDIdentifier } from '@blocksuite/affine-block-surface';
|
import { EdgelessCRUDIdentifier } from '@blocksuite/affine-block-surface';
|
||||||
import { generateKeyBetweenV2 } from '@blocksuite/block-std/gfx';
|
import { generateKeyBetweenV2 } from '@blocksuite/block-std/gfx';
|
||||||
import {
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
DisposableGroup,
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
SignalWatcher,
|
|
||||||
WithDisposable,
|
|
||||||
} from '@blocksuite/global/utils';
|
|
||||||
import { css, html, LitElement, nothing } from 'lit';
|
import { css, html, LitElement, nothing } from 'lit';
|
||||||
import { property, query, state } from 'lit/decorators.js';
|
import { property, query, state } from 'lit/decorators.js';
|
||||||
import { repeat } from 'lit/directives/repeat.js';
|
import { repeat } from 'lit/directives/repeat.js';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { EditPropsStore } from '@blocksuite/affine-shared/services';
|
import { EditPropsStore } from '@blocksuite/affine-shared/services';
|
||||||
import { createButtonPopper } from '@blocksuite/affine-shared/utils';
|
import { createButtonPopper } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { SettingsIcon } from '@blocksuite/icons/lit';
|
import { SettingsIcon } from '@blocksuite/icons/lit';
|
||||||
import { css, html, LitElement, nothing } from 'lit';
|
import { css, html, LitElement, nothing } from 'lit';
|
||||||
import { property, query, state } from 'lit/decorators.js';
|
import { property, query, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type { FrameBlockModel } from '@blocksuite/affine-model';
|
|||||||
import { EditPropsStore } from '@blocksuite/affine-shared/services';
|
import { EditPropsStore } from '@blocksuite/affine-shared/services';
|
||||||
import type { GfxToolsFullOptionValue } from '@blocksuite/block-std/gfx';
|
import type { GfxToolsFullOptionValue } from '@blocksuite/block-std/gfx';
|
||||||
import { Bound, clamp } from '@blocksuite/global/gfx';
|
import { Bound, clamp } from '@blocksuite/global/gfx';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import {
|
import {
|
||||||
EndPointArrowIcon,
|
EndPointArrowIcon,
|
||||||
ExpandCloseIcon,
|
ExpandCloseIcon,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
TelemetryProvider,
|
TelemetryProvider,
|
||||||
ThemeProvider,
|
ThemeProvider,
|
||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import { css, html, LitElement, nothing } from 'lit';
|
import { css, html, LitElement, nothing } from 'lit';
|
||||||
import { property, query, state } from 'lit/decorators.js';
|
import { property, query, state } from 'lit/decorators.js';
|
||||||
import { classMap } from 'lit/directives/class-map.js';
|
import { classMap } from 'lit/directives/class-map.js';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
ThemeProvider,
|
ThemeProvider,
|
||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { StyleGeneralIcon, StyleScribbleIcon } from '@blocksuite/icons/lit';
|
import { StyleGeneralIcon, StyleScribbleIcon } from '@blocksuite/icons/lit';
|
||||||
import { computed, effect, type Signal, signal } from '@preact/signals-core';
|
import { computed, effect, type Signal, signal } from '@preact/signals-core';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { type ShapeName, ShapeType } from '@blocksuite/affine-model';
|
import { type ShapeName, ShapeType } from '@blocksuite/affine-model';
|
||||||
import { SignalWatcher } from '@blocksuite/global/utils';
|
import { SignalWatcher } from '@blocksuite/global/lit';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
|
|
||||||
import { ShapeTool } from '../../../gfx-tool/shape-tool.js';
|
import { ShapeTool } from '../../../gfx-tool/shape-tool.js';
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ import {
|
|||||||
type ShapeStyle,
|
type ShapeStyle,
|
||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { sleep, WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
|
import { sleep } from '@blocksuite/global/utils';
|
||||||
import {
|
import {
|
||||||
css,
|
css,
|
||||||
html,
|
html,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
once,
|
once,
|
||||||
requestConnectedFrame,
|
requestConnectedFrame,
|
||||||
} from '@blocksuite/affine-shared/utils';
|
} from '@blocksuite/affine-shared/utils';
|
||||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
import { css, html, LitElement } from 'lit';
|
import { css, html, LitElement } from 'lit';
|
||||||
import { query } from 'lit/decorators.js';
|
import { query } from 'lit/decorators.js';
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
stopPropagation,
|
stopPropagation,
|
||||||
} from '@blocksuite/affine-shared/utils';
|
} from '@blocksuite/affine-shared/utils';
|
||||||
import type { Bound } from '@blocksuite/global/gfx';
|
import type { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { baseTheme } from '@toeverything/theme';
|
import { baseTheme } from '@toeverything/theme';
|
||||||
import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
|
import { css, html, LitElement, nothing, unsafeCSS } from 'lit';
|
||||||
import { property, state } from 'lit/decorators.js';
|
import { property, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ import {
|
|||||||
} from '@blocksuite/block-std/gfx';
|
} from '@blocksuite/block-std/gfx';
|
||||||
import type { IVec } from '@blocksuite/global/gfx';
|
import type { IVec } from '@blocksuite/global/gfx';
|
||||||
import { Bound, getCommonBoundWithRotation, Vec } from '@blocksuite/global/gfx';
|
import { Bound, getCommonBoundWithRotation, Vec } from '@blocksuite/global/gfx';
|
||||||
import { DisposableGroup, noop } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
|
import { noop } from '@blocksuite/global/utils';
|
||||||
import { effect } from '@preact/signals-core';
|
import { effect } from '@preact/signals-core';
|
||||||
import clamp from 'lodash-es/clamp';
|
import clamp from 'lodash-es/clamp';
|
||||||
import last from 'lodash-es/last';
|
import last from 'lodash-es/last';
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import type {
|
|||||||
} from '@blocksuite/affine-block-surface';
|
} from '@blocksuite/affine-block-surface';
|
||||||
import type { ConnectorElementModel } from '@blocksuite/affine-model';
|
import type { ConnectorElementModel } from '@blocksuite/affine-model';
|
||||||
import { Bound, getCommonBound } from '@blocksuite/global/gfx';
|
import { Bound, getCommonBound } from '@blocksuite/global/gfx';
|
||||||
import { assertType, Slot } from '@blocksuite/global/utils';
|
import { Slot } from '@blocksuite/global/slot';
|
||||||
|
import { assertType } from '@blocksuite/global/utils';
|
||||||
import {
|
import {
|
||||||
type BlockModel,
|
type BlockModel,
|
||||||
type BlockSnapshot,
|
type BlockSnapshot,
|
||||||
|
|||||||
@@ -14,12 +14,8 @@ import { ThemeProvider } from '@blocksuite/affine-shared/services';
|
|||||||
import type { GfxController, GfxToolsMap } from '@blocksuite/block-std/gfx';
|
import type { GfxController, GfxToolsMap } from '@blocksuite/block-std/gfx';
|
||||||
import type { XYWH } from '@blocksuite/global/gfx';
|
import type { XYWH } from '@blocksuite/global/gfx';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import {
|
import { DisposableGroup, Slot } from '@blocksuite/global/slot';
|
||||||
assertType,
|
import { assertType, noop } from '@blocksuite/global/utils';
|
||||||
DisposableGroup,
|
|
||||||
noop,
|
|
||||||
Slot,
|
|
||||||
} from '@blocksuite/global/utils';
|
|
||||||
import { effect } from '@preact/signals-core';
|
import { effect } from '@preact/signals-core';
|
||||||
|
|
||||||
import type { ShapeTool } from '../gfx-tool/shape-tool.js';
|
import type { ShapeTool } from '../gfx-tool/shape-tool.js';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { createLitPortal } from '@blocksuite/affine-components/portal';
|
import { createLitPortal } from '@blocksuite/affine-components/portal';
|
||||||
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
import { MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
||||||
import { offset } from '@floating-ui/dom';
|
import { offset } from '@floating-ui/dom';
|
||||||
import { css, html, LitElement, nothing } from 'lit';
|
import { css, html, LitElement, nothing } from 'lit';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
import { stopPropagation } from '@blocksuite/affine-shared/utils';
|
||||||
import { ZOOM_STEP } from '@blocksuite/block-std/gfx';
|
import { ZOOM_STEP } from '@blocksuite/block-std/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { MinusIcon, PlusIcon, ViewBarIcon } from '@blocksuite/icons/lit';
|
import { MinusIcon, PlusIcon, ViewBarIcon } from '@blocksuite/icons/lit';
|
||||||
import { effect } from '@preact/signals-core';
|
import { effect } from '@preact/signals-core';
|
||||||
import { baseTheme } from '@toeverything/theme';
|
import { baseTheme } from '@toeverything/theme';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { MindmapElementModel } from '@blocksuite/affine-model';
|
|||||||
import { TelemetryProvider } from '@blocksuite/affine-shared/services';
|
import { TelemetryProvider } from '@blocksuite/affine-shared/services';
|
||||||
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { FrameIcon } from '@blocksuite/icons/lit';
|
import { FrameIcon } from '@blocksuite/icons/lit';
|
||||||
import { css, html, LitElement, nothing } from 'lit';
|
import { css, html, LitElement, nothing } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
MindmapElementModel,
|
MindmapElementModel,
|
||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { GroupingIcon } from '@blocksuite/icons/lit';
|
import { GroupingIcon } from '@blocksuite/icons/lit';
|
||||||
import { css, html, LitElement, nothing } from 'lit';
|
import { css, html, LitElement, nothing } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
import { MindmapElementModel } from '@blocksuite/affine-model';
|
import { MindmapElementModel } from '@blocksuite/affine-model';
|
||||||
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import {
|
import {
|
||||||
AlignBottomIcon,
|
AlignBottomIcon,
|
||||||
AlignHorizontalCenterIcon,
|
AlignHorizontalCenterIcon,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import {
|
|||||||
ToolbarContext,
|
ToolbarContext,
|
||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import type { TemplateResult } from 'lit';
|
import type { TemplateResult } from 'lit';
|
||||||
import { html, LitElement, nothing } from 'lit';
|
import { html, LitElement, nothing } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
|
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
|
||||||
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { html, LitElement, nothing } from 'lit';
|
import { html, LitElement, nothing } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
import { when } from 'lit/directives/when.js';
|
import { when } from 'lit/directives/when.js';
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import {
|
|||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
|
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
|
||||||
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import {
|
import {
|
||||||
AddTextIcon,
|
AddTextIcon,
|
||||||
ConnectorCIcon,
|
ConnectorCIcon,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ import {
|
|||||||
import { getHostName, referenceToNode } from '@blocksuite/affine-shared/utils';
|
import { getHostName, referenceToNode } from '@blocksuite/affine-shared/utils';
|
||||||
import type { BlockStdScope } from '@blocksuite/block-std';
|
import type { BlockStdScope } from '@blocksuite/block-std';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { css, html, LitElement, nothing, type TemplateResult } from 'lit';
|
import { css, html, LitElement, nothing, type TemplateResult } from 'lit';
|
||||||
import { property, state } from 'lit/decorators.js';
|
import { property, state } from 'lit/decorators.js';
|
||||||
import { ifDefined } from 'lit/directives/if-defined.js';
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
|||||||
import { matchModels } from '@blocksuite/affine-shared/utils';
|
import { matchModels } from '@blocksuite/affine-shared/utils';
|
||||||
import { GfxExtensionIdentifier } from '@blocksuite/block-std/gfx';
|
import { GfxExtensionIdentifier } from '@blocksuite/block-std/gfx';
|
||||||
import { deserializeXYWH, serializeXYWH } from '@blocksuite/global/gfx';
|
import { deserializeXYWH, serializeXYWH } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { EditIcon, PageIcon, UngroupIcon } from '@blocksuite/icons/lit';
|
import { EditIcon, PageIcon, UngroupIcon } from '@blocksuite/icons/lit';
|
||||||
import { html, LitElement, nothing } from 'lit';
|
import { html, LitElement, nothing } from 'lit';
|
||||||
import { property, query } from 'lit/decorators.js';
|
import { property, query } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import { matchModels } from '@blocksuite/affine-shared/utils';
|
import { matchModels } from '@blocksuite/affine-shared/utils';
|
||||||
import { deserializeXYWH, serializeXYWH } from '@blocksuite/global/gfx';
|
import { deserializeXYWH, serializeXYWH } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { EditIcon, PageIcon, UngroupIcon } from '@blocksuite/icons/lit';
|
import { EditIcon, PageIcon, UngroupIcon } from '@blocksuite/icons/lit';
|
||||||
import { html, LitElement, nothing } from 'lit';
|
import { html, LitElement, nothing } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
} from '@blocksuite/affine-block-image';
|
} from '@blocksuite/affine-block-image';
|
||||||
import { CaptionIcon, DownloadIcon } from '@blocksuite/affine-components/icons';
|
import { CaptionIcon, DownloadIcon } from '@blocksuite/affine-components/icons';
|
||||||
import type { ImageBlockModel } from '@blocksuite/affine-model';
|
import type { ImageBlockModel } from '@blocksuite/affine-model';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { html, LitElement, nothing } from 'lit';
|
import { html, LitElement, nothing } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import type {
|
|||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import { LayoutType, MindmapStyle } from '@blocksuite/affine-model';
|
import { LayoutType, MindmapStyle } from '@blocksuite/affine-model';
|
||||||
import { EditPropsStore } from '@blocksuite/affine-shared/services';
|
import { EditPropsStore } from '@blocksuite/affine-shared/services';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { RadiantIcon, RightLayoutIcon, StyleIcon } from '@blocksuite/icons/lit';
|
import { RadiantIcon, RightLayoutIcon, StyleIcon } from '@blocksuite/icons/lit';
|
||||||
import { css, html, LitElement, nothing, type TemplateResult } from 'lit';
|
import { css, html, LitElement, nothing, type TemplateResult } from 'lit';
|
||||||
import { property, state } from 'lit/decorators.js';
|
import { property, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import {
|
|||||||
ThemeProvider,
|
ThemeProvider,
|
||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import {
|
import {
|
||||||
AutoHeightIcon,
|
AutoHeightIcon,
|
||||||
CornerIcon,
|
CornerIcon,
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import {
|
|||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
|
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
|
||||||
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import {
|
import {
|
||||||
AddTextIcon,
|
AddTextIcon,
|
||||||
ShapeIcon,
|
ShapeIcon,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import {
|
|||||||
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
|
import { FeatureFlagService } from '@blocksuite/affine-shared/services';
|
||||||
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
import type { ColorEvent } from '@blocksuite/affine-shared/utils';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import {
|
import {
|
||||||
TextAlignCenterIcon,
|
TextAlignCenterIcon,
|
||||||
TextAlignLeftIcon,
|
TextAlignLeftIcon,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
} from '@blocksuite/affine-shared/services';
|
} from '@blocksuite/affine-shared/services';
|
||||||
import type { BlockStdScope } from '@blocksuite/block-std';
|
import type { BlockStdScope } from '@blocksuite/block-std';
|
||||||
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { LockIcon, UnlockIcon } from '@blocksuite/icons/lit';
|
import { LockIcon, UnlockIcon } from '@blocksuite/icons/lit';
|
||||||
import { html, LitElement, nothing } from 'lit';
|
import { html, LitElement, nothing } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { MenuItemGroup } from '@blocksuite/affine-components/toolbar';
|
import type { MenuItemGroup } from '@blocksuite/affine-components/toolbar';
|
||||||
import { renderGroups } from '@blocksuite/affine-components/toolbar';
|
import { renderGroups } from '@blocksuite/affine-components/toolbar';
|
||||||
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
import type { GfxModel } from '@blocksuite/block-std/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { MoreHorizontalIcon, MoreVerticalIcon } from '@blocksuite/icons/lit';
|
import { MoreHorizontalIcon, MoreVerticalIcon } from '@blocksuite/icons/lit';
|
||||||
import { html, LitElement } from 'lit';
|
import { html, LitElement } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { GroupElementModel } from '@blocksuite/affine-model';
|
import { GroupElementModel } from '@blocksuite/affine-model';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { ReleaseFromGroupIcon } from '@blocksuite/icons/lit';
|
import { ReleaseFromGroupIcon } from '@blocksuite/icons/lit';
|
||||||
import { html, LitElement } from 'lit';
|
import { html, LitElement } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
requiredProperties,
|
requiredProperties,
|
||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { html, nothing, type PropertyValues } from 'lit';
|
import { html, nothing, type PropertyValues } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
import { repeat } from 'lit/directives/repeat.js';
|
import { repeat } from 'lit/directives/repeat.js';
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
requiredProperties,
|
requiredProperties,
|
||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { ArrowLeftBigIcon, KeyboardIcon } from '@blocksuite/icons/lit';
|
import { ArrowLeftBigIcon, KeyboardIcon } from '@blocksuite/icons/lit';
|
||||||
import { effect, type Signal, signal } from '@preact/signals-core';
|
import { effect, type Signal, signal } from '@preact/signals-core';
|
||||||
import { html } from 'lit';
|
import { html } from 'lit';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { type VirtualKeyboardProvider } from '@blocksuite/affine-shared/services';
|
import { type VirtualKeyboardProvider } from '@blocksuite/affine-shared/services';
|
||||||
import type { BlockStdScope, ShadowlessElement } from '@blocksuite/block-std';
|
import type { BlockStdScope, ShadowlessElement } from '@blocksuite/block-std';
|
||||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
import { effect, type Signal } from '@preact/signals-core';
|
import { effect, type Signal } from '@preact/signals-core';
|
||||||
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
NotionIcon,
|
NotionIcon,
|
||||||
} from '@blocksuite/affine-components/icons';
|
} from '@blocksuite/affine-components/icons';
|
||||||
import { openFileOrFiles } from '@blocksuite/affine-shared/utils';
|
import { openFileOrFiles } from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import type { Schema, Workspace } from '@blocksuite/store';
|
import type { Schema, Workspace } from '@blocksuite/store';
|
||||||
import { html, LitElement, type PropertyValues } from 'lit';
|
import { html, LitElement, type PropertyValues } from 'lit';
|
||||||
import { query, state } from 'lit/decorators.js';
|
import { query, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
} from '@blocksuite/affine-shared/utils';
|
} from '@blocksuite/affine-shared/utils';
|
||||||
import { PropTypes, requiredProperties } from '@blocksuite/block-std';
|
import { PropTypes, requiredProperties } from '@blocksuite/block-std';
|
||||||
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
import { GfxControllerIdentifier } from '@blocksuite/block-std/gfx';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
import { MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
||||||
import { effect } from '@preact/signals-core';
|
import { effect } from '@preact/signals-core';
|
||||||
import { css, html, LitElement, nothing } from 'lit';
|
import { css, html, LitElement, nothing } from 'lit';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
getViewportElement,
|
getViewportElement,
|
||||||
} from '@blocksuite/affine-shared/utils';
|
} from '@blocksuite/affine-shared/utils';
|
||||||
import { PropTypes, requiredProperties } from '@blocksuite/block-std';
|
import { PropTypes, requiredProperties } from '@blocksuite/block-std';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
import { MoreHorizontalIcon } from '@blocksuite/icons/lit';
|
||||||
import { signal } from '@preact/signals-core';
|
import { signal } from '@preact/signals-core';
|
||||||
import { html, LitElement, nothing } from 'lit';
|
import { html, LitElement, nothing } from 'lit';
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ import {
|
|||||||
} from '@blocksuite/affine-components/rich-text';
|
} from '@blocksuite/affine-components/rich-text';
|
||||||
import type { UIEventStateContext } from '@blocksuite/block-std';
|
import type { UIEventStateContext } from '@blocksuite/block-std';
|
||||||
import { TextSelection, WidgetComponent } from '@blocksuite/block-std';
|
import { TextSelection, WidgetComponent } from '@blocksuite/block-std';
|
||||||
import { assertType, DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
|
import { assertType } from '@blocksuite/global/utils';
|
||||||
import { InlineEditor } from '@blocksuite/inline';
|
import { InlineEditor } from '@blocksuite/inline';
|
||||||
import debounce from 'lodash-es/debounce';
|
import debounce from 'lodash-es/debounce';
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
isFuzzyMatch,
|
isFuzzyMatch,
|
||||||
substringMatchScore,
|
substringMatchScore,
|
||||||
} from '@blocksuite/affine-shared/utils';
|
} from '@blocksuite/affine-shared/utils';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { autoPlacement, offset } from '@floating-ui/dom';
|
import { autoPlacement, offset } from '@floating-ui/dom';
|
||||||
import { html, LitElement, nothing, type PropertyValues } from 'lit';
|
import { html, LitElement, nothing, type PropertyValues } from 'lit';
|
||||||
import { property, state } from 'lit/decorators.js';
|
import { property, state } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import type {
|
|||||||
} from '@blocksuite/affine-model';
|
} from '@blocksuite/affine-model';
|
||||||
import { ShadowlessElement } from '@blocksuite/block-std';
|
import { ShadowlessElement } from '@blocksuite/block-std';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import type { BlockModel } from '@blocksuite/store';
|
import type { BlockModel } from '@blocksuite/store';
|
||||||
import { css, type TemplateResult } from 'lit';
|
import { css, type TemplateResult } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import {
|
|||||||
ShadowlessElement,
|
ShadowlessElement,
|
||||||
} from '@blocksuite/block-std';
|
} from '@blocksuite/block-std';
|
||||||
import { deserializeXYWH } from '@blocksuite/global/gfx';
|
import { deserializeXYWH } from '@blocksuite/global/gfx';
|
||||||
import { WithDisposable } from '@blocksuite/global/utils';
|
import { WithDisposable } from '@blocksuite/global/lit';
|
||||||
import { type BlockModel, type Query } from '@blocksuite/store';
|
import { type BlockModel, type Query } from '@blocksuite/store';
|
||||||
import { css, nothing } from 'lit';
|
import { css, nothing } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import {
|
|||||||
deserializeXYWH,
|
deserializeXYWH,
|
||||||
type SerializedXYWH,
|
type SerializedXYWH,
|
||||||
} from '@blocksuite/global/gfx';
|
} from '@blocksuite/global/gfx';
|
||||||
import { DisposableGroup } from '@blocksuite/global/utils';
|
import { DisposableGroup } from '@blocksuite/global/slot';
|
||||||
import { DeleteIcon, EdgelessIcon, FrameIcon } from '@blocksuite/icons/lit';
|
import { DeleteIcon, EdgelessIcon, FrameIcon } from '@blocksuite/icons/lit';
|
||||||
import type { BaseSelection, Store } from '@blocksuite/store';
|
import type { BaseSelection, Store } from '@blocksuite/store';
|
||||||
import { css, html, nothing, type TemplateResult } from 'lit';
|
import { css, html, nothing, type TemplateResult } from 'lit';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { FrameBlockModel } from '@blocksuite/affine-model';
|
import type { FrameBlockModel } from '@blocksuite/affine-model';
|
||||||
import { createIdentifier } from '@blocksuite/global/di';
|
import { createIdentifier } from '@blocksuite/global/di';
|
||||||
import { Slot } from '@blocksuite/global/utils';
|
import { Slot } from '@blocksuite/global/slot';
|
||||||
import type { ExtensionType } from '@blocksuite/store';
|
import type { ExtensionType } from '@blocksuite/store';
|
||||||
|
|
||||||
export const EdgelessLegacySlotIdentifier = createIdentifier<{
|
export const EdgelessLegacySlotIdentifier = createIdentifier<{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import type {
|
|||||||
} from '@blocksuite/block-std/gfx';
|
} from '@blocksuite/block-std/gfx';
|
||||||
import type { IBound } from '@blocksuite/global/gfx';
|
import type { IBound } from '@blocksuite/global/gfx';
|
||||||
import { getBoundWithRotation, intersects } from '@blocksuite/global/gfx';
|
import { getBoundWithRotation, intersects } from '@blocksuite/global/gfx';
|
||||||
import { DisposableGroup, Slot } from '@blocksuite/global/utils';
|
import { DisposableGroup, Slot } from '@blocksuite/global/slot';
|
||||||
import last from 'lodash-es/last';
|
import last from 'lodash-es/last';
|
||||||
|
|
||||||
import type { SurfaceElementModel } from '../element-model/base.js';
|
import type { SurfaceElementModel } from '../element-model/base.js';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
type Viewport,
|
type Viewport,
|
||||||
} from '@blocksuite/block-std/gfx';
|
} from '@blocksuite/block-std/gfx';
|
||||||
import { Bound } from '@blocksuite/global/gfx';
|
import { Bound } from '@blocksuite/global/gfx';
|
||||||
import type { Slot } from '@blocksuite/global/utils';
|
import type { Slot } from '@blocksuite/global/slot';
|
||||||
import { css, html } from 'lit';
|
import { css, html } from 'lit';
|
||||||
import { query } from 'lit/decorators.js';
|
import { query } from 'lit/decorators.js';
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user