react-grab 0.1.27 → 0.1.28
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/chunk-5RMV2HA7.js +101 -0
- package/dist/chunk-QEVSATMF.cjs +101 -0
- package/dist/chunk-XWCIDYJD.cjs +26 -0
- package/dist/chunk-XYTXUEOE.js +26 -0
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.global.js +34 -34
- package/dist/index.js +1 -1
- package/dist/primitives.cjs +2 -2
- package/dist/primitives.js +1 -1
- package/package.json +2 -2
- package/scripts/postinstall.cjs +4 -2
- package/dist/chunk-4HEJMPYD.cjs +0 -26
- package/dist/chunk-5O2BUFAV.js +0 -101
- package/dist/chunk-POAWRTGI.cjs +0 -101
- package/dist/chunk-STWQGYJG.js +0 -26
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {f}from'./chunk-
|
|
1
|
+
import {f}from'./chunk-XYTXUEOE.js';export{c as DEFAULT_THEME,d as commentPlugin,b as generateSnippet,f as init,e as openPlugin}from'./chunk-XYTXUEOE.js';export{Ba as formatElementInfo,wa as getStack,qa as isInstrumentationActive}from'./chunk-5RMV2HA7.js';/**
|
|
2
2
|
* @license MIT
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2025 Aiden Bai
|
package/dist/primitives.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkQEVSATMF_cjs=require('./chunk-QEVSATMF.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 D=async e=>{let o=await
|
|
9
|
+
var D=async e=>{let o=await chunkQEVSATMF_cjs.wa(e)??[],x=await chunkQEVSATMF_cjs.Aa(e),y=chunkQEVSATMF_cjs.Ca(e),z=chunkQEVSATMF_cjs.za(e),S=chunkQEVSATMF_cjs.ra(e),k=chunkQEVSATMF_cjs.Ta(e),v=chunkQEVSATMF_cjs.Ua(e);return {element:e,htmlPreview:y,stackString:x,stack:o,componentName:z,fiber:S,selector:k,styles:v}},t=new Set,n=false,I=e=>{n=true,t.add(chunkQEVSATMF_cjs.Ea()),t.add(chunkQEVSATMF_cjs.Ga(e??[document.body])),chunkQEVSATMF_cjs.Ha(),chunkQEVSATMF_cjs.Ra();},L=()=>{n=false;for(let e of Array.from(t))e();t.clear(),chunkQEVSATMF_cjs.Ga([]),chunkQEVSATMF_cjs.Ia(),chunkQEVSATMF_cjs.Sa();},M=()=>n,T=async(e,o)=>{await chunkQEVSATMF_cjs.Da(e,o);};exports.freeze=I;exports.getElementContext=D;exports.isFreezeActive=M;exports.openFile=T;exports.unfreeze=L;
|
package/dist/primitives.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-grab",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"description": "Select context for coding agents directly from your website",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@medv/finder": "^4.0.2",
|
|
86
86
|
"bippy": "^0.5.32",
|
|
87
87
|
"solid-js": "^1.9.10",
|
|
88
|
-
"@react-grab/cli": "0.1.
|
|
88
|
+
"@react-grab/cli": "0.1.28"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@babel/core": "^7.28.5",
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const AUTOMATION_ENVIRONMENT_VARIABLE_NAMES = [
|
|
2
|
+
"CURSOR_AGENT",
|
|
2
3
|
"CI",
|
|
3
4
|
"CLAUDECODE",
|
|
4
|
-
"CURSOR_AGENT",
|
|
5
5
|
"CODEX_CI",
|
|
6
6
|
"OPENCODE",
|
|
7
7
|
"AMP_HOME",
|
|
@@ -11,11 +11,13 @@ const AUTOMATION_ENVIRONMENT_VARIABLE_NAMES = [
|
|
|
11
11
|
const REACT_GRAB_INIT_COMMAND = "npx -y grab@latest init";
|
|
12
12
|
const INSTALL_HINT_MESSAGE = `[react-grab] Package installed via automation. This step only installs the package. Run \`${REACT_GRAB_INIT_COMMAND}\` to complete setup.`;
|
|
13
13
|
|
|
14
|
+
const isAlreadyRunningInit = Boolean(process.env.REACT_GRAB_INIT);
|
|
15
|
+
|
|
14
16
|
const isRunningInAutomatedEnvironment =
|
|
15
17
|
AUTOMATION_ENVIRONMENT_VARIABLE_NAMES.some((environmentVariableName) =>
|
|
16
18
|
Boolean(process.env[environmentVariableName]),
|
|
17
19
|
);
|
|
18
20
|
|
|
19
|
-
if (isRunningInAutomatedEnvironment) {
|
|
21
|
+
if (isRunningInAutomatedEnvironment && !isAlreadyRunningInit) {
|
|
20
22
|
console.log(INSTALL_HINT_MESSAGE);
|
|
21
23
|
}
|