@mhmo91/schmancy 0.2.26 → 0.2.27
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/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 +24 -25
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/sheet-B7UZL0S4.cjs +45 -0
- package/dist/sheet-B7UZL0S4.cjs.map +1 -0
- package/dist/{sheet-Dt3siMhI.js → sheet-Qm3DILOR.js} +65 -79
- package/dist/sheet-Qm3DILOR.js.map +1 -0
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +5 -6
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component--U4504z0.cjs → teleport.component-BXIGP3Vs.cjs} +2 -2
- package/dist/{teleport.component--U4504z0.cjs.map → teleport.component-BXIGP3Vs.cjs.map} +1 -1
- package/dist/{teleport.component-DW6Kqmit.js → teleport.component-Cn1e_GQp.js} +2 -2
- package/dist/{teleport.component-DW6Kqmit.js.map → teleport.component-Cn1e_GQp.js.map} +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +1 -1
- package/types/src/sheet/hook.d.ts +1 -1
- package/types/src/sheet/index.d.ts +0 -2
- package/dist/sheet-DOtLsAs_.cjs +0 -46
- package/dist/sheet-DOtLsAs_.cjs.map +0 -1
- package/dist/sheet-Dt3siMhI.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teleport.component-DW6Kqmit.js","sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts","../src/content-drawer/$sheet.ts","../src/content-drawer/context.ts","../src/content-drawer/drawer.ts","../src/content-drawer/main.ts","../src/content-drawer/sheet.ts","../src/nav-drawer/$navbar.ts","../src/nav-drawer/context.ts","../src/nav-drawer/appbar.ts","../src/nav-drawer/content.ts","../src/nav-drawer/drawer.ts","../src/nav-drawer/navbar.ts","../src/teleport/teleport.service.ts","../src/teleport/watcher.ts","../src/teleport/teleport.component.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html` <section class=\"pb-4 px-4\"><slot> </slot></section> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardMedia\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement() {\n\t@property() type: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'rounded-md': true,\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t'shadow-5': this.elevation === 5,\n\t\t\t'hover:shadow-xs': ['outlined', 'filled'].includes(this.type),\n\t\t\t'bg-surface-low shadow-xs hover:shadow-sm': this.type === 'elevated',\n\t\t\t'bg-surface-highest': this.type === 'filled',\n\t\t\t'bg-surface-default border border-solid border-1 border-outlineVariant': this.type === 'outlined',\n\t\t}\n\t\treturn html`<div class=\"${this.classMap(classes)}\">\n\t\t\t<slot> </slot>\n\t\t</div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { color } from '..'\n\n/**\n * @element schmancy-card-content\n * @slot headline\n * @slot subhead\n * @slot default - The content of the card\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement() {\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'px-[16px] py-[24px]': true,\n\t\t}\n\t\tconst onSurface = SchmancyTheme.sys.color.surface.on\n\t\tconst onSurfaceVariant = SchmancyTheme.sys.color.surface.onVariant\n\t\treturn html`<schmancy-grid gap=\"md\" class=\"${this.classMap(classes)}\">\n\t\t\t<schmancy-grid gap=\"xs\">\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurface,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\ttoken=\"lg\"\n\t\t\t\t\t><slot name=\"headline\"> </slot\n\t\t\t\t></schmancy-typography>\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\t><slot name=\"subhead\"></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t</schmancy-grid>\n\t\t\t<schmancy-typography\n\t\t\t\ttype=\"body\"\n\t\t\t\t${color({\n\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-typography>\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\n\tprotected render(): unknown {\n\t\tconst styles = {\n\t\t\theight: '200px',\n\t\t}\n\t\tconst classes = {\n\t\t\t'object-center': true,\n\t\t\t'object-contain': this.fit === 'contain',\n\t\t\t'object-cover w-full': this.fit === 'cover',\n\t\t\t'object-fill': this.fit === 'fill',\n\t\t\t'object-none': this.fit === 'none',\n\t\t\t'object-scale-down': this.fit === 'scale-down',\n\t\t}\n\t\treturn html`<schmancy-grid align=\"stretch\" justify=\"stretch\" gap=\"md\">\n\t\t\t<img src=\"${this.src}\" style=${this.styleMap(styles)} class=\"${this.classMap(classes)}\" />\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { Subject } from 'rxjs'\n\ntype DrawerAction = 'dismiss' | 'render'\ntype TRef = Element | Window\ntype TRenderRequest = HTMLElement\nexport type TRenderCustomEvent = CustomEvent<{\n\tcomponent: TRenderRequest\n\ttitle?: string\n}>\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tref: TRef\n\t\taction: DrawerAction\n\t\tcomponent?: TRenderRequest\n\t\ttitle?: string\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe().subscribe(data => {\n\t\t\tif (data.action === 'dismiss') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t} else if (data.action === 'render') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('schmancy-content-drawer-render', {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tcomponent: data.component,\n\t\t\t\t\t\t\ttitle: data.title,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\n\tdimiss(ref: TRef) {\n\t\tthis.$drawer.next({\n\t\t\taction: 'dismiss',\n\t\t\tref: ref,\n\t\t})\n\t}\n\n\trender(ref: TRef, component: TRenderRequest, title?: string) {\n\t\tref.dispatchEvent(new CustomEvent('custom-event'))\n\t\tthis.$drawer.next({\n\t\t\taction: 'render',\n\t\t\tref: ref,\n\t\t\tcomponent: component,\n\t\t\ttitle,\n\t\t})\n\t}\n}\n\nexport const schmancyContentDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyContentDrawerSheetMode = 'push' | 'overlay'\nexport const SchmancyContentDrawerSheetMode = createContext<TSchmancyContentDrawerSheetMode>('push')\n\nexport type TSchmancyContentDrawerSheetState = 'open' | 'close'\nexport const SchmancyContentDrawerSheetState = createContext<TSchmancyContentDrawerSheetState>('close')\n\nexport const SchmancyContentDrawerID = createContext<string>(Math.floor(Math.random() * Date.now()).toString())\nexport const SchmancyContentDrawerMaxHeight = createContext<string>('100%')\nexport const SchmancyContentDrawerMinWidth = createContext<{\n\tmain: number\n\tsheet: number\n}>({})\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, merge, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, TRenderCustomEvent, area, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n/**\n * @element schmancy-content-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-content-drawer')\nexport class SchmancyContentDrawer extends $LitElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t/**\n\t * The minimum width of the sheet\n\t * @attr\tminWidth\n\t * @type {number}\n\t * @memberof SchmancyContentDrawer\n\t */\n\n\t@provide({ context: SchmancyContentDrawerMinWidth })\n\tminWidth: typeof SchmancyContentDrawerMinWidth.__context__ = {\n\t\tmain: 360,\n\t\tsheet: 576,\n\t}\n\n\t/**\n\t * The state of the sheet\n\t * @attr open\n\t * @type {TSchmancyContentDrawerSheetState}\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetState })\n\t@property()\n\topen: TSchmancyContentDrawerSheetState\n\n\t/**\n\t * The mode of the sheet\n\t * @type {TSchmancyContentDrawerSheetMode}\n\t * @memberof SchmancyContentDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetMode })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@provide({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID = Math.floor(Math.random() * Date.now()).toString()\n\n\t@provide({ context: SchmancyContentDrawerMaxHeight })\n\tmaxHeight = '100%'\n\n\t@queryAssignedElements({ flatten: true })\n\tassignedElements!: HTMLElement[]\n\tfirstUpdated(): void {\n\t\tmerge(fromEvent<CustomEvent>(window, 'resize'), fromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerResize))\n\t\t\t.pipe(\n\t\t\t\tstartWith(true),\n\t\t\t\ttap(() => console.log(this.minWidth)),\n\t\t\t\tmap(() => (this.clientWidth ? this.clientWidth : window.innerWidth)),\n\t\t\t\tmap(width => width >= this.minWidth.main + this.minWidth.sheet),\n\t\t\t\tdebounceTime(100),\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis.maxHeight = `${window.innerHeight - this.getOffsetTop(this) - 32}px`\n\t\t\t\t\tthis.style.setProperty('max-height', this.maxHeight)\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerToggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\tthis.open = state\n\t\t\t})\n\n\t\tfromEvent<TRenderCustomEvent>(window, 'schmancy-content-drawer-render')\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(({ component, title }) => {\n\t\t\t\tif (this.mode === 'push') {\n\t\t\t\t\t// TODO: Fix the router to render if constructor has different arguments\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: 'empty',\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t} else if ((this.mode = 'overlay')) {\n\t\t\t\t\tsheet.open({ component: component, uid: this.schmancyContentDrawerID, title })\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tgetOffsetTop(element) {\n\t\tlet offsetTop = 0\n\t\twhile (element) {\n\t\t\toffsetTop += element.offsetTop\n\t\t\telement = element.offsetParent\n\t\t}\n\t\treturn offsetTop\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.mode === 'overlay' ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer': SchmancyContentDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { PropertyValueMap, css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { SchmancyEvents } from '..'\nimport {\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetMode,\n} from './context'\nimport { when } from 'lit/directives/when.js'\n\n@customElement('schmancy-content-drawer-main')\nexport class SchmancyContentDrawerMain extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) this.drawerMinWidth.main = this.minWidth\n\t\telse this.minWidth = this.drawerMinWidth.main\n\t}\n\n\tprotected update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n\t\tsuper.update(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\tthis.drawerMinWidth.main = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t}\n\t}\n\n\trender() {\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\t\treturn html`\n\t\t\t<section class=\"relative inset-0 h-full\">\n\t\t\t\t<schmancy-grid\n\t\t\t\t\tclass=\"h-full relative overflow-scroll\"\n\t\t\t\t\tcols=\"${this.mode === 'push' ? 'auto 1fr' : '1fr'}\"\n\t\t\t\t\trows=\"1fr\"\n\t\t\t\t\tflow=\"col\"\n\t\t\t\t\talign=\"stretch\"\n\t\t\t\t\tjustify=\"stretch\"\n\t\t\t\t>\n\t\t\t\t\t<section style=${this.styleMap(styles)}>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</section>\n\t\t\t\t</schmancy-grid>\n\t\t\t\t${when(\n\t\t\t\t\tthis.mode === 'push',\n\t\t\t\t\t() => html` <schmancy-divider class=\"absolute right-0 top-0\" orientation=\"vertical\"></schmancy-divider>`,\n\t\t\t\t)}\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-main': SchmancyContentDrawerMain\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { from, merge, Observable, of, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n// --- 1) Removed the custom animate import\n// import { animate } from '@packages/anime-beta-master'\n\n@customElement('schmancy-content-drawer-sheet')\nexport class SchmancyContentDrawerSheet extends $LitElement(css`\n\t:host {\n\t\toverflow: scroll;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerSheetState, subscribe: true })\n\t@state()\n\tstate: TSchmancyContentDrawerSheetState\n\n\t@consume({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID\n\n\t@query('#sheet') sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true, slot: undefined }) defaultSlot!: HTMLElement[]\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) {\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t} else {\n\t\t\tthis.minWidth = this.drawerMinWidth.sheet\n\t\t}\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\t// If the 'minWidth' property changed\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t} else if (changedProperties.has('state') || changedProperties.has('mode')) {\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\t// Overlay open logic if needed\n\t\t\t\t\t// this.open()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tsheet.dismiss(this.schmancyContentDrawerID)\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.open()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Open the sheet by sliding it into view.\n\t */\n\topen() {\n\t\t// \"onBegin\" logic from the old `animate(...)`\n\t\tif (this.mode === 'overlay') {\n\t\t\tthis.sheet.style.position = 'fixed'\n\t\t} else {\n\t\t\tthis.sheet.style.position = 'relative'\n\t\t}\n\t\tthis.sheet.style.display = 'block'\n\n\t\t// --- 2) Use native Web Animations API ---\n\t\tthis.sheet.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 0, transform: 'translateX(100%)' },\n\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 500,\n\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t},\n\t\t)\n\t\t// No return is needed if you don't rely on the result\n\t}\n\n\t/**\n\t * Close everything (modal sheet + the sheet itself).\n\t */\n\tcloseAll() {\n\t\t// Merge them into a single subscription,\n\t\t// so that everything closes in parallel.\n\t\tmerge(from(this.closeModalSheet()), from(this.closeSheet())).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\t/**\n\t * Dismiss the \"modal sheet.\"\n\t * This just returns an Observable that completes immediately.\n\t */\n\tcloseModalSheet() {\n\t\treturn of(true).pipe(tap(() => sheet.dismiss(this.schmancyContentDrawerID)))\n\t}\n\n\t/**\n\t * Slide the sheet out of view + hide it.\n\t * Return an Observable so we can merge it with other close operations.\n\t */\n\tcloseSheet() {\n\t\t// --- 2) Use native Web Animations API and wrap in an Observable ---\n\t\treturn new Observable<void>(observer => {\n\t\t\tconst animation = this.sheet.animate(\n\t\t\t\t[\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(100%)' },\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tduration: 500,\n\t\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tanimation.onfinish = () => {\n\t\t\t\t// \"onComplete\" logic\n\t\t\t\tthis.sheet.style.display = 'none'\n\t\t\t\tobserver.next()\n\t\t\t\tobserver.complete()\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected render() {\n\t\tconst sheetClasses = {\n\t\t\tblock: this.mode === 'push',\n\t\t\t'absolute z-50': this.mode === 'overlay',\n\t\t\t'opacity-1': this.mode === 'overlay' && this.state === 'open',\n\t\t}\n\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<section id=\"sheet\" class=\"${this.classMap(sheetClasses)}\" style=${this.styleMap(styles)}>\n\t\t\t\t<schmancy-area name=\"${this.schmancyContentDrawerID}\">\n\t\t\t\t\t<slot name=\"placeholder\"></slot>\n\t\t\t\t</schmancy-area>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-sheet': SchmancyContentDrawerSheet\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { debounceTime, distinctUntilKeyChanged, Subject } from 'rxjs'\n\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tself: HTMLElement\n\t\tstate: boolean\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe(distinctUntilKeyChanged('state'), debounceTime(100)).subscribe(data => {\n\t\t\tconsole.log('drawer', data)\n\t\t\tif (data.state) {\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\topen(self?: HTMLElement) {\n\t\tthis.$drawer.next({\n\t\t\tself,\n\t\t\tstate: true,\n\t\t})\n\t}\n\tclose(self?: HTMLElement) {\n\t\tthis.$drawer.next({\n\t\t\tself,\n\t\t\tstate: false,\n\t\t})\n\t}\n}\n\nexport const schmancyNavDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyDrawerNavbarMode = 'push' | 'overlay' | undefined\nexport const SchmancyDrawerNavbarMode = createContext<TSchmancyDrawerNavbarMode>('push')\n\nexport type TSchmancyDrawerNavbarState = 'open' | 'close' | undefined\nexport const SchmancyDrawerNavbarState = createContext<TSchmancyDrawerNavbarState>('close')\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n} from '@schmancy/nav-drawer/context'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { SchmancyEvents } from '..'\n\n/**\n * @element schmancy-nav-drawer-appbar\n * @slot toggler - The toggler slot\n * @slot - The default slot\n */\n@customElement('schmancy-nav-drawer-appbar')\nexport class SchmancyDrawerAppbar extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@consume({ context: SchmancyDrawerNavbarMode, subscribe: true })\n\t@state()\n\tsidebarMode: TSchmancyDrawerNavbarMode\n\n\t@consume({ context: SchmancyDrawerNavbarState, subscribe: true })\n\t@state()\n\tsidebarOpen\n\n\t@property({ type: Boolean }) toggler = true\n\n\trender() {\n\t\tconst appbarClasses = {\n\t\t\t'block z-50': true,\n\t\t}\n\t\tconst sidebarToggler = {\n\t\t\t'block left-3 z-50': this.sidebarMode === 'overlay',\n\t\t\thidden: this.sidebarMode === 'push',\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.sidebarMode === 'overlay' && this.toggler ? 'auto 1fr' : '1fr'}\n\t\t\t\tflow=\"col\"\n\t\t\t\tclass=${this.classMap(appbarClasses)}\n\t\t\t\tgap=\"sm\"\n\t\t\t\talign=\"center\"\n\t\t\t>\n\t\t\t\t${when(\n\t\t\t\t\tthis.sidebarMode === 'overlay' && this.toggler,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<slot name=\"toggler\">\n\t\t\t\t\t\t\t<div class=\"${this.classMap(sidebarToggler)}\">\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\t\t\t\t\t\t\tdetail: { state: this.sidebarOpen === 'open' ? 'close' : 'open' },\n\t\t\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\t\t\t\tthis.sidebarOpen === 'close',\n\t\t\t\t\t\t\t\t\t\t() => html`menu`,\n\t\t\t\t\t\t\t\t\t\t() => html`menu_open`,\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</slot>`,\n\t\t\t\t)}\n\n\t\t\t\t<slot> </slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-appbar': SchmancyDrawerAppbar\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n@customElement('schmancy-nav-drawer-content')\nexport class SchmancyNavigationDrawerContent extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tinset: 0;\n\t\toverflow-y: auto;\n\t}\n`) {\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent(this, 'scroll')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(e => {\n\t\t\t\tthis.parentElement.dispatchEvent(new CustomEvent('scroll', { detail: e, bubbles: true, composed: true }))\n\t\t\t})\n\t}\n\trender() {\n\t\treturn html` <slot></slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-content': SchmancyNavigationDrawerContent\n\t}\n}\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents } from '..'\nimport { fullHeight } from './../directives/height'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n\tTSchmancyDrawerNavbarState,\n} from './context'\n\n/**\n * @element schmancy-nav-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-nav-drawer')\nexport class SchmancyNavigationDrawer extends $LitElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t}\n`) {\n\t// fullscreen property\n\t@property({ type: Boolean })\n\tfullscreen: boolean = false\n\n\t/**\n\t * The minimum width of the sidebar\n\t * @attr\tbreakpoint\n\t * @type {number}\n\t * @memberof SchmancyNavigationDrawer\n\t */\n\t@property({ type: Number, attribute: 'breakpoint' })\n\tbreakpoint: number = 768\n\n\t/**\n\t * The mode of the sidebar\n\t * @type {TSchmancyDrawerNavbarMode}\n\t * @memberof SchmancyNavigationDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyDrawerNavbarMode })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t@provide({ context: SchmancyDrawerNavbarState })\n\t@property()\n\topen: TSchmancyDrawerNavbarState\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent<CustomEvent>(window, 'resize')\n\t\t\t.pipe(\n\t\t\t\tmap(event => event.target as Window),\n\t\t\t\tstartWith(window),\n\t\t\t\tmap(window => window.innerWidth),\n\t\t\t\tmap(width => width >= this.breakpoint),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(100),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.NavDrawer_toggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(100),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\t// if the mode is push, we don't need to close the overlay when the state is close\n\t\t\t\tif (this.mode === 'push' && state === 'close') return\n\t\t\t\tthis.open = state\n\t\t\t})\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.fullscreen ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t\t${fullHeight()}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer': SchmancyNavigationDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { SchmancyEvents, SchmancyTheme, color } from '..'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n\tTSchmancyDrawerNavbarState,\n} from './context'\n\n@customElement('schmancy-nav-drawer-navbar')\nexport class SchmancyNavigationDrawerSidebar extends $LitElement() {\n\t@consume({ context: SchmancyDrawerNavbarMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t@consume({ context: SchmancyDrawerNavbarState, subscribe: true })\n\t@state()\n\tprivate state: TSchmancyDrawerNavbarState\n\n\t@query('#overlay') overlay!: HTMLElement\n\t@query('nav') nav!: HTMLElement\n\n\t@property({ type: String }) width = '320px'\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tif (changedProperties.has('state')) {\n\t\t\tconsole.log('state changed', this.state, this.mode)\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.hideNavDrawer()\n\t\t\t\t\tthis.closeOverlay()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.openOverlay()\n\t\t\t\t\tthis.showNavDrawer()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tthis.showNavDrawer()\n\t\t\t\tthis.closeOverlay()\n\t\t\t}\n\t\t}\n\t}\n\n\topenOverlay() {\n\t\t// Equivalent to onBegin\n\t\tthis.overlay.style.display = 'block'\n\n\t\t// Animate opacity from 0 to 0.4\n\t\tthis.overlay.animate([{ opacity: 0 }, { opacity: 0.4 }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards', // <-- This keeps the final keyframe (0.4) after finishing\n\t\t})\n\t\t// If you want an onfinish here, you can add it:\n\t\t// .onfinish = () => console.log('overlay opened!')\n\t}\n\n\tcloseOverlay() {\n\t\t// Animate opacity from 0.4 to 0\n\t\tconst animation = this.overlay.animate([{ opacity: 0.4 }, { opacity: 0 }], {\n\t\t\tduration: 150,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\t// translateX(-100%) when the animation is finished\n\t\t// Equivalent to onComplete\n\t\tanimation.onfinish = () => {\n\t\t\tthis.overlay.style.display = 'none'\n\t\t}\n\t}\n\n\t// show nav drawer\n\tshowNavDrawer() {\n\t\t// check the transform, skip if already open\n\t\tif (this.nav.style.transform === 'translateX(0)') return\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(-100%)' }, { transform: 'translateX(0)' }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.state = 'open'\n\t\t}\n\t}\n\n\t// hide nav drawer\n\thideNavDrawer() {\n\t\t// skip if already closed\n\t\tif (this.nav.style.transform === 'translateX(-100%)') return\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(0)' }, { transform: 'translateX(-100%)' }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.state = 'close'\n\t\t}\n\t}\n\n\tprotected render() {\n\t\tconst sidebarClasses = {\n\t\t\t'p-[16px] max-w-[360px] w-fit h-full overflow-auto': true,\n\t\t\tblock: this.mode === 'push',\n\t\t\t'fixed inset-0 z-50': this.mode === 'overlay',\n\t\t}\n\t\tconst overlayClass = {\n\t\t\t'fixed inset-0 z-49 hidden': true,\n\t\t}\n\n\t\tconst styleMap = {\n\t\t\twidth: this.width,\n\t\t}\n\n\t\treturn html`\n\t\t\t<nav\n\t\t\t\tstyle=${this.styleMap(styleMap)}\n\t\t\t\tclass=\"${this.classMap({ ...sidebarClasses })}\"\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.container,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</nav>\n\t\t\t<div\n\t\t\t\tid=\"overlay\"\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.scrim,\n\t\t\t\t})}\n\t\t\t\t@click=${() => {\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\t\tdetail: { state: 'close' },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}}\n\t\t\t\tclass=\"${this.classMap({ ...overlayClass })}\"\n\t\t\t></div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-navbar': SchmancyNavigationDrawerSidebar\n\t}\n}\n","import { bufferTime, concatMap, filter, fromEvent, map, of, Subject, take, tap, timeout, zip } from 'rxjs'\nimport { SchmancyTeleportation } from './teleport.component'\n\nexport type WhereAreYouRickyEvent = CustomEvent<{\n\tid: string\n\tcallerID: number\n}>\n\nexport const WhereAreYouRicky = 'whereAreYouRicky'\n\nexport type HereMortyEvent = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\n\nexport type FLIP_REQUEST = {\n\tfrom: {\n\t\trect: DOMRect\n\t\telement?: HTMLElement\n\t}\n\tto: {\n\t\trect: DOMRect\n\t\telement: HTMLElement\n\t}\n\tstagger?: number\n\thost: HTMLElement\n}\nexport const HereMorty = 'hereMorty'\n\nclass Teleportation {\n\tactiveTeleportations = new Map<string, DOMRect>()\n\tflipRequests = new Subject<FLIP_REQUEST>()\n\n\tconstructor() {\n\t\tthis.flipRequests\n\t\t\t.pipe(\n\t\t\t\tbufferTime(1),\n\t\t\t\tmap(requests =>\n\t\t\t\t\trequests.map(({ from, to, host }, i) => ({\n\t\t\t\t\t\tfrom,\n\t\t\t\t\t\tto,\n\t\t\t\t\t\thost,\n\t\t\t\t\t\ti,\n\t\t\t\t\t})),\n\t\t\t\t),\n\t\t\t\tconcatMap(requests => zip(requests.map(request => of(this.flip(request))))),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tfind = (component: SchmancyTeleportation) => {\n\t\treturn zip([\n\t\t\tfromEvent<HereMortyEvent>(window, HereMorty).pipe(\n\t\t\t\tfilter(\n\t\t\t\t\te =>\n\t\t\t\t\t\t!!e.detail.component.uuid &&\n\t\t\t\t\t\t!!component.id &&\n\t\t\t\t\t\te.detail.component.id === component.id &&\n\t\t\t\t\t\te.detail.component.uuid !== component.uuid,\n\t\t\t\t),\n\t\t\t\tmap(e => e.detail.component),\n\t\t\t\ttake(1),\n\t\t\t),\n\t\t\tof(component).pipe(\n\t\t\t\ttap(() => {\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent<WhereAreYouRickyEvent['detail']>(WhereAreYouRicky, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\tid: component.id,\n\t\t\t\t\t\t\t\tcallerID: component.uuid,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t),\n\t\t]).pipe(\n\t\t\tmap(([component]) => component),\n\t\t\ttimeout(0),\n\t\t)\n\t}\n\n\tflip = (request: {\n\t\tfrom: {\n\t\t\trect: DOMRect\n\t\t}\n\t\tto: {\n\t\t\telement: HTMLElement\n\t\t\trect: DOMRect\n\t\t}\n\t\thost: HTMLElement\n\t\ti: number\n\t}) => {\n\t\tconst { from, to } = request\n\n\t\t// Prepare the element for animation\n\t\tconst originalZIndex = to.element.style.zIndex\n\t\tto.element.style.transformOrigin = 'top left'\n\t\tto.element.style.setProperty('visibility', 'visible')\n\t\tto.element.style.zIndex = '1000'\n\n\t\t// \"onBegin\" logic goes here (since Web Animations doesn't have onBegin).\n\t\t// If you had more logic, place it here:\n\t\t// e.g., console.log('Starting FLIP animation...');\n\n\t\t// Calculate starting and ending transforms\n\t\tconst startX = from.rect.left - to.rect.left\n\t\tconst startY = from.rect.top - to.rect.top\n\t\tconst startScaleX = from.rect.width / to.rect.width\n\t\tconst startScaleY = from.rect.height / to.rect.height\n\n\t\t// Create keyframes\n\t\tconst keyframes: Keyframe[] = [\n\t\t\t{\n\t\t\t\ttransform: `translate(${startX}px, ${startY}px) scale(${startScaleX}, ${startScaleY})`,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttransform: 'translate(0, 0) scale(1, 1)',\n\t\t\t},\n\t\t]\n\n\t\t// Use native Web Animations API\n\t\tconst animation = to.element.animate(keyframes, {\n\t\t\tduration: 250,\n\t\t\tdelay: 10, // if desired\n\t\t\t// Approximate 'inOutQuad' via a cubic-bezier easing.\n\t\t\t// You can adjust these values to taste, or use a standard one:\n\t\t\teasing: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',\n\t\t\t// or simply 'ease-in-out'\n\t\t})\n\n\t\t// \"onComplete\" logic goes here\n\t\tanimation.onfinish = () => {\n\t\t\tto.element.style.zIndex = originalZIndex\n\t\t\tto.element.style.transformOrigin = ''\n\t\t\t// If you have additional cleanup, place it here\n\t\t\t// e.g., console.log('FLIP animation completed!');\n\t\t}\n\t}\n}\n\nexport const teleport = new Teleportation()\nexport default teleport\n","import { Observable, interval } from 'rxjs'\nimport { distinctUntilChanged, map, take } from 'rxjs/operators'\n\n// Function to monitor element's bounding client rect\nexport function watchElementRect(element: Element): Observable<DOMRectReadOnly> {\n\treturn interval(50).pipe(\n\t\t// startWith(true),\n\t\tmap(() => element.getBoundingClientRect()),\n\t\tdistinctUntilChanged(\n\t\t\t(prev, curr) =>\n\t\t\t\tprev.width === curr.width &&\n\t\t\t\tprev.height === curr.height &&\n\t\t\t\tprev.top === curr.top &&\n\t\t\t\tprev.right === curr.right &&\n\t\t\t\tprev.bottom === curr.bottom &&\n\t\t\t\tprev.left === curr.left,\n\t\t),\n\t\ttake(1),\n\t)\n}\n","import { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { filter, fromEvent, merge, of, takeUntil, tap, throwIfEmpty } from 'rxjs'\nimport { FINDING_MORTIES, FINDING_MORTIES_EVENT, HERE_RICKY, HERE_RICKY_EVENT } from '..'\nimport {\n\tHereMorty,\n\tHereMortyEvent,\n\tWhereAreYouRicky,\n\tWhereAreYouRickyEvent,\n\tdefault as teleport,\n\tdefault as teleportationService,\n} from './teleport.service'\nimport { watchElementRect } from './watcher'\nimport { $LitElement } from '@mixins/index'\n@customElement('schmancy-teleport')\nexport class SchmancyTeleportation extends $LitElement(css``) {\n\t/**\n\t * @attr {string} uuid - The component tag to teleport\n\t * @readonly\n\t */\n\t@property({ type: Number, reflect: true }) uuid = Math.floor(Math.random() * Date.now())\n\n\t/**\n\t * @attr {string} id - The component tag to teleport\n\t * @required\n\t */\n\t@property({ type: String }) id!: string\n\n\t@property({ type: Number }) delay = 0\n\n\tdebugging = import.meta.env.DEV ? true : false\n\n\tget _slottedChildren() {\n\t\tconst slot = this.shadowRoot.querySelector('slot')\n\t\treturn slot.assignedElements({ flatten: true })\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (this.id === undefined) throw new Error('id is required')\n\t\tsuper.connectedCallback()\n\t\tmerge(\n\t\t\tfromEvent<FINDING_MORTIES_EVENT>(window, FINDING_MORTIES).pipe(\n\t\t\t\ttap({\n\t\t\t\t\tnext: () => {\n\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\tnew CustomEvent<HERE_RICKY_EVENT['detail']>(HERE_RICKY, {\n\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\tcomponent: this,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tfromEvent<WhereAreYouRickyEvent>(window, WhereAreYouRicky).pipe(\n\t\t\t\ttap({\n\t\t\t\t\tnext: e => {\n\t\t\t\t\t\tif (e.detail.id === this.id && this.uuid && e.detail.callerID !== this.uuid) {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent<HereMortyEvent['detail']>(HereMorty, {\n\t\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\t\tcomponent: this,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe()\n\t}\n\n\tasync firstUpdated() {\n\t\tof(teleportationService.activeTeleportations.get(this.id))\n\t\t\t.pipe(\n\t\t\t\tfilter(a => !!a),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tthrowIfEmpty(),\n\t\t\t)\n\t\t\t.subscribe({\n\t\t\t\tnext: domRect => {\n\t\t\t\t\tconsole.count('teleport')\n\t\t\t\t\tthis.style.setProperty('visibility', 'hidden')\n\t\t\t\t\t// teleport.flipRequests.next({ from: component, to: this, stagger: 0 })\n\t\t\t\t\twatchElementRect(this)\n\t\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t\t.subscribe({\n\t\t\t\t\t\t\tnext: e => {\n\t\t\t\t\t\t\t\t// console.log(e)\n\t\t\t\t\t\t\t\tteleportationService.activeTeleportations.set(this.id, e)\n\t\t\t\t\t\t\t\tteleport.flipRequests.next({\n\t\t\t\t\t\t\t\t\tfrom: {\n\t\t\t\t\t\t\t\t\t\trect: domRect,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tto: {\n\t\t\t\t\t\t\t\t\t\trect: e,\n\t\t\t\t\t\t\t\t\t\telement: this._slottedChildren[0] as HTMLElement,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\terror: () => {\n\t\t\t\t\tthis.style.setProperty('visibility', 'visible')\n\t\t\t\t\twatchElementRect(this)\n\t\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t\t.subscribe({\n\t\t\t\t\t\t\tnext: e => {\n\t\t\t\t\t\t\t\tconsole.log(e)\n\t\t\t\t\t\t\t\tteleportationService.activeTeleportations.set(this.id, e)\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tcomplete: () => {},\n\t\t\t})\n\t}\n\n\trender() {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-teleport': SchmancyTeleportation\n\t}\n}\n"],"names":["SchmancyCardMedia","TailwindElement","css","html","customElement","SchmancyCard","super","arguments","this","type","elevation","classes","includes","classMap","__decorateClass","property","prototype","Number","SchmancyCardContent","render","onSurface","SchmancyTheme","sys","color","surface","on","onSurfaceVariant","onVariant","src","fit","styleMap","height","String","reflect","schmancyContentDrawer","constructor","$drawer","Subject","pipe","subscribe","data","action","ref","dispatchEvent","CustomEvent","SchmancyEvents","ContentDrawerToggle","detail","state","bubbles","composed","component","title","next","e","SchmancyContentDrawerSheetMode","createContext","SchmancyContentDrawerSheetState","SchmancyContentDrawerID","Math","floor","random","Date","now","toString","SchmancyContentDrawerMaxHeight","SchmancyContentDrawerMinWidth","SchmancyContentDrawer","$LitElement","minWidth","main","sheet","schmancyContentDrawerID","maxHeight","merge","fromEvent","window","ContentDrawerResize","startWith","tap","map","clientWidth","innerWidth","width","debounceTime","innerHeight","getOffsetTop","style","setProperty","distinctUntilChanged","takeUntil","disconnecting","lgScreen","mode","open","event","stopPropagation","area","push","historyStrategy","uid","element","offsetTop","offsetParent","nothing","provide","context","queryAssignedElements","flatten","SchmancyContentDrawerMain","connectedCallback","drawerMinWidth","changedProperties","update","has","styles","when","consume","SchmancyContentDrawerSheet","updated","closeAll","dismiss","position","display","animate","opacity","transform","duration","easing","from","closeModalSheet","closeSheet","of","Observable","observer","onfinish","complete","sheetClasses","block","query","slot","undefined","schmancyNavDrawer","distinctUntilKeyChanged","NavDrawer_toggle","self","SchmancyDrawerNavbarMode","SchmancyDrawerNavbarState","SchmancyDrawerAppbar","toggler","sidebarToggler","sidebarMode","hidden","sidebarOpen","Boolean","SchmancyNavigationDrawerContent","parentElement","SchmancyNavigationDrawer","fullscreen","breakpoint","target","fullHeight","attribute","SchmancyNavigationDrawerSidebar","hideNavDrawer","closeOverlay","openOverlay","showNavDrawer","overlay","fill","nav","sidebarClasses","bgColor","container","scrim","WhereAreYouRicky","HereMorty","teleport","activeTeleportations","Map","flipRequests","find","zip","filter","uuid","id","take","callerID","timeout","flip","request","to","originalZIndex","zIndex","transformOrigin","keyframes","rect","left","top","delay","bufferTime","requests","host","i","concatMap","watchElementRect","interval","getBoundingClientRect","prev","curr","right","bottom","SchmancyTeleportation","debugging","shadowRoot","querySelector","assignedElements","Error","FINDING_MORTIES","HERE_RICKY","teleportationService","get","a","throwIfEmpty","domRect","set","_slottedChildren","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAqBA,KAArB,cAA+CC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA,CAKpD,EAAA;AAAA,EAAA;AACF,WAAAC;AAAAA,EAAA;AANYH;AAAAA;;;GAArB,CADCI,EAAc,sBAAA,CAAA,GACMJ;;;;;ACJrB,IAAqBK,IAArB,cAA0CJ,EAA1C,EAAA;AAAA,EAAA;AAAAK,UAAAC,GAAAA,SAAAA,GACwDC,KAAAC,OAAA,YACQD,KAAAE,YAAA;AAAA,EAAA;AAAA,EACrD;AACT,UAAMC,IAAU,EACf,cAAc,IACd,aAAaH,KAAKE,cAAc,GAChC,aAAaF,KAAKE,cAA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src/card/card.ts","../src/card/content.ts","../src/card/media.ts","../src/content-drawer/$sheet.ts","../src/content-drawer/context.ts","../src/content-drawer/drawer.ts","../src/content-drawer/main.ts","../src/content-drawer/sheet.ts","../src/nav-drawer/$navbar.ts","../src/nav-drawer/context.ts","../src/nav-drawer/appbar.ts","../src/nav-drawer/content.ts","../src/nav-drawer/drawer.ts","../src/nav-drawer/navbar.ts","../src/teleport/teleport.service.ts","../src/teleport/watcher.ts","../src/teleport/teleport.component.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html` <section class=\"pb-4 px-4\"><slot> </slot></section> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardMedia\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement() {\n\t@property() type: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'rounded-md': true,\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t'shadow-5': this.elevation === 5,\n\t\t\t'hover:shadow-xs': ['outlined', 'filled'].includes(this.type),\n\t\t\t'bg-surface-low shadow-xs hover:shadow-sm': this.type === 'elevated',\n\t\t\t'bg-surface-highest': this.type === 'filled',\n\t\t\t'bg-surface-default border border-solid border-1 border-outlineVariant': this.type === 'outlined',\n\t\t}\n\t\treturn html`<div class=\"${this.classMap(classes)}\">\n\t\t\t<slot> </slot>\n\t\t</div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { color } from '..'\n\n/**\n * @element schmancy-card-content\n * @slot headline\n * @slot subhead\n * @slot default - The content of the card\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement() {\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'px-[16px] py-[24px]': true,\n\t\t}\n\t\tconst onSurface = SchmancyTheme.sys.color.surface.on\n\t\tconst onSurfaceVariant = SchmancyTheme.sys.color.surface.onVariant\n\t\treturn html`<schmancy-grid gap=\"md\" class=\"${this.classMap(classes)}\">\n\t\t\t<schmancy-grid gap=\"xs\">\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurface,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\ttoken=\"lg\"\n\t\t\t\t\t><slot name=\"headline\"> </slot\n\t\t\t\t></schmancy-typography>\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\t><slot name=\"subhead\"></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t</schmancy-grid>\n\t\t\t<schmancy-typography\n\t\t\t\ttype=\"body\"\n\t\t\t\t${color({\n\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-typography>\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\n\tprotected render(): unknown {\n\t\tconst styles = {\n\t\t\theight: '200px',\n\t\t}\n\t\tconst classes = {\n\t\t\t'object-center': true,\n\t\t\t'object-contain': this.fit === 'contain',\n\t\t\t'object-cover w-full': this.fit === 'cover',\n\t\t\t'object-fill': this.fit === 'fill',\n\t\t\t'object-none': this.fit === 'none',\n\t\t\t'object-scale-down': this.fit === 'scale-down',\n\t\t}\n\t\treturn html`<schmancy-grid align=\"stretch\" justify=\"stretch\" gap=\"md\">\n\t\t\t<img src=\"${this.src}\" style=${this.styleMap(styles)} class=\"${this.classMap(classes)}\" />\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { Subject } from 'rxjs'\n\ntype DrawerAction = 'dismiss' | 'render'\ntype TRef = Element | Window\ntype TRenderRequest = HTMLElement\nexport type TRenderCustomEvent = CustomEvent<{\n\tcomponent: TRenderRequest\n\ttitle?: string\n}>\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tref: TRef\n\t\taction: DrawerAction\n\t\tcomponent?: TRenderRequest\n\t\ttitle?: string\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe().subscribe(data => {\n\t\t\tif (data.action === 'dismiss') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t} else if (data.action === 'render') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('schmancy-content-drawer-render', {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tcomponent: data.component,\n\t\t\t\t\t\t\ttitle: data.title,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\n\tdimiss(ref: TRef) {\n\t\tthis.$drawer.next({\n\t\t\taction: 'dismiss',\n\t\t\tref: ref,\n\t\t})\n\t}\n\n\trender(ref: TRef, component: TRenderRequest, title?: string) {\n\t\tref.dispatchEvent(new CustomEvent('custom-event'))\n\t\tthis.$drawer.next({\n\t\t\taction: 'render',\n\t\t\tref: ref,\n\t\t\tcomponent: component,\n\t\t\ttitle,\n\t\t})\n\t}\n}\n\nexport const schmancyContentDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyContentDrawerSheetMode = 'push' | 'overlay'\nexport const SchmancyContentDrawerSheetMode = createContext<TSchmancyContentDrawerSheetMode>('push')\n\nexport type TSchmancyContentDrawerSheetState = 'open' | 'close'\nexport const SchmancyContentDrawerSheetState = createContext<TSchmancyContentDrawerSheetState>('close')\n\nexport const SchmancyContentDrawerID = createContext<string>(Math.floor(Math.random() * Date.now()).toString())\nexport const SchmancyContentDrawerMaxHeight = createContext<string>('100%')\nexport const SchmancyContentDrawerMinWidth = createContext<{\n\tmain: number\n\tsheet: number\n}>({})\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, merge, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, TRenderCustomEvent, area, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n/**\n * @element schmancy-content-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-content-drawer')\nexport class SchmancyContentDrawer extends $LitElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t/**\n\t * The minimum width of the sheet\n\t * @attr\tminWidth\n\t * @type {number}\n\t * @memberof SchmancyContentDrawer\n\t */\n\n\t@provide({ context: SchmancyContentDrawerMinWidth })\n\tminWidth: typeof SchmancyContentDrawerMinWidth.__context__ = {\n\t\tmain: 360,\n\t\tsheet: 576,\n\t}\n\n\t/**\n\t * The state of the sheet\n\t * @attr open\n\t * @type {TSchmancyContentDrawerSheetState}\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetState })\n\t@property()\n\topen: TSchmancyContentDrawerSheetState\n\n\t/**\n\t * The mode of the sheet\n\t * @type {TSchmancyContentDrawerSheetMode}\n\t * @memberof SchmancyContentDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetMode })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@provide({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID = Math.floor(Math.random() * Date.now()).toString()\n\n\t@provide({ context: SchmancyContentDrawerMaxHeight })\n\tmaxHeight = '100%'\n\n\t@queryAssignedElements({ flatten: true })\n\tassignedElements!: HTMLElement[]\n\tfirstUpdated(): void {\n\t\tmerge(fromEvent<CustomEvent>(window, 'resize'), fromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerResize))\n\t\t\t.pipe(\n\t\t\t\tstartWith(true),\n\t\t\t\ttap(() => console.log(this.minWidth)),\n\t\t\t\tmap(() => (this.clientWidth ? this.clientWidth : window.innerWidth)),\n\t\t\t\tmap(width => width >= this.minWidth.main + this.minWidth.sheet),\n\t\t\t\tdebounceTime(100),\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis.maxHeight = `${window.innerHeight - this.getOffsetTop(this) - 32}px`\n\t\t\t\t\tthis.style.setProperty('max-height', this.maxHeight)\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerToggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\tthis.open = state\n\t\t\t})\n\n\t\tfromEvent<TRenderCustomEvent>(window, 'schmancy-content-drawer-render')\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(({ component, title }) => {\n\t\t\t\tif (this.mode === 'push') {\n\t\t\t\t\t// TODO: Fix the router to render if constructor has different arguments\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: 'empty',\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t} else if ((this.mode = 'overlay')) {\n\t\t\t\t\tsheet.open({ component: component, uid: this.schmancyContentDrawerID, title })\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tgetOffsetTop(element) {\n\t\tlet offsetTop = 0\n\t\twhile (element) {\n\t\t\toffsetTop += element.offsetTop\n\t\t\telement = element.offsetParent\n\t\t}\n\t\treturn offsetTop\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.mode === 'overlay' ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer': SchmancyContentDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { PropertyValueMap, css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { SchmancyEvents } from '..'\nimport {\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetMode,\n} from './context'\nimport { when } from 'lit/directives/when.js'\n\n@customElement('schmancy-content-drawer-main')\nexport class SchmancyContentDrawerMain extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) this.drawerMinWidth.main = this.minWidth\n\t\telse this.minWidth = this.drawerMinWidth.main\n\t}\n\n\tprotected update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n\t\tsuper.update(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\tthis.drawerMinWidth.main = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t}\n\t}\n\n\trender() {\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\t\treturn html`\n\t\t\t<section class=\"relative inset-0 h-full\">\n\t\t\t\t<schmancy-grid\n\t\t\t\t\tclass=\"h-full relative overflow-scroll\"\n\t\t\t\t\tcols=\"${this.mode === 'push' ? 'auto 1fr' : '1fr'}\"\n\t\t\t\t\trows=\"1fr\"\n\t\t\t\t\tflow=\"col\"\n\t\t\t\t\talign=\"stretch\"\n\t\t\t\t\tjustify=\"stretch\"\n\t\t\t\t>\n\t\t\t\t\t<section style=${this.styleMap(styles)}>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</section>\n\t\t\t\t</schmancy-grid>\n\t\t\t\t${when(\n\t\t\t\t\tthis.mode === 'push',\n\t\t\t\t\t() => html` <schmancy-divider class=\"absolute right-0 top-0\" orientation=\"vertical\"></schmancy-divider>`,\n\t\t\t\t)}\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-main': SchmancyContentDrawerMain\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { from, merge, Observable, of, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n// --- 1) Removed the custom animate import\n// import { animate } from '@packages/anime-beta-master'\n\n@customElement('schmancy-content-drawer-sheet')\nexport class SchmancyContentDrawerSheet extends $LitElement(css`\n\t:host {\n\t\toverflow: scroll;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerSheetState, subscribe: true })\n\t@state()\n\tstate: TSchmancyContentDrawerSheetState\n\n\t@consume({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID\n\n\t@query('#sheet') sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true, slot: undefined }) defaultSlot!: HTMLElement[]\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) {\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t} else {\n\t\t\tthis.minWidth = this.drawerMinWidth.sheet\n\t\t}\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\t// If the 'minWidth' property changed\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t} else if (changedProperties.has('state') || changedProperties.has('mode')) {\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\t// Overlay open logic if needed\n\t\t\t\t\t// this.open()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tsheet.dismiss(this.schmancyContentDrawerID)\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.open()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Open the sheet by sliding it into view.\n\t */\n\topen() {\n\t\t// \"onBegin\" logic from the old `animate(...)`\n\t\tif (this.mode === 'overlay') {\n\t\t\tthis.sheet.style.position = 'fixed'\n\t\t} else {\n\t\t\tthis.sheet.style.position = 'relative'\n\t\t}\n\t\tthis.sheet.style.display = 'block'\n\n\t\t// --- 2) Use native Web Animations API ---\n\t\tthis.sheet.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 0, transform: 'translateX(100%)' },\n\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 500,\n\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t},\n\t\t)\n\t\t// No return is needed if you don't rely on the result\n\t}\n\n\t/**\n\t * Close everything (modal sheet + the sheet itself).\n\t */\n\tcloseAll() {\n\t\t// Merge them into a single subscription,\n\t\t// so that everything closes in parallel.\n\t\tmerge(from(this.closeModalSheet()), from(this.closeSheet())).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\t/**\n\t * Dismiss the \"modal sheet.\"\n\t * This just returns an Observable that completes immediately.\n\t */\n\tcloseModalSheet() {\n\t\treturn of(true).pipe(tap(() => sheet.dismiss(this.schmancyContentDrawerID)))\n\t}\n\n\t/**\n\t * Slide the sheet out of view + hide it.\n\t * Return an Observable so we can merge it with other close operations.\n\t */\n\tcloseSheet() {\n\t\t// --- 2) Use native Web Animations API and wrap in an Observable ---\n\t\treturn new Observable<void>(observer => {\n\t\t\tconst animation = this.sheet.animate(\n\t\t\t\t[\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(100%)' },\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tduration: 500,\n\t\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tanimation.onfinish = () => {\n\t\t\t\t// \"onComplete\" logic\n\t\t\t\tthis.sheet.style.display = 'none'\n\t\t\t\tobserver.next()\n\t\t\t\tobserver.complete()\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected render() {\n\t\tconst sheetClasses = {\n\t\t\tblock: this.mode === 'push',\n\t\t\t'absolute z-50': this.mode === 'overlay',\n\t\t\t'opacity-1': this.mode === 'overlay' && this.state === 'open',\n\t\t}\n\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<section id=\"sheet\" class=\"${this.classMap(sheetClasses)}\" style=${this.styleMap(styles)}>\n\t\t\t\t<schmancy-area name=\"${this.schmancyContentDrawerID}\">\n\t\t\t\t\t<slot name=\"placeholder\"></slot>\n\t\t\t\t</schmancy-area>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-sheet': SchmancyContentDrawerSheet\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { debounceTime, distinctUntilKeyChanged, Subject } from 'rxjs'\n\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tself: HTMLElement\n\t\tstate: boolean\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe(distinctUntilKeyChanged('state'), debounceTime(100)).subscribe(data => {\n\t\t\tconsole.log('drawer', data)\n\t\t\tif (data.state) {\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\topen(self?: HTMLElement) {\n\t\tthis.$drawer.next({\n\t\t\tself,\n\t\t\tstate: true,\n\t\t})\n\t}\n\tclose(self?: HTMLElement) {\n\t\tthis.$drawer.next({\n\t\t\tself,\n\t\t\tstate: false,\n\t\t})\n\t}\n}\n\nexport const schmancyNavDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyDrawerNavbarMode = 'push' | 'overlay' | undefined\nexport const SchmancyDrawerNavbarMode = createContext<TSchmancyDrawerNavbarMode>('push')\n\nexport type TSchmancyDrawerNavbarState = 'open' | 'close' | undefined\nexport const SchmancyDrawerNavbarState = createContext<TSchmancyDrawerNavbarState>('close')\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n} from '@schmancy/nav-drawer/context'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { SchmancyEvents } from '..'\n\n/**\n * @element schmancy-nav-drawer-appbar\n * @slot toggler - The toggler slot\n * @slot - The default slot\n */\n@customElement('schmancy-nav-drawer-appbar')\nexport class SchmancyDrawerAppbar extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@consume({ context: SchmancyDrawerNavbarMode, subscribe: true })\n\t@state()\n\tsidebarMode: TSchmancyDrawerNavbarMode\n\n\t@consume({ context: SchmancyDrawerNavbarState, subscribe: true })\n\t@state()\n\tsidebarOpen\n\n\t@property({ type: Boolean }) toggler = true\n\n\trender() {\n\t\tconst appbarClasses = {\n\t\t\t'block z-50': true,\n\t\t}\n\t\tconst sidebarToggler = {\n\t\t\t'block left-3 z-50': this.sidebarMode === 'overlay',\n\t\t\thidden: this.sidebarMode === 'push',\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.sidebarMode === 'overlay' && this.toggler ? 'auto 1fr' : '1fr'}\n\t\t\t\tflow=\"col\"\n\t\t\t\tclass=${this.classMap(appbarClasses)}\n\t\t\t\tgap=\"sm\"\n\t\t\t\talign=\"center\"\n\t\t\t>\n\t\t\t\t${when(\n\t\t\t\t\tthis.sidebarMode === 'overlay' && this.toggler,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<slot name=\"toggler\">\n\t\t\t\t\t\t\t<div class=\"${this.classMap(sidebarToggler)}\">\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\t\t\t\t\t\t\tdetail: { state: this.sidebarOpen === 'open' ? 'close' : 'open' },\n\t\t\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\t\t\t\tthis.sidebarOpen === 'close',\n\t\t\t\t\t\t\t\t\t\t() => html`menu`,\n\t\t\t\t\t\t\t\t\t\t() => html`menu_open`,\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</slot>`,\n\t\t\t\t)}\n\n\t\t\t\t<slot> </slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-appbar': SchmancyDrawerAppbar\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n@customElement('schmancy-nav-drawer-content')\nexport class SchmancyNavigationDrawerContent extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tinset: 0;\n\t\toverflow-y: auto;\n\t}\n`) {\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent(this, 'scroll')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(e => {\n\t\t\t\tthis.parentElement.dispatchEvent(new CustomEvent('scroll', { detail: e, bubbles: true, composed: true }))\n\t\t\t})\n\t}\n\trender() {\n\t\treturn html` <slot></slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-content': SchmancyNavigationDrawerContent\n\t}\n}\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents } from '..'\nimport { fullHeight } from './../directives/height'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n\tTSchmancyDrawerNavbarState,\n} from './context'\n\n/**\n * @element schmancy-nav-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-nav-drawer')\nexport class SchmancyNavigationDrawer extends $LitElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t}\n`) {\n\t// fullscreen property\n\t@property({ type: Boolean })\n\tfullscreen: boolean = false\n\n\t/**\n\t * The minimum width of the sidebar\n\t * @attr\tbreakpoint\n\t * @type {number}\n\t * @memberof SchmancyNavigationDrawer\n\t */\n\t@property({ type: Number, attribute: 'breakpoint' })\n\tbreakpoint: number = 768\n\n\t/**\n\t * The mode of the sidebar\n\t * @type {TSchmancyDrawerNavbarMode}\n\t * @memberof SchmancyNavigationDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyDrawerNavbarMode })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t@provide({ context: SchmancyDrawerNavbarState })\n\t@property()\n\topen: TSchmancyDrawerNavbarState\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent<CustomEvent>(window, 'resize')\n\t\t\t.pipe(\n\t\t\t\tmap(event => event.target as Window),\n\t\t\t\tstartWith(window),\n\t\t\t\tmap(window => window.innerWidth),\n\t\t\t\tmap(width => width >= this.breakpoint),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(100),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.NavDrawer_toggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(100),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\t// if the mode is push, we don't need to close the overlay when the state is close\n\t\t\t\tif (this.mode === 'push' && state === 'close') return\n\t\t\t\tthis.open = state\n\t\t\t})\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.fullscreen ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t\t${fullHeight()}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer': SchmancyNavigationDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { SchmancyEvents, SchmancyTheme, color } from '..'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n\tTSchmancyDrawerNavbarState,\n} from './context'\n\n@customElement('schmancy-nav-drawer-navbar')\nexport class SchmancyNavigationDrawerSidebar extends $LitElement() {\n\t@consume({ context: SchmancyDrawerNavbarMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t@consume({ context: SchmancyDrawerNavbarState, subscribe: true })\n\t@state()\n\tprivate state: TSchmancyDrawerNavbarState\n\n\t@query('#overlay') overlay!: HTMLElement\n\t@query('nav') nav!: HTMLElement\n\n\t@property({ type: String }) width = '320px'\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tif (changedProperties.has('state')) {\n\t\t\tconsole.log('state changed', this.state, this.mode)\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.hideNavDrawer()\n\t\t\t\t\tthis.closeOverlay()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.openOverlay()\n\t\t\t\t\tthis.showNavDrawer()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tthis.showNavDrawer()\n\t\t\t\tthis.closeOverlay()\n\t\t\t}\n\t\t}\n\t}\n\n\topenOverlay() {\n\t\t// Equivalent to onBegin\n\t\tthis.overlay.style.display = 'block'\n\n\t\t// Animate opacity from 0 to 0.4\n\t\tthis.overlay.animate([{ opacity: 0 }, { opacity: 0.4 }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards', // <-- This keeps the final keyframe (0.4) after finishing\n\t\t})\n\t\t// If you want an onfinish here, you can add it:\n\t\t// .onfinish = () => console.log('overlay opened!')\n\t}\n\n\tcloseOverlay() {\n\t\t// Animate opacity from 0.4 to 0\n\t\tconst animation = this.overlay.animate([{ opacity: 0.4 }, { opacity: 0 }], {\n\t\t\tduration: 150,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\t// translateX(-100%) when the animation is finished\n\t\t// Equivalent to onComplete\n\t\tanimation.onfinish = () => {\n\t\t\tthis.overlay.style.display = 'none'\n\t\t}\n\t}\n\n\t// show nav drawer\n\tshowNavDrawer() {\n\t\t// check the transform, skip if already open\n\t\tif (this.nav.style.transform === 'translateX(0)') return\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(-100%)' }, { transform: 'translateX(0)' }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.state = 'open'\n\t\t}\n\t}\n\n\t// hide nav drawer\n\thideNavDrawer() {\n\t\t// skip if already closed\n\t\tif (this.nav.style.transform === 'translateX(-100%)') return\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(0)' }, { transform: 'translateX(-100%)' }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.state = 'close'\n\t\t}\n\t}\n\n\tprotected render() {\n\t\tconst sidebarClasses = {\n\t\t\t'p-[16px] max-w-[360px] w-fit h-full overflow-auto': true,\n\t\t\tblock: this.mode === 'push',\n\t\t\t'fixed inset-0 z-50': this.mode === 'overlay',\n\t\t}\n\t\tconst overlayClass = {\n\t\t\t'fixed inset-0 z-49 hidden': true,\n\t\t}\n\n\t\tconst styleMap = {\n\t\t\twidth: this.width,\n\t\t}\n\n\t\treturn html`\n\t\t\t<nav\n\t\t\t\tstyle=${this.styleMap(styleMap)}\n\t\t\t\tclass=\"${this.classMap({ ...sidebarClasses })}\"\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.container,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</nav>\n\t\t\t<div\n\t\t\t\tid=\"overlay\"\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.scrim,\n\t\t\t\t})}\n\t\t\t\t@click=${() => {\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\t\tdetail: { state: 'close' },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}}\n\t\t\t\tclass=\"${this.classMap({ ...overlayClass })}\"\n\t\t\t></div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-navbar': SchmancyNavigationDrawerSidebar\n\t}\n}\n","import { bufferTime, concatMap, filter, fromEvent, map, of, Subject, take, tap, timeout, zip } from 'rxjs'\nimport { SchmancyTeleportation } from './teleport.component'\n\nexport type WhereAreYouRickyEvent = CustomEvent<{\n\tid: string\n\tcallerID: number\n}>\n\nexport const WhereAreYouRicky = 'whereAreYouRicky'\n\nexport type HereMortyEvent = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\n\nexport type FLIP_REQUEST = {\n\tfrom: {\n\t\trect: DOMRect\n\t\telement?: HTMLElement\n\t}\n\tto: {\n\t\trect: DOMRect\n\t\telement: HTMLElement\n\t}\n\tstagger?: number\n\thost: HTMLElement\n}\nexport const HereMorty = 'hereMorty'\n\nclass Teleportation {\n\tactiveTeleportations = new Map<string, DOMRect>()\n\tflipRequests = new Subject<FLIP_REQUEST>()\n\n\tconstructor() {\n\t\tthis.flipRequests\n\t\t\t.pipe(\n\t\t\t\tbufferTime(1),\n\t\t\t\tmap(requests =>\n\t\t\t\t\trequests.map(({ from, to, host }, i) => ({\n\t\t\t\t\t\tfrom,\n\t\t\t\t\t\tto,\n\t\t\t\t\t\thost,\n\t\t\t\t\t\ti,\n\t\t\t\t\t})),\n\t\t\t\t),\n\t\t\t\tconcatMap(requests => zip(requests.map(request => of(this.flip(request))))),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tfind = (component: SchmancyTeleportation) => {\n\t\treturn zip([\n\t\t\tfromEvent<HereMortyEvent>(window, HereMorty).pipe(\n\t\t\t\tfilter(\n\t\t\t\t\te =>\n\t\t\t\t\t\t!!e.detail.component.uuid &&\n\t\t\t\t\t\t!!component.id &&\n\t\t\t\t\t\te.detail.component.id === component.id &&\n\t\t\t\t\t\te.detail.component.uuid !== component.uuid,\n\t\t\t\t),\n\t\t\t\tmap(e => e.detail.component),\n\t\t\t\ttake(1),\n\t\t\t),\n\t\t\tof(component).pipe(\n\t\t\t\ttap(() => {\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent<WhereAreYouRickyEvent['detail']>(WhereAreYouRicky, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\tid: component.id,\n\t\t\t\t\t\t\t\tcallerID: component.uuid,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t),\n\t\t]).pipe(\n\t\t\tmap(([component]) => component),\n\t\t\ttimeout(0),\n\t\t)\n\t}\n\n\tflip = (request: {\n\t\tfrom: {\n\t\t\trect: DOMRect\n\t\t}\n\t\tto: {\n\t\t\telement: HTMLElement\n\t\t\trect: DOMRect\n\t\t}\n\t\thost: HTMLElement\n\t\ti: number\n\t}) => {\n\t\tconst { from, to } = request\n\n\t\t// Prepare the element for animation\n\t\tconst originalZIndex = to.element.style.zIndex\n\t\tto.element.style.transformOrigin = 'top left'\n\t\tto.element.style.setProperty('visibility', 'visible')\n\t\tto.element.style.zIndex = '1000'\n\n\t\t// \"onBegin\" logic goes here (since Web Animations doesn't have onBegin).\n\t\t// If you had more logic, place it here:\n\t\t// e.g., console.log('Starting FLIP animation...');\n\n\t\t// Calculate starting and ending transforms\n\t\tconst startX = from.rect.left - to.rect.left\n\t\tconst startY = from.rect.top - to.rect.top\n\t\tconst startScaleX = from.rect.width / to.rect.width\n\t\tconst startScaleY = from.rect.height / to.rect.height\n\n\t\t// Create keyframes\n\t\tconst keyframes: Keyframe[] = [\n\t\t\t{\n\t\t\t\ttransform: `translate(${startX}px, ${startY}px) scale(${startScaleX}, ${startScaleY})`,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttransform: 'translate(0, 0) scale(1, 1)',\n\t\t\t},\n\t\t]\n\n\t\t// Use native Web Animations API\n\t\tconst animation = to.element.animate(keyframes, {\n\t\t\tduration: 250,\n\t\t\tdelay: 10, // if desired\n\t\t\t// Approximate 'inOutQuad' via a cubic-bezier easing.\n\t\t\t// You can adjust these values to taste, or use a standard one:\n\t\t\teasing: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',\n\t\t\t// or simply 'ease-in-out'\n\t\t})\n\n\t\t// \"onComplete\" logic goes here\n\t\tanimation.onfinish = () => {\n\t\t\tto.element.style.zIndex = originalZIndex\n\t\t\tto.element.style.transformOrigin = ''\n\t\t\t// If you have additional cleanup, place it here\n\t\t\t// e.g., console.log('FLIP animation completed!');\n\t\t}\n\t}\n}\n\nexport const teleport = new Teleportation()\nexport default teleport\n","import { Observable, interval } from 'rxjs'\nimport { distinctUntilChanged, map, take } from 'rxjs/operators'\n\n// Function to monitor element's bounding client rect\nexport function watchElementRect(element: Element): Observable<DOMRectReadOnly> {\n\treturn interval(50).pipe(\n\t\t// startWith(true),\n\t\tmap(() => element.getBoundingClientRect()),\n\t\tdistinctUntilChanged(\n\t\t\t(prev, curr) =>\n\t\t\t\tprev.width === curr.width &&\n\t\t\t\tprev.height === curr.height &&\n\t\t\t\tprev.top === curr.top &&\n\t\t\t\tprev.right === curr.right &&\n\t\t\t\tprev.bottom === curr.bottom &&\n\t\t\t\tprev.left === curr.left,\n\t\t),\n\t\ttake(1),\n\t)\n}\n","import { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { filter, fromEvent, merge, of, takeUntil, tap, throwIfEmpty } from 'rxjs'\nimport { FINDING_MORTIES, FINDING_MORTIES_EVENT, HERE_RICKY, HERE_RICKY_EVENT } from '..'\nimport {\n\tHereMorty,\n\tHereMortyEvent,\n\tWhereAreYouRicky,\n\tWhereAreYouRickyEvent,\n\tdefault as teleport,\n\tdefault as teleportationService,\n} from './teleport.service'\nimport { watchElementRect } from './watcher'\nimport { $LitElement } from '@mixins/index'\n@customElement('schmancy-teleport')\nexport class SchmancyTeleportation extends $LitElement(css``) {\n\t/**\n\t * @attr {string} uuid - The component tag to teleport\n\t * @readonly\n\t */\n\t@property({ type: Number, reflect: true }) uuid = Math.floor(Math.random() * Date.now())\n\n\t/**\n\t * @attr {string} id - The component tag to teleport\n\t * @required\n\t */\n\t@property({ type: String }) id!: string\n\n\t@property({ type: Number }) delay = 0\n\n\tdebugging = import.meta.env.DEV ? true : false\n\n\tget _slottedChildren() {\n\t\tconst slot = this.shadowRoot.querySelector('slot')\n\t\treturn slot.assignedElements({ flatten: true })\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (this.id === undefined) throw new Error('id is required')\n\t\tsuper.connectedCallback()\n\t\tmerge(\n\t\t\tfromEvent<FINDING_MORTIES_EVENT>(window, FINDING_MORTIES).pipe(\n\t\t\t\ttap({\n\t\t\t\t\tnext: () => {\n\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\tnew CustomEvent<HERE_RICKY_EVENT['detail']>(HERE_RICKY, {\n\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\tcomponent: this,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tfromEvent<WhereAreYouRickyEvent>(window, WhereAreYouRicky).pipe(\n\t\t\t\ttap({\n\t\t\t\t\tnext: e => {\n\t\t\t\t\t\tif (e.detail.id === this.id && this.uuid && e.detail.callerID !== this.uuid) {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent<HereMortyEvent['detail']>(HereMorty, {\n\t\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\t\tcomponent: this,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe()\n\t}\n\n\tasync firstUpdated() {\n\t\tof(teleportationService.activeTeleportations.get(this.id))\n\t\t\t.pipe(\n\t\t\t\tfilter(a => !!a),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tthrowIfEmpty(),\n\t\t\t)\n\t\t\t.subscribe({\n\t\t\t\tnext: domRect => {\n\t\t\t\t\tconsole.count('teleport')\n\t\t\t\t\tthis.style.setProperty('visibility', 'hidden')\n\t\t\t\t\t// teleport.flipRequests.next({ from: component, to: this, stagger: 0 })\n\t\t\t\t\twatchElementRect(this)\n\t\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t\t.subscribe({\n\t\t\t\t\t\t\tnext: e => {\n\t\t\t\t\t\t\t\t// console.log(e)\n\t\t\t\t\t\t\t\tteleportationService.activeTeleportations.set(this.id, e)\n\t\t\t\t\t\t\t\tteleport.flipRequests.next({\n\t\t\t\t\t\t\t\t\tfrom: {\n\t\t\t\t\t\t\t\t\t\trect: domRect,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tto: {\n\t\t\t\t\t\t\t\t\t\trect: e,\n\t\t\t\t\t\t\t\t\t\telement: this._slottedChildren[0] as HTMLElement,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\terror: () => {\n\t\t\t\t\tthis.style.setProperty('visibility', 'visible')\n\t\t\t\t\twatchElementRect(this)\n\t\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t\t.subscribe({\n\t\t\t\t\t\t\tnext: e => {\n\t\t\t\t\t\t\t\tconsole.log(e)\n\t\t\t\t\t\t\t\tteleportationService.activeTeleportations.set(this.id, e)\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tcomplete: () => {},\n\t\t\t})\n\t}\n\n\trender() {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-teleport': SchmancyTeleportation\n\t}\n}\n"],"names":["SchmancyCardMedia","TailwindElement","css","html","customElement","SchmancyCard","super","arguments","this","type","elevation","classes","includes","classMap","__decorateClass","property","prototype","Number","SchmancyCardContent","render","onSurface","SchmancyTheme","sys","color","surface","on","onSurfaceVariant","onVariant","src","fit","styleMap","height","String","reflect","schmancyContentDrawer","constructor","$drawer","Subject","pipe","subscribe","data","action","ref","dispatchEvent","CustomEvent","SchmancyEvents","ContentDrawerToggle","detail","state","bubbles","composed","component","title","next","e","SchmancyContentDrawerSheetMode","createContext","SchmancyContentDrawerSheetState","SchmancyContentDrawerID","Math","floor","random","Date","now","toString","SchmancyContentDrawerMaxHeight","SchmancyContentDrawerMinWidth","SchmancyContentDrawer","$LitElement","minWidth","main","sheet","schmancyContentDrawerID","maxHeight","merge","fromEvent","window","ContentDrawerResize","startWith","tap","map","clientWidth","innerWidth","width","debounceTime","innerHeight","getOffsetTop","style","setProperty","distinctUntilChanged","takeUntil","disconnecting","lgScreen","mode","open","event","stopPropagation","area","push","historyStrategy","uid","element","offsetTop","offsetParent","nothing","provide","context","queryAssignedElements","flatten","SchmancyContentDrawerMain","connectedCallback","drawerMinWidth","changedProperties","update","has","styles","when","consume","SchmancyContentDrawerSheet","updated","closeAll","dismiss","position","display","animate","opacity","transform","duration","easing","from","closeModalSheet","closeSheet","of","Observable","observer","onfinish","complete","sheetClasses","block","query","slot","undefined","schmancyNavDrawer","distinctUntilKeyChanged","NavDrawer_toggle","self","SchmancyDrawerNavbarMode","SchmancyDrawerNavbarState","SchmancyDrawerAppbar","toggler","sidebarToggler","sidebarMode","hidden","sidebarOpen","Boolean","SchmancyNavigationDrawerContent","parentElement","SchmancyNavigationDrawer","fullscreen","breakpoint","target","fullHeight","attribute","SchmancyNavigationDrawerSidebar","hideNavDrawer","closeOverlay","openOverlay","showNavDrawer","overlay","fill","nav","sidebarClasses","bgColor","container","scrim","WhereAreYouRicky","HereMorty","teleport","activeTeleportations","Map","flipRequests","find","zip","filter","uuid","id","take","callerID","timeout","flip","request","to","originalZIndex","zIndex","transformOrigin","keyframes","rect","left","top","delay","bufferTime","requests","host","i","concatMap","watchElementRect","interval","getBoundingClientRect","prev","curr","right","bottom","SchmancyTeleportation","debugging","shadowRoot","querySelector","assignedElements","Error","FINDING_MORTIES","HERE_RICKY","teleportationService","get","a","throwIfEmpty","domRect","set","_slottedChildren","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAqBA,KAArB,cAA+CC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA,CAKpD,EAAA;AAAA,EAAA;AACF,WAAAC;AAAAA,EAAA;AANYH;AAAAA;;;GAArB,CADCI,EAAc,sBAAA,CAAA,GACMJ;;;;;ACJrB,IAAqBK,IAArB,cAA0C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MAAMQ,OAAAA,CAAAA,CAAAA,GAbNmM,EAagBpM,WAAA,SAAA,CAbhBoM,GAAAA,IAANtM,EAAA,CADNV,EAAc,mBACFgN,CAAAA,GAAAA,CAAAA;"}
|
package/dist/teleport.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface WatchOptions {
|
|
2
2
|
waitUntilFirstUpdate?: boolean;
|
|
3
3
|
}
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function on(propName: string, options?: WatchOptions): (protoOrDescriptor: any, name: string) => any;
|
|
5
5
|
export {};
|
package/dist/sheet-DOtLsAs_.cjs
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const E=require("./tailwind.mixin-_mD_GeAp.cjs"),d=require("lit"),c=require("lit/decorators.js"),S=require("./litElement.mixin-DWxwPXWQ.cjs");var x=Object.defineProperty,k=Object.getOwnPropertyDescriptor,f=(t,e,i,n)=>{for(var r,o=n>1?void 0:n?k(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&x(e,i,o),o};let y=class extends E.TailwindElement(d.css`
|
|
2
|
-
:host {
|
|
3
|
-
inset: 0;
|
|
4
|
-
display: block;
|
|
5
|
-
padding-bottom: 16px;
|
|
6
|
-
}
|
|
7
|
-
`){render(){const t={absolute:this.title.length===0,relative:this.title.length>0};return d.html`
|
|
8
|
-
<schmancy-grid class="${this.classMap(t)}" align="center" justify="stretch" cols="auto 1fr auto">
|
|
9
|
-
<slot name="back">
|
|
10
|
-
<schmancy-button
|
|
11
|
-
@click=${()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}}
|
|
12
|
-
>
|
|
13
|
-
<span class="text-[24px]">← </span>
|
|
14
|
-
</schmancy-button>
|
|
15
|
-
</slot>
|
|
16
|
-
<schmancy-typography transform="capitalize" type="headline" token="lg"> ${this.title} </schmancy-typography>
|
|
17
|
-
<slot name="actions">
|
|
18
|
-
<schmancy-button
|
|
19
|
-
@click=${()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}}
|
|
20
|
-
>
|
|
21
|
-
<span class="text-[24px]">✕</span>
|
|
22
|
-
</schmancy-button>
|
|
23
|
-
</slot>
|
|
24
|
-
</schmancy-grid>
|
|
25
|
-
`}};function g(t,e){return(i,n)=>{const{willUpdate:r}=i;e=Object.assign({waitUntilFirstUpdate:!1},e),i.willUpdate=function(o){if(r.call(this,o),o.has(t)){const a=o.get(t),v=this[t];a!==v&&(e!=null&&e.waitUntilFirstUpdate&&!this.hasUpdated||this[n].call(this,a,v))}}}}f([c.property()],y.prototype,"title",2),y=f([c.customElement("schmancy-sheet-header")],y);var C=Object.defineProperty,F=Object.getOwnPropertyDescriptor;let w=class extends E.TailwindElement(){render(){return d.html`
|
|
26
|
-
<div tabindex="0">
|
|
27
|
-
<slot></slot>
|
|
28
|
-
</div>
|
|
29
|
-
`}};w=((t,e,i,n)=>{for(var r,o=n>1?void 0:n?F(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&C(e,i,o),o})([c.customElement("schmancy-sheet-content")],w);var b=(t=>(t.Side="side",t.Bottom="bottom",t.BottomCenter="bottom-center",t.TopRight="top-right",t.BottomRight="bottom-right",t))(b||{});const u="are-you-there-sheet",m="yes-here",p=new class{constructor(){this.bottomSheet=new s.Subject,this.$dismiss=new s.Subject,this.bottomSheet.pipe(s.switchMap(t=>s.forkJoin([s.fromEvent(window,m).pipe(s.takeUntil(s.timer(0)),s.map(e=>e.detail.sheet),s.defaultIfEmpty(void 0)),s.of(t).pipe(s.tap(()=>{window.dispatchEvent(new CustomEvent(u,{detail:{uid:t.uid??t.component.tagName}}))}))])),s.map(([t,e])=>(t||(t=document.createElement("schmancy-sheet"),document.body.appendChild(t)),t.setAttribute("uid",e.uid??e.component.tagName),t.setAttribute("position",e.position??"bottom"),t.setAttribute("allowOverlyDismiss",e.allowOverlyDismiss===!1?"false":"true"),e.title&&t.setAttribute("title",e.title),e.persist&&t.setAttribute("persist",e.persist??!1),e.header&&t.setAttribute("header",e.header),document.body.style.overflow="hidden",{target:e,sheet:t})),s.delay(20),s.filter(({target:t,sheet:e})=>{var i,n;return!t.persist||!((n=(i=e==null?void 0:e.shadowRoot)==null?void 0:i.querySelector("slot"))!=null&&n.assignedElements().find(r=>r.tagName===t.component.tagName))||(e==null||e.setAttribute("open","true"),!1)}),s.tap(({target:t,sheet:e})=>{e==null||e.appendChild(t.component)}),s.delay(1),s.tap(({sheet:t})=>{t==null||t.setAttribute("open","true")}),s.tap(({sheet:t})=>{s.fromEvent(t,"close").pipe(s.take(1)).pipe(s.delay(300)).subscribe(e=>{const i=e.target;i!=null&&i.persist||(i==null||i.remove()),document.body.style.overflow="auto"})})).subscribe(),this.$dismiss.pipe(s.mergeMap(t=>s.forkJoin([s.fromEvent(window,m).pipe(s.takeUntil(s.timer(100)),s.map(e=>e.detail.sheet),s.defaultIfEmpty(void 0)),s.of(t).pipe(s.tap(()=>{window.dispatchEvent(new CustomEvent(u,{detail:{uid:t}}))}))])),s.tap(([t])=>{t==null||t.closeSheet()})).subscribe()}dismiss(t){this.$dismiss.next(t)}open(t){this.bottomSheet.next(t)}};var O=Object.defineProperty,A=Object.getOwnPropertyDescriptor,l=(t,e,i,n)=>{for(var r,o=n>1?void 0:n?A(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&O(e,i,o),o};let h=class extends S.$LitElement(":host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-duration: .2s;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) ease-in-out}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.4;transition:opacity var(--transition-duration) ease-in-out}.content{z-index:1;transition:transform var(--transition-duration) ease-in-out}.content[data-position=side]{height:100%;margin-left:auto;min-width:320px;max-width:90vw;width:fit-content}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}"){constructor(){super(...arguments),this.open=!1,this.header="visible",this.position=b.Side,this.persist=!1,this.allowOverlayDismiss=!0,this.title="",this.focusAttribute="autofocus",this.lastFocusedElement=null,this.handleFocusIn=t=>{var e;(e=this.sheet)!=null&&e.contains(t.target)||this.focus()}}onOpenChange(t,e){var i;this.setIsSheetShown(e),e?(this.lastFocusedElement=document.activeElement,this.addFocusTrap(),this.focus()):(this.removeFocusTrap(),(i=this.lastFocusedElement)==null||i.focus(),this.lastFocusedElement=null)}connectedCallback(){super.connectedCallback(),this.setupEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.disconnecting.next(!0)}setupEventListeners(){const t=s.fromEvent(window,"popstate").pipe(s.tap(n=>{n.preventDefault(),this.closeSheet()})),e=s.fromEvent(window,"keyup").pipe(s.tap(n=>{n.key!=="Escape"||this.sheetContainsFocus()||p.dismiss(this.uid)})),i=s.fromEvent(window,u).pipe(s.tap(n=>{n.detail.uid===this.uid&&this.announcePresence()}));s.merge(t,e,i).pipe(s.takeUntil(this.disconnecting)).subscribe()}sheetContainsFocus(){var t;return((t=this.sheet)==null?void 0:t.contains(document.activeElement))??!1}announcePresence(){this.dispatchEvent(new CustomEvent(m,{detail:{sheet:this},bubbles:!0,composed:!0}))}addFocusTrap(){document.addEventListener("focusin",this.handleFocusIn)}removeFocusTrap(){document.removeEventListener("focusin",this.handleFocusIn)}setIsSheetShown(t){var e,i;(e=this.sheet)==null||e.setAttribute("aria-hidden",String(!t)),(i=this.sheet)==null||i.setAttribute("aria-modal",String(t))}closeSheet(){this.open=!1,this.dispatchEvent(new CustomEvent("close"))}getFocusElement(){const t=`[${this.focusAttribute}]`;return this.assignedElements.find(e=>e.matches(t)||e.querySelector(t))??null}focus(){var t;(t=this.getFocusElement())==null||t.focus()}render(){return d.html`
|
|
30
|
-
<div class="sheet" role="dialog" aria-labelledby="sheet-title" aria-hidden="true" aria-modal="false">
|
|
31
|
-
<div
|
|
32
|
-
class="overlay"
|
|
33
|
-
@click=${t=>{t.stopPropagation(),this.allowOverlayDismiss&&p.dismiss(this.uid)}}
|
|
34
|
-
></div>
|
|
35
|
-
<schmancy-sheet-content class="content" data-position=${this.position}>
|
|
36
|
-
<schmancy-sheet-header
|
|
37
|
-
@dismiss=${t=>{t.stopPropagation(),p.dismiss(this.uid)}}
|
|
38
|
-
id="sheet-title"
|
|
39
|
-
.hidden=${this.header==="hidden"}
|
|
40
|
-
title=${this.title}
|
|
41
|
-
></schmancy-sheet-header>
|
|
42
|
-
<slot></slot>
|
|
43
|
-
</schmancy-sheet-content>
|
|
44
|
-
</div>
|
|
45
|
-
`}};l([c.property({type:String,reflect:!0})],h.prototype,"uid",2),l([c.property({type:Boolean,reflect:!0})],h.prototype,"open",2),l([c.property({type:String,reflect:!0})],h.prototype,"header",2),l([c.property({type:String,reflect:!0})],h.prototype,"position",2),l([c.property({type:Boolean,reflect:!0})],h.prototype,"persist",2),l([c.property({type:Boolean,reflect:!0})],h.prototype,"allowOverlayDismiss",2),l([c.property({type:String,reflect:!0})],h.prototype,"title",2),l([c.query(".sheet")],h.prototype,"sheet",2),l([c.queryAssignedElements({flatten:!0})],h.prototype,"assignedElements",2),l([c.property()],h.prototype,"focusAttribute",2),l([g("open")],h.prototype,"onOpenChange",1),h=l([c.customElement("schmancy-sheet")],h),exports.SchmancySheetPosition=b,exports.SheetHereMorty=m,exports.SheetWhereAreYouRicky=u,exports.hook=g,exports.sheet=p;
|
|
46
|
-
//# sourceMappingURL=sheet-DOtLsAs_.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sheet-DOtLsAs_.cjs","sources":["../src/sheet/header.ts","../src/sheet/hook.ts","../src/sheet/sheet-content.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css`\n\t:host {\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\tpadding-bottom: 16px;\n\t}\n`) {\n\t@property() title: string\n\trender() {\n\t\tconst classes = {\n\t\t\tabsolute: this.title.length === 0,\n\t\t\trelative: this.title.length > 0,\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid class=\"${this.classMap(classes)}\" align=\"center\" justify=\"stretch\" cols=\"auto 1fr auto\">\n\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">← </span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t\t<schmancy-typography transform=\"capitalize\" type=\"headline\" token=\"lg\"> ${this.title} </schmancy-typography>\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">✕</span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n waitUntilFirstUpdate?: boolean\n}\n\nexport function hook(propName: string, options?: WatchOptions) {\n return (protoOrDescriptor: any, name: string): any => {\n const { willUpdate } = protoOrDescriptor\n\n options = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n protoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n willUpdate.call(this, changedProps)\n\n if (changedProps.has(propName)) {\n const oldValue = changedProps.get(propName)\n const newValue = this[propName]\n\n if (oldValue !== newValue) {\n if (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n this[name].call(this, oldValue, newValue)\n }\n }\n }\n }\n }\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-content')\nexport default class SchmancySheetContent extends TailwindElement() {\n\trender() {\n\t\treturn html`\n\t\t\t<div tabindex=\"0\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-content': SchmancySheetContent\n\t}\n}\n","import {\n\tdefaultIfEmpty,\n\tdelay,\n\tfilter,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n\t/**\n\t * @deprecated use bottom instead\n\t */\n\tBottomCenter = 'bottom-center',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tTopRight = 'top-right',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tBottomRight = 'bottom-right',\n}\n\ntype BottomSheeetTarget = {\n\tcomponent: HTMLElement\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tallowOverlyDismiss?: boolean\n\ttitle?: string\n\theader?: 'hidden' | 'visible'\n}\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet: SchmancySheet\n}>\nexport const SheetHereMorty = 'yes-here'\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\tconstructor() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(0)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid: target.uid ?? target.component.tagName },\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tmap(([sheet, target]) => {\n\t\t\t\t\tconsole.log(sheet, target)\n\t\t\t\t\tif (!sheet) {\n\t\t\t\t\t\t// if sheet is not found, create it\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tdocument.body.appendChild(sheet)\n\t\t\t\t\t}\n\t\t\t\t\tsheet.setAttribute('uid', target.uid ?? target.component.tagName)\n\t\t\t\t\tsheet.setAttribute('position', target.position ?? SchmancySheetPosition.Bottom)\n\t\t\t\t\tsheet.setAttribute('allowOverlyDismiss', target.allowOverlyDismiss === false ? 'false' : 'true')\n\t\t\t\t\ttarget.title && sheet.setAttribute('title', target.title)\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', target.persist ?? false)\n\t\t\t\t\ttarget.header && sheet.setAttribute('header', target.header)\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\tfilter(({ target, sheet }) => {\n\t\t\t\t\t// if the sheet has already the component, just show it\n\t\t\t\t\tif (\n\t\t\t\t\t\ttarget.persist &&\n\t\t\t\t\t\tsheet?.shadowRoot\n\t\t\t\t\t\t\t?.querySelector('slot')\n\t\t\t\t\t\t\t?.assignedElements()\n\t\t\t\t\t\t\t.find(e => e.tagName === target.component.tagName)\n\t\t\t\t\t) {\n\t\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t\t\treturn false\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true // if the sheet does not have the component, continue to the next step\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.appendChild(target.component)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t}),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(e => {\n\t\t\t\t\t\t\tconst target = e.target as SchmancySheet\n\t\t\t\t\t\t\tconsole.log(target)\n\n\t\t\t\t\t\t\tif (!target?.persist) target?.remove()\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)), // Some people say why 10? I say why not?\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([sheet]) => {\n\t\t\t\t\tsheet?.closeSheet()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n}\nexport const sheet = new BottomSheetService()\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { fromEvent, merge, takeUntil, tap } from 'rxjs'\nimport { hook } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) allowOverlayDismiss = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t@query('.sheet') private sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@hook('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tthis.setIsSheetShown(newValue)\n\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\tthis.addFocusTrap()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.removeFocusTrap()\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button\n\t\tconst popState$ = fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeSheet()\n\t\t\t}),\n\t\t)\n\n\t\t// Handle ESC key\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus()) {\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate sheetContainsFocus(): boolean {\n\t\treturn this.sheet?.contains(document.activeElement) ?? false\n\t}\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate addFocusTrap() {\n\t\tdocument.addEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate removeFocusTrap() {\n\t\tdocument.removeEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate handleFocusIn = (e: Event) => {\n\t\tif (!this.sheet?.contains(e.target as Node)) {\n\t\t\tthis.focus()\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheet?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheet?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"sheet\" role=\"dialog\" aria-labelledby=\"sheet-title\" aria-hidden=\"true\" aria-modal=\"false\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"overlay\"\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tif (this.allowOverlayDismiss) sheet.dismiss(this.uid)\n\t\t\t\t\t}}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-sheet-content class=\"content\" data-position=${this.position}>\n\t\t\t\t\t<schmancy-sheet-header\n\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t.hidden=${this.header === 'hidden'}\n\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t></schmancy-sheet-header>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</schmancy-sheet-content>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","classes","absolute","this","title","length","relative","html","classMap","dispatchEvent","CustomEvent","bubbles","composed","hook","propName","options","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","newValue","hasUpdated","__decorateClass","property","prototype","customElement","SchmancySheetContent","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","undefined","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","position","allowOverlyDismiss","persist","header","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","take","subscribe","remove","mergeMap","closeSheet","next","SchmancySheet","$LitElement","super","arguments","open","Side","allowOverlayDismiss","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","setIsSheetShown","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","event","key","sheetContainsFocus","dismiss","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","String","selector","el","matches","getFocusElement","stopPropagation","type","reflect","Boolean","query","queryAssignedElements","flatten"],"mappings":"icAKA,IAAqBA,EAArB,cAAiDC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAQhE,CAAA,CAAA,SACC,MAAMC,EAAU,CACfC,SAAUC,KAAKC,MAAMC,SAAW,EAChCC,SAAUH,KAAKC,MAAMC,OAAS,CAExB,EAAA,OAAAE,EAAAA;AAAAA,2BACkBJ,KAAKK,SAASP,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,eAG1B,IACHE,CAAAA,KAAAM,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8EAMuET,KAAKC,KAAAA;AAAAA;AAAAA;AAAAA,eAGpE,IACHD,CAAAA,KAAAM,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GACA,CAAA,EC1BS,SAAAC,EAAKC,EAAkBC,GAC9B,MAAA,CAACC,EAAwBC,IACxB,CAAA,KAAA,CAAAC,WAAEA,CAAAA,EAAeF,EAEvBD,EAAUI,OAAOC,OAAO,CAAEC,qBAAAA,IAA+BN,CAEvCC,EAAAA,EAAAE,WAAa,SAAUI,GAGnC,GAFOJ,EAAAK,KAAKpB,KAAMmB,CAAAA,EAElBA,EAAaE,IAAIV,CAAA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AA,EAFhBzC,EAEwBnD,UAAA,OAAA,CACDF,EAAAA,EAAA,CAA1CC,EAAAA,SAAS,CAAE4F,KAAMN,OAAQO,QAAS,EAAA,CAAA,CAAA,EAHfzC,EAGuBnD,UAAA,SAAA,CAAA,EACAF,EAAA,CAA1CC,EAAAA,SAAS,CAAE4F,KAAMN,OAAQO,UAJNzC,CAAAA,CAAAA,EAAAA,EAIuBnD,UAAA,WAAA,GACCF,EAAA,CAA3CC,EAAAA,SAAS,CAAE4F,KAAME,QAASD,QAAAA,MALPzC,EAKwBnD,UAAA,UAAA,CAAA,EACAF,EAAA,CAA3CC,EAAAA,SAAS,CAAE4F,KAAME,QAASD,QAAAA,EANPzC,CAAAA,CAAAA,EAAAA,EAMwBnD,UAAA,sBAAA,CACDF,EAAAA,EAAA,CAA1CC,EAAAA,SAAS,CAAE4F,KAAMN,OAAQO,QAAS,EAAA,CAAA,CAAA,EAPfzC,EAOuBnD,UAAA,QAAA,CAElBF,EAAAA,EAAA,CAAxBgG,EAAAA,MAAM,QAAA,CAAA,EATa3C,EASKnD,UAAA,QAAA,CACyBF,EAAAA,EAAA,CAAjDiG,wBAAsB,CAAEC,QAAAA,EAVL7C,CAAAA,CAAAA,EAAAA,EAU8BnD,UAAA,mBAAA,CAAA,EAEtCF,EAAA,CAAXC,EAASA,SAAAA,CAAAA,EAZUoD,EAYRnD,UAAA,iBAAA,CAIZF,EAAAA,EAAA,CADChB,EAAK,SAfcqE,EAgBpBnD,UAAA,eAAA,CAAA,EAhBoBmD,EAArBrD,EAAA,CADCG,EAAAA,cAAc,gBACMkD,CAAAA,EAAAA,CAAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sheet-Dt3siMhI.js","sources":["../src/sheet/header.ts","../src/sheet/hook.ts","../src/sheet/sheet-content.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css`\n\t:host {\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\tpadding-bottom: 16px;\n\t}\n`) {\n\t@property() title: string\n\trender() {\n\t\tconst classes = {\n\t\t\tabsolute: this.title.length === 0,\n\t\t\trelative: this.title.length > 0,\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid class=\"${this.classMap(classes)}\" align=\"center\" justify=\"stretch\" cols=\"auto 1fr auto\">\n\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">← </span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t\t<schmancy-typography transform=\"capitalize\" type=\"headline\" token=\"lg\"> ${this.title} </schmancy-typography>\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">✕</span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n waitUntilFirstUpdate?: boolean\n}\n\nexport function hook(propName: string, options?: WatchOptions) {\n return (protoOrDescriptor: any, name: string): any => {\n const { willUpdate } = protoOrDescriptor\n\n options = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n protoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n willUpdate.call(this, changedProps)\n\n if (changedProps.has(propName)) {\n const oldValue = changedProps.get(propName)\n const newValue = this[propName]\n\n if (oldValue !== newValue) {\n if (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n this[name].call(this, oldValue, newValue)\n }\n }\n }\n }\n }\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-content')\nexport default class SchmancySheetContent extends TailwindElement() {\n\trender() {\n\t\treturn html`\n\t\t\t<div tabindex=\"0\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-content': SchmancySheetContent\n\t}\n}\n","import {\n\tdefaultIfEmpty,\n\tdelay,\n\tfilter,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n\t/**\n\t * @deprecated use bottom instead\n\t */\n\tBottomCenter = 'bottom-center',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tTopRight = 'top-right',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tBottomRight = 'bottom-right',\n}\n\ntype BottomSheeetTarget = {\n\tcomponent: HTMLElement\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tallowOverlyDismiss?: boolean\n\ttitle?: string\n\theader?: 'hidden' | 'visible'\n}\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet: SchmancySheet\n}>\nexport const SheetHereMorty = 'yes-here'\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\tconstructor() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(0)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid: target.uid ?? target.component.tagName },\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tmap(([sheet, target]) => {\n\t\t\t\t\tconsole.log(sheet, target)\n\t\t\t\t\tif (!sheet) {\n\t\t\t\t\t\t// if sheet is not found, create it\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tdocument.body.appendChild(sheet)\n\t\t\t\t\t}\n\t\t\t\t\tsheet.setAttribute('uid', target.uid ?? target.component.tagName)\n\t\t\t\t\tsheet.setAttribute('position', target.position ?? SchmancySheetPosition.Bottom)\n\t\t\t\t\tsheet.setAttribute('allowOverlyDismiss', target.allowOverlyDismiss === false ? 'false' : 'true')\n\t\t\t\t\ttarget.title && sheet.setAttribute('title', target.title)\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', target.persist ?? false)\n\t\t\t\t\ttarget.header && sheet.setAttribute('header', target.header)\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\tfilter(({ target, sheet }) => {\n\t\t\t\t\t// if the sheet has already the component, just show it\n\t\t\t\t\tif (\n\t\t\t\t\t\ttarget.persist &&\n\t\t\t\t\t\tsheet?.shadowRoot\n\t\t\t\t\t\t\t?.querySelector('slot')\n\t\t\t\t\t\t\t?.assignedElements()\n\t\t\t\t\t\t\t.find(e => e.tagName === target.component.tagName)\n\t\t\t\t\t) {\n\t\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t\t\treturn false\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true // if the sheet does not have the component, continue to the next step\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.appendChild(target.component)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t}),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(e => {\n\t\t\t\t\t\t\tconst target = e.target as SchmancySheet\n\t\t\t\t\t\t\tconsole.log(target)\n\n\t\t\t\t\t\t\tif (!target?.persist) target?.remove()\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)), // Some people say why 10? I say why not?\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([sheet]) => {\n\t\t\t\t\tsheet?.closeSheet()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n}\nexport const sheet = new BottomSheetService()\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { fromEvent, merge, takeUntil, tap } from 'rxjs'\nimport { hook } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) allowOverlayDismiss = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t@query('.sheet') private sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@hook('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tthis.setIsSheetShown(newValue)\n\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\tthis.addFocusTrap()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.removeFocusTrap()\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button\n\t\tconst popState$ = fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeSheet()\n\t\t\t}),\n\t\t)\n\n\t\t// Handle ESC key\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus()) {\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate sheetContainsFocus(): boolean {\n\t\treturn this.sheet?.contains(document.activeElement) ?? false\n\t}\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate addFocusTrap() {\n\t\tdocument.addEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate removeFocusTrap() {\n\t\tdocument.removeEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate handleFocusIn = (e: Event) => {\n\t\tif (!this.sheet?.contains(e.target as Node)) {\n\t\t\tthis.focus()\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheet?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheet?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"sheet\" role=\"dialog\" aria-labelledby=\"sheet-title\" aria-hidden=\"true\" aria-modal=\"false\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"overlay\"\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tif (this.allowOverlayDismiss) sheet.dismiss(this.uid)\n\t\t\t\t\t}}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-sheet-content class=\"content\" data-position=${this.position}>\n\t\t\t\t\t<schmancy-sheet-header\n\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t.hidden=${this.header === 'hidden'}\n\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t></schmancy-sheet-header>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</schmancy-sheet-content>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","classes","absolute","this","title","length","relative","html","classMap","dispatchEvent","CustomEvent","bubbles","composed","hook","propName","options","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","newValue","hasUpdated","__decorateClass","property","prototype","customElement","SchmancySheetContent","render","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","position","allowOverlyDismiss","persist","header","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","take","subscribe","remove","mergeMap","closeSheet","next","SchmancySheet","$LitElement","constructor","super","arguments","open","Side","allowOverlayDismiss","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","setIsSheetShown","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","event","key","sheetContainsFocus","dismiss","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","String","selector","el","matches","getFocusElement","stopPropagation","type","reflect","Boolean","query","queryAssignedElements","flatten"],"mappings":";;;;;;;;;;;AAKA,IAAqBA,IAArB,cAAiDC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAQhE,EAAA;AAAA,EAAA,SACC;AAAA,UAAMC,IAAU,EACfC,UAAUC,KAAKC,MAAMC,WAAW,GAChCC,UAAUH,KAAKC,MAAMC,SAAS,EAAA;AAExB,WAAAE;AAAAA,2BACkBJ,KAAKK,SAASP,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,eAG1B,MACHE;AAAAA,WAAAM,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAEF,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8EAMuET,KAAKC,KAAAA;AAAAA;AAAAA;AAAAA,eAGpE,MACHD;AAAAA,WAAAM,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAEF,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EACA;AAAA;AC1BS,SAAAC,EAAKC,GAAkBC,GAC9B;AAAA,SAAA,CAACC,GAAwBC,MAAAA;AACxB,UAAAC,EAAAA,YAAEA,MAAeF;AAEvBD,QAAUI,OAAOC,OAAO,EAAEC,yBAA+BN,GAAAA,CAAAA,GAEvCC,EAAAE,aAAa,SAAUI,GAGnC;AAAA,UAFOJ,EAAAK,KAAKpB,MAAMmB,IAElBA,EAAaE,IAAIV,CAAW,GAAA;AACxB,cAAAW,IAAWH,EAAaI,IAAIZ,CAC5Ba,GAAAA,IAAWxB,KAAKW,CAElBW;AAAAA,QAAAA,MAAaE,MACVZ,eAASM,yBAAwBlB,KAAKyB,cACzCzB,KAAKc,CAAMM,EAAAA,KAAKpB,MAAMsB,GAAUE,CAAAA;AAAAA,MAEpC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