@buoy-gg/shared-ui 7.0.77 → 7.0.79

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 (141) hide show
  1. package/lib/commonjs/JsModal.js +1 -1
  2. package/lib/commonjs/bugCase/capture.js +1 -1
  3. package/lib/commonjs/bugCase/format.js +1 -1
  4. package/lib/commonjs/bugCase/index.js +1 -1
  5. package/lib/commonjs/bugCase/lock.js +1 -1
  6. package/lib/commonjs/bugCase/recorder.js +1 -1
  7. package/lib/commonjs/bugCase/scrub.js +1 -1
  8. package/lib/commonjs/bugCase/steps.js +1 -1
  9. package/lib/commonjs/bugCase/validate.js +1 -0
  10. package/lib/commonjs/dataViewer/LiveExplorer.js +1 -1
  11. package/lib/commonjs/dataViewer/SplitDiffViewer.js +1 -1
  12. package/lib/commonjs/dataViewer/ThemedSplitView.js +1 -1
  13. package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1 -1
  14. package/lib/commonjs/dataViewer/flattenTree.js +1 -0
  15. package/lib/commonjs/dataViewer/liveEntries.js +1 -0
  16. package/lib/commonjs/history/components/HistoryList.js +1 -1
  17. package/lib/commonjs/icons/index.js +1 -1
  18. package/lib/commonjs/index.js +1 -1
  19. package/lib/commonjs/license/BuoyUpgradeSheet.js +1 -1
  20. package/lib/commonjs/license/FreeAccountPrompt.js +1 -1
  21. package/lib/commonjs/license/index.js +1 -1
  22. package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -1
  23. package/lib/commonjs/sync/keyedArrays.js +1 -1
  24. package/lib/commonjs/sync/valuePath.js +1 -1
  25. package/lib/commonjs/ui/components/ChipStrip.js +1 -1
  26. package/lib/commonjs/ui/components/DataInspector.js +1 -1
  27. package/lib/commonjs/ui/components/DetailView.js +1 -1
  28. package/lib/commonjs/ui/components/DynamicFilterView.js +1 -1
  29. package/lib/commonjs/ui/components/EntityFilterView.js +1 -1
  30. package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -1
  31. package/lib/commonjs/ui/components/EventHistoryViewer/EventPickerModal.js +1 -1
  32. package/lib/commonjs/ui/components/WindowControls.js +1 -1
  33. package/lib/commonjs/ui/floating/FloatingTool.js +1 -1
  34. package/lib/commonjs/ui/listPresets.js +1 -1
  35. package/lib/commonjs/utils/index.js +1 -1
  36. package/lib/commonjs/utils/loadOptionalModule.js +1 -1
  37. package/lib/commonjs/utils/loadToolModule.js +1 -1
  38. package/lib/commonjs/utils/minimalSuperJSON.js +1 -1
  39. package/lib/commonjs/utils/persistentStorage.js +1 -1
  40. package/lib/commonjs/utils/reloadPlatform.js +1 -1
  41. package/lib/commonjs/utils/snapshotProviderKit.js +1 -1
  42. package/lib/module/JsModal.js +1 -1
  43. package/lib/module/bugCase/capture.js +1 -1
  44. package/lib/module/bugCase/format.js +2 -2
  45. package/lib/module/bugCase/index.js +1 -1
  46. package/lib/module/bugCase/lock.js +1 -1
  47. package/lib/module/bugCase/recorder.js +1 -1
  48. package/lib/module/bugCase/scrub.js +1 -1
  49. package/lib/module/bugCase/steps.js +1 -1
  50. package/lib/module/bugCase/validate.js +1 -0
  51. package/lib/module/dataViewer/LiveExplorer.js +1 -1
  52. package/lib/module/dataViewer/SplitDiffViewer.js +1 -1
  53. package/lib/module/dataViewer/ThemedSplitView.js +1 -1
  54. package/lib/module/dataViewer/VirtualizedDataExplorer.js +1 -1
  55. package/lib/module/dataViewer/flattenTree.js +1 -0
  56. package/lib/module/dataViewer/liveEntries.js +1 -0
  57. package/lib/module/history/components/HistoryList.js +1 -1
  58. package/lib/module/icons/index.js +1 -1
  59. package/lib/module/index.js +1 -1
  60. package/lib/module/license/BuoyUpgradeSheet.js +1 -1
  61. package/lib/module/license/FreeAccountPrompt.js +1 -1
  62. package/lib/module/license/index.js +1 -1
  63. package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
  64. package/lib/module/sync/keyedArrays.js +1 -1
  65. package/lib/module/sync/valuePath.js +1 -1
  66. package/lib/module/ui/components/ChipStrip.js +1 -1
  67. package/lib/module/ui/components/DataInspector.js +1 -1
  68. package/lib/module/ui/components/DetailView.js +1 -1
  69. package/lib/module/ui/components/DynamicFilterView.js +1 -1
  70. package/lib/module/ui/components/EntityFilterView.js +1 -1
  71. package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -1
  72. package/lib/module/ui/components/EventHistoryViewer/EventPickerModal.js +1 -1
  73. package/lib/module/ui/components/WindowControls.js +1 -1
  74. package/lib/module/ui/floating/FloatingTool.js +1 -1
  75. package/lib/module/ui/listPresets.js +1 -1
  76. package/lib/module/utils/index.js +1 -1
  77. package/lib/module/utils/loadOptionalModule.js +1 -1
  78. package/lib/module/utils/loadToolModule.js +1 -1
  79. package/lib/module/utils/minimalSuperJSON.js +1 -1
  80. package/lib/module/utils/persistentStorage.js +1 -1
  81. package/lib/module/utils/reloadPlatform.js +1 -1
  82. package/lib/module/utils/snapshotProviderKit.js +1 -1
  83. package/lib/typescript/commonjs/JsModal.d.ts +6 -0
  84. package/lib/typescript/commonjs/JsModal.web.d.ts +2 -0
  85. package/lib/typescript/commonjs/bugCase/index.d.ts +1 -0
  86. package/lib/typescript/commonjs/bugCase/recorder.d.ts +1 -0
  87. package/lib/typescript/commonjs/bugCase/steps.d.ts +6 -0
  88. package/lib/typescript/commonjs/bugCase/validate.d.ts +14 -0
  89. package/lib/typescript/commonjs/dataViewer/flattenTree.d.ts +35 -0
  90. package/lib/typescript/commonjs/dataViewer/liveEntries.d.ts +19 -0
  91. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  92. package/lib/typescript/commonjs/icons/index.d.ts +1 -0
  93. package/lib/typescript/commonjs/index.d.ts +2 -2
  94. package/lib/typescript/commonjs/license/BuoyUpgradeSheet.d.ts +8 -0
  95. package/lib/typescript/commonjs/license/index.d.ts +1 -1
  96. package/lib/typescript/commonjs/sync/keyedArrays.d.ts +6 -1
  97. package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts +6 -1
  98. package/lib/typescript/commonjs/ui/listPresets.d.ts +2 -2
  99. package/lib/typescript/commonjs/utils/index.d.ts +1 -1
  100. package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts +4 -2
  101. package/lib/typescript/commonjs/utils/persistentStorage.d.ts +6 -0
  102. package/lib/typescript/module/JsModal.d.ts +6 -0
  103. package/lib/typescript/module/JsModal.web.d.ts +2 -0
  104. package/lib/typescript/module/bugCase/index.d.ts +1 -0
  105. package/lib/typescript/module/bugCase/recorder.d.ts +1 -0
  106. package/lib/typescript/module/bugCase/steps.d.ts +6 -0
  107. package/lib/typescript/module/bugCase/validate.d.ts +14 -0
  108. package/lib/typescript/module/dataViewer/flattenTree.d.ts +35 -0
  109. package/lib/typescript/module/dataViewer/liveEntries.d.ts +19 -0
  110. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  111. package/lib/typescript/module/icons/index.d.ts +1 -0
  112. package/lib/typescript/module/index.d.ts +2 -2
  113. package/lib/typescript/module/license/BuoyUpgradeSheet.d.ts +8 -0
  114. package/lib/typescript/module/license/index.d.ts +1 -1
  115. package/lib/typescript/module/sync/keyedArrays.d.ts +6 -1
  116. package/lib/typescript/module/ui/floating/FloatingTool.d.ts +6 -1
  117. package/lib/typescript/module/ui/listPresets.d.ts +2 -2
  118. package/lib/typescript/module/utils/index.d.ts +1 -1
  119. package/lib/typescript/module/utils/minimalSuperJSON.d.ts +4 -2
  120. package/lib/typescript/module/utils/persistentStorage.d.ts +6 -0
  121. package/lib/web/chunks/chunk-36A4T5PL.mjs +1 -0
  122. package/lib/web/chunks/{chunk-XUYN4NOF.mjs → chunk-5UII72AQ.mjs} +1 -1
  123. package/lib/web/chunks/chunk-A3N3WVKC.mjs +1 -0
  124. package/lib/web/chunks/chunk-AVRGPBZK.mjs +6 -0
  125. package/lib/web/chunks/chunk-JTNYUDJZ.mjs +1 -0
  126. package/lib/web/chunks/{chunk-BMITMQVB.mjs → chunk-LADTE6U4.mjs} +3 -3
  127. package/lib/web/chunks/chunk-N5Z7Z2GY.mjs +1 -0
  128. package/lib/web/chunks/chunk-SAWSKX4E.mjs +6 -0
  129. package/lib/web/chunks/{chunk-OVTASJUJ.mjs → chunk-SUG6TLF5.mjs} +1 -1
  130. package/lib/web/chunks/{chunk-GTRVOJUH.mjs → chunk-UVVRCZX5.mjs} +1 -1
  131. package/lib/web/chunks/chunk-Y7FM4WZ7.mjs +6 -0
  132. package/lib/web/chunks/chunk-ZRZQZF2T.mjs +15 -0
  133. package/lib/web/chunks/persistentStorage.web-IBLIV62L.mjs +1 -0
  134. package/lib/web/dataViewer.mjs +2 -2
  135. package/lib/web/history.mjs +1 -1
  136. package/lib/web/index.mjs +6 -6
  137. package/lib/web/ui.mjs +1 -1
  138. package/lib/web/utils.mjs +1 -1
  139. package/package.json +5 -5
  140. package/lib/web/chunks/chunk-DJD42EPL.mjs +0 -1
  141. package/lib/web/chunks/chunk-GN75GBYZ.mjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";export const MAX_DEPTH_LIMIT=15;const C=t=>typeof t==="object"&&t!==null&&!(t instanceof Date)&&!(t instanceof Error)&&!(t instanceof RegExp)&&!(t instanceof Map)&&!(t instanceof Set);export const getValueType=t=>{if(t===null)return"null";if(t===void 0)return"undefined";if(Array.isArray(t))return"array";if(t instanceof Date)return"date";if(t instanceof Error)return"error";if(t instanceof Map)return"map";if(t instanceof Set)return"set";if(t instanceof RegExp)return"regexp";if(typeof t==="function")return"function";if(typeof t==="symbol")return"symbol";if(typeof t==="bigint")return"bigint";if(typeof t==="object")return"object";return typeof t};export const getValueCount=(t,e)=>{if(t===null)return 0;switch(e){case"array":return Array.isArray(t)?t.length:0;case"object":return C(t)?Object.keys(t).length:0;case"map":return t instanceof Map?t.size:0;case"set":return t instanceof Set?t.size:0;default:return 0}};export const getChildEntries=(t,e)=>{switch(e){case"array":return Array.isArray(t)?t.map((r,n)=>[n.toString(),r]):[];case"object":return C(t)?Object.entries(t):[];case"map":return t instanceof Map?Array.from(t.entries()).map(([r,n])=>[String(r),n]):[];case"set":return t instanceof Set?Array.from(t.values()).map((r,n)=>[n.toString(),r]):[];default:return[]}};export function flattenTree(t,e,r,n,h="root",s=0,d,g=[],c=0,f=1,u=[]){if(s>Math.min(n,MAX_DEPTH_LIMIT))return[];const a=[...g,h];const o=a.join(".");const i=getValueType(t);const p=["object","array","map","set"].includes(i)&&t!==null;const m=p?getValueCount(t,i):0;if(t&&typeof t==="object"){if(r.has(t)){return[{id:o,key:h,value:"[Circular Reference]",valueType:"circular",depth:s,isExpandable:false,isExpanded:false,parentId:d,hasChildren:false,childCount:0,path:a,type:"circular",isLastChild:c===f-1,parentHasMoreSiblings:[...u],siblingIndex:c,totalSiblings:f}]}r.add(t)}const b={id:o,key:h,value:t,valueType:i,depth:s,isExpandable:p,isExpanded:e.has(o),parentId:d,hasChildren:m>0,childCount:m,path:a,type:p?"expandable":i,isLastChild:c===f-1,parentHasMoreSiblings:[...u],siblingIndex:c,totalSiblings:f};const j=[b];if(p&&e.has(o)&&s<Math.min(n,MAX_DEPTH_LIMIT)){try{const y=getChildEntries(t,i);const A=y.length;const E=[...u];if(s>0){E[s-1]=!b.isLastChild}y.forEach(([M,x],T)=>{const L=flattenTree(x,e,r,n,M,s+1,o,a,T,A,E);for(const P of L)j.push(P)})}catch(y){console.error("[Buoy]",y)}}return j}
