refactor(core): move infra modules to core (#9207)
This commit is contained in:
@@ -4,44 +4,7 @@ export * from './blocksuite';
|
|||||||
export * from './framework';
|
export * from './framework';
|
||||||
export * from './initialization';
|
export * from './initialization';
|
||||||
export * from './livedata';
|
export * from './livedata';
|
||||||
export * from './modules/db';
|
|
||||||
export * from './modules/doc';
|
|
||||||
export * from './modules/feature-flag';
|
|
||||||
export * from './modules/global-context';
|
|
||||||
export * from './modules/lifecycle';
|
|
||||||
export * from './modules/storage';
|
|
||||||
export * from './modules/workspace';
|
|
||||||
export * from './orm';
|
export * from './orm';
|
||||||
export * from './storage';
|
export * from './storage';
|
||||||
export * from './sync';
|
export * from './sync';
|
||||||
export * from './utils';
|
export * from './utils';
|
||||||
|
|
||||||
import type { Framework } from './framework';
|
|
||||||
import { configureWorkspaceDBModule } from './modules/db';
|
|
||||||
import { configureDocModule } from './modules/doc';
|
|
||||||
import { configureFeatureFlagModule } from './modules/feature-flag';
|
|
||||||
import { configureGlobalContextModule } from './modules/global-context';
|
|
||||||
import { configureLifecycleModule } from './modules/lifecycle';
|
|
||||||
import {
|
|
||||||
configureGlobalStorageModule,
|
|
||||||
configureTestingGlobalStorage,
|
|
||||||
} from './modules/storage';
|
|
||||||
import {
|
|
||||||
configureTestingWorkspaceProvider,
|
|
||||||
configureWorkspaceModule,
|
|
||||||
} from './modules/workspace';
|
|
||||||
|
|
||||||
export function configureInfraModules(framework: Framework) {
|
|
||||||
configureWorkspaceModule(framework);
|
|
||||||
configureDocModule(framework);
|
|
||||||
configureWorkspaceDBModule(framework);
|
|
||||||
configureGlobalStorageModule(framework);
|
|
||||||
configureGlobalContextModule(framework);
|
|
||||||
configureLifecycleModule(framework);
|
|
||||||
configureFeatureFlagModule(framework);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function configureTestingInfraModules(framework: Framework) {
|
|
||||||
configureTestingGlobalStorage(framework);
|
|
||||||
configureTestingWorkspaceProvider(framework);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
import { Entity } from '../../../framework';
|
|
||||||
import type { Table as OrmTable, TableSchemaBuilder } from '../../../orm';
|
|
||||||
import type { WorkspaceService } from '../../workspace';
|
|
||||||
|
|
||||||
export class WorkspaceDBTable<
|
|
||||||
Schema extends TableSchemaBuilder,
|
|
||||||
> extends Entity<{
|
|
||||||
table: OrmTable<Schema>;
|
|
||||||
storageDocId: string;
|
|
||||||
}> {
|
|
||||||
readonly table = this.props.table;
|
|
||||||
|
|
||||||
constructor(private readonly workspaceService: WorkspaceService) {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
isSyncing$ = this.workspaceService.workspace.engine.doc
|
|
||||||
.docState$(this.props.storageDocId)
|
|
||||||
.map(docState => docState.syncing);
|
|
||||||
|
|
||||||
isLoading$ = this.workspaceService.workspace.engine.doc
|
|
||||||
.docState$(this.props.storageDocId)
|
|
||||||
.map(docState => docState.loading);
|
|
||||||
|
|
||||||
create = this.table.create.bind(this.table);
|
|
||||||
update = this.table.update.bind(this.table);
|
|
||||||
get = this.table.get.bind(this.table);
|
|
||||||
// eslint-disable-next-line rxjs/finnish
|
|
||||||
get$ = this.table.get$.bind(this.table);
|
|
||||||
find = this.table.find.bind(this.table);
|
|
||||||
// eslint-disable-next-line rxjs/finnish
|
|
||||||
find$ = this.table.find$.bind(this.table);
|
|
||||||
keys = this.table.keys.bind(this.table);
|
|
||||||
delete = this.table.delete.bind(this.table);
|
|
||||||
}
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
export {
|
|
||||||
GlobalCache,
|
|
||||||
GlobalSessionState,
|
|
||||||
GlobalState,
|
|
||||||
} from './providers/global';
|
|
||||||
export {
|
|
||||||
GlobalCacheService,
|
|
||||||
GlobalSessionStateService,
|
|
||||||
GlobalStateService,
|
|
||||||
} from './services/global';
|
|
||||||
|
|
||||||
import type { Framework } from '../../framework';
|
|
||||||
import { MemoryMemento } from '../../storage';
|
|
||||||
import {
|
|
||||||
GlobalCache,
|
|
||||||
GlobalSessionState,
|
|
||||||
GlobalState,
|
|
||||||
} from './providers/global';
|
|
||||||
import {
|
|
||||||
GlobalCacheService,
|
|
||||||
GlobalSessionStateService,
|
|
||||||
GlobalStateService,
|
|
||||||
} from './services/global';
|
|
||||||
|
|
||||||
export const configureGlobalStorageModule = (framework: Framework) => {
|
|
||||||
framework.service(GlobalStateService, [GlobalState]);
|
|
||||||
framework.service(GlobalCacheService, [GlobalCache]);
|
|
||||||
framework.service(GlobalSessionStateService, [GlobalSessionState]);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const configureTestingGlobalStorage = (framework: Framework) => {
|
|
||||||
framework.impl(GlobalCache, MemoryMemento);
|
|
||||||
framework.impl(GlobalState, MemoryMemento);
|
|
||||||
framework.impl(GlobalSessionState, MemoryMemento);
|
|
||||||
};
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
import { describe, expect, test } from 'vitest';
|
|
||||||
|
|
||||||
import { Framework } from '../../../framework';
|
|
||||||
import { configureTestingGlobalStorage } from '../../storage';
|
|
||||||
import {
|
|
||||||
configureTestingWorkspaceProvider,
|
|
||||||
configureWorkspaceModule,
|
|
||||||
Workspace,
|
|
||||||
WorkspacesService,
|
|
||||||
} from '..';
|
|
||||||
|
|
||||||
describe('Workspace System', () => {
|
|
||||||
test('create workspace', async () => {
|
|
||||||
const framework = new Framework();
|
|
||||||
configureTestingGlobalStorage(framework);
|
|
||||||
configureWorkspaceModule(framework);
|
|
||||||
configureTestingWorkspaceProvider(framework);
|
|
||||||
|
|
||||||
const provider = framework.provider();
|
|
||||||
const workspaceService = provider.get(WorkspacesService);
|
|
||||||
expect(workspaceService.list.workspaces$.value.length).toBe(0);
|
|
||||||
|
|
||||||
const workspace = workspaceService.open({
|
|
||||||
metadata: await workspaceService.create('local'),
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(workspace.workspace).toBeInstanceOf(Workspace);
|
|
||||||
|
|
||||||
expect(workspaceService.list.workspaces$.value.length).toBe(1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
import { DocCollection, nanoid } from '@blocksuite/affine/store';
|
|
||||||
import { map } from 'rxjs';
|
|
||||||
import { applyUpdate, encodeStateAsUpdate } from 'yjs';
|
|
||||||
|
|
||||||
import { Service } from '../../../framework';
|
|
||||||
import { LiveData } from '../../../livedata';
|
|
||||||
import { wrapMemento } from '../../../storage';
|
|
||||||
import {
|
|
||||||
type BlobStorage,
|
|
||||||
type DocStorage,
|
|
||||||
MemoryDocStorage,
|
|
||||||
} from '../../../sync';
|
|
||||||
import { MemoryBlobStorage } from '../../../sync/blob/blob';
|
|
||||||
import type { GlobalState } from '../../storage';
|
|
||||||
import type { WorkspaceProfileInfo } from '../entities/profile';
|
|
||||||
import { getAFFiNEWorkspaceSchema } from '../global-schema';
|
|
||||||
import type { WorkspaceMetadata } from '../metadata';
|
|
||||||
import type {
|
|
||||||
WorkspaceEngineProvider,
|
|
||||||
WorkspaceFlavourProvider,
|
|
||||||
WorkspaceFlavoursProvider,
|
|
||||||
} from '../providers/flavour';
|
|
||||||
|
|
||||||
class TestingWorkspaceLocalProvider implements WorkspaceFlavourProvider {
|
|
||||||
flavour = 'local';
|
|
||||||
|
|
||||||
store = wrapMemento(this.globalStore, 'testing/');
|
|
||||||
workspaceListStore = wrapMemento(this.store, 'workspaces/');
|
|
||||||
docStorage = new MemoryDocStorage(wrapMemento(this.store, 'docs/'));
|
|
||||||
|
|
||||||
constructor(private readonly globalStore: GlobalState) {}
|
|
||||||
|
|
||||||
async deleteWorkspace(id: string): Promise<void> {
|
|
||||||
const list = this.workspaceListStore.get<WorkspaceMetadata[]>('list') ?? [];
|
|
||||||
const newList = list.filter(meta => meta.id !== id);
|
|
||||||
this.workspaceListStore.set('list', newList);
|
|
||||||
}
|
|
||||||
async createWorkspace(
|
|
||||||
initial: (
|
|
||||||
docCollection: DocCollection,
|
|
||||||
blobStorage: BlobStorage,
|
|
||||||
docStorage: DocStorage
|
|
||||||
) => Promise<void>
|
|
||||||
): Promise<WorkspaceMetadata> {
|
|
||||||
const id = nanoid();
|
|
||||||
const meta = { id, flavour: 'local' };
|
|
||||||
|
|
||||||
const blobStorage = new MemoryBlobStorage(
|
|
||||||
wrapMemento(this.store, id + '/blobs/')
|
|
||||||
);
|
|
||||||
|
|
||||||
const docCollection = new DocCollection({
|
|
||||||
id: id,
|
|
||||||
idGenerator: () => nanoid(),
|
|
||||||
schema: getAFFiNEWorkspaceSchema(),
|
|
||||||
blobSources: {
|
|
||||||
main: blobStorage,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// apply initial state
|
|
||||||
await initial(docCollection, blobStorage, this.docStorage);
|
|
||||||
|
|
||||||
// save workspace to storage
|
|
||||||
await this.docStorage.doc.set(id, encodeStateAsUpdate(docCollection.doc));
|
|
||||||
for (const subdocs of docCollection.doc.getSubdocs()) {
|
|
||||||
await this.docStorage.doc.set(subdocs.guid, encodeStateAsUpdate(subdocs));
|
|
||||||
}
|
|
||||||
|
|
||||||
const list = this.workspaceListStore.get<WorkspaceMetadata[]>('list') ?? [];
|
|
||||||
this.workspaceListStore.set('list', [...list, meta]);
|
|
||||||
|
|
||||||
docCollection.dispose();
|
|
||||||
|
|
||||||
return { id, flavour: 'local' };
|
|
||||||
}
|
|
||||||
workspaces$ = LiveData.from<WorkspaceMetadata[]>(
|
|
||||||
this.workspaceListStore
|
|
||||||
.watch<WorkspaceMetadata[]>('list')
|
|
||||||
.pipe(map(m => m ?? [])),
|
|
||||||
[]
|
|
||||||
);
|
|
||||||
async getWorkspaceProfile(
|
|
||||||
id: string
|
|
||||||
): Promise<WorkspaceProfileInfo | undefined> {
|
|
||||||
const data = await this.docStorage.doc.get(id);
|
|
||||||
|
|
||||||
if (!data) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const bs = new DocCollection({
|
|
||||||
id,
|
|
||||||
schema: getAFFiNEWorkspaceSchema(),
|
|
||||||
});
|
|
||||||
|
|
||||||
applyUpdate(bs.doc, data);
|
|
||||||
|
|
||||||
bs.dispose();
|
|
||||||
|
|
||||||
return {
|
|
||||||
name: bs.meta.name,
|
|
||||||
avatar: bs.meta.avatar,
|
|
||||||
isOwner: true,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
getWorkspaceBlob(id: string, blob: string): Promise<Blob | null> {
|
|
||||||
return new MemoryBlobStorage(wrapMemento(this.store, id + '/blobs/')).get(
|
|
||||||
blob
|
|
||||||
);
|
|
||||||
}
|
|
||||||
getEngineProvider(workspaceId: string): WorkspaceEngineProvider {
|
|
||||||
return {
|
|
||||||
getDocStorage: () => {
|
|
||||||
return this.docStorage;
|
|
||||||
},
|
|
||||||
getAwarenessConnections() {
|
|
||||||
return [];
|
|
||||||
},
|
|
||||||
getDocServer() {
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
getLocalBlobStorage: () => {
|
|
||||||
return new MemoryBlobStorage(
|
|
||||||
wrapMemento(this.store, workspaceId + '/blobs/')
|
|
||||||
);
|
|
||||||
},
|
|
||||||
getRemoteBlobStorages() {
|
|
||||||
return [];
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class TestingWorkspaceFlavoursProvider
|
|
||||||
extends Service
|
|
||||||
implements WorkspaceFlavoursProvider
|
|
||||||
{
|
|
||||||
constructor(private readonly globalStore: GlobalState) {
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
workspaceFlavours$ = new LiveData<WorkspaceFlavourProvider[]>([
|
|
||||||
new TestingWorkspaceLocalProvider(this.globalStore),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
@@ -4,6 +4,7 @@ import { configureMobileModules } from '@affine/core/mobile/modules';
|
|||||||
import { router } from '@affine/core/mobile/router';
|
import { router } from '@affine/core/mobile/router';
|
||||||
import { configureCommonModules } from '@affine/core/modules';
|
import { configureCommonModules } from '@affine/core/modules';
|
||||||
import { I18nProvider } from '@affine/core/modules/i18n';
|
import { I18nProvider } from '@affine/core/modules/i18n';
|
||||||
|
import { LifecycleService } from '@affine/core/modules/lifecycle';
|
||||||
import { configureLocalStorageStateStorageImpls } from '@affine/core/modules/storage';
|
import { configureLocalStorageStateStorageImpls } from '@affine/core/modules/storage';
|
||||||
import { configureIndexedDBUserspaceStorageProvider } from '@affine/core/modules/userspace';
|
import { configureIndexedDBUserspaceStorageProvider } from '@affine/core/modules/userspace';
|
||||||
import { configureBrowserWorkbenchModule } from '@affine/core/modules/workbench';
|
import { configureBrowserWorkbenchModule } from '@affine/core/modules/workbench';
|
||||||
@@ -11,12 +12,7 @@ import {
|
|||||||
configureBrowserWorkspaceFlavours,
|
configureBrowserWorkspaceFlavours,
|
||||||
configureIndexedDBWorkspaceEngineStorageProvider,
|
configureIndexedDBWorkspaceEngineStorageProvider,
|
||||||
} from '@affine/core/modules/workspace-engine';
|
} from '@affine/core/modules/workspace-engine';
|
||||||
import {
|
import { Framework, FrameworkRoot, getCurrentStore } from '@toeverything/infra';
|
||||||
Framework,
|
|
||||||
FrameworkRoot,
|
|
||||||
getCurrentStore,
|
|
||||||
LifecycleService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import { RouterProvider } from 'react-router-dom';
|
import { RouterProvider } from 'react-router-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,15 @@ import {
|
|||||||
DesktopApiService,
|
DesktopApiService,
|
||||||
} from '@affine/core/modules/desktop-api';
|
} from '@affine/core/modules/desktop-api';
|
||||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import {
|
import {
|
||||||
configureSpellCheckSettingModule,
|
configureSpellCheckSettingModule,
|
||||||
EditorSettingService,
|
EditorSettingService,
|
||||||
} from '@affine/core/modules/editor-setting';
|
} from '@affine/core/modules/editor-setting';
|
||||||
import { configureFindInPageModule } from '@affine/core/modules/find-in-page';
|
import { configureFindInPageModule } from '@affine/core/modules/find-in-page';
|
||||||
|
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||||
import { I18nProvider } from '@affine/core/modules/i18n';
|
import { I18nProvider } from '@affine/core/modules/i18n';
|
||||||
|
import { LifecycleService } from '@affine/core/modules/lifecycle';
|
||||||
import { configureElectronStateStorageImpls } from '@affine/core/modules/storage';
|
import { configureElectronStateStorageImpls } from '@affine/core/modules/storage';
|
||||||
import {
|
import {
|
||||||
ClientSchemeProvider,
|
ClientSchemeProvider,
|
||||||
@@ -26,6 +29,7 @@ import {
|
|||||||
configureDesktopWorkbenchModule,
|
configureDesktopWorkbenchModule,
|
||||||
WorkbenchService,
|
WorkbenchService,
|
||||||
} from '@affine/core/modules/workbench';
|
} from '@affine/core/modules/workbench';
|
||||||
|
import { WorkspacesService } from '@affine/core/modules/workspace';
|
||||||
import {
|
import {
|
||||||
configureBrowserWorkspaceFlavours,
|
configureBrowserWorkspaceFlavours,
|
||||||
configureSqliteWorkspaceEngineStorageProvider,
|
configureSqliteWorkspaceEngineStorageProvider,
|
||||||
@@ -33,15 +37,7 @@ import {
|
|||||||
import createEmotionCache from '@affine/core/utils/create-emotion-cache';
|
import createEmotionCache from '@affine/core/utils/create-emotion-cache';
|
||||||
import { apis, events } from '@affine/electron-api';
|
import { apis, events } from '@affine/electron-api';
|
||||||
import { CacheProvider } from '@emotion/react';
|
import { CacheProvider } from '@emotion/react';
|
||||||
import {
|
import { Framework, FrameworkRoot, getCurrentStore } from '@toeverything/infra';
|
||||||
DocsService,
|
|
||||||
Framework,
|
|
||||||
FrameworkRoot,
|
|
||||||
getCurrentStore,
|
|
||||||
GlobalContextService,
|
|
||||||
LifecycleService,
|
|
||||||
WorkspacesService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import { RouterProvider } from 'react-router-dom';
|
import { RouterProvider } from 'react-router-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,12 @@ import {
|
|||||||
} from '@affine/core/modules/app-tabs-header';
|
} from '@affine/core/modules/app-tabs-header';
|
||||||
import { configureDesktopApiModule } from '@affine/core/modules/desktop-api';
|
import { configureDesktopApiModule } from '@affine/core/modules/desktop-api';
|
||||||
import { configureI18nModule, I18nProvider } from '@affine/core/modules/i18n';
|
import { configureI18nModule, I18nProvider } from '@affine/core/modules/i18n';
|
||||||
import { configureElectronStateStorageImpls } from '@affine/core/modules/storage';
|
|
||||||
import { configureAppThemeModule } from '@affine/core/modules/theme';
|
|
||||||
import {
|
import {
|
||||||
|
configureElectronStateStorageImpls,
|
||||||
configureGlobalStorageModule,
|
configureGlobalStorageModule,
|
||||||
Framework,
|
} from '@affine/core/modules/storage';
|
||||||
FrameworkRoot,
|
import { configureAppThemeModule } from '@affine/core/modules/theme';
|
||||||
} from '@toeverything/infra';
|
import { Framework, FrameworkRoot } from '@toeverything/infra';
|
||||||
|
|
||||||
import * as styles from './app.css';
|
import * as styles from './app.css';
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ import {
|
|||||||
ValidatorProvider,
|
ValidatorProvider,
|
||||||
WebSocketAuthProvider,
|
WebSocketAuthProvider,
|
||||||
} from '@affine/core/modules/cloud';
|
} from '@affine/core/modules/cloud';
|
||||||
|
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||||
import { I18nProvider } from '@affine/core/modules/i18n';
|
import { I18nProvider } from '@affine/core/modules/i18n';
|
||||||
|
import { LifecycleService } from '@affine/core/modules/lifecycle';
|
||||||
import { configureLocalStorageStateStorageImpls } from '@affine/core/modules/storage';
|
import { configureLocalStorageStateStorageImpls } from '@affine/core/modules/storage';
|
||||||
import { PopupWindowProvider } from '@affine/core/modules/url';
|
import { PopupWindowProvider } from '@affine/core/modules/url';
|
||||||
import { ClientSchemeProvider } from '@affine/core/modules/url/providers/client-schema';
|
import { ClientSchemeProvider } from '@affine/core/modules/url/providers/client-schema';
|
||||||
@@ -28,13 +30,7 @@ import { App as CapacitorApp } from '@capacitor/app';
|
|||||||
import { Browser } from '@capacitor/browser';
|
import { Browser } from '@capacitor/browser';
|
||||||
import { Haptics } from '@capacitor/haptics';
|
import { Haptics } from '@capacitor/haptics';
|
||||||
import { Keyboard, KeyboardStyle } from '@capacitor/keyboard';
|
import { Keyboard, KeyboardStyle } from '@capacitor/keyboard';
|
||||||
import {
|
import { Framework, FrameworkRoot, getCurrentStore } from '@toeverything/infra';
|
||||||
Framework,
|
|
||||||
FrameworkRoot,
|
|
||||||
getCurrentStore,
|
|
||||||
GlobalContextService,
|
|
||||||
LifecycleService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useTheme } from 'next-themes';
|
import { useTheme } from 'next-themes';
|
||||||
import { Suspense, useEffect } from 'react';
|
import { Suspense, useEffect } from 'react';
|
||||||
import { RouterProvider } from 'react-router-dom';
|
import { RouterProvider } from 'react-router-dom';
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { HapticProvider } from '@affine/core/mobile/modules/haptics';
|
|||||||
import { router } from '@affine/core/mobile/router';
|
import { router } from '@affine/core/mobile/router';
|
||||||
import { configureCommonModules } from '@affine/core/modules';
|
import { configureCommonModules } from '@affine/core/modules';
|
||||||
import { I18nProvider } from '@affine/core/modules/i18n';
|
import { I18nProvider } from '@affine/core/modules/i18n';
|
||||||
|
import { LifecycleService } from '@affine/core/modules/lifecycle';
|
||||||
import { configureLocalStorageStateStorageImpls } from '@affine/core/modules/storage';
|
import { configureLocalStorageStateStorageImpls } from '@affine/core/modules/storage';
|
||||||
import { PopupWindowProvider } from '@affine/core/modules/url';
|
import { PopupWindowProvider } from '@affine/core/modules/url';
|
||||||
import { configureIndexedDBUserspaceStorageProvider } from '@affine/core/modules/userspace';
|
import { configureIndexedDBUserspaceStorageProvider } from '@affine/core/modules/userspace';
|
||||||
@@ -13,12 +14,7 @@ import {
|
|||||||
configureBrowserWorkspaceFlavours,
|
configureBrowserWorkspaceFlavours,
|
||||||
configureIndexedDBWorkspaceEngineStorageProvider,
|
configureIndexedDBWorkspaceEngineStorageProvider,
|
||||||
} from '@affine/core/modules/workspace-engine';
|
} from '@affine/core/modules/workspace-engine';
|
||||||
import {
|
import { Framework, FrameworkRoot, getCurrentStore } from '@toeverything/infra';
|
||||||
Framework,
|
|
||||||
FrameworkRoot,
|
|
||||||
getCurrentStore,
|
|
||||||
LifecycleService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import { RouterProvider } from 'react-router-dom';
|
import { RouterProvider } from 'react-router-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { AppContainer } from '@affine/core/desktop/components/app-container';
|
|||||||
import { router } from '@affine/core/desktop/router';
|
import { router } from '@affine/core/desktop/router';
|
||||||
import { configureCommonModules } from '@affine/core/modules';
|
import { configureCommonModules } from '@affine/core/modules';
|
||||||
import { I18nProvider } from '@affine/core/modules/i18n';
|
import { I18nProvider } from '@affine/core/modules/i18n';
|
||||||
|
import { LifecycleService } from '@affine/core/modules/lifecycle';
|
||||||
import { OpenInAppGuard } from '@affine/core/modules/open-in-app';
|
import { OpenInAppGuard } from '@affine/core/modules/open-in-app';
|
||||||
import { configureLocalStorageStateStorageImpls } from '@affine/core/modules/storage';
|
import { configureLocalStorageStateStorageImpls } from '@affine/core/modules/storage';
|
||||||
import { PopupWindowProvider } from '@affine/core/modules/url';
|
import { PopupWindowProvider } from '@affine/core/modules/url';
|
||||||
@@ -14,12 +15,7 @@ import {
|
|||||||
} from '@affine/core/modules/workspace-engine';
|
} from '@affine/core/modules/workspace-engine';
|
||||||
import createEmotionCache from '@affine/core/utils/create-emotion-cache';
|
import createEmotionCache from '@affine/core/utils/create-emotion-cache';
|
||||||
import { CacheProvider } from '@emotion/react';
|
import { CacheProvider } from '@emotion/react';
|
||||||
import {
|
import { Framework, FrameworkRoot, getCurrentStore } from '@toeverything/infra';
|
||||||
Framework,
|
|
||||||
FrameworkRoot,
|
|
||||||
getCurrentStore,
|
|
||||||
LifecycleService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import { RouterProvider } from 'react-router-dom';
|
import { RouterProvider } from 'react-router-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import {
|
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||||
GlobalContextService,
|
import { useLiveData, useServices } from '@toeverything/infra';
|
||||||
useLiveData,
|
|
||||||
useServices,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { useLocation, useParams } from 'react-router-dom';
|
import { useLocation, useParams } from 'react-router-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { FeatureFlagService, useService } from '@toeverything/infra';
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
|
import { useService } from '@toeverything/infra';
|
||||||
import { Suspense, useCallback, useEffect, useState } from 'react';
|
import { Suspense, useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { AIOnboardingEdgeless } from './edgeless.dialog';
|
import { AIOnboardingEdgeless } from './edgeless.dialog';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
import { AuthService } from '../../../modules/cloud';
|
import { AuthService } from '../../../modules/cloud';
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { usePromptModal } from '@affine/component';
|
import { usePromptModal } from '@affine/component';
|
||||||
import { useNavigateHelper } from '@affine/core/components/hooks/use-navigate-helper';
|
import { useNavigateHelper } from '@affine/core/components/hooks/use-navigate-helper';
|
||||||
import { CollectionService } from '@affine/core/modules/collection';
|
import { CollectionService } from '@affine/core/modules/collection';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { ViewLayersIcon } from '@blocksuite/icons/rc';
|
import { ViewLayersIcon } from '@blocksuite/icons/rc';
|
||||||
import { useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { TagService } from '@affine/core/modules/tag';
|
import { TagService } from '@affine/core/modules/tag';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { isNewTabTrigger } from '@affine/core/utils';
|
import { isNewTabTrigger } from '@affine/core/utils';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { AllDocsIcon } from '@blocksuite/icons/rc';
|
import { AllDocsIcon } from '@blocksuite/icons/rc';
|
||||||
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { type MouseEvent, useCallback } from 'react';
|
import { type MouseEvent, useCallback } from 'react';
|
||||||
|
|
||||||
import { usePageHelper } from '../../blocksuite/block-suite-page-list/utils';
|
import { usePageHelper } from '../../blocksuite/block-suite-page-list/utils';
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
import { useDocMetaHelper } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
import { useDocMetaHelper } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
||||||
import { useDocCollectionPage } from '@affine/core/components/hooks/use-block-suite-workspace-page';
|
import { useDocCollectionPage } from '@affine/core/components/hooks/use-block-suite-workspace-page';
|
||||||
import { FetchService, GraphQLService } from '@affine/core/modules/cloud';
|
import { FetchService, GraphQLService } from '@affine/core/modules/cloud';
|
||||||
|
import { getAFFiNEWorkspaceSchema } from '@affine/core/modules/workspace';
|
||||||
import { DebugLogger } from '@affine/debug';
|
import { DebugLogger } from '@affine/debug';
|
||||||
import type { ListHistoryQuery } from '@affine/graphql';
|
import type { ListHistoryQuery } from '@affine/graphql';
|
||||||
import { listHistoryQuery, recoverDocMutation } from '@affine/graphql';
|
import { listHistoryQuery, recoverDocMutation } from '@affine/graphql';
|
||||||
import { i18nTime } from '@affine/i18n';
|
import { i18nTime } from '@affine/i18n';
|
||||||
import { assertEquals } from '@blocksuite/affine/global/utils';
|
import { assertEquals } from '@blocksuite/affine/global/utils';
|
||||||
import { DocCollection } from '@blocksuite/affine/store';
|
import { DocCollection } from '@blocksuite/affine/store';
|
||||||
import { getAFFiNEWorkspaceSchema, useService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useEffect, useMemo } from 'react';
|
import { useEffect, useMemo } from 'react';
|
||||||
import useSWRImmutable from 'swr/immutable';
|
import useSWRImmutable from 'swr/immutable';
|
||||||
import {
|
import {
|
||||||
@@ -227,6 +228,7 @@ export function revertUpdate(
|
|||||||
snapshotStateVector
|
snapshotStateVector
|
||||||
);
|
);
|
||||||
const undoManager = new UndoManager(
|
const undoManager = new UndoManager(
|
||||||
|
// oxlint-disable array-callback-return
|
||||||
[...snapshotDoc.share.keys()].map(key => {
|
[...snapshotDoc.share.keys()].map(key => {
|
||||||
const type = getMetadata(key);
|
const type = getMetadata(key);
|
||||||
if (type === 'Text') {
|
if (type === 'Text') {
|
||||||
@@ -236,7 +238,7 @@ export function revertUpdate(
|
|||||||
} else if (type === 'Array') {
|
} else if (type === 'Array') {
|
||||||
return snapshotDoc.getArray(key);
|
return snapshotDoc.getArray(key);
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line array-callback-return
|
|
||||||
throw new Error('Unknown type');
|
throw new Error('Unknown type');
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
|
|||||||
import { EditorService } from '@affine/core/modules/editor';
|
import { EditorService } from '@affine/core/modules/editor';
|
||||||
import { WorkspacePermissionService } from '@affine/core/modules/permissions';
|
import { WorkspacePermissionService } from '@affine/core/modules/permissions';
|
||||||
import { WorkspaceQuotaService } from '@affine/core/modules/quota';
|
import { WorkspaceQuotaService } from '@affine/core/modules/quota';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { i18nTime, Trans, useI18n } from '@affine/i18n';
|
import { i18nTime, Trans, useI18n } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||||
@@ -17,7 +18,7 @@ import type {
|
|||||||
import { CloseIcon, ToggleCollapseIcon } from '@blocksuite/icons/rc';
|
import { CloseIcon, ToggleCollapseIcon } from '@blocksuite/icons/rc';
|
||||||
import * as Collapsible from '@radix-ui/react-collapsible';
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
||||||
import type { DialogContentProps } from '@radix-ui/react-dialog';
|
import type { DialogContentProps } from '@radix-ui/react-dialog';
|
||||||
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { atom, useAtom } from 'jotai';
|
import { atom, useAtom } from 'jotai';
|
||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import { UserQuotaService } from '@affine/core/modules/cloud';
|
|||||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||||
import { WorkspacePermissionService } from '@affine/core/modules/permissions';
|
import { WorkspacePermissionService } from '@affine/core/modules/permissions';
|
||||||
import { WorkspaceQuotaService } from '@affine/core/modules/quota';
|
import { WorkspaceQuotaService } from '@affine/core/modules/quota';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { type I18nString, useI18n } from '@affine/i18n';
|
import { type I18nString, useI18n } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { useCallback, useEffect, useMemo } from 'react';
|
import { useCallback, useEffect, useMemo } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { ConfirmModal } from '@affine/component/ui/modal';
|
import { ConfirmModal } from '@affine/component/ui/modal';
|
||||||
import { openQuotaModalAtom } from '@affine/core/components/atoms';
|
import { openQuotaModalAtom } from '@affine/core/components/atoms';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { useCallback, useEffect } from 'react';
|
import { useCallback, useEffect } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
|
import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
|
||||||
import { JournalService } from '@affine/core/modules/journal';
|
import { JournalService } from '@affine/core/modules/journal';
|
||||||
import { PeekViewService } from '@affine/core/modules/peek-view/services/peek-view';
|
import { PeekViewService } from '@affine/core/modules/peek-view/services/peek-view';
|
||||||
@@ -6,12 +7,7 @@ import { WorkbenchLink } from '@affine/core/modules/workbench';
|
|||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||||
import type { DocCollection } from '@blocksuite/affine/store';
|
import type { DocCollection } from '@blocksuite/affine/store';
|
||||||
import {
|
import { LiveData, useLiveData, useService } from '@toeverything/infra';
|
||||||
DocsService,
|
|
||||||
LiveData,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { useEnableCloud } from '@affine/core/components/hooks/affine/use-enable-cloud';
|
import { useEnableCloud } from '@affine/core/components/hooks/affine/use-enable-cloud';
|
||||||
|
import type { Workspace } from '@affine/core/modules/workspace';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import type { Doc } from '@blocksuite/affine/store';
|
import type { Doc } from '@blocksuite/affine/store';
|
||||||
import { type Workspace } from '@toeverything/infra';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import { ShareMenu } from './share-menu';
|
import { ShareMenu } from './share-menu';
|
||||||
|
|||||||
@@ -2,14 +2,11 @@ import { Tabs, Tooltip } from '@affine/component';
|
|||||||
import { Button } from '@affine/component/ui/button';
|
import { Button } from '@affine/component/ui/button';
|
||||||
import { Menu } from '@affine/component/ui/menu';
|
import { Menu } from '@affine/component/ui/menu';
|
||||||
import { ShareInfoService } from '@affine/core/modules/share-doc';
|
import { ShareInfoService } from '@affine/core/modules/share-doc';
|
||||||
|
import type { WorkspaceMetadata } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import type { Doc } from '@blocksuite/affine/store';
|
import type { Doc } from '@blocksuite/affine/store';
|
||||||
import { LockIcon, PublishIcon } from '@blocksuite/icons/rc';
|
import { LockIcon, PublishIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
type WorkspaceMetadata,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { forwardRef, type PropsWithChildren, type Ref, useEffect } from 'react';
|
import { forwardRef, type PropsWithChildren, type Ref, useEffect } from 'react';
|
||||||
|
|
||||||
import * as styles from './index.css';
|
import * as styles from './index.css';
|
||||||
|
|||||||
@@ -4,27 +4,29 @@ import {
|
|||||||
useLitPortalFactory,
|
useLitPortalFactory,
|
||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
import { TextRenderer } from '@affine/core/blocksuite/presets';
|
import { TextRenderer } from '@affine/core/blocksuite/presets';
|
||||||
|
import { DocService } from '@affine/core/modules/doc';
|
||||||
import {
|
import {
|
||||||
type Backlink,
|
type Backlink,
|
||||||
DocLinksService,
|
DocLinksService,
|
||||||
type Link,
|
type Link,
|
||||||
} from '@affine/core/modules/doc-link';
|
} from '@affine/core/modules/doc-link';
|
||||||
import { toURLSearchParams } from '@affine/core/modules/navigation';
|
import { toURLSearchParams } from '@affine/core/modules/navigation';
|
||||||
|
import { GlobalSessionStateService } from '@affine/core/modules/storage';
|
||||||
import { WorkbenchLink } from '@affine/core/modules/workbench';
|
import { WorkbenchLink } from '@affine/core/modules/workbench';
|
||||||
|
import {
|
||||||
|
getAFFiNEWorkspaceSchema,
|
||||||
|
WorkspaceService,
|
||||||
|
} from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import track from '@affine/track';
|
import track from '@affine/track';
|
||||||
import type { JobMiddleware } from '@blocksuite/affine/store';
|
import type { JobMiddleware } from '@blocksuite/affine/store';
|
||||||
import { ToggleExpandIcon } from '@blocksuite/icons/rc';
|
import { ToggleExpandIcon } from '@blocksuite/icons/rc';
|
||||||
import * as Collapsible from '@radix-ui/react-collapsible';
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
||||||
import {
|
import {
|
||||||
DocService,
|
|
||||||
getAFFiNEWorkspaceSchema,
|
|
||||||
GlobalSessionStateService,
|
|
||||||
LiveData,
|
LiveData,
|
||||||
useFramework,
|
useFramework,
|
||||||
useLiveData,
|
useLiveData,
|
||||||
useServices,
|
useServices,
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import React, {
|
import React, {
|
||||||
Fragment,
|
Fragment,
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import {
|
|||||||
useConfirmModal,
|
useConfirmModal,
|
||||||
useLitPortalFactory,
|
useLitPortalFactory,
|
||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
|
import type { DocCustomPropertyInfo } from '@affine/core/modules/db';
|
||||||
|
import { DocService, DocsService } from '@affine/core/modules/doc';
|
||||||
import type {
|
import type {
|
||||||
DatabaseRow,
|
DatabaseRow,
|
||||||
DatabaseValueCell,
|
DatabaseValueCell,
|
||||||
@@ -12,6 +14,7 @@ import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
|||||||
import { JournalService } from '@affine/core/modules/journal';
|
import { JournalService } from '@affine/core/modules/journal';
|
||||||
import { toURLSearchParams } from '@affine/core/modules/navigation';
|
import { toURLSearchParams } from '@affine/core/modules/navigation';
|
||||||
import { PeekViewService } from '@affine/core/modules/peek-view/services/peek-view';
|
import { PeekViewService } from '@affine/core/modules/peek-view/services/peek-view';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import track from '@affine/track';
|
import track from '@affine/track';
|
||||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||||
import {
|
import {
|
||||||
@@ -21,14 +24,10 @@ import {
|
|||||||
} from '@blocksuite/affine/presets';
|
} from '@blocksuite/affine/presets';
|
||||||
import type { Doc } from '@blocksuite/affine/store';
|
import type { Doc } from '@blocksuite/affine/store';
|
||||||
import {
|
import {
|
||||||
type DocCustomPropertyInfo,
|
|
||||||
DocService,
|
|
||||||
DocsService,
|
|
||||||
useFramework,
|
useFramework,
|
||||||
useLiveData,
|
useLiveData,
|
||||||
useService,
|
useService,
|
||||||
useServices,
|
useServices,
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import React, {
|
import React, {
|
||||||
forwardRef,
|
forwardRef,
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ import {
|
|||||||
AIEdgelessRootBlockSpec,
|
AIEdgelessRootBlockSpec,
|
||||||
AIPageRootBlockSpec,
|
AIPageRootBlockSpec,
|
||||||
} from '@affine/core/blocksuite/presets/ai';
|
} from '@affine/core/blocksuite/presets/ai';
|
||||||
|
import { DocService, DocsService } from '@affine/core/modules/doc';
|
||||||
import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
|
import { DocDisplayMetaService } from '@affine/core/modules/doc-display-meta';
|
||||||
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import { AppThemeService } from '@affine/core/modules/theme';
|
import { AppThemeService } from '@affine/core/modules/theme';
|
||||||
import { mixpanel } from '@affine/track';
|
import { mixpanel } from '@affine/track';
|
||||||
import {
|
import {
|
||||||
@@ -39,12 +41,7 @@ import {
|
|||||||
} from '@blocksuite/affine-shared/utils';
|
} from '@blocksuite/affine-shared/utils';
|
||||||
import type { Container } from '@blocksuite/global/di';
|
import type { Container } from '@blocksuite/global/di';
|
||||||
import { LinkedPageIcon, PageIcon } from '@blocksuite/icons/lit';
|
import { LinkedPageIcon, PageIcon } from '@blocksuite/icons/lit';
|
||||||
import {
|
import { type FrameworkProvider } from '@toeverything/infra';
|
||||||
DocService,
|
|
||||||
DocsService,
|
|
||||||
FeatureFlagService,
|
|
||||||
type FrameworkProvider,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import type { TemplateResult } from 'lit';
|
import type { TemplateResult } from 'lit';
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import { combineLatest, map } from 'rxjs';
|
import { combineLatest, map } from 'rxjs';
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import {
|
|||||||
type useConfirmModal,
|
type useConfirmModal,
|
||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
import { WorkspaceServerService } from '@affine/core/modules/cloud';
|
import { WorkspaceServerService } from '@affine/core/modules/cloud';
|
||||||
|
import { type DocService, DocsService } from '@affine/core/modules/doc';
|
||||||
import type { EditorService } from '@affine/core/modules/editor';
|
import type { EditorService } from '@affine/core/modules/editor';
|
||||||
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||||
import { resolveLinkToDoc } from '@affine/core/modules/navigation';
|
import { resolveLinkToDoc } from '@affine/core/modules/navigation';
|
||||||
@@ -22,6 +23,7 @@ import {
|
|||||||
import { ExternalLinksQuickSearchSession } from '@affine/core/modules/quicksearch/impls/external-links';
|
import { ExternalLinksQuickSearchSession } from '@affine/core/modules/quicksearch/impls/external-links';
|
||||||
import { JournalsQuickSearchSession } from '@affine/core/modules/quicksearch/impls/journals';
|
import { JournalsQuickSearchSession } from '@affine/core/modules/quicksearch/impls/journals';
|
||||||
import { WorkbenchService } from '@affine/core/modules/workbench';
|
import { WorkbenchService } from '@affine/core/modules/workbench';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { isNewTabTrigger } from '@affine/core/utils';
|
import { isNewTabTrigger } from '@affine/core/utils';
|
||||||
import { DebugLogger } from '@affine/debug';
|
import { DebugLogger } from '@affine/debug';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
@@ -62,10 +64,7 @@ import type { ReferenceParams } from '@blocksuite/affine-model';
|
|||||||
import {
|
import {
|
||||||
AIChatBlockSchema,
|
AIChatBlockSchema,
|
||||||
type DocProps,
|
type DocProps,
|
||||||
type DocService,
|
|
||||||
DocsService,
|
|
||||||
type FrameworkProvider,
|
type FrameworkProvider,
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import { type TemplateResult } from 'lit';
|
import { type TemplateResult } from 'lit';
|
||||||
import { customElement } from 'lit/decorators.js';
|
import { customElement } from 'lit/decorators.js';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import { builtInTemplates as builtInEdgelessTemplates } from '@affine/templates/edgeless';
|
import { builtInTemplates as builtInEdgelessTemplates } from '@affine/templates/edgeless';
|
||||||
import { builtInTemplates as builtInStickersTemplates } from '@affine/templates/stickers';
|
import { builtInTemplates as builtInStickersTemplates } from '@affine/templates/stickers';
|
||||||
import type { ExtensionType } from '@blocksuite/affine/block-std';
|
import type { ExtensionType } from '@blocksuite/affine/block-std';
|
||||||
@@ -10,10 +11,7 @@ import {
|
|||||||
EdgelessTextBlockSpec,
|
EdgelessTextBlockSpec,
|
||||||
FrameBlockSpec,
|
FrameBlockSpec,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import {
|
import { type FrameworkProvider } from '@toeverything/infra';
|
||||||
FeatureFlagService,
|
|
||||||
type FrameworkProvider,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
|
|
||||||
import { AIBlockSpecs, DefaultBlockSpecs } from './common';
|
import { AIBlockSpecs, DefaultBlockSpecs } from './common';
|
||||||
import { createEdgelessRootBlockSpec } from './custom/root-block';
|
import { createEdgelessRootBlockSpec } from './custom/root-block';
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import type { ExtensionType } from '@blocksuite/affine/block-std';
|
import type { ExtensionType } from '@blocksuite/affine/block-std';
|
||||||
import {
|
import {
|
||||||
NoteBlockSpec,
|
NoteBlockSpec,
|
||||||
PageSurfaceBlockSpec,
|
PageSurfaceBlockSpec,
|
||||||
PageSurfaceRefBlockSpec,
|
PageSurfaceRefBlockSpec,
|
||||||
} from '@blocksuite/affine/blocks';
|
} from '@blocksuite/affine/blocks';
|
||||||
import {
|
import { type FrameworkProvider } from '@toeverything/infra';
|
||||||
FeatureFlagService,
|
|
||||||
type FrameworkProvider,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
|
|
||||||
import { AIBlockSpecs, DefaultBlockSpecs } from './common';
|
import { AIBlockSpecs, DefaultBlockSpecs } from './common';
|
||||||
import { createPageRootBlockSpec } from './custom/root-block';
|
import { createPageRootBlockSpec } from './custom/root-block';
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { OverlayModal } from '@affine/component';
|
import { OverlayModal } from '@affine/component';
|
||||||
import { useEnableCloud } from '@affine/core/components/hooks/affine/use-enable-cloud';
|
import { useEnableCloud } from '@affine/core/components/hooks/affine/use-enable-cloud';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import TopSvg from './top-svg';
|
import TopSvg from './top-svg';
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import { EditorService } from '@affine/core/modules/editor';
|
|||||||
import { OpenInAppService } from '@affine/core/modules/open-in-app/services';
|
import { OpenInAppService } from '@affine/core/modules/open-in-app/services';
|
||||||
import { WorkbenchService } from '@affine/core/modules/workbench';
|
import { WorkbenchService } from '@affine/core/modules/workbench';
|
||||||
import { ViewService } from '@affine/core/modules/workbench/services/view';
|
import { ViewService } from '@affine/core/modules/workbench/services/view';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import type { Doc } from '@blocksuite/affine/store';
|
import type { Doc } from '@blocksuite/affine/store';
|
||||||
@@ -42,7 +43,6 @@ import {
|
|||||||
useLiveData,
|
useLiveData,
|
||||||
useService,
|
useService,
|
||||||
useServiceOptional,
|
useServiceOptional,
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
import type { InlineEditProps } from '@affine/component';
|
import type { InlineEditProps } from '@affine/component';
|
||||||
import { InlineEdit } from '@affine/component';
|
import { InlineEdit } from '@affine/component';
|
||||||
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
|
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
DocsService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type { HTMLAttributes } from 'react';
|
import type { HTMLAttributes } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { toast } from '@affine/component';
|
import { toast } from '@affine/component';
|
||||||
import { AppSidebarService } from '@affine/core/modules/app-sidebar';
|
import { AppSidebarService } from '@affine/core/modules/app-sidebar';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||||
import { WorkbenchService } from '@affine/core/modules/workbench';
|
import { WorkbenchService } from '@affine/core/modules/workbench';
|
||||||
import { type DocMode } from '@blocksuite/affine/blocks';
|
import { type DocMode } from '@blocksuite/affine/blocks';
|
||||||
import type { DocCollection } from '@blocksuite/affine/store';
|
import type { DocCollection } from '@blocksuite/affine/store';
|
||||||
import { type DocProps, DocsService, useServices } from '@toeverything/infra';
|
import { type DocProps, useServices } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
export const usePageHelper = (docCollection: DocCollection) => {
|
export const usePageHelper = (docCollection: DocCollection) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import type { DocCustomPropertyInfo } from '@affine/core/modules/db';
|
||||||
import * as icons from '@blocksuite/icons/rc';
|
import * as icons from '@blocksuite/icons/rc';
|
||||||
import type { DocCustomPropertyInfo } from '@toeverything/infra';
|
|
||||||
import type { SVGProps } from 'react';
|
import type { SVGProps } from 'react';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Menu, Scrollable } from '@affine/component';
|
import { Menu, Scrollable } from '@affine/component';
|
||||||
|
import type { DocCustomPropertyInfo } from '@affine/core/modules/db';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import type { DocCustomPropertyInfo } from '@toeverything/infra';
|
|
||||||
import { chunk } from 'lodash-es';
|
import { chunk } from 'lodash-es';
|
||||||
|
|
||||||
import { type DocPropertyIconName, DocPropertyIconNames } from './constant';
|
import { type DocPropertyIconName, DocPropertyIconNames } from './constant';
|
||||||
|
|||||||
@@ -6,16 +6,13 @@ import {
|
|||||||
useDraggable,
|
useDraggable,
|
||||||
useDropTarget,
|
useDropTarget,
|
||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
|
import type { DocCustomPropertyInfo } from '@affine/core/modules/db';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import type { AffineDNDData } from '@affine/core/types/dnd';
|
import type { AffineDNDData } from '@affine/core/types/dnd';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { MoreHorizontalIcon } from '@blocksuite/icons/rc';
|
import { MoreHorizontalIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
type DocCustomPropertyInfo,
|
|
||||||
DocsService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { type HTMLProps, useCallback, useState } from 'react';
|
import { type HTMLProps, useCallback, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import { MenuItem, MenuSeparator } from '@affine/component';
|
import { MenuItem, MenuSeparator } from '@affine/component';
|
||||||
|
import type { DocCustomPropertyInfo } from '@affine/core/modules/db';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import { generateUniqueNameInSequence } from '@affine/core/utils/unique-name';
|
import { generateUniqueNameInSequence } from '@affine/core/utils/unique-name';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
type DocCustomPropertyInfo,
|
|
||||||
DocsService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import {
|
|||||||
MenuSeparator,
|
MenuSeparator,
|
||||||
useConfirmModal,
|
useConfirmModal,
|
||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import { Trans, useI18n } from '@affine/i18n';
|
import { Trans, useI18n } from '@affine/i18n';
|
||||||
import { DeleteIcon, InvisibleIcon, ViewIcon } from '@blocksuite/icons/rc';
|
import { DeleteIcon, InvisibleIcon, ViewIcon } from '@blocksuite/icons/rc';
|
||||||
import { DocsService, useLiveData, useService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import {
|
import {
|
||||||
type KeyboardEventHandler,
|
type KeyboardEventHandler,
|
||||||
type MouseEvent,
|
type MouseEvent,
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Divider, IconButton, Tooltip } from '@affine/component';
|
import { Divider, IconButton, Tooltip } from '@affine/component';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import { generateUniqueNameInSequence } from '@affine/core/utils/unique-name';
|
import { generateUniqueNameInSequence } from '@affine/core/utils/unique-name';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import track from '@affine/track';
|
import track from '@affine/track';
|
||||||
@@ -7,7 +8,7 @@ import {
|
|||||||
Content as CollapsibleContent,
|
Content as CollapsibleContent,
|
||||||
Root as CollapsibleRoot,
|
Root as CollapsibleRoot,
|
||||||
} from '@radix-ui/react-collapsible';
|
} from '@radix-ui/react-collapsible';
|
||||||
import { DocsService, useLiveData, useService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
import { DocPropertyManager } from '../manager';
|
import { DocPropertyManager } from '../manager';
|
||||||
|
|||||||
@@ -8,22 +8,20 @@ import {
|
|||||||
useDraggable,
|
useDraggable,
|
||||||
useDropTarget,
|
useDropTarget,
|
||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
|
import type { DocCustomPropertyInfo } from '@affine/core/modules/db';
|
||||||
|
import { DocService, DocsService } from '@affine/core/modules/doc';
|
||||||
import { DocDatabaseBacklinkInfo } from '@affine/core/modules/doc-info';
|
import { DocDatabaseBacklinkInfo } from '@affine/core/modules/doc-info';
|
||||||
import type {
|
import type {
|
||||||
DatabaseRow,
|
DatabaseRow,
|
||||||
DatabaseValueCell,
|
DatabaseValueCell,
|
||||||
} from '@affine/core/modules/doc-info/types';
|
} from '@affine/core/modules/doc-info/types';
|
||||||
import { WorkbenchService } from '@affine/core/modules/workbench';
|
import { ViewService, WorkbenchService } from '@affine/core/modules/workbench';
|
||||||
import { ViewService } from '@affine/core/modules/workbench/services/view';
|
|
||||||
import type { AffineDNDData } from '@affine/core/types/dnd';
|
import type { AffineDNDData } from '@affine/core/types/dnd';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import { PlusIcon, PropertyIcon, ToggleExpandIcon } from '@blocksuite/icons/rc';
|
import { PlusIcon, PropertyIcon, ToggleExpandIcon } from '@blocksuite/icons/rc';
|
||||||
import * as Collapsible from '@radix-ui/react-collapsible';
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
||||||
import {
|
import {
|
||||||
type DocCustomPropertyInfo,
|
|
||||||
DocService,
|
|
||||||
DocsService,
|
|
||||||
useLiveData,
|
useLiveData,
|
||||||
useService,
|
useService,
|
||||||
useServiceOptional,
|
useServiceOptional,
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
import { TagService, useDeleteTagConfirmModal } from '@affine/core/modules/tag';
|
import { TagService, useDeleteTagConfirmModal } from '@affine/core/modules/tag';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { TagsIcon } from '@blocksuite/icons/rc';
|
import { TagsIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { LiveData, useLiveData, useService } from '@toeverything/infra';
|
||||||
LiveData,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
import { useAsyncCallback } from '../hooks/affine-async-hooks';
|
import { useAsyncCallback } from '../hooks/affine-async-hooks';
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { Avatar, PropertyValue } from '@affine/component';
|
import { Avatar, PropertyValue } from '@affine/component';
|
||||||
import { CloudDocMetaService } from '@affine/core/modules/cloud/services/cloud-doc-meta';
|
import { CloudDocMetaService } from '@affine/core/modules/cloud/services/cloud-doc-meta';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useEffect, useMemo } from 'react';
|
import { useEffect, useMemo } from 'react';
|
||||||
|
|
||||||
import { userWrapper } from './created-updated-by.css';
|
import { userWrapper } from './created-updated-by.css';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { DatePicker, Menu, PropertyValue, Tooltip } from '@affine/component';
|
import { DatePicker, Menu, PropertyValue, Tooltip } from '@affine/component';
|
||||||
|
import { DocService } from '@affine/core/modules/doc';
|
||||||
import { i18nTime, useI18n } from '@affine/i18n';
|
import { i18nTime, useI18n } from '@affine/i18n';
|
||||||
import { DocService, useLiveData, useServices } from '@toeverything/infra';
|
import { useLiveData, useServices } from '@toeverything/infra';
|
||||||
|
|
||||||
import * as styles from './date.css';
|
import * as styles from './date.css';
|
||||||
import type { PropertyValueProps } from './types';
|
import type { PropertyValueProps } from './types';
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ import {
|
|||||||
RadioGroup,
|
RadioGroup,
|
||||||
type RadioItem,
|
type RadioItem,
|
||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
|
import { DocService } from '@affine/core/modules/doc';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||||
import { DocService, useLiveData, useService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
import * as styles from './doc-primary-mode.css';
|
import * as styles from './doc-primary-mode.css';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { PropertyValue, RadioGroup, type RadioItem } from '@affine/component';
|
import { PropertyValue, RadioGroup, type RadioItem } from '@affine/component';
|
||||||
|
import { DocService } from '@affine/core/modules/doc';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { DocService, useLiveData, useService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
import * as styles from './edgeless-theme.css';
|
import * as styles from './edgeless-theme.css';
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Checkbox, DatePicker, Menu, PropertyValue } from '@affine/component';
|
import { Checkbox, DatePicker, Menu, PropertyValue } from '@affine/component';
|
||||||
import { MobileJournalConflictList } from '@affine/core/mobile/pages/workspace/detail/menu/journal-conflicts';
|
import { MobileJournalConflictList } from '@affine/core/mobile/pages/workspace/detail/menu/journal-conflicts';
|
||||||
|
import { DocService } from '@affine/core/modules/doc';
|
||||||
import { JournalService } from '@affine/core/modules/journal';
|
import { JournalService } from '@affine/core/modules/journal';
|
||||||
import { WorkbenchService } from '@affine/core/modules/workbench';
|
import { WorkbenchService } from '@affine/core/modules/workbench';
|
||||||
import { ViewService } from '@affine/core/modules/workbench/services/view';
|
import { ViewService } from '@affine/core/modules/workbench/services/view';
|
||||||
import { i18nTime, useI18n } from '@affine/i18n';
|
import { i18nTime, useI18n } from '@affine/i18n';
|
||||||
import {
|
import {
|
||||||
DocService,
|
|
||||||
useLiveData,
|
useLiveData,
|
||||||
useService,
|
useService,
|
||||||
useServiceOptional,
|
useServiceOptional,
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { PropertyValue, RadioGroup, type RadioItem } from '@affine/component';
|
import { PropertyValue, RadioGroup, type RadioItem } from '@affine/component';
|
||||||
|
import { DocService } from '@affine/core/modules/doc';
|
||||||
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { DocService, useLiveData, useService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
import { container } from './page-width.css';
|
import { container } from './page-width.css';
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { PropertyValue } from '@affine/component';
|
import { PropertyValue } from '@affine/component';
|
||||||
|
import { DocService } from '@affine/core/modules/doc';
|
||||||
import { TagService } from '@affine/core/modules/tag';
|
import { TagService } from '@affine/core/modules/tag';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { DocService, useLiveData, useService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
|
|
||||||
import { TagsInlineEditor } from '../tags-inline-editor';
|
import { TagsInlineEditor } from '../tags-inline-editor';
|
||||||
import * as styles from './tags.css';
|
import * as styles from './tags.css';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { DocCustomPropertyInfo } from '@toeverything/infra';
|
import type { DocCustomPropertyInfo } from '@affine/core/modules/db';
|
||||||
|
|
||||||
export interface PropertyValueProps {
|
export interface PropertyValueProps {
|
||||||
propertyInfo?: DocCustomPropertyInfo;
|
propertyInfo?: DocCustomPropertyInfo;
|
||||||
|
|||||||
@@ -3,10 +3,11 @@ import { useBlockSuiteDocMeta } from '@affine/core/components/hooks/use-block-su
|
|||||||
import { FavoriteTag } from '@affine/core/components/page-list/components/favorite-tag';
|
import { FavoriteTag } from '@affine/core/components/page-list/components/favorite-tag';
|
||||||
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
||||||
import { ShareDocsListService } from '@affine/core/modules/share-doc';
|
import { ShareDocsListService } from '@affine/core/modules/share-doc';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { PublicPageMode } from '@affine/graphql';
|
import { PublicPageMode } from '@affine/graphql';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import type { DocCollection, DocMeta } from '@blocksuite/affine/store';
|
import type { DocCollection, DocMeta } from '@blocksuite/affine/store';
|
||||||
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { type ReactNode, useCallback, useEffect, useMemo } from 'react';
|
import { type ReactNode, useCallback, useEffect, useMemo } from 'react';
|
||||||
|
|
||||||
export type AllPageListConfig = {
|
export type AllPageListConfig = {
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
|
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
|
||||||
import { useDocMetaHelper } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
import { useDocMetaHelper } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
||||||
import { useDocCollectionHelper } from '@affine/core/components/hooks/use-block-suite-workspace-helper';
|
import { useDocCollectionHelper } from '@affine/core/components/hooks/use-block-suite-workspace-helper';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||||
import { DocsService, useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { applyUpdate, encodeStateAsUpdate } from 'yjs';
|
import { applyUpdate, encodeStateAsUpdate } from 'yjs';
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
import { notify, useConfirmModal } from '@affine/component';
|
import { notify, useConfirmModal } from '@affine/component';
|
||||||
import { AuthService, ServersService } from '@affine/core/modules/cloud';
|
import { AuthService, ServersService } from '@affine/core/modules/cloud';
|
||||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||||
|
import type { Workspace } from '@affine/core/modules/workspace';
|
||||||
|
import { WorkspacesService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import type { Workspace } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import {
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
WorkspacesService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import { useNavigateHelper } from '../use-navigate-helper';
|
import { useNavigateHelper } from '../use-navigate-helper';
|
||||||
|
|||||||
@@ -4,10 +4,12 @@ import {
|
|||||||
registerAffineCommand,
|
registerAffineCommand,
|
||||||
} from '@affine/core/commands';
|
} from '@affine/core/commands';
|
||||||
import { WorkspaceDialogService } from '@affine/core/modules/dialogs';
|
import { WorkspaceDialogService } from '@affine/core/modules/dialogs';
|
||||||
|
import { DocService } from '@affine/core/modules/doc';
|
||||||
import type { Editor } from '@affine/core/modules/editor';
|
import type { Editor } from '@affine/core/modules/editor';
|
||||||
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||||
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
||||||
import { OpenInAppService } from '@affine/core/modules/open-in-app';
|
import { OpenInAppService } from '@affine/core/modules/open-in-app';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import {
|
import {
|
||||||
@@ -17,11 +19,9 @@ import {
|
|||||||
PageIcon,
|
PageIcon,
|
||||||
} from '@blocksuite/icons/rc';
|
} from '@blocksuite/icons/rc';
|
||||||
import {
|
import {
|
||||||
DocService,
|
|
||||||
useLiveData,
|
useLiveData,
|
||||||
useService,
|
useService,
|
||||||
useServiceOptional,
|
useServiceOptional,
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import { useCallback, useEffect } from 'react';
|
import { useCallback, useEffect } from 'react';
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import {
|
|||||||
} from '@affine/core/commands';
|
} from '@affine/core/commands';
|
||||||
import { useSharingUrl } from '@affine/core/components/hooks/affine/use-share-url';
|
import { useSharingUrl } from '@affine/core/components/hooks/affine/use-share-url';
|
||||||
import { useIsActiveView } from '@affine/core/modules/workbench';
|
import { useIsActiveView } from '@affine/core/modules/workbench';
|
||||||
|
import type { WorkspaceMetadata } from '@affine/core/modules/workspace';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import { type WorkspaceMetadata } from '@toeverything/infra';
|
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
export function useRegisterCopyLinkCommands({
|
export function useRegisterCopyLinkCommands({
|
||||||
|
|||||||
@@ -4,13 +4,10 @@ import {
|
|||||||
useConfirmModal,
|
useConfirmModal,
|
||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
import { AuthService, ServerService } from '@affine/core/modules/cloud';
|
import { AuthService, ServerService } from '@affine/core/modules/cloud';
|
||||||
|
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||||
|
import { WorkspacesService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
GlobalContextService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
WorkspacesService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import { useNavigateHelper } from '../use-navigate-helper';
|
import { useNavigateHelper } from '../use-navigate-helper';
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import type { DocCollection, DocMeta } from '@blocksuite/affine/store';
|
import type { DocCollection, DocMeta } from '@blocksuite/affine/store';
|
||||||
import { DocsService, useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
import { useAsyncCallback } from './affine-async-hooks';
|
import { useAsyncCallback } from './affine-async-hooks';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||||
import {
|
import {
|
||||||
JOURNAL_DATE_FORMAT,
|
JOURNAL_DATE_FORMAT,
|
||||||
@@ -6,7 +7,7 @@ import {
|
|||||||
} from '@affine/core/modules/journal';
|
} from '@affine/core/modules/journal';
|
||||||
import { i18nTime } from '@affine/i18n';
|
import { i18nTime } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import { DocsService, useService, useServices } from '@toeverything/infra';
|
import { useService, useServices } from '@toeverything/infra';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,10 @@ import { DesktopApiService } from '@affine/core/modules/desktop-api';
|
|||||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||||
import { I18nService } from '@affine/core/modules/i18n';
|
import { I18nService } from '@affine/core/modules/i18n';
|
||||||
import { UrlService } from '@affine/core/modules/url';
|
import { UrlService } from '@affine/core/modules/url';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import type { AffineEditorContainer } from '@blocksuite/affine/presets';
|
import type { AffineEditorContainer } from '@blocksuite/affine/presets';
|
||||||
import {
|
import { useService, useServiceOptional } from '@toeverything/infra';
|
||||||
useService,
|
|
||||||
useServiceOptional,
|
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useStore } from 'jotai';
|
import { useStore } from 'jotai';
|
||||||
import { useTheme } from 'next-themes';
|
import { useTheme } from 'next-themes';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import type { WorkspaceMetadata } from '@toeverything/infra';
|
|
||||||
import {
|
import {
|
||||||
useLiveData,
|
type WorkspaceMetadata,
|
||||||
useService,
|
|
||||||
WorkspacesService,
|
WorkspacesService,
|
||||||
} from '@toeverything/infra';
|
} from '@affine/core/modules/workspace';
|
||||||
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
export function useWorkspaceInfo(meta?: WorkspaceMetadata) {
|
export function useWorkspaceInfo(meta?: WorkspaceMetadata) {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import type { Workspace, WorkspaceMetadata } from '@toeverything/infra';
|
import {
|
||||||
import { useService, WorkspacesService } from '@toeverything/infra';
|
type Workspace,
|
||||||
|
type WorkspaceMetadata,
|
||||||
|
WorkspacesService,
|
||||||
|
} from '@affine/core/modules/workspace';
|
||||||
|
import { useService } from '@toeverything/infra';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { notify } from '@affine/component';
|
import { notify } from '@affine/component';
|
||||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||||
import { WorkspacePermissionService } from '@affine/core/modules/permissions';
|
import { WorkspacePermissionService } from '@affine/core/modules/permissions';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { debounce } from 'lodash-es';
|
import { debounce } from 'lodash-es';
|
||||||
import { useCallback, useEffect } from 'react';
|
import { useCallback, useEffect } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import './page-detail-editor.css';
|
import './page-detail-editor.css';
|
||||||
|
|
||||||
import type { AffineEditorContainer } from '@blocksuite/affine/presets';
|
import type { AffineEditorContainer } from '@blocksuite/affine/presets';
|
||||||
import { DocService, useLiveData, useService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { cssVar } from '@toeverything/theme';
|
import { cssVar } from '@toeverything/theme';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type { CSSProperties } from 'react';
|
import type { CSSProperties } from 'react';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
|
||||||
|
import { DocService } from '../modules/doc';
|
||||||
import { EditorService } from '../modules/editor';
|
import { EditorService } from '../modules/editor';
|
||||||
import {
|
import {
|
||||||
EditorSettingService,
|
EditorSettingService,
|
||||||
@@ -16,7 +17,7 @@ import { BlockSuiteEditor as Editor } from './blocksuite/block-suite-editor';
|
|||||||
import * as styles from './page-detail-editor.css';
|
import * as styles from './page-detail-editor.css';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
// eslint-disable-next-line no-var
|
// oxlint-disable-next-line no-var
|
||||||
var currentEditor: AffineEditorContainer | undefined;
|
var currentEditor: AffineEditorContainer | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { useDeleteCollectionInfo } from '@affine/core/components/hooks/affine/use-delete-collection-info';
|
import { useDeleteCollectionInfo } from '@affine/core/components/hooks/affine/use-delete-collection-info';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import type { Collection, DeleteCollectionInfo } from '@affine/env/filter';
|
import type { Collection, DeleteCollectionInfo } from '@affine/env/filter';
|
||||||
import { Trans } from '@affine/i18n';
|
import { Trans } from '@affine/i18n';
|
||||||
import { useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo, useRef, useState } from 'react';
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
||||||
|
|
||||||
import { CollectionService } from '../../../modules/collection';
|
import { CollectionService } from '../../../modules/collection';
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ import {
|
|||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
import { useNavigateHelper } from '@affine/core/components/hooks/use-navigate-helper';
|
import { useNavigateHelper } from '@affine/core/components/hooks/use-navigate-helper';
|
||||||
import { WorkspaceDialogService } from '@affine/core/modules/dialogs';
|
import { WorkspaceDialogService } from '@affine/core/modules/dialogs';
|
||||||
|
import type { DocRecord } from '@affine/core/modules/doc';
|
||||||
import type { Tag } from '@affine/core/modules/tag';
|
import type { Tag } from '@affine/core/modules/tag';
|
||||||
import { TagService } from '@affine/core/modules/tag';
|
import { TagService } from '@affine/core/modules/tag';
|
||||||
import { WorkbenchService } from '@affine/core/modules/workbench';
|
import { WorkbenchService } from '@affine/core/modules/workbench';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { isNewTabTrigger } from '@affine/core/utils';
|
import { isNewTabTrigger } from '@affine/core/utils';
|
||||||
import type { Collection } from '@affine/env/filter';
|
import type { Collection } from '@affine/env/filter';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
@@ -21,13 +23,7 @@ import {
|
|||||||
SearchIcon,
|
SearchIcon,
|
||||||
ViewLayersIcon,
|
ViewLayersIcon,
|
||||||
} from '@blocksuite/icons/rc';
|
} from '@blocksuite/icons/rc';
|
||||||
import type { DocRecord } from '@toeverything/infra';
|
import { useLiveData, useService, useServices } from '@toeverything/infra';
|
||||||
import {
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
useServices,
|
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|||||||
@@ -2,15 +2,12 @@ import { IconButton, Menu, toast } from '@affine/component';
|
|||||||
import { useBlockSuiteDocMeta } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
import { useBlockSuiteDocMeta } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
||||||
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
||||||
import { ShareDocsListService } from '@affine/core/modules/share-doc';
|
import { ShareDocsListService } from '@affine/core/modules/share-doc';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { PublicPageMode } from '@affine/graphql';
|
import { PublicPageMode } from '@affine/graphql';
|
||||||
import { Trans, useI18n } from '@affine/i18n';
|
import { Trans, useI18n } from '@affine/i18n';
|
||||||
import type { DocMeta } from '@blocksuite/affine/store';
|
import type { DocMeta } from '@blocksuite/affine/store';
|
||||||
import { FilterIcon } from '@blocksuite/icons/rc';
|
import { FilterIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useServices } from '@toeverything/infra';
|
||||||
useLiveData,
|
|
||||||
useServices,
|
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { type ReactNode, useCallback, useEffect, useState } from 'react';
|
import { type ReactNode, useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { AffineShapeIcon, FavoriteTag } from '..';
|
import { AffineShapeIcon, FavoriteTag } from '..';
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import { toast, useConfirmModal } from '@affine/component';
|
import { toast, useConfirmModal } from '@affine/component';
|
||||||
import { useBlockSuiteDocMeta } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
import { useBlockSuiteDocMeta } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
||||||
import { CollectionService } from '@affine/core/modules/collection';
|
import { CollectionService } from '@affine/core/modules/collection';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import type { Tag } from '@affine/core/modules/tag';
|
import type { Tag } from '@affine/core/modules/tag';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import type { Collection, Filter } from '@affine/env/filter';
|
import type { Collection, Filter } from '@affine/env/filter';
|
||||||
import { Trans, useI18n } from '@affine/i18n';
|
import { Trans, useI18n } from '@affine/i18n';
|
||||||
import type { DocMeta } from '@blocksuite/affine/store';
|
import type { DocMeta } from '@blocksuite/affine/store';
|
||||||
import { DocsService, useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo, useRef, useState } from 'react';
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
||||||
|
|
||||||
import { ListFloatingToolbar } from '../components/list-floating-toolbar';
|
import { ListFloatingToolbar } from '../components/list-floating-toolbar';
|
||||||
|
|||||||
@@ -9,11 +9,14 @@ import {
|
|||||||
import { useBlockSuiteMetaHelper } from '@affine/core/components/hooks/affine/use-block-suite-meta-helper';
|
import { useBlockSuiteMetaHelper } from '@affine/core/components/hooks/affine/use-block-suite-meta-helper';
|
||||||
import { useCatchEventCallback } from '@affine/core/components/hooks/use-catch-event-hook';
|
import { useCatchEventCallback } from '@affine/core/components/hooks/use-catch-event-hook';
|
||||||
import { WorkspaceDialogService } from '@affine/core/modules/dialogs';
|
import { WorkspaceDialogService } from '@affine/core/modules/dialogs';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import {
|
import {
|
||||||
CompatibleFavoriteItemsAdapter,
|
CompatibleFavoriteItemsAdapter,
|
||||||
FavoriteService,
|
FavoriteService,
|
||||||
} from '@affine/core/modules/favorite';
|
} from '@affine/core/modules/favorite';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import { WorkbenchService } from '@affine/core/modules/workbench';
|
import { WorkbenchService } from '@affine/core/modules/workbench';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import type { Collection, DeleteCollectionInfo } from '@affine/env/filter';
|
import type { Collection, DeleteCollectionInfo } from '@affine/env/filter';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
@@ -32,14 +35,7 @@ import {
|
|||||||
ResetIcon,
|
ResetIcon,
|
||||||
SplitViewIcon,
|
SplitViewIcon,
|
||||||
} from '@blocksuite/icons/rc';
|
} from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService, useServices } from '@toeverything/infra';
|
||||||
DocsService,
|
|
||||||
FeatureFlagService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
useServices,
|
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import type { MouseEvent } from 'react';
|
import type { MouseEvent } from 'react';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { Tag } from '@affine/core/modules/tag';
|
import type { Tag } from '@affine/core/modules/tag';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { Trans } from '@affine/i18n';
|
import { Trans } from '@affine/i18n';
|
||||||
import { useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo, useRef, useState } from 'react';
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
||||||
|
|
||||||
import { ListFloatingToolbar } from '../components/list-floating-toolbar';
|
import { ListFloatingToolbar } from '../components/list-floating-toolbar';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useService, WorkspaceService } from '@toeverything/infra';
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
|
import { useService } from '@toeverything/infra';
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { atomWithStorage } from 'jotai/utils';
|
import { atomWithStorage } from 'jotai/utils';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Menu, MenuItem, usePromptModal } from '@affine/component';
|
|||||||
import { useDeleteCollectionInfo } from '@affine/core/components/hooks/affine/use-delete-collection-info';
|
import { useDeleteCollectionInfo } from '@affine/core/components/hooks/affine/use-delete-collection-info';
|
||||||
import { WorkspaceDialogService } from '@affine/core/modules/dialogs';
|
import { WorkspaceDialogService } from '@affine/core/modules/dialogs';
|
||||||
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import { WorkbenchService } from '@affine/core/modules/workbench';
|
import { WorkbenchService } from '@affine/core/modules/workbench';
|
||||||
import type { Collection } from '@affine/env/filter';
|
import type { Collection } from '@affine/env/filter';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
@@ -14,12 +15,7 @@ import {
|
|||||||
PlusIcon,
|
PlusIcon,
|
||||||
SplitViewIcon,
|
SplitViewIcon,
|
||||||
} from '@blocksuite/icons/rc';
|
} from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService, useServices } from '@toeverything/infra';
|
||||||
FeatureFlagService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
useServices,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import type { PropsWithChildren, ReactElement } from 'react';
|
import type { PropsWithChildren, ReactElement } from 'react';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { toast, useConfirmModal } from '@affine/component';
|
import { toast, useConfirmModal } from '@affine/component';
|
||||||
import { useBlockSuiteMetaHelper } from '@affine/core/components/hooks/affine/use-block-suite-meta-helper';
|
import { useBlockSuiteMetaHelper } from '@affine/core/components/hooks/affine/use-block-suite-meta-helper';
|
||||||
import { useBlockSuiteDocMeta } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
import { useBlockSuiteDocMeta } from '@affine/core/components/hooks/use-block-suite-page-meta';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { Trans, useI18n } from '@affine/i18n';
|
import { Trans, useI18n } from '@affine/i18n';
|
||||||
import type { DocMeta } from '@blocksuite/affine/store';
|
import type { DocMeta } from '@blocksuite/affine/store';
|
||||||
import { useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo, useRef, useState } from 'react';
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
||||||
|
|
||||||
import { ListFloatingToolbar } from './components/list-floating-toolbar';
|
import { ListFloatingToolbar } from './components/list-floating-toolbar';
|
||||||
|
|||||||
@@ -14,22 +14,22 @@ import {
|
|||||||
GraphQLService,
|
GraphQLService,
|
||||||
} from '@affine/core/modules/cloud';
|
} from '@affine/core/modules/cloud';
|
||||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||||
import { useRegisterNavigationCommands } from '@affine/core/modules/navigation/view/use-register-navigation-commands';
|
import { useRegisterNavigationCommands } from '@affine/core/modules/navigation/view/use-register-navigation-commands';
|
||||||
import { QuickSearchContainer } from '@affine/core/modules/quicksearch';
|
import { QuickSearchContainer } from '@affine/core/modules/quicksearch';
|
||||||
import { WorkbenchService } from '@affine/core/modules/workbench';
|
import { WorkbenchService } from '@affine/core/modules/workbench';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import track from '@affine/track';
|
import track from '@affine/track';
|
||||||
import { type DocMode, ZipTransformer } from '@blocksuite/affine/blocks';
|
import { type DocMode, ZipTransformer } from '@blocksuite/affine/blocks';
|
||||||
import {
|
import {
|
||||||
DocsService,
|
|
||||||
effect,
|
effect,
|
||||||
fromPromise,
|
fromPromise,
|
||||||
onStart,
|
onStart,
|
||||||
throwIfAborted,
|
throwIfAborted,
|
||||||
useService,
|
useService,
|
||||||
useServices,
|
useServices,
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
import { Tooltip } from '@affine/component/ui/tooltip';
|
import { Tooltip } from '@affine/component/ui/tooltip';
|
||||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||||
import type { SettingTab } from '@affine/core/modules/dialogs/constant';
|
import type { SettingTab } from '@affine/core/modules/dialogs/constant';
|
||||||
|
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||||
import { UrlService } from '@affine/core/modules/url';
|
import { UrlService } from '@affine/core/modules/url';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { CloseIcon, NewIcon } from '@blocksuite/icons/rc';
|
import { CloseIcon, NewIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService, useServices } from '@toeverything/infra';
|
||||||
GlobalContextService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
useServices,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
import { ContactIcon, HelpIcon, KeyboardIcon } from './icons';
|
import { ContactIcon, HelpIcon, KeyboardIcon } from './icons';
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { Button } from '@affine/component/ui/button';
|
import { Button } from '@affine/component/ui/button';
|
||||||
import { ConfirmModal } from '@affine/component/ui/modal';
|
import { ConfirmModal } from '@affine/component/ui/modal';
|
||||||
|
import { DocService } from '@affine/core/modules/doc';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { DeleteIcon, ResetIcon } from '@blocksuite/icons/rc';
|
import { DeleteIcon, ResetIcon } from '@blocksuite/icons/rc';
|
||||||
import { DocService, useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
import { useAppSettingHelper } from '../../../components/hooks/affine/use-app-setting-helper';
|
import { useAppSettingHelper } from '../../../components/hooks/affine/use-app-setting-helper';
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import {
|
|||||||
} from '@affine/core/modules/explorer';
|
} from '@affine/core/modules/explorer';
|
||||||
import { ExplorerTags } from '@affine/core/modules/explorer/views/sections/tags';
|
import { ExplorerTags } from '@affine/core/modules/explorer/views/sections/tags';
|
||||||
import { CMDKQuickSearchService } from '@affine/core/modules/quicksearch/services/cmdk';
|
import { CMDKQuickSearchService } from '@affine/core/modules/quicksearch/services/cmdk';
|
||||||
|
import type { Workspace } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import type { Doc } from '@blocksuite/affine/store';
|
import type { Doc } from '@blocksuite/affine/store';
|
||||||
@@ -32,7 +33,6 @@ import {
|
|||||||
JournalIcon,
|
JournalIcon,
|
||||||
SettingsIcon,
|
SettingsIcon,
|
||||||
} from '@blocksuite/icons/rc';
|
} from '@blocksuite/icons/rc';
|
||||||
import type { Workspace } from '@toeverything/infra';
|
|
||||||
import { useLiveData, useService, useServices } from '@toeverything/infra';
|
import { useLiveData, useService, useServices } from '@toeverything/infra';
|
||||||
import type { ReactElement } from 'react';
|
import type { ReactElement } from 'react';
|
||||||
import { memo, useCallback } from 'react';
|
import { memo, useCallback } from 'react';
|
||||||
|
|||||||
@@ -4,14 +4,11 @@ import {
|
|||||||
useDropTarget,
|
useDropTarget,
|
||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
import { MenuLinkItem } from '@affine/core/modules/app-sidebar/views';
|
import { MenuLinkItem } from '@affine/core/modules/app-sidebar/views';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
|
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||||
import type { AffineDNDData } from '@affine/core/types/dnd';
|
import type { AffineDNDData } from '@affine/core/types/dnd';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
DocsService,
|
|
||||||
GlobalContextService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
|
|
||||||
export const TrashButton = () => {
|
export const TrashButton = () => {
|
||||||
const t = useI18n();
|
const t = useI18n();
|
||||||
|
|||||||
@@ -3,14 +3,11 @@ import { AuthInput, ModalHeader } from '@affine/component/auth-components';
|
|||||||
import { OAuth } from '@affine/core/components/affine/auth/oauth';
|
import { OAuth } from '@affine/core/components/affine/auth/oauth';
|
||||||
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
|
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
|
||||||
import { AuthService, ServerService } from '@affine/core/modules/cloud';
|
import { AuthService, ServerService } from '@affine/core/modules/cloud';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import { ServerDeploymentType } from '@affine/graphql';
|
import { ServerDeploymentType } from '@affine/graphql';
|
||||||
import { Trans, useI18n } from '@affine/i18n';
|
import { Trans, useI18n } from '@affine/i18n';
|
||||||
import { ArrowRightBigIcon, PublishIcon } from '@blocksuite/icons/rc';
|
import { ArrowRightBigIcon, PublishIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
FeatureFlagService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { cssVar } from '@toeverything/theme';
|
import { cssVar } from '@toeverything/theme';
|
||||||
import {
|
import {
|
||||||
type Dispatch,
|
type Dispatch,
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import { BrowserWarning, LocalDemoTips } from '@affine/component/affine-banner';
|
import { BrowserWarning, LocalDemoTips } from '@affine/component/affine-banner';
|
||||||
import { Trans, useI18n } from '@affine/i18n';
|
import { Trans, useI18n } from '@affine/i18n';
|
||||||
import { useLiveData, useService, type Workspace } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
import { useEnableCloud } from '../components/hooks/affine/use-enable-cloud';
|
import { useEnableCloud } from '../components/hooks/affine/use-enable-cloud';
|
||||||
import { AuthService } from '../modules/cloud';
|
import { AuthService } from '../modules/cloud';
|
||||||
import { GlobalDialogService } from '../modules/dialogs';
|
import { GlobalDialogService } from '../modules/dialogs';
|
||||||
|
import type { Workspace } from '../modules/workspace';
|
||||||
|
|
||||||
const minimumChromeVersion = 106;
|
const minimumChromeVersion = 106;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
|
import { Avatar, type AvatarProps } from '@affine/component';
|
||||||
import {
|
import {
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
type WorkspaceMetadata,
|
type WorkspaceMetadata,
|
||||||
WorkspacesService,
|
WorkspacesService,
|
||||||
} from '@toeverything/infra';
|
} from '@affine/core/modules/workspace';
|
||||||
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { useEffect, useLayoutEffect, useState } from 'react';
|
import { useEffect, useLayoutEffect, useState } from 'react';
|
||||||
|
|
||||||
import { Avatar, type AvatarProps } from '../../ui/avatar';
|
|
||||||
|
|
||||||
const cache = new Map<string, { imageBitmap: ImageBitmap; key: string }>();
|
const cache = new Map<string, { imageBitmap: ImageBitmap; key: string }>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
import { Menu, type MenuProps } from '@affine/component';
|
import { Menu, type MenuProps } from '@affine/component';
|
||||||
import { useNavigateHelper } from '@affine/core/components/hooks/use-navigate-helper';
|
import { useNavigateHelper } from '@affine/core/components/hooks/use-navigate-helper';
|
||||||
import { track } from '@affine/track';
|
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||||
import {
|
import {
|
||||||
GlobalContextService,
|
|
||||||
useLiveData,
|
|
||||||
useServices,
|
|
||||||
type WorkspaceMetadata,
|
type WorkspaceMetadata,
|
||||||
WorkspacesService,
|
WorkspacesService,
|
||||||
} from '@toeverything/infra';
|
} from '@affine/core/modules/workspace';
|
||||||
|
import { track } from '@affine/track';
|
||||||
|
import { useLiveData, useServices } from '@toeverything/infra';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { UserWithWorkspaceList } from './user-with-workspace-list';
|
import { UserWithWorkspaceList } from './user-with-workspace-list';
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
import { MenuItem } from '@affine/component/ui/menu';
|
import { MenuItem } from '@affine/component/ui/menu';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { PlusIcon } from '@blocksuite/icons/rc';
|
import { PlusIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
FeatureFlagService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
|
|
||||||
import * as styles from './index.css';
|
import * as styles from './index.css';
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
import { MenuItem } from '@affine/component/ui/menu';
|
import { MenuItem } from '@affine/component/ui/menu';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { ImportIcon, PlusIcon } from '@blocksuite/icons/rc';
|
import { ImportIcon, PlusIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
FeatureFlagService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
|
|
||||||
import * as styles from './index.css';
|
import * as styles from './index.css';
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,15 @@ import { Divider } from '@affine/component/ui/divider';
|
|||||||
import { MenuItem } from '@affine/component/ui/menu';
|
import { MenuItem } from '@affine/component/ui/menu';
|
||||||
import { AuthService } from '@affine/core/modules/cloud';
|
import { AuthService } from '@affine/core/modules/cloud';
|
||||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
|
import {
|
||||||
|
type WorkspaceMetadata,
|
||||||
|
WorkspacesService,
|
||||||
|
} from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import { Logo1Icon } from '@blocksuite/icons/rc';
|
import { Logo1Icon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
FeatureFlagService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
type WorkspaceMetadata,
|
|
||||||
WorkspacesService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import { AddServer } from './add-server';
|
import { AddServer } from './add-server';
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ import { useNavigateHelper } from '@affine/core/components/hooks/use-navigate-he
|
|||||||
import type { Server } from '@affine/core/modules/cloud';
|
import type { Server } from '@affine/core/modules/cloud';
|
||||||
import { AuthService, ServersService } from '@affine/core/modules/cloud';
|
import { AuthService, ServersService } from '@affine/core/modules/cloud';
|
||||||
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
import { GlobalDialogService } from '@affine/core/modules/dialogs';
|
||||||
|
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||||
|
import {
|
||||||
|
type WorkspaceMetadata,
|
||||||
|
WorkspaceService,
|
||||||
|
WorkspacesService,
|
||||||
|
} from '@affine/core/modules/workspace';
|
||||||
import { ServerDeploymentType } from '@affine/graphql';
|
import { ServerDeploymentType } from '@affine/graphql';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import {
|
import {
|
||||||
@@ -20,15 +26,11 @@ import {
|
|||||||
PlusIcon,
|
PlusIcon,
|
||||||
TeamWorkspaceIcon,
|
TeamWorkspaceIcon,
|
||||||
} from '@blocksuite/icons/rc';
|
} from '@blocksuite/icons/rc';
|
||||||
import type { WorkspaceMetadata } from '@toeverything/infra';
|
|
||||||
import {
|
import {
|
||||||
FrameworkScope,
|
FrameworkScope,
|
||||||
GlobalContextService,
|
|
||||||
useLiveData,
|
useLiveData,
|
||||||
useService,
|
useService,
|
||||||
useServiceOptional,
|
useServiceOptional,
|
||||||
WorkspaceService,
|
|
||||||
WorkspacesService,
|
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
import { Button, Skeleton, Tooltip } from '@affine/component';
|
import { Button, Skeleton, Tooltip } from '@affine/component';
|
||||||
import { Loading } from '@affine/component/ui/loading';
|
import { Loading } from '@affine/component/ui/loading';
|
||||||
import { WorkspaceAvatar } from '@affine/component/workspace-avatar';
|
|
||||||
import { useSystemOnline } from '@affine/core/components/hooks/use-system-online';
|
import { useSystemOnline } from '@affine/core/components/hooks/use-system-online';
|
||||||
import { useWorkspace } from '@affine/core/components/hooks/use-workspace';
|
import { useWorkspace } from '@affine/core/components/hooks/use-workspace';
|
||||||
import { useWorkspaceInfo } from '@affine/core/components/hooks/use-workspace-info';
|
import { useWorkspaceInfo } from '@affine/core/components/hooks/use-workspace-info';
|
||||||
|
import type {
|
||||||
|
WorkspaceMetadata,
|
||||||
|
WorkspaceProfileInfo,
|
||||||
|
} from '@affine/core/modules/workspace';
|
||||||
import { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';
|
import { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';
|
||||||
import {
|
import {
|
||||||
ArrowDownSmallIcon,
|
ArrowDownSmallIcon,
|
||||||
@@ -17,17 +20,14 @@ import {
|
|||||||
TeamWorkspaceIcon,
|
TeamWorkspaceIcon,
|
||||||
UnsyncIcon,
|
UnsyncIcon,
|
||||||
} from '@blocksuite/icons/rc';
|
} from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData } from '@toeverything/infra';
|
||||||
useLiveData,
|
|
||||||
type WorkspaceMetadata,
|
|
||||||
type WorkspaceProfileInfo,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { cssVar } from '@toeverything/theme';
|
import { cssVar } from '@toeverything/theme';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type { HTMLAttributes } from 'react';
|
import type { HTMLAttributes } from 'react';
|
||||||
import { forwardRef, useCallback, useEffect, useState } from 'react';
|
import { forwardRef, useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { useCatchEventCallback } from '../../hooks/use-catch-event-hook';
|
import { useCatchEventCallback } from '../../hooks/use-catch-event-hook';
|
||||||
|
import { WorkspaceAvatar } from '../../workspace-avatar';
|
||||||
import * as styles from './styles.css';
|
import * as styles from './styles.css';
|
||||||
export { PureWorkspaceCard } from './pure-workspace-card';
|
export { PureWorkspaceCard } from './pure-workspace-card';
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { Skeleton } from '@affine/component';
|
import { Skeleton } from '@affine/component';
|
||||||
import { WorkspaceAvatar } from '@affine/component/workspace-avatar';
|
|
||||||
import { useWorkspaceInfo } from '@affine/core/components/hooks/use-workspace-info';
|
import { useWorkspaceInfo } from '@affine/core/components/hooks/use-workspace-info';
|
||||||
|
import type { WorkspaceMetadata } from '@affine/core/modules/workspace';
|
||||||
import { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';
|
import { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';
|
||||||
import { DoneIcon } from '@blocksuite/icons/rc';
|
import { DoneIcon } from '@blocksuite/icons/rc';
|
||||||
import { type WorkspaceMetadata } from '@toeverything/infra';
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type { HTMLAttributes } from 'react';
|
import type { HTMLAttributes } from 'react';
|
||||||
import { forwardRef } from 'react';
|
import { forwardRef } from 'react';
|
||||||
|
|
||||||
|
import { WorkspaceAvatar } from '../../workspace-avatar';
|
||||||
import * as styles from './styles.css';
|
import * as styles from './styles.css';
|
||||||
|
|
||||||
export const PureWorkspaceCard = forwardRef<
|
export const PureWorkspaceCard = forwardRef<
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
import {
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
DocsService,
|
import { GlobalContextService } from '@affine/core/modules/global-context';
|
||||||
GlobalContextService,
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type { PropsWithChildren, ReactElement } from 'react';
|
import type { PropsWithChildren, ReactElement } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import {
|
|||||||
} from '@affine/core/modules/app-sidebar/views';
|
} from '@affine/core/modules/app-sidebar/views';
|
||||||
import { AppTabsHeader } from '@affine/core/modules/app-tabs-header';
|
import { AppTabsHeader } from '@affine/core/modules/app-tabs-header';
|
||||||
import { NavigationButtons } from '@affine/core/modules/navigation';
|
import { NavigationButtons } from '@affine/core/modules/navigation';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import {
|
import {
|
||||||
useLiveData,
|
useLiveData,
|
||||||
useService,
|
useService,
|
||||||
useServiceOptional,
|
useServiceOptional,
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import {
|
|||||||
type ListItem,
|
type ListItem,
|
||||||
ListScrollContainer,
|
ListScrollContainer,
|
||||||
} from '@affine/core/components/page-list';
|
} from '@affine/core/components/page-list';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
||||||
import type { Collection } from '@affine/env/filter';
|
import type { Collection } from '@affine/env/filter';
|
||||||
import { Trans, useI18n } from '@affine/i18n';
|
import { Trans, useI18n } from '@affine/i18n';
|
||||||
@@ -18,7 +19,7 @@ import {
|
|||||||
PageIcon,
|
PageIcon,
|
||||||
ToggleCollapseIcon,
|
ToggleCollapseIcon,
|
||||||
} from '@blocksuite/icons/rc';
|
} from '@blocksuite/icons/rc';
|
||||||
import { DocsService, useLiveData, useService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { cssVar } from '@toeverything/theme';
|
import { cssVar } from '@toeverything/theme';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type { ReactNode } from 'react';
|
import type { ReactNode } from 'react';
|
||||||
|
|||||||
@@ -8,14 +8,11 @@ import {
|
|||||||
type GLOBAL_DIALOG_SCHEMA,
|
type GLOBAL_DIALOG_SCHEMA,
|
||||||
GlobalDialogService,
|
GlobalDialogService,
|
||||||
} from '@affine/core/modules/dialogs';
|
} from '@affine/core/modules/dialogs';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
|
import { WorkspacesService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { track } from '@affine/track';
|
import { track } from '@affine/track';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
FeatureFlagService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
WorkspacesService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
import { buildShowcaseWorkspace } from '../../../utils/first-app-data';
|
import { buildShowcaseWorkspace } from '../../../utils/first-app-data';
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { Modal, Scrollable } from '@affine/component';
|
|||||||
import { BlocksuiteHeaderTitle } from '@affine/core/components/blocksuite/block-suite-header/title';
|
import { BlocksuiteHeaderTitle } from '@affine/core/components/blocksuite/block-suite-header/title';
|
||||||
import type { DialogComponentProps } from '@affine/core/modules/dialogs';
|
import type { DialogComponentProps } from '@affine/core/modules/dialogs';
|
||||||
import type { WORKSPACE_DIALOG_SCHEMA } from '@affine/core/modules/dialogs/constant';
|
import type { WORKSPACE_DIALOG_SCHEMA } from '@affine/core/modules/dialogs/constant';
|
||||||
import type { Doc } from '@toeverything/infra';
|
import { type Doc, DocsService } from '@affine/core/modules/doc';
|
||||||
import { DocsService, FrameworkScope, useService } from '@toeverything/infra';
|
import { FrameworkScope, useService } from '@toeverything/infra';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { InfoTable } from './info-modal';
|
import { InfoTable } from './info-modal';
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import {
|
|||||||
} from '@affine/component';
|
} from '@affine/component';
|
||||||
import { CreatePropertyMenuItems } from '@affine/core/components/doc-properties/menu/create-doc-property';
|
import { CreatePropertyMenuItems } from '@affine/core/components/doc-properties/menu/create-doc-property';
|
||||||
import { DocPropertyRow } from '@affine/core/components/doc-properties/table';
|
import { DocPropertyRow } from '@affine/core/components/doc-properties/table';
|
||||||
|
import type { DocCustomPropertyInfo } from '@affine/core/modules/db';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
import { DocDatabaseBacklinkInfo } from '@affine/core/modules/doc-info';
|
import { DocDatabaseBacklinkInfo } from '@affine/core/modules/doc-info';
|
||||||
import type {
|
import type {
|
||||||
DatabaseRow,
|
DatabaseRow,
|
||||||
@@ -16,13 +18,7 @@ import { DocsSearchService } from '@affine/core/modules/docs-search';
|
|||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import track from '@affine/track';
|
import track from '@affine/track';
|
||||||
import { PlusIcon } from '@blocksuite/icons/rc';
|
import { PlusIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { LiveData, useLiveData, useServices } from '@toeverything/infra';
|
||||||
type DocCustomPropertyInfo,
|
|
||||||
DocsService,
|
|
||||||
LiveData,
|
|
||||||
useLiveData,
|
|
||||||
useServices,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import * as styles from './info-modal.css';
|
import * as styles from './info-modal.css';
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
import { PropertyName, PropertyRoot, PropertyValue } from '@affine/component';
|
import { PropertyName, PropertyRoot, PropertyValue } from '@affine/component';
|
||||||
|
import { DocsService } from '@affine/core/modules/doc';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { i18nTime, useI18n } from '@affine/i18n';
|
import { i18nTime, useI18n } from '@affine/i18n';
|
||||||
import { DateTimeIcon, HistoryIcon } from '@blocksuite/icons/rc';
|
import { DateTimeIcon, HistoryIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
DocsService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
WorkspaceService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type { ConfigType } from 'dayjs';
|
import type { ConfigType } from 'dayjs';
|
||||||
import { useDebouncedValue } from 'foxact/use-debounced-value';
|
import { useDebouncedValue } from 'foxact/use-debounced-value';
|
||||||
|
|||||||
@@ -12,14 +12,10 @@ import {
|
|||||||
type GLOBAL_DIALOG_SCHEMA,
|
type GLOBAL_DIALOG_SCHEMA,
|
||||||
GlobalDialogService,
|
GlobalDialogService,
|
||||||
} from '@affine/core/modules/dialogs';
|
} from '@affine/core/modules/dialogs';
|
||||||
|
import { WorkspacesService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { CloudWorkspaceIcon } from '@blocksuite/icons/rc';
|
import { CloudWorkspaceIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { FrameworkScope, useLiveData, useService } from '@toeverything/infra';
|
||||||
FrameworkScope,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
WorkspacesService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
import * as styles from './dialog.css';
|
import * as styles from './dialog.css';
|
||||||
|
|||||||
@@ -12,15 +12,14 @@ import {
|
|||||||
ImportTemplateService,
|
ImportTemplateService,
|
||||||
TemplateDownloaderService,
|
TemplateDownloaderService,
|
||||||
} from '@affine/core/modules/import-template';
|
} from '@affine/core/modules/import-template';
|
||||||
|
import {
|
||||||
|
type WorkspaceMetadata,
|
||||||
|
WorkspacesService,
|
||||||
|
} from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import type { DocMode } from '@blocksuite/affine/blocks';
|
import type { DocMode } from '@blocksuite/affine/blocks';
|
||||||
import { AllDocsIcon } from '@blocksuite/icons/rc';
|
import { AllDocsIcon } from '@blocksuite/icons/rc';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
type WorkspaceMetadata,
|
|
||||||
WorkspacesService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { cssVar } from '@toeverything/theme';
|
import { cssVar } from '@toeverything/theme';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,12 @@ import {
|
|||||||
type DialogComponentProps,
|
type DialogComponentProps,
|
||||||
type GLOBAL_DIALOG_SCHEMA,
|
type GLOBAL_DIALOG_SCHEMA,
|
||||||
} from '@affine/core/modules/dialogs';
|
} from '@affine/core/modules/dialogs';
|
||||||
|
import { WorkspacesService } from '@affine/core/modules/workspace';
|
||||||
import { _addLocalWorkspace } from '@affine/core/modules/workspace-engine';
|
import { _addLocalWorkspace } from '@affine/core/modules/workspace-engine';
|
||||||
import { DebugLogger } from '@affine/debug';
|
import { DebugLogger } from '@affine/debug';
|
||||||
import { apis } from '@affine/electron-api';
|
import { apis } from '@affine/electron-api';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { useService, WorkspacesService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLayoutEffect } from 'react';
|
import { useLayoutEffect } from 'react';
|
||||||
|
|
||||||
const logger = new DebugLogger('ImportWorkspaceDialog');
|
const logger = new DebugLogger('ImportWorkspaceDialog');
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import type {
|
|||||||
WORKSPACE_DIALOG_SCHEMA,
|
WORKSPACE_DIALOG_SCHEMA,
|
||||||
} from '@affine/core/modules/dialogs';
|
} from '@affine/core/modules/dialogs';
|
||||||
import { UrlService } from '@affine/core/modules/url';
|
import { UrlService } from '@affine/core/modules/url';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { DebugLogger } from '@affine/debug';
|
import { DebugLogger } from '@affine/debug';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import track from '@affine/track';
|
import track from '@affine/track';
|
||||||
@@ -24,7 +25,7 @@ import {
|
|||||||
PageIcon,
|
PageIcon,
|
||||||
ZipIcon,
|
ZipIcon,
|
||||||
} from '@blocksuite/icons/rc';
|
} from '@blocksuite/icons/rc';
|
||||||
import { useService, WorkspaceService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { cssVar } from '@toeverything/theme';
|
import { cssVar } from '@toeverything/theme';
|
||||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ import { CollectionService } from '@affine/core/modules/collection';
|
|||||||
import type { DialogComponentProps } from '@affine/core/modules/dialogs';
|
import type { DialogComponentProps } from '@affine/core/modules/dialogs';
|
||||||
import type { WORKSPACE_DIALOG_SCHEMA } from '@affine/core/modules/dialogs/constant';
|
import type { WORKSPACE_DIALOG_SCHEMA } from '@affine/core/modules/dialogs/constant';
|
||||||
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/favorite';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { cssVar } from '@toeverything/theme';
|
import { cssVar } from '@toeverything/theme';
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ import type {
|
|||||||
} from '@affine/core/modules/dialogs';
|
} from '@affine/core/modules/dialogs';
|
||||||
import { FavoriteService } from '@affine/core/modules/favorite';
|
import { FavoriteService } from '@affine/core/modules/favorite';
|
||||||
import { TagService } from '@affine/core/modules/tag';
|
import { TagService } from '@affine/core/modules/tag';
|
||||||
|
import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import { useLiveData, useService, WorkspaceService } from '@toeverything/infra';
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
import { cssVar } from '@toeverything/theme';
|
import { cssVar } from '@toeverything/theme';
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -6,12 +6,9 @@ import {
|
|||||||
SettingWrapper,
|
SettingWrapper,
|
||||||
} from '@affine/component/setting-components';
|
} from '@affine/component/setting-components';
|
||||||
import { LanguageMenu } from '@affine/core/components/affine/language-menu';
|
import { LanguageMenu } from '@affine/core/components/affine/language-menu';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import { useI18n } from '@affine/i18n';
|
import { useI18n } from '@affine/i18n';
|
||||||
import {
|
import { useLiveData, useService } from '@toeverything/infra';
|
||||||
FeatureFlagService,
|
|
||||||
useLiveData,
|
|
||||||
useService,
|
|
||||||
} from '@toeverything/infra';
|
|
||||||
import { useTheme } from 'next-themes';
|
import { useTheme } from 'next-themes';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user