Socket
Socket
Sign inDemoInstall

shadow-dom-testing-library

Package Overview
Dependencies
23
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.11.1 to 1.11.2

src/shadow-within.ts

8

dist/index.js

@@ -1,6 +0,6 @@

var Pe=Object.defineProperty;var Re=(e,n)=>{for(var o in n)Pe(e,o,{get:n[o],enumerable:!0})};import{queries as an,within as rn,configure as dn,getConfig as sn}from"@testing-library/dom";var A={};Re(A,{findAllByShadowAltText:()=>te,findAllByShadowDisplayValue:()=>J,findAllByShadowLabelText:()=>I,findAllByShadowPlaceholderText:()=>V,findAllByShadowRole:()=>_,findAllByShadowTestId:()=>ue,findAllByShadowText:()=>W,findAllByShadowTitle:()=>re,findByShadowAltText:()=>ne,findByShadowDisplayValue:()=>K,findByShadowLabelText:()=>F,findByShadowPlaceholderText:()=>G,findByShadowRole:()=>q,findByShadowTestId:()=>he,findByShadowText:()=>k,findByShadowTitle:()=>de,getAllByShadowAltText:()=>v,getAllByShadowDisplayValue:()=>z,getAllByShadowLabelText:()=>Q,getAllByShadowPlaceholderText:()=>N,getAllByShadowRole:()=>R,getAllByShadowTestId:()=>Te,getAllByShadowText:()=>U,getAllByShadowTitle:()=>le,getByShadowAltText:()=>ee,getByShadowDisplayValue:()=>Y,getByShadowLabelText:()=>D,getByShadowPlaceholderText:()=>C,getByShadowRole:()=>H,getByShadowTestId:()=>ye,getByShadowText:()=>j,getByShadowTitle:()=>ae,queryAllByShadowAltText:()=>x,queryAllByShadowDisplayValue:()=>B,queryAllByShadowLabelText:()=>w,queryAllByShadowPlaceholderText:()=>p,queryAllByShadowRole:()=>S,queryAllByShadowTestId:()=>E,queryAllByShadowText:()=>f,queryAllByShadowTitle:()=>M,queryByShadowAltText:()=>Z,queryByShadowDisplayValue:()=>X,queryByShadowLabelText:()=>b,queryByShadowPlaceholderText:()=>O,queryByShadowRole:()=>P,queryByShadowTestId:()=>se,queryByShadowText:()=>$,queryByShadowTitle:()=>oe});import{buildQueries as u,queryAllByRole as Qe,queryAllByLabelText as De,queryAllByPlaceholderText as Ie,queryAllByText as Fe,queryAllByDisplayValue as Oe,queryAllByAltText as Ne,queryAllByTitle as Ce,queryAllByTestId as Ve}from"@testing-library/dom";_e();function He(){qe()}function Se(){HTMLSlotElement.prototype.querySelectorAll=HTMLElement.prototype.querySelectorAll}function d(e){He();try{let n=e();return typeof n=="object"&&"finally"in n&&typeof n.finally=="function"&&n.finally(()=>Se()),n}finally{Se()}}function _e(){if(typeof ShadowRoot>"u")throw"Your environment does not support shadow roots.";ShadowRoot.prototype.matches==null&&Object.defineProperties(ShadowRoot.prototype,{matches:{get(){return function(e){return e.trim()==="*"?!0:Boolean(this.querySelector(e))}}}}),ShadowRoot.prototype.outerHTML==null&&Object.defineProperties(ShadowRoot.prototype,{outerHTML:{get(){return this.innerHTML}}})}function qe(){HTMLSlotElement.prototype.querySelectorAll=function(e){let n=HTMLElement.prototype.querySelectorAll,o=[];return this.assignedElements({flatten:!0}).forEach(t=>{let l=t,a=document.createElement("div");a.appendChild(l.cloneNode(!1)),a.querySelector(e)&&o.push(l),o=o.concat(Array.from(l.querySelectorAll(e)))}),o.length==0&&(o=Array.from(n.call(this,e))),[...new Set(o)]}}function be(e,n,o={shallow:!1}){let t=we(e,n,o);return Array.isArray(t)&&t.length>0?t[0]:null}function we(e,n,o={shallow:!1}){return d(()=>{let l=T(e,o).map(a=>Array.from(a.querySelectorAll(n))).flat(1/0);return[...new Set(l)]})}function T(e,n={shallow:!1}){return pe(e,"*",n)}function pe(e,n,o={shallow:!1},t=[],l=[]){return e instanceof Document&&(e=document.documentElement),t=[e],l.push(e),e instanceof HTMLElement&&e.shadowRoot!=null&&e.shadowRoot.mode!=="closed"&&(l.push(e.shadowRoot),t.push(e.shadowRoot)),t.forEach(a=>{a.querySelectorAll(n).forEach(r=>{if(r.shadowRoot==null||r.shadowRoot.mode==="closed"){l.push(r);return}if(l.push(r.shadowRoot),o.shallow===!0){r.shadowRoot.querySelectorAll(n).forEach(s=>{l.push(s)});return}r.shadowRoot.querySelectorAll(n).forEach(s=>{l.push(s),t.push(s)}),pe(r.shadowRoot,n,o,t,l)})}),[...new Set(l)]}function h(e){return e.map(n=>(...o)=>{let[t,l,a,...r]=o;return a==null&&(a={}),a.suggest=!1,n(t,l,a,...r)})}function S(...e){let[n,o,t]=e;return t==null&&(t={}),t.suggest=!1,[...new Set(d(()=>T(n,t).map(l=>Qe(l,o,t)).flat(1/0)))]}var Ge=(e,n)=>`Found multiple elements with the role of: ${n}`,$e=(e,n)=>`Unable to find an element with the role of: ${n}`,[Ue,je,We,ke,Xe]=h(u(S,Ge,$e)),P=(...e)=>Ue(...e),R=(...e)=>je(...e),H=(...e)=>We(...e),_=(...e)=>ke(...e),q=(...e)=>Xe(...e);function w(...e){let[n,o,t]=e;return t==null&&(t={}),t.suggest=!1,[...new Set(d(()=>T(n,t).map(l=>De(l,o,t)).flat(1/0)))]}var ze=(e,n)=>`Found multiple elements with the label text of: ${n}`,Ye=(e,n)=>`Unable to find an element with the label text of: ${n}`,[Je,Ke,Ze,ve,et]=h(u(w,ze,Ye)),b=(...e)=>Je(...e),Q=(...e)=>Ke(...e),D=(...e)=>Ze(...e),I=(...e)=>ve(...e),F=(...e)=>et(...e);function p(...e){let[n,o,t]=e;return t==null&&(t={}),t.suggest=!1,[...new Set(d(()=>T(n,t).map(l=>Ie(l,o,t)).flat(1/0)))]}var tt=(e,n)=>`Found multiple elements with the placeholder text of: ${n}`,nt=(e,n)=>`Unable to find an element with the placeholder text of: ${n}`,[ot,lt,at,rt,dt]=h(u(p,tt,nt)),O=(...e)=>ot(...e),N=(...e)=>lt(...e),C=(...e)=>at(...e),V=(...e)=>rt(...e),G=(...e)=>dt(...e);function f(...e){let[n,o,t]=e;return t==null&&(t={}),t.suggest=!1,[...new Set(d(()=>T(n,t).map(l=>Fe(l,o,t)).flat(1/0)))]}var st=(e,n)=>`Found multiple elements with the text of: ${n}`,Tt=(e,n)=>`Unable to find an element with the text of: ${n}`,[yt,ut,ht,mt,ct]=h(u(f,st,Tt)),$=(...e)=>yt(...e),U=(...e)=>ut(...e),j=(...e)=>ht(...e),W=(...e)=>mt(...e),k=(...e)=>ct(...e);function B(...e){let[n,o,t]=e;return t==null&&(t={}),t.suggest=!1,[...new Set(d(()=>T(n,t).map(l=>Oe(l,o,t)).flat(1/0)))]}var it=(e,n)=>`Found multiple elements with the display value of: ${n}`,St=(e,n)=>`Unable to find an element with the display value of: ${n}`,[wt,pt,ft,Bt,xt]=h(u(B,it,St)),X=(...e)=>wt(...e),z=(...e)=>pt(...e),Y=(...e)=>ft(...e),J=(...e)=>Bt(...e),K=(...e)=>xt(...e);function x(...e){let[n,o,t]=e;return t==null&&(t={}),t.suggest=!1,[...new Set(d(()=>T(n,t).map(l=>Ne(l,o,t)).flat(1/0)))]}var Mt=(e,n)=>`Found multiple elements with the alt text of: ${n}`,Et=(e,n)=>`Unable to find an element with the alt text of: ${n}`,[At,Lt,gt,Pt,Rt]=h(u(x,Mt,Et)),Z=(...e)=>At(...e),v=(...e)=>Lt(...e),ee=(...e)=>gt(...e),te=(...e)=>Pt(...e),ne=(...e)=>Rt(...e);function M(...e){let[n,o,t]=e;return t==null&&(t={}),t.suggest=!1,[...new Set(d(()=>T(n,t).map(l=>Ce(l,o,t)).flat(1/0)))]}var Ht=(e,n)=>`Found multiple elements with the title of: ${n}`,_t=(e,n)=>`Unable to find an element with the title of: ${n}`,[qt,bt,Qt,Dt,It]=h(u(M,Ht,_t)),oe=(...e)=>qt(...e),le=(...e)=>bt(...e),ae=(...e)=>Qt(...e),re=(...e)=>Dt(...e),de=(...e)=>It(...e);function E(...e){let[n,o,t]=e;return t==null&&(t={}),t.suggest=!1,[...new Set(d(()=>T(n,t).map(l=>Ve(l,o,t)).flat(1/0)))]}var Ft=(e,n)=>`Found multiple elements with the test id of: ${n}`,Ot=(e,n)=>`Unable to find an element with the test id of: ${n}`,[Nt,Ct,Vt,Gt,$t]=h(u(E,Ft,Ot)),se=(...e)=>Nt(...e),Te=(...e)=>Ct(...e),ye=(...e)=>Vt(...e),ue=(...e)=>Gt(...e),he=(...e)=>$t(...e);import{logDOM as nn}from"@testing-library/dom";import{prettyDOM as Ut,getConfig as jt}from"@testing-library/dom";var fe=/([^\S\r\n]*[\f\n\r\t\v]+)/.source;function Wt(e){return e.replace(new RegExp(`${fe}.*${fe}{2,}`,"g"),"")}function xe(...e){let[n,o,t]=e,l=L((t==null?void 0:t.filterNode)||me);return t==null&&(t={}),t.plugins==null&&(t.plugins=[]),t.plugins.push(l),d(()=>Ut(n,o,{...t,plugins:[l]}))}function Me(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function me(e){return e.nodeType!==ce&&(e.nodeType!==Ae||!e.matches(jt().defaultIgnore))}var kt=(e,n,o,t,l,a,r)=>{let s=t+o.indent,y=o.colors;return e.map(m=>{let i=n[m],c=r(i,o,s,l,a);return typeof i!="string"&&(c.indexOf(`
`)!==-1&&(c=o.spacingOuter+s+c+o.spacingOuter+t),c="{"+c+"}"),o.spacingInner+t+y.prop.open+m+y.prop.close+"="+y.value.open+c+y.value.close}).join("")},Xt=3,zt=(e,n,o,t,l,a)=>Wt(e.map(r=>{let s=typeof r=="string"?Ee(r,n):a(r,n,o,t,l);return s===""&&typeof r=="object"&&r!=null&&r.nodeType!==Xt?"":n.spacingOuter+o+s}).join("")),Ee=(e,n)=>{let o=n.colors.content;return o.open+Me(e)+o.close},Yt=(e,n)=>{let o=n.colors.comment;return o.open+"<!--"+Me(e)+"-->"+o.close},Jt=(e,n,o,t,l)=>{let a=t.colors.tag;return a.open+"<"+e+(n&&a.close+n+t.spacingOuter+l+a.open)+(o?">"+a.close+o+t.spacingOuter+l+a.open+"</"+e:(n&&!t.min?"":" ")+"/")+">"+a.close},Kt=(e,n)=>{let o=n.colors.tag;return o.open+"<"+e+o.close+" \u2026"+o.open+" />"+o.close},Ae=1,Le=3,ce=8,ge=11,Zt=/^((HTML|SVG)\w*)?Element$/,vt=e=>{var a;let n=((a=e==null?void 0:e.constructor)==null?void 0:a.name)||"",{nodeType:o,tagName:t}=e,l=typeof t=="string"&&t.includes("-")||typeof e.hasAttribute=="function"&&e.hasAttribute("is")||e instanceof HTMLElement;return o===Ae&&(Zt.test(n)||l)||o===Le&&n==="Text"||o===ce&&n==="Comment"||o===ge};function en(e){return e.nodeType===Le}function tn(e){return e.nodeType===ce}function Be(e){return e.nodeType===ge}function L(e){function n(o){let t=Array.prototype.slice.call(o.childNodes||o.children);return"shadowRoot"in o&&o.shadowRoot!=null&&o.shadowRoot.mode!=="closed"&&t.unshift(o.shadowRoot),t.filter(e)}return{test:o=>(o==null?void 0:o.constructor)&&vt(o),serialize:(o,t,l,a,r,s)=>{if(en(o))return Ee(o.data,t);if(tn(o))return Yt(o.data,t);let y="DocumentFragment";return"tagName"in o&&o.tagName?y=o.tagName.toLowerCase():o instanceof ShadowRoot&&(y="ShadowRoot"),++a>t.maxDepth?Kt(y,t):Jt(y,kt(Be(o)?[]:Array.from(o.attributes).map(m=>m.name).sort(),Be(o)?{}:Array.from(o.attributes).reduce((m,i)=>(m[i.name]=i.value,m),{}),t,l+t.indent,a,r,s),zt(n(o),t,l+t.indent,a,r,s),t,l)}}}function g(...e){let[n,o,t]=e,l=L((t==null?void 0:t.filterNode)||me);t==null&&(t={}),t.plugins==null&&(t.plugins=[]),t.plugins.push(l),d(()=>nn(n,o,t))}function ie(...e){let[n,o,t]=e;Array.isArray(n)?n.forEach(l=>g(l,o,t)):g(n,o,t)}import{screen as on}from"@testing-library/dom";var ln={...on,debug:ie,queryAllByShadowRole:(...e)=>S(document.documentElement,e[0],e[1]),queryByShadowRole:(...e)=>P(document.documentElement,e[0],e[1]),getAllByShadowRole:(...e)=>R(document.documentElement,e[0],e[1]),getByShadowRole:(...e)=>H(document.documentElement,e[0],e[1]),findAllByShadowRole:(...e)=>_(document.documentElement,e[0],e[1],e[2]),findByShadowRole:(...e)=>q(document.documentElement,e[0],e[1],e[2]),queryAllByShadowLabelText:(...e)=>w(document.documentElement,e[0],e[1]),queryByShadowLabelText:(...e)=>b(document.documentElement,e[0],e[1]),getAllByShadowLabelText:(...e)=>Q(document.documentElement,e[0],e[1]),getByShadowLabelText:(...e)=>D(document.documentElement,e[0],e[1]),findAllByShadowLabelText:(...e)=>I(document.documentElement,e[0],e[1],e[2]),findByShadowLabelText:(...e)=>F(document.documentElement,e[0],e[1],e[2]),queryAllByShadowPlaceholderText:(...e)=>p(document.documentElement,e[0],e[1]),queryByShadowPlaceholderText:(...e)=>O(document.documentElement,e[0],e[1]),getAllByShadowPlaceholderText:(...e)=>N(document.documentElement,e[0],e[1]),getByShadowPlaceholderText:(...e)=>C(document.documentElement,e[0],e[1]),findAllByShadowPlaceholderText:(...e)=>V(document.documentElement,e[0],e[1],e[2]),findByShadowPlaceholderText:(...e)=>G(document.documentElement,e[0],e[1],e[2]),queryAllByShadowText:(...e)=>f(document.documentElement,e[0],e[1]),queryByShadowText:(...e)=>$(document.documentElement,e[0],e[1]),getAllByShadowText:(...e)=>U(document.documentElement,e[0],e[1]),getByShadowText:(...e)=>j(document.documentElement,e[0],e[1]),findAllByShadowText:(...e)=>W(document.documentElement,e[0],e[1],e[2]),findByShadowText:(...e)=>k(document.documentElement,e[0],e[1],e[2]),queryAllByShadowDisplayValue:(...e)=>B(document.documentElement,e[0],e[1]),queryByShadowDisplayValue:(...e)=>X(document.documentElement,e[0],e[1]),getAllByShadowDisplayValue:(...e)=>z(document.documentElement,e[0],e[1]),getByShadowDisplayValue:(...e)=>Y(document.documentElement,e[0],e[1]),findAllByShadowDisplayValue:(...e)=>J(document.documentElement,e[0],e[1],e[2]),findByShadowDisplayValue:(...e)=>K(document.documentElement,e[0],e[1],e[2]),queryAllByShadowAltText:(...e)=>x(document.documentElement,e[0],e[1]),queryByShadowAltText:(...e)=>Z(document.documentElement,e[0],e[1]),getAllByShadowAltText:(...e)=>v(document.documentElement,e[0],e[1]),getByShadowAltText:(...e)=>ee(document.documentElement,e[0],e[1]),findAllByShadowAltText:(...e)=>te(document.documentElement,e[0],e[1],e[2]),findByShadowAltText:(...e)=>ne(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTitle:(...e)=>M(document.documentElement,e[0],e[1]),queryByShadowTitle:(...e)=>oe(document.documentElement,e[0],e[1]),getAllByShadowTitle:(...e)=>le(document.documentElement,e[0],e[1]),getByShadowTitle:(...e)=>ae(document.documentElement,e[0],e[1]),findAllByShadowTitle:(...e)=>re(document.documentElement,e[0],e[1],e[2]),findByShadowTitle:(...e)=>de(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTestId:(...e)=>E(document.documentElement,e[0],e[1]),queryByShadowTestId:(...e)=>se(document.documentElement,e[0],e[1]),getAllByShadowTestId:(...e)=>Te(document.documentElement,e[0],e[1]),getByShadowTestId:(...e)=>ye(document.documentElement,e[0],e[1]),findAllByShadowTestId:(...e)=>ue(document.documentElement,e[0],e[1],e[2]),findByShadowTestId:(...e)=>he(document.documentElement,e[0],e[1],e[2])};dn({getElementError(e,n){let o=xe(n),t=new Error([e,`Ignored nodes: comments, ${sn().defaultIgnore}
${o}`].filter(Boolean).join(`
var ge=Object.defineProperty;var Re=(e,t)=>{for(var l in t)ge(e,l,{get:t[l],enumerable:!0})};import{configure as To,getConfig as ho}from"@testing-library/dom";var S={};Re(S,{findAllByShadowAltText:()=>te,findAllByShadowDisplayValue:()=>J,findAllByShadowLabelText:()=>D,findAllByShadowPlaceholderText:()=>N,findAllByShadowRole:()=>b,findAllByShadowTestId:()=>he,findAllByShadowText:()=>U,findAllByShadowTitle:()=>re,findByShadowAltText:()=>oe,findByShadowDisplayValue:()=>K,findByShadowLabelText:()=>I,findByShadowPlaceholderText:()=>C,findByShadowRole:()=>q,findByShadowTestId:()=>ie,findByShadowText:()=>k,findByShadowTitle:()=>de,getAllByShadowAltText:()=>v,getAllByShadowDisplayValue:()=>z,getAllByShadowLabelText:()=>_,getAllByShadowPlaceholderText:()=>V,getAllByShadowRole:()=>R,getAllByShadowTestId:()=>se,getAllByShadowText:()=>$,getAllByShadowTitle:()=>le,getByShadowAltText:()=>ee,getByShadowDisplayValue:()=>Y,getByShadowLabelText:()=>O,getByShadowPlaceholderText:()=>F,getByShadowRole:()=>H,getByShadowTestId:()=>Te,getByShadowText:()=>W,getByShadowTitle:()=>ne,queryAllByShadowAltText:()=>A,queryAllByShadowDisplayValue:()=>x,queryAllByShadowLabelText:()=>p,queryAllByShadowPlaceholderText:()=>B,queryAllByShadowRole:()=>c,queryAllByShadowTestId:()=>E,queryAllByShadowText:()=>f,queryAllByShadowTitle:()=>M,queryByShadowAltText:()=>Z,queryByShadowDisplayValue:()=>X,queryByShadowLabelText:()=>Q,queryByShadowPlaceholderText:()=>j,queryByShadowRole:()=>g,queryByShadowTestId:()=>ye,queryByShadowText:()=>G,queryByShadowTitle:()=>ae});import{buildQueries as h,queryAllByRole as _e,queryAllByLabelText as Oe,queryAllByPlaceholderText as De,queryAllByText as Ie,queryAllByDisplayValue as je,queryAllByAltText as Ve,queryAllByTitle as Fe,queryAllByTestId as Ne}from"@testing-library/dom";be();function He(){qe()}function Se(){HTMLSlotElement.prototype.querySelectorAll=HTMLElement.prototype.querySelectorAll}function d(e){He();try{let t=e();return typeof t=="object"&&"finally"in t&&typeof t.finally=="function"&&t.finally(()=>Se()),t}finally{Se()}}function be(){if(typeof ShadowRoot>"u")throw"Your environment does not support shadow roots.";ShadowRoot.prototype.matches==null&&Object.defineProperties(ShadowRoot.prototype,{matches:{get(){return function(e){return e.trim()==="*"?!0:Boolean(this.querySelector(e))}}}}),ShadowRoot.prototype.outerHTML==null&&Object.defineProperties(ShadowRoot.prototype,{outerHTML:{get(){return this.innerHTML}}})}function qe(){HTMLSlotElement.prototype.querySelectorAll=function(e){let t=HTMLElement.prototype.querySelectorAll,l=[];return this.assignedElements({flatten:!0}).forEach(a=>{let o=a,n=document.createElement("div");n.appendChild(o.cloneNode(!1)),n.querySelector(e)&&l.push(o),l=l.concat(Array.from(o.querySelectorAll(e)))}),l.length==0&&(l=Array.from(t.call(this,e))),[...new Set(l)]}}function Qe(e,t,l={shallow:!1}){let a=ce(e,t,l);return Array.isArray(a)&&a.length>0?a[0]:null}function ce(e,t,l={shallow:!1}){return d(()=>{let o=s(e,l).map(n=>Array.from(n.querySelectorAll(t))).flat(1/0);return[...new Set(o)]})}function s(e,t={shallow:!1}){return pe(e,"*",t)}function pe(e,t,l={shallow:!1},a=[],o=[]){return e instanceof Document&&(e=document.documentElement),a=[e],o.push(e),e instanceof HTMLElement&&e.shadowRoot!=null&&e.shadowRoot.mode!=="closed"&&(o.push(e.shadowRoot),a.push(e.shadowRoot)),a.forEach(n=>{n.querySelectorAll(t).forEach(r=>{if(r.shadowRoot==null||r.shadowRoot.mode==="closed"){o.push(r);return}if(o.push(r.shadowRoot),l.shallow===!0){r.shadowRoot.querySelectorAll(t).forEach(y=>{o.push(y)});return}r.shadowRoot.querySelectorAll(t).forEach(y=>{o.push(y),a.push(y)}),pe(r.shadowRoot,t,l,a,o)})}),[...new Set(o)]}function i(e){return e.map(t=>(...l)=>{let[a,o,n,...r]=l;return n==null&&(n={}),n.suggest=!1,t(a,o,n,...r)})}function c(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(d(()=>s(t,a).map(o=>_e(o,l,a)).flat(1/0)))]}var Ce=(e,t)=>`Found multiple elements with the role of: ${t}`,Ge=(e,t)=>`Unable to find an element with the role of: ${t}`,[$e,We,Ue,ke,Xe]=i(h(c,Ce,Ge)),g=(...e)=>$e(...e),R=(...e)=>We(...e),H=(...e)=>Ue(...e),b=(...e)=>ke(...e),q=(...e)=>Xe(...e);function p(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(d(()=>s(t,a).map(o=>Oe(o,l,a)).flat(1/0)))]}var ze=(e,t)=>`Found multiple elements with the label text of: ${t}`,Ye=(e,t)=>`Unable to find an element with the label text of: ${t}`,[Je,Ke,Ze,ve,et]=i(h(p,ze,Ye)),Q=(...e)=>Je(...e),_=(...e)=>Ke(...e),O=(...e)=>Ze(...e),D=(...e)=>ve(...e),I=(...e)=>et(...e);function B(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(d(()=>s(t,a).map(o=>De(o,l,a)).flat(1/0)))]}var tt=(e,t)=>`Found multiple elements with the placeholder text of: ${t}`,ot=(e,t)=>`Unable to find an element with the placeholder text of: ${t}`,[at,lt,nt,rt,dt]=i(h(B,tt,ot)),j=(...e)=>at(...e),V=(...e)=>lt(...e),F=(...e)=>nt(...e),N=(...e)=>rt(...e),C=(...e)=>dt(...e);function f(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(d(()=>s(t,a).map(o=>Ie(o,l,a)).flat(1/0)))]}var yt=(e,t)=>`Found multiple elements with the text of: ${t}`,st=(e,t)=>`Unable to find an element with the text of: ${t}`,[Tt,ht,it,ut,wt]=i(h(f,yt,st)),G=(...e)=>Tt(...e),$=(...e)=>ht(...e),W=(...e)=>it(...e),U=(...e)=>ut(...e),k=(...e)=>wt(...e);function x(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(d(()=>s(t,a).map(o=>je(o,l,a)).flat(1/0)))]}var mt=(e,t)=>`Found multiple elements with the display value of: ${t}`,St=(e,t)=>`Unable to find an element with the display value of: ${t}`,[ct,pt,Bt,ft,xt]=i(h(x,mt,St)),X=(...e)=>ct(...e),z=(...e)=>pt(...e),Y=(...e)=>Bt(...e),J=(...e)=>ft(...e),K=(...e)=>xt(...e);function A(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(d(()=>s(t,a).map(o=>Ve(o,l,a)).flat(1/0)))]}var At=(e,t)=>`Found multiple elements with the alt text of: ${t}`,Mt=(e,t)=>`Unable to find an element with the alt text of: ${t}`,[Et,Lt,Pt,gt,Rt]=i(h(A,At,Mt)),Z=(...e)=>Et(...e),v=(...e)=>Lt(...e),ee=(...e)=>Pt(...e),te=(...e)=>gt(...e),oe=(...e)=>Rt(...e);function M(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(d(()=>s(t,a).map(o=>Fe(o,l,a)).flat(1/0)))]}var Ht=(e,t)=>`Found multiple elements with the title of: ${t}`,bt=(e,t)=>`Unable to find an element with the title of: ${t}`,[qt,Qt,_t,Ot,Dt]=i(h(M,Ht,bt)),ae=(...e)=>qt(...e),le=(...e)=>Qt(...e),ne=(...e)=>_t(...e),re=(...e)=>Ot(...e),de=(...e)=>Dt(...e);function E(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(d(()=>s(t,a).map(o=>Ne(o,l,a)).flat(1/0)))]}var It=(e,t)=>`Found multiple elements with the test id of: ${t}`,jt=(e,t)=>`Unable to find an element with the test id of: ${t}`,[Vt,Ft,Nt,Ct,Gt]=i(h(E,It,jt)),ye=(...e)=>Vt(...e),se=(...e)=>Ft(...e),Te=(...e)=>Nt(...e),he=(...e)=>Ct(...e),ie=(...e)=>Gt(...e);import{logDOM as oo}from"@testing-library/dom";import{prettyDOM as $t,getConfig as Wt}from"@testing-library/dom";var Be=/([^\S\r\n]*[\f\n\r\t\v]+)/.source;function Ut(e){return e.replace(new RegExp(`${Be}.*${Be}{2,}`,"g"),"")}function xe(...e){let[t,l,a]=e,o=L((a==null?void 0:a.filterNode)||ue);return a==null&&(a={}),a.plugins==null&&(a.plugins=[]),a.plugins.push(o),d(()=>$t(t,l,{...a,plugins:[o]}))}function Ae(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ue(e){return e.nodeType!==we&&(e.nodeType!==Ee||!e.matches(Wt().defaultIgnore))}var kt=(e,t,l,a,o,n,r)=>{let y=a+l.indent,T=l.colors;return e.map(u=>{let m=t[u],w=r(m,l,y,o,n);return typeof m!="string"&&(w.indexOf(`
`)!==-1&&(w=l.spacingOuter+y+w+l.spacingOuter+a),w="{"+w+"}"),l.spacingInner+a+T.prop.open+u+T.prop.close+"="+T.value.open+w+T.value.close}).join("")},Xt=3,zt=(e,t,l,a,o,n)=>Ut(e.map(r=>{let y=typeof r=="string"?Me(r,t):n(r,t,l,a,o);return y===""&&typeof r=="object"&&r!=null&&r.nodeType!==Xt?"":t.spacingOuter+l+y}).join("")),Me=(e,t)=>{let l=t.colors.content;return l.open+Ae(e)+l.close},Yt=(e,t)=>{let l=t.colors.comment;return l.open+"<!--"+Ae(e)+"-->"+l.close},Jt=(e,t,l,a,o)=>{let n=a.colors.tag;return n.open+"<"+e+(t&&n.close+t+a.spacingOuter+o+n.open)+(l?">"+n.close+l+a.spacingOuter+o+n.open+"</"+e:(t&&!a.min?"":" ")+"/")+">"+n.close},Kt=(e,t)=>{let l=t.colors.tag;return l.open+"<"+e+l.close+" \u2026"+l.open+" />"+l.close},Ee=1,Le=3,we=8,Pe=11,Zt=/^((HTML|SVG)\w*)?Element$/,vt=e=>{var n;let t=((n=e==null?void 0:e.constructor)==null?void 0:n.name)||"",{nodeType:l,tagName:a}=e,o=typeof a=="string"&&a.includes("-")||typeof e.hasAttribute=="function"&&e.hasAttribute("is")||e instanceof HTMLElement;return l===Ee&&(Zt.test(t)||o)||l===Le&&t==="Text"||l===we&&t==="Comment"||l===Pe};function eo(e){return e.nodeType===Le}function to(e){return e.nodeType===we}function fe(e){return e.nodeType===Pe}function L(e){function t(l){let a=Array.prototype.slice.call(l.childNodes||l.children);return"shadowRoot"in l&&l.shadowRoot!=null&&l.shadowRoot.mode!=="closed"&&a.unshift(l.shadowRoot),a.filter(e)}return{test:l=>(l==null?void 0:l.constructor)&&vt(l),serialize:(l,a,o,n,r,y)=>{if(eo(l))return Me(l.data,a);if(to(l))return Yt(l.data,a);let T="DocumentFragment";return"tagName"in l&&l.tagName?T=l.tagName.toLowerCase():l instanceof ShadowRoot&&(T="ShadowRoot"),++n>a.maxDepth?Kt(T,a):Jt(T,kt(fe(l)?[]:Array.from(l.attributes).map(u=>u.name).sort(),fe(l)?{}:Array.from(l.attributes).reduce((u,m)=>(u[m.name]=m.value,u),{}),a,o+a.indent,n,r,y),zt(t(l),a,o+a.indent,n,r,y),a,o)}}}function P(...e){let[t,l,a]=e,o=L((a==null?void 0:a.filterNode)||ue);a==null&&(a={}),a.plugins==null&&(a.plugins=[]),a.plugins.push(o),d(()=>oo(t,l,a))}function me(...e){let[t,l,a]=e;Array.isArray(t)?t.forEach(o=>P(o,l,a)):P(t,l,a)}import{screen as ao}from"@testing-library/dom";var lo={...ao,debug:me,queryAllByShadowRole:(...e)=>c(document.documentElement,e[0],e[1]),queryByShadowRole:(...e)=>g(document.documentElement,e[0],e[1]),getAllByShadowRole:(...e)=>R(document.documentElement,e[0],e[1]),getByShadowRole:(...e)=>H(document.documentElement,e[0],e[1]),findAllByShadowRole:(...e)=>b(document.documentElement,e[0],e[1],e[2]),findByShadowRole:(...e)=>q(document.documentElement,e[0],e[1],e[2]),queryAllByShadowLabelText:(...e)=>p(document.documentElement,e[0],e[1]),queryByShadowLabelText:(...e)=>Q(document.documentElement,e[0],e[1]),getAllByShadowLabelText:(...e)=>_(document.documentElement,e[0],e[1]),getByShadowLabelText:(...e)=>O(document.documentElement,e[0],e[1]),findAllByShadowLabelText:(...e)=>D(document.documentElement,e[0],e[1],e[2]),findByShadowLabelText:(...e)=>I(document.documentElement,e[0],e[1],e[2]),queryAllByShadowPlaceholderText:(...e)=>B(document.documentElement,e[0],e[1]),queryByShadowPlaceholderText:(...e)=>j(document.documentElement,e[0],e[1]),getAllByShadowPlaceholderText:(...e)=>V(document.documentElement,e[0],e[1]),getByShadowPlaceholderText:(...e)=>F(document.documentElement,e[0],e[1]),findAllByShadowPlaceholderText:(...e)=>N(document.documentElement,e[0],e[1],e[2]),findByShadowPlaceholderText:(...e)=>C(document.documentElement,e[0],e[1],e[2]),queryAllByShadowText:(...e)=>f(document.documentElement,e[0],e[1]),queryByShadowText:(...e)=>G(document.documentElement,e[0],e[1]),getAllByShadowText:(...e)=>$(document.documentElement,e[0],e[1]),getByShadowText:(...e)=>W(document.documentElement,e[0],e[1]),findAllByShadowText:(...e)=>U(document.documentElement,e[0],e[1],e[2]),findByShadowText:(...e)=>k(document.documentElement,e[0],e[1],e[2]),queryAllByShadowDisplayValue:(...e)=>x(document.documentElement,e[0],e[1]),queryByShadowDisplayValue:(...e)=>X(document.documentElement,e[0],e[1]),getAllByShadowDisplayValue:(...e)=>z(document.documentElement,e[0],e[1]),getByShadowDisplayValue:(...e)=>Y(document.documentElement,e[0],e[1]),findAllByShadowDisplayValue:(...e)=>J(document.documentElement,e[0],e[1],e[2]),findByShadowDisplayValue:(...e)=>K(document.documentElement,e[0],e[1],e[2]),queryAllByShadowAltText:(...e)=>A(document.documentElement,e[0],e[1]),queryByShadowAltText:(...e)=>Z(document.documentElement,e[0],e[1]),getAllByShadowAltText:(...e)=>v(document.documentElement,e[0],e[1]),getByShadowAltText:(...e)=>ee(document.documentElement,e[0],e[1]),findAllByShadowAltText:(...e)=>te(document.documentElement,e[0],e[1],e[2]),findByShadowAltText:(...e)=>oe(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTitle:(...e)=>M(document.documentElement,e[0],e[1]),queryByShadowTitle:(...e)=>ae(document.documentElement,e[0],e[1]),getAllByShadowTitle:(...e)=>le(document.documentElement,e[0],e[1]),getByShadowTitle:(...e)=>ne(document.documentElement,e[0],e[1]),findAllByShadowTitle:(...e)=>re(document.documentElement,e[0],e[1],e[2]),findByShadowTitle:(...e)=>de(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTestId:(...e)=>E(document.documentElement,e[0],e[1]),queryByShadowTestId:(...e)=>ye(document.documentElement,e[0],e[1]),getAllByShadowTestId:(...e)=>se(document.documentElement,e[0],e[1]),getByShadowTestId:(...e)=>Te(document.documentElement,e[0],e[1]),findAllByShadowTestId:(...e)=>he(document.documentElement,e[0],e[1],e[2]),findByShadowTestId:(...e)=>ie(document.documentElement,e[0],e[1],e[2])};import{queries as no,within as ro}from"@testing-library/dom";var yo={...no,...S};function so(e){let t=ro(e,yo);return{...t,...{queryAllByShadowRole:(...o)=>t.queryAllByShadowRole(...o),queryByShadowRole:(...o)=>t.queryByShadowRole(...o),getAllByShadowRole:(...o)=>t.getAllByShadowRole(...o),getByShadowRole:(...o)=>t.getByShadowRole(...o),findAllByShadowRole:(...o)=>t.findAllByShadowRole(...o),findByShadowRole:(...o)=>t.findByShadowRole(...o),queryAllByShadowLabelText:(...o)=>t.queryAllByShadowLabelText(...o),queryByShadowLabelText:(...o)=>t.queryByShadowLabelText(...o),getAllByShadowLabelText:(...o)=>t.getAllByShadowLabelText(...o),getByShadowLabelText:(...o)=>t.getByShadowLabelText(...o),findAllByShadowLabelText:(...o)=>t.findAllByShadowLabelText(...o),findByShadowLabelText:(...o)=>t.findByShadowLabelText(...o),queryAllByShadowPlaceholderText:(...o)=>t.queryAllByShadowPlaceholderText(...o),queryByShadowPlaceholderText:(...o)=>t.queryByShadowPlaceholderText(...o),getAllByShadowPlaceholderText:(...o)=>t.getAllByShadowPlaceholderText(...o),getByShadowPlaceholderText:(...o)=>t.getByShadowPlaceholderText(...o),findAllByShadowPlaceholderText:(...o)=>t.findAllByShadowPlaceholderText(...o),findByShadowPlaceholderText:(...o)=>t.findByShadowPlaceholderText(...o),queryAllByShadowText:(...o)=>t.queryAllByShadowText(...o),queryByShadowText:(...o)=>t.queryByShadowText(...o),getAllByShadowText:(...o)=>t.getAllByShadowText(...o),getByShadowText:(...o)=>t.getByShadowText(...o),findAllByShadowText:(...o)=>t.findAllByShadowText(...o),findByShadowText:(...o)=>t.findByShadowText(...o),queryAllByShadowDisplayValue:(...o)=>t.queryAllByShadowDisplayValue(...o),queryByShadowDisplayValue:(...o)=>t.queryByShadowDisplayValue(...o),getAllByShadowDisplayValue:(...o)=>t.getAllByShadowDisplayValue(...o),getByShadowDisplayValue:(...o)=>t.getByShadowDisplayValue(...o),findAllByShadowDisplayValue:(...o)=>t.findAllByShadowDisplayValue(...o),findByShadowDisplayValue:(...o)=>t.findByShadowDisplayValue(...o),queryAllByShadowAltText:(...o)=>t.queryAllByShadowAltText(...o),queryByShadowAltText:(...o)=>t.queryByShadowAltText(...o),getAllByShadowAltText:(...o)=>t.getAllByShadowAltText(...o),getByShadowAltText:(...o)=>t.getByShadowAltText(...o),findAllByShadowAltText:(...o)=>t.findAllByShadowAltText(...o),findByShadowAltText:(...o)=>t.findByShadowAltText(...o),queryAllByShadowTitle:(...o)=>t.queryAllByShadowTitle(...o),queryByShadowTitle:(...o)=>t.queryByShadowTitle(...o),getAllByShadowTitle:(...o)=>t.getAllByShadowTitle(...o),getByShadowTitle:(...o)=>t.getByShadowTitle(...o),findAllByShadowTitle:(...o)=>t.findAllByShadowTitle(...o),findByShadowTitle:(...o)=>t.findByShadowTitle(...o),queryAllByShadowTestId:(...o)=>t.queryAllByShadowTestId(...o),queryByShadowTestId:(...o)=>t.queryByShadowTestId(...o),getAllByShadowTestId:(...o)=>t.getAllByShadowTestId(...o),getByShadowTestId:(...o)=>t.getByShadowTestId(...o),findAllByShadowTestId:(...o)=>t.findAllByShadowTestId(...o),findByShadowTestId:(...o)=>t.findByShadowTestId(...o)}}}To({getElementError(e,t){let l=xe(t),a=new Error([e,`Ignored nodes: comments, ${ho().defaultIgnore}
${l}`].filter(Boolean).join(`
`));return t.name="ShadowDOMTestingLibraryElementError",t}});var Tn={...an,...A};function Zn(e){return rn(e,Tn)}export{L as createDOMElementFilter,ie as debug,be as deepQuerySelector,we as deepQuerySelectorAll,te as findAllByShadowAltText,J as findAllByShadowDisplayValue,I as findAllByShadowLabelText,V as findAllByShadowPlaceholderText,_ as findAllByShadowRole,ue as findAllByShadowTestId,W as findAllByShadowText,re as findAllByShadowTitle,ne as findByShadowAltText,K as findByShadowDisplayValue,F as findByShadowLabelText,G as findByShadowPlaceholderText,q as findByShadowRole,he as findByShadowTestId,k as findByShadowText,de as findByShadowTitle,v as getAllByShadowAltText,z as getAllByShadowDisplayValue,Q as getAllByShadowLabelText,N as getAllByShadowPlaceholderText,R as getAllByShadowRole,Te as getAllByShadowTestId,U as getAllByShadowText,le as getAllByShadowTitle,T as getAllElementsAndShadowRoots,ee as getByShadowAltText,Y as getByShadowDisplayValue,D as getByShadowLabelText,C as getByShadowPlaceholderText,H as getByShadowRole,ye as getByShadowTestId,j as getByShadowText,ae as getByShadowTitle,g as logShadowDOM,xe as prettyShadowDOM,x as queryAllByShadowAltText,B as queryAllByShadowDisplayValue,w as queryAllByShadowLabelText,p as queryAllByShadowPlaceholderText,S as queryAllByShadowRole,E as queryAllByShadowTestId,f as queryAllByShadowText,M as queryAllByShadowTitle,Z as queryByShadowAltText,X as queryByShadowDisplayValue,b as queryByShadowLabelText,O as queryByShadowPlaceholderText,P as queryByShadowRole,se as queryByShadowTestId,$ as queryByShadowText,oe as queryByShadowTitle,ln as screen,A as shadowQueries,Zn as within};
`));return a.name="ShadowDOMTestingLibraryElementError",a}});export{L as createDOMElementFilter,me as debug,Qe as deepQuerySelector,ce as deepQuerySelectorAll,te as findAllByShadowAltText,J as findAllByShadowDisplayValue,D as findAllByShadowLabelText,N as findAllByShadowPlaceholderText,b as findAllByShadowRole,he as findAllByShadowTestId,U as findAllByShadowText,re as findAllByShadowTitle,oe as findByShadowAltText,K as findByShadowDisplayValue,I as findByShadowLabelText,C as findByShadowPlaceholderText,q as findByShadowRole,ie as findByShadowTestId,k as findByShadowText,de as findByShadowTitle,v as getAllByShadowAltText,z as getAllByShadowDisplayValue,_ as getAllByShadowLabelText,V as getAllByShadowPlaceholderText,R as getAllByShadowRole,se as getAllByShadowTestId,$ as getAllByShadowText,le as getAllByShadowTitle,s as getAllElementsAndShadowRoots,ee as getByShadowAltText,Y as getByShadowDisplayValue,O as getByShadowLabelText,F as getByShadowPlaceholderText,H as getByShadowRole,Te as getByShadowTestId,W as getByShadowText,ne as getByShadowTitle,P as logShadowDOM,xe as prettyShadowDOM,A as queryAllByShadowAltText,x as queryAllByShadowDisplayValue,p as queryAllByShadowLabelText,B as queryAllByShadowPlaceholderText,c as queryAllByShadowRole,E as queryAllByShadowTestId,f as queryAllByShadowText,M as queryAllByShadowTitle,Z as queryByShadowAltText,X as queryByShadowDisplayValue,Q as queryByShadowLabelText,j as queryByShadowPlaceholderText,g as queryByShadowRole,ye as queryByShadowTestId,G as queryByShadowText,ae as queryByShadowTitle,lo as screen,S as shadowQueries,so as within};
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"inputs":{"src/trick-dom-testing-library.ts":{"bytes":3556,"imports":[]},"src/deep-query-selectors.ts":{"bytes":3659,"imports":[{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/shadow-queries.ts":{"bytes":18348,"imports":[{"path":"src/deep-query-selectors.ts","kind":"import-statement"},{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/pretty-shadow-dom.ts":{"bytes":8382,"imports":[{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/log-shadow-dom.ts":{"bytes":701,"imports":[{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/debug.ts":{"bytes":352,"imports":[{"path":"src/log-shadow-dom.ts","kind":"import-statement"}]},"src/shadow-screen.ts":{"bytes":11148,"imports":[{"path":"src/debug.ts","kind":"import-statement"},{"path":"src/shadow-queries.ts","kind":"import-statement"}]},"src/types.ts":{"bytes":2208,"imports":[]},"src/index.ts":{"bytes":1368,"imports":[{"path":"src/shadow-queries.ts","kind":"import-statement"},{"path":"src/debug.ts","kind":"import-statement"},{"path":"src/log-shadow-dom.ts","kind":"import-statement"},{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/shadow-screen.ts","kind":"import-statement"},{"path":"src/types.ts","kind":"import-statement"},{"path":"src/shadow-queries.ts","kind":"import-statement"},{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/deep-query-selectors.ts","kind":"import-statement"}]}},"outputs":{"dist/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":75450},"dist/index.cjs":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":1954},"src/shadow-queries.ts":{"bytesInOutput":4904},"src/trick-dom-testing-library.ts":{"bytesInOutput":1043},"src/deep-query-selectors.ts":{"bytesInOutput":848},"src/log-shadow-dom.ts":{"bytesInOutput":202},"src/pretty-shadow-dom.ts":{"bytesInOutput":2531},"src/debug.ts":{"bytesInOutput":80},"src/shadow-screen.ts":{"bytesInOutput":3440}},"bytes":16686}}}
{"inputs":{"src/trick-dom-testing-library.ts":{"bytes":3556,"imports":[]},"src/deep-query-selectors.ts":{"bytes":3659,"imports":[{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/shadow-queries.ts":{"bytes":18348,"imports":[{"path":"src/deep-query-selectors.ts","kind":"import-statement"},{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/pretty-shadow-dom.ts":{"bytes":8382,"imports":[{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/log-shadow-dom.ts":{"bytes":701,"imports":[{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/debug.ts":{"bytes":352,"imports":[{"path":"src/log-shadow-dom.ts","kind":"import-statement"}]},"src/shadow-screen.ts":{"bytes":11148,"imports":[{"path":"src/debug.ts","kind":"import-statement"},{"path":"src/shadow-queries.ts","kind":"import-statement"}]},"src/shadow-within.ts":{"bytes":12922,"imports":[{"path":"src/shadow-queries.ts","kind":"import-statement"}]},"src/types.ts":{"bytes":2208,"imports":[]},"src/index.ts":{"bytes":1253,"imports":[{"path":"src/shadow-queries.ts","kind":"import-statement"},{"path":"src/debug.ts","kind":"import-statement"},{"path":"src/log-shadow-dom.ts","kind":"import-statement"},{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/shadow-screen.ts","kind":"import-statement"},{"path":"src/shadow-within.ts","kind":"import-statement"},{"path":"src/types.ts","kind":"import-statement"},{"path":"src/shadow-queries.ts","kind":"import-statement"},{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/deep-query-selectors.ts","kind":"import-statement"}]}},"outputs":{"dist/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":91063},"dist/index.cjs":{"imports":[],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":1889},"src/shadow-queries.ts":{"bytesInOutput":4902},"src/trick-dom-testing-library.ts":{"bytesInOutput":1043},"src/deep-query-selectors.ts":{"bytesInOutput":848},"src/log-shadow-dom.ts":{"bytesInOutput":202},"src/pretty-shadow-dom.ts":{"bytesInOutput":2531},"src/debug.ts":{"bytesInOutput":80},"src/shadow-screen.ts":{"bytesInOutput":3439},"src/shadow-within.ts":{"bytesInOutput":3030}},"bytes":19648}}}

@@ -1,1 +0,1 @@

{"inputs":{"src/trick-dom-testing-library.ts":{"bytes":3556,"imports":[]},"src/deep-query-selectors.ts":{"bytes":3659,"imports":[{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/shadow-queries.ts":{"bytes":18348,"imports":[{"path":"src/deep-query-selectors.ts","kind":"import-statement"},{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/pretty-shadow-dom.ts":{"bytes":8382,"imports":[{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/log-shadow-dom.ts":{"bytes":701,"imports":[{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/debug.ts":{"bytes":352,"imports":[{"path":"src/log-shadow-dom.ts","kind":"import-statement"}]},"src/shadow-screen.ts":{"bytes":11148,"imports":[{"path":"src/debug.ts","kind":"import-statement"},{"path":"src/shadow-queries.ts","kind":"import-statement"}]},"src/types.ts":{"bytes":2208,"imports":[]},"src/index.ts":{"bytes":1368,"imports":[{"path":"src/shadow-queries.ts","kind":"import-statement"},{"path":"src/debug.ts","kind":"import-statement"},{"path":"src/log-shadow-dom.ts","kind":"import-statement"},{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/shadow-screen.ts","kind":"import-statement"},{"path":"src/types.ts","kind":"import-statement"},{"path":"src/shadow-queries.ts","kind":"import-statement"},{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/deep-query-selectors.ts","kind":"import-statement"}]}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":73951},"dist/index.js":{"imports":[],"exports":["createDOMElementFilter","debug","deepQuerySelector","deepQuerySelectorAll","findAllByShadowAltText","findAllByShadowDisplayValue","findAllByShadowLabelText","findAllByShadowPlaceholderText","findAllByShadowRole","findAllByShadowTestId","findAllByShadowText","findAllByShadowTitle","findByShadowAltText","findByShadowDisplayValue","findByShadowLabelText","findByShadowPlaceholderText","findByShadowRole","findByShadowTestId","findByShadowText","findByShadowTitle","getAllByShadowAltText","getAllByShadowDisplayValue","getAllByShadowLabelText","getAllByShadowPlaceholderText","getAllByShadowRole","getAllByShadowTestId","getAllByShadowText","getAllByShadowTitle","getAllElementsAndShadowRoots","getByShadowAltText","getByShadowDisplayValue","getByShadowLabelText","getByShadowPlaceholderText","getByShadowRole","getByShadowTestId","getByShadowText","getByShadowTitle","logShadowDOM","prettyShadowDOM","queryAllByShadowAltText","queryAllByShadowDisplayValue","queryAllByShadowLabelText","queryAllByShadowPlaceholderText","queryAllByShadowRole","queryAllByShadowTestId","queryAllByShadowText","queryAllByShadowTitle","queryByShadowAltText","queryByShadowDisplayValue","queryByShadowLabelText","queryByShadowPlaceholderText","queryByShadowRole","queryByShadowTestId","queryByShadowText","queryByShadowTitle","screen","shadowQueries","within"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":336},"src/shadow-queries.ts":{"bytesInOutput":4804},"src/trick-dom-testing-library.ts":{"bytesInOutput":1043},"src/deep-query-selectors.ts":{"bytesInOutput":848},"src/log-shadow-dom.ts":{"bytesInOutput":199},"src/pretty-shadow-dom.ts":{"bytesInOutput":2530},"src/debug.ts":{"bytesInOutput":80},"src/shadow-screen.ts":{"bytesInOutput":3440}},"bytes":14913}}}
{"inputs":{"src/trick-dom-testing-library.ts":{"bytes":3556,"imports":[]},"src/deep-query-selectors.ts":{"bytes":3659,"imports":[{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/shadow-queries.ts":{"bytes":18348,"imports":[{"path":"src/deep-query-selectors.ts","kind":"import-statement"},{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/pretty-shadow-dom.ts":{"bytes":8382,"imports":[{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/log-shadow-dom.ts":{"bytes":701,"imports":[{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/trick-dom-testing-library.ts","kind":"import-statement"}]},"src/debug.ts":{"bytes":352,"imports":[{"path":"src/log-shadow-dom.ts","kind":"import-statement"}]},"src/shadow-screen.ts":{"bytes":11148,"imports":[{"path":"src/debug.ts","kind":"import-statement"},{"path":"src/shadow-queries.ts","kind":"import-statement"}]},"src/shadow-within.ts":{"bytes":12922,"imports":[{"path":"src/shadow-queries.ts","kind":"import-statement"}]},"src/types.ts":{"bytes":2208,"imports":[]},"src/index.ts":{"bytes":1253,"imports":[{"path":"src/shadow-queries.ts","kind":"import-statement"},{"path":"src/debug.ts","kind":"import-statement"},{"path":"src/log-shadow-dom.ts","kind":"import-statement"},{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/shadow-screen.ts","kind":"import-statement"},{"path":"src/shadow-within.ts","kind":"import-statement"},{"path":"src/types.ts","kind":"import-statement"},{"path":"src/shadow-queries.ts","kind":"import-statement"},{"path":"src/pretty-shadow-dom.ts","kind":"import-statement"},{"path":"src/deep-query-selectors.ts","kind":"import-statement"}]}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":89543},"dist/index.js":{"imports":[],"exports":["createDOMElementFilter","debug","deepQuerySelector","deepQuerySelectorAll","findAllByShadowAltText","findAllByShadowDisplayValue","findAllByShadowLabelText","findAllByShadowPlaceholderText","findAllByShadowRole","findAllByShadowTestId","findAllByShadowText","findAllByShadowTitle","findByShadowAltText","findByShadowDisplayValue","findByShadowLabelText","findByShadowPlaceholderText","findByShadowRole","findByShadowTestId","findByShadowText","findByShadowTitle","getAllByShadowAltText","getAllByShadowDisplayValue","getAllByShadowLabelText","getAllByShadowPlaceholderText","getAllByShadowRole","getAllByShadowTestId","getAllByShadowText","getAllByShadowTitle","getAllElementsAndShadowRoots","getByShadowAltText","getByShadowDisplayValue","getByShadowLabelText","getByShadowPlaceholderText","getByShadowRole","getByShadowTestId","getByShadowText","getByShadowTitle","logShadowDOM","prettyShadowDOM","queryAllByShadowAltText","queryAllByShadowDisplayValue","queryAllByShadowLabelText","queryAllByShadowPlaceholderText","queryAllByShadowRole","queryAllByShadowTestId","queryAllByShadowText","queryAllByShadowTitle","queryByShadowAltText","queryByShadowDisplayValue","queryByShadowLabelText","queryByShadowPlaceholderText","queryByShadowRole","queryByShadowTestId","queryByShadowText","queryByShadowTitle","screen","shadowQueries","within"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":258},"src/shadow-queries.ts":{"bytesInOutput":4804},"src/trick-dom-testing-library.ts":{"bytesInOutput":1043},"src/deep-query-selectors.ts":{"bytesInOutput":848},"src/log-shadow-dom.ts":{"bytesInOutput":199},"src/pretty-shadow-dom.ts":{"bytesInOutput":2530},"src/debug.ts":{"bytesInOutput":80},"src/shadow-screen.ts":{"bytesInOutput":3440},"src/shadow-within.ts":{"bytesInOutput":3033}},"bytes":17868}}}
{
"name": "shadow-dom-testing-library",
"version": "1.11.1",
"version": "1.11.2",
"description": "An extension of DOM-testing-library to provide hooks into the shadow dom",

@@ -5,0 +5,0 @@ "type": "module",

@@ -1,2 +0,2 @@

import { queries, within, configure, getConfig } from "@testing-library/dom";
import { configure, getConfig } from "@testing-library/dom";

@@ -8,2 +8,3 @@ import * as shadowQueries from "./shadow-queries";

import { shadowScreen } from "./shadow-screen";
import { shadowWithin } from "./shadow-within";

@@ -29,11 +30,2 @@ configure({

const allQueries = {
...queries,
...shadowQueries,
};
function shadowWithin(element: HTMLElement) {
return within(element, allQueries);
}
export * from "./types";

@@ -40,0 +32,0 @@ export * from "./shadow-queries";

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc