UNPKG

@stories-js/core

Version:

Stories web components to build stories

5 lines 5.34 kB
/*! * (C) StoriesJS https://storiesjs.org - GPL-2.0 License */ import{p as plt,w as win,d as doc,N as NAMESPACE,a as promiseResolve,H,b as bootstrapLazy}from"./index-49238f69.js";import{g as globalScripts}from"./app-globals-6a29d533.js";import"./stories-global-b1a53c4e.js";var getDynamicImportFunction=function(e){return"__sc_import_".concat(e.replace(/\s|-/g,"_"))};var patchBrowser=function(){{plt.$cssShim$=win.__cssshim}{patchCloneNodeFix(H.prototype)}var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(NAMESPACE,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE}));var t=e["data-opts"]||{};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{t.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,win.location.href)).href;{patchDynamicImport(t.resourcesUrl,e)}if(!win.customElements){return import("./dom-73dc9fb2.js").then((function(){return t}))}}return promiseResolve(t)};var patchDynamicImport=function(e,t){var s=getDynamicImportFunction(NAMESPACE);try{win[s]=new Function("w","return import(w);//".concat(Math.random()))}catch(r){var o=new Map;win[s]=function(r){var i=new URL(r,e).href;var n=o.get(i);if(!n){var a=doc.createElement("script");a.type="module";a.crossOrigin=t.crossOrigin;a.src=URL.createObjectURL(new Blob(["import * as m from '".concat(i,"'; window.").concat(s,".m = m;")],{type:"application/javascript"}));n=new Promise((function(e){a.onload=function(){e(win[s].m);a.remove()}}));o.set(i,n);doc.head.appendChild(a)}return n}}};var patchCloneNodeFix=function(e){var t=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return t.call(this,e)}var s=t.call(this,false);var o=this.childNodes;if(e){for(var r=0;r<o.length;r++){if(o[r].nodeType!==2){s.appendChild(o[r].cloneNode(true))}}}return s}};patchBrowser().then((function(e){globalScripts();return bootstrapLazy([["stories-tool-zoom",[[1,"stories-tool-zoom"]]],["stories-preview",[[1,"stories-preview"]]],["stories-searchbar",[[1,"stories-searchbar",{color:[513],cancelButtonIcon:[1,"cancel-button-icon"],clearIcon:[1,"clear-icon"],debounce:[2],disabled:[4],inputmode:[1],placeholder:[1],searchIcon:[1,"search-icon"],showCancelButton:[1,"show-cancel-button"],showClearButton:[1,"show-clear-button"],type:[1],value:[1025],focused:[32],setFocus:[64],getInputElement:[64]}]]],["stories-addon-actions",[[1,"stories-addon-actions",{actions:[32],storyContextChanged:[64]}]]],["stories-addon-controls",[[1,"stories-addon-controls",{controls:[32],storyContextChanged:[64]}]]],["stories-addons",[[1,"stories-addons",{registerAddon:[64],unregisterAddon:[64],findAddon:[64],storyContextChanged:[64]}]]],["stories-app",[[1,"stories-app",{modules:[16],store:[1040]},[[8,"hashchange","onHash"]]]]],["stories-badge",[[1,"stories-badge",{color:[513]}]]],["stories-button",[[1,"stories-button",{color:[513],buttonType:[1025,"button-type"],disabled:[516],expand:[513],fill:[1537],routerDirection:[1,"router-direction"],href:[1],shape:[513],type:[1],size:[513],strong:[4],target:[1]}]]],["stories-buttons",[[1,"stories-buttons",{collapse:[4]}]]],["stories-checkbox",[[1,"stories-checkbox",{color:[513],name:[1],checked:[1028],indeterminate:[1028],disabled:[4],value:[8]}]]],["stories-col",[[1,"stories-col",{offset:[1],offsetXs:[1,"offset-xs"],offsetSm:[1,"offset-sm"],offsetMd:[1,"offset-md"],offsetLg:[1,"offset-lg"],offsetXl:[1,"offset-xl"],pull:[1],pullXs:[1,"pull-xs"],pullSm:[1,"pull-sm"],pullMd:[1,"pull-md"],pullLg:[1,"pull-lg"],pullXl:[1,"pull-xl"],push:[1],pushXs:[1,"push-xs"],pushSm:[1,"push-sm"],pushMd:[1,"push-md"],pushLg:[1,"push-lg"],pushXl:[1,"push-xl"],size:[1],sizeXs:[1,"size-xs"],sizeSm:[1,"size-sm"],sizeMd:[1,"size-md"],sizeLg:[1,"size-lg"],sizeXl:[1,"size-xl"]},[[9,"resize","onResize"]]]]],["stories-footer",[[1,"stories-footer"]]],["stories-grid",[[1,"stories-grid",{fixed:[4]}]]],["stories-input",[[1,"stories-input",{fireFocusEvents:[4,"fire-focus-events"],color:[513],autofocus:[4],clearInput:[4,"clear-input"],debounce:[2],disabled:[4],inputmode:[1],max:[1],maxlength:[2],min:[1],minlength:[2],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],step:[1],size:[2],type:[1],value:[1032],hasFocus:[32],setFocus:[64],setBlur:[64],getInputElement:[64]}]]],["stories-label",[[1,"stories-label",{color:[513],position:[1]}]]],["stories-router",[[1,"stories-router"]]],["stories-row",[[1,"stories-row"]]],["stories-sidebar",[[1,"stories-sidebar"]]],["stories-split-pane",[[1,"stories-split-pane",{split:[1],minSize:[2,"min-size"],defaultSize:[2,"default-size"],isResizing:[1540,"resizing"]}]]],["stories-tab",[[1,"stories-tab",{active:[1028],tab:[1]}]]],["stories-tab-bar",[[1,"stories-tab-bar",{color:[513],selectedTab:[1,"selected-tab"]}]]],["stories-tab-button",[[1,"stories-tab-button",{disabled:[4],layout:[1025],selected:[1028],tab:[1]},[[8,"storiesTabBarChanged","onTabBarChanged"]]]]],["stories-tabs",[[1,"stories-tabs",{selectedTab:[32],select:[64],getTab:[64],getSelected:[64]}]]],["stories-tool-bar",[[1,"stories-tool-bar"]]],["stories-tool-button",[[1,"stories-tool-button",{disabled:[4],icon:[1],command:[1]}]]],["stories-zoom",[[1,"stories-zoom",{zoom:[2],div:[32],height:[32]}]]],["stories-icon",[[1,"stories-icon",{name:[1]}]]]],e)})); //# sourceMappingURL=core.js.map