import type { EditEnv } from '../doc/index.js'; import type { HtmlBuilders, ImportOptions } from '../html/index.js'; import { type IoFilter, type MdBuilders } from '../io/index.js'; import { type Command, type Nabi, type NabiCoreOptions, type NabiOptions } from '../editor/index.js'; import { type Attach, type InputRule, type Wing } from './contract.js'; export interface RegisteredRule extends InputRule { readonly w: string; } export interface Registry { readonly wings: readonly Wing[]; readonly env: EditEnv; readonly builders: HtmlBuilders; readonly commands: Readonly>; readonly claim: ImportOptions['claim'] | undefined; readonly inputRules: readonly RegisteredRule[]; readonly attaches: readonly Attach[]; readonly escapes: ReadonlyMap; readonly doubles: ReadonlyMap; readonly ioFilters: readonly IoFilter[]; readonly mdBuilders: MdBuilders; ownerOf(typeW: string): Wing | null; wingOf(w: string): Wing | null; } export interface RegistryExtra { readonly ioFilters?: readonly IoFilter[]; } export declare function makeRegistry(wings: readonly Wing[], extra?: RegistryExtra): Registry; export declare function nabiOptionsOf(registry: Registry, extra?: NabiOptions & Pick): NabiCoreOptions; type InternalNabiOptions = NabiOptions & RegistryExtra & Pick; export declare function createNabiWith(wings: readonly Wing[] | { build(): readonly Wing[]; }, extra?: NabiOptions & RegistryExtra): { readonly nabi: Nabi; readonly registry: Registry; }; export declare function $createNabiWith(wings: readonly Wing[] | { build(): readonly Wing[]; }, extra?: InternalNabiOptions): { readonly nabi: Nabi; readonly registry: Registry; }; export interface StoredHtmlOptions { readonly allowLocalUrls?: boolean; } export declare function renderStoredHtml(json: unknown, registry: Registry, options?: StoredHtmlOptions): string | null; export declare function renderStoredEditorHtml(json: unknown, registry: Registry, options?: StoredHtmlOptions): string | null; export {}; //# sourceMappingURL=registry.d.ts.map