grab 0.0.80 → 0.0.82

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/index.js CHANGED
@@ -1,7 +1,4 @@
1
- import { init } from './chunk-VO4Y6JSD.js';
2
- export { DEFAULT_THEME, getElementContext as formatElementInfo, generateSnippet, getStack, init, Ee as isInstrumentationActive } from './chunk-VO4Y6JSD.js';
3
-
4
- /**
1
+ import {f}from'./chunk-STRAHFDU.js';export{d as DEFAULT_THEME,c as formatElementInfo,e as generateSnippet,b as getStack,f as init,a as isInstrumentationActive}from'./chunk-STRAHFDU.js';/**
5
2
  * @license MIT
6
3
  *
7
4
  * Copyright (c) 2025 Aiden Bai
@@ -9,33 +6,4 @@ export { DEFAULT_THEME, getElementContext as formatElementInfo, generateSnippet,
9
6
  * This source code is licensed under the MIT license found in the
10
7
  * LICENSE file in the root directory of this source tree.
11
8
  */
12
-
13
- // src/index.ts
14
- var globalApi = null;
15
- var getGlobalApi = () => {
16
- if (typeof window === "undefined") return globalApi;
17
- return window.__REACT_GRAB__ ?? globalApi ?? null;
18
- };
19
- var setGlobalApi = (api) => {
20
- globalApi = api;
21
- if (typeof window !== "undefined") {
22
- if (api) {
23
- window.__REACT_GRAB__ = api;
24
- } else {
25
- delete window.__REACT_GRAB__;
26
- }
27
- }
28
- };
29
- if (typeof window !== "undefined") {
30
- if (window.__REACT_GRAB__) {
31
- globalApi = window.__REACT_GRAB__;
32
- } else {
33
- globalApi = init();
34
- window.__REACT_GRAB__ = globalApi;
35
- window.dispatchEvent(
36
- new CustomEvent("react-grab:init", { detail: globalApi })
37
- );
38
- }
39
- }
40
-
41
- export { getGlobalApi, setGlobalApi };
9
+ var e=null,A=()=>typeof window>"u"?e:window.__REACT_GRAB__??e??null,d=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=f(),window.__REACT_GRAB__=e,window.dispatchEvent(new CustomEvent("react-grab:init",{detail:e}))));export{A as getGlobalApi,d as setGlobalApi};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grab",
3
- "version": "0.0.80",
3
+ "version": "0.0.82",
4
4
  "description": "Grab any element in your app and give it to Cursor, Claude Code, or other AI coding agents.",
5
5
  "keywords": [
6
6
  "react",