grab 0.1.46 → 0.1.47-dev.39ce512

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 (35) hide show
  1. package/dist/{action-shortcuts-BhgJKntz.cjs → action-shortcuts-BV6qQlLL.cjs} +1 -1
  2. package/dist/{action-shortcuts-cDhw_6qW.js → action-shortcuts-CBJf-Wxw.js} +1 -1
  3. package/dist/copy-content-B-gv5POY.js +10 -0
  4. package/dist/copy-content-CHmDtPaN.cjs +10 -0
  5. package/dist/{copy-content-CBoQwSYB.d.ts → copy-content-D8CqvhtV.d.ts} +12 -2
  6. package/dist/{copy-content-BM2MjZVW.d.cts → copy-content-pjGQdIH0.d.cts} +12 -2
  7. package/dist/core/index.cjs +1 -1
  8. package/dist/core/index.d.cts +2 -2
  9. package/dist/core/index.d.ts +2 -2
  10. package/dist/core/index.js +1 -1
  11. package/dist/core-CQ5wIyG8.cjs +15 -0
  12. package/dist/core-sPAZHO2u.js +15 -0
  13. package/dist/freeze-updates-D92-GpaT.cjs +51 -0
  14. package/dist/freeze-updates-EIMe6BeH.js +51 -0
  15. package/dist/{index-BTBtaQ_D.d.ts → index-CxCZZDDI.d.ts} +1 -1
  16. package/dist/{index-DsD2BMI2.d.cts → index-olf-8IUn.d.cts} +1 -1
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.cts +2 -2
  19. package/dist/index.d.ts +2 -2
  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-D6QKnWE7.cjs → renderer-CFpJyaTN.cjs} +1 -1
  27. package/dist/renderer-ITgutgxt.js +9 -0
  28. package/package.json +2 -2
  29. package/dist/copy-content-BjOai5Gj.cjs +0 -10
  30. package/dist/copy-content-CI1iDLrJ.js +0 -10
  31. package/dist/core-Ctfgtt4E.js +0 -15
  32. package/dist/core-QX9TA-3t.cjs +0 -15
  33. package/dist/freeze-updates-CFmys1LC.cjs +0 -51
  34. package/dist/freeze-updates-DqjugsEW.js +0 -51
  35. package/dist/renderer-BvP-lUxd.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-Ctfgtt4E.js";import{M as a}from"./freeze-updates-DqjugsEW.js";import{n as o,o as s}from"./copy-content-CI1iDLrJ.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-sPAZHO2u.js";import{I as a}from"./freeze-updates-EIMe6BeH.js";import{n as o,o as s}from"./copy-content-B-gv5POY.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-CFmys1LC.cjs`),t=require(`./copy-content-BjOai5Gj.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.Dt){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.Dt){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;
9
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./freeze-updates-D92-GpaT.cjs`),t=require(`./copy-content-CHmDtPaN.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.jt){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.jt){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.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.v();let r=document.elementsFromPoint(t,n);return e._(),Array.from(r)},f=new Set;let p=!1;const m=t=>{p=!0,f.add(e.t()),f.add(e.u(t??[document.body])),e.d(),e.a()},h=()=>{p=!1;for(let e of Array.from(f))e();f.clear(),e.u([]),e.f(),e.o()},g=()=>p,_=async(t,n)=>{await e.p(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-BM2MjZVW.cjs";
9
+ import { n as StackFrame, r as Fiber, t as copyContent } from "./copy-content-pjGQdIH0.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-CBoQwSYB.js";
9
+ import { n as StackFrame, r as Fiber, t as copyContent } from "./copy-content-D8CqvhtV.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{Dt 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-DqjugsEW.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-CI1iDLrJ.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};
9
+ import{R as e,_ as t,a as n,d as r,f as i,jt as a,o,p as s,t as c,u as l,v as u}from"./freeze-updates-EIMe6BeH.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-B-gv5POY.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=e=>{let t=x.get(e);if(t)return t;let n=S(),r=n.contentDocument,i=r.createElement(e);r.body.appendChild(i);let o=n.contentWindow.getComputedStyle(i),s=new Map;for(let e of a){let t=o.getPropertyValue(e);t&&s.set(e,t)}return i.remove(),x.set(e,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=e=>{let t=C(e.tagName.toLowerCase()),n=getComputedStyle(e),r=[];for(let e of a){let i=n.getPropertyValue(e);i&&i!==t.get(e)&&(w(e,n)||r.push(`${e}: ${i};`))}let i=e.getAttribute(`class`)?.trim(),o=r.join(`
10
+ `);return i?o?`className: ${i}\n\n${o}`:`className: ${i}`:o},E=()=>{b?.remove(),b=null,x.clear()},D=async t=>{let[n,r,i]=await Promise.all([p(t),d(t),m(t).then(e=>e??[])]),a=await g(t),o=f(t),s=h(t),c=e(t),l=v(t),u=T(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}},O=(e,n)=>{if(!Number.isFinite(e)||!Number.isFinite(n))return[];u();let r=document.elementsFromPoint(e,n);return t(),Array.from(r)},k=new Set;let A=!1;const j=e=>{A=!0,k.add(c()),k.add(l(e??[document.body])),r(),n()},M=()=>{A=!1;for(let e of Array.from(k))e();k.clear(),l([]),i(),o()},N=()=>A,P=async(e,t)=>{await s(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};