@eigenpal/docx-editor-core 1.2.1 → 1.3.1
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/agent/index.d.mts +5 -4
- package/dist/agent/index.d.ts +5 -4
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/anchoredObjectPosition-CS-8BfhO.d.ts +48 -0
- package/dist/anchoredObjectPosition-KJEyF-wr.d.mts +48 -0
- package/dist/{chunk-U4WUDHDK.js → chunk-2SGJZYQF.js} +1 -1
- package/dist/chunk-3ANZ3252.mjs +2 -0
- package/dist/chunk-3G44SFHX.mjs +4 -0
- package/dist/{chunk-4QEETB7U.js → chunk-3QPKTG2Y.js} +2 -2
- package/dist/chunk-3R7QHNI5.js +2 -0
- package/dist/chunk-4GFTMGSV.mjs +1 -0
- package/dist/chunk-4MYKVWNF.js +1 -0
- package/dist/chunk-4RTVLMRZ.js +2 -0
- package/dist/chunk-55XWETY4.mjs +1 -0
- package/dist/chunk-6QO4O52Y.mjs +1 -0
- package/dist/{chunk-THLJYXFB.js → chunk-6V3SFHEM.js} +1 -1
- package/dist/{chunk-6ZXL3EIP.mjs → chunk-7CZEZ3UL.mjs} +1 -1
- package/dist/{chunk-Z5MJYQSD.mjs → chunk-7UZJ5YDF.mjs} +1 -1
- package/dist/{chunk-BXWOLARZ.js → chunk-APNMO5JT.js} +1 -1
- package/dist/{chunk-KZXZWGFX.mjs → chunk-B46V5G46.mjs} +1 -1
- package/dist/chunk-BH3ACQ3M.js +59 -0
- package/dist/chunk-BUCOTKYY.js +1 -0
- package/dist/{chunk-5BLQHXWK.mjs → chunk-CDXCFHOY.mjs} +1 -1
- package/dist/chunk-CHN26LLL.mjs +59 -0
- package/dist/chunk-CZSAC65M.js +2 -0
- package/dist/chunk-D3PRIF3Y.mjs +1 -0
- package/dist/chunk-DE2V4X3B.mjs +1 -0
- package/dist/{chunk-7BVHKWEW.mjs → chunk-DFUWJHKF.mjs} +1 -1
- package/dist/{chunk-UGV4KRQB.js → chunk-DG2CMDSM.js} +1 -1
- package/dist/chunk-DKKTY56Q.js +1 -0
- package/dist/chunk-FIGLFSNR.js +1 -0
- package/dist/{chunk-AMB6Y77B.js → chunk-FQS436KN.js} +1 -1
- package/dist/chunk-FYRJTDC4.mjs +2 -0
- package/dist/chunk-GYWTUUXX.mjs +2 -0
- package/dist/chunk-HPJBZL37.mjs +1 -0
- package/dist/chunk-INDYZOOS.js +1 -0
- package/dist/chunk-IUVQJ6PX.mjs +1 -0
- package/dist/chunk-J3YFJDZD.js +1 -0
- package/dist/chunk-JHTURDPX.mjs +1 -0
- package/dist/{chunk-D62KS7QG.mjs → chunk-LAJPGQEE.mjs} +1 -1
- package/dist/chunk-LERLET2D.js +4 -0
- package/dist/chunk-LX35TFGF.mjs +1 -0
- package/dist/{chunk-BOOHU5EW.mjs → chunk-MOCGHQ4A.mjs} +1 -1
- package/dist/chunk-NAFMAKLK.js +2 -0
- package/dist/chunk-NRWQ65NX.js +1 -0
- package/dist/chunk-OTHV7YV2.js +2 -0
- package/dist/chunk-QLAIOTQB.js +1 -0
- package/dist/{chunk-U4XMGWF7.js → chunk-RAWVGULQ.js} +1 -1
- package/dist/chunk-RQVHKDXK.js +2 -0
- package/dist/chunk-RSU4HTC6.js +1 -0
- package/dist/{chunk-E4JMCA5X.js → chunk-SCK6ZM5V.js} +2 -2
- package/dist/chunk-SWBLJF6R.mjs +2 -0
- package/dist/chunk-UE2ZKRYB.mjs +2 -0
- package/dist/chunk-VOCHZNOF.mjs +1 -0
- package/dist/{chunk-OEXVWIHW.mjs → chunk-W77JXDEV.mjs} +1 -1
- package/dist/chunk-W7CQRQZ6.mjs +1 -0
- package/dist/chunk-WWBNJ7KF.js +1 -0
- package/dist/chunk-WWNOXNEX.mjs +2 -0
- package/dist/chunk-YGWUKRFD.mjs +1 -0
- package/dist/chunk-YM7SMTYY.js +1 -0
- package/dist/{chunk-QKLY4F2J.mjs → chunk-YNUPP7UG.mjs} +1 -1
- package/dist/chunk-YPKIQMPR.js +1 -0
- package/dist/{chunk-HQPWFUP5.js → chunk-Z3LGMBJC.js} +1 -1
- package/dist/{colorResolver-BZ_yScf4.d.ts → colorResolver-8A-qj-LP.d.ts} +1 -1
- package/dist/{colorResolver-C6DtsoFI.d.mts → colorResolver-BCvxTlLF.d.mts} +1 -1
- package/dist/{content-CE-ZdMwG.d.mts → content-3xF4WDE8.d.mts} +51 -7
- package/dist/{content-CYXJ2tfQ.d.ts → content-C8fc_tL6.d.ts} +51 -7
- package/dist/{contentControlValues-gyVPsi6m.d.ts → contentControlValues-DGDKD589.d.ts} +1 -1
- package/dist/{contentControlValues-DAwTWfgR.d.mts → contentControlValues-DjWvoJQ-.d.mts} +1 -1
- package/dist/core-plugins.d.mts +6 -5
- package/dist/core-plugins.d.ts +6 -5
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +12 -11
- package/dist/core.d.ts +12 -11
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{documentStyles-DToJv9co.d.ts → documentStyles-C7k_8Sye.d.ts} +1 -1
- package/dist/{documentStyles-D87dxl18.d.mts → documentStyles-qR0VR2s0.d.mts} +1 -1
- package/dist/docx/index.d.mts +3 -2
- package/dist/docx/index.d.ts +3 -2
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +3 -2
- package/dist/docx/parser.d.ts +3 -2
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +3 -2
- package/dist/docx/rezip.d.ts +3 -2
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +42 -4
- package/dist/docx/serializer/index.d.ts +42 -4
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/editor/index.d.mts +128 -0
- package/dist/editor/index.d.ts +128 -0
- package/dist/editor/index.js +1 -0
- package/dist/editor/index.mjs +1 -0
- package/dist/{fontLoader-Z7pqeNvZ.d.mts → fontLoader-CUS1BPv7.d.mts} +1 -1
- package/dist/{fontLoader-Cm02v7PO.d.ts → fontLoader-Dl9SEKex.d.ts} +1 -1
- package/dist/{footnotes-lCH_P3N3.d.mts → footnotes-BZ24OTAT.d.mts} +25 -2
- package/dist/{footnotes-skVvEHvZ.d.ts → footnotes-DMsicPGd.d.ts} +25 -2
- package/dist/{headerFooterLayout-Bd58Tum3.d.ts → headerFooterLayout-AtAOhM8E.d.ts} +22 -6
- package/dist/{headerFooterLayout-CuIJiIzi.d.mts → headerFooterLayout-CU6hvszp.d.mts} +22 -6
- package/dist/headless.d.mts +47 -11
- package/dist/headless.d.ts +47 -11
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/clickToPositionDom.d.mts +26 -1
- package/dist/layout-bridge/clickToPositionDom.d.ts +26 -1
- package/dist/layout-bridge/clickToPositionDom.js +1 -1
- package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +134 -8
- package/dist/layout-bridge/index.d.ts +134 -8
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +7 -75
- package/dist/layout-bridge/measuring/index.d.ts +7 -75
- package/dist/layout-bridge/measuring/index.js +1 -1
- package/dist/layout-bridge/measuring/index.mjs +1 -1
- package/dist/layout-bridge/tableInsertHover.js +1 -1
- package/dist/layout-bridge/tableInsertHover.mjs +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.mts +3 -2
- package/dist/layout-bridge/toFlowBlocks.d.ts +3 -2
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +16 -3
- package/dist/layout-engine/index.d.ts +16 -3
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +22 -1
- package/dist/layout-engine/types.d.ts +22 -1
- package/dist/layout-painter/index.d.mts +7 -5
- package/dist/layout-painter/index.d.ts +7 -5
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +15 -6
- package/dist/layout-painter/renderPage.d.ts +15 -6
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +3 -2
- package/dist/managers/AutoSaveManager.d.ts +3 -2
- package/dist/managers/TableSelectionManager.d.mts +3 -2
- package/dist/managers/TableSelectionManager.d.ts +3 -2
- package/dist/managers/types.d.mts +3 -2
- package/dist/managers/types.d.ts +3 -2
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +4 -3
- package/dist/mcp.d.ts +4 -3
- package/dist/mcp.js +3 -3
- package/dist/mcp.mjs +2 -2
- package/dist/measureBlocksPipeline-BMqbRFQB.d.mts +96 -0
- package/dist/measureBlocksPipeline-iYNzAH-o.d.ts +96 -0
- package/dist/{nodes-BNkRKBBX.d.ts → nodes-75Q9GBxV.d.ts} +1 -1
- package/dist/{nodes-Bz-UHhLE.d.mts → nodes-cEI7hVY2.d.mts} +1 -1
- package/dist/prosemirror/applyFormatting.d.mts +67 -0
- package/dist/prosemirror/applyFormatting.d.ts +67 -0
- package/dist/prosemirror/applyFormatting.js +1 -0
- package/dist/prosemirror/applyFormatting.mjs +1 -0
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.d.mts +20 -1
- package/dist/prosemirror/commands/index.d.ts +20 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/commentIdAllocator.d.mts +50 -0
- package/dist/prosemirror/commentIdAllocator.d.ts +50 -0
- package/dist/prosemirror/commentIdAllocator.js +1 -0
- package/dist/prosemirror/commentIdAllocator.mjs +1 -0
- package/dist/prosemirror/commentOps.d.mts +46 -0
- package/dist/prosemirror/commentOps.d.ts +46 -0
- package/dist/prosemirror/commentOps.js +1 -0
- package/dist/prosemirror/commentOps.mjs +1 -0
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +3 -2
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -2
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +3 -2
- package/dist/prosemirror/conversion/index.d.ts +3 -2
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/editor.css +12 -2
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/imageCommit.d.mts +35 -0
- package/dist/prosemirror/imageCommit.d.ts +35 -0
- package/dist/prosemirror/imageCommit.js +1 -0
- package/dist/prosemirror/imageCommit.mjs +1 -0
- package/dist/prosemirror/index.d.mts +6 -5
- package/dist/prosemirror/index.d.ts +6 -5
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.mjs +1 -1
- package/dist/prosemirror/paraText.d.mts +52 -0
- package/dist/prosemirror/paraText.d.ts +52 -0
- package/dist/prosemirror/paraText.js +1 -0
- package/dist/prosemirror/paraText.mjs +1 -0
- package/dist/prosemirror/plugins/index.d.mts +4 -3
- package/dist/prosemirror/plugins/index.d.ts +4 -3
- package/dist/prosemirror/queries.d.mts +65 -0
- package/dist/prosemirror/queries.d.ts +65 -0
- package/dist/prosemirror/queries.js +2 -0
- package/dist/prosemirror/queries.mjs +2 -0
- package/dist/prosemirror/schema/index.d.mts +3 -2
- package/dist/prosemirror/schema/index.d.ts +3 -2
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/styles/index.d.mts +1 -1
- package/dist/prosemirror/styles/index.d.ts +1 -1
- package/dist/prosemirror/tableResize.d.mts +58 -0
- package/dist/prosemirror/tableResize.d.ts +58 -0
- package/dist/prosemirror/tableResize.js +1 -0
- package/dist/prosemirror/tableResize.mjs +1 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +2 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +2 -1
- package/dist/{registry-Cpyybgij.d.mts → registry-NLnxX7pq.d.mts} +1 -1
- package/dist/{registry-E5pahPKL.d.ts → registry-egK81C_z.d.ts} +1 -1
- package/dist/sectionPropertiesSerializer-D86QlzlT.d.mts +59 -0
- package/dist/sectionPropertiesSerializer-uXyGONxu.d.ts +59 -0
- package/dist/{styles-EI2lxeEN.d.mts → styles-BOJ93SAm.d.mts} +1 -1
- package/dist/{styles-BBv7doYK.d.ts → styles-BWqX2AS-.d.ts} +1 -1
- package/dist/types/content.d.mts +2 -1
- package/dist/types/content.d.ts +2 -1
- package/dist/types/content.js +1 -1
- package/dist/types/content.mjs +1 -0
- package/dist/types/document.d.mts +17 -6
- package/dist/types/document.d.ts +17 -6
- package/dist/types/document.js +1 -1
- package/dist/types/document.mjs +1 -0
- package/dist/{types-DXG7vqe9.d.ts → types-DDQWU7-j.d.ts} +1 -1
- package/dist/{types-dYdjUZMo.d.mts → types-DTF0N7UE.d.mts} +1 -1
- package/dist/utils/autoScroll.d.mts +24 -0
- package/dist/utils/autoScroll.d.ts +24 -0
- package/dist/utils/autoScroll.js +1 -0
- package/dist/utils/autoScroll.mjs +1 -0
- package/dist/utils/comments.d.mts +2 -1
- package/dist/utils/comments.d.ts +2 -1
- package/dist/utils/index.d.mts +5 -4
- package/dist/utils/index.d.ts +5 -4
- package/dist/{variableDetector-HPZbJ_gw.d.ts → variableDetector-1mxzPfs2.d.ts} +1 -1
- package/dist/{variableDetector-C7BLz9sJ.d.mts → variableDetector-CaY-sDau.d.mts} +1 -1
- package/dist/watermark-DAcnAs_J.d.mts +77 -0
- package/dist/watermark-DAcnAs_J.d.ts +77 -0
- package/package.json +73 -1
- package/dist/chunk-2EQGBVPV.js +0 -2
- package/dist/chunk-44FHVKSI.js +0 -1
- package/dist/chunk-44JKHPGF.mjs +0 -2
- package/dist/chunk-5M7TI6TV.js +0 -1
- package/dist/chunk-6Y6LON6Y.mjs +0 -1
- package/dist/chunk-7RDCZLTU.js +0 -1
- package/dist/chunk-7ZN4WI5N.mjs +0 -4
- package/dist/chunk-CCPBNE2F.mjs +0 -2
- package/dist/chunk-DV6GWBUJ.js +0 -2
- package/dist/chunk-EQAORQC3.mjs +0 -1
- package/dist/chunk-FYKRDDKG.js +0 -1
- package/dist/chunk-GUQFNJHE.mjs +0 -1
- package/dist/chunk-ICE6NC3S.mjs +0 -1
- package/dist/chunk-IFUED5ZS.mjs +0 -1
- package/dist/chunk-KGTEBLB6.js +0 -1
- package/dist/chunk-KRN6YSR2.mjs +0 -1
- package/dist/chunk-L72YAV5N.js +0 -3
- package/dist/chunk-LTHT4A4S.js +0 -1
- package/dist/chunk-MERJFGEP.mjs +0 -59
- package/dist/chunk-MP4QSEO2.mjs +0 -1
- package/dist/chunk-PVAVS3IU.js +0 -1
- package/dist/chunk-QYF7BRG3.js +0 -2
- package/dist/chunk-RKDVY7I3.mjs +0 -1
- package/dist/chunk-ROG4MNOR.js +0 -4
- package/dist/chunk-SORYYVJ7.js +0 -1
- package/dist/chunk-SZIOF5SG.js +0 -59
- package/dist/chunk-VMRUBLPI.js +0 -1
- package/dist/chunk-WKUHYMDO.mjs +0 -1
- package/dist/chunk-WLDI6N3B.mjs +0 -3
- package/dist/chunk-WLHNIXWC.mjs +0 -2
- package/dist/chunk-YMZ3F2FZ.mjs +0 -1
- package/dist/chunk-ZBFNOJGY.js +0 -1
- package/dist/documentSerializer-Bghq9rFI.d.mts +0 -36
- package/dist/documentSerializer-C4lFC60P.d.ts +0 -36
|
@@ -19,8 +19,18 @@ interface HeaderFooterContent {
|
|
|
19
19
|
blocks: FlowBlock[];
|
|
20
20
|
/** Measurements for the blocks. */
|
|
21
21
|
measures: Measure[];
|
|
22
|
-
/** Total height of the content. */
|
|
22
|
+
/** Total height of the content (in-flow stack incl. floating blocks). */
|
|
23
23
|
height: number;
|
|
24
|
+
/**
|
|
25
|
+
* In-flow band height: the height of strictly in-flow content
|
|
26
|
+
* (paragraphs, tables, inline images/text boxes), EXCLUDING anchored /
|
|
27
|
+
* floating objects. This is what grows the header/footer band and pushes
|
|
28
|
+
* the body margin, mirroring Word: a page/margin-anchored shape (e.g. a
|
|
29
|
+
* full-page letterhead in a header) is positioned independently and does
|
|
30
|
+
* NOT push body text down. Use this — not `height`/`visualBottom` — for
|
|
31
|
+
* margin extension. Falls back to `height` when undefined.
|
|
32
|
+
*/
|
|
33
|
+
flowHeight?: number;
|
|
24
34
|
/** Top-most visual extent relative to the nominal flow origin. */
|
|
25
35
|
visualTop?: number;
|
|
26
36
|
/** Bottom-most visual extent relative to the nominal flow origin. */
|
|
@@ -39,6 +49,19 @@ interface HeaderFooterLayoutInfo {
|
|
|
39
49
|
left: number;
|
|
40
50
|
};
|
|
41
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve the CSS `left` (px) for an anchored object (image or text box) in a
|
|
54
|
+
* header/footer, honoring `wp:positionH` (relativeTo page/margin, align
|
|
55
|
+
* left/center/right, or posOffset). Shared by floating images and text boxes so
|
|
56
|
+
* a page-centered text box in the header lands centered like Word, not pinned
|
|
57
|
+
* to the left.
|
|
58
|
+
*/
|
|
59
|
+
declare function resolveHeaderFooterFloatLeft(width: number, h: {
|
|
60
|
+
relativeTo?: string;
|
|
61
|
+
posOffset?: number;
|
|
62
|
+
align?: string;
|
|
63
|
+
alignment?: string;
|
|
64
|
+
} | undefined, layout: HeaderFooterLayoutInfo): string;
|
|
42
65
|
/**
|
|
43
66
|
* Resolve the (left, top) position for a floating table inside a header/
|
|
44
67
|
* footer container, per ECMA-376 §17.4.57. The table's `floating.tblpX/tblpY`
|
|
@@ -75,4 +98,4 @@ interface FootnoteRenderItem {
|
|
|
75
98
|
content?: FootnoteContent;
|
|
76
99
|
}
|
|
77
100
|
|
|
78
|
-
export { type FootnoteRenderItem as F, type HeaderFooterContent as H, type HeaderFooterLayoutInfo as a, resolveHeaderFooterFloatingTablePosition as r };
|
|
101
|
+
export { type FootnoteRenderItem as F, type HeaderFooterContent as H, type HeaderFooterLayoutInfo as a, resolveHeaderFooterFloatingTablePosition as b, resolveHeaderFooterFloatLeft as r };
|
|
@@ -19,8 +19,18 @@ interface HeaderFooterContent {
|
|
|
19
19
|
blocks: FlowBlock[];
|
|
20
20
|
/** Measurements for the blocks. */
|
|
21
21
|
measures: Measure[];
|
|
22
|
-
/** Total height of the content. */
|
|
22
|
+
/** Total height of the content (in-flow stack incl. floating blocks). */
|
|
23
23
|
height: number;
|
|
24
|
+
/**
|
|
25
|
+
* In-flow band height: the height of strictly in-flow content
|
|
26
|
+
* (paragraphs, tables, inline images/text boxes), EXCLUDING anchored /
|
|
27
|
+
* floating objects. This is what grows the header/footer band and pushes
|
|
28
|
+
* the body margin, mirroring Word: a page/margin-anchored shape (e.g. a
|
|
29
|
+
* full-page letterhead in a header) is positioned independently and does
|
|
30
|
+
* NOT push body text down. Use this — not `height`/`visualBottom` — for
|
|
31
|
+
* margin extension. Falls back to `height` when undefined.
|
|
32
|
+
*/
|
|
33
|
+
flowHeight?: number;
|
|
24
34
|
/** Top-most visual extent relative to the nominal flow origin. */
|
|
25
35
|
visualTop?: number;
|
|
26
36
|
/** Bottom-most visual extent relative to the nominal flow origin. */
|
|
@@ -39,6 +49,19 @@ interface HeaderFooterLayoutInfo {
|
|
|
39
49
|
left: number;
|
|
40
50
|
};
|
|
41
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve the CSS `left` (px) for an anchored object (image or text box) in a
|
|
54
|
+
* header/footer, honoring `wp:positionH` (relativeTo page/margin, align
|
|
55
|
+
* left/center/right, or posOffset). Shared by floating images and text boxes so
|
|
56
|
+
* a page-centered text box in the header lands centered like Word, not pinned
|
|
57
|
+
* to the left.
|
|
58
|
+
*/
|
|
59
|
+
declare function resolveHeaderFooterFloatLeft(width: number, h: {
|
|
60
|
+
relativeTo?: string;
|
|
61
|
+
posOffset?: number;
|
|
62
|
+
align?: string;
|
|
63
|
+
alignment?: string;
|
|
64
|
+
} | undefined, layout: HeaderFooterLayoutInfo): string;
|
|
42
65
|
/**
|
|
43
66
|
* Resolve the (left, top) position for a floating table inside a header/
|
|
44
67
|
* footer container, per ECMA-376 §17.4.57. The table's `floating.tblpX/tblpY`
|
|
@@ -75,4 +98,4 @@ interface FootnoteRenderItem {
|
|
|
75
98
|
content?: FootnoteContent;
|
|
76
99
|
}
|
|
77
100
|
|
|
78
|
-
export { type FootnoteRenderItem as F, type HeaderFooterContent as H, type HeaderFooterLayoutInfo as a, resolveHeaderFooterFloatingTablePosition as r };
|
|
101
|
+
export { type FootnoteRenderItem as F, type HeaderFooterContent as H, type HeaderFooterLayoutInfo as a, resolveHeaderFooterFloatingTablePosition as b, resolveHeaderFooterFloatLeft as r };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Node } from 'prosemirror-model';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { FlowBlock, Measure, LayoutOptions, FootnoteContent, Layout, Page, PageMargins, ImageRun } from './layout-engine/types.js';
|
|
4
|
-
import { F as Footnote, y as HeaderFooter } from './content-
|
|
5
|
-
import {
|
|
6
|
-
import { F as FootnoteRenderItem, H as HeaderFooterContent } from './footnotes-
|
|
4
|
+
import { F as Footnote, y as HeaderFooter } from './content-C8fc_tL6.js';
|
|
5
|
+
import { S as StyleDefinitions, T as Theme } from './styles-BWqX2AS-.js';
|
|
6
|
+
import { F as FootnoteRenderItem, H as HeaderFooterContent } from './footnotes-DMsicPGd.js';
|
|
7
7
|
import { Document } from './types/document.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -193,6 +193,22 @@ type HeaderFooterMetrics = {
|
|
|
193
193
|
};
|
|
194
194
|
declare function normalizeHeaderFooterMeasureBlocks(blocks: FlowBlock[]): FlowBlock[];
|
|
195
195
|
declare function resolveHeaderFooterVisualTop(run: ImageRun, paragraphY: number, flowHeight: number, metrics: HeaderFooterMetrics): number;
|
|
196
|
+
/**
|
|
197
|
+
* Whether a header/footer block participates in the in-flow band height that
|
|
198
|
+
* pushes the body margin.
|
|
199
|
+
*
|
|
200
|
+
* OOXML semantics: Word grows the header/footer band — and shifts body text —
|
|
201
|
+
* based only on the story's in-flow content. A floating/anchored object
|
|
202
|
+
* (`wp:anchor` DrawingML or an absolutely-positioned VML shape, e.g. a
|
|
203
|
+
* full-page letterhead anchored to the page in a header) is removed from the
|
|
204
|
+
* text flow and positioned on the page; it does NOT grow the band or push the
|
|
205
|
+
* body. So only inline-flow blocks count here. Anchored image *runs* inside a
|
|
206
|
+
* paragraph are likewise out of flow, but they don't contribute to the
|
|
207
|
+
* paragraph's measured line height, so paragraphs need no special handling.
|
|
208
|
+
*
|
|
209
|
+
* @public
|
|
210
|
+
*/
|
|
211
|
+
declare function contributesToHeaderFooterFlowHeight(block: FlowBlock): boolean;
|
|
196
212
|
declare function calculateHeaderFooterVisualBounds(blocks: FlowBlock[], measures: Measure[], flowHeight: number, metrics: HeaderFooterMetrics): {
|
|
197
213
|
visualTop: number;
|
|
198
214
|
visualBottom: number;
|
|
@@ -265,7 +281,7 @@ declare function invalidateHfDomCache(): void;
|
|
|
265
281
|
*
|
|
266
282
|
* @public
|
|
267
283
|
*/
|
|
268
|
-
declare function computeHfCaretRectFromView(view: EditorView, doc?: globalThis.Document): {
|
|
284
|
+
declare function computeHfCaretRectFromView(view: EditorView, section: 'header' | 'footer', doc?: globalThis.Document): {
|
|
269
285
|
top: number;
|
|
270
286
|
left: number;
|
|
271
287
|
height: number;
|
|
@@ -282,11 +298,11 @@ declare function computeHfCaretRectFromView(view: EditorView, doc?: globalThis.D
|
|
|
282
298
|
*
|
|
283
299
|
* @public
|
|
284
300
|
*/
|
|
285
|
-
declare function computeHfSelectionRectsFromView(view: EditorView, doc?: globalThis.Document): Array<{
|
|
301
|
+
declare function computeHfSelectionRectsFromView(view: EditorView, section: 'header' | 'footer', doc?: globalThis.Document): Array<{
|
|
286
302
|
top: number;
|
|
287
303
|
left: number;
|
|
288
304
|
width: number;
|
|
289
305
|
height: number;
|
|
290
306
|
}>;
|
|
291
307
|
|
|
292
|
-
export { type ConvertFootnoteOptions as C, FOOTNOTE_SEPARATOR_HEIGHT as F, type HeaderFooterMetrics as H, MAX_FOOTNOTE_LAYOUT_PASSES as M, type StabilizeFootnoteLayoutArgs as S, type ConvertHeaderFooterOptions as a, type MeasureBlocksFn as b, type StabilizeFootnoteLayoutResult as c, buildFootnoteContentMap as d, buildFootnoteRenderItems as e, calculateFootnoteReservedHeights as f, collectFootnoteRefs as g, convertHeaderFooterToContent as h, footnoteReservedHeightsEqual as i, applyFootnotePresentation as j, calculateHeaderFooterVisualBounds as k, computeHfCaretRectFromView as l, mapFootnotesToPages as m, computeHfSelectionRectsFromView as n,
|
|
308
|
+
export { type ConvertFootnoteOptions as C, FOOTNOTE_SEPARATOR_HEIGHT as F, type HeaderFooterMetrics as H, MAX_FOOTNOTE_LAYOUT_PASSES as M, type StabilizeFootnoteLayoutArgs as S, type ConvertHeaderFooterOptions as a, type MeasureBlocksFn as b, type StabilizeFootnoteLayoutResult as c, buildFootnoteContentMap as d, buildFootnoteRenderItems as e, calculateFootnoteReservedHeights as f, collectFootnoteRefs as g, convertHeaderFooterToContent as h, footnoteReservedHeightsEqual as i, applyFootnotePresentation as j, calculateHeaderFooterVisualBounds as k, computeHfCaretRectFromView as l, mapFootnotesToPages as m, computeHfSelectionRectsFromView as n, contributesToHeaderFooterFlowHeight as o, convertFootnoteToContent as p, convertHeaderFooterPmDocToContent as q, invalidateHfDomCache as r, stabilizeFootnoteLayout as s, normalizeHeaderFooterMeasureBlocks as t, resolveHeaderFooterVisualTop as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Node } from 'prosemirror-model';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { FlowBlock, Measure, LayoutOptions, FootnoteContent, Layout, Page, PageMargins, ImageRun } from './layout-engine/types.mjs';
|
|
4
|
-
import { F as Footnote, y as HeaderFooter } from './content-
|
|
5
|
-
import {
|
|
6
|
-
import { F as FootnoteRenderItem, H as HeaderFooterContent } from './footnotes-
|
|
4
|
+
import { F as Footnote, y as HeaderFooter } from './content-3xF4WDE8.mjs';
|
|
5
|
+
import { S as StyleDefinitions, T as Theme } from './styles-BOJ93SAm.mjs';
|
|
6
|
+
import { F as FootnoteRenderItem, H as HeaderFooterContent } from './footnotes-BZ24OTAT.mjs';
|
|
7
7
|
import { Document } from './types/document.mjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -193,6 +193,22 @@ type HeaderFooterMetrics = {
|
|
|
193
193
|
};
|
|
194
194
|
declare function normalizeHeaderFooterMeasureBlocks(blocks: FlowBlock[]): FlowBlock[];
|
|
195
195
|
declare function resolveHeaderFooterVisualTop(run: ImageRun, paragraphY: number, flowHeight: number, metrics: HeaderFooterMetrics): number;
|
|
196
|
+
/**
|
|
197
|
+
* Whether a header/footer block participates in the in-flow band height that
|
|
198
|
+
* pushes the body margin.
|
|
199
|
+
*
|
|
200
|
+
* OOXML semantics: Word grows the header/footer band — and shifts body text —
|
|
201
|
+
* based only on the story's in-flow content. A floating/anchored object
|
|
202
|
+
* (`wp:anchor` DrawingML or an absolutely-positioned VML shape, e.g. a
|
|
203
|
+
* full-page letterhead anchored to the page in a header) is removed from the
|
|
204
|
+
* text flow and positioned on the page; it does NOT grow the band or push the
|
|
205
|
+
* body. So only inline-flow blocks count here. Anchored image *runs* inside a
|
|
206
|
+
* paragraph are likewise out of flow, but they don't contribute to the
|
|
207
|
+
* paragraph's measured line height, so paragraphs need no special handling.
|
|
208
|
+
*
|
|
209
|
+
* @public
|
|
210
|
+
*/
|
|
211
|
+
declare function contributesToHeaderFooterFlowHeight(block: FlowBlock): boolean;
|
|
196
212
|
declare function calculateHeaderFooterVisualBounds(blocks: FlowBlock[], measures: Measure[], flowHeight: number, metrics: HeaderFooterMetrics): {
|
|
197
213
|
visualTop: number;
|
|
198
214
|
visualBottom: number;
|
|
@@ -265,7 +281,7 @@ declare function invalidateHfDomCache(): void;
|
|
|
265
281
|
*
|
|
266
282
|
* @public
|
|
267
283
|
*/
|
|
268
|
-
declare function computeHfCaretRectFromView(view: EditorView, doc?: globalThis.Document): {
|
|
284
|
+
declare function computeHfCaretRectFromView(view: EditorView, section: 'header' | 'footer', doc?: globalThis.Document): {
|
|
269
285
|
top: number;
|
|
270
286
|
left: number;
|
|
271
287
|
height: number;
|
|
@@ -282,11 +298,11 @@ declare function computeHfCaretRectFromView(view: EditorView, doc?: globalThis.D
|
|
|
282
298
|
*
|
|
283
299
|
* @public
|
|
284
300
|
*/
|
|
285
|
-
declare function computeHfSelectionRectsFromView(view: EditorView, doc?: globalThis.Document): Array<{
|
|
301
|
+
declare function computeHfSelectionRectsFromView(view: EditorView, section: 'header' | 'footer', doc?: globalThis.Document): Array<{
|
|
286
302
|
top: number;
|
|
287
303
|
left: number;
|
|
288
304
|
width: number;
|
|
289
305
|
height: number;
|
|
290
306
|
}>;
|
|
291
307
|
|
|
292
|
-
export { type ConvertFootnoteOptions as C, FOOTNOTE_SEPARATOR_HEIGHT as F, type HeaderFooterMetrics as H, MAX_FOOTNOTE_LAYOUT_PASSES as M, type StabilizeFootnoteLayoutArgs as S, type ConvertHeaderFooterOptions as a, type MeasureBlocksFn as b, type StabilizeFootnoteLayoutResult as c, buildFootnoteContentMap as d, buildFootnoteRenderItems as e, calculateFootnoteReservedHeights as f, collectFootnoteRefs as g, convertHeaderFooterToContent as h, footnoteReservedHeightsEqual as i, applyFootnotePresentation as j, calculateHeaderFooterVisualBounds as k, computeHfCaretRectFromView as l, mapFootnotesToPages as m, computeHfSelectionRectsFromView as n,
|
|
308
|
+
export { type ConvertFootnoteOptions as C, FOOTNOTE_SEPARATOR_HEIGHT as F, type HeaderFooterMetrics as H, MAX_FOOTNOTE_LAYOUT_PASSES as M, type StabilizeFootnoteLayoutArgs as S, type ConvertHeaderFooterOptions as a, type MeasureBlocksFn as b, type StabilizeFootnoteLayoutResult as c, buildFootnoteContentMap as d, buildFootnoteRenderItems as e, calculateFootnoteReservedHeights as f, collectFootnoteRefs as g, convertHeaderFooterToContent as h, footnoteReservedHeightsEqual as i, applyFootnotePresentation as j, calculateHeaderFooterVisualBounds as k, computeHfCaretRectFromView as l, mapFootnotesToPages as m, computeHfSelectionRectsFromView as n, contributesToHeaderFooterFlowHeight as o, convertFootnoteToContent as p, convertHeaderFooterPmDocToContent as q, invalidateHfDomCache as r, stabilizeFootnoteLayout as s, normalizeHeaderFooterMeasureBlocks as t, resolveHeaderFooterVisualTop as u };
|
package/dist/headless.d.mts
CHANGED
|
@@ -42,27 +42,63 @@
|
|
|
42
42
|
*/
|
|
43
43
|
export { A as AgentContextOptions, S as ContextSelectionOptions, D as DocumentAgent, E as ExtendedSelectionContext, F as FormattedTextSegment, a as FormattingSummary, I as InsertHyperlinkOptions, b as InsertImageOptions, c as InsertTableOptions, d as InsertTextOptions, e as SelectionContextOptions, f as buildExtendedSelectionContext, g as buildSelectionContext, h as buildSelectionContextFromContext, i as createAgent, j as createAgentFromDocument, k as executeCommand, l as executeCommands, m as getAgentContext, n as getDocumentSummary, o as getSelectionFormattingSummary } from './selectionContext-CoZat7QZ.mjs';
|
|
44
44
|
export { RepeatingSectionError, addRepeatingSectionItem, countCharacters, countWords, getBlockIndexForParagraph, getBodyCharacterCount, getBodyText, getBodyWordCount, getFormattingAtPosition, getHyperlinkAtPosition, getHyperlinkText, getParagraphAtIndex, getParagraphText, getParagraphs, getRunText, getTableText, getTextAfter, getTextBefore, hasHyperlinks, hasImages, hasTables, isHeadingStyle, isPositionInHyperlink, isRepeatingSection, isRepeatingSectionItem, parseHeadingLevel, removeRepeatingSectionItem } from './agent/index.mjs';
|
|
45
|
-
export { C as ContentControlBoundError, a as ContentControlFilter, b as ContentControlInfo, c as ContentControlLockedError, d as ContentControlNotFoundError, e as ContentControlTypeError, f as ContentControlValue, g as ContentControlValueError, h as findContentControl, i as findContentControls, j as formatSdtDate, k as getContentControlText, r as removeContentControl, s as setContentControlContent, l as setContentControlValue } from './contentControlValues-
|
|
45
|
+
export { C as ContentControlBoundError, a as ContentControlFilter, b as ContentControlInfo, c as ContentControlLockedError, d as ContentControlNotFoundError, e as ContentControlTypeError, f as ContentControlValue, g as ContentControlValueError, h as findContentControl, i as findContentControls, j as formatSdtDate, k as getContentControlText, r as removeContentControl, s as setContentControlContent, l as setContentControlValue } from './contentControlValues-DjWvoJQ-.mjs';
|
|
46
46
|
export { parseDocx } from './docx/parser.mjs';
|
|
47
|
-
export { s as serializeDocumentBody, a as serializeDocx, b as serializeSectionProperties } from './
|
|
47
|
+
export { s as serializeDocumentBody, a as serializeDocx, b as serializeSectionProperties } from './sectionPropertiesSerializer-D86QlzlT.mjs';
|
|
48
48
|
export { createDocx, default as repackDocx, updateMultipleFiles } from './docx/rezip.mjs';
|
|
49
|
+
import { Document } from './types/document.mjs';
|
|
50
|
+
export { DocxPackage } from './types/document.mjs';
|
|
51
|
+
import { W as Watermark } from './watermark-DAcnAs_J.mjs';
|
|
49
52
|
export { a as attemptSelectiveSave } from './selectiveSave-jinP_4xa.mjs';
|
|
50
53
|
export { b as buildPatchedDocumentXml, v as validatePatchSafety } from './selectiveXmlPatch-ypkxlTD_.mjs';
|
|
51
|
-
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, w as resolveHighlightColor, x as resolveShadingColor, y as validateTemplate } from './colorResolver-
|
|
52
|
-
export { V as VariableDetectionResult, a as VariableOccurrence, d as detectVariables, b as detectVariablesDetailed, c as detectVariablesInBody, e as detectVariablesInParagraph, f as documentHasVariables, g as extractVariablesFromText, h as formatVariable, i as hasTemplateVariables, j as isValidVariableName, p as parseVariable, r as removeVariables, k as replaceVariables, s as sanitizeVariableName } from './variableDetector-
|
|
54
|
+
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, w as resolveHighlightColor, x as resolveShadingColor, y as validateTemplate } from './colorResolver-BCvxTlLF.mjs';
|
|
55
|
+
export { V as VariableDetectionResult, a as VariableOccurrence, d as detectVariables, b as detectVariablesDetailed, c as detectVariablesInBody, e as detectVariablesInParagraph, f as documentHasVariables, g as extractVariablesFromText, h as formatVariable, i as hasTemplateVariables, j as isValidVariableName, p as parseVariable, r as removeVariables, k as replaceVariables, s as sanitizeVariableName } from './variableDetector-CaY-sDau.mjs';
|
|
53
56
|
export { emuToPixels, emuToTwips, formatPx, halfPointsToPixels, pixelsToEmu, pixelsToTwips, pointsToHalfPoints, pointsToPixels, twipsToEmu, twipsToPixels } from './utils/units.mjs';
|
|
54
57
|
export { mapHexToHighlightName } from './utils/highlightColors.mjs';
|
|
55
|
-
export {
|
|
56
|
-
export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-
|
|
57
|
-
export { Document, DocxPackage } from './types/document.mjs';
|
|
58
|
+
export { b as CommandHandler, d as CommandResult, C as CorePlugin, J as JsonSchema, L as LoadedDocument, e as McpSession, f as McpToolAnnotations, g as McpToolContent, h as McpToolContext, M as McpToolDefinition, i as McpToolHandler, j as McpToolResult, C as Plugin, k as PluginCommand, b as PluginCommandHandler, l as PluginEvent, c as PluginEventListener, P as PluginOptions, a as PluginRegistrationResult, M as ToolDefinition, i as ToolHandler, j as ToolResult, Z as ZodSchemaLike, m as isZodSchema } from './types-DTF0N7UE.mjs';
|
|
59
|
+
export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-NLnxX7pq.mjs';
|
|
58
60
|
export { AIAction, AIActionRequest, AgentCommand, AgentContext, AgentResponse, ApplyStyleCommand, ApplyVariablesCommand, DEFAULT_AI_ACTIONS, DeleteTextCommand, FormatParagraphCommand, FormatTextCommand, InsertHyperlinkCommand, InsertImageCommand, InsertTableCommand, InsertTextCommand, ParagraphContext, ParagraphOutline, Position, Range, ReplaceTextCommand, SectionInfo, SelectionContext, SetVariableCommand, StyleInfo, SuggestedAction, comparePositions, createCollapsedRange, createCommand, createRange, getActionDescription, getActionLabel, isPositionInRange } from './types/agentApi.mjs';
|
|
59
|
-
export { B as BlockContent,
|
|
61
|
+
export { B as BlockContent, e as Comment, f as CommentRangeEnd, g as CommentRangeStart, h as Deletion, D as DocumentBody, E as Endnote, F as Footnote, H as Hyperlink, I as Image, i as Insertion, L as ListLevel, M as MoveFrom, j as MoveTo, k as NumberingDefinitions, P as Paragraph, l as ParagraphContent, m as Run, n as RunContent, S as SectionProperties, T as Table, o as TableCell, p as TableRow, q as TextContent, r as TrackedChangeInfo, s as TrackedRunChange } from './content-3xF4WDE8.mjs';
|
|
60
62
|
export { P as ParagraphFormatting, T as TextFormatting } from './formatting-BH4hcZiq.mjs';
|
|
61
|
-
export { R as Relationship,
|
|
63
|
+
export { R as Relationship, a as Style, S as StyleDefinitions, T as Theme } from './styles-BOJ93SAm.mjs';
|
|
62
64
|
import './docxInput-DTbCa48g.mjs';
|
|
63
|
-
import 'jszip';
|
|
64
65
|
import './colors-C3vA7HUU.mjs';
|
|
65
66
|
import './docx/wrapTypes.mjs';
|
|
67
|
+
import 'jszip';
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Watermark document API
|
|
71
|
+
*
|
|
72
|
+
* Platform-agnostic helpers for reading and applying a document watermark.
|
|
73
|
+
* Shared by the React and Vue adapters (and the imperative ref API) so the
|
|
74
|
+
* "Design → Watermark" behavior stays identical across frameworks.
|
|
75
|
+
*
|
|
76
|
+
* A watermark lives on `HeaderFooter.watermark`. MS Word repeats the same
|
|
77
|
+
* watermark across the default, first-page, and even-page headers of every
|
|
78
|
+
* section, so `setDocumentWatermark`:
|
|
79
|
+
*
|
|
80
|
+
* 1. Applies the watermark (a per-header copy) to every existing header, and
|
|
81
|
+
* 2. Creates the header parts a section needs but lacks, so the watermark
|
|
82
|
+
* still shows on title pages (`w:titlePg`) and even pages
|
|
83
|
+
* (`w:evenAndOddHeaders`) and on documents that had no header at all.
|
|
84
|
+
*
|
|
85
|
+
* To avoid breaking header inheritance (a section that omits a header
|
|
86
|
+
* reference inherits the previous section's header — Word's "link to
|
|
87
|
+
* previous"), a missing `first`/`even` header part is only created when **no**
|
|
88
|
+
* header of that type exists anywhere in the document, i.e. there is nothing to
|
|
89
|
+
* inherit. All updates are immutable — a new `Document` is returned so the
|
|
90
|
+
* change lands in the host's undo/redo history.
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
/** Read the document's watermark (the first header that carries one). */
|
|
94
|
+
declare function getDocumentWatermark(doc: Document | null | undefined): Watermark | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Return a new `Document` with the watermark applied to all headers, or removed
|
|
97
|
+
* when `watermark` is null. Creates the header parts a section needs but lacks
|
|
98
|
+
* (default for a headerless doc; first/even for title/even pages) so the
|
|
99
|
+
* watermark shows on every page MS Word would show it.
|
|
100
|
+
*/
|
|
101
|
+
declare function setDocumentWatermark(doc: Document, watermark: Watermark | null): Document;
|
|
66
102
|
|
|
67
103
|
/**
|
|
68
104
|
* @eigenpal/docx-editor-core/headless
|
|
@@ -108,4 +144,4 @@ import './docx/wrapTypes.mjs';
|
|
|
108
144
|
*/
|
|
109
145
|
declare const VERSION = "0.0.2";
|
|
110
146
|
|
|
111
|
-
export { VERSION };
|
|
147
|
+
export { Document, VERSION, getDocumentWatermark, setDocumentWatermark };
|
package/dist/headless.d.ts
CHANGED
|
@@ -42,27 +42,63 @@
|
|
|
42
42
|
*/
|
|
43
43
|
export { A as AgentContextOptions, S as ContextSelectionOptions, D as DocumentAgent, E as ExtendedSelectionContext, F as FormattedTextSegment, a as FormattingSummary, I as InsertHyperlinkOptions, b as InsertImageOptions, c as InsertTableOptions, d as InsertTextOptions, e as SelectionContextOptions, f as buildExtendedSelectionContext, g as buildSelectionContext, h as buildSelectionContextFromContext, i as createAgent, j as createAgentFromDocument, k as executeCommand, l as executeCommands, m as getAgentContext, n as getDocumentSummary, o as getSelectionFormattingSummary } from './selectionContext-BPAqgNgk.js';
|
|
44
44
|
export { RepeatingSectionError, addRepeatingSectionItem, countCharacters, countWords, getBlockIndexForParagraph, getBodyCharacterCount, getBodyText, getBodyWordCount, getFormattingAtPosition, getHyperlinkAtPosition, getHyperlinkText, getParagraphAtIndex, getParagraphText, getParagraphs, getRunText, getTableText, getTextAfter, getTextBefore, hasHyperlinks, hasImages, hasTables, isHeadingStyle, isPositionInHyperlink, isRepeatingSection, isRepeatingSectionItem, parseHeadingLevel, removeRepeatingSectionItem } from './agent/index.js';
|
|
45
|
-
export { C as ContentControlBoundError, a as ContentControlFilter, b as ContentControlInfo, c as ContentControlLockedError, d as ContentControlNotFoundError, e as ContentControlTypeError, f as ContentControlValue, g as ContentControlValueError, h as findContentControl, i as findContentControls, j as formatSdtDate, k as getContentControlText, r as removeContentControl, s as setContentControlContent, l as setContentControlValue } from './contentControlValues-
|
|
45
|
+
export { C as ContentControlBoundError, a as ContentControlFilter, b as ContentControlInfo, c as ContentControlLockedError, d as ContentControlNotFoundError, e as ContentControlTypeError, f as ContentControlValue, g as ContentControlValueError, h as findContentControl, i as findContentControls, j as formatSdtDate, k as getContentControlText, r as removeContentControl, s as setContentControlContent, l as setContentControlValue } from './contentControlValues-DGDKD589.js';
|
|
46
46
|
export { parseDocx } from './docx/parser.js';
|
|
47
|
-
export { s as serializeDocumentBody, a as serializeDocx, b as serializeSectionProperties } from './
|
|
47
|
+
export { s as serializeDocumentBody, a as serializeDocx, b as serializeSectionProperties } from './sectionPropertiesSerializer-uXyGONxu.js';
|
|
48
48
|
export { createDocx, default as repackDocx, updateMultipleFiles } from './docx/rezip.js';
|
|
49
|
+
import { Document } from './types/document.js';
|
|
50
|
+
export { DocxPackage } from './types/document.js';
|
|
51
|
+
import { W as Watermark } from './watermark-DAcnAs_J.js';
|
|
49
52
|
export { a as attemptSelectiveSave } from './selectiveSave-CWaPEv0B.js';
|
|
50
53
|
export { b as buildPatchedDocumentXml, v as validatePatchSafety } from './selectiveXmlPatch-ypkxlTD_.js';
|
|
51
|
-
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, w as resolveHighlightColor, x as resolveShadingColor, y as validateTemplate } from './colorResolver-
|
|
52
|
-
export { V as VariableDetectionResult, a as VariableOccurrence, d as detectVariables, b as detectVariablesDetailed, c as detectVariablesInBody, e as detectVariablesInParagraph, f as documentHasVariables, g as extractVariablesFromText, h as formatVariable, i as hasTemplateVariables, j as isValidVariableName, p as parseVariable, r as removeVariables, k as replaceVariables, s as sanitizeVariableName } from './variableDetector-
|
|
54
|
+
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, w as resolveHighlightColor, x as resolveShadingColor, y as validateTemplate } from './colorResolver-8A-qj-LP.js';
|
|
55
|
+
export { V as VariableDetectionResult, a as VariableOccurrence, d as detectVariables, b as detectVariablesDetailed, c as detectVariablesInBody, e as detectVariablesInParagraph, f as documentHasVariables, g as extractVariablesFromText, h as formatVariable, i as hasTemplateVariables, j as isValidVariableName, p as parseVariable, r as removeVariables, k as replaceVariables, s as sanitizeVariableName } from './variableDetector-1mxzPfs2.js';
|
|
53
56
|
export { emuToPixels, emuToTwips, formatPx, halfPointsToPixels, pixelsToEmu, pixelsToTwips, pointsToHalfPoints, pointsToPixels, twipsToEmu, twipsToPixels } from './utils/units.js';
|
|
54
57
|
export { mapHexToHighlightName } from './utils/highlightColors.js';
|
|
55
|
-
export {
|
|
56
|
-
export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-
|
|
57
|
-
export { Document, DocxPackage } from './types/document.js';
|
|
58
|
+
export { b as CommandHandler, d as CommandResult, C as CorePlugin, J as JsonSchema, L as LoadedDocument, e as McpSession, f as McpToolAnnotations, g as McpToolContent, h as McpToolContext, M as McpToolDefinition, i as McpToolHandler, j as McpToolResult, C as Plugin, k as PluginCommand, b as PluginCommandHandler, l as PluginEvent, c as PluginEventListener, P as PluginOptions, a as PluginRegistrationResult, M as ToolDefinition, i as ToolHandler, j as ToolResult, Z as ZodSchemaLike, m as isZodSchema } from './types-DDQWU7-j.js';
|
|
59
|
+
export { P as PluginRegistry, c as createPluginRegistrar, p as pluginRegistry, r as registerPlugins } from './registry-egK81C_z.js';
|
|
58
60
|
export { AIAction, AIActionRequest, AgentCommand, AgentContext, AgentResponse, ApplyStyleCommand, ApplyVariablesCommand, DEFAULT_AI_ACTIONS, DeleteTextCommand, FormatParagraphCommand, FormatTextCommand, InsertHyperlinkCommand, InsertImageCommand, InsertTableCommand, InsertTextCommand, ParagraphContext, ParagraphOutline, Position, Range, ReplaceTextCommand, SectionInfo, SelectionContext, SetVariableCommand, StyleInfo, SuggestedAction, comparePositions, createCollapsedRange, createCommand, createRange, getActionDescription, getActionLabel, isPositionInRange } from './types/agentApi.js';
|
|
59
|
-
export { B as BlockContent,
|
|
61
|
+
export { B as BlockContent, e as Comment, f as CommentRangeEnd, g as CommentRangeStart, h as Deletion, D as DocumentBody, E as Endnote, F as Footnote, H as Hyperlink, I as Image, i as Insertion, L as ListLevel, M as MoveFrom, j as MoveTo, k as NumberingDefinitions, P as Paragraph, l as ParagraphContent, m as Run, n as RunContent, S as SectionProperties, T as Table, o as TableCell, p as TableRow, q as TextContent, r as TrackedChangeInfo, s as TrackedRunChange } from './content-C8fc_tL6.js';
|
|
60
62
|
export { P as ParagraphFormatting, T as TextFormatting } from './formatting-_OXU8gLB.js';
|
|
61
|
-
export { R as Relationship,
|
|
63
|
+
export { R as Relationship, a as Style, S as StyleDefinitions, T as Theme } from './styles-BWqX2AS-.js';
|
|
62
64
|
import './docxInput-DTbCa48g.js';
|
|
63
|
-
import 'jszip';
|
|
64
65
|
import './colors-C3vA7HUU.js';
|
|
65
66
|
import './docx/wrapTypes.js';
|
|
67
|
+
import 'jszip';
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Watermark document API
|
|
71
|
+
*
|
|
72
|
+
* Platform-agnostic helpers for reading and applying a document watermark.
|
|
73
|
+
* Shared by the React and Vue adapters (and the imperative ref API) so the
|
|
74
|
+
* "Design → Watermark" behavior stays identical across frameworks.
|
|
75
|
+
*
|
|
76
|
+
* A watermark lives on `HeaderFooter.watermark`. MS Word repeats the same
|
|
77
|
+
* watermark across the default, first-page, and even-page headers of every
|
|
78
|
+
* section, so `setDocumentWatermark`:
|
|
79
|
+
*
|
|
80
|
+
* 1. Applies the watermark (a per-header copy) to every existing header, and
|
|
81
|
+
* 2. Creates the header parts a section needs but lacks, so the watermark
|
|
82
|
+
* still shows on title pages (`w:titlePg`) and even pages
|
|
83
|
+
* (`w:evenAndOddHeaders`) and on documents that had no header at all.
|
|
84
|
+
*
|
|
85
|
+
* To avoid breaking header inheritance (a section that omits a header
|
|
86
|
+
* reference inherits the previous section's header — Word's "link to
|
|
87
|
+
* previous"), a missing `first`/`even` header part is only created when **no**
|
|
88
|
+
* header of that type exists anywhere in the document, i.e. there is nothing to
|
|
89
|
+
* inherit. All updates are immutable — a new `Document` is returned so the
|
|
90
|
+
* change lands in the host's undo/redo history.
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
/** Read the document's watermark (the first header that carries one). */
|
|
94
|
+
declare function getDocumentWatermark(doc: Document | null | undefined): Watermark | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Return a new `Document` with the watermark applied to all headers, or removed
|
|
97
|
+
* when `watermark` is null. Creates the header parts a section needs but lacks
|
|
98
|
+
* (default for a headerless doc; first/even for title/even pages) so the
|
|
99
|
+
* watermark shows on every page MS Word would show it.
|
|
100
|
+
*/
|
|
101
|
+
declare function setDocumentWatermark(doc: Document, watermark: Watermark | null): Document;
|
|
66
102
|
|
|
67
103
|
/**
|
|
68
104
|
* @eigenpal/docx-editor-core/headless
|
|
@@ -108,4 +144,4 @@ import './docx/wrapTypes.js';
|
|
|
108
144
|
*/
|
|
109
145
|
declare const VERSION = "0.0.2";
|
|
110
146
|
|
|
111
|
-
export { VERSION };
|
|
147
|
+
export { Document, VERSION, getDocumentWatermark, setDocumentWatermark };
|
package/dist/headless.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkQEACB5VG_js=require('./chunk-QEACB5VG.js'),chunkXXU7YQVV_js=require('./chunk-XXU7YQVV.js'),chunkU4WUDHDK_js=require('./chunk-U4WUDHDK.js'),chunk5M7TI6TV_js=require('./chunk-5M7TI6TV.js'),chunkNXLJVVVE_js=require('./chunk-NXLJVVVE.js'),chunk4QEETB7U_js=require('./chunk-4QEETB7U.js'),chunkU4UCHBZ7_js=require('./chunk-U4UCHBZ7.js'),chunkESI4BSBF_js=require('./chunk-ESI4BSBF.js'),chunkTE2AF7FM_js=require('./chunk-TE2AF7FM.js'),chunkSZIOF5SG_js=require('./chunk-SZIOF5SG.js'),chunkL72YAV5N_js=require('./chunk-L72YAV5N.js'),chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js'),chunkQYF7BRG3_js=require('./chunk-QYF7BRG3.js');require('./chunk-ROG4MNOR.js'),require('./chunk-44FHVKSI.js'),require('./chunk-MNOHUTKE.js');var chunkFO6IX2DB_js=require('./chunk-FO6IX2DB.js');require('./chunk-E4JMCA5X.js'),require('./chunk-HQPWFUP5.js'),require('./chunk-DV6GWBUJ.js');var chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js');require('./chunk-C2BAPYGJ.js');var chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');require('./chunk-GSKMHXHG.js'),require('./chunk-DC7S76ZX.js');var Ct="0.0.2";Object.defineProperty(exports,"mapHexToHighlightName",{enumerable:true,get:function(){return chunkQEACB5VG_js.b}});Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunkXXU7YQVV_js.g}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunkXXU7YQVV_js.d}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.a}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunkXXU7YQVV_js.h}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.b}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunkXXU7YQVV_js.f}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunkXXU7YQVV_js.e}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.c}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunkU4WUDHDK_js.a}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunkU4WUDHDK_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunkU4WUDHDK_js.g}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunkU4WUDHDK_js.e}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunkU4WUDHDK_js.b}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunkU4WUDHDK_js.c}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunkU4WUDHDK_js.d}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunkU4WUDHDK_js.f}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunkU4WUDHDK_js.i}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunk5M7TI6TV_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunk5M7TI6TV_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunk5M7TI6TV_js.a}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkNXLJVVVE_js.b}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkNXLJVVVE_js.a}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunk4QEETB7U_js.a}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.a}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.b}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.c}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.d}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.m}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.e}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.i}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.f}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.g}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.j}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.l}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.k}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.h}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunkESI4BSBF_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunkESI4BSBF_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkESI4BSBF_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunkESI4BSBF_js.i}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkESI4BSBF_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkESI4BSBF_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.f}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkTE2AF7FM_js.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkTE2AF7FM_js.b}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkSZIOF5SG_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkSZIOF5SG_js.h}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkSZIOF5SG_js.l}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkL72YAV5N_js.f}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkL72YAV5N_js.g}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkL72YAV5N_js.e}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunk4BFNWPKW_js.d}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunk4BFNWPKW_js.c}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkQYF7BRG3_js.f}});Object.defineProperty(exports,"ContentControlBoundError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.C}});Object.defineProperty(exports,"ContentControlLockedError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.A}});Object.defineProperty(exports,"ContentControlNotFoundError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.z}});Object.defineProperty(exports,"ContentControlTypeError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.B}});Object.defineProperty(exports,"ContentControlValueError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.K}});Object.defineProperty(exports,"RepeatingSectionError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.R}});Object.defineProperty(exports,"addRepeatingSectionItem",{enumerable:true,get:function(){return chunkFO6IX2DB_js.T}});Object.defineProperty(exports,"countCharacters",{enumerable:true,get:function(){return chunkFO6IX2DB_js.g}});Object.defineProperty(exports,"countWords",{enumerable:true,get:function(){return chunkFO6IX2DB_js.f}});Object.defineProperty(exports,"findContentControl",{enumerable:true,get:function(){return chunkFO6IX2DB_js.y}});Object.defineProperty(exports,"findContentControls",{enumerable:true,get:function(){return chunkFO6IX2DB_js.x}});Object.defineProperty(exports,"formatSdtDate",{enumerable:true,get:function(){return chunkFO6IX2DB_js.L}});Object.defineProperty(exports,"getBlockIndexForParagraph",{enumerable:true,get:function(){return chunkFO6IX2DB_js.v}});Object.defineProperty(exports,"getBodyCharacterCount",{enumerable:true,get:function(){return chunkFO6IX2DB_js.i}});Object.defineProperty(exports,"getBodyText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.e}});Object.defineProperty(exports,"getBodyWordCount",{enumerable:true,get:function(){return chunkFO6IX2DB_js.h}});Object.defineProperty(exports,"getContentControlText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.w}});Object.defineProperty(exports,"getFormattingAtPosition",{enumerable:true,get:function(){return chunkFO6IX2DB_js.l}});Object.defineProperty(exports,"getHyperlinkAtPosition",{enumerable:true,get:function(){return chunkFO6IX2DB_js.n}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.c}});Object.defineProperty(exports,"getParagraphAtIndex",{enumerable:true,get:function(){return chunkFO6IX2DB_js.u}});Object.defineProperty(exports,"getParagraphText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.a}});Object.defineProperty(exports,"getParagraphs",{enumerable:true,get:function(){return chunkFO6IX2DB_js.t}});Object.defineProperty(exports,"getRunText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.b}});Object.defineProperty(exports,"getTableText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.d}});Object.defineProperty(exports,"getTextAfter",{enumerable:true,get:function(){return chunkFO6IX2DB_js.k}});Object.defineProperty(exports,"getTextBefore",{enumerable:true,get:function(){return chunkFO6IX2DB_js.j}});Object.defineProperty(exports,"hasHyperlinks",{enumerable:true,get:function(){return chunkFO6IX2DB_js.r}});Object.defineProperty(exports,"hasImages",{enumerable:true,get:function(){return chunkFO6IX2DB_js.q}});Object.defineProperty(exports,"hasTables",{enumerable:true,get:function(){return chunkFO6IX2DB_js.s}});Object.defineProperty(exports,"isHeadingStyle",{enumerable:true,get:function(){return chunkFO6IX2DB_js.o}});Object.defineProperty(exports,"isPositionInHyperlink",{enumerable:true,get:function(){return chunkFO6IX2DB_js.m}});Object.defineProperty(exports,"isRepeatingSection",{enumerable:true,get:function(){return chunkFO6IX2DB_js.P}});Object.defineProperty(exports,"isRepeatingSectionItem",{enumerable:true,get:function(){return chunkFO6IX2DB_js.Q}});Object.defineProperty(exports,"parseHeadingLevel",{enumerable:true,get:function(){return chunkFO6IX2DB_js.p}});Object.defineProperty(exports,"removeContentControl",{enumerable:true,get:function(){return chunkFO6IX2DB_js.J}});Object.defineProperty(exports,"removeRepeatingSectionItem",{enumerable:true,get:function(){return chunkFO6IX2DB_js.U}});Object.defineProperty(exports,"setContentControlContent",{enumerable:true,get:function(){return chunkFO6IX2DB_js.I}});Object.defineProperty(exports,"setContentControlValue",{enumerable:true,get:function(){return chunkFO6IX2DB_js.N}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.m}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.r}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.j}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.i}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.k}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.g}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.e}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.f}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.l}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.h}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.a}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.c}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.d}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.e}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.g}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.p}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.j}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.f}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.d}});Object.defineProperty(exports,"pointsToHalfPoints",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.l}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.i}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.h}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.c}});exports.VERSION=Ct;
|
|
1
|
+
'use strict';var chunkQEACB5VG_js=require('./chunk-QEACB5VG.js'),chunkXXU7YQVV_js=require('./chunk-XXU7YQVV.js'),chunk2SGJZYQF_js=require('./chunk-2SGJZYQF.js'),chunkCZSAC65M_js=require('./chunk-CZSAC65M.js'),chunkNXLJVVVE_js=require('./chunk-NXLJVVVE.js'),chunk3QPKTG2Y_js=require('./chunk-3QPKTG2Y.js'),chunkU4UCHBZ7_js=require('./chunk-U4UCHBZ7.js'),chunkESI4BSBF_js=require('./chunk-ESI4BSBF.js'),chunkTE2AF7FM_js=require('./chunk-TE2AF7FM.js'),chunkBH3ACQ3M_js=require('./chunk-BH3ACQ3M.js'),chunkNAFMAKLK_js=require('./chunk-NAFMAKLK.js'),chunk4BFNWPKW_js=require('./chunk-4BFNWPKW.js'),chunkOTHV7YV2_js=require('./chunk-OTHV7YV2.js');require('./chunk-LERLET2D.js'),require('./chunk-FIGLFSNR.js'),require('./chunk-MNOHUTKE.js');var chunkFO6IX2DB_js=require('./chunk-FO6IX2DB.js'),chunkRQVHKDXK_js=require('./chunk-RQVHKDXK.js');require('./chunk-SCK6ZM5V.js'),require('./chunk-Z3LGMBJC.js'),require('./chunk-3R7QHNI5.js');var chunkMJ5FQX7Q_js=require('./chunk-MJ5FQX7Q.js');require('./chunk-C2BAPYGJ.js');var chunk4Q2IP5FW_js=require('./chunk-4Q2IP5FW.js');require('./chunk-GSKMHXHG.js'),require('./chunk-DC7S76ZX.js');var xt="0.0.2";Object.defineProperty(exports,"mapHexToHighlightName",{enumerable:true,get:function(){return chunkQEACB5VG_js.b}});Object.defineProperty(exports,"DEFAULT_AI_ACTIONS",{enumerable:true,get:function(){return chunkXXU7YQVV_js.g}});Object.defineProperty(exports,"comparePositions",{enumerable:true,get:function(){return chunkXXU7YQVV_js.d}});Object.defineProperty(exports,"createCollapsedRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.a}});Object.defineProperty(exports,"createCommand",{enumerable:true,get:function(){return chunkXXU7YQVV_js.h}});Object.defineProperty(exports,"createRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.b}});Object.defineProperty(exports,"getActionDescription",{enumerable:true,get:function(){return chunkXXU7YQVV_js.f}});Object.defineProperty(exports,"getActionLabel",{enumerable:true,get:function(){return chunkXXU7YQVV_js.e}});Object.defineProperty(exports,"isPositionInRange",{enumerable:true,get:function(){return chunkXXU7YQVV_js.c}});Object.defineProperty(exports,"DocumentAgent",{enumerable:true,get:function(){return chunk2SGJZYQF_js.a}});Object.defineProperty(exports,"buildExtendedSelectionContext",{enumerable:true,get:function(){return chunk2SGJZYQF_js.h}});Object.defineProperty(exports,"buildSelectionContext",{enumerable:true,get:function(){return chunk2SGJZYQF_js.g}});Object.defineProperty(exports,"buildSelectionContextFromContext",{enumerable:true,get:function(){return chunk2SGJZYQF_js.e}});Object.defineProperty(exports,"createAgent",{enumerable:true,get:function(){return chunk2SGJZYQF_js.b}});Object.defineProperty(exports,"createAgentFromDocument",{enumerable:true,get:function(){return chunk2SGJZYQF_js.c}});Object.defineProperty(exports,"getAgentContext",{enumerable:true,get:function(){return chunk2SGJZYQF_js.d}});Object.defineProperty(exports,"getDocumentSummary",{enumerable:true,get:function(){return chunk2SGJZYQF_js.f}});Object.defineProperty(exports,"getSelectionFormattingSummary",{enumerable:true,get:function(){return chunk2SGJZYQF_js.i}});Object.defineProperty(exports,"attemptSelectiveSave",{enumerable:true,get:function(){return chunkCZSAC65M_js.c}});Object.defineProperty(exports,"buildPatchedDocumentXml",{enumerable:true,get:function(){return chunkCZSAC65M_js.b}});Object.defineProperty(exports,"validatePatchSafety",{enumerable:true,get:function(){return chunkCZSAC65M_js.a}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkNXLJVVVE_js.b}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkNXLJVVVE_js.a}});Object.defineProperty(exports,"isZodSchema",{enumerable:true,get:function(){return chunk3QPKTG2Y_js.a}});Object.defineProperty(exports,"detectVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.a}});Object.defineProperty(exports,"detectVariablesDetailed",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.b}});Object.defineProperty(exports,"detectVariablesInBody",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.c}});Object.defineProperty(exports,"detectVariablesInParagraph",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.d}});Object.defineProperty(exports,"documentHasVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.m}});Object.defineProperty(exports,"extractVariablesFromText",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.e}});Object.defineProperty(exports,"formatVariable",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.i}});Object.defineProperty(exports,"hasTemplateVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.f}});Object.defineProperty(exports,"isValidVariableName",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.g}});Object.defineProperty(exports,"parseVariable",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.j}});Object.defineProperty(exports,"removeVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.l}});Object.defineProperty(exports,"replaceVariables",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.k}});Object.defineProperty(exports,"sanitizeVariableName",{enumerable:true,get:function(){return chunkU4UCHBZ7_js.h}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunkESI4BSBF_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunkESI4BSBF_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkESI4BSBF_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunkESI4BSBF_js.i}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkESI4BSBF_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkESI4BSBF_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.f}});Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkTE2AF7FM_js.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkTE2AF7FM_js.b}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.t}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.i}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.m}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkNAFMAKLK_js.g}});Object.defineProperty(exports,"serializeDocx",{enumerable:true,get:function(){return chunkNAFMAKLK_js.h}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkNAFMAKLK_js.c}});Object.defineProperty(exports,"PluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.a}});Object.defineProperty(exports,"createPluginRegistrar",{enumerable:true,get:function(){return chunk4BFNWPKW_js.d}});Object.defineProperty(exports,"pluginRegistry",{enumerable:true,get:function(){return chunk4BFNWPKW_js.b}});Object.defineProperty(exports,"registerPlugins",{enumerable:true,get:function(){return chunk4BFNWPKW_js.c}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkOTHV7YV2_js.f}});Object.defineProperty(exports,"ContentControlBoundError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.C}});Object.defineProperty(exports,"ContentControlLockedError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.A}});Object.defineProperty(exports,"ContentControlNotFoundError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.z}});Object.defineProperty(exports,"ContentControlTypeError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.B}});Object.defineProperty(exports,"ContentControlValueError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.K}});Object.defineProperty(exports,"RepeatingSectionError",{enumerable:true,get:function(){return chunkFO6IX2DB_js.R}});Object.defineProperty(exports,"addRepeatingSectionItem",{enumerable:true,get:function(){return chunkFO6IX2DB_js.T}});Object.defineProperty(exports,"countCharacters",{enumerable:true,get:function(){return chunkFO6IX2DB_js.g}});Object.defineProperty(exports,"countWords",{enumerable:true,get:function(){return chunkFO6IX2DB_js.f}});Object.defineProperty(exports,"findContentControl",{enumerable:true,get:function(){return chunkFO6IX2DB_js.y}});Object.defineProperty(exports,"findContentControls",{enumerable:true,get:function(){return chunkFO6IX2DB_js.x}});Object.defineProperty(exports,"formatSdtDate",{enumerable:true,get:function(){return chunkFO6IX2DB_js.L}});Object.defineProperty(exports,"getBlockIndexForParagraph",{enumerable:true,get:function(){return chunkFO6IX2DB_js.v}});Object.defineProperty(exports,"getBodyCharacterCount",{enumerable:true,get:function(){return chunkFO6IX2DB_js.i}});Object.defineProperty(exports,"getBodyText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.e}});Object.defineProperty(exports,"getBodyWordCount",{enumerable:true,get:function(){return chunkFO6IX2DB_js.h}});Object.defineProperty(exports,"getContentControlText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.w}});Object.defineProperty(exports,"getFormattingAtPosition",{enumerable:true,get:function(){return chunkFO6IX2DB_js.l}});Object.defineProperty(exports,"getHyperlinkAtPosition",{enumerable:true,get:function(){return chunkFO6IX2DB_js.n}});Object.defineProperty(exports,"getHyperlinkText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.c}});Object.defineProperty(exports,"getParagraphAtIndex",{enumerable:true,get:function(){return chunkFO6IX2DB_js.u}});Object.defineProperty(exports,"getParagraphText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.a}});Object.defineProperty(exports,"getParagraphs",{enumerable:true,get:function(){return chunkFO6IX2DB_js.t}});Object.defineProperty(exports,"getRunText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.b}});Object.defineProperty(exports,"getTableText",{enumerable:true,get:function(){return chunkFO6IX2DB_js.d}});Object.defineProperty(exports,"getTextAfter",{enumerable:true,get:function(){return chunkFO6IX2DB_js.k}});Object.defineProperty(exports,"getTextBefore",{enumerable:true,get:function(){return chunkFO6IX2DB_js.j}});Object.defineProperty(exports,"hasHyperlinks",{enumerable:true,get:function(){return chunkFO6IX2DB_js.r}});Object.defineProperty(exports,"hasImages",{enumerable:true,get:function(){return chunkFO6IX2DB_js.q}});Object.defineProperty(exports,"hasTables",{enumerable:true,get:function(){return chunkFO6IX2DB_js.s}});Object.defineProperty(exports,"isHeadingStyle",{enumerable:true,get:function(){return chunkFO6IX2DB_js.o}});Object.defineProperty(exports,"isPositionInHyperlink",{enumerable:true,get:function(){return chunkFO6IX2DB_js.m}});Object.defineProperty(exports,"isRepeatingSection",{enumerable:true,get:function(){return chunkFO6IX2DB_js.P}});Object.defineProperty(exports,"isRepeatingSectionItem",{enumerable:true,get:function(){return chunkFO6IX2DB_js.Q}});Object.defineProperty(exports,"parseHeadingLevel",{enumerable:true,get:function(){return chunkFO6IX2DB_js.p}});Object.defineProperty(exports,"removeContentControl",{enumerable:true,get:function(){return chunkFO6IX2DB_js.J}});Object.defineProperty(exports,"removeRepeatingSectionItem",{enumerable:true,get:function(){return chunkFO6IX2DB_js.U}});Object.defineProperty(exports,"setContentControlContent",{enumerable:true,get:function(){return chunkFO6IX2DB_js.I}});Object.defineProperty(exports,"setContentControlValue",{enumerable:true,get:function(){return chunkFO6IX2DB_js.N}});Object.defineProperty(exports,"getDocumentWatermark",{enumerable:true,get:function(){return chunkRQVHKDXK_js.a}});Object.defineProperty(exports,"setDocumentWatermark",{enumerable:true,get:function(){return chunkRQVHKDXK_js.b}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.m}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.r}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.j}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.i}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.k}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.g}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.e}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.f}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.l}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.h}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.a}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.c}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.d}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.e}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.g}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.p}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.j}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.f}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.d}});Object.defineProperty(exports,"pointsToHalfPoints",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.l}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.i}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.h}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.c}});exports.VERSION=xt;
|
package/dist/headless.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as mapHexToHighlightName}from'./chunk-XPV6VILW.mjs';export{g as DEFAULT_AI_ACTIONS,d as comparePositions,a as createCollapsedRange,h as createCommand,b as createRange,f as getActionDescription,e as getActionLabel,c as isPositionInRange}from'./chunk-MVZOTKNL.mjs';export{a as DocumentAgent,h as buildExtendedSelectionContext,g as buildSelectionContext,e as buildSelectionContextFromContext,b as createAgent,c as createAgentFromDocument,d as getAgentContext,f as getDocumentSummary,i as getSelectionFormattingSummary}from'./chunk-
|
|
1
|
+
export{b as mapHexToHighlightName}from'./chunk-XPV6VILW.mjs';export{g as DEFAULT_AI_ACTIONS,d as comparePositions,a as createCollapsedRange,h as createCommand,b as createRange,f as getActionDescription,e as getActionLabel,c as isPositionInRange}from'./chunk-MVZOTKNL.mjs';export{a as DocumentAgent,h as buildExtendedSelectionContext,g as buildSelectionContext,e as buildSelectionContextFromContext,b as createAgent,c as createAgentFromDocument,d as getAgentContext,f as getDocumentSummary,i as getSelectionFormattingSummary}from'./chunk-YNUPP7UG.mjs';export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'./chunk-FYRJTDC4.mjs';export{b as createDocumentWithText,a as createEmptyDocument}from'./chunk-CKKO4JWE.mjs';export{a as isZodSchema}from'./chunk-DFUWJHKF.mjs';export{a as detectVariables,b as detectVariablesDetailed,c as detectVariablesInBody,d as detectVariablesInParagraph,m as documentHasVariables,e as extractVariablesFromText,i as formatVariable,f as hasTemplateVariables,g as isValidVariableName,j as parseVariable,l as removeVariables,k as replaceVariables,h as sanitizeVariableName}from'./chunk-ARHPXIBJ.mjs';export{j as createTemplateProcessor,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-CGJ6S3AH.mjs';export{a as executeCommand,b as executeCommands}from'./chunk-CUY2THAO.mjs';export{t as createDocx,i as repackDocx,m as updateMultipleFiles}from'./chunk-CHN26LLL.mjs';export{g as serializeDocumentBody,h as serializeDocx,c as serializeSectionProperties}from'./chunk-WWNOXNEX.mjs';export{a as PluginRegistry,d as createPluginRegistrar,b as pluginRegistry,c as registerPlugins}from'./chunk-3NRMSZX2.mjs';export{f as parseDocx}from'./chunk-UE2ZKRYB.mjs';import'./chunk-3G44SFHX.mjs';import'./chunk-MOCGHQ4A.mjs';import'./chunk-7LRR7RKE.mjs';export{C as ContentControlBoundError,A as ContentControlLockedError,z as ContentControlNotFoundError,B as ContentControlTypeError,K as ContentControlValueError,R as RepeatingSectionError,T as addRepeatingSectionItem,g as countCharacters,f as countWords,y as findContentControl,x as findContentControls,L as formatSdtDate,v as getBlockIndexForParagraph,i as getBodyCharacterCount,e as getBodyText,h as getBodyWordCount,w as getContentControlText,l as getFormattingAtPosition,n as getHyperlinkAtPosition,c as getHyperlinkText,u as getParagraphAtIndex,a as getParagraphText,t as getParagraphs,b as getRunText,d as getTableText,k as getTextAfter,j as getTextBefore,r as hasHyperlinks,q as hasImages,s as hasTables,o as isHeadingStyle,m as isPositionInHyperlink,P as isRepeatingSection,Q as isRepeatingSectionItem,p as parseHeadingLevel,J as removeContentControl,U as removeRepeatingSectionItem,I as setContentControlContent,N as setContentControlValue}from'./chunk-KOEWROYV.mjs';export{a as getDocumentWatermark,b as setDocumentWatermark}from'./chunk-GYWTUUXX.mjs';import'./chunk-7CZEZ3UL.mjs';import'./chunk-W77JXDEV.mjs';import'./chunk-3ANZ3252.mjs';export{m as blendColors,r as colorsEqual,j as createRgbColor,i as createThemeColor,k as darkenColor,g as getContrastingColor,e as isBlack,f as isWhite,l as lightenColor,h as parseColorString,a as resolveColor,c as resolveHighlightColor,d as resolveShadingColor}from'./chunk-67LVRQIR.mjs';import'./chunk-LE67NTCN.mjs';export{e as emuToPixels,g as emuToTwips,p as formatPx,j as halfPointsToPixels,f as pixelsToEmu,d as pixelsToTwips,l as pointsToHalfPoints,i as pointsToPixels,h as twipsToEmu,c as twipsToPixels}from'./chunk-VW22RZ6C.mjs';import'./chunk-DI6CRWSW.mjs';import'./chunk-QYUPLKLP.mjs';var xt="0.0.2";export{xt as VERSION};
|
|
@@ -36,6 +36,31 @@ interface DomSelectionRect {
|
|
|
36
36
|
height: number;
|
|
37
37
|
pageIndex: number;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Vertically clip a client rect to the enclosing page-fragment table's visible
|
|
41
|
+
* box. A table that breaks across a page sits in a `.layout-table` with
|
|
42
|
+
* `overflow:hidden` and `height = visibleHeight`; getClientRects() still reports
|
|
43
|
+
* the geometry of lines that are visually clipped (off the page / in the
|
|
44
|
+
* inter-page gap), so selection highlights must be clipped to the same box.
|
|
45
|
+
*
|
|
46
|
+
* Uses `.layout-table:not(.layout-nested-table)` because only the page-fragment
|
|
47
|
+
* table carries the window clip — the inner nested table has no overflow:hidden.
|
|
48
|
+
* Clips vertically only (the gap bug is vertical; horizontal clipping could trim
|
|
49
|
+
* change bars on tracked-change tables that set overflow-x: visible).
|
|
50
|
+
*
|
|
51
|
+
* Returns null when the rect is fully outside the window.
|
|
52
|
+
*/
|
|
53
|
+
declare function clipRectToTableWindow(spanEl: Element, rect: {
|
|
54
|
+
readonly left: number;
|
|
55
|
+
readonly top: number;
|
|
56
|
+
readonly right: number;
|
|
57
|
+
readonly bottom: number;
|
|
58
|
+
}): {
|
|
59
|
+
left: number;
|
|
60
|
+
top: number;
|
|
61
|
+
right: number;
|
|
62
|
+
bottom: number;
|
|
63
|
+
} | null;
|
|
39
64
|
declare function getSelectionRectsFromDom(container: HTMLElement, from: number, to: number, overlayRect: DOMRect): DomSelectionRect[];
|
|
40
65
|
/**
|
|
41
66
|
* Get caret position from DOM for a PM position.
|
|
@@ -53,4 +78,4 @@ interface DomCaretPosition {
|
|
|
53
78
|
}
|
|
54
79
|
declare function getCaretPositionFromDom(container: HTMLElement, pmPos: number, overlayRect: DOMRect): DomCaretPosition | null;
|
|
55
80
|
|
|
56
|
-
export { type DomCaretPosition, type DomSelectionRect, clickToPositionDom, getCaretPositionFromDom, getSelectionRectsFromDom };
|
|
81
|
+
export { type DomCaretPosition, type DomSelectionRect, clickToPositionDom, clipRectToTableWindow, getCaretPositionFromDom, getSelectionRectsFromDom };
|
|
@@ -36,6 +36,31 @@ interface DomSelectionRect {
|
|
|
36
36
|
height: number;
|
|
37
37
|
pageIndex: number;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Vertically clip a client rect to the enclosing page-fragment table's visible
|
|
41
|
+
* box. A table that breaks across a page sits in a `.layout-table` with
|
|
42
|
+
* `overflow:hidden` and `height = visibleHeight`; getClientRects() still reports
|
|
43
|
+
* the geometry of lines that are visually clipped (off the page / in the
|
|
44
|
+
* inter-page gap), so selection highlights must be clipped to the same box.
|
|
45
|
+
*
|
|
46
|
+
* Uses `.layout-table:not(.layout-nested-table)` because only the page-fragment
|
|
47
|
+
* table carries the window clip — the inner nested table has no overflow:hidden.
|
|
48
|
+
* Clips vertically only (the gap bug is vertical; horizontal clipping could trim
|
|
49
|
+
* change bars on tracked-change tables that set overflow-x: visible).
|
|
50
|
+
*
|
|
51
|
+
* Returns null when the rect is fully outside the window.
|
|
52
|
+
*/
|
|
53
|
+
declare function clipRectToTableWindow(spanEl: Element, rect: {
|
|
54
|
+
readonly left: number;
|
|
55
|
+
readonly top: number;
|
|
56
|
+
readonly right: number;
|
|
57
|
+
readonly bottom: number;
|
|
58
|
+
}): {
|
|
59
|
+
left: number;
|
|
60
|
+
top: number;
|
|
61
|
+
right: number;
|
|
62
|
+
bottom: number;
|
|
63
|
+
} | null;
|
|
39
64
|
declare function getSelectionRectsFromDom(container: HTMLElement, from: number, to: number, overlayRect: DOMRect): DomSelectionRect[];
|
|
40
65
|
/**
|
|
41
66
|
* Get caret position from DOM for a PM position.
|
|
@@ -53,4 +78,4 @@ interface DomCaretPosition {
|
|
|
53
78
|
}
|
|
54
79
|
declare function getCaretPositionFromDom(container: HTMLElement, pmPos: number, overlayRect: DOMRect): DomCaretPosition | null;
|
|
55
80
|
|
|
56
|
-
export { type DomCaretPosition, type DomSelectionRect, clickToPositionDom, getCaretPositionFromDom, getSelectionRectsFromDom };
|
|
81
|
+
export { type DomCaretPosition, type DomSelectionRect, clickToPositionDom, clipRectToTableWindow, getCaretPositionFromDom, getSelectionRectsFromDom };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk4MYKVWNF_js=require('../chunk-4MYKVWNF.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"clickToPositionDom",{enumerable:true,get:function(){return chunk4MYKVWNF_js.e}});Object.defineProperty(exports,"clipRectToTableWindow",{enumerable:true,get:function(){return chunk4MYKVWNF_js.f}});Object.defineProperty(exports,"getCaretPositionFromDom",{enumerable:true,get:function(){return chunk4MYKVWNF_js.h}});Object.defineProperty(exports,"getSelectionRectsFromDom",{enumerable:true,get:function(){return chunk4MYKVWNF_js.g}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{e as clickToPositionDom,
|
|
1
|
+
export{e as clickToPositionDom,f as clipRectToTableWindow,h as getCaretPositionFromDom,g as getSelectionRectsFromDom}from'../chunk-LX35TFGF.mjs';import'../chunk-QYUPLKLP.mjs';
|