smoothly 1.2.1-alpha.65 → 1.2.1-alpha.66

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.
@@ -11,7 +11,7 @@ export class Notifier {
11
11
  this.notices = [...this.notices.filter(n => n != event.detail)];
12
12
  }
13
13
  render() {
14
- return (h(Host, { key: '7e71527eb9d845d83a31a54fb59a516fef7d2985' }, h("slot", { key: '8da2fa5664ae5c4453e06ab14b73c7f8335fd72a' }), h("aside", { key: '172f4747f63be1ae3447984be465240d8c416c41' }, this.notices.map(n => (h("smoothly-notification", { notice: n, icon: this.icon }))))));
14
+ return (h(Host, { key: '7e71527eb9d845d83a31a54fb59a516fef7d2985' }, h("slot", { key: '8da2fa5664ae5c4453e06ab14b73c7f8335fd72a' }), h("div", { key: 'b19ec204f8215f9f552422990263e2a89b320082', class: "smoothly-notifier-wrapper" }, this.notices.map(n => (h("smoothly-notification", { notice: n, icon: this.icon }))))));
15
15
  }
16
16
  static get is() { return "smoothly-notifier"; }
17
17
  static get encapsulation() { return "scoped"; }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/notifier/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAQvE,MAAM,OAAO,QAAQ;;oBACL,KAAK;uBACS,EAAE;;IAG/B,QAAQ,CAAC,KAA0B;QAClC,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/C,CAAC;IAED,QAAQ,CAAC,KAA0B;QAClC,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;IAChE,CAAC;IACD,MAAM;QACL,OAAO,CACN,EAAC,IAAI;YACJ,8DAAQ;YACR,gEACE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CACtB,6BAAuB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CACrD,CAAC,CACK,CACF,CACP,CAAA;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Host, Listen, Prop, State } from \"@stencil/core\"\nimport { Notice } from \"../../model\"\n\n@Component({\n\ttag: \"smoothly-notifier\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class Notifier {\n\t@Prop() icon = false\n\t@State() notices: Notice[] = []\n\n\t@Listen(\"notice\")\n\tonNotice(event: CustomEvent<Notice>) {\n\t\tthis.notices = [...this.notices, event.detail]\n\t}\n\t@Listen(\"remove\")\n\tonRemove(event: CustomEvent<Notice>) {\n\t\tthis.notices = [...this.notices.filter(n => n != event.detail)]\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<slot />\n\t\t\t\t<aside>\n\t\t\t\t\t{this.notices.map(n => (\n\t\t\t\t\t\t<smoothly-notification notice={n} icon={this.icon} />\n\t\t\t\t\t))}\n\t\t\t\t</aside>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/notifier/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAQvE,MAAM,OAAO,QAAQ;;oBACL,KAAK;uBACS,EAAE;;IAG/B,QAAQ,CAAC,KAA0B;QAClC,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/C,CAAC;IAED,QAAQ,CAAC,KAA0B;QAClC,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;IAChE,CAAC;IACD,MAAM;QACL,OAAO,CACN,EAAC,IAAI;YACJ,8DAAQ;YACR,4DAAK,KAAK,EAAC,2BAA2B,IACpC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CACtB,6BAAuB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CACrD,CAAC,CACG,CACA,CACP,CAAA;IACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, h, Host, Listen, Prop, State } from \"@stencil/core\"\nimport { Notice } from \"../../model\"\n\n@Component({\n\ttag: \"smoothly-notifier\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class Notifier {\n\t@Prop() icon = false\n\t@State() notices: Notice[] = []\n\n\t@Listen(\"notice\")\n\tonNotice(event: CustomEvent<Notice>) {\n\t\tthis.notices = [...this.notices, event.detail]\n\t}\n\t@Listen(\"remove\")\n\tonRemove(event: CustomEvent<Notice>) {\n\t\tthis.notices = [...this.notices.filter(n => n != event.detail)]\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<slot />\n\t\t\t\t<div class=\"smoothly-notifier-wrapper\">\n\t\t\t\t\t{this.notices.map(n => (\n\t\t\t\t\t\t<smoothly-notification notice={n} icon={this.icon} />\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"]}
@@ -4,7 +4,8 @@
4
4
  :host[hidden] {
5
5
  display: none;
6
6
  }
