react-grab 0.0.94 → 0.0.96

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.
@@ -1 +1 @@
1
- 'use strict';var chunkQKMNNDQL_cjs=require('../chunk-QKMNNDQL.cjs');Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.f}});Object.defineProperty(exports,"copyContent",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.d}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.c}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.e}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.b}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.g}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.a}});
1
+ 'use strict';var chunkXW3PUYC2_cjs=require('../chunk-XW3PUYC2.cjs');Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.f}});Object.defineProperty(exports,"copyContent",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.d}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.c}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.e}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.b}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.g}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.a}});
@@ -1,3 +1,3 @@
1
- export { o as AgentCompleteResult, A as AgentContext, n as AgentOptions, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, D as DEFAULT_THEME, O as Options, d as OverlayBounds, R as ReactGrabAPI, q as ReactGrabRendererProps, U as UpdatableOptions, r as copyContent, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from '../index-B9-ZLhGP.cjs';
1
+ export { o as AgentCompleteResult, A as AgentContext, n as AgentOptions, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, D as DEFAULT_THEME, O as Options, d as OverlayBounds, R as ReactGrabAPI, q as ReactGrabRendererProps, U as UpdatableOptions, r as copyContent, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from '../index-RhgdSH9U.cjs';
2
2
  export { isInstrumentationActive } from 'bippy';
3
3
  import 'bippy/source';
@@ -1,3 +1,3 @@
1
- export { o as AgentCompleteResult, A as AgentContext, n as AgentOptions, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, D as DEFAULT_THEME, O as Options, d as OverlayBounds, R as ReactGrabAPI, q as ReactGrabRendererProps, U as UpdatableOptions, r as copyContent, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from '../index-B9-ZLhGP.js';
1
+ export { o as AgentCompleteResult, A as AgentContext, n as AgentOptions, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, D as DEFAULT_THEME, O as Options, d as OverlayBounds, R as ReactGrabAPI, q as ReactGrabRendererProps, U as UpdatableOptions, r as copyContent, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from '../index-RhgdSH9U.js';
2
2
  export { isInstrumentationActive } from 'bippy';
3
3
  import 'bippy/source';
@@ -1 +1 @@
1
- export{f as DEFAULT_THEME,d as copyContent,c as formatElementInfo,e as generateSnippet,b as getStack,g as init,a as isInstrumentationActive}from'../chunk-NO42T2OQ.js';
1
+ export{f as DEFAULT_THEME,d as copyContent,c as formatElementInfo,e as generateSnippet,b as getStack,g as init,a as isInstrumentationActive}from'../chunk-FEC5X6DJ.js';
@@ -259,7 +259,8 @@ interface ReactGrabRendererProps {
259
259
  supportsUndo?: boolean;
260
260
  supportsFollowUp?: boolean;
261
261
  dismissButtonText?: string;
262
- onAbortSession?: (sessionId: string) => void;
262
+ onRequestAbortSession?: (sessionId: string) => void;
263
+ onAbortSession?: (sessionId: string, confirmed: boolean) => void;
263
264
  onDismissSession?: (sessionId: string) => void;
264
265
  onUndoSession?: (sessionId: string) => void;
265
266
  onFollowUpSubmitSession?: (sessionId: string, prompt: string) => void;
@@ -272,9 +273,7 @@ interface ReactGrabRendererProps {
272
273
  isPendingDismiss?: boolean;
273
274
  onConfirmDismiss?: () => void;
274
275
  onCancelDismiss?: () => void;
275
- isPendingAgentAbort?: boolean;
276
- onConfirmAgentAbort?: () => void;
277
- onCancelAgentAbort?: () => void;
276
+ pendingAbortSessionId?: string | null;
278
277
  theme?: Required<Theme>;
279
278
  toolbarVisible?: boolean;
280
279
  isActive?: boolean;
@@ -259,7 +259,8 @@ interface ReactGrabRendererProps {
259
259
  supportsUndo?: boolean;
260
260
  supportsFollowUp?: boolean;
261
261
  dismissButtonText?: string;
262
- onAbortSession?: (sessionId: string) => void;
262
+ onRequestAbortSession?: (sessionId: string) => void;
263
+ onAbortSession?: (sessionId: string, confirmed: boolean) => void;
263
264
  onDismissSession?: (sessionId: string) => void;
264
265
  onUndoSession?: (sessionId: string) => void;
265
266
  onFollowUpSubmitSession?: (sessionId: string, prompt: string) => void;
@@ -272,9 +273,7 @@ interface ReactGrabRendererProps {
272
273
  isPendingDismiss?: boolean;
273
274
  onConfirmDismiss?: () => void;
274
275
  onCancelDismiss?: () => void;
275
- isPendingAgentAbort?: boolean;
276
- onConfirmAgentAbort?: () => void;
277
- onCancelAgentAbort?: () => void;
276
+ pendingAbortSessionId?: string | null;
278
277
  theme?: Required<Theme>;
279
278
  toolbarVisible?: boolean;
280
279
  isActive?: boolean;
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';var chunkQKMNNDQL_cjs=require('./chunk-QKMNNDQL.cjs');/**
1
+ 'use strict';var chunkXW3PUYC2_cjs=require('./chunk-XW3PUYC2.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,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=chunkQKMNNDQL_cjs.g(),window.__REACT_GRAB__=e,window.dispatchEvent(new CustomEvent("react-grab:init",{detail:e}))));Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.f}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.c}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.e}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.b}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.g}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkQKMNNDQL_cjs.a}});exports.getGlobalApi=A;exports.setGlobalApi=d;
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=chunkXW3PUYC2_cjs.g(),window.__REACT_GRAB__=e),window.dispatchEvent(new CustomEvent("react-grab:init",{detail:e})));Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.f}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.c}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.e}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.b}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.g}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkXW3PUYC2_cjs.a}});exports.getGlobalApi=A;exports.setGlobalApi=d;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ReactGrabAPI } from './index-B9-ZLhGP.cjs';
2
- export { p as ActivationMode, o as AgentCompleteResult, A as AgentContext, n as AgentOptions, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, C as CrosshairContext, D as DEFAULT_THEME, h as DeepPartial, e as DragRect, j as ElementLabelContext, E as ElementLabelVariant, G as GrabbedBox, I as InputModeContext, O as Options, d as OverlayBounds, c as ReactGrabState, f as Rect, T as Theme, U as UpdatableOptions, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './index-B9-ZLhGP.cjs';
1
+ import { R as ReactGrabAPI } from './index-RhgdSH9U.cjs';
2
+ export { p as ActivationMode, o as AgentCompleteResult, A as AgentContext, n as AgentOptions, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, C as CrosshairContext, D as DEFAULT_THEME, h as DeepPartial, e as DragRect, j as ElementLabelContext, E as ElementLabelVariant, G as GrabbedBox, I as InputModeContext, O as Options, d as OverlayBounds, c as ReactGrabState, f as Rect, T as Theme, U as UpdatableOptions, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './index-RhgdSH9U.cjs';
3
3
  export { isInstrumentationActive } from 'bippy';
4
4
  import 'bippy/source';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as ReactGrabAPI } from './index-B9-ZLhGP.js';
2
- export { p as ActivationMode, o as AgentCompleteResult, A as AgentContext, n as AgentOptions, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, C as CrosshairContext, D as DEFAULT_THEME, h as DeepPartial, e as DragRect, j as ElementLabelContext, E as ElementLabelVariant, G as GrabbedBox, I as InputModeContext, O as Options, d as OverlayBounds, c as ReactGrabState, f as Rect, T as Theme, U as UpdatableOptions, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './index-B9-ZLhGP.js';
1
+ import { R as ReactGrabAPI } from './index-RhgdSH9U.js';
2
+ export { p as ActivationMode, o as AgentCompleteResult, A as AgentContext, n as AgentOptions, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, C as CrosshairContext, D as DEFAULT_THEME, h as DeepPartial, e as DragRect, j as ElementLabelContext, E as ElementLabelVariant, G as GrabbedBox, I as InputModeContext, O as Options, d as OverlayBounds, c as ReactGrabState, f as Rect, T as Theme, U as UpdatableOptions, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './index-RhgdSH9U.js';
3
3
  export { isInstrumentationActive } from 'bippy';
4
4
  import 'bippy/source';
5
5