@langchain/langgraph-sdk 0.0.52 → 0.0.53
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/react-ui/client.cjs
CHANGED
|
@@ -117,10 +117,10 @@ function LoadExternalComponent({ stream, message, meta, fallback, components, ..
|
|
|
117
117
|
hasClientComponent,
|
|
118
118
|
]);
|
|
119
119
|
if (hasClientComponent) {
|
|
120
|
-
return React.createElement(clientComponent, message.
|
|
120
|
+
return React.createElement(clientComponent, message.props);
|
|
121
121
|
}
|
|
122
122
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { id: shadowRootId, ref: ref, ...props }), (0, jsx_runtime_1.jsx)(UseStreamContext.Provider, { value: { stream, meta }, children: state?.target != null
|
|
123
|
-
? ReactDOM.createPortal(React.createElement(state.comp, message.
|
|
123
|
+
? ReactDOM.createPortal(React.createElement(state.comp, message.props), state.target)
|
|
124
124
|
: fallback })] }));
|
|
125
125
|
}
|
|
126
126
|
exports.LoadExternalComponent = LoadExternalComponent;
|
package/dist/react-ui/client.js
CHANGED
|
@@ -90,10 +90,10 @@ export function LoadExternalComponent({ stream, message, meta, fallback, compone
|
|
|
90
90
|
hasClientComponent,
|
|
91
91
|
]);
|
|
92
92
|
if (hasClientComponent) {
|
|
93
|
-
return React.createElement(clientComponent, message.
|
|
93
|
+
return React.createElement(clientComponent, message.props);
|
|
94
94
|
}
|
|
95
95
|
return (_jsxs(_Fragment, { children: [_jsx("div", { id: shadowRootId, ref: ref, ...props }), _jsx(UseStreamContext.Provider, { value: { stream, meta }, children: state?.target != null
|
|
96
|
-
? ReactDOM.createPortal(React.createElement(state.comp, message.
|
|
96
|
+
? ReactDOM.createPortal(React.createElement(state.comp, message.props), state.target)
|
|
97
97
|
: fallback })] }));
|
|
98
98
|
}
|
|
99
99
|
export function bootstrapUiContext() {
|
|
@@ -18,10 +18,10 @@ const typedUi = (config) => {
|
|
|
18
18
|
type: "ui",
|
|
19
19
|
id: message?.id ?? (0, uuid_1.v4)(),
|
|
20
20
|
name: message?.name,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
props: message?.props,
|
|
22
|
+
metadata: {
|
|
23
23
|
...metadata,
|
|
24
|
-
...message?.
|
|
24
|
+
...message?.metadata,
|
|
25
25
|
...(options?.message ? { message_id: options.message.id } : null),
|
|
26
26
|
},
|
|
27
27
|
};
|
|
@@ -13,8 +13,8 @@ export declare const typedUi: <Decl extends Record<string, ElementType>>(config:
|
|
|
13
13
|
push: <K extends keyof Decl & string>(message: {
|
|
14
14
|
id?: string | undefined;
|
|
15
15
|
name: K;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
props: { [K_1 in keyof Decl]: ComponentPropsWithoutRef<Decl[K_1]>; }[K];
|
|
17
|
+
metadata?: Record<string, unknown> | undefined;
|
|
18
18
|
}, options?: {
|
|
19
19
|
message?: MessageLike;
|
|
20
20
|
}) => UIMessage;
|
|
@@ -15,10 +15,10 @@ export const typedUi = (config) => {
|
|
|
15
15
|
type: "ui",
|
|
16
16
|
id: message?.id ?? uuidv4(),
|
|
17
17
|
name: message?.name,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
props: message?.props,
|
|
19
|
+
metadata: {
|
|
20
20
|
...metadata,
|
|
21
|
-
...message?.
|
|
21
|
+
...message?.metadata,
|
|
22
22
|
...(options?.message ? { message_id: options.message.id } : null),
|
|
23
23
|
},
|
|
24
24
|
};
|
package/dist/react-ui/types.d.ts
CHANGED