react-grab 0.1.44-dev.0b82e39 → 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.
- package/dist/{action-shortcuts-C9e6Nnvm.cjs → action-shortcuts-7hAew2FY.cjs} +1 -1
- package/dist/action-shortcuts-DEFWl3W8.js +9 -0
- package/dist/{index-aMJqwVQq.d.cts → copy-content-B5eFPFGr.d.cts} +219 -17
- package/dist/copy-content-Blo2x2eu.js +10 -0
- package/dist/{index-qewm1CVI.d.ts → copy-content-DmBP15ec.d.ts} +219 -17
- package/dist/copy-content-crbRiXWE.cjs +10 -0
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +1 -1
- package/dist/core-BhuVN81r.cjs +11 -0
- package/dist/core-xn9USmBJ.js +11 -0
- package/dist/freeze-updates-BO5ajc-z.cjs +51 -0
- package/dist/freeze-updates-bDQWoAI1.js +51 -0
- package/dist/index-CTRX5ujF.d.ts +27 -0
- package/dist/index-D_u6ADO3.d.cts +27 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.global.js +16 -16
- package/dist/index.js +1 -1
- package/dist/primitives.cjs +2 -2
- package/dist/primitives.d.cts +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +2 -2
- package/dist/{renderer-D9QhYh51.cjs → renderer-DzgGE4Yp.cjs} +2 -2
- package/dist/renderer-sKopdMTW.js +13 -0
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/dist/action-shortcuts-DhpJOHLV.js +0 -9
- package/dist/copy-content-3pnWacho.d.cts +0 -218
- package/dist/copy-content-Bdbw0DFG.js +0 -9
- package/dist/copy-content-D3sfU8oN.cjs +0 -9
- package/dist/copy-content-DH6fBB50.d.ts +0 -218
- package/dist/core-BLw9XEeN.js +0 -11
- package/dist/core-kvq5wF90.cjs +0 -11
- package/dist/freeze-updates-Bj2Yd3Uy.cjs +0 -52
- package/dist/freeze-updates-DwcTZAwS.js +0 -52
- package/dist/renderer-CN3zPN8I.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-
|
|
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};
|
package/dist/primitives.cjs
CHANGED
|
@@ -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-
|
|
10
|
-
`);return a?
|
|
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;
|
package/dist/primitives.d.cts
CHANGED
|
@@ -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-
|
|
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;
|
package/dist/primitives.d.ts
CHANGED
|
@@ -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-
|
|
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;
|
package/dist/primitives.js
CHANGED
|
@@ -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{
|
|
10
|
-
`);return
|
|
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};
|