@kodexa-ai/document-wasm-ts 8.0.0-develop-20663153063 → 8.0.0-develop-20664344428

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.
@@ -0,0 +1,517 @@
1
+ /**
2
+ * KodexaWorkerNode - Node Proxy for Web Worker WASM
3
+ *
4
+ * This class provides a node API that mirrors ContentNode but
5
+ * routes all operations through the web worker via RPC.
6
+ *
7
+ * Core properties (id, type, content, etc.) are hydrated at creation
8
+ * and can be accessed synchronously. Methods that require database
9
+ * operations are async and route through the worker.
10
+ */
11
+ /**
12
+ * Node proxy that routes operations to the web worker.
13
+ */
14
+ export class KodexaWorkerNode {
15
+ /**
16
+ * Create a new node proxy.
17
+ * This should not be called directly - nodes are returned from document operations.
18
+ *
19
+ * @param worker The worker instance to route calls through
20
+ * @param data The node data from the worker
21
+ */
22
+ constructor(worker, data) {
23
+ this.worker = worker;
24
+ this.disposed = false;
25
+ this.nodeRef = data.nodeRef;
26
+ this.id = data.id;
27
+ this.parentId = data.parentId ?? null;
28
+ this.type = data.type;
29
+ this.content = data.content;
30
+ this.index = data.index ?? null;
31
+ this.virtual = data.virtual ?? false;
32
+ this.confidence = data.confidence ?? null;
33
+ }
34
+ /**
35
+ * Check if the node has been disposed.
36
+ */
37
+ checkDisposed() {
38
+ if (this.disposed) {
39
+ throw new Error('Node has been disposed');
40
+ }
41
+ }
42
+ /**
43
+ * Parse JSON result, handling null and error cases.
44
+ */
45
+ parseJson(json) {
46
+ if (json === null || json === undefined || json === 'null') {
47
+ return null;
48
+ }
49
+ if (typeof json === 'string') {
50
+ try {
51
+ return JSON.parse(json);
52
+ }
53
+ catch {
54
+ return json;
55
+ }
56
+ }
57
+ return json;
58
+ }
59
+ /**
60
+ * Get the node reference (for internal use).
61
+ */
62
+ getNodeRef() {
63
+ this.checkDisposed();
64
+ return this.nodeRef;
65
+ }
66
+ /**
67
+ * Get the UUID of this node (string representation of ID).
68
+ */
69
+ get uuid() {
70
+ return this.id > 0 ? String(this.id) : '';
71
+ }
72
+ // ============================================================================
73
+ // Persistence
74
+ // ============================================================================
75
+ /**
76
+ * Save all mutable properties to the database.
77
+ *
78
+ * Modify properties directly (type, content, index, virtual, confidence),
79
+ * then call save() to persist the changes.
80
+ *
81
+ * @example
82
+ * node.content = "Updated text";
83
+ * node.type = "paragraph";
84
+ * await node.save();
85
+ */
86
+ async save() {
87
+ this.checkDisposed();
88
+ const updateData = {
89
+ type: this.type,
90
+ content: this.content,
91
+ index: this.index,
92
+ virtual: this.virtual,
93
+ confidence: this.confidence,
94
+ };
95
+ const resultJson = await this.worker.call('nodeUpdate', this.nodeRef, JSON.stringify(updateData));
96
+ if (!resultJson || resultJson === 'null') {
97
+ throw new Error('Failed to save node');
98
+ }
99
+ }
100
+ // ============================================================================
101
+ // Content Operations
102
+ // ============================================================================
103
+ /**
104
+ * Get node content (refreshes from worker).
105
+ */
106
+ async getContent() {
107
+ this.checkDisposed();
108
+ const result = await this.worker.call('nodeGetContent', this.nodeRef);
109
+ if (typeof result === 'string') {
110
+ this.content = result;
111
+ }
112
+ return this.content;
113
+ }
114
+ /**
115
+ * Set node content.
116
+ */
117
+ async setContent(content) {
118
+ this.checkDisposed();
119
+ this.content = content;
120
+ await this.save();
121
+ }
122
+ /**
123
+ * Get all content from this node and descendants.
124
+ */
125
+ async getAllContent() {
126
+ this.checkDisposed();
127
+ return this.worker.call('nodeGetAllContent', this.nodeRef);
128
+ }
129
+ // ============================================================================
130
+ // Navigation Methods
131
+ // ============================================================================
132
+ /**
133
+ * Get the parent node.
134
+ */
135
+ async getParent() {
136
+ this.checkDisposed();
137
+ const resultJson = await this.worker.call('nodeGetParent', this.nodeRef);
138
+ const data = this.parseJson(resultJson);
139
+ if (!data)
140
+ return null;
141
+ return new KodexaWorkerNode(this.worker, data);
142
+ }
143
+ /**
144
+ * Get child nodes.
145
+ */
146
+ async getChildren() {
147
+ this.checkDisposed();
148
+ const resultJson = await this.worker.call('nodeGetChildren', this.nodeRef);
149
+ const childrenData = this.parseJson(resultJson);
150
+ if (!childrenData || !Array.isArray(childrenData)) {
151
+ return [];
152
+ }
153
+ return childrenData.map(data => new KodexaWorkerNode(this.worker, data));
154
+ }
155
+ /**
156
+ * Get number of children.
157
+ */
158
+ async getChildCount() {
159
+ this.checkDisposed();
160
+ return this.worker.call('nodeGetChildCount', this.nodeRef);
161
+ }
162
+ /**
163
+ * Get a specific child by index.
164
+ */
165
+ async getChild(index) {
166
+ this.checkDisposed();
167
+ const resultJson = await this.worker.call('nodeGetChild', this.nodeRef, index);
168
+ const data = this.parseJson(resultJson);
169
+ if (!data)
170
+ return null;
171
+ return new KodexaWorkerNode(this.worker, data);
172
+ }
173
+ /**
174
+ * Get the first child.
175
+ */
176
+ async getFirstChild() {
177
+ this.checkDisposed();
178
+ const resultJson = await this.worker.call('nodeFirstChild', this.nodeRef);
179
+ const data = this.parseJson(resultJson);
180
+ if (!data)
181
+ return null;
182
+ return new KodexaWorkerNode(this.worker, data);
183
+ }
184
+ /**
185
+ * Get the last child.
186
+ */
187
+ async getLastChild() {
188
+ this.checkDisposed();
189
+ const resultJson = await this.worker.call('nodeLastChild', this.nodeRef);
190
+ const data = this.parseJson(resultJson);
191
+ if (!data)
192
+ return null;
193
+ return new KodexaWorkerNode(this.worker, data);
194
+ }
195
+ /**
196
+ * Get the next sibling.
197
+ */
198
+ async getNextSibling() {
199
+ this.checkDisposed();
200
+ const resultJson = await this.worker.call('nodeNextSibling', this.nodeRef);
201
+ const data = this.parseJson(resultJson);
202
+ if (!data)
203
+ return null;
204
+ return new KodexaWorkerNode(this.worker, data);
205
+ }
206
+ /**
207
+ * Get the previous sibling.
208
+ */
209
+ async getPreviousSibling() {
210
+ this.checkDisposed();
211
+ const resultJson = await this.worker.call('nodePreviousSibling', this.nodeRef);
212
+ const data = this.parseJson(resultJson);
213
+ if (!data)
214
+ return null;
215
+ return new KodexaWorkerNode(this.worker, data);
216
+ }
217
+ /**
218
+ * Get all siblings.
219
+ */
220
+ async getSiblings() {
221
+ this.checkDisposed();
222
+ const resultJson = await this.worker.call('nodeGetSiblings', this.nodeRef);
223
+ const siblingsData = this.parseJson(resultJson);
224
+ if (!siblingsData || !Array.isArray(siblingsData)) {
225
+ return [];
226
+ }
227
+ return siblingsData.map(data => new KodexaWorkerNode(this.worker, data));
228
+ }
229
+ /**
230
+ * Get all ancestors.
231
+ */
232
+ async getAncestors() {
233
+ this.checkDisposed();
234
+ const resultJson = await this.worker.call('nodeGetAncestors', this.nodeRef);
235
+ const ancestorsData = this.parseJson(resultJson);
236
+ if (!ancestorsData || !Array.isArray(ancestorsData)) {
237
+ return [];
238
+ }
239
+ return ancestorsData.map(data => new KodexaWorkerNode(this.worker, data));
240
+ }
241
+ /**
242
+ * Get all descendants.
243
+ */
244
+ async getDescendants() {
245
+ this.checkDisposed();
246
+ const resultJson = await this.worker.call('nodeGetDescendants', this.nodeRef);
247
+ const descendantsData = this.parseJson(resultJson);
248
+ if (!descendantsData || !Array.isArray(descendantsData)) {
249
+ return [];
250
+ }
251
+ return descendantsData.map(data => new KodexaWorkerNode(this.worker, data));
252
+ }
253
+ /**
254
+ * Check if this is the root node.
255
+ */
256
+ async isRoot() {
257
+ this.checkDisposed();
258
+ return this.worker.call('nodeIsRoot', this.nodeRef);
259
+ }
260
+ /**
261
+ * Check if this is a leaf node (no children).
262
+ */
263
+ async isLeaf() {
264
+ this.checkDisposed();
265
+ return this.worker.call('nodeIsLeaf', this.nodeRef);
266
+ }
267
+ /**
268
+ * Get the depth of this node in the tree.
269
+ */
270
+ async getDepth() {
271
+ this.checkDisposed();
272
+ return this.worker.call('nodeGetDepth', this.nodeRef);
273
+ }
274
+ /**
275
+ * Get the path of this node.
276
+ */
277
+ async getPath() {
278
+ this.checkDisposed();
279
+ return this.worker.call('nodeGetPath', this.nodeRef);
280
+ }
281
+ // ============================================================================
282
+ // Child Manipulation
283
+ // ============================================================================
284
+ /**
285
+ * Add a child node.
286
+ */
287
+ async addChild(child) {
288
+ this.checkDisposed();
289
+ await this.worker.call('nodeAddChild', this.nodeRef, child.getNodeRef());
290
+ }
291
+ /**
292
+ * Remove a child node.
293
+ */
294
+ async removeChild(child) {
295
+ this.checkDisposed();
296
+ await this.worker.call('nodeRemoveChild', this.nodeRef, child.getNodeRef());
297
+ }
298
+ /**
299
+ * Insert a child at a specific index.
300
+ */
301
+ async insertChild(child, index) {
302
+ this.checkDisposed();
303
+ await this.worker.call('nodeInsertChild', this.nodeRef, child.getNodeRef(), index);
304
+ }
305
+ // ============================================================================
306
+ // Selection
307
+ // ============================================================================
308
+ /**
309
+ * Select nodes relative to this node.
310
+ */
311
+ async select(selector) {
312
+ this.checkDisposed();
313
+ const resultJson = await this.worker.call('nodeSelect', this.nodeRef, selector);
314
+ const results = this.parseJson(resultJson);
315
+ if (!results || !Array.isArray(results)) {
316
+ return [];
317
+ }
318
+ return results.map(data => new KodexaWorkerNode(this.worker, data));
319
+ }
320
+ /**
321
+ * Select first node relative to this node.
322
+ */
323
+ async selectFirst(selector) {
324
+ this.checkDisposed();
325
+ const resultJson = await this.worker.call('nodeSelectFirst', this.nodeRef, selector);
326
+ const data = this.parseJson(resultJson);
327
+ if (!data)
328
+ return null;
329
+ return new KodexaWorkerNode(this.worker, data);
330
+ }
331
+ /**
332
+ * Check if this node matches a selector.
333
+ */
334
+ async matches(selector) {
335
+ this.checkDisposed();
336
+ return this.worker.call('nodeMatches', this.nodeRef, selector);
337
+ }
338
+ // ============================================================================
339
+ // Tags
340
+ // ============================================================================
341
+ /**
342
+ * Add a tag to this node.
343
+ */
344
+ async tag(tagName, options) {
345
+ this.checkDisposed();
346
+ if (options) {
347
+ await this.worker.call('nodeTagWithOptions', this.nodeRef, tagName, JSON.stringify(options));
348
+ }
349
+ else {
350
+ await this.worker.call('nodeTag', this.nodeRef, tagName);
351
+ }
352
+ }
353
+ /**
354
+ * Get all tags on this node.
355
+ */
356
+ async getTags() {
357
+ this.checkDisposed();
358
+ const resultJson = await this.worker.call('nodeGetTags', this.nodeRef);
359
+ const tags = this.parseJson(resultJson);
360
+ return Array.isArray(tags) ? tags : [];
361
+ }
362
+ /**
363
+ * Check if this node has a specific tag.
364
+ */
365
+ async hasTag(tagName) {
366
+ this.checkDisposed();
367
+ return this.worker.call('nodeHasTag', this.nodeRef, tagName);
368
+ }
369
+ /**
370
+ * Get the value of a tag.
371
+ */
372
+ async getTagValue(tagName) {
373
+ this.checkDisposed();
374
+ const resultJson = await this.worker.call('nodeGetTagValue', this.nodeRef, tagName);
375
+ return this.parseJson(resultJson);
376
+ }
377
+ /**
378
+ * Remove a tag from this node.
379
+ */
380
+ async removeTag(tagName) {
381
+ this.checkDisposed();
382
+ await this.worker.call('nodeRemoveTag', this.nodeRef, tagName);
383
+ }
384
+ /**
385
+ * Remove all tags from this node.
386
+ */
387
+ async removeAllTags() {
388
+ this.checkDisposed();
389
+ await this.worker.call('nodeRemoveAllTags', this.nodeRef);
390
+ }
391
+ // ============================================================================
392
+ // Features
393
+ // ============================================================================
394
+ /**
395
+ * Set a feature on this node.
396
+ */
397
+ async setFeature(featureType, name, value, config) {
398
+ this.checkDisposed();
399
+ await this.worker.call('nodeSetFeature', this.nodeRef, featureType, name, JSON.stringify(value), config ? JSON.stringify(config) : '{}');
400
+ }
401
+ /**
402
+ * Get a feature from this node.
403
+ */
404
+ async getFeature(featureType, name) {
405
+ this.checkDisposed();
406
+ const resultJson = await this.worker.call('nodeGetFeature', this.nodeRef, featureType, name);
407
+ return this.parseJson(resultJson);
408
+ }
409
+ /**
410
+ * Get all features on this node.
411
+ */
412
+ async getFeatures() {
413
+ this.checkDisposed();
414
+ const resultJson = await this.worker.call('nodeGetFeatures', this.nodeRef);
415
+ const features = this.parseJson(resultJson);
416
+ return Array.isArray(features) ? features : [];
417
+ }
418
+ /**
419
+ * Get features by type.
420
+ */
421
+ async getFeaturesByType(featureType) {
422
+ this.checkDisposed();
423
+ const resultJson = await this.worker.call('nodeGetFeaturesByType', this.nodeRef, featureType);
424
+ const features = this.parseJson(resultJson);
425
+ return Array.isArray(features) ? features : [];
426
+ }
427
+ /**
428
+ * Check if this node has a specific feature.
429
+ */
430
+ async hasFeature(featureType, name) {
431
+ this.checkDisposed();
432
+ return this.worker.call('nodeHasFeature', this.nodeRef, featureType, name);
433
+ }
434
+ /**
435
+ * Get the value of a feature.
436
+ */
437
+ async getFeatureValue(featureType, name) {
438
+ this.checkDisposed();
439
+ const resultJson = await this.worker.call('nodeGetFeatureValue', this.nodeRef, featureType, name);
440
+ return this.parseJson(resultJson);
441
+ }
442
+ /**
443
+ * Remove a feature from this node.
444
+ */
445
+ async removeFeature(featureType, name) {
446
+ this.checkDisposed();
447
+ await this.worker.call('nodeRemoveFeature', this.nodeRef, featureType, name);
448
+ }
449
+ /**
450
+ * Remove all features from this node.
451
+ */
452
+ async removeAllFeatures() {
453
+ this.checkDisposed();
454
+ await this.worker.call('nodeRemoveAllFeatures', this.nodeRef);
455
+ }
456
+ // ============================================================================
457
+ // Spatial Operations (Bounding Box)
458
+ // ============================================================================
459
+ /**
460
+ * Get the bounding box of this node.
461
+ */
462
+ async getBBox() {
463
+ this.checkDisposed();
464
+ const resultJson = await this.worker.call('nodeGetBBox', this.nodeRef);
465
+ return this.parseJson(resultJson);
466
+ }
467
+ /**
468
+ * Set the bounding box of this node.
469
+ */
470
+ async setBBox(x, y, width, height) {
471
+ this.checkDisposed();
472
+ await this.worker.call('nodeSetBBox', this.nodeRef, x, y, width, height);
473
+ }
474
+ /**
475
+ * Clear the bounding box of this node.
476
+ */
477
+ async clearBBox() {
478
+ this.checkDisposed();
479
+ await this.worker.call('nodeClearBBox', this.nodeRef);
480
+ }
481
+ /**
482
+ * Check if this node has a bounding box.
483
+ */
484
+ async hasBBox() {
485
+ this.checkDisposed();
486
+ return this.worker.call('nodeHasBBox', this.nodeRef);
487
+ }
488
+ // ============================================================================
489
+ // Serialization
490
+ // ============================================================================
491
+ /**
492
+ * Convert this node to JSON.
493
+ */
494
+ async toJson() {
495
+ this.checkDisposed();
496
+ return this.worker.call('nodeToJson', this.nodeRef);
497
+ }
498
+ // ============================================================================
499
+ // Lifecycle
500
+ // ============================================================================
501
+ /**
502
+ * Delete this node from the document.
503
+ */
504
+ async delete() {
505
+ this.checkDisposed();
506
+ await this.worker.call('nodeDelete', this.nodeRef);
507
+ this.disposed = true;
508
+ }
509
+ /**
510
+ * Dispose of this node proxy.
511
+ * Note: This only disposes the proxy, not the node in the document.
512
+ */
513
+ dispose() {
514
+ this.disposed = true;
515
+ }
516
+ }
517
+ //# sourceMappingURL=KodexaWorkerNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KodexaWorkerNode.js","sourceRoot":"","sources":["../../src/worker/KodexaWorkerNode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAuCH;;GAEG;AACH,MAAM,OAAO,gBAAgB;IAe3B;;;;;;OAMG;IACH,YACU,MAAoB,EAC5B,IAAoB;QADZ,WAAM,GAAN,MAAM,CAAc;QArBtB,aAAQ,GAAG,KAAK,CAAC;QAwBvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,KAAK,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC;IAC5C,CAAC;IAED;;OAEG;IACK,aAAa;QACnB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,wB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,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Kodexa Web Worker Module
3
+ *
4
+ * This module provides web worker support for the Kodexa Document library.
5
+ * All WASM processing happens in a dedicated worker, keeping the main thread responsive.
6
+ *
7
+ * Usage:
8
+ * ```typescript
9
+ * import { KodexaWorker } from '@kodexa-ai/document-wasm-ts/worker';
10
+ *
11
+ * const kodexa = new KodexaWorker();
12
+ * await kodexa.init();
13
+ *
14
+ * const doc = await kodexa.createDocument();
15
+ * const root = await doc.getRoot();
16
+ * const nodes = await doc.select('//paragraph');
17
+ *
18
+ * await doc.dispose();
19
+ * kodexa.terminate();
20
+ * ```
21
+ */
22
+ export { KodexaWorker } from './KodexaWorker';
23
+ export type { KodexaWorkerOptions } from './KodexaWorker';
24
+ export { KodexaWorkerDocument } from './KodexaWorkerDocument';
25
+ export type { DocumentMetadata, ContentException } from './KodexaWorkerDocument';
26
+ export { KodexaWorkerNode } from './KodexaWorkerNode';
27
+ export type { BoundingBox, ContentFeature, TagOptions } from './KodexaWorkerNode';
28
+ export type { WorkerRequest, WorkerResponse, WorkerReadyMessage, WorkerErrorMessage, WorkerOutboundMessage, WorkerConfig, WorkerNodeData, } from './types';
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/worker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAGjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGlF,YAAY,EACV,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,cAAc,GACf,MAAM,SAAS,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Kodexa Web Worker Module
3
+ *
4
+ * This module provides web worker support for the Kodexa Document library.
5
+ * All WASM processing happens in a dedicated worker, keeping the main thread responsive.
6
+ *
7
+ * Usage:
8
+ * ```typescript
9
+ * import { KodexaWorker } from '@kodexa-ai/document-wasm-ts/worker';
10
+ *
11
+ * const kodexa = new KodexaWorker();
12
+ * await kodexa.init();
13
+ *
14
+ * const doc = await kodexa.createDocument();
15
+ * const root = await doc.getRoot();
16
+ * const nodes = await doc.select('//paragraph');
17
+ *
18
+ * await doc.dispose();
19
+ * kodexa.terminate();
20
+ * ```
21
+ */
22
+ // Main proxy class
23
+ export { KodexaWorker } from './KodexaWorker';
24
+ // Document proxy
25
+ export { KodexaWorkerDocument } from './KodexaWorkerDocument';
26
+ // Node proxy
27
+ export { KodexaWorkerNode } from './KodexaWorkerNode';
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/worker/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,mBAAmB;AACnB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,iBAAiB;AACjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,aAAa;AACb,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Kodexa Web Worker Entry Point
3
+ *
4
+ * This worker owns the Go WASM instance and exposes an RPC-style API
5
+ * via postMessage. All heavy document processing happens here,
6
+ * keeping the main thread responsive.
7
+ *
8
+ * Initialization order (critical):
9
+ * 1. sql.js WASM loaded and bridge exposed to globalThis
10
+ * 2. wasm_exec.js loaded (defines globalThis.Go)
11
+ * 3. kodexa.wasm instantiated and Go runtime started
12
+ * 4. Worker signals 'ready' to main thread
13
+ */
14
+ export {};
15
+ //# sourceMappingURL=kodexa-worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kodexa-worker.d.ts","sourceRoot":"","sources":["../../src/worker/kodexa-worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}