import { Doc } from "yjs";
import { Schema } from "@tiptap/pm/model";
import { Extensions } from "@tiptap/core";

//#region packages/transformer/src/types.d.ts
interface Transformer {
  fromYdoc: (document: Doc, fieldName?: string | Array<string>) => any;
  toYdoc: (document: any, fieldName: string) => Doc;
}
//#endregion
//#region packages/transformer/src/Prosemirror.d.ts
declare class Prosemirror implements Transformer {
  defaultSchema: Schema;
  schema(schema: Schema): Prosemirror;
  fromYdoc(document: Doc, fieldName?: string | Array<string>): any;
  toYdoc(document: any, fieldName?: string | Array<string>, schema?: Schema): Doc;
}
declare const ProsemirrorTransformer: Prosemirror;
//#endregion
//#region packages/transformer/src/Tiptap.d.ts
declare class Tiptap implements Transformer {
  defaultExtensions: Extensions;
  extensions(extensions: Extensions): Tiptap;
  fromYdoc(document: Doc, fieldName?: string | Array<string>): any;
  toYdoc(document: any, fieldName?: string | Array<string>, extensions?: Extensions): Doc;
}
declare const TiptapTransformer: Tiptap;
//#endregion
export { ProsemirrorTransformer, Tiptap, TiptapTransformer, Transformer };