@buoy-gg/debug-borders 7.0.68 → 7.0.69

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";const{getComponentDisplayName}=require("./ViewTypeMapper");const{getNativeViewClassName,getComponentName}=require("./fiberTreeTraversal");const IDENTIFIER_CONFIG={testID:{label:"test",color:"#10b981"},nativeID:{label:"native",color:"#f59e0b"},component:{label:"comp",color:"#a855f7"},accessibilityLabel:{label:"a11y",color:"#ec4899"},viewType:{label:"view",color:"#6b7280"}};function extractComponentInfo(t,l){const i=t?.memoizedProps||t?.pendingProps||{testID:l?.getAttribute?.("data-testid"),nativeID:l?.id,accessibilityLabel:l?.getAttribute?.("aria-label"),accessibilityRole:l?.getAttribute?.("role")};const p=getNativeViewClassName(l)||"Unknown";const b=getComponentDisplayName(p);const a=getComponentName(t);const o=i.testID||null;const n=i.nativeID||null;const s=i.accessibilityLabel||i.accessible?.label||null;const u=i.accessibilityRole||i.role||null;const f=i.accessibilityHint||null;const I=i.accessibilityState||null;let c=null;if(i.style){try{const m=Array.isArray(i.style)?Object.assign({},...i.style.filter(Boolean)):i.style;c=m}catch(m){c=null}}const T=t?.tag;const g=t?.key;let y=null;let r=t?.return;while(r){if(r.type&&typeof r.type==="function"){y=r.type.displayName||r.type.name||null;if(y)break}r=r.return}const e={viewType:p,displayName:b,componentName:a,parentComponentName:y,testID:o,nativeID:n,accessibilityLabel:s,accessibilityRole:u,accessibilityHint:f,accessibilityState:I,fiberTag:T,fiberKey:g,styleInfo:c,primaryLabel:null,primaryType:null,primaryColor:null};if(o){e.primaryLabel=o;e.primaryType="testID";e.primaryColor=IDENTIFIER_CONFIG.testID.color}else if(s){e.primaryLabel=s;e.primaryType="accessibilityLabel";e.primaryColor=IDENTIFIER_CONFIG.accessibilityLabel.color}else if(a){e.primaryLabel=a;e.primaryType="component";e.primaryColor=IDENTIFIER_CONFIG.component.color}else if(n){e.primaryLabel=n;e.primaryType="nativeID";e.primaryColor=IDENTIFIER_CONFIG.nativeID.color}else{e.primaryLabel=b;e.primaryType="viewType";e.primaryColor=IDENTIFIER_CONFIG.viewType.color}return e}function getShortLabel(t,l=20){if(!t)return"";if(t.length<=l)return t;return t.substring(0,l-1)+"\u2026"}function getLabelPrefix(t){const l=IDENTIFIER_CONFIG[t];return l?l.label+":":""}module.exports={extractComponentInfo,getShortLabel,getLabelPrefix,IDENTIFIER_CONFIG};
1
+ "use strict";const{getComponentDisplayName}=require("./ViewTypeMapper");const{getNativeViewClassName,getComponentName}=require("./fiberTreeTraversal");const IDENTIFIER_CONFIG={testID:{label:"test",color:"#10b981"},nativeID:{label:"native",color:"#f59e0b"},component:{label:"comp",color:"#a855f7"},accessibilityLabel:{label:"a11y",color:"#ec4899"},viewType:{label:"view",color:"#6b7280"}};function extractComponentInfo(i,l){const t=i?.memoizedProps||i?.pendingProps||{testID:l?.getAttribute?.("data-testid"),nativeID:l?.id,accessibilityLabel:l?.getAttribute?.("aria-label"),accessibilityRole:l?.getAttribute?.("role")};const p=getNativeViewClassName(l)||"Unknown";const b=getComponentDisplayName(p);const a=getComponentName(i);const o=t.testID||t["data-testid"]||null;const n=t.nativeID||null;const s=t.accessibilityLabel||t.accessible?.label||t["aria-label"]||null;const u=t.accessibilityRole||t.role||null;const f=t.accessibilityHint||null;const I=t.accessibilityState||null;let c=null;if(t.style){try{const m=Array.isArray(t.style)?Object.assign({},...t.style.filter(Boolean)):t.style;c=m}catch(m){c=null}}const T=i?.tag;const g=i?.key;let y=null;let r=i?.return;while(r){if(r.type&&typeof r.type==="function"){y=r.type.displayName||r.type.name||null;if(y)break}r=r.return}const e={viewType:p,displayName:b,componentName:a,parentComponentName:y,testID:o,nativeID:n,accessibilityLabel:s,accessibilityRole:u,accessibilityHint:f,accessibilityState:I,fiberTag:T,fiberKey:g,styleInfo:c,primaryLabel:null,primaryType:null,primaryColor:null};if(o){e.primaryLabel=o;e.primaryType="testID";e.primaryColor=IDENTIFIER_CONFIG.testID.color}else if(s){e.primaryLabel=s;e.primaryType="accessibilityLabel";e.primaryColor=IDENTIFIER_CONFIG.accessibilityLabel.color}else if(a){e.primaryLabel=a;e.primaryType="component";e.primaryColor=IDENTIFIER_CONFIG.component.color}else if(n){e.primaryLabel=n;e.primaryType="nativeID";e.primaryColor=IDENTIFIER_CONFIG.nativeID.color}else{e.primaryLabel=b;e.primaryType="viewType";e.primaryColor=IDENTIFIER_CONFIG.viewType.color}return e}function getShortLabel(i,l=20){if(!i)return"";if(i.length<=l)return i;return i.substring(0,l-1)+"\u2026"}function getLabelPrefix(i){const l=IDENTIFIER_CONFIG[i];return l?l.label+":":""}module.exports={extractComponentInfo,getShortLabel,getLabelPrefix,IDENTIFIER_CONFIG};
@@ -1 +1 @@
1
- "use strict";let addLog=null;try{const n=require("./DebugInfo");addLog=n.addLog}catch(n){}function measureInstance(n){return new Promise(t=>{try{let u=n;if(n.canonical){if(n.canonical.publicInstance){u=n.canonical.publicInstance}else{u=n.canonical}}if(typeof u.getBoundingClientRect==="function"){const e=u.getBoundingClientRect();if(e&&typeof e.x==="number"&&typeof e.y==="number"&&typeof e.width==="number"&&typeof e.height==="number"&&e.width>=0&&e.height>=0){t({x:e.x,y:e.y,width:e.width,height:e.height});return}}if(typeof u.measure==="function"){const e=setTimeout(()=>{t(null)},100);u.measure((c,i,o,r,a,l)=>{clearTimeout(e);if(a!=null&&l!=null&&o!=null&&r!=null&&o>=0&&r>=0){t({x:a,y:l,width:o,height:r})}else{t(null)}});return}t(null)}catch(u){t(null)}})}const{extractComponentInfo}=require("./componentInfo");async function measureInstances(n){const t=await Promise.all(n.map(async({instance:e,fiber:c,depth:i})=>{const o=await measureInstance(e);if(o){const r=extractComponentInfo(c,e);return{...o,depth:i,componentInfo:r}}return null}));const u=t.filter(e=>e!=null);return u}function getMeasurementCapabilities(n){return{hasFabricBoundingRect:typeof n.getBoundingClientRect==="function",hasPaperMeasure:typeof n.measure==="function",hasNode:n.node!=null}}function getMeasurementStats(n){const t={fabric:0,paper:0,none:0};n.forEach(({instance:u})=>{const e=getMeasurementCapabilities(u);if(e.hasFabricBoundingRect){t.fabric++}else if(e.hasPaperMeasure){t.paper++}else{t.none++}});return t}module.exports={measureInstance,measureInstances,getMeasurementCapabilities,getMeasurementStats};
1
+ "use strict";let addLog=null;try{const n=require("./DebugInfo");addLog=n.addLog}catch(n){}function measureInstance(n){return new Promise(t=>{try{let o=n;if(n.canonical){if(n.canonical.publicInstance){o=n.canonical.publicInstance}else{o=n.canonical}}if(typeof o.getBoundingClientRect==="function"){const e=o.getBoundingClientRect();if(e&&typeof e.x==="number"&&typeof e.y==="number"&&typeof e.width==="number"&&typeof e.height==="number"&&e.width>=0&&e.height>=0){t({x:e.x,y:e.y,width:e.width,height:e.height});return}}const u=typeof global!=="undefined"?global.nativeFabricUIManager:void 0;const r=typeof o.measure==="function"?e=>o.measure(e):n.node&&typeof u?.measure==="function"?e=>u.measure(n.node,e):null;if(r){const e=setTimeout(()=>{t(null)},100);r((a,l,c,i,s,f)=>{clearTimeout(e);if(s!=null&&f!=null&&c!=null&&i!=null&&c>=0&&i>=0){t({x:s,y:f,width:c,height:i})}else{t(null)}});return}t(null)}catch(o){t(null)}})}const{extractComponentInfo}=require("./componentInfo");async function measureInstances(n){const t=await Promise.all(n.map(async({instance:u,fiber:r,depth:e})=>{const a=await measureInstance(u);if(a){const l=extractComponentInfo(r,u);return{...a,depth:e,componentInfo:l}}return null}));const o=t.filter(u=>u!=null);return o}function getMeasurementCapabilities(n){return{hasFabricBoundingRect:typeof n.getBoundingClientRect==="function",hasPaperMeasure:typeof n.measure==="function",hasNode:n.node!=null}}function getMeasurementStats(n){const t={fabric:0,paper:0,none:0};n.forEach(({instance:o})=>{const u=getMeasurementCapabilities(o);if(u.hasFabricBoundingRect){t.fabric++}else if(u.hasPaperMeasure){t.paper++}else{t.none++}});return t}module.exports={measureInstance,measureInstances,getMeasurementCapabilities,getMeasurementStats};
@@ -1 +1 @@
1
- "use strict";const{getComponentDisplayName}=require("./ViewTypeMapper");const{getNativeViewClassName,getComponentName}=require("./fiberTreeTraversal");const IDENTIFIER_CONFIG={testID:{label:"test",color:"#10b981"},nativeID:{label:"native",color:"#f59e0b"},component:{label:"comp",color:"#a855f7"},accessibilityLabel:{label:"a11y",color:"#ec4899"},viewType:{label:"view",color:"#6b7280"}};function extractComponentInfo(t,l){const i=t?.memoizedProps||t?.pendingProps||{testID:l?.getAttribute?.("data-testid"),nativeID:l?.id,accessibilityLabel:l?.getAttribute?.("aria-label"),accessibilityRole:l?.getAttribute?.("role")};const p=getNativeViewClassName(l)||"Unknown";const b=getComponentDisplayName(p);const a=getComponentName(t);const o=i.testID||null;const n=i.nativeID||null;const s=i.accessibilityLabel||i.accessible?.label||null;const u=i.accessibilityRole||i.role||null;const f=i.accessibilityHint||null;const I=i.accessibilityState||null;let c=null;if(i.style){try{const m=Array.isArray(i.style)?Object.assign({},...i.style.filter(Boolean)):i.style;c=m}catch(m){c=null}}const T=t?.tag;const g=t?.key;let y=null;let r=t?.return;while(r){if(r.type&&typeof r.type==="function"){y=r.type.displayName||r.type.name||null;if(y)break}r=r.return}const e={viewType:p,displayName:b,componentName:a,parentComponentName:y,testID:o,nativeID:n,accessibilityLabel:s,accessibilityRole:u,accessibilityHint:f,accessibilityState:I,fiberTag:T,fiberKey:g,styleInfo:c,primaryLabel:null,primaryType:null,primaryColor:null};if(o){e.primaryLabel=o;e.primaryType="testID";e.primaryColor=IDENTIFIER_CONFIG.testID.color}else if(s){e.primaryLabel=s;e.primaryType="accessibilityLabel";e.primaryColor=IDENTIFIER_CONFIG.accessibilityLabel.color}else if(a){e.primaryLabel=a;e.primaryType="component";e.primaryColor=IDENTIFIER_CONFIG.component.color}else if(n){e.primaryLabel=n;e.primaryType="nativeID";e.primaryColor=IDENTIFIER_CONFIG.nativeID.color}else{e.primaryLabel=b;e.primaryType="viewType";e.primaryColor=IDENTIFIER_CONFIG.viewType.color}return e}function getShortLabel(t,l=20){if(!t)return"";if(t.length<=l)return t;return t.substring(0,l-1)+"\u2026"}function getLabelPrefix(t){const l=IDENTIFIER_CONFIG[t];return l?l.label+":":""}module.exports={extractComponentInfo,getShortLabel,getLabelPrefix,IDENTIFIER_CONFIG};
1
+ "use strict";const{getComponentDisplayName}=require("./ViewTypeMapper");const{getNativeViewClassName,getComponentName}=require("./fiberTreeTraversal");const IDENTIFIER_CONFIG={testID:{label:"test",color:"#10b981"},nativeID:{label:"native",color:"#f59e0b"},component:{label:"comp",color:"#a855f7"},accessibilityLabel:{label:"a11y",color:"#ec4899"},viewType:{label:"view",color:"#6b7280"}};function extractComponentInfo(i,l){const t=i?.memoizedProps||i?.pendingProps||{testID:l?.getAttribute?.("data-testid"),nativeID:l?.id,accessibilityLabel:l?.getAttribute?.("aria-label"),accessibilityRole:l?.getAttribute?.("role")};const p=getNativeViewClassName(l)||"Unknown";const b=getComponentDisplayName(p);const a=getComponentName(i);const o=t.testID||t["data-testid"]||null;const n=t.nativeID||null;const s=t.accessibilityLabel||t.accessible?.label||t["aria-label"]||null;const u=t.accessibilityRole||t.role||null;const f=t.accessibilityHint||null;const I=t.accessibilityState||null;let c=null;if(t.style){try{const m=Array.isArray(t.style)?Object.assign({},...t.style.filter(Boolean)):t.style;c=m}catch(m){c=null}}const T=i?.tag;const g=i?.key;let y=null;let r=i?.return;while(r){if(r.type&&typeof r.type==="function"){y=r.type.displayName||r.type.name||null;if(y)break}r=r.return}const e={viewType:p,displayName:b,componentName:a,parentComponentName:y,testID:o,nativeID:n,accessibilityLabel:s,accessibilityRole:u,accessibilityHint:f,accessibilityState:I,fiberTag:T,fiberKey:g,styleInfo:c,primaryLabel:null,primaryType:null,primaryColor:null};if(o){e.primaryLabel=o;e.primaryType="testID";e.primaryColor=IDENTIFIER_CONFIG.testID.color}else if(s){e.primaryLabel=s;e.primaryType="accessibilityLabel";e.primaryColor=IDENTIFIER_CONFIG.accessibilityLabel.color}else if(a){e.primaryLabel=a;e.primaryType="component";e.primaryColor=IDENTIFIER_CONFIG.component.color}else if(n){e.primaryLabel=n;e.primaryType="nativeID";e.primaryColor=IDENTIFIER_CONFIG.nativeID.color}else{e.primaryLabel=b;e.primaryType="viewType";e.primaryColor=IDENTIFIER_CONFIG.viewType.color}return e}function getShortLabel(i,l=20){if(!i)return"";if(i.length<=l)return i;return i.substring(0,l-1)+"\u2026"}function getLabelPrefix(i){const l=IDENTIFIER_CONFIG[i];return l?l.label+":":""}module.exports={extractComponentInfo,getShortLabel,getLabelPrefix,IDENTIFIER_CONFIG};
@@ -1 +1 @@
1
- "use strict";let addLog=null;try{const n=require("./DebugInfo");addLog=n.addLog}catch(n){}function measureInstance(n){return new Promise(t=>{try{let u=n;if(n.canonical){if(n.canonical.publicInstance){u=n.canonical.publicInstance}else{u=n.canonical}}if(typeof u.getBoundingClientRect==="function"){const e=u.getBoundingClientRect();if(e&&typeof e.x==="number"&&typeof e.y==="number"&&typeof e.width==="number"&&typeof e.height==="number"&&e.width>=0&&e.height>=0){t({x:e.x,y:e.y,width:e.width,height:e.height});return}}if(typeof u.measure==="function"){const e=setTimeout(()=>{t(null)},100);u.measure((c,i,o,r,a,l)=>{clearTimeout(e);if(a!=null&&l!=null&&o!=null&&r!=null&&o>=0&&r>=0){t({x:a,y:l,width:o,height:r})}else{t(null)}});return}t(null)}catch(u){t(null)}})}const{extractComponentInfo}=require("./componentInfo");async function measureInstances(n){const t=await Promise.all(n.map(async({instance:e,fiber:c,depth:i})=>{const o=await measureInstance(e);if(o){const r=extractComponentInfo(c,e);return{...o,depth:i,componentInfo:r}}return null}));const u=t.filter(e=>e!=null);return u}function getMeasurementCapabilities(n){return{hasFabricBoundingRect:typeof n.getBoundingClientRect==="function",hasPaperMeasure:typeof n.measure==="function",hasNode:n.node!=null}}function getMeasurementStats(n){const t={fabric:0,paper:0,none:0};n.forEach(({instance:u})=>{const e=getMeasurementCapabilities(u);if(e.hasFabricBoundingRect){t.fabric++}else if(e.hasPaperMeasure){t.paper++}else{t.none++}});return t}module.exports={measureInstance,measureInstances,getMeasurementCapabilities,getMeasurementStats};
1
+ "use strict";let addLog=null;try{const n=require("./DebugInfo");addLog=n.addLog}catch(n){}function measureInstance(n){return new Promise(t=>{try{let o=n;if(n.canonical){if(n.canonical.publicInstance){o=n.canonical.publicInstance}else{o=n.canonical}}if(typeof o.getBoundingClientRect==="function"){const e=o.getBoundingClientRect();if(e&&typeof e.x==="number"&&typeof e.y==="number"&&typeof e.width==="number"&&typeof e.height==="number"&&e.width>=0&&e.height>=0){t({x:e.x,y:e.y,width:e.width,height:e.height});return}}const u=typeof global!=="undefined"?global.nativeFabricUIManager:void 0;const r=typeof o.measure==="function"?e=>o.measure(e):n.node&&typeof u?.measure==="function"?e=>u.measure(n.node,e):null;if(r){const e=setTimeout(()=>{t(null)},100);r((a,l,c,i,s,f)=>{clearTimeout(e);if(s!=null&&f!=null&&c!=null&&i!=null&&c>=0&&i>=0){t({x:s,y:f,width:c,height:i})}else{t(null)}});return}t(null)}catch(o){t(null)}})}const{extractComponentInfo}=require("./componentInfo");async function measureInstances(n){const t=await Promise.all(n.map(async({instance:u,fiber:r,depth:e})=>{const a=await measureInstance(u);if(a){const l=extractComponentInfo(r,u);return{...a,depth:e,componentInfo:l}}return null}));const o=t.filter(u=>u!=null);return o}function getMeasurementCapabilities(n){return{hasFabricBoundingRect:typeof n.getBoundingClientRect==="function",hasPaperMeasure:typeof n.measure==="function",hasNode:n.node!=null}}function getMeasurementStats(n){const t={fabric:0,paper:0,none:0};n.forEach(({instance:o})=>{const u=getMeasurementCapabilities(o);if(u.hasFabricBoundingRect){t.fabric++}else if(u.hasPaperMeasure){t.paper++}else{t.none++}});return t}module.exports={measureInstance,measureInstances,getMeasurementCapabilities,getMeasurementStats};
package/lib/web/index.mjs CHANGED
@@ -1 +1 @@
1
- "use client";var re=Object.defineProperty;var _e=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var We=Object.prototype.hasOwnProperty;var je=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ie=(e,t)=>()=>(e&&(t=e(e=0)),t);var z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ce=(e,t)=>{for(var n in t)re(e,n,{get:t[n],enumerable:true})},ae=(e,t,n,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ze(t))!We.call(e,a)&&a!==n&&re(e,a,{get:()=>t[a],enumerable:!(p=_e(t,a))||p.enumerable});return e},Ke=(e,t,n)=>(ae(e,t,"default"),n&&ae(n,t,"default"));var Ue=e=>ae(re({},"__esModule",{value:true}),e);var $e,E=ie(()=>{"use strict";$e=(()=>{try{let e=globalThis.Capacitor;if(e&&typeof e.isNativePlatform=="function"&&e.isNativePlatform())return e.DEBUG===true}catch{}return process.env.NODE_ENV!=="production"})();typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis)});import{loadToolModule as qe}from"@buoy-gg/shared-ui/web/utils";var K=z((e,t)=>{"use strict";E();var n="off",p=new Set,a=["off","borders","labels"],f=["off","borders"],v=null,u=false;function l(){if(!u){u=true;try{let c=qe("@buoy-gg/license");c&&typeof c.isPro=="function"&&(v=c.isPro)}catch{v=null}}}function i(){if(l(),v)try{return v()}catch{return false}return false}function o(){return i()?a:f}var s=a;function g(c){return p.add(c),c(n),()=>{p.delete(c)}}function b(){p.forEach(c=>{try{c(n)}catch(y){console.error("[DebugBorders] Error in listener:",y)}})}function d(c){return n===c?true:c==="labels"&&!i()?(console.warn("[DebugBorders] Labels mode requires React Buoy Pro. Upgrade at https://buoy.gg/pro"),false):(n=c,b(),true)}function h(){return n}function w(){let c=o(),y=c.indexOf(n);if(y===-1){d("off");return}let O=(y+1)%c.length;d(c[O])}function C(){d("borders")}function x(){d("off")}function T(){w()}function B(){return n!=="off"}function L(){return n==="labels"&&i()}function G(){return i()}function r(){return o()}function m(c){c?C():x()}t.exports={subscribe:g,enable:C,disable:x,toggle:T,cycle:w,isEnabled:B,showLabels:L,setEnabled:m,getMode:h,setMode:d,isProEnabled:G,getAvailableModes:r,MODE_CYCLE:s}});function Ye(e,t){let n=[],p=e.ownerDocument.createTreeWalker(e,1,{acceptNode(f){return f.matches("[data-buoy-root], [data-buoy-portal-host], [data-debug-overlay], script, style, link, meta, svg, [hidden], .ion-page-hidden")?2:1}}),a=p.nextNode();for(;a;){if(!t.has(a)){let f=e.ownerDocument.defaultView?.getComputedStyle(a),v=a.getBoundingClientRect();if(f?.visibility!=="hidden"&&f?.visibility!=="collapse"&&v.width>0&&v.height>0){let u=0;for(let l=a.parentElement;l&&l!==e;l=l.parentElement)u++;n.push({instance:a,fiber:null,depth:u})}}a=p.nextNode()}return n}var Je=ie(()=>{"use strict";E()});import{getDOMNodeHandle as Xe,isDOMElement as ue}from"@buoy-gg/shared-ui/web/utils";var X=z((e,t)=>{"use strict";E();Je();function n(){if(typeof globalThis>"u")return null;let r=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return r||null}function p(){let r=n();if(!r)return[];if(!r.getFiberRoots)return[];let m=new Set,c=r.renderers?.keys?Array.from(r.renderers.keys()):[1];for(let y of c)try{r.getFiberRoots(y)?.forEach(O=>m.add(O))}catch{}return[...m]}var a={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16,IncompleteClassComponent:17,DehydratedFragment:18,SuspenseListComponent:19,ScopeComponent:21,OffscreenComponent:22,LegacyHiddenComponent:23,CacheComponent:24,TracingMarkerComponent:25},f=new Set(["FloatingTools","FloatingDevTools","FloatingMenu","DialDevTools","DevToolsVisibilityProvider","AppHostProvider","MinimizedToolsProvider","MinimizedToolsStack","GlitchToolButton","DefaultConfigProvider","JsModalComponent","JsModal","ModalHeader","DraggableHeader","DragIndicator","CornerHandle","WindowControls","HighlightUpdatesModal","HighlightUpdatesOverlay","HighlightFilterView","RenderDetailView","RenderListItem","RenderListItemInner","RenderHistoryViewer","RenderCauseBadge","DebugBordersStandaloneOverlay","DebugBordersModal","ImageOverlayModal","ImageOverlayStandalone","StorageBrowser","StorageModal","GameUIStorageBrowser","StorageEventListener","StorageEventFilterView","NetworkMonitor","NetworkModal","NetworkRequestList","NetworkRequestDetail","RouteEventsModal","RouteEventsList","EnvSwitcher","EnvSwitcherModal","TabSelector","SectionHeader","TypePicker","PatternInput","PatternChip","DetectedItemsSection","DetectedCategoryBadge","IdentifierBadge","CategoryBadge","AppRenderer","AppOverlay","ExpandablePopover","Divider","UserStatus","GripVerticalIcon","LogBox","LogBoxLog","LogBoxLogNotification","LogBoxNotificationContainer","_LogBoxNotificationContainer","LogBoxInspector","LogBoxInspectorContainer","LogBoxInspectorHeader","LogBoxInspectorBody","LogBoxInspectorFooter","LogBoxInspectorMessageHeader","LogBoxInspectorStackFrame","LogBoxInspectorSection","LogBoxButton","LogBoxMessage"]),v=["JsModal","HighlightUpdates","RenderList","RenderDetail","DebugBorders","ImageOverlay","Storage","Network","RouteEvents","EnvSwitcher","Floating","Minimized","Expandable","DevTools","GameUI"],u=new Set(["debug-borders-overlay","floating-devtools-root","dial-devtools-root","jsmodal-root","highlight-updates-overlay","image-overlay-standalone","__rn_buoy__highlight-modal","logbox_inspector","logbox"]),l=new Map,i=500;function o(r){let m=Xe(r);return m!==null?m:r?typeof r._nativeTag=="number"?r._nativeTag:typeof r.canonical?._nativeTag=="number"?r.canonical._nativeTag:typeof r.__nativeTag=="number"?r.__nativeTag:null:null}function s(r){if(!r)return false;if(u.has(r))return true;let m=r.charCodeAt(0);return!!(m===95&&(r.startsWith("__highlight_")||r.startsWith("__rn_buoy__"))||m===108&&r.startsWith("logbox"))}function g(r){if(!r)return null;let m=r.type;if(m){if(typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;if(m.displayName)return m.displayName;if(m.name)return m.name}let c=r.elementType;if(c){if(typeof c=="function")return c.displayName||c.name||null;if(c.displayName)return c.displayName;if(c.name)return c.name}return null}function b(r,m){if(ue(m)&&m.closest("[data-buoy-root]"))return true;let c=o(m);if(c!=null){let M=l.get(c);if(M!==void 0)return M}let y=false,O=r.pendingProps?.nativeID||r.memoizedProps?.nativeID;if(s(O))y=true;else{let M=r,k=0;for(;M&&k<30;){let ne=g(M);if(ne){if(f.has(ne)){y=true;break}for(let Ge of v)if(ne.startsWith(Ge)){y=true;break}if(y)break}let Oe=M.pendingProps?.nativeID||M.memoizedProps?.nativeID;if(s(Oe)){y=true;break}M=M.return,k++}}if(y&&c!=null){if(l.size>=i){let M=Array.from(l.keys());for(let k=0;k<i/2;k++)l.delete(M[k])}l.set(c,y)}return y}function d(){l.clear()}function h(r){return r.tag!==a.OffscreenComponent?false:r.memoizedState!==null}function w(r){let m=r.memoizedProps;return m?m.activityState===0:false}function C(r){return ue(r)?r.tagName.toLowerCase():r?r.canonical?.viewConfig?.uiViewClassName?r.canonical.viewConfig.uiViewClassName:r.viewConfig?.uiViewClassName?r.viewConfig.uiViewClassName:null:null}function x(r){let m=C(r);return m?m.startsWith("RNSVG"):false}function T(r,m,c=0,y=new Set){if(r&&!y.has(r)&&(y.add(r),!(c>500))){if(h(r)){r.sibling&&T(r.sibling,m,c,y);return}if(w(r)){r.sibling&&T(r.sibling,m,c,y);return}m(r,c),r.child&&T(r.child,m,c+1,y),r.sibling&&T(r.sibling,m,c,y)}}function B(){let r=p(),m=[];if(r.forEach((c,y)=>{T(c.current,(O,M)=>{if(O.tag===a.HostComponent){let k=O.stateNode;if(b(O,k)||x(k))return;k&&m.push({instance:k,fiber:O,depth:M})}})}),typeof document<"u"&&document.body){let c=new Set(m.map(({instance:y})=>y));m.push(...Ye(document.body,c))}return m}function L(){let r=n();return!(!r||!r.getFiberRoots)}function G(){let r=n();return r?{available:true,hasAgent:!!r.reactDevtoolsAgent,hasFiberRoots:typeof r.getFiberRoots=="function",rendererCount:r.renderers?.size??0,rootCount:p().length,hookKeys:Object.keys(r)}:{available:false,reason:"Hook not found on global object"}}t.exports={getReactDevToolsHook:n,getFiberRoots:p,traverseFiberTree:T,getAllHostComponentInstances:B,isReactDevToolsAvailable:L,getReactDevToolsDiagnostics:G,isHiddenOffscreen:h,isInactiveScreen:w,isSVGComponent:x,getNativeViewClassName:C,isDevToolsComponent:b,isDevToolsNativeID:s,getComponentName:g,clearDevToolsCache:d,FiberTags:a,DEV_TOOLS_COMPONENT_NAMES:f,DEV_TOOLS_NATIVE_IDS:u}});var de={};ce(de,{VIEW_TYPE_MAP:()=>_,default:()=>ye,getAllComponentNames:()=>ge,getAllNativeViewTypes:()=>be,getComponentDisplayName:()=>pe,getNativeViewType:()=>fe,isKnownViewType:()=>me});function pe(e){return _[e]||e}function fe(e){for(let[t,n]of Object.entries(_))if(n===e)return t;return null}function me(e){return e in _}function be(){return Object.keys(_)}function ge(){return[...new Set(Object.values(_))]}var _,ye,Ze=ie(()=>{"use strict";E();_={RCTView:"View",RCTSafeAreaView:"SafeAreaView",RCTModalHostView:"Modal",RCTText:"Text",RCTRawText:"RawText",RCTVirtualText:"VirtualText",RCTTextInlineImage:"TextInlineImage",RCTImageView:"Image",RCTImage:"Image",RCTScrollView:"ScrollView",RCTScrollContentView:"ScrollContentView",AndroidHorizontalScrollView:"HorizontalScrollView",AndroidHorizontalScrollContentView:"HorizontalScrollContentView",RCTSinglelineTextInputView:"TextInput",RCTMultilineTextInputView:"TextInput (Multiline)",AndroidTextInput:"TextInput",RCTInputAccessoryView:"InputAccessoryView",RCTRefreshControl:"RefreshControl",AndroidSwipeRefreshLayout:"RefreshControl",PullToRefreshView:"RefreshControl",RCTSwitch:"Switch",AndroidSwitch:"Switch",RCTSlider:"Slider",RCTActivityIndicatorView:"ActivityIndicator",AndroidProgressBar:"ActivityIndicator",AndroidDrawerLayout:"DrawerLayout",VirtualView:"VirtualView",VirtualViewExperimental:"VirtualView",DebuggingOverlay:"DebuggingOverlay",LayoutConformance:"LayoutConformance",UnimplementedNativeView:"UnimplementedView",RKShimmeringView:"ShimmeringView",RCTTemplateView:"TemplateView",RCTAxialGradientView:"AxialGradientView",RCTMap:"Map",RCTWebView:"WebView",RCTKeyframes:"Keyframes",RCTImpressionTrackingView:"ImpressionTrackingView",RNSVGSvgView:"Svg",RNSVGGroup:"G",RNSVGPath:"Path",RNSVGText:"SvgText",RNSVGTSpan:"TSpan",RNSVGTextPath:"TextPath",RNSVGImage:"SvgImage",RNSVGCircle:"Circle",RNSVGEllipse:"Ellipse",RNSVGLine:"Line",RNSVGRect:"Rect",RNSVGClipPath:"ClipPath",RNSVGDefs:"Defs",RNSVGUse:"Use",RNSVGSymbol:"Symbol",RNSVGPattern:"Pattern",RNSVGMask:"Mask",RNSVGForeignObject:"ForeignObject",RNSVGMarker:"Marker",RNSVGLinearGradient:"LinearGradient",RNSVGRadialGradient:"RadialGradient",RNSVGFilter:"Filter",RNSVGFeBlend:"FeBlend",RNSVGFeColorMatrix:"FeColorMatrix",RNSVGFeComposite:"FeComposite",RNSVGFeFlood:"FeFlood",RNSVGFeGaussianBlur:"FeGaussianBlur",RNSVGFeMerge:"FeMerge",RNSVGFeOffset:"FeOffset",RNSVGPolygon:"Polygon",RNSVGPolyline:"Polyline",RNSVGStop:"Stop",RNGestureHandlerRootView:"GestureHandlerRootView",RNGestureHandlerButton:"GestureHandlerButton",RNCSafeAreaProvider:"SafeAreaProvider",RNCSafeAreaView:"SafeAreaView",RNSScreen:"Screen",RNSScreenContainer:"ScreenContainer",RNSScreenStack:"ScreenStack",RNSScreenStackHeaderConfig:"ScreenStackHeaderConfig",RNSScreenStackHeaderSubview:"ScreenStackHeaderSubview",RNSSearchBar:"SearchBar",RNSFullWindowOverlay:"FullWindowOverlay",RNSModalScreen:"ModalScreen",ReanimatedView:"Animated.View",ExpoView:"ExpoView",ExpoBlurView:"BlurView",ExpoLinearGradient:"LinearGradient",ExpoImage:"ExpoImage",ExpoVideoView:"VideoView",ExpoCamera:"Camera",ExpoBarCodeScannerView:"BarCodeScanner",RNCWebView:"WebView",AIRMap:"MapView",AIRMapMarker:"Marker",AIRMapPolyline:"Polyline",AIRMapPolygon:"Polygon",AIRMapCircle:"Circle",AIRMapCallout:"Callout",RCTVideo:"Video",LottieAnimationView:"LottieView",FastImageView:"FastImage"};ye={VIEW_TYPE_MAP:_,getComponentDisplayName:pe,getNativeViewType:fe,isKnownViewType:me,getAllNativeViewTypes:be,getAllComponentNames:ge}});var he=z((e,t)=>{"use strict";E();var{getComponentDisplayName:n}=(Ze(),Ue(de)),{getNativeViewClassName:p,getComponentName:a}=X(),f={testID:{label:"test",color:"#10b981"},nativeID:{label:"native",color:"#f59e0b"},component:{label:"comp",color:"#a855f7"},accessibilityLabel:{label:"a11y",color:"#ec4899"},viewType:{label:"view",color:"#6b7280"}};function v(i,o){let s=i?.memoizedProps||i?.pendingProps||{testID:o?.getAttribute?.("data-testid"),nativeID:o?.id,accessibilityLabel:o?.getAttribute?.("aria-label"),accessibilityRole:o?.getAttribute?.("role")},g=p(o)||"Unknown",b=n(g),d=a(i),h=s.testID||null,w=s.nativeID||null,C=s.accessibilityLabel||s.accessible?.label||null,x=s.accessibilityRole||s.role||null,T=s.accessibilityHint||null,B=s.accessibilityState||null,L=null;if(s.style)try{L=Array.isArray(s.style)?Object.assign({},...s.style.filter(Boolean)):s.style}catch{L=null}let G=i?.tag,r=i?.key,m=null,c=i?.return;for(;c&&!(c.type&&typeof c.type=="function"&&(m=c.type.displayName||c.type.name||null,m));)c=c.return;let y={viewType:g,displayName:b,componentName:d,parentComponentName:m,testID:h,nativeID:w,accessibilityLabel:C,accessibilityRole:x,accessibilityHint:T,accessibilityState:B,fiberTag:G,fiberKey:r,styleInfo:L,primaryLabel:null,primaryType:null,primaryColor:null};return h?(y.primaryLabel=h,y.primaryType="testID",y.primaryColor=f.testID.color):C?(y.primaryLabel=C,y.primaryType="accessibilityLabel",y.primaryColor=f.accessibilityLabel.color):d?(y.primaryLabel=d,y.primaryType="component",y.primaryColor=f.component.color):w?(y.primaryLabel=w,y.primaryType="nativeID",y.primaryColor=f.nativeID.color):(y.primaryLabel=b,y.primaryType="viewType",y.primaryColor=f.viewType.color),y}function u(i,o=20){return i?i.length<=o?i:i.substring(0,o-1)+"\u2026":""}function l(i){let o=f[i];return o?o.label+":":""}t.exports={extractComponentInfo:v,getShortLabel:u,getLabelPrefix:l,IDENTIFIER_CONFIG:f}});var ve=z((e,t)=>{"use strict";E();var n=null;try{n=je("./DebugInfo").addLog}catch{}function p(l){return new Promise(i=>{try{let o=l;if(l.canonical&&(l.canonical.publicInstance?o=l.canonical.publicInstance:o=l.canonical),typeof o.getBoundingClientRect=="function"){let s=o.getBoundingClientRect();if(s&&typeof s.x=="number"&&typeof s.y=="number"&&typeof s.width=="number"&&typeof s.height=="number"&&s.width>=0&&s.height>=0){i({x:s.x,y:s.y,width:s.width,height:s.height});return}}if(typeof o.measure=="function"){let s=setTimeout(()=>{i(null)},100);o.measure((g,b,d,h,w,C)=>{clearTimeout(s),w!=null&&C!=null&&d!=null&&h!=null&&d>=0&&h>=0?i({x:w,y:C,width:d,height:h}):i(null)});return}i(null)}catch{i(null)}})}var{extractComponentInfo:a}=he();async function f(l){return(await Promise.all(l.map(async({instance:i,fiber:o,depth:s})=>{let g=await p(i);if(g){let b=a(o,i);return{...g,depth:s,componentInfo:b}}return null}))).filter(i=>i!=null)}function v(l){return{hasFabricBoundingRect:typeof l.getBoundingClientRect=="function",hasPaperMeasure:typeof l.measure=="function",hasNode:l.node!=null}}function u(l){let i={fabric:0,paper:0,none:0};return l.forEach(({instance:o})=>{let s=v(o);s.hasFabricBoundingRect?i.fabric++:s.hasPaperMeasure?i.paper++:i.none++}),i}t.exports={measureInstance:p,measureInstances:f,getMeasurementCapabilities:v,getMeasurementStats:u}});var Se=z((e,t)=>{"use strict";E();function n(o,s,g){let b=o/360,d=s/100,h=g/100,w,C,x;if(d===0)w=C=x=h;else{let B=(r,m,c)=>(c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?r+(m-r)*6*c:c<.5?m:c<.6666666666666666?r+(m-r)*(.6666666666666666-c)*6:r),L=h<.5?h*(1+d):h+d-h*d,G=2*h-L;w=B(G,L,b+1/3),C=B(G,L,b),x=B(G,L,b-1/3)}let T=B=>{let L=Math.round(B*255).toString(16);return L.length===1?"0"+L:L};return`#${T(w)}${T(C)}${T(x)}`}function p(o){let s=(0+o*137.508)%360;return n(s,70,50)}function a(){let o=Math.random()*360;return n(o,70,50)}function f(o){let s=[];for(let g=0;g<o;g++)s.push(p(g));return s}var v=["#FF5733","#33FF57","#3357FF","#FF33F5","#F5FF33","#33FFF5","#FF8333","#8333FF","#33FF83","#FF3383"];function u(o){return v[o%v.length]}function l(o,s=1){let g=parseInt(o.slice(1,3),16),b=parseInt(o.slice(3,5),16),d=parseInt(o.slice(5,7),16);return`rgba(${g}, ${b}, ${d}, ${s})`}function i(o){let s=parseInt(o.slice(1,3),16),g=parseInt(o.slice(3,5),16),b=parseInt(o.slice(5,7),16);return 255<<24|s<<16|g<<8|b}t.exports={getColorForDepth:p,getRandomColor:a,generateColorPalette:f,getColorFromPalette:u,hslToHex:n,hexToRgba:l,hexToProcessColor:i,PREDEFINED_PALETTE:v}});var Qe=z((e,t)=>{"use strict";E();var n={LABEL_SPACING:0,MAX_VERTICAL_OFFSET:100,LABEL_HEIGHT:10,PADDING:0};function p(u,l){let i=n.PADDING,o=u.x-i,s=u.x+u.width+i,g=u.y-i,b=u.y+u.height+i,d=l.x-i,h=l.x+l.width+i,w=l.y-i,C=l.y+l.height+i;return!(s<d||o>h||b<w||g>C)}function a(u){return u?u.length*5+8:0}function f(u){if(!u||u.length===0)return u;let l=u.filter(g=>{let b=g.componentInfo;return b&&(b.testID||b.accessibilityLabel)}),i=u.map((g,b)=>{let d=g.componentInfo,h=d&&(d.testID||d.accessibilityLabel),w=h?d.primaryLabel:"",C=a(w);return{index:b,hasValidLabel:h,x:g.x,y:g.y-n.LABEL_HEIGHT,width:C,height:n.LABEL_HEIGHT,offsetY:0}}),o=i.map((g,b)=>b).filter(g=>i[g].hasValidLabel).sort((g,b)=>{let d=u[g],h=u[b];return Math.abs(d.y-h.y)>10?d.y-h.y:d.x-h.x}),s=[];for(let g of o){let b=i[g];if(b.width===0)continue;let d=0,h=true,w=0,C=Math.ceil(n.MAX_VERTICAL_OFFSET/n.LABEL_HEIGHT);for(;h&&w<C;){let x={x:b.x,y:b.y-d,width:b.width,height:b.height};h=s.some(T=>p(x,T)),h&&(d+=n.LABEL_HEIGHT,w++)}b.offsetY=d,s.push({x:b.x,y:b.y-d,width:b.width,height:b.height})}return u.map((g,b)=>({...g,labelOffsetY:i[b].offsetY}))}function v(u){if(!u||u.length<2)return false;for(let l=0;l<Math.min(u.length,20);l++)for(let i=l+1;i<Math.min(u.length,20);i++){let o=u[l],s=u[i];if(Math.abs(o.y-s.y)<n.LABEL_HEIGHT*2&&!(o.x+100<s.x||s.x+100<o.x))return true}return false}t.exports={resolveOverlappingLabels:f,rectsOverlap:p,estimateLabelWidth:a,mightHaveOverlaps:v,CONFIG:n}});E();E();import{useState as we,useEffect as Ce}from"react";import{Layers as xe}from"@buoy-gg/shared-ui/web";E();import Te,{useEffect as Ie,useState as Z,useCallback as Re}from"react";var Ve={};ce(Ve,{AccessibilityInfo:()=>nt,ActivityIndicator:()=>io,Alert:()=>so,Animated:()=>rt,AppRegistry:()=>at,AppState:()=>lt,Appearance:()=>it,BackHandler:()=>st,Button:()=>ao,CheckBox:()=>Tt,Clipboard:()=>ct,DeviceEventEmitter:()=>Gt,Dimensions:()=>ut,Easing:()=>dt,FlatList:()=>It,I18nManager:()=>pt,Image:()=>Rt,ImageBackground:()=>Vt,InteractionManager:()=>mt,Keyboard:()=>ft,KeyboardAvoidingView:()=>Et,LayoutAnimation:()=>bt,Linking:()=>gt,LogBox:()=>Ot,Modal:()=>no,NativeEventEmitter:()=>yt,NativeModules:()=>ot,PanResponder:()=>ht,Picker:()=>Nt,PixelRatio:()=>vt,Platform:()=>St,Pressable:()=>to,ProgressBar:()=>Lt,RefreshControl:()=>Dt,SafeAreaView:()=>Bt,ScrollView:()=>oo,SectionList:()=>Mt,Share:()=>wt,StatusBar:()=>At,StyleSheet:()=>U,Switch:()=>ro,Text:()=>I,TextInput:()=>Zt,Touchable:()=>Ft,TouchableHighlight:()=>Qt,TouchableNativeFeedback:()=>Pt,TouchableOpacity:()=>Q,TouchableWithoutFeedback:()=>eo,UIManager:()=>Ct,Vibration:()=>xt,View:()=>F,VirtualizedList:()=>kt,YellowBox:()=>Ht,findNodeHandle:()=>lo,unstable_createElement:()=>tt,useColorScheme:()=>_t,useLocaleContext:()=>zt,useWindowDimensions:()=>Wt});E();Ke(Ve,et);import*as et from"react-native-web";import{unstable_createElement as tt,NativeModules as ot,AccessibilityInfo as nt,Animated as rt,Appearance as it,AppRegistry as at,AppState as lt,BackHandler as st,Clipboard as ct,Dimensions as ut,Easing as dt,I18nManager as pt,Keyboard as ft,InteractionManager as mt,LayoutAnimation as bt,Linking as gt,NativeEventEmitter as yt,PanResponder as ht,PixelRatio as vt,Platform as St,Share as wt,StyleSheet as U,UIManager as Ct,Vibration as xt,CheckBox as Tt,FlatList as It,Image as Rt,ImageBackground as Vt,KeyboardAvoidingView as Et,Picker as Nt,ProgressBar as Lt,RefreshControl as Dt,SafeAreaView as Bt,SectionList as Mt,StatusBar as At,Touchable as Ft,TouchableNativeFeedback as Pt,VirtualizedList as kt,YellowBox as Ht,LogBox as Ot,DeviceEventEmitter as Gt,useColorScheme as _t,useLocaleContext as zt,useWindowDimensions as Wt}from"react-native-web";import*as A from"react-native-web";import{createElement as le,forwardRef as Ee,useCallback as jt,useRef as Kt}from"react";E();import{useEffect as Ut,useState as $t}from"react";import{createPortal as qt}from"react-dom";E();var Yt='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';import{jsx as Jt}from"react/jsx-runtime";var $=Symbol.for("@buoy-gg/portal-host"),Ne=e=>{if(!(e instanceof Element))return false;if(e.closest("input, textarea, select"))return true;let t=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return t===""||t==="true"||t==="plaintext-only"};function Le(){let e=document;if(e[$])return e[$].host;let t=document.createElement("div");t.dataset.buoyPortalHost="",Object.assign(t.style,{position:"fixed",inset:"0",zIndex:"2147483647",pointerEvents:"none",fontFamily:Yt});let n=()=>{let o=document.fullscreenElement,s=o&&o.tagName!=="CANVAS"?o:document.body;t.parentElement!==s&&s.appendChild(t)},p=new Map,a=o=>{(!t.contains(o.target)||!Ne(o.target))&&p.set(o.code||o.key,{key:o.key,code:o.code,location:o.location,keyCode:o.keyCode,which:o.which,altKey:o.altKey,ctrlKey:o.ctrlKey,metaKey:o.metaKey,shiftKey:o.shiftKey})},f=o=>{p.delete(o.code||o.key)},v=()=>p.clear(),u=()=>{let o=[...p.values()];p.clear();for(let s of o)document.dispatchEvent(new KeyboardEvent("keyup",{...s,bubbles:true}))},l=o=>{Ne(o.target)&&o.stopPropagation()},i=o=>o.stopPropagation();return n(),document.addEventListener("fullscreenchange",n),document.addEventListener("keydown",a,true),document.addEventListener("keyup",f,true),window.addEventListener("blur",v),t.addEventListener("focusin",u),t.addEventListener("keydown",l),t.addEventListener("keyup",l),t.addEventListener("keypress",l),t.addEventListener("wheel",i,{passive:true}),e[$]={host:t,users:0,dispose:()=>{document.removeEventListener("fullscreenchange",n),document.removeEventListener("keydown",a,true),document.removeEventListener("keyup",f,true),window.removeEventListener("blur",v),t.remove(),delete e[$]}},t}function Xt({children:e}){let[t,n]=$t(null);return Ut(()=>{let p=Le(),a=document[$];return a.users++,n(p),()=>{--a.users===0&&a.dispose()}},[]),t?qt(Jt("div",{"data-buoy-root":"",style:{display:"contents",pointerEvents:"auto"},children:e}),t):null}function P(e){let t=Ee((p,a)=>{let{accessibilityState:f,accessibilityValue:v,...u}=p;for(let l of["busy","checked","disabled","expanded","selected"])f?.[l]!==void 0&&u[`aria-${l}`]===void 0&&(u[`aria-${l}`]=f[l]);for(let[l,i]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))v?.[l]!==void 0&&u[`aria-${i}`]===void 0&&(u[`aria-${i}`]=v[l]);return le(e,{...u,ref:a})}),n=e.State;return n&&Object.assign(t,{State:n}),t.displayName=e.displayName??e.name??"NativeWebView",t}var F=P(A.View),I=P(A.Text),Zt=P(A.TextInput),Q=P(A.TouchableOpacity),Qt=P(A.TouchableHighlight),eo=P(A.TouchableWithoutFeedback),to=P(A.Pressable),oo=P(A.ScrollView),De=Ee((e,t)=>{let n=Kt(null),p=jt(a=>{if(a){let f=a;for(;f.parentElement&&f.parentElement!==document.body;)f=f.parentElement;f.parentElement===document.body&&(n.current=f,Object.assign(f.style,{position:"relative",zIndex:"2147483647",pointerEvents:"auto"}),Le().appendChild(f))}else n.current&&(document.body.appendChild(n.current),n.current=null);typeof t=="function"?t(a):t&&(t.current=a)},[t]);return le(Xt,null,le(A.Modal,{...e,ref:p}))});De.displayName="Modal";var no=P(De),ro=P(A.Switch),io=P(A.ActivityIndicator),ao=P(A.Button),lo=A.findNodeHandle,so={alert(e,t,n,p){if(typeof document>"u")return;let a=document.createElement("dialog");a.dataset.buoyRoot="",a.setAttribute("aria-label",e),a.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let f=document.createElement("h2");if(f.textContent=e,f.style.cssText="font-size:18px;margin:0 0 12px",a.appendChild(f),t){let i=document.createElement("p");i.textContent=t,i.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",a.appendChild(i)}let v=document.createElement("div");v.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let u=n?.length?n:[{text:"OK"}],l=()=>{a.close?.(),a.remove()};for(let i of u){let o=document.createElement("button");o.type="button",o.textContent=i.text??"OK",o.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${i.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,o.onclick=()=>{l(),i.onPress?.()},v.appendChild(o)}a.addEventListener("cancel",i=>{i.preventDefault(),p?.cancelable!==false&&(l(),p?.onDismiss?.())}),a.appendChild(v),document.body.appendChild(a),a.showModal?a.showModal():a.setAttribute("open","")}};import{monoFont as q}from"@buoy-gg/shared-ui/web";import{JsModal as Be,devToolsStorageKeys as co}from"@buoy-gg/shared-ui/web";import{DataViewer as ee}from"@buoy-gg/shared-ui/web/dataViewer";import{loadToolModule as uo}from"@buoy-gg/shared-ui/web/utils";import{Fragment as Me,jsx as S,jsxs as W}from"react/jsx-runtime";var po=co.debugBorders.infoModal(),fo=K(),{getAllHostComponentInstances:mo}=X(),{measureInstances:bo}=ve(),{getColorForDepth:go}=Se(),{getShortLabel:Jo}=he(),{resolveOverlappingLabels:yo}=Qe(),Y;function ho(){if(Y!==void 0)return Y;try{Y=uo("@buoy-gg/core").useDevToolsVisibility??null}catch{Y=null}return Y??null}function N({label:e,value:t,color:n}){if(t==null)return null;let p;if(typeof t=="object")try{p=JSON.stringify(t,null,2)}catch{p=String(t)}else p=String(t);return W(F,{style:H.row,children:[S(I,{style:H.label,children:e}),S(I,{style:[H.value,n?{color:n}:null],children:p})]})}function vo({title:e}){return S(F,{style:Ae.container,children:S(I,{style:Ae.title,numberOfLines:1,children:e})})}function So({info:e,rect:t}){return W(F,{style:H.content,children:[S(I,{style:H.sectionTitle,children:"Identifiers"}),S(N,{label:"testID",value:e.testID,color:"#10b981"}),S(N,{label:"accessibilityLabel",value:e.accessibilityLabel,color:"#ec4899"}),S(N,{label:"nativeID",value:e.nativeID,color:"#f59e0b"}),S(N,{label:"key",value:e.fiberKey}),S(I,{style:H.sectionTitle,children:"Component"}),S(N,{label:"Component Name",value:e.componentName,color:"#a855f7"}),S(N,{label:"Parent Component",value:e.parentComponentName}),S(N,{label:"Display Name",value:e.displayName}),S(N,{label:"Native View Type",value:e.viewType}),S(N,{label:"Fiber Tag",value:e.fiberTag}),S(I,{style:H.sectionTitle,children:"Position & Size"}),S(N,{label:"X",value:Math.round(t.x)}),S(N,{label:"Y",value:Math.round(t.y)}),S(N,{label:"Width",value:Math.round(t.width)}),S(N,{label:"Height",value:Math.round(t.height)}),S(N,{label:"Depth",value:t.depth}),(e.accessibilityRole||e.accessibilityHint||e.accessibilityState)&&W(Me,{children:[S(I,{style:H.sectionTitle,children:"Accessibility"}),S(N,{label:"Role",value:e.accessibilityRole}),S(N,{label:"Hint",value:e.accessibilityHint}),e.accessibilityState&&ee?S(ee,{title:"",data:e.accessibilityState,showTypeFilter:true,rawMode:true,initialExpanded:true}):S(N,{label:"State",value:e.accessibilityState})]}),e.styleInfo&&W(Me,{children:[S(I,{style:H.sectionTitle,children:"Styles"}),ee?S(ee,{title:"",data:e.styleInfo,showTypeFilter:true,rawMode:true,initialExpanded:true}):S(F,{style:H.codeBlock,children:S(I,{style:H.codeText,children:JSON.stringify(e.styleInfo,null,2)})})]})]})}function wo(){let[e,t]=Z("off"),[n,p]=Z([]),[a,f]=Z(null),[v,u]=Z(false),l=Te.useRef(false),i=ho()?.()?.isDevToolsActive??false,o=Re(d=>{f(d),u(true)},[]),s=Re(()=>{u(false),f(null)},[]),g=e!=="off"&&!i,b=e==="labels"&&!i;return Ie(()=>fo.subscribe(d=>{t(d)}),[]),Ie(()=>{if(!g){p([]);return}let d=true,h,w=async()=>{if(!(!d||l.current)){l.current=true;try{let x=mo();if(x.length===0){l.current=false;return}let T=await bo(x);if(d){let B=b?yo(T):T;p(B)}}catch(x){console.error("[Buoy]","[DebugBorders] Error updating measurements:",x)}finally{l.current=false}}},C=setTimeout(()=>{w()},500);return h=setInterval(w,2e3),()=>{d=false,clearTimeout(C),clearInterval(h),l.current=false}},[g,b,n.length]),g?W(F,{style:te.overlay,pointerEvents:"box-none",dataSet:{debugOverlay:"true"},nativeID:"debug-borders-overlay",children:[n.map((d,h)=>{let w=d.componentInfo,C=w&&(w.testID||w.accessibilityLabel);if(b&&!C)return null;let x=b&&w?w.primaryColor:go(d.depth);return W(Te.Fragment,{children:[S(F,{pointerEvents:"none",style:[te.border,{left:d.x,top:d.y,width:d.width,height:d.height,borderColor:x}]}),b&&C&&S(Q,{activeOpacity:.7,onPress:()=>o(d),style:[te.labelContainer,{left:d.x,top:d.y-10-(d.labelOffsetY||0),backgroundColor:w.primaryColor}],children:S(I,{style:te.labelText,numberOfLines:1,children:w.primaryLabel})})]},`border-${h}`)}),Be&&a?.componentInfo&&S(Be,{visible:v,onClose:s,initialMode:"bottomSheet",header:{customContent:S(vo,{title:a.componentInfo.primaryLabel})},persistenceKey:po,enablePersistence:false,children:S(So,{info:a.componentInfo,rect:a})})]}):null}var te=U.create({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:9e3,elevation:9e3},border:{position:"absolute",borderWidth:1,borderStyle:"solid"},labelContainer:{position:"absolute",paddingHorizontal:4,paddingVertical:1,borderRadius:2},labelText:{fontSize:8,fontWeight:"700",fontFamily:q,color:"#ffffff"}}),Ae=U.create({container:{paddingHorizontal:16,paddingVertical:8,alignItems:"center"},title:{fontSize:16,fontWeight:"600",color:"#ffffff",fontFamily:q}}),H=U.create({content:{padding:16},sectionTitle:{fontSize:12,fontWeight:"700",color:"#6b7280",marginTop:16,marginBottom:8,textTransform:"uppercase",letterSpacing:1},row:{flexDirection:"row",paddingVertical:8,borderBottomWidth:1,borderBottomColor:"rgba(255, 255, 255, 0.1)"},label:{fontSize:13,color:"#9ca3af",width:140,fontFamily:q},value:{fontSize:13,color:"#ffffff",flex:1,fontFamily:q},codeBlock:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:12,borderRadius:8,marginTop:4},codeText:{fontSize:11,color:"#e5e7eb",fontFamily:q}});import{jsx as Fe}from"react/jsx-runtime";var j=K(),Co={off:"#6b7280",borders:"#10b981",labels:"#06b6d4"};function xo({size:e}){let[t,n]=we(()=>j.getMode());return Ce(()=>j.subscribe(p=>{n(p)}),[]),Fe(xe,{size:e,color:Co[t]})}function Pe(){return null}var To={id:"debug-borders",name:"BORDERS",description:"Visual layout debugger - tap to cycle modes",slot:"row",icon:xo,component:Pe,props:{},launchMode:"toggle-only",onPress:()=>{j.cycle()}};function Io(e){let t={off:e?.offColor||"#6b7280",borders:e?.bordersColor||"#10b981",labels:e?.labelsColor||"#06b6d4"},n=({size:p})=>{let[a,f]=we(()=>j.getMode());return Ce(()=>j.subscribe(v=>{f(v)}),[]),Fe(xe,{size:p,color:t[a]})};return{id:e?.id||"debug-borders",name:e?.name||"BORDERS",description:e?.description||"Visual layout debugger - tap to cycle modes",slot:"row",icon:n,component:Pe,props:{},launchMode:"toggle-only",onPress:()=>{j.cycle()}}}E();var oe=K(),Ro={version:1,getSnapshot:()=>({mode:oe.getMode()}),subscribe:e=>oe.subscribe(e),actions:{cycleMode:()=>{oe.cycle()},setMode:e=>{oe.setMode(e.mode)}}};E();E();import{useEffect as ke,useState as He}from"react";import{night as R,Layers as Vo,StatusBadge as Eo,StatusIndicator as No}from"@buoy-gg/shared-ui/web";import{jsx as D,jsxs as J}from"react/jsx-runtime";var se=K();function Lo({visible:e,onClose:t}){let[n,p]=He(false),[a,f]=He(0);ke(()=>{let u=se.subscribe(p);return p(se.isEnabled()),u},[]),ke(()=>{if(!n){f(0);return}let u=()=>{try{let{getAllHostComponentInstances:i}=X(),o=i();f(o.length)}catch(i){console.error("[Buoy]","[DebugBorders] Error getting component count:",i)}};setTimeout(u,600);let l=setInterval(u,2e3);return()=>clearInterval(l)},[n]);let v=()=>{se.toggle()};return e?D(F,{style:V.container,children:J(F,{style:V.content,children:[D(I,{style:V.title,children:"Debug Borders"}),D(I,{style:V.description,children:"Visualize component layout structure with colored borders"}),J(F,{style:V.statusRow,children:[D(I,{style:V.statusLabel,children:"Status:"}),D(Eo,{status:n?"active":"inactive"})]}),n&&a>0&&J(F,{style:V.statsRow,children:[D(I,{style:V.statsLabel,children:"Components Tracked:"}),D(I,{style:V.statsValue,children:a})]}),D(F,{style:V.toggleContainer,children:J(Q,{style:[V.button,n&&V.buttonActive],onPress:v,accessibilityRole:"button",accessibilityLabel:`Debug borders ${n?"enabled":"disabled"}`,accessibilityHint:"Tap to toggle debug borders",children:[D(Vo,{size:40,color:n?R.color.accent:R.color.textSecondary}),D(I,{style:[V.buttonText,n&&V.buttonTextActive],children:n?"Disable Borders":"Enable Borders"})]})}),J(F,{style:V.infoBox,children:[D(No,{status:n?"success":"info",size:"small"}),D(I,{style:V.infoText,children:n?"Borders update every 2 seconds. Tap button to disable.":"Tap button to show colored borders around all components."})]}),D(Q,{style:V.closeButton,onPress:t,children:D(I,{style:V.closeButtonText,children:"Close"})})]})}):null}var V=U.create({container:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.5)"},content:{backgroundColor:R.color.surface,borderWidth:1,borderColor:R.color.border,borderRadius:16,padding:32,width:"85%",maxWidth:420,alignItems:"center"},title:{fontSize:24,fontWeight:"700",color:R.color.text,marginBottom:8},description:{fontSize:14,color:R.color.textSecondary,textAlign:"center",marginBottom:24},statusRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statusLabel:{fontSize:14,color:R.color.textSecondary,fontWeight:"600"},statsRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statsLabel:{fontSize:14,color:R.color.textSecondary,fontWeight:"600"},statsValue:{fontSize:16,color:R.color.text,fontWeight:"700"},toggleContainer:{alignItems:"center",justifyContent:"center",marginBottom:24},button:{alignItems:"center",justifyContent:"center",padding:24,borderRadius:16,backgroundColor:R.color.surfaceElevated,borderWidth:2,borderColor:R.color.border,minWidth:200},buttonActive:{borderColor:R.color.accentBorderStrong,backgroundColor:R.color.accentSoft},buttonText:{marginTop:12,fontSize:16,fontWeight:"600",color:R.color.textSecondary},buttonTextActive:{color:R.color.accent},infoBox:{flexDirection:"row",alignItems:"flex-start",backgroundColor:R.color.surfaceElevated,padding:12,borderRadius:8,marginBottom:24,gap:8},infoText:{flex:1,fontSize:12,color:R.color.textSecondary,lineHeight:16},closeButton:{paddingVertical:12,paddingHorizontal:32,backgroundColor:R.color.accent,borderRadius:8},closeButtonText:{color:R.color.onAccent,fontSize:16,fontWeight:"600"}});var Do=K(),Bo=X(),Mo=ve(),Ao=Se();export{Do as DebugBordersManager,Lo as DebugBordersModal,wo as DebugBordersStandaloneOverlay,Ao as colorGeneration,Mo as componentMeasurement,Io as createDebugBordersTool,Ro as debugBordersSyncAdapter,To as debugBordersToolPreset,Bo as fiberTreeTraversal};
1
+ "use client";var re=Object.defineProperty;var _e=Object.getOwnPropertyDescriptor;var ze=Object.getOwnPropertyNames;var We=Object.prototype.hasOwnProperty;var je=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ae=(e,t)=>()=>(e&&(t=e(e=0)),t);var z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ce=(e,t)=>{for(var n in t)re(e,n,{get:t[n],enumerable:true})},ie=(e,t,n,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of ze(t))!We.call(e,l)&&l!==n&&re(e,l,{get:()=>t[l],enumerable:!(p=_e(t,l))||p.enumerable});return e},Ke=(e,t,n)=>(ie(e,t,"default"),n&&ie(n,t,"default"));var Ue=e=>ie(re({},"__esModule",{value:true}),e);var $e,E=ae(()=>{"use strict";$e=(()=>{try{let e=globalThis.Capacitor;if(e&&typeof e.isNativePlatform=="function"&&e.isNativePlatform())return e.DEBUG===true}catch{}return process.env.NODE_ENV!=="production"})();typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis)});import{loadToolModule as qe}from"@buoy-gg/shared-ui/web/utils";var K=z((e,t)=>{"use strict";E();var n="off",p=new Set,l=["off","borders","labels"],m=["off","borders"],h=null,u=false;function i(){if(!u){u=true;try{let c=qe("@buoy-gg/license");c&&typeof c.isPro=="function"&&(h=c.isPro)}catch{h=null}}}function a(){if(i(),h)try{return h()}catch{return false}return false}function o(){return a()?l:m}var d=l;function g(c){return p.add(c),c(n),()=>{p.delete(c)}}function s(){p.forEach(c=>{try{c(n)}catch(y){console.error("[DebugBorders] Error in listener:",y)}})}function f(c){return n===c?true:c==="labels"&&!a()?(console.warn("[DebugBorders] Labels mode requires React Buoy Pro. Upgrade at https://buoy.gg/pro"),false):(n=c,s(),true)}function w(){return n}function S(){let c=o(),y=c.indexOf(n);if(y===-1){f("off");return}let O=(y+1)%c.length;f(c[O])}function C(){f("borders")}function x(){f("off")}function T(){S()}function B(){return n!=="off"}function L(){return n==="labels"&&a()}function G(){return a()}function r(){return o()}function b(c){c?C():x()}t.exports={subscribe:g,enable:C,disable:x,toggle:T,cycle:S,isEnabled:B,showLabels:L,setEnabled:b,getMode:w,setMode:f,isProEnabled:G,getAvailableModes:r,MODE_CYCLE:d}});function Ye(e,t){let n=[],p=e.ownerDocument.createTreeWalker(e,1,{acceptNode(m){return m.matches("[data-buoy-root], [data-buoy-portal-host], [data-debug-overlay], script, style, link, meta, svg, [hidden], .ion-page-hidden")?2:1}}),l=p.nextNode();for(;l;){if(!t.has(l)){let m=e.ownerDocument.defaultView?.getComputedStyle(l),h=l.getBoundingClientRect();if(m?.visibility!=="hidden"&&m?.visibility!=="collapse"&&h.width>0&&h.height>0){let u=0;for(let i=l.parentElement;i&&i!==e;i=i.parentElement)u++;n.push({instance:l,fiber:null,depth:u})}}l=p.nextNode()}return n}var Je=ae(()=>{"use strict";E()});import{getDOMNodeHandle as Xe,isDOMElement as ue}from"@buoy-gg/shared-ui/web/utils";var X=z((e,t)=>{"use strict";E();Je();function n(){if(typeof globalThis>"u")return null;let r=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return r||null}function p(){let r=n();if(!r)return[];if(!r.getFiberRoots)return[];let b=new Set,c=r.renderers?.keys?Array.from(r.renderers.keys()):[1];for(let y of c)try{r.getFiberRoots(y)?.forEach(O=>b.add(O))}catch{}return[...b]}var l={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16,IncompleteClassComponent:17,DehydratedFragment:18,SuspenseListComponent:19,ScopeComponent:21,OffscreenComponent:22,LegacyHiddenComponent:23,CacheComponent:24,TracingMarkerComponent:25},m=new Set(["FloatingTools","FloatingDevTools","FloatingMenu","DialDevTools","DevToolsVisibilityProvider","AppHostProvider","MinimizedToolsProvider","MinimizedToolsStack","GlitchToolButton","DefaultConfigProvider","JsModalComponent","JsModal","ModalHeader","DraggableHeader","DragIndicator","CornerHandle","WindowControls","HighlightUpdatesModal","HighlightUpdatesOverlay","HighlightFilterView","RenderDetailView","RenderListItem","RenderListItemInner","RenderHistoryViewer","RenderCauseBadge","DebugBordersStandaloneOverlay","DebugBordersModal","ImageOverlayModal","ImageOverlayStandalone","StorageBrowser","StorageModal","GameUIStorageBrowser","StorageEventListener","StorageEventFilterView","NetworkMonitor","NetworkModal","NetworkRequestList","NetworkRequestDetail","RouteEventsModal","RouteEventsList","EnvSwitcher","EnvSwitcherModal","TabSelector","SectionHeader","TypePicker","PatternInput","PatternChip","DetectedItemsSection","DetectedCategoryBadge","IdentifierBadge","CategoryBadge","AppRenderer","AppOverlay","ExpandablePopover","Divider","UserStatus","GripVerticalIcon","LogBox","LogBoxLog","LogBoxLogNotification","LogBoxNotificationContainer","_LogBoxNotificationContainer","LogBoxInspector","LogBoxInspectorContainer","LogBoxInspectorHeader","LogBoxInspectorBody","LogBoxInspectorFooter","LogBoxInspectorMessageHeader","LogBoxInspectorStackFrame","LogBoxInspectorSection","LogBoxButton","LogBoxMessage"]),h=["JsModal","HighlightUpdates","RenderList","RenderDetail","DebugBorders","ImageOverlay","Storage","Network","RouteEvents","EnvSwitcher","Floating","Minimized","Expandable","DevTools","GameUI"],u=new Set(["debug-borders-overlay","floating-devtools-root","dial-devtools-root","jsmodal-root","highlight-updates-overlay","image-overlay-standalone","__rn_buoy__highlight-modal","logbox_inspector","logbox"]),i=new Map,a=500;function o(r){let b=Xe(r);return b!==null?b:r?typeof r._nativeTag=="number"?r._nativeTag:typeof r.canonical?._nativeTag=="number"?r.canonical._nativeTag:typeof r.__nativeTag=="number"?r.__nativeTag:null:null}function d(r){if(!r)return false;if(u.has(r))return true;let b=r.charCodeAt(0);return!!(b===95&&(r.startsWith("__highlight_")||r.startsWith("__rn_buoy__"))||b===108&&r.startsWith("logbox"))}function g(r){if(!r)return null;let b=r.type;if(b){if(typeof b=="function")return b.displayName||b.name||null;if(typeof b=="string")return b;if(b.displayName)return b.displayName;if(b.name)return b.name}let c=r.elementType;if(c){if(typeof c=="function")return c.displayName||c.name||null;if(c.displayName)return c.displayName;if(c.name)return c.name}return null}function s(r,b){if(ue(b)&&b.closest("[data-buoy-root]"))return true;let c=o(b);if(c!=null){let M=i.get(c);if(M!==void 0)return M}let y=false,O=r.pendingProps?.nativeID||r.memoizedProps?.nativeID;if(d(O))y=true;else{let M=r,k=0;for(;M&&k<30;){let ne=g(M);if(ne){if(m.has(ne)){y=true;break}for(let Ge of h)if(ne.startsWith(Ge)){y=true;break}if(y)break}let Oe=M.pendingProps?.nativeID||M.memoizedProps?.nativeID;if(d(Oe)){y=true;break}M=M.return,k++}}if(y&&c!=null){if(i.size>=a){let M=Array.from(i.keys());for(let k=0;k<a/2;k++)i.delete(M[k])}i.set(c,y)}return y}function f(){i.clear()}function w(r){return r.tag!==l.OffscreenComponent?false:r.memoizedState!==null}function S(r){let b=r.memoizedProps;return b?b.activityState===0:false}function C(r){return ue(r)?r.tagName.toLowerCase():r?r.canonical?.viewConfig?.uiViewClassName?r.canonical.viewConfig.uiViewClassName:r.viewConfig?.uiViewClassName?r.viewConfig.uiViewClassName:null:null}function x(r){let b=C(r);return b?b.startsWith("RNSVG"):false}function T(r,b,c=0,y=new Set){if(r&&!y.has(r)&&(y.add(r),!(c>500))){if(w(r)){r.sibling&&T(r.sibling,b,c,y);return}if(S(r)){r.sibling&&T(r.sibling,b,c,y);return}b(r,c),r.child&&T(r.child,b,c+1,y),r.sibling&&T(r.sibling,b,c,y)}}function B(){let r=p(),b=[];if(r.forEach((c,y)=>{T(c.current,(O,M)=>{if(O.tag===l.HostComponent){let k=O.stateNode;if(s(O,k)||x(k))return;k&&b.push({instance:k,fiber:O,depth:M})}})}),typeof document<"u"&&document.body){let c=new Set(b.map(({instance:y})=>y));b.push(...Ye(document.body,c))}return b}function L(){let r=n();return!(!r||!r.getFiberRoots)}function G(){let r=n();return r?{available:true,hasAgent:!!r.reactDevtoolsAgent,hasFiberRoots:typeof r.getFiberRoots=="function",rendererCount:r.renderers?.size??0,rootCount:p().length,hookKeys:Object.keys(r)}:{available:false,reason:"Hook not found on global object"}}t.exports={getReactDevToolsHook:n,getFiberRoots:p,traverseFiberTree:T,getAllHostComponentInstances:B,isReactDevToolsAvailable:L,getReactDevToolsDiagnostics:G,isHiddenOffscreen:w,isInactiveScreen:S,isSVGComponent:x,getNativeViewClassName:C,isDevToolsComponent:s,isDevToolsNativeID:d,getComponentName:g,clearDevToolsCache:f,FiberTags:l,DEV_TOOLS_COMPONENT_NAMES:m,DEV_TOOLS_NATIVE_IDS:u}});var de={};ce(de,{VIEW_TYPE_MAP:()=>_,default:()=>ye,getAllComponentNames:()=>ge,getAllNativeViewTypes:()=>be,getComponentDisplayName:()=>pe,getNativeViewType:()=>fe,isKnownViewType:()=>me});function pe(e){return _[e]||e}function fe(e){for(let[t,n]of Object.entries(_))if(n===e)return t;return null}function me(e){return e in _}function be(){return Object.keys(_)}function ge(){return[...new Set(Object.values(_))]}var _,ye,Ze=ae(()=>{"use strict";E();_={RCTView:"View",RCTSafeAreaView:"SafeAreaView",RCTModalHostView:"Modal",RCTText:"Text",RCTRawText:"RawText",RCTVirtualText:"VirtualText",RCTTextInlineImage:"TextInlineImage",RCTImageView:"Image",RCTImage:"Image",RCTScrollView:"ScrollView",RCTScrollContentView:"ScrollContentView",AndroidHorizontalScrollView:"HorizontalScrollView",AndroidHorizontalScrollContentView:"HorizontalScrollContentView",RCTSinglelineTextInputView:"TextInput",RCTMultilineTextInputView:"TextInput (Multiline)",AndroidTextInput:"TextInput",RCTInputAccessoryView:"InputAccessoryView",RCTRefreshControl:"RefreshControl",AndroidSwipeRefreshLayout:"RefreshControl",PullToRefreshView:"RefreshControl",RCTSwitch:"Switch",AndroidSwitch:"Switch",RCTSlider:"Slider",RCTActivityIndicatorView:"ActivityIndicator",AndroidProgressBar:"ActivityIndicator",AndroidDrawerLayout:"DrawerLayout",VirtualView:"VirtualView",VirtualViewExperimental:"VirtualView",DebuggingOverlay:"DebuggingOverlay",LayoutConformance:"LayoutConformance",UnimplementedNativeView:"UnimplementedView",RKShimmeringView:"ShimmeringView",RCTTemplateView:"TemplateView",RCTAxialGradientView:"AxialGradientView",RCTMap:"Map",RCTWebView:"WebView",RCTKeyframes:"Keyframes",RCTImpressionTrackingView:"ImpressionTrackingView",RNSVGSvgView:"Svg",RNSVGGroup:"G",RNSVGPath:"Path",RNSVGText:"SvgText",RNSVGTSpan:"TSpan",RNSVGTextPath:"TextPath",RNSVGImage:"SvgImage",RNSVGCircle:"Circle",RNSVGEllipse:"Ellipse",RNSVGLine:"Line",RNSVGRect:"Rect",RNSVGClipPath:"ClipPath",RNSVGDefs:"Defs",RNSVGUse:"Use",RNSVGSymbol:"Symbol",RNSVGPattern:"Pattern",RNSVGMask:"Mask",RNSVGForeignObject:"ForeignObject",RNSVGMarker:"Marker",RNSVGLinearGradient:"LinearGradient",RNSVGRadialGradient:"RadialGradient",RNSVGFilter:"Filter",RNSVGFeBlend:"FeBlend",RNSVGFeColorMatrix:"FeColorMatrix",RNSVGFeComposite:"FeComposite",RNSVGFeFlood:"FeFlood",RNSVGFeGaussianBlur:"FeGaussianBlur",RNSVGFeMerge:"FeMerge",RNSVGFeOffset:"FeOffset",RNSVGPolygon:"Polygon",RNSVGPolyline:"Polyline",RNSVGStop:"Stop",RNGestureHandlerRootView:"GestureHandlerRootView",RNGestureHandlerButton:"GestureHandlerButton",RNCSafeAreaProvider:"SafeAreaProvider",RNCSafeAreaView:"SafeAreaView",RNSScreen:"Screen",RNSScreenContainer:"ScreenContainer",RNSScreenStack:"ScreenStack",RNSScreenStackHeaderConfig:"ScreenStackHeaderConfig",RNSScreenStackHeaderSubview:"ScreenStackHeaderSubview",RNSSearchBar:"SearchBar",RNSFullWindowOverlay:"FullWindowOverlay",RNSModalScreen:"ModalScreen",ReanimatedView:"Animated.View",ExpoView:"ExpoView",ExpoBlurView:"BlurView",ExpoLinearGradient:"LinearGradient",ExpoImage:"ExpoImage",ExpoVideoView:"VideoView",ExpoCamera:"Camera",ExpoBarCodeScannerView:"BarCodeScanner",RNCWebView:"WebView",AIRMap:"MapView",AIRMapMarker:"Marker",AIRMapPolyline:"Polyline",AIRMapPolygon:"Polygon",AIRMapCircle:"Circle",AIRMapCallout:"Callout",RCTVideo:"Video",LottieAnimationView:"LottieView",FastImageView:"FastImage"};ye={VIEW_TYPE_MAP:_,getComponentDisplayName:pe,getNativeViewType:fe,isKnownViewType:me,getAllNativeViewTypes:be,getAllComponentNames:ge}});var he=z((e,t)=>{"use strict";E();var{getComponentDisplayName:n}=(Ze(),Ue(de)),{getNativeViewClassName:p,getComponentName:l}=X(),m={testID:{label:"test",color:"#10b981"},nativeID:{label:"native",color:"#f59e0b"},component:{label:"comp",color:"#a855f7"},accessibilityLabel:{label:"a11y",color:"#ec4899"},viewType:{label:"view",color:"#6b7280"}};function h(a,o){let d=a?.memoizedProps||a?.pendingProps||{testID:o?.getAttribute?.("data-testid"),nativeID:o?.id,accessibilityLabel:o?.getAttribute?.("aria-label"),accessibilityRole:o?.getAttribute?.("role")},g=p(o)||"Unknown",s=n(g),f=l(a),w=d.testID||d["data-testid"]||null,S=d.nativeID||null,C=d.accessibilityLabel||d.accessible?.label||d["aria-label"]||null,x=d.accessibilityRole||d.role||null,T=d.accessibilityHint||null,B=d.accessibilityState||null,L=null;if(d.style)try{L=Array.isArray(d.style)?Object.assign({},...d.style.filter(Boolean)):d.style}catch{L=null}let G=a?.tag,r=a?.key,b=null,c=a?.return;for(;c&&!(c.type&&typeof c.type=="function"&&(b=c.type.displayName||c.type.name||null,b));)c=c.return;let y={viewType:g,displayName:s,componentName:f,parentComponentName:b,testID:w,nativeID:S,accessibilityLabel:C,accessibilityRole:x,accessibilityHint:T,accessibilityState:B,fiberTag:G,fiberKey:r,styleInfo:L,primaryLabel:null,primaryType:null,primaryColor:null};return w?(y.primaryLabel=w,y.primaryType="testID",y.primaryColor=m.testID.color):C?(y.primaryLabel=C,y.primaryType="accessibilityLabel",y.primaryColor=m.accessibilityLabel.color):f?(y.primaryLabel=f,y.primaryType="component",y.primaryColor=m.component.color):S?(y.primaryLabel=S,y.primaryType="nativeID",y.primaryColor=m.nativeID.color):(y.primaryLabel=s,y.primaryType="viewType",y.primaryColor=m.viewType.color),y}function u(a,o=20){return a?a.length<=o?a:a.substring(0,o-1)+"\u2026":""}function i(a){let o=m[a];return o?o.label+":":""}t.exports={extractComponentInfo:h,getShortLabel:u,getLabelPrefix:i,IDENTIFIER_CONFIG:m}});var ve=z((e,t)=>{"use strict";E();var n=null;try{n=je("./DebugInfo").addLog}catch{}function p(i){return new Promise(a=>{try{let o=i;if(i.canonical&&(i.canonical.publicInstance?o=i.canonical.publicInstance:o=i.canonical),typeof o.getBoundingClientRect=="function"){let s=o.getBoundingClientRect();if(s&&typeof s.x=="number"&&typeof s.y=="number"&&typeof s.width=="number"&&typeof s.height=="number"&&s.width>=0&&s.height>=0){a({x:s.x,y:s.y,width:s.width,height:s.height});return}}let d=typeof globalThis<"u"?globalThis.nativeFabricUIManager:void 0,g=typeof o.measure=="function"?s=>o.measure(s):i.node&&typeof d?.measure=="function"?s=>d.measure(i.node,s):null;if(g){let s=setTimeout(()=>{a(null)},100);g((f,w,S,C,x,T)=>{clearTimeout(s),x!=null&&T!=null&&S!=null&&C!=null&&S>=0&&C>=0?a({x,y:T,width:S,height:C}):a(null)});return}a(null)}catch{a(null)}})}var{extractComponentInfo:l}=he();async function m(i){return(await Promise.all(i.map(async({instance:a,fiber:o,depth:d})=>{let g=await p(a);if(g){let s=l(o,a);return{...g,depth:d,componentInfo:s}}return null}))).filter(a=>a!=null)}function h(i){return{hasFabricBoundingRect:typeof i.getBoundingClientRect=="function",hasPaperMeasure:typeof i.measure=="function",hasNode:i.node!=null}}function u(i){let a={fabric:0,paper:0,none:0};return i.forEach(({instance:o})=>{let d=h(o);d.hasFabricBoundingRect?a.fabric++:d.hasPaperMeasure?a.paper++:a.none++}),a}t.exports={measureInstance:p,measureInstances:m,getMeasurementCapabilities:h,getMeasurementStats:u}});var Se=z((e,t)=>{"use strict";E();function n(o,d,g){let s=o/360,f=d/100,w=g/100,S,C,x;if(f===0)S=C=x=w;else{let B=(r,b,c)=>(c<0&&(c+=1),c>1&&(c-=1),c<.16666666666666666?r+(b-r)*6*c:c<.5?b:c<.6666666666666666?r+(b-r)*(.6666666666666666-c)*6:r),L=w<.5?w*(1+f):w+f-w*f,G=2*w-L;S=B(G,L,s+1/3),C=B(G,L,s),x=B(G,L,s-1/3)}let T=B=>{let L=Math.round(B*255).toString(16);return L.length===1?"0"+L:L};return`#${T(S)}${T(C)}${T(x)}`}function p(o){let d=(0+o*137.508)%360;return n(d,70,50)}function l(){let o=Math.random()*360;return n(o,70,50)}function m(o){let d=[];for(let g=0;g<o;g++)d.push(p(g));return d}var h=["#FF5733","#33FF57","#3357FF","#FF33F5","#F5FF33","#33FFF5","#FF8333","#8333FF","#33FF83","#FF3383"];function u(o){return h[o%h.length]}function i(o,d=1){let g=parseInt(o.slice(1,3),16),s=parseInt(o.slice(3,5),16),f=parseInt(o.slice(5,7),16);return`rgba(${g}, ${s}, ${f}, ${d})`}function a(o){let d=parseInt(o.slice(1,3),16),g=parseInt(o.slice(3,5),16),s=parseInt(o.slice(5,7),16);return 255<<24|d<<16|g<<8|s}t.exports={getColorForDepth:p,getRandomColor:l,generateColorPalette:m,getColorFromPalette:u,hslToHex:n,hexToRgba:i,hexToProcessColor:a,PREDEFINED_PALETTE:h}});var Qe=z((e,t)=>{"use strict";E();var n={LABEL_SPACING:0,MAX_VERTICAL_OFFSET:100,LABEL_HEIGHT:10,PADDING:0};function p(u,i){let a=n.PADDING,o=u.x-a,d=u.x+u.width+a,g=u.y-a,s=u.y+u.height+a,f=i.x-a,w=i.x+i.width+a,S=i.y-a,C=i.y+i.height+a;return!(d<f||o>w||s<S||g>C)}function l(u){return u?u.length*5+8:0}function m(u){if(!u||u.length===0)return u;let i=u.filter(g=>{let s=g.componentInfo;return s&&(s.testID||s.accessibilityLabel)}),a=u.map((g,s)=>{let f=g.componentInfo,w=f&&(f.testID||f.accessibilityLabel),S=w?f.primaryLabel:"",C=l(S);return{index:s,hasValidLabel:w,x:g.x,y:g.y-n.LABEL_HEIGHT,width:C,height:n.LABEL_HEIGHT,offsetY:0}}),o=a.map((g,s)=>s).filter(g=>a[g].hasValidLabel).sort((g,s)=>{let f=u[g],w=u[s];return Math.abs(f.y-w.y)>10?f.y-w.y:f.x-w.x}),d=[];for(let g of o){let s=a[g];if(s.width===0)continue;let f=0,w=true,S=0,C=Math.ceil(n.MAX_VERTICAL_OFFSET/n.LABEL_HEIGHT);for(;w&&S<C;){let x={x:s.x,y:s.y-f,width:s.width,height:s.height};w=d.some(T=>p(x,T)),w&&(f+=n.LABEL_HEIGHT,S++)}s.offsetY=f,d.push({x:s.x,y:s.y-f,width:s.width,height:s.height})}return u.map((g,s)=>({...g,labelOffsetY:a[s].offsetY}))}function h(u){if(!u||u.length<2)return false;for(let i=0;i<Math.min(u.length,20);i++)for(let a=i+1;a<Math.min(u.length,20);a++){let o=u[i],d=u[a];if(Math.abs(o.y-d.y)<n.LABEL_HEIGHT*2&&!(o.x+100<d.x||d.x+100<o.x))return true}return false}t.exports={resolveOverlappingLabels:m,rectsOverlap:p,estimateLabelWidth:l,mightHaveOverlaps:h,CONFIG:n}});E();E();import{useState as we,useEffect as Ce}from"react";import{Layers as xe}from"@buoy-gg/shared-ui/web";E();import Te,{useEffect as Ie,useState as Z,useCallback as Re}from"react";var Ve={};ce(Ve,{AccessibilityInfo:()=>nt,ActivityIndicator:()=>ao,Alert:()=>so,Animated:()=>rt,AppRegistry:()=>it,AppState:()=>lt,Appearance:()=>at,BackHandler:()=>st,Button:()=>io,CheckBox:()=>Tt,Clipboard:()=>ct,DeviceEventEmitter:()=>Gt,Dimensions:()=>ut,Easing:()=>dt,FlatList:()=>It,I18nManager:()=>pt,Image:()=>Rt,ImageBackground:()=>Vt,InteractionManager:()=>mt,Keyboard:()=>ft,KeyboardAvoidingView:()=>Et,LayoutAnimation:()=>bt,Linking:()=>gt,LogBox:()=>Ot,Modal:()=>no,NativeEventEmitter:()=>yt,NativeModules:()=>ot,PanResponder:()=>ht,Picker:()=>Nt,PixelRatio:()=>vt,Platform:()=>St,Pressable:()=>to,ProgressBar:()=>Lt,RefreshControl:()=>Dt,SafeAreaView:()=>Bt,ScrollView:()=>oo,SectionList:()=>Mt,Share:()=>wt,StatusBar:()=>At,StyleSheet:()=>U,Switch:()=>ro,Text:()=>I,TextInput:()=>Zt,Touchable:()=>Ft,TouchableHighlight:()=>Qt,TouchableNativeFeedback:()=>Pt,TouchableOpacity:()=>Q,TouchableWithoutFeedback:()=>eo,UIManager:()=>Ct,Vibration:()=>xt,View:()=>F,VirtualizedList:()=>kt,YellowBox:()=>Ht,findNodeHandle:()=>lo,unstable_createElement:()=>tt,useColorScheme:()=>_t,useLocaleContext:()=>zt,useWindowDimensions:()=>Wt});E();Ke(Ve,et);import*as et from"react-native-web";import{unstable_createElement as tt,NativeModules as ot,AccessibilityInfo as nt,Animated as rt,Appearance as at,AppRegistry as it,AppState as lt,BackHandler as st,Clipboard as ct,Dimensions as ut,Easing as dt,I18nManager as pt,Keyboard as ft,InteractionManager as mt,LayoutAnimation as bt,Linking as gt,NativeEventEmitter as yt,PanResponder as ht,PixelRatio as vt,Platform as St,Share as wt,StyleSheet as U,UIManager as Ct,Vibration as xt,CheckBox as Tt,FlatList as It,Image as Rt,ImageBackground as Vt,KeyboardAvoidingView as Et,Picker as Nt,ProgressBar as Lt,RefreshControl as Dt,SafeAreaView as Bt,SectionList as Mt,StatusBar as At,Touchable as Ft,TouchableNativeFeedback as Pt,VirtualizedList as kt,YellowBox as Ht,LogBox as Ot,DeviceEventEmitter as Gt,useColorScheme as _t,useLocaleContext as zt,useWindowDimensions as Wt}from"react-native-web";import*as A from"react-native-web";import{createElement as le,forwardRef as Ee,useCallback as jt,useRef as Kt}from"react";E();import{useEffect as Ut,useState as $t}from"react";import{createPortal as qt}from"react-dom";E();var Yt='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';import{jsx as Jt}from"react/jsx-runtime";var $=Symbol.for("@buoy-gg/portal-host"),Ne=e=>{if(!(e instanceof Element))return false;if(e.closest("input, textarea, select"))return true;let t=e.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return t===""||t==="true"||t==="plaintext-only"};function Le(){let e=document;if(e[$])return e[$].host;let t=document.createElement("div");t.dataset.buoyPortalHost="",Object.assign(t.style,{position:"fixed",inset:"0",zIndex:"2147483647",pointerEvents:"none",fontFamily:Yt});let n=()=>{let o=document.fullscreenElement,d=o&&o.tagName!=="CANVAS"?o:document.body;t.parentElement!==d&&d.appendChild(t)},p=new Map,l=o=>{(!t.contains(o.target)||!Ne(o.target))&&p.set(o.code||o.key,{key:o.key,code:o.code,location:o.location,keyCode:o.keyCode,which:o.which,altKey:o.altKey,ctrlKey:o.ctrlKey,metaKey:o.metaKey,shiftKey:o.shiftKey})},m=o=>{p.delete(o.code||o.key)},h=()=>p.clear(),u=()=>{let o=[...p.values()];p.clear();for(let d of o)document.dispatchEvent(new KeyboardEvent("keyup",{...d,bubbles:true}))},i=o=>{Ne(o.target)&&o.stopPropagation()},a=o=>o.stopPropagation();return n(),document.addEventListener("fullscreenchange",n),document.addEventListener("keydown",l,true),document.addEventListener("keyup",m,true),window.addEventListener("blur",h),t.addEventListener("focusin",u),t.addEventListener("keydown",i),t.addEventListener("keyup",i),t.addEventListener("keypress",i),t.addEventListener("wheel",a,{passive:true}),e[$]={host:t,users:0,dispose:()=>{document.removeEventListener("fullscreenchange",n),document.removeEventListener("keydown",l,true),document.removeEventListener("keyup",m,true),window.removeEventListener("blur",h),t.remove(),delete e[$]}},t}function Xt({children:e}){let[t,n]=$t(null);return Ut(()=>{let p=Le(),l=document[$];return l.users++,n(p),()=>{--l.users===0&&l.dispose()}},[]),t?qt(Jt("div",{"data-buoy-root":"",style:{display:"contents",pointerEvents:"auto"},children:e}),t):null}function P(e){let t=Ee((p,l)=>{let{accessibilityState:m,accessibilityValue:h,...u}=p;for(let i of["busy","checked","disabled","expanded","selected"])m?.[i]!==void 0&&u[`aria-${i}`]===void 0&&(u[`aria-${i}`]=m[i]);for(let[i,a]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))h?.[i]!==void 0&&u[`aria-${a}`]===void 0&&(u[`aria-${a}`]=h[i]);return le(e,{...u,ref:l})}),n=e.State;return n&&Object.assign(t,{State:n}),t.displayName=e.displayName??e.name??"NativeWebView",t}var F=P(A.View),I=P(A.Text),Zt=P(A.TextInput),Q=P(A.TouchableOpacity),Qt=P(A.TouchableHighlight),eo=P(A.TouchableWithoutFeedback),to=P(A.Pressable),oo=P(A.ScrollView),De=Ee((e,t)=>{let n=Kt(null),p=jt(l=>{if(l){let m=l;for(;m.parentElement&&m.parentElement!==document.body;)m=m.parentElement;m.parentElement===document.body&&(n.current=m,Object.assign(m.style,{position:"relative",zIndex:"2147483647",pointerEvents:"auto"}),Le().appendChild(m))}else n.current&&(document.body.appendChild(n.current),n.current=null);typeof t=="function"?t(l):t&&(t.current=l)},[t]);return le(Xt,null,le(A.Modal,{...e,ref:p}))});De.displayName="Modal";var no=P(De),ro=P(A.Switch),ao=P(A.ActivityIndicator),io=P(A.Button),lo=A.findNodeHandle,so={alert(e,t,n,p){if(typeof document>"u")return;let l=document.createElement("dialog");l.dataset.buoyRoot="",l.setAttribute("aria-label",e),l.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let m=document.createElement("h2");if(m.textContent=e,m.style.cssText="font-size:18px;margin:0 0 12px",l.appendChild(m),t){let a=document.createElement("p");a.textContent=t,a.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",l.appendChild(a)}let h=document.createElement("div");h.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let u=n?.length?n:[{text:"OK"}],i=()=>{l.close?.(),l.remove()};for(let a of u){let o=document.createElement("button");o.type="button",o.textContent=a.text??"OK",o.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${a.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,o.onclick=()=>{i(),a.onPress?.()},h.appendChild(o)}l.addEventListener("cancel",a=>{a.preventDefault(),p?.cancelable!==false&&(i(),p?.onDismiss?.())}),l.appendChild(h),document.body.appendChild(l),l.showModal?l.showModal():l.setAttribute("open","")}};import{monoFont as q}from"@buoy-gg/shared-ui/web";import{JsModal as Be,devToolsStorageKeys as co}from"@buoy-gg/shared-ui/web";import{DataViewer as ee}from"@buoy-gg/shared-ui/web/dataViewer";import{loadToolModule as uo}from"@buoy-gg/shared-ui/web/utils";import{Fragment as Me,jsx as v,jsxs as W}from"react/jsx-runtime";var po=co.debugBorders.infoModal(),fo=K(),{getAllHostComponentInstances:mo}=X(),{measureInstances:bo}=ve(),{getColorForDepth:go}=Se(),{getShortLabel:Jo}=he(),{resolveOverlappingLabels:yo}=Qe(),Y;function ho(){if(Y!==void 0)return Y;try{Y=uo("@buoy-gg/core").useDevToolsVisibility??null}catch{Y=null}return Y??null}function N({label:e,value:t,color:n}){if(t==null)return null;let p;if(typeof t=="object")try{p=JSON.stringify(t,null,2)}catch{p=String(t)}else p=String(t);return W(F,{style:H.row,children:[v(I,{style:H.label,children:e}),v(I,{style:[H.value,n?{color:n}:null],children:p})]})}function vo({title:e}){return v(F,{style:Ae.container,children:v(I,{style:Ae.title,numberOfLines:1,children:e})})}function So({info:e,rect:t}){return W(F,{style:H.content,children:[v(I,{style:H.sectionTitle,children:"Identifiers"}),v(N,{label:"testID",value:e.testID,color:"#10b981"}),v(N,{label:"accessibilityLabel",value:e.accessibilityLabel,color:"#ec4899"}),v(N,{label:"nativeID",value:e.nativeID,color:"#f59e0b"}),v(N,{label:"key",value:e.fiberKey}),v(I,{style:H.sectionTitle,children:"Component"}),v(N,{label:"Component Name",value:e.componentName,color:"#a855f7"}),v(N,{label:"Parent Component",value:e.parentComponentName}),v(N,{label:"Display Name",value:e.displayName}),v(N,{label:"Native View Type",value:e.viewType}),v(N,{label:"Fiber Tag",value:e.fiberTag}),v(I,{style:H.sectionTitle,children:"Position & Size"}),v(N,{label:"X",value:Math.round(t.x)}),v(N,{label:"Y",value:Math.round(t.y)}),v(N,{label:"Width",value:Math.round(t.width)}),v(N,{label:"Height",value:Math.round(t.height)}),v(N,{label:"Depth",value:t.depth}),(e.accessibilityRole||e.accessibilityHint||e.accessibilityState)&&W(Me,{children:[v(I,{style:H.sectionTitle,children:"Accessibility"}),v(N,{label:"Role",value:e.accessibilityRole}),v(N,{label:"Hint",value:e.accessibilityHint}),e.accessibilityState&&ee?v(ee,{title:"",data:e.accessibilityState,showTypeFilter:true,rawMode:true,initialExpanded:true}):v(N,{label:"State",value:e.accessibilityState})]}),e.styleInfo&&W(Me,{children:[v(I,{style:H.sectionTitle,children:"Styles"}),ee?v(ee,{title:"",data:e.styleInfo,showTypeFilter:true,rawMode:true,initialExpanded:true}):v(F,{style:H.codeBlock,children:v(I,{style:H.codeText,children:JSON.stringify(e.styleInfo,null,2)})})]})]})}function wo(){let[e,t]=Z("off"),[n,p]=Z([]),[l,m]=Z(null),[h,u]=Z(false),i=Te.useRef(false),a=ho()?.()?.isDevToolsActive??false,o=Re(f=>{m(f),u(true)},[]),d=Re(()=>{u(false),m(null)},[]),g=e!=="off"&&!a,s=e==="labels"&&!a;return Ie(()=>fo.subscribe(f=>{t(f)}),[]),Ie(()=>{if(!g){p([]);return}let f=true,w,S=async()=>{if(!(!f||i.current)){i.current=true;try{let x=mo();if(x.length===0){i.current=false;return}let T=await bo(x);if(f){let B=s?yo(T):T;p(B)}}catch(x){console.error("[Buoy]","[DebugBorders] Error updating measurements:",x)}finally{i.current=false}}},C=setTimeout(()=>{S()},500);return w=setInterval(S,2e3),()=>{f=false,clearTimeout(C),clearInterval(w),i.current=false}},[g,s,n.length]),g?W(F,{style:te.overlay,pointerEvents:"box-none",dataSet:{debugOverlay:"true"},nativeID:"debug-borders-overlay",children:[n.map((f,w)=>{let S=f.componentInfo,C=S&&(S.testID||S.accessibilityLabel);if(s&&!C)return null;let x=s&&S?S.primaryColor:go(f.depth);return W(Te.Fragment,{children:[v(F,{pointerEvents:"none",style:[te.border,{left:f.x,top:f.y,width:f.width,height:f.height,borderColor:x}]}),s&&C&&v(Q,{activeOpacity:.7,onPress:()=>o(f),style:[te.labelContainer,{left:f.x,top:f.y-10-(f.labelOffsetY||0),backgroundColor:S.primaryColor}],children:v(I,{style:te.labelText,numberOfLines:1,children:S.primaryLabel})})]},`border-${w}`)}),Be&&l?.componentInfo&&v(Be,{visible:h,onClose:d,initialMode:"bottomSheet",header:{customContent:v(vo,{title:l.componentInfo.primaryLabel})},persistenceKey:po,enablePersistence:false,children:v(So,{info:l.componentInfo,rect:l})})]}):null}var te=U.create({overlay:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:9e3,elevation:9e3},border:{position:"absolute",borderWidth:1,borderStyle:"solid"},labelContainer:{position:"absolute",paddingHorizontal:4,paddingVertical:1,borderRadius:2},labelText:{fontSize:8,fontWeight:"700",fontFamily:q,color:"#ffffff"}}),Ae=U.create({container:{paddingHorizontal:16,paddingVertical:8,alignItems:"center"},title:{fontSize:16,fontWeight:"600",color:"#ffffff",fontFamily:q}}),H=U.create({content:{padding:16},sectionTitle:{fontSize:12,fontWeight:"700",color:"#6b7280",marginTop:16,marginBottom:8,textTransform:"uppercase",letterSpacing:1},row:{flexDirection:"row",paddingVertical:8,borderBottomWidth:1,borderBottomColor:"rgba(255, 255, 255, 0.1)"},label:{fontSize:13,color:"#9ca3af",width:140,fontFamily:q},value:{fontSize:13,color:"#ffffff",flex:1,fontFamily:q},codeBlock:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:12,borderRadius:8,marginTop:4},codeText:{fontSize:11,color:"#e5e7eb",fontFamily:q}});import{jsx as Fe}from"react/jsx-runtime";var j=K(),Co={off:"#6b7280",borders:"#10b981",labels:"#06b6d4"};function xo({size:e}){let[t,n]=we(()=>j.getMode());return Ce(()=>j.subscribe(p=>{n(p)}),[]),Fe(xe,{size:e,color:Co[t]})}function Pe(){return null}var To={id:"debug-borders",name:"BORDERS",description:"Visual layout debugger - tap to cycle modes",slot:"row",icon:xo,component:Pe,props:{},launchMode:"toggle-only",onPress:()=>{j.cycle()}};function Io(e){let t={off:e?.offColor||"#6b7280",borders:e?.bordersColor||"#10b981",labels:e?.labelsColor||"#06b6d4"},n=({size:p})=>{let[l,m]=we(()=>j.getMode());return Ce(()=>j.subscribe(h=>{m(h)}),[]),Fe(xe,{size:p,color:t[l]})};return{id:e?.id||"debug-borders",name:e?.name||"BORDERS",description:e?.description||"Visual layout debugger - tap to cycle modes",slot:"row",icon:n,component:Pe,props:{},launchMode:"toggle-only",onPress:()=>{j.cycle()}}}E();var oe=K(),Ro={version:1,getSnapshot:()=>({mode:oe.getMode()}),subscribe:e=>oe.subscribe(e),actions:{cycleMode:()=>{oe.cycle()},setMode:e=>{oe.setMode(e.mode)}}};E();E();import{useEffect as ke,useState as He}from"react";import{night as R,Layers as Vo,StatusBadge as Eo,StatusIndicator as No}from"@buoy-gg/shared-ui/web";import{jsx as D,jsxs as J}from"react/jsx-runtime";var se=K();function Lo({visible:e,onClose:t}){let[n,p]=He(false),[l,m]=He(0);ke(()=>{let u=se.subscribe(p);return p(se.isEnabled()),u},[]),ke(()=>{if(!n){m(0);return}let u=()=>{try{let{getAllHostComponentInstances:a}=X(),o=a();m(o.length)}catch(a){console.error("[Buoy]","[DebugBorders] Error getting component count:",a)}};setTimeout(u,600);let i=setInterval(u,2e3);return()=>clearInterval(i)},[n]);let h=()=>{se.toggle()};return e?D(F,{style:V.container,children:J(F,{style:V.content,children:[D(I,{style:V.title,children:"Debug Borders"}),D(I,{style:V.description,children:"Visualize component layout structure with colored borders"}),J(F,{style:V.statusRow,children:[D(I,{style:V.statusLabel,children:"Status:"}),D(Eo,{status:n?"active":"inactive"})]}),n&&l>0&&J(F,{style:V.statsRow,children:[D(I,{style:V.statsLabel,children:"Components Tracked:"}),D(I,{style:V.statsValue,children:l})]}),D(F,{style:V.toggleContainer,children:J(Q,{style:[V.button,n&&V.buttonActive],onPress:h,accessibilityRole:"button",accessibilityLabel:`Debug borders ${n?"enabled":"disabled"}`,accessibilityHint:"Tap to toggle debug borders",children:[D(Vo,{size:40,color:n?R.color.accent:R.color.textSecondary}),D(I,{style:[V.buttonText,n&&V.buttonTextActive],children:n?"Disable Borders":"Enable Borders"})]})}),J(F,{style:V.infoBox,children:[D(No,{status:n?"success":"info",size:"small"}),D(I,{style:V.infoText,children:n?"Borders update every 2 seconds. Tap button to disable.":"Tap button to show colored borders around all components."})]}),D(Q,{style:V.closeButton,onPress:t,children:D(I,{style:V.closeButtonText,children:"Close"})})]})}):null}var V=U.create({container:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.5)"},content:{backgroundColor:R.color.surface,borderWidth:1,borderColor:R.color.border,borderRadius:16,padding:32,width:"85%",maxWidth:420,alignItems:"center"},title:{fontSize:24,fontWeight:"700",color:R.color.text,marginBottom:8},description:{fontSize:14,color:R.color.textSecondary,textAlign:"center",marginBottom:24},statusRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statusLabel:{fontSize:14,color:R.color.textSecondary,fontWeight:"600"},statsRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statsLabel:{fontSize:14,color:R.color.textSecondary,fontWeight:"600"},statsValue:{fontSize:16,color:R.color.text,fontWeight:"700"},toggleContainer:{alignItems:"center",justifyContent:"center",marginBottom:24},button:{alignItems:"center",justifyContent:"center",padding:24,borderRadius:16,backgroundColor:R.color.surfaceElevated,borderWidth:2,borderColor:R.color.border,minWidth:200},buttonActive:{borderColor:R.color.accentBorderStrong,backgroundColor:R.color.accentSoft},buttonText:{marginTop:12,fontSize:16,fontWeight:"600",color:R.color.textSecondary},buttonTextActive:{color:R.color.accent},infoBox:{flexDirection:"row",alignItems:"flex-start",backgroundColor:R.color.surfaceElevated,padding:12,borderRadius:8,marginBottom:24,gap:8},infoText:{flex:1,fontSize:12,color:R.color.textSecondary,lineHeight:16},closeButton:{paddingVertical:12,paddingHorizontal:32,backgroundColor:R.color.accent,borderRadius:8},closeButtonText:{color:R.color.onAccent,fontSize:16,fontWeight:"600"}});var Do=K(),Bo=X(),Mo=ve(),Ao=Se();export{Do as DebugBordersManager,Lo as DebugBordersModal,wo as DebugBordersStandaloneOverlay,Ao as colorGeneration,Mo as componentMeasurement,Io as createDebugBordersTool,Ro as debugBordersSyncAdapter,To as debugBordersToolPreset,Bo as fiberTreeTraversal};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/debug-borders",
3
- "version": "7.0.68",
3
+ "version": "7.0.69",
4
4
  "description": "Layout debugging borders for React Native — depth-colored, touch-through, tap any label to inspect testIDs & styles. Part of Buoy devtools.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -34,18 +34,18 @@
34
34
  ],
35
35
  "sideEffects": false,
36
36
  "dependencies": {
37
- "@buoy-gg/core": "^7.0.68",
38
- "@buoy-gg/shared-ui": "^7.0.68"
37
+ "@buoy-gg/core": "^7.0.69",
38
+ "@buoy-gg/shared-ui": "^7.0.69"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": "*",
42
- "@buoy-gg/license": "7.0.68"
42
+ "@buoy-gg/license": "7.0.69"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/react": "^19.1.0",
46
46
  "@types/react-native": "^0.73.0",
47
47
  "typescript": "~5.8.3",
48
- "@buoy-gg/license": "^7.0.68"
48
+ "@buoy-gg/license": "^7.0.69"
49
49
  },
50
50
  "react-native-builder-bob": {
51
51
  "source": "src",