react-grab 0.1.44-dev.212f8cd → 0.1.44-dev.4532a10

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.
Files changed (41) hide show
  1. package/dist/action-shortcuts-CN8uCLJI.cjs +9 -0
  2. package/dist/action-shortcuts-rlg44RcC.js +9 -0
  3. package/dist/{index-aMJqwVQq.d.cts → copy-content-B5eFPFGr.d.cts} +219 -17
  4. package/dist/copy-content-CAv4eEHw.cjs +10 -0
  5. package/dist/copy-content-DGVoUgyu.js +10 -0
  6. package/dist/{index-qewm1CVI.d.ts → copy-content-DmBP15ec.d.ts} +219 -17
  7. package/dist/core/index.cjs +1 -1
  8. package/dist/core/index.d.cts +3 -3
  9. package/dist/core/index.d.ts +3 -3
  10. package/dist/core/index.js +1 -1
  11. package/dist/core-DDnXsL5N.js +11 -0
  12. package/dist/core-h_IRFN_l.cjs +11 -0
  13. package/dist/freeze-updates-CArvvL_U.cjs +51 -0
  14. package/dist/freeze-updates-rChDixHI.js +51 -0
  15. package/dist/index-CTRX5ujF.d.ts +27 -0
  16. package/dist/index-D_u6ADO3.d.cts +27 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.d.cts +3 -3
  19. package/dist/index.d.ts +3 -3
  20. package/dist/index.global.js +17 -17
  21. package/dist/index.js +1 -1
  22. package/dist/primitives.cjs +2 -2
  23. package/dist/primitives.d.cts +1 -1
  24. package/dist/primitives.d.ts +1 -1
  25. package/dist/primitives.js +2 -2
  26. package/dist/renderer-vTHOSELZ.cjs +13 -0
  27. package/dist/renderer-yzYIOlLb.js +13 -0
  28. package/dist/styles.css +1 -1
  29. package/package.json +3 -3
  30. package/dist/action-shortcuts-BDpnp0up.cjs +0 -9
  31. package/dist/action-shortcuts-dAByuNs1.js +0 -9
  32. package/dist/copy-content-3pnWacho.d.cts +0 -218
  33. package/dist/copy-content-DH6fBB50.d.ts +0 -218
  34. package/dist/copy-content-DrVkBymy.js +0 -9
  35. package/dist/copy-content-osQ6kXAx.cjs +0 -9
  36. package/dist/core-CLgrT6O3.js +0 -11
  37. package/dist/core-k5R9Z0Jf.cjs +0 -11
  38. package/dist/freeze-updates-B4_g16fj.cjs +0 -52
  39. package/dist/freeze-updates-wsdBPvEd.js +0 -52
  40. package/dist/renderer-BxDTk3KC.js +0 -13
  41. package/dist/renderer-CvII7QXb.cjs +0 -13
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license MIT
3
+ *
4
+ * Copyright (c) 2025 Aiden Bai
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { C as ReactGrabAPI, g as Options, k as Theme, n as StackFrame } from "./copy-content-B5eFPFGr.cjs";
10
+
11
+ //#region src/core/context.d.ts
12
+ declare const getStack: (element: Element) => Promise<StackFrame[] | null>;
13
+ interface StackContextOptions {
14
+ maxLines?: number;
15
+ }
16
+ declare const formatElementInfo: (element: Element, options?: StackContextOptions) => Promise<string>;
17
+ //#endregion
18
+ //#region src/core/theme.d.ts
19
+ declare const DEFAULT_THEME: Required<Theme>;
20
+ //#endregion
21
+ //#region src/utils/generate-snippet.d.ts
22
+ declare const generateSnippet: (elements: Element[], options?: StackContextOptions) => Promise<string[]>;
23
+ //#endregion
24
+ //#region src/core/index.d.ts
25
+ declare const init: (rawOptions?: Options) => ReactGrabAPI;
26
+ //#endregion
27
+ export { getStack as a, formatElementInfo as i, generateSnippet as n, DEFAULT_THEME as r, init as t };
package/dist/index.cjs CHANGED
@@ -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
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./core-k5R9Z0Jf.cjs`),t=require(`./freeze-updates-B4_g16fj.cjs`);let n=null;const r=()=>typeof window>`u`?n:window.__REACT_GRAB__??n??null,i=e=>{n=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__)},a=[],o=e=>{for(;a.length>0;){let t=a.shift();t&&e.registerPlugin(t)}},s=e=>{let t=r();if(t){t.registerPlugin(e);return}a.push(e)},c=e=>{let t=r();if(t){t.unregisterPlugin(e);return}let n=a.findIndex(t=>t.name===e);n!==-1&&a.splice(n,1)};typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(window.__REACT_GRAB__?n=window.__REACT_GRAB__:(n=e.t(),window.__REACT_GRAB__=n),o(n),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:n}))),exports.DEFAULT_THEME=e.a,exports.commentPlugin=e.i,exports.formatElementInfo=t.S,exports.generateSnippet=e.n,exports.getGlobalApi=r,exports.getStack=t.E,exports.init=e.t,exports.isInstrumentationActive=t.A,exports.openPlugin=e.r,exports.registerPlugin=s,exports.setGlobalApi=i,exports.unregisterPlugin=c;
9
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./core-h_IRFN_l.cjs`),t=require(`./freeze-updates-CArvvL_U.cjs`),n=require(`./copy-content-CAv4eEHw.cjs`);let r=null;const i=()=>typeof window>`u`?r:window.__REACT_GRAB__??r??null,a=e=>{r=e,typeof window<`u`&&(e?window.__REACT_GRAB__=e:delete window.__REACT_GRAB__)},o=[],s=e=>{for(;o.length>0;){let t=o.shift();t&&e.registerPlugin(t)}},c=e=>{let t=i();if(t){t.registerPlugin(e);return}o.push(e)},l=e=>{let t=i();if(t){t.unregisterPlugin(e);return}let n=o.findIndex(t=>t.name===e);n!==-1&&o.splice(n,1)};typeof window<`u`&&!window.__REACT_GRAB_DISABLED__&&(window.__REACT_GRAB__?r=window.__REACT_GRAB__:(r=e.t(),window.__REACT_GRAB__=r),s(r),window.dispatchEvent(new CustomEvent(`react-grab:init`,{detail:r}))),exports.DEFAULT_THEME=e.a,exports.commentPlugin=e.i,exports.formatElementInfo=n.n,exports.generateSnippet=e.n,exports.getGlobalApi=i,exports.getStack=n.o,exports.init=e.t,exports.isInstrumentationActive=t.M,exports.openPlugin=e.r,exports.registerPlugin=c,exports.setGlobalApi=a,exports.unregisterPlugin=l;
package/dist/index.d.cts CHANGED
@@ -6,8 +6,8 @@
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
- import { A as Theme, C as PromptModeContext, D as Rect, E as ReactGrabState, O as SettableOptions, S as Position, _ as Options, a as getStack, b as PluginConfig, c as ActivationMode, d as ContextMenuActionContext, f as DeepPartial, g as GrabbedBox, h as ElementLabelVariant, i as getElementContext, j as ToolbarState, k as SourceInfo, l as AgentContext, m as ElementLabelContext, n as generateSnippet, o as ActionContext, p as DragRect, r as DEFAULT_THEME, s as ActionContextHooks, t as init, u as ContextMenuAction, v as OverlayBounds, w as ReactGrabAPI, x as PluginHooks, y as Plugin } from "./index-aMJqwVQq.cjs";
10
- import { i as isInstrumentationActive } from "./copy-content-3pnWacho.cjs";
9
+ import { A as ToolbarState, C as ReactGrabAPI, D as SettableOptions, E as Rect, O as SourceInfo, S as PromptModeContext, T as ReactGrabState, _ as OverlayBounds, a as ActionContext, b as PluginHooks, c as AgentContext, d as DeepPartial, f as DragRect, g as Options, h as GrabbedBox, i as isInstrumentationActive, k as Theme, l as ContextMenuAction, m as ElementLabelVariant, o as ActionContextHooks, p as ElementLabelContext, s as ActivationMode, u as ContextMenuActionContext, v as Plugin, x as Position, y as PluginConfig } from "./copy-content-B5eFPFGr.cjs";
10
+ import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-D_u6ADO3.cjs";
11
11
 
