@kodexa-ai/document-wasm-ts 8.0.0-develop-20665016781 → 8.0.0-develop-20666282928
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/KddbDocument.d.ts +0 -9
- package/dist/KddbDocument.d.ts.map +1 -1
- package/dist/KddbDocument.js +0 -19
- package/dist/KddbDocument.js.map +1 -1
- package/dist/kodexa-shared-worker.js +594 -0
- package/dist/kodexa-shared-worker.js.map +7 -0
- package/dist/kodexa-worker.js +80 -21
- package/dist/kodexa-worker.js.map +3 -3
- package/dist/kodexa.wasm +0 -0
- package/dist/worker/KodexaSharedWorker.d.ts +267 -0
- package/dist/worker/KodexaSharedWorker.d.ts.map +1 -0
- package/dist/worker/KodexaSharedWorker.js +475 -0
- package/dist/worker/KodexaSharedWorker.js.map +1 -0
- package/dist/worker/KodexaWorker.d.ts +110 -0
- package/dist/worker/KodexaWorker.d.ts.map +1 -1
- package/dist/worker/KodexaWorker.js +163 -0
- package/dist/worker/KodexaWorker.js.map +1 -1
- package/dist/worker/KodexaWorkerDocument.d.ts +183 -0
- package/dist/worker/KodexaWorkerDocument.d.ts.map +1 -1
- package/dist/worker/KodexaWorkerDocument.js +458 -0
- package/dist/worker/KodexaWorkerDocument.js.map +1 -1
- package/dist/worker/KodexaWorkerNode.d.ts +22 -0
- package/dist/worker/KodexaWorkerNode.d.ts.map +1 -1
- package/dist/worker/KodexaWorkerNode.js +64 -3
- package/dist/worker/KodexaWorkerNode.js.map +1 -1
- package/dist/worker/index.d.ts +23 -6
- package/dist/worker/index.d.ts.map +1 -1
- package/dist/worker/index.js +21 -5
- package/dist/worker/index.js.map +1 -1
- package/dist/worker/kodexa-shared-worker.d.ts +20 -0
- package/dist/worker/kodexa-shared-worker.d.ts.map +1 -0
- package/dist/worker/kodexa-shared-worker.js +460 -0
- package/dist/worker/kodexa-shared-worker.js.map +1 -0
- package/dist/worker/kodexa-worker.js +110 -22
- package/dist/worker/kodexa-worker.js.map +1 -1
- package/dist/worker/types.d.ts +76 -1
- package/dist/worker/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/worker/types.d.ts
CHANGED
|
@@ -43,10 +43,23 @@ export interface WorkerErrorMessage {
|
|
|
43
43
|
type: 'error';
|
|
44
44
|
error: string;
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* WASM event forwarded from worker to main thread.
|
|
48
|
+
* These events originate from the Go WASM runtime (e.g., kodexaDataChange events).
|
|
49
|
+
*/
|
|
50
|
+
export interface WorkerWasmEventMessage {
|
|
51
|
+
type: 'wasmEvent';
|
|
52
|
+
/** The original event type (e.g., 'kodexaDataChange') */
|
|
53
|
+
eventType: string;
|
|
54
|
+
/** The event detail/payload (typically JSON string) */
|
|
55
|
+
detail: unknown;
|
|
56
|
+
/** Document reference this event is associated with */
|
|
57
|
+
documentRef?: number;
|
|
58
|
+
}
|
|
46
59
|
/**
|
|
47
60
|
* All possible messages from worker to main thread.
|
|
48
61
|
*/
|
|
49
|
-
export type WorkerOutboundMessage = WorkerResponse | WorkerReadyMessage | WorkerErrorMessage;
|
|
62
|
+
export type WorkerOutboundMessage = WorkerResponse | WorkerReadyMessage | WorkerErrorMessage | WorkerWasmEventMessage;
|
|
50
63
|
/**
|
|
51
64
|
* Configuration for initializing the worker.
|
|
52
65
|
*/
|
|
@@ -77,4 +90,66 @@ export interface WorkerNodeData {
|
|
|
77
90
|
virtual?: boolean;
|
|
78
91
|
confidence?: number;
|
|
79
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Request message for SharedWorker (includes port identification).
|
|
95
|
+
*/
|
|
96
|
+
export interface SharedWorkerRequest extends WorkerRequest {
|
|
97
|
+
/** Identifies which port sent the request */
|
|
98
|
+
portId: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Response message for SharedWorker (includes port identification).
|
|
102
|
+
*/
|
|
103
|
+
export interface SharedWorkerResponse extends WorkerResponse {
|
|
104
|
+
/** Identifies which port should receive the response */
|
|
105
|
+
portId: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Message sent when a port connects to the SharedWorker.
|
|
109
|
+
*/
|
|
110
|
+
export interface PortConnectedMessage {
|
|
111
|
+
type: 'connected';
|
|
112
|
+
/** Unique identifier for this port/tab */
|
|
113
|
+
portId: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Message sent when worker is ready (SharedWorker variant with portId).
|
|
117
|
+
*/
|
|
118
|
+
export interface SharedWorkerReadyMessage {
|
|
119
|
+
type: 'ready';
|
|
120
|
+
/** The assigned port ID for this connection */
|
|
121
|
+
portId: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Init message for SharedWorker.
|
|
125
|
+
*/
|
|
126
|
+
export interface SharedWorkerInitMessage {
|
|
127
|
+
type: 'init';
|
|
128
|
+
config?: WorkerConfig;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Subscribe to document changes (SharedWorker).
|
|
132
|
+
*/
|
|
133
|
+
export interface SharedWorkerSubscribeMessage {
|
|
134
|
+
type: 'subscribe';
|
|
135
|
+
portId: string;
|
|
136
|
+
docRef: number;
|
|
137
|
+
pattern: string;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Unsubscribe from document changes (SharedWorker).
|
|
141
|
+
*/
|
|
142
|
+
export interface SharedWorkerUnsubscribeMessage {
|
|
143
|
+
type: 'unsubscribe';
|
|
144
|
+
portId: string;
|
|
145
|
+
docRef: number;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* All possible messages from SharedWorker to main thread.
|
|
149
|
+
*/
|
|
150
|
+
export type SharedWorkerOutboundMessage = SharedWorkerResponse | SharedWorkerReadyMessage | WorkerErrorMessage | WorkerWasmEventMessage | PortConnectedMessage;
|
|
151
|
+
/**
|
|
152
|
+
* All possible messages from main thread to SharedWorker.
|
|
153
|
+
*/
|
|
154
|
+
export type SharedWorkerInboundMessage = SharedWorkerRequest | SharedWorkerInitMessage | SharedWorkerSubscribeMessage | SharedWorkerUnsubscribeMessage;
|
|
80
155
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/worker/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/worker/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,IAAI,EAAE,OAAO,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.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kodexa-ai/document-wasm-ts",
|
|
3
|
-
"version": "8.0.0-develop-
|
|
3
|
+
"version": "8.0.0-develop-20666282928",
|
|
4
4
|
"description": "TypeScript WASM wrapper for high-performance Kodexa Document processing using Go backend",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|