@elice/material-exercise 1.260514.0 → 1.260514.1

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.
@@ -27,15 +27,7 @@ var ArduinoProviderSessionWriter = function ArduinoProviderSessionWriter(_ref) {
27
27
  //
28
28
  // Pipe board serial output into xterm.
29
29
  //
30
- React__default.default.useEffect(function () {
31
- if (!session) {
32
- return;
33
- }
34
- var decoder = new TextDecoder();
35
- return session.events.on('serial', function (chunk) {
36
- write(decoder.decode(chunk));
37
- });
38
- }, [session, write]);
30
+ mcuBridge.useSerialStream(write);
39
31
  //
40
32
  // Print board attach/detach lifecycle messages.
41
33
  //
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { useRawEliceIntl } from '@elice/intl';
3
- import { useSession } from '@elice/mcu-bridge';
3
+ import { useSession, useSerialStream } from '@elice/mcu-bridge';
4
4
  import { useArduinoTerminalWriter } from './useArduinoTerminalWriter.js';
5
5
 
6
6
  //
@@ -19,15 +19,7 @@ var ArduinoProviderSessionWriter = function ArduinoProviderSessionWriter(_ref) {
19
19
  //
20
20
  // Pipe board serial output into xterm.
21
21
  //
22
- React.useEffect(function () {
23
- if (!session) {
24
- return;
25
- }
26
- var decoder = new TextDecoder();
27
- return session.events.on('serial', function (chunk) {
28
- write(decoder.decode(chunk));
29
- });
30
- }, [session, write]);
22
+ useSerialStream(write);
31
23
  //
32
24
  // Print board attach/detach lifecycle messages.
33
25
  //
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-exercise",
3
- "version": "1.260514.0",
3
+ "version": "1.260514.1",
4
4
  "description": "User view and editing components of Elice material exercise",
5
5
  "repository": "https://git.elicer.io/elice/frontend/library/elice-material",
6
6
  "license": "UNLICENSED",
@@ -38,8 +38,8 @@
38
38
  "lodash": "^4.17.21",
39
39
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
40
40
  "react-use": "^17.0.0",
41
- "@elice/material-shared-types": "1.260514.0",
42
- "@elice/material-shared-utils": "1.260514.0"
41
+ "@elice/material-shared-types": "1.260514.1",
42
+ "@elice/material-shared-utils": "1.260514.1"
43
43
  },
44
44
  "dependencies": {
45
45
  "@novnc/novnc": "^1.3.0",
@@ -75,7 +75,7 @@
75
75
  "@elice/icons": "^1.230814.0",
76
76
  "@elice/intl": "0.241127.0",
77
77
  "@elice/markdown": "1.241015.0",
78
- "@elice/mcu-bridge": "^1.260430.1",
78
+ "@elice/mcu-bridge": "^1.260514.0",
79
79
  "@elice/mui-elements": "5.251204.0",
80
80
  "@elice/mui-system": "5.251204.0",
81
81
  "@elice/rollup-config": "^1.260406.0",
@@ -113,8 +113,8 @@
113
113
  "rollup": "^4.0.0",
114
114
  "typescript": "~5.9.3",
115
115
  "vite": "^4.4.9",
116
- "@elice/material-shared-types": "1.260514.0",
117
- "@elice/material-shared-utils": "1.260514.0"
116
+ "@elice/material-shared-types": "1.260514.1",
117
+ "@elice/material-shared-utils": "1.260514.1"
118
118
  },
119
119
  "scripts": {
120
120
  "start": "run-s watch",