UNPKG

@stories-js/core

Version:

Stories web components to build stories

5 lines 2.91 kB
var __awaiter=this&&this.__awaiter||function(t,n,e,o){function r(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,i){function u(t){try{a(o.next(t))}catch(n){i(n)}}function s(t){try{a(o["throw"](t))}catch(n){i(n)}}function a(t){t.done?e(t.value):r(t.value).then(u,s)}a((o=o.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(t){return function(n){return a([t,n])}}function a(u){if(o)throw new TypeError("Generator is already executing.");while(e)try{if(o=1,r&&(i=u[0]&2?r["return"]:u[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;if(r=0,i)u=[u[0]&2,i.value];switch(u[0]){case 0:case 1:i=u;break;case 4:e.label++;return{value:u[1],done:false};case 5:e.label++;r=u[1];u=[0];continue;case 7:u=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){e.label=u[1];break}if(u[0]===6&&e.label<i[1]){e.label=i[1];i=u;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(u);break}if(i[2])e.ops.pop();e.trys.pop();continue}u=n.call(t,e)}catch(s){u=[6,s];r=0}finally{o=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}}; /*! * (C) StoriesJS https://storiesjs.org - GPL-2.0 License */System.register(["./p-fbcb0011.system.js","./p-73ad0c01.system.js","./p-6a7c8a99.system.js","./p-3d5a0b0e.system.js"],(function(t){"use strict";var n,e,o,r,i,u;return{setters:[function(t){n=t.r;e=t.h;o=t.c;r=t.g},function(t){i=t.a},function(t){u=t.m},function(){}],execute:function(){var s="CONTROL_EVENT";var a=":host{display:block}";var c=t("stories_addon_controls",function(){function t(t){n(this,t);this.controls=[];this.onControl=function(t){console.log("onControl.event",t)}}t.prototype.title=function(){return"Controls"};t.prototype.storyContextChanged=function(t,n){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){console.log("AddonControls.storyContextChanged",t,n);return[2]}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){i.registerAddon(this);u.on(s,this.onControl);return[2]}))}))};t.prototype.disconnectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){u.off(s,this.onControl);i.unregisterAddon(this);return[2]}))}))};t.prototype.render=function(){return e(o,null,e("div",null,"Addon Controls"))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});return t}());c.style=a}}})); //# sourceMappingURL=p-2c216ed1.system.entry.js.map