fix: types (#561)

* fix: types

* rc32
main
bokuweb 2022-11-02 13:58:58 +09:00 committed by GitHub
parent a89036258c
commit ca6e24179d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 15 deletions

View File

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## docx-wasm@0.0.276-rc32 (1. Nov, 2022)
- Fix TableProperty json types.
## docx-wasm@0.0.276-rc31 (1. Nov, 2022)
- Support `specVanish`.

View File

@ -19,8 +19,9 @@ impl FromXML for Styles {
let e = XMLElement::from_str(&name.local_name).unwrap();
match e {
XMLElement::Style => {
let s = Style::read(&mut parser, &attributes)?;
styles = styles.add_style(s);
if let Ok(s) = Style::read(&mut parser, &attributes) {
styles = styles.add_style(s);
}
continue;
}
XMLElement::DocDefaults => {

View File

@ -24,7 +24,6 @@ export type TableCellPropertyJSON = {
verticalMerge: "restart" | "continue" | null;
verticalAlign: "top" | "center" | "bottom" | null;
textDirection: TextDirectionType | null;
hasNumbering: boolean;
shading: ShadingJSON | null;
};
@ -70,21 +69,21 @@ export type TablePropertyJSON = {
widthType: WidthType;
} | null;
justification: "left" | "center" | "right";
borders: {
top: BorderJSON;
left: BorderJSON;
bottom: BorderJSON;
right: BorderJSON;
insideH: BorderJSON;
insideV: BorderJSON;
borders?: {
top?: BorderJSON | null;
left?: BorderJSON | null;
bottom?: BorderJSON | null;
right?: BorderJSON | null;
insideH?: BorderJSON | null;
insideV?: BorderJSON | null;
} | null;
margins: TableCellMarginsJSON | null;
indent: {
indent?: {
width: number;
widthType: WidthType;
};
style: string | null;
layout: TableLayoutType | null;
} | null;
style?: string | null;
layout?: TableLayoutType | null;
};
export type TableJSON = {

View File

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