spice-html5-react 0.1.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.
Files changed (64) hide show
  1. package/README.md +262 -0
  2. package/dist/components/SpiceDisplay.d.ts +109 -0
  3. package/dist/components/SpiceDisplay.d.ts.map +1 -0
  4. package/dist/hooks/useSpice.d.ts +107 -0
  5. package/dist/hooks/useSpice.d.ts.map +1 -0
  6. package/dist/index.cjs +14 -0
  7. package/dist/index.cjs.map +1 -0
  8. package/dist/index.d.ts +8 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.mjs +6745 -0
  11. package/dist/index.mjs.map +1 -0
  12. package/dist/protocol/bitmap.d.ts +20 -0
  13. package/dist/protocol/bitmap.d.ts.map +1 -0
  14. package/dist/protocol/cursor.d.ts +16 -0
  15. package/dist/protocol/cursor.d.ts.map +1 -0
  16. package/dist/protocol/display.d.ts +311 -0
  17. package/dist/protocol/display.d.ts.map +1 -0
  18. package/dist/protocol/enums.d.ts +677 -0
  19. package/dist/protocol/enums.d.ts.map +1 -0
  20. package/dist/protocol/filexfer.d.ts +61 -0
  21. package/dist/protocol/filexfer.d.ts.map +1 -0
  22. package/dist/protocol/index.d.ts +34 -0
  23. package/dist/protocol/index.d.ts.map +1 -0
  24. package/dist/protocol/inputs.d.ts +95 -0
  25. package/dist/protocol/inputs.d.ts.map +1 -0
  26. package/dist/protocol/lz.d.ts +24 -0
  27. package/dist/protocol/lz.d.ts.map +1 -0
  28. package/dist/protocol/main.d.ts +205 -0
  29. package/dist/protocol/main.d.ts.map +1 -0
  30. package/dist/protocol/playback.d.ts +51 -0
  31. package/dist/protocol/playback.d.ts.map +1 -0
  32. package/dist/protocol/png.d.ts +14 -0
  33. package/dist/protocol/png.d.ts.map +1 -0
  34. package/dist/protocol/port.d.ts +46 -0
  35. package/dist/protocol/port.d.ts.map +1 -0
  36. package/dist/protocol/quic.d.ts +105 -0
  37. package/dist/protocol/quic.d.ts.map +1 -0
  38. package/dist/protocol/resize.d.ts +61 -0
  39. package/dist/protocol/resize.d.ts.map +1 -0
  40. package/dist/protocol/simulatecursor.d.ts +49 -0
  41. package/dist/protocol/simulatecursor.d.ts.map +1 -0
  42. package/dist/protocol/spicearraybuffer.d.ts +44 -0
  43. package/dist/protocol/spicearraybuffer.d.ts.map +1 -0
  44. package/dist/protocol/spiceconn.d.ts +118 -0
  45. package/dist/protocol/spiceconn.d.ts.map +1 -0
  46. package/dist/protocol/spicedataview.d.ts +144 -0
  47. package/dist/protocol/spicedataview.d.ts.map +1 -0
  48. package/dist/protocol/spicemsg.d.ts +435 -0
  49. package/dist/protocol/spicemsg.d.ts.map +1 -0
  50. package/dist/protocol/spicetype.d.ts +166 -0
  51. package/dist/protocol/spicetype.d.ts.map +1 -0
  52. package/dist/protocol/ticket.d.ts +14 -0
  53. package/dist/protocol/ticket.d.ts.map +1 -0
  54. package/dist/protocol/webm.d.ts +118 -0
  55. package/dist/protocol/webm.d.ts.map +1 -0
  56. package/dist/protocol/wire.d.ts +81 -0
  57. package/dist/protocol/wire.d.ts.map +1 -0
  58. package/dist/utils/atKeynames.d.ts +96 -0
  59. package/dist/utils/atKeynames.d.ts.map +1 -0
  60. package/dist/utils/codeToScancode.d.ts +2 -0
  61. package/dist/utils/codeToScancode.d.ts.map +1 -0
  62. package/dist/utils/debug.d.ts +84 -0
  63. package/dist/utils/debug.d.ts.map +1 -0
  64. package/package.json +60 -0
@@ -0,0 +1,105 @@
1
+ import { SpiceQuicData } from './spicetype';
2
+
3
+ export declare const QuicImageType: {
4
+ readonly INVALID: 0;
5
+ readonly GRAY: 1;
6
+ readonly RGB16: 2;
7
+ readonly RGB24: 3;
8
+ readonly RGB32: 4;
9
+ readonly RGBA: 5;
10
+ };
11
+ export type QuicImageTypeValue = (typeof QuicImageType)[keyof typeof QuicImageType];
12
+ declare class QuicModel {
13
+ levels: number;
14
+ nBuckets: number;
15
+ nBucketsPtrs: number;
16
+ repfirst: number;
17
+ firstsize: number;
18
+ repnext: number;
19
+ mulsize: number;
20
+ constructor(bpc: number);
21
+ }
22
+ declare class QuicBucket {
23
+ bestcode: number;
24
+ counters: number[];
25
+ reste(bpp: number): void;
26
+ updateModel8bpc(state: CommonState, curval: number, bpp: number): void;
27
+ }
28
+ declare class QuicFamilyStat {
29
+ bucketsPtrs: QuicBucket[];
30
+ bucketsBuf: QuicBucket[];
31
+ fillModelStructures(model: QuicModel): boolean;
32
+ }
33
+ interface CorrelateRow {
34
+ zero: number;
35
+ row: number[];
36
+ }
37
+ declare class QuicChannel {
38
+ state: CommonState;
39
+ familyStat8bpc: QuicFamilyStat;
40
+ familyStat5bpc: QuicFamilyStat;
41
+ correlateRow: CorrelateRow;
42
+ model8bpc: QuicModel;
43
+ model5bpc: QuicModel;
44
+ bucketsPtrs: QuicBucket[];
45
+ constructor(model8bpc: QuicModel, model5bpc: QuicModel);
46
+ reste(bpc: number): boolean;
47
+ }
48
+ declare class CommonState {
49
+ waitcnt: number;
50
+ tabrandSeed: number;
51
+ wmTrigger: number;
52
+ wmidx: number;
53
+ wmileft: number;
54
+ melcstate: number;
55
+ melclen: number;
56
+ melcorder: number;
57
+ setWmTrigger(): void;
58
+ reste(): void;
59
+ tabrand(): number;
60
+ }
61
+ declare class QuicEncoder {
62
+ type: number;
63
+ width: number;
64
+ height: number;
65
+ ioIdx: number;
66
+ ioAvailableBits: number;
67
+ ioWord: number;
68
+ ioNextWord: number;
69
+ ioNow: Uint8Array;
70
+ ioEnd: number;
71
+ rowsCompleted: number;
72
+ rgbState: CommonState;
73
+ model8bpc: QuicModel;
74
+ model5bpc: QuicModel;
75
+ channels: QuicChannel[];
76
+ constructor();
77
+ reste(ioPtr: Uint8Array): boolean;
78
+ readIoWord(): void;
79
+ decodeEatbits(len: number): void;
80
+ decodeEat32bits(): void;
81
+ resteChannels(bpc: number): boolean;
82
+ quicDecodeBegin(ioPtr: Uint8Array): boolean;
83
+ quicRgb32UncompressRow0Seg(i: number, curRow: Uint8Array, end: number, waitmask: number, bpc: number, bpcMask: number): void;
84
+ quicRgb32UncompressRow0(curRow: Uint8Array): void;
85
+ quicRgb32UncompressRowSeg(prevRow: Uint8Array, curRow: Uint8Array, i: number, end: number, bpc: number, bpcMask: number): void;
86
+ decodeRun(state: CommonState): number;
87
+ quicRgb32UncompressRow(prevRow: Uint8Array, curRow: Uint8Array): void;
88
+ quicFourUncompressRow0Seg(channel: QuicChannel, i: number, correlateRow: CorrelateRow, curRow: Uint8Array, end: number, waitmask: number, bpc: number, bpcMask: number): void;
89
+ quicFourUncompressRow0(channel: QuicChannel, curRow: Uint8Array): void;
90
+ quicFourUncompressRowSeg(channel: QuicChannel, correlateRow: CorrelateRow, prevRow: Uint8Array, curRow: Uint8Array, i: number, end: number, bpc: number, bpcMask: number): void;
91
+ quicFourUncompressRow(channel: QuicChannel, prevRow: Uint8Array, curRow: Uint8Array): void;
92
+ quicDecode(buf: Uint8Array, stride: number): boolean;
93
+ simpleQuicDecode(buf: Uint8Array): Uint8Array | null;
94
+ }
95
+ export declare class SpiceQuic implements SpiceQuicData {
96
+ data_size: number;
97
+ outptr: Uint8Array | null;
98
+ type: number;
99
+ width: number;
100
+ height: number;
101
+ fromDataView(dv: DataView, at: number, mb: ArrayBuffer): number;
102
+ }
103
+ export declare function convertSpiceQuicToWeb(context: CanvasRenderingContext2D, spiceQuic: SpiceQuicData): ImageData | undefined;
104
+ export { QuicEncoder, QuicModel, QuicBucket, QuicChannel, QuicFamilyStat, CommonState, };
105
+ //# sourceMappingURL=quic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quic.d.ts","sourceRoot":"","sources":["../../src/protocol/quic.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAMjD,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;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EAAE,EAAE,EAAE,WAAW,GAAG,MAAM;CAelE;AAMD,wBAAgB,qBAAqB,CACjC,OAAO,EAAE,wBAAwB,EACjC,SAAS,EAAE,aAAa,GACzB,SAAS,GAAG,SAAS,CAiBvB;AA4BD,OAAO,EACH,WAAW,EACX,SAAS,EACT,UAAU,EACV,WAAW,EACX,cAAc,EACd,WAAW,GACd,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Minimal interface for a connection that supports window resize.
3
+ * Avoids importing SpiceMainConn directly to prevent circular deps.
4
+ */
5
+ export interface ResizableConnection {
6
+ /** Screen element ID */
7
+ screenId: string | undefined;
8
+ /** Message element ID */
9
+ messageId: string | undefined;
10
+ /** Send a resize request to the guest */
11
+ resizeWindow(flags: number, width: number, height: number, depth: number, x: number, y: number): void;
12
+ }
13
+ /**
14
+ * Compute the available screen dimensions and send a resize request.
15
+ *
16
+ * Width is taken from the screen element's clientWidth.
17
+ * Height is computed from the window inner height, minus the message
18
+ * area and a bottom margin, then rounded down to a multiple of 8.
19
+ *
20
+ * @param connection - The SPICE main connection
21
+ */
22
+ export declare function resizeHelper(connection: ResizableConnection): void;
23
+ /**
24
+ * Manages debounced resize events for a SPICE connection.
25
+ *
26
+ * Call `handleResize()` on each resize event; it debounces to avoid
27
+ * flooding the server with resize requests. Call `cleanup()` to
28
+ * cancel any pending timer.
29
+ */
30
+ export declare class SpiceResizeHandler {
31
+ private connection;
32
+ private resizeTimer;
33
+ private debounceMs;
34
+ /**
35
+ * @param connection - The SPICE main connection
36
+ * @param debounceMs - Debounce delay in ms (default 200)
37
+ */
38
+ constructor(connection: ResizableConnection, debounceMs?: number);
39
+ /**
40
+ * Handle a resize event. Debounces: cancels any pending timer
41
+ * and starts a new one.
42
+ */
43
+ handleResize: () => void;
44
+ /**
45
+ * Cancel any pending resize timer.
46
+ */
47
+ cleanup(): void;
48
+ }
49
+ /**
50
+ * Monitor a container element for size changes using ResizeObserver.
51
+ *
52
+ * Returns a cleanup function that disconnects the observer.
53
+ * Falls back gracefully if ResizeObserver is unavailable (SSR or old browsers).
54
+ *
55
+ * @param container - The element to observe
56
+ * @param connection - The SPICE main connection
57
+ * @param debounceMs - Debounce delay in ms (default 200)
58
+ * @returns A cleanup function, or undefined if ResizeObserver is unavailable
59
+ */
60
+ export declare function observeContainerResize(container: HTMLElement, connection: ResizableConnection, debounceMs?: number): (() => void) | undefined;
61
+ //# sourceMappingURL=resize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../src/protocol/resize.ts"],"names":[],"mappings":"AAqBA;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAEhC,wBAAwB;IACxB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,yBAAyB;IACzB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,yCAAyC;IACzC,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzG;AAmBD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,mBAAmB,GAAG,IAAI,CA2DlE;AAMD;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,WAAW,CAAwD;IAC3E,OAAO,CAAC,UAAU,CAAS;IAE3B;;;OAGG;gBACS,UAAU,EAAE,mBAAmB,EAAE,UAAU,GAAE,MAA2B;IAMpF;;;OAGG;IACH,YAAY,QAAO,IAAI,CAarB;IAEF;;OAEG;IACH,OAAO,IAAI,IAAI;CAQlB;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,WAAW,EACtB,UAAU,EAAE,mBAAmB,EAC/B,UAAU,GAAE,MAA2B,GACxC,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAqB1B"}
@@ -0,0 +1,49 @@
1
+ import { SpiceCursorHeader } from './spicetype';
2
+
3
+ export interface CursorData {
4
+ header: SpiceCursorHeader;
5
+ data: ArrayBuffer;
6
+ }
7
+ interface SimulatedCursorElement extends HTMLImageElement {
8
+ spiceScreen: HTMLElement;
9
+ spiceHotX: number;
10
+ spiceHotY: number;
11
+ }
12
+ /**
13
+ * Register a pre-loaded cursor file for a given hash.
14
+ *
15
+ * @param hash - SHA-1 hash of the cursor's PNG + hotspot
16
+ * @param value - URL to a pre-built .cur file
17
+ */
18
+ declare function addCursor(hash: string, value: string): void;
19
+ /** Owning cursor channel state needed for simulation */
20
+ export interface CursorOwner {
21
+ parent: {
22
+ screenId: string | undefined;
23
+ } | undefined;
24
+ simulatedCursor: SimulatedCursorElement | undefined;
25
+ simulatedCursorHandler: ((e: MouseEvent) => void) | undefined;
26
+ }
27
+ /**
28
+ * Attempt to simulate the cursor when CSS data URI cursors are not
29
+ * supported. First tries preloaded cursors from the cache; if that
30
+ * also fails, creates a positioned `<img>` element that tracks the
31
+ * mouse to visually represent the cursor.
32
+ *
33
+ * @param owner - The cursor channel connection (stores simulated cursor state)
34
+ * @param cursor - Cursor data with header and pixel data
35
+ * @param screen - The screen HTML element
36
+ * @param dataUrl - PNG data URI string (from createRgbaPng)
37
+ */
38
+ declare function simulateCursor(owner: CursorOwner, cursor: CursorData, screen: HTMLElement, dataUrl: string): Promise<void>;
39
+ /**
40
+ * Clean up a simulated cursor element if one exists.
41
+ */
42
+ declare function cleanupSimulatedCursor(owner: CursorOwner): void;
43
+ export declare const SpiceSimulateCursor: {
44
+ addCursor: typeof addCursor;
45
+ simulateCursor: typeof simulateCursor;
46
+ cleanupSimulatedCursor: typeof cleanupSimulatedCursor;
47
+ };
48
+ export {};
49
+ //# sourceMappingURL=simulatecursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulatecursor.d.ts","sourceRoot":"","sources":["../../src/protocol/simulatecursor.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAoBrD,MAAM,WAAW,UAAU;IAEvB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC;CACrB;AAMD,UAAU,sBAAuB,SAAQ,gBAAgB;IAErD,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACrB;AAuBD;;;;;GAKG;AACH,iBAAS,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAGpD;AAoED,wDAAwD;AACxD,MAAM,WAAW,WAAW;IAExB,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,GAAG,SAAS,CAAC;IACrD,eAAe,EAAE,sBAAsB,GAAG,SAAS,CAAC;IACpD,sBAAsB,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACjE;AAED;;;;;;;;;;GAUG;AACH,iBAAe,cAAc,CACzB,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CA2Df;AAED;;GAEG;AACH,iBAAS,sBAAsB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,CAexD;AAED,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Typed ArrayBuffer utility functions for the SPICE protocol.
3
+ *
4
+ * The original spicearraybuffer.js was a polyfill for ArrayBuffer.prototype.slice
5
+ * in IE 10. Modern browsers all support ArrayBuffer.prototype.slice natively,
6
+ * so no polyfill is needed. This module provides typed helper functions for
7
+ * common ArrayBuffer operations used throughout the protocol layer.
8
+ */
9
+ /**
10
+ * Safely slice an ArrayBuffer with bounds clamping.
11
+ *
12
+ * Behaves identically to ArrayBuffer.prototype.slice but clamps negative
13
+ * indices and out-of-bounds values instead of throwing.
14
+ *
15
+ * @param buffer - The source ArrayBuffer to slice.
16
+ * @param start - Start byte offset (inclusive). Negative values count from end. Defaults to 0.
17
+ * @param end - End byte offset (exclusive). Negative values count from end. Defaults to buffer.byteLength.
18
+ * @returns A new ArrayBuffer containing the sliced bytes.
19
+ */
20
+ declare function arrayBufferSlice(buffer: ArrayBuffer, start?: number, end?: number): ArrayBuffer;
21
+ /**
22
+ * Concatenate multiple ArrayBuffers into a single ArrayBuffer.
23
+ *
24
+ * @param buffers - The ArrayBuffers to concatenate.
25
+ * @returns A new ArrayBuffer containing all bytes in order.
26
+ */
27
+ declare function concatArrayBuffers(...buffers: ArrayBuffer[]): ArrayBuffer;
28
+ /**
29
+ * Create a new ArrayBuffer initialized with the contents of a Uint8Array.
30
+ *
31
+ * @param data - The source byte array.
32
+ * @returns A new ArrayBuffer containing a copy of the data.
33
+ */
34
+ declare function arrayBufferFromUint8Array(data: Uint8Array): ArrayBuffer;
35
+ /**
36
+ * Compare two ArrayBuffers for byte equality.
37
+ *
38
+ * @param a - First ArrayBuffer.
39
+ * @param b - Second ArrayBuffer.
40
+ * @returns true if both buffers have identical length and contents.
41
+ */
42
+ declare function arrayBuffersEqual(a: ArrayBuffer, b: ArrayBuffer): boolean;
43
+ export { arrayBufferSlice, concatArrayBuffers, arrayBufferFromUint8Array, arrayBuffersEqual, };
44
+ //# sourceMappingURL=spicearraybuffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spicearraybuffer.d.ts","sourceRoot":"","sources":["../../src/protocol/spicearraybuffer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;GAUG;AACH,iBAAS,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,WAAW,CAwBxF;AAED;;;;;GAKG;AACH,iBAAS,kBAAkB,CAAC,GAAG,OAAO,EAAE,WAAW,EAAE,GAAG,WAAW,CAgBlE;AAED;;;;;GAKG;AACH,iBAAS,yBAAyB,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,CAIhE;AAED;;;;;;GAMG;AACH,iBAAS,iBAAiB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAYlE;AAED,OAAO,EACH,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,GACpB,CAAC"}
@@ -0,0 +1,118 @@
1
+ import { SpiceLinkHeader, SpiceLinkReply, SpiceLinkAuthReply, SpiceMiniData } from './spicemsg';
2
+ import { SpiceWireReader, WireOwner } from './wire';
3
+
4
+ /**
5
+ * Connection states for the SPICE handshake and session lifecycle.
6
+ *
7
+ * Flow: connecting -> start -> link -> ticket -> ready
8
+ * Error/close transitions can happen from any state.
9
+ */
10
+ export declare const ConnectionState: {
11
+ /** WebSocket is connecting (initial state). */
12
+ readonly CONNECTING: "connecting";
13
+ /** WebSocket opened; link header sent, awaiting server link header. */
14
+ readonly START: "start";
15
+ /** Server link header received; awaiting server link reply. */
16
+ readonly LINK: "link";
17
+ /** Link reply received; ticket sent, awaiting auth reply. */
18
+ readonly TICKET: "ticket";
19
+ /** Authenticated; processing protocol messages. */
20
+ readonly READY: "ready";
21
+ /** Connection is closing (intentional close). */
22
+ readonly CLOSING: "closing";
23
+ /** An error occurred. */
24
+ readonly ERROR: "error";
25
+ };
26
+ export type ConnectionStateValue = typeof ConnectionState[keyof typeof ConnectionState];
27
+ /**
28
+ * Options for constructing a SpiceConn instance.
29
+ */
30
+ export interface SpiceConnOptions {
31
+ /** WebSocket URI (e.g. "wss://host:port"). */
32
+ uri: string;
33
+ /** Connection ID (session ID for sub-channels; 0 for main channel). */
34
+ connectionId?: number;
35
+ /** SPICE channel type (from SpiceChannel.*). */
36
+ type?: number;
37
+ /** Channel ID (for multi-head, typically 0). */
38
+ chanId?: number;
39
+ /** Parent connection (for sub-channels that inherit password and messageId). */
40
+ parent?: SpiceConn;
41
+ /** Screen element ID for display rendering. */
42
+ screenId?: string;
43
+ /** Element ID for debug canvas dumps. */
44
+ dumpId?: string;
45
+ /** Element ID for message logging to the DOM. */
46
+ messageId?: string;
47
+ /** Password for SPICE ticket authentication. */
48
+ password?: string;
49
+ /** Error callback. */
50
+ onerror?: (e: Error) => void;
51
+ /** Success callback. */
52
+ onsuccess?: (m: string) => void;
53
+ /** Agent ready callback. */
54
+ onagent?: () => void;
55
+ }
56
+ /**
57
+ * Base SPICE connection class. Manages WebSocket lifecycle,
58
+ * SPICE link handshake, ticket authentication, and common
59
+ * message handling (SET_ACK, PING/PONG, NOTIFY).
60
+ *
61
+ * Channel-specific subclasses (Main, Display, Inputs, Cursor,
62
+ * Playback, Port) extend this class and override
63
+ * `processChannelMessage()` to handle their own message types.
64
+ */
65
+ export declare class SpiceConn implements WireOwner {
66
+ ws: WebSocket;
67
+ connectionId: number;
68
+ type: number;
69
+ state: ConnectionStateValue;
70
+ chanId: number;
71
+ parent: SpiceConn | undefined;
72
+ screenId: string | undefined;
73
+ dumpId: string | undefined;
74
+ messageId: string | undefined;
75
+ password: string;
76
+ onerror: ((e: Error) => void) | undefined;
77
+ onsuccess: ((m: string) => void) | undefined;
78
+ onagent: (() => void) | undefined;
79
+ wireReader: SpiceWireReader;
80
+ messagesSent: number;
81
+ ackWindow: number;
82
+ msgsUntilAck: number | undefined;
83
+ replyHdr: SpiceLinkHeader | undefined;
84
+ replyLink: SpiceLinkReply | undefined;
85
+ authReply: SpiceLinkAuthReply | undefined;
86
+ private warnings;
87
+ private timeout;
88
+ constructor(options: SpiceConnOptions);
89
+ private sendHdr;
90
+ private sendTicket;
91
+ sendMsg(msg: SpiceMiniData): void;
92
+ private processInbound;
93
+ private processCommonMessages;
94
+ private processMessage;
95
+ /**
96
+ * Process a channel-specific message. Subclasses should override
97
+ * this method to handle their own message types.
98
+ *
99
+ * @param msg - The SPICE mini-data message to process
100
+ * @returns true if the message was handled, false otherwise
101
+ */
102
+ protected processChannelMessage(msg: SpiceMiniData): boolean;
103
+ channelType(): string;
104
+ logInfo(...args: string[]): void;
105
+ logWarn(...args: string[]): void;
106
+ logErr(...args: string[]): void;
107
+ knownUnimplemented(type: number, msg: string): void;
108
+ reportError(e: Error): void;
109
+ reportSuccess(m: string): void;
110
+ /**
111
+ * Clean disconnect: close WebSocket, clear timers, detach wire reader.
112
+ * Call this when the connection is being intentionally torn down.
113
+ */
114
+ cleanup(): void;
115
+ private handleTimeout;
116
+ }
117
+ export { SpiceConn as default };
118
+ //# sourceMappingURL=spiceconn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spiceconn.d.ts","sourceRoot":"","sources":["../../src/protocol/spiceconn.ts"],"names":[],"mappings":"AAyBA,OAAO,EACH,eAAe,EAEf,cAAc,EAEd,kBAAkB,EAClB,aAAa,EAMhB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AASpD;;;;;GAKG;AACH,eAAO,MAAM,eAAe;IACxB,+CAA+C;;IAE/C,uEAAuE;;IAEvE,+DAA+D;;IAE/D,6DAA6D;;IAE7D,mDAAmD;;IAEnD,iDAAiD;;IAEjD,yBAAyB;;CAEnB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAC5B,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAMzD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IAEZ,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,gFAAgF;IAChF,MAAM,CAAC,EAAE,SAAS,CAAC;I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AE,eAAe,GAAG,SAAS,CAAC;IACtC,SAAS,EAAE,cAAc,GAAG,SAAS,CAAC;IACtC,SAAS,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAG1C,OAAO,CAAC,QAAQ,CAA+B;IAG/C,OAAO,CAAC,OAAO,CAA4C;gBAE/C,OAAO,EAAE,gBAAgB;IA6HrC,OAAO,CAAC,OAAO;IA2Df,OAAO,CAAC,UAAU;IAiBlB,OAAO,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI;IAcjC,OAAO,CAAC,cAAc;IAuItB,OAAO,CAAC,qBAAqB;IAkE7B,OAAO,CAAC,cAAc;IAuCtB;;;;;;OAMG;IACH,SAAS,CAAC,qBAAqB,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO;IAU5D,WAAW,IAAI,MAAM;IAuBrB,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;IAiBhC,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;IAiBhC,MAAM,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI;IAqB/B,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAkBnD,WAAW,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;IAa3B,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAY9B;;;OAGG;IACH,OAAO,IAAI,IAAI;IAsBf,OAAO,CAAC,aAAa;CAKxB;AAED,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,CAAC"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Typed DataView wrapper for the SPICE protocol.
3
+ *
4
+ * The original spicedataview.js was a manual DataView polyfill for old
5
+ * Firefox versions that lacked DataView support. Modern browsers all
6
+ * provide DataView natively, so no polyfill is needed.
7
+ *
8
+ * This module provides:
9
+ * - SpiceDataView: a thin typed wrapper around the standard DataView
10
+ * with SPICE-specific convenience methods (e.g., 64-bit BigInt reads,
11
+ * typed sub-view creation).
12
+ * - Helper functions for creating DataViews from various sources.
13
+ *
14
+ * Per codebase convention, new protocol code should use standard DataView
15
+ * directly with getBigUint64/setBigUint64 for 64-bit fields (bigint).
16
+ * This module exists for compatibility and as a typed alternative.
17
+ */
18
+ /**
19
+ * A typed wrapper around standard DataView with SPICE-specific conveniences.
20
+ *
21
+ * Provides the same API as DataView, plus:
22
+ * - Getters/setters for 64-bit unsigned integers as bigint (delegates to
23
+ * standard getBigUint64/setBigUint64)
24
+ * - A subview() method for creating DataViews over sub-regions
25
+ * - Access to the underlying Uint8Array for byte-level operations
26
+ * - A remaining() helper for protocol message parsing
27
+ */
28
+ declare class SpiceDataView {
29
+ /** The underlying standard DataView. */
30
+ readonly dv: DataView;
31
+ /** The underlying buffer as a Uint8Array for direct byte access. */
32
+ readonly u8: Uint8Array;
33
+ /**
34
+ * Create a SpiceDataView over an ArrayBuffer or ArrayBufferLike.
35
+ *
36
+ * @param buffer - The source buffer.
37
+ * @param byteOffset - Optional byte offset into the buffer. Defaults to 0.
38
+ * @param byteLength - Optional number of bytes. Defaults to remainder of buffer.
39
+ */
40
+ constructor(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number);
41
+ /** The ArrayBuffer backing this view. */
42
+ get buffer(): ArrayBufferLike;
43
+ /** The byte offset into the buffer. */
44
+ get byteOffset(): number;
45
+ /** The byte length of this view. */
46
+ get byteLength(): number;
47
+ getUint8(byteOffset: number): number;
48
+ getInt8(byteOffset: number): number;
49
+ getUint16(byteOffset: number, littleEndian?: boolean): number;
50
+ getInt16(byteOffset: number, littleEndian?: boolean): number;
51
+ getUint32(byteOffset: number, littleEndian?: boolean): number;
52
+ getInt32(byteOffset: number, littleEndian?: boolean): number;
53
+ getFloat32(byteOffset: number, littleEndian?: boolean): number;
54
+ getFloat64(byteOffset: number, littleEndian?: boolean): number;
55
+ /**
56
+ * Read an unsigned 64-bit integer as a bigint.
57
+ *
58
+ * The original SpiceDataView.getUint64 returned a lossy JavaScript number.
59
+ * This version uses the standard getBigUint64 for full precision.
60
+ */
61
+ getBigUint64(byteOffset: number, littleEndian?: boolean): bigint;
62
+ /**
63
+ * Read a signed 64-bit integer as a bigint.
64
+ */
65
+ getBigInt64(byteOffset: number, littleEndian?: boolean): bigint;
66
+ setUint8(byteOffset: number, value: number): void;
67
+ setInt8(byteOffset: number, value: number): void;
68
+ setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
69
+ setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
70
+ setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
71
+ setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
72
+ setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
73
+ setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
74
+ /**
75
+ * Write an unsigned 64-bit integer from a bigint.
76
+ *
77
+ * The original SpiceDataView.setUint64 accepted a lossy JavaScript number.
78
+ * This version uses the standard setBigUint64 for full precision.
79
+ */
80
+ setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
81
+ /**
82
+ * Write a signed 64-bit integer from a bigint.
83
+ */
84
+ setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void;
85
+ /**
86
+ * Create a sub-view of this SpiceDataView.
87
+ *
88
+ * Useful for parsing nested protocol structures at a known offset.
89
+ *
90
+ * @param byteOffset - Offset relative to this view's start.
91
+ * @param byteLength - Optional length. Defaults to remainder.
92
+ * @returns A new SpiceDataView over the sub-region.
93
+ */
94
+ subview(byteOffset: number, byteLength?: number): SpiceDataView;
95
+ /**
96
+ * Get the number of bytes remaining from the given offset to the end.
97
+ *
98
+ * Useful during protocol message parsing to determine how many bytes
99
+ * are left for variable-length trailing data.
100
+ *
101
+ * @param currentOffset - The current parse offset within this view.
102
+ * @returns Number of remaining bytes.
103
+ */
104
+ remaining(currentOffset: number): number;
105
+ /**
106
+ * Extract a copy of a byte range as a new Uint8Array.
107
+ *
108
+ * @param byteOffset - Start offset within this view.
109
+ * @param byteLength - Number of bytes to extract. Defaults to remainder.
110
+ * @returns A new Uint8Array copy of the specified range.
111
+ */
112
+ getBytes(byteOffset: number, byteLength?: number): Uint8Array;
113
+ /**
114
+ * Copy bytes into this view's buffer at the given offset.
115
+ *
116
+ * @param byteOffset - Destination offset within this view.
117
+ * @param data - Source bytes to copy.
118
+ */
119
+ setBytes(byteOffset: number, data: Uint8Array): void;
120
+ }
121
+ /**
122
+ * Create a SpiceDataView from an ArrayBuffer.
123
+ *
124
+ * @param buffer - The source ArrayBuffer.
125
+ * @param byteOffset - Optional byte offset.
126
+ * @param byteLength - Optional byte length.
127
+ * @returns A new SpiceDataView.
128
+ */
129
+ declare function createSpiceDataView(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): SpiceDataView;
130
+ /**
131
+ * Create a standard DataView from an ArrayBuffer.
132
+ *
133
+ * Convenience function that mirrors the original SpiceDataView constructor
134
+ * signature but returns a standard DataView. Useful for migrating call sites
135
+ * incrementally.
136
+ *
137
+ * @param buffer - The source ArrayBuffer.
138
+ * @param byteOffset - Optional byte offset.
139
+ * @param byteLength - Optional byte length.
140
+ * @returns A new standard DataView.
141
+ */
142
+ declare function createDataView(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView;
143
+ export { SpiceDataView, createSpiceDataView, createDataView, };
144
+ //# sourceMappingURL=spicedataview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spicedataview.d.ts","sourceRoot":"","sources":["../../src/protocol/spicedataview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;GASG;AACH,cAAM,aAAa;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACtB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IAExB;;;;;;OAMG;gBACS,MAAM,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CA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