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

View File

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

View File

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

View File

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

View File

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