JSPM

@storybook/client-api

6.4.19
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1914054
  • Score
    100M100P100Q239580F
  • License MIT

Storybook Client API

Package Exports

  • @storybook/client-api
  • @storybook/client-api/dist/cjs/index.js
  • @storybook/client-api/dist/esm/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@storybook/client-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@storybook/client-api -- Deprecated Story APIs (storiesOf)

NOTE This API is deprecated, and the CSF format is preferred for all stories.

storiesOf API

The @storybook/client API provides the storiesOf() API, which is proxied through to the CSF API.

Internals

In order to appear to the store like the CSF API, a call to storiesOf().add() does the following:

  • Tracks the story added in a synthetic StoryIndex data structure
  • Constructs a moduleExports object that is equivalent to the exports from a CSF file that produced the same stories.

In order to achieve the old storySort functionality, the client API also needs access to the project annotations.