mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 18:09:58 +08:00
fix: remove bs shared and components in affine (#9792)
This commit is contained in:
@@ -58,7 +58,11 @@ export {
|
|||||||
PaymentRequiredError,
|
PaymentRequiredError,
|
||||||
UnauthorizedError,
|
UnauthorizedError,
|
||||||
} from '@blocksuite/affine-components/ai-item';
|
} from '@blocksuite/affine-components/ai-item';
|
||||||
export { type MenuOptions } from '@blocksuite/affine-components/context-menu';
|
export {
|
||||||
|
menu,
|
||||||
|
type MenuOptions,
|
||||||
|
onMenuOpen,
|
||||||
|
} from '@blocksuite/affine-components/context-menu';
|
||||||
export {
|
export {
|
||||||
HoverController,
|
HoverController,
|
||||||
whenHover,
|
whenHover,
|
||||||
@@ -97,6 +101,7 @@ export {
|
|||||||
AttachmentAdapter,
|
AttachmentAdapter,
|
||||||
AttachmentAdapterFactoryExtension,
|
AttachmentAdapterFactoryExtension,
|
||||||
AttachmentAdapterFactoryIdentifier,
|
AttachmentAdapterFactoryIdentifier,
|
||||||
|
FetchUtils,
|
||||||
HtmlAdapter,
|
HtmlAdapter,
|
||||||
HtmlAdapterFactoryExtension,
|
HtmlAdapterFactoryExtension,
|
||||||
HtmlAdapterFactoryIdentifier,
|
HtmlAdapterFactoryIdentifier,
|
||||||
@@ -124,11 +129,15 @@ export {
|
|||||||
FontFamilyVariables,
|
FontFamilyVariables,
|
||||||
SizeVariables,
|
SizeVariables,
|
||||||
StyleVariables,
|
StyleVariables,
|
||||||
|
unsafeCSSVarV2,
|
||||||
} from '@blocksuite/affine-shared/theme';
|
} from '@blocksuite/affine-shared/theme';
|
||||||
|
export { type AffineTextAttributes } from '@blocksuite/affine-shared/types';
|
||||||
export {
|
export {
|
||||||
createButtonPopper,
|
createButtonPopper,
|
||||||
createDefaultDoc,
|
createDefaultDoc,
|
||||||
|
createSignalFromObservable,
|
||||||
findNoteBlockModel,
|
findNoteBlockModel,
|
||||||
|
getLastNoteBlock,
|
||||||
isInsideEdgelessEditor,
|
isInsideEdgelessEditor,
|
||||||
isInsidePageEditor,
|
isInsidePageEditor,
|
||||||
matchFlavours,
|
matchFlavours,
|
||||||
@@ -136,6 +145,9 @@ export {
|
|||||||
once,
|
once,
|
||||||
openFileOrFiles,
|
openFileOrFiles,
|
||||||
printToPdf,
|
printToPdf,
|
||||||
|
referenceToNode,
|
||||||
|
type Signal,
|
||||||
|
SpecProvider,
|
||||||
} from '@blocksuite/affine-shared/utils';
|
} from '@blocksuite/affine-shared/utils';
|
||||||
export type { DragBlockPayload } from '@blocksuite/affine-widget-drag-handle';
|
export type { DragBlockPayload } from '@blocksuite/affine-widget-drag-handle';
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
"@affine/i18n": "workspace:*",
|
"@affine/i18n": "workspace:*",
|
||||||
"@affine/nbstore": "workspace:*",
|
"@affine/nbstore": "workspace:*",
|
||||||
"@blocksuite/affine": "workspace:*",
|
"@blocksuite/affine": "workspace:*",
|
||||||
"@blocksuite/affine-components": "workspace:*",
|
|
||||||
"@blocksuite/icons": "2.2.2",
|
"@blocksuite/icons": "2.2.2",
|
||||||
"@capacitor/app": "^6.0.2",
|
"@capacitor/app": "^6.0.2",
|
||||||
"@capacitor/browser": "^6.0.4",
|
"@capacitor/browser": "^6.0.4",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { NavigationGestureService } from '@affine/core/mobile/modules/navigation-gesture';
|
import { NavigationGestureService } from '@affine/core/mobile/modules/navigation-gesture';
|
||||||
import { onMenuOpen } from '@blocksuite/affine-components/context-menu';
|
import { onMenuOpen } from '@blocksuite/affine/blocks';
|
||||||
import { useService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { type PropsWithChildren, useCallback, useEffect, useRef } from 'react';
|
import { type PropsWithChildren, useCallback, useEffect, useRef } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
{ "path": "../../i18n" },
|
{ "path": "../../i18n" },
|
||||||
{ "path": "../../../common/nbstore" },
|
{ "path": "../../../common/nbstore" },
|
||||||
{ "path": "../../../../blocksuite/affine/all" },
|
{ "path": "../../../../blocksuite/affine/all" },
|
||||||
{ "path": "../../../../blocksuite/affine/components" },
|
|
||||||
{ "path": "../../../common/infra" },
|
{ "path": "../../../common/infra" },
|
||||||
{ "path": "../../native" }
|
{ "path": "../../native" }
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -18,8 +18,6 @@
|
|||||||
"@affine/templates": "workspace:*",
|
"@affine/templates": "workspace:*",
|
||||||
"@affine/track": "workspace:*",
|
"@affine/track": "workspace:*",
|
||||||
"@blocksuite/affine": "workspace:*",
|
"@blocksuite/affine": "workspace:*",
|
||||||
"@blocksuite/affine-components": "workspace:*",
|
|
||||||
"@blocksuite/affine-shared": "workspace:*",
|
|
||||||
"@blocksuite/icons": "2.2.2",
|
"@blocksuite/icons": "2.2.2",
|
||||||
"@capacitor/app": "^6.0.2",
|
"@capacitor/app": "^6.0.2",
|
||||||
"@capacitor/browser": "^6.0.4",
|
"@capacitor/browser": "^6.0.4",
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
import { stopPropagation } from '@affine/core/utils';
|
import { stopPropagation } from '@affine/core/utils';
|
||||||
import type { EditorHost } from '@blocksuite/affine/block-std';
|
import type { EditorHost } from '@blocksuite/affine/block-std';
|
||||||
import { type AIError, openFileOrFiles } from '@blocksuite/affine/blocks';
|
import {
|
||||||
|
type AIError,
|
||||||
|
openFileOrFiles,
|
||||||
|
unsafeCSSVarV2,
|
||||||
|
} from '@blocksuite/affine/blocks';
|
||||||
import {
|
import {
|
||||||
assertExists,
|
assertExists,
|
||||||
SignalWatcher,
|
SignalWatcher,
|
||||||
WithDisposable,
|
WithDisposable,
|
||||||
} from '@blocksuite/affine/global/utils';
|
} from '@blocksuite/affine/global/utils';
|
||||||
import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
|
|
||||||
import { ImageIcon, PublishIcon } from '@blocksuite/icons/lit';
|
import { ImageIcon, PublishIcon } 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';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ShadowlessElement } from '@blocksuite/affine/block-std';
|
import { ShadowlessElement } from '@blocksuite/affine/block-std';
|
||||||
|
import { getAttachmentFileIcons } from '@blocksuite/affine/blocks';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/utils';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/utils';
|
||||||
import { getAttachmentFileIcons } from '@blocksuite/affine-components/icons';
|
|
||||||
import { html } from 'lit';
|
import { html } from 'lit';
|
||||||
import { property } from 'lit/decorators.js';
|
import { property } from 'lit/decorators.js';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import { FetchUtils } from '@blocksuite/affine/blocks';
|
||||||
import { assertExists } from '@blocksuite/affine/global/utils';
|
import { assertExists } from '@blocksuite/affine/global/utils';
|
||||||
import { FetchUtils } from '@blocksuite/affine-shared/adapters';
|
|
||||||
|
|
||||||
export async function fetchImageToFile(
|
export async function fetchImageToFile(
|
||||||
url: string,
|
url: string,
|
||||||
|
|||||||
+2
-35
@@ -1,8 +1,4 @@
|
|||||||
import {
|
import { type DocMode, getLastNoteBlock } from '@blocksuite/affine/blocks';
|
||||||
type DocMode,
|
|
||||||
type NoteBlockModel,
|
|
||||||
NoteDisplayMode,
|
|
||||||
} from '@blocksuite/affine/blocks';
|
|
||||||
import { Slot } from '@blocksuite/affine/global/utils';
|
import { Slot } from '@blocksuite/affine/global/utils';
|
||||||
import type {
|
import type {
|
||||||
AffineEditorContainer,
|
AffineEditorContainer,
|
||||||
@@ -10,7 +6,7 @@ import type {
|
|||||||
EdgelessEditor,
|
EdgelessEditor,
|
||||||
PageEditor,
|
PageEditor,
|
||||||
} from '@blocksuite/affine/presets';
|
} from '@blocksuite/affine/presets';
|
||||||
import { type BlockModel, type Store } from '@blocksuite/affine/store';
|
import { type Store } from '@blocksuite/affine/store';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type React from 'react';
|
import type React from 'react';
|
||||||
import {
|
import {
|
||||||
@@ -189,32 +185,3 @@ export const BlocksuiteEditorContainer = forwardRef<
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// copy from '@blocksuite/affine-shared/utils'
|
|
||||||
export function getLastNoteBlock(doc: Store) {
|
|
||||||
let note: NoteBlockModel | null = null;
|
|
||||||
if (!doc.root) return null;
|
|
||||||
const { children } = doc.root;
|
|
||||||
for (let i = children.length - 1; i >= 0; i--) {
|
|
||||||
const child = children[i];
|
|
||||||
if (
|
|
||||||
matchFlavours(child, ['affine:note']) &&
|
|
||||||
child.displayMode !== NoteDisplayMode.EdgelessOnly
|
|
||||||
) {
|
|
||||||
note = child as NoteBlockModel;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return note;
|
|
||||||
}
|
|
||||||
export function matchFlavours<Key extends (keyof BlockSuite.BlockModels)[]>(
|
|
||||||
model: BlockModel | null,
|
|
||||||
expected: Key
|
|
||||||
): model is BlockSuite.BlockModels[Key[number]] {
|
|
||||||
return (
|
|
||||||
!!model &&
|
|
||||||
expected.some(
|
|
||||||
key => (model.flavour as keyof BlockSuite.BlockModels) === key
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ import type {
|
|||||||
DatabaseBlockModel,
|
DatabaseBlockModel,
|
||||||
MenuOptions,
|
MenuOptions,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import { menu } from '@blocksuite/affine-components/context-menu';
|
import { menu } from '@blocksuite/affine/blocks';
|
||||||
import { LinkIcon } from '@blocksuite/icons/lit';
|
import { LinkIcon } from '@blocksuite/icons/lit';
|
||||||
import type { FrameworkProvider } from '@toeverything/infra';
|
import type { FrameworkProvider } from '@toeverything/infra';
|
||||||
|
|
||||||
|
|||||||
+4
-6
@@ -18,6 +18,7 @@ import type {
|
|||||||
DocDisplayMetaExtension,
|
DocDisplayMetaExtension,
|
||||||
DocDisplayMetaParams,
|
DocDisplayMetaParams,
|
||||||
RootBlockConfig,
|
RootBlockConfig,
|
||||||
|
Signal,
|
||||||
SpecBuilder,
|
SpecBuilder,
|
||||||
TelemetryEventMap,
|
TelemetryEventMap,
|
||||||
ThemeExtension,
|
ThemeExtension,
|
||||||
@@ -25,21 +26,18 @@ import type {
|
|||||||
import {
|
import {
|
||||||
CodeBlockSpec,
|
CodeBlockSpec,
|
||||||
ColorScheme,
|
ColorScheme,
|
||||||
|
createSignalFromObservable,
|
||||||
DocDisplayMetaProvider,
|
DocDisplayMetaProvider,
|
||||||
EditorSettingExtension,
|
EditorSettingExtension,
|
||||||
ImageBlockSpec,
|
ImageBlockSpec,
|
||||||
ParagraphBlockSpec,
|
ParagraphBlockSpec,
|
||||||
|
referenceToNode,
|
||||||
|
SpecProvider,
|
||||||
TelemetryProvider,
|
TelemetryProvider,
|
||||||
ThemeExtensionIdentifier,
|
ThemeExtensionIdentifier,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import type { Container } from '@blocksuite/affine/global/di';
|
import type { Container } from '@blocksuite/affine/global/di';
|
||||||
import type { ExtensionType } from '@blocksuite/affine/store';
|
import type { ExtensionType } from '@blocksuite/affine/store';
|
||||||
import {
|
|
||||||
createSignalFromObservable,
|
|
||||||
referenceToNode,
|
|
||||||
type Signal,
|
|
||||||
SpecProvider,
|
|
||||||
} from '@blocksuite/affine-shared/utils';
|
|
||||||
import { LinkedPageIcon, PageIcon } from '@blocksuite/icons/lit';
|
import { LinkedPageIcon, PageIcon } from '@blocksuite/icons/lit';
|
||||||
import { type FrameworkProvider } from '@toeverything/infra';
|
import { type FrameworkProvider } from '@toeverything/infra';
|
||||||
import type { TemplateResult } from 'lit';
|
import type { TemplateResult } from 'lit';
|
||||||
|
|||||||
+1
-2
@@ -12,8 +12,7 @@ import type {
|
|||||||
GfxBlockElementModel,
|
GfxBlockElementModel,
|
||||||
GfxPrimitiveElementModel,
|
GfxPrimitiveElementModel,
|
||||||
} from '@blocksuite/affine/block-std/gfx';
|
} from '@blocksuite/affine/block-std/gfx';
|
||||||
import { type MenuContext } from '@blocksuite/affine/blocks';
|
import type { MenuContext, MenuItemGroup } from '@blocksuite/affine/blocks';
|
||||||
import type { MenuItemGroup } from '@blocksuite/affine-components/toolbar';
|
|
||||||
import { LinkIcon } from '@blocksuite/icons/lit';
|
import { LinkIcon } from '@blocksuite/icons/lit';
|
||||||
import type { FrameworkProvider } from '@toeverything/infra';
|
import type { FrameworkProvider } from '@toeverything/infra';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import type { AffineTextAttributes } from '@blocksuite/affine/blocks';
|
||||||
import type { DeltaInsert } from '@blocksuite/affine/inline';
|
import type { DeltaInsert } from '@blocksuite/affine/inline';
|
||||||
import { Text, type Workspace } from '@blocksuite/affine/store';
|
import { Text, type Workspace } from '@blocksuite/affine/store';
|
||||||
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
export function useReferenceLinkHelper(docCollection: Workspace) {
|
export function useReferenceLinkHelper(docCollection: Workspace) {
|
||||||
|
|||||||
+1
-1
@@ -15,13 +15,13 @@ import type {
|
|||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import {
|
import {
|
||||||
ColorScheme,
|
ColorScheme,
|
||||||
|
createSignalFromObservable,
|
||||||
SpecProvider,
|
SpecProvider,
|
||||||
ThemeExtensionIdentifier,
|
ThemeExtensionIdentifier,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import type { Container } from '@blocksuite/affine/global/di';
|
import type { Container } from '@blocksuite/affine/global/di';
|
||||||
import { Bound } from '@blocksuite/affine/global/utils';
|
import { Bound } from '@blocksuite/affine/global/utils';
|
||||||
import type { Block, Store } from '@blocksuite/affine/store';
|
import type { Block, Store } from '@blocksuite/affine/store';
|
||||||
import { createSignalFromObservable } from '@blocksuite/affine-shared/utils';
|
|
||||||
import type { Signal } from '@preact/signals-core';
|
import type { Signal } from '@preact/signals-core';
|
||||||
import type { FrameworkProvider } from '@toeverything/infra';
|
import type { FrameworkProvider } from '@toeverything/infra';
|
||||||
import { useFramework } from '@toeverything/infra';
|
import { useFramework } from '@toeverything/infra';
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import { AINetworkSearchService } from '@affine/core/modules/ai-button/services/
|
|||||||
import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
|
import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
|
||||||
import { WorkspaceService } from '@affine/core/modules/workspace';
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import {
|
import {
|
||||||
|
createSignalFromObservable,
|
||||||
DocModeProvider,
|
DocModeProvider,
|
||||||
RefNodeSlotsProvider,
|
RefNodeSlotsProvider,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import type { AffineEditorContainer } from '@blocksuite/affine/presets';
|
import type { AffineEditorContainer } from '@blocksuite/affine/presets';
|
||||||
import { createSignalFromObservable } from '@blocksuite/affine-shared/utils';
|
|
||||||
import { useFramework } from '@toeverything/infra';
|
import { useFramework } from '@toeverything/infra';
|
||||||
import { forwardRef, useEffect, useRef } from 'react';
|
import { forwardRef, useEffect, useRef } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
createSignalFromObservable,
|
createSignalFromObservable,
|
||||||
type Signal,
|
type Signal,
|
||||||
} from '@blocksuite/affine-shared/utils';
|
} from '@blocksuite/affine/blocks';
|
||||||
import { LiveData, Service } from '@toeverything/infra';
|
import { LiveData, Service } from '@toeverything/infra';
|
||||||
|
|
||||||
import type { FeatureFlagService } from '../../feature-flag';
|
import type { FeatureFlagService } from '../../feature-flag';
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import track from '@affine/track';
|
|||||||
import type { EditorHost } from '@blocksuite/affine/block-std';
|
import type { EditorHost } from '@blocksuite/affine/block-std';
|
||||||
import {
|
import {
|
||||||
type AffineInlineEditor,
|
type AffineInlineEditor,
|
||||||
|
createSignalFromObservable,
|
||||||
type DocMode,
|
type DocMode,
|
||||||
type LinkedMenuGroup,
|
type LinkedMenuGroup,
|
||||||
type LinkedMenuItem,
|
type LinkedMenuItem,
|
||||||
@@ -12,7 +13,6 @@ import {
|
|||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import type { DocMeta } from '@blocksuite/affine/store';
|
import type { DocMeta } from '@blocksuite/affine/store';
|
||||||
import { Text } from '@blocksuite/affine/store';
|
import { Text } from '@blocksuite/affine/store';
|
||||||
import { createSignalFromObservable } from '@blocksuite/affine-shared/utils';
|
|
||||||
import {
|
import {
|
||||||
DateTimeIcon,
|
DateTimeIcon,
|
||||||
NewXxxEdgelessIcon,
|
NewXxxEdgelessIcon,
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
import { DebugLogger } from '@affine/debug';
|
import { DebugLogger } from '@affine/debug';
|
||||||
import { Unreachable } from '@affine/env/constant';
|
import { Unreachable } from '@affine/env/constant';
|
||||||
import { type DocMode, replaceIdMiddleware } from '@blocksuite/affine/blocks';
|
import {
|
||||||
|
type AffineTextAttributes,
|
||||||
|
type DocMode,
|
||||||
|
replaceIdMiddleware,
|
||||||
|
} from '@blocksuite/affine/blocks';
|
||||||
import type { DeltaInsert } from '@blocksuite/affine/inline';
|
import type { DeltaInsert } from '@blocksuite/affine/inline';
|
||||||
import { Slice, Text, Transformer } from '@blocksuite/affine/store';
|
import { Slice, Text, Transformer } from '@blocksuite/affine/store';
|
||||||
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
|
|
||||||
import { LiveData, ObjectPool, Service } from '@toeverything/infra';
|
import { LiveData, ObjectPool, Service } from '@toeverything/infra';
|
||||||
import { omitBy } from 'lodash-es';
|
import { omitBy } from 'lodash-es';
|
||||||
import { combineLatest, map } from 'rxjs';
|
import { combineLatest, map } from 'rxjs';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import type {
|
import type {
|
||||||
|
AffineTextAttributes,
|
||||||
AttachmentBlockModel,
|
AttachmentBlockModel,
|
||||||
BookmarkBlockModel,
|
BookmarkBlockModel,
|
||||||
EmbedBlockModel,
|
EmbedBlockModel,
|
||||||
@@ -18,7 +19,6 @@ import {
|
|||||||
type TransformerMiddleware,
|
type TransformerMiddleware,
|
||||||
type YBlock,
|
type YBlock,
|
||||||
} from '@blocksuite/affine/store';
|
} from '@blocksuite/affine/store';
|
||||||
import type { AffineTextAttributes } from '@blocksuite/affine-shared/types';
|
|
||||||
import type { DeltaInsert } from '@blocksuite/inline';
|
import type { DeltaInsert } from '@blocksuite/inline';
|
||||||
import { Document } from '@toeverything/infra';
|
import { Document } from '@toeverything/infra';
|
||||||
import { toHexString } from 'lib0/buffer.js';
|
import { toHexString } from 'lib0/buffer.js';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import type { DeepPartial } from '@blocksuite/affine/global/utils';
|
|
||||||
import {
|
import {
|
||||||
createSignalFromObservable,
|
createSignalFromObservable,
|
||||||
type Signal,
|
type Signal,
|
||||||
} from '@blocksuite/affine-shared/utils';
|
} from '@blocksuite/affine/blocks';
|
||||||
|
import type { DeepPartial } from '@blocksuite/affine/global/utils';
|
||||||
import { Entity, LiveData } from '@toeverything/infra';
|
import { Entity, LiveData } from '@toeverything/infra';
|
||||||
import { isObject, merge } from 'lodash-es';
|
import { isObject, merge } from 'lodash-es';
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
@@ -14,7 +14,7 @@ import { EditorSettingSchema } from '../schema';
|
|||||||
type SettingItem<T> = {
|
type SettingItem<T> = {
|
||||||
readonly value: T;
|
readonly value: T;
|
||||||
set: (value: T) => void;
|
set: (value: T) => void;
|
||||||
// eslint-disable-next-line rxjs/finnish
|
|
||||||
$: LiveData<T>;
|
$: LiveData<T>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { GeneralSettingSchema } from '@blocksuite/affine-shared/services';
|
import { GeneralSettingSchema } from '@blocksuite/affine/blocks';
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
|
|
||||||
export const BSEditorSettingSchema = GeneralSettingSchema;
|
export const BSEditorSettingSchema = GeneralSettingSchema;
|
||||||
|
|||||||
@@ -16,11 +16,6 @@
|
|||||||
{ "path": "../../common/nbstore" },
|
{ "path": "../../common/nbstore" },
|
||||||
{ "path": "../track" },
|
{ "path": "../track" },
|
||||||
{ "path": "../../../blocksuite/affine/all" },
|
{ "path": "../../../blocksuite/affine/all" },
|
||||||
{ "path": "../../../blocksuite/affine/components" },
|
|
||||||
{ "path": "../../../blocksuite/affine/shared" },
|
|
||||||
{ "path": "../../../blocksuite/framework/block-std" },
|
|
||||||
{ "path": "../../../blocksuite/framework/global" },
|
|
||||||
{ "path": "../../../blocksuite/framework/store" },
|
|
||||||
{ "path": "../../common/infra" }
|
{ "path": "../../common/infra" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -540,7 +540,6 @@ export const PackageList = [
|
|||||||
'packages/frontend/i18n',
|
'packages/frontend/i18n',
|
||||||
'packages/common/nbstore',
|
'packages/common/nbstore',
|
||||||
'blocksuite/affine/all',
|
'blocksuite/affine/all',
|
||||||
'blocksuite/affine/components',
|
|
||||||
'packages/common/infra',
|
'packages/common/infra',
|
||||||
'packages/frontend/native',
|
'packages/frontend/native',
|
||||||
],
|
],
|
||||||
@@ -593,11 +592,6 @@ export const PackageList = [
|
|||||||
'packages/frontend/templates',
|
'packages/frontend/templates',
|
||||||
'packages/frontend/track',
|
'packages/frontend/track',
|
||||||
'blocksuite/affine/all',
|
'blocksuite/affine/all',
|
||||||
'blocksuite/affine/components',
|
|
||||||
'blocksuite/affine/shared',
|
|
||||||
'blocksuite/framework/block-std',
|
|
||||||
'blocksuite/framework/global',
|
|
||||||
'blocksuite/framework/store',
|
|
||||||
'packages/common/infra',
|
'packages/common/infra',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -360,8 +360,6 @@ __metadata:
|
|||||||
"@affine/templates": "workspace:*"
|
"@affine/templates": "workspace:*"
|
||||||
"@affine/track": "workspace:*"
|
"@affine/track": "workspace:*"
|
||||||
"@blocksuite/affine": "workspace:*"
|
"@blocksuite/affine": "workspace:*"
|
||||||
"@blocksuite/affine-components": "workspace:*"
|
|
||||||
"@blocksuite/affine-shared": "workspace:*"
|
|
||||||
"@blocksuite/icons": "npm:2.2.2"
|
"@blocksuite/icons": "npm:2.2.2"
|
||||||
"@capacitor/app": "npm:^6.0.2"
|
"@capacitor/app": "npm:^6.0.2"
|
||||||
"@capacitor/browser": "npm:^6.0.4"
|
"@capacitor/browser": "npm:^6.0.4"
|
||||||
@@ -605,7 +603,6 @@ __metadata:
|
|||||||
"@affine/native": "workspace:*"
|
"@affine/native": "workspace:*"
|
||||||
"@affine/nbstore": "workspace:*"
|
"@affine/nbstore": "workspace:*"
|
||||||
"@blocksuite/affine": "workspace:*"
|
"@blocksuite/affine": "workspace:*"
|
||||||
"@blocksuite/affine-components": "workspace:*"
|
|
||||||
"@blocksuite/icons": "npm:2.2.2"
|
"@blocksuite/icons": "npm:2.2.2"
|
||||||
"@capacitor/app": "npm:^6.0.2"
|
"@capacitor/app": "npm:^6.0.2"
|
||||||
"@capacitor/browser": "npm:^6.0.4"
|
"@capacitor/browser": "npm:^6.0.4"
|
||||||
|
|||||||
Reference in New Issue
Block a user