@buoy-gg/shared-ui 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.
Files changed (121) hide show
  1. package/README.md +3 -0
  2. package/lib/commonjs/JsModal.web.js +1 -1
  3. package/lib/commonjs/clipboard/copyToClipboard.js +1 -1
  4. package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1 -1
  5. package/lib/commonjs/hooks/useDeviceInfo.js +1 -1
  6. package/lib/commonjs/license/AccountSetup.web.js +2 -2
  7. package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -1
  8. package/lib/commonjs/storage/buoyOwnership.js +1 -0
  9. package/lib/commonjs/storage/buoyOwnership.test.js +1 -0
  10. package/lib/commonjs/storage/devToolsStorageKeys.js +1 -1
  11. package/lib/commonjs/storage/index.js +1 -1
  12. package/lib/commonjs/ui/components/ChangeRow.js +1 -1
  13. package/lib/commonjs/ui/components/CompactRow.js +1 -1
  14. package/lib/commonjs/ui/components/DataInspector.js +1 -1
  15. package/lib/commonjs/ui/components/DraggableHeader.js +1 -1
  16. package/lib/commonjs/ui/floating/FloatingTool.web.js +1 -1
  17. package/lib/commonjs/ui/floating/index.web.js +1 -1
  18. package/lib/commonjs/ui/floating/portalHost.test.js +1 -0
  19. package/lib/commonjs/ui/floating/portalHost.web.js +1 -0
  20. package/lib/commonjs/ui/fonts.js +1 -1
  21. package/lib/commonjs/ui/index.js +1 -1
  22. package/lib/commonjs/ui/systemFont.js +1 -0
  23. package/lib/commonjs/utils/loadOptionalModule.js +1 -1
  24. package/lib/commonjs/utils/minimalSuperJSON.js +1 -1
  25. package/lib/commonjs/utils/nativeWeb.js +1 -1
  26. package/lib/commonjs/utils/persistentStorage.js +1 -1
  27. package/lib/module/JsModal.web.js +1 -1
  28. package/lib/module/clipboard/copyToClipboard.js +1 -1
  29. package/lib/module/dataViewer/VirtualizedDataExplorer.js +1 -1
  30. package/lib/module/hooks/useDeviceInfo.js +1 -1
  31. package/lib/module/license/AccountSetup.web.js +2 -2
  32. package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
  33. package/lib/module/storage/buoyOwnership.js +1 -0
  34. package/lib/module/storage/buoyOwnership.test.js +1 -0
  35. package/lib/module/storage/devToolsStorageKeys.js +1 -1
  36. package/lib/module/storage/index.js +1 -1
  37. package/lib/module/ui/components/ChangeRow.js +1 -1
  38. package/lib/module/ui/components/CompactRow.js +1 -1
  39. package/lib/module/ui/components/DataInspector.js +1 -1
  40. package/lib/module/ui/components/DraggableHeader.js +1 -1
  41. package/lib/module/ui/floating/FloatingTool.web.js +1 -1
  42. package/lib/module/ui/floating/index.web.js +1 -1
  43. package/lib/module/ui/floating/portalHost.test.js +1 -0
  44. package/lib/module/ui/floating/portalHost.web.js +1 -0
  45. package/lib/module/ui/fonts.js +1 -1
  46. package/lib/module/ui/index.js +1 -1
  47. package/lib/module/ui/systemFont.js +1 -0
  48. package/lib/module/utils/loadOptionalModule.js +1 -1
  49. package/lib/module/utils/minimalSuperJSON.js +1 -1
  50. package/lib/module/utils/nativeWeb.js +1 -1
  51. package/lib/module/utils/persistentStorage.js +1 -1
  52. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  53. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +1 -1
  54. package/lib/typescript/commonjs/storage/buoyOwnership.d.ts +15 -0
  55. package/lib/typescript/commonjs/storage/buoyOwnership.test.d.ts +2 -0
  56. package/lib/typescript/commonjs/storage/index.d.ts +1 -0
  57. package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts +2 -2
  58. package/lib/typescript/commonjs/ui/floating/index.web.d.ts +1 -0
  59. package/lib/typescript/commonjs/ui/floating/portalHost.test.d.ts +2 -0
  60. package/lib/typescript/commonjs/ui/floating/portalHost.web.d.ts +8 -0
  61. package/lib/typescript/commonjs/ui/fonts.d.ts +1 -0
  62. package/lib/typescript/commonjs/ui/index.d.ts +1 -1
  63. package/lib/typescript/commonjs/ui/systemFont.d.ts +2 -0
  64. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  65. package/lib/typescript/module/license/AccountSetup.web.d.ts +1 -1
  66. package/lib/typescript/module/storage/buoyOwnership.d.ts +15 -0
  67. package/lib/typescript/module/storage/buoyOwnership.test.d.ts +2 -0
  68. package/lib/typescript/module/storage/index.d.ts +1 -0
  69. package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts +2 -2
  70. package/lib/typescript/module/ui/floating/index.web.d.ts +1 -0
  71. package/lib/typescript/module/ui/floating/portalHost.test.d.ts +2 -0
  72. package/lib/typescript/module/ui/floating/portalHost.web.d.ts +8 -0
  73. package/lib/typescript/module/ui/fonts.d.ts +1 -0
  74. package/lib/typescript/module/ui/index.d.ts +1 -1
  75. package/lib/typescript/module/ui/systemFont.d.ts +2 -0
  76. package/lib/web/asyncStorage.mjs +1 -1
  77. package/lib/web/chunks/chunk-3HELV44Y.mjs +1 -0
  78. package/lib/web/chunks/chunk-4HIK66DZ.mjs +1 -0
  79. package/lib/web/chunks/chunk-4YLP5MMN.mjs +1 -0
  80. package/lib/web/chunks/chunk-5G6RSRP4.mjs +1 -0
  81. package/lib/web/chunks/chunk-7JJHWSTD.mjs +1 -0
  82. package/lib/web/chunks/chunk-AHVO74UQ.mjs +1 -0
  83. package/lib/web/chunks/chunk-CJTGUGMQ.mjs +1 -0
  84. package/lib/web/chunks/chunk-FA6WAQUA.mjs +6 -0
  85. package/lib/web/chunks/chunk-GMM6TGFO.mjs +1 -0
  86. package/lib/web/chunks/chunk-HIAN3HBD.mjs +1 -0
  87. package/lib/web/chunks/chunk-HPZXETRA.mjs +1 -0
  88. package/lib/web/chunks/chunk-NOSWH3E2.mjs +1 -0
  89. package/lib/web/chunks/chunk-OGAHL36T.mjs +15 -0
  90. package/lib/web/chunks/chunk-P32XO2YS.mjs +1 -0
  91. package/lib/web/chunks/chunk-SBYYOE2T.mjs +1 -0
  92. package/lib/web/chunks/chunk-T6T3FEMU.mjs +1 -0
  93. package/lib/web/chunks/chunk-VAR5UK6J.mjs +1 -0
  94. package/lib/web/chunks/persistentStorage.web-NOUYFUMM.mjs +1 -0
  95. package/lib/web/colors.mjs +1 -1
  96. package/lib/web/dataViewer.mjs +2 -2
  97. package/lib/web/floating.mjs +1 -1
  98. package/lib/web/history.mjs +1 -1
  99. package/lib/web/hooks.mjs +1 -1
  100. package/lib/web/index.mjs +3 -3
  101. package/lib/web/native.mjs +1 -1
  102. package/lib/web/ui.mjs +1 -1
  103. package/lib/web/utils.mjs +1 -1
  104. package/package.json +5 -5
  105. package/lib/web/chunks/chunk-3UTMGIUG.mjs +0 -1
  106. package/lib/web/chunks/chunk-4IM4VIMP.mjs +0 -1
  107. package/lib/web/chunks/chunk-53J2FMUD.mjs +0 -1
  108. package/lib/web/chunks/chunk-ASHW3TI7.mjs +0 -1
  109. package/lib/web/chunks/chunk-BZTGYXMT.mjs +0 -1
  110. package/lib/web/chunks/chunk-CE5U3CSQ.mjs +0 -1
  111. package/lib/web/chunks/chunk-E2MI3FII.mjs +0 -15
  112. package/lib/web/chunks/chunk-FP44YK4E.mjs +0 -1
  113. package/lib/web/chunks/chunk-GF364FIK.mjs +0 -1
  114. package/lib/web/chunks/chunk-L63X3LPR.mjs +0 -1
  115. package/lib/web/chunks/chunk-L7OYS724.mjs +0 -1
  116. package/lib/web/chunks/chunk-LZ7FZZ7R.mjs +0 -1
  117. package/lib/web/chunks/chunk-NVD5LLXD.mjs +0 -1
  118. package/lib/web/chunks/chunk-QNLAFQET.mjs +0 -1
  119. package/lib/web/chunks/chunk-SYU4BFQR.mjs +0 -6
  120. package/lib/web/chunks/chunk-UYWHGSA7.mjs +0 -1
  121. package/lib/web/chunks/persistentStorage.web-3QA77BIL.mjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";import{useEffect as d,useId as p,useRef as s,useState as f}from"react";import{createPortal as b}from"react-dom";import{AccountSetupButton as m,AccountSetupCard as x}from"./AccountSetupContent.js";import{night as y}from"../ui/night/nightTheme.js";import{jsx as n,jsxs as h}from"react/jsx-runtime";export function AccountSetup(){const[r,a]=f(false);const o=s(null);const c=s(null);const u=p();const l=(e=true)=>{a(false);if(e)o.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})};d(()=>{if(!r)return;c.current?.focus({preventScroll:true});const e=t=>{if(t.target instanceof Node&&!o.current?.contains(t.target))a(false)};const i=t=>{if(t.key!=="Escape")return;t.preventDefault();t.stopPropagation();a(false);o.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})};document.addEventListener("pointerdown",e);document.addEventListener("keydown",i);return()=>{document.removeEventListener("pointerdown",e);document.removeEventListener("keydown",i)}},[r]);if(typeof document==="undefined")return null;return b(h("div",{ref:o,"data-buoy-account":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,colorScheme:"dark",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[n("style",{children:`
