import * as _codemirror_state from '@codemirror/state'; import { EditorState } from '@codemirror/state'; import { EditorView } from '@codemirror/view'; import * as i5 from '@thescaffold/ngx-core'; import { BaseDirective } from '@thescaffold/ngx-core'; import * as i0 from '@angular/core'; import { InjectionToken, ElementRef, ModuleWithProviders } from '@angular/core'; declare enum NgxCodeEditorMode { Javascript = "javascript", HTTP = "http", Shell = "shell" } declare enum NgxCodeEditorTheme { Amy = "amy", AyuLight = "ayu-light", Barf = "barf", Bespin = "bespin", BirdsOfParadise = "birds-of-paradise", BoysAndGirls = "boys-and-girls", CLouds = "clouds", Cobalt = "cobalt", CoolGlow = "cool-glow", Dracula = "dracula", Expresso = "espresso", NoctisLilac = "noctis-lilac", RosePineDawn = "rose-pine-dawn", Smoothy = "smoothy", SolarizedLight = "solarized-light", Tommorrow = "tomorrow" } interface NgxCodeEditorConfig { mode: NgxCodeEditorMode; theme: NgxCodeEditorTheme; fromString?: string; fromJSON?: any; actions: string[]; hideStatusBar?: boolean; hideActionBar?: boolean; } declare const X_NGX_CODE_EDITOR_CONFIG: InjectionToken; interface CodeEditorWindow extends Window { view: EditorView; } declare enum CodeEditorEventTypes { BeforeStateChange = "beforeStateChange", AfterStateChange = "afterStateChange", RegisterHandlers = "registerHandlers", RegisterTriggers = "registerTriggers" } declare enum CodeHandlerTypes { KeyDown = "onKeyDown", KeyPress = "onKeyPress", TextInput = "onTextInput", Click = "onClick", DoubleClick = "onDoubleClick", TripleClick = "onTripleClick", ClickOn = "onClickOn", DoubleClickOn = "onDoubleClickOn", TripleClickOn = "onTripleClickOn", Paste = "onPaste", Drop = "onDrop" } interface CodeEditorEvent { type: CodeEditorEventTypes; payload: any; } interface ActionContract { key: string; lg?: boolean; label: string; desc?: string; tooltip?: string; triggers?: string[]; icon: string; position?: [number, number]; children?: ActionContract[]; active?: boolean; show?: boolean; enabled?: (view: EditorView, state: EditorState) => boolean; action?: (view: EditorView, state: EditorState) => void; } declare class ActionComponent extends BaseDirective { data: NgxCodeEditorConfig; editorView?: EditorView; editorState?: EditorState; actions: ActionContract[]; get allowedActions(): ActionContract[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare abstract class ActionBase implements ActionContract { key: string; label: string; icon: string; active: boolean; show: boolean; children: never[]; lg?: boolean; desc?: string; tooltip?: string; triggers?: string[]; position?: [number, number]; enabled?: (view: EditorView, state: EditorState) => boolean; action?: (view: EditorView, state: EditorState) => void; } declare class ClearAction extends ActionBase implements ActionContract { key: string; label: string; icon: string; tooltip: string; triggers: string[]; enabled: (view: EditorView, state: EditorState) => boolean; action: (view: EditorView, state: EditorState) => void; } declare class wrapAction extends ActionBase implements ActionContract { key: string; label: string; icon: string; tooltip: string; triggers: string[]; enabled: (view: EditorView, state: EditorState) => boolean; action: (view: EditorView, state: EditorState) => void; } declare const Actions: (ClearAction | wrapAction)[]; declare class EditorComponent extends BaseDirective { private readonly config; data: NgxCodeEditorConfig; editor?: ElementRef; editorView?: EditorView; editorState?: EditorState; constructor(config: NgxCodeEditorConfig); afterView: () => void; destroy: () => void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NgxCodeEditorComponent extends BaseDirective { private readonly config; data: NgxCodeEditorConfig; editor: EditorComponent; constructor(config: NgxCodeEditorConfig); prepend(text: string): void; insert(text: string): void; append(text: string): void; clear(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class StatusComponent extends BaseDirective { data: NgxCodeEditorConfig; editorView?: EditorView; editorState?: EditorState; get mode(): string; get theme(): string; get tab(): string; get lines(): number; get line(): number; get col(): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class NgxCodeEditorModule { static register(config?: NgxCodeEditorConfig): ModuleWithProviders; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const extensions: _codemirror_state.Extension[]; export { ActionComponent, Actions, CodeEditorEventTypes, CodeHandlerTypes, EditorComponent, NgxCodeEditorComponent, NgxCodeEditorMode, NgxCodeEditorModule, NgxCodeEditorTheme, StatusComponent, X_NGX_CODE_EDITOR_CONFIG, extensions }; export type { CodeEditorEvent, CodeEditorWindow, NgxCodeEditorConfig };