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-10-20 10:37:51 +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;
|
2022-01-14 04:53:39 +02:00
|
|
|
style?: string | null;
|
|
|
|
numberingProperty?: NumberingPropertyJSON | null;
|
|
|
|
alignment?: "left" | "center" | "right" | "justified" | "both";
|
|
|
|
indent?: IndentJSON | null;
|
|
|
|
lineSpacing?: LineSpacingJSON | null;
|
|
|
|
divId?: string | null;
|
|
|
|
keepNext?: boolean;
|
|
|
|
keepLines?: boolean;
|
|
|
|
pageBreakBefore?: boolean;
|
|
|
|
windowControl?: boolean;
|
|
|
|
outlineLvl?: number | null;
|
|
|
|
paragraphPropertyChange?: {
|
|
|
|
author: string;
|
|
|
|
date: string;
|
|
|
|
property: ParagraphPropertyJSON;
|
|
|
|
};
|
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;
|
2021-09-29 07:43:46 +03:00
|
|
|
date: string;
|
2020-02-13 09:14:06 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2021-09-29 07:43:46 +03:00
|
|
|
date: string;
|
2020-02-13 09:14:06 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|