react-grab 0.0.72 → 0.0.73
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/README.md +1 -1
- package/dist/{chunk-GFBDYRPI.cjs → chunk-6ZPKD3CA.cjs} +223 -159
- package/dist/{chunk-DZ2VZRJA.js → chunk-KXX6WKZA.js} +223 -159
- package/dist/{core-HtZR37lF.d.cts → core-eQvDkDGv.d.cts} +5 -0
- package/dist/{core-HtZR37lF.d.ts → core-eQvDkDGv.d.ts} +5 -0
- package/dist/core.cjs +7 -7
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +27 -27
- package/dist/index.js +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -120,6 +120,8 @@ interface AgentProvider<T = any> {
|
|
|
120
120
|
resume?: (sessionId: string, signal: AbortSignal, storage: AgentSessionStorage) => AsyncIterable<string>;
|
|
121
121
|
supportsResume?: boolean;
|
|
122
122
|
checkConnection?: () => Promise<boolean>;
|
|
123
|
+
getCompletionMessage?: () => string | undefined;
|
|
124
|
+
undo?: () => Promise<void>;
|
|
123
125
|
}
|
|
124
126
|
interface AgentSessionStorage {
|
|
125
127
|
getItem(key: string): string | null;
|
|
@@ -136,6 +138,7 @@ interface AgentOptions<T = any> {
|
|
|
136
138
|
onError?: (error: Error, session: AgentSession) => void;
|
|
137
139
|
onResume?: (session: AgentSession) => void;
|
|
138
140
|
onAbort?: (session: AgentSession, element: Element | undefined) => void;
|
|
141
|
+
onUndo?: (session: AgentSession, element: Element | undefined) => void;
|
|
139
142
|
}
|
|
140
143
|
interface Options {
|
|
141
144
|
enabled?: boolean;
|
|
@@ -223,6 +226,8 @@ interface ReactGrabRendererProps {
|
|
|
223
226
|
isAgentConnected?: boolean;
|
|
224
227
|
agentSessions?: Map<string, AgentSession>;
|
|
225
228
|
onAbortSession?: (sessionId: string) => void;
|
|
229
|
+
onDismissSession?: (sessionId: string) => void;
|
|
230
|
+
onUndoSession?: (sessionId: string) => void;
|
|
226
231
|
onInputChange?: (value: string) => void;
|
|
227
232
|
onInputSubmit?: () => void;
|
|
228
233
|
onInputCancel?: () => void;
|
|
@@ -120,6 +120,8 @@ interface AgentProvider<T = any> {
|
|
|
120
120
|
resume?: (sessionId: string, signal: AbortSignal, storage: AgentSessionStorage) => AsyncIterable<string>;
|
|
121
121
|
supportsResume?: boolean;
|
|
122
122
|
checkConnection?: () => Promise<boolean>;
|
|
123
|
+
getCompletionMessage?: () => string | undefined;
|
|
124
|
+
undo?: () => Promise<void>;
|
|
123
125
|
}
|
|
124
126
|
interface AgentSessionStorage {
|
|
125
127
|
getItem(key: string): string | null;
|
|
@@ -136,6 +138,7 @@ interface AgentOptions<T = any> {
|
|
|
136
138
|
onError?: (error: Error, session: AgentSession) => void;
|
|
137
139
|
onResume?: (session: AgentSession) => void;
|
|
138
140
|
onAbort?: (session: AgentSession, element: Element | undefined) => void;
|
|
141
|
+
onUndo?: (session: AgentSession, element: Element | undefined) => void;
|
|
139
142
|
}
|
|
140
143
|
interface Options {
|
|
141
144
|
enabled?: boolean;
|
|
@@ -223,6 +226,8 @@ interface ReactGrabRendererProps {
|
|
|
223
226
|
isAgentConnected?: boolean;
|
|
224
227
|
agentSessions?: Map<string, AgentSession>;
|
|
225
228
|
onAbortSession?: (sessionId: string) => void;
|
|
229
|
+
onDismissSession?: (sessionId: string) => void;
|
|
230
|
+
onUndoSession?: (sessionId: string) => void;
|
|
226
231
|
onInputChange?: (value: string) => void;
|
|
227
232
|
onInputSubmit?: () => void;
|
|
228
233
|
onInputCancel?: () => void;
|
package/dist/core.cjs
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6ZPKD3CA_cjs = require('./chunk-6ZPKD3CA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "DEFAULT_THEME", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunk6ZPKD3CA_cjs.DEFAULT_THEME; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "formatElementInfo", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk6ZPKD3CA_cjs.getElementContext; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "generateSnippet", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk6ZPKD3CA_cjs.generateSnippet; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "getStack", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk6ZPKD3CA_cjs.getStack; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "init", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk6ZPKD3CA_cjs.init; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "isInstrumentationActive", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk6ZPKD3CA_cjs.Ee; }
|
|
30
30
|
});
|
package/dist/core.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AgentContext, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, D as DEFAULT_THEME, O as Options, d as OverlayBounds, R as ReactGrabAPI, o as ReactGrabRendererProps, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './core-
|
|
1
|
+
export { A as AgentContext, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, D as DEFAULT_THEME, O as Options, d as OverlayBounds, R as ReactGrabAPI, o as ReactGrabRendererProps, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './core-eQvDkDGv.cjs';
|
|
2
2
|
export { isInstrumentationActive } from 'bippy';
|
|
3
3
|
import 'bippy/source';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AgentContext, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, D as DEFAULT_THEME, O as Options, d as OverlayBounds, R as ReactGrabAPI, o as ReactGrabRendererProps, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './core-
|
|
1
|
+
export { A as AgentContext, l as AgentProvider, k as AgentSession, m as AgentSessionStorage, D as DEFAULT_THEME, O as Options, d as OverlayBounds, R as ReactGrabAPI, o as ReactGrabRendererProps, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './core-eQvDkDGv.js';
|
|
2
2
|
export { isInstrumentationActive } from 'bippy';
|
|
3
3
|
import 'bippy/source';
|
package/dist/core.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DEFAULT_THEME, getElementContext as formatElementInfo, generateSnippet, getStack, init, Ee as isInstrumentationActive } from './chunk-
|
|
1
|
+
export { DEFAULT_THEME, getElementContext as formatElementInfo, generateSnippet, getStack, init, Ee as isInstrumentationActive } from './chunk-KXX6WKZA.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6ZPKD3CA_cjs = require('./chunk-6ZPKD3CA.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @license MIT
|
|
@@ -31,7 +31,7 @@ if (typeof window !== "undefined") {
|
|
|
31
31
|
if (window.__REACT_GRAB__) {
|
|
32
32
|
globalApi = window.__REACT_GRAB__;
|
|
33
33
|
} else {
|
|
34
|
-
globalApi =
|
|
34
|
+
globalApi = chunk6ZPKD3CA_cjs.init();
|
|
35
35
|
window.__REACT_GRAB__ = globalApi;
|
|
36
36
|
window.dispatchEvent(
|
|
37
37
|
new CustomEvent("react-grab:init", { detail: globalApi })
|
|
@@ -41,27 +41,27 @@ if (typeof window !== "undefined") {
|
|
|
41
41
|
|
|
42
42
|
Object.defineProperty(exports, "DEFAULT_THEME", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunk6ZPKD3CA_cjs.DEFAULT_THEME; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "formatElementInfo", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk6ZPKD3CA_cjs.getElementContext; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "generateSnippet", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk6ZPKD3CA_cjs.generateSnippet; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "getStack", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunk6ZPKD3CA_cjs.getStack; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "init", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunk6ZPKD3CA_cjs.init; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "isInstrumentationActive", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunk6ZPKD3CA_cjs.Ee; }
|
|
65
65
|
});
|
|
66
66
|
exports.getGlobalApi = getGlobalApi;
|
|
67
67
|
exports.setGlobalApi = setGlobalApi;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ReactGrabAPI } from './core-
|
|
2
|
-
export { 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, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './core-
|
|
1
|
+
import { R as ReactGrabAPI } from './core-eQvDkDGv.cjs';
|
|
2
|
+
export { 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, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './core-eQvDkDGv.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 './core-
|
|
2
|
-
export { 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, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './core-
|
|
1
|
+
import { R as ReactGrabAPI } from './core-eQvDkDGv.js';
|
|
2
|
+
export { 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, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './core-eQvDkDGv.js';
|
|
3
3
|
export { isInstrumentationActive } from 'bippy';
|
|
4
4
|
import 'bippy/source';
|
|
5
5
|
|