@mhmo91/schmancy 0.2.130 → 0.2.131

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.
@@ -0,0 +1,59 @@
1
+ "use strict";const C=require("@floating-ui/dom"),O=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const A=require("./litElement.mixin-CfkMd-bR.cjs");require("./tailwind.mixin-CjSVtdHt.cjs");const E=require("./ripple-C2BHbhcS.cjs"),D=require("./theme.interface-Xg5Zi46a.cjs"),$=require("lit"),p=require("lit/decorators.js"),x=require("lit/directives/ref.js"),b=require("rxjs/operators");function I(t,e){if(!t||!e)return 0;if(t===e)return 1;const i=t.toLowerCase().trim(),s=e.toLowerCase().trim();if(i===s)return 1;const r=s.includes(i)?1:0,o=function(u,d){let l=0,n=0;for(;l<u.length&&n<d.length;)u[l]===d[n]&&l++,n++;return l===u.length}(i,s)?.8:0,a=function(u,d){const l=m=>m.split("").reduce((v,g)=>(v[g]=(v[g]||0)+1,v),{}),n=l(u),y=l(d);return Object.keys(n).every(m=>(y[m]||0)>=n[m])}(i,s)?.7:0,w=function(u,d){if(u.length<2||d.length<2)return 0;const l=k(u),n=k(d);let y=0;const m=new Array(n.length).fill(!1);for(const v of l)for(let g=0;g<n.length;g++)if(!m[g]&&n[g]===v){y++,m[g]=!0;break}return 2*y/(l.length+n.length)}(i,s),f=Math.max(i.length,s.length),S=function(u,d){if(u.length===0)return d.length;if(d.length===0)return u.length;const l=[];for(let n=0;n<=d.length;n++)l[n]=[n];for(let n=0;n<=u.length;n++)l[0][n]=n;for(let n=1;n<=d.length;n++)for(let y=1;y<=u.length;y++){const m=u[y-1]===d[n-1]?0:1;l[n][y]=Math.min(l[n-1][y]+1,l[n][y-1]+1,l[n-1][y-1]+m)}return l[d.length][u.length]}(i,s),q=f?1-S/f:0;return Math.max(r,o,a,w,q)}function k(t){const e=[];for(let i=0;i<t.length-1;i++)e.push(t.substring(i,i+2));return e}var V=Object.defineProperty,M=Object.getOwnPropertyDescriptor,c=(t,e,i,s)=>{for(var r,o=s>1?void 0:s?M(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s?r(e,i,o):r(o))||o);return s&&o&&V(e,i,o),o};let h=class extends A.$LitElement(":host{display:block;border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important}:host:focus{box-shadow:unset!important}"){constructor(){super(...arguments),this.required=!1,this.placeholder="",this.value="",this.label="",this.maxHeight="25vh",this.multi=!1,this.description="",this.inputRef=x.createRef(),this.size="md",this.searchTerm$=new O.Subject,this.isOpen=!1,this.autocomplete="on",this.startY=0,this.statusMessage="",this.handleKeyDown=t=>{const e=this.options.filter(s=>!s.hidden);if(!this.isOpen)return void(["Enter","ArrowDown"].includes(t.key)&&(t.preventDefault(),this.showOptions().then(()=>{e.length>0&&this.focusOption(e,0)})));let i=e.findIndex(s=>s.matches(":focus"));switch(i===-1&&(i=0),t.key){case"Escape":t.preventDefault(),this.hideOptions(),this.input.focus();break;case"ArrowDown":t.preventDefault(),this.focusOption(e,Math.min(i+1,e.length-1));break;case"ArrowUp":t.preventDefault(),this.focusOption(e,Math.max(i-1,0));break;case"Home":t.preventDefault(),this.focusOption(e,0);break;case"End":t.preventDefault(),this.focusOption(e,e.length-1);break;case"Enter":if(t.preventDefault(),e[i]){const s=e[i].getAttribute("data-value")||e[i].getAttribute("value");s&&this.handleOptionClick(s)}break;case"Tab":this.hideOptions();break;default:if(t.key.length===1&&/[a-zA-Z0-9]/.test(t.key)){const s=t.key.toLowerCase(),r=e.findIndex(o=>(o.label||o.textContent||"").toLowerCase().startsWith(s));r!==-1&&(t.preventDefault(),this.focusOption(e,r))}}}}connectedCallback(){super.connectedCallback(),this.id||(this.id=`schmancy-autocomplete-${Math.random().toString(36).substr(2,9)}`),O.fromEvent(this,"keydown").pipe(b.takeUntil(this.disconnecting)).subscribe({next:t=>{this.handleKeyDown(t)}}),this.searchTerm$.pipe(b.distinctUntilChanged(),b.tap(t=>{var r;const e=t.trim().toLowerCase(),i=this.options.map(o=>{const a=(o.label||o.textContent||"").toLowerCase();return{option:o,score:I(e,a)}}).filter(({score:o})=>o>.8).sort((o,a)=>o.score-a.score);this.options.forEach(o=>o.hidden=!0);for(const{option:o}of i)o.hidden=!1;this.empty.hidden=i.length>0,this.statusMessage=i.length>0?`${i.length} option${i.length===1?"":"s"} available.`:"No results found.";const s=(r=this.shadowRoot)==null?void 0:r.querySelector("#live-status");s&&(s.textContent=this.statusMessage),this.setupOptionsAccessibility(),this.requestUpdate()}),b.takeUntil(this.disconnecting)).subscribe(()=>{this.showOptions()}),O.fromEvent(this,"focusout").pipe(b.takeUntil(this.disconnecting),b.filter(t=>{const e=t.relatedTarget;return!this.contains(e)&&(e==null?void 0:e.tagName)!=="SCHMANCY-OPTION"}),b.switchMap(()=>{this.options.forEach(e=>e.hidden=!1);const t=this.optionsContainer.animate([{opacity:1},{opacity:0}],{duration:150,easing:"cubic-bezier(0.5, 0.01, 0.25, 1)"});return O.from(new Promise(e=>{t.onfinish=()=>{this.optionsContainer.style.display="none",this.optionsContainer.style.opacity="1",this.isOpen=!1,e()}}))})).subscribe({next:()=>{var t;if(this.multi){const e=this.options.filter(i=>i.selected).map(i=>i.label);this.input.value=e.join(", ")}else this.input.value=((t=this.options.find(e=>e.value===this.value))==null?void 0:t.label)??""}})}firstUpdated(){this.updateInputValue()}updated(t){super.updated(t),t.has("value")&&(this.syncSelectionFromValue(),this.updateInputValue())}handleSlotChange(){this.empty.hidden=this.options.some(t=>!t.hidden),this.syncSelectionFromValue(),this.updateInputValue(),this.setupOptionsAccessibility()}setupOptionsAccessibility(){this.options.forEach((t,e)=>{t.setAttribute("role","option"),t.id||(t.id=`${this.id}-option-${e}`),t.tabIndex=-1,t.setAttribute("aria-selected",String(this.multi?t.selected:t.value===this.value))})}syncSelectionFromValue(){if(this.multi){const t=this.value.split(",").map(e=>e.trim()).filter(Boolean);this.options.forEach(e=>{e.selected=t.includes(e.value)})}else this.options.forEach(t=>{t.selected=t.value===this.value})}updateInputValue(){requestAnimationFrame(()=>{var t;if(this.multi){const e=this.options.filter(i=>i.selected).map(i=>i.label);this.input.value=e.join(", ")}else{const e=(t=this.options.find(i=>i.value===this.value))==null?void 0:t.label;this.input.value=e??""}})}async showOptions(){if(!this.optionsContainer)return;this.optionsContainer.removeAttribute("hidden"),this.optionsContainer.style.display="block",this.isOpen=!0;const{x:t,y:e}=await C.computePosition(this.input,this.optionsContainer,{placement:"bottom-start",middleware:[C.offset(5),C.shift({padding:5}),C.size({apply({availableWidth:i,availableHeight:s,elements:r,rects:o}){const a=o.reference.width;r.floating.style.minWidth=`${a}px`,r.floating.style.maxWidth=`${i}px`,r.floating.style.maxHeight=`${s}px`}})]});Object.assign(this.optionsContainer.style,{left:`${t}px`,top:`${e}px`,position:"absolute",zIndex:"9999",overflowY:"auto"})}hideOptions(){var e,i;(e=this.optionsContainer)==null||e.setAttribute("hidden","true"),this.optionsContainer&&(this.optionsContainer.style.display="none"),this.isOpen=!1;const t=(i=this.shadowRoot)==null?void 0:i.querySelector("#live-status");t&&(t.textContent="Dropdown closed.")}handleInputChange(t){t.preventDefault(),t.stopPropagation();const e=t.detail.value;this.searchTerm$.next(e)}handleOptionClick(t){var e,i;if(this.multi){const s=this.options.find(f=>f.value===t);s&&(s.selected=!s.selected);const r=this.options.filter(f=>f.selected).map(f=>f.value);this.value=r.join(","),this.updateInputValue();const o=this.options.filter(f=>f.selected).map(f=>f.label),a=o.length>0?`Selected: ${o.join(", ")}`:"No options selected",w=(e=this.shadowRoot)==null?void 0:e.querySelector("#live-status");w&&(w.textContent=a),this.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0,composed:!0}))}else{const s=this.options.find(a=>a.value===t),r=(s==null?void 0:s.label)||"";this.hideOptions(),this.value=t,this.updateInputValue();const o=(i=this.shadowRoot)==null?void 0:i.querySelector("#live-status");o&&(o.textContent=`Selected: ${r}`),this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}}checkValidity(){return this.multi?this.options.some(t=>t.selected):!!this.value}reportValidity(){var t;return(t=this.inputRef.value)==null?void 0:t.reportValidity()}handleTouchStart(t){var e,i;this.startY=((i=(e=t.touches)==null?void 0:e[0])==null?void 0:i.clientY)??0}preventScroll(t){var o,a;const e=t.target;if(!this.optionsContainer.contains(e))return;const i=this.optionsContainer.scrollTop,s=this.optionsContainer.scrollHeight-this.optionsContainer.offsetHeight,r=((a=(o=t.touches)==null?void 0:o[0])==null?void 0:a.clientY)??0;(i<=0&&r>this.startY||i>=s&&r<this.startY)&&t.preventDefault()}focusOption(t,e){if(!t.length)return;const i=t[e];i&&(i.focus(),this.input.setAttribute("aria-activedescendant",i.id),i.scrollIntoView&&i.scrollIntoView({block:"nearest"}))}render(){const t=`${this.id}-desc`;return $.html`
2
+ <div class="relative">
3
+ <!-- Live region for screen reader announcements -->
4
+ <div id="live-status" role="status" aria-live="polite" class="sr-only"></div>
5
+
6
+ <!-- Optional description for the autocomplete -->
7
+ ${this.description?$.html`<div id="${t}" class="sr-only">${this.description}</div>`:""}
8
+
9
+ <!-- The trigger slot (if any) overrides the default SchmancyInput -->
10
+ <slot name="trigger">
11
+ <sch-input
12
+ .size=${this.size}
13
+ .autocomplete=${this.autocomplete}
14
+ ${x.ref(this.inputRef)}
15
+ id="input"
16
+ class="w-full"
17
+ .label=${this.label}
18
+ .placeholder=${this.placeholder}
19
+ .required=${this.required}
20
+ type="search"
21
+ inputmode="text"
22
+ autocomplete="off"
23
+ clickable
24
+ role="combobox"
25
+ aria-autocomplete="list"
26
+ aria-haspopup="listbox"
27
+ aria-controls="options"
28
+ aria-expanded=${this.isOpen}
29
+ aria-describedby=${this.description?t:void 0}
30
+ @focus=${()=>this.showOptions()}
31
+ @change=${this.handleInputChange}
32
+ >
33
+ </sch-input>
34
+ </slot>
35
+
36
+ <ul
37
+ id="options"
38
+ tabindex="-1"
39
+ class="absolute z-30 mt-1 w-full overflow-auto rounded-md shadow-sm"
40
+ role="listbox"
41
+ aria-multiselectable=${this.multi?"true":"false"}
42
+ aria-label=${`${this.label||"Options"} dropdown`}
43
+ hidden
44
+ @click=${e=>{var s;const i=(s=e.detail)==null?void 0:s.value;i&&this.handleOptionClick(i)}}
45
+ @touchstart=${this.handleTouchStart}
46
+ @touchmove=${this.preventScroll}
47
+ ${E.color({bgColor:D.SchmancyTheme.sys.color.surface.container})}
48
+ @slotchange=${this.handleSlotChange}
49
+ >
50
+ <!-- "No results" option -->
51
+ <li id="empty" tabindex="-1" role="option" aria-disabled="true" class="p-2 text-center">
52
+ <schmancy-typography type="label">No results found</schmancy-typography>
53
+ </li>
54
+ <!-- Slot for the <schmancy-option> elements -->
55
+ <slot></slot>
56
+ </ul>
57
+ </div>
58
+ `}};c([p.property({type:Boolean})],h.prototype,"required",2),c([p.property({type:String})],h.prototype,"placeholder",2),c([p.property({type:String,reflect:!0})],h.prototype,"value",2),c([p.property({type:String,reflect:!0})],h.prototype,"label",2),c([p.property({type:String})],h.prototype,"maxHeight",2),c([p.property({type:Boolean})],h.prototype,"multi",2),c([p.property({type:String})],h.prototype,"description",2),c([p.query("#options")],h.prototype,"optionsContainer",2),c([p.query("#empty")],h.prototype,"empty",2),c([p.query("sch-input")],h.prototype,"input",2),c([p.queryAssignedElements({flatten:!0})],h.prototype,"options",2),c([p.property({type:String,reflect:!0})],h.prototype,"size",2),c([p.property({type:Boolean,reflect:!0})],h.prototype,"isOpen",2),c([p.property({type:String,reflect:!0})],h.prototype,"autocomplete",2),c([p.eventOptions({passive:!0})],h.prototype,"handleOptionClick",1),h=c([p.customElement("schmancy-autocomplete")],h);
59
+ //# sourceMappingURL=autocomplete-ChDCoDb2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete-ChDCoDb2.cjs","sources":["../src/utils/search.ts","../src/autocomplete/autocomplete.ts"],"sourcesContent":["/**\n * Calculate similarity score between two strings.\n * Returns a value between 0 (no match) and 1 (exact match).\n * Includes all similarity methods from the original filter directive.\n *\n * @param query The search query string\n * @param target The target string to compare against\n * @returns A similarity score from 0 to 1\n */\nexport function similarity(query: string, target: string): number {\n\t// Handle edge cases\n\tif (!query || !target) return 0\n\tif (query === target) return 1\n\n\t// Normalize strings for comparison\n\tconst normalizedQuery = query.toLowerCase().trim()\n\tconst normalizedTarget = target.toLowerCase().trim()\n\n\t// Simple exact match check\n\tif (normalizedQuery === normalizedTarget) return 1\n\n\t// Calculate different similarity metrics using all methods from the original filter\n\n\t// 1. Direct substring match\n\tconst substringScore = normalizedTarget.includes(normalizedQuery) ? 1 : 0\n\n\t// 2. Subsequence check\n\tconst subsequenceScore = isSubsequence(normalizedQuery, normalizedTarget) ? 0.8 : 0\n\n\t// 3. Anagram/character frequency match\n\tconst anagramScore = hasAllCharacters(normalizedQuery, normalizedTarget) ? 0.7 : 0\n\n\t// 4. Dice coefficient based on bigrams\n\tconst diceScore = diceCoefficient(normalizedQuery, normalizedTarget)\n\n\t// 5. Levenshtein distance\n\tconst maxLength = Math.max(normalizedQuery.length, normalizedTarget.length)\n\tconst levenshteinDistance = calculateLevenshtein(normalizedQuery, normalizedTarget)\n\tconst levenshteinScore = maxLength ? 1 - levenshteinDistance / maxLength : 0\n\n\t// Return the maximum score from all methods\n\treturn Math.max(substringScore, subsequenceScore, anagramScore, diceScore, levenshteinScore)\n}\n\n/**\n * Check if string 'sub' is a subsequence of string 'str'.\n * All characters in 'sub' must appear in order in 'str'.\n */\nfunction isSubsequence(sub: string, str: string): boolean {\n\tlet i = 0,\n\t\tj = 0\n\twhile (i < sub.length && j < str.length) {\n\t\tif (sub[i] === str[j]) i++\n\t\tj++\n\t}\n\treturn i === sub.length\n}\n\n/**\n * Check if all characters in 'query' are present in 'target'.\n * For example, \"aovc\" matches \"avocados\" (anagram subset matching).\n */\nfunction hasAllCharacters(query: string, target: string): boolean {\n\tconst countChars = (s: string): Record<string, number> => {\n\t\treturn s.split('').reduce(\n\t\t\t(acc, char) => {\n\t\t\t\tacc[char] = (acc[char] || 0) + 1\n\t\t\t\treturn acc\n\t\t\t},\n\t\t\t{} as Record<string, number>,\n\t\t)\n\t}\n\n\tconst queryCount = countChars(query)\n\tconst targetCount = countChars(target)\n\n\treturn Object.keys(queryCount).every(char => (targetCount[char] || 0) >= queryCount[char])\n}\n\n/**\n * Generate bigrams for a string.\n * A bigram is a sequence of two adjacent characters.\n */\nfunction getBigrams(s: string): string[] {\n\tconst bigrams = []\n\tfor (let i = 0; i < s.length - 1; i++) {\n\t\tbigrams.push(s.substring(i, i + 2))\n\t}\n\treturn bigrams\n}\n\n/**\n * Compute Dice's coefficient for two strings based on bigrams.\n * Returns a value between 0 (no similarity) and 1 (perfect match).\n */\nfunction diceCoefficient(s1: string, s2: string): number {\n\tif (s1.length < 2 || s2.length < 2) return 0\n\n\tconst bigrams1 = getBigrams(s1)\n\tconst bigrams2 = getBigrams(s2)\n\n\tlet intersection = 0\n\tconst used = new Array(bigrams2.length).fill(false)\n\n\tfor (const bigram of bigrams1) {\n\t\tfor (let i = 0; i < bigrams2.length; i++) {\n\t\t\tif (!used[i] && bigrams2[i] === bigram) {\n\t\t\t\tintersection++\n\t\t\t\tused[i] = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (2 * intersection) / (bigrams1.length + bigrams2.length)\n}\n\n/**\n * Calculate Levenshtein distance between two strings.\n */\nfunction calculateLevenshtein(a: string, b: string): number {\n\tif (a.length === 0) return b.length\n\tif (b.length === 0) return a.length\n\n\tconst matrix: number[][] = []\n\n\t// Initialize the matrix\n\tfor (let i = 0; i <= b.length; i++) {\n\t\tmatrix[i] = [i]\n\t}\n\tfor (let j = 0; j <= a.length; j++) {\n\t\tmatrix[0][j] = j\n\t}\n\n\t// Calculate distances\n\tfor (let i = 1; i <= b.length; i++) {\n\t\tfor (let j = 1; j <= a.length; j++) {\n\t\t\tconst cost = a[j - 1] === b[i - 1] ? 0 : 1\n\t\t\tmatrix[i][j] = Math.min(\n\t\t\t\tmatrix[i - 1][j] + 1, // deletion\n\t\t\t\tmatrix[i][j - 1] + 1, // insertion\n\t\t\t\tmatrix[i - 1][j - 1] + cost, // substitution\n\t\t\t)\n\t\t}\n\t}\n\n\treturn matrix[b.length][a.length]\n}\n","import { computePosition, offset, shift, size } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport SchmancyInput from '@schmancy/input/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { html } from 'lit'\nimport { customElement, eventOptions, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { from, fromEvent, Subject } from 'rxjs'\nimport { distinctUntilChanged, filter, switchMap, takeUntil, tap } from 'rxjs/operators'\nimport style from './autocomplete.scss?inline'\n\nimport { InputSize } from '@schmancy/input'\nimport type { SchmancyInputInputEvent } from '@schmancy/input/input'\nimport { similarity } from '@schmancy/utils/search'\n\nexport type SchmancyAutocompleteChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n/**\n * The SchmancyAutocomplete component provides an accessible autocomplete field with keyboard navigation.\n * @element schmancy-autocomplete\n * @fires change - Emitted when a selection is made\n * @slot - Default slot for schmancy-option elements\n * @slot trigger - Optional slot to override the default input\n */\n@customElement('schmancy-autocomplete')\nexport default class SchmancyAutocomplete extends $LitElement(style) {\n\t// Public API properties\n\t@property({ type: Boolean }) required = false\n\t@property({ type: String }) placeholder = ''\n\t@property({ type: String, reflect: true }) value = ''\n\t@property({ type: String, reflect: true }) label = ''\n\t@property({ type: String }) maxHeight = '25vh'\n\t@property({ type: Boolean }) multi = false\n\n\t/**\n\t * Optional description for the autocomplete to improve accessibility.\n\t * Will be associated with the input via aria-describedby.\n\t */\n\t@property({ type: String }) description = ''\n\n\t/** Direct reference to the <input> inside <sch-input> */\n\tinputRef = createRef<HTMLInputElement>()\n\n\t// Query selectors for elements in the shadow DOM\n\t@query('#options') private optionsContainer!: HTMLUListElement\n\t@query('#empty') private empty!: HTMLLIElement\n\t@query('sch-input') private input!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\n\t/**\n\t * The size of the input.\n\t * - 'sm': Small, compact size\n\t * - 'md': Medium size (default)\n\t * - 'lg': Large size\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic size: InputSize = 'md'\n\n\t// Subject for search term changes\n\tprivate readonly searchTerm$ = new Subject<string>()\n\n\t// Flag to track dropdown state\n\t@property({ type: Boolean, reflect: true }) isOpen = false\n\n\t/** Autocomplete/autofill hints. */\n\t@property({ type: String, reflect: true })\n\tpublic autocomplete: AutoFill = 'on'\n\n\t// iOS scroll-blocking logic\n\tprivate startY = 0\n\n\t// Store status message for screen readers\n\tprivate statusMessage = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the component has an ID (used for generating option IDs)\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-autocomplete-${Math.random().toString(36).substr(2, 9)}`\n\t\t}\n\n\t\t// Listen for keydown events on the input to enable keyboard navigation\n\t\tfromEvent(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe({\n\t\t\t\tnext: (e: KeyboardEvent) => {\n\t\t\t\t\tthis.handleKeyDown(e)\n\t\t\t\t},\n\t\t\t})\n\n\t\t// Search filtering logic\n\t\tthis.searchTerm$\n\t\t\t.pipe(\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(term => {\n\t\t\t\t\tconst searchTerm = term.trim().toLowerCase()\n\n\t\t\t\t\t// Filter options using Levenshtein distance\n\t\t\t\t\tconst matches = this.options\n\t\t\t\t\t\t.map(option => {\n\t\t\t\t\t\t\tconst optionText = (option.label || option.textContent || '').toLowerCase()\n\t\t\t\t\t\t\tconst score = similarity(searchTerm, optionText)\n\t\t\t\t\t\t\treturn { option, score }\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.filter(({ score }) => {\n\t\t\t\t\t\t\t// For short search terms, be lenient\n\t\t\t\t\t\t\treturn score > 0.8\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.sort((a, b) => a.score - b.score)\n\n\t\t\t\t\t// Show/hide options based on filtering\n\t\t\t\t\tthis.options.forEach(o => (o.hidden = true))\n\t\t\t\t\tfor (const { option } of matches) {\n\t\t\t\t\t\toption.hidden = false\n\t\t\t\t\t}\n\n\t\t\t\t\t// \"No results found\"\n\t\t\t\t\tthis.empty.hidden = matches.length > 0\n\n\t\t\t\t\t// Update status message for screen readers\n\t\t\t\t\tthis.statusMessage =\n\t\t\t\t\t\tmatches.length > 0\n\t\t\t\t\t\t\t? `${matches.length} option${matches.length === 1 ? '' : 's'} available.`\n\t\t\t\t\t\t\t: 'No results found.'\n\n\t\t\t\t\t// Update the live region to announce the results\n\t\t\t\t\tconst liveRegion = this.shadowRoot?.querySelector('#live-status')\n\t\t\t\t\tif (liveRegion) {\n\t\t\t\t\t\tliveRegion.textContent = this.statusMessage\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update accessibility attributes on options\n\t\t\t\t\tthis.setupOptionsAccessibility()\n\n\t\t\t\t\tthis.requestUpdate()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\t// Show dropdown on each new search term\n\t\t\t\tthis.showOptions()\n\t\t\t})\n\n\t\t// Focus-out animation (fade out)\n\t\tfromEvent<FocusEvent>(this, 'focusout')\n\t\t\t.pipe(\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tfilter(e => {\n\t\t\t\t\t// Don't close if focus moved to an option\n\t\t\t\t\tconst relatedTarget = e.relatedTarget as Element\n\t\t\t\t\treturn !this.contains(relatedTarget) && relatedTarget?.tagName !== 'SCHMANCY-OPTION'\n\t\t\t\t}),\n\t\t\t\tswitchMap(() => {\n\t\t\t\t\t// reset options to show all\n\t\t\t\t\tthis.options.forEach(o => (o.hidden = false))\n\t\t\t\t\tconst animation = this.optionsContainer.animate([{ opacity: 1 }, { opacity: 0 }], {\n\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t\t\t})\n\t\t\t\t\treturn from(\n\t\t\t\t\t\tnew Promise<void>(resolve => {\n\t\t\t\t\t\t\tanimation.onfinish = () => {\n\t\t\t\t\t\t\t\tthis.optionsContainer.style.display = 'none'\n\t\t\t\t\t\t\t\tthis.optionsContainer.style.opacity = '1'\n\t\t\t\t\t\t\t\tthis.isOpen = false\n\t\t\t\t\t\t\t\tresolve()\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\t.subscribe({\n\t\t\t\tnext: () => {\n\t\t\t\t\t// After closing, resync the input's value\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\tconst selected = this.options.filter(o => o.selected).map(o => o.label)\n\t\t\t\t\t\tthis.input.value = selected.join(', ')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.input.value = this.options.find(o => o.value === this.value)?.label ?? ''\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t})\n\t}\n\n\tfirstUpdated() {\n\t\tthis.updateInputValue()\n\t}\n\n\tprotected updated(changedProps: Map<string | number | symbol, unknown>) {\n\t\tsuper.updated(changedProps)\n\t\tif (changedProps.has('value')) {\n\t\t\tthis.syncSelectionFromValue()\n\t\t\tthis.updateInputValue()\n\t\t}\n\t}\n\n\t/**\n\t * When the <slot> changes (i.e. options are added/removed), update the following:\n\t * 1. Show or hide the \"No results found\" option.\n\t * 2. Sync the selection state.\n\t * 3. Setup accessibility attributes on the options.\n\t */\n\tprivate handleSlotChange() {\n\t\tthis.empty.hidden = this.options.some(option => !option.hidden)\n\t\tthis.syncSelectionFromValue()\n\t\tthis.updateInputValue()\n\t\tthis.setupOptionsAccessibility()\n\t}\n\n\t/**\n\t * Loops through assigned options and sets accessibility attributes:\n\t * - role=\"option\"\n\t * - A unique ID (if not already set)\n\t * - tabindex=\"-1\"\n\t * - aria-selected (based on whether the option is selected)\n\t */\n\tprivate setupOptionsAccessibility() {\n\t\tthis.options.forEach((option, index) => {\n\t\t\toption.setAttribute('role', 'option')\n\t\t\tif (!option.id) {\n\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t}\n\t\t\toption.tabIndex = -1\n\t\t\toption.setAttribute('aria-selected', String(this.multi ? option.selected : option.value === this.value))\n\t\t})\n\t}\n\n\tprivate syncSelectionFromValue() {\n\t\tif (this.multi) {\n\t\t\tconst values = this.value\n\t\t\t\t.split(',')\n\t\t\t\t.map(v => v.trim())\n\t\t\t\t.filter(Boolean)\n\t\t\tthis.options.forEach(o => {\n\t\t\t\to.selected = values.includes(o.value)\n\t\t\t})\n\t\t} else {\n\t\t\tthis.options.forEach(o => {\n\t\t\t\to.selected = o.value === this.value\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate updateInputValue() {\n\t\trequestAnimationFrame(() => {\n\t\t\tif (this.multi) {\n\t\t\t\tconst selected = this.options.filter(o => o.selected).map(o => o.label)\n\t\t\t\tthis.input.value = selected.join(', ')\n\t\t\t} else {\n\t\t\t\tconst found = this.options.find(o => o.value === this.value)?.label\n\t\t\t\tthis.input.value = found ?? ''\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * MAIN: Show the dropdown. Uses Floating UI to position and size the options container.\n\t */\n\tprivate async showOptions() {\n\t\tif (!this.optionsContainer) return\n\n\t\tthis.optionsContainer.removeAttribute('hidden')\n\t\tthis.optionsContainer.style.display = 'block'\n\t\tthis.isOpen = true\n\n\t\tconst { x, y } = await computePosition(this.input, this.optionsContainer, {\n\t\t\tplacement: 'bottom-start',\n\t\t\tmiddleware: [\n\t\t\t\toffset(5),\n\t\t\t\tshift({ padding: 5 }),\n\t\t\t\tsize({\n\t\t\t\t\tapply({ availableWidth, availableHeight, elements, rects }) {\n\t\t\t\t\t\t// At least match input width\n\t\t\t\t\t\tconst referenceWidth = rects.reference.width\n\t\t\t\t\t\telements.floating.style.minWidth = `${referenceWidth}px`\n\t\t\t\t\t\t// Cap to available viewport space\n\t\t\t\t\t\telements.floating.style.maxWidth = `${availableWidth}px`\n\t\t\t\t\t\telements.floating.style.maxHeight = `${availableHeight}px`\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t],\n\t\t})\n\n\t\tObject.assign(this.optionsContainer.style, {\n\t\t\tleft: `${x}px`,\n\t\t\ttop: `${y}px`,\n\t\t\tposition: 'absolute',\n\t\t\tzIndex: '9999',\n\t\t\toverflowY: 'auto',\n\t\t})\n\t}\n\n\tprivate hideOptions() {\n\t\tthis.optionsContainer?.setAttribute('hidden', 'true')\n\t\tif (this.optionsContainer) {\n\t\t\tthis.optionsContainer.style.display = 'none'\n\t\t}\n\t\tthis.isOpen = false\n\n\t\t// Announce that the dropdown is closed to screen readers\n\t\tconst liveRegion = this.shadowRoot?.querySelector('#live-status')\n\t\tif (liveRegion) {\n\t\t\tliveRegion.textContent = 'Dropdown closed.'\n\t\t}\n\t}\n\n\tprivate handleInputChange(event: SchmancyInputInputEvent) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tconst term = event.detail.value\n\t\tthis.searchTerm$.next(term)\n\t}\n\n\t@eventOptions({ passive: true })\n\tprivate handleOptionClick(value: string) {\n\t\tif (this.multi) {\n\t\t\tconst option = this.options.find(o => o.value === value)\n\t\t\tif (option) option.selected = !option.selected\n\t\t\tconst selectedValues = this.options.filter(o => o.selected).map(o => o.value)\n\t\t\tthis.value = selectedValues.join(',')\n\t\t\tthis.updateInputValue()\n\n\t\t\t// Announce selection to screen readers\n\t\t\tconst selectedLabels = this.options.filter(o => o.selected).map(o => o.label)\n\t\t\tconst announcement = selectedLabels.length > 0 ? `Selected: ${selectedLabels.join(', ')}` : 'No options selected'\n\n\t\t\tconst liveRegion = this.shadowRoot?.querySelector('#live-status')\n\t\t\tif (liveRegion) {\n\t\t\t\tliveRegion.textContent = announcement\n\t\t\t}\n\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n\t\t\t\t\tdetail: { value: selectedValues },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t} else {\n\t\t\tconst selectedOption = this.options.find(o => o.value === value)\n\t\t\tconst selectedLabel = selectedOption?.label || ''\n\n\t\t\tthis.hideOptions()\n\t\t\tthis.value = value\n\t\t\tthis.updateInputValue()\n\n\t\t\t// Announce selection to screen readers\n\t\t\tconst liveRegion = this.shadowRoot?.querySelector('#live-status')\n\t\t\tif (liveRegion) {\n\t\t\t\tliveRegion.textContent = `Selected: ${selectedLabel}`\n\t\t\t}\n\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n\t\t\t\t\tdetail: { value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\t}\n\n\tpublic checkValidity() {\n\t\treturn this.multi ? this.options.some(o => o.selected) : Boolean(this.value)\n\t}\n\n\tpublic reportValidity() {\n\t\treturn this.inputRef.value?.reportValidity()\n\t}\n\n\tprivate handleTouchStart(event: TouchEvent) {\n\t\tthis.startY = event.touches?.[0]?.clientY ?? 0\n\t}\n\n\tprivate preventScroll(event: TouchEvent) {\n\t\tconst target = event.target as HTMLElement\n\t\tif (!this.optionsContainer.contains(target)) return\n\n\t\tconst scrollTop = this.optionsContainer.scrollTop\n\t\tconst scrollHeight = this.optionsContainer.scrollHeight\n\t\tconst offsetHeight = this.optionsContainer.offsetHeight\n\t\tconst contentHeight = scrollHeight - offsetHeight\n\n\t\tconst currentY = event.touches?.[0]?.clientY ?? 0\n\t\tif ((scrollTop <= 0 && currentY > this.startY) || (scrollTop >= contentHeight && currentY < this.startY)) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\n\t/**\n\t * Keyboard navigation for the autocomplete.\n\t * – When the dropdown is closed, ArrowDown (or Enter/Space) opens it.\n\t * – When open, ArrowDown/ArrowUp move focus between options (which must have role=\"option\").\n\t * – Enter or Space selects the active option.\n\t * – Escape (or Tab) hides the dropdown.\n\t * - Home/End to navigate to first/last option\n\t */\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\t// Get the visible options (i.e. those not hidden)\n\t\tconst options = this.options.filter(o => !o.hidden)\n\n\t\t// If the dropdown is closed, open it on Enter, Space, or ArrowDown\n\t\tif (!this.isOpen) {\n\t\t\tif (['Enter', 'ArrowDown'].includes(e.key)) {\n\t\t\t\t// Removed ' ' (space) here\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.showOptions().then(() => {\n\t\t\t\t\tif (options.length > 0) {\n\t\t\t\t\t\tthis.focusOption(options, 0)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// Dropdown is open; determine the currently focused option\n\t\tlet currentIndex = options.findIndex(o => o.matches(':focus'))\n\t\tif (currentIndex === -1) {\n\t\t\t// If no option is focused, default to the first\n\t\t\tcurrentIndex = 0\n\t\t}\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.hideOptions()\n\t\t\t\tthis.input.focus()\n\t\t\t\tbreak\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.min(currentIndex + 1, options.length - 1))\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.max(currentIndex - 1, 0))\n\t\t\t\tbreak\n\t\t\tcase 'Home':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, 0)\n\t\t\t\tbreak\n\t\t\tcase 'End':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, options.length - 1)\n\t\t\t\tbreak\n\t\t\tcase 'Enter': // Removed ' ' (space) case here\n\t\t\t\te.preventDefault()\n\t\t\t\tif (options[currentIndex]) {\n\t\t\t\t\tconst value = options[currentIndex].getAttribute('data-value') || options[currentIndex].getAttribute('value')\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\tthis.handleOptionClick(value)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\tcase 'Tab':\n\t\t\t\t// Close the dropdown on Tab\n\t\t\t\tthis.hideOptions()\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\t// For letter key presses, find and focus the first option that starts with that letter\n\t\t\t\tif (e.key.length === 1 && /[a-zA-Z0-9]/.test(e.key)) {\n\t\t\t\t\tconst searchKey = e.key.toLowerCase()\n\t\t\t\t\tconst matchIndex = options.findIndex(option =>\n\t\t\t\t\t\t(option.label || option.textContent || '').toLowerCase().startsWith(searchKey),\n\t\t\t\t\t)\n\n\t\t\t\t\tif (matchIndex !== -1) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.focusOption(options, matchIndex)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * Helper to focus an option by index and update the combobox's aria-activedescendant.\n\t */\n\tprivate focusOption(options: HTMLElement[], index: number) {\n\t\tif (!options.length) return\n\n\t\tconst option = options[index]\n\t\tif (option) {\n\t\t\toption.focus()\n\t\t\t// Update the input's aria-activedescendant to match the newly focused option\n\t\t\tthis.input.setAttribute('aria-activedescendant', option.id)\n\n\t\t\t// Ensure the focused option is visible in the dropdown (scroll if needed)\n\t\t\tif (option.scrollIntoView) {\n\t\t\t\toption.scrollIntoView({ block: 'nearest' })\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\t// Create a unique ID for the description\n\t\tconst descriptionId = `${this.id}-desc`\n\n\t\treturn html`\n\t\t\t<div class=\"relative\">\n\t\t\t\t<!-- Live region for screen reader announcements -->\n\t\t\t\t<div id=\"live-status\" role=\"status\" aria-live=\"polite\" class=\"sr-only\"></div>\n\n\t\t\t\t<!-- Optional description for the autocomplete -->\n\t\t\t\t${this.description ? html`<div id=\"${descriptionId}\" class=\"sr-only\">${this.description}</div>` : ''}\n\n\t\t\t\t<!-- The trigger slot (if any) overrides the default SchmancyInput -->\n\t\t\t\t<slot name=\"trigger\">\n\t\t\t\t\t<sch-input\n\t\t\t\t\t\t.size=${this.size}\n\t\t\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t\t\t${ref(this.inputRef)}\n\t\t\t\t\t\tid=\"input\"\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t\ttype=\"search\"\n\t\t\t\t\t\tinputmode=\"text\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\tclickable\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\t\taria-describedby=${this.description ? descriptionId : undefined}\n\t\t\t\t\t\t@focus=${() => this.showOptions()}\n\t\t\t\t\t\t@change=${this.handleInputChange}\n\t\t\t\t\t>\n\t\t\t\t\t</sch-input>\n\t\t\t\t</slot>\n\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tclass=\"absolute z-30 mt-1 w-full overflow-auto rounded-md shadow-sm\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\taria-multiselectable=${this.multi ? 'true' : 'false'}\n\t\t\t\t\taria-label=${`${this.label || 'Options'} dropdown`}\n\t\t\t\t\thidden\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t// Each <schmancy-option> should dispatch a CustomEvent('click', { detail: { value } })\n\t\t\t\t\t\tconst detailVal = (e as CustomEvent).detail?.value\n\t\t\t\t\t\tif (detailVal) this.handleOptionClick(detailVal)\n\t\t\t\t\t}}\n\t\t\t\t\t@touchstart=${this.handleTouchStart}\n\t\t\t\t\t@touchmove=${this.preventScroll}\n\t\t\t\t\t${color({ bgColor: SchmancyTheme.sys.color.surface.container })}\n\t\t\t\t\t@slotchange=${this.handleSlotChange}\n\t\t\t\t>\n\t\t\t\t\t<!-- \"No results\" option -->\n\t\t\t\t\t<li id=\"empty\" tabindex=\"-1\" role=\"option\" aria-disabled=\"true\" class=\"p-2 text-center\">\n\t\t\t\t\t\t<schmancy-typography type=\"label\">No results found</schmancy-typography>\n\t\t\t\t\t</li>\n\t\t\t\t\t<!-- Slot for the <schmancy-option> elements -->\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-autocomplete': SchmancyAutocomplete\n\t}\n}\n"],"names":["similarity","query","target","normalizedQuery","toLowerCase","trim","normalizedTarget","substringScore","includes","subsequenceScore","sub","str","i","j","length","anagramScore","countChars","s","split","reduce","acc","char","queryCount","targetCount","Object","keys","every","diceScore","s1","s2","bigrams1","getBigrams","bigrams2","intersection","used","Array","fill","bigram","maxLength","Math","max","levenshteinDistance","a","b","matrix","cost","min","levenshteinScore","bigrams","push","substring","SchmancyAutocomplete","$LitElement","super","arguments","this","required","placeholder","value","label","maxHeight","multi","description","inputRef","createRef","size","searchTerm$","Subject","isOpen","autocomplete","startY","statusMessage","handleKeyDown","e","options","filter","o","hidden","key","preventDefault","showOptions","then","focusOption","currentIndex","findIndex","matches","hideOptions","input","focus","getAttribute","handleOptionClick","test","searchKey","matchIndex","option","textContent","startsWith","connectedCallback","id","random","toString","substr","fromEvent","pipe","takeUntil","disconnecting","subscribe","next","distinctUntilChanged","tap","term","searchTerm","map","optionText","score","sort","forEach","empty","liveRegion","shadowRoot","querySelector","setupOptionsAccessibility","requestUpdate","relatedTarget","contains","tagName","switchMap","animation","optionsContainer","animate","opacity","duration","easing","from","Promise","resolve","onfinish","style","display","selected","join","find","updateInputValue","changedProps","updated","has","syncSelectionFromValue","handleSlotChange","some","index","setAttribute","tabIndex","String","values","v","Boolean","requestAnimationFrame","found","removeAttribute","x","y","computePosition","placement","middleware","offset","shift","padding","availableWidth","availableHeight","elements","rects","referenceWidth","reference","width","floating","minWidth","maxWidth","assign","left","top","position","zIndex","overflowY","event","stopPropagation","detail","selectedValues","selectedLabels","announcement","dispatchEvent","CustomEvent","bubbles","composed","selectedOption","selectedLabel","reportValidity","touches","clientY","scrollTop","contentHeight","scrollHeight","offsetHeight","currentY","scrollIntoView","block","render","descriptionId","html","ref","handleInputChange","detailVal","handleTouchStart","preventScroll","color","bgColor","SchmancyTheme","sys","surface","container","__decorateClass","property","type","prototype","reflect","queryAssignedElements","flatten","eventOptions","passive","customElement"],"mappings":"+aASgB,EAAA,SAAAA,EAAWC,EAAeC,EAAAA,CAEzC,IAAKD,GAAUC,CAAAA,EAAe,MAAA,GAC1B,GAAAD,IAAUC,EAAe,MAAA,GAG7B,MAAMC,EAAkBF,EAAMG,YAAAA,EAAcC,OACtCC,EAAmBJ,EAAOE,cAAcC,KAG1C,EAAA,GAAAF,IAAoBG,EAAyB,MAAA,GAKjD,MAAMC,EAAiBD,EAAiBE,SAASL,GAAmB,EAAI,EAGlEM,EAqBP,SAAuBC,EAAaC,GAC/B,IAAAC,EAAI,EACPC,EAAI,EACL,KAAOD,EAAIF,EAAII,QAAUD,EAAIF,EAAIG,QAC5BJ,EAAIE,CAAAA,IAAOD,EAAIE,CAAAA,GAAID,IACvBC,IAED,OAAOD,IAAMF,EAAII,MAClB,EA7BwCX,EAAiBG,GAAoB,GAAM,EAG5ES,EAgCP,SAA0Bd,EAAeC,GAClC,MAAAc,EAAcC,GACZA,EAAEC,MAAM,E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
  import { c as j } from "./ripple-BumgqsDT.js";
8
- import { S as T } from "./theme.interface-C5Kj6WjD.js";
9
- import { html as x } from "lit";
10
- import { property as y, query as w, queryAssignedElements as H, eventOptions as R, customElement as Y } from "lit/decorators.js";
11
- import { createRef as L, ref as N } from "lit/directives/ref.js";
12
- import { takeUntil as C, distinctUntilChanged as z, tap as P, filter as B, switchMap as U } from "rxjs/operators";
8
+ import { S as z } from "./theme.interface-C5Kj6WjD.js";
9
+ import { html as $ } from "lit";
10
+ import { property as m, query as w, queryAssignedElements as T, eventOptions as H, customElement as R } from "lit/decorators.js";
11
+ import { createRef as Y, ref as L } from "lit/directives/ref.js";
12
+ import { takeUntil as C, distinctUntilChanged as N, tap as P, filter as B, switchMap as U } from "rxjs/operators";
13
13
  function F(t, e) {
14
14
  if (!t || !e) return 0;
15
15
  if (t === e) return 1;
16
16
  const s = t.toLowerCase().trim(), i = e.toLowerCase().trim();
17
17
  if (s === i) return 1;
18
- const a = i.includes(s) ? 1 : 0, o = function(p, u) {
18
+ const a = i.includes(s) ? 1 : 0, o = function(c, u) {
19
19
  let l = 0, n = 0;
20
- for (; l < p.length && n < u.length; ) p[l] === u[n] && l++, n++;
21
- return l === p.length;
22
- }(s, i) ? 0.8 : 0, r = function(p, u) {
23
- const l = (m) => m.split("").reduce((b, g) => (b[g] = (b[g] || 0) + 1, b), {}), n = l(p), f = l(u);
24
- return Object.keys(n).every((m) => (f[m] || 0) >= n[m]);
25
- }(s, i) ? 0.7 : 0, v = function(p, u) {
26
- if (p.length < 2 || u.length < 2) return 0;
27
- const l = $(p), n = $(u);
20
+ for (; l < c.length && n < u.length; ) c[l] === u[n] && l++, n++;
21
+ return l === c.length;
22
+ }(s, i) ? 0.8 : 0, r = function(c, u) {
23
+ const l = (y) => y.split("").reduce((b, g) => (b[g] = (b[g] || 0) + 1, b), {}), n = l(c), f = l(u);
24
+ return Object.keys(n).every((y) => (f[y] || 0) >= n[y]);
25
+ }(s, i) ? 0.7 : 0, v = function(c, u) {
26
+ if (c.length < 2 || u.length < 2) return 0;
27
+ const l = x(c), n = x(u);
28
28
  let f = 0;
29
- const m = new Array(n.length).fill(!1);
30
- for (const b of l) for (let g = 0; g < n.length; g++) if (!m[g] && n[g] === b) {
31
- f++, m[g] = !0;
29
+ const y = new Array(n.length).fill(!1);
30
+ for (const b of l) for (let g = 0; g < n.length; g++) if (!y[g] && n[g] === b) {
31
+ f++, y[g] = !0;
32
32
  break;
33
33
  }
34
34
  return 2 * f / (l.length + n.length);
35
- }(s, i), d = Math.max(s.length, i.length), k = function(p, u) {
36
- if (p.length === 0) return u.length;
37
- if (u.length === 0) return p.length;
35
+ }(s, i), d = Math.max(s.length, i.length), k = function(c, u) {
36
+ if (c.length === 0) return u.length;
37
+ if (u.length === 0) return c.length;
38
38
  const l = [];
39
39
  for (let n = 0; n <= u.length; n++) l[n] = [n];
40
- for (let n = 0; n <= p.length; n++) l[0][n] = n;
41
- for (let n = 1; n <= u.length; n++) for (let f = 1; f <= p.length; f++) {
42
- const m = p[f - 1] === u[n - 1] ? 0 : 1;
43
- l[n][f] = Math.min(l[n - 1][f] + 1, l[n][f - 1] + 1, l[n - 1][f - 1] + m);
40
+ for (let n = 0; n <= c.length; n++) l[0][n] = n;
41
+ for (let n = 1; n <= u.length; n++) for (let f = 1; f <= c.length; f++) {
42
+ const y = c[f - 1] === u[n - 1] ? 0 : 1;
43
+ l[n][f] = Math.min(l[n - 1][f] + 1, l[n][f - 1] + 1, l[n - 1][f - 1] + y);
44
44
  }
45
- return l[u.length][p.length];
45
+ return l[u.length][c.length];
46
46
  }(s, i), S = d ? 1 - k / d : 0;
47
47
  return Math.max(a, o, r, v, S);
48
48
  }
49
- function $(t) {
49
+ function x(t) {
50
50
  const e = [];
51
51
  for (let s = 0; s < t.length - 1; s++) e.push(t.substring(s, s + 2));
52
52
  return e;
53
53
  }
54
- var W = Object.defineProperty, K = Object.getOwnPropertyDescriptor, c = (t, e, s, i) => {
54
+ var W = Object.defineProperty, K = Object.getOwnPropertyDescriptor, p = (t, e, s, i) => {
55
55
  for (var a, o = i > 1 ? void 0 : i ? K(e, s) : e, r = t.length - 1; r >= 0; r--) (a = t[r]) && (o = (i ? a(e, s, o) : a(o)) || o);
56
56
  return i && o && W(e, s, o), o;
57
57
  };
58
58
  let h = class extends M(":host{display:block;border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important}:host:focus{box-shadow:unset!important}") {
59
59
  constructor() {
60
- super(...arguments), this.required = !1, this.placeholder = "", this.value = "", this.label = "", this.maxHeight = "25vh", this.multi = !1, this.description = "", this.inputRef = L(), this.searchTerm$ = new V(), this.isOpen = !1, this.autocomplete = "on", this.startY = 0, this.statusMessage = "", this.handleKeyDown = (t) => {
60
+ super(...arguments), this.required = !1, this.placeholder = "", this.value = "", this.label = "", this.maxHeight = "25vh", this.multi = !1, this.description = "", this.inputRef = Y(), this.size = "md", this.searchTerm$ = new V(), this.isOpen = !1, this.autocomplete = "on", this.startY = 0, this.statusMessage = "", this.handleKeyDown = (t) => {
61
61
  const e = this.options.filter((i) => !i.hidden);
62
62
  if (!this.isOpen) return void (["Enter", "ArrowDown"].includes(t.key) && (t.preventDefault(), this.showOptions().then(() => {
63
63
  e.length > 0 && this.focusOption(e, 0);
@@ -99,7 +99,7 @@ let h = class extends M(":host{display:block;border:unset!important;line-height:
99
99
  connectedCallback() {
100
100
  super.connectedCallback(), this.id || (this.id = `schmancy-autocomplete-${Math.random().toString(36).substr(2, 9)}`), O(this, "keydown").pipe(C(this.disconnecting)).subscribe({ next: (t) => {
101
101
  this.handleKeyDown(t);
102
- } }), this.searchTerm$.pipe(z(), P((t) => {
102
+ } }), this.searchTerm$.pipe(N(), P((t) => {
103
103
  var a;
104
104
  const e = t.trim().toLowerCase(), s = this.options.map((o) => {
105
105
  const r = (o.label || o.textContent || "").toLowerCase();
@@ -228,19 +228,20 @@ let h = class extends M(":host{display:block;border:unset!important;line-height:
228
228
  }
229
229
  render() {
230
230
  const t = `${this.id}-desc`;
231
- return x`
231
+ return $`
232
232
  <div class="relative">
233
233
  <!-- Live region for screen reader announcements -->
234
234
  <div id="live-status" role="status" aria-live="polite" class="sr-only"></div>
235
235
 
236
236
  <!-- Optional description for the autocomplete -->
237
- ${this.description ? x`<div id="${t}" class="sr-only">${this.description}</div>` : ""}
237
+ ${this.description ? $`<div id="${t}" class="sr-only">${this.description}</div>` : ""}
238
238
 
239
239
  <!-- The trigger slot (if any) overrides the default SchmancyInput -->
240
240
  <slot name="trigger">
241
241
  <sch-input
242
+ .size=${this.size}
242
243
  .autocomplete=${this.autocomplete}
243
- ${N(this.inputRef)}
244
+ ${L(this.inputRef)}
244
245
  id="input"
245
246
  class="w-full"
246
247
  .label=${this.label}
@@ -277,7 +278,7 @@ let h = class extends M(":host{display:block;border:unset!important;line-height:
277
278
  }}
278
279
  @touchstart=${this.handleTouchStart}
279
280
  @touchmove=${this.preventScroll}
280
- ${j({ bgColor: T.sys.color.surface.container })}
281
+ ${j({ bgColor: z.sys.color.surface.container })}
281
282
  @slotchange=${this.handleSlotChange}
282
283
  >
283
284
  <!-- "No results" option -->
@@ -291,5 +292,5 @@ let h = class extends M(":host{display:block;border:unset!important;line-height:
291
292
  `;
292
293
  }
293
294
  };
294
- c([y({ type: Boolean })], h.prototype, "required", 2), c([y({ type: String })], h.prototype, "placeholder", 2), c([y({ type: String, reflect: !0 })], h.prototype, "value", 2), c([y({ type: String, reflect: !0 })], h.prototype, "label", 2), c([y({ type: String })], h.prototype, "maxHeight", 2), c([y({ type: Boolean })], h.prototype, "multi", 2), c([y({ type: String })], h.prototype, "description", 2), c([w("#options")], h.prototype, "optionsContainer", 2), c([w("#empty")], h.prototype, "empty", 2), c([w("sch-input")], h.prototype, "input", 2), c([H({ flatten: !0 })], h.prototype, "options", 2), c([y({ type: Boolean, reflect: !0 })], h.prototype, "isOpen", 2), c([y({ type: String, reflect: !0 })], h.prototype, "autocomplete", 2), c([R({ passive: !0 })], h.prototype, "handleOptionClick", 1), h = c([Y("schmancy-autocomplete")], h);
295
- //# sourceMappingURL=autocomplete-DzBhZOVS.js.map
295
+ p([m({ type: Boolean })], h.prototype, "required", 2), p([m({ type: String })], h.prototype, "placeholder", 2), p([m({ type: String, reflect: !0 })], h.prototype, "value", 2), p([m({ type: String, reflect: !0 })], h.prototype, "label", 2), p([m({ type: String })], h.prototype, "maxHeight", 2), p([m({ type: Boolean })], h.prototype, "multi", 2), p([m({ type: String })], h.prototype, "description", 2), p([w("#options")], h.prototype, "optionsContainer", 2), p([w("#empty")], h.prototype, "empty", 2), p([w("sch-input")], h.prototype, "input", 2), p([T({ flatten: !0 })], h.prototype, "options", 2), p([m({ type: String, reflect: !0 })], h.prototype, "size", 2), p([m({ type: Boolean, reflect: !0 })], h.prototype, "isOpen", 2), p([m({ type: String, reflect: !0 })], h.prototype, "autocomplete", 2), p([H({ passive: !0 })], h.prototype, "handleOptionClick", 1), h = p([R("schmancy-autocomplete")], h);
296
+ //# sourceMappingURL=autocomplete-D8HWdpyS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"autocomplete-D8HWdpyS.js","sources":["../src/utils/search.ts","../src/autocomplete/autocomplete.ts"],"sourcesContent":["/**\n * Calculate similarity score between two strings.\n * Returns a value between 0 (no match) and 1 (exact match).\n * Includes all similarity methods from the original filter directive.\n *\n * @param query The search query string\n * @param target The target string to compare against\n * @returns A similarity score from 0 to 1\n */\nexport function similarity(query: string, target: string): number {\n\t// Handle edge cases\n\tif (!query || !target) return 0\n\tif (query === target) return 1\n\n\t// Normalize strings for comparison\n\tconst normalizedQuery = query.toLowerCase().trim()\n\tconst normalizedTarget = target.toLowerCase().trim()\n\n\t// Simple exact match check\n\tif (normalizedQuery === normalizedTarget) return 1\n\n\t// Calculate different similarity metrics using all methods from the original filter\n\n\t// 1. Direct substring match\n\tconst substringScore = normalizedTarget.includes(normalizedQuery) ? 1 : 0\n\n\t// 2. Subsequence check\n\tconst subsequenceScore = isSubsequence(normalizedQuery, normalizedTarget) ? 0.8 : 0\n\n\t// 3. Anagram/character frequency match\n\tconst anagramScore = hasAllCharacters(normalizedQuery, normalizedTarget) ? 0.7 : 0\n\n\t// 4. Dice coefficient based on bigrams\n\tconst diceScore = diceCoefficient(normalizedQuery, normalizedTarget)\n\n\t// 5. Levenshtein distance\n\tconst maxLength = Math.max(normalizedQuery.length, normalizedTarget.length)\n\tconst levenshteinDistance = calculateLevenshtein(normalizedQuery, normalizedTarget)\n\tconst levenshteinScore = maxLength ? 1 - levenshteinDistance / maxLength : 0\n\n\t// Return the maximum score from all methods\n\treturn Math.max(substringScore, subsequenceScore, anagramScore, diceScore, levenshteinScore)\n}\n\n/**\n * Check if string 'sub' is a subsequence of string 'str'.\n * All characters in 'sub' must appear in order in 'str'.\n */\nfunction isSubsequence(sub: string, str: string): boolean {\n\tlet i = 0,\n\t\tj = 0\n\twhile (i < sub.length && j < str.length) {\n\t\tif (sub[i] === str[j]) i++\n\t\tj++\n\t}\n\treturn i === sub.length\n}\n\n/**\n * Check if all characters in 'query' are present in 'target'.\n * For example, \"aovc\" matches \"avocados\" (anagram subset matching).\n */\nfunction hasAllCharacters(query: string, target: string): boolean {\n\tconst countChars = (s: string): Record<string, number> => {\n\t\treturn s.split('').reduce(\n\t\t\t(acc, char) => {\n\t\t\t\tacc[char] = (acc[char] || 0) + 1\n\t\t\t\treturn acc\n\t\t\t},\n\t\t\t{} as Record<string, number>,\n\t\t)\n\t}\n\n\tconst queryCount = countChars(query)\n\tconst targetCount = countChars(target)\n\n\treturn Object.keys(queryCount).every(char => (targetCount[char] || 0) >= queryCount[char])\n}\n\n/**\n * Generate bigrams for a string.\n * A bigram is a sequence of two adjacent characters.\n */\nfunction getBigrams(s: string): string[] {\n\tconst bigrams = []\n\tfor (let i = 0; i < s.length - 1; i++) {\n\t\tbigrams.push(s.substring(i, i + 2))\n\t}\n\treturn bigrams\n}\n\n/**\n * Compute Dice's coefficient for two strings based on bigrams.\n * Returns a value between 0 (no similarity) and 1 (perfect match).\n */\nfunction diceCoefficient(s1: string, s2: string): number {\n\tif (s1.length < 2 || s2.length < 2) return 0\n\n\tconst bigrams1 = getBigrams(s1)\n\tconst bigrams2 = getBigrams(s2)\n\n\tlet intersection = 0\n\tconst used = new Array(bigrams2.length).fill(false)\n\n\tfor (const bigram of bigrams1) {\n\t\tfor (let i = 0; i < bigrams2.length; i++) {\n\t\t\tif (!used[i] && bigrams2[i] === bigram) {\n\t\t\t\tintersection++\n\t\t\t\tused[i] = true\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (2 * intersection) / (bigrams1.length + bigrams2.length)\n}\n\n/**\n * Calculate Levenshtein distance between two strings.\n */\nfunction calculateLevenshtein(a: string, b: string): number {\n\tif (a.length === 0) return b.length\n\tif (b.length === 0) return a.length\n\n\tconst matrix: number[][] = []\n\n\t// Initialize the matrix\n\tfor (let i = 0; i <= b.length; i++) {\n\t\tmatrix[i] = [i]\n\t}\n\tfor (let j = 0; j <= a.length; j++) {\n\t\tmatrix[0][j] = j\n\t}\n\n\t// Calculate distances\n\tfor (let i = 1; i <= b.length; i++) {\n\t\tfor (let j = 1; j <= a.length; j++) {\n\t\t\tconst cost = a[j - 1] === b[i - 1] ? 0 : 1\n\t\t\tmatrix[i][j] = Math.min(\n\t\t\t\tmatrix[i - 1][j] + 1, // deletion\n\t\t\t\tmatrix[i][j - 1] + 1, // insertion\n\t\t\t\tmatrix[i - 1][j - 1] + cost, // substitution\n\t\t\t)\n\t\t}\n\t}\n\n\treturn matrix[b.length][a.length]\n}\n","import { computePosition, offset, shift, size } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport SchmancyInput from '@schmancy/input/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { html } from 'lit'\nimport { customElement, eventOptions, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { from, fromEvent, Subject } from 'rxjs'\nimport { distinctUntilChanged, filter, switchMap, takeUntil, tap } from 'rxjs/operators'\nimport style from './autocomplete.scss?inline'\n\nimport { InputSize } from '@schmancy/input'\nimport type { SchmancyInputInputEvent } from '@schmancy/input/input'\nimport { similarity } from '@schmancy/utils/search'\n\nexport type SchmancyAutocompleteChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n/**\n * The SchmancyAutocomplete component provides an accessible autocomplete field with keyboard navigation.\n * @element schmancy-autocomplete\n * @fires change - Emitted when a selection is made\n * @slot - Default slot for schmancy-option elements\n * @slot trigger - Optional slot to override the default input\n */\n@customElement('schmancy-autocomplete')\nexport default class SchmancyAutocomplete extends $LitElement(style) {\n\t// Public API properties\n\t@property({ type: Boolean }) required = false\n\t@property({ type: String }) placeholder = ''\n\t@property({ type: String, reflect: true }) value = ''\n\t@property({ type: String, reflect: true }) label = ''\n\t@property({ type: String }) maxHeight = '25vh'\n\t@property({ type: Boolean }) multi = false\n\n\t/**\n\t * Optional description for the autocomplete to improve accessibility.\n\t * Will be associated with the input via aria-describedby.\n\t */\n\t@property({ type: String }) description = ''\n\n\t/** Direct reference to the <input> inside <sch-input> */\n\tinputRef = createRef<HTMLInputElement>()\n\n\t// Query selectors for elements in the shadow DOM\n\t@query('#options') private optionsContainer!: HTMLUListElement\n\t@query('#empty') private empty!: HTMLLIElement\n\t@query('sch-input') private input!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\n\t/**\n\t * The size of the input.\n\t * - 'sm': Small, compact size\n\t * - 'md': Medium size (default)\n\t * - 'lg': Large size\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic size: InputSize = 'md'\n\n\t// Subject for search term changes\n\tprivate readonly searchTerm$ = new Subject<string>()\n\n\t// Flag to track dropdown state\n\t@property({ type: Boolean, reflect: true }) isOpen = false\n\n\t/** Autocomplete/autofill hints. */\n\t@property({ type: String, reflect: true })\n\tpublic autocomplete: AutoFill = 'on'\n\n\t// iOS scroll-blocking logic\n\tprivate startY = 0\n\n\t// Store status message for screen readers\n\tprivate statusMessage = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Ensure the component has an ID (used for generating option IDs)\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-autocomplete-${Math.random().toString(36).substr(2, 9)}`\n\t\t}\n\n\t\t// Listen for keydown events on the input to enable keyboard navigation\n\t\tfromEvent(this, 'keydown')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe({\n\t\t\t\tnext: (e: KeyboardEvent) => {\n\t\t\t\t\tthis.handleKeyDown(e)\n\t\t\t\t},\n\t\t\t})\n\n\t\t// Search filtering logic\n\t\tthis.searchTerm$\n\t\t\t.pipe(\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(term => {\n\t\t\t\t\tconst searchTerm = term.trim().toLowerCase()\n\n\t\t\t\t\t// Filter options using Levenshtein distance\n\t\t\t\t\tconst matches = this.options\n\t\t\t\t\t\t.map(option => {\n\t\t\t\t\t\t\tconst optionText = (option.label || option.textContent || '').toLowerCase()\n\t\t\t\t\t\t\tconst score = similarity(searchTerm, optionText)\n\t\t\t\t\t\t\treturn { option, score }\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.filter(({ score }) => {\n\t\t\t\t\t\t\t// For short search terms, be lenient\n\t\t\t\t\t\t\treturn score > 0.8\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.sort((a, b) => a.score - b.score)\n\n\t\t\t\t\t// Show/hide options based on filtering\n\t\t\t\t\tthis.options.forEach(o => (o.hidden = true))\n\t\t\t\t\tfor (const { option } of matches) {\n\t\t\t\t\t\toption.hidden = false\n\t\t\t\t\t}\n\n\t\t\t\t\t// \"No results found\"\n\t\t\t\t\tthis.empty.hidden = matches.length > 0\n\n\t\t\t\t\t// Update status message for screen readers\n\t\t\t\t\tthis.statusMessage =\n\t\t\t\t\t\tmatches.length > 0\n\t\t\t\t\t\t\t? `${matches.length} option${matches.length === 1 ? '' : 's'} available.`\n\t\t\t\t\t\t\t: 'No results found.'\n\n\t\t\t\t\t// Update the live region to announce the results\n\t\t\t\t\tconst liveRegion = this.shadowRoot?.querySelector('#live-status')\n\t\t\t\t\tif (liveRegion) {\n\t\t\t\t\t\tliveRegion.textContent = this.statusMessage\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update accessibility attributes on options\n\t\t\t\t\tthis.setupOptionsAccessibility()\n\n\t\t\t\t\tthis.requestUpdate()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\t// Show dropdown on each new search term\n\t\t\t\tthis.showOptions()\n\t\t\t})\n\n\t\t// Focus-out animation (fade out)\n\t\tfromEvent<FocusEvent>(this, 'focusout')\n\t\t\t.pipe(\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tfilter(e => {\n\t\t\t\t\t// Don't close if focus moved to an option\n\t\t\t\t\tconst relatedTarget = e.relatedTarget as Element\n\t\t\t\t\treturn !this.contains(relatedTarget) && relatedTarget?.tagName !== 'SCHMANCY-OPTION'\n\t\t\t\t}),\n\t\t\t\tswitchMap(() => {\n\t\t\t\t\t// reset options to show all\n\t\t\t\t\tthis.options.forEach(o => (o.hidden = false))\n\t\t\t\t\tconst animation = this.optionsContainer.animate([{ opacity: 1 }, { opacity: 0 }], {\n\t\t\t\t\t\tduration: 150,\n\t\t\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t\t\t})\n\t\t\t\t\treturn from(\n\t\t\t\t\t\tnew Promise<void>(resolve => {\n\t\t\t\t\t\t\tanimation.onfinish = () => {\n\t\t\t\t\t\t\t\tthis.optionsContainer.style.display = 'none'\n\t\t\t\t\t\t\t\tthis.optionsContainer.style.opacity = '1'\n\t\t\t\t\t\t\t\tthis.isOpen = false\n\t\t\t\t\t\t\t\tresolve()\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\t.subscribe({\n\t\t\t\tnext: () => {\n\t\t\t\t\t// After closing, resync the input's value\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\tconst selected = this.options.filter(o => o.selected).map(o => o.label)\n\t\t\t\t\t\tthis.input.value = selected.join(', ')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.input.value = this.options.find(o => o.value === this.value)?.label ?? ''\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t})\n\t}\n\n\tfirstUpdated() {\n\t\tthis.updateInputValue()\n\t}\n\n\tprotected updated(changedProps: Map<string | number | symbol, unknown>) {\n\t\tsuper.updated(changedProps)\n\t\tif (changedProps.has('value')) {\n\t\t\tthis.syncSelectionFromValue()\n\t\t\tthis.updateInputValue()\n\t\t}\n\t}\n\n\t/**\n\t * When the <slot> changes (i.e. options are added/removed), update the following:\n\t * 1. Show or hide the \"No results found\" option.\n\t * 2. Sync the selection state.\n\t * 3. Setup accessibility attributes on the options.\n\t */\n\tprivate handleSlotChange() {\n\t\tthis.empty.hidden = this.options.some(option => !option.hidden)\n\t\tthis.syncSelectionFromValue()\n\t\tthis.updateInputValue()\n\t\tthis.setupOptionsAccessibility()\n\t}\n\n\t/**\n\t * Loops through assigned options and sets accessibility attributes:\n\t * - role=\"option\"\n\t * - A unique ID (if not already set)\n\t * - tabindex=\"-1\"\n\t * - aria-selected (based on whether the option is selected)\n\t */\n\tprivate setupOptionsAccessibility() {\n\t\tthis.options.forEach((option, index) => {\n\t\t\toption.setAttribute('role', 'option')\n\t\t\tif (!option.id) {\n\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t}\n\t\t\toption.tabIndex = -1\n\t\t\toption.setAttribute('aria-selected', String(this.multi ? option.selected : option.value === this.value))\n\t\t})\n\t}\n\n\tprivate syncSelectionFromValue() {\n\t\tif (this.multi) {\n\t\t\tconst values = this.value\n\t\t\t\t.split(',')\n\t\t\t\t.map(v => v.trim())\n\t\t\t\t.filter(Boolean)\n\t\t\tthis.options.forEach(o => {\n\t\t\t\to.selected = values.includes(o.value)\n\t\t\t})\n\t\t} else {\n\t\t\tthis.options.forEach(o => {\n\t\t\t\to.selected = o.value === this.value\n\t\t\t})\n\t\t}\n\t}\n\n\tprivate updateInputValue() {\n\t\trequestAnimationFrame(() => {\n\t\t\tif (this.multi) {\n\t\t\t\tconst selected = this.options.filter(o => o.selected).map(o => o.label)\n\t\t\t\tthis.input.value = selected.join(', ')\n\t\t\t} else {\n\t\t\t\tconst found = this.options.find(o => o.value === this.value)?.label\n\t\t\t\tthis.input.value = found ?? ''\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * MAIN: Show the dropdown. Uses Floating UI to position and size the options container.\n\t */\n\tprivate async showOptions() {\n\t\tif (!this.optionsContainer) return\n\n\t\tthis.optionsContainer.removeAttribute('hidden')\n\t\tthis.optionsContainer.style.display = 'block'\n\t\tthis.isOpen = true\n\n\t\tconst { x, y } = await computePosition(this.input, this.optionsContainer, {\n\t\t\tplacement: 'bottom-start',\n\t\t\tmiddleware: [\n\t\t\t\toffset(5),\n\t\t\t\tshift({ padding: 5 }),\n\t\t\t\tsize({\n\t\t\t\t\tapply({ availableWidth, availableHeight, elements, rects }) {\n\t\t\t\t\t\t// At least match input width\n\t\t\t\t\t\tconst referenceWidth = rects.reference.width\n\t\t\t\t\t\telements.floating.style.minWidth = `${referenceWidth}px`\n\t\t\t\t\t\t// Cap to available viewport space\n\t\t\t\t\t\telements.floating.style.maxWidth = `${availableWidth}px`\n\t\t\t\t\t\telements.floating.style.maxHeight = `${availableHeight}px`\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t],\n\t\t})\n\n\t\tObject.assign(this.optionsContainer.style, {\n\t\t\tleft: `${x}px`,\n\t\t\ttop: `${y}px`,\n\t\t\tposition: 'absolute',\n\t\t\tzIndex: '9999',\n\t\t\toverflowY: 'auto',\n\t\t})\n\t}\n\n\tprivate hideOptions() {\n\t\tthis.optionsContainer?.setAttribute('hidden', 'true')\n\t\tif (this.optionsContainer) {\n\t\t\tthis.optionsContainer.style.display = 'none'\n\t\t}\n\t\tthis.isOpen = false\n\n\t\t// Announce that the dropdown is closed to screen readers\n\t\tconst liveRegion = this.shadowRoot?.querySelector('#live-status')\n\t\tif (liveRegion) {\n\t\t\tliveRegion.textContent = 'Dropdown closed.'\n\t\t}\n\t}\n\n\tprivate handleInputChange(event: SchmancyInputInputEvent) {\n\t\tevent.preventDefault()\n\t\tevent.stopPropagation()\n\t\tconst term = event.detail.value\n\t\tthis.searchTerm$.next(term)\n\t}\n\n\t@eventOptions({ passive: true })\n\tprivate handleOptionClick(value: string) {\n\t\tif (this.multi) {\n\t\t\tconst option = this.options.find(o => o.value === value)\n\t\t\tif (option) option.selected = !option.selected\n\t\t\tconst selectedValues = this.options.filter(o => o.selected).map(o => o.value)\n\t\t\tthis.value = selectedValues.join(',')\n\t\t\tthis.updateInputValue()\n\n\t\t\t// Announce selection to screen readers\n\t\t\tconst selectedLabels = this.options.filter(o => o.selected).map(o => o.label)\n\t\t\tconst announcement = selectedLabels.length > 0 ? `Selected: ${selectedLabels.join(', ')}` : 'No options selected'\n\n\t\t\tconst liveRegion = this.shadowRoot?.querySelector('#live-status')\n\t\t\tif (liveRegion) {\n\t\t\t\tliveRegion.textContent = announcement\n\t\t\t}\n\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n\t\t\t\t\tdetail: { value: selectedValues },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t} else {\n\t\t\tconst selectedOption = this.options.find(o => o.value === value)\n\t\t\tconst selectedLabel = selectedOption?.label || ''\n\n\t\t\tthis.hideOptions()\n\t\t\tthis.value = value\n\t\t\tthis.updateInputValue()\n\n\t\t\t// Announce selection to screen readers\n\t\t\tconst liveRegion = this.shadowRoot?.querySelector('#live-status')\n\t\t\tif (liveRegion) {\n\t\t\t\tliveRegion.textContent = `Selected: ${selectedLabel}`\n\t\t\t}\n\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n\t\t\t\t\tdetail: { value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\t}\n\n\tpublic checkValidity() {\n\t\treturn this.multi ? this.options.some(o => o.selected) : Boolean(this.value)\n\t}\n\n\tpublic reportValidity() {\n\t\treturn this.inputRef.value?.reportValidity()\n\t}\n\n\tprivate handleTouchStart(event: TouchEvent) {\n\t\tthis.startY = event.touches?.[0]?.clientY ?? 0\n\t}\n\n\tprivate preventScroll(event: TouchEvent) {\n\t\tconst target = event.target as HTMLElement\n\t\tif (!this.optionsContainer.contains(target)) return\n\n\t\tconst scrollTop = this.optionsContainer.scrollTop\n\t\tconst scrollHeight = this.optionsContainer.scrollHeight\n\t\tconst offsetHeight = this.optionsContainer.offsetHeight\n\t\tconst contentHeight = scrollHeight - offsetHeight\n\n\t\tconst currentY = event.touches?.[0]?.clientY ?? 0\n\t\tif ((scrollTop <= 0 && currentY > this.startY) || (scrollTop >= contentHeight && currentY < this.startY)) {\n\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\n\t/**\n\t * Keyboard navigation for the autocomplete.\n\t * – When the dropdown is closed, ArrowDown (or Enter/Space) opens it.\n\t * – When open, ArrowDown/ArrowUp move focus between options (which must have role=\"option\").\n\t * – Enter or Space selects the active option.\n\t * – Escape (or Tab) hides the dropdown.\n\t * - Home/End to navigate to first/last option\n\t */\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\t// Get the visible options (i.e. those not hidden)\n\t\tconst options = this.options.filter(o => !o.hidden)\n\n\t\t// If the dropdown is closed, open it on Enter, Space, or ArrowDown\n\t\tif (!this.isOpen) {\n\t\t\tif (['Enter', 'ArrowDown'].includes(e.key)) {\n\t\t\t\t// Removed ' ' (space) here\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.showOptions().then(() => {\n\t\t\t\t\tif (options.length > 0) {\n\t\t\t\t\t\tthis.focusOption(options, 0)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// Dropdown is open; determine the currently focused option\n\t\tlet currentIndex = options.findIndex(o => o.matches(':focus'))\n\t\tif (currentIndex === -1) {\n\t\t\t// If no option is focused, default to the first\n\t\t\tcurrentIndex = 0\n\t\t}\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.hideOptions()\n\t\t\t\tthis.input.focus()\n\t\t\t\tbreak\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.min(currentIndex + 1, options.length - 1))\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.max(currentIndex - 1, 0))\n\t\t\t\tbreak\n\t\t\tcase 'Home':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, 0)\n\t\t\t\tbreak\n\t\t\tcase 'End':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, options.length - 1)\n\t\t\t\tbreak\n\t\t\tcase 'Enter': // Removed ' ' (space) case here\n\t\t\t\te.preventDefault()\n\t\t\t\tif (options[currentIndex]) {\n\t\t\t\t\tconst value = options[currentIndex].getAttribute('data-value') || options[currentIndex].getAttribute('value')\n\t\t\t\t\tif (value) {\n\t\t\t\t\t\tthis.handleOptionClick(value)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\tcase 'Tab':\n\t\t\t\t// Close the dropdown on Tab\n\t\t\t\tthis.hideOptions()\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\t// For letter key presses, find and focus the first option that starts with that letter\n\t\t\t\tif (e.key.length === 1 && /[a-zA-Z0-9]/.test(e.key)) {\n\t\t\t\t\tconst searchKey = e.key.toLowerCase()\n\t\t\t\t\tconst matchIndex = options.findIndex(option =>\n\t\t\t\t\t\t(option.label || option.textContent || '').toLowerCase().startsWith(searchKey),\n\t\t\t\t\t)\n\n\t\t\t\t\tif (matchIndex !== -1) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.focusOption(options, matchIndex)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * Helper to focus an option by index and update the combobox's aria-activedescendant.\n\t */\n\tprivate focusOption(options: HTMLElement[], index: number) {\n\t\tif (!options.length) return\n\n\t\tconst option = options[index]\n\t\tif (option) {\n\t\t\toption.focus()\n\t\t\t// Update the input's aria-activedescendant to match the newly focused option\n\t\t\tthis.input.setAttribute('aria-activedescendant', option.id)\n\n\t\t\t// Ensure the focused option is visible in the dropdown (scroll if needed)\n\t\t\tif (option.scrollIntoView) {\n\t\t\t\toption.scrollIntoView({ block: 'nearest' })\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\t// Create a unique ID for the description\n\t\tconst descriptionId = `${this.id}-desc`\n\n\t\treturn html`\n\t\t\t<div class=\"relative\">\n\t\t\t\t<!-- Live region for screen reader announcements -->\n\t\t\t\t<div id=\"live-status\" role=\"status\" aria-live=\"polite\" class=\"sr-only\"></div>\n\n\t\t\t\t<!-- Optional description for the autocomplete -->\n\t\t\t\t${this.description ? html`<div id=\"${descriptionId}\" class=\"sr-only\">${this.description}</div>` : ''}\n\n\t\t\t\t<!-- The trigger slot (if any) overrides the default SchmancyInput -->\n\t\t\t\t<slot name=\"trigger\">\n\t\t\t\t\t<sch-input\n\t\t\t\t\t\t.size=${this.size}\n\t\t\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t\t\t${ref(this.inputRef)}\n\t\t\t\t\t\tid=\"input\"\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t\ttype=\"search\"\n\t\t\t\t\t\tinputmode=\"text\"\n\t\t\t\t\t\tautocomplete=\"off\"\n\t\t\t\t\t\tclickable\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\t\taria-describedby=${this.description ? descriptionId : undefined}\n\t\t\t\t\t\t@focus=${() => this.showOptions()}\n\t\t\t\t\t\t@change=${this.handleInputChange}\n\t\t\t\t\t>\n\t\t\t\t\t</sch-input>\n\t\t\t\t</slot>\n\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tclass=\"absolute z-30 mt-1 w-full overflow-auto rounded-md shadow-sm\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\taria-multiselectable=${this.multi ? 'true' : 'false'}\n\t\t\t\t\taria-label=${`${this.label || 'Options'} dropdown`}\n\t\t\t\t\thidden\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t// Each <schmancy-option> should dispatch a CustomEvent('click', { detail: { value } })\n\t\t\t\t\t\tconst detailVal = (e as CustomEvent).detail?.value\n\t\t\t\t\t\tif (detailVal) this.handleOptionClick(detailVal)\n\t\t\t\t\t}}\n\t\t\t\t\t@touchstart=${this.handleTouchStart}\n\t\t\t\t\t@touchmove=${this.preventScroll}\n\t\t\t\t\t${color({ bgColor: SchmancyTheme.sys.color.surface.container })}\n\t\t\t\t\t@slotchange=${this.handleSlotChange}\n\t\t\t\t>\n\t\t\t\t\t<!-- \"No results\" option -->\n\t\t\t\t\t<li id=\"empty\" tabindex=\"-1\" role=\"option\" aria-disabled=\"true\" class=\"p-2 text-center\">\n\t\t\t\t\t\t<schmancy-typography type=\"label\">No results found</schmancy-typography>\n\t\t\t\t\t</li>\n\t\t\t\t\t<!-- Slot for the <schmancy-option> elements -->\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-autocomplete': SchmancyAutocomplete\n\t}\n}\n"],"names":["similarity","query","target","normalizedQuery","toLowerCase","trim","normalizedTarget","substringScore","includes","subsequenceScore","sub","str","i","j","length","anagramScore","countChars","s","split","reduce","acc","char","queryCount","targetCount","Object","keys","every","diceScore","s1","s2","bigrams1","getBigrams","bigrams2","intersection","used","Array","fill","bigram","maxLength","Math","max","levenshteinDistance","a","b","matrix","cost","min","levenshteinScore","bigrams","push","substring","SchmancyAutocomplete","$LitElement","super","arguments","this","required","placeholder","value","label","maxHeight","multi","description","inputRef","createRef","size","searchTerm$","Subject","isOpen","autocomplete","startY","statusMessage","handleKeyDown","e","options","filter","o","hidden","key","preventDefault","showOptions","then","focusOption","currentIndex","findIndex","matches","hideOptions","input","focus","getAttribute","handleOptionClick","test","searchKey","matchIndex","option","textContent","startsWith","connectedCallback","id","random","toString","substr","fromEvent","pipe","takeUntil","disconnecting","subscribe","next","distinctUntilChanged","tap","term","searchTerm","map","optionText","score","sort","forEach","empty","liveRegion","shadowRoot","querySelector","setupOptionsAccessibility","requestUpdate","relatedTarget","contains","tagName","switchMap","animation","optionsContainer","animate","opacity","duration","easing","from","Promise","resolve","onfinish","style","display","selected","join","find","updateInputValue","changedProps","updated","has","syncSelectionFromValue","some","index","setAttribute","tabIndex","String","values","v","Boolean","requestAnimationFrame","found","removeAttribute","x","y","computePosition","placement","middleware","offset","shift","padding","availableWidth","availableHeight","elements","rects","referenceWidth","reference","width","floating","minWidth","maxWidth","assign","left","top","position","zIndex","overflowY","event","stopPropagation","detail","selectedValues","selectedLabels","announcement","dispatchEvent","CustomEvent","bubbles","composed","selectedOption","selectedLabel","reportValidity","touches","clientY","scrollTop","contentHeight","scrollHeight","offsetHeight","currentY","scrollIntoView","block","descriptionId","html","ref","handleInputChange","detailVal","handleTouchStart","preventScroll","color","bgColor","SchmancyTheme","sys","surface","container","handleSlotChange","__decorateClass","property","type","prototype","reflect","queryAssignedElements","flatten","eventOptions","passive","customElement"],"mappings":";;;;;;;;;;;;AASgB,SAAAA,EAAWC,GAAeC;AAEzC,MAAKD,CAAAA,KAAAA,CAAUC,EAAe,QAAA;AAC1B,MAAAD,MAAUC,EAAe,QAAA;AAG7B,QAAMC,IAAkBF,EAAMG,cAAcC,KACtCC,GAAAA,IAAmBJ,EAAOE,YAAAA,EAAcC;AAG1C,MAAAF,MAAoBG,EAAyB,QAAA;AAKjD,QAAMC,IAAiBD,EAAiBE,SAASL,CAAAA,IAAmB,IAAI,GAGlEM,IAqBP,SAAuBC,GAAaC,GAAAA;AAC/B,QAAAC,IAAI,GACPC,IAAI;AACL,WAAOD,IAAIF,EAAII,UAAUD,IAAIF,EAAIG,SAC5BJ,CAAAA,EAAIE,CAAOD,MAAAA,EAAIE,CAAID,KAAAA,KACvBC;AAED,WAAOD,MAAMF,EAAII;AAAAA,EAClB,EA7BwCX,GAAiBG,CAAAA,IAAoB,MAAM,GAG5ES,IAgCP,SAA0Bd,GAAeC;AAClC,UAAAc,IAAcC,CAAAA,MACZA,EAAEC,MAAM,EAAIC,EAAAA,OAClB,CAACC,GAAKC,OACLD,EAAIC,CAASD,KAAAA,EAAIC,MAAS,KAAK,GACxBD,IAER,CAAA,CAAA,GAIIE,IAAaN,EAAWf,CAAAA,GACxBsB,IAAcP,EAAWd,CAAAA;AAE/B,WAAOsB,OAAOC,KAAKH,CAAYI,EAAAA,MAAML,CAAAA,OAASE,EAAYF,CAAAA,KAAS,MAAMC,EAAWD,CAAAA,CAAAA;AAAAA,EACrF,EA/CuClB,GAAiBG,CAAoB,IAAA,MAAM,GAG3EqB,IA8DP,SAAyBC,GAAYC,GACpC;AAAA,QAAID,EAAGd,SAAS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AAMrE,QAAQuE,SAAAA,GAxCN3K,CAAAA,CAAAA,GAAAA,EAyCb0K,WAAA,gBAAA,CAAA,GAyPCH,EAAA,CADPO,EAAa,EAAEC,SAAAA,GAjSI/K,CAAAA,CAAAA,GAAAA,EAkSZ0K,WAAA,qBAAA,CAAA,GAlSY1K,IAArBuK,EAAA,CADCS,EAAc,uBACMhL,CAAAA,GAAAA,CAAAA;"}
@@ -1,2 +1,2 @@
1
- "use strict";require("./autocomplete-CVTRldW1.cjs");
1
+ "use strict";require("./autocomplete-ChDCoDb2.cjs");
2
2
  //# sourceMappingURL=autocomplete.cjs.map
@@ -1,2 +1,2 @@
1
- import "./autocomplete-DzBhZOVS.js";
1
+ import "./autocomplete-D8HWdpyS.js";
2
2
  //# sourceMappingURL=autocomplete.js.map
package/dist/card.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";require("./teleport.component-72oIW654.cjs");
1
+ "use strict";require("./teleport.component-C43YKRMJ.cjs");
2
2
  //# sourceMappingURL=card.cjs.map
package/dist/card.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./teleport.component-vWzkjwaD.js";
1
+ import "./teleport.component-Cv7rwX-_.js";
2
2
  //# sourceMappingURL=card.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-72oIW654.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-C43YKRMJ.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
2
2
  //# sourceMappingURL=content-drawer.cjs.map
@@ -1,4 +1,4 @@
1
- import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-vWzkjwaD.js";
1
+ import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-Cv7rwX-_.js";
2
2
  export {
3
3
  n as SchmancyContentDrawer,
4
4
  t as SchmancyContentDrawerID,
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-rLaot0v2.cjs");const c=require("./area.component-CP5oin2j.cjs");require("./autocomplete-CVTRldW1.cjs"),require("./spinner-DeHbns2e.cjs");const l=require("./icon-button-BUUtmKnu.cjs"),r=require("./teleport.component-72oIW654.cjs"),g=require("./checkbox-DrrcDAjr.cjs");require("./chips-DrYrCyTG.cjs");const s=require("./payment-card-form-DfbqzyTv.cjs");require("./date-range-DoZNetuD.cjs");const h=require("./delay-WrR6CJK_.cjs"),i=require("./ripple-C2BHbhcS.cjs");require("./divider-Cl2Thq2Y.cjs");const u=require("./timezone-enXRjPy1.cjs");require("./form-Dkh-YG_8.cjs"),require("./icon-BbqYaRVu.cjs"),require("./input-B_MWCRet.cjs");const a=require("./flex-DeB79N0h.cjs"),S=require("./list-UOeNjOTt.cjs");require("./menu-B4k2_5rl.cjs");const y=require("./outlet-DMOeEL6g.cjs");require("./option-hsAZB8ji.cjs");const f=require("./radio-group-CLt-d-Ni.cjs"),C=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const O=require("./select-BUUelLow.cjs"),n=require("./sheet-CyZB5a4W.cjs"),b=require("./slider-DCRfwhaP.cjs"),o=require("./schmancy-steps-container-DguK5NK4.cjs"),t=require("./context-object-BIywslrO.cjs"),e=require("./selector-hook-DDaYMsHs.cjs"),p=require("./surface-TpxKBWnD.cjs"),d=require("./table-DXPDEHEh.cjs");require("./tabs-group-CR2cSCNr.cjs"),require("./textarea-CLlh5-HA.cjs");const m=require("./theme.component-Drmkh4sF.cjs"),q=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-53Mhj3kQ.cjs");const j=require("./tree-Bt4J6QVI.cjs"),D=require("./types.cjs"),P=require("./typewriter-WqDo75_3.cjs"),w=require("./typography-DbNitvGl.cjs"),M=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=c.FINDING_MORTIES,exports.HERE_RICKY=c.HERE_RICKY,exports.HISTORY_STRATEGY=c.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>c.SchmancyArea}),exports.area=c.area,exports.routerHistory=c.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>l.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>l.SchmnacyIconButton}),exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>g.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>s.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>h.SchmancyDelay}),exports.delayContext=h.delayContext,exports.color=i.color,exports.fullHeight=i.fullHeight,exports.ripple=i.ripple,Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>u.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>u.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>a.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>a.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>a.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>a.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>S.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>S.SchmancyListItem}),exports.SchmancyListTypeContext=S.SchmancyListTypeContext,exports.$notify=y.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>y.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>y.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>f.RadioGroup}),exports.mutationObserver=C.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>O.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>b.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>b.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>o.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>o.SchmancyStepsContainer}),exports.StepsController=o.StepsController,exports.stepsContext=o.stepsContext,exports.IndexedDBStorageManager=t.IndexedDBStorageManager,exports.LocalStorageManager=t.LocalStorageManager,exports.MemoryStorageManager=t.MemoryStorageManager,exports.SchmancyStoreObject=t.SchmancyStoreObject,exports.SessionStorageManager=t.SessionStorageManager,exports.StoreError=t.StoreError,exports.createStorageManager=t.createStorageManager,exports.compareValues=e.compareValues,exports.createCollectionContext=e.createCollectionContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createObjectContext=e.createObjectContext,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>p.SchmancySurface}),exports.SchmancySurfaceTypeContext=p.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>d.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>d.SchmancyTableRow}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>m.SchmancyThemeComponent}),exports.formateTheme=m.formateTheme,exports.tailwindStyles=m.tailwindStyles,exports.SchmancyTheme=q.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>j.SchmancyTree}),exports.SchmancyEvents=D.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>P.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=M.intersection$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-rLaot0v2.cjs");const c=require("./area.component-CP5oin2j.cjs");require("./autocomplete-ChDCoDb2.cjs"),require("./spinner-DeHbns2e.cjs");const l=require("./icon-button-BUUtmKnu.cjs"),r=require("./teleport.component-C43YKRMJ.cjs"),g=require("./checkbox-DrrcDAjr.cjs");require("./chips-DrYrCyTG.cjs");const s=require("./payment-card-form-DfbqzyTv.cjs");require("./date-range-DoZNetuD.cjs");const h=require("./delay-WrR6CJK_.cjs"),i=require("./ripple-C2BHbhcS.cjs");require("./divider-Cl2Thq2Y.cjs");const u=require("./timezone-enXRjPy1.cjs");require("./form-Dkh-YG_8.cjs"),require("./icon-BbqYaRVu.cjs"),require("./input-B_MWCRet.cjs");const a=require("./flex-DeB79N0h.cjs"),S=require("./list-UOeNjOTt.cjs");require("./menu-B4k2_5rl.cjs");const y=require("./outlet-DMOeEL6g.cjs");require("./option-hsAZB8ji.cjs");const f=require("./radio-group-CLt-d-Ni.cjs"),C=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const O=require("./select-BUUelLow.cjs"),n=require("./sheet-CyZB5a4W.cjs"),b=require("./slider-DCRfwhaP.cjs"),o=require("./schmancy-steps-container-DguK5NK4.cjs"),t=require("./context-object-BIywslrO.cjs"),e=require("./selector-hook-DDaYMsHs.cjs"),p=require("./surface-TpxKBWnD.cjs"),d=require("./table-DXPDEHEh.cjs");require("./tabs-group-CR2cSCNr.cjs"),require("./textarea-CLlh5-HA.cjs");const m=require("./theme.component-Drmkh4sF.cjs"),q=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-53Mhj3kQ.cjs");const j=require("./tree-Bt4J6QVI.cjs"),D=require("./types.cjs"),P=require("./typewriter-WqDo75_3.cjs"),w=require("./typography-DbNitvGl.cjs"),M=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=c.FINDING_MORTIES,exports.HERE_RICKY=c.HERE_RICKY,exports.HISTORY_STRATEGY=c.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>c.SchmancyArea}),exports.area=c.area,exports.routerHistory=c.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>l.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>l.SchmnacyIconButton}),exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>g.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>s.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>h.SchmancyDelay}),exports.delayContext=h.delayContext,exports.color=i.color,exports.fullHeight=i.fullHeight,exports.ripple=i.ripple,Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>u.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>u.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>a.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>a.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>a.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>a.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>S.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>S.SchmancyListItem}),exports.SchmancyListTypeContext=S.SchmancyListTypeContext,exports.$notify=y.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>y.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>y.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>f.RadioGroup}),exports.mutationObserver=C.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>O.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>b.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>b.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>o.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>o.SchmancyStepsContainer}),exports.StepsController=o.StepsController,exports.stepsContext=o.stepsContext,exports.IndexedDBStorageManager=t.IndexedDBStorageManager,exports.LocalStorageManager=t.LocalStorageManager,exports.MemoryStorageManager=t.MemoryStorageManager,exports.SchmancyStoreObject=t.SchmancyStoreObject,exports.SessionStorageManager=t.SessionStorageManager,exports.StoreError=t.StoreError,exports.createStorageManager=t.createStorageManager,exports.compareValues=e.compareValues,exports.createCollectionContext=e.createCollectionContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createObjectContext=e.createObjectContext,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>p.SchmancySurface}),exports.SchmancySurfaceTypeContext=p.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>d.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>d.SchmancyTableRow}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>m.SchmancyThemeComponent}),exports.formateTheme=m.formateTheme,exports.tailwindStyles=m.tailwindStyles,exports.SchmancyTheme=q.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>j.SchmancyTree}),exports.SchmancyEvents=D.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>P.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=M.intersection$;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./animated-text-BJXm6krF.js";
2
2
  import { F as w, H as D, b as d, S as g, a as M, r as b } from "./area.component-DlAEUmgd.js";
3
- import "./autocomplete-DzBhZOVS.js";
3
+ import "./autocomplete-D8HWdpyS.js";
4
4
  import "./spinner-C-rMlbyB.js";
5
5
  import { S as T, a as I } from "./icon-button-DlnuclQQ.js";
6
- import { $ as R, H as v, e as H, b as E, f as F, c as A, d as L, g as O, S as k, a as Y, i as $, k as j, l as G, m as W, j as B, n as V, o as _, W as K, s as P, h as q, t as z } from "./teleport.component-vWzkjwaD.js";
6
+ import { $ as R, H as v, e as H, b as E, f as F, c as A, d as L, g as O, S as k, a as Y, i as $, k as j, l as G, m as W, j as B, n as V, o as _, W as K, s as P, h as q, t as z } from "./teleport.component-Cv7rwX-_.js";
7
7
  import { S as Q } from "./checkbox-N_JVa-1W.js";
8
8
  import "./chips-DuSV3Pg2.js";
9
9
  import { S as X } from "./payment-card-form-8oXgNTFN.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-72oIW654.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-C43YKRMJ.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
2
2
  //# sourceMappingURL=nav-drawer.cjs.map
@@ -1,4 +1,4 @@
1
- import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-vWzkjwaD.js";
1
+ import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-Cv7rwX-_.js";
2
2
  export {
3
3
  c as $drawer,
4
4
  e as SchmancyDrawerAppbar,
package/dist/teleport.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-72oIW654.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-C43YKRMJ.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
2
2
  //# sourceMappingURL=teleport.cjs.map
@@ -1,4 +1,4 @@
1
- "use strict";const h=require("lit"),c=require("lit/decorators.js"),n=require("rxjs");require("./animated-text-rLaot0v2.cjs");const O=require("./area.component-CP5oin2j.cjs");require("./autocomplete-CVTRldW1.cjs"),require("./spinner-DeHbns2e.cjs"),require("./icon-button-BUUtmKnu.cjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const S=require("./tailwind.mixin-CjSVtdHt.cjs"),$=require("./theme.interface-Xg5Zi46a.cjs");require("./checkbox-DrrcDAjr.cjs"),require("./chips-DrYrCyTG.cjs"),require("./payment-card-form-DfbqzyTv.cjs");const p=require("./types.cjs"),l=require("./provide-DSU87U5x.cjs"),w=require("./litElement.mixin-CfkMd-bR.cjs"),d=require("./consume-Bb7_UzYd.cjs");require("./date-range-DoZNetuD.cjs"),require("./delay-WrR6CJK_.cjs");const b=require("./ripple-C2BHbhcS.cjs");require("./divider-Cl2Thq2Y.cjs"),require("./timezone-enXRjPy1.cjs"),require("./form-Dkh-YG_8.cjs"),require("./icon-BbqYaRVu.cjs"),require("./input-B_MWCRet.cjs"),require("./flex-DeB79N0h.cjs"),require("./list-UOeNjOTt.cjs"),require("./menu-B4k2_5rl.cjs");const I=require("lit/directives/when.js");require("./outlet-DMOeEL6g.cjs"),require("./option-hsAZB8ji.cjs"),require("./radio-group-CLt-d-Ni.cjs"),require("./index-DyJ0oDpR.cjs"),require("./select-BUUelLow.cjs");const U=require("./sheet-CyZB5a4W.cjs");require("./slider-DCRfwhaP.cjs"),require("./schmancy-steps-container-DguK5NK4.cjs"),require("./context-object-BIywslrO.cjs");const T=require("rxjs/operators");require("./surface-TpxKBWnD.cjs"),require("./table-DXPDEHEh.cjs"),require("./tabs-group-CR2cSCNr.cjs"),require("./textarea-CLlh5-HA.cjs"),require("./theme.component-Drmkh4sF.cjs"),require("./theme-button-53Mhj3kQ.cjs"),require("./tree-Bt4J6QVI.cjs"),require("./typewriter-WqDo75_3.cjs"),require("./typography-DbNitvGl.cjs");var Y=Object.getOwnPropertyDescriptor;let H=class extends S.TailwindElement(h.css`
1
+ "use strict";const h=require("lit"),c=require("lit/decorators.js"),n=require("rxjs");require("./animated-text-rLaot0v2.cjs");const O=require("./area.component-CP5oin2j.cjs");require("./autocomplete-ChDCoDb2.cjs"),require("./spinner-DeHbns2e.cjs"),require("./icon-button-BUUtmKnu.cjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const S=require("./tailwind.mixin-CjSVtdHt.cjs"),$=require("./theme.interface-Xg5Zi46a.cjs");require("./checkbox-DrrcDAjr.cjs"),require("./chips-DrYrCyTG.cjs"),require("./payment-card-form-DfbqzyTv.cjs");const p=require("./types.cjs"),l=require("./provide-DSU87U5x.cjs"),w=require("./litElement.mixin-CfkMd-bR.cjs"),d=require("./consume-Bb7_UzYd.cjs");require("./date-range-DoZNetuD.cjs"),require("./delay-WrR6CJK_.cjs");const b=require("./ripple-C2BHbhcS.cjs");require("./divider-Cl2Thq2Y.cjs"),require("./timezone-enXRjPy1.cjs"),require("./form-Dkh-YG_8.cjs"),require("./icon-BbqYaRVu.cjs"),require("./input-B_MWCRet.cjs"),require("./flex-DeB79N0h.cjs"),require("./list-UOeNjOTt.cjs"),require("./menu-B4k2_5rl.cjs");const I=require("lit/directives/when.js");require("./outlet-DMOeEL6g.cjs"),require("./option-hsAZB8ji.cjs"),require("./radio-group-CLt-d-Ni.cjs"),require("./index-DyJ0oDpR.cjs"),require("./select-BUUelLow.cjs");const U=require("./sheet-CyZB5a4W.cjs");require("./slider-DCRfwhaP.cjs"),require("./schmancy-steps-container-DguK5NK4.cjs"),require("./context-object-BIywslrO.cjs");const T=require("rxjs/operators");require("./surface-TpxKBWnD.cjs"),require("./table-DXPDEHEh.cjs"),require("./tabs-group-CR2cSCNr.cjs"),require("./textarea-CLlh5-HA.cjs"),require("./theme.component-Drmkh4sF.cjs"),require("./theme-button-53Mhj3kQ.cjs"),require("./tree-Bt4J6QVI.cjs"),require("./typewriter-WqDo75_3.cjs"),require("./typography-DbNitvGl.cjs");var Y=Object.getOwnPropertyDescriptor;let H=class extends S.TailwindElement(h.css`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -147,4 +147,4 @@
147
147
  class="${this.classMap({"fixed inset-0 z-49 hidden":!0})}"
148
148
  ></div>
149
149
  `}},u([d.c({context:W,subscribe:!0}),c.state()],exports.SchmancyNavigationDrawerSidebar.prototype,"mode",2),u([d.c({context:j,subscribe:!0}),c.state()],exports.SchmancyNavigationDrawerSidebar.prototype,"drawerState",2),u([c.query("#overlay")],exports.SchmancyNavigationDrawerSidebar.prototype,"overlay",2),u([c.query("nav")],exports.SchmancyNavigationDrawerSidebar.prototype,"nav",2),u([c.property({type:String})],exports.SchmancyNavigationDrawerSidebar.prototype,"width",2),u([c.state()],exports.SchmancyNavigationDrawerSidebar.prototype,"_initialized",2),exports.SchmancyNavigationDrawerSidebar=u([c.customElement("schmancy-nav-drawer-navbar")],exports.SchmancyNavigationDrawerSidebar);const _="whereAreYouRicky",A="hereMorty",f=new class{constructor(){this.activeTeleportations=new Map,this.flipRequests=new n.Subject,this.find=e=>n.zip([n.fromEvent(window,A).pipe(n.filter(t=>!!t.detail.component.uuid&&!!e.id&&t.detail.component.id===e.id&&t.detail.component.uuid!==e.uuid),n.map(t=>t.detail.component),n.take(1)),n.of(e).pipe(n.tap(()=>{window.dispatchEvent(new CustomEvent(_,{detail:{id:e.id,callerID:e.uuid}}))}))]).pipe(n.map(([t])=>t),n.timeout(0)),this.flip=e=>{const{from:t,to:i}=e,s=i.element.style.zIndex;i.element.style.transformOrigin="top left",i.element.style.setProperty("visibility","visible"),i.element.style.zIndex="1000";const a=[{transform:`translate(${t.rect.left-i.rect.left}px, ${t.rect.top-i.rect.top}px) scale(${t.rect.width/i.rect.width}, ${t.rect.height/i.rect.height})`},{transform:"translate(0, 0) scale(1, 1)"}];i.element.animate(a,{duration:250,delay:10,easing:"cubic-bezier(0.455, 0.03, 0.515, 0.955)"}).onfinish=()=>{i.element.style.zIndex=s,i.element.style.transformOrigin=""}},this.flipRequests.pipe(n.bufferTime(1),n.map(e=>e.map(({from:t,to:i,host:s},a)=>({from:t,to:i,host:s,i:a}))),n.concatMap(e=>n.zip(e.map(t=>n.of(this.flip(t)))))).subscribe()}};function B(e){return n.interval(50).pipe(T.map(()=>e.getBoundingClientRect()),T.distinctUntilChanged((t,i)=>t.width===i.width&&t.height===i.height&&t.top===i.top&&t.right===i.right&&t.bottom===i.bottom&&t.left===i.left),T.take(1))}var ye=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,q=(e,t,i,s)=>{for(var a,r=s>1?void 0:s?ue(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(r=(s?a(t,i,r):a(r))||r);return s&&r&&ye(t,i,r),r};exports.SchmancyTeleportation=class extends w.$LitElement(h.css``){constructor(){super(...arguments),this.uuid=Math.floor(Math.random()*Date.now()),this.delay=0,this.debugging=!1}get _slottedChildren(){return this.shadowRoot.querySelector("slot").assignedElements({flatten:!0})}connectedCallback(){if(this.id===void 0)throw new Error("id is required");super.connectedCallback(),n.merge(n.fromEvent(window,O.FINDING_MORTIES).pipe(n.tap({next:()=>{this.dispatchEvent(new CustomEvent(O.HERE_RICKY,{detail:{component:this},bubbles:!0,composed:!0}))}})),n.fromEvent(window,_).pipe(n.tap({next:e=>{e.detail.id===this.id&&this.uuid&&e.detail.callerID!==this.uuid&&this.dispatchEvent(new CustomEvent(A,{detail:{component:this},bubbles:!0,composed:!0}))}}))).pipe(n.takeUntil(this.disconnecting)).subscribe()}async firstUpdated(){n.of(f.activeTeleportations.get(this.id)).pipe(n.filter(e=>!!e),n.takeUntil(this.disconnecting),n.throwIfEmpty()).subscribe({next:e=>{this.style.setProperty("visibility","hidden"),B(this).pipe(n.takeUntil(this.disconnecting)).subscribe({next:t=>{f.activeTeleportations.set(this.id,t),f.flipRequests.next({from:{rect:e},to:{rect:t,element:this._slottedChildren[0]},host:this})}})},error:()=>{this.style.setProperty("visibility","visible"),B(this).pipe(n.takeUntil(this.disconnecting)).subscribe({next:e=>{f.activeTeleportations.set(this.id,e)}})},complete:()=>{}})}render(){return h.html`<slot></slot>`}},q([c.property({type:Number,reflect:!0})],exports.SchmancyTeleportation.prototype,"uuid",2),q([c.property({type:String})],exports.SchmancyTeleportation.prototype,"id",2),q([c.property({type:Number})],exports.SchmancyTeleportation.prototype,"delay",2),exports.SchmancyTeleportation=q([c.customElement("schmancy-teleport")],exports.SchmancyTeleportation),exports.$drawer=ae,exports.HereMorty=A,exports.SchmancyContentDrawerID=X,exports.SchmancyContentDrawerMaxHeight=k,exports.SchmancyContentDrawerMinWidth=N,exports.SchmancyContentDrawerSheetMode=M,exports.SchmancyContentDrawerSheetState=R,exports.SchmancyDrawerNavbarMode=W,exports.SchmancyDrawerNavbarState=j,exports.WhereAreYouRicky=_,exports.schmancyContentDrawer=Z,exports.schmancyNavDrawer=K,exports.teleport=f;
150
- //# sourceMappingURL=teleport.component-72oIW654.cjs.map
150
+ //# sourceMappingURL=teleport.component-C43YKRMJ.cjs.map