grab 0.1.1 → 0.1.3

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 chunkQCHSAPXI_cjs=require('../chunk-QCHSAPXI.cjs');require('../chunk-GJYSUTIS.cjs');Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.j}});Object.defineProperty(exports,"copyContent",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.d}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.c}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.e}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.b}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.o}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.a}});
1
+ 'use strict';var chunk57BDQSA4_cjs=require('../chunk-57BDQSA4.cjs');Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.j}});Object.defineProperty(exports,"copyContent",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.d}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.c}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.e}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.b}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.o}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.a}});
@@ -1,3 +1,3 @@
1
- export { v as ActionContext, q as AgentCompleteResult, A as AgentContext, p as AgentOptions, n as AgentProvider, m as AgentSession, o as AgentSessionStorage, t as ContextMenuAction, D as DEFAULT_THEME, O as Options, e as OverlayBounds, P as Plugin, x as PluginConfig, y as PluginHooks, R as ReactGrabAPI, z as ReactGrabRendererProps, r as SettableOptions, S as SourceInfo, B as copyContent, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from '../index-CNbOr8nS.cjs';
1
+ export { v as ActionContext, q as AgentCompleteResult, A as AgentContext, p as AgentOptions, n as AgentProvider, m as AgentSession, o as AgentSessionStorage, t as ContextMenuAction, D as DEFAULT_THEME, O as Options, e as OverlayBounds, P as Plugin, x as PluginConfig, y as PluginHooks, R as ReactGrabAPI, z as ReactGrabRendererProps, r as SettableOptions, S as SourceInfo, B as copyContent, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from '../index-CNwr6CHX.cjs';
2
2
  export { isInstrumentationActive } from 'bippy';
3
3
  import 'bippy/source';
@@ -1,3 +1,3 @@
1
- export { v as ActionContext, q as AgentCompleteResult, A as AgentContext, p as AgentOptions, n as AgentProvider, m as AgentSession, o as AgentSessionStorage, t as ContextMenuAction, D as DEFAULT_THEME, O as Options, e as OverlayBounds, P as Plugin, x as PluginConfig, y as PluginHooks, R as ReactGrabAPI, z as ReactGrabRendererProps, r as SettableOptions, S as SourceInfo, B as copyContent, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from '../index-CNbOr8nS.js';
1
+ export { v as ActionContext, q as AgentCompleteResult, A as AgentContext, p as AgentOptions, n as AgentProvider, m as AgentSession, o as AgentSessionStorage, t as ContextMenuAction, D as DEFAULT_THEME, O as Options, e as OverlayBounds, P as Plugin, x as PluginConfig, y as PluginHooks, R as ReactGrabAPI, z as ReactGrabRendererProps, r as SettableOptions, S as SourceInfo, B as copyContent, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from '../index-CNwr6CHX.js';
2
2
  export { isInstrumentationActive } from 'bippy';
3
3
  import 'bippy/source';
@@ -1 +1 @@
1
- export{j as DEFAULT_THEME,d as copyContent,c as formatElementInfo,e as generateSnippet,b as getStack,o as init,a as isInstrumentationActive}from'../chunk-ZIQID6NM.js';import'../chunk-HX7TFX35.js';
1
+ export{j as DEFAULT_THEME,d as copyContent,c as formatElementInfo,e as generateSnippet,b as getStack,o as init,a as isInstrumentationActive}from'../chunk-3XELK4IC.js';
@@ -210,6 +210,16 @@ interface ContextMenuAction {
210
210
  onAction: (context: ContextMenuActionContext) => void | Promise<void>;
211
211
  agent?: AgentOptions;
212
212
  }
213
+ interface ActionCycleItem {
214
+ id: string;
215
+ label: string;
216
+ shortcut?: string;
217
+ }
218
+ interface ActionCycleState {
219
+ items: ActionCycleItem[];
220
+ activeIndex: number | null;
221
+ isVisible: boolean;
222
+ }
213
223
  interface ScreenshotBounds {
214
224
  x: number;
215
225
  y: number;
@@ -347,6 +357,7 @@ interface ReactGrabRendererProps {
347
357
  selectionComponentName?: string;
348
358
  selectionLabelVisible?: boolean;
349
359
  selectionLabelStatus?: SelectionLabelStatus;
360
+ selectionActionCycleState?: ActionCycleState;
350
361
  labelInstances?: SelectionLabelInstance[];
351
362
  dragVisible?: boolean;
352
363
  dragBounds?: OverlayBounds;
@@ -210,6 +210,16 @@ interface ContextMenuAction {
210
210
  onAction: (context: ContextMenuActionContext) => void | Promise<void>;
211
211
  agent?: AgentOptions;
212
212
  }
213
+ interface ActionCycleItem {
214
+ id: string;
215
+ label: string;
216
+ shortcut?: string;
217
+ }
218
+ interface ActionCycleState {
219
+ items: ActionCycleItem[];
220
+ activeIndex: number | null;
221
+ isVisible: boolean;
222
+ }
213
223
  interface ScreenshotBounds {
214
224
  x: number;
215
225
  y: number;
@@ -347,6 +357,7 @@ interface ReactGrabRendererProps {
347
357
  selectionComponentName?: string;
348
358
  selectionLabelVisible?: boolean;
349
359
  selectionLabelStatus?: SelectionLabelStatus;
360
+ selectionActionCycleState?: ActionCycleState;
350
361
  labelInstances?: SelectionLabelInstance[];
351
362
  dragVisible?: boolean;
352
363
  dragBounds?: OverlayBounds;
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';var chunk6ZQDLLHR_cjs=require('./chunk-6ZQDLLHR.cjs'),chunkQCHSAPXI_cjs=require('./chunk-QCHSAPXI.cjs');require('./chunk-GJYSUTIS.cjs');/**
1
+ 'use strict';var chunk57BDQSA4_cjs=require('./chunk-57BDQSA4.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,x=()=>typeof window>"u"?e:window.__REACT_GRAB__??e??null,R=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=chunkQCHSAPXI_cjs.o(),window.__REACT_GRAB__=e),window.dispatchEvent(new CustomEvent("react-grab:init",{detail:e})));Object.defineProperty(exports,"renderDesignSystemPreview",{enumerable:true,get:function(){return chunk6ZQDLLHR_cjs.a}});Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.j}});Object.defineProperty(exports,"captureElementScreenshot",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.g}});Object.defineProperty(exports,"combineBounds",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.f}});Object.defineProperty(exports,"commentPlugin",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.n}});Object.defineProperty(exports,"copyHtmlPlugin",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.l}});Object.defineProperty(exports,"copyImageToClipboard",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.h}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.c}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.e}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.b}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.o}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.a}});Object.defineProperty(exports,"isScreenshotSupported",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.i}});Object.defineProperty(exports,"openPlugin",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.m}});Object.defineProperty(exports,"screenshotPlugin",{enumerable:true,get:function(){return chunkQCHSAPXI_cjs.k}});exports.getGlobalApi=x;exports.setGlobalApi=R;
9
+ var e=null,R=()=>typeof window>"u"?e:window.__REACT_GRAB__??e??null,g=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=chunk57BDQSA4_cjs.o(),window.__REACT_GRAB__=e),window.dispatchEvent(new CustomEvent("react-grab:init",{detail:e})));Object.defineProperty(exports,"DEFAULT_THEME",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.j}});Object.defineProperty(exports,"captureElementScreenshot",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.g}});Object.defineProperty(exports,"combineBounds",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.f}});Object.defineProperty(exports,"commentPlugin",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.n}});Object.defineProperty(exports,"copyHtmlPlugin",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.l}});Object.defineProperty(exports,"copyImageToClipboard",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.h}});Object.defineProperty(exports,"formatElementInfo",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.c}});Object.defineProperty(exports,"generateSnippet",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.e}});Object.defineProperty(exports,"getStack",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.b}});Object.defineProperty(exports,"init",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.o}});Object.defineProperty(exports,"isInstrumentationActive",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.a}});Object.defineProperty(exports,"isScreenshotSupported",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.i}});Object.defineProperty(exports,"openPlugin",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.m}});Object.defineProperty(exports,"screenshotPlugin",{enumerable:true,get:function(){return chunk57BDQSA4_cjs.k}});exports.getGlobalApi=R;exports.setGlobalApi=g;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,5 @@
1
- import { P as Plugin, R as ReactGrabAPI } from './index-CNbOr8nS.cjs';
2
- export { v as ActionContext, w as ActionContextHooks, s as ActivationMode, q as AgentCompleteResult, A as AgentContext, p as AgentOptions, n as AgentProvider, m as AgentSession, o as AgentSessionStorage, t as ContextMenuAction, u as ContextMenuActionContext, C as CrosshairContext, D as DEFAULT_THEME, j as DeepPartial, f as DragRect, l as ElementLabelContext, E as ElementLabelVariant, G as GrabbedBox, O as Options, e as OverlayBounds, x as PluginConfig, y as PluginHooks, k as PromptModeContext, c as ReactGrabState, h as Rect, r as SettableOptions, S as SourceInfo, T as Theme, d as ToolbarState, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './index-CNbOr8nS.cjs';
3
- export { renderDesignSystemPreview } from './design-system.cjs';
1
+ import { P as Plugin, R as ReactGrabAPI } from './index-CNwr6CHX.cjs';
2
+ export { v as ActionContext, w as ActionContextHooks, s as ActivationMode, q as AgentCompleteResult, A as AgentContext, p as AgentOptions, n as AgentProvider, m as AgentSession, o as AgentSessionStorage, t as ContextMenuAction, u as ContextMenuActionContext, C as CrosshairContext, D as DEFAULT_THEME, j as DeepPartial, f as DragRect, l as ElementLabelContext, E as ElementLabelVariant, G as GrabbedBox, O as Options, e as OverlayBounds, x as PluginConfig, y as PluginHooks, k as PromptModeContext, c as ReactGrabState, h as Rect, r as SettableOptions, S as SourceInfo, T as Theme, d as ToolbarState, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './index-CNwr6CHX.cjs';
4
3
  export { isInstrumentationActive } from 'bippy';
5
4
  import 'bippy/source';
6
5
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { P as Plugin, R as ReactGrabAPI } from './index-CNbOr8nS.js';
2
- export { v as ActionContext, w as ActionContextHooks, s as ActivationMode, q as AgentCompleteResult, A as AgentContext, p as AgentOptions, n as AgentProvider, m as AgentSession, o as AgentSessionStorage, t as ContextMenuAction, u as ContextMenuActionContext, C as CrosshairContext, D as DEFAULT_THEME, j as DeepPartial, f as DragRect, l as ElementLabelContext, E as ElementLabelVariant, G as GrabbedBox, O as Options, e as OverlayBounds, x as PluginConfig, y as PluginHooks, k as PromptModeContext, c as ReactGrabState, h as Rect, r as SettableOptions, S as SourceInfo, T as Theme, d as ToolbarState, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './index-CNbOr8nS.js';
3
- export { renderDesignSystemPreview } from './design-system.js';
1
+ import { P as Plugin, R as ReactGrabAPI } from './index-CNwr6CHX.js';
2
+ export { v as ActionContext, w as ActionContextHooks, s as ActivationMode, q as AgentCompleteResult, A as AgentContext, p as AgentOptions, n as AgentProvider, m as AgentSession, o as AgentSessionStorage, t as ContextMenuAction, u as ContextMenuActionContext, C as CrosshairContext, D as DEFAULT_THEME, j as DeepPartial, f as DragRect, l as ElementLabelContext, E as ElementLabelVariant, G as GrabbedBox, O as Options, e as OverlayBounds, x as PluginConfig, y as PluginHooks, k as PromptModeContext, c as ReactGrabState, h as Rect, r as SettableOptions, S as SourceInfo, T as Theme, d as ToolbarState, a as formatElementInfo, b as generateSnippet, g as getStack, i as init } from './index-CNwr6CHX.js';
4
3
  export { isInstrumentationActive } from 'bippy';
5
4
  import 'bippy/source';
6
5