@@ -0,0 +1 @@
1
+ "use strict";export const LIVE_PAGE_SIZE=100;export function getLiveSubEntries(t){if(t===null||t===void 0||typeof t!=="object"){return[]}if(Array.isArray(t)){return t.map((n,r)=>({label:r.toString(),value:n}))}if(t instanceof Map){return Array.from(t.entries()).map(([n,r])=>({label:String(n),value:r}))}if(t instanceof Set){return Array.from(t).map((n,r)=>({label:r.toString(),value:n}))}return Object.entries(t).map(([n,r])=>({label:n,value:r}))}export function livePageRange(t,n,r=LIVE_PAGE_SIZE){const e=t*r;const i=Math.min(n,e+r)-1;return`[${e}...${i}]`}
@@ -1 +1 @@
1
- "use strict";import{useCallback as m,useMemo as y}from"react";import{FlatList as w,View as L,Text as u,StyleSheet as T}from"react-native";import{buoyColors as g}from"../../ui/gameUI/constants/gameUIColors.js";import{HistoryEntryRow as E}from"./HistoryEntryRow.js";import{useAllHistoryEntries as b,useHistoryAdapters as I}from"../HistoryProvider.js";import{jsx as o,jsxs as H}from"react/jsx-runtime";export function HistoryList({filter:x,selectedEntryId:n,onSelectEntry:i,showSource:s=true,emptyMessage:a="No history entries yet",ListHeaderComponent:p,ListFooterComponent:h}){const C=b(x);const c=I();const l=y(()=>{const t=new Map;c.forEach(d=>t.set(d.id,d));return t},[c]);const f=m(t=>`${t.source}-${t.id}`,[]);const S=m(({item:t})=>{const d=l.get(t.source);return o(E,{entry:t,adapter:d,isSelected:n===t.id,onPress:i,showSource:s})},[l,n,i,s]);const e=y(()=>H(L,{style:r.emptyContainer,children:[o(u,{style:r.emptyText,children:a}),o(u,{style:r.emptySubtext,children:"Actions will appear here as they happen"})]}),[a]);return o(w,{data:C,keyExtractor:f,renderItem:S,ListEmptyComponent:e,ListHeaderComponent:p,ListFooterComponent:h,contentContainerStyle:r.listContent,showsVerticalScrollIndicator:false,removeClippedSubviews:true,maxToRenderPerBatch:15,windowSize:10,initialNumToRender:15,getItemLayout:void 0})}export function StandaloneHistoryList({entries:x,adapters:n=[],selectedEntryId:i,onSelectEntry:s,showSource:a=true,emptyMessage:p="No history entries yet",ListHeaderComponent:h,ListFooterComponent:C}){const c=y(()=>{const e=new Map;n.forEach(t=>e.set(t.id,t));return e},[n]);const l=m(e=>`${e.source}-${e.id}`,[]);const f=m(({item:e})=>{const t=c.get(e.source);return o(E,{entry:e,adapter:t,isSelected:i===e.id,onPress:s,showSource:a})},[c,i,s,a]);const S=y(()=>H(L,{style:r.emptyContainer,children:[o(u,{style:r.emptyText,children:p}),o(u,{style:r.emptySubtext,children:"Actions will appear here as they happen"})]}),[p]);return o(w,{data:x,keyExtractor:l,renderItem:f,ListEmptyComponent:S,ListHeaderComponent:h,ListFooterComponent:C,contentContainerStyle:r.listContent,showsVerticalScrollIndicator:false,removeClippedSubviews:true,maxToRenderPerBatch:15,windowSize:10,initialNumToRender:15})}const r=T.create({listContent:{flexGrow:1,paddingVertical:4},emptyContainer:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:60,paddingHorizontal:20},emptyText:{fontSize:16,fontWeight:"600",color:g.text,marginBottom:8},emptySubtext:{fontSize:13,color:g.textMuted,textAlign:"center"}});
1
+ "use strict";import{useCallback as m,useMemo as y}from"react";import{FlatList as w,View as L,Text as u,StyleSheet as E}from"react-native";import{buoyColors as T}from"../../ui/gameUI/constants/gameUIColors.js";import{HistoryEntryRow as b}from"./HistoryEntryRow.js";import{useAllHistoryEntries as H,useHistoryAdapters as k}from"../HistoryProvider.js";import{jsx as o,jsxs as g}from"react/jsx-runtime";export function HistoryList({filter:h,selectedEntryId:n,onSelectEntry:s,showSource:i=true,emptyMessage:a="No history entries yet",ListHeaderComponent:c,ListFooterComponent:x}){const C=H(h);const p=k();const l=y(()=>{const t=new Map;p.forEach(d=>t.set(d.id,d));return t},[p]);const f=m(t=>`${t.source}-${t.id}`,[]);const S=m(({item:t})=>{const d=l.get(t.source);return o(b,{entry:t,adapter:d,isSelected:n===t.id,onPress:s,showSource:i})},[l,n,s,i]);const e=y(()=>g(L,{style:r.emptyContainer,children:[o(u,{style:r.emptyText,children:a}),o(u,{style:r.emptySubtext,children:"Actions will appear here as they happen"})]}),[a]);return o(w,{keyboardShouldPersistTaps:"handled",data:C,keyExtractor:f,renderItem:S,ListEmptyComponent:e,ListHeaderComponent:c,ListFooterComponent:x,contentContainerStyle:r.listContent,showsVerticalScrollIndicator:false,removeClippedSubviews:true,maxToRenderPerBatch:15,windowSize:10,initialNumToRender:15,getItemLayout:void 0})}export function StandaloneHistoryList({entries:h,adapters:n=[],selectedEntryId:s,onSelectEntry:i,showSource:a=true,emptyMessage:c="No history entries yet",ListHeaderComponent:x,ListFooterComponent:C}){const p=y(()=>{const e=new Map;n.forEach(t=>e.set(t.id,t));return e},[n]);const l=m(e=>`${e.source}-${e.id}`,[]);const f=m(({item:e})=>{const t=p.get(e.source);return o(b,{entry:e,adapter:t,isSelected:s===e.id,onPress:i,showSource:a})},[p,s,i,a]);const S=y(()=>g(L,{style:r.emptyContainer,children:[o(u,{style:r.emptyText,children:c}),o(u,{style:r.emptySubtext,children:"Actions will appear here as they happen"})]}),[c]);return o(w,{keyboardShouldPersistTaps:"handled",data:h,keyExtractor:l,renderItem:f,ListEmptyComponent:S,ListHeaderComponent:x,ListFooterComponent:C,contentContainerStyle:r.listContent,showsVerticalScrollIndicator:false,removeClippedSubviews:true,maxToRenderPerBatch:15,windowSize:10,initialNumToRender:15})}const r=E.create({listContent:{flexGrow:1,paddingVertical:4},emptyContainer:{flex:1,alignItems:"center",justifyContent:"center",paddingVertical:60,paddingHorizontal:20},emptyText:{fontSize:16,fontWeight:"600",color:T.text,marginBottom:8},emptySubtext:{fontSize:13,color:T.textMuted,textAlign:"center"}});
@@ -1 +1 @@
1
- "use strict";export*from"./primitives/index.js";export{NetworkIcon,NETWORK_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{EnvIcon,ENV_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ConsoleIcon,CONSOLE_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{TimeMachineIcon,TIME_MACHINE_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ImagesIcon,IMAGES_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{AssetsIcon,ASSETS_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ImpersonateIcon,IMPERSONATE_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ImageOverlayIcon,IMAGE_OVERLAY_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ZustandIcon,ZUSTAND_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{JotaiIcon,JOTAI_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{EnvLaptopIcon,LaptopIcon}from"./EnvLaptopIcon.js";export{ReactQueryIcon}from"./ReactQueryIcon.js";export{SentryBugIcon}from"./SentryBugIcon.js";export{StorageStackIcon}from"./StorageStackIcon.js";export{WifiCircuitIcon}from"./WifiCircuitIcon.js";export{RouteMapIcon,RouteIcon,NavigationIcon}from"./RouteMapIcon.js";export{StackPulseIcon,RenderPulseIcon,HighlightUpdatesIcon}from"./StackPulseIcon.js";export{RenderCountIcon}from"./RenderCountIcon.js";export{BenchmarkIcon as BenchmarkLegacyIcon}from"./BenchmarkIcon.js";export{IconBackground}from"./IconBackground.js";export*from"./lucide-icons.js";export{ActivityGlyph as Activity,AlertCircleGlyph as AlertCircle,AlertTriangleGlyph as AlertTriangle,BookmarkGlyph as Bookmark,BoxGlyph as Box,BugGlyph as Bug,CheckCircleGlyph as CheckCircle,CheckGlyph as Check,ChevronDownGlyph as ChevronDown,ChevronLeftGlyph as ChevronLeft,ChevronRightGlyph as ChevronRight,ChevronUpGlyph as ChevronUp,ClockGlyph as Clock,CopyGlyph as Copy,DatabaseGlyph as Database,DockBottomGlyph as DockBottom,DownloadGlyph as Download,Edit3Glyph as Edit3,EyeOffGlyph as EyeOff,EyeGlyph as Eye,FileJsonGlyph as FileJson,FileTextGlyph as FileText,FilmGlyph as Film,FilterGlyph as Filter,FlaskConicalGlyph as FlaskConical,FloatWindowGlyph as FloatWindow,GitBranchGlyph as GitBranch,GlobeGlyph as Globe,HashGlyph as Hash,HomeGlyph as Home,ImageGlyph as Image,InfoGlyph as Info,KeyGlyph as Key,LayersGlyph as Layers,LinkGlyph as Link,LockGlyph as Lock,MinusGlyph as Minus,MusicGlyph as Music,NavigationGlyph as Navigation,PaletteGlyph as Palette,PauseGlyph as Pause,PlayGlyph as Play,PlusGlyph as Plus,PowerGlyph as Power,RefreshCwGlyph as RefreshCw,SearchGlyph as Search,ServerGlyph as Server,SettingsGlyph as Settings,SettingsSolidIcon as SettingsSolid,ShieldGlyph as Shield,Trash2Glyph as Trash2,Trash2Glyph as Trash,UnlockGlyph as Unlock,UploadGlyph as Upload,UserGlyph as User,WifiGlyph as Wifi,XCircleGlyph as XCircle,XGlyph as X,ZapGlyph as Zap}from"@buoy-gg/floating-tools-core";export{SentryIcon,EventsIcon,RoutesIcon,RoutePinIcon,RoutePathIcon,RouteDotIcon,RouteTwoPinsIcon,CameraIcon,HighlightIcon,ReduxIcon,StorageIcon,AskBuoyIcon,HighlighterIcon,QueryIcon,ScenariosIcon}from"@buoy-gg/floating-tools-core";export{WifiIcon as WifiBifIcon,BenchmarkIcon,BENCHMARK_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{NotificationsIcon,NOTIFICATIONS_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ClockToolIcon,CLOCK_TOOL_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{PermissionsIcon,PERMISSIONS_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{LifecycleToolIcon,LIFECYCLE_TOOL_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{LocationToolIcon,LOCATION_TOOL_ICON_COLOR}from"@buoy-gg/floating-tools-core";
1
+ "use strict";export*from"./primitives/index.js";export{NetworkIcon,NETWORK_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{EnvIcon,ENV_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ConsoleIcon,CONSOLE_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{TimeMachineIcon,TIME_MACHINE_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ImagesIcon,IMAGES_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{AssetsIcon,ASSETS_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ImpersonateIcon,IMPERSONATE_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ImageOverlayIcon,IMAGE_OVERLAY_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ZustandIcon,ZUSTAND_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{JotaiIcon,JOTAI_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{EnvLaptopIcon,LaptopIcon}from"./EnvLaptopIcon.js";export{ReactQueryIcon}from"./ReactQueryIcon.js";export{SentryBugIcon}from"./SentryBugIcon.js";export{StorageStackIcon}from"./StorageStackIcon.js";export{WifiCircuitIcon}from"./WifiCircuitIcon.js";export{RouteMapIcon,RouteIcon,NavigationIcon}from"./RouteMapIcon.js";export{StackPulseIcon,RenderPulseIcon,HighlightUpdatesIcon}from"./StackPulseIcon.js";export{RenderCountIcon}from"./RenderCountIcon.js";export{BenchmarkIcon as BenchmarkLegacyIcon}from"./BenchmarkIcon.js";export{IconBackground}from"./IconBackground.js";export*from"./lucide-icons.js";export{ActivityGlyph as Activity,AlertCircleGlyph as AlertCircle,AlertTriangleGlyph as AlertTriangle,BookmarkGlyph as Bookmark,BoxGlyph as Box,BugGlyph as Bug,CheckCircleGlyph as CheckCircle,CheckGlyph as Check,ChevronDownGlyph as ChevronDown,ChevronLeftGlyph as ChevronLeft,ChevronRightGlyph as ChevronRight,ChevronUpGlyph as ChevronUp,ClockGlyph as Clock,CopyGlyph as Copy,DatabaseGlyph as Database,DockBottomGlyph as DockBottom,DownloadGlyph as Download,Edit3Glyph as Edit3,EyeOffGlyph as EyeOff,EyeGlyph as Eye,FileJsonGlyph as FileJson,FileTextGlyph as FileText,FilmGlyph as Film,FilterGlyph as Filter,FlaskConicalGlyph as FlaskConical,FloatWindowGlyph as FloatWindow,GitBranchGlyph as GitBranch,GlobeGlyph as Globe,HashGlyph as Hash,HomeGlyph as Home,ImageGlyph as Image,InfoGlyph as Info,KeyGlyph as Key,LayersGlyph as Layers,LinkGlyph as Link,LockGlyph as Lock,MinusGlyph as Minus,MusicGlyph as Music,NavigationGlyph as Navigation,PaletteGlyph as Palette,PauseGlyph as Pause,PlayGlyph as Play,PlusGlyph as Plus,PowerGlyph as Power,RefreshCwGlyph as RefreshCw,SearchGlyph as Search,ServerGlyph as Server,SettingsGlyph as Settings,SettingsSolidIcon as SettingsSolid,ShieldGlyph as Shield,Trash2Glyph as Trash2,Trash2Glyph as Trash,UnlockGlyph as Unlock,UploadGlyph as Upload,UserGlyph as User,WifiGlyph as Wifi,XCircleGlyph as XCircle,XGlyph as X,ZapGlyph as Zap}from"@buoy-gg/floating-tools-core";export{SentryIcon,EventsIcon,RoutesIcon,RoutePinIcon,RoutePathIcon,RouteDotIcon,RouteTwoPinsIcon,CameraIcon,HighlightIcon,ReduxIcon,StorageIcon,AskBuoyIcon,HighlighterIcon,QueryIcon,ScenariosIcon}from"@buoy-gg/floating-tools-core";export{WifiIcon as WifiBifIcon,BenchmarkIcon,BENCHMARK_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{NotificationsIcon,NOTIFICATIONS_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{ClockToolIcon,CLOCK_TOOL_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{PermissionsIcon,PERMISSIONS_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{LifecycleToolIcon,LIFECYCLE_TOOL_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{LocationToolIcon,LOCATION_TOOL_ICON_COLOR}from"@buoy-gg/floating-tools-core";export{OtaInspectorIcon,OTA_INSPECTOR_ICON_COLOR}from"@buoy-gg/floating-tools-core";
@@ -1 +1 @@
1
- "use strict";export*from"./ui/index.js";export*from"./stores/index.js";export*from"./bugCase/index.js";export*from"./sync/keyedArrays.js";export*from"./sync/valueShape.js";export*from"./sync/valuePath.js";export*from"./sync/typedEdit.js";export*from"./sync/wireBudget.js";export*from"./sync/wireForm.js";export*from"./sync/toolSyncAdapter.js";export{startSettingsSync,SettingsSync,PERSONAL_SETTING_KEYS,TEAM_SETTING_KEYS,onSettingsApplied,syncSettingsNow}from"./sync/settingsSync.js";export*from"./tools/defineTool.js";export*from"./sync/toolActionRegistry.js";export*from"./sync/toolUiBridge.js";export*from"./sync/toolScreenHeader.js";export{absoluteFill,displayValue,parseDisplayValue,getSafeAreaInsets,persistentStorage,isUsingPersistentStorage,getStorageBackendType,safeStringify,getValueType,isPrimitive,isJsonSerializable,isValidJson,getConstructorName,isEmpty,getValueSize,parseValue,formatValue,getTypeColor,truncateText,flattenObject,formatPath,loadOptionalModule,getCachedOptionalModule,setRenderCaptureProvider,getRenderCaptureProvider,registerStateSnapshotProvider,getStateSnapshotProviders,getStateSnapshotProvider,subscribeToStateSnapshotProviders,superJsonSerialize,superJsonDeserialize,realNow,getRealAppState,subscribeRealAppState,BUOY_SYNTHETIC_MARK,countBuoyListener,reloadApp,scheduleReloadApp,resolveReloadStrategy,REMOTE_RELOAD_DELAY_MS,getDevServerOrigin,Subscribable,subscriberCountNotifier,subscribeToSubscriberCountChanges,notifySubscriberCountChange,useSafeRouter,useSafePathname,useSafeSegments,useSafeGlobalSearchParams,getSafeRouter,getSafeCurrentPathname,getSafeCurrentRoute,isExpoRouterAvailable}from"./utils/index.js";export*from"./utils/toolModules.js";export{subscribeStorageWrites}from"./utils/storageWrites.js";export{registerBrowserRouter,browserRouter,subscribeBrowserNavigation}from"./utils/browserNavigation.js";export{PREVIEW_ITEM_RENDER_BYTE_LIMIT,createRestoreScope,emptyRestoreResult,failedRestore,skippedRestore,classifyPreviewItem,wontApply,unionKeys}from"./utils/snapshotProviderKit.js";export{entityColor,formatValuePreview,shallowDiffSummary}from"./utils/stateTools.js";export*from"./utils/formatting/index.js";export*from"./utils/time/index.js";export{isPlainObject as isPlainObjectUtil}from"./utils/typeHelpers.js";export*from"./icons/index.js";export*from"./clipboard/index.js";export*from"./logger/index.js";export*from"./settings/index.js";export*from"./storage/index.js";export{useSafeAreaInsets,useFilterManager,usePersistedState,resetPersistedStateCache,useChangeLog,useSubscribedValue,useEventStoreEvents,useDeviceInfo,getDeviceInfo,logDeviceInfo}from"./hooks/index.js";export{JsModal}from"./JsModal";export{night,NIGHT_LABEL_TRACKING}from"./ui/night/nightTheme.js";export{QrCodeView}from"./ui/qr/QrCodeView.js";export{NightSectionLabel,NightFootnote,NightCard,NightSeparator,NightRows,NightSwitch,NightChip,NightButton,NightSegmented,NightBadge}from"./ui/night/primitives.js";export{gameUIColors,buoyColors}from"./ui/gameUI/constants/gameUIColors.js";export{refreshGameUIColors}from"./ui/gameUI/constants/gameUIColors.js";export{macOSColors}from"./ui/gameUI/constants/macOSDesignSystemColors.js";export{dialColors}from"./ui/gameUI/constants/gameUIColors.js";export{EnvironmentIndicator}from"./env/EnvironmentIndicator";export{EnvironmentSelector}from"./env/EnvironmentSelector.js";export{EnvironmentSelectorInline}from"./env/EnvironmentSelectorInline";export{normalizeEnvironment}from"./types/types.js";export{HintsProvider,useHintsDisabled,useHintsContext}from"./context/index.js";export*from"./history/index.js";export{FeatureGate,UpgradePrompt,useFeatureGate,ProFeatureBanner,UpgradeModal,BuoyUpgradeSheet,BuoySignInCard,BuoyNeedsPlanCard,useSignInState,ProBadge,ProUpgradeModal,FreeAccountPrompt,LOGIN_COMMAND,getUseIsPro,getUseLicense,getUseTier,signOutOfBuoy,TIER_LIMITS,useLimit,resolveEffectiveTier}from"./license/index.js";export{getAccountAccess,hasAccountAccess,assertAccountAccess,subscribeAccountAccess,getUseAccountAccess,retryAccountAccess,isProNow,getTeamCredential}from"./license/licenseModule.js";export{setBuoyAppId,getBuoyAppId}from"./utils/appIdentity.js";export{guardToolAdapter}from"./sync/toolActionRegistry.js";export{AccountSetup}from"./license/AccountSetup";export{AccountSetupButton}from"./license/AccountSetupContent.js";
1
+ "use strict";export*from"./ui/index.js";export*from"./stores/index.js";export*from"./bugCase/index.js";export*from"./sync/keyedArrays.js";export*from"./sync/valueShape.js";export*from"./sync/valuePath.js";export*from"./sync/typedEdit.js";export*from"./sync/wireBudget.js";export*from"./sync/wireForm.js";export*from"./sync/toolSyncAdapter.js";export{startSettingsSync,SettingsSync,PERSONAL_SETTING_KEYS,TEAM_SETTING_KEYS,onSettingsApplied,syncSettingsNow}from"./sync/settingsSync.js";export*from"./tools/defineTool.js";export*from"./sync/toolActionRegistry.js";export*from"./sync/toolUiBridge.js";export*from"./sync/toolScreenHeader.js";export{absoluteFill,displayValue,parseDisplayValue,getSafeAreaInsets,persistentStorage,setItemChecked,isUsingPersistentStorage,getStorageBackendType,safeStringify,getValueType,isPrimitive,isJsonSerializable,isValidJson,getConstructorName,isEmpty,getValueSize,parseValue,formatValue,getTypeColor,truncateText,flattenObject,formatPath,loadOptionalModule,getCachedOptionalModule,setRenderCaptureProvider,getRenderCaptureProvider,registerStateSnapshotProvider,getStateSnapshotProviders,getStateSnapshotProvider,subscribeToStateSnapshotProviders,superJsonSerialize,superJsonDeserialize,realNow,getRealAppState,subscribeRealAppState,BUOY_SYNTHETIC_MARK,countBuoyListener,reloadApp,scheduleReloadApp,resolveReloadStrategy,REMOTE_RELOAD_DELAY_MS,getDevServerOrigin,Subscribable,subscriberCountNotifier,subscribeToSubscriberCountChanges,notifySubscriberCountChange,useSafeRouter,useSafePathname,useSafeSegments,useSafeGlobalSearchParams,getSafeRouter,getSafeCurrentPathname,getSafeCurrentRoute,isExpoRouterAvailable}from"./utils/index.js";export*from"./utils/toolModules.js";export{subscribeStorageWrites}from"./utils/storageWrites.js";export{registerBrowserRouter,browserRouter,subscribeBrowserNavigation}from"./utils/browserNavigation.js";export{PREVIEW_ITEM_RENDER_BYTE_LIMIT,createRestoreScope,emptyRestoreResult,failedRestore,skippedRestore,classifyPreviewItem,wontApply,unionKeys}from"./utils/snapshotProviderKit.js";export{entityColor,formatValuePreview,shallowDiffSummary}from"./utils/stateTools.js";export*from"./utils/formatting/index.js";export*from"./utils/time/index.js";export{isPlainObject as isPlainObjectUtil}from"./utils/typeHelpers.js";export*from"./icons/index.js";export*from"./clipboard/index.js";export*from"./logger/index.js";export*from"./settings/index.js";export*from"./storage/index.js";export{useSafeAreaInsets,useFilterManager,usePersistedState,resetPersistedStateCache,useChangeLog,useSubscribedValue,useEventStoreEvents,useDeviceInfo,getDeviceInfo,logDeviceInfo}from"./hooks/index.js";export{JsModal}from"./JsModal";export{night,NIGHT_LABEL_TRACKING}from"./ui/night/nightTheme.js";export{QrCodeView}from"./ui/qr/QrCodeView.js";export{NightSectionLabel,NightFootnote,NightCard,NightSeparator,NightRows,NightSwitch,NightChip,NightButton,NightSegmented,NightBadge}from"./ui/night/primitives.js";export{gameUIColors,buoyColors}from"./ui/gameUI/constants/gameUIColors.js";export{refreshGameUIColors}from"./ui/gameUI/constants/gameUIColors.js";export{macOSColors}from"./ui/gameUI/constants/macOSDesignSystemColors.js";export{dialColors}from"./ui/gameUI/constants/gameUIColors.js";export{EnvironmentIndicator}from"./env/EnvironmentIndicator";export{EnvironmentSelector}from"./env/EnvironmentSelector.js";export{EnvironmentSelectorInline}from"./env/EnvironmentSelectorInline";export{normalizeEnvironment}from"./types/types.js";export{HintsProvider,useHintsDisabled,useHintsContext}from"./context/index.js";export*from"./history/index.js";export{FeatureGate,UpgradePrompt,useFeatureGate,ProFeatureBanner,UpgradeModal,BuoyUpgradeSheet,BuoySignInCard,BuoyNeedsPlanCard,BuoyGetProCard,useSignInState,ProBadge,ProUpgradeModal,FreeAccountPrompt,LOGIN_COMMAND,getUseIsPro,getUseLicense,getUseTier,signOutOfBuoy,TIER_LIMITS,useLimit,resolveEffectiveTier}from"./license/index.js";export{getAccountAccess,hasAccountAccess,assertAccountAccess,subscribeAccountAccess,getUseAccountAccess,retryAccountAccess,isProNow,getTeamCredential}from"./license/licenseModule.js";export{setBuoyAppId,getBuoyAppId}from"./utils/appIdentity.js";export{guardToolAdapter}from"./sync/toolActionRegistry.js";export{AccountSetup}from"./license/AccountSetup";export{AccountSetupButton}from"./license/AccountSetupContent.js";
@@ -1 +1 @@
1
- "use strict";import{useCallback as P,useEffect as S,useRef as x,useState as m}from"react";import{ActivityIndicator as k,Modal as j,Pressable as g,StyleSheet as T,Text as r,View as a}from"react-native";import{monoFont as B}from"../ui/fonts.js";import{night as o}from"../ui/night/nightTheme.js";import{QrCodeView as D}from"../ui/qr/QrCodeView.js";import{getSignInSession as I,isProNow as v,retryAccountAccess as A}from"./licenseModule.js";import{PRICING_URL as R,isWeb as H,openPricing as F}from"./openPricing.js";import{jsx as t,jsxs as l,Fragment as z}from"react/jsx-runtime";const W=n=>n.replace(/^https?:\/\//,"");export function useSignInState(){const[n,i]=m(()=>I()?.getStatus().state??"signed_out");S(()=>{const d=I();if(!d)return;const s=()=>i(d.getStatus().state);s();return d.subscribe(s)},[]);return n}function w({onClose:n}){return l(a,{style:e.header,children:[l(a,{style:e.brand,children:[t(a,{style:e.brandDot}),t(r,{style:e.wordmark,children:"BUOY"})]}),t(g,{accessibilityRole:"button",accessibilityLabel:"Close sign-in",onPress:n,style:e.close,testID:"buoy-signin-close",children:t(r,{style:e.closeText,children:"\u2715"})})]})}export function BuoySignInCard({onClose:n,onNotConfigured:i,footer:d}){const[s,c]=m({kind:"starting"});const y=x(null);const b=x(n);const u=x(i);b.current=n;u.current=i;const C=P(()=>{y.current?.abort();const f=I();if(!f?.signInWithCode){if(u.current)return u.current();c({kind:"error",message:"This version of @buoy-gg/license can't sign in with a code. Update it."});return}const p=new AbortController;y.current=p;c({kind:"starting"});f.signInWithCode(h=>c({kind:"waiting",prompt:h}),{signal:p.signal}).then(()=>{if(!p.signal.aborted)b.current()}).catch(h=>{if(p.signal.aborted)return;if(h?.code==="not_configured"&&u.current){u.current();return}c({kind:"error",message:h instanceof Error?h.message:"Sign-in did not work. Try again."})})},[]);S(()=>{C();return()=>y.current?.abort()},[C]);return l(a,{style:e.card,testID:"buoy-code-signin",children:[t(w,{onClose:n}),t(r,{style:e.title,children:"Sign in to Buoy"}),s.kind==="starting"?t(a,{style:e.center,children:t(k,{color:o.color.accent})}):null,s.kind==="waiting"?l(z,{children:[t(r,{style:e.body,children:"Scan this with your phone's camera."}),t(a,{style:e.qr,testID:"buoy-signin-qr",children:t(D,{value:s.prompt.verificationUriComplete,size:196})}),l(r,{style:e.body,children:["Or go to"," ",t(r,{style:e.strong,children:W(s.prompt.verificationUri)})," ","and type:"]}),t(r,{style:e.code,selectable:true,testID:"buoy-signin-code",children:s.prompt.userCode}),l(a,{style:e.waiting,children:[t(k,{size:"small",color:o.color.textSecondary}),t(r,{style:e.muted,children:"Waiting for you to allow it\u2026"})]})]}):null,s.kind==="error"?l(z,{children:[t(r,{style:e.body,testID:"buoy-signin-error",children:s.message}),t(g,{accessibilityRole:"button",onPress:C,style:({pressed:f})=>[e.primary,f&&e.primaryPressed],testID:"buoy-signin-retry",children:t(r,{style:e.primaryText,children:"Get a new code"})})]}):null,d]})}export function BuoyNeedsPlanCard({onClose:n}){return l(a,{style:e.card,testID:"buoy-signin-needs-plan",children:[t(w,{onClose:n}),t(r,{style:e.title,children:"You're signed in"}),t(r,{style:e.body,children:"Buoy in this build needs a Pro or Business plan."}),t(g,{accessibilityRole:"button",onPress:()=>void I()?.signOut(),style:({pressed:i})=>[e.primary,i&&e.primaryPressed],testID:"buoy-signout",children:t(r,{style:e.primaryText,children:"Sign out"})})]})}function U({onClose:n}){const[i,d]=m(false);const[s,c]=m(null);const y=x(true);S(()=>()=>{y.current=false},[]);const b=P(async()=>{d(true);c(null);try{await A()}catch{}if(!y.current)return;d(false);if(v())n();else c("Still on Free. If you just paid, wait a minute and try again.")},[n]);return l(a,{style:e.card,testID:"buoy-get-pro",children:[t(w,{onClose:n}),t(r,{style:e.title,children:"Get Buoy Pro"}),t(r,{style:e.body,children:"This needs Pro. Scan to see the plans."}),t(a,{style:e.qr,testID:"buoy-get-pro-qr",children:t(D,{value:R,size:196})}),l(r,{style:e.body,children:["Or go to ",t(r,{style:e.strong,children:W(R)})]}),t(g,{accessibilityRole:"link",onPress:()=>F(),style:({pressed:u})=>[e.primary,u&&e.primaryPressed],testID:"buoy-get-pro-open",children:t(r,{style:e.primaryText,children:"Open buoy.gg"})}),t(g,{accessibilityRole:"button",accessibilityState:{disabled:i,busy:i},disabled:i,onPress:b,style:({pressed:u})=>[e.secondary,u&&e.secondaryPressed],testID:"buoy-get-pro-check",children:i?t(k,{size:"small",color:o.color.textSecondary}):t(r,{style:e.secondaryText,children:"I have Pro. Check again."})}),s?t(r,{accessibilityRole:"alert",style:e.note,children:s}):null]})}export function BuoyUpgradeSheet({visible:n,onClose:i}){const d=useSignInState();const[s,c]=m(false);S(()=>{if(!n)c(false)},[n]);if(!n)return null;const y=s||H||d==="active";return t(j,{visible:true,transparent:true,animationType:"fade",onRequestClose:i,children:l(a,{style:e.overlay,accessibilityViewIsModal:true,children:[t(g,{style:T.absoluteFill,onPress:i,accessible:false}),y?t(U,{onClose:i}):t(BuoySignInCard,{onClose:i,onNotConfigured:()=>c(true),footer:t(g,{accessibilityRole:"button",onPress:()=>c(true),style:e.footerLink,testID:"buoy-signin-see-plans",children:l(r,{style:e.muted,children:["No Pro plan yet? ",t(r,{style:e.link,children:"See plans"})]})})})]})})}const e=T.create({overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.65)",alignItems:"center",justifyContent:"center",padding:20},card:{width:"100%",maxWidth:368,backgroundColor:"#111315",borderColor:"#303437",borderWidth:1,borderRadius:20,paddingHorizontal:24,paddingTop:18,paddingBottom:24},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:16},brand:{flexDirection:"row",alignItems:"center",gap:8},brandDot:{width:6,height:6,borderRadius:3,backgroundColor:o.color.accent},wordmark:{color:o.color.text,fontSize:11,fontWeight:"800",letterSpacing:1.4,lineHeight:16},close:{width:28,height:28,borderRadius:8,alignItems:"center",justifyContent:"center"},closeText:{color:o.color.textSecondary,fontSize:14},title:{color:o.color.text,fontSize:20,fontWeight:"700",marginBottom:8},body:{color:o.color.textSecondary,fontSize:14,lineHeight:20,marginTop:8},strong:{color:o.color.text,fontWeight:"600"},muted:{color:o.color.textSecondary,fontSize:13},link:{color:o.color.accent,fontWeight:"600"},note:{color:o.color.textSecondary,fontSize:13,lineHeight:18,marginTop:12,textAlign:"center"},center:{paddingVertical:32,alignItems:"center"},qr:{alignSelf:"center",marginTop:16,marginBottom:8,borderRadius:12,overflow:"hidden"},code:{color:o.color.text,fontFamily:B,fontSize:30,fontWeight:"700",letterSpacing:4,textAlign:"center",marginTop:12},waiting:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,marginTop:16},footerLink:{alignItems:"center",marginTop:20,minHeight:32,justifyContent:"center"},primary:{marginTop:20,minHeight:44,borderRadius:12,backgroundColor:o.color.accent,alignItems:"center",justifyContent:"center"},primaryPressed:{backgroundColor:o.color.accentPressed},primaryText:{color:o.color.onAccent,fontSize:15,fontWeight:"600"},secondary:{marginTop:10,minHeight:44,borderRadius:12,borderWidth:1,borderColor:"#303437",alignItems:"center",justifyContent:"center"},secondaryPressed:{backgroundColor:"#1A1D1F"},secondaryText:{color:o.color.text,fontSize:15,fontWeight:"600"}});
1
+ "use strict";import{useCallback as P,useEffect as S,useRef as x,useState as m}from"react";import{ActivityIndicator as k,Modal as B,Pressable as g,StyleSheet as T,Text as r,View as a}from"react-native";import{monoFont as j}from"../ui/fonts.js";import{night as o}from"../ui/night/nightTheme.js";import{QrCodeView as D}from"../ui/qr/QrCodeView.js";import{getSignInSession as I,isProNow as v,retryAccountAccess as A}from"./licenseModule.js";import{PRICING_URL as R,isWeb as H,openPricing as F}from"./openPricing.js";import{jsx as t,jsxs as l,Fragment as z}from"react/jsx-runtime";const W=n=>n.replace(/^https?:\/\//,"");export function useSignInState(){const[n,i]=m(()=>I()?.getStatus().state??"signed_out");S(()=>{const d=I();if(!d)return;const s=()=>i(d.getStatus().state);s();return d.subscribe(s)},[]);return n}function w({onClose:n}){return l(a,{style:e.header,children:[l(a,{style:e.brand,children:[t(a,{style:e.brandDot}),t(r,{style:e.wordmark,children:"BUOY"})]}),t(g,{accessibilityRole:"button",accessibilityLabel:"Close sign-in",onPress:n,style:e.close,testID:"buoy-signin-close",children:t(r,{style:e.closeText,children:"\u2715"})})]})}export function BuoySignInCard({onClose:n,onNotConfigured:i,footer:d}){const[s,c]=m({kind:"starting"});const y=x(null);const b=x(n);const u=x(i);b.current=n;u.current=i;const C=P(()=>{y.current?.abort();const f=I();if(!f?.signInWithCode){if(u.current)return u.current();c({kind:"error",message:"This version of @buoy-gg/license can't sign in with a code. Update it."});return}const p=new AbortController;y.current=p;c({kind:"starting"});f.signInWithCode(h=>c({kind:"waiting",prompt:h}),{signal:p.signal}).then(()=>{if(!p.signal.aborted)b.current()}).catch(h=>{if(p.signal.aborted)return;if(h?.code==="not_configured"&&u.current){u.current();return}c({kind:"error",message:h instanceof Error?h.message:"Sign-in did not work. Try again."})})},[]);S(()=>{C();return()=>y.current?.abort()},[C]);return l(a,{style:e.card,testID:"buoy-code-signin",children:[t(w,{onClose:n}),t(r,{style:e.title,children:"Sign in to Buoy"}),s.kind==="starting"?t(a,{style:e.center,children:t(k,{color:o.color.accent})}):null,s.kind==="waiting"?l(z,{children:[t(r,{style:e.body,children:"Scan this with your phone's camera."}),t(a,{style:e.qr,testID:"buoy-signin-qr",children:t(D,{value:s.prompt.verificationUriComplete,size:196})}),l(r,{style:e.body,children:["Or go to"," ",t(r,{style:e.strong,children:W(s.prompt.verificationUri)})," ","and type:"]}),t(r,{style:e.code,selectable:true,testID:"buoy-signin-code",children:s.prompt.userCode}),l(a,{style:e.waiting,children:[t(k,{size:"small",color:o.color.textSecondary}),t(r,{style:e.muted,children:"Waiting for you to allow it\u2026"})]})]}):null,s.kind==="error"?l(z,{children:[t(r,{style:e.body,testID:"buoy-signin-error",children:s.message}),t(g,{accessibilityRole:"button",onPress:C,style:({pressed:f})=>[e.primary,f&&e.primaryPressed],testID:"buoy-signin-retry",children:t(r,{style:e.primaryText,children:"Get a new code"})})]}):null,d]})}export function BuoyNeedsPlanCard({onClose:n}){return l(a,{style:e.card,testID:"buoy-signin-needs-plan",children:[t(w,{onClose:n}),t(r,{style:e.title,children:"You're signed in"}),t(r,{style:e.body,children:"Buoy in this build needs a Pro or Business plan."}),t(g,{accessibilityRole:"button",onPress:()=>void I()?.signOut(),style:({pressed:i})=>[e.primary,i&&e.primaryPressed],testID:"buoy-signout",children:t(r,{style:e.primaryText,children:"Sign out"})})]})}export function BuoyGetProCard({onClose:n}){const[i,d]=m(false);const[s,c]=m(null);const y=x(true);S(()=>()=>{y.current=false},[]);const b=P(async()=>{d(true);c(null);try{await A()}catch{}if(!y.current)return;d(false);if(v())n();else c("Still on Free. If you just paid, wait a minute and try again.")},[n]);return l(a,{style:e.card,testID:"buoy-get-pro",children:[t(w,{onClose:n}),t(r,{style:e.title,children:"Get Buoy Pro"}),t(r,{style:e.body,children:"This needs Pro. Scan to see the plans."}),t(a,{style:e.qr,testID:"buoy-get-pro-qr",children:t(D,{value:R,size:196})}),l(r,{style:e.body,children:["Or go to ",t(r,{style:e.strong,children:W(R)})]}),t(g,{accessibilityRole:"link",onPress:()=>F(),style:({pressed:u})=>[e.primary,u&&e.primaryPressed],testID:"buoy-get-pro-open",children:t(r,{style:e.primaryText,children:"Open buoy.gg"})}),t(g,{accessibilityRole:"button",accessibilityState:{disabled:i,busy:i},disabled:i,onPress:b,style:({pressed:u})=>[e.secondary,u&&e.secondaryPressed],testID:"buoy-get-pro-check",children:i?t(k,{size:"small",color:o.color.textSecondary}):t(r,{style:e.secondaryText,children:"I have Pro. Check again."})}),s?t(r,{accessibilityRole:"alert",style:e.note,children:s}):null]})}export function BuoyUpgradeSheet({visible:n,onClose:i}){const d=useSignInState();const[s,c]=m(false);S(()=>{if(!n)c(false)},[n]);if(!n)return null;const y=s||H||d==="active";return t(B,{visible:true,transparent:true,animationType:"fade",onRequestClose:i,children:l(a,{style:e.overlay,accessibilityViewIsModal:true,children:[t(g,{style:T.absoluteFill,onPress:i,accessible:false}),y?t(BuoyGetProCard,{onClose:i}):t(BuoySignInCard,{onClose:i,onNotConfigured:()=>c(true),footer:t(g,{accessibilityRole:"button",onPress:()=>c(true),style:e.footerLink,testID:"buoy-signin-see-plans",children:l(r,{style:e.muted,children:["No Pro plan yet? ",t(r,{style:e.link,children:"See plans"})]})})})]})})}const e=T.create({overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.65)",alignItems:"center",justifyContent:"center",padding:20},card:{width:"100%",maxWidth:368,backgroundColor:"#111315",borderColor:"#303437",borderWidth:1,borderRadius:20,paddingHorizontal:24,paddingTop:18,paddingBottom:24},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:16},brand:{flexDirection:"row",alignItems:"center",gap:8},brandDot:{width:6,height:6,borderRadius:3,backgroundColor:o.color.accent},wordmark:{color:o.color.text,fontSize:11,fontWeight:"800",letterSpacing:1.4,lineHeight:16},close:{width:28,height:28,borderRadius:8,alignItems:"center",justifyContent:"center"},closeText:{color:o.color.textSecondary,fontSize:14},title:{color:o.color.text,fontSize:20,fontWeight:"700",marginBottom:8},body:{color:o.color.textSecondary,fontSize:14,lineHeight:20,marginTop:8},strong:{color:o.color.text,fontWeight:"600"},muted:{color:o.color.textSecondary,fontSize:13},link:{color:o.color.accent,fontWeight:"600"},note:{color:o.color.textSecondary,fontSize:13,lineHeight:18,marginTop:12,textAlign:"center"},center:{paddingVertical:32,alignItems:"center"},qr:{alignSelf:"center",marginTop:16,marginBottom:8,borderRadius:12,overflow:"hidden"},code:{color:o.color.text,fontFamily:j,fontSize:30,fontWeight:"700",letterSpacing:4,textAlign:"center",marginTop:12},waiting:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:8,marginTop:16},footerLink:{alignItems:"center",marginTop:20,minHeight:32,justifyContent:"center"},primary:{marginTop:20,minHeight:44,borderRadius:12,backgroundColor:o.color.accent,alignItems:"center",justifyContent:"center"},primaryPressed:{backgroundColor:o.color.accentPressed},primaryText:{color:o.color.onAccent,fontSize:15,fontWeight:"600"},secondary:{marginTop:10,minHeight:44,borderRadius:12,borderWidth:1,borderColor:"#303437",alignItems:"center",justifyContent:"center"},secondaryPressed:{backgroundColor:"#1A1D1F"},secondaryText:{color:o.color.text,fontSize:15,fontWeight:"600"}});
@@ -1 +1 @@
1
- "use strict";import{Modal as o,Pressable as a,ScrollView as i,StyleSheet as t,View as n}from"react-native";import{AccountSetupCard as c}from"./AccountSetupContent.js";import{jsx as e,jsxs as u}from"react/jsx-runtime";export{LOGIN_COMMAND}from"./AccountSetupContent.js";export function FreeAccountPrompt({visible:l,onClose:r}){if(!l)return null;return e(o,{visible:true,transparent:true,animationType:"fade",onRequestClose:r,children:u(n,{style:s.overlay,accessibilityViewIsModal:true,children:[e(a,{style:t.absoluteFill,onPress:r,accessible:false}),e(i,{style:s.frame,bounces:false,children:e(c,{onClose:r})})]})})}const s=t.create({overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.65)",alignItems:"center",justifyContent:"center",padding:20},frame:{width:"100%",maxWidth:368,maxHeight:"90%",flexGrow:0,borderRadius:20}});
1
+ "use strict";import{Modal as l,Pressable as o,ScrollView as i,StyleSheet as t,View as n}from"react-native";import{AccountSetupCard as c}from"./AccountSetupContent.js";import{jsx as e,jsxs as d}from"react/jsx-runtime";export{LOGIN_COMMAND}from"./AccountSetupContent.js";export function FreeAccountPrompt({visible:a,onClose:r}){if(!a)return null;return e(l,{visible:true,transparent:true,animationType:"fade",onRequestClose:r,children:d(n,{style:s.overlay,accessibilityViewIsModal:true,children:[e(o,{style:t.absoluteFill,onPress:r,accessible:false}),e(i,{keyboardShouldPersistTaps:"handled",style:s.frame,bounces:false,children:e(c,{onClose:r})})]})})}const s=t.create({overlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.65)",alignItems:"center",justifyContent:"center",padding:20},frame:{width:"100%",maxWidth:368,maxHeight:"90%",flexGrow:0,borderRadius:20}});
@@ -1 +1 @@
1
- "use strict";export{FeatureGate,UpgradePrompt,useFeatureGate,ProFeatureBanner,UpgradeModal,ProBadge,ProUpgradeModal}from"./FeatureGate.js";export{BuoyUpgradeSheet,BuoySignInCard,BuoyNeedsPlanCard,useSignInState}from"./BuoyUpgradeSheet.js";export{FreeAccountPrompt,LOGIN_COMMAND}from"./FreeAccountPrompt.js";export{getUseIsPro,getUseLicense,getUseTier,signOutOfBuoy}from"./licenseModule.js";export{TIER_LIMITS,useLimit,resolveEffectiveTier}from"./tierLimits.js";
1
+ "use strict";export{FeatureGate,UpgradePrompt,useFeatureGate,ProFeatureBanner,UpgradeModal,ProBadge,ProUpgradeModal}from"./FeatureGate.js";export{BuoyUpgradeSheet,BuoySignInCard,BuoyNeedsPlanCard,BuoyGetProCard,useSignInState}from"./BuoyUpgradeSheet.js";export{FreeAccountPrompt,LOGIN_COMMAND}from"./FreeAccountPrompt.js";export{getUseIsPro,getUseLicense,getUseTier,signOutOfBuoy}from"./licenseModule.js";export{TIER_LIMITS,useLimit,resolveEffectiveTier}from"./tierLimits.js";
@@ -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 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"}});
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 E=b?JSON.parse(b):{};const I=o.replace("show","hasSet");const z={...E,[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 k=[{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,{keyboardShouldPersistTaps:"handled",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:k.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"}});
@@ -1 +1 @@
1
- "use strict";const d=e=>typeof e==="object"&&e!==null&&!Array.isArray(e);const m=["id","lineId","key","uuid","_id","slug","name"];export function identityField(e){if(!e.length||!e.every(d))return void 0;const i=e[0];for(const t of m){if(!(t in i))continue;const r=e.map(o=>o[t]);const n=r.every(o=>typeof o==="string"||typeof o==="number");if(!n)continue;if(new Set(r.map(String)).size!==r.length)continue;return t}return void 0}function $(e,i,t,r){const n=r[i];if(typeof n==="string"||typeof n==="number"){if(String(n)!==t){return{ok:false,error:`The new item is addressed as \`${t}\` but carries \`${i}\`: ${JSON.stringify(n)}. Use the same value for both \u2014 address it by the id it carries.`}}return{ok:true,value:n}}const o=e.every(s=>typeof s[i]==="number");if(o&&t.trim()!==""&&String(Number(t))===t){return{ok:true,value:Number(t)}}return{ok:true,value:t}}export function expandKeyedArrays(e,i,t="",r=[]){if(Array.isArray(e)&&d(i)){const n=identityField(e);if(!n){return{patch:i,notes:r}}const o=new Map(e.map(f=>[String(f[n]),f]));const s=e.slice();let y=0;let c=0;let b=0;for(const[f,a]of Object.entries(i)){const l=s.findIndex(u=>String(u[n])===f);if(a===null){if(l===-1)return{patch:i,notes:r};s.splice(l,1);y++}else if(l===-1){if(!d(a))return{patch:i,notes:r};const u=$(e,n,f,a);if(!u.ok){return{patch:i,notes:r,error:u.error}}s.push({...a,[n]:u.value});b++}else{const u=expandKeyedArrays(o.get(f),a,`${t}[${f}]`,r);if(u.error)return{patch:i,notes:r,error:u.error};const g=s[l];s[l]=d(g)&&d(u.patch)?{...g,...u.patch}:u.patch;c++}}r.push(`${t||"(root)"}: addressed by \`${n}\` \u2014 ${c} changed, ${b} added, ${y} removed, ${s.length} item(s) remain`);return{patch:s,notes:r}}if(d(e)&&d(i)){const n={};for(const[o,s]of Object.entries(i)){const y=t?`${t}.${o}`:o;if(!(o in e)){n[o]=s;continue}const c=expandKeyedArrays(e[o],s,y,r);if(c.error)return{patch:i,notes:r,error:c.error};n[o]=c.patch}return{patch:n,notes:r}}return{patch:i,notes:r}}
1
+ "use strict";const c=e=>typeof e==="object"&&e!==null&&!Array.isArray(e);const $=["id","lineId","key","uuid","_id","slug","name"];export function identityField(e,r=[]){if(!e.length||!e.every(c))return void 0;const i=e[0];const t=[...$,...Object.keys(i).filter(o=>/(Id|_id|ID)$/.test(o))];const s=t.filter((o,d)=>{if(t.indexOf(o)!==d||!(o in i))return false;const f=e.map(a=>a[o]);if(!f.every(a=>typeof a==="string"||typeof a==="number"))return false;return new Set(f.map(String)).size===f.length});const n=o=>e.some(d=>r.includes(String(d[o])));return s.find(n)??s[0]}function p(e,r,i,t){const s=t[r];if(typeof s==="string"||typeof s==="number"){if(String(s)!==i){return{ok:false,error:`The new item is addressed as \`${i}\` but carries \`${r}\`: ${JSON.stringify(s)}. Use the same value for both \u2014 address it by the id it carries.`}}return{ok:true,value:s}}const n=e.every(o=>typeof o[r]==="number");if(n&&i.trim()!==""&&String(Number(i))===i){return{ok:true,value:Number(i)}}return{ok:true,value:i}}export function expandKeyedArrays(e,r,i="",t=[]){if(Array.isArray(e)&&c(r)){const s=Object.keys(r);const n=identityField(e,s);if(!n){if(!s.length)return{patch:r,notes:t};const l=i||"(root)";return{patch:r,notes:t,error:`\`${l}\` is a list whose items have no unique id field, so the key \`${s[0]}\` can't name a row. Address the row by its position instead, with a path like \`${i}[0].field\`.`}}const o=new Map(e.map(l=>[String(l[n]),l]));const d=e.slice();let f=0;let a=0;let g=0;for(const[l,y]of Object.entries(r)){const b=d.findIndex(u=>String(u[n])===l);if(y===null){if(b===-1)return{patch:r,notes:t};d.splice(b,1);f++}else if(b===-1){if(!c(y))return{patch:r,notes:t};const u=p(e,n,l,y);if(!u.ok){return{patch:r,notes:t,error:u.error}}d.push({...y,[n]:u.value});g++}else{const u=expandKeyedArrays(o.get(l),y,`${i}[${l}]`,t);if(u.error)return{patch:r,notes:t,error:u.error};const m=d[b];d[b]=c(m)&&c(u.patch)?{...m,...u.patch}:u.patch;a++}}t.push(`${i||"(root)"}: addressed by \`${n}\` \u2014 ${a} changed, ${g} added, ${f} removed, ${d.length} item(s) remain`);return{patch:d,notes:t}}if(c(e)&&c(r)){const s={};for(const[n,o]of Object.entries(r)){const d=i?`${i}.${n}`:n;if(!(n in e)){s[n]=o;continue}const f=expandKeyedArrays(e[n],o,d,t);if(f.error)return{patch:r,notes:t,error:f.error};s[n]=f.patch}return{patch:s,notes:t}}return{patch:r,notes:t}}
@@ -1 +1 @@
1
- "use strict";import{identityField as A}from"./keyedArrays.js";const u=r=>typeof r==="object"&&r!==null&&!Array.isArray(r);function w(r,o,n=2e3){const e=[{node:r,path:""}];let d=0;while(e.length&&d<n){const{node:i,path:t}=e.shift();d++;if(Array.isArray(i)){i.slice(0,20).forEach((s,l)=>e.push({node:s,path:`${t}[${l}]`}))}else if(u(i)){for(const[s,l]of Object.entries(i)){const f=t?`${t}.${s}`:s;if(s===o)return f;if(u(l)||Array.isArray(l))e.push({node:l,path:f})}}}return void 0}function m(r,o,n,e,d){const i=w(r,d??n);const t=e.slice(0,12).join(", ")||"(no fields)";return i?`No field "${n}" at "${o}" \u2014 did you mean path "${i}"? "${o}" has: ${t}.`:`No field "${n}" at "${o}". It has: ${t}.`}function x(r,o){let n=r;for(const e of o.split(".")){if(!u(n))return void 0;n=n[e]}return n}export function parsePath(r){if(!r.trim())return void 0;const o=[];let n=0;while(n<r.length){if(r[n]==="."){n++;continue}if(r[n]==="["){const i=r.indexOf("]",n);if(i===-1)return void 0;const t=r.slice(n+1,i);if(/^\d+$/.test(t))o.push({kind:"index",index:Number(t)});else{const s=t.indexOf("=");if(s<=0)return void 0;o.push({kind:"match",field:t.slice(0,s).trim(),value:t.slice(s+1).trim()})}n=i+1;continue}let e=n;while(e<r.length&&r[e]!=="."&&r[e]!=="[")e++;const d=r.slice(n,e);if(!d)return void 0;o.push({kind:"key",key:d});n=e}return o.length?o:void 0}export function readPath(r,o){const n=parsePath(o);if(!n)return{ok:false,error:`Could not read the path "${o}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};let e=r;const d=[];for(const i of n){if(e===null||e===void 0){return{ok:false,error:`"${d.join(".")||"(root)"}" is ${e===null?"null":"not set"}, so there is nothing at "${o}".`}}if(i.kind==="key"){if(!u(e))return{ok:false,error:`"${d.join(".")||"(root)"}" is not an object, so it has no field "${i.key}".`};if(!(i.key in e)){const t=n[n.length-1];return{ok:false,error:m(r,d.join(".")||"(root)",i.key,Object.keys(e),t?.kind==="key"?t.key:void 0)}}e=e[i.key];d.push(i.key)}else if(i.kind==="index"){if(!Array.isArray(e))return{ok:false,error:`"${d.join(".")||"(root)"}" is not a list, so [${i.index}] means nothing.`};e=e[i.index];d.push(`[${i.index}]`)}else{if(!Array.isArray(e))return{ok:false,error:`"${d.join(".")||"(root)"}" is not a list, so [${i.field}=${i.value}] means nothing.`};const t=e.find(s=>u(s)&&String(x(s,i.field))===i.value);if(t===void 0)return{ok:false,error:`No item with ${i.field}="${i.value}" in "${d.join(".")||"(root)"}".`};e=t;d.push(`[${i.field}=${i.value}]`)}}return{ok:true,value:e}}export function patchFromPath(r,o,n){const e=parsePath(o);if(!e)return{ok:false,error:`Could not read the path "${o}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};if(e[0]?.kind!=="key")return{ok:false,error:`A path must start with a field name, not a list index \u2014 "${o}" does not say which list.`};const d=(t,s)=>{if(s>=e.length)return{ok:true,patch:n};const l=e[s];if(l.kind==="key"){if(u(t)&&!(l.key in t)&&s+1<e.length){const g=e[e.length-1];return{ok:false,error:m(r,k(e,s),l.key,Object.keys(t),g?.kind==="key"?g.key:void 0)}}const a=u(t)?t[l.key]:void 0;const $=d(a,s+1);return $.ok?{ok:true,patch:{[l.key]:$.patch}}:$}if(!Array.isArray(t)){return{ok:false,error:`"${k(e,s)}" is not a list, so "${o}" cannot be resolved. Read it first \u2014 \`shape\` on the read says what each field holds.`}}const f=l.kind==="index"?l.index:t.findIndex(a=>u(a)&&String(x(a,l.field))===l.value);const c=f>=0?t[f]:void 0;const j=l.kind==="index"?f<0||f>=t.length:f<0;if(j){return{ok:false,error:l.kind==="index"?`"${k(e,s)}" has ${t.length} item(s), so there is nothing at [${l.index}].`:`No item with ${l.field}="${l.value}" in "${k(e,s)}".`}}if(!u(c)){if(s<e.length-1){return{ok:false,error:`"${k(e,s)}[${l.kind==="index"?l.index:`${l.field}=${l.value}`}]" holds ${c===null?"null":typeof c}, not an object, so "${o}" cannot go any deeper. Set the item itself.`}}const a=t.slice();a[f]=n;return{ok:true,patch:a}}const h=d(c,s+1);if(!h.ok)return h;const y=A(t);if(y)return{ok:true,patch:{[String(c[y])]:h.patch}};const p=t.slice();p[f]=u(h.patch)?{...c,...h.patch}:h.patch;return{ok:true,patch:p}};const i=d(r,0);if(!i.ok)return i;return{ok:true,patch:i.patch}}function k(r,o){return r.slice(0,o).map(n=>n.kind==="key"?n.key:n.kind==="index"?`[${n.index}]`:`[${n.field}=${n.value}]`).join(".").replace(/\.\[/g,"[")||"(root)"}
1
+ "use strict";import{identityField as b}from"./keyedArrays.js";const c=r=>typeof r==="object"&&r!==null&&!Array.isArray(r);function w(r,s,n=2e3){const e=[{node:r,path:""}];let f=0;while(e.length&&f<n){const{node:i,path:d}=e.shift();f++;if(Array.isArray(i)){i.slice(0,20).forEach((t,l)=>e.push({node:t,path:`${d}[${l}]`}))}else if(c(i)){for(const[t,l]of Object.entries(i)){const o=d?`${d}.${t}`:t;if(t===s)return o;if(c(l)||Array.isArray(l))e.push({node:l,path:o})}}}return void 0}function A(r,s,n,e,f){const i=w(r,f??n);const d=e.slice(0,12).join(", ")||"(no fields)";return i?`No field "${n}" at "${s}" \u2014 did you mean path "${i}"? "${s}" has: ${d}.`:`No field "${n}" at "${s}". It has: ${d}.`}function p(r,s){let n=r;for(const e of s.split(".")){if(!c(n))return void 0;n=n[e]}return n}export function parsePath(r){if(!r.trim())return void 0;const s=[];let n=0;while(n<r.length){if(r[n]==="."){n++;continue}if(r[n]==="["){const i=r.indexOf("]",n);if(i===-1)return void 0;const d=r.slice(n+1,i);if(/^\d+$/.test(d))s.push({kind:"index",index:Number(d)});else{const t=d.indexOf("=");if(t<=0)return void 0;s.push({kind:"match",field:d.slice(0,t).trim(),value:d.slice(t+1).trim()})}n=i+1;continue}let e=n;while(e<r.length&&r[e]!=="."&&r[e]!=="[")e++;const f=r.slice(n,e);if(!f)return void 0;s.push({kind:"key",key:f});n=e}return s.length?s:void 0}export function readPath(r,s){const n=parsePath(s);if(!n)return{ok:false,error:`Could not read the path "${s}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};let e=r;const f=[];for(const i of n){if(e===null||e===void 0){return{ok:false,error:`"${f.join(".")||"(root)"}" is ${e===null?"null":"not set"}, so there is nothing at "${s}".`}}if(i.kind==="key"){if(!c(e))return{ok:false,error:`"${f.join(".")||"(root)"}" is not an object, so it has no field "${i.key}".`};if(!(i.key in e)){const d=n[n.length-1];return{ok:false,error:A(r,f.join(".")||"(root)",i.key,Object.keys(e),d?.kind==="key"?d.key:void 0)}}e=e[i.key];f.push(i.key)}else if(i.kind==="index"){if(!Array.isArray(e))return{ok:false,error:`"${f.join(".")||"(root)"}" is not a list, so [${i.index}] means nothing.`};e=e[i.index];f.push(`[${i.index}]`)}else{if(!Array.isArray(e))return{ok:false,error:`"${f.join(".")||"(root)"}" is not a list, so [${i.field}=${i.value}] means nothing.`};const d=e.find(t=>c(t)&&String(p(t,i.field))===i.value);if(d===void 0)return{ok:false,error:`No item with ${i.field}="${i.value}" in "${f.join(".")||"(root)"}".`};e=d;f.push(`[${i.field}=${i.value}]`)}}return{ok:true,value:e}}export function patchFromPath(r,s,n){const e=parsePath(s);if(!e)return{ok:false,error:`Could not read the path "${s}". Use dotted keys with optional [0] or [field=value], like "item.name" or "lines[lineId=seed-1].qty".`};if(e[0]?.kind!=="key"&&!Array.isArray(r))return{ok:false,error:`A path must start with a field name, not a list index \u2014 "${s}" does not say which list.`};const f=(t,l)=>{if(l>=e.length)return{ok:true,patch:n};const o=e[l];if(o.kind==="key"){if(c(t)&&!(o.key in t)&&l+1<e.length){const j=e[e.length-1];return{ok:false,error:A(r,y(e,l),o.key,Object.keys(t),j?.kind==="key"?j.key:void 0)}}const h=c(t)?t[o.key]:void 0;const g=f(h,l+1);return g.ok?{ok:true,patch:{[o.key]:g.patch}}:g}if(!Array.isArray(t)){return{ok:false,error:`"${y(e,l)}" is not a list, so "${s}" cannot be resolved. Read it first \u2014 \`shape\` on the read says what each field holds.`}}const u=o.kind==="index"?o.index:t.findIndex(h=>c(h)&&String(p(h,o.field))===o.value);const a=u>=0?t[u]:void 0;const $=o.kind==="index"?u<0||u>=t.length:u<0;if($){return{ok:false,error:o.kind==="index"?`"${y(e,l)}" has ${t.length} item(s), so there is nothing at [${o.index}].`:`No item with ${o.field}="${o.value}" in "${y(e,l)}".`}}if(!c(a)){if(l<e.length-1){return{ok:false,error:`"${y(e,l)}[${o.kind==="index"?o.index:`${o.field}=${o.value}`}]" holds ${a===null?"null":typeof a}, not an object, so "${s}" cannot go any deeper. Set the item itself.`}}const h=t.slice();h[u]=n;return{ok:true,patch:h}}const k=f(a,l+1);if(!k.ok)return k;const x=b(t);if(x)return{ok:true,patch:{[String(a[x])]:k.patch}};const m=t.slice();m[u]=i(a,l+1);return{ok:true,patch:m}};const i=(t,l)=>{if(l>=e.length)return n;const o=e[l];if(o.kind==="key"){const k=c(t)?t:{};return{...k,[o.key]:i(k[o.key],l+1)}}const u=t;const a=o.kind==="index"?o.index:u.findIndex(k=>c(k)&&String(p(k,o.field))===o.value);const $=u.slice();$[a]=i(u[a],l+1);return $};const d=f(r,0);if(!d.ok)return d;return{ok:true,patch:d.patch}}function y(r,s){return r.slice(0,s).map(n=>n.kind==="key"?n.key:n.kind==="index"?`[${n.index}]`:`[${n.field}=${n.value}]`).join(".").replace(/\.\[/g,"[")||"(root)"}
@@ -1 +1 @@
1
- "use strict";import{useCallback as l,useRef as u,useState as m}from"react";import{ScrollView as d,StyleSheet as x,View as E}from"react-native";import{jsx as S}from"react/jsx-runtime";const p=5;const w=300;export function useChipTap(){const[e,n]=m(false);const o=u(0);const r=u(0);const c=l(t=>{o.current=t.nativeEvent.pageX;r.current=t.nativeEvent.pageY},[]);const g=l(t=>{if(!t)return true;const f=Math.abs(t.nativeEvent.pageX-o.current);const h=Math.abs(t.nativeEvent.pageY-r.current);return!(f>p||h>p||e)},[e]);const i=l(()=>{setTimeout(()=>n(false),w)},[]);const a=l(()=>n(true),[]);return{scrollProps:{onScrollBeginDrag:a,onScrollEndDrag:i,onMomentumScrollBegin:a,onMomentumScrollEnd:i},onTouchStart:c,isTap:g}}export function ChipStrip({children:e,scrollProps:n,sentryLabel:o,style:r,contentStyle:c}){return S(E,{style:[s.container,r],children:S(d,{"sentry-label":o,horizontal:true,showsHorizontalScrollIndicator:false,style:s.scrollView,contentContainerStyle:[s.scrollContent,c],...n,children:e})})}const s=x.create({container:{flex:1,minWidth:0},scrollView:{flex:1},scrollContent:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:4,paddingVertical:4,flexGrow:1}});
1
+ "use strict";import{useCallback as l,useRef as u,useState as f}from"react";import{ScrollView as m,StyleSheet as x,View as y}from"react-native";import{jsx as S}from"react/jsx-runtime";const p=5;const E=300;export function useChipTap(){const[e,n]=f(false);const o=u(0);const r=u(0);const s=l(t=>{o.current=t.nativeEvent.pageX;r.current=t.nativeEvent.pageY},[]);const d=l(t=>{if(!t)return true;const g=Math.abs(t.nativeEvent.pageX-o.current);const h=Math.abs(t.nativeEvent.pageY-r.current);return!(g>p||h>p||e)},[e]);const i=l(()=>{setTimeout(()=>n(false),E)},[]);const a=l(()=>n(true),[]);return{scrollProps:{onScrollBeginDrag:a,onScrollEndDrag:i,onMomentumScrollBegin:a,onMomentumScrollEnd:i},onTouchStart:s,isTap:d}}export function ChipStrip({children:e,scrollProps:n,sentryLabel:o,style:r,contentStyle:s}){return S(y,{style:[c.container,r],children:S(m,{keyboardShouldPersistTaps:"handled","sentry-label":o,horizontal:true,showsHorizontalScrollIndicator:false,style:c.scrollView,contentContainerStyle:[c.scrollContent,s],...n,children:e})})}const c=x.create({container:{flex:1,minWidth:0},scrollView:{flex:1},scrollContent:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:4,paddingVertical:4,flexGrow:1}});
@@ -1 +1 @@
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
+ "use strict";import{useState as p}from"react";import{View as n,Text as a,StyleSheet as R,ScrollView as z,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 T=()=>{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?T:()=>T(),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(z,{style:t.scrollView,horizontal:true,showsHorizontalScrollIndicator:false,children:e(z,{keyboardShouldPersistTaps:"handled",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{useState as b}from"react";import{View as i,Text as c,StyleSheet as w,ScrollView as y,TouchableOpacity as x}from"react-native";import{gameUIColors as o}from"../gameUI/index.js";import{ModalHeader as g}from"./ModalHeader.js";import{CopyButton as C}from"./CopyButton.js";import{monoFont as S}from"../fonts.js";import{jsx as t,jsxs as d}from"react/jsx-runtime";export function DetailView({children:u,style:r}){return t(i,{style:[e.container,r],children:u})}DetailView.Header=function u({title:r,subtitle:n,onClose:l,onBack:s,actions:a}){return d(g,{children:[t(g.Navigation,{onBack:s,onClose:l}),t(g.Content,{title:r,subtitle:n}),a&&t(g.Actions,{children:a})]})};DetailView.Section=function u({title:r,icon:n,children:l,defaultOpen:s=true,collapsible:a=true,style:f,badge:m}){const[h,p]=b(s);if(!a){return d(i,{style:[e.section,f],children:[d(i,{style:e.sectionHeader,children:[n&&t(n,{size:14,color:o.primary}),t(c,{style:e.sectionTitle,children:r}),m!==void 0&&t(i,{style:e.sectionBadge,children:t(c,{style:e.sectionBadgeText,children:m})})]}),t(i,{style:e.sectionContent,children:l})]})}return d(i,{style:[e.section,f],children:[t(x,{style:e.sectionHeaderTouchable,onPress:()=>p(!h),children:d(i,{style:e.sectionHeader,children:[n&&t(n,{size:14,color:o.primary}),t(c,{style:e.sectionTitle,children:r}),m!==void 0&&t(i,{style:e.sectionBadge,children:t(c,{style:e.sectionBadgeText,children:m})})]})}),h&&t(i,{style:e.sectionContent,children:l})]})};DetailView.Row=function u({label:r,value:n,copyable:l=false,style:s,labelStyle:a,valueStyle:f}){const m=typeof n==="string"||typeof n==="number"?String(n):null;return d(i,{style:[e.row,s],children:[t(c,{style:[e.rowLabel,a],children:r}),d(i,{style:e.rowValueContainer,children:[typeof n==="string"||typeof n==="number"?t(c,{style:[e.rowValue,f],numberOfLines:1,children:n}):n,l&&m&&t(C,{value:m,size:12})]})]})};DetailView.DataSection=function u({title:r,data:n,icon:l,defaultOpen:s=false,style:a}){return t(DetailView.Section,{title:r,icon:l,defaultOpen:s,style:a,children:t(i,{style:e.dataContainer,children:t(y,{horizontal:true,showsHorizontalScrollIndicator:false,children:t(c,{style:e.dataText,children:JSON.stringify(n,null,2)})})})})};DetailView.StatusBar=function u({status:r,message:n,style:l}){const s={success:o.success,error:o.error,warning:o.warning,pending:o.warning,info:o.primary};const a=s[r];return d(i,{style:[e.statusBar,{backgroundColor:a+"20",borderColor:a+"40"},l],children:[t(i,{style:[e.statusDot,{backgroundColor:a}]}),n&&t(c,{style:[e.statusMessage,{color:a}],children:n})]})};DetailView.Timeline=function u({items:r,style:n}){return t(i,{style:[e.timeline,n],children:r.map((l,s)=>d(i,{style:e.timelineItem,children:[t(i,{style:e.timelineDot}),s<r.length-1&&t(i,{style:e.timelineLine}),d(i,{style:e.timelineContent,children:[t(c,{style:e.timelineLabel,children:l.label}),t(c,{style:e.timelineValue,children:l.value})]})]},s))})};DetailView.Content=function u({children:r,scrollable:n=true,style:l}){if(n){return t(y,{style:[e.content,l],children:r})}return t(i,{style:[e.content,l],children:r})};const e=w.create({container:{flex:1,backgroundColor:o.background},content:{flex:1,padding:16},section:{marginBottom:16,backgroundColor:o.panel,borderRadius:8,overflow:"hidden"},sectionHeader:{flexDirection:"row",alignItems:"center",padding:12,gap:8},sectionHeaderTouchable:{},sectionTitle:{flex:1,fontSize:14,fontWeight:"600",color:o.text},sectionBadge:{backgroundColor:o.primary+"20",paddingHorizontal:8,paddingVertical:2,borderRadius:4},sectionBadgeText:{fontSize:11,fontWeight:"600",color:o.primary},sectionContent:{padding:12,paddingTop:0},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:8,borderBottomWidth:1,borderBottomColor:o.border+"20"},rowLabel:{flex:1,fontSize:13,color:o.secondary},rowValueContainer:{flexDirection:"row",alignItems:"center",flex:2,gap:8},rowValue:{flex:1,fontSize:13,color:o.text,textAlign:"right"},dataContainer:{backgroundColor:o.background,borderRadius:6,padding:12},dataText:{fontSize:12,fontFamily:S,color:o.text},statusBar:{flexDirection:"row",alignItems:"center",padding:12,borderWidth:1,borderRadius:8,gap:8,marginVertical:8},statusDot:{width:8,height:8,borderRadius:4},statusMessage:{fontSize:13,fontWeight:"500"},timeline:{paddingVertical:8},timelineItem:{flexDirection:"row",position:"relative"},timelineDot:{width:8,height:8,borderRadius:4,backgroundColor:o.primary,marginTop:4,marginRight:12},timelineLine:{position:"absolute",left:3.5,top:12,bottom:-4,width:1,backgroundColor:o.border+"40"},timelineContent:{flex:1,marginBottom:12},timelineLabel:{fontSize:12,color:o.secondary,marginBottom:2},timelineValue:{fontSize:13,color:o.text}});
1
+ "use strict";import{useState as b}from"react";import{View as i,Text as c,StyleSheet as w,ScrollView as y,TouchableOpacity as x}from"react-native";import{gameUIColors as o}from"../gameUI/index.js";import{ModalHeader as g}from"./ModalHeader.js";import{CopyButton as C}from"./CopyButton.js";import{monoFont as S}from"../fonts.js";import{jsx as t,jsxs as d}from"react/jsx-runtime";export function DetailView({children:u,style:r}){return t(i,{style:[e.container,r],children:u})}DetailView.Header=function u({title:r,subtitle:n,onClose:l,onBack:s,actions:a}){return d(g,{children:[t(g.Navigation,{onBack:s,onClose:l}),t(g.Content,{title:r,subtitle:n}),a&&t(g.Actions,{children:a})]})};DetailView.Section=function u({title:r,icon:n,children:l,defaultOpen:s=true,collapsible:a=true,style:f,badge:m}){const[h,p]=b(s);if(!a){return d(i,{style:[e.section,f],children:[d(i,{style:e.sectionHeader,children:[n&&t(n,{size:14,color:o.primary}),t(c,{style:e.sectionTitle,children:r}),m!==void 0&&t(i,{style:e.sectionBadge,children:t(c,{style:e.sectionBadgeText,children:m})})]}),t(i,{style:e.sectionContent,children:l})]})}return d(i,{style:[e.section,f],children:[t(x,{style:e.sectionHeaderTouchable,onPress:()=>p(!h),children:d(i,{style:e.sectionHeader,children:[n&&t(n,{size:14,color:o.primary}),t(c,{style:e.sectionTitle,children:r}),m!==void 0&&t(i,{style:e.sectionBadge,children:t(c,{style:e.sectionBadgeText,children:m})})]})}),h&&t(i,{style:e.sectionContent,children:l})]})};DetailView.Row=function u({label:r,value:n,copyable:l=false,style:s,labelStyle:a,valueStyle:f}){const m=typeof n==="string"||typeof n==="number"?String(n):null;return d(i,{style:[e.row,s],children:[t(c,{style:[e.rowLabel,a],children:r}),d(i,{style:e.rowValueContainer,children:[typeof n==="string"||typeof n==="number"?t(c,{style:[e.rowValue,f],numberOfLines:1,children:n}):n,l&&m&&t(C,{value:m,size:12})]})]})};DetailView.DataSection=function u({title:r,data:n,icon:l,defaultOpen:s=false,style:a}){return t(DetailView.Section,{title:r,icon:l,defaultOpen:s,style:a,children:t(i,{style:e.dataContainer,children:t(y,{horizontal:true,showsHorizontalScrollIndicator:false,children:t(c,{style:e.dataText,children:JSON.stringify(n,null,2)})})})})};DetailView.StatusBar=function u({status:r,message:n,style:l}){const s={success:o.success,error:o.error,warning:o.warning,pending:o.warning,info:o.primary};const a=s[r];return d(i,{style:[e.statusBar,{backgroundColor:a+"20",borderColor:a+"40"},l],children:[t(i,{style:[e.statusDot,{backgroundColor:a}]}),n&&t(c,{style:[e.statusMessage,{color:a}],children:n})]})};DetailView.Timeline=function u({items:r,style:n}){return t(i,{style:[e.timeline,n],children:r.map((l,s)=>d(i,{style:e.timelineItem,children:[t(i,{style:e.timelineDot}),s<r.length-1&&t(i,{style:e.timelineLine}),d(i,{style:e.timelineContent,children:[t(c,{style:e.timelineLabel,children:l.label}),t(c,{style:e.timelineValue,children:l.value})]})]},s))})};DetailView.Content=function u({children:r,scrollable:n=true,style:l}){if(n){return t(y,{keyboardShouldPersistTaps:"handled",style:[e.content,l],children:r})}return t(i,{style:[e.content,l],children:r})};const e=w.create({container:{flex:1,backgroundColor:o.background},content:{flex:1,padding:16},section:{marginBottom:16,backgroundColor:o.panel,borderRadius:8,overflow:"hidden"},sectionHeader:{flexDirection:"row",alignItems:"center",padding:12,gap:8},sectionHeaderTouchable:{},sectionTitle:{flex:1,fontSize:14,fontWeight:"600",color:o.text},sectionBadge:{backgroundColor:o.primary+"20",paddingHorizontal:8,paddingVertical:2,borderRadius:4},sectionBadgeText:{fontSize:11,fontWeight:"600",color:o.primary},sectionContent:{padding:12,paddingTop:0},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:8,borderBottomWidth:1,borderBottomColor:o.border+"20"},rowLabel:{flex:1,fontSize:13,color:o.secondary},rowValueContainer:{flexDirection:"row",alignItems:"center",flex:2,gap:8},rowValue:{flex:1,fontSize:13,color:o.text,textAlign:"right"},dataContainer:{backgroundColor:o.background,borderRadius:6,padding:12},dataText:{fontSize:12,fontFamily:S,color:o.text},statusBar:{flexDirection:"row",alignItems:"center",padding:12,borderWidth:1,borderRadius:8,gap:8,marginVertical:8},statusDot:{width:8,height:8,borderRadius:4},statusMessage:{fontSize:13,fontWeight:"500"},timeline:{paddingVertical:8},timelineItem:{flexDirection:"row",position:"relative"},timelineDot:{width:8,height:8,borderRadius:4,backgroundColor:o.primary,marginTop:4,marginRight:12},timelineLine:{position:"absolute",left:3.5,top:12,bottom:-4,width:1,backgroundColor:o.border+"40"},timelineContent:{flex:1,marginBottom:12},timelineLabel:{fontSize:12,color:o.secondary,marginBottom:2},timelineValue:{fontSize:13,color:o.text}});
@@ -1 +1 @@
1
- "use strict";import{View as c,Text as a,TouchableOpacity as F,StyleSheet as U,ScrollView as w}from"react-native";import{useEffect as X,useState as Y}from"react";import{Filter as A,Plus as v,Copy as J,Eye as Q,Info as ee}from"../../icons/index.js";import{SectionHeader as d}from"./SectionHeader.js";import{FilterList as H,AddFilterInput as W,AddFilterButton as E}from"./FilterComponents.js";import{useFilterManager as R}from"../../hooks/useFilterManager.js";import{buoyColors as i}from"../gameUI/constants/gameUIColors.js";import{night as o}from"../night/nightTheme.js";import{monoFont as f}from"../fonts.js";import{jsx as e,jsxs as n,Fragment as D}from"react/jsx-runtime";export function DynamicFilterView({sections:L=[],filterSummarySection:p,addFilterSection:T,includeOnlySection:s,availableItemsSection:x,howItWorksSection:h,previewSection:b,onFilterChange:V,onPatternToggle:k,onPatternAdd:z,activePatterns:g=new Set,renderPatternMeta:j,tabs:y,activeTab:K,onTabChange:B}){const u=R(g);const m=R(s?.patterns||new Set);const[M,P]=Y(y?.[0]?.id||"");const C=K||M;X(()=>{if(g.size!==u.filters.size||!Array.from(g).every(t=>u.filters.has(t))){}},[g,u.filters]);const N=()=>{if(u.newFilter.trim()&&z){z(u.newFilter.trim());u.addFilter(u.newFilter)}};const O=()=>{if(m.newFilter.trim()&&s?.onPatternAdd){s.onPatternAdd(m.newFilter.trim());m.addFilter(m.newFilter)}};const I=x?.items?.filter(t=>{return!Array.from(g).some(l=>t.includes(l))})||[];const $=()=>{if(!y||y.length===0)return null;return e(c,{style:r.tabContainer,children:y.map(t=>n(F,{onPress:()=>{if(B)B(t.id);else P(t.id)},style:[r.tabButton,C===t.id?r.tabButtonActive:r.tabButtonInactive],children:[t.icon&&e(t.icon,{size:14,color:C===t.id?i.primary:o.color.textTertiary}),e(a,{style:[r.tabButtonText,C===t.id?r.tabButtonTextActive:r.tabButtonTextInactive],children:t.label}),t.count!==void 0&&t.count>0&&e(c,{style:r.tabBadge,children:e(a,{style:r.tabBadgeText,children:t.count})})]},t.id))})};const Z=t=>{if(t.type==="custom"&&t.renderCustom){return t.renderCustom()}if(t.type==="patterns"){return null}if(!t.data||t.data.length===0)return null;return n(c,{style:r.section,children:[n(d,{children:[t.icon&&e(d.Icon,{icon:t.icon,color:t.color||i.primary,size:12}),e(d.Title,{children:t.title})]}),t.description&&e(a,{style:r.sectionDescription,children:t.description}),e(c,{style:r.filterGrid,children:t.data.map(l=>{const S=l.count!==void 0;const q=S&&l.count===0;const G=t.type!=="method"||l.icon;return n(F,{testID:`buoy-filter-option-${l.id}`,accessibilityRole:"button",accessibilityLabel:String(l.label??l.id),style:[r.filterCard,l.isActive&&r.activeFilterCard],onPress:()=>V?.(l.id,l.value),children:[l.icon?e(l.icon,{size:24,color:l.color,style:r.filterIcon}):t.type==="method"?e(c,{style:[r.methodBadgeCompact,{backgroundColor:`${l.color}20`}],children:e(a,{style:[r.methodTextCompact,{color:l.color}],numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,children:l.label})}):null,S&&e(a,{style:[q?r.filterCountZero:r.filterCountActive],children:l.count}),G&&e(a,{style:r.filterLabelCompact,children:l.label}),l.description&&e(a,{style:r.filterDescriptionBottom,children:l.description})]},l.id)})})]},t.id)};const _=()=>{if(y&&C){const t=y.find(l=>l.id===C);if(t?.content){return t.content()}}return n(D,{children:[p?.enabled&&(p.includePatterns?.size||p.excludePatterns?.size)?n(c,{style:r.filterSummarySection,children:[n(c,{style:r.filterSummaryHeader,children:[e(ee,{size:14,color:i.warning}),e(a,{style:r.filterSummaryTitle,children:"Filters Active"})]}),n(a,{style:r.filterSummaryText,children:["Showing ",p.filteredCount," of ",p.totalCount," queries",p.includePatterns?.size?n(a,{style:r.filterSummaryInclude,children:[" ","\u2022 Including: ",Array.from(p.includePatterns).join(", ")]}):null,p.excludePatterns?.size?n(a,{style:r.filterSummaryExclude,children:[" ","\u2022 Excluding: ",Array.from(p.excludePatterns).join(", ")]}):null]})]}):null,L.map(Z),s?.enabled&&n(c,{style:r.includeOnlySection,children:[n(d,{children:[e(d.Icon,{icon:s.icon||Q,color:i.success,size:12}),e(d.Title,{children:s.title||"INCLUDE ONLY FILTERS"}),s.patterns.size>0&&e(d.Badge,{count:s.patterns.size,color:i.success})]}),s.description&&e(a,{style:r.includeOnlyDescription,children:s.description}),e(c,{style:r.includeOnlyInputWrapper,children:!m.showAddInput?e(E,{onPress:()=>m.setShowAddInput(true),color:i.success,label:"Add include pattern",testID:"buoy-filter-include-add-open"}):e(W,{value:m.newFilter,onChange:m.setNewFilter,onSubmit:O,onCancel:()=>{m.setShowAddInput(false);m.setNewFilter("")},placeholder:s.placeholder||"Enter pattern to include...",color:i.success,testID:"buoy-filter-include-input"})}),s.patterns.size>0&&e(w,{testID:"buoy-filter-include-scroll",style:r.includeOnlyFiltersContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:e(H,{filters:s.patterns,onRemoveFilter:s.onPatternToggle,color:i.success,renderItemMeta:s.renderPatternMeta})})]}),T?.enabled&&n(c,{style:r.excludeFiltersSection,children:[n(d,{children:[e(d.Icon,{icon:A,color:i.primary,size:12}),e(d.Title,{children:T.title||"EXCLUDE FILTERS"}),g.size>0&&e(d.Badge,{count:g.size,color:i.primary})]}),e(a,{style:r.excludeFiltersDescription,children:"Hide queries matching these patterns from the list."}),e(c,{style:r.excludeFiltersInputWrapper,children:!u.showAddInput?e(E,{onPress:()=>u.setShowAddInput(true),color:i.primary,label:"Add exclude pattern"}):n(D,{children:[T.renderExtra?.(),e(W,{value:u.newFilter,onChange:u.setNewFilter,onSubmit:N,onCancel:()=>{u.setShowAddInput(false);u.setNewFilter("")},placeholder:T.placeholder||"Enter pattern to exclude...",color:i.primary})]})}),g.size>0&&e(w,{testID:"buoy-filter-active-scroll",style:r.excludeFiltersContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:e(H,{filters:g,onRemoveFilter:k,color:i.primary,renderItemMeta:j})})]}),x?.enabled&&n(c,{style:r.availableKeysSection,children:[n(d,{children:[e(d.Icon,{icon:x.icon||v,color:i.primary,size:12}),e(d.Title,{children:x.title||"AVAILABLE ITEMS"}),e(d.Badge,{count:I.length,color:i.primary})]}),e(w,{style:r.availableKeysScroll,horizontal:false,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,scrollEnabled:true,children:I.length>0?I.map(t=>n(F,{onPress:()=>{if(z){z(t);u.addFilter(t)}},style:r.availableKeyItem,"sentry-label":"ignore-touchable-opacity",testID:`buoy-filter-available-${t}`,accessibilityRole:"button",accessibilityLabel:`Add filter ${t}`,children:[e(a,{style:r.availableKeyText,numberOfLines:1,children:t}),e(v,{size:12,color:i.primary})]},t)):e(a,{style:r.emptyStateText,children:x.emptyMessage||"No items available"})})]}),h?.enabled&&n(c,{style:r.howItWorksSection,children:[n(d,{children:[e(d.Icon,{icon:h.icon||A,color:o.color.textSecondary,size:12}),e(d.Title,{children:h.title||"HOW FILTERS WORK"})]}),e(a,{style:r.howItWorksText,children:h.description||"Filters help you focus on relevant data by hiding unwanted items."}),h.examples&&h.examples.length>0&&n(c,{style:r.examplesContainer,children:[e(a,{style:r.examplesTitle,children:"EXAMPLES:"}),h.examples.map((t,l)=>e(a,{style:r.exampleItem,children:t},l))]})]}),b?.enabled&&n(c,{style:r.previewSection,children:[n(d,{children:[e(d.Icon,{icon:b.icon||J,color:i.primary,size:12}),e(d.Title,{children:b.title||"PREVIEW"}),b.headerActions&&e(d.Actions,{children:b.headerActions()})]}),e(c,{style:r.previewContent,children:b.content()})]})]})};return n(c,{style:r.container,children:[$(),e(w,{testID:"buoy-filter-scroll",style:r.content,contentContainerStyle:r.scrollContent,showsVerticalScrollIndicator:false,"sentry-label":"ignore-scrollview",children:_()})]})}const r=U.create({container:{flex:1,backgroundColor:"transparent"},content:{flex:1},scrollContent:{paddingTop:16,paddingHorizontal:16,paddingBottom:24},tabContainer:{flexDirection:"row",paddingHorizontal:16,paddingVertical:12,gap:8,backgroundColor:o.color.surface,borderBottomWidth:1,borderBottomColor:o.color.border},tabButton:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1},tabButtonActive:{backgroundColor:i.primary+"20",borderColor:i.primary,borderWidth:2},tabButtonInactive:{backgroundColor:o.color.surfaceElevated,borderColor:o.color.border},tabButtonText:{fontSize:11,fontWeight:"600",letterSpacing:.5},tabButtonTextActive:{color:i.primary},tabButtonTextInactive:{color:o.color.textTertiary},tabBadge:{backgroundColor:i.primary+"40",paddingHorizontal:6,paddingVertical:1,borderRadius:8,minWidth:18,alignItems:"center"},tabBadgeText:{fontSize:9,color:i.primary,fontWeight:"700"},section:{marginBottom:8},filterInputWrapper:{marginBottom:4},filterGrid:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:8},filterCard:{backgroundColor:o.color.surface,borderRadius:12,paddingHorizontal:8,paddingVertical:10,flexDirection:"column",alignItems:"center",justifyContent:"center",borderWidth:1,borderColor:o.color.border,width:72,minHeight:68},activeFilterCard:{backgroundColor:i.primary+"33",borderColor:i.primary,borderWidth:2,shadowColor:i.primary,shadowOffset:{width:0,height:0},shadowOpacity:.3,shadowRadius:8,elevation:4},filterIcon:{marginBottom:0},filterCountActive:{fontSize:14,fontWeight:"700",color:o.color.text,fontFamily:f,marginTop:3,marginBottom:1,textShadowColor:"rgba(0, 0, 0, 0.2)",textShadowOffset:{width:0,height:.5},textShadowRadius:1},filterCountZero:{fontSize:11,fontWeight:"500",color:o.color.textTertiary,fontFamily:f,marginTop:3,marginBottom:1},filterLabelCompact:{fontSize:10,color:o.color.text,fontWeight:"600",textAlign:"center",textTransform:"capitalize",textShadowColor:"rgba(0, 0, 0, 0.3)",textShadowOffset:{width:0,height:.5},textShadowRadius:1},filterDescriptionBottom:{fontSize:8,color:o.color.textTertiary,textAlign:"center",marginTop:2,lineHeight:11},sectionDescription:{fontSize:10,color:o.color.textSecondary,marginTop:4,marginBottom:4,lineHeight:14},methodBadgeCompact:{paddingHorizontal:8,paddingVertical:4,borderRadius:5,minWidth:48,maxWidth:60,alignItems:"center",justifyContent:"center"},methodTextCompact:{fontSize:13,fontWeight:"700",letterSpacing:.3,fontFamily:f},activeFiltersSection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},activeFiltersContent:{paddingHorizontal:16,paddingTop:8,paddingBottom:16,maxHeight:200},includeOnlySection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},includeOnlyDescription:{fontSize:10,color:o.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:14},includeOnlyInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},includeOnlyFiltersContent:{paddingHorizontal:16,paddingBottom:16,maxHeight:150},excludeFiltersSection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},excludeFiltersDescription:{fontSize:10,color:o.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:14},excludeFiltersInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},excludeFiltersContent:{paddingHorizontal:16,paddingBottom:16,maxHeight:150},filterSummarySection:{backgroundColor:i.warning+"15",borderRadius:8,borderWidth:1,borderColor:i.warning+"40",padding:12,marginBottom:12},filterSummaryHeader:{flexDirection:"row",alignItems:"center",gap:6,marginBottom:6},filterSummaryTitle:{fontSize:12,fontWeight:"600",color:i.warning},filterSummaryText:{fontSize:11,color:o.color.text,lineHeight:16},filterSummaryInclude:{color:i.success,fontWeight:"500"},filterSummaryExclude:{color:i.primary,fontWeight:"500"},emptyStateText:{fontSize:11,color:o.color.textTertiary,fontStyle:"italic",textAlign:"center",paddingVertical:12},availableKeysSection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},availableKeysScroll:{maxHeight:150,paddingHorizontal:16,paddingTop:8,paddingBottom:16},availableKeyItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:10,paddingHorizontal:12,backgroundColor:o.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:o.color.border,marginBottom:8},availableKeyText:{flex:1,fontSize:11,color:o.color.text,fontFamily:f,marginRight:8},howItWorksSection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},howItWorksText:{fontSize:11,color:o.color.textSecondary,lineHeight:16,marginBottom:12,marginTop:8,paddingHorizontal:16,fontFamily:f},examplesContainer:{paddingTop:8,paddingHorizontal:16,paddingBottom:16,borderTopWidth:1,borderTopColor:o.color.border},examplesTitle:{fontSize:10,fontWeight:"600",color:o.color.textTertiary,fontFamily:f,letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:o.color.textTertiary,fontFamily:f,lineHeight:16},previewSection:{backgroundColor:o.color.surfaceElevated,borderRadius:16,borderWidth:1,borderColor:o.color.fillTertiary,marginTop:16,overflow:"hidden"},previewContent:{paddingHorizontal:16,paddingTop:12,paddingBottom:16,backgroundColor:o.color.bg,marginHorizontal:12,marginBottom:12,borderRadius:8,borderWidth:1,borderColor:o.color.border}});
1
+ "use strict";import{View as c,Text as a,TouchableOpacity as A,StyleSheet as ce,ScrollView as F,Keyboard as W,Platform as se}from"react-native";import{useEffect as H,useRef as S,useState as ue}from"react";import{Filter as N,Plus as O,Copy as me,Eye as pe,Info as he}from"../../icons/index.js";import{SectionHeader as d}from"./SectionHeader.js";import{FilterList as _,AddFilterInput as $,AddFilterButton as Y}from"./FilterComponents.js";import{useFilterManager as Z}from"../../hooks/useFilterManager.js";import{buoyColors as i}from"../gameUI/constants/gameUIColors.js";import{night as o}from"../night/nightTheme.js";import{monoFont as f}from"../fonts.js";import{jsx as e,jsxs as n,Fragment as q}from"react/jsx-runtime";export function DynamicFilterView({sections:G=[],filterSummarySection:p,addFilterSection:C,includeOnlySection:s,availableItemsSection:x,howItWorksSection:g,previewSection:b,onFilterChange:U,onPatternToggle:X,onPatternAdd:w,activePatterns:h=new Set,renderPatternMeta:J,tabs:y,activeTab:Q,onTabChange:R}){const u=Z(h);const m=Z(s?.patterns||new Set);const[ee,re]=ue(y?.[0]?.id||"");const T=Q||ee;const E=S(null);const D=S(0);const k=S(null);const L=S(null);const V=m.showAddInput;const P=u.showAddInput;const j=r=>{if(!r||se.OS!=="ios")return()=>{};let l;const z=()=>{const K=W.metrics()?.screenY;if(K==null)return;r.measureInWindow((ge,de,fe,ae)=>{const M=de+ae-(K-16);if(M<=0)return;E.current?.scrollTo({y:D.current+M,animated:true})})};const I=()=>{clearTimeout(l);l=setTimeout(z,300)};if(W.isVisible())I();const v=W.addListener("keyboardDidShow",I);return()=>{clearTimeout(l);v.remove()}};H(()=>V?j(k.current):void 0,[V]);H(()=>P?j(L.current):void 0,[P]);H(()=>{if(h.size!==u.filters.size||!Array.from(h).every(r=>u.filters.has(r))){}},[h,u.filters]);const te=()=>{if(u.newFilter.trim()&&w){w(u.newFilter.trim());u.addFilter(u.newFilter)}};const oe=()=>{if(m.newFilter.trim()&&s?.onPatternAdd){s.onPatternAdd(m.newFilter.trim());m.addFilter(m.newFilter)}};const B=x?.items?.filter(r=>{return!Array.from(h).some(l=>r.includes(l))})||[];const le=()=>{if(!y||y.length===0)return null;return e(c,{style:t.tabContainer,children:y.map(r=>n(A,{onPress:()=>{if(R)R(r.id);else re(r.id)},style:[t.tabButton,T===r.id?t.tabButtonActive:t.tabButtonInactive],children:[r.icon&&e(r.icon,{size:14,color:T===r.id?i.primary:o.color.textTertiary}),e(a,{style:[t.tabButtonText,T===r.id?t.tabButtonTextActive:t.tabButtonTextInactive],children:r.label}),r.count!==void 0&&r.count>0&&e(c,{style:t.tabBadge,children:e(a,{style:t.tabBadgeText,children:r.count})})]},r.id))})};const ie=r=>{if(r.type==="custom"&&r.renderCustom){return r.renderCustom()}if(r.type==="patterns"){return null}if(!r.data||r.data.length===0)return null;return n(c,{style:t.section,children:[n(d,{children:[r.icon&&e(d.Icon,{icon:r.icon,color:r.color||i.primary,size:12}),e(d.Title,{children:r.title})]}),r.description&&e(a,{style:t.sectionDescription,children:r.description}),e(c,{style:t.filterGrid,children:r.data.map(l=>{const z=l.count!==void 0;const I=z&&l.count===0;const v=r.type!=="method"||l.icon;return n(A,{testID:`buoy-filter-option-${l.id}`,accessibilityRole:"button",accessibilityLabel:String(l.label??l.id),style:[t.filterCard,l.isActive&&t.activeFilterCard],onPress:()=>U?.(l.id,l.value),children:[l.icon?e(l.icon,{size:24,color:l.color,style:t.filterIcon}):r.type==="method"?e(c,{style:[t.methodBadgeCompact,{backgroundColor:`${l.color}20`}],children:e(a,{style:[t.methodTextCompact,{color:l.color}],numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,children:l.label})}):null,z&&e(a,{style:[I?t.filterCountZero:t.filterCountActive],children:l.count}),v&&e(a,{style:t.filterLabelCompact,children:l.label}),l.description&&e(a,{style:t.filterDescriptionBottom,children:l.description})]},l.id)})})]},r.id)};const ne=()=>{if(y&&T){const r=y.find(l=>l.id===T);if(r?.content){return r.content()}}return n(q,{children:[p?.enabled&&(p.includePatterns?.size||p.excludePatterns?.size)?n(c,{style:t.filterSummarySection,children:[n(c,{style:t.filterSummaryHeader,children:[e(he,{size:14,color:i.warning}),e(a,{style:t.filterSummaryTitle,children:"Filters Active"})]}),n(a,{style:t.filterSummaryText,children:["Showing ",p.filteredCount," of ",p.totalCount," queries",p.includePatterns?.size?n(a,{style:t.filterSummaryInclude,children:[" ","\u2022 Including: ",Array.from(p.includePatterns).join(", ")]}):null,p.excludePatterns?.size?n(a,{style:t.filterSummaryExclude,children:[" ","\u2022 Excluding: ",Array.from(p.excludePatterns).join(", ")]}):null]})]}):null,G.map(ie),s?.enabled&&n(c,{style:t.includeOnlySection,children:[n(d,{children:[e(d.Icon,{icon:s.icon||pe,color:i.success,size:12}),e(d.Title,{children:s.title||"INCLUDE ONLY FILTERS"}),s.patterns.size>0&&e(d.Badge,{count:s.patterns.size,color:i.success})]}),s.description&&e(a,{style:t.includeOnlyDescription,children:s.description}),e(c,{ref:k,style:t.includeOnlyInputWrapper,children:!m.showAddInput?e(Y,{onPress:()=>m.setShowAddInput(true),color:i.success,label:"Add include pattern",testID:"buoy-filter-include-add-open"}):e($,{value:m.newFilter,onChange:m.setNewFilter,onSubmit:oe,onCancel:()=>{m.setShowAddInput(false);m.setNewFilter("")},placeholder:s.placeholder||"Enter pattern to include...",color:i.success,testID:"buoy-filter-include-input"})}),s.patterns.size>0&&e(F,{keyboardShouldPersistTaps:"handled",testID:"buoy-filter-include-scroll",style:t.includeOnlyFiltersContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:e(_,{filters:s.patterns,onRemoveFilter:s.onPatternToggle,color:i.success,renderItemMeta:s.renderPatternMeta})})]}),C?.enabled&&n(c,{style:t.excludeFiltersSection,children:[n(d,{children:[e(d.Icon,{icon:N,color:i.primary,size:12}),e(d.Title,{children:C.title||"EXCLUDE FILTERS"}),h.size>0&&e(d.Badge,{count:h.size,color:i.primary})]}),e(a,{style:t.excludeFiltersDescription,children:"Hide queries matching these patterns from the list."}),e(c,{ref:L,style:t.excludeFiltersInputWrapper,children:!u.showAddInput?e(Y,{onPress:()=>u.setShowAddInput(true),color:i.primary,label:"Add exclude pattern"}):n(q,{children:[C.renderExtra?.(),e($,{value:u.newFilter,onChange:u.setNewFilter,onSubmit:te,onCancel:()=>{u.setShowAddInput(false);u.setNewFilter("")},placeholder:C.placeholder||"Enter pattern to exclude...",color:i.primary})]})}),h.size>0&&e(F,{keyboardShouldPersistTaps:"handled",testID:"buoy-filter-active-scroll",style:t.excludeFiltersContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:e(_,{filters:h,onRemoveFilter:X,color:i.primary,renderItemMeta:J})})]}),x?.enabled&&n(c,{style:t.availableKeysSection,children:[n(d,{children:[e(d.Icon,{icon:x.icon||O,color:i.primary,size:12}),e(d.Title,{children:x.title||"AVAILABLE ITEMS"}),e(d.Badge,{count:B.length,color:i.primary})]}),e(F,{keyboardShouldPersistTaps:"handled",style:t.availableKeysScroll,horizontal:false,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,scrollEnabled:true,children:B.length>0?B.map(r=>n(A,{onPress:()=>{if(w){w(r);u.addFilter(r)}},style:t.availableKeyItem,"sentry-label":"ignore-touchable-opacity",testID:`buoy-filter-available-${r}`,accessibilityRole:"button",accessibilityLabel:`Add filter ${r}`,children:[e(a,{style:t.availableKeyText,numberOfLines:1,children:r}),e(O,{size:12,color:i.primary})]},r)):e(a,{style:t.emptyStateText,children:x.emptyMessage||"No items available"})})]}),g?.enabled&&n(c,{style:t.howItWorksSection,children:[n(d,{children:[e(d.Icon,{icon:g.icon||N,color:o.color.textSecondary,size:12}),e(d.Title,{children:g.title||"HOW FILTERS WORK"})]}),e(a,{style:t.howItWorksText,children:g.description||"Filters help you focus on relevant data by hiding unwanted items."}),g.examples&&g.examples.length>0&&n(c,{style:t.examplesContainer,children:[e(a,{style:t.examplesTitle,children:"EXAMPLES:"}),g.examples.map((r,l)=>e(a,{style:t.exampleItem,children:r},l))]})]}),b?.enabled&&n(c,{style:t.previewSection,children:[n(d,{children:[e(d.Icon,{icon:b.icon||me,color:i.primary,size:12}),e(d.Title,{children:b.title||"PREVIEW"}),b.headerActions&&e(d.Actions,{children:b.headerActions()})]}),e(c,{style:t.previewContent,children:b.content()})]})]})};return n(c,{style:t.container,children:[le(),e(F,{ref:E,onScroll:r=>{D.current=r.nativeEvent.contentOffset.y},scrollEventThrottle:32,keyboardShouldPersistTaps:"handled",testID:"buoy-filter-scroll",style:t.content,contentContainerStyle:t.scrollContent,showsVerticalScrollIndicator:false,"sentry-label":"ignore-scrollview",children:ne()})]})}const t=ce.create({container:{flex:1,backgroundColor:"transparent"},content:{flex:1},scrollContent:{paddingTop:16,paddingHorizontal:16,paddingBottom:24},tabContainer:{flexDirection:"row",paddingHorizontal:16,paddingVertical:12,gap:8,backgroundColor:o.color.surface,borderBottomWidth:1,borderBottomColor:o.color.border},tabButton:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1},tabButtonActive:{backgroundColor:i.primary+"20",borderColor:i.primary,borderWidth:2},tabButtonInactive:{backgroundColor:o.color.surfaceElevated,borderColor:o.color.border},tabButtonText:{fontSize:11,fontWeight:"600",letterSpacing:.5},tabButtonTextActive:{color:i.primary},tabButtonTextInactive:{color:o.color.textTertiary},tabBadge:{backgroundColor:i.primary+"40",paddingHorizontal:6,paddingVertical:1,borderRadius:8,minWidth:18,alignItems:"center"},tabBadgeText:{fontSize:9,color:i.primary,fontWeight:"700"},section:{marginBottom:8},filterInputWrapper:{marginBottom:4},filterGrid:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:8},filterCard:{backgroundColor:o.color.surface,borderRadius:12,paddingHorizontal:8,paddingVertical:10,flexDirection:"column",alignItems:"center",justifyContent:"center",borderWidth:1,borderColor:o.color.border,width:72,minHeight:68},activeFilterCard:{backgroundColor:i.primary+"33",borderColor:i.primary,borderWidth:2,shadowColor:i.primary,shadowOffset:{width:0,height:0},shadowOpacity:.3,shadowRadius:8,elevation:4},filterIcon:{marginBottom:0},filterCountActive:{fontSize:14,fontWeight:"700",color:o.color.text,fontFamily:f,marginTop:3,marginBottom:1,textShadowColor:"rgba(0, 0, 0, 0.2)",textShadowOffset:{width:0,height:.5},textShadowRadius:1},filterCountZero:{fontSize:11,fontWeight:"500",color:o.color.textTertiary,fontFamily:f,marginTop:3,marginBottom:1},filterLabelCompact:{fontSize:10,color:o.color.text,fontWeight:"600",textAlign:"center",textTransform:"capitalize",textShadowColor:"rgba(0, 0, 0, 0.3)",textShadowOffset:{width:0,height:.5},textShadowRadius:1},filterDescriptionBottom:{fontSize:8,color:o.color.textTertiary,textAlign:"center",marginTop:2,lineHeight:11},sectionDescription:{fontSize:10,color:o.color.textSecondary,marginTop:4,marginBottom:4,lineHeight:14},methodBadgeCompact:{paddingHorizontal:8,paddingVertical:4,borderRadius:5,minWidth:48,maxWidth:60,alignItems:"center",justifyContent:"center"},methodTextCompact:{fontSize:13,fontWeight:"700",letterSpacing:.3,fontFamily:f},activeFiltersSection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},activeFiltersContent:{paddingHorizontal:16,paddingTop:8,paddingBottom:16,maxHeight:200},includeOnlySection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},includeOnlyDescription:{fontSize:10,color:o.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:14},includeOnlyInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},includeOnlyFiltersContent:{paddingHorizontal:16,paddingBottom:16,maxHeight:150},excludeFiltersSection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},excludeFiltersDescription:{fontSize:10,color:o.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:14},excludeFiltersInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},excludeFiltersContent:{paddingHorizontal:16,paddingBottom:16,maxHeight:150},filterSummarySection:{backgroundColor:i.warning+"15",borderRadius:8,borderWidth:1,borderColor:i.warning+"40",padding:12,marginBottom:12},filterSummaryHeader:{flexDirection:"row",alignItems:"center",gap:6,marginBottom:6},filterSummaryTitle:{fontSize:12,fontWeight:"600",color:i.warning},filterSummaryText:{fontSize:11,color:o.color.text,lineHeight:16},filterSummaryInclude:{color:i.success,fontWeight:"500"},filterSummaryExclude:{color:i.primary,fontWeight:"500"},emptyStateText:{fontSize:11,color:o.color.textTertiary,fontStyle:"italic",textAlign:"center",paddingVertical:12},availableKeysSection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},availableKeysScroll:{maxHeight:150,paddingHorizontal:16,paddingTop:8,paddingBottom:16},availableKeyItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:10,paddingHorizontal:12,backgroundColor:o.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:o.color.border,marginBottom:8},availableKeyText:{flex:1,fontSize:11,color:o.color.text,fontFamily:f,marginRight:8},howItWorksSection:{backgroundColor:o.color.surface,borderRadius:16,borderWidth:1,borderColor:o.color.border,marginTop:16,overflow:"hidden"},howItWorksText:{fontSize:11,color:o.color.textSecondary,lineHeight:16,marginBottom:12,marginTop:8,paddingHorizontal:16,fontFamily:f},examplesContainer:{paddingTop:8,paddingHorizontal:16,paddingBottom:16,borderTopWidth:1,borderTopColor:o.color.border},examplesTitle:{fontSize:10,fontWeight:"600",color:o.color.textTertiary,fontFamily:f,letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:o.color.textTertiary,fontFamily:f,lineHeight:16},previewSection:{backgroundColor:o.color.surfaceElevated,borderRadius:16,borderWidth:1,borderColor:o.color.fillTertiary,marginTop:16,overflow:"hidden"},previewContent:{paddingHorizontal:16,paddingTop:12,paddingBottom:16,backgroundColor:o.color.bg,marginHorizontal:12,marginBottom:12,borderRadius:8,borderWidth:1,borderColor:o.color.border}});
@@ -1 +1 @@
1
- "use strict";import{useState as w}from"react";import{ScrollView as z,StyleSheet as W,Text as p,TouchableOpacity as L,View as s}from"react-native";import{Filter as I,X as B}from"../../icons/index.js";import{night as t}from"../night/nightTheme.js";import{SectionHeader as n}from"./SectionHeader.js";import{AddFilterButton as V,AddFilterInput as A}from"./FilterComponents.js";import{monoFont as m}from"../fonts.js";import{jsxs as l,jsx as r}from"react/jsx-runtime";function k(d,a){return Array.from(a).some(h=>d.name.toLowerCase().includes(h.toLowerCase()))}function v(d,a){const h=a.find(f=>f.name.toLowerCase()===d.toLowerCase());return h?h.color:null}export function EntityFilterView({entities:d,ignoredPatterns:a,onTogglePattern:h,onAddPattern:f,entityNoun:T,entitySingular:y,entityKey:u,testIDPrefix:c,slug:x,howItWorks:H,examples:R,addPlaceholder:E,emptyMessage:S}){const[$,g]=w(false);const[C,b]=w("");const F=()=>{const e=C.trim();if(e){f(e);b("");g(false)}};return l(z,{style:o.container,contentContainerStyle:o.scrollContent,showsVerticalScrollIndicator:false,nestedScrollEnabled:true,testID:`${c}-filters-scroll`,children:[d.length===0&&S?l(s,{style:o.section,children:[r(n,{children:l(n.Title,{children:["REGISTERED ",T]})}),r(p,{style:o.emptyText,testID:`${c}-filters-${u}s-empty`,children:S})]}):null,d.length>0&&l(s,{style:o.section,children:[l(n,{children:[l(n.Title,{children:["REGISTERED ",T]}),r(n.Badge,{count:d.length,color:t.color.accent,testID:`${c}-filters-${u}-count`})]}),r(z,{style:o.entityList,contentContainerStyle:o.entityListContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,testID:`${c}-filters-${u}-list`,children:d.map(e=>{const i=k(e,a);return l(L,{style:[o.entityRow,i&&o.entityRowHidden],onPress:()=>f(e.name),disabled:i,testID:`${c}-filters-${u}-${x(e.name)}`,accessibilityRole:"button",accessibilityLabel:`Hide ${e.name}`,accessibilityState:{disabled:i},children:[r(s,{style:[o.dot,{backgroundColor:i?t.color.textTertiary:e.color}]}),r(p,{style:[o.entityText,i?o.entityTextHidden:{color:e.color}],numberOfLines:1,children:e.name}),i?r(p,{style:o.hiddenLabel,children:"hidden"}):r(p,{style:[o.addLabel,{color:e.color+"99"}],children:"+ hide"})]},e.name)})})]}),l(s,{style:o.section,children:[l(n,{children:[r(n.Icon,{icon:I,color:t.color.accent,size:12}),l(n.Title,{children:[y.toUpperCase()," NAME FILTERS"]}),a.size>0&&r(n.Badge,{count:a.size,color:t.color.accent,testID:`${c}-filters-count`})]}),r(s,{style:o.addInputWrapper,children:!$?r(V,{onPress:()=>g(true),color:t.color.accent,label:`Add ${y} name pattern`,testID:`${c}-filters-add-open`}):r(A,{value:C,onChange:b,onSubmit:F,onCancel:()=>{g(false);b("")},placeholder:E??`Enter ${y} name pattern to hide...`,color:t.color.accent,testID:`${c}-filters-add-input`})}),a.size>0&&r(s,{style:o.patternList,children:Array.from(a).map(e=>{const i=v(e,d);return l(L,{style:o.patternRow,onPress:()=>h(e),activeOpacity:.8,testID:`${c}-filters-chip-${x(e)}`,accessibilityRole:"button",accessibilityLabel:`Remove filter ${e}`,children:[i?r(s,{style:[o.dot,{backgroundColor:i}]}):null,r(p,{style:[o.patternText,i?{color:i}:null],numberOfLines:1,children:e}),r(B,{size:12,color:t.color.accent+"80"})]},e)})})]}),l(s,{style:o.section,children:[l(n,{children:[r(n.Icon,{icon:I,color:t.color.textSecondary,size:12}),r(n.Title,{children:"HOW EVENT FILTERS WORK"})]}),r(p,{style:o.howItWorksText,children:H}),l(s,{style:o.examplesContainer,children:[r(p,{style:o.examplesTitle,children:"EXAMPLES:"}),R.map(e=>r(p,{style:o.exampleItem,children:e},e))]})]})]})}const o=W.create({container:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingTop:16,paddingHorizontal:16,paddingBottom:24,gap:16},section:{backgroundColor:t.color.surface,borderRadius:16,borderWidth:1,borderColor:t.color.border,overflow:"hidden"},entityList:{maxHeight:180},entityListContent:{paddingHorizontal:16,paddingTop:8,paddingBottom:16,gap:10},entityRow:{flexDirection:"row",alignItems:"center",gap:10,paddingVertical:10,paddingHorizontal:12,backgroundColor:t.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:t.color.border},entityRowHidden:{opacity:.45},dot:{width:7,height:7,borderRadius:3.5},entityText:{flex:1,fontSize:12,fontWeight:"600",fontFamily:m},entityTextHidden:{color:t.color.textTertiary,textDecorationLine:"line-through"},hiddenLabel:{fontSize:10,fontWeight:"500",color:t.color.textTertiary,fontFamily:m},addLabel:{fontSize:10,fontWeight:"600",fontFamily:m},addInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},patternList:{paddingHorizontal:16,paddingBottom:16,gap:8},patternRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:10,paddingHorizontal:12,backgroundColor:t.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:t.color.border,gap:8},patternText:{flex:1,fontSize:12,fontFamily:m,color:t.color.text},emptyText:{fontSize:11,color:t.color.textTertiary,paddingHorizontal:16,paddingTop:8,paddingBottom:16,fontFamily:m},howItWorksText:{fontSize:11,color:t.color.textSecondary,lineHeight:16,marginTop:8,paddingHorizontal:16,fontFamily:m},examplesContainer:{paddingTop:8,paddingHorizontal:16,paddingBottom:16,borderTopWidth:1,borderTopColor:t.color.border,marginTop:12},examplesTitle:{fontSize:10,fontWeight:"600",color:t.color.textTertiary,fontFamily:m,letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:t.color.textTertiary,fontFamily:m,lineHeight:16}});
1
+ "use strict";import{useState as w}from"react";import{ScrollView as z,StyleSheet as W,Text as p,TouchableOpacity as L,View as s}from"react-native";import{Filter as I,X as k}from"../../icons/index.js";import{night as t}from"../night/nightTheme.js";import{SectionHeader as n}from"./SectionHeader.js";import{AddFilterButton as B,AddFilterInput as V}from"./FilterComponents.js";import{monoFont as h}from"../fonts.js";import{jsxs as l,jsx as r}from"react/jsx-runtime";function A(d,a){return Array.from(a).some(m=>d.name.toLowerCase().includes(m.toLowerCase()))}function v(d,a){const m=a.find(u=>u.name.toLowerCase()===d.toLowerCase());return m?m.color:null}export function EntityFilterView({entities:d,ignoredPatterns:a,onTogglePattern:m,onAddPattern:u,entityNoun:T,entitySingular:y,entityKey:f,testIDPrefix:c,slug:S,howItWorks:H,examples:R,addPlaceholder:E,emptyMessage:x}){const[$,b]=w(false);const[C,g]=w("");const F=()=>{const e=C.trim();if(e){u(e);g("");b(false)}};return l(z,{style:o.container,contentContainerStyle:o.scrollContent,showsVerticalScrollIndicator:false,nestedScrollEnabled:true,keyboardShouldPersistTaps:"handled",testID:`${c}-filters-scroll`,children:[d.length===0&&x?l(s,{style:o.section,children:[r(n,{children:l(n.Title,{children:["REGISTERED ",T]})}),r(p,{style:o.emptyText,testID:`${c}-filters-${f}s-empty`,children:x})]}):null,d.length>0&&l(s,{style:o.section,children:[l(n,{children:[l(n.Title,{children:["REGISTERED ",T]}),r(n.Badge,{count:d.length,color:t.color.accent,testID:`${c}-filters-${f}-count`})]}),r(z,{keyboardShouldPersistTaps:"handled",style:o.entityList,contentContainerStyle:o.entityListContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,testID:`${c}-filters-${f}-list`,children:d.map(e=>{const i=A(e,a);return l(L,{style:[o.entityRow,i&&o.entityRowHidden],onPress:()=>u(e.name),disabled:i,testID:`${c}-filters-${f}-${S(e.name)}`,accessibilityRole:"button",accessibilityLabel:`Hide ${e.name}`,accessibilityState:{disabled:i},children:[r(s,{style:[o.dot,{backgroundColor:i?t.color.textTertiary:e.color}]}),r(p,{style:[o.entityText,i?o.entityTextHidden:{color:e.color}],numberOfLines:1,children:e.name}),i?r(p,{style:o.hiddenLabel,children:"hidden"}):r(p,{style:[o.addLabel,{color:e.color+"99"}],children:"+ hide"})]},e.name)})})]}),l(s,{style:o.section,children:[l(n,{children:[r(n.Icon,{icon:I,color:t.color.accent,size:12}),l(n.Title,{children:[y.toUpperCase()," NAME FILTERS"]}),a.size>0&&r(n.Badge,{count:a.size,color:t.color.accent,testID:`${c}-filters-count`})]}),r(s,{style:o.addInputWrapper,children:!$?r(B,{onPress:()=>b(true),color:t.color.accent,label:`Add ${y} name pattern`,testID:`${c}-filters-add-open`}):r(V,{value:C,onChange:g,onSubmit:F,onCancel:()=>{b(false);g("")},placeholder:E??`Enter ${y} name pattern to hide...`,color:t.color.accent,testID:`${c}-filters-add-input`})}),a.size>0&&r(s,{style:o.patternList,children:Array.from(a).map(e=>{const i=v(e,d);return l(L,{style:o.patternRow,onPress:()=>m(e),activeOpacity:.8,testID:`${c}-filters-chip-${S(e)}`,accessibilityRole:"button",accessibilityLabel:`Remove filter ${e}`,children:[i?r(s,{style:[o.dot,{backgroundColor:i}]}):null,r(p,{style:[o.patternText,i?{color:i}:null],numberOfLines:1,children:e}),r(k,{size:12,color:t.color.accent+"80"})]},e)})})]}),l(s,{style:o.section,children:[l(n,{children:[r(n.Icon,{icon:I,color:t.color.textSecondary,size:12}),r(n.Title,{children:"HOW EVENT FILTERS WORK"})]}),r(p,{style:o.howItWorksText,children:H}),l(s,{style:o.examplesContainer,children:[r(p,{style:o.examplesTitle,children:"EXAMPLES:"}),R.map(e=>r(p,{style:o.exampleItem,children:e},e))]})]})]})}const o=W.create({container:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingTop:16,paddingHorizontal:16,paddingBottom:24,gap:16},section:{backgroundColor:t.color.surface,borderRadius:16,borderWidth:1,borderColor:t.color.border,overflow:"hidden"},entityList:{maxHeight:180},entityListContent:{paddingHorizontal:16,paddingTop:8,paddingBottom:16,gap:10},entityRow:{flexDirection:"row",alignItems:"center",gap:10,paddingVertical:10,paddingHorizontal:12,backgroundColor:t.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:t.color.border},entityRowHidden:{opacity:.45},dot:{width:7,height:7,borderRadius:3.5},entityText:{flex:1,fontSize:12,fontWeight:"600",fontFamily:h},entityTextHidden:{color:t.color.textTertiary,textDecorationLine:"line-through"},hiddenLabel:{fontSize:10,fontWeight:"500",color:t.color.textTertiary,fontFamily:h},addLabel:{fontSize:10,fontWeight:"600",fontFamily:h},addInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},patternList:{paddingHorizontal:16,paddingBottom:16,gap:8},patternRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:10,paddingHorizontal:12,backgroundColor:t.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:t.color.border,gap:8},patternText:{flex:1,fontSize:12,fontFamily:h,color:t.color.text},emptyText:{fontSize:11,color:t.color.textTertiary,paddingHorizontal:16,paddingTop:8,paddingBottom:16,fontFamily:h},howItWorksText:{fontSize:11,color:t.color.textSecondary,lineHeight:16,marginTop:8,paddingHorizontal:16,fontFamily:h},examplesContainer:{paddingTop:8,paddingHorizontal:16,paddingBottom:16,borderTopWidth:1,borderTopColor:t.color.border,marginTop:12},examplesTitle:{fontSize:10,fontWeight:"600",color:t.color.textTertiary,fontFamily:h,letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:t.color.textTertiary,fontFamily:h,lineHeight:16}});
@@ -1 +1 @@
1
- "use strict";import T,{memo as A}from"react";import{View as l,ScrollView as h,StyleSheet as J}from"react-native";import{macOSColors as K}from"../../gameUI/constants/macOSDesignSystemColors.js";import{EventStepperFooter as Q}from"../EventStepperFooter.js";import{ViewToggleCards as U}from"./ViewToggleCards.js";import{DiffModeTabs as W}from"./DiffModeTabs.js";import{CompareBar as X}from"./CompareBar.js";import{jsx as t,jsxs as s,Fragment as Y}from"react/jsx-runtime";function Z({scrolls:a,style:n,children:r}){if(!a)return t(l,{style:n,children:r});return t(h,{style:e.contentScroll,contentContainerStyle:e.contentScrollInner,showsVerticalScrollIndicator:true,children:r})}export const EventHistoryViewer=A(function a({activeView:n,onViewChange:r,currentViewLabel:p,currentViewDescription:S,currentViewIcon:x,diffViewLabel:y,diffViewDescription:v,diffViewIcon:b,renderCurrentView:f,diffModeTabs:o,activeDiffMode:w,onDiffModeChange:m,renderDiffContent:u,leftEvent:C,rightEvent:V,showCompareNavigation:L,onLeftPrevious:P,onLeftNext:H,onRightPrevious:I,onRightNext:N,canLeftPrevious:R,canLeftNext:E,canRightPrevious:j,canRightNext:k,onLeftPickerOpen:D,onRightPickerOpen:_,scrollDiffSection:d,disableInternalFooter:g,footerCurrentIndex:z,footerTotalItems:i,footerItemLabel:B,footerSubtitle:F,onFooterPrevious:G,onFooterNext:O}){const c=f!=null;const q=i<=1;return s(Y,{children:[s(l,{style:[e.container,{paddingBottom:!g&&i>1?96:0}],children:[c&&t(U,{activeView:n,onViewChange:r??(()=>{}),currentLabel:p??"",currentDescription:S??"",currentIcon:x,diffLabel:y,diffDescription:v,diffIcon:b,diffDisabled:q}),c&&n==="current"&&t(h,{style:e.contentScroll,contentContainerStyle:e.contentScrollInner,showsVerticalScrollIndicator:true,children:f?.()}),(!c||n==="diff")&&s(Z,{scrolls:d,style:e.contentSection,children:[o&&o.length>0&&m&&t(W,{tabs:o,activeTab:w??o[0]?.key??"",onTabChange:m}),t(X,{leftEvent:C,rightEvent:V,showNavigation:L,onLeftPrevious:P,onLeftNext:H,onRightPrevious:I,onRightNext:N,canLeftPrevious:R,canLeftNext:E,canRightPrevious:j,canRightNext:k,onLeftPress:D,onRightPress:_}),d?u():t(l,{style:e.diffContent,children:u()})]})]}),!g&&t(Q,{currentIndex:z,totalItems:i,onPrevious:G,onNext:O,itemLabel:B,subtitle:F,absolute:true})]})});const e=J.create({container:{flex:1,backgroundColor:K.background.base},contentSection:{flex:1,minHeight:0,paddingHorizontal:14,paddingVertical:10},contentScroll:{flex:1},contentScrollInner:{flexGrow:1,paddingHorizontal:14,paddingVertical:10},diffContent:{flex:1,minHeight:0}});
1
+ "use strict";import $,{memo as q}from"react";import{View as l,ScrollView as g,StyleSheet as A}from"react-native";import{macOSColors as J}from"../../gameUI/constants/macOSDesignSystemColors.js";import{EventStepperFooter as K}from"../EventStepperFooter.js";import{ViewToggleCards as Q}from"./ViewToggleCards.js";import{DiffModeTabs as U}from"./DiffModeTabs.js";import{CompareBar as W}from"./CompareBar.js";import{jsx as t,jsxs as s,Fragment as X}from"react/jsx-runtime";function Y({scrolls:a,style:n,children:r}){if(!a)return t(l,{style:n,children:r});return t(g,{keyboardShouldPersistTaps:"handled",style:e.contentScroll,contentContainerStyle:e.contentScrollInner,showsVerticalScrollIndicator:true,children:r})}export const EventHistoryViewer=q(function a({activeView:n,onViewChange:r,currentViewLabel:p,currentViewDescription:S,currentViewIcon:x,diffViewLabel:y,diffViewDescription:b,diffViewIcon:v,renderCurrentView:d,diffModeTabs:o,activeDiffMode:w,onDiffModeChange:f,renderDiffContent:u,leftEvent:C,rightEvent:P,showCompareNavigation:V,onLeftPrevious:L,onLeftNext:H,onRightPrevious:I,onRightNext:N,canLeftPrevious:R,canLeftNext:k,canRightPrevious:E,canRightNext:j,onLeftPickerOpen:D,onRightPickerOpen:_,scrollDiffSection:h,disableInternalFooter:m,footerCurrentIndex:z,footerTotalItems:i,footerItemLabel:B,footerSubtitle:F,onFooterPrevious:G,onFooterNext:O}){const c=d!=null;const T=i<=1;return s(X,{children:[s(l,{style:[e.container,{paddingBottom:!m&&i>1?96:0}],children:[c&&t(Q,{activeView:n,onViewChange:r??(()=>{}),currentLabel:p??"",currentDescription:S??"",currentIcon:x,diffLabel:y,diffDescription:b,diffIcon:v,diffDisabled:T}),c&&n==="current"&&t(g,{keyboardShouldPersistTaps:"handled",style:e.contentScroll,contentContainerStyle:e.contentScrollInner,showsVerticalScrollIndicator:true,children:d?.()}),(!c||n==="diff")&&s(Y,{scrolls:h,style:e.contentSection,children:[o&&o.length>0&&f&&t(U,{tabs:o,activeTab:w??o[0]?.key??"",onTabChange:f}),t(W,{leftEvent:C,rightEvent:P,showNavigation:V,onLeftPrevious:L,onLeftNext:H,onRightPrevious:I,onRightNext:N,canLeftPrevious:R,canLeftNext:k,canRightPrevious:E,canRightNext:j,onLeftPress:D,onRightPress:_}),h?u():t(l,{style:e.diffContent,children:u()})]})]}),!m&&t(K,{currentIndex:z,totalItems:i,onPrevious:G,onNext:O,itemLabel:B,subtitle:F,absolute:true})]})});const e=A.create({container:{flex:1,backgroundColor:J.background.base},contentSection:{flex:1,minHeight:0,paddingHorizontal:14,paddingVertical:10},contentScroll:{flex:1},contentScrollInner:{flexGrow:1,paddingHorizontal:14,paddingVertical:10},diffContent:{flex:1,minHeight:0}});
@@ -1 +1 @@
1
- "use strict";import k,{memo as y}from"react";import{View as a,Text as l,TouchableOpacity as c,ScrollView as p,StyleSheet as w}from"react-native";import{absoluteFill as m}from"../../../utils/absoluteFill.js";import{macOSColors as e}from"../../gameUI/constants/macOSDesignSystemColors.js";import{X as x}from"../../../icons/lucide-icons.js";import{monoFont as s}from"../../fonts.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";export const EventPickerModal=y(function C({isOpen:b,onClose:n,title:h,position:g,items:u,onSelect:f}){if(!b)return null;const d=g==="left";return i(a,{style:t.overlay,children:[r(c,{style:t.backdrop,activeOpacity:1,onPress:n}),i(a,{style:[t.card,d?t.cardLeft:t.cardRight],children:[i(a,{style:t.header,children:[r(l,{style:[t.title,d?t.titleLeft:t.titleRight],children:h}),r(c,{onPress:n,style:t.closeBtn,accessibilityLabel:"Close event picker",children:r(x,{size:16,color:e.text.secondary})})]}),r(a,{style:t.divider}),r(p,{style:t.scroll,contentContainerStyle:t.list,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:u.map(o=>i(c,{disabled:o.disabled,onPress:()=>f(o.index),style:[t.item,o.selected&&t.itemSelected,o.selected&&d&&t.itemSelectedLeft,o.selected&&!d&&t.itemSelectedRight,o.disabled&&t.itemDisabled],children:[r(l,{style:t.itemIndex,children:o.label}),r(l,{style:t.itemTime,children:o.timestamp}),i(l,{style:t.itemRelative,children:["(",o.relativeTime,")"]}),o.badge,o.diffPreview]},o.index))})]})]})});const t=w.create({overlay:{...m,zIndex:20,justifyContent:"center",alignItems:"center"},backdrop:{...m,backgroundColor:"rgba(0,0,0,0.65)"},card:{width:"86%",maxHeight:320,backgroundColor:e.background.card,borderRadius:16,borderWidth:2,padding:16,shadowOffset:{width:0,height:0},shadowOpacity:.5,shadowRadius:40,elevation:15},cardLeft:{borderColor:e.semantic.debug,shadowColor:e.semantic.debug},cardRight:{borderColor:e.semantic.success,shadowColor:e.semantic.success},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},title:{fontSize:13,fontWeight:"700",fontFamily:s,textTransform:"uppercase",marginBottom:8,letterSpacing:.6},titleLeft:{color:e.semantic.debug},titleRight:{color:e.semantic.success},closeBtn:{padding:6,borderRadius:6,backgroundColor:e.background.card,borderWidth:1,borderColor:e.border.default},divider:{height:1,backgroundColor:e.background.input,marginVertical:8},scroll:{maxHeight:260},list:{gap:4},item:{paddingVertical:10,paddingHorizontal:12,borderRadius:10,backgroundColor:e.background.base,borderWidth:1,borderColor:e.border.default,flexDirection:"row",alignItems:"center",gap:8,marginBottom:6},itemSelected:{borderWidth:1.5,shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:12,elevation:4},itemSelectedLeft:{backgroundColor:e.semantic.debug+"1A",borderColor:e.semantic.debug,shadowColor:e.semantic.debug},itemSelectedRight:{backgroundColor:e.semantic.successBackground+"30",borderColor:e.semantic.success,shadowColor:e.semantic.success},itemDisabled:{opacity:.4},itemIndex:{fontSize:10,color:e.text.secondary,fontFamily:s,width:40},itemTime:{fontSize:11,color:e.text.primary,fontFamily:s,flex:1},itemRelative:{fontSize:10,color:e.text.secondary,fontFamily:s}});
1
+ "use strict";import k,{memo as y}from"react";import{View as a,Text as l,TouchableOpacity as c,ScrollView as p,StyleSheet as w}from"react-native";import{absoluteFill as m}from"../../../utils/absoluteFill.js";import{macOSColors as e}from"../../gameUI/constants/macOSDesignSystemColors.js";import{X as x}from"../../../icons/lucide-icons.js";import{monoFont as s}from"../../fonts.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";export const EventPickerModal=y(function C({isOpen:b,onClose:n,title:h,position:g,items:u,onSelect:f}){if(!b)return null;const d=g==="left";return i(a,{style:t.overlay,children:[r(c,{style:t.backdrop,activeOpacity:1,onPress:n}),i(a,{style:[t.card,d?t.cardLeft:t.cardRight],children:[i(a,{style:t.header,children:[r(l,{style:[t.title,d?t.titleLeft:t.titleRight],children:h}),r(c,{onPress:n,style:t.closeBtn,accessibilityLabel:"Close event picker",children:r(x,{size:16,color:e.text.secondary})})]}),r(a,{style:t.divider}),r(p,{keyboardShouldPersistTaps:"handled",style:t.scroll,contentContainerStyle:t.list,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:u.map(o=>i(c,{disabled:o.disabled,onPress:()=>f(o.index),style:[t.item,o.selected&&t.itemSelected,o.selected&&d&&t.itemSelectedLeft,o.selected&&!d&&t.itemSelectedRight,o.disabled&&t.itemDisabled],children:[r(l,{style:t.itemIndex,children:o.label}),r(l,{style:t.itemTime,children:o.timestamp}),i(l,{style:t.itemRelative,children:["(",o.relativeTime,")"]}),o.badge,o.diffPreview]},o.index))})]})]})});const t=w.create({overlay:{...m,zIndex:20,justifyContent:"center",alignItems:"center"},backdrop:{...m,backgroundColor:"rgba(0,0,0,0.65)"},card:{width:"86%",maxHeight:320,backgroundColor:e.background.card,borderRadius:16,borderWidth:2,padding:16,shadowOffset:{width:0,height:0},shadowOpacity:.5,shadowRadius:40,elevation:15},cardLeft:{borderColor:e.semantic.debug,shadowColor:e.semantic.debug},cardRight:{borderColor:e.semantic.success,shadowColor:e.semantic.success},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},title:{fontSize:13,fontWeight:"700",fontFamily:s,textTransform:"uppercase",marginBottom:8,letterSpacing:.6},titleLeft:{color:e.semantic.debug},titleRight:{color:e.semantic.success},closeBtn:{padding:6,borderRadius:6,backgroundColor:e.background.card,borderWidth:1,borderColor:e.border.default},divider:{height:1,backgroundColor:e.background.input,marginVertical:8},scroll:{maxHeight:260},list:{gap:4},item:{paddingVertical:10,paddingHorizontal:12,borderRadius:10,backgroundColor:e.background.base,borderWidth:1,borderColor:e.border.default,flexDirection:"row",alignItems:"center",gap:8,marginBottom:6},itemSelected:{borderWidth:1.5,shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:12,elevation:4},itemSelectedLeft:{backgroundColor:e.semantic.debug+"1A",borderColor:e.semantic.debug,shadowColor:e.semantic.debug},itemSelectedRight:{backgroundColor:e.semantic.successBackground+"30",borderColor:e.semantic.success,shadowColor:e.semantic.success},itemDisabled:{opacity:.4},itemIndex:{fontSize:10,color:e.text.secondary,fontFamily:s,width:40},itemTime:{fontSize:11,color:e.text.primary,fontFamily:s,flex:1},itemRelative:{fontSize:10,color:e.text.secondary,fontFamily:s}});
@@ -1 +1 @@
1
- "use strict";import{useState as F,useRef as W,useCallback as C,useEffect as j}from"react";import{View as d,TouchableOpacity as s,StyleSheet as V,Animated as f,Platform as U}from"react-native";import{X as A,Minus as I,DockBottom as P,FloatWindow as R}from"../../icons/index.js";import{buoyColors as N}from"../gameUI/constants/gameUIColors.js";import{night as e}from"../night/nightTheme.js";import{expandableWindowControlsSupported as X,isExpandableWindowControlsEnabled as Z}from"./windowControlsSetting.js";import{jsx as t,jsxs as w,Fragment as G}from"react/jsx-runtime";export{setExpandableWindowControls}from"./windowControlsSetting.js";const u={close:"#FF5F57",minimize:"#FEBC2E",toggleMode:"#28C840"};const B=12;const H=8;const g=8;const x=36;const q=12;const z=16;const p=8;const J=3e3;export function WindowControls({onClose:b,onMinimize:i,onToggleMode:r,mode:l,variant:D="night",defaultExpanded:h}){const n=l==="floating"?P:R;const E=l==="floating"?"Dock to bottom sheet":"Make floating window";if(!Z()||!X(U.OS==="web")){return w(d,{style:o.container,children:[i&&t(s,{onPress:i,style:[o.dot,o.minimizeDot],activeOpacity:.8,accessibilityLabel:"Minimize modal",accessibilityRole:"button",children:t(I,{size:g,color:"#7A5A00",strokeWidth:1.5})}),r&&t(s,{onPress:r,style:[o.dot,o.expandDot],activeOpacity:.8,accessibilityLabel:E,accessibilityRole:"button",children:t(n,{size:g,color:"#004A1A",strokeWidth:1.5})}),t(s,{onPress:b,style:[o.dot,o.closeDot],activeOpacity:.8,accessibilityLabel:"Close modal",testID:"tool-window-close",accessibilityRole:"button",children:t(A,{size:g,color:"#4A0000",strokeWidth:1.5})})]})}return t(K,{onClose:b,onMinimize:i,onToggleMode:r,mode:l,variant:D,defaultExpanded:h})}function K({onClose:b,onMinimize:i,onToggleMode:r,mode:l,variant:D="night",defaultExpanded:h=false}){const n=D==="night";const[E,O]=F(h);const a=W(new f.Value(h?1:0)).current;const m=W(null);const S=l==="floating"?P:R;const T=l==="floating"?"Dock to bottom sheet":"Make floating window";const c=C(()=>{if(m.current){clearTimeout(m.current);m.current=null}},[]);const y=C(()=>{c();f.spring(a,{toValue:0,tension:200,friction:20,useNativeDriver:false}).start(()=>{O(false)})},[a,c]);const _=C(()=>{O(true);f.spring(a,{toValue:1,tension:180,friction:18,useNativeDriver:false}).start();c();m.current=setTimeout(y,J)},[a,y,c]);j(()=>{return c},[c]);const k=C(M=>{y();M()},[y]);const v=a.interpolate({inputRange:[0,1],outputRange:[.3,1]});const L=a.interpolate({inputRange:[0,.5,1],outputRange:[0,.8,1]});return w(G,{children:[t(s,{onPress:_,activeOpacity:.7,accessibilityLabel:"Open window controls",testID:"tool-window-controls",accessibilityRole:"button",style:o.trigger,hitSlop:{top:8,bottom:8,left:8,right:8},children:w(d,{style:o.container,children:[i&&t(d,{style:[o.dot,o.minimizeDot],children:t(I,{size:g,color:"#7A5A00",strokeWidth:1.5})}),r&&t(d,{style:[o.dot,o.expandDot],children:t(S,{size:g,color:"#004A1A",strokeWidth:1.5})}),t(d,{style:[o.dot,o.closeDot],children:t(A,{size:g,color:"#4A0000",strokeWidth:1.5})})]})}),E&&t(f.View,{style:[o.expandedPanelInline,{transform:[{scale:v}],opacity:L}],children:w(d,{style:[o.expandedContainer,n&&o.nightExpandedContainer],children:[i&&t(s,{onPress:()=>k(i),style:[o.expandedButton,n?o.nightMinimizeButton:o.minimizeButtonExpanded],activeOpacity:.7,accessibilityLabel:"Minimize modal",testID:"tool-window-minimize",accessibilityRole:"button",children:t(I,{size:z,color:n?e.color.warning:"#7A5A00",strokeWidth:2})}),r&&t(s,{onPress:()=>k(r),style:[o.expandedButton,n?o.nightToggleButton:o.expandButtonExpanded],activeOpacity:.7,accessibilityLabel:T,testID:"tool-window-mode",accessibilityRole:"button",children:t(S,{size:z,color:n?e.color.accent:"#004A1A",strokeWidth:2})}),t(s,{onPress:()=>k(b),style:[o.expandedButton,n?o.nightCloseButton:o.closeButtonExpanded],activeOpacity:.7,accessibilityLabel:"Close modal",testID:"tool-window-close",accessibilityRole:"button",children:t(A,{size:z,color:n?e.color.danger:"#4A0000",strokeWidth:2})})]})})]})}const o=V.create({trigger:{padding:2},container:{flexDirection:"row",alignItems:"center",gap:H},dot:{width:B,height:B,borderRadius:B/2,alignItems:"center",justifyContent:"center"},closeDot:{backgroundColor:u.close},minimizeDot:{backgroundColor:u.minimize},expandDot:{backgroundColor:u.toggleMode},expandedPanelInline:{position:"absolute",top:-p,right:-p,zIndex:9999},expandedContainer:{flexDirection:"row",alignItems:"center",gap:q,backgroundColor:N.card,borderRadius:(x+p*2)/2,paddingHorizontal:p,paddingVertical:p,borderWidth:1,borderColor:N.border,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.4,shadowRadius:12,elevation:30},expandedButton:{width:x,height:x,borderRadius:x/2,alignItems:"center",justifyContent:"center"},closeButtonExpanded:{backgroundColor:u.close},minimizeButtonExpanded:{backgroundColor:u.minimize},expandButtonExpanded:{backgroundColor:u.toggleMode},nightExpandedContainer:{backgroundColor:e.color.surface,borderColor:e.color.border},nightMinimizeButton:{backgroundColor:e.color.warningSoft,borderWidth:1,borderColor:e.color.warning+"59"},nightToggleButton:{backgroundColor:e.color.accentSoft,borderWidth:1,borderColor:e.color.accentBorderStrong},nightCloseButton:{backgroundColor:e.color.dangerSoft,borderWidth:1,borderColor:e.color.danger+"59"}});
1
+ "use strict";import{useState as F,useRef as W,useCallback as C,useEffect as j}from"react";import{View as d,TouchableOpacity as s,StyleSheet as V,Animated as f,Platform as U,Keyboard as X}from"react-native";import{X as A,Minus as I,DockBottom as P,FloatWindow as R}from"../../icons/index.js";import{buoyColors as N}from"../gameUI/constants/gameUIColors.js";import{night as e}from"../night/nightTheme.js";import{expandableWindowControlsSupported as Z,isExpandableWindowControlsEnabled as G}from"./windowControlsSetting.js";import{jsx as t,jsxs as w,Fragment as H}from"react/jsx-runtime";export{setExpandableWindowControls}from"./windowControlsSetting.js";const u={close:"#FF5F57",minimize:"#FEBC2E",toggleMode:"#28C840"};const B=12;const K=8;const g=8;const x=36;const q=12;const z=16;const b=8;const J=3e3;export function WindowControls({onClose:p,onMinimize:i,onToggleMode:r,mode:l,variant:D="night",defaultExpanded:h}){const n=l==="floating"?P:R;const E=l==="floating"?"Dock to bottom sheet":"Make floating window";if(!G()||!Z(U.OS==="web")){return w(d,{style:o.container,children:[i&&t(s,{onPress:i,style:[o.dot,o.minimizeDot],activeOpacity:.8,accessibilityLabel:"Minimize modal",accessibilityRole:"button",children:t(I,{size:g,color:"#7A5A00",strokeWidth:1.5})}),r&&t(s,{onPress:r,style:[o.dot,o.expandDot],activeOpacity:.8,accessibilityLabel:E,accessibilityRole:"button",children:t(n,{size:g,color:"#004A1A",strokeWidth:1.5})}),t(s,{onPress:p,style:[o.dot,o.closeDot],activeOpacity:.8,accessibilityLabel:"Close modal",testID:"tool-window-close",accessibilityRole:"button",children:t(A,{size:g,color:"#4A0000",strokeWidth:1.5})})]})}return t(Q,{onClose:p,onMinimize:i,onToggleMode:r,mode:l,variant:D,defaultExpanded:h})}function Q({onClose:p,onMinimize:i,onToggleMode:r,mode:l,variant:D="night",defaultExpanded:h=false}){const n=D==="night";const[E,O]=F(h);const a=W(new f.Value(h?1:0)).current;const m=W(null);const S=l==="floating"?P:R;const T=l==="floating"?"Dock to bottom sheet":"Make floating window";const c=C(()=>{if(m.current){clearTimeout(m.current);m.current=null}},[]);const y=C(()=>{c();f.spring(a,{toValue:0,tension:200,friction:20,useNativeDriver:false}).start(()=>{O(false)})},[a,c]);const _=C(()=>{X.dismiss();O(true);f.spring(a,{toValue:1,tension:180,friction:18,useNativeDriver:false}).start();c();m.current=setTimeout(y,J)},[a,y,c]);j(()=>{return c},[c]);const k=C(M=>{y();M()},[y]);const v=a.interpolate({inputRange:[0,1],outputRange:[.3,1]});const L=a.interpolate({inputRange:[0,.5,1],outputRange:[0,.8,1]});return w(H,{children:[t(s,{onPress:_,activeOpacity:.7,accessibilityLabel:"Open window controls",testID:"tool-window-controls",accessibilityRole:"button",style:o.trigger,hitSlop:{top:8,bottom:8,left:8,right:8},children:w(d,{style:o.container,children:[i&&t(d,{style:[o.dot,o.minimizeDot],children:t(I,{size:g,color:"#7A5A00",strokeWidth:1.5})}),r&&t(d,{style:[o.dot,o.expandDot],children:t(S,{size:g,color:"#004A1A",strokeWidth:1.5})}),t(d,{style:[o.dot,o.closeDot],children:t(A,{size:g,color:"#4A0000",strokeWidth:1.5})})]})}),E&&t(f.View,{style:[o.expandedPanelInline,{transform:[{scale:v}],opacity:L}],children:w(d,{style:[o.expandedContainer,n&&o.nightExpandedContainer],children:[i&&t(s,{onPress:()=>k(i),style:[o.expandedButton,n?o.nightMinimizeButton:o.minimizeButtonExpanded],activeOpacity:.7,accessibilityLabel:"Minimize modal",testID:"tool-window-minimize",accessibilityRole:"button",children:t(I,{size:z,color:n?e.color.warning:"#7A5A00",strokeWidth:2})}),r&&t(s,{onPress:()=>k(r),style:[o.expandedButton,n?o.nightToggleButton:o.expandButtonExpanded],activeOpacity:.7,accessibilityLabel:T,testID:"tool-window-mode",accessibilityRole:"button",children:t(S,{size:z,color:n?e.color.accent:"#004A1A",strokeWidth:2})}),t(s,{onPress:()=>k(p),style:[o.expandedButton,n?o.nightCloseButton:o.closeButtonExpanded],activeOpacity:.7,accessibilityLabel:"Close modal",testID:"tool-window-close",accessibilityRole:"button",children:t(A,{size:z,color:n?e.color.danger:"#4A0000",strokeWidth:2})})]})})]})}const o=V.create({trigger:{padding:2},container:{flexDirection:"row",alignItems:"center",gap:K},dot:{width:B,height:B,borderRadius:B/2,alignItems:"center",justifyContent:"center"},closeDot:{backgroundColor:u.close},minimizeDot:{backgroundColor:u.minimize},expandDot:{backgroundColor:u.toggleMode},expandedPanelInline:{position:"absolute",top:-b,right:-b,zIndex:9999},expandedContainer:{flexDirection:"row",alignItems:"center",gap:q,backgroundColor:N.card,borderRadius:(x+b*2)/2,paddingHorizontal:b,paddingVertical:b,borderWidth:1,borderColor:N.border,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.4,shadowRadius:12,elevation:30},expandedButton:{width:x,height:x,borderRadius:x/2,alignItems:"center",justifyContent:"center"},closeButtonExpanded:{backgroundColor:u.close},minimizeButtonExpanded:{backgroundColor:u.minimize},expandButtonExpanded:{backgroundColor:u.toggleMode},nightExpandedContainer:{backgroundColor:e.color.surface,borderColor:e.color.border},nightMinimizeButton:{backgroundColor:e.color.warningSoft,borderWidth:1,borderColor:e.color.warning+"59"},nightToggleButton:{backgroundColor:e.color.accentSoft,borderWidth:1,borderColor:e.color.accentBorderStrong},nightCloseButton:{backgroundColor:e.color.dangerSoft,borderWidth:1,borderColor:e.color.danger+"59"}});
@@ -1 +1 @@
1
- "use strict";import{useEffect as T,useMemo as mt,useRef as L,useState as F,useContext as Ot,createContext as At,useCallback as X,Children as gt}from"react";import{Animated as N,Dimensions as ct,useWindowDimensions as Et,View as Y,Text as yt,TouchableOpacity as Xt}from"react-native";import{night as W}from"../night/nightTheme.js";import{DraggableHeader as xt}from"../components/DraggableHeader.js";import{EnvironmentSelectorInline as Nt}from"../../env/EnvironmentSelectorInline";import{GripVerticalIcon as Yt}from"../components/GripVerticalIcon.js";import{buoyColors as V}from"../gameUI/constants/gameUIColors.js";import{getSafeAreaInsets as bt,persistentStorage as ot}from"../../utils/index.js";import{useSafeAreaInsets as Wt}from"../../hooks/index.js";import{calculateTargetPosition as zt}from"./onboardingConstants";import{getUserStatusConfig as Ht,filterValidChildren as Ut,floatingToolsColors as pt}from"@buoy-gg/floating-tools-core";import{jsx as R,jsxs as k}from"react/jsx-runtime";const it={BUBBLE_POSITION_X:"@react_buoy_bubble_position_x",BUBBLE_POSITION_Y:"@react_buoy_bubble_position_y"};const $=32;const y=20;const Ft=150;const C=u=>u.__getValue();function $t({animatedPosition:u,bubbleWidth:_=100,bubbleHeight:g=32,enabled:a=true,visibleHandleWidth:v=32,listenersSuspended:z=false,defaultPlacement:H="top",onPositionLoaded:Q,storageKey:p}){const[U,I]=F(false);const D=L(void 0);const x=L(true);T(()=>{x.current=true;return()=>{x.current=false;if(D.current){clearTimeout(D.current);D.current=void 0}}},[]);const O=X(async(c,m)=>{if(!a)return;if(!x.current)return;const{width:t}=ct.get("window");if(t<=0||c<0||m<0)return;try{await Promise.all([ot.setItem(p?`${p}:x`:it.BUBBLE_POSITION_X,c.toString()),ot.setItem(p?`${p}:y`:it.BUBBLE_POSITION_Y,m.toString())])}catch(o){}},[a,p]);const j=X((c,m)=>{if(!x.current)return;if(D.current)clearTimeout(D.current);D.current=setTimeout(()=>{if(x.current){O(c,m)}},500)},[O]);const G=X(async()=>{if(!a)return null;try{const[c,m]=await Promise.all([ot.getItem(p?`${p}:x`:it.BUBBLE_POSITION_X),ot.getItem(p?`${p}:y`:it.BUBBLE_POSITION_Y)]);if(c!==null&&m!==null){const t=parseFloat(c);const o=parseFloat(m);if(!Number.isNaN(t)&&!Number.isNaN(o)){return{x:t,y:o}}}}catch(c){}return null},[a,p]);const P=X(c=>{const{width:m,height:t}=ct.get("window");const o=bt();if(m<=0||t<=0){return{...c,isValid:false}}const A=o.left;const e=m-v;const E=o.top+y;const l=t-g-o.bottom;const d={x:Math.max(A,Math.min(c.x,e)),y:Math.max(E,Math.min(c.y,l)),isValid:true};return d},[v,g]);T(()=>{if(!a||U)return;let c=false;const m=async()=>{const t=await G();if(c||!x.current)return;const{width:o,height:A}=ct.get("window");const e=bt();if(o<=0||A<=0){setTimeout(()=>{if(x.current&&!c){m()}},100);return}let E;let l=false;if(t){const d=P(t);if(!d.isValid){setTimeout(()=>{if(x.current&&!c){m()}},100);return}const Z=Math.abs(t.x-d.x)>5||Math.abs(t.y-d.y)>5;if(Z){await O(d.x,d.y)}E={x:d.x,y:d.y};l=d.x>=o-v-5}else{const d=H==="bottom"?Math.max(e.top+y,A-g-e.bottom-y):Math.max(e.top+y,Math.min(100,A-g-e.bottom));E={x:o-_-y,y:d}}if(c||!x.current)return;u.setValue(E);I(true);Q?.(E,l)};m();return()=>{c=true}},[a,U,u,G,P,O,_,g,v,Q]);T(()=>{if(!a||!U||z)return;const c=u.addListener(m=>{j(m.x,m.y)});return()=>{u.removeListener(c);if(D.current){clearTimeout(D.current);D.current=void 0}}},[a,U,z,u,j]);return{savePosition:O,isInitialized:U}}export function Divider(){const u={width:1,height:12,backgroundColor:V.textMuted+"66",flexShrink:0};return R(Y,{style:u})}const jt={success:"#20C997",warning:"#FFA94D",error:"#EF4444",muted:V.textMuted,secondary:V.textSecondary,info:"#20C997",primary:"#20C997",optional:V.textSecondary};function kt(u){return Ht(u,jt)}const wt=At({isDragging:false});export function UserStatus({userRole:u,onPress:_}){const{isDragging:g}=Ot(wt);const a=kt(u);const v={flexDirection:"row",alignItems:"center",paddingVertical:6,paddingHorizontal:8,flexShrink:0};const z={width:6,height:6,borderRadius:3,backgroundColor:a.dotColor,marginRight:4};const H={fontSize:10,fontWeight:"500",color:a.textColor,letterSpacing:.3};if(!_){return k(Y,{style:v,accessibilityLabel:`User status: ${a.label}`,children:[R(Y,{style:z}),R(yt,{style:H,children:a.label})]})}return k(Xt,{accessibilityRole:"button",accessibilityLabel:"Open Dev Tools Menu",testID:"open-dev-tools-button",onPress:_,hitSlop:{top:10,bottom:10,left:0,right:10},disabled:g,activeOpacity:.85,style:v,children:[R(Y,{style:z}),R(yt,{style:H,children:a.label})]})}function Gt(u){const _=Ut(u);const g=[];_.forEach((a,v)=>{g.push(a);if(v<_.length-1)g.push(R(Divider,{},`divider-${v}`))});return g}export function FloatingTool({id:u,suspendPointerEvents:_=false,revealToken:g,variant:a="bubble",dragFromSurface:v=false,accessibilityLabel:z="Move dev tools bubble",minimizedStack:H,hasMinimizedStack:Q=false,accessory:p,handleAdornment:U,enablePositionPersistence:I=true,defaultPlacement:D="top",pushToSide:x=false,centerOnboarding:O=false,children:j,environment:G,availableEnvironments:P,onEnvironmentSwitch:c,showEnvironmentSelector:m=false}){const t=L(new N.ValueXY).current;const[o,A]=F(false);const[e,E]=F({width:100,height:32});const[l,d]=F(false);const[Z,St]=F(0);const[vt,It]=F(false);const f=L(null);const K=L(false);const q=L(false);const ut=L(x);const J=L(null);const[tt,Dt]=F(false);const h=Wt();const{width:i,height:S}=Et();const Mt=X((n,r)=>{if(r){d(true)}},[]);const{savePosition:w,isInitialized:B}=$t({animatedPosition:t,bubbleWidth:e.width,bubbleHeight:e.height,enabled:I,visibleHandleWidth:$,listenersSuspended:o,defaultPlacement:D,onPositionLoaded:Mt,storageKey:u?`@buoy/floating-tool/${u}`:void 0});T(()=>{if(I&&!B)return;if(!ut.current&&x){q.current=false}ut.current=x;if(x&&!l&&!o&&!q.current){const n=C(t.x);const r=C(t.y);f.current={x:n,y:r};const s=i-$;K.current=true;d(true);N.timing(t,{toValue:{x:s,y:r},duration:200,useNativeDriver:false}).start(()=>{w(s,r)})}else if(!x&&l&&K.current){if(f.current){const{x:n,y:r}=f.current;K.current=false;q.current=false;d(false);N.timing(t,{toValue:{x:n,y:r},duration:200,useNativeDriver:false}).start(()=>{w(n,r)})}}},[I,B,x,l,o,i,t,w]);T(()=>{if(!B||tt)return;const n=setTimeout(()=>{J.current=e.width;Dt(true);if(!l&&!o){const r=C(t.x);const s=i-e.width-y;if(r>s){const b=Math.max(h.left,s);const M=C(t.y);t.setValue({x:b,y:M});w(b,M)}}},Ft);return()=>clearTimeout(n)},[B,tt,e.width]);T(()=>{if(!B)return;if(!tt)return;if(J.current===null)return;if(o){J.current=e.width;return}const n=J.current;const r=e.width;const s=r-n;if(Math.abs(s)<2){return}J.current=r;if(l){if(f.current){const Vt=f.current.x-s;f.current.x=Math.max(h.left,Math.min(Vt,i-r-y))}return}const b=C(t.x);const M=C(t.y);const et=b-s;const rt=Math.max(h.left,Math.min(et,i-$));if(Math.abs(rt-b)>1){N.timing(t,{toValue:{x:rt,y:M},duration:150,useNativeDriver:false}).start(()=>{w(rt,M);if(f.current){f.current.x=rt}})}},[e.width,B,tt,o,l,t,i,h.left,w]);T(()=>{if(!I){if(O){const n=zt();const r=(i-e.width)/2;const s=S-e.height-n;t.setValue({x:r,y:s})}else{const n=D==="bottom"?Math.max(h.top+y,S-e.height-h.bottom-y):Math.max(h.top+y,Math.min(100,S-e.height-h.bottom));t.setValue({x:i-e.width-y,y:n})}}},[I,O,t,e.width,e.height,h.top,h.bottom,i,S]);const nt=X(()=>{const n=C(t.x);const r=C(t.y);const s=n>i-e.width/2;if(l||s){let b;let M;if(f.current&&f.current.x<i-e.width/2){b=f.current.x;M=f.current.y}else{b=i-e.width-y;M=r}K.current=false;q.current=true;d(false);N.timing(t,{toValue:{x:b,y:M},duration:200,useNativeDriver:false}).start(()=>{w(b,M)})}else{f.current={x:n,y:r};q.current=false;const b=i-$;d(true);N.timing(t,{toValue:{x:b,y:r},duration:200,useNativeDriver:false}).start(()=>{w(b,r)})}},[t,l,e.width,w,i]);const lt=X(()=>{A(true)},[]);const dt=X(n=>{let{x:r,y:s}=n;const b=r+e.width/2;const M=b>i;if(M){const et=i-$;d(true);if(f.current){f.current.y=s}else{f.current={x:i-e.width-y,y:s}}N.timing(t,{toValue:{x:et,y:s},duration:200,useNativeDriver:false}).start(()=>{w(et,s)})}else{if(l&&r<i-$-10){d(false)}if(r<i-e.width/2){f.current={x:r,y:s}}w(r,s)}A(false)},[t,e.width,l,w,i]);const st=L({width:i,height:S});T(()=>{if(I&&!B)return;if(st.current.width===i&&st.current.height===S)return;st.current={width:i,height:S};const n=s=>({x:Math.max(h.left,Math.min(s.x,i-e.width-y)),y:Math.max(h.top+y,Math.min(s.y,S-e.height-h.bottom))});const r=n({x:C(t.x),y:C(t.y)});if(l)r.x=i-$;if(f.current)f.current=n(f.current);t.stopAnimation();t.setValue(r);void w(r.x,r.y)},[i,S,B,I,e,h,l,t,w]);const ft=Boolean(p);T(()=>{if(!ft)return;const n=({y:s})=>It(s+e.height+Z>S-h.bottom);n({y:C(t.y)});const r=t.addListener(n);return()=>t.removeListener(r)},[t,e.height,Z,S,h.bottom,ft]);const Rt=mt(()=>({position:"absolute",zIndex:1001,transform:t.getTranslateTransform()}),[t]);const ht=L(void 0);T(()=>{if(I&&!B)return;if(ht.current===g)return;ht.current=g;if(g!==void 0&&g>0&&l)nt()},[g,B,I,l,nt]);const at=Q;const Bt={flexDirection:"row",alignItems:"center",backgroundColor:V.card,borderTopLeftRadius:at?0:6,borderTopRightRadius:6,borderBottomLeftRadius:6,borderBottomRightRadius:6,borderLeftWidth:o?2:1,borderRightWidth:o?2:1,borderBottomWidth:o?2:1,borderTopWidth:o?2:at?0:1,borderColor:o?pt.dragActive:V.textMuted+"66",overflow:"visible",elevation:8,shadowColor:o?pt.dragActive+"99":"#000",shadowOffset:{width:0,height:o?6:4},shadowOpacity:o?.6:.3,shadowRadius:o?12:8,...a==="strip"?{borderRadius:W.radius.card,borderTopLeftRadius:W.radius.card,borderTopRightRadius:W.radius.card,borderBottomLeftRadius:W.radius.card,borderBottomRightRadius:W.radius.card,minHeight:48,backgroundColor:W.color.surface,borderColor:o?W.color.accentBorderStrong:W.color.separator,shadowOpacity:.24,shadowRadius:16}:{}};const Ct={paddingHorizontal:6,paddingVertical:6,backgroundColor:V.textMuted+"1A",alignItems:"center",justifyContent:"center",width:32,...a==="strip"?{minHeight:48}:{},borderRightWidth:1,borderRightColor:V.textMuted+"66",borderTopLeftRadius:at?0:void 0,...a==="strip"?{backgroundColor:"transparent",borderRightWidth:0}:{}};const _t={flexDirection:"row",alignItems:"center",gap:6,paddingRight:8};const Tt=mt(()=>a==="strip"?gt.toArray(j):Gt(gt.toArray(j)),[j,a]);const Lt=32;if(I&&!B){return null}return R(N.View,{pointerEvents:_?"none":"box-none",testID:u??"buoy-floating-tool",style:Rt,children:k(Y,{style:{overflow:"visible"},children:[H&&R(Y,{style:{position:"absolute",bottom:"100%",left:0,width:Lt,overflow:"visible",zIndex:1001},children:H}),k(xt,{position:t,enabled:v,claimOnMove:false,onDragStart:lt,onDragEnd:dt,containerBounds:{width:i,height:S},elementSize:e,minPosition:{x:h.left,y:h.top+y},maxOverflowX:e.width,hitSlop:{top:10,bottom:10,left:10,right:10},style:Bt,onLayout:n=>{const{width:r,height:s}=n.nativeEvent.layout;E({width:r,height:s})},children:[k(xt,{position:t,testID:u?`${u}-grip`:"buoy-floating-grip",accessibilityLabel:z,onDragStart:lt,onDragEnd:dt,onTap:nt,containerBounds:{width:i,height:S},elementSize:e,minPosition:{x:h.left,y:h.top+y},style:Ct,enabled:true,maxOverflowX:e.width,children:[R(Yt,{size:a==="strip"?20:12,color:V.textSecondary+"CC"}),U]}),R(wt.Provider,{value:{isDragging:o},children:k(Y,{style:_t,children:[m&&G&&P&&c&&R(Nt,{currentEnvironment:G,availableEnvironments:P,onSelect:c}),Tt]})})]}),!l&&p&&R(Y,{onLayout:n=>St(n.nativeEvent.layout.height),style:{position:"absolute",...vt?{bottom:"100%"}:{top:"100%"},left:0,width:"100%",zIndex:1002},children:p})]})})}export function getBubbleAnchorPosition(){return null}
1
+ "use strict";import{useEffect as _,useMemo as pt,useRef as V,useState as N,useContext as Xt,createContext as Yt,useCallback as W,Children as bt}from"react";import{Animated as z,Dimensions as dt,useWindowDimensions as Nt,View as H,Text as wt,TouchableOpacity as Wt}from"react-native";import{night as U}from"../night/nightTheme.js";import{DraggableHeader as St}from"../components/DraggableHeader.js";import{EnvironmentSelectorInline as zt}from"../../env/EnvironmentSelectorInline";import{GripVerticalIcon as Ht}from"../components/GripVerticalIcon.js";import{buoyColors as A}from"../gameUI/constants/gameUIColors.js";import{getSafeAreaInsets as vt,persistentStorage as it}from"../../utils/index.js";import{useSafeAreaInsets as Ut}from"../../hooks/index.js";import{calculateTargetPosition as Ft}from"./onboardingConstants";import{getUserStatusConfig as $t,filterValidChildren as jt,floatingToolsColors as It}from"@buoy-gg/floating-tools-core";import{jsx as R,jsxs as J}from"react/jsx-runtime";const st={BUBBLE_POSITION_X:"@react_buoy_bubble_position_x",BUBBLE_POSITION_Y:"@react_buoy_bubble_position_y"};const G=32;const d=20;const kt=150;const S=f=>f.__getValue();function Gt({animatedPosition:f,bubbleWidth:T=100,bubbleHeight:x=32,enabled:u=true,visibleHandleWidth:M=32,listenersSuspended:F=false,skipAutoSaveRef:E,defaultPlacement:at="top",bottomClearance:Q=0,onPositionLoaded:nt,storageKey:h}){const[B,$]=N(false);const y=V(void 0);const D=V(true);_(()=>{D.current=true;return()=>{D.current=false;if(y.current){clearTimeout(y.current);y.current=void 0}}},[]);const C=W(async(l,t)=>{if(!u)return;if(!D.current)return;const{width:o}=dt.get("window");if(o<=0||l<0||t<0)return;try{await Promise.all([it.setItem(h?`${h}:x`:st.BUBBLE_POSITION_X,l.toString()),it.setItem(h?`${h}:y`:st.BUBBLE_POSITION_Y,t.toString())])}catch(v){}},[u,h]);const Z=W((l,t)=>{if(!D.current)return;if(y.current)clearTimeout(y.current);y.current=setTimeout(()=>{if(D.current){C(l,t)}},500)},[C]);const K=W(async()=>{if(!u)return null;try{const[l,t]=await Promise.all([it.getItem(h?`${h}:x`:st.BUBBLE_POSITION_X),it.getItem(h?`${h}:y`:st.BUBBLE_POSITION_Y)]);if(l!==null&&t!==null){const o=parseFloat(l);const v=parseFloat(t);if(!Number.isNaN(o)&&!Number.isNaN(v)){return{x:o,y:v}}}}catch(l){}return null},[u,h]);const tt=W(l=>{const{width:t,height:o}=dt.get("window");const v=vt();if(t<=0||o<=0){return{...l,isValid:false}}const e=v.left;const X=t-M;const L=v.top+d;const P=o-x-v.bottom;const n={x:Math.max(e,Math.min(l.x,X)),y:Math.max(L,Math.min(l.y,P)),isValid:true};return n},[M,x]);_(()=>{if(!u||B)return;let l=false;const t=async()=>{const o=await K();if(l||!D.current)return;const{width:v,height:e}=dt.get("window");const X=vt();if(v<=0||e<=0){setTimeout(()=>{if(D.current&&!l){t()}},100);return}let L;let P=false;if(o){const n=tt(o);if(!n.isValid){setTimeout(()=>{if(D.current&&!l){t()}},100);return}const O=Math.abs(o.x-n.x)>5||Math.abs(o.y-n.y)>5;if(O){await C(n.x,n.y)}L={x:n.x,y:n.y};P=n.x>=v-M-5}else{const n=at==="bottom"?Math.max(X.top+d,e-x-X.bottom-d-Q):Math.max(X.top+d,Math.min(100,e-x-X.bottom));L={x:v-T-d,y:n}}if(l||!D.current)return;f.setValue(L);$(true);nt?.(L,P)};t();return()=>{l=true}},[u,B,f,K,tt,C,T,x,M,nt]);_(()=>{if(!u||!B||F)return;const l=f.addListener(t=>{if(E?.current)return;Z(t.x,t.y)});return()=>{f.removeListener(l);if(y.current){clearTimeout(y.current);y.current=void 0}}},[u,B,F,E,f,Z]);return{savePosition:C,isInitialized:B}}export function Divider(){const f={width:1,height:12,backgroundColor:A.textMuted+"66",flexShrink:0};return R(H,{style:f})}const Pt={success:"#20C997",warning:"#FFA94D",error:"#EF4444",muted:A.textMuted,secondary:A.textSecondary,info:"#20C997",primary:"#20C997",optional:A.textSecondary};function qt(f){return $t(f,Pt)}const Mt=Yt({isDragging:false});export function UserStatus({userRole:f,onPress:T}){const{isDragging:x}=Xt(Mt);const u=qt(f);const M={flexDirection:"row",alignItems:"center",paddingVertical:6,paddingHorizontal:8,flexShrink:0};const F={width:6,height:6,borderRadius:3,backgroundColor:u.dotColor,marginRight:4};const E={fontSize:10,fontWeight:"500",color:u.textColor,letterSpacing:.3};if(!T){return J(H,{style:M,accessibilityLabel:`User status: ${u.label}`,children:[R(H,{style:F}),R(wt,{style:E,children:u.label})]})}return J(Wt,{accessibilityRole:"button",accessibilityLabel:"Open Dev Tools Menu",testID:"open-dev-tools-button",onPress:T,hitSlop:{top:10,bottom:10,left:0,right:10},disabled:x,activeOpacity:.85,style:M,children:[R(H,{style:F}),R(wt,{style:E,children:u.label})]})}function Jt(f){const T=jt(f);const x=[];T.forEach((u,M)=>{x.push(u);if(M<T.length-1)x.push(R(Divider,{},`divider-${M}`))});return x}export function FloatingTool({id:f,suspendPointerEvents:T=false,revealToken:x,variant:u="bubble",dragFromSurface:M=false,accessibilityLabel:F="Move dev tools bubble",minimizedStack:E,hasMinimizedStack:at=false,accessory:Q,handleAdornment:nt,enablePositionPersistence:h=true,defaultPlacement:B="top",bottomClearance:$=0,pushToSide:y=false,centerOnboarding:D=false,children:C,environment:Z,availableEnvironments:K,onEnvironmentSwitch:tt,showEnvironmentSelector:l=false}){const t=V(new z.ValueXY).current;const[o,v]=N(false);const[e,X]=N({width:100,height:32});const[L,P]=N(false);const[n,O]=N(false);const[ft,Dt]=N(0);const[Rt,Bt]=N(false);const g=V(null);const Y=V(false);const et=V(false);const ht=V(y);const rt=V(null);const[q,_t]=N(false);const c=Ut();const{width:a,height:p}=Nt();const Tt=W((i,r)=>{if(r){O(true)}},[]);const{savePosition:b,isInitialized:I}=Gt({animatedPosition:t,bubbleWidth:e.width,bubbleHeight:e.height,enabled:h,visibleHandleWidth:G,listenersSuspended:o,skipAutoSaveRef:Y,defaultPlacement:B,bottomClearance:$,onPositionLoaded:Tt,storageKey:f?`@buoy/floating-tool/${f}`:void 0});_(()=>{if(h&&!I)return;if(!ht.current&&y){et.current=false}ht.current=y;if(y&&!n&&!o&&!et.current){const i=S(t.x);const r=S(t.y);g.current={x:i,y:r};const s=a-G;Y.current=true;O(true);z.timing(t,{toValue:{x:s,y:r},duration:200,useNativeDriver:false}).start()}else if(!y&&n&&Y.current){if(g.current){const{x:i,y:r}=g.current;Y.current=false;et.current=false;O(false);z.timing(t,{toValue:{x:i,y:r},duration:200,useNativeDriver:false}).start(()=>{b(i,r)})}}},[h,I,y,n,o,a,t,b]);_(()=>{if(!I||q)return;const i=setTimeout(()=>{rt.current=e.width;_t(true);if(!n&&!o){const r=S(t.x);const s=a-e.width-d;if(r>s){const m=Math.max(c.left,s);const w=S(t.y);t.setValue({x:m,y:w});b(m,w)}}},kt);return()=>clearTimeout(i)},[I,q,e.width]);_(()=>{if(!I||!q||n||o)return;const i=S(t.y);const r=p-e.height-c.bottom-d-(B==="bottom"?$:0);if(i<=r)return;const s=S(t.x);const m=Math.max(c.top+d,r);t.setValue({x:s,y:m});b(s,m)},[I,q,n,o,e.height,p,c.top,c.bottom,$,B]);_(()=>{if(!I)return;if(!q)return;if(rt.current===null)return;if(o){rt.current=e.width;return}const i=rt.current;const r=e.width;const s=r-i;if(Math.abs(s)<2){return}rt.current=r;if(n){if(g.current){const ot=g.current.x-s;g.current.x=Math.max(c.left,Math.min(ot,a-r-d))}return}const m=S(t.x);const w=S(t.y);const j=m-s;const k=Math.max(c.left,Math.min(j,a-G));if(Math.abs(k-m)>1){z.timing(t,{toValue:{x:k,y:w},duration:150,useNativeDriver:false}).start(()=>{b(k,w);if(g.current){g.current.x=k}})}},[e.width,I,q,o,n,t,a,c.left,b]);_(()=>{if(!h){if(D){const i=Ft();const r=(a-e.width)/2;const s=p-e.height-i;t.setValue({x:r,y:s})}else{const i=B==="bottom"?Math.max(c.top+d,p-e.height-c.bottom-d-$):Math.max(c.top+d,Math.min(100,p-e.height-c.bottom));t.setValue({x:a-e.width-d,y:i})}}},[h,D,t,e.width,e.height,c.top,c.bottom,a,p]);const ct=W(()=>{const i=S(t.x);const r=S(t.y);const s=i>a-e.width/2;if(n||s){let m;let w;if(g.current&&g.current.x<a-e.width/2){m=g.current.x;w=g.current.y}else{m=a-e.width-d;w=r}Y.current=false;et.current=true;O(false);z.timing(t,{toValue:{x:m,y:w},duration:200,useNativeDriver:false}).start(()=>{b(m,w)})}else{g.current={x:i,y:r};et.current=false;const m=a-G;O(true);z.timing(t,{toValue:{x:m,y:r},duration:200,useNativeDriver:false}).start(()=>{b(m,r)})}},[t,n,e.width,b,a]);const mt=W(()=>{v(true)},[]);const gt=W(i=>{let{x:r,y:s}=i;const m=r+e.width/2;const w=m>a;if(w){const j=a-G;O(true);if(g.current){g.current.y=s}else{g.current={x:a-e.width-d,y:s}}z.timing(t,{toValue:{x:j,y:s},duration:200,useNativeDriver:false}).start(()=>{b(j,s)})}else{if(n&&r<a-G-10){O(false);Y.current=false}if(r<a-e.width/2){g.current={x:r,y:s}}b(r,s)}v(false)},[t,e.width,n,b,a]);const ut=V({width:a,height:p});_(()=>{if(h&&!I)return;if(ut.current.width===a&&ut.current.height===p)return;ut.current={width:a,height:p};const i=s=>({x:Math.max(c.left,Math.min(s.x,a-e.width-d)),y:Math.max(c.top+d,Math.min(s.y,p-e.height-c.bottom))});const r=i({x:S(t.x),y:S(t.y)});if(n)r.x=a-G;if(g.current)g.current=i(g.current);t.stopAnimation();t.setValue(r);if(Y.current)return;void b(r.x,r.y)},[a,p,I,h,e,c,n,t,b]);const xt=Boolean(Q);_(()=>{if(!xt)return;const i=({y:s})=>Bt(s+e.height+ft>p-c.bottom);i({y:S(t.y)});const r=t.addListener(i);return()=>t.removeListener(r)},[t,e.height,ft,p,c.bottom,xt]);const Lt=pt(()=>({position:"absolute",zIndex:1001,opacity:L?1:0,transform:t.getTranslateTransform()}),[t,L]);const yt=V(void 0);_(()=>{if(h&&!I)return;if(yt.current===x)return;yt.current=x;if(x!==void 0&&x>0&&n)ct()},[x,I,h,n,ct]);const lt=at;const Vt={flexDirection:"row",alignItems:"center",backgroundColor:A.card,borderTopLeftRadius:lt?0:6,borderTopRightRadius:6,borderBottomLeftRadius:6,borderBottomRightRadius:6,borderLeftWidth:o?2:1,borderRightWidth:o?2:1,borderBottomWidth:o?2:1,borderTopWidth:o?2:lt?0:1,borderColor:o?It.dragActive:A.textMuted+"66",overflow:"visible",elevation:8,shadowColor:o?It.dragActive+"99":"#000",shadowOffset:{width:0,height:o?6:4},shadowOpacity:o?.6:.3,shadowRadius:o?12:8,...u==="strip"?{borderRadius:U.radius.card,borderTopLeftRadius:U.radius.card,borderTopRightRadius:U.radius.card,borderBottomLeftRadius:U.radius.card,borderBottomRightRadius:U.radius.card,minHeight:48,backgroundColor:U.color.surface,borderColor:o?U.color.accentBorderStrong:U.color.separator,shadowOpacity:.24,shadowRadius:16}:{}};const Ct={paddingHorizontal:6,paddingVertical:6,backgroundColor:A.textMuted+"1A",alignItems:"center",justifyContent:"center",width:32,...u==="strip"?{minHeight:48}:{},borderRightWidth:1,borderRightColor:A.textMuted+"66",borderTopLeftRadius:lt?0:void 0,...u==="strip"?{backgroundColor:"transparent",borderRightWidth:0}:{}};const Ot={flexDirection:"row",alignItems:"center",gap:6,paddingRight:8};const At=pt(()=>u==="strip"?bt.toArray(C):Jt(bt.toArray(C)),[C,u]);const Et=32;if(h&&!I){return null}return R(z.View,{pointerEvents:T?"none":"box-none",testID:f??"buoy-floating-tool",style:Lt,children:J(H,{style:{overflow:"visible"},children:[E&&R(H,{style:{position:"absolute",bottom:"100%",left:0,width:Et,overflow:"visible",zIndex:1001},children:E}),J(St,{position:t,enabled:M,claimOnMove:false,onDragStart:mt,onDragEnd:gt,containerBounds:{width:a,height:p},elementSize:e,minPosition:{x:c.left,y:c.top+d},maxOverflowX:e.width,hitSlop:{top:10,bottom:10,left:10,right:10},style:Vt,onLayout:i=>{const{width:r,height:s}=i.nativeEvent.layout;X({width:r,height:s});if(L)return;P(true);if(n||o||Y.current)return;const m=S(t.x);const w=S(t.y);const j=a-r-d;const k=p-s-c.bottom-d-(B==="bottom"?$:0);if(m<=j&&w<=k)return;const ot={x:Math.max(c.left,Math.min(m,j)),y:Math.max(c.top+d,Math.min(w,k))};t.setValue(ot);b(ot.x,ot.y)},children:[J(St,{position:t,testID:f?`${f}-grip`:"buoy-floating-grip",accessibilityLabel:F,onDragStart:mt,onDragEnd:gt,onTap:ct,containerBounds:{width:a,height:p},elementSize:e,minPosition:{x:c.left,y:c.top+d},style:Ct,enabled:true,maxOverflowX:e.width,children:[R(Ht,{size:u==="strip"?20:12,color:A.textSecondary+"CC"}),nt]}),R(Mt.Provider,{value:{isDragging:o},children:J(H,{style:Ot,children:[l&&Z&&K&&tt&&R(zt,{currentEnvironment:Z,availableEnvironments:K,onSelect:tt}),At]})})]}),!n&&Q&&R(H,{onLayout:i=>Dt(i.nativeEvent.layout.height),style:{position:"absolute",...Rt?{bottom:"100%"}:{top:"100%"},left:0,width:"100%",zIndex:1002},children:Q})]})})}export function getBubbleAnchorPosition(){return null}
@@ -1 +1 @@
1
- "use strict";export const CLIP_OFFSCREEN_CELLS=!(typeof process!=="undefined"&&process.env?.EXPO_PUBLIC_E2E);export const EVENT_LIST_PRESET={initialNumToRender:12,maxToRenderPerBatch:8,windowSize:5,updateCellsBatchingPeriod:50,removeClippedSubviews:CLIP_OFFSCREEN_CELLS};export const LOG_LIST_PRESET={initialNumToRender:30,maxToRenderPerBatch:30,windowSize:21,removeClippedSubviews:CLIP_OFFSCREEN_CELLS};
1
+ "use strict";import{Platform as o}from"react-native";export const CLIP_OFFSCREEN_CELLS=!(typeof process!=="undefined"&&process.env?.EXPO_PUBLIC_E2E);const e={keyboardShouldPersistTaps:"handled",keyboardDismissMode:o.OS==="web"?"none":"on-drag"};export const EVENT_LIST_PRESET={initialNumToRender:12,maxToRenderPerBatch:8,windowSize:5,updateCellsBatchingPeriod:50,removeClippedSubviews:CLIP_OFFSCREEN_CELLS,...e};export const LOG_LIST_PRESET={initialNumToRender:30,maxToRenderPerBatch:30,windowSize:21,removeClippedSubviews:CLIP_OFFSCREEN_CELLS,...e};
@@ -1 +1 @@
1
- "use strict";export{absoluteFill}from"./absoluteFill.js";export{displayValue,parseDisplayValue}from"./displayValue.js";export{getSafeAreaInsets}from"./getSafeAreaInsets";export{persistentStorage,isUsingPersistentStorage,getStorageBackendType}from"./persistentStorage";export{safeStringify}from"./safeStringify.js";export{getValueType,isPrimitive,isJsonSerializable,isValidJson,getConstructorName,isEmpty,getValueSize}from"./typeHelpers.js";export{parseValue,formatValue,getTypeColor,truncateText,flattenObject,formatPath}from"./valueFormatting.js";export{loadOptionalModule,getCachedOptionalModule}from"./loadOptionalModule.js";export{setRenderCaptureProvider,getRenderCaptureProvider}from"./renderCaptureRegistry.js";export{registerStateSnapshotProvider,getStateSnapshotProviders,getStateSnapshotProvider,subscribeToStateSnapshotProviders}from"./stateSnapshotRegistry.js";export{serialize as superJsonSerialize,deserialize as superJsonDeserialize,dropAnnotations as superJsonDropAnnotations}from"./minimalSuperJSON.js";export{reloadApp,scheduleReloadApp,resolveReloadStrategy,REMOTE_RELOAD_DELAY_MS}from"./reloadApp.js";export{getDevServerOrigin}from"./devServer";export{realNow}from"./realNow.js";export{getRealAppState,subscribeRealAppState,BUOY_SYNTHETIC_MARK,countBuoyListener}from"./realAppState.js";export{Subscribable}from"./subscribable.js";export{subscriberCountNotifier,subscribeToSubscriberCountChanges,notifySubscriberCountChange}from"./subscriberCountNotifier.js";export{useSafeRouter,useSafePathname,useSafeSegments,useSafeGlobalSearchParams,getSafeRouter,getSafeCurrentPathname,getSafeCurrentRoute,isExpoRouterAvailable}from"./safeExpoRouter";export{getBrowserStorage,subscribeToBrowserStorage}from"./browserAsyncStorage.js";export{browserRouter,getBrowserHref,getBrowserRouteURL,registerBrowserRouter,subscribeBrowserNavigation}from"./browserNavigation.js";export{isDOMElement,getDOMControlProps,getDOMFiber,getDOMNodeHandle,getDOMPublicInstance,resolveDOMEventEmitter}from"./domRuntime.js";export{registerToolModules,getRegisteredToolModule,getToolModuleVersion}from"./toolModules.js";export{loadToolModule}from"./loadToolModule";
1
+ "use strict";export{absoluteFill}from"./absoluteFill.js";export{displayValue,parseDisplayValue}from"./displayValue.js";export{getSafeAreaInsets}from"./getSafeAreaInsets";export{persistentStorage,setItemChecked,isUsingPersistentStorage,getStorageBackendType}from"./persistentStorage";export{safeStringify}from"./safeStringify.js";export{getValueType,isPrimitive,isJsonSerializable,isValidJson,getConstructorName,isEmpty,getValueSize}from"./typeHelpers.js";export{parseValue,formatValue,getTypeColor,truncateText,flattenObject,formatPath}from"./valueFormatting.js";export{loadOptionalModule,getCachedOptionalModule}from"./loadOptionalModule.js";export{setRenderCaptureProvider,getRenderCaptureProvider}from"./renderCaptureRegistry.js";export{registerStateSnapshotProvider,getStateSnapshotProviders,getStateSnapshotProvider,subscribeToStateSnapshotProviders}from"./stateSnapshotRegistry.js";export{serialize as superJsonSerialize,deserialize as superJsonDeserialize,dropAnnotations as superJsonDropAnnotations}from"./minimalSuperJSON.js";export{reloadApp,scheduleReloadApp,resolveReloadStrategy,REMOTE_RELOAD_DELAY_MS}from"./reloadApp.js";export{getDevServerOrigin}from"./devServer";export{realNow}from"./realNow.js";export{getRealAppState,subscribeRealAppState,BUOY_SYNTHETIC_MARK,countBuoyListener}from"./realAppState.js";export{Subscribable}from"./subscribable.js";export{subscriberCountNotifier,subscribeToSubscriberCountChanges,notifySubscriberCountChange}from"./subscriberCountNotifier.js";export{useSafeRouter,useSafePathname,useSafeSegments,useSafeGlobalSearchParams,getSafeRouter,getSafeCurrentPathname,getSafeCurrentRoute,isExpoRouterAvailable}from"./safeExpoRouter";export{getBrowserStorage,subscribeToBrowserStorage}from"./browserAsyncStorage.js";export{browserRouter,getBrowserHref,getBrowserRouteURL,registerBrowserRouter,subscribeBrowserNavigation}from"./browserNavigation.js";export{isDOMElement,getDOMControlProps,getDOMFiber,getDOMNodeHandle,getDOMPublicInstance,resolveDOMEventEmitter}from"./domRuntime.js";export{registerToolModules,getRegisteredToolModule,getToolModuleVersion}from"./toolModules.js";export{loadToolModule}from"./loadToolModule";
@@ -1 +1 @@
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
+ "use strict";const s={log:()=>{},warn:()=>{},error:(...n)=>{console.error("[Buoy]","[optional-module]",...n)}};const t=new Map;const i=new Map;const d=new Set;export async function loadOptionalModule(n,r={}){if(t.has(n)){return t.get(n)}const e={...s,...r.logger??{}};if(!i.has(n)){i.set(n,(async()=>{try{const a=await w(n,r);const u=a?.default??a;t.set(n,u);e.log("Loaded optional module",n);return u}catch(a){e.log("Optional module unavailable",n,a);t.set(n,null);return null}})())}const o=await i.get(n);i.delete(n);if(!o&&r.warnOnceKey&&!d.has(r.warnOnceKey)){d.add(r.warnOnceKey);e.warn(r.warningMessage??`Module '${n}' not found.`)}return o}let l;let c;function f(){if(l===void 0){try{l=new Function("moduleName","return import(moduleName);")}catch{l=null}}return l}function g(){if(c===void 0){try{c=new Function("return typeof require === 'function' ? require : undefined;")()??null}catch{c=null}}return c}async function w(n,r){if(r.loader){return await Promise.resolve(r.loader())}const e=f();if(e){return e(n)}const o=g();if(o){return o(n)}throw new Error(`No dynamic loader available for optional module '${n}'.`)}export function getCachedOptionalModule(n){if(!t.has(n)){return null}return t.get(n)}