@aganzefelicite/responsekit-react 0.2.1 → 0.3.0
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/index.cjs +767 -766
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +475 -474
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -59,8 +59,14 @@ type BlockComponent<B extends Block = Block> = ComponentType<BlockComponentProps
|
|
|
59
59
|
type BlockComponents = Record<string, BlockComponent>;
|
|
60
60
|
|
|
61
61
|
interface AiRendererProps {
|
|
62
|
-
/**
|
|
63
|
-
|
|
62
|
+
/**
|
|
63
|
+
* The response to render. Typically a well-formed `AiResponse` (e.g. from
|
|
64
|
+
* `useAiStream().response`), but ANY value is accepted: it's always run through
|
|
65
|
+
* `parseAiResponse`, which normalises a valid response, coerces unknown blocks to a
|
|
66
|
+
* safe fallback, and degrades anything unrecognisable to an ERROR card. This is what
|
|
67
|
+
* lets you point the renderer at a different backend's raw JSON without a crash.
|
|
68
|
+
*/
|
|
69
|
+
response: AiResponse | unknown;
|
|
64
70
|
/** Per-render component overrides, keyed by block `type`. */
|
|
65
71
|
components?: BlockComponents;
|
|
66
72
|
/** Single outbound action channel. */
|
package/dist/index.d.ts
CHANGED
|
@@ -59,8 +59,14 @@ type BlockComponent<B extends Block = Block> = ComponentType<BlockComponentProps
|
|
|
59
59
|
type BlockComponents = Record<string, BlockComponent>;
|
|
60
60
|
|
|
61
61
|
interface AiRendererProps {
|
|
62
|
-
/**
|
|
63
|
-
|
|
62
|
+
/**
|
|
63
|
+
* The response to render. Typically a well-formed `AiResponse` (e.g. from
|
|
64
|
+
* `useAiStream().response`), but ANY value is accepted: it's always run through
|
|
65
|
+
* `parseAiResponse`, which normalises a valid response, coerces unknown blocks to a
|
|
66
|
+
* safe fallback, and degrades anything unrecognisable to an ERROR card. This is what
|
|
67
|
+
* lets you point the renderer at a different backend's raw JSON without a crash.
|
|
68
|
+
*/
|
|
69
|
+
response: AiResponse | unknown;
|
|
64
70
|
/** Per-render component overrides, keyed by block `type`. */
|
|
65
71
|
components?: BlockComponents;
|
|
66
72
|
/** Single outbound action channel. */
|