@storybook/vue3-webpack5 7.0.0-beta.6 → 7.0.0-beta.60
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/README.md +10 -9
- package/dist/index.js +1 -1
- package/dist/preset.d.ts +18 -19
- package/dist/preset.js +1 -1
- package/package.json +10 -12
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Storybook for Vue 3
|
|
1
|
+
# Storybook for Vue 3 and Webpack
|
|
2
2
|
|
|
3
3
|
Storybook for Vue 3 is a UI development environment for your Vue 3 components.
|
|
4
4
|
With it, you can visualize different states of your UI components and develop them interactively.
|
|
@@ -24,20 +24,21 @@ You can also build a [static version](https://storybook.js.org/docs/vue/sharing/
|
|
|
24
24
|
|
|
25
25
|
## Extending the Vue application
|
|
26
26
|
|
|
27
|
-
Storybook creates a [Vue 3 application](https://v3.vuejs.org/api/application-api.html#application-api) for your component preview
|
|
28
|
-
|
|
27
|
+
Storybook creates a [Vue 3 application](https://v3.vuejs.org/api/application-api.html#application-api) for your component preview.
|
|
29
28
|
When using global custom components (`app.component`), directives (`app.directive`), extensions (`app.use`), or other application methods, you will need to configure those in the `./storybook/preview.js` file.
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
Therefore, Storybook provides you with a `setup` function exported from this package, which receives as a callback your Storybook instance, which you can interact with and add your custom configuration.
|
|
32
31
|
|
|
33
32
|
```js
|
|
34
33
|
// .storybook/preview.js
|
|
35
34
|
|
|
36
|
-
import {
|
|
35
|
+
import { setup } from '@storybook/vue3';
|
|
37
36
|
|
|
38
|
-
app
|
|
39
|
-
app.
|
|
40
|
-
app.
|
|
41
|
-
|
|
37
|
+
setup((app) => {
|
|
38
|
+
app.use(MyPlugin);
|
|
39
|
+
app.component('my-component', MyComponent);
|
|
40
|
+
app.mixin({
|
|
41
|
+
/* My mixin */
|
|
42
|
+
});
|
|
42
43
|
});
|
|
43
44
|
```
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var src_exports={};module.exports=__toCommonJS(src_exports);
|
package/dist/preset.d.ts
CHANGED
|
@@ -720,7 +720,7 @@ PackageJson$1.NonStandardEntryPoints &
|
|
|
720
720
|
PackageJson$1.TypeScriptConfiguration &
|
|
721
721
|
PackageJson$1.YarnConfiguration &
|
|
722
722
|
PackageJson$1.JSPMConfiguration;
|
|
723
|
-
|
|
723
|
+
type Tag = string;
|
|
724
724
|
interface Parameters {
|
|
725
725
|
[name: string]: any;
|
|
726
726
|
}
|
|
@@ -876,20 +876,18 @@ interface CLIOptions {
|
|
|
876
876
|
quiet?: boolean;
|
|
877
877
|
versionUpdates?: boolean;
|
|
878
878
|
releaseNotes?: boolean;
|
|
879
|
-
dll?: boolean;
|
|
880
879
|
docs?: boolean;
|
|
881
|
-
docsDll?: boolean;
|
|
882
|
-
uiDll?: boolean;
|
|
883
880
|
debugWebpack?: boolean;
|
|
884
881
|
webpackStatsJson?: string | boolean;
|
|
885
882
|
outputDir?: string;
|
|
886
883
|
}
|
|
887
884
|
interface BuilderOptions {
|
|
888
885
|
configType?: 'DEVELOPMENT' | 'PRODUCTION';
|
|
889
|
-
ignorePreview
|
|
890
|
-
cache
|
|
886
|
+
ignorePreview?: boolean;
|
|
887
|
+
cache?: FileSystemCache;
|
|
891
888
|
configDir: string;
|
|
892
|
-
docsMode
|
|
889
|
+
docsMode?: boolean;
|
|
890
|
+
env?: (envs: Record<string, string>) => Record<string, string>;
|
|
893
891
|
features?: StorybookConfig['features'];
|
|
894
892
|
versionCheck?: VersionCheck;
|
|
895
893
|
releaseNotesData?: ReleaseNotesData;
|
|
@@ -934,19 +932,16 @@ type CoreCommon_StorybookRefs = Record<string, {
|
|
|
934
932
|
disable: boolean;
|
|
935
933
|
}>;
|
|
936
934
|
type DocsOptions = {
|
|
937
|
-
/**
|
|
938
|
-
* Should we generate docs entries at all under any circumstances? (i.e. can they be rendered)
|
|
939
|
-
*/
|
|
940
|
-
enabled?: boolean;
|
|
941
935
|
/**
|
|
942
936
|
* What should we call the generated docs entries?
|
|
943
937
|
*/
|
|
944
938
|
defaultName?: string;
|
|
945
939
|
/**
|
|
946
|
-
* Should we generate a docs entry per CSF file
|
|
947
|
-
* Set to '
|
|
940
|
+
* Should we generate a docs entry per CSF file?
|
|
941
|
+
* Set to 'tag' (the default) to generate an entry for every CSF file with the
|
|
942
|
+
* 'autodocs' tag.
|
|
948
943
|
*/
|
|
949
|
-
|
|
944
|
+
autodocs?: boolean | 'tag';
|
|
950
945
|
/**
|
|
951
946
|
* Only show doc entries in the side bar (usually set with the `--docs` CLI flag)
|
|
952
947
|
*/
|
|
@@ -989,10 +984,6 @@ interface StorybookConfig {
|
|
|
989
984
|
* Enable a set of planned breaking changes for SB7.0
|
|
990
985
|
*/
|
|
991
986
|
breakingChangesV7?: boolean;
|
|
992
|
-
/**
|
|
993
|
-
* Enable the step debugger functionality in Addon-interactions.
|
|
994
|
-
*/
|
|
995
|
-
interactionsDebugger?: boolean;
|
|
996
987
|
/**
|
|
997
988
|
* Filter args with a "target" on the type from the render function (EXPERIMENTAL)
|
|
998
989
|
*/
|
|
@@ -1002,6 +993,14 @@ interface StorybookConfig {
|
|
|
1002
993
|
* Will be removed in 7.0.
|
|
1003
994
|
*/
|
|
1004
995
|
warnOnLegacyHierarchySeparator?: boolean;
|
|
996
|
+
/**
|
|
997
|
+
* Use legacy MDX1, to help smooth migration to 7.0
|
|
998
|
+
*/
|
|
999
|
+
legacyMdx1?: boolean;
|
|
1000
|
+
/**
|
|
1001
|
+
* Apply decorators from preview.js before decorators from addons or frameworks
|
|
1002
|
+
*/
|
|
1003
|
+
legacyDecoratorFileOrder?: boolean;
|
|
1005
1004
|
};
|
|
1006
1005
|
/**
|
|
1007
1006
|
* Tells Storybook where to find stories.
|
|
@@ -1010,7 +1009,7 @@ interface StorybookConfig {
|
|
|
1010
1009
|
*/
|
|
1011
1010
|
stories: StoriesEntry[];
|
|
1012
1011
|
/**
|
|
1013
|
-
* Framework, e.g. '@storybook/react', required in v7
|
|
1012
|
+
* Framework, e.g. '@storybook/react-vite', required in v7
|
|
1014
1013
|
*/
|
|
1015
1014
|
framework?: Preset;
|
|
1016
1015
|
/**
|
package/dist/preset.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preset_exports={};__export(preset_exports,{addons:()=>addons,core:()=>core,typescript:()=>typescript});module.exports=__toCommonJS(preset_exports);var import_path=__toESM(require("path")),addons=[import_path.default.dirname(require.resolve(import_path.default.join("@storybook/preset-vue3-webpack","package.json")))],core=async(config,options)=>{let framework=await options.presets.apply("framework");return{...config,builder:{name:import_path.default.dirname(require.resolve(import_path.default.join("@storybook/builder-webpack5","package.json"))),options:typeof framework=="string"?{}:framework.options.builder||{}},renderer:import_path.default.dirname(require.resolve(import_path.default.join("@storybook/vue3","package.json")))}},typescript=async config=>({...config,skipBabel:!0});0&&(module.exports={addons,core,typescript});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/vue3-webpack5",
|
|
3
|
-
"version": "7.0.0-beta.
|
|
3
|
+
"version": "7.0.0-beta.60",
|
|
4
4
|
"description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
+
"node": "./dist/index.js",
|
|
24
25
|
"require": "./dist/index.js",
|
|
25
26
|
"import": "./dist/index.mjs",
|
|
26
27
|
"types": "./dist/index.d.ts"
|
|
@@ -30,17 +31,14 @@
|
|
|
30
31
|
"import": "./dist/preset.mjs",
|
|
31
32
|
"types": "./dist/preset.d.ts"
|
|
32
33
|
},
|
|
33
|
-
"./package.json":
|
|
34
|
-
"require": "./package.json",
|
|
35
|
-
"import": "./package.json",
|
|
36
|
-
"types": "./package.json"
|
|
37
|
-
}
|
|
34
|
+
"./package.json": "./package.json"
|
|
38
35
|
},
|
|
39
36
|
"main": "dist/index.js",
|
|
40
37
|
"module": "dist/index.mjs",
|
|
41
38
|
"types": "dist/index.d.ts",
|
|
42
39
|
"files": [
|
|
43
40
|
"dist/**/*",
|
|
41
|
+
"template/**/*",
|
|
44
42
|
"README.md",
|
|
45
43
|
"*.js",
|
|
46
44
|
"*.d.ts"
|
|
@@ -50,10 +48,10 @@
|
|
|
50
48
|
"prep": "../../../scripts/prepare/bundle.ts"
|
|
51
49
|
},
|
|
52
50
|
"dependencies": {
|
|
53
|
-
"@storybook/builder-webpack5": "7.0.0-beta.
|
|
54
|
-
"@storybook/core-common": "7.0.0-beta.
|
|
55
|
-
"@storybook/preset-vue3-webpack": "7.0.0-beta.
|
|
56
|
-
"@storybook/vue3": "7.0.0-beta.
|
|
51
|
+
"@storybook/builder-webpack5": "7.0.0-beta.60",
|
|
52
|
+
"@storybook/core-common": "7.0.0-beta.60",
|
|
53
|
+
"@storybook/preset-vue3-webpack": "7.0.0-beta.60",
|
|
54
|
+
"@storybook/vue3": "7.0.0-beta.60",
|
|
57
55
|
"@types/node": "^16.0.0"
|
|
58
56
|
},
|
|
59
57
|
"devDependencies": {
|
|
@@ -64,7 +62,7 @@
|
|
|
64
62
|
"peerDependencies": {
|
|
65
63
|
"@babel/core": "*",
|
|
66
64
|
"@vue/compiler-sfc": "^3.0.0",
|
|
67
|
-
"babel-loader": "^7.0.0 || ^8.0.0",
|
|
65
|
+
"babel-loader": "^7.0.0 || ^8.0.0 || ^9.0.0",
|
|
68
66
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
69
67
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
70
68
|
"vue": "^3.0.0"
|
|
@@ -82,5 +80,5 @@
|
|
|
82
80
|
],
|
|
83
81
|
"platform": "node"
|
|
84
82
|
},
|
|
85
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "325e0406b449b740d94d481a32a62304a8b2fd11"
|
|
86
84
|
}
|