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
+4 -3
View File
@@ -23,6 +23,7 @@ export {
} from './storage';
export class DocEngine {
readonly clientId: string;
localPart: DocEngineLocalPart;
remotePart: DocEngineRemotePart | null;
@@ -80,11 +81,11 @@ export class DocEngine {
storage: DocStorage,
private readonly server?: DocServer | null
) {
const clientId = nanoid();
this.clientId = nanoid();
this.storage = new DocStorageInner(storage);
this.localPart = new DocEngineLocalPart(clientId, this.storage);
this.localPart = new DocEngineLocalPart(this.clientId, this.storage);
this.remotePart = this.server
? new DocEngineRemotePart(clientId, this.storage, this.server)
? new DocEngineRemotePart(this.clientId, this.storage, this.server)
: null;
}