@silurus/ooxml 0.81.0 → 0.82.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/README.md +4 -8
- package/dist/assets/render-worker-Cy-QsDge.js +10 -0
- package/dist/assets/{render-worker-DtU8oQZ7.js → render-worker-Dw_wQRIh.js} +1 -1
- package/dist/assets/{render-worker-C2ACcLes.js → render-worker-aHayzR7v.js} +4 -4
- package/dist/{canvas-viewer-mechanics-CqxKRGCp.js → canvas-viewer-mechanics-CS_qbr6T.js} +1 -1
- package/dist/chart-ex.mjs +4 -4
- package/dist/comment-occurrence-C34fWs_F.js +6 -0
- package/dist/comment-ui-runtime-C1RV_3iu.js +112 -0
- package/dist/comment-ui-runtime-DTGN3Vyy.js +2 -0
- package/dist/comment-ui-runtime-DgCZpPR0.js +171 -0
- package/dist/comments-Cf9W7r3M.js +241 -0
- package/dist/{document-pull-client-Ux4a_ax8.js → document-pull-client-B1WOjA0z.js} +2206 -2193
- package/dist/{docx-SEyQ4gS-.js → docx-HoZXZUPA.js} +674 -249
- package/dist/docx.mjs +6 -5
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/dom-interaction-boundary-C8F6HO5x.js +119 -0
- package/dist/highlight-rect-MaCt0om0.js +13 -0
- package/dist/index.mjs +3 -3
- package/dist/{line-distribute-BBGvvwLt.js → line-distribute-iXsUCIH-.js} +2 -2
- package/dist/{line-metrics-Baz31mML.js → line-metrics-B3syvDn2.js} +52 -52
- package/dist/math.mjs +2 -2
- package/dist/node.mjs +10 -10
- package/dist/{plot-area-frame-Dg1VIpUU.js → plot-area-frame-DHV02PJU.js} +591 -590
- package/dist/{pptx-5lQrMvMR.js → pptx-DEUP4Yq5.js} +537 -243
- package/dist/pptx.mjs +6 -6
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/read-only-comment-decoration-DcFevX_Q.js +96 -0
- package/dist/read-only-comment-margin-DrUX-YrP.js +189 -0
- package/dist/region-map.mjs +2 -2
- package/dist/{render-DEHjijQD.js → render-BC8p7vZQ.js} +1 -1
- package/dist/{render-worker-host-B1nbV_k7.js → render-worker-host-BNnXCtAu.js} +1 -1
- package/dist/{render-worker-host-Bze5M6k5.js → render-worker-host-CmPBviYJ.js} +1 -1
- package/dist/{render-worker-host-Dg_74V64.js → render-worker-host-DhnkTyjj.js} +1 -1
- package/dist/{renderer-DuopJE1K.js → renderer-CYr9YTXM.js} +436 -435
- package/dist/{resource-measurement-DRLp4nFt.js → resource-measurement-CsW4_eYt.js} +2 -2
- package/dist/{session-CNVc3VJ4.js → session-Da7LEQUB.js} +3 -3
- package/dist/{slide-pull-client-CzutXnGc.js → slide-pull-client-Bg9DusLX.js} +413 -300
- package/dist/source-key-BklvnEyQ.js +42 -0
- package/dist/{three-d-BYiWCNlz.js → three-d-7MaVzQuZ.js} +48 -47
- package/dist/three-d.mjs +324 -323
- package/dist/types/chart-ex.d.ts +2 -2
- package/dist/types/docx.d.ts +183 -19
- package/dist/types/index.d.ts +343 -26
- package/dist/types/math.d.ts +1 -1
- package/dist/types/node.d.ts +428 -348
- package/dist/types/pptx.d.ts +132 -11
- package/dist/types/region-map.d.ts +2 -2
- package/dist/types/three-d.d.ts +2 -2
- package/dist/types/xlsx.d.ts +78 -10
- package/dist/units-BzZ0gAxs.js +4 -0
- package/dist/{worksheet-pull-client-Cxj3Ej0s.js → worksheet-pull-client-CYtwXP5D.js} +3 -3
- package/dist/{xlsx-Bl3TIEVu.js → xlsx-DMWeXT-c.js} +429 -218
- package/dist/xlsx.mjs +6 -6
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +2 -1
- package/dist/assets/render-worker-Cx5uR77k.js +0 -10
- package/dist/highlight-rect-BqcZMHUE.js +0 -48
- /package/dist/{mathjax-DJa-Q93p.js → mathjax-DwIrafQ6.js} +0 -0
- /package/dist/{renderer-module-contract-0bO_5SC0.js → renderer-module-contract-DLbb7zY0.js} +0 -0
- /package/dist/{transfer-D0U6Uhn4.js → transfer-R6NjgBKD.js} +0 -0
- /package/dist/{visible-index-DbDuGMCE.js → visible-index-BFE3PWiY.js} +0 -0
package/dist/types/chart-ex.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-qJPl2r8m.d.ts
|
|
2
2
|
interface Duotone {
|
|
3
3
|
clr1: string;
|
|
4
4
|
clr2: string;
|
|
@@ -938,7 +938,7 @@ interface ChartRect {
|
|
|
938
938
|
h: number;
|
|
939
939
|
}
|
|
940
940
|
//#endregion
|
|
941
|
-
//#region dist/.types-work/chart-ex-contract-
|
|
941
|
+
//#region dist/.types-work/chart-ex-contract-Ba0xG5gE.d.ts
|
|
942
942
|
interface ChartExRenderer {
|
|
943
943
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
944
944
|
}
|
package/dist/types/docx.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region dist/.types-work/chart-
|
|
1
|
+
//#region dist/.types-work/chart-qJPl2r8m.d.ts
|
|
2
2
|
type MathStyle = 'roman' | 'italic' | 'bold' | 'boldItalic';
|
|
3
3
|
interface MathRun {
|
|
4
4
|
kind: 'run';
|
|
@@ -1042,12 +1042,12 @@ interface ChartRect {
|
|
|
1042
1042
|
h: number;
|
|
1043
1043
|
}
|
|
1044
1044
|
//#endregion
|
|
1045
|
-
//#region dist/.types-work/chart-ex-contract-
|
|
1045
|
+
//#region dist/.types-work/chart-ex-contract-Ba0xG5gE.d.ts
|
|
1046
1046
|
interface ChartExRenderer {
|
|
1047
1047
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1048
1048
|
}
|
|
1049
1049
|
//#endregion
|
|
1050
|
-
//#region dist/.types-work/mathjax-
|
|
1050
|
+
//#region dist/.types-work/mathjax-DwKoKmdb.d.ts
|
|
1051
1051
|
interface MathSvg {
|
|
1052
1052
|
svg: string;
|
|
1053
1053
|
widthEm: number;
|
|
@@ -1059,17 +1059,17 @@ interface MathRenderer {
|
|
|
1059
1059
|
mathMLToSvg(mathml: string): Promise<MathSvg>;
|
|
1060
1060
|
}
|
|
1061
1061
|
//#endregion
|
|
1062
|
-
//#region dist/.types-work/three-d-contract-
|
|
1062
|
+
//#region dist/.types-work/three-d-contract-D5bEzjMw.d.ts
|
|
1063
1063
|
interface ChartThreeDRenderer {
|
|
1064
1064
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1065
1065
|
}
|
|
1066
1066
|
//#endregion
|
|
1067
|
-
//#region dist/.types-work/region-map-contract-
|
|
1067
|
+
//#region dist/.types-work/region-map-contract-BFIR10oz.d.ts
|
|
1068
1068
|
interface ChartRegionMapRenderer {
|
|
1069
1069
|
render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
|
|
1070
1070
|
}
|
|
1071
1071
|
//#endregion
|
|
1072
|
-
//#region dist/.types-work/hyperlink-
|
|
1072
|
+
//#region dist/.types-work/hyperlink-CZoV-4B8.d.ts
|
|
1073
1073
|
type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
|
|
1074
1074
|
type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
|
|
1075
1075
|
declare class OoxmlError extends Error {
|
|
@@ -1175,7 +1175,7 @@ type HyperlinkTarget = {
|
|
|
1175
1175
|
};
|
|
1176
1176
|
declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
|
|
1177
1177
|
//#endregion
|
|
1178
|
-
//#region dist/.types-work/find-highlight-
|
|
1178
|
+
//#region dist/.types-work/find-highlight-DdGGQ_H7.d.ts
|
|
1179
1179
|
interface TextSelectionContextOptions {
|
|
1180
1180
|
readonly maxTextCharacters?: number;
|
|
1181
1181
|
readonly maxRunLocators?: number;
|
|
@@ -1184,6 +1184,28 @@ interface ViewerContextMenuEvent<TContext> {
|
|
|
1184
1184
|
readonly originalEvent: MouseEvent;
|
|
1185
1185
|
getContext(): Promise<TContext | null>;
|
|
1186
1186
|
}
|
|
1187
|
+
interface ViewerCommentsOptions {
|
|
1188
|
+
readonly includeResolved?: boolean;
|
|
1189
|
+
}
|
|
1190
|
+
type ViewerCommentConnectorRoute = 'bezier' | 'orthogonal';
|
|
1191
|
+
type ViewerCommentConnectorStroke = 'solid' | 'dashed';
|
|
1192
|
+
interface ViewerCommentConnectorOptions {
|
|
1193
|
+
readonly route?: ViewerCommentConnectorRoute;
|
|
1194
|
+
readonly stroke?: ViewerCommentConnectorStroke;
|
|
1195
|
+
readonly color?: string;
|
|
1196
|
+
readonly activeColor?: string;
|
|
1197
|
+
}
|
|
1198
|
+
interface ViewerCommentMessageContext {
|
|
1199
|
+
readonly id?: string;
|
|
1200
|
+
readonly author?: string;
|
|
1201
|
+
readonly date?: string;
|
|
1202
|
+
readonly text: string;
|
|
1203
|
+
readonly status?: 'active' | 'resolved' | 'closed';
|
|
1204
|
+
}
|
|
1205
|
+
interface ViewerCommentThreadContext {
|
|
1206
|
+
readonly root: ViewerCommentMessageContext;
|
|
1207
|
+
readonly replies: readonly ViewerCommentMessageContext[];
|
|
1208
|
+
}
|
|
1187
1209
|
interface AutoResizeOptions {
|
|
1188
1210
|
pauseWhenHidden?: boolean;
|
|
1189
1211
|
}
|
|
@@ -1214,7 +1236,7 @@ interface FindHighlightColors {
|
|
|
1214
1236
|
active?: string;
|
|
1215
1237
|
}
|
|
1216
1238
|
//#endregion
|
|
1217
|
-
//#region dist/.types-work/
|
|
1239
|
+
//#region dist/.types-work/types-HfeSaZtq.d.ts
|
|
1218
1240
|
interface DocxDocumentModel {
|
|
1219
1241
|
section: SectionProps;
|
|
1220
1242
|
body: BodyElement[];
|
|
@@ -1250,7 +1272,8 @@ interface DocSettings {
|
|
|
1250
1272
|
adjustLineHeightInTable?: boolean;
|
|
1251
1273
|
}
|
|
1252
1274
|
interface DocRevision {
|
|
1253
|
-
kind: 'insertion' | 'deletion' | string;
|
|
1275
|
+
kind: 'insertion' | 'deletion' | 'moveFrom' | 'moveTo' | string;
|
|
1276
|
+
id?: string;
|
|
1254
1277
|
author?: string;
|
|
1255
1278
|
date?: string;
|
|
1256
1279
|
text: string;
|
|
@@ -1261,6 +1284,14 @@ interface DocComment {
|
|
|
1261
1284
|
initials?: string;
|
|
1262
1285
|
date?: string;
|
|
1263
1286
|
text: string;
|
|
1287
|
+
parentId?: string;
|
|
1288
|
+
resolved?: boolean;
|
|
1289
|
+
paragraphs?: string[];
|
|
1290
|
+
}
|
|
1291
|
+
interface DocxCommentMark {
|
|
1292
|
+
id: string;
|
|
1293
|
+
kind: 'rangeStart' | 'rangeEnd' | 'reference' | string;
|
|
1294
|
+
runIndex: number;
|
|
1264
1295
|
}
|
|
1265
1296
|
interface DocNote {
|
|
1266
1297
|
id: string;
|
|
@@ -1377,6 +1408,7 @@ interface DocParagraph {
|
|
|
1377
1408
|
tabStops: TabStop[];
|
|
1378
1409
|
runs: DocRun[];
|
|
1379
1410
|
bookmarks?: string[];
|
|
1411
|
+
commentMarks?: DocxCommentMark[];
|
|
1380
1412
|
shading?: string | null;
|
|
1381
1413
|
pageBreakBefore?: boolean;
|
|
1382
1414
|
contextualSpacing?: boolean;
|
|
@@ -1459,7 +1491,7 @@ interface NumberingInfo {
|
|
|
1459
1491
|
picBulletWidthPt?: number;
|
|
1460
1492
|
picBulletHeightPt?: number;
|
|
1461
1493
|
}
|
|
1462
|
-
type
|
|
1494
|
+
type DocRunContent = ({
|
|
1463
1495
|
type: 'text';
|
|
1464
1496
|
} & DocxTextRun) | ({
|
|
1465
1497
|
type: 'anchorHost';
|
|
@@ -1483,6 +1515,9 @@ type DocRun = ({
|
|
|
1483
1515
|
} | ({
|
|
1484
1516
|
type: 'ptab';
|
|
1485
1517
|
} & PTabRun);
|
|
1518
|
+
type DocRun = DocRunContent & {
|
|
1519
|
+
revision?: RunRevision;
|
|
1520
|
+
};
|
|
1486
1521
|
interface ChartRun {
|
|
1487
1522
|
chart: ChartModel;
|
|
1488
1523
|
widthPt: number;
|
|
@@ -1785,7 +1820,8 @@ interface NoteRef {
|
|
|
1785
1820
|
id: string;
|
|
1786
1821
|
}
|
|
1787
1822
|
interface RunRevision {
|
|
1788
|
-
kind: 'insertion' | 'deletion' | string;
|
|
1823
|
+
kind: 'insertion' | 'deletion' | 'moveFrom' | 'moveTo' | string;
|
|
1824
|
+
id?: string;
|
|
1789
1825
|
author?: string;
|
|
1790
1826
|
date?: string;
|
|
1791
1827
|
}
|
|
@@ -1909,18 +1945,27 @@ interface CellBorders {
|
|
|
1909
1945
|
insideH: BorderSpec | null;
|
|
1910
1946
|
insideV: BorderSpec | null;
|
|
1911
1947
|
}
|
|
1948
|
+
interface DocxStorySource {
|
|
1949
|
+
story: 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'textbox';
|
|
1950
|
+
storyInstance: string;
|
|
1951
|
+
path: readonly number[];
|
|
1952
|
+
}
|
|
1912
1953
|
interface DocxTextRunInfo {
|
|
1913
|
-
source?: Readonly<
|
|
1914
|
-
story: 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'textbox';
|
|
1915
|
-
storyInstance: string;
|
|
1916
|
-
path: readonly number[];
|
|
1917
|
-
}>;
|
|
1954
|
+
source?: Readonly<DocxStorySource>;
|
|
1918
1955
|
paragraphId?: string;
|
|
1956
|
+
sourceRunIndex?: number;
|
|
1957
|
+
direction?: 'ltr' | 'rtl';
|
|
1919
1958
|
text: string;
|
|
1920
1959
|
x: number;
|
|
1921
1960
|
y: number;
|
|
1922
1961
|
w: number;
|
|
1923
1962
|
h: number;
|
|
1963
|
+
highlightBounds?: Readonly<{
|
|
1964
|
+
x: number;
|
|
1965
|
+
y: number;
|
|
1966
|
+
width: number;
|
|
1967
|
+
height: number;
|
|
1968
|
+
}>;
|
|
1924
1969
|
fontSize: number;
|
|
1925
1970
|
font: string;
|
|
1926
1971
|
letterSpacingPx?: number;
|
|
@@ -1935,6 +1980,48 @@ interface RenderPageOptions {
|
|
|
1935
1980
|
onTextRun?: (run: DocxTextRunInfo) => void;
|
|
1936
1981
|
currentDate?: Date | number;
|
|
1937
1982
|
}
|
|
1983
|
+
//#endregion
|
|
1984
|
+
//#region dist/.types-work/docx-CDchTe6F.d.ts
|
|
1985
|
+
interface CommentAnchorRange {
|
|
1986
|
+
readonly commentId: string;
|
|
1987
|
+
readonly source: Readonly<DocxStorySource>;
|
|
1988
|
+
readonly startRunIndex: number;
|
|
1989
|
+
readonly endRunIndex: number;
|
|
1990
|
+
readonly reference: CommentAnchorPoint;
|
|
1991
|
+
readonly geometryFallback?: CommentAnchorGeometryFallback;
|
|
1992
|
+
}
|
|
1993
|
+
interface CommentAnchorPoint {
|
|
1994
|
+
readonly source: Readonly<DocxStorySource>;
|
|
1995
|
+
readonly runIndex: number;
|
|
1996
|
+
readonly affinity: 'following' | 'preceding';
|
|
1997
|
+
}
|
|
1998
|
+
interface CommentAnchorGeometryFallback {
|
|
1999
|
+
readonly source: Readonly<DocxStorySource>;
|
|
2000
|
+
readonly sourceRunIndex: number;
|
|
2001
|
+
}
|
|
2002
|
+
type DocxCommentAnchorKind = 'range' | 'point' | 'fallback';
|
|
2003
|
+
interface DocxCommentHighlightRect {
|
|
2004
|
+
readonly x: number;
|
|
2005
|
+
readonly y: number;
|
|
2006
|
+
readonly width: number;
|
|
2007
|
+
readonly height: number;
|
|
2008
|
+
readonly transform?: string;
|
|
2009
|
+
}
|
|
2010
|
+
interface ResolvedDocxCommentAnchor {
|
|
2011
|
+
readonly anchor: Readonly<CommentAnchorRange>;
|
|
2012
|
+
readonly kind: DocxCommentAnchorKind;
|
|
2013
|
+
readonly rects: readonly Readonly<DocxCommentHighlightRect>[];
|
|
2014
|
+
}
|
|
2015
|
+
interface ResolvedDocxCommentThread {
|
|
2016
|
+
readonly root: Readonly<DocComment>;
|
|
2017
|
+
readonly replies: readonly Readonly<DocComment>[];
|
|
2018
|
+
readonly anchors: readonly Readonly<ResolvedDocxCommentAnchor>[];
|
|
2019
|
+
}
|
|
2020
|
+
interface ResolveDocxCommentThreadsOptions {
|
|
2021
|
+
readonly includeResolved?: boolean;
|
|
2022
|
+
}
|
|
2023
|
+
declare function resolveCommentAnchorRuns(anchor: Readonly<CommentAnchorRange>, runs: readonly Readonly<DocxTextRunInfo>[]): readonly Readonly<DocxTextRunInfo>[];
|
|
2024
|
+
declare function resolveDocxCommentThreads(comments: readonly Readonly<DocComment>[], anchors: readonly Readonly<CommentAnchorRange>[], runs: readonly Readonly<DocxTextRunInfo>[], options?: ResolveDocxCommentThreadsOptions): readonly Readonly<ResolvedDocxCommentThread>[];
|
|
1938
2025
|
type DocxSelectionContextOptions = TextSelectionContextOptions;
|
|
1939
2026
|
interface DocxSelectionSourceLocator {
|
|
1940
2027
|
readonly story: 'body' | 'header' | 'footer' | 'footnote' | 'endnote' | 'textbox';
|
|
@@ -1984,17 +2071,42 @@ interface DocxElementContext {
|
|
|
1984
2071
|
readonly textCharacters: number;
|
|
1985
2072
|
readonly maxTextCharacters: number;
|
|
1986
2073
|
}
|
|
1987
|
-
|
|
2074
|
+
interface DocxCommentSelectionContext {
|
|
2075
|
+
readonly format: 'docx';
|
|
2076
|
+
readonly kind: 'comment';
|
|
2077
|
+
readonly pageIndex: number;
|
|
2078
|
+
readonly commentId: string;
|
|
2079
|
+
readonly source?: DocxSelectionSourceLocator;
|
|
2080
|
+
readonly thread: ViewerCommentThreadContext;
|
|
2081
|
+
readonly truncated: boolean;
|
|
2082
|
+
readonly truncationReasons: readonly ('text')[];
|
|
2083
|
+
readonly textCharacters: number;
|
|
2084
|
+
readonly maxTextCharacters: number;
|
|
2085
|
+
}
|
|
2086
|
+
type DocxSelectionContext = DocxTextSelectionContext | DocxElementContext | DocxCommentSelectionContext;
|
|
1988
2087
|
declare function readDocxTextSelectionContext(root: HTMLElement, selection: Selection | null, options?: DocxSelectionContextOptions): DocxTextSelectionContext | null;
|
|
1989
2088
|
interface DocxElementContextOptions {
|
|
1990
2089
|
readonly maxTextCharacters?: number;
|
|
1991
2090
|
readonly currentDate?: Date | number;
|
|
1992
2091
|
}
|
|
2092
|
+
interface RevisionAnchorRange {
|
|
2093
|
+
readonly revisionIndex: number;
|
|
2094
|
+
readonly source: Readonly<DocxStorySource>;
|
|
2095
|
+
readonly startRunIndex: number;
|
|
2096
|
+
readonly endRunIndex: number;
|
|
2097
|
+
readonly geometryFallback?: RevisionAnchorGeometryFallback;
|
|
2098
|
+
}
|
|
2099
|
+
interface RevisionAnchorGeometryFallback {
|
|
2100
|
+
readonly source: Readonly<DocxStorySource>;
|
|
2101
|
+
readonly sourceRunIndex: number;
|
|
2102
|
+
}
|
|
2103
|
+
declare function resolveRevisionAnchorRuns(anchor: Readonly<RevisionAnchorRange>, runs: readonly Readonly<DocxTextRunInfo>[]): readonly Readonly<DocxTextRunInfo>[];
|
|
1993
2104
|
interface LoadOptions extends LoadOptions$1 {
|
|
1994
2105
|
math?: MathRenderer;
|
|
1995
2106
|
mode?: 'main' | 'worker';
|
|
1996
2107
|
}
|
|
1997
2108
|
type CollectPageRunsOptions = Pick<RenderPageOptions, 'width' | 'currentDate'>;
|
|
2109
|
+
interface DocxPageCommentThreadsOptions extends CollectPageRunsOptions, ResolveDocxCommentThreadsOptions {}
|
|
1998
2110
|
type RenderPageToBitmapOptions = Omit<RenderPageOptions, 'onTextRun'> & {
|
|
1999
2111
|
onTextRun?: (run: DocxTextRunInfo) => void;
|
|
2000
2112
|
};
|
|
@@ -2003,7 +2115,11 @@ declare class DocxDocument {
|
|
|
2003
2115
|
private _document;
|
|
2004
2116
|
private _source;
|
|
2005
2117
|
private _meta;
|
|
2118
|
+
private _review;
|
|
2006
2119
|
private _bookmarkPages;
|
|
2120
|
+
private _commentAnchorRanges;
|
|
2121
|
+
private _revisionAnchorRanges;
|
|
2122
|
+
private _reviewTextRunSourceIndex;
|
|
2007
2123
|
private _mode;
|
|
2008
2124
|
private _threeD;
|
|
2009
2125
|
private _regionMap;
|
|
@@ -2027,7 +2143,11 @@ declare class DocxDocument {
|
|
|
2027
2143
|
get pageCount(): number;
|
|
2028
2144
|
get mode(): 'main' | 'worker';
|
|
2029
2145
|
get document(): DocxDocumentModel;
|
|
2030
|
-
get comments(): DocComment[];
|
|
2146
|
+
get comments(): readonly Readonly<DocComment>[];
|
|
2147
|
+
get revisions(): readonly Readonly<DocRevision>[];
|
|
2148
|
+
commentAnchorRanges(): readonly CommentAnchorRange[];
|
|
2149
|
+
revisionAnchorRanges(): readonly RevisionAnchorRange[];
|
|
2150
|
+
private _reviewSnapshot;
|
|
2031
2151
|
get footnotes(): DocNote[];
|
|
2032
2152
|
get endnotes(): DocNote[];
|
|
2033
2153
|
private _getLayout;
|
|
@@ -2040,6 +2160,7 @@ declare class DocxDocument {
|
|
|
2040
2160
|
renderPage(target: HTMLCanvasElement | OffscreenCanvas, pageIndex: number, opts?: RenderPageOptions): Promise<void>;
|
|
2041
2161
|
renderPageToBitmap(pageIndex: number, opts?: RenderPageToBitmapOptions): Promise<ImageBitmap>;
|
|
2042
2162
|
collectPageRuns(pageIndex: number, opts?: CollectPageRunsOptions): Promise<DocxTextRunInfo[]>;
|
|
2163
|
+
getCommentThreads(pageIndex: number, options?: DocxPageCommentThreadsOptions): Promise<readonly Readonly<ResolvedDocxCommentThread>[]>;
|
|
2043
2164
|
getElementContextAt(pageIndex: number, point: DocxPagePoint, opts?: DocxElementContextOptions): Promise<DocxElementContext | null>;
|
|
2044
2165
|
}
|
|
2045
2166
|
interface DocxMatchLocation {
|
|
@@ -2133,6 +2254,12 @@ declare class DocxViewer implements ZoomableViewer {
|
|
|
2133
2254
|
private _buildTextLayer;
|
|
2134
2255
|
private _hyperlinkHandler;
|
|
2135
2256
|
}
|
|
2257
|
+
interface DocxCommentsOptions extends ViewerCommentsOptions {
|
|
2258
|
+
readonly cards?: boolean;
|
|
2259
|
+
readonly side?: 'auto' | 'left' | 'right';
|
|
2260
|
+
readonly markers?: boolean;
|
|
2261
|
+
readonly connectors?: ViewerCommentConnectorOptions;
|
|
2262
|
+
}
|
|
2136
2263
|
interface DocxScrollViewerOptions extends Omit<RenderPageOptions, 'onTextRun'>, LoadOptions {
|
|
2137
2264
|
width?: number;
|
|
2138
2265
|
gap?: number;
|
|
@@ -2142,6 +2269,7 @@ interface DocxScrollViewerOptions extends Omit<RenderPageOptions, 'onTextRun'>,
|
|
|
2142
2269
|
paddingRight?: number;
|
|
2143
2270
|
overscan?: number;
|
|
2144
2271
|
enableTextSelection?: boolean;
|
|
2272
|
+
comments?: boolean | DocxCommentsOptions;
|
|
2145
2273
|
enableElementSelection?: boolean;
|
|
2146
2274
|
onSelectionContextChange?: (context: DocxSelectionContext | null) => void;
|
|
2147
2275
|
onContextMenu?: (event: ViewerContextMenuEvent<DocxSelectionContext>) => void;
|
|
@@ -2174,6 +2302,7 @@ declare class DocxScrollViewer implements ZoomableViewer {
|
|
|
2174
2302
|
private readonly _slots;
|
|
2175
2303
|
private readonly _free;
|
|
2176
2304
|
private _heights;
|
|
2305
|
+
private _scrollGeometry;
|
|
2177
2306
|
private _lastRange;
|
|
2178
2307
|
private _lastTopIndex;
|
|
2179
2308
|
private _scrollListener;
|
|
@@ -2181,7 +2310,21 @@ declare class DocxScrollViewer implements ZoomableViewer {
|
|
|
2181
2310
|
private _selectionContextKey;
|
|
2182
2311
|
private _elementClickListener;
|
|
2183
2312
|
private _contextMenuListener;
|
|
2313
|
+
private _commentOutsidePointerListener;
|
|
2184
2314
|
private _elementContext;
|
|
2315
|
+
private _activeCommentId;
|
|
2316
|
+
private _activeCommentPage;
|
|
2317
|
+
private _commentUi;
|
|
2318
|
+
private readonly _commentPageById;
|
|
2319
|
+
private readonly _commentRunsByPage;
|
|
2320
|
+
private readonly _commentIndexedPages;
|
|
2321
|
+
private _commentScanFrontier;
|
|
2322
|
+
private _commentNavigationGeneration;
|
|
2323
|
+
private _commentAnchorRangesForMargin;
|
|
2324
|
+
private _commentAnchorIds;
|
|
2325
|
+
private _commentGeometryScheduled;
|
|
2326
|
+
private _commentGeometryFrame;
|
|
2327
|
+
private readonly _pendingCommentGeometry;
|
|
2185
2328
|
private _elementHitGeneration;
|
|
2186
2329
|
private _destroyed;
|
|
2187
2330
|
private _measureCtx;
|
|
@@ -2203,6 +2346,14 @@ declare class DocxScrollViewer implements ZoomableViewer {
|
|
|
2203
2346
|
private _pageWidthPx;
|
|
2204
2347
|
private _pageHeightPx;
|
|
2205
2348
|
private _fitWidthPx;
|
|
2349
|
+
private _hasCommentMargin;
|
|
2350
|
+
private _hasDisplayableComments;
|
|
2351
|
+
private _commentMarginExtent;
|
|
2352
|
+
private _commentZoom;
|
|
2353
|
+
private _commentsEnabled;
|
|
2354
|
+
private _commentsOptions;
|
|
2355
|
+
private _commentSide;
|
|
2356
|
+
private _syncCommentMarginGeometry;
|
|
2206
2357
|
private _baseScale;
|
|
2207
2358
|
relayout(): void;
|
|
2208
2359
|
private _relayout;
|
|
@@ -2243,6 +2394,15 @@ declare class DocxScrollViewer implements ZoomableViewer {
|
|
|
2243
2394
|
scrollToPage(index: number, opts?: {
|
|
2244
2395
|
behavior?: 'auto' | 'smooth';
|
|
2245
2396
|
}): void;
|
|
2397
|
+
private _scrollToPageTarget;
|
|
2398
|
+
private _resetCommentNavigation;
|
|
2399
|
+
private _advanceCommentScanFrontier;
|
|
2400
|
+
private _indexCommentPages;
|
|
2401
|
+
private _commentRunsForPage;
|
|
2402
|
+
goToComment(commentId: string, opts?: {
|
|
2403
|
+
pageIndex?: number;
|
|
2404
|
+
behavior?: 'auto' | 'smooth';
|
|
2405
|
+
}): Promise<boolean>;
|
|
2246
2406
|
findText(query: string, opts?: FindMatchesOptions): Promise<FindMatch<DocxMatchLocation>[]>;
|
|
2247
2407
|
findNext(): Promise<FindMatch<DocxMatchLocation> | null>;
|
|
2248
2408
|
findPrev(): Promise<FindMatch<DocxMatchLocation> | null>;
|
|
@@ -2251,6 +2411,10 @@ declare class DocxScrollViewer implements ZoomableViewer {
|
|
|
2251
2411
|
private _collectPageRuns;
|
|
2252
2412
|
private _redrawHighlights;
|
|
2253
2413
|
private _refreshFindRuns;
|
|
2414
|
+
private _commitCommentRuns;
|
|
2415
|
+
private _redrawSlotComments;
|
|
2416
|
+
private _redrawSlotCommentConnectors;
|
|
2417
|
+
private _scheduleCommentGeometry;
|
|
2254
2418
|
private _redrawSlotHighlights;
|
|
2255
2419
|
private _onResize;
|
|
2256
2420
|
get topVisiblePage(): number;
|
|
@@ -2274,4 +2438,4 @@ interface DocxHighlightMatch {
|
|
|
2274
2438
|
type DocxHighlightColors = FindHighlightColors;
|
|
2275
2439
|
declare function buildDocxHighlightLayer(layer: HTMLDivElement, runs: DocxTextRunInfo[], matches: DocxHighlightMatch[], cssWidth: number, cssHeight: number, measureForFont: (font: string) => (s: string) => number, colors?: DocxHighlightColors): void;
|
|
2276
2440
|
//#endregion
|
|
2277
|
-
export { type AnchorHostMetrics, type AutoResizeOptions, type BodyElement, type BorderSpec, type CellBorders, type CellElement, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartErrBars, type ChartExElementStyle, type ChartExRenderer, type ChartLabelBox, type ChartLegendEntryOverride, type ChartLineDashSegment, type ChartLineGroupDecorations, type ChartManualLayout, type ChartModel, type ChartOfPie, type ChartPlotGroup, type ChartPlotGroupAxisSlot, type ChartPlotGroupKind, type ChartRect, type ChartRegionMapRenderer, type ChartRun, type ChartSeries, type ChartSeriesDataLabels, type ChartStockBarPaint, type ChartStockUpDownBarStyle, type ChartSurfaceBandFormat, type ChartTextBox, type ChartTextParagraph, type ChartTextRun, type ChartThreeD, type ChartThreeDPictureOptions, type ChartThreeDRenderer, type ChartThreeDSeriesAxis, type ChartThreeDSurface, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexGeography, type ChartexHistogramBinning, type ChartexRegionMap, type ChartexRegionMapColors, type ChartexRegionMapRow, type ChartexSunburst, type ChartexSunburstRow, type ChartexTreemap, type ChartexValueColorStop, type ColSpec, type CollectPageRunsOptions, type ColumnsSpec, type DocComment, type DocNote, type DocParagraph, type DocRevision, type DocRun, type DocSettings, type DocTable, type DocTableCell, type DocTableRow, DocxDocument, type DocxDocumentModel, type DocxElementContext, type DocxElementContextOptions, type DocxHighlightColors, type DocxHighlightMatch, type DocxMatchLocation, type DocxPagePoint, type DocxRunBorder, DocxScrollViewer, type DocxScrollViewerOptions, type DocxSelectionContext, type DocxSelectionContextOptions, type DocxSelectionRunLocator, type DocxSelectionSourceLocator, type DocxTextRun, type DocxTextRunInfo, type DocxTextSelectionContext, DocxViewer, type DocxViewerOptions, type DrawingMLCustomDashSegment, type Duotone, type EmbeddedFontRef, type FieldRun, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type FramePr, type GradientFill, type GradientStop, type HeaderFooter, type HeadersFooters, type HyperlinkTarget, type ImageFill, type ImageRun, type LegendManualLayout, type LineEnd, type LineNumbering, type LineSpacing, type LoadOptions, type MatchRunSlice, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type NoFill, type NoteRef, type NumberingInfo, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type PTabRun, type PageBorderEdge, type PageBorders, type PageNumType, type ParaBorderEdge, type ParagraphBorders, type PathCmd, type PatternFill, type RenderPageOptions, type RenderPageToBitmapOptions, type RubyAnnotation, type RunRevision, type SecondaryValueAxis, type SectionGeom, type SectionProps, type ShapeFill, type ShapeRun, type ShapeStrokeFill, type ShapeText, type ShapeTextRun, type SolidFill, type SrcRect, type TabStop, type TableBorders, type TblpPr, type TextPath, type TextSelectionContextOptions, type TileInfo, type ViewerContextMenuEvent, type ZoomableViewer, autoResize, buildDocxHighlightLayer, buildDocxTextLayer, isOoxmlDecodedImageLimitError, noteText, openExternalHyperlink, readDocxTextSelectionContext };
|
|
2441
|
+
export { type AnchorHostMetrics, type AutoResizeOptions, type BodyElement, type BorderSpec, type CellBorders, type CellElement, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartErrBars, type ChartExElementStyle, type ChartExRenderer, type ChartLabelBox, type ChartLegendEntryOverride, type ChartLineDashSegment, type ChartLineGroupDecorations, type ChartManualLayout, type ChartModel, type ChartOfPie, type ChartPlotGroup, type ChartPlotGroupAxisSlot, type ChartPlotGroupKind, type ChartRect, type ChartRegionMapRenderer, type ChartRun, type ChartSeries, type ChartSeriesDataLabels, type ChartStockBarPaint, type ChartStockUpDownBarStyle, type ChartSurfaceBandFormat, type ChartTextBox, type ChartTextParagraph, type ChartTextRun, type ChartThreeD, type ChartThreeDPictureOptions, type ChartThreeDRenderer, type ChartThreeDSeriesAxis, type ChartThreeDSurface, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexGeography, type ChartexHistogramBinning, type ChartexRegionMap, type ChartexRegionMapColors, type ChartexRegionMapRow, type ChartexSunburst, type ChartexSunburstRow, type ChartexTreemap, type ChartexValueColorStop, type ColSpec, type CollectPageRunsOptions, type ColumnsSpec, type CommentAnchorGeometryFallback, type CommentAnchorPoint, type CommentAnchorRange, type DocComment, type DocNote, type DocParagraph, type DocRevision, type DocRun, type DocSettings, type DocTable, type DocTableCell, type DocTableRow, type DocxCommentAnchorKind, type DocxCommentHighlightRect, type DocxCommentMark, type DocxCommentSelectionContext, type DocxCommentsOptions, DocxDocument, type DocxDocumentModel, type DocxElementContext, type DocxElementContextOptions, type DocxHighlightColors, type DocxHighlightMatch, type DocxMatchLocation, type DocxPageCommentThreadsOptions, type DocxPagePoint, type DocxRunBorder, DocxScrollViewer, type DocxScrollViewerOptions, type DocxSelectionContext, type DocxSelectionContextOptions, type DocxSelectionRunLocator, type DocxSelectionSourceLocator, type DocxStorySource, type DocxTextRun, type DocxTextRunInfo, type DocxTextSelectionContext, DocxViewer, type DocxViewerOptions, type DrawingMLCustomDashSegment, type Duotone, type EmbeddedFontRef, type FieldRun, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type FramePr, type GradientFill, type GradientStop, type HeaderFooter, type HeadersFooters, type HyperlinkTarget, type ImageFill, type ImageRun, type LegendManualLayout, type LineEnd, type LineNumbering, type LineSpacing, type LoadOptions, type MatchRunSlice, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type NoFill, type NoteRef, type NumberingInfo, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type PTabRun, type PageBorderEdge, type PageBorders, type PageNumType, type ParaBorderEdge, type ParagraphBorders, type PathCmd, type PatternFill, type RenderPageOptions, type RenderPageToBitmapOptions, type ResolveDocxCommentThreadsOptions, type ResolvedDocxCommentAnchor, type ResolvedDocxCommentThread, type RevisionAnchorGeometryFallback, type RevisionAnchorRange, type RubyAnnotation, type RunRevision, type SecondaryValueAxis, type SectionGeom, type SectionProps, type ShapeFill, type ShapeRun, type ShapeStrokeFill, type ShapeText, type ShapeTextRun, type SolidFill, type SrcRect, type TabStop, type TableBorders, type TblpPr, type TextPath, type TextSelectionContextOptions, type TileInfo, type ViewerCommentConnectorOptions, type ViewerCommentConnectorRoute, type ViewerCommentConnectorStroke, type ViewerCommentMessageContext, type ViewerCommentThreadContext, type ViewerContextMenuEvent, type ZoomableViewer, autoResize, buildDocxHighlightLayer, buildDocxTextLayer, isOoxmlDecodedImageLimitError, noteText, openExternalHyperlink, readDocxTextSelectionContext, resolveCommentAnchorRuns, resolveDocxCommentThreads, resolveRevisionAnchorRuns };
|