@buoy-gg/debug-borders 7.0.63 → 7.0.64
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 +2 -0
- package/lib/commonjs/debug-borders/components/DebugBordersModal.js +1 -1
- package/lib/commonjs/debug-borders/components/DebugBordersStandaloneOverlay.js +1 -1
- package/lib/commonjs/debug-borders/utils/componentInfo.js +1 -1
- package/lib/commonjs/debug-borders/utils/domInstances.js +1 -0
- package/lib/commonjs/debug-borders/utils/domInstances.test.js +1 -0
- package/lib/commonjs/debug-borders/utils/fiberTreeTraversal.js +1 -1
- package/lib/module/debug-borders/components/DebugBordersModal.js +1 -1
- package/lib/module/debug-borders/components/DebugBordersStandaloneOverlay.js +1 -1
- package/lib/module/debug-borders/utils/componentInfo.js +1 -1
- package/lib/module/debug-borders/utils/domInstances.js +1 -0
- package/lib/module/debug-borders/utils/domInstances.test.js +1 -0
- package/lib/module/debug-borders/utils/fiberTreeTraversal.js +1 -1
- package/lib/typescript/debug-borders/utils/domInstances.d.ts +7 -0
- package/lib/typescript/debug-borders/utils/domInstances.test.d.ts +2 -0
- package/lib/web/index.mjs +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Show layout borders and component labels over your React Native app. Tap a label to inspect the component's available properties.
|
|
6
6
|
|
|
7
|
+
On web, borders also show on plain DOM nodes. They do not show objects inside the 3D scene.
|
|
8
|
+
|
|
7
9
|
<a href="https://buoy.gg/buoy/latest/docs/tools/debug-borders"><b>Debug Borders guide</b></a> · <a href="https://buoy.gg">buoy.gg</a> · <a href="https://github.com/Buoy-gg/buoy">All tools</a>
|
|
8
10
|
|
|
9
11
|
[](https://www.npmjs.com/package/@buoy-gg/debug-borders) [](https://www.npmjs.com/package/@buoy-gg/debug-borders)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DebugBordersModal=DebugBordersModal;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(l,a){if("function"==typeof WeakMap)var e=new WeakMap,c=new WeakMap;return(_interopRequireWildcard=function(t,s){if(!s&&t&&t.__esModule)return t;var n,r,i={__proto__:null,default:t};if(null===t||"object"!=typeof t&&"function"!=typeof t)return i;if(n=s?c:e){if(n.has(t))return n.get(t);n.set(t,i)}for(const o in t)"default"!==o&&{}.hasOwnProperty.call(t,o)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,o))&&(r.get||r.set)?n(i,o,r):i[o]=t[o]);return i})(l,a)}const DebugBordersManager=require("../utils/DebugBordersManager");function DebugBordersModal({visible:l,onClose:a}){const[e,c]=(0,_react.useState)(false);const[t,s]=(0,_react.useState)(0);(0,_react.useEffect)(()=>{const r=DebugBordersManager.subscribe(c);c(DebugBordersManager.isEnabled());return r},[]);(0,_react.useEffect)(()=>{if(!e){s(0);return}const r=()=>{try{const{getAllHostComponentInstances:o}=require("../utils/fiberTreeTraversal");const u=o();s(u.length)}catch(o){console.error("[DebugBorders] Error getting component count:",o)}};setTimeout(r,600);const i=setInterval(r,2e3);return()=>clearInterval(i)},[e]);const n=()=>{DebugBordersManager.toggle()};if(!l)return null;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.content,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.title,children:"Debug Borders"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.description,children:"Visualize component layout structure with colored borders"}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.statusRow,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.statusLabel,children:"Status:"}),(0,_jsxRuntime.jsx)(_sharedUi.StatusBadge,{status:e?"active":"inactive"})]}),e&&t>0&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.statsRow,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.statsLabel,children:"Components Tracked:"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.statsValue,children:t})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.toggleContainer,children:(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:[styles.button,e&&styles.buttonActive],onPress:n,accessibilityRole:"button",accessibilityLabel:`Debug borders ${e?"enabled":"disabled"}`,accessibilityHint:"Tap to toggle debug borders",children:[(0,_jsxRuntime.jsx)(_sharedUi.Layers,{size:40,color:e?_sharedUi.night.color.accent:_sharedUi.night.color.textSecondary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.buttonText,e&&styles.buttonTextActive],children:e?"Disable Borders":"Enable Borders"})]})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.infoBox,children:[(0,_jsxRuntime.jsx)(_sharedUi.StatusIndicator,{status:e?"success":"info",size:"small"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.infoText,children:e?"Borders update every 2 seconds. Tap button to disable.":"Tap button to show colored borders around all components."})]}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.closeButton,onPress:a,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.closeButtonText,children:"Close"})})]})})}const styles=_reactNative.StyleSheet.create({container:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.5)"},content:{backgroundColor:_sharedUi.night.color.surface,borderWidth:1,borderColor:_sharedUi.night.color.border,borderRadius:16,padding:32,width:"85%",maxWidth:420,alignItems:"center"},title:{fontSize:24,fontWeight:"700",color:_sharedUi.night.color.text,marginBottom:8},description:{fontSize:14,color:_sharedUi.night.color.textSecondary,textAlign:"center",marginBottom:24},statusRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statusLabel:{fontSize:14,color:_sharedUi.night.color.textSecondary,fontWeight:"600"},statsRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statsLabel:{fontSize:14,color:_sharedUi.night.color.textSecondary,fontWeight:"600"},statsValue:{fontSize:16,color:_sharedUi.night.color.text,fontWeight:"700"},toggleContainer:{alignItems:"center",justifyContent:"center",marginBottom:24},button:{alignItems:"center",justifyContent:"center",padding:24,borderRadius:16,backgroundColor:_sharedUi.night.color.surfaceElevated,borderWidth:2,borderColor:_sharedUi.night.color.border,minWidth:200},buttonActive:{borderColor:_sharedUi.night.color.accentBorderStrong,backgroundColor:_sharedUi.night.color.accentSoft},buttonText:{marginTop:12,fontSize:16,fontWeight:"600",color:_sharedUi.night.color.textSecondary},buttonTextActive:{color:_sharedUi.night.color.accent},infoBox:{flexDirection:"row",alignItems:"flex-start",backgroundColor:_sharedUi.night.color.surfaceElevated,padding:12,borderRadius:8,marginBottom:24,gap:8},infoText:{flex:1,fontSize:12,color:_sharedUi.night.color.textSecondary,lineHeight:16},closeButton:{paddingVertical:12,paddingHorizontal:32,backgroundColor:_sharedUi.night.color.accent,borderRadius:8},closeButtonText:{color:_sharedUi.night.color.onAccent,fontSize:16,fontWeight:"600"}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DebugBordersModal=DebugBordersModal;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(l,a){if("function"==typeof WeakMap)var e=new WeakMap,c=new WeakMap;return(_interopRequireWildcard=function(t,s){if(!s&&t&&t.__esModule)return t;var n,r,i={__proto__:null,default:t};if(null===t||"object"!=typeof t&&"function"!=typeof t)return i;if(n=s?c:e){if(n.has(t))return n.get(t);n.set(t,i)}for(const o in t)"default"!==o&&{}.hasOwnProperty.call(t,o)&&((r=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,o))&&(r.get||r.set)?n(i,o,r):i[o]=t[o]);return i})(l,a)}const DebugBordersManager=require("../utils/DebugBordersManager");function DebugBordersModal({visible:l,onClose:a}){const[e,c]=(0,_react.useState)(false);const[t,s]=(0,_react.useState)(0);(0,_react.useEffect)(()=>{const r=DebugBordersManager.subscribe(c);c(DebugBordersManager.isEnabled());return r},[]);(0,_react.useEffect)(()=>{if(!e){s(0);return}const r=()=>{try{const{getAllHostComponentInstances:o}=require("../utils/fiberTreeTraversal");const u=o();s(u.length)}catch(o){console.error("[Buoy]","[DebugBorders] Error getting component count:",o)}};setTimeout(r,600);const i=setInterval(r,2e3);return()=>clearInterval(i)},[e]);const n=()=>{DebugBordersManager.toggle()};if(!l)return null;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.container,children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.content,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.title,children:"Debug Borders"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.description,children:"Visualize component layout structure with colored borders"}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.statusRow,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.statusLabel,children:"Status:"}),(0,_jsxRuntime.jsx)(_sharedUi.StatusBadge,{status:e?"active":"inactive"})]}),e&&t>0&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.statsRow,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.statsLabel,children:"Components Tracked:"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.statsValue,children:t})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.toggleContainer,children:(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:[styles.button,e&&styles.buttonActive],onPress:n,accessibilityRole:"button",accessibilityLabel:`Debug borders ${e?"enabled":"disabled"}`,accessibilityHint:"Tap to toggle debug borders",children:[(0,_jsxRuntime.jsx)(_sharedUi.Layers,{size:40,color:e?_sharedUi.night.color.accent:_sharedUi.night.color.textSecondary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.buttonText,e&&styles.buttonTextActive],children:e?"Disable Borders":"Enable Borders"})]})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.infoBox,children:[(0,_jsxRuntime.jsx)(_sharedUi.StatusIndicator,{status:e?"success":"info",size:"small"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.infoText,children:e?"Borders update every 2 seconds. Tap button to disable.":"Tap button to show colored borders around all components."})]}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.closeButton,onPress:a,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.closeButtonText,children:"Close"})})]})})}const styles=_reactNative.StyleSheet.create({container:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.5)"},content:{backgroundColor:_sharedUi.night.color.surface,borderWidth:1,borderColor:_sharedUi.night.color.border,borderRadius:16,padding:32,width:"85%",maxWidth:420,alignItems:"center"},title:{fontSize:24,fontWeight:"700",color:_sharedUi.night.color.text,marginBottom:8},description:{fontSize:14,color:_sharedUi.night.color.textSecondary,textAlign:"center",marginBottom:24},statusRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statusLabel:{fontSize:14,color:_sharedUi.night.color.textSecondary,fontWeight:"600"},statsRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statsLabel:{fontSize:14,color:_sharedUi.night.color.textSecondary,fontWeight:"600"},statsValue:{fontSize:16,color:_sharedUi.night.color.text,fontWeight:"700"},toggleContainer:{alignItems:"center",justifyContent:"center",marginBottom:24},button:{alignItems:"center",justifyContent:"center",padding:24,borderRadius:16,backgroundColor:_sharedUi.night.color.surfaceElevated,borderWidth:2,borderColor:_sharedUi.night.color.border,minWidth:200},buttonActive:{borderColor:_sharedUi.night.color.accentBorderStrong,backgroundColor:_sharedUi.night.color.accentSoft},buttonText:{marginTop:12,fontSize:16,fontWeight:"600",color:_sharedUi.night.color.textSecondary},buttonTextActive:{color:_sharedUi.night.color.accent},infoBox:{flexDirection:"row",alignItems:"flex-start",backgroundColor:_sharedUi.night.color.surfaceElevated,padding:12,borderRadius:8,marginBottom:24,gap:8},infoText:{flex:1,fontSize:12,color:_sharedUi.night.color.textSecondary,lineHeight:16},closeButton:{paddingVertical:12,paddingHorizontal:32,backgroundColor:_sharedUi.night.color.accent,borderRadius:8},closeButtonText:{color:_sharedUi.night.color.onAccent,fontSize:16,fontWeight:"600"}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DebugBordersStandaloneOverlay=DebugBordersStandaloneOverlay;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _utils=require("@buoy-gg/shared-ui/utils");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,r){if("function"==typeof WeakMap)var c=new WeakMap,s=new WeakMap;return(_interopRequireWildcard=function(t,f){if(!f&&t&&t.__esModule)return t;var a,u,o={__proto__:null,default:t};if(null===t||"object"!=typeof t&&"function"!=typeof t)return o;if(a=f?s:c){if(a.has(t))return a.get(t);a.set(t,o)}for(const i in t)"default"!==i&&{}.hasOwnProperty.call(t,i)&&((u=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,i))&&(u.get||u.set)?a(o,i,u):o[i]=t[i]);return o})(e,r)}const infoModalKey=_sharedUi.devToolsStorageKeys.debugBorders.infoModal();const DebugBordersManager=require("../utils/DebugBordersManager");const{getAllHostComponentInstances}=require("../utils/fiberTreeTraversal");const{measureInstances}=require("../utils/componentMeasurement");const{getColorForDepth}=require("../utils/colorGeneration");const{getShortLabel}=require("../utils/componentInfo");const{resolveOverlappingLabels}=require("../utils/labelPositioning");let useDevToolsVisibility;function resolveUseDevToolsVisibility(){if(useDevToolsVisibility!==void 0){return useDevToolsVisibility}try{const e=(0,_utils.loadToolModule)("@buoy-gg/core");useDevToolsVisibility=e.useDevToolsVisibility??null}catch(e){useDevToolsVisibility=null}return useDevToolsVisibility??null}function InfoRow({label:e,value:r,color:c}){if(r===null||r===void 0)return null;let s;if(typeof r==="object"){try{s=JSON.stringify(r,null,2)}catch{s=String(r)}}else{s=String(r)}return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:modalStyles.row,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.label,children:e}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[modalStyles.value,c?{color:c}:null],children:s})]})}function SimpleHeader({title:e}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:headerStyles.container,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:headerStyles.title,numberOfLines:1,children:e})})}function ComponentInfoContent({info:e,rect:r}){return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:modalStyles.content,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Identifiers"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"testID",value:e.testID,color:"#10b981"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"accessibilityLabel",value:e.accessibilityLabel,color:"#ec4899"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"nativeID",value:e.nativeID,color:"#f59e0b"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"key",value:e.fiberKey}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Component"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Component Name",value:e.componentName,color:"#a855f7"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Parent Component",value:e.parentComponentName}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Display Name",value:e.displayName}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Native View Type",value:e.viewType}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Fiber Tag",value:e.fiberTag}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Position & Size"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"X",value:Math.round(r.x)}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Y",value:Math.round(r.y)}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Width",value:Math.round(r.width)}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Height",value:Math.round(r.height)}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Depth",value:r.depth}),(e.accessibilityRole||e.accessibilityHint||e.accessibilityState)&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Accessibility"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Role",value:e.accessibilityRole}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Hint",value:e.accessibilityHint}),e.accessibilityState&&_dataViewer.DataViewer?(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:e.accessibilityState,showTypeFilter:true,rawMode:true,initialExpanded:true}):(0,_jsxRuntime.jsx)(InfoRow,{label:"State",value:e.accessibilityState})]}),e.styleInfo&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Styles"}),_dataViewer.DataViewer?(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:e.styleInfo,showTypeFilter:true,rawMode:true,initialExpanded:true}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:modalStyles.codeBlock,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.codeText,children:JSON.stringify(e.styleInfo,null,2)})})]})]})}function DebugBordersStandaloneOverlay(){const[e,r]=(0,_react.useState)("off");const[c,s]=(0,_react.useState)([]);const[t,f]=(0,_react.useState)(null);const[a,u]=(0,_react.useState)(false);const o=_react.default.useRef(false);const i=resolveUseDevToolsVisibility()?.()?.isDevToolsActive??false;const m=(0,_react.useCallback)(l=>{f(l);u(true)},[]);const g=(0,_react.useCallback)(()=>{u(false);f(null)},[]);const h=e!=="off"&&!i;const y=e==="labels"&&!i;(0,_react.useEffect)(()=>{const l=DebugBordersManager.subscribe(d=>{r(d)});return l},[]);(0,_react.useEffect)(()=>{if(!h){s([]);return}let l=true;let d;const n=async()=>{if(!l||o.current){return}o.current=true;try{const b=getAllHostComponentInstances();if(b.length===0){o.current=false;return}const x=await measureInstances(b);if(l){const v=y?resolveOverlappingLabels(x):x;s(v)}}catch(b){console.error("[DebugBorders] Error updating measurements:",b)}finally{o.current=false}};const p=setTimeout(()=>{n()},500);d=setInterval(n,2e3);return()=>{l=false;clearTimeout(p);clearInterval(d);o.current=false}},[h,y,c.length]);if(!h){return null}return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.overlay,pointerEvents:"box-none",dataSet:{debugOverlay:"true"},nativeID:"debug-borders-overlay",children:[c.map((l,d)=>{const n=l.componentInfo;const p=n&&(n.testID||n.accessibilityLabel);if(y&&!p){return null}const b=y&&n?n.primaryColor:getColorForDepth(l.depth);return(0,_jsxRuntime.jsxs)(_react.default.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.View,{pointerEvents:"none",style:[styles.border,{left:l.x,top:l.y,width:l.width,height:l.height,borderColor:b}]}),y&&p&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{activeOpacity:.7,onPress:()=>m(l),style:[styles.labelContainer,{left:l.x,top:l.y-10-(l.labelOffsetY||0),backgroundColor:n.primaryColor}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.labelText,numberOfLines:1,children:n.primaryLabel})})]},`border-${d}`)}),_sharedUi.JsModal&&t?.componentInfo&&(0,_jsxRuntime.jsx)(_sharedUi.JsModal,{visible:a,onClose:g,initialMode:"bottomSheet",header:{customContent:(0,_jsxRuntime.jsx)(SimpleHeader,{title:t.componentInfo.primaryLabel})},persistenceKey:infoModalKey,enablePersistence:false,children:(0,_jsxRuntime.jsx)(ComponentInfoContent,{info:t.componentInfo,rect:t})})]})}const styles=_reactNative.StyleSheet.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:_sharedUi.monoFont,color:"#ffffff"}});const headerStyles=_reactNative.StyleSheet.create({container:{paddingHorizontal:16,paddingVertical:8,alignItems:"center"},title:{fontSize:16,fontWeight:"600",color:"#ffffff",fontFamily:_sharedUi.monoFont}});const modalStyles=_reactNative.StyleSheet.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:_sharedUi.monoFont},value:{fontSize:13,color:"#ffffff",flex:1,fontFamily:_sharedUi.monoFont},codeBlock:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:12,borderRadius:8,marginTop:4},codeText:{fontSize:11,color:"#e5e7eb",fontFamily:_sharedUi.monoFont}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DebugBordersStandaloneOverlay=DebugBordersStandaloneOverlay;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _utils=require("@buoy-gg/shared-ui/utils");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,r){if("function"==typeof WeakMap)var c=new WeakMap,s=new WeakMap;return(_interopRequireWildcard=function(t,f){if(!f&&t&&t.__esModule)return t;var a,u,o={__proto__:null,default:t};if(null===t||"object"!=typeof t&&"function"!=typeof t)return o;if(a=f?s:c){if(a.has(t))return a.get(t);a.set(t,o)}for(const i in t)"default"!==i&&{}.hasOwnProperty.call(t,i)&&((u=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,i))&&(u.get||u.set)?a(o,i,u):o[i]=t[i]);return o})(e,r)}const infoModalKey=_sharedUi.devToolsStorageKeys.debugBorders.infoModal();const DebugBordersManager=require("../utils/DebugBordersManager");const{getAllHostComponentInstances}=require("../utils/fiberTreeTraversal");const{measureInstances}=require("../utils/componentMeasurement");const{getColorForDepth}=require("../utils/colorGeneration");const{getShortLabel}=require("../utils/componentInfo");const{resolveOverlappingLabels}=require("../utils/labelPositioning");let useDevToolsVisibility;function resolveUseDevToolsVisibility(){if(useDevToolsVisibility!==void 0){return useDevToolsVisibility}try{const e=(0,_utils.loadToolModule)("@buoy-gg/core");useDevToolsVisibility=e.useDevToolsVisibility??null}catch(e){useDevToolsVisibility=null}return useDevToolsVisibility??null}function InfoRow({label:e,value:r,color:c}){if(r===null||r===void 0)return null;let s;if(typeof r==="object"){try{s=JSON.stringify(r,null,2)}catch{s=String(r)}}else{s=String(r)}return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:modalStyles.row,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.label,children:e}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[modalStyles.value,c?{color:c}:null],children:s})]})}function SimpleHeader({title:e}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:headerStyles.container,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:headerStyles.title,numberOfLines:1,children:e})})}function ComponentInfoContent({info:e,rect:r}){return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:modalStyles.content,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Identifiers"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"testID",value:e.testID,color:"#10b981"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"accessibilityLabel",value:e.accessibilityLabel,color:"#ec4899"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"nativeID",value:e.nativeID,color:"#f59e0b"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"key",value:e.fiberKey}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Component"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Component Name",value:e.componentName,color:"#a855f7"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Parent Component",value:e.parentComponentName}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Display Name",value:e.displayName}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Native View Type",value:e.viewType}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Fiber Tag",value:e.fiberTag}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Position & Size"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"X",value:Math.round(r.x)}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Y",value:Math.round(r.y)}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Width",value:Math.round(r.width)}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Height",value:Math.round(r.height)}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Depth",value:r.depth}),(e.accessibilityRole||e.accessibilityHint||e.accessibilityState)&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Accessibility"}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Role",value:e.accessibilityRole}),(0,_jsxRuntime.jsx)(InfoRow,{label:"Hint",value:e.accessibilityHint}),e.accessibilityState&&_dataViewer.DataViewer?(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:e.accessibilityState,showTypeFilter:true,rawMode:true,initialExpanded:true}):(0,_jsxRuntime.jsx)(InfoRow,{label:"State",value:e.accessibilityState})]}),e.styleInfo&&(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.sectionTitle,children:"Styles"}),_dataViewer.DataViewer?(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:"",data:e.styleInfo,showTypeFilter:true,rawMode:true,initialExpanded:true}):(0,_jsxRuntime.jsx)(_reactNative.View,{style:modalStyles.codeBlock,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:modalStyles.codeText,children:JSON.stringify(e.styleInfo,null,2)})})]})]})}function DebugBordersStandaloneOverlay(){const[e,r]=(0,_react.useState)("off");const[c,s]=(0,_react.useState)([]);const[t,f]=(0,_react.useState)(null);const[a,u]=(0,_react.useState)(false);const o=_react.default.useRef(false);const i=resolveUseDevToolsVisibility()?.()?.isDevToolsActive??false;const m=(0,_react.useCallback)(l=>{f(l);u(true)},[]);const g=(0,_react.useCallback)(()=>{u(false);f(null)},[]);const h=e!=="off"&&!i;const y=e==="labels"&&!i;(0,_react.useEffect)(()=>{const l=DebugBordersManager.subscribe(d=>{r(d)});return l},[]);(0,_react.useEffect)(()=>{if(!h){s([]);return}let l=true;let d;const n=async()=>{if(!l||o.current){return}o.current=true;try{const b=getAllHostComponentInstances();if(b.length===0){o.current=false;return}const x=await measureInstances(b);if(l){const v=y?resolveOverlappingLabels(x):x;s(v)}}catch(b){console.error("[Buoy]","[DebugBorders] Error updating measurements:",b)}finally{o.current=false}};const p=setTimeout(()=>{n()},500);d=setInterval(n,2e3);return()=>{l=false;clearTimeout(p);clearInterval(d);o.current=false}},[h,y,c.length]);if(!h){return null}return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.overlay,pointerEvents:"box-none",dataSet:{debugOverlay:"true"},nativeID:"debug-borders-overlay",children:[c.map((l,d)=>{const n=l.componentInfo;const p=n&&(n.testID||n.accessibilityLabel);if(y&&!p){return null}const b=y&&n?n.primaryColor:getColorForDepth(l.depth);return(0,_jsxRuntime.jsxs)(_react.default.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.View,{pointerEvents:"none",style:[styles.border,{left:l.x,top:l.y,width:l.width,height:l.height,borderColor:b}]}),y&&p&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{activeOpacity:.7,onPress:()=>m(l),style:[styles.labelContainer,{left:l.x,top:l.y-10-(l.labelOffsetY||0),backgroundColor:n.primaryColor}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.labelText,numberOfLines:1,children:n.primaryLabel})})]},`border-${d}`)}),_sharedUi.JsModal&&t?.componentInfo&&(0,_jsxRuntime.jsx)(_sharedUi.JsModal,{visible:a,onClose:g,initialMode:"bottomSheet",header:{customContent:(0,_jsxRuntime.jsx)(SimpleHeader,{title:t.componentInfo.primaryLabel})},persistenceKey:infoModalKey,enablePersistence:false,children:(0,_jsxRuntime.jsx)(ComponentInfoContent,{info:t.componentInfo,rect:t})})]})}const styles=_reactNative.StyleSheet.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:_sharedUi.monoFont,color:"#ffffff"}});const headerStyles=_reactNative.StyleSheet.create({container:{paddingHorizontal:16,paddingVertical:8,alignItems:"center"},title:{fontSize:16,fontWeight:"600",color:"#ffffff",fontFamily:_sharedUi.monoFont}});const modalStyles=_reactNative.StyleSheet.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:_sharedUi.monoFont},value:{fontSize:13,color:"#ffffff",flex:1,fontFamily:_sharedUi.monoFont},codeBlock:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:12,borderRadius:8,marginTop:4},codeText:{fontSize:11,color:"#e5e7eb",fontFamily:_sharedUi.monoFont}});
|
|
@@ -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,
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.collectDOMInstances=collectDOMInstances;function collectDOMInstances(t,o){const l=[];const c=t.ownerDocument.createTreeWalker(t,1,{acceptNode(n){const i=n;if(i.matches("[data-buoy-root], [data-buoy-portal-host], [data-debug-overlay], script, style, link, meta, svg, [hidden], .ion-page-hidden"))return 2;return 1}});let e=c.nextNode();while(e){if(!o.has(e)){const n=t.ownerDocument.defaultView?.getComputedStyle(e);const i=e.getBoundingClientRect();if(n?.visibility!=="hidden"&&n?.visibility!=="collapse"&&i.width>0&&i.height>0){let a=0;for(let s=e.parentElement;s&&s!==t;s=s.parentElement)a++;l.push({instance:e,fiber:null,depth:a})}}e=c.nextNode()}return l}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _vitest=require("vitest");var _domInstances=require("./domInstances");(0,_vitest.afterEach)(()=>{document.body.innerHTML=""});function setup(t){document.body.innerHTML=t;for(const e of Array.from(document.body.querySelectorAll("*"))){e.getBoundingClientRect=()=>({x:0,y:0,width:100,height:50})}}(0,_vitest.describe)("plain DOM borders",()=>{(0,_vitest.it)("finds app nodes without a React root",()=>{setup('<main><button data-testid="save">Save</button><canvas></canvas></main>');(0,_vitest.expect)((0,_domInstances.collectDOMInstances)(document.body,new Set).map(t=>[t.instance.tagName,t.depth])).toEqual([["MAIN",0],["BUTTON",1],["CANVAS",1]])});(0,_vitest.it)("does not add React nodes twice",()=>{setup("<button>Save</button>");(0,_vitest.expect)((0,_domInstances.collectDOMInstances)(document.body,new Set([document.querySelector("button")]))).toEqual([])});(0,_vitest.it)("skips Buoy, hidden pages, and SVG paths",()=>{setup('<div data-buoy-portal-host><div data-buoy-root><button>Buoy</button></div></div><div data-debug-overlay><div></div></div><main hidden><button>Hidden</button></main><div class="ion-page-hidden"><button>Old page</button></div><svg><path/></svg><button style="visibility:hidden">Hidden</button>');(0,_vitest.expect)((0,_domInstances.collectDOMInstances)(document.body,new Set)).toEqual([])})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _utils=require("@buoy-gg/shared-ui/utils");"use strict";function getReactDevToolsHook(){if(typeof global==="undefined"){return null}const e=global.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e){return null}return e}function getFiberRoots(){const e=getReactDevToolsHook();if(!e){return[]}if(!e.getFiberRoots){return[]}const o=new Set;const t=e.renderers?.keys?Array.from(e.renderers.keys()):[1];for(const n of t){try{e.getFiberRoots(n)?.forEach(a=>o.add(a))}catch{}}return[...o]}const FiberTags={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};const DEV_TOOLS_COMPONENT_NAMES=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"]);const DEV_TOOLS_COMPONENT_PREFIXES=["JsModal","HighlightUpdates","RenderList","RenderDetail","DebugBorders","ImageOverlay","Storage","Network","RouteEvents","EnvSwitcher","Floating","Minimized","Expandable","DevTools","GameUI"];const DEV_TOOLS_NATIVE_IDS=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"]);const devToolsNodeCache=new Map;const CACHE_MAX_SIZE=500;function getNativeTag(e){const o=(0,_utils.getDOMNodeHandle)(e);if(o!==null)return o;if(!e)return null;if(typeof e._nativeTag==="number")return e._nativeTag;if(typeof e.canonical?._nativeTag==="number"){return e.canonical._nativeTag}if(typeof e.__nativeTag==="number")return e.__nativeTag;return null}function isDevToolsNativeID(e){if(!e)return false;if(DEV_TOOLS_NATIVE_IDS.has(e))return true;const o=e.charCodeAt(0);if(o===95){if(e.startsWith("__highlight_")||e.startsWith("__rn_buoy__")){return true}}if(o===108&&e.startsWith("logbox")){return true}return false}function getComponentName(e){if(!e)return null;const o=e.type;if(o){if(typeof o==="function"){return o.displayName||o.name||null}if(typeof o==="string"){return o}if(o.displayName)return o.displayName;if(o.name)return o.name}const t=e.elementType;if(t){if(typeof t==="function"){return t.displayName||t.name||null}if(t.displayName)return t.displayName;if(t.name)return t.name}return null}function isDevToolsComponent(e,o){if((0,_utils.isDOMElement)(o)&&o.closest("[data-buoy-root]"))return true;const t=getNativeTag(o);if(t!=null){const r=devToolsNodeCache.get(t);if(r!==void 0){return r}}let n=false;const a=e.pendingProps?.nativeID||e.memoizedProps?.nativeID;if(isDevToolsNativeID(a)){n=true}else{let r=e;let i=0;while(r&&i<30){const s=getComponentName(r);if(s){if(DEV_TOOLS_COMPONENT_NAMES.has(s)){n=true;break}for(const u of DEV_TOOLS_COMPONENT_PREFIXES){if(s.startsWith(u)){n=true;break}}if(n)break}const l=r.pendingProps?.nativeID||r.memoizedProps?.nativeID;if(isDevToolsNativeID(l)){n=true;break}r=r.return;i++}}if(n&&t!=null){if(devToolsNodeCache.size>=CACHE_MAX_SIZE){const r=Array.from(devToolsNodeCache.keys());for(let i=0;i<CACHE_MAX_SIZE/2;i++){devToolsNodeCache.delete(r[i])}}devToolsNodeCache.set(t,n)}return n}function clearDevToolsCache(){devToolsNodeCache.clear()}function isHiddenOffscreen(e){if(e.tag!==FiberTags.OffscreenComponent){return false}return e.memoizedState!==null}function isInactiveScreen(e){const o=e.memoizedProps;if(!o){return false}return o.activityState===0}function getNativeViewClassName(e){if((0,_utils.isDOMElement)(e))return e.tagName.toLowerCase();if(!e){return null}if(e.canonical?.viewConfig?.uiViewClassName){return e.canonical.viewConfig.uiViewClassName}if(e.viewConfig?.uiViewClassName){return e.viewConfig.uiViewClassName}return null}function isSVGComponent(e){const o=getNativeViewClassName(e);if(!o){return false}return o.startsWith("RNSVG")}function traverseFiberTree(e,o,t=0,n=new Set){if(!e){return}if(n.has(e)){return}n.add(e);if(t>500){return}if(isHiddenOffscreen(e)){if(e.sibling){traverseFiberTree(e.sibling,o,t,n)}return}if(isInactiveScreen(e)){if(e.sibling){traverseFiberTree(e.sibling,o,t,n)}return}o(e,t);if(e.child){traverseFiberTree(e.child,o,t+1,n)}if(e.sibling){traverseFiberTree(e.sibling,o,t,n)}}function getAllHostComponentInstances(){const e=getFiberRoots();
|
|
1
|
+
"use strict";var _domInstances=require("./domInstances");var _utils=require("@buoy-gg/shared-ui/utils");"use strict";function getReactDevToolsHook(){if(typeof global==="undefined"){return null}const e=global.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e){return null}return e}function getFiberRoots(){const e=getReactDevToolsHook();if(!e){return[]}if(!e.getFiberRoots){return[]}const o=new Set;const t=e.renderers?.keys?Array.from(e.renderers.keys()):[1];for(const n of t){try{e.getFiberRoots(n)?.forEach(a=>o.add(a))}catch{}}return[...o]}const FiberTags={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};const DEV_TOOLS_COMPONENT_NAMES=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"]);const DEV_TOOLS_COMPONENT_PREFIXES=["JsModal","HighlightUpdates","RenderList","RenderDetail","DebugBorders","ImageOverlay","Storage","Network","RouteEvents","EnvSwitcher","Floating","Minimized","Expandable","DevTools","GameUI"];const DEV_TOOLS_NATIVE_IDS=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"]);const devToolsNodeCache=new Map;const CACHE_MAX_SIZE=500;function getNativeTag(e){const o=(0,_utils.getDOMNodeHandle)(e);if(o!==null)return o;if(!e)return null;if(typeof e._nativeTag==="number")return e._nativeTag;if(typeof e.canonical?._nativeTag==="number"){return e.canonical._nativeTag}if(typeof e.__nativeTag==="number")return e.__nativeTag;return null}function isDevToolsNativeID(e){if(!e)return false;if(DEV_TOOLS_NATIVE_IDS.has(e))return true;const o=e.charCodeAt(0);if(o===95){if(e.startsWith("__highlight_")||e.startsWith("__rn_buoy__")){return true}}if(o===108&&e.startsWith("logbox")){return true}return false}function getComponentName(e){if(!e)return null;const o=e.type;if(o){if(typeof o==="function"){return o.displayName||o.name||null}if(typeof o==="string"){return o}if(o.displayName)return o.displayName;if(o.name)return o.name}const t=e.elementType;if(t){if(typeof t==="function"){return t.displayName||t.name||null}if(t.displayName)return t.displayName;if(t.name)return t.name}return null}function isDevToolsComponent(e,o){if((0,_utils.isDOMElement)(o)&&o.closest("[data-buoy-root]"))return true;const t=getNativeTag(o);if(t!=null){const r=devToolsNodeCache.get(t);if(r!==void 0){return r}}let n=false;const a=e.pendingProps?.nativeID||e.memoizedProps?.nativeID;if(isDevToolsNativeID(a)){n=true}else{let r=e;let i=0;while(r&&i<30){const s=getComponentName(r);if(s){if(DEV_TOOLS_COMPONENT_NAMES.has(s)){n=true;break}for(const u of DEV_TOOLS_COMPONENT_PREFIXES){if(s.startsWith(u)){n=true;break}}if(n)break}const l=r.pendingProps?.nativeID||r.memoizedProps?.nativeID;if(isDevToolsNativeID(l)){n=true;break}r=r.return;i++}}if(n&&t!=null){if(devToolsNodeCache.size>=CACHE_MAX_SIZE){const r=Array.from(devToolsNodeCache.keys());for(let i=0;i<CACHE_MAX_SIZE/2;i++){devToolsNodeCache.delete(r[i])}}devToolsNodeCache.set(t,n)}return n}function clearDevToolsCache(){devToolsNodeCache.clear()}function isHiddenOffscreen(e){if(e.tag!==FiberTags.OffscreenComponent){return false}return e.memoizedState!==null}function isInactiveScreen(e){const o=e.memoizedProps;if(!o){return false}return o.activityState===0}function getNativeViewClassName(e){if((0,_utils.isDOMElement)(e))return e.tagName.toLowerCase();if(!e){return null}if(e.canonical?.viewConfig?.uiViewClassName){return e.canonical.viewConfig.uiViewClassName}if(e.viewConfig?.uiViewClassName){return e.viewConfig.uiViewClassName}return null}function isSVGComponent(e){const o=getNativeViewClassName(e);if(!o){return false}return o.startsWith("RNSVG")}function traverseFiberTree(e,o,t=0,n=new Set){if(!e){return}if(n.has(e)){return}n.add(e);if(t>500){return}if(isHiddenOffscreen(e)){if(e.sibling){traverseFiberTree(e.sibling,o,t,n)}return}if(isInactiveScreen(e)){if(e.sibling){traverseFiberTree(e.sibling,o,t,n)}return}o(e,t);if(e.child){traverseFiberTree(e.child,o,t+1,n)}if(e.sibling){traverseFiberTree(e.sibling,o,t,n)}}function getAllHostComponentInstances(){const e=getFiberRoots();const o=[];e.forEach((t,n)=>{traverseFiberTree(t.current,(a,r)=>{if(a.tag===FiberTags.HostComponent){const i=a.stateNode;if(isDevToolsComponent(a,i)){return}if(isSVGComponent(i)){return}if(i){o.push({instance:i,fiber:a,depth:r})}}})});if(typeof document!=="undefined"&&document.body){const t=new Set(o.map(({instance:n})=>n));o.push(...(0,_domInstances.collectDOMInstances)(document.body,t))}return o}function isReactDevToolsAvailable(){const e=getReactDevToolsHook();if(!e){return false}if(!e.getFiberRoots){return false}return true}function getReactDevToolsDiagnostics(){const e=getReactDevToolsHook();if(!e){return{available:false,reason:"Hook not found on global object"}}const o={available:true,hasAgent:!!e.reactDevtoolsAgent,hasFiberRoots:typeof e.getFiberRoots==="function",rendererCount:e.renderers?.size??0,rootCount:getFiberRoots().length,hookKeys:Object.keys(e)};return o}module.exports={getReactDevToolsHook,getFiberRoots,traverseFiberTree,getAllHostComponentInstances,isReactDevToolsAvailable,getReactDevToolsDiagnostics,isHiddenOffscreen,isInactiveScreen,isSVGComponent,getNativeViewClassName,isDevToolsComponent,isDevToolsNativeID,getComponentName,clearDevToolsCache,FiberTags,DEV_TOOLS_COMPONENT_NAMES,DEV_TOOLS_NATIVE_IDS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import w,{useEffect as b,useState as f}from"react";import{View as s,Text as n,StyleSheet as S,TouchableOpacity as m}from"react-native";import{night as t,Layers as C,StatusBadge as T,StatusIndicator as v}from"@buoy-gg/shared-ui";import{jsx as o,jsxs as l}from"react/jsx-runtime";const a=require("../utils/DebugBordersManager");export function DebugBordersModal({visible:h,onClose:y}){const[r,d]=f(false);const[u,g]=f(0);b(()=>{const c=a.subscribe(d);d(a.isEnabled());return c},[]);b(()=>{if(!r){g(0);return}const c=()=>{try{const{getAllHostComponentInstances:i}=require("../utils/fiberTreeTraversal");const B=i();g(B.length)}catch(i){console.error("[DebugBorders] Error getting component count:",i)}};setTimeout(c,600);const p=setInterval(c,2e3);return()=>clearInterval(p)},[r]);const x=()=>{a.toggle()};if(!h)return null;return o(s,{style:e.container,children:l(s,{style:e.content,children:[o(n,{style:e.title,children:"Debug Borders"}),o(n,{style:e.description,children:"Visualize component layout structure with colored borders"}),l(s,{style:e.statusRow,children:[o(n,{style:e.statusLabel,children:"Status:"}),o(T,{status:r?"active":"inactive"})]}),r&&u>0&&l(s,{style:e.statsRow,children:[o(n,{style:e.statsLabel,children:"Components Tracked:"}),o(n,{style:e.statsValue,children:u})]}),o(s,{style:e.toggleContainer,children:l(m,{style:[e.button,r&&e.buttonActive],onPress:x,accessibilityRole:"button",accessibilityLabel:`Debug borders ${r?"enabled":"disabled"}`,accessibilityHint:"Tap to toggle debug borders",children:[o(C,{size:40,color:r?t.color.accent:t.color.textSecondary}),o(n,{style:[e.buttonText,r&&e.buttonTextActive],children:r?"Disable Borders":"Enable Borders"})]})}),l(s,{style:e.infoBox,children:[o(v,{status:r?"success":"info",size:"small"}),o(n,{style:e.infoText,children:r?"Borders update every 2 seconds. Tap button to disable.":"Tap button to show colored borders around all components."})]}),o(m,{style:e.closeButton,onPress:y,children:o(n,{style:e.closeButtonText,children:"Close"})})]})})}const e=S.create({container:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.5)"},content:{backgroundColor:t.color.surface,borderWidth:1,borderColor:t.color.border,borderRadius:16,padding:32,width:"85%",maxWidth:420,alignItems:"center"},title:{fontSize:24,fontWeight:"700",color:t.color.text,marginBottom:8},description:{fontSize:14,color:t.color.textSecondary,textAlign:"center",marginBottom:24},statusRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statusLabel:{fontSize:14,color:t.color.textSecondary,fontWeight:"600"},statsRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statsLabel:{fontSize:14,color:t.color.textSecondary,fontWeight:"600"},statsValue:{fontSize:16,color:t.color.text,fontWeight:"700"},toggleContainer:{alignItems:"center",justifyContent:"center",marginBottom:24},button:{alignItems:"center",justifyContent:"center",padding:24,borderRadius:16,backgroundColor:t.color.surfaceElevated,borderWidth:2,borderColor:t.color.border,minWidth:200},buttonActive:{borderColor:t.color.accentBorderStrong,backgroundColor:t.color.accentSoft},buttonText:{marginTop:12,fontSize:16,fontWeight:"600",color:t.color.textSecondary},buttonTextActive:{color:t.color.accent},infoBox:{flexDirection:"row",alignItems:"flex-start",backgroundColor:t.color.surfaceElevated,padding:12,borderRadius:8,marginBottom:24,gap:8},infoText:{flex:1,fontSize:12,color:t.color.textSecondary,lineHeight:16},closeButton:{paddingVertical:12,paddingHorizontal:32,backgroundColor:t.color.accent,borderRadius:8},closeButtonText:{color:t.color.onAccent,fontSize:16,fontWeight:"600"}});
|
|
1
|
+
"use strict";import w,{useEffect as b,useState as f}from"react";import{View as s,Text as n,StyleSheet as S,TouchableOpacity as m}from"react-native";import{night as t,Layers as C,StatusBadge as T,StatusIndicator as v}from"@buoy-gg/shared-ui";import{jsx as o,jsxs as l}from"react/jsx-runtime";const a=require("../utils/DebugBordersManager");export function DebugBordersModal({visible:h,onClose:y}){const[r,d]=f(false);const[u,g]=f(0);b(()=>{const c=a.subscribe(d);d(a.isEnabled());return c},[]);b(()=>{if(!r){g(0);return}const c=()=>{try{const{getAllHostComponentInstances:i}=require("../utils/fiberTreeTraversal");const B=i();g(B.length)}catch(i){console.error("[Buoy]","[DebugBorders] Error getting component count:",i)}};setTimeout(c,600);const p=setInterval(c,2e3);return()=>clearInterval(p)},[r]);const x=()=>{a.toggle()};if(!h)return null;return o(s,{style:e.container,children:l(s,{style:e.content,children:[o(n,{style:e.title,children:"Debug Borders"}),o(n,{style:e.description,children:"Visualize component layout structure with colored borders"}),l(s,{style:e.statusRow,children:[o(n,{style:e.statusLabel,children:"Status:"}),o(T,{status:r?"active":"inactive"})]}),r&&u>0&&l(s,{style:e.statsRow,children:[o(n,{style:e.statsLabel,children:"Components Tracked:"}),o(n,{style:e.statsValue,children:u})]}),o(s,{style:e.toggleContainer,children:l(m,{style:[e.button,r&&e.buttonActive],onPress:x,accessibilityRole:"button",accessibilityLabel:`Debug borders ${r?"enabled":"disabled"}`,accessibilityHint:"Tap to toggle debug borders",children:[o(C,{size:40,color:r?t.color.accent:t.color.textSecondary}),o(n,{style:[e.buttonText,r&&e.buttonTextActive],children:r?"Disable Borders":"Enable Borders"})]})}),l(s,{style:e.infoBox,children:[o(v,{status:r?"success":"info",size:"small"}),o(n,{style:e.infoText,children:r?"Borders update every 2 seconds. Tap button to disable.":"Tap button to show colored borders around all components."})]}),o(m,{style:e.closeButton,onPress:y,children:o(n,{style:e.closeButtonText,children:"Close"})})]})})}const e=S.create({container:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"rgba(0, 0, 0, 0.5)"},content:{backgroundColor:t.color.surface,borderWidth:1,borderColor:t.color.border,borderRadius:16,padding:32,width:"85%",maxWidth:420,alignItems:"center"},title:{fontSize:24,fontWeight:"700",color:t.color.text,marginBottom:8},description:{fontSize:14,color:t.color.textSecondary,textAlign:"center",marginBottom:24},statusRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statusLabel:{fontSize:14,color:t.color.textSecondary,fontWeight:"600"},statsRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statsLabel:{fontSize:14,color:t.color.textSecondary,fontWeight:"600"},statsValue:{fontSize:16,color:t.color.text,fontWeight:"700"},toggleContainer:{alignItems:"center",justifyContent:"center",marginBottom:24},button:{alignItems:"center",justifyContent:"center",padding:24,borderRadius:16,backgroundColor:t.color.surfaceElevated,borderWidth:2,borderColor:t.color.border,minWidth:200},buttonActive:{borderColor:t.color.accentBorderStrong,backgroundColor:t.color.accentSoft},buttonText:{marginTop:12,fontSize:16,fontWeight:"600",color:t.color.textSecondary},buttonTextActive:{color:t.color.accent},infoBox:{flexDirection:"row",alignItems:"flex-start",backgroundColor:t.color.surfaceElevated,padding:12,borderRadius:8,marginBottom:24,gap:8},infoText:{flex:1,fontSize:12,color:t.color.textSecondary,lineHeight:16},closeButton:{paddingVertical:12,paddingHorizontal:32,backgroundColor:t.color.accent,borderRadius:8},closeButtonText:{color:t.color.onAccent,fontSize:16,fontWeight:"600"}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import V,{useEffect as L,useState as T,useCallback as R}from"react";import{View as d,Text as a,StyleSheet as x,TouchableOpacity as q}from"react-native";import{monoFont as p}from"@buoy-gg/shared-ui";import{JsModal as
|
|
1
|
+
"use strict";import V,{useEffect as L,useState as T,useCallback as R}from"react";import{View as d,Text as a,StyleSheet as x,TouchableOpacity as q}from"react-native";import{monoFont as p}from"@buoy-gg/shared-ui";import{JsModal as B,devToolsStorageKeys as P}from"@buoy-gg/shared-ui";import{DataViewer as S}from"@buoy-gg/shared-ui/dataViewer";import{loadToolModule as W}from"@buoy-gg/shared-ui/utils";import{jsx as e,jsxs as b,Fragment as z}from"react/jsx-runtime";const j=P.debugBorders.infoModal();const A=require("../utils/DebugBordersManager");const{getAllHostComponentInstances:K}=require("../utils/fiberTreeTraversal");const{measureInstances:J}=require("../utils/componentMeasurement");const{getColorForDepth:_}=require("../utils/colorGeneration");const{getShortLabel:ne}=require("../utils/componentInfo");const{resolveOverlappingLabels:Y}=require("../utils/labelPositioning");let h;function G(){if(h!==void 0){return h}try{const t=W("@buoy-gg/core");h=t.useDevToolsVisibility??null}catch(t){h=null}return h??null}function o({label:t,value:n,color:f}){if(n===null||n===void 0)return null;let s;if(typeof n==="object"){try{s=JSON.stringify(n,null,2)}catch{s=String(n)}}else{s=String(n)}return b(d,{style:r.row,children:[e(a,{style:r.label,children:t}),e(a,{style:[r.value,f?{color:f}:null],children:s})]})}function U({title:t}){return e(d,{style:O.container,children:e(a,{style:O.title,numberOfLines:1,children:t})})}function X({info:t,rect:n}){return b(d,{style:r.content,children:[e(a,{style:r.sectionTitle,children:"Identifiers"}),e(o,{label:"testID",value:t.testID,color:"#10b981"}),e(o,{label:"accessibilityLabel",value:t.accessibilityLabel,color:"#ec4899"}),e(o,{label:"nativeID",value:t.nativeID,color:"#f59e0b"}),e(o,{label:"key",value:t.fiberKey}),e(a,{style:r.sectionTitle,children:"Component"}),e(o,{label:"Component Name",value:t.componentName,color:"#a855f7"}),e(o,{label:"Parent Component",value:t.parentComponentName}),e(o,{label:"Display Name",value:t.displayName}),e(o,{label:"Native View Type",value:t.viewType}),e(o,{label:"Fiber Tag",value:t.fiberTag}),e(a,{style:r.sectionTitle,children:"Position & Size"}),e(o,{label:"X",value:Math.round(n.x)}),e(o,{label:"Y",value:Math.round(n.y)}),e(o,{label:"Width",value:Math.round(n.width)}),e(o,{label:"Height",value:Math.round(n.height)}),e(o,{label:"Depth",value:n.depth}),(t.accessibilityRole||t.accessibilityHint||t.accessibilityState)&&b(z,{children:[e(a,{style:r.sectionTitle,children:"Accessibility"}),e(o,{label:"Role",value:t.accessibilityRole}),e(o,{label:"Hint",value:t.accessibilityHint}),t.accessibilityState&&S?e(S,{title:"",data:t.accessibilityState,showTypeFilter:true,rawMode:true,initialExpanded:true}):e(o,{label:"State",value:t.accessibilityState})]}),t.styleInfo&&b(z,{children:[e(a,{style:r.sectionTitle,children:"Styles"}),S?e(S,{title:"",data:t.styleInfo,showTypeFilter:true,rawMode:true,initialExpanded:true}):e(d,{style:r.codeBlock,children:e(a,{style:r.codeText,children:JSON.stringify(t.styleInfo,null,2)})})]})]})}export function DebugBordersStandaloneOverlay(){const[t,n]=T("off");const[f,s]=T([]);const[g,D]=T(null);const[H,M]=T(false);const y=V.useRef(false);const w=G()?.()?.isDevToolsActive??false;const N=R(l=>{D(l);M(true)},[]);const E=R(()=>{M(false);D(null)},[]);const C=t!=="off"&&!w;const m=t==="labels"&&!w;L(()=>{const l=A.subscribe(c=>{n(c)});return l},[]);L(()=>{if(!C){s([]);return}let l=true;let c;const i=async()=>{if(!l||y.current){return}y.current=true;try{const u=K();if(u.length===0){y.current=false;return}const F=await J(u);if(l){const k=m?Y(F):F;s(k)}}catch(u){console.error("[Buoy]","[DebugBorders] Error updating measurements:",u)}finally{y.current=false}};const v=setTimeout(()=>{i()},500);c=setInterval(i,2e3);return()=>{l=false;clearTimeout(v);clearInterval(c);y.current=false}},[C,m,f.length]);if(!C){return null}return b(d,{style:I.overlay,pointerEvents:"box-none",dataSet:{debugOverlay:"true"},nativeID:"debug-borders-overlay",children:[f.map((l,c)=>{const i=l.componentInfo;const v=i&&(i.testID||i.accessibilityLabel);if(m&&!v){return null}const u=m&&i?i.primaryColor:_(l.depth);return b(V.Fragment,{children:[e(d,{pointerEvents:"none",style:[I.border,{left:l.x,top:l.y,width:l.width,height:l.height,borderColor:u}]}),m&&v&&e(q,{activeOpacity:.7,onPress:()=>N(l),style:[I.labelContainer,{left:l.x,top:l.y-10-(l.labelOffsetY||0),backgroundColor:i.primaryColor}],children:e(a,{style:I.labelText,numberOfLines:1,children:i.primaryLabel})})]},`border-${c}`)}),B&&g?.componentInfo&&e(B,{visible:H,onClose:E,initialMode:"bottomSheet",header:{customContent:e(U,{title:g.componentInfo.primaryLabel})},persistenceKey:j,enablePersistence:false,children:e(X,{info:g.componentInfo,rect:g})})]})}const I=x.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:p,color:"#ffffff"}});const O=x.create({container:{paddingHorizontal:16,paddingVertical:8,alignItems:"center"},title:{fontSize:16,fontWeight:"600",color:"#ffffff",fontFamily:p}});const r=x.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:p},value:{fontSize:13,color:"#ffffff",flex:1,fontFamily:p},codeBlock:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:12,borderRadius:8,marginTop:4},codeText:{fontSize:11,color:"#e5e7eb",fontFamily:p}});
|
|
@@ -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,
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";export function collectDOMInstances(t,o){const l=[];const s=t.ownerDocument.createTreeWalker(t,1,{acceptNode(n){const i=n;if(i.matches("[data-buoy-root], [data-buoy-portal-host], [data-debug-overlay], script, style, link, meta, svg, [hidden], .ion-page-hidden"))return 2;return 1}});let e=s.nextNode();while(e){if(!o.has(e)){const n=t.ownerDocument.defaultView?.getComputedStyle(e);const i=e.getBoundingClientRect();if(n?.visibility!=="hidden"&&n?.visibility!=="collapse"&&i.width>0&&i.height>0){let c=0;for(let a=e.parentElement;a&&a!==t;a=a.parentElement)c++;l.push({instance:e,fiber:null,depth:c})}}e=s.nextNode()}return l}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";import{afterEach as i,describe as u,expect as e,it as o}from"vitest";import{collectDOMInstances as n}from"./domInstances";i(()=>{document.body.innerHTML=""});function d(t){document.body.innerHTML=t;for(const a of Array.from(document.body.querySelectorAll("*"))){a.getBoundingClientRect=()=>({x:0,y:0,width:100,height:50})}}u("plain DOM borders",()=>{o("finds app nodes without a React root",()=>{d('<main><button data-testid="save">Save</button><canvas></canvas></main>');e(n(document.body,new Set).map(t=>[t.instance.tagName,t.depth])).toEqual([["MAIN",0],["BUTTON",1],["CANVAS",1]])});o("does not add React nodes twice",()=>{d("<button>Save</button>");e(n(document.body,new Set([document.querySelector("button")]))).toEqual([])});o("skips Buoy, hidden pages, and SVG paths",()=>{d('<div data-buoy-portal-host><div data-buoy-root><button>Buoy</button></div></div><div data-debug-overlay><div></div></div><main hidden><button>Hidden</button></main><div class="ion-page-hidden"><button>Old page</button></div><svg><path/></svg><button style="visibility:hidden">Hidden</button>');e(n(document.body,new Set)).toEqual([])})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{getDOMNodeHandle as
|
|
1
|
+
"use strict";import{collectDOMInstances as L}from"./domInstances";import{getDOMNodeHandle as M,isDOMElement as m}from"@buoy-gg/shared-ui/utils";"use strict";function u(){if(typeof global==="undefined"){return null}const e=global.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!e){return null}return e}function g(){const e=u();if(!e){return[]}if(!e.getFiberRoots){return[]}const o=new Set;const t=e.renderers?.keys?Array.from(e.renderers.keys()):[1];for(const n of t){try{e.getFiberRoots(n)?.forEach(a=>o.add(a))}catch{}}return[...o]}const f={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};const p=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"]);const B=["JsModal","HighlightUpdates","RenderList","RenderDetail","DebugBorders","ImageOverlay","Storage","Network","RouteEvents","EnvSwitcher","Floating","Minimized","Expandable","DevTools","GameUI"];const C=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"]);const s=new Map;const v=500;function O(e){const o=M(e);if(o!==null)return o;if(!e)return null;if(typeof e._nativeTag==="number")return e._nativeTag;if(typeof e.canonical?._nativeTag==="number"){return e.canonical._nativeTag}if(typeof e.__nativeTag==="number")return e.__nativeTag;return null}function d(e){if(!e)return false;if(C.has(e))return true;const o=e.charCodeAt(0);if(o===95){if(e.startsWith("__highlight_")||e.startsWith("__rn_buoy__")){return true}}if(o===108&&e.startsWith("logbox")){return true}return false}function y(e){if(!e)return null;const o=e.type;if(o){if(typeof o==="function"){return o.displayName||o.name||null}if(typeof o==="string"){return o}if(o.displayName)return o.displayName;if(o.name)return o.name}const t=e.elementType;if(t){if(typeof t==="function"){return t.displayName||t.name||null}if(t.displayName)return t.displayName;if(t.name)return t.name}return null}function h(e,o){if(m(o)&&o.closest("[data-buoy-root]"))return true;const t=O(o);if(t!=null){const r=s.get(t);if(r!==void 0){return r}}let n=false;const a=e.pendingProps?.nativeID||e.memoizedProps?.nativeID;if(d(a)){n=true}else{let r=e;let i=0;while(r&&i<30){const c=y(r);if(c){if(p.has(c)){n=true;break}for(const I of B){if(c.startsWith(I)){n=true;break}}if(n)break}const w=r.pendingProps?.nativeID||r.memoizedProps?.nativeID;if(d(w)){n=true;break}r=r.return;i++}}if(n&&t!=null){if(s.size>=v){const r=Array.from(s.keys());for(let i=0;i<v/2;i++){s.delete(r[i])}}s.set(t,n)}return n}function R(){s.clear()}function _(e){if(e.tag!==f.OffscreenComponent){return false}return e.memoizedState!==null}function S(e){const o=e.memoizedProps;if(!o){return false}return o.activityState===0}function T(e){if(m(e))return e.tagName.toLowerCase();if(!e){return null}if(e.canonical?.viewConfig?.uiViewClassName){return e.canonical.viewConfig.uiViewClassName}if(e.viewConfig?.uiViewClassName){return e.viewConfig.uiViewClassName}return null}function D(e){const o=T(e);if(!o){return false}return o.startsWith("RNSVG")}function l(e,o,t=0,n=new Set){if(!e){return}if(n.has(e)){return}n.add(e);if(t>500){return}if(_(e)){if(e.sibling){l(e.sibling,o,t,n)}return}if(S(e)){if(e.sibling){l(e.sibling,o,t,n)}return}o(e,t);if(e.child){l(e.child,o,t+1,n)}if(e.sibling){l(e.sibling,o,t,n)}}function x(){const e=g();const o=[];e.forEach((t,n)=>{l(t.current,(a,r)=>{if(a.tag===f.HostComponent){const i=a.stateNode;if(h(a,i)){return}if(D(i)){return}if(i){o.push({instance:i,fiber:a,depth:r})}}})});if(typeof document!=="undefined"&&document.body){const t=new Set(o.map(({instance:n})=>n));o.push(...L(document.body,t))}return o}function E(){const e=u();if(!e){return false}if(!e.getFiberRoots){return false}return true}function b(){const e=u();if(!e){return{available:false,reason:"Hook not found on global object"}}const o={available:true,hasAgent:!!e.reactDevtoolsAgent,hasFiberRoots:typeof e.getFiberRoots==="function",rendererCount:e.renderers?.size??0,rootCount:g().length,hookKeys:Object.keys(e)};return o}module.exports={getReactDevToolsHook:u,getFiberRoots:g,traverseFiberTree:l,getAllHostComponentInstances:x,isReactDevToolsAvailable:E,getReactDevToolsDiagnostics:b,isHiddenOffscreen:_,isInactiveScreen:S,isSVGComponent:D,getNativeViewClassName:T,isDevToolsComponent:h,isDevToolsNativeID:d,getComponentName:y,clearDevToolsCache:R,FiberTags:f,DEV_TOOLS_COMPONENT_NAMES:p,DEV_TOOLS_NATIVE_IDS:C};
|
package/lib/web/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";var re=Object.defineProperty;var Fe=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var He=Object.prototype.hasOwnProperty;var Oe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(n,r)=>(typeof require<"u"?require:n)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ae=(e,n)=>()=>(e&&(n=e(e=0)),n);var z=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),le=(e,n)=>{for(var r in n)re(e,r,{get:n[r],enumerable:true})},ne=(e,n,r,g)=>{if(n&&typeof n=="object"||typeof n=="function")for(let p of Pe(n))!He.call(e,p)&&p!==r&&re(e,p,{get:()=>n[p],enumerable:!(g=Fe(n,p))||g.enumerable});return e},Ge=(e,n,r)=>(ne(e,n,"default"),r&&ne(r,n,"default"));var ke=e=>ne(re({},"__esModule",{value:true}),e);var _e,B=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 ze}from"@buoy-gg/shared-ui/web/utils";var K=z((e,n)=>{"use strict";B();var r="off",g=new Set,p=["off","borders","labels"],S=["off","borders"],C=null,u=false;function s(){if(!u){u=true;try{let i=ze("@buoy-gg/license");i&&typeof i.isPro=="function"&&(C=i.isPro)}catch{C=null}}}function o(){if(s(),C)try{return C()}catch{return false}return false}function a(){return o()?p:S}var l=p;function b(i){return g.add(i),i(r),()=>{g.delete(i)}}function d(){g.forEach(i=>{try{i(r)}catch(m){console.error("[DebugBorders] Error in listener:",m)}})}function c(i){return r===i?true:i==="labels"&&!o()?(console.warn("[DebugBorders] Labels mode requires React Buoy Pro. Upgrade at https://buoy.gg/pro"),false):(r=i,d(),true)}function y(){return r}function v(){let i=a(),m=i.indexOf(r);if(m===-1){c("off");return}let G=(m+1)%i.length;c(i[G])}function w(){c("borders")}function x(){c("off")}function T(){v()}function M(){return r!=="off"}function L(){return r==="labels"&&o()}function k(){return o()}function t(){return a()}function f(i){i?w():x()}n.exports={subscribe:b,enable:w,disable:x,toggle:T,cycle:v,isEnabled:M,showLabels:L,setEnabled:f,getMode:y,setMode:c,isProEnabled:k,getAvailableModes:t,MODE_CYCLE:l}});import{getDOMNodeHandle as We,isDOMElement as se}from"@buoy-gg/shared-ui/web/utils";var J=z((e,n)=>{"use strict";B();function r(){if(typeof globalThis>"u")return null;let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return t||null}function g(){let t=r();if(!t)return[];if(!t.getFiberRoots)return[];let f=new Set,i=t.renderers?.keys?Array.from(t.renderers.keys()):[1];for(let m of i)try{t.getFiberRoots(m)?.forEach(G=>f.add(G))}catch{}return[...f]}var p={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},S=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"]),C=["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"]),s=new Map,o=500;function a(t){let f=We(t);return f!==null?f:t?typeof t._nativeTag=="number"?t._nativeTag:typeof t.canonical?._nativeTag=="number"?t.canonical._nativeTag:typeof t.__nativeTag=="number"?t.__nativeTag:null:null}function l(t){if(!t)return false;if(u.has(t))return true;let f=t.charCodeAt(0);return!!(f===95&&(t.startsWith("__highlight_")||t.startsWith("__rn_buoy__"))||f===108&&t.startsWith("logbox"))}function b(t){if(!t)return null;let f=t.type;if(f){if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;if(f.displayName)return f.displayName;if(f.name)return f.name}let i=t.elementType;if(i){if(typeof i=="function")return i.displayName||i.name||null;if(i.displayName)return i.displayName;if(i.name)return i.name}return null}function d(t,f){if(se(f)&&f.closest("[data-buoy-root]"))return true;let i=a(f);if(i!=null){let D=s.get(i);if(D!==void 0)return D}let m=false,G=t.pendingProps?.nativeID||t.memoizedProps?.nativeID;if(l(G))m=true;else{let D=t,H=0;for(;D&&H<30;){let oe=b(D);if(oe){if(S.has(oe)){m=true;break}for(let Ae of C)if(oe.startsWith(Ae)){m=true;break}if(m)break}let De=D.pendingProps?.nativeID||D.memoizedProps?.nativeID;if(l(De)){m=true;break}D=D.return,H++}}if(m&&i!=null){if(s.size>=o){let D=Array.from(s.keys());for(let H=0;H<o/2;H++)s.delete(D[H])}s.set(i,m)}return m}function c(){s.clear()}function y(t){return t.tag!==p.OffscreenComponent?false:t.memoizedState!==null}function v(t){let f=t.memoizedProps;return f?f.activityState===0:false}function w(t){return se(t)?t.tagName.toLowerCase():t?t.canonical?.viewConfig?.uiViewClassName?t.canonical.viewConfig.uiViewClassName:t.viewConfig?.uiViewClassName?t.viewConfig.uiViewClassName:null:null}function x(t){let f=w(t);return f?f.startsWith("RNSVG"):false}function T(t,f,i=0,m=new Set){if(t&&!m.has(t)&&(m.add(t),!(i>500))){if(y(t)){t.sibling&&T(t.sibling,f,i,m);return}if(v(t)){t.sibling&&T(t.sibling,f,i,m);return}f(t,i),t.child&&T(t.child,f,i+1,m),t.sibling&&T(t.sibling,f,i,m)}}function M(){let t=g();if(t.length===0)return[];let f=[];return t.forEach((i,m)=>{T(i.current,(G,D)=>{if(G.tag===p.HostComponent){let H=G.stateNode;if(d(G,H)||x(H))return;H&&f.push({instance:H,fiber:G,depth:D})}})}),f}function L(){let t=r();return!(!t||!t.getFiberRoots)}function k(){let t=r();return t?{available:true,hasAgent:!!t.reactDevtoolsAgent,hasFiberRoots:typeof t.getFiberRoots=="function",rendererCount:t.renderers?.size??0,rootCount:g().length,hookKeys:Object.keys(t)}:{available:false,reason:"Hook not found on global object"}}n.exports={getReactDevToolsHook:r,getFiberRoots:g,traverseFiberTree:T,getAllHostComponentInstances:M,isReactDevToolsAvailable:L,getReactDevToolsDiagnostics:k,isHiddenOffscreen:y,isInactiveScreen:v,isSVGComponent:x,getNativeViewClassName:w,isDevToolsComponent:d,isDevToolsNativeID:l,getComponentName:b,clearDevToolsCache:c,FiberTags:p,DEV_TOOLS_COMPONENT_NAMES:S,DEV_TOOLS_NATIVE_IDS:u}});var ce={};le(ce,{VIEW_TYPE_MAP:()=>_,default:()=>ge,getAllComponentNames:()=>be,getAllNativeViewTypes:()=>pe,getComponentDisplayName:()=>ue,getNativeViewType:()=>de,isKnownViewType:()=>fe});function ue(e){return _[e]||e}function de(e){for(let[n,r]of Object.entries(_))if(r===e)return n;return null}function fe(e){return e in _}function pe(){return Object.keys(_)}function be(){return[...new Set(Object.values(_))]}var _,ge,je=ae(()=>{"use strict";B();_={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"};ge={VIEW_TYPE_MAP:_,getComponentDisplayName:ue,getNativeViewType:de,isKnownViewType:fe,getAllNativeViewTypes:pe,getAllComponentNames:be}});var me=z((e,n)=>{"use strict";B();var{getComponentDisplayName:r}=(je(),ke(ce)),{getNativeViewClassName:g,getComponentName:p}=J(),S={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 C(o,a){let l=o.memoizedProps||o.pendingProps||{},b=g(a)||"Unknown",d=r(b),c=p(o),y=l.testID||null,v=l.nativeID||null,w=l.accessibilityLabel||l.accessible?.label||null,x=l.accessibilityRole||l.role||null,T=l.accessibilityHint||null,M=l.accessibilityState||null,L=null;if(l.style)try{L=Array.isArray(l.style)?Object.assign({},...l.style.filter(Boolean)):l.style}catch{L=null}let k=o.tag,t=o.key,f=null,i=o.return;for(;i&&!(i.type&&typeof i.type=="function"&&(f=i.type.displayName||i.type.name||null,f));)i=i.return;let m={viewType:b,displayName:d,componentName:c,parentComponentName:f,testID:y,nativeID:v,accessibilityLabel:w,accessibilityRole:x,accessibilityHint:T,accessibilityState:M,fiberTag:k,fiberKey:t,styleInfo:L,primaryLabel:null,primaryType:null,primaryColor:null};return y?(m.primaryLabel=y,m.primaryType="testID",m.primaryColor=S.testID.color):w?(m.primaryLabel=w,m.primaryType="accessibilityLabel",m.primaryColor=S.accessibilityLabel.color):c?(m.primaryLabel=c,m.primaryType="component",m.primaryColor=S.component.color):v?(m.primaryLabel=v,m.primaryType="nativeID",m.primaryColor=S.nativeID.color):(m.primaryLabel=d,m.primaryType="viewType",m.primaryColor=S.viewType.color),m}function u(o,a=20){return o?o.length<=a?o:o.substring(0,a-1)+"\u2026":""}function s(o){let a=S[o];return a?a.label+":":""}n.exports={extractComponentInfo:C,getShortLabel:u,getLabelPrefix:s,IDENTIFIER_CONFIG:S}});var ye=z((e,n)=>{"use strict";B();var r=null;try{r=Oe("./DebugInfo").addLog}catch{}function g(s){return new Promise(o=>{try{let a=s;if(s.canonical&&(s.canonical.publicInstance?a=s.canonical.publicInstance:a=s.canonical),typeof a.getBoundingClientRect=="function"){let l=a.getBoundingClientRect();if(l&&typeof l.x=="number"&&typeof l.y=="number"&&typeof l.width=="number"&&typeof l.height=="number"&&l.width>=0&&l.height>=0){o({x:l.x,y:l.y,width:l.width,height:l.height});return}}if(typeof a.measure=="function"){let l=setTimeout(()=>{o(null)},100);a.measure((b,d,c,y,v,w)=>{clearTimeout(l),v!=null&&w!=null&&c!=null&&y!=null&&c>=0&&y>=0?o({x:v,y:w,width:c,height:y}):o(null)});return}o(null)}catch{o(null)}})}var{extractComponentInfo:p}=me();async function S(s){return(await Promise.all(s.map(async({instance:o,fiber:a,depth:l})=>{let b=await g(o);if(b){let d=p(a,o);return{...b,depth:l,componentInfo:d}}return null}))).filter(o=>o!=null)}function C(s){return{hasFabricBoundingRect:typeof s.getBoundingClientRect=="function",hasPaperMeasure:typeof s.measure=="function",hasNode:s.node!=null}}function u(s){let o={fabric:0,paper:0,none:0};return s.forEach(({instance:a})=>{let l=C(a);l.hasFabricBoundingRect?o.fabric++:l.hasPaperMeasure?o.paper++:o.none++}),o}n.exports={measureInstance:g,measureInstances:S,getMeasurementCapabilities:C,getMeasurementStats:u}});var he=z((e,n)=>{"use strict";B();function r(a,l,b){let d=a/360,c=l/100,y=b/100,v,w,x;if(c===0)v=w=x=y;else{let M=(t,f,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<.16666666666666666?t+(f-t)*6*i:i<.5?f:i<.6666666666666666?t+(f-t)*(.6666666666666666-i)*6:t),L=y<.5?y*(1+c):y+c-y*c,k=2*y-L;v=M(k,L,d+1/3),w=M(k,L,d),x=M(k,L,d-1/3)}let T=M=>{let L=Math.round(M*255).toString(16);return L.length===1?"0"+L:L};return`#${T(v)}${T(w)}${T(x)}`}function g(a){let l=(0+a*137.508)%360;return r(l,70,50)}function p(){let a=Math.random()*360;return r(a,70,50)}function S(a){let l=[];for(let b=0;b<a;b++)l.push(g(b));return l}var C=["#FF5733","#33FF57","#3357FF","#FF33F5","#F5FF33","#33FFF5","#FF8333","#8333FF","#33FF83","#FF3383"];function u(a){return C[a%C.length]}function s(a,l=1){let b=parseInt(a.slice(1,3),16),d=parseInt(a.slice(3,5),16),c=parseInt(a.slice(5,7),16);return`rgba(${b}, ${d}, ${c}, ${l})`}function o(a){let l=parseInt(a.slice(1,3),16),b=parseInt(a.slice(3,5),16),d=parseInt(a.slice(5,7),16);return 255<<24|l<<16|b<<8|d}n.exports={getColorForDepth:g,getRandomColor:p,generateColorPalette:S,getColorFromPalette:u,hslToHex:r,hexToRgba:s,hexToProcessColor:o,PREDEFINED_PALETTE:C}});var Ke=z((e,n)=>{"use strict";B();var r={LABEL_SPACING:0,MAX_VERTICAL_OFFSET:100,LABEL_HEIGHT:10,PADDING:0};function g(u,s){let o=r.PADDING,a=u.x-o,l=u.x+u.width+o,b=u.y-o,d=u.y+u.height+o,c=s.x-o,y=s.x+s.width+o,v=s.y-o,w=s.y+s.height+o;return!(l<c||a>y||d<v||b>w)}function p(u){return u?u.length*5+8:0}function S(u){if(!u||u.length===0)return u;let s=u.filter(b=>{let d=b.componentInfo;return d&&(d.testID||d.accessibilityLabel)}),o=u.map((b,d)=>{let c=b.componentInfo,y=c&&(c.testID||c.accessibilityLabel),v=y?c.primaryLabel:"",w=p(v);return{index:d,hasValidLabel:y,x:b.x,y:b.y-r.LABEL_HEIGHT,width:w,height:r.LABEL_HEIGHT,offsetY:0}}),a=o.map((b,d)=>d).filter(b=>o[b].hasValidLabel).sort((b,d)=>{let c=u[b],y=u[d];return Math.abs(c.y-y.y)>10?c.y-y.y:c.x-y.x}),l=[];for(let b of a){let d=o[b];if(d.width===0)continue;let c=0,y=true,v=0,w=Math.ceil(r.MAX_VERTICAL_OFFSET/r.LABEL_HEIGHT);for(;y&&v<w;){let x={x:d.x,y:d.y-c,width:d.width,height:d.height};y=l.some(T=>g(x,T)),y&&(c+=r.LABEL_HEIGHT,v++)}d.offsetY=c,l.push({x:d.x,y:d.y-c,width:d.width,height:d.height})}return u.map((b,d)=>({...b,labelOffsetY:o[d].offsetY}))}function C(u){if(!u||u.length<2)return false;for(let s=0;s<Math.min(u.length,20);s++)for(let o=s+1;o<Math.min(u.length,20);o++){let a=u[s],l=u[o];if(Math.abs(a.y-l.y)<r.LABEL_HEIGHT*2&&!(a.x+100<l.x||l.x+100<a.x))return true}return false}n.exports={resolveOverlappingLabels:S,rectsOverlap:g,estimateLabelWidth:p,mightHaveOverlaps:C,CONFIG:r}});B();B();import{useState as ve,useEffect as Se}from"react";import{Layers as Ce}from"@buoy-gg/shared-ui/web";B();import we,{useEffect as xe,useState as X,useCallback as Te}from"react";var Re={};le(Re,{AccessibilityInfo:()=>qe,ActivityIndicator:()=>Kt,Alert:()=>Yt,Animated:()=>Je,AppRegistry:()=>Qe,AppState:()=>Ze,Appearance:()=>Xe,BackHandler:()=>et,Button:()=>Ut,CheckBox:()=>mt,Clipboard:()=>tt,DeviceEventEmitter:()=>Mt,Dimensions:()=>ot,Easing:()=>rt,FlatList:()=>yt,I18nManager:()=>nt,Image:()=>ht,ImageBackground:()=>vt,InteractionManager:()=>at,Keyboard:()=>it,KeyboardAvoidingView:()=>St,LayoutAnimation:()=>lt,Linking:()=>st,LogBox:()=>Et,Modal:()=>Wt,NativeEventEmitter:()=>ct,NativeModules:()=>Ye,PanResponder:()=>ut,Picker:()=>Ct,PixelRatio:()=>dt,Platform:()=>ft,Pressable:()=>_t,ProgressBar:()=>wt,RefreshControl:()=>xt,SafeAreaView:()=>Tt,ScrollView:()=>zt,SectionList:()=>Rt,Share:()=>pt,StatusBar:()=>It,StyleSheet:()=>U,Switch:()=>jt,Text:()=>R,TextInput:()=>Ot,Touchable:()=>Vt,TouchableHighlight:()=>Gt,TouchableNativeFeedback:()=>Nt,TouchableOpacity:()=>Q,TouchableWithoutFeedback:()=>kt,UIManager:()=>bt,Vibration:()=>gt,View:()=>F,VirtualizedList:()=>Lt,YellowBox:()=>Bt,findNodeHandle:()=>$t,unstable_createElement:()=>$e,useColorScheme:()=>Dt,useLocaleContext:()=>At,useWindowDimensions:()=>Ft});B();Ge(Re,Ue);import*as Ue from"react-native-web";import{unstable_createElement as $e,NativeModules as Ye,AccessibilityInfo as qe,Animated as Je,Appearance as Xe,AppRegistry as Qe,AppState as Ze,BackHandler as et,Clipboard as tt,Dimensions as ot,Easing as rt,I18nManager as nt,Keyboard as it,InteractionManager as at,LayoutAnimation as lt,Linking as st,NativeEventEmitter as ct,PanResponder as ut,PixelRatio as dt,Platform as ft,Share as pt,StyleSheet as U,UIManager as bt,Vibration as gt,CheckBox as mt,FlatList as yt,Image as ht,ImageBackground as vt,KeyboardAvoidingView as St,Picker as Ct,ProgressBar as wt,RefreshControl as xt,SafeAreaView as Tt,SectionList as Rt,StatusBar as It,Touchable as Vt,TouchableNativeFeedback as Nt,VirtualizedList as Lt,YellowBox as Bt,LogBox as Et,DeviceEventEmitter as Mt,useColorScheme as Dt,useLocaleContext as At,useWindowDimensions as Ft}from"react-native-web";import*as A from"react-native-web";import{createElement as Pt,forwardRef as Ht}from"react";function P(e){let n=Ht((g,p)=>{let{accessibilityState:S,accessibilityValue:C,...u}=g;for(let s of["busy","checked","disabled","expanded","selected"])S?.[s]!==void 0&&u[`aria-${s}`]===void 0&&(u[`aria-${s}`]=S[s]);for(let[s,o]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))C?.[s]!==void 0&&u[`aria-${o}`]===void 0&&(u[`aria-${o}`]=C[s]);return Pt(e,{...u,ref:p})}),r=e.State;return r&&Object.assign(n,{State:r}),n.displayName=e.displayName??e.name??"NativeWebView",n}var F=P(A.View),R=P(A.Text),Ot=P(A.TextInput),Q=P(A.TouchableOpacity),Gt=P(A.TouchableHighlight),kt=P(A.TouchableWithoutFeedback),_t=P(A.Pressable),zt=P(A.ScrollView),Wt=P(A.Modal),jt=P(A.Switch),Kt=P(A.ActivityIndicator),Ut=P(A.Button),$t=A.findNodeHandle,Yt={alert(e,n,r,g){if(typeof document>"u")return;let p=document.createElement("dialog");p.dataset.buoyRoot="",p.setAttribute("aria-label",e),p.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 S=document.createElement("h2");if(S.textContent=e,S.style.cssText="font-size:18px;margin:0 0 12px",p.appendChild(S),n){let o=document.createElement("p");o.textContent=n,o.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",p.appendChild(o)}let C=document.createElement("div");C.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let u=r?.length?r:[{text:"OK"}],s=()=>{p.close?.(),p.remove()};for(let o of u){let a=document.createElement("button");a.type="button",a.textContent=o.text??"OK",a.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${o.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,a.onclick=()=>{s(),o.onPress?.()},C.appendChild(a)}p.addEventListener("cancel",o=>{o.preventDefault(),g?.cancelable!==false&&(s(),g?.onDismiss?.())}),p.appendChild(C),document.body.appendChild(p),p.showModal?p.showModal():p.setAttribute("open","")}};import{monoFont as $}from"@buoy-gg/shared-ui/web";import{JsModal as Ie,devToolsStorageKeys as qt}from"@buoy-gg/shared-ui/web";import{DataViewer as Z}from"@buoy-gg/shared-ui/web/dataViewer";import{loadToolModule as Jt}from"@buoy-gg/shared-ui/web/utils";import{Fragment as Ve,jsx as h,jsxs as W}from"react/jsx-runtime";var Xt=qt.debugBorders.infoModal(),Qt=K(),{getAllHostComponentInstances:Zt}=J(),{measureInstances:eo}=ye(),{getColorForDepth:to}=he(),{getShortLabel:Do}=me(),{resolveOverlappingLabels:oo}=Ke(),Y;function ro(){if(Y!==void 0)return Y;try{Y=Jt("@buoy-gg/core").useDevToolsVisibility??null}catch{Y=null}return Y??null}function N({label:e,value:n,color:r}){if(n==null)return null;let g;if(typeof n=="object")try{g=JSON.stringify(n,null,2)}catch{g=String(n)}else g=String(n);return W(F,{style:O.row,children:[h(R,{style:O.label,children:e}),h(R,{style:[O.value,r?{color:r}:null],children:g})]})}function no({title:e}){return h(F,{style:Ne.container,children:h(R,{style:Ne.title,numberOfLines:1,children:e})})}function io({info:e,rect:n}){return W(F,{style:O.content,children:[h(R,{style:O.sectionTitle,children:"Identifiers"}),h(N,{label:"testID",value:e.testID,color:"#10b981"}),h(N,{label:"accessibilityLabel",value:e.accessibilityLabel,color:"#ec4899"}),h(N,{label:"nativeID",value:e.nativeID,color:"#f59e0b"}),h(N,{label:"key",value:e.fiberKey}),h(R,{style:O.sectionTitle,children:"Component"}),h(N,{label:"Component Name",value:e.componentName,color:"#a855f7"}),h(N,{label:"Parent Component",value:e.parentComponentName}),h(N,{label:"Display Name",value:e.displayName}),h(N,{label:"Native View Type",value:e.viewType}),h(N,{label:"Fiber Tag",value:e.fiberTag}),h(R,{style:O.sectionTitle,children:"Position & Size"}),h(N,{label:"X",value:Math.round(n.x)}),h(N,{label:"Y",value:Math.round(n.y)}),h(N,{label:"Width",value:Math.round(n.width)}),h(N,{label:"Height",value:Math.round(n.height)}),h(N,{label:"Depth",value:n.depth}),(e.accessibilityRole||e.accessibilityHint||e.accessibilityState)&&W(Ve,{children:[h(R,{style:O.sectionTitle,children:"Accessibility"}),h(N,{label:"Role",value:e.accessibilityRole}),h(N,{label:"Hint",value:e.accessibilityHint}),e.accessibilityState&&Z?h(Z,{title:"",data:e.accessibilityState,showTypeFilter:true,rawMode:true,initialExpanded:true}):h(N,{label:"State",value:e.accessibilityState})]}),e.styleInfo&&W(Ve,{children:[h(R,{style:O.sectionTitle,children:"Styles"}),Z?h(Z,{title:"",data:e.styleInfo,showTypeFilter:true,rawMode:true,initialExpanded:true}):h(F,{style:O.codeBlock,children:h(R,{style:O.codeText,children:JSON.stringify(e.styleInfo,null,2)})})]})]})}function ao(){let[e,n]=X("off"),[r,g]=X([]),[p,S]=X(null),[C,u]=X(false),s=we.useRef(false),o=ro()?.()?.isDevToolsActive??false,a=Te(c=>{S(c),u(true)},[]),l=Te(()=>{u(false),S(null)},[]),b=e!=="off"&&!o,d=e==="labels"&&!o;return xe(()=>Qt.subscribe(c=>{n(c)}),[]),xe(()=>{if(!b){g([]);return}let c=true,y,v=async()=>{if(!(!c||s.current)){s.current=true;try{let x=Zt();if(x.length===0){s.current=false;return}let T=await eo(x);if(c){let M=d?oo(T):T;g(M)}}catch(x){console.error("[DebugBorders] Error updating measurements:",x)}finally{s.current=false}}},w=setTimeout(()=>{v()},500);return y=setInterval(v,2e3),()=>{c=false,clearTimeout(w),clearInterval(y),s.current=false}},[b,d,r.length]),b?W(F,{style:ee.overlay,pointerEvents:"box-none",dataSet:{debugOverlay:"true"},nativeID:"debug-borders-overlay",children:[r.map((c,y)=>{let v=c.componentInfo,w=v&&(v.testID||v.accessibilityLabel);if(d&&!w)return null;let x=d&&v?v.primaryColor:to(c.depth);return W(we.Fragment,{children:[h(F,{pointerEvents:"none",style:[ee.border,{left:c.x,top:c.y,width:c.width,height:c.height,borderColor:x}]}),d&&w&&h(Q,{activeOpacity:.7,onPress:()=>a(c),style:[ee.labelContainer,{left:c.x,top:c.y-10-(c.labelOffsetY||0),backgroundColor:v.primaryColor}],children:h(R,{style:ee.labelText,numberOfLines:1,children:v.primaryLabel})})]},`border-${y}`)}),Ie&&p?.componentInfo&&h(Ie,{visible:C,onClose:l,initialMode:"bottomSheet",header:{customContent:h(no,{title:p.componentInfo.primaryLabel})},persistenceKey:Xt,enablePersistence:false,children:h(io,{info:p.componentInfo,rect:p})})]}):null}var ee=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:$,color:"#ffffff"}}),Ne=U.create({container:{paddingHorizontal:16,paddingVertical:8,alignItems:"center"},title:{fontSize:16,fontWeight:"600",color:"#ffffff",fontFamily:$}}),O=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:$},value:{fontSize:13,color:"#ffffff",flex:1,fontFamily:$},codeBlock:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:12,borderRadius:8,marginTop:4},codeText:{fontSize:11,color:"#e5e7eb",fontFamily:$}});import{jsx as Le}from"react/jsx-runtime";var j=K(),lo={off:"#6b7280",borders:"#10b981",labels:"#06b6d4"};function so({size:e}){let[n,r]=ve(()=>j.getMode());return Se(()=>j.subscribe(g=>{r(g)}),[]),Le(Ce,{size:e,color:lo[n]})}function Be(){return null}var co={id:"debug-borders",name:"BORDERS",description:"Visual layout debugger - tap to cycle modes",slot:"row",icon:so,component:Be,props:{},launchMode:"toggle-only",onPress:()=>{j.cycle()}};function uo(e){let n={off:e?.offColor||"#6b7280",borders:e?.bordersColor||"#10b981",labels:e?.labelsColor||"#06b6d4"},r=({size:g})=>{let[p,S]=ve(()=>j.getMode());return Se(()=>j.subscribe(C=>{S(C)}),[]),Le(Ce,{size:g,color:n[p]})};return{id:e?.id||"debug-borders",name:e?.name||"BORDERS",description:e?.description||"Visual layout debugger - tap to cycle modes",slot:"row",icon:r,component:Be,props:{},launchMode:"toggle-only",onPress:()=>{j.cycle()}}}B();var te=K(),fo={version:1,getSnapshot:()=>({mode:te.getMode()}),subscribe:e=>te.subscribe(e),actions:{cycleMode:()=>{te.cycle()},setMode:e=>{te.setMode(e.mode)}}};B();B();import{useEffect as Ee,useState as Me}from"react";import{night as I,Layers as po,StatusBadge as bo,StatusIndicator as go}from"@buoy-gg/shared-ui/web";import{jsx as E,jsxs as q}from"react/jsx-runtime";var ie=K();function mo({visible:e,onClose:n}){let[r,g]=Me(false),[p,S]=Me(0);Ee(()=>{let u=ie.subscribe(g);return g(ie.isEnabled()),u},[]),Ee(()=>{if(!r){S(0);return}let u=()=>{try{let{getAllHostComponentInstances:o}=J(),a=o();S(a.length)}catch(o){console.error("[DebugBorders] Error getting component count:",o)}};setTimeout(u,600);let s=setInterval(u,2e3);return()=>clearInterval(s)},[r]);let C=()=>{ie.toggle()};return e?E(F,{style:V.container,children:q(F,{style:V.content,children:[E(R,{style:V.title,children:"Debug Borders"}),E(R,{style:V.description,children:"Visualize component layout structure with colored borders"}),q(F,{style:V.statusRow,children:[E(R,{style:V.statusLabel,children:"Status:"}),E(bo,{status:r?"active":"inactive"})]}),r&&p>0&&q(F,{style:V.statsRow,children:[E(R,{style:V.statsLabel,children:"Components Tracked:"}),E(R,{style:V.statsValue,children:p})]}),E(F,{style:V.toggleContainer,children:q(Q,{style:[V.button,r&&V.buttonActive],onPress:C,accessibilityRole:"button",accessibilityLabel:`Debug borders ${r?"enabled":"disabled"}`,accessibilityHint:"Tap to toggle debug borders",children:[E(po,{size:40,color:r?I.color.accent:I.color.textSecondary}),E(R,{style:[V.buttonText,r&&V.buttonTextActive],children:r?"Disable Borders":"Enable Borders"})]})}),q(F,{style:V.infoBox,children:[E(go,{status:r?"success":"info",size:"small"}),E(R,{style:V.infoText,children:r?"Borders update every 2 seconds. Tap button to disable.":"Tap button to show colored borders around all components."})]}),E(Q,{style:V.closeButton,onPress:n,children:E(R,{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:I.color.surface,borderWidth:1,borderColor:I.color.border,borderRadius:16,padding:32,width:"85%",maxWidth:420,alignItems:"center"},title:{fontSize:24,fontWeight:"700",color:I.color.text,marginBottom:8},description:{fontSize:14,color:I.color.textSecondary,textAlign:"center",marginBottom:24},statusRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statusLabel:{fontSize:14,color:I.color.textSecondary,fontWeight:"600"},statsRow:{flexDirection:"row",alignItems:"center",marginBottom:16,gap:8},statsLabel:{fontSize:14,color:I.color.textSecondary,fontWeight:"600"},statsValue:{fontSize:16,color:I.color.text,fontWeight:"700"},toggleContainer:{alignItems:"center",justifyContent:"center",marginBottom:24},button:{alignItems:"center",justifyContent:"center",padding:24,borderRadius:16,backgroundColor:I.color.surfaceElevated,borderWidth:2,borderColor:I.color.border,minWidth:200},buttonActive:{borderColor:I.color.accentBorderStrong,backgroundColor:I.color.accentSoft},buttonText:{marginTop:12,fontSize:16,fontWeight:"600",color:I.color.textSecondary},buttonTextActive:{color:I.color.accent},infoBox:{flexDirection:"row",alignItems:"flex-start",backgroundColor:I.color.surfaceElevated,padding:12,borderRadius:8,marginBottom:24,gap:8},infoText:{flex:1,fontSize:12,color:I.color.textSecondary,lineHeight:16},closeButton:{paddingVertical:12,paddingHorizontal:32,backgroundColor:I.color.accent,borderRadius:8},closeButtonText:{color:I.color.onAccent,fontSize:16,fontWeight:"600"}});var yo=K(),ho=J(),vo=ye(),So=he();export{yo as DebugBordersManager,mo as DebugBordersModal,ao as DebugBordersStandaloneOverlay,So as colorGeneration,vo as componentMeasurement,uo as createDebugBordersTool,fo as debugBordersSyncAdapter,co as debugBordersToolPreset,ho 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 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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/debug-borders",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.64",
|
|
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.
|
|
38
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
37
|
+
"@buoy-gg/core": "^7.0.64",
|
|
38
|
+
"@buoy-gg/shared-ui": "^7.0.64"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": "*",
|
|
42
|
-
"@buoy-gg/license": "7.0.
|
|
42
|
+
"@buoy-gg/license": "7.0.64"
|
|
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.
|
|
48
|
+
"@buoy-gg/license": "^7.0.64"
|
|
49
49
|
},
|
|
50
50
|
"react-native-builder-bob": {
|
|
51
51
|
"source": "src",
|