docxodus 9.9.0 → 11.0.0
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 +182 -4
- package/dist/canonical.d.ts +7 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +56 -0
- package/dist/canonical.js.map +1 -0
- package/dist/docxodus.worker.d.ts +2 -1
- package/dist/docxodus.worker.d.ts.map +1 -1
- package/dist/docxodus.worker.js +250 -41
- package/dist/docxodus.worker.js.map +1 -1
- package/dist/editor.bundle.js +1980 -423
- package/dist/editor.d.ts +22 -2
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +94 -9
- package/dist/editor.js.map +1 -1
- package/dist/embed.bundle.js +2968 -597
- package/dist/embed.d.ts +1 -1
- package/dist/embed.iife.js +2969 -598
- package/dist/embed.js +1 -1
- package/dist/export-assets.json +277 -0
- package/dist/export-browser.bundle.js +7989 -0
- package/dist/export-browser.d.ts +266 -0
- package/dist/export-browser.d.ts.map +1 -0
- package/dist/export-browser.js +2915 -0
- package/dist/export-browser.js.map +1 -0
- package/dist/export-resource-limits-v1.json +57 -0
- package/dist/font-contract.d.ts +150 -0
- package/dist/font-contract.d.ts.map +1 -0
- package/dist/font-contract.js +59 -0
- package/dist/font-contract.js.map +1 -0
- package/dist/font-runtime.d.ts +33 -0
- package/dist/font-runtime.d.ts.map +1 -0
- package/dist/font-runtime.js +1100 -0
- package/dist/font-runtime.js.map +1 -0
- package/dist/index.d.ts +83 -65
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +194 -149
- package/dist/index.js.map +1 -1
- package/dist/page-geometry.d.ts +8 -1
- package/dist/page-geometry.d.ts.map +1 -1
- package/dist/page-geometry.js +37 -11
- package/dist/page-geometry.js.map +1 -1
- package/dist/pagination.bundle.js +1827 -410
- package/dist/pagination.d.ts +249 -15
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +1942 -453
- package/dist/pagination.js.map +1 -1
- package/dist/react.d.ts +13 -6
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +38 -5
- package/dist/react.js.map +1 -1
- package/dist/render-report-v2.schema.json +1581 -0
- package/dist/ribbon-chrome.d.ts +2 -2
- package/dist/ribbon-chrome.d.ts.map +1 -1
- package/dist/ribbon-chrome.js +72 -4
- package/dist/ribbon-chrome.js.map +1 -1
- package/dist/ribbon.js +119 -0
- package/dist/ribbon.js.map +1 -1
- package/dist/session.bundle.js +747 -29
- package/dist/session.d.ts +159 -19
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +593 -25
- package/dist/session.js.map +1 -1
- package/dist/types.d.ts +1287 -238
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -75
- package/dist/types.js.map +1 -1
- package/dist/wasm/_framework/DocumentFormat.OpenXml.Framework.wasm +0 -0
- package/dist/wasm/_framework/DocumentFormat.OpenXml.Framework.wasm.br +0 -0
- package/dist/wasm/_framework/DocumentFormat.OpenXml.wasm +0 -0
- package/dist/wasm/_framework/DocumentFormat.OpenXml.wasm.br +0 -0
- package/dist/wasm/_framework/Docxodus.wasm +0 -0
- package/dist/wasm/_framework/Docxodus.wasm.br +0 -0
- package/dist/wasm/_framework/DocxodusWasm.wasm +0 -0
- package/dist/wasm/_framework/DocxodusWasm.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.Concurrent.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.Concurrent.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.Immutable.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.Immutable.wasm.br +0 -0
- package/dist/wasm/_framework/System.Collections.wasm +0 -0
- package/dist/wasm/_framework/System.Collections.wasm.br +0 -0
- package/dist/wasm/_framework/System.ComponentModel.Primitives.wasm +0 -0
- package/dist/wasm/_framework/System.ComponentModel.Primitives.wasm.br +0 -0
- package/dist/wasm/_framework/System.IO.Compression.wasm +0 -0
- package/dist/wasm/_framework/System.IO.Compression.wasm.br +0 -0
- package/dist/wasm/_framework/System.IO.Packaging.wasm +0 -0
- package/dist/wasm/_framework/System.IO.Packaging.wasm.br +0 -0
- package/dist/wasm/_framework/System.IO.Pipelines.wasm +0 -0
- package/dist/wasm/_framework/System.IO.Pipelines.wasm.br +0 -0
- package/dist/wasm/_framework/System.Linq.wasm +0 -0
- package/dist/wasm/_framework/System.Linq.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.CoreLib.wasm +0 -0
- package/dist/wasm/_framework/System.Private.CoreLib.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.Uri.wasm +0 -0
- package/dist/wasm/_framework/System.Private.Uri.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.Xml.Linq.wasm +0 -0
- package/dist/wasm/_framework/System.Private.Xml.Linq.wasm.br +0 -0
- package/dist/wasm/_framework/System.Private.Xml.wasm +0 -0
- package/dist/wasm/_framework/System.Private.Xml.wasm.br +0 -0
- package/dist/wasm/_framework/System.Runtime.InteropServices.JavaScript.wasm +0 -0
- package/dist/wasm/_framework/System.Runtime.InteropServices.JavaScript.wasm.br +0 -0
- package/dist/wasm/_framework/System.Runtime.wasm +0 -0
- package/dist/wasm/_framework/System.Runtime.wasm.br +0 -0
- package/dist/wasm/_framework/System.Security.Cryptography.wasm +0 -0
- package/dist/wasm/_framework/System.Security.Cryptography.wasm.br +0 -0
- package/dist/wasm/_framework/System.Text.Encodings.Web.wasm +0 -0
- package/dist/wasm/_framework/System.Text.Encodings.Web.wasm.br +0 -0
- package/dist/wasm/_framework/System.Text.Json.wasm +0 -0
- package/dist/wasm/_framework/System.Text.Json.wasm.br +0 -0
- package/dist/wasm/_framework/System.Text.RegularExpressions.wasm +0 -0
- package/dist/wasm/_framework/System.Text.RegularExpressions.wasm.br +0 -0
- package/dist/wasm/_framework/dotnet.boot.js +34 -40
- package/dist/wasm/_framework/dotnet.boot.js.br +0 -0
- package/dist/wasm/_framework/dotnet.native.js +39 -3
- package/dist/wasm/_framework/dotnet.native.js.br +0 -0
- package/dist/wasm/_framework/dotnet.native.wasm +0 -0
- package/dist/wasm/_framework/dotnet.native.wasm.br +0 -0
- package/dist/worker-proxy.bundle.js +198 -32
- package/dist/worker-proxy.d.ts +37 -4
- package/dist/worker-proxy.d.ts.map +1 -1
- package/dist/worker-proxy.js +187 -35
- package/dist/worker-proxy.js.map +1 -1
- package/package.json +22 -6
- package/dist/wasm/_framework/System.Diagnostics.Process.wasm +0 -0
- package/dist/wasm/_framework/System.Diagnostics.Process.wasm.br +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const config = /*json-start*/{
|
|
2
2
|
"mainAssemblyName": "DocxodusWasm.dll",
|
|
3
3
|
"resources": {
|
|
4
|
-
"hash": "sha256-
|
|
4
|
+
"hash": "sha256-AhVQ/4nkDqVhUSEZuQ7XdyweWXUIE8f/rJa1pbf8qlc=",
|
|
5
5
|
"jsModuleNative": [
|
|
6
6
|
{
|
|
7
7
|
"name": "dotnet.native.js"
|
|
@@ -15,56 +15,44 @@ export const config = /*json-start*/{
|
|
|
15
15
|
"wasmNative": [
|
|
16
16
|
{
|
|
17
17
|
"name": "dotnet.native.wasm",
|
|
18
|
-
"hash": "sha256-
|
|
18
|
+
"hash": "sha256-u+gVk/oOtQJi3cHNq9pWQTY9Vz8pUWmznrMHyR580i4="
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"coreAssembly": [
|
|
22
|
-
{
|
|
23
|
-
"virtualPath": "System.Private.CoreLib.wasm",
|
|
24
|
-
"name": "System.Private.CoreLib.wasm",
|
|
25
|
-
"hash": "sha256-PhD0KSZ+1vSw6trSK7PP9gMVQIekT1w8VBL7jUMaofI="
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"virtualPath": "System.Runtime.InteropServices.JavaScript.wasm",
|
|
29
|
-
"name": "System.Runtime.InteropServices.JavaScript.wasm",
|
|
30
|
-
"hash": "sha256-CBGeqEDZPHmRGQrofWSTmRnHoqoXwx+WAxbo2Pw9Wgs="
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"assembly": [
|
|
34
22
|
{
|
|
35
23
|
"virtualPath": "DocumentFormat.OpenXml.wasm",
|
|
36
24
|
"name": "DocumentFormat.OpenXml.wasm",
|
|
37
|
-
"hash": "sha256-
|
|
25
|
+
"hash": "sha256-vqlaSi/+9ad5GhMYnIaee33YJPG6cvSJj+6dyBWidCs="
|
|
38
26
|
},
|
|
39
27
|
{
|
|
40
28
|
"virtualPath": "DocumentFormat.OpenXml.Framework.wasm",
|
|
41
29
|
"name": "DocumentFormat.OpenXml.Framework.wasm",
|
|
42
|
-
"hash": "sha256-
|
|
30
|
+
"hash": "sha256-PVt61pv/y5UX/cnOm5WRrkvJHPchxyYvyBUHTqrn0hY="
|
|
43
31
|
},
|
|
44
32
|
{
|
|
45
33
|
"virtualPath": "Docxodus.wasm",
|
|
46
34
|
"name": "Docxodus.wasm",
|
|
47
|
-
"hash": "sha256
|
|
35
|
+
"hash": "sha256-+F526R3aHf8lVTsxSDKv0ZXhEACG17k3Yo6Idj2lnTM="
|
|
48
36
|
},
|
|
49
37
|
{
|
|
50
38
|
"virtualPath": "DocxodusWasm.wasm",
|
|
51
39
|
"name": "DocxodusWasm.wasm",
|
|
52
|
-
"hash": "sha256-
|
|
40
|
+
"hash": "sha256-mo/Fr0F4yXmyMYCtpLo+dw5Zsa+kZgX0AndgVBa1njg="
|
|
53
41
|
},
|
|
54
42
|
{
|
|
55
43
|
"virtualPath": "System.Collections.Concurrent.wasm",
|
|
56
44
|
"name": "System.Collections.Concurrent.wasm",
|
|
57
|
-
"hash": "sha256-
|
|
45
|
+
"hash": "sha256-IhXqbQHoMTsRBKW5X69o3M7ApXm58ya6P6HLtyXmmwE="
|
|
58
46
|
},
|
|
59
47
|
{
|
|
60
48
|
"virtualPath": "System.Collections.wasm",
|
|
61
49
|
"name": "System.Collections.wasm",
|
|
62
|
-
"hash": "sha256-
|
|
50
|
+
"hash": "sha256-HcEVQbaaJUyLQbJn0Cp+AuvQuAmkOAzXFV+Ba4ASSy8="
|
|
63
51
|
},
|
|
64
52
|
{
|
|
65
53
|
"virtualPath": "System.Collections.Immutable.wasm",
|
|
66
54
|
"name": "System.Collections.Immutable.wasm",
|
|
67
|
-
"hash": "sha256-
|
|
55
|
+
"hash": "sha256-EupFsbiPnDXiQqjDmrozvJSSYJmYDe2x7BDVNCI2f+s="
|
|
68
56
|
},
|
|
69
57
|
{
|
|
70
58
|
"virtualPath": "System.Collections.NonGeneric.wasm",
|
|
@@ -84,7 +72,7 @@ export const config = /*json-start*/{
|
|
|
84
72
|
{
|
|
85
73
|
"virtualPath": "System.ComponentModel.Primitives.wasm",
|
|
86
74
|
"name": "System.ComponentModel.Primitives.wasm",
|
|
87
|
-
"hash": "sha256-
|
|
75
|
+
"hash": "sha256-kNZATGb6xgjUYDm3C6coZVNBt9otnol2lyau9xeVjA0="
|
|
88
76
|
},
|
|
89
77
|
{
|
|
90
78
|
"virtualPath": "System.ComponentModel.TypeConverter.wasm",
|
|
@@ -96,11 +84,6 @@ export const config = /*json-start*/{
|
|
|
96
84
|
"name": "System.Console.wasm",
|
|
97
85
|
"hash": "sha256-jNqlILSswzSuT80UR2Zg4t9JqYGOy9PKb2vD4YEp2VA="
|
|
98
86
|
},
|
|
99
|
-
{
|
|
100
|
-
"virtualPath": "System.Diagnostics.Process.wasm",
|
|
101
|
-
"name": "System.Diagnostics.Process.wasm",
|
|
102
|
-
"hash": "sha256-esLwLto9kl25kf/GEjDPWJkY1U5cBfXQKWTHQyobCQA="
|
|
103
|
-
},
|
|
104
87
|
{
|
|
105
88
|
"virtualPath": "System.wasm",
|
|
106
89
|
"name": "System.wasm",
|
|
@@ -109,22 +92,22 @@ export const config = /*json-start*/{
|
|
|
109
92
|
{
|
|
110
93
|
"virtualPath": "System.IO.Compression.wasm",
|
|
111
94
|
"name": "System.IO.Compression.wasm",
|
|
112
|
-
"hash": "sha256-
|
|
95
|
+
"hash": "sha256-SKQgjdcHX4NDkkJG7jS04DBhVW2B3RW8w352ctZN3IA="
|
|
113
96
|
},
|
|
114
97
|
{
|
|
115
98
|
"virtualPath": "System.IO.Packaging.wasm",
|
|
116
99
|
"name": "System.IO.Packaging.wasm",
|
|
117
|
-
"hash": "sha256-
|
|
100
|
+
"hash": "sha256-9mlZYP+TwL1HhOqNKRe6yHnY8HCsZqKRKOI09WQgws4="
|
|
118
101
|
},
|
|
119
102
|
{
|
|
120
103
|
"virtualPath": "System.IO.Pipelines.wasm",
|
|
121
104
|
"name": "System.IO.Pipelines.wasm",
|
|
122
|
-
"hash": "sha256-
|
|
105
|
+
"hash": "sha256-ITTBtDSw1GQpJwhK5Q6rBMC+zG+rFNgqcEPUVTbcm9E="
|
|
123
106
|
},
|
|
124
107
|
{
|
|
125
108
|
"virtualPath": "System.Linq.wasm",
|
|
126
109
|
"name": "System.Linq.wasm",
|
|
127
|
-
"hash": "sha256-
|
|
110
|
+
"hash": "sha256-x2eGR/OSTjZipkXNQw/geBi/hOni1EWpTdSC1u7T6nY="
|
|
128
111
|
},
|
|
129
112
|
{
|
|
130
113
|
"virtualPath": "System.Linq.Expressions.wasm",
|
|
@@ -151,45 +134,55 @@ export const config = /*json-start*/{
|
|
|
151
134
|
"name": "System.ObjectModel.wasm",
|
|
152
135
|
"hash": "sha256-kGBTr2TY0pQFT+LwO+Unrgvb36KS1zrBss8FinNPcF8="
|
|
153
136
|
},
|
|
137
|
+
{
|
|
138
|
+
"virtualPath": "System.Private.CoreLib.wasm",
|
|
139
|
+
"name": "System.Private.CoreLib.wasm",
|
|
140
|
+
"hash": "sha256-TWhFRe/dqokhMsKhriif2J0n/hreL69Vo3FnDAWZDa4="
|
|
141
|
+
},
|
|
154
142
|
{
|
|
155
143
|
"virtualPath": "System.Private.Uri.wasm",
|
|
156
144
|
"name": "System.Private.Uri.wasm",
|
|
157
|
-
"hash": "sha256-
|
|
145
|
+
"hash": "sha256-veyiWUasbpnHWTwZKM5HiEpti0QCy4RnSe3vBRy8Al0="
|
|
158
146
|
},
|
|
159
147
|
{
|
|
160
148
|
"virtualPath": "System.Private.Xml.wasm",
|
|
161
149
|
"name": "System.Private.Xml.wasm",
|
|
162
|
-
"hash": "sha256-
|
|
150
|
+
"hash": "sha256-bqFYmW4Tr+7Ub0wO/ApQyDv8HGcvp5pLCfHoeHtfEYY="
|
|
163
151
|
},
|
|
164
152
|
{
|
|
165
153
|
"virtualPath": "System.Private.Xml.Linq.wasm",
|
|
166
154
|
"name": "System.Private.Xml.Linq.wasm",
|
|
167
|
-
"hash": "sha256-
|
|
155
|
+
"hash": "sha256-Hd14hgyNMkOaxaaVCbd90y8nJ0V1z6hFBeTFMYFCqSE="
|
|
168
156
|
},
|
|
169
157
|
{
|
|
170
158
|
"virtualPath": "System.Runtime.wasm",
|
|
171
159
|
"name": "System.Runtime.wasm",
|
|
172
|
-
"hash": "sha256-
|
|
160
|
+
"hash": "sha256-dkyU8VkNibpVu+IFNf664laWx3z8/PUWcBIL0/OJkUQ="
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"virtualPath": "System.Runtime.InteropServices.JavaScript.wasm",
|
|
164
|
+
"name": "System.Runtime.InteropServices.JavaScript.wasm",
|
|
165
|
+
"hash": "sha256-JJIVa2PmDXo77IEZ0jZQpVlVc2J4qdiaXsESrDz2f5s="
|
|
173
166
|
},
|
|
174
167
|
{
|
|
175
168
|
"virtualPath": "System.Security.Cryptography.wasm",
|
|
176
169
|
"name": "System.Security.Cryptography.wasm",
|
|
177
|
-
"hash": "sha256-
|
|
170
|
+
"hash": "sha256-Y9nmJU2XxnOJFJLdm0fx/RY8mjgiKqDiLsH/Qeo4PkM="
|
|
178
171
|
},
|
|
179
172
|
{
|
|
180
173
|
"virtualPath": "System.Text.Encodings.Web.wasm",
|
|
181
174
|
"name": "System.Text.Encodings.Web.wasm",
|
|
182
|
-
"hash": "sha256
|
|
175
|
+
"hash": "sha256-+kdWoCcW3DLteIfUt6SlA+QxW5aMNA5It/6OtEcW3lU="
|
|
183
176
|
},
|
|
184
177
|
{
|
|
185
178
|
"virtualPath": "System.Text.Json.wasm",
|
|
186
179
|
"name": "System.Text.Json.wasm",
|
|
187
|
-
"hash": "sha256-
|
|
180
|
+
"hash": "sha256-M74OxVgb89Lwa+omKp3wdEvStZPRkbPgQGPWUrNdlP4="
|
|
188
181
|
},
|
|
189
182
|
{
|
|
190
183
|
"virtualPath": "System.Text.RegularExpressions.wasm",
|
|
191
184
|
"name": "System.Text.RegularExpressions.wasm",
|
|
192
|
-
"hash": "sha256-
|
|
185
|
+
"hash": "sha256-iO/pM45EO+l/qUUmDlddIHSBmxEDdtEFq52hr27LKCg="
|
|
193
186
|
},
|
|
194
187
|
{
|
|
195
188
|
"virtualPath": "System.Xml.Linq.wasm",
|
|
@@ -201,7 +194,8 @@ export const config = /*json-start*/{
|
|
|
201
194
|
"name": "System.Xml.XDocument.wasm",
|
|
202
195
|
"hash": "sha256-SlMyAuXDvWTqbzFiXFgT/gnVwmkmHZ5/4/BLJrWQHBQ="
|
|
203
196
|
}
|
|
204
|
-
]
|
|
197
|
+
],
|
|
198
|
+
"assembly": []
|
|
205
199
|
},
|
|
206
200
|
"debugLevel": 0,
|
|
207
201
|
"globalizationMode": "invariant",
|
|
Binary file
|
|
@@ -5057,7 +5057,7 @@ function createWasm() {
|
|
|
5057
5057
|
|
|
5058
5058
|
FS.createPreloadedFile = FS_createPreloadedFile;
|
|
5059
5059
|
FS.staticInit();Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_unlink"] = FS.unlink;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createDevice"] = FS.createDevice;;
|
|
5060
|
-
DOTNET.setup({ wasmEnableSIMD: true,wasmEnableEH: true,enableAotProfiler: false, enableDevToolsProfiler: false, enableLogProfiler: false, enableEventPipe: false, runAOTCompilation:
|
|
5060
|
+
DOTNET.setup({ wasmEnableSIMD: true,wasmEnableEH: true,enableAotProfiler: false, enableDevToolsProfiler: false, enableLogProfiler: false, enableEventPipe: false, runAOTCompilation: true, wasmEnableThreads: false, gitHash: "e2f47b0110ed922f21a1522da67279133ce28f32", });;
|
|
5061
5061
|
var wasmImports = {
|
|
5062
5062
|
/** @export */
|
|
5063
5063
|
__assert_fail: ___assert_fail,
|
|
@@ -5217,6 +5217,44 @@ var _mono_wasm_read_as_bool_or_null_unsafe = Module['_mono_wasm_read_as_bool_or_
|
|
|
5217
5217
|
var _mono_wasm_assembly_load = Module['_mono_wasm_assembly_load'] = (a0) => (_mono_wasm_assembly_load = Module['_mono_wasm_assembly_load'] = wasmExports['mono_wasm_assembly_load'])(a0);
|
|
5218
5218
|
var _mono_wasm_assembly_find_class = Module['_mono_wasm_assembly_find_class'] = (a0, a1, a2) => (_mono_wasm_assembly_find_class = Module['_mono_wasm_assembly_find_class'] = wasmExports['mono_wasm_assembly_find_class'])(a0, a1, a2);
|
|
5219
5219
|
var _mono_wasm_assembly_find_method = Module['_mono_wasm_assembly_find_method'] = (a0, a1, a2) => (_mono_wasm_assembly_find_method = Module['_mono_wasm_assembly_find_method'] = wasmExports['mono_wasm_assembly_find_method'])(a0, a1, a2);
|
|
5220
|
+
var _mono_aot_DocumentFormat_OpenXml_get_method = Module['_mono_aot_DocumentFormat_OpenXml_get_method'] = (a0) => (_mono_aot_DocumentFormat_OpenXml_get_method = Module['_mono_aot_DocumentFormat_OpenXml_get_method'] = wasmExports['mono_aot_DocumentFormat_OpenXml_get_method'])(a0);
|
|
5221
|
+
var _mono_aot_DocumentFormat_OpenXml_Framework_get_method = Module['_mono_aot_DocumentFormat_OpenXml_Framework_get_method'] = (a0) => (_mono_aot_DocumentFormat_OpenXml_Framework_get_method = Module['_mono_aot_DocumentFormat_OpenXml_Framework_get_method'] = wasmExports['mono_aot_DocumentFormat_OpenXml_Framework_get_method'])(a0);
|
|
5222
|
+
var _memset = Module['_memset'] = (a0, a1, a2) => (_memset = Module['_memset'] = wasmExports['memset'])(a0, a1, a2);
|
|
5223
|
+
var _mono_aot_Docxodus_get_method = Module['_mono_aot_Docxodus_get_method'] = (a0) => (_mono_aot_Docxodus_get_method = Module['_mono_aot_Docxodus_get_method'] = wasmExports['mono_aot_Docxodus_get_method'])(a0);
|
|
5224
|
+
var _mono_aot_DocxodusWasm_get_method = Module['_mono_aot_DocxodusWasm_get_method'] = (a0) => (_mono_aot_DocxodusWasm_get_method = Module['_mono_aot_DocxodusWasm_get_method'] = wasmExports['mono_aot_DocxodusWasm_get_method'])(a0);
|
|
5225
|
+
var _mono_aot_System_Collections_Concurrent_get_method = Module['_mono_aot_System_Collections_Concurrent_get_method'] = (a0) => (_mono_aot_System_Collections_Concurrent_get_method = Module['_mono_aot_System_Collections_Concurrent_get_method'] = wasmExports['mono_aot_System_Collections_Concurrent_get_method'])(a0);
|
|
5226
|
+
var _mono_aot_System_Collections_get_method = Module['_mono_aot_System_Collections_get_method'] = (a0) => (_mono_aot_System_Collections_get_method = Module['_mono_aot_System_Collections_get_method'] = wasmExports['mono_aot_System_Collections_get_method'])(a0);
|
|
5227
|
+
var _mono_aot_System_Collections_Immutable_get_method = Module['_mono_aot_System_Collections_Immutable_get_method'] = (a0) => (_mono_aot_System_Collections_Immutable_get_method = Module['_mono_aot_System_Collections_Immutable_get_method'] = wasmExports['mono_aot_System_Collections_Immutable_get_method'])(a0);
|
|
5228
|
+
var _mono_aot_System_Collections_NonGeneric_get_method = Module['_mono_aot_System_Collections_NonGeneric_get_method'] = (a0) => (_mono_aot_System_Collections_NonGeneric_get_method = Module['_mono_aot_System_Collections_NonGeneric_get_method'] = wasmExports['mono_aot_System_Collections_NonGeneric_get_method'])(a0);
|
|
5229
|
+
var _mono_aot_System_Collections_Specialized_get_method = Module['_mono_aot_System_Collections_Specialized_get_method'] = (a0) => (_mono_aot_System_Collections_Specialized_get_method = Module['_mono_aot_System_Collections_Specialized_get_method'] = wasmExports['mono_aot_System_Collections_Specialized_get_method'])(a0);
|
|
5230
|
+
var _mono_aot_System_ComponentModel_get_method = Module['_mono_aot_System_ComponentModel_get_method'] = (a0) => (_mono_aot_System_ComponentModel_get_method = Module['_mono_aot_System_ComponentModel_get_method'] = wasmExports['mono_aot_System_ComponentModel_get_method'])(a0);
|
|
5231
|
+
var _mono_aot_System_ComponentModel_Primitives_get_method = Module['_mono_aot_System_ComponentModel_Primitives_get_method'] = (a0) => (_mono_aot_System_ComponentModel_Primitives_get_method = Module['_mono_aot_System_ComponentModel_Primitives_get_method'] = wasmExports['mono_aot_System_ComponentModel_Primitives_get_method'])(a0);
|
|
5232
|
+
var _mono_aot_System_ComponentModel_TypeConverter_get_method = Module['_mono_aot_System_ComponentModel_TypeConverter_get_method'] = (a0) => (_mono_aot_System_ComponentModel_TypeConverter_get_method = Module['_mono_aot_System_ComponentModel_TypeConverter_get_method'] = wasmExports['mono_aot_System_ComponentModel_TypeConverter_get_method'])(a0);
|
|
5233
|
+
var _mono_aot_System_Console_get_method = Module['_mono_aot_System_Console_get_method'] = (a0) => (_mono_aot_System_Console_get_method = Module['_mono_aot_System_Console_get_method'] = wasmExports['mono_aot_System_Console_get_method'])(a0);
|
|
5234
|
+
var _mono_aot_System_get_method = Module['_mono_aot_System_get_method'] = (a0) => (_mono_aot_System_get_method = Module['_mono_aot_System_get_method'] = wasmExports['mono_aot_System_get_method'])(a0);
|
|
5235
|
+
var _mono_aot_System_IO_Compression_get_method = Module['_mono_aot_System_IO_Compression_get_method'] = (a0) => (_mono_aot_System_IO_Compression_get_method = Module['_mono_aot_System_IO_Compression_get_method'] = wasmExports['mono_aot_System_IO_Compression_get_method'])(a0);
|
|
5236
|
+
var _mono_aot_System_IO_Packaging_get_method = Module['_mono_aot_System_IO_Packaging_get_method'] = (a0) => (_mono_aot_System_IO_Packaging_get_method = Module['_mono_aot_System_IO_Packaging_get_method'] = wasmExports['mono_aot_System_IO_Packaging_get_method'])(a0);
|
|
5237
|
+
var _mono_aot_System_IO_Pipelines_get_method = Module['_mono_aot_System_IO_Pipelines_get_method'] = (a0) => (_mono_aot_System_IO_Pipelines_get_method = Module['_mono_aot_System_IO_Pipelines_get_method'] = wasmExports['mono_aot_System_IO_Pipelines_get_method'])(a0);
|
|
5238
|
+
var _mono_aot_System_Linq_get_method = Module['_mono_aot_System_Linq_get_method'] = (a0) => (_mono_aot_System_Linq_get_method = Module['_mono_aot_System_Linq_get_method'] = wasmExports['mono_aot_System_Linq_get_method'])(a0);
|
|
5239
|
+
var _mono_aot_System_Linq_Expressions_get_method = Module['_mono_aot_System_Linq_Expressions_get_method'] = (a0) => (_mono_aot_System_Linq_Expressions_get_method = Module['_mono_aot_System_Linq_Expressions_get_method'] = wasmExports['mono_aot_System_Linq_Expressions_get_method'])(a0);
|
|
5240
|
+
var _mono_aot_System_Memory_get_method = Module['_mono_aot_System_Memory_get_method'] = (a0) => (_mono_aot_System_Memory_get_method = Module['_mono_aot_System_Memory_get_method'] = wasmExports['mono_aot_System_Memory_get_method'])(a0);
|
|
5241
|
+
var _mono_aot_System_Net_Http_get_method = Module['_mono_aot_System_Net_Http_get_method'] = (a0) => (_mono_aot_System_Net_Http_get_method = Module['_mono_aot_System_Net_Http_get_method'] = wasmExports['mono_aot_System_Net_Http_get_method'])(a0);
|
|
5242
|
+
var _mono_aot_System_Net_Primitives_get_method = Module['_mono_aot_System_Net_Primitives_get_method'] = (a0) => (_mono_aot_System_Net_Primitives_get_method = Module['_mono_aot_System_Net_Primitives_get_method'] = wasmExports['mono_aot_System_Net_Primitives_get_method'])(a0);
|
|
5243
|
+
var _mono_aot_System_ObjectModel_get_method = Module['_mono_aot_System_ObjectModel_get_method'] = (a0) => (_mono_aot_System_ObjectModel_get_method = Module['_mono_aot_System_ObjectModel_get_method'] = wasmExports['mono_aot_System_ObjectModel_get_method'])(a0);
|
|
5244
|
+
var _fmodf = Module['_fmodf'] = (a0, a1) => (_fmodf = Module['_fmodf'] = wasmExports['fmodf'])(a0, a1);
|
|
5245
|
+
var _mono_aot_corlib_get_method = Module['_mono_aot_corlib_get_method'] = (a0) => (_mono_aot_corlib_get_method = Module['_mono_aot_corlib_get_method'] = wasmExports['mono_aot_corlib_get_method'])(a0);
|
|
5246
|
+
var _mono_aot_System_Private_Uri_get_method = Module['_mono_aot_System_Private_Uri_get_method'] = (a0) => (_mono_aot_System_Private_Uri_get_method = Module['_mono_aot_System_Private_Uri_get_method'] = wasmExports['mono_aot_System_Private_Uri_get_method'])(a0);
|
|
5247
|
+
var _mono_aot_System_Private_Xml_get_method = Module['_mono_aot_System_Private_Xml_get_method'] = (a0) => (_mono_aot_System_Private_Xml_get_method = Module['_mono_aot_System_Private_Xml_get_method'] = wasmExports['mono_aot_System_Private_Xml_get_method'])(a0);
|
|
5248
|
+
var _mono_aot_System_Private_Xml_Linq_get_method = Module['_mono_aot_System_Private_Xml_Linq_get_method'] = (a0) => (_mono_aot_System_Private_Xml_Linq_get_method = Module['_mono_aot_System_Private_Xml_Linq_get_method'] = wasmExports['mono_aot_System_Private_Xml_Linq_get_method'])(a0);
|
|
5249
|
+
var _mono_aot_System_Runtime_get_method = Module['_mono_aot_System_Runtime_get_method'] = (a0) => (_mono_aot_System_Runtime_get_method = Module['_mono_aot_System_Runtime_get_method'] = wasmExports['mono_aot_System_Runtime_get_method'])(a0);
|
|
5250
|
+
var _mono_aot_System_Runtime_InteropServices_JavaScript_get_method = Module['_mono_aot_System_Runtime_InteropServices_JavaScript_get_method'] = (a0) => (_mono_aot_System_Runtime_InteropServices_JavaScript_get_method = Module['_mono_aot_System_Runtime_InteropServices_JavaScript_get_method'] = wasmExports['mono_aot_System_Runtime_InteropServices_JavaScript_get_method'])(a0);
|
|
5251
|
+
var _mono_aot_System_Security_Cryptography_get_method = Module['_mono_aot_System_Security_Cryptography_get_method'] = (a0) => (_mono_aot_System_Security_Cryptography_get_method = Module['_mono_aot_System_Security_Cryptography_get_method'] = wasmExports['mono_aot_System_Security_Cryptography_get_method'])(a0);
|
|
5252
|
+
var _mono_aot_System_Text_Encodings_Web_get_method = Module['_mono_aot_System_Text_Encodings_Web_get_method'] = (a0) => (_mono_aot_System_Text_Encodings_Web_get_method = Module['_mono_aot_System_Text_Encodings_Web_get_method'] = wasmExports['mono_aot_System_Text_Encodings_Web_get_method'])(a0);
|
|
5253
|
+
var _mono_aot_System_Text_Json_get_method = Module['_mono_aot_System_Text_Json_get_method'] = (a0) => (_mono_aot_System_Text_Json_get_method = Module['_mono_aot_System_Text_Json_get_method'] = wasmExports['mono_aot_System_Text_Json_get_method'])(a0);
|
|
5254
|
+
var _mono_aot_System_Text_RegularExpressions_get_method = Module['_mono_aot_System_Text_RegularExpressions_get_method'] = (a0) => (_mono_aot_System_Text_RegularExpressions_get_method = Module['_mono_aot_System_Text_RegularExpressions_get_method'] = wasmExports['mono_aot_System_Text_RegularExpressions_get_method'])(a0);
|
|
5255
|
+
var _mono_aot_System_Xml_Linq_get_method = Module['_mono_aot_System_Xml_Linq_get_method'] = (a0) => (_mono_aot_System_Xml_Linq_get_method = Module['_mono_aot_System_Xml_Linq_get_method'] = wasmExports['mono_aot_System_Xml_Linq_get_method'])(a0);
|
|
5256
|
+
var _mono_aot_System_Xml_XDocument_get_method = Module['_mono_aot_System_Xml_XDocument_get_method'] = (a0) => (_mono_aot_System_Xml_XDocument_get_method = Module['_mono_aot_System_Xml_XDocument_get_method'] = wasmExports['mono_aot_System_Xml_XDocument_get_method'])(a0);
|
|
5257
|
+
var _mono_aot_aot_instances_get_method = Module['_mono_aot_aot_instances_get_method'] = (a0) => (_mono_aot_aot_instances_get_method = Module['_mono_aot_aot_instances_get_method'] = wasmExports['mono_aot_aot_instances_get_method'])(a0);
|
|
5220
5258
|
var _mono_wasm_send_dbg_command_with_parms = Module['_mono_wasm_send_dbg_command_with_parms'] = (a0, a1, a2, a3, a4, a5, a6) => (_mono_wasm_send_dbg_command_with_parms = Module['_mono_wasm_send_dbg_command_with_parms'] = wasmExports['mono_wasm_send_dbg_command_with_parms'])(a0, a1, a2, a3, a4, a5, a6);
|
|
5221
5259
|
var _mono_wasm_send_dbg_command = Module['_mono_wasm_send_dbg_command'] = (a0, a1, a2, a3, a4) => (_mono_wasm_send_dbg_command = Module['_mono_wasm_send_dbg_command'] = wasmExports['mono_wasm_send_dbg_command'])(a0, a1, a2, a3, a4);
|
|
5222
5260
|
var _mono_jiterp_register_jit_call_thunk = Module['_mono_jiterp_register_jit_call_thunk'] = (a0, a1) => (_mono_jiterp_register_jit_call_thunk = Module['_mono_jiterp_register_jit_call_thunk'] = wasmExports['mono_jiterp_register_jit_call_thunk'])(a0, a1);
|
|
@@ -5227,8 +5265,6 @@ var _mono_jiterp_overflow_check_i4 = Module['_mono_jiterp_overflow_check_i4'] =
|
|
|
5227
5265
|
var _mono_jiterp_overflow_check_u4 = Module['_mono_jiterp_overflow_check_u4'] = (a0, a1, a2) => (_mono_jiterp_overflow_check_u4 = Module['_mono_jiterp_overflow_check_u4'] = wasmExports['mono_jiterp_overflow_check_u4'])(a0, a1, a2);
|
|
5228
5266
|
var _mono_jiterp_ld_delegate_method_ptr = Module['_mono_jiterp_ld_delegate_method_ptr'] = (a0, a1) => (_mono_jiterp_ld_delegate_method_ptr = Module['_mono_jiterp_ld_delegate_method_ptr'] = wasmExports['mono_jiterp_ld_delegate_method_ptr'])(a0, a1);
|
|
5229
5267
|
var _mono_jiterp_interp_entry = Module['_mono_jiterp_interp_entry'] = (a0, a1) => (_mono_jiterp_interp_entry = Module['_mono_jiterp_interp_entry'] = wasmExports['mono_jiterp_interp_entry'])(a0, a1);
|
|
5230
|
-
var _memset = Module['_memset'] = (a0, a1, a2) => (_memset = Module['_memset'] = wasmExports['memset'])(a0, a1, a2);
|
|
5231
|
-
var _fmodf = Module['_fmodf'] = (a0, a1) => (_fmodf = Module['_fmodf'] = wasmExports['fmodf'])(a0, a1);
|
|
5232
5268
|
var _fmod = Module['_fmod'] = (a0, a1) => (_fmod = Module['_fmod'] = wasmExports['fmod'])(a0, a1);
|
|
5233
5269
|
var _asin = Module['_asin'] = (a0) => (_asin = Module['_asin'] = wasmExports['asin'])(a0);
|
|
5234
5270
|
var _asinh = Module['_asinh'] = (a0) => (_asinh = Module['_asinh'] = wasmExports['asinh'])(a0);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
// src/worker-proxy.ts
|
|
2
|
+
var WorkerOperationError = class extends Error {
|
|
3
|
+
constructor(message, code) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = "WorkerOperationError";
|
|
6
|
+
this.code = code;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
function workerError(message, code) {
|
|
10
|
+
return new WorkerOperationError(message || "Unknown error", code);
|
|
11
|
+
}
|
|
12
|
+
function workerErrorCode(error) {
|
|
13
|
+
return error instanceof WorkerOperationError ? error.code : void 0;
|
|
14
|
+
}
|
|
2
15
|
function generateId() {
|
|
3
16
|
return `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
|
|
4
17
|
}
|
|
5
18
|
async function toBytes(document2) {
|
|
6
19
|
if (document2 instanceof Uint8Array) {
|
|
7
|
-
return document2;
|
|
20
|
+
return new Uint8Array(document2);
|
|
8
21
|
}
|
|
9
22
|
const buffer = await document2.arrayBuffer();
|
|
10
23
|
return new Uint8Array(buffer);
|
|
@@ -21,12 +34,32 @@ function deriveWasmBasePath() {
|
|
|
21
34
|
return "/wasm/";
|
|
22
35
|
}
|
|
23
36
|
async function createWorkerDocxodus(options) {
|
|
37
|
+
if (options?.signal?.aborted) {
|
|
38
|
+
throw new Error("Worker creation aborted");
|
|
39
|
+
}
|
|
24
40
|
const wasmBasePath = options?.wasmBasePath ?? deriveWasmBasePath();
|
|
25
|
-
let workerUrl;
|
|
26
41
|
const workerScriptPath = new URL("./docxodus.worker.js", import.meta.url).href;
|
|
27
42
|
const worker = new Worker(workerScriptPath, { type: "module" });
|
|
28
43
|
const pendingRequests = /* @__PURE__ */ new Map();
|
|
29
44
|
let isWorkerActive = true;
|
|
45
|
+
let abortListener;
|
|
46
|
+
const stopWorker = (message) => {
|
|
47
|
+
if (!isWorkerActive) return;
|
|
48
|
+
isWorkerActive = false;
|
|
49
|
+
worker.terminate();
|
|
50
|
+
for (const pending of pendingRequests.values()) {
|
|
51
|
+
pending.reject(new Error(message));
|
|
52
|
+
}
|
|
53
|
+
pendingRequests.clear();
|
|
54
|
+
if (abortListener && options?.signal) {
|
|
55
|
+
options.signal.removeEventListener("abort", abortListener);
|
|
56
|
+
abortListener = void 0;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
if (options?.signal) {
|
|
60
|
+
abortListener = () => stopWorker("Worker creation or operation aborted");
|
|
61
|
+
options.signal.addEventListener("abort", abortListener, { once: true });
|
|
62
|
+
}
|
|
30
63
|
let preparePromise = null;
|
|
31
64
|
worker.onmessage = (event) => {
|
|
32
65
|
const response = event.data;
|
|
@@ -39,16 +72,12 @@ async function createWorkerDocxodus(options) {
|
|
|
39
72
|
if (response.success) {
|
|
40
73
|
pending.resolve(response);
|
|
41
74
|
} else {
|
|
42
|
-
pending.reject(
|
|
75
|
+
pending.reject(workerError(response.error, response.errorCode));
|
|
43
76
|
}
|
|
44
77
|
}
|
|
45
78
|
};
|
|
46
79
|
worker.onerror = (error) => {
|
|
47
|
-
|
|
48
|
-
pending.reject(new Error(`Worker error: ${error.message}`));
|
|
49
|
-
}
|
|
50
|
-
pendingRequests.clear();
|
|
51
|
-
isWorkerActive = false;
|
|
80
|
+
stopWorker(`Worker error: ${error.message}`);
|
|
52
81
|
};
|
|
53
82
|
function sendRequest(request, transfer) {
|
|
54
83
|
return new Promise((resolve, reject) => {
|
|
@@ -57,31 +86,139 @@ async function createWorkerDocxodus(options) {
|
|
|
57
86
|
return;
|
|
58
87
|
}
|
|
59
88
|
pendingRequests.set(request.id, { resolve, reject });
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
89
|
+
try {
|
|
90
|
+
if (transfer && transfer.length > 0) {
|
|
91
|
+
worker.postMessage(request, transfer);
|
|
92
|
+
} else {
|
|
93
|
+
worker.postMessage(request);
|
|
94
|
+
}
|
|
95
|
+
} catch (error) {
|
|
96
|
+
pendingRequests.delete(request.id);
|
|
97
|
+
reject(error instanceof Error ? error : new Error(String(error)));
|
|
64
98
|
}
|
|
65
99
|
});
|
|
66
100
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
101
|
+
try {
|
|
102
|
+
await sendRequest({
|
|
103
|
+
id: generateId(),
|
|
104
|
+
type: "init",
|
|
105
|
+
wasmBasePath
|
|
106
|
+
});
|
|
107
|
+
} catch (error) {
|
|
108
|
+
stopWorker("Worker initialization failed");
|
|
109
|
+
throw error;
|
|
75
110
|
}
|
|
76
111
|
return {
|
|
77
|
-
async
|
|
112
|
+
async generatePackageManifest(document2, limits) {
|
|
113
|
+
const bytes = await toBytes(document2);
|
|
114
|
+
const response = await sendRequest(
|
|
115
|
+
{
|
|
116
|
+
id: generateId(),
|
|
117
|
+
type: "generatePackageManifest",
|
|
118
|
+
documentBytes: bytes,
|
|
119
|
+
limits,
|
|
120
|
+
representation: "object"
|
|
121
|
+
},
|
|
122
|
+
[bytes.buffer]
|
|
123
|
+
);
|
|
124
|
+
return response.manifest;
|
|
125
|
+
},
|
|
126
|
+
async verifyDeliverable(document2, baseline) {
|
|
127
|
+
const bytes = await toBytes(document2);
|
|
128
|
+
const baselineBytes = baseline === void 0 ? void 0 : await toBytes(baseline);
|
|
129
|
+
const transfer = [bytes.buffer];
|
|
130
|
+
if (baselineBytes !== void 0) transfer.push(baselineBytes.buffer);
|
|
131
|
+
const response = await sendRequest(
|
|
132
|
+
{
|
|
133
|
+
id: generateId(),
|
|
134
|
+
type: "verifyDeliverable",
|
|
135
|
+
documentBytes: bytes,
|
|
136
|
+
baselineBytes
|
|
137
|
+
},
|
|
138
|
+
transfer
|
|
139
|
+
);
|
|
140
|
+
if (!response.success || !response.verification) {
|
|
141
|
+
throw new Error(response.error ?? "verifyDeliverable failed");
|
|
142
|
+
}
|
|
143
|
+
return response.verification;
|
|
144
|
+
},
|
|
145
|
+
async proveRedlineReversibility(baseline, intendedFinal, redline) {
|
|
146
|
+
const baselineBytes = await toBytes(baseline);
|
|
147
|
+
const intendedFinalBytes = await toBytes(intendedFinal);
|
|
148
|
+
const redlineBytes = await toBytes(redline);
|
|
149
|
+
const response = await sendRequest(
|
|
150
|
+
{
|
|
151
|
+
id: generateId(),
|
|
152
|
+
type: "proveRedlineReversibility",
|
|
153
|
+
baselineBytes,
|
|
154
|
+
intendedFinalBytes,
|
|
155
|
+
redlineBytes
|
|
156
|
+
},
|
|
157
|
+
[baselineBytes.buffer, intendedFinalBytes.buffer, redlineBytes.buffer]
|
|
158
|
+
);
|
|
159
|
+
if (!response.success || !response.proof) {
|
|
160
|
+
throw new Error(response.error ?? "proveRedlineReversibility failed");
|
|
161
|
+
}
|
|
162
|
+
return response.proof;
|
|
163
|
+
},
|
|
164
|
+
async getSemanticChanges(left, right, settings) {
|
|
165
|
+
const leftBytes = await toBytes(left);
|
|
166
|
+
const rightBytes = await toBytes(right);
|
|
167
|
+
const response = await sendRequest(
|
|
168
|
+
{
|
|
169
|
+
id: generateId(),
|
|
170
|
+
type: "getSemanticChanges",
|
|
171
|
+
leftBytes,
|
|
172
|
+
rightBytes,
|
|
173
|
+
settings
|
|
174
|
+
},
|
|
175
|
+
[leftBytes.buffer, rightBytes.buffer]
|
|
176
|
+
);
|
|
177
|
+
return response.semanticChanges;
|
|
178
|
+
},
|
|
179
|
+
async generatePackageManifestJson(document2, limits) {
|
|
180
|
+
const bytes = await toBytes(document2);
|
|
181
|
+
const response = await sendRequest(
|
|
182
|
+
{
|
|
183
|
+
id: generateId(),
|
|
184
|
+
type: "generatePackageManifest",
|
|
185
|
+
documentBytes: bytes,
|
|
186
|
+
limits,
|
|
187
|
+
representation: "json"
|
|
188
|
+
},
|
|
189
|
+
[bytes.buffer]
|
|
190
|
+
);
|
|
191
|
+
if (response.manifestJson === void 0) {
|
|
192
|
+
throw new Error("Package manifest worker response omitted canonical JSON");
|
|
193
|
+
}
|
|
194
|
+
return response.manifestJson;
|
|
195
|
+
},
|
|
196
|
+
async projectReviewProfile(document2, profile, maximumOutputBytes) {
|
|
197
|
+
const bytes = await toBytes(document2);
|
|
198
|
+
const response = await sendRequest(
|
|
199
|
+
{
|
|
200
|
+
id: generateId(),
|
|
201
|
+
type: "projectReviewProfile",
|
|
202
|
+
documentBytes: bytes,
|
|
203
|
+
profile,
|
|
204
|
+
maximumOutputBytes
|
|
205
|
+
},
|
|
206
|
+
[bytes.buffer]
|
|
207
|
+
);
|
|
208
|
+
if (!response.documentBytes || response.documentBytes.byteLength === 0) {
|
|
209
|
+
throw new Error(`Failed to derive the ${profile} review profile`);
|
|
210
|
+
}
|
|
211
|
+
return response.documentBytes;
|
|
212
|
+
},
|
|
213
|
+
async convertDocxToHtml(document2, options2, maximumOutputBytes) {
|
|
78
214
|
const bytes = await toBytes(document2);
|
|
79
215
|
const response = await sendRequest(
|
|
80
216
|
{
|
|
81
217
|
id: generateId(),
|
|
82
218
|
type: "convertDocxToHtml",
|
|
83
219
|
documentBytes: bytes,
|
|
84
|
-
options: options2
|
|
220
|
+
options: options2,
|
|
221
|
+
maximumOutputBytes
|
|
85
222
|
},
|
|
86
223
|
[bytes.buffer]
|
|
87
224
|
);
|
|
@@ -117,14 +254,13 @@ async function createWorkerDocxodus(options) {
|
|
|
117
254
|
);
|
|
118
255
|
return response.html;
|
|
119
256
|
},
|
|
120
|
-
async getRevisions(document2
|
|
257
|
+
async getRevisions(document2) {
|
|
121
258
|
const bytes = await toBytes(document2);
|
|
122
259
|
const response = await sendRequest(
|
|
123
260
|
{
|
|
124
261
|
id: generateId(),
|
|
125
262
|
type: "getRevisions",
|
|
126
|
-
documentBytes: bytes
|
|
127
|
-
options: options2
|
|
263
|
+
documentBytes: bytes
|
|
128
264
|
},
|
|
129
265
|
[bytes.buffer]
|
|
130
266
|
);
|
|
@@ -181,6 +317,39 @@ async function createWorkerDocxodus(options) {
|
|
|
181
317
|
}
|
|
182
318
|
const handle = openResponse.handle;
|
|
183
319
|
return {
|
|
320
|
+
async getPackageManifest() {
|
|
321
|
+
const res = await sendRequest({
|
|
322
|
+
id: generateId(),
|
|
323
|
+
type: "sessionGetPackageManifest",
|
|
324
|
+
handle
|
|
325
|
+
});
|
|
326
|
+
if (!res.success || !res.manifest) {
|
|
327
|
+
throw new Error(res.error ?? "sessionGetPackageManifest failed");
|
|
328
|
+
}
|
|
329
|
+
return res.manifest;
|
|
330
|
+
},
|
|
331
|
+
async getSemanticChanges() {
|
|
332
|
+
const res = await sendRequest({
|
|
333
|
+
id: generateId(),
|
|
334
|
+
type: "sessionGetSemanticChanges",
|
|
335
|
+
handle
|
|
336
|
+
});
|
|
337
|
+
if (!res.success || !res.semanticChanges) {
|
|
338
|
+
throw new Error(res.error ?? "sessionGetSemanticChanges failed");
|
|
339
|
+
}
|
|
340
|
+
return res.semanticChanges;
|
|
341
|
+
},
|
|
342
|
+
async verifyDeliverable() {
|
|
343
|
+
const res = await sendRequest({
|
|
344
|
+
id: generateId(),
|
|
345
|
+
type: "sessionVerifyDeliverable",
|
|
346
|
+
handle
|
|
347
|
+
});
|
|
348
|
+
if (!res.success || !res.verification) {
|
|
349
|
+
throw new Error(res.error ?? "sessionVerifyDeliverable failed");
|
|
350
|
+
}
|
|
351
|
+
return res.verification;
|
|
352
|
+
},
|
|
184
353
|
async addAnnotation(anchorId, span, annotation) {
|
|
185
354
|
const res = await sendRequest({
|
|
186
355
|
id: generateId(),
|
|
@@ -244,12 +413,7 @@ async function createWorkerDocxodus(options) {
|
|
|
244
413
|
};
|
|
245
414
|
},
|
|
246
415
|
terminate() {
|
|
247
|
-
|
|
248
|
-
worker.terminate();
|
|
249
|
-
for (const pending of pendingRequests.values()) {
|
|
250
|
-
pending.reject(new Error("Worker terminated"));
|
|
251
|
-
}
|
|
252
|
-
pendingRequests.clear();
|
|
416
|
+
stopWorker("Worker terminated");
|
|
253
417
|
},
|
|
254
418
|
isActive() {
|
|
255
419
|
return isWorkerActive;
|
|
@@ -260,6 +424,8 @@ function isWorkerSupported() {
|
|
|
260
424
|
return typeof Worker !== "undefined";
|
|
261
425
|
}
|
|
262
426
|
export {
|
|
427
|
+
WorkerOperationError,
|
|
263
428
|
createWorkerDocxodus,
|
|
264
|
-
isWorkerSupported
|
|
429
|
+
isWorkerSupported,
|
|
430
|
+
workerErrorCode
|
|
265
431
|
};
|