docx-wasm 0.4.20 → 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.html +8 -0
- package/dist/index.js +32 -0
- package/dist/node/builder.js +18 -9
- package/dist/node/builder.js.map +1 -1
- package/dist/node/carriage-return.d.ts +2 -0
- package/dist/node/carriage-return.js +7 -0
- package/dist/node/carriage-return.js.map +1 -0
- package/dist/node/delete.js +17 -7
- package/dist/node/delete.js.map +1 -1
- package/dist/node/footer.js.map +1 -1
- package/dist/node/header.js.map +1 -1
- package/dist/node/hyperlink.js +17 -7
- package/dist/node/hyperlink.js.map +1 -1
- package/dist/node/index.d.ts +2 -1
- package/dist/node/index.js +18 -7
- package/dist/node/index.js.map +1 -1
- package/dist/node/insert.js +17 -7
- package/dist/node/insert.js.map +1 -1
- package/dist/node/json/bindings/DrawingPosition.d.ts +2 -2
- package/dist/node/json/bindings/FieldChar.d.ts +2 -2
- package/dist/node/json/bindings/FontGroup.d.ts +2 -2
- package/dist/node/json/bindings/FontScheme.d.ts +2 -2
- package/dist/node/json/bindings/FontSchemeFont.d.ts +2 -2
- package/dist/node/json/bindings/FrameProperty.d.ts +50 -14
- package/dist/node/json/bindings/ImageData.d.ts +2 -2
- package/dist/node/json/bindings/InstrHyperlink.d.ts +2 -2
- package/dist/node/json/bindings/InstrToC.d.ts +11 -11
- package/dist/node/json/bindings/PageNumType.d.ts +4 -4
- package/dist/node/json/bindings/Pic.d.ts +23 -2
- package/dist/node/json/bindings/PositionalTab.d.ts +2 -2
- package/dist/node/json/bindings/Shape.d.ts +4 -4
- package/dist/node/json/bindings/Tab.d.ts +2 -2
- package/dist/node/json/bindings/TableCellBorder.d.ts +2 -2
- package/dist/node/json/bindings/TableCellBorderPosition.d.ts +1 -1
- package/dist/node/json/bindings/TableCellBorders.d.ts +4 -4
- package/dist/node/json/bindings/TablePositionProperty.d.ts +13 -10
- package/dist/node/json/bindings/Theme.d.ts +2 -2
- package/dist/node/json/index.d.ts +10 -0
- package/dist/node/json/index.js.map +1 -1
- package/dist/node/json/run.d.ts +4 -1
- package/dist/node/num-pages.js +17 -7
- package/dist/node/num-pages.js.map +1 -1
- package/dist/node/page-num.js +17 -7
- package/dist/node/page-num.js.map +1 -1
- package/dist/node/paragraph-property.d.ts +1 -1
- package/dist/node/paragraph-property.js +17 -7
- package/dist/node/paragraph-property.js.map +1 -1
- package/dist/node/pkg/docx_wasm.d.ts +1069 -810
- package/dist/node/pkg/docx_wasm.js +4114 -3959
- package/dist/node/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/node/pkg/docx_wasm_bg.wasm.d.ts +274 -261
- package/dist/node/run-property.d.ts +1 -1
- package/dist/node/run-property.js +17 -7
- package/dist/node/run-property.js.map +1 -1
- package/dist/node/run.d.ts +3 -1
- package/dist/node/run.js +25 -7
- package/dist/node/run.js.map +1 -1
- package/dist/node/section-property.js +1 -1
- package/dist/node/section-property.js.map +1 -1
- package/dist/node/style.js +17 -7
- package/dist/node/style.js.map +1 -1
- package/dist/node/tab-leader.js +17 -7
- package/dist/node/tab-leader.js.map +1 -1
- package/dist/node/table-cell-borders.js.map +1 -1
- package/dist/node/table-cell.js +17 -7
- package/dist/node/table-cell.js.map +1 -1
- package/dist/node/table-of-contents-item.js +17 -7
- package/dist/node/table-of-contents-item.js.map +1 -1
- package/dist/node/table-of-contents.js +17 -7
- package/dist/node/table-of-contents.js.map +1 -1
- package/dist/node/table-row.js.map +1 -1
- package/dist/node/table.d.ts +1 -1
- package/dist/node/table.js +17 -7
- package/dist/node/table.js.map +1 -1
- package/dist/web/builder.js.map +1 -1
- package/dist/web/carriage-return.d.ts +2 -0
- package/dist/web/carriage-return.js +3 -0
- package/dist/web/carriage-return.js.map +1 -0
- package/dist/web/delete.js.map +1 -1
- package/dist/web/footer.js.map +1 -1
- package/dist/web/header.js.map +1 -1
- package/dist/web/hyperlink.js.map +1 -1
- package/dist/web/index.d.ts +2 -1
- package/dist/web/index.js +1 -0
- package/dist/web/index.js.map +1 -1
- package/dist/web/insert.js.map +1 -1
- package/dist/web/js/abstract-numbering.d.ts +7 -0
- package/dist/web/js/bookmark-end.d.ts +4 -0
- package/dist/web/js/bookmark-start.d.ts +5 -0
- package/dist/web/js/border.d.ts +1 -0
- package/dist/web/js/break.d.ts +5 -0
- package/dist/web/js/builder.d.ts +7 -0
- package/dist/web/js/carriage-return.d.ts +2 -0
- package/dist/web/js/comment-end.d.ts +4 -0
- package/dist/web/js/comment.d.ts +14 -0
- package/dist/web/js/delete-text.d.ts +4 -0
- package/dist/web/js/delete.d.ts +11 -0
- package/dist/web/js/doc-defaults.d.ts +10 -0
- package/dist/web/js/doc-props.d.ts +10 -0
- package/dist/web/js/footer.d.ts +8 -0
- package/dist/web/js/header.d.ts +8 -0
- package/dist/web/js/hyperlink.d.ts +22 -0
- package/dist/web/js/image.d.ts +15 -0
- package/dist/web/js/index.d.ts +119 -0
- package/dist/web/js/insert.d.ts +11 -0
- package/dist/web/js/json/bindings/AlignmentType.d.ts +1 -0
- package/dist/web/js/json/bindings/Bold.d.ts +1 -0
- package/dist/web/js/json/bindings/BoldCs.d.ts +1 -0
- package/dist/web/js/json/bindings/BorderType.d.ts +1 -0
- package/dist/web/js/json/bindings/Break.d.ts +4 -0
- package/dist/web/js/json/bindings/BreakType.d.ts +1 -0
- package/dist/web/js/json/bindings/Caps.d.ts +1 -0
- package/dist/web/js/json/bindings/CharacterSpacing.d.ts +1 -0
- package/dist/web/js/json/bindings/Color.d.ts +1 -0
- package/dist/web/js/json/bindings/Comment.d.ts +7 -0
- package/dist/web/js/json/bindings/CommentRangeEnd.d.ts +3 -0
- package/dist/web/js/json/bindings/CommentRangeStart.d.ts +5 -0
- package/dist/web/js/json/bindings/Delete.d.ts +6 -0
- package/dist/web/js/json/bindings/DeleteChild.d.ts +10 -0
- package/dist/web/js/json/bindings/DeleteText.d.ts +4 -0
- package/dist/web/js/json/bindings/DrawingPosition.d.ts +6 -0
- package/dist/web/js/json/bindings/DrawingPositionType.d.ts +1 -0
- package/dist/web/js/json/bindings/FieldChar.d.ts +5 -0
- package/dist/web/js/json/bindings/FieldCharType.d.ts +1 -0
- package/dist/web/js/json/bindings/FitText.d.ts +4 -0
- package/dist/web/js/json/bindings/FontGroup.d.ts +7 -0
- package/dist/web/js/json/bindings/FontScheme.d.ts +5 -0
- package/dist/web/js/json/bindings/FontSchemeFont.d.ts +4 -0
- package/dist/web/js/json/bindings/FooterReference.d.ts +4 -0
- package/dist/web/js/json/bindings/FrameProperty.d.ts +50 -0
- package/dist/web/js/json/bindings/HeaderReference.d.ts +4 -0
- package/dist/web/js/json/bindings/Highlight.d.ts +1 -0
- package/dist/web/js/json/bindings/HyperlinkType.d.ts +1 -0
- package/dist/web/js/json/bindings/ImageData.d.ts +3 -0
- package/dist/web/js/json/bindings/Insert.d.ts +5 -0
- package/dist/web/js/json/bindings/InsertChild.d.ts +13 -0
- package/dist/web/js/json/bindings/InstrHyperlink.d.ts +4 -0
- package/dist/web/js/json/bindings/InstrPAGEREF.d.ts +5 -0
- package/dist/web/js/json/bindings/InstrTC.d.ts +6 -0
- package/dist/web/js/json/bindings/InstrText.d.ts +15 -0
- package/dist/web/js/json/bindings/InstrToC.d.ts +19 -0
- package/dist/web/js/json/bindings/Italic.d.ts +1 -0
- package/dist/web/js/json/bindings/ItalicCs.d.ts +1 -0
- package/dist/web/js/json/bindings/PageNumType.d.ts +4 -0
- package/dist/web/js/json/bindings/Pic.d.ts +46 -0
- package/dist/web/js/json/bindings/PicAlign.d.ts +1 -0
- package/dist/web/js/json/bindings/PositionalTab.d.ts +8 -0
- package/dist/web/js/json/bindings/PositionalTabAlignmentType.d.ts +1 -0
- package/dist/web/js/json/bindings/PositionalTabRelativeTo.d.ts +1 -0
- package/dist/web/js/json/bindings/RelativeFromHType.d.ts +1 -0
- package/dist/web/js/json/bindings/RelativeFromVType.d.ts +1 -0
- package/dist/web/js/json/bindings/Run.d.ts +5 -0
- package/dist/web/js/json/bindings/RunFonts.d.ts +11 -0
- package/dist/web/js/json/bindings/RunProperty.d.ts +44 -0
- package/dist/web/js/json/bindings/RunStyle.d.ts +1 -0
- package/dist/web/js/json/bindings/Shape.d.ts +5 -0
- package/dist/web/js/json/bindings/SpecVanish.d.ts +1 -0
- package/dist/web/js/json/bindings/Strike.d.ts +1 -0
- package/dist/web/js/json/bindings/StyleWithLevel.d.ts +1 -0
- package/dist/web/js/json/bindings/Sym.d.ts +4 -0
- package/dist/web/js/json/bindings/Sz.d.ts +1 -0
- package/dist/web/js/json/bindings/SzCs.d.ts +1 -0
- package/dist/web/js/json/bindings/Tab.d.ts +7 -0
- package/dist/web/js/json/bindings/TabLeaderType.d.ts +1 -0
- package/dist/web/js/json/bindings/TabValueType.d.ts +1 -0
- package/dist/web/js/json/bindings/TableCellBorder.d.ts +9 -0
- package/dist/web/js/json/bindings/TableCellBorderPosition.d.ts +1 -0
- package/dist/web/js/json/bindings/TableCellBorders.d.ts +11 -0
- package/dist/web/js/json/bindings/TablePositionProperty.d.ts +13 -0
- package/dist/web/js/json/bindings/Text.d.ts +4 -0
- package/dist/web/js/json/bindings/TextAlignmentType.d.ts +1 -0
- package/dist/web/js/json/bindings/TextBorder.d.ts +7 -0
- package/dist/web/js/json/bindings/Theme.d.ts +4 -0
- package/dist/web/js/json/bindings/Underline.d.ts +1 -0
- package/dist/web/js/json/bindings/Vanish.d.ts +1 -0
- package/dist/web/js/json/bindings/VertAlign.d.ts +1 -0
- package/dist/web/js/json/border.d.ts +7 -0
- package/dist/web/js/json/comment.d.ts +22 -0
- package/dist/web/js/json/document.d.ts +11 -0
- package/dist/web/js/json/drawing.d.ts +45 -0
- package/dist/web/js/json/footer.d.ts +13 -0
- package/dist/web/js/json/header.d.ts +13 -0
- package/dist/web/js/json/indent.d.ts +11 -0
- package/dist/web/js/json/index.d.ts +88 -0
- package/dist/web/js/json/line_spacing.d.ts +8 -0
- package/dist/web/js/json/numbering.d.ts +35 -0
- package/dist/web/js/json/paragraph.d.ts +98 -0
- package/dist/web/js/json/run.d.ts +124 -0
- package/dist/web/js/json/section-property.d.ts +43 -0
- package/dist/web/js/json/shading.d.ts +5 -0
- package/dist/web/js/json/shape.d.ts +5 -0
- package/dist/web/js/json/structured-data-tag.d.ts +8 -0
- package/dist/web/js/json/styles.d.ts +28 -0
- package/dist/web/js/json/table.d.ts +101 -0
- package/dist/web/js/json/textbox-content.d.ts +6 -0
- package/dist/web/js/json/web-settings.d.ts +11 -0
- package/dist/web/js/level.d.ts +38 -0
- package/dist/web/js/num-pages.d.ts +4 -0
- package/dist/web/js/numbering.d.ts +8 -0
- package/dist/web/js/page-num.d.ts +4 -0
- package/dist/web/js/paragraph-property.d.ts +95 -0
- package/dist/web/js/paragraph.d.ts +70 -0
- package/dist/web/js/positional-tab.d.ts +12 -0
- package/dist/web/js/run-property.d.ts +91 -0
- package/dist/web/js/run.d.ts +44 -0
- package/dist/web/js/section-property.d.ts +61 -0
- package/dist/web/js/settings.d.ts +17 -0
- package/dist/web/js/shading.d.ts +8 -0
- package/dist/web/js/style.d.ts +69 -0
- package/dist/web/js/styles.d.ts +12 -0
- package/dist/web/js/tab-leader.d.ts +3 -0
- package/dist/web/js/tab.d.ts +2 -0
- package/dist/web/js/table-cell-border.d.ts +13 -0
- package/dist/web/js/table-cell-borders.d.ts +15 -0
- package/dist/web/js/table-cell.d.ts +61 -0
- package/dist/web/js/table-of-contents-item.d.ts +12 -0
- package/dist/web/js/table-of-contents.d.ts +46 -0
- package/dist/web/js/table-row.d.ts +21 -0
- package/dist/web/js/table.d.ts +85 -0
- package/dist/web/js/tc.d.ts +10 -0
- package/dist/web/js/text.d.ts +4 -0
- package/dist/web/js/webextension.d.ts +12 -0
- package/dist/web/json/bindings/DrawingPosition.d.ts +2 -2
- package/dist/web/json/bindings/FieldChar.d.ts +2 -2
- package/dist/web/json/bindings/FontGroup.d.ts +2 -2
- package/dist/web/json/bindings/FontScheme.d.ts +2 -2
- package/dist/web/json/bindings/FontSchemeFont.d.ts +2 -2
- package/dist/web/json/bindings/FrameProperty.d.ts +50 -14
- package/dist/web/json/bindings/ImageData.d.ts +2 -2
- package/dist/web/json/bindings/InstrHyperlink.d.ts +2 -2
- package/dist/web/json/bindings/InstrToC.d.ts +11 -11
- package/dist/web/json/bindings/PageNumType.d.ts +4 -4
- package/dist/web/json/bindings/Pic.d.ts +23 -2
- package/dist/web/json/bindings/PositionalTab.d.ts +2 -2
- package/dist/web/json/bindings/Shape.d.ts +4 -4
- package/dist/web/json/bindings/Tab.d.ts +2 -2
- package/dist/web/json/bindings/TableCellBorder.d.ts +2 -2
- package/dist/web/json/bindings/TableCellBorderPosition.d.ts +1 -1
- package/dist/web/json/bindings/TableCellBorders.d.ts +4 -4
- package/dist/web/json/bindings/TablePositionProperty.d.ts +13 -10
- package/dist/web/json/bindings/Theme.d.ts +2 -2
- package/dist/web/json/index.d.ts +10 -0
- package/dist/web/json/index.js.map +1 -1
- package/dist/web/json/run.d.ts +4 -1
- package/dist/web/paragraph-property.d.ts +1 -1
- package/dist/web/paragraph-property.js.map +1 -1
- package/dist/web/pkg/docx_wasm.d.ts +1069 -810
- package/dist/web/pkg/docx_wasm.js +7 -2
- package/dist/web/pkg/docx_wasm_bg.js +3947 -3870
- package/dist/web/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/web/pkg/docx_wasm_bg.wasm.d.ts +274 -261
- package/dist/web/pkg/package.json +2 -1
- package/dist/web/run-property.d.ts +1 -1
- package/dist/web/run-property.js.map +1 -1
- package/dist/web/run.d.ts +3 -1
- package/dist/web/run.js +8 -0
- package/dist/web/run.js.map +1 -1
- package/dist/web/section-property.js +1 -1
- package/dist/web/section-property.js.map +1 -1
- package/dist/web/style.js.map +1 -1
- package/dist/web/tab-leader.js.map +1 -1
- package/dist/web/table-cell-borders.js.map +1 -1
- package/dist/web/table-cell.js.map +1 -1
- package/dist/web/table-of-contents-item.js.map +1 -1
- package/dist/web/table-of-contents.js.map +1 -1
- package/dist/web/table-row.js.map +1 -1
- package/dist/web/table.d.ts +1 -1
- package/dist/web/table.js.map +1 -1
- package/js/carriage-return.ts +1 -0
- package/js/index.ts +1 -0
- package/js/json/bindings/AlignmentType.ts +1 -1
- package/js/json/bindings/BorderType.ts +1 -1
- package/js/json/bindings/DrawingPosition.ts +1 -1
- package/js/json/bindings/DrawingPositionType.ts +1 -1
- package/js/json/bindings/FieldChar.ts +1 -1
- package/js/json/bindings/FieldCharType.ts +1 -1
- package/js/json/bindings/FontGroup.ts +1 -1
- package/js/json/bindings/FontScheme.ts +1 -1
- package/js/json/bindings/FontSchemeFont.ts +1 -1
- package/js/json/bindings/FrameProperty.ts +46 -1
- package/js/json/bindings/HyperlinkType.ts +1 -1
- package/js/json/bindings/ImageData.ts +1 -1
- package/js/json/bindings/InstrHyperlink.ts +1 -1
- package/js/json/bindings/InstrToC.ts +1 -1
- package/js/json/bindings/PageNumType.ts +1 -1
- package/js/json/bindings/Pic.ts +26 -1
- package/js/json/bindings/PicAlign.ts +1 -1
- package/js/json/bindings/PositionalTab.ts +1 -1
- package/js/json/bindings/PositionalTabAlignmentType.ts +1 -1
- package/js/json/bindings/PositionalTabRelativeTo.ts +1 -1
- package/js/json/bindings/RelativeFromHType.ts +1 -1
- package/js/json/bindings/RelativeFromVType.ts +1 -1
- package/js/json/bindings/Shape.ts +1 -1
- package/js/json/bindings/StyleWithLevel.ts +1 -1
- package/js/json/bindings/Tab.ts +1 -1
- package/js/json/bindings/TabLeaderType.ts +1 -1
- package/js/json/bindings/TabValueType.ts +1 -1
- package/js/json/bindings/TableCellBorder.ts +1 -1
- package/js/json/bindings/TableCellBorderPosition.ts +1 -1
- package/js/json/bindings/TableCellBorders.ts +1 -1
- package/js/json/bindings/TablePositionProperty.ts +4 -1
- package/js/json/bindings/TextAlignmentType.ts +1 -1
- package/js/json/bindings/Theme.ts +1 -1
- package/js/json/index.ts +10 -1
- package/js/json/run.ts +5 -0
- package/js/run.ts +9 -0
- package/js/section-property.ts +1 -1
- package/package.json +17 -8
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CommentRangeEnd } from "./CommentRangeEnd";
|
|
2
|
+
import type { CommentRangeStart } from "./CommentRangeStart";
|
|
3
|
+
import type { Run } from "./Run";
|
|
4
|
+
export type DeleteChild = {
|
|
5
|
+
"Run": Run;
|
|
6
|
+
} | {
|
|
7
|
+
"CommentStart": CommentRangeStart;
|
|
8
|
+
} | {
|
|
9
|
+
"CommentEnd": CommentRangeEnd;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DrawingPositionType = "anchor" | "inline";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FieldCharType = "begin" | "separate" | "end" | "unsupported";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type FrameProperty = {
|
|
2
|
+
/**
|
|
3
|
+
* Frame Height
|
|
4
|
+
* Represents the following attribute in the schema: w:h
|
|
5
|
+
*/
|
|
6
|
+
h: number | null;
|
|
7
|
+
/**
|
|
8
|
+
* Frame Height Type
|
|
9
|
+
* Represents the following attribute in the schema: w:hRule
|
|
10
|
+
*/
|
|
11
|
+
hRule: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Frame Horizontal Positioning Base
|
|
14
|
+
* Represents the following attribute in the schema: w:hAnchor
|
|
15
|
+
*/
|
|
16
|
+
hAnchor: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Horizontal Frame Padding
|
|
19
|
+
* Represents the following attribute in the schema: w:hSpace
|
|
20
|
+
*/
|
|
21
|
+
hSpace: number | null;
|
|
22
|
+
vAnchor: string | null;
|
|
23
|
+
vSpace: number | null;
|
|
24
|
+
w: number | null;
|
|
25
|
+
/**
|
|
26
|
+
* Text Wrapping Around Frame
|
|
27
|
+
* Represents the following attribute in the schema: w:wrap
|
|
28
|
+
*/
|
|
29
|
+
wrap: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* Absolute Horizontal Position
|
|
32
|
+
* Represents the following attribute in the schema: w:x
|
|
33
|
+
*/
|
|
34
|
+
x: number | null;
|
|
35
|
+
/**
|
|
36
|
+
* Relative Horizontal Position
|
|
37
|
+
* Represents the following attribute in the schema: w:xAlign
|
|
38
|
+
*/
|
|
39
|
+
xAlign: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Absolute Vertical Position
|
|
42
|
+
* Represents the following attribute in the schema: w:y
|
|
43
|
+
*/
|
|
44
|
+
y: number | null;
|
|
45
|
+
/**
|
|
46
|
+
* Relative Vertical Position
|
|
47
|
+
* Represents the following attribute in the schema: w:yAlign
|
|
48
|
+
*/
|
|
49
|
+
yAlign: string | null;
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Highlight = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type HyperlinkType = "anchor" | "external";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommentRangeEnd } from "./CommentRangeEnd";
|
|
2
|
+
import type { CommentRangeStart } from "./CommentRangeStart";
|
|
3
|
+
import type { Delete } from "./Delete";
|
|
4
|
+
import type { Run } from "./Run";
|
|
5
|
+
export type InsertChild = {
|
|
6
|
+
"Run": Run;
|
|
7
|
+
} | {
|
|
8
|
+
"Delete": Delete;
|
|
9
|
+
} | {
|
|
10
|
+
"CommentStart": CommentRangeStart;
|
|
11
|
+
} | {
|
|
12
|
+
"CommentEnd": CommentRangeEnd;
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { InstrHyperlink } from "./InstrHyperlink";
|
|
2
|
+
import type { InstrPAGEREF } from "./InstrPAGEREF";
|
|
3
|
+
import type { InstrTC } from "./InstrTC";
|
|
4
|
+
import type { InstrToC } from "./InstrToC";
|
|
5
|
+
export type InstrText = {
|
|
6
|
+
"TOC": InstrToC;
|
|
7
|
+
} | {
|
|
8
|
+
"TC": InstrTC;
|
|
9
|
+
} | {
|
|
10
|
+
"PAGEREF": InstrPAGEREF;
|
|
11
|
+
} | {
|
|
12
|
+
"HYPERLINK": InstrHyperlink;
|
|
13
|
+
} | {
|
|
14
|
+
"Unsupported": string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StyleWithLevel } from "./StyleWithLevel";
|
|
2
|
+
export type InstrToC = {
|
|
3
|
+
headingStylesRange: [number, number] | null;
|
|
4
|
+
tcFieldLevelRange: [number, number] | null;
|
|
5
|
+
omitPageNumbersLevelRange: [number, number] | null;
|
|
6
|
+
entryBookmarkName: string | null;
|
|
7
|
+
stylesWithLevels: Array<StyleWithLevel>;
|
|
8
|
+
entryAndPageNumberSeparator: string | null;
|
|
9
|
+
sequenceAndPageNumbersSeparator: string | null;
|
|
10
|
+
captionLabel: string | null;
|
|
11
|
+
captionLabelIncludingNumbers: string | null;
|
|
12
|
+
seqFieldIdentifierForPrefix: string | null;
|
|
13
|
+
tcFieldIdentifier: string | null | null;
|
|
14
|
+
hyperlink: boolean;
|
|
15
|
+
preserveTab: boolean;
|
|
16
|
+
preserveNewLine: boolean;
|
|
17
|
+
useAppliedParagraphLineLevel: boolean;
|
|
18
|
+
hideTabAndPageNumbersInWebview: boolean;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Italic = boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ItalicCs = boolean;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { DrawingPosition } from "./DrawingPosition";
|
|
2
|
+
import type { DrawingPositionType } from "./DrawingPositionType";
|
|
3
|
+
import type { RelativeFromHType } from "./RelativeFromHType";
|
|
4
|
+
import type { RelativeFromVType } from "./RelativeFromVType";
|
|
5
|
+
export type Pic = {
|
|
6
|
+
id: string;
|
|
7
|
+
image: Array<number>;
|
|
8
|
+
size: [number, number];
|
|
9
|
+
positionType: DrawingPositionType;
|
|
10
|
+
/**
|
|
11
|
+
* Specifies that this object shall be positioned using the positioning information in the
|
|
12
|
+
* simplePos child element (§20.4.2.13). This positioning, when specified, positions the
|
|
13
|
+
* object on the page by placing its top left point at the x-y coordinates specified by that
|
|
14
|
+
* element.
|
|
15
|
+
*/
|
|
16
|
+
simplePos: boolean;
|
|
17
|
+
simplePosX: number;
|
|
18
|
+
simplePosY: number;
|
|
19
|
+
/**
|
|
20
|
+
* Specifies how this DrawingML object behaves when its anchor is located in a table cell;
|
|
21
|
+
* and its specified position would cause it to intersect with a table cell displayed in the
|
|
22
|
+
* document. That behavior shall be as follows:
|
|
23
|
+
*/
|
|
24
|
+
layoutInCell: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies the relative Z-ordering of all DrawingML objects in this document. Each floating
|
|
27
|
+
* DrawingML object shall have a Z-ordering value, which determines which object is
|
|
28
|
+
* displayed when any two objects intersect. Higher values shall indicate higher Z-order;
|
|
29
|
+
* lower values shall indicate lower Z-order.
|
|
30
|
+
*/
|
|
31
|
+
relativeHeight: number;
|
|
32
|
+
allowOverlap: boolean;
|
|
33
|
+
positionH: DrawingPosition;
|
|
34
|
+
positionV: DrawingPosition;
|
|
35
|
+
relativeFromH: RelativeFromHType;
|
|
36
|
+
relativeFromV: RelativeFromVType;
|
|
37
|
+
/**
|
|
38
|
+
* Specifies the minimum distance which shall be maintained between the top edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.,
|
|
39
|
+
* The distance shall be measured in EMUs (English Metric Units).,
|
|
40
|
+
*/
|
|
41
|
+
distT: number;
|
|
42
|
+
distB: number;
|
|
43
|
+
distL: number;
|
|
44
|
+
distR: number;
|
|
45
|
+
rot: number;
|
|
46
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PicAlign = "left" | "right" | "center" | "bottom" | "top";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PositionalTabAlignmentType } from "./PositionalTabAlignmentType";
|
|
2
|
+
import type { PositionalTabRelativeTo } from "./PositionalTabRelativeTo";
|
|
3
|
+
import type { TabLeaderType } from "./TabLeaderType";
|
|
4
|
+
export type PositionalTab = {
|
|
5
|
+
alignment: PositionalTabAlignmentType;
|
|
6
|
+
relativeTo: PositionalTabRelativeTo;
|
|
7
|
+
leader: TabLeaderType;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PositionalTabAlignmentType = "center" | "left" | "right";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PositionalTabRelativeTo = "indent" | "margin";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type RelativeFromHType = "character" | "column" | "insideMargin" | "leftMargin" | "margin" | "outsizeMargin" | "page" | "rightMargin";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type RelativeFromVType = "bottomMargin" | "insideMargin" | "line" | "margin" | "outsizeMargin" | "page" | "paragraph" | "topMargin";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Bold } from "./Bold";
|
|
2
|
+
import type { BoldCs } from "./BoldCs";
|
|
3
|
+
import type { Caps } from "./Caps";
|
|
4
|
+
import type { CharacterSpacing } from "./CharacterSpacing";
|
|
5
|
+
import type { Color } from "./Color";
|
|
6
|
+
import type { Delete } from "./Delete";
|
|
7
|
+
import type { FitText } from "./FitText";
|
|
8
|
+
import type { Highlight } from "./Highlight";
|
|
9
|
+
import type { Insert } from "./Insert";
|
|
10
|
+
import type { Italic } from "./Italic";
|
|
11
|
+
import type { ItalicCs } from "./ItalicCs";
|
|
12
|
+
import type { RunFonts } from "./RunFonts";
|
|
13
|
+
import type { RunStyle } from "./RunStyle";
|
|
14
|
+
import type { SpecVanish } from "./SpecVanish";
|
|
15
|
+
import type { Strike } from "./Strike";
|
|
16
|
+
import type { Sz } from "./Sz";
|
|
17
|
+
import type { SzCs } from "./SzCs";
|
|
18
|
+
import type { TextBorder } from "./TextBorder";
|
|
19
|
+
import type { Underline } from "./Underline";
|
|
20
|
+
import type { Vanish } from "./Vanish";
|
|
21
|
+
import type { VertAlign } from "./VertAlign";
|
|
22
|
+
export interface RunProperty {
|
|
23
|
+
style?: RunStyle;
|
|
24
|
+
sz?: Sz;
|
|
25
|
+
szCs?: SzCs;
|
|
26
|
+
color?: Color;
|
|
27
|
+
highlight?: Highlight;
|
|
28
|
+
vertAlign?: VertAlign;
|
|
29
|
+
underline?: Underline;
|
|
30
|
+
bold?: Bold;
|
|
31
|
+
boldCs?: BoldCs;
|
|
32
|
+
caps?: Caps;
|
|
33
|
+
italic?: Italic;
|
|
34
|
+
italicCs?: ItalicCs;
|
|
35
|
+
vanish?: Vanish;
|
|
36
|
+
specVanish?: SpecVanish;
|
|
37
|
+
characterSpacing?: CharacterSpacing;
|
|
38
|
+
fitText?: FitText;
|
|
39
|
+
fonts?: RunFonts;
|
|
40
|
+
textBorder?: TextBorder;
|
|
41
|
+
del?: Delete;
|
|
42
|
+
ins?: Insert;
|
|
43
|
+
strike?: Strike;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type RunStyle = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SpecVanish = boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Strike = boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type StyleWithLevel = [string, number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Sz = number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SzCs = number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TabLeaderType = "dot" | "heavy" | "hyphen" | "middleDot" | "none" | "underscore";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TabValueType = "bar" | "center" | "clear" | "decimal" | "end" | "right" | "num" | "start" | "left";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BorderType } from "./BorderType";
|
|
2
|
+
import type { TableCellBorderPosition } from "./TableCellBorderPosition";
|
|
3
|
+
export type TableCellBorder = {
|
|
4
|
+
borderType: BorderType;
|
|
5
|
+
size: number;
|
|
6
|
+
color: string;
|
|
7
|
+
position: TableCellBorderPosition;
|
|
8
|
+
space: number;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TableCellBorderPosition = "left" | "right" | "top" | "bottom" | "insideH" | "insideV" | "tl2br" | "tr2bl";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TableCellBorder } from "./TableCellBorder";
|
|
2
|
+
export type TableCellBorders = {
|
|
3
|
+
top: TableCellBorder | null;
|
|
4
|
+
left: TableCellBorder | null;
|
|
5
|
+
bottom: TableCellBorder | null;
|
|
6
|
+
right: TableCellBorder | null;
|
|
7
|
+
insideH: TableCellBorder | null;
|
|
8
|
+
insideV: TableCellBorder | null;
|
|
9
|
+
tr2bl: TableCellBorder | null;
|
|
10
|
+
tl2br: TableCellBorder | null;
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.tablepositionproperties?view=openxml-3.0.1
|
|
3
|
+
*/
|
|
4
|
+
export type TablePositionProperty = {
|
|
5
|
+
leftFromText: number | null;
|
|
6
|
+
rightFromText: number | null;
|
|
7
|
+
verticalAnchor: string | null;
|
|
8
|
+
horizontalAnchor: string | null;
|
|
9
|
+
positionXAlignment: string | null;
|
|
10
|
+
positionYAlignment: string | null;
|
|
11
|
+
positionX: number | null;
|
|
12
|
+
positionY: number | null;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TextAlignmentType = "auto" | "baseline" | "bottom" | "center" | "top";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Underline = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Vanish = boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type VertAlign = string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ParagraphJSON, TableJSON } from "../";
|
|
2
|
+
export type CommentChildJSON = ParagraphJSON | TableJSON;
|
|
3
|
+
export type CommentJSON = {
|
|
4
|
+
id: number;
|
|
5
|
+
author: string;
|
|
6
|
+
date: string;
|
|
7
|
+
children: CommentChildJSON[];
|
|
8
|
+
parentCommentId: number | null;
|
|
9
|
+
};
|
|
10
|
+
export type CommentRangeStartJSON = {
|
|
11
|
+
type: "commentRangeStart";
|
|
12
|
+
data: {
|
|
13
|
+
id: number;
|
|
14
|
+
comment: CommentJSON;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type CommentRangeEndJSON = {
|
|
18
|
+
type: "commentRangeEnd";
|
|
19
|
+
data: {
|
|
20
|
+
id: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ParagraphJSON, BookmarkStartJSON, BookmarkEndJSON } from "./paragraph";
|
|
2
|
+
import { TableJSON } from "./table";
|
|
3
|
+
import { SectionPropertyJSON } from "./section-property";
|
|
4
|
+
import { CommentRangeStartJSON, CommentRangeEndJSON } from "..";
|
|
5
|
+
import { StructuredTagJSON } from "./structured-data-tag";
|
|
6
|
+
export type DocumentChildJSON = ParagraphJSON | TableJSON | CommentRangeStartJSON | CommentRangeEndJSON | BookmarkStartJSON | BookmarkEndJSON | StructuredTagJSON;
|
|
7
|
+
export type DocumentJSON = {
|
|
8
|
+
children: DocumentChildJSON[];
|
|
9
|
+
sectionProperty: SectionPropertyJSON;
|
|
10
|
+
hasNumbering: boolean;
|
|
11
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { TextBoxContentJSON } from "./textbox-content";
|
|
2
|
+
import { Pic as InnerPic } from "./bindings/Pic";
|
|
3
|
+
import { ParagraphJSON, TableJSON } from "..";
|
|
4
|
+
export interface Pic extends Omit<InnerPic, "image"> {
|
|
5
|
+
image: string;
|
|
6
|
+
}
|
|
7
|
+
export type DrawingJSON = {
|
|
8
|
+
type: "drawing";
|
|
9
|
+
data: {
|
|
10
|
+
type: "pic";
|
|
11
|
+
data: Pic;
|
|
12
|
+
} | {
|
|
13
|
+
type: "textBox";
|
|
14
|
+
data: {
|
|
15
|
+
children: (ParagraphJSON | TableJSON)[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type WpAnchorJSON = {
|
|
20
|
+
type: "anchor";
|
|
21
|
+
data: {
|
|
22
|
+
children: AGraphicJSON[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type AGraphicJSON = {
|
|
26
|
+
children: AGraphChildJSON[];
|
|
27
|
+
};
|
|
28
|
+
export type AGraphChildJSON = AGraphicDataJSON;
|
|
29
|
+
export type AGraphicDataJSON = {
|
|
30
|
+
dataType: "wpShape";
|
|
31
|
+
children: WpsShapeJSON[];
|
|
32
|
+
};
|
|
33
|
+
export type WpsShapeJSON = {
|
|
34
|
+
type: "shape";
|
|
35
|
+
data: {
|
|
36
|
+
children: WpsShapeChildJSON[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type WpsShapeChildJSON = WpsTextBoxJSON;
|
|
40
|
+
export type WpsTextBoxJSON = {
|
|
41
|
+
type: "textbox";
|
|
42
|
+
data: {
|
|
43
|
+
children: TextBoxContentJSON[];
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ParagraphJSON } from "./paragraph";
|
|
2
|
+
import { StructuredTagJSON } from "./structured-data-tag";
|
|
3
|
+
import { TableJSON } from "./table";
|
|
4
|
+
export type FooterJSON = [
|
|
5
|
+
string,
|
|
6
|
+
{
|
|
7
|
+
children: (ParagraphJSON | TableJSON | StructuredTagJSON)[];
|
|
8
|
+
}
|
|
9
|
+
];
|
|
10
|
+
export type FooterReferenceJSON = {
|
|
11
|
+
footerType: string;
|
|
12
|
+
id: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ParagraphJSON } from "./paragraph";
|
|
2
|
+
import { StructuredTagJSON } from "./structured-data-tag";
|
|
3
|
+
import { TableJSON } from "./table";
|
|
4
|
+
export type HeaderJSON = [
|
|
5
|
+
string,
|
|
6
|
+
{
|
|
7
|
+
children: (ParagraphJSON | TableJSON | StructuredTagJSON)[];
|
|
8
|
+
}
|
|
9
|
+
];
|
|
10
|
+
export type HeaderReferenceJSON = {
|
|
11
|
+
headerType: string;
|
|
12
|
+
id: string;
|
|
13
|
+
};
|