fix: indent (#44)

main
bokuweb 2020-02-28 03:12:36 +09:00 committed by GitHub
parent ff44dfb7fb
commit d8ea19e7cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 10 deletions

View File

@ -0,0 +1,8 @@
export type IndentJSON = {
start: number;
end: number | null;
specialIndent: {
type: "firstLine" | "hanging";
val: number;
} | null;
};

View File

@ -1,6 +1,6 @@
import { Styles } from "./styles"; import { StylesJSON } from "./styles";
import { DocumentJSON } from "./document"; import { DocumentJSON } from "./document";
import { AbstractNumberingJSON, NumberingJSON } from "./numbering"; import { NumberingsJSON } from "./numbering";
export type DocxJSON = { export type DocxJSON = {
contentType: { contentType: {
@ -28,15 +28,12 @@ export type DocxJSON = {
}; };
}; };
}; };
styles: Styles; styles: StylesJSON;
document: DocumentJSON; document: DocumentJSON;
comments: { comments: {
comments: any[]; comments: any[]; // TODO:
};
numberings: {
abstractNums: AbstractNumberingJSON[];
numberings: NumberingJSON[];
}; };
numberings: NumberingsJSON;
settings: { settings: {
defaultTabStop: number; defaultTabStop: number;
zoom: number; zoom: number;

View File

@ -21,3 +21,8 @@ export type NumberingJSON = {
id: number; id: number;
abstractNumId: number; abstractNumId: number;
}; };
export type NumberingsJSON = {
abstractNums: AbstractNumberingJSON[];
numberings: NumberingJSON[];
};

View File

@ -1,4 +1,5 @@
import { RunJSON, RunChildJSON } from "./run"; import { RunJSON, RunChildJSON } from "./run";
import { IndentJSON } from "./indent";
export type ParagraphChildJSON = export type ParagraphChildJSON =
| RunJSON | RunJSON
@ -17,6 +18,7 @@ export type ParagraphPropertyJSON = {
style: string | null; style: string | null;
numberingProperty: NumberingPropertyJSON | null; numberingProperty: NumberingPropertyJSON | null;
alignment: "left" | "center" | "right" | "justified" | "both"; alignment: "left" | "center" | "right" | "justified" | "both";
indent: IndentJSON | null;
}; };
export type ParagraphJSON = { export type ParagraphJSON = {

View File

@ -9,7 +9,7 @@ export type StyleJSON = {
paragraphProperty: ParagraphPropertyJSON; paragraphProperty: ParagraphPropertyJSON;
}; };
export type Styles = { export type StylesJSON = {
docDefaults: { docDefaults: {
runPropertyDefault: RunPropertyJSON; runPropertyDefault: RunPropertyJSON;
}; };

View File

@ -1,6 +1,6 @@
{ {
"name": "docx-wasm", "name": "docx-wasm",
"version": "0.0.35", "version": "0.0.37",
"main": "dist/node/index.js", "main": "dist/node/index.js",
"browser": "dist/web/index.js", "browser": "dist/web/index.js",
"author": "bokuweb <bokuweb12@gmail.com>", "author": "bokuweb <bokuweb12@gmail.com>",