@rstreamlabs/react 1.6.3 → 1.6.4
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-MJTSTB5H.mjs → chunk-GFWVYPSE.mjs} +4 -4
- package/dist/{chunk-2WDUPTYY.mjs → chunk-KZOS6ZKQ.mjs} +1 -1
- package/dist/hooks/index.d.mts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +2 -2
- package/dist/providers/index.d.mts +1 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/providers/index.js +4 -4
- package/dist/providers/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRstream
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KZOS6ZKQ.mjs";
|
|
4
4
|
|
|
5
5
|
// src/providers/rstream.tsx
|
|
6
6
|
import * as React from "react";
|
|
@@ -15,10 +15,10 @@ function useRstreamContext() {
|
|
|
15
15
|
return ctx;
|
|
16
16
|
}
|
|
17
17
|
function RstreamProvider({ options, children }) {
|
|
18
|
-
const { error, tunnels, clients } = useRstream(options);
|
|
18
|
+
const { state, error, tunnels, clients } = useRstream(options);
|
|
19
19
|
const value = React.useMemo(
|
|
20
|
-
() => ({ error, tunnels, clients }),
|
|
21
|
-
[error, tunnels, clients]
|
|
20
|
+
() => ({ state, error, tunnels, clients }),
|
|
21
|
+
[state, error, tunnels, clients]
|
|
22
22
|
);
|
|
23
23
|
const content = isRenderProp(children) ? children(value) : children;
|
|
24
24
|
return /* @__PURE__ */ jsx(RstreamContext.Provider, { value, children: content });
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -30,6 +30,7 @@ interface UseRstreamOptions extends Partial<WatchConfig> {
|
|
|
30
30
|
* @returns An object with the current error (if any), and arrays of tunnels and clients.
|
|
31
31
|
*/
|
|
32
32
|
declare function useRstream(options?: UseRstreamOptions): {
|
|
33
|
+
state: "disconnected" | "connecting" | "connected";
|
|
33
34
|
error: {
|
|
34
35
|
message: string;
|
|
35
36
|
type: "warning" | "danger";
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ interface UseRstreamOptions extends Partial<WatchConfig> {
|
|
|
30
30
|
* @returns An object with the current error (if any), and arrays of tunnels and clients.
|
|
31
31
|
*/
|
|
32
32
|
declare function useRstream(options?: UseRstreamOptions): {
|
|
33
|
+
state: "disconnected" | "connecting" | "connected";
|
|
33
34
|
error: {
|
|
34
35
|
message: string;
|
|
35
36
|
type: "warning" | "danger";
|
package/dist/hooks/index.js
CHANGED
|
@@ -160,7 +160,7 @@ function useRstream(options) {
|
|
|
160
160
|
setTunnels([]);
|
|
161
161
|
}
|
|
162
162
|
}, [options, state]);
|
|
163
|
-
return { error, tunnels, clients };
|
|
163
|
+
return { state, error, tunnels, clients };
|
|
164
164
|
}
|
|
165
165
|
// Annotate the CommonJS export names for ESM import in node:
|
|
166
166
|
0 && (module.exports = {
|
package/dist/hooks/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -309,7 +309,7 @@ function useRstream(options) {
|
|
|
309
309
|
setTunnels([]);
|
|
310
310
|
}
|
|
311
311
|
}, [options, state]);
|
|
312
|
-
return { error, tunnels, clients };
|
|
312
|
+
return { state, error, tunnels, clients };
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
// src/providers/rstream.tsx
|
|
@@ -325,10 +325,10 @@ function useRstreamContext() {
|
|
|
325
325
|
return ctx;
|
|
326
326
|
}
|
|
327
327
|
function RstreamProvider({ options, children }) {
|
|
328
|
-
const { error, tunnels, clients } = useRstream(options);
|
|
328
|
+
const { state, error, tunnels, clients } = useRstream(options);
|
|
329
329
|
const value = React3.useMemo(
|
|
330
|
-
() => ({ error, tunnels, clients }),
|
|
331
|
-
[error, tunnels, clients]
|
|
330
|
+
() => ({ state, error, tunnels, clients }),
|
|
331
|
+
[state, error, tunnels, clients]
|
|
332
332
|
);
|
|
333
333
|
const content = isRenderProp(children) ? children(value) : children;
|
|
334
334
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(RstreamContext.Provider, { value, children: content });
|
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-GFWVYPSE.mjs";
|
|
9
9
|
import {
|
|
10
10
|
useRstream
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KZOS6ZKQ.mjs";
|
|
12
12
|
export {
|
|
13
13
|
RstreamProvider,
|
|
14
14
|
WebTTYTerminal,
|
package/dist/providers/index.js
CHANGED
|
@@ -161,7 +161,7 @@ function useRstream(options) {
|
|
|
161
161
|
setTunnels([]);
|
|
162
162
|
}
|
|
163
163
|
}, [options, state]);
|
|
164
|
-
return { error, tunnels, clients };
|
|
164
|
+
return { state, error, tunnels, clients };
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
// src/providers/rstream.tsx
|
|
@@ -177,10 +177,10 @@ function useRstreamContext() {
|
|
|
177
177
|
return ctx;
|
|
178
178
|
}
|
|
179
179
|
function RstreamProvider({ options, children }) {
|
|
180
|
-
const { error, tunnels, clients } = useRstream(options);
|
|
180
|
+
const { state, error, tunnels, clients } = useRstream(options);
|
|
181
181
|
const value = React2.useMemo(
|
|
182
|
-
() => ({ error, tunnels, clients }),
|
|
183
|
-
[error, tunnels, clients]
|
|
182
|
+
() => ({ state, error, tunnels, clients }),
|
|
183
|
+
[state, error, tunnels, clients]
|
|
184
184
|
);
|
|
185
185
|
const content = isRenderProp(children) ? children(value) : children;
|
|
186
186
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RstreamContext.Provider, { value, children: content });
|
package/dist/providers/index.mjs
CHANGED