@storybook/html-webpack5 7.0.0-alpha.4 → 7.0.0-alpha.41

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 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 sb init -t html
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.
@@ -0,0 +1,3 @@
1
+ export { F as FrameworkOptions, S as StorybookConfig } from './types-7999a258.js';
2
+ import '@storybook/preset-html-webpack';
3
+ import '@storybook/builder-webpack5';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";var m=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var b=(r,o,p,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of x(o))!a.call(r,e)&&e!==p&&m(r,e,{get:()=>o[e],enumerable:!(f=t(o,e))||f.enumerable});return r};var c=r=>b(m({},"__esModule",{value:!0}),r);var d={};module.exports=c(d);
package/dist/index.mjs ADDED
File without changes
@@ -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});
@@ -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.4",
3
+ "version": "7.0.0-alpha.41",
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
- "main": "dist/cjs/index.js",
23
- "module": "dist/esm/index.js",
24
- "types": "dist/types/index.d.ts",
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,19 +46,22 @@
29
46
  "*.d.ts"
30
47
  ],
31
48
  "scripts": {
32
- "prepare": "node ../../scripts/prepare.js"
49
+ "check": "../../../scripts/node_modules/.bin/tsc --noEmit",
50
+ "prep": "../../../scripts/prepare/bundle.ts"
33
51
  },
34
52
  "dependencies": {
35
- "@storybook/builder-webpack5": "7.0.0-alpha.4",
36
- "@storybook/core-common": "7.0.0-alpha.4",
37
- "@storybook/html": "7.0.0-alpha.4",
38
- "@storybook/preset-html-webpack": "7.0.0-alpha.4",
39
- "@types/node": "^14.14.20 || ^16.0.0",
40
- "core-js": "^3.8.2",
53
+ "@storybook/builder-webpack5": "7.0.0-alpha.41",
54
+ "@storybook/core-common": "7.0.0-alpha.41",
55
+ "@storybook/html": "7.0.0-alpha.41",
56
+ "@storybook/preset-html-webpack": "7.0.0-alpha.41",
57
+ "@types/node": "^16.0.0",
41
58
  "global": "^4.4.0",
42
59
  "react": "16.14.0",
43
60
  "react-dom": "16.14.0"
44
61
  },
62
+ "devDependencies": {
63
+ "typescript": "~4.6.3"
64
+ },
45
65
  "peerDependencies": {
46
66
  "@babel/core": "*"
47
67
  },
@@ -51,5 +71,12 @@
51
71
  "publishConfig": {
52
72
  "access": "public"
53
73
  },
54
- "gitHead": "006ed54452dd7c37a8cbe91a84f5312182f7ca00"
74
+ "bundler": {
75
+ "entries": [
76
+ "./src/index.ts",
77
+ "./src/preset.ts"
78
+ ],
79
+ "platform": "node"
80
+ },
81
+ "gitHead": "7ec6f916eb875bd2e3cf3aa6b1afcd1fe25d1637"
55
82
  }
package/preset.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('./dist/cjs/preset');
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
- });
@@ -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';
@@ -1,6 +0,0 @@
1
- export const addons = ['@storybook/preset-html-webpack', '@storybook/html'];
2
- export const core = async config => {
3
- return Object.assign({}, config, {
4
- builder: require.resolve('@storybook/builder-webpack5')
5
- });
6
- };
@@ -1 +0,0 @@
1
- export * from '@storybook/html';
@@ -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 | undefined;
6
- channelOptions?: Partial<import("telejson").Options> | undefined;
7
- disableProjectJson?: boolean | undefined;
8
- disableTelemetry?: boolean | undefined;
9
- enableCrashReports?: boolean | undefined;
10
- crossOriginIsolated?: boolean | undefined;
11
- }>;
package/types-7-0.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/types/client/preview/types-7-0.d';