@storybook/vue3 7.0.0-alpha.0 → 7.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-RTVU4EG4.mjs +4 -0
- package/dist/config.d.ts +23 -0
- package/dist/config.js +4 -0
- package/dist/config.mjs +1 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.js +4 -0
- package/dist/index.mjs +1 -0
- package/dist/render-ea26216d.d.ts +23 -0
- package/package.json +37 -11
- package/preview.js +1 -1
- package/dist/cjs/config.js +0 -44
- package/dist/cjs/docs/config.js +0 -24
- package/dist/cjs/docs/extractArgTypes.js +0 -62
- package/dist/cjs/docs/prepareForInline.js +0 -61
- package/dist/cjs/index.js +0 -104
- package/dist/cjs/preview/config.js +0 -33
- package/dist/cjs/preview/decorateStory.js +0 -75
- package/dist/cjs/preview/globals.js +0 -9
- package/dist/cjs/preview/index.js +0 -62
- package/dist/cjs/preview/render.js +0 -82
- package/dist/cjs/preview/types-6-0.js +0 -5
- package/dist/cjs/preview/types-7-0.js +0 -5
- package/dist/cjs/preview/types.js +0 -5
- package/dist/esm/config.js +0 -6
- package/dist/esm/docs/config.js +0 -12
- package/dist/esm/docs/extractArgTypes.js +0 -42
- package/dist/esm/docs/prepareForInline.js +0 -22
- package/dist/esm/index.js +0 -4
- package/dist/esm/preview/config.js +0 -5
- package/dist/esm/preview/decorateStory.js +0 -58
- package/dist/esm/preview/globals.js +0 -6
- package/dist/esm/preview/index.js +0 -38
- package/dist/esm/preview/render.js +0 -60
- package/dist/esm/preview/types-6-0.js +0 -1
- package/dist/esm/preview/types-7-0.js +0 -1
- package/dist/esm/preview/types.js +0 -1
- package/dist/types/config.d.ts +0 -11
- package/dist/types/docs/config.d.ts +0 -10
- package/dist/types/docs/extractArgTypes.d.ts +0 -2
- package/dist/types/docs/prepareForInline.d.ts +0 -4
- package/dist/types/index.d.ts +0 -2
- package/dist/types/preview/config.d.ts +0 -5
- package/dist/types/preview/decorateStory.d.ts +0 -3
- package/dist/types/preview/globals.d.ts +0 -1
- package/dist/types/preview/index.d.ts +0 -31
- package/dist/types/preview/render.d.ts +0 -7
- package/dist/types/preview/types-6-0.d.ts +0 -35
- package/dist/types/preview/types-7-0.d.ts +0 -9
- package/dist/types/preview/types.d.ts +0 -15
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var d=Object.defineProperty;var p=(t,r)=>d(t,"name",{value:r,configurable:!0});import{h}from"vue";import{sanitizeStoryContextUpdate as g}from"@storybook/store";function x(t){return typeof t=="function"?{render:t,name:t.name}:t}p(x,"normalizeFunctionalComponent");function f(t,r){let e=t;return e==null?null:r?{...x(e),components:{...e.components||{},story:r}}:{render(){return h(e)}}}p(f,"prepare");function b(t,r){return r.reduce((e,u)=>i=>{let n,o=u(m=>(n=e({...i,...g(m)}),n),i);return n||(n=e(i)),o===n?n:f(o,n)},e=>f(t(e)))}p(b,"decorateStory");import{dedent as w}from"ts-dedent";import{createApp as C,h as a}from"vue";var F=p((t,r)=>{let{id:e,component:u}=r;if(!u)throw new Error(`Unable to render story ${e} as the component annotation is missing from the default export`);return a(u,t)},"render"),y=p(t=>{},"setupFunction"),S=p(t=>{y=t},"setup"),s=new Map;function V({title:t,name:r,storyFn:e,showMain:u,showError:i,showException:n},o){let m,c=C({unmounted(){s.delete(o)},render(){return s.set(o,c),y(c),a(m)}});if(c.config.errorHandler=n,m=e(),!m){i({title:`Expecting a Vue component from the story: "${r}" of "${t}".`,description:w`
|
|
2
|
+
Did you forget to return the Vue component from the story?
|
|
3
|
+
Use "() => ({ template: '<my-comp></my-comp>' })" or "() => ({ components: MyComp, template: '<my-comp></my-comp>' })" when defining the story.
|
|
4
|
+
`});return}u(),s.has(o)&&s.get(o).unmount(o),c.mount(o)}p(V,"renderToDOM");export{p as a,b,F as c,S as d,V as e};
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as lib_docs_tools_dist_types from 'lib/docs-tools/dist/types';
|
|
2
|
+
import * as lib_addons_dist_types from 'lib/addons/dist/types';
|
|
3
|
+
import * as _storybook_csf from '@storybook/csf';
|
|
4
|
+
import { LegacyStoryFn, DecoratorFunction } from '@storybook/csf';
|
|
5
|
+
import { V as VueFramework } from './render-ea26216d.js';
|
|
6
|
+
export { r as render, a as renderToDOM } from './render-ea26216d.js';
|
|
7
|
+
import '@storybook/store';
|
|
8
|
+
import 'vue';
|
|
9
|
+
|
|
10
|
+
declare const argTypesEnhancers: (<TFramework extends _storybook_csf.AnyFramework>(context: _storybook_csf.StoryContextForEnhancers<TFramework, _storybook_csf.Args>) => _storybook_csf.StrictArgTypes<_storybook_csf.Args> | lib_addons_dist_types.Parameters)[];
|
|
11
|
+
|
|
12
|
+
declare function decorateStory(storyFn: LegacyStoryFn<VueFramework>, decorators: DecoratorFunction<VueFramework>[]): LegacyStoryFn<VueFramework>;
|
|
13
|
+
|
|
14
|
+
declare const parameters: {
|
|
15
|
+
docs: {
|
|
16
|
+
inlineStories: boolean;
|
|
17
|
+
extractArgTypes: lib_docs_tools_dist_types.ArgTypesExtractor;
|
|
18
|
+
extractComponentDescription: typeof lib_docs_tools_dist_types.extractComponentDescription;
|
|
19
|
+
};
|
|
20
|
+
framework: "vue3";
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { decorateStory as applyDecorators, argTypesEnhancers, parameters };
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var f=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var $=Object.prototype.hasOwnProperty;var a=(r,e)=>f(r,"name",{value:e,configurable:!0});var k=(r,e)=>{for(var t in e)f(r,t,{get:e[t],enumerable:!0})},z=(r,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of U(e))!$.call(r,o)&&o!==t&&f(r,o,{get:()=>e[o],enumerable:!(s=O(e,o))||s.enumerable});return r};var E=r=>z(f({},"__esModule",{value:!0}),r);var I={};k(I,{applyDecorators:()=>A,argTypesEnhancers:()=>x,parameters:()=>H,render:()=>T,renderToDOM:()=>C});module.exports=E(I);var y=require("@storybook/docs-tools");var u=require("@storybook/docs-tools"),F=["props","events","slots","methods"],l=a(r=>{if(!(0,u.hasDocgen)(r))return null;let e={};return F.forEach(t=>{(0,u.extractComponentProps)(r,t).forEach(({propDef:o,docgenInfo:n,jsDocTags:p})=>{let{name:c,type:m,description:b,defaultValue:v,required:M}=o,V=t==="props"?(0,u.convert)(n):{name:"void"};e[c]={name:c,description:b,type:{required:M,...V},table:{type:m,jsDocTags:p,defaultValue:v,category:t}}})}),e},"extractArgTypes");var h={docs:{inlineStories:!0,extractArgTypes:l,extractComponentDescription:y.extractComponentDescription}},x=[y.enhanceArgTypes];var g=require("ts-dedent"),i=require("vue"),T=a((r,e)=>{let{id:t,component:s}=e;if(!s)throw new Error(`Unable to render story ${t} as the component annotation is missing from the default export`);return(0,i.h)(s,r)},"render"),P=a(r=>{},"setupFunction");var d=new Map;function C({title:r,name:e,storyFn:t,showMain:s,showError:o,showException:n},p){let c,m=(0,i.createApp)({unmounted(){d.delete(p)},render(){return d.set(p,m),P(m),(0,i.h)(c)}});if(m.config.errorHandler=n,c=t(),!c){o({title:`Expecting a Vue component from the story: "${e}" of "${r}".`,description:g.dedent`
|
|
2
|
+
Did you forget to return the Vue component from the story?
|
|
3
|
+
Use "() => ({ template: '<my-comp></my-comp>' })" or "() => ({ components: MyComp, template: '<my-comp></my-comp>' })" when defining the story.
|
|
4
|
+
`});return}s(),d.has(p)&&d.get(p).unmount(p),m.mount(p)}a(C,"renderToDOM");var D=require("vue"),w=require("@storybook/store");function q(r){return typeof r=="function"?{render:r,name:r.name}:r}a(q,"normalizeFunctionalComponent");function S(r,e){let t=r;return t==null?null:e?{...q(t),components:{...t.components||{},story:e}}:{render(){return(0,D.h)(t)}}}a(S,"prepare");function A(r,e){return e.reduce((t,s)=>o=>{let n,p=s(c=>(n=t({...o,...(0,w.sanitizeStoryContextUpdate)(c)}),n),o);return n||(n=t(o)),p===n?n:S(p,n)},t=>S(r(t)))}a(A,"decorateStory");var H={framework:"vue3",...h};0&&(module.exports={applyDecorators,argTypesEnhancers,parameters,render,renderToDOM});
|
package/dist/config.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s,b as x,c as T,e as g}from"./chunk-RTVU4EG4.mjs";import{extractComponentDescription as D,enhanceArgTypes as A}from"@storybook/docs-tools";import{hasDocgen as h,extractComponentProps as E,convert as S}from"@storybook/docs-tools";var v=["props","events","slots","methods"],p=s(e=>{if(!h(e))return null;let o={};return v.forEach(r=>{E(e,r).forEach(({propDef:c,docgenInfo:m,jsDocTags:f})=>{let{name:t,type:u,description:d,defaultValue:i,required:l}=c,y=r==="props"?S(m):{name:"void"};o[t]={name:t,description:d,type:{required:l,...y},table:{type:u,jsDocTags:f,defaultValue:i,category:r}}})}),o},"extractArgTypes");var n={docs:{inlineStories:!0,extractArgTypes:p,extractComponentDescription:D}},C=[A];var I={framework:"vue3",...n};export{x as applyDecorators,C as argTypesEnhancers,I as parameters,T as render,g as renderToDOM};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as lib_store_dist_types from 'lib/store/dist/types';
|
|
2
|
+
import * as lib_client_api_dist_types_ClientApi from 'lib/client-api/dist/types/ClientApi';
|
|
3
|
+
import * as _storybook_csf from '@storybook/csf';
|
|
4
|
+
import { Args, ComponentAnnotations, AnnotatedStoryFn, StoryAnnotations } from '@storybook/csf';
|
|
5
|
+
export { ArgTypes, Args, Parameters, StoryContext } from '@storybook/csf';
|
|
6
|
+
import * as _storybook_addons from '@storybook/addons';
|
|
7
|
+
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
8
|
+
import { App } from 'vue';
|
|
9
|
+
import { V as VueFramework, I as IStorybookSection } from './render-ea26216d.js';
|
|
10
|
+
export { s as setup } from './render-ea26216d.js';
|
|
11
|
+
import '@storybook/store';
|
|
12
|
+
|
|
13
|
+
interface ClientApi extends ClientStoryApi<VueFramework['storyResult']> {
|
|
14
|
+
setAddon(addon: any): void;
|
|
15
|
+
configure(loader: Loadable, module: NodeModule): void;
|
|
16
|
+
getStorybook(): IStorybookSection[];
|
|
17
|
+
clearDecorators(): void;
|
|
18
|
+
forceReRender(): void;
|
|
19
|
+
raw: () => any;
|
|
20
|
+
load: (...args: any[]) => void;
|
|
21
|
+
app: App;
|
|
22
|
+
}
|
|
23
|
+
declare const storiesOf: ClientApi['storiesOf'];
|
|
24
|
+
declare const configure: ClientApi['configure'];
|
|
25
|
+
declare const addDecorator: (() => never) | ((decorator: _storybook_csf.DecoratorFunction<VueFramework, _storybook_addons.Args>) => void);
|
|
26
|
+
declare const addParameters: (() => never) | (({ globals, globalTypes, ...parameters }: _storybook_csf.Parameters & {
|
|
27
|
+
globals?: _storybook_csf.Globals;
|
|
28
|
+
globalTypes?: _storybook_csf.GlobalTypes;
|
|
29
|
+
}) => void);
|
|
30
|
+
declare const clearDecorators: (() => never) | (() => void);
|
|
31
|
+
declare const setAddon: (() => never) | ((addon: any) => void);
|
|
32
|
+
declare const forceReRender: (() => never) | (() => void);
|
|
33
|
+
declare const getStorybook: (() => never) | (() => lib_client_api_dist_types_ClientApi.GetStorybookKind<VueFramework>[]);
|
|
34
|
+
declare const raw: (() => never) | (() => lib_store_dist_types.BoundStory<VueFramework>[]);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Metadata to configure the stories for a component.
|
|
38
|
+
*
|
|
39
|
+
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
|
|
40
|
+
*/
|
|
41
|
+
declare type Meta<TArgs = Args> = ComponentAnnotations<VueFramework, TArgs>;
|
|
42
|
+
/**
|
|
43
|
+
* Story function that represents a CSFv2 component example.
|
|
44
|
+
*
|
|
45
|
+
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
46
|
+
*/
|
|
47
|
+
declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<VueFramework, TArgs>;
|
|
48
|
+
/**
|
|
49
|
+
* Story function that represents a CSFv3 component example.
|
|
50
|
+
*
|
|
51
|
+
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
52
|
+
*/
|
|
53
|
+
declare type StoryObj<TArgs = Args> = StoryAnnotations<VueFramework, TArgs>;
|
|
54
|
+
/**
|
|
55
|
+
* Story function that represents a CSFv3 component example.
|
|
56
|
+
*
|
|
57
|
+
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
58
|
+
*/
|
|
59
|
+
declare type Story<TArgs = Args> = StoryObj<TArgs>;
|
|
60
|
+
|
|
61
|
+
export { Meta, Story, StoryFn, StoryObj, addDecorator, addParameters, clearDecorators, configure, forceReRender, getStorybook, raw, setAddon, storiesOf };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var k=Object.create;var u=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var r=(t,e)=>u(t,"name",{value:e,configurable:!0});var _=(t,e)=>{for(var o in e)u(t,o,{get:e[o],enumerable:!0})},l=(t,e,o,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of K(e))!V.call(t,n)&&n!==o&&u(t,n,{get:()=>e[n],enumerable:!(p=F(e,n))||p.enumerable});return t};var $=(t,e,o)=>(o=t!=null?k(U(t)):{},l(e||!t||!t.__esModule?u(o,"default",{value:t,enumerable:!0}):o,t)),v=t=>l(u({},"__esModule",{value:!0}),t);var q={};_(q,{addDecorator:()=>W,addParameters:()=>Y,clearDecorators:()=>E,configure:()=>P,forceReRender:()=>L,getStorybook:()=>N,raw:()=>j,setAddon:()=>H,setup:()=>C,storiesOf:()=>B});module.exports=v(q);var y=$(require("global")),{window:x}=y.default;x.STORYBOOK_REACT_CLASSES={};x.STORYBOOK_ENV="vue3";var D=require("@storybook/core-client");var h=require("vue"),g=require("@storybook/store");function z(t){return typeof t=="function"?{render:t,name:t.name}:t}r(z,"normalizeFunctionalComponent");function A(t,e){let o=t;return o==null?null:e?{...z(o),components:{...o.components||{},story:e}}:{render(){return(0,h.h)(o)}}}r(A,"prepare");function O(t,e){return e.reduce((o,p)=>n=>{let i,c=p(m=>(i=o({...n,...(0,g.sanitizeStoryContextUpdate)(m)}),i),n);return i||(i=o(n)),c===i?i:A(c,i)},o=>A(t(o)))}r(O,"decorateStory");var w=require("ts-dedent"),a=require("vue"),S=r((t,e)=>{let{id:o,component:p}=e;if(!p)throw new Error(`Unable to render story ${o} as the component annotation is missing from the default export`);return(0,a.h)(p,t)},"render"),R=r(t=>{},"setupFunction"),C=r(t=>{R=t},"setup"),d=new Map;function b({title:t,name:e,storyFn:o,showMain:p,showError:n,showException:i},c){let m,f=(0,a.createApp)({unmounted(){d.delete(c)},render(){return d.set(c,f),R(f),(0,a.h)(m)}});if(f.config.errorHandler=i,m=o(),!m){n({title:`Expecting a Vue component from the story: "${e}" of "${t}".`,description:w.dedent`
|
|
2
|
+
Did you forget to return the Vue component from the story?
|
|
3
|
+
Use "() => ({ template: '<my-comp></my-comp>' })" or "() => ({ components: MyComp, template: '<my-comp></my-comp>' })" when defining the story.
|
|
4
|
+
`});return}p(),d.has(c)&&d.get(c).unmount(c),f.mount(c)}r(b,"renderToDOM");var M="vue3",s=(0,D.start)(b,{decorateStory:O,render:S}),B=r((t,e)=>s.clientApi.storiesOf(t,e).addParameters({framework:M}),"storiesOf"),P=r((...t)=>s.configure(M,...t),"configure"),{addDecorator:W}=s.clientApi,{addParameters:Y}=s.clientApi,{clearDecorators:E}=s.clientApi,{setAddon:H}=s.clientApi,{forceReRender:L}=s,{getStorybook:N}=s.clientApi,{raw:j}=s.clientApi;var T;(T=module==null?void 0:module.hot)==null||T.decline();0&&(module.exports={addDecorator,addParameters,clearDecorators,configure,forceReRender,getStorybook,raw,setAddon,setup,storiesOf});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,b as n,c,d,e as i}from"./chunk-RTVU4EG4.mjs";import m from"global";var{window:p}=m;p.STORYBOOK_REACT_CLASSES={};p.STORYBOOK_ENV="vue3";import{start as l}from"@storybook/core-client";var s="vue3",o=l(i,{decorateStory:n,render:c}),u=t((r,a)=>o.clientApi.storiesOf(r,a).addParameters({framework:s}),"storiesOf"),R=t((...r)=>o.configure(s,...r),"configure"),{addDecorator:S}=o.clientApi,{addParameters:g}=o.clientApi,{clearDecorators:w}=o.clientApi,{setAddon:E}=o.clientApi,{forceReRender:T}=o,{getStorybook:b}=o.clientApi,{raw:D}=o.clientApi;module?.hot?.decline();export{S as addDecorator,g as addParameters,w as clearDecorators,R as configure,T as forceReRender,b as getStorybook,D as raw,E as setAddon,d as setup,u as storiesOf};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { RenderContext } from '@storybook/store';
|
|
2
|
+
import { ArgsStoryFn } from '@storybook/csf';
|
|
3
|
+
import { ConcreteComponent } from 'vue';
|
|
4
|
+
|
|
5
|
+
declare type StoryFnVueReturnType = ConcreteComponent<any>;
|
|
6
|
+
interface IStorybookStory {
|
|
7
|
+
name: string;
|
|
8
|
+
render: (context: any) => any;
|
|
9
|
+
}
|
|
10
|
+
interface IStorybookSection {
|
|
11
|
+
kind: string;
|
|
12
|
+
stories: IStorybookStory[];
|
|
13
|
+
}
|
|
14
|
+
declare type VueFramework = {
|
|
15
|
+
component: ConcreteComponent<any>;
|
|
16
|
+
storyResult: StoryFnVueReturnType;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
declare const render: ArgsStoryFn<VueFramework>;
|
|
20
|
+
declare const setup: (fn: (app: any) => void) => void;
|
|
21
|
+
declare function renderToDOM({ title, name, storyFn, showMain, showError, showException }: RenderContext<VueFramework>, domElement: Element): void;
|
|
22
|
+
|
|
23
|
+
export { IStorybookSection as I, VueFramework as V, renderToDOM as a, render as r, setup as s };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/vue3",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.11",
|
|
4
4
|
"description": "Storybook Vue 3 renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -19,9 +19,26 @@
|
|
|
19
19
|
"url": "https://opencollective.com/storybook"
|
|
20
20
|
},
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"require": "./dist/index.js",
|
|
25
|
+
"import": "./dist/index.mjs",
|
|
26
|
+
"types": "./dist/index.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"./preview": {
|
|
29
|
+
"require": "./dist/config.js",
|
|
30
|
+
"import": "./dist/config.mjs",
|
|
31
|
+
"types": "./dist/config.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./package.json": {
|
|
34
|
+
"require": "./package.json",
|
|
35
|
+
"import": "./package.json",
|
|
36
|
+
"types": "./package.json"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"main": "dist/index.js",
|
|
40
|
+
"module": "dist/index.mjs",
|
|
41
|
+
"types": "dist/index.d.ts",
|
|
25
42
|
"files": [
|
|
26
43
|
"bin/**/*",
|
|
27
44
|
"dist/**/*",
|
|
@@ -30,22 +47,24 @@
|
|
|
30
47
|
"*.d.ts"
|
|
31
48
|
],
|
|
32
49
|
"scripts": {
|
|
33
|
-
"
|
|
50
|
+
"check": "tsc --noEmit",
|
|
51
|
+
"prepare": "esrun ../../scripts/prepare/bundle.ts"
|
|
34
52
|
},
|
|
35
53
|
"dependencies": {
|
|
36
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
37
|
-
"@storybook/core-client": "7.0.0-alpha.
|
|
54
|
+
"@storybook/addons": "7.0.0-alpha.11",
|
|
55
|
+
"@storybook/core-client": "7.0.0-alpha.11",
|
|
38
56
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
39
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
40
|
-
"@storybook/store": "7.0.0-alpha.
|
|
57
|
+
"@storybook/docs-tools": "7.0.0-alpha.11",
|
|
58
|
+
"@storybook/store": "7.0.0-alpha.11",
|
|
41
59
|
"core-js": "^3.8.2",
|
|
42
60
|
"global": "^4.4.0",
|
|
43
61
|
"react": "16.14.0",
|
|
44
62
|
"react-dom": "16.14.0",
|
|
45
|
-
"regenerator-runtime": "^0.13.7",
|
|
46
63
|
"ts-dedent": "^2.0.0"
|
|
47
64
|
},
|
|
48
65
|
"devDependencies": {
|
|
66
|
+
"@digitak/esrun": "^3.2.2",
|
|
67
|
+
"typescript": "~4.6.3",
|
|
49
68
|
"vue": "3.0.0"
|
|
50
69
|
},
|
|
51
70
|
"peerDependencies": {
|
|
@@ -59,5 +78,12 @@
|
|
|
59
78
|
"publishConfig": {
|
|
60
79
|
"access": "public"
|
|
61
80
|
},
|
|
62
|
-
"
|
|
81
|
+
"bundler": {
|
|
82
|
+
"entries": [
|
|
83
|
+
"./src/index.ts",
|
|
84
|
+
"./src/config.ts"
|
|
85
|
+
],
|
|
86
|
+
"platform": "browser"
|
|
87
|
+
},
|
|
88
|
+
"gitHead": "688d338903e84a7e83cb104472e868e734399f65"
|
|
63
89
|
}
|
package/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/
|
|
1
|
+
export * from './dist/config';
|
package/dist/cjs/config.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.to-string.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.object.keys.js");
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10
|
-
value: true
|
|
11
|
-
});
|
|
12
|
-
var _exportNames = {
|
|
13
|
-
parameters: true,
|
|
14
|
-
argTypesEnhancers: true
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "argTypesEnhancers", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function get() {
|
|
19
|
-
return _config.argTypesEnhancers;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
exports.parameters = void 0;
|
|
23
|
-
|
|
24
|
-
require("core-js/modules/es.object.assign.js");
|
|
25
|
-
|
|
26
|
-
var _config = require("./docs/config");
|
|
27
|
-
|
|
28
|
-
var _config2 = require("./preview/config");
|
|
29
|
-
|
|
30
|
-
Object.keys(_config2).forEach(function (key) {
|
|
31
|
-
if (key === "default" || key === "__esModule") return;
|
|
32
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
33
|
-
if (key in exports && exports[key] === _config2[key]) return;
|
|
34
|
-
Object.defineProperty(exports, key, {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function get() {
|
|
37
|
-
return _config2[key];
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
var parameters = Object.assign({
|
|
42
|
-
framework: 'vue3'
|
|
43
|
-
}, _config.parameters);
|
|
44
|
-
exports.parameters = parameters;
|
package/dist/cjs/docs/config.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.parameters = exports.argTypesEnhancers = void 0;
|
|
7
|
-
|
|
8
|
-
var _docsTools = require("@storybook/docs-tools");
|
|
9
|
-
|
|
10
|
-
var _extractArgTypes = require("./extractArgTypes");
|
|
11
|
-
|
|
12
|
-
var _prepareForInline = require("./prepareForInline");
|
|
13
|
-
|
|
14
|
-
var parameters = {
|
|
15
|
-
docs: {
|
|
16
|
-
inlineStories: true,
|
|
17
|
-
prepareForInline: _prepareForInline.prepareForInline,
|
|
18
|
-
extractArgTypes: _extractArgTypes.extractArgTypes,
|
|
19
|
-
extractComponentDescription: _docsTools.extractComponentDescription
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.parameters = parameters;
|
|
23
|
-
var argTypesEnhancers = [_docsTools.enhanceArgTypes];
|
|
24
|
-
exports.argTypesEnhancers = argTypesEnhancers;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.extractArgTypes = void 0;
|
|
7
|
-
|
|
8
|
-
require("core-js/modules/es.object.to-string.js");
|
|
9
|
-
|
|
10
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.function.name.js");
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.symbol.js");
|
|
15
|
-
|
|
16
|
-
require("core-js/modules/es.symbol.description.js");
|
|
17
|
-
|
|
18
|
-
require("core-js/modules/es.object.assign.js");
|
|
19
|
-
|
|
20
|
-
var _docsTools = require("@storybook/docs-tools");
|
|
21
|
-
|
|
22
|
-
var SECTIONS = ['props', 'events', 'slots'];
|
|
23
|
-
|
|
24
|
-
var extractArgTypes = function extractArgTypes(component) {
|
|
25
|
-
if (!(0, _docsTools.hasDocgen)(component)) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var results = {};
|
|
30
|
-
SECTIONS.forEach(function (section) {
|
|
31
|
-
var props = (0, _docsTools.extractComponentProps)(component, section);
|
|
32
|
-
props.forEach(function (_ref) {
|
|
33
|
-
var propDef = _ref.propDef,
|
|
34
|
-
docgenInfo = _ref.docgenInfo,
|
|
35
|
-
jsDocTags = _ref.jsDocTags;
|
|
36
|
-
var name = propDef.name,
|
|
37
|
-
type = propDef.type,
|
|
38
|
-
description = propDef.description,
|
|
39
|
-
defaultSummary = propDef.defaultValue,
|
|
40
|
-
required = propDef.required;
|
|
41
|
-
var sbType = section === 'props' ? (0, _docsTools.convert)(docgenInfo) : {
|
|
42
|
-
name: 'void'
|
|
43
|
-
};
|
|
44
|
-
results[name] = {
|
|
45
|
-
name: name,
|
|
46
|
-
description: description,
|
|
47
|
-
type: Object.assign({
|
|
48
|
-
required: required
|
|
49
|
-
}, sbType),
|
|
50
|
-
table: {
|
|
51
|
-
type: type,
|
|
52
|
-
jsDocTags: jsDocTags,
|
|
53
|
-
defaultValue: defaultSummary,
|
|
54
|
-
category: section
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
return results;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
exports.extractArgTypes = extractArgTypes;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.object.to-string.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.string.iterator.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/es.weak-map.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/es.symbol.js");
|
|
18
|
-
|
|
19
|
-
require("core-js/modules/es.symbol.description.js");
|
|
20
|
-
|
|
21
|
-
require("core-js/modules/es.symbol.iterator.js");
|
|
22
|
-
|
|
23
|
-
Object.defineProperty(exports, "__esModule", {
|
|
24
|
-
value: true
|
|
25
|
-
});
|
|
26
|
-
exports.prepareForInline = void 0;
|
|
27
|
-
|
|
28
|
-
var _react = _interopRequireDefault(require("react"));
|
|
29
|
-
|
|
30
|
-
var Vue = _interopRequireWildcard(require("vue"));
|
|
31
|
-
|
|
32
|
-
var _index = require("../index");
|
|
33
|
-
|
|
34
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
|
-
|
|
36
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
-
|
|
38
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
|
-
|
|
40
|
-
// This is cast as `any` to workaround type errors caused by Vue 2 types
|
|
41
|
-
var _ref = Vue,
|
|
42
|
-
render = _ref.render,
|
|
43
|
-
h = _ref.h;
|
|
44
|
-
|
|
45
|
-
var prepareForInline = function prepareForInline(storyFn, _ref2) {
|
|
46
|
-
var args = _ref2.args;
|
|
47
|
-
var component = storyFn();
|
|
48
|
-
var vnode = h(component, args); // By attaching the app context from `@storybook/vue3` to the vnode
|
|
49
|
-
// like this, these stoeis are able to access any app config stuff
|
|
50
|
-
// the end-user set inside `.storybook/preview.js`
|
|
51
|
-
|
|
52
|
-
vnode.appContext = _index.app._context; // eslint-disable-line no-underscore-dangle
|
|
53
|
-
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement('div', {
|
|
55
|
-
ref: function ref(node) {
|
|
56
|
-
return node ? render(vnode, node) : null;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
exports.prepareForInline = prepareForInline;
|
package/dist/cjs/index.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.object.to-string.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/web.dom-collections.for-each.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.object.keys.js");
|
|
8
|
-
|
|
9
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10
|
-
value: true
|
|
11
|
-
});
|
|
12
|
-
var _exportNames = {
|
|
13
|
-
storiesOf: true,
|
|
14
|
-
setAddon: true,
|
|
15
|
-
addDecorator: true,
|
|
16
|
-
addParameters: true,
|
|
17
|
-
configure: true,
|
|
18
|
-
getStorybook: true,
|
|
19
|
-
forceReRender: true,
|
|
20
|
-
raw: true,
|
|
21
|
-
app: true,
|
|
22
|
-
activeStoryComponent: true
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "activeStoryComponent", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _preview.activeStoryComponent;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "addDecorator", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _preview.addDecorator;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "addParameters", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _preview.addParameters;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "app", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _preview.app;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "configure", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function get() {
|
|
51
|
-
return _preview.configure;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "forceReRender", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function get() {
|
|
57
|
-
return _preview.forceReRender;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "getStorybook", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function get() {
|
|
63
|
-
return _preview.getStorybook;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "raw", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function get() {
|
|
69
|
-
return _preview.raw;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "setAddon", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function get() {
|
|
75
|
-
return _preview.setAddon;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "storiesOf", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function get() {
|
|
81
|
-
return _preview.storiesOf;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
var _preview = require("./preview");
|
|
86
|
-
|
|
87
|
-
var _types = require("./preview/types-6-0");
|
|
88
|
-
|
|
89
|
-
Object.keys(_types).forEach(function (key) {
|
|
90
|
-
if (key === "default" || key === "__esModule") return;
|
|
91
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
92
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
93
|
-
Object.defineProperty(exports, key, {
|
|
94
|
-
enumerable: true,
|
|
95
|
-
get: function get() {
|
|
96
|
-
return _types[key];
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
var _module, _module$hot;
|
|
102
|
-
|
|
103
|
-
// optimization: stop HMR propagation in webpack
|
|
104
|
-
(_module = module) === null || _module === void 0 ? void 0 : (_module$hot = _module.hot) === null || _module$hot === void 0 ? void 0 : _module$hot.decline();
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "applyDecorators", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _decorateStory.decorateStory;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
exports.parameters = void 0;
|
|
13
|
-
Object.defineProperty(exports, "render", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function get() {
|
|
16
|
-
return _render.render;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "renderToDOM", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function get() {
|
|
22
|
-
return _render.renderToDOM;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
var _render = require("./render");
|
|
27
|
-
|
|
28
|
-
var _decorateStory = require("./decorateStory");
|
|
29
|
-
|
|
30
|
-
var parameters = {
|
|
31
|
-
framework: 'vue3'
|
|
32
|
-
};
|
|
33
|
-
exports.parameters = parameters;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.decorateStory = decorateStory;
|
|
7
|
-
|
|
8
|
-
require("core-js/modules/es.function.name.js");
|
|
9
|
-
|
|
10
|
-
require("core-js/modules/es.object.assign.js");
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.object.to-string.js");
|
|
13
|
-
|
|
14
|
-
var _vue = require("vue");
|
|
15
|
-
|
|
16
|
-
var _store = require("@storybook/store");
|
|
17
|
-
|
|
18
|
-
/*
|
|
19
|
-
This normalizes a functional component into a render method in ComponentOptions.
|
|
20
|
-
|
|
21
|
-
The concept is taken from Vue 3's `defineComponent` but changed from creating a `setup`
|
|
22
|
-
method on the ComponentOptions so end-users don't need to specify a "thunk" as a decorator.
|
|
23
|
-
*/
|
|
24
|
-
function normalizeFunctionalComponent(options) {
|
|
25
|
-
return typeof options === 'function' ? {
|
|
26
|
-
render: options,
|
|
27
|
-
name: options.name
|
|
28
|
-
} : options;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function prepare(rawStory, innerStory) {
|
|
32
|
-
var story = rawStory;
|
|
33
|
-
|
|
34
|
-
if (story == null) {
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (innerStory) {
|
|
39
|
-
return Object.assign({}, normalizeFunctionalComponent(story), {
|
|
40
|
-
components: Object.assign({}, story.components || {}, {
|
|
41
|
-
story: innerStory
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
render: function render() {
|
|
48
|
-
return (0, _vue.h)(story);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function decorateStory(storyFn, decorators) {
|
|
54
|
-
return decorators.reduce(function (decorated, decorator) {
|
|
55
|
-
return function (context) {
|
|
56
|
-
var story;
|
|
57
|
-
var decoratedStory = decorator(function (update) {
|
|
58
|
-
story = decorated(Object.assign({}, context, (0, _store.sanitizeStoryContextUpdate)(update)));
|
|
59
|
-
return story;
|
|
60
|
-
}, context);
|
|
61
|
-
|
|
62
|
-
if (!story) {
|
|
63
|
-
story = decorated(context);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (decoratedStory === story) {
|
|
67
|
-
return story;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return prepare(decoratedStory, story);
|
|
71
|
-
};
|
|
72
|
-
}, function (context) {
|
|
73
|
-
return prepare(storyFn(context));
|
|
74
|
-
});
|
|
75
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _global = _interopRequireDefault(require("global"));
|
|
4
|
-
|
|
5
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6
|
-
|
|
7
|
-
var globalWindow = _global.default.window;
|
|
8
|
-
globalWindow.STORYBOOK_REACT_CLASSES = {};
|
|
9
|
-
globalWindow.STORYBOOK_ENV = 'vue3';
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "activeStoryComponent", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _render.activeStoryComponent;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
exports.storiesOf = exports.setAddon = exports.raw = exports.getStorybook = exports.forceReRender = exports.configure = exports.clearDecorators = exports.app = exports.addParameters = exports.addDecorator = void 0;
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.array.concat.js");
|
|
15
|
-
|
|
16
|
-
var _coreClient = require("@storybook/core-client");
|
|
17
|
-
|
|
18
|
-
require("./globals");
|
|
19
|
-
|
|
20
|
-
var _decorateStory = require("./decorateStory");
|
|
21
|
-
|
|
22
|
-
var _render = require("./render");
|
|
23
|
-
|
|
24
|
-
var framework = 'vue3';
|
|
25
|
-
var api = (0, _coreClient.start)(_render.renderToDOM, {
|
|
26
|
-
decorateStory: _decorateStory.decorateStory,
|
|
27
|
-
render: _render.render
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
var storiesOf = function storiesOf(kind, m) {
|
|
31
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
32
|
-
framework: framework
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
exports.storiesOf = storiesOf;
|
|
37
|
-
|
|
38
|
-
var configure = function configure() {
|
|
39
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
40
|
-
args[_key] = arguments[_key];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return api.configure.apply(api, [framework].concat(args));
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
exports.configure = configure;
|
|
47
|
-
var addDecorator = api.clientApi.addDecorator;
|
|
48
|
-
exports.addDecorator = addDecorator;
|
|
49
|
-
var addParameters = api.clientApi.addParameters;
|
|
50
|
-
exports.addParameters = addParameters;
|
|
51
|
-
var clearDecorators = api.clientApi.clearDecorators;
|
|
52
|
-
exports.clearDecorators = clearDecorators;
|
|
53
|
-
var setAddon = api.clientApi.setAddon;
|
|
54
|
-
exports.setAddon = setAddon;
|
|
55
|
-
var forceReRender = api.forceReRender;
|
|
56
|
-
exports.forceReRender = forceReRender;
|
|
57
|
-
var getStorybook = api.clientApi.getStorybook;
|
|
58
|
-
exports.getStorybook = getStorybook;
|
|
59
|
-
var raw = api.clientApi.raw;
|
|
60
|
-
exports.raw = raw;
|
|
61
|
-
var app = _render.storybookApp;
|
|
62
|
-
exports.app = app;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/es.array.slice.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.object.freeze.js");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.render = exports.activeStoryComponent = void 0;
|
|
11
|
-
exports.renderToDOM = renderToDOM;
|
|
12
|
-
exports.storybookApp = void 0;
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.function.name.js");
|
|
15
|
-
|
|
16
|
-
require("core-js/modules/es.array.concat.js");
|
|
17
|
-
|
|
18
|
-
var _tsDedent = _interopRequireDefault(require("ts-dedent"));
|
|
19
|
-
|
|
20
|
-
var _vue = require("vue");
|
|
21
|
-
|
|
22
|
-
var _templateObject;
|
|
23
|
-
|
|
24
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
27
|
-
|
|
28
|
-
var render = function render(props, context) {
|
|
29
|
-
var id = context.id,
|
|
30
|
-
Component = context.component;
|
|
31
|
-
|
|
32
|
-
if (!Component) {
|
|
33
|
-
throw new Error("Unable to render story ".concat(id, " as the component annotation is missing from the default export"));
|
|
34
|
-
} // TODO remove this hack
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return (0, _vue.h)(Component, props);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
exports.render = render;
|
|
41
|
-
var activeStoryComponent = (0, _vue.shallowRef)(null);
|
|
42
|
-
exports.activeStoryComponent = activeStoryComponent;
|
|
43
|
-
var root = null;
|
|
44
|
-
var storybookApp = (0, _vue.createApp)({
|
|
45
|
-
// If an end-user calls `unmount` on the app, we need to clear our root variable
|
|
46
|
-
unmounted: function unmounted() {
|
|
47
|
-
root = null;
|
|
48
|
-
},
|
|
49
|
-
setup: function setup() {
|
|
50
|
-
return function () {
|
|
51
|
-
if (!activeStoryComponent.value) throw new Error('No Vue 3 Story available. Was it set correctly?');
|
|
52
|
-
return (0, _vue.h)(activeStoryComponent.value);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
exports.storybookApp = storybookApp;
|
|
57
|
-
|
|
58
|
-
function renderToDOM(_ref, domElement) {
|
|
59
|
-
var title = _ref.title,
|
|
60
|
-
name = _ref.name,
|
|
61
|
-
storyFn = _ref.storyFn,
|
|
62
|
-
showMain = _ref.showMain,
|
|
63
|
-
showError = _ref.showError,
|
|
64
|
-
showException = _ref.showException;
|
|
65
|
-
storybookApp.config.errorHandler = showException;
|
|
66
|
-
var element = storyFn();
|
|
67
|
-
|
|
68
|
-
if (!element) {
|
|
69
|
-
showError({
|
|
70
|
-
title: "Expecting a Vue component from the story: \"".concat(name, "\" of \"").concat(title, "\"."),
|
|
71
|
-
description: (0, _tsDedent.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n Did you forget to return the Vue component from the story?\n Use \"() => ({ template: '<my-comp></my-comp>' })\" or \"() => ({ components: MyComp, template: '<my-comp></my-comp>' })\" when defining the story.\n "])))
|
|
72
|
-
});
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
showMain();
|
|
77
|
-
activeStoryComponent.value = element;
|
|
78
|
-
|
|
79
|
-
if (!root) {
|
|
80
|
-
root = storybookApp.mount(domElement);
|
|
81
|
-
}
|
|
82
|
-
}
|
package/dist/esm/config.js
DELETED
package/dist/esm/docs/config.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { extractComponentDescription, enhanceArgTypes } from '@storybook/docs-tools';
|
|
2
|
-
import { extractArgTypes } from './extractArgTypes';
|
|
3
|
-
import { prepareForInline } from './prepareForInline';
|
|
4
|
-
export const parameters = {
|
|
5
|
-
docs: {
|
|
6
|
-
inlineStories: true,
|
|
7
|
-
prepareForInline,
|
|
8
|
-
extractArgTypes,
|
|
9
|
-
extractComponentDescription
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
export const argTypesEnhancers = [enhanceArgTypes];
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { hasDocgen, extractComponentProps, convert } from '@storybook/docs-tools';
|
|
2
|
-
const SECTIONS = ['props', 'events', 'slots'];
|
|
3
|
-
export const extractArgTypes = component => {
|
|
4
|
-
if (!hasDocgen(component)) {
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const results = {};
|
|
9
|
-
SECTIONS.forEach(section => {
|
|
10
|
-
const props = extractComponentProps(component, section);
|
|
11
|
-
props.forEach(({
|
|
12
|
-
propDef,
|
|
13
|
-
docgenInfo,
|
|
14
|
-
jsDocTags
|
|
15
|
-
}) => {
|
|
16
|
-
const {
|
|
17
|
-
name,
|
|
18
|
-
type,
|
|
19
|
-
description,
|
|
20
|
-
defaultValue: defaultSummary,
|
|
21
|
-
required
|
|
22
|
-
} = propDef;
|
|
23
|
-
const sbType = section === 'props' ? convert(docgenInfo) : {
|
|
24
|
-
name: 'void'
|
|
25
|
-
};
|
|
26
|
-
results[name] = {
|
|
27
|
-
name,
|
|
28
|
-
description,
|
|
29
|
-
type: Object.assign({
|
|
30
|
-
required
|
|
31
|
-
}, sbType),
|
|
32
|
-
table: {
|
|
33
|
-
type,
|
|
34
|
-
jsDocTags,
|
|
35
|
-
defaultValue: defaultSummary,
|
|
36
|
-
category: section
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
return results;
|
|
42
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import * as Vue from 'vue';
|
|
3
|
-
import { app } from '../index'; // This is cast as `any` to workaround type errors caused by Vue 2 types
|
|
4
|
-
|
|
5
|
-
const {
|
|
6
|
-
render,
|
|
7
|
-
h
|
|
8
|
-
} = Vue;
|
|
9
|
-
export const prepareForInline = (storyFn, {
|
|
10
|
-
args
|
|
11
|
-
}) => {
|
|
12
|
-
const component = storyFn();
|
|
13
|
-
const vnode = h(component, args); // By attaching the app context from `@storybook/vue3` to the vnode
|
|
14
|
-
// like this, these stoeis are able to access any app config stuff
|
|
15
|
-
// the end-user set inside `.storybook/preview.js`
|
|
16
|
-
|
|
17
|
-
vnode.appContext = app._context; // eslint-disable-line no-underscore-dangle
|
|
18
|
-
|
|
19
|
-
return /*#__PURE__*/React.createElement('div', {
|
|
20
|
-
ref: node => node ? render(vnode, node) : null
|
|
21
|
-
});
|
|
22
|
-
};
|
package/dist/esm/index.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { h } from 'vue';
|
|
2
|
-
import { sanitizeStoryContextUpdate } from '@storybook/store';
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
This normalizes a functional component into a render method in ComponentOptions.
|
|
6
|
-
|
|
7
|
-
The concept is taken from Vue 3's `defineComponent` but changed from creating a `setup`
|
|
8
|
-
method on the ComponentOptions so end-users don't need to specify a "thunk" as a decorator.
|
|
9
|
-
*/
|
|
10
|
-
function normalizeFunctionalComponent(options) {
|
|
11
|
-
return typeof options === 'function' ? {
|
|
12
|
-
render: options,
|
|
13
|
-
name: options.name
|
|
14
|
-
} : options;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function prepare(rawStory, innerStory) {
|
|
18
|
-
const story = rawStory;
|
|
19
|
-
|
|
20
|
-
if (story == null) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (innerStory) {
|
|
25
|
-
return Object.assign({}, normalizeFunctionalComponent(story), {
|
|
26
|
-
components: Object.assign({}, story.components || {}, {
|
|
27
|
-
story: innerStory
|
|
28
|
-
})
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return {
|
|
33
|
-
render() {
|
|
34
|
-
return h(story);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function decorateStory(storyFn, decorators) {
|
|
41
|
-
return decorators.reduce((decorated, decorator) => context => {
|
|
42
|
-
let story;
|
|
43
|
-
const decoratedStory = decorator(update => {
|
|
44
|
-
story = decorated(Object.assign({}, context, sanitizeStoryContextUpdate(update)));
|
|
45
|
-
return story;
|
|
46
|
-
}, context);
|
|
47
|
-
|
|
48
|
-
if (!story) {
|
|
49
|
-
story = decorated(context);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (decoratedStory === story) {
|
|
53
|
-
return story;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return prepare(decoratedStory, story);
|
|
57
|
-
}, context => prepare(storyFn(context)));
|
|
58
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { start } from '@storybook/core-client';
|
|
2
|
-
import './globals';
|
|
3
|
-
import { decorateStory } from './decorateStory';
|
|
4
|
-
import { render, renderToDOM, storybookApp } from './render';
|
|
5
|
-
const framework = 'vue3';
|
|
6
|
-
const api = start(renderToDOM, {
|
|
7
|
-
decorateStory,
|
|
8
|
-
render
|
|
9
|
-
});
|
|
10
|
-
export const storiesOf = (kind, m) => {
|
|
11
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
12
|
-
framework
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
export const configure = (...args) => api.configure(framework, ...args);
|
|
16
|
-
export const {
|
|
17
|
-
addDecorator
|
|
18
|
-
} = api.clientApi;
|
|
19
|
-
export const {
|
|
20
|
-
addParameters
|
|
21
|
-
} = api.clientApi;
|
|
22
|
-
export const {
|
|
23
|
-
clearDecorators
|
|
24
|
-
} = api.clientApi;
|
|
25
|
-
export const {
|
|
26
|
-
setAddon
|
|
27
|
-
} = api.clientApi;
|
|
28
|
-
export const {
|
|
29
|
-
forceReRender
|
|
30
|
-
} = api;
|
|
31
|
-
export const {
|
|
32
|
-
getStorybook
|
|
33
|
-
} = api.clientApi;
|
|
34
|
-
export const {
|
|
35
|
-
raw
|
|
36
|
-
} = api.clientApi;
|
|
37
|
-
export const app = storybookApp;
|
|
38
|
-
export { activeStoryComponent } from './render';
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import dedent from 'ts-dedent';
|
|
2
|
-
import { createApp, h, shallowRef } from 'vue';
|
|
3
|
-
export const render = (props, context) => {
|
|
4
|
-
const {
|
|
5
|
-
id,
|
|
6
|
-
component: Component
|
|
7
|
-
} = context;
|
|
8
|
-
|
|
9
|
-
if (!Component) {
|
|
10
|
-
throw new Error(`Unable to render story ${id} as the component annotation is missing from the default export`);
|
|
11
|
-
} // TODO remove this hack
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return h(Component, props);
|
|
15
|
-
};
|
|
16
|
-
export const activeStoryComponent = shallowRef(null);
|
|
17
|
-
let root = null;
|
|
18
|
-
export const storybookApp = createApp({
|
|
19
|
-
// If an end-user calls `unmount` on the app, we need to clear our root variable
|
|
20
|
-
unmounted() {
|
|
21
|
-
root = null;
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
setup() {
|
|
25
|
-
return () => {
|
|
26
|
-
if (!activeStoryComponent.value) throw new Error('No Vue 3 Story available. Was it set correctly?');
|
|
27
|
-
return h(activeStoryComponent.value);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
export function renderToDOM({
|
|
33
|
-
title,
|
|
34
|
-
name,
|
|
35
|
-
storyFn,
|
|
36
|
-
showMain,
|
|
37
|
-
showError,
|
|
38
|
-
showException
|
|
39
|
-
}, domElement) {
|
|
40
|
-
storybookApp.config.errorHandler = showException;
|
|
41
|
-
const element = storyFn();
|
|
42
|
-
|
|
43
|
-
if (!element) {
|
|
44
|
-
showError({
|
|
45
|
-
title: `Expecting a Vue component from the story: "${name}" of "${title}".`,
|
|
46
|
-
description: dedent`
|
|
47
|
-
Did you forget to return the Vue component from the story?
|
|
48
|
-
Use "() => ({ template: '<my-comp></my-comp>' })" or "() => ({ components: MyComp, template: '<my-comp></my-comp>' })" when defining the story.
|
|
49
|
-
`
|
|
50
|
-
});
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
showMain();
|
|
55
|
-
activeStoryComponent.value = element;
|
|
56
|
-
|
|
57
|
-
if (!root) {
|
|
58
|
-
root = storybookApp.mount(domElement);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/types/config.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const parameters: {
|
|
2
|
-
docs: {
|
|
3
|
-
inlineStories: boolean;
|
|
4
|
-
prepareForInline: (storyFn: import("@storybook/csf").PartialStoryFn<import(".").VueFramework, import("@storybook/csf").Args>, { args }: import("@storybook/csf").StoryContext<import(".").VueFramework, import("@storybook/csf").Args>) => import("react").DetailedReactHTMLElement<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
5
|
-
extractArgTypes: import("lib/docs-tools/dist/types").ArgTypesExtractor;
|
|
6
|
-
extractComponentDescription: typeof import("lib/docs-tools/dist/types").extractComponentDescription;
|
|
7
|
-
};
|
|
8
|
-
framework: string;
|
|
9
|
-
};
|
|
10
|
-
export { argTypesEnhancers } from './docs/config';
|
|
11
|
-
export * from './preview/config';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { extractComponentDescription } from '@storybook/docs-tools';
|
|
2
|
-
export declare const parameters: {
|
|
3
|
-
docs: {
|
|
4
|
-
inlineStories: boolean;
|
|
5
|
-
prepareForInline: (storyFn: import("@storybook/csf").PartialStoryFn<import("..").VueFramework, import("@storybook/csf").Args>, { args }: import("@storybook/csf").StoryContext<import("..").VueFramework, import("@storybook/csf").Args>) => import("react").DetailedReactHTMLElement<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
6
|
-
extractArgTypes: import("@storybook/docs-tools").ArgTypesExtractor;
|
|
7
|
-
extractComponentDescription: typeof extractComponentDescription;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare const argTypesEnhancers: (<TFramework extends import("@storybook/csf").AnyFramework>(context: import("@storybook/csf").StoryContextForEnhancers<TFramework, import("@storybook/csf").Args>) => import("@storybook/csf").StrictArgTypes<import("@storybook/csf").Args> | import("lib/addons/dist/types").Parameters)[];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StoryContext, PartialStoryFn } from '@storybook/csf';
|
|
3
|
-
import { VueFramework } from '../index';
|
|
4
|
-
export declare const prepareForInline: (storyFn: PartialStoryFn<VueFramework>, { args }: StoryContext<VueFramework>) => React.DetailedReactHTMLElement<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { DecoratorFunction, LegacyStoryFn } from '@storybook/csf';
|
|
2
|
-
import type { VueFramework } from './types-6-0';
|
|
3
|
-
export declare function decorateStory(storyFn: LegacyStoryFn<VueFramework>, decorators: DecoratorFunction<VueFramework>[]): LegacyStoryFn<VueFramework>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/// <reference types="webpack-env" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type { App } from 'vue';
|
|
4
|
-
import type { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
5
|
-
import './globals';
|
|
6
|
-
import type { IStorybookSection } from './types';
|
|
7
|
-
import type { VueFramework } from './types-6-0';
|
|
8
|
-
interface ClientApi extends ClientStoryApi<VueFramework['storyResult']> {
|
|
9
|
-
setAddon(addon: any): void;
|
|
10
|
-
configure(loader: Loadable, module: NodeModule): void;
|
|
11
|
-
getStorybook(): IStorybookSection[];
|
|
12
|
-
clearDecorators(): void;
|
|
13
|
-
forceReRender(): void;
|
|
14
|
-
raw: () => any;
|
|
15
|
-
load: (...args: any[]) => void;
|
|
16
|
-
app: App;
|
|
17
|
-
}
|
|
18
|
-
export declare const storiesOf: ClientApi['storiesOf'];
|
|
19
|
-
export declare const configure: ClientApi['configure'];
|
|
20
|
-
export declare const addDecorator: (() => never) | ((decorator: import("@storybook/csf").DecoratorFunction<VueFramework, import("@storybook/addons").Args>) => void);
|
|
21
|
-
export declare const addParameters: (() => never) | (({ globals, globalTypes, ...parameters }: import("@storybook/csf/dist/story").Parameters & {
|
|
22
|
-
globals?: import("@storybook/csf").Globals;
|
|
23
|
-
globalTypes?: import("@storybook/csf").GlobalTypes;
|
|
24
|
-
}) => void);
|
|
25
|
-
export declare const clearDecorators: (() => never) | (() => void);
|
|
26
|
-
export declare const setAddon: (() => never) | ((addon: any) => void);
|
|
27
|
-
export declare const forceReRender: (() => never) | (() => void);
|
|
28
|
-
export declare const getStorybook: (() => never) | (() => import("lib/client-api/dist/types/ClientApi").GetStorybookKind<VueFramework>[]);
|
|
29
|
-
export declare const raw: (() => never) | (() => import("lib/store/dist/types").BoundStory<VueFramework>[]);
|
|
30
|
-
export declare const app: ClientApi['app'];
|
|
31
|
-
export { activeStoryComponent } from './render';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { RenderContext } from '@storybook/store';
|
|
2
|
-
import type { ArgsStoryFn } from '@storybook/csf';
|
|
3
|
-
import { VueFramework } from './types-6-0';
|
|
4
|
-
export declare const render: ArgsStoryFn<VueFramework>;
|
|
5
|
-
export declare const activeStoryComponent: import("vue").Ref<import("vue").ComponentOptions<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, any, any, any>> | import("vue").Ref<import("vue").FunctionalComponent<any, any>>;
|
|
6
|
-
export declare const storybookApp: import("vue").App<Element>;
|
|
7
|
-
export declare function renderToDOM({ title, name, storyFn, showMain, showError, showException }: RenderContext<VueFramework>, domElement: HTMLElement): void;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { ConcreteComponent } from 'vue';
|
|
2
|
-
import type { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
|
|
3
|
-
import type { StoryFnVueReturnType } from './types';
|
|
4
|
-
export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf';
|
|
5
|
-
export declare type VueFramework = {
|
|
6
|
-
component: ConcreteComponent<any>;
|
|
7
|
-
storyResult: StoryFnVueReturnType;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Metadata to configure the stories for a component.
|
|
11
|
-
*
|
|
12
|
-
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
|
|
13
|
-
*/
|
|
14
|
-
export declare type Meta<TArgs = Args> = ComponentAnnotations<VueFramework, TArgs>;
|
|
15
|
-
/**
|
|
16
|
-
* Story function that represents a CSFv2 component example.
|
|
17
|
-
*
|
|
18
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
19
|
-
*/
|
|
20
|
-
export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<VueFramework, TArgs>;
|
|
21
|
-
/**
|
|
22
|
-
* Story function that represents a CSFv3 component example.
|
|
23
|
-
*
|
|
24
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
25
|
-
*/
|
|
26
|
-
export declare type StoryObj<TArgs = Args> = StoryAnnotations<VueFramework, TArgs>;
|
|
27
|
-
/**
|
|
28
|
-
* Story function that represents a CSFv2 component example.
|
|
29
|
-
*
|
|
30
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
31
|
-
*
|
|
32
|
-
* NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
export declare type Story<TArgs = Args> = StoryFn<TArgs>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Args } from '@storybook/csf';
|
|
2
|
-
import type { StoryObj } from './types-6-0';
|
|
3
|
-
export type { StoryFn, StoryObj, Meta } from './types-6-0';
|
|
4
|
-
/**
|
|
5
|
-
* Story function that represents a CSFv3 component example.
|
|
6
|
-
*
|
|
7
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
8
|
-
*/
|
|
9
|
-
export declare type Story<TArgs = Args> = StoryObj<TArgs>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ConcreteComponent } from 'vue';
|
|
2
|
-
export type { RenderContext } from '@storybook/core-client';
|
|
3
|
-
export interface ShowErrorArgs {
|
|
4
|
-
title: string;
|
|
5
|
-
description: string;
|
|
6
|
-
}
|
|
7
|
-
export declare type StoryFnVueReturnType = ConcreteComponent<any>;
|
|
8
|
-
export interface IStorybookStory {
|
|
9
|
-
name: string;
|
|
10
|
-
render: (context: any) => any;
|
|
11
|
-
}
|
|
12
|
-
export interface IStorybookSection {
|
|
13
|
-
kind: string;
|
|
14
|
-
stories: IStorybookStory[];
|
|
15
|
-
}
|