@betteroffice/docx 0.0.1 → 0.0.2
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/README.md +19 -0
- package/dist/chunk-AEQOEQJ7.mjs +57 -0
- package/dist/chunk-AZ52IWB6.mjs +16 -0
- package/dist/{chunk-SINEY6ZF.mjs → chunk-B4IR6YP4.mjs} +1 -1
- package/dist/chunk-IFT6DUJX.mjs +1 -0
- package/dist/{chunk-H3JCIGWK.mjs → chunk-NJHOPXZW.mjs} +1 -1
- package/dist/chunk-NTQM4EYN.mjs +1 -0
- package/dist/{chunk-KXNZFTTK.mjs → chunk-WBH3SXI6.mjs} +1 -1
- package/dist/collaboration/index.d.mts +64 -0
- package/dist/collaboration/index.mjs +1 -0
- package/dist/{content-sSHuWw49.d.mts → content-DLFHRQav.d.mts} +8 -8
- package/dist/core.d.mts +148 -341
- package/dist/core.mjs +1 -1
- package/dist/{displayListQueries-p-ijSzdh.d.mts → displayListQueries-UGc_XBUv.d.mts} +1 -1
- package/dist/docx/index.d.mts +40 -520
- package/dist/docx/index.mjs +2 -2
- package/dist/editor/index.d.mts +35 -151
- package/dist/editor/index.mjs +1 -1
- package/dist/{fontLoader-Bx6DK6-2.d.mts → fontLoader-aSewHMKF.d.mts} +65 -63
- package/dist/{formatting-DoL7KBSL.d.mts → formatting-D1EPSaJP.d.mts} +1 -1
- package/dist/generated/edit/docx_edit_bg.wasm +0 -0
- package/dist/generated/layout/docx_layout_bg.wasm +0 -0
- package/dist/generated/opc/ooxml_opc_bg.wasm +0 -0
- package/dist/generated/parse/docx_parse_bg.wasm +0 -0
- package/dist/index-Bwxm3oiC.d.mts +934 -0
- package/dist/layout/index.d.mts +18 -240
- package/dist/layout/index.mjs +1 -1
- package/dist/layout/pagination/index.d.mts +10 -58
- package/dist/layout/pagination/index.mjs +1 -1
- package/dist/layout/render/index.d.mts +10 -11
- package/dist/layout/render/index.mjs +1 -1
- package/dist/plugin-api/RenderedDomContext.d.mts +8 -9
- package/dist/plugin-api/index.d.mts +191 -6
- package/dist/plugin-api/resolveItemPositions.d.mts +4 -5
- package/dist/{rustDisplayList-dqunvwxH.d.mts → rustDisplayList-CX78djsZ.d.mts} +5 -5
- package/dist/rustMeasureSource-D1KsQvVC.d.mts +106 -0
- package/dist/selectiveSave-CVoajSKE.d.mts +56 -0
- package/dist/styles/index.d.mts +4 -39
- package/dist/styles/index.mjs +1 -1
- package/dist/{styles-VxNcXLdi.d.mts → styles-Dn_o3Vo5.d.mts} +2 -2
- package/dist/types/content.d.mts +2 -2
- package/dist/types/document.d.mts +40 -14
- package/dist/{types-DNrYr6yQ.d.mts → types-DMkDbvEu.d.mts} +3 -71
- package/dist/utils/comments.d.mts +2 -2
- package/dist/utils/index.d.mts +110 -576
- package/dist/utils/index.mjs +1 -84
- package/dist/utils/stylePreview.d.mts +2 -2
- package/dist/utils/units.d.mts +33 -2
- package/dist/wasm-BGQBTR2J.mjs +1 -0
- package/dist/wasm-edit.d.mts +13 -5
- package/dist/wasm-edit.mjs +1 -1
- package/dist/wasm-opc.mjs +1 -1
- package/dist/wasm-parse.mjs +1 -1
- package/dist/yrs/index.d.mts +5 -881
- package/dist/yrs/index.mjs +1 -1
- package/dist/yrs/residentEngineWorker.mjs +1 -1
- package/package.json +16 -139
- package/dist/Subscribable-DOz6Ohoo.d.mts +0 -33
- package/dist/agent/index.d.mts +0 -531
- package/dist/agent/index.mjs +0 -1
- package/dist/chunk-34K66SY4.mjs +0 -1
- package/dist/chunk-4RCISPPE.mjs +0 -1
- package/dist/chunk-52GB3Y42.mjs +0 -1
- package/dist/chunk-6PW4CWUG.mjs +0 -1
- package/dist/chunk-7DEIW7FL.mjs +0 -1
- package/dist/chunk-7PCO5I2O.mjs +0 -1
- package/dist/chunk-BI3B33LI.mjs +0 -1
- package/dist/chunk-BIQWVK5P.mjs +0 -2
- package/dist/chunk-DXKG3HQ5.mjs +0 -16
- package/dist/chunk-FPZBTOD6.mjs +0 -1
- package/dist/chunk-FZIA7OFY.mjs +0 -1
- package/dist/chunk-GWKJ2Y4Y.mjs +0 -1
- package/dist/chunk-HJGAQIU7.mjs +0 -2
- package/dist/chunk-I6KKMUUC.mjs +0 -1
- package/dist/chunk-IL5JZJT7.mjs +0 -1
- package/dist/chunk-JY6ILTNS.mjs +0 -1
- package/dist/chunk-KEE52TT5.mjs +0 -1
- package/dist/chunk-KVKLLTDP.mjs +0 -58
- package/dist/chunk-L5ISVQ3W.mjs +0 -1
- package/dist/chunk-LDUWIM7M.mjs +0 -1
- package/dist/chunk-N5Q3YN64.mjs +0 -1
- package/dist/chunk-NEWOMDTX.mjs +0 -1
- package/dist/chunk-O2QSE2I7.mjs +0 -1
- package/dist/chunk-OJOHXQNQ.mjs +0 -1
- package/dist/chunk-OMR3TWCD.mjs +0 -2
- package/dist/chunk-P3KDV4M2.mjs +0 -1
- package/dist/chunk-Q7PO7V73.mjs +0 -1
- package/dist/chunk-QOUFE3VX.mjs +0 -1
- package/dist/chunk-TYHI7RAD.mjs +0 -1
- package/dist/chunk-UIEJWORW.mjs +0 -1
- package/dist/chunk-VAOUFAUH.mjs +0 -1
- package/dist/chunk-VBOTMRXV.mjs +0 -1
- package/dist/chunk-VCER63GQ.mjs +0 -1
- package/dist/chunk-WAUF2UC7.mjs +0 -2
- package/dist/chunk-X4XDO3LZ.mjs +0 -1
- package/dist/chunk-XQBCCJBO.mjs +0 -9
- package/dist/chunk-XWUOLYRQ.mjs +0 -2
- package/dist/chunk-XYH6XWP3.mjs +0 -10
- package/dist/chunk-YBIM6UJV.mjs +0 -8
- package/dist/chunk-YCIH2Q3E.mjs +0 -1
- package/dist/chunk-ZOV5KL7C.mjs +0 -1
- package/dist/colorResolver-n0o7H7ep.d.mts +0 -290
- package/dist/core-plugins.d.mts +0 -37
- package/dist/core-plugins.mjs +0 -1
- package/dist/docx/parser.d.mts +0 -41
- package/dist/docx/parser.mjs +0 -1
- package/dist/docx/rezip.d.mts +0 -148
- package/dist/docx/rezip.mjs +0 -1
- package/dist/docx/serializer/index.d.mts +0 -42
- package/dist/docx/serializer/index.mjs +0 -1
- package/dist/editorTree-DO5PyDK8.d.mts +0 -37
- package/dist/executor-7O2RBJ2B.mjs +0 -1
- package/dist/headerFooterLayout-0zPT64Qc.d.mts +0 -316
- package/dist/headless.d.mts +0 -69
- package/dist/headless.mjs +0 -1
- package/dist/layout/flow/index.d.mts +0 -149
- package/dist/layout/flow/index.mjs +0 -1
- package/dist/layout/measure/index.d.mts +0 -324
- package/dist/layout/measure/index.mjs +0 -1
- package/dist/layout/pagination/types.d.mts +0 -4
- package/dist/layout/pagination/types.mjs +0 -1
- package/dist/managers/AutoSaveManager.d.mts +0 -81
- package/dist/managers/AutoSaveManager.mjs +0 -1
- package/dist/managers/TableSelectionManager.d.mts +0 -74
- package/dist/managers/TableSelectionManager.mjs +0 -1
- package/dist/managers/types.d.mts +0 -113
- package/dist/managers/types.mjs +0 -0
- package/dist/mcp-cli.mjs +0 -142
- package/dist/mcp.d.mts +0 -162
- package/dist/mcp.mjs +0 -16
- package/dist/measureBlocksPipeline-Df0Bbrwy.d.mts +0 -109
- package/dist/measuredBlock-DZwz8zhD.d.mts +0 -26
- package/dist/plugin-api/types.d.mts +0 -193
- package/dist/plugin-api/types.mjs +0 -0
- package/dist/processTemplate-HDUIZFJ5.mjs +0 -1
- package/dist/registry-DMM5VTdT.d.mts +0 -165
- package/dist/rustPagination-Bj2hq013.d.mts +0 -106
- package/dist/sectionConfigs-DW3J8q0X.d.mts +0 -55
- package/dist/selectionContext-Buc9BCU1.d.mts +0 -570
- package/dist/selectiveSave-oFBJ1n71.d.mts +0 -16
- package/dist/selectiveXmlPatch-ypkxlTD_.d.mts +0 -23
- package/dist/settingsParser-CcGvtmCK.d.mts +0 -33
- package/dist/types/agentApi.d.mts +0 -456
- package/dist/types/agentApi.mjs +0 -1
- package/dist/types-dYdjUZMo.d.mts +0 -311
- package/dist/units-O5Y02RKQ.d.mts +0 -34
- package/dist/utils/headingCollector.d.mts +0 -28
- package/dist/utils/headingCollector.mjs +0 -1
- package/dist/utils/highlightColors.d.mts +0 -14
- package/dist/utils/highlightColors.mjs +0 -1
- package/dist/utils/textSelection.d.mts +0 -92
- package/dist/utils/textSelection.mjs +0 -1
- package/dist/variableDetector-Borj29SF.d.mts +0 -115
- package/dist/wasm-FZQ5XB2Y.mjs +0 -1
- package/dist/watermarkApi-DCxjutkg.d.mts +0 -38
package/dist/layout/index.d.mts
CHANGED
|
@@ -1,79 +1,13 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import { ao as TableBlock, P as PageMargins, e as LayoutBlock, H as HeaderFooterContent, B as BlockExtent, ar as TableExtent, C as ColumnLayout } from '../types-DNrYr6yQ.mjs';
|
|
3
|
-
export { F as FloatPageGeometry, a as FloatingExclusionRect, b as FloatingImageZone, c as FloatingLineSegmentZone, M as MeasureBlockFn, d as clampFloatingWrapMargins, g as getFloatingMargins, m as measureBlocksWithFloats, r as rectsToFloatingZones } from '../measureBlocksPipeline-Df0Bbrwy.mjs';
|
|
4
|
-
export { BundledFontProvider, EmbeddedFaceInput, FontScript, FontStyle, RustMeasureSource, RustMeasureStats, RustTextEngine, createRustMeasureSource, getRustTextEngine, hashParagraphBlock } from './measure/index.mjs';
|
|
5
|
-
export { C as ConvertFootnoteOptions, a as ConvertHeaderFooterOptions, F as FOOTNOTE_COLUMN_GAP_PX, b as FOOTNOTE_SEPARATOR_HEIGHT, c as FootnoteRefLocation, H as HeaderFooterMetrics, M as MAX_FOOTNOTE_LAYOUT_PASSES, d as MeasureBlocksFn, S as StabilizeFootnoteLayoutArgs, e as StabilizeFootnoteLayoutResult, f as applyFootnotePresentation, g as buildFootnoteContentMap, h as buildFootnoteRenderItems, i as calculateFootnoteReservedHeights, j as calculateHeaderFooterVisualBounds, k as collectFootnoteRefs, l as computeHfCaretRectsFromDisplayList, m as computeHfSelectionRectsFromDisplayList, n as contributesToHeaderFooterFlowHeight, o as convertFootnoteToContent, p as convertHeaderFooterToContent, q as distributeFootnotesIntoColumns, r as footnoteReservedHeightsEqual, s as mapFootnotesToPages, t as normalizeHeaderFooterMeasureBlocks, u as resolveHeaderFooterVisualTop, v as stabilizeFootnoteLayout } from '../headerFooterLayout-0zPT64Qc.mjs';
|
|
6
|
-
import { S as SectionLayoutConfig } from '../sectionConfigs-DW3J8q0X.mjs';
|
|
1
|
+
export { B as BundledFontProvider, E as EmbeddedFaceInput, F as FontScript, a as ResidentFontRequirement, R as ResidentMeasurementConfig, b as RustMeasureSource, c as RustTextEngine, d as createRustMeasureSource, g as getRustTextEngine } from '../rustMeasureSource-D1KsQvVC.mjs';
|
|
7
2
|
import { Document } from '../types/document.mjs';
|
|
8
|
-
import { S as SectionProperties,
|
|
9
|
-
import '../
|
|
10
|
-
import '../formatting-
|
|
11
|
-
import '../
|
|
12
|
-
import '../styles-VxNcXLdi.mjs';
|
|
13
|
-
import '../measuredBlock-DZwz8zhD.mjs';
|
|
14
|
-
import '../displayListQueries-p-ijSzdh.mjs';
|
|
15
|
-
import '../rustDisplayList-dqunvwxH.mjs';
|
|
3
|
+
import { S as SectionProperties, H as HeaderFooter } from '../content-DLFHRQav.mjs';
|
|
4
|
+
import { a as DisplayListQueries, D as DisplayListRect } from '../displayListQueries-UGc_XBUv.mjs';
|
|
5
|
+
import '../formatting-D1EPSaJP.mjs';
|
|
6
|
+
import '../styles-Dn_o3Vo5.mjs';
|
|
16
7
|
import '../docx/wrapTypes.mjs';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Resolve a DOCX width pair to pixels. `pct` values are 50ths of a percent
|
|
24
|
-
* (ECMA-376 §17.18.111 — 5000 means 100%). `dxa` / `auto` / unset are twips.
|
|
25
|
-
*
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
declare function resolveTableWidthPx(value: number | undefined, widthType: string | undefined, parentWidth: number): number | undefined;
|
|
29
|
-
/** A cell with its resolved grid position (column index honoring spans). */
|
|
30
|
-
interface ResolvedGridCell {
|
|
31
|
-
rowIndex: number;
|
|
32
|
-
cellIndex: number;
|
|
33
|
-
columnIndex: number;
|
|
34
|
-
colSpan: number;
|
|
35
|
-
rowSpan: number;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Resolve every cell's grid column index, accounting for `colSpan` and the
|
|
39
|
-
* columns occupied by vertically-merged (`rowSpan`) cells from earlier rows.
|
|
40
|
-
*
|
|
41
|
-
* Single source of truth for table grid geometry — the measurer, the painter,
|
|
42
|
-
* and the row-break paginator all consume this so they agree on which column a
|
|
43
|
-
* cell lives in. Width-free on purpose: callers multiply `columnIndex` by their
|
|
44
|
-
* own (possibly scaled) column widths to get an x offset.
|
|
45
|
-
*
|
|
46
|
-
* @internal
|
|
47
|
-
*/
|
|
48
|
-
declare function resolveCellGrid(tableBlock: TableBlock): ResolvedGridCell[];
|
|
49
|
-
/** Total grid columns, derived from the widest row's accumulated colSpans. */
|
|
50
|
-
declare function countTableColumns(tableBlock: TableBlock): number;
|
|
51
|
-
/**
|
|
52
|
-
* Make `columnWidths` exactly `colCount` long with every entry positive.
|
|
53
|
-
* Missing trailing columns inherit the average of existing positives; zero
|
|
54
|
-
* or negative entries split the leftover `targetWidth` evenly. Callers
|
|
55
|
-
* scale down totals that exceed the target — this helper only fills gaps.
|
|
56
|
-
*/
|
|
57
|
-
declare function normalizeTableColumnWidths(columnWidths: number[], colCount: number, targetWidth: number): number[];
|
|
58
|
-
/**
|
|
59
|
-
* Resolve a table's per-column pixel widths from its grid metadata and width
|
|
60
|
-
* budget — the width half of `measureTableBlock`, with NO cell-content
|
|
61
|
-
* measurement. Factored out so a caller that only needs widths (e.g. deciding
|
|
62
|
-
* whether a floating table is effectively full-width, before the main measure
|
|
63
|
-
* pass) doesn't have to measure every cell.
|
|
64
|
-
*
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
declare function resolveTableColumnWidths(tableBlock: TableBlock, contentWidth: number): number[];
|
|
68
|
-
/**
|
|
69
|
-
* Total pixel width of a table — sum of its resolved column widths, falling
|
|
70
|
-
* back to the explicit table width or the content-width budget. No cell-content
|
|
71
|
-
* measurement, so it is safe to call before the main measure pass. Mirrors the
|
|
72
|
-
* `totalWidth` that `measureTableBlock` produces.
|
|
73
|
-
*
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
declare function resolveTableTotalWidthPx(tableBlock: TableBlock, contentWidth: number): number;
|
|
8
|
+
import '../rustDisplayList-CX78djsZ.mjs';
|
|
9
|
+
import '../types-DMkDbvEu.mjs';
|
|
10
|
+
import './pagination/index.mjs';
|
|
77
11
|
|
|
78
12
|
/**
|
|
79
13
|
* Selection-overlay geometry value types, shared by the canvas overlays and
|
|
@@ -116,68 +50,15 @@ type CaretPosition = {
|
|
|
116
50
|
pageIndex: number;
|
|
117
51
|
};
|
|
118
52
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
*
|
|
129
|
-
* Two correctness rules live here:
|
|
130
|
-
*
|
|
131
|
-
* 1. The band height is driven by `HeaderFooterContent.flowHeight` (in-flow
|
|
132
|
-
* content only), NOT `height` / `visualBottom`. A page/margin-anchored
|
|
133
|
-
* float — e.g. a full-page letterhead anchored in a header — is positioned
|
|
134
|
-
* on the page and does not push the body in Word. Counting it inflated the
|
|
135
|
-
* effective top margin past the page on real-world templates, so the
|
|
136
|
-
* paginator hard-threw "page size and margins yield no content area" and
|
|
137
|
-
* the document rendered blank (issue #705).
|
|
138
|
-
*
|
|
139
|
-
* 2. A clamp guarantees `top + bottom` never consumes the whole page, so a
|
|
140
|
-
* pathological in-flow header degrades to a thin content band with a
|
|
141
|
-
* warning instead of aborting pagination.
|
|
142
|
-
*/
|
|
143
|
-
|
|
144
|
-
/** @public */
|
|
145
|
-
interface ExtendMarginsForHeaderFooterInput {
|
|
146
|
-
pageSize: {
|
|
147
|
-
w: number;
|
|
148
|
-
h: number;
|
|
149
|
-
};
|
|
150
|
-
/** Body fallback margins. */
|
|
151
|
-
margins: PageMargins;
|
|
152
|
-
/** Final-section margins (last `sectPr`). */
|
|
153
|
-
finalMargins: PageMargins;
|
|
154
|
-
/**
|
|
155
|
-
* Body flow blocks. Each `sectionBreak` block's `margins` is extended IN
|
|
156
|
-
* PLACE so multi-section documents paginate with the same band growth (the
|
|
157
|
-
* layout engine prefers `sectionBreak.margins` over the body fallback).
|
|
158
|
-
*/
|
|
159
|
-
bodyBlocks?: LayoutBlock[];
|
|
160
|
-
/** Header variants in play this layout (e.g. default + first-page). */
|
|
161
|
-
headers?: Array<HeaderFooterContent | undefined>;
|
|
162
|
-
/** Footer variants in play this layout. */
|
|
163
|
-
footers?: Array<HeaderFooterContent | undefined>;
|
|
164
|
-
/** Optional diagnostic sink for the clamp (adapters pass `console.warn`). */
|
|
165
|
-
warn?: (message: string) => void;
|
|
166
|
-
}
|
|
167
|
-
/** @public */
|
|
168
|
-
interface ExtendMarginsForHeaderFooterResult {
|
|
169
|
-
margins: PageMargins;
|
|
170
|
-
finalMargins: PageMargins;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Extend body margins so the body clears the header/footer bands, mirroring
|
|
174
|
-
* Word. Returns new `margins` / `finalMargins`; mutates `sectionBreak.margins`
|
|
175
|
-
* in place. When no extension is needed the original objects are returned
|
|
176
|
-
* unchanged.
|
|
177
|
-
*
|
|
178
|
-
* @public
|
|
179
|
-
*/
|
|
180
|
-
declare function extendMarginsForHeaderFooter(input: ExtendMarginsForHeaderFooterInput): ExtendMarginsForHeaderFooterResult;
|
|
53
|
+
declare const DEFAULT_PAGE_HEIGHT_PX = 1056;
|
|
54
|
+
declare function resolveHeaderFooter(document: Document | null, section: SectionProperties | null | undefined): {
|
|
55
|
+
header: HeaderFooter | null;
|
|
56
|
+
footer: HeaderFooter | null;
|
|
57
|
+
firstHeader: HeaderFooter | null;
|
|
58
|
+
firstFooter: HeaderFooter | null;
|
|
59
|
+
};
|
|
60
|
+
declare function computeHfCaretRectsFromDisplayList(queries: DisplayListQueries, section: 'header' | 'footer', rId: string, position: number, pageIndex?: number): DisplayListRect[];
|
|
61
|
+
declare function computeHfSelectionRectsFromDisplayList(queries: DisplayListQueries, section: 'header' | 'footer', rId: string, from: number, to: number, pageIndex?: number): DisplayListRect[];
|
|
181
62
|
|
|
182
63
|
/** Coordinates selection paint with the latest completed layout sequence. */
|
|
183
64
|
declare class LayoutSelectionGate {
|
|
@@ -201,107 +82,4 @@ declare class LayoutSelectionGate {
|
|
|
201
82
|
};
|
|
202
83
|
}
|
|
203
84
|
|
|
204
|
-
|
|
205
|
-
* Shared table measurement helper.
|
|
206
|
-
*
|
|
207
|
-
* Both React's PagedEditor and Vue's useDocxEditor measure tables the
|
|
208
|
-
* same way: resolve column widths through `tableWidthUtils`, track
|
|
209
|
-
* column occupancy across vertically merged cells, then call back into
|
|
210
|
-
* the adapter's `measureBlock` for each cell's contained blocks.
|
|
211
|
-
*
|
|
212
|
-
* This module lives in core (not in either adapter) so a fix on one
|
|
213
|
-
* side automatically applies to both. The recursive cell-content
|
|
214
|
-
* measurement is delegated to the caller via `measureBlock` because
|
|
215
|
-
* each adapter's block coverage differs (React supports floating
|
|
216
|
-
* zones, footnotes, textBoxes; Vue is a subset).
|
|
217
|
-
*/
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Visual height of a single block inside a table cell.
|
|
221
|
-
*
|
|
222
|
-
* A one-line paragraph that contains only image runs is laid out at the
|
|
223
|
-
* image's intrinsic height (plus the paragraph's explicit spacing), not
|
|
224
|
-
* a full text line — matching Word's per-cell layout. Everything else
|
|
225
|
-
* uses the measured `totalHeight` / `height`.
|
|
226
|
-
*/
|
|
227
|
-
declare function measureTableCellBlockVisualHeight(block: LayoutBlock, blockMeasure: BlockExtent): number;
|
|
228
|
-
/**
|
|
229
|
-
* measure a `TableBlock` against a content-width budget: resolve the column
|
|
230
|
-
* grid, measure every cell's blocks, then size rows — with vertically merged
|
|
231
|
-
* cells distributing their surplus height in a second pass.
|
|
232
|
-
*
|
|
233
|
-
* `measureBlock` is the per-cell-content callback; the adapter supplies its
|
|
234
|
-
* own so block coverage stays per-renderer.
|
|
235
|
-
*/
|
|
236
|
-
declare function measureTableBlock(tableBlock: TableBlock, contentWidth: number, measureBlock: (block: LayoutBlock, contentWidth: number) => BlockExtent): TableExtent;
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Section-properties → page geometry helpers.
|
|
240
|
-
*
|
|
241
|
-
* Both adapters need the same translation from `SectionProperties` (twips
|
|
242
|
-
* + DOCX field names) into the layout engine's pixel-shaped `PageSize`
|
|
243
|
-
* and `PageMargins`. Living in core eliminates the subtle React/Vue
|
|
244
|
-
* drift that grows when each adapter ships its own twipsToPixels math.
|
|
245
|
-
*/
|
|
246
|
-
|
|
247
|
-
/** US Letter at 96 DPI — Word's default page size. */
|
|
248
|
-
declare const DEFAULT_PAGE_WIDTH_PX = 816;
|
|
249
|
-
/** US Letter at 96 DPI. */
|
|
250
|
-
declare const DEFAULT_PAGE_HEIGHT_PX = 1056;
|
|
251
|
-
/** 1 inch at 96 DPI — Word's default body margins. */
|
|
252
|
-
declare const DEFAULT_BODY_MARGIN_PX = 96;
|
|
253
|
-
/** Word's default `headerDistance` / `footerDistance` (0.5in = 48px). */
|
|
254
|
-
declare const DEFAULT_HF_DISTANCE_PX = 48;
|
|
255
|
-
/** Convert twips to pixels (1 twip = 1/20 point, 96 pixels per inch). */
|
|
256
|
-
declare function twipsToPixels(twips: number): number;
|
|
257
|
-
/**
|
|
258
|
-
* Convert SectionProperties page size (twips) → pixel `{ w, h }`.
|
|
259
|
-
*
|
|
260
|
-
* Page size is a SIZE: a literal `0` (malformed `w:pgSz`) defaults to Letter
|
|
261
|
-
* rather than rendering a zero-area page — so the truthy guard is intentional
|
|
262
|
-
* here (contrast `getMargins`, where `0` is honored). See `twipsToPxOr`.
|
|
263
|
-
*/
|
|
264
|
-
declare function getPageSize(sp: SectionProperties | null | undefined): {
|
|
265
|
-
w: number;
|
|
266
|
-
h: number;
|
|
267
|
-
};
|
|
268
|
-
/**
|
|
269
|
-
* Convert SectionProperties margins (twips) → pixel `PageMargins`.
|
|
270
|
-
*
|
|
271
|
-
* Every distance is an OFFSET, so an explicit `0` is honored (full-bleed body
|
|
272
|
-
* margins; a header/footer pinned to the page edge — issue #740). Only an
|
|
273
|
-
* ABSENT distance falls back to Word's default. `header`/`footer` default to
|
|
274
|
-
* 48px (Word's 0.5in) so the HF margin-extension math needn't special-case
|
|
275
|
-
* undefined.
|
|
276
|
-
*/
|
|
277
|
-
declare function getMargins(sp: SectionProperties | null | undefined): PageMargins;
|
|
278
|
-
/**
|
|
279
|
-
* Resolve the HeaderFooter pair (default + first-page) for a section.
|
|
280
|
-
*
|
|
281
|
-
* Mirrors React's lookup in DocxEditor.tsx: read `pkg.headers`/`footers`
|
|
282
|
-
* (Maps keyed by rId), resolve through `sp.headerReferences` /
|
|
283
|
-
* `footerReferences`. When `titlePg` is unset and only `first` HFs
|
|
284
|
-
* exist, they serve as the default — same Word fallback both adapters
|
|
285
|
-
* have shipped.
|
|
286
|
-
*/
|
|
287
|
-
declare function resolveHeaderFooter(doc: Document | null, sp: SectionProperties | null | undefined): {
|
|
288
|
-
header: HeaderFooter | null;
|
|
289
|
-
footer: HeaderFooter | null;
|
|
290
|
-
firstHeader: HeaderFooter | null;
|
|
291
|
-
firstFooter: HeaderFooter | null;
|
|
292
|
-
};
|
|
293
|
-
/**
|
|
294
|
-
* Extract column layout from section properties.
|
|
295
|
-
* Returns undefined for single-column (default) to avoid unnecessary paginator overhead.
|
|
296
|
-
*/
|
|
297
|
-
declare function getColumns(sectionProps: SectionProperties | null | undefined): ColumnLayout | undefined;
|
|
298
|
-
declare function columnWidthForSection(config: SectionLayoutConfig): number;
|
|
299
|
-
/**
|
|
300
|
-
* Compute per-block measurement widths by scanning for section breaks.
|
|
301
|
-
* Blocks must be measured with the page width/margins/columns of their own
|
|
302
|
-
* section so that the layout engine can paginate them against the right
|
|
303
|
-
* geometry without remeasuring.
|
|
304
|
-
*/
|
|
305
|
-
declare function computePerBlockWidths(blocks: LayoutBlock[], initialConfig: SectionLayoutConfig, finalConfig: SectionLayoutConfig): number[];
|
|
306
|
-
|
|
307
|
-
export { type CaretPosition, DEFAULT_BODY_MARGIN_PX, DEFAULT_HF_DISTANCE_PX, DEFAULT_PAGE_HEIGHT_PX, DEFAULT_PAGE_WIDTH_PX, type ExtendMarginsForHeaderFooterInput, type ExtendMarginsForHeaderFooterResult, LayoutSelectionGate, type ResolvedGridCell, type SelectionRect, columnWidthForSection, computePerBlockWidths, countTableColumns, extendMarginsForHeaderFooter, getColumns, getMargins, getPageSize, measureTableBlock, measureTableCellBlockVisualHeight, normalizeTableColumnWidths, resolveCellGrid, resolveHeaderFooter, resolveTableColumnWidths, resolveTableTotalWidthPx, resolveTableWidthPx, twipsToPixels };
|
|
85
|
+
export { type CaretPosition, DEFAULT_PAGE_HEIGHT_PX, LayoutSelectionGate, type SelectionRect, computeHfCaretRectsFromDisplayList, computeHfSelectionRectsFromDisplayList, resolveHeaderFooter };
|
package/dist/layout/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import {d,e,g as g$1,c,f,b as b$1}from'../chunk-TTRUPDAB.mjs';function x(o){return o.trim().toLowerCase()}function B(o,e,t){return `${x(o)}|${e?1:0}|${t?1:0}`}var I=class{constructor(e,t){b$1(this,"sink");b$1(this,"bundled");b$1(this,"facesByFamily",new Map);b$1(this,"faceIds",new WeakMap);b$1(this,"bundledIds",new Map);b$1(this,"lastResortIds",new Map);b$1(this,"bufferIds",new WeakMap);b$1(this,"scriptIds",new Map);b$1(this,"scriptResults",new Map);b$1(this,"chains",new Map);b$1(this,"chainResults",new Map);b$1(this,"generation",0);this.sink=e,this.bundled=t?.bundled;}setEmbeddedFaces(e){this.generation++,this.facesByFamily=new Map;for(let t of e){let n=x(t.family),r=this.facesByFamily.get(n);r?r.push(t):this.facesByFamily.set(n,[t]);}this.chains=new Map,this.chainResults=new Map;}getFontIdChain(e,t,n){let r=B(e,t,n),i=this.chains.get(r);return i||(i=this.resolveChain(r,e,t,n),this.chains.set(r,i)),i}getCachedFontIdChain(e,t,n){return this.chainResults.get(B(e,t,n))}getScriptFallbackIds(e){let t=[...new Set(e)];return Promise.all(t.map(n=>this.resolveScript(n))).then(n=>{let r=[];for(let i of n)i!==null&&!r.includes(i)&&r.push(i);return r})}getCachedScriptFallbackIds(e){let t=[];for(let n of e){if(!this.scriptResults.has(n))return;let r=this.scriptResults.get(n);r!==null&&!t.includes(r)&&t.push(r);}return t}clear(){this.generation++,this.faceIds=new WeakMap,this.bundledIds=new Map,this.lastResortIds=new Map,this.bufferIds=new WeakMap,this.scriptIds=new Map,this.scriptResults=new Map,this.chains=new Map,this.chainResults=new Map;}async resolveChain(e,t,n,r){let i=this.generation,s=[],a=this.pickEmbeddedFace(t,n,r);if(a){let l=await this.registerFace(a);l!==null&&s.push(l);}let f=this.bundled?.resolve(t,n,r);if(f){let l=await this.registerBundled(e,f,t);l!==null&&!s.includes(l)&&s.push(l);}let h=this.bundled?.resolveLastResort?.(t,n,r);if(h){let l=await this.registerLastResort(e,h,t);l!==null&&!s.includes(l)&&s.push(l);}return i===this.generation&&this.chainResults.set(e,s),s}pickEmbeddedFace(e,t,n){let r=this.facesByFamily.get(x(e));if(!r)return;let i=t?"bold":"normal",s=n?"italic":"normal";return r.find(a=>a.weight===i&&a.style===s)??r.find(a=>a.weight==="normal"&&a.style==="normal")}registerBuffer(e){let t=this.bufferIds.get(e);return t||(t=Promise.resolve().then(()=>this.sink.registerFont(new Uint8Array(e))),t.catch(()=>{}),this.bufferIds.set(e,t)),t}registerFace(e){let t=this.faceIds.get(e);return t||(t=(async()=>{try{return await this.registerBuffer(e.data)}catch{return console.warn(`[fontRegistry] embedded face "${e.family}" (${e.weight} ${e.style}) was rejected by the text engine; falling back`),null}})(),this.faceIds.set(e,t)),t}registerBundled(e,t,n){let r=this.bundledIds.get(e);return r||(r=(async()=>{try{let i=await t();return await this.registerBuffer(i)}catch{return console.warn(`[fontRegistry] bundled face for "${n}" failed to load or register; falling back`),null}})(),this.bundledIds.set(e,r)),r}registerLastResort(e,t,n){let r=this.lastResortIds.get(e);return r||(r=(async()=>{try{let i=await t();return await this.registerBuffer(i)}catch{return console.warn(`[fontRegistry] last-resort base face for "${n}" failed to load or register; falling back`),null}})(),this.lastResortIds.set(e,r)),r}resolveScript(e){let t=this.scriptIds.get(e);if(!t){let n=this.scriptResults;t=(async()=>{let r=null,i=this.bundled?.resolveScriptFallback?.(e,false,false);if(i)try{let s=await i();r=await this.registerBuffer(s);}catch{console.warn(`[fontRegistry] script-fallback face for "${e}" failed to load or register; falling back`);}return n.set(e,r),r})(),this.scriptIds.set(e,t);}return t}};var L=null;function T(){return L??(L=import('../wasm-SA237OSP.mjs').then(async o=>(await o.preloadLayoutWasm(),{registerFont:o.registerMeasureFont,clearFonts:o.clearMeasureFonts}))),L}function H(o){let e=new I({registerFont:n=>o.engine.registerFont(n)},{bundled:o.bundled}),t;return {setEmbeddedFaces(n){e.setEmbeddedFaces(n);},setCompat(n){t=n;},async prepareFontRequirements(n){return (await Promise.all(n.flatMap(i=>[(async()=>{try{return e.getCachedFontIdChain(i.family,i.bold,i.italic)!==void 0?!1:(await e.getFontIdChain(i.family,i.bold,i.italic),!0)}catch{return false}})(),...Array.from(new Set(i.scripts??[]),async s=>{try{return e.getCachedScriptFallbackIds([s])!==void 0?!1:(await e.getScriptFallbackIds([s]),!0)}catch{return false}})]))).some(Boolean)},measurementConfigForRequirements(n){let r={};for(let i of n){let s=e.getCachedFontIdChain(i.family,i.bold,i.italic),a=e.getCachedScriptFallbackIds(i.scripts??[]);if(s===void 0||a===void 0)return;let f=Array.from(s);for(let h of a)f.includes(h)||f.push(h);f.length>0&&(r[i.key]=f);}return {fontChains:r,defaults:{fontSize:11,fontFamily:"Calibri"},compat:{noLeading:t?.noLeading??false,doNotExpandShiftReturn:t?.doNotExpandShiftReturn??false},authoritativeShaping:true}},clear(){e.clear();}}}var q=1056;function A(o,e){let t=o?.package.headers,n=o?.package.footers,r=e?.headerReferences?.find(y=>y.type==="default"),i=e?.headerReferences?.find(y=>y.type==="first"),s=e?.footerReferences?.find(y=>y.type==="default"),a=e?.footerReferences?.find(y=>y.type==="first"),f=r?t?.get(r.rId)??null:null,h=s?n?.get(s.rId)??null:null,l=i?t?.get(i.rId)??null:null,M=a?n?.get(a.rId)??null:null;return e?.titlePg||(f??(f=l),h??(h=M)),{header:f,footer:h,firstHeader:l,firstFooter:M}}function D(o,e,t,n,r){let i=o.hfCaretRects(e,t,n);return r===void 0?i:i.filter(s=>s.pageIndex===r)}function $(o,e,t,n,r,i){let s=o.hfRangeRects(e,t,Math.min(n,r),Math.max(n,r));return i===void 0?s:s.filter(a=>a.pageIndex===i)}var p,m,g,b,R,w,E,C=class{constructor(){d(this,w);d(this,p,0);d(this,m,0);d(this,g,false);d(this,b,false);d(this,R,new Set);}setStateSeq(e$1){e(this,p,e$1);}incrementStateSeq(){return ++g$1(this,p)._}getStateSeq(){return c(this,p)}getRenderSeq(){return c(this,m)}onLayoutStart(){e(this,g,true);}onLayoutComplete(e$1){e(this,m,e$1),e(this,g,false),c(this,b)&&this.isSafeToRender()&&(e(this,b,false),f(this,w,E).call(this));}isSafeToRender(){return !c(this,g)&&c(this,m)>=c(this,p)}requestRender(){this.isSafeToRender()?f(this,w,E).call(this):e(this,b,true);}onRender(e){return c(this,R).add(e),()=>c(this,R).delete(e)}reset(){e(this,p,0),e(this,m,0),e(this,g,false),e(this,b,false);}getDebugInfo(){return {stateSeq:c(this,p),renderSeq:c(this,m),layoutUpdating:c(this,g),hasPendingRender:c(this,b),isSafe:this.isSafeToRender()}}};p=new WeakMap,m=new WeakMap,g=new WeakMap,b=new WeakMap,R=new WeakMap,w=new WeakSet,E=function(){for(let e of c(this,R))try{e();}catch(t){console.error("LayoutSelectionGate: render callback error",t);}};export{q as DEFAULT_PAGE_HEIGHT_PX,C as LayoutSelectionGate,D as computeHfCaretRectsFromDisplayList,$ as computeHfSelectionRectsFromDisplayList,H as createRustMeasureSource,T as getRustTextEngine,A as resolveHeaderFooter};
|
|
@@ -1,60 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AnchoredObjectPositionInput,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export { isFloatingWrapType, isWrapNone, wrapsAroundText } from '../../docx/wrapTypes.mjs';
|
|
7
|
-
import '../../content-sSHuWw49.mjs';
|
|
8
|
-
import '../../formatting-DoL7KBSL.mjs';
|
|
1
|
+
import { L as LayoutBlock, B as BlockExtent } from '../../types-DMkDbvEu.mjs';
|
|
2
|
+
export { A as AnchoredObjectPositionInput, d as BlockId, e as BorderStyle, C as CellBorderSpec, f as CellBorders, g as ChartBlock, h as ChartExtent, i as ChartFragment, j as ColumnBreakBlock, k as ColumnBreakExtent, l as ColumnLayout, D as DEFAULT_TEXTBOX_MARGINS, m as DEFAULT_TEXTBOX_WIDTH, n as DocumentPosition, o as FieldRun, p as FloatingTablePosition, F as FootnoteContent, q as FootnoteRenderItem, r as Fragment, s as FragmentBase, H as HeaderFooterContent, t as HeaderFooterContentHeights, u as HeaderFooterLayout, v as HitTestResult, w as HyperlinkInfo, I as ImageBlock, x as ImageExtent, y as ImageFragment, z as ImageRun, E as ImageRunPosition, G as InlineSdtWidget, a as Layout, b as LayoutOptions, J as LineBreakRun, K as ListNumPr, N as NoteAreaContract, M as NoteLayoutItem, O as NoteSettingsContract, P as Page, Q as PageBorderContract, S as PageBreakBlock, T as PageBreakExtent, U as PageGeometry, V as PageHeaderFooterRefs, W as PageMargins, X as PageNumberingContract, Y as ParagraphAttrs, Z as ParagraphBlock, _ as ParagraphBorders, $ as ParagraphExtent, a0 as ParagraphFragment, a1 as ParagraphIndent, a2 as ParagraphSpacing, R as ResolvedLine, c as ResolvedSegment, a3 as Run, a4 as RunFontSlots, a5 as RunFormatting, a6 as RunLanguageSlots, a7 as SdtGroup, a8 as SectionBreakBlock, a9 as SectionBreakExtent, aa as ShapeBlock, ab as ShapeBlockFill, ac as ShapeBlockStroke, ad as ShapeBlockTransform, ae as ShapeExtent, af as ShapeFragment, ag as TabAlignment, ah as TabRun, ai as TabStop, aj as TableBlock, ak as TableCell, al as TableCellExtent, am as TableExtent, an as TableFragment, ao as TableRow, ap as TableRowExtent, aq as TextBoxBlock, ar as TextBoxExtent, as as TextBoxFragment, at as TextRun, au as TypesetBidiSlice, av as TypesetClusterAdvance, aw as TypesetRow, ax as TypesetRowSegment, ay as TypesetRunAdvance, az as WrapTextDirection, aA as assertExhaustiveLayoutBlock, aB as isTextWrappingFloatingImageRun, aC as pageGeometryFromPage, aD as resolveAnchoredObjectVerticalTop } from '../../types-DMkDbvEu.mjs';
|
|
3
|
+
import '../../content-DLFHRQav.mjs';
|
|
4
|
+
import '../../formatting-D1EPSaJP.mjs';
|
|
5
|
+
import '../../docx/wrapTypes.mjs';
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
* Range semantics: `[pmStart, pmEnd)` — half-open, matching ProseMirror's
|
|
15
|
-
* `pos + nodeSize` convention. Boundary positions belong to the next fragment,
|
|
16
|
-
* so when a fragment ends at the same position the next one starts, the next
|
|
17
|
-
* fragment wins (avoids returning the previous page for the start of the
|
|
18
|
-
* next paragraph).
|
|
19
|
-
*/
|
|
20
|
-
declare function findPageIndexContainingPmPos(layout: Layout, pmPos: number): number | null;
|
|
7
|
+
interface MeasuredBlock {
|
|
8
|
+
block: LayoutBlock;
|
|
9
|
+
measure: BlockExtent;
|
|
10
|
+
}
|
|
21
11
|
|
|
22
|
-
|
|
23
|
-
* Subset of {@link TextBoxBlock} needed to classify how a text box flows
|
|
24
|
-
* relative to surrounding content. Kept narrow so callers (measure, layout,
|
|
25
|
-
* paint) can pass partial views without rebuilding the full block.
|
|
26
|
-
*
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
29
|
-
type TextBoxFlowAttrs = Pick<TextBoxBlock, 'displayMode' | 'wrapType'>;
|
|
30
|
-
/**
|
|
31
|
-
* True when a text box participates in float layout — either via the
|
|
32
|
-
* `float` display mode (CSS-style) or via an OOXML `wrapType` that
|
|
33
|
-
* positions the box outside paragraph flow (`square`, `tight`, `through`,
|
|
34
|
-
* `behind`, `inFront`, `topAndBottom`).
|
|
35
|
-
*
|
|
36
|
-
* `topAndBottom` is positioned (it honours its OOXML anchor, e.g. a banner
|
|
37
|
-
* pinned to the top of the page) even though text never wraps beside it —
|
|
38
|
-
* see {@link floatingTextBoxReservesBand}.
|
|
39
|
-
*
|
|
40
|
-
* @public
|
|
41
|
-
*/
|
|
42
|
-
declare function isFloatingTextBoxBlock(block: TextBoxFlowAttrs): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* True when a floating text box reserves a full-width vertical band rather
|
|
45
|
-
* than a side exclusion. `topAndBottom` boxes break the text above and below
|
|
46
|
-
* the box (no text beside it), so surrounding lines flow past the band.
|
|
47
|
-
*
|
|
48
|
-
* @public
|
|
49
|
-
*/
|
|
50
|
-
declare function floatingTextBoxReservesBand(block: TextBoxFlowAttrs): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* True when a floating text box reserves an exclusion zone that narrows
|
|
53
|
-
* surrounding text lines. `wrapNone` (`behind` / `inFront`) and
|
|
54
|
-
* `topAndBottom` are floats that don't wrap text on their sides.
|
|
55
|
-
*
|
|
56
|
-
* @public
|
|
57
|
-
*/
|
|
58
|
-
declare function floatingTextBoxWrapsText(block: TextBoxFlowAttrs): boolean;
|
|
59
|
-
|
|
60
|
-
export { Layout, TextBoxBlock, type TextBoxFlowAttrs, findPageIndexContainingPmPos, floatingTextBoxReservesBand, floatingTextBoxWrapsText, isFloatingTextBoxBlock };
|
|
12
|
+
export { BlockExtent, LayoutBlock, type MeasuredBlock };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import {b as b$2,c as c$1}from'../../chunk-OBQGPMPQ.mjs';import {b as b$1}from'../../chunk-3UBMCDME.mjs';import'../../chunk-TTRUPDAB.mjs';var c={top:4,bottom:4,left:7,right:7},h=200;function y(e,r){let o=e.kind??"<unknown>";throw new Error(`${r}: unhandled LayoutBlock kind "${o}". Add the case alongside the other LayoutBlock switches (see types.ts).`)}function x(e){return {pageWidth:e.size.w,pageHeight:e.size.h,marginLeft:e.margins.left,marginTop:e.margins.top,contentWidth:e.size.w-e.margins.left-e.margins.right,contentHeight:e.size.h-e.margins.top-e.margins.bottom}}function f(e,r,o){return l(e,r,o)}function l(e,r,o){let n=e.position?.vertical;if(!n)return r;let t=b(n.relativeTo,r,o);return n.align==="top"?t.base:n.align==="center"?t.size?t.base+(t.size-e.height)/2:r:n.align==="bottom"?t.size?t.base+t.size-e.height:r:n.posOffset!==void 0?t.base+b$1(n.posOffset):n.relativeTo==="paragraph"||n.relativeTo==="line"?r:t.base}function b(e,r,o){let n=o?.pageHeight??0,t=o?.marginTop??0,a=o?.contentHeight??0;switch(e){case "paragraph":case "line":return {base:r,size:0};case "page":return {base:-t,size:n};case "topMargin":return {base:-t,size:t};case "bottomMargin":return {base:a,size:t};default:return {base:0,size:a}}}function k(e){return b$2(e.wrapType)||e.wrapType==="topAndBottom"?false:c$1(e.wrapType)?true:e.displayMode==="float"&&e.cssFloat!=="none"}export{c as DEFAULT_TEXTBOX_MARGINS,h as DEFAULT_TEXTBOX_WIDTH,y as assertExhaustiveLayoutBlock,k as isTextWrappingFloatingImageRun,x as pageGeometryFromPage,f as resolveAnchoredObjectVerticalTop};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { b as DisplayPage, c as DisplayPrimitive,
|
|
2
|
-
export { d as DecodedFrameDelta, e as DecorationPrimitive, f as DisplayBounds, g as DisplayListBuildInputs,
|
|
3
|
-
import { a as DisplayListQueries, b as DisplayListRegionHit, D as DisplayListRect } from '../../displayListQueries-
|
|
4
|
-
export { c as DisplayListHitRegion, d as DisplayListImageGeometry, e as DisplayListImageRegion, f as DisplayListParagraphGeometry, g as DisplayListQuerySourceState, h as DisplayListVisualLine, L as LocatedImagePrimitive, R as ResidentDisplayListQueryEngine, i as captureInlinePositionEmuFromDisplayList, j as createDisplayListQueries, k as findImagePrimitiveAtPoint, l as findImagePrimitiveByDocPos } from '../../displayListQueries-
|
|
5
|
-
import { YrsLoc, YrsSession, YrsRevisionInfo } from '../../
|
|
1
|
+
import { b as DisplayPage, c as DisplayPrimitive, a as DisplayList, G as GlyphRunPrimitive, L as LinePrimitive, T as TextRunPrimitive } from '../../rustDisplayList-CX78djsZ.mjs';
|
|
2
|
+
export { d as DecodedFrameDelta, e as DecorationPrimitive, f as DisplayBounds, g as DisplayListBuildInputs, D as DisplayListHeadersFooters, h as DisplayListHfVariant, i as DisplayListPictureWatermark, j as DisplayListTextWatermark, k as DisplayListWatermark, l as DocAttrs, F as FRAME_DELTA_HEADER_BYTES, m as FRAME_DELTA_PAGE_OP_BYTES, n as FRAME_DELTA_VERSION, o as FrameDeltaError, p as FrameDeltaErrorCode, q as FramePageOperation, H as HfRegion, I as ImagePrimitive, P as PositionedGlyph, r as RectPrimitive, s as RetainedFrame, t as RetainedFramePage, u as RustDisplayFrameResult, v as RustDisplayListEngine, R as RustDisplayListQueryEngine, w as RustDisplayListSourceError, x as RustDisplayListSourceErrorStage, y as TableCellRef, z as applyFrameDelta, A as applyFrameDeltaOwned, B as buildRustDisplayFrame, C as buildRustDisplayList, E as decodeFrameDelta, J as encodeDisplayListFrameExtras, K as loadRustDisplayListQueryEngine } from '../../rustDisplayList-CX78djsZ.mjs';
|
|
3
|
+
import { a as DisplayListQueries, b as DisplayListRegionHit, D as DisplayListRect } from '../../displayListQueries-UGc_XBUv.mjs';
|
|
4
|
+
export { c as DisplayListHitRegion, d as DisplayListImageGeometry, e as DisplayListImageRegion, f as DisplayListParagraphGeometry, g as DisplayListQuerySourceState, h as DisplayListVisualLine, L as LocatedImagePrimitive, R as ResidentDisplayListQueryEngine, i as captureInlinePositionEmuFromDisplayList, j as createDisplayListQueries, k as findImagePrimitiveAtPoint, l as findImagePrimitiveByDocPos } from '../../displayListQueries-UGc_XBUv.mjs';
|
|
5
|
+
import { m as YrsLoc, Y as YrsSession, n as YrsRevisionInfo } from '../../index-Bwxm3oiC.mjs';
|
|
6
6
|
import { TrackedChangeEntry } from '../../utils/comments.mjs';
|
|
7
|
-
import '../../types-
|
|
8
|
-
import '../../content-
|
|
9
|
-
import '../../formatting-
|
|
7
|
+
import '../../types-DMkDbvEu.mjs';
|
|
8
|
+
import '../../content-DLFHRQav.mjs';
|
|
9
|
+
import '../../formatting-D1EPSaJP.mjs';
|
|
10
10
|
import '../../docx/wrapTypes.mjs';
|
|
11
|
-
import '
|
|
11
|
+
import '../pagination/index.mjs';
|
|
12
12
|
import '../../types/document.mjs';
|
|
13
|
-
import '../../styles-
|
|
14
|
-
import '../../settingsParser-CcGvtmCK.mjs';
|
|
13
|
+
import '../../styles-Dn_o3Vo5.mjs';
|
|
15
14
|
|
|
16
15
|
/** a cached glyph: its outline path (font units) plus the font's units-per-em. */
|
|
17
16
|
interface GlyphOutline {
|