@mhmo91/schmancy 0.10.39 → 0.10.40
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/agent/schmancy.agent.js +14 -7
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/boat-BJPl_Jti.cjs +34 -0
- package/dist/boat-BJPl_Jti.cjs.map +1 -0
- package/dist/{boat-fqodYt2n.js → boat-BeqA9_ms.js} +9 -4
- package/dist/boat-BeqA9_ms.js.map +1 -0
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{directives-Bb0S1DKZ.cjs → directives-BZIRQDBq.cjs} +1 -1
- package/dist/{directives-Bb0S1DKZ.cjs.map → directives-BZIRQDBq.cjs.map} +1 -1
- package/dist/{directives-Bfm1lkoy.js → directives-BvRTjCFa.js} +5 -3
- package/dist/{directives-Bfm1lkoy.js.map → directives-BvRTjCFa.js.map} +1 -1
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/{select-Cawz88lG.js → select-CGBsblDA.js} +1 -1
- package/dist/{select-Cawz88lG.js.map → select-CGBsblDA.js.map} +1 -1
- package/dist/{select-BWpV2iv-.cjs → select-LWdPs7b_.cjs} +1 -1
- package/dist/{select-BWpV2iv-.cjs.map → select-LWdPs7b_.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/skills/SKILL.md +4 -0
- package/dist/skills/chips.md +41 -1
- package/dist/skills/schmancy/SKILL.md +4 -0
- package/dist/skills/schmancy/chips.md +41 -1
- package/dist/{src-8VJ7eluk.js → src-Dmqjtcmp.js} +3 -3
- package/dist/{src-8VJ7eluk.js.map → src-Dmqjtcmp.js.map} +1 -1
- package/dist/{src-GJA8uSAS.cjs → src-SAXA4LEH.cjs} +1 -1
- package/dist/{src-GJA8uSAS.cjs.map → src-SAXA4LEH.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +2 -1
- package/skills/schmancy/SKILL.md +4 -0
- package/skills/schmancy/chips.md +41 -1
- package/src/boat/boat.ts +20 -5
- package/src/directives/reveal.ts +7 -1
- package/types/src/boat/boat.d.ts +1 -0
- package/types/src/directives/reveal.d.ts +2 -0
- package/dist/boat-DsFJNfPH.cjs +0 -34
- package/dist/boat-DsFJNfPH.cjs.map +0 -1
- package/dist/boat-fqodYt2n.js.map +0 -1
package/dist/avatar.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-C41uPa6l.cjs`);require(`./mixins-fIpzhVMd.cjs`);const t=require(`./directives-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-C41uPa6l.cjs`);require(`./mixins-fIpzhVMd.cjs`);const t=require(`./directives-BZIRQDBq.cjs`),n=require(`./theme.interface-CSt7JUBD.cjs`);let r=require(`lit/decorators.js`),i=require(`lit`);var a=class extends e.t{constructor(...e){super(...e),this.initials=``,this.src=``,this.icon=``,this.size=`md`,this.color=`primary`,this.shape=`circle`,this.bordered=!1,this.status=`none`}render(){let e;e=this.src?i.html`<img class="w-full h-full object-cover" src="${this.src}" alt="Avatar" />`:this.initials?i.html`<span class="text-center font-medium">${this.initials.substring(0,2).toUpperCase()}</span>`:this.icon?i.html`<schmancy-icon>${this.icon}</schmancy-icon>`:i.html`<schmancy-icon>person</schmancy-icon>`;let t={"relative flex items-center justify-center overflow-hidden":!0,[{xxs:`w-5 h-5 text-[8px]`,xs:`w-6 h-6 text-xs`,sm:`w-8 h-8 text-sm`,md:`w-10 h-10 text-base`,lg:`w-12 h-12 text-lg`,xl:`w-16 h-16 text-xl`}[this.size]]:!0,[{circle:`rounded-full`,square:`rounded-md`}[this.shape]]:!0,"border-2 border-surface-container":this.bordered},n=this.getColorAttributes();return i.html`
|
|
2
2
|
<div class="${this.classMap(t)}" ${n}>
|
|
3
3
|
${e} ${this.status===`none`?``:this.renderStatusIndicator()}
|
|
4
4
|
</div>
|
package/dist/avatar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e, u as t } from "./SchmancyElement-BNnyBOwk.js";
|
|
2
2
|
import "./mixins-DGBI7YPO.js";
|
|
3
|
-
import { S as n } from "./directives-
|
|
3
|
+
import { S as n } from "./directives-BvRTjCFa.js";
|
|
4
4
|
import { t as r } from "./theme.interface-odQEpZZH.js";
|
|
5
5
|
import { customElement as i, property as a } from "lit/decorators.js";
|
|
6
6
|
import { html as o } from "lit";
|
package/dist/badge.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-SAXA4LEH.cjs`);Object.defineProperty(exports,`ScBadgeV2`,{enumerable:!0,get:function(){return e.w}}),Object.defineProperty(exports,`SchmancyBadgeV2`,{enumerable:!0,get:function(){return e.T}});
|
package/dist/badge.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { T as e, w as t } from "./src-
|
|
1
|
+
import { T as e, w as t } from "./src-Dmqjtcmp.js";
|
|
2
2
|
export { t as ScBadgeV2, e as SchmancyBadgeV2 };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-C41uPa6l.cjs`);require(`./mixins-fIpzhVMd.cjs`);const t=require(`./animation-CCOIW4wJ.cjs`),n=require(`./reduced-motion-Ds-HjMzn.cjs`),r=require(`./theme.service-B15FdjOS.cjs`),i=require(`./overlay.service-Dbu5uP9E.cjs`);let a=require(`rxjs`),o=require(`lit/directives/class-map.js`),s=require(`lit/directives/style-map.js`),c=require(`lit/decorators.js`),l=require(`lit`),u=require(`lit/directives/ref.js`);var d=`schmancy-boat-`,f=class extends e.t{constructor(...e){super(...e),this.id=`default`,this.corner=`bottom-right`,this.open=!1,this.isDragging=!1,this.currentCorner=`bottom-right`,this.hasHandle=!1,this.position={x:16,y:16},this.containerRef=(0,u.createRef)(),this.triggerRef=(0,u.createRef)(),this.handleRef=(0,u.createRef)(),this.#e=!1,this.#n=[],this.onHandleSlotChange=()=>{this.hasHandle=this.handleNodes.length>0},this.onDefaultSlotChange=()=>{this.#t&&this.#r&&this.slotted.forEach(e=>{e.parentElement!==this.#r&&(this.#n.push(e),this.#r.appendChild(e))})}}#e;#t;#n;#r;applyContainerPosition(){let e=this.containerRef.value;if(!e)return;e.style.removeProperty(`left`),e.style.removeProperty(`right`),e.style.removeProperty(`top`),e.style.removeProperty(`bottom`);let{x:t,y:n}=this.position;this.currentCorner.includes(`right`)?e.style.right=`${t}px`:e.style.left=`${t}px`,this.currentCorner.includes(`bottom`)?e.style.bottom=`${n+r.n.bottomOffset}px`:e.style.top=`${n}px`}loadPosition(){try{let e=localStorage.getItem(d+this.id);if(e){let t=JSON.parse(e);this.position={x:t.x,y:t.y},this.currentCorner=t.anchor}}catch{}}savePosition(){try{localStorage.setItem(d+this.id,JSON.stringify({...this.position,anchor:this.currentCorner}))}catch{}}validateBounds(){let e=this.containerRef.value;if(!e)return;let t=e.getBoundingClientRect();if(t.width===0)return;let n=window.innerWidth,r=window.innerHeight,i=this.currentCorner.includes(`right`),a=this.currentCorner.includes(`bottom`),o=i?n-this.position.x-t.width:this.position.x,s=a?r-this.position.y-t.height:this.position.y,c=Math.max(0,Math.min(o,n-t.width)),l=Math.max(0,Math.min(s,r-t.height));this.position={x:i?n-c-t.width:c,y:a?r-l-t.height:l},this.applyContainerPosition()}reorientToNearestCorner(){let e=this.containerRef.value;if(!e)return;let r=e.getBoundingClientRect(),i=r.left+r.width/2,a=r.top+r.height/2,o=i>window.innerWidth/2?`right`:`left`,s=a>window.innerHeight/2?`bottom`:`top`;if(this.currentCorner=`${s}-${o}`,this.position={x:16,y:16},this.applyContainerPosition(),n.t.value)return void this.savePosition();let c=e.getBoundingClientRect(),l=r.left-c.left,u=r.top-c.top;e.style.transform=`translate(${l}px, ${u}px)`,this.currentAnimation?.cancel();let d=e.animate([{transform:e.style.transform},{transform:`translate(0,0)`}],{duration:t.d.duration,easing:t.d.easingFallback,fill:`forwards`});this.currentAnimation=d,d.finished.then(()=>{e.isConnected&&(e.style.transform=``)}),this.savePosition()}openOverlay(){if(this.#t)return;let e=this.containerRef.value;this.#r=document.createElement(`div`),this.#r.className=`flex flex-col`,this.#n=[...this.slotted],this.#n.forEach(e=>this.#r.appendChild(e)),this.#t=i.o(this.#r,{anchor:e??void 0,dismissable:!0,historyStrategy:`silent`}).pipe((0,a.finalize)(()=>this.restoreSlotted()),(0,a.takeUntil)(this.disconnecting)).subscribe(),this.dispatchScopedEvent(`toggle`,`open`)}restoreSlotted(){this.#n.forEach(e=>this.appendChild(e)),this.#n=[],this.#r=void 0,this.#t=void 0,this.open&&=!1,this.dispatchScopedEvent(`toggle`,`closed`)}connectedCallback(){super.connectedCallback(),(0,a.merge)((0,a.fromEvent)(window,`resize`).pipe((0,a.tap)(()=>this.validateBounds())),r.n.bottomOffset$.pipe((0,a.tap)(()=>this.applyContainerPosition()))).pipe((0,a.takeUntil)(this.disconnecting)).subscribe()}firstUpdated(){this.currentCorner=this.corner,this.hasHandle=this.handleNodes.length>0,this.loadPosition();let e=this.containerRef.value,t=this.triggerRef.value,n=this.handleRef.value;e&&t&&n&&(this.applyContainerPosition(),(0,a.merge)((0,a.fromEvent)(t,`click`).pipe((0,a.tap)(()=>this.toggle())),(0,a.fromEvent)(t,`keydown`).pipe((0,a.filter)(e=>e.key===`Enter`||e.key===` `),(0,a.tap)(e=>{e.preventDefault(),this.toggle()})),(0,a.fromEvent)(n,`pointerdown`).pipe((0,a.filter)(e=>e.button===0),(0,a.tap)(e=>{e.preventDefault();try{n.setPointerCapture(e.pointerId)}catch{}}),(0,a.exhaustMap)(t=>{let n=e.getBoundingClientRect(),r=t.clientX-n.left,i=t.clientY-n.top,o=!1,s=e=>e.pointerId===t.pointerId,c=(0,a.merge)((0,a.fromEvent)(window,`pointerup`),(0,a.fromEvent)(window,`pointercancel`)).pipe((0,a.filter)(s));return(0,a.fromEvent)(window,`pointermove`).pipe((0,a.filter)(s),(0,a.tap)(e=>{let a=e.clientX-t.clientX,s=e.clientY-t.clientY;if(!o&&Math.sqrt(a*a+s*s)>5&&(o=!0,this.isDragging=!0),!o)return;let c=window.innerWidth,l=window.innerHeight,u=Math.max(0,Math.min(e.clientX-r,c-n.width)),d=Math.max(0,Math.min(e.clientY-i,l-n.height));this.position={x:this.currentCorner.includes(`right`)?c-u-n.width:u,y:this.currentCorner.includes(`bottom`)?l-d-n.height:d},this.applyContainerPosition()}),(0,a.takeUntil)(c),(0,a.finalize)(()=>{o?this.reorientToNearestCorner():this.toggle(),this.isDragging=!1}))}))).pipe((0,a.takeUntil)(this.disconnecting)).subscribe(),this.#e=!0,this.open&&this.openOverlay())}willUpdate(e){this.#e&&e.has(`open`)&&(this.open&&!this.#t?this.openOverlay():!this.open&&this.#t&&this.#t.unsubscribe())}disconnectedCallback(){super.disconnectedCallback(),this.currentAnimation?.cancel(),this.#t?.unsubscribe()}toggle(){this.open=!this.open}render(){let e=(0,o.classMap)({"inline-flex":!0,"transition-opacity":!0,"duration-200":!0,"opacity-85":this.isDragging,"scale-95":this.isDragging}),t=(0,s.styleMap)({position:`fixed`,"pointer-events":`auto`}),n=(0,o.classMap)({flex:!0,"items-center":!0,"touch-none":!0,"select-none":!0,hidden:!this.hasHandle,"cursor-grabbing":this.isDragging,"cursor-grab":!this.isDragging});return l.html`
|
|
2
|
+
<schmancy-surface
|
|
3
|
+
${(0,u.ref)(this.containerRef)}
|
|
4
|
+
type="glass"
|
|
5
|
+
rounded="all"
|
|
6
|
+
.elevation=${3}
|
|
7
|
+
class="${e} overflow-hidden rounded-2xl"
|
|
8
|
+
style=${t}
|
|
9
|
+
aria-expanded=${this.open}
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
${(0,u.ref)(this.handleRef)}
|
|
13
|
+
class=${n}
|
|
14
|
+
aria-label="Drag to move"
|
|
15
|
+
>
|
|
16
|
+
<slot name="drag-handle" @slotchange=${this.onHandleSlotChange}></slot>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div
|
|
20
|
+
${(0,u.ref)(this.triggerRef)}
|
|
21
|
+
class="flex items-center cursor-pointer"
|
|
22
|
+
role="button"
|
|
23
|
+
tabindex="0"
|
|
24
|
+
aria-label="Open panel"
|
|
25
|
+
title="Click to open"
|
|
26
|
+
>
|
|
27
|
+
<slot name="trigger"></slot>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- Default-slot content parks here (hidden) while collapsed;
|
|
31
|
+
relocated into the show() overlay on open. -->
|
|
32
|
+
<div hidden><slot @slotchange=${this.onDefaultSlotChange}></slot></div>
|
|
33
|
+
</schmancy-surface>
|
|
34
|
+
`}};e.u([(0,c.property)({type:String})],f.prototype,`id`,void 0),e.u([(0,c.property)({type:String})],f.prototype,`corner`,void 0),e.u([(0,c.property)({type:Boolean,reflect:!0})],f.prototype,`open`,void 0),e.u([(0,c.state)()],f.prototype,`isDragging`,void 0),e.u([(0,c.state)()],f.prototype,`currentCorner`,void 0),e.u([(0,c.state)()],f.prototype,`hasHandle`,void 0),e.u([(0,c.queryAssignedElements)()],f.prototype,`slotted`,void 0),e.u([(0,c.queryAssignedElements)({slot:`drag-handle`})],f.prototype,`handleNodes`,void 0);var p=f=e.u([(0,c.customElement)(`schmancy-boat`)],f);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return p}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boat-BJPl_Jti.cjs","names":["#sub","#wrapper","#captured","#ready"],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { html, type PropertyValues } from 'lit'\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { exhaustMap, filter, finalize, fromEvent, merge, type Subscription, takeUntil, tap } from 'rxjs'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { show } from '../overlay/overlay.service'\nimport { theme } from '../theme/theme.service.js'\nimport { SPRING_SMOOTH } from '../utils/animation.js'\n\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n/**\n * Corner-anchored launcher that delegates its expanded panel to the `show()`\n * overlay service.\n *\n * Three slots, three non-overlapping intents — no element-type sniffing,\n * ever:\n *\n * - `trigger` — pure consumer content. A native click anywhere on it\n * opens the panel; interactive children (buttons, FABs, inputs) work\n * with zero special-casing because the boat never calls\n * `preventDefault` / `stopPropagation` / `setPointerCapture` here.\n * - `drag-handle` — opt-in. Pointer-drag is wired ONLY to this slot's\n * boat-owned wrapper. Slot it to make the boat draggable; omit it and\n * the boat is static at its corner. (A no-move tap on the handle also\n * opens, so the grip doubles as a launcher.)\n * - _(default)_ — the panel body; parked hidden while collapsed,\n * relocated into the `show()` overlay on open.\n *\n * The boat owns drag, corner-snapping, position persistence and the glass\n * surface — never the collapsed shape.\n */\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\n\n\t/** Identity for localStorage drag-position persistence. */\n\t@property({ type: String }) id: string = 'default'\n\t/** Corner the launcher is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Open state. Bind `?open=${…}` to drive the overlay; reflected to the attribute. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t@state() private isDragging = false\n\t@state() private currentCorner: Corner = 'bottom-right'\n\t@state() private hasHandle = false\n\n\t/** Default-slot nodes — the overlay body. */\n\t@queryAssignedElements() private slotted!: Element[]\n\t/** Slotted drag-handle nodes — presence toggles draggability. */\n\t@queryAssignedElements({ slot: 'drag-handle' }) private handleNodes!: Element[]\n\n\tprivate position: Position = { x: 16, y: 16 }\n\tprivate containerRef = createRef<HTMLElement>()\n\tprivate triggerRef = createRef<HTMLElement>()\n\tprivate handleRef = createRef<HTMLElement>()\n\tprivate currentAnimation?: Animation\n\n\t#ready = false\n\t#sub?: Subscription\n\t#captured: Element[] = []\n\t#wrapper?: HTMLElement\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate applyContainerPosition() {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\t\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\n\t\tconst { x, y } = this.position\n\t\tif (this.currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this.currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis.position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis.currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this.position, anchor: this.currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate validateBounds() {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this.currentCorner.includes('right')\n\t\tconst isBottom = this.currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this.position.x - rect.width : this.position.x\n\t\tconst actualTop = isBottom ? vh - this.position.y - rect.height : this.position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis.position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis.applyContainerPosition()\n\t}\n\n\t// ============================================\n\t// CORNER SNAPPING (FLIP)\n\t// ============================================\n\n\tprivate reorientToNearestCorner(): void {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\n\t\tconst rect = container.getBoundingClientRect()\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = rect.top + rect.height / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tthis.currentCorner = `${vert}-${side}` as Corner\n\t\tthis.position = { x: 16, y: 16 }\n\t\tthis.applyContainerPosition()\n\n\t\tif (reducedMotion$.value) {\n\t\t\tthis.savePosition()\n\t\t\treturn\n\t\t}\n\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.transform = `translate(${dx}px, ${dy}px)`\n\n\t\tthis.currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tthis.currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) container.style.transform = ''\n\t\t\treturn\n\t\t})\n\n\t\tthis.savePosition()\n\t}\n\n\t// ============================================\n\t// OVERLAY DELEGATION\n\t// ============================================\n\n\tprivate openOverlay() {\n\t\tif (this.#sub) return\n\t\tconst anchor = this.containerRef.value\n\t\tthis.#wrapper = document.createElement('div')\n\t\tthis.#wrapper.className = 'flex flex-col'\n\t\tthis.#captured = [...this.slotted]\n\t\tthis.#captured.forEach(node => this.#wrapper!.appendChild(node))\n\n\t\tthis.#sub = show(this.#wrapper, {\n\t\t\tanchor: anchor ?? undefined,\n\t\t\tdismissable: true,\n\t\t\thistoryStrategy: 'silent',\n\t\t})\n\t\t\t.pipe(\n\t\t\t\tfinalize(() => this.restoreSlotted()),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.dispatchScopedEvent('toggle', 'open')\n\t}\n\n\tprivate restoreSlotted() {\n\t\tthis.#captured.forEach(node => this.appendChild(node))\n\t\tthis.#captured = []\n\t\tthis.#wrapper = undefined\n\t\tthis.#sub = undefined\n\t\tif (this.open) this.open = false\n\t\tthis.dispatchScopedEvent('toggle', 'closed')\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// One concern: keep the container in place when the environment\n\t\t// shifts. Viewport resize re-validates bounds; a theme bottom-offset\n\t\t// change (e.g. a snackbar pushing the safe area) re-applies position.\n\t\tmerge(\n\t\t\tfromEvent(window, 'resize').pipe(tap(() => this.validateBounds())),\n\t\t\ttheme.bottomOffset$.pipe(tap(() => this.applyContainerPosition())),\n\t\t)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\tthis.currentCorner = this.corner\n\t\tthis.hasHandle = this.handleNodes.length > 0\n\t\tthis.loadPosition()\n\t\tconst container = this.containerRef.value\n\t\tconst trigger = this.triggerRef.value\n\t\tconst handle = this.handleRef.value\n\t\tif (!container || !trigger || !handle) return\n\t\tthis.applyContainerPosition()\n\n\t\t// Three intents, three sources, one pipeline, one subscribe.\n\t\t//\n\t\t// open$ — a plain click/Enter/Space on the trigger region. No\n\t\t// preventDefault/stopPropagation: a slotted button's own\n\t\t// click still fires; it merely also bubbles to \"open\".\n\t\t// drag$ — pointerdown on the boat-owned drag-handle wrapper. A\n\t\t// dedicated region, so every pointerdown there is a drag\n\t\t// intent — no element-type sniffing. A session ends on\n\t\t// pointerup/cancel; settle = move past threshold ? snap to\n\t\t// the nearest corner : treat as a tap and open.\n\t\tmerge(\n\t\t\tfromEvent<MouseEvent>(trigger, 'click').pipe(tap(() => this.toggle())),\n\t\t\tfromEvent<KeyboardEvent>(trigger, 'keydown').pipe(\n\t\t\t\tfilter(e => e.key === 'Enter' || e.key === ' '),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\tthis.toggle()\n\t\t\t\t}),\n\t\t\t),\n\t\t\tfromEvent<PointerEvent>(handle, 'pointerdown').pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\t// Capture can throw InvalidStateError if the pointer is\n\t\t\t\t\t// already released (fast tap) — drag still works without it.\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandle.setPointerCapture(e.pointerId)\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// no active pointer to capture; ignore\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\texhaustMap(down => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst offsetX = down.clientX - rect.left\n\t\t\t\t\tconst offsetY = down.clientY - rect.top\n\t\t\t\t\tlet moved = false\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === down.pointerId\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn fromEvent<PointerEvent>(window, 'pointermove').pipe(\n\t\t\t\t\t\tfilter(sameId),\n\t\t\t\t\t\ttap(e => {\n\t\t\t\t\t\t\tconst dx = e.clientX - down.clientX\n\t\t\t\t\t\t\tconst dy = e.clientY - down.clientY\n\t\t\t\t\t\t\tif (!moved && Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD) {\n\t\t\t\t\t\t\t\tmoved = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!moved) return\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(e.clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\tconst top = Math.max(0, Math.min(e.clientY - offsetY, vh - rect.height))\n\t\t\t\t\t\t\tthis.position = {\n\t\t\t\t\t\t\t\tx: this.currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\ty: this.currentCorner.includes('bottom') ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (moved) this.reorientToNearestCorner()\n\t\t\t\t\t\t\telse this.toggle()\n\t\t\t\t\t\t\tthis.isDragging = false\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\n\t\tthis.#ready = true\n\t\tif (this.open) this.openOverlay()\n\t}\n\n\tprotected willUpdate(changed: PropertyValues<this>) {\n\t\tif (!this.#ready || !changed.has('open')) return\n\t\tif (this.open && !this.#sub) this.openOverlay()\n\t\telse if (!this.open && this.#sub) this.#sub.unsubscribe()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.currentAnimation?.cancel()\n\t\tthis.#sub?.unsubscribe()\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\t/** Flip open ↔ closed. */\n\ttoggle() {\n\t\tthis.open = !this.open\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprivate onHandleSlotChange = () => {\n\t\tthis.hasHandle = this.handleNodes.length > 0\n\t}\n\n\t// When Lit re-renders the parent and re-asserts default-slot children back\n\t// into this element, slotchange fires. If the overlay is live, re-relocate\n\t// any reassigned nodes into the overlay wrapper to stop the DOM ping-pong.\n\tprivate onDefaultSlotChange = () => {\n\t\tif (!this.#sub || !this.#wrapper) return\n\t\tthis.slotted.forEach(node => {\n\t\t\tif (node.parentElement !== this.#wrapper) {\n\t\t\t\tthis.#captured.push(node)\n\t\t\t\tthis.#wrapper!.appendChild(node)\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected render(): unknown {\n\t\tconst containerClasses = classMap({\n\t\t\t'inline-flex': true,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t\t'opacity-85': this.isDragging,\n\t\t\t'scale-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\n\t\t\t'pointer-events': 'auto',\n\t\t})\n\n\t\t// Boat-owned drag region — wraps ONLY the drag-handle slot, so every\n\t\t// pointerdown inside it is unambiguously a drag intent. Hidden (and\n\t\t// out of layout) when the consumer slots no handle: the boat is then\n\t\t// simply not draggable.\n\t\tconst handleClasses = classMap({\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'touch-none': true,\n\t\t\t'select-none': true,\n\t\t\thidden: !this.hasHandle,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-grab': !this.isDragging,\n\t\t})\n\n\t\treturn html`\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this.containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\trounded=\"all\"\n\t\t\t\t.elevation=${3}\n\t\t\t\tclass=\"${containerClasses} overflow-hidden rounded-2xl\"\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\t${ref(this.handleRef)}\n\t\t\t\t\tclass=${handleClasses}\n\t\t\t\t\taria-label=\"Drag to move\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"drag-handle\" @slotchange=${this.onHandleSlotChange}></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\t${ref(this.triggerRef)}\n\t\t\t\t\tclass=\"flex items-center cursor-pointer\"\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\taria-label=\"Open panel\"\n\t\t\t\t\ttitle=\"Click to open\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"trigger\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Default-slot content parks here (hidden) while collapsed;\n\t\t\t\t relocated into the show() overlay on open. -->\n\t\t\t\t<div hidden><slot @slotchange=${this.onDefaultSlotChange}></slot></div>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-boat': SchmancyBoat\n\t}\n}\n"],"mappings":"2dAYA,IACM,EAA8B,iBA8BrB,EAAA,cAA2B,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,CAAA,EAAA,KAAA,GAIA,UAAA,KAAA,OAEI,eAAA,KAAA,KAAA,CAEe,EAAA,KAAA,WAAA,CAE9B,EAAA,KAAA,cACW,eAAA,KAAA,UAAA,CACZ,EAAA,KAAA,SAOA,CAAE,EAAG,GAAI,EAAG,EAAA,EAAA,KAAA,cAAA,EAAA,EAAA,WAAA,EAAA,KAAA,YAAA,EAAA,EAAA,WAAA,EAAA,KAAA,WAAA,EAAA,EAAA,WAAA,EAAA,KAAA,GAAA,CAMhC,EAAA,KAAA,GAEc,CAAA,EAAA,KAAA,uBAAA,CA4RtB,KAAK,UAAY,KAAK,YAAY,OAAS,CAAA,EAAA,KAAA,wBAAA,CAOtC,KAAA,IAAc,KAAA,IACnB,KAAK,QAAQ,QAAQ,GAAA,CAChB,EAAK,gBAAkB,KAAA,KAC1B,KAAA,GAAe,KAAK,CAAA,EACpB,KAAA,GAAe,YAAY,CAAA,EAAA,CAAA,CAAA,CAAA,CAzS9B,GACA,GACA,GACA,GAMA,wBAAA,CACC,IAAM,EAAY,KAAK,aAAa,MACpC,GAAA,CAAK,EAAW,OAChB,EAAU,MAAM,eAAe,MAAA,EAC/B,EAAU,MAAM,eAAe,OAAA,EAC/B,EAAU,MAAM,eAAe,KAAA,EAC/B,EAAU,MAAM,eAAe,QAAA,EAC/B,GAAA,CAAM,EAAE,EAAA,EAAG,GAAM,KAAK,SAClB,KAAK,cAAc,SAAS,OAAA,EAC/B,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M,MAAA,CAAA,CAAA,EAAQ,EAAA,UAAA,KAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEhB,CAAE,KAAM,MAAA,CAAA,CAAA,EAAQ,EAAA,UAAA,SAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEhB,CAAE,KAAM,QAAS,QAAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,OAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,CAAA,EAEnC,EAAA,UAAA,aAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,CAAA,EACA,EAAA,UAAA,gBAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,OAAA,CAAA,EACA,EAAA,UAAA,YAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,uBAAA,CAAA,EAGgB,EAAA,UAAA,UAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,uBAEA,CAAE,KAAM,aAAA,CAAA,CAAA,EAAe,EAAA,UAAA,cAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAlBhC,eAAA,CAAA,EAAe,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
|
|
@@ -17,11 +17,16 @@ var S = "schmancy-boat-", C = class extends e {
|
|
|
17
17
|
y: 16
|
|
18
18
|
}, this.containerRef = b(), this.triggerRef = b(), this.handleRef = b(), this.#e = !1, this.#n = [], this.onHandleSlotChange = () => {
|
|
19
19
|
this.hasHandle = this.handleNodes.length > 0;
|
|
20
|
+
}, this.onDefaultSlotChange = () => {
|
|
21
|
+
this.#t && this.#r && this.slotted.forEach((e) => {
|
|
22
|
+
e.parentElement !== this.#r && (this.#n.push(e), this.#r.appendChild(e));
|
|
23
|
+
});
|
|
20
24
|
};
|
|
21
25
|
}
|
|
22
26
|
#e;
|
|
23
27
|
#t;
|
|
24
28
|
#n;
|
|
29
|
+
#r;
|
|
25
30
|
applyContainerPosition() {
|
|
26
31
|
let e = this.containerRef.value;
|
|
27
32
|
if (!e) return;
|
|
@@ -81,15 +86,15 @@ var S = "schmancy-boat-", C = class extends e {
|
|
|
81
86
|
}
|
|
82
87
|
openOverlay() {
|
|
83
88
|
if (this.#t) return;
|
|
84
|
-
let e = this.containerRef.value
|
|
85
|
-
|
|
89
|
+
let e = this.containerRef.value;
|
|
90
|
+
this.#r = document.createElement("div"), this.#r.className = "flex flex-col", this.#n = [...this.slotted], this.#n.forEach((e) => this.#r.appendChild(e)), this.#t = a(this.#r, {
|
|
86
91
|
anchor: e ?? void 0,
|
|
87
92
|
dismissable: !0,
|
|
88
93
|
historyStrategy: "silent"
|
|
89
94
|
}).pipe(c(() => this.restoreSlotted()), d(this.disconnecting)).subscribe(), this.dispatchScopedEvent("toggle", "open");
|
|
90
95
|
}
|
|
91
96
|
restoreSlotted() {
|
|
92
|
-
this.#n.forEach((e) => this.appendChild(e)), this.#n = [], this.#t = void 0, this.open &&= !1, this.dispatchScopedEvent("toggle", "closed");
|
|
97
|
+
this.#n.forEach((e) => this.appendChild(e)), this.#n = [], this.#r = void 0, this.#t = void 0, this.open &&= !1, this.dispatchScopedEvent("toggle", "closed");
|
|
93
98
|
}
|
|
94
99
|
connectedCallback() {
|
|
95
100
|
super.connectedCallback(), u(l(window, "resize").pipe(f(() => this.validateBounds())), i.bottomOffset$.pipe(f(() => this.applyContainerPosition()))).pipe(d(this.disconnecting)).subscribe();
|
|
@@ -178,7 +183,7 @@ var S = "schmancy-boat-", C = class extends e {
|
|
|
178
183
|
|
|
179
184
|
<!-- Default-slot content parks here (hidden) while collapsed;
|
|
180
185
|
relocated into the show() overlay on open. -->
|
|
181
|
-
<div hidden><slot></slot></div>
|
|
186
|
+
<div hidden><slot @slotchange=${this.onDefaultSlotChange}></slot></div>
|
|
182
187
|
</schmancy-surface>
|
|
183
188
|
`;
|
|
184
189
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boat-BeqA9_ms.js","names":["#sub","#wrapper","#captured","#ready"],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { html, type PropertyValues } from 'lit'\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { exhaustMap, filter, finalize, fromEvent, merge, type Subscription, takeUntil, tap } from 'rxjs'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { show } from '../overlay/overlay.service'\nimport { theme } from '../theme/theme.service.js'\nimport { SPRING_SMOOTH } from '../utils/animation.js'\n\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n/**\n * Corner-anchored launcher that delegates its expanded panel to the `show()`\n * overlay service.\n *\n * Three slots, three non-overlapping intents — no element-type sniffing,\n * ever:\n *\n * - `trigger` — pure consumer content. A native click anywhere on it\n * opens the panel; interactive children (buttons, FABs, inputs) work\n * with zero special-casing because the boat never calls\n * `preventDefault` / `stopPropagation` / `setPointerCapture` here.\n * - `drag-handle` — opt-in. Pointer-drag is wired ONLY to this slot's\n * boat-owned wrapper. Slot it to make the boat draggable; omit it and\n * the boat is static at its corner. (A no-move tap on the handle also\n * opens, so the grip doubles as a launcher.)\n * - _(default)_ — the panel body; parked hidden while collapsed,\n * relocated into the `show()` overlay on open.\n *\n * The boat owns drag, corner-snapping, position persistence and the glass\n * surface — never the collapsed shape.\n */\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\n\n\t/** Identity for localStorage drag-position persistence. */\n\t@property({ type: String }) id: string = 'default'\n\t/** Corner the launcher is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Open state. Bind `?open=${…}` to drive the overlay; reflected to the attribute. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t@state() private isDragging = false\n\t@state() private currentCorner: Corner = 'bottom-right'\n\t@state() private hasHandle = false\n\n\t/** Default-slot nodes — the overlay body. */\n\t@queryAssignedElements() private slotted!: Element[]\n\t/** Slotted drag-handle nodes — presence toggles draggability. */\n\t@queryAssignedElements({ slot: 'drag-handle' }) private handleNodes!: Element[]\n\n\tprivate position: Position = { x: 16, y: 16 }\n\tprivate containerRef = createRef<HTMLElement>()\n\tprivate triggerRef = createRef<HTMLElement>()\n\tprivate handleRef = createRef<HTMLElement>()\n\tprivate currentAnimation?: Animation\n\n\t#ready = false\n\t#sub?: Subscription\n\t#captured: Element[] = []\n\t#wrapper?: HTMLElement\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate applyContainerPosition() {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\t\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\n\t\tconst { x, y } = this.position\n\t\tif (this.currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this.currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis.position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis.currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this.position, anchor: this.currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate validateBounds() {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this.currentCorner.includes('right')\n\t\tconst isBottom = this.currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this.position.x - rect.width : this.position.x\n\t\tconst actualTop = isBottom ? vh - this.position.y - rect.height : this.position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis.position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis.applyContainerPosition()\n\t}\n\n\t// ============================================\n\t// CORNER SNAPPING (FLIP)\n\t// ============================================\n\n\tprivate reorientToNearestCorner(): void {\n\t\tconst container = this.containerRef.value\n\t\tif (!container) return\n\n\t\tconst rect = container.getBoundingClientRect()\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = rect.top + rect.height / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tthis.currentCorner = `${vert}-${side}` as Corner\n\t\tthis.position = { x: 16, y: 16 }\n\t\tthis.applyContainerPosition()\n\n\t\tif (reducedMotion$.value) {\n\t\t\tthis.savePosition()\n\t\t\treturn\n\t\t}\n\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.transform = `translate(${dx}px, ${dy}px)`\n\n\t\tthis.currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tthis.currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) container.style.transform = ''\n\t\t\treturn\n\t\t})\n\n\t\tthis.savePosition()\n\t}\n\n\t// ============================================\n\t// OVERLAY DELEGATION\n\t// ============================================\n\n\tprivate openOverlay() {\n\t\tif (this.#sub) return\n\t\tconst anchor = this.containerRef.value\n\t\tthis.#wrapper = document.createElement('div')\n\t\tthis.#wrapper.className = 'flex flex-col'\n\t\tthis.#captured = [...this.slotted]\n\t\tthis.#captured.forEach(node => this.#wrapper!.appendChild(node))\n\n\t\tthis.#sub = show(this.#wrapper, {\n\t\t\tanchor: anchor ?? undefined,\n\t\t\tdismissable: true,\n\t\t\thistoryStrategy: 'silent',\n\t\t})\n\t\t\t.pipe(\n\t\t\t\tfinalize(() => this.restoreSlotted()),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.dispatchScopedEvent('toggle', 'open')\n\t}\n\n\tprivate restoreSlotted() {\n\t\tthis.#captured.forEach(node => this.appendChild(node))\n\t\tthis.#captured = []\n\t\tthis.#wrapper = undefined\n\t\tthis.#sub = undefined\n\t\tif (this.open) this.open = false\n\t\tthis.dispatchScopedEvent('toggle', 'closed')\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// One concern: keep the container in place when the environment\n\t\t// shifts. Viewport resize re-validates bounds; a theme bottom-offset\n\t\t// change (e.g. a snackbar pushing the safe area) re-applies position.\n\t\tmerge(\n\t\t\tfromEvent(window, 'resize').pipe(tap(() => this.validateBounds())),\n\t\t\ttheme.bottomOffset$.pipe(tap(() => this.applyContainerPosition())),\n\t\t)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\tthis.currentCorner = this.corner\n\t\tthis.hasHandle = this.handleNodes.length > 0\n\t\tthis.loadPosition()\n\t\tconst container = this.containerRef.value\n\t\tconst trigger = this.triggerRef.value\n\t\tconst handle = this.handleRef.value\n\t\tif (!container || !trigger || !handle) return\n\t\tthis.applyContainerPosition()\n\n\t\t// Three intents, three sources, one pipeline, one subscribe.\n\t\t//\n\t\t// open$ — a plain click/Enter/Space on the trigger region. No\n\t\t// preventDefault/stopPropagation: a slotted button's own\n\t\t// click still fires; it merely also bubbles to \"open\".\n\t\t// drag$ — pointerdown on the boat-owned drag-handle wrapper. A\n\t\t// dedicated region, so every pointerdown there is a drag\n\t\t// intent — no element-type sniffing. A session ends on\n\t\t// pointerup/cancel; settle = move past threshold ? snap to\n\t\t// the nearest corner : treat as a tap and open.\n\t\tmerge(\n\t\t\tfromEvent<MouseEvent>(trigger, 'click').pipe(tap(() => this.toggle())),\n\t\t\tfromEvent<KeyboardEvent>(trigger, 'keydown').pipe(\n\t\t\t\tfilter(e => e.key === 'Enter' || e.key === ' '),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\tthis.toggle()\n\t\t\t\t}),\n\t\t\t),\n\t\t\tfromEvent<PointerEvent>(handle, 'pointerdown').pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\t// Capture can throw InvalidStateError if the pointer is\n\t\t\t\t\t// already released (fast tap) — drag still works without it.\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandle.setPointerCapture(e.pointerId)\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// no active pointer to capture; ignore\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\texhaustMap(down => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst offsetX = down.clientX - rect.left\n\t\t\t\t\tconst offsetY = down.clientY - rect.top\n\t\t\t\t\tlet moved = false\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === down.pointerId\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn fromEvent<PointerEvent>(window, 'pointermove').pipe(\n\t\t\t\t\t\tfilter(sameId),\n\t\t\t\t\t\ttap(e => {\n\t\t\t\t\t\t\tconst dx = e.clientX - down.clientX\n\t\t\t\t\t\t\tconst dy = e.clientY - down.clientY\n\t\t\t\t\t\t\tif (!moved && Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD) {\n\t\t\t\t\t\t\t\tmoved = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!moved) return\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(e.clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\tconst top = Math.max(0, Math.min(e.clientY - offsetY, vh - rect.height))\n\t\t\t\t\t\t\tthis.position = {\n\t\t\t\t\t\t\t\tx: this.currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\ty: this.currentCorner.includes('bottom') ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (moved) this.reorientToNearestCorner()\n\t\t\t\t\t\t\telse this.toggle()\n\t\t\t\t\t\t\tthis.isDragging = false\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\n\t\tthis.#ready = true\n\t\tif (this.open) this.openOverlay()\n\t}\n\n\tprotected willUpdate(changed: PropertyValues<this>) {\n\t\tif (!this.#ready || !changed.has('open')) return\n\t\tif (this.open && !this.#sub) this.openOverlay()\n\t\telse if (!this.open && this.#sub) this.#sub.unsubscribe()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.currentAnimation?.cancel()\n\t\tthis.#sub?.unsubscribe()\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\t/** Flip open ↔ closed. */\n\ttoggle() {\n\t\tthis.open = !this.open\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprivate onHandleSlotChange = () => {\n\t\tthis.hasHandle = this.handleNodes.length > 0\n\t}\n\n\t// When Lit re-renders the parent and re-asserts default-slot children back\n\t// into this element, slotchange fires. If the overlay is live, re-relocate\n\t// any reassigned nodes into the overlay wrapper to stop the DOM ping-pong.\n\tprivate onDefaultSlotChange = () => {\n\t\tif (!this.#sub || !this.#wrapper) return\n\t\tthis.slotted.forEach(node => {\n\t\t\tif (node.parentElement !== this.#wrapper) {\n\t\t\t\tthis.#captured.push(node)\n\t\t\t\tthis.#wrapper!.appendChild(node)\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected render(): unknown {\n\t\tconst containerClasses = classMap({\n\t\t\t'inline-flex': true,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t\t'opacity-85': this.isDragging,\n\t\t\t'scale-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\n\t\t\t'pointer-events': 'auto',\n\t\t})\n\n\t\t// Boat-owned drag region — wraps ONLY the drag-handle slot, so every\n\t\t// pointerdown inside it is unambiguously a drag intent. Hidden (and\n\t\t// out of layout) when the consumer slots no handle: the boat is then\n\t\t// simply not draggable.\n\t\tconst handleClasses = classMap({\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'touch-none': true,\n\t\t\t'select-none': true,\n\t\t\thidden: !this.hasHandle,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-grab': !this.isDragging,\n\t\t})\n\n\t\treturn html`\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this.containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\trounded=\"all\"\n\t\t\t\t.elevation=${3}\n\t\t\t\tclass=\"${containerClasses} overflow-hidden rounded-2xl\"\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\t${ref(this.handleRef)}\n\t\t\t\t\tclass=${handleClasses}\n\t\t\t\t\taria-label=\"Drag to move\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"drag-handle\" @slotchange=${this.onHandleSlotChange}></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div\n\t\t\t\t\t${ref(this.triggerRef)}\n\t\t\t\t\tclass=\"flex items-center cursor-pointer\"\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\taria-label=\"Open panel\"\n\t\t\t\t\ttitle=\"Click to open\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"trigger\"></slot>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Default-slot content parks here (hidden) while collapsed;\n\t\t\t\t relocated into the show() overlay on open. -->\n\t\t\t\t<div hidden><slot @slotchange=${this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AA,GAAA,EAAA,CAEtB,EAAsB,EAAE,MAAM,cAAA,CAAA,CAAA,GAAe,EAAA,WAAA,eAAA,KAAA,CAAA;AAAA,IAAA,IAAA,IAAA,EAAA,CAlB9C,EAAc,eAAA,CAAA,GAAe,CAAA;AAAA,SAAA,KAAA"}
|
package/dist/boat.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./boat-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./boat-BJPl_Jti.cjs`);exports.SchmancyBoat=e.t;
|
package/dist/boat.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./boat-
|
|
1
|
+
import { t as e } from "./boat-BeqA9_ms.js";
|
|
2
2
|
export { e as SchmancyBoat };
|
package/dist/content-drawer.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-SAXA4LEH.cjs`);Object.defineProperty(exports,`SchmancyContentDrawer`,{enumerable:!0,get:function(){return e._}}),exports.SchmancyContentDrawerID=e.v,Object.defineProperty(exports,`SchmancyContentDrawerMain`,{enumerable:!0,get:function(){return e.g}}),exports.SchmancyContentDrawerMaxHeight=e.y,exports.SchmancyContentDrawerMinWidth=e.b,Object.defineProperty(exports,`SchmancyContentDrawerSheet`,{enumerable:!0,get:function(){return e.h}}),exports.SchmancyContentDrawerSheetMode=e.x,exports.SchmancyContentDrawerSheetState=e.S,exports.schmancyContentDrawer=e.C;
|
package/dist/content-drawer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as e, S as t, _ as n, b as r, g as i, h as a, v as o, x as s, y as c } from "./src-
|
|
1
|
+
import { C as e, S as t, _ as n, b as r, g as i, h as a, v as o, x as s, y as c } from "./src-Dmqjtcmp.js";
|
|
2
2
|
export { n as SchmancyContentDrawer, o as SchmancyContentDrawerID, i as SchmancyContentDrawerMain, c as SchmancyContentDrawerMaxHeight, r as SchmancyContentDrawerMinWidth, a as SchmancyContentDrawerSheet, s as SchmancyContentDrawerSheetMode, t as SchmancyContentDrawerSheetState, e as schmancyContentDrawer };
|
|
@@ -307,7 +307,7 @@ require(`./chunk-CncqDLb2.cjs`);const e=require(`./audio-EaD0Ggfh.cjs`),t=requir
|
|
|
307
307
|
transition: opacity 0s !important;
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
`,document.head.appendChild(e)})(),this.state?.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null);let r=n.t.value;if(this.state?.overlay&&this.state.isDimmed)return this.state.isDimmed=!1,this.state.options=t,this.state.fadeFinishedSub?.unsubscribe(),this.state.fadeFinishedSub=null,this.awakenOverlay(t,r),void this.scheduleAutoHide(t);this.state?.overlay||this.createOverlay(e,t,r),this.scheduleAutoHide(t)}awakenOverlay(e,n){if(!this.state?.overlay)return;let r=this.state.overlay;r.style.setProperty(`--nebula-intensity`,String(e.intensity)),r.animate([{opacity:e.idleOpacity,transform:`scale(0.98) translateZ(0)`},{opacity:.7*e.intensity,transform:`scale(1.01) translateZ(0)`},{opacity:e.intensity,transform:`scale(1) translateZ(0)`}],{duration:n?0:.6*e.fadeInDuration,easing:n?`linear`:t._(t.d),fill:`forwards`}),r.classList.remove(`paused`,`dimmed`),r.classList.add(`running`),r.style.animation=``}createOverlay(e,n,r){let i=window.getComputedStyle(e).position,a=e.style.position,o=e.style.overflow,s=e.style.contain;i===`static`&&(e.style.position=`relative`),e.style.overflow=`hidden`,e.style.contain=`paint`;let c=n.temperature,l=Math.max(0,c),u=Math.max(0,-c),d=n.intensity,f=Math.round(3+5*n.chromaticAberration),p=Math.round(20+60*u),m=Math.round(80+80*u),h=Math.round(20+80*l),g=Math.round(255-55*l),_=Math.round(100+100*u),v=Math.round(100*l),y=Math.round(255-55*l),b=Math.round(100+55*u),x=Math.round(255-55*u),S=document.createElement(`div`);if(S.className=`nebula-overlay running`,Object.assign(S.style,{position:`absolute`,inset:`-20%`,zIndex:n.background?`-1`:`9999`,opacity:`0`,"--nebula-intensity":String(d),"--nebula-blur-base":10*n.blur+`px`,"--nebula-idle-opacity":String(n.idleOpacity),"--nebula-aberration":`${f}px`,"--nebula-blur-core":12*n.blur+`px`}),r){let e=document.createElement(`div`);Object.assign(e.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 45% 40% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.06*d}) 40%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(circle 8% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.15*d}) 0%,\n\t\t\t\t\t\ttransparent 100%)`,filter:`blur(${10*n.blur}px)`,opacity:String(d)}),S.appendChild(e)}else{let e=document.createElement(`div`);e.className=`nebula-layer`,Object.assign(e.style,{position:`absolute`,inset:`-5%`,background:`\n\t\t\t\t\tlinear-gradient(155deg,\n\t\t\t\t\t\ttransparent 0%, transparent 38%,\n\t\t\t\t\t\trgba(8,2,18,${.35*d}) 44%,\n\t\t\t\t\t\trgba(0,0,0,${.4*d}) 49%,\n\t\t\t\t\t\trgba(8,2,18,${.35*d}) 54%,\n\t\t\t\t\t\ttransparent 60%, transparent 100%),\n\t\t\t\t\tlinear-gradient(225deg,\n\t\t\t\t\t\ttransparent 0%, transparent 42%,\n\t\t\t\t\t\trgba(5,0,12,${.28*d}) 47%,\n\t\t\t\t\t\trgba(0,0,0,${.32*d}) 50%,\n\t\t\t\t\t\trgba(5,0,12,${.28*d}) 53%,\n\t\t\t\t\t\ttransparent 58%, transparent 100%),\n\t\t\t\t\tradial-gradient(ellipse 110% 110% at 50% 50%,\n\t\t\t\t\t\ttransparent 35%,\n\t\t\t\t\t\trgba(3,0,8,${.2*d}) 60%,\n\t\t\t\t\t\trgba(0,0,0,${.35*d}) 85%),\n\t\t\t\t\tradial-gradient(ellipse 50% 45% at 30% 35%,\n\t\t\t\t\t\trgba(0,0,0,${.3*d}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 40% 55% at 70% 65%,\n\t\t\t\t\t\trgba(0,0,0,${.25*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${4*n.blur}px)`,mixBlendMode:`multiply`,transform:`translateZ(0)`}),S.appendChild(e);let t=document.createElement(`div`);t.className=`nebula-layer`,Object.assign(t.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 55% 50% at 48% 50%,\n\t\t\t\t\t\trgba(255,${p},${m},${.14*d}) 0%,\n\t\t\t\t\t\trgba(255,${p},${m},${.06*d}) 35%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 30% 35% at 30% 35%,\n\t\t\t\t\t\trgba(255,${_},200,${.1*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.03*d}) 50%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 25% 30% at 65% 70%,\n\t\t\t\t\t\trgba(255,${Math.min(255,p+30)},${m},${.08*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-red ${35e3/n.speed}ms ${We} infinite`}),S.appendChild(t);let r=document.createElement(`div`);r.className=`nebula-layer`,Object.assign(r.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 50% 55% at 52% 50%,\n\t\t\t\t\t\trgba(${h},100,${g},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.05*d}) 35%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 35% 30% at 68% 40%,\n\t\t\t\t\t\trgba(${v},${y},200,${.09*d}) 0%,\n\t\t\t\t\t\trgba(${v},${y},200,${.03*d}) 45%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 28% 25% at 35% 65%,\n\t\t\t\t\t\trgba(${h},100,${Math.min(255,g+20)},${.07*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-blue ${35e3/n.speed}ms ${We} infinite`}),S.appendChild(r);let i=document.createElement(`div`);i.className=`nebula-layer`,Object.assign(i.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 20% 22% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.18*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.08*d}) 40%,\n\t\t\t\t\t\trgba(${h},100,${g},${.03*d}) 65%,\n\t\t\t\t\t\ttransparent 80%),\n\t\t\t\t\tradial-gradient(circle 6% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.25*d}) 0%,\n\t\t\t\t\t\trgba(255,240,245,${.1*d}) 50%,\n\t\t\t\t\t\ttransparent 100%)`,mixBlendMode:`screen`,transform:`translateZ(0)`,transformOrigin:`50% 50%`,filter:`blur(${12*n.blur}px) saturate(1.6)`,animation:`nebula-iridescent ${28e3/n.speed}ms linear infinite`}),S.appendChild(i);let a=document.createElement(`div`);if(a.className=`nebula-layer`,Object.assign(a.style,{position:`absolute`,inset:`-12%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 60% 12% at 50% 48%,\n\t\t\t\t\t\trgba(255,${_},200,${.1*d}) 0%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 12% 55% at 48% 50%,\n\t\t\t\t\t\trgba(${v},${y},200,${.08*d}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 45% 10% at 45% 35%,\n\t\t\t\t\t\trgba(255,${b},${x},${.07*d}) 0%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 10% 40% at 60% 60%,\n\t\t\t\t\t\trgba(${h},100,${g},${.06*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${14*n.blur}px)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-tendrils-breathe ${22e3/n.speed}ms ${X} infinite`}),S.appendChild(a),n.particleCount>0){let e=document.createElement(`div`);e.className=`nebula-layer`;let t=[];for(let e=0;e<n.particleCount;e++){let e=5+90*Math.random(),n=5+90*Math.random(),r=.5+2*Math.random(),i=Math.round(360*Math.random()),a=(.3+.5*Math.random())*d;t.push(`radial-gradient(circle ${r}px at ${e}% ${n}%, hsla(${i},80%,70%,${a}) 0%, transparent 100%)`)}Object.assign(e.style,{position:`absolute`,inset:`0`,background:t.join(`,`),mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-particle-twinkle ${5e3/n.speed}ms ${X} infinite`}),S.appendChild(e)}}e.appendChild(S);let C=r?0:n.fadeInDuration,w=r?`linear`:t._(t.d);S.animate([{opacity:0,transform:`scale(0.85) translateZ(0)`},{opacity:.4*n.intensity,transform:`scale(0.97) translateZ(0)`},{opacity:n.intensity,transform:`scale(1) translateZ(0)`}],{duration:C,easing:w,fill:`forwards`}),this.state={element:e,overlay:S,originalPosition:a,originalOverflow:o,originalContain:s,isDimmed:!1,autoHideSub:null,fadeFinishedSub:null,options:n,reducedMotion:r,isVisible:document.visibilityState===`visible`},this.coordinator.register(this,e)}scheduleAutoHide(e){!this.state||e.autoHideDuration<=0||(this.state.autoHideSub=(0,s.timer)(e.autoHideDuration).pipe((0,c.take)(1),(0,c.tap)(()=>{this.state&&(this.state.autoHideSub=null,this.hide(this.state.options))})).subscribe())}hide(e){if(!this.state?.overlay||(this.state.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null),this.state.isDimmed))return;this.state.isDimmed=!0;let n=this.state.overlay,r=this.state.options,i=this.state.reducedMotion,a=i?0:e.fadeOutDuration,o=i?`linear`:t._(t.u);if(e.idleOpacity<=0)return void n.animate([{opacity:r.intensity,transform:`scale(1) translateZ(0)`},{opacity:.4*r.intensity,transform:`scale(0.95) translateZ(0)`},{opacity:0,transform:`scale(0.9) translateZ(0)`}],{duration:a,easing:o,fill:`forwards`});let l=n.animate([{opacity:r.intensity,transform:`scale(1) translateZ(0)`},{opacity:.5*r.intensity,transform:`scale(0.99) translateZ(0)`},{opacity:e.idleOpacity,transform:`scale(1) translateZ(0)`}],{duration:a,easing:o,fill:`forwards`});this.state.fadeFinishedSub?.unsubscribe(),this.state.fadeFinishedSub=(0,s.from)(l.finished).pipe((0,c.take)(1),(0,c.tap)(()=>{this.state?.overlay&&(this.state.overlay.classList.add(`dimmed`),e.idleBreathe&&!i&&(this.state.overlay.style.animation=`nebula-idle-breathe ${12e3/r.speed}ms ${X} infinite`))}),(0,c.catchError)(()=>s.EMPTY)).subscribe()}cleanup(){this.state&&=(this.coordinator.unregister(this,this.state.element),this.state.autoHideSub?.unsubscribe(),this.state.fadeFinishedSub?.unsubscribe(),this.state.overlay?.remove(),this.state.element.style.position=this.state.originalPosition,this.state.element.style.overflow=this.state.originalOverflow,this.state.element.style.contain=this.state.originalContain,null)}disconnected(){this.cleanup()}reconnected(){this.state&&this.coordinator.register(this,this.state.element)}},Je=(0,u.directive)(qe),Ye={smooth:t.d,snappy:t.f,bouncy:t.l,gentle:t.u},Xe=class extends u.AsyncDirective{constructor(e){if(super(e),this.initialized=!1,this.teardown$=new s.Subject,this.firstUpdate=!0,e.type!==d.PartType.ELEMENT)throw Error(`reveal() can only be used on elements`)}render(e,t){return l.noChange}update(e,[r=!1,i={}]){let a=e.element,{preset:o=`smooth`,maxHeight:u,duration:d,easing:f}=i,p=u!==void 0,m=Ye[o],h=d??m.duration,g=f??t._(m),_=n.t.value,v=this.firstUpdate;if(this.firstUpdate=!1,this.initialized||(this.initialized=!0,a.style.transition=_?`none`:[`max-height ${h}ms ${g}`,`opacity ${h}ms ${g}`,`transform ${h}ms ${g}`,`padding ${h}ms ${g}`,`margin ${h}ms ${g}`].join(`, `)),r){if(v)p?(a.style.maxHeight=u,a.style.overflow=`auto`):(a.style.maxHeight=``,a.style.overflow=``),a.style.opacity=`1`,a.style.transform=`translateY(0) scale(1)`;else if(_)p?(a.style.maxHeight=u,a.style.overflow=`auto`):(a.style.maxHeight=``,a.style.overflow=``),a.style.opacity=`1`,a.style.transform=`translateY(0) scale(1)`;else{a.style.overflow=`hidden`,a.style.maxHeight=`0`,a.offsetHeight;let e=p?u:`${a.scrollHeight}px`;a.style.maxHeight=e,a.style.opacity=`1`,a.style.transform=`translateY(0) scale(1)`,p?(0,s.fromEvent)(a,`transitionend`).pipe((0,c.filter)(e=>e.propertyName===`max-height`&&e.target===a),(0,c.take)(1),(0,c.takeUntil)(this.teardown$)).subscribe(()=>{a.style.overflow=`auto`}):(0,s.fromEvent)(a,`transitionend`).pipe((0,c.filter)(e=>e.propertyName===`max-height`&&e.target===a),(0,c.take)(1),(0,c.takeUntil)(this.teardown$)).subscribe(()=>{a.style.maxHeight=``,a.style.overflow=``})}a.style.pointerEvents=``,a.style.paddingTop=``,a.style.paddingBottom=``,a.style.marginTop=``,a.style.marginBottom=``,a.removeAttribute(`aria-hidden`),a.removeAttribute(`inert`)}else a.style.maxHeight===``||a.style.maxHeight===`none`?(a.style.overflow=`hidden`,a.style.maxHeight=`${a.scrollHeight}px`,a.offsetHeight):a.style.overflow=`hidden`,a.style.maxHeight=`0`,a.style.opacity=`0`,a.style.transform=`translateY(-8px) scale(0.98)`,a.style.pointerEvents=`none`,a.style.paddingTop=`0`,a.style.paddingBottom=`0`,a.style.marginTop=`0`,a.style.marginBottom=`0`,a.setAttribute(`aria-hidden`,`true`),a.setAttribute(`inert`,``);return l.noChange}disconnected(){this.teardown$.next()}reconnected(){}},Ze=(0,u.directive)(Xe),Qe=!1,$e=class extends u.AsyncDirective{constructor(...e){super(...e),this.teardown$=new s.Subject}render(){}update(e){if(e.type!==d.PartType.ELEMENT)throw Error(`ripple directive must be used on an element`);this.element=e.element,function(){if(Qe)return;let e=document.createElement(`style`);e.id=`schmancy-ripple-shared`,e.textContent=`
|
|
310
|
+
`,document.head.appendChild(e)})(),this.state?.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null);let r=n.t.value;if(this.state?.overlay&&this.state.isDimmed)return this.state.isDimmed=!1,this.state.options=t,this.state.fadeFinishedSub?.unsubscribe(),this.state.fadeFinishedSub=null,this.awakenOverlay(t,r),void this.scheduleAutoHide(t);this.state?.overlay||this.createOverlay(e,t,r),this.scheduleAutoHide(t)}awakenOverlay(e,n){if(!this.state?.overlay)return;let r=this.state.overlay;r.style.setProperty(`--nebula-intensity`,String(e.intensity)),r.animate([{opacity:e.idleOpacity,transform:`scale(0.98) translateZ(0)`},{opacity:.7*e.intensity,transform:`scale(1.01) translateZ(0)`},{opacity:e.intensity,transform:`scale(1) translateZ(0)`}],{duration:n?0:.6*e.fadeInDuration,easing:n?`linear`:t._(t.d),fill:`forwards`}),r.classList.remove(`paused`,`dimmed`),r.classList.add(`running`),r.style.animation=``}createOverlay(e,n,r){let i=window.getComputedStyle(e).position,a=e.style.position,o=e.style.overflow,s=e.style.contain;i===`static`&&(e.style.position=`relative`),e.style.overflow=`hidden`,e.style.contain=`paint`;let c=n.temperature,l=Math.max(0,c),u=Math.max(0,-c),d=n.intensity,f=Math.round(3+5*n.chromaticAberration),p=Math.round(20+60*u),m=Math.round(80+80*u),h=Math.round(20+80*l),g=Math.round(255-55*l),_=Math.round(100+100*u),v=Math.round(100*l),y=Math.round(255-55*l),b=Math.round(100+55*u),x=Math.round(255-55*u),S=document.createElement(`div`);if(S.className=`nebula-overlay running`,Object.assign(S.style,{position:`absolute`,inset:`-20%`,zIndex:n.background?`-1`:`9999`,opacity:`0`,"--nebula-intensity":String(d),"--nebula-blur-base":10*n.blur+`px`,"--nebula-idle-opacity":String(n.idleOpacity),"--nebula-aberration":`${f}px`,"--nebula-blur-core":12*n.blur+`px`}),r){let e=document.createElement(`div`);Object.assign(e.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 45% 40% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.06*d}) 40%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(circle 8% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.15*d}) 0%,\n\t\t\t\t\t\ttransparent 100%)`,filter:`blur(${10*n.blur}px)`,opacity:String(d)}),S.appendChild(e)}else{let e=document.createElement(`div`);e.className=`nebula-layer`,Object.assign(e.style,{position:`absolute`,inset:`-5%`,background:`\n\t\t\t\t\tlinear-gradient(155deg,\n\t\t\t\t\t\ttransparent 0%, transparent 38%,\n\t\t\t\t\t\trgba(8,2,18,${.35*d}) 44%,\n\t\t\t\t\t\trgba(0,0,0,${.4*d}) 49%,\n\t\t\t\t\t\trgba(8,2,18,${.35*d}) 54%,\n\t\t\t\t\t\ttransparent 60%, transparent 100%),\n\t\t\t\t\tlinear-gradient(225deg,\n\t\t\t\t\t\ttransparent 0%, transparent 42%,\n\t\t\t\t\t\trgba(5,0,12,${.28*d}) 47%,\n\t\t\t\t\t\trgba(0,0,0,${.32*d}) 50%,\n\t\t\t\t\t\trgba(5,0,12,${.28*d}) 53%,\n\t\t\t\t\t\ttransparent 58%, transparent 100%),\n\t\t\t\t\tradial-gradient(ellipse 110% 110% at 50% 50%,\n\t\t\t\t\t\ttransparent 35%,\n\t\t\t\t\t\trgba(3,0,8,${.2*d}) 60%,\n\t\t\t\t\t\trgba(0,0,0,${.35*d}) 85%),\n\t\t\t\t\tradial-gradient(ellipse 50% 45% at 30% 35%,\n\t\t\t\t\t\trgba(0,0,0,${.3*d}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 40% 55% at 70% 65%,\n\t\t\t\t\t\trgba(0,0,0,${.25*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${4*n.blur}px)`,mixBlendMode:`multiply`,transform:`translateZ(0)`}),S.appendChild(e);let t=document.createElement(`div`);t.className=`nebula-layer`,Object.assign(t.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 55% 50% at 48% 50%,\n\t\t\t\t\t\trgba(255,${p},${m},${.14*d}) 0%,\n\t\t\t\t\t\trgba(255,${p},${m},${.06*d}) 35%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 30% 35% at 30% 35%,\n\t\t\t\t\t\trgba(255,${_},200,${.1*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.03*d}) 50%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 25% 30% at 65% 70%,\n\t\t\t\t\t\trgba(255,${Math.min(255,p+30)},${m},${.08*d}) 0%,\n\t\t\t\t\t\ttransparent 60%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-red ${35e3/n.speed}ms ${We} infinite`}),S.appendChild(t);let r=document.createElement(`div`);r.className=`nebula-layer`,Object.assign(r.style,{position:`absolute`,inset:`-15%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 50% 55% at 52% 50%,\n\t\t\t\t\t\trgba(${h},100,${g},${.12*d}) 0%,\n\t\t\t\t\t\trgba(${h},100,${g},${.05*d}) 35%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 35% 30% at 68% 40%,\n\t\t\t\t\t\trgba(${v},${y},200,${.09*d}) 0%,\n\t\t\t\t\t\trgba(${v},${y},200,${.03*d}) 45%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 28% 25% at 35% 65%,\n\t\t\t\t\t\trgba(${h},100,${Math.min(255,g+20)},${.07*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${18*n.blur}px) saturate(1.4)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-chromatic-blue ${35e3/n.speed}ms ${We} infinite`}),S.appendChild(r);let i=document.createElement(`div`);i.className=`nebula-layer`,Object.assign(i.style,{position:`absolute`,inset:`0`,background:`\n\t\t\t\t\tradial-gradient(ellipse 20% 22% at 50% 50%,\n\t\t\t\t\t\trgba(255,${b},${x},${.18*d}) 0%,\n\t\t\t\t\t\trgba(255,${_},200,${.08*d}) 40%,\n\t\t\t\t\t\trgba(${h},100,${g},${.03*d}) 65%,\n\t\t\t\t\t\ttransparent 80%),\n\t\t\t\t\tradial-gradient(circle 6% at 50% 50%,\n\t\t\t\t\t\trgba(255,255,255,${.25*d}) 0%,\n\t\t\t\t\t\trgba(255,240,245,${.1*d}) 50%,\n\t\t\t\t\t\ttransparent 100%)`,mixBlendMode:`screen`,transform:`translateZ(0)`,transformOrigin:`50% 50%`,filter:`blur(${12*n.blur}px) saturate(1.6)`,animation:`nebula-iridescent ${28e3/n.speed}ms linear infinite`}),S.appendChild(i);let a=document.createElement(`div`);if(a.className=`nebula-layer`,Object.assign(a.style,{position:`absolute`,inset:`-12%`,background:`\n\t\t\t\t\tradial-gradient(ellipse 60% 12% at 50% 48%,\n\t\t\t\t\t\trgba(255,${_},200,${.1*d}) 0%,\n\t\t\t\t\t\ttransparent 70%),\n\t\t\t\t\tradial-gradient(ellipse 12% 55% at 48% 50%,\n\t\t\t\t\t\trgba(${v},${y},200,${.08*d}) 0%,\n\t\t\t\t\t\ttransparent 65%),\n\t\t\t\t\tradial-gradient(ellipse 45% 10% at 45% 35%,\n\t\t\t\t\t\trgba(255,${b},${x},${.07*d}) 0%,\n\t\t\t\t\t\ttransparent 60%),\n\t\t\t\t\tradial-gradient(ellipse 10% 40% at 60% 60%,\n\t\t\t\t\t\trgba(${h},100,${g},${.06*d}) 0%,\n\t\t\t\t\t\ttransparent 55%)`,filter:`blur(${14*n.blur}px)`,mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-tendrils-breathe ${22e3/n.speed}ms ${X} infinite`}),S.appendChild(a),n.particleCount>0){let e=document.createElement(`div`);e.className=`nebula-layer`;let t=[];for(let e=0;e<n.particleCount;e++){let e=5+90*Math.random(),n=5+90*Math.random(),r=.5+2*Math.random(),i=Math.round(360*Math.random()),a=(.3+.5*Math.random())*d;t.push(`radial-gradient(circle ${r}px at ${e}% ${n}%, hsla(${i},80%,70%,${a}) 0%, transparent 100%)`)}Object.assign(e.style,{position:`absolute`,inset:`0`,background:t.join(`,`),mixBlendMode:`screen`,transform:`translateZ(0)`,animation:`nebula-particle-twinkle ${5e3/n.speed}ms ${X} infinite`}),S.appendChild(e)}}e.appendChild(S);let C=r?0:n.fadeInDuration,w=r?`linear`:t._(t.d);S.animate([{opacity:0,transform:`scale(0.85) translateZ(0)`},{opacity:.4*n.intensity,transform:`scale(0.97) translateZ(0)`},{opacity:n.intensity,transform:`scale(1) translateZ(0)`}],{duration:C,easing:w,fill:`forwards`}),this.state={element:e,overlay:S,originalPosition:a,originalOverflow:o,originalContain:s,isDimmed:!1,autoHideSub:null,fadeFinishedSub:null,options:n,reducedMotion:r,isVisible:document.visibilityState===`visible`},this.coordinator.register(this,e)}scheduleAutoHide(e){!this.state||e.autoHideDuration<=0||(this.state.autoHideSub=(0,s.timer)(e.autoHideDuration).pipe((0,c.take)(1),(0,c.tap)(()=>{this.state&&(this.state.autoHideSub=null,this.hide(this.state.options))})).subscribe())}hide(e){if(!this.state?.overlay||(this.state.autoHideSub&&(this.state.autoHideSub.unsubscribe(),this.state.autoHideSub=null),this.state.isDimmed))return;this.state.isDimmed=!0;let n=this.state.overlay,r=this.state.options,i=this.state.reducedMotion,a=i?0:e.fadeOutDuration,o=i?`linear`:t._(t.u);if(e.idleOpacity<=0)return void n.animate([{opacity:r.intensity,transform:`scale(1) translateZ(0)`},{opacity:.4*r.intensity,transform:`scale(0.95) translateZ(0)`},{opacity:0,transform:`scale(0.9) translateZ(0)`}],{duration:a,easing:o,fill:`forwards`});let l=n.animate([{opacity:r.intensity,transform:`scale(1) translateZ(0)`},{opacity:.5*r.intensity,transform:`scale(0.99) translateZ(0)`},{opacity:e.idleOpacity,transform:`scale(1) translateZ(0)`}],{duration:a,easing:o,fill:`forwards`});this.state.fadeFinishedSub?.unsubscribe(),this.state.fadeFinishedSub=(0,s.from)(l.finished).pipe((0,c.take)(1),(0,c.tap)(()=>{this.state?.overlay&&(this.state.overlay.classList.add(`dimmed`),e.idleBreathe&&!i&&(this.state.overlay.style.animation=`nebula-idle-breathe ${12e3/r.speed}ms ${X} infinite`))}),(0,c.catchError)(()=>s.EMPTY)).subscribe()}cleanup(){this.state&&=(this.coordinator.unregister(this,this.state.element),this.state.autoHideSub?.unsubscribe(),this.state.fadeFinishedSub?.unsubscribe(),this.state.overlay?.remove(),this.state.element.style.position=this.state.originalPosition,this.state.element.style.overflow=this.state.originalOverflow,this.state.element.style.contain=this.state.originalContain,null)}disconnected(){this.cleanup()}reconnected(){this.state&&this.coordinator.register(this,this.state.element)}},Je=(0,u.directive)(qe),Ye={smooth:t.d,snappy:t.f,bouncy:t.l,gentle:t.u},Xe=class extends u.AsyncDirective{constructor(e){if(super(e),this.initialized=!1,this.teardown$=new s.Subject,this.firstUpdate=!0,this.prevShow=void 0,e.type!==d.PartType.ELEMENT)throw Error(`reveal() can only be used on elements`)}render(e,t){return l.noChange}update(e,[r=!1,i={}]){let a=e.element,{preset:o=`smooth`,maxHeight:u,duration:d,easing:f}=i,p=u!==void 0,m=Ye[o],h=d??m.duration,g=f??t._(m),_=n.t.value,v=this.firstUpdate;this.firstUpdate=!1;let y=r!==this.prevShow;if(this.prevShow=r,this.initialized||(this.initialized=!0,a.style.transition=_?`none`:[`max-height ${h}ms ${g}`,`opacity ${h}ms ${g}`,`transform ${h}ms ${g}`,`padding ${h}ms ${g}`,`margin ${h}ms ${g}`].join(`, `)),r){if(v)p?(a.style.maxHeight=u,a.style.overflow=`auto`):(a.style.maxHeight=``,a.style.overflow=``),a.style.opacity=`1`,a.style.transform=`translateY(0) scale(1)`;else if(y)if(_)p?(a.style.maxHeight=u,a.style.overflow=`auto`):(a.style.maxHeight=``,a.style.overflow=``),a.style.opacity=`1`,a.style.transform=`translateY(0) scale(1)`;else{a.style.overflow=`hidden`,a.style.maxHeight=`0`,a.offsetHeight;let e=p?u:`${a.scrollHeight}px`;a.style.maxHeight=e,a.style.opacity=`1`,a.style.transform=`translateY(0) scale(1)`,p?(0,s.fromEvent)(a,`transitionend`).pipe((0,c.filter)(e=>e.propertyName===`max-height`&&e.target===a),(0,c.take)(1),(0,c.takeUntil)(this.teardown$)).subscribe(()=>{a.style.overflow=`auto`}):(0,s.fromEvent)(a,`transitionend`).pipe((0,c.filter)(e=>e.propertyName===`max-height`&&e.target===a),(0,c.take)(1),(0,c.takeUntil)(this.teardown$)).subscribe(()=>{a.style.maxHeight=``,a.style.overflow=``})}a.style.pointerEvents=``,a.style.paddingTop=``,a.style.paddingBottom=``,a.style.marginTop=``,a.style.marginBottom=``,a.removeAttribute(`aria-hidden`),a.removeAttribute(`inert`)}else a.style.maxHeight===``||a.style.maxHeight===`none`?(a.style.overflow=`hidden`,a.style.maxHeight=`${a.scrollHeight}px`,a.offsetHeight):a.style.overflow=`hidden`,a.style.maxHeight=`0`,a.style.opacity=`0`,a.style.transform=`translateY(-8px) scale(0.98)`,a.style.pointerEvents=`none`,a.style.paddingTop=`0`,a.style.paddingBottom=`0`,a.style.marginTop=`0`,a.style.marginBottom=`0`,a.setAttribute(`aria-hidden`,`true`),a.setAttribute(`inert`,``);return l.noChange}disconnected(){this.teardown$.next()}reconnected(){}},Ze=(0,u.directive)(Xe),Qe=!1,$e=class extends u.AsyncDirective{constructor(...e){super(...e),this.teardown$=new s.Subject}render(){}update(e){if(e.type!==d.PartType.ELEMENT)throw Error(`ripple directive must be used on an element`);this.element=e.element,function(){if(Qe)return;let e=document.createElement(`style`);e.id=`schmancy-ripple-shared`,e.textContent=`
|
|
311
311
|
.schmancy-ripple-effect {
|
|
312
312
|
position: absolute;
|
|
313
313
|
border-radius: 50%;
|