1
+ "use strict";import{useEffect as d,useId as p,useRef as s,useState as f}from"react";import{BuoyPortal as b}from"../ui/floating/portalHost.web.js";import{AccountSetupButton as m,AccountSetupCard as x}from"./AccountSetupContent.js";import{night as y}from"../ui/night/nightTheme.js";import{jsx as o,jsxs as h}from"react/jsx-runtime";export function AccountSetup(){const[r,a]=f(false);const n=s(null);const c=s(null);const u=p();const l=(e=true)=>{a(false);if(e)n.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})};d(()=>{if(!r)return;c.current?.focus({preventScroll:true});const e=t=>{if(t.target instanceof Node&&!n.current?.contains(t.target))a(false)};const i=t=>{if(t.key!=="Escape")return;t.preventDefault();t.stopPropagation();a(false);n.current?.querySelector('[data-account-launcher] [role="button"]')?.focus({preventScroll:true})};document.addEventListener("pointerdown",e);document.addEventListener("keydown",i);return()=>{document.removeEventListener("pointerdown",e);document.removeEventListener("keydown",i)}},[r]);if(typeof document==="undefined")return null;return o(b,{children:h("div",{ref:n,"data-buoy-account":"",style:{position:"fixed",right:"max(16px, env(safe-area-inset-right))",bottom:"max(20px, env(safe-area-inset-bottom))",zIndex:99999,colorScheme:"dark",fontFamily:"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:[o("style",{children:`
2
2
  [data-buoy-account] { font-size: 14px; line-height: 1.5; text-align: left; }
3
3
  [data-buoy-account] [role="button"], [data-buoy-account] [role="link"] { cursor: pointer; }
4
4
  [data-buoy-account] [role="button"]:focus-visible, [data-buoy-account] [role="link"]:focus-visible { outline: 2px solid ${y.color.accent}; outline-offset: 3px; }
@@ -11,4 +11,4 @@
11
11
  box-shadow: 0 18px 60px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.2);
12
12
  outline: none;
13
13
  }
14
- `}),n("div",{"data-account-launcher":"",children:n(m,{expanded:r,onPress:()=>a(e=>!e)})}),r&&n("section",{ref:c,className:"buoy-account-panel",role:"dialog","aria-labelledby":u,tabIndex:-1,onBlur:e=>{if(e.relatedTarget instanceof Node&&!o.current?.contains(e.relatedTarget))l(false)},children:n(x,{titleId:u,onClose:()=>l()})})]}),document.body)}
14
+ `}),o("div",{"data-account-launcher":"",children:o(m,{expanded:r,onPress:()=>a(e=>!e)})}),r&&o("section",{ref:c,className:"buoy-account-panel",role:"dialog","aria-labelledby":u,tabIndex:-1,onBlur:e=>{if(e.relatedTarget instanceof Node&&!n.current?.contains(e.relatedTarget))l(false)},children:o(x,{titleId:u,onClose:()=>l()})})]})})}
@@ -1 +1 @@
1
- "use strict";import{View as r,Text as s,StyleSheet as D,Switch as F,ScrollView as R}from"react-native";import{Settings as C,EyeOff as V,Database as W}from"../../icons/index.js";import{useState as S,useEffect as x}from"react";import{CyberpunkSectionButton as N}from"../../ui/console/CyberpunkSectionButton.js";import{devToolsStorageKeys as w}from"../../storage/devToolsStorageKeys.js";import{persistentStorage as c}from"../../utils/persistentStorage";import{macOSColors as m}from"../../ui/gameUI/constants/macOSDesignSystemColors.js";import{buoyColors as n}from"../../ui/gameUI/constants/gameUIColors.js";import{jsx as t,jsxs as d}from"react/jsx-runtime";const u=w.bubble.settings();const B=w.bubble.userPreferences();const p={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};export function BubbleSettingsSection({onPress:i}){const[l,g]=S(p);x(()=>{y()},[]);const y=async()=>{try{const a=await c.getItem(u);if(a){g(JSON.parse(a))}}catch(a){console.error("Failed to load bubble settings:",a)}};const h=()=>{return Object.values(l).filter(Boolean).length};return t(N,{id:"bubble-settings",title:"SETTINGS",subtitle:`${h()}/6 visible`,icon:C,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:i||(()=>{}),index:5})}export function BubbleSettingsDetail({onSettingsChange:i}){const[l,g]=S(p);const[y,h]=S(true);x(()=>{a()},[]);const a=async()=>{try{const o=await c.getItem(u);if(o){g(JSON.parse(o))}}catch(o){console.error("Failed to load bubble settings:",o)}finally{h(false)}};const T=async o=>{try{await c.setItem(u,JSON.stringify(o));g(o);i?.(o)}catch(f){console.error("Failed to save bubble settings:",f)}};const v=async o=>{const f={...l,[o]:!l[o]};try{const b=await c.getItem(B);const k=b?JSON.parse(b):{};const I=o.replace("show","hasSet");const z={...k,[I]:true};await c.setItem(B,JSON.stringify(z))}catch(b){console.error("Failed to save user preference marker:",b)}T(f)};if(y){return t(r,{style:e.detailContainer,children:t(s,{style:e.loadingText,children:"Loading settings..."})})}const E=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:t(r,{style:[e.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:t(r,{style:[e.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:t(r,{style:[e.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:t(C,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:t(r,{style:[e.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:t(W,{size:16,color:"#3B82F6"})}];return t(r,{style:e.detailContainer,children:d(R,{showsVerticalScrollIndicator:false,contentContainerStyle:e.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[d(r,{style:e.header,children:[t(s,{style:e.headerTitle,children:"Developer Tools Settings"}),t(s,{style:e.headerDescription,children:"Configure bubble button visibility"})]}),t(r,{style:e.sectionDivider,children:t(s,{style:e.sectionTitle,children:"Bubble Button Visibility"})}),t(r,{style:e.settingsList,children:E.map(o=>d(r,{style:e.settingItem,children:[t(r,{style:e.settingIconContainer,children:o.icon}),d(r,{style:e.settingContent,children:[t(s,{style:e.settingLabel,children:o.label}),t(s,{style:e.settingDescription,children:o.description})]}),t(F,{"sentry-label":"ignore bubble settings section",value:l[o.key],onValueChange:()=>v(o.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:l[o.key]?"#fff":n.textSecondary})]},o.key))}),d(r,{style:e.footer,children:[d(r,{style:e.noteContainer,children:[t(V,{size:16,color:n.textSecondary}),t(s,{style:e.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),t(s,{style:e.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}export async function getBubbleVisibilitySettings(){try{const i=await c.getItem(u);if(i){return JSON.parse(i)}}catch(i){console.error("Failed to load bubble settings:",i)}return p}const e=D.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:n.input,borderRadius:8,padding:16,flexDirection:"row",alignItems:"center",marginBottom:12},iconContainer:{width:36,height:36,borderRadius:8,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",marginRight:12},textContainer:{flex:1},title:{color:n.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:n.textSecondary,fontSize:12},chevron:{color:m.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:n.card},loadingText:{color:n.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:n.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:n.textSecondary,fontSize:12},settingsList:{padding:16},settingItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},settingIconContainer:{width:32,height:32,justifyContent:"center",alignItems:"center",marginRight:12},settingContent:{flex:1,marginRight:12},settingLabel:{color:n.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:m.text.icon,fontSize:11},indicator:{width:8,height:8,borderRadius:4},footer:{padding:16,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.2)"},noteContainer:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},noteText:{color:n.textSecondary,fontSize:12,flex:1},restartNote:{color:m.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:n.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});
1
+ "use strict";import{View as r,Text as s,StyleSheet as D,Switch as F,ScrollView as R}from"react-native";import{Settings as C,EyeOff as V,Database as W}from"../../icons/index.js";import{useState as S,useEffect as B}from"react";import{CyberpunkSectionButton as N}from"../../ui/console/CyberpunkSectionButton.js";import{devToolsStorageKeys as x}from"../../storage/devToolsStorageKeys.js";import{persistentStorage as c}from"../../utils/persistentStorage";import{macOSColors as m}from"../../ui/gameUI/constants/macOSDesignSystemColors.js";import{buoyColors as n}from"../../ui/gameUI/constants/gameUIColors.js";import{jsx as t,jsxs as d}from"react/jsx-runtime";const u=x.bubble.settings();const w=x.bubble.userPreferences();const p={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};export function BubbleSettingsSection({onPress:i}){const[l,g]=S(p);B(()=>{y()},[]);const y=async()=>{try{const a=await c.getItem(u);if(a){g(JSON.parse(a))}}catch(a){console.error("[Buoy]","Failed to load bubble settings:",a)}};const h=()=>{return Object.values(l).filter(Boolean).length};return t(N,{id:"bubble-settings",title:"SETTINGS",subtitle:`${h()}/6 visible`,icon:C,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:i||(()=>{}),index:5})}export function BubbleSettingsDetail({onSettingsChange:i}){const[l,g]=S(p);const[y,h]=S(true);B(()=>{a()},[]);const a=async()=>{try{const o=await c.getItem(u);if(o){g(JSON.parse(o))}}catch(o){console.error("[Buoy]","Failed to load bubble settings:",o)}finally{h(false)}};const T=async o=>{try{await c.setItem(u,JSON.stringify(o));g(o);i?.(o)}catch(f){console.error("[Buoy]","Failed to save bubble settings:",f)}};const v=async o=>{const f={...l,[o]:!l[o]};try{const b=await c.getItem(w);const k=b?JSON.parse(b):{};const I=o.replace("show","hasSet");const z={...k,[I]:true};await c.setItem(w,JSON.stringify(z))}catch(b){console.error("[Buoy]","Failed to save user preference marker:",b)}T(f)};if(y){return t(r,{style:e.detailContainer,children:t(s,{style:e.loadingText,children:"Loading settings..."})})}const E=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:t(r,{style:[e.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:t(r,{style:[e.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:t(r,{style:[e.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:t(C,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:t(r,{style:[e.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:t(W,{size:16,color:"#3B82F6"})}];return t(r,{style:e.detailContainer,children:d(R,{showsVerticalScrollIndicator:false,contentContainerStyle:e.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[d(r,{style:e.header,children:[t(s,{style:e.headerTitle,children:"Developer Tools Settings"}),t(s,{style:e.headerDescription,children:"Configure bubble button visibility"})]}),t(r,{style:e.sectionDivider,children:t(s,{style:e.sectionTitle,children:"Bubble Button Visibility"})}),t(r,{style:e.settingsList,children:E.map(o=>d(r,{style:e.settingItem,children:[t(r,{style:e.settingIconContainer,children:o.icon}),d(r,{style:e.settingContent,children:[t(s,{style:e.settingLabel,children:o.label}),t(s,{style:e.settingDescription,children:o.description})]}),t(F,{"sentry-label":"ignore bubble settings section",value:l[o.key],onValueChange:()=>v(o.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:l[o.key]?"#fff":n.textSecondary})]},o.key))}),d(r,{style:e.footer,children:[d(r,{style:e.noteContainer,children:[t(V,{size:16,color:n.textSecondary}),t(s,{style:e.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),t(s,{style:e.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}export async function getBubbleVisibilitySettings(){try{const i=await c.getItem(u);if(i){return JSON.parse(i)}}catch(i){console.error("[Buoy]","Failed to load bubble settings:",i)}return p}const e=D.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:n.input,borderRadius:8,padding:16,flexDirection:"row",alignItems:"center",marginBottom:12},iconContainer:{width:36,height:36,borderRadius:8,backgroundColor:"rgba(16, 185, 129, 0.1)",justifyContent:"center",alignItems:"center",marginRight:12},textContainer:{flex:1},title:{color:n.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:n.textSecondary,fontSize:12},chevron:{color:m.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:n.card},loadingText:{color:n.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:n.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:n.textSecondary,fontSize:12},settingsList:{padding:16},settingItem:{flexDirection:"row",alignItems:"center",paddingVertical:12,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.1)"},settingIconContainer:{width:32,height:32,justifyContent:"center",alignItems:"center",marginRight:12},settingContent:{flex:1,marginRight:12},settingLabel:{color:n.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:m.text.icon,fontSize:11},indicator:{width:8,height:8,borderRadius:4},footer:{padding:16,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.2)"},noteContainer:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},noteText:{color:n.textSecondary,fontSize:12,flex:1},restartNote:{color:m.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:n.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});
@@ -0,0 +1 @@
1
+ "use strict";import{isDevToolsStorageKey as a}from"./devToolsStorageKeys.js";export function appStorageEvent(e){if(e.instanceId&&a(e.instanceId))return null;const t=e.data;if(!t)return e;if(typeof t.key==="string"&&a(t.key))return null;const o={...t};let s=false;let n=false;let u=false;for(const r of["keys","pairs","prevPairs"]){if(!Array.isArray(t[r]))continue;n||=t[r].length>0;o[r]=t[r].filter(i=>!a(r==="keys"?i:i[0]));u||=o[r].length>0;s||=o[r].length!==t[r].length}if(n&&!u)return null;return s?{...e,data:o}:e}export function isBuoyRequest(e){try{const t=new URL(e,typeof location==="undefined"?"http://localhost":location.href);const o=t.hostname.toLowerCase();if(["api.buoy.gg","ai.buoy.gg","gateway.buoy.gg"].includes(o))return true;if(o==="keygen.sh"||o.endsWith(".keygen.sh"))return true;if(["buoy.gg","www.buoy.gg"].includes(o)&&/^\/api\/(license|settings|auth|session|install|t)(?:\/|$)/.test(t.pathname))return true;if(t.pathname==="/buoy-assets.json")return true;const s=globalThis.__BUOY_INTERNAL_HOSTS__;return s instanceof Set&&[...s].some(n=>typeof n==="string"&&n.toLowerCase()===t.host.toLowerCase())}catch{return false}}export function buoyFetch(e,t){return fetch(e,{...t,__buoyInternal:true})}export function isBuoyLog(e){return typeof e[0]==="string"&&/^\[(?:buoy(?:[^\]]*)?|@buoy-gg\/[^\]]+|RnBetterDevTools|React ?Buoy|RN-BUOY DEBUG|js-top|perf-monitor|impersonate|RenderCause|HighlightUpdates|RenderTracker|ProfilerInterceptor|HighlightPerf|DebugBorders|optional-module|route-events|RouteObserver)\]/i.test(e[0])}export function isBuoyAssetPath(e){if(!e)return false;if(isBuoyRequest(e))return true;let t=e;try{t=decodeURIComponent(t)}catch{}t=t.replace(/\\/g,"/");return/(?:^|\/)node_modules\/@buoy-gg\/[^/]+(?:\/|$)/.test(t)||/(?:^|\/)buoy-packages\/packages\/[^/]+(?:\/|$)/.test(t)||/(?:^|\/)packages\/floating-tools-core\/(?:src|lib\/(?:module|commonjs))\/icons\/assets(?:\/|$)/.test(t)}export function isBuoyElement(e){let t=e;while(t){if(t.closest("[data-buoy-root], [data-buoy-portal-host]"))return true;const o=t.getRootNode?.();t=o&&"host"in o?o.host:null}return false}
@@ -0,0 +1 @@
1
+ "use strict";import{describe as p,expect as t,it as s,vi as i}from"vitest";import{isDevToolsStorageKey as n,devToolsStorageKeys as u}from"./devToolsStorageKeys.js";import{appStorageEvent as r,isBuoyRequest as c,isBuoyLog as y,buoyFetch as b}from"./buoyOwnership.js";p("Buoy data stays out of app tools",()=>{s.each(["@react_buoy_sync_device_id","@react_buoy_time_machine:snap:1","@buoy/session:desktop","buoy-gg-license","buoy-gg-device-fingerprint","buoy.notifications.v1.token","buoy.settings","buoy_state","__buoy_session","react-buoy-settings","@AsyncStorage:@react_buoy_modal_hint_acknowledged","CapacitorStorage.@buoy/session:web"])("hides %s",e=>{t(n(e)).toBe(true)});s.each(["cart","session","license","my-buoy-score","buoyancy","@AsyncStorage:cart"])("keeps %s",e=>{t(n(e)).toBe(false)});s("covers every key in the shared key factory",()=>{const e=o=>{if(typeof o==="function"){const a=o("test");if(typeof a==="string")t(n(a)).toBe(true);else e(a)}else if(o&&typeof o==="object")Object.values(o).forEach(e)};e(u)});s("keeps app pairs in a mixed batch without changing the input",()=>{const e={data:{keys:["cart","@buoy/session:web"],pairs:[["cart","2"],["@buoy/session:web","secret"]],prevPairs:[["cart","1"],["@buoy/session:web","old"]]}};t(r(e)?.data).toEqual({keys:["cart"],pairs:[["cart","2"]],prevPairs:[["cart","1"]]});t(e.data.keys).toHaveLength(2);t(r({data:{key:"buoy-gg-license",value:"secret"}})).toBeNull();t(r({data:{pairs:[["@buoy/session:web","secret"]]}})).toBeNull()});s.each(["https://api.buoy.gg/v1/ping","https://ai.buoy.gg/v1/messages","https://buoy.gg/api/settings/x","https://api.keygen.sh/v1/x","/buoy-assets.json"])("hides tool URL %s",e=>t(c(e)).toBe(true));s.each(["https://api.buoy.gg.example.com/v1/ping","https://example.com/ai.buoy.gg","https://buoy.gg/blog","/app-assets.json"])("keeps app URL %s",e=>t(c(e)).toBe(false));s("marks only the tool fetch",async()=>{const e=i.fn().mockResolvedValue({ok:true});i.stubGlobal("fetch",e);try{await b("/app.js.map");t(e).toHaveBeenCalledWith("/app.js.map",{__buoyInternal:true})}finally{i.unstubAllGlobals()}});s("hides tool log prefixes without hiding app mentions",()=>{t(y(["[Buoy] sync"])).toBe(true);t(y(["[RnBetterDevTools] failed"])).toBe(true);t(y(["App uses Buoy"])).toBe(false)})});
@@ -1 +1 @@
1
- "use strict";export const devToolsStorageKeys={base:"@react_buoy",bubble:{root:()=>`${devToolsStorageKeys.base}_bubble`,settings:()=>`${devToolsStorageKeys.bubble.root()}_settings`,userPreferences:()=>`${devToolsStorageKeys.bubble.root()}_user_preferences`,position:()=>`${devToolsStorageKeys.bubble.root()}_position`},modal:{root:()=>`${devToolsStorageKeys.base}_modal`,state:()=>`${devToolsStorageKeys.modal.root()}_state`,position:()=>`${devToolsStorageKeys.modal.root()}_position`,dimensions:()=>`${devToolsStorageKeys.modal.root()}_dimensions`,hintAcknowledged:()=>`${devToolsStorageKeys.modal.root()}_hint_acknowledged`},custom:e=>{const o=`${devToolsStorageKeys.base}_custom_${e}`;return{root:()=>o,modal:()=>`${o}_modal`,settings:()=>`${o}_settings`,key:t=>`${o}_${t}`}},settings:{root:()=>`${devToolsStorageKeys.base}_settings`,theme:()=>`${devToolsStorageKeys.settings.root()}_theme`,preferences:()=>`${devToolsStorageKeys.settings.root()}_preferences`,wifiEnabled:()=>`${devToolsStorageKeys.settings.root()}_wifi_enabled`,global:()=>`${devToolsStorageKeys.settings.root()}_global`,activeTab:()=>`${devToolsStorageKeys.settings.root()}_active_tab`,modalOpen:()=>`${devToolsStorageKeys.settings.root()}_modal_open`},dial:{root:()=>`${devToolsStorageKeys.base}_dial`,isOpen:()=>`${devToolsStorageKeys.dial.root()}_is_open`,usage:()=>`${devToolsStorageKeys.dial.root()}_usage`},clipboard:{root:()=>`${devToolsStorageKeys.base}_clipboard`,hintAcknowledged:()=>`${devToolsStorageKeys.clipboard.root()}_hint_acknowledged`},env:{root:()=>`${devToolsStorageKeys.base}_env`,modal:()=>`${devToolsStorageKeys.env.root()}_modal`,currentEnv:()=>`${devToolsStorageKeys.env.root()}_current`,overrides:()=>`${devToolsStorageKeys.env.root()}_overrides`},sentry:{root:()=>`${devToolsStorageKeys.base}_sentry`,modal:()=>`${devToolsStorageKeys.sentry.root()}_modal`,filters:()=>`${devToolsStorageKeys.sentry.root()}_filters`,preferences:()=>`${devToolsStorageKeys.sentry.root()}_preferences`},storage:{root:()=>`${devToolsStorageKeys.base}_storage`,modal:()=>`${devToolsStorageKeys.storage.root()}_modal`,eventsModal:()=>`${devToolsStorageKeys.storage.root()}_events_modal`,filters:()=>`${devToolsStorageKeys.storage.root()}_filters`,eventFilters:()=>`${devToolsStorageKeys.storage.root()}_event_filters`,keyFilters:()=>`${devToolsStorageKeys.storage.root()}_key_filters`,pinnedKeys:()=>`${devToolsStorageKeys.storage.root()}_pinned_keys`,preferences:()=>`${devToolsStorageKeys.storage.root()}_preferences`,activeTab:()=>`${devToolsStorageKeys.storage.root()}_active_tab`,isMonitoring:()=>`${devToolsStorageKeys.storage.root()}_is_monitoring`,diffViewerMode:()=>`${devToolsStorageKeys.storage.root()}_diff_viewer_mode`},clock:{root:()=>`${devToolsStorageKeys.base}_clock`,state:()=>`${devToolsStorageKeys.clock.root()}_state`},permissions:{root:()=>`${devToolsStorageKeys.base}_permissions`,state:()=>`${devToolsStorageKeys.permissions.root()}_state`},lifecycle:{root:()=>`${devToolsStorageKeys.base}_lifecycle`,state:()=>`${devToolsStorageKeys.lifecycle.root()}_state`},location:{root:()=>`${devToolsStorageKeys.base}_location`,state:()=>`${devToolsStorageKeys.location.root()}_state`},timeMachine:{root:()=>`${devToolsStorageKeys.base}_time_machine`,diffViewerMode:()=>`${devToolsStorageKeys.timeMachine.root()}_diff_viewer_mode`,armedPoint:()=>`${devToolsStorageKeys.timeMachine.root()}_armed_point`,barReloadMode:()=>`${devToolsStorageKeys.timeMachine.root()}_bar_reload_mode`,disabledSources:()=>`${devToolsStorageKeys.timeMachine.root()}_disabled_sources`},scenarios:{root:()=>`${devToolsStorageKeys.base}_scenarios`,modal:()=>`${devToolsStorageKeys.scenarios.root()}_modal`,library:()=>`${devToolsStorageKeys.scenarios.root()}_library`,active:()=>`${devToolsStorageKeys.scenarios.root()}_active`},reactQuery:{root:()=>`${devToolsStorageKeys.base}_rq`,modal:()=>`${devToolsStorageKeys.reactQuery.root()}_modal`,browserModal:()=>`${devToolsStorageKeys.reactQuery.root()}_browser_modal`,mutationModal:()=>`${devToolsStorageKeys.reactQuery.root()}_mutation_modal`,filters:()=>`${devToolsStorageKeys.reactQuery.root()}_filters`,ignoredPatterns:()=>`${devToolsStorageKeys.reactQuery.root()}_ignored_patterns`,includedPatterns:()=>`${devToolsStorageKeys.reactQuery.root()}_included_patterns`,preferences:()=>`${devToolsStorageKeys.reactQuery.root()}_preferences`},network:{root:()=>`${devToolsStorageKeys.base}_network`,modal:()=>`${devToolsStorageKeys.network.root()}_modal`,copyModal:()=>`${devToolsStorageKeys.network.root()}_copy_modal`,filters:()=>`${devToolsStorageKeys.network.root()}_filters`,ignoredDomains:()=>`${devToolsStorageKeys.network.root()}_ignored_domains`,ignoredUrls:()=>`${devToolsStorageKeys.network.root()}_ignored_urls`,preferences:()=>`${devToolsStorageKeys.network.root()}_preferences`,copyOptions:()=>`${devToolsStorageKeys.network.root()}_copy_options`,saved:()=>`${devToolsStorageKeys.network.root()}_saved`,overrides:()=>`${devToolsStorageKeys.network.root()}_overrides`},routeEvents:{root:()=>`${devToolsStorageKeys.base}_route_events`,modal:()=>`${devToolsStorageKeys.routeEvents.root()}_modal`,eventFilters:()=>`${devToolsStorageKeys.routeEvents.root()}_event_filters`,activeTab:()=>`${devToolsStorageKeys.routeEvents.root()}_active_tab`,isMonitoring:()=>`${devToolsStorageKeys.routeEvents.root()}_is_monitoring`,detailView:()=>`${devToolsStorageKeys.routeEvents.root()}_detail_view`,diffViewerMode:()=>`${devToolsStorageKeys.routeEvents.root()}_diff_viewer_mode`},highlightUpdates:{root:()=>`${devToolsStorageKeys.base}_highlight_updates`,modal:()=>`${devToolsStorageKeys.highlightUpdates.root()}_modal`,isTracking:()=>`${devToolsStorageKeys.highlightUpdates.root()}_is_tracking`,filters:()=>`${devToolsStorageKeys.highlightUpdates.root()}_filters`,settings:()=>`${devToolsStorageKeys.highlightUpdates.root()}_settings`,copySettings:()=>`${devToolsStorageKeys.highlightUpdates.root()}_copy_settings`},benchmark:{root:()=>`${devToolsStorageKeys.base}_benchmark`,modal:()=>`${devToolsStorageKeys.benchmark.root()}_modal`,isRecording:()=>`${devToolsStorageKeys.benchmark.root()}_is_recording`,activeTab:()=>`${devToolsStorageKeys.benchmark.root()}_active_tab`,settings:()=>`${devToolsStorageKeys.benchmark.root()}_settings`,selectedReports:()=>`${devToolsStorageKeys.benchmark.root()}_selected_reports`},debugBorders:{root:()=>`${devToolsStorageKeys.base}_debug_borders`,infoModal:()=>`${devToolsStorageKeys.debugBorders.root()}_info_modal`},events:{root:()=>`${devToolsStorageKeys.base}_events`,modal:()=>`${devToolsStorageKeys.events.root()}_modal`,enabledSources:()=>`${devToolsStorageKeys.events.root()}_enabled_sources`,isCapturing:()=>`${devToolsStorageKeys.events.root()}_is_capturing`,pausedAt:()=>`${devToolsStorageKeys.events.root()}_paused_at`,copySettings:()=>`${devToolsStorageKeys.events.root()}_copy_settings`},sync:{root:()=>`${devToolsStorageKeys.base}_sync`,deviceId:()=>`${devToolsStorageKeys.sync.root()}_device_id`}};const r=["@devtools","@dev_tools_","@modal_state_","@react_query_browser_modal","@react_query_modal","@react_query_mutation_modal","@sentry_logs_modal","@floating_rn_better_dev_tools_","@floating_tools_","@apphost_","@bubble_settings_","@env_vars_modal","@storage_modal","@floating_@devtools_","dev_last_route"];export function isDevToolsStorageKey(e){if(!e)return false;if(e.startsWith(devToolsStorageKeys.base)){return true}if(e.startsWith("buoy-")){return true}if(e.startsWith("@buoy")){return true}if(e.startsWith("buoy.notifications.")){return true}for(const o of r){if(e.startsWith(o)){return true}}return false}export function filterOutDevToolsKeys(e){return e.filter(o=>!isDevToolsStorageKey(o))}export function getAllDevToolsStorageKeys(){const e=[];e.push(devToolsStorageKeys.bubble.settings());e.push(devToolsStorageKeys.bubble.userPreferences());e.push(devToolsStorageKeys.bubble.position());e.push(devToolsStorageKeys.modal.state());e.push(devToolsStorageKeys.modal.position());e.push(devToolsStorageKeys.modal.dimensions());e.push(devToolsStorageKeys.settings.theme());e.push(devToolsStorageKeys.settings.preferences());e.push(devToolsStorageKeys.env.currentEnv());e.push(devToolsStorageKeys.env.overrides());e.push(devToolsStorageKeys.sentry.filters());e.push(devToolsStorageKeys.sentry.preferences());e.push(devToolsStorageKeys.storage.filters());e.push(devToolsStorageKeys.storage.preferences());e.push(devToolsStorageKeys.reactQuery.filters());e.push(devToolsStorageKeys.reactQuery.preferences());return e}
1
+ "use strict";export const devToolsStorageKeys={base:"@react_buoy",bubble:{root:()=>`${devToolsStorageKeys.base}_bubble`,settings:()=>`${devToolsStorageKeys.bubble.root()}_settings`,userPreferences:()=>`${devToolsStorageKeys.bubble.root()}_user_preferences`,position:()=>`${devToolsStorageKeys.bubble.root()}_position`},modal:{root:()=>`${devToolsStorageKeys.base}_modal`,state:()=>`${devToolsStorageKeys.modal.root()}_state`,position:()=>`${devToolsStorageKeys.modal.root()}_position`,dimensions:()=>`${devToolsStorageKeys.modal.root()}_dimensions`,hintAcknowledged:()=>`${devToolsStorageKeys.modal.root()}_hint_acknowledged`},custom:e=>{const o=`${devToolsStorageKeys.base}_custom_${e}`;return{root:()=>o,modal:()=>`${o}_modal`,settings:()=>`${o}_settings`,key:t=>`${o}_${t}`}},settings:{root:()=>`${devToolsStorageKeys.base}_settings`,theme:()=>`${devToolsStorageKeys.settings.root()}_theme`,preferences:()=>`${devToolsStorageKeys.settings.root()}_preferences`,wifiEnabled:()=>`${devToolsStorageKeys.settings.root()}_wifi_enabled`,global:()=>`${devToolsStorageKeys.settings.root()}_global`,activeTab:()=>`${devToolsStorageKeys.settings.root()}_active_tab`,modalOpen:()=>`${devToolsStorageKeys.settings.root()}_modal_open`},dial:{root:()=>`${devToolsStorageKeys.base}_dial`,isOpen:()=>`${devToolsStorageKeys.dial.root()}_is_open`,usage:()=>`${devToolsStorageKeys.dial.root()}_usage`},clipboard:{root:()=>`${devToolsStorageKeys.base}_clipboard`,hintAcknowledged:()=>`${devToolsStorageKeys.clipboard.root()}_hint_acknowledged`},env:{root:()=>`${devToolsStorageKeys.base}_env`,modal:()=>`${devToolsStorageKeys.env.root()}_modal`,currentEnv:()=>`${devToolsStorageKeys.env.root()}_current`,overrides:()=>`${devToolsStorageKeys.env.root()}_overrides`},sentry:{root:()=>`${devToolsStorageKeys.base}_sentry`,modal:()=>`${devToolsStorageKeys.sentry.root()}_modal`,filters:()=>`${devToolsStorageKeys.sentry.root()}_filters`,preferences:()=>`${devToolsStorageKeys.sentry.root()}_preferences`},storage:{root:()=>`${devToolsStorageKeys.base}_storage`,modal:()=>`${devToolsStorageKeys.storage.root()}_modal`,eventsModal:()=>`${devToolsStorageKeys.storage.root()}_events_modal`,filters:()=>`${devToolsStorageKeys.storage.root()}_filters`,eventFilters:()=>`${devToolsStorageKeys.storage.root()}_event_filters`,keyFilters:()=>`${devToolsStorageKeys.storage.root()}_key_filters`,pinnedKeys:()=>`${devToolsStorageKeys.storage.root()}_pinned_keys`,preferences:()=>`${devToolsStorageKeys.storage.root()}_preferences`,activeTab:()=>`${devToolsStorageKeys.storage.root()}_active_tab`,isMonitoring:()=>`${devToolsStorageKeys.storage.root()}_is_monitoring`,diffViewerMode:()=>`${devToolsStorageKeys.storage.root()}_diff_viewer_mode`},clock:{root:()=>`${devToolsStorageKeys.base}_clock`,state:()=>`${devToolsStorageKeys.clock.root()}_state`},permissions:{root:()=>`${devToolsStorageKeys.base}_permissions`,state:()=>`${devToolsStorageKeys.permissions.root()}_state`},lifecycle:{root:()=>`${devToolsStorageKeys.base}_lifecycle`,state:()=>`${devToolsStorageKeys.lifecycle.root()}_state`},location:{root:()=>`${devToolsStorageKeys.base}_location`,state:()=>`${devToolsStorageKeys.location.root()}_state`},timeMachine:{root:()=>`${devToolsStorageKeys.base}_time_machine`,diffViewerMode:()=>`${devToolsStorageKeys.timeMachine.root()}_diff_viewer_mode`,armedPoint:()=>`${devToolsStorageKeys.timeMachine.root()}_armed_point`,barReloadMode:()=>`${devToolsStorageKeys.timeMachine.root()}_bar_reload_mode`,disabledSources:()=>`${devToolsStorageKeys.timeMachine.root()}_disabled_sources`},scenarios:{root:()=>`${devToolsStorageKeys.base}_scenarios`,modal:()=>`${devToolsStorageKeys.scenarios.root()}_modal`,library:()=>`${devToolsStorageKeys.scenarios.root()}_library`,active:()=>`${devToolsStorageKeys.scenarios.root()}_active`},reactQuery:{root:()=>`${devToolsStorageKeys.base}_rq`,modal:()=>`${devToolsStorageKeys.reactQuery.root()}_modal`,browserModal:()=>`${devToolsStorageKeys.reactQuery.root()}_browser_modal`,mutationModal:()=>`${devToolsStorageKeys.reactQuery.root()}_mutation_modal`,filters:()=>`${devToolsStorageKeys.reactQuery.root()}_filters`,ignoredPatterns:()=>`${devToolsStorageKeys.reactQuery.root()}_ignored_patterns`,includedPatterns:()=>`${devToolsStorageKeys.reactQuery.root()}_included_patterns`,preferences:()=>`${devToolsStorageKeys.reactQuery.root()}_preferences`},network:{root:()=>`${devToolsStorageKeys.base}_network`,modal:()=>`${devToolsStorageKeys.network.root()}_modal`,copyModal:()=>`${devToolsStorageKeys.network.root()}_copy_modal`,filters:()=>`${devToolsStorageKeys.network.root()}_filters`,ignoredDomains:()=>`${devToolsStorageKeys.network.root()}_ignored_domains`,ignoredUrls:()=>`${devToolsStorageKeys.network.root()}_ignored_urls`,preferences:()=>`${devToolsStorageKeys.network.root()}_preferences`,copyOptions:()=>`${devToolsStorageKeys.network.root()}_copy_options`,saved:()=>`${devToolsStorageKeys.network.root()}_saved`,overrides:()=>`${devToolsStorageKeys.network.root()}_overrides`},routeEvents:{root:()=>`${devToolsStorageKeys.base}_route_events`,modal:()=>`${devToolsStorageKeys.routeEvents.root()}_modal`,eventFilters:()=>`${devToolsStorageKeys.routeEvents.root()}_event_filters`,activeTab:()=>`${devToolsStorageKeys.routeEvents.root()}_active_tab`,isMonitoring:()=>`${devToolsStorageKeys.routeEvents.root()}_is_monitoring`,detailView:()=>`${devToolsStorageKeys.routeEvents.root()}_detail_view`,diffViewerMode:()=>`${devToolsStorageKeys.routeEvents.root()}_diff_viewer_mode`},highlightUpdates:{root:()=>`${devToolsStorageKeys.base}_highlight_updates`,modal:()=>`${devToolsStorageKeys.highlightUpdates.root()}_modal`,isTracking:()=>`${devToolsStorageKeys.highlightUpdates.root()}_is_tracking`,filters:()=>`${devToolsStorageKeys.highlightUpdates.root()}_filters`,settings:()=>`${devToolsStorageKeys.highlightUpdates.root()}_settings`,copySettings:()=>`${devToolsStorageKeys.highlightUpdates.root()}_copy_settings`},benchmark:{root:()=>`${devToolsStorageKeys.base}_benchmark`,modal:()=>`${devToolsStorageKeys.benchmark.root()}_modal`,isRecording:()=>`${devToolsStorageKeys.benchmark.root()}_is_recording`,activeTab:()=>`${devToolsStorageKeys.benchmark.root()}_active_tab`,settings:()=>`${devToolsStorageKeys.benchmark.root()}_settings`,selectedReports:()=>`${devToolsStorageKeys.benchmark.root()}_selected_reports`},debugBorders:{root:()=>`${devToolsStorageKeys.base}_debug_borders`,infoModal:()=>`${devToolsStorageKeys.debugBorders.root()}_info_modal`},events:{root:()=>`${devToolsStorageKeys.base}_events`,modal:()=>`${devToolsStorageKeys.events.root()}_modal`,enabledSources:()=>`${devToolsStorageKeys.events.root()}_enabled_sources`,isCapturing:()=>`${devToolsStorageKeys.events.root()}_is_capturing`,pausedAt:()=>`${devToolsStorageKeys.events.root()}_paused_at`,copySettings:()=>`${devToolsStorageKeys.events.root()}_copy_settings`},sync:{root:()=>`${devToolsStorageKeys.base}_sync`,deviceId:()=>`${devToolsStorageKeys.sync.root()}_device_id`}};const r=["@devtools","@dev_tools_","@modal_state_","@react_query_browser_modal","@react_query_modal","@react_query_mutation_modal","@sentry_logs_modal","@floating_rn_better_dev_tools_","@floating_tools_","@apphost_","@bubble_settings_","@env_vars_modal","@storage_modal","@floating_@devtools_","dev_last_route"];export function isDevToolsStorageKey(e){if(!e)return false;for(const o of["@AsyncStorage:","CapacitorStorage."]){if(e.startsWith(o))e=e.slice(o.length)}if(e.startsWith(devToolsStorageKeys.base)){return true}if(e.startsWith("buoy-")){return true}if(e.startsWith("@buoy")){return true}if(/^(?:buoy[._]|__buoy|react-buoy)/i.test(e)){return true}for(const o of r){if(e.startsWith(o)){return true}}return false}export function filterOutDevToolsKeys(e){return e.filter(o=>!isDevToolsStorageKey(o))}export function getAllDevToolsStorageKeys(){const e=[];e.push(devToolsStorageKeys.bubble.settings());e.push(devToolsStorageKeys.bubble.userPreferences());e.push(devToolsStorageKeys.bubble.position());e.push(devToolsStorageKeys.modal.state());e.push(devToolsStorageKeys.modal.position());e.push(devToolsStorageKeys.modal.dimensions());e.push(devToolsStorageKeys.settings.theme());e.push(devToolsStorageKeys.settings.preferences());e.push(devToolsStorageKeys.env.currentEnv());e.push(devToolsStorageKeys.env.overrides());e.push(devToolsStorageKeys.sentry.filters());e.push(devToolsStorageKeys.sentry.preferences());e.push(devToolsStorageKeys.storage.filters());e.push(devToolsStorageKeys.storage.preferences());e.push(devToolsStorageKeys.reactQuery.filters());e.push(devToolsStorageKeys.reactQuery.preferences());return e}
@@ -1 +1 @@
1
- "use strict";export{devToolsStorageKeys,isDevToolsStorageKey}from"./devToolsStorageKeys.js";export{definePersistedSetting}from"./definePersistedSetting.js";export{getCapacitorAppStorage}from"./capacitorAppStorage.js";export{callCapacitorNative,hasCapacitorPlugin,isCapacitorNative}from"@buoy-gg/license";
1
+ "use strict";export{devToolsStorageKeys,isDevToolsStorageKey}from"./devToolsStorageKeys.js";export{definePersistedSetting}from"./definePersistedSetting.js";export{getCapacitorAppStorage}from"./capacitorAppStorage.js";export{callCapacitorNative,hasCapacitorPlugin,isCapacitorNative}from"@buoy-gg/license";export{appStorageEvent,isBuoyElement,isBuoyAssetPath,isBuoyRequest,buoyFetch,isBuoyLog}from"./buoyOwnership.js";
@@ -1 +1 @@
1
- "use strict";import B from"react";import{StyleSheet as x,Text as T,View as t}from"react-native";import{buoyColors as m}from"../gameUI/constants/gameUIColors.js";import{CompactRow as C}from"./CompactRow.js";import{Clock as w,Zap as $}from"../../icons/index.js";import{RelativeTime as R}from"../../utils/time/RelativeTime.js";import{monoFont as S}from"../fonts.js";import{jsx as o,jsxs as j}from"react/jsx-runtime";export function ChangeRow({statusColor:i,statusLabel:u,sublabel:f,primaryText:c,timestamp:b,badgeText:r,changed:a=false,slow:s=false,badgePrefix:l,customBadge:g,plainBadgeText:p,onPress:y,testID:e,accessibilityLabel:h}){const d=g??(r!==void 0||l||a||s?j(t,{style:n.badgeContainer,children:[l,r!==void 0?o(T,{style:[n.badgeText,{color:i}],testID:e?`${e}-badge`:void 0,children:r}):null,s?o(t,{style:n.iconBadge,testID:e?`${e}-slow`:void 0,children:o(w,{size:12,color:m.error})}):a?o(t,{style:n.iconBadge,testID:e?`${e}-change`:void 0,children:o($,{size:12,color:m.warning})}):null]}):void 0);return o(C,{statusDotColor:i,statusLabel:u,statusSublabel:f,primaryText:c,bottomRightText:o(R,{timestamp:b}),customBadge:d,badgeText:d?void 0:p,badgeColor:i,showChevron:true,onPress:y,testID:e,statusTestID:e?`${e}-status`:void 0,statusSublabelTestID:e?`${e}-sublabel`:void 0,primaryTestID:e?`${e}-keys`:void 0,accessibilityLabel:h})}const n=x.create({badgeContainer:{flexDirection:"row",alignItems:"center",gap:4},badgeText:{fontSize:11,fontWeight:"600",fontFamily:S},iconBadge:{paddingHorizontal:4}});
1
+ "use strict";import B from"react";import{StyleSheet as x,Text as T,View as r}from"react-native";import{buoyColors as m}from"../gameUI/constants/gameUIColors.js";import{CompactRow as C}from"./CompactRow.js";import{Clock as w,Zap as $}from"../../icons/index.js";import{RelativeTime as z}from"../../utils/time/RelativeTime.js";import{monoFont as R}from"../fonts.js";import{jsx as o,jsxs as S}from"react/jsx-runtime";export function ChangeRow({statusColor:i,statusLabel:u,sublabel:f,primaryText:c,timestamp:b,badgeText:t,changed:a=false,slow:l=false,badgePrefix:s,customBadge:p,plainBadgeText:g,onPress:y,testID:e,accessibilityLabel:h}){const d=p??(t!==void 0||s||a||l?S(r,{style:n.badgeContainer,children:[s,t!==void 0?o(T,{style:[n.badgeText,{color:i}],numberOfLines:1,ellipsizeMode:"tail",testID:e?`${e}-badge`:void 0,children:t}):null,l?o(r,{style:n.iconBadge,testID:e?`${e}-slow`:void 0,children:o(w,{size:12,color:m.error})}):a?o(r,{style:n.iconBadge,testID:e?`${e}-change`:void 0,children:o($,{size:12,color:m.warning})}):null]}):void 0);return o(C,{statusDotColor:i,statusLabel:u,statusSublabel:f,primaryText:c,bottomRightText:o(z,{timestamp:b}),customBadge:d,badgeText:d?void 0:g,badgeColor:i,showChevron:true,onPress:y,testID:e,statusTestID:e?`${e}-status`:void 0,statusSublabelTestID:e?`${e}-sublabel`:void 0,primaryTestID:e?`${e}-keys`:void 0,accessibilityLabel:h})}const n=x.create({badgeContainer:{flexDirection:"row",alignItems:"center",gap:4},badgeText:{maxWidth:96,fontSize:11,fontWeight:"600",fontFamily:R},iconBadge:{paddingHorizontal:4}});
@@ -1 +1 @@
1
- "use strict";import{View as r,Text as l,TouchableOpacity as L,StyleSheet as H}from"react-native";import{ChevronDown as j,ChevronRight as B}from"../../icons/index.js";import{night as t}from"../night/nightTheme.js";import{monoFont as w}from"../fonts.js";import{jsx as o,jsxs as n}from"react/jsx-runtime";export function CompactRow({statusDotColor:a,statusLabel:b,statusSublabel:g,primaryText:x,secondaryText:c,secondaryAccessory:y,expandedContent:u,isExpanded:i,badgeText:s,badgeColor:C,customBadge:d,showChevron:S,bottomRightText:h,isSelected:R,onPress:f,disabled:T,expandedGlowColor:m,testID:I,statusTestID:W,statusSublabelTestID:v,primaryTestID:D,secondaryTestID:z,accessibilityLabel:O,trailingAction:p}){return o(r,{style:[e.rowWrapper,i&&e.rowWrapperExpanded],children:n(r,{style:[e.row,R&&e.selectedRow,i&&[e.expandedRowActive,{borderColor:m||t.color.accent,borderBottomColor:m||t.color.accent,shadowColor:m||t.color.accent}]],children:[n(r,{style:e.headerRow,children:[o(L,{style:e.headerPress,onPress:f,activeOpacity:.8,disabled:T||!f,testID:I,accessibilityLabel:O,accessibilityRole:f?"button":void 0,children:n(r,{style:e.rowContent,children:[n(r,{style:e.statusSection,children:[o(r,{style:[e.statusDot,{backgroundColor:a}]}),n(r,{style:e.statusInfo,children:[o(l,{style:[e.statusLabel,{color:a}],numberOfLines:1,testID:W,children:b}),g?o(l,{style:e.observerText,numberOfLines:1,testID:v,children:g}):null]})]}),n(r,{style:e.querySection,children:[o(l,{style:e.queryHash,numberOfLines:i?void 0:2,testID:D,children:x}),!i&&(c||y)?n(r,{style:e.secondaryRow,children:[c?o(l,{style:e.secondaryText,numberOfLines:1,testID:z,children:c}):null,y]}):null]}),n(r,{style:e.rightSection,children:[(d||s!==void 0||!i&&h)&&n(r,{style:e.badgeContainer,children:[d?d:s!==void 0?o(l,{style:[e.statusBadge,{color:C||a}],children:s}):null,!i&&h?o(l,{style:e.bottomRightText,numberOfLines:1,children:h}):null]}),S&&o(r,{style:e.chevronContainer,children:i?o(j,{size:14,color:t.color.textTertiary}):o(B,{size:14,color:t.color.textTertiary})})]})]})}),p?o(r,{style:e.trailingAction,children:p}):null]}),i&&u&&o(r,{style:e.expandedContent,children:u})]})})}const e=H.create({rowWrapper:{position:"relative",marginHorizontal:8,marginVertical:3},rowWrapperExpanded:{marginVertical:12},row:{backgroundColor:"rgba(12, 12, 12, 0.9)",borderRadius:8,borderWidth:1,borderColor:t.color.border,borderBottomWidth:1,borderBottomColor:t.color.separator,padding:12,paddingHorizontal:12,transform:[{scale:1}]},selectedRow:{backgroundColor:t.color.accentSoft,borderColor:t.color.accentBorderStrong,transform:[{scale:1.01}],shadowColor:t.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:8,elevation:2},expandedRowActive:{transform:[{scale:1.02}],borderWidth:2,paddingBottom:16,shadowOffset:{width:0,height:0},shadowOpacity:.8,shadowRadius:20,elevation:10},headerRow:{flexDirection:"row",alignItems:"center"},headerPress:{flex:1,minWidth:0},trailingAction:{marginLeft:8,justifyContent:"center"},rowContent:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},statusSection:{flexDirection:"row",alignItems:"center",gap:8,width:90,minWidth:90},statusDot:{width:8,height:8,borderRadius:4},statusInfo:{flex:1,maxWidth:70},statusLabel:{fontSize:11,fontWeight:"600",lineHeight:14},observerText:{fontSize:10,color:t.color.textTertiary,marginTop:1},querySection:{flex:2,paddingHorizontal:12},queryHash:{fontFamily:w,fontSize:12,color:t.color.text,lineHeight:16},secondaryRow:{flexDirection:"row",alignItems:"center",gap:6,marginTop:1},secondaryText:{fontSize:10,color:t.color.textTertiary,marginTop:1,flexShrink:1},rightSection:{flexDirection:"row",alignItems:"center",gap:8},badgeContainer:{flexDirection:"column",alignItems:"flex-end",gap:2},statusBadge:{fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chevronContainer:{padding:2},expandedContent:{marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:t.color.separator,marginLeft:24},bottomRightText:{fontSize:9,color:t.color.textTertiary,fontFamily:w}});
1
+ "use strict";import{View as r,Text as l,TouchableOpacity as L,StyleSheet as H}from"react-native";import{ChevronDown as j,ChevronRight as B}from"../../icons/index.js";import{night as t}from"../night/nightTheme.js";import{monoFont as w}from"../fonts.js";import{jsx as o,jsxs as n}from"react/jsx-runtime";export function CompactRow({statusDotColor:a,statusLabel:b,statusSublabel:g,primaryText:x,secondaryText:c,secondaryAccessory:y,expandedContent:u,isExpanded:i,badgeText:s,badgeColor:C,customBadge:d,showChevron:S,bottomRightText:h,isSelected:R,onPress:f,disabled:W,expandedGlowColor:m,testID:T,statusTestID:I,statusSublabelTestID:v,primaryTestID:z,secondaryTestID:D,accessibilityLabel:O,trailingAction:p}){return o(r,{style:[e.rowWrapper,i&&e.rowWrapperExpanded],children:n(r,{style:[e.row,R&&e.selectedRow,i&&[e.expandedRowActive,{borderColor:m||t.color.accent,borderBottomColor:m||t.color.accent,shadowColor:m||t.color.accent}]],children:[n(r,{style:e.headerRow,children:[o(L,{style:e.headerPress,onPress:f,activeOpacity:.8,disabled:W||!f,testID:T,accessibilityLabel:O,accessibilityRole:f?"button":void 0,children:n(r,{style:e.rowContent,children:[n(r,{style:e.statusSection,children:[o(r,{style:[e.statusDot,{backgroundColor:a}]}),n(r,{style:e.statusInfo,children:[o(l,{style:[e.statusLabel,{color:a}],numberOfLines:1,testID:I,children:b}),g?o(l,{style:e.observerText,numberOfLines:1,testID:v,children:g}):null]})]}),n(r,{style:e.querySection,children:[o(l,{style:e.queryHash,numberOfLines:i?void 0:2,testID:z,children:x}),!i&&(c||y)?n(r,{style:e.secondaryRow,children:[c?o(l,{style:e.secondaryText,numberOfLines:1,testID:D,children:c}):null,y]}):null]}),n(r,{style:e.rightSection,children:[(d||s!==void 0||!i&&h)&&n(r,{style:e.badgeContainer,children:[d?d:s!==void 0?o(l,{style:[e.statusBadge,{color:C||a}],numberOfLines:1,ellipsizeMode:"tail",children:s}):null,!i&&h?o(l,{style:e.bottomRightText,numberOfLines:1,children:h}):null]}),S&&o(r,{style:e.chevronContainer,children:i?o(j,{size:14,color:t.color.textTertiary}):o(B,{size:14,color:t.color.textTertiary})})]})]})}),p?o(r,{style:e.trailingAction,children:p}):null]}),i&&u&&o(r,{style:e.expandedContent,children:u})]})})}const e=H.create({rowWrapper:{position:"relative",marginHorizontal:8,marginVertical:3},rowWrapperExpanded:{marginVertical:12},row:{backgroundColor:"rgba(12, 12, 12, 0.9)",borderRadius:8,borderWidth:1,borderColor:t.color.border,borderBottomWidth:1,borderBottomColor:t.color.separator,padding:12,paddingHorizontal:12,transform:[{scale:1}]},selectedRow:{backgroundColor:t.color.accentSoft,borderColor:t.color.accentBorderStrong,transform:[{scale:1.01}],shadowColor:t.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.1,shadowRadius:8,elevation:2},expandedRowActive:{transform:[{scale:1.02}],borderWidth:2,paddingBottom:16,shadowOffset:{width:0,height:0},shadowOpacity:.8,shadowRadius:20,elevation:10},headerRow:{flexDirection:"row",alignItems:"center"},headerPress:{flex:1,minWidth:0},trailingAction:{marginLeft:8,justifyContent:"center"},rowContent:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},statusSection:{flexDirection:"row",alignItems:"center",gap:8,width:90,minWidth:90},statusDot:{width:8,height:8,borderRadius:4},statusInfo:{flex:1,maxWidth:70},statusLabel:{fontSize:11,fontWeight:"600",lineHeight:14},observerText:{fontSize:10,color:t.color.textTertiary,marginTop:1},querySection:{flex:2,minWidth:0,paddingHorizontal:12},queryHash:{fontFamily:w,fontSize:12,color:t.color.text,lineHeight:16},secondaryRow:{flexDirection:"row",alignItems:"center",gap:6,marginTop:1},secondaryText:{fontSize:10,color:t.color.textTertiary,marginTop:1,flexShrink:1},rightSection:{flexDirection:"row",alignItems:"center",gap:8},badgeContainer:{flexDirection:"column",alignItems:"flex-end",gap:2},statusBadge:{maxWidth:96,fontSize:12,fontWeight:"600",fontVariant:["tabular-nums"]},chevronContainer:{padding:2},expandedContent:{marginTop:8,paddingTop:8,borderTopWidth:1,borderTopColor:t.color.separator,marginLeft:24},bottomRightText:{fontSize:9,color:t.color.textTertiary,fontFamily:w}});
@@ -1 +1 @@
1
- "use strict";import{useState as y}from"react";import{View as n,Text as a,StyleSheet as R,ScrollView as T,TouchableOpacity as p,TextInput as D}from"react-native";import{Search as O,Edit3 as W,Check as A,X as F}from"../../icons/index.js";import{gameUIColors as o}from"../gameUI/index.js";import{CopyButton as J}from"./CopyButton.js";import{monoFont as P}from"../fonts.js";import{jsx as e,jsxs as l}from"react/jsx-runtime";export function DataInspector({data:c,mode:r="view",syntax:i="json",theme:f="dark",collapsible:d=true,searchable:h=true,onEdit:k,style:v,title:m}){const[g,E]=y("");const[s,x]=y(false);const[w,b]=y("");const B=()=>{if(i==="json"){try{return JSON.stringify(c,null,2)}catch{return String(c)}}return String(c)};const I=u=>{if(!g)return u;const V=u.split(new RegExp(`(${g})`,"gi"));return V.map((S,H)=>{if(S.toLowerCase()===g.toLowerCase()){return e(a,{style:t.highlight,children:S},H)}return S})};const z=()=>{if(!s){b(B());x(true)}else{try{const u=i==="json"?JSON.parse(w):w;k?.(u);x(false)}catch(u){console.error("Failed to parse edited data",u)}}};const j=()=>{x(false);b("")};const C=B();return l(n,{style:[t.container,v],children:[(m||h||r==="edit")&&l(n,{style:t.header,children:[m&&e(a,{style:t.title,children:m}),l(n,{style:t.controls,children:[h&&!s&&l(n,{style:t.searchContainer,children:[e(O,{size:12,color:o.secondary}),e(D,{style:t.searchInput,placeholder:"Search...",placeholderTextColor:o.tertiary,value:g,onChangeText:E})]}),r==="edit"&&e(p,{style:t.editButton,onPress:s?z:()=>z(),children:s?e(A,{size:14,color:o.success}):e(W,{size:14,color:o.primary})}),s&&e(p,{style:t.cancelButton,onPress:j,children:e(F,{size:14,color:o.error})}),!s&&e(J,{value:C,size:12})]})]}),e(T,{style:t.scrollView,horizontal:true,showsHorizontalScrollIndicator:false,children:e(T,{showsVerticalScrollIndicator:false,children:s?e(D,{style:t.editor,value:w,onChangeText:b,multiline:true,autoCapitalize:"none",autoCorrect:false}):e(a,{style:t.codeText,children:g?I(C):C})})})]})}DataInspector.Json=function c({data:r,searchable:i,style:f}){return e(DataInspector,{data:r,syntax:"json",mode:"view",searchable:i,style:f})};DataInspector.Editable=function c({data:r,onSave:i,style:f}){return e(DataInspector,{data:r,mode:"edit",onEdit:i,style:f})};DataInspector.Diff=function c({oldData:r,newData:i,style:f}){const[d,h]=y("diff");return l(n,{style:f,children:[l(n,{style:t.diffControls,children:[e(p,{style:[t.diffButton,d==="old"&&t.diffButtonActive],onPress:()=>h("old"),children:e(a,{style:t.diffButtonText,children:"Old"})}),e(p,{style:[t.diffButton,d==="new"&&t.diffButtonActive],onPress:()=>h("new"),children:e(a,{style:t.diffButtonText,children:"New"})}),e(p,{style:[t.diffButton,d==="diff"&&t.diffButtonActive],onPress:()=>h("diff"),children:e(a,{style:t.diffButtonText,children:"Diff"})})]}),d==="old"&&e(DataInspector,{data:r,searchable:false}),d==="new"&&e(DataInspector,{data:i,searchable:false}),d==="diff"&&l(n,{style:t.diffContainer,children:[l(n,{style:t.diffPane,children:[e(a,{style:t.diffPaneTitle,children:"Old"}),e(DataInspector,{data:r,searchable:false})]}),l(n,{style:t.diffPane,children:[e(a,{style:t.diffPaneTitle,children:"New"}),e(DataInspector,{data:i,searchable:false})]})]})]})};const t=R.create({container:{backgroundColor:o.background,borderRadius:8,overflow:"hidden"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:8,borderBottomWidth:1,borderBottomColor:o.border+"20"},title:{fontSize:12,fontWeight:"600",color:o.text},controls:{flexDirection:"row",gap:8},searchContainer:{flexDirection:"row",alignItems:"center",backgroundColor:o.panel,borderRadius:4,paddingHorizontal:8,gap:4},searchInput:{fontSize:11,color:o.text,minWidth:100,paddingVertical:4},editButton:{padding:4,borderRadius:4,backgroundColor:o.primary+"20"},cancelButton:{padding:4,borderRadius:4,backgroundColor:o.error+"20"},scrollView:{maxHeight:300},codeText:{fontFamily:P,fontSize:11,color:o.text,padding:12,lineHeight:16},editor:{fontFamily:P,fontSize:11,color:o.text,padding:12,lineHeight:16,minHeight:200},highlight:{backgroundColor:o.warning+"40",color:o.text},diffControls:{flexDirection:"row",gap:8,padding:8},diffButton:{paddingHorizontal:12,paddingVertical:4,borderRadius:4,backgroundColor:o.panel},diffButtonActive:{backgroundColor:o.primary},diffButtonText:{fontSize:11,color:o.text,fontWeight:"500"},diffContainer:{flexDirection:"row",gap:8},diffPane:{flex:1},diffPaneTitle:{fontSize:10,fontWeight:"600",color:o.secondary,padding:8,textTransform:"uppercase"}});
1
+ "use strict";import{useState as p}from"react";import{View as n,Text as a,StyleSheet as R,ScrollView as T,TouchableOpacity as y,TextInput as D}from"react-native";import{Search as O,Edit3 as W,Check as A,X as F}from"../../icons/index.js";import{gameUIColors as o}from"../gameUI/index.js";import{CopyButton as J}from"./CopyButton.js";import{monoFont as P}from"../fonts.js";import{jsx as e,jsxs as l}from"react/jsx-runtime";export function DataInspector({data:c,mode:r="view",syntax:i="json",theme:f="dark",collapsible:d=true,searchable:h=true,onEdit:k,style:v,title:m}){const[g,E]=p("");const[s,x]=p(false);const[w,b]=p("");const B=()=>{if(i==="json"){try{return JSON.stringify(c,null,2)}catch{return String(c)}}return String(c)};const I=u=>{if(!g)return u;const V=u.split(new RegExp(`(${g})`,"gi"));return V.map((S,H)=>{if(S.toLowerCase()===g.toLowerCase()){return e(a,{style:t.highlight,children:S},H)}return S})};const z=()=>{if(!s){b(B());x(true)}else{try{const u=i==="json"?JSON.parse(w):w;k?.(u);x(false)}catch(u){console.error("[Buoy]","Failed to parse edited data",u)}}};const j=()=>{x(false);b("")};const C=B();return l(n,{style:[t.container,v],children:[(m||h||r==="edit")&&l(n,{style:t.header,children:[m&&e(a,{style:t.title,children:m}),l(n,{style:t.controls,children:[h&&!s&&l(n,{style:t.searchContainer,children:[e(O,{size:12,color:o.secondary}),e(D,{style:t.searchInput,placeholder:"Search...",placeholderTextColor:o.tertiary,value:g,onChangeText:E})]}),r==="edit"&&e(y,{style:t.editButton,onPress:s?z:()=>z(),children:s?e(A,{size:14,color:o.success}):e(W,{size:14,color:o.primary})}),s&&e(y,{style:t.cancelButton,onPress:j,children:e(F,{size:14,color:o.error})}),!s&&e(J,{value:C,size:12})]})]}),e(T,{style:t.scrollView,horizontal:true,showsHorizontalScrollIndicator:false,children:e(T,{showsVerticalScrollIndicator:false,children:s?e(D,{style:t.editor,value:w,onChangeText:b,multiline:true,autoCapitalize:"none",autoCorrect:false}):e(a,{style:t.codeText,children:g?I(C):C})})})]})}DataInspector.Json=function c({data:r,searchable:i,style:f}){return e(DataInspector,{data:r,syntax:"json",mode:"view",searchable:i,style:f})};DataInspector.Editable=function c({data:r,onSave:i,style:f}){return e(DataInspector,{data:r,mode:"edit",onEdit:i,style:f})};DataInspector.Diff=function c({oldData:r,newData:i,style:f}){const[d,h]=p("diff");return l(n,{style:f,children:[l(n,{style:t.diffControls,children:[e(y,{style:[t.diffButton,d==="old"&&t.diffButtonActive],onPress:()=>h("old"),children:e(a,{style:t.diffButtonText,children:"Old"})}),e(y,{style:[t.diffButton,d==="new"&&t.diffButtonActive],onPress:()=>h("new"),children:e(a,{style:t.diffButtonText,children:"New"})}),e(y,{style:[t.diffButton,d==="diff"&&t.diffButtonActive],onPress:()=>h("diff"),children:e(a,{style:t.diffButtonText,children:"Diff"})})]}),d==="old"&&e(DataInspector,{data:r,searchable:false}),d==="new"&&e(DataInspector,{data:i,searchable:false}),d==="diff"&&l(n,{style:t.diffContainer,children:[l(n,{style:t.diffPane,children:[e(a,{style:t.diffPaneTitle,children:"Old"}),e(DataInspector,{data:r,searchable:false})]}),l(n,{style:t.diffPane,children:[e(a,{style:t.diffPaneTitle,children:"New"}),e(DataInspector,{data:i,searchable:false})]})]})]})};const t=R.create({container:{backgroundColor:o.background,borderRadius:8,overflow:"hidden"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:8,borderBottomWidth:1,borderBottomColor:o.border+"20"},title:{fontSize:12,fontWeight:"600",color:o.text},controls:{flexDirection:"row",gap:8},searchContainer:{flexDirection:"row",alignItems:"center",backgroundColor:o.panel,borderRadius:4,paddingHorizontal:8,gap:4},searchInput:{fontSize:11,color:o.text,minWidth:100,paddingVertical:4},editButton:{padding:4,borderRadius:4,backgroundColor:o.primary+"20"},cancelButton:{padding:4,borderRadius:4,backgroundColor:o.error+"20"},scrollView:{maxHeight:300},codeText:{fontFamily:P,fontSize:11,color:o.text,padding:12,lineHeight:16},editor:{fontFamily:P,fontSize:11,color:o.text,padding:12,lineHeight:16,minHeight:200},highlight:{backgroundColor:o.warning+"40",color:o.text},diffControls:{flexDirection:"row",gap:8,padding:8},diffButton:{paddingHorizontal:12,paddingVertical:4,borderRadius:4,backgroundColor:o.panel},diffButtonActive:{backgroundColor:o.primary},diffButtonText:{fontSize:11,color:o.text,fontWeight:"500"},diffContainer:{flexDirection:"row",gap:8},diffPane:{flex:1},diffPaneTitle:{fontSize:10,fontWeight:"600",color:o.secondary,padding:8,textTransform:"uppercase"}});
@@ -1 +1 @@
1
- "use strict";import{useRef as a,useMemo as G,useEffect as I,memo as N}from"react";import{View as O,PanResponder as Y,Dimensions as k}from"react-native";import{jsx as B}from"react/jsx-runtime";export const DraggableHeader=N(function C({children:H,position:c,onDragStart:x,onDragEnd:y,onTap:d,onLongPress:R,longPressDelay:g=350,containerBounds:p=k.get("window"),elementSize:b={width:100,height:50},minPosition:P={x:0,y:0},style:A,enabled:M=true,claimOnMove:_=true,onLayout:E,hitSlop:L,maxOverflowX:w=0,testID:S,accessibilityLabel:X}){const r=a(false);const f=a(0);const h=a({x:0,y:0});const t=a(null);const u=a(false);I(()=>{return()=>{if(t.current!=null){clearTimeout(t.current);t.current=null}}},[]);const n=a({onDragStart:x,onDragEnd:y,onTap:d,onLongPress:R,longPressDelay:g,containerBounds:p,elementSize:b,minPosition:P,enabled:M,claimOnMove:_,maxOverflowX:w});n.current={onDragStart:x,onDragEnd:y,onTap:d,onLongPress:R,longPressDelay:g,containerBounds:p,elementSize:b,minPosition:P,enabled:M,claimOnMove:_,maxOverflowX:w};const j=G(()=>{const o=()=>{if(t.current!=null){clearTimeout(t.current);t.current=null}};return Y.create({onStartShouldSetPanResponder:()=>n.current.enabled,onMoveShouldSetPanResponder:(l,e)=>n.current.enabled&&n.current.claimOnMove&&(Math.abs(e.dx)>1||Math.abs(e.dy)>1),onPanResponderTerminationRequest:()=>false,onPanResponderGrant:()=>{r.current=false;f.current=0;u.current=false;const l=c.x.__getValue();const e=c.y.__getValue();h.current={x:l,y:e};const{onLongPress:s,longPressDelay:i}=n.current;if(s){t.current=setTimeout(()=>{t.current=null;if(!r.current&&f.current<=5){u.current=true;s()}},i)}},onPanResponderMove:(l,e)=>{const s=Math.abs(e.dx)+Math.abs(e.dy);f.current=s;if(s>5&&!r.current){r.current=true;o();n.current.onDragStart?.()}const i=h.current.x+e.dx;const m=h.current.y+e.dy;c.setValue({x:i,y:m})},onPanResponderRelease:()=>{o();const l=u.current;u.current=false;const e=f.current<=5&&!r.current;if(e){if(!l)n.current.onTap?.();r.current=false;return}const s=c.x.__getValue();const i=c.y.__getValue();const{containerBounds:m,elementSize:D,minPosition:v,maxOverflowX:q,onDragEnd:z}=n.current;const F=m.width-D.width+q;const V=Math.max(v.x,Math.min(s,F));const T=Math.max(v.y,Math.min(i,m.height-D.height));c.setValue({x:V,y:T});z?.({x:V,y:T});r.current=false},onPanResponderTerminate:()=>{o();u.current=false;r.current=false}})},[c]);return B(O,{style:A,onLayout:E,hitSlop:L,testID:S,accessibilityLabel:X,accessibilityRole:d?"button":void 0,accessibilityActions:d?[{name:"activate",label:"Hide or show"}]:void 0,onAccessibilityAction:o=>{if(o.nativeEvent.actionName==="activate")n.current.onTap?.()},...j.panHandlers,children:H})});
1
+ "use strict";import{useRef as a,useMemo as F,useEffect as G,memo as I}from"react";import{View as N,PanResponder as Y,Dimensions as k,Platform as B}from"react-native";import{jsx as C}from"react/jsx-runtime";export const DraggableHeader=I(function J({children:H,position:c,onDragStart:x,onDragEnd:y,onTap:d,onLongPress:R,longPressDelay:g=350,containerBounds:b=k.get("window"),elementSize:p={width:100,height:50},minPosition:P={x:0,y:0},style:S,enabled:M=true,claimOnMove:_=true,onLayout:A,hitSlop:E,maxOverflowX:w=0,testID:L,accessibilityLabel:X}){const r=a(false);const f=a(0);const h=a({x:0,y:0});const t=a(null);const u=a(false);G(()=>{return()=>{if(t.current!=null){clearTimeout(t.current);t.current=null}}},[]);const n=a({onDragStart:x,onDragEnd:y,onTap:d,onLongPress:R,longPressDelay:g,containerBounds:b,elementSize:p,minPosition:P,enabled:M,claimOnMove:_,maxOverflowX:w});n.current={onDragStart:x,onDragEnd:y,onTap:d,onLongPress:R,longPressDelay:g,containerBounds:b,elementSize:p,minPosition:P,enabled:M,claimOnMove:_,maxOverflowX:w};const j=F(()=>{const o=()=>{if(t.current!=null){clearTimeout(t.current);t.current=null}};return Y.create({onStartShouldSetPanResponder:()=>n.current.enabled,onMoveShouldSetPanResponder:(l,e)=>n.current.enabled&&n.current.claimOnMove&&(Math.abs(e.dx)>1||Math.abs(e.dy)>1),onPanResponderTerminationRequest:()=>false,onPanResponderGrant:()=>{r.current=false;f.current=0;u.current=false;const l=c.x.__getValue();const e=c.y.__getValue();h.current={x:l,y:e};const{onLongPress:s,longPressDelay:i}=n.current;if(s){t.current=setTimeout(()=>{t.current=null;if(!r.current&&f.current<=5){u.current=true;s()}},i)}},onPanResponderMove:(l,e)=>{const s=Math.abs(e.dx)+Math.abs(e.dy);f.current=s;if(s>5&&!r.current){r.current=true;o();n.current.onDragStart?.()}const i=h.current.x+e.dx;const m=h.current.y+e.dy;c.setValue({x:i,y:m})},onPanResponderRelease:()=>{o();const l=u.current;u.current=false;const e=f.current<=5&&!r.current;if(e){if(!l)n.current.onTap?.();r.current=false;return}const s=c.x.__getValue();const i=c.y.__getValue();const{containerBounds:m,elementSize:D,minPosition:v,maxOverflowX:O,onDragEnd:q}=n.current;const z=m.width-D.width+O;const V=Math.max(v.x,Math.min(s,z));const T=Math.max(v.y,Math.min(i,m.height-D.height));c.setValue({x:V,y:T});q?.({x:V,y:T});r.current=false},onPanResponderTerminate:()=>{o();u.current=false;r.current=false}})},[c]);return C(N,{style:S,onLayout:A,hitSlop:E,testID:L,accessibilityLabel:X,accessibilityRole:d&&B.OS!=="web"?"button":void 0,accessibilityActions:d?[{name:"activate",label:"Hide or show"}]:void 0,onAccessibilityAction:o=>{if(o.nativeEvent.actionName==="activate")n.current.onTap?.()},...j.panHandlers,children:H})});
@@ -1 +1 @@
1
- "use strict";import{createPortal as at}from"react-dom";import{night as L}from"../night/nightTheme.js";import{useState as N,useRef as y,useCallback as B,useEffect as m,useMemo as q,Children as K}from"react";import{calculateTargetPosition as lt}from"./onboardingConstants.web.js";import{useFloatingTools as dt,FloatingToolsProvider as ct,useFloatingToolsContext as ut,interleaveWithDividers as gt,floatingToolsColors as p,withAlpha as D,getUserStatusConfig as pt,getGripIconLayout as ft,interpolatePosition as mt,easing as bt,VISIBLE_HANDLE_WIDTH as J,ANIMATION_DURATION as ht}from"@buoy-gg/floating-tools-react/floating";import{jsx as d,jsxs as Y}from"react/jsx-runtime";const k=10;const wt=20;function Q(){if(typeof document==="undefined"||!document.body)return{top:0,left:0,bottom:0};const e=document.createElement("div");e.style.cssText="position:fixed;top:0;left:0;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-bottom:env(safe-area-inset-bottom)";document.body.appendChild(e);const s=getComputedStyle(e);const r={top:parseFloat(s.paddingTop)||0,left:parseFloat(s.paddingLeft)||0,bottom:parseFloat(s.paddingBottom)||0};document.body.removeChild(e);return r}const $={getItem:e=>localStorage.getItem(e),setItem:(e,s)=>localStorage.setItem(e,s)};const Z="#A0A0A0";function yt({size:e=24,color:s=D(Z,"CC")}){const r=ft(e);return d("div",{style:{width:e,height:e,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:[0,1].map(c=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginLeft:r.columnGap/2,marginRight:r.columnGap/2},children:[0,1,2].map(h=>d("div",{style:{width:r.dotSize,height:r.dotSize,borderRadius:r.dotSize/2,backgroundColor:s,marginTop:r.rowGap/2,marginBottom:r.rowGap/2}},h))},c))})}export function Divider(){return d("div",{style:{width:1,height:12,backgroundColor:D(p.muted,"66"),flexShrink:0}})}const xt={success:p.success,optional:p.optional,muted:p.muted,secondary:Z};export function UserStatus({userRole:e,onPress:s}){const{isDragging:r}=ut();const c=pt(e,xt);const h=b=>{if(!r&&s){b.stopPropagation();b.currentTarget.focus();s()}};return Y("button",{role:"button","aria-label":s?"Open Dev Tools Menu":`User status: ${c.label}`,"data-testid":s?"open-dev-tools-button":void 0,onClick:h,style:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:6,paddingBottom:6,paddingLeft:8,paddingRight:8,flexShrink:0,cursor:s&&!r?"pointer":"default",background:"none",border:"none",margin:0},children:[d("div",{style:{width:6,height:6,borderRadius:3,backgroundColor:c.dotColor,marginRight:4}}),d("span",{style:{fontSize:10,fontWeight:500,color:c.textColor,letterSpacing:.3,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',lineHeight:"normal"},children:c.label})]})}function vt(){const e=y(null);const[s,r]=N({x:0,y:0});const c=B((h,b,F)=>{if(e.current){cancelAnimationFrame(e.current)}const M=performance.now();const x=v=>{const R=v-M;const S=Math.min(R/ht,1);const P=mt(h,b,S,bt.easeOutCubic);r(P);if(S<1){e.current=requestAnimationFrame(x)}else{r(b);F?.()}};e.current=requestAnimationFrame(x)},[]);m(()=>{return()=>{if(e.current){cancelAnimationFrame(e.current)}}},[]);return{position:s,setPosition:r,animateTo:c}}let tt=null;export function getBubbleAnchorPosition(){return tt}export function FloatingTool({id:e,revealToken:s,variant:r="bubble",dragFromSurface:c=false,accessibilityLabel:h="Drag handle",accessory:b,handleAdornment:F,enablePositionPersistence:M=true,children:x,pushToSide:v=false,suspendPointerEvents:R=false,centerOnboarding:S=false,minimizedStack:P,hasMinimizedStack:j=false}){const w=y(null);const et=q(()=>e?{getItem:t=>$.getItem(`@buoy/floating-tool/${e}/${t}`),setItem:(t,i)=>$.setItem(`@buoy/floating-tool/${e}/${t}`,i)}:$,[e]);const{state:o,actions:n,isInitialized:u}=dt({screenSize:{width:window.innerWidth,height:window.innerHeight},enablePositionPersistence:M,storage:et});const{position:g,setPosition:H,animateTo:f}=vt();m(()=>{if(u){H(o.position)}},[u,o.position,H]);m(()=>{if(!e)tt={x:g.x,y:g.y}},[g,e]);m(()=>{if(!u)return;const t=()=>{const l=w.current?.getBoundingClientRect();if(l&&l.width>0&&l.height>0)n.setBubbleSize({width:l.width,height:l.height})};const i=()=>{const l=Q().bottom;n.setScreenSize(window.innerWidth,window.innerHeight-(l>0?l-k:0));t()};t();const a=typeof ResizeObserver!=="undefined"?new ResizeObserver(t):null;if(w.current)a?.observe(w.current);window.addEventListener("resize",i);return()=>{a?.disconnect();window.removeEventListener("resize",i)}},[n,u]);const[ot,nt]=N(0);m(()=>{let t=false;const i=()=>{const a=Q();nt(a.top);if(a.top>0||a.left>0||a.bottom>0){t=true;n.setMinPosition({x:a.left,y:a.top+wt});n.setScreenSize(window.innerWidth,window.innerHeight-(a.bottom>0?a.bottom-k:0))}else if(t){t=false;n.setMinPosition({x:k,y:k});n.setScreenSize(window.innerWidth,window.innerHeight)}};i();window.addEventListener("resize",i);return()=>window.removeEventListener("resize",i)},[n]);const[O,X]=N(false);const U=B(t=>{t.stopPropagation();t.preventDefault();X(true);n.handleDragStart({clientX:t.clientX,clientY:t.clientY})},[n]);const W=y(false);const it=t=>{if(t.button!==0||!(t.target instanceof Element))return;if(t.target.closest('button, a, input, select, textarea, [role="button"], [role="switch"], [role="slider"], [role="checkbox"], [role="radio"], [contenteditable="true"], [data-floating-accessory]'))return;W.current=true;U(t)};const G=B(t=>{const i=n.handleDragMove({clientX:t.clientX,clientY:t.clientY});if(i.isDragging){H(i.position)}},[n,H]);const A=B(t=>{X(false);const i=n.handleDragEnd({clientX:t.clientX,clientY:t.clientY});const a=W.current;W.current=false;if(i.wasTap&&!a){const l=n.toggleHideShow();f(o.position,l.targetPosition,()=>{n.commitPosition(l.targetPosition)})}else if(i.shouldHide){f(o.position,i.position,()=>{n.commitPosition(i.position)})}},[n,f,o.position]);m(()=>{if(O){window.addEventListener("pointermove",G);window.addEventListener("pointerup",A);window.addEventListener("pointercancel",A);return()=>{window.removeEventListener("pointermove",G);window.removeEventListener("pointerup",A);window.removeEventListener("pointercancel",A)}}},[O,G,A]);const E=y(o.position);E.current=o.position;const _=y(o.isHidden);_.current=o.isHidden;const T=y(false);m(()=>{if(!u)return;if(v&&!T.current){if(_.current)return;T.current=true;const{targetPosition:t}=n.forceHide();f(E.current,t,()=>{})}else if(!v&&T.current){T.current=false;if(!_.current)return;const{targetPosition:t}=n.forceShow();const i=w.current?.getBoundingClientRect().width??100;const a={x:Math.max(10,Math.min(t.x,window.innerWidth-i-10)),y:t.y};f(E.current,a,()=>{n.commitPosition(a)})}},[v,u]);m(()=>{if(!S||!u)return;const t=w.current?.getBoundingClientRect().width??100;const i=w.current?.getBoundingClientRect().height??32;const a=lt();const l={x:(window.innerWidth-t)/2,y:window.innerHeight-a-i};f(E.current,l,()=>{})},[S,u]);const V=y(void 0);m(()=>{if(!u||V.current===s)return;V.current=s;if(s!==void 0&&s>0&&o.isHidden){const{targetPosition:t}=n.forceShow();f(o.position,t,()=>n.commitPosition(t))}},[s,u,o.isHidden,o.position,n,f]);const rt=q(()=>r==="strip"?K.toArray(x):gt(K.toArray(x),t=>d(Divider,{},t)),[x,r]);if(!u){return null}const C=Math.max(0,g.y-ot-8);const z=Math.max(0,window.innerHeight-g.y-o.bubbleSize.height-8);const st=C>z;const I=C>=48||C>=z;return Y("div",{ref:w,"data-testid":e??"buoy-floating-tool",role:"toolbar","aria-label":"Floating Tools",onPointerDown:c?it:void 0,style:{position:"fixed",left:g.x,top:g.y,zIndex:v?8999:9999,display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:p.panel,borderTopLeftRadius:j?0:6,borderTopRightRadius:6,borderBottomLeftRadius:6,borderBottomRightRadius:6,borderWidth:o.isDragging?2:1,borderTopWidth:o.isDragging?2:j?0:1,borderStyle:"solid",borderColor:o.isDragging?p.dragActive:D(p.muted,"66"),boxShadow:o.isDragging?`0 6px 12px ${D(p.dragActive,.36)}`:"0 4px 8px rgba(0, 0, 0, 0.3)",cursor:c?o.isDragging?"grabbing":"grab":void 0,userSelect:"none",touchAction:"none",pointerEvents:R?"none":"auto",...r==="strip"?{borderRadius:L.radius.card,minHeight:48,backgroundColor:L.color.surface,borderColor:o.isDragging?L.color.accentBorderStrong:L.color.separator,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.24)"}:{}},children:[P&&at(d("div",{style:{position:"fixed",top:I?g.y:g.y+o.bubbleSize.height,transform:I?"translateY(-100%)":void 0,"--buoy-stack-bottom":I?"0px":"auto","--buoy-stack-top":I?"auto":"0px","--buoy-stack-space":`${I?C:z}px`,left:g.x-1,width:J,overflow:"visible",zIndex:1e4,pointerEvents:R?"none":"auto"},children:P}),document.body),Y("div",{role:"button","aria-label":h,"data-testid":e?`${e}-grip`:"buoy-floating-grip",tabIndex:0,onPointerDown:U,onKeyDown:t=>{if(t.key!=="Enter"&&t.key!==" ")return;t.preventDefault();const i=n.toggleHideShow();f(o.position,i.targetPosition,()=>n.commitPosition(i.targetPosition))},style:{touchAction:"none",paddingLeft:6,paddingRight:6,paddingTop:6,paddingBottom:6,backgroundColor:D(p.muted,"1A"),display:"flex",alignItems:"center",justifyContent:"center",width:J,boxSizing:"border-box",borderRight:`1px solid ${D(p.muted,"66")}`,cursor:o.isDragging?"grabbing":"grab",...r==="strip"?{minHeight:48,backgroundColor:"transparent",borderRight:"none",flexDirection:"column"}:{}},children:[d(yt,{size:r==="strip"?20:12}),F]}),d(ct,{value:{isDragging:o.isDragging,isHidden:o.isHidden},children:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,paddingRight:8},children:rt})}),!o.isHidden&&b&&d("div",{"data-floating-accessory":true,style:{position:"absolute",...st?{bottom:"100%"}:{top:"100%"},left:0,width:"100%",maxHeight:Math.max(C,z),overflowY:"auto",zIndex:1002},children:b})]})}
1
+ "use strict";import{BuoyPortal as dt}from"./portalHost.web.js";import{night as k}from"../night/nightTheme.js";import{useState as Y,useRef as y,useCallback as M,useEffect as m,useMemo as J,Children as Q}from"react";import{calculateTargetPosition as ct}from"./onboardingConstants.web.js";import{useFloatingTools as ut,FloatingToolsProvider as gt,useFloatingToolsContext as pt,interleaveWithDividers as ft,floatingToolsColors as p,withAlpha as v,getUserStatusConfig as mt,getGripIconLayout as ht,interpolatePosition as bt,easing as wt,VISIBLE_HANDLE_WIDTH as Z,ANIMATION_DURATION as yt}from"@buoy-gg/floating-tools-react/floating";import{jsx as d,jsxs as $}from"react/jsx-runtime";const D=10;const tt=20;function W(){if(typeof document==="undefined"||!document.body)return{top:0,left:0,bottom:0};const e=document.createElement("div");e.style.cssText="position:fixed;top:0;left:0;visibility:hidden;pointer-events:none;padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-bottom:env(safe-area-inset-bottom)";document.body.appendChild(e);const s=getComputedStyle(e);const r={top:parseFloat(s.paddingTop)||0,left:parseFloat(s.paddingLeft)||0,bottom:parseFloat(s.paddingBottom)||0};document.body.removeChild(e);return r}const j={getItem:e=>localStorage.getItem(e),setItem:(e,s)=>localStorage.setItem(e,s)};const et="#A0A0A0";function xt({size:e=24,color:s=v(et,"CC")}){const r=ht(e);return d("div",{style:{width:e,height:e,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center"},children:[0,1].map(c=>d("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginLeft:r.columnGap/2,marginRight:r.columnGap/2},children:[0,1,2].map(h=>d("div",{style:{width:r.dotSize,height:r.dotSize,borderRadius:r.dotSize/2,backgroundColor:s,marginTop:r.rowGap/2,marginBottom:r.rowGap/2}},h))},c))})}export function Divider(){return d("div",{style:{width:1,height:12,backgroundColor:v(p.muted,"66"),flexShrink:0}})}const vt={success:p.success,optional:p.optional,muted:p.muted,secondary:et};export function UserStatus({userRole:e,onPress:s}){const{isDragging:r}=pt();const c=mt(e,vt);const h=b=>{if(!r&&s){b.stopPropagation();b.currentTarget.focus();s()}};return $("button",{role:"button","aria-label":s?"Open Dev Tools Menu":`User status: ${c.label}`,"data-testid":s?"open-dev-tools-button":void 0,onClick:h,style:{display:"flex",flexDirection:"row",alignItems:"center",paddingTop:6,paddingBottom:6,paddingLeft:8,paddingRight:8,flexShrink:0,cursor:s&&!r?"pointer":"default",background:"none",border:"none",margin:0},children:[d("div",{style:{width:6,height:6,borderRadius:3,backgroundColor:c.dotColor,marginRight:4}}),d("span",{style:{fontSize:10,fontWeight:500,color:c.textColor,letterSpacing:.3,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',lineHeight:"normal"},children:c.label})]})}function Dt(){const e=y(null);const[s,r]=Y({x:0,y:0});const c=M((h,b,R)=>{if(e.current){cancelAnimationFrame(e.current)}const F=performance.now();const H=S=>{const x=S-F;const A=Math.min(x/yt,1);const E=bt(h,b,A,wt.easeOutCubic);r(E);if(A<1){e.current=requestAnimationFrame(H)}else{r(b);R?.()}};e.current=requestAnimationFrame(H)},[]);m(()=>{return()=>{if(e.current){cancelAnimationFrame(e.current)}}},[]);return{position:s,setPosition:r,animateTo:c}}let ot=null;export function getBubbleAnchorPosition(){return ot}export function FloatingTool({id:e,revealToken:s,variant:r="bubble",dragFromSurface:c=false,defaultPlacement:h="top",accessibilityLabel:b="Drag handle",accessory:R,handleAdornment:F,enablePositionPersistence:H=true,children:S,pushToSide:x=false,suspendPointerEvents:A=false,centerOnboarding:E=false,minimizedStack:O,hasMinimizedStack:X=false}){const w=y(null);const nt=J(()=>e?{getItem:t=>j.getItem(`@buoy/floating-tool/${e}/${t}`),setItem:(t,i)=>j.setItem(`@buoy/floating-tool/${e}/${t}`,i)}:j,[e]);const{state:o,actions:n,isInitialized:u}=ut({screenSize:{width:window.innerWidth,height:window.innerHeight},enablePositionPersistence:H,storage:nt,...h==="bottom"?{initialBubbleSize:{width:100,height:48},initialPosition:{x:window.innerWidth-100-D,y:Math.max(W().top+tt,window.innerHeight-48-W().bottom-D)}}:{}});const{position:g,setPosition:T,animateTo:f}=Dt();m(()=>{if(u){T(o.position)}},[u,o.position,T]);m(()=>{if(!e)ot={x:g.x,y:g.y}},[g,e]);m(()=>{if(!u)return;const t=()=>{const l=w.current?.getBoundingClientRect();if(l&&l.width>0&&l.height>0)n.setBubbleSize({width:l.width,height:l.height})};const i=()=>{const l=W().bottom;n.setScreenSize(window.innerWidth,window.innerHeight-(l>0?l-D:0));t()};t();const a=typeof ResizeObserver!=="undefined"?new ResizeObserver(t):null;if(w.current)a?.observe(w.current);window.addEventListener("resize",i);return()=>{a?.disconnect();window.removeEventListener("resize",i)}},[n,u]);const[it,rt]=Y(0);m(()=>{let t=false;const i=()=>{const a=W();rt(a.top);if(a.top>0||a.left>0||a.bottom>0){t=true;n.setMinPosition({x:a.left,y:a.top+tt});n.setScreenSize(window.innerWidth,window.innerHeight-(a.bottom>0?a.bottom-D:0))}else if(t){t=false;n.setMinPosition({x:D,y:D});n.setScreenSize(window.innerWidth,window.innerHeight)}};i();window.addEventListener("resize",i);return()=>window.removeEventListener("resize",i)},[n]);const[U,V]=Y(false);const q=M(t=>{t.stopPropagation();t.preventDefault();V(true);n.handleDragStart({clientX:t.clientX,clientY:t.clientY})},[n]);const G=y(false);const st=t=>{if(t.button!==0||!(t.target instanceof Element))return;if(t.target.closest('button, a, input, select, textarea, [role="button"], [role="switch"], [role="slider"], [role="checkbox"], [role="radio"], [contenteditable="true"], [data-floating-accessory]'))return;G.current=true;q(t)};const _=M(t=>{const i=n.handleDragMove({clientX:t.clientX,clientY:t.clientY});if(i.isDragging){T(i.position)}},[n,T]);const C=M(t=>{V(false);const i=n.handleDragEnd({clientX:t.clientX,clientY:t.clientY});const a=G.current;G.current=false;if(i.wasTap&&!a){const l=n.toggleHideShow();f(o.position,l.targetPosition,()=>{n.commitPosition(l.targetPosition)})}else if(i.shouldHide){f(o.position,i.position,()=>{n.commitPosition(i.position)})}},[n,f,o.position]);m(()=>{if(U){window.addEventListener("pointermove",_);window.addEventListener("pointerup",C);window.addEventListener("pointercancel",C);return()=>{window.removeEventListener("pointermove",_);window.removeEventListener("pointerup",C);window.removeEventListener("pointercancel",C)}}},[U,_,C]);const z=y(o.position);z.current=o.position;const N=y(o.isHidden);N.current=o.isHidden;const B=y(false);m(()=>{if(!u)return;if(x&&!B.current){if(N.current)return;B.current=true;const{targetPosition:t}=n.forceHide();f(z.current,t,()=>{})}else if(!x&&B.current){B.current=false;if(!N.current)return;const{targetPosition:t}=n.forceShow();const i=w.current?.getBoundingClientRect().width??100;const a={x:Math.max(10,Math.min(t.x,window.innerWidth-i-10)),y:t.y};f(z.current,a,()=>{n.commitPosition(a)})}},[x,u]);m(()=>{if(!E||!u)return;const t=w.current?.getBoundingClientRect().width??100;const i=w.current?.getBoundingClientRect().height??32;const a=ct();const l={x:(window.innerWidth-t)/2,y:window.innerHeight-a-i};f(z.current,l,()=>{})},[E,u]);const K=y(void 0);m(()=>{if(!u||K.current===s)return;K.current=s;if(s!==void 0&&s>0&&o.isHidden){const{targetPosition:t}=n.forceShow();f(o.position,t,()=>n.commitPosition(t))}},[s,u,o.isHidden,o.position,n,f]);const at=J(()=>r==="strip"?Q.toArray(S):ft(Q.toArray(S),t=>d(Divider,{},t)),[S,r]);if(!u){return null}const I=Math.max(0,g.y-it-8);const L=Math.max(0,window.innerHeight-g.y-o.bubbleSize.height-8);const lt=I>L;const P=I>=48||I>=L;return $("div",{ref:w,"data-testid":e??"buoy-floating-tool",role:"toolbar","aria-label":"Floating Tools",onPointerDown:c?st:void 0,style:{position:"fixed",left:g.x,top:g.y,zIndex:x?8999:9999,display:"flex",flexDirection:"row",alignItems:"center",backgroundColor:p.panel,borderTopLeftRadius:X?0:6,borderTopRightRadius:6,borderBottomLeftRadius:6,borderBottomRightRadius:6,borderWidth:o.isDragging?2:1,borderTopWidth:o.isDragging?2:X?0:1,borderStyle:"solid",borderColor:o.isDragging?p.dragActive:v(p.muted,"66"),boxShadow:o.isDragging?`0 6px 12px ${v(p.dragActive,.36)}`:"0 4px 8px rgba(0, 0, 0, 0.3)",cursor:c?o.isDragging?"grabbing":"grab":void 0,userSelect:"none",touchAction:"none",pointerEvents:A?"none":"auto",...r==="strip"?{borderRadius:k.radius.card,minHeight:48,backgroundColor:k.color.surface,borderColor:o.isDragging?k.color.accentBorderStrong:k.color.separator,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.24)"}:{}},children:[O&&d(dt,{children:d("div",{style:{position:"fixed",top:P?g.y:g.y+o.bubbleSize.height,transform:P?"translateY(-100%)":void 0,"--buoy-stack-bottom":P?"0px":"auto","--buoy-stack-top":P?"auto":"0px","--buoy-stack-space":`${P?I:L}px`,left:g.x-1,width:Z,overflow:"visible",zIndex:1e4,pointerEvents:A?"none":"auto"},children:O})}),$("div",{role:"button","aria-label":b,"data-testid":e?`${e}-grip`:"buoy-floating-grip",tabIndex:0,onPointerDown:q,onKeyDown:t=>{if(t.key!=="Enter"&&t.key!==" ")return;t.preventDefault();const i=n.toggleHideShow();f(o.position,i.targetPosition,()=>n.commitPosition(i.targetPosition))},style:{touchAction:"none",paddingLeft:6,paddingRight:6,paddingTop:6,paddingBottom:6,backgroundColor:v(p.muted,"1A"),display:"flex",alignItems:"center",justifyContent:"center",width:Z,boxSizing:"border-box",borderRight:`1px solid ${v(p.muted,"66")}`,cursor:o.isDragging?"grabbing":"grab",...r==="strip"?{minHeight:48,backgroundColor:"transparent",borderRight:"none",flexDirection:"column"}:{}},children:[d(xt,{size:r==="strip"?20:12}),F]}),d(gt,{value:{isDragging:o.isDragging,isHidden:o.isHidden},children:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:6,paddingRight:8},children:at})}),!o.isHidden&&R&&d("div",{"data-floating-accessory":true,style:{position:"absolute",...lt?{bottom:"100%"}:{top:"100%"},left:0,width:"100%",maxHeight:Math.max(I,L),overflowY:"auto",zIndex:1002},children:R})]})}
@@ -1 +1 @@
1
- "use strict";export{FloatingTool,Divider as FloatingToolDivider,UserStatus as FloatingToolUserStatus,getBubbleAnchorPosition}from"./FloatingTool.web.js";export{FloatingToolHost}from"./FloatingToolHost.web.js";export{openFloatingTool,dismissFloatingTool,registerPersistentFloatingTool,getFloatingTools,subscribeFloatingTools}from"../../stores/floatingToolStore.js";export{ARROW_BOTTOM_OFFSET,ARROW_HEIGHT,SPACING_GAP,getScreenCenterY,calculateTooltipPosition,calculateTargetPosition}from"./onboardingConstants.web.js";
1
+ "use strict";export{FloatingTool,Divider as FloatingToolDivider,UserStatus as FloatingToolUserStatus,getBubbleAnchorPosition}from"./FloatingTool.web.js";export{FloatingToolHost}from"./FloatingToolHost.web.js";export{openFloatingTool,dismissFloatingTool,registerPersistentFloatingTool,getFloatingTools,subscribeFloatingTools}from"../../stores/floatingToolStore.js";export{ARROW_BOTTOM_OFFSET,ARROW_HEIGHT,SPACING_GAP,getScreenCenterY,calculateTooltipPosition,calculateTargetPosition}from"./onboardingConstants.web.js";export{BuoyPortal,getBuoyPortalHost,listenBuoyKeydown}from"./portalHost.web.js";
@@ -0,0 +1 @@
1
+ "use strict";import{act as r}from"react";import{createRoot as m}from"react-dom/client";import{afterEach as h,expect as o,it as s,vi as a}from"vitest";import{BuoyPortal as y,getBuoyPortalHost as w,listenBuoyKeydown as b}from"./portalHost.web.js";import{jsx as c,jsxs as p,Fragment as E}from"react/jsx-runtime";a.stubGlobal("IS_REACT_ACT_ENVIRONMENT",true);let i;h(async()=>{await r(async()=>i?.());document.body.innerHTML=""});async function d(){const t=document.createElement("div");document.body.append(t);const e=m(t);i=()=>e.unmount();await r(async()=>e.render(p(y,{children:[c("input",{}),c("section",{})]})));return w()}s("shares one host and removes it with its last user",async()=>{const t=await d();o(w()).toBe(t);o(t.style.zIndex).toBe("2147483647");await r(async()=>i?.());i=void 0;o(t.isConnected).toBe(false)});s("moves into a full screen wrapper, skips canvas, then moves back",async()=>{const t=await d();const e=document.createElement("div");const n=document.createElement("canvas");document.body.append(e,n);for(const[l,u]of[[e,e],[n,document.body],[null,document.body]]){Object.defineProperty(document,"fullscreenElement",{configurable:true,value:l});document.dispatchEvent(new Event("fullscreenchange"));o(t.parentElement).toBe(u)}});s("stops field keys and wheel while keeping Esc and drag handlers",async()=>{const t=await d();const e=t.querySelector("input");const n=a.fn();const l=a.fn();const u=a.fn();window.addEventListener("keydown",n);window.addEventListener("wheel",n);window.addEventListener("pointermove",u);const v=b(l);e.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape",bubbles:true}));t.querySelector("section").dispatchEvent(new WheelEvent("wheel",{bubbles:true}));e.dispatchEvent(new Event("pointermove",{bubbles:true}));o(n).not.toHaveBeenCalled();o(l).toHaveBeenCalledOnce();o(u).toHaveBeenCalledOnce();window.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape"}));o(l).toHaveBeenCalledTimes(2);v();window.removeEventListener("keydown",n);window.removeEventListener("wheel",n);window.removeEventListener("pointermove",u)});s("releases held game keys when focus enters Buoy",async()=>{const t=await d();const e=a.fn();window.addEventListener("keyup",e);document.dispatchEvent(new KeyboardEvent("keydown",{key:"w",code:"KeyW",bubbles:true}));t.querySelector("input").focus();o(e).toHaveBeenCalledOnce();o(e.mock.calls[0][0].code).toBe("KeyW");window.removeEventListener("keyup",e)});s("keeps the shared host until all portals unmount",async()=>{const t=document.createElement("div");document.body.append(t);const e=m(t);i=()=>e.unmount();await r(async()=>e.render(p(E,{children:[c(y,{children:c("input",{})}),c(y,{children:c("button",{})})]})));const n=w();o(document.querySelectorAll("[data-buoy-portal-host]")).toHaveLength(1);await r(async()=>e.render(c(y,{children:c("input",{})})));o(n.isConnected).toBe(true);o(n.querySelector("button")).toBeNull();await r(async()=>e.unmount());i=void 0;o(n.isConnected).toBe(false)});s("releases a game key pressed on a Buoy button before entering a field",async()=>{const t=await d();const e=document.createElement("button");t.append(e);e.focus();const n=a.fn();window.addEventListener("keyup",n);try{e.dispatchEvent(new KeyboardEvent("keydown",{key:"w",code:"KeyW",bubbles:true}));t.querySelector("input").focus();o(n).toHaveBeenCalledOnce();o(n.mock.calls[0][0].code).toBe("KeyW")}finally{window.removeEventListener("keyup",n)}});s("keeps legacy key codes when releasing a held game key",async()=>{const t=await d();const e=a.fn();window.addEventListener("keyup",e);try{document.dispatchEvent(new KeyboardEvent("keydown",{key:"w",code:"KeyW",keyCode:87,which:87,bubbles:true}));t.querySelector("input").focus();o(e.mock.calls[0][0].keyCode).toBe(87);o(e.mock.calls[0][0].which).toBe(87)}finally{window.removeEventListener("keyup",e)}});s("stops keys from a plain text editor",async()=>{const t=await d();const e=document.createElement("div");e.contentEditable="plaintext-only";e.setAttribute("contenteditable","plaintext-only");t.append(e);const n=a.fn();window.addEventListener("keydown",n);try{e.dispatchEvent(new KeyboardEvent("keydown",{key:"w",bubbles:true}));o(n).not.toHaveBeenCalled()}finally{window.removeEventListener("keydown",n)}});s("sets a system font even when the page uses serif text",async()=>{document.body.style.fontFamily="serif";const t=await d();o(t.style.fontFamily).toContain("Segoe UI");o(t.style.fontFamily).toContain("sans-serif");document.body.style.fontFamily=""});
@@ -0,0 +1 @@
1
+ "use strict";import{useEffect as f,useState as p}from"react";import{createPortal as E}from"react-dom";import{systemFont as w}from"../systemFont.js";import{jsx as k}from"react/jsx-runtime";const d=Symbol.for("@buoy-gg/portal-host");const l=o=>{if(!(o instanceof Element))return false;if(o.closest("input, textarea, select"))return true;const t=o.closest("[contenteditable]")?.getAttribute("contenteditable")?.toLowerCase();return t===""||t==="true"||t==="plaintext-only"};export function getBuoyPortalHost(){const o=document;if(o[d])return o[d].host;const t=document.createElement("div");t.dataset.buoyPortalHost="";Object.assign(t.style,{position:"fixed",inset:"0",zIndex:"2147483647",pointerEvents:"none",fontFamily:w});const s=()=>{const e=document.fullscreenElement;const i=e&&e.tagName!=="CANVAS"?e:document.body;if(t.parentElement!==i)i.appendChild(t)};const n=new Map;const r=e=>{if(!t.contains(e.target)||!l(e.target)){n.set(e.code||e.key,{key:e.key,code:e.code,location:e.location,keyCode:e.keyCode,which:e.which,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey})}};const a=e=>{n.delete(e.code||e.key)};const u=()=>n.clear();const y=()=>{const e=[...n.values()];n.clear();for(const i of e)document.dispatchEvent(new KeyboardEvent("keyup",{...i,bubbles:true}))};const c=e=>{if(l(e.target))e.stopPropagation()};const m=e=>e.stopPropagation();s();document.addEventListener("fullscreenchange",s);document.addEventListener("keydown",r,true);document.addEventListener("keyup",a,true);window.addEventListener("blur",u);t.addEventListener("focusin",y);t.addEventListener("keydown",c);t.addEventListener("keyup",c);t.addEventListener("keypress",c);t.addEventListener("wheel",m,{passive:true});o[d]={host:t,users:0,dispose:()=>{document.removeEventListener("fullscreenchange",s);document.removeEventListener("keydown",r,true);document.removeEventListener("keyup",a,true);window.removeEventListener("blur",u);t.remove();delete o[d]}};return t}export function BuoyPortal({children:o}){const[t,s]=p(null);f(()=>{const n=getBuoyPortalHost();const r=document[d];r.users++;s(n);return()=>{if(--r.users===0)r.dispose()}},[]);return t?E(k("div",{"data-buoy-root":"",style:{display:"contents",pointerEvents:"auto"},children:o}),t):null}export function listenBuoyKeydown(o){const t=getBuoyPortalHost();const s=n=>{if(!(n.target instanceof Node)||!t.contains(n.target))o(n)};t.addEventListener("keydown",o);window.addEventListener("keydown",s);return()=>{t.removeEventListener("keydown",o);window.removeEventListener("keydown",s)}}
@@ -1 +1 @@
1
- "use strict";export{monoFont}from"@buoy-gg/floating-tools-core";
1
+ "use strict";export{monoFont}from"@buoy-gg/floating-tools-core";export{systemFont}from"./systemFont.js";
@@ -1 +1 @@
1
- "use strict";export*from"./components/index.js";export*from"./backgrounds/index.js";export{toolTheme}from"./toolTheme.js";export{monoFont}from"./fonts.js";export{CyberpunkSectionButton}from"./console/CyberpunkSectionButton.js";export*from"./gameUI/index.js";export*from"./otto/index.js";export{EVENT_LIST_PRESET,LOG_LIST_PRESET,CLIP_OFFSCREEN_CELLS}from"./listPresets.js";export{FloatingTool,getBubbleAnchorPosition,Divider as FloatingToolDivider,UserStatus as FloatingToolUserStatus}from"./floating/FloatingTool";export{ARROW_BOTTOM_OFFSET,ARROW_HEIGHT,SPACING_GAP,getScreenCenterY,calculateTooltipPosition,calculateTargetPosition}from"./floating/onboardingConstants";export{FloatingToolHost}from"./floating/FloatingToolHost";export{openFloatingTool,dismissFloatingTool,registerPersistentFloatingTool,getFloatingTools,subscribeFloatingTools}from"../stores/floatingToolStore.js";
1
+ "use strict";export*from"./components/index.js";export*from"./backgrounds/index.js";export{toolTheme}from"./toolTheme.js";export{monoFont,systemFont}from"./fonts.js";export{CyberpunkSectionButton}from"./console/CyberpunkSectionButton.js";export*from"./gameUI/index.js";export*from"./otto/index.js";export{EVENT_LIST_PRESET,LOG_LIST_PRESET,CLIP_OFFSCREEN_CELLS}from"./listPresets.js";export{FloatingTool,getBubbleAnchorPosition,Divider as FloatingToolDivider,UserStatus as FloatingToolUserStatus}from"./floating/FloatingTool";export{ARROW_BOTTOM_OFFSET,ARROW_HEIGHT,SPACING_GAP,getScreenCenterY,calculateTooltipPosition,calculateTargetPosition}from"./floating/onboardingConstants";export{FloatingToolHost}from"./floating/FloatingToolHost";export{openFloatingTool,dismissFloatingTool,registerPersistentFloatingTool,getFloatingTools,subscribeFloatingTools}from"../stores/floatingToolStore.js";
@@ -0,0 +1 @@
1
+ "use strict";export const systemFont='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
@@ -1 +1 @@
1
- "use strict";const s={log:()=>{},warn:()=>{},error:(...r)=>{console.error("[optional-module]",...r)}};const e=new Map;const o=new Map;const i=new Set;export async function loadOptionalModule(r,n={}){if(e.has(r)){return e.get(r)}const a={...s,...n.logger??{}};if(!o.has(r)){o.set(r,(async()=>{try{const t=await f(r,n);const l=t?.default??t;e.set(r,l);a.log("Loaded optional module",r);return l}catch(t){a.log("Optional module unavailable",r,t);e.set(r,null);return null}})())}const c=await o.get(r);o.delete(r);if(!c&&n.warnOnceKey&&!i.has(n.warnOnceKey)){i.add(n.warnOnceKey);a.warn(n.warningMessage??`Module '${r}' not found.`)}return c}const u=(()=>{try{return new Function("moduleName","return import(moduleName);")}catch{return null}})();const d=(()=>{try{return new Function("return typeof require === 'function' ? require : undefined;")()}catch{return void 0}})();async function f(r,n){if(n.loader){return await Promise.resolve(n.loader())}if(u){return u(r)}if(d){return d(r)}throw new Error(`No dynamic loader available for optional module '${r}'.`)}export function getCachedOptionalModule(r){if(!e.has(r)){return null}return e.get(r)}
1
+ "use strict";const s={log:()=>{},warn:()=>{},error:(...r)=>{console.error("[Buoy]","[optional-module]",...r)}};const e=new Map;const o=new Map;const u=new Set;export async function loadOptionalModule(r,n={}){if(e.has(r)){return e.get(r)}const a={...s,...n.logger??{}};if(!o.has(r)){o.set(r,(async()=>{try{const t=await f(r,n);const l=t?.default??t;e.set(r,l);a.log("Loaded optional module",r);return l}catch(t){a.log("Optional module unavailable",r,t);e.set(r,null);return null}})())}const c=await o.get(r);o.delete(r);if(!c&&n.warnOnceKey&&!u.has(n.warnOnceKey)){u.add(n.warnOnceKey);a.warn(n.warningMessage??`Module '${r}' not found.`)}return c}const i=(()=>{try{return new Function("moduleName","return import(moduleName);")}catch{return null}})();const d=(()=>{try{return new Function("return typeof require === 'function' ? require : undefined;")()}catch{return void 0}})();async function f(r,n){if(n.loader){return await Promise.resolve(n.loader())}if(i){return i(r)}if(d){return d(r)}throw new Error(`No dynamic loader available for optional module '${r}'.`)}export function getCachedOptionalModule(r){if(!e.has(r)){return null}return e.get(r)}
@@ -1 +1 @@
1
- "use strict";const V=n=>typeof n==="undefined";const h=n=>{if(typeof n!=="object"||n===null)return false;if(n===Object.prototype)return false;if(Object.getPrototypeOf(n)===null)return true;return Object.getPrototypeOf(n)===Object.prototype};const c=n=>Array.isArray(n);const x=n=>typeof n==="boolean"||n===null||typeof n==="undefined"||typeof n==="number"||typeof n==="string"||typeof n==="symbol";const k=n=>n instanceof Date&&!isNaN(n.valueOf());const g=n=>n instanceof Error;const E=n=>n instanceof RegExp;const d=n=>n instanceof Set;const b=n=>n instanceof Map;const N=n=>typeof n==="bigint";const w=n=>typeof n==="number"&&isNaN(n);const D=n=>n===Infinity||n===-Infinity;const S=n=>n===0&&1/n===-Infinity;const _=n=>n instanceof URL;const B=n=>ArrayBuffer.isView(n)&&!(n instanceof DataView);const P={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray};const O=[{isApplicable:V,annotation:"undefined",transform:()=>null,untransform:()=>void 0},{isApplicable:N,annotation:"bigint",transform:n=>n.toString(),untransform:n=>{if(typeof BigInt!=="undefined"){return BigInt(n)}console.error("BigInt is not supported in this environment");return n}},{isApplicable:k,annotation:"Date",transform:n=>n.toISOString(),untransform:n=>new Date(n)},{isApplicable:g,annotation:"Error",transform:n=>({name:n.name,message:n.message,stack:n.stack,cause:"cause"in n?n.cause:void 0}),untransform:n=>{const t=new Error(n.message);t.name=n.name;t.stack=n.stack;if(n.cause!==void 0){t.cause=n.cause}return t}},{isApplicable:E,annotation:"regexp",transform:n=>""+n,untransform:n=>{const t=n.slice(1,n.lastIndexOf("/"));const r=n.slice(n.lastIndexOf("/")+1);return new RegExp(t,r)}},{isApplicable:d,annotation:"set",transform:n=>[...n.values()],untransform:n=>new Set(n)},{isApplicable:b,annotation:"map",transform:n=>[...n.entries()],untransform:n=>new Map(n)},{isApplicable:n=>w(n)||D(n),annotation:"number",transform:n=>{if(w(n))return"NaN";return n>0?"Infinity":"-Infinity"},untransform:n=>Number(n)},{isApplicable:S,annotation:"number",transform:()=>"-0",untransform:()=>-0},{isApplicable:_,annotation:"URL",transform:n=>n.toString(),untransform:n=>new URL(n)},{isApplicable:B,annotation:n=>["typed-array",n.constructor.name],transform:n=>[...n],untransform:(n,t)=>{const r=Array.isArray(t)?t[1]:"Uint8Array";const e=P[r];if(!e){throw new Error(`Unknown typed array: ${r}`)}return new e(n)}}];function y(n){for(const t of O){if(t.isApplicable(n)){const r=typeof t.annotation==="function"?t.annotation(n):t.annotation;return{value:t.transform(n),type:r}}}return void 0}function I(n,t){for(const r of O){const e=typeof r.annotation==="function"?Array.isArray(t)?t[0]:t:r.annotation;const s=Array.isArray(t)&&Array.isArray(e)?t[0]===e[0]:e===t;if(s){return r.untransform(n,t)}}throw new Error(`Unknown transformation: ${t}`)}const R=n=>h(n)||c(n)||b(n)||d(n)||g(n);function A(n){return n.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function U(n,t=[],r=[]){const e=x(n);if(!e&&!R(n)){const o=y(n);return o?{transformedValue:o.value,annotations:{[t.map(String).map(A).join(".")]:o.type}}:{transformedValue:n}}if(!e&&r.indexOf(n)!==-1){return{transformedValue:null}}if(!R(n)){const o=y(n);return o?{transformedValue:o.value,annotations:t.length>0?{[t.map(String).map(A).join(".")]:o.type}:{"":o.type}}:{transformedValue:n}}const s=y(n);const i=s?.value??n;const a=c(i)?[]:{};const f={};if(s){const o=t.length>0?t.map(String).map(A).join("."):"";f[o]=s.type}const l=c(i)?i.map((o,m)=>[m,o]):Object.entries(i);for(const[o,m]of l){const u=String(o);if(u==="__proto__"||u==="constructor"||u==="prototype"){throw new Error(`Detected property ${u}. This is a prototype pollution risk, please remove it from your object.`)}const p=U(m,[...t,o],[...r,n]);a[o]=p.transformedValue;if(p.annotations){Object.assign(f,p.annotations)}}return{transformedValue:a,annotations:Object.keys(f).length>0?f:void 0}}function C(n){if(n==="")return[];const t=[];let r="";for(let e=0;e<n.length;e++){const s=n.charAt(e);if(s==="\\"){const i=n.charAt(e+1);if(i==="\\"){r+="\\";e++;continue}else if(i==="."){r+=".";e++;continue}}if(s==="."){t.push(r);r="";continue}r+=s}if(r){t.push(r)}return t}function L(n,t,r){if(t.length===0){return}let e=n;for(let s=0;s<t.length-1;s++){e=e[t[s]]}e[t[t.length-1]]=r}function M(n,t){let r=n;for(const e of t){r=r[e]}return r}export function serialize(n){const t=U(n);const r={json:t.transformedValue};if(t.annotations){r.meta={values:t.annotations}}return r}export function deserialize(n){const{json:t,meta:r}=n;if(!r?.values){return t}let e=c(t)?[...t]:{...t};const s=Object.entries(r.values).map(([i,a])=>({pathString:i,type:a,path:C(i)})).sort((i,a)=>a.path.length-i.path.length);for(const{type:i,path:a}of s){if(a.length===0){e=I(e,i)}else{const f=M(e,a);const l=I(f,i);L(e,a,l)}}return e}
1
+ "use strict";const V=n=>typeof n==="undefined";const h=n=>{if(typeof n!=="object"||n===null)return false;if(n===Object.prototype)return false;if(Object.getPrototypeOf(n)===null)return true;return Object.getPrototypeOf(n)===Object.prototype};const c=n=>Array.isArray(n);const x=n=>typeof n==="boolean"||n===null||typeof n==="undefined"||typeof n==="number"||typeof n==="string"||typeof n==="symbol";const k=n=>n instanceof Date&&!isNaN(n.valueOf());const g=n=>n instanceof Error;const E=n=>n instanceof RegExp;const d=n=>n instanceof Set;const b=n=>n instanceof Map;const N=n=>typeof n==="bigint";const w=n=>typeof n==="number"&&isNaN(n);const D=n=>n===Infinity||n===-Infinity;const S=n=>n===0&&1/n===-Infinity;const B=n=>n instanceof URL;const _=n=>ArrayBuffer.isView(n)&&!(n instanceof DataView);const P={Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray};const O=[{isApplicable:V,annotation:"undefined",transform:()=>null,untransform:()=>void 0},{isApplicable:N,annotation:"bigint",transform:n=>n.toString(),untransform:n=>{if(typeof BigInt!=="undefined"){return BigInt(n)}console.error("[Buoy]","BigInt is not supported in this environment");return n}},{isApplicable:k,annotation:"Date",transform:n=>n.toISOString(),untransform:n=>new Date(n)},{isApplicable:g,annotation:"Error",transform:n=>({name:n.name,message:n.message,stack:n.stack,cause:"cause"in n?n.cause:void 0}),untransform:n=>{const t=new Error(n.message);t.name=n.name;t.stack=n.stack;if(n.cause!==void 0){t.cause=n.cause}return t}},{isApplicable:E,annotation:"regexp",transform:n=>""+n,untransform:n=>{const t=n.slice(1,n.lastIndexOf("/"));const r=n.slice(n.lastIndexOf("/")+1);return new RegExp(t,r)}},{isApplicable:d,annotation:"set",transform:n=>[...n.values()],untransform:n=>new Set(n)},{isApplicable:b,annotation:"map",transform:n=>[...n.entries()],untransform:n=>new Map(n)},{isApplicable:n=>w(n)||D(n),annotation:"number",transform:n=>{if(w(n))return"NaN";return n>0?"Infinity":"-Infinity"},untransform:n=>Number(n)},{isApplicable:S,annotation:"number",transform:()=>"-0",untransform:()=>-0},{isApplicable:B,annotation:"URL",transform:n=>n.toString(),untransform:n=>new URL(n)},{isApplicable:_,annotation:n=>["typed-array",n.constructor.name],transform:n=>[...n],untransform:(n,t)=>{const r=Array.isArray(t)?t[1]:"Uint8Array";const e=P[r];if(!e){throw new Error(`Unknown typed array: ${r}`)}return new e(n)}}];function y(n){for(const t of O){if(t.isApplicable(n)){const r=typeof t.annotation==="function"?t.annotation(n):t.annotation;return{value:t.transform(n),type:r}}}return void 0}function I(n,t){for(const r of O){const e=typeof r.annotation==="function"?Array.isArray(t)?t[0]:t:r.annotation;const s=Array.isArray(t)&&Array.isArray(e)?t[0]===e[0]:e===t;if(s){return r.untransform(n,t)}}throw new Error(`Unknown transformation: ${t}`)}const R=n=>h(n)||c(n)||b(n)||d(n)||g(n);function A(n){return n.replace(/\\/g,"\\\\").replace(/\./g,"\\.")}function U(n,t=[],r=[]){const e=x(n);if(!e&&!R(n)){const o=y(n);return o?{transformedValue:o.value,annotations:{[t.map(String).map(A).join(".")]:o.type}}:{transformedValue:n}}if(!e&&r.indexOf(n)!==-1){return{transformedValue:null}}if(!R(n)){const o=y(n);return o?{transformedValue:o.value,annotations:t.length>0?{[t.map(String).map(A).join(".")]:o.type}:{"":o.type}}:{transformedValue:n}}const s=y(n);const i=s?.value??n;const a=c(i)?[]:{};const f={};if(s){const o=t.length>0?t.map(String).map(A).join("."):"";f[o]=s.type}const l=c(i)?i.map((o,m)=>[m,o]):Object.entries(i);for(const[o,m]of l){const u=String(o);if(u==="__proto__"||u==="constructor"||u==="prototype"){throw new Error(`Detected property ${u}. This is a prototype pollution risk, please remove it from your object.`)}const p=U(m,[...t,o],[...r,n]);a[o]=p.transformedValue;if(p.annotations){Object.assign(f,p.annotations)}}return{transformedValue:a,annotations:Object.keys(f).length>0?f:void 0}}function C(n){if(n==="")return[];const t=[];let r="";for(let e=0;e<n.length;e++){const s=n.charAt(e);if(s==="\\"){const i=n.charAt(e+1);if(i==="\\"){r+="\\";e++;continue}else if(i==="."){r+=".";e++;continue}}if(s==="."){t.push(r);r="";continue}r+=s}if(r){t.push(r)}return t}function L(n,t,r){if(t.length===0){return}let e=n;for(let s=0;s<t.length-1;s++){e=e[t[s]]}e[t[t.length-1]]=r}function M(n,t){let r=n;for(const e of t){r=r[e]}return r}export function serialize(n){const t=U(n);const r={json:t.transformedValue};if(t.annotations){r.meta={values:t.annotations}}return r}export function deserialize(n){const{json:t,meta:r}=n;if(!r?.values){return t}let e=c(t)?[...t]:{...t};const s=Object.entries(r.values).map(([i,a])=>({pathString:i,type:a,path:C(i)})).sort((i,a)=>a.path.length-i.path.length);for(const{type:i,path:a}of s){if(a.length===0){e=I(e,i)}else{const f=M(e,a);const l=I(f,i);L(e,a,l)}}return e}
@@ -1 +1 @@
1
- "use strict";export*from"react-native-web";export{unstable_createElement,NativeModules,AccessibilityInfo,Animated,Appearance,AppRegistry,AppState,BackHandler,Clipboard,Dimensions,Easing,I18nManager,Keyboard,InteractionManager,LayoutAnimation,Linking,NativeEventEmitter,PanResponder,PixelRatio,Platform,Share,StyleSheet,UIManager,Vibration,CheckBox,FlatList,Image,ImageBackground,KeyboardAvoidingView,Picker,ProgressBar,RefreshControl,SafeAreaView,SectionList,StatusBar,Touchable,TouchableNativeFeedback,VirtualizedList,YellowBox,LogBox,DeviceEventEmitter,useColorScheme,useLocaleContext,useWindowDimensions}from"react-native-web";import*as t from"react-native-web";import{createElement as x,forwardRef as b}from"react";function i(a){const s=b((u,e)=>{const{accessibilityState:c,accessibilityValue:d,...r}=u;for(const n of["busy","checked","disabled","expanded","selected"]){if(c?.[n]!==void 0&&r[`aria-${n}`]===void 0){r[`aria-${n}`]=c[n]}}for(const[n,o]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"})){if(d?.[n]!==void 0&&r[`aria-${o}`]===void 0){r[`aria-${o}`]=d[n]}}return x(a,{...r,ref:e})});const l=a.State;if(l)Object.assign(s,{State:l});s.displayName=a.displayName??a.name??"NativeWebView";return s}export const View=i(t.View);export const Text=i(t.Text);export const TextInput=i(t.TextInput);export const TouchableOpacity=i(t.TouchableOpacity);export const TouchableHighlight=i(t.TouchableHighlight);export const TouchableWithoutFeedback=i(t.TouchableWithoutFeedback);export const Pressable=i(t.Pressable);export const ScrollView=i(t.ScrollView);export const Modal=i(t.Modal);export const Switch=i(t.Switch);export const ActivityIndicator=i(t.ActivityIndicator);export const Button=i(t.Button);export const findNodeHandle=t.findNodeHandle;export const Alert={alert(a,s,l,u){if(typeof document==="undefined")return;const e=document.createElement("dialog");e.dataset.buoyRoot="";e.setAttribute("aria-label",a);e.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";const c=document.createElement("h2");c.textContent=a;c.style.cssText="font-size:18px;margin:0 0 12px";e.appendChild(c);if(s){const o=document.createElement("p");o.textContent=s;o.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px";e.appendChild(o)}const d=document.createElement("div");d.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";const r=l?.length?l:[{text:"OK"}];const n=()=>{e.close?.();e.remove()};for(const o of r){const p=document.createElement("button");p.type="button";p.textContent=o.text??"OK";p.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${o.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`;p.onclick=()=>{n();o.onPress?.()};d.appendChild(p)}e.addEventListener("cancel",o=>{o.preventDefault();if(u?.cancelable===false)return;n();u?.onDismiss?.()});e.appendChild(d);document.body.appendChild(e);if(e.showModal)e.showModal();else e.setAttribute("open","")}};
1
+ "use strict";export*from"react-native-web";export{unstable_createElement,NativeModules,AccessibilityInfo,Animated,Appearance,AppRegistry,AppState,BackHandler,Clipboard,Dimensions,Easing,I18nManager,Keyboard,InteractionManager,LayoutAnimation,Linking,NativeEventEmitter,PanResponder,PixelRatio,Platform,Share,StyleSheet,UIManager,Vibration,CheckBox,FlatList,Image,ImageBackground,KeyboardAvoidingView,Picker,ProgressBar,RefreshControl,SafeAreaView,SectionList,StatusBar,Touchable,TouchableNativeFeedback,VirtualizedList,YellowBox,LogBox,DeviceEventEmitter,useColorScheme,useLocaleContext,useWindowDimensions}from"react-native-web";import*as o from"react-native-web";import{createElement as x,forwardRef as b,useCallback as m,useRef as h}from"react";import{BuoyPortal as y,getBuoyPortalHost as g}from"../ui/floating/portalHost.web.js";function i(c){const n=b((d,e)=>{const{accessibilityState:t,accessibilityValue:p,...l}=d;for(const s of["busy","checked","disabled","expanded","selected"]){if(t?.[s]!==void 0&&l[`aria-${s}`]===void 0){l[`aria-${s}`]=t[s]}}for(const[s,a]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"})){if(p?.[s]!==void 0&&l[`aria-${a}`]===void 0){l[`aria-${a}`]=p[s]}}return x(c,{...l,ref:e})});const r=c.State;if(r)Object.assign(n,{State:r});n.displayName=c.displayName??c.name??"NativeWebView";return n}export const View=i(o.View);export const Text=i(o.Text);export const TextInput=i(o.TextInput);export const TouchableOpacity=i(o.TouchableOpacity);export const TouchableHighlight=i(o.TouchableHighlight);export const TouchableWithoutFeedback=i(o.TouchableWithoutFeedback);export const Pressable=i(o.Pressable);export const ScrollView=i(o.ScrollView);const f=b((c,n)=>{const r=h(null);const d=m(e=>{if(e){let t=e;while(t.parentElement&&t.parentElement!==document.body)t=t.parentElement;if(t.parentElement===document.body){r.current=t;Object.assign(t.style,{position:"relative",zIndex:"2147483647",pointerEvents:"auto"});g().appendChild(t)}}else if(r.current){document.body.appendChild(r.current);r.current=null}if(typeof n==="function")n(e);else if(n)n.current=e},[n]);return x(y,null,x(o.Modal,{...c,ref:d}))});f.displayName="Modal";export const Modal=i(f);export const Switch=i(o.Switch);export const ActivityIndicator=i(o.ActivityIndicator);export const Button=i(o.Button);export const findNodeHandle=o.findNodeHandle;export const Alert={alert(c,n,r,d){if(typeof document==="undefined")return;const e=document.createElement("dialog");e.dataset.buoyRoot="";e.setAttribute("aria-label",c);e.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";const t=document.createElement("h2");t.textContent=c;t.style.cssText="font-size:18px;margin:0 0 12px";e.appendChild(t);if(n){const a=document.createElement("p");a.textContent=n;a.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px";e.appendChild(a)}const p=document.createElement("div");p.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";const l=r?.length?r:[{text:"OK"}];const s=()=>{e.close?.();e.remove()};for(const a of l){const u=document.createElement("button");u.type="button";u.textContent=a.text??"OK";u.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${a.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`;u.onclick=()=>{s();a.onPress?.()};p.appendChild(u)}e.addEventListener("cancel",a=>{a.preventDefault();if(d?.cancelable===false)return;s();d?.onDismiss?.()});e.appendChild(p);document.body.appendChild(e);if(e.showModal)e.showModal();else e.setAttribute("open","")}};
@@ -1 +1 @@
1
- "use strict";import{devToolsStorageKeys as h}from"../storage/devToolsStorageKeys.js";import{notifyStorageWrite as v}from"./storageWrites.js";import{hasAsyncStorageNative as K}from"./asyncStorageNative.js";let i=null;let A=null;let w=false;let o=null;let y=null;const n=new Map;function m(){return typeof window!=="undefined"&&window?.localStorage!==void 0}const R="react-buoy";const D=".health-check";function d(){if(!o?.documentDirectory)return null;return`${o.documentDirectory}${R}/`}function F(t){return encodeURIComponent(t.replace(/~/g,"~0").replace(/\//g,"~1"))}function x(t){return decodeURIComponent(t).replace(/~1/g,"/").replace(/~0/g,"~")}function I(t){const e=d();if(!e)return null;return`${e}${F(t)}.json`}function g(){if(o)return o;try{const t=require("expo-file-system/legacy");o=t?.default||t;if(o&&o.documentDirectory){return o}o=null}catch{}try{const t=require("expo-file-system");o=t?.default||t;if(o&&o.documentDirectory){return o}o=null}catch{}return null}function l(){if(y)return y;if(!K())return null;try{const t=require("@react-native-async-storage/async-storage");y=t?.default||t;if(y&&typeof y.getItem==="function"){return y}y=null}catch{}return null}async function b(){const t=g();if(!t||!t.documentDirectory){return false}const e=d();if(!e)return false;const r=`${e}${D}`;try{const a=await t.getInfoAsync(e);if(!a.exists){await t.makeDirectoryAsync(e,{intermediates:true})}const s=`health-check-${Date.now()}`;await t.writeAsStringAsync(r,s);const c=await t.readAsStringAsync(r);if(c!==s){return false}await t.deleteAsync(r,{idempotent:true});return true}catch(a){console.warn("[React Buoy] FileSystem health check failed:",a);return false}}async function E(){const t=l();if(!t)return;try{const e=await t.getAllKeys();const r=e.filter(c=>c.startsWith(h.base));if(r.length===0){return}const a=await t.multiGet(r);let s=0;for(const[c,p]of a){if(p!==null){await S.setItem(c,p);s++}}void s}catch(e){console.warn("[React Buoy] Migration failed:",e)}}const S={async getItem(t){const e=g();if(!e)return null;const r=I(t);if(!r)return null;try{const a=await e.getInfoAsync(r);if(!a.exists){return null}const s=await e.readAsStringAsync(r);return s}catch{return null}},async setItem(t,e){const r=g();if(!r)return;const a=d();const s=I(t);if(!a||!s)return;try{const c=await r.getInfoAsync(a);if(!c.exists){await r.makeDirectoryAsync(a,{intermediates:true})}await r.writeAsStringAsync(s,e)}catch(c){console.warn("[React Buoy] FileSystem write failed:",c)}},async removeItem(t){const e=g();if(!e)return;const r=I(t);if(!r)return;try{await e.deleteAsync(r,{idempotent:true})}catch{}},async getAllKeys(){const t=g();if(!t)return[];const e=d();if(!e)return[];try{const r=await t.getInfoAsync(e);if(!r.exists)return[];const a=await t.readDirectoryAsync(e);return a.filter(s=>s.endsWith(".json")).map(s=>x(s.replace(".json","")))}catch{return[]}},async multiGet(t){const e=[];for(const r of t){const a=await this.getItem(r);e.push([r,a])}return e},async multiRemove(t){for(const e of t){await this.removeItem(e)}},async clear(){const t=g();if(!t)return;const e=d();if(!e)return;try{await t.deleteAsync(e,{idempotent:true})}catch{}}};const G={async getItem(t){const e=l();if(!e)return n.get(t)??null;try{return await e.getItem(t)}catch{return n.get(t)??null}},async setItem(t,e){const r=l();if(!r){n.set(t,e);return}try{await r.setItem(t,e)}catch{n.set(t,e)}},async removeItem(t){const e=l();n.delete(t);if(!e)return;try{await e.removeItem(t)}catch{}},async getAllKeys(){const t=l();if(!t)return Array.from(n.keys());try{const e=await t.getAllKeys();return e.filter(r=>r.startsWith(h.base))}catch{return Array.from(n.keys())}},async multiGet(t){const e=l();if(!e){return t.map(r=>[r,n.get(r)??null])}try{const r=await e.multiGet(t);return r}catch{return t.map(r=>[r,n.get(r)??null])}},async multiRemove(t){t.forEach(r=>n.delete(r));const e=l();if(!e)return;try{await e.multiRemove(t)}catch{}},async clear(){n.clear();const t=l();if(!t)return;try{const e=await t.getAllKeys();const r=e.filter(a=>a.startsWith(h.base));if(r.length>0){await t.multiRemove(r)}}catch{}}};const W={async getItem(t){if(!m())return n.get(t)??null;try{return window.localStorage.getItem(t)}catch{return n.get(t)??null}},async setItem(t,e){if(!m()){n.set(t,e);return}try{window.localStorage.setItem(t,e)}catch{n.set(t,e)}},async removeItem(t){n.delete(t);if(!m())return;try{window.localStorage.removeItem(t)}catch{}},async getAllKeys(){if(!m())return Array.from(n.keys());try{const t=[];const e=window.localStorage;for(let r=0;r<e.length;r++){const a=e.key(r);if(a&&a.startsWith(h.base)){t.push(a)}}return t}catch{return Array.from(n.keys())}},async multiGet(t){const e=[];for(const r of t){const a=await this.getItem(r);e.push([r,a])}return e},async multiRemove(t){for(const e of t){await this.removeItem(e)}},async clear(){n.clear();if(!m())return;try{const t=await this.getAllKeys();const e=window.localStorage;for(const r of t){e.removeItem(r)}}catch{}}};const k={async getItem(t){return n.get(t)??null},async setItem(t,e){n.set(t,e)},async removeItem(t){n.delete(t)},async getAllKeys(){return Array.from(n.keys())},async multiGet(t){return t.map(e=>[e,n.get(e)??null])},async multiRemove(t){t.forEach(e=>n.delete(e))},async clear(){n.clear()}};async function B(){if(i!==null)return;const t=await b();if(t){const e=await S.getAllKeys();if(e.length===0){await E()}i="filesystem"}else if(m()){i="localstorage"}else{const e=l();if(e){i="asyncstorage";if(!w){w=true;console.warn("[React Buoy] Using AsyncStorage fallback. Settings may be lost if AsyncStorage is cleared. Install expo-file-system for persistent storage.")}}else{i="memory";if(!w){w=true;console.warn("[React Buoy] Using in-memory storage. Settings will be lost on app restart.")}}}}function u(){if(!A){A=B()}return A}function f(){switch(i){case"filesystem":return S;case"asyncstorage":return G;case"localstorage":return W;case"memory":default:return k}}export const persistentStorage={async getItem(t){await u();return f().getItem(t)},async setItem(t,e){await u();await f().setItem(t,e);v(t,e)},async removeItem(t){await u();await f().removeItem(t);v(t,null)},async getAllKeys(){await u();return f().getAllKeys()},async multiGet(t){await u();return f().multiGet(t)},async multiRemove(t){await u();return f().multiRemove(t)},async clear(){await u();return f().clear()}};export async function isUsingPersistentStorage(){await u();return i==="filesystem"}export async function getStorageBackendType(){await u();return i??"memory"}export function resetStorageInit(){i=null;A=null;w=false}
1
+ "use strict";import{devToolsStorageKeys as h}from"../storage/devToolsStorageKeys.js";import{notifyStorageWrite as v}from"./storageWrites.js";import{hasAsyncStorageNative as K}from"./asyncStorageNative.js";let i=null;let A=null;let w=false;let o=null;let y=null;const n=new Map;function m(){return typeof window!=="undefined"&&window?.localStorage!==void 0}const R="react-buoy";const D=".health-check";function d(){if(!o?.documentDirectory)return null;return`${o.documentDirectory}${R}/`}function F(t){return encodeURIComponent(t.replace(/~/g,"~0").replace(/\//g,"~1"))}function B(t){return decodeURIComponent(t).replace(/~1/g,"/").replace(/~0/g,"~")}function I(t){const e=d();if(!e)return null;return`${e}${F(t)}.json`}function g(){if(o)return o;try{const t=require("expo-file-system/legacy");o=t?.default||t;if(o&&o.documentDirectory){return o}o=null}catch{}try{const t=require("expo-file-system");o=t?.default||t;if(o&&o.documentDirectory){return o}o=null}catch{}return null}function l(){if(y)return y;if(!K())return null;try{const t=require("@react-native-async-storage/async-storage");y=t?.default||t;if(y&&typeof y.getItem==="function"){return y}y=null}catch{}return null}async function x(){const t=g();if(!t||!t.documentDirectory){return false}const e=d();if(!e)return false;const r=`${e}${D}`;try{const a=await t.getInfoAsync(e);if(!a.exists){await t.makeDirectoryAsync(e,{intermediates:true})}const s=`health-check-${Date.now()}`;await t.writeAsStringAsync(r,s);const c=await t.readAsStringAsync(r);if(c!==s){return false}await t.deleteAsync(r,{idempotent:true});return true}catch(a){console.warn("[Buoy]","[React Buoy] FileSystem health check failed:",a);return false}}async function b(){const t=l();if(!t)return;try{const e=await t.getAllKeys();const r=e.filter(c=>c.startsWith(h.base));if(r.length===0){return}const a=await t.multiGet(r);let s=0;for(const[c,p]of a){if(p!==null){await S.setItem(c,p);s++}}void s}catch(e){console.warn("[Buoy]","[React Buoy] Migration failed:",e)}}const S={async getItem(t){const e=g();if(!e)return null;const r=I(t);if(!r)return null;try{const a=await e.getInfoAsync(r);if(!a.exists){return null}const s=await e.readAsStringAsync(r);return s}catch{return null}},async setItem(t,e){const r=g();if(!r)return;const a=d();const s=I(t);if(!a||!s)return;try{const c=await r.getInfoAsync(a);if(!c.exists){await r.makeDirectoryAsync(a,{intermediates:true})}await r.writeAsStringAsync(s,e)}catch(c){console.warn("[Buoy]","[React Buoy] FileSystem write failed:",c)}},async removeItem(t){const e=g();if(!e)return;const r=I(t);if(!r)return;try{await e.deleteAsync(r,{idempotent:true})}catch{}},async getAllKeys(){const t=g();if(!t)return[];const e=d();if(!e)return[];try{const r=await t.getInfoAsync(e);if(!r.exists)return[];const a=await t.readDirectoryAsync(e);return a.filter(s=>s.endsWith(".json")).map(s=>B(s.replace(".json","")))}catch{return[]}},async multiGet(t){const e=[];for(const r of t){const a=await this.getItem(r);e.push([r,a])}return e},async multiRemove(t){for(const e of t){await this.removeItem(e)}},async clear(){const t=g();if(!t)return;const e=d();if(!e)return;try{await t.deleteAsync(e,{idempotent:true})}catch{}}};const E={async getItem(t){const e=l();if(!e)return n.get(t)??null;try{return await e.getItem(t)}catch{return n.get(t)??null}},async setItem(t,e){const r=l();if(!r){n.set(t,e);return}try{await r.setItem(t,e)}catch{n.set(t,e)}},async removeItem(t){const e=l();n.delete(t);if(!e)return;try{await e.removeItem(t)}catch{}},async getAllKeys(){const t=l();if(!t)return Array.from(n.keys());try{const e=await t.getAllKeys();return e.filter(r=>r.startsWith(h.base))}catch{return Array.from(n.keys())}},async multiGet(t){const e=l();if(!e){return t.map(r=>[r,n.get(r)??null])}try{const r=await e.multiGet(t);return r}catch{return t.map(r=>[r,n.get(r)??null])}},async multiRemove(t){t.forEach(r=>n.delete(r));const e=l();if(!e)return;try{await e.multiRemove(t)}catch{}},async clear(){n.clear();const t=l();if(!t)return;try{const e=await t.getAllKeys();const r=e.filter(a=>a.startsWith(h.base));if(r.length>0){await t.multiRemove(r)}}catch{}}};const G={async getItem(t){if(!m())return n.get(t)??null;try{return window.localStorage.getItem(t)}catch{return n.get(t)??null}},async setItem(t,e){if(!m()){n.set(t,e);return}try{window.localStorage.setItem(t,e)}catch{n.set(t,e)}},async removeItem(t){n.delete(t);if(!m())return;try{window.localStorage.removeItem(t)}catch{}},async getAllKeys(){if(!m())return Array.from(n.keys());try{const t=[];const e=window.localStorage;for(let r=0;r<e.length;r++){const a=e.key(r);if(a&&a.startsWith(h.base)){t.push(a)}}return t}catch{return Array.from(n.keys())}},async multiGet(t){const e=[];for(const r of t){const a=await this.getItem(r);e.push([r,a])}return e},async multiRemove(t){for(const e of t){await this.removeItem(e)}},async clear(){n.clear();if(!m())return;try{const t=await this.getAllKeys();const e=window.localStorage;for(const r of t){e.removeItem(r)}}catch{}}};const W={async getItem(t){return n.get(t)??null},async setItem(t,e){n.set(t,e)},async removeItem(t){n.delete(t)},async getAllKeys(){return Array.from(n.keys())},async multiGet(t){return t.map(e=>[e,n.get(e)??null])},async multiRemove(t){t.forEach(e=>n.delete(e))},async clear(){n.clear()}};async function k(){if(i!==null)return;const t=await x();if(t){const e=await S.getAllKeys();if(e.length===0){await b()}i="filesystem"}else if(m()){i="localstorage"}else{const e=l();if(e){i="asyncstorage";if(!w){w=true;console.warn("[Buoy]","[React Buoy] Using AsyncStorage fallback. Settings may be lost if AsyncStorage is cleared. Install expo-file-system for persistent storage.")}}else{i="memory";if(!w){w=true;console.warn("[Buoy]","[React Buoy] Using in-memory storage. Settings will be lost on app restart.")}}}}function u(){if(!A){A=k()}return A}function f(){switch(i){case"filesystem":return S;case"asyncstorage":return E;case"localstorage":return G;case"memory":default:return W}}export const persistentStorage={async getItem(t){await u();return f().getItem(t)},async setItem(t,e){await u();await f().setItem(t,e);v(t,e)},async removeItem(t){await u();await f().removeItem(t);v(t,null)},async getAllKeys(){await u();return f().getAllKeys()},async multiGet(t){await u();return f().multiGet(t)},async multiRemove(t){await u();return f().multiRemove(t)},async clear(){await u();return f().clear()}};export async function isUsingPersistentStorage(){await u();return i==="filesystem"}export async function getStorageBackendType(){await u();return i??"memory"}export function resetStorageInit(){i=null;A=null;w=false}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auto-generated safe area implementation
3
3
  * Detected: none
4
- * Generated at: 2026-10-08T02:58:34.170Z
4
+ * Generated at: 2026-10-09T13:14:46.805Z
5
5
  *
6
6
  * DO NOT EDIT - This file is generated by scripts/detect-safe-area.js
7
7
  *
@@ -1,2 +1,2 @@
1
- export declare function AccountSetup(): import("react").ReactPortal | null;
1
+ export declare function AccountSetup(): import("react").JSX.Element | null;
2
2
  //# sourceMappingURL=AccountSetup.web.d.ts.map
@@ -0,0 +1,15 @@
1
+ /** Remove tool keys from single writes and mixed batch writes. */
2
+ export declare function appStorageEvent<T extends {
3
+ data?: any;
4
+ instanceId?: string;
5
+ }>(event: T): T | null;
6
+ /** Tool service URLs. Match hosts exactly so app lookalikes stay visible. */
7
+ export declare function isBuoyRequest(url: string): boolean;
8
+ /** Mark a single tool fetch without hiding app calls to the same URL. */
9
+ export declare function buoyFetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
10
+ export declare function isBuoyLog(args: readonly unknown[]): boolean;
11
+ /** Identify Buoy-owned resources by package location, never by asset name. */
12
+ export declare function isBuoyAssetPath(value: string | undefined): boolean;
13
+ /** Test DOM ownership across shadow hosts as well as light DOM parents. */
14
+ export declare function isBuoyElement(element: Element): boolean;
15
+ //# sourceMappingURL=buoyOwnership.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=buoyOwnership.test.d.ts.map
@@ -2,4 +2,5 @@ export { devToolsStorageKeys, isDevToolsStorageKey } from './devToolsStorageKeys
2
2
  export { definePersistedSetting, type PersistedSetting, type PersistedSettingOptions, } from "./definePersistedSetting";
3
3
  export { getCapacitorAppStorage, type CapacitorAppStorage } from "./capacitorAppStorage";
4
4
  export { callCapacitorNative, hasCapacitorPlugin, isCapacitorNative } from "@buoy-gg/license";
5
+ export { appStorageEvent, isBuoyElement, isBuoyAssetPath, isBuoyRequest, buoyFetch, isBuoyLog } from './buoyOwnership';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -29,7 +29,7 @@ export interface FloatingToolProps {
29
29
  accessory?: ReactNode;
30
30
  handleAdornment?: ReactNode;
31
31
  enablePositionPersistence?: boolean;
32
- /** Accepted for parity with the native shell; the browser store picks the first position. */
32
+ /** First position when there is no saved spot. */
33
33
  defaultPlacement?: "top" | "bottom";
34
34
  children?: ReactNode;
35
35
  /**
@@ -60,5 +60,5 @@ export declare function getBubbleAnchorPosition(): {
60
60
  x: number;
61
61
  y: number;
62
62
  } | null;
63
- export declare function FloatingTool({ id, revealToken, variant, dragFromSurface, accessibilityLabel, accessory, handleAdornment, enablePositionPersistence, children, pushToSide, suspendPointerEvents, centerOnboarding, minimizedStack, hasMinimizedStack, }: FloatingToolProps): import("react").JSX.Element | null;
63
+ export declare function FloatingTool({ id, revealToken, variant, dragFromSurface, defaultPlacement, accessibilityLabel, accessory, handleAdornment, enablePositionPersistence, children, pushToSide, suspendPointerEvents, centerOnboarding, minimizedStack, hasMinimizedStack, }: FloatingToolProps): import("react").JSX.Element | null;
64
64
  //# sourceMappingURL=FloatingTool.web.d.ts.map
@@ -4,4 +4,5 @@ export { FloatingToolHost } from "./FloatingToolHost.web";
4
4
  export { openFloatingTool, dismissFloatingTool, registerPersistentFloatingTool, getFloatingTools, subscribeFloatingTools } from "../../stores/floatingToolStore";
5
5
  export type { FloatingToolRegistration, FloatingToolRenderContext } from "../../stores/floatingToolStore";
6
6
  export { ARROW_BOTTOM_OFFSET, ARROW_HEIGHT, SPACING_GAP, getScreenCenterY, calculateTooltipPosition, calculateTargetPosition } from "./onboardingConstants.web";
7
+ export { BuoyPortal, getBuoyPortalHost, listenBuoyKeydown } from "./portalHost.web";
7
8
  //# sourceMappingURL=index.web.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=portalHost.test.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { type ReactNode } from 'react';
2
+ export declare function getBuoyPortalHost(): HTMLDivElement;
3
+ export declare function BuoyPortal({ children }: {
4
+ children: ReactNode;
5
+ }): import("react").ReactPortal | null;
6
+ /** Field events stop at the host; page events still reach the window. */
7
+ export declare function listenBuoyKeydown(listener: (event: KeyboardEvent) => void): () => void;
8
+ //# sourceMappingURL=portalHost.web.d.ts.map
@@ -4,4 +4,5 @@
4
4
  * may import from it) and re-exported here, which is where every tool reads it.
5
5
  */
6
6
  export { monoFont } from "@buoy-gg/floating-tools-core";
7
+ export { systemFont } from "./systemFont";
7
8
  //# sourceMappingURL=fonts.d.ts.map
@@ -1,7 +1,7 @@
1
1
  export * from "./components";
2
2
  export * from "./backgrounds";
3
3
  export { toolTheme, type ToolTheme } from "./toolTheme";
4
- export { monoFont } from "./fonts";
4
+ export { monoFont, systemFont } from "./fonts";
5
5
  export { CyberpunkSectionButton } from "./console/CyberpunkSectionButton";
6
6
  export * from "./gameUI";
7
7
  export * from "./otto";
@@ -0,0 +1,2 @@
1
+ export declare const systemFont = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif";
2
+ //# sourceMappingURL=systemFont.d.ts.map
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auto-generated safe area implementation
3
3
  * Detected: none
4
- * Generated at: 2026-10-08T02:58:34.170Z
4
+ * Generated at: 2026-10-09T13:14:46.805Z
5
5
  *
6
6
  * DO NOT EDIT - This file is generated by scripts/detect-safe-area.js
7
7
  *
@@ -1,2 +1,2 @@
1
- export declare function AccountSetup(): import("react").ReactPortal | null;
1
+ export declare function AccountSetup(): import("react").JSX.Element | null;
2
2
  //# sourceMappingURL=AccountSetup.web.d.ts.map
@@ -0,0 +1,15 @@
1
+ /** Remove tool keys from single writes and mixed batch writes. */
2
+ export declare function appStorageEvent<T extends {
3
+ data?: any;
4
+ instanceId?: string;
5
+ }>(event: T): T | null;
6
+ /** Tool service URLs. Match hosts exactly so app lookalikes stay visible. */
7
+ export declare function isBuoyRequest(url: string): boolean;
8
+ /** Mark a single tool fetch without hiding app calls to the same URL. */
9
+ export declare function buoyFetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
10
+ export declare function isBuoyLog(args: readonly unknown[]): boolean;
11
+ /** Identify Buoy-owned resources by package location, never by asset name. */
12
+ export declare function isBuoyAssetPath(value: string | undefined): boolean;
13
+ /** Test DOM ownership across shadow hosts as well as light DOM parents. */
14
+ export declare function isBuoyElement(element: Element): boolean;
15
+ //# sourceMappingURL=buoyOwnership.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=buoyOwnership.test.d.ts.map
@@ -2,4 +2,5 @@ export { devToolsStorageKeys, isDevToolsStorageKey } from './devToolsStorageKeys
2
2
  export { definePersistedSetting, type PersistedSetting, type PersistedSettingOptions, } from "./definePersistedSetting";
3
3
  export { getCapacitorAppStorage, type CapacitorAppStorage } from "./capacitorAppStorage";
4
4
  export { callCapacitorNative, hasCapacitorPlugin, isCapacitorNative } from "@buoy-gg/license";
5
+ export { appStorageEvent, isBuoyElement, isBuoyAssetPath, isBuoyRequest, buoyFetch, isBuoyLog } from './buoyOwnership';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -29,7 +29,7 @@ export interface FloatingToolProps {
29
29
  accessory?: ReactNode;
30
30
  handleAdornment?: ReactNode;
31
31
  enablePositionPersistence?: boolean;
32
- /** Accepted for parity with the native shell; the browser store picks the first position. */
32
+ /** First position when there is no saved spot. */
33
33
  defaultPlacement?: "top" | "bottom";
34
34
  children?: ReactNode;
35
35
  /**
@@ -60,5 +60,5 @@ export declare function getBubbleAnchorPosition(): {
60
60
  x: number;
61
61
  y: number;
62
62
  } | null;
63
- export declare function FloatingTool({ id, revealToken, variant, dragFromSurface, accessibilityLabel, accessory, handleAdornment, enablePositionPersistence, children, pushToSide, suspendPointerEvents, centerOnboarding, minimizedStack, hasMinimizedStack, }: FloatingToolProps): import("react").JSX.Element | null;
63
+ export declare function FloatingTool({ id, revealToken, variant, dragFromSurface, defaultPlacement, accessibilityLabel, accessory, handleAdornment, enablePositionPersistence, children, pushToSide, suspendPointerEvents, centerOnboarding, minimizedStack, hasMinimizedStack, }: FloatingToolProps): import("react").JSX.Element | null;
64
64
  //# sourceMappingURL=FloatingTool.web.d.ts.map