react-grab 0.1.48-dev.cac6157 → 0.1.48-dev.ce2ecee
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/{copy-content-BPB8MmpL.d.cts → copy-content-BUVj9hba.d.ts} +33 -16
- package/dist/copy-content-CR4_cB5c.cjs +10 -0
- package/dist/{copy-content-C7lFyXsY.d.ts → copy-content-DLfkE9XN.d.cts} +33 -16
- package/dist/copy-content-x-aiike3.js +10 -0
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/core-C1WDpX70.js +14 -0
- package/dist/core-Mu5N1YJu.cjs +14 -0
- package/dist/{create-pointer-move-prompt-handoff-DwNZaiRA.js → execute-context-menu-action-CUBFV4Gs.js} +1 -1
- package/dist/execute-context-menu-action-DvRB5kee.cjs +9 -0
- package/dist/freeze-updates-BmrKzakB.js +52 -0
- package/dist/freeze-updates-byGYIkoT.cjs +52 -0
- package/dist/{index-VkohC_Hw.d.ts → index-BUyvzkyo.d.ts} +1 -1
- package/dist/{index-DMyJsiaz.d.cts → index-CvRGcb__.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +20 -19
- package/dist/index.js +1 -1
- package/dist/primitives.cjs +2 -2
- package/dist/primitives.d.cts +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +2 -2
- package/dist/renderer-Cd1k4nBx.js +9 -0
- package/dist/renderer-ClmyNn7Q.cjs +9 -0
- package/package.json +3 -3
- package/dist/copy-content-CbjqLSIH.js +0 -10
- package/dist/copy-content-DoR-wbHM.cjs +0 -10
- package/dist/core-7jNiR5NZ.cjs +0 -14
- package/dist/core-C2C_YRT3.js +0 -14
- package/dist/create-pointer-move-prompt-handoff-D41bFo0b.cjs +0 -9
- package/dist/freeze-updates-CqzBfk2W.cjs +0 -51
- package/dist/freeze-updates-DlHvYaiv.js +0 -51
- package/dist/renderer-D0g-Fo8Z.js +0 -9
- package/dist/renderer-Dfd9Vhgx.cjs +0 -9
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Copy any UI element for your agent.
|
|
7
7
|
|
|
8
|
-
React Grab points agents to the actual source behind each selection. Agents are [**2× faster**](https://
|
|
8
|
+
React Grab points agents to the actual source behind each selection. Agents are [**2× faster**](https://react-grab.com/benchmarks) and more accurate when using React Grab.
|
|
9
9
|
|
|
10
10
|
[**Website →**](https://react-grab.com)
|
|
11
11
|
|
|
@@ -6,6 +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 { ReactNode } from "react";
|
|
10
|
+
|
|
9
11
|
//#region ../../node_modules/.pnpm/solid-js@1.9.12/node_modules/solid-js/types/reactive/observable.d.ts
|
|
10
12
|
declare global {
|
|
11
13
|
interface SymbolConstructor {
|
|
@@ -430,13 +432,19 @@ interface FrozenLabelEntry {
|
|
|
430
432
|
bounds: OverlayBounds;
|
|
431
433
|
mouseX?: number;
|
|
432
434
|
}
|
|
435
|
+
interface FrozenLabelEntryAccessor {
|
|
436
|
+
read: () => FrozenLabelEntry | null;
|
|
437
|
+
}
|
|
438
|
+
interface SelectionLabelInstanceAccessor {
|
|
439
|
+
read: () => SelectionLabelInstance | null;
|
|
440
|
+
}
|
|
433
441
|
interface ReactGrabRendererProps {
|
|
434
442
|
selectionVisible?: boolean;
|
|
435
443
|
selectionBounds?: OverlayBounds;
|
|
436
444
|
selectionBoundsMultiple?: OverlayBounds[];
|
|
437
445
|
selectionShouldSnap?: boolean;
|
|
438
446
|
selectionElementsCount?: number;
|
|
439
|
-
|
|
447
|
+
frozenLabelEntryAccessors?: FrozenLabelEntryAccessor[];
|
|
440
448
|
pendingShiftPreviewEntry?: FrozenLabelEntry;
|
|
441
449
|
selectionFilePath?: string;
|
|
442
450
|
selectionLineNumber?: number;
|
|
@@ -447,6 +455,7 @@ interface ReactGrabRendererProps {
|
|
|
447
455
|
hierarchyState?: HierarchyState;
|
|
448
456
|
hierarchyMenuPosition?: DropdownAnchor | null;
|
|
449
457
|
labelInstances?: SelectionLabelInstance[];
|
|
458
|
+
labelInstanceAccessors?: SelectionLabelInstanceAccessor[];
|
|
450
459
|
dragVisible?: boolean;
|
|
451
460
|
dragBounds?: OverlayBounds;
|
|
452
461
|
grabbedBoxes?: Array<{
|
|
@@ -548,7 +557,7 @@ interface ReactGrabEntry {
|
|
|
548
557
|
frames?: ReactGrabStackFrame[];
|
|
549
558
|
}
|
|
550
559
|
//#endregion
|
|
551
|
-
//#region ../../node_modules/.pnpm/bippy@0.
|
|
560
|
+
//#region ../../node_modules/.pnpm/bippy@0.6.0_react@19.2.6/node_modules/bippy/dist/unsubscribe.d.ts
|
|
552
561
|
type Flags = number;
|
|
553
562
|
type Lanes = number;
|
|
554
563
|
type TypeOfMode = number;
|
|
@@ -638,6 +647,14 @@ interface Effect {
|
|
|
638
647
|
interface Family {
|
|
639
648
|
current: unknown;
|
|
640
649
|
}
|
|
650
|
+
/**
|
|
651
|
+
* React 19 flight metadata for a server component owner (ReactComponentInfo).
|
|
652
|
+
* Unlike client owners it has no `tag`; the owner chain continues via `owner`.
|
|
653
|
+
*/
|
|
654
|
+
interface RendererRefreshUpdate {
|
|
655
|
+
staleFamilies: Set<Family>;
|
|
656
|
+
updatedFamilies: Set<Family>;
|
|
657
|
+
}
|
|
641
658
|
/**
|
|
642
659
|
* Represents a react-internal Fiber node.
|
|
643
660
|
*/
|
|
@@ -688,6 +705,7 @@ interface ReactDevToolsGlobalHook {
|
|
|
688
705
|
onCommitFiberRoot: (rendererID: number, root: FiberRoot, priority: number | void) => void;
|
|
689
706
|
onCommitFiberUnmount: (rendererID: number, fiber: Fiber) => void;
|
|
690
707
|
onPostCommitFiberRoot: (rendererID: number, root: FiberRoot) => void;
|
|
708
|
+
onScheduleFiberRoot?: (rendererID: number, root: FiberRoot, children: ReactNode) => void;
|
|
691
709
|
renderers: Map<number, ReactRenderer>;
|
|
692
710
|
supportsFiber: boolean;
|
|
693
711
|
supportsFlight: boolean;
|
|
@@ -706,10 +724,7 @@ interface ReactRenderer {
|
|
|
706
724
|
overridePropsRenamePath?: (fiber: Fiber, oldPath: Array<number | string>, newPath: Array<number | string>) => void;
|
|
707
725
|
reconcilerVersion: string;
|
|
708
726
|
rendererPackageName: string;
|
|
709
|
-
scheduleRefresh?: (root: FiberRoot, update:
|
|
710
|
-
staleFamilies: Set<Family>;
|
|
711
|
-
updatedFamilies: Set<Family>;
|
|
712
|
-
}) => void;
|
|
727
|
+
scheduleRefresh?: (root: FiberRoot, update: RendererRefreshUpdate) => void;
|
|
713
728
|
scheduleRoot?: (root: FiberRoot, element: React.ReactNode) => void;
|
|
714
729
|
scheduleUpdate?: (fiber: Fiber) => void;
|
|
715
730
|
setErrorHandler?: (newShouldErrorImpl: (fiber: Fiber) => boolean) => void;
|
|
@@ -720,28 +735,30 @@ interface ReactRenderer {
|
|
|
720
735
|
declare global {
|
|
721
736
|
var __REACT_DEVTOOLS_GLOBAL_HOOK__: ReactDevToolsGlobalHook | undefined;
|
|
722
737
|
} //#endregion
|
|
723
|
-
//#region src/
|
|
724
|
-
/**
|
|
725
|
-
* Returns `true` if bippy's instrumentation is active.
|
|
726
|
-
*/
|
|
727
|
-
declare const isInstrumentationActive: () => boolean;
|
|
728
|
-
/**
|
|
729
|
-
* Returns the latest fiber (since it may be double-buffered).
|
|
730
|
-
*/
|
|
738
|
+
//#region src/unsubscribe.d.ts
|
|
731
739
|
//#endregion
|
|
732
|
-
//#region ../../node_modules/.pnpm/bippy@0.
|
|
740
|
+
//#region ../../node_modules/.pnpm/bippy@0.6.0_react@19.2.6/node_modules/bippy/dist/source.d.ts
|
|
733
741
|
//#region src/source/parse-stack.d.ts
|
|
734
742
|
interface StackFrame {
|
|
735
743
|
args?: unknown[];
|
|
736
744
|
columnNumber?: number;
|
|
737
745
|
lineNumber?: number;
|
|
746
|
+
enclosingLineNumber?: number;
|
|
747
|
+
enclosingColumnNumber?: number;
|
|
738
748
|
fileName?: string;
|
|
739
749
|
functionName?: string;
|
|
740
750
|
source?: string;
|
|
741
751
|
isServer?: boolean;
|
|
742
752
|
isSymbolicated?: boolean;
|
|
753
|
+
isIgnoreListed?: boolean;
|
|
743
754
|
}
|
|
744
755
|
//#endregion
|
|
756
|
+
//#region ../../node_modules/.pnpm/bippy@0.6.0_react@19.2.6/node_modules/bippy/dist/core.d.ts
|
|
757
|
+
/**
|
|
758
|
+
* Returns `true` if bippy's instrumentation is active.
|
|
759
|
+
*/
|
|
760
|
+
declare const isInstrumentationActive: () => boolean;
|
|
761
|
+
//#endregion
|
|
745
762
|
//#region src/utils/copy-content.d.ts
|
|
746
763
|
interface CopyContentOptions {
|
|
747
764
|
componentName?: string;
|
|
@@ -751,4 +768,4 @@ interface CopyContentOptions {
|
|
|
751
768
|
}
|
|
752
769
|
declare const copyContent: (content: string, options?: CopyContentOptions) => boolean;
|
|
753
770
|
//#endregion
|
|
754
|
-
export { SourceInfo as A, PromptModeContext as C, Rect as D, ReactGrabState as E, ToolbarState as M, SelectedElementPayload as O, Position as S, ReactGrabRendererProps as T, Options as _, ActionContext as a, PluginConfig as b, AgentContext as c, DeepPartial as d, DragRect as f, GrabbedBox as g, ElementSelectedEventDetail as h,
|
|
771
|
+
export { SourceInfo as A, PromptModeContext as C, Rect as D, ReactGrabState as E, ToolbarState as M, SelectedElementPayload as O, Position as S, ReactGrabRendererProps as T, Options as _, ActionContext as a, PluginConfig as b, AgentContext as c, DeepPartial as d, DragRect as f, GrabbedBox as g, ElementSelectedEventDetail as h, Fiber as i, Theme as j, SettableOptions as k, ContextMenuAction as l, ElementLabelVariant as m, isInstrumentationActive as n, ActionContextHooks as o, ElementLabelContext as p, StackFrame as r, ActivationMode as s, copyContent as t, ContextMenuActionContext as u, OverlayBounds as v, ReactGrabAPI as w, PluginHooks as x, Plugin as y };
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
const e=require(`./freeze-updates-byGYIkoT.cjs`);var t=class extends Error{constructor(e){super(e),this.name=`ReactGrabError`}},n=class extends t{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},r=class extends t{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},i=class extends t{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},a=class extends t{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const o=e=>e===void 0||!Number.isFinite(e)?3:Math.max(0,Math.floor(e)),s=e=>{try{return decodeURIComponent(e)}catch{return e}},c=/(?:^|[/\\])node_modules[/\\]/,l=/[/\\]\.vite[/\\]deps[^/\\]*[/\\]/,u=/\.[mc]?[jt]sx?$/i,d=/^chunk-[A-Za-z0-9_-]+$/,f=/[/\\]/,p=/^(.+?)@v?\d/,m=e=>e.split(f).filter(Boolean),h=e=>{let[t,n]=m(e);return!t||t.startsWith(`.`)?null:t.startsWith(`@`)?n?`${t}/${n}`:null:t},ee=e=>{let t=m(e)[0];if(!t)return null;let n=t.replace(u,``);if(d.test(n))return null;if(!n.startsWith(`@`))return n;let r=n.indexOf(`_`);return r===-1?null:`${n.slice(0,r)}/${n.slice(r+1)}`},g=(e,t,n)=>{let r=e.split(t);return r.length>1?n(r[r.length-1]):null},_=e=>e?.match(p)?.[1]??null,te=e=>{let t;try{t=new URL(e)}catch{return null}if(!t.hostname)return null;let n=m(t.pathname).map(s);for(let[e,t]of n.entries()){if(t.startsWith(`@`)){let r=_(n[e+1]);if(r)return`${t}/${r}`;continue}let r=_(t);if(r)return r}return null},ne=e=>g(e,l,ee)??g(e,c,h),re=t=>{if(!t)return null;let n=e.S(t);return n&&(ne(s(n))||te(t))||null},ie=/^@[A-Za-z0-9][A-Za-z0-9._-]*$/,ae=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,oe=new Set([`app`,`web`,`website`,`frontend`,`client`,`src`]),se=new Set([`app`,`src`,`components`,`pages`,`features`,`modules`,`hooks`,`lib`,`utils`,`ui`,`shared`,`common`,`core`,`styles`,`assets`]),ce=e=>{let t=e;for(;t.startsWith(`../`)||t.startsWith(`./`);)t=t.slice(t.startsWith(`../`)?3:2);return t},le=t=>{let n=ce(s(e.S(t)));if(n.startsWith(`/`))return null;let[r,i,...a]=m(n);return!r||!i||a.length===0||!ie.test(r)||se.has(r.slice(1))||!ae.test(i)||u.test(i)||oe.has(i)?null:`${r}/${i}`},ue=e=>e?re(e)??le(e):null,v=t=>{if(!t)return{origin:`unknown`,packageName:null};let n=ue(t);return n?{origin:`package`,packageName:n}:e.E(t)?{origin:`app`,packageName:null}:{origin:`unknown`,packageName:null}},de=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),y=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},fe=(e,t)=>{let n=de.has(e)||e.startsWith(`data-`)&&y(e),r=y(t)&&t.length<100||t.startsWith(`#`)&&y(t.slice(1));return n&&r},b=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},x=e=>{let t=0;for(let n of e)t+=n.penalty;return t},pe=(e,t)=>x(e)-x(t),S=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(r instanceof Element&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},me=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,C=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,he=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&y(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)y(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:i,penalty:5});let a=S(e,i);a!==void 0&&n.push({name:C(i,a),penalty:10});let o=S(e);return o!==void 0&&n.push({name:me(i,o),penalty:50}),n},w=(t,n=e.mt,r=[])=>{if(n<=0)return[];if(t.length===0)return[r];let i=[];for(let e of t[0]){let a=n-i.length;if(a<=0)break;i.push(...w(t.slice(1),a,[...r,e]))}return i},ge=(e,t)=>{let n=t.getRootNode?.();return n instanceof ShadowRoot?n:e instanceof Document?e:e.ownerDocument},T=(e,t)=>t.querySelectorAll(b(e)).length===1,_e=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=S(n,e);if(t===void 0)return;r.push({name:C(e,t),penalty:10}),n=n.parentElement}return T(r,t)?r:void 0},ve=(e,t,a,o)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new n;if(e.tagName.toLowerCase()===`html`)return`html`;let s=ge(t,e),c=Date.now(),l=[],u=e,d=0,f;for(;u&&u!==s&&!f;)if(l.push(he(u,o)),u=u.parentElement,d++,d>=3){let t=w(l);t.sort(pe);for(let n of t){if(Date.now()-c>a){let t=_e(e,s);if(!t)throw new r(a);return b(t)}if(T(n,s)){f=n;break}}}if(!f&&d<3){let e=w(l);e.sort(pe);for(let t of e){if(Date.now()-c>a)break;if(T(t,s)){f=t;break}}}if(!f)throw new i;return b(f)},E=e=>e.ownerDocument.body??e.ownerDocument.documentElement,D=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`href`,`src`,`role`,`name`,`title`,`alt`]),O=e=>e.length>0&&e.length<=120,k=(e,t)=>{try{let n=e.ownerDocument.querySelectorAll(t);return n.length===1&&n[0]===e}catch{return!1}},ye=e=>{if(e instanceof HTMLElement&&e.id){let t=`#${CSS.escape(e.id)}`;if(k(e,t))return t}for(let t of D){let n=e.getAttribute(t);if(!n||!O(n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(k(e,r))return r;let i=`${e.tagName.toLowerCase()}${r}`;if(k(e,i))return i}return null},be=e=>{let t=[],n=E(e),r=e;for(;r;){if(r instanceof HTMLElement&&r.id){t.unshift(`#${CSS.escape(r.id)}`);break}let e=r.parentElement;if(!e){t.unshift(r.tagName.toLowerCase());break}let i=Array.from(e.children).indexOf(r)+1;if(t.unshift(`${r.tagName.toLowerCase()}:nth-child(${i})`),e===n){t.unshift(n.tagName.toLowerCase());break}r=e}return t.join(` > `)},xe=e=>{let t=ye(e);if(t)return t;try{let t=ve(e,E(e),200,(e,t)=>fe(e,t)||D.has(e)&&O(t));if(t)return t}catch{}return be(e)},Se=[`[id]`,`[data-testid]`,`[data-test-id]`,`[data-test]`,`[data-cy]`,`[data-qa]`,`[aria-label]`,`a[href]`,`button`,`input`,`select`,`textarea`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="radio"]`,`[role="switch"]`,`[role="tab"]`,`[role="menuitem"]`,`[role="option"]`,`[role="textbox"]`,`[role="combobox"]`,`[role="slider"]`,`[role="spinbutton"]`].join(`,`),Ce=t=>{let{body:n,documentElement:r}=t.ownerDocument;if(t===n||t===r)return!0;if(!n)return!1;let i=n.getElementsByTagName(`*`).length;return i===0?!1:t.getElementsByTagName(`*`).length/i>=e.U},we=e=>{let t=e.closest(Se);return!t||Ce(t)?e:t},Te=[/\/assets\/[^/?#]+-[a-z0-9_-]{6,}\.(?:c|m)?js(?:[?#]|$)/,/\/_next\/static\/.*\.(?:c|m)?js(?:[?#]|$)/,/\/static\/chunks\/.*\.(?:c|m)?js(?:[?#]|$)/],Ee=t=>{if(!t)return!1;let n=`/${e.x(t)}`.toLowerCase();return Te.some(e=>e.test(n))},De=t=>{if(!t)return!1;let n=`/${e.x(t)}/`.toLowerCase();return e.It.some(e=>n.includes(e))},Oe=e=>e.map(e=>`\n in ${e}`).join(``),ke=[`about://React/`,`rsc://React/`],Ae=e=>ke.some(t=>e.startsWith(t)),je=e=>{for(let t of ke){if(!e.startsWith(t))continue;let n=e.indexOf(`/`,t.length);if(n===-1)continue;let r=n+1,i=e.lastIndexOf(`?`);return s(i>r?e.slice(r,i):e.slice(r))}return e},Me=e=>{if(typeof e!=`object`||!e||!(`status`in e)||e.status!==`fulfilled`||!(`value`in e)||typeof e.value!=`object`||e.value===null||!(`originalStackFrame`in e.value))return null;let t=e.value.originalStackFrame;return typeof t!=`object`||!t||!(`file`in t)||typeof t.file!=`string`||!t.file||`ignored`in t&&t.ignored?null:{file:t.file,line1:`line1`in t&&typeof t.line1==`number`?t.line1:null,column1:`column1`in t&&typeof t.column1==`number`?t.column1:null}},Ne=async(t,n)=>{let r=[],i=[];for(let e=0;e<t.length;e++){let n=t[e];!n.isServer||!n.fileName||(r.push(e),i.push({file:je(n.fileName),methodName:n.functionName??`<unknown>`,line1:n.lineNumber??null,column1:n.columnNumber??null,arguments:[]}))}if(i.length===0)return t;let a=new AbortController,o=setTimeout(()=>a.abort(),e.Rt),s=()=>a.abort();n?.aborted&&a.abort(),n?.addEventListener(`abort`,s);try{let n=await fetch(`${e.y()}/__nextjs_original-stack-frames`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({frames:i,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),priority:`high`,signal:a.signal});if(!n.ok)return t;let o=await n.json();if(!Array.isArray(o))return t;let s=[...t];for(let e=0;e<r.length;e++){let n=Me(o[e]);if(!n)continue;let i=r[e];s[i]={...t[i],fileName:n.file,lineNumber:n.line1??void 0,columnNumber:n.column1??void 0,isSymbolicated:!0}}return s}catch{return t}finally{clearTimeout(o),n?.removeEventListener(`abort`,s)}},Pe=t=>{let n=new Map;return e.L(t,t=>{if(!e.w(t))return!1;let r=e.O(t._debugStack.stack);if(!r)return!1;for(let t of e.D(r))!t.functionName||!t.fileName||Ae(t.fileName)&&(n.has(t.functionName)||n.set(t.functionName,{...t,isServer:!0}));return!1},!0),n},Fe=(e,t)=>{if(!t.some(e=>e.isServer&&!e.fileName&&e.functionName))return t;let n=Pe(e);return n.size===0?t:t.map(e=>{if(!e.isServer||e.fileName||!e.functionName)return e;let t=n.get(e.functionName);return t?{...e,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber}:e})};let A=0;const j=[],Ie=()=>A<3?(A+=1,Promise.resolve()):new Promise(e=>{j.push(e)}),Le=()=>{let e=j.shift();if(e){e();return}--A},M=async(t,n,r=e.Lt)=>{await Ie();let i=new AbortController,a,o=new Promise(e=>{a=setTimeout(()=>{i.abort(),e(n)},r)}),s=t(i.signal);s.catch(()=>{});try{return await Promise.race([s,o])}finally{clearTimeout(a),Le()}},N=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e,Re=e=>e.startsWith(`data-react-grab-`),P=e=>e.replace(/\s+/g,` `).trim(),ze=e=>{let t=[];for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE)continue;let e=P(n.textContent??``);e&&t.push(e)}return t.join(` `)},F=t=>t.getAttribute(`aria-hidden`)===`true`||t.hasAttribute(`hidden`)?!0:e.jt.has(t.tagName.toLowerCase()),I=(e,t,n)=>{if(e.nodeType===Node.TEXT_NODE){let r=P(e.textContent??``);return r?(t.push(r),n-r.length):n}if(!(e instanceof Element)||F(e))return n;for(let r of e.childNodes)if(n=I(r,t,n),n<=0)break;return n},L=(t,n)=>{if(F(t))return``;let r=ze(t);if(!e.Ot.has(n)||r&&t.children.length===0)return r;let i=[];return I(t,i,100),i.join(` `)},R=e=>N(e,15),Be=t=>{let n=[];for(let r of e.At){let e=t.getAttribute(r);e&&n.push(`${r}="${e}"`)}return n.length>0?` ${n.join(` `)}`:``},Ve=e=>e===`class`||e===`className`||e===`style`,z=t=>{let n=[],r=[],i=``;for(let{name:a,value:o}of t.attributes)if(!Re(a)){if(Ve(a)){a!==`style`&&o&&(i=` class="${R(o)}"`);continue}e.kt.has(a)?n.push(o?` ${a}="${o}"`:` ${a}`):o&&r.push(` ${a}="${R(o)}"`)}return n.join(``)+r.join(``)+i},B=t=>t.length===0?``:t.length<=2?t.map(t=>`<${e.j(t)} ...>`).join(`
|
|
10
|
+
`):`(${t.length} elements)`,He=t=>{let n=e.j(t);if(!(t instanceof HTMLElement))return`<${n}${Be(t)} />`;let r=z(t),i=N(L(t,n),100);return i?`<${n}${r}>${i}</${n}>`:`<${n}${r} />`},V=t=>{let n=e.j(t),r=z(t),i=L(t,n),a=[],o=[],s=!1;for(let e of t.childNodes)e.nodeType!==Node.COMMENT_NODE&&(e.nodeType===Node.TEXT_NODE?e.textContent&&e.textContent.trim().length>0&&(s=!0):e instanceof Element&&(s?o.push(e):a.push(e)));let c=i.length>0&&e.Ot.has(n),l=``,u=B(a);u&&!c&&(l+=`\n ${u}`),i&&(l+=`\n ${N(i,100)}`);let d=B(o);return d&&!c&&(l+=`\n ${d}`),l.length>0?`<${n}${r}>${l}\n</${n}>`:`<${n}${r} />`},Ue=new Set([`_`,`$`,`motion.`,`styled.`,`chakra.`,`ark.`,`Primitive.`,`Slot.`]),We=new Set(`AppRouter.AppRouterAnnouncer.AppDevOverlay.AppDevOverlayErrorBoundary.ClientPageRoot.ClientSegmentRoot.DevRootHTTPAccessFallbackBoundary.ErrorBoundary.ErrorBoundaryHandler.GracefulDegradeBoundary.HTTPAccessErrorFallback.HTTPAccessFallbackBoundary.HTTPAccessFallbackErrorBoundary.HandleRedirect.Head.HistoryUpdater.HotReload.InnerLayoutRouter.InnerScrollAndFocusHandler.InnerScrollAndFocusHandlerOld.InnerScrollAndMaybeFocusHandler.InnerScrollHandlerNew.LoadableComponent.LoadingBoundary.LoadingBoundaryProvider.NotAllowedRootHTTPFallbackError.OfflineProvider.OuterLayoutRouter.RedirectBoundary.RedirectErrorBoundary.RenderFromTemplateContext.RenderValidationBoundaryAtThisLevel.ReplaySsrOnlyErrors.RootErrorBoundary.RootLevelDevOverlayElement.Router.ScrollAndFocusHandler.ScrollAndMaybeFocusHandler.SegmentBoundaryTrigger.SegmentBoundaryTriggerNode.SegmentStateProvider.SegmentTrieNode.SegmentViewNode.SegmentViewStateNode.ServerRoot.body.html`.split(`.`)),Ge=new Set([`<anonymous>`,`<unknown>`,`Anonymous`,`Unknown`]),Ke=new Set([`Suspense`,`Fragment`,`StrictMode`,`Profiler`,`SuspenseList`]),qe=new Set([`MotionDOMComponent`,`Slot`,`SlotClone`]),Je=[`.Consumer`,`.Context`,`.Provider`,`.Slot`,`.SlotClone`,`.Slottable`,`ProviderProvider`],H=e=>{if(Ge.has(e)||We.has(e)||Ke.has(e)||qe.has(e))return!0;for(let t of Je)if(e.endsWith(t))return!0;for(let t of Ue)if(e.startsWith(t))return!0;return!1},Ye=e=>!(!e||H(e)),U=e=>!(e.length<=1||H(e)||e[0]!==e[0].toUpperCase()),W=e=>e&&U(e)?e:null,G=e=>!De(e)&&!Ee(e),K=t=>{if(!e.P())return t;let n=t;for(;n;){if(e.R(n))return n;n=n.parentElement}return t},Xe=e=>{let t=e.return?.child??null;for(;t;){if(t!==e&&t.key!==null)return!0;t=t.sibling}return!1},Ze=t=>{let n=t,r=0;for(;n;){if(n.key!==null&&Xe(n))return String(n.key);if(e.M(n)&&(r+=1,r===2))break;n=n.return}return null},Qe=t=>e.P()?Ze(e.R(K(t))):null,q=new WeakMap,J=new WeakMap,$e=e=>t=>fetch(t,{signal:e,priority:`high`}),et=t=>M(async n=>{try{let r=e.R(t);if(!r)return null;let i=await e.T(r,!0,$e(n));return e.b()?await Ne(Fe(r,i),n):i}catch{return null}},null),Y=t=>{if(!e.P())return Promise.resolve([]);let n=K(t),r=q.get(n);if(r)return r;let i=et(n).then(e=>(e===null&&q.delete(n),e));return q.set(n,i),i},tt=async t=>{if(!e.P())return null;let n=await Y(t);if(!n)return null;for(let e of n){let t=W(e.functionName);if(t)return t}return null},nt=e=>e.find(e=>!!W(e.functionName))??e[0]??null,rt=t=>!t||!e.M(t)?null:W(e.N(t.type)),it=t=>M(async n=>{let r=e.R(K(t));if(!r)return null;try{let t=await e.C(r,!0,$e(n));return t?.fileName?{filePath:e.x(t.fileName),lineNumber:t.lineNumber??null,columnNumber:t.columnNumber??null,componentName:W(t.functionName)??rt(r._debugOwner),origin:v(t.fileName).origin}:null}catch{return null}},null),at=e=>{let t=K(e),n=J.get(t);if(n)return n;let r=it(t).then(e=>(e||J.delete(t),e));return J.set(t,r),r},ot=(t,n)=>{let r=(t,n)=>{let r=nt(t);return r?.fileName?{filePath:e.x(r.fileName),lineNumber:r.lineNumber??null,columnNumber:r.columnNumber??null,componentName:W(r.functionName),origin:n}:null},i=n.filter(e=>v(e.fileName).origin===`app`),a=i.filter(e=>G(e.fileName));return t?.origin===`app`&&G(t.filePath)?t:r(a,`app`)||(t?.origin===`app`&&!Ee(t.filePath)?t:r(i,`app`)||(t?.origin===`app`||t?.origin===`package`?t:r(n.filter(e=>v(e.fileName).origin===`package`),`package`)))},st=async e=>{let t=await at(e);return t?.origin===`app`&&G(t.filePath)?t:ot(t,await Y(e)??[])},ct=e=>X(K(e),1)[0]??null,X=(t,n,r=()=>!0)=>{if(!e.P())return[];let i=e.R(t);if(!i)return[];let a=[];return e.L(i,t=>{if(a.length>=n)return!0;if(e.M(t)){let n=e.N(t.type);n&&Ye(n)&&r(n)&&a.push(n)}return!1},!0),a},lt=[`/src/app/`,`/src/pages/`,`/app/`,`/pages/`],ut=(t,n)=>{let r=e.x(t);if(!n||!r.startsWith(`/`))return r;for(let e of lt){let t=r.indexOf(e);if(t!==-1)return`/./${r.slice(t+1)}`}return r},dt=(e,t)=>{let n=ut(e.filePath,t),r=t&&e.lineNumber?`${n}:${e.lineNumber}${e.columnNumber?`:${e.columnNumber}`:``}`:n;return e.componentName?`\n in ${e.componentName} (at ${r})`:`\n in ${r}`},Z={isAppSource:!1,consumesBudget:!1},ft=(e,t,n,r)=>{let i=t.packageName,a=t.origin===`app`?e.fileName:null;if(e.isServer&&!a&&(n||!e.functionName)){let e=i?`${i} at Server`:`at Server`;return{text:`\n in ${n??`<anonymous>`} (${e})`,...Z}}return!a&&n?{text:i?`\n in ${n} (${i})`:`\n in ${n}`,...Z}:i?{text:`\n in ${i}`,...Z}:a?{text:dt({componentName:n,filePath:a,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null},r),isAppSource:!0,consumesBudget:G(a)}:null},pt=(t,n={},r=null)=>{let i=o(n.maxLines),a=Math.max(i,20),s=e.b(),c=[],l=new Set,u=null,d=!1,f=!1,p=!1,m=0,h=e=>{e&&l.add(e)};if(r){let e=r.origin===`app`&&G(r.filePath);f=e,e&&(m+=1),h(r.componentName),c.push(dt(r,s))}for(let e of t){if(m>=i||c.length>=a)break;let t=v(e.fileName),n=W(e.functionName),o=t.packageName?`${t.packageName}:${n??``}:${e.isServer?`server`:`client`}`:null;if(o&&o===u)continue;if(!d&&n&&n===r?.componentName){d=!0;continue}let l=ft(e,t,n,s);l!==null&&l.text!==c[c.length-1]&&(l.isAppSource&&l.consumesBudget&&(f=!0),l.consumesBudget&&(m+=1,p=!0),h(n),c.push(l.text),u=o)}return{text:c.join(``),shouldAppendSelectorHint:!f,hasBudgetedStackFrame:p,renderedComponentNames:l}},mt=(e,t)=>{let n=ot(e,t);return n?.origin===`app`?n:null},ht=(e,t,n)=>{let r=X(K(e),n,e=>U(e)&&!t.renderedComponentNames.has(e));return r.length===0?t:{...t,text:`${t.text}${Oe(r)}`}},Q=async(e,t={})=>{let n=await at(e),r=await Y(e)??[],i=mt(n,r),a=o(t.maxLines),s=pt(r,t,i);if(s.text)return s.hasBudgetedStackFrame?s:ht(e,s,a);let c=X(K(e),a);return{text:Oe(c),shouldAppendSelectorHint:!0,hasBudgetedStackFrame:!1,renderedComponentNames:new Set(c)}},gt=async(e,t={})=>(await Q(e,t)).text,$=(e,t)=>{let n=Qe(e),r=n===null?``:`\n key: "${n}"`,i=t.shouldAppendSelectorHint?`\n selector: ${xe(we(e))}`:``;return`${t.text}${r}${i}`},_t=async(e,t={})=>{let n=await Q(e,t);return`${He(e)}${$(e,n).replace(/\n\s+/g,` `)}`},vt=async(e,t={})=>{let n=K(e);return`${V(n)}${$(n,await Q(n,t))}`},yt=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),bt=(t,n)=>{let r=n?.componentName??`div`,i={version:e.Bt,content:t,entries:n?.entries??[{tagName:n?.tagName,componentName:r,content:t,commentText:n?.commentText}],timestamp:Date.now()},a=e=>{e.preventDefault(),e.clipboardData?.setData(`text/plain`,t),e.clipboardData?.setData(`text/html`,`<meta charset='utf-8'><pre><code>${yt(t)}</code></pre>`),e.clipboardData?.setData(`application/x-react-grab`,JSON.stringify(i))};document.addEventListener(`copy`,a);let o=document.createElement(`textarea`);o.value=t,o.style.position=`fixed`,o.style.left=`-9999px`,o.ariaHidden=`true`,document.body.appendChild(o),o.select();try{return typeof document.execCommand==`function`?document.execCommand(`copy`):!1}finally{document.removeEventListener(`copy`,a),o.remove()}};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return we}});
|
|
@@ -6,6 +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 { ReactNode } from "react";
|
|
10
|
+
|
|
9
11
|
//#region ../../node_modules/.pnpm/solid-js@1.9.12/node_modules/solid-js/types/reactive/observable.d.ts
|
|
10
12
|
declare global {
|
|
11
13
|
interface SymbolConstructor {
|
|
@@ -430,13 +432,19 @@ interface FrozenLabelEntry {
|
|
|
430
432
|
bounds: OverlayBounds;
|
|
431
433
|
mouseX?: number;
|
|
432
434
|
}
|
|
435
|
+
interface FrozenLabelEntryAccessor {
|
|
436
|
+
read: () => FrozenLabelEntry | null;
|
|
437
|
+
}
|
|
438
|
+
interface SelectionLabelInstanceAccessor {
|
|
439
|
+
read: () => SelectionLabelInstance | null;
|
|
440
|
+
}
|
|
433
441
|
interface ReactGrabRendererProps {
|
|
434
442
|
selectionVisible?: boolean;
|
|
435
443
|
selectionBounds?: OverlayBounds;
|
|
436
444
|
selectionBoundsMultiple?: OverlayBounds[];
|
|
437
445
|
selectionShouldSnap?: boolean;
|
|
438
446
|
selectionElementsCount?: number;
|
|
439
|
-
|
|
447
|
+
frozenLabelEntryAccessors?: FrozenLabelEntryAccessor[];
|
|
440
448
|
pendingShiftPreviewEntry?: FrozenLabelEntry;
|
|
441
449
|
selectionFilePath?: string;
|
|
442
450
|
selectionLineNumber?: number;
|
|
@@ -447,6 +455,7 @@ interface ReactGrabRendererProps {
|
|
|
447
455
|
hierarchyState?: HierarchyState;
|
|
448
456
|
hierarchyMenuPosition?: DropdownAnchor | null;
|
|
449
457
|
labelInstances?: SelectionLabelInstance[];
|
|
458
|
+
labelInstanceAccessors?: SelectionLabelInstanceAccessor[];
|
|
450
459
|
dragVisible?: boolean;
|
|
451
460
|
dragBounds?: OverlayBounds;
|
|
452
461
|
grabbedBoxes?: Array<{
|
|
@@ -548,7 +557,7 @@ interface ReactGrabEntry {
|
|
|
548
557
|
frames?: ReactGrabStackFrame[];
|
|
549
558
|
}
|
|
550
559
|
//#endregion
|
|
551
|
-
//#region ../../node_modules/.pnpm/bippy@0.
|
|
560
|
+
//#region ../../node_modules/.pnpm/bippy@0.6.0_react@19.2.6/node_modules/bippy/dist/unsubscribe.d.ts
|
|
552
561
|
type Flags = number;
|
|
553
562
|
type Lanes = number;
|
|
554
563
|
type TypeOfMode = number;
|
|
@@ -638,6 +647,14 @@ interface Effect {
|
|
|
638
647
|
interface Family {
|
|
639
648
|
current: unknown;
|
|
640
649
|
}
|
|
650
|
+
/**
|
|
651
|
+
* React 19 flight metadata for a server component owner (ReactComponentInfo).
|
|
652
|
+
* Unlike client owners it has no `tag`; the owner chain continues via `owner`.
|
|
653
|
+
*/
|
|
654
|
+
interface RendererRefreshUpdate {
|
|
655
|
+
staleFamilies: Set<Family>;
|
|
656
|
+
updatedFamilies: Set<Family>;
|
|
657
|
+
}
|
|
641
658
|
/**
|
|
642
659
|
* Represents a react-internal Fiber node.
|
|
643
660
|
*/
|
|
@@ -688,6 +705,7 @@ interface ReactDevToolsGlobalHook {
|
|
|
688
705
|
onCommitFiberRoot: (rendererID: number, root: FiberRoot, priority: number | void) => void;
|
|
689
706
|
onCommitFiberUnmount: (rendererID: number, fiber: Fiber) => void;
|
|
690
707
|
onPostCommitFiberRoot: (rendererID: number, root: FiberRoot) => void;
|
|
708
|
+
onScheduleFiberRoot?: (rendererID: number, root: FiberRoot, children: ReactNode) => void;
|
|
691
709
|
renderers: Map<number, ReactRenderer>;
|
|
692
710
|
supportsFiber: boolean;
|
|
693
711
|
supportsFlight: boolean;
|
|
@@ -706,10 +724,7 @@ interface ReactRenderer {
|
|
|
706
724
|
overridePropsRenamePath?: (fiber: Fiber, oldPath: Array<number | string>, newPath: Array<number | string>) => void;
|
|
707
725
|
reconcilerVersion: string;
|
|
708
726
|
rendererPackageName: string;
|
|
709
|
-
scheduleRefresh?: (root: FiberRoot, update:
|
|
710
|
-
staleFamilies: Set<Family>;
|
|
711
|
-
updatedFamilies: Set<Family>;
|
|
712
|
-
}) => void;
|
|
727
|
+
scheduleRefresh?: (root: FiberRoot, update: RendererRefreshUpdate) => void;
|
|
713
728
|
scheduleRoot?: (root: FiberRoot, element: React.ReactNode) => void;
|
|
714
729
|
scheduleUpdate?: (fiber: Fiber) => void;
|
|
715
730
|
setErrorHandler?: (newShouldErrorImpl: (fiber: Fiber) => boolean) => void;
|
|
@@ -720,28 +735,30 @@ interface ReactRenderer {
|
|
|
720
735
|
declare global {
|
|
721
736
|
var __REACT_DEVTOOLS_GLOBAL_HOOK__: ReactDevToolsGlobalHook | undefined;
|
|
722
737
|
} //#endregion
|
|
723
|
-
//#region src/
|
|
724
|
-
/**
|
|
725
|
-
* Returns `true` if bippy's instrumentation is active.
|
|
726
|
-
*/
|
|
727
|
-
declare const isInstrumentationActive: () => boolean;
|
|
728
|
-
/**
|
|
729
|
-
* Returns the latest fiber (since it may be double-buffered).
|
|
730
|
-
*/
|
|
738
|
+
//#region src/unsubscribe.d.ts
|
|
731
739
|
//#endregion
|
|
732
|
-
//#region ../../node_modules/.pnpm/bippy@0.
|
|
740
|
+
//#region ../../node_modules/.pnpm/bippy@0.6.0_react@19.2.6/node_modules/bippy/dist/source.d.ts
|
|
733
741
|
//#region src/source/parse-stack.d.ts
|
|
734
742
|
interface StackFrame {
|
|
735
743
|
args?: unknown[];
|
|
736
744
|
columnNumber?: number;
|
|
737
745
|
lineNumber?: number;
|
|
746
|
+
enclosingLineNumber?: number;
|
|
747
|
+
enclosingColumnNumber?: number;
|
|
738
748
|
fileName?: string;
|
|
739
749
|
functionName?: string;
|
|
740
750
|
source?: string;
|
|
741
751
|
isServer?: boolean;
|
|
742
752
|
isSymbolicated?: boolean;
|
|
753
|
+
isIgnoreListed?: boolean;
|
|
743
754
|
}
|
|
744
755
|
//#endregion
|
|
756
|
+
//#region ../../node_modules/.pnpm/bippy@0.6.0_react@19.2.6/node_modules/bippy/dist/core.d.ts
|
|
757
|
+
/**
|
|
758
|
+
* Returns `true` if bippy's instrumentation is active.
|
|
759
|
+
*/
|
|
760
|
+
declare const isInstrumentationActive: () => boolean;
|
|
761
|
+
//#endregion
|
|
745
762
|
//#region src/utils/copy-content.d.ts
|
|
746
763
|
interface CopyContentOptions {
|
|
747
764
|
componentName?: string;
|
|
@@ -751,4 +768,4 @@ interface CopyContentOptions {
|
|
|
751
768
|
}
|
|
752
769
|
declare const copyContent: (content: string, options?: CopyContentOptions) => boolean;
|
|
753
770
|
//#endregion
|
|
754
|
-
export { SourceInfo as A, PromptModeContext as C, Rect as D, ReactGrabState as E, ToolbarState as M, SelectedElementPayload as O, Position as S, ReactGrabRendererProps as T, Options as _, ActionContext as a, PluginConfig as b, AgentContext as c, DeepPartial as d, DragRect as f, GrabbedBox as g, ElementSelectedEventDetail as h,
|
|
771
|
+
export { SourceInfo as A, PromptModeContext as C, Rect as D, ReactGrabState as E, ToolbarState as M, SelectedElementPayload as O, Position as S, ReactGrabRendererProps as T, Options as _, ActionContext as a, PluginConfig as b, AgentContext as c, DeepPartial as d, DragRect as f, GrabbedBox as g, ElementSelectedEventDetail as h, Fiber as i, Theme as j, SettableOptions as k, ContextMenuAction as l, ElementLabelVariant as m, isInstrumentationActive as n, ActionContextHooks as o, ElementLabelContext as p, StackFrame as r, ActivationMode as s, copyContent as t, ContextMenuActionContext as u, OverlayBounds as v, ReactGrabAPI as w, PluginHooks as x, Plugin as y };
|
|
@@ -0,0 +1,10 @@
|
|
|
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{At as e,Bt as t,C as n,D as r,E as i,It as a,L as o,Lt as s,M as c,N as l,O as u,Ot as d,P as f,R as p,Rt as m,S as h,T as ee,U as te,b as g,j as _,jt as ne,kt as re,mt as ie,w as ae,x as v,y as oe}from"./freeze-updates-BmrKzakB.js";var y=class extends Error{constructor(e){super(e),this.name=`ReactGrabError`}},se=class extends y{constructor(){super(`Can't generate CSS selector for non-element node type.`),this.name=`NonElementNodeError`}},ce=class extends y{constructor(e){super(`Timeout: Can't find a unique selector after ${e}ms`),this.name=`SelectorTimeoutError`,this.timeoutMs=e}},le=class extends y{constructor(){super(`Selector was not found.`),this.name=`SelectorNotFoundError`}},ue=class extends y{constructor(){super(`Failed to copy`),this.name=`CopyFailedError`}};const de=e=>e===void 0||!Number.isFinite(e)?3:Math.max(0,Math.floor(e)),b=e=>{try{return decodeURIComponent(e)}catch{return e}},fe=/(?:^|[/\\])node_modules[/\\]/,pe=/[/\\]\.vite[/\\]deps[^/\\]*[/\\]/,me=/\.[mc]?[jt]sx?$/i,he=/^chunk-[A-Za-z0-9_-]+$/,ge=/[/\\]/,_e=/^(.+?)@v?\d/,x=e=>e.split(ge).filter(Boolean),ve=e=>{let[t,n]=x(e);return!t||t.startsWith(`.`)?null:t.startsWith(`@`)?n?`${t}/${n}`:null:t},ye=e=>{let t=x(e)[0];if(!t)return null;let n=t.replace(me,``);if(he.test(n))return null;if(!n.startsWith(`@`))return n;let r=n.indexOf(`_`);return r===-1?null:`${n.slice(0,r)}/${n.slice(r+1)}`},S=(e,t,n)=>{let r=e.split(t);return r.length>1?n(r[r.length-1]):null},C=e=>e?.match(_e)?.[1]??null,be=e=>{let t;try{t=new URL(e)}catch{return null}if(!t.hostname)return null;let n=x(t.pathname).map(b);for(let[e,t]of n.entries()){if(t.startsWith(`@`)){let r=C(n[e+1]);if(r)return`${t}/${r}`;continue}let r=C(t);if(r)return r}return null},xe=e=>S(e,pe,ye)??S(e,fe,ve),Se=e=>{if(!e)return null;let t=h(e);return t&&(xe(b(t))||be(e))||null},Ce=/^@[A-Za-z0-9][A-Za-z0-9._-]*$/,we=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,Te=new Set([`app`,`web`,`website`,`frontend`,`client`,`src`]),Ee=new Set([`app`,`src`,`components`,`pages`,`features`,`modules`,`hooks`,`lib`,`utils`,`ui`,`shared`,`common`,`core`,`styles`,`assets`]),De=e=>{let t=e;for(;t.startsWith(`../`)||t.startsWith(`./`);)t=t.slice(t.startsWith(`../`)?3:2);return t},Oe=e=>{let t=De(b(h(e)));if(t.startsWith(`/`))return null;let[n,r,...i]=x(t);return!n||!r||i.length===0||!Ce.test(n)||Ee.has(n.slice(1))||!we.test(r)||me.test(r)||Te.has(r)?null:`${n}/${r}`},ke=e=>e?Se(e)??Oe(e):null,w=e=>{if(!e)return{origin:`unknown`,packageName:null};let t=ke(e);return t?{origin:`package`,packageName:t}:i(e)?{origin:`app`,packageName:null}:{origin:`unknown`,packageName:null}},Ae=new Set([`role`,`name`,`aria-label`,`rel`,`href`]),T=e=>{if(!/^[a-z-]{3,}$/i.test(e))return!1;let t=e.split(/-|[A-Z]/);for(let e of t)if(e.length<=2||/[^aeiou]{4,}/i.test(e))return!1;return!0},je=(e,t)=>{let n=Ae.has(e)||e.startsWith(`data-`)&&T(e),r=T(t)&&t.length<100||t.startsWith(`#`)&&T(t.slice(1));return n&&r},E=e=>{let t=e[0].name;for(let n=1;n<e.length;n++)t=`${e[n].name} > ${t}`;return t},D=e=>{let t=0;for(let n of e)t+=n.penalty;return t},O=(e,t)=>D(e)-D(t),k=(e,t)=>{let n=e.parentNode;if(!n)return;let r=n.firstChild;if(!r)return;let i=0;for(;r&&(r instanceof Element&&(t===void 0||r.tagName.toLowerCase()===t)&&i++,r!==e);)r=r.nextSibling;return i},Me=(e,t)=>e===`html`?`html`:`${e}:nth-child(${t})`,A=(e,t)=>e===`html`?`html`:`${e}:nth-of-type(${t})`,Ne=(e,t)=>{let n=[],r=e.getAttribute(`id`),i=e.tagName.toLowerCase();r&&T(r)&&n.push({name:`#${CSS.escape(r)}`,penalty:0});for(let t of e.classList)T(t)&&n.push({name:`.${CSS.escape(t)}`,penalty:1});for(let r of e.attributes)t(r.name,r.value)&&n.push({name:`[${CSS.escape(r.name)}="${CSS.escape(r.value)}"]`,penalty:2});n.push({name:i,penalty:5});let a=k(e,i);a!==void 0&&n.push({name:A(i,a),penalty:10});let o=k(e);return o!==void 0&&n.push({name:Me(i,o),penalty:50}),n},j=(e,t=ie,n=[])=>{if(t<=0)return[];if(e.length===0)return[n];let r=[];for(let i of e[0]){let a=t-r.length;if(a<=0)break;r.push(...j(e.slice(1),a,[...n,i]))}return r},Pe=(e,t)=>{let n=t.getRootNode?.();return n instanceof ShadowRoot?n:e instanceof Document?e:e.ownerDocument},M=(e,t)=>t.querySelectorAll(E(e)).length===1,Fe=(e,t)=>{let n=e,r=[];for(;n&&n!==t;){let e=n.tagName.toLowerCase(),t=k(n,e);if(t===void 0)return;r.push({name:A(e,t),penalty:10}),n=n.parentElement}return M(r,t)?r:void 0},Ie=(e,t,n,r)=>{if(e.nodeType!==Node.ELEMENT_NODE)throw new se;if(e.tagName.toLowerCase()===`html`)return`html`;let i=Pe(t,e),a=Date.now(),o=[],s=e,c=0,l;for(;s&&s!==i&&!l;)if(o.push(Ne(s,r)),s=s.parentElement,c++,c>=3){let t=j(o);t.sort(O);for(let r of t){if(Date.now()-a>n){let t=Fe(e,i);if(!t)throw new ce(n);return E(t)}if(M(r,i)){l=r;break}}}if(!l&&c<3){let e=j(o);e.sort(O);for(let t of e){if(Date.now()-a>n)break;if(M(t,i)){l=t;break}}}if(!l)throw new le;return E(l)},N=e=>e.ownerDocument.body??e.ownerDocument.documentElement,P=new Set([`data-testid`,`data-test-id`,`data-test`,`data-cy`,`data-qa`,`aria-label`,`href`,`src`,`role`,`name`,`title`,`alt`]),F=e=>e.length>0&&e.length<=120,I=(e,t)=>{try{let n=e.ownerDocument.querySelectorAll(t);return n.length===1&&n[0]===e}catch{return!1}},Le=e=>{if(e instanceof HTMLElement&&e.id){let t=`#${CSS.escape(e.id)}`;if(I(e,t))return t}for(let t of P){let n=e.getAttribute(t);if(!n||!F(n))continue;let r=`[${t}=${JSON.stringify(n)}]`;if(I(e,r))return r;let i=`${e.tagName.toLowerCase()}${r}`;if(I(e,i))return i}return null},Re=e=>{let t=[],n=N(e),r=e;for(;r;){if(r instanceof HTMLElement&&r.id){t.unshift(`#${CSS.escape(r.id)}`);break}let e=r.parentElement;if(!e){t.unshift(r.tagName.toLowerCase());break}let i=Array.from(e.children).indexOf(r)+1;if(t.unshift(`${r.tagName.toLowerCase()}:nth-child(${i})`),e===n){t.unshift(n.tagName.toLowerCase());break}r=e}return t.join(` > `)},L=e=>{let t=Le(e);if(t)return t;try{let t=Ie(e,N(e),200,(e,t)=>je(e,t)||P.has(e)&&F(t));if(t)return t}catch{}return Re(e)},ze=[`[id]`,`[data-testid]`,`[data-test-id]`,`[data-test]`,`[data-cy]`,`[data-qa]`,`[aria-label]`,`a[href]`,`button`,`input`,`select`,`textarea`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="radio"]`,`[role="switch"]`,`[role="tab"]`,`[role="menuitem"]`,`[role="option"]`,`[role="textbox"]`,`[role="combobox"]`,`[role="slider"]`,`[role="spinbutton"]`].join(`,`),Be=e=>{let{body:t,documentElement:n}=e.ownerDocument;if(e===t||e===n)return!0;if(!t)return!1;let r=t.getElementsByTagName(`*`).length;return r===0?!1:e.getElementsByTagName(`*`).length/r>=te},R=e=>{let t=e.closest(ze);return!t||Be(t)?e:t},Ve=[/\/assets\/[^/?#]+-[a-z0-9_-]{6,}\.(?:c|m)?js(?:[?#]|$)/,/\/_next\/static\/.*\.(?:c|m)?js(?:[?#]|$)/,/\/static\/chunks\/.*\.(?:c|m)?js(?:[?#]|$)/],z=e=>{if(!e)return!1;let t=`/${v(e)}`.toLowerCase();return Ve.some(e=>e.test(t))},He=e=>{if(!e)return!1;let t=`/${v(e)}/`.toLowerCase();return a.some(e=>t.includes(e))},B=e=>e.map(e=>`\n in ${e}`).join(``),Ue=[`about://React/`,`rsc://React/`],We=e=>Ue.some(t=>e.startsWith(t)),Ge=e=>{for(let t of Ue){if(!e.startsWith(t))continue;let n=e.indexOf(`/`,t.length);if(n===-1)continue;let r=n+1,i=e.lastIndexOf(`?`);return b(i>r?e.slice(r,i):e.slice(r))}return e},Ke=e=>{if(typeof e!=`object`||!e||!(`status`in e)||e.status!==`fulfilled`||!(`value`in e)||typeof e.value!=`object`||e.value===null||!(`originalStackFrame`in e.value))return null;let t=e.value.originalStackFrame;return typeof t!=`object`||!t||!(`file`in t)||typeof t.file!=`string`||!t.file||`ignored`in t&&t.ignored?null:{file:t.file,line1:`line1`in t&&typeof t.line1==`number`?t.line1:null,column1:`column1`in t&&typeof t.column1==`number`?t.column1:null}},qe=async(e,t)=>{let n=[],r=[];for(let t=0;t<e.length;t++){let i=e[t];!i.isServer||!i.fileName||(n.push(t),r.push({file:Ge(i.fileName),methodName:i.functionName??`<unknown>`,line1:i.lineNumber??null,column1:i.columnNumber??null,arguments:[]}))}if(r.length===0)return e;let i=new AbortController,a=setTimeout(()=>i.abort(),m),o=()=>i.abort();t?.aborted&&i.abort(),t?.addEventListener(`abort`,o);try{let t=await fetch(`${oe()}/__nextjs_original-stack-frames`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({frames:r,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),priority:`high`,signal:i.signal});if(!t.ok)return e;let a=await t.json();if(!Array.isArray(a))return e;let o=[...e];for(let t=0;t<n.length;t++){let r=Ke(a[t]);if(!r)continue;let i=n[t];o[i]={...e[i],fileName:r.file,lineNumber:r.line1??void 0,columnNumber:r.column1??void 0,isSymbolicated:!0}}return o}catch{return e}finally{clearTimeout(a),t?.removeEventListener(`abort`,o)}},Je=e=>{let t=new Map;return o(e,e=>{if(!ae(e))return!1;let n=u(e._debugStack.stack);if(!n)return!1;for(let e of r(n))!e.functionName||!e.fileName||We(e.fileName)&&(t.has(e.functionName)||t.set(e.functionName,{...e,isServer:!0}));return!1},!0),t},Ye=(e,t)=>{if(!t.some(e=>e.isServer&&!e.fileName&&e.functionName))return t;let n=Je(e);return n.size===0?t:t.map(e=>{if(!e.isServer||e.fileName||!e.functionName)return e;let t=n.get(e.functionName);return t?{...e,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber}:e})};let V=0;const Xe=[],Ze=()=>V<3?(V+=1,Promise.resolve()):new Promise(e=>{Xe.push(e)}),Qe=()=>{let e=Xe.shift();if(e){e();return}--V},$e=async(e,t,n=s)=>{await Ze();let r=new AbortController,i,a=new Promise(e=>{i=setTimeout(()=>{r.abort(),e(t)},n)}),o=e(r.signal);o.catch(()=>{});try{return await Promise.race([o,a])}finally{clearTimeout(i),Qe()}},H=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e,et=e=>e.startsWith(`data-react-grab-`),tt=e=>e.replace(/\s+/g,` `).trim(),nt=e=>{let t=[];for(let n of e.childNodes){if(n.nodeType!==Node.TEXT_NODE)continue;let e=tt(n.textContent??``);e&&t.push(e)}return t.join(` `)},rt=e=>e.getAttribute(`aria-hidden`)===`true`||e.hasAttribute(`hidden`)?!0:ne.has(e.tagName.toLowerCase()),it=(e,t,n)=>{if(e.nodeType===Node.TEXT_NODE){let r=tt(e.textContent??``);return r?(t.push(r),n-r.length):n}if(!(e instanceof Element)||rt(e))return n;for(let r of e.childNodes)if(n=it(r,t,n),n<=0)break;return n},at=(e,t)=>{if(rt(e))return``;let n=nt(e);if(!d.has(t)||n&&e.children.length===0)return n;let r=[];return it(e,r,100),r.join(` `)},ot=e=>H(e,15),st=t=>{let n=[];for(let r of e){let e=t.getAttribute(r);e&&n.push(`${r}="${e}"`)}return n.length>0?` ${n.join(` `)}`:``},ct=e=>e===`class`||e===`className`||e===`style`,lt=e=>{let t=[],n=[],r=``;for(let{name:i,value:a}of e.attributes)if(!et(i)){if(ct(i)){i!==`style`&&a&&(r=` class="${ot(a)}"`);continue}re.has(i)?t.push(a?` ${i}="${a}"`:` ${i}`):a&&n.push(` ${i}="${ot(a)}"`)}return t.join(``)+n.join(``)+r},ut=e=>e.length===0?``:e.length<=2?e.map(e=>`<${_(e)} ...>`).join(`
|
|
10
|
+
`):`(${e.length} elements)`,dt=e=>{let t=_(e);if(!(e instanceof HTMLElement))return`<${t}${st(e)} />`;let n=lt(e),r=H(at(e,t),100);return r?`<${t}${n}>${r}</${t}>`:`<${t}${n} />`},ft=e=>{let t=_(e),n=lt(e),r=at(e,t),i=[],a=[],o=!1;for(let t of e.childNodes)t.nodeType!==Node.COMMENT_NODE&&(t.nodeType===Node.TEXT_NODE?t.textContent&&t.textContent.trim().length>0&&(o=!0):t instanceof Element&&(o?a.push(t):i.push(t)));let s=r.length>0&&d.has(t),c=``,l=ut(i);l&&!s&&(c+=`\n ${l}`),r&&(c+=`\n ${H(r,100)}`);let u=ut(a);return u&&!s&&(c+=`\n ${u}`),c.length>0?`<${t}${n}>${c}\n</${t}>`:`<${t}${n} />`},pt=new Set([`_`,`$`,`motion.`,`styled.`,`chakra.`,`ark.`,`Primitive.`,`Slot.`]),mt=new Set(`AppRouter.AppRouterAnnouncer.AppDevOverlay.AppDevOverlayErrorBoundary.ClientPageRoot.ClientSegmentRoot.DevRootHTTPAccessFallbackBoundary.ErrorBoundary.ErrorBoundaryHandler.GracefulDegradeBoundary.HTTPAccessErrorFallback.HTTPAccessFallbackBoundary.HTTPAccessFallbackErrorBoundary.HandleRedirect.Head.HistoryUpdater.HotReload.InnerLayoutRouter.InnerScrollAndFocusHandler.InnerScrollAndFocusHandlerOld.InnerScrollAndMaybeFocusHandler.InnerScrollHandlerNew.LoadableComponent.LoadingBoundary.LoadingBoundaryProvider.NotAllowedRootHTTPFallbackError.OfflineProvider.OuterLayoutRouter.RedirectBoundary.RedirectErrorBoundary.RenderFromTemplateContext.RenderValidationBoundaryAtThisLevel.ReplaySsrOnlyErrors.RootErrorBoundary.RootLevelDevOverlayElement.Router.ScrollAndFocusHandler.ScrollAndMaybeFocusHandler.SegmentBoundaryTrigger.SegmentBoundaryTriggerNode.SegmentStateProvider.SegmentTrieNode.SegmentViewNode.SegmentViewStateNode.ServerRoot.body.html`.split(`.`)),ht=new Set([`<anonymous>`,`<unknown>`,`Anonymous`,`Unknown`]),gt=new Set([`Suspense`,`Fragment`,`StrictMode`,`Profiler`,`SuspenseList`]),_t=new Set([`MotionDOMComponent`,`Slot`,`SlotClone`]),vt=[`.Consumer`,`.Context`,`.Provider`,`.Slot`,`.SlotClone`,`.Slottable`,`ProviderProvider`],yt=e=>{if(ht.has(e)||mt.has(e)||gt.has(e)||_t.has(e))return!0;for(let t of vt)if(e.endsWith(t))return!0;for(let t of pt)if(e.startsWith(t))return!0;return!1},bt=e=>!(!e||yt(e)),xt=e=>!(e.length<=1||yt(e)||e[0]!==e[0].toUpperCase()),U=e=>e&&xt(e)?e:null,W=e=>!He(e)&&!z(e),G=e=>{if(!f())return e;let t=e;for(;t;){if(p(t))return t;t=t.parentElement}return e},St=e=>{let t=e.return?.child??null;for(;t;){if(t!==e&&t.key!==null)return!0;t=t.sibling}return!1},Ct=e=>{let t=e,n=0;for(;t;){if(t.key!==null&&St(t))return String(t.key);if(c(t)&&(n+=1,n===2))break;t=t.return}return null},wt=e=>f()?Ct(p(G(e))):null,K=new WeakMap,q=new WeakMap,Tt=e=>t=>fetch(t,{signal:e,priority:`high`}),Et=e=>$e(async t=>{try{let n=p(e);if(!n)return null;let r=await ee(n,!0,Tt(t));return g()?await qe(Ye(n,r),t):r}catch{return null}},null),J=e=>{if(!f())return Promise.resolve([]);let t=G(e),n=K.get(t);if(n)return n;let r=Et(t).then(e=>(e===null&&K.delete(t),e));return K.set(t,r),r},Dt=async e=>{if(!f())return null;let t=await J(e);if(!t)return null;for(let e of t){let t=U(e.functionName);if(t)return t}return null},Ot=e=>e.find(e=>!!U(e.functionName))??e[0]??null,kt=e=>!e||!c(e)?null:U(l(e.type)),At=e=>$e(async t=>{let r=p(G(e));if(!r)return null;try{let e=await n(r,!0,Tt(t));return e?.fileName?{filePath:v(e.fileName),lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null,componentName:U(e.functionName)??kt(r._debugOwner),origin:w(e.fileName).origin}:null}catch{return null}},null),jt=e=>{let t=G(e),n=q.get(t);if(n)return n;let r=At(t).then(e=>(e||q.delete(t),e));return q.set(t,r),r},Mt=(e,t)=>{let n=(e,t)=>{let n=Ot(e);return n?.fileName?{filePath:v(n.fileName),lineNumber:n.lineNumber??null,columnNumber:n.columnNumber??null,componentName:U(n.functionName),origin:t}:null},r=t.filter(e=>w(e.fileName).origin===`app`),i=r.filter(e=>W(e.fileName));return e?.origin===`app`&&W(e.filePath)?e:n(i,`app`)||(e?.origin===`app`&&!z(e.filePath)?e:n(r,`app`)||(e?.origin===`app`||e?.origin===`package`?e:n(t.filter(e=>w(e.fileName).origin===`package`),`package`)))},Nt=async e=>{let t=await jt(e);return t?.origin===`app`&&W(t.filePath)?t:Mt(t,await J(e)??[])},Pt=e=>Y(G(e),1)[0]??null,Y=(e,t,n=()=>!0)=>{if(!f())return[];let r=p(e);if(!r)return[];let i=[];return o(r,e=>{if(i.length>=t)return!0;if(c(e)){let t=l(e.type);t&&bt(t)&&n(t)&&i.push(t)}return!1},!0),i},Ft=[`/src/app/`,`/src/pages/`,`/app/`,`/pages/`],It=(e,t)=>{let n=v(e);if(!t||!n.startsWith(`/`))return n;for(let e of Ft){let t=n.indexOf(e);if(t!==-1)return`/./${n.slice(t+1)}`}return n},X=(e,t)=>{let n=It(e.filePath,t),r=t&&e.lineNumber?`${n}:${e.lineNumber}${e.columnNumber?`:${e.columnNumber}`:``}`:n;return e.componentName?`\n in ${e.componentName} (at ${r})`:`\n in ${r}`},Z={isAppSource:!1,consumesBudget:!1},Lt=(e,t,n,r)=>{let i=t.packageName,a=t.origin===`app`?e.fileName:null;if(e.isServer&&!a&&(n||!e.functionName)){let e=i?`${i} at Server`:`at Server`;return{text:`\n in ${n??`<anonymous>`} (${e})`,...Z}}return!a&&n?{text:i?`\n in ${n} (${i})`:`\n in ${n}`,...Z}:i?{text:`\n in ${i}`,...Z}:a?{text:X({componentName:n,filePath:a,lineNumber:e.lineNumber??null,columnNumber:e.columnNumber??null},r),isAppSource:!0,consumesBudget:W(a)}:null},Rt=(e,t={},n=null)=>{let r=de(t.maxLines),i=Math.max(r,20),a=g(),o=[],s=new Set,c=null,l=!1,u=!1,d=!1,f=0,p=e=>{e&&s.add(e)};if(n){let e=n.origin===`app`&&W(n.filePath);u=e,e&&(f+=1),p(n.componentName),o.push(X(n,a))}for(let t of e){if(f>=r||o.length>=i)break;let e=w(t.fileName),s=U(t.functionName),m=e.packageName?`${e.packageName}:${s??``}:${t.isServer?`server`:`client`}`:null;if(m&&m===c)continue;if(!l&&s&&s===n?.componentName){l=!0;continue}let h=Lt(t,e,s,a);h!==null&&h.text!==o[o.length-1]&&(h.isAppSource&&h.consumesBudget&&(u=!0),h.consumesBudget&&(f+=1,d=!0),p(s),o.push(h.text),c=m)}return{text:o.join(``),shouldAppendSelectorHint:!u,hasBudgetedStackFrame:d,renderedComponentNames:s}},zt=(e,t)=>{let n=Mt(e,t);return n?.origin===`app`?n:null},Bt=(e,t,n)=>{let r=Y(G(e),n,e=>xt(e)&&!t.renderedComponentNames.has(e));return r.length===0?t:{...t,text:`${t.text}${B(r)}`}},Q=async(e,t={})=>{let n=await jt(e),r=await J(e)??[],i=zt(n,r),a=de(t.maxLines),o=Rt(r,t,i);if(o.text)return o.hasBudgetedStackFrame?o:Bt(e,o,a);let s=Y(G(e),a);return{text:B(s),shouldAppendSelectorHint:!0,hasBudgetedStackFrame:!1,renderedComponentNames:new Set(s)}},Vt=async(e,t={})=>(await Q(e,t)).text,$=(e,t)=>{let n=wt(e),r=n===null?``:`\n key: "${n}"`,i=t.shouldAppendSelectorHint?`\n selector: ${L(R(e))}`:``;return`${t.text}${r}${i}`},Ht=async(e,t={})=>{let n=await Q(e,t);return`${dt(e)}${$(e,n).replace(/\n\s+/g,` `)}`},Ut=async(e,t={})=>{let n=G(e);return`${ft(n)}${$(n,await Q(n,t))}`},Wt=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),Gt=(e,n)=>{let r=n?.componentName??`div`,i={version:t,content:e,entries:n?.entries??[{tagName:n?.tagName,componentName:r,content:e,commentText:n?.commentText}],timestamp:Date.now()},a=t=>{t.preventDefault(),t.clipboardData?.setData(`text/plain`,e),t.clipboardData?.setData(`text/html`,`<meta charset='utf-8'><pre><code>${Wt(e)}</code></pre>`),t.clipboardData?.setData(`application/x-react-grab`,JSON.stringify(i))};document.addEventListener(`copy`,a);let o=document.createElement(`textarea`);o.value=e,o.style.position=`fixed`,o.style.left=`-9999px`,o.ariaHidden=`true`,document.body.appendChild(o),o.select();try{return typeof document.execCommand==`function`?document.execCommand(`copy`):!1}finally{document.removeEventListener(`copy`,a),o.remove()}};export{Dt as a,Nt as c,L as d,ue as f,Ht as i,ft as l,Ut as n,J as o,Pt as r,Vt as s,Gt as t,R as u};
|
package/dist/core/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-
|
|
9
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../core-Mu5N1YJu.cjs`),t=require(`../freeze-updates-byGYIkoT.cjs`),n=require(`../copy-content-CR4_cB5c.cjs`);exports.DEFAULT_THEME=e.a,exports.copyContent=n.t,exports.formatElementInfo=n.n,exports.generateSnippet=e.n,exports.getStack=n.o,exports.init=e.t,exports.isInstrumentationActive=t.P;
|
package/dist/core/index.d.cts
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
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 SourceInfo, T as ReactGrabRendererProps, _ as Options, a as ActionContext, b as PluginConfig, c as AgentContext,
|
|
10
|
-
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "../index-
|
|
9
|
+
import { A as SourceInfo, T as ReactGrabRendererProps, _ as Options, a as ActionContext, b as PluginConfig, c as AgentContext, k as SettableOptions, l as ContextMenuAction, n as isInstrumentationActive, t as copyContent, v as OverlayBounds, w as ReactGrabAPI, x as PluginHooks, y as Plugin } from "../copy-content-DLfkE9XN.cjs";
|
|
10
|
+
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "../index-CvRGcb__.cjs";
|
|
11
11
|
export { ActionContext, AgentContext, ContextMenuAction, DEFAULT_THEME, Options, OverlayBounds, Plugin, PluginConfig, PluginHooks, ReactGrabAPI, ReactGrabRendererProps, SettableOptions, SourceInfo, copyContent, formatElementInfo, generateSnippet, getStack, init, isInstrumentationActive };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
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 SourceInfo, T as ReactGrabRendererProps, _ as Options, a as ActionContext, b as PluginConfig, c as AgentContext,
|
|
10
|
-
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "../index-
|
|
9
|
+
import { A as SourceInfo, T as ReactGrabRendererProps, _ as Options, a as ActionContext, b as PluginConfig, c as AgentContext, k as SettableOptions, l as ContextMenuAction, n as isInstrumentationActive, t as copyContent, v as OverlayBounds, w as ReactGrabAPI, x as PluginHooks, y as Plugin } from "../copy-content-BUVj9hba.js";
|
|
10
|
+
import { a as getStack, i as formatElementInfo, n as generateSnippet, r as DEFAULT_THEME, t as init } from "../index-BUyvzkyo.js";
|
|
11
11
|
export { ActionContext, AgentContext, ContextMenuAction, DEFAULT_THEME, Options, OverlayBounds, Plugin, PluginConfig, PluginHooks, ReactGrabAPI, ReactGrabRendererProps, SettableOptions, SourceInfo, copyContent, formatElementInfo, generateSnippet, getStack, init, isInstrumentationActive };
|
package/dist/core/index.js
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
|
-
import{a as e,n as t,t as n}from"../core-
|
|
9
|
+
import{a as e,n as t,t as n}from"../core-C1WDpX70.js";import{P as r}from"../freeze-updates-BmrKzakB.js";import{n as i,o as a,t as o}from"../copy-content-x-aiike3.js";export{e as DEFAULT_THEME,o as copyContent,i as formatElementInfo,t as generateSnippet,a as getStack,n as init,r as isInstrumentationActive};
|