@storybook/html-webpack5 7.0.0-alpha.3 → 7.0.0-alpha.30
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 +6 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/dist/preset.d.ts +9 -0
- package/dist/preset.js +1 -0
- package/dist/preset.mjs +1 -0
- package/dist/types-7999a258.d.ts +27 -0
- package/package.json +39 -14
- package/preset.js +1 -1
- package/LICENSE +0 -21
- package/dist/cjs/index.js +0 -18
- package/dist/cjs/preset.js +0 -16
- package/dist/esm/index.js +0 -1
- package/dist/esm/preset.js +0 -6
- package/dist/types/index.d.ts +0 -1
- package/dist/types/preset.d.ts +0 -11
- package/standalone.js +0 -7
- package/types-7-0.d.ts +0 -1
package/README.md
CHANGED
@@ -14,11 +14,16 @@ So you can develop UI components in isolation without worrying about app specifi
|
|
14
14
|
|
15
15
|
```sh
|
16
16
|
cd my-app
|
17
|
-
npx
|
17
|
+
npx storybook init -t html
|
18
18
|
```
|
19
19
|
|
20
20
|
For more information visit: [storybook.js.org](https://storybook.js.org)
|
21
21
|
|
22
|
+
### Typescript
|
23
|
+
|
24
|
+
`npx sb init` will select `.ts` starter stories if your `package.json` has typescript as a dependency. If starting a new project,
|
25
|
+
run `npm init` and `npm install typescript --save-dev` before initializing storybook to get the typescript starter stories.
|
26
|
+
|
22
27
|
---
|
23
28
|
|
24
29
|
Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(r,o,m,x)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of c(o))!d.call(r,e)&&e!==m&&a(r,e,{get:()=>o[e],enumerable:!(x=b(o,e))||x.enumerable});return r},p=(r,o,m)=>(t(r,o,"default"),m&&t(m,o,"default"));var g=r=>t(a({},"__esModule",{value:!0}),r);var f={};module.exports=g(f);p(f,require("@storybook/html"),module.exports);
|
package/dist/index.mjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export*from"@storybook/html";
|
package/dist/preset.d.ts
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
import { PresetProperty } from '@storybook/core-common';
|
2
|
+
import { S as StorybookConfig } from './types-7999a258.js';
|
3
|
+
import '@storybook/preset-html-webpack';
|
4
|
+
import '@storybook/builder-webpack5';
|
5
|
+
|
6
|
+
declare const addons: PresetProperty<'addons', StorybookConfig>;
|
7
|
+
declare const core: PresetProperty<'core', StorybookConfig>;
|
8
|
+
|
9
|
+
export { addons, core };
|
package/dist/preset.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";var i=Object.create;var n=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var c=(o,r)=>{for(var e in r)n(o,e,{get:r[e],enumerable:!0})},a=(o,r,e,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of y(r))!b.call(o,s)&&s!==e&&n(o,s,{get:()=>r[s],enumerable:!(p=k(r,s))||p.enumerable});return o};var d=(o,r,e)=>(e=o!=null?i(m(o)):{},a(r||!o||!o.__esModule?n(e,"default",{value:o,enumerable:!0}):e,o)),f=o=>a(n({},"__esModule",{value:!0}),o);var u={};c(u,{addons:()=>l,core:()=>g});module.exports=f(u);var t=d(require("path")),l=[t.default.dirname(require.resolve(t.default.join("@storybook/preset-html-webpack","package.json"))),t.default.dirname(require.resolve(t.default.join("@storybook/html","package.json")))],g=async(o,r)=>{let e=await r.presets.apply("framework");return{...o,builder:{name:t.default.dirname(require.resolve(t.default.join("@storybook/builder-webpack5","package.json"))),options:typeof e=="string"?{}:e.options.builder||{}}}};0&&(module.exports={addons,core});
|
package/dist/preset.mjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
var t=(o=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(o,{get:(s,e)=>(typeof require!="undefined"?require:s)[e]}):o)(function(o){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')});import r from"path";var i=[r.dirname(t.resolve(r.join("@storybook/preset-html-webpack","package.json"))),r.dirname(t.resolve(r.join("@storybook/html","package.json")))],k=async(o,s)=>{let e=await s.presets.apply("framework");return{...o,builder:{name:r.dirname(t.resolve(r.join("@storybook/builder-webpack5","package.json"))),options:typeof e=="string"?{}:e.options.builder||{}}}};export{i as addons,k as core};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { StorybookConfig as StorybookConfig$1, TypescriptOptions as TypescriptOptions$1 } from '@storybook/preset-html-webpack';
|
2
|
+
import { BuilderOptions, StorybookConfigWebpack, TypescriptOptions } from '@storybook/builder-webpack5';
|
3
|
+
|
4
|
+
declare type FrameworkName = '@storybook/html-webpack5';
|
5
|
+
declare type BuilderName = '@storybook/builder-webpack5';
|
6
|
+
declare type FrameworkOptions = {
|
7
|
+
builder?: BuilderOptions;
|
8
|
+
};
|
9
|
+
declare type StorybookConfigFramework = {
|
10
|
+
framework: FrameworkName | {
|
11
|
+
name: FrameworkName;
|
12
|
+
options: FrameworkOptions;
|
13
|
+
};
|
14
|
+
core?: StorybookConfig$1['core'] & {
|
15
|
+
builder?: BuilderName | {
|
16
|
+
name: BuilderName;
|
17
|
+
options: BuilderOptions;
|
18
|
+
};
|
19
|
+
};
|
20
|
+
typescript?: Partial<TypescriptOptions & TypescriptOptions$1> & StorybookConfig$1['typescript'];
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* The interface for Storybook configuration in `main.ts` files.
|
24
|
+
*/
|
25
|
+
declare type StorybookConfig = Omit<StorybookConfig$1, keyof StorybookConfigWebpack | keyof StorybookConfigFramework> & StorybookConfigWebpack & StorybookConfigFramework;
|
26
|
+
|
27
|
+
export { FrameworkOptions as F, StorybookConfig as S };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@storybook/html-webpack5",
|
3
|
-
"version": "7.0.0-alpha.
|
3
|
+
"version": "7.0.0-alpha.30",
|
4
4
|
"description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.",
|
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
|
+
"./preset": {
|
29
|
+
"require": "./dist/preset.js",
|
30
|
+
"import": "./dist/preset.mjs",
|
31
|
+
"types": "./dist/preset.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
|
"dist/**/*",
|
27
44
|
"README.md",
|
@@ -29,20 +46,21 @@
|
|
29
46
|
"*.d.ts"
|
30
47
|
],
|
31
48
|
"scripts": {
|
32
|
-
"
|
49
|
+
"check": "tsc --noEmit",
|
50
|
+
"prepare": "../../../scripts/prepare/bundle.ts"
|
33
51
|
},
|
34
52
|
"dependencies": {
|
35
|
-
"@storybook/builder-webpack5": "7.0.0-alpha.
|
36
|
-
"@storybook/core-common": "7.0.0-alpha.
|
37
|
-
"@storybook/
|
38
|
-
"@storybook/html": "7.0.0-alpha.
|
39
|
-
"@storybook/preset-html-webpack": "7.0.0-alpha.3",
|
53
|
+
"@storybook/builder-webpack5": "7.0.0-alpha.30",
|
54
|
+
"@storybook/core-common": "7.0.0-alpha.30",
|
55
|
+
"@storybook/html": "7.0.0-alpha.30",
|
56
|
+
"@storybook/preset-html-webpack": "7.0.0-alpha.30",
|
40
57
|
"@types/node": "^14.14.20 || ^16.0.0",
|
41
|
-
"core-js": "^3.8.2",
|
42
58
|
"global": "^4.4.0",
|
43
59
|
"react": "16.14.0",
|
44
|
-
"react-dom": "16.14.0"
|
45
|
-
|
60
|
+
"react-dom": "16.14.0"
|
61
|
+
},
|
62
|
+
"devDependencies": {
|
63
|
+
"typescript": "~4.6.3"
|
46
64
|
},
|
47
65
|
"peerDependencies": {
|
48
66
|
"@babel/core": "*"
|
@@ -53,5 +71,12 @@
|
|
53
71
|
"publishConfig": {
|
54
72
|
"access": "public"
|
55
73
|
},
|
56
|
-
"
|
74
|
+
"bundler": {
|
75
|
+
"entries": [
|
76
|
+
"./src/index.ts",
|
77
|
+
"./src/preset.ts"
|
78
|
+
],
|
79
|
+
"platform": "node"
|
80
|
+
},
|
81
|
+
"gitHead": "aabf7b595cb13d8a86dca27ad3d6039205bd55d6"
|
57
82
|
}
|
package/preset.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
module.exports = require('./dist/
|
1
|
+
module.exports = require('./dist/preset');
|
package/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2017 Kadira Inc. <hello@kadira.io>
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
package/dist/cjs/index.js
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
|
7
|
-
var _html = require("@storybook/html");
|
8
|
-
|
9
|
-
Object.keys(_html).forEach(function (key) {
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
11
|
-
if (key in exports && exports[key] === _html[key]) return;
|
12
|
-
Object.defineProperty(exports, key, {
|
13
|
-
enumerable: true,
|
14
|
-
get: function () {
|
15
|
-
return _html[key];
|
16
|
-
}
|
17
|
-
});
|
18
|
-
});
|
package/dist/cjs/preset.js
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.core = exports.addons = void 0;
|
7
|
-
const addons = ['@storybook/preset-html-webpack', '@storybook/html'];
|
8
|
-
exports.addons = addons;
|
9
|
-
|
10
|
-
const core = async config => {
|
11
|
-
return Object.assign({}, config, {
|
12
|
-
builder: require.resolve('@storybook/builder-webpack5')
|
13
|
-
});
|
14
|
-
};
|
15
|
-
|
16
|
-
exports.core = core;
|
package/dist/esm/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from '@storybook/html';
|
package/dist/esm/preset.js
DELETED
package/dist/types/index.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from '@storybook/html';
|
package/dist/types/preset.d.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { StorybookConfig } from '@storybook/core-common';
|
2
|
-
export declare const addons: StorybookConfig['addons'];
|
3
|
-
export declare const core: (config: StorybookConfig['core']) => Promise<{
|
4
|
-
builder: string;
|
5
|
-
disableWebpackDefaults?: boolean;
|
6
|
-
channelOptions?: Partial<import("telejson").Options>;
|
7
|
-
disableProjectJson?: boolean;
|
8
|
-
disableTelemetry?: boolean;
|
9
|
-
enableCrashReports?: boolean;
|
10
|
-
crossOriginIsolated?: boolean;
|
11
|
-
}>;
|
package/standalone.js
DELETED
package/types-7-0.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './dist/types/client/preview/types-7-0.d';
|