feat(web): extract ui-services package

This commit is contained in:
Karol Sójko
2022-08-04 15:13:30 +02:00
parent c72a407095
commit 7e251262d7
161 changed files with 1105 additions and 824 deletions

View File

@@ -0,0 +1,29 @@
import {
ActionObserver,
ComponentEventObserver,
ComponentMessage,
DecryptedItemInterface,
SNComponent,
} from '@standardnotes/models'
import { FeatureStatus } from '../Feature/FeatureStatus'
import { ComponentViewerError } from './ComponentViewerError'
export interface ComponentViewerInterface {
readonly component: SNComponent
readonly url?: string
identifier: string
lockReadonly: boolean
sessionKey?: string
overrideContextItem?: DecryptedItemInterface
get componentUuid(): string
destroy(): void
setReadonly(readonly: boolean): void
getFeatureStatus(): FeatureStatus
shouldRender(): boolean
getError(): ComponentViewerError | undefined
setWindow(window: Window): void
addEventObserver(observer: ComponentEventObserver): () => void
addActionObserver(observer: ActionObserver): () => void
postActiveThemes(): void
handleMessage(message: ComponentMessage): void
}