Skip to content

Commit a6014cf

Browse files
feat: unstable multi specification api
1 parent 740ca39 commit a6014cf

File tree

6 files changed

+2729
-1
lines changed

6 files changed

+2729
-1
lines changed

packages/render/package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,46 @@
120120
"default": "./dist/use-frame.cjs"
121121
}
122122
},
123+
"./unstable-use-frame-state": {
124+
"import": {
125+
"types": "./dist/unstable-use-frame-state.d.ts",
126+
"default": "./dist/unstable-use-frame-state.js"
127+
},
128+
"require": {
129+
"types": "./dist/unstable-use-frame-state.d.cts",
130+
"default": "./dist/unstable-use-frame-state.cjs"
131+
}
132+
},
133+
"./unstable-use-fetch-frame": {
134+
"import": {
135+
"types": "./dist/unstable-use-fetch-frame.d.ts",
136+
"default": "./dist/unstable-use-fetch-frame.js"
137+
},
138+
"require": {
139+
"types": "./dist/unstable-use-fetch-frame.d.cts",
140+
"default": "./dist/unstable-use-fetch-frame.cjs"
141+
}
142+
},
143+
"./unstable-use-frame": {
144+
"import": {
145+
"types": "./dist/unstable-use-frame.d.ts",
146+
"default": "./dist/unstable-use-frame.js"
147+
},
148+
"require": {
149+
"types": "./dist/unstable-use-frame.d.cts",
150+
"default": "./dist/unstable-use-frame.cjs"
151+
}
152+
},
153+
"./unstable-types": {
154+
"import": {
155+
"types": "./dist/unstable-types.d.ts",
156+
"default": "./dist/unstable-types.js"
157+
},
158+
"require": {
159+
"types": "./dist/unstable-types.d.cts",
160+
"default": "./dist/unstable-types.cjs"
161+
}
162+
},
123163
"./identity/anonymous": {
124164
"import": {
125165
"types": "./dist/identity/anonymous/index.d.ts",

packages/render/src/collapsed-frame-ui.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { ImgHTMLAttributes } from "react";
22
import React, { useState } from "react";
33
import type { Frame } from "frames.js";
44
import type { FrameTheme, FrameState } from "./types";
5+
import type { UseFrameReturnValue } from "./unstable-types";
56

67
const defaultTheme: Required<FrameTheme> = {
78
buttonBg: "#fff",
@@ -20,7 +21,7 @@ const getThemeWithDefaults = (theme: FrameTheme): FrameTheme => {
2021
};
2122

2223
export type CollapsedFrameUIProps = {
23-
frameState: FrameState<any, any>;
24+
frameState: FrameState<any, any> | UseFrameReturnValue;
2425
theme?: FrameTheme;
2526
FrameImage?: React.FC<ImgHTMLAttributes<HTMLImageElement> & { src: string }>;
2627
allowPartialFrame?: boolean;

0 commit comments

Comments
 (0)