@storybook/html 7.0.0-alpha.37 → 7.0.0-alpha.39
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/config.d.ts +2 -3
- package/dist/index.d.ts +3 -12
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -1
- package/dist/{types-70312e86.d.ts → types-b36ec9b7.d.ts} +4 -13
- package/package.json +7 -7
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import 'lib/docs-tools/dist
|
|
2
|
-
export { a as argTypesEnhancers, d as decorators, p as parameters, b as render, r as renderToDOM } from './types-
|
|
1
|
+
import 'lib/docs-tools/dist';
|
|
2
|
+
export { a as argTypesEnhancers, d as decorators, p as parameters, b as render, r as renderToDOM } from './types-b36ec9b7.js';
|
|
3
3
|
import '@storybook/csf';
|
|
4
|
-
import 'lib/addons/dist';
|
|
5
4
|
import '@storybook/store';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
2
|
-
import { H as HtmlFramework
|
|
2
|
+
import { H as HtmlFramework } from './types-b36ec9b7.js';
|
|
3
3
|
import { Args, ComponentAnnotations, AnnotatedStoryFn, StoryAnnotations } from '@storybook/csf';
|
|
4
4
|
export { ArgTypes, Args, Parameters } from '@storybook/csf';
|
|
5
|
-
import 'lib/docs-tools/dist
|
|
6
|
-
import 'lib/addons/dist';
|
|
5
|
+
import 'lib/docs-tools/dist';
|
|
7
6
|
import '@storybook/store';
|
|
8
7
|
|
|
9
8
|
interface ClientApi extends ClientStoryApi<HtmlFramework['storyResult']> {
|
|
10
|
-
setAddon(addon: any): void;
|
|
11
9
|
configure(loader: Loadable, module: NodeModule): void;
|
|
12
|
-
getStorybook(): IStorybookSection[];
|
|
13
|
-
clearDecorators(): void;
|
|
14
10
|
forceReRender(): void;
|
|
15
11
|
raw: () => any;
|
|
16
12
|
}
|
|
17
13
|
declare const storiesOf: ClientApi['storiesOf'];
|
|
18
14
|
declare const configure: ClientApi['configure'];
|
|
19
|
-
declare const addDecorator: ClientApi['addDecorator'];
|
|
20
|
-
declare const addParameters: ClientApi['addParameters'];
|
|
21
|
-
declare const clearDecorators: ClientApi['clearDecorators'];
|
|
22
|
-
declare const setAddon: ClientApi['setAddon'];
|
|
23
15
|
declare const forceReRender: ClientApi['forceReRender'];
|
|
24
|
-
declare const getStorybook: ClientApi['getStorybook'];
|
|
25
16
|
declare const raw: ClientApi['raw'];
|
|
26
17
|
|
|
27
18
|
/**
|
|
@@ -49,4 +40,4 @@ declare type StoryObj<TArgs = Args> = StoryAnnotations<HtmlFramework, TArgs>;
|
|
|
49
40
|
*/
|
|
50
41
|
declare type Story<TArgs = Args> = StoryObj<TArgs>;
|
|
51
42
|
|
|
52
|
-
export { Meta, Story, StoryFn, StoryObj,
|
|
43
|
+
export { Meta, Story, StoryFn, StoryObj, configure, forceReRender, raw, storiesOf };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var C=Object.create;var f=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var L=(e,o)=>{for(var r in o)f(e,r,{get:o[r],enumerable:!0})},a=(e,o,r,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of H(o))!h.call(e,t)&&t!==r&&f(e,t,{get:()=>o[t],enumerable:!(n=g(o,t))||n.enumerable});return e};var c=(e,o,r)=>(r=e!=null?C(b(e)):{},a(o||!e||!e.__esModule?f(r,"default",{value:e,enumerable:!0}):r,e)),T=e=>a(f({},"__esModule",{value:!0}),e);var N={};L(N,{configure:()=>S,forceReRender:()=>D,raw:()=>E,storiesOf:()=>k});module.exports=T(N);var u=c(require("global")),{window:x}=u.default;x.STORYBOOK_ENV="HTML";var R=require("@storybook/core-client");var y=c(require("global")),m=require("ts-dedent"),l=require("@storybook/preview-web"),{Node:F}=y.default,w=(e,o)=>{let{id:r,component:n}=o;if(typeof n=="string"){let t=n;return Object.keys(e).forEach(i=>{t=t.replace(`{{${i}}}`,e[i])}),t}if(n instanceof HTMLElement){let t=n.cloneNode(!0);return Object.keys(e).forEach(i=>{t.setAttribute(i,typeof e[i]=="string"?e[i]:JSON.stringify(e[i]))}),t}if(typeof n=="function")return n(e,o);throw console.warn(m.dedent`
|
|
2
2
|
Storybook's HTML renderer only supports rendering DOM elements and strings.
|
|
3
3
|
Received: ${n}
|
|
4
|
-
`),new Error(`Unable to render story ${r}`)};function
|
|
4
|
+
`),new Error(`Unable to render story ${r}`)};function O({storyFn:e,kind:o,name:r,showMain:n,showError:t,forceRemount:i},s){let p=e();if(n(),typeof p=="string")s.innerHTML=p,(0,l.simulatePageLoad)(s);else if(p instanceof F){if(s.firstChild===p&&i===!1)return;s.innerHTML="",s.appendChild(p),(0,l.simulateDOMContentLoaded)()}else t({title:`Expecting an HTML snippet or DOM node from the story: "${r}" of "${o}".`,description:m.dedent`
|
|
5
5
|
Did you forget to return the HTML snippet from the story?
|
|
6
6
|
Use "() => <your snippet or node>" or when defining the story.
|
|
7
|
-
`})}var
|
|
7
|
+
`})}var M="html",d=(0,R.start)(O,{render:w}),k=(e,o)=>d.clientApi.storiesOf(e,o).addParameters({framework:M}),S=(...e)=>d.configure(M,...e),D=d.forceReRender,E=d.clientApi.raw;var A;(A=module==null?void 0:module.hot)==null||A.decline();0&&(module.exports={configure,forceReRender,raw,storiesOf});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as n}from"./chunk-GYELUVFC.mjs";import
|
|
1
|
+
import{a as e,b as n}from"./chunk-GYELUVFC.mjs";import p from"global";var{window:m}=p;m.STORYBOOK_ENV="HTML";import{start as a}from"@storybook/core-client";var s="html",r=a(n,{render:e}),y=(o,i)=>r.clientApi.storiesOf(o,i).addParameters({framework:s}),d=(...o)=>r.configure(s,...o),c=r.forceReRender,g=r.clientApi.raw;module?.hot?.decline();export{d as configure,c as forceReRender,g as raw,y as storiesOf};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as _storybook_csf from '@storybook/csf';
|
|
2
2
|
import { PartialStoryFn, ArgsStoryFn, StoryContext as StoryContext$1 } from '@storybook/csf';
|
|
3
|
-
import * as
|
|
4
|
-
import * as lib_addons_dist from 'lib/addons/dist';
|
|
3
|
+
import * as lib_docs_tools_dist from 'lib/docs-tools/dist';
|
|
5
4
|
import { RenderContext } from '@storybook/store';
|
|
6
5
|
|
|
7
6
|
declare function sourceDecorator(storyFn: PartialStoryFn<HtmlFramework>, context: StoryContext): StoryFnHtmlReturnType;
|
|
8
7
|
|
|
9
8
|
declare const decorators: (typeof sourceDecorator)[];
|
|
10
|
-
declare const argTypesEnhancers: (<TFramework extends _storybook_csf.AnyFramework>(context: _storybook_csf.StoryContextForEnhancers<TFramework, _storybook_csf.Args>) => _storybook_csf.StrictArgTypes<_storybook_csf.Args>
|
|
9
|
+
declare const argTypesEnhancers: (<TFramework extends _storybook_csf.AnyFramework>(context: _storybook_csf.StoryContextForEnhancers<TFramework, _storybook_csf.Args>) => _storybook_csf.StrictArgTypes<_storybook_csf.Args>)[];
|
|
11
10
|
|
|
12
11
|
declare const render: ArgsStoryFn<HtmlFramework>;
|
|
13
12
|
declare function renderToDOM({ storyFn, kind, name, showMain, showError, forceRemount }: RenderContext<HtmlFramework>, domElement: Element): void;
|
|
@@ -17,7 +16,7 @@ declare const parameters: {
|
|
|
17
16
|
inlineStories: boolean;
|
|
18
17
|
transformSource: unknown;
|
|
19
18
|
source: {
|
|
20
|
-
type:
|
|
19
|
+
type: lib_docs_tools_dist.SourceType;
|
|
21
20
|
language: string;
|
|
22
21
|
code: unknown;
|
|
23
22
|
excludeDecorators: unknown;
|
|
@@ -27,14 +26,6 @@ declare const parameters: {
|
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
declare type StoryFnHtmlReturnType = string | Node;
|
|
30
|
-
interface IStorybookStory {
|
|
31
|
-
name: string;
|
|
32
|
-
render: (context: any) => any;
|
|
33
|
-
}
|
|
34
|
-
interface IStorybookSection {
|
|
35
|
-
kind: string;
|
|
36
|
-
stories: IStorybookStory[];
|
|
37
|
-
}
|
|
38
29
|
declare type HtmlFramework = {
|
|
39
30
|
component: string | HTMLElement | ArgsStoryFn<HtmlFramework>;
|
|
40
31
|
storyResult: StoryFnHtmlReturnType;
|
|
@@ -43,4 +34,4 @@ declare type StoryContext = StoryContext$1<HtmlFramework> & {
|
|
|
43
34
|
parameters: StoryContext$1<HtmlFramework>['parameters'] & typeof parameters;
|
|
44
35
|
};
|
|
45
36
|
|
|
46
|
-
export { HtmlFramework as H,
|
|
37
|
+
export { HtmlFramework as H, argTypesEnhancers as a, render as b, decorators as d, parameters as p, renderToDOM as r };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/html",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.39",
|
|
4
4
|
"description": "Storybook HTML renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"prep": "../../../scripts/prepare/bundle.ts"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
54
|
-
"@storybook/core-client": "7.0.0-alpha.
|
|
53
|
+
"@storybook/addons": "7.0.0-alpha.39",
|
|
54
|
+
"@storybook/core-client": "7.0.0-alpha.39",
|
|
55
55
|
"@storybook/csf": "0.0.2--canary.49.258942b.0",
|
|
56
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
57
|
-
"@storybook/preview-web": "7.0.0-alpha.
|
|
58
|
-
"@storybook/store": "7.0.0-alpha.
|
|
56
|
+
"@storybook/docs-tools": "7.0.0-alpha.39",
|
|
57
|
+
"@storybook/preview-web": "7.0.0-alpha.39",
|
|
58
|
+
"@storybook/store": "7.0.0-alpha.39",
|
|
59
59
|
"global": "^4.4.0",
|
|
60
60
|
"react": "16.14.0",
|
|
61
61
|
"react-dom": "16.14.0",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
],
|
|
81
81
|
"platform": "browser"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "47386bd49d141ea70daac41ab3e4d52749fc5da9"
|
|
84
84
|
}
|