mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 06:41:25 +08:00
Merge branch 'next' into norbert/cpc
This commit is contained in:
commit
ec649bc224
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-a11y",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Test component compliance with web accessibility standards",
|
||||
"keywords": [
|
||||
"a11y",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-actions",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Get UI feedback when an action is performed on an interactive element",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-backgrounds",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Switch backgrounds to view components in different settings",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-controls",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Interact with component inputs dynamically in the Storybook UI",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-docs",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Document component usage and properties in Markdown",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-essentials",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Curated addons to bring out the best of Storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-mdx-gfm",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "GitHub Flavored Markdown in Storybook",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-highlight",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Highlight DOM nodes within your stories",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-interactions",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Automate, test and debug user interactions",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-jest",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "React storybook addon that show component jest report",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-links",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Link stories together to build demos and prototypes with your UI components",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-measure",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Inspect layouts by visualizing the box model",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-onboarding",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook Addon Onboarding - Introduces a new onboarding experience",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-outline",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Outline all elements with CSS to help with layout placement and alignment",
|
||||
"keywords": [
|
||||
"storybook-addons",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-storysource",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "View a story’s source code to see how it works and paste into your app",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-themes",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Switch between multiple themes for you components in Storybook",
|
||||
"keywords": [
|
||||
"css",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-toolbars",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Create your own toolbar items that control story rendering",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/addon-viewport",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Build responsive components by adjusting Storybook’s viewport size and orientation",
|
||||
"keywords": [
|
||||
"addon",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-manager",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook manager builder",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-vite",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "A plugin to run and build Storybooks with Vite",
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/builders/builder-vite/#readme",
|
||||
"bugs": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/builder-webpack5",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,83 +1,83 @@
|
||||
// auto generated file, do not edit
|
||||
export default {
|
||||
'@storybook/addon-a11y': '8.1.0-beta.1',
|
||||
'@storybook/addon-actions': '8.1.0-beta.1',
|
||||
'@storybook/addon-backgrounds': '8.1.0-beta.1',
|
||||
'@storybook/addon-controls': '8.1.0-beta.1',
|
||||
'@storybook/addon-docs': '8.1.0-beta.1',
|
||||
'@storybook/addon-essentials': '8.1.0-beta.1',
|
||||
'@storybook/addon-highlight': '8.1.0-beta.1',
|
||||
'@storybook/addon-interactions': '8.1.0-beta.1',
|
||||
'@storybook/addon-jest': '8.1.0-beta.1',
|
||||
'@storybook/addon-links': '8.1.0-beta.1',
|
||||
'@storybook/addon-mdx-gfm': '8.1.0-beta.1',
|
||||
'@storybook/addon-measure': '8.1.0-beta.1',
|
||||
'@storybook/addon-onboarding': '8.1.0-beta.1',
|
||||
'@storybook/addon-outline': '8.1.0-beta.1',
|
||||
'@storybook/addon-storysource': '8.1.0-beta.1',
|
||||
'@storybook/addon-themes': '8.1.0-beta.1',
|
||||
'@storybook/addon-toolbars': '8.1.0-beta.1',
|
||||
'@storybook/addon-viewport': '8.1.0-beta.1',
|
||||
'@storybook/angular': '8.1.0-beta.1',
|
||||
'@storybook/blocks': '8.1.0-beta.1',
|
||||
'@storybook/builder-manager': '8.1.0-beta.1',
|
||||
'@storybook/builder-vite': '8.1.0-beta.1',
|
||||
'@storybook/builder-webpack5': '8.1.0-beta.1',
|
||||
'@storybook/channels': '8.1.0-beta.1',
|
||||
'@storybook/cli': '8.1.0-beta.1',
|
||||
'@storybook/client-logger': '8.1.0-beta.1',
|
||||
'@storybook/codemod': '8.1.0-beta.1',
|
||||
'@storybook/components': '8.1.0-beta.1',
|
||||
'@storybook/core-common': '8.1.0-beta.1',
|
||||
'@storybook/core-events': '8.1.0-beta.1',
|
||||
'@storybook/core-server': '8.1.0-beta.1',
|
||||
'@storybook/core-webpack': '8.1.0-beta.1',
|
||||
'@storybook/csf-plugin': '8.1.0-beta.1',
|
||||
'@storybook/csf-tools': '8.1.0-beta.1',
|
||||
'@storybook/docs-tools': '8.1.0-beta.1',
|
||||
'@storybook/ember': '8.1.0-beta.1',
|
||||
'@storybook/html': '8.1.0-beta.1',
|
||||
'@storybook/html-vite': '8.1.0-beta.1',
|
||||
'@storybook/html-webpack5': '8.1.0-beta.1',
|
||||
'@storybook/instrumenter': '8.1.0-beta.1',
|
||||
'@storybook/manager': '8.1.0-beta.1',
|
||||
'@storybook/manager-api': '8.1.0-beta.1',
|
||||
'@storybook/nextjs': '8.1.0-beta.1',
|
||||
'@storybook/node-logger': '8.1.0-beta.1',
|
||||
'@storybook/preact': '8.1.0-beta.1',
|
||||
'@storybook/preact-vite': '8.1.0-beta.1',
|
||||
'@storybook/preact-webpack5': '8.1.0-beta.1',
|
||||
'@storybook/preset-create-react-app': '8.1.0-beta.1',
|
||||
'@storybook/preset-html-webpack': '8.1.0-beta.1',
|
||||
'@storybook/preset-preact-webpack': '8.1.0-beta.1',
|
||||
'@storybook/preset-react-webpack': '8.1.0-beta.1',
|
||||
'@storybook/preset-server-webpack': '8.1.0-beta.1',
|
||||
'@storybook/preset-svelte-webpack': '8.1.0-beta.1',
|
||||
'@storybook/preset-vue3-webpack': '8.1.0-beta.1',
|
||||
'@storybook/preview': '8.1.0-beta.1',
|
||||
'@storybook/preview-api': '8.1.0-beta.1',
|
||||
'@storybook/react': '8.1.0-beta.1',
|
||||
'@storybook/react-dom-shim': '8.1.0-beta.1',
|
||||
'@storybook/react-vite': '8.1.0-beta.1',
|
||||
'@storybook/react-webpack5': '8.1.0-beta.1',
|
||||
'@storybook/router': '8.1.0-beta.1',
|
||||
'@storybook/server': '8.1.0-beta.1',
|
||||
'@storybook/server-webpack5': '8.1.0-beta.1',
|
||||
'@storybook/source-loader': '8.1.0-beta.1',
|
||||
'@storybook/svelte': '8.1.0-beta.1',
|
||||
'@storybook/svelte-vite': '8.1.0-beta.1',
|
||||
'@storybook/svelte-webpack5': '8.1.0-beta.1',
|
||||
'@storybook/sveltekit': '8.1.0-beta.1',
|
||||
'@storybook/telemetry': '8.1.0-beta.1',
|
||||
'@storybook/test': '8.1.0-beta.1',
|
||||
'@storybook/theming': '8.1.0-beta.1',
|
||||
'@storybook/types': '8.1.0-beta.1',
|
||||
'@storybook/vue3': '8.1.0-beta.1',
|
||||
'@storybook/vue3-vite': '8.1.0-beta.1',
|
||||
'@storybook/vue3-webpack5': '8.1.0-beta.1',
|
||||
'@storybook/web-components': '8.1.0-beta.1',
|
||||
'@storybook/web-components-vite': '8.1.0-beta.1',
|
||||
'@storybook/web-components-webpack5': '8.1.0-beta.1',
|
||||
sb: '8.1.0-beta.1',
|
||||
storybook: '8.1.0-beta.1',
|
||||
'@storybook/addon-a11y': '8.1.0',
|
||||
'@storybook/addon-actions': '8.1.0',
|
||||
'@storybook/addon-backgrounds': '8.1.0',
|
||||
'@storybook/addon-controls': '8.1.0',
|
||||
'@storybook/addon-docs': '8.1.0',
|
||||
'@storybook/addon-essentials': '8.1.0',
|
||||
'@storybook/addon-highlight': '8.1.0',
|
||||
'@storybook/addon-interactions': '8.1.0',
|
||||
'@storybook/addon-jest': '8.1.0',
|
||||
'@storybook/addon-links': '8.1.0',
|
||||
'@storybook/addon-mdx-gfm': '8.1.0',
|
||||
'@storybook/addon-measure': '8.1.0',
|
||||
'@storybook/addon-onboarding': '8.1.0',
|
||||
'@storybook/addon-outline': '8.1.0',
|
||||
'@storybook/addon-storysource': '8.1.0',
|
||||
'@storybook/addon-themes': '8.1.0',
|
||||
'@storybook/addon-toolbars': '8.1.0',
|
||||
'@storybook/addon-viewport': '8.1.0',
|
||||
'@storybook/angular': '8.1.0',
|
||||
'@storybook/blocks': '8.1.0',
|
||||
'@storybook/builder-manager': '8.1.0',
|
||||
'@storybook/builder-vite': '8.1.0',
|
||||
'@storybook/builder-webpack5': '8.1.0',
|
||||
'@storybook/channels': '8.1.0',
|
||||
'@storybook/cli': '8.1.0',
|
||||
'@storybook/client-logger': '8.1.0',
|
||||
'@storybook/codemod': '8.1.0',
|
||||
'@storybook/components': '8.1.0',
|
||||
'@storybook/core-common': '8.1.0',
|
||||
'@storybook/core-events': '8.1.0',
|
||||
'@storybook/core-server': '8.1.0',
|
||||
'@storybook/core-webpack': '8.1.0',
|
||||
'@storybook/csf-plugin': '8.1.0',
|
||||
'@storybook/csf-tools': '8.1.0',
|
||||
'@storybook/docs-tools': '8.1.0',
|
||||
'@storybook/ember': '8.1.0',
|
||||
'@storybook/html': '8.1.0',
|
||||
'@storybook/html-vite': '8.1.0',
|
||||
'@storybook/html-webpack5': '8.1.0',
|
||||
'@storybook/instrumenter': '8.1.0',
|
||||
'@storybook/manager': '8.1.0',
|
||||
'@storybook/manager-api': '8.1.0',
|
||||
'@storybook/nextjs': '8.1.0',
|
||||
'@storybook/node-logger': '8.1.0',
|
||||
'@storybook/preact': '8.1.0',
|
||||
'@storybook/preact-vite': '8.1.0',
|
||||
'@storybook/preact-webpack5': '8.1.0',
|
||||
'@storybook/preset-create-react-app': '8.1.0',
|
||||
'@storybook/preset-html-webpack': '8.1.0',
|
||||
'@storybook/preset-preact-webpack': '8.1.0',
|
||||
'@storybook/preset-react-webpack': '8.1.0',
|
||||
'@storybook/preset-server-webpack': '8.1.0',
|
||||
'@storybook/preset-svelte-webpack': '8.1.0',
|
||||
'@storybook/preset-vue3-webpack': '8.1.0',
|
||||
'@storybook/preview': '8.1.0',
|
||||
'@storybook/preview-api': '8.1.0',
|
||||
'@storybook/react': '8.1.0',
|
||||
'@storybook/react-dom-shim': '8.1.0',
|
||||
'@storybook/react-vite': '8.1.0',
|
||||
'@storybook/react-webpack5': '8.1.0',
|
||||
'@storybook/router': '8.1.0',
|
||||
'@storybook/server': '8.1.0',
|
||||
'@storybook/server-webpack5': '8.1.0',
|
||||
'@storybook/source-loader': '8.1.0',
|
||||
'@storybook/svelte': '8.1.0',
|
||||
'@storybook/svelte-vite': '8.1.0',
|
||||
'@storybook/svelte-webpack5': '8.1.0',
|
||||
'@storybook/sveltekit': '8.1.0',
|
||||
'@storybook/telemetry': '8.1.0',
|
||||
'@storybook/test': '8.1.0',
|
||||
'@storybook/theming': '8.1.0',
|
||||
'@storybook/types': '8.1.0',
|
||||
'@storybook/vue3': '8.1.0',
|
||||
'@storybook/vue3-vite': '8.1.0',
|
||||
'@storybook/vue3-webpack5': '8.1.0',
|
||||
'@storybook/web-components': '8.1.0',
|
||||
'@storybook/web-components-vite': '8.1.0',
|
||||
'@storybook/web-components-webpack5': '8.1.0',
|
||||
sb: '8.1.0',
|
||||
storybook: '8.1.0',
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/angular",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/ember",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
|
||||
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember",
|
||||
"bugs": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html-vite",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html-webpack5",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/nextjs",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Next.js",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact-vite",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact-webpack5",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Preact: Develop Preact Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-vite",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-webpack5",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/server-webpack5",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte-vite",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte-webpack5",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/sveltekit",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for SvelteKit",
|
||||
"keywords": [
|
||||
"storybook",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue3-vite",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
@ -53,7 +53,7 @@
|
||||
"find-package-json": "^1.2.0",
|
||||
"magic-string": "^0.30.0",
|
||||
"typescript": "^5.0.0",
|
||||
"vue-component-meta": "^1.8.27",
|
||||
"vue-component-meta": "^2.0.0",
|
||||
"vue-docgen-api": "^4.75.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -5,8 +5,8 @@ import path from 'path';
|
||||
import type { PluginOption } from 'vite';
|
||||
import {
|
||||
TypeMeta,
|
||||
createComponentMetaChecker,
|
||||
createComponentMetaCheckerByJsonConfig,
|
||||
createChecker,
|
||||
createCheckerByJson,
|
||||
type ComponentMeta,
|
||||
type MetaCheckerOptions,
|
||||
} from 'vue-component-meta';
|
||||
@ -19,7 +19,7 @@ type MetaSource = {
|
||||
} & ComponentMeta &
|
||||
MetaCheckerOptions['schema'];
|
||||
|
||||
export async function vueComponentMeta(): Promise<PluginOption> {
|
||||
export async function vueComponentMeta(tsconfigPath = 'tsconfig.json'): Promise<PluginOption> {
|
||||
const { createFilter } = await import('vite');
|
||||
|
||||
// exclude stories, virtual modules and storybook internals
|
||||
@ -28,7 +28,7 @@ export async function vueComponentMeta(): Promise<PluginOption> {
|
||||
const include = /\.(vue|ts|js|tsx|jsx)$/;
|
||||
const filter = createFilter(include, exclude);
|
||||
|
||||
const checker = await createChecker();
|
||||
const checker = await createVueComponentMetaChecker(tsconfigPath);
|
||||
|
||||
return {
|
||||
name: 'storybook:vue-component-meta-plugin',
|
||||
@ -126,9 +126,10 @@ export async function vueComponentMeta(): Promise<PluginOption> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the vue-component-meta checker to use for extracting component meta/docs.
|
||||
* Creates the `vue-component-meta` checker to use for extracting component meta/docs.
|
||||
* Considers the given tsconfig file (will use a fallback checker if it does not exist or is not supported).
|
||||
*/
|
||||
async function createChecker() {
|
||||
async function createVueComponentMetaChecker(tsconfigPath = 'tsconfig.json') {
|
||||
const checkerOptions: MetaCheckerOptions = {
|
||||
forceUseTs: true,
|
||||
noDeclarations: true,
|
||||
@ -136,26 +137,18 @@ async function createChecker() {
|
||||
};
|
||||
|
||||
const projectRoot = getProjectRoot();
|
||||
const projectTsConfigPath = path.join(projectRoot, 'tsconfig.json');
|
||||
const projectTsConfigPath = path.join(projectRoot, tsconfigPath);
|
||||
|
||||
const defaultChecker = createComponentMetaCheckerByJsonConfig(
|
||||
projectRoot,
|
||||
{ include: ['**/*'] },
|
||||
checkerOptions
|
||||
);
|
||||
const defaultChecker = createCheckerByJson(projectRoot, { include: ['**/*'] }, checkerOptions);
|
||||
|
||||
// prefer the tsconfig.json file of the project to support alias resolution etc.
|
||||
if (await fileExists(projectTsConfigPath)) {
|
||||
// tsconfig that uses references is currently not supported by vue-component-meta
|
||||
// see: https://github.com/vuejs/language-tools/issues/3896
|
||||
// so we return the no-tsconfig defaultChecker if tsconfig references are found
|
||||
// remove this workaround once the above issue is fixed
|
||||
// vue-component-meta does currently not resolve tsconfig references (see https://github.com/vuejs/language-tools/issues/3896)
|
||||
// so we will return the defaultChecker if references are used.
|
||||
// Otherwise vue-component-meta might not work at all for the Storybook docgen.
|
||||
const references = await getTsConfigReferences(projectTsConfigPath);
|
||||
if (references.length > 0) {
|
||||
// TODO: paths/aliases are not resolvable, find workaround for this
|
||||
return defaultChecker;
|
||||
}
|
||||
return createComponentMetaChecker(projectTsConfigPath, checkerOptions);
|
||||
if (references.length > 0) return defaultChecker;
|
||||
return createChecker(projectTsConfigPath, checkerOptions);
|
||||
}
|
||||
|
||||
return defaultChecker;
|
||||
|
@ -3,7 +3,7 @@ import { dirname, join } from 'path';
|
||||
import type { PluginOption } from 'vite';
|
||||
import { vueComponentMeta } from './plugins/vue-component-meta';
|
||||
import { vueDocgen } from './plugins/vue-docgen';
|
||||
import type { FrameworkOptions, StorybookConfig } from './types';
|
||||
import type { FrameworkOptions, StorybookConfig, VueDocgenPlugin } from './types';
|
||||
|
||||
const getAbsolutePath = <I extends string>(input: I): I =>
|
||||
dirname(require.resolve(join(input, 'package.json'))) as any;
|
||||
@ -20,11 +20,11 @@ export const viteFinal: StorybookConfig['viteFinal'] = async (config, options) =
|
||||
const frameworkOptions: FrameworkOptions =
|
||||
typeof framework === 'string' ? {} : framework.options ?? {};
|
||||
|
||||
const docgenPlugin = frameworkOptions.docgen ?? 'vue-docgen-api';
|
||||
const docgen = resolveDocgenOptions(frameworkOptions.docgen);
|
||||
|
||||
// add docgen plugin depending on framework option
|
||||
if (docgenPlugin === 'vue-component-meta') {
|
||||
plugins.push(await vueComponentMeta());
|
||||
if (docgen.plugin === 'vue-component-meta') {
|
||||
plugins.push(await vueComponentMeta(docgen.tsconfig));
|
||||
} else {
|
||||
plugins.push(await vueDocgen());
|
||||
}
|
||||
@ -39,3 +39,14 @@ export const viteFinal: StorybookConfig['viteFinal'] = async (config, options) =
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Resolves the docgen framework option.
|
||||
*/
|
||||
const resolveDocgenOptions = (
|
||||
docgen?: FrameworkOptions['docgen']
|
||||
): { plugin: VueDocgenPlugin; tsconfig?: string } => {
|
||||
if (!docgen) return { plugin: 'vue-docgen-api' };
|
||||
if (typeof docgen === 'string') return { plugin: docgen };
|
||||
return docgen;
|
||||
};
|
||||
|
@ -21,7 +21,21 @@ export type FrameworkOptions = {
|
||||
* "vue-component-meta" will become the new default in the future and "vue-docgen-api" will be removed.
|
||||
* @default "vue-docgen-api"
|
||||
*/
|
||||
docgen?: VueDocgenPlugin;
|
||||
docgen?:
|
||||
| VueDocgenPlugin
|
||||
| {
|
||||
plugin: 'vue-component-meta';
|
||||
/**
|
||||
* Tsconfig filename to use. Should be set if your main `tsconfig.json` includes references to other tsconfig files
|
||||
* like `tsconfig.app.json`.
|
||||
* Otherwise docgen might not be generated correctly (e.g. import aliases are not resolved).
|
||||
*
|
||||
* For further information, see our [docs](https://storybook.js.org/docs/get-started/vue3-vite#override-the-default-configuration).
|
||||
*
|
||||
* @default "tsconfig.json"
|
||||
*/
|
||||
tsconfig: `tsconfig${string}.json`;
|
||||
};
|
||||
};
|
||||
|
||||
type StorybookConfigFramework = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue3-webpack5",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/web-components-vite",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/web-components-webpack5",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"lit",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sb",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook CLI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "storybook",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook CLI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/cli",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook's CLI - install, dev, build, upgrade, and more",
|
||||
"keywords": [
|
||||
"cli",
|
||||
|
@ -62,9 +62,9 @@ export const reactDocgen: Fix<Options> = {
|
||||
For known "react-docgen" limitations, see:
|
||||
${chalk.yellow('https://github.com/storybookjs/storybook/issues/26606')}
|
||||
|
||||
Press Y to revert to ${chalk.cyan(
|
||||
'react-docgen-typesript'
|
||||
)}, press N to use ${chalk.cyan('react-docgen')}
|
||||
Press Y to revert to ${chalk.cyan('react-docgen-typesript')}, press N to use ${chalk.cyan(
|
||||
'react-docgen'
|
||||
)}
|
||||
`;
|
||||
}
|
||||
},
|
||||
|
@ -21,6 +21,7 @@ import {
|
||||
loadMainConfig,
|
||||
JsPackageManagerFactory,
|
||||
} from '@storybook/core/dist/common';
|
||||
|
||||
import { automigrate } from './automigrate/index';
|
||||
import { autoblock } from './autoblock/index';
|
||||
import { hasStorybookDependencies } from './helpers';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/codemod",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "A collection of codemod scripts written with JSCodeshift",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core-server",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/core-webpack",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook framework-agnostic API",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/csf-plugin",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Enrich CSF files via static analysis",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/manager-api",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Core Storybook Manager API & Context",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1 +1 @@
|
||||
export const version = '8.1.0-beta.1';
|
||||
export const version = '8.1.0';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preview",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react-dom-shim",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/source-loader",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Source loader",
|
||||
"keywords": [
|
||||
"lib",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/test",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/root",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"private": true,
|
||||
"description": "Storybook root",
|
||||
"homepage": "https://storybook.js.org/",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preset-create-react-app",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Create React App preset",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preset-html-webpack",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preset-preact-webpack",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Preact: Develop Preact Component in isolation.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preset-react-webpack",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for React: Develop React Component in isolation with Hot Reloading",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preset-server-webpack",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preset-svelte-webpack",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preset-vue3-webpack",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/html",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook HTML renderer",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/preact",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook Preact renderer",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/react",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook React renderer",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/server",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook Server renderer",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/svelte",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook Svelte renderer",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/vue3",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook Vue 3 renderer",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1217,6 +1217,8 @@ export const referenceTypeEvents: TestComponent = {
|
||||
events: [
|
||||
{
|
||||
name: 'foo',
|
||||
description: '',
|
||||
tags: [],
|
||||
type: '[data?: { foo: string; } | undefined]',
|
||||
signature: '(event: "foo", data?: { foo: string; } | undefined): void',
|
||||
declarations: [],
|
||||
@ -1248,6 +1250,8 @@ export const referenceTypeEvents: TestComponent = {
|
||||
},
|
||||
{
|
||||
name: 'bar',
|
||||
description: '',
|
||||
tags: [],
|
||||
type: '[value: { year: number; title?: any; }]',
|
||||
signature: '(event: "bar", value: { year: number; title?: any; }): void',
|
||||
declarations: [],
|
||||
@ -1282,6 +1286,8 @@ export const referenceTypeEvents: TestComponent = {
|
||||
},
|
||||
{
|
||||
name: 'baz',
|
||||
description: '',
|
||||
tags: [],
|
||||
type: '[]',
|
||||
signature: '(event: "baz"): void',
|
||||
declarations: [],
|
||||
|
@ -0,0 +1,16 @@
|
||||
import type { Meta, StoryObj } from '@storybook/vue3';
|
||||
import Component from './define-model/component.vue';
|
||||
|
||||
const meta = {
|
||||
component: Component,
|
||||
tags: ['autodocs'],
|
||||
} satisfies Meta<typeof Component>;
|
||||
|
||||
type Story = StoryObj<typeof meta>;
|
||||
export default meta;
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
modelValue: 'Test value',
|
||||
},
|
||||
};
|
@ -0,0 +1,18 @@
|
||||
import type { Meta, StoryObj } from '@storybook/vue3';
|
||||
import Component from './define-slots/component.vue';
|
||||
|
||||
const meta = {
|
||||
component: Component,
|
||||
tags: ['autodocs'],
|
||||
} satisfies Meta<typeof Component>;
|
||||
|
||||
type Story = StoryObj<typeof meta>;
|
||||
export default meta;
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
default: ({ num }) => `Default slot { num=${num} }`,
|
||||
named: ({ str }) => `Named slot { str=${str} }`,
|
||||
vbind: ({ num, str }) => `Named v-bind slot { num=${num}, str=${str} }`,
|
||||
},
|
||||
};
|
@ -0,0 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
const model = defineModel<string>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
{{ model }}
|
||||
</template>
|
@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
defineSlots<{
|
||||
/** Some description for "no-bind" slot. */
|
||||
'no-bind'(): any;
|
||||
/** Some description for "default" slot. */
|
||||
default(props: { num: number }): any;
|
||||
/** Some description for "named" slot. */
|
||||
named(props: { str: string }): any;
|
||||
/** Some description for "vbind" slot. */
|
||||
vbind(props: { num: number; str: string }): any;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<slot name="no-bind"></slot>
|
||||
<br />
|
||||
<slot :num="123"></slot>
|
||||
<br />
|
||||
<slot name="named" str="str"></slot>
|
||||
<br />
|
||||
<slot name="vbind" v-bind="{ num: 123, str: 'str' }"></slot>
|
||||
</template>
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/web-components",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook web-components renderer",
|
||||
"keywords": [
|
||||
"lit",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/blocks",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Storybook Doc Blocks",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/components",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Core Storybook Components",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@storybook/manager",
|
||||
"version": "8.1.0-beta.1",
|
||||
"version": "8.1.0",
|
||||
"description": "Core Storybook UI",
|
||||
"keywords": [
|
||||
"storybook"
|
||||
|
119
code/yarn.lock
119
code/yarn.lock
@ -6975,7 +6975,7 @@ __metadata:
|
||||
magic-string: "npm:^0.30.0"
|
||||
typescript: "npm:^5.3.2"
|
||||
vite: "npm:^4.0.0"
|
||||
vue-component-meta: "npm:^1.8.27"
|
||||
vue-component-meta: "npm:^2.0.0"
|
||||
vue-docgen-api: "npm:^4.75.1"
|
||||
peerDependencies:
|
||||
"@storybook/core": "workspace:*"
|
||||
@ -8833,12 +8833,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@volar/language-core@npm:1.11.1, @volar/language-core@npm:~1.11.1":
|
||||
version: 1.11.1
|
||||
resolution: "@volar/language-core@npm:1.11.1"
|
||||
"@volar/language-core@npm:2.2.2, @volar/language-core@npm:~2.2.2":
|
||||
version: 2.2.2
|
||||
resolution: "@volar/language-core@npm:2.2.2"
|
||||
dependencies:
|
||||
"@volar/source-map": "npm:1.11.1"
|
||||
checksum: 10c0/92c4439e3a9ccc534c970031388c318740f6fa032283d03e136c6c8c0228f549c68a7c363af1a28252617a0dca6069e14028329ac906d5acf1912931d0cdcb69
|
||||
"@volar/source-map": "npm:2.2.2"
|
||||
checksum: 10c0/e921772ffbd21f16b6aa48f2ea1b118f8b04af2738bba59e1629de5521bc7b4f543252173dbb6136a98d302b5babab92191a4f07c4a47f553645802e89be833c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -8851,12 +8851,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@volar/source-map@npm:1.11.1, @volar/source-map@npm:~1.11.1":
|
||||
version: 1.11.1
|
||||
resolution: "@volar/source-map@npm:1.11.1"
|
||||
"@volar/source-map@npm:2.2.2":
|
||||
version: 2.2.2
|
||||
resolution: "@volar/source-map@npm:2.2.2"
|
||||
dependencies:
|
||||
muggle-string: "npm:^0.3.1"
|
||||
checksum: 10c0/0bfc639889802705f8036ea8b2052a95a4d691a68bc2b6744ba8b9d312d887393dd3278101180a5ee5304972899d493972a483afafd41e097968746c77d724cb
|
||||
muggle-string: "npm:^0.4.0"
|
||||
checksum: 10c0/c827d825f960c56e152fbe26d609f0cbab7ece301e1855f14e6716dc5ef198a732a37f2dfdf0914102c69bf8954d6d79b663d363072e8b01beeaa7f169e477c2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -8869,13 +8869,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@volar/typescript@npm:~1.11.1":
|
||||
version: 1.11.1
|
||||
resolution: "@volar/typescript@npm:1.11.1"
|
||||
"@volar/typescript@npm:~2.2.2":
|
||||
version: 2.2.2
|
||||
resolution: "@volar/typescript@npm:2.2.2"
|
||||
dependencies:
|
||||
"@volar/language-core": "npm:1.11.1"
|
||||
"@volar/language-core": "npm:2.2.2"
|
||||
path-browserify: "npm:^1.0.1"
|
||||
checksum: 10c0/86fe153db3a14d8eb3632784a1d7fcbfbfb51fa5517c3878bfdd49ee8d15a83b1a09f9c589454b7396454c104d3a8e2db3a987dc99b37c33816772fc3e292bf2
|
||||
checksum: 10c0/3f558e6ecd2cd7cfbd37bc6bf83f20db6cd33f5ad05c6ad2c4fe6c2e98e3148f8253ff2ce64890ad23c3cbb19135ee5c539b240742d2507d7dc749b0eecbc6fc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -8904,7 +8904,20 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/compiler-core@npm:3.4.5, @vue/compiler-core@npm:^3.0.0":
|
||||
"@vue/compiler-core@npm:3.4.27, @vue/compiler-core@npm:^3.0.0":
|
||||
version: 3.4.27
|
||||
resolution: "@vue/compiler-core@npm:3.4.27"
|
||||
dependencies:
|
||||
"@babel/parser": "npm:^7.24.4"
|
||||
"@vue/shared": "npm:3.4.27"
|
||||
entities: "npm:^4.5.0"
|
||||
estree-walker: "npm:^2.0.2"
|
||||
source-map-js: "npm:^1.2.0"
|
||||
checksum: 10c0/fbc9a4a6c467fa47609df3337c1b2012a55e3b07adbffc45a31435237ec1169d0a4ece22f3538607364427b779ce04154b86a0e8dd40d3bd4aa03358d4db136d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/compiler-core@npm:3.4.5":
|
||||
version: 3.4.5
|
||||
resolution: "@vue/compiler-core@npm:3.4.5"
|
||||
dependencies:
|
||||
@ -8937,7 +8950,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/compiler-dom@npm:3.4.5, @vue/compiler-dom@npm:^3.2.0, @vue/compiler-dom@npm:^3.3.0":
|
||||
"@vue/compiler-dom@npm:3.4.5":
|
||||
version: 3.4.5
|
||||
resolution: "@vue/compiler-dom@npm:3.4.5"
|
||||
dependencies:
|
||||
@ -8947,6 +8960,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/compiler-dom@npm:^3.2.0, @vue/compiler-dom@npm:^3.3.0, @vue/compiler-dom@npm:^3.4.0":
|
||||
version: 3.4.27
|
||||
resolution: "@vue/compiler-dom@npm:3.4.27"
|
||||
dependencies:
|
||||
"@vue/compiler-core": "npm:3.4.27"
|
||||
"@vue/shared": "npm:3.4.27"
|
||||
checksum: 10c0/ceb8aef314b6b7df1ab6cd3c7c1290e5b60363a6092bbffc3ee6aca42f6f5247a070b0dcbe71530751e840d01beec00a6268e3663abcf4a6ac297a32bfb90e49
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/compiler-sfc@npm:3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "@vue/compiler-sfc@npm:3.0.0"
|
||||
@ -9059,17 +9082,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/language-core@npm:1.8.27":
|
||||
version: 1.8.27
|
||||
resolution: "@vue/language-core@npm:1.8.27"
|
||||
"@vue/language-core@npm:2.0.17":
|
||||
version: 2.0.17
|
||||
resolution: "@vue/language-core@npm:2.0.17"
|
||||
dependencies:
|
||||
"@volar/language-core": "npm:~1.11.1"
|
||||
"@volar/source-map": "npm:~1.11.1"
|
||||
"@vue/compiler-dom": "npm:^3.3.0"
|
||||
"@vue/shared": "npm:^3.3.0"
|
||||
"@volar/language-core": "npm:~2.2.2"
|
||||
"@vue/compiler-dom": "npm:^3.4.0"
|
||||
"@vue/shared": "npm:^3.4.0"
|
||||
computeds: "npm:^0.0.1"
|
||||
minimatch: "npm:^9.0.3"
|
||||
muggle-string: "npm:^0.3.1"
|
||||
path-browserify: "npm:^1.0.1"
|
||||
vue-template-compiler: "npm:^2.7.14"
|
||||
peerDependencies:
|
||||
@ -9077,7 +9098,7 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: 10c0/2018214d8ce2643d19e8e84eddaeacddca28b2980984d7916d97f97556c3716be184cf9f8c4f506d072a11f265401e3bc0391117cf7cfcc1e4a25048f4432dc7
|
||||
checksum: 10c0/fd040d1c7c3c52b88ed607f467beb86ac65b716918c32e1c995017deb00daf4636e616a9a63e8dce23699718bf0011e2327a5873c1ec638dab8e9a7760d70e8c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -9180,7 +9201,14 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/shared@npm:3.4.5, @vue/shared@npm:^3.3.0":
|
||||
"@vue/shared@npm:3.4.27, @vue/shared@npm:^3.3.0, @vue/shared@npm:^3.4.0":
|
||||
version: 3.4.27
|
||||
resolution: "@vue/shared@npm:3.4.27"
|
||||
checksum: 10c0/4a21918858270bcc654bb94b3429d9acbe95af097ea3063e192b36bd502dc896ca47778fa74a863b01f677ec271b189eb90f8b372943c10e52725a6bdc7f6cd5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@vue/shared@npm:3.4.5":
|
||||
version: 3.4.5
|
||||
resolution: "@vue/shared@npm:3.4.5"
|
||||
checksum: 10c0/4bd4f6a6369ab02b8a01ac3b93fb5d580d3ea0e9781dd2be8ab676b50521733acbc85fac6b48bc9cd3704dc9237d6365148d287da51c07e1d0568d6c0f7742a1
|
||||
@ -21132,6 +21160,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"muggle-string@npm:^0.4.0":
|
||||
version: 0.4.1
|
||||
resolution: "muggle-string@npm:0.4.1"
|
||||
checksum: 10c0/e914b63e24cd23f97e18376ec47e4ba3aa24365e4776212b666add2e47bb158003212980d732c49abf3719568900af7861873844a6e2d3a7ca7e86952c0e99e9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"multicast-dns@npm:^7.2.5":
|
||||
version: 7.2.5
|
||||
resolution: "multicast-dns@npm:7.2.5"
|
||||
@ -28975,27 +29010,20 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"vue-component-meta@npm:^1.8.27":
|
||||
version: 1.8.27
|
||||
resolution: "vue-component-meta@npm:1.8.27"
|
||||
"vue-component-meta@npm:^2.0.0":
|
||||
version: 2.0.17
|
||||
resolution: "vue-component-meta@npm:2.0.17"
|
||||
dependencies:
|
||||
"@volar/typescript": "npm:~1.11.1"
|
||||
"@vue/language-core": "npm:1.8.27"
|
||||
"@volar/typescript": "npm:~2.2.2"
|
||||
"@vue/language-core": "npm:2.0.17"
|
||||
path-browserify: "npm:^1.0.1"
|
||||
vue-component-type-helpers: "npm:1.8.27"
|
||||
vue-component-type-helpers: "npm:2.0.17"
|
||||
peerDependencies:
|
||||
typescript: "*"
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
checksum: 10c0/40884b316940e6995a6e7f9e5cbe5536b5c6e380acfd5b1d24914511972a241550c04474f4fffdf6305b1c9962b1137b5fd6183dc309127d3a268fe7d8d85df9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"vue-component-type-helpers@npm:1.8.27":
|
||||
version: 1.8.27
|
||||
resolution: "vue-component-type-helpers@npm:1.8.27"
|
||||
checksum: 10c0/3403d70951e422162321e810f54f23f11ee5d2642631d2ca2cb1de18e5d35a0b7b05dd1f9bd02a0ae77dfa0b80751d826865d98f928ae6d6fbce9303406c9820
|
||||
checksum: 10c0/78d2932c9c21275fae76224a088248bcaa6b70b0d3b13a615b823a5243ab4fbefb6a0d8fde300892f88700bdbb7198e61a4ebbd649efc785a3a8589fd0d8dbff
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -29006,6 +29034,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"vue-component-type-helpers@npm:2.0.17":
|
||||
version: 2.0.17
|
||||
resolution: "vue-component-type-helpers@npm:2.0.17"
|
||||
checksum: 10c0/4c550eea579c5a045df1ee6394475b507631591de5d9f62e12a252221b7e67638287e1e9952f29186ea833074b4dcb0bd16cd753f10f990bf432bd10a56075b6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"vue-component-type-helpers@npm:latest":
|
||||
version: 1.8.15
|
||||
resolution: "vue-component-type-helpers@npm:1.8.15"
|
||||
|
@ -275,16 +275,37 @@ The definition above will generate the following controls:
|
||||
|
||||

|
||||
|
||||
### Limitations
|
||||
### Override the default configuration
|
||||
|
||||
`vue-component-meta` cannot currently reference types from an import alias. You will need to replace any aliased imports with relative ones, as in the example below. See [this issue](https://github.com/vuejs/language-tools/issues/3896) for more information.
|
||||
If you're working with a project that relies on [`tsconfig references`](https://www.typescriptlang.org/docs/handbook/project-references.html) to link to other existing configuration files (e.g. `tsconfig.app.json`, `tsconfig.node.json`), we recommend that you update your [`.storybook/main.js|ts`](../configure/index.md) configuration file and add the following:
|
||||
|
||||
```ts
|
||||
// YourComponent.ts
|
||||
import type { MyProps } from '@/types'; // ❌ Cannot be resolved
|
||||
import type { MyProps } from '../types'; // ✅ Can be resolved
|
||||
// .storybook/main.ts
|
||||
import type { StorybookConfig } from '@storybook/vue3-vite';
|
||||
|
||||
const config: StorybookConfig = {
|
||||
framework: {
|
||||
name: '@storybook/vue3-vite',
|
||||
options: {
|
||||
docgen: {
|
||||
plugin: 'vue-component-meta',
|
||||
tsconfig: 'tsconfig.app.json',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
```
|
||||
|
||||
<Callout variant="info">
|
||||
|
||||
This is not a limitation of Storybook, but instead how `vue-component-meta` works. For more information, refer to the appropriate [GitHub issue](https://github.com/vuejs/language-tools/issues/3896).
|
||||
|
||||
</Callout>
|
||||
|
||||
Otherwise, you might face missing component types/descriptions or unresolvable import aliases like `@/some/import`.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Storybook doesn't work with my Vue 2 project
|
||||
|
@ -1 +1 @@
|
||||
{"version":"7.5.0","info":{"plain":"- 💃🏼 Now supports Lit 3.0 and Vite 5 \n- 👻 storiesOf and storyStoreV6 officially deprecated \n- 🔨 Fix Webpack5 build errors not being propagated \n- 🀄 Support rename font import for Next.js \n- ⬆️ Upgrade react-docgen to 6.0.x and improve argTypes \n- ✨ Many Angular improvements such as introducing argsToTemplate , new schema debugging options, support for standalone directives, etc."}}
|
||||
{"version":"8.1.0","info":{"plain":"- Automigration: Improve react-docgen automigration prompt - [#27106](https://github.com/storybookjs/storybook/pull/27106), thanks @valentinpalkovic!\n- Typescript: Add types for `experimental-playwright` entries without `type:bundler` - [#27107](https://github.com/storybookjs/storybook/pull/27107), thanks @ndelangen!"}}
|
||||
|
@ -126,8 +126,10 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
|
||||
platform: 'neutral',
|
||||
external: [...commonExternals, ...globalManagerPackages, ...globalPreviewPackages],
|
||||
esbuildOptions: (options) => {
|
||||
/* eslint-disable no-param-reassign */
|
||||
options.platform = 'neutral';
|
||||
Object.assign(options, getESBuildOptions(optimized));
|
||||
/* eslint-enable no-param-reassign */
|
||||
},
|
||||
})
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user