UNPKG

prong-editor

Version:

Prong (PRojectional jsON Gui) is an editor framework for creating bespoke in-browser editors for JSON-based domain-specific languages (such as [Vega](https://vega.github.io/vega/), [Vega-Lite](https://vega.github.io/vega-lite/), [Tracery](https://tracery.

29 lines (28 loc) 1.27 kB
import { StateField } from "@codemirror/state"; import { ViewPlugin, EditorView, ViewUpdate } from "@codemirror/view"; import { JSONSchema } from "./JSONSchemaTypes"; import { Projection } from "./projections"; import { LintError } from "./Linter"; export declare const setSchema: import("@codemirror/state").StateEffectType<JSONSchema>; export declare const setProjections: import("@codemirror/state").StateEffectType<Projection[]>; export declare const setSchemaTypings: import("@codemirror/state").StateEffectType<Record<string, any>>; export declare const setDiagnostics: import("@codemirror/state").StateEffectType<any[]>; export declare const setUpdateHook: import("@codemirror/state").StateEffectType<any[]>; export declare const initialCmState: { schema: JSONSchema; projections: Projection[]; schemaTypings: Record<string, any>; diagnostics: LintError[]; codeUpdateHook: (_code: string) => void; }; export declare const cmStatePlugin: StateField<{ schema: JSONSchema; projections: Projection[]; schemaTypings: Record<string, any>; diagnostics: LintError[]; codeUpdateHook: (_code: string) => void; }>; export declare const cmStateView: ViewPlugin<{ run(view: EditorView): void; update(update: ViewUpdate): void; }>;