12
12
  //#region src/core/plugins/comment.d.ts
13
13
  declare const commentPlugin: Plugin;
@@ -27,4 +27,4 @@ declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
27
27
  declare const registerPlugin: (plugin: Plugin) => void;
28
28
  declare const unregisterPlugin: (name: string) => void;
29
29
  //#endregion
30
- export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type GrabbedBox, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, type Position, type PromptModeContext, type ReactGrabAPI, type ReactGrabState, type Rect, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, getElementContext as formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
30
+ export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type GrabbedBox, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, type Position, type PromptModeContext, type ReactGrabAPI, type ReactGrabState, type Rect, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
package/dist/index.d.ts CHANGED
@@ -6,8 +6,8 @@
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
- import { A as Theme, C as PromptModeContext, D as Rect, E as ReactGrabState, O as SettableOptions, S as Position, _ as Options, a as getStack, b as PluginConfig, c as ActivationMode, d as ContextMenuActionContext, f as DeepPartial, g as GrabbedBox, h as ElementLabelVariant, i as getElementContext, j as ToolbarState, k as SourceInfo, l as AgentContext, m as ElementLabelContext, n as generateSnippet, o as ActionContext, p as DragRect, r as DEFAULT_THEME, s as ActionContextHooks, t as init, u as ContextMenuAction, v as OverlayBounds, w as ReactGrabAPI, x as PluginHooks, y as Plugin } from "./index-qewm1CVI.js";
10
- import { i as isInstrumentationActive } from "./copy-content-DH6fBB50.js";
9
+ import { A as ToolbarState, C as ReactGrabAPI, D as SettableOptions, E as Rect, O as SourceInfo, S as PromptModeContext, T as ReactGrabState, _ as OverlayBounds, a as ActionContext, b as PluginHooks, c as AgentContext, d as DeepPartial, f as DragRect, g as Options, h as GrabbedBox, i as isInstrumentationActive, k as Theme, l as ContextMenuAction, m as ElementLabelVariant, o as ActionContextHooks, p as ElementLabelContext, s as ActivationMode, u as ContextMenuActionContext, v as Plugin, x as Position, y as PluginConfig } from "./copy-content-DmBP15ec.js";
10
+ import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "./index-CTRX5ujF.js";
11
11
 
