Generates a Storybook Component Story Format
module for a custom element: an argTypes controls panel derived from the
element's attributes (string-literal unions become select options) and
events (mapped to Storybook actions), plus a default story that applies the
args as attributes. Zero hand-written story code required.
All interpolated identifiers go through JSON.stringify, so the output is safe
as a standalone .js file even for unusual tag/attribute/event names. (Do not
inline the result into an HTML <script> — a name containing </script> would
then break out; security-findings #26.)
Generates a Storybook Component Story Format module for a custom element: an
argTypescontrols panel derived from the element's attributes (string-literal unions becomeselectoptions) and events (mapped to Storybook actions), plus a default story that applies the args as attributes. Zero hand-written story code required.All interpolated identifiers go through
JSON.stringify, so the output is safe as a standalone.jsfile even for unusual tag/attribute/event names. (Do not inline the result into an HTML<script>— a name containing</script>would then break out; security-findings #26.)