-
Notifications
You must be signed in to change notification settings - Fork 33
Support MDX docs from manifests #120
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
85a71ec
make getManifest handle both component and docs manifests
JReinhold b577091
add support for docs manifest in both tools
JReinhold b62ba38
update bin and eval to support manifest split
JReinhold 65870cd
fix manifest feature detection
JReinhold 57643f5
add MDX files to test support
JReinhold fc7c0a2
Use canary version of https://github.com/storybookjs/storybook/pull/3…
JReinhold 4c052cd
fix tests
JReinhold c54ad45
rename "list all components" tool to "list all documentation"
JReinhold dee8b9d
fix check-deps e2e tests
JReinhold 5881e24
remove dependency on canary again
JReinhold 28ee9e1
add changesets
JReinhold 7d23317
Merge branch 'main' of https://github.com/storybookjs/mcp into suppor…
JReinhold f999cae
fix Button.mdx to match implementation
JReinhold a9b47ee
fix lints
JReinhold 4373b10
add support for summary in MDX
JReinhold 38d21e1
update storybook deps
JReinhold 54e1ee8
small docs fixes
JReinhold 2d99115
simpllify storybook docs context in eval to always get components.jso…
JReinhold 861b5a4
update storybook
JReinhold 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 hidden or 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,5 @@ | ||
| --- | ||
| '@storybook/addon-mcp': patch | ||
| --- | ||
|
|
||
| Add support for docs entries in manifests, sourced by MDX files. | ||
This file contains hidden or 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,17 @@ | ||
| --- | ||
|
JReinhold marked this conversation as resolved.
|
||
| '@storybook/mcp': minor | ||
| --- | ||
|
|
||
| Add support for docs entries in manifests, sourced by MDX files. | ||
|
|
||
| # Breaking Changes | ||
|
|
||
| This change introduces a number of minor breaking changes to `@storybook/mcp`: | ||
|
|
||
| 1. The lower level tool adder functions have been renamed: | ||
| 2. `addGetComponentDocumentationTool` -> `addGetDocumentationTool` | ||
| 3. `addListAllComponentsTool` -> `addListAllDocumentationTool` | ||
| 4. The optional tool hooks have been renamed: | ||
| 5. `onListAllComponents` -> `onListAllDocumentation` | ||
| 6. `onGetComponentDocumentation` -> `onGetDocumentation` | ||
| 7. The exported `MANIFEST_PATH` constant have been removed in favor of two new constants, `COMPONENT_MANIFEST_PATH` and `DOCS_MANIFEST_PATH` | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,10 @@ | ||
| import { Meta, Canvas } from '@storybook/addon-docs/blocks'; | ||
| import * as ButtonStories from './Button.stories'; | ||
|
|
||
| <Meta of={ButtonStories} name="Additional Information" /> | ||
|
|
||
| It is critical when using the Button component, that the string passed to the `label` prop uses the 🍌-emoji instead of spaces. | ||
|
|
||
| Here is the button: | ||
|
|
||
| <Canvas of={ButtonStories.Primary} /> |
This file contains hidden or 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,7 @@ | ||
| # Getting Started | ||
|
|
||
| This is the getting started documentation of this design system. | ||
|
|
||
| ## Usage | ||
|
|
||
| The most critical information to know, is that when using the Button component, you MUST put the 🍇-emoji before and after the component, otherwise it will break. |
This file contains hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.