7
- :host > aside {
7
+ :host > .smoothly-notifier-wrapper {
8
+ pointer-events: none;
8
9
  display: flex;
9
10
  flex-wrap: wrap-reverse;
10
11
  align-content: stretch;
@@ -14,3 +15,7 @@
14
15
  text-align: center;
15
16
  z-index: 100;
16
17
  }
18
+
19
+ :host > .smoothly-notifier-wrapper > smoothly-notification {
20
+ pointer-events: all;
21
+ }
@@ -3,7 +3,7 @@ import { d as defineCustomElement$3 } from './p-e6eca6ea.js';
3
3
  import { d as defineCustomElement$2 } from './p-5cbcfb4d.js';
4
4
  import { d as defineCustomElement$1 } from './p-d4e83a45.js';
5
5
 
6
- const styleCss = ".sc-smoothly-notifier-h{display:block}[hidden].sc-smoothly-notifier-h{display:none}.sc-smoothly-notifier-h>aside.sc-smoothly-notifier{display:flex;flex-wrap:wrap-reverse;align-content:stretch;position:fixed;bottom:3rem;left:0;text-align:center;z-index:100}";
6
+ const styleCss = ".sc-smoothly-notifier-h{display:block}[hidden].sc-smoothly-notifier-h{display:none}.sc-smoothly-notifier-h>.smoothly-notifier-wrapper.sc-smoothly-notifier{pointer-events:none;display:flex;flex-wrap:wrap-reverse;align-content:stretch;position:fixed;bottom:3rem;left:0;text-align:center;z-index:100}.sc-smoothly-notifier-h>.smoothly-notifier-wrapper.sc-smoothly-notifier>smoothly-notification.sc-smoothly-notifier{pointer-events:all}";
7
7
  const SmoothlyNotifierStyle0 = styleCss;
8
8
 
9
9
  const Notifier = proxyCustomElement(class Notifier extends H {
@@ -20,7 +20,7 @@ const Notifier = proxyCustomElement(class Notifier extends H {
20
20
  this.notices = [...this.notices.filter(n => n != event.detail)];
21
21
  }
22
22
  render() {
23
- return (h(Host, { key: '7e71527eb9d845d83a31a54fb59a516fef7d2985' }, h("slot", { key: '8da2fa5664ae5c4453e06ab14b73c7f8335fd72a' }), h("aside", { key: '172f4747f63be1ae3447984be465240d8c416c41' }, this.notices.map(n => (h("smoothly-notification", { notice: n, icon: this.icon }))))));
23
+ return (h(Host, { key: '7e71527eb9d845d83a31a54fb59a516fef7d2985' }, h("slot", { key: '8da2fa5664ae5c4453e06ab14b73c7f8335fd72a' }), h("div", { key: 'b19ec204f8215f9f552422990263e2a89b320082', class: "smoothly-notifier-wrapper" }, this.notices.map(n => (h("smoothly-notification", { notice: n, icon: this.icon }))))));
24
24
  }
25
25
  static get style() { return SmoothlyNotifierStyle0; }
26
26
  }, [6, "smoothly-notifier", {
@@ -59,4 +59,4 @@ defineCustomElement();
59
59
 
60
60
  export { Notifier as N, defineCustomElement as d };
61
61
 
62
- //# sourceMappingURL=p-a19beffa.js.map
62
+ //# sourceMappingURL=p-83de27af.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-83de27af.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,ibAAib,CAAC;AACnc,+BAAe,QAAQ;;MCOV,QAAQ;;;;oBACL,KAAK;uBACS,EAAE;;IAG/B,QAAQ,CAAC,KAA0B;QAClC,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;KAC9C;IAED,QAAQ,CAAC,KAA0B;QAClC,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;KAC/D;IACD,MAAM;QACL,QACC,EAAC,IAAI,uDACJ,8DAAQ,EACR,4DAAK,KAAK,EAAC,2BAA2B,IACpC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAClB,6BAAuB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CACrD,CAAC,CACG,CACA,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/notifier/style.css?tag=smoothly-notifier&encapsulation=scoped","src/components/notifier/index.tsx"],"sourcesContent":[":host {\n\tdisplay: block;\n}\n:host[hidden] {\n\tdisplay: none;\n}\n:host > .smoothly-notifier-wrapper {\n\tpointer-events: none;\n\tdisplay: flex;\n\tflex-wrap: wrap-reverse;\n\talign-content: stretch;\n\tposition: fixed;\n\tbottom: 3rem;\n\tleft: 0;\n\ttext-align: center;\n\tz-index: 100;\n}\n\n:host > .smoothly-notifier-wrapper > smoothly-notification {\n\tpointer-events: all;\n}\n","import { Component, h, Host, Listen, Prop, State } from \"@stencil/core\"\nimport { Notice } from \"../../model\"\n\n@Component({\n\ttag: \"smoothly-notifier\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class Notifier {\n\t@Prop() icon = false\n\t@State() notices: Notice[] = []\n\n\t@Listen(\"notice\")\n\tonNotice(event: CustomEvent<Notice>) {\n\t\tthis.notices = [...this.notices, event.detail]\n\t}\n\t@Listen(\"remove\")\n\tonRemove(event: CustomEvent<Notice>) {\n\t\tthis.notices = [...this.notices.filter(n => n != event.detail)]\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<slot />\n\t\t\t\t<div class=\"smoothly-notifier-wrapper\">\n\t\t\t\t\t{this.notices.map(n => (\n\t\t\t\t\t\t<smoothly-notification notice={n} icon={this.icon} />\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, h } from './p-f765921a.js';
2
2
  import { d as defineCustomElement$5 } from './p-49deb5fc.js';
3
3
  import { d as defineCustomElement$4 } from './p-e6eca6ea.js';
4
4
  import { d as defineCustomElement$3 } from './p-5cbcfb4d.js';
5
- import { d as defineCustomElement$2 } from './p-a19beffa.js';
5
+ import { d as defineCustomElement$2 } from './p-83de27af.js';
6
6
  import { d as defineCustomElement$1 } from './p-d4e83a45.js';
7
7
 
8
8
  const styleCss = "smoothly-app{--header-height:5rem;display:block}smoothly-app>smoothly-notifier>main{height:calc(100dvh - var(--header-height))}smoothly-app[hidden]{display:none}smoothly-app>smoothly-notifier{height:100%;background:none}header:has(smoothly-burger[visible])>nav>ul smoothly-app-room{width:100%;height:4em}smoothly-app>smoothly-notifier>header{position:sticky;top:0;z-index:5;width:100%;height:var(--header-height);display:flex;justify-content:space-between;box-sizing:border-box;align-items:center;box-shadow:0 1px 0 0 rgb(var(--smoothly-color-shade))}smoothly-app>smoothly-notifier>header>nav{width:100%;flex-shrink:2;height:100%}smoothly-app>smoothly-notifier>header>nav,smoothly-app>smoothly-notifier>header>nav>ul{display:flex;margin:0}smoothly-app:not([label])>smoothly-notifier>header>h1{display:none}smoothly-app>smoothly-notifier>header>h1{margin-left:1rem;margin-bottom:0.8em;display:flex;height:100%}smoothly-app>smoothly-notifier>header>h1>a{display:inline-block;align-self:center;size:100%;background-position-y:center;text-decoration:none;white-space:nowrap}smoothly-app>smoothly-notifier>header>nav>ul{width:100%}smoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container{display:flex;align-items:center;height:100%}smoothly-app>smoothly-notifier>header>nav>ul>div.nav-end-container{display:flex;align-items:center;height:100%;margin-left:auto;margin-right:1rem}smoothly-app>smoothly-notifier>header>nav>ul>[slot=\"nav-end\"]{width:fit-content;align-self:center;height:fit-content;margin-left:10rem}smoothly-app>smoothly-notifier>header>nav>ul li a{display:flex;height:2.3rem;text-decoration:none;align-items:center;align-self:center}@media screen and (max-width: 900px){smoothly-app>smoothly-notifier>header>nav{width:fit-content;max-width:100%;top:100%;position:absolute;max-height:calc(100dvh - var(--header-height));overflow-y:scroll;right:0;height:auto}smoothly-app>smoothly-notifier>header>nav,smoothly-app>smoothly-notifier>header>nav>ul{flex-direction:column;background-color:rgba(var(--smoothly-color))}smoothly-app>smoothly-notifier>header>nav>ul{padding:1.5rem;box-sizing:border-box}smoothly-app>smoothly-notifier>header>nav>ul li{margin-right:0;width:100%}smoothly-app>smoothly-notifier>header>smoothly-burger{position:absolute;top:0;right:0}smoothly-app>smoothly-notifier>header>nav>ul>[slot=\"nav-start\"]{display:none}smoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container,smoothly-app>smoothly-notifier>header>nav>ul>div.nav-end-container{flex-direction:column;margin:0;align-items:start;justify-content:center}smoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container>*:last-child{margin-bottom:1em}}smoothly-app:not([menu-open])>smoothly-notifier>header>nav{display:none}smoothly-app>smoothly-notifier>main>div{overflow-y:scroll;height:100%}";
@@ -131,4 +131,4 @@ defineCustomElement();
131
131
 
132
132
  export { SmoothlyApp as S, defineCustomElement as d };
133
133
 
134
- //# sourceMappingURL=p-cc3cd689.js.map
134
+ //# sourceMappingURL=p-c5f2b7e2.js.map
@@ -1 +1 @@
1
- {"file":"p-cc3cd689.js","mappings":";;;;;;;AAAA,MAAM,QAAQ,GAAG,yvFAAyvF,CAAC;AAC3wF,0BAAe,QAAQ;;MCWV,WAAW;;;;QAUvB,UAAK,GAAqC,EAAE,CAAA;;;;wBANO,KAAK;;;IAOxD,MAAM,kBAAkB;;QACvB,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM;YAC5C,OAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;kBAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;kBACrB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,EAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC,QAAQ,CAAA,CAAC,CACjE,0CAAE,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;KAC7B;IAED,MAAM,UAAU,CAAC,IAAY;;QAC5B,MAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,0CAAE,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;KAC3C;IAED,MAAM,eAAe;;QACpB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAChC,IAAI,cAA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AG,EACtB,4DAAK,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,IACnC,6DACC,4DAAK,KAAK,EAAE,qBAAqB,IAChC,6DAAM,IAAI,EAAC,WAAW,GAAG,CACpB,EACN,8DAAQ,EACR,4DAAK,KAAK,EAAE,mBAAmB,IAC9B,6DAAM,IAAI,EAAC,SAAS,GAAG,CAClB,CACF,CACA,EACN,wEACC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,EAClC,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,mBAAmB,EAAE,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EACrD,uBAAuB,EAAE,CAAC,IAAI,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,GAC5D,CACM,EACT,6DAAM,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,GAAI,CACvB,EACpB;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/app/style.css?tag=smoothly-app","src/components/app/index.tsx"],"sourcesContent":["smoothly-app {\n\t--header-height: 5rem;\n\tdisplay: block;\n}\n\nsmoothly-app>smoothly-notifier>main {\n\theight: calc(100dvh - var(--header-height));\n}\n\nsmoothly-app[hidden] {\n\tdisplay: none;\n}\n\nsmoothly-app>smoothly-notifier {\n\theight: 100%;\n\tbackground: none;\n}\n\nheader:has(smoothly-burger[visible])>nav>ul smoothly-app-room {\n\twidth: 100%;\n\theight: 4em;\n}\n\nsmoothly-app>smoothly-notifier>header {\n\tposition: sticky;\n\ttop: 0;\n\tz-index: 5;\n\twidth: 100%;\n\theight: var(--header-height);\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tbox-sizing: border-box;\n\talign-items: center;\n\tbox-shadow: 0 1px 0 0 rgb(var(--smoothly-color-shade));\n}\n\nsmoothly-app>smoothly-notifier>header>nav {\n\twidth: 100%;\n\tflex-shrink: 2;\n\theight: 100%;\n}\n\nsmoothly-app>smoothly-notifier>header>nav,\nsmoothly-app>smoothly-notifier>header>nav>ul {\n\tdisplay: flex;\n\tmargin: 0;\n}\n\nsmoothly-app:not([label])>smoothly-notifier>header>h1 {\n\tdisplay: none;\n}\nsmoothly-app>smoothly-notifier>header>h1 {\n\tmargin-left: 1rem;\n\tmargin-bottom: 0.8em;\n\tdisplay: flex;\n\theight: 100%;\n}\n\nsmoothly-app>smoothly-notifier>header>h1>a {\n\tdisplay: inline-block;\n\talign-self: center;\n\tsize: 100%;\n\tbackground-position-y: center;\n\ttext-decoration: none;\n\twhite-space: nowrap;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul {\n\twidth: 100%;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 100%;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-end-container {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 100%;\n\tmargin-left: auto;\n\tmargin-right: 1rem;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul>[slot=\"nav-end\"] {\n\twidth: fit-content;\n\talign-self: center;\n\theight: fit-content;\n\tmargin-left: 10rem;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul li a {\n\tdisplay: flex;\n\theight: 2.3rem;\n\ttext-decoration: none;\n\talign-items: center;\n\talign-self: center;\n}\n\n@media screen and (max-width: 900px) {\n\tsmoothly-app>smoothly-notifier>header>nav {\n\t\twidth: fit-content;\n\t\tmax-width: 100%;\n\t\ttop: 100%;\n\t\tposition: absolute;\n\t\tmax-height: calc(100dvh - var(--header-height));\n\t\toverflow-y: scroll;\n\t\tright: 0;\n\t\theight: auto;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav,\n\tsmoothly-app>smoothly-notifier>header>nav>ul {\n\t\tflex-direction: column;\n\t\tbackground-color: rgba(var(--smoothly-color));\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul {\n\t\tpadding: 1.5rem;\n\t\tbox-sizing: border-box;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul li {\n\t\tmargin-right: 0;\n\t\twidth: 100%;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>smoothly-burger {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul>[slot=\"nav-start\"] {\n\t\tdisplay: none;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container,\n\tsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-end-container {\n\t\tflex-direction: column;\n\t\tmargin: 0;\n\t\talign-items: start;\n\t\tjustify-content: center;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container>*:last-child {\n\t\tmargin-bottom: 1em;\n\t}\n}\n\nsmoothly-app:not([menu-open])>smoothly-notifier>header>nav {\n\tdisplay: none;\n}\n\nsmoothly-app>smoothly-notifier>main>div {\n\toverflow-y: scroll;\n\theight: 100%;\n}\n","import { Component, h, Listen, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { SmoothlyAppRoomCustomEvent } from \"../../components\"\nimport { Color } from \"../../model\"\n\ntype Room = {\n\telement: HTMLSmoothlyAppRoomElement\n}\n@Component({\n\ttag: \"smoothly-app\",\n\tstyleUrl: \"style.css\",\n\tscoped: false,\n})\nexport class SmoothlyApp {\n\t@Prop({ reflect: true }) label?: string\n\t@Prop() color: Color\n\t@Prop() home?: string\n\t@Prop({ mutable: true, reflect: true }) menuOpen = false\n\t@State() selected?: Room\n\tprivate burgerVisibility: boolean\n\tprivate burgerElement?: HTMLElement\n\tprivate navElement?: HTMLElement\n\tmainElement?: HTMLElement\n\trooms: Record<string, Room | undefined> = {}\n\tasync componentDidRender() {\n\t\tif (!this.selected && !window.location.search)\n\t\t\t(this.home && this.rooms[this.home]\n\t\t\t\t? this.rooms[this.home]\n\t\t\t\t: Object.values(this.rooms).find(room => !room?.element.disabled)\n\t\t\t)?.element.setSelected(true)\n\t}\n\t@Method()\n\tasync selectRoom(path: string) {\n\t\tthis.rooms[path]?.element.setSelected(true)\n\t}\n\t@Watch(\"selected\")\n\tasync selectedChanged() {\n\t\tObject.values(this.rooms).forEach(\n\t\t\troom => room?.element.path != this.selected?.element.path && room?.element.setSelected(false)\n\t\t)\n\t\tconst content = await this.selected?.element.getContent()\n\t\trequestAnimationFrame(() => {\n\t\t\tif (this.mainElement && content)\n\t\t\t\tthis.mainElement.replaceChildren(content)\n\t\t})\n\t}\n\tburgerVisibilityHandler(event: CustomEvent<boolean>) {\n\t\tthis.burgerVisibility = event.detail\n\t}\n\tburgerStatusHandler(event: CustomEvent<boolean>) {\n\t\tevent.stopPropagation()\n\t\tthis.menuOpen = event.detail\n\t}\n\t@Listen(\"popstate\", { target: \"window\" })\n\tasync locationChangeHandler(event: PopStateEvent) {\n\t\tthis.rooms[event.state.smoothlyPath]?.element.setSelected(true, { history: true })\n\t}\n\t@Listen(\"smoothlyRoomSelect\")\n\troomSelectedHandler(event: SmoothlyAppRoomCustomEvent<{ history: boolean }>) {\n\t\tthis.selected = { element: event.target }\n\t\tif (this.burgerVisibility)\n\t\t\tthis.menuOpen = false\n\t\tif (!event.detail.history) {\n\t\t\tconst path = this.selected.element.path.toString()\n\t\t\tconst location = new URL(window.location.pathname == path ? window.location.href : window.location.origin)\n\t\t\tlocation.pathname = path\n\t\t\twindow.history.pushState({ smoothlyPath: path }, \"\", location.href)\n\t\t}\n\t}\n\t@Listen(\"smoothlyRoomLoad\")\n\troomLoadedHandler(event: SmoothlyAppRoomCustomEvent<{ selected: boolean }>) {\n\t\tconst room = (this.rooms[event.target.path.toString()] = { element: event.target })\n\t\tif (room.element.selected) {\n\t\t\tthis.selected = room\n\t\t\twindow.history.replaceState({ smoothlyPath: room.element.path }, \"\", window.location.href)\n\t\t}\n\t}\n\t@Listen(\"click\", { target: \"window\" })\n\tclickHandler(event: MouseEvent) {\n\t\tif (this.burgerVisibility && !event.composedPath().some(e => e == this.burgerElement || e == this.navElement))\n\t\t\tthis.menuOpen = false\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<smoothly-notifier>\n\t\t\t\t<header color={this.color}>\n\t\t\t\t\t<h1>\n\t\t\t\t\t\t<a href={\"\"}>{this.label}</a>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<slot name=\"header\" />\n\t\t\t\t\t<nav ref={e => (this.navElement = e)}>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<div class={\"nav-start-container\"}>\n\t\t\t\t\t\t\t\t<slot name=\"nav-start\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t<div class={\"nav-end-container\"}>\n\t\t\t\t\t\t\t\t<slot name=\"nav-end\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</nav>\n\t\t\t\t\t<smoothly-burger\n\t\t\t\t\t\tref={e => (this.burgerElement = e)}\n\t\t\t\t\t\topen={this.menuOpen}\n\t\t\t\t\t\tonSmoothlyNavStatus={e => this.burgerStatusHandler(e)}\n\t\t\t\t\t\tonSmoothlyVisibleStatus={e => this.burgerVisibilityHandler(e)}\n\t\t\t\t\t/>\n\t\t\t\t</header>\n\t\t\t\t<main ref={e => (this.mainElement = e)} />\n\t\t\t</smoothly-notifier>\n\t\t)\n\t}\n}\n"],"version":3}
1
+ {"file":"p-c5f2b7e2.js","mappings":";;;;;;;AAAA,MAAM,QAAQ,GAAG,yvFAAyvF,CAAC;AAC3wF,0BAAe,QAAQ;;MCWV,WAAW;;;;QAUvB,UAAK,GAAqC,EAAE,CAAA;;;;wBANO,KAAK;;;IAOxD,MAAM,kBAAkB;;QACvB,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM;YAC5C,OAAC,IA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/app/style.css?tag=smoothly-app","src/components/app/index.tsx"],"sourcesContent":["smoothly-app {\n\t--header-height: 5rem;\n\tdisplay: block;\n}\n\nsmoothly-app>smoothly-notifier>main {\n\theight: calc(100dvh - var(--header-height));\n}\n\nsmoothly-app[hidden] {\n\tdisplay: none;\n}\n\nsmoothly-app>smoothly-notifier {\n\theight: 100%;\n\tbackground: none;\n}\n\nheader:has(smoothly-burger[visible])>nav>ul smoothly-app-room {\n\twidth: 100%;\n\theight: 4em;\n}\n\nsmoothly-app>smoothly-notifier>header {\n\tposition: sticky;\n\ttop: 0;\n\tz-index: 5;\n\twidth: 100%;\n\theight: var(--header-height);\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tbox-sizing: border-box;\n\talign-items: center;\n\tbox-shadow: 0 1px 0 0 rgb(var(--smoothly-color-shade));\n}\n\nsmoothly-app>smoothly-notifier>header>nav {\n\twidth: 100%;\n\tflex-shrink: 2;\n\theight: 100%;\n}\n\nsmoothly-app>smoothly-notifier>header>nav,\nsmoothly-app>smoothly-notifier>header>nav>ul {\n\tdisplay: flex;\n\tmargin: 0;\n}\n\nsmoothly-app:not([label])>smoothly-notifier>header>h1 {\n\tdisplay: none;\n}\nsmoothly-app>smoothly-notifier>header>h1 {\n\tmargin-left: 1rem;\n\tmargin-bottom: 0.8em;\n\tdisplay: flex;\n\theight: 100%;\n}\n\nsmoothly-app>smoothly-notifier>header>h1>a {\n\tdisplay: inline-block;\n\talign-self: center;\n\tsize: 100%;\n\tbackground-position-y: center;\n\ttext-decoration: none;\n\twhite-space: nowrap;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul {\n\twidth: 100%;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 100%;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-end-container {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 100%;\n\tmargin-left: auto;\n\tmargin-right: 1rem;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul>[slot=\"nav-end\"] {\n\twidth: fit-content;\n\talign-self: center;\n\theight: fit-content;\n\tmargin-left: 10rem;\n}\n\nsmoothly-app>smoothly-notifier>header>nav>ul li a {\n\tdisplay: flex;\n\theight: 2.3rem;\n\ttext-decoration: none;\n\talign-items: center;\n\talign-self: center;\n}\n\n@media screen and (max-width: 900px) {\n\tsmoothly-app>smoothly-notifier>header>nav {\n\t\twidth: fit-content;\n\t\tmax-width: 100%;\n\t\ttop: 100%;\n\t\tposition: absolute;\n\t\tmax-height: calc(100dvh - var(--header-height));\n\t\toverflow-y: scroll;\n\t\tright: 0;\n\t\theight: auto;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav,\n\tsmoothly-app>smoothly-notifier>header>nav>ul {\n\t\tflex-direction: column;\n\t\tbackground-color: rgba(var(--smoothly-color));\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul {\n\t\tpadding: 1.5rem;\n\t\tbox-sizing: border-box;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul li {\n\t\tmargin-right: 0;\n\t\twidth: 100%;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>smoothly-burger {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul>[slot=\"nav-start\"] {\n\t\tdisplay: none;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container,\n\tsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-end-container {\n\t\tflex-direction: column;\n\t\tmargin: 0;\n\t\talign-items: start;\n\t\tjustify-content: center;\n\t}\n\n\tsmoothly-app>smoothly-notifier>header>nav>ul>div.nav-start-container>*:last-child {\n\t\tmargin-bottom: 1em;\n\t}\n}\n\nsmoothly-app:not([menu-open])>smoothly-notifier>header>nav {\n\tdisplay: none;\n}\n\nsmoothly-app>smoothly-notifier>main>div {\n\toverflow-y: scroll;\n\theight: 100%;\n}\n","import { Component, h, Listen, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { SmoothlyAppRoomCustomEvent } from \"../../components\"\nimport { Color } from \"../../model\"\n\ntype Room = {\n\telement: HTMLSmoothlyAppRoomElement\n}\n@Component({\n\ttag: \"smoothly-app\",\n\tstyleUrl: \"style.css\",\n\tscoped: false,\n})\nexport class SmoothlyApp {\n\t@Prop({ reflect: true }) label?: string\n\t@Prop() color: Color\n\t@Prop() home?: string\n\t@Prop({ mutable: true, reflect: true }) menuOpen = false\n\t@State() selected?: Room\n\tprivate burgerVisibility: boolean\n\tprivate burgerElement?: HTMLElement\n\tprivate navElement?: HTMLElement\n\tmainElement?: HTMLElement\n\trooms: Record<string, Room | undefined> = {}\n\tasync componentDidRender() {\n\t\tif (!this.selected && !window.location.search)\n\t\t\t(this.home && this.rooms[this.home]\n\t\t\t\t? this.rooms[this.home]\n\t\t\t\t: Object.values(this.rooms).find(room => !room?.element.disabled)\n\t\t\t)?.element.setSelected(true)\n\t}\n\t@Method()\n\tasync selectRoom(path: string) {\n\t\tthis.rooms[path]?.element.setSelected(true)\n\t}\n\t@Watch(\"selected\")\n\tasync selectedChanged() {\n\t\tObject.values(this.rooms).forEach(\n\t\t\troom => room?.element.path != this.selected?.element.path && room?.element.setSelected(false)\n\t\t)\n\t\tconst content = await this.selected?.element.getContent()\n\t\trequestAnimationFrame(() => {\n\t\t\tif (this.mainElement && content)\n\t\t\t\tthis.mainElement.replaceChildren(content)\n\t\t})\n\t}\n\tburgerVisibilityHandler(event: CustomEvent<boolean>) {\n\t\tthis.burgerVisibility = event.detail\n\t}\n\tburgerStatusHandler(event: CustomEvent<boolean>) {\n\t\tevent.stopPropagation()\n\t\tthis.menuOpen = event.detail\n\t}\n\t@Listen(\"popstate\", { target: \"window\" })\n\tasync locationChangeHandler(event: PopStateEvent) {\n\t\tthis.rooms[event.state.smoothlyPath]?.element.setSelected(true, { history: true })\n\t}\n\t@Listen(\"smoothlyRoomSelect\")\n\troomSelectedHandler(event: SmoothlyAppRoomCustomEvent<{ history: boolean }>) {\n\t\tthis.selected = { element: event.target }\n\t\tif (this.burgerVisibility)\n\t\t\tthis.menuOpen = false\n\t\tif (!event.detail.history) {\n\t\t\tconst path = this.selected.element.path.toString()\n\t\t\tconst location = new URL(window.location.pathname == path ? window.location.href : window.location.origin)\n\t\t\tlocation.pathname = path\n\t\t\twindow.history.pushState({ smoothlyPath: path }, \"\", location.href)\n\t\t}\n\t}\n\t@Listen(\"smoothlyRoomLoad\")\n\troomLoadedHandler(event: SmoothlyAppRoomCustomEvent<{ selected: boolean }>) {\n\t\tconst room = (this.rooms[event.target.path.toString()] = { element: event.target })\n\t\tif (room.element.selected) {\n\t\t\tthis.selected = room\n\t\t\twindow.history.replaceState({ smoothlyPath: room.element.path }, \"\", window.location.href)\n\t\t}\n\t}\n\t@Listen(\"click\", { target: \"window\" })\n\tclickHandler(event: MouseEvent) {\n\t\tif (this.burgerVisibility && !event.composedPath().some(e => e == this.burgerElement || e == this.navElement))\n\t\t\tthis.menuOpen = false\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<smoothly-notifier>\n\t\t\t\t<header color={this.color}>\n\t\t\t\t\t<h1>\n\t\t\t\t\t\t<a href={\"\"}>{this.label}</a>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<slot name=\"header\" />\n\t\t\t\t\t<nav ref={e => (this.navElement = e)}>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<div class={\"nav-start-container\"}>\n\t\t\t\t\t\t\t\t<slot name=\"nav-start\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t<div class={\"nav-end-container\"}>\n\t\t\t\t\t\t\t\t<slot name=\"nav-end\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</nav>\n\t\t\t\t\t<smoothly-burger\n\t\t\t\t\t\tref={e => (this.burgerElement = e)}\n\t\t\t\t\t\topen={this.menuOpen}\n\t\t\t\t\t\tonSmoothlyNavStatus={e => this.burgerStatusHandler(e)}\n\t\t\t\t\t\tonSmoothlyVisibleStatus={e => this.burgerVisibilityHandler(e)}\n\t\t\t\t\t/>\n\t\t\t\t</header>\n\t\t\t\t<main ref={e => (this.mainElement = e)} />\n\t\t\t</smoothly-notifier>\n\t\t)\n\t}\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-f765921a.js';
2
- import { d as defineCustomElement$1z } from './p-cc3cd689.js';
2
+ import { d as defineCustomElement$1z } from './p-c5f2b7e2.js';
3
3
  import { d as defineCustomElement$1y } from './p-33cdc807.js';
4
4
  import { d as defineCustomElement$1x } from './p-758edf83.js';
5
5
  import { d as defineCustomElement$1w } from './p-49deb5fc.js';
@@ -64,7 +64,7 @@ import { d as defineCustomElement$C } from './p-cf692cc2.js';
64
64
  import { d as defineCustomElement$B } from './p-1f5357e1.js';
65
65
  import { d as defineCustomElement$A } from './p-a74a5a51.js';
66
66
  import { d as defineCustomElement$z } from './p-5cbcfb4d.js';
67
- import { d as defineCustomElement$y } from './p-a19beffa.js';
67
+ import { d as defineCustomElement$y } from './p-83de27af.js';
68
68
  import { d as defineCustomElement$x } from './p-f21f43d1.js';
69
69
  import { d as defineCustomElement$w } from './p-a91db04a.js';
70
70
  import { d as defineCustomElement$v } from './p-9184ede6.js';
@@ -1,4 +1,4 @@
1
- import { S as SmoothlyApp$1, d as defineCustomElement$1 } from './p-cc3cd689.js';
1
+ import { S as SmoothlyApp$1, d as defineCustomElement$1 } from './p-c5f2b7e2.js';
2
2
 
3
3
  const SmoothlyApp = SmoothlyApp$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { N as Notifier, d as defineCustomElement$1 } from './p-a19beffa.js';
1
+ import { N as Notifier, d as defineCustomElement$1 } from './p-83de27af.js';
2
2
 
3
3
  const SmoothlyNotifier = Notifier;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -11054,7 +11054,7 @@ const Notification = class {
11054
11054
  };
11055
11055
  Notification.style = SmoothlyNotificationStyle0;
11056
11056
 
11057
- const styleCss$w = ".sc-smoothly-notifier-h{display:block}[hidden].sc-smoothly-notifier-h{display:none}.sc-smoothly-notifier-h>aside.sc-smoothly-notifier{display:flex;flex-wrap:wrap-reverse;align-content:stretch;position:fixed;bottom:3rem;left:0;text-align:center;z-index:100}";
11057
+ const styleCss$w = ".sc-smoothly-notifier-h{display:block}[hidden].sc-smoothly-notifier-h{display:none}.sc-smoothly-notifier-h>.smoothly-notifier-wrapper.sc-smoothly-notifier{pointer-events:none;display:flex;flex-wrap:wrap-reverse;align-content:stretch;position:fixed;bottom:3rem;left:0;text-align:center;z-index:100}.sc-smoothly-notifier-h>.smoothly-notifier-wrapper.sc-smoothly-notifier>smoothly-notification.sc-smoothly-notifier{pointer-events:all}";
11058
11058
  const SmoothlyNotifierStyle0 = styleCss$w;
11059
11059
 
11060
11060
  const Notifier = class {
@@ -11070,7 +11070,7 @@ const Notifier = class {
11070
11070
  this.notices = [...this.notices.filter(n => n != event.detail)];
11071
11071
  }
11072
11072
  render() {
11073
- return (h(Host, { key: '7e71527eb9d845d83a31a54fb59a516fef7d2985' }, h("slot", { key: '8da2fa5664ae5c4453e06ab14b73c7f8335fd72a' }), h("aside", { key: '172f4747f63be1ae3447984be465240d8c416c41' }, this.notices.map(n => (h("smoothly-notification", { notice: n, icon: this.icon }))))));
11073
+ return (h(Host, { key: '7e71527eb9d845d83a31a54fb59a516fef7d2985' }, h("slot", { key: '8da2fa5664ae5c4453e06ab14b73c7f8335fd72a' }), h("div", { key: 'b19ec204f8215f9f552422990263e2a89b320082', class: "smoothly-notifier-wrapper" }, this.notices.map(n => (h("smoothly-notification", { notice: n, icon: this.icon }))))));
11074
11074
  }
11075
11075
  };
11076
11076
  Notifier.style = SmoothlyNotifierStyle0;