Add comprehensive development roadmap via GitHub Issues
Created 10 detailed GitHub issues covering: - Project activation and management UI (#1-2) - Worker node coordination and visualization (#3-4) - Automated GitHub repository scanning (#5) - Intelligent model-to-issue matching (#6) - Multi-model task execution system (#7) - N8N workflow integration (#8) - Hive-Bzzz P2P bridge (#9) - Peer assistance protocol (#10) Each issue includes detailed specifications, acceptance criteria, technical implementation notes, and dependency mapping. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
154
frontend/node_modules/@storybook/addon-docs/README.md
generated
vendored
Normal file
154
frontend/node_modules/@storybook/addon-docs/README.md
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
<center>
|
||||
<img src="https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/docs/docs/media/hero.png" width="100%" />
|
||||
</center>
|
||||
|
||||
# Storybook Docs
|
||||
|
||||
> migration guide: This page documents the method to configure Storybook introduced recently in 7.0.0, consult the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) if you want to migrate to this format of configuring Storybook.
|
||||
|
||||
Storybook Docs transforms your Storybook stories into world-class component documentation.
|
||||
|
||||
**DocsPage.** Out of the box, all your stories get a `DocsPage`. `DocsPage` is a zero-config aggregation of your component stories, text descriptions, docgen comments, props tables, and code examples into clean, readable pages.
|
||||
|
||||
**MDX.** If you want more control, `MDX` allows you to write long-form markdown documentation and include stories in one file. You can also use it to write pure documentation pages and embed them inside your Storybook alongside your stories.
|
||||
|
||||
Just like Storybook, Docs supports every major view layer including React, Vue 3, Angular, HTML, Web components, Svelte, and many more.
|
||||
|
||||
Read on to learn more:
|
||||
|
||||
- [Storybook Docs](#storybook-docs)
|
||||
- [DocsPage](#docspage)
|
||||
- [MDX](#mdx)
|
||||
- [Framework support](#framework-support)
|
||||
- [Installation](#installation)
|
||||
- [Be sure to check framework specific installation needs](#be-sure-to-check-framework-specific-installation-needs)
|
||||
- [Preset options](#preset-options)
|
||||
- [TypeScript configuration](#typescript-configuration)
|
||||
- [More resources](#more-resources)
|
||||
|
||||
## DocsPage
|
||||
|
||||
When you [install Docs](#installation), every story gets a `DocsPage`. `DocsPage` pulls information from your stories, components, source code, and story metadata to construct a sensible, zero-config default.
|
||||
|
||||
Click on the `Docs` tab to see it:
|
||||
|
||||
<center>
|
||||
<img src="https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/docs/docs/media/docs-tab.png" width="100%" />
|
||||
</center>
|
||||
|
||||
For more information on how it works, see the [`DocsPage` reference](https://github.com/storybookjs/storybook/blob/next/code/addons/docs/docs/docspage.md).
|
||||
|
||||
## MDX
|
||||
|
||||
`MDX` is a syntax for writing long-form documentation with stories side-by-side in the same file. In contrast to `DocsPage`, which provides smart documentation out of the box, `MDX` gives you full control over your component documentation.
|
||||
|
||||
Here's an example file:
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
|
||||
```md
|
||||
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
|
||||
import * as CheckboxStories from './Checkbox.stories';
|
||||
|
||||
<Meta title="MDX/Checkbox" of={CheckboxStories} />
|
||||
|
||||
# Checkbox
|
||||
|
||||
With `MDX` we can include a story for `Checkbox` right in the middle of our
|
||||
markdown documentation.
|
||||
|
||||
<Canvas>
|
||||
<Story of={CheckboxStories.Unchecked} />
|
||||
</Canvas>
|
||||
```
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
And here's how that's rendered in Storybook:
|
||||
|
||||
<center>
|
||||
<img src="https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/docs/docs/media/mdx-simple.png" width="100%" />
|
||||
</center>
|
||||
|
||||
For more information on `MDX`, see the [`MDX` reference](https://github.com/storybookjs/storybook/blob/next/code/addons/docs/docs/mdx.md).
|
||||
|
||||
## Framework support
|
||||
|
||||
Storybook Docs supports all view layers that Storybook supports except for React Native (currently). There are some framework-specific features as well, such as props tables and inline story rendering. The following page captures the current state of support:
|
||||
|
||||
[Framework Support](https://storybook.js.org/docs/configure/integration/frameworks-feature-support)
|
||||
|
||||
**Note:** `#` = WIP support
|
||||
|
||||
Want to add enhanced features to your favorite framework? Check out this [dev guide](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/multiframework.md)
|
||||
|
||||
## Installation
|
||||
|
||||
First add the package. Make sure that the versions for your `@storybook/*` packages match:
|
||||
|
||||
```sh
|
||||
yarn add -D @storybook/addon-docs
|
||||
```
|
||||
|
||||
Docs has peer dependencies on `react`. If you want to write stories in MDX, you may need to add this dependency as well:
|
||||
|
||||
```sh
|
||||
yarn add -D react
|
||||
```
|
||||
|
||||
Then add the following to your `.storybook/main.js`:
|
||||
|
||||
```js
|
||||
export default {
|
||||
stories: [
|
||||
'../src/**/*.mdx', // 👈 Add this, to match your project's structure
|
||||
'../src/**/*.stories.@(js|jsx|ts|tsx)',
|
||||
],
|
||||
addons: [
|
||||
'@storybook/addon-docs', // 👈 Also add this
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
### Be sure to check framework specific installation needs
|
||||
|
||||
- [React](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/react) (covered here)
|
||||
- [Vue 3](https://github.com/storybookjs/storybook/blob/next/code/addons/docs/vue3)
|
||||
- [Angular](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/angular)
|
||||
- [Ember](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/ember)
|
||||
- [Web Components](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/web-components)
|
||||
- [Common setup (all other frameworks)](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/common)
|
||||
|
||||
## Preset options
|
||||
|
||||
The `addon-docs` preset has a few configuration options that can be used to configure its babel/webpack loading behavior. Here's an example of how to use the preset with options:
|
||||
|
||||
```js
|
||||
export default {
|
||||
addons: [
|
||||
{
|
||||
name: '@storybook/addon-docs',
|
||||
options: {
|
||||
csfPluginOptions: null,
|
||||
mdxPluginOptions: {},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
`csfPluginOptions` is an object for configuring `@storybook/csf-plugin`. When set to `null` it tells docs not to run the `csf-plugin` at all, which can be used as an optimization, or if you're already using `csf-plugin` in your `main.js`.
|
||||
|
||||
> With the release of version 7.0, it is no longer possible to import `.md` files directly into Storybook using the `transcludeMarkdown` [option](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#importing-plain-markdown-files-with-transcludemarkdown-has-changed). Instead, we recommend using the [`Markdown`](https://storybook.js.org/docs/api/doc-blocks/doc-block-markdown) Doc Block for importing Markdown files into your Storybook documentation.
|
||||
|
||||
## TypeScript configuration
|
||||
|
||||
As of SB6 [TypeScript is zero-config](https://storybook.js.org/docs/configure/integration/typescript) and should work with SB Docs out of the box. For advanced configuration options, refer to the [Props documentation](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/props-tables.md).
|
||||
|
||||
## More resources
|
||||
|
||||
Want to learn more? Here are some more articles on Storybook Docs:
|
||||
|
||||
- References: [DocsPage](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/docspage.md) / [MDX](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/mdx.md) / [FAQ](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/faq.md) / [Recipes](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/recipes.md) / [Theming](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/theming.md) / [Props](https://github.com/storybookjs/storybook/tree/next/code/addons/docs/docs/props-tables.md)
|
||||
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
|
||||
- Example: [Storybook Design System](https://github.com/storybookjs/design-system)
|
||||
256
frontend/node_modules/@storybook/addon-docs/angular/README.md
generated
vendored
Normal file
256
frontend/node_modules/@storybook/addon-docs/angular/README.md
generated
vendored
Normal file
@@ -0,0 +1,256 @@
|
||||
<center>
|
||||
<img src="../docs/media/angular-hero.png" width="100%" />
|
||||
</center>
|
||||
|
||||
<h1>Storybook Docs for Angular</h1>
|
||||
|
||||
> migration guide: This page documents the method to configure storybook introduced recently in 5.3.0, consult the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) if you want to migrate to this format of configuring storybook.
|
||||
|
||||
Storybook Docs transforms your Storybook stories into world-class component documentation. Storybook Docs for Angular supports [DocsPage](../docs/docspage.md) for auto-generated docs, and [MDX](../docs/mdx.md) for rich long-form docs.
|
||||
|
||||
To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Angular specifics, read on!
|
||||
|
||||
- [Installation](#installation)
|
||||
- [DocsPage](#docspage)
|
||||
- [Props tables](#props-tables)
|
||||
- [Automatic Compodoc setup](#automatic-compodoc-setup)
|
||||
- [Manual Compodoc setup](#manual-compodoc-setup)
|
||||
- [MDX](#mdx)
|
||||
- [IFrame height](#iframe-height)
|
||||
- [Inline Stories](#inline-stories)
|
||||
- [More resources](#more-resources)
|
||||
|
||||
## Installation
|
||||
|
||||
First add the package. Make sure that the versions for your `@storybook/*` packages match:
|
||||
|
||||
```sh
|
||||
yarn add -D @storybook/addon-docs
|
||||
```
|
||||
|
||||
Then add the following to your `.storybook/main.js` exports:
|
||||
|
||||
```js
|
||||
export default {
|
||||
addons: ['@storybook/addon-docs'],
|
||||
};
|
||||
```
|
||||
|
||||
## DocsPage
|
||||
|
||||
When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI.
|
||||
|
||||
## Props tables
|
||||
|
||||
Getting [Props tables](../docs/props-tables.md) for your components requires a few more steps. Docs for Angular relies on [Compodoc](https://compodoc.app/), the excellent API documentation tool. It supports `inputs`, `outputs`, `properties`, `methods`, `view/content child/children` as first class prop types.
|
||||
|
||||
### Automatic Compodoc setup
|
||||
|
||||
During `sb init`, you will be asked, whether you want to setup Compodoc for your project. Just answer the question with Yes. Compodoc is then ready to use!
|
||||
|
||||
## Manual Compodoc setup
|
||||
|
||||
You'll need to register Compodoc's `documentation.json` file in `.storybook/preview.ts`:
|
||||
|
||||
```js
|
||||
import { setCompodocJson } from '@storybook/addon-docs/angular';
|
||||
import docJson from '../documentation.json';
|
||||
|
||||
setCompodocJson(docJson);
|
||||
```
|
||||
|
||||
Finally, to set up compodoc, you'll first need to install Compodoc:
|
||||
|
||||
```sh
|
||||
yarn add -D @compodoc/compodoc
|
||||
```
|
||||
|
||||
Then you'll need to configure Compodoc to generate a `documentation.json` file. Adding the following snippet to your `projects.<project>.architect.<storybook|build-storybook>` in the `angular.json` creates a metadata file `./documentation.json` each time you run storybook:
|
||||
|
||||
```jsonc
|
||||
// angular.json
|
||||
{
|
||||
"projects": {
|
||||
"your-project": {
|
||||
"architect": {
|
||||
"storybook": {
|
||||
...,
|
||||
"compodoc": true,
|
||||
"compodocArgs": [
|
||||
"-e",
|
||||
"json",
|
||||
"-d",
|
||||
"." // the root folder of your project
|
||||
],
|
||||
},
|
||||
"build-storybook": {
|
||||
...,
|
||||
"compodoc": true,
|
||||
"compodocArgs": [
|
||||
"-e",
|
||||
"json",
|
||||
"-d",
|
||||
"." // the root folder of your project
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Unfortunately, it's not currently possible to update this dynamically as you edit your components, but [there's an open issue](https://github.com/storybookjs/storybook/issues/8672) to support this with improvements to Compodoc.
|
||||
|
||||
Finally, be sure to fill in the `component` field in your story metadata:
|
||||
|
||||
```ts
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
export default {
|
||||
title: 'App Component',
|
||||
component: AppComponent,
|
||||
};
|
||||
```
|
||||
|
||||
If you haven't upgraded from `storiesOf`, you can use a parameter to do the same thing:
|
||||
|
||||
```ts
|
||||
import { storiesOf } from '@storybook/angular';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
storiesOf('App Component', module)
|
||||
.addParameters({ component: AppComponent })
|
||||
.add( ... );
|
||||
```
|
||||
|
||||
## MDX
|
||||
|
||||
[MDX](../docs/mdx.md) is a convenient way to document your components in Markdown and embed documentation components, such as stories and props tables, inline.
|
||||
|
||||
Docs has peer dependencies on `react`. If you want to write stories in MDX, you may need to add this dependency as well:
|
||||
|
||||
```sh
|
||||
yarn add -D react
|
||||
```
|
||||
|
||||
Then update your `.storybook/main.js` to make sure you load MDX files:
|
||||
|
||||
```js
|
||||
export default {
|
||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
};
|
||||
```
|
||||
|
||||
Finally, you can create MDX files like this:
|
||||
|
||||
```md
|
||||
import { Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
<Meta title='App Component' component={AppComponent} />
|
||||
|
||||
# App Component
|
||||
|
||||
Some **markdown** description, or whatever you want.
|
||||
|
||||
<Story name='basic' height='400px'>{{
|
||||
component: AppComponent,
|
||||
props: {},
|
||||
}}</Story>
|
||||
|
||||
## ArgsTable
|
||||
|
||||
<ArgsTable of={AppComponent} />
|
||||
```
|
||||
|
||||
Yes, it's redundant to declare `component` twice. [Coming soon](https://github.com/storybookjs/storybook/issues/8673).
|
||||
|
||||
Also, to use the `Props` doc block, you need to set up Compodoc, [as described above](#docspage).
|
||||
|
||||
When you are using `template`, `moduleMetadata` and/or `addDecorators` with `storiesOf` then you can easily translate your story to MDX, too:
|
||||
|
||||
```md
|
||||
import { Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { CheckboxComponent, RadioButtonComponent } from './my-components';
|
||||
import { moduleMetadata } from '@storybook/angular';
|
||||
|
||||
<Meta title='Checkbox' decorators={[
|
||||
moduleMetadata({
|
||||
declarations: [CheckboxComponent]
|
||||
})
|
||||
]} />
|
||||
|
||||
# Basic Checkbox
|
||||
|
||||
<Story name='basic check' height='400px'>{{
|
||||
template: `
|
||||
<div class="some-wrapper-with-padding">
|
||||
<my-checkbox [checked]="checked">Some Checkbox</my-checkbox>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
checked: true
|
||||
}
|
||||
}}</Story>
|
||||
|
||||
# Basic Radiobutton
|
||||
|
||||
<Story name='basic radio' height='400px'>{{
|
||||
moduleMetadata: {
|
||||
declarations: [RadioButtonComponent]
|
||||
}
|
||||
template: `
|
||||
<div class="some-wrapper-with-padding">
|
||||
<my-radio-btn [checked]="checked">Some Checkbox</my-radio-btn>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
checked: true
|
||||
}
|
||||
}}</Story>
|
||||
```
|
||||
|
||||
## IFrame height
|
||||
|
||||
Storybook Docs renders all Angular stories inside IFrames, with a default height of `60px`. You can update this default globally, or modify the IFrame height locally per story in `DocsPage` and `MDX`.
|
||||
|
||||
To update the global default, modify `.storybook/preview.ts`:
|
||||
|
||||
```ts
|
||||
export const parameters = { docs: { story: { iframeHeight: '400px' } } };
|
||||
```
|
||||
|
||||
For `DocsPage`, you need to update the parameter locally in a story:
|
||||
|
||||
```ts
|
||||
export const basic = () => ...
|
||||
basic.parameters = {
|
||||
docs: { story: { iframeHeight: '400px' } },
|
||||
}
|
||||
```
|
||||
|
||||
And for `MDX` you can modify it as an attribute on the `Story` element:
|
||||
|
||||
```md
|
||||
<Story name='basic' height='400px'>{...}</Story>
|
||||
```
|
||||
|
||||
## Inline Stories
|
||||
|
||||
Storybook Docs renders all Angular stories inline by default.
|
||||
|
||||
However, you can render stories in an iframe, with a default height of `100px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.story.inline` parameter.
|
||||
|
||||
To do so for all stories, update `.storybook/preview.js`:
|
||||
|
||||
```js
|
||||
export const parameters = { docs: { story: { inline: false } } };
|
||||
```
|
||||
|
||||
## More resources
|
||||
|
||||
Want to learn more? Here are some more articles on Storybook Docs:
|
||||
|
||||
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
|
||||
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
|
||||
- Example: [Storybook Design System](https://github.com/storybookjs/design-system)
|
||||
1
frontend/node_modules/@storybook/addon-docs/angular/index.d.ts
generated
vendored
Normal file
1
frontend/node_modules/@storybook/addon-docs/angular/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const setCompodocJson: (compodocJson: any) => void;
|
||||
4
frontend/node_modules/@storybook/addon-docs/angular/index.js
generated
vendored
Normal file
4
frontend/node_modules/@storybook/addon-docs/angular/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export const setCompodocJson = (compodocJson) => {
|
||||
// @ts-expect-error (Converted from ts-ignore)
|
||||
globalThis.__STORYBOOK_COMPODOC_JSON__ = compodocJson;
|
||||
};
|
||||
98
frontend/node_modules/@storybook/addon-docs/common/README.md
generated
vendored
Normal file
98
frontend/node_modules/@storybook/addon-docs/common/README.md
generated
vendored
Normal file
@@ -0,0 +1,98 @@
|
||||
<h1>Storybook Docs Common Setup</h1>
|
||||
|
||||
Storybook Docs transforms your Storybook stories into world-class component documentation. Docs supports [all web frameworks that Storybook supports](../README.md#framework-support).
|
||||
|
||||
Popular frameworks like [React](../react/README.md)/[Vue 3](../vue3/README.md)/[Angular](../angular/README.md)/[Ember](../ember/README.md)/[Web components](../web-components/README.md) have their own framework-specific optimizations and setup guides. This README documents the "common" setup for other frameworks that don't have any docs-specific optimizations.
|
||||
|
||||
- [Installation](#installation)
|
||||
- [DocsPage](#docspage)
|
||||
- [MDX](#mdx)
|
||||
- [IFrame height](#iframe-height)
|
||||
- [More resources](#more-resources)
|
||||
|
||||
## Installation
|
||||
|
||||
First add the package. Make sure that the versions for your `@storybook/*` packages match:
|
||||
|
||||
```sh
|
||||
yarn add -D @storybook/addon-docs
|
||||
```
|
||||
|
||||
Then add the following to your `.storybook/main.js` addons:
|
||||
|
||||
```js
|
||||
export default {
|
||||
addons: ['@storybook/addon-docs'],
|
||||
};
|
||||
```
|
||||
|
||||
## DocsPage
|
||||
|
||||
When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI.
|
||||
|
||||
## MDX
|
||||
|
||||
[MDX](../docs/mdx.md) is a convenient way to document your components in Markdown and embed documentation components, such as stories and props tables, inline.
|
||||
|
||||
Docs has peer dependencies on `react`. If you want to write stories in MDX, you may need to add this dependency as well:
|
||||
|
||||
```sh
|
||||
yarn add -D react
|
||||
```
|
||||
|
||||
Then update your `.storybook/main.js` to make sure you load MDX files:
|
||||
|
||||
```js
|
||||
export default {
|
||||
stories: ['../src/stories/**/*.stories.@(js|mdx)'],
|
||||
};
|
||||
```
|
||||
|
||||
Finally, you can create MDX files like this:
|
||||
|
||||
```md
|
||||
import { Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
|
||||
<Meta title='App Component' />
|
||||
|
||||
# App Component
|
||||
|
||||
Some **markdown** description, or whatever you want.
|
||||
|
||||
<Story name='basic' height='400px'>{() => {
|
||||
return { ... }; // should match the typical story format for your framework
|
||||
}}</Story>
|
||||
```
|
||||
|
||||
## IFrame height
|
||||
|
||||
In the "common" setup, Storybook Docs renders stories inside `iframe`s, with a default height of `60px`. You can update this default globally, or modify the `iframe` height locally per story in `DocsPage` and `MDX`.
|
||||
|
||||
To update the global default, modify `.storybook/preview.js`:
|
||||
|
||||
```ts
|
||||
export const parameters = { docs: { story: { iframeHeight: '400px' } } };
|
||||
```
|
||||
|
||||
For `DocsPage`, you need to update the parameter locally in a story:
|
||||
|
||||
```ts
|
||||
export const basic = () => ...
|
||||
basic.parameters = {
|
||||
docs: { story: { iframeHeight: '400px' } }
|
||||
}
|
||||
```
|
||||
|
||||
And for `MDX` you can modify it, especially if you work with some components using fixed or sticky positions, as an attribute on the `Story` element:
|
||||
|
||||
```md
|
||||
<Story name='basic' height='400px'>{...}</Story>
|
||||
```
|
||||
|
||||
## More resources
|
||||
|
||||
Want to learn more? Here are some more articles on Storybook Docs:
|
||||
|
||||
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
|
||||
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
|
||||
- Example: [Storybook Design System](https://github.com/storybookjs/design-system)
|
||||
10
frontend/node_modules/@storybook/addon-docs/dist/Color-AVL7NMMY.mjs
generated
vendored
Normal file
10
frontend/node_modules/@storybook/addon-docs/dist/Color-AVL7NMMY.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
frontend/node_modules/@storybook/addon-docs/dist/DocsRenderer-3PZUHFFL.mjs
generated
vendored
Normal file
2
frontend/node_modules/@storybook/addon-docs/dist/DocsRenderer-3PZUHFFL.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export { DocsRenderer, defaultComponents } from './chunk-GWJYCGSQ.mjs';
|
||||
import './chunk-QUZPS4B6.mjs';
|
||||
7
frontend/node_modules/@storybook/addon-docs/dist/DocsRenderer-PQXLIZUC.mjs
generated
vendored
Normal file
7
frontend/node_modules/@storybook/addon-docs/dist/DocsRenderer-PQXLIZUC.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import { renderElement, unmountElement } from '@storybook/react-dom-shim';
|
||||
import { CodeOrSourceMdx, AnchorMdx, HeadersMdx, Docs } from '@storybook/addon-docs/blocks';
|
||||
|
||||
var defaultComponents={code:CodeOrSourceMdx,a:AnchorMdx,...HeadersMdx},ErrorBoundary=class extends Component{constructor(){super(...arguments);this.state={hasError:!1};}static getDerivedStateFromError(){return {hasError:!0}}componentDidCatch(err){let{showException}=this.props;showException(err);}render(){let{hasError}=this.state,{children}=this.props;return hasError?null:React.createElement(React.Fragment,null,children)}},DocsRenderer=class{constructor(){this.render=async(context,docsParameter,element)=>{let components={...defaultComponents,...docsParameter?.components},TDocs=Docs;return new Promise((resolve,reject)=>{import('@mdx-js/react').then(({MDXProvider})=>renderElement(React.createElement(ErrorBoundary,{showException:reject,key:Math.random()},React.createElement(MDXProvider,{components},React.createElement(TDocs,{context,docsParameter}))),element)).then(()=>resolve());})},this.unmount=element=>{unmountElement(element);};}};
|
||||
|
||||
export { DocsRenderer, defaultComponents };
|
||||
1072
frontend/node_modules/@storybook/addon-docs/dist/blocks.d.ts
generated
vendored
Normal file
1072
frontend/node_modules/@storybook/addon-docs/dist/blocks.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
295
frontend/node_modules/@storybook/addon-docs/dist/blocks.js
generated
vendored
Normal file
295
frontend/node_modules/@storybook/addon-docs/dist/blocks.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
212
frontend/node_modules/@storybook/addon-docs/dist/blocks.mjs
generated
vendored
Normal file
212
frontend/node_modules/@storybook/addon-docs/dist/blocks.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
frontend/node_modules/@storybook/addon-docs/dist/chunk-GWJYCGSQ.mjs
generated
vendored
Normal file
7
frontend/node_modules/@storybook/addon-docs/dist/chunk-GWJYCGSQ.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import React, { Component } from 'react';
|
||||
import { renderElement, unmountElement } from '@storybook/react-dom-shim';
|
||||
import { CodeOrSourceMdx, AnchorMdx, HeadersMdx, Docs } from '@storybook/addon-docs/blocks';
|
||||
|
||||
var defaultComponents={code:CodeOrSourceMdx,a:AnchorMdx,...HeadersMdx},ErrorBoundary=class extends Component{constructor(){super(...arguments);this.state={hasError:!1};}static getDerivedStateFromError(){return {hasError:!0}}componentDidCatch(err){let{showException}=this.props;showException(err);}render(){let{hasError}=this.state,{children}=this.props;return hasError?null:React.createElement(React.Fragment,null,children)}},DocsRenderer=class{constructor(){this.render=async(context,docsParameter,element)=>{let components={...defaultComponents,...docsParameter?.components},TDocs=Docs;return new Promise((resolve,reject)=>{import('@mdx-js/react').then(({MDXProvider})=>renderElement(React.createElement(ErrorBoundary,{showException:reject,key:Math.random()},React.createElement(MDXProvider,{components},React.createElement(TDocs,{context,docsParameter}))),element)).then(()=>resolve());})},this.unmount=element=>{unmountElement(element);};}};
|
||||
|
||||
export { DocsRenderer, defaultComponents };
|
||||
3
frontend/node_modules/@storybook/addon-docs/dist/chunk-QUZPS4B6.mjs
generated
vendored
Normal file
3
frontend/node_modules/@storybook/addon-docs/dist/chunk-QUZPS4B6.mjs
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __require=(x=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(x,{get:(a,b)=>(typeof require<"u"?require:a)[b]}):x)(function(x){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});var __commonJS=(cb,mod)=>function(){return mod||(0, cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0});},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod));
|
||||
|
||||
export { __commonJS, __export, __require, __toESM };
|
||||
3
frontend/node_modules/@storybook/addon-docs/dist/chunk-SPFYY5GD.mjs
generated
vendored
Normal file
3
frontend/node_modules/@storybook/addon-docs/dist/chunk-SPFYY5GD.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
197
frontend/node_modules/@storybook/addon-docs/dist/index.d.ts
generated
vendored
Normal file
197
frontend/node_modules/@storybook/addon-docs/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,197 @@
|
||||
import * as core_dist_types from 'storybook/internal/types';
|
||||
import { Renderer, DocsRenderFunction, ModuleExports, ModuleExport } from 'storybook/internal/types';
|
||||
|
||||
declare class DocsRenderer<TRenderer extends Renderer> {
|
||||
render: DocsRenderFunction<TRenderer>;
|
||||
unmount: (element: HTMLElement) => void;
|
||||
constructor();
|
||||
}
|
||||
|
||||
type StoryBlockParameters = {
|
||||
/** Whether a story's play function runs when shown in docs page */
|
||||
autoplay?: boolean;
|
||||
/**
|
||||
* Set a minimum height (note for an iframe this is the actual height) when rendering a story in
|
||||
* an iframe or inline. This overrides `parameters.docs.story.iframeHeight` for iframes.
|
||||
*/
|
||||
height?: string;
|
||||
/** IFrame configuration */
|
||||
iframeHeight?: string;
|
||||
/**
|
||||
* Whether the story is rendered inline (in the same browser frame as the other docs content) or
|
||||
* in an iframe
|
||||
*/
|
||||
inline?: boolean;
|
||||
/** Specifies the CSF file to which the story is associated */
|
||||
meta: ModuleExports;
|
||||
/**
|
||||
* Specifies which story is rendered by the Story block. If no `of` is defined and the MDX file is
|
||||
* attached, the primary (first) story will be rendered.
|
||||
*/
|
||||
of: ModuleExport;
|
||||
};
|
||||
type ControlsBlockParameters = {
|
||||
/** Exclude specific properties from the Controls panel */
|
||||
exclude?: string[] | RegExp;
|
||||
/** Exclude only specific properties in the Controls panel */
|
||||
include?: string[] | RegExp;
|
||||
/** Controls sorting order */
|
||||
sort?: 'none' | 'alpha' | 'requiredFirst';
|
||||
};
|
||||
type ArgTypesBlockParameters = {
|
||||
/** Exclude specific arg types from the args table */
|
||||
exclude?: string[] | RegExp;
|
||||
/** Exclude only specific arg types from the args table */
|
||||
include?: string[] | RegExp;
|
||||
/**
|
||||
* Specifies which story to get the arg types from. If a CSF file exports is provided, it will use
|
||||
* the primary (first) story in the file.
|
||||
*/
|
||||
of: ModuleExport | ModuleExports;
|
||||
/**
|
||||
* Controls arg types order
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-argtypes#sort
|
||||
*/
|
||||
sort?: 'none' | 'alpha' | 'requiredFirst';
|
||||
};
|
||||
type CanvasBlockParameters = {
|
||||
/**
|
||||
* Provides any additional custom actions to show in the bottom right corner. These are simple
|
||||
* buttons that do anything you specify in the onClick function.
|
||||
*/
|
||||
additionalActions?: {
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
onClick: () => void;
|
||||
title: string | React.JSX.Element;
|
||||
}[];
|
||||
/** Provide HTML class(es) to the preview element, for custom styling. */
|
||||
className?: string;
|
||||
/**
|
||||
* Specify how the canvas should layout the story.
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-canvas#layout
|
||||
*/
|
||||
layout?: 'centered' | 'fullscreen' | 'padded';
|
||||
/** Specifies which story is rendered */
|
||||
of: ModuleExport;
|
||||
/** Show story source code */
|
||||
sourceState?: 'hidden' | 'shown';
|
||||
/**
|
||||
* Story configuration
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-canvas#story
|
||||
*/
|
||||
story?: StoryBlockParameters;
|
||||
/** Disable story source code */
|
||||
withSource?: 'open' | 'closed' | 'none';
|
||||
/** Whether to render a toolbar containing tools to interact with the story. */
|
||||
withToolbar?: 'open' | 'closed' | 'none';
|
||||
};
|
||||
type DescriptionBlockParameters = {
|
||||
/** Component description */
|
||||
component?: string;
|
||||
/** Story description */
|
||||
story?: string;
|
||||
};
|
||||
type SourceBlockParameters = {
|
||||
/** The source code to be rendered. Will be inferred if not passed */
|
||||
code?: string;
|
||||
/** Whether to render the code in dark mode */
|
||||
dark?: boolean;
|
||||
/** Determines if decorators are rendered in the source code snippet. */
|
||||
excludeDecorators?: boolean;
|
||||
/**
|
||||
* The formatting used on source code. Both true and 'dedent' have the same effect of removing any
|
||||
* extraneous indentation. Supports all valid prettier parser names.
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-source#format
|
||||
*/
|
||||
format?: boolean | 'dedent' | string;
|
||||
/** Source code language */
|
||||
language?: 'bash' | 'css' | 'graphql' | 'html' | 'json' | 'jsextra' | 'jsx' | 'md' | 'text' | 'tsx' | 'typescript' | 'yml';
|
||||
/**
|
||||
* Specifies which story is rendered by the Source block. If no of is defined and the MDX file is
|
||||
* attached, the primary (first) story will be rendered.
|
||||
*/
|
||||
of: ModuleExport;
|
||||
/** Source code transformations */
|
||||
transform?: (code: string, storyContext: any) => string;
|
||||
/**
|
||||
* Specifies how the source code is rendered.
|
||||
*
|
||||
* @default 'auto'
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-source#type
|
||||
*/
|
||||
type?: 'auto' | 'code' | 'dynamic';
|
||||
};
|
||||
interface DocsParameters {
|
||||
/**
|
||||
* Docs configuration
|
||||
*
|
||||
* @see https://storybook.js.org/docs/writing-docs
|
||||
*/
|
||||
docs?: {
|
||||
/**
|
||||
* The subtitle displayed when shown in docs page
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-argtypes
|
||||
*/
|
||||
argTypes?: ArgTypesBlockParameters;
|
||||
/**
|
||||
* Canvas configuration when shown in docs page
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-canvas
|
||||
*/
|
||||
canvas?: CanvasBlockParameters;
|
||||
/**
|
||||
* Controls block configuration
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-controls
|
||||
*/
|
||||
controls?: ControlsBlockParameters;
|
||||
/**
|
||||
* Component/story description when shown in docs page
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-description#writing-descriptions
|
||||
*/
|
||||
description?: DescriptionBlockParameters;
|
||||
/** Remove the addon panel and disable the addon's behavior */
|
||||
disable?: boolean;
|
||||
/**
|
||||
* Replace the default documentation template used by Storybook with your own
|
||||
*
|
||||
* @see https://storybook.js.org/docs/writing-docs/autodocs#write-a-custom-template
|
||||
*/
|
||||
page?: unknown;
|
||||
/**
|
||||
* Source code configuration when shown in docs page
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-source
|
||||
*/
|
||||
source?: SourceBlockParameters;
|
||||
/**
|
||||
* Story configuration
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-story
|
||||
*/
|
||||
story?: StoryBlockParameters;
|
||||
/**
|
||||
* The subtitle displayed when shown in docs page
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-subtitle
|
||||
*/
|
||||
subtitle?: string;
|
||||
/**
|
||||
* The title displayed when shown in docs page
|
||||
*
|
||||
* @see https://storybook.js.org/docs/api/doc-blocks/doc-block-title
|
||||
*/
|
||||
title?: string;
|
||||
};
|
||||
}
|
||||
|
||||
declare const _default: () => core_dist_types.ProjectAnnotations<core_dist_types.Renderer>;
|
||||
|
||||
export { DocsParameters, DocsRenderer, _default as default };
|
||||
16
frontend/node_modules/@storybook/addon-docs/dist/index.js
generated
vendored
Normal file
16
frontend/node_modules/@storybook/addon-docs/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var React = require('react');
|
||||
var reactDomShim = require('@storybook/react-dom-shim');
|
||||
var blocks = require('@storybook/addon-docs/blocks');
|
||||
var previewApi = require('storybook/preview-api');
|
||||
|
||||
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
||||
|
||||
var React__default = /*#__PURE__*/_interopDefault(React);
|
||||
|
||||
var __defProp=Object.defineProperty;var __getOwnPropNames=Object.getOwnPropertyNames;var __esm=(fn,res)=>function(){return fn&&(res=(0, fn[__getOwnPropNames(fn)[0]])(fn=0)),res};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0});};var DocsRenderer_exports={};__export(DocsRenderer_exports,{DocsRenderer:()=>exports.DocsRenderer,defaultComponents:()=>defaultComponents});var defaultComponents,ErrorBoundary;exports.DocsRenderer = void 0;var init_DocsRenderer=__esm({"src/DocsRenderer.tsx"(){defaultComponents={code:blocks.CodeOrSourceMdx,a:blocks.AnchorMdx,...blocks.HeadersMdx},ErrorBoundary=class extends React.Component{constructor(){super(...arguments);this.state={hasError:!1};}static getDerivedStateFromError(){return {hasError:!0}}componentDidCatch(err){let{showException}=this.props;showException(err);}render(){let{hasError}=this.state,{children}=this.props;return hasError?null:React__default.default.createElement(React__default.default.Fragment,null,children)}},exports.DocsRenderer=class{constructor(){this.render=async(context,docsParameter,element)=>{let components={...defaultComponents,...docsParameter?.components},TDocs=blocks.Docs;return new Promise((resolve,reject)=>{import('@mdx-js/react').then(({MDXProvider})=>reactDomShim.renderElement(React__default.default.createElement(ErrorBoundary,{showException:reject,key:Math.random()},React__default.default.createElement(MDXProvider,{components},React__default.default.createElement(TDocs,{context,docsParameter}))),element)).then(()=>resolve());})},this.unmount=element=>{reactDomShim.unmountElement(element);};}};}});var preview_exports={};__export(preview_exports,{parameters:()=>parameters});var excludeTags=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce((acc,entry)=>{let[tag,option]=entry;return option.excludeFromDocsStories&&(acc[tag]=!0),acc},{}),parameters={docs:{renderer:async()=>{let{DocsRenderer:DocsRenderer2}=await Promise.resolve().then(()=>(init_DocsRenderer(),DocsRenderer_exports));return new DocsRenderer2},stories:{filter:story=>(story.tags||[]).filter(tag=>excludeTags[tag]).length===0&&!story.parameters.docs?.disable}}};init_DocsRenderer();var index_default=()=>previewApi.definePreview(preview_exports);
|
||||
|
||||
exports.default = index_default;
|
||||
7
frontend/node_modules/@storybook/addon-docs/dist/index.mjs
generated
vendored
Normal file
7
frontend/node_modules/@storybook/addon-docs/dist/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export { DocsRenderer } from './chunk-GWJYCGSQ.mjs';
|
||||
import { __export } from './chunk-QUZPS4B6.mjs';
|
||||
import { definePreview } from 'storybook/preview-api';
|
||||
|
||||
var preview_exports={};__export(preview_exports,{parameters:()=>parameters});var excludeTags=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce((acc,entry)=>{let[tag,option]=entry;return option.excludeFromDocsStories&&(acc[tag]=!0),acc},{}),parameters={docs:{renderer:async()=>{let{DocsRenderer:DocsRenderer2}=await import('./DocsRenderer-3PZUHFFL.mjs');return new DocsRenderer2},stories:{filter:story=>(story.tags||[]).filter(tag=>excludeTags[tag]).length===0&&!story.parameters.docs?.disable}}};var index_default=()=>definePreview(preview_exports);
|
||||
|
||||
export { index_default as default };
|
||||
154
frontend/node_modules/@storybook/addon-docs/dist/manager.js
generated
vendored
Normal file
154
frontend/node_modules/@storybook/addon-docs/dist/manager.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
75
frontend/node_modules/@storybook/addon-docs/dist/mdx-loader.js
generated
vendored
Normal file
75
frontend/node_modules/@storybook/addon-docs/dist/mdx-loader.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
78
frontend/node_modules/@storybook/addon-docs/dist/preset.js
generated
vendored
Normal file
78
frontend/node_modules/@storybook/addon-docs/dist/preset.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
frontend/node_modules/@storybook/addon-docs/dist/preview.d.ts
generated
vendored
Normal file
3
frontend/node_modules/@storybook/addon-docs/dist/preview.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare const parameters: any;
|
||||
|
||||
export { parameters };
|
||||
13
frontend/node_modules/@storybook/addon-docs/dist/preview.js
generated
vendored
Normal file
13
frontend/node_modules/@storybook/addon-docs/dist/preview.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var reactDomShim = require('@storybook/react-dom-shim');
|
||||
var blocks = require('@storybook/addon-docs/blocks');
|
||||
|
||||
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
||||
|
||||
var React__default = /*#__PURE__*/_interopDefault(React);
|
||||
|
||||
var __defProp=Object.defineProperty;var __getOwnPropNames=Object.getOwnPropertyNames;var __esm=(fn,res)=>function(){return fn&&(res=(0, fn[__getOwnPropNames(fn)[0]])(fn=0)),res};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0});};var DocsRenderer_exports={};__export(DocsRenderer_exports,{DocsRenderer:()=>DocsRenderer,defaultComponents:()=>defaultComponents});var defaultComponents,ErrorBoundary,DocsRenderer,init_DocsRenderer=__esm({"src/DocsRenderer.tsx"(){defaultComponents={code:blocks.CodeOrSourceMdx,a:blocks.AnchorMdx,...blocks.HeadersMdx},ErrorBoundary=class extends React.Component{constructor(){super(...arguments);this.state={hasError:!1};}static getDerivedStateFromError(){return {hasError:!0}}componentDidCatch(err){let{showException}=this.props;showException(err);}render(){let{hasError}=this.state,{children}=this.props;return hasError?null:React__default.default.createElement(React__default.default.Fragment,null,children)}},DocsRenderer=class{constructor(){this.render=async(context,docsParameter,element)=>{let components={...defaultComponents,...docsParameter?.components},TDocs=blocks.Docs;return new Promise((resolve,reject)=>{import('@mdx-js/react').then(({MDXProvider})=>reactDomShim.renderElement(React__default.default.createElement(ErrorBoundary,{showException:reject,key:Math.random()},React__default.default.createElement(MDXProvider,{components},React__default.default.createElement(TDocs,{context,docsParameter}))),element)).then(()=>resolve());})},this.unmount=element=>{reactDomShim.unmountElement(element);};}};}});var excludeTags=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce((acc,entry)=>{let[tag,option]=entry;return option.excludeFromDocsStories&&(acc[tag]=!0),acc},{}),parameters={docs:{renderer:async()=>{let{DocsRenderer:DocsRenderer2}=await Promise.resolve().then(()=>(init_DocsRenderer(),DocsRenderer_exports));return new DocsRenderer2},stories:{filter:story=>(story.tags||[]).filter(tag=>excludeTags[tag]).length===0&&!story.parameters.docs?.disable}}};
|
||||
|
||||
exports.parameters = parameters;
|
||||
3
frontend/node_modules/@storybook/addon-docs/dist/preview.mjs
generated
vendored
Normal file
3
frontend/node_modules/@storybook/addon-docs/dist/preview.mjs
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
var excludeTags=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce((acc,entry)=>{let[tag,option]=entry;return option.excludeFromDocsStories&&(acc[tag]=!0),acc},{}),parameters={docs:{renderer:async()=>{let{DocsRenderer}=await import('./DocsRenderer-PQXLIZUC.mjs');return new DocsRenderer},stories:{filter:story=>(story.tags||[]).filter(tag=>excludeTags[tag]).length===0&&!story.parameters.docs?.disable}}};
|
||||
|
||||
export { parameters };
|
||||
1
frontend/node_modules/@storybook/addon-docs/dist/shims/mdx-react-shim.d.ts
generated
vendored
Normal file
1
frontend/node_modules/@storybook/addon-docs/dist/shims/mdx-react-shim.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@mdx-js/react';
|
||||
12
frontend/node_modules/@storybook/addon-docs/dist/shims/mdx-react-shim.js
generated
vendored
Normal file
12
frontend/node_modules/@storybook/addon-docs/dist/shims/mdx-react-shim.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
var react = require('@mdx-js/react');
|
||||
|
||||
|
||||
|
||||
Object.keys(react).forEach(function (k) {
|
||||
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
||||
enumerable: true,
|
||||
get: function () { return react[k]; }
|
||||
});
|
||||
});
|
||||
1
frontend/node_modules/@storybook/addon-docs/dist/shims/mdx-react-shim.mjs
generated
vendored
Normal file
1
frontend/node_modules/@storybook/addon-docs/dist/shims/mdx-react-shim.mjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '@mdx-js/react';
|
||||
153
frontend/node_modules/@storybook/addon-docs/ember/README.md
generated
vendored
Normal file
153
frontend/node_modules/@storybook/addon-docs/ember/README.md
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
<h1>Storybook Docs for Ember</h1>
|
||||
|
||||
> migration guide: This page documents the method to configure storybook introduced recently in 5.3.0, consult the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) if you want to migrate to this format of configuring storybook.
|
||||
|
||||
Storybook Docs transforms your Storybook stories into world-class component documentation. Storybook Docs for Ember supports [DocsPage](../docs/docspage.md) for auto-generated docs, and [MDX](../docs/mdx.md) for rich long-form docs.
|
||||
|
||||
To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Ember specifics, read on!
|
||||
|
||||
- [Installation](#installation)
|
||||
- [DocsPage](#docspage)
|
||||
- [Props tables](#props-tables)
|
||||
- [MDX](#mdx)
|
||||
- [IFrame height](#iframe-height)
|
||||
- [More resources](#more-resources)
|
||||
|
||||
## Installation
|
||||
|
||||
First add the package. Make sure that the versions for your `@storybook/*` packages match:
|
||||
|
||||
```sh
|
||||
yarn add -D @storybook/addon-docs
|
||||
```
|
||||
|
||||
Then add the following to your `.storybook/main.js` addons:
|
||||
|
||||
```js
|
||||
export default {
|
||||
addons: ['@storybook/addon-docs'],
|
||||
};
|
||||
```
|
||||
|
||||
## DocsPage
|
||||
|
||||
When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI.
|
||||
|
||||
## Props tables
|
||||
|
||||
Getting [Props tables](../docs/props-tables.md) for your components requires a few more steps. Docs for Ember relies on [@storybook/ember-cli-storybook addon](https://github.com/storybookjs/ember-cli-storybook), to extract documentation comments from your component source files. If you're using Storybook with Ember, you should already have this addon installed, you will just need to enable it by adding the following config block in your `ember-cli-build.js` file:
|
||||
|
||||
```js
|
||||
let app = new EmberApp(defaults, {
|
||||
'ember-cli-storybook': {
|
||||
enableAddonDocsIntegration: true,
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
Now, running the ember-cli server will generate a JSON documentation file at `/storybook-docgen/index.json`. Since generation of this file is tied into the ember-cli build, it will get regenerated everytime component files are saved. For details on documenting your components, check out the examples in the addon that powers the generation [ember-cli-addon-docs-yuidoc](https://github.com/ember-learn/ember-cli-addon-docs-yuidoc#documenting-components).
|
||||
|
||||
Next, add the following to your `.storybook/preview.js` to load the generated json file:
|
||||
|
||||
```js
|
||||
import { setJSONDoc } from '@storybook/addon-docs/ember';
|
||||
import docJson from '../dist/storybook-docgen/index.json';
|
||||
|
||||
setJSONDoc(docJson);
|
||||
```
|
||||
|
||||
Finally, be sure to fill in the `component` field in your story metadata. This should be a string that matches the name of the `@class` used in your source comments:
|
||||
|
||||
```ts
|
||||
export default {
|
||||
title: 'App Component',
|
||||
component: 'AppComponent',
|
||||
};
|
||||
```
|
||||
|
||||
If you haven't upgraded from `storiesOf`, you can use a parameter to do the same thing:
|
||||
|
||||
```ts
|
||||
import { storiesOf } from '@storybook/angular';
|
||||
|
||||
storiesOf('App Component', module)
|
||||
.addParameters({ component: 'AppComponent' })
|
||||
.add( ... );
|
||||
```
|
||||
|
||||
## MDX
|
||||
|
||||
[MDX](../docs/mdx.md) is a convenient way to document your components in Markdown and embed documentation components, such as stories and props tables, inline.
|
||||
|
||||
Docs has peer dependencies on `react`. If you want to write stories in MDX, you may need to add this dependency as well:
|
||||
|
||||
```sh
|
||||
yarn add -D react
|
||||
```
|
||||
|
||||
Then update your `.storybook/main.js` to make sure you load MDX files:
|
||||
|
||||
```js
|
||||
export default {
|
||||
stories: ['../src/stories/**/*.stories.@(js|mdx)'],
|
||||
};
|
||||
```
|
||||
|
||||
Finally, you can create MDX files like this:
|
||||
|
||||
```md
|
||||
import { Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
<Meta title='App Component' component='AppComponent' />
|
||||
|
||||
# App Component
|
||||
|
||||
Some **markdown** description, or whatever you want.
|
||||
|
||||
<Story name='basic' height='400px'>{{
|
||||
template: hbs`<AppComponent @title={{title}} />`,
|
||||
context: { title: "Title" },
|
||||
}}</Story>
|
||||
|
||||
## ArgsTable
|
||||
|
||||
<ArgsTable of='AppComponent' />
|
||||
```
|
||||
|
||||
Yes, it's redundant to declare `component` twice. [Coming soon](https://github.com/storybookjs/storybook/issues/8673).
|
||||
|
||||
Also, to use the `Props` doc block, you need to set up documentation generation, [as described above](#docspage).
|
||||
|
||||
## IFrame height
|
||||
|
||||
Storybook Docs renders all Ember stories inside `iframe`s, with a default height of `60px`. You can update this default globally, or modify the `iframe` height locally per story in `DocsPage` and `MDX`.
|
||||
|
||||
To update the global default, modify `.storybook/preview.js`:
|
||||
|
||||
```ts
|
||||
export const parameters = { docs: { story: { iframeHeight: '400px' } } };
|
||||
```
|
||||
|
||||
For `DocsPage`, you need to update the parameter locally in a story:
|
||||
|
||||
```ts
|
||||
export const basic = () => ...
|
||||
basic.parameters = {
|
||||
docs: { story: { iframeHeight: '400px' } }
|
||||
}
|
||||
```
|
||||
|
||||
And for `MDX` you can modify it as an attribute on the `Story` element:
|
||||
|
||||
```md
|
||||
<Story name='basic' height='400px'>{...}</Story>
|
||||
```
|
||||
|
||||
## More resources
|
||||
|
||||
Want to learn more? Here are some more articles on Storybook Docs:
|
||||
|
||||
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
|
||||
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
|
||||
- Example: [Storybook Design System](https://github.com/storybookjs/design-system)
|
||||
1
frontend/node_modules/@storybook/addon-docs/ember/index.d.ts
generated
vendored
Normal file
1
frontend/node_modules/@storybook/addon-docs/ember/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const setJSONDoc: (jsonDoc: any) => void;
|
||||
3
frontend/node_modules/@storybook/addon-docs/ember/index.js
generated
vendored
Normal file
3
frontend/node_modules/@storybook/addon-docs/ember/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export const setJSONDoc = (jsondoc) => {
|
||||
globalThis.__EMBER_GENERATED_DOC_JSON__ = jsondoc;
|
||||
};
|
||||
1
frontend/node_modules/@storybook/addon-docs/manager.js
generated
vendored
Normal file
1
frontend/node_modules/@storybook/addon-docs/manager.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './dist/manager';
|
||||
173
frontend/node_modules/@storybook/addon-docs/package.json
generated
vendored
Normal file
173
frontend/node_modules/@storybook/addon-docs/package.json
generated
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
{
|
||||
"name": "@storybook/addon-docs",
|
||||
"version": "9.0.16",
|
||||
"description": "Document component usage and properties in Markdown",
|
||||
"keywords": [
|
||||
"addon",
|
||||
"notes",
|
||||
"documentation",
|
||||
"storybook",
|
||||
"essentials",
|
||||
"organize"
|
||||
],
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/addons/docs",
|
||||
"bugs": {
|
||||
"url": "https://github.com/storybookjs/storybook/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/storybookjs/storybook.git",
|
||||
"directory": "code/addons/docs"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/storybook"
|
||||
},
|
||||
"license": "MIT",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
"./preview": {
|
||||
"types": "./dist/preview.d.ts",
|
||||
"import": "./dist/preview.mjs",
|
||||
"require": "./dist/preview.js"
|
||||
},
|
||||
"./preset": "./dist/preset.js",
|
||||
"./blocks": {
|
||||
"types": "./dist/blocks.d.ts",
|
||||
"import": "./dist/blocks.mjs",
|
||||
"require": "./dist/blocks.js"
|
||||
},
|
||||
"./dist/preview": {
|
||||
"types": "./dist/preview.d.ts",
|
||||
"import": "./dist/preview.mjs",
|
||||
"require": "./dist/preview.js"
|
||||
},
|
||||
"./dist/preset": "./dist/preset.js",
|
||||
"./dist/shims/mdx-react-shim": {
|
||||
"types": "./dist/shims/mdx-react-shim.d.ts",
|
||||
"import": "./dist/shims/mdx-react-shim.mjs",
|
||||
"require": "./dist/shims/mdx-react-shim.js"
|
||||
},
|
||||
"./mdx-react-shim": {
|
||||
"types": "./dist/shims/mdx-react-shim.d.ts",
|
||||
"import": "./dist/shims/mdx-react-shim.mjs",
|
||||
"require": "./dist/shims/mdx-react-shim.js"
|
||||
},
|
||||
"./mdx-loader": "./dist/mdx-loader.js",
|
||||
"./svelte/HOC.svelte": "./svelte/HOC.svelte",
|
||||
"./ember": "./ember/index.js",
|
||||
"./ember/index.js": "./ember/index.js",
|
||||
"./angular": "./angular/index.js",
|
||||
"./angular/index.js": "./angular/index.js",
|
||||
"./web-components/index.js": "./web-components/index.js",
|
||||
"./package.json": "./package.json",
|
||||
"./manager": "./dist/manager.js"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"types": "dist/index.d.ts",
|
||||
"typesVersions": {
|
||||
"*": {
|
||||
"*": [
|
||||
"dist/index.d.ts"
|
||||
],
|
||||
"angular": [
|
||||
"angular/index.d.ts"
|
||||
],
|
||||
"blocks": [
|
||||
"dist/blocks.d.ts"
|
||||
],
|
||||
"ember": [
|
||||
"ember/index.d.ts"
|
||||
],
|
||||
"preview": [
|
||||
"dist/preview.d.ts"
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist/**/*",
|
||||
"angular/**/*",
|
||||
"common/**/*",
|
||||
"ember/**/*",
|
||||
"html/**/*",
|
||||
"svelte/**/*",
|
||||
"react/**/*",
|
||||
"vue/**/*",
|
||||
"web-components/**/*",
|
||||
"lit/**/*",
|
||||
"README.md",
|
||||
"*.js",
|
||||
"*.d.ts",
|
||||
"!src/**/*"
|
||||
],
|
||||
"scripts": {
|
||||
"check": "jiti ../../../scripts/prepare/check.ts",
|
||||
"prep": "jiti ../../../scripts/prepare/addon-bundle.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"@storybook/csf-plugin": "9.0.16",
|
||||
"@storybook/icons": "^1.2.12",
|
||||
"@storybook/react-dom-shim": "9.0.16",
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"ts-dedent": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mdx-js/mdx": "^3.0.0",
|
||||
"@rollup/pluginutils": "^5.0.2",
|
||||
"@types/color-convert": "^2.0.0",
|
||||
"@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"color-convert": "^2.0.1",
|
||||
"es-toolkit": "^1.36.0",
|
||||
"github-slugger": "^2.0.0",
|
||||
"markdown-to-jsx": "^7.7.2",
|
||||
"memoizerific": "^1.11.3",
|
||||
"polished": "^4.2.2",
|
||||
"react": "^18.2.0",
|
||||
"react-colorful": "^5.1.2",
|
||||
"react-dom": "^18.2.0",
|
||||
"rehype-external-links": "^3.0.0",
|
||||
"rehype-slug": "^6.0.0",
|
||||
"telejson": "8.0.0",
|
||||
"tocbot": "^4.20.1",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.2.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"storybook": "^9.0.16"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"bundler": {
|
||||
"previewEntries": [
|
||||
"./src/preview.ts"
|
||||
],
|
||||
"exportEntries": [
|
||||
"./src/index.ts",
|
||||
"./src/blocks.ts",
|
||||
"./src/shims/mdx-react-shim.ts"
|
||||
],
|
||||
"nodeEntries": [
|
||||
"./src/mdx-loader.ts",
|
||||
"./src/preset.ts"
|
||||
],
|
||||
"managerEntries": [
|
||||
"./src/manager.tsx"
|
||||
]
|
||||
},
|
||||
"gitHead": "e6a7fd8a655c69780bc20b9749c2699e44beae16",
|
||||
"storybook": {
|
||||
"displayName": "Docs",
|
||||
"icon": "https://user-images.githubusercontent.com/263385/101991672-48355c80-3c7c-11eb-82d9-95fa12438f64.png",
|
||||
"unsupportedFrameworks": [
|
||||
"react-native"
|
||||
]
|
||||
}
|
||||
}
|
||||
1
frontend/node_modules/@storybook/addon-docs/preset.js
generated
vendored
Normal file
1
frontend/node_modules/@storybook/addon-docs/preset.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('./dist/preset');
|
||||
1
frontend/node_modules/@storybook/addon-docs/preview.js
generated
vendored
Normal file
1
frontend/node_modules/@storybook/addon-docs/preview.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './dist/preview';
|
||||
149
frontend/node_modules/@storybook/addon-docs/react/README.md
generated
vendored
Normal file
149
frontend/node_modules/@storybook/addon-docs/react/README.md
generated
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
<center>
|
||||
<img src="../docs/media/docspage-hero.png" width="100%" />
|
||||
</center>
|
||||
|
||||
<h1>Storybook Docs for React</h1>
|
||||
|
||||
> migration guide: This page documents the method to configure storybook introduced recently in 5.3.0, consult the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) if you want to migrate to this format of configuring storybook.
|
||||
|
||||
Storybook Docs transforms your Storybook stories into world-class component documentation. Storybook Docs for React supports [DocsPage](../docs/docspage.md) for auto-generated docs, and [MDX](../docs/mdx.md) for rich long-form docs.
|
||||
|
||||
To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the React specifics, read on!
|
||||
|
||||
- [Installation](#installation)
|
||||
- [DocsPage](#docspage)
|
||||
- [Props tables](#props-tables)
|
||||
- [MDX](#mdx)
|
||||
- [Inline stories](#inline-stories)
|
||||
- [TypeScript props with `react-docgen-typescript`](#typescript-props-with-react-docgen-typescript)
|
||||
- [More resources](#more-resources)
|
||||
|
||||
## Installation
|
||||
|
||||
First add the package. Make sure that the versions for your `@storybook/*` packages match:
|
||||
|
||||
```sh
|
||||
yarn add -D @storybook/addon-docs
|
||||
```
|
||||
|
||||
Then add the following to your `.storybook/main.js` list of `addons`:
|
||||
|
||||
```js
|
||||
export default {
|
||||
// other settings
|
||||
addons: ['@storybook/addon-docs'];
|
||||
}
|
||||
```
|
||||
|
||||
## DocsPage
|
||||
|
||||
When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI.
|
||||
|
||||
## Props tables
|
||||
|
||||
Storybook Docs automatically generates [Props tables](../docs/props-tables.md) for your components based on either `PropTypes` or `TypeScript` types. To show the props table for your component, be sure to fill in the `component` field in your story metadata:
|
||||
|
||||
```ts
|
||||
import { Button } from './Button';
|
||||
|
||||
export default {
|
||||
title: 'Button',
|
||||
component: Button,
|
||||
};
|
||||
```
|
||||
|
||||
If you haven't upgraded from `storiesOf`, you can use a parameter to do the same thing:
|
||||
|
||||
```ts
|
||||
import { storiesOf } from '@storybook/react';
|
||||
import { Button } from './Button';
|
||||
|
||||
storiesOf('InfoButton', module)
|
||||
.addParameters({ component: Button })
|
||||
.add( ... );
|
||||
```
|
||||
|
||||
## MDX
|
||||
|
||||
[MDX](../docs/mdx.md) is a convenient way to document your components in Markdown and embed documentation components, such as stories and props tables, inline.
|
||||
|
||||
Then update your `.storybook/main.js` to make sure you load MDX files:
|
||||
|
||||
```js
|
||||
export default {
|
||||
stories: ['../src/stories/**/*.stories.@(js|mdx)'],
|
||||
};
|
||||
```
|
||||
|
||||
Finally, you can create MDX files like this:
|
||||
|
||||
```md
|
||||
import { Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { Button } from './Button';
|
||||
|
||||
<Meta title='Button' component={Button} />
|
||||
|
||||
# Button
|
||||
|
||||
Some **markdown** description, or whatever you want.
|
||||
|
||||
<Story name='basic' height='400px'>
|
||||
<Button>Label</Button>
|
||||
</Story>
|
||||
|
||||
## ArgsTable
|
||||
|
||||
<ArgsTable of={Button} />
|
||||
```
|
||||
|
||||
## Inline stories
|
||||
|
||||
Storybook Docs renders all React stories inline by default.
|
||||
|
||||
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.stories.inline` parameter.
|
||||
|
||||
To do so for all stories, update `.storybook/preview.js`:
|
||||
|
||||
```js
|
||||
export const parameters = { docs: { story: { inline: false } } };
|
||||
```
|
||||
|
||||
## TypeScript props with `react-docgen-typescript`
|
||||
|
||||
If you're using TypeScript, there are two different options for generating props: `react-docgen` (default) or `react-docgen-typescript`.
|
||||
|
||||
You can add the following lines to your `.storybook/main.js` to switch between the two (or disable docgen):
|
||||
|
||||
```js
|
||||
export default {
|
||||
typescript: {
|
||||
// also valid 'react-docgen' | false
|
||||
reactDocgen: 'react-docgen-typescript',
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
Neither option is perfect, so here's everything you should know if you're thinking about using `react-docgen` for TypeScript.
|
||||
|
||||
| | `react-docgen-typescript` | `react-docgen` |
|
||||
| --------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| **Features** | **Great**. The analysis produces great results which gives the best props table experience. | **OK**. React-docgen produces basic results that are fine for most use cases. |
|
||||
| **Performance** | **Slow**. It's doing a lot more work to produce those results, and may also have an inefficient implementation. | **Blazing fast**. Adding it to your project increases build time negligibly. |
|
||||
| **Bugs** | **Some**. There are corner cases that are not handled properly, and are annoying for developers. | **Some**. There are corner cases that are not handled properly, and are annoying for developers. |
|
||||
| **SB docs** | **Good**. Our prop tables have supported `react-docgen-typescript` results from the beginning, so it's relatively stable. | **OK**. There are some obvious improvements to fully support `react-docgen`, and they're coming soon. |
|
||||
|
||||
**Performance** is a common question, so here are build times from a random project to quantify. Your mileage may vary:
|
||||
|
||||
| Docgen | Build time |
|
||||
| ----------------------- | ---------- |
|
||||
| react-docgen-typescript | 33s |
|
||||
| react-docgen | 29s |
|
||||
| none | 28s |
|
||||
|
||||
## More resources
|
||||
|
||||
Want to learn more? Here are some more articles on Storybook Docs:
|
||||
|
||||
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
|
||||
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
|
||||
- Example: [Storybook Design System](https://github.com/storybookjs/design-system)
|
||||
7
frontend/node_modules/@storybook/addon-docs/svelte/HOC.svelte
generated
vendored
Normal file
7
frontend/node_modules/@storybook/addon-docs/svelte/HOC.svelte
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
export let storyFn;
|
||||
|
||||
let { Component: component, props } = storyFn();
|
||||
</script>
|
||||
|
||||
<svelte:component this={component} {...props}/>
|
||||
152
frontend/node_modules/@storybook/addon-docs/vue/README.md
generated
vendored
Normal file
152
frontend/node_modules/@storybook/addon-docs/vue/README.md
generated
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
<center>
|
||||
<img src="../docs/media/vue-hero.png" width="100%" />
|
||||
</center>
|
||||
|
||||
<h1>Storybook Docs for Vue</h1>
|
||||
|
||||
> migration guide: This page documents the method to configure storybook introduced recently in 5.3.0, consult the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) if you want to migrate to this format of configuring storybook.
|
||||
|
||||
Storybook Docs transforms your Storybook stories into world-class component documentation. Storybook Docs for Vue supports [DocsPage](../docs/docspage.md) for auto-generated docs, and [MDX](../docs/mdx.md) for rich long-form docs.
|
||||
|
||||
To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Vue specifics, read on!
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Preset options](#preset-options)
|
||||
- [DocsPage](#docspage)
|
||||
- [Props tables](#props-tables)
|
||||
- [MDX](#mdx)
|
||||
- [Inline Stories](#inline-stories)
|
||||
- [More resources](#more-resources)
|
||||
|
||||
## Installation
|
||||
|
||||
First add the package. Make sure that the versions for your `@storybook/*` packages match:
|
||||
|
||||
```sh
|
||||
yarn add -D @storybook/addon-docs
|
||||
```
|
||||
|
||||
Then add the following to your `.storybook/main.js` addons:
|
||||
|
||||
```js
|
||||
export default {
|
||||
addons: ['@storybook/addon-docs'],
|
||||
};
|
||||
```
|
||||
|
||||
## Preset options
|
||||
|
||||
The `addon-docs` preset for Vue has a configuration option that can be used to configure [`vue-docgen-api`](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api), a tool which extracts information from Vue components. Here's an example of how to use the preset with options for Vue app:
|
||||
|
||||
```js
|
||||
import * as path from 'path';
|
||||
|
||||
export default {
|
||||
addons: [
|
||||
{
|
||||
name: '@storybook/addon-docs',
|
||||
options: {
|
||||
vueDocgenOptions: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, '../'),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
The `vueDocgenOptions` is an object for configuring `vue-docgen-api`. See [`vue-docgen-api`'s docs](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api#options-docgenoptions) for available configuration options.
|
||||
|
||||
## DocsPage
|
||||
|
||||
When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI.
|
||||
|
||||
## Props tables
|
||||
|
||||
Getting [Props tables](../docs/props-tables.md) for your components requires a few more steps. Docs for Vue relies on [`vue-docgen-loader`](https://github.com/pocka/vue-docgen-loader). It supports `props`, `events`, and `slots` as first class prop types.
|
||||
|
||||
Finally, be sure to fill in the `component` field in your story metadata:
|
||||
|
||||
```ts
|
||||
import { InfoButton } from './InfoButton.vue';
|
||||
|
||||
export default {
|
||||
title: 'InfoButton',
|
||||
component: InfoButton,
|
||||
};
|
||||
```
|
||||
|
||||
If you haven't upgraded from `storiesOf`, you can use a parameter to do the same thing:
|
||||
|
||||
```ts
|
||||
import { storiesOf } from '@storybook/vue';
|
||||
import { InfoButton } from './InfoButton.vue';
|
||||
|
||||
storiesOf('InfoButton', module)
|
||||
.addParameters({ component: InfoButton })
|
||||
.add( ... );
|
||||
```
|
||||
|
||||
## MDX
|
||||
|
||||
[MDX](../docs/mdx.md) is a convenient way to document your components in Markdown and embed documentation components, such as stories and props tables, inline.
|
||||
|
||||
Docs has peer dependencies on `react`. If you want to write stories in MDX, you may need to add this dependency as well:
|
||||
|
||||
```sh
|
||||
yarn add -D react
|
||||
```
|
||||
|
||||
Then update your `.storybook/main.js` to make sure you load MDX files:
|
||||
|
||||
```js
|
||||
export default {
|
||||
stories: ['../src/stories/**/*.stories.@(js|mdx)'],
|
||||
};
|
||||
```
|
||||
|
||||
Finally, you can create MDX files like this:
|
||||
|
||||
```md
|
||||
import { Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { InfoButton } from './InfoButton.vue';
|
||||
|
||||
<Meta title='InfoButton' component={InfoButton} />
|
||||
|
||||
# InfoButton
|
||||
|
||||
Some **markdown** description, or whatever you want.
|
||||
|
||||
<Story name='basic' height='400px'>{{
|
||||
components: { InfoButton },
|
||||
template: '<info-button label="I\'m a button!"/>',
|
||||
}}</Story>
|
||||
|
||||
## ArgsTable
|
||||
|
||||
<ArgsTable of={InfoButton} />
|
||||
```
|
||||
|
||||
Yes, it's redundant to declare `component` twice. [Coming soon](https://github.com/storybookjs/storybook/issues/8685).
|
||||
|
||||
## Inline Stories
|
||||
|
||||
Storybook Docs renders all Vue stories inline by default.
|
||||
|
||||
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.stories.inline` parameter.
|
||||
|
||||
To do so for all stories, update `.storybook/preview.js`:
|
||||
|
||||
```js
|
||||
export const parameters = { docs: { story: { inline: false } } };
|
||||
```
|
||||
|
||||
## More resources
|
||||
|
||||
Want to learn more? Here are some more articles on Storybook Docs:
|
||||
|
||||
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
|
||||
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
|
||||
- Example: [Storybook Design System](https://github.com/storybookjs/design-system)
|
||||
152
frontend/node_modules/@storybook/addon-docs/vue3/README.md
generated
vendored
Normal file
152
frontend/node_modules/@storybook/addon-docs/vue3/README.md
generated
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
<center>
|
||||
<img src="../docs/media/vue-hero.png" width="100%" />
|
||||
</center>
|
||||
|
||||
<h1>Storybook Docs for Vue 3</h1>
|
||||
|
||||
> migration guide: This page documents the method to configure storybook introduced recently in 5.3.0, consult the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) if you want to migrate to this format of configuring storybook.
|
||||
|
||||
Storybook Docs transforms your Storybook stories into world-class component documentation. Storybook Docs for Vue 3 supports [DocsPage](../docs/docspage.md) for auto-generated docs, and [MDX](../docs/mdx.md) for rich long-form docs.
|
||||
|
||||
To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Vue 3 specifics, read on!
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Preset options](#preset-options)
|
||||
- [DocsPage](#docspage)
|
||||
- [Props tables](#props-tables)
|
||||
- [MDX](#mdx)
|
||||
- [Inline Stories](#inline-stories)
|
||||
- [More resources](#more-resources)
|
||||
|
||||
## Installation
|
||||
|
||||
First add the package. Make sure that the versions for your `@storybook/*` packages match:
|
||||
|
||||
```sh
|
||||
yarn add -D @storybook/addon-docs
|
||||
```
|
||||
|
||||
Then add the following to your `.storybook/main.js` addons:
|
||||
|
||||
```js
|
||||
export default {
|
||||
addons: ['@storybook/addon-docs'],
|
||||
};
|
||||
```
|
||||
|
||||
## Preset options
|
||||
|
||||
The `addon-docs` preset for Vue has a configuration option that can be used to configure [`vue-docgen-api`](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api), a tool which extracts information from Vue components. Here's an example of how to use the preset with options for Vue app:
|
||||
|
||||
```js
|
||||
import * as path from 'path';
|
||||
|
||||
export default {
|
||||
addons: [
|
||||
{
|
||||
name: '@storybook/addon-docs',
|
||||
options: {
|
||||
vueDocgenOptions: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, '../'),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
The `vueDocgenOptions` is an object for configuring `vue-docgen-api`. See [`vue-docgen-api`'s docs](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api#options-docgenoptions) for available configuration options.
|
||||
|
||||
## DocsPage
|
||||
|
||||
When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI.
|
||||
|
||||
## Props tables
|
||||
|
||||
Getting [Props tables](../docs/props-tables.md) for your components requires a few more steps. Docs for Vue relies on [`vue-docgen-loader`](https://github.com/pocka/vue-docgen-loader). It supports `props`, `events`, and `slots` as first class prop types.
|
||||
|
||||
Finally, be sure to fill in the `component` field in your story metadata:
|
||||
|
||||
```ts
|
||||
import { InfoButton } from './InfoButton.vue';
|
||||
|
||||
export default {
|
||||
title: 'InfoButton',
|
||||
component: InfoButton,
|
||||
};
|
||||
```
|
||||
|
||||
If you haven't upgraded from `storiesOf`, you can use a parameter to do the same thing:
|
||||
|
||||
```ts
|
||||
import { storiesOf } from '@storybook/vue';
|
||||
import { InfoButton } from './InfoButton.vue';
|
||||
|
||||
storiesOf('InfoButton', module)
|
||||
.addParameters({ component: InfoButton })
|
||||
.add( ... );
|
||||
```
|
||||
|
||||
## MDX
|
||||
|
||||
[MDX](../docs/mdx.md) is a convenient way to document your components in Markdown and embed documentation components, such as stories and props tables, inline.
|
||||
|
||||
Docs has peer dependencies on `react`. If you want to write stories in MDX, you may need to add this dependency as well:
|
||||
|
||||
```sh
|
||||
yarn add -D react
|
||||
```
|
||||
|
||||
Then update your `.storybook/main.js` to make sure you load MDX files:
|
||||
|
||||
```js
|
||||
export default {
|
||||
stories: ['../src/stories/**/*.stories.@(js|mdx)'],
|
||||
};
|
||||
```
|
||||
|
||||
Finally, you can create MDX files like this:
|
||||
|
||||
```md
|
||||
import { Meta, Story, ArgsTable } from '@storybook/addon-docs';
|
||||
import { InfoButton } from './InfoButton.vue';
|
||||
|
||||
<Meta title='InfoButton' component={InfoButton} />
|
||||
|
||||
# InfoButton
|
||||
|
||||
Some **markdown** description, or whatever you want.
|
||||
|
||||
<Story name='basic' height='400px'>{{
|
||||
components: { InfoButton },
|
||||
template: '<info-button label="I\'m a button!"/>',
|
||||
}}</Story>
|
||||
|
||||
## ArgsTable
|
||||
|
||||
<ArgsTable of={InfoButton} />
|
||||
```
|
||||
|
||||
Yes, it's redundant to declare `component` twice. [Coming soon](https://github.com/storybookjs/storybook/issues/8685).
|
||||
|
||||
## Inline Stories
|
||||
|
||||
Storybook Docs renders all Vue stories inline by default.
|
||||
|
||||
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.stories.inline` parameter.
|
||||
|
||||
To do so for all stories, update `.storybook/preview.js`:
|
||||
|
||||
```js
|
||||
export const parameters = { docs: { story: { inline: false } } };
|
||||
```
|
||||
|
||||
## More resources
|
||||
|
||||
Want to learn more? Here are some more articles on Storybook Docs:
|
||||
|
||||
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
|
||||
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
|
||||
- Example: [Storybook Design System](https://github.com/storybookjs/design-system)
|
||||
131
frontend/node_modules/@storybook/addon-docs/web-components/README.md
generated
vendored
Normal file
131
frontend/node_modules/@storybook/addon-docs/web-components/README.md
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
<h1>Storybook Docs for Web Components</h1>
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Props tables](#props-tables)
|
||||
- [Stories not inline](#stories-not-inline)
|
||||
- [More resources](#more-resources)
|
||||
|
||||
## Installation
|
||||
|
||||
- Be sure to check the [installation section of the general addon-docs page](../README.md) before proceeding.
|
||||
- Be sure to have a [custom-elements.json](./#custom-elementsjson) file.
|
||||
- Add to your `.storybook/preview.js`
|
||||
|
||||
```js
|
||||
import { setCustomElementsManifest } from '@storybook/web-components';
|
||||
import customElements from '../custom-elements.json';
|
||||
|
||||
setCustomElementsManifest(customElements);
|
||||
```
|
||||
|
||||
- Add to your story files
|
||||
|
||||
```js
|
||||
export default {
|
||||
title: 'Demo Card',
|
||||
component: 'your-component-name', // which is also found in the `custom-elements.json`
|
||||
};
|
||||
```
|
||||
|
||||
## Props tables
|
||||
|
||||
In order to get [Props tables](..docs/../../docs/props-tables.md) documentation for web-components you will need to have a [custom-elements.json](https://github.com/webcomponents/custom-elements-json) file.
|
||||
|
||||
You can hand write it or better generate it. Depending on the web components sugar you are choosing your mileage may vary.
|
||||
|
||||
Known analyzers that output `custom-elements.json` v1.0.0:
|
||||
|
||||
- [@custom-elements-manifest/analyzer](https://github.com/open-wc/custom-elements-manifest)
|
||||
- Supports Vanilla, LitElement, FASTElement, Stencil, Catalyst, Atomico
|
||||
|
||||
Known analyzers that output older versions of `custom-elements.json`:
|
||||
|
||||
- [web-component-analyzer](https://github.com/runem/web-component-analyzer)
|
||||
- Supports LitElement, Polymer, Vanilla, (Stencil)
|
||||
- [stenciljs](https://stenciljs.com/)
|
||||
- Supports Stencil (but does not have all metadata)
|
||||
|
||||
To generate this file with Stencil, add `docs-vscode` to outputTargets in `stencil.config.ts`:
|
||||
|
||||
```
|
||||
{
|
||||
type: 'docs-vscode',
|
||||
file: 'custom-elements.json'
|
||||
},
|
||||
```
|
||||
|
||||
The file looks something like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"schemaVersion": "1.0.0",
|
||||
"readme": "",
|
||||
"modules": [
|
||||
{
|
||||
"kind": "javascript-module",
|
||||
"path": "src/my-element.js",
|
||||
"declarations": [
|
||||
{
|
||||
"kind": "class",
|
||||
"description": "",
|
||||
"name": "MyElement",
|
||||
"members": [
|
||||
{
|
||||
"kind": "field",
|
||||
"name": "disabled"
|
||||
},
|
||||
{
|
||||
"kind": "method",
|
||||
"name": "fire"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "disabled-changed",
|
||||
"type": {
|
||||
"text": "Event"
|
||||
}
|
||||
}
|
||||
],
|
||||
"superclass": {
|
||||
"name": "HTMLElement"
|
||||
},
|
||||
"tagName": "my-element"
|
||||
}
|
||||
],
|
||||
"exports": [
|
||||
{
|
||||
"kind": "custom-element-definition",
|
||||
"name": "my-element",
|
||||
"declaration": {
|
||||
"name": "MyElement",
|
||||
"module": "src/my-element.js"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
For a full example see the [web-components-kitchen-sink/custom-elements.json](../../../examples/web-components-kitchen-sink/custom-elements.json).
|
||||
|
||||
## Stories not inline
|
||||
|
||||
Storybook Docs renders all web components stories inline by default.
|
||||
|
||||
However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.story.iframeHeight` story parameter), by using the `docs.stories.inline` parameter.
|
||||
|
||||
To do so for all stories, update `.storybook/preview.js`:
|
||||
|
||||
```js
|
||||
export const parameters = { docs: { story: { inline: false } } };
|
||||
```
|
||||
|
||||
## More resources
|
||||
|
||||
Want to learn more? Here are some more articles on Storybook Docs:
|
||||
|
||||
- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md)
|
||||
- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea)
|
||||
- Example: [Storybook Design System](https://github.com/storybookjs/design-system)
|
||||
1
frontend/node_modules/@storybook/addon-docs/web-components/index.js
generated
vendored
Normal file
1
frontend/node_modules/@storybook/addon-docs/web-components/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('../dist/frameworks/common/index');
|
||||
Reference in New Issue
Block a user