import { DiffDOM, stringToObj } from "diff-dom"; import type { Node } from "prosemirror-model"; import type { Selection } from "prosemirror-state"; import type { EditorView } from "prosemirror-view"; import type { Editor } from "../types.js"; import type { Comment, MarginBox, MarginBoxFilterOptions, Participant } from "./templates.js"; interface SelectedChanges { insertion?: { from: number; to: number; }; deletion?: { from: number; to: number; }; format_change?: { from: number; to: number; }; block_change?: { from: number; to: number; }; } interface NodeTrack { type: string; data: Record; } interface CommentInteractions { createNewGlobalComment(): void; deactivateSelectedChanges(): void; activateComment(id: string): void; isCurrentlyEditing(): boolean; activateSelectedComment(view: EditorView): void; editComment: boolean; activeCommentAnswerId: number | string | undefined; activeCommentId: number | string | undefined; findCommentIds(node: Node): string[]; } interface CommentStore { commentDuringCreation?: { comment: Comment; inDOM?: boolean; }; comments: Record; findComment(id: string): Comment | undefined; } interface CommentsMod { interactions: CommentInteractions; store: CommentStore; } interface CollabMod { pastParticipants: Participant[]; } interface FootnotesMod { fnEditor: { view: EditorView; }; } interface TrackMod { activateTrack(view: string, type: string, pos: number): void; } interface MarginboxesEditorMod { comments: CommentsMod; collab: CollabMod; footnotes: FootnotesMod; track: TrackMod; marginboxes: ModMarginboxes; } export declare class ModMarginboxes { editor: Editor & { mod: MarginboxesEditorMod; }; activeCommentStyle: string; filterOptions: MarginBoxFilterOptions; commentColors: { isMajor: string; marker: string; active: string; }; dd: DiffDOM; marginBoxesContainerString: string; marginBoxesContainerObj: ReturnType; globalCommentsContainerString: string; globalCommentsContainerObj: ReturnType; marginBoxesPlacementStyle: string; marginBoxes: MarginBox[]; marginBoxesContainer: HTMLElement | null; globalCommentsContainer: HTMLElement | null; activeCommentStyleElement: HTMLElement | null; trackOptionsStyleElement: HTMLElement | null; placementStyleElement: HTMLElement | null; constructor(editor: Editor); init(): void; findShowMoreButton(event: Event): Element | null; bindEvents(): void; closeAllMenus(selector?: string): void; view(view: EditorView): false | undefined; updateDOM(): Promise | false; fnPosToPos(fnPos: number): number; getMarginBoxes(node: Node, pos: number, refPos: number, lastNode: Node, lastNodeTracks: NodeTrack[], view: string, marginBoxes: MarginBox[], referrers: number[], selectedChanges: SelectedChanges, selection: Selection): NodeTrack[]; closeAllLongComments(): void; positionMarginBoxOptions(marginBoxDialog: HTMLElement, showMarginboxOptionsBtn: Element): void; scrollToGlobalComment(id: string): void; commentOptionsOnScroll(): void; toggleShowMore(element: Element): void; setTrackStyle(): void; } export {}; //# sourceMappingURL=index.d.ts.map