@illgrenoble/webx-client 0.10.0 → 1.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 (158) hide show
  1. package/dist/WebXClient.d.ts +156 -16
  2. package/dist/WebXClient.js +170 -16
  3. package/dist/WebXClient.js.map +1 -1
  4. package/dist/display/WebXCursor.d.ts +65 -0
  5. package/dist/display/WebXCursor.js +65 -0
  6. package/dist/display/WebXCursor.js.map +1 -1
  7. package/dist/display/WebXCursorFactory.d.ts +18 -0
  8. package/dist/display/WebXCursorFactory.js +39 -16
  9. package/dist/display/WebXCursorFactory.js.map +1 -1
  10. package/dist/display/WebXDisplay.d.ts +150 -9
  11. package/dist/display/WebXDisplay.js +154 -9
  12. package/dist/display/WebXDisplay.js.map +1 -1
  13. package/dist/display/WebXSubImage.d.ts +42 -11
  14. package/dist/display/WebXSubImage.js +18 -12
  15. package/dist/display/WebXSubImage.js.map +1 -1
  16. package/dist/display/WebXTextureFactory.d.ts +30 -0
  17. package/dist/display/WebXTextureFactory.js +56 -19
  18. package/dist/display/WebXTextureFactory.js.map +1 -1
  19. package/dist/display/WebXWindow.d.ts +152 -0
  20. package/dist/display/WebXWindow.js +152 -0
  21. package/dist/display/WebXWindow.js.map +1 -1
  22. package/dist/display/WebXWindowProperties.d.ts +31 -6
  23. package/dist/display/WebXWindowProperties.js +16 -9
  24. package/dist/display/WebXWindowProperties.js.map +1 -1
  25. package/dist/input/WebXKeyboard.d.ts +40 -5
  26. package/dist/input/WebXKeyboard.js +52 -14
  27. package/dist/input/WebXKeyboard.js.map +1 -1
  28. package/dist/input/WebXMouse.d.ts +9 -0
  29. package/dist/input/WebXMouse.js +9 -4
  30. package/dist/input/WebXMouse.js.map +1 -1
  31. package/dist/input/keyboard/WebXKeyEvent.d.ts +35 -3
  32. package/dist/input/keyboard/WebXKeyEvent.js +115 -3
  33. package/dist/input/keyboard/WebXKeyEvent.js.map +1 -1
  34. package/dist/input/keyboard/WebXKeyPressEvent.d.ts +25 -8
  35. package/dist/input/keyboard/WebXKeyPressEvent.js +29 -11
  36. package/dist/input/keyboard/WebXKeyPressEvent.js.map +1 -1
  37. package/dist/input/keyboard/WebXKeyUpEvent.d.ts +30 -9
  38. package/dist/input/keyboard/WebXKeyUpEvent.js +19 -16
  39. package/dist/input/keyboard/WebXKeyUpEvent.js.map +1 -1
  40. package/dist/input/keyboard/WebXKeyboardModifierState.d.ts +69 -8
  41. package/dist/input/keyboard/WebXKeyboardModifierState.js +69 -8
  42. package/dist/input/keyboard/WebXKeyboardModifierState.js.map +1 -1
  43. package/dist/input/keyboard/WebXKeyboardUtils.d.ts +18 -2
  44. package/dist/input/keyboard/WebXKeyboardUtils.js +18 -2
  45. package/dist/input/keyboard/WebXKeyboardUtils.js.map +1 -1
  46. package/dist/input/keyboard/WebXKeydownEvent.d.ts +26 -9
  47. package/dist/input/keyboard/WebXKeydownEvent.js +17 -22
  48. package/dist/input/keyboard/WebXKeydownEvent.js.map +1 -1
  49. package/dist/input/mouse/WebXMouseState.d.ts +113 -2
  50. package/dist/input/mouse/WebXMouseState.js +104 -2
  51. package/dist/input/mouse/WebXMouseState.js.map +1 -1
  52. package/dist/instruction/WebXConnectInstruction.d.ts +16 -1
  53. package/dist/instruction/WebXConnectInstruction.js +13 -1
  54. package/dist/instruction/WebXConnectInstruction.js.map +1 -1
  55. package/dist/instruction/WebXCursorImageInstruction.d.ts +15 -3
  56. package/dist/instruction/WebXCursorImageInstruction.js +12 -5
  57. package/dist/instruction/WebXCursorImageInstruction.js.map +1 -1
  58. package/dist/instruction/WebXDataAckInstruction.d.ts +22 -5
  59. package/dist/instruction/WebXDataAckInstruction.js +15 -9
  60. package/dist/instruction/WebXDataAckInstruction.js.map +1 -1
  61. package/dist/instruction/WebXImageInstruction.d.ts +14 -3
  62. package/dist/instruction/WebXImageInstruction.js +11 -7
  63. package/dist/instruction/WebXImageInstruction.js.map +1 -1
  64. package/dist/instruction/WebXInstruction.d.ts +26 -10
  65. package/dist/instruction/WebXInstruction.js +19 -25
  66. package/dist/instruction/WebXInstruction.js.map +1 -1
  67. package/dist/instruction/WebXInstructionResponse.d.ts +55 -2
  68. package/dist/instruction/WebXInstructionResponse.js +40 -2
  69. package/dist/instruction/WebXInstructionResponse.js.map +1 -1
  70. package/dist/instruction/WebXInstructionType.d.ts +40 -0
  71. package/dist/instruction/WebXInstructionType.js +40 -0
  72. package/dist/instruction/WebXInstructionType.js.map +1 -1
  73. package/dist/instruction/WebXKeyboardInstruction.d.ts +19 -6
  74. package/dist/instruction/WebXKeyboardInstruction.js +13 -14
  75. package/dist/instruction/WebXKeyboardInstruction.js.map +1 -1
  76. package/dist/instruction/WebXMouseInstruction.d.ts +24 -9
  77. package/dist/instruction/WebXMouseInstruction.js +15 -21
  78. package/dist/instruction/WebXMouseInstruction.js.map +1 -1
  79. package/dist/instruction/WebXPongInstruction.d.ts +15 -3
  80. package/dist/instruction/WebXPongInstruction.js +12 -5
  81. package/dist/instruction/WebXPongInstruction.js.map +1 -1
  82. package/dist/instruction/WebXQualityInstruction.d.ts +16 -4
  83. package/dist/instruction/WebXQualityInstruction.js +13 -8
  84. package/dist/instruction/WebXQualityInstruction.js.map +1 -1
  85. package/dist/instruction/WebXScreenInstruction.d.ts +8 -0
  86. package/dist/instruction/WebXScreenInstruction.js +8 -0
  87. package/dist/instruction/WebXScreenInstruction.js.map +1 -1
  88. package/dist/instruction/WebXWindowsInstruction.d.ts +9 -0
  89. package/dist/instruction/WebXWindowsInstruction.js +9 -0
  90. package/dist/instruction/WebXWindowsInstruction.js.map +1 -1
  91. package/dist/message/WebXCursorImageMessage.d.ts +42 -13
  92. package/dist/message/WebXCursorImageMessage.js +24 -25
  93. package/dist/message/WebXCursorImageMessage.js.map +1 -1
  94. package/dist/message/WebXImageMessage.d.ts +37 -11
  95. package/dist/message/WebXImageMessage.js +22 -21
  96. package/dist/message/WebXImageMessage.js.map +1 -1
  97. package/dist/message/WebXMessage.d.ts +22 -6
  98. package/dist/message/WebXMessage.js +15 -9
  99. package/dist/message/WebXMessage.js.map +1 -1
  100. package/dist/message/WebXMessageType.d.ts +35 -0
  101. package/dist/message/WebXMessageType.js +35 -0
  102. package/dist/message/WebXMessageType.js.map +1 -1
  103. package/dist/message/WebXMouseMessage.d.ts +27 -7
  104. package/dist/message/WebXMouseMessage.js +18 -13
  105. package/dist/message/WebXMouseMessage.js.map +1 -1
  106. package/dist/message/WebXPingMessage.d.ts +9 -0
  107. package/dist/message/WebXPingMessage.js +9 -0
  108. package/dist/message/WebXPingMessage.js.map +1 -1
  109. package/dist/message/WebXQualityMessage.d.ts +36 -11
  110. package/dist/message/WebXQualityMessage.js +21 -21
  111. package/dist/message/WebXQualityMessage.js.map +1 -1
  112. package/dist/message/WebXScreenMessage.d.ts +17 -3
  113. package/dist/message/WebXScreenMessage.js +14 -5
  114. package/dist/message/WebXScreenMessage.js.map +1 -1
  115. package/dist/message/WebXSubImagesMessage.d.ts +27 -7
  116. package/dist/message/WebXSubImagesMessage.js +18 -13
  117. package/dist/message/WebXSubImagesMessage.js.map +1 -1
  118. package/dist/message/WebXWindowsMessage.d.ts +17 -3
  119. package/dist/message/WebXWindowsMessage.js +14 -5
  120. package/dist/message/WebXWindowsMessage.js.map +1 -1
  121. package/dist/tracer/WebXDebugImageMessageHandler.d.ts +30 -0
  122. package/dist/tracer/WebXDebugImageMessageHandler.js +30 -0
  123. package/dist/tracer/WebXDebugImageMessageHandler.js.map +1 -1
  124. package/dist/tracer/WebXHandler.d.ts +11 -0
  125. package/dist/tracer/WebXInstructionHandler.d.ts +17 -0
  126. package/dist/tracer/WebXInstructionHandler.js +6 -0
  127. package/dist/tracer/WebXInstructionHandler.js.map +1 -1
  128. package/dist/tracer/WebXMessageHandler.d.ts +17 -0
  129. package/dist/tracer/WebXMessageHandler.js +6 -0
  130. package/dist/tracer/WebXMessageHandler.js.map +1 -1
  131. package/dist/tracer/WebXStatsHandler.d.ts +16 -0
  132. package/dist/tracer/WebXStatsHandler.js +6 -0
  133. package/dist/tracer/WebXStatsHandler.js.map +1 -1
  134. package/dist/transport/WebXBinarySerializer.d.ts +20 -0
  135. package/dist/transport/WebXBinarySerializer.js +20 -0
  136. package/dist/transport/WebXBinarySerializer.js.map +1 -1
  137. package/dist/transport/WebXInstructionBuffer.d.ts +19 -0
  138. package/dist/transport/WebXInstructionBuffer.js +19 -0
  139. package/dist/transport/WebXInstructionBuffer.js.map +1 -1
  140. package/dist/transport/WebXInstructionEncoder.d.ts +138 -0
  141. package/dist/transport/WebXInstructionEncoder.js +138 -110
  142. package/dist/transport/WebXInstructionEncoder.js.map +1 -1
  143. package/dist/transport/WebXMessageBuffer.d.ts +63 -8
  144. package/dist/transport/WebXMessageBuffer.js +51 -16
  145. package/dist/transport/WebXMessageBuffer.js.map +1 -1
  146. package/dist/transport/WebXMessageDecoder.d.ts +69 -0
  147. package/dist/transport/WebXMessageDecoder.js +96 -18
  148. package/dist/transport/WebXMessageDecoder.js.map +1 -1
  149. package/dist/tunnel/WebXTunnel.d.ts +71 -0
  150. package/dist/tunnel/WebXTunnel.js +51 -4
  151. package/dist/tunnel/WebXTunnel.js.map +1 -1
  152. package/dist/tunnel/WebXWebSocketTunnel.d.ts +26 -0
  153. package/dist/tunnel/WebXWebSocketTunnel.js +26 -0
  154. package/dist/tunnel/WebXWebSocketTunnel.js.map +1 -1
  155. package/dist/utils/ColorGenerator.d.ts +19 -0
  156. package/dist/utils/ColorGenerator.js +19 -0
  157. package/dist/utils/ColorGenerator.js.map +1 -1
  158. package/package.json +1 -1
