react-grab 0.1.44-dev.212f8cd → 0.1.44-dev.27e140d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{action-shortcuts-BDpnp0up.cjs → action-shortcuts-7hAew2FY.cjs} +1 -1
  2. package/dist/action-shortcuts-DEFWl3W8.js +9 -0
  3. package/dist/{index-aMJqwVQq.d.cts → copy-content-B5eFPFGr.d.cts} +219 -17
  4. package/dist/copy-content-Blo2x2eu.js +10 -0
  5. package/dist/{index-qewm1CVI.d.ts → copy-content-DmBP15ec.d.ts} +219 -17
  6. package/dist/copy-content-crbRiXWE.cjs +10 -0
  7. package/dist/core/index.cjs +1 -1
  8. package/dist/core/index.d.cts +3 -3
  9. package/dist/core/index.d.ts +3 -3
  10. package/dist/core/index.js +1 -1
  11. package/dist/core-BhuVN81r.cjs +11 -0
  12. package/dist/core-xn9USmBJ.js +11 -0
  13. package/dist/freeze-updates-BO5ajc-z.cjs +51 -0
  14. package/dist/freeze-updates-bDQWoAI1.js +51 -0
  15. package/dist/index-CTRX5ujF.d.ts +27 -0
  16. package/dist/index-D_u6ADO3.d.cts +27 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.cts +3 -3
  19. package/dist/index.d.ts +3 -3
  20. package/dist/index.global.js +16 -16
  21. package/dist/index.js +1 -1
  22. package/dist/primitives.cjs +2 -2
  23. package/dist/primitives.d.cts +1 -1
  24. package/dist/primitives.d.ts +1 -1
  25. package/dist/primitives.js +2 -2
  26. package/dist/{renderer-CvII7QXb.cjs → renderer-DzgGE4Yp.cjs} +2 -2
  27. package/dist/renderer-sKopdMTW.js +13 -0
  28. package/dist/styles.css +1 -1
  29. package/package.json +3 -3
  30. package/dist/action-shortcuts-dAByuNs1.js +0 -9
  31. package/dist/copy-content-3pnWacho.d.cts +0 -218
  32. package/dist/copy-content-DH6fBB50.d.ts +0 -218
  33. package/dist/copy-content-DrVkBymy.js +0 -9
  34. package/dist/copy-content-osQ6kXAx.cjs +0 -9
  35. package/dist/core-CLgrT6O3.js +0 -11
  36. package/dist/core-k5R9Z0Jf.cjs +0 -11
  37. package/dist/freeze-updates-B4_g16fj.cjs +0 -52
  38. package/dist/freeze-updates-wsdBPvEd.js +0 -52
  39. package/dist/renderer-BxDTk3KC.js +0 -13
package/dist/index.js CHANGED
@@ -6,4 +6,4 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import{a as e,i as t,n,r,t as i}from"./core-CLgrT6O3.js";import{A as a,E as o,S as s}from"./freeze-updates-wsdBPvEd.js";let c=null;const l=()=>typeof window>`u`?c:window.__REACT_GRAB__??c??null,u=e=>{c=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__)},d=[],f=e=>{for(;d.length>0;){let t=d.shift();t&&e.registerPlugin(t)}},p=e=>{let t=l();if(t){t.registerPlugin(e);return}d.push(e)},m=e=>{let t=l();if(t){t.unregisterPlugin(e);return}let n=d.findIndex(t=>t.name===e);n!==-1&&d.splice(n,1)};typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(window.__REACT_GRAB__?c=window.__REACT_GRAB__:(c=i(),window.__REACT_GRAB__=c),f(c),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:c})));export{e as DEFAULT_THEME,t as commentPlugin,s as formatElementInfo,n as generateSnippet,l as getGlobalApi,o as getStack,i as init,a as isInstrumentationActive,r as openPlugin,p as registerPlugin,u as setGlobalApi,m as unregisterPlugin};
9
+ import{a as e,i as t,n,r,t as i}from"./core-xn9USmBJ.js";import{M as a}from"./freeze-updates-bDQWoAI1.js";import{n as o,o as s}from"./copy-content-Blo2x2eu.js";let c=null;const l=()=>typeof window>`u`?c:window.__REACT_GRAB__??c??null,u=e=>{c=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__)},d=[],f=e=>{for(;d.length>0;){let t=d.shift();t&&e.registerPlugin(t)}},p=e=>{let t=l();if(t){t.registerPlugin(e);return}d.push(e)},m=e=>{let t=l();if(t){t.unregisterPlugin(e);return}let n=d.findIndex(t=>t.name===e);n!==-1&&d.splice(n,1)};typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(window.__REACT_GRAB__?c=window.__REACT_GRAB__:(c=i(),window.__REACT_GRAB__=c),f(c),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:c})));export{e as DEFAULT_THEME,t as commentPlugin,o as formatElementInfo,n as generateSnippet,l as getGlobalApi,s as getStack,i as init,a as isInstrumentationActive,r as openPlugin,p as registerPlugin,u as setGlobalApi,m as unregisterPlugin};
@@ -6,5 +6,5 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./freeze-updates-B4_g16fj.cjs`),t=require(`./copy-content-osQ6kXAx.cjs`),n=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),r=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},i=(e,t)=>{let i=n.has(e)||e.startsWith(`data-`)&&r(e),a=r(t)&&t.length<100||t.startsWith(`#`)&&r(t.slice(1));return i&&a},a=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},o=e=>{let t=0;for(let n of e)t+=n.penalty;return t},s=(e,t)=>o(e)-o(t),c=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(r instanceof Element&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},l=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,u=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,d=(e,t)=>{let n=[],i=e.getAttribute(`id`),a=e.tagName.toLowerCase();i&&r(i)&&n.push({name:`#${CSS.escape(i)}`,penalty:0});for(let t of e.classList)r(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:a,penalty:5});let o=c(e,a);o!==void 0&&n.push({name:u(a,o),penalty:10});let s=c(e);return s!==void 0&&n.push({name:l(a,s),penalty:50}),n},f=(t,n=e.at,r=[])=>{if(n<=0)return[];if(t.length===0)return[r];let i=[];for(let e of t[0]){let a=n-i.length;if(a<=0)break;i.push(...f(t.slice(1),a,[...r,e]))}return i},p=(e,t)=>{let n=t.getRootNode?.();return n instanceof ShadowRoot?n:e instanceof Document?e:e.ownerDocument},m=(e,t)=>t.querySelectorAll(a(e)).length===1,h=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=c(n,e);if(t===void 0)return;r.push({name:u(e,t),penalty:10}),n=n.parentElement}return m(r,t)?r:void 0},g=(e,n,r,i)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new t.r;if(e.tagName.toLowerCase()===`html`)return`html`;let o=p(n,e),c=Date.now(),l=[],u=e,g=0,_;for(;u&&u!==o&&!_;)if(l.push(d(u,i)),u=u.parentElement,g++,g>=3){let n=f(l);n.sort(s);for(let i of n){if(Date.now()-c>r){let n=h(e,o);if(!n)throw new t.a(r);return a(n)}if(m(i,o)){_=i;break}}}if(!_&&g<3){let e=f(l);e.sort(s);for(let t of e){if(Date.now()-c>r)break;if(m(t,o)){_=t;break}}}if(!_)throw new t.i;return a(_)},_=e=>typeof CSS<`u`&&typeof CSS.escape==`function`?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,e=>`\\${e}`),v=e=>e.ownerDocument.body??e.ownerDocument.documentElement,y=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`role`,`name`,`title`,`alt`]),b=e=>e.length>0&&e.length<=120,x=(e,t)=>{try{let n=e.ownerDocument.querySelectorAll(t);return n.length===1&&n[0]===e}catch{return!1}},S=e=>{if(e instanceof HTMLElement&&e.id){let t=`#${_(e.id)}`;if(x(e,t))return t}for(let t of y){let n=e.getAttribute(t);if(!n||!b(n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(x(e,r))return r;let i=`${e.tagName.toLowerCase()}${r}`;if(x(e,i))return i}return null},C=e=>{let t=[],n=v(e),r=e;for(;r;){if(r instanceof HTMLElement&&r.id){t.unshift(`#${_(r.id)}`);break}let e=r.parentElement;if(!e){t.unshift(r.tagName.toLowerCase());break}let i=Array.from(e.children).indexOf(r),a=i>=0?i+1:1;if(t.unshift(`${r.tagName.toLowerCase()}:nth-child(${a})`),e===n){t.unshift(n.tagName.toLowerCase());break}r=e}return t.join(` > `)},w=e=>{let t=S(e);if(t)return t;try{let t=g(e,v(e),200,(e,t)=>i(e,t)||y.has(e)&&b(t));if(t)return t}catch{}return C(e)},T=new Map([`top`,`right`,`bottom`,`left`].flatMap(e=>[[`border-${e}-style`,e],[`border-${e}-color`,e]]));let E=null;const D=new Map,O=()=>E||(E=document.createElement(`iframe`),E.style.cssText=`position:fixed;left:-9999px;width:0;height:0;border:none;visibility:hidden;`,document.body.appendChild(E),E),k=t=>{let n=D.get(t);if(n)return n;let r=O(),i=r.contentDocument,a=i.createElement(t);i.body.appendChild(a);let o=r.contentWindow.getComputedStyle(a),s=new Map;for(let t of e.vt){let e=o.getPropertyValue(t);e&&s.set(t,e)}return a.remove(),D.set(t,s),s},A=(e,t)=>{let n=T.get(e);if(!n)return!1;let r=t.getPropertyValue(`border-${n}-width`);return r===`0px`||r===`0`},j=t=>{let n=k(t.tagName.toLowerCase()),r=getComputedStyle(t),i=[];for(let t of e.vt){let e=r.getPropertyValue(t);e&&e!==n.get(t)&&(A(t,r)||i.push(`${t}: ${e};`))}let a=t.getAttribute(`class`)?.trim(),o=i.join(`
10
- `);return a?o?`className: ${a}\n\n${o}`:`className: ${a}`:o},M=()=>{E?.remove(),E=null,D.clear()},N=async t=>{let[n,r,i]=await Promise.all([e.S(t),e.k(t),e.E(t).then(e=>e??[])]),a=await e.D(t),o=e.C(t),s=e.x(t),c=e.j(t),l=w(t),u=j(t);return{element:t,snippet:n,htmlPreview:o,stackString:a,stack:i,componentName:s,filePath:r?.filePath??null,lineNumber:r?.lineNumber??null,columnNumber:r?.columnNumber??null,fiber:c,selector:l,styles:u}},P=(t,n)=>{if(!Number.isFinite(t)||!Number.isFinite(n))return[];e.m();let r=document.elementsFromPoint(t,n);return e.p(),Array.from(r)},F=new Set;let I=!1;const L=t=>{I=!0,F.add(e.t()),F.add(e.o(t??[document.body])),e.s(),e.r()},R=()=>{I=!1;for(let e of Array.from(F))e();F.clear(),e.o([]),e.c(),e.i()},z=()=>I,B=async(t,n)=>{await e.l(t,n)};exports.copyContent=t.t,exports.disposeBaselineStyles=M,exports.freeze=L,exports.getElementContext=N,exports.getElementsAtPosition=P,exports.isFreezeActive=z,exports.openFile=B,exports.unfreeze=R;
9
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./freeze-updates-BO5ajc-z.cjs`),t=require(`./copy-content-crbRiXWE.cjs`),n=new Map([`top`,`right`,`bottom`,`left`].flatMap(e=>[[`border-${e}-style`,e],[`border-${e}-color`,e]]));let r=null;const i=new Map,a=()=>r||(r=document.createElement(`iframe`),r.style.cssText=`position:fixed;left:-9999px;width:0;height:0;border:none;visibility:hidden;`,document.body.appendChild(r),r),o=t=>{let n=i.get(t);if(n)return n;let r=a(),o=r.contentDocument,s=o.createElement(t);o.body.appendChild(s);let c=r.contentWindow.getComputedStyle(s),l=new Map;for(let t of e.Et){let e=c.getPropertyValue(t);e&&l.set(t,e)}return s.remove(),i.set(t,l),l},s=(e,t)=>{let r=n.get(e);if(!r)return!1;let i=t.getPropertyValue(`border-${r}-width`);return i===`0px`||i===`0`},c=t=>{let n=o(t.tagName.toLowerCase()),r=getComputedStyle(t),i=[];for(let t of e.Et){let e=r.getPropertyValue(t);e&&e!==n.get(t)&&(s(t,r)||i.push(`${t}: ${e};`))}let a=t.getAttribute(`class`)?.trim(),c=i.join(`
10
+ `);return a?c?`className: ${a}\n\n${c}`:`className: ${a}`:c},l=()=>{r?.remove(),r=null,i.clear()},u=async n=>{let[r,i,a]=await Promise.all([t.n(n),t.c(n),t.o(n).then(e=>e??[])]),o=await t.s(n),s=t.l(n),l=t.r(n),u=e.P(n),d=t.u(n),f=c(n);return{element:n,snippet:r,htmlPreview:s,stackString:o,stack:a,componentName:l,filePath:i?.filePath??null,lineNumber:i?.lineNumber??null,columnNumber:i?.columnNumber??null,fiber:u,selector:d,styles:f}},d=(t,n)=>{if(!Number.isFinite(t)||!Number.isFinite(n))return[];e.m();let r=document.elementsFromPoint(t,n);return e.p(),Array.from(r)},f=new Set;let p=!1;const m=t=>{p=!0,f.add(e.t()),f.add(e.o(t??[document.body])),e.s(),e.r()},h=()=>{p=!1;for(let e of Array.from(f))e();f.clear(),e.o([]),e.c(),e.i()},g=()=>p,_=async(t,n)=>{await e.l(t,n)};exports.copyContent=t.t,exports.disposeBaselineStyles=l,exports.freeze=m,exports.getElementContext=u,exports.getElementsAtPosition=d,exports.isFreezeActive=g,exports.openFile=_,exports.unfreeze=h;
@@ -6,7 +6,7 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { n as StackFrame, r as Fiber, t as copyContent } from "./copy-content-3pnWacho.cjs";
9
+ import { n as StackFrame, r as Fiber, t as copyContent } from "./copy-content-B5eFPFGr.cjs";
10
10
 
11
11
  //#region src/utils/extract-element-css.d.ts
12
12
  declare const disposeBaselineStyles: () => void;
@@ -6,7 +6,7 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import { n as StackFrame, r as Fiber, t as copyContent } from "./copy-content-DH6fBB50.js";
9
+ import { n as StackFrame, r as Fiber, t as copyContent } from "./copy-content-DmBP15ec.js";
10
10
 
11
11
  //#region src/utils/extract-element-css.d.ts
12
12
  declare const disposeBaselineStyles: () => void;
@@ -6,5 +6,5 @@
6
6
  * This source code is licensed under the MIT license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import{C as e,D as t,E as n,S as r,at as i,c as a,i as o,j as s,k as c,l,m as u,o as d,p as f,r as p,s as m,t as h,vt as g,x as _}from"./freeze-updates-wsdBPvEd.js";import{a as v,i as y,r as b,t as x}from"./copy-content-DrVkBymy.js";const ee=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),S=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},C=(e,t)=>{let n=ee.has(e)||e.startsWith(`data-`)&&S(e),r=S(t)&&t.length<100||t.startsWith(`#`)&&S(t.slice(1));return n&&r},w=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},T=e=>{let t=0;for(let n of e)t+=n.penalty;return t},E=(e,t)=>T(e)-T(t),D=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(r instanceof Element&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},O=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,k=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,A=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&S(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)S(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:i,penalty:5});let a=D(e,i);a!==void 0&&n.push({name:k(i,a),penalty:10});let o=D(e);return o!==void 0&&n.push({name:O(i,o),penalty:50}),n},j=(e,t=i,n=[])=>{if(t<=0)return[];if(e.length===0)return[n];let r=[];for(let i of e[0]){let a=t-r.length;if(a<=0)break;r.push(...j(e.slice(1),a,[...n,i]))}return r},te=(e,t)=>{let n=t.getRootNode?.();return n instanceof ShadowRoot?n:e instanceof Document?e:e.ownerDocument},M=(e,t)=>t.querySelectorAll(w(e)).length===1,N=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=D(n,e);if(t===void 0)return;r.push({name:k(e,t),penalty:10}),n=n.parentElement}return M(r,t)?r:void 0},P=(e,t,n,r)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new b;if(e.tagName.toLowerCase()===`html`)return`html`;let i=te(t,e),a=Date.now(),o=[],s=e,c=0,l;for(;s&&s!==i&&!l;)if(o.push(A(s,r)),s=s.parentElement,c++,c>=3){let t=j(o);t.sort(E);for(let r of t){if(Date.now()-a>n){let t=N(e,i);if(!t)throw new v(n);return w(t)}if(M(r,i)){l=r;break}}}if(!l&&c<3){let e=j(o);e.sort(E);for(let t of e){if(Date.now()-a>n)break;if(M(t,i)){l=t;break}}}if(!l)throw new y;return w(l)},F=e=>typeof CSS<`u`&&typeof CSS.escape==`function`?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,e=>`\\${e}`),I=e=>e.ownerDocument.body??e.ownerDocument.documentElement,L=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`role`,`name`,`title`,`alt`]),R=e=>e.length>0&&e.length<=120,z=(e,t)=>{try{let n=e.ownerDocument.querySelectorAll(t);return n.length===1&&n[0]===e}catch{return!1}},B=e=>{if(e instanceof HTMLElement&&e.id){let t=`#${F(e.id)}`;if(z(e,t))return t}for(let t of L){let n=e.getAttribute(t);if(!n||!R(n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(z(e,r))return r;let i=`${e.tagName.toLowerCase()}${r}`;if(z(e,i))return i}return null},V=e=>{let t=[],n=I(e),r=e;for(;r;){if(r instanceof HTMLElement&&r.id){t.unshift(`#${F(r.id)}`);break}let e=r.parentElement;if(!e){t.unshift(r.tagName.toLowerCase());break}let i=Array.from(e.children).indexOf(r),a=i>=0?i+1:1;if(t.unshift(`${r.tagName.toLowerCase()}:nth-child(${a})`),e===n){t.unshift(n.tagName.toLowerCase());break}r=e}return t.join(` > `)},H=e=>{let t=B(e);if(t)return t;try{let t=P(e,I(e),200,(e,t)=>C(e,t)||L.has(e)&&R(t));if(t)return t}catch{}return V(e)},U=new Map([`top`,`right`,`bottom`,`left`].flatMap(e=>[[`border-${e}-style`,e],[`border-${e}-color`,e]]));let W=null;const G=new Map,K=()=>W||(W=document.createElement(`iframe`),W.style.cssText=`position:fixed;left:-9999px;width:0;height:0;border:none;visibility:hidden;`,document.body.appendChild(W),W),q=e=>{let t=G.get(e);if(t)return t;let n=K(),r=n.contentDocument,i=r.createElement(e);r.body.appendChild(i);let a=n.contentWindow.getComputedStyle(i),o=new Map;for(let e of g){let t=a.getPropertyValue(e);t&&o.set(e,t)}return i.remove(),G.set(e,o),o},J=(e,t)=>{let n=U.get(e);if(!n)return!1;let r=t.getPropertyValue(`border-${n}-width`);return r===`0px`||r===`0`},Y=e=>{let t=q(e.tagName.toLowerCase()),n=getComputedStyle(e),r=[];for(let e of g){let i=n.getPropertyValue(e);i&&i!==t.get(e)&&(J(e,n)||r.push(`${e}: ${i};`))}let i=e.getAttribute(`class`)?.trim(),a=r.join(`
10
- `);return i?a?`className: ${i}\n\n${a}`:`className: ${i}`:a},X=()=>{W?.remove(),W=null,G.clear()},Z=async i=>{let[a,o,l]=await Promise.all([r(i),c(i),n(i).then(e=>e??[])]),u=await t(i),d=e(i),f=_(i),p=s(i),m=H(i),h=Y(i);return{element:i,snippet:a,htmlPreview:d,stackString:u,stack:l,componentName:f,filePath:o?.filePath??null,lineNumber:o?.lineNumber??null,columnNumber:o?.columnNumber??null,fiber:p,selector:m,styles:h}},ne=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];u();let n=document.elementsFromPoint(e,t);return f(),Array.from(n)},Q=new Set;let $=!1;const re=e=>{$=!0,Q.add(h()),Q.add(d(e??[document.body])),m(),p()},ie=()=>{$=!1;for(let e of Array.from(Q))e();Q.clear(),d([]),a(),o()},ae=()=>$,oe=async(e,t)=>{await l(e,t)};export{x as copyContent,X as disposeBaselineStyles,re as freeze,Z as getElementContext,ne as getElementsAtPosition,ae as isFreezeActive,oe as openFile,ie as unfreeze};
9
+ import{Et as e,P as t,c as n,i as r,l as i,m as a,o,p as s,r as c,s as l,t as u}from"./freeze-updates-bDQWoAI1.js";import{c as d,l as f,n as p,o as m,r as h,s as g,t as _,u as v}from"./copy-content-Blo2x2eu.js";const y=new Map([`top`,`right`,`bottom`,`left`].flatMap(e=>[[`border-${e}-style`,e],[`border-${e}-color`,e]]));let b=null;const x=new Map,S=()=>b||(b=document.createElement(`iframe`),b.style.cssText=`position:fixed;left:-9999px;width:0;height:0;border:none;visibility:hidden;`,document.body.appendChild(b),b),C=t=>{let n=x.get(t);if(n)return n;let r=S(),i=r.contentDocument,a=i.createElement(t);i.body.appendChild(a);let o=r.contentWindow.getComputedStyle(a),s=new Map;for(let t of e){let e=o.getPropertyValue(t);e&&s.set(t,e)}return a.remove(),x.set(t,s),s},w=(e,t)=>{let n=y.get(e);if(!n)return!1;let r=t.getPropertyValue(`border-${n}-width`);return r===`0px`||r===`0`},T=t=>{let n=C(t.tagName.toLowerCase()),r=getComputedStyle(t),i=[];for(let t of e){let e=r.getPropertyValue(t);e&&e!==n.get(t)&&(w(t,r)||i.push(`${t}: ${e};`))}let a=t.getAttribute(`class`)?.trim(),o=i.join(`
10
+ `);return a?o?`className: ${a}\n\n${o}`:`className: ${a}`:o},E=()=>{b?.remove(),b=null,x.clear()},D=async e=>{let[n,r,i]=await Promise.all([p(e),d(e),m(e).then(e=>e??[])]),a=await g(e),o=f(e),s=h(e),c=t(e),l=v(e),u=T(e);return{element:e,snippet:n,htmlPreview:o,stackString:a,stack:i,componentName:s,filePath:r?.filePath??null,lineNumber:r?.lineNumber??null,columnNumber:r?.columnNumber??null,fiber:c,selector:l,styles:u}},O=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];a();let n=document.elementsFromPoint(e,t);return s(),Array.from(n)},k=new Set;let A=!1;const j=e=>{A=!0,k.add(u()),k.add(o(e??[document.body])),l(),c()},M=()=>{A=!1;for(let e of Array.from(k))e();k.clear(),o([]),n(),r()},N=()=>A,P=async(e,t)=>{await i(e,t)};export{_ as copyContent,E as disposeBaselineStyles,j as freeze,D as getElementContext,O as getElementsAtPosition,N as isFreezeActive,P as openFile,M as unfreeze};