2020-04-07 04:24:56 +03:00
|
|
|
import { DrawingJSON } from "./drawing";
|
2021-01-27 12:44:29 +02:00
|
|
|
import { CommentRangeStartJSON, CommentRangeEndJSON } from "..";
|
2021-03-24 11:00:17 +02:00
|
|
|
import { BorderType } from "../border";
|
2021-06-07 13:30:05 +03:00
|
|
|
import { InsertJSON, DeleteJSON } from "./paragraph";
|
2021-06-07 18:10:44 +03:00
|
|
|
import { VertAlignType } from "../run";
|
2020-04-07 04:24:56 +03:00
|
|
|
|
2021-03-20 17:16:43 +02:00
|
|
|
export type TextBorderJSON = {
|
2021-03-24 11:00:17 +02:00
|
|
|
borderType: BorderType;
|
2021-03-20 17:16:43 +02:00
|
|
|
size: number;
|
|
|
|
space: number;
|
|
|
|
color: string;
|
|
|
|
};
|
|
|
|
|
2020-02-13 09:14:06 +02:00
|
|
|
export type RunPropertyJSON = {
|
|
|
|
sz: number | null;
|
|
|
|
szCs: number | null;
|
|
|
|
color: string | null;
|
|
|
|
highlight: string | null;
|
2021-06-07 18:10:44 +03:00
|
|
|
vertAlign: VertAlignType | null;
|
2020-02-13 09:14:06 +02:00
|
|
|
underline: string | null;
|
|
|
|
bold: boolean | null;
|
|
|
|
boldCs: boolean | null;
|
|
|
|
italic: boolean | null;
|
|
|
|
italicCs: boolean | null;
|
|
|
|
vanish: boolean | null;
|
2020-10-14 04:16:13 +03:00
|
|
|
spacing: number | null;
|
2021-03-22 16:30:58 +02:00
|
|
|
textBorder: TextBorderJSON | null;
|
2021-06-07 13:30:05 +03:00
|
|
|
ins: InsertJSON | null;
|
|
|
|
del: DeleteJSON | null;
|
2020-02-13 09:14:06 +02:00
|
|
|
};
|
|
|
|
|
2020-04-07 04:24:56 +03:00
|
|
|
export type RunChildJSON =
|
|
|
|
| TextJSON
|
|
|
|
| DeleteTextJSON
|
|
|
|
| TabJSON
|
|
|
|
| BreakJSON
|
2021-01-27 12:44:29 +02:00
|
|
|
| DrawingJSON
|
|
|
|
| CommentRangeStartJSON
|
|
|
|
| CommentRangeEndJSON;
|
2020-02-13 09:14:06 +02:00
|
|
|
|
|
|
|
export type TextJSON = {
|
|
|
|
type: "text";
|
|
|
|
data: {
|
|
|
|
preserveSpace: boolean;
|
|
|
|
text: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type DeleteTextJSON = {
|
|
|
|
type: "deleteText";
|
|
|
|
data: {
|
|
|
|
preserveSpace: boolean;
|
|
|
|
text: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type TabJSON = {
|
|
|
|
type: "tab";
|
|
|
|
};
|
|
|
|
|
|
|
|
export type BreakJSON = {
|
|
|
|
type: "break";
|
|
|
|
data: {
|
|
|
|
breakType: "page" | "column" | "textWrapping";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type RunJSON = {
|
|
|
|
type: "run";
|
|
|
|
data: {
|
|
|
|
runProperty: RunPropertyJSON;
|
|
|
|
children: RunChildJSON[];
|
|
|
|
};
|
|
|
|
};
|