@storybook/manager 7.0.0-alpha.50 → 7.0.0-alpha.51
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/{GlobalScrollAreaStyles-U4ZZS3FK-3DQJTLYL.mjs → GlobalScrollAreaStyles-U4ZZS3FK-W5FFVDOX.mjs} +1 -1
- package/dist/{WithTooltip-B4PSTFYN-C5PSGGU6.mjs → WithTooltip-B4PSTFYN-Z7VQSNZK.mjs} +1 -1
- package/dist/{chunk-KHJLZRDT.mjs → chunk-DO4DMVS7.mjs} +5 -5
- package/dist/{chunk-HIOBFJTH.mjs → chunk-OPTKCFWO.mjs} +4 -4
- package/dist/{chunk-YAUJ367U.mjs → chunk-QDDROSJA.mjs} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +44 -44
- package/dist/index.mjs +1 -1
- package/dist/runtime.js +72 -72
- package/dist/runtime.mjs +1 -1
- package/dist/{syntaxhighlighter-5RSM6NKF-AWODVGGG.mjs → syntaxhighlighter-5RSM6NKF-Y2L6ESHU.mjs} +1 -1
- package/package.json +15 -15
package/dist/runtime.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as te,b as T,c as F,d as f,e as d,f as g,g as u,h as L,i as D,j as y,k as I,l as b,m as K,n as x,p as B}from"./chunk-DO4DMVS7.mjs";import{a as C}from"./chunk-ZZWMINIV.mjs";import"./chunk-QDDROSJA.mjs";import{a as ee}from"./chunk-U4FGYVCJ.mjs";import"./chunk-M6WCQ5XD.mjs";import{a as v,b as h,d as k,e as N,s as $}from"./chunk-OPTKCFWO.mjs";import{b as Z}from"./chunk-7P7MBUK4.mjs";import"./chunk-JVL5FG27.mjs";import"./chunk-XMWX3DS4.mjs";import{e as c}from"./chunk-7AG3PZXC.mjs";var E=c(v());var w=c(v(),1);var P=c(te(),1),{window:n,document:p,location:S}=w.default,H="storybook-channel",re={allowFunction:!0,maxDepth:25},oe=class{constructor(e){if(this.config=e,this.buffer=[],this.handler=null,n&&n.addEventListener("message",this.handleEvent.bind(this),!1),e.page!=="manager"&&e.page!=="preview")throw new Error(`postmsg-channel: "config.page" cannot be "${e.page}"`)}setHandler(e){this.handler=(...t)=>{e.apply(this,t),!this.connected&&this.getLocalFrame().length&&(this.flush(),this.connected=!0)}}send(e,t){let{target:r,allowRegExp:o,allowFunction:s,allowSymbol:i,allowDate:a,allowUndefined:l,allowClass:q,maxDepth:M,space:G,lazyEval:V}=t||{},z=Object.fromEntries(Object.entries({allowRegExp:o,allowFunction:s,allowSymbol:i,allowDate:a,allowUndefined:l,allowClass:q,maxDepth:M,space:G,lazyEval:V}).filter(([m,O])=>typeof O<"u")),J={...re,...w.default.CHANNEL_OPTIONS||{},...z},R=this.getFrames(r),Q=P.default.parse(S.search,{ignoreQueryPrefix:!0}),X=g({key:H,event:e,refId:Q.refId},J);return R.length?(this.buffer.length&&this.flush(),R.forEach(m=>{try{m.postMessage(X,"*")}catch{console.error("sending over postmessage fail")}}),Promise.resolve(null)):new Promise((m,O)=>{this.buffer.push({event:e,resolve:m,reject:O})})}flush(){let{buffer:e}=this;this.buffer=[],e.forEach(t=>{this.send(t.event).then(t.resolve).catch(t.reject)})}getFrames(e){if(this.config.page==="manager"){let t=[...p.querySelectorAll("iframe[data-is-storybook][data-is-loaded]")].filter(r=>{try{return!!r.contentWindow&&r.dataset.isStorybook!==void 0&&r.id===e}catch{return!1}}).map(r=>r.contentWindow);return t.length?t:this.getCurrentFrames()}return n&&n.parent&&n.parent!==n?[n.parent]:[]}getCurrentFrames(){return this.config.page==="manager"?[...p.querySelectorAll('[data-is-storybook="true"]')].map(e=>e.contentWindow):n&&n.parent?[n.parent]:[]}getLocalFrame(){return this.config.page==="manager"?[...p.querySelectorAll("#storybook-preview-iframe")].map(e=>e.contentWindow):n&&n.parent?[n.parent]:[]}handleEvent(e){try{let{data:t}=e,{key:r,event:o,refId:s}=typeof t=="string"&&d(t)?u(t,w.default.CHANNEL_OPTIONS||{}):t;if(r===H){let i=this.config.page==="manager"?'<span style="color: #37D5D3; background: black"> manager </span>':'<span style="color: #1EA7FD; background: black"> preview </span>',a=Object.values(f).includes(o.type)?`<span style="color: #FF4785">${o.type}</span>`:`<span style="color: #FFAE00">${o.type}</span>`;if(s&&(o.refId=s),o.source=this.config.page==="preview"?e.origin:ne(e),!o.source){k.error(`${i} received ${a} but was unable to determine the source of the event`);return}let l=`${i} received ${a} (${t.length})`;k.debug(S.origin!==o.source?l:`${l} <span style="color: gray">(on ${S.origin} from ${o.source})</span>`,...o.args),this.handler(o)}}catch(t){h.error(t)}}},ne=e=>{let t=[...p.querySelectorAll("iframe[data-is-storybook]")],[r,...o]=t.filter(s=>{try{return s.contentWindow===e.source}catch{}let i=s.getAttribute("src"),a;try{({origin:a}=new URL(i,p.location))}catch{return!1}return a===e.origin});if(r&&o.length===0){let s=r.getAttribute("src"),{protocol:i,host:a,pathname:l}=new URL(s,p.location);return`${i}//${a}${l}`}return o.length>0&&h.error("found multiple candidates for event source"),null};function Y({page:e}){let t=new oe({page:e});return new y({transport:t})}var _=c(v(),1);var{WebSocket:ae}=_.default,ie=class{constructor({url:e,onError:t}){this.buffer=[],this.isReady=!1,this.connect(e,t)}setHandler(e){this.handler=e}send(e){this.isReady?this.sendNow(e):this.sendLater(e)}sendLater(e){this.buffer.push(e)}sendNow(e){let t=g(e,{maxDepth:15,allowFunction:!0});this.socket.send(t)}flush(){let{buffer:e}=this;this.buffer=[],e.forEach(t=>this.send(t))}connect(e,t){this.socket=new ae(e),this.socket.onopen=()=>{this.isReady=!0,this.flush()},this.socket.onmessage=({data:r})=>{let o=typeof r=="string"&&d(r)?u(r):r;this.handler(o)},this.socket.onerror=r=>{t&&t(r)}}};function U({url:e,async:t=!1,onError:r=o=>h.warn(o)}){let o=new ie({url:e,onError:r});return new y({transport:o,async:t})}var ce=c(Z()),pe=c(ee());var W={react:ce,"react-dom":pe,"@storybook/components":D,"@storybook/channels":I,"@storybook/core-events":f,"@storybook/router":T,"@storybook/theming":$,"@storybook/api":L,"@storybook/addons":K,"@storybook/client-logger":N};var{FEATURES:he,SERVER_CHANNEL_URL:j}=E.default,A=class extends x{constructor(){super();let r=Y({page:"manager"});if(b.setChannel(r),r.emit(F),this.addons=b,this.channel=r,he?.storyStoreV7&&j){let o=U({url:j});this.serverChannel=o,b.setServerChannel(this.serverChannel)}}getElements(r){return this.addons.getElements(r)}getConfig(){return this.addons.getConfig()}handleAPI(r){this.addons.loadAddons(r)}},{document:me}=E.default,fe=me.getElementById("root");B(fe,new A);Object.keys(C).forEach(e=>{E.default[C[e]]=W[e]});
|
package/dist/{syntaxhighlighter-5RSM6NKF-AWODVGGG.mjs → syntaxhighlighter-5RSM6NKF-Y2L6ESHU.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,d as t,e as r}from"./chunk-
|
|
1
|
+
import{c as o,d as t,e as r}from"./chunk-QDDROSJA.mjs";import"./chunk-M6WCQ5XD.mjs";import"./chunk-OPTKCFWO.mjs";import"./chunk-7P7MBUK4.mjs";import"./chunk-JVL5FG27.mjs";import"./chunk-XMWX3DS4.mjs";import"./chunk-7AG3PZXC.mjs";export{t as SyntaxHighlighter,o as createCopyToClipboardFunction,r as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/manager",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.51",
|
|
4
4
|
"description": "Core Storybook UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
|
56
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
57
|
-
"@storybook/api": "7.0.0-alpha.
|
|
58
|
-
"@storybook/channel-postmessage": "7.0.0-alpha.
|
|
59
|
-
"@storybook/channel-websocket": "7.0.0-alpha.
|
|
60
|
-
"@storybook/channels": "7.0.0-alpha.
|
|
61
|
-
"@storybook/client-logger": "7.0.0-alpha.
|
|
62
|
-
"@storybook/components": "7.0.0-alpha.
|
|
63
|
-
"@storybook/core-events": "7.0.0-alpha.
|
|
64
|
-
"@storybook/router": "7.0.0-alpha.
|
|
65
|
-
"@storybook/theming": "7.0.0-alpha.
|
|
66
|
-
"@storybook/types": "7.0.0-alpha.
|
|
56
|
+
"@storybook/addons": "7.0.0-alpha.51",
|
|
57
|
+
"@storybook/api": "7.0.0-alpha.51",
|
|
58
|
+
"@storybook/channel-postmessage": "7.0.0-alpha.51",
|
|
59
|
+
"@storybook/channel-websocket": "7.0.0-alpha.51",
|
|
60
|
+
"@storybook/channels": "7.0.0-alpha.51",
|
|
61
|
+
"@storybook/client-logger": "7.0.0-alpha.51",
|
|
62
|
+
"@storybook/components": "7.0.0-alpha.51",
|
|
63
|
+
"@storybook/core-events": "7.0.0-alpha.51",
|
|
64
|
+
"@storybook/router": "7.0.0-alpha.51",
|
|
65
|
+
"@storybook/theming": "7.0.0-alpha.51",
|
|
66
|
+
"@storybook/types": "7.0.0-alpha.51",
|
|
67
67
|
"@testing-library/react": "^11.2.2",
|
|
68
68
|
"@types/semver": "^7.3.4",
|
|
69
69
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"memoizerific": "^1.11.3",
|
|
78
78
|
"polished": "^4.2.2",
|
|
79
79
|
"qs": "^6.10.0",
|
|
80
|
-
"react": "^16.
|
|
80
|
+
"react": "^16.14.0",
|
|
81
81
|
"react-dom": "^16.8.0",
|
|
82
82
|
"react-draggable": "^4.4.3",
|
|
83
83
|
"react-helmet-async": "^1.0.7",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"shelljs": "^0.8.5",
|
|
88
88
|
"store2": "^2.12.0",
|
|
89
89
|
"ts-dedent": "^2.0.0",
|
|
90
|
-
"typescript": "
|
|
90
|
+
"typescript": "^4.9.3"
|
|
91
91
|
},
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"access": "public"
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"./src/runtime.ts"
|
|
101
101
|
]
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "4fec76c3f5135854d9834ebc1cf2f1f325696ded"
|
|
104
104
|
}
|