12
12
  //#region src/core/plugins/comment.d.ts
13
13
  declare const commentPlugin: Plugin;
@@ -27,4 +27,4 @@ declare const setGlobalApi: (api: ReactGrabAPI | null) => void;
27
27
  declare const registerPlugin: (plugin: Plugin) => void;
28
28
  declare const unregisterPlugin: (name: string) => void;
29
29
  //#endregion
30
- export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type GrabbedBox, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, type Position, type PromptModeContext, type ReactGrabAPI, type ReactGrabState, type Rect, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, getElementContext as formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };
30
+ export { type ActionContext, type ActionContextHooks, type ActivationMode, type AgentContext, type ContextMenuAction, type ContextMenuActionContext, DEFAULT_THEME, type DeepPartial, type DragRect, type ElementLabelContext, type ElementLabelVariant, type GrabbedBox, type Options, type OverlayBounds, type Plugin, type PluginConfig, type PluginHooks, type Position, type PromptModeContext, type ReactGrabAPI, type ReactGrabState, type Rect, type SettableOptions, type SourceInfo, type Theme, type ToolbarState, commentPlugin, formatElementInfo, generateSnippet, getGlobalApi, getStack, init, isInstrumentationActive, openPlugin, registerPlugin, setGlobalApi, unregisterPlugin };