@storybook/html 7.0.0-alpha.10 → 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-FVE7GUDN.mjs +4 -0
- package/dist/config.js +2 -2
- package/dist/config.mjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +17 -12
- package/dist/chunk-RJRHENSI.mjs +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var d=Object.defineProperty;var i=(o,r)=>d(o,"name",{value:r,configurable:!0});import a from"global";import{dedent as h}from"ts-dedent";import{simulatePageLoad as l,simulateDOMContentLoaded as u}from"@storybook/preview-web";var{Node:M}=a;function D({storyFn:o,kind:r,name:n,showMain:s,showError:f,forceRemount:p},e){let t=o();if(s(),typeof t=="string")e.innerHTML=t,l(e);else if(t instanceof M){if(e.firstChild===t&&p===!1)return;e.innerHTML="",e.appendChild(t),u()}else f({title:`Expecting an HTML snippet or DOM node from the story: "${n}" of "${r}".`,description:h`
|
|
2
|
+
Did you forget to return the HTML snippet from the story?
|
|
3
|
+
Use "() => <your snippet or node>" or when defining the story.
|
|
4
|
+
`})}i(D,"renderToDOM");export{i as a,D as b};
|
package/dist/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
"use strict";var C=Object.create;var p=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var i=(e,r)=>p(e,"name",{value:r,configurable:!0});var A=(e,r)=>{for(var o in r)p(e,o,{get:r[o],enumerable:!0})},c=(e,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of H(r))!O.call(e,t)&&t!==o&&p(e,t,{get:()=>r[t],enumerable:!(s=L(r,t))||s.enumerable});return e};var E=(e,r,o)=>(o=e!=null?C(N(e)):{},c(r||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),I=e=>c(p({},"__esModule",{value:!0}),e);var $={};A($,{decorators:()=>D,parameters:()=>Y,renderToDOM:()=>h});module.exports=I($);var g=require("@storybook/docs-tools");var a=require("@storybook/docs-tools"),u=require("@storybook/addons"),l=require("ts-dedent");function R(e){var s;let r=(s=e==null?void 0:e.parameters.docs)==null?void 0:s.source,o=e==null?void 0:e.parameters.__isArgsStory;return(r==null?void 0:r.type)===a.SourceType.DYNAMIC?!1:!o||(r==null?void 0:r.code)||(r==null?void 0:r.type)===a.SourceType.CODE}i(R,"skipSourceRender");function _(e){return(0,l.dedent)(e)}i(_,"defaultTransformSource");function k(e,r){return((r.parameters.docs??{}).transformSource??_)(e,r)}i(k,"applyTransformSource");function y(e,r){var t,d;let o=(d=(t=r==null?void 0:r.parameters.docs)==null?void 0:t.source)!=null&&d.excludeDecorators?r.originalStoryFn(r.args,r):e(),s;return R(r)||(typeof o=="string"?s=o:o instanceof Element&&(s=o.outerHTML),s&&(s=k(s,r))),(0,u.useEffect)(()=>{s&&u.addons.getChannel().emit(a.SNIPPET_RENDERED,r.id,s)}),o}i(y,"sourceDecorator");var D=[y],S={docs:{inlineStories:!0,transformSource:void 0,source:{type:g.SourceType.DYNAMIC,language:"html",code:void 0,excludeDecorators:void 0}}};var T=E(require("global")),M=require("ts-dedent"),m=require("@storybook/preview-web"),{Node:w}=T.default;function h({storyFn:e,kind:r,name:o,showMain:s,showError:t,forceRemount:d},n){let f=e();if(s(),typeof f=="string")n.innerHTML=f,(0,m.simulatePageLoad)(n);else if(f instanceof w){if(n.firstChild===f&&d===!1)return;n.innerHTML="",n.appendChild(f),(0,m.simulateDOMContentLoaded)()}else t({title:`Expecting an HTML snippet or DOM node from the story: "${o}" of "${r}".`,description:M.dedent`
|
|
2
2
|
Did you forget to return the HTML snippet from the story?
|
|
3
3
|
Use "() => <your snippet or node>" or when defining the story.
|
|
4
|
-
`})}i(
|
|
4
|
+
`})}i(h,"renderToDOM");var Y={framework:"html",...S};0&&(module.exports={decorators,parameters,renderToDOM});
|
package/dist/config.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
"use strict";import{a as t,b as f}from"./chunk-FVE7GUDN.mjs";import{SourceType as D}from"@storybook/docs-tools";import{SNIPPET_RENDERED as m,SourceType as a}from"@storybook/docs-tools";import{addons as i,useEffect as p}from"@storybook/addons";import{dedent as d}from"ts-dedent";function l(e){let r=e?.parameters.docs?.source,o=e?.parameters.__isArgsStory;return r?.type===a.DYNAMIC?!1:!o||r?.code||r?.type===a.CODE}t(l,"skipSourceRender");function S(e){return d(e)}t(S,"defaultTransformSource");function y(e,r){return((r.parameters.docs??{}).transformSource??S)(e,r)}t(y,"applyTransformSource");function c(e,r){let o=r?.parameters.docs?.source?.excludeDecorators?r.originalStoryFn(r.args,r):e(),s;return l(r)||(typeof o=="string"?s=o:o instanceof Element&&(s=o.outerHTML),s&&(s=y(s,r))),p(()=>{s&&i.getChannel().emit(m,r.id,s)}),o}t(c,"sourceDecorator");var g=[c],u={docs:{inlineStories:!0,transformSource:void 0,source:{type:D.DYNAMIC,language:"html",code:void 0,excludeDecorators:void 0}}};var I={framework:"html",...u};export{g as decorators,I as parameters,f as renderToDOM};
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
"use strict";var D=Object.create;var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var c=(o,e)=>p(o,"name",{value:e,configurable:!0});var R=(o,e)=>{for(var t in e)p(o,t,{get:e[t],enumerable:!0})},f=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of T(e))!L.call(o,n)&&n!==t&&p(o,n,{get:()=>e[n],enumerable:!(a=y(e,n))||a.enumerable});return o};var l=(o,e,t)=>(t=o!=null?D(w(o)):{},f(e||!o||!o.__esModule?p(t,"default",{value:o,enumerable:!0}):t,o)),b=o=>f(p({},"__esModule",{value:!0}),o);var U={};R(U,{addDecorator:()=>S,addParameters:()=>K,clearDecorators:()=>N,configure:()=>C,forceReRender:()=>$,getStorybook:()=>B,raw:()=>F,setAddon:()=>W,storiesOf:()=>k});module.exports=b(U);var m=l(require("global")),{window:H}=m.default;H.STORYBOOK_ENV="HTML";var A=require("@storybook/core-client");var x=l(require("global")),g=require("ts-dedent"),d=require("@storybook/preview-web"),{Node:P}=x.default;function u({storyFn:o,kind:e,name:t,showMain:a,showError:n,forceRemount:h},i){let s=o();if(a(),typeof s=="string")i.innerHTML=s,(0,d.simulatePageLoad)(i);else if(s instanceof P){if(i.firstChild===s&&h===!1)return;i.innerHTML="",i.appendChild(s),(0,d.simulateDOMContentLoaded)()}else n({title:`Expecting an HTML snippet or DOM node from the story: "${t}" of "${e}".`,description:g.dedent`
|
|
2
2
|
Did you forget to return the HTML snippet from the story?
|
|
3
3
|
Use "() => <your snippet or node>" or when defining the story.
|
|
4
|
-
`})}c(
|
|
4
|
+
`})}c(u,"renderToDOM");var M="html",r=(0,A.start)(u),k=c((o,e)=>r.clientApi.storiesOf(o,e).addParameters({framework:M}),"storiesOf"),C=c((...o)=>r.configure(M,...o),"configure"),S=r.clientApi.addDecorator,K=r.clientApi.addParameters,N=r.clientApi.clearDecorators,W=r.clientApi.setAddon,$=r.forceReRender,B=r.clientApi.getStorybook,F=r.clientApi.raw;var O;(O=module==null?void 0:module.hot)==null||O.decline();0&&(module.exports={addDecorator,addParameters,clearDecorators,configure,forceReRender,getStorybook,raw,setAddon,storiesOf});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
"use strict";import{a as t,b as c}from"./chunk-FVE7GUDN.mjs";import a from"global";var{window:p}=a;p.STORYBOOK_ENV="HTML";import{start as s}from"@storybook/core-client";var n="html",o=s(c),f=t((r,i)=>o.clientApi.storiesOf(r,i).addParameters({framework:n}),"storiesOf"),x=t((...r)=>o.configure(n,...r),"configure"),A=o.clientApi.addDecorator,O=o.clientApi.addParameters,R=o.clientApi.clearDecorators,g=o.clientApi.setAddon,w=o.forceReRender,D=o.clientApi.getStorybook,b=o.clientApi.raw;module?.hot?.decline();export{A as addDecorator,O as addParameters,R as clearDecorators,x as configure,w as forceReRender,D as getStorybook,b as raw,g as setAddon,f as storiesOf};
|
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.11",
|
|
4
4
|
"description": "Storybook HTML renderer",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -46,15 +46,16 @@
|
|
|
46
46
|
"*.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"scripts": {
|
|
49
|
+
"check": "tsc --noEmit",
|
|
49
50
|
"prepare": "esrun ../../scripts/prepare/bundle.ts"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
53
|
-
"@storybook/core-client": "7.0.0-alpha.
|
|
53
|
+
"@storybook/addons": "7.0.0-alpha.11",
|
|
54
|
+
"@storybook/core-client": "7.0.0-alpha.11",
|
|
54
55
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
55
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
56
|
-
"@storybook/preview-web": "7.0.0-alpha.
|
|
57
|
-
"@storybook/store": "7.0.0-alpha.
|
|
56
|
+
"@storybook/docs-tools": "7.0.0-alpha.11",
|
|
57
|
+
"@storybook/preview-web": "7.0.0-alpha.11",
|
|
58
|
+
"@storybook/store": "7.0.0-alpha.11",
|
|
58
59
|
"core-js": "^3.8.2",
|
|
59
60
|
"global": "^4.4.0",
|
|
60
61
|
"react": "16.14.0",
|
|
@@ -62,7 +63,8 @@
|
|
|
62
63
|
"ts-dedent": "^2.0.0"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
|
-
"@digitak/esrun": "^3.2.2"
|
|
66
|
+
"@digitak/esrun": "^3.2.2",
|
|
67
|
+
"typescript": "~4.6.3"
|
|
66
68
|
},
|
|
67
69
|
"peerDependencies": {
|
|
68
70
|
"@babel/core": "*"
|
|
@@ -73,9 +75,12 @@
|
|
|
73
75
|
"publishConfig": {
|
|
74
76
|
"access": "public"
|
|
75
77
|
},
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
"bundler": {
|
|
79
|
+
"entries": [
|
|
80
|
+
"./src/index.ts",
|
|
81
|
+
"./src/config.ts"
|
|
82
|
+
],
|
|
83
|
+
"platform": "browser"
|
|
84
|
+
},
|
|
85
|
+
"gitHead": "688d338903e84a7e83cb104472e868e734399f65"
|
|
81
86
|
}
|
package/dist/chunk-RJRHENSI.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var f=Object.defineProperty;var n=Object.getOwnPropertySymbols;var l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;var s=(o,e,t)=>e in o?f(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,T=(o,e)=>{for(var t in e||(e={}))l.call(e,t)&&s(o,t,e[t]);if(n)for(var t of n(e))u.call(e,t)&&s(o,t,e[t]);return o};var p=(o,e)=>f(o,"name",{value:e,configurable:!0});import M from"global";import c from"ts-dedent";import{simulatePageLoad as g,simulateDOMContentLoaded as y}from"@storybook/preview-web";var{Node:L}=M;function $({storyFn:o,kind:e,name:t,showMain:d,showError:a,forceRemount:h},r){let i=o();if(d(),typeof i=="string")r.innerHTML=i,g(r);else if(i instanceof L){if(r.firstChild===i&&h===!1)return;r.innerHTML="",r.appendChild(i),y()}else a({title:`Expecting an HTML snippet or DOM node from the story: "${t}" of "${e}".`,description:c`
|
|
2
|
-
Did you forget to return the HTML snippet from the story?
|
|
3
|
-
Use "() => <your snippet or node>" or when defining the story.
|
|
4
|
-
`})}p($,"renderToDOM");export{T as a,p as b,$ as c};
|