refactor: lexical (#1954)

This commit is contained in:
Mo
2022-11-07 10:42:44 -06:00
committed by GitHub
parent 99bae83f8b
commit 2ed01a071c
182 changed files with 8525 additions and 1126 deletions

View File

@@ -40,7 +40,6 @@ import {
DeviceInterface,
isMobileDevice,
} from '@standardnotes/services'
import { BlocksComponentViewer } from './BlocksComponentViewer'
const DESKTOP_URL_PREFIX = 'sn://'
const LOCAL_HOST = 'localhost'
@@ -181,34 +180,6 @@ export class SNComponentManager
return viewer
}
public createBlockComponentViewer(
component: SNComponent,
noteId: string,
blockId: string,
actionObserver?: ActionObserver,
): ComponentViewerInterface {
const viewer = new BlocksComponentViewer(
component,
noteId,
blockId,
this.itemManager,
this.syncService,
this.alertService,
this.preferencesSerivce,
this.featuresService,
this.environment,
this.platform,
{
runWithPermissions: this.runWithPermissions.bind(this),
urlsForActiveThemes: this.urlsForActiveThemes.bind(this),
},
this.urlForComponent(component),
actionObserver,
)
this.viewers.push(viewer)
return viewer
}
public destroyComponentViewer(viewer: ComponentViewerInterface): void {
viewer.destroy()
removeFromArray(this.viewers, viewer)