@mhmo91/schmancy 0.2.127 → 0.2.128

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.
Files changed (38) hide show
  1. package/dist/card.cjs +1 -1
  2. package/dist/card.js +1 -1
  3. package/dist/content-drawer.cjs +1 -1
  4. package/dist/content-drawer.js +1 -1
  5. package/dist/{context-object-CVqtbNDv.js → context-object-CD26Iary.js} +20 -17
  6. package/dist/context-object-CD26Iary.js.map +1 -0
  7. package/dist/context-object-D81PeS3j.cjs +2 -0
  8. package/dist/context-object-D81PeS3j.cjs.map +1 -0
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.js +99 -86
  11. package/dist/nav-drawer.cjs +1 -1
  12. package/dist/nav-drawer.js +1 -1
  13. package/dist/selector-hook-9dSW11-1.js +274 -0
  14. package/dist/selector-hook-9dSW11-1.js.map +1 -0
  15. package/dist/selector-hook-CH-z8W2d.cjs +2 -0
  16. package/dist/selector-hook-CH-z8W2d.cjs.map +1 -0
  17. package/dist/store.cjs +1 -1
  18. package/dist/store.js +30 -17
  19. package/dist/teleport.cjs +1 -1
  20. package/dist/{teleport.component-B8yyRFCq.js → teleport.component-CBNKUZwe.js} +2 -2
  21. package/dist/{teleport.component-B8yyRFCq.js.map → teleport.component-CBNKUZwe.js.map} +1 -1
  22. package/dist/{teleport.component-AE9wd-Xe.cjs → teleport.component-CplIV2h1.cjs} +2 -2
  23. package/dist/{teleport.component-AE9wd-Xe.cjs.map → teleport.component-CplIV2h1.cjs.map} +1 -1
  24. package/dist/teleport.js +1 -1
  25. package/package.json +1 -1
  26. package/types/src/store/context-create.d.ts +15 -2
  27. package/types/src/store/filter-directive.d.ts +38 -11
  28. package/types/src/store/selector-hook.d.ts +27 -0
  29. package/types/src/store/selectors.d.ts +30 -1
  30. package/types/src/store/storage-manager.d.ts +6 -14
  31. package/types/src/store/types.d.ts +100 -45
  32. package/dist/context-object-CVqtbNDv.js.map +0 -1
  33. package/dist/context-object-CgZ6F8E9.cjs +0 -2
  34. package/dist/context-object-CgZ6F8E9.cjs.map +0 -1
  35. package/dist/selector-hook-B5oIBdcJ.cjs +0 -2
  36. package/dist/selector-hook-B5oIBdcJ.cjs.map +0 -1
  37. package/dist/selector-hook-BdsJkaE2.js +0 -185
  38. package/dist/selector-hook-BdsJkaE2.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"teleport.component-AE9wd-Xe.cjs","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, 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(debounceTime(10)).subscribe(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()\nconst $drawer = schmancyNavDrawer\n\nexport { $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, 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\t/* Initially hide the component until it’s ready */\n\t\tvisibility: hidden;\n\t}\n\t/* Once the component is ready, remove the hidden style */\n\t:host([data-ready]) {\n\t\tvisibility: visible;\n\t}\n`) {\n\t// fullscreen property\n\t@property({ type: Boolean })\n\tfullscreen: boolean = false\n\n\t/**\n\t * The breakpoint for the sidebar based on Tailwind CSS breakpoints.\n\t * Accepts: \"sm\", \"md\", \"lg\", or \"xl\".\n\t *\n\t * The following default values are used:\n\t * - sm: 640px\n\t * - md: 768px (default)\n\t * - lg: 1024px\n\t * - xl: 1280px\n\t *\n\t * @attr breakpoint\n\t * @type {\"sm\" | \"md\" | \"lg\" | \"xl\"}\n\t */\n\t@property({ type: String, attribute: 'breakpoint' })\n\tbreakpoint: 'sm' | 'md' | 'lg' | 'xl' = 'md'\n\n\t/**\n\t * Mapping of Tailwind breakpoint tokens to their numeric pixel values.\n\t */\n\tprivate static BREAKPOINTS: Record<'sm' | 'md' | 'lg' | 'xl', number> = {\n\t\tsm: 640,\n\t\tmd: 768,\n\t\tlg: 1024,\n\t\txl: 1280,\n\t}\n\n\t/**\n\t * The mode of the sidebar.\n\t */\n\t@provide({ context: SchmancyDrawerNavbarMode })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t/**\n\t * The open/close state of the sidebar.\n\t */\n\t@provide({ context: SchmancyDrawerNavbarState })\n\t@property()\n\topen: TSchmancyDrawerNavbarState\n\n\t/**\n\t * A flag indicating that the initial state has been set.\n\t */\n\t@state()\n\tprivate _initialized = false\n\n\t/**\n\t * In firstUpdated, we can safely read attribute-set properties.\n\t * We also initialize our state and subscribe to events.\n\t */\n\tfirstUpdated() {\n\t\t// Set the initial state based on the current window width.\n\t\tthis.updateState(window.innerWidth)\n\t\t// Mark the component as ready\n\t\tthis._initialized = true\n\t\tthis.setAttribute('data-ready', '')\n\n\t\t// Subscribe to window resize events.\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(\n\t\t\t\t// Extract the inner width.\n\t\t\t\tmap(event => (event.target as Window).innerWidth),\n\t\t\t\t// Determine if we're above the breakpoint.\n\t\t\t\tmap(width => width >= SchmancyNavigationDrawer.BREAKPOINTS[this.breakpoint]),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\tdebounceTime(100),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(isLargeScreen => {\n\t\t\t\tif (isLargeScreen) {\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// Listen to the custom toggle event.\n\t\tfromEvent(window, SchmancyEvents.NavDrawer_toggle)\n\t\t\t.pipe(\n\t\t\t\ttap((event: CustomEvent) => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap((event: CustomEvent) => event.detail.state),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(10),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\tconsole.log('Received toggle event:', state)\n\t\t\t\t// When in push mode, ignore a request to close the sidebar.\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\t/**\n\t * Helper method to update state based on a given width.\n\t */\n\tprivate updateState(width: number) {\n\t\tconst isLargeScreen = width >= SchmancyNavigationDrawer.BREAKPOINTS[this.breakpoint]\n\t\tthis.mode = isLargeScreen ? 'push' : 'overlay'\n\t\tthis.open = isLargeScreen ? 'open' : 'close'\n\t}\n\n\tprotected render() {\n\t\t// Optionally, you can check _initialized here,\n\t\t// but the CSS will already hide the component until it's ready.\n\t\tif (!this._initialized) return nothing\n\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// Animation configuration constants.\nconst ANIMATION_EASING = 'cubic-bezier(0.5, 0.01, 0.25, 1)'\nconst OVERLAY_ANIM_DURATION_OPEN = 200\nconst OVERLAY_ANIM_DURATION_CLOSE = 150\nconst NAV_ANIM_DURATION = 200\n\n@customElement('schmancy-nav-drawer-navbar')\nexport class SchmancyNavigationDrawerSidebar extends $LitElement() {\n\t// Consume context values. Renamed from \"state\" to \"drawerState\" to avoid confusion.\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\tdrawerState!: TSchmancyDrawerNavbarState\n\n\t@query('#overlay') overlay!: HTMLElement\n\t@query('nav') nav!: HTMLElement\n\n\t@property({ type: String }) width = '320px'\n\t@state() private _initialized = false\n\n\t/**\n\t * firstUpdated()\n\t * Set initial styles based on the current mode and consumed state.\n\t */\n\tfirstUpdated() {\n\t\tif (this.mode === 'overlay') {\n\t\t\tif (this.drawerState === 'close') {\n\t\t\t\tthis.nav.style.transform = 'translateX(-100%)'\n\t\t\t\tthis.overlay.style.display = 'none'\n\t\t\t} else if (this.drawerState === 'open') {\n\t\t\t\tthis.nav.style.transform = 'translateX(0)'\n\t\t\t\tthis.overlay.style.display = 'block'\n\t\t\t\tthis.overlay.style.opacity = '0.4'\n\t\t\t}\n\t\t} else if (this.mode === 'push') {\n\t\t\t// In push mode, the nav is always visible and the overlay hidden.\n\t\t\tthis.nav.style.transform = 'translateX(0)'\n\t\t\tthis.overlay.style.display = 'none'\n\t\t}\n\t\tthis._initialized = true\n\t}\n\n\t/**\n\t * updated()\n\t * Trigger animations when either the consumed mode or state changes.\n\t */\n\tupdated(changedProperties: Map<string, any>) {\n\t\tconsole.log(this._initialized, changedProperties)\n\t\tif (!this._initialized) return\n\n\t\tif (changedProperties.has('drawerState') || changedProperties.has('mode')) {\n\t\t\tconsole.log('State updated:', this.drawerState, this.mode)\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.drawerState === 'open') {\n\t\t\t\t\t// Animate only if the nav isn’t already open.\n\t\t\t\t\tif (this.nav.style.transform !== 'translateX(0)') {\n\t\t\t\t\t\tthis.openOverlay()\n\t\t\t\t\t\tthis.showNavDrawer()\n\t\t\t\t\t}\n\t\t\t\t} else if (this.drawerState === 'close') {\n\t\t\t\t\tconsole.log(this.nav.style.transform)\n\t\t\t\t\tif (this.nav.style.transform !== 'translateX(-100%)') {\n\t\t\t\t\t\tthis.hideNavDrawer()\n\t\t\t\t\t\tthis.closeOverlay()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tif (this.nav.style.transform !== 'translateX(0)') {\n\t\t\t\t\tthis.showNavDrawer()\n\t\t\t\t}\n\t\t\t\tif (this.overlay.style.display !== 'none') {\n\t\t\t\t\tthis.closeOverlay()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Animate the overlay to fade in.\n\t */\n\topenOverlay() {\n\t\tthis.overlay.style.display = 'block'\n\t\tthis.overlay.animate([{ opacity: 0 }, { opacity: 0.4 }], {\n\t\t\tduration: OVERLAY_ANIM_DURATION_OPEN,\n\t\t\teasing: ANIMATION_EASING,\n\t\t\tfill: 'forwards',\n\t\t})\n\t}\n\n\t/**\n\t * Animate the overlay to fade out, then hide it.\n\t */\n\tcloseOverlay() {\n\t\tconst animation = this.overlay.animate([{ opacity: 0.4 }, { opacity: 0 }], {\n\t\t\tduration: OVERLAY_ANIM_DURATION_CLOSE,\n\t\t\teasing: ANIMATION_EASING,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.overlay.style.display = 'none'\n\t\t}\n\t}\n\tshowNavDrawer() {\n\t\t// Use computed style if needed, but here we directly update inline style after animation.\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(-100%)' }, { transform: 'translateX(0)' }], {\n\t\t\tduration: NAV_ANIM_DURATION,\n\t\t\teasing: ANIMATION_EASING,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.nav.style.transform = 'translateX(0)'\n\t\t}\n\t}\n\n\thideNavDrawer() {\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(0)' }, { transform: 'translateX(-100%)' }], {\n\t\t\tduration: NAV_ANIM_DURATION,\n\t\t\teasing: ANIMATION_EASING,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.nav.style.transform = 'translateX(-100%)'\n\t\t}\n\t}\n\n\t/**\n\t * Handle overlay click events by dispatching a custom event\n\t * to close the navigation drawer.\n\t */\n\tprivate handleOverlayClick() {\n\t\twindow.dispatchEvent(\n\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\tdetail: { state: 'close' },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\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\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=${this.handleOverlayClick}\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","$drawer","Subject","pipe","subscribe","data","action","ref","dispatchEvent","CustomEvent","SchmancyEvents","ContentDrawerToggle","detail","state","bubbles","composed","component","title","next","t","SchmancyContentDrawerSheetMode","createContext","SchmancyContentDrawerSheetState","SchmancyContentDrawerID","n","Math","floor","random","Date","now","toString","SchmancyContentDrawerMaxHeight","SchmancyContentDrawerMinWidth","SchmancyContentDrawer","$LitElement","constructor","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","schmancyNavDrawer","NavDrawer_toggle","self","SchmancyDrawerNavbarMode","SchmancyDrawerNavbarState","SchmancyDrawerAppbar","toggler","sidebarToggler","sidebarMode","hidden","sidebarOpen","Boolean","SchmancyNavigationDrawerContent","e","parentElement","SchmancyNavigationDrawer","fullscreen","breakpoint","_initialized","firstUpdated","updateState","setAttribute","target","BREAKPOINTS","isLargeScreen","fullHeight","sm","md","lg","xl","attribute","ANIMATION_EASING","SchmancyNavigationDrawerSidebar","drawerState","nav","overlay","openOverlay","showNavDrawer","hideNavDrawer","closeOverlay","fill","sidebarClasses","bgColor","container","scrim","handleOverlayClick","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":"6zDASA,IAAqBA,EAArB,cAA+CC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAKpD,CAAA,CAAA,SACF,OAAAC,EAAAA,2DAAA,GANYH,wGAArB,CADCI,EAAAA,cAAc,sBACMJ,CAAAA,EAAAA,CAAAA,kMCJrB,IAAqBK,EAArB,cAA0CJ,EAAAA,gBAA1C,CAAA,CAAA,cAAAK,MAAAC,GAAAA,SAAAA,EACwDC,KAAAC,KAAA,WACQD,KAAAE,UAAA,CAAA,CACrD,SACT,MAAMC,EAAU,CACf,aAAc,GACd,YAAaH,KAAKE,YAAc,EAChC,YAAaF,KAAKE,YAAc,EAChC,YAAaF,KAAKE,YAAc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WgBjN,UAAA,KAAA,CAEAF,EAAAA,EAAA,CAA3BC,WAAS,CAAEN,KAAMQ,UAbNgN,8BAagBjN,UAAA,QAAA,CAAA,EAbhBiN,QAAAA,sBAANnN,EAAA,CADNV,EAAAA,cAAc,mBACF6N,CAAAA,EAAAA"}
