-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7817b0
commit a007256
Showing
16 changed files
with
235 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,17 @@ | ||
export interface FileComponentSearchPayload { | ||
// A regular string or a glob pattern | ||
searchQuery?: string; | ||
} | ||
export interface FileComponentSearchRequestPayload {} | ||
|
||
export interface FileComponentSearchResult { | ||
success: true | false; | ||
result: null | { | ||
// The search query - Helps to identify the event on the frontend | ||
searchQuery: string; | ||
files: Array<{ | ||
// The filepath relative to the project root | ||
filepath: string; | ||
// Whether a corresponding story file exists | ||
storyFileExists: boolean; | ||
// A list of exported components | ||
exportedComponents: Array<{ | ||
// the name of the exported component | ||
name: string; | ||
// True, if the exported component is a default export | ||
default: boolean; | ||
}> | null; | ||
export interface FileComponentSearchResponsePayload { | ||
files: Array<{ | ||
// The filepath relative to the project root | ||
filepath: string; | ||
// Whether a corresponding story file exists | ||
storyFileExists: boolean; | ||
// A list of exported components | ||
exportedComponents: Array<{ | ||
// the name of the exported component | ||
name: string; | ||
// True, if the exported component is a default export | ||
default: boolean; | ||
}> | null; | ||
}; | ||
error: null | string; | ||
}> | null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
export interface SaveStoryRequest { | ||
id: string; | ||
payload: { | ||
csfId: string; | ||
importPath: string; | ||
args: Record<string, any>; | ||
name?: string; | ||
}; | ||
export interface SaveStoryRequestPayload { | ||
args: string | undefined; | ||
csfId: string; | ||
importPath: string; | ||
name?: string; | ||
} | ||
|
||
export type SaveStoryResponse = ( | ||
| { id: string; success: true } | ||
| { id: string; success: false; error: string } | ||
) & { | ||
payload: { | ||
csfId: string; | ||
newStoryId?: string; | ||
newStoryName?: string; | ||
sourceFileName?: string; | ||
sourceStoryName?: string; | ||
}; | ||
}; | ||
export interface SaveStoryResponsePayload { | ||
csfId: string; | ||
newStoryId?: string; | ||
newStoryName?: string; | ||
sourceFileName?: string; | ||
sourceStoryName?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.