@devframes/next 0.9.12 → 0.9.15
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/client.d.mts +6 -7
- package/dist/hub-client.d.mts +3 -3
- package/dist/hub.d.mts +6 -6
- package/dist/single.d.mts +3 -3
- package/package.json +10 -10
package/dist/client.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { DevframeConnectionStatus, DevframeRpcClient } from "devframe/client";
|
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ConnectionMeta } from "devframe";
|
|
4
4
|
//#region src/client.d.ts
|
|
5
|
-
interface DevframeRpcState {
|
|
5
|
+
export interface DevframeRpcState {
|
|
6
6
|
/** The connected client, or `null` while the initial connect is in flight. */
|
|
7
7
|
rpc: DevframeRpcClient | null;
|
|
8
8
|
/** Live connection status, `'connecting'` until the client resolves. */
|
|
@@ -10,7 +10,7 @@ interface DevframeRpcState {
|
|
|
10
10
|
/** The latest connection error, or `null`. */
|
|
11
11
|
error: Error | null;
|
|
12
12
|
}
|
|
13
|
-
interface RpcProviderProps {
|
|
13
|
+
export interface RpcProviderProps {
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
/**
|
|
16
16
|
* Base URL the SPA discovers `__connection.json` under, relative to the
|
|
@@ -42,21 +42,20 @@ interface RpcProviderProps {
|
|
|
42
42
|
* }
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
declare function RpcProvider({ children, baseURL, connectionMeta }: RpcProviderProps): ReactNode;
|
|
45
|
+
export declare function RpcProvider({ children, baseURL, connectionMeta }: RpcProviderProps): ReactNode;
|
|
46
46
|
/**
|
|
47
47
|
* Read the connected {@link DevframeRpcClient}, or `null` while connecting.
|
|
48
48
|
* Scope it to your tool's RPC namespace with `useRpc()?.scope('my-tool:')`.
|
|
49
49
|
*
|
|
50
50
|
* Throws when called outside a `<RpcProvider>`.
|
|
51
51
|
*/
|
|
52
|
-
declare function useRpc(): DevframeRpcClient | null;
|
|
52
|
+
export declare function useRpc(): DevframeRpcClient | null;
|
|
53
53
|
/**
|
|
54
54
|
* Read the live connection `status` and latest `error`, for a connection
|
|
55
55
|
* indicator. Throws when called outside a `<RpcProvider>`.
|
|
56
56
|
*/
|
|
57
|
-
declare function useRpcStatus(): {
|
|
57
|
+
export declare function useRpcStatus(): {
|
|
58
58
|
status: DevframeConnectionStatus;
|
|
59
59
|
error: Error | null;
|
|
60
60
|
};
|
|
61
|
-
//#endregion
|
|
62
|
-
export { DevframeRpcState, RpcProvider, RpcProviderProps, useRpc, useRpcStatus };
|
|
61
|
+
//#endregion
|
package/dist/hub-client.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DevframeClientHost, DevframeClientHostOptions, DevframeClientRuntime, DevframeClientRuntime as DevframeClientRuntime$1, DevframeClientRuntimeOptions, DevframeClientRuntimeOptions as DevframeClientRuntimeOptions$1 } from "@devframes/hub/client";
|
|
2
2
|
//#region src/hub-client.d.ts
|
|
3
|
-
interface UseDevframeHubClientOptions extends DevframeClientRuntimeOptions$1 {
|
|
3
|
+
export interface UseDevframeHubClientOptions extends DevframeClientRuntimeOptions$1 {
|
|
4
4
|
/**
|
|
5
5
|
* Hub mount base to connect to. Forwarded as `connect.baseURL` when no
|
|
6
6
|
* `rpc` / `connect.baseURL` is supplied.
|
|
@@ -24,6 +24,6 @@ interface UseDevframeHubClientOptions extends DevframeClientRuntimeOptions$1 {
|
|
|
24
24
|
* `renderers` is read once on mount; memoize it at the call site if it isn't a
|
|
25
25
|
* stable reference.
|
|
26
26
|
*/
|
|
27
|
-
declare function useDevframeHubClient(options?: UseDevframeHubClientOptions): DevframeClientRuntime$1 | null;
|
|
27
|
+
export declare function useDevframeHubClient(options?: UseDevframeHubClientOptions): DevframeClientRuntime$1 | null;
|
|
28
28
|
//#endregion
|
|
29
|
-
export {
|
|
29
|
+
export type { DevframeClientHost, DevframeClientHostOptions, DevframeClientRuntime, DevframeClientRuntimeOptions };
|
package/dist/hub.d.mts
CHANGED
|
@@ -100,10 +100,10 @@ interface DevframeNextHost {
|
|
|
100
100
|
* Pins Node runtime (`export const runtime = 'nodejs'` in the route) because
|
|
101
101
|
* the static handler streams from the filesystem.
|
|
102
102
|
*/
|
|
103
|
-
declare function createDevframeNextHost(options: CreateDevframeNextHostOptions): DevframeNextHost;
|
|
103
|
+
export declare function createDevframeNextHost(options: CreateDevframeNextHostOptions): DevframeNextHost;
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region src/hub.d.ts
|
|
106
|
-
interface NextDevframeHubOptions {
|
|
106
|
+
export interface NextDevframeHubOptions {
|
|
107
107
|
/**
|
|
108
108
|
* Mount base the hub answers under; every frame lives at `<base><id>/`,
|
|
109
109
|
* so the App Router needs one catch-all route under it. Default:
|
|
@@ -175,9 +175,9 @@ interface NextDevframeHubOptions {
|
|
|
175
175
|
* `globalThis` so Next's dev-time route re-evaluation reuses one instance
|
|
176
176
|
* instead of leaking a side-car per reload.
|
|
177
177
|
*/
|
|
178
|
-
declare function createNextDevframeHub(options?: NextDevframeHubOptions): Promise<HubInstance>;
|
|
178
|
+
export declare function createNextDevframeHub(options?: NextDevframeHubOptions): Promise<HubInstance>;
|
|
179
179
|
/** A route-facing hub handle whose instance is memoized on `globalThis`. */
|
|
180
|
-
interface NextDevframeHubHandle {
|
|
180
|
+
export interface NextDevframeHubHandle {
|
|
181
181
|
/** The normalized mount base this hub answers under. */
|
|
182
182
|
base: string;
|
|
183
183
|
/** Delegate an App Router catch-all route straight to this. */
|
|
@@ -206,6 +206,6 @@ interface NextDevframeHubHandle {
|
|
|
206
206
|
* export const DELETE = (req: Request) => hub.handler(req)
|
|
207
207
|
* ```
|
|
208
208
|
*/
|
|
209
|
-
declare function nextDevframeHub(options?: NextDevframeHubOptions): NextDevframeHubHandle;
|
|
209
|
+
export declare function nextDevframeHub(options?: NextDevframeHubOptions): NextDevframeHubHandle;
|
|
210
210
|
//#endregion
|
|
211
|
-
export {
|
|
211
|
+
export type { CreateDevframeNextHostOptions, DevframeNextHost, DevframeNextHostMcpOptions };
|
package/dist/single.d.mts
CHANGED
|
@@ -28,7 +28,7 @@ interface DevframeNextConfig {
|
|
|
28
28
|
* })
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
declare function withDevframe<T extends DevframeNextConfig>(nextConfig?: T): T;
|
|
31
|
+
export declare function withDevframe<T extends DevframeNextConfig>(nextConfig?: T): T;
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/handler.d.ts
|
|
34
34
|
interface CreateDevframeNextHandlerOptions {
|
|
@@ -115,6 +115,6 @@ interface DevframeNextHandler {
|
|
|
115
115
|
* For a hub hosting many devframes at once, use `createDevframeNextHost`
|
|
116
116
|
* directly with `@devframes/hub`.
|
|
117
117
|
*/
|
|
118
|
-
declare function createDevframeNextHandler(def: DevframeDefinition, options?: CreateDevframeNextHandlerOptions): DevframeNextHandler;
|
|
118
|
+
export declare function createDevframeNextHandler(def: DevframeDefinition, options?: CreateDevframeNextHandlerOptions): DevframeNextHandler;
|
|
119
119
|
//#endregion
|
|
120
|
-
export {
|
|
120
|
+
export type { CreateDevframeNextHandlerOptions, DevframeNextConfig, DevframeNextHandler };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devframes/next",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.15",
|
|
5
5
|
"description": "Next.js host integration that serves mounted devframes from an App Router route.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"dist"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@devframes/hub": "0.9.
|
|
51
|
-
"@devframes/hub-ui": "0.9.
|
|
52
|
-
"devframe": "0.9.
|
|
50
|
+
"@devframes/hub": "0.9.15",
|
|
51
|
+
"@devframes/hub-ui": "0.9.15",
|
|
52
|
+
"devframe": "0.9.15",
|
|
53
53
|
"next": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
54
54
|
"react": "^18.0.0 || ^19.0.0"
|
|
55
55
|
},
|
|
@@ -68,16 +68,16 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"h3": "^2.0.1-rc.
|
|
71
|
+
"h3": "^2.0.1-rc.31"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@devframes/hub": "0.9.
|
|
75
|
-
"@devframes/hub-ui": "0.9.
|
|
76
|
-
"@types/node": "^26.
|
|
74
|
+
"@devframes/hub": "0.9.15",
|
|
75
|
+
"@devframes/hub-ui": "0.9.15",
|
|
76
|
+
"@types/node": "^26.5.0",
|
|
77
77
|
"@types/react": "^19.2.18",
|
|
78
|
-
"devframe": "0.9.
|
|
78
|
+
"devframe": "0.9.15",
|
|
79
79
|
"react": "^19.2.8",
|
|
80
|
-
"tsdown": "^0.
|
|
80
|
+
"tsdown": "^0.23.0"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"build": "tsdown",
|