@mhmo91/schmancy 0.2.111 → 0.2.112
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/area.cjs +1 -1
- package/dist/area.component-D5Fb0wFU.cjs +8 -0
- package/dist/area.component-D5Fb0wFU.cjs.map +1 -0
- package/dist/area.component-Dzl8Iw9I.js +107 -0
- package/dist/area.component-Dzl8Iw9I.js.map +1 -0
- package/dist/area.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-Bv5uSZu2.cjs → teleport.component-BVj_m_Kl.cjs} +2 -2
- package/dist/{teleport.component-Bv5uSZu2.cjs.map → teleport.component-BVj_m_Kl.cjs.map} +1 -1
- package/dist/{teleport.component-CNo2XXL6.js → teleport.component-K6cmr5Tr.js} +2 -2
- package/dist/{teleport.component-CNo2XXL6.js.map → teleport.component-K6cmr5Tr.js.map} +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +1 -1
- package/types/src/area/area.component.d.ts +5 -74
- package/dist/area.component-BmSDlykT.cjs +0 -8
- package/dist/area.component-BmSDlykT.cjs.map +0 -1
- package/dist/area.component-D99_ptNx.js +0 -119
- package/dist/area.component-D99_ptNx.js.map +0 -1
package/dist/area.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./area.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./area.component-D5Fb0wFU.cjs");exports.FINDING_MORTIES=e.FINDING_MORTIES,exports.HERE_RICKY=e.HERE_RICKY,exports.HISTORY_STRATEGY=e.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>e.SchmancyArea}),exports.area=e.area,exports.routerHistory=e.routerHistory;
|
|
2
2
|
//# sourceMappingURL=area.cjs.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";const n=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const f=require("./litElement.mixin-PVEJyATw.cjs");require("./tailwind.mixin-BM-bjRjT.cjs");const u=require("lit"),h=require("lit/decorators.js"),g=require("./index-DyJ0oDpR.cjs"),S=new n.Subject,d="FINDING_MORTIES",y="HERE_RICKY";class p{constructor(){this.prettyURL=!1,this.mode="HISTORY",this.request=new n.ReplaySubject(1),this.current=new Map,this.$current=new n.ReplaySubject(1),this.enableHistoryMode=!0,this.findingMortiesEvent=new CustomEvent(d),this.$current.next(this.current)}find(){return n.zip([n.fromEvent(window,y).pipe(n.map(e=>e.detail),n.bufferTime(0),n.tap(console.log)),n.of(1).pipe(n.tap(()=>window.dispatchEvent(this.findingMortiesEvent)))]).pipe(n.map(([e])=>e),n.timeout(1))}push(e){this.request.next(e)}pop(e){const o=JSON.parse(JSON.stringify(s.state));delete o[e],history.replaceState(null,"",encodeURIComponent(JSON.stringify(o)))}static getInstance(){return p.instance||(p.instance=new p),p.instance}get state(){const e=location.pathname.split("/").pop();let o={};try{o=e?JSON.parse(decodeURIComponent(e)):{}}catch{o={}}return o}}const s=p.getInstance();var c=(t=>(t.push="push",t.replace="replace",t.pop="pop",t.silent="silent",t))(c||{}),w=Object.defineProperty,E=Object.getOwnPropertyDescriptor,l=(t,e,o,a)=>{for(var i,r=a>1?void 0:a?E(e,o):e,m=t.length-1;m>=0;m--)(i=t[m])&&(r=(a?i(e,o,r):i(r))||r);return a&&r&&w(e,o,r),r};exports.SchmancyArea=class extends f.$LitElement(u.css`
|
|
2
|
+
:host {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: block;
|
|
5
|
+
inset: 0;
|
|
6
|
+
}
|
|
7
|
+
`){getComponentFromPathname(t,e){return n.of(t).pipe(n.map(o=>o.split("/").pop()??""),n.map(o=>decodeURIComponent(o)),n.map(o=>JSON.parse(o)),n.map(o=>o[this.name]),n.map(o=>!o&&this.default?{component:this.default,state:void 0}:o),n.filter(o=>g.libExports.isPresent(o)),n.map(o=>({area:this.name,component:o.component??this.default,state:o.state,historyStrategy:e})),n.map(o=>o),n.catchError(()=>this.default?n.of({area:this.name,component:this.default,historyStrategy:e}):n.EMPTY))}firstUpdated(){if(!this.name)throw new Error("Area name or default component not set");n.merge(n.of(location.pathname).pipe(n.switchMap(t=>this.getComponentFromPathname(t,c.silent)),n.map(t=>t),n.take(1)),s.request.pipe(n.filter(({area:t})=>t===this.name)),n.fromEvent(window,"popstate").pipe(n.map(t=>t.target.location.pathname),n.switchMap(t=>this.getComponentFromPathname(t,c.silent)),n.map(t=>t))).pipe(n.filter(t=>!!t.component),n.takeUntil(this.disconnecting),n.distinctUntilChanged((t,e)=>{let o,a;return typeof t.component!="function"&&(typeof t.component=="string"&&(o=t.component),typeof e.component!="function"&&(typeof e.component=="string"&&(a=e.component),(a==null?void 0:a.replaceAll("-","").toLowerCase())===(o==null?void 0:o.replaceAll("-","").toLowerCase())))})).pipe(n.switchMap(t=>{const e=t.component;return e instanceof Promise?n.from(e).pipe(n.map(o=>({component:o.exports.default,route:t}))):n.of({component:e,route:t})}),n.map(({component:t,route:e})=>typeof t=="string"?{component:document.createElement(t),route:e}:t instanceof HTMLElement?{component:t,route:e}:typeof t=="function"?{component:new t,route:e}:void 0),n.distinctUntilChanged((t,e)=>t.component.tagName===e.component.tagName),n.map(({component:t,route:e})=>{var i,r;const o=(i=this.shadowRoot)==null?void 0:i.children[0],a=!!o;return o.remove(),t.classList.add("opacity-0"),(r=this.shadowRoot)==null||r.append(t),t.animate([{opacity:0},{opacity:1}],{duration:a?150:100,easing:"cubic-bezier(0.25, 0.8, 0.25, 1)",fill:"forwards"}),{component:t,route:e}}),n.tap(({component:t,route:e})=>{e.historyStrategy===void 0||e.historyStrategy==="push"?history.pushState(e.state,"",this.newPath(t.tagName,e)):e.historyStrategy&&["replace","pop"].includes(e.historyStrategy)&&history.replaceState(e.state,"",this.newPath(t.tagName,e)),s.current.set(this.name,{component:t.tagName,state:e.state,area:this.name}),s.$current.next(s.current)}),n.takeUntil(this.disconnecting)).subscribe()}newPath(t,e){const o=location.pathname.split("/").pop();let a={};try{a=o?JSON.parse(decodeURIComponent(o)):{}}catch{a={}}e.state=e.state??{};const i=e.clearQueryParams?this.queryParamClear(e.clearQueryParams):document.location.search;return encodeURIComponent(JSON.stringify({...a,[this.name]:{component:t.toLowerCase(),state:e.state}})).concat(`${i}`)}queryParamClear(t){if(!t)return"";const e=new URLSearchParams(location.search);return t.forEach(o=>e.delete(o)),e.toString()===""?"":`?${e.toString()}`}checkForTeleportationRequests(){return n.fromEvent(window,"FLIP_REQUEST").pipe(n.map(t=>t.detail),n.bufferTime(0),n.tap(()=>{this.dispatchEvent(new CustomEvent("FLIP_STARTED"))}),n.takeUntil(this.disconnecting),n.timeout(0),n.catchError(()=>n.of(null)))}disconnectedCallback(){super.disconnectedCallback(),this.disconnecting.next(!0)}render(){return u.html` <slot> </slot> `}},l([h.property()],exports.SchmancyArea.prototype,"name",2),l([h.property()],exports.SchmancyArea.prototype,"default",2),exports.SchmancyArea=l([h.customElement("schmancy-area")],exports.SchmancyArea),exports.FINDING_MORTIES=d,exports.HERE_RICKY=y,exports.HISTORY_STRATEGY=c,exports.area=s,exports.routerHistory=S;
|
|
8
|
+
//# sourceMappingURL=area.component-D5Fb0wFU.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area.component-D5Fb0wFU.cjs","sources":["../src/area/area.service.ts","../src/area/router.types.ts","../src/area/area.component.ts"],"sourcesContent":["import { ReplaySubject, Subject, bufferTime, fromEvent, map, of, tap, timeout, zip } from 'rxjs'\nimport { SchmancyTeleportation } from '../teleport'\nimport { ActiveRoute, RouteAction } from './router.types'\n\nexport const routerHistory = new Subject<RouteAction>()\n\nexport const FINDING_MORTIES = 'FINDING_MORTIES'\nexport const HERE_RICKY = 'HERE_RICKY'\nexport type HERE_RICKY_EVENT = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\nexport type FINDING_MORTIES_EVENT = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\n\nclass AreaService {\n\tprivate static instance: AreaService\n\tpublic prettyURL = false\n\tpublic mode: 'SILENT' | 'HISTORY' = 'HISTORY'\n\tpublic request = new ReplaySubject<RouteAction>(1)\n\tpublic current = new Map<string, ActiveRoute>()\n\tpublic $current = new ReplaySubject<Map<string, ActiveRoute>>(1)\n\tpublic enableHistoryMode = true\n\tprivate findingMortiesEvent = new CustomEvent<FINDING_MORTIES_EVENT['detail']>(FINDING_MORTIES)\n\n\tconstructor() {\n\t\tthis.$current.next(this.current)\n\t}\n\n\tfind() {\n\t\treturn zip([\n\t\t\tfromEvent<HERE_RICKY_EVENT>(window, HERE_RICKY).pipe(\n\t\t\t\tmap(e => e.detail),\n\t\t\t\tbufferTime(0),\n\t\t\t\ttap(console.log),\n\t\t\t),\n\t\t\tof(1).pipe(tap(() => window.dispatchEvent(this.findingMortiesEvent))),\n\t\t]).pipe(\n\t\t\tmap(([component]) => component),\n\t\t\ttimeout(1),\n\t\t)\n\t}\n\n\tpush(r: RouteAction) {\n\t\tthis.request.next(r)\n\t}\n\n\tpop(name: string) {\n\t\tconst newState = JSON.parse(JSON.stringify(area.state))\n\t\tdelete newState[name]\n\t\tconsole.log(area.state, newState)\n\t\thistory.replaceState(null, '', encodeURIComponent(JSON.stringify(newState)))\n\t}\n\tstatic getInstance() {\n\t\tif (!AreaService.instance) {\n\t\t\tAreaService.instance = new AreaService()\n\t\t}\n\t\treturn AreaService.instance\n\t}\n\n\tget state() {\n\t\tconst pathname = location.pathname.split('/').pop()\n\t\tlet areaState = {}\n\t\ttry {\n\t\t\tareaState = pathname ? JSON.parse(decodeURIComponent(pathname)) : {}\n\t\t} catch {\n\t\t\tareaState = {}\n\t\t}\n\t\treturn areaState\n\t}\n}\n\nexport const area = AreaService.getInstance()\nexport default area\n","export type RouteAction = {\n\tcomponent: CustomElementConstructor | string | HTMLElement\n\tarea: string\n\tstate?: object\n\thistoryStrategy?: THistoryStrategy\n\tclearQueryParams?: string[] | null\n}\n\nexport type ActiveRoute = {\n\tcomponent: string\n\tarea: string\n\tstate?: object\n}\n\nexport type THistoryStrategy = 'push' | 'replace' | 'pop' | 'silent'\n\nexport enum HISTORY_STRATEGY {\n\tpush = 'push',\n\treplace = 'replace',\n\tpop = 'pop',\n\tsilent = 'silent',\n}\n","import { $LitElement } from '@mixins/index'\nimport { TemplateResult, css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport {\n\tEMPTY,\n\tbufferTime,\n\tcatchError,\n\tdistinctUntilChanged,\n\tfilter,\n\tfrom,\n\tfromEvent,\n\tmap,\n\tmerge,\n\tof,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimeout,\n} from 'rxjs'\nimport { isPresent } from 'ts-is-present'\nimport area from './area.service'\nimport { HISTORY_STRATEGY, RouteAction } from './router.types'\n\ntype TRouteArea = {\n\tcomponent: string\n\tstate: object | undefined\n}\n\n@customElement('schmancy-area')\nexport class SchmancyArea extends $LitElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tdisplay: block;\n\t\tinset: 0;\n\t}\n`) {\n\t/**\n\t * The name of the router outlet\n\t * @attr\n\t * @type {string}\n\t * @public\n\t * @required\n\t */\n\t@property() name!: string\n\n\t@property() default!: string | Promise<NodeModule> | CustomElementConstructor | TemplateResult<1>\n\n\t/**\n\t *\n\t * @param pathname pathname from the browser location API\n\t * @param historyStrategy the history strategy to use for the route like PUSH, REPLACE, or SILENT\n\t * @returns rxjs pipes that will return the component to render and the history strategy to use\n\t */\n\tgetComponentFromPathname(pathname: string, historyStrategy: HISTORY_STRATEGY) {\n\t\treturn of(pathname).pipe(\n\t\t\tmap(path => path.split('/').pop() ?? ''),\n\t\t\tmap(path => decodeURIComponent(path)),\n\t\t\tmap(path => JSON.parse(path)),\n\t\t\tmap(routes => routes[this.name] as TRouteArea),\n\t\t\tmap(component =>\n\t\t\t\t!component && this.default\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tcomponent: this.default,\n\t\t\t\t\t\t\tstate: undefined,\n\t\t\t\t\t\t}\n\t\t\t\t\t: component,\n\t\t\t),\n\t\t\tfilter(x => isPresent(x)),\n\t\t\tmap((component: TRouteArea) => ({\n\t\t\t\tarea: this.name,\n\t\t\t\tcomponent: component.component ?? this.default,\n\t\t\t\tstate: component.state,\n\t\t\t\thistoryStrategy,\n\t\t\t})),\n\t\t\tmap(x => x as RouteAction),\n\t\t\tcatchError(() => {\n\t\t\t\treturn this.default\n\t\t\t\t\t? of({\n\t\t\t\t\t\t\tarea: this.name,\n\t\t\t\t\t\t\tcomponent: this.default,\n\t\t\t\t\t\t\thistoryStrategy,\n\t\t\t\t\t\t} as RouteAction)\n\t\t\t\t\t: EMPTY\n\t\t\t}),\n\t\t)\n\t}\n\n\tprotected firstUpdated(): void {\n\t\tif (!this.name) {\n\t\t\t// TOOD: maybe enforce this to be unique\n\t\t\tthrow new Error('Area name or default component not set')\n\t\t}\n\n\t\t// active outlet changes\n\t\tmerge(\n\t\t\t// 1) initial load from location.pathname\n\t\t\tof(location.pathname).pipe(\n\t\t\t\tswitchMap(pathname => this.getComponentFromPathname(pathname, HISTORY_STRATEGY.silent)),\n\t\t\t\tmap(route => route as RouteAction),\n\t\t\t\ttake(1),\n\t\t\t),\n\t\t\t// 2) requests to change the route for this area\n\t\t\tarea.request.pipe(filter(({ area }) => area === this.name)),\n\t\t\t// 3) popstate events (back, forward)\n\t\t\tfromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\tmap(e => (e.target as Window).location.pathname),\n\t\t\t\tswitchMap(pathname => this.getComponentFromPathname(pathname, HISTORY_STRATEGY.silent)),\n\t\t\t\tmap(route => route as RouteAction),\n\t\t\t),\n\t\t)\n\t\t\t.pipe(\n\t\t\t\tfilter(request => !!request.component),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdistinctUntilChanged((a, b) => {\n\t\t\t\t\tlet aComponent, bComponent\n\t\t\t\t\tif (typeof a.component === 'function') return false\n\t\t\t\t\telse if (typeof a.component === 'string') aComponent = a.component\n\n\t\t\t\t\tif (typeof b.component === 'function') return false\n\t\t\t\t\telse if (typeof b.component === 'string') bComponent = b.component\n\n\t\t\t\t\treturn bComponent?.replaceAll('-', '').toLowerCase() === aComponent?.replaceAll('-', '').toLowerCase()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(route => {\n\t\t\t\t\tconst c = route.component\n\t\t\t\t\tif (c instanceof Promise) {\n\t\t\t\t\t\t// Dynamic import module\n\t\t\t\t\t\treturn from(c).pipe(map(x => ({ component: x.exports.default as CustomElementConstructor, route })))\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Already a string, function, or element\n\t\t\t\t\t\treturn of({ component: c, route })\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tmap(({ component, route }) => {\n\t\t\t\t\tif (typeof component === 'string') {\n\t\t\t\t\t\t// Tag name\n\t\t\t\t\t\treturn { component: document.createElement(component), route }\n\t\t\t\t\t} else if (component instanceof HTMLElement) {\n\t\t\t\t\t\t// Already an element instance\n\t\t\t\t\t\treturn { component, route }\n\t\t\t\t\t} else if (typeof component === 'function') {\n\t\t\t\t\t\t// Custom element constructor\n\t\t\t\t\t\treturn { component: new component(), route }\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged((prev, curr) => prev.component.tagName === curr.component.tagName),\n\t\t\t\t// create the new view and add it to the DOM\n\t\t\t\tmap(({ component, route }) => {\n\t\t\t\t\tconst oldView = this.shadowRoot?.children[0]\n\t\t\t\t\tconst oldViewExists = !!oldView\n\n\t\t\t\t\t// Remove the old view (if any)\n\t\t\t\t\toldView.remove()\n\t\t\t\t\t// Native Web Animations API - fade in\n\t\t\t\t\t// \"ease: cubic-bezier(0.25, 0.8, 0.25, 1)\" was used in the old code\n\t\t\t\t\tcomponent.classList.add('opacity-0')\n\t\t\t\t\tthis.shadowRoot?.append(component)\n\t\t\t\t\tcomponent.animate([{ opacity: 0 }, { opacity: 1 }], {\n\t\t\t\t\t\tduration: oldViewExists ? 150 : 100,\n\t\t\t\t\t\teasing: 'cubic-bezier(0.25, 0.8, 0.25, 1)',\n\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t})\n\n\t\t\t\t\t// Insert the new view\n\n\t\t\t\t\treturn { component, route }\n\t\t\t\t}),\n\t\t\t\ttap(({ component, route }) => {\n\t\t\t\t\t// Handle history updates\n\t\t\t\t\tif (typeof route.historyStrategy === 'undefined' || route.historyStrategy === 'push') {\n\t\t\t\t\t\thistory.pushState(route.state, '', this.newPath(component.tagName, route))\n\t\t\t\t\t} else if (route.historyStrategy && ['replace', 'pop'].includes(route.historyStrategy)) {\n\t\t\t\t\t\thistory.replaceState(route.state, '', this.newPath(component.tagName, route))\n\t\t\t\t\t}\n\t\t\t\t\tarea.current.set(this.name, {\n\t\t\t\t\t\tcomponent: component.tagName,\n\t\t\t\t\t\tstate: route.state,\n\t\t\t\t\t\tarea: this.name,\n\t\t\t\t\t})\n\n\t\t\t\t\tarea.$current.next(area.current)\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tnewPath(tag: string, route: RouteAction) {\n\t\tconst oldPathname = location.pathname.split('/').pop()\n\t\tlet oldAreaState = {}\n\t\ttry {\n\t\t\toldAreaState = oldPathname ? JSON.parse(decodeURIComponent(oldPathname)) : {}\n\t\t} catch {\n\t\t\toldAreaState = {}\n\t\t}\n\t\troute.state = route.state ?? {}\n\t\tconst queryParams = route.clearQueryParams ? this.queryParamClear(route.clearQueryParams) : document.location.search\n\n\t\treturn encodeURIComponent(\n\t\t\tJSON.stringify({\n\t\t\t\t...oldAreaState,\n\t\t\t\t[this.name]: { component: tag.toLowerCase(), state: route.state },\n\t\t\t}),\n\t\t).concat(`${queryParams}`)\n\t}\n\n\tqueryParamClear(params?: string[]) {\n\t\tif (!params) {\n\t\t\treturn ''\n\t\t}\n\t\t// get query params from url\n\t\tconst urlParams = new URLSearchParams(location.search)\n\t\t// remove query params\n\t\tparams.forEach(param => urlParams.delete(param))\n\t\t// update url\n\t\tif (urlParams.toString() === '') return ''\n\t\treturn `?${urlParams.toString()}`\n\t}\n\n\tcheckForTeleportationRequests() {\n\t\treturn fromEvent<CustomEvent>(window, 'FLIP_REQUEST').pipe(\n\t\t\tmap(e => e.detail),\n\t\t\tbufferTime(0),\n\t\t\ttap(() => {\n\t\t\t\tthis.dispatchEvent(new CustomEvent('FLIP_STARTED'))\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t\ttimeout(0),\n\t\t\tcatchError(() => of(null)),\n\t\t)\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\trender() {\n\t\treturn html` <slot> </slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-area': SchmancyArea\n\t}\n}\n"],"names":["routerHistory","Subject","FINDING_MORTIES","HERE_RICKY","AreaService","constructor","this","prettyURL","mode","request","ReplaySubject","current","Map","$current","enableHistoryMode","findingMortiesEvent","CustomEvent","next","zip","fromEvent","window","pipe","map","e","detail","bufferTime","tap","console","log","of","dispatchEvent","component","timeout","r","name","newState","JSON","parse","stringify","area","state","history","replaceState","encodeURIComponent","getInstance","instance","pathname","location","split","pop","areaState","decodeURIComponent","HISTORY_STRATEGY","SchmancyArea","$LitElement","css","historyStrategy","path","routes","default","filter","x","isPresent","libExports","catchError","EMPTY","Error","merge","switchMap","getComponentFromPathname","silent","route","take","target","takeUntil","disconnecting","distinctUntilChanged","a","b","aComponent","bComponent","replaceAll","toLowerCase","c","Promise","from","exports","document","createElement","HTMLElement","prev","curr","tagName","oldView","shadowRoot","children","oldViewExists","remove","classList","add","append","animate","opacity","duration","easing","fill","pushState","newPath","includes","set","subscribe","tag","oldPathname","oldAreaState","queryParams","clearQueryParams","queryParamClear","search","concat","params","urlParams","URLSearchParams","forEach","param","delete","toString","super","disconnectedCallback","html","__decorateClass","property","prototype","customElement"],"mappings":"qSAIaA,EAAAA,EAAgB,IAAIC,EAAqBA,QAEzCC,EAAkB,kBAClBC,EAAa,aAQ1B,MAAMC,CAAAA,CAUL,aAAAC,CARAC,KAAOC,UAAAA,GACPD,KAAOE,KAA6B,UAC7BF,KAAAG,QAAU,IAAIC,EAAAA,cAA2B,CACzCJ,EAAAA,KAAAK,YAAcC,IACdN,KAAAO,SAAW,IAAIH,EAAAA,cAAwC,CAAA,EAC9DJ,KAAOQ,kBAAAA,GACCR,KAAAS,oBAAsB,IAAIC,YAA6Cd,CAGzEI,EAAAA,KAAAO,SAASI,KAAKX,KAAKK,OAAAA,CAAO,CAGhC,MACC,CAAA,OAAOO,MAAI,CACVC,YAA4BC,OAAQjB,GAAYkB,KAC/CC,EAAAA,IAASC,GAAAA,EAAEC,MAAAA,EACXC,EAAAA,WAAW,CACXC,EAAAA,EAAAA,IAAIC,QAAQC,GAEbC,CAAAA,EAAAA,KAAG,CAAA,EAAGR,KAAKK,EAAAA,IAAI,IAAMN,OAAOU,cAAcxB,KAAKS,mBAC7CM,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,KACFC,EAAAA,IAAI,CAAES,CAAAA,CAAAA,IAAeA,CACrBC,EAAAA,EAAAA,QAAQ,CAAA,CAAA,CACT,CAGD,KAAKC,EACC3B,CAAAA,KAAAG,QAAQQ,KAAKgB,CAAC,CAAA,CAGpB,IAAIC,EAAAA,CACH,MAAMC,EAAWC,KAAKC,MAAMD,KAAKE,UAAUC,EAAKC,KACzCL,CAAAA,EAAAA,OAAAA,EAASD,CAERO,EAAAA,QAAAC,aA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1E,SAASsE,MAAAA,EAI/C,OAFAE,EAAOG,QAAQC,GAASH,EAAUI,OAAOD,CAAAA,CAAAA,EAErCH,EAAUK,aAAe,GAAW,GACjC,IAAIL,EAAUK,SAAAA,CAAAA,EAAU,CAGhC,+BACQ,CAAA,OAAA1G,YAAuBC,OAAQ,cAAgBC,EAAAA,KACrDC,EAAAA,IAASC,GAAAA,EAAEC,QACXC,EAAAA,WAAW,CACXC,EAAAA,EAAAA,IAAI,IAAA,CACHpB,KAAKwB,cAAc,IAAId,YAAY,cAAA,CAAA,CAAe,CAEnD0D,EAAAA,EAAAA,UAAUpE,KAAKqE,aACf3C,EAAAA,EAAAA,QAAQ,CACRgC,EAAAA,aAAW,IAAMnC,EAAGA,GAAA,IACrB,CAAA,CAAA,CAAA,CAGD,sBACCiG,CAAAA,MAAMC,qBACDzH,EAAAA,KAAAqE,cAAc1D,KAAAA,EAAS,CAAA,CAG7B,QACQ,CAAA,OAAA+G,EAAAA,sBAAA,CAAA,EArMIC,EAAA,CAAXC,EAASA,SAdE7E,CAAAA,EAAAA,qBAcA8E,UAAA,OAAA,CAAA,EAEAF,EAAA,CAAXC,EAASA,SAhBE7E,CAAAA,EAAAA,qBAgBA8E,UAAA,UAAA,CAAA,EAhBA9E,QAANA,aAAA4E,EAAA,CADNG,EAAAA,cAAc,eAAA,CAAA,EACF/E"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Subject as I, ReplaySubject as S, zip as b, fromEvent as g, of as i, map as o, bufferTime as R, tap as h, timeout as v, filter as u, catchError as E, EMPTY as O, merge as U, switchMap as d, take as N, takeUntil as f, distinctUntilChanged as C, from as T } from "rxjs";
|
|
2
|
+
import "lit/directives/class-map.js";
|
|
3
|
+
import "lit/directives/style-map.js";
|
|
4
|
+
import { $ as L } from "./litElement.mixin-Dx9_p_nV.js";
|
|
5
|
+
import "./tailwind.mixin-YEy_iITN.js";
|
|
6
|
+
import { css as x, html as F } from "lit";
|
|
7
|
+
import { property as P, customElement as J } from "lit/decorators.js";
|
|
8
|
+
import { l as M } from "./index-CuY8m6ta.js";
|
|
9
|
+
const B = new I(), k = "FINDING_MORTIES", q = "HERE_RICKY";
|
|
10
|
+
class p {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.prettyURL = !1, this.mode = "HISTORY", this.request = new S(1), this.current = /* @__PURE__ */ new Map(), this.$current = new S(1), this.enableHistoryMode = !0, this.findingMortiesEvent = new CustomEvent(k), this.$current.next(this.current);
|
|
13
|
+
}
|
|
14
|
+
find() {
|
|
15
|
+
return b([g(window, q).pipe(o((e) => e.detail), R(0), h(console.log)), i(1).pipe(h(() => window.dispatchEvent(this.findingMortiesEvent)))]).pipe(o(([e]) => e), v(1));
|
|
16
|
+
}
|
|
17
|
+
push(e) {
|
|
18
|
+
this.request.next(e);
|
|
19
|
+
}
|
|
20
|
+
pop(e) {
|
|
21
|
+
const n = JSON.parse(JSON.stringify(c.state));
|
|
22
|
+
delete n[e], history.replaceState(null, "", encodeURIComponent(JSON.stringify(n)));
|
|
23
|
+
}
|
|
24
|
+
static getInstance() {
|
|
25
|
+
return p.instance || (p.instance = new p()), p.instance;
|
|
26
|
+
}
|
|
27
|
+
get state() {
|
|
28
|
+
const e = location.pathname.split("/").pop();
|
|
29
|
+
let n = {};
|
|
30
|
+
try {
|
|
31
|
+
n = e ? JSON.parse(decodeURIComponent(e)) : {};
|
|
32
|
+
} catch {
|
|
33
|
+
n = {};
|
|
34
|
+
}
|
|
35
|
+
return n;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const c = p.getInstance();
|
|
39
|
+
var w = ((t) => (t.push = "push", t.replace = "replace", t.pop = "pop", t.silent = "silent", t))(w || {}), $ = Object.defineProperty, j = Object.getOwnPropertyDescriptor, y = (t, e, n, a) => {
|
|
40
|
+
for (var r, s = a > 1 ? void 0 : a ? j(e, n) : e, l = t.length - 1; l >= 0; l--) (r = t[l]) && (s = (a ? r(e, n, s) : r(s)) || s);
|
|
41
|
+
return a && s && $(e, n, s), s;
|
|
42
|
+
};
|
|
43
|
+
let m = class extends L(x`
|
|
44
|
+
:host {
|
|
45
|
+
position: relative;
|
|
46
|
+
display: block;
|
|
47
|
+
inset: 0;
|
|
48
|
+
}
|
|
49
|
+
`) {
|
|
50
|
+
getComponentFromPathname(t, e) {
|
|
51
|
+
return i(t).pipe(o((n) => n.split("/").pop() ?? ""), o((n) => decodeURIComponent(n)), o((n) => JSON.parse(n)), o((n) => n[this.name]), o((n) => !n && this.default ? { component: this.default, state: void 0 } : n), u((n) => M.isPresent(n)), o((n) => ({ area: this.name, component: n.component ?? this.default, state: n.state, historyStrategy: e })), o((n) => n), E(() => this.default ? i({ area: this.name, component: this.default, historyStrategy: e }) : O));
|
|
52
|
+
}
|
|
53
|
+
firstUpdated() {
|
|
54
|
+
if (!this.name) throw new Error("Area name or default component not set");
|
|
55
|
+
U(i(location.pathname).pipe(d((t) => this.getComponentFromPathname(t, w.silent)), o((t) => t), N(1)), c.request.pipe(u(({ area: t }) => t === this.name)), g(window, "popstate").pipe(o((t) => t.target.location.pathname), d((t) => this.getComponentFromPathname(t, w.silent)), o((t) => t))).pipe(u((t) => !!t.component), f(this.disconnecting), C((t, e) => {
|
|
56
|
+
let n, a;
|
|
57
|
+
return typeof t.component != "function" && (typeof t.component == "string" && (n = t.component), typeof e.component != "function" && (typeof e.component == "string" && (a = e.component), (a == null ? void 0 : a.replaceAll("-", "").toLowerCase()) === (n == null ? void 0 : n.replaceAll("-", "").toLowerCase())));
|
|
58
|
+
})).pipe(d((t) => {
|
|
59
|
+
const e = t.component;
|
|
60
|
+
return e instanceof Promise ? T(e).pipe(o((n) => ({ component: n.exports.default, route: t }))) : i({ component: e, route: t });
|
|
61
|
+
}), o(({ component: t, route: e }) => typeof t == "string" ? { component: document.createElement(t), route: e } : t instanceof HTMLElement ? { component: t, route: e } : typeof t == "function" ? { component: new t(), route: e } : void 0), C((t, e) => t.component.tagName === e.component.tagName), o(({ component: t, route: e }) => {
|
|
62
|
+
var r, s;
|
|
63
|
+
const n = (r = this.shadowRoot) == null ? void 0 : r.children[0], a = !!n;
|
|
64
|
+
return n.remove(), t.classList.add("opacity-0"), (s = this.shadowRoot) == null || s.append(t), t.animate([{ opacity: 0 }, { opacity: 1 }], { duration: a ? 150 : 100, easing: "cubic-bezier(0.25, 0.8, 0.25, 1)", fill: "forwards" }), { component: t, route: e };
|
|
65
|
+
}), h(({ component: t, route: e }) => {
|
|
66
|
+
e.historyStrategy === void 0 || e.historyStrategy === "push" ? history.pushState(e.state, "", this.newPath(t.tagName, e)) : e.historyStrategy && ["replace", "pop"].includes(e.historyStrategy) && history.replaceState(e.state, "", this.newPath(t.tagName, e)), c.current.set(this.name, { component: t.tagName, state: e.state, area: this.name }), c.$current.next(c.current);
|
|
67
|
+
}), f(this.disconnecting)).subscribe();
|
|
68
|
+
}
|
|
69
|
+
newPath(t, e) {
|
|
70
|
+
const n = location.pathname.split("/").pop();
|
|
71
|
+
let a = {};
|
|
72
|
+
try {
|
|
73
|
+
a = n ? JSON.parse(decodeURIComponent(n)) : {};
|
|
74
|
+
} catch {
|
|
75
|
+
a = {};
|
|
76
|
+
}
|
|
77
|
+
e.state = e.state ?? {};
|
|
78
|
+
const r = e.clearQueryParams ? this.queryParamClear(e.clearQueryParams) : document.location.search;
|
|
79
|
+
return encodeURIComponent(JSON.stringify({ ...a, [this.name]: { component: t.toLowerCase(), state: e.state } })).concat(`${r}`);
|
|
80
|
+
}
|
|
81
|
+
queryParamClear(t) {
|
|
82
|
+
if (!t) return "";
|
|
83
|
+
const e = new URLSearchParams(location.search);
|
|
84
|
+
return t.forEach((n) => e.delete(n)), e.toString() === "" ? "" : `?${e.toString()}`;
|
|
85
|
+
}
|
|
86
|
+
checkForTeleportationRequests() {
|
|
87
|
+
return g(window, "FLIP_REQUEST").pipe(o((t) => t.detail), R(0), h(() => {
|
|
88
|
+
this.dispatchEvent(new CustomEvent("FLIP_STARTED"));
|
|
89
|
+
}), f(this.disconnecting), v(0), E(() => i(null)));
|
|
90
|
+
}
|
|
91
|
+
disconnectedCallback() {
|
|
92
|
+
super.disconnectedCallback(), this.disconnecting.next(!0);
|
|
93
|
+
}
|
|
94
|
+
render() {
|
|
95
|
+
return F` <slot> </slot> `;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
y([P()], m.prototype, "name", 2), y([P()], m.prototype, "default", 2), m = y([J("schmancy-area")], m);
|
|
99
|
+
export {
|
|
100
|
+
k as F,
|
|
101
|
+
q as H,
|
|
102
|
+
m as S,
|
|
103
|
+
c as a,
|
|
104
|
+
w as b,
|
|
105
|
+
B as r
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=area.component-Dzl8Iw9I.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area.component-Dzl8Iw9I.js","sources":["../src/area/area.service.ts","../src/area/router.types.ts","../src/area/area.component.ts"],"sourcesContent":["import { ReplaySubject, Subject, bufferTime, fromEvent, map, of, tap, timeout, zip } from 'rxjs'\nimport { SchmancyTeleportation } from '../teleport'\nimport { ActiveRoute, RouteAction } from './router.types'\n\nexport const routerHistory = new Subject<RouteAction>()\n\nexport const FINDING_MORTIES = 'FINDING_MORTIES'\nexport const HERE_RICKY = 'HERE_RICKY'\nexport type HERE_RICKY_EVENT = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\nexport type FINDING_MORTIES_EVENT = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\n\nclass AreaService {\n\tprivate static instance: AreaService\n\tpublic prettyURL = false\n\tpublic mode: 'SILENT' | 'HISTORY' = 'HISTORY'\n\tpublic request = new ReplaySubject<RouteAction>(1)\n\tpublic current = new Map<string, ActiveRoute>()\n\tpublic $current = new ReplaySubject<Map<string, ActiveRoute>>(1)\n\tpublic enableHistoryMode = true\n\tprivate findingMortiesEvent = new CustomEvent<FINDING_MORTIES_EVENT['detail']>(FINDING_MORTIES)\n\n\tconstructor() {\n\t\tthis.$current.next(this.current)\n\t}\n\n\tfind() {\n\t\treturn zip([\n\t\t\tfromEvent<HERE_RICKY_EVENT>(window, HERE_RICKY).pipe(\n\t\t\t\tmap(e => e.detail),\n\t\t\t\tbufferTime(0),\n\t\t\t\ttap(console.log),\n\t\t\t),\n\t\t\tof(1).pipe(tap(() => window.dispatchEvent(this.findingMortiesEvent))),\n\t\t]).pipe(\n\t\t\tmap(([component]) => component),\n\t\t\ttimeout(1),\n\t\t)\n\t}\n\n\tpush(r: RouteAction) {\n\t\tthis.request.next(r)\n\t}\n\n\tpop(name: string) {\n\t\tconst newState = JSON.parse(JSON.stringify(area.state))\n\t\tdelete newState[name]\n\t\tconsole.log(area.state, newState)\n\t\thistory.replaceState(null, '', encodeURIComponent(JSON.stringify(newState)))\n\t}\n\tstatic getInstance() {\n\t\tif (!AreaService.instance) {\n\t\t\tAreaService.instance = new AreaService()\n\t\t}\n\t\treturn AreaService.instance\n\t}\n\n\tget state() {\n\t\tconst pathname = location.pathname.split('/').pop()\n\t\tlet areaState = {}\n\t\ttry {\n\t\t\tareaState = pathname ? JSON.parse(decodeURIComponent(pathname)) : {}\n\t\t} catch {\n\t\t\tareaState = {}\n\t\t}\n\t\treturn areaState\n\t}\n}\n\nexport const area = AreaService.getInstance()\nexport default area\n","export type RouteAction = {\n\tcomponent: CustomElementConstructor | string | HTMLElement\n\tarea: string\n\tstate?: object\n\thistoryStrategy?: THistoryStrategy\n\tclearQueryParams?: string[] | null\n}\n\nexport type ActiveRoute = {\n\tcomponent: string\n\tarea: string\n\tstate?: object\n}\n\nexport type THistoryStrategy = 'push' | 'replace' | 'pop' | 'silent'\n\nexport enum HISTORY_STRATEGY {\n\tpush = 'push',\n\treplace = 'replace',\n\tpop = 'pop',\n\tsilent = 'silent',\n}\n","import { $LitElement } from '@mixins/index'\nimport { TemplateResult, css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport {\n\tEMPTY,\n\tbufferTime,\n\tcatchError,\n\tdistinctUntilChanged,\n\tfilter,\n\tfrom,\n\tfromEvent,\n\tmap,\n\tmerge,\n\tof,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimeout,\n} from 'rxjs'\nimport { isPresent } from 'ts-is-present'\nimport area from './area.service'\nimport { HISTORY_STRATEGY, RouteAction } from './router.types'\n\ntype TRouteArea = {\n\tcomponent: string\n\tstate: object | undefined\n}\n\n@customElement('schmancy-area')\nexport class SchmancyArea extends $LitElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tdisplay: block;\n\t\tinset: 0;\n\t}\n`) {\n\t/**\n\t * The name of the router outlet\n\t * @attr\n\t * @type {string}\n\t * @public\n\t * @required\n\t */\n\t@property() name!: string\n\n\t@property() default!: string | Promise<NodeModule> | CustomElementConstructor | TemplateResult<1>\n\n\t/**\n\t *\n\t * @param pathname pathname from the browser location API\n\t * @param historyStrategy the history strategy to use for the route like PUSH, REPLACE, or SILENT\n\t * @returns rxjs pipes that will return the component to render and the history strategy to use\n\t */\n\tgetComponentFromPathname(pathname: string, historyStrategy: HISTORY_STRATEGY) {\n\t\treturn of(pathname).pipe(\n\t\t\tmap(path => path.split('/').pop() ?? ''),\n\t\t\tmap(path => decodeURIComponent(path)),\n\t\t\tmap(path => JSON.parse(path)),\n\t\t\tmap(routes => routes[this.name] as TRouteArea),\n\t\t\tmap(component =>\n\t\t\t\t!component && this.default\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tcomponent: this.default,\n\t\t\t\t\t\t\tstate: undefined,\n\t\t\t\t\t\t}\n\t\t\t\t\t: component,\n\t\t\t),\n\t\t\tfilter(x => isPresent(x)),\n\t\t\tmap((component: TRouteArea) => ({\n\t\t\t\tarea: this.name,\n\t\t\t\tcomponent: component.component ?? this.default,\n\t\t\t\tstate: component.state,\n\t\t\t\thistoryStrategy,\n\t\t\t})),\n\t\t\tmap(x => x as RouteAction),\n\t\t\tcatchError(() => {\n\t\t\t\treturn this.default\n\t\t\t\t\t? of({\n\t\t\t\t\t\t\tarea: this.name,\n\t\t\t\t\t\t\tcomponent: this.default,\n\t\t\t\t\t\t\thistoryStrategy,\n\t\t\t\t\t\t} as RouteAction)\n\t\t\t\t\t: EMPTY\n\t\t\t}),\n\t\t)\n\t}\n\n\tprotected firstUpdated(): void {\n\t\tif (!this.name) {\n\t\t\t// TOOD: maybe enforce this to be unique\n\t\t\tthrow new Error('Area name or default component not set')\n\t\t}\n\n\t\t// active outlet changes\n\t\tmerge(\n\t\t\t// 1) initial load from location.pathname\n\t\t\tof(location.pathname).pipe(\n\t\t\t\tswitchMap(pathname => this.getComponentFromPathname(pathname, HISTORY_STRATEGY.silent)),\n\t\t\t\tmap(route => route as RouteAction),\n\t\t\t\ttake(1),\n\t\t\t),\n\t\t\t// 2) requests to change the route for this area\n\t\t\tarea.request.pipe(filter(({ area }) => area === this.name)),\n\t\t\t// 3) popstate events (back, forward)\n\t\t\tfromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\tmap(e => (e.target as Window).location.pathname),\n\t\t\t\tswitchMap(pathname => this.getComponentFromPathname(pathname, HISTORY_STRATEGY.silent)),\n\t\t\t\tmap(route => route as RouteAction),\n\t\t\t),\n\t\t)\n\t\t\t.pipe(\n\t\t\t\tfilter(request => !!request.component),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdistinctUntilChanged((a, b) => {\n\t\t\t\t\tlet aComponent, bComponent\n\t\t\t\t\tif (typeof a.component === 'function') return false\n\t\t\t\t\telse if (typeof a.component === 'string') aComponent = a.component\n\n\t\t\t\t\tif (typeof b.component === 'function') return false\n\t\t\t\t\telse if (typeof b.component === 'string') bComponent = b.component\n\n\t\t\t\t\treturn bComponent?.replaceAll('-', '').toLowerCase() === aComponent?.replaceAll('-', '').toLowerCase()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.pipe(\n\t\t\t\tswitchMap(route => {\n\t\t\t\t\tconst c = route.component\n\t\t\t\t\tif (c instanceof Promise) {\n\t\t\t\t\t\t// Dynamic import module\n\t\t\t\t\t\treturn from(c).pipe(map(x => ({ component: x.exports.default as CustomElementConstructor, route })))\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Already a string, function, or element\n\t\t\t\t\t\treturn of({ component: c, route })\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tmap(({ component, route }) => {\n\t\t\t\t\tif (typeof component === 'string') {\n\t\t\t\t\t\t// Tag name\n\t\t\t\t\t\treturn { component: document.createElement(component), route }\n\t\t\t\t\t} else if (component instanceof HTMLElement) {\n\t\t\t\t\t\t// Already an element instance\n\t\t\t\t\t\treturn { component, route }\n\t\t\t\t\t} else if (typeof component === 'function') {\n\t\t\t\t\t\t// Custom element constructor\n\t\t\t\t\t\treturn { component: new component(), route }\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged((prev, curr) => prev.component.tagName === curr.component.tagName),\n\t\t\t\t// create the new view and add it to the DOM\n\t\t\t\tmap(({ component, route }) => {\n\t\t\t\t\tconst oldView = this.shadowRoot?.children[0]\n\t\t\t\t\tconst oldViewExists = !!oldView\n\n\t\t\t\t\t// Remove the old view (if any)\n\t\t\t\t\toldView.remove()\n\t\t\t\t\t// Native Web Animations API - fade in\n\t\t\t\t\t// \"ease: cubic-bezier(0.25, 0.8, 0.25, 1)\" was used in the old code\n\t\t\t\t\tcomponent.classList.add('opacity-0')\n\t\t\t\t\tthis.shadowRoot?.append(component)\n\t\t\t\t\tcomponent.animate([{ opacity: 0 }, { opacity: 1 }], {\n\t\t\t\t\t\tduration: oldViewExists ? 150 : 100,\n\t\t\t\t\t\teasing: 'cubic-bezier(0.25, 0.8, 0.25, 1)',\n\t\t\t\t\t\tfill: 'forwards',\n\t\t\t\t\t})\n\n\t\t\t\t\t// Insert the new view\n\n\t\t\t\t\treturn { component, route }\n\t\t\t\t}),\n\t\t\t\ttap(({ component, route }) => {\n\t\t\t\t\t// Handle history updates\n\t\t\t\t\tif (typeof route.historyStrategy === 'undefined' || route.historyStrategy === 'push') {\n\t\t\t\t\t\thistory.pushState(route.state, '', this.newPath(component.tagName, route))\n\t\t\t\t\t} else if (route.historyStrategy && ['replace', 'pop'].includes(route.historyStrategy)) {\n\t\t\t\t\t\thistory.replaceState(route.state, '', this.newPath(component.tagName, route))\n\t\t\t\t\t}\n\t\t\t\t\tarea.current.set(this.name, {\n\t\t\t\t\t\tcomponent: component.tagName,\n\t\t\t\t\t\tstate: route.state,\n\t\t\t\t\t\tarea: this.name,\n\t\t\t\t\t})\n\n\t\t\t\t\tarea.$current.next(area.current)\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tnewPath(tag: string, route: RouteAction) {\n\t\tconst oldPathname = location.pathname.split('/').pop()\n\t\tlet oldAreaState = {}\n\t\ttry {\n\t\t\toldAreaState = oldPathname ? JSON.parse(decodeURIComponent(oldPathname)) : {}\n\t\t} catch {\n\t\t\toldAreaState = {}\n\t\t}\n\t\troute.state = route.state ?? {}\n\t\tconst queryParams = route.clearQueryParams ? this.queryParamClear(route.clearQueryParams) : document.location.search\n\n\t\treturn encodeURIComponent(\n\t\t\tJSON.stringify({\n\t\t\t\t...oldAreaState,\n\t\t\t\t[this.name]: { component: tag.toLowerCase(), state: route.state },\n\t\t\t}),\n\t\t).concat(`${queryParams}`)\n\t}\n\n\tqueryParamClear(params?: string[]) {\n\t\tif (!params) {\n\t\t\treturn ''\n\t\t}\n\t\t// get query params from url\n\t\tconst urlParams = new URLSearchParams(location.search)\n\t\t// remove query params\n\t\tparams.forEach(param => urlParams.delete(param))\n\t\t// update url\n\t\tif (urlParams.toString() === '') return ''\n\t\treturn `?${urlParams.toString()}`\n\t}\n\n\tcheckForTeleportationRequests() {\n\t\treturn fromEvent<CustomEvent>(window, 'FLIP_REQUEST').pipe(\n\t\t\tmap(e => e.detail),\n\t\t\tbufferTime(0),\n\t\t\ttap(() => {\n\t\t\t\tthis.dispatchEvent(new CustomEvent('FLIP_STARTED'))\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t\ttimeout(0),\n\t\t\tcatchError(() => of(null)),\n\t\t)\n\t}\n\n\tdisconnectedCallback(): void {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\trender() {\n\t\treturn html` <slot> </slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-area': SchmancyArea\n\t}\n}\n"],"names":["routerHistory","Subject","FINDING_MORTIES","HERE_RICKY","AreaService","constructor","this","prettyURL","mode","request","ReplaySubject","current","Map","$current","enableHistoryMode","findingMortiesEvent","CustomEvent","next","find","zip","fromEvent","window","pipe","map","e","detail","bufferTime","tap","console","log","of","dispatchEvent","component","timeout","r","name","newState","JSON","parse","stringify","area","state","history","replaceState","encodeURIComponent","instance","pathname","location","split","pop","areaState","decodeURIComponent","getInstance","HISTORY_STRATEGY","SchmancyArea","$LitElement","css","historyStrategy","path","routes","default","filter","x","isPresent","catchError","EMPTY","firstUpdated","Error","merge","switchMap","getComponentFromPathname","silent","route","take","target","takeUntil","disconnecting","distinctUntilChanged","a","b","aComponent","bComponent","replaceAll","toLowerCase","c","Promise","from","exports","document","createElement","HTMLElement","prev","curr","tagName","oldView","shadowRoot","children","oldViewExists","remove","classList","add","append","animate","opacity","duration","easing","fill","pushState","newPath","includes","set","subscribe","tag","oldPathname","oldAreaState","queryParams","clearQueryParams","queryParamClear","search","concat","params","urlParams","URLSearchParams","forEach","param","delete","toString","checkForTeleportationRequests","disconnectedCallback","super","html","__decorateClass","property","prototype","customElement"],"mappings":";;;;;;;;AAIa,MAAAA,IAAgB,IAAIC,KAEpBC,IAAkB,mBAClBC,IAAa;AAQ1B,MAAMC,EAAAA;AAAAA,EAUL,cAAAC;AARAC,SAAOC,YAAAA,IACPD,KAAOE,OAA6B,WAC7BF,KAAAG,UAAU,IAAIC,EAA2B,CAAA,GACzCJ,KAAAK,8BAAcC,OACdN,KAAAO,WAAW,IAAIH,EAAwC,IAC9DJ,KAAO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,aACf3C,GAAAA,EAAQ,CACR+B,GAAAA,EAAW,MAAMlC,EAAG,IACrB,CAAA,CAAA;AAAA,EAAA;AAAA,EAGD,uBAAAkG;AACCC,UAAMD,qBAAAA,GACD1H,KAAAsE,cAAc3D,KAAK,EAAA;AAAA,EAAI;AAAA,EAG7B,SACQ;AAAA,WAAAiH;AAAAA,EAAA;AArMIC;AAAAA,EAAA,CAAXC,EAAAA,CAAAA,GAdW9E,EAcA+E,WAAA,QAAA,CAAA,GAEAF,EAAA,CAAXC,EAhBW9E,CAAAA,GAAAA,EAgBA+E,WAAA,WAAA,CAhBA/E,GAAAA,IAAN6E,EAAA,CADNG,EAAc,eAAA,CAAA,GACFhF;"}
|
package/dist/area.js
CHANGED
package/dist/card.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./teleport.component-
|
|
1
|
+
"use strict";require("./teleport.component-BVj_m_Kl.cjs");
|
|
2
2
|
//# sourceMappingURL=card.cjs.map
|
package/dist/card.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./teleport.component-
|
|
1
|
+
import "./teleport.component-K6cmr5Tr.js";
|
|
2
2
|
//# sourceMappingURL=card.js.map
|
package/dist/content-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-BVj_m_Kl.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
|
|
2
2
|
//# sourceMappingURL=content-drawer.cjs.map
|
package/dist/content-drawer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-
|
|
1
|
+
import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-K6cmr5Tr.js";
|
|
2
2
|
export {
|
|
3
3
|
n as SchmancyContentDrawer,
|
|
4
4
|
t as SchmancyContentDrawerID,
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-CrZbI_E_.cjs");const r=require("./area.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-CrZbI_E_.cjs");const r=require("./area.component-D5Fb0wFU.cjs");require("./autocomplete-Bsx63fvs.cjs"),require("./spinner-vBTOD2N0.cjs");const o=require("./icon-button-ChOGnclR.cjs"),e=require("./teleport.component-BVj_m_Kl.cjs"),u=require("./checkbox-D5Zw8R82.cjs");require("./chips-D5ADFFCU.cjs");const b=require("./payment-card-form-IamvKqiN.cjs");require("./date-range-CH-IKoMW.cjs");const m=require("./delay-DSBPkKzK.cjs"),c=require("./ripple-C2BHbhcS.cjs");require("./divider-CcTSaeAl.cjs"),require("./form-cxzC6GVM.cjs"),require("./icon-BEKKW3-2.cjs"),require("./input-C7C9t_rb.cjs");const t=require("./flex-B_mVCq18.cjs"),a=require("./list-D1kS-XDO.cjs");require("./menu-D30w9YPg.cjs");const i=require("./outlet-DqRiezsh.cjs");require("./option-x_W6-_iT.cjs");const l=require("./radio-group-zGJIFNCR.cjs"),p=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const d=require("./select-B194j_5a.cjs"),n=require("./sheet-CHFHgh29.cjs"),S=require("./slider-BgNoOOeQ.cjs"),h=require("./surface-Csc8YLks.cjs");require("./table-DHHo5etf.cjs"),require("./tabs-group-BRVzKIRX.cjs"),require("./textarea-CUi2u7J7.cjs");const y=require("./theme.component-BI2OGjYG.cjs"),f=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-BJe1x0Cs.cjs");const g=require("./tree-8ORo7bDg.cjs"),q=require("./types.cjs"),O=require("./typewriter-JuHIja1a.cjs"),w=require("./typography-BMkQ3cH-.cjs"),D=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=r.FINDING_MORTIES,exports.HERE_RICKY=r.HERE_RICKY,exports.HISTORY_STRATEGY=r.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>r.SchmancyArea}),exports.area=r.area,exports.routerHistory=r.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>o.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.$drawer=e.$drawer,exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>u.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>b.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>m.SchmancyDelay}),exports.delayContext=m.delayContext,exports.color=c.color,exports.fullHeight=c.fullHeight,exports.ripple=c.ripple,Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>t.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>t.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>t.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>t.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>a.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>a.SchmancyListItem}),exports.SchmancyListTypeContext=a.SchmancyListTypeContext,exports.$notify=i.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>i.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>i.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>l.RadioGroup}),exports.mutationObserver=p.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>d.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>S.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>S.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>h.SchmancySurface}),exports.SchmancySurfaceTypeContext=h.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>y.SchmancyThemeComponent}),exports.formateTheme=y.formateTheme,exports.tailwindStyles=y.tailwindStyles,exports.SchmancyTheme=f.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>g.SchmancyTree}),exports.SchmancyEvents=q.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>O.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=D.intersection$;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./animated-text-CmvbdVJF.js";
|
|
2
|
-
import { F as C, H as d, b as T, S as u, a as b, r as N } from "./area.component-
|
|
2
|
+
import { F as C, H as d, b as T, S as u, a as b, r as N } from "./area.component-Dzl8Iw9I.js";
|
|
3
3
|
import "./autocomplete-C7d1TghO.js";
|
|
4
4
|
import "./spinner-Vwv-mKip.js";
|
|
5
5
|
import { S as R, a as v } from "./icon-button-DlC2-vLK.js";
|
|
6
|
-
import { $ as M, H as g, e as E, b as A, f as F, c as Y, d as $, g as k, S as G, a as L, i as O, k as W, l as _, m as B, j as P, n as j, o as K, W as V, s as q, h as z, t as J } from "./teleport.component-
|
|
6
|
+
import { $ as M, H as g, e as E, b as A, f as F, c as Y, d as $, g as k, S as G, a as L, i as O, k as W, l as _, m as B, j as P, n as j, o as K, W as V, s as q, h as z, t as J } from "./teleport.component-K6cmr5Tr.js";
|
|
7
7
|
import { S as U } from "./checkbox-Ddc3Nogy.js";
|
|
8
8
|
import "./chips-Bm_VYwr5.js";
|
|
9
9
|
import { S as Z } from "./payment-card-form-CwqKB8Tm.js";
|
package/dist/nav-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-BVj_m_Kl.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
|
|
2
2
|
//# sourceMappingURL=nav-drawer.cjs.map
|
package/dist/nav-drawer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-
|
|
1
|
+
import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-K6cmr5Tr.js";
|
|
2
2
|
export {
|
|
3
3
|
c as $drawer,
|
|
4
4
|
e as SchmancyDrawerAppbar,
|
package/dist/teleport.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-BVj_m_Kl.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
|
|
2
2
|
//# sourceMappingURL=teleport.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const h=require("lit"),c=require("lit/decorators.js"),n=require("rxjs");require("./animated-text-CrZbI_E_.cjs");const O=require("./area.component-
|
|
1
|
+
"use strict";const h=require("lit"),c=require("lit/decorators.js"),n=require("rxjs");require("./animated-text-CrZbI_E_.cjs");const O=require("./area.component-D5Fb0wFU.cjs");require("./autocomplete-Bsx63fvs.cjs"),require("./spinner-vBTOD2N0.cjs"),require("./icon-button-ChOGnclR.cjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const S=require("./tailwind.mixin-BM-bjRjT.cjs"),$=require("./theme.interface-Xg5Zi46a.cjs");require("./checkbox-D5Zw8R82.cjs"),require("./chips-D5ADFFCU.cjs"),require("./payment-card-form-IamvKqiN.cjs");const p=require("./types.cjs"),l=require("./provide-DSU87U5x.cjs"),w=require("./litElement.mixin-PVEJyATw.cjs"),d=require("./consume-Bb7_UzYd.cjs");require("./date-range-CH-IKoMW.cjs"),require("./delay-DSBPkKzK.cjs");const b=require("./ripple-C2BHbhcS.cjs");require("./divider-CcTSaeAl.cjs"),require("./form-cxzC6GVM.cjs"),require("./icon-BEKKW3-2.cjs"),require("./input-C7C9t_rb.cjs"),require("./flex-B_mVCq18.cjs"),require("./list-D1kS-XDO.cjs"),require("./menu-D30w9YPg.cjs");const I=require("lit/directives/when.js");require("./outlet-DqRiezsh.cjs"),require("./option-x_W6-_iT.cjs"),require("./radio-group-zGJIFNCR.cjs"),require("./index-DyJ0oDpR.cjs"),require("./select-B194j_5a.cjs");const U=require("./sheet-CHFHgh29.cjs");require("./slider-BgNoOOeQ.cjs"),require("./surface-Csc8YLks.cjs"),require("./table-DHHo5etf.cjs"),require("./tabs-group-BRVzKIRX.cjs"),require("./textarea-CUi2u7J7.cjs"),require("./theme.component-BI2OGjYG.cjs"),require("./theme-button-BJe1x0Cs.cjs"),require("./tree-8ORo7bDg.cjs"),require("./typewriter-JuHIja1a.cjs"),require("./typography-BMkQ3cH-.cjs");const T=require("rxjs/operators");var Y=Object.getOwnPropertyDescriptor;let H=class extends S.TailwindElement(h.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
@@ -147,4 +147,4 @@
|
|
|
147
147
|
class="${this.classMap({"fixed inset-0 z-49 hidden":!0})}"
|
|
148
148
|
></div>
|
|
149
149
|
`}},u([d.c({context:W,subscribe:!0}),c.state()],exports.SchmancyNavigationDrawerSidebar.prototype,"mode",2),u([d.c({context:j,subscribe:!0}),c.state()],exports.SchmancyNavigationDrawerSidebar.prototype,"drawerState",2),u([c.query("#overlay")],exports.SchmancyNavigationDrawerSidebar.prototype,"overlay",2),u([c.query("nav")],exports.SchmancyNavigationDrawerSidebar.prototype,"nav",2),u([c.property({type:String})],exports.SchmancyNavigationDrawerSidebar.prototype,"width",2),u([c.state()],exports.SchmancyNavigationDrawerSidebar.prototype,"_initialized",2),exports.SchmancyNavigationDrawerSidebar=u([c.customElement("schmancy-nav-drawer-navbar")],exports.SchmancyNavigationDrawerSidebar);const _="whereAreYouRicky",A="hereMorty",f=new class{constructor(){this.activeTeleportations=new Map,this.flipRequests=new n.Subject,this.find=e=>n.zip([n.fromEvent(window,A).pipe(n.filter(t=>!!t.detail.component.uuid&&!!e.id&&t.detail.component.id===e.id&&t.detail.component.uuid!==e.uuid),n.map(t=>t.detail.component),n.take(1)),n.of(e).pipe(n.tap(()=>{window.dispatchEvent(new CustomEvent(_,{detail:{id:e.id,callerID:e.uuid}}))}))]).pipe(n.map(([t])=>t),n.timeout(0)),this.flip=e=>{const{from:t,to:i}=e,s=i.element.style.zIndex;i.element.style.transformOrigin="top left",i.element.style.setProperty("visibility","visible"),i.element.style.zIndex="1000";const a=[{transform:`translate(${t.rect.left-i.rect.left}px, ${t.rect.top-i.rect.top}px) scale(${t.rect.width/i.rect.width}, ${t.rect.height/i.rect.height})`},{transform:"translate(0, 0) scale(1, 1)"}];i.element.animate(a,{duration:250,delay:10,easing:"cubic-bezier(0.455, 0.03, 0.515, 0.955)"}).onfinish=()=>{i.element.style.zIndex=s,i.element.style.transformOrigin=""}},this.flipRequests.pipe(n.bufferTime(1),n.map(e=>e.map(({from:t,to:i,host:s},a)=>({from:t,to:i,host:s,i:a}))),n.concatMap(e=>n.zip(e.map(t=>n.of(this.flip(t)))))).subscribe()}};function B(e){return n.interval(50).pipe(T.map(()=>e.getBoundingClientRect()),T.distinctUntilChanged((t,i)=>t.width===i.width&&t.height===i.height&&t.top===i.top&&t.right===i.right&&t.bottom===i.bottom&&t.left===i.left),T.take(1))}var ye=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,q=(e,t,i,s)=>{for(var a,r=s>1?void 0:s?ue(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(r=(s?a(t,i,r):a(r))||r);return s&&r&&ye(t,i,r),r};exports.SchmancyTeleportation=class extends w.$LitElement(h.css``){constructor(){super(...arguments),this.uuid=Math.floor(Math.random()*Date.now()),this.delay=0,this.debugging=!1}get _slottedChildren(){return this.shadowRoot.querySelector("slot").assignedElements({flatten:!0})}connectedCallback(){if(this.id===void 0)throw new Error("id is required");super.connectedCallback(),n.merge(n.fromEvent(window,O.FINDING_MORTIES).pipe(n.tap({next:()=>{this.dispatchEvent(new CustomEvent(O.HERE_RICKY,{detail:{component:this},bubbles:!0,composed:!0}))}})),n.fromEvent(window,_).pipe(n.tap({next:e=>{e.detail.id===this.id&&this.uuid&&e.detail.callerID!==this.uuid&&this.dispatchEvent(new CustomEvent(A,{detail:{component:this},bubbles:!0,composed:!0}))}}))).pipe(n.takeUntil(this.disconnecting)).subscribe()}async firstUpdated(){n.of(f.activeTeleportations.get(this.id)).pipe(n.filter(e=>!!e),n.takeUntil(this.disconnecting),n.throwIfEmpty()).subscribe({next:e=>{this.style.setProperty("visibility","hidden"),B(this).pipe(n.takeUntil(this.disconnecting)).subscribe({next:t=>{f.activeTeleportations.set(this.id,t),f.flipRequests.next({from:{rect:e},to:{rect:t,element:this._slottedChildren[0]},host:this})}})},error:()=>{this.style.setProperty("visibility","visible"),B(this).pipe(n.takeUntil(this.disconnecting)).subscribe({next:e=>{f.activeTeleportations.set(this.id,e)}})},complete:()=>{}})}render(){return h.html`<slot></slot>`}},q([c.property({type:Number,reflect:!0})],exports.SchmancyTeleportation.prototype,"uuid",2),q([c.property({type:String})],exports.SchmancyTeleportation.prototype,"id",2),q([c.property({type:Number})],exports.SchmancyTeleportation.prototype,"delay",2),exports.SchmancyTeleportation=q([c.customElement("schmancy-teleport")],exports.SchmancyTeleportation),exports.$drawer=ae,exports.HereMorty=A,exports.SchmancyContentDrawerID=X,exports.SchmancyContentDrawerMaxHeight=k,exports.SchmancyContentDrawerMinWidth=N,exports.SchmancyContentDrawerSheetMode=M,exports.SchmancyContentDrawerSheetState=R,exports.SchmancyDrawerNavbarMode=W,exports.SchmancyDrawerNavbarState=j,exports.WhereAreYouRicky=_,exports.schmancyContentDrawer=Z,exports.schmancyNavDrawer=K,exports.teleport=f;
|
|
150
|
-
//# sourceMappingURL=teleport.component-
|
|
150
|
+
//# sourceMappingURL=teleport.component-BVj_m_Kl.cjs.map
|