@devframes/next 0.9.5 → 0.9.7
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/hub-client.d.mts +5 -5
- package/dist/hub-client.mjs +3 -3
- package/dist/hub.d.mts +1 -1
- package/dist/hub.mjs +2 -1
- package/package.json +7 -7
package/dist/hub-client.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DevframeClientHost,
|
|
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
|
|
3
|
+
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.
|
|
@@ -14,7 +14,7 @@ interface UseDevframeHubClientOptions extends DevframeClientHostOptions$1 {
|
|
|
14
14
|
* the browser half of {@link import('./hub').nextDevframeHub}. Connects RPC to
|
|
15
15
|
* the hub (defaulting `base` to `/__devframes/`), assembles the shared
|
|
16
16
|
* `DevframeClientContext`, imports each dock's client script into the page,
|
|
17
|
-
* and disposes on unmount. Returns the {@link
|
|
17
|
+
* and disposes on unmount. Returns the {@link DevframeClientRuntime} once ready
|
|
18
18
|
* (`null` while connecting).
|
|
19
19
|
*
|
|
20
20
|
* Only needed when you render your own dock UI (or override the hub's `ui`).
|
|
@@ -24,6 +24,6 @@ interface UseDevframeHubClientOptions extends DevframeClientHostOptions$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):
|
|
27
|
+
declare function useDevframeHubClient(options?: UseDevframeHubClientOptions): DevframeClientRuntime$1 | null;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { type DevframeClientHost, type DevframeClientHostOptions, UseDevframeHubClientOptions, useDevframeHubClient };
|
|
29
|
+
export { type DevframeClientHost, type DevframeClientHostOptions, type DevframeClientRuntime, type DevframeClientRuntimeOptions, UseDevframeHubClientOptions, useDevframeHubClient };
|
package/dist/hub-client.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { createDevframeClientRuntime } from "@devframes/hub/client";
|
|
4
4
|
import { DEVFRAMES_HUB_BASE } from "@devframes/hub/constants";
|
|
5
5
|
//#region src/hub-client.tsx
|
|
6
6
|
/**
|
|
@@ -8,7 +8,7 @@ import { DEVFRAMES_HUB_BASE } from "@devframes/hub/constants";
|
|
|
8
8
|
* the browser half of {@link import('./hub').nextDevframeHub}. Connects RPC to
|
|
9
9
|
* the hub (defaulting `base` to `/__devframes/`), assembles the shared
|
|
10
10
|
* `DevframeClientContext`, imports each dock's client script into the page,
|
|
11
|
-
* and disposes on unmount. Returns the {@link
|
|
11
|
+
* and disposes on unmount. Returns the {@link DevframeClientRuntime} once ready
|
|
12
12
|
* (`null` while connecting).
|
|
13
13
|
*
|
|
14
14
|
* Only needed when you render your own dock UI (or override the hub's `ui`).
|
|
@@ -24,7 +24,7 @@ function useDevframeHubClient(options = {}) {
|
|
|
24
24
|
useEffect(() => {
|
|
25
25
|
let disposed = false;
|
|
26
26
|
let created;
|
|
27
|
-
|
|
27
|
+
createDevframeClientRuntime({
|
|
28
28
|
...options,
|
|
29
29
|
...rpc ? { rpc } : { connect: {
|
|
30
30
|
baseURL: base,
|
package/dist/hub.d.mts
CHANGED
|
@@ -127,7 +127,7 @@ interface NextDevframeHubOptions {
|
|
|
127
127
|
* The hub's UI slot. Defaults to `@devframes/hub-ui`'s `createUi()` (loaded
|
|
128
128
|
* through a bundler-ignored dynamic `import()` so its `import.meta.url` asset
|
|
129
129
|
* lookups resolve at request time). Pass your own {@link DevframeHubUi} to
|
|
130
|
-
* swap the
|
|
130
|
+
* swap the hub UI provider, or `false` for a headless hub.
|
|
131
131
|
*/
|
|
132
132
|
ui?: DevframeHubUi | false;
|
|
133
133
|
/** The hub's single auth gate. Gates by default; `false` opts out. */
|
package/dist/hub.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DEVFRAMES_HUB_BASE, normalizeHubBase } from "@devframes/hub/constants";
|
|
2
2
|
import { initHub } from "@devframes/hub/initiate";
|
|
3
3
|
import { DEVFRAME_CONNECTION_META_FILENAME } from "devframe/constants";
|
|
4
|
+
import { importRuntimeModule } from "devframe/internal";
|
|
4
5
|
import { serveStaticHandler } from "devframe/utils/serve-static";
|
|
5
6
|
import { H3 } from "h3";
|
|
6
7
|
//#region src/host.ts
|
|
@@ -60,7 +61,7 @@ function createDevframeNextHost(options) {
|
|
|
60
61
|
connectionMeta = meta;
|
|
61
62
|
},
|
|
62
63
|
async mountMcp(ctx, path, mcpOptions = {}) {
|
|
63
|
-
const { createMcpFetchHandler } = await
|
|
64
|
+
const { createMcpFetchHandler } = await importRuntimeModule("devframe/adapters/mcp");
|
|
64
65
|
const handler = createMcpFetchHandler(ctx, {
|
|
65
66
|
serverName: mcpOptions.serverName ?? "devframe (next)",
|
|
66
67
|
serverVersion: mcpOptions.serverVersion ?? "0.0.0",
|
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.7",
|
|
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",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"next": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
51
51
|
"react": "^18.0.0 || ^19.0.0",
|
|
52
|
-
"@devframes/hub
|
|
53
|
-
"@devframes/hub": "0.9.
|
|
54
|
-
"devframe": "0.9.
|
|
52
|
+
"@devframes/hub": "0.9.7",
|
|
53
|
+
"@devframes/hub-ui": "0.9.7",
|
|
54
|
+
"devframe": "0.9.7"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
57
57
|
"@devframes/hub": {
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"@types/react": "^19.2.18",
|
|
76
76
|
"react": "^19.2.8",
|
|
77
77
|
"tsdown": "^0.22.14",
|
|
78
|
-
"@devframes/hub
|
|
79
|
-
"
|
|
80
|
-
"
|
|
78
|
+
"@devframes/hub": "0.9.7",
|
|
79
|
+
"@devframes/hub-ui": "0.9.7",
|
|
80
|
+
"devframe": "0.9.7"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"build": "tsdown",
|