1
+ {"version":3,"file":"teleport.component-CplIV2h1.cjs","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, 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(debounceTime(10)).subscribe(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()\nconst $drawer = schmancyNavDrawer\n\nexport { $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, 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\t/* Initially hide the component until it’s ready */\n\t\tvisibility: hidden;\n\t}\n\t/* Once the component is ready, remove the hidden style */\n\t:host([data-ready]) {\n\t\tvisibility: visible;\n\t}\n`) {\n\t// fullscreen property\n\t@property({ type: Boolean })\n\tfullscreen: boolean = false\n\n\t/**\n\t * The breakpoint for the sidebar based on Tailwind CSS breakpoints.\n\t * Accepts: \"sm\", \"md\", \"lg\", or \"xl\".\n\t *\n\t * The following default values are used:\n\t * - sm: 640px\n\t * - md: 768px (default)\n\t * - lg: 1024px\n\t * - xl: 1280px\n\t *\n\t * @attr breakpoint\n\t * @type {\"sm\" | \"md\" | \"lg\" | \"xl\"}\n\t */\n\t@property({ type: String, attribute: 'breakpoint' })\n\tbreakpoint: 'sm' | 'md' | 'lg' | 'xl' = 'md'\n\n\t/**\n\t * Mapping of Tailwind breakpoint tokens to their numeric pixel values.\n\t */\n\tprivate static BREAKPOINTS: Record<'sm' | 'md' | 'lg' | 'xl', number> = {\n\t\tsm: 640,\n\t\tmd: 768,\n\t\tlg: 1024,\n\t\txl: 1280,\n\t}\n\n\t/**\n\t * The mode of the sidebar.\n\t */\n\t@provide({ context: SchmancyDrawerNavbarMode })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t/**\n\t * The open/close state of the sidebar.\n\t */\n\t@provide({ context: SchmancyDrawerNavbarState })\n\t@property()\n\topen: TSchmancyDrawerNavbarState\n\n\t/**\n\t * A flag indicating that the initial state has been set.\n\t */\n\t@state()\n\tprivate _initialized = false\n\n\t/**\n\t * In firstUpdated, we can safely read attribute-set properties.\n\t * We also initialize our state and subscribe to events.\n\t */\n\tfirstUpdated() {\n\t\t// Set the initial state based on the current window width.\n\t\tthis.updateState(window.innerWidth)\n\t\t// Mark the component as ready\n\t\tthis._initialized = true\n\t\tthis.setAttribute('data-ready', '')\n\n\t\t// Subscribe to window resize events.\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(\n\t\t\t\t// Extract the inner width.\n\t\t\t\tmap(event => (event.target as Window).innerWidth),\n\t\t\t\t// Determine if we're above the breakpoint.\n\t\t\t\tmap(width => width >= SchmancyNavigationDrawer.BREAKPOINTS[this.breakpoint]),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\tdebounceTime(100),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(isLargeScreen => {\n\t\t\t\tif (isLargeScreen) {\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// Listen to the custom toggle event.\n\t\tfromEvent(window, SchmancyEvents.NavDrawer_toggle)\n\t\t\t.pipe(\n\t\t\t\ttap((event: CustomEvent) => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap((event: CustomEvent) => event.detail.state),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(10),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\tconsole.log('Received toggle event:', state)\n\t\t\t\t// When in push mode, ignore a request to close the sidebar.\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\t/**\n\t * Helper method to update state based on a given width.\n\t */\n\tprivate updateState(width: number) {\n\t\tconst isLargeScreen = width >= SchmancyNavigationDrawer.BREAKPOINTS[this.breakpoint]\n\t\tthis.mode = isLargeScreen ? 'push' : 'overlay'\n\t\tthis.open = isLargeScreen ? 'open' : 'close'\n\t}\n\n\tprotected render() {\n\t\t// Optionally, you can check _initialized here,\n\t\t// but the CSS will already hide the component until it's ready.\n\t\tif (!this._initialized) return nothing\n\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// Animation configuration constants.\nconst ANIMATION_EASING = 'cubic-bezier(0.5, 0.01, 0.25, 1)'\nconst OVERLAY_ANIM_DURATION_OPEN = 200\nconst OVERLAY_ANIM_DURATION_CLOSE = 150\nconst NAV_ANIM_DURATION = 200\n\n@customElement('schmancy-nav-drawer-navbar')\nexport class SchmancyNavigationDrawerSidebar extends $LitElement() {\n\t// Consume context values. Renamed from \"state\" to \"drawerState\" to avoid confusion.\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\tdrawerState!: TSchmancyDrawerNavbarState\n\n\t@query('#overlay') overlay!: HTMLElement\n\t@query('nav') nav!: HTMLElement\n\n\t@property({ type: String }) width = '320px'\n\t@state() private _initialized = false\n\n\t/**\n\t * firstUpdated()\n\t * Set initial styles based on the current mode and consumed state.\n\t */\n\tfirstUpdated() {\n\t\tif (this.mode === 'overlay') {\n\t\t\tif (this.drawerState === 'close') {\n\t\t\t\tthis.nav.style.transform = 'translateX(-100%)'\n\t\t\t\tthis.overlay.style.display = 'none'\n\t\t\t} else if (this.drawerState === 'open') {\n\t\t\t\tthis.nav.style.transform = 'translateX(0)'\n\t\t\t\tthis.overlay.style.display = 'block'\n\t\t\t\tthis.overlay.style.opacity = '0.4'\n\t\t\t}\n\t\t} else if (this.mode === 'push') {\n\t\t\t// In push mode, the nav is always visible and the overlay hidden.\n\t\t\tthis.nav.style.transform = 'translateX(0)'\n\t\t\tthis.overlay.style.display = 'none'\n\t\t}\n\t\tthis._initialized = true\n\t}\n\n\t/**\n\t * updated()\n\t * Trigger animations when either the consumed mode or state changes.\n\t */\n\tupdated(changedProperties: Map<string, any>) {\n\t\tconsole.log(this._initialized, changedProperties)\n\t\tif (!this._initialized) return\n\n\t\tif (changedProperties.has('drawerState') || changedProperties.has('mode')) {\n\t\t\tconsole.log('State updated:', this.drawerState, this.mode)\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.drawerState === 'open') {\n\t\t\t\t\t// Animate only if the nav isn’t already open.\n\t\t\t\t\tif (this.nav.style.transform !== 'translateX(0)') {\n\t\t\t\t\t\tthis.openOverlay()\n\t\t\t\t\t\tthis.showNavDrawer()\n\t\t\t\t\t}\n\t\t\t\t} else if (this.drawerState === 'close') {\n\t\t\t\t\tconsole.log(this.nav.style.transform)\n\t\t\t\t\tif (this.nav.style.transform !== 'translateX(-100%)') {\n\t\t\t\t\t\tthis.hideNavDrawer()\n\t\t\t\t\t\tthis.closeOverlay()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tif (this.nav.style.transform !== 'translateX(0)') {\n\t\t\t\t\tthis.showNavDrawer()\n\t\t\t\t}\n\t\t\t\tif (this.overlay.style.display !== 'none') {\n\t\t\t\t\tthis.closeOverlay()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Animate the overlay to fade in.\n\t */\n\topenOverlay() {\n\t\tthis.overlay.style.display = 'block'\n\t\tthis.overlay.animate([{ opacity: 0 }, { opacity: 0.4 }], {\n\t\t\tduration: OVERLAY_ANIM_DURATION_OPEN,\n\t\t\teasing: ANIMATION_EASING,\n\t\t\tfill: 'forwards',\n\t\t})\n\t}\n\n\t/**\n\t * Animate the overlay to fade out, then hide it.\n\t */\n\tcloseOverlay() {\n\t\tconst animation = this.overlay.animate([{ opacity: 0.4 }, { opacity: 0 }], {\n\t\t\tduration: OVERLAY_ANIM_DURATION_CLOSE,\n\t\t\teasing: ANIMATION_EASING,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.overlay.style.display = 'none'\n\t\t}\n\t}\n\tshowNavDrawer() {\n\t\t// Use computed style if needed, but here we directly update inline style after animation.\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(-100%)' }, { transform: 'translateX(0)' }], {\n\t\t\tduration: NAV_ANIM_DURATION,\n\t\t\teasing: ANIMATION_EASING,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.nav.style.transform = 'translateX(0)'\n\t\t}\n\t}\n\n\thideNavDrawer() {\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(0)' }, { transform: 'translateX(-100%)' }], {\n\t\t\tduration: NAV_ANIM_DURATION,\n\t\t\teasing: ANIMATION_EASING,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.nav.style.transform = 'translateX(-100%)'\n\t\t}\n\t}\n\n\t/**\n\t * Handle overlay click events by dispatching a custom event\n\t * to close the navigation drawer.\n\t */\n\tprivate handleOverlayClick() {\n\t\twindow.dispatchEvent(\n\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\tdetail: { state: 'close' },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\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\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=${this.handleOverlayClick}\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","$drawer","Subject","pipe","subscribe","data","action","ref","dispatchEvent","CustomEvent","SchmancyEvents","ContentDrawerToggle","detail","state","bubbles","composed","component","title","next","t","SchmancyContentDrawerSheetMode","createContext","SchmancyContentDrawerSheetState","SchmancyContentDrawerID","n","Math","floor","random","Date","now","toString","SchmancyContentDrawerMaxHeight","SchmancyContentDrawerMinWidth","SchmancyContentDrawer","$LitElement","constructor","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","schmancyNavDrawer","NavDrawer_toggle","self","SchmancyDrawerNavbarMode","SchmancyDrawerNavbarState","SchmancyDrawerAppbar","toggler","sidebarToggler","sidebarMode","hidden","sidebarOpen","Boolean","SchmancyNavigationDrawerContent","e","parentElement","SchmancyNavigationDrawer","fullscreen","breakpoint","_initialized","firstUpdated","updateState","setAttribute","target","BREAKPOINTS","isLargeScreen","fullHeight","sm","md","lg","xl","attribute","ANIMATION_EASING","SchmancyNavigationDrawerSidebar","drawerState","nav","overlay","openOverlay","showNavDrawer","hideNavDrawer","closeOverlay","fill","sidebarClasses","bgColor","container","scrim","handleOverlayClick","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":"6zDASA,IAAqBA,EAArB,cAA+CC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAKpD,CAAA,CAAA,SACF,OAAAC,EAAAA,2DAAA,GANYH,wGAArB,CADCI,EAAAA,cAAc,sBACMJ,CAAAA,EAAAA,CAAAA,kMCJrB,IAAqBK,EAArB,cAA0CJ,EAAAA,gBAA1C,CAAA,CAAA,cAAAK,MAAAC,GAAAA,SAAAA,EACwDC,KAAAC,KAAA,WACQD,KAAAE,UAAA,CAAA,CACrD,SACT,MAAMC,EAAU,CACf,aAAc,GACd,YAAaH,KAAKE,YAAc,EAChC,YAAaF,KAAKE,YAAc,EAChC,YAAaF,KAAKE,YAAc,EAChC,YAAaF,KAAKE,YAAc,EAChC,WAAYF,KAAKE,YAA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S,CAAEN,KAAMQ,UAbNgN,8BAagBjN,UAAA,QAAA,CAAA,EAbhBiN,QAAAA,sBAANnN,EAAA,CADNV,EAAAA,cAAc,mBACF6N,CAAAA,EAAAA"}
package/dist/teleport.js CHANGED
@@ -1,4 +1,4 @@
1
- import { H as r, o as t, W as a, t as s } from "./teleport.component-B8yyRFCq.js";
1
+ import { H as r, o as t, W as a, t as s } from "./teleport.component-CBNKUZwe.js";
2
2
  export {
3
3
  r as HereMorty,
4
4
  t as SchmancyTeleportation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhmo91/schmancy",
3
- "version": "0.2.127",
3
+ "version": "0.2.128",
4
4
  "description": "UI library build with web components",
5
5
  "main": "./dist/index.js",
6
6
  "packageManager": "yarn@4.6.0",
@@ -1,8 +1,21 @@
1
- import { ICollectionStore, IStore, StorageType } from './types';
2
- import { SchmancyStoreObject } from './context-object';
3
1
  import SchmancyCollectionStore from './context-collection';
2
+ import { SchmancyStoreObject } from './context-object';
3
+ import { ICollectionStore, IStore, StorageType } from './types';
4
4
  /**
5
5
  * Creates a context for managing state with better type safety
6
+ * Overload for object stores
6
7
  */
7
8
  export declare function createContext<T extends Record<string, any>>(initialData: T, storage: StorageType, key: string): IStore<T> & SchmancyStoreObject<T>;
9
+ /**
10
+ * Creates a context for managing state with better type safety
11
+ * Overload for collection stores
12
+ */
8
13
  export declare function createContext<V>(initialData: Map<string, V>, storage: StorageType, key: string): ICollectionStore<V> & SchmancyCollectionStore<V>;
14
+ /**
15
+ * Creates a context with type inference, simplifying common patterns
16
+ */
17
+ export declare function createObjectContext<T extends Record<string, any>>(initialData: T, key: string, storage?: StorageType): IStore<T> & SchmancyStoreObject<T>;
18
+ /**
19
+ * Creates a collection context with type inference
20
+ */
21
+ export declare function createCollectionContext<V>(initialData: Map<string, V> | V[], key: string, storage?: StorageType): ICollectionStore<V> & SchmancyCollectionStore<V>;
@@ -1,17 +1,39 @@
1
- /** Supported comparison operators. */
2
- type ComparisonOperator = '==' | '!=' | '>' | '<' | '>=' | '<=' | 'includes' | 'notIncludes' | 'startsWith' | 'endsWith' | 'in' | 'notIn' | 'any';
1
+ /** Supported comparison operators with TypeScript literal types */
2
+ export type ComparisonOperator = '==' | '!=' | '>' | '<' | '>=' | '<=' | 'includes' | 'notIncludes' | 'startsWith' | 'endsWith' | 'in' | 'notIn' | 'any';
3
3
  /**
4
- * Query condition which can be either a tuple:
5
- * [field, operator, expected]
6
- * or an object:
7
- * { key, operator, value }
4
+ * Type-safe condition tuple
8
5
  */
9
- export type QueryCondition = [field: string, op: ComparisonOperator, expected: unknown, strict?: boolean] | {
6
+ export type ConditionTuple = [field: string, op: ComparisonOperator, expected: unknown, strict?: boolean];
7
+ /**
8
+ * Type-safe condition object
9
+ */
10
+ export interface ConditionObject {
10
11
  key: string;
11
12
  operator: ComparisonOperator;
12
13
  value: unknown;
13
14
  strict?: boolean;
14
- };
15
+ }
16
+ /**
17
+ * Unified query condition type
18
+ */
19
+ export type QueryCondition = ConditionTuple | ConditionObject;
20
+ /**
21
+ * Filter result with item and score
22
+ */
23
+ export interface ScoredItem<T> {
24
+ item: T;
25
+ score: number;
26
+ }
27
+ /**
28
+ * Get a nested value from an object using a dot-separated path.
29
+ * Checks explicitly for null/undefined so falsy values like 0 or false are preserved.
30
+ */
31
+ export declare const getFieldValue: <T = any>(item: Record<string, any>, path: string) => T;
32
+ /**
33
+ * Compare two values based on a comparison operator.
34
+ * For non-fuzzy operators, this returns a boolean.
35
+ */
36
+ export declare function compareValues(op: ComparisonOperator, actual: unknown, expected: unknown): boolean;
15
37
  /**
16
38
  * Filter a Map of items given an array of query conditions.
17
39
  * For each query condition:
@@ -25,8 +47,13 @@ export type QueryCondition = [field: string, op: ComparisonOperator, expected: u
25
47
  *
26
48
  * @param items - A Map containing items to filter.
27
49
  * @param queries - An array of query conditions to apply.
50
+ * @param fuzzyThreshold - Minimum score required for fuzzy matches (default: 0.3)
28
51
  * @returns An array of items that match all query conditions, sorted by relevance.
29
52
  */
30
- export declare const filterMapItems: <T extends Record<string, any>>(items: Map<string, T>, queries?: QueryCondition[]) => T[];
31
- export declare const filterMap: <T extends Record<string, any>>(items: Map<string, T>, queries?: QueryCondition[]) => T[];
32
- export {};
53
+ export declare function filterMapItems<T extends Record<string, any>>(items: Map<string, T>, queries?: QueryCondition[], fuzzyThreshold?: number): T[];
54
+ /**
55
+ * Filter an array of items using query conditions
56
+ */
57
+ export declare function filterArrayItems<T extends Record<string, any>>(items: T[], queries?: QueryCondition[], fuzzyThreshold?: number): T[];
58
+ export declare const filterMap: typeof filterMapItems;
59
+ export declare const filterArray: typeof filterArrayItems;
@@ -1,4 +1,7 @@
1
1
  import { ICollectionStore, IStore } from './types';
2
+ /**
3
+ * Property descriptor interface
4
+ */
2
5
  type PropertyDescriptor<T> = {
3
6
  get?: () => T;
4
7
  set?: (value: T) => void;
@@ -7,9 +10,33 @@ type PropertyDescriptor<T> = {
7
10
  enumerable?: boolean;
8
11
  writable?: boolean;
9
12
  };
13
+ /**
14
+ * Options for selecting from a store
15
+ */
10
16
  interface SelectOptions {
17
+ /** If true, will wait for selector to emit a non-null value before calling connectedCallback */
11
18
  required?: boolean;
19
+ /** If true, will only update the component and not set the property value */
12
20
  updateOnly?: boolean;
21
+ /** If true, will use structuredClone to deeply clone values (prevents mutations) */
22
+ deepClone?: boolean;
23
+ /** Custom equality function to determine when to update */
24
+ equals?: (a: any, b: any) => boolean;
13
25
  }
26
+ /**
27
+ * Selector decorator that connects a component property to a store selector
28
+ *
29
+ * @param store The store to select from
30
+ * @param selectorFn Optional function to transform the store state
31
+ * @param options Additional options for the selector
32
+ */
14
33
  export declare function select<T, R>(store: IStore<T> | ICollectionStore<T>, selectorFn?: (state: any) => R, options?: SelectOptions): (proto: Record<string, any>, propName: string, _descriptor?: PropertyDescriptor<R>) => void;
34
+ /**
35
+ * Creates a selector decorator that selects a specific item from a collection store
36
+ *
37
+ * @param store The collection store
38
+ * @param keyGetter Function that returns the key to select
39
+ * @param options Additional options
40
+ */
41
+ export declare function selectItem<T>(store: ICollectionStore<T>, keyGetter: (component: any) => string, options?: SelectOptions): (proto: Record<string, any>, propName: string, _descriptor?: PropertyDescriptor<T | undefined>) => void;
15
42
  export {};
@@ -16,6 +16,13 @@ export declare function createSelector<T, R>(store: IStore<T>, selectorFn: (stat
16
16
  * @returns An observable of the selected state that only emits when the derived value changes
17
17
  */
18
18
  export declare function createCollectionSelector<T, R>(store: ICollectionStore<T>, selectorFn: (state: Map<string, T>) => R): Observable<R>;
19
+ /**
20
+ * Creates a selector that returns all items from a collection as an array
21
+ *
22
+ * @param store The collection store
23
+ * @returns An observable of all items as an array
24
+ */
25
+ export declare function createItemsSelector<T>(store: ICollectionStore<T>): Observable<T[]>;
19
26
  /**
20
27
  * Creates a selector that filters items from a collection
21
28
  *
@@ -47,4 +54,26 @@ export declare function createCountSelector<T>(store: ICollectionStore<T>, filte
47
54
  * @param combinerFn Function that combines all selector results
48
55
  * @returns An observable of the combined result
49
56
  */
50
- export declare function createCompoundSelector<R, T extends any[]>(selectors: Observable<any>[], combinerFn: (...values: T) => R): Observable<R>;
57
+ export declare function createCompoundSelector<T extends unknown[], R>(selectors: {
58
+ [K in keyof T]: Observable<T[K]>;
59
+ }, combinerFn: (...values: T) => R): Observable<R>;
60
+ /**
61
+ * Creates a selector that returns all keys from a collection
62
+ */
63
+ export declare function createKeysSelector<T>(store: ICollectionStore<T>): Observable<string[]>;
64
+ /**
65
+ * Creates a selector that returns entries (key-value pairs) from a collection
66
+ */
67
+ export declare function createEntriesSelector<T>(store: ICollectionStore<T>): Observable<[string, T][]>;
68
+ /**
69
+ * Creates a selector that maps collection values through a transform function
70
+ */
71
+ export declare function createMapSelector<T, R>(store: ICollectionStore<T>, mapFn: (item: T, key: string) => R): Observable<R[]>;
72
+ /**
73
+ * Creates a selector that sorts collection items
74
+ */
75
+ export declare function createSortSelector<T>(store: ICollectionStore<T>, compareFn: (a: T, b: T) => number): Observable<T[]>;
76
+ /**
77
+ * Creates a selector that finds the first item matching a predicate
78
+ */
79
+ export declare function createFindSelector<T>(store: ICollectionStore<T>, predicate: (item: T, key: string) => boolean): Observable<T | undefined>;
@@ -1,16 +1,8 @@
1
- import { StorageType } from './types';
2
- /**
3
- * Storage manager interface with generic typing
4
- */
5
- export interface StorageManager<T> {
6
- load(): Promise<T | null>;
7
- save(state: T): Promise<void>;
8
- clear(): Promise<void>;
9
- }
1
+ import { IStorageManager, StorageType } from './types';
10
2
  /**
11
3
  * Memory storage manager implementation
12
4
  */
13
- export declare class MemoryStorageManager<T> implements StorageManager<T> {
5
+ export declare class MemoryStorageManager<T> implements IStorageManager<T> {
14
6
  private data;
15
7
  load(): Promise<T | null>;
16
8
  save(state: T): Promise<void>;
@@ -19,7 +11,7 @@ export declare class MemoryStorageManager<T> implements StorageManager<T> {
19
11
  /**
20
12
  * Local storage manager implementation
21
13
  */
22
- export declare class LocalStorageManager<T> implements StorageManager<T> {
14
+ export declare class LocalStorageManager<T> implements IStorageManager<T> {
23
15
  private key;
24
16
  constructor(key: string);
25
17
  load(): Promise<T | null>;
@@ -29,7 +21,7 @@ export declare class LocalStorageManager<T> implements StorageManager<T> {
29
21
  /**
30
22
  * Session storage manager implementation
31
23
  */
32
- export declare class SessionStorageManager<T> implements StorageManager<T> {
24
+ export declare class SessionStorageManager<T> implements IStorageManager<T> {
33
25
  private key;
34
26
  constructor(key: string);
35
27
  load(): Promise<T | null>;
@@ -39,7 +31,7 @@ export declare class SessionStorageManager<T> implements StorageManager<T> {
39
31
  /**
40
32
  * IndexedDB storage manager implementation with better error typing
41
33
  */
42
- export declare class IndexedDBStorageManager<T> implements StorageManager<T> {
34
+ export declare class IndexedDBStorageManager<T> implements IStorageManager<T> {
43
35
  private key;
44
36
  private static DB_NAME;
45
37
  private static STORE_NAME;
@@ -53,4 +45,4 @@ export declare class IndexedDBStorageManager<T> implements StorageManager<T> {
53
45
  /**
54
46
  * Factory function to create the appropriate storage manager
55
47
  */
56
- export declare function createStorageManager<T>(type: StorageType, key: string): StorageManager<T>;
48
+ export declare function createStorageManager<T>(type: StorageType, key: string): IStorageManager<T>;