From 504f590bf5babcf0593361b037fed2931981e01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Re=C3=A9?= Date: Wed, 22 May 2024 18:40:19 +0200 Subject: [PATCH] Fixes after fork - fix variant interfaces - `The implementation ... does not match the interface` - Rescript 11.0.0-rc.8 - add style to ParagraphOptions - add spacing to ParagraphStylePropertiesOptions - fix typo in verticalAlign in SectionPropertiesOptions --- src/EmphasisMarkType.resi | 2 +- src/LevelSuffix.resi | 5 ++++- src/Paragraph.res | 1 + src/SectionPropertiesOptions.res | 2 +- src/StylesOptions.res | 1 + src/TextEffect.resi | 9 ++++++++- 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/EmphasisMarkType.resi b/src/EmphasisMarkType.resi index 378710f..2419a35 100644 --- a/src/EmphasisMarkType.resi +++ b/src/EmphasisMarkType.resi @@ -1,2 +1,2 @@ /** @see https://docx.js.org/api/enums/EmphasisMarkType.html */ -type t = DOT +type t = | @as("Dot") DOT diff --git a/src/LevelSuffix.resi b/src/LevelSuffix.resi index e9a6f0f..5a772be 100644 --- a/src/LevelSuffix.resi +++ b/src/LevelSuffix.resi @@ -1 +1,4 @@ -type t = NOTHING | SPACE | TAB +type t = + | @as("nothing") NOTHING + | @as("space") SPACE + | @as("tab") TAB diff --git a/src/Paragraph.res b/src/Paragraph.res index 58f1cba..5600d7a 100644 --- a/src/Paragraph.res +++ b/src/Paragraph.res @@ -28,6 +28,7 @@ type options = { wordWrap?: bool, scale?: float, autoSpaceEastAsianText?: bool, + style?: string, /* <- */ text?: string, children?: array, diff --git a/src/SectionPropertiesOptions.res b/src/SectionPropertiesOptions.res index 241aa70..c9c9426 100644 --- a/src/SectionPropertiesOptions.res +++ b/src/SectionPropertiesOptions.res @@ -5,7 +5,7 @@ type rec t = { footerWrapperGroup?: Headers.headerFooterGroup, lineNumbers?: LineNumberAttributes.t, titlePage?: bool, - vertialAlign?: [#bottom | #center | #top], + verticalAlign?: [#bottom | #center | #top], column?: Columns.attributes, @as("type") type_?: [#nextPage | #nextColumn | #continuous | #evenPage | #oddPage], } diff --git a/src/StylesOptions.res b/src/StylesOptions.res index 1b50d10..58612d4 100644 --- a/src/StylesOptions.res +++ b/src/StylesOptions.res @@ -8,6 +8,7 @@ type paragraphStylesPropertiesOptions = { keepNext?: bool, leftTabStop?: float, numbering?: Util.Types.numbering, + spacing?: SpacingProperties.t, } type baseCharacterStyleOptions = { diff --git a/src/TextEffect.resi b/src/TextEffect.resi index 947e5e2..e4adbf4 100644 --- a/src/TextEffect.resi +++ b/src/TextEffect.resi @@ -1,2 +1,9 @@ /** @see https://docx.js.org/api/enums/TextEffect.html */ -type t = BLINK_BACKGROUND | LIGHTS | ANTS_BLACK | ANTS_RED | SHIMMER | NONE | SPARKLE +type t = + | @as("blinkBackground") BLINK_BACKGROUND + | @as("lights") LIGHTS + | @as("antsBlack") ANTS_BLACK + | @as("antsRed") ANTS_RED + | @as("shimmer") SHIMMER + | @as("none") NONE + | @as("sparkle") SPARKLE