Socket
Socket
Sign inDemoInstall

@storybook/core-common

Package Overview
Dependencies
227
Maintainers
9
Versions
943
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @storybook/core-common

Storybook framework-agnostic API


Version published
Weekly downloads
7.9M
decreased by-0.38%
Maintainers
9
Install size
32.7 MB
Created
Weekly downloads
 

Package description

What is @storybook/core-common?

The @storybook/core-common package is part of the Storybook ecosystem, which is a tool for developing UI components in isolation for React, Vue, Angular, and more. This package includes common functionalities and utilities used by various Storybook packages to configure and manage the core aspects of Storybook. It provides a set of APIs and configurations that are shared across different parts of the Storybook codebase.

What are @storybook/core-common's main functionalities?

Configuration Management

This feature allows developers to manage Storybook's configuration, including setting up the list of stories, adding addons, and customizing the Webpack configuration.

module.exports = { stories: ['../src/**/*.stories.js'], addons: ['@storybook/addon-actions', '@storybook/addon-links'], webpackFinal: async (config, { configType }) => { // Return the altered config return config; }, };

Preset Management

Preset management helps in merging custom configurations with Storybook's default configurations using utilities like mergeConfig.

const { mergeConfig } = require('@storybook/core-common'); module.exports = { addons: ['@storybook/addon-essentials'], webpackFinal: (config) => mergeConfig(config, customConfig), };

Custom Decorators and Parameters

Developers can use this package to add custom decorators and parameters to their Storybook setup, enhancing the functionality and customization of their stories.

const { addDecorator, addParameters } = require('@storybook/core-common'); addDecorator(myDecorator); addParameters({ myParameter: 'value' });

Other packages similar to @storybook/core-common

Changelog

Source

8.0.9

  • Addon-docs: Fix MDX compilation when using @vitejs/plugin-react-swc with plugins - #26837, thanks @JReinhold!
  • CSF: Fix typings for control and other properties of argTypes - #26824, thanks @kasperpeulen!
  • Controls: Fix crashing when docgen extraction partially fails - #26862, thanks @yannbf!
  • Doc Tools: Signature Type Error Handling - #26774, thanks @ethriel3695!
  • Next.js: Move sharp into optional deps - #26787, thanks @shuta13!
  • Nextjs: Support next 14.2 useParams functionality - #26874, thanks @yannbf!
  • Test: Remove chai as dependency of @storybook/test - #26852, thanks @kasperpeulen!
  • UI: Fix sidebar search hanging when selecting a story in touch mode - #26807, thanks @JReinhold!

Readme

Source

Storybook Core-Common

Common utilities used across @storybook/core-server (manager UI configuration) and @storybook/builder-webpack{4,5} (preview configuration).

This is a lot of code extracted for convenience, not because it made sense.

Supporting multiple version of webpack and this duplicating a large portion of code that was never meant to be generic caused this.

At some point we'll refactor this, it's likely a lot of this code is dead or barely used.

Keywords

FAQs

Last updated on 22 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc