2020-04-07 04:24:56 +03:00
|
|
|
import { DrawingJSON } from "./drawing";
|
2022-06-07 18:44:51 +03:00
|
|
|
import { ShapeJSON } from "./shape";
|
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";
|
2022-08-10 08:45:27 +03:00
|
|
|
import { FieldChar } from "./bindings/FieldChar";
|
|
|
|
import { InstrHyperlink } from "./bindings/InstrHyperlink";
|
|
|
|
import { InstrToC } from "./bindings/InstrToC";
|
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;
|
|
|
|
};
|
|
|
|
|
2022-01-06 12:17:34 +02:00
|
|
|
export type RunFontsJSON = {
|
|
|
|
ascii?: string;
|
|
|
|
hiAnsi?: string;
|
|
|
|
eastAsia?: string;
|
|
|
|
cs?: string;
|
|
|
|
asciiTheme?: string;
|
|
|
|
hiAnsiTheme?: string;
|
|
|
|
eastAsiaTheme?: string;
|
|
|
|
csTheme?: string;
|
2022-01-27 08:16:40 +02:00
|
|
|
hint?: string;
|
2022-01-06 12:17:34 +02:00
|
|
|
};
|
|
|
|
|
2020-02-13 09:14:06 +02:00
|
|
|
export type RunPropertyJSON = {
|
2022-03-16 05:54:17 +02:00
|
|
|
style?: string | null;
|
2021-12-21 04:54:27 +02:00
|
|
|
sz?: number | null;
|
|
|
|
szCs?: number | null;
|
2022-01-06 12:17:34 +02:00
|
|
|
fonts?: RunFontsJSON | null;
|
2021-12-21 04:54:27 +02:00
|
|
|
color?: string | null;
|
|
|
|
highlight?: string | null;
|
|
|
|
vertAlign?: VertAlignType | null;
|
|
|
|
underline?: string | null;
|
|
|
|
bold?: boolean | null;
|
|
|
|
boldCs?: boolean | null;
|
|
|
|
italic?: boolean | null;
|
|
|
|
italicCs?: boolean | null;
|
|
|
|
vanish?: boolean | null;
|
|
|
|
spacing?: number | null;
|
|
|
|
textBorder?: TextBorderJSON | null;
|
2022-01-27 08:16:40 +02:00
|
|
|
ins?: InsertJSON["data"] | null;
|
|
|
|
del?: DeleteJSON["data"] | null;
|
2021-12-21 04:54:27 +02:00
|
|
|
strike?: boolean;
|
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
|
2022-06-07 18:44:51 +03:00
|
|
|
| ShapeJSON
|
2021-01-27 12:44:29 +02:00
|
|
|
| CommentRangeStartJSON
|
2022-08-10 08:45:27 +03:00
|
|
|
| CommentRangeEndJSON
|
|
|
|
| FieldCharJSON
|
2022-08-31 04:59:48 +03:00
|
|
|
| InstrTextStringJSON;
|
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[];
|
|
|
|
};
|
|
|
|
};
|
2022-08-10 08:45:27 +03:00
|
|
|
|
|
|
|
export type FieldCharJSON = {
|
|
|
|
type: "fieldChar";
|
|
|
|
data: FieldChar;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type InstrTextJSON = {
|
|
|
|
type: "instrText";
|
|
|
|
data:
|
|
|
|
| {
|
|
|
|
type: "hyperlink";
|
|
|
|
data: InstrHyperlink;
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
type: "toc";
|
|
|
|
data: InstrToC;
|
|
|
|
};
|
|
|
|
};
|
2022-08-31 04:59:48 +03:00
|
|
|
|
|
|
|
export type InstrTextStringJSON = {
|
|
|
|
type: "instrTextString";
|
|
|
|
data: string;
|
|
|
|
};
|