@blinkk/editor
Version:
Structured content editor with live previews.
63 lines (62 loc) • 2.32 kB
TypeScript
import { BasePart, Part } from '.';
import { EditorConfig, TemplateResult } from '@blinkk/selective-edit';
import { Base } from '@blinkk/selective-edit/dist/src/mixins';
import { ContentFooterPart } from './content/footer';
import { ContentHeaderPart } from './content/header';
import { ContentSectionPart } from './content/section';
import { ContentToolbarPart } from './content/toolbar';
import { DataStorage } from '../../utility/dataStorage';
import { EditorState } from '../state';
import { LiveEditor } from '../editor';
export interface ContentPartConfig {
/**
* Configuration for creating the selective editor.
*/
selectiveConfig: EditorConfig;
state: EditorState;
/**
* Storage class for working with settings.
*/
storage: DataStorage;
}
export interface ContentParts {
footer: ContentFooterPart;
header: ContentHeaderPart;
toolbar: ContentToolbarPart;
}
export declare class ContentPart extends BasePart implements Part {
config: ContentPartConfig;
contentSettings: ContentSettings;
parts: ContentParts;
sections: Array<ContentSectionPart>;
constructor(config: ContentPartConfig);
classesForPart(): Record<string, boolean>;
get isExpanded(): boolean;
template(editor: LiveEditor): TemplateResult;
templateSections(editor: LiveEditor): TemplateResult;
}
declare const ContentSettings_base: {
new (...args: any[]): {
_listeners?: Record<string, ((...args: any) => void)[]> | undefined;
addListener(eventName: string, callback: (...args: any) => void): void;
readonly listeners: Record<string, ((...args: any) => void)[]>;
triggerListener(eventName: string, ...args: any): void;
};
} & typeof Base;
export declare class ContentSettings extends ContentSettings_base {
protected _highlightAuto?: boolean;
protected _highlightDirty?: boolean;
protected _showDeepLinks?: boolean;
storage: DataStorage;
constructor(storage: DataStorage);
get highlightAuto(): boolean;
set highlightAuto(value: boolean);
get highlightDirty(): boolean;
set highlightDirty(value: boolean);
get showDeepLinks(): boolean;
set showDeepLinks(value: boolean);
toggleHighlightAuto(): void;
toggleHighlightDirty(): void;
toggleShowDeepLinks(): void;
}
export {};