@mhmo91/schmancy 0.2.127 → 0.2.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{context-object-CVqtbNDv.js → context-object-BDXZ5EKJ.js} +19 -16
- package/dist/context-object-BDXZ5EKJ.js.map +1 -0
- package/dist/context-object-BIywslrO.cjs +2 -0
- package/dist/context-object-BIywslrO.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +99 -86
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/selector-hook-C6VCezv7.js +273 -0
- package/dist/selector-hook-C6VCezv7.js.map +1 -0
- package/dist/selector-hook-DDaYMsHs.cjs +2 -0
- package/dist/selector-hook-DDaYMsHs.cjs.map +1 -0
- package/dist/store.cjs +1 -1
- package/dist/store.js +30 -17
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-AE9wd-Xe.cjs → teleport.component-BB820TxP.cjs} +2 -2
- package/dist/{teleport.component-AE9wd-Xe.cjs.map → teleport.component-BB820TxP.cjs.map} +1 -1
- package/dist/{teleport.component-B8yyRFCq.js → teleport.component-aomutiMW.js} +2 -2
- package/dist/{teleport.component-B8yyRFCq.js.map → teleport.component-aomutiMW.js.map} +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +11 -3
- package/types/src/store/context-collection.d.ts +0 -3
- package/types/src/store/context-create.d.ts +15 -2
- package/types/src/store/filter-directive.d.ts +38 -11
- package/types/src/store/selector-hook.d.ts +27 -0
- package/types/src/store/selectors.d.ts +30 -1
- package/types/src/store/storage-manager.d.ts +6 -14
- package/types/src/store/types.d.ts +100 -45
- package/dist/context-object-CVqtbNDv.js.map +0 -1
- package/dist/context-object-CgZ6F8E9.cjs +0 -2
- package/dist/context-object-CgZ6F8E9.cjs.map +0 -1
- package/dist/selector-hook-B5oIBdcJ.cjs +0 -2
- package/dist/selector-hook-B5oIBdcJ.cjs.map +0 -1
- package/dist/selector-hook-BdsJkaE2.js +0 -185
- package/dist/selector-hook-BdsJkaE2.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teleport.component-B8yyRFCq.js","sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts","../src/content-drawer/$sheet.ts","../src/content-drawer/context.ts","../src/content-drawer/drawer.ts","../src/content-drawer/main.ts","../src/content-drawer/sheet.ts","../src/nav-drawer/$navbar.ts","../src/nav-drawer/context.ts","../src/nav-drawer/appbar.ts","../src/nav-drawer/content.ts","../src/nav-drawer/drawer.ts","../src/nav-drawer/navbar.ts","../src/teleport/teleport.service.ts","../src/teleport/watcher.ts","../src/teleport/teleport.component.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html` <section class=\"pb-4 px-4\"><slot> </slot></section> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardMedia\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement() {\n\t@property() type: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'rounded-md': true,\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t'shadow-5': this.elevation === 5,\n\t\t\t'hover:shadow-xs': ['outlined', 'filled'].includes(this.type),\n\t\t\t'bg-surface-low shadow-xs hover:shadow-sm': this.type === 'elevated',\n\t\t\t'bg-surface-highest': this.type === 'filled',\n\t\t\t'bg-surface-default border border-solid border-1 border-outlineVariant': this.type === 'outlined',\n\t\t}\n\t\treturn html`<div class=\"${this.classMap(classes)}\">\n\t\t\t<slot> </slot>\n\t\t</div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { color } from '..'\n\n/**\n * @element schmancy-card-content\n * @slot headline\n * @slot subhead\n * @slot default - The content of the card\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement() {\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'px-[16px] py-[24px]': true,\n\t\t}\n\t\tconst onSurface = SchmancyTheme.sys.color.surface.on\n\t\tconst onSurfaceVariant = SchmancyTheme.sys.color.surface.onVariant\n\t\treturn html`<schmancy-grid gap=\"md\" class=\"${this.classMap(classes)}\">\n\t\t\t<schmancy-grid gap=\"xs\">\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurface,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\ttoken=\"lg\"\n\t\t\t\t\t><slot name=\"headline\"> </slot\n\t\t\t\t></schmancy-typography>\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\t><slot name=\"subhead\"></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t</schmancy-grid>\n\t\t\t<schmancy-typography\n\t\t\t\ttype=\"body\"\n\t\t\t\t${color({\n\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-typography>\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\n\tprotected render(): unknown {\n\t\tconst styles = {\n\t\t\theight: '200px',\n\t\t}\n\t\tconst classes = {\n\t\t\t'object-center': true,\n\t\t\t'object-contain': this.fit === 'contain',\n\t\t\t'object-cover w-full': this.fit === 'cover',\n\t\t\t'object-fill': this.fit === 'fill',\n\t\t\t'object-none': this.fit === 'none',\n\t\t\t'object-scale-down': this.fit === 'scale-down',\n\t\t}\n\t\treturn html`<schmancy-grid align=\"stretch\" justify=\"stretch\" gap=\"md\">\n\t\t\t<img src=\"${this.src}\" style=${this.styleMap(styles)} class=\"${this.classMap(classes)}\" />\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { Subject } from 'rxjs'\n\ntype DrawerAction = 'dismiss' | 'render'\ntype TRef = Element | Window\ntype TRenderRequest = HTMLElement\nexport type TRenderCustomEvent = CustomEvent<{\n\tcomponent: TRenderRequest\n\ttitle?: string\n}>\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tref: TRef\n\t\taction: DrawerAction\n\t\tcomponent?: TRenderRequest\n\t\ttitle?: string\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe().subscribe(data => {\n\t\t\tif (data.action === 'dismiss') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t} else if (data.action === 'render') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('schmancy-content-drawer-render', {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tcomponent: data.component,\n\t\t\t\t\t\t\ttitle: data.title,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\n\tdimiss(ref: TRef) {\n\t\tthis.$drawer.next({\n\t\t\taction: 'dismiss',\n\t\t\tref: ref,\n\t\t})\n\t}\n\n\trender(ref: TRef, component: TRenderRequest, title?: string) {\n\t\tref.dispatchEvent(new CustomEvent('custom-event'))\n\t\tthis.$drawer.next({\n\t\t\taction: 'render',\n\t\t\tref: ref,\n\t\t\tcomponent: component,\n\t\t\ttitle,\n\t\t})\n\t}\n}\n\nexport const schmancyContentDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyContentDrawerSheetMode = 'push' | 'overlay'\nexport const SchmancyContentDrawerSheetMode = createContext<TSchmancyContentDrawerSheetMode>('push')\n\nexport type TSchmancyContentDrawerSheetState = 'open' | 'close'\nexport const SchmancyContentDrawerSheetState = createContext<TSchmancyContentDrawerSheetState>('close')\n\nexport const SchmancyContentDrawerID = createContext<string>(Math.floor(Math.random() * Date.now()).toString())\nexport const SchmancyContentDrawerMaxHeight = createContext<string>('100%')\nexport const SchmancyContentDrawerMinWidth = createContext<{\n\tmain: number\n\tsheet: number\n}>({})\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, merge, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, TRenderCustomEvent, area, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n/**\n * @element schmancy-content-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-content-drawer')\nexport class SchmancyContentDrawer extends $LitElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t/**\n\t * The minimum width of the sheet\n\t * @attr\tminWidth\n\t * @type {number}\n\t * @memberof SchmancyContentDrawer\n\t */\n\n\t@provide({ context: SchmancyContentDrawerMinWidth })\n\tminWidth: typeof SchmancyContentDrawerMinWidth.__context__ = {\n\t\tmain: 360,\n\t\tsheet: 576,\n\t}\n\n\t/**\n\t * The state of the sheet\n\t * @attr open\n\t * @type {TSchmancyContentDrawerSheetState}\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetState })\n\t@property()\n\topen: TSchmancyContentDrawerSheetState\n\n\t/**\n\t * The mode of the sheet\n\t * @type {TSchmancyContentDrawerSheetMode}\n\t * @memberof SchmancyContentDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetMode })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@provide({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID = Math.floor(Math.random() * Date.now()).toString()\n\n\t@provide({ context: SchmancyContentDrawerMaxHeight })\n\tmaxHeight = '100%'\n\n\t@queryAssignedElements({ flatten: true })\n\tassignedElements!: HTMLElement[]\n\tfirstUpdated(): void {\n\t\tmerge(fromEvent<CustomEvent>(window, 'resize'), fromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerResize))\n\t\t\t.pipe(\n\t\t\t\tstartWith(true),\n\t\t\t\ttap(() => console.log(this.minWidth)),\n\t\t\t\tmap(() => (this.clientWidth ? this.clientWidth : window.innerWidth)),\n\t\t\t\tmap(width => width >= this.minWidth.main + this.minWidth.sheet),\n\t\t\t\tdebounceTime(100),\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis.maxHeight = `${window.innerHeight - this.getOffsetTop(this) - 32}px`\n\t\t\t\t\tthis.style.setProperty('max-height', this.maxHeight)\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerToggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\tthis.open = state\n\t\t\t})\n\n\t\tfromEvent<TRenderCustomEvent>(window, 'schmancy-content-drawer-render')\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(({ component, title }) => {\n\t\t\t\tif (this.mode === 'push') {\n\t\t\t\t\t// TODO: Fix the router to render if constructor has different arguments\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: 'empty',\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t} else if ((this.mode = 'overlay')) {\n\t\t\t\t\tsheet.open({ component: component, uid: this.schmancyContentDrawerID, title })\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tgetOffsetTop(element) {\n\t\tlet offsetTop = 0\n\t\twhile (element) {\n\t\t\toffsetTop += element.offsetTop\n\t\t\telement = element.offsetParent\n\t\t}\n\t\treturn offsetTop\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.mode === 'overlay' ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer': SchmancyContentDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { PropertyValueMap, css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { SchmancyEvents } from '..'\nimport {\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetMode,\n} from './context'\nimport { when } from 'lit/directives/when.js'\n\n@customElement('schmancy-content-drawer-main')\nexport class SchmancyContentDrawerMain extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) this.drawerMinWidth.main = this.minWidth\n\t\telse this.minWidth = this.drawerMinWidth.main\n\t}\n\n\tprotected update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n\t\tsuper.update(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\tthis.drawerMinWidth.main = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t}\n\t}\n\n\trender() {\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\t\treturn html`\n\t\t\t<section class=\"relative inset-0 h-full\">\n\t\t\t\t<schmancy-grid\n\t\t\t\t\tclass=\"h-full relative overflow-scroll\"\n\t\t\t\t\tcols=\"${this.mode === 'push' ? 'auto 1fr' : '1fr'}\"\n\t\t\t\t\trows=\"1fr\"\n\t\t\t\t\tflow=\"col\"\n\t\t\t\t\talign=\"stretch\"\n\t\t\t\t\tjustify=\"stretch\"\n\t\t\t\t>\n\t\t\t\t\t<section style=${this.styleMap(styles)}>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</section>\n\t\t\t\t</schmancy-grid>\n\t\t\t\t${when(\n\t\t\t\t\tthis.mode === 'push',\n\t\t\t\t\t() => html` <schmancy-divider class=\"absolute right-0 top-0\" orientation=\"vertical\"></schmancy-divider>`,\n\t\t\t\t)}\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-main': SchmancyContentDrawerMain\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { from, merge, Observable, of, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n// --- 1) Removed the custom animate import\n// import { animate } from '@packages/anime-beta-master'\n\n@customElement('schmancy-content-drawer-sheet')\nexport class SchmancyContentDrawerSheet extends $LitElement(css`\n\t:host {\n\t\toverflow: scroll;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerSheetState, subscribe: true })\n\t@state()\n\tstate: TSchmancyContentDrawerSheetState\n\n\t@consume({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID\n\n\t@query('#sheet') sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true, slot: undefined }) defaultSlot!: HTMLElement[]\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) {\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t} else {\n\t\t\tthis.minWidth = this.drawerMinWidth.sheet\n\t\t}\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\t// If the 'minWidth' property changed\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t} else if (changedProperties.has('state') || changedProperties.has('mode')) {\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\t// Overlay open logic if needed\n\t\t\t\t\t// this.open()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tsheet.dismiss(this.schmancyContentDrawerID)\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.open()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Open the sheet by sliding it into view.\n\t */\n\topen() {\n\t\t// \"onBegin\" logic from the old `animate(...)`\n\t\tif (this.mode === 'overlay') {\n\t\t\tthis.sheet.style.position = 'fixed'\n\t\t} else {\n\t\t\tthis.sheet.style.position = 'relative'\n\t\t}\n\t\tthis.sheet.style.display = 'block'\n\n\t\t// --- 2) Use native Web Animations API ---\n\t\tthis.sheet.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 0, transform: 'translateX(100%)' },\n\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 500,\n\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t},\n\t\t)\n\t\t// No return is needed if you don't rely on the result\n\t}\n\n\t/**\n\t * Close everything (modal sheet + the sheet itself).\n\t */\n\tcloseAll() {\n\t\t// Merge them into a single subscription,\n\t\t// so that everything closes in parallel.\n\t\tmerge(from(this.closeModalSheet()), from(this.closeSheet())).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\t/**\n\t * Dismiss the \"modal sheet.\"\n\t * This just returns an Observable that completes immediately.\n\t */\n\tcloseModalSheet() {\n\t\treturn of(true).pipe(tap(() => sheet.dismiss(this.schmancyContentDrawerID)))\n\t}\n\n\t/**\n\t * Slide the sheet out of view + hide it.\n\t * Return an Observable so we can merge it with other close operations.\n\t */\n\tcloseSheet() {\n\t\t// --- 2) Use native Web Animations API and wrap in an Observable ---\n\t\treturn new Observable<void>(observer => {\n\t\t\tconst animation = this.sheet.animate(\n\t\t\t\t[\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(100%)' },\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tduration: 500,\n\t\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tanimation.onfinish = () => {\n\t\t\t\t// \"onComplete\" logic\n\t\t\t\tthis.sheet.style.display = 'none'\n\t\t\t\tobserver.next()\n\t\t\t\tobserver.complete()\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected render() {\n\t\tconst sheetClasses = {\n\t\t\tblock: this.mode === 'push',\n\t\t\t'absolute z-50': this.mode === 'overlay',\n\t\t\t'opacity-1': this.mode === 'overlay' && this.state === 'open',\n\t\t}\n\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<section id=\"sheet\" class=\"${this.classMap(sheetClasses)}\" style=${this.styleMap(styles)}>\n\t\t\t\t<schmancy-area name=\"${this.schmancyContentDrawerID}\">\n\t\t\t\t\t<slot name=\"placeholder\"></slot>\n\t\t\t\t</schmancy-area>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-sheet': SchmancyContentDrawerSheet\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { debounceTime, 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","constructor","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","e","SchmancyContentDrawerSheetMode","createContext","SchmancyContentDrawerSheetState","SchmancyContentDrawerID","Math","floor","random","Date","now","toString","SchmancyContentDrawerMaxHeight","SchmancyContentDrawerMinWidth","SchmancyContentDrawer","$LitElement","minWidth","main","sheet","schmancyContentDrawerID","maxHeight","merge","fromEvent","window","ContentDrawerResize","startWith","tap","map","clientWidth","innerWidth","width","debounceTime","innerHeight","getOffsetTop","style","setProperty","distinctUntilChanged","takeUntil","disconnecting","lgScreen","mode","open","event","stopPropagation","area","push","historyStrategy","uid","element","offsetTop","offsetParent","nothing","provide","context","queryAssignedElements","flatten","SchmancyContentDrawerMain","connectedCallback","drawerMinWidth","changedProperties","update","has","styles","when","consume","SchmancyContentDrawerSheet","updated","closeAll","dismiss","position","display","animate","opacity","transform","duration","easing","from","closeModalSheet","closeSheet","of","Observable","observer","onfinish","complete","sheetClasses","block","query","slot","schmancyNavDrawer","NavDrawer_toggle","self","SchmancyDrawerNavbarMode","SchmancyDrawerNavbarState","SchmancyDrawerAppbar","toggler","sidebarToggler","sidebarMode","hidden","sidebarOpen","Boolean","SchmancyNavigationDrawerContent","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","handleOverlayClick","sidebarClasses","bgColor","container","scrim","WhereAreYouRicky","HereMorty","teleport","activeTeleportations","Map","flipRequests","find","zip","filter","uuid","id","take","callerID","timeout","flip","request","to","originalZIndex","zIndex","transformOrigin","keyframes","rect","left","top","delay","bufferTime","requests","host","i","concatMap","watchElementRect","interval","getBoundingClientRect","prev","curr","right","bottom","SchmancyTeleportation","debugging","shadowRoot","querySelector","assignedElements","Error","FINDING_MORTIES","HERE_RICKY","teleportationService","get","a","throwIfEmpty","domRect","set","_slottedChildren","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAqBA,KAArB,cAA+CC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA,CAKpD,EAAA;AAAA,EAAA;AACF,WAAAC;AAAAA,EAAA;AAAA;AANYH;;;GAArB,CADCI,EAAc,sBAAA,CAAA,GACMJ;;;;;ACJrB,IAAqBK,IAArB,cAA0CJ,EAAAA,EAAAA;AAAAA,EAA1C,cAAAK;AAAAC,aAAAC,SACwDC,GAAAA,KAAAC,OAAA,YACQD,KAAAE,YAAA;AAAA,EAAA;AAAA,EACrD;AACT,UAAMC,IAAU,EACf,cAAc,IACd,aAAaH,KAAKE,cAAc,GAChC,aAAaF,KAAKE,cAAc,GAChC,aAAaF,KAAKE,cAAc,GAChC,aAAaF,KA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,CAAAA,EAAAA,UAAU,EACVc,MAAWC,CAAAA,MAAAA;AAEViL,QAAAA,EAAqB1C,qBAAqB+C,IAAInO,KAAK2L,IAAI9I,CACvDsI,GAAAA,EAASG,aAAa1I,KAAK,EAC1B4E,MAAM,EACL8E,MAAM4B,EAEPjC,GAAAA,IAAI,EACHK,MAAMzJ,GACN+C,SAAS5F,KAAKoO,iBAAiB,CAAA,EAAA,GAEhCxB,MAAM5M,KACN,CAAA;AAAA,MAAA,EAAA,CAAA;AAAA,IAEF,GAEHqO,OAAO;AACDrO,WAAA8E,MAAMC,YAAY,cAAc,YACpBgI,GAAA/M,IAAAA,EACf6B,KAAKoD,EAAUjF,KAAKkF,aACpBpD,CAAAA,EAAAA,UAAU,EACVc,MAAWC,OAEViL;AAAAA,QAAAA,EAAqB1C,qBAAqB+C,IAAInO,KAAK2L,IAAI9I,CAAAA;AAAAA,MAAC,EAEzD,CAAA;AAAA,IAAA,GAEHkF,UAAU,MACV;AAAA,IAAA,EAAA,CAAA;AAAA,EAAA;AAAA,EAGH,SAAApH;AACQ,WAAAjB;AAAAA,EAAA;AAzGmCY;AAAAA,EAAA,CAA1CC,EAAS,EAAEN,MAAMQ,QAAQgB,YALd6L,CAAAA,CAAAA,GAAAA,EAK+B9M,WAAA,QAAA,IAMfF,EAAA,CAA3BC,EAAS,EAAEN,MAAMuB,OAXN8L,CAAAA,CAAAA,GAAAA,EAWgB9M,WAAA,MAAA,IAEAF,EAAA,CAA3BC,EAAS,EAAEN,MAAMQ,OAbN6M,CAAAA,CAAAA,GAAAA,EAagB9M,WAAA,SAAA,IAbhB8M,IAANhN,EAAA,CADNX,EAAc,uBACF2N;"}
|
|
1
|
+
{"version":3,"file":"teleport.component-aomutiMW.js","sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts","../src/content-drawer/$sheet.ts","../src/content-drawer/context.ts","../src/content-drawer/drawer.ts","../src/content-drawer/main.ts","../src/content-drawer/sheet.ts","../src/nav-drawer/$navbar.ts","../src/nav-drawer/context.ts","../src/nav-drawer/appbar.ts","../src/nav-drawer/content.ts","../src/nav-drawer/drawer.ts","../src/nav-drawer/navbar.ts","../src/teleport/teleport.service.ts","../src/teleport/watcher.ts","../src/teleport/teleport.component.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html` <section class=\"pb-4 px-4\"><slot> </slot></section> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardMedia\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement() {\n\t@property() type: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'rounded-md': true,\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t'shadow-5': this.elevation === 5,\n\t\t\t'hover:shadow-xs': ['outlined', 'filled'].includes(this.type),\n\t\t\t'bg-surface-low shadow-xs hover:shadow-sm': this.type === 'elevated',\n\t\t\t'bg-surface-highest': this.type === 'filled',\n\t\t\t'bg-surface-default border border-solid border-1 border-outlineVariant': this.type === 'outlined',\n\t\t}\n\t\treturn html`<div class=\"${this.classMap(classes)}\">\n\t\t\t<slot> </slot>\n\t\t</div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { color } from '..'\n\n/**\n * @element schmancy-card-content\n * @slot headline\n * @slot subhead\n * @slot default - The content of the card\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement() {\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'px-[16px] py-[24px]': true,\n\t\t}\n\t\tconst onSurface = SchmancyTheme.sys.color.surface.on\n\t\tconst onSurfaceVariant = SchmancyTheme.sys.color.surface.onVariant\n\t\treturn html`<schmancy-grid gap=\"md\" class=\"${this.classMap(classes)}\">\n\t\t\t<schmancy-grid gap=\"xs\">\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurface,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\ttoken=\"lg\"\n\t\t\t\t\t><slot name=\"headline\"> </slot\n\t\t\t\t></schmancy-typography>\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\t><slot name=\"subhead\"></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t</schmancy-grid>\n\t\t\t<schmancy-typography\n\t\t\t\ttype=\"body\"\n\t\t\t\t${color({\n\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-typography>\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\n\tprotected render(): unknown {\n\t\tconst styles = {\n\t\t\theight: '200px',\n\t\t}\n\t\tconst classes = {\n\t\t\t'object-center': true,\n\t\t\t'object-contain': this.fit === 'contain',\n\t\t\t'object-cover w-full': this.fit === 'cover',\n\t\t\t'object-fill': this.fit === 'fill',\n\t\t\t'object-none': this.fit === 'none',\n\t\t\t'object-scale-down': this.fit === 'scale-down',\n\t\t}\n\t\treturn html`<schmancy-grid align=\"stretch\" justify=\"stretch\" gap=\"md\">\n\t\t\t<img src=\"${this.src}\" style=${this.styleMap(styles)} class=\"${this.classMap(classes)}\" />\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { Subject } from 'rxjs'\n\ntype DrawerAction = 'dismiss' | 'render'\ntype TRef = Element | Window\ntype TRenderRequest = HTMLElement\nexport type TRenderCustomEvent = CustomEvent<{\n\tcomponent: TRenderRequest\n\ttitle?: string\n}>\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tref: TRef\n\t\taction: DrawerAction\n\t\tcomponent?: TRenderRequest\n\t\ttitle?: string\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe().subscribe(data => {\n\t\t\tif (data.action === 'dismiss') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t} else if (data.action === 'render') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('schmancy-content-drawer-render', {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tcomponent: data.component,\n\t\t\t\t\t\t\ttitle: data.title,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t})\n\t}\n\n\tdimiss(ref: TRef) {\n\t\tthis.$drawer.next({\n\t\t\taction: 'dismiss',\n\t\t\tref: ref,\n\t\t})\n\t}\n\n\trender(ref: TRef, component: TRenderRequest, title?: string) {\n\t\tref.dispatchEvent(new CustomEvent('custom-event'))\n\t\tthis.$drawer.next({\n\t\t\taction: 'render',\n\t\t\tref: ref,\n\t\t\tcomponent: component,\n\t\t\ttitle,\n\t\t})\n\t}\n}\n\nexport const schmancyContentDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyContentDrawerSheetMode = 'push' | 'overlay'\nexport const SchmancyContentDrawerSheetMode = createContext<TSchmancyContentDrawerSheetMode>('push')\n\nexport type TSchmancyContentDrawerSheetState = 'open' | 'close'\nexport const SchmancyContentDrawerSheetState = createContext<TSchmancyContentDrawerSheetState>('close')\n\nexport const SchmancyContentDrawerID = createContext<string>(Math.floor(Math.random() * Date.now()).toString())\nexport const SchmancyContentDrawerMaxHeight = createContext<string>('100%')\nexport const SchmancyContentDrawerMinWidth = createContext<{\n\tmain: number\n\tsheet: number\n}>({})\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, merge, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, TRenderCustomEvent, area, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n/**\n * @element schmancy-content-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-content-drawer')\nexport class SchmancyContentDrawer extends $LitElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t/**\n\t * The minimum width of the sheet\n\t * @attr\tminWidth\n\t * @type {number}\n\t * @memberof SchmancyContentDrawer\n\t */\n\n\t@provide({ context: SchmancyContentDrawerMinWidth })\n\tminWidth: typeof SchmancyContentDrawerMinWidth.__context__ = {\n\t\tmain: 360,\n\t\tsheet: 576,\n\t}\n\n\t/**\n\t * The state of the sheet\n\t * @attr open\n\t * @type {TSchmancyContentDrawerSheetState}\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetState })\n\t@property()\n\topen: TSchmancyContentDrawerSheetState\n\n\t/**\n\t * The mode of the sheet\n\t * @type {TSchmancyContentDrawerSheetMode}\n\t * @memberof SchmancyContentDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetMode })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@provide({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID = Math.floor(Math.random() * Date.now()).toString()\n\n\t@provide({ context: SchmancyContentDrawerMaxHeight })\n\tmaxHeight = '100%'\n\n\t@queryAssignedElements({ flatten: true })\n\tassignedElements!: HTMLElement[]\n\tfirstUpdated(): void {\n\t\tmerge(fromEvent<CustomEvent>(window, 'resize'), fromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerResize))\n\t\t\t.pipe(\n\t\t\t\tstartWith(true),\n\t\t\t\ttap(() => console.log(this.minWidth)),\n\t\t\t\tmap(() => (this.clientWidth ? this.clientWidth : window.innerWidth)),\n\t\t\t\tmap(width => width >= this.minWidth.main + this.minWidth.sheet),\n\t\t\t\tdebounceTime(100),\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis.maxHeight = `${window.innerHeight - this.getOffsetTop(this) - 32}px`\n\t\t\t\t\tthis.style.setProperty('max-height', this.maxHeight)\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerToggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\tthis.open = state\n\t\t\t})\n\n\t\tfromEvent<TRenderCustomEvent>(window, 'schmancy-content-drawer-render')\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(({ component, title }) => {\n\t\t\t\tif (this.mode === 'push') {\n\t\t\t\t\t// TODO: Fix the router to render if constructor has different arguments\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: 'empty',\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t} else if ((this.mode = 'overlay')) {\n\t\t\t\t\tsheet.open({ component: component, uid: this.schmancyContentDrawerID, title })\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tgetOffsetTop(element) {\n\t\tlet offsetTop = 0\n\t\twhile (element) {\n\t\t\toffsetTop += element.offsetTop\n\t\t\telement = element.offsetParent\n\t\t}\n\t\treturn offsetTop\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.mode === 'overlay' ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer': SchmancyContentDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { PropertyValueMap, css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { SchmancyEvents } from '..'\nimport {\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetMode,\n} from './context'\nimport { when } from 'lit/directives/when.js'\n\n@customElement('schmancy-content-drawer-main')\nexport class SchmancyContentDrawerMain extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) this.drawerMinWidth.main = this.minWidth\n\t\telse this.minWidth = this.drawerMinWidth.main\n\t}\n\n\tprotected update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n\t\tsuper.update(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\tthis.drawerMinWidth.main = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t}\n\t}\n\n\trender() {\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\t\treturn html`\n\t\t\t<section class=\"relative inset-0 h-full\">\n\t\t\t\t<schmancy-grid\n\t\t\t\t\tclass=\"h-full relative overflow-scroll\"\n\t\t\t\t\tcols=\"${this.mode === 'push' ? 'auto 1fr' : '1fr'}\"\n\t\t\t\t\trows=\"1fr\"\n\t\t\t\t\tflow=\"col\"\n\t\t\t\t\talign=\"stretch\"\n\t\t\t\t\tjustify=\"stretch\"\n\t\t\t\t>\n\t\t\t\t\t<section style=${this.styleMap(styles)}>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</section>\n\t\t\t\t</schmancy-grid>\n\t\t\t\t${when(\n\t\t\t\t\tthis.mode === 'push',\n\t\t\t\t\t() => html` <schmancy-divider class=\"absolute right-0 top-0\" orientation=\"vertical\"></schmancy-divider>`,\n\t\t\t\t)}\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-main': SchmancyContentDrawerMain\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { from, merge, Observable, of, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n// --- 1) Removed the custom animate import\n// import { animate } from '@packages/anime-beta-master'\n\n@customElement('schmancy-content-drawer-sheet')\nexport class SchmancyContentDrawerSheet extends $LitElement(css`\n\t:host {\n\t\toverflow: scroll;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerSheetState, subscribe: true })\n\t@state()\n\tstate: TSchmancyContentDrawerSheetState\n\n\t@consume({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID\n\n\t@query('#sheet') sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true, slot: undefined }) defaultSlot!: HTMLElement[]\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) {\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t} else {\n\t\t\tthis.minWidth = this.drawerMinWidth.sheet\n\t\t}\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\t// If the 'minWidth' property changed\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t} else if (changedProperties.has('state') || changedProperties.has('mode')) {\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\t// Overlay open logic if needed\n\t\t\t\t\t// this.open()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tsheet.dismiss(this.schmancyContentDrawerID)\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.open()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Open the sheet by sliding it into view.\n\t */\n\topen() {\n\t\t// \"onBegin\" logic from the old `animate(...)`\n\t\tif (this.mode === 'overlay') {\n\t\t\tthis.sheet.style.position = 'fixed'\n\t\t} else {\n\t\t\tthis.sheet.style.position = 'relative'\n\t\t}\n\t\tthis.sheet.style.display = 'block'\n\n\t\t// --- 2) Use native Web Animations API ---\n\t\tthis.sheet.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 0, transform: 'translateX(100%)' },\n\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 500,\n\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t},\n\t\t)\n\t\t// No return is needed if you don't rely on the result\n\t}\n\n\t/**\n\t * Close everything (modal sheet + the sheet itself).\n\t */\n\tcloseAll() {\n\t\t// Merge them into a single subscription,\n\t\t// so that everything closes in parallel.\n\t\tmerge(from(this.closeModalSheet()), from(this.closeSheet())).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\t/**\n\t * Dismiss the \"modal sheet.\"\n\t * This just returns an Observable that completes immediately.\n\t */\n\tcloseModalSheet() {\n\t\treturn of(true).pipe(tap(() => sheet.dismiss(this.schmancyContentDrawerID)))\n\t}\n\n\t/**\n\t * Slide the sheet out of view + hide it.\n\t * Return an Observable so we can merge it with other close operations.\n\t */\n\tcloseSheet() {\n\t\t// --- 2) Use native Web Animations API and wrap in an Observable ---\n\t\treturn new Observable<void>(observer => {\n\t\t\tconst animation = this.sheet.animate(\n\t\t\t\t[\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(100%)' },\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tduration: 500,\n\t\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tanimation.onfinish = () => {\n\t\t\t\t// \"onComplete\" logic\n\t\t\t\tthis.sheet.style.display = 'none'\n\t\t\t\tobserver.next()\n\t\t\t\tobserver.complete()\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected render() {\n\t\tconst sheetClasses = {\n\t\t\tblock: this.mode === 'push',\n\t\t\t'absolute z-50': this.mode === 'overlay',\n\t\t\t'opacity-1': this.mode === 'overlay' && this.state === 'open',\n\t\t}\n\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<section id=\"sheet\" class=\"${this.classMap(sheetClasses)}\" style=${this.styleMap(styles)}>\n\t\t\t\t<schmancy-area name=\"${this.schmancyContentDrawerID}\">\n\t\t\t\t\t<slot name=\"placeholder\"></slot>\n\t\t\t\t</schmancy-area>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-sheet': SchmancyContentDrawerSheet\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { debounceTime, 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","constructor","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","e","SchmancyContentDrawerSheetMode","createContext","SchmancyContentDrawerSheetState","SchmancyContentDrawerID","Math","floor","random","Date","now","toString","SchmancyContentDrawerMaxHeight","SchmancyContentDrawerMinWidth","SchmancyContentDrawer","$LitElement","minWidth","main","sheet","schmancyContentDrawerID","maxHeight","merge","fromEvent","window","ContentDrawerResize","startWith","tap","map","clientWidth","innerWidth","width","debounceTime","innerHeight","getOffsetTop","style","setProperty","distinctUntilChanged","takeUntil","disconnecting","lgScreen","mode","open","event","stopPropagation","area","push","historyStrategy","uid","element","offsetTop","offsetParent","nothing","provide","context","queryAssignedElements","flatten","SchmancyContentDrawerMain","connectedCallback","drawerMinWidth","changedProperties","update","has","styles","when","consume","SchmancyContentDrawerSheet","updated","closeAll","dismiss","position","display","animate","opacity","transform","duration","easing","from","closeModalSheet","closeSheet","of","Observable","observer","onfinish","complete","sheetClasses","block","query","slot","schmancyNavDrawer","NavDrawer_toggle","self","SchmancyDrawerNavbarMode","SchmancyDrawerNavbarState","SchmancyDrawerAppbar","toggler","sidebarToggler","sidebarMode","hidden","sidebarOpen","Boolean","SchmancyNavigationDrawerContent","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","handleOverlayClick","sidebarClasses","bgColor","container","scrim","WhereAreYouRicky","HereMorty","teleport","activeTeleportations","Map","flipRequests","find","zip","filter","uuid","id","take","callerID","timeout","flip","request","to","originalZIndex","zIndex","transformOrigin","keyframes","rect","left","top","delay","bufferTime","requests","host","i","concatMap","watchElementRect","interval","getBoundingClientRect","prev","curr","right","bottom","SchmancyTeleportation","debugging","shadowRoot","querySelector","assignedElements","Error","FINDING_MORTIES","HERE_RICKY","teleportationService","get","a","throwIfEmpty","domRect","set","_slottedChildren","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAqBA,KAArB,cAA+CC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA,CAKpD,EAAA;AAAA,EAAA;AACF,WAAAC;AAAAA,EAAA;AAAA;AANYH;;;GAArB,CADCI,EAAc,sBAAA,CAAA,GACMJ;;;;;ACJrB,IAAqBK,IAArB,cAA0CJ,EAAAA,EAAAA;AAAAA,EAA1C,cAAAK;AAAAC,aAAAC,SACwDC,GAAAA,KAAAC,OAAA,YACQD,KAAAE,YAAA;AAAA,EAAA;AAAA,EACrD;AACT,UAAMC,IAAU,EACf,cAAc,IACd,aAAaH,KAAKE,cAAc,GAChC,aAAaF,KAAKE,cAAc,GAChC,aAAaF,KAAKE,cAAc,GAChC,aAAaF,KAAKE,cAAc,GAChC,YAAYF,KAAKE,cAAc,GAC/B,mBAAmB,CAAC,YAAY,QAAA,EAAUE,SAASJ,KAAKC,OACxD,4CAA4CD,KAAKC,SAAS,YAC1D,sBAAsBD,KAAKC,SAAS,UACpC,yEAAyED,KAAKC,SAAS,WAATA;AAE/E,WAAOP,gBAAmBM,KAAKK,SAASF,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,EAAQ;AAfrCG;AAAAA,EAAA,CAAXC,EAAAA,CAAAA,GADmBX,EACRY,WAAA,QAAA,CACgBF,GAAAA,EAAA,CAA3BC,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Y,cAAc,YACpBgI,GAAA/M,IAAAA,EACf6B,KAAKoD,EAAUjF,KAAKkF,aACpBpD,CAAAA,EAAAA,UAAU,EACVc,MAAWC,OAEViL;AAAAA,QAAAA,EAAqB1C,qBAAqB+C,IAAInO,KAAK2L,IAAI9I,CAAAA;AAAAA,MAAC,EAEzD,CAAA;AAAA,IAAA,GAEHkF,UAAU,MACV;AAAA,IAAA,EAAA,CAAA;AAAA,EAAA;AAAA,EAGH,SAAApH;AACQ,WAAAjB;AAAAA,EAAA;AAzGmCY;AAAAA,EAAA,CAA1CC,EAAS,EAAEN,MAAMQ,QAAQgB,YALd6L,CAAAA,CAAAA,GAAAA,EAK+B9M,WAAA,QAAA,IAMfF,EAAA,CAA3BC,EAAS,EAAEN,MAAMuB,OAXN8L,CAAAA,CAAAA,GAAAA,EAWgB9M,WAAA,MAAA,IAEAF,EAAA,CAA3BC,EAAS,EAAEN,MAAMQ,OAbN6M,CAAAA,CAAAA,GAAAA,EAagB9M,WAAA,SAAA,IAbhB8M,IAANhN,EAAA,CADNX,EAAc,uBACF2N;"}
|
package/dist/teleport.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mhmo91/schmancy",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.129",
|
|
4
4
|
"description": "UI library build with web components",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"packageManager": "yarn@4.6.0",
|
|
@@ -34,7 +34,11 @@
|
|
|
34
34
|
"build": "tsc && vite build --config vite.config.ts",
|
|
35
35
|
"preview": "vite preview",
|
|
36
36
|
"watch": "npm-watch build:components",
|
|
37
|
-
"ncu": "ncu -u && npm i"
|
|
37
|
+
"ncu": "ncu -u && npm i",
|
|
38
|
+
"test": "vitest run",
|
|
39
|
+
"test:watch": "vitest",
|
|
40
|
+
"test:ui": "vitest --ui",
|
|
41
|
+
"test:coverage": "vitest run --coverage"
|
|
38
42
|
},
|
|
39
43
|
"author": "@mhmo91",
|
|
40
44
|
"license": "Apache-2.0",
|
|
@@ -75,9 +79,12 @@
|
|
|
75
79
|
"@types/node": "^22.13.10",
|
|
76
80
|
"@types/uuid": "^10.0.0",
|
|
77
81
|
"@typescript-eslint/parser": "^8.26.1",
|
|
82
|
+
"@vitest/ui": "^3.0.8",
|
|
78
83
|
"autoprefixer": "^10.4.21",
|
|
84
|
+
"c8": "^10.1.3",
|
|
79
85
|
"deepmerge": "^4.3.1",
|
|
80
86
|
"eslint": "^9.22.0",
|
|
87
|
+
"happy-dom": "^17.4.4",
|
|
81
88
|
"postcss": "^8.5.3",
|
|
82
89
|
"prettier": "^3.5.3",
|
|
83
90
|
"rollup-plugin-copy": "^3.5.0",
|
|
@@ -85,7 +92,8 @@
|
|
|
85
92
|
"tailwindcss": "^4.0.14",
|
|
86
93
|
"vite": "^6.2.2",
|
|
87
94
|
"vite-plugin-sitemap": "^0.7.1",
|
|
88
|
-
"vite-plugin-webfont-dl": "^3.10.4"
|
|
95
|
+
"vite-plugin-webfont-dl": "^3.10.4",
|
|
96
|
+
"vitest": "^3.0.8"
|
|
89
97
|
},
|
|
90
98
|
"peerDependencies": {
|
|
91
99
|
"lit": "^3.2.1",
|
|
@@ -22,9 +22,6 @@ export default class SchmancyCollectionStore<V = any> implements ICollectionStor
|
|
|
22
22
|
* Set ready state
|
|
23
23
|
*/
|
|
24
24
|
set ready(value: boolean);
|
|
25
|
-
/**
|
|
26
|
-
* Private constructor to enforce singleton pattern
|
|
27
|
-
*/
|
|
28
25
|
private constructor();
|
|
29
26
|
/**
|
|
30
27
|
* Static method to get or create an instance with proper typing
|
|
@@ -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
|
-
*
|
|
5
|
-
* [field, operator, expected]
|
|
6
|
-
* or an object:
|
|
7
|
-
* { key, operator, value }
|
|
4
|
+
* Type-safe condition tuple
|
|
8
5
|
*/
|
|
9
|
-
export type
|
|
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
|
|
31
|
-
|
|
32
|
-
|
|
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<
|
|
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>;
|