@@ -3,29 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebXQualityMessage = void 0;
4
4
  const WebXMessage_1 = require("./WebXMessage");
5
5
  const WebXMessageType_1 = require("./WebXMessageType");
6
+ /**
7
+ * Represents a message containing quality-related information.
8
+ *
9
+ * This message is received from the WebX Engine and contains details about
10
+ * the quality settings.
11
+ */
6
12
  class WebXQualityMessage extends WebXMessage_1.WebXMessage {
7
- get index() {
8
- return this._index;
9
- }
10
- get imageFPS() {
11
- return this._imageFPS;
12
- }
13
- get rgbQuality() {
14
- return this._rgbQuality;
15
- }
16
- get alphaQuality() {
17
- return this._alphaQuality;
18
- }
19
- get maxMbps() {
20
- return this._maxMbps;
21
- }
22
- constructor(_index, _imageFPS, _rgbQuality, _alphaQuality, _maxMbps) {
13
+ /**
14
+ * Constructs a new WebXQualityMessage.
15
+ *
16
+ * @param index The quality index.
17
+ * @param imageFPS The frames per second for image rendering.
18
+ * @param rgbQuality The quality level for RGB data.
19
+ * @param alphaQuality The quality level for alpha data.
20
+ * @param maxMbps The maximum bandwidth in Mbps.
21
+ */
22
+ constructor(index, imageFPS, rgbQuality, alphaQuality, maxMbps) {
23
23
  super(WebXMessageType_1.WebXMessageType.QUALITY);
24
- this._index = _index;
25
- this._imageFPS = _imageFPS;
26
- this._rgbQuality = _rgbQuality;
27
- this._alphaQuality = _alphaQuality;
28
- this._maxMbps = _maxMbps;
24
+ this.index = index;
25
+ this.imageFPS = imageFPS;
26
+ this.rgbQuality = rgbQuality;
27
+ this.alphaQuality = alphaQuality;
28
+ this.maxMbps = maxMbps;
29
29
  }
30
30
  }
31
31
  exports.WebXQualityMessage = WebXQualityMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"WebXQualityMessage.js","sourceRoot":"","sources":["../../src/message/WebXQualityMessage.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,uDAAoD;AAEpD,MAAa,kBAAmB,SAAQ,yBAAW;IAEjD,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,YAAoB,MAAc,EAAU,SAAiB,EAAU,WAAmB,EAAU,aAAqB,EAAU,QAAgB;QACjJ,KAAK,CAAC,iCAAe,CAAC,OAAO,CAAC,CAAC;QADb,WAAM,GAAN,MAAM,CAAQ;QAAU,cAAS,GAAT,SAAS,CAAQ;QAAU,gBAAW,GAAX,WAAW,CAAQ;QAAU,kBAAa,GAAb,aAAa,CAAQ;QAAU,aAAQ,GAAR,QAAQ,CAAQ;IAEnJ,CAAC;CACF;AAzBD,gDAyBC"}
1
+ {"version":3,"file":"WebXQualityMessage.js","sourceRoot":"","sources":["../../src/message/WebXQualityMessage.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,uDAAoD;AAEpD;;;;;GAKG;AACH,MAAa,kBAAmB,SAAQ,yBAAW;IA0BjD;;;;;;;;OAQG;IACH,YAAY,KAAa,EAAE,QAAgB,EAAE,UAAkB,EAAE,YAAoB,EAAE,OAAe;QACpG,KAAK,CAAC,iCAAe,CAAC,OAAO,CAAC,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AA3CD,gDA2CC"}
@@ -1,11 +1,25 @@
1
1
  import { WebXMessage } from './WebXMessage';
2
+ /**
3
+ * Represents a message containing screen information.
4
+ *
5
+ * This message is received from the WebX Engine and contains details about
6
+ * the screen size.
7
+ */
2
8
  export declare class WebXScreenMessage extends WebXMessage {
3
- private _screenSize;
4
- get screenSize(): {
9
+ /**
10
+ * The size of the screen.
11
+ */
12
+ readonly screenSize: {
5
13
  width: number;
6
14
  height: number;
7
15
  };
8
- constructor(_screenSize: {
16
+ /**
17
+ * Constructs a new WebXScreenMessage.
18
+ *
19
+ * @param screenSize The size of the screen.
20
+ * @param commandId The ID of the command associated with this message.
21
+ */
22
+ constructor(screenSize: {
9
23
  width: number;
10
24
  height: number;
11
25
  }, commandId: number);
@@ -3,13 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebXScreenMessage = void 0;
4
4
  const WebXMessage_1 = require("./WebXMessage");
5
5
  const WebXMessageType_1 = require("./WebXMessageType");
6
+ /**
7
+ * Represents a message containing screen information.
8
+ *
9
+ * This message is received from the WebX Engine and contains details about
10
+ * the screen size.
11
+ */
6
12
  class WebXScreenMessage extends WebXMessage_1.WebXMessage {
7
- get screenSize() {
8
- return this._screenSize;
9
- }
10
- constructor(_screenSize, commandId) {
13
+ /**
14
+ * Constructs a new WebXScreenMessage.
15
+ *
16
+ * @param screenSize The size of the screen.
17
+ * @param commandId The ID of the command associated with this message.
18
+ */
19
+ constructor(screenSize, commandId) {
11
20
  super(WebXMessageType_1.WebXMessageType.SCREEN, commandId);
12
- this._screenSize = _screenSize;
21
+ this.screenSize = screenSize;
13
22
  }
14
23
  }
15
24
  exports.WebXScreenMessage = WebXScreenMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"WebXScreenMessage.js","sourceRoot":"","sources":["../../src/message/WebXScreenMessage.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,uDAAoD;AAEpD,MAAa,iBAAkB,SAAQ,yBAAW;IAChD,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,YAAoB,WAA8C,EAAE,SAAiB;QACnF,KAAK,CAAC,iCAAe,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QADvB,gBAAW,GAAX,WAAW,CAAmC;IAElE,CAAC;CACF;AARD,8CAQC"}
1
+ {"version":3,"file":"WebXScreenMessage.js","sourceRoot":"","sources":["../../src/message/WebXScreenMessage.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,uDAAoD;AAEpD;;;;;GAKG;AACH,MAAa,iBAAkB,SAAQ,yBAAW;IAMhD;;;;;OAKG;IACH,YAAY,UAA6C,EAAE,SAAiB;QAC1E,KAAK,CAAC,iCAAe,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;QACzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAhBD,8CAgBC"}
@@ -1,11 +1,31 @@
1
1
  import { WebXMessage } from './WebXMessage';
2
2
  import { WebXSubImage } from '../display';
3
+ /**
4
+ * Represents a message containing sub-image data for a window.
5
+ *
6
+ * This message is received from the WebX Engine and contains a list of
7
+ * sub-images that should be updated.
8
+ */
3
9
  export declare class WebXSubImagesMessage extends WebXMessage {
4
- private _windowId;
5
- private _subImages;
6
- private _size;
7
- get windowId(): number;
8
- get subImages(): WebXSubImage[];
9
- get size(): number;
10
- constructor(_windowId: number, _subImages: WebXSubImage[], commandId: number, _size: number);
10
+ /**
11
+ * The ID of the window associated with these sub-images.
12
+ */
13
+ readonly windowId: number;
14
+ /**
15
+ * The list of sub-images.
16
+ */
17
+ readonly subImages: Array<WebXSubImage>;
18
+ /**
19
+ * The size of the message in bytes.
20
+ */
21
+ readonly size: number;
22
+ /**
23
+ * Constructs a new WebXSubImagesMessage.
24
+ *
25
+ * @param windowId The ID of the window.
26
+ * @param subImages The list of sub-images.
27
+ * @param commandId The ID of the command associated with this message.
28
+ * @param size The size of the message in bytes.
29
+ */
30
+ constructor(windowId: number, subImages: Array<WebXSubImage>, commandId: number, size: number);
11
31
  }
@@ -3,21 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebXSubImagesMessage = void 0;
4
4
  const WebXMessage_1 = require("./WebXMessage");
5
5
  const WebXMessageType_1 = require("./WebXMessageType");
6
+ /**
7
+ * Represents a message containing sub-image data for a window.
8
+ *
9
+ * This message is received from the WebX Engine and contains a list of
10
+ * sub-images that should be updated.
11
+ */
6
12
  class WebXSubImagesMessage extends WebXMessage_1.WebXMessage {
7
- get windowId() {
8
- return this._windowId;
9
- }
10
- get subImages() {
11
- return this._subImages;
12
- }
13
- get size() {
14
- return this._size;
15
- }
16
- constructor(_windowId, _subImages, commandId, _size) {
13
+ /**
14
+ * Constructs a new WebXSubImagesMessage.
15
+ *
16
+ * @param windowId The ID of the window.
17
+ * @param subImages The list of sub-images.
18
+ * @param commandId The ID of the command associated with this message.
19
+ * @param size The size of the message in bytes.
20
+ */
21
+ constructor(windowId, subImages, commandId, size) {
17
22
  super(WebXMessageType_1.WebXMessageType.SUBIMAGES, commandId);
18
- this._windowId = _windowId;
19
- this._subImages = _subImages;
20
- this._size = _size;
23
+ this.windowId = windowId;
24
+ this.subImages = subImages;
25
+ this.size = size;
21
26
  }
22
27
  }
23
28
  exports.WebXSubImagesMessage = WebXSubImagesMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"WebXSubImagesMessage.js","sourceRoot":"","sources":["../../src/message/WebXSubImagesMessage.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,uDAAoD;AAGpD,MAAa,oBAAqB,SAAQ,yBAAW;IACnD,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,YAAoB,SAAiB,EACjB,UAA0B,EAClC,SAAiB,EACT,KAAa;QAC/B,KAAK,CAAC,iCAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAJ1B,cAAS,GAAT,SAAS,CAAQ;QACjB,eAAU,GAAV,UAAU,CAAgB;QAE1B,UAAK,GAAL,KAAK,CAAQ;IAEjC,CAAC;CACF;AAnBD,oDAmBC"}
1
+ {"version":3,"file":"WebXSubImagesMessage.js","sourceRoot":"","sources":["../../src/message/WebXSubImagesMessage.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,uDAAoD;AAGpD;;;;;GAKG;AACH,MAAa,oBAAqB,SAAQ,yBAAW;IAgBnD;;;;;;;OAOG;IACH,YAAY,QAAgB,EAAE,SAA8B,EAAE,SAAiB,EAAE,IAAY;QAC3F,KAAK,CAAC,iCAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AA9BD,oDA8BC"}
@@ -1,7 +1,21 @@
1
1
  import { WebXMessage } from './WebXMessage';
2
2
  import { WebXWindowProperties } from '../display';
3
+ /**
4
+ * Represents a message containing information about visible windows.
5
+ *
6
+ * This message is received from the WebX Engine and contains details about
7
+ * all currently visible windows.
8
+ */
3
9
  export declare class WebXWindowsMessage extends WebXMessage {
4
- private _windows;
5
- get windows(): Array<WebXWindowProperties>;
6
- constructor(_windows: Array<WebXWindowProperties>, commandId: number);
10
+ /**
11
+ * The list of visible windows.
12
+ */
13
+ readonly windows: Array<WebXWindowProperties>;
14
+ /**
15
+ * Constructs a new WebXWindowsMessage.
16
+ *
17
+ * @param windows The list of visible windows.
18
+ * @param commandId The ID of the command associated with this message.
19
+ */
20
+ constructor(windows: Array<WebXWindowProperties>, commandId: number);
7
21
  }
@@ -3,13 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebXWindowsMessage = void 0;
4
4
  const WebXMessage_1 = require("./WebXMessage");
5
5
  const WebXMessageType_1 = require("./WebXMessageType");
6
+ /**
7
+ * Represents a message containing information about visible windows.
8
+ *
9
+ * This message is received from the WebX Engine and contains details about
10
+ * all currently visible windows.
11
+ */
6
12
  class WebXWindowsMessage extends WebXMessage_1.WebXMessage {
7
- get windows() {
8
- return this._windows;
9
- }
10
- constructor(_windows, commandId) {
13
+ /**
14
+ * Constructs a new WebXWindowsMessage.
15
+ *
16
+ * @param windows The list of visible windows.
17
+ * @param commandId The ID of the command associated with this message.
18
+ */
19
+ constructor(windows, commandId) {
11
20
  super(WebXMessageType_1.WebXMessageType.WINDOWS, commandId);
12
- this._windows = _windows;
21
+ this.windows = windows;
13
22
  }
14
23
  }
15
24
  exports.WebXWindowsMessage = WebXWindowsMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"WebXWindowsMessage.js","sourceRoot":"","sources":["../../src/message/WebXWindowsMessage.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAE5C,uDAAoD;AAEpD,MAAa,kBAAmB,SAAQ,yBAAW;IACjD,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,YAAoB,QAAqC,EAAE,SAAiB;QAC1E,KAAK,CAAC,iCAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QADxB,aAAQ,GAAR,QAAQ,CAA6B;IAEzD,CAAC;CACF;AARD,gDAQC"}
1
+ {"version":3,"file":"WebXWindowsMessage.js","sourceRoot":"","sources":["../../src/message/WebXWindowsMessage.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAC5C,uDAAoD;AAGpD;;;;;GAKG;AACH,MAAa,kBAAmB,SAAQ,yBAAW;IAMjD;;;;;OAKG;IACH,YAAY,OAAoC,EAAE,SAAiB;QACjE,KAAK,CAAC,iCAAe,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF;AAhBD,gDAgBC"}
@@ -2,17 +2,47 @@ import { WebXDisplay } from "../display";
2
2
  import { WebXMessage } from "../message";
3
3
  import { WebXMessageHandler } from "./WebXMessageHandler";
4
4
  import { WebXHandler } from "./WebXHandler";
5
+ /**
6
+ * Handles debug image messages for the WebX client.
7
+ * This class is responsible for rendering debug images in a 3D scene
8
+ * and managing their lifecycle.
9
+ */
5
10
  export declare class WebXDebugImageMessageHandler extends WebXMessageHandler implements WebXHandler {
6
11
  private _display;
12
+ /**
13
+ * Geometry used for creating debug image planes.
14
+ */
7
15
  private static _PLANE_GEOMETRY;
8
16
  private _scene;
9
17
  private _debugLayer;
10
18
  private _currentZ;
11
19
  private _disposed;
12
20
  private _tweenGroup;
21
+ /**
22
+ * Constructs a new WebXDebugImageMessageHandler.
23
+ * @param _display The WebX display instance used for rendering.
24
+ */
13
25
  constructor(_display: WebXDisplay);
26
+ /**
27
+ * Creates a mesh for rendering a debug image.
28
+ * @param x The x-coordinate of the mesh.
29
+ * @param y The y-coordinate of the mesh.
30
+ * @param width The width of the mesh.
31
+ * @param height The height of the mesh.
32
+ * @param colour The color of the mesh.
33
+ */
14
34
  private _createMesh;
35
+ /**
36
+ * Handles an incoming WebX message.
37
+ * @param message The WebX message to handle.
38
+ */
15
39
  handle(message: WebXMessage): void;
40
+ /**
41
+ * Cleans up resources used by this handler.
42
+ */
16
43
  destroy(): void;
44
+ /**
45
+ * Animates the debug layer.
46
+ */
17
47
  private _animate;
18
48
  }
@@ -6,7 +6,16 @@ const tween_js_1 = require("@tweenjs/tween.js");
6
6
  const utils_1 = require("../utils");
7
7
  const message_1 = require("../message");
8
8
  const WebXMessageHandler_1 = require("./WebXMessageHandler");
9
+ /**
10
+ * Handles debug image messages for the WebX client.
11
+ * This class is responsible for rendering debug images in a 3D scene
12
+ * and managing their lifecycle.
13
+ */
9
14
  class WebXDebugImageMessageHandler extends WebXMessageHandler_1.WebXMessageHandler {
15
+ /**
16
+ * Constructs a new WebXDebugImageMessageHandler.
17
+ * @param _display The WebX display instance used for rendering.
18
+ */
10
19
  constructor(_display) {
11
20
  super();
12
21
  this._display = _display;
@@ -19,6 +28,14 @@ class WebXDebugImageMessageHandler extends WebXMessageHandler_1.WebXMessageHandl
19
28
  this._scene.add(this._debugLayer);
20
29
  this._animate();
21
30
  }
31
+ /**
32
+ * Creates a mesh for rendering a debug image.
33
+ * @param x The x-coordinate of the mesh.
34
+ * @param y The y-coordinate of the mesh.
35
+ * @param width The width of the mesh.
36
+ * @param height The height of the mesh.
37
+ * @param colour The color of the mesh.
38
+ */
22
39
  _createMesh(x, y, width, height, colour) {
23
40
  const material = new three_1.MeshBasicMaterial({ color: colour, opacity: 0.8, transparent: true });
24
41
  material.side = three_1.BackSide;
@@ -33,6 +50,10 @@ class WebXDebugImageMessageHandler extends WebXMessageHandler_1.WebXMessageHandl
33
50
  .onComplete(() => this._debugLayer.remove(mesh))
34
51
  .start();
35
52
  }
53
+ /**
54
+ * Handles an incoming WebX message.
55
+ * @param message The WebX message to handle.
56
+ */
36
57
  handle(message) {
37
58
  if (message.type === message_1.WebXMessageType.IMAGE) {
38
59
  const imageMessage = message;
@@ -48,6 +69,9 @@ class WebXDebugImageMessageHandler extends WebXMessageHandler_1.WebXMessageHandl
48
69
  });
49
70
  }
50
71
  }
72
+ /**
73
+ * Cleans up resources used by this handler.
74
+ */
51
75
  destroy() {
52
76
  this._disposed = true;
53
77
  this._debugLayer.children.forEach((child) => {
@@ -57,6 +81,9 @@ class WebXDebugImageMessageHandler extends WebXMessageHandler_1.WebXMessageHandl
57
81
  this._debugLayer.clear();
58
82
  this._debugLayer.removeFromParent();
59
83
  }
84
+ /**
85
+ * Animates the debug layer.
86
+ */
60
87
  _animate() {
61
88
  if (!this._disposed) {
62
89
  requestAnimationFrame((time) => {
@@ -67,5 +94,8 @@ class WebXDebugImageMessageHandler extends WebXMessageHandler_1.WebXMessageHandl
67
94
  }
68
95
  }
69
96
  exports.WebXDebugImageMessageHandler = WebXDebugImageMessageHandler;
97
+ /**
98
+ * Geometry used for creating debug image planes.
99
+ */
70
100
  WebXDebugImageMessageHandler._PLANE_GEOMETRY = new three_1.PlaneGeometry(1.0, 1.0, 2, 2);
71
101
  //# sourceMappingURL=WebXDebugImageMessageHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WebXDebugImageMessageHandler.js","sourceRoot":"","sources":["../../src/tracer/WebXDebugImageMessageHandler.ts"],"names":[],"mappings":";;;AAAA,iCAA0F;AAC1F,gDAAyD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H,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAEtB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAW,EAAE,EAAE;YAChD,MAAM,QAAQ,GAAG,KAAK,CAAC,QAA6B,CAAC;YACrD,QAAQ,CAAC,OAAO,EAAE,CAAC;QACrB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC;IACtC,CAAC;IAED;;OAEG;IACK,QAAQ;QACd,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,qBAAqB,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC7B,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC9B,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;;AAnGH,oEAqGC;AAnGC;;GAEG;AACY,4CAAe,GAAkB,IAAI,qBAAa,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,AAAnD,CAAoD"}
@@ -1,3 +1,14 @@
1
+ /**
2
+ * Interface for handling WebX events.
3
+ *
4
+ * Implementations of this interface are responsible for processing WebX events
5
+ * and providing a mechanism to clean up resources when no longer needed.
6
+ */
1
7
  export interface WebXHandler {
8
+ /**
9
+ * Cleans up resources associated with the handler.
10
+ *
11
+ * This method should be called when the handler is no longer needed.
12
+ */
2
13
  destroy(): void;
3
14
  }
@@ -1,4 +1,21 @@
1
1
  import { WebXInstruction } from '../instruction';
2
+ /**
3
+ * Interface for handling WebX instructions.
4
+ *
5
+ * Implementations of this interface are responsible for processing WebX instructions
6
+ * and providing a mechanism to clean up resources when no longer needed.
7
+ */
2
8
  export declare abstract class WebXInstructionHandler {
9
+ /**
10
+ * Processes a WebX instruction.
11
+ *
12
+ * @param instruction The WebX instruction to process.
13
+ */
3
14
  abstract handle(instruction: WebXInstruction): void;
15
+ /**
16
+ * Cleans up resources associated with the handler.
17
+ *
18
+ * This method should be called when the handler is no longer needed.
19
+ */
20
+ abstract destroy(): void;
4
21
  }
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebXInstructionHandler = void 0;
4
+ /**
5
+ * Interface for handling WebX instructions.
6
+ *
7
+ * Implementations of this interface are responsible for processing WebX instructions
8
+ * and providing a mechanism to clean up resources when no longer needed.
9
+ */
4
10
  class WebXInstructionHandler {
5
11
  }
6
12
  exports.WebXInstructionHandler = WebXInstructionHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"WebXInstructionHandler.js","sourceRoot":"","sources":["../../src/tracer/WebXInstructionHandler.ts"],"names":[],"mappings":";;;AAEA,MAAsB,sBAAsB;CAG3C;AAHD,wDAGC"}
1
+ {"version":3,"file":"WebXInstructionHandler.js","sourceRoot":"","sources":["../../src/tracer/WebXInstructionHandler.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,MAAsB,sBAAsB;CAc3C;AAdD,wDAcC"}
@@ -1,4 +1,21 @@
1
1
  import { WebXMessage } from '../message';
2
+ /**
3
+ * Abstract class for handling WebX messages.
4
+ *
5
+ * Implementations of this class are responsible for processing WebX messages
6
+ * and providing a mechanism to clean up resources when no longer needed.
7
+ */
2
8
  export declare abstract class WebXMessageHandler {
9
+ /**
10
+ * Processes a WebX message.
11
+ *
12
+ * @param message The WebX message to process.
13
+ */
3
14
  abstract handle(message: WebXMessage): void;
15
+ /**
16
+ * Cleans up resources associated with the handler.
17
+ *
18
+ * This method should be called when the handler is no longer needed.
19
+ */
20
+ abstract destroy(): void;
4
21
  }
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebXMessageHandler = void 0;
4
+ /**
5
+ * Abstract class for handling WebX messages.
6
+ *
7
+ * Implementations of this class are responsible for processing WebX messages
8
+ * and providing a mechanism to clean up resources when no longer needed.
9
+ */
4
10
  class WebXMessageHandler {
5
11
  }
6
12
  exports.WebXMessageHandler = WebXMessageHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"WebXMessageHandler.js","sourceRoot":"","sources":["../../src/tracer/WebXMessageHandler.ts"],"names":[],"mappings":";;;AAEA,MAAsB,kBAAkB;CAIvC;AAJD,gDAIC"}
1
+ {"version":3,"file":"WebXMessageHandler.js","sourceRoot":"","sources":["../../src/tracer/WebXMessageHandler.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,MAAsB,kBAAkB;CAcvC;AAdD,gDAcC"}
@@ -1,7 +1,23 @@
1
+ /**
2
+ * Interface for handling WebX statistics.
3
+ *
4
+ * Implementations of this interface are responsible for processing WebX statistics
5
+ * and providing a mechanism to clean up resources when no longer needed.
6
+ */
1
7
  export declare abstract class WebXStatsHandler {
8
+ /**
9
+ * Processes WebX statistics.
10
+ *
11
+ * @param stats The WebX statistics to process.
12
+ */
2
13
  abstract handle(stats: {
3
14
  received: number;
4
15
  sent: number;
5
16
  }): void;
17
+ /**
18
+ * Cleans up resources associated with the handler.
19
+ *
20
+ * This method should be called when the handler is no longer needed.
21
+ */
6
22
  abstract destroy(): void;
7
23
  }
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WebXStatsHandler = void 0;
4
+ /**
5
+ * Interface for handling WebX statistics.
6
+ *
7
+ * Implementations of this interface are responsible for processing WebX statistics
8
+ * and providing a mechanism to clean up resources when no longer needed.
9
+ */
4
10
  class WebXStatsHandler {
5
11
  }
6
12
  exports.WebXStatsHandler = WebXStatsHandler;
@@ -1 +1 @@
1
- {"version":3,"file":"WebXStatsHandler.js","sourceRoot":"","sources":["../../src/tracer/WebXStatsHandler.ts"],"names":[],"mappings":";;;AAAA,MAAsB,gBAAgB;CAGrC;AAHD,4CAGC"}
1
+ {"version":3,"file":"WebXStatsHandler.js","sourceRoot":"","sources":["../../src/tracer/WebXStatsHandler.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,MAAsB,gBAAgB;CAcrC;AAdD,4CAcC"}
@@ -2,10 +2,30 @@ import { WebXInstruction } from '../instruction';
2
2
  import { WebXMessage } from '../message';
3
3
  import { WebXMessageBuffer } from '.';
4
4
  import { WebXTextureFactory } from '../display';
5
+ /**
6
+ * Serializes and deserializes WebX instructions and messages.
7
+ */
5
8
  export declare class WebXBinarySerializer {
6
9
  private readonly _instructionEncoder;
7
10
  private readonly _messageDecoder;
11
+ /**
12
+ * Creates a new instance of WebXBinarySerializer.
13
+ *
14
+ * @param textureFactory The texture factory used for decoding image data.
15
+ */
8
16
  constructor(textureFactory: WebXTextureFactory);
17
+ /**
18
+ * Serializes a WebXInstruction into a binary ArrayBuffer.
19
+ *
20
+ * @param instruction The instruction to serialize.
21
+ * @returns The serialized ArrayBuffer.
22
+ */
9
23
  serializeInstruction(instruction: WebXInstruction): ArrayBuffer;
24
+ /**
25
+ * Deserializes a binary message buffer into a WebXMessage object.
26
+ *
27
+ * @param buffer The binary message buffer to deserialize.
28
+ * @returns A promise that resolves to the deserialized WebXMessage.
29
+ */
10
30
  deserializeMessage(buffer: WebXMessageBuffer): Promise<WebXMessage>;
11
31
  }
@@ -11,11 +11,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.WebXBinarySerializer = void 0;
13
13
  const _1 = require(".");
14
+ /**
15
+ * Serializes and deserializes WebX instructions and messages.
16
+ */
14
17
  class WebXBinarySerializer {
18
+ /**
19
+ * Creates a new instance of WebXBinarySerializer.
20
+ *
21
+ * @param textureFactory The texture factory used for decoding image data.
22
+ */
15
23
  constructor(textureFactory) {
16
24
  this._instructionEncoder = new _1.WebXInstructionEncoder();
17
25
  this._messageDecoder = new _1.WebXMessageDecoder(textureFactory);
18
26
  }
27
+ /**
28
+ * Serializes a WebXInstruction into a binary ArrayBuffer.
29
+ *
30
+ * @param instruction The instruction to serialize.
31
+ * @returns The serialized ArrayBuffer.
32
+ */
19
33
  serializeInstruction(instruction) {
20
34
  // return instruction.toJsonString();
21
35
  const encoded = this._instructionEncoder.encode(instruction);
@@ -24,6 +38,12 @@ class WebXBinarySerializer {
24
38
  }
25
39
  return encoded;
26
40
  }
41
+ /**
42
+ * Deserializes a binary message buffer into a WebXMessage object.
43
+ *
44
+ * @param buffer The binary message buffer to deserialize.
45
+ * @returns A promise that resolves to the deserialized WebXMessage.
46
+ */
27
47
  deserializeMessage(buffer) {
28
48
  return __awaiter(this, void 0, void 0, function* () {
29
49
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"WebXBinarySerializer.js","sourceRoot":"","sources":["../../src/transport/WebXBinarySerializer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,wBAAkF;AAGlF,MAAa,oBAAoB;IAK/B,YAAY,cAAkC;QAC5C,IAAI,CAAC,mBAAmB,GAAG,IAAI,yBAAsB,EAAE,CAAC;QACxD,IAAI,CAAC,eAAe,GAAG,IAAI,qBAAkB,CAAC,cAAc,CAAC,CAAC;IAChE,CAAC;IAED,oBAAoB,CAAC,WAA4B;QAC/C,qCAAqC;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC7D,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;QAChE,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAEK,kBAAkB,CAAC,MAAyB;;YAChD,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBAC1D,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;oBACpB,OAAO,CAAC,KAAK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