import { type Editor, Node } from '@tiptap/core'; /** The intentionally bounded text-box and WPS shape surface supported by Writer. */ export type WorkDocumentTextBoxLayout = 'inline' | 'floating'; export type WorkDocumentShapeType = 'rectangle' | 'roundedRectangle' | 'ellipse' | 'diamond' | 'triangle'; export type WorkDocumentTextBoxHorizontalReference = 'column' | 'margin' | 'page'; export type WorkDocumentTextBoxVerticalReference = 'paragraph' | 'margin' | 'page'; export type WorkDocumentTextBoxVerticalAlign = 'top' | 'center' | 'bottom'; export interface WorkDocumentTextBoxProperties { id: string; shapeType: WorkDocumentShapeType; width: number; height: number; layout: WorkDocumentTextBoxLayout; horizontalOffset: number | null; verticalOffset: number | null; horizontalReference: WorkDocumentTextBoxHorizontalReference; verticalReference: WorkDocumentTextBoxVerticalReference; fill: string; borderColor: string; borderWidth: number; padding: number; verticalAlign: WorkDocumentTextBoxVerticalAlign; docPropertiesId: number | null; } export interface DocumentTextBoxCommandOptions { restoreFocus?: boolean; } declare module '@tiptap/core' { interface Commands { documentTextBox: { insertDocumentTextBox: (text?: string, options?: Partial) => ReturnType; setDocumentTextBoxProperties: (value: Partial, options?: DocumentTextBoxCommandOptions) => ReturnType; deleteDocumentTextBox: (options?: DocumentTextBoxCommandOptions) => ReturnType; }; } } export declare const DOCUMENT_TEXT_BOX_DEFAULTS: WorkDocumentTextBoxProperties; export declare const DOCUMENT_TEXT_BOX_LIMITS: { readonly width: { readonly min: 20; readonly max: 558.7; }; readonly height: { readonly min: 10; readonly max: 558.7; }; readonly offset: { readonly min: -558.7; readonly max: 558.7; }; readonly borderWidth: { readonly min: 0; readonly max: 10; }; readonly padding: { readonly min: 0; readonly max: 25; }; }; export declare const DocumentTextBox: Node; export declare function documentTextBoxProperties(editor: Editor): WorkDocumentTextBoxProperties; export declare function setDocumentTextBoxProperties(editor: Editor, value: Partial, options?: DocumentTextBoxCommandOptions): boolean; export declare function normalizeDocumentTextBoxProperties(value: Partial>): WorkDocumentTextBoxProperties; export declare function textBoxCss(value: Partial>): string; export declare function textBoxDomAttributes(value: Partial>): Record; export declare function documentTextBoxPropertiesFromElement(element: Element): WorkDocumentTextBoxProperties;