react-grab 0.1.0-beta.6 → 0.1.0-beta.7

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/cli.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';var child_process=require('child_process');var e="0.1.0-beta.6",t=`grab@${e}`,p=()=>{try{let r=child_process.execSync("grab --version",{encoding:"utf-8"}).match(/(\d+\.\d+\.\d+)/);return r?r[1]:null}catch{return null}},m=()=>{let n=p();return n?/^\d+\.\d+\.\d+$/.test(e)?n!==e:false:true},u=()=>{let n=["pnpm","yarn","bun"];for(let r of n)try{return child_process.execSync(`${r} --version`,{stdio:"ignore"}),r}catch{continue}return "npm"},b=()=>{let n=u(),r={npm:"npm install -g",yarn:"yarn global add",pnpm:"pnpm add -g",bun:"bun add -g"},l={npm:"npm install -D",yarn:"yarn add -D",pnpm:"pnpm add -D",bun:"bun add -D"},c=r[n],i=l[n];console.log(`Installing ${t}\u2026`),child_process.execSync(`${c} ${t}`,{stdio:"inherit"});try{child_process.execSync(`${i} ${t}`,{stdio:"pipe"});}catch(d){let a=d.stderr?.toString().trim();console.error(a?`Failed to install ${t} locally:
2
+ 'use strict';var child_process=require('child_process');var e="0.1.0-beta.7",t=`grab@${e}`,p=()=>{try{let r=child_process.execSync("grab --version",{encoding:"utf-8"}).match(/(\d+\.\d+\.\d+)/);return r?r[1]:null}catch{return null}},m=()=>{let n=p();return n?/^\d+\.\d+\.\d+$/.test(e)?n!==e:false:true},u=()=>{let n=["pnpm","yarn","bun"];for(let r of n)try{return child_process.execSync(`${r} --version`,{stdio:"ignore"}),r}catch{continue}return "npm"},b=()=>{let n=u(),r={npm:"npm install -g",yarn:"yarn global add",pnpm:"pnpm add -g",bun:"bun add -g"},l={npm:"npm install -D",yarn:"yarn add -D",pnpm:"pnpm add -D",bun:"bun add -D"},c=r[n],i=l[n];console.log(`Installing ${t}\u2026`),child_process.execSync(`${c} ${t}`,{stdio:"inherit"});try{child_process.execSync(`${i} ${t}`,{stdio:"pipe"});}catch(d){let a=d.stderr?.toString().trim();console.error(a?`Failed to install ${t} locally:
3
3
  ${a}`:`Failed to install ${t} locally`);}};m()&&b();var o=child_process.spawnSync("grab",process.argv.slice(2),{stdio:"inherit",shell:process.platform==="win32"});o.error&&(console.error(`Failed to execute grab: ${o.error.message}`),process.exit(1));process.exit(o.status??0);
@@ -1 +1 @@
1
- 'use strict';var chunkZ222RUIV_cjs=require('../chunk-Z222RUIV.cjs');Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.j}});Object.defineProperty(exports,"copyContent",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.e}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.d}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.f}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.c}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.k}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.b}});
1
+ 'use strict';var chunkJA5IN6QI_cjs=require('../chunk-JA5IN6QI.cjs');Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.j}});Object.defineProperty(exports,"copyContent",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.e}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.d}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.f}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.c}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.k}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.b}});
@@ -1 +1 @@
1
- export{j as DEFAULT_THEME,e as copyContent,d as formatElementInfo,f as generateSnippet,c as getStack,k as init,b as isInstrumentationActive}from'../chunk-CGXPSYN4.js';
1
+ export{j as DEFAULT_THEME,e as copyContent,d as formatElementInfo,f as generateSnippet,c as getStack,k as init,b as isInstrumentationActive}from'../chunk-NK2BNSLR.js';
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';var chunkZ222RUIV_cjs=require('./chunk-Z222RUIV.cjs');/**
1
+ 'use strict';var chunkJA5IN6QI_cjs=require('./chunk-JA5IN6QI.cjs');/**
2
2
  * @license MIT
3
3
  *
4
4
  * Copyright (c) 2025 Aiden Bai
@@ -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
- var e=null,c=()=>typeof window>"u"?e:window.__REACT_GRAB__??e??null,f=t=>{e=t,typeof window<"u"&&(t?window.__REACT_GRAB__=t:delete window.__REACT_GRAB__);};typeof window<"u"&&(window.__REACT_GRAB__?e=window.__REACT_GRAB__:(e=chunkZ222RUIV_cjs.k(),window.__REACT_GRAB__=e),window.dispatchEvent(new CustomEvent("react-grab:init",{detail:e})));Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.j}});Object.defineProperty(exports,"captureElementScreenshot",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.h}});Object.defineProperty(exports,"combineBounds",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.g}});Object.defineProperty(exports,"copyImageToClipboard",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.i}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.d}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.f}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.c}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.k}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.b}});Object.defineProperty(exports,"isScreenshotSupported",{enumerable:true,get:function(){return chunkZ222RUIV_cjs.a}});exports.getGlobalApi=c;exports.setGlobalApi=f;
9
+ var e=null,c=()=>typeof window>"u"?e:window.__REACT_GRAB__??e??null,f=t=>{e=t,typeof window<"u"&&(t?window.__REACT_GRAB__=t:delete window.__REACT_GRAB__);};typeof window<"u"&&(window.__REACT_GRAB__?e=window.__REACT_GRAB__:(e=chunkJA5IN6QI_cjs.k(),window.__REACT_GRAB__=e),window.dispatchEvent(new CustomEvent("react-grab:init",{detail:e})));Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.j}});Object.defineProperty(exports,"captureElementScreenshot",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.h}});Object.defineProperty(exports,"combineBounds",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.g}});Object.defineProperty(exports,"copyImageToClipboard",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.i}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.d}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.f}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.c}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.k}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.b}});Object.defineProperty(exports,"isScreenshotSupported",{enumerable:true,get:function(){return chunkJA5IN6QI_cjs.a}});exports.getGlobalApi=c;exports.setGlobalApi=f;