@docmentis/udoc-wasm 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wasm/udoc.d.ts +74 -20
- package/dist/wasm/udoc.js +83 -34
- package/dist/wasm/udoc_bg.wasm +0 -0
- package/package.json +2 -2
package/dist/wasm/udoc.d.ts
CHANGED
|
@@ -1045,7 +1045,7 @@ export interface TableCell3D {
|
|
|
1045
1045
|
/**
|
|
1046
1046
|
* A cell's address in a worksheet grid — its row's and its column's ids, the
|
|
1047
1047
|
* pair [`SpreadsheetHit`](crate::layout::SpreadsheetHit) reports and
|
|
1048
|
-
* [`GridCellRange`] corners are named by.
|
|
1048
|
+
* [`GridCellRange`](super::GridCellRange) corners are named by.
|
|
1049
1049
|
*
|
|
1050
1050
|
* A cell has no id of its own: the **pair** is its identity, and it is ids
|
|
1051
1051
|
* rather than positions because both survive a concurrent insert, so a peer's
|
|
@@ -5211,6 +5211,14 @@ export interface ShapeProperties {
|
|
|
5211
5211
|
shape3d: PaintShape3d | null;
|
|
5212
5212
|
}
|
|
5213
5213
|
|
|
5214
|
+
/**
|
|
5215
|
+
* A sheet's visibility — the `state` attribute of a `<sheet>` entry. Maps to
|
|
5216
|
+
* `ST_SheetState` in the XLSX schema. A `Hidden` sheet is hidden from the tab
|
|
5217
|
+
* bar but the user can unhide it; a `VeryHidden` sheet is hidden from the UI
|
|
5218
|
+
* entirely (unhideable only through VBA).
|
|
5219
|
+
*/
|
|
5220
|
+
export type SheetState = "visible" | "hidden" | "veryHidden";
|
|
5221
|
+
|
|
5214
5222
|
/**
|
|
5215
5223
|
* A signature field (§12.7.4.5) — held unsigned: its `/V`, `/Lock` and
|
|
5216
5224
|
* `/SV` aren't.
|
|
@@ -11689,6 +11697,24 @@ export interface PageList {
|
|
|
11689
11697
|
pages: PageId[];
|
|
11690
11698
|
}
|
|
11691
11699
|
|
|
11700
|
+
/**
|
|
11701
|
+
* The part of a plane a caller needs current — the request an
|
|
11702
|
+
* [`update_layout`](crate::engine::Engine::update_layout) carries down to
|
|
11703
|
+
* [`LayoutPlane::update`](crate::layout::LayoutPlane::update).
|
|
11704
|
+
*
|
|
11705
|
+
* A plane is either a run of pages, each composed whole, or a single grid page
|
|
11706
|
+
* composed by its rows (a worksheet in Normal view), so a request names one or
|
|
11707
|
+
* the other, never both. Both bounds are inclusive, and the scope is what the
|
|
11708
|
+
* caller needs, not a promise about what gets touched: how it maps to work is
|
|
11709
|
+
* the doc type's decision.
|
|
11710
|
+
*
|
|
11711
|
+
* - A paged plane composes the pages of a [`Pages`](Self::Pages) scope, and
|
|
11712
|
+
* nothing for a [`Rows`](Self::Rows) one, which names nothing it holds.
|
|
11713
|
+
* - A grid page composes the rows of a [`Rows`](Self::Rows) scope, and all of
|
|
11714
|
+
* them for a [`Pages`](Self::Pages) one that covers it — an export's.
|
|
11715
|
+
*/
|
|
11716
|
+
export type LayoutScope = { pages: { start: number; limit: number } } | { rows: { start: number; limit: number } };
|
|
11717
|
+
|
|
11692
11718
|
/**
|
|
11693
11719
|
* The part of a word-processing document a search covers — the
|
|
11694
11720
|
* wordprocessing
|
|
@@ -14136,7 +14162,7 @@ export type ShapeOleBinding = { embed: { followColorScheme?: ShapeOleColorScheme
|
|
|
14136
14162
|
* Where a [`TextHyperlinkAction::ShowJump`] moves — `jump=` of
|
|
14137
14163
|
* `ppaction://hlinkshowjump`.
|
|
14138
14164
|
*/
|
|
14139
|
-
export type TextHyperlinkShowJump = "endShow" | "firstSlide" | "lastSlide" | "lastSlideViewed" | "nextSlide" | "previousSlide" | { slide: {
|
|
14165
|
+
export type TextHyperlinkShowJump = "endShow" | "firstSlide" | "lastSlide" | "lastSlideViewed" | "nextSlide" | "previousSlide" | { slide: { slideIndex: number } };
|
|
14140
14166
|
|
|
14141
14167
|
/**
|
|
14142
14168
|
* Where a blip's image comes from — the `a:blip` relationship attributes.
|
|
@@ -18683,7 +18709,8 @@ export class WasmSession {
|
|
|
18683
18709
|
*
|
|
18684
18710
|
* A 404, a css2 response with no covering block, and giving up after three
|
|
18685
18711
|
* retries are the same event: those characters are recorded as unavailable
|
|
18686
|
-
* from that vendor and the next
|
|
18712
|
+
* from that vendor, and the next vendor down the chain is on order at once —
|
|
18713
|
+
* the next [`takeFontRequests`](Self::take_font_requests) hands it out. To
|
|
18687
18714
|
* retry instead, simply don't call this until you have stopped trying — the
|
|
18688
18715
|
* order stays open and the document renders in the stand-in meanwhile.
|
|
18689
18716
|
*
|
|
@@ -18702,6 +18729,16 @@ export class WasmSession {
|
|
|
18702
18729
|
* [`viewState`](Self::view_state) (indices 3–4).
|
|
18703
18730
|
*/
|
|
18704
18731
|
composedPageCount(): number;
|
|
18732
|
+
/**
|
|
18733
|
+
* How many rows the current sheet's grid has composed. Grows as an
|
|
18734
|
+
* [`updateLayout`](Self::update_layout) over `{ rows: { start, limit } }`
|
|
18735
|
+
* composes, a worksheet's grid being one page however many of its rows
|
|
18736
|
+
* are composed — the progress a host composing a sheet ahead guards its
|
|
18737
|
+
* pump with, as [`composedPageCount`](Self::composed_page_count) for
|
|
18738
|
+
* pages. `0` when no document is open, for a chartsheet, and for every
|
|
18739
|
+
* other doc type.
|
|
18740
|
+
*/
|
|
18741
|
+
composedRowCount(): number;
|
|
18705
18742
|
/**
|
|
18706
18743
|
* The camera as `[a, b, c, d, e, f]` (PDF/SVG order): content space
|
|
18707
18744
|
* (document points) → **CSS px** under the current scroll/zoom.
|
|
@@ -19086,6 +19123,15 @@ export class WasmSession {
|
|
|
19086
19123
|
* or the package can't be read.
|
|
19087
19124
|
*/
|
|
19088
19125
|
openRemote(url: string, fetch: (url: string) => Uint8Array): void;
|
|
19126
|
+
/**
|
|
19127
|
+
* The file the open document came from, byte for byte, whatever has been
|
|
19128
|
+
* edited since.
|
|
19129
|
+
*
|
|
19130
|
+
* # Errors
|
|
19131
|
+
* Returns a JS error if no document is open, the session holds no
|
|
19132
|
+
* original (as one opened with `openRemote` doesn't), or reading it fails.
|
|
19133
|
+
*/
|
|
19134
|
+
originalBytes(): Uint8Array;
|
|
19089
19135
|
/**
|
|
19090
19136
|
* The size (document points) of page `page_index` on `plane` —
|
|
19091
19137
|
* doc-type-agnostic, so the host's thumbnail strip can shape and scale a
|
|
@@ -19234,12 +19280,6 @@ export class WasmSession {
|
|
|
19234
19280
|
* type with no sheets, or when nothing is open.
|
|
19235
19281
|
*/
|
|
19236
19282
|
planeIsChartsheet(plane: number): boolean;
|
|
19237
|
-
/**
|
|
19238
|
-
* Whether plane `plane` is a spreadsheet's very hidden sheet —
|
|
19239
|
-
* `state="veryHidden"`, which shows no tab. `false` for any other sheet, a
|
|
19240
|
-
* plane out of range, a doc type with no sheets, or when nothing is open.
|
|
19241
|
-
*/
|
|
19242
|
-
planeIsVeryHidden(plane: number): boolean;
|
|
19243
19283
|
/**
|
|
19244
19284
|
* The display name of plane `plane` — a spreadsheet's sheet-tab label
|
|
19245
19285
|
* (the `<sheet name>` from `workbook.xml`), or `undefined` for a plane out
|
|
@@ -19248,6 +19288,13 @@ export class WasmSession {
|
|
|
19248
19288
|
* for the bound.
|
|
19249
19289
|
*/
|
|
19250
19290
|
planeName(plane: number): string | undefined;
|
|
19291
|
+
/**
|
|
19292
|
+
* The visibility of a spreadsheet's sheet on plane `plane` — its
|
|
19293
|
+
* `state`: `"visible"`, `"hidden"` (no tab until the user unhides it) or
|
|
19294
|
+
* `"veryHidden"` (no tab, and no way to unhide it). `undefined` for a
|
|
19295
|
+
* plane out of range, a doc type with no sheets, or when nothing is open.
|
|
19296
|
+
*/
|
|
19297
|
+
planeSheetState(plane: number): SheetState | undefined;
|
|
19251
19298
|
/**
|
|
19252
19299
|
* The colour of plane `plane`'s tab — a spreadsheet's sheet-tab colour
|
|
19253
19300
|
* (`<sheetPr><tabColor>`) as Excel draws it — or `undefined` for a tab in
|
|
@@ -19933,7 +19980,9 @@ export class WasmSession {
|
|
|
19933
19980
|
* `{ url: { url } }`. Fetch them however you like — in parallel, with
|
|
19934
19981
|
* whatever retry policy — then settle each with
|
|
19935
19982
|
* [`completeFontRequest`](Self::complete_font_request) and call
|
|
19936
|
-
* [`refreshFonts`](Self::refresh_fonts) once for
|
|
19983
|
+
* [`refreshFonts`](Self::refresh_fonts) once for a batch that brought a
|
|
19984
|
+
* font. A batch of refusals needs none: it installed nothing, and the next
|
|
19985
|
+
* vendors' orders are already waiting here.
|
|
19937
19986
|
*
|
|
19938
19987
|
* Nothing here blocks or waits: an order is out until it is settled, and the
|
|
19939
19988
|
* document keeps rendering in a stand-in throughout.
|
|
@@ -19963,11 +20012,13 @@ export class WasmSession {
|
|
|
19963
20012
|
*/
|
|
19964
20013
|
undo(): void;
|
|
19965
20014
|
/**
|
|
19966
|
-
* Compose
|
|
19967
|
-
*
|
|
19968
|
-
*
|
|
19969
|
-
*
|
|
19970
|
-
*
|
|
20015
|
+
* Compose `scope` on the current plane — `{ pages: { start, limit } }`
|
|
20016
|
+
* for a paged plane, growing the composed prefix through page index
|
|
20017
|
+
* `limit`, or `{ rows: { start, limit } }` for a worksheet's grid — and
|
|
20018
|
+
* return whether the plane is now **fully composed**. The idle
|
|
20019
|
+
* compose-ahead seam: the host calls it from `requestIdleCallback` with a
|
|
20020
|
+
* rising limit (e.g. `composedPageCount + 1` to advance one page) until it
|
|
20021
|
+
* returns `true` — at which point
|
|
19971
20022
|
* [`composedPageCount`](Self::composed_page_count) is the document's page
|
|
19972
20023
|
* count. There is no total to ask for up front: a page is known only once
|
|
19973
20024
|
* composed.
|
|
@@ -19981,9 +20032,10 @@ export class WasmSession {
|
|
|
19981
20032
|
* `composedPageCount`.
|
|
19982
20033
|
*
|
|
19983
20034
|
* # Errors
|
|
19984
|
-
* Returns a JS error if no document is open
|
|
20035
|
+
* Returns a JS error if no document is open, or if `scope` isn't a
|
|
20036
|
+
* [`LayoutScope`].
|
|
19985
20037
|
*/
|
|
19986
|
-
updateLayout(
|
|
20038
|
+
updateLayout(scope: LayoutScope): boolean;
|
|
19987
20039
|
/**
|
|
19988
20040
|
* The session's version vector — the opaque handshake token to hand another
|
|
19989
20041
|
* session's [`patchSince`](Self::patch_since) so it can send back only the
|
|
@@ -20116,6 +20168,7 @@ export interface InitOutput {
|
|
|
20116
20168
|
readonly wasmsession_close: (a: number) => void;
|
|
20117
20169
|
readonly wasmsession_completeFontRequest: (a: number, b: bigint, c: number, d: number) => number;
|
|
20118
20170
|
readonly wasmsession_composedPageCount: (a: number) => number;
|
|
20171
|
+
readonly wasmsession_composedRowCount: (a: number) => number;
|
|
20119
20172
|
readonly wasmsession_contentToViewport: (a: number, b: number) => void;
|
|
20120
20173
|
readonly wasmsession_copy: (a: number) => number;
|
|
20121
20174
|
readonly wasmsession_currentPlane: (a: number) => number;
|
|
@@ -20147,6 +20200,7 @@ export interface InitOutput {
|
|
|
20147
20200
|
readonly wasmsession_opaquePartsSince: (a: number, b: number, c: number, d: number) => void;
|
|
20148
20201
|
readonly wasmsession_open: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
20149
20202
|
readonly wasmsession_openRemote: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
20203
|
+
readonly wasmsession_originalBytes: (a: number, b: number) => void;
|
|
20150
20204
|
readonly wasmsession_pageSize: (a: number, b: number, c: number, d: number) => void;
|
|
20151
20205
|
readonly wasmsession_pageToContent: (a: number, b: number, c: number) => void;
|
|
20152
20206
|
readonly wasmsession_pageViewRects: (a: number, b: number) => void;
|
|
@@ -20159,8 +20213,8 @@ export interface InitOutput {
|
|
|
20159
20213
|
readonly wasmsession_plainText: (a: number, b: number, c: number) => void;
|
|
20160
20214
|
readonly wasmsession_planeCount: (a: number) => number;
|
|
20161
20215
|
readonly wasmsession_planeIsChartsheet: (a: number, b: number) => number;
|
|
20162
|
-
readonly wasmsession_planeIsVeryHidden: (a: number, b: number) => number;
|
|
20163
20216
|
readonly wasmsession_planeName: (a: number, b: number, c: number) => void;
|
|
20217
|
+
readonly wasmsession_planeSheetState: (a: number, b: number) => number;
|
|
20164
20218
|
readonly wasmsession_planeTabColor: (a: number, b: number) => number;
|
|
20165
20219
|
readonly wasmsession_presence: (a: number, b: number) => void;
|
|
20166
20220
|
readonly wasmsession_redo: (a: number, b: number) => void;
|
|
@@ -20227,8 +20281,8 @@ export interface InitOutput {
|
|
|
20227
20281
|
readonly fontpreviewimage_width: (a: number) => number;
|
|
20228
20282
|
readonly fontpreviewimage_bleed: (a: number) => number;
|
|
20229
20283
|
readonly fontpreviewimage_height: (a: number) => number;
|
|
20230
|
-
readonly
|
|
20231
|
-
readonly
|
|
20284
|
+
readonly __wasm_bindgen_func_elem_74162: (a: number, b: number, c: number, d: number) => void;
|
|
20285
|
+
readonly __wasm_bindgen_func_elem_74164: (a: number, b: number, c: number, d: number) => void;
|
|
20232
20286
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
20233
20287
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
20234
20288
|
readonly __wbindgen_export3: (a: number) => void;
|
package/dist/wasm/udoc.js
CHANGED
|
@@ -1047,7 +1047,8 @@ export class WasmSession {
|
|
|
1047
1047
|
*
|
|
1048
1048
|
* A 404, a css2 response with no covering block, and giving up after three
|
|
1049
1049
|
* retries are the same event: those characters are recorded as unavailable
|
|
1050
|
-
* from that vendor and the next
|
|
1050
|
+
* from that vendor, and the next vendor down the chain is on order at once —
|
|
1051
|
+
* the next [`takeFontRequests`](Self::take_font_requests) hands it out. To
|
|
1051
1052
|
* retry instead, simply don't call this until you have stopped trying — the
|
|
1052
1053
|
* order stays open and the document renders in the stand-in meanwhile.
|
|
1053
1054
|
*
|
|
@@ -1078,6 +1079,20 @@ export class WasmSession {
|
|
|
1078
1079
|
const ret = wasm.wasmsession_composedPageCount(this.__wbg_ptr);
|
|
1079
1080
|
return ret >>> 0;
|
|
1080
1081
|
}
|
|
1082
|
+
/**
|
|
1083
|
+
* How many rows the current sheet's grid has composed. Grows as an
|
|
1084
|
+
* [`updateLayout`](Self::update_layout) over `{ rows: { start, limit } }`
|
|
1085
|
+
* composes, a worksheet's grid being one page however many of its rows
|
|
1086
|
+
* are composed — the progress a host composing a sheet ahead guards its
|
|
1087
|
+
* pump with, as [`composedPageCount`](Self::composed_page_count) for
|
|
1088
|
+
* pages. `0` when no document is open, for a chartsheet, and for every
|
|
1089
|
+
* other doc type.
|
|
1090
|
+
* @returns {number}
|
|
1091
|
+
*/
|
|
1092
|
+
composedRowCount() {
|
|
1093
|
+
const ret = wasm.wasmsession_composedRowCount(this.__wbg_ptr);
|
|
1094
|
+
return ret >>> 0;
|
|
1095
|
+
}
|
|
1081
1096
|
/**
|
|
1082
1097
|
* The camera as `[a, b, c, d, e, f]` (PDF/SVG order): content space
|
|
1083
1098
|
* (document points) → **CSS px** under the current scroll/zoom.
|
|
@@ -1840,6 +1855,33 @@ export class WasmSession {
|
|
|
1840
1855
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1841
1856
|
}
|
|
1842
1857
|
}
|
|
1858
|
+
/**
|
|
1859
|
+
* The file the open document came from, byte for byte, whatever has been
|
|
1860
|
+
* edited since.
|
|
1861
|
+
*
|
|
1862
|
+
* # Errors
|
|
1863
|
+
* Returns a JS error if no document is open, the session holds no
|
|
1864
|
+
* original (as one opened with `openRemote` doesn't), or reading it fails.
|
|
1865
|
+
* @returns {Uint8Array}
|
|
1866
|
+
*/
|
|
1867
|
+
originalBytes() {
|
|
1868
|
+
try {
|
|
1869
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1870
|
+
wasm.wasmsession_originalBytes(retptr, this.__wbg_ptr);
|
|
1871
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1872
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1873
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1874
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1875
|
+
if (r3) {
|
|
1876
|
+
throw takeObject(r2);
|
|
1877
|
+
}
|
|
1878
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1879
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1880
|
+
return v1;
|
|
1881
|
+
} finally {
|
|
1882
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1843
1885
|
/**
|
|
1844
1886
|
* The size (document points) of page `page_index` on `plane` —
|
|
1845
1887
|
* doc-type-agnostic, so the host's thumbnail strip can shape and scale a
|
|
@@ -2169,17 +2211,6 @@ export class WasmSession {
|
|
|
2169
2211
|
const ret = wasm.wasmsession_planeIsChartsheet(this.__wbg_ptr, plane);
|
|
2170
2212
|
return ret !== 0;
|
|
2171
2213
|
}
|
|
2172
|
-
/**
|
|
2173
|
-
* Whether plane `plane` is a spreadsheet's very hidden sheet —
|
|
2174
|
-
* `state="veryHidden"`, which shows no tab. `false` for any other sheet, a
|
|
2175
|
-
* plane out of range, a doc type with no sheets, or when nothing is open.
|
|
2176
|
-
* @param {number} plane
|
|
2177
|
-
* @returns {boolean}
|
|
2178
|
-
*/
|
|
2179
|
-
planeIsVeryHidden(plane) {
|
|
2180
|
-
const ret = wasm.wasmsession_planeIsVeryHidden(this.__wbg_ptr, plane);
|
|
2181
|
-
return ret !== 0;
|
|
2182
|
-
}
|
|
2183
2214
|
/**
|
|
2184
2215
|
* The display name of plane `plane` — a spreadsheet's sheet-tab label
|
|
2185
2216
|
* (the `<sheet name>` from `workbook.xml`), or `undefined` for a plane out
|
|
@@ -2205,6 +2236,18 @@ export class WasmSession {
|
|
|
2205
2236
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2206
2237
|
}
|
|
2207
2238
|
}
|
|
2239
|
+
/**
|
|
2240
|
+
* The visibility of a spreadsheet's sheet on plane `plane` — its
|
|
2241
|
+
* `state`: `"visible"`, `"hidden"` (no tab until the user unhides it) or
|
|
2242
|
+
* `"veryHidden"` (no tab, and no way to unhide it). `undefined` for a
|
|
2243
|
+
* plane out of range, a doc type with no sheets, or when nothing is open.
|
|
2244
|
+
* @param {number} plane
|
|
2245
|
+
* @returns {SheetState | undefined}
|
|
2246
|
+
*/
|
|
2247
|
+
planeSheetState(plane) {
|
|
2248
|
+
const ret = wasm.wasmsession_planeSheetState(this.__wbg_ptr, plane);
|
|
2249
|
+
return takeObject(ret);
|
|
2250
|
+
}
|
|
2208
2251
|
/**
|
|
2209
2252
|
* The colour of plane `plane`'s tab — a spreadsheet's sheet-tab colour
|
|
2210
2253
|
* (`<sheetPr><tabColor>`) as Excel draws it — or `undefined` for a tab in
|
|
@@ -3566,7 +3609,9 @@ export class WasmSession {
|
|
|
3566
3609
|
* `{ url: { url } }`. Fetch them however you like — in parallel, with
|
|
3567
3610
|
* whatever retry policy — then settle each with
|
|
3568
3611
|
* [`completeFontRequest`](Self::complete_font_request) and call
|
|
3569
|
-
* [`refreshFonts`](Self::refresh_fonts) once for
|
|
3612
|
+
* [`refreshFonts`](Self::refresh_fonts) once for a batch that brought a
|
|
3613
|
+
* font. A batch of refusals needs none: it installed nothing, and the next
|
|
3614
|
+
* vendors' orders are already waiting here.
|
|
3570
3615
|
*
|
|
3571
3616
|
* Nothing here blocks or waits: an order is out until it is settled, and the
|
|
3572
3617
|
* document keeps rendering in a stand-in throughout.
|
|
@@ -3642,11 +3687,13 @@ export class WasmSession {
|
|
|
3642
3687
|
}
|
|
3643
3688
|
}
|
|
3644
3689
|
/**
|
|
3645
|
-
* Compose
|
|
3646
|
-
*
|
|
3647
|
-
*
|
|
3648
|
-
*
|
|
3649
|
-
*
|
|
3690
|
+
* Compose `scope` on the current plane — `{ pages: { start, limit } }`
|
|
3691
|
+
* for a paged plane, growing the composed prefix through page index
|
|
3692
|
+
* `limit`, or `{ rows: { start, limit } }` for a worksheet's grid — and
|
|
3693
|
+
* return whether the plane is now **fully composed**. The idle
|
|
3694
|
+
* compose-ahead seam: the host calls it from `requestIdleCallback` with a
|
|
3695
|
+
* rising limit (e.g. `composedPageCount + 1` to advance one page) until it
|
|
3696
|
+
* returns `true` — at which point
|
|
3650
3697
|
* [`composedPageCount`](Self::composed_page_count) is the document's page
|
|
3651
3698
|
* count. There is no total to ask for up front: a page is known only once
|
|
3652
3699
|
* composed.
|
|
@@ -3660,14 +3707,15 @@ export class WasmSession {
|
|
|
3660
3707
|
* `composedPageCount`.
|
|
3661
3708
|
*
|
|
3662
3709
|
* # Errors
|
|
3663
|
-
* Returns a JS error if no document is open
|
|
3664
|
-
*
|
|
3710
|
+
* Returns a JS error if no document is open, or if `scope` isn't a
|
|
3711
|
+
* [`LayoutScope`].
|
|
3712
|
+
* @param {LayoutScope} scope
|
|
3665
3713
|
* @returns {boolean}
|
|
3666
3714
|
*/
|
|
3667
|
-
updateLayout(
|
|
3715
|
+
updateLayout(scope) {
|
|
3668
3716
|
try {
|
|
3669
3717
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3670
|
-
wasm.wasmsession_updateLayout(retptr, this.__wbg_ptr,
|
|
3718
|
+
wasm.wasmsession_updateLayout(retptr, this.__wbg_ptr, addBorrowedObject(scope));
|
|
3671
3719
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3672
3720
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3673
3721
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -3677,6 +3725,7 @@ export class WasmSession {
|
|
|
3677
3725
|
return r0 !== 0;
|
|
3678
3726
|
} finally {
|
|
3679
3727
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3728
|
+
heap[stack_pointer++] = undefined;
|
|
3680
3729
|
}
|
|
3681
3730
|
}
|
|
3682
3731
|
/**
|
|
@@ -3887,7 +3936,7 @@ function __wbg_get_imports() {
|
|
|
3887
3936
|
__wbg_clip_5f059eebddcbe6ae: function(arg0) {
|
|
3888
3937
|
getObject(arg0).clip();
|
|
3889
3938
|
},
|
|
3890
|
-
|
|
3939
|
+
__wbg_covers_f7b1296b43fc610f: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3891
3940
|
const ret = getObject(arg0).covers(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
3892
3941
|
return ret;
|
|
3893
3942
|
}, arguments); },
|
|
@@ -3912,7 +3961,7 @@ function __wbg_get_imports() {
|
|
|
3912
3961
|
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
3913
3962
|
}
|
|
3914
3963
|
},
|
|
3915
|
-
|
|
3964
|
+
__wbg_fetch_b468ac3d8d7d6b29: function() { return handleError(function (arg0) {
|
|
3916
3965
|
const ret = fetch(getObject(arg0));
|
|
3917
3966
|
return addHeapObject(ret);
|
|
3918
3967
|
}, arguments); },
|
|
@@ -3994,11 +4043,11 @@ function __wbg_get_imports() {
|
|
|
3994
4043
|
const ret = getObject(arg0).length;
|
|
3995
4044
|
return ret;
|
|
3996
4045
|
},
|
|
3997
|
-
|
|
4046
|
+
__wbg_measure_4a7db9e7c5b085b5: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
3998
4047
|
const ret = getObject(arg0).measure(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
3999
4048
|
return ret;
|
|
4000
4049
|
}, arguments); },
|
|
4001
|
-
|
|
4050
|
+
__wbg_metrics_b1c7aa43e31c7d63: function() { return handleError(function (arg0, arg1, arg2) {
|
|
4002
4051
|
const ret = getObject(arg0).metrics(getStringFromWasm0(arg1, arg2));
|
|
4003
4052
|
return addHeapObject(ret);
|
|
4004
4053
|
}, arguments); },
|
|
@@ -4045,7 +4094,7 @@ function __wbg_get_imports() {
|
|
|
4045
4094
|
const a = state0.a;
|
|
4046
4095
|
state0.a = 0;
|
|
4047
4096
|
try {
|
|
4048
|
-
return
|
|
4097
|
+
return __wasm_bindgen_func_elem_74164(a, state0.b, arg0, arg1);
|
|
4049
4098
|
} finally {
|
|
4050
4099
|
state0.a = a;
|
|
4051
4100
|
}
|
|
@@ -4116,7 +4165,7 @@ function __wbg_get_imports() {
|
|
|
4116
4165
|
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
4117
4166
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
4118
4167
|
}, arguments); },
|
|
4119
|
-
|
|
4168
|
+
__wbg_rasterize_6d92bc147edd07ee: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) {
|
|
4120
4169
|
const ret = getObject(arg0).rasterize(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4), getArrayF64FromWasm0(arg5, arg6), arg7 === 0 ? undefined : arg8);
|
|
4121
4170
|
return addHeapObject(ret);
|
|
4122
4171
|
}, arguments); },
|
|
@@ -4219,8 +4268,8 @@ function __wbg_get_imports() {
|
|
|
4219
4268
|
return ret;
|
|
4220
4269
|
},
|
|
4221
4270
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
4222
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
4223
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4271
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 15553, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
4272
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_74162);
|
|
4224
4273
|
return addHeapObject(ret);
|
|
4225
4274
|
},
|
|
4226
4275
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -4252,10 +4301,10 @@ function __wbg_get_imports() {
|
|
|
4252
4301
|
};
|
|
4253
4302
|
}
|
|
4254
4303
|
|
|
4255
|
-
function
|
|
4304
|
+
function __wasm_bindgen_func_elem_74162(arg0, arg1, arg2) {
|
|
4256
4305
|
try {
|
|
4257
4306
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4258
|
-
wasm.
|
|
4307
|
+
wasm.__wasm_bindgen_func_elem_74162(retptr, arg0, arg1, addHeapObject(arg2));
|
|
4259
4308
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4260
4309
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4261
4310
|
if (r1) {
|
|
@@ -4266,8 +4315,8 @@ function __wasm_bindgen_func_elem_68497(arg0, arg1, arg2) {
|
|
|
4266
4315
|
}
|
|
4267
4316
|
}
|
|
4268
4317
|
|
|
4269
|
-
function
|
|
4270
|
-
wasm.
|
|
4318
|
+
function __wasm_bindgen_func_elem_74164(arg0, arg1, arg2, arg3) {
|
|
4319
|
+
wasm.__wasm_bindgen_func_elem_74164(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
4271
4320
|
}
|
|
4272
4321
|
|
|
4273
4322
|
const FontPreviewImageFinalization = (typeof FinalizationRegistry === 'undefined')
|
package/dist/wasm/udoc_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docmentis/udoc-wasm",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "WebAssembly document engine powering docMentis viewing, editing, and processing.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|