react-grab 0.1.48-dev.a036acc → 0.1.48-dev.c7c0198

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 (34) hide show
  1. package/README.md +1 -1
  2. package/dist/copy-content-CACCoy_N.js +10 -0
  3. package/dist/{copy-content-BPB8MmpL.d.cts → copy-content-Ca2txV90.d.cts} +25 -15
  4. package/dist/{copy-content-C7lFyXsY.d.ts → copy-content-D6YIoJK4.d.ts} +25 -15
  5. package/dist/copy-content-DQ0_ITeM.cjs +10 -0
  6. package/dist/core/index.cjs +1 -1
  7. package/dist/core/index.d.cts +2 -2
  8. package/dist/core/index.d.ts +2 -2
  9. package/dist/core/index.js +1 -1
  10. package/dist/{core-Cs4nKfRj.cjs → core-a0_RN3i0.cjs} +4 -4
  11. package/dist/{core-DtDBp7P-.js → core-cmGjioE9.js} +4 -4
  12. package/dist/{create-pointer-move-prompt-handoff-DRZp7pT5.js → create-pointer-move-prompt-handoff-BsTTt1Ah.js} +1 -1
  13. package/dist/{create-pointer-move-prompt-handoff-D4JZbeiE.cjs → create-pointer-move-prompt-handoff-CztPxi4A.cjs} +1 -1
  14. package/dist/freeze-updates-BRkI54pl.js +52 -0
  15. package/dist/freeze-updates-BoR9QPne.cjs +52 -0
  16. package/dist/{index-VkohC_Hw.d.ts → index-C_tGQJlm.d.ts} +1 -1
  17. package/dist/{index-DMyJsiaz.d.cts → index-CgWlIagV.d.cts} +1 -1
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.cts +2 -2
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.global.js +17 -16
  22. package/dist/index.js +1 -1
  23. package/dist/primitives.cjs +2 -2
  24. package/dist/primitives.d.cts +1 -1
  25. package/dist/primitives.d.ts +1 -1
  26. package/dist/primitives.js +2 -2
  27. package/dist/{renderer-D07SadMO.cjs → renderer-BWZ-_wu3.cjs} +1 -1
  28. package/dist/renderer-sJ2xECuN.js +9 -0
  29. package/package.json +3 -3
  30. package/dist/copy-content-HtjEd7D4.js +0 -10
  31. package/dist/copy-content-i_57jcU1.cjs +0 -10
  32. package/dist/freeze-updates-2TTw39qB.js +0 -51
  33. package/dist/freeze-updates-m7dy-Od3.cjs +0 -51
  34. package/dist/renderer-DhsYpO42.js +0 -9
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-DtDBp7P-.js";import{N as a}from"./freeze-updates-2TTw39qB.js";import{n as o,o as s}from"./copy-content-HtjEd7D4.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};
9
+ import{a as e,i as t,n,r,t as i}from"./core-cmGjioE9.js";import{P as a}from"./freeze-updates-BRkI54pl.js";import{n as o,o as s}from"./copy-content-CACCoy_N.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-m7dy-Od3.cjs`),t=require(`./copy-content-i_57jcU1.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.Mt){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.Mt){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.I(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.f();let r=document.elementsFromPoint(t,n);return e.d(),Array.from(r)},f=new Set;let p=!1;const m=t=>{p=!0,f.add(e.t()),e.r(),f.add(e.o(t??[document.body]))},h=()=>{p=!1;for(let e of Array.from(f))e();f.clear(),e.o([]),e.i()},g=()=>p,_=async(t,n)=>{await e.s(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;
9
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./freeze-updates-BoR9QPne.cjs`),t=require(`./copy-content-DQ0_ITeM.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.Nt){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.Nt){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.R(n),d=t.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.f();let r=document.elementsFromPoint(t,n);return e.d(),Array.from(r)},f=new Set;let p=!1;const m=t=>{p=!0,f.add(e.t()),e.r(),f.add(e.o(t??[document.body]))},h=()=>{p=!1;for(let e of Array.from(f))e();f.clear(),e.o([]),e.i()},g=()=>p,_=async(t,n)=>{await e.s(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-BPB8MmpL.cjs";
9
+ import { i as Fiber, r as StackFrame, t as copyContent } from "./copy-content-Ca2txV90.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-C7lFyXsY.js";
9
+ import { i as Fiber, r as StackFrame, t as copyContent } from "./copy-content-D6YIoJK4.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{I as e,Mt as t,d as n,f as r,i,o as a,r as o,s,t as c}from"./freeze-updates-2TTw39qB.js";import{c as l,l as u,n as d,o as f,r as p,s as m,t as h,u as g}from"./copy-content-HtjEd7D4.js";const _=new Map([`top`,`right`,`bottom`,`left`].flatMap(e=>[[`border-${e}-style`,e],[`border-${e}-color`,e]]));let v=null;const y=new Map,b=()=>v||(v=document.createElement(`iframe`),v.style.cssText=`position:fixed;left:-9999px;width:0;height:0;border:none;visibility:hidden;`,document.body.appendChild(v),v),x=e=>{let n=y.get(e);if(n)return n;let r=b(),i=r.contentDocument,a=i.createElement(e);i.body.appendChild(a);let o=r.contentWindow.getComputedStyle(a),s=new Map;for(let e of t){let t=o.getPropertyValue(e);t&&s.set(e,t)}return a.remove(),y.set(e,s),s},S=(e,t)=>{let n=_.get(e);if(!n)return!1;let r=t.getPropertyValue(`border-${n}-width`);return r===`0px`||r===`0`},C=e=>{let n=x(e.tagName.toLowerCase()),r=getComputedStyle(e),i=[];for(let e of t){let t=r.getPropertyValue(e);t&&t!==n.get(e)&&(S(e,r)||i.push(`${e}: ${t};`))}let a=e.getAttribute(`class`)?.trim(),o=i.join(`
10
- `);return a?o?`className: ${a}\n\n${o}`:`className: ${a}`:o},w=()=>{v?.remove(),v=null,y.clear()},T=async t=>{let[n,r,i]=await Promise.all([d(t),l(t),f(t).then(e=>e??[])]),a=await m(t),o=u(t),s=p(t),c=e(t),h=g(t),_=C(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:h,styles:_}},E=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];r();let i=document.elementsFromPoint(e,t);return n(),Array.from(i)},D=new Set;let O=!1;const k=e=>{O=!0,D.add(c()),o(),D.add(a(e??[document.body]))},A=()=>{O=!1;for(let e of Array.from(D))e();D.clear(),a([]),i()},j=()=>O,M=async(e,t)=>{await s(e,t)};export{h as copyContent,w as disposeBaselineStyles,k as freeze,T as getElementContext,E as getElementsAtPosition,j as isFreezeActive,M as openFile,A as unfreeze};
9
+ import{Nt as e,R as t,d as n,f as r,i,o as a,r as o,s,t as c}from"./freeze-updates-BRkI54pl.js";import{c as l,d as u,l as d,n as f,o as p,r as m,s as h,t as g,u as _}from"./copy-content-CACCoy_N.js";const v=new Map([`top`,`right`,`bottom`,`left`].flatMap(e=>[[`border-${e}-style`,e],[`border-${e}-color`,e]]));let y=null;const b=new Map,x=()=>y||(y=document.createElement(`iframe`),y.style.cssText=`position:fixed;left:-9999px;width:0;height:0;border:none;visibility:hidden;`,document.body.appendChild(y),y),S=t=>{let n=b.get(t);if(n)return n;let r=x(),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(),b.set(t,s),s},C=(e,t)=>{let n=v.get(e);if(!n)return!1;let r=t.getPropertyValue(`border-${n}-width`);return r===`0px`||r===`0`},w=t=>{let n=S(t.tagName.toLowerCase()),r=getComputedStyle(t),i=[];for(let t of e){let e=r.getPropertyValue(t);e&&e!==n.get(t)&&(C(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},T=()=>{y?.remove(),y=null,b.clear()},E=async e=>{let[n,r,i]=await Promise.all([f(e),l(e),p(e).then(e=>e??[])]),a=await h(e),o=d(e),s=m(e),c=t(e),g=u(_(e)),v=w(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:g,styles:v}},D=(e,t)=>{if(!Number.isFinite(e)||!Number.isFinite(t))return[];r();let i=document.elementsFromPoint(e,t);return n(),Array.from(i)},O=new Set;let k=!1;const A=e=>{k=!0,O.add(c()),o(),O.add(a(e??[document.body]))},j=()=>{k=!1;for(let e of Array.from(O))e();O.clear(),a([]),i()},M=()=>k,N=async(e,t)=>{await s(e,t)};export{g as copyContent,T as disposeBaselineStyles,A as freeze,E as getElementContext,D as getElementsAtPosition,M as isFreezeActive,N as openFile,j as unfreeze};