@docmentis/udoc-viewer 0.6.31 → 0.6.33

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.
@@ -1,21 +1,37 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Rectangle differences for JavaScript serialization.
4
+ * Markup metadata for JavaScript serialization (author, subject, contents, state).
5
5
  */
6
- export interface JsRectDifferences {
7
- left: number;
8
- bottom: number;
9
- right: number;
10
- top: number;
6
+ export interface JsMarkupMetadata {
7
+ author?: string;
8
+ subject?: string;
9
+ contents?: string;
10
+ /**
11
+ * Annotation state (e.g., \"Accepted\", \"Rejected\", \"Completed\", \"Marked\").
12
+ */
13
+ state?: string;
14
+ /**
15
+ * State model (e.g., \"Review\" or \"Marked\").
16
+ */
17
+ stateModel?: string;
18
+ creationDate?: string;
19
+ /**
20
+ * Reply type: \"reply\" or \"group\".
21
+ */
22
+ replyType?: string;
23
+ intent?: string;
24
+ richContents?: string;
11
25
  }
12
26
 
13
27
  /**
14
- * Point for JavaScript serialization.
28
+ * Rectangle for JavaScript serialization.
15
29
  */
16
- export interface JsPoint {
30
+ export interface JsRect {
17
31
  x: number;
18
32
  y: number;
33
+ width: number;
34
+ height: number;
19
35
  }
20
36
 
21
37
  /**
@@ -27,6 +43,11 @@ export interface JsColor {
27
43
  b: number;
28
44
  }
29
45
 
46
+ /**
47
+ * Link action for JavaScript serialization.
48
+ */
49
+ export type JsLinkAction = { actionType: "goTo"; destination: JsDestination } | { actionType: "uri"; uri: string };
50
+
30
51
  /**
31
52
  * Quadrilateral for JavaScript serialization (used in text markup annotations).
32
53
  */
@@ -38,32 +59,18 @@ export interface JsQuad {
38
59
  }
39
60
 
40
61
  /**
41
- * Link action for JavaScript serialization.
62
+ * Annotation type for JavaScript serialization.
42
63
  */
43
- export type JsLinkAction = { actionType: "goTo"; destination: JsDestination } | { actionType: "uri"; uri: string };
64
+ export type JsAnnotationType = { type: "link"; action: JsLinkAction } | { type: "highlight"; quads: JsQuad[]; color?: JsColor; opacity?: number } | { type: "underline"; quads: JsQuad[]; color?: JsColor; opacity?: number } | { type: "strikeOut"; quads: JsQuad[]; color?: JsColor; opacity?: number } | { type: "squiggly"; quads: JsQuad[]; color?: JsColor; opacity?: number } | { type: "text"; icon: string; open: boolean; color?: JsColor; opacity?: number } | { type: "freeText"; contents?: string; justification: string; defaultAppearance?: string; color?: JsColor; borderColor?: JsColor; calloutLine?: JsPoint[]; opacity?: number; defaultStyle?: string; lineEnding?: string; rectDifferences?: JsRectDifferences } | { type: "stamp"; name?: string; hasCustomAppearance: boolean; color?: JsColor; opacity?: number } | { type: "line"; start: JsPoint; end: JsPoint; startEnding: string; endEnding: string; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; opacity?: number; leaderLength?: number; leaderExtension?: number; leaderOffset?: number; caption?: boolean; captionPosition?: string; captionOffset?: [number, number] } | { type: "square"; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; opacity?: number; rectDifferences?: JsRectDifferences } | { type: "circle"; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; opacity?: number; rectDifferences?: JsRectDifferences } | { type: "polygon"; vertices: JsPoint[]; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; startEnding: string; endEnding: string; opacity?: number } | { type: "polyLine"; vertices: JsPoint[]; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; startEnding: string; endEnding: string; opacity?: number } | { type: "ink"; inkList: JsPoint[][]; color?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; opacity?: number } | { type: "caret"; symbol: string; color?: JsColor; opacity?: number; rectDifferences?: JsRectDifferences } | { type: "redact"; quads: JsQuad[]; interiorColor?: JsColor; overlayText?: string; justification: string; repeat: boolean; color?: JsColor; opacity?: number; defaultAppearance?: string };
44
65
 
45
66
  /**
46
- * Markup metadata for JavaScript serialization (author, subject, contents, state).
67
+ * Rectangle differences for JavaScript serialization.
47
68
  */
48
- export interface JsMarkupMetadata {
49
- author?: string;
50
- subject?: string;
51
- contents?: string;
52
- /**
53
- * Annotation state (e.g., \"Accepted\", \"Rejected\", \"Completed\", \"Marked\").
54
- */
55
- state?: string;
56
- /**
57
- * State model (e.g., \"Review\" or \"Marked\").
58
- */
59
- stateModel?: string;
60
- creationDate?: string;
61
- /**
62
- * Reply type: \"reply\" or \"group\".
63
- */
64
- replyType?: string;
65
- intent?: string;
66
- richContents?: string;
69
+ export interface JsRectDifferences {
70
+ left: number;
71
+ bottom: number;
72
+ right: number;
73
+ top: number;
67
74
  }
68
75
 
69
76
  /**
@@ -94,20 +101,15 @@ export interface JsAnnotation extends JsAnnotationType {
94
101
  }
95
102
 
96
103
  /**
97
- * Annotation type for JavaScript serialization.
98
- */
99
- export type JsAnnotationType = { type: "link"; action: JsLinkAction } | { type: "highlight"; quads: JsQuad[]; color?: JsColor; opacity?: number } | { type: "underline"; quads: JsQuad[]; color?: JsColor; opacity?: number } | { type: "strikeOut"; quads: JsQuad[]; color?: JsColor; opacity?: number } | { type: "squiggly"; quads: JsQuad[]; color?: JsColor; opacity?: number } | { type: "text"; icon: string; open: boolean; color?: JsColor; opacity?: number } | { type: "freeText"; contents?: string; justification: string; defaultAppearance?: string; color?: JsColor; borderColor?: JsColor; calloutLine?: JsPoint[]; opacity?: number; defaultStyle?: string; lineEnding?: string; rectDifferences?: JsRectDifferences } | { type: "stamp"; name?: string; hasCustomAppearance: boolean; color?: JsColor; opacity?: number } | { type: "line"; start: JsPoint; end: JsPoint; startEnding: string; endEnding: string; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; opacity?: number; leaderLength?: number; leaderExtension?: number; leaderOffset?: number; caption?: boolean; captionPosition?: string; captionOffset?: [number, number] } | { type: "square"; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; opacity?: number; rectDifferences?: JsRectDifferences } | { type: "circle"; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; opacity?: number; rectDifferences?: JsRectDifferences } | { type: "polygon"; vertices: JsPoint[]; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; startEnding: string; endEnding: string; opacity?: number } | { type: "polyLine"; vertices: JsPoint[]; color?: JsColor; interiorColor?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; startEnding: string; endEnding: string; opacity?: number } | { type: "ink"; inkList: JsPoint[][]; color?: JsColor; borderWidth?: number; borderStyle: string; dashPattern?: number[]; opacity?: number } | { type: "caret"; symbol: string; color?: JsColor; opacity?: number; rectDifferences?: JsRectDifferences } | { type: "redact"; quads: JsQuad[]; interiorColor?: JsColor; overlayText?: string; justification: string; repeat: boolean; color?: JsColor; opacity?: number; defaultAppearance?: string };
100
-
101
- /**
102
- * Rectangle for JavaScript serialization.
104
+ * Point for JavaScript serialization.
103
105
  */
104
- export interface JsRect {
106
+ export interface JsPoint {
105
107
  x: number;
106
108
  y: number;
107
- width: number;
108
- height: number;
109
109
  }
110
110
 
111
+ export type JsViewerScrollMode = "spread" | "continuous";
112
+
111
113
  export interface JsViewerPreferences {
112
114
  layoutMode?: JsViewerLayoutMode;
113
115
  scrollMode?: JsViewerScrollMode;
@@ -115,17 +117,51 @@ export interface JsViewerPreferences {
115
117
 
116
118
  export type JsViewerLayoutMode = "single-page" | "double-page-odd-right" | "double-page-odd-left";
117
119
 
118
- export type JsViewerScrollMode = "spread" | "continuous";
120
+ /**
121
+ * Stitching layout of a `JsPageGroup` (discriminated union tagged by `type`).
122
+ */
123
+ export type JsPageGroupLayout = { type: "linear" } | { type: "tiled"; rows: number; cols: number };
119
124
 
120
- export type JsRippleDirection = "center" | "leftUp" | "rightUp" | "leftDown" | "rightDown";
125
+ /**
126
+ * Outline section info for split_by_outline results.
127
+ */
128
+ export interface JsOutlineSection {
129
+ title: string;
130
+ index: number;
131
+ }
121
132
 
122
133
  /**
123
- * Font source for JavaScript serialization.
134
+ * Font info returned by `parseFontInfo`.
124
135
  */
125
- export type JsFontSource = "embedded" | "standard" | "googleFonts" | "url" | "local" | { custom: string };
136
+ export interface JsParsedFontInfo {
137
+ typeface: string;
138
+ bold: boolean;
139
+ italic: boolean;
140
+ }
141
+
142
+ export type JsCornerDirection = "leftUp" | "rightUp" | "leftDown" | "rightDown";
126
143
 
127
144
  export type JsMorphOption = "byObject" | "byWord" | "byChar";
128
145
 
146
+ export type JsInOutDirection = "in" | "out";
147
+
148
+ export type JsOrientation = "horizontal" | "vertical";
149
+
150
+ /**
151
+ * Extracted image info for JavaScript.
152
+ */
153
+ export interface JsExtractedImage {
154
+ name: string;
155
+ format: string;
156
+ width: number | undefined;
157
+ height: number | undefined;
158
+ data: number[];
159
+ }
160
+
161
+ export type JsEightDirection = "left" | "right" | "up" | "down" | "leftUp" | "rightUp" | "leftDown" | "rightDown";
162
+
163
+ export type JsShredPattern = "strip" | "rectangle";
164
+
129
165
  /**
130
166
  * A pick specification from JavaScript.
131
167
  */
@@ -145,49 +181,55 @@ export interface JsPick {
145
181
  }
146
182
 
147
183
  /**
148
- * Font usage entry for JavaScript serialization.
149
- */
150
- export interface JsFontUsageEntry {
151
- spec: JsFontSpec;
152
- resolved: JsResolvedFontInfo;
153
- fallbacks: JsResolvedFontInfo[];
154
- }
155
-
156
- /**
157
- * Nested `Vec<Vec<T>>` can\'t cross the WASM boundary directly, so we use a
158
- * transparent Tsify wrapper.
159
- */
160
- export type JsCompositions = JsPick[][];
161
-
162
- export type JsSideDirection = "left" | "right" | "up" | "down";
163
-
164
- export type JsOrientation = "horizontal" | "vertical";
165
-
166
- /**
167
- * Page transition info for serialization to JavaScript.
168
- *
169
- * The `effect` field is a discriminated union tagged by `type`, e.g.:
170
- * `{ effect: { type: \"fade\", throughBlack: true }, durationMs: 500 }`
184
+ * Page info for serialization to JavaScript.
171
185
  */
172
- export interface JsPageTransition {
186
+ export interface JsPageInfo {
187
+ width: number;
188
+ height: number;
173
189
  /**
174
- * The visual transition effect (discriminated union tagged by `type`).
190
+ * Rotation in degrees (0, 90, 180, or 270)
175
191
  */
176
- effect: JsTransitionEffect;
192
+ rotation: number;
177
193
  /**
178
- * Duration of the transition animation in milliseconds.
194
+ * Transition effect metadata (None when no transition is defined).
179
195
  */
180
- durationMs?: number;
196
+ transition?: JsPageTransition;
181
197
  /**
182
- * Whether clicking advances to the next page.
198
+ * Content area for continuous mode cropping (DOCX body bounds, XLSX grid area).
199
+ * Absent for PDF/PPTX where the full page is the content.
183
200
  */
184
- advanceOnClick?: boolean;
201
+ contentRect?: JsRect;
185
202
  /**
186
- * Auto-advance after this many milliseconds.
203
+ * Tile position in a 2D page grid (XLSX only).
204
+ * Absent for linear formats (PDF, PPTX, DOCX).
187
205
  */
188
- advanceAfterMs?: number;
206
+ tilePos?: JsTilePos;
207
+ }
208
+
209
+ /**
210
+ * Extracted font info for JavaScript.
211
+ */
212
+ export interface JsExtractedFont {
213
+ name: string;
214
+ fontType: string;
215
+ extension: string;
216
+ data: number[];
217
+ }
218
+
219
+ /**
220
+ * Font usage entry for JavaScript serialization.
221
+ */
222
+ export interface JsFontUsageEntry {
223
+ spec: JsFontSpec;
224
+ resolved: JsResolvedFontInfo;
225
+ fallbacks: JsResolvedFontInfo[];
189
226
  }
190
227
 
228
+ /**
229
+ * Font source for JavaScript serialization.
230
+ */
231
+ export type JsFontSource = "embedded" | "standard" | "googleFonts" | "url" | "local" | { custom: string };
232
+
191
233
  /**
192
234
  * Tile position in a 2D page grid.
193
235
  */
@@ -197,34 +239,31 @@ export interface JsTilePos {
197
239
  }
198
240
 
199
241
  /**
200
- * Font info returned by `parseFontInfo`.
242
+ * Resolved font info for JavaScript serialization.
201
243
  */
202
- export interface JsParsedFontInfo {
203
- typeface: string;
244
+ export interface JsResolvedFontInfo {
245
+ familyName: string;
246
+ postscriptName?: string;
247
+ source: JsFontSource;
204
248
  bold: boolean;
205
249
  italic: boolean;
206
250
  }
207
251
 
208
- /**
209
- * Annotations grouped by page index (as string keys).
210
- */
211
- export type JsAnnotationsByPage = Record<string, JsAnnotation[]>;
212
-
213
- export type JsCornerDirection = "leftUp" | "rightUp" | "leftDown" | "rightDown";
252
+ export type JsGlitterPattern = "diamond" | "hexagon";
214
253
 
215
254
  /**
216
- * Transition effect as a discriminated union (tagged by `type`).
255
+ * Font spec for JavaScript serialization.
217
256
  */
218
- export type JsTransitionEffect = { type: "blinds"; orientation: JsOrientation } | { type: "checker"; orientation: JsOrientation } | { type: "circle" } | { type: "dissolve" } | { type: "comb"; orientation: JsOrientation } | { type: "cover"; direction: JsEightDirection } | { type: "cut"; throughBlack: boolean } | { type: "diamond" } | { type: "fade"; throughBlack: boolean } | { type: "newsflash" } | { type: "plus" } | { type: "pull"; direction: JsEightDirection } | { type: "push"; direction: JsSideDirection } | { type: "random" } | { type: "randomBar"; orientation: JsOrientation } | { type: "split"; orientation: JsOrientation; inOut: JsInOutDirection } | { type: "strips"; direction: JsCornerDirection } | { type: "wedge" } | { type: "wheel"; spokes: number } | { type: "wipe"; direction: JsSideDirection } | { type: "zoom"; inOut: JsInOutDirection } | { type: "box"; inOut: JsInOutDirection } | { type: "glitter"; direction: JsSideDirection; pattern: JsGlitterPattern } | { type: "fly"; direction: JsSideDirection } | { type: "uncover"; direction: JsEightDirection } | { type: "replace" } | { type: "vortex"; direction: JsSideDirection } | { type: "switch"; direction: JsSideDirection } | { type: "flip"; direction: JsSideDirection } | { type: "ripple"; direction: JsRippleDirection } | { type: "honeycomb" } | { type: "prism"; direction: JsSideDirection; isContent: boolean; isInverted: boolean } | { type: "doors"; orientation: JsOrientation } | { type: "window"; orientation: JsOrientation } | { type: "ferris"; direction: JsSideDirection } | { type: "gallery"; direction: JsSideDirection } | { type: "conveyor"; direction: JsSideDirection } | { type: "pan"; direction: JsSideDirection } | { type: "warp"; inOut: JsInOutDirection } | { type: "flythrough"; inOut: JsInOutDirection; hasBounce: boolean } | { type: "flash" } | { type: "shred"; pattern: JsShredPattern; inOut: JsInOutDirection } | { type: "reveal"; throughBlack: boolean; direction: JsSideDirection } | { type: "wheelReverse"; spokes: number } | { type: "morph"; option: JsMorphOption };
257
+ export type JsFontSpec = { typeface: string; bold: boolean; italic: boolean } | { fontId: string };
219
258
 
220
259
  /**
221
- * Extracted font info for JavaScript.
260
+ * A simple rectangle for serialization to JavaScript.
222
261
  */
223
- export interface JsExtractedFont {
224
- name: string;
225
- fontType: string;
226
- extension: string;
227
- data: number[];
262
+ export interface JsRect {
263
+ x: number;
264
+ y: number;
265
+ width: number;
266
+ height: number;
228
267
  }
229
268
 
230
269
  /**
@@ -254,11 +293,9 @@ export interface JsPageGroup {
254
293
  }
255
294
 
256
295
  /**
257
- * Stitching layout of a `JsPageGroup` (discriminated union tagged by `type`).
296
+ * Annotations grouped by page index (as string keys).
258
297
  */
259
- export type JsPageGroupLayout = { type: "linear" } | { type: "tiled"; rows: number; cols: number };
260
-
261
- export type JsGlitterPattern = "diamond" | "hexagon";
298
+ export type JsAnnotationsByPage = Record<string, JsAnnotation[]>;
262
299
 
263
300
  /**
264
301
  * Visibility group info for serialization to JavaScript.
@@ -270,18 +307,40 @@ export interface JsVisibilityGroup {
270
307
  locked: boolean;
271
308
  }
272
309
 
310
+ export type JsRippleDirection = "center" | "leftUp" | "rightUp" | "leftDown" | "rightDown";
311
+
312
+ export type JsSideDirection = "left" | "right" | "up" | "down";
313
+
273
314
  /**
274
- * Outline section info for split_by_outline results.
315
+ * Nested `Vec<Vec<T>>` can\'t cross the WASM boundary directly, so we use a
316
+ * transparent Tsify wrapper.
275
317
  */
276
- export interface JsOutlineSection {
277
- title: string;
278
- index: number;
279
- }
318
+ export type JsCompositions = JsPick[][];
280
319
 
281
320
  /**
282
- * Font spec for JavaScript serialization.
321
+ * Page transition info for serialization to JavaScript.
322
+ *
323
+ * The `effect` field is a discriminated union tagged by `type`, e.g.:
324
+ * `{ effect: { type: \"fade\", throughBlack: true }, durationMs: 500 }`
283
325
  */
284
- export type JsFontSpec = { typeface: string; bold: boolean; italic: boolean } | { fontId: string };
326
+ export interface JsPageTransition {
327
+ /**
328
+ * The visual transition effect (discriminated union tagged by `type`).
329
+ */
330
+ effect: JsTransitionEffect;
331
+ /**
332
+ * Duration of the transition animation in milliseconds.
333
+ */
334
+ durationMs?: number;
335
+ /**
336
+ * Whether clicking advances to the next page.
337
+ */
338
+ advanceOnClick?: boolean;
339
+ /**
340
+ * Auto-advance after this many milliseconds.
341
+ */
342
+ advanceAfterMs?: number;
343
+ }
285
344
 
286
345
  /**
287
346
  * Font registration entry from JavaScript.
@@ -294,17 +353,9 @@ export interface JsFontRegistration {
294
353
  }
295
354
 
296
355
  /**
297
- * Extracted image info for JavaScript.
356
+ * Transition effect as a discriminated union (tagged by `type`).
298
357
  */
299
- export interface JsExtractedImage {
300
- name: string;
301
- format: string;
302
- width: number | undefined;
303
- height: number | undefined;
304
- data: number[];
305
- }
306
-
307
- export type JsShredPattern = "strip" | "rectangle";
358
+ export type JsTransitionEffect = { type: "blinds"; orientation: JsOrientation } | { type: "checker"; orientation: JsOrientation } | { type: "circle" } | { type: "dissolve" } | { type: "comb"; orientation: JsOrientation } | { type: "cover"; direction: JsEightDirection } | { type: "cut"; throughBlack: boolean } | { type: "diamond" } | { type: "fade"; throughBlack: boolean } | { type: "newsflash" } | { type: "plus" } | { type: "pull"; direction: JsEightDirection } | { type: "push"; direction: JsSideDirection } | { type: "random" } | { type: "randomBar"; orientation: JsOrientation } | { type: "split"; orientation: JsOrientation; inOut: JsInOutDirection } | { type: "strips"; direction: JsCornerDirection } | { type: "wedge" } | { type: "wheel"; spokes: number } | { type: "wipe"; direction: JsSideDirection } | { type: "zoom"; inOut: JsInOutDirection } | { type: "box"; inOut: JsInOutDirection } | { type: "glitter"; direction: JsSideDirection; pattern: JsGlitterPattern } | { type: "fly"; direction: JsSideDirection } | { type: "uncover"; direction: JsEightDirection } | { type: "replace" } | { type: "vortex"; direction: JsSideDirection } | { type: "switch"; direction: JsSideDirection } | { type: "flip"; direction: JsSideDirection } | { type: "ripple"; direction: JsRippleDirection } | { type: "honeycomb" } | { type: "prism"; direction: JsSideDirection; isContent: boolean; isInverted: boolean } | { type: "doors"; orientation: JsOrientation } | { type: "window"; orientation: JsOrientation } | { type: "ferris"; direction: JsSideDirection } | { type: "gallery"; direction: JsSideDirection } | { type: "conveyor"; direction: JsSideDirection } | { type: "pan"; direction: JsSideDirection } | { type: "warp"; inOut: JsInOutDirection } | { type: "flythrough"; inOut: JsInOutDirection; hasBounce: boolean } | { type: "flash" } | { type: "shred"; pattern: JsShredPattern; inOut: JsInOutDirection } | { type: "reveal"; throughBlack: boolean; direction: JsSideDirection } | { type: "wheelReverse"; spokes: number } | { type: "morph"; option: JsMorphOption };
308
359
 
309
360
  /**
310
361
  * Result from pdf_split_by_outline.
@@ -314,94 +365,34 @@ export interface JsSplitByOutlineResult {
314
365
  sections: JsOutlineSection[];
315
366
  }
316
367
 
317
- export type JsInOutDirection = "in" | "out";
318
-
319
- /**
320
- * Page info for serialization to JavaScript.
321
- */
322
- export interface JsPageInfo {
368
+ export interface JsLayoutRunList {
369
+ baseline: number;
323
370
  width: number;
324
371
  height: number;
325
- /**
326
- * Rotation in degrees (0, 90, 180, or 270)
327
- */
328
- rotation: number;
329
- /**
330
- * Transition effect metadata (None when no transition is defined).
331
- */
332
- transition?: JsPageTransition;
333
- /**
334
- * Content area for continuous mode cropping (DOCX body bounds, XLSX grid area).
335
- * Absent for PDF/PPTX where the full page is the content.
336
- */
337
- contentRect?: JsRect;
338
- /**
339
- * Tile position in a 2D page grid (XLSX only).
340
- * Absent for linear formats (PDF, PPTX, DOCX).
341
- */
342
- tilePos?: JsTilePos;
343
- }
344
-
345
- /**
346
- * Resolved font info for JavaScript serialization.
347
- */
348
- export interface JsResolvedFontInfo {
349
- familyName: string;
350
- postscriptName?: string;
351
- source: JsFontSource;
352
- bold: boolean;
353
- italic: boolean;
372
+ runs: JsLayoutRun[];
354
373
  }
355
374
 
356
- export type JsEightDirection = "left" | "right" | "up" | "down" | "leftUp" | "rightUp" | "leftDown" | "rightDown";
357
-
358
- /**
359
- * A simple rectangle for serialization to JavaScript.
360
- */
361
- export interface JsRect {
375
+ export interface JsLayoutGridCell {
376
+ colIndex: number;
362
377
  x: number;
363
378
  y: number;
364
379
  width: number;
365
380
  height: number;
381
+ parcel?: JsLayoutParcel;
366
382
  }
367
383
 
368
- export interface JsLayoutGlyph {
369
- x: number;
370
- y: number;
371
- advance: number;
372
- /**
373
- * Byte offset of this glyph\'s source character relative to the parent run\'s text.
374
- */
375
- offset: number;
376
- }
377
-
378
- export interface JsLayoutTableCell {
379
- colIndex: number;
380
- colSpan: number;
381
- rowSpan: number;
382
- x: number;
383
- y: number;
384
- width: number;
385
- height: number;
384
+ export interface JsLayoutFrame {
385
+ transform: JsTransform;
386
386
  parcel?: JsLayoutParcel;
387
387
  }
388
388
 
389
- export interface JsLayoutParcel {
389
+ export interface JsLayoutRun {
390
390
  x: number;
391
- y: number;
392
391
  width: number;
393
- height: number;
394
- lines: JsLayoutLine[];
395
- }
396
-
397
- export interface JsLayoutTableRow {
398
- y: number;
399
- height: number;
400
- cells: JsLayoutTableCell[];
392
+ transform: JsTransform;
393
+ content: JsLayoutRunContent;
401
394
  }
402
395
 
403
- export type JsLayoutRunContent = { type: "glyphs"; text: string; fontSize: number; ascent: number; descent: number; glyphs: JsLayoutGlyph[] } | { type: "space"; advance: number; fontSize: number; ascent: number; descent: number } | { type: "tab"; advance: number; fontSize: number; ascent: number; descent: number } | { type: "paragraphEnd"; advance: number } | { type: "break" } | { type: "inlineDrawing"; width: number; height: number };
404
-
405
396
  export type JsLayoutLineContent = ({ type: "runList" } & JsLayoutRunList) | ({ type: "table" } & JsLayoutTable);
406
397
 
407
398
  export interface JsLayoutTable {
@@ -411,13 +402,9 @@ export interface JsLayoutTable {
411
402
  rows: JsLayoutTableRow[];
412
403
  }
413
404
 
414
- export interface JsLayoutGridCell {
415
- colIndex: number;
405
+ export interface JsLayoutTableColumn {
416
406
  x: number;
417
- y: number;
418
407
  width: number;
419
- height: number;
420
- parcel?: JsLayoutParcel;
421
408
  }
422
409
 
423
410
  export interface JsLayoutLine {
@@ -431,23 +418,6 @@ export interface JsLayoutLine {
431
418
  content: JsLayoutLineContent;
432
419
  }
433
420
 
434
- export interface JsLayoutFrame {
435
- transform: JsTransform;
436
- parcel?: JsLayoutParcel;
437
- }
438
-
439
- export interface JsLayoutTableColumn {
440
- x: number;
441
- width: number;
442
- }
443
-
444
- export interface JsLayoutRunList {
445
- baseline: number;
446
- width: number;
447
- height: number;
448
- runs: JsLayoutRun[];
449
- }
450
-
451
421
  export interface JsTransform {
452
422
  scaleX: number;
453
423
  skewY: number;
@@ -457,6 +427,23 @@ export interface JsTransform {
457
427
  translateY: number;
458
428
  }
459
429
 
430
+ export interface JsLayoutGlyph {
431
+ x: number;
432
+ y: number;
433
+ advance: number;
434
+ /**
435
+ * Byte offset of this glyph\'s source character relative to the parent run\'s text.
436
+ */
437
+ offset: number;
438
+ }
439
+
440
+ export interface JsLayoutPage {
441
+ width: number;
442
+ height: number;
443
+ frames: JsLayoutFrame[];
444
+ grid?: JsLayoutGrid;
445
+ }
446
+
460
447
  export interface JsLayoutGrid {
461
448
  x: number;
462
449
  y: number;
@@ -467,16 +454,17 @@ export interface JsLayoutGrid {
467
454
  rows: JsLayoutGridRow[];
468
455
  }
469
456
 
470
- export interface JsLayoutGridColumn {
457
+ export interface JsLayoutParcel {
471
458
  x: number;
459
+ y: number;
472
460
  width: number;
461
+ height: number;
462
+ lines: JsLayoutLine[];
473
463
  }
474
464
 
475
- export interface JsLayoutRun {
465
+ export interface JsLayoutGridColumn {
476
466
  x: number;
477
467
  width: number;
478
- transform: JsTransform;
479
- content: JsLayoutRunContent;
480
468
  }
481
469
 
482
470
  export interface JsLayoutGridRow {
@@ -485,13 +473,25 @@ export interface JsLayoutGridRow {
485
473
  cells: JsLayoutGridCell[];
486
474
  }
487
475
 
488
- export interface JsLayoutPage {
476
+ export interface JsLayoutTableCell {
477
+ colIndex: number;
478
+ colSpan: number;
479
+ rowSpan: number;
480
+ x: number;
481
+ y: number;
489
482
  width: number;
490
483
  height: number;
491
- frames: JsLayoutFrame[];
492
- grid?: JsLayoutGrid;
484
+ parcel?: JsLayoutParcel;
485
+ }
486
+
487
+ export interface JsLayoutTableRow {
488
+ y: number;
489
+ height: number;
490
+ cells: JsLayoutTableCell[];
493
491
  }
494
492
 
493
+ export type JsLayoutRunContent = { type: "glyphs"; text: string; fontSize: number; ascent: number; descent: number; glyphs: JsLayoutGlyph[] } | { type: "space"; advance: number; fontSize: number; ascent: number; descent: number } | { type: "tab"; advance: number; fontSize: number; ascent: number; descent: number } | { type: "paragraphEnd"; advance: number } | { type: "break" } | { type: "inlineDrawing"; width: number; height: number };
494
+
495
495
  /**
496
496
  * Result returned to JavaScript after license validation.
497
497
  */
@@ -520,8 +520,21 @@ export interface LicenseResult {
520
520
  * Expiry timestamp (Unix seconds), if set.
521
521
  */
522
522
  expiresAt?: number;
523
+ /**
524
+ * Upgrade window cutoff (Unix seconds), if set.
525
+ */
526
+ upgradeUntil?: number;
527
+ /**
528
+ * Unix-seconds release date of this WASM build.
529
+ */
530
+ wasmReleaseDate: number;
523
531
  }
524
532
 
533
+ /**
534
+ * Destination display parameters for JavaScript serialization.
535
+ */
536
+ export type JsDestinationDisplay = { type: "xyz"; left: number | undefined; top: number | undefined; zoom: number | undefined } | { type: "fit" } | { type: "fitH"; top: number | undefined } | { type: "fitV"; left: number | undefined } | { type: "fitR"; left: number; top: number; right: number; bottom: number } | { type: "fitB" } | { type: "fitBH"; top: number | undefined } | { type: "fitBV"; left: number | undefined };
537
+
525
538
  /**
526
539
  * Destination for JavaScript serialization.
527
540
  */
@@ -530,11 +543,6 @@ export interface JsDestination {
530
543
  display: JsDestinationDisplay;
531
544
  }
532
545
 
533
- /**
534
- * Destination display parameters for JavaScript serialization.
535
- */
536
- export type JsDestinationDisplay = { type: "xyz"; left: number | undefined; top: number | undefined; zoom: number | undefined } | { type: "fit" } | { type: "fitH"; top: number | undefined } | { type: "fitV"; left: number | undefined } | { type: "fitR"; left: number; top: number; right: number; bottom: number } | { type: "fitB" } | { type: "fitBH"; top: number | undefined } | { type: "fitBV"; left: number | undefined };
537
-
538
546
  /**
539
547
  * Outline item for JavaScript serialization.
540
548
  */
@@ -1137,9 +1145,9 @@ export interface InitOutput {
1137
1145
  readonly wasm_set_visibility_group_visible: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1138
1146
  readonly wasm_setup_telemetry: (a: number, b: number, c: number) => void;
1139
1147
  readonly wasm_viewer_preferences: (a: number, b: number, c: number, d: number) => void;
1140
- readonly __wasm_bindgen_func_elem_4191: (a: number, b: number, c: number) => void;
1141
- readonly __wasm_bindgen_func_elem_4175: (a: number, b: number) => void;
1142
- readonly __wasm_bindgen_func_elem_22447: (a: number, b: number, c: number, d: number) => void;
1148
+ readonly __wasm_bindgen_func_elem_4194: (a: number, b: number, c: number) => void;
1149
+ readonly __wasm_bindgen_func_elem_4178: (a: number, b: number) => void;
1150
+ readonly __wasm_bindgen_func_elem_22494: (a: number, b: number, c: number, d: number) => void;
1143
1151
  readonly __wbindgen_export: (a: number, b: number) => number;
1144
1152
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
1145
1153
  readonly __wbindgen_export3: (a: number) => void;