From e09542d163339c8f977e5b84ed3e541f2b678ea2 Mon Sep 17 00:00:00 2001 From: klovaaxel Date: Tue, 24 Sep 2024 21:52:06 +0200 Subject: [PATCH 1/9] Removes unused docs and moves current docs to docs folder --- docs/assets/index-Bq3_fauC.js | 5 - docs/assets/index-Dw9mXXwR.css | 1 - docs/index.html | 6 +- {src => docs}/styles/style.css | 0 index.html | 833 --------------------------------- 5 files changed, 3 insertions(+), 842 deletions(-) delete mode 100644 docs/assets/index-Bq3_fauC.js delete mode 100644 docs/assets/index-Dw9mXXwR.css rename {src => docs}/styles/style.css (100%) delete mode 100644 index.html diff --git a/docs/assets/index-Bq3_fauC.js b/docs/assets/index-Bq3_fauC.js deleted file mode 100644 index 07c5aeb..0000000 --- a/docs/assets/index-Bq3_fauC.js +++ /dev/null @@ -1,5 +0,0 @@ -var pt=Object.defineProperty;var mt=(s,t,e)=>t in s?pt(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var A=(s,t,e)=>(mt(s,typeof t!="symbol"?t+"":t,e),e);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const c of n.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function e(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function r(i){if(i.ep)return;i.ep=!0;const n=e(i);fetch(i.href,n)}})();function w(s){return Array.isArray?Array.isArray(s):ot(s)==="[object Array]"}const _t=1/0;function bt(s){if(typeof s=="string")return s;let t=s+"";return t=="0"&&1/s==-_t?"-0":t}function Et(s){return s==null?"":bt(s)}function I(s){return typeof s=="string"}function nt(s){return typeof s=="number"}function At(s){return s===!0||s===!1||Lt(s)&&ot(s)=="[object Boolean]"}function ct(s){return typeof s=="object"}function Lt(s){return ct(s)&&s!==null}function _(s){return s!=null}function U(s){return!s.trim().length}function ot(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}const Mt="Incorrect 'index' type",xt=s=>`Invalid value for key ${s}`,It=s=>`Pattern length exceeds max of ${s}.`,yt=s=>`Missing ${s} property in key`,wt=s=>`Property 'weight' in key '${s}' must be a positive integer`,q=Object.prototype.hasOwnProperty;class vt{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(r=>{let i=at(r);this._keys.push(i),this._keyMap[i.id]=i,e+=i.weight}),this._keys.forEach(r=>{r.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function at(s){let t=null,e=null,r=null,i=1,n=null;if(I(s)||w(s))r=s,t=tt(s),e=V(s);else{if(!q.call(s,"name"))throw new Error(yt("name"));const c=s.name;if(r=c,q.call(s,"weight")&&(i=s.weight,i<=0))throw new Error(wt(c));t=tt(c),e=V(c),n=s.getFn}return{path:t,id:e,weight:i,src:r,getFn:n}}function tt(s){return w(s)?s:s.split(".")}function V(s){return w(s)?s.join("."):s}function St(s,t){let e=[],r=!1;const i=(n,c,a)=>{if(_(n))if(!c[a])e.push(n);else{let l=c[a];const h=n[l];if(!_(h))return;if(a===c.length-1&&(I(h)||nt(h)||At(h)))e.push(Et(h));else if(w(h)){r=!0;for(let o=0,u=h.length;os.score===t.score?s.idx{this._keysMap[e.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,I(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();I(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,r=this.size();e{let c=i.getFn?i.getFn(t):this.getFn(t,i.path);if(_(c)){if(w(c)){let a=[];const l=[{nestedArrIndex:-1,value:c}];for(;l.length;){const{nestedArrIndex:h,value:o}=l.pop();if(_(o))if(I(o)&&!U(o)){let u={v:o,i:h,n:this.norm.get(o)};a.push(u)}else w(o)&&o.forEach((u,d)=>{l.push({nestedArrIndex:d,value:u})})}r.$[n]=a}else if(I(c)&&!U(c)){let a={v:c,n:this.norm.get(c)};r.$[n]=a}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function lt(s,t,{getFn:e=f.getFn,fieldNormWeight:r=f.fieldNormWeight}={}){const i=new X({getFn:e,fieldNormWeight:r});return i.setKeys(s.map(at)),i.setSources(t),i.create(),i}function $t(s,{getFn:t=f.getFn,fieldNormWeight:e=f.fieldNormWeight}={}){const{keys:r,records:i}=s,n=new X({getFn:t,fieldNormWeight:e});return n.setKeys(r),n.setIndexRecords(i),n}function D(s,{errors:t=0,currentLocation:e=0,expectedLocation:r=0,distance:i=f.distance,ignoreLocation:n=f.ignoreLocation}={}){const c=t/s.length;if(n)return c;const a=Math.abs(r-e);return i?c+a/i:a?1:c}function Pt(s=[],t=f.minMatchCharLength){let e=[],r=-1,i=-1,n=0;for(let c=s.length;n=t&&e.push([r,i]),r=-1)}return s[n-1]&&n-r>=t&&e.push([r,n-1]),e}const O=32;function Ft(s,t,e,{location:r=f.location,distance:i=f.distance,threshold:n=f.threshold,findAllMatches:c=f.findAllMatches,minMatchCharLength:a=f.minMatchCharLength,includeMatches:l=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(t.length>O)throw new Error(It(O));const o=t.length,u=s.length,d=Math.max(0,Math.min(r,u));let g=n,p=d;const b=a>1||l,N=b?Array(u):[];let y;for(;(y=s.indexOf(t,p))>-1;){let E=D(t,{currentLocation:y,expectedLocation:d,distance:i,ignoreLocation:h});if(g=Math.min(E,g),p=y+o,b){let v=0;for(;v=Q;L-=1){let F=L-1,Z=e[s.charAt(F)];if(b&&(N[F]=+!!Z),$[L]=($[L+1]<<1|1)&Z,E&&($[L]|=(T[L+1]|T[L])<<1|1|T[L+1]),$[L]>&&(C=D(t,{errors:E,currentLocation:F,expectedLocation:d,distance:i,ignoreLocation:h}),C<=g)){if(g=C,p=F,p<=d)break;Q=Math.max(1,2*d-p)}}if(D(t,{errors:E+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:h})>g)break;T=$}const B={isMatch:p>=0,score:Math.max(.001,C)};if(b){const E=Pt(N,a);E.length?l&&(B.indices=E):B.isMatch=!1}return B}function Dt(s){let t={};for(let e=0,r=s.length;e{this.chunks.push({pattern:d,alphabet:Dt(d),startIndex:g})},u=this.pattern.length;if(u>O){let d=0;const g=u%O,p=u-g;for(;d{const{isMatch:y,score:T,indices:C}=Ft(t,p,b,{location:i+N,distance:n,threshold:c,findAllMatches:a,minMatchCharLength:l,includeMatches:r,ignoreLocation:h});y&&(d=!0),u+=T,y&&C&&(o=[...o,...C])});let g={isMatch:d,score:d?u/this.chunks.length:1};return d&&r&&(g.indices=o),g}}class k{constructor(t){this.pattern=t}static isMultiMatch(t){return et(t,this.multiRegex)}static isSingleMatch(t){return et(t,this.singleRegex)}search(){}}function et(s,t){const e=s.match(t);return e?e[1]:null}class jt extends k{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Bt extends k{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class Ht extends k{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Ut extends k{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Wt extends k{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Vt extends k{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class ut extends k{constructor(t,{location:e=f.location,threshold:r=f.threshold,distance:i=f.distance,includeMatches:n=f.includeMatches,findAllMatches:c=f.findAllMatches,minMatchCharLength:a=f.minMatchCharLength,isCaseSensitive:l=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){super(t),this._bitapSearch=new ht(t,{location:e,threshold:r,distance:i,includeMatches:n,findAllMatches:c,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class ft extends k{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e=0,r;const i=[],n=this.pattern.length;for(;(r=t.indexOf(this.pattern,e))>-1;)e=r+n,i.push([r,e-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}}const z=[jt,ft,Ht,Ut,Vt,Wt,Bt,ut],st=z.length,zt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Kt="|";function Gt(s,t={}){return s.split(Kt).map(e=>{let r=e.trim().split(zt).filter(n=>n&&!!n.trim()),i=[];for(let n=0,c=r.length;n!!(s[j.AND]||s[j.OR]),Qt=s=>!!s[Y.PATH],Zt=s=>!w(s)&&ct(s)&&!J(s),it=s=>({[j.AND]:Object.keys(s).map(t=>({[t]:s[t]}))});function dt(s,t,{auto:e=!0}={}){const r=i=>{let n=Object.keys(i);const c=Qt(i);if(!c&&n.length>1&&!J(i))return r(it(i));if(Zt(i)){const l=c?i[Y.PATH]:n[0],h=c?i[Y.PATTERN]:i[l];if(!I(h))throw new Error(xt(l));const o={keyId:V(l),pattern:h};return e&&(o.searcher=G(h,t)),o}let a={children:[],operator:n[0]};return n.forEach(l=>{const h=i[l];w(h)&&h.forEach(o=>{a.children.push(r(o))})}),a};return J(s)||(s=it(s)),r(s)}function qt(s,{ignoreFieldNorm:t=f.ignoreFieldNorm}){s.forEach(e=>{let r=1;e.matches.forEach(({key:i,norm:n,score:c})=>{const a=i?i.weight:null;r*=Math.pow(c===0&&a?Number.EPSILON:c,(a||1)*(t?1:n))}),e.score=r})}function te(s,t){const e=s.matches;t.matches=[],_(e)&&e.forEach(r=>{if(!_(r.indices)||!r.indices.length)return;const{indices:i,value:n}=r;let c={indices:i,value:n};r.key&&(c.key=r.key.src),r.idx>-1&&(c.refIndex=r.idx),t.matches.push(c)})}function ee(s,t){t.score=s.score}function se(s,t,{includeMatches:e=f.includeMatches,includeScore:r=f.includeScore}={}){const i=[];return e&&i.push(te),r&&i.push(ee),s.map(n=>{const{idx:c}=n,a={item:t[c],refIndex:c};return i.length&&i.forEach(l=>{l(n,a)}),a})}class R{constructor(t,e={},r){this.options={...f,...e},this.options.useExtendedSearch,this._keyStore=new vt(this.options.keys),this.setCollection(t,r)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof X))throw new Error(Mt);this._myIndex=e||lt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){_(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let r=0,i=this._docs.length;r-1&&(l=l.slice(0,e)),se(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(t){const e=G(t,this.options),{records:r}=this._myIndex,i=[];return r.forEach(({v:n,i:c,n:a})=>{if(!_(n))return;const{isMatch:l,score:h,indices:o}=e.searchIn(n);l&&i.push({item:n,idx:c,matches:[{score:h,value:n,norm:a,indices:o}]})}),i}_searchLogical(t){const e=dt(t,this.options),r=(a,l,h)=>{if(!a.children){const{keyId:u,searcher:d}=a,g=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:d});return g&&g.length?[{idx:h,item:l,matches:g}]:[]}const o=[];for(let u=0,d=a.children.length;u{if(_(a)){let h=r(e,a,l);h.length&&(n[l]||(n[l]={idx:l,item:a,matches:[]},c.push(n[l])),h.forEach(({matches:o})=>{n[l].matches.push(...o)}))}}),c}_searchObjectList(t){const e=G(t,this.options),{keys:r,records:i}=this._myIndex,n=[];return i.forEach(({$:c,i:a})=>{if(!_(c))return;let l=[];r.forEach((h,o)=>{l.push(...this._findMatches({key:h,value:c[o],searcher:e}))}),l.length&&n.push({idx:a,item:c,matches:l})}),n}_findMatches({key:t,value:e,searcher:r}){if(!_(e))return[];let i=[];if(w(e))e.forEach(({v:n,i:c,n:a})=>{if(!_(n))return;const{isMatch:l,score:h,indices:o}=r.searchIn(n);l&&i.push({score:h,key:t,value:n,idx:c,norm:a,indices:o})});else{const{v:n,n:c}=e,{isMatch:a,score:l,indices:h}=r.searchIn(n);a&&i.push({score:l,key:t,value:n,norm:c,indices:h})}return i}}R.version="7.0.0";R.createIndex=lt;R.parseIndex=$t;R.config=f;R.parseQuery=dt;Xt(Jt);function ie(){return this._listContainer?this._listContainer:(this._listContainer=this.querySelector('[slot="list"]'),this._listContainer)}function x(){if(this._list)return this._list;if(this._list=this.querySelector('[slot="list"] [data-list]'),this._list||(this._list=this.querySelector('[slot="list"]')),!this._list)throw new Error("List element not found");return this._list}function M(){if(this._input)return this._input;const s=this.querySelector('[slot="input"]');if(!s)throw new Error("Input element not found");return this._input=s,this._input}function W(){if(this._originalList)return this._originalList;const s=x.call(this);return this._originalList=s.cloneNode(!0),this._originalList}function re(){var r;const s=x.call(this),t=M.call(this);t.id=t.id.length!==0?t.id:`input-${crypto.randomUUID()}`,s.id=s.id.length!==0?s.id:`list-${crypto.randomUUID()}`,t.setAttribute("role","combobox"),t.setAttribute("aria-controls",s.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("autocomplete","off"),(r=this._listContainer)==null||r.setAttribute("popover","manual"),s.setAttribute("role","listbox"),s.setAttribute("aria-multiselectable","false"),s.tabIndex=-1;const e=s.children;for(let i=0;i(s.ArrowDown="ArrowDown",s.ArrowUp="ArrowUp",s.ArrowRight="ArrowRight",s.ArrowLeft="ArrowLeft",s.Home="Home",s.End="End",s.Backspace="Backspace",s.Delete="Delete",s.Escape="Escape",s.Enter="Enter",s.Alt="Alt",s))(m||{});function ne(s){const t=M.call(this),e=x.call(this),r=()=>t.getAttribute("aria-expanded")==="true";switch(s.key){case m.ArrowDown:r()?this.focusItem(e.children[0]):(this.toggleList(!0),this._isAltModifierPressed||this.focusItem(e.children[0])),s.preventDefault();break;case m.ArrowUp:r()&&this.focusItem(e.children[e.children.length-1]),s.preventDefault();break;case m.Escape:r()?this.toggleList(!1):t.value="",t.focus();break;case m.Enter:r()&&this.selectItem(e.children[0]);break;case m.Alt:this._isAltModifierPressed=!0;break}}function ce(s){const t=M.call(this),e=x.call(this),r=s.target;switch(s.key){case m.Enter:this.selectItem(r);break;case m.Escape:this.clearInput();break;case m.ArrowDown:{const i=r.nextElementSibling;i?this.focusItem(i):this.focusItem(e.children[0]),s.preventDefault();break}case m.ArrowUp:{if(this._isAltModifierPressed){t.focus(),this.toggleList(!1),s.preventDefault();break}const i=r.previousElementSibling;i?this.focusItem(i):this.focusItem(e.children[e.children.length-1]),s.preventDefault();break}case m.ArrowRight:t.focus();break;case m.ArrowLeft:t.focus();break;case m.Home:t.focus();break;case m.End:t.focus();break;case m.Backspace:t.focus();break;case m.Delete:t.focus();break;case m.Alt:this._isAltModifierPressed=!0;break;default:t.focus();break}}function rt(s){switch(s.key){case"Alt":this._isAltModifierPressed=!1;break}}function oe(){setTimeout(()=>{this.querySelector(":focus")||(this.forceValue(),this.toggleList(!1))},0)}class ae extends HTMLElement{constructor(){super(...arguments);A(this,"_input",null);A(this,"_list",null);A(this,"_listContainer",null);A(this,"_originalList",null);A(this,"_isAltModifierPressed",!1);A(this,"_forceValue",!1);A(this,"_lastValue");A(this,"_limit",1/0);A(this,"_fuse",null);A(this,"_fuseOptions",{includeScore:!0,keys:["dataset.display","dataset.value","innerText"]});A(this,"abortController",new AbortController)}static get observedAttributes(){return["data-value","data-fuse-options","data-listbox","data-limit"]}attributeChangedCallback(e,r,i){if(r!==i)switch(e){case"data-value":this.selectItemByValue(i,!1);break;case"data-fuse-options":{if(!this._fuse){this._fuseOptions=JSON.parse(i);return}const n=W.call(this);this._fuseOptions=JSON.parse(i),this._fuse=new R(Array.from(n.cloneNode(!0).children),this._fuseOptions),this.searchList();break}case"data-listbox":i==="false"?this._forceValue=!1:this._forceValue=!!i;break;case"data-limit":this._limit=parseInt(i);break}}connectedCallback(){const e=this.attachShadow({mode:"open"});e.innerHTML=` - - - `,M.call(this),ie.call(this),x.call(this),re.call(this);const r=W.call(this);this._fuse=new R(Array.from(r.cloneNode(!0).children),this._fuseOptions),this.searchList(),this.addEventListeners(),this.forceValue()}disconnectedCallback(){this.abortController.abort()}toggleList(e=(r=>(r=this._input)==null?void 0:r.getAttribute("aria-expanded"))()!=="true"){var n,c;M.call(this).setAttribute("aria-expanded",`${e}`),e?(n=this._listContainer)==null||n.showPopover():((c=this._listContainer)==null||c.hidePopover(),this.unfocusAllItems())}focusItem(e){e&&(this.unfocusAllItems(),e.focus(),e.setAttribute("aria-selected","true"))}addEventListeners(){const e=M.call(this);this.addEventListener("focusout",oe.bind(this),{signal:this.abortController.signal}),this._input||M.call(this),e.addEventListener("input",this.searchList.bind(this,!0,!0),{signal:this.abortController.signal}),e.addEventListener("focus",this.toggleList.bind(this,!0),{signal:this.abortController.signal}),e.addEventListener("keydown",ne.bind(this),{signal:this.abortController.signal}),e.addEventListener("keyup",rt.bind(this),{signal:this.abortController.signal}),this.addEventListenersToListItems()}addEventListenersToListItems(){const r=x.call(this).children;for(let i=0;iNumber(u.dataset.weight)-Number(o.dataset.weight))),this.addEventListenersToListItems();return}let a=this._fuse.search(i.value).slice(0,this._limit);a=a.map(o=>({item:o.item,score:o.score??1,weight:Number(o.item.dataset.weight??1),refIndex:o.refIndex})).sort((o,u)=>o.score*(u.weight/o.weight)-u.score*(o.weight/u.weight)).map(o=>({item:o.item,score:o.score,weight:o.weight,refIndex:o.refIndex}));const l=a.map(o=>o.item);n.innerHTML="",n.append(...l.map(o=>o.cloneNode(!0)));const h=o=>{var u,d;if(o.nodeType===Node.TEXT_NODE&&((u=o.textContent)==null?void 0:u.trim())!==""&&((d=o.textContent)==null?void 0:d.trim())!==` -`){const g=o.textContent??"",p=document.createElement("template");p.innerHTML=this.highlightText(g,i.value),o.replaceWith(p.content)}else for(const g of o.childNodes)h(g)};for(const o of n.children)h(o);this.addEventListenersToListItems(),this.toggleList(e)}highlightText(e,r){const i=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`[${i}]+`,"gmi");return e.replace(n,"$&").replace(/&/g,"&").replace(//g,">").replace(/<strong>(.*?)<\/strong>/g,"$1")}unfocusAllItems(){const e=x.call(this);for(const r of e.querySelectorAll("[aria-selected]"))r.removeAttribute("aria-selected")}selectItem(e,r=!0){const i=M.call(this);e.dataset.display?i.value=e.dataset.display:e.children.length||Array.from(e.children).every(n=>n.nodeName==="STRONG")?i.value=e.innerText:e.dataset.value?i.value=e.dataset.value:i.value="",e.dataset.value&&(this.dataset.value=e.dataset.value),r&&i.focus(),this.toggleList(!1),this.searchList(!1,!1),this.sendChangeEvent()}selectItemByValue(e,r=!0){if(!e)return;const n=x.call(this).querySelector(`[data-value="${e}"]`);n&&this.selectItem(n,r)}clearInput(e=!0){const r=M.call(this);r.value="",e&&r.focus(),this.toggleList(!1)}forceValue(){var r;const e=x.call(this);if(this._forceValue&&((r=this._input)!=null&&r.value)&&!this.dataset.value){const i=e.children[0];i?this.selectItem(i,!1):(this.clearInput(!1),this.dataset.value="",this.sendChangeEvent())}}sendChangeEvent(){if(this.dataset.value===this._lastValue)return;const e=new Event("change");this.dispatchEvent(e),this._lastValue=this.dataset.value}}customElements.define("combobox-framework",ae); diff --git a/docs/assets/index-Dw9mXXwR.css b/docs/assets/index-Dw9mXXwR.css deleted file mode 100644 index 5485b71..0000000 --- a/docs/assets/index-Dw9mXXwR.css +++ /dev/null @@ -1 +0,0 @@ -:root{--primary-color: #4cb5ae;--primary-color-dark: #3a8c87;--text-color: #f7f7ff;--background-color: #111;--background-color-dark: #000}::selection{background:var(--primary-color);color:var(--background-color-dark)}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{border-radius:100vw;background:var(--background-color-dark)}::-webkit-scrollbar-thumb{border-radius:100vw;background:var(--primary-color)}::-webkit-scrollbar-thumb:hover{background:var(--primary-color-dark)}body{background-color:var(--background-color);color:var(--text-color);padding:min(2.5rem,5vw);font-family:Atkinson Hyperlegible,sans-serif;max-width:min(80ch,100dvw);margin:0 auto}h1,h2,h3,h4,h5,h6{font-family:Source Code Pro,monospace}h1{font-size:clamp(min(11vw,3rem),11vw,3rem)}nav{display:flex;flex-wrap:wrap;align-items:center;gap:1rem}a{color:var(--primary-color)}pre{background-color:var(--background-color-dark);color:var(--text-color);display:block;border-radius:.5rem;font-family:Source Code Pro,monospace;max-width:90%;overflow-x:auto}code{font-family:Source Code Pro,monospace}:not(combobox-framework)>ul{list-style:none;padding-inline-start:1.5rem}:not(combobox-framework)>ul li{margin-block:1rem}.features li{padding-left:.5ch}.features .accessible::marker{content:"🌟"}.features .styling::marker{content:"🎨"}section:has(h2):not(:has(h3)),section:not(:has(h2)):has(h3){border-left:5px solid var(--primary-color);padding-left:2rem;margin-left:-2rem} diff --git a/docs/index.html b/docs/index.html index d630b49..2243102 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,6 +11,7 @@ + Combobox Framework @@ -20,11 +21,8 @@ - - -

Combobox framework documentation

@@ -800,6 +798,8 @@

Styling

+ + - - - - - - - -
-
-

Combobox framework documentation

- - - -

- An adaptable framework for building accessible comboboxes. Built as a web component, it can be used - in any framework or vanilla HTML/CSS/JS. -

- -
-

Key features

- -
    -
  • - Accessible! Built to follow the WAI-ARIA combobox design pattern. Built for keyboard - navigation, screen readers, and other assistive technologies. -
  • -
  • - Easy to style! Bind your own elements to the framework slots, and style them however you - want. Easy to integrate into any design system. -
  • -
-
- -

What follows are examples of how to use/implement the combobox-framework component

-
- -
-

Installation

- -
-

Link in from CDN

-
<script type="module" src="https://unpkg.com/combobox-framework"></script>
-
- -
-

Install from npm

-

Install the combobox-framework from npm

-
npm install combobox-framework
- -

Import the combobox-framework into your project

-
import 'combobox-framework';
-
-
- -
-

Demo

- -

- A "real world" example of how the combobox-framework can be used. - Meant to show how the search functionality can be used with a larger dataset (91 options). -

- -

- The example is a combobox-framework with a input and a table of cast members from the movie The - Shawshank Redemption. The input is used to search for a cast member, and the table is used to show - the cast members. -

- -

- Note: The focus of this demo is not on the styling, but on the functionality of the combobox-framework. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameRole
Tim RobbinsAndy Dufresne
Morgan FreemanEllis Boyd "Red" Redding
Bob GuntonWarden Samuel Norton
William SadlerHeywood
Clancy BrownByron Hadley
Gil BellowsTommy Williams
James WhitmoreBrooks Hatlen
Mark RolstonBogs Diamond
Jeffrey DeMunn1946 D.A.
Larry BrandenburgSkeet
Neil GiuntoliJigger
Brian LibbyFloyd
David ProvalSnooze
Joseph RagnoErnie
Jude CiccolellaGuard Mert
Paul McCraneGuard Trout
Renee BlaineLinda Dufresne (Andy Dufresne's Wife)
Scott MannGlenn Quentin
John HortonLloyd Henreid (Judge)
Gordon Greene1947 Parole Hearings Man
Alfonso FreemanFresh Fish Con
V.J. FosterHungry Fish Con (as V.J. Foster)
John E. SummersNew Fish Guard
Frank MedranoFat Ass
Mack MilesTyrell
Alan R. KesslerLaundry Bob
Morgan LundLaundry Truck Driver
Cornell WallaceLaundry Leonard
Gary Lee DavisRooster
Neil SummersPete
Ned BellamyGuard Youngblood
Joe PecoraroProjectionist
Harold E. Cope Jr.Hole Guard
Brian DelateGuard Dekins
Don McManusGuard Wiley
Dorothy SilverLandlady
Donald ZinnMoresby Batter
Robert Haley1954 Food-Way Manager
Dana Snyder1954 Food-Way Proprietor
John D. Craig1954 Food-Way Customer
Ken MageeNed Grimes
Eugene C. DePasqualeMail Caller
Bill BolenderElmo Blatch
Ron NewellElderly Hole Guard
John R. WoodwardBullhorn Tower Guard
Chuck BrauchlerMan Missing Guard
Dion AndersonHead Bull Haig
Claire SlemmerBank Teller
James KisickiBank Manager
Rohn ThomasBugle Editor
Charlie Kearns1966 D.A
Rob ReiderDuty Guard
Brian Brophy1967 Parole Hearings Man
Paul Kennedy1967 Food-Way Manager
John D. CraigOld Man on Bus (uncredited)
Fred CulbertsonPolice Officer (uncredited)
Richard DooneCon (uncredited)
Samantha GoldbergBank Employee (uncredited)
Shane GroveInmate (uncredited)
Rita HayworthGilda Mundson Farrell (archive footage) (uncredited)
Bill McKinneyBank Teller
Alonzo F. JonesInmate (uncredited)
Gary JonesConvict (uncredited)
Sergio KatoInmate II (uncredited)
Michael LightseyCon (uncredited)
Tracy LoveCourt Spectator (uncredited)
George MacreadyBallin Mundson (archive footage) (uncredited)
Christopher PageTraffic (driver) (uncredited)
Neil RiddawayCon (uncredited)
Brad Spencer1957 Parole Hearings Guard (uncredited)
Jodiviah SteppNew Fish Con (uncredited)
Mark A. StrainYard Inmate (uncredited)
James BabsonCon (uncredited)
Dennis BakerOld Man on Bus (uncredited)
Fred CulbertsonPolice Officer (uncredited)
Richard DooneCon (uncredited)
Samantha GoldbergBank Employee (uncredited)
Shane GroveInmate (uncredited)
Rita HayworthGilda Mundson Farrell (archive footage) (uncredited)
David HechtBank Teller
Alonzo F. JonesInmate (uncredited)
Gary JonesConvict (uncredited)
Sergio KatoInmate II (uncredited)
Michael LightseyCon (uncredited)
Tracy LoveCourt Spectator (uncredited)
George MacreadyBallin Mundson (archive footage) (uncredited)
Christopher PageTraffic (driver) (uncredited)
Neil RiddawayCon (uncredited)
Brad Spencer1957 Parole Hearings Guard (uncredited)
Jodiviah SteppNew Fish Con (uncredited)
Mark A. StrainYard Inmate (uncredited)
-
-
- -
-

Examples

- - - -
-

Simple list

- -

- To use the combobox-framework, you need to add a input element and a list of items. - The input element needs to be placed in a slot="input" attribute and - the list of items needs to be placed in a slot="list" attribute. -

- -

- The li elements needs to have a data-value attribute. This is the - value that will be set on the combobox-framework element as the - data-value when a option is selected. -

- -
- - -
    -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
  • Item 4
  • -
-
-
-
- -
-

Simple list with custom display data

- -

- To show diffrent data in the input than in the list, you need to add the - data-display attribute to the li element. This is the value that will - be shown in the input when a option is selected. -

- -
- - -
    -
  • 1
  • -
  • 2
  • -
  • 3
  • -
  • 4
  • -
-
-
-
- -
-

List with nested elements

- -

- To use nested elements, you need to add the data-display attribute to the - li element. This is the value that will be shown in the input when a option is - selected. -

- -
- - -
    -
  • -
    Item 1
    -
  • -
  • -
    Item 2
    -
  • -
  • -
    Item 3
    -
  • -
  • -
    Item 4
    -
  • -
-
-
-
- -
-

Tabular data

- -

- To use tabular data, you need to add the data-list attribute to the - tbody element. This will tell the combobox-framework to use the - tbody element as the list of items and not the table itself. -

- -
- - - - - - - - - - - - - - - - - - - - - - - - - -
NameNumber
Item1
Item2
Item3
Item4
-
-
-
- -
-

Preselected option

- -

- To preselect a option, you need to add the data-value attribute to the - combobox-framework element. This will tell the combobox-framework to select the - option with the matching data-value attribute. -

- -
- - -
    -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
  • Item 4
  • -
-
-
-
- -
-

Custom Fuse/Fuzzy search options

- -

- To use custom fuse/fuzzy search options, you need to add the - data-fuse-options attribute to the combobox-framework element, and - pass in a JSON string of the settings object. This will tell the combobox-framework to use the - custom options when searching for a option. -

- -

- For what options are available, see the - Fuse.js documentation -

- -
- - -
    -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
  • Item 4
  • -
-
-
-
- -
-

Force value/Listbox

- -

- To force the combobox-framework to act as a searchable listbox, you need to add the - data-listbox attribute to the combobox-framework element. This will - tell the combobox-framework to act as a searchable listbox instead of a combobox. And only allow - the value to be one of the options in the list or null. -

- -
- - -
    -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
  • Item 4
  • -
-
-
-
- -
-

Limit suggested options

- -

- To limit the number of suggested options, you need to add the data-limit attribute - to the combobox-framework element. This will tell the combobox-framework to only - show the number of options specified in the data-limit attribute. -

- -
- - -
    -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
  • Item 4
  • -
-
-
-
- -
- - -

- To use weighted item search, you need to add the data-weight attribute to the - li element. This is the value that will be used to sort the options when searching - for a option. -

- -

- NOTE: Fuse options must have includeScore set to true for weighted search to work. - includeScore is true by default, if you have not set custom fuse options. -

- -

- NOTE: The data-weight attribute is a number, and the higher the number the higher the weight. -

- -
- - -
    -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
  • Item 4
  • -
-
-
-
- -
-

Change events

- -

- To add a change event, you need to add the onchange attribute to the - combobox-framework element. This will tell the combobox-framework to run the - function when the value of the combobox changes. -

- -
- - -
    -
  • Item 1
  • -
  • Item 2
  • -
  • Item 3
  • -
  • Item 4
  • -
-
-
-
- -
- -
-

Styling

- -

This is the styling thats being used on this demo page. Hopefully it gives a good starting point

- -
- -
-
-
- - - - - From 53867f92f7761cce5bc7b4117a3e02678a533979 Mon Sep 17 00:00:00 2001 From: klovaaxel Date: Tue, 24 Sep 2024 21:52:48 +0200 Subject: [PATCH 2/9] Rearanges head tag to follow performance/accessibilty guidelines --- docs/index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/index.html b/docs/index.html index 2243102..fe2c34a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,15 +4,16 @@ + + Combobox Framework + + - - - Combobox Framework From e3e9d4a688f649da4581fbad6c4a229b2afcb8dd Mon Sep 17 00:00:00 2001 From: klovaaxel Date: Tue, 24 Sep 2024 21:53:29 +0200 Subject: [PATCH 3/9] Refactors handlers, removes unneccesary regions and simplifies logic --- src/handlers.ts | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/handlers.ts b/src/handlers.ts index 97db32d..e4b6d12 100644 --- a/src/handlers.ts +++ b/src/handlers.ts @@ -47,7 +47,6 @@ export function handleComboBoxKeyPress(this: ComboboxFramework, event: KeyboardE } export function handleListKeyPress(this: ComboboxFramework, event: KeyboardEvent): void { - // #region Handle the key press const li = event.target as HTMLElement; switch (event.key) { case KeyCode.Enter: @@ -83,11 +82,6 @@ export function handleListKeyPress(this: ComboboxFramework, event: KeyboardEvent event.preventDefault(); // prevent scrolling break; } - case KeyCode.ArrowRight: - case KeyCode.ArrowLeft: - // returns focus to the combobox without closing the popup - this.input?.focus(); - break; case KeyCode.Alt: this.isAltModifierPressed = true; break; @@ -95,22 +89,17 @@ export function handleListKeyPress(this: ComboboxFramework, event: KeyboardEvent case KeyCode.End: case KeyCode.Backspace: case KeyCode.Delete: + case KeyCode.ArrowRight: + case KeyCode.ArrowLeft: default: // Move focus back to the input this.input?.focus(); break; } - // #endregion } export function handleKeyUp(this: ComboboxFramework, event: KeyboardEvent): void { - // #region Handle the key press - switch (event.key) { - case "Alt": - this.isAltModifierPressed = false; - break; - } - // #endregion + if (event.key === "Alt") this.isAltModifierPressed = false; } export function handleBlur(this: ComboboxFramework): void { @@ -118,10 +107,7 @@ export function handleBlur(this: ComboboxFramework): void { setTimeout(() => { if (this.querySelector(":focus")) return; - // #region If forceValue is true, select the first item in the list this.forceValue(); - // #endregion - this.toggleList(false); }, 0); } From d8a8c1b69702b28a0a3a90c81c8c22e38bd132f3 Mon Sep 17 00:00:00 2001 From: klovaaxel Date: Tue, 24 Sep 2024 21:54:11 +0200 Subject: [PATCH 4/9] Adds size info to build command output --- bun.lockb | Bin 93827 -> 93365 bytes dev-tools/filesize.ts | 30 ++++++++++++++++++++++++++++++ package.json | 8 +++++--- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 dev-tools/filesize.ts diff --git a/bun.lockb b/bun.lockb index 46589e4e3b510bea8af98f7458bee5f5a6d3f6e8..4f0d9cff5f39af7413ff64fd0030a79cf713cc18 100644 GIT binary patch delta 16495 zcmeHOd3a4%*T4HDm)t~1BJ&^#LV}DWH!@se)@y9(H584wkxL|z0f`|o*I2r6%(E7) zmZC_}hHB9&s@|fg(o!{4RR>gkzjX%jzEAr-{l4${{_A=C_S(O_*Is+Cz1KeH<~V!u z1>?@M#(6PO*7h~JpIAC`*oZ=+bIP?V#j1`Nhe3>reaogylx$3Iksc=G#I8 zU-?zZYl)Y^P?23yWRDqEWFU_k{^g-g215u6ogjlDuSzOE1{nbU7GyohS&$7OheL)z zcGb$8Le>Yb1sMu?3th834$1AdYJ34C+b@L-g5)8(8w}+Y1^GqASw%&LXp>S<(E!pF z3VE4%`Hmq5gS}{Qi6eK2;hvkpz@z^fvM%H?NN>n@wer_Az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q1b>hD|=`y?hv_(eSfkM)G7 zL<>@feUSQ#F}~P1=}4r$KkAR4+^E@_^DB9OsMBPTTmN5Aocdxzv|7VW1k3xP)s}8} z$|c9B6>jLIPmKDt8$8u@p=r;bS8jR+ydUN+ur2uILYf8yq5uBNuU$)CbK;Ncl65g^ zYj;@fx+JwL%zbFgPcPJ~u5ms_9gZ6Du4`4Z=igtsH`J%9x`ylG)ek9Q9=E%6JzQPV zDOP=j+q$l5Eu0cKc=FiWEvsv|E^`g|`mORAzf1|JE-8;yf9H|8u75S2@VNMX;wfi! zjnlDej0tR#qS}|+y6$bgEnVx;{F0npUBh*=%dx-1rnWV5eyA=voT#ou+d$V{u(g{f zXI=9M`?R{of9*O?lzTTm-15@n)iqof%p&TxY$Il0EUzwU-Ck`{6K!2r z(nd7+U8xgP|JUjou1jk_E-AWM-s#uZs!KB4tJ!E9=(^@cNmoL%<}ROEU1NTGbq#AT z$H?l#{f_?X44SxpAXV3JU7hprv9{VL7JXPd5Q6sXuL)GWx4LQxvr0~Kk0u;xNf((E|6)1(jJ|z`){r*W+*Y<0$exb zT$j*LV!Y3&-PI-`!mpj{&fAIjU7g?h_~tPEd5rT^a@~rnb4y(kWIev7y5y`nIs`_! zuF-vex6SD9Lfznl{3z$9UOm(`P;PZyygRTw-LJ=@taqwwxUS|6oS*#sE4{uAtu9IC zPpSy#L)BkHMCainaNP27Hhc1*P87PKARC+?@_(-UIO^vG{x>EVKzI8e%o-?(J+7=lxX*6@B+!2^DvJ_I6Ac7PoHyZeY=oj~H#F?oLrf zqb59Pt9A2`jgiq0iXN&y4)>x*W=E#w<>E?zp(8K1a9n0;(YR5Od?A=^)zpOiOC|>K rFFER=WDyqrzqN7A|J6mLMNLT*q5dxKMvMs+k?k&p{&D{S7l?S!| diff --git a/dev-tools/filesize.ts b/dev-tools/filesize.ts new file mode 100644 index 0000000..fda41a2 --- /dev/null +++ b/dev-tools/filesize.ts @@ -0,0 +1,30 @@ +const fs = require("fs"); +const path = require("path"); + +const getAllFiles = (dirPath, arrayOfFiles: string[] = []) => { + const files = fs.readdirSync(dirPath); + + let filesArray = arrayOfFiles; + + for (const file of files) + if (fs.statSync(`${dirPath}/${file}`).isDirectory()) + filesArray = getAllFiles(`${dirPath}/${file}`, filesArray); + else filesArray.push(path.join(path.resolve(__dirname, ".."), dirPath, file)); + + return filesArray; +}; + +const getSizeOfFiles = (files) => { + let size = 0; + for (const file of files) size += fs.statSync(file).size; + + return size; +}; + +const srcFiles = getAllFiles("src"); +const srcSize = getSizeOfFiles(srcFiles); +console.log(`The size of all files in the SRC directory is ${srcSize} bytes.`); + +const distFiles = getAllFiles("dist"); +const distSize = getSizeOfFiles(distFiles); +console.log(`The size of all files in the DIST directory is ${distSize} bytes.`); diff --git a/package.json b/package.json index 7fd02fd..98604a7 100644 --- a/package.json +++ b/package.json @@ -28,16 +28,18 @@ "files": ["dist/**"], "scripts": { "dev": "cypress open --component", - "build": "bun lint; tsc && bun run build.mjs; cypress run --component; echo \"Done! Don't forget to update the version number in package.json\"", + "build": "bun lint; tsc && bun run build.mjs; cypress run --component; bun dev-tools/filesize.ts; echo \"Done! Don't forget to update the version number in package.json\"", "lint": "bunx @biomejs/biome check --apply *.json; bunx @biomejs/biome check --apply src/" }, "devDependencies": { "@biomejs/biome": "^1.5.3", "@types/cypress": "^1.1.3", "bun-plugin-dts": "^0.2.1", + "cypress": "^13.7.2", + "fs": "^0.0.1-security", + "path": "^0.12.7", "typescript": "^5.2.2", - "vite": "^5.2.8", - "cypress": "^13.7.2" + "vite": "^5.2.8" }, "dependencies": { "fuse.js": "^7.0.0" From f27806fd80dd00edd891bf63d84e282d766ebada Mon Sep 17 00:00:00 2001 From: klovaaxel Date: Tue, 24 Sep 2024 21:55:44 +0200 Subject: [PATCH 5/9] Removes old demo code --- demo/assets/index-8m_zFTSv.css | 1 - demo/assets/index-IGd_RBah.js | 4 ---- demo/index.html | 33 --------------------------------- 3 files changed, 38 deletions(-) delete mode 100644 demo/assets/index-8m_zFTSv.css delete mode 100644 demo/assets/index-IGd_RBah.js delete mode 100644 demo/index.html diff --git a/demo/assets/index-8m_zFTSv.css b/demo/assets/index-8m_zFTSv.css deleted file mode 100644 index 33b60ef..0000000 --- a/demo/assets/index-8m_zFTSv.css +++ /dev/null @@ -1 +0,0 @@ -ul{position:absolute;top:anchor(bottom);left:anchor(left);right:anchor(right);list-style:none;margin:0;padding:0;background-color:#fff;border:1px solid black;border-radius:0 0 .2rem .2rem}li{padding:.2rem;cursor:pointer}li:hover{background-color:#eee}input[aria-expanded=false]+ul{display:none} diff --git a/demo/assets/index-IGd_RBah.js b/demo/assets/index-IGd_RBah.js deleted file mode 100644 index 8558239..0000000 --- a/demo/assets/index-IGd_RBah.js +++ /dev/null @@ -1,4 +0,0 @@ -var lt=Object.defineProperty;var ut=(s,t,e)=>t in s?lt(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var v=(s,t,e)=>(ut(s,typeof t!="symbol"?t+"":t,e),e);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))e(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const n of r.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&e(n)}).observe(document,{childList:!0,subtree:!0});function t(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function e(i){if(i.ep)return;i.ep=!0;const r=t(i);fetch(i.href,r)}})();function L(s){return Array.isArray?Array.isArray(s):st(s)==="[object Array]"}const dt=1/0;function ft(s){if(typeof s=="string")return s;let t=s+"";return t=="0"&&1/s==-dt?"-0":t}function pt(s){return s==null?"":ft(s)}function M(s){return typeof s=="string"}function tt(s){return typeof s=="number"}function gt(s){return s===!0||s===!1||_t(s)&&st(s)=="[object Boolean]"}function et(s){return typeof s=="object"}function _t(s){return et(s)&&s!==null}function _(s){return s!=null}function j(s){return!s.trim().length}function st(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}const mt="Incorrect 'index' type",bt=s=>`Invalid value for key ${s}`,Et=s=>`Pattern length exceeds max of ${s}.`,Mt=s=>`Missing ${s} property in key`,yt=s=>`Property 'weight' in key '${s}' must be a positive integer`,Q=Object.prototype.hasOwnProperty;class Lt{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(i=>{let r=it(i);this._keys.push(r),this._keyMap[r.id]=r,e+=r.weight}),this._keys.forEach(i=>{i.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function it(s){let t=null,e=null,i=null,r=1,n=null;if(M(s)||L(s))i=s,t=X(s),e=D(s);else{if(!Q.call(s,"name"))throw new Error(Mt("name"));const o=s.name;if(i=o,Q.call(s,"weight")&&(r=s.weight,r<=0))throw new Error(yt(o));t=X(o),e=D(o),n=s.getFn}return{path:t,id:e,weight:r,src:i,getFn:n}}function X(s){return L(s)?s:s.split(".")}function D(s){return L(s)?s.join("."):s}function At(s,t){let e=[],i=!1;const r=(n,o,c)=>{if(_(n))if(!o[c])e.push(n);else{let h=o[c];const a=n[h];if(!_(a))return;if(c===o.length-1&&(M(a)||tt(a)||gt(a)))e.push(pt(a));else if(L(a)){i=!0;for(let l=0,d=a.length;ls.score===t.score?s.idx{this._keysMap[e.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,M(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();M(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,i=this.size();e{let o=r.getFn?r.getFn(t):this.getFn(t,r.path);if(_(o)){if(L(o)){let c=[];const h=[{nestedArrIndex:-1,value:o}];for(;h.length;){const{nestedArrIndex:a,value:l}=h.pop();if(_(l))if(M(l)&&!j(l)){let d={v:l,i:a,n:this.norm.get(l)};c.push(d)}else L(l)&&l.forEach((d,f)=>{h.push({nestedArrIndex:f,value:d})})}i.$[n]=c}else if(M(o)&&!j(o)){let c={v:o,n:this.norm.get(o)};i.$[n]=c}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function rt(s,t,{getFn:e=u.getFn,fieldNormWeight:i=u.fieldNormWeight}={}){const r=new V({getFn:e,fieldNormWeight:i});return r.setKeys(s.map(it)),r.setSources(t),r.create(),r}function Ot(s,{getFn:t=u.getFn,fieldNormWeight:e=u.fieldNormWeight}={}){const{keys:i,records:r}=s,n=new V({getFn:t,fieldNormWeight:e});return n.setKeys(i),n.setIndexRecords(r),n}function C(s,{errors:t=0,currentLocation:e=0,expectedLocation:i=0,distance:r=u.distance,ignoreLocation:n=u.ignoreLocation}={}){const o=t/s.length;if(n)return o;const c=Math.abs(i-e);return r?o+c/r:c?1:o}function Rt(s=[],t=u.minMatchCharLength){let e=[],i=-1,r=-1,n=0;for(let o=s.length;n=t&&e.push([i,r]),i=-1)}return s[n-1]&&n-i>=t&&e.push([i,n-1]),e}const k=32;function Nt(s,t,e,{location:i=u.location,distance:r=u.distance,threshold:n=u.threshold,findAllMatches:o=u.findAllMatches,minMatchCharLength:c=u.minMatchCharLength,includeMatches:h=u.includeMatches,ignoreLocation:a=u.ignoreLocation}={}){if(t.length>k)throw new Error(Et(k));const l=t.length,d=s.length,f=Math.max(0,Math.min(i,d));let p=n,g=f;const m=c>1||h,x=m?Array(d):[];let y;for(;(y=s.indexOf(t,g))>-1;){let b=C(t,{currentLocation:y,expectedLocation:f,distance:r,ignoreLocation:a});if(p=Math.min(b,p),g=y+l,m){let A=0;for(;A=Y;E-=1){let $=E-1,G=e[s.charAt($)];if(m&&(x[$]=+!!G),R[E]=(R[E+1]<<1|1)&G,b&&(R[E]|=(O[E+1]|O[E])<<1|1|O[E+1]),R[E]&at&&(S=C(t,{errors:b,currentLocation:$,expectedLocation:f,distance:r,ignoreLocation:a}),S<=p)){if(p=S,g=$,g<=f)break;Y=Math.max(1,2*f-g)}}if(C(t,{errors:b+1,currentLocation:f,expectedLocation:f,distance:r,ignoreLocation:a})>p)break;O=R}const F={isMatch:g>=0,score:Math.max(.001,S)};if(m){const b=Rt(x,c);b.length?h&&(F.indices=b):F.isMatch=!1}return F}function Tt(s){let t={};for(let e=0,i=s.length;e{this.chunks.push({pattern:f,alphabet:Tt(f),startIndex:p})},d=this.pattern.length;if(d>k){let f=0;const p=d%k,g=d-p;for(;f{const{isMatch:y,score:O,indices:S}=Nt(t,g,m,{location:r+x,distance:n,threshold:o,findAllMatches:c,minMatchCharLength:h,includeMatches:i,ignoreLocation:a});y&&(f=!0),d+=O,y&&S&&(l=[...l,...S])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&i&&(p.indices=l),p}}class w{constructor(t){this.pattern=t}static isMultiMatch(t){return J(t,this.multiRegex)}static isSingleMatch(t){return J(t,this.singleRegex)}search(){}}function J(s,t){const e=s.match(t);return e?e[1]:null}class $t extends w{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Ct extends w{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const i=t.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class Pt extends w{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Ft extends w{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Kt extends w{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class jt extends w{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class ot extends w{constructor(t,{location:e=u.location,threshold:i=u.threshold,distance:r=u.distance,includeMatches:n=u.includeMatches,findAllMatches:o=u.findAllMatches,minMatchCharLength:c=u.minMatchCharLength,isCaseSensitive:h=u.isCaseSensitive,ignoreLocation:a=u.ignoreLocation}={}){super(t),this._bitapSearch=new nt(t,{location:e,threshold:i,distance:r,includeMatches:n,findAllMatches:o,minMatchCharLength:c,isCaseSensitive:h,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class ct extends w{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e=0,i;const r=[],n=this.pattern.length;for(;(i=t.indexOf(this.pattern,e))>-1;)e=i+n,r.push([i,e-1]);const o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}const B=[$t,ct,Pt,Ft,jt,Kt,Ct,ot],Z=B.length,Dt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Bt="|";function Ut(s,t={}){return s.split(Bt).map(e=>{let i=e.trim().split(Dt).filter(n=>n&&!!n.trim()),r=[];for(let n=0,o=i.length;n!!(s[P.AND]||s[P.OR]),Vt=s=>!!s[W.PATH],Yt=s=>!L(s)&&et(s)&&!z(s),q=s=>({[P.AND]:Object.keys(s).map(t=>({[t]:s[t]}))});function ht(s,t,{auto:e=!0}={}){const i=r=>{let n=Object.keys(r);const o=Vt(r);if(!o&&n.length>1&&!z(r))return i(q(r));if(Yt(r)){const h=o?r[W.PATH]:n[0],a=o?r[W.PATTERN]:r[h];if(!M(a))throw new Error(bt(h));const l={keyId:D(h),pattern:a};return e&&(l.searcher=H(a,t)),l}let c={children:[],operator:n[0]};return n.forEach(h=>{const a=r[h];L(a)&&a.forEach(l=>{c.children.push(i(l))})}),c};return z(s)||(s=q(s)),i(s)}function Gt(s,{ignoreFieldNorm:t=u.ignoreFieldNorm}){s.forEach(e=>{let i=1;e.matches.forEach(({key:r,norm:n,score:o})=>{const c=r?r.weight:null;i*=Math.pow(o===0&&c?Number.EPSILON:o,(c||1)*(t?1:n))}),e.score=i})}function Qt(s,t){const e=s.matches;t.matches=[],_(e)&&e.forEach(i=>{if(!_(i.indices)||!i.indices.length)return;const{indices:r,value:n}=i;let o={indices:r,value:n};i.key&&(o.key=i.key.src),i.idx>-1&&(o.refIndex=i.idx),t.matches.push(o)})}function Xt(s,t){t.score=s.score}function Jt(s,t,{includeMatches:e=u.includeMatches,includeScore:i=u.includeScore}={}){const r=[];return e&&r.push(Qt),i&&r.push(Xt),s.map(n=>{const{idx:o}=n,c={item:t[o],refIndex:o};return r.length&&r.forEach(h=>{h(n,c)}),c})}class N{constructor(t,e={},i){this.options={...u,...e},this.options.useExtendedSearch,this._keyStore=new Lt(this.options.keys),this.setCollection(t,i)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof V))throw new Error(mt);this._myIndex=e||rt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){_(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let i=0,r=this._docs.length;i-1&&(h=h.slice(0,e)),Jt(h,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t){const e=H(t,this.options),{records:i}=this._myIndex,r=[];return i.forEach(({v:n,i:o,n:c})=>{if(!_(n))return;const{isMatch:h,score:a,indices:l}=e.searchIn(n);h&&r.push({item:n,idx:o,matches:[{score:a,value:n,norm:c,indices:l}]})}),r}_searchLogical(t){const e=ht(t,this.options),i=(c,h,a)=>{if(!c.children){const{keyId:d,searcher:f}=c,p=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(h,d),searcher:f});return p&&p.length?[{idx:a,item:h,matches:p}]:[]}const l=[];for(let d=0,f=c.children.length;d{if(_(c)){let a=i(e,c,h);a.length&&(n[h]||(n[h]={idx:h,item:c,matches:[]},o.push(n[h])),a.forEach(({matches:l})=>{n[h].matches.push(...l)}))}}),o}_searchObjectList(t){const e=H(t,this.options),{keys:i,records:r}=this._myIndex,n=[];return r.forEach(({$:o,i:c})=>{if(!_(o))return;let h=[];i.forEach((a,l)=>{h.push(...this._findMatches({key:a,value:o[l],searcher:e}))}),h.length&&n.push({idx:c,item:o,matches:h})}),n}_findMatches({key:t,value:e,searcher:i}){if(!_(e))return[];let r=[];if(L(e))e.forEach(({v:n,i:o,n:c})=>{if(!_(n))return;const{isMatch:h,score:a,indices:l}=i.searchIn(n);h&&r.push({score:a,key:t,value:n,idx:o,norm:c,indices:l})});else{const{v:n,n:o}=e,{isMatch:c,score:h,indices:a}=i.searchIn(n);c&&r.push({score:h,key:t,value:n,norm:o,indices:a})}return r}}N.version="7.0.0";N.createIndex=rt;N.parseIndex=Ot;N.config=u;N.parseQuery=ht;zt(Wt);class Zt extends HTMLElement{constructor(){super();v(this,"_input",null);v(this,"_list",null);v(this,"_originalList",null);v(this,"_isAltModifierPressed",!1);v(this,"_fuse",null);v(this,"_fuseOptions",{includeScore:!0,keys:["dataset.display","dataset.value"]})}static get observedAttributes(){return["data-value","data-fuse-options"]}attributeChangedCallback(e,i,r){if(i!==r)switch(e){case"data-value":this.selectItemByValue(r);break}}connectedCallback(){const e=new Date().getTime(),i=this.attachShadow({mode:"open"});if(i.innerHTML=` - - - `,this._input=this.querySelector('[slot="input"]'),this._list=this.querySelector('[slot="list"]'),!this._input)throw new Error("Input element not found");if(!this._list)throw new Error("List element not found");this.setBasicAttribbutes(),this._originalList=this._list.cloneNode(!0),this._fuse=new N(Array.from(this._originalList.cloneNode(!0).children),this._fuseOptions),this.searchList(),this.addEventListeners(),console.debug("Loaded ComboboxFramework in",new Date().getTime()-e,"ms")}setBasicAttribbutes(){this._input.id=this._input.id.length!=0?this._input.id:`input-${crypto.randomUUID()}`,this._list.id=this._list.id.length!=0?this._list.id:`list-${crypto.randomUUID()}`,this._input.setAttribute("role","combobox"),this._input.setAttribute("aria-controls",this._list.id),this._input.setAttribute("aria-expanded","false"),this._input.setAttribute("aria-autocomplete","list"),this._input.setAttribute("type","text"),this._input.setAttribute("autocomplete","off"),this._list.setAttribute("role","listbox"),this._list.setAttribute("aria-multiselectable","false"),this._list.setAttribute("anchor",this._input.id),this._list.tabIndex=-1;const e=this._list.children;for(let i=0;ii.item);this._list.innerHTML="",this._list.append(...e),this.addEventListenersToListItems(),this.toggleList(!0)}toggleList(e=this._input.getAttribute("aria-expanded")==="true"){this._input.setAttribute("aria-expanded",`${e}`),e||this.unfocusAllItems()}focusItem(e){e&&(e.focus(),this._list.querySelectorAll("[aria-selected]").forEach(i=>i.removeAttribute("aria-selected")),e.setAttribute("aria-selected","true"))}unfocusAllItems(){this._list.querySelectorAll("[aria-selected]").forEach(e=>e.removeAttribute("aria-selected"))}selectItem(e){console.log(e.dataset.display,e.innerText,e.dataset.value),this._input.value=e.dataset.display??e.innerText??e.dataset.value??"",e.dataset.value&&(this.dataset.value=e.dataset.value),this._input.focus(),this.toggleList(!1)}selectItemByValue(e){if(!e)return;const i=this._list.querySelector(`[data-value="${e}"]`);i&&this.selectItem(i)}clearInput(){this._input.value="",this._input.focus(),this.toggleList(!1)}handleBlur(){setTimeout(()=>{this.querySelector(":focus")||this.toggleList(!1)},0)}handleComboBoxKeyPress(e){if(!this._input)throw new Error("Input element not found");if(!this._list)throw new Error("List element not found");switch(e.key){case"ArrowDown":this._input.getAttribute("aria-expanded")!=="true"?(this.toggleList(!0),this._isAltModifierPressed||this.focusItem(this._list.children[0])):this.focusItem(this._list.children[0]);break;case"UpArrow":this._input.getAttribute("aria-expanded")!=="true"&&(this.toggleList(!0),this.focusItem(this._list.children[this._list.children.length-1]));break;case"Escape":this._input.getAttribute("aria-expanded")==="true"?this.toggleList(!1):this._input.value="",this._input.focus();break;case"Enter":break;case"Alt":this._isAltModifierPressed=!0;break}}handleListKeyPress(e){if(!this._input)throw new Error("Input element not found");if(!this._list)throw new Error("List element not found");const i=e.target;switch(e.key){case"Enter":this.selectItem(i);break;case"Escape":this.clearInput();break;case"ArrowDown":const r=i.nextElementSibling;r?this.focusItem(r):this.focusItem(this._list.children[0]);break;case"ArrowUp":if(this._isAltModifierPressed){this._input.focus(),this.toggleList(!1);break}const n=i.previousElementSibling;n?this.focusItem(n):this.focusItem(this._list.children[this._list.children.length-1]);break;case"ArrowRight":this._input.focus();break;case"ArrowLeft":this._input.focus();break;case"Home":this._input.focus();break;case"End":this._input.focus();break;case"Backspace":this._input.focus();break;case"Delete":this._input.focus();break;case"Alt":this._isAltModifierPressed=!0;break}}handleKeyUp(e){if(!this._input)throw new Error("Input element not found");if(!this._list)throw new Error("List element not found");switch(e.key){case"Alt":this._isAltModifierPressed=!1;break}}}customElements.define("combobox-framework",Zt); diff --git a/demo/index.html b/demo/index.html deleted file mode 100644 index 98257dc..0000000 --- a/demo/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - Vite + TS - - - - - - -
    - -
  • Item 1
  • - - -
  • Item 2
  • - - -
  • -
    Item 3
    -
  • - - -
  • -
    Item 4
    -
  • -
-
- - From 42ef01bb9985e64163ac1880be4e6a2423b5e3c0 Mon Sep 17 00:00:00 2001 From: klovaaxel Date: Tue, 24 Sep 2024 22:17:14 +0200 Subject: [PATCH 6/9] Fixes linting on build --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 98604a7..d8f3a72 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "scripts": { "dev": "cypress open --component", "build": "bun lint; tsc && bun run build.mjs; cypress run --component; bun dev-tools/filesize.ts; echo \"Done! Don't forget to update the version number in package.json\"", - "lint": "bunx @biomejs/biome check --apply *.json; bunx @biomejs/biome check --apply src/" + "lint": "bunx biome lint --write *.json; bunx biome lint --write ./src" }, "devDependencies": { "@biomejs/biome": "^1.5.3", From b252d6bf01684eee143fe95bcd1201b041b24a85 Mon Sep 17 00:00:00 2001 From: klovaaxel Date: Tue, 24 Sep 2024 22:17:33 +0200 Subject: [PATCH 7/9] Runs linter and formats files --- src/combobox-framework.ts | 6 +++--- src/handlers.ts | 2 +- src/helpers.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/combobox-framework.ts b/src/combobox-framework.ts index 974ae5c..f5ef9c8 100644 --- a/src/combobox-framework.ts +++ b/src/combobox-framework.ts @@ -1,4 +1,4 @@ -import Fuse, { FuseResult } from "fuse.js"; +import Fuse, { type FuseResult } from "fuse.js"; import { handleBlur, handleComboBoxKeyPress, handleKeyUp, handleListKeyPress } from "./handlers"; import { setBasicAttributes } from "./helpers"; @@ -6,7 +6,7 @@ export default class ComboboxFramework extends HTMLElement { public isAltModifierPressed = false; public shouldForceValue = false; public lastValue: string | undefined = undefined; - public limit: number = Infinity; + public limit: number = Number.POSITIVE_INFINITY; public get list(): HTMLElement | null { if (this._list) return this._list; @@ -107,7 +107,7 @@ export default class ComboboxFramework extends HTMLElement { else this.shouldForceValue = !!newValue; break; case "data-limit": - this.limit = parseInt(newValue); + this.limit = Number.parseInt(newValue); break; } } diff --git a/src/handlers.ts b/src/handlers.ts index e4b6d12..31c6d0d 100644 --- a/src/handlers.ts +++ b/src/handlers.ts @@ -1,4 +1,4 @@ -import ComboboxFramework from "./combobox-framework"; +import type ComboboxFramework from "./combobox-framework"; import { KeyCode } from "./helpers"; export function handleComboBoxKeyPress(this: ComboboxFramework, event: KeyboardEvent): void { diff --git a/src/helpers.ts b/src/helpers.ts index 110c9e6..f1ffa0a 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,4 +1,4 @@ -import ComboboxFramework from "./combobox-framework"; +import type ComboboxFramework from "./combobox-framework"; export function setBasicAttributes(this: ComboboxFramework): void { // #region Set the ids of the input and list elements if they are not set From f6549a8a59feee1b615553c597ba80bfc583d5c7 Mon Sep 17 00:00:00 2001 From: klovaaxel Date: Mon, 18 Nov 2024 21:44:23 +0100 Subject: [PATCH 8/9] Clears value on selecting item by falsy value --- src/combobox-framework.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/combobox-framework.ts b/src/combobox-framework.ts index f5ef9c8..cab4ffe 100644 --- a/src/combobox-framework.ts +++ b/src/combobox-framework.ts @@ -344,7 +344,13 @@ export default class ComboboxFramework extends HTMLElement { } private selectItemByValue(value: string | null, grabFocus = true): void { - if (!value) return; + if (!value) { + this.clearInput(false); // Clear the input + this.dataset.value = ""; // Clear the value + this.sendChangeEvent(); // Send a change event + return; + } + const item = this.list?.querySelector(`[data-value="${value}"]`) as HTMLElement; if (!item) return; this.selectItem(item, grabFocus); From 732d0adab8f0983acebe194b9b17b74771231037 Mon Sep 17 00:00:00 2001 From: klovaaxel Date: Mon, 18 Nov 2024 21:46:14 +0100 Subject: [PATCH 9/9] Adds missing cypress-ct-html package to dev deps --- bun.lockb | Bin 93365 -> 94149 bytes package.json | 1 + 2 files changed, 1 insertion(+) diff --git a/bun.lockb b/bun.lockb index 4f0d9cff5f39af7413ff64fd0030a79cf713cc18..cf7cad0f30c0d173c1913c0d7f3ef2c939812645 100644 GIT binary patch delta 15908 zcmeHOd3;S**FO6sH*ympK}aHzLF$ z$}M0jH3zSS{ITiI*sPrNG0x1~37O+1$?mR|D@o7Eag;fWqyQ-TLNUN3NnVg%dclJ6 z`5D~seRP)_%y$-~7mbyqTt}WG*WoO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M+@URjkBFlgz7x0@97qg5lG>@(|yw67wXYLc{H`Fs*C-ybRZ z$=4%AY}Hh6^#L{~DdC8yXz_(AhUhSmSzmc;u z%=Pd$SGsHUU!Tc*qTZIfs~FXt@+3= zzS#_l5|icH5h6tXJ_=uNtRuuwzdmJ^#W|&23yZRI@}1-J$_kx@0z`?4cK`qY diff --git a/package.json b/package.json index d8f3a72..501f82a 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "@types/cypress": "^1.1.3", "bun-plugin-dts": "^0.2.1", "cypress": "^13.7.2", + "cypress-ct-html": "^1.1.0", "fs": "^0.0.1-security", "path": "^0.12.7", "typescript": "^5.2.2",