File tree Expand file tree Collapse file tree 3 files changed +50
-7
lines changed
packages/storybook-addon-designs Expand file tree Collapse file tree 3 files changed +50
-7
lines changed Original file line number Diff line number Diff line change 4343 "release" : " npm run prepublishOnly && auto shipit"
4444 },
4545 "dependencies" : {
46- "@figspec/react" : " ^1 .0.0"
46+ "@figspec/react" : " ^2 .0.0"
4747 },
4848 "peerDependencies" : {
4949 "@storybook/addon-docs" : " ^10.0.0 || ^10.0.0-0 || ^10.1.0-0 || ^10.2.0-0" ,
Original file line number Diff line number Diff line change @@ -32,12 +32,15 @@ type RenderItem =
3232 type : "file" ;
3333 props : Pick <
3434 FigspecFileViewerProps ,
35- "documentNode " | "renderedImages" | "link"
35+ "apiResponse " | "renderedImages" | "link"
3636 > ;
3737 }
3838 | {
3939 type : "frame" ;
40- props : Pick < FigspecFrameViewerProps , "nodes" | "renderedImage" | "link" > ;
40+ props : Pick <
41+ FigspecFrameViewerProps ,
42+ "apiResponse" | "renderedImage" | "link"
43+ > ;
4144 } ;
4245
4346type Remote < T , E = Error > =
@@ -139,7 +142,7 @@ export const Figspec: FC<Props> = ({ config }) => {
139142 value : {
140143 type : "file" ,
141144 props : {
142- documentNode,
145+ apiResponse : documentNode ,
143146 renderedImages : images . images ,
144147 link : config . url ,
145148 } ,
@@ -168,7 +171,11 @@ export const Figspec: FC<Props> = ({ config }) => {
168171 value : {
169172 type : "frame" ,
170173 props : {
171- nodes,
174+ // Type mismatch due to different figma-js versions. As that library is
175+ // no longer maintained, upstream should mark this property `unknown` or
176+ // provided its own interface.
177+ apiResponse :
178+ nodes as unknown as FigspecFrameViewerProps [ "apiResponse" ] ,
172179 renderedImage : Object . values < string > ( images . images ) [ 0 ] ,
173180 link : config . url ,
174181 } ,
You can’t perform that action at this time.
0 commit comments