npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@component-controls/blocks

v4.0.3

Published

Component controls core documentation blocks.

Downloads

913

Readme

Table of contents

Overview

Some of the guiding design goals for this library:

  • Most components should have a 'plain' and a 'block' version, where the block version adds a collapsible Box with a title.
  • There are two main categories of components:
    • that display story data (i.e. story source, story render)
    • that display component(s) data (i.e. prop tables, component sources)
  • Components accept a list of custom ActionItems to be extended.
  • Components that deal with source code (story or component source) display actions to browse their respective repositories.

List of components

getURL

react component

defined in @component-controls/blocks/ui/blocks/src/utils/url.ts

InvalidType

react component

error message when the control type is not found.

defined in @component-controls/blocks/ui/blocks/src/notifications/InvalidType.tsx

getStoryTitle

react type

defined in @component-controls/blocks/ui/blocks/src/utils/constants.ts

properties

| Name | Type | Parent | Description | | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | title* | string | Document | title of the document. If no 'route' parameter is specifified, the title is used to generate the document url. This is the only required field, to show the document in the menu structures. | | type | "story" | "blog" | "page" | "tags" | "author" | string | Document | document type - blogs, pages, stories and even custom ones. By default - story | | route | string | Document | if provided, will be used as the route for the page. if not provided, the title in lowercase will be used as the route | | date | string | Document | optional date the document was created. If not assigned, the instrumentation process will use birthtime | | dateModified | string | Document | optional date the document was last modified. If not assigned, the instrumentation process will use mtime | | status | "draft" | "published" | Document | if set to draft, the document will be hidden in production builds. | | tags | string[] | Document | comma-separated list of document tags, used for search and for SOE keywords unless keyswords are specified. | | keywords | string[] | Document | comma-separated list of SEO keywords | | description | string | JSX.Element | Document | documentation file description | | image | string | Document | link to an image for the document, will be used for SEO | | author | string | Document | document author | | order | number | Document | document order, used to sort documents within the same parent | | menu | string | Document | to which static menu to attach the document compatibility with docz | | template | typebind*: function (propsname*: stringstoryName: stringid: stringrawId: stringdoc: stringstoryFn: StoryRenderFndescription: stringarguments: StoryArgumentsloc: CodeLocationsource: stringsubtitle: stringdynamic: booleandynamicId: stringcomponentat*: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>controls: ComponentControlssmartControls: SmartControlsdecorators: StoryRenderFn[]plugins: anycategory: string) => Example<>bind*: function (props*: ) => Example<Props>source: stringid: stringdescription: stringstoryName: stringrawId: stringdoc: stringstoryFn: StoryRenderFnloc: CodeLocationsubtitle: stringdynamic: booleandynamicId: stringcomponentat*: subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>smartControls: SmartControlsdecorators: StoryRenderFn[]plugins: anycategory: stringcontrols*: source: stringid: stringdescription: stringstoryName: stringrawId: stringdoc: stringstoryFn: function (controlValues[string]: anycontext: any) => Promise | anylocstart*line*: numbercolumn*: numberend*line*: numbercolumn*: numbersubtitle: stringdynamic: booleandynamicId: stringcomponent: string | Record<string, unknown> | ElementType<Props>subcomponents: Record<string, (string, Record<string, unknown>, ElementType<Props>)>smartControlssmart: booleaninclude: string[] | IncludeFnexclude: string[] | IncludeFndecorators: StoryRenderFn[]plugins: anycategory: stringcontrols[string]: ComponentControl<ExampleControls> | any | Document | template component to be linked to document stories | | stories | string[] | Document | list of story ids contained in the document. | | source | string | Document | source code of the entire file of stories | | fileName | string | Document | file name of the file of stories | | package | string