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
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
-
export type RelativeFromHType = "character" | "column" | "insideMargin" | "leftMargin" | "margin" | "outsizeMargin" | "page" | "rightMargin";
|
|
3
|
+
export type RelativeFromHType = "character" | "column" | "insideMargin" | "leftMargin" | "margin" | "outsizeMargin" | "page" | "rightMargin";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
-
export type RelativeFromVType = "bottomMargin" | "insideMargin" | "line" | "margin" | "outsizeMargin" | "page" | "paragraph" | "topMargin";
|
|
3
|
+
export type RelativeFromVType = "bottomMargin" | "insideMargin" | "line" | "margin" | "outsizeMargin" | "page" | "paragraph" | "topMargin";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
import type { ImageData } from "./ImageData";
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export type Shape = { style: string | null, imageData: ImageData | null, };
|
package/js/json/bindings/Tab.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import type { TabLeaderType } from "./TabLeaderType";
|
|
3
3
|
import type { TabValueType } from "./TabValueType";
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export type Tab = { val: TabValueType | null, leader: TabLeaderType | null, pos: number | null, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
-
export type TabLeaderType = "dot" | "heavy" | "hyphen" | "middleDot" | "none" | "underscore";
|
|
3
|
+
export type TabLeaderType = "dot" | "heavy" | "hyphen" | "middleDot" | "none" | "underscore";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
-
export type TabValueType = "bar" | "center" | "clear" | "decimal" | "end" | "right" | "num" | "start" | "left";
|
|
3
|
+
export type TabValueType = "bar" | "center" | "clear" | "decimal" | "end" | "right" | "num" | "start" | "left";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
import type { BorderType } from "./BorderType";
|
|
3
3
|
import type { TableCellBorderPosition } from "./TableCellBorderPosition";
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export type TableCellBorder = { borderType: BorderType, size: number, color: string, position: TableCellBorderPosition, space: number, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
-
export type TableCellBorderPosition = "left" | "right" | "top" | "bottom" | "insideH" | "insideV" | "
|
|
3
|
+
export type TableCellBorderPosition = "left" | "right" | "top" | "bottom" | "insideH" | "insideV" | "tl2br" | "tr2bl";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
import type { TableCellBorder } from "./TableCellBorder";
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export type TableCellBorders = { top: TableCellBorder | null, left: TableCellBorder | null, bottom: TableCellBorder | null, right: TableCellBorder | null, insideH: TableCellBorder | null, insideV: TableCellBorder | null, tr2bl: TableCellBorder | null, tl2br: TableCellBorder | null, };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.tablepositionproperties?view=openxml-3.0.1
|
|
5
|
+
*/
|
|
6
|
+
export type TablePositionProperty = { leftFromText: number | null, rightFromText: number | null, verticalAnchor: string | null, horizontalAnchor: string | null, positionXAlignment: string | null, positionYAlignment: string | null, positionX: number | null, positionY: number | null, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
-
export type TextAlignmentType = "auto" | "baseline" | "bottom" | "center" | "top";
|
|
3
|
+
export type TextAlignmentType = "auto" | "baseline" | "bottom" | "center" | "top";
|
package/js/json/index.ts
CHANGED
|
@@ -48,7 +48,16 @@ export type DocxJSON = {
|
|
|
48
48
|
webSettings: WebSettingsJSON;
|
|
49
49
|
fontTable: {};
|
|
50
50
|
themes: ThemeJSON[];
|
|
51
|
-
|
|
51
|
+
/**
|
|
52
|
+
* `[id, path, base64 original bytes, base64 preview bytes]`.
|
|
53
|
+
*
|
|
54
|
+
* The preview is PNG for raster originals (PNG / JPEG / GIF / BMP / TIFF).
|
|
55
|
+
* For EMF originals (path ends with `.emf`) the preview is SVG bytes
|
|
56
|
+
* instead — decoded via emf-core on the Rust side. Distinguish the
|
|
57
|
+
* two cases via the file extension on `path`, or by sniffing the
|
|
58
|
+
* decoded preview bytes (PNG starts with `\x89PNG`, SVG starts with
|
|
59
|
+
* `<svg` / `<?xml`).
|
|
60
|
+
*/
|
|
52
61
|
images: [string, string, string, string][];
|
|
53
62
|
hyperlinks: [string, string, string][];
|
|
54
63
|
};
|
package/js/json/run.ts
CHANGED
|
@@ -71,6 +71,7 @@ export type RunChildJSON =
|
|
|
71
71
|
| SymJSON
|
|
72
72
|
| DeleteTextJSON
|
|
73
73
|
| TabJSON
|
|
74
|
+
| CarriageReturnJSON
|
|
74
75
|
| BreakJSON
|
|
75
76
|
| DrawingJSON
|
|
76
77
|
| PtabJSON
|
|
@@ -117,6 +118,10 @@ export type TabJSON = {
|
|
|
117
118
|
type: "tab";
|
|
118
119
|
};
|
|
119
120
|
|
|
121
|
+
export type CarriageReturnJSON = {
|
|
122
|
+
type: "carriageReturn";
|
|
123
|
+
};
|
|
124
|
+
|
|
120
125
|
export type BreakJSON = {
|
|
121
126
|
type: "break";
|
|
122
127
|
data: {
|
package/js/run.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Text } from "./text";
|
|
|
4
4
|
import { DeleteText } from "./delete-text";
|
|
5
5
|
import { Tab } from "./tab";
|
|
6
6
|
import { Break, BreakType } from "./break";
|
|
7
|
+
import { CarriageReturn } from "./carriage-return";
|
|
7
8
|
import { BorderType } from "./border";
|
|
8
9
|
import { Image } from "./image";
|
|
9
10
|
import { PositionalTab } from "./positional-tab";
|
|
@@ -20,6 +21,7 @@ export type RunChild =
|
|
|
20
21
|
| Text
|
|
21
22
|
| DeleteText
|
|
22
23
|
| Tab
|
|
24
|
+
| CarriageReturn
|
|
23
25
|
| Break
|
|
24
26
|
| Image
|
|
25
27
|
| PositionalTab
|
|
@@ -59,6 +61,11 @@ export class Run {
|
|
|
59
61
|
return this;
|
|
60
62
|
}
|
|
61
63
|
|
|
64
|
+
addCarriageReturn() {
|
|
65
|
+
this.children.push(new CarriageReturn());
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
|
|
62
69
|
addTc(tc: Tc) {
|
|
63
70
|
this.children.push(tc);
|
|
64
71
|
return this;
|
|
@@ -187,6 +194,8 @@ export class Run {
|
|
|
187
194
|
run = run.add_delete_text(child.text);
|
|
188
195
|
} else if (child instanceof Tab) {
|
|
189
196
|
run = run.add_tab();
|
|
197
|
+
} else if (child instanceof CarriageReturn) {
|
|
198
|
+
run = run.add_carriage_return();
|
|
190
199
|
} else if (child instanceof PositionalTab) {
|
|
191
200
|
run = run.add_ptab(child.buildWasmObject());
|
|
192
201
|
} else if (child instanceof Break) {
|
package/js/section-property.ts
CHANGED
|
@@ -82,7 +82,7 @@ export class SectionProperty {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
pageTypeNum({ start, chapStyle }: { start?: number; chapStyle?: string }) {
|
|
85
|
-
this._pageTypeNum = { start, chapStyle };
|
|
85
|
+
this._pageTypeNum = { start: start ?? null, chapStyle: chapStyle ?? null };
|
|
86
86
|
return this;
|
|
87
87
|
}
|
|
88
88
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docx-wasm",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.21",
|
|
4
4
|
"main": "dist/node/index.js",
|
|
5
5
|
"browser": "dist/web/index.js",
|
|
6
6
|
"author": "bokuweb <bokuweb12@gmail.com>",
|
|
@@ -25,24 +25,33 @@
|
|
|
25
25
|
},
|
|
26
26
|
"pnpm": {
|
|
27
27
|
"overrides": {
|
|
28
|
-
"
|
|
28
|
+
"@babel/core@7": "7.29.6",
|
|
29
|
+
"@babel/helpers@7": "7.29.7",
|
|
30
|
+
"brace-expansion@1": "1.1.13",
|
|
31
|
+
"cross-spawn@7": "7.0.6",
|
|
32
|
+
"js-yaml@3": "3.15.0",
|
|
33
|
+
"lodash@4": "4.18.1",
|
|
34
|
+
"minimatch@3": "3.1.4",
|
|
35
|
+
"picomatch@2": "2.3.2",
|
|
36
|
+
"serialize-javascript": "7.0.7",
|
|
37
|
+
"shell-quote@1": "1.8.4"
|
|
29
38
|
}
|
|
30
39
|
},
|
|
31
40
|
"devDependencies": {
|
|
32
41
|
"@types/file-saver": "2.0.7",
|
|
33
42
|
"@wasm-tool/wasm-pack-plugin": "1.6.0",
|
|
34
|
-
"adm-zip": "0.
|
|
43
|
+
"adm-zip": "0.6.0",
|
|
35
44
|
"cpy-cli": "4.2.0",
|
|
36
45
|
"file-saver": "2.0.5",
|
|
37
|
-
"html-webpack-plugin": "5.
|
|
46
|
+
"html-webpack-plugin": "5.6.7",
|
|
38
47
|
"jest": "28.1.3",
|
|
39
48
|
"npm-run-all2": "5.0.2",
|
|
40
49
|
"text-encoding": "0.7.0",
|
|
41
|
-
"ts-loader": "9.5.
|
|
42
|
-
"typescript": "
|
|
43
|
-
"webpack": "
|
|
50
|
+
"ts-loader": "9.5.7",
|
|
51
|
+
"typescript": "^5.5.0",
|
|
52
|
+
"webpack": "5.108.4",
|
|
44
53
|
"webpack-cli": "5.1.4",
|
|
45
|
-
"webpack-dev-server": "
|
|
54
|
+
"webpack-dev-server": "6.0.0",
|
|
46
55
|
"webpack-merge": "5.10.0"
|
|
47
56
|
},
|
|
48
57
|
"files": [
|