@buoy-gg/floating-tools-core 7.0.62 → 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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DevToolsStateManager=void 0;exports.devToolsReducer=devToolsReducer;exports.devToolsStateManager=void 0;const initialState={isDialOpen:false,isSettingsOpen:false,activeSettingsTab:"floating",isInitialized:false};function devToolsReducer(t,e){switch(e.type){case"OPEN_DIAL":return{...t,isDialOpen:true};case"CLOSE_DIAL":return{...t,isDialOpen:false};case"TOGGLE_DIAL":return{...t,isDialOpen:!t.isDialOpen};case"OPEN_SETTINGS":return{...t,isSettingsOpen:true,isDialOpen:false};case"CLOSE_SETTINGS":return{...t,isSettingsOpen:false};case"SET_SETTINGS_TAB":return{...t,activeSettingsTab:e.tab};case"INITIALIZE":return{...t,isInitialized:true};default:return t}}class DevToolsStateManager{listeners=new Set;constructor(e){this.state={...initialState,...e}}getState=()=>{return this.state};getServerState=()=>{return initialState};isDialOpen(){return this.state.isDialOpen}isSettingsOpen(){return this.state.isSettingsOpen}isInitialized(){return this.state.isInitialized}getActiveSettingsTab(){return this.state.activeSettingsTab}dispatch(e){const s=devToolsReducer(this.state,e);if(s!==this.state){this.state=s;this.notifyListeners()}}openDial(){this.dispatch({type:"OPEN_DIAL"})}closeDial(){this.dispatch({type:"CLOSE_DIAL"})}toggleDial(){this.dispatch({type:"TOGGLE_DIAL"})}openSettings(){this.dispatch({type:"OPEN_SETTINGS"})}closeSettings(){this.dispatch({type:"CLOSE_SETTINGS"})}setSettingsTab(e){this.dispatch({type:"SET_SETTINGS_TAB",tab:e})}initialize(){this.dispatch({type:"INITIALIZE"})}subscribe=e=>{this.listeners.add(e);return()=>{this.listeners.delete(e)}};notifyListeners(){this.listeners.forEach(e=>{try{e()}catch(s){console.error("Error in DevToolsStateManager listener:",s)}})}get listenerCount(){return this.listeners.size}reset(){this.state={...initialState};this.notifyListeners()}}exports.DevToolsStateManager=DevToolsStateManager;const devToolsStateManager=exports.devToolsStateManager=new DevToolsStateManager;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DevToolsStateManager=void 0;exports.devToolsReducer=devToolsReducer;exports.devToolsStateManager=void 0;const initialState={isDialOpen:false,isSettingsOpen:false,activeSettingsTab:"floating",isInitialized:false};function devToolsReducer(t,e){switch(e.type){case"OPEN_DIAL":return{...t,isDialOpen:true};case"CLOSE_DIAL":return{...t,isDialOpen:false};case"TOGGLE_DIAL":return{...t,isDialOpen:!t.isDialOpen};case"OPEN_SETTINGS":return{...t,isSettingsOpen:true,isDialOpen:false};case"CLOSE_SETTINGS":return{...t,isSettingsOpen:false};case"SET_SETTINGS_TAB":return{...t,activeSettingsTab:e.tab};case"INITIALIZE":return{...t,isInitialized:true};default:return t}}class DevToolsStateManager{listeners=new Set;constructor(e){this.state={...initialState,...e}}getState=()=>{return this.state};getServerState=()=>{return initialState};isDialOpen(){return this.state.isDialOpen}isSettingsOpen(){return this.state.isSettingsOpen}isInitialized(){return this.state.isInitialized}getActiveSettingsTab(){return this.state.activeSettingsTab}dispatch(e){const s=devToolsReducer(this.state,e);if(s!==this.state){this.state=s;this.notifyListeners()}}openDial(){this.dispatch({type:"OPEN_DIAL"})}closeDial(){this.dispatch({type:"CLOSE_DIAL"})}toggleDial(){this.dispatch({type:"TOGGLE_DIAL"})}openSettings(){this.dispatch({type:"OPEN_SETTINGS"})}closeSettings(){this.dispatch({type:"CLOSE_SETTINGS"})}setSettingsTab(e){this.dispatch({type:"SET_SETTINGS_TAB",tab:e})}initialize(){this.dispatch({type:"INITIALIZE"})}subscribe=e=>{this.listeners.add(e);return()=>{this.listeners.delete(e)}};notifyListeners(){this.listeners.forEach(e=>{try{e()}catch(s){console.error("[Buoy]","Error in DevToolsStateManager listener:",s)}})}get listenerCount(){return this.listeners.size}reset(){this.state={...initialState};this.notifyListeners()}}exports.DevToolsStateManager=DevToolsStateManager;const devToolsStateManager=exports.devToolsStateManager=new DevToolsStateManager;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.monoFont=void 0;var _reactNative=require("react-native");const monoFont=exports.monoFont=_reactNative.Platform.select({ios:"Menlo",android:"monospace",web:'ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace',default:"monospace"})??"monospace";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.monoFont=void 0;var _reactNative=require("react-native");const monoFont=exports.monoFont=_reactNative.Platform.select({ios:"Menlo",android:"monospace",web:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",default:"monospace"})??"monospace";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.monoFont=void 0;const monoFont=exports.monoFont='ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace';
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.monoFont=void 0;const monoFont=exports.monoFont="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.toolLabels=exports.toolDescriptions=exports.toolColors=exports.settingsTabs=exports.settingsStyles=exports.settingsEventBus=exports.settingsColors=exports.sanitizeFloatingSettings=exports.mergeSettingsWithDefaults=exports.globalSettingsConfig=exports.getToolLabel=exports.getToolDescription=exports.getToolColor=exports.getEnabledToolIds=exports.generateDefaultSettings=exports.enforceDialLimit=exports.countEnabledTools=exports.canEnableDialTool=exports.SettingsEventBus=exports.SETTINGS_STORAGE_KEY=exports.MAX_SETTINGS_DIAL_SLOTS=void 0;var _colors=require("./colors.js");const SETTINGS_STORAGE_KEY=exports.SETTINGS_STORAGE_KEY="@react_buoy_dev_tools_settings";const MAX_SETTINGS_DIAL_SLOTS=exports.MAX_SETTINGS_DIAL_SLOTS=6;const settingsTabs=exports.settingsTabs=[{key:"floating",label:"FLOATING"},{key:"settings",label:"SETTINGS"},{key:"pro",label:"PRO"}];const settingsColors=exports.settingsColors={background:"rgba(8, 12, 21, 0.98)",panel:"rgba(16, 22, 35, 0.98)",backdrop:"rgba(0, 0, 0, 0.85)",cardBackground:"#0F172A",cardBorder:"#25324A",cardBorderHover:"#3b4c6b",text:"#E6EEFF",textSecondary:"#B8BFC9",textMuted:"#7F91B2",textDim:"#7A8599",success:"#4AFF9F",warning:"#FFEB3B",error:"#FF5252",info:"#00B8E6",toggleOnBg:e=>(0,_colors.withAlpha)(e,"33"),toggleOnBorder:e=>(0,_colors.withAlpha)(e,"88"),toggleOffBg:"#1b2334",toggleOffBorder:"#2a3550",toggleOffText:"#8CA2C8",tabActiveBg:"rgba(0, 184, 230, 0.13)",tabActiveBorder:"#00B8E6",tabInactiveBg:"transparent",tabInactiveText:"#7A8599"};const toolColors=exports.toolColors={query:"#FF4154",env:"#4AFF9F",sentry:"#FF5252",storage:"#BA68C8",network:"#4AFF9F",wifi:"#4AFF9F",environment:"#4AFF9F","debug-borders":"#10b981","highlight-updates":"#10b981","highlight-updates-modal":"#10b981",benchmark:"#F59E0B","route-events":"#FF9F1C",routes:"#FF9F1C",renders:"#10b981"};const getToolColor=e=>{return toolColors[e]||settingsColors.info};exports.getToolColor=getToolColor;const toolLabels=exports.toolLabels={query:"QUERY",env:"ENV",sentry:"SENTRY",storage:"STORAGE",network:"NET",wifi:"WIFI",environment:"ENV BADGE","debug-borders":"DEBUG BORDERS","highlight-updates":"HIGHLIGHT","highlight-updates-modal":"HIGHLIGHT MODAL",benchmark:"BENCHMARK","route-events":"ROUTES",routes:"ROUTES",renders:"HIGHLIGHT"};const getToolLabel=(e,t)=>{if(t){const n=t.find(o=>o.id===e);if(n?.name)return n.name}return toolLabels[e]||e.toUpperCase().replace(/_/g," ").replace(/-/g," ")};exports.getToolLabel=getToolLabel;const toolDescriptions=exports.toolDescriptions={query:"React Query inspector",env:"Environment variables debugger",sentry:"Error tracking & monitoring",storage:"AsyncStorage browser",network:"Network request logger",wifi:"Network status toggle",environment:"Environment badge indicator","debug-borders":"Component layout borders","highlight-updates":"View component render tracking","highlight-updates-modal":"Render count inspector",benchmark:"Performance benchmarks","route-events":"Route tracking & navigation inspector",routes:"Route tracking & navigation inspector",renders:"View component render tracking modal"};const getToolDescription=(e,t)=>{if(t){const n=t.find(o=>o.id===e);if(n?.description)return n.description}return toolDescriptions[e]||""};exports.getToolDescription=getToolDescription;const settingsStyles=exports.settingsStyles={card:{borderRadius:999,paddingVertical:10,paddingHorizontal:14,marginBottom:10,borderWidth:1},cardInner:{gap:10},iconContainer:{width:28,height:28},toolName:{fontSize:13,fontWeight:"800"},toolDescription:{fontSize:11},toggle:{paddingHorizontal:12,paddingVertical:6,borderRadius:999,borderWidth:1,fontSize:11,fontWeight:"700"},tab:{paddingHorizontal:8,paddingVertical:5,borderRadius:4,fontSize:12,fontWeight:"600",letterSpacing:.5},sectionHeader:{marginBottom:12,paddingHorizontal:4},sectionTitle:{fontSize:10,fontWeight:"700",letterSpacing:1,textTransform:"uppercase"},scrollContent:{paddingTop:16,paddingBottom:24},section:{marginHorizontal:16,marginBottom:24}};const globalSettingsConfig=exports.globalSettingsConfig=[{key:"enableSharedModalDimensions",label:"SHARED MODAL SIZE",category:"MODAL",shortDescription:"Sync dimensions across all tools",fullDescription:"When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.",recommendation:"Keep OFF for the best experience. This allows you to customize each tool's modal size separately. Enable only if you prefer uniform modal sizes across all dev tools."},{key:"expandableWindowControls",label:"EXPAND CONTROLS",category:"MODAL",shortDescription:"iPad-style expandable window buttons",fullDescription:"When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed \u2014 similar to iPad window controls. When disabled, buttons are directly tappable at their small size.",recommendation:"Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access (e.g. when using a mouse or simulator)."}];const enforceDialLimit=(e,t=MAX_SETTINGS_DIAL_SLOTS)=>{let n=t;const o={};for(const[s,r]of Object.entries(e)){if(r&&n>0){o[s]=true;n-=1}else{o[s]=false}}return o};exports.enforceDialLimit=enforceDialLimit;const sanitizeFloatingSettings=(e,t)=>{const{userStatus:n,environment:o,...s}=e;const r=t?Object.entries(s).filter(([i])=>t.includes(i)):Object.entries(s);return{...Object.fromEntries(r),environment:o??false}};exports.sanitizeFloatingSettings=sanitizeFloatingSettings;const mergeSettingsWithDefaults=(e,t,n)=>{if(!t)return e;const o={...e.dialTools,...t.dialTools??{}};const s=n?.allowedDialKeys?Object.entries(o).filter(([i])=>n.allowedDialKeys?.includes(i)):Object.entries(o);const r=enforceDialLimit(Object.fromEntries(s));return{dialTools:r,floatingTools:sanitizeFloatingSettings({...e.floatingTools,...t.floatingTools??{}},n?.allowedFloatingKeys),globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true,...t.globalSettings??{}}}};exports.mergeSettingsWithDefaults=mergeSettingsWithDefaults;const generateDefaultSettings=(e=[],t,n)=>{const o={};const s={};const r=new Set(t??[]);const i=new Set(n??[]);for(const g of e){const{id:a,slot:l="both"}=g;if(l==="dial"||l==="both"){o[a]=i.has(a)}if(l==="row"||l==="both"){s[a]=r.has(a)}}return{dialTools:enforceDialLimit(o),floatingTools:{...s,environment:r.has("environment")},globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true}}};exports.generateDefaultSettings=generateDefaultSettings;const countEnabledTools=e=>{return Object.values(e).filter(Boolean).length};exports.countEnabledTools=countEnabledTools;const canEnableDialTool=(e,t,n=MAX_SETTINGS_DIAL_SLOTS)=>{const o=countEnabledTools(e);const s=e[t];if(s)return true;return o<n};exports.canEnableDialTool=canEnableDialTool;const getEnabledToolIds=e=>{const t=Object.entries(e.floatingTools).filter(([o,s])=>s).map(([o])=>o);const n=Object.entries(e.dialTools).filter(([o,s])=>s).map(([o])=>o);return{floating:t,dial:n}};exports.getEnabledToolIds=getEnabledToolIds;class SettingsEventBus{listeners=new Set;emit(t){this.listeners.forEach(n=>{try{n(t)}catch(o){console.error("Error emitting settings event:",o)}})}addListener(t){this.listeners.add(t);return()=>this.listeners.delete(t)}clear(){this.listeners.clear()}get listenerCount(){return this.listeners.size}}exports.SettingsEventBus=SettingsEventBus;const settingsEventBus=exports.settingsEventBus=new SettingsEventBus;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.toolLabels=exports.toolDescriptions=exports.toolColors=exports.settingsTabs=exports.settingsStyles=exports.settingsEventBus=exports.settingsColors=exports.sanitizeFloatingSettings=exports.mergeSettingsWithDefaults=exports.globalSettingsConfig=exports.getToolLabel=exports.getToolDescription=exports.getToolColor=exports.getEnabledToolIds=exports.generateDefaultSettings=exports.enforceDialLimit=exports.countEnabledTools=exports.canEnableDialTool=exports.SettingsEventBus=exports.SETTINGS_STORAGE_KEY=exports.MAX_SETTINGS_DIAL_SLOTS=void 0;var _colors=require("./colors.js");const SETTINGS_STORAGE_KEY=exports.SETTINGS_STORAGE_KEY="@react_buoy_dev_tools_settings";const MAX_SETTINGS_DIAL_SLOTS=exports.MAX_SETTINGS_DIAL_SLOTS=6;const settingsTabs=exports.settingsTabs=[{key:"floating",label:"FLOATING"},{key:"settings",label:"SETTINGS"},{key:"pro",label:"PRO"}];const settingsColors=exports.settingsColors={background:"rgba(8, 12, 21, 0.98)",panel:"rgba(16, 22, 35, 0.98)",backdrop:"rgba(0, 0, 0, 0.85)",cardBackground:"#0F172A",cardBorder:"#25324A",cardBorderHover:"#3b4c6b",text:"#E6EEFF",textSecondary:"#B8BFC9",textMuted:"#7F91B2",textDim:"#7A8599",success:"#4AFF9F",warning:"#FFEB3B",error:"#FF5252",info:"#00B8E6",toggleOnBg:e=>(0,_colors.withAlpha)(e,"33"),toggleOnBorder:e=>(0,_colors.withAlpha)(e,"88"),toggleOffBg:"#1b2334",toggleOffBorder:"#2a3550",toggleOffText:"#8CA2C8",tabActiveBg:"rgba(0, 184, 230, 0.13)",tabActiveBorder:"#00B8E6",tabInactiveBg:"transparent",tabInactiveText:"#7A8599"};const toolColors=exports.toolColors={query:"#FF4154",env:"#4AFF9F",sentry:"#FF5252",storage:"#BA68C8",network:"#4AFF9F",wifi:"#4AFF9F",environment:"#4AFF9F","debug-borders":"#10b981","highlight-updates":"#10b981","highlight-updates-modal":"#10b981",benchmark:"#F59E0B","route-events":"#FF9F1C",routes:"#FF9F1C",renders:"#10b981"};const getToolColor=e=>{return toolColors[e]||settingsColors.info};exports.getToolColor=getToolColor;const toolLabels=exports.toolLabels={query:"QUERY",env:"ENV",sentry:"SENTRY",storage:"STORAGE",network:"NET",wifi:"WIFI",environment:"ENV BADGE","debug-borders":"DEBUG BORDERS","highlight-updates":"HIGHLIGHT","highlight-updates-modal":"HIGHLIGHT MODAL",benchmark:"BENCHMARK","route-events":"ROUTES",routes:"ROUTES",renders:"HIGHLIGHT"};const getToolLabel=(e,t)=>{if(t){const n=t.find(o=>o.id===e);if(n?.name)return n.name}return toolLabels[e]||e.toUpperCase().replace(/_/g," ").replace(/-/g," ")};exports.getToolLabel=getToolLabel;const toolDescriptions=exports.toolDescriptions={query:"React Query inspector",env:"Environment variables debugger",sentry:"Error tracking & monitoring",storage:"AsyncStorage browser",network:"Network request logger",wifi:"Network status toggle",environment:"Environment badge indicator","debug-borders":"Component layout borders","highlight-updates":"View component render tracking","highlight-updates-modal":"Render count inspector",benchmark:"Performance benchmarks","route-events":"Route tracking & navigation inspector",routes:"Route tracking & navigation inspector",renders:"View component render tracking modal"};const getToolDescription=(e,t)=>{if(t){const n=t.find(o=>o.id===e);if(n?.description)return n.description}return toolDescriptions[e]||""};exports.getToolDescription=getToolDescription;const settingsStyles=exports.settingsStyles={card:{borderRadius:999,paddingVertical:10,paddingHorizontal:14,marginBottom:10,borderWidth:1},cardInner:{gap:10},iconContainer:{width:28,height:28},toolName:{fontSize:13,fontWeight:"800"},toolDescription:{fontSize:11},toggle:{paddingHorizontal:12,paddingVertical:6,borderRadius:999,borderWidth:1,fontSize:11,fontWeight:"700"},tab:{paddingHorizontal:8,paddingVertical:5,borderRadius:4,fontSize:12,fontWeight:"600",letterSpacing:.5},sectionHeader:{marginBottom:12,paddingHorizontal:4},sectionTitle:{fontSize:10,fontWeight:"700",letterSpacing:1,textTransform:"uppercase"},scrollContent:{paddingTop:16,paddingBottom:24},section:{marginHorizontal:16,marginBottom:24}};const globalSettingsConfig=exports.globalSettingsConfig=[{key:"enableSharedModalDimensions",label:"SHARED MODAL SIZE",category:"MODAL",shortDescription:"Sync dimensions across all tools",fullDescription:"When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.",recommendation:"Keep OFF for the best experience. This allows you to customize each tool's modal size separately. Enable only if you prefer uniform modal sizes across all dev tools."},{key:"expandableWindowControls",label:"EXPAND CONTROLS",category:"MODAL",shortDescription:"iPad-style expandable window buttons",fullDescription:"When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed \u2014 similar to iPad window controls. When disabled, buttons are directly tappable at their small size.",recommendation:"Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access (e.g. when using a mouse or simulator)."}];const enforceDialLimit=(e,t=MAX_SETTINGS_DIAL_SLOTS)=>{let n=t;const o={};for(const[s,r]of Object.entries(e)){if(r&&n>0){o[s]=true;n-=1}else{o[s]=false}}return o};exports.enforceDialLimit=enforceDialLimit;const sanitizeFloatingSettings=(e,t)=>{const{userStatus:n,environment:o,...s}=e;const r=t?Object.entries(s).filter(([i])=>t.includes(i)):Object.entries(s);return{...Object.fromEntries(r),environment:o??false}};exports.sanitizeFloatingSettings=sanitizeFloatingSettings;const mergeSettingsWithDefaults=(e,t,n)=>{if(!t)return e;const o={...e.dialTools,...t.dialTools??{}};const s=n?.allowedDialKeys?Object.entries(o).filter(([i])=>n.allowedDialKeys?.includes(i)):Object.entries(o);const r=enforceDialLimit(Object.fromEntries(s));return{dialTools:r,floatingTools:sanitizeFloatingSettings({...e.floatingTools,...t.floatingTools??{}},n?.allowedFloatingKeys),globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true,...t.globalSettings??{}}}};exports.mergeSettingsWithDefaults=mergeSettingsWithDefaults;const generateDefaultSettings=(e=[],t,n)=>{const o={};const s={};const r=new Set(t??[]);const i=new Set(n??[]);for(const g of e){const{id:a,slot:l="both"}=g;if(l==="dial"||l==="both"){o[a]=i.has(a)}if(l==="row"||l==="both"){s[a]=r.has(a)}}return{dialTools:enforceDialLimit(o),floatingTools:{...s,environment:r.has("environment")},globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true}}};exports.generateDefaultSettings=generateDefaultSettings;const countEnabledTools=e=>{return Object.values(e).filter(Boolean).length};exports.countEnabledTools=countEnabledTools;const canEnableDialTool=(e,t,n=MAX_SETTINGS_DIAL_SLOTS)=>{const o=countEnabledTools(e);const s=e[t];if(s)return true;return o<n};exports.canEnableDialTool=canEnableDialTool;const getEnabledToolIds=e=>{const t=Object.entries(e.floatingTools).filter(([o,s])=>s).map(([o])=>o);const n=Object.entries(e.dialTools).filter(([o,s])=>s).map(([o])=>o);return{floating:t,dial:n}};exports.getEnabledToolIds=getEnabledToolIds;class SettingsEventBus{listeners=new Set;emit(t){this.listeners.forEach(n=>{try{n(t)}catch(o){console.error("[Buoy]","Error emitting settings event:",o)}})}addListener(t){this.listeners.add(t);return()=>this.listeners.delete(t)}clear(){this.listeners.clear()}get listenerCount(){return this.listeners.size}}exports.SettingsEventBus=SettingsEventBus;const settingsEventBus=exports.settingsEventBus=new SettingsEventBus;
@@ -1 +1 @@
1
- "use strict";const s={isDialOpen:false,isSettingsOpen:false,activeSettingsTab:"floating",isInitialized:false};export function devToolsReducer(e,t){switch(t.type){case"OPEN_DIAL":return{...e,isDialOpen:true};case"CLOSE_DIAL":return{...e,isDialOpen:false};case"TOGGLE_DIAL":return{...e,isDialOpen:!e.isDialOpen};case"OPEN_SETTINGS":return{...e,isSettingsOpen:true,isDialOpen:false};case"CLOSE_SETTINGS":return{...e,isSettingsOpen:false};case"SET_SETTINGS_TAB":return{...e,activeSettingsTab:t.tab};case"INITIALIZE":return{...e,isInitialized:true};default:return e}}export class DevToolsStateManager{listeners=new Set;constructor(t){this.state={...s,...t}}getState=()=>{return this.state};getServerState=()=>{return s};isDialOpen(){return this.state.isDialOpen}isSettingsOpen(){return this.state.isSettingsOpen}isInitialized(){return this.state.isInitialized}getActiveSettingsTab(){return this.state.activeSettingsTab}dispatch(t){const i=devToolsReducer(this.state,t);if(i!==this.state){this.state=i;this.notifyListeners()}}openDial(){this.dispatch({type:"OPEN_DIAL"})}closeDial(){this.dispatch({type:"CLOSE_DIAL"})}toggleDial(){this.dispatch({type:"TOGGLE_DIAL"})}openSettings(){this.dispatch({type:"OPEN_SETTINGS"})}closeSettings(){this.dispatch({type:"CLOSE_SETTINGS"})}setSettingsTab(t){this.dispatch({type:"SET_SETTINGS_TAB",tab:t})}initialize(){this.dispatch({type:"INITIALIZE"})}subscribe=t=>{this.listeners.add(t);return()=>{this.listeners.delete(t)}};notifyListeners(){this.listeners.forEach(t=>{try{t()}catch(i){console.error("Error in DevToolsStateManager listener:",i)}})}get listenerCount(){return this.listeners.size}reset(){this.state={...s};this.notifyListeners()}}export const devToolsStateManager=new DevToolsStateManager;
1
+ "use strict";const s={isDialOpen:false,isSettingsOpen:false,activeSettingsTab:"floating",isInitialized:false};export function devToolsReducer(e,t){switch(t.type){case"OPEN_DIAL":return{...e,isDialOpen:true};case"CLOSE_DIAL":return{...e,isDialOpen:false};case"TOGGLE_DIAL":return{...e,isDialOpen:!e.isDialOpen};case"OPEN_SETTINGS":return{...e,isSettingsOpen:true,isDialOpen:false};case"CLOSE_SETTINGS":return{...e,isSettingsOpen:false};case"SET_SETTINGS_TAB":return{...e,activeSettingsTab:t.tab};case"INITIALIZE":return{...e,isInitialized:true};default:return e}}export class DevToolsStateManager{listeners=new Set;constructor(t){this.state={...s,...t}}getState=()=>{return this.state};getServerState=()=>{return s};isDialOpen(){return this.state.isDialOpen}isSettingsOpen(){return this.state.isSettingsOpen}isInitialized(){return this.state.isInitialized}getActiveSettingsTab(){return this.state.activeSettingsTab}dispatch(t){const i=devToolsReducer(this.state,t);if(i!==this.state){this.state=i;this.notifyListeners()}}openDial(){this.dispatch({type:"OPEN_DIAL"})}closeDial(){this.dispatch({type:"CLOSE_DIAL"})}toggleDial(){this.dispatch({type:"TOGGLE_DIAL"})}openSettings(){this.dispatch({type:"OPEN_SETTINGS"})}closeSettings(){this.dispatch({type:"CLOSE_SETTINGS"})}setSettingsTab(t){this.dispatch({type:"SET_SETTINGS_TAB",tab:t})}initialize(){this.dispatch({type:"INITIALIZE"})}subscribe=t=>{this.listeners.add(t);return()=>{this.listeners.delete(t)}};notifyListeners(){this.listeners.forEach(t=>{try{t()}catch(i){console.error("[Buoy]","Error in DevToolsStateManager listener:",i)}})}get listenerCount(){return this.listeners.size}reset(){this.state={...s};this.notifyListeners()}}export const devToolsStateManager=new DevToolsStateManager;
@@ -1 +1 @@
1
- "use strict";import{Platform as o}from"react-native";export const monoFont=o.select({ios:"Menlo",android:"monospace",web:'ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace',default:"monospace"})??"monospace";
1
+ "use strict";import{Platform as o}from"react-native";export const monoFont=o.select({ios:"Menlo",android:"monospace",web:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",default:"monospace"})??"monospace";
@@ -1 +1 @@
1
- "use strict";export const monoFont='ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace';
1
+ "use strict";export const monoFont="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
@@ -1 +1 @@
1
- "use strict";import{withAlpha as d}from"./colors.js";export const SETTINGS_STORAGE_KEY="@react_buoy_dev_tools_settings";export const MAX_SETTINGS_DIAL_SLOTS=6;export const settingsTabs=[{key:"floating",label:"FLOATING"},{key:"settings",label:"SETTINGS"},{key:"pro",label:"PRO"}];export const settingsColors={background:"rgba(8, 12, 21, 0.98)",panel:"rgba(16, 22, 35, 0.98)",backdrop:"rgba(0, 0, 0, 0.85)",cardBackground:"#0F172A",cardBorder:"#25324A",cardBorderHover:"#3b4c6b",text:"#E6EEFF",textSecondary:"#B8BFC9",textMuted:"#7F91B2",textDim:"#7A8599",success:"#4AFF9F",warning:"#FFEB3B",error:"#FF5252",info:"#00B8E6",toggleOnBg:e=>d(e,"33"),toggleOnBorder:e=>d(e,"88"),toggleOffBg:"#1b2334",toggleOffBorder:"#2a3550",toggleOffText:"#8CA2C8",tabActiveBg:"rgba(0, 184, 230, 0.13)",tabActiveBorder:"#00B8E6",tabInactiveBg:"transparent",tabInactiveText:"#7A8599"};export const toolColors={query:"#FF4154",env:"#4AFF9F",sentry:"#FF5252",storage:"#BA68C8",network:"#4AFF9F",wifi:"#4AFF9F",environment:"#4AFF9F","debug-borders":"#10b981","highlight-updates":"#10b981","highlight-updates-modal":"#10b981",benchmark:"#F59E0B","route-events":"#FF9F1C",routes:"#FF9F1C",renders:"#10b981"};export const getToolColor=e=>{return toolColors[e]||settingsColors.info};export const toolLabels={query:"QUERY",env:"ENV",sentry:"SENTRY",storage:"STORAGE",network:"NET",wifi:"WIFI",environment:"ENV BADGE","debug-borders":"DEBUG BORDERS","highlight-updates":"HIGHLIGHT","highlight-updates-modal":"HIGHLIGHT MODAL",benchmark:"BENCHMARK","route-events":"ROUTES",routes:"ROUTES",renders:"HIGHLIGHT"};export const getToolLabel=(e,t)=>{if(t){const n=t.find(o=>o.id===e);if(n?.name)return n.name}return toolLabels[e]||e.toUpperCase().replace(/_/g," ").replace(/-/g," ")};export const toolDescriptions={query:"React Query inspector",env:"Environment variables debugger",sentry:"Error tracking & monitoring",storage:"AsyncStorage browser",network:"Network request logger",wifi:"Network status toggle",environment:"Environment badge indicator","debug-borders":"Component layout borders","highlight-updates":"View component render tracking","highlight-updates-modal":"Render count inspector",benchmark:"Performance benchmarks","route-events":"Route tracking & navigation inspector",routes:"Route tracking & navigation inspector",renders:"View component render tracking modal"};export const getToolDescription=(e,t)=>{if(t){const n=t.find(o=>o.id===e);if(n?.description)return n.description}return toolDescriptions[e]||""};export const settingsStyles={card:{borderRadius:999,paddingVertical:10,paddingHorizontal:14,marginBottom:10,borderWidth:1},cardInner:{gap:10},iconContainer:{width:28,height:28},toolName:{fontSize:13,fontWeight:"800"},toolDescription:{fontSize:11},toggle:{paddingHorizontal:12,paddingVertical:6,borderRadius:999,borderWidth:1,fontSize:11,fontWeight:"700"},tab:{paddingHorizontal:8,paddingVertical:5,borderRadius:4,fontSize:12,fontWeight:"600",letterSpacing:.5},sectionHeader:{marginBottom:12,paddingHorizontal:4},sectionTitle:{fontSize:10,fontWeight:"700",letterSpacing:1,textTransform:"uppercase"},scrollContent:{paddingTop:16,paddingBottom:24},section:{marginHorizontal:16,marginBottom:24}};export const globalSettingsConfig=[{key:"enableSharedModalDimensions",label:"SHARED MODAL SIZE",category:"MODAL",shortDescription:"Sync dimensions across all tools",fullDescription:"When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.",recommendation:"Keep OFF for the best experience. This allows you to customize each tool's modal size separately. Enable only if you prefer uniform modal sizes across all dev tools."},{key:"expandableWindowControls",label:"EXPAND CONTROLS",category:"MODAL",shortDescription:"iPad-style expandable window buttons",fullDescription:"When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed \u2014 similar to iPad window controls. When disabled, buttons are directly tappable at their small size.",recommendation:"Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access (e.g. when using a mouse or simulator)."}];export const enforceDialLimit=(e,t=MAX_SETTINGS_DIAL_SLOTS)=>{let n=t;const o={};for(const[r,i]of Object.entries(e)){if(i&&n>0){o[r]=true;n-=1}else{o[r]=false}}return o};export const sanitizeFloatingSettings=(e,t)=>{const{userStatus:n,environment:o,...r}=e;const i=t?Object.entries(r).filter(([s])=>t.includes(s)):Object.entries(r);return{...Object.fromEntries(i),environment:o??false}};export const mergeSettingsWithDefaults=(e,t,n)=>{if(!t)return e;const o={...e.dialTools,...t.dialTools??{}};const r=n?.allowedDialKeys?Object.entries(o).filter(([s])=>n.allowedDialKeys?.includes(s)):Object.entries(o);const i=enforceDialLimit(Object.fromEntries(r));return{dialTools:i,floatingTools:sanitizeFloatingSettings({...e.floatingTools,...t.floatingTools??{}},n?.allowedFloatingKeys),globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true,...t.globalSettings??{}}}};export const generateDefaultSettings=(e=[],t,n)=>{const o={};const r={};const i=new Set(t??[]);const s=new Set(n??[]);for(const c of e){const{id:a,slot:l="both"}=c;if(l==="dial"||l==="both"){o[a]=s.has(a)}if(l==="row"||l==="both"){r[a]=i.has(a)}}return{dialTools:enforceDialLimit(o),floatingTools:{...r,environment:i.has("environment")},globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true}}};export const countEnabledTools=e=>{return Object.values(e).filter(Boolean).length};export const canEnableDialTool=(e,t,n=MAX_SETTINGS_DIAL_SLOTS)=>{const o=countEnabledTools(e);const r=e[t];if(r)return true;return o<n};export const getEnabledToolIds=e=>{const t=Object.entries(e.floatingTools).filter(([o,r])=>r).map(([o])=>o);const n=Object.entries(e.dialTools).filter(([o,r])=>r).map(([o])=>o);return{floating:t,dial:n}};export class SettingsEventBus{listeners=new Set;emit(t){this.listeners.forEach(n=>{try{n(t)}catch(o){console.error("Error emitting settings event:",o)}})}addListener(t){this.listeners.add(t);return()=>this.listeners.delete(t)}clear(){this.listeners.clear()}get listenerCount(){return this.listeners.size}}export const settingsEventBus=new SettingsEventBus;
1
+ "use strict";import{withAlpha as d}from"./colors.js";export const SETTINGS_STORAGE_KEY="@react_buoy_dev_tools_settings";export const MAX_SETTINGS_DIAL_SLOTS=6;export const settingsTabs=[{key:"floating",label:"FLOATING"},{key:"settings",label:"SETTINGS"},{key:"pro",label:"PRO"}];export const settingsColors={background:"rgba(8, 12, 21, 0.98)",panel:"rgba(16, 22, 35, 0.98)",backdrop:"rgba(0, 0, 0, 0.85)",cardBackground:"#0F172A",cardBorder:"#25324A",cardBorderHover:"#3b4c6b",text:"#E6EEFF",textSecondary:"#B8BFC9",textMuted:"#7F91B2",textDim:"#7A8599",success:"#4AFF9F",warning:"#FFEB3B",error:"#FF5252",info:"#00B8E6",toggleOnBg:e=>d(e,"33"),toggleOnBorder:e=>d(e,"88"),toggleOffBg:"#1b2334",toggleOffBorder:"#2a3550",toggleOffText:"#8CA2C8",tabActiveBg:"rgba(0, 184, 230, 0.13)",tabActiveBorder:"#00B8E6",tabInactiveBg:"transparent",tabInactiveText:"#7A8599"};export const toolColors={query:"#FF4154",env:"#4AFF9F",sentry:"#FF5252",storage:"#BA68C8",network:"#4AFF9F",wifi:"#4AFF9F",environment:"#4AFF9F","debug-borders":"#10b981","highlight-updates":"#10b981","highlight-updates-modal":"#10b981",benchmark:"#F59E0B","route-events":"#FF9F1C",routes:"#FF9F1C",renders:"#10b981"};export const getToolColor=e=>{return toolColors[e]||settingsColors.info};export const toolLabels={query:"QUERY",env:"ENV",sentry:"SENTRY",storage:"STORAGE",network:"NET",wifi:"WIFI",environment:"ENV BADGE","debug-borders":"DEBUG BORDERS","highlight-updates":"HIGHLIGHT","highlight-updates-modal":"HIGHLIGHT MODAL",benchmark:"BENCHMARK","route-events":"ROUTES",routes:"ROUTES",renders:"HIGHLIGHT"};export const getToolLabel=(e,t)=>{if(t){const n=t.find(o=>o.id===e);if(n?.name)return n.name}return toolLabels[e]||e.toUpperCase().replace(/_/g," ").replace(/-/g," ")};export const toolDescriptions={query:"React Query inspector",env:"Environment variables debugger",sentry:"Error tracking & monitoring",storage:"AsyncStorage browser",network:"Network request logger",wifi:"Network status toggle",environment:"Environment badge indicator","debug-borders":"Component layout borders","highlight-updates":"View component render tracking","highlight-updates-modal":"Render count inspector",benchmark:"Performance benchmarks","route-events":"Route tracking & navigation inspector",routes:"Route tracking & navigation inspector",renders:"View component render tracking modal"};export const getToolDescription=(e,t)=>{if(t){const n=t.find(o=>o.id===e);if(n?.description)return n.description}return toolDescriptions[e]||""};export const settingsStyles={card:{borderRadius:999,paddingVertical:10,paddingHorizontal:14,marginBottom:10,borderWidth:1},cardInner:{gap:10},iconContainer:{width:28,height:28},toolName:{fontSize:13,fontWeight:"800"},toolDescription:{fontSize:11},toggle:{paddingHorizontal:12,paddingVertical:6,borderRadius:999,borderWidth:1,fontSize:11,fontWeight:"700"},tab:{paddingHorizontal:8,paddingVertical:5,borderRadius:4,fontSize:12,fontWeight:"600",letterSpacing:.5},sectionHeader:{marginBottom:12,paddingHorizontal:4},sectionTitle:{fontSize:10,fontWeight:"700",letterSpacing:1,textTransform:"uppercase"},scrollContent:{paddingTop:16,paddingBottom:24},section:{marginHorizontal:16,marginBottom:24}};export const globalSettingsConfig=[{key:"enableSharedModalDimensions",label:"SHARED MODAL SIZE",category:"MODAL",shortDescription:"Sync dimensions across all tools",fullDescription:"When enabled, all tool modals will share the same size and position. Resizing one modal will affect all others. When disabled, each tool remembers its own size and position independently.",recommendation:"Keep OFF for the best experience. This allows you to customize each tool's modal size separately. Enable only if you prefer uniform modal sizes across all dev tools."},{key:"expandableWindowControls",label:"EXPAND CONTROLS",category:"MODAL",shortDescription:"iPad-style expandable window buttons",fullDescription:"When enabled, the window control buttons (minimize, toggle mode, close) start as small dots and expand into larger, easy-to-tap buttons when pressed \u2014 similar to iPad window controls. When disabled, buttons are directly tappable at their small size.",recommendation:"Keep ON for touch devices where the small buttons are hard to press. Turn OFF if you prefer direct single-tap access (e.g. when using a mouse or simulator)."}];export const enforceDialLimit=(e,t=MAX_SETTINGS_DIAL_SLOTS)=>{let n=t;const o={};for(const[r,i]of Object.entries(e)){if(i&&n>0){o[r]=true;n-=1}else{o[r]=false}}return o};export const sanitizeFloatingSettings=(e,t)=>{const{userStatus:n,environment:o,...r}=e;const i=t?Object.entries(r).filter(([s])=>t.includes(s)):Object.entries(r);return{...Object.fromEntries(i),environment:o??false}};export const mergeSettingsWithDefaults=(e,t,n)=>{if(!t)return e;const o={...e.dialTools,...t.dialTools??{}};const r=n?.allowedDialKeys?Object.entries(o).filter(([s])=>n.allowedDialKeys?.includes(s)):Object.entries(o);const i=enforceDialLimit(Object.fromEntries(r));return{dialTools:i,floatingTools:sanitizeFloatingSettings({...e.floatingTools,...t.floatingTools??{}},n?.allowedFloatingKeys),globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true,...t.globalSettings??{}}}};export const generateDefaultSettings=(e=[],t,n)=>{const o={};const r={};const i=new Set(t??[]);const s=new Set(n??[]);for(const c of e){const{id:a,slot:l="both"}=c;if(l==="dial"||l==="both"){o[a]=s.has(a)}if(l==="row"||l==="both"){r[a]=i.has(a)}}return{dialTools:enforceDialLimit(o),floatingTools:{...r,environment:i.has("environment")},globalSettings:{enableSharedModalDimensions:false,expandableWindowControls:true}}};export const countEnabledTools=e=>{return Object.values(e).filter(Boolean).length};export const canEnableDialTool=(e,t,n=MAX_SETTINGS_DIAL_SLOTS)=>{const o=countEnabledTools(e);const r=e[t];if(r)return true;return o<n};export const getEnabledToolIds=e=>{const t=Object.entries(e.floatingTools).filter(([o,r])=>r).map(([o])=>o);const n=Object.entries(e.dialTools).filter(([o,r])=>r).map(([o])=>o);return{floating:t,dial:n}};export class SettingsEventBus{listeners=new Set;emit(t){this.listeners.forEach(n=>{try{n(t)}catch(o){console.error("[Buoy]","Error emitting settings event:",o)}})}addListener(t){this.listeners.add(t);return()=>this.listeners.delete(t)}clear(){this.listeners.clear()}get listenerCount(){return this.listeners.size}}export const settingsEventBus=new SettingsEventBus;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The monospace family, per platform — THE seam for every `fontFamily` in Buoy.
2
+ * The shared monospace family, per platform.
3
3
  *
4
4
  * `"monospace"` is an ANDROID family name. iOS has no family called that, so
5
5
  * React Native silently falls back to the system font: every code path, header
@@ -1,3 +1,3 @@
1
1
  /** Browser twin of fonts.ts, without loading React Native into DOM hosts. */
2
- export declare const monoFont = "ui-monospace, \"SF Mono\", \"SFMono-Regular\", Menlo, Monaco, \"Cascadia Code\", \"Roboto Mono\", Consolas, \"Liberation Mono\", monospace";
2
+ export declare const monoFont = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
3
3
  //# sourceMappingURL=fonts.web.d.ts.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The monospace family, per platform — THE seam for every `fontFamily` in Buoy.
2
+ * The shared monospace family, per platform.
3
3
  *
4
4
  * `"monospace"` is an ANDROID family name. iOS has no family called that, so
5
5
  * React Native silently falls back to the system font: every code path, header
@@ -1,3 +1,3 @@
1
1
  /** Browser twin of fonts.ts, without loading React Native into DOM hosts. */
2
- export declare const monoFont = "ui-monospace, \"SF Mono\", \"SFMono-Regular\", Menlo, Monaco, \"Cascadia Code\", \"Roboto Mono\", Consolas, \"Liberation Mono\", monospace";
2
+ export declare const monoFont = "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
3
3
  //# sourceMappingURL=fonts.web.d.ts.map