Skip to content

Commit

Permalink
feat: unstable multi specification api
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkvasnicak committed Oct 25, 2024
1 parent 309044c commit a3d27be
Show file tree
Hide file tree
Showing 6 changed files with 2,729 additions and 1 deletion.
40 changes: 40 additions & 0 deletions packages/render/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,46 @@
"default": "./dist/use-frame.cjs"
}
},
"./unstable-use-frame-state": {
"import": {
"types": "./dist/unstable-use-frame-state.d.ts",
"default": "./dist/unstable-use-frame-state.js"
},
"require": {
"types": "./dist/unstable-use-frame-state.d.cts",
"default": "./dist/unstable-use-frame-state.cjs"
}
},
"./unstable-use-fetch-frame": {
"import": {
"types": "./dist/unstable-use-fetch-frame.d.ts",
"default": "./dist/unstable-use-fetch-frame.js"
},
"require": {
"types": "./dist/unstable-use-fetch-frame.d.cts",
"default": "./dist/unstable-use-fetch-frame.cjs"
}
},
"./unstable-use-frame": {
"import": {
"types": "./dist/unstable-use-frame.d.ts",
"default": "./dist/unstable-use-frame.js"
},
"require": {
"types": "./dist/unstable-use-frame.d.cts",
"default": "./dist/unstable-use-frame.cjs"
}
},
"./unstable-types": {
"import": {
"types": "./dist/unstable-types.d.ts",
"default": "./dist/unstable-types.js"
},
"require": {
"types": "./dist/unstable-types.d.cts",
"default": "./dist/unstable-types.cjs"
}
},
"./identity/anonymous": {
"import": {
"types": "./dist/identity/anonymous/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/render/src/collapsed-frame-ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { ImgHTMLAttributes } from "react";
import React, { useState } from "react";
import type { Frame } from "frames.js";
import type { FrameTheme, FrameState } from "./types";
import type { UseFrameReturnValue } from "./unstable-types";

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

export type CollapsedFrameUIProps = {
frameState: FrameState<any, any>;
frameState: FrameState<any, any> | UseFrameReturnValue;
theme?: FrameTheme;
FrameImage?: React.FC<ImgHTMLAttributes<HTMLImageElement> & { src: string }>;
allowPartialFrame?: boolean;
Expand Down
Loading

0 comments on commit a3d27be

Please sign in to comment.