2021-01-27 12:44:29 +02:00
|
|
|
import { RunJSON, RunPropertyJSON } from "./run";
|
2020-02-27 20:12:36 +02:00
|
|
|
import { IndentJSON } from "./indent";
|
2020-12-15 15:33:01 +02:00
|
|
|
import { CommentRangeStartJSON, CommentRangeEndJSON } from "..";
|
2021-09-29 03:03:39 +03:00
|
|
|
import {LineSpacingJSON} from "./line_spacing";
|
2020-02-13 09:14:06 +02:00
|
|
|
|
|
|
|
export type ParagraphChildJSON =
|
|
|
|
| RunJSON
|
|
|
|
| InsertJSON
|
|
|
|
| DeleteJSON
|
2020-12-15 15:33:01 +02:00
|
|
|
| CommentRangeStartJSON
|
|
|
|
| CommentRangeEndJSON
|
2020-02-13 09:14:06 +02:00
|
|
|
| BookmarkStartJSON
|
|
|
|
| BookmarkEndJSON;
|
|
|
|
|
|
|
|
export type NumberingPropertyJSON = {
|
2020-03-13 10:01:25 +02:00
|
|
|
id: number | null;
|
|
|
|
level: number | null;
|
2020-02-13 09:14:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export type ParagraphPropertyJSON = {
|
2020-06-08 07:41:13 +03:00
|
|
|
runProperty: RunPropertyJSON;
|
2020-02-13 09:14:06 +02:00
|
|
|
style: string | null;
|
|
|
|
numberingProperty: NumberingPropertyJSON | null;
|
|
|
|
alignment: "left" | "center" | "right" | "justified" | "both";
|
2020-02-27 20:12:36 +02:00
|
|
|
indent: IndentJSON | null;
|
2021-09-29 03:03:39 +03:00
|
|
|
lineSpacing: LineSpacingJSON | null;
|
2021-04-09 05:30:50 +03:00
|
|
|
divId: string | null;
|
2021-04-14 06:01:38 +03:00
|
|
|
keepNext: boolean;
|
|
|
|
keepLines: boolean;
|
|
|
|
pageBreakBefore: boolean;
|
|
|
|
windowControl: boolean;
|
2020-02-13 09:14:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export type ParagraphJSON = {
|
|
|
|
type: "paragraph";
|
|
|
|
data: {
|
2020-12-21 13:52:15 +02:00
|
|
|
id: string;
|
2020-02-13 09:14:06 +02:00
|
|
|
property: ParagraphPropertyJSON;
|
|
|
|
children: ParagraphChildJSON[];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type InsertJSON = {
|
|
|
|
type: "insert";
|
|
|
|
data: {
|
2021-01-06 13:31:53 +02:00
|
|
|
children: (
|
|
|
|
| DeleteJSON
|
|
|
|
| RunJSON
|
|
|
|
| CommentRangeStartJSON
|
|
|
|
| CommentRangeEndJSON
|
|
|
|
)[];
|
2020-02-13 09:14:06 +02:00
|
|
|
author: string;
|
|
|
|
data: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type DeleteJSON = {
|
|
|
|
type: "delete";
|
|
|
|
data: {
|
2021-01-27 12:44:29 +02:00
|
|
|
children: DeleteChildJSON[];
|
2020-02-13 09:14:06 +02:00
|
|
|
author: string;
|
|
|
|
data: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-27 12:44:29 +02:00
|
|
|
export type DeleteChildJSON =
|
|
|
|
| RunJSON
|
|
|
|
| CommentRangeStartJSON
|
|
|
|
| CommentRangeEndJSON;
|
|
|
|
|
2020-02-13 09:14:06 +02:00
|
|
|
export type BookmarkStartJSON = {
|
|
|
|
type: "bookmarkStart";
|
|
|
|
data: {
|
|
|
|
id: number;
|
|
|
|
name: string;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export type BookmarkEndJSON = {
|
|
|
|
type: "bookmarkEnd";
|
|
|
|
data: {
|
|
|
|
id: number;
|
|
|
|
};
|
|
|
|
};
|