feat(core): docs search service (#7213)

This commit is contained in:
EYHN
2024-07-02 09:17:46 +00:00
parent 3870801ebb
commit 15e99c7819
10 changed files with 638 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ import type { Doc as YDoc } from 'yjs';
import { Entity } from '../../../framework';
import { AwarenessEngine, BlobEngine, DocEngine } from '../../../sync';
import { throwIfAborted } from '../../../utils';
import { WorkspaceEngineBeforeStart } from '../events';
import type { WorkspaceEngineProvider } from '../providers/flavour';
import type { WorkspaceService } from '../services/workspace';
@@ -33,6 +34,7 @@ export class WorkspaceEngine extends Entity<{
}
start() {
this.eventBus.emit(WorkspaceEngineBeforeStart, this);
this.doc.start();
this.awareness.connect(this.workspaceService.workspace.awareness);
this.blob.start();

View File

@@ -0,0 +1,6 @@
import { createEvent } from '../../../framework';
import type { WorkspaceEngine } from '../entities/engine';
export const WorkspaceEngineBeforeStart = createEvent<WorkspaceEngine>(
'WorkspaceEngineBeforeStart'
);

View File

@@ -1,5 +1,6 @@
export type { WorkspaceProfileInfo } from './entities/profile';
export { Workspace } from './entities/workspace';
export { WorkspaceEngineBeforeStart } from './events';
export { globalBlockSuiteSchema } from './global-schema';
export type { WorkspaceMetadata } from './metadata';
export type { WorkspaceOpenOptions } from './open-options';