@rstreamlabs/react 1.10.0 → 1.10.2
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/{chunk-SSAIWCGG.mjs → chunk-UQDRDSGV.mjs} +1 -1
- package/dist/{chunk-I4FMNQJD.mjs → chunk-YZQKMOHW.mjs} +9 -4
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/hooks/index.js +9 -4
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +9 -4
- package/dist/index.mjs +2 -2
- package/dist/providers/index.d.mts +1 -2
- package/dist/providers/index.d.ts +1 -2
- package/dist/providers/index.js +9 -4
- package/dist/providers/index.mjs +2 -2
- package/package.json +8 -8
|
@@ -150,16 +150,21 @@ function useRstream(options) {
|
|
|
150
150
|
clearTimeout(timeout);
|
|
151
151
|
};
|
|
152
152
|
} else if (state === "connected") {
|
|
153
|
-
setError(null);
|
|
153
|
+
const timeout = setTimeout(() => setError(null), 0);
|
|
154
|
+
return () => clearTimeout(timeout);
|
|
154
155
|
}
|
|
155
156
|
} else {
|
|
156
|
-
setError(null);
|
|
157
|
+
const timeout = setTimeout(() => setError(null), 0);
|
|
158
|
+
return () => clearTimeout(timeout);
|
|
157
159
|
}
|
|
158
160
|
}, [authEnabled, state, error, errorTimeout]);
|
|
159
161
|
React.useEffect(() => {
|
|
160
162
|
if (!authEnabled || state !== "connected") {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
const timeout = setTimeout(() => {
|
|
164
|
+
setClients([]);
|
|
165
|
+
setTunnels([]);
|
|
166
|
+
}, 0);
|
|
167
|
+
return () => clearTimeout(timeout);
|
|
163
168
|
}
|
|
164
169
|
}, [authEnabled, connectionKey, state]);
|
|
165
170
|
return { state, error, tunnels, clients };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { ITerminalOptions, Terminal } from '@xterm/xterm';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { WebTTYClientConfig, WebTTYExecutionConfig, WebTTYEvents } from '@rstreamlabs/webtty';
|
|
4
4
|
|
|
5
5
|
interface WebTTYTerminalProps extends WebTTYClientConfig, WebTTYExecutionConfig, WebTTYEvents {
|
|
@@ -26,6 +26,6 @@ interface WebTTYTerminalProps extends WebTTYClientConfig, WebTTYExecutionConfig,
|
|
|
26
26
|
*/
|
|
27
27
|
formatError?: (message: string) => string;
|
|
28
28
|
}
|
|
29
|
-
declare function WebTTYTerminal(props: WebTTYTerminalProps):
|
|
29
|
+
declare function WebTTYTerminal(props: WebTTYTerminalProps): React.JSX.Element;
|
|
30
30
|
|
|
31
31
|
export { WebTTYTerminal, type WebTTYTerminalProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { ITerminalOptions, Terminal } from '@xterm/xterm';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { WebTTYClientConfig, WebTTYExecutionConfig, WebTTYEvents } from '@rstreamlabs/webtty';
|
|
4
4
|
|
|
5
5
|
interface WebTTYTerminalProps extends WebTTYClientConfig, WebTTYExecutionConfig, WebTTYEvents {
|
|
@@ -26,6 +26,6 @@ interface WebTTYTerminalProps extends WebTTYClientConfig, WebTTYExecutionConfig,
|
|
|
26
26
|
*/
|
|
27
27
|
formatError?: (message: string) => string;
|
|
28
28
|
}
|
|
29
|
-
declare function WebTTYTerminal(props: WebTTYTerminalProps):
|
|
29
|
+
declare function WebTTYTerminal(props: WebTTYTerminalProps): React.JSX.Element;
|
|
30
30
|
|
|
31
31
|
export { WebTTYTerminal, type WebTTYTerminalProps };
|
package/dist/hooks/index.js
CHANGED
|
@@ -186,16 +186,21 @@ function useRstream(options) {
|
|
|
186
186
|
clearTimeout(timeout);
|
|
187
187
|
};
|
|
188
188
|
} else if (state === "connected") {
|
|
189
|
-
setError(null);
|
|
189
|
+
const timeout = setTimeout(() => setError(null), 0);
|
|
190
|
+
return () => clearTimeout(timeout);
|
|
190
191
|
}
|
|
191
192
|
} else {
|
|
192
|
-
setError(null);
|
|
193
|
+
const timeout = setTimeout(() => setError(null), 0);
|
|
194
|
+
return () => clearTimeout(timeout);
|
|
193
195
|
}
|
|
194
196
|
}, [authEnabled, state, error, errorTimeout]);
|
|
195
197
|
React.useEffect(() => {
|
|
196
198
|
if (!authEnabled || state !== "connected") {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
const timeout = setTimeout(() => {
|
|
200
|
+
setClients([]);
|
|
201
|
+
setTunnels([]);
|
|
202
|
+
}, 0);
|
|
203
|
+
return () => clearTimeout(timeout);
|
|
199
204
|
}
|
|
200
205
|
}, [authEnabled, connectionKey, state]);
|
|
201
206
|
return { state, error, tunnels, clients };
|
package/dist/hooks/index.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { WebTTYTerminal, WebTTYTerminalProps } from './components/index.mjs';
|
|
2
2
|
export { UseRstreamOptions, useRstream } from './hooks/index.mjs';
|
|
3
3
|
export { RstreamProvider, useRstreamContext } from './providers/index.mjs';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
4
|
import '@xterm/xterm';
|
|
5
|
+
import 'react';
|
|
6
6
|
import '@rstreamlabs/webtty';
|
|
7
7
|
import '@rstreamlabs/tunnels';
|
|
8
|
-
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { WebTTYTerminal, WebTTYTerminalProps } from './components/index.js';
|
|
2
2
|
export { UseRstreamOptions, useRstream } from './hooks/index.js';
|
|
3
3
|
export { RstreamProvider, useRstreamContext } from './providers/index.js';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
4
|
import '@xterm/xterm';
|
|
5
|
+
import 'react';
|
|
6
6
|
import '@rstreamlabs/webtty';
|
|
7
7
|
import '@rstreamlabs/tunnels';
|
|
8
|
-
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -415,16 +415,21 @@ function useRstream(options) {
|
|
|
415
415
|
clearTimeout(timeout);
|
|
416
416
|
};
|
|
417
417
|
} else if (state === "connected") {
|
|
418
|
-
setError(null);
|
|
418
|
+
const timeout = setTimeout(() => setError(null), 0);
|
|
419
|
+
return () => clearTimeout(timeout);
|
|
419
420
|
}
|
|
420
421
|
} else {
|
|
421
|
-
setError(null);
|
|
422
|
+
const timeout = setTimeout(() => setError(null), 0);
|
|
423
|
+
return () => clearTimeout(timeout);
|
|
422
424
|
}
|
|
423
425
|
}, [authEnabled, state, error, errorTimeout]);
|
|
424
426
|
React2.useEffect(() => {
|
|
425
427
|
if (!authEnabled || state !== "connected") {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
+
const timeout = setTimeout(() => {
|
|
429
|
+
setClients([]);
|
|
430
|
+
setTunnels([]);
|
|
431
|
+
}, 0);
|
|
432
|
+
return () => clearTimeout(timeout);
|
|
428
433
|
}
|
|
429
434
|
}, [authEnabled, connectionKey, state]);
|
|
430
435
|
return { state, error, tunnels, clients };
|
package/dist/index.mjs
CHANGED
|
@@ -5,10 +5,10 @@ import "./chunk-2JFL7TS5.mjs";
|
|
|
5
5
|
import {
|
|
6
6
|
RstreamProvider,
|
|
7
7
|
useRstreamContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UQDRDSGV.mjs";
|
|
9
9
|
import {
|
|
10
10
|
useRstream
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YZQKMOHW.mjs";
|
|
12
12
|
export {
|
|
13
13
|
RstreamProvider,
|
|
14
14
|
WebTTYTerminal,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { UseRstreamOptions, useRstream } from '../hooks/index.mjs';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import '@rstreamlabs/tunnels';
|
|
@@ -67,6 +66,6 @@ interface RstreamProviderProps {
|
|
|
67
66
|
options?: UseRstreamOptions;
|
|
68
67
|
children: React.ReactNode | ((value: RstreamContextValue) => React.ReactNode);
|
|
69
68
|
}
|
|
70
|
-
declare function RstreamProvider({ options, children }: RstreamProviderProps):
|
|
69
|
+
declare function RstreamProvider({ options, children }: RstreamProviderProps): React.JSX.Element;
|
|
71
70
|
|
|
72
71
|
export { RstreamProvider, useRstreamContext };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import { UseRstreamOptions, useRstream } from '../hooks/index.js';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import '@rstreamlabs/tunnels';
|
|
@@ -67,6 +66,6 @@ interface RstreamProviderProps {
|
|
|
67
66
|
options?: UseRstreamOptions;
|
|
68
67
|
children: React.ReactNode | ((value: RstreamContextValue) => React.ReactNode);
|
|
69
68
|
}
|
|
70
|
-
declare function RstreamProvider({ options, children }: RstreamProviderProps):
|
|
69
|
+
declare function RstreamProvider({ options, children }: RstreamProviderProps): React.JSX.Element;
|
|
71
70
|
|
|
72
71
|
export { RstreamProvider, useRstreamContext };
|
package/dist/providers/index.js
CHANGED
|
@@ -187,16 +187,21 @@ function useRstream(options) {
|
|
|
187
187
|
clearTimeout(timeout);
|
|
188
188
|
};
|
|
189
189
|
} else if (state === "connected") {
|
|
190
|
-
setError(null);
|
|
190
|
+
const timeout = setTimeout(() => setError(null), 0);
|
|
191
|
+
return () => clearTimeout(timeout);
|
|
191
192
|
}
|
|
192
193
|
} else {
|
|
193
|
-
setError(null);
|
|
194
|
+
const timeout = setTimeout(() => setError(null), 0);
|
|
195
|
+
return () => clearTimeout(timeout);
|
|
194
196
|
}
|
|
195
197
|
}, [authEnabled, state, error, errorTimeout]);
|
|
196
198
|
React.useEffect(() => {
|
|
197
199
|
if (!authEnabled || state !== "connected") {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
+
const timeout = setTimeout(() => {
|
|
201
|
+
setClients([]);
|
|
202
|
+
setTunnels([]);
|
|
203
|
+
}, 0);
|
|
204
|
+
return () => clearTimeout(timeout);
|
|
200
205
|
}
|
|
201
206
|
}, [authEnabled, connectionKey, state]);
|
|
202
207
|
return { state, error, tunnels, clients };
|
package/dist/providers/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rstreamlabs/react",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "React hooks and components for building rstream-enabled UIs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,26 +45,26 @@
|
|
|
45
45
|
"type-check": "tsc --noEmit"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@turbo/gen": "^2.
|
|
49
|
-
"@types/node": "^
|
|
48
|
+
"@turbo/gen": "^2.10.0",
|
|
49
|
+
"@types/node": "^26.0.1",
|
|
50
50
|
"@types/react-dom": "19.2.3",
|
|
51
|
-
"@types/react": "19.2.
|
|
51
|
+
"@types/react": "19.2.17",
|
|
52
52
|
"eslint-config": "*",
|
|
53
53
|
"tsup": "^8.5.1",
|
|
54
54
|
"typescript-config": "*",
|
|
55
55
|
"typescript": "5.9.3"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@rstreamlabs/rstream": "3.
|
|
59
|
-
"@rstreamlabs/tunnels": "3.
|
|
58
|
+
"@rstreamlabs/rstream": "3.4.0",
|
|
59
|
+
"@rstreamlabs/tunnels": "3.6.0",
|
|
60
60
|
"@rstreamlabs/webtty": "1.9.0",
|
|
61
61
|
"@xterm/addon-fit": "^0.11.0",
|
|
62
62
|
"@xterm/addon-unicode11": "^0.9.0",
|
|
63
63
|
"@xterm/addon-web-links": "^0.12.0",
|
|
64
64
|
"@xterm/addon-webgl": "^0.19.0",
|
|
65
65
|
"@xterm/xterm": "^6.0.0",
|
|
66
|
-
"react-dom": "^19.2.
|
|
67
|
-
"react": "^19.2.
|
|
66
|
+
"react-dom": "^19.2.7",
|
|
67
|
+
"react": "^19.2.7"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@types/react": "*",
|