-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Move CSF to monorepo #30488
Merged
Merged
Core: Move CSF to monorepo #30488
Changes from 182 commits
Commits
Show all changes
187 commits
Select commit
Hold shift + click to select a range
4757376
Port from monorepo
shilman 168ddc6
types of csf properties
atanasster 17ddd7f
add parameters to CSFStory
atanasster a2dc364
field types as enum
atanasster 1ca8a10
updated interfaces
atanasster 13aedba
move placeholder to text variable
atanasster 76c7352
rename defaultValue to value
atanasster 09c659a
renamed StoryMetadata
atanasster 7885f22
remove unused
atanasster b0e456e
removed array type, sb specific
atanasster 11fd0f9
added Array field type
atanasster c0d96f2
date field
atanasster 72ce652
remove storyvalues
atanasster e2be313
fixed typos
atanasster 1db0d6f
typo
atanasster b8d9224
datePicker, timePicker
atanasster 5c5a97e
added maxRows to text type
atanasster d1f13a8
added order fied
atanasster 7bcb7f1
apply @BeInLife 's comment about generic type for StoryPropertyOptions
ndelangen 3fd17a7
types of csf properties (#3)
shilman a153358
Revert "types of csf properties (#3)"
wKich aae5e7e
add first proposal types for kind/story meta
wKich e9640be
add right type for `subcomponents` field
wKich 8c78ed4
improve parameters typings
wKich 3dc8b62
add exports, revert parameters to be less strict
wKich 2156f57
rewrite types without tricky infer part
wKich d40d389
add tests for story meta types
wKich bd014a0
return generic for parameters type
wKich 7857919
update babel to support optional chaining syntax
wKich 44e440d
add more kinds/stories to test typings
wKich d30e471
Merge pull request #5 from wKich/csf-types
shilman 3b0a4a5
Use 'toId' without story
unematiii 00561e0
First attempt at bringing new types over
tmeasday 7e3280d
Fix types after discussions with @shilman
tmeasday 39bc8b5
Don't use async
tmeasday 3937383
Add `applyDecorators` to `GlobalAnnotations`
tmeasday 7233010
`argType.x.type` can be a string/enum too
tmeasday bb8a422
Update InputTypes to have strict versions
tmeasday 3408a13
Fix up StrictInputTypes.
tmeasday 18a5ed9
Update enhancer to use StrictArgTypes
tmeasday 6af7987
Allow *any* key on StoryContextUpdates
tmeasday 7fd05d3
`args`+`globals` are optional on `StoryContextUpdate`
tmeasday 175c1c6
Rename Framework => AnyFramewokr
tmeasday 641b542
Use TArgs annotation right down the stack
tmeasday 01222b3
Separate user story annotations and internal story annotations
tmeasday 2f5b8ad
ArgTypes are allowed to be partial too
tmeasday 019e087
Rename `GlobalAnnotations` => `ProjectAnnotations`
tmeasday e875225
Add context arg to play function
ghengeveld cdffa02
Fix busted `StoryFn` types
tmeasday dd83e89
Add symbol to SB types
tmeasday fcd17b3
Default `TFramework` to `AnyFramework`
tmeasday f38d812
Don't pass anything to `play()` for now
tmeasday 43be735
Export a couple of extra types
tmeasday c219bde
Add context arg to play function
ghengeveld ca7f203
Allow empty string for story
ghengeveld 63194f9
Merge branch 'next' into 6-4-new-types
ghengeveld 407e966
Remove canvasElement fram framework
shilman 8a9ea3c
Only make `TArgs` parameterize `args` and `argTypes` in our default a…
tmeasday 41bafd4
Tighten up types again.
tmeasday e150d66
Play function can only be set at the story level
tmeasday 043cf25
Merge pull request #33 from ComponentDriven/16843-relax-TArgs-to-only…
shilman 728d58d
Add conditional arg types and metadata
shilman d4a95e2
Add tests
shilman fb79db7
Rename includeIf/excludeIf to addIf/removeIf
shilman 68f54e9
Revert "Play function can only be set at the story level"
wKich 54c72d4
Richer conditional args
shilman 794a0db
Fix build
shilman c0bc879
Implicit test for truthiness
shilman 3e5a24d
Add truthy test to conditional args
shilman 08796f6
Re-apply `TArgs` to CSF `render` type
tmeasday 4ec8ef3
Add no arg/global specified test
shilman 16b964d
Add step to play context and `runStep` to project annotations
tmeasday 73d1191
Update re: @ghengeveld
tmeasday e8bb156
Need to parameterize `runStep`
tmeasday 8e405b4
Step functions are allowed to be async of course
tmeasday bf7e1e8
Merge branch 'feat/conditional-args' into 41-tighten-render-type
shilman 387eafd
Merge branch '41-tighten-render-type' into add-step
shilman 5865ae8
SB-738: Sound arg types
kasperpeulen 64ee46a
Use HKT's instead
kasperpeulen 612a5db
update the test
kasperpeulen f71793e
explain usage for higher kinded T
kasperpeulen 29169d6
make T optional
kasperpeulen 8c64e8a
rename TArgsAnnotations -> TRequiredArgs
kasperpeulen 32afba5
fix subcomponents regression
kasperpeulen 9dcfacc
ArgsFromMeta utility and generic ArgsStoryFn RT
kasperpeulen 06e47d6
use tsup and upgrade dependencies
kasperpeulen 738f4c7
add type test for ArgsFromMeta
kasperpeulen f0ca9bc
Merge pull request #51 from ComponentDriven/kasper/csf-3-improvements
shilman d262cd9
Merge pull request #49 from ComponentDriven/kasper/sb-738/csf-3
shilman e952787
Merge pull request #48 from ComponentDriven/add-step
shilman 39d90ff
Merge pull request #43 from ComponentDriven/41-tighten-render-type
shilman 14b6243
Merge pull request #36 from ComponentDriven/feat/conditional-args
shilman fea7665
Merge branch '6-4-new-types' into 6-4-new-types
shilman 536b5ef
Merge pull request #40 from wKich/6-4-new-types
shilman c23fd58
Add tag annotation at all levels
tmeasday 7f8ddee
Don't allow tags at the project level (for now)
tmeasday ed2f780
Merge pull request #52 from ComponentDriven/tom/sb-827-add-basic-stor…
tmeasday b2d9219
Rework Framework type to contain `canvasElement`
tmeasday 2261621
Fix linting
tmeasday 8674bb9
Merge pull request #53 from ComponentDriven/tom/sb-850-add-canvasElem…
shilman af8d0e6
Rename Framework -> Renderer
kasperpeulen 3995bf8
Run test as ESM modules and some other boy scouting
kasperpeulen e338d6a
Merge pull request #54 from ComponentDriven/kasper/rename-framework-t…
kasperpeulen 051138c
Revert stricter parameters
kasperpeulen c5267ed
Merge pull request #56 from ComponentDriven/kasper/revert-stricter-pa…
kasperpeulen a6dcf83
Add strict variants
kasperpeulen 0085a76
Merge pull request #57 from ComponentDriven/kasper/stricter-variants
kasperpeulen a8f6c64
Make sure that index signatures (used in decorators) don't cause unex…
kasperpeulen 082a29a
Merge pull request #58 from ComponentDriven/kasper/remove-index-signa…
kasperpeulen e96a7e4
Fix bug with meta not working well as generic parameter for StoryObj
kasperpeulen 3038c8b
Merge pull request #60 from ComponentDriven/kasper/sb-1071-fix-ts-bug…
shilman 03dacb4
replace lodash
ndelangen 7c2689d
fix
ndelangen 20df700
improvements
ndelangen 2eaf7e7
trim and add tests
ndelangen e4bd8f7
Update src/toStartCaseStr.test.ts
ndelangen 3d13945
fix
ndelangen 443243e
Merge pull request #62 from ComponentDriven/norbert/no-lodash
shilman 63a2958
add more test, and fix an issue or 2
ndelangen 746bd7b
Merge branch 'next' into norbert/fix-startcase
ndelangen c604bb9
Merge pull request #64 from ComponentDriven/norbert/fix-startcase
ndelangen 9392597
Turn Args interfaces into types when passed to decorator
kasperpeulen 20d41cc
Merge pull request #65 from ComponentDriven/kasper/decorator-with-int…
shilman 520a8bb
Allow loaders to be synchronous or void
kasperpeulen 6cfa85d
Allow single loader as well
kasperpeulen 5691c7f
Allow single decorators as well
kasperpeulen c4aa6ab
Merge pull request #71 from ComponentDriven/kasper/improve-loaders
kasperpeulen caf44e7
Improve InputType
Shinigami92 9cf7abb
Update links to Storybook documentation
nkabrown a4941ca
Improve control types with discriminated union
shilman d61a8d2
Merge pull request #75 from Shinigami92/improve-input-type
shilman 2f950e5
Fix linting
shilman 8656cd1
Merge pull request #78 from ComponentDriven/shilman/fix-linting
shilman f9cd5ea
Add utility for tag combination & negation
shilman 7c403d7
Change negation from `-` to `!`
shilman 08907fe
Add project level tags
shilman dfbaa53
Fix combineTags to respect tag order
shilman 935793a
Fix control type
kasperpeulen a562a75
Merge pull request #83 from ComponentDriven/kasper/fix-control-type
kasperpeulen c1179c8
Add the beforeEach hook
kasperpeulen a482f84
Export CleanupCallback type
kasperpeulen 656a058
Change type
kasperpeulen f100389
fix: better handle readonly InputType options
Cherry 0f82d1e
Merge pull request #85 from Cherry/fix/story-InputType-options
kasperpeulen af4da7e
chore: resolve eslint issues
Cherry 5be6ddd
Merge pull request #87 from Cherry/fix/lint
kasperpeulen 9778f36
Change argument type of BeforeEach function from StoryContextForLoade…
kasperpeulen f7f9430
Merge pull request #82 from ComponentDriven/kasper/before-each
kasperpeulen d434dd8
Merge pull request #80 from ComponentDriven/shilman/add-combine-tags
shilman ac3306f
Add project initialGlobals and deprecate globals
shilman 0014145
Add globals annotation to component/story
shilman c016ebb
Merge pull request #92 from ComponentDriven/shilman/initial-globals
shilman 2c7f5ab
Add beforeAll hook to CSF types
ghengeveld e4b199b
Extend explanation of beforeAll hook
ghengeveld a7117d5
Merge pull request #96 from ComponentDriven/add-beforeAll-hook
shilman 49b756d
Consolidate loader, play and render context and add a self referencin…
kasperpeulen 29d584b
Fix types to interfaces
kasperpeulen ccbf651
Add canvas property to context that can be implemented by addons such…
kasperpeulen 0c9ba2c
Disable unnecessary eslint rule
kasperpeulen b444ddb
Add mount to csf
kasperpeulen 6a2a3dc
Merge pull request #99 from ComponentDriven/kasper/canvas
kasperpeulen 90a5619
Merge pull request #98 from ComponentDriven/kasper/context-consolidation
kasperpeulen 3ca2578
Merge pull request #100 from ComponentDriven/kasper/mount
kasperpeulen 459f980
Merge pull request #77 from nkabrown/update-storybook-links
ndelangen dd75176
Add ReportingAPI interface and reporting property to StoryContext
valentinpalkovic 7ee0fcb
Add the afterEach hook
kasperpeulen 057957e
Fix typo
kasperpeulen b4e2f39
Update type for reporting api
valentinpalkovic e11c1df
Update Report interface to use 'type' instead of 'id' and rename afte…
valentinpalkovic a1fe9e7
Rename afterEach to experimental_afterEach in story test cases
valentinpalkovic 0c8ef0f
Merge pull request #110 from ComponentDriven/valentin/add-reporting-api
kasperpeulen 0d68f51
Use any for generic of Renderer
kasperpeulen 8926d6f
Merge remote-tracking branch 'csf3/kasper/csf-factories' into kasper/…
kasperpeulen edff9f0
Move CSF package to monorepo
kasperpeulen 57a8edd
Change usage in core package
kasperpeulen d5bd041
Change usage outside of core package
kasperpeulen b1850a7
Eslint
kasperpeulen 0c3c48a
Fix build
kasperpeulen cfc2b59
Fix tests
kasperpeulen 6a325db
Fix tests
kasperpeulen a1b216d
Fix build
kasperpeulen 0dc0d0c
Fix eslint
kasperpeulen 68f742a
Apply suggestions from code review
shilman 329d5b6
Fix test
kasperpeulen c71d283
Remove @storybook/csf from package.json
kasperpeulen 1d5017f
Merge remote-tracking branch 'origin/next' into kasper/csf-in-monorepo
kasperpeulen 43f0399
Add csf back to svelte, workaround for addon-svelte-csf needing it wi…
kasperpeulen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
interface SBBaseType { | ||
required?: boolean; | ||
raw?: string; | ||
} | ||
|
||
export type SBScalarType = SBBaseType & { | ||
name: 'boolean' | 'string' | 'number' | 'function' | 'symbol'; | ||
}; | ||
|
||
export type SBArrayType = SBBaseType & { | ||
name: 'array'; | ||
value: SBType; | ||
}; | ||
export type SBObjectType = SBBaseType & { | ||
name: 'object'; | ||
value: Record<string, SBType>; | ||
}; | ||
export type SBEnumType = SBBaseType & { | ||
name: 'enum'; | ||
value: (string | number)[]; | ||
}; | ||
export type SBIntersectionType = SBBaseType & { | ||
name: 'intersection'; | ||
value: SBType[]; | ||
}; | ||
export type SBUnionType = SBBaseType & { | ||
name: 'union'; | ||
value: SBType[]; | ||
}; | ||
export type SBOtherType = SBBaseType & { | ||
name: 'other'; | ||
value: string; | ||
}; | ||
|
||
export type SBType = | ||
| SBScalarType | ||
| SBEnumType | ||
| SBArrayType | ||
| SBObjectType | ||
| SBIntersectionType | ||
| SBUnionType | ||
| SBOtherType; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: SBBaseType interface should be exported since it's used by other exported types