@buoy-gg/shared-ui 7.0.76 → 7.0.78

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 (543) hide show
  1. package/lib/commonjs/JsModal.js +1 -1
  2. package/lib/commonjs/dataViewer/SplitDiffViewer.js +1 -1
  3. package/lib/commonjs/dataViewer/ThemedSplitView.js +1 -1
  4. package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1 -1
  5. package/lib/commonjs/history/components/HistoryList.js +1 -1
  6. package/lib/commonjs/index.js +1 -1
  7. package/lib/commonjs/license/FreeAccountPrompt.js +1 -1
  8. package/lib/commonjs/license/licenseModule.js +1 -1
  9. package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -1
  10. package/lib/commonjs/storage/devToolsStorageKeys.js +1 -1
  11. package/lib/commonjs/ui/components/ChipStrip.js +1 -1
  12. package/lib/commonjs/ui/components/DataInspector.js +1 -1
  13. package/lib/commonjs/ui/components/DetailView.js +1 -1
  14. package/lib/commonjs/ui/components/DynamicFilterView.js +1 -1
  15. package/lib/commonjs/ui/components/EntityFilterView.js +1 -1
  16. package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -1
  17. package/lib/commonjs/ui/components/EventHistoryViewer/EventPickerModal.js +1 -1
  18. package/lib/commonjs/utils/appIdentity.js +1 -0
  19. package/lib/commonjs/utils/reloadPlatform.js +1 -1
  20. package/lib/module/JsModal.js +1 -1
  21. package/lib/module/dataViewer/SplitDiffViewer.js +1 -1
  22. package/lib/module/dataViewer/ThemedSplitView.js +1 -1
  23. package/lib/module/dataViewer/VirtualizedDataExplorer.js +1 -1
  24. package/lib/module/history/components/HistoryList.js +1 -1
  25. package/lib/module/index.js +1 -1
  26. package/lib/module/license/FreeAccountPrompt.js +1 -1
  27. package/lib/module/license/licenseModule.js +1 -1
  28. package/lib/module/settings/components/BubbleSettingsSection.js +1 -1
  29. package/lib/module/storage/devToolsStorageKeys.js +1 -1
  30. package/lib/module/ui/components/ChipStrip.js +1 -1
  31. package/lib/module/ui/components/DataInspector.js +1 -1
  32. package/lib/module/ui/components/DetailView.js +1 -1
  33. package/lib/module/ui/components/DynamicFilterView.js +1 -1
  34. package/lib/module/ui/components/EntityFilterView.js +1 -1
  35. package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -1
  36. package/lib/module/ui/components/EventHistoryViewer/EventPickerModal.js +1 -1
  37. package/lib/module/utils/appIdentity.js +1 -0
  38. package/lib/module/utils/reloadPlatform.js +1 -1
  39. package/lib/typescript/commonjs/JsModal.d.ts +7 -0
  40. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  41. package/lib/typescript/commonjs/index.d.ts +2 -1
  42. package/lib/typescript/commonjs/license/licenseModule.d.ts +7 -0
  43. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +2 -0
  44. package/lib/typescript/commonjs/utils/appIdentity.d.ts +3 -0
  45. package/lib/typescript/module/JsModal.d.ts +7 -0
  46. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  47. package/lib/typescript/module/index.d.ts +2 -1
  48. package/lib/typescript/module/license/licenseModule.d.ts +7 -0
  49. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +2 -0
  50. package/lib/typescript/module/utils/appIdentity.d.ts +3 -0
  51. package/lib/web/chunks/{chunk-UQRRKDKX.mjs → chunk-BMITMQVB.mjs} +3 -3
  52. package/lib/web/chunks/chunk-EY7GXWGI.mjs +1 -0
  53. package/lib/web/chunks/chunk-GTRVOJUH.mjs +1 -1
  54. package/lib/web/chunks/chunk-HE5ONCAL.mjs +6 -0
  55. package/lib/web/chunks/{chunk-ZRZQZF2T.mjs → chunk-OF3VWR6K.mjs} +1 -1
  56. package/lib/web/chunks/chunk-OQB3GW44.mjs +1 -0
  57. package/lib/web/chunks/{persistentStorage.web-24PEE4I7.mjs → persistentStorage.web-7JL3GE3F.mjs} +1 -1
  58. package/lib/web/dataViewer.mjs +2 -2
  59. package/lib/web/history.mjs +1 -1
  60. package/lib/web/hooks.mjs +1 -1
  61. package/lib/web/index.mjs +4 -4
  62. package/lib/web/ui.mjs +1 -1
  63. package/lib/web/utils.mjs +1 -1
  64. package/package.json +5 -5
  65. package/lib/commonjs/JsModal.d.js +0 -1
  66. package/lib/commonjs/bugCase/capture.d.js +0 -1
  67. package/lib/commonjs/bugCase/format.d.js +0 -1
  68. package/lib/commonjs/bugCase/index.d.js +0 -1
  69. package/lib/commonjs/bugCase/lock.d.js +0 -1
  70. package/lib/commonjs/bugCase/recorder.d.js +0 -1
  71. package/lib/commonjs/bugCase/scrub.d.js +0 -1
  72. package/lib/commonjs/bugCase/steps.d.js +0 -1
  73. package/lib/commonjs/bugCase/types.d.js +0 -1
  74. package/lib/commonjs/clipboard/autoDetectClipboard.d.js +0 -1
  75. package/lib/commonjs/clipboard/clipboard-impl.d.js +0 -1
  76. package/lib/commonjs/clipboard/copyToClipboard.d.js +0 -1
  77. package/lib/commonjs/clipboard/index.d.js +0 -1
  78. package/lib/commonjs/context/HintsContext.d.js +0 -1
  79. package/lib/commonjs/context/index.d.js +0 -1
  80. package/lib/commonjs/dataViewer/objectDiff.d.js +0 -1
  81. package/lib/commonjs/env/EnvironmentIndicator.d.js +0 -1
  82. package/lib/commonjs/env/EnvironmentSelector.d.js +0 -1
  83. package/lib/commonjs/env/EnvironmentSelectorInline.d.js +0 -1
  84. package/lib/commonjs/history/HistoryProvider.d.js +0 -1
  85. package/lib/commonjs/history/components/HistoryEntryRow.d.js +0 -1
  86. package/lib/commonjs/history/components/HistoryList.d.js +0 -1
  87. package/lib/commonjs/history/components/index.d.js +0 -1
  88. package/lib/commonjs/history/index.d.js +0 -1
  89. package/lib/commonjs/history/types.d.js +0 -1
  90. package/lib/commonjs/hooks/index.d.js +0 -1
  91. package/lib/commonjs/hooks/safe-area-impl.d.js +0 -1
  92. package/lib/commonjs/hooks/useChangeLog.d.js +0 -1
  93. package/lib/commonjs/hooks/useDeviceInfo.d.js +0 -1
  94. package/lib/commonjs/hooks/useEventStoreEvents.d.js +0 -1
  95. package/lib/commonjs/hooks/useFilterManager.d.js +0 -1
  96. package/lib/commonjs/hooks/usePersistedState.d.js +0 -1
  97. package/lib/commonjs/hooks/useSafeAreaInsets.d.js +0 -1
  98. package/lib/commonjs/icons/BenchmarkIcon.d.js +0 -1
  99. package/lib/commonjs/icons/EnvLaptopIcon.d.js +0 -1
  100. package/lib/commonjs/icons/IconBackground.d.js +0 -1
  101. package/lib/commonjs/icons/ReactQueryIcon.d.js +0 -1
  102. package/lib/commonjs/icons/RenderCountIcon.d.js +0 -1
  103. package/lib/commonjs/icons/RouteMapIcon.d.js +0 -1
  104. package/lib/commonjs/icons/SentryBugIcon.d.js +0 -1
  105. package/lib/commonjs/icons/StackPulseIcon.d.js +0 -1
  106. package/lib/commonjs/icons/StorageStackIcon.d.js +0 -1
  107. package/lib/commonjs/icons/WifiCircuitIcon.d.js +0 -1
  108. package/lib/commonjs/icons/index.d.js +0 -1
  109. package/lib/commonjs/icons/lucide-icons-original-full.d.js +0 -1
  110. package/lib/commonjs/icons/lucide-icons.d.js +0 -1
  111. package/lib/commonjs/icons/primitives/GlobeIcon.d.js +0 -1
  112. package/lib/commonjs/icons/primitives/icon-primitives.d.js +0 -1
  113. package/lib/commonjs/icons/primitives/index.d.js +0 -1
  114. package/lib/commonjs/index.d.js +0 -1
  115. package/lib/commonjs/license/AccountSetup.d.js +0 -1
  116. package/lib/commonjs/license/AccountSetupContent.d.js +0 -1
  117. package/lib/commonjs/license/BuoyUpgradeSheet.d.js +0 -1
  118. package/lib/commonjs/license/FeatureGate.d.js +0 -1
  119. package/lib/commonjs/license/FreeAccountPrompt.d.js +0 -1
  120. package/lib/commonjs/license/accountRuntime.d.js +0 -1
  121. package/lib/commonjs/license/index.d.js +0 -1
  122. package/lib/commonjs/license/licenseModule.d.js +0 -1
  123. package/lib/commonjs/license/openPricing.d.js +0 -1
  124. package/lib/commonjs/license/tierLimits.d.js +0 -1
  125. package/lib/commonjs/logger/index-sentry.d.js +0 -1
  126. package/lib/commonjs/logger/index.d.js +0 -1
  127. package/lib/commonjs/logger/logDump.d.js +0 -1
  128. package/lib/commonjs/logger/types.d.js +0 -1
  129. package/lib/commonjs/settings/components/BubbleSettingsSection.d.js +0 -1
  130. package/lib/commonjs/settings/index.d.js +0 -1
  131. package/lib/commonjs/storage/buoyOwnership.d.js +0 -1
  132. package/lib/commonjs/storage/capacitorAppStorage.d.js +0 -1
  133. package/lib/commonjs/storage/definePersistedSetting.d.js +0 -1
  134. package/lib/commonjs/storage/devToolsStorageKeys.d.js +0 -1
  135. package/lib/commonjs/storage/index.d.js +0 -1
  136. package/lib/commonjs/stores/BaseEventStore.d.js +0 -1
  137. package/lib/commonjs/stores/ChangeLog.d.js +0 -1
  138. package/lib/commonjs/stores/createToolStore.d.js +0 -1
  139. package/lib/commonjs/stores/floatingToolStore.d.js +0 -1
  140. package/lib/commonjs/stores/ignoredPatternsCore.d.js +0 -1
  141. package/lib/commonjs/stores/ignoredPatternsStore.d.js +0 -1
  142. package/lib/commonjs/stores/ignoredPatternsStore.shared.d.js +0 -1
  143. package/lib/commonjs/stores/index.d.js +0 -1
  144. package/lib/commonjs/stores/teamSettingsStore.d.js +0 -1
  145. package/lib/commonjs/sync/keyedArrays.d.js +0 -1
  146. package/lib/commonjs/sync/settingsSync.d.js +0 -1
  147. package/lib/commonjs/sync/toolActionRegistry.d.js +0 -1
  148. package/lib/commonjs/sync/toolScreenHeader.d.js +0 -1
  149. package/lib/commonjs/sync/toolSyncAdapter.d.js +0 -1
  150. package/lib/commonjs/sync/toolUiBridge.d.js +0 -1
  151. package/lib/commonjs/sync/typedEdit.d.js +0 -1
  152. package/lib/commonjs/sync/valuePath.d.js +0 -1
  153. package/lib/commonjs/sync/valueShape.d.js +0 -1
  154. package/lib/commonjs/sync/wireBudget.d.js +0 -1
  155. package/lib/commonjs/sync/wireForm.d.js +0 -1
  156. package/lib/commonjs/tools/defineTool.d.js +0 -1
  157. package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.d.js +0 -1
  158. package/lib/commonjs/ui/backgrounds/ToolBackground.d.js +0 -1
  159. package/lib/commonjs/ui/backgrounds/backgroundStore.d.js +0 -1
  160. package/lib/commonjs/ui/backgrounds/index.d.js +0 -1
  161. package/lib/commonjs/ui/backgrounds/primitives.d.js +0 -1
  162. package/lib/commonjs/ui/backgrounds/registry.d.js +0 -1
  163. package/lib/commonjs/ui/backgrounds/rng.d.js +0 -1
  164. package/lib/commonjs/ui/backgrounds/skyClock.d.js +0 -1
  165. package/lib/commonjs/ui/backgrounds/types.d.js +0 -1
  166. package/lib/commonjs/ui/backgrounds/variants/daylight.d.js +0 -1
  167. package/lib/commonjs/ui/backgrounds/variants/deepField.d.js +0 -1
  168. package/lib/commonjs/ui/backgrounds/variants/hyperspace.d.js +0 -1
  169. package/lib/commonjs/ui/backgrounds/variants/liveSky.d.js +0 -1
  170. package/lib/commonjs/ui/backgrounds/variants/meteors.d.js +0 -1
  171. package/lib/commonjs/ui/backgrounds/variants/moonlight.d.js +0 -1
  172. package/lib/commonjs/ui/backgrounds/variants/underwater.d.js +0 -1
  173. package/lib/commonjs/ui/backgrounds/variants/wormhole/motion.d.js +0 -1
  174. package/lib/commonjs/ui/backgrounds/variants/wormhole/textures.d.js +0 -1
  175. package/lib/commonjs/ui/backgrounds/variants/wormhole.d.js +0 -1
  176. package/lib/commonjs/ui/components/BackButton.d.js +0 -1
  177. package/lib/commonjs/ui/components/Badge.d.js +0 -1
  178. package/lib/commonjs/ui/components/ChangeRow.d.js +0 -1
  179. package/lib/commonjs/ui/components/ChipStrip.d.js +0 -1
  180. package/lib/commonjs/ui/components/ClipboardHintBanner.d.js +0 -1
  181. package/lib/commonjs/ui/components/CollapsibleSection.d.js +0 -1
  182. package/lib/commonjs/ui/components/CompactFilterChips.d.js +0 -1
  183. package/lib/commonjs/ui/components/CompactRow.d.js +0 -1
  184. package/lib/commonjs/ui/components/CopyButton.d.js +0 -1
  185. package/lib/commonjs/ui/components/DataInspector.d.js +0 -1
  186. package/lib/commonjs/ui/components/DetailView.d.js +0 -1
  187. package/lib/commonjs/ui/components/DetailViewToggle.d.js +0 -1
  188. package/lib/commonjs/ui/components/DevToolsCard.d.js +0 -1
  189. package/lib/commonjs/ui/components/DraggableHeader.d.js +0 -1
  190. package/lib/commonjs/ui/components/DynamicFilterView.d.js +0 -1
  191. package/lib/commonjs/ui/components/EmptyState.d.js +0 -1
  192. package/lib/commonjs/ui/components/EntityFilterView.d.js +0 -1
  193. package/lib/commonjs/ui/components/EventHistoryViewer/CompareBar.d.js +0 -1
  194. package/lib/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.d.js +0 -1
  195. package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.d.js +0 -1
  196. package/lib/commonjs/ui/components/EventHistoryViewer/EventPickerModal.d.js +0 -1
  197. package/lib/commonjs/ui/components/EventHistoryViewer/ViewToggleCards.d.js +0 -1
  198. package/lib/commonjs/ui/components/EventHistoryViewer/index.d.js +0 -1
  199. package/lib/commonjs/ui/components/EventHistoryViewer/types.d.js +0 -1
  200. package/lib/commonjs/ui/components/EventListItem.d.js +0 -1
  201. package/lib/commonjs/ui/components/EventStepperFooter.d.js +0 -1
  202. package/lib/commonjs/ui/components/ExpandablePopover.d.js +0 -1
  203. package/lib/commonjs/ui/components/ExpandedInfoRow.d.js +0 -1
  204. package/lib/commonjs/ui/components/ExportPreview.d.js +0 -1
  205. package/lib/commonjs/ui/components/FilterComponents.d.js +0 -1
  206. package/lib/commonjs/ui/components/GripVerticalIcon.d.js +0 -1
  207. package/lib/commonjs/ui/components/HeaderSearchButton.d.js +0 -1
  208. package/lib/commonjs/ui/components/InfoRow.d.js +0 -1
  209. package/lib/commonjs/ui/components/ListItem.d.js +0 -1
  210. package/lib/commonjs/ui/components/ModalHeader.d.js +0 -1
  211. package/lib/commonjs/ui/components/ModalHintBanner.d.js +0 -1
  212. package/lib/commonjs/ui/components/Pill.d.js +0 -1
  213. package/lib/commonjs/ui/components/PowerToggleButton.d.js +0 -1
  214. package/lib/commonjs/ui/components/SearchBar.d.js +0 -1
  215. package/lib/commonjs/ui/components/SectionHeader.d.js +0 -1
  216. package/lib/commonjs/ui/components/StatsCard.d.js +0 -1
  217. package/lib/commonjs/ui/components/StatusIndicator.d.js +0 -1
  218. package/lib/commonjs/ui/components/StorageTypeBadge.d.js +0 -1
  219. package/lib/commonjs/ui/components/TabSelector.d.js +0 -1
  220. package/lib/commonjs/ui/components/TimeDisplay.d.js +0 -1
  221. package/lib/commonjs/ui/components/ToggleRow.d.js +0 -1
  222. package/lib/commonjs/ui/components/ToolButton.d.js +0 -1
  223. package/lib/commonjs/ui/components/ToolEmptyState.d.js +0 -1
  224. package/lib/commonjs/ui/components/ToolFooter.d.js +0 -1
  225. package/lib/commonjs/ui/components/ValueTypeBadge.d.js +0 -1
  226. package/lib/commonjs/ui/components/WindowControls.d.js +0 -1
  227. package/lib/commonjs/ui/components/index.d.js +0 -1
  228. package/lib/commonjs/ui/components/windowControlsSetting.d.js +0 -1
  229. package/lib/commonjs/ui/components/windowDrag.d.js +0 -1
  230. package/lib/commonjs/ui/console/CyberpunkButtonOutline.d.js +0 -1
  231. package/lib/commonjs/ui/console/CyberpunkIconContainer.d.js +0 -1
  232. package/lib/commonjs/ui/console/CyberpunkSectionButton.d.js +0 -1
  233. package/lib/commonjs/ui/floating/FloatingTool.d.js +0 -1
  234. package/lib/commonjs/ui/floating/FloatingToolHost.d.js +0 -1
  235. package/lib/commonjs/ui/floating/onboardingConstants.d.js +0 -1
  236. package/lib/commonjs/ui/fonts.d.js +0 -1
  237. package/lib/commonjs/ui/gameUI/components/GameUICollapsibleSection.d.js +0 -1
  238. package/lib/commonjs/ui/gameUI/components/GameUICompactStats.d.js +0 -1
  239. package/lib/commonjs/ui/gameUI/components/GameUIIssuesList.d.js +0 -1
  240. package/lib/commonjs/ui/gameUI/components/GameUIStatusHeader.d.js +0 -1
  241. package/lib/commonjs/ui/gameUI/constants/gameUIColors.d.js +0 -1
  242. package/lib/commonjs/ui/gameUI/constants/macOSDesignSystemColors.d.js +0 -1
  243. package/lib/commonjs/ui/gameUI/hooks/useGameUIAlertState.d.js +0 -1
  244. package/lib/commonjs/ui/gameUI/index.d.js +0 -1
  245. package/lib/commonjs/ui/index.d.js +0 -1
  246. package/lib/commonjs/ui/listPresets.d.js +0 -1
  247. package/lib/commonjs/ui/night/nightTheme.d.js +0 -1
  248. package/lib/commonjs/ui/night/primitives.d.js +0 -1
  249. package/lib/commonjs/ui/otto/OttoSceneView.d.js +0 -1
  250. package/lib/commonjs/ui/otto/OttoSprite.d.js +0 -1
  251. package/lib/commonjs/ui/otto/index.d.js +0 -1
  252. package/lib/commonjs/ui/otto/ottoEngine.d.js +0 -1
  253. package/lib/commonjs/ui/otto/ottoScenes.d.js +0 -1
  254. package/lib/commonjs/ui/otto/ottoSheet.d.js +0 -1
  255. package/lib/commonjs/ui/qr/QrCodeView.d.js +0 -1
  256. package/lib/commonjs/ui/qr/qrcodegen.d.js +0 -1
  257. package/lib/commonjs/ui/systemFont.d.js +0 -1
  258. package/lib/commonjs/ui/toolTheme.d.js +0 -1
  259. package/lib/commonjs/utils/absoluteFill.d.js +0 -1
  260. package/lib/commonjs/utils/asyncStorageNative.d.js +0 -1
  261. package/lib/commonjs/utils/browserAsyncStorage.d.js +0 -1
  262. package/lib/commonjs/utils/browserNavigation.d.js +0 -1
  263. package/lib/commonjs/utils/devServer.d.js +0 -1
  264. package/lib/commonjs/utils/displayValue.d.js +0 -1
  265. package/lib/commonjs/utils/domRuntime.d.js +0 -1
  266. package/lib/commonjs/utils/expoRouterModule.d.js +0 -1
  267. package/lib/commonjs/utils/formatting/dataFormatting.d.js +0 -1
  268. package/lib/commonjs/utils/formatting/httpFormatting.d.js +0 -1
  269. package/lib/commonjs/utils/formatting/index.d.js +0 -1
  270. package/lib/commonjs/utils/getSafeAreaInsets.d.js +0 -1
  271. package/lib/commonjs/utils/index.d.js +0 -1
  272. package/lib/commonjs/utils/loadOptionalModule.d.js +0 -1
  273. package/lib/commonjs/utils/loadToolModule.d.js +0 -1
  274. package/lib/commonjs/utils/minimalSuperJSON.d.js +0 -1
  275. package/lib/commonjs/utils/modalStorage.d.js +0 -1
  276. package/lib/commonjs/utils/persistentStorage.d.js +0 -1
  277. package/lib/commonjs/utils/realAppState.d.js +0 -1
  278. package/lib/commonjs/utils/realNow.d.js +0 -1
  279. package/lib/commonjs/utils/reloadApp.d.js +0 -1
  280. package/lib/commonjs/utils/reloadPlatform.d.js +0 -1
  281. package/lib/commonjs/utils/renderCaptureRegistry.d.js +0 -1
  282. package/lib/commonjs/utils/safeExpoRouter.d.js +0 -1
  283. package/lib/commonjs/utils/safeStringify.d.js +0 -1
  284. package/lib/commonjs/utils/snapshotProviderKit.d.js +0 -1
  285. package/lib/commonjs/utils/stateSnapshotRegistry.d.js +0 -1
  286. package/lib/commonjs/utils/stateTools.d.js +0 -1
  287. package/lib/commonjs/utils/storageWrites.d.js +0 -1
  288. package/lib/commonjs/utils/subscribable.d.js +0 -1
  289. package/lib/commonjs/utils/subscriberCountNotifier.d.js +0 -1
  290. package/lib/commonjs/utils/time/RelativeTime.d.js +0 -1
  291. package/lib/commonjs/utils/time/TickContext.d.js +0 -1
  292. package/lib/commonjs/utils/time/formatRelativeTime.d.js +0 -1
  293. package/lib/commonjs/utils/time/index.d.js +0 -1
  294. package/lib/commonjs/utils/time/useRelativeTime.d.js +0 -1
  295. package/lib/commonjs/utils/toolModules.d.js +0 -1
  296. package/lib/commonjs/utils/typeHelpers.d.js +0 -1
  297. package/lib/commonjs/utils/valueFormatting.d.js +0 -1
  298. package/lib/module/JsModal.d.js +0 -1
  299. package/lib/module/bugCase/capture.d.js +0 -1
  300. package/lib/module/bugCase/format.d.js +0 -1
  301. package/lib/module/bugCase/index.d.js +0 -1
  302. package/lib/module/bugCase/lock.d.js +0 -1
  303. package/lib/module/bugCase/recorder.d.js +0 -1
  304. package/lib/module/bugCase/scrub.d.js +0 -1
  305. package/lib/module/bugCase/steps.d.js +0 -1
  306. package/lib/module/bugCase/types.d.js +0 -1
  307. package/lib/module/clipboard/autoDetectClipboard.d.js +0 -1
  308. package/lib/module/clipboard/clipboard-impl.d.js +0 -1
  309. package/lib/module/clipboard/copyToClipboard.d.js +0 -1
  310. package/lib/module/clipboard/index.d.js +0 -1
  311. package/lib/module/context/HintsContext.d.js +0 -1
  312. package/lib/module/context/index.d.js +0 -1
  313. package/lib/module/dataViewer/objectDiff.d.js +0 -1
  314. package/lib/module/env/EnvironmentIndicator.d.js +0 -1
  315. package/lib/module/env/EnvironmentSelector.d.js +0 -1
  316. package/lib/module/env/EnvironmentSelectorInline.d.js +0 -1
  317. package/lib/module/history/HistoryProvider.d.js +0 -1
  318. package/lib/module/history/components/HistoryEntryRow.d.js +0 -1
  319. package/lib/module/history/components/HistoryList.d.js +0 -1
  320. package/lib/module/history/components/index.d.js +0 -1
  321. package/lib/module/history/index.d.js +0 -1
  322. package/lib/module/history/types.d.js +0 -1
  323. package/lib/module/hooks/index.d.js +0 -1
  324. package/lib/module/hooks/safe-area-impl.d.js +0 -1
  325. package/lib/module/hooks/useChangeLog.d.js +0 -1
  326. package/lib/module/hooks/useDeviceInfo.d.js +0 -1
  327. package/lib/module/hooks/useEventStoreEvents.d.js +0 -1
  328. package/lib/module/hooks/useFilterManager.d.js +0 -1
  329. package/lib/module/hooks/usePersistedState.d.js +0 -1
  330. package/lib/module/hooks/useSafeAreaInsets.d.js +0 -1
  331. package/lib/module/icons/BenchmarkIcon.d.js +0 -1
  332. package/lib/module/icons/EnvLaptopIcon.d.js +0 -1
  333. package/lib/module/icons/IconBackground.d.js +0 -1
  334. package/lib/module/icons/ReactQueryIcon.d.js +0 -1
  335. package/lib/module/icons/RenderCountIcon.d.js +0 -1
  336. package/lib/module/icons/RouteMapIcon.d.js +0 -1
  337. package/lib/module/icons/SentryBugIcon.d.js +0 -1
  338. package/lib/module/icons/StackPulseIcon.d.js +0 -1
  339. package/lib/module/icons/StorageStackIcon.d.js +0 -1
  340. package/lib/module/icons/WifiCircuitIcon.d.js +0 -1
  341. package/lib/module/icons/index.d.js +0 -1
  342. package/lib/module/icons/lucide-icons-original-full.d.js +0 -1
  343. package/lib/module/icons/lucide-icons.d.js +0 -1
  344. package/lib/module/icons/primitives/GlobeIcon.d.js +0 -1
  345. package/lib/module/icons/primitives/icon-primitives.d.js +0 -1
  346. package/lib/module/icons/primitives/index.d.js +0 -1
  347. package/lib/module/index.d.js +0 -1
  348. package/lib/module/license/AccountSetup.d.js +0 -1
  349. package/lib/module/license/AccountSetupContent.d.js +0 -1
  350. package/lib/module/license/BuoyUpgradeSheet.d.js +0 -1
  351. package/lib/module/license/FeatureGate.d.js +0 -1
  352. package/lib/module/license/FreeAccountPrompt.d.js +0 -1
  353. package/lib/module/license/accountRuntime.d.js +0 -1
  354. package/lib/module/license/index.d.js +0 -1
  355. package/lib/module/license/licenseModule.d.js +0 -1
  356. package/lib/module/license/openPricing.d.js +0 -1
  357. package/lib/module/license/tierLimits.d.js +0 -1
  358. package/lib/module/logger/index-sentry.d.js +0 -1
  359. package/lib/module/logger/index.d.js +0 -1
  360. package/lib/module/logger/logDump.d.js +0 -1
  361. package/lib/module/logger/types.d.js +0 -1
  362. package/lib/module/settings/components/BubbleSettingsSection.d.js +0 -1
  363. package/lib/module/settings/index.d.js +0 -1
  364. package/lib/module/storage/buoyOwnership.d.js +0 -1
  365. package/lib/module/storage/capacitorAppStorage.d.js +0 -1
  366. package/lib/module/storage/definePersistedSetting.d.js +0 -1
  367. package/lib/module/storage/devToolsStorageKeys.d.js +0 -1
  368. package/lib/module/storage/index.d.js +0 -1
  369. package/lib/module/stores/BaseEventStore.d.js +0 -1
  370. package/lib/module/stores/ChangeLog.d.js +0 -1
  371. package/lib/module/stores/createToolStore.d.js +0 -1
  372. package/lib/module/stores/floatingToolStore.d.js +0 -1
  373. package/lib/module/stores/ignoredPatternsCore.d.js +0 -1
  374. package/lib/module/stores/ignoredPatternsStore.d.js +0 -1
  375. package/lib/module/stores/ignoredPatternsStore.shared.d.js +0 -1
  376. package/lib/module/stores/index.d.js +0 -1
  377. package/lib/module/stores/teamSettingsStore.d.js +0 -1
  378. package/lib/module/sync/keyedArrays.d.js +0 -1
  379. package/lib/module/sync/settingsSync.d.js +0 -1
  380. package/lib/module/sync/toolActionRegistry.d.js +0 -1
  381. package/lib/module/sync/toolScreenHeader.d.js +0 -1
  382. package/lib/module/sync/toolSyncAdapter.d.js +0 -1
  383. package/lib/module/sync/toolUiBridge.d.js +0 -1
  384. package/lib/module/sync/typedEdit.d.js +0 -1
  385. package/lib/module/sync/valuePath.d.js +0 -1
  386. package/lib/module/sync/valueShape.d.js +0 -1
  387. package/lib/module/sync/wireBudget.d.js +0 -1
  388. package/lib/module/sync/wireForm.d.js +0 -1
  389. package/lib/module/tools/defineTool.d.js +0 -1
  390. package/lib/module/ui/backgrounds/BackgroundSwitcher.d.js +0 -1
  391. package/lib/module/ui/backgrounds/ToolBackground.d.js +0 -1
  392. package/lib/module/ui/backgrounds/backgroundStore.d.js +0 -1
  393. package/lib/module/ui/backgrounds/index.d.js +0 -1
  394. package/lib/module/ui/backgrounds/primitives.d.js +0 -1
  395. package/lib/module/ui/backgrounds/registry.d.js +0 -1
  396. package/lib/module/ui/backgrounds/rng.d.js +0 -1
  397. package/lib/module/ui/backgrounds/skyClock.d.js +0 -1
  398. package/lib/module/ui/backgrounds/types.d.js +0 -1
  399. package/lib/module/ui/backgrounds/variants/daylight.d.js +0 -1
  400. package/lib/module/ui/backgrounds/variants/deepField.d.js +0 -1
  401. package/lib/module/ui/backgrounds/variants/hyperspace.d.js +0 -1
  402. package/lib/module/ui/backgrounds/variants/liveSky.d.js +0 -1
  403. package/lib/module/ui/backgrounds/variants/meteors.d.js +0 -1
  404. package/lib/module/ui/backgrounds/variants/moonlight.d.js +0 -1
  405. package/lib/module/ui/backgrounds/variants/underwater.d.js +0 -1
  406. package/lib/module/ui/backgrounds/variants/wormhole/motion.d.js +0 -1
  407. package/lib/module/ui/backgrounds/variants/wormhole/textures.d.js +0 -1
  408. package/lib/module/ui/backgrounds/variants/wormhole.d.js +0 -1
  409. package/lib/module/ui/components/BackButton.d.js +0 -1
  410. package/lib/module/ui/components/Badge.d.js +0 -1
  411. package/lib/module/ui/components/ChangeRow.d.js +0 -1
  412. package/lib/module/ui/components/ChipStrip.d.js +0 -1
  413. package/lib/module/ui/components/ClipboardHintBanner.d.js +0 -1
  414. package/lib/module/ui/components/CollapsibleSection.d.js +0 -1
  415. package/lib/module/ui/components/CompactFilterChips.d.js +0 -1
  416. package/lib/module/ui/components/CompactRow.d.js +0 -1
  417. package/lib/module/ui/components/CopyButton.d.js +0 -1
  418. package/lib/module/ui/components/DataInspector.d.js +0 -1
  419. package/lib/module/ui/components/DetailView.d.js +0 -1
  420. package/lib/module/ui/components/DetailViewToggle.d.js +0 -1
  421. package/lib/module/ui/components/DevToolsCard.d.js +0 -1
  422. package/lib/module/ui/components/DraggableHeader.d.js +0 -1
  423. package/lib/module/ui/components/DynamicFilterView.d.js +0 -1
  424. package/lib/module/ui/components/EmptyState.d.js +0 -1
  425. package/lib/module/ui/components/EntityFilterView.d.js +0 -1
  426. package/lib/module/ui/components/EventHistoryViewer/CompareBar.d.js +0 -1
  427. package/lib/module/ui/components/EventHistoryViewer/DiffModeTabs.d.js +0 -1
  428. package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.d.js +0 -1
  429. package/lib/module/ui/components/EventHistoryViewer/EventPickerModal.d.js +0 -1
  430. package/lib/module/ui/components/EventHistoryViewer/ViewToggleCards.d.js +0 -1
  431. package/lib/module/ui/components/EventHistoryViewer/index.d.js +0 -1
  432. package/lib/module/ui/components/EventHistoryViewer/types.d.js +0 -1
  433. package/lib/module/ui/components/EventListItem.d.js +0 -1
  434. package/lib/module/ui/components/EventStepperFooter.d.js +0 -1
  435. package/lib/module/ui/components/ExpandablePopover.d.js +0 -1
  436. package/lib/module/ui/components/ExpandedInfoRow.d.js +0 -1
  437. package/lib/module/ui/components/ExportPreview.d.js +0 -1
  438. package/lib/module/ui/components/FilterComponents.d.js +0 -1
  439. package/lib/module/ui/components/GripVerticalIcon.d.js +0 -1
  440. package/lib/module/ui/components/HeaderSearchButton.d.js +0 -1
  441. package/lib/module/ui/components/InfoRow.d.js +0 -1
  442. package/lib/module/ui/components/ListItem.d.js +0 -1
  443. package/lib/module/ui/components/ModalHeader.d.js +0 -1
  444. package/lib/module/ui/components/ModalHintBanner.d.js +0 -1
  445. package/lib/module/ui/components/Pill.d.js +0 -1
  446. package/lib/module/ui/components/PowerToggleButton.d.js +0 -1
  447. package/lib/module/ui/components/SearchBar.d.js +0 -1
  448. package/lib/module/ui/components/SectionHeader.d.js +0 -1
  449. package/lib/module/ui/components/StatsCard.d.js +0 -1
  450. package/lib/module/ui/components/StatusIndicator.d.js +0 -1
  451. package/lib/module/ui/components/StorageTypeBadge.d.js +0 -1
  452. package/lib/module/ui/components/TabSelector.d.js +0 -1
  453. package/lib/module/ui/components/TimeDisplay.d.js +0 -1
  454. package/lib/module/ui/components/ToggleRow.d.js +0 -1
  455. package/lib/module/ui/components/ToolButton.d.js +0 -1
  456. package/lib/module/ui/components/ToolEmptyState.d.js +0 -1
  457. package/lib/module/ui/components/ToolFooter.d.js +0 -1
  458. package/lib/module/ui/components/ValueTypeBadge.d.js +0 -1
  459. package/lib/module/ui/components/WindowControls.d.js +0 -1
  460. package/lib/module/ui/components/index.d.js +0 -1
  461. package/lib/module/ui/components/windowControlsSetting.d.js +0 -1
  462. package/lib/module/ui/components/windowDrag.d.js +0 -1
  463. package/lib/module/ui/console/CyberpunkButtonOutline.d.js +0 -1
  464. package/lib/module/ui/console/CyberpunkIconContainer.d.js +0 -1
  465. package/lib/module/ui/console/CyberpunkSectionButton.d.js +0 -1
  466. package/lib/module/ui/floating/FloatingTool.d.js +0 -1
  467. package/lib/module/ui/floating/FloatingToolHost.d.js +0 -1
  468. package/lib/module/ui/floating/onboardingConstants.d.js +0 -1
  469. package/lib/module/ui/fonts.d.js +0 -1
  470. package/lib/module/ui/gameUI/components/GameUICollapsibleSection.d.js +0 -1
  471. package/lib/module/ui/gameUI/components/GameUICompactStats.d.js +0 -1
  472. package/lib/module/ui/gameUI/components/GameUIIssuesList.d.js +0 -1
  473. package/lib/module/ui/gameUI/components/GameUIStatusHeader.d.js +0 -1
  474. package/lib/module/ui/gameUI/constants/gameUIColors.d.js +0 -1
  475. package/lib/module/ui/gameUI/constants/macOSDesignSystemColors.d.js +0 -1
  476. package/lib/module/ui/gameUI/hooks/useGameUIAlertState.d.js +0 -1
  477. package/lib/module/ui/gameUI/index.d.js +0 -1
  478. package/lib/module/ui/index.d.js +0 -1
  479. package/lib/module/ui/listPresets.d.js +0 -1
  480. package/lib/module/ui/night/nightTheme.d.js +0 -1
  481. package/lib/module/ui/night/primitives.d.js +0 -1
  482. package/lib/module/ui/otto/OttoSceneView.d.js +0 -1
  483. package/lib/module/ui/otto/OttoSprite.d.js +0 -1
  484. package/lib/module/ui/otto/index.d.js +0 -1
  485. package/lib/module/ui/otto/ottoEngine.d.js +0 -1
  486. package/lib/module/ui/otto/ottoScenes.d.js +0 -1
  487. package/lib/module/ui/otto/ottoSheet.d.js +0 -1
  488. package/lib/module/ui/qr/QrCodeView.d.js +0 -1
  489. package/lib/module/ui/qr/qrcodegen.d.js +0 -1
  490. package/lib/module/ui/systemFont.d.js +0 -1
  491. package/lib/module/ui/toolTheme.d.js +0 -1
  492. package/lib/module/utils/absoluteFill.d.js +0 -1
  493. package/lib/module/utils/asyncStorageNative.d.js +0 -1
  494. package/lib/module/utils/browserAsyncStorage.d.js +0 -1
  495. package/lib/module/utils/browserNavigation.d.js +0 -1
  496. package/lib/module/utils/devServer.d.js +0 -1
  497. package/lib/module/utils/displayValue.d.js +0 -1
  498. package/lib/module/utils/domRuntime.d.js +0 -1
  499. package/lib/module/utils/expoRouterModule.d.js +0 -1
  500. package/lib/module/utils/formatting/dataFormatting.d.js +0 -1
  501. package/lib/module/utils/formatting/httpFormatting.d.js +0 -1
  502. package/lib/module/utils/formatting/index.d.js +0 -1
  503. package/lib/module/utils/getSafeAreaInsets.d.js +0 -1
  504. package/lib/module/utils/index.d.js +0 -1
  505. package/lib/module/utils/loadOptionalModule.d.js +0 -1
  506. package/lib/module/utils/loadToolModule.d.js +0 -1
  507. package/lib/module/utils/minimalSuperJSON.d.js +0 -1
  508. package/lib/module/utils/modalStorage.d.js +0 -1
  509. package/lib/module/utils/persistentStorage.d.js +0 -1
  510. package/lib/module/utils/realAppState.d.js +0 -1
  511. package/lib/module/utils/realNow.d.js +0 -1
  512. package/lib/module/utils/reloadApp.d.js +0 -1
  513. package/lib/module/utils/reloadPlatform.d.js +0 -1
  514. package/lib/module/utils/renderCaptureRegistry.d.js +0 -1
  515. package/lib/module/utils/safeExpoRouter.d.js +0 -1
  516. package/lib/module/utils/safeStringify.d.js +0 -1
  517. package/lib/module/utils/snapshotProviderKit.d.js +0 -1
  518. package/lib/module/utils/stateSnapshotRegistry.d.js +0 -1
  519. package/lib/module/utils/stateTools.d.js +0 -1
  520. package/lib/module/utils/storageWrites.d.js +0 -1
  521. package/lib/module/utils/subscribable.d.js +0 -1
  522. package/lib/module/utils/subscriberCountNotifier.d.js +0 -1
  523. package/lib/module/utils/time/RelativeTime.d.js +0 -1
  524. package/lib/module/utils/time/TickContext.d.js +0 -1
  525. package/lib/module/utils/time/formatRelativeTime.d.js +0 -1
  526. package/lib/module/utils/time/index.d.js +0 -1
  527. package/lib/module/utils/time/useRelativeTime.d.js +0 -1
  528. package/lib/module/utils/toolModules.d.js +0 -1
  529. package/lib/module/utils/typeHelpers.d.js +0 -1
  530. package/lib/module/utils/valueFormatting.d.js +0 -1
  531. package/lib/web/chunks/chunk-2STKTXD3.mjs +0 -1
  532. package/lib/web/chunks/chunk-3HELV44Y.mjs +0 -1
  533. package/lib/web/chunks/chunk-4HIK66DZ.mjs +0 -1
  534. package/lib/web/chunks/chunk-5G6RSRP4.mjs +0 -1
  535. package/lib/web/chunks/chunk-7CBB7NEY.mjs +0 -1
  536. package/lib/web/chunks/chunk-CJTGUGMQ.mjs +0 -1
  537. package/lib/web/chunks/chunk-G27JNYZ3.mjs +0 -15
  538. package/lib/web/chunks/chunk-GMM6TGFO.mjs +0 -1
  539. package/lib/web/chunks/chunk-HIAN3HBD.mjs +0 -1
  540. package/lib/web/chunks/chunk-LIZRXZGQ.mjs +0 -6
  541. package/lib/web/chunks/chunk-N5Z7Z2GY.mjs +0 -1
  542. package/lib/web/chunks/chunk-RMLVR5LI.mjs +0 -1
  543. package/lib/web/chunks/persistentStorage.web-IBLIV62L.mjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.BubbleSettingsDetail=BubbleSettingsDetail;exports.BubbleSettingsSection=BubbleSettingsSection;exports.getBubbleVisibilitySettings=getBubbleVisibilitySettings;var _reactNative=require("react-native");var _index=require("../../icons/index.js");var _react=require("react");var _CyberpunkSectionButton=require("../../ui/console/CyberpunkSectionButton.js");var _devToolsStorageKeys=require("../../storage/devToolsStorageKeys.js");var _persistentStorage=require("../../utils/persistentStorage");var _macOSDesignSystemColors=require("../../ui/gameUI/constants/macOSDesignSystemColors.js");var _gameUIColors=require("../../ui/gameUI/constants/gameUIColors.js");var _jsxRuntime=require("react/jsx-runtime");const STORAGE_KEY=_devToolsStorageKeys.devToolsStorageKeys.bubble.settings();const USER_PREFERENCES_KEY=_devToolsStorageKeys.devToolsStorageKeys.bubble.userPreferences();const DEFAULT_SETTINGS={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};function BubbleSettingsSection({onPress:t}){const[o,n]=(0,_react.useState)(DEFAULT_SETTINGS);(0,_react.useEffect)(()=>{s()},[]);const s=async()=>{try{const r=await _persistentStorage.persistentStorage.getItem(STORAGE_KEY);if(r){n(JSON.parse(r))}}catch(r){console.error("[Buoy]","Failed to load bubble settings:",r)}};const a=()=>{return Object.values(o).filter(Boolean).length};return(0,_jsxRuntime.jsx)(_CyberpunkSectionButton.CyberpunkSectionButton,{id:"bubble-settings",title:"SETTINGS",subtitle:`${a()}/6 visible`,icon:_index.Settings,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:t||(()=>{}),index:5})}function BubbleSettingsDetail({onSettingsChange:t}){const[o,n]=(0,_react.useState)(DEFAULT_SETTINGS);const[s,a]=(0,_react.useState)(true);(0,_react.useEffect)(()=>{r()},[]);const r=async()=>{try{const e=await _persistentStorage.persistentStorage.getItem(STORAGE_KEY);if(e){n(JSON.parse(e))}}catch(e){console.error("[Buoy]","Failed to load bubble settings:",e)}finally{a(false)}};const c=async e=>{try{await _persistentStorage.persistentStorage.setItem(STORAGE_KEY,JSON.stringify(e));n(e);t?.(e)}catch(l){console.error("[Buoy]","Failed to save bubble settings:",l)}};const d=async e=>{const l={...o,[e]:!o[e]};try{const i=await _persistentStorage.persistentStorage.getItem(USER_PREFERENCES_KEY);const u=i?JSON.parse(i):{};const b=e.replace("show","hasSet");const y={...u,[b]:true};await _persistentStorage.persistentStorage.setItem(USER_PREFERENCES_KEY,JSON.stringify(y))}catch(i){console.error("[Buoy]","Failed to save user preference marker:",i)}c(l)};if(s){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.detailContainer,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.loadingText,children:"Loading settings..."})})}const g=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:(0,_jsxRuntime.jsx)(_index.Settings,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:(0,_jsxRuntime.jsx)(_index.Database,{size:16,color:"#3B82F6"})}];return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.detailContainer,children:(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{showsVerticalScrollIndicator:false,contentContainerStyle:styles.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.header,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerTitle,children:"Developer Tools Settings"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerDescription,children:"Configure bubble button visibility"})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionDivider,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionTitle,children:"Bubble Button Visibility"})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.settingsList,children:g.map(e=>(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.settingItem,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.settingIconContainer,children:e.icon}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.settingContent,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.settingLabel,children:e.label}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.settingDescription,children:e.description})]}),(0,_jsxRuntime.jsx)(_reactNative.Switch,{"sentry-label":"ignore bubble settings section",value:o[e.key],onValueChange:()=>d(e.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:o[e.key]?"#fff":_gameUIColors.buoyColors.textSecondary})]},e.key))}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.footer,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.noteContainer,children:[(0,_jsxRuntime.jsx)(_index.EyeOff,{size:16,color:_gameUIColors.buoyColors.textSecondary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}async function getBubbleVisibilitySettings(){try{const t=await _persistentStorage.persistentStorage.getItem(STORAGE_KEY);if(t){return JSON.parse(t)}}catch(t){console.error("[Buoy]","Failed to load bubble settings:",t)}return DEFAULT_SETTINGS}const styles=_reactNative.StyleSheet.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:_gameUIColors.buoyColors.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:_gameUIColors.buoyColors.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:_gameUIColors.buoyColors.textSecondary,fontSize:12},chevron:{color:_macOSDesignSystemColors.macOSColors.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:_gameUIColors.buoyColors.card},loadingText:{color:_gameUIColors.buoyColors.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:_gameUIColors.buoyColors.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:_gameUIColors.buoyColors.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:_gameUIColors.buoyColors.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:_macOSDesignSystemColors.macOSColors.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:_gameUIColors.buoyColors.textSecondary,fontSize:12,flex:1},restartNote:{color:_macOSDesignSystemColors.macOSColors.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:_gameUIColors.buoyColors.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.BubbleSettingsDetail=BubbleSettingsDetail;exports.BubbleSettingsSection=BubbleSettingsSection;exports.getBubbleVisibilitySettings=getBubbleVisibilitySettings;var _reactNative=require("react-native");var _index=require("../../icons/index.js");var _react=require("react");var _CyberpunkSectionButton=require("../../ui/console/CyberpunkSectionButton.js");var _devToolsStorageKeys=require("../../storage/devToolsStorageKeys.js");var _persistentStorage=require("../../utils/persistentStorage");var _macOSDesignSystemColors=require("../../ui/gameUI/constants/macOSDesignSystemColors.js");var _gameUIColors=require("../../ui/gameUI/constants/gameUIColors.js");var _jsxRuntime=require("react/jsx-runtime");const STORAGE_KEY=_devToolsStorageKeys.devToolsStorageKeys.bubble.settings();const USER_PREFERENCES_KEY=_devToolsStorageKeys.devToolsStorageKeys.bubble.userPreferences();const DEFAULT_SETTINGS={showEnvironment:true,showQueryButton:true,showWifiToggle:true,showEnvButton:false,showSentryButton:false,showStorageButton:false};function BubbleSettingsSection({onPress:t}){const[o,n]=(0,_react.useState)(DEFAULT_SETTINGS);(0,_react.useEffect)(()=>{i()},[]);const i=async()=>{try{const r=await _persistentStorage.persistentStorage.getItem(STORAGE_KEY);if(r){n(JSON.parse(r))}}catch(r){console.error("[Buoy]","Failed to load bubble settings:",r)}};const a=()=>{return Object.values(o).filter(Boolean).length};return(0,_jsxRuntime.jsx)(_CyberpunkSectionButton.CyberpunkSectionButton,{id:"bubble-settings",title:"SETTINGS",subtitle:`${a()}/6 visible`,icon:_index.Settings,iconColor:"#10B981",iconBackgroundColor:"rgba(16, 185, 129, 0.1)",onPress:t||(()=>{}),index:5})}function BubbleSettingsDetail({onSettingsChange:t}){const[o,n]=(0,_react.useState)(DEFAULT_SETTINGS);const[i,a]=(0,_react.useState)(true);(0,_react.useEffect)(()=>{r()},[]);const r=async()=>{try{const e=await _persistentStorage.persistentStorage.getItem(STORAGE_KEY);if(e){n(JSON.parse(e))}}catch(e){console.error("[Buoy]","Failed to load bubble settings:",e)}finally{a(false)}};const c=async e=>{try{await _persistentStorage.persistentStorage.setItem(STORAGE_KEY,JSON.stringify(e));n(e);t?.(e)}catch(l){console.error("[Buoy]","Failed to save bubble settings:",l)}};const d=async e=>{const l={...o,[e]:!o[e]};try{const s=await _persistentStorage.persistentStorage.getItem(USER_PREFERENCES_KEY);const u=s?JSON.parse(s):{};const b=e.replace("show","hasSet");const y={...u,[b]:true};await _persistentStorage.persistentStorage.setItem(USER_PREFERENCES_KEY,JSON.stringify(y))}catch(s){console.error("[Buoy]","Failed to save user preference marker:",s)}c(l)};if(i){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.detailContainer,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.loadingText,children:"Loading settings..."})})}const g=[{key:"showEnvironment",label:"Environment Indicator",description:"Shows current environment (dev, staging, prod)",icon:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.indicator,{backgroundColor:"#10B981"}]})},{key:"showQueryButton",label:"React Query Button",description:"Opens React Query dev tools",icon:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.indicator,{backgroundColor:"#F59E0B"}]})},{key:"showWifiToggle",label:"WiFi",description:"Toggle WiFi for testing offline scenarios",icon:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.indicator,{backgroundColor:"#8B5CF6"}]})},{key:"showEnvButton",label:"Environment Variables",description:"View and check environment variables",icon:(0,_jsxRuntime.jsx)(_index.Settings,{size:16,color:"#10B981"})},{key:"showSentryButton",label:"Sentry Events",description:"View captured Sentry events and errors",icon:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.indicator,{backgroundColor:"#a855f7"}]})},{key:"showStorageButton",label:"Storage Browser",description:"Browse and inspect AsyncStorage data",icon:(0,_jsxRuntime.jsx)(_index.Database,{size:16,color:"#3B82F6"})}];return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.detailContainer,children:(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,contentContainerStyle:styles.scrollContent,"sentry-label":"ignore bubble settings scroll",children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.header,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerTitle,children:"Developer Tools Settings"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.headerDescription,children:"Configure bubble button visibility"})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionDivider,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionTitle,children:"Bubble Button Visibility"})}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.settingsList,children:g.map(e=>(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.settingItem,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.settingIconContainer,children:e.icon}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.settingContent,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.settingLabel,children:e.label}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.settingDescription,children:e.description})]}),(0,_jsxRuntime.jsx)(_reactNative.Switch,{"sentry-label":"ignore bubble settings section",value:o[e.key],onValueChange:()=>d(e.key),trackColor:{false:"#4B5563",true:"#10B981"},thumbColor:o[e.key]?"#fff":_gameUIColors.buoyColors.textSecondary})]},e.key))}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.footer,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.noteContainer,children:[(0,_jsxRuntime.jsx)(_index.EyeOff,{size:16,color:_gameUIColors.buoyColors.textSecondary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.noteText,children:"User status indicator is always visible and cannot be disabled"})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.restartNote,children:"Changes are saved automatically and will persist across app restarts"})]})]})})}async function getBubbleVisibilitySettings(){try{const t=await _persistentStorage.persistentStorage.getItem(STORAGE_KEY);if(t){return JSON.parse(t)}}catch(t){console.error("[Buoy]","Failed to load bubble settings:",t)}return DEFAULT_SETTINGS}const styles=_reactNative.StyleSheet.create({scrollContent:{flexGrow:1},sectionCard:{backgroundColor:_gameUIColors.buoyColors.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:_gameUIColors.buoyColors.text,fontSize:14,fontWeight:"600",marginBottom:2},subtitle:{color:_gameUIColors.buoyColors.textSecondary,fontSize:12},chevron:{color:_macOSDesignSystemColors.macOSColors.text.icon,fontSize:20},detailContainer:{flex:1,backgroundColor:_gameUIColors.buoyColors.card},loadingText:{color:_gameUIColors.buoyColors.textSecondary,fontSize:14,textAlign:"center",marginTop:20},header:{padding:16,borderBottomWidth:1,borderBottomColor:"rgba(128, 128, 128, 0.2)"},headerTitle:{color:_gameUIColors.buoyColors.text,fontSize:16,fontWeight:"600",marginBottom:4},headerDescription:{color:_gameUIColors.buoyColors.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:_gameUIColors.buoyColors.text,fontSize:14,fontWeight:"500",marginBottom:2},settingDescription:{color:_macOSDesignSystemColors.macOSColors.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:_gameUIColors.buoyColors.textSecondary,fontSize:12,flex:1},restartNote:{color:_macOSDesignSystemColors.macOSColors.text.icon,fontSize:11,fontStyle:"italic"},sectionDivider:{paddingHorizontal:16,paddingVertical:8,marginTop:8,borderTopWidth:1,borderTopColor:"rgba(128, 128, 128, 0.12)"},sectionTitle:{color:_gameUIColors.buoyColors.textSecondary,fontSize:12,fontWeight:"600",letterSpacing:.5,textTransform:"uppercase"}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.devToolsStorageKeys=void 0;exports.filterOutDevToolsKeys=filterOutDevToolsKeys;exports.getAllDevToolsStorageKeys=getAllDevToolsStorageKeys;exports.isDevToolsStorageKey=isDevToolsStorageKey;const devToolsStorageKeys=exports.devToolsStorageKeys={base:"@react_buoy",bubble:{root:()=>`${devToolsStorageKeys.base}_bubble`,settings:()=>`${devToolsStorageKeys.bubble.root()}_settings`,userPreferences:()=>`${devToolsStorageKeys.bubble.root()}_user_preferences`,position:()=>`${devToolsStorageKeys.bubble.root()}_position`},modal:{root:()=>`${devToolsStorageKeys.base}_modal`,state:()=>`${devToolsStorageKeys.modal.root()}_state`,position:()=>`${devToolsStorageKeys.modal.root()}_position`,dimensions:()=>`${devToolsStorageKeys.modal.root()}_dimensions`,hintAcknowledged:()=>`${devToolsStorageKeys.modal.root()}_hint_acknowledged`},custom:e=>{const o=`${devToolsStorageKeys.base}_custom_${e}`;return{root:()=>o,modal:()=>`${o}_modal`,settings:()=>`${o}_settings`,key:t=>`${o}_${t}`}},askBuoy:{root:()=>`${devToolsStorageKeys.base}_ask_buoy`,model:()=>`${devToolsStorageKeys.askBuoy.root()}_model`},settings:{root:()=>`${devToolsStorageKeys.base}_settings`,theme:()=>`${devToolsStorageKeys.settings.root()}_theme`,preferences:()=>`${devToolsStorageKeys.settings.root()}_preferences`,wifiEnabled:()=>`${devToolsStorageKeys.settings.root()}_wifi_enabled`,global:()=>`${devToolsStorageKeys.settings.root()}_global`,activeTab:()=>`${devToolsStorageKeys.settings.root()}_active_tab`,modalOpen:()=>`${devToolsStorageKeys.settings.root()}_modal_open`},dial:{root:()=>`${devToolsStorageKeys.base}_dial`,isOpen:()=>`${devToolsStorageKeys.dial.root()}_is_open`,usage:()=>`${devToolsStorageKeys.dial.root()}_usage`},clipboard:{root:()=>`${devToolsStorageKeys.base}_clipboard`,hintAcknowledged:()=>`${devToolsStorageKeys.clipboard.root()}_hint_acknowledged`},env:{root:()=>`${devToolsStorageKeys.base}_env`,modal:()=>`${devToolsStorageKeys.env.root()}_modal`,currentEnv:()=>`${devToolsStorageKeys.env.root()}_current`,overrides:()=>`${devToolsStorageKeys.env.root()}_overrides`},sentry:{root:()=>`${devToolsStorageKeys.base}_sentry`,modal:()=>`${devToolsStorageKeys.sentry.root()}_modal`,filters:()=>`${devToolsStorageKeys.sentry.root()}_filters`,preferences:()=>`${devToolsStorageKeys.sentry.root()}_preferences`},storage:{root:()=>`${devToolsStorageKeys.base}_storage`,modal:()=>`${devToolsStorageKeys.storage.root()}_modal`,eventsModal:()=>`${devToolsStorageKeys.storage.root()}_events_modal`,filters:()=>`${devToolsStorageKeys.storage.root()}_filters`,eventFilters:()=>`${devToolsStorageKeys.storage.root()}_event_filters`,keyFilters:()=>`${devToolsStorageKeys.storage.root()}_key_filters`,pinnedKeys:()=>`${devToolsStorageKeys.storage.root()}_pinned_keys`,preferences:()=>`${devToolsStorageKeys.storage.root()}_preferences`,activeTab:()=>`${devToolsStorageKeys.storage.root()}_active_tab`,isMonitoring:()=>`${devToolsStorageKeys.storage.root()}_is_monitoring`,diffViewerMode:()=>`${devToolsStorageKeys.storage.root()}_diff_viewer_mode`},clock:{root:()=>`${devToolsStorageKeys.base}_clock`,state:()=>`${devToolsStorageKeys.clock.root()}_state`},bugLinks:{root:()=>`${devToolsStorageKeys.base}_bug_links`,links:()=>`${devToolsStorageKeys.bugLinks.root()}_links`,settings:()=>`${devToolsStorageKeys.bugLinks.root()}_settings`,loaded:()=>`${devToolsStorageKeys.bugLinks.root()}_loaded`},permissions:{root:()=>`${devToolsStorageKeys.base}_permissions`,state:()=>`${devToolsStorageKeys.permissions.root()}_state`},lifecycle:{root:()=>`${devToolsStorageKeys.base}_lifecycle`,state:()=>`${devToolsStorageKeys.lifecycle.root()}_state`},location:{root:()=>`${devToolsStorageKeys.base}_location`,state:()=>`${devToolsStorageKeys.location.root()}_state`},timeMachine:{root:()=>`${devToolsStorageKeys.base}_time_machine`,diffViewerMode:()=>`${devToolsStorageKeys.timeMachine.root()}_diff_viewer_mode`,armedPoint:()=>`${devToolsStorageKeys.timeMachine.root()}_armed_point`,barReloadMode:()=>`${devToolsStorageKeys.timeMachine.root()}_bar_reload_mode`,disabledSources:()=>`${devToolsStorageKeys.timeMachine.root()}_disabled_sources`},scenarios:{root:()=>`${devToolsStorageKeys.base}_scenarios`,modal:()=>`${devToolsStorageKeys.scenarios.root()}_modal`,library:()=>`${devToolsStorageKeys.scenarios.root()}_library`,active:()=>`${devToolsStorageKeys.scenarios.root()}_active`},reactQuery:{root:()=>`${devToolsStorageKeys.base}_rq`,modal:()=>`${devToolsStorageKeys.reactQuery.root()}_modal`,browserModal:()=>`${devToolsStorageKeys.reactQuery.root()}_browser_modal`,mutationModal:()=>`${devToolsStorageKeys.reactQuery.root()}_mutation_modal`,filters:()=>`${devToolsStorageKeys.reactQuery.root()}_filters`,ignoredPatterns:()=>`${devToolsStorageKeys.reactQuery.root()}_ignored_patterns`,includedPatterns:()=>`${devToolsStorageKeys.reactQuery.root()}_included_patterns`,preferences:()=>`${devToolsStorageKeys.reactQuery.root()}_preferences`},network:{root:()=>`${devToolsStorageKeys.base}_network`,modal:()=>`${devToolsStorageKeys.network.root()}_modal`,copyModal:()=>`${devToolsStorageKeys.network.root()}_copy_modal`,filters:()=>`${devToolsStorageKeys.network.root()}_filters`,ignoredDomains:()=>`${devToolsStorageKeys.network.root()}_ignored_domains`,ignoredUrls:()=>`${devToolsStorageKeys.network.root()}_ignored_urls`,preferences:()=>`${devToolsStorageKeys.network.root()}_preferences`,copyOptions:()=>`${devToolsStorageKeys.network.root()}_copy_options`,saved:()=>`${devToolsStorageKeys.network.root()}_saved`,overrides:()=>`${devToolsStorageKeys.network.root()}_overrides`},routeEvents:{root:()=>`${devToolsStorageKeys.base}_route_events`,modal:()=>`${devToolsStorageKeys.routeEvents.root()}_modal`,eventFilters:()=>`${devToolsStorageKeys.routeEvents.root()}_event_filters`,activeTab:()=>`${devToolsStorageKeys.routeEvents.root()}_active_tab`,isMonitoring:()=>`${devToolsStorageKeys.routeEvents.root()}_is_monitoring`,detailView:()=>`${devToolsStorageKeys.routeEvents.root()}_detail_view`,diffViewerMode:()=>`${devToolsStorageKeys.routeEvents.root()}_diff_viewer_mode`},highlightUpdates:{root:()=>`${devToolsStorageKeys.base}_highlight_updates`,modal:()=>`${devToolsStorageKeys.highlightUpdates.root()}_modal`,isTracking:()=>`${devToolsStorageKeys.highlightUpdates.root()}_is_tracking`,filters:()=>`${devToolsStorageKeys.highlightUpdates.root()}_filters`,settings:()=>`${devToolsStorageKeys.highlightUpdates.root()}_settings`,copySettings:()=>`${devToolsStorageKeys.highlightUpdates.root()}_copy_settings`},benchmark:{root:()=>`${devToolsStorageKeys.base}_benchmark`,modal:()=>`${devToolsStorageKeys.benchmark.root()}_modal`,isRecording:()=>`${devToolsStorageKeys.benchmark.root()}_is_recording`,activeTab:()=>`${devToolsStorageKeys.benchmark.root()}_active_tab`,settings:()=>`${devToolsStorageKeys.benchmark.root()}_settings`,selectedReports:()=>`${devToolsStorageKeys.benchmark.root()}_selected_reports`},debugBorders:{root:()=>`${devToolsStorageKeys.base}_debug_borders`,infoModal:()=>`${devToolsStorageKeys.debugBorders.root()}_info_modal`},events:{root:()=>`${devToolsStorageKeys.base}_events`,modal:()=>`${devToolsStorageKeys.events.root()}_modal`,enabledSources:()=>`${devToolsStorageKeys.events.root()}_enabled_sources`,isCapturing:()=>`${devToolsStorageKeys.events.root()}_is_capturing`,pausedAt:()=>`${devToolsStorageKeys.events.root()}_paused_at`,copySettings:()=>`${devToolsStorageKeys.events.root()}_copy_settings`},sync:{root:()=>`${devToolsStorageKeys.base}_sync`,deviceId:()=>`${devToolsStorageKeys.sync.root()}_device_id`}};const LEGACY_DEV_TOOL_PATTERNS=["@devtools","@dev_tools_","@modal_state_","@react_query_browser_modal","@react_query_modal","@react_query_mutation_modal","@sentry_logs_modal","@floating_rn_better_dev_tools_","@floating_tools_","@apphost_","@bubble_settings_","@env_vars_modal","@storage_modal","@floating_@devtools_","dev_last_route"];function isDevToolsStorageKey(e){if(!e)return false;for(const o of["@AsyncStorage:","CapacitorStorage."]){if(e.startsWith(o))e=e.slice(o.length)}if(e.startsWith(devToolsStorageKeys.base)){return true}if(e.startsWith("buoy-")){return true}if(e.startsWith("@buoy")){return true}if(/^(?:buoy[._]|__buoy|react-buoy)/i.test(e)){return true}for(const o of LEGACY_DEV_TOOL_PATTERNS){if(e.startsWith(o)){return true}}return false}function filterOutDevToolsKeys(e){return e.filter(o=>!isDevToolsStorageKey(o))}function getAllDevToolsStorageKeys(){const e=[];e.push(devToolsStorageKeys.bubble.settings());e.push(devToolsStorageKeys.bubble.userPreferences());e.push(devToolsStorageKeys.bubble.position());e.push(devToolsStorageKeys.modal.state());e.push(devToolsStorageKeys.modal.position());e.push(devToolsStorageKeys.modal.dimensions());e.push(devToolsStorageKeys.settings.theme());e.push(devToolsStorageKeys.settings.preferences());e.push(devToolsStorageKeys.env.currentEnv());e.push(devToolsStorageKeys.env.overrides());e.push(devToolsStorageKeys.sentry.filters());e.push(devToolsStorageKeys.sentry.preferences());e.push(devToolsStorageKeys.storage.filters());e.push(devToolsStorageKeys.storage.preferences());e.push(devToolsStorageKeys.reactQuery.filters());e.push(devToolsStorageKeys.reactQuery.preferences());return e}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.devToolsStorageKeys=void 0;exports.filterOutDevToolsKeys=filterOutDevToolsKeys;exports.getAllDevToolsStorageKeys=getAllDevToolsStorageKeys;exports.isDevToolsStorageKey=isDevToolsStorageKey;const devToolsStorageKeys=exports.devToolsStorageKeys={base:"@react_buoy",bubble:{root:()=>`${devToolsStorageKeys.base}_bubble`,settings:()=>`${devToolsStorageKeys.bubble.root()}_settings`,userPreferences:()=>`${devToolsStorageKeys.bubble.root()}_user_preferences`,position:()=>`${devToolsStorageKeys.bubble.root()}_position`},modal:{root:()=>`${devToolsStorageKeys.base}_modal`,state:()=>`${devToolsStorageKeys.modal.root()}_state`,position:()=>`${devToolsStorageKeys.modal.root()}_position`,dimensions:()=>`${devToolsStorageKeys.modal.root()}_dimensions`,hintAcknowledged:()=>`${devToolsStorageKeys.modal.root()}_hint_acknowledged`},custom:e=>{const o=`${devToolsStorageKeys.base}_custom_${e}`;return{root:()=>o,modal:()=>`${o}_modal`,settings:()=>`${o}_settings`,key:t=>`${o}_${t}`}},askBuoy:{root:()=>`${devToolsStorageKeys.base}_ask_buoy`,model:()=>`${devToolsStorageKeys.askBuoy.root()}_model`},settings:{root:()=>`${devToolsStorageKeys.base}_settings`,theme:()=>`${devToolsStorageKeys.settings.root()}_theme`,preferences:()=>`${devToolsStorageKeys.settings.root()}_preferences`,wifiEnabled:()=>`${devToolsStorageKeys.settings.root()}_wifi_enabled`,global:()=>`${devToolsStorageKeys.settings.root()}_global`,activeTab:()=>`${devToolsStorageKeys.settings.root()}_active_tab`,modalOpen:()=>`${devToolsStorageKeys.settings.root()}_modal_open`},dial:{root:()=>`${devToolsStorageKeys.base}_dial`,isOpen:()=>`${devToolsStorageKeys.dial.root()}_is_open`,usage:()=>`${devToolsStorageKeys.dial.root()}_usage`},clipboard:{root:()=>`${devToolsStorageKeys.base}_clipboard`,hintAcknowledged:()=>`${devToolsStorageKeys.clipboard.root()}_hint_acknowledged`},env:{root:()=>`${devToolsStorageKeys.base}_env`,modal:()=>`${devToolsStorageKeys.env.root()}_modal`,currentEnv:()=>`${devToolsStorageKeys.env.root()}_current`,overrides:()=>`${devToolsStorageKeys.env.root()}_overrides`},sentry:{root:()=>`${devToolsStorageKeys.base}_sentry`,modal:()=>`${devToolsStorageKeys.sentry.root()}_modal`,filters:()=>`${devToolsStorageKeys.sentry.root()}_filters`,preferences:()=>`${devToolsStorageKeys.sentry.root()}_preferences`},storage:{root:()=>`${devToolsStorageKeys.base}_storage`,modal:()=>`${devToolsStorageKeys.storage.root()}_modal`,eventsModal:()=>`${devToolsStorageKeys.storage.root()}_events_modal`,filters:()=>`${devToolsStorageKeys.storage.root()}_filters`,eventFilters:()=>`${devToolsStorageKeys.storage.root()}_event_filters`,keyFilters:()=>`${devToolsStorageKeys.storage.root()}_key_filters`,pinnedKeys:()=>`${devToolsStorageKeys.storage.root()}_pinned_keys`,preferences:()=>`${devToolsStorageKeys.storage.root()}_preferences`,activeTab:()=>`${devToolsStorageKeys.storage.root()}_active_tab`,isMonitoring:()=>`${devToolsStorageKeys.storage.root()}_is_monitoring`,diffViewerMode:()=>`${devToolsStorageKeys.storage.root()}_diff_viewer_mode`},clock:{root:()=>`${devToolsStorageKeys.base}_clock`,state:()=>`${devToolsStorageKeys.clock.root()}_state`},bugLinks:{root:()=>`${devToolsStorageKeys.base}_bug_links`,links:()=>`${devToolsStorageKeys.bugLinks.root()}_links`,settings:()=>`${devToolsStorageKeys.bugLinks.root()}_settings`,loaded:()=>`${devToolsStorageKeys.bugLinks.root()}_loaded`},permissions:{root:()=>`${devToolsStorageKeys.base}_permissions`,state:()=>`${devToolsStorageKeys.permissions.root()}_state`},lifecycle:{root:()=>`${devToolsStorageKeys.base}_lifecycle`,state:()=>`${devToolsStorageKeys.lifecycle.root()}_state`},location:{root:()=>`${devToolsStorageKeys.base}_location`,state:()=>`${devToolsStorageKeys.location.root()}_state`},timeMachine:{root:()=>`${devToolsStorageKeys.base}_time_machine`,diffViewerMode:()=>`${devToolsStorageKeys.timeMachine.root()}_diff_viewer_mode`,armedPoint:()=>`${devToolsStorageKeys.timeMachine.root()}_armed_point`,barReloadMode:()=>`${devToolsStorageKeys.timeMachine.root()}_bar_reload_mode`,disabledSources:()=>`${devToolsStorageKeys.timeMachine.root()}_disabled_sources`},scenarios:{root:()=>`${devToolsStorageKeys.base}_scenarios`,modal:()=>`${devToolsStorageKeys.scenarios.root()}_modal`,library:()=>`${devToolsStorageKeys.scenarios.root()}_library`,active:()=>`${devToolsStorageKeys.scenarios.root()}_active`,team:()=>`${devToolsStorageKeys.scenarios.root()}_team`},reactQuery:{root:()=>`${devToolsStorageKeys.base}_rq`,modal:()=>`${devToolsStorageKeys.reactQuery.root()}_modal`,browserModal:()=>`${devToolsStorageKeys.reactQuery.root()}_browser_modal`,mutationModal:()=>`${devToolsStorageKeys.reactQuery.root()}_mutation_modal`,filters:()=>`${devToolsStorageKeys.reactQuery.root()}_filters`,ignoredPatterns:()=>`${devToolsStorageKeys.reactQuery.root()}_ignored_patterns`,includedPatterns:()=>`${devToolsStorageKeys.reactQuery.root()}_included_patterns`,preferences:()=>`${devToolsStorageKeys.reactQuery.root()}_preferences`},network:{root:()=>`${devToolsStorageKeys.base}_network`,modal:()=>`${devToolsStorageKeys.network.root()}_modal`,copyModal:()=>`${devToolsStorageKeys.network.root()}_copy_modal`,filters:()=>`${devToolsStorageKeys.network.root()}_filters`,ignoredDomains:()=>`${devToolsStorageKeys.network.root()}_ignored_domains`,ignoredUrls:()=>`${devToolsStorageKeys.network.root()}_ignored_urls`,preferences:()=>`${devToolsStorageKeys.network.root()}_preferences`,copyOptions:()=>`${devToolsStorageKeys.network.root()}_copy_options`,saved:()=>`${devToolsStorageKeys.network.root()}_saved`,overrides:()=>`${devToolsStorageKeys.network.root()}_overrides`},routeEvents:{root:()=>`${devToolsStorageKeys.base}_route_events`,modal:()=>`${devToolsStorageKeys.routeEvents.root()}_modal`,eventFilters:()=>`${devToolsStorageKeys.routeEvents.root()}_event_filters`,activeTab:()=>`${devToolsStorageKeys.routeEvents.root()}_active_tab`,isMonitoring:()=>`${devToolsStorageKeys.routeEvents.root()}_is_monitoring`,detailView:()=>`${devToolsStorageKeys.routeEvents.root()}_detail_view`,diffViewerMode:()=>`${devToolsStorageKeys.routeEvents.root()}_diff_viewer_mode`},highlightUpdates:{root:()=>`${devToolsStorageKeys.base}_highlight_updates`,modal:()=>`${devToolsStorageKeys.highlightUpdates.root()}_modal`,isTracking:()=>`${devToolsStorageKeys.highlightUpdates.root()}_is_tracking`,filters:()=>`${devToolsStorageKeys.highlightUpdates.root()}_filters`,settings:()=>`${devToolsStorageKeys.highlightUpdates.root()}_settings`,copySettings:()=>`${devToolsStorageKeys.highlightUpdates.root()}_copy_settings`},benchmark:{root:()=>`${devToolsStorageKeys.base}_benchmark`,modal:()=>`${devToolsStorageKeys.benchmark.root()}_modal`,isRecording:()=>`${devToolsStorageKeys.benchmark.root()}_is_recording`,activeTab:()=>`${devToolsStorageKeys.benchmark.root()}_active_tab`,settings:()=>`${devToolsStorageKeys.benchmark.root()}_settings`,selectedReports:()=>`${devToolsStorageKeys.benchmark.root()}_selected_reports`},debugBorders:{root:()=>`${devToolsStorageKeys.base}_debug_borders`,infoModal:()=>`${devToolsStorageKeys.debugBorders.root()}_info_modal`},events:{root:()=>`${devToolsStorageKeys.base}_events`,modal:()=>`${devToolsStorageKeys.events.root()}_modal`,enabledSources:()=>`${devToolsStorageKeys.events.root()}_enabled_sources`,isCapturing:()=>`${devToolsStorageKeys.events.root()}_is_capturing`,pausedAt:()=>`${devToolsStorageKeys.events.root()}_paused_at`,copySettings:()=>`${devToolsStorageKeys.events.root()}_copy_settings`},sync:{root:()=>`${devToolsStorageKeys.base}_sync`,deviceId:()=>`${devToolsStorageKeys.sync.root()}_device_id`}};const LEGACY_DEV_TOOL_PATTERNS=["@devtools","@dev_tools_","@modal_state_","@react_query_browser_modal","@react_query_modal","@react_query_mutation_modal","@sentry_logs_modal","@floating_rn_better_dev_tools_","@floating_tools_","@apphost_","@bubble_settings_","@env_vars_modal","@storage_modal","@floating_@devtools_","dev_last_route"];function isDevToolsStorageKey(e){if(!e)return false;for(const o of["@AsyncStorage:","CapacitorStorage."]){if(e.startsWith(o))e=e.slice(o.length)}if(e.startsWith(devToolsStorageKeys.base)){return true}if(e.startsWith("buoy-")){return true}if(e.startsWith("@buoy")){return true}if(/^(?:buoy[._]|__buoy|react-buoy)/i.test(e)){return true}for(const o of LEGACY_DEV_TOOL_PATTERNS){if(e.startsWith(o)){return true}}return false}function filterOutDevToolsKeys(e){return e.filter(o=>!isDevToolsStorageKey(o))}function getAllDevToolsStorageKeys(){const e=[];e.push(devToolsStorageKeys.bubble.settings());e.push(devToolsStorageKeys.bubble.userPreferences());e.push(devToolsStorageKeys.bubble.position());e.push(devToolsStorageKeys.modal.state());e.push(devToolsStorageKeys.modal.position());e.push(devToolsStorageKeys.modal.dimensions());e.push(devToolsStorageKeys.settings.theme());e.push(devToolsStorageKeys.settings.preferences());e.push(devToolsStorageKeys.env.currentEnv());e.push(devToolsStorageKeys.env.overrides());e.push(devToolsStorageKeys.sentry.filters());e.push(devToolsStorageKeys.sentry.preferences());e.push(devToolsStorageKeys.storage.filters());e.push(devToolsStorageKeys.storage.preferences());e.push(devToolsStorageKeys.reactQuery.filters());e.push(devToolsStorageKeys.reactQuery.preferences());return e}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ChipStrip=ChipStrip;exports.useChipTap=useChipTap;var _react=require("react");var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");const TAP_SLOP_PX=5;const SCROLL_SETTLE_MS=300;function useChipTap(){const[t,r]=(0,_react.useState)(false);const n=(0,_react.useRef)(0);const o=(0,_react.useRef)(0);const l=(0,_react.useCallback)(e=>{n.current=e.nativeEvent.pageX;o.current=e.nativeEvent.pageY},[]);const c=(0,_react.useCallback)(e=>{if(!e)return true;const i=Math.abs(e.nativeEvent.pageX-n.current);const u=Math.abs(e.nativeEvent.pageY-o.current);return!(i>TAP_SLOP_PX||u>TAP_SLOP_PX||t)},[t]);const a=(0,_react.useCallback)(()=>{setTimeout(()=>r(false),SCROLL_SETTLE_MS)},[]);const s=(0,_react.useCallback)(()=>r(true),[]);return{scrollProps:{onScrollBeginDrag:s,onScrollEndDrag:a,onMomentumScrollBegin:s,onMomentumScrollEnd:a},onTouchStart:l,isTap:c}}function ChipStrip({children:t,scrollProps:r,sentryLabel:n,style:o,contentStyle:l}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.container,o],children:(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{"sentry-label":n,horizontal:true,showsHorizontalScrollIndicator:false,style:styles.scrollView,contentContainerStyle:[styles.scrollContent,l],...r,children:t})})}const styles=_reactNative.StyleSheet.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";Object.defineProperty(exports,"__esModule",{value:true});exports.ChipStrip=ChipStrip;exports.useChipTap=useChipTap;var _react=require("react");var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");const TAP_SLOP_PX=5;const SCROLL_SETTLE_MS=300;function useChipTap(){const[t,r]=(0,_react.useState)(false);const n=(0,_react.useRef)(0);const o=(0,_react.useRef)(0);const a=(0,_react.useCallback)(e=>{n.current=e.nativeEvent.pageX;o.current=e.nativeEvent.pageY},[]);const c=(0,_react.useCallback)(e=>{if(!e)return true;const i=Math.abs(e.nativeEvent.pageX-n.current);const u=Math.abs(e.nativeEvent.pageY-o.current);return!(i>TAP_SLOP_PX||u>TAP_SLOP_PX||t)},[t]);const l=(0,_react.useCallback)(()=>{setTimeout(()=>r(false),SCROLL_SETTLE_MS)},[]);const s=(0,_react.useCallback)(()=>r(true),[]);return{scrollProps:{onScrollBeginDrag:s,onScrollEndDrag:l,onMomentumScrollBegin:s,onMomentumScrollEnd:l},onTouchStart:a,isTap:c}}function ChipStrip({children:t,scrollProps:r,sentryLabel:n,style:o,contentStyle:a}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.container,o],children:(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled","sentry-label":n,horizontal:true,showsHorizontalScrollIndicator:false,style:styles.scrollView,contentContainerStyle:[styles.scrollContent,a],...r,children:t})})}const styles=_reactNative.StyleSheet.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";Object.defineProperty(exports,"__esModule",{value:true});exports.DataInspector=DataInspector;var _react=require("react");var _reactNative=require("react-native");var _index=require("../../icons/index.js");var _index2=require("../gameUI/index.js");var _CopyButton=require("./CopyButton.js");var _fonts=require("../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function DataInspector({data:i,mode:e="view",syntax:t="json",theme:n="dark",collapsible:o=true,searchable:s=true,onEdit:j,style:p,title:d}){const[l,C]=(0,_react.useState)("");const[r,c]=(0,_react.useState)(false);const[f,u]=(0,_react.useState)("");const g=()=>{if(t==="json"){try{return JSON.stringify(i,null,2)}catch{return String(i)}}return String(i)};const m=a=>{if(!l)return a;const I=a.split(new RegExp(`(${l})`,"gi"));return I.map((x,b)=>{if(x.toLowerCase()===l.toLowerCase()){return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.highlight,children:x},b)}return x})};const y=()=>{if(!r){u(g());c(true)}else{try{const a=t==="json"?JSON.parse(f):f;j?.(a);c(false)}catch(a){console.error("[Buoy]","Failed to parse edited data",a)}}};const w=()=>{c(false);u("")};const h=g();return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.container,p],children:[(d||s||e==="edit")&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.header,children:[d&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.title,children:d}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.controls,children:[s&&!r&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.searchContainer,children:[(0,_jsxRuntime.jsx)(_index.Search,{size:12,color:_index2.gameUIColors.secondary}),(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.searchInput,placeholder:"Search...",placeholderTextColor:_index2.gameUIColors.tertiary,value:l,onChangeText:C})]}),e==="edit"&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.editButton,onPress:r?y:()=>y(),children:r?(0,_jsxRuntime.jsx)(_index.Check,{size:14,color:_index2.gameUIColors.success}):(0,_jsxRuntime.jsx)(_index.Edit3,{size:14,color:_index2.gameUIColors.primary})}),r&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.cancelButton,onPress:w,children:(0,_jsxRuntime.jsx)(_index.X,{size:14,color:_index2.gameUIColors.error})}),!r&&(0,_jsxRuntime.jsx)(_CopyButton.CopyButton,{value:h,size:12})]})]}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:styles.scrollView,horizontal:true,showsHorizontalScrollIndicator:false,children:(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{showsVerticalScrollIndicator:false,children:r?(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.editor,value:f,onChangeText:u,multiline:true,autoCapitalize:"none",autoCorrect:false}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.codeText,children:l?m(h):h})})})]})}DataInspector.Json=function i({data:e,searchable:t,style:n}){return(0,_jsxRuntime.jsx)(DataInspector,{data:e,syntax:"json",mode:"view",searchable:t,style:n})};DataInspector.Editable=function i({data:e,onSave:t,style:n}){return(0,_jsxRuntime.jsx)(DataInspector,{data:e,mode:"edit",onEdit:t,style:n})};DataInspector.Diff=function i({oldData:e,newData:t,style:n}){const[o,s]=(0,_react.useState)("diff");return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:n,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffControls,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.diffButton,o==="old"&&styles.diffButtonActive],onPress:()=>s("old"),children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffButtonText,children:"Old"})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.diffButton,o==="new"&&styles.diffButtonActive],onPress:()=>s("new"),children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffButtonText,children:"New"})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.diffButton,o==="diff"&&styles.diffButtonActive],onPress:()=>s("diff"),children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffButtonText,children:"Diff"})})]}),o==="old"&&(0,_jsxRuntime.jsx)(DataInspector,{data:e,searchable:false}),o==="new"&&(0,_jsxRuntime.jsx)(DataInspector,{data:t,searchable:false}),o==="diff"&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffContainer,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffPane,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffPaneTitle,children:"Old"}),(0,_jsxRuntime.jsx)(DataInspector,{data:e,searchable:false})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffPane,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffPaneTitle,children:"New"}),(0,_jsxRuntime.jsx)(DataInspector,{data:t,searchable:false})]})]})]})};const styles=_reactNative.StyleSheet.create({container:{backgroundColor:_index2.gameUIColors.background,borderRadius:8,overflow:"hidden"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:8,borderBottomWidth:1,borderBottomColor:_index2.gameUIColors.border+"20"},title:{fontSize:12,fontWeight:"600",color:_index2.gameUIColors.text},controls:{flexDirection:"row",gap:8},searchContainer:{flexDirection:"row",alignItems:"center",backgroundColor:_index2.gameUIColors.panel,borderRadius:4,paddingHorizontal:8,gap:4},searchInput:{fontSize:11,color:_index2.gameUIColors.text,minWidth:100,paddingVertical:4},editButton:{padding:4,borderRadius:4,backgroundColor:_index2.gameUIColors.primary+"20"},cancelButton:{padding:4,borderRadius:4,backgroundColor:_index2.gameUIColors.error+"20"},scrollView:{maxHeight:300},codeText:{fontFamily:_fonts.monoFont,fontSize:11,color:_index2.gameUIColors.text,padding:12,lineHeight:16},editor:{fontFamily:_fonts.monoFont,fontSize:11,color:_index2.gameUIColors.text,padding:12,lineHeight:16,minHeight:200},highlight:{backgroundColor:_index2.gameUIColors.warning+"40",color:_index2.gameUIColors.text},diffControls:{flexDirection:"row",gap:8,padding:8},diffButton:{paddingHorizontal:12,paddingVertical:4,borderRadius:4,backgroundColor:_index2.gameUIColors.panel},diffButtonActive:{backgroundColor:_index2.gameUIColors.primary},diffButtonText:{fontSize:11,color:_index2.gameUIColors.text,fontWeight:"500"},diffContainer:{flexDirection:"row",gap:8},diffPane:{flex:1},diffPaneTitle:{fontSize:10,fontWeight:"600",color:_index2.gameUIColors.secondary,padding:8,textTransform:"uppercase"}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DataInspector=DataInspector;var _react=require("react");var _reactNative=require("react-native");var _index=require("../../icons/index.js");var _index2=require("../gameUI/index.js");var _CopyButton=require("./CopyButton.js");var _fonts=require("../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function DataInspector({data:i,mode:e="view",syntax:t="json",theme:s="dark",collapsible:o=true,searchable:n=true,onEdit:j,style:p,title:d}){const[l,C]=(0,_react.useState)("");const[r,c]=(0,_react.useState)(false);const[f,u]=(0,_react.useState)("");const g=()=>{if(t==="json"){try{return JSON.stringify(i,null,2)}catch{return String(i)}}return String(i)};const m=a=>{if(!l)return a;const I=a.split(new RegExp(`(${l})`,"gi"));return I.map((x,b)=>{if(x.toLowerCase()===l.toLowerCase()){return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.highlight,children:x},b)}return x})};const y=()=>{if(!r){u(g());c(true)}else{try{const a=t==="json"?JSON.parse(f):f;j?.(a);c(false)}catch(a){console.error("[Buoy]","Failed to parse edited data",a)}}};const w=()=>{c(false);u("")};const h=g();return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.container,p],children:[(d||n||e==="edit")&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.header,children:[d&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.title,children:d}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.controls,children:[n&&!r&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.searchContainer,children:[(0,_jsxRuntime.jsx)(_index.Search,{size:12,color:_index2.gameUIColors.secondary}),(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.searchInput,placeholder:"Search...",placeholderTextColor:_index2.gameUIColors.tertiary,value:l,onChangeText:C})]}),e==="edit"&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.editButton,onPress:r?y:()=>y(),children:r?(0,_jsxRuntime.jsx)(_index.Check,{size:14,color:_index2.gameUIColors.success}):(0,_jsxRuntime.jsx)(_index.Edit3,{size:14,color:_index2.gameUIColors.primary})}),r&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.cancelButton,onPress:w,children:(0,_jsxRuntime.jsx)(_index.X,{size:14,color:_index2.gameUIColors.error})}),!r&&(0,_jsxRuntime.jsx)(_CopyButton.CopyButton,{value:h,size:12})]})]}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:styles.scrollView,horizontal:true,showsHorizontalScrollIndicator:false,children:(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:false,children:r?(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.editor,value:f,onChangeText:u,multiline:true,autoCapitalize:"none",autoCorrect:false}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.codeText,children:l?m(h):h})})})]})}DataInspector.Json=function i({data:e,searchable:t,style:s}){return(0,_jsxRuntime.jsx)(DataInspector,{data:e,syntax:"json",mode:"view",searchable:t,style:s})};DataInspector.Editable=function i({data:e,onSave:t,style:s}){return(0,_jsxRuntime.jsx)(DataInspector,{data:e,mode:"edit",onEdit:t,style:s})};DataInspector.Diff=function i({oldData:e,newData:t,style:s}){const[o,n]=(0,_react.useState)("diff");return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:s,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffControls,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.diffButton,o==="old"&&styles.diffButtonActive],onPress:()=>n("old"),children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffButtonText,children:"Old"})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.diffButton,o==="new"&&styles.diffButtonActive],onPress:()=>n("new"),children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffButtonText,children:"New"})}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:[styles.diffButton,o==="diff"&&styles.diffButtonActive],onPress:()=>n("diff"),children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffButtonText,children:"Diff"})})]}),o==="old"&&(0,_jsxRuntime.jsx)(DataInspector,{data:e,searchable:false}),o==="new"&&(0,_jsxRuntime.jsx)(DataInspector,{data:t,searchable:false}),o==="diff"&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffContainer,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffPane,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffPaneTitle,children:"Old"}),(0,_jsxRuntime.jsx)(DataInspector,{data:e,searchable:false})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffPane,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffPaneTitle,children:"New"}),(0,_jsxRuntime.jsx)(DataInspector,{data:t,searchable:false})]})]})]})};const styles=_reactNative.StyleSheet.create({container:{backgroundColor:_index2.gameUIColors.background,borderRadius:8,overflow:"hidden"},header:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:8,borderBottomWidth:1,borderBottomColor:_index2.gameUIColors.border+"20"},title:{fontSize:12,fontWeight:"600",color:_index2.gameUIColors.text},controls:{flexDirection:"row",gap:8},searchContainer:{flexDirection:"row",alignItems:"center",backgroundColor:_index2.gameUIColors.panel,borderRadius:4,paddingHorizontal:8,gap:4},searchInput:{fontSize:11,color:_index2.gameUIColors.text,minWidth:100,paddingVertical:4},editButton:{padding:4,borderRadius:4,backgroundColor:_index2.gameUIColors.primary+"20"},cancelButton:{padding:4,borderRadius:4,backgroundColor:_index2.gameUIColors.error+"20"},scrollView:{maxHeight:300},codeText:{fontFamily:_fonts.monoFont,fontSize:11,color:_index2.gameUIColors.text,padding:12,lineHeight:16},editor:{fontFamily:_fonts.monoFont,fontSize:11,color:_index2.gameUIColors.text,padding:12,lineHeight:16,minHeight:200},highlight:{backgroundColor:_index2.gameUIColors.warning+"40",color:_index2.gameUIColors.text},diffControls:{flexDirection:"row",gap:8,padding:8},diffButton:{paddingHorizontal:12,paddingVertical:4,borderRadius:4,backgroundColor:_index2.gameUIColors.panel},diffButtonActive:{backgroundColor:_index2.gameUIColors.primary},diffButtonText:{fontSize:11,color:_index2.gameUIColors.text,fontWeight:"500"},diffContainer:{flexDirection:"row",gap:8},diffPane:{flex:1},diffPaneTitle:{fontSize:10,fontWeight:"600",color:_index2.gameUIColors.secondary,padding:8,textTransform:"uppercase"}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DetailView=DetailView;var _react=require("react");var _reactNative=require("react-native");var _index=require("../gameUI/index.js");var _ModalHeader=require("./ModalHeader.js");var _CopyButton=require("./CopyButton.js");var _fonts=require("../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function DetailView({children:n,style:t}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.container,t],children:n})}DetailView.Header=function n({title:t,subtitle:e,onClose:o,onBack:i,actions:r}){return(0,_jsxRuntime.jsxs)(_ModalHeader.ModalHeader,{children:[(0,_jsxRuntime.jsx)(_ModalHeader.ModalHeader.Navigation,{onBack:i,onClose:o}),(0,_jsxRuntime.jsx)(_ModalHeader.ModalHeader.Content,{title:t,subtitle:e}),r&&(0,_jsxRuntime.jsx)(_ModalHeader.ModalHeader.Actions,{children:r})]})};DetailView.Section=function n({title:t,icon:e,children:o,defaultOpen:i=true,collapsible:r=true,style:l,badge:s}){const[a,c]=(0,_react.useState)(i);if(!r){return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.section,l],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.sectionHeader,children:[e&&(0,_jsxRuntime.jsx)(e,{size:14,color:_index.gameUIColors.primary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionTitle,children:t}),s!==void 0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionBadge,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionBadgeText,children:s})})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionContent,children:o})]})}return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.section,l],children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.sectionHeaderTouchable,onPress:()=>c(!a),children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.sectionHeader,children:[e&&(0,_jsxRuntime.jsx)(e,{size:14,color:_index.gameUIColors.primary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionTitle,children:t}),s!==void 0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionBadge,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionBadgeText,children:s})})]})}),a&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionContent,children:o})]})};DetailView.Row=function n({label:t,value:e,copyable:o=false,style:i,labelStyle:r,valueStyle:l}){const s=typeof e==="string"||typeof e==="number"?String(e):null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.row,i],children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.rowLabel,r],children:t}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.rowValueContainer,children:[typeof e==="string"||typeof e==="number"?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.rowValue,l],numberOfLines:1,children:e}):e,o&&s&&(0,_jsxRuntime.jsx)(_CopyButton.CopyButton,{value:s,size:12})]})]})};DetailView.DataSection=function n({title:t,data:e,icon:o,defaultOpen:i=false,style:r}){return(0,_jsxRuntime.jsx)(DetailView.Section,{title:t,icon:o,defaultOpen:i,style:r,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dataContainer,children:(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{horizontal:true,showsHorizontalScrollIndicator:false,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.dataText,children:JSON.stringify(e,null,2)})})})})};DetailView.StatusBar=function n({status:t,message:e,style:o}){const i={success:_index.gameUIColors.success,error:_index.gameUIColors.error,warning:_index.gameUIColors.warning,pending:_index.gameUIColors.warning,info:_index.gameUIColors.primary};const r=i[t];return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.statusBar,{backgroundColor:r+"20",borderColor:r+"40"},o],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.statusDot,{backgroundColor:r}]}),e&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.statusMessage,{color:r}],children:e})]})};DetailView.Timeline=function n({items:t,style:e}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.timeline,e],children:t.map((o,i)=>(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.timelineItem,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.timelineDot}),i<t.length-1&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.timelineLine}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.timelineContent,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.timelineLabel,children:o.label}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.timelineValue,children:o.value})]})]},i))})};DetailView.Content=function n({children:t,scrollable:e=true,style:o}){if(e){return(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:[styles.content,o],children:t})}return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.content,o],children:t})};const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:_index.gameUIColors.background},content:{flex:1,padding:16},section:{marginBottom:16,backgroundColor:_index.gameUIColors.panel,borderRadius:8,overflow:"hidden"},sectionHeader:{flexDirection:"row",alignItems:"center",padding:12,gap:8},sectionHeaderTouchable:{},sectionTitle:{flex:1,fontSize:14,fontWeight:"600",color:_index.gameUIColors.text},sectionBadge:{backgroundColor:_index.gameUIColors.primary+"20",paddingHorizontal:8,paddingVertical:2,borderRadius:4},sectionBadgeText:{fontSize:11,fontWeight:"600",color:_index.gameUIColors.primary},sectionContent:{padding:12,paddingTop:0},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:8,borderBottomWidth:1,borderBottomColor:_index.gameUIColors.border+"20"},rowLabel:{flex:1,fontSize:13,color:_index.gameUIColors.secondary},rowValueContainer:{flexDirection:"row",alignItems:"center",flex:2,gap:8},rowValue:{flex:1,fontSize:13,color:_index.gameUIColors.text,textAlign:"right"},dataContainer:{backgroundColor:_index.gameUIColors.background,borderRadius:6,padding:12},dataText:{fontSize:12,fontFamily:_fonts.monoFont,color:_index.gameUIColors.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:_index.gameUIColors.primary,marginTop:4,marginRight:12},timelineLine:{position:"absolute",left:3.5,top:12,bottom:-4,width:1,backgroundColor:_index.gameUIColors.border+"40"},timelineContent:{flex:1,marginBottom:12},timelineLabel:{fontSize:12,color:_index.gameUIColors.secondary,marginBottom:2},timelineValue:{fontSize:13,color:_index.gameUIColors.text}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DetailView=DetailView;var _react=require("react");var _reactNative=require("react-native");var _index=require("../gameUI/index.js");var _ModalHeader=require("./ModalHeader.js");var _CopyButton=require("./CopyButton.js");var _fonts=require("../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function DetailView({children:n,style:t}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.container,t],children:n})}DetailView.Header=function n({title:t,subtitle:e,onClose:o,onBack:i,actions:r}){return(0,_jsxRuntime.jsxs)(_ModalHeader.ModalHeader,{children:[(0,_jsxRuntime.jsx)(_ModalHeader.ModalHeader.Navigation,{onBack:i,onClose:o}),(0,_jsxRuntime.jsx)(_ModalHeader.ModalHeader.Content,{title:t,subtitle:e}),r&&(0,_jsxRuntime.jsx)(_ModalHeader.ModalHeader.Actions,{children:r})]})};DetailView.Section=function n({title:t,icon:e,children:o,defaultOpen:i=true,collapsible:r=true,style:l,badge:s}){const[a,c]=(0,_react.useState)(i);if(!r){return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.section,l],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.sectionHeader,children:[e&&(0,_jsxRuntime.jsx)(e,{size:14,color:_index.gameUIColors.primary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionTitle,children:t}),s!==void 0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionBadge,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionBadgeText,children:s})})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionContent,children:o})]})}return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.section,l],children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.sectionHeaderTouchable,onPress:()=>c(!a),children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.sectionHeader,children:[e&&(0,_jsxRuntime.jsx)(e,{size:14,color:_index.gameUIColors.primary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionTitle,children:t}),s!==void 0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionBadge,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionBadgeText,children:s})})]})}),a&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.sectionContent,children:o})]})};DetailView.Row=function n({label:t,value:e,copyable:o=false,style:i,labelStyle:r,valueStyle:l}){const s=typeof e==="string"||typeof e==="number"?String(e):null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.row,i],children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.rowLabel,r],children:t}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.rowValueContainer,children:[typeof e==="string"||typeof e==="number"?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.rowValue,l],numberOfLines:1,children:e}):e,o&&s&&(0,_jsxRuntime.jsx)(_CopyButton.CopyButton,{value:s,size:12})]})]})};DetailView.DataSection=function n({title:t,data:e,icon:o,defaultOpen:i=false,style:r}){return(0,_jsxRuntime.jsx)(DetailView.Section,{title:t,icon:o,defaultOpen:i,style:r,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dataContainer,children:(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{horizontal:true,showsHorizontalScrollIndicator:false,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.dataText,children:JSON.stringify(e,null,2)})})})})};DetailView.StatusBar=function n({status:t,message:e,style:o}){const i={success:_index.gameUIColors.success,error:_index.gameUIColors.error,warning:_index.gameUIColors.warning,pending:_index.gameUIColors.warning,info:_index.gameUIColors.primary};const r=i[t];return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.statusBar,{backgroundColor:r+"20",borderColor:r+"40"},o],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.statusDot,{backgroundColor:r}]}),e&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.statusMessage,{color:r}],children:e})]})};DetailView.Timeline=function n({items:t,style:e}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.timeline,e],children:t.map((o,i)=>(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.timelineItem,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.timelineDot}),i<t.length-1&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.timelineLine}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.timelineContent,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.timelineLabel,children:o.label}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.timelineValue,children:o.value})]})]},i))})};DetailView.Content=function n({children:t,scrollable:e=true,style:o}){if(e){return(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",style:[styles.content,o],children:t})}return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.content,o],children:t})};const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:_index.gameUIColors.background},content:{flex:1,padding:16},section:{marginBottom:16,backgroundColor:_index.gameUIColors.panel,borderRadius:8,overflow:"hidden"},sectionHeader:{flexDirection:"row",alignItems:"center",padding:12,gap:8},sectionHeaderTouchable:{},sectionTitle:{flex:1,fontSize:14,fontWeight:"600",color:_index.gameUIColors.text},sectionBadge:{backgroundColor:_index.gameUIColors.primary+"20",paddingHorizontal:8,paddingVertical:2,borderRadius:4},sectionBadgeText:{fontSize:11,fontWeight:"600",color:_index.gameUIColors.primary},sectionContent:{padding:12,paddingTop:0},row:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingVertical:8,borderBottomWidth:1,borderBottomColor:_index.gameUIColors.border+"20"},rowLabel:{flex:1,fontSize:13,color:_index.gameUIColors.secondary},rowValueContainer:{flexDirection:"row",alignItems:"center",flex:2,gap:8},rowValue:{flex:1,fontSize:13,color:_index.gameUIColors.text,textAlign:"right"},dataContainer:{backgroundColor:_index.gameUIColors.background,borderRadius:6,padding:12},dataText:{fontSize:12,fontFamily:_fonts.monoFont,color:_index.gameUIColors.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:_index.gameUIColors.primary,marginTop:4,marginRight:12},timelineLine:{position:"absolute",left:3.5,top:12,bottom:-4,width:1,backgroundColor:_index.gameUIColors.border+"40"},timelineContent:{flex:1,marginBottom:12},timelineLabel:{fontSize:12,color:_index.gameUIColors.secondary,marginBottom:2},timelineValue:{fontSize:13,color:_index.gameUIColors.text}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DynamicFilterView=DynamicFilterView;var _reactNative=require("react-native");var _react=require("react");var _index=require("../../icons/index.js");var _SectionHeader=require("./SectionHeader.js");var _FilterComponents=require("./FilterComponents.js");var _useFilterManager=require("../../hooks/useFilterManager.js");var _gameUIColors=require("../gameUI/constants/gameUIColors.js");var _nightTheme=require("../night/nightTheme.js");var _fonts=require("../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function DynamicFilterView({sections:y=[],filterSummarySection:l,addFilterSection:g,includeOnlySection:t,availableItemsSection:c,howItWorksSection:a,previewSection:d,onFilterChange:b,onPatternToggle:f,onPatternAdd:h,activePatterns:n=new Set,renderPatternMeta:C,tabs:s,activeTab:j,onTabChange:m}){const o=(0,_useFilterManager.useFilterManager)(n);const i=(0,_useFilterManager.useFilterManager)(t?.patterns||new Set);const[T,w]=(0,_react.useState)(s?.[0]?.id||"");const u=j||T;(0,_react.useEffect)(()=>{if(n.size!==o.filters.size||!Array.from(n).every(e=>o.filters.has(e))){}},[n,o.filters]);const F=()=>{if(o.newFilter.trim()&&h){h(o.newFilter.trim());o.addFilter(o.newFilter)}};const S=()=>{if(i.newFilter.trim()&&t?.onPatternAdd){t.onPatternAdd(i.newFilter.trim());i.addFilter(i.newFilter)}};const x=c?.items?.filter(e=>{return!Array.from(n).some(r=>e.includes(r))})||[];const z=()=>{if(!s||s.length===0)return null;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.tabContainer,children:s.map(e=>(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{onPress:()=>{if(m)m(e.id);else w(e.id)},style:[styles.tabButton,u===e.id?styles.tabButtonActive:styles.tabButtonInactive],children:[e.icon&&(0,_jsxRuntime.jsx)(e.icon,{size:14,color:u===e.id?_gameUIColors.buoyColors.primary:_nightTheme.night.color.textTertiary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.tabButtonText,u===e.id?styles.tabButtonTextActive:styles.tabButtonTextInactive],children:e.label}),e.count!==void 0&&e.count>0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.tabBadge,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.tabBadgeText,children:e.count})})]},e.id))})};const I=e=>{if(e.type==="custom"&&e.renderCustom){return e.renderCustom()}if(e.type==="patterns"){return null}if(!e.data||e.data.length===0)return null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[e.icon&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:e.icon,color:e.color||_gameUIColors.buoyColors.primary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:e.title})]}),e.description&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionDescription,children:e.description}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.filterGrid,children:e.data.map(r=>{const p=r.count!==void 0;const v=p&&r.count===0;const B=e.type!=="method"||r.icon;return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{testID:`buoy-filter-option-${r.id}`,accessibilityRole:"button",accessibilityLabel:String(r.label??r.id),style:[styles.filterCard,r.isActive&&styles.activeFilterCard],onPress:()=>b?.(r.id,r.value),children:[r.icon?(0,_jsxRuntime.jsx)(r.icon,{size:24,color:r.color,style:styles.filterIcon}):e.type==="method"?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.methodBadgeCompact,{backgroundColor:`${r.color}20`}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.methodTextCompact,{color:r.color}],numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,children:r.label})}):null,p&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[v?styles.filterCountZero:styles.filterCountActive],children:r.count}),B&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.filterLabelCompact,children:r.label}),r.description&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.filterDescriptionBottom,children:r.description})]},r.id)})})]},e.id)};const H=()=>{if(s&&u){const e=s.find(r=>r.id===u);if(e?.content){return e.content()}}return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[l?.enabled&&(l.includePatterns?.size||l.excludePatterns?.size)?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.filterSummarySection,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.filterSummaryHeader,children:[(0,_jsxRuntime.jsx)(_index.Info,{size:14,color:_gameUIColors.buoyColors.warning}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.filterSummaryTitle,children:"Filters Active"})]}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.filterSummaryText,children:["Showing ",l.filteredCount," of ",l.totalCount," queries",l.includePatterns?.size?(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.filterSummaryInclude,children:[" ","\u2022 Including: ",Array.from(l.includePatterns).join(", ")]}):null,l.excludePatterns?.size?(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.filterSummaryExclude,children:[" ","\u2022 Excluding: ",Array.from(l.excludePatterns).join(", ")]}):null]})]}):null,y.map(I),t?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.includeOnlySection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:t.icon||_index.Eye,color:_gameUIColors.buoyColors.success,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:t.title||"INCLUDE ONLY FILTERS"}),t.patterns.size>0&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:t.patterns.size,color:_gameUIColors.buoyColors.success})]}),t.description&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.includeOnlyDescription,children:t.description}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.includeOnlyInputWrapper,children:!i.showAddInput?(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterButton,{onPress:()=>i.setShowAddInput(true),color:_gameUIColors.buoyColors.success,label:"Add include pattern",testID:"buoy-filter-include-add-open"}):(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterInput,{value:i.newFilter,onChange:i.setNewFilter,onSubmit:S,onCancel:()=>{i.setShowAddInput(false);i.setNewFilter("")},placeholder:t.placeholder||"Enter pattern to include...",color:_gameUIColors.buoyColors.success,testID:"buoy-filter-include-input"})}),t.patterns.size>0&&(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{testID:"buoy-filter-include-scroll",style:styles.includeOnlyFiltersContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:(0,_jsxRuntime.jsx)(_FilterComponents.FilterList,{filters:t.patterns,onRemoveFilter:t.onPatternToggle,color:_gameUIColors.buoyColors.success,renderItemMeta:t.renderPatternMeta})})]}),g?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.excludeFiltersSection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:_index.Filter,color:_gameUIColors.buoyColors.primary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:g.title||"EXCLUDE FILTERS"}),n.size>0&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:n.size,color:_gameUIColors.buoyColors.primary})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.excludeFiltersDescription,children:"Hide queries matching these patterns from the list."}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.excludeFiltersInputWrapper,children:!o.showAddInput?(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterButton,{onPress:()=>o.setShowAddInput(true),color:_gameUIColors.buoyColors.primary,label:"Add exclude pattern"}):(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[g.renderExtra?.(),(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterInput,{value:o.newFilter,onChange:o.setNewFilter,onSubmit:F,onCancel:()=>{o.setShowAddInput(false);o.setNewFilter("")},placeholder:g.placeholder||"Enter pattern to exclude...",color:_gameUIColors.buoyColors.primary})]})}),n.size>0&&(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{testID:"buoy-filter-active-scroll",style:styles.excludeFiltersContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:(0,_jsxRuntime.jsx)(_FilterComponents.FilterList,{filters:n,onRemoveFilter:f,color:_gameUIColors.buoyColors.primary,renderItemMeta:C})})]}),c?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.availableKeysSection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:c.icon||_index.Plus,color:_gameUIColors.buoyColors.primary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:c.title||"AVAILABLE ITEMS"}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:x.length,color:_gameUIColors.buoyColors.primary})]}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:styles.availableKeysScroll,horizontal:false,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,scrollEnabled:true,children:x.length>0?x.map(e=>(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{onPress:()=>{if(h){h(e);o.addFilter(e)}},style:styles.availableKeyItem,"sentry-label":"ignore-touchable-opacity",testID:`buoy-filter-available-${e}`,accessibilityRole:"button",accessibilityLabel:`Add filter ${e}`,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.availableKeyText,numberOfLines:1,children:e}),(0,_jsxRuntime.jsx)(_index.Plus,{size:12,color:_gameUIColors.buoyColors.primary})]},e)):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.emptyStateText,children:c.emptyMessage||"No items available"})})]}),a?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.howItWorksSection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:a.icon||_index.Filter,color:_nightTheme.night.color.textSecondary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:a.title||"HOW FILTERS WORK"})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.howItWorksText,children:a.description||"Filters help you focus on relevant data by hiding unwanted items."}),a.examples&&a.examples.length>0&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.examplesContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.examplesTitle,children:"EXAMPLES:"}),a.examples.map((e,r)=>(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.exampleItem,children:e},r))]})]}),d?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.previewSection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:d.icon||_index.Copy,color:_gameUIColors.buoyColors.primary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:d.title||"PREVIEW"}),d.headerActions&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Actions,{children:d.headerActions()})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.previewContent,children:d.content()})]})]})};return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,children:[z(),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{testID:"buoy-filter-scroll",style:styles.content,contentContainerStyle:styles.scrollContent,showsVerticalScrollIndicator:false,"sentry-label":"ignore-scrollview",children:H()})]})}const styles=_reactNative.StyleSheet.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:_nightTheme.night.color.surface,borderBottomWidth:1,borderBottomColor:_nightTheme.night.color.border},tabButton:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1},tabButtonActive:{backgroundColor:_gameUIColors.buoyColors.primary+"20",borderColor:_gameUIColors.buoyColors.primary,borderWidth:2},tabButtonInactive:{backgroundColor:_nightTheme.night.color.surfaceElevated,borderColor:_nightTheme.night.color.border},tabButtonText:{fontSize:11,fontWeight:"600",letterSpacing:.5},tabButtonTextActive:{color:_gameUIColors.buoyColors.primary},tabButtonTextInactive:{color:_nightTheme.night.color.textTertiary},tabBadge:{backgroundColor:_gameUIColors.buoyColors.primary+"40",paddingHorizontal:6,paddingVertical:1,borderRadius:8,minWidth:18,alignItems:"center"},tabBadgeText:{fontSize:9,color:_gameUIColors.buoyColors.primary,fontWeight:"700"},section:{marginBottom:8},filterInputWrapper:{marginBottom:4},filterGrid:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:8},filterCard:{backgroundColor:_nightTheme.night.color.surface,borderRadius:12,paddingHorizontal:8,paddingVertical:10,flexDirection:"column",alignItems:"center",justifyContent:"center",borderWidth:1,borderColor:_nightTheme.night.color.border,width:72,minHeight:68},activeFilterCard:{backgroundColor:_gameUIColors.buoyColors.primary+"33",borderColor:_gameUIColors.buoyColors.primary,borderWidth:2,shadowColor:_gameUIColors.buoyColors.primary,shadowOffset:{width:0,height:0},shadowOpacity:.3,shadowRadius:8,elevation:4},filterIcon:{marginBottom:0},filterCountActive:{fontSize:14,fontWeight:"700",color:_nightTheme.night.color.text,fontFamily:_fonts.monoFont,marginTop:3,marginBottom:1,textShadowColor:"rgba(0, 0, 0, 0.2)",textShadowOffset:{width:0,height:.5},textShadowRadius:1},filterCountZero:{fontSize:11,fontWeight:"500",color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,marginTop:3,marginBottom:1},filterLabelCompact:{fontSize:10,color:_nightTheme.night.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:_nightTheme.night.color.textTertiary,textAlign:"center",marginTop:2,lineHeight:11},sectionDescription:{fontSize:10,color:_nightTheme.night.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:_fonts.monoFont},activeFiltersSection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.border,marginTop:16,overflow:"hidden"},activeFiltersContent:{paddingHorizontal:16,paddingTop:8,paddingBottom:16,maxHeight:200},includeOnlySection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.border,marginTop:16,overflow:"hidden"},includeOnlyDescription:{fontSize:10,color:_nightTheme.night.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:14},includeOnlyInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},includeOnlyFiltersContent:{paddingHorizontal:16,paddingBottom:16,maxHeight:150},excludeFiltersSection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.border,marginTop:16,overflow:"hidden"},excludeFiltersDescription:{fontSize:10,color:_nightTheme.night.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:14},excludeFiltersInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},excludeFiltersContent:{paddingHorizontal:16,paddingBottom:16,maxHeight:150},filterSummarySection:{backgroundColor:_gameUIColors.buoyColors.warning+"15",borderRadius:8,borderWidth:1,borderColor:_gameUIColors.buoyColors.warning+"40",padding:12,marginBottom:12},filterSummaryHeader:{flexDirection:"row",alignItems:"center",gap:6,marginBottom:6},filterSummaryTitle:{fontSize:12,fontWeight:"600",color:_gameUIColors.buoyColors.warning},filterSummaryText:{fontSize:11,color:_nightTheme.night.color.text,lineHeight:16},filterSummaryInclude:{color:_gameUIColors.buoyColors.success,fontWeight:"500"},filterSummaryExclude:{color:_gameUIColors.buoyColors.primary,fontWeight:"500"},emptyStateText:{fontSize:11,color:_nightTheme.night.color.textTertiary,fontStyle:"italic",textAlign:"center",paddingVertical:12},availableKeysSection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.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:_nightTheme.night.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:_nightTheme.night.color.border,marginBottom:8},availableKeyText:{flex:1,fontSize:11,color:_nightTheme.night.color.text,fontFamily:_fonts.monoFont,marginRight:8},howItWorksSection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.border,marginTop:16,overflow:"hidden"},howItWorksText:{fontSize:11,color:_nightTheme.night.color.textSecondary,lineHeight:16,marginBottom:12,marginTop:8,paddingHorizontal:16,fontFamily:_fonts.monoFont},examplesContainer:{paddingTop:8,paddingHorizontal:16,paddingBottom:16,borderTopWidth:1,borderTopColor:_nightTheme.night.color.border},examplesTitle:{fontSize:10,fontWeight:"600",color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,lineHeight:16},previewSection:{backgroundColor:_nightTheme.night.color.surfaceElevated,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.fillTertiary,marginTop:16,overflow:"hidden"},previewContent:{paddingHorizontal:16,paddingTop:12,paddingBottom:16,backgroundColor:_nightTheme.night.color.bg,marginHorizontal:12,marginBottom:12,borderRadius:8,borderWidth:1,borderColor:_nightTheme.night.color.border}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.DynamicFilterView=DynamicFilterView;var _reactNative=require("react-native");var _react=require("react");var _index=require("../../icons/index.js");var _SectionHeader=require("./SectionHeader.js");var _FilterComponents=require("./FilterComponents.js");var _useFilterManager=require("../../hooks/useFilterManager.js");var _gameUIColors=require("../gameUI/constants/gameUIColors.js");var _nightTheme=require("../night/nightTheme.js");var _fonts=require("../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function DynamicFilterView({sections:y=[],filterSummarySection:l,addFilterSection:h,includeOnlySection:t,availableItemsSection:c,howItWorksSection:a,previewSection:d,onFilterChange:b,onPatternToggle:f,onPatternAdd:g,activePatterns:n=new Set,renderPatternMeta:C,tabs:s,activeTab:T,onTabChange:p}){const o=(0,_useFilterManager.useFilterManager)(n);const i=(0,_useFilterManager.useFilterManager)(t?.patterns||new Set);const[j,w]=(0,_react.useState)(s?.[0]?.id||"");const u=T||j;(0,_react.useEffect)(()=>{if(n.size!==o.filters.size||!Array.from(n).every(e=>o.filters.has(e))){}},[n,o.filters]);const S=()=>{if(o.newFilter.trim()&&g){g(o.newFilter.trim());o.addFilter(o.newFilter)}};const F=()=>{if(i.newFilter.trim()&&t?.onPatternAdd){t.onPatternAdd(i.newFilter.trim());i.addFilter(i.newFilter)}};const x=c?.items?.filter(e=>{return!Array.from(n).some(r=>e.includes(r))})||[];const z=()=>{if(!s||s.length===0)return null;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.tabContainer,children:s.map(e=>(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{onPress:()=>{if(p)p(e.id);else w(e.id)},style:[styles.tabButton,u===e.id?styles.tabButtonActive:styles.tabButtonInactive],children:[e.icon&&(0,_jsxRuntime.jsx)(e.icon,{size:14,color:u===e.id?_gameUIColors.buoyColors.primary:_nightTheme.night.color.textTertiary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.tabButtonText,u===e.id?styles.tabButtonTextActive:styles.tabButtonTextInactive],children:e.label}),e.count!==void 0&&e.count>0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.tabBadge,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.tabBadgeText,children:e.count})})]},e.id))})};const I=e=>{if(e.type==="custom"&&e.renderCustom){return e.renderCustom()}if(e.type==="patterns"){return null}if(!e.data||e.data.length===0)return null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[e.icon&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:e.icon,color:e.color||_gameUIColors.buoyColors.primary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:e.title})]}),e.description&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.sectionDescription,children:e.description}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.filterGrid,children:e.data.map(r=>{const m=r.count!==void 0;const v=m&&r.count===0;const B=e.type!=="method"||r.icon;return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{testID:`buoy-filter-option-${r.id}`,accessibilityRole:"button",accessibilityLabel:String(r.label??r.id),style:[styles.filterCard,r.isActive&&styles.activeFilterCard],onPress:()=>b?.(r.id,r.value),children:[r.icon?(0,_jsxRuntime.jsx)(r.icon,{size:24,color:r.color,style:styles.filterIcon}):e.type==="method"?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.methodBadgeCompact,{backgroundColor:`${r.color}20`}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.methodTextCompact,{color:r.color}],numberOfLines:1,adjustsFontSizeToFit:true,minimumFontScale:.8,children:r.label})}):null,m&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[v?styles.filterCountZero:styles.filterCountActive],children:r.count}),B&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.filterLabelCompact,children:r.label}),r.description&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.filterDescriptionBottom,children:r.description})]},r.id)})})]},e.id)};const H=()=>{if(s&&u){const e=s.find(r=>r.id===u);if(e?.content){return e.content()}}return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[l?.enabled&&(l.includePatterns?.size||l.excludePatterns?.size)?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.filterSummarySection,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.filterSummaryHeader,children:[(0,_jsxRuntime.jsx)(_index.Info,{size:14,color:_gameUIColors.buoyColors.warning}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.filterSummaryTitle,children:"Filters Active"})]}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.filterSummaryText,children:["Showing ",l.filteredCount," of ",l.totalCount," queries",l.includePatterns?.size?(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.filterSummaryInclude,children:[" ","\u2022 Including: ",Array.from(l.includePatterns).join(", ")]}):null,l.excludePatterns?.size?(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.filterSummaryExclude,children:[" ","\u2022 Excluding: ",Array.from(l.excludePatterns).join(", ")]}):null]})]}):null,y.map(I),t?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.includeOnlySection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:t.icon||_index.Eye,color:_gameUIColors.buoyColors.success,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:t.title||"INCLUDE ONLY FILTERS"}),t.patterns.size>0&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:t.patterns.size,color:_gameUIColors.buoyColors.success})]}),t.description&&(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.includeOnlyDescription,children:t.description}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.includeOnlyInputWrapper,children:!i.showAddInput?(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterButton,{onPress:()=>i.setShowAddInput(true),color:_gameUIColors.buoyColors.success,label:"Add include pattern",testID:"buoy-filter-include-add-open"}):(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterInput,{value:i.newFilter,onChange:i.setNewFilter,onSubmit:F,onCancel:()=>{i.setShowAddInput(false);i.setNewFilter("")},placeholder:t.placeholder||"Enter pattern to include...",color:_gameUIColors.buoyColors.success,testID:"buoy-filter-include-input"})}),t.patterns.size>0&&(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",testID:"buoy-filter-include-scroll",style:styles.includeOnlyFiltersContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:(0,_jsxRuntime.jsx)(_FilterComponents.FilterList,{filters:t.patterns,onRemoveFilter:t.onPatternToggle,color:_gameUIColors.buoyColors.success,renderItemMeta:t.renderPatternMeta})})]}),h?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.excludeFiltersSection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:_index.Filter,color:_gameUIColors.buoyColors.primary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:h.title||"EXCLUDE FILTERS"}),n.size>0&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:n.size,color:_gameUIColors.buoyColors.primary})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.excludeFiltersDescription,children:"Hide queries matching these patterns from the list."}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.excludeFiltersInputWrapper,children:!o.showAddInput?(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterButton,{onPress:()=>o.setShowAddInput(true),color:_gameUIColors.buoyColors.primary,label:"Add exclude pattern"}):(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[h.renderExtra?.(),(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterInput,{value:o.newFilter,onChange:o.setNewFilter,onSubmit:S,onCancel:()=>{o.setShowAddInput(false);o.setNewFilter("")},placeholder:h.placeholder||"Enter pattern to exclude...",color:_gameUIColors.buoyColors.primary})]})}),n.size>0&&(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",testID:"buoy-filter-active-scroll",style:styles.excludeFiltersContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:(0,_jsxRuntime.jsx)(_FilterComponents.FilterList,{filters:n,onRemoveFilter:f,color:_gameUIColors.buoyColors.primary,renderItemMeta:C})})]}),c?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.availableKeysSection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:c.icon||_index.Plus,color:_gameUIColors.buoyColors.primary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:c.title||"AVAILABLE ITEMS"}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:x.length,color:_gameUIColors.buoyColors.primary})]}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:styles.availableKeysScroll,horizontal:false,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,scrollEnabled:true,children:x.length>0?x.map(e=>(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{onPress:()=>{if(g){g(e);o.addFilter(e)}},style:styles.availableKeyItem,"sentry-label":"ignore-touchable-opacity",testID:`buoy-filter-available-${e}`,accessibilityRole:"button",accessibilityLabel:`Add filter ${e}`,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.availableKeyText,numberOfLines:1,children:e}),(0,_jsxRuntime.jsx)(_index.Plus,{size:12,color:_gameUIColors.buoyColors.primary})]},e)):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.emptyStateText,children:c.emptyMessage||"No items available"})})]}),a?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.howItWorksSection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:a.icon||_index.Filter,color:_nightTheme.night.color.textSecondary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:a.title||"HOW FILTERS WORK"})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.howItWorksText,children:a.description||"Filters help you focus on relevant data by hiding unwanted items."}),a.examples&&a.examples.length>0&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.examplesContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.examplesTitle,children:"EXAMPLES:"}),a.examples.map((e,r)=>(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.exampleItem,children:e},r))]})]}),d?.enabled&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.previewSection,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:d.icon||_index.Copy,color:_gameUIColors.buoyColors.primary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:d.title||"PREVIEW"}),d.headerActions&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Actions,{children:d.headerActions()})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.previewContent,children:d.content()})]})]})};return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,children:[z(),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",testID:"buoy-filter-scroll",style:styles.content,contentContainerStyle:styles.scrollContent,showsVerticalScrollIndicator:false,"sentry-label":"ignore-scrollview",children:H()})]})}const styles=_reactNative.StyleSheet.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:_nightTheme.night.color.surface,borderBottomWidth:1,borderBottomColor:_nightTheme.night.color.border},tabButton:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6,paddingVertical:10,paddingHorizontal:16,borderRadius:8,borderWidth:1},tabButtonActive:{backgroundColor:_gameUIColors.buoyColors.primary+"20",borderColor:_gameUIColors.buoyColors.primary,borderWidth:2},tabButtonInactive:{backgroundColor:_nightTheme.night.color.surfaceElevated,borderColor:_nightTheme.night.color.border},tabButtonText:{fontSize:11,fontWeight:"600",letterSpacing:.5},tabButtonTextActive:{color:_gameUIColors.buoyColors.primary},tabButtonTextInactive:{color:_nightTheme.night.color.textTertiary},tabBadge:{backgroundColor:_gameUIColors.buoyColors.primary+"40",paddingHorizontal:6,paddingVertical:1,borderRadius:8,minWidth:18,alignItems:"center"},tabBadgeText:{fontSize:9,color:_gameUIColors.buoyColors.primary,fontWeight:"700"},section:{marginBottom:8},filterInputWrapper:{marginBottom:4},filterGrid:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:8},filterCard:{backgroundColor:_nightTheme.night.color.surface,borderRadius:12,paddingHorizontal:8,paddingVertical:10,flexDirection:"column",alignItems:"center",justifyContent:"center",borderWidth:1,borderColor:_nightTheme.night.color.border,width:72,minHeight:68},activeFilterCard:{backgroundColor:_gameUIColors.buoyColors.primary+"33",borderColor:_gameUIColors.buoyColors.primary,borderWidth:2,shadowColor:_gameUIColors.buoyColors.primary,shadowOffset:{width:0,height:0},shadowOpacity:.3,shadowRadius:8,elevation:4},filterIcon:{marginBottom:0},filterCountActive:{fontSize:14,fontWeight:"700",color:_nightTheme.night.color.text,fontFamily:_fonts.monoFont,marginTop:3,marginBottom:1,textShadowColor:"rgba(0, 0, 0, 0.2)",textShadowOffset:{width:0,height:.5},textShadowRadius:1},filterCountZero:{fontSize:11,fontWeight:"500",color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,marginTop:3,marginBottom:1},filterLabelCompact:{fontSize:10,color:_nightTheme.night.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:_nightTheme.night.color.textTertiary,textAlign:"center",marginTop:2,lineHeight:11},sectionDescription:{fontSize:10,color:_nightTheme.night.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:_fonts.monoFont},activeFiltersSection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.border,marginTop:16,overflow:"hidden"},activeFiltersContent:{paddingHorizontal:16,paddingTop:8,paddingBottom:16,maxHeight:200},includeOnlySection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.border,marginTop:16,overflow:"hidden"},includeOnlyDescription:{fontSize:10,color:_nightTheme.night.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:14},includeOnlyInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},includeOnlyFiltersContent:{paddingHorizontal:16,paddingBottom:16,maxHeight:150},excludeFiltersSection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.border,marginTop:16,overflow:"hidden"},excludeFiltersDescription:{fontSize:10,color:_nightTheme.night.color.textSecondary,paddingHorizontal:16,paddingTop:8,lineHeight:14},excludeFiltersInputWrapper:{paddingHorizontal:16,paddingTop:8,paddingBottom:8},excludeFiltersContent:{paddingHorizontal:16,paddingBottom:16,maxHeight:150},filterSummarySection:{backgroundColor:_gameUIColors.buoyColors.warning+"15",borderRadius:8,borderWidth:1,borderColor:_gameUIColors.buoyColors.warning+"40",padding:12,marginBottom:12},filterSummaryHeader:{flexDirection:"row",alignItems:"center",gap:6,marginBottom:6},filterSummaryTitle:{fontSize:12,fontWeight:"600",color:_gameUIColors.buoyColors.warning},filterSummaryText:{fontSize:11,color:_nightTheme.night.color.text,lineHeight:16},filterSummaryInclude:{color:_gameUIColors.buoyColors.success,fontWeight:"500"},filterSummaryExclude:{color:_gameUIColors.buoyColors.primary,fontWeight:"500"},emptyStateText:{fontSize:11,color:_nightTheme.night.color.textTertiary,fontStyle:"italic",textAlign:"center",paddingVertical:12},availableKeysSection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.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:_nightTheme.night.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:_nightTheme.night.color.border,marginBottom:8},availableKeyText:{flex:1,fontSize:11,color:_nightTheme.night.color.text,fontFamily:_fonts.monoFont,marginRight:8},howItWorksSection:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.border,marginTop:16,overflow:"hidden"},howItWorksText:{fontSize:11,color:_nightTheme.night.color.textSecondary,lineHeight:16,marginBottom:12,marginTop:8,paddingHorizontal:16,fontFamily:_fonts.monoFont},examplesContainer:{paddingTop:8,paddingHorizontal:16,paddingBottom:16,borderTopWidth:1,borderTopColor:_nightTheme.night.color.border},examplesTitle:{fontSize:10,fontWeight:"600",color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,lineHeight:16},previewSection:{backgroundColor:_nightTheme.night.color.surfaceElevated,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.color.fillTertiary,marginTop:16,overflow:"hidden"},previewContent:{paddingHorizontal:16,paddingTop:12,paddingBottom:16,backgroundColor:_nightTheme.night.color.bg,marginHorizontal:12,marginBottom:12,borderRadius:8,borderWidth:1,borderColor:_nightTheme.night.color.border}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EntityFilterView=EntityFilterView;var _react=require("react");var _reactNative=require("react-native");var _index=require("../../icons/index.js");var _nightTheme=require("../night/nightTheme.js");var _SectionHeader=require("./SectionHeader.js");var _FilterComponents=require("./FilterComponents.js");var _fonts=require("../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function isHidden(o,n){return Array.from(n).some(i=>o.name.toLowerCase().includes(i.toLowerCase()))}function colorForPattern(o,n){const i=n.find(l=>l.name.toLowerCase()===o.toLowerCase());return i?i.color:null}function EntityFilterView({entities:o,ignoredPatterns:n,onTogglePattern:i,onAddPattern:l,entityNoun:h,entitySingular:c,entityKey:a,testIDPrefix:r,slug:p,howItWorks:m,examples:u,addPlaceholder:y,emptyMessage:x}){const[f,d]=(0,_react.useState)(false);const[g,s]=(0,_react.useState)("");const T=()=>{const e=g.trim();if(e){l(e);s("");d(false)}};return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{style:styles.container,contentContainerStyle:styles.scrollContent,showsVerticalScrollIndicator:false,nestedScrollEnabled:true,testID:`${r}-filters-scroll`,children:[o.length===0&&x?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader,{children:(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader.Title,{children:["REGISTERED ",h]})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.emptyText,testID:`${r}-filters-${a}s-empty`,children:x})]}):null,o.length>0&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader.Title,{children:["REGISTERED ",h]}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:o.length,color:_nightTheme.night.color.accent,testID:`${r}-filters-${a}-count`})]}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:styles.entityList,contentContainerStyle:styles.entityListContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,testID:`${r}-filters-${a}-list`,children:o.map(e=>{const t=isHidden(e,n);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:[styles.entityRow,t&&styles.entityRowHidden],onPress:()=>l(e.name),disabled:t,testID:`${r}-filters-${a}-${p(e.name)}`,accessibilityRole:"button",accessibilityLabel:`Hide ${e.name}`,accessibilityState:{disabled:t},children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.dot,{backgroundColor:t?_nightTheme.night.color.textTertiary:e.color}]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.entityText,t?styles.entityTextHidden:{color:e.color}],numberOfLines:1,children:e.name}),t?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.hiddenLabel,children:"hidden"}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.addLabel,{color:e.color+"99"}],children:"+ hide"})]},e.name)})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:_index.Filter,color:_nightTheme.night.color.accent,size:12}),(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader.Title,{children:[c.toUpperCase()," NAME FILTERS"]}),n.size>0&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:n.size,color:_nightTheme.night.color.accent,testID:`${r}-filters-count`})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.addInputWrapper,children:!f?(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterButton,{onPress:()=>d(true),color:_nightTheme.night.color.accent,label:`Add ${c} name pattern`,testID:`${r}-filters-add-open`}):(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterInput,{value:g,onChange:s,onSubmit:T,onCancel:()=>{d(false);s("")},placeholder:y??`Enter ${c} name pattern to hide...`,color:_nightTheme.night.color.accent,testID:`${r}-filters-add-input`})}),n.size>0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.patternList,children:Array.from(n).map(e=>{const t=colorForPattern(e,o);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:styles.patternRow,onPress:()=>i(e),activeOpacity:.8,testID:`${r}-filters-chip-${p(e)}`,accessibilityRole:"button",accessibilityLabel:`Remove filter ${e}`,children:[t?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.dot,{backgroundColor:t}]}):null,(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.patternText,t?{color:t}:null],numberOfLines:1,children:e}),(0,_jsxRuntime.jsx)(_index.X,{size:12,color:_nightTheme.night.color.accent+"80"})]},e)})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:_index.Filter,color:_nightTheme.night.color.textSecondary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:"HOW EVENT FILTERS WORK"})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.howItWorksText,children:m}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.examplesContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.examplesTitle,children:"EXAMPLES:"}),u.map(e=>(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.exampleItem,children:e},e))]})]})]})}const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingTop:16,paddingHorizontal:16,paddingBottom:24,gap:16},section:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.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:_nightTheme.night.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:_nightTheme.night.color.border},entityRowHidden:{opacity:.45},dot:{width:7,height:7,borderRadius:3.5},entityText:{flex:1,fontSize:12,fontWeight:"600",fontFamily:_fonts.monoFont},entityTextHidden:{color:_nightTheme.night.color.textTertiary,textDecorationLine:"line-through"},hiddenLabel:{fontSize:10,fontWeight:"500",color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont},addLabel:{fontSize:10,fontWeight:"600",fontFamily:_fonts.monoFont},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:_nightTheme.night.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:_nightTheme.night.color.border,gap:8},patternText:{flex:1,fontSize:12,fontFamily:_fonts.monoFont,color:_nightTheme.night.color.text},emptyText:{fontSize:11,color:_nightTheme.night.color.textTertiary,paddingHorizontal:16,paddingTop:8,paddingBottom:16,fontFamily:_fonts.monoFont},howItWorksText:{fontSize:11,color:_nightTheme.night.color.textSecondary,lineHeight:16,marginTop:8,paddingHorizontal:16,fontFamily:_fonts.monoFont},examplesContainer:{paddingTop:8,paddingHorizontal:16,paddingBottom:16,borderTopWidth:1,borderTopColor:_nightTheme.night.color.border,marginTop:12},examplesTitle:{fontSize:10,fontWeight:"600",color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,lineHeight:16}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EntityFilterView=EntityFilterView;var _react=require("react");var _reactNative=require("react-native");var _index=require("../../icons/index.js");var _nightTheme=require("../night/nightTheme.js");var _SectionHeader=require("./SectionHeader.js");var _FilterComponents=require("./FilterComponents.js");var _fonts=require("../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function isHidden(o,n){return Array.from(n).some(i=>o.name.toLowerCase().includes(i.toLowerCase()))}function colorForPattern(o,n){const i=n.find(l=>l.name.toLowerCase()===o.toLowerCase());return i?i.color:null}function EntityFilterView({entities:o,ignoredPatterns:n,onTogglePattern:i,onAddPattern:l,entityNoun:h,entitySingular:d,entityKey:a,testIDPrefix:r,slug:p,howItWorks:u,examples:m,addPlaceholder:y,emptyMessage:x}){const[T,c]=(0,_react.useState)(false);const[g,s]=(0,_react.useState)("");const b=()=>{const e=g.trim();if(e){l(e);s("");c(false)}};return(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",style:styles.container,contentContainerStyle:styles.scrollContent,showsVerticalScrollIndicator:false,nestedScrollEnabled:true,testID:`${r}-filters-scroll`,children:[o.length===0&&x?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader,{children:(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader.Title,{children:["REGISTERED ",h]})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.emptyText,testID:`${r}-filters-${a}s-empty`,children:x})]}):null,o.length>0&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader.Title,{children:["REGISTERED ",h]}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:o.length,color:_nightTheme.night.color.accent,testID:`${r}-filters-${a}-count`})]}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",style:styles.entityList,contentContainerStyle:styles.entityListContent,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,testID:`${r}-filters-${a}-list`,children:o.map(e=>{const t=isHidden(e,n);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:[styles.entityRow,t&&styles.entityRowHidden],onPress:()=>l(e.name),disabled:t,testID:`${r}-filters-${a}-${p(e.name)}`,accessibilityRole:"button",accessibilityLabel:`Hide ${e.name}`,accessibilityState:{disabled:t},children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.dot,{backgroundColor:t?_nightTheme.night.color.textTertiary:e.color}]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.entityText,t?styles.entityTextHidden:{color:e.color}],numberOfLines:1,children:e.name}),t?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.hiddenLabel,children:"hidden"}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.addLabel,{color:e.color+"99"}],children:"+ hide"})]},e.name)})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:_index.Filter,color:_nightTheme.night.color.accent,size:12}),(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader.Title,{children:[d.toUpperCase()," NAME FILTERS"]}),n.size>0&&(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Badge,{count:n.size,color:_nightTheme.night.color.accent,testID:`${r}-filters-count`})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.addInputWrapper,children:!T?(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterButton,{onPress:()=>c(true),color:_nightTheme.night.color.accent,label:`Add ${d} name pattern`,testID:`${r}-filters-add-open`}):(0,_jsxRuntime.jsx)(_FilterComponents.AddFilterInput,{value:g,onChange:s,onSubmit:b,onCancel:()=>{c(false);s("")},placeholder:y??`Enter ${d} name pattern to hide...`,color:_nightTheme.night.color.accent,testID:`${r}-filters-add-input`})}),n.size>0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.patternList,children:Array.from(n).map(e=>{const t=colorForPattern(e,o);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:styles.patternRow,onPress:()=>i(e),activeOpacity:.8,testID:`${r}-filters-chip-${p(e)}`,accessibilityRole:"button",accessibilityLabel:`Remove filter ${e}`,children:[t?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.dot,{backgroundColor:t}]}):null,(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.patternText,t?{color:t}:null],numberOfLines:1,children:e}),(0,_jsxRuntime.jsx)(_index.X,{size:12,color:_nightTheme.night.color.accent+"80"})]},e)})})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.section,children:[(0,_jsxRuntime.jsxs)(_SectionHeader.SectionHeader,{children:[(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Icon,{icon:_index.Filter,color:_nightTheme.night.color.textSecondary,size:12}),(0,_jsxRuntime.jsx)(_SectionHeader.SectionHeader.Title,{children:"HOW EVENT FILTERS WORK"})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.howItWorksText,children:u}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.examplesContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.examplesTitle,children:"EXAMPLES:"}),m.map(e=>(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.exampleItem,children:e},e))]})]})]})}const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:"transparent"},scrollContent:{paddingTop:16,paddingHorizontal:16,paddingBottom:24,gap:16},section:{backgroundColor:_nightTheme.night.color.surface,borderRadius:16,borderWidth:1,borderColor:_nightTheme.night.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:_nightTheme.night.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:_nightTheme.night.color.border},entityRowHidden:{opacity:.45},dot:{width:7,height:7,borderRadius:3.5},entityText:{flex:1,fontSize:12,fontWeight:"600",fontFamily:_fonts.monoFont},entityTextHidden:{color:_nightTheme.night.color.textTertiary,textDecorationLine:"line-through"},hiddenLabel:{fontSize:10,fontWeight:"500",color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont},addLabel:{fontSize:10,fontWeight:"600",fontFamily:_fonts.monoFont},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:_nightTheme.night.color.surfaceElevated,borderRadius:8,borderWidth:1,borderColor:_nightTheme.night.color.border,gap:8},patternText:{flex:1,fontSize:12,fontFamily:_fonts.monoFont,color:_nightTheme.night.color.text},emptyText:{fontSize:11,color:_nightTheme.night.color.textTertiary,paddingHorizontal:16,paddingTop:8,paddingBottom:16,fontFamily:_fonts.monoFont},howItWorksText:{fontSize:11,color:_nightTheme.night.color.textSecondary,lineHeight:16,marginTop:8,paddingHorizontal:16,fontFamily:_fonts.monoFont},examplesContainer:{paddingTop:8,paddingHorizontal:16,paddingBottom:16,borderTopWidth:1,borderTopColor:_nightTheme.night.color.border,marginTop:12},examplesTitle:{fontSize:10,fontWeight:"600",color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,letterSpacing:.5,marginBottom:6},exampleItem:{fontSize:10,color:_nightTheme.night.color.textTertiary,fontFamily:_fonts.monoFont,lineHeight:16}});
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EventHistoryViewer=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _macOSDesignSystemColors=require("../../gameUI/constants/macOSDesignSystemColors.js");var _EventStepperFooter=require("../EventStepperFooter.js");var _ViewToggleCards=require("./ViewToggleCards.js");var _DiffModeTabs=require("./DiffModeTabs.js");var _CompareBar=require("./CompareBar.js");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(a,n){if("function"==typeof WeakMap)var i=new WeakMap,u=new WeakMap;return(_interopRequireWildcard=function(e,c){if(!c&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=c?u:i){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o})(a,n)}function DiffSectionContainer({scrolls:a,style:n,children:i}){if(!a)return(0,_jsxRuntime.jsx)(_reactNative.View,{style:n,children:i});return(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:styles.contentScroll,contentContainerStyle:styles.contentScrollInner,showsVerticalScrollIndicator:true,children:i})}const EventHistoryViewer=exports.EventHistoryViewer=(0,_react.memo)(function a({activeView:n,onViewChange:i,currentViewLabel:u,currentViewDescription:e,currentViewIcon:c,diffViewLabel:r,diffViewDescription:s,diffViewIcon:o,renderCurrentView:t,diffModeTabs:l,activeDiffMode:y,onDiffModeChange:p,renderDiffContent:g,leftEvent:S,rightEvent:h,showCompareNavigation:j,onLeftPrevious:w,onLeftNext:m,onRightPrevious:_,onRightNext:b,canLeftPrevious:V,canLeftNext:C,canRightPrevious:P,canRightNext:q,onLeftPickerOpen:E,onRightPickerOpen:D,scrollDiffSection:v,disableInternalFooter:x,footerCurrentIndex:H,footerTotalItems:f,footerItemLabel:L,footerSubtitle:O,onFooterPrevious:I,onFooterNext:N}){const d=t!=null;const R=f<=1;return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.container,{paddingBottom:!x&&f>1?96:0}],children:[d&&(0,_jsxRuntime.jsx)(_ViewToggleCards.ViewToggleCards,{activeView:n,onViewChange:i??(()=>{}),currentLabel:u??"",currentDescription:e??"",currentIcon:c,diffLabel:r,diffDescription:s,diffIcon:o,diffDisabled:R}),d&&n==="current"&&(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:styles.contentScroll,contentContainerStyle:styles.contentScrollInner,showsVerticalScrollIndicator:true,children:t?.()}),(!d||n==="diff")&&(0,_jsxRuntime.jsxs)(DiffSectionContainer,{scrolls:v,style:styles.contentSection,children:[l&&l.length>0&&p&&(0,_jsxRuntime.jsx)(_DiffModeTabs.DiffModeTabs,{tabs:l,activeTab:y??l[0]?.key??"",onTabChange:p}),(0,_jsxRuntime.jsx)(_CompareBar.CompareBar,{leftEvent:S,rightEvent:h,showNavigation:j,onLeftPrevious:w,onLeftNext:m,onRightPrevious:_,onRightNext:b,canLeftPrevious:V,canLeftNext:C,canRightPrevious:P,canRightNext:q,onLeftPress:E,onRightPress:D}),v?g():(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.diffContent,children:g()})]})]}),!x&&(0,_jsxRuntime.jsx)(_EventStepperFooter.EventStepperFooter,{currentIndex:H,totalItems:f,onPrevious:I,onNext:N,itemLabel:L,subtitle:O,absolute:true})]})});const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:_macOSDesignSystemColors.macOSColors.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";Object.defineProperty(exports,"__esModule",{value:true});exports.EventHistoryViewer=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _macOSDesignSystemColors=require("../../gameUI/constants/macOSDesignSystemColors.js");var _EventStepperFooter=require("../EventStepperFooter.js");var _ViewToggleCards=require("./ViewToggleCards.js");var _DiffModeTabs=require("./DiffModeTabs.js");var _CompareBar=require("./CompareBar.js");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(a,n){if("function"==typeof WeakMap)var i=new WeakMap,u=new WeakMap;return(_interopRequireWildcard=function(e,c){if(!c&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=c?u:i){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o})(a,n)}function DiffSectionContainer({scrolls:a,style:n,children:i}){if(!a)return(0,_jsxRuntime.jsx)(_reactNative.View,{style:n,children:i});return(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",style:styles.contentScroll,contentContainerStyle:styles.contentScrollInner,showsVerticalScrollIndicator:true,children:i})}const EventHistoryViewer=exports.EventHistoryViewer=(0,_react.memo)(function a({activeView:n,onViewChange:i,currentViewLabel:u,currentViewDescription:e,currentViewIcon:c,diffViewLabel:r,diffViewDescription:s,diffViewIcon:o,renderCurrentView:t,diffModeTabs:l,activeDiffMode:x,onDiffModeChange:p,renderDiffContent:g,leftEvent:y,rightEvent:S,showCompareNavigation:j,onLeftPrevious:w,onLeftNext:b,onRightPrevious:m,onRightNext:_,canLeftPrevious:V,canLeftNext:C,canRightPrevious:P,canRightNext:q,onLeftPickerOpen:E,onRightPickerOpen:k,scrollDiffSection:v,disableInternalFooter:h,footerCurrentIndex:D,footerTotalItems:d,footerItemLabel:H,footerSubtitle:L,onFooterPrevious:O,onFooterNext:I}){const f=t!=null;const N=d<=1;return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.container,{paddingBottom:!h&&d>1?96:0}],children:[f&&(0,_jsxRuntime.jsx)(_ViewToggleCards.ViewToggleCards,{activeView:n,onViewChange:i??(()=>{}),currentLabel:u??"",currentDescription:e??"",currentIcon:c,diffLabel:r,diffDescription:s,diffIcon:o,diffDisabled:N}),f&&n==="current"&&(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",style:styles.contentScroll,contentContainerStyle:styles.contentScrollInner,showsVerticalScrollIndicator:true,children:t?.()}),(!f||n==="diff")&&(0,_jsxRuntime.jsxs)(DiffSectionContainer,{scrolls:v,style:styles.contentSection,children:[l&&l.length>0&&p&&(0,_jsxRuntime.jsx)(_DiffModeTabs.DiffModeTabs,{tabs:l,activeTab:x??l[0]?.key??"",onTabChange:p}),(0,_jsxRuntime.jsx)(_CompareBar.CompareBar,{leftEvent:y,rightEvent:S,showNavigation:j,onLeftPrevious:w,onLeftNext:b,onRightPrevious:m,onRightNext:_,canLeftPrevious:V,canLeftNext:C,canRightPrevious:P,canRightNext:q,onLeftPress:E,onRightPress:k}),v?g():(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.diffContent,children:g()})]})]}),!h&&(0,_jsxRuntime.jsx)(_EventStepperFooter.EventStepperFooter,{currentIndex:D,totalItems:d,onPrevious:O,onNext:I,itemLabel:H,subtitle:L,absolute:true})]})});const styles=_reactNative.StyleSheet.create({container:{flex:1,backgroundColor:_macOSDesignSystemColors.macOSColors.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";Object.defineProperty(exports,"__esModule",{value:true});exports.EventPickerModal=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _absoluteFill=require("../../../utils/absoluteFill.js");var _macOSDesignSystemColors=require("../../gameUI/constants/macOSDesignSystemColors.js");var _lucideIcons=require("../../../icons/lucide-icons.js");var _fonts=require("../../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(n,l){if("function"==typeof WeakMap)var i=new WeakMap,c=new WeakMap;return(_interopRequireWildcard=function(t,s){if(!s&&t&&t.__esModule)return t;var r,o,e={__proto__:null,default:t};if(null===t||"object"!=typeof t&&"function"!=typeof t)return e;if(r=s?c:i){if(r.has(t))return r.get(t);r.set(t,e)}for(const a in t)"default"!==a&&{}.hasOwnProperty.call(t,a)&&((o=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(t,a))&&(o.get||o.set)?r(e,a,o):e[a]=t[a]);return e})(n,l)}const EventPickerModal=exports.EventPickerModal=(0,_react.memo)(function n({isOpen:l,onClose:i,title:c,position:t,items:s,onSelect:r}){if(!l)return null;const o=t==="left";return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.overlay,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.backdrop,activeOpacity:1,onPress:i}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.card,o?styles.cardLeft:styles.cardRight],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.header,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.title,o?styles.titleLeft:styles.titleRight],children:c}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:i,style:styles.closeBtn,accessibilityLabel:"Close event picker",children:(0,_jsxRuntime.jsx)(_lucideIcons.X,{size:16,color:_macOSDesignSystemColors.macOSColors.text.secondary})})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.divider}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{style:styles.scroll,contentContainerStyle:styles.list,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:s.map(e=>(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{disabled:e.disabled,onPress:()=>r(e.index),style:[styles.item,e.selected&&styles.itemSelected,e.selected&&o&&styles.itemSelectedLeft,e.selected&&!o&&styles.itemSelectedRight,e.disabled&&styles.itemDisabled],children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.itemIndex,children:e.label}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.itemTime,children:e.timestamp}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.itemRelative,children:["(",e.relativeTime,")"]}),e.badge,e.diffPreview]},e.index))})]})]})});const styles=_reactNative.StyleSheet.create({overlay:{..._absoluteFill.absoluteFill,zIndex:20,justifyContent:"center",alignItems:"center"},backdrop:{..._absoluteFill.absoluteFill,backgroundColor:"rgba(0,0,0,0.65)"},card:{width:"86%",maxHeight:320,backgroundColor:_macOSDesignSystemColors.macOSColors.background.card,borderRadius:16,borderWidth:2,padding:16,shadowOffset:{width:0,height:0},shadowOpacity:.5,shadowRadius:40,elevation:15},cardLeft:{borderColor:_macOSDesignSystemColors.macOSColors.semantic.debug,shadowColor:_macOSDesignSystemColors.macOSColors.semantic.debug},cardRight:{borderColor:_macOSDesignSystemColors.macOSColors.semantic.success,shadowColor:_macOSDesignSystemColors.macOSColors.semantic.success},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},title:{fontSize:13,fontWeight:"700",fontFamily:_fonts.monoFont,textTransform:"uppercase",marginBottom:8,letterSpacing:.6},titleLeft:{color:_macOSDesignSystemColors.macOSColors.semantic.debug},titleRight:{color:_macOSDesignSystemColors.macOSColors.semantic.success},closeBtn:{padding:6,borderRadius:6,backgroundColor:_macOSDesignSystemColors.macOSColors.background.card,borderWidth:1,borderColor:_macOSDesignSystemColors.macOSColors.border.default},divider:{height:1,backgroundColor:_macOSDesignSystemColors.macOSColors.background.input,marginVertical:8},scroll:{maxHeight:260},list:{gap:4},item:{paddingVertical:10,paddingHorizontal:12,borderRadius:10,backgroundColor:_macOSDesignSystemColors.macOSColors.background.base,borderWidth:1,borderColor:_macOSDesignSystemColors.macOSColors.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:_macOSDesignSystemColors.macOSColors.semantic.debug+"1A",borderColor:_macOSDesignSystemColors.macOSColors.semantic.debug,shadowColor:_macOSDesignSystemColors.macOSColors.semantic.debug},itemSelectedRight:{backgroundColor:_macOSDesignSystemColors.macOSColors.semantic.successBackground+"30",borderColor:_macOSDesignSystemColors.macOSColors.semantic.success,shadowColor:_macOSDesignSystemColors.macOSColors.semantic.success},itemDisabled:{opacity:.4},itemIndex:{fontSize:10,color:_macOSDesignSystemColors.macOSColors.text.secondary,fontFamily:_fonts.monoFont,width:40},itemTime:{fontSize:11,color:_macOSDesignSystemColors.macOSColors.text.primary,fontFamily:_fonts.monoFont,flex:1},itemRelative:{fontSize:10,color:_macOSDesignSystemColors.macOSColors.text.secondary,fontFamily:_fonts.monoFont}});
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EventPickerModal=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _absoluteFill=require("../../../utils/absoluteFill.js");var _macOSDesignSystemColors=require("../../gameUI/constants/macOSDesignSystemColors.js");var _lucideIcons=require("../../../icons/lucide-icons.js");var _fonts=require("../../fonts.js");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(n,l){if("function"==typeof WeakMap)var s=new WeakMap,c=new WeakMap;return(_interopRequireWildcard=function(o,i){if(!i&&o&&o.__esModule)return o;var r,t,e={__proto__:null,default:o};if(null===o||"object"!=typeof o&&"function"!=typeof o)return e;if(r=i?c:s){if(r.has(o))return r.get(o);r.set(o,e)}for(const a in o)"default"!==a&&{}.hasOwnProperty.call(o,a)&&((t=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,a))&&(t.get||t.set)?r(e,a,t):e[a]=o[a]);return e})(n,l)}const EventPickerModal=exports.EventPickerModal=(0,_react.memo)(function n({isOpen:l,onClose:s,title:c,position:o,items:i,onSelect:r}){if(!l)return null;const t=o==="left";return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.overlay,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{style:styles.backdrop,activeOpacity:1,onPress:s}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.card,t?styles.cardLeft:styles.cardRight],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.header,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.title,t?styles.titleLeft:styles.titleRight],children:c}),(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:s,style:styles.closeBtn,accessibilityLabel:"Close event picker",children:(0,_jsxRuntime.jsx)(_lucideIcons.X,{size:16,color:_macOSDesignSystemColors.macOSColors.text.secondary})})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.divider}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{keyboardShouldPersistTaps:"handled",style:styles.scroll,contentContainerStyle:styles.list,showsVerticalScrollIndicator:true,nestedScrollEnabled:true,children:i.map(e=>(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{disabled:e.disabled,onPress:()=>r(e.index),style:[styles.item,e.selected&&styles.itemSelected,e.selected&&t&&styles.itemSelectedLeft,e.selected&&!t&&styles.itemSelectedRight,e.disabled&&styles.itemDisabled],children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.itemIndex,children:e.label}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.itemTime,children:e.timestamp}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.itemRelative,children:["(",e.relativeTime,")"]}),e.badge,e.diffPreview]},e.index))})]})]})});const styles=_reactNative.StyleSheet.create({overlay:{..._absoluteFill.absoluteFill,zIndex:20,justifyContent:"center",alignItems:"center"},backdrop:{..._absoluteFill.absoluteFill,backgroundColor:"rgba(0,0,0,0.65)"},card:{width:"86%",maxHeight:320,backgroundColor:_macOSDesignSystemColors.macOSColors.background.card,borderRadius:16,borderWidth:2,padding:16,shadowOffset:{width:0,height:0},shadowOpacity:.5,shadowRadius:40,elevation:15},cardLeft:{borderColor:_macOSDesignSystemColors.macOSColors.semantic.debug,shadowColor:_macOSDesignSystemColors.macOSColors.semantic.debug},cardRight:{borderColor:_macOSDesignSystemColors.macOSColors.semantic.success,shadowColor:_macOSDesignSystemColors.macOSColors.semantic.success},header:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},title:{fontSize:13,fontWeight:"700",fontFamily:_fonts.monoFont,textTransform:"uppercase",marginBottom:8,letterSpacing:.6},titleLeft:{color:_macOSDesignSystemColors.macOSColors.semantic.debug},titleRight:{color:_macOSDesignSystemColors.macOSColors.semantic.success},closeBtn:{padding:6,borderRadius:6,backgroundColor:_macOSDesignSystemColors.macOSColors.background.card,borderWidth:1,borderColor:_macOSDesignSystemColors.macOSColors.border.default},divider:{height:1,backgroundColor:_macOSDesignSystemColors.macOSColors.background.input,marginVertical:8},scroll:{maxHeight:260},list:{gap:4},item:{paddingVertical:10,paddingHorizontal:12,borderRadius:10,backgroundColor:_macOSDesignSystemColors.macOSColors.background.base,borderWidth:1,borderColor:_macOSDesignSystemColors.macOSColors.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:_macOSDesignSystemColors.macOSColors.semantic.debug+"1A",borderColor:_macOSDesignSystemColors.macOSColors.semantic.debug,shadowColor:_macOSDesignSystemColors.macOSColors.semantic.debug},itemSelectedRight:{backgroundColor:_macOSDesignSystemColors.macOSColors.semantic.successBackground+"30",borderColor:_macOSDesignSystemColors.macOSColors.semantic.success,shadowColor:_macOSDesignSystemColors.macOSColors.semantic.success},itemDisabled:{opacity:.4},itemIndex:{fontSize:10,color:_macOSDesignSystemColors.macOSColors.text.secondary,fontFamily:_fonts.monoFont,width:40},itemTime:{fontSize:11,color:_macOSDesignSystemColors.macOSColors.text.primary,fontFamily:_fonts.monoFont,flex:1},itemRelative:{fontSize:10,color:_macOSDesignSystemColors.macOSColors.text.secondary,fontFamily:_fonts.monoFont}});
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getBuoyAppId=getBuoyAppId;exports.setBuoyAppId=setBuoyAppId;let appId=null;function setBuoyAppId(t){appId=typeof t==="string"&&t.trim()?t.trim():null}function getBuoyAppId(){return appId}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.loadBrowserReload=loadBrowserReload;exports.loadDevSettings=loadDevSettings;exports.loadExpoUpdates=loadExpoUpdates;function loadDevSettings(){try{const e=require("react-native");const t=e?.DevSettings;if(t&&typeof t.reload==="function"){return t}}catch{}return null}function loadExpoUpdates(){try{const e=require("expo-updates");if(e&&typeof e.reloadAsync==="function"){return e}}catch{}return null}function loadBrowserReload(){return null}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.loadBrowserReload=loadBrowserReload;exports.loadDevSettings=loadDevSettings;exports.loadExpoUpdates=loadExpoUpdates;function loadExpoGoReload(){const e=globalThis.expo;if(!e?.modules?.ExpoGo||typeof e.reloadAppAsync!=="function")return null;const t=e.reloadAppAsync.bind(e);return o=>{void t(o)}}function loadDevSettings(){const e=loadExpoGoReload();if(e)return{reload:e};try{const t=require("react-native");const o=t?.DevSettings;if(o&&typeof o.reload==="function"){return o}}catch{}return null}function loadExpoUpdates(){try{const e=require("expo-updates");if(e&&typeof e.reloadAsync==="function"){return e}}catch{}return null}function loadBrowserReload(){return null}
@@ -1 +1 @@
1
- "use strict";import{getUseAccountAccess as ke}from"./license/licenseModule.js";import{AccountSetup as Le}from"./license/AccountSetup";import{useState as j,useRef as d,useEffect as V,useMemo as ne,useCallback as Q,memo as kt,isValidElement as re,cloneElement as ie}from"react";import{View as s,StyleSheet as Lt,TouchableWithoutFeedback as ae,Dimensions as Be,PanResponder as se,Animated as i,ScrollView as le,Text as Ft}from"react-native";import{absoluteFill as Pt}from"./utils/absoluteFill.js";import{useSafeAreaInsets as Ae}from"./hooks/useSafeAreaInsets";import{gameUIColors as L,buoyColors as m}from"./ui/gameUI/index.js";import{DraggableHeader as We,ModalHintBanner as Me,WindowControls as de}from"./ui/components/index.js";import{ToolBackground as Bt}from"./ui/backgrounds/ToolBackground.js";import{night as C}from"./ui/night/nightTheme.js";import{persistentStorage as ce}from"./utils/persistentStorage";import{ModalStorage as Gt}from"./utils/modalStorage.js";import{devToolsStorageKeys as ue}from"./storage/devToolsStorageKeys.js";import{useHintsDisabled as Ne}from"./context/index.js";import{jsx as o,jsxs as Y}from"react/jsx-runtime";const he=true;const h=Be.get("window");const Oe=100;const Ee=400;const ut=h.width;const ht=500;const Rt=h.width*.25;const Tt=80;const Fe=20;const fe=kt(function c({isResizing:a,mode:B,hasCustomContent:X=false,variant:D="default"}){return Y(s,{style:[e.dragIndicatorContainer,X&&e.dragIndicatorContainerCustom],children:[o(s,{style:[e.dragIndicator,B==="floating"&&e.floatingDragIndicator,a&&e.dragIndicatorActive,D==="night"&&e.nightDragIndicator]}),a&&B==="bottomSheet"&&Y(s,{style:e.resizeGripContainer,children:[o(s,{style:e.resizeGripLine}),o(s,{style:e.resizeGripLine}),o(s,{style:e.resizeGripLine})]})]})});const ge=kt(function c({position:a,isActive:B}){return o(s,{style:[e.cornerHandle],children:o(s,{style:[e.handler,B&&e.handlerActive]})})});const pe=kt(function c({header:a,onClose:B,onToggleMode:X,onMinimize:D,isResizing:Z,mode:at,panHandlers:I,variant:f="default"}){const S=d(0);const $=d(0);const A=d(null);const x=Q(()=>{const P=Date.now();const st=P-S.current;if(st>500){$.current=0}$.current++;S.current=P;if(A.current){clearTimeout(A.current)}A.current=setTimeout(()=>{if($.current===2){X()}else if($.current>=3){if(D){D()}}$.current=0},300)},[X,D]);V(()=>{return()=>{if(A.current){clearTimeout(A.current)}}},[]);const W=I?I:{};const ft=!!I;if(a?.customContent){const P=re(a.customContent)&&typeof a.customContent.type==="function"&&a.customContent.type.name==="CyberpunkModalHeader";if(P){return ie(a.customContent,{onToggleMode:X,onClose:B,mode:at,panHandlers:W,showToggleButton:a?.showToggleButton!==false,hideCloseButton:a?.hideCloseButton})}let st=a.customContent;if(re(a.customContent)&&D){st=ie(a.customContent,{onMinimize:D})}const T=Y(s,{style:e.headerInner,children:[o(fe,{isResizing:Z,mode:at,hasCustomContent:true,variant:f}),st]});return o(s,{style:[e.header,f==="night"&&e.nightHeader],...W,children:ft?o(ae,{onPress:x,children:T}):T})}const K=Y(s,{style:e.headerInner,children:[o(fe,{isResizing:Z,mode:at,variant:f}),Y(s,{style:e.headerContent,children:[a?.title&&o(Ft,{style:e.headerTitle,children:a.title}),a?.subtitle&&o(Ft,{style:e.headerSubtitle,children:a.subtitle})]}),o(s,{style:e.headerHintText,children:o(Ft,{style:e.hintText,children:"Double tap: Toggle \u2022 Triple tap: Close"})})]});return o(s,{style:[e.header,at==="floating"&&e.floatingModeHeader,f==="night"&&e.nightHeader],...W,children:ft?o(ae,{onPress:x,children:K}):K})});const Pe=({visible:c,onClose:a,children:B,header:X,styles:D={},minHeight:Z=Oe,maxHeight:at,initialHeight:I=Ee,animatedHeight:f,benchMotion:S,initialMode:$="bottomSheet",onModeChange:A,persistenceKey:x,enablePersistence:W=true,initialFloatingPosition:ft,footer:K,footerHeight:P=0,onBack:st,onMinimize:T,minimizeRequest:Vt=0,minimizeTargetPosition:At,initialModalState:g,zIndex:Dt,disableScrollWrapper:_t=false,background:It=true,variant:H="night"})=>{const N=Ae();const[zt,jt]=j(!W);const[l,Wt]=j($);const[lt,O]=j(false);const[St,dt]=j(false);const[we,Mt]=j(I);const[G,gt]=j({width:ut,height:ht,top:(h.height-ht)/2,left:0});const[xt]=j({width:h.width,height:h.height});const[be,Ht]=j(false);const[ye,Yt]=j(false);const Ce=Ne();const w=d(new i.Value(0)).current;const R=d(new i.Value(h.height)).current;const Xt=d(new i.Value(0)).current;const E=d(new i.Value(I)).current;const F=d(I);V(()=>{if(!W||!x||!zt)return;const t=setTimeout(()=>{Gt.save(x,{mode:l,panelHeight:F.current,dimensions:G,isVisible:c})},500);return()=>clearTimeout(t)},[l,we,G,c,x,W,zt]);const Ut=d(false);V(()=>{if(f&&!Ut.current){Ut.current=true;F.current=I;f.setValue(I)}},[f,I]);V(()=>{y.current=G},[G]);const p=d(new i.ValueXY({x:ft?.x??0,y:ft?.y??(h.height-ht)/2})).current;const tt=d(new i.Value(0)).current;const et=d(new i.Value(ut)).current;const ot=d(new i.Value(ht)).current;const y=d(G);const Jt=d(G);const Re=d(0);const Te=d(0);const Ve=d(0);const De=d(0);V(()=>{let t=true;const r=async()=>{try{const n=ue.modal.hintAcknowledged();const _=await ce.getItem(n);if(t){Ht(_!=="true");Yt(true)}}catch(n){if(t){Ht(true);Yt(true)}}};r();return()=>{t=false}},[]);const Ie=Q(async()=>{try{const t=ue.modal.hintAcknowledged();await ce.setItem(t,"true");Ht(false)}catch(t){Ht(false)}},[]);const qt=d(A);qt.current=A;V(()=>{if(!W||!x){jt(true);return}let t=true;const r=async()=>{const n=await Gt.load(x);if(t&&n){if(n.mode){Wt(n.mode);qt.current?.(n.mode)}if(n.panelHeight){Mt(n.panelHeight);F.current=n.panelHeight;E.setValue(n.panelHeight);f?.setValue(n.panelHeight)}if(n.dimensions){gt(n.dimensions);p.setValue({x:n.dimensions.left,y:n.dimensions.top});et.setValue(n.dimensions.width);ot.setValue(n.dimensions.height)}}if(t)jt(true)};r();return()=>{t=false}},[x,W,E,ot,et,p]);V(()=>{return()=>{w.stopAnimation();R.stopAnimation();tt.stopAnimation();Xt.stopAnimation();E.stopAnimation();p.stopAnimation();et.stopAnimation();ot.stopAnimation();w.setValue(0);R.setValue(h.height);tt.setValue(0);Xt.setValue(0);E.setValue(I);F.current=I}},[]);const Qt=w.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"});const Nt=at||h.height-N.top;const nt=Q(()=>{dt(false);O(false);const t=l==="bottomSheet"?"floating":"bottomSheet";Wt(t);A?.(t)},[l,A]);V(()=>{dt(false);O(false)},[l]);const U=Q(()=>{if(!T)return;const t={mode:l,panelHeight:F.current,floatingPosition:{x:y.current.left,y:y.current.top},floatingDimensions:{width:y.current.width,height:y.current.height}};if(W&&x)void Gt.saveMinimized(x,t);const r=At?.x??h.width-50;const n=At?.y??h.height-150;if(l==="bottomSheet"){i.parallel([i.timing(w,{toValue:0,duration:300,useNativeDriver:true}),i.timing(R,{toValue:h.height,duration:300,useNativeDriver:true})]).start(()=>{T(t)})}else{i.parallel([i.timing(tt,{toValue:0,duration:300,useNativeDriver:true}),i.timing(w,{toValue:0,duration:300,useNativeDriver:true}),i.timing(p,{toValue:{x:r,y:n},duration:300,useNativeDriver:true})]).start(()=>{T(t)})}},[l,T,At,W,x,w,R,tt,p]);const Zt=d(Vt);V(()=>{if(Zt.current===Vt)return;Zt.current=Vt;U()},[Vt,U]);V(()=>{if(!g)return;if(g.mode){Wt(g.mode);A?.(g.mode)}if(g.panelHeight){Mt(g.panelHeight);F.current=g.panelHeight;E.setValue(g.panelHeight)}if(g.floatingDimensions&&g.floatingPosition){const t={width:g.floatingDimensions.width,height:g.floatingDimensions.height,top:g.floatingPosition.y,left:g.floatingPosition.x};gt(t);p.setValue({x:g.floatingPosition.x,y:g.floatingPosition.y});et.setValue(g.floatingDimensions.width);ot.setValue(g.floatingDimensions.height)}},[g]);const $t=t=>{if(t){if(l==="bottomSheet"){R.setValue(0)}else{tt.setValue(1);p.setValue({x:y.current.left,y:y.current.top})}w.setValue(1)}else{if(l==="bottomSheet"){R.setValue(h.height)}w.setValue(0)}};const Kt=d(null);if(he&&Kt.current!==c){Kt.current=c;$t(c)}V(()=>{let t=null;let r=null;if(he){$t(c);return}if(c){R.setValue(h.height);w.setValue(0);if(l==="bottomSheet"){t=i.parallel([i.spring(R,{toValue:0,tension:180,friction:22,useNativeDriver:true}),i.timing(w,{toValue:1,duration:200,useNativeDriver:true})]);t.start()}else{tt.setValue(1);p.setValue({x:y.current.left,y:y.current.top});t=i.timing(w,{toValue:1,duration:200,useNativeDriver:true});t.start()}}else{if(l==="bottomSheet"){r=i.parallel([i.spring(R,{toValue:h.height,tension:180,friction:22,useNativeDriver:true}),i.timing(w,{toValue:0,duration:200,useNativeDriver:true})]);r.start()}else{r=i.timing(w,{toValue:0,duration:200,useNativeDriver:true});r.start()}}return()=>{if(t){t.stop()}if(r){r.stop()}}},[c,l,w,R,tt,p,f]);const te=d(0);V(()=>{if(!__DEV__||!S||!c)return void 0;let t=null;let r=null;let n=true;const _=Date.now();let v=false;const J=z=>{v=z;if(S==="resize"||S==="float-resize"){O(z)}else if(S==="float-drag"){dt(z)}};if(S==="mode-cycle"){r=setInterval(()=>nt(),2200)}else{const z=Z;const vt=Nt;const bt=()=>{if(!n)return;const ct=(Date.now()-_)/1e3;const u=ct%2.5;if(u<2&&!v)J(true);else if(u>=2&&v)J(false);if(v){const k=(Math.sin(ct*2.2)+1)/2;if(S==="resize"){const b=z+k*(vt-z);E.setValue(b);F.current=b;if(f){f.setValue(b)}}else if(S==="float-drag"){const b=(Math.sin(ct*1.7)+1)/2;p.setValue({x:10+k*Math.max(h.width-ut-20,0),y:70+b*260})}else if(S==="float-resize"){const b=ut+k*Math.max(h.width-ut-40,0);const M=ht+k*240;et.setValue(b);ot.setValue(M);y.current={...y.current,width:b,height:M}}}t=requestAnimationFrame(bt)};t=requestAnimationFrame(bt)}return()=>{n=false;if(t!=null)cancelAnimationFrame(t);if(r!=null)clearInterval(r);O(false);dt(false)}},[S,c]);const Se=ne(()=>se.create({onStartShouldSetPanResponder:()=>l==="bottomSheet",onMoveShouldSetPanResponder:(t,r)=>l==="bottomSheet"&&Math.abs(r.dy)>3,onPanResponderTerminationRequest:()=>false,onPanResponderGrant:t=>{O(true);te.current=t.nativeEvent.locationY||0;E.stopAnimation(r=>{F.current=r});f?.stopAnimation();R.stopAnimation()},onPanResponderMove:t=>{const r=t.nativeEvent.pageY-te.current;let n=h.height-r;n=Math.max(Z,Math.min(n,Nt));E.setValue(n);F.current=n;if(f){f.setValue(n)}},onPanResponderRelease:(t,r)=>{O(false);const n=F.current;const _=r.vy>.8&&r.dy>50||r.dy>150&&n<=Z;if(_){i.parallel([i.timing(w,{toValue:0,duration:200,useNativeDriver:true}),i.spring(R,{toValue:h.height,tension:180,friction:22,useNativeDriver:true})]).start(()=>a());return}Mt(n);if(f)f.setValue(n)},onPanResponderTerminate:()=>{O(false)}}),[l,Z,Nt,E,f,R,w,a]);const pt=Q(t=>{let r=false;return se.create({onStartShouldSetPanResponder:()=>l==="floating",onMoveShouldSetPanResponder:()=>l==="floating",onPanResponderGrant:()=>{r=false;const n=y.current;p.stopAnimation(({x:_,y:v})=>{p.setValue({x:_,y:v})});O(true);Jt.current={...n};Ve.current=n.height;De.current=n.width;Re.current=n.left;Te.current=n.top},onPanResponderMove:(n,_)=>{const{dx:v,dy:J}=_;if(Math.abs(v)<.5&&Math.abs(J)<.5)return;r=true;const z=Math.max(0,N.left||0);const vt=xt.width-Math.max(0,N.right||0);const bt=Math.max(0,N.top||0);const ct=xt.height-Math.max(0,N.bottom||0);const u=Jt.current;const k=u.left+u.width;const b=u.top+u.height;let M=u.left;let q=u.top;let yt=k;let Ct=b;switch(t){case"topLeft":{const rt=Math.max(z,Math.min(u.left+v,k-Rt));const it=Math.max(bt,Math.min(u.top+J,b-Tt));M=rt;q=it;yt=k;Ct=b;break}case"topRight":{const rt=Math.min(vt,Math.max(k+v,u.left+Rt));const it=Math.max(bt,Math.min(u.top+J,b-Tt));M=u.left;q=it;yt=rt;Ct=b;break}case"bottomLeft":{const rt=Math.max(z,Math.min(u.left+v,k-Rt));const it=Math.min(ct,Math.max(b+J,u.top+Tt));M=rt;q=u.top;yt=k;Ct=it;break}case"bottomRight":{const rt=Math.min(vt,Math.max(k+v,u.left+Rt));const it=Math.min(ct,Math.max(b+J,u.top+Tt));M=u.left;q=u.top;yt=rt;Ct=it;break}}const Ot=Math.max(Rt,yt-M);const Et=Math.max(Tt,Ct-q);gt({width:Ot,height:Et,left:M,top:q});et.setValue(Ot);ot.setValue(Et);p.setValue({x:M,y:q});y.current={width:Ot,height:Et,left:M,top:q}},onPanResponderRelease:()=>{O(false);r=false;gt(y.current)},onPanResponderTerminate:()=>{O(false);r=false}})},[l,xt,N.left,N.right,N.top,N.bottom,p,et,ot,a,st]);const ee=ne(()=>{return{topLeft:pt("topLeft"),topRight:pt("topRight"),bottomLeft:pt("bottomLeft"),bottomRight:pt("bottomRight")}},[pt]);const xe=Q(()=>{dt(true)},[]);const He=Q(t=>{dt(false);const r=y.current;const n={...r,left:t.x,top:t.y};gt(n)},[]);const oe=d(0);const mt=d(0);const wt=d(null);const ve=Q(()=>{const t=Date.now();const r=t-oe.current;if(r>500){mt.current=0}mt.current++;oe.current=t;if(wt.current){clearTimeout(wt.current)}wt.current=setTimeout(()=>{if(mt.current===2){nt()}else if(mt.current>=3){if(T){U()}}mt.current=0},300)},[nt,T,U]);V(()=>{return()=>{if(wt.current){clearTimeout(wt.current)}}},[]);if(l==="floating"){return Y(i.View,{nativeID:"jsmodal-root",pointerEvents:c?"auto":"none",accessibilityElementsHidden:!c,importantForAccessibility:c?"auto":"no-hide-descendants",style:[e.floatingModal,{width:G.width,height:G.height,opacity:Qt,transform:[{translateX:p.x},{translateY:p.y}],...Dt!==void 0&&{zIndex:Dt}},H==="night"&&e.nightFloatingModal,(St||lt)&&e.floatingModalDragging,D.container,!c&&e.parkedOffscreen],children:[It&&H==="night"?o(s,{style:e.nightBackdropFloating,pointerEvents:"none",children:o(Bt,{})}):null,o(We,{position:p,onDragStart:xe,onDragEnd:He,onTap:ve,containerBounds:xt,elementSize:G,minPosition:{x:0,y:N.top},style:e.floatingHeader,enabled:l==="floating"&&!lt,children:o(pe,{header:X,onClose:a,onToggleMode:nt,onMinimize:T?U:void 0,isResizing:St||lt,mode:l,variant:H})}),o(s,{style:e.windowControlsContainer,children:o(de,{onClose:a,onMinimize:T?U:void 0,onToggleMode:nt,mode:l,variant:H})}),Y(s,{style:[e.content,H==="night"&&e.nightContent,D.content],children:[It&&H!=="night"?o(Bt,{}):null,_t?o(s,{style:{flex:1,paddingBottom:P},children:B}):o(le,{style:{flex:1},contentContainerStyle:{flexGrow:1,paddingBottom:P},showsVerticalScrollIndicator:true,nestedScrollEnabled:true,keyboardShouldPersistTaps:"handled",children:B}),K?o(s,{style:me.footerContainer,children:K}):null]}),o(s,{...ee.bottomLeft.panHandlers,style:[e.cornerHandleWrapper,{bottom:4,left:4}],hitSlop:{top:2,left:2,right:2,bottom:2},children:o(ge,{position:"bottomLeft",isActive:St||lt})}),o(s,{...ee.bottomRight.panHandlers,style:[e.cornerHandleWrapper,{bottom:4,right:4}],hitSlop:{top:2,left:2,right:2,bottom:2},children:o(ge,{position:"bottomRight",isActive:St||lt})})]})}return o(s,{style:[c?e.fullScreenContainer:e.parkedFullScreen,c&&Dt!==void 0&&{zIndex:Dt}],pointerEvents:c?"box-none":"none",accessibilityElementsHidden:!c,importantForAccessibility:c?"auto":"no-hide-descendants",children:o(i.View,{nativeID:"jsmodal-root",style:[e.bottomSheetWrapper,{opacity:Qt,transform:[{translateY:R}]}],children:Y(i.View,{style:[e.bottomSheet,H==="night"&&e.nightBottomSheet,D.container,{height:f||E}],children:[It&&H==="night"?o(s,{style:e.nightBackdropSheet,pointerEvents:"none",children:o(Bt,{})}):null,o(pe,{header:X,onClose:a,onToggleMode:nt,onMinimize:T?U:void 0,isResizing:lt,mode:l,panHandlers:Se.panHandlers,variant:H}),o(s,{style:e.windowControlsContainer,children:o(de,{onClose:a,onMinimize:T?U:void 0,onToggleMode:nt,mode:l,variant:H})}),ye&&be&&l==="bottomSheet"&&!Ce&&o(Me,{onAcknowledge:Ie}),Y(s,{style:[e.content,H==="night"&&e.nightContent,D.content],children:[It&&H!=="night"?o(Bt,{}):null,_t?o(s,{style:{flex:1,paddingBottom:P},children:B}):o(le,{style:{flex:1},contentContainerStyle:{flexGrow:1,paddingBottom:P},showsVerticalScrollIndicator:true,nestedScrollEnabled:true,keyboardShouldPersistTaps:"handled",children:B}),K?o(s,{style:me.footerContainer,children:K}):null]})]})})})};const e=Lt.create({fullScreenContainer:{...Pt,zIndex:1e3},bottomSheetWrapper:{position:"absolute",bottom:0,left:0,right:0},bottomSheet:{backgroundColor:m.card,borderTopLeftRadius:6,borderTopRightRadius:6,borderWidth:1,borderColor:m.border,shadowColor:m.primary,shadowOffset:{width:0,height:-4},shadowOpacity:.2,shadowRadius:12,elevation:20},parkedOffscreen:{left:-9999,top:-9999,opacity:0},parkedFullScreen:{position:"absolute",left:-9999,top:-9999,width:h.width,height:h.height,opacity:0},floatingModal:{position:"absolute",backgroundColor:m.card,borderRadius:6,borderWidth:1,borderColor:m.border,shadowColor:m.primary,shadowOffset:{width:0,height:0},shadowOpacity:.3,shadowRadius:20,elevation:24,zIndex:1e3,width:ut,height:ht},floatingModalDragging:{borderColor:m.primary,borderWidth:2,shadowColor:m.primary+"99",shadowOpacity:.8,shadowRadius:12},header:{borderTopLeftRadius:6,borderTopRightRadius:6,backgroundColor:m.card,minHeight:56,borderWidth:1,borderColor:m.border,borderBottomWidth:1,borderBottomColor:m.border},nightBottomSheet:{backgroundColor:C.color.bg,borderTopLeftRadius:C.radius.sheet,borderTopRightRadius:C.radius.sheet,borderWidth:Lt.hairlineWidth,borderColor:C.color.accent+"55",shadowColor:C.color.accent,shadowOffset:{width:0,height:-4},shadowOpacity:.22,shadowRadius:10},nightFloatingModal:{backgroundColor:C.color.bg,borderRadius:C.radius.sheet,borderWidth:Lt.hairlineWidth,borderColor:C.color.accent+"55",shadowColor:C.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.22,shadowRadius:14},nightHeader:{backgroundColor:"transparent",borderWidth:0,borderBottomWidth:0,borderTopLeftRadius:C.radius.sheet,borderTopRightRadius:C.radius.sheet},nightContent:{backgroundColor:"transparent"},nightBackdropSheet:{...Pt,borderTopLeftRadius:C.radius.sheet,borderTopRightRadius:C.radius.sheet,overflow:"hidden"},nightBackdropFloating:{...Pt,borderRadius:C.radius.sheet,overflow:"hidden"},nightDragIndicator:{width:36,height:5,borderRadius:2.5,backgroundColor:C.color.placeholder,shadowOpacity:0,elevation:0},floatingHeader:{borderTopLeftRadius:6,borderTopRightRadius:6},windowControlsContainer:{position:"absolute",top:4,right:4,zIndex:10},floatingModeHeader:{borderTopLeftRadius:6,borderTopRightRadius:6},headerInner:{flex:1,justifyContent:"center"},dragIndicatorContainer:{alignItems:"center",paddingVertical:8,backgroundColor:"transparent"},dragIndicatorContainerCustom:{minHeight:Fe,justifyContent:"center",paddingVertical:0,backgroundColor:"transparent"},dragIndicator:{width:40,height:3,backgroundColor:m.primary,borderRadius:2,shadowColor:m.primary,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:4},floatingDragIndicator:{width:50,height:5,backgroundColor:m.textMuted},dragIndicatorActive:{backgroundColor:m.primary,width:40},resizeGripContainer:{position:"absolute",flexDirection:"row",gap:2,marginTop:12},resizeGripLine:{width:12,height:1,backgroundColor:L.success,opacity:.6},headerContent:{paddingHorizontal:16,alignItems:"center"},headerControls:{position:"absolute",top:8,right:16,flexDirection:"row",alignItems:"center"},headerTitle:{fontSize:16,fontWeight:"600",color:L.primary},headerSubtitle:{fontSize:12,color:L.secondary,paddingTop:4},headerHintText:{position:"absolute",top:0,left:0,right:0,bottom:0,justifyContent:"center",alignItems:"center"},hintText:{fontSize:10,color:L.muted,fontStyle:"italic"},controlButton:{width:28,height:28,borderRadius:6,justifyContent:"center",alignItems:"center",marginLeft:8},toggleButton:{backgroundColor:L.info+"1A",borderWidth:1,borderColor:L.info+"33"},closeButton:{width:28,height:28,borderRadius:6,justifyContent:"center",alignItems:"center",backgroundColor:L.error+"1A",borderWidth:1,borderColor:L.error+"33",marginLeft:8},iconLine:{position:"absolute",top:7.25,left:2,width:12,height:1.5,backgroundColor:L.error},content:{flex:1,backgroundColor:m.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden"},cornerHandle:{position:"absolute",zIndex:1},cornerHandleWrapper:{position:"absolute",width:30,height:30,zIndex:1e3},handler:{width:20,height:20,backgroundColor:"transparent",borderRadius:10,borderWidth:0,borderColor:"transparent"},handlerActive:{backgroundColor:L.success+"1A",borderColor:L.success,borderWidth:2,shadowColor:L.success+"99",shadowOffset:{width:0,height:0},shadowOpacity:1,shadowRadius:8}});const me=Lt.create({footerContainer:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:m.base,borderBottomLeftRadius:16,borderBottomRightRadius:16}});export const JsModal=kt(c=>{const a=ke()();if(a.status!=="admitted")return c.visible?o(Le,{}):null;return o(Pe,{...c})});
1
+ "use strict";import{getUseAccountAccess as Me}from"./license/licenseModule.js";import{AccountSetup as Ne}from"./license/AccountSetup";import{useState as Y,useRef as d,useEffect as C,useMemo as _t,useCallback as Q,memo as Bt,isValidElement as le,cloneElement as de}from"react";import{View as c,StyleSheet as At,TouchableWithoutFeedback as ce,Dimensions as Oe,PanResponder as ue,Animated as i,ScrollView as he,Text as zt,Keyboard as Vt,Platform as Ee,Easing as Fe}from"react-native";import{absoluteFill as jt}from"./utils/absoluteFill.js";import{useSafeAreaInsets as Pe}from"./hooks/useSafeAreaInsets";import{gameUIColors as A,buoyColors as b}from"./ui/gameUI/index.js";import{DraggableHeader as Ge,ModalHintBanner as _e,WindowControls as fe}from"./ui/components/index.js";import{ToolBackground as Wt}from"./ui/backgrounds/ToolBackground.js";import{night as T}from"./ui/night/nightTheme.js";import{persistentStorage as ge}from"./utils/persistentStorage";import{ModalStorage as Yt}from"./utils/modalStorage.js";import{devToolsStorageKeys as me}from"./storage/devToolsStorageKeys.js";import{useHintsDisabled as ze}from"./context/index.js";import{jsx as n,jsxs as X}from"react/jsx-runtime";const pe=true;const u=Oe.get("window");const je=100;const Ye=400;const ht=u.width;const ft=500;const Tt=u.width*.25;const Dt=80;const Xe=20;const be=Bt(function a({isResizing:s,mode:W,hasCustomContent:U=false,variant:S="default"}){return X(c,{style:[o.dragIndicatorContainer,U&&o.dragIndicatorContainerCustom],children:[n(c,{style:[o.dragIndicator,W==="floating"&&o.floatingDragIndicator,s&&o.dragIndicatorActive,S==="night"&&o.nightDragIndicator]}),s&&W==="bottomSheet"&&X(c,{style:o.resizeGripContainer,children:[n(c,{style:o.resizeGripLine}),n(c,{style:o.resizeGripLine}),n(c,{style:o.resizeGripLine})]})]})});const we=Bt(function a({position:s,isActive:W}){return n(c,{style:[o.cornerHandle],children:n(c,{style:[o.handler,W&&o.handlerActive]})})});const ye=Bt(function a({header:s,onClose:W,onToggleMode:U,onMinimize:S,isResizing:Z,mode:at,panHandlers:I,variant:g="default"}){const x=d(0);const $=d(0);const M=d(null);const k=Q(()=>{const z=Date.now();const st=z-x.current;if(st>500){$.current=0}$.current++;x.current=z;if(M.current){clearTimeout(M.current)}M.current=setTimeout(()=>{if($.current===2){U()}else if($.current>=3){if(S){S()}}$.current=0},300)},[U,S]);C(()=>{return()=>{if(M.current){clearTimeout(M.current)}}},[]);const N=I?I:{};const gt=!!I;if(s?.customContent){const z=le(s.customContent)&&typeof s.customContent.type==="function"&&s.customContent.type.name==="CyberpunkModalHeader";if(z){return de(s.customContent,{onToggleMode:U,onClose:W,mode:at,panHandlers:N,showToggleButton:s?.showToggleButton!==false,hideCloseButton:s?.hideCloseButton})}let st=s.customContent;if(le(s.customContent)&&S){st=de(s.customContent,{onMinimize:S})}const D=X(c,{style:o.headerInner,children:[n(be,{isResizing:Z,mode:at,hasCustomContent:true,variant:g}),st]});return n(c,{style:[o.header,g==="night"&&o.nightHeader],...N,children:gt?n(ce,{onPress:k,children:D}):D})}const K=X(c,{style:o.headerInner,children:[n(be,{isResizing:Z,mode:at,variant:g}),X(c,{style:o.headerContent,children:[s?.title&&n(zt,{style:o.headerTitle,children:s.title}),s?.subtitle&&n(zt,{style:o.headerSubtitle,children:s.subtitle})]}),n(c,{style:o.headerHintText,children:n(zt,{style:o.hintText,children:"Double tap: Toggle \u2022 Triple tap: Close"})})]});return n(c,{style:[o.header,at==="floating"&&o.floatingModeHeader,g==="night"&&o.nightHeader],...N,children:gt?n(ce,{onPress:k,children:K}):K})});const Ue=({visible:a,onClose:s,children:W,header:U,styles:S={},minHeight:Z=je,maxHeight:at,initialHeight:I=Ye,animatedHeight:g,benchMotion:x,initialMode:$="bottomSheet",onModeChange:M,persistenceKey:k,enablePersistence:N=true,initialFloatingPosition:gt,footer:K,footerHeight:z=0,onBack:st,onMinimize:D,minimizeRequest:St=0,minimizeTargetPosition:Mt,initialModalState:m,zIndex:It,disableScrollWrapper:Xt=false,background:xt=true,variant:H="night",avoidKeyboard:Ut=true})=>{const L=Pe();const Nt=d(false);C(()=>{if(a)Nt.current=true;else if(Nt.current)Vt.dismiss()},[a]);C(()=>()=>{if(Nt.current)Vt.dismiss()},[]);const[Jt,qt]=Y(!N);const[l,Ot]=Y($);const[lt,G]=Y(false);const[kt,dt]=Y(false);const[Re,Et]=Y(I);const[j,mt]=Y({width:ht,height:ft,top:(u.height-ft)/2,left:0});const[Ht]=Y({width:u.width,height:u.height});const[Ve,Lt]=Y(false);const[Te,Qt]=Y(false);const De=ze();const w=d(new i.Value(0)).current;const R=d(new i.Value(u.height)).current;const Zt=d(new i.Value(0)).current;const _=d(new i.Value(I)).current;const O=d(I);const ct=d(new i.Value(0)).current;C(()=>{const t=Ee.OS==="ios"&&a&&l==="bottomSheet"&&Ut;if(!t){ct.setValue(0);return}const r=(h,v)=>{i.timing(ct,{toValue:h,duration:v?.duration||250,easing:Fe.bezier(.17,.59,.4,.77),useNativeDriver:true}).start()};const e=h=>{const v=Math.max(0,u.height-h.endCoordinates.screenY);const F=Math.max(0,u.height-L.top-O.current);r(Math.min(v,F),h)};const E=[Vt.addListener("keyboardWillShow",e),Vt.addListener("keyboardWillChangeFrame",e),Vt.addListener("keyboardWillHide",h=>r(0,h))];return()=>{E.forEach(h=>h.remove());ct.setValue(0)}},[a,l,Ut,L.top,ct]);const Se=_t(()=>i.subtract(R,ct),[R,ct]);C(()=>{if(!N||!k||!Jt)return;const t=setTimeout(()=>{Yt.save(k,{mode:l,panelHeight:O.current,dimensions:j,isVisible:a})},500);return()=>clearTimeout(t)},[l,Re,j,a,k,N,Jt]);const $t=d(false);C(()=>{if(g&&!$t.current){$t.current=true;O.current=I;g.setValue(I)}},[g,I]);C(()=>{V.current=j},[j]);const p=d(new i.ValueXY({x:gt?.x??0,y:gt?.y??(u.height-ft)/2})).current;const tt=d(new i.Value(0)).current;const et=d(new i.Value(ht)).current;const ot=d(new i.Value(ft)).current;const V=d(j);const Kt=d(j);const Ie=d(0);const xe=d(0);const ke=d(0);const He=d(0);C(()=>{let t=true;const r=async()=>{try{const e=me.modal.hintAcknowledged();const E=await ge.getItem(e);if(t){Lt(E!=="true");Qt(true)}}catch(e){if(t){Lt(true);Qt(true)}}};r();return()=>{t=false}},[]);const Le=Q(async()=>{try{const t=me.modal.hintAcknowledged();await ge.setItem(t,"true");Lt(false)}catch(t){Lt(false)}},[]);const te=d(M);te.current=M;C(()=>{if(!N||!k){qt(true);return}let t=true;const r=async()=>{const e=await Yt.load(k);if(t&&e){if(e.mode){Ot(e.mode);te.current?.(e.mode)}if(e.panelHeight){Et(e.panelHeight);O.current=e.panelHeight;_.setValue(e.panelHeight);g?.setValue(e.panelHeight)}if(e.dimensions){mt(e.dimensions);p.setValue({x:e.dimensions.left,y:e.dimensions.top});et.setValue(e.dimensions.width);ot.setValue(e.dimensions.height)}}if(t)qt(true)};r();return()=>{t=false}},[k,N,_,ot,et,p]);C(()=>{return()=>{w.stopAnimation();R.stopAnimation();tt.stopAnimation();Zt.stopAnimation();_.stopAnimation();p.stopAnimation();et.stopAnimation();ot.stopAnimation();w.setValue(0);R.setValue(u.height);tt.setValue(0);Zt.setValue(0);_.setValue(I);O.current=I}},[]);const ee=w.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"});const Ft=at||u.height-L.top;const nt=Q(()=>{dt(false);G(false);const t=l==="bottomSheet"?"floating":"bottomSheet";Ot(t);M?.(t)},[l,M]);C(()=>{dt(false);G(false)},[l]);const J=Q(()=>{if(!D)return;const t={mode:l,panelHeight:O.current,floatingPosition:{x:V.current.left,y:V.current.top},floatingDimensions:{width:V.current.width,height:V.current.height}};if(N&&k)void Yt.saveMinimized(k,t);const r=Mt?.x??u.width-50;const e=Mt?.y??u.height-150;if(l==="bottomSheet"){i.parallel([i.timing(w,{toValue:0,duration:300,useNativeDriver:true}),i.timing(R,{toValue:u.height,duration:300,useNativeDriver:true})]).start(()=>{D(t)})}else{i.parallel([i.timing(tt,{toValue:0,duration:300,useNativeDriver:true}),i.timing(w,{toValue:0,duration:300,useNativeDriver:true}),i.timing(p,{toValue:{x:r,y:e},duration:300,useNativeDriver:true})]).start(()=>{D(t)})}},[l,D,Mt,N,k,w,R,tt,p]);const oe=d(St);C(()=>{if(oe.current===St)return;oe.current=St;J()},[St,J]);C(()=>{if(!m)return;if(m.mode){Ot(m.mode);M?.(m.mode)}if(m.panelHeight){Et(m.panelHeight);O.current=m.panelHeight;_.setValue(m.panelHeight)}if(m.floatingDimensions&&m.floatingPosition){const t={width:m.floatingDimensions.width,height:m.floatingDimensions.height,top:m.floatingPosition.y,left:m.floatingPosition.x};mt(t);p.setValue({x:m.floatingPosition.x,y:m.floatingPosition.y});et.setValue(m.floatingDimensions.width);ot.setValue(m.floatingDimensions.height)}},[m]);const ne=t=>{if(t){if(l==="bottomSheet"){R.setValue(0)}else{tt.setValue(1);p.setValue({x:V.current.left,y:V.current.top})}w.setValue(1)}else{if(l==="bottomSheet"){R.setValue(u.height)}w.setValue(0)}};const re=d(null);if(pe&&re.current!==a){re.current=a;ne(a)}C(()=>{let t=null;let r=null;if(pe){ne(a);return}if(a){R.setValue(u.height);w.setValue(0);if(l==="bottomSheet"){t=i.parallel([i.spring(R,{toValue:0,tension:180,friction:22,useNativeDriver:true}),i.timing(w,{toValue:1,duration:200,useNativeDriver:true})]);t.start()}else{tt.setValue(1);p.setValue({x:V.current.left,y:V.current.top});t=i.timing(w,{toValue:1,duration:200,useNativeDriver:true});t.start()}}else{if(l==="bottomSheet"){r=i.parallel([i.spring(R,{toValue:u.height,tension:180,friction:22,useNativeDriver:true}),i.timing(w,{toValue:0,duration:200,useNativeDriver:true})]);r.start()}else{r=i.timing(w,{toValue:0,duration:200,useNativeDriver:true});r.start()}}return()=>{if(t){t.stop()}if(r){r.stop()}}},[a,l,w,R,tt,p,g]);const ie=d(0);C(()=>{if(!__DEV__||!x||!a)return void 0;let t=null;let r=null;let e=true;const E=Date.now();let h=false;const v=F=>{h=F;if(x==="resize"||x==="float-resize"){G(F)}else if(x==="float-drag"){dt(F)}};if(x==="mode-cycle"){r=setInterval(()=>nt(),2200)}else{const F=Z;const vt=Ft;const yt=()=>{if(!e)return;const ut=(Date.now()-E)/1e3;const f=ut%2.5;if(f<2&&!h)v(true);else if(f>=2&&h)v(false);if(h){const B=(Math.sin(ut*2.2)+1)/2;if(x==="resize"){const y=F+B*(vt-F);_.setValue(y);O.current=y;if(g){g.setValue(y)}}else if(x==="float-drag"){const y=(Math.sin(ut*1.7)+1)/2;p.setValue({x:10+B*Math.max(u.width-ht-20,0),y:70+y*260})}else if(x==="float-resize"){const y=ht+B*Math.max(u.width-ht-40,0);const P=ft+B*240;et.setValue(y);ot.setValue(P);V.current={...V.current,width:y,height:P}}}t=requestAnimationFrame(yt)};t=requestAnimationFrame(yt)}return()=>{e=false;if(t!=null)cancelAnimationFrame(t);if(r!=null)clearInterval(r);G(false);dt(false)}},[x,a]);const ve=_t(()=>ue.create({onStartShouldSetPanResponder:()=>l==="bottomSheet",onMoveShouldSetPanResponder:(t,r)=>l==="bottomSheet"&&Math.abs(r.dy)>3,onPanResponderTerminationRequest:()=>false,onPanResponderGrant:t=>{G(true);ie.current=t.nativeEvent.locationY||0;_.stopAnimation(r=>{O.current=r});g?.stopAnimation();R.stopAnimation()},onPanResponderMove:t=>{const r=t.nativeEvent.pageY-ie.current;let e=u.height-r;e=Math.max(Z,Math.min(e,Ft));_.setValue(e);O.current=e;if(g){g.setValue(e)}},onPanResponderRelease:(t,r)=>{G(false);const e=O.current;const E=r.vy>.8&&r.dy>50||r.dy>150&&e<=Z;if(E){i.parallel([i.timing(w,{toValue:0,duration:200,useNativeDriver:true}),i.spring(R,{toValue:u.height,tension:180,friction:22,useNativeDriver:true})]).start(()=>s());return}Et(e);if(g)g.setValue(e)},onPanResponderTerminate:()=>{G(false)}}),[l,Z,Ft,_,g,R,w,s]);const pt=Q(t=>{let r=false;return ue.create({onStartShouldSetPanResponder:()=>l==="floating",onMoveShouldSetPanResponder:()=>l==="floating",onPanResponderGrant:()=>{r=false;const e=V.current;p.stopAnimation(({x:E,y:h})=>{p.setValue({x:E,y:h})});G(true);Kt.current={...e};ke.current=e.height;He.current=e.width;Ie.current=e.left;xe.current=e.top},onPanResponderMove:(e,E)=>{const{dx:h,dy:v}=E;if(Math.abs(h)<.5&&Math.abs(v)<.5)return;r=true;const F=Math.max(0,L.left||0);const vt=Ht.width-Math.max(0,L.right||0);const yt=Math.max(0,L.top||0);const ut=Ht.height-Math.max(0,L.bottom||0);const f=Kt.current;const B=f.left+f.width;const y=f.top+f.height;let P=f.left;let q=f.top;let Ct=B;let Rt=y;switch(t){case"topLeft":{const rt=Math.max(F,Math.min(f.left+h,B-Tt));const it=Math.max(yt,Math.min(f.top+v,y-Dt));P=rt;q=it;Ct=B;Rt=y;break}case"topRight":{const rt=Math.min(vt,Math.max(B+h,f.left+Tt));const it=Math.max(yt,Math.min(f.top+v,y-Dt));P=f.left;q=it;Ct=rt;Rt=y;break}case"bottomLeft":{const rt=Math.max(F,Math.min(f.left+h,B-Tt));const it=Math.min(ut,Math.max(y+v,f.top+Dt));P=rt;q=f.top;Ct=B;Rt=it;break}case"bottomRight":{const rt=Math.min(vt,Math.max(B+h,f.left+Tt));const it=Math.min(ut,Math.max(y+v,f.top+Dt));P=f.left;q=f.top;Ct=rt;Rt=it;break}}const Pt=Math.max(Tt,Ct-P);const Gt=Math.max(Dt,Rt-q);mt({width:Pt,height:Gt,left:P,top:q});et.setValue(Pt);ot.setValue(Gt);p.setValue({x:P,y:q});V.current={width:Pt,height:Gt,left:P,top:q}},onPanResponderRelease:()=>{G(false);r=false;mt(V.current)},onPanResponderTerminate:()=>{G(false);r=false}})},[l,Ht,L.left,L.right,L.top,L.bottom,p,et,ot,s,st]);const ae=_t(()=>{return{topLeft:pt("topLeft"),topRight:pt("topRight"),bottomLeft:pt("bottomLeft"),bottomRight:pt("bottomRight")}},[pt]);const Be=Q(()=>{dt(true)},[]);const Ae=Q(t=>{dt(false);const r=V.current;const e={...r,left:t.x,top:t.y};mt(e)},[]);const se=d(0);const bt=d(0);const wt=d(null);const We=Q(()=>{const t=Date.now();const r=t-se.current;if(r>500){bt.current=0}bt.current++;se.current=t;if(wt.current){clearTimeout(wt.current)}wt.current=setTimeout(()=>{if(bt.current===2){nt()}else if(bt.current>=3){if(D){J()}}bt.current=0},300)},[nt,D,J]);C(()=>{return()=>{if(wt.current){clearTimeout(wt.current)}}},[]);if(l==="floating"){return X(i.View,{nativeID:"jsmodal-root",pointerEvents:a?"auto":"none",accessibilityElementsHidden:!a,importantForAccessibility:a?"auto":"no-hide-descendants",style:[o.floatingModal,{width:j.width,height:j.height,opacity:ee,transform:[{translateX:p.x},{translateY:p.y}],...It!==void 0&&{zIndex:It}},H==="night"&&o.nightFloatingModal,(kt||lt)&&o.floatingModalDragging,S.container,!a&&o.parkedOffscreen],children:[xt&&H==="night"?n(c,{style:o.nightBackdropFloating,pointerEvents:"none",children:n(Wt,{})}):null,n(Ge,{position:p,onDragStart:Be,onDragEnd:Ae,onTap:We,containerBounds:Ht,elementSize:j,minPosition:{x:0,y:L.top},style:o.floatingHeader,enabled:l==="floating"&&!lt,children:n(ye,{header:U,onClose:s,onToggleMode:nt,onMinimize:D?J:void 0,isResizing:kt||lt,mode:l,variant:H})}),n(c,{style:o.windowControlsContainer,children:n(fe,{onClose:s,onMinimize:D?J:void 0,onToggleMode:nt,mode:l,variant:H})}),X(c,{style:[o.content,H==="night"&&o.nightContent,S.content],children:[xt&&H!=="night"?n(Wt,{}):null,Xt?n(c,{style:{flex:1,paddingBottom:z},children:W}):n(he,{style:{flex:1},contentContainerStyle:{flexGrow:1,paddingBottom:z},showsVerticalScrollIndicator:true,nestedScrollEnabled:true,keyboardShouldPersistTaps:"handled",children:W}),K?n(c,{style:Ce.footerContainer,children:K}):null]}),n(c,{...ae.bottomLeft.panHandlers,style:[o.cornerHandleWrapper,{bottom:4,left:4}],hitSlop:{top:2,left:2,right:2,bottom:2},children:n(we,{position:"bottomLeft",isActive:kt||lt})}),n(c,{...ae.bottomRight.panHandlers,style:[o.cornerHandleWrapper,{bottom:4,right:4}],hitSlop:{top:2,left:2,right:2,bottom:2},children:n(we,{position:"bottomRight",isActive:kt||lt})})]})}return n(c,{style:[a?o.fullScreenContainer:o.parkedFullScreen,a&&It!==void 0&&{zIndex:It}],pointerEvents:a?"box-none":"none",accessibilityElementsHidden:!a,importantForAccessibility:a?"auto":"no-hide-descendants",children:n(i.View,{nativeID:"jsmodal-root",style:[o.bottomSheetWrapper,{opacity:ee,transform:[{translateY:Se}]}],children:X(i.View,{style:[o.bottomSheet,H==="night"&&o.nightBottomSheet,S.container,{height:g||_}],children:[xt&&H==="night"?n(c,{style:o.nightBackdropSheet,pointerEvents:"none",children:n(Wt,{})}):null,n(ye,{header:U,onClose:s,onToggleMode:nt,onMinimize:D?J:void 0,isResizing:lt,mode:l,panHandlers:ve.panHandlers,variant:H}),n(c,{style:o.windowControlsContainer,children:n(fe,{onClose:s,onMinimize:D?J:void 0,onToggleMode:nt,mode:l,variant:H})}),Te&&Ve&&l==="bottomSheet"&&!De&&n(_e,{onAcknowledge:Le}),X(c,{style:[o.content,H==="night"&&o.nightContent,S.content],children:[xt&&H!=="night"?n(Wt,{}):null,Xt?n(c,{style:{flex:1,paddingBottom:z},children:W}):n(he,{style:{flex:1},contentContainerStyle:{flexGrow:1,paddingBottom:z},showsVerticalScrollIndicator:true,nestedScrollEnabled:true,keyboardShouldPersistTaps:"handled",children:W}),K?n(c,{style:Ce.footerContainer,children:K}):null]})]})})})};const o=At.create({fullScreenContainer:{...jt,zIndex:1e3},bottomSheetWrapper:{position:"absolute",bottom:0,left:0,right:0},bottomSheet:{backgroundColor:b.card,borderTopLeftRadius:6,borderTopRightRadius:6,borderWidth:1,borderColor:b.border,shadowColor:b.primary,shadowOffset:{width:0,height:-4},shadowOpacity:.2,shadowRadius:12,elevation:20},parkedOffscreen:{left:-9999,top:-9999,opacity:0},parkedFullScreen:{position:"absolute",left:-9999,top:-9999,width:u.width,height:u.height,opacity:0},floatingModal:{position:"absolute",backgroundColor:b.card,borderRadius:6,borderWidth:1,borderColor:b.border,shadowColor:b.primary,shadowOffset:{width:0,height:0},shadowOpacity:.3,shadowRadius:20,elevation:24,zIndex:1e3,width:ht,height:ft},floatingModalDragging:{borderColor:b.primary,borderWidth:2,shadowColor:b.primary+"99",shadowOpacity:.8,shadowRadius:12},header:{borderTopLeftRadius:6,borderTopRightRadius:6,backgroundColor:b.card,minHeight:56,borderWidth:1,borderColor:b.border,borderBottomWidth:1,borderBottomColor:b.border},nightBottomSheet:{backgroundColor:T.color.bg,borderTopLeftRadius:T.radius.sheet,borderTopRightRadius:T.radius.sheet,borderWidth:At.hairlineWidth,borderColor:T.color.accent+"55",shadowColor:T.color.accent,shadowOffset:{width:0,height:-4},shadowOpacity:.22,shadowRadius:10},nightFloatingModal:{backgroundColor:T.color.bg,borderRadius:T.radius.sheet,borderWidth:At.hairlineWidth,borderColor:T.color.accent+"55",shadowColor:T.color.accent,shadowOffset:{width:0,height:0},shadowOpacity:.22,shadowRadius:14},nightHeader:{backgroundColor:"transparent",borderWidth:0,borderBottomWidth:0,borderTopLeftRadius:T.radius.sheet,borderTopRightRadius:T.radius.sheet},nightContent:{backgroundColor:"transparent"},nightBackdropSheet:{...jt,borderTopLeftRadius:T.radius.sheet,borderTopRightRadius:T.radius.sheet,overflow:"hidden"},nightBackdropFloating:{...jt,borderRadius:T.radius.sheet,overflow:"hidden"},nightDragIndicator:{width:36,height:5,borderRadius:2.5,backgroundColor:T.color.placeholder,shadowOpacity:0,elevation:0},floatingHeader:{borderTopLeftRadius:6,borderTopRightRadius:6},windowControlsContainer:{position:"absolute",top:4,right:4,zIndex:10},floatingModeHeader:{borderTopLeftRadius:6,borderTopRightRadius:6},headerInner:{flex:1,justifyContent:"center"},dragIndicatorContainer:{alignItems:"center",paddingVertical:8,backgroundColor:"transparent"},dragIndicatorContainerCustom:{minHeight:Xe,justifyContent:"center",paddingVertical:0,backgroundColor:"transparent"},dragIndicator:{width:40,height:3,backgroundColor:b.primary,borderRadius:2,shadowColor:b.primary,shadowOffset:{width:0,height:0},shadowOpacity:.6,shadowRadius:4},floatingDragIndicator:{width:50,height:5,backgroundColor:b.textMuted},dragIndicatorActive:{backgroundColor:b.primary,width:40},resizeGripContainer:{position:"absolute",flexDirection:"row",gap:2,marginTop:12},resizeGripLine:{width:12,height:1,backgroundColor:A.success,opacity:.6},headerContent:{paddingHorizontal:16,alignItems:"center"},headerControls:{position:"absolute",top:8,right:16,flexDirection:"row",alignItems:"center"},headerTitle:{fontSize:16,fontWeight:"600",color:A.primary},headerSubtitle:{fontSize:12,color:A.secondary,paddingTop:4},headerHintText:{position:"absolute",top:0,left:0,right:0,bottom:0,justifyContent:"center",alignItems:"center"},hintText:{fontSize:10,color:A.muted,fontStyle:"italic"},controlButton:{width:28,height:28,borderRadius:6,justifyContent:"center",alignItems:"center",marginLeft:8},toggleButton:{backgroundColor:A.info+"1A",borderWidth:1,borderColor:A.info+"33"},closeButton:{width:28,height:28,borderRadius:6,justifyContent:"center",alignItems:"center",backgroundColor:A.error+"1A",borderWidth:1,borderColor:A.error+"33",marginLeft:8},iconLine:{position:"absolute",top:7.25,left:2,width:12,height:1.5,backgroundColor:A.error},content:{flex:1,backgroundColor:b.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden"},cornerHandle:{position:"absolute",zIndex:1},cornerHandleWrapper:{position:"absolute",width:30,height:30,zIndex:1e3},handler:{width:20,height:20,backgroundColor:"transparent",borderRadius:10,borderWidth:0,borderColor:"transparent"},handlerActive:{backgroundColor:A.success+"1A",borderColor:A.success,borderWidth:2,shadowColor:A.success+"99",shadowOffset:{width:0,height:0},shadowOpacity:1,shadowRadius:8}});const Ce=At.create({footerContainer:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:b.base,borderBottomLeftRadius:16,borderBottomRightRadius:16}});export const JsModal=Bt(a=>{const s=Me()();if(s.status!=="admitted")return a.visible?n(Ne,{}):null;return n(Ue,{...a})});
@@ -1 +1 @@
1
- "use strict";import J,{Fragment as O,useMemo as w,memo as W}from"react";import{View as i,Text as c,ScrollView as H,StyleSheet as j}from"react-native";import{computeLineDiff as U,DiffType as d}from"./lineDiff.js";import{DiffSummary as G}from"./DiffSummary.js";import{devToolsDefaultTheme as _}from"./diffThemes.js";import{monoFont as g}from"../ui/fonts.js";import{jsx as t,Fragment as E,jsxs as f}from"react/jsx-runtime";export const SplitDiffViewer=W(function o({oldValue:m,newValue:D,theme:r=_,options:N={},showThemeName:L=false,height:b=400}){const{hideLineNumbers:C=false,disableWordDiff:x=false,showDiffOnly:h=false,compareMethod:S="words",contextLines:T=3}=N;const F={compareMethod:S,disableWordDiff:x,showDiffOnly:h,contextLines:T};const y=w(()=>U(m,D,F),[m,D,S,x,h,T]);const e=w(()=>P(r,b),[r,b]);const v=n=>{return n.map((l,u)=>{let a="transparent";if(l.type===d.ADDED){a=r.addedWordHighlight}else if(l.type===d.REMOVED){a=r.removedWordHighlight}return t(c,{style:[e.wordDiff,{backgroundColor:a}],children:l.value},u)})};const I=(n,l=false)=>{if(l){return{background:r.modifiedBackground,text:r.modifiedText,markerBg:r.markerModifiedBackground}}switch(n){case d.ADDED:return{background:r.addedBackground,text:r.addedText,markerBg:r.markerAddedBackground};case d.REMOVED:return{background:r.removedBackground,text:r.removedText,markerBg:r.markerRemovedBackground};case d.DEFAULT:return{background:r.unchangedBackground,text:r.unchangedText,markerBg:"transparent"};default:return{background:r.unchangedBackground,text:r.unchangedText,markerBg:"transparent"}}};const k=(n,l,u,a,p=false)=>{if(p){return f(E,{children:[!C&&t(i,{style:[e.gutter,e.emptyGutter],children:t(c,{style:e.lineNumber,children:" "})}),t(i,{style:[e.marker,e.emptyMarker],children:t(c,{style:e.markerText,children:" "})}),t(i,{style:[e.contentCell,e.emptyContent],children:t(c,{style:e.content,children:" "})})]})}const s=I(u);return f(E,{children:[!C&&t(i,{style:[e.gutter,{backgroundColor:r.lineNumberBackground}],children:t(c,{style:e.lineNumber,children:n||" "})}),t(i,{style:[e.marker,{backgroundColor:s.markerBg}],children:t(c,{style:[e.markerText,{color:r.markerText}],children:a})}),t(i,{style:[e.contentCell,{backgroundColor:s.background}],children:t(c,{style:[e.content,{color:s.text}],children:Array.isArray(l)?v(l):l||" "})})]})};const R=(n,l)=>{if(!h||n===0)return false;const u=l[n-1];const a=l[n];const p=a.leftLineNumber&&u.leftLineNumber&&a.leftLineNumber-u.leftLineNumber>1;const s=a.rightLineNumber&&u.rightLineNumber&&a.rightLineNumber-u.rightLineNumber>1;return p||s};const V=(n,l,u)=>{const a=n.type===d.REMOVED;const p=n.type===d.ADDED;const s=n.type===d.MODIFIED;const B=n.type===d.DEFAULT;return f(O,{children:[R(l,u)&&t(i,{style:e.separator,children:t(c,{style:e.separatorText,children:"\u2022 \u2022 \u2022"})}),f(i,{style:e.row,children:[t(i,{style:e.leftSide,children:a||s||B?k(n.leftLineNumber,n.leftContent,s?d.REMOVED:n.type,a||s?"-":" "):k(void 0,void 0,d.DEFAULT," ",true)}),t(i,{style:e.centerDivider}),t(i,{style:e.rightSide,children:p||s||B?k(n.rightLineNumber,n.rightContent,s?d.ADDED:n.type,p||s?"+":" "):k(void 0,void 0,d.DEFAULT," ",true)})]})]},l)};const z=y.filter(n=>n.type===d.ADDED).length;const A=y.filter(n=>n.type===d.REMOVED).length;const M=y.filter(n=>n.type===d.MODIFIED).length;return f(i,{style:[e.container,r.glowColor&&{shadowColor:r.glowColor,shadowOffset:{width:0,height:0},shadowOpacity:r.neonIntensity&&r.neonIntensity>.7?.5:r.neonIntensity&&r.neonIntensity>.3?.3:.1,shadowRadius:r.neonIntensity&&r.neonIntensity>.7?10:r.neonIntensity&&r.neonIntensity>.3?5:2}],children:[L&&f(i,{style:e.themeBadge,children:[t(c,{style:e.themeName,children:r.name}),t(c,{style:e.themeDescription,children:r.description})]}),f(i,{style:e.header,children:[t(i,{style:e.headerLeft,children:t(c,{style:e.headerTitle,children:"PREV"})}),t(i,{style:e.divider}),t(i,{style:e.headerRight,children:t(c,{style:e.headerTitle,children:"CUR"})})]}),t(G,{added:z,removed:A,modified:M,theme:r}),t(H,{style:e.scrollView,showsVerticalScrollIndicator:false,contentContainerStyle:e.scrollContent,children:y.length===0?t(i,{style:e.emptyState,children:t(c,{style:e.emptyText,children:h?"No differences found":"No content to display"})}):y.map((n,l)=>V(n,l,y))})]})});function P(o,m){return j.create({container:{height:m,backgroundColor:o.background,borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:o.borderColor},themeBadge:{backgroundColor:o.panelBackground,paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:o.borderColor},themeName:{fontSize:12,fontWeight:"700",color:o.accentColor||o.unchangedText,fontFamily:g,letterSpacing:.5},themeDescription:{fontSize:10,color:o.unchangedText,fontFamily:g,marginTop:2,opacity:.8},header:{flexDirection:"row",backgroundColor:o.headerBackground,borderBottomWidth:1,borderBottomColor:o.borderColor},headerLeft:{flex:1,paddingVertical:8,paddingHorizontal:12},headerRight:{flex:1,paddingVertical:8,paddingHorizontal:12},headerTitle:{fontSize:10,fontWeight:"700",color:o.accentColor||o.unchangedText,fontFamily:g,letterSpacing:.5,textTransform:"uppercase"},divider:{width:1,backgroundColor:o.dividerColor},scrollView:{flex:1},scrollContent:{paddingBottom:10},row:{flexDirection:"row",minHeight:20},leftSide:{flex:1,flexDirection:"row"},rightSide:{flex:1,flexDirection:"row"},centerDivider:{width:1,backgroundColor:o.dividerColor},gutter:{width:35,paddingHorizontal:4,justifyContent:"center",alignItems:"flex-end",backgroundColor:o.lineNumberBackground,borderRightWidth:1,borderRightColor:o.lineNumberBorder},emptyGutter:{backgroundColor:o.contextBackground},lineNumber:{fontSize:9,fontFamily:g,color:o.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:o.contextBackground},markerText:{fontSize:10,fontFamily:g,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:o.contextBackground},content:{fontSize:10,fontFamily:g,lineHeight:16},wordDiff:{fontSize:10,fontFamily:g},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:o.separatorBackground},separatorText:{fontSize:8,color:o.separatorText,fontFamily:g,letterSpacing:2},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:o.emptyStateText,fontStyle:"italic",fontFamily:g}})}
1
+ "use strict";import J,{Fragment as O,useMemo as w,memo as W}from"react";import{View as i,Text as c,ScrollView as H,StyleSheet as j}from"react-native";import{computeLineDiff as U,DiffType as d}from"./lineDiff.js";import{DiffSummary as G}from"./DiffSummary.js";import{devToolsDefaultTheme as _}from"./diffThemes.js";import{monoFont as g}from"../ui/fonts.js";import{jsx as t,Fragment as E,jsxs as f}from"react/jsx-runtime";export const SplitDiffViewer=W(function o({oldValue:m,newValue:D,theme:r=_,options:N={},showThemeName:L=false,height:b=400}){const{hideLineNumbers:C=false,disableWordDiff:x=false,showDiffOnly:h=false,compareMethod:S="words",contextLines:T=3}=N;const F={compareMethod:S,disableWordDiff:x,showDiffOnly:h,contextLines:T};const y=w(()=>U(m,D,F),[m,D,S,x,h,T]);const e=w(()=>P(r,b),[r,b]);const v=n=>{return n.map((l,u)=>{let a="transparent";if(l.type===d.ADDED){a=r.addedWordHighlight}else if(l.type===d.REMOVED){a=r.removedWordHighlight}return t(c,{style:[e.wordDiff,{backgroundColor:a}],children:l.value},u)})};const I=(n,l=false)=>{if(l){return{background:r.modifiedBackground,text:r.modifiedText,markerBg:r.markerModifiedBackground}}switch(n){case d.ADDED:return{background:r.addedBackground,text:r.addedText,markerBg:r.markerAddedBackground};case d.REMOVED:return{background:r.removedBackground,text:r.removedText,markerBg:r.markerRemovedBackground};case d.DEFAULT:return{background:r.unchangedBackground,text:r.unchangedText,markerBg:"transparent"};default:return{background:r.unchangedBackground,text:r.unchangedText,markerBg:"transparent"}}};const k=(n,l,u,a,p=false)=>{if(p){return f(E,{children:[!C&&t(i,{style:[e.gutter,e.emptyGutter],children:t(c,{style:e.lineNumber,children:" "})}),t(i,{style:[e.marker,e.emptyMarker],children:t(c,{style:e.markerText,children:" "})}),t(i,{style:[e.contentCell,e.emptyContent],children:t(c,{style:e.content,children:" "})})]})}const s=I(u);return f(E,{children:[!C&&t(i,{style:[e.gutter,{backgroundColor:r.lineNumberBackground}],children:t(c,{style:e.lineNumber,children:n||" "})}),t(i,{style:[e.marker,{backgroundColor:s.markerBg}],children:t(c,{style:[e.markerText,{color:r.markerText}],children:a})}),t(i,{style:[e.contentCell,{backgroundColor:s.background}],children:t(c,{style:[e.content,{color:s.text}],children:Array.isArray(l)?v(l):l||" "})})]})};const R=(n,l)=>{if(!h||n===0)return false;const u=l[n-1];const a=l[n];const p=a.leftLineNumber&&u.leftLineNumber&&a.leftLineNumber-u.leftLineNumber>1;const s=a.rightLineNumber&&u.rightLineNumber&&a.rightLineNumber-u.rightLineNumber>1;return p||s};const V=(n,l,u)=>{const a=n.type===d.REMOVED;const p=n.type===d.ADDED;const s=n.type===d.MODIFIED;const B=n.type===d.DEFAULT;return f(O,{children:[R(l,u)&&t(i,{style:e.separator,children:t(c,{style:e.separatorText,children:"\u2022 \u2022 \u2022"})}),f(i,{style:e.row,children:[t(i,{style:e.leftSide,children:a||s||B?k(n.leftLineNumber,n.leftContent,s?d.REMOVED:n.type,a||s?"-":" "):k(void 0,void 0,d.DEFAULT," ",true)}),t(i,{style:e.centerDivider}),t(i,{style:e.rightSide,children:p||s||B?k(n.rightLineNumber,n.rightContent,s?d.ADDED:n.type,p||s?"+":" "):k(void 0,void 0,d.DEFAULT," ",true)})]})]},l)};const z=y.filter(n=>n.type===d.ADDED).length;const A=y.filter(n=>n.type===d.REMOVED).length;const M=y.filter(n=>n.type===d.MODIFIED).length;return f(i,{style:[e.container,r.glowColor&&{shadowColor:r.glowColor,shadowOffset:{width:0,height:0},shadowOpacity:r.neonIntensity&&r.neonIntensity>.7?.5:r.neonIntensity&&r.neonIntensity>.3?.3:.1,shadowRadius:r.neonIntensity&&r.neonIntensity>.7?10:r.neonIntensity&&r.neonIntensity>.3?5:2}],children:[L&&f(i,{style:e.themeBadge,children:[t(c,{style:e.themeName,children:r.name}),t(c,{style:e.themeDescription,children:r.description})]}),f(i,{style:e.header,children:[t(i,{style:e.headerLeft,children:t(c,{style:e.headerTitle,children:"PREV"})}),t(i,{style:e.divider}),t(i,{style:e.headerRight,children:t(c,{style:e.headerTitle,children:"CUR"})})]}),t(G,{added:z,removed:A,modified:M,theme:r}),t(H,{keyboardShouldPersistTaps:"handled",style:e.scrollView,showsVerticalScrollIndicator:false,contentContainerStyle:e.scrollContent,children:y.length===0?t(i,{style:e.emptyState,children:t(c,{style:e.emptyText,children:h?"No differences found":"No content to display"})}):y.map((n,l)=>V(n,l,y))})]})});function P(o,m){return j.create({container:{height:m,backgroundColor:o.background,borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:o.borderColor},themeBadge:{backgroundColor:o.panelBackground,paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:o.borderColor},themeName:{fontSize:12,fontWeight:"700",color:o.accentColor||o.unchangedText,fontFamily:g,letterSpacing:.5},themeDescription:{fontSize:10,color:o.unchangedText,fontFamily:g,marginTop:2,opacity:.8},header:{flexDirection:"row",backgroundColor:o.headerBackground,borderBottomWidth:1,borderBottomColor:o.borderColor},headerLeft:{flex:1,paddingVertical:8,paddingHorizontal:12},headerRight:{flex:1,paddingVertical:8,paddingHorizontal:12},headerTitle:{fontSize:10,fontWeight:"700",color:o.accentColor||o.unchangedText,fontFamily:g,letterSpacing:.5,textTransform:"uppercase"},divider:{width:1,backgroundColor:o.dividerColor},scrollView:{flex:1},scrollContent:{paddingBottom:10},row:{flexDirection:"row",minHeight:20},leftSide:{flex:1,flexDirection:"row"},rightSide:{flex:1,flexDirection:"row"},centerDivider:{width:1,backgroundColor:o.dividerColor},gutter:{width:35,paddingHorizontal:4,justifyContent:"center",alignItems:"flex-end",backgroundColor:o.lineNumberBackground,borderRightWidth:1,borderRightColor:o.lineNumberBorder},emptyGutter:{backgroundColor:o.contextBackground},lineNumber:{fontSize:9,fontFamily:g,color:o.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:o.contextBackground},markerText:{fontSize:10,fontFamily:g,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:o.contextBackground},content:{fontSize:10,fontFamily:g,lineHeight:16},wordDiff:{fontSize:10,fontFamily:g},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:o.separatorBackground},separatorText:{fontSize:8,color:o.separatorText,fontFamily:g,letterSpacing:2},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:o.emptyStateText,fontStyle:"italic",fontFamily:g}})}
@@ -1 +1 @@
1
- "use strict";import{Fragment as C,memo as O,useCallback as S,useEffect as W,useMemo as x,useRef as H,useState as A}from"react";import{View as u,Text as m,FlatList as V,StyleSheet as j,TouchableOpacity as _}from"react-native";import{computeLineDiff as $,DiffType as g}from"./lineDiff.js";import{DiffSummary as P}from"./DiffSummary.js";import{TimestampDeltaBar as U}from"./TimestampDeltaBar.js";import{describeTimestampDeltas as G}from"./timestampDiff.js";import{JsonStringNotice as J}from"./JsonStringNotice.js";import{decodeJsonStringPair as X}from"./jsonStringValue.js";import{monoFont as y}from"../ui/fonts.js";import{jsx as o,jsxs as k}from"react/jsx-runtime";const Z={hideLineNumbers:false,disableWordDiff:false,showDiffOnly:false,compareMethod:"words",contextLines:3,lineOffset:0};export function ThemedSplitView({oldValue:e,newValue:r,theme:n,options:l=Z,showThemeName:a=false,scrollEnabled:c=true}){const t=x(()=>re(n,c),[n,c]);const i=x(()=>({compareMethod:l.compareMethod,disableWordDiff:l.disableWordDiff,showDiffOnly:l.showDiffOnly,contextLines:l.contextLines}),[l.compareMethod,l.disableWordDiff,l.showDiffOnly,l.contextLines]);const d=x(()=>X(e,r),[e,r]);const f=x(()=>$(d.left,d.right,i),[d,i]);const p=x(()=>{let s=0;let D=0;let h=0;for(const T of f){if(T.type===g.ADDED)s++;else if(T.type===g.REMOVED)D++;else if(T.type===g.MODIFIED)h++}return{added:s,removed:D,modified:h}},[f]);const b=x(()=>G(d.left,d.right),[d]);const[I,B]=A(()=>new Set);const E=H(false);W(()=>{if(!E.current){E.current=true;return}B(new Set)},[e,r]);const F=x(()=>K(f,I),[f,I]);const N=S(s=>{B(D=>{const h=new Set(D);if(h.has(s))h.delete(s);else h.add(s);return h})},[]);const L=S(s=>s.kind==="row"?`r:${s.diffIndex}`:`f:${s.foldId}`,[]);const w=S(s=>{if(s.kind==="fold"){return o(Q,{foldId:s.foldId,count:s.count,expanded:s.expanded,theme:n,styles:t,onToggle:N})}return o(Y,{diff:s.diff,showSeparator:false,theme:n,options:l,styles:t})},[n,l,t,N]);const z=S(({item:s})=>w(s),[w]);return k(u,{style:[t.container,n.glowColor&&{shadowColor:n.glowColor,shadowOffset:{width:0,height:0},shadowOpacity:n.neonIntensity&&n.neonIntensity>.7?.5:n.neonIntensity&&n.neonIntensity>.3?.3:.1,shadowRadius:n.neonIntensity&&n.neonIntensity>.7?10:n.neonIntensity&&n.neonIntensity>.3?5:2}],children:[a&&k(u,{style:t.themeBadge,children:[o(m,{style:t.themeName,children:n.name}),o(m,{style:t.themeDescription,children:n.description})]}),k(u,{style:t.header,children:[o(u,{style:t.headerLeft,children:o(m,{style:t.headerTitle,children:"PREV"})}),o(u,{style:t.divider}),o(u,{style:t.headerRight,children:o(m,{style:t.headerTitle,children:"CUR"})})]}),o(P,{added:p.added,removed:p.removed,modified:p.modified,theme:n}),o(J,{visible:d.decoded,theme:n}),o(U,{deltas:b,theme:n}),f.length===0?o(u,{style:t.emptyState,children:o(m,{style:t.emptyText,children:l.showDiffOnly?"No differences found":"No content to display"})}):c?o(V,{style:t.scrollView,contentContainerStyle:t.scrollContent,data:F,renderItem:z,keyExtractor:L,showsVerticalScrollIndicator:false,initialNumToRender:20,maxToRenderPerBatch:20,windowSize:7,removeClippedSubviews:true}):o(u,{style:t.scrollContent,children:F.map(s=>o(C,{children:w(s)},L(s)))})]})}const v=3;const q=4;function K(e,r){const n=e.length;if(n===0)return[];const l=new Array(n).fill(false);for(let i=0;i<n;i++){if(e[i].type!==g.DEFAULT){const d=Math.max(0,i-v);const f=Math.min(n-1,i+v);for(let p=d;p<=f;p++)l[p]=true}}const a=[];let c=0;let t=0;while(t<n){if(l[t]){a.push({kind:"row",diff:e[t],diffIndex:t});t++;continue}let i=t;while(i<n&&!l[i])i++;const d=i-t;if(d<q){for(let f=t;f<i;f++){a.push({kind:"row",diff:e[f],diffIndex:f})}}else{const f=c++;const p=r.has(f);a.push({kind:"fold",foldId:f,count:d,expanded:p});if(p){for(let b=t;b<i;b++){a.push({kind:"row",diff:e[b],diffIndex:b})}}}t=i}return a}const Q=O(function e({foldId:r,count:n,expanded:l,theme:a,styles:c,onToggle:t}){return o(_,{style:[c.foldHeader,{backgroundColor:a.separatorBackground}],onPress:()=>t(r),activeOpacity:.7,children:o(m,{style:[c.foldHeaderText,{color:a.separatorText}],children:l?`\u25BC ${n} unchanged line${n===1?"":"s"} \u2014 tap to hide`:`\u25B6 ${n} unchanged line${n===1?"":"s"} \u2014 tap to expand`})})});const Y=O(function e({diff:r,showSeparator:n,theme:l,options:a,styles:c}){const t=r.type===g.REMOVED;const i=r.type===g.ADDED;const d=r.type===g.MODIFIED;const f=r.type===g.DEFAULT;return k(C,{children:[n&&o(u,{style:c.separator,children:o(m,{style:c.separatorText,children:"\u2022 \u2022 \u2022"})}),k(u,{style:c.row,children:[o(u,{style:c.leftSide,children:t||d||f?o(R,{lineNumber:r.leftLineNumber,content:r.leftContent,type:d?g.REMOVED:r.type,marker:t||d?"-":" ",theme:l,options:a,styles:c}):o(M,{options:a,styles:c})}),o(u,{style:c.centerDivider}),o(u,{style:c.rightSide,children:i||d||f?o(R,{lineNumber:r.rightLineNumber,content:r.rightContent,type:d?g.ADDED:r.type,marker:i||d?"+":" ",theme:l,options:a,styles:c}):o(M,{options:a,styles:c})})]})]})});function R({lineNumber:e,content:r,type:n,marker:l,theme:a,options:c,styles:t}){const i=ee(n,a);return k(C,{children:[!c.hideLineNumbers&&o(u,{style:[t.gutter,{backgroundColor:a.lineNumberBackground}],children:o(m,{style:t.lineNumber,children:e||" "})}),o(u,{style:[t.marker,{backgroundColor:i.markerBg}],children:o(m,{style:[t.markerText,{color:a.markerText}],children:l})}),o(u,{style:[t.contentCell,{backgroundColor:i.background}],children:o(m,{style:[t.content,{color:i.text}],children:Array.isArray(r)?r.map((d,f)=>{let p="transparent";if(d.type===g.ADDED){p=a.addedWordHighlight}else if(d.type===g.REMOVED){p=a.removedWordHighlight}return o(m,{style:[t.wordDiff,{backgroundColor:p}],children:d.value},f)}):r||" "})})]})}function M({options:e,styles:r}){return k(C,{children:[!e.hideLineNumbers&&o(u,{style:[r.gutter,r.emptyGutter],children:o(m,{style:r.lineNumber,children:" "})}),o(u,{style:[r.marker,r.emptyMarker],children:o(m,{style:r.markerText,children:" "})}),o(u,{style:[r.contentCell,r.emptyContent],children:o(m,{style:r.content,children:" "})})]})}function ee(e,r){switch(e){case g.ADDED:return{background:r.addedBackground,text:r.addedText,markerBg:r.markerAddedBackground};case g.REMOVED:return{background:r.removedBackground,text:r.removedText,markerBg:r.markerRemovedBackground};case g.DEFAULT:default:return{background:r.unchangedBackground,text:r.unchangedText,markerBg:"transparent"}}}function re(e,r){return j.create({container:{...r?{height:400}:null,backgroundColor:e.background,borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:e.borderColor},themeBadge:{backgroundColor:e.panelBackground,paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:e.borderColor},themeName:{fontSize:12,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:y,letterSpacing:.5},themeDescription:{fontSize:10,color:e.unchangedText,fontFamily:y,marginTop:2,opacity:.8},header:{flexDirection:"row",backgroundColor:e.headerBackground,borderBottomWidth:1,borderBottomColor:e.borderColor},headerLeft:{flex:1,paddingVertical:8,paddingHorizontal:12},headerRight:{flex:1,paddingVertical:8,paddingHorizontal:12},headerTitle:{fontSize:10,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:y,letterSpacing:.5,textTransform:"uppercase"},divider:{width:1,backgroundColor:e.dividerColor},scrollView:{flex:1},scrollContent:{paddingBottom:10},row:{flexDirection:"row",minHeight:20},leftSide:{flex:1,flexDirection:"row"},rightSide:{flex:1,flexDirection:"row"},centerDivider:{width:1,backgroundColor:e.dividerColor},gutter:{width:35,paddingHorizontal:4,justifyContent:"center",alignItems:"flex-end",backgroundColor:e.lineNumberBackground,borderRightWidth:1,borderRightColor:e.lineNumberBorder},emptyGutter:{backgroundColor:e.contextBackground},lineNumber:{fontSize:9,fontFamily:y,color:e.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:e.contextBackground},markerText:{fontSize:10,fontFamily:y,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:e.contextBackground},content:{fontSize:10,fontFamily:y,lineHeight:16},wordDiff:{fontSize:10,fontFamily:y},summaryBar:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:16,paddingVertical:6,backgroundColor:e.summaryBackground,borderTopWidth:1,borderTopColor:e.borderColor},summaryItem:{flexDirection:"row",alignItems:"center"},summaryText:{fontSize:10,fontFamily:y,fontWeight:"700"},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:e.separatorBackground},separatorText:{fontSize:8,color:e.separatorText,fontFamily:y,letterSpacing:2},foldHeader:{paddingVertical:6,paddingHorizontal:12,alignItems:"center",justifyContent:"center",borderTopWidth:1,borderBottomWidth:1,borderColor:e.borderColor},foldHeaderText:{fontSize:10,fontFamily:y,letterSpacing:.5},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:e.emptyStateText,fontStyle:"italic",fontFamily:y}})}
1
+ "use strict";import{Fragment as C,memo as O,useCallback as S,useEffect as W,useMemo as x,useRef as H,useState as A}from"react";import{View as u,Text as m,FlatList as V,StyleSheet as j,TouchableOpacity as P}from"react-native";import{computeLineDiff as _,DiffType as g}from"./lineDiff.js";import{DiffSummary as $}from"./DiffSummary.js";import{TimestampDeltaBar as U}from"./TimestampDeltaBar.js";import{describeTimestampDeltas as G}from"./timestampDiff.js";import{JsonStringNotice as J}from"./JsonStringNotice.js";import{decodeJsonStringPair as X}from"./jsonStringValue.js";import{monoFont as y}from"../ui/fonts.js";import{jsx as o,jsxs as k}from"react/jsx-runtime";const Z={hideLineNumbers:false,disableWordDiff:false,showDiffOnly:false,compareMethod:"words",contextLines:3,lineOffset:0};export function ThemedSplitView({oldValue:e,newValue:r,theme:n,options:l=Z,showThemeName:a=false,scrollEnabled:c=true}){const t=x(()=>re(n,c),[n,c]);const i=x(()=>({compareMethod:l.compareMethod,disableWordDiff:l.disableWordDiff,showDiffOnly:l.showDiffOnly,contextLines:l.contextLines}),[l.compareMethod,l.disableWordDiff,l.showDiffOnly,l.contextLines]);const d=x(()=>X(e,r),[e,r]);const f=x(()=>_(d.left,d.right,i),[d,i]);const p=x(()=>{let s=0;let D=0;let h=0;for(const T of f){if(T.type===g.ADDED)s++;else if(T.type===g.REMOVED)D++;else if(T.type===g.MODIFIED)h++}return{added:s,removed:D,modified:h}},[f]);const b=x(()=>G(d.left,d.right),[d]);const[I,B]=A(()=>new Set);const E=H(false);W(()=>{if(!E.current){E.current=true;return}B(new Set)},[e,r]);const F=x(()=>K(f,I),[f,I]);const N=S(s=>{B(D=>{const h=new Set(D);if(h.has(s))h.delete(s);else h.add(s);return h})},[]);const L=S(s=>s.kind==="row"?`r:${s.diffIndex}`:`f:${s.foldId}`,[]);const w=S(s=>{if(s.kind==="fold"){return o(Q,{foldId:s.foldId,count:s.count,expanded:s.expanded,theme:n,styles:t,onToggle:N})}return o(Y,{diff:s.diff,showSeparator:false,theme:n,options:l,styles:t})},[n,l,t,N]);const z=S(({item:s})=>w(s),[w]);return k(u,{style:[t.container,n.glowColor&&{shadowColor:n.glowColor,shadowOffset:{width:0,height:0},shadowOpacity:n.neonIntensity&&n.neonIntensity>.7?.5:n.neonIntensity&&n.neonIntensity>.3?.3:.1,shadowRadius:n.neonIntensity&&n.neonIntensity>.7?10:n.neonIntensity&&n.neonIntensity>.3?5:2}],children:[a&&k(u,{style:t.themeBadge,children:[o(m,{style:t.themeName,children:n.name}),o(m,{style:t.themeDescription,children:n.description})]}),k(u,{style:t.header,children:[o(u,{style:t.headerLeft,children:o(m,{style:t.headerTitle,children:"PREV"})}),o(u,{style:t.divider}),o(u,{style:t.headerRight,children:o(m,{style:t.headerTitle,children:"CUR"})})]}),o($,{added:p.added,removed:p.removed,modified:p.modified,theme:n}),o(J,{visible:d.decoded,theme:n}),o(U,{deltas:b,theme:n}),f.length===0?o(u,{style:t.emptyState,children:o(m,{style:t.emptyText,children:l.showDiffOnly?"No differences found":"No content to display"})}):c?o(V,{keyboardShouldPersistTaps:"handled",style:t.scrollView,contentContainerStyle:t.scrollContent,data:F,renderItem:z,keyExtractor:L,showsVerticalScrollIndicator:false,initialNumToRender:20,maxToRenderPerBatch:20,windowSize:7,removeClippedSubviews:true}):o(u,{style:t.scrollContent,children:F.map(s=>o(C,{children:w(s)},L(s)))})]})}const v=3;const q=4;function K(e,r){const n=e.length;if(n===0)return[];const l=new Array(n).fill(false);for(let i=0;i<n;i++){if(e[i].type!==g.DEFAULT){const d=Math.max(0,i-v);const f=Math.min(n-1,i+v);for(let p=d;p<=f;p++)l[p]=true}}const a=[];let c=0;let t=0;while(t<n){if(l[t]){a.push({kind:"row",diff:e[t],diffIndex:t});t++;continue}let i=t;while(i<n&&!l[i])i++;const d=i-t;if(d<q){for(let f=t;f<i;f++){a.push({kind:"row",diff:e[f],diffIndex:f})}}else{const f=c++;const p=r.has(f);a.push({kind:"fold",foldId:f,count:d,expanded:p});if(p){for(let b=t;b<i;b++){a.push({kind:"row",diff:e[b],diffIndex:b})}}}t=i}return a}const Q=O(function e({foldId:r,count:n,expanded:l,theme:a,styles:c,onToggle:t}){return o(P,{style:[c.foldHeader,{backgroundColor:a.separatorBackground}],onPress:()=>t(r),activeOpacity:.7,children:o(m,{style:[c.foldHeaderText,{color:a.separatorText}],children:l?`\u25BC ${n} unchanged line${n===1?"":"s"} \u2014 tap to hide`:`\u25B6 ${n} unchanged line${n===1?"":"s"} \u2014 tap to expand`})})});const Y=O(function e({diff:r,showSeparator:n,theme:l,options:a,styles:c}){const t=r.type===g.REMOVED;const i=r.type===g.ADDED;const d=r.type===g.MODIFIED;const f=r.type===g.DEFAULT;return k(C,{children:[n&&o(u,{style:c.separator,children:o(m,{style:c.separatorText,children:"\u2022 \u2022 \u2022"})}),k(u,{style:c.row,children:[o(u,{style:c.leftSide,children:t||d||f?o(R,{lineNumber:r.leftLineNumber,content:r.leftContent,type:d?g.REMOVED:r.type,marker:t||d?"-":" ",theme:l,options:a,styles:c}):o(M,{options:a,styles:c})}),o(u,{style:c.centerDivider}),o(u,{style:c.rightSide,children:i||d||f?o(R,{lineNumber:r.rightLineNumber,content:r.rightContent,type:d?g.ADDED:r.type,marker:i||d?"+":" ",theme:l,options:a,styles:c}):o(M,{options:a,styles:c})})]})]})});function R({lineNumber:e,content:r,type:n,marker:l,theme:a,options:c,styles:t}){const i=ee(n,a);return k(C,{children:[!c.hideLineNumbers&&o(u,{style:[t.gutter,{backgroundColor:a.lineNumberBackground}],children:o(m,{style:t.lineNumber,children:e||" "})}),o(u,{style:[t.marker,{backgroundColor:i.markerBg}],children:o(m,{style:[t.markerText,{color:a.markerText}],children:l})}),o(u,{style:[t.contentCell,{backgroundColor:i.background}],children:o(m,{style:[t.content,{color:i.text}],children:Array.isArray(r)?r.map((d,f)=>{let p="transparent";if(d.type===g.ADDED){p=a.addedWordHighlight}else if(d.type===g.REMOVED){p=a.removedWordHighlight}return o(m,{style:[t.wordDiff,{backgroundColor:p}],children:d.value},f)}):r||" "})})]})}function M({options:e,styles:r}){return k(C,{children:[!e.hideLineNumbers&&o(u,{style:[r.gutter,r.emptyGutter],children:o(m,{style:r.lineNumber,children:" "})}),o(u,{style:[r.marker,r.emptyMarker],children:o(m,{style:r.markerText,children:" "})}),o(u,{style:[r.contentCell,r.emptyContent],children:o(m,{style:r.content,children:" "})})]})}function ee(e,r){switch(e){case g.ADDED:return{background:r.addedBackground,text:r.addedText,markerBg:r.markerAddedBackground};case g.REMOVED:return{background:r.removedBackground,text:r.removedText,markerBg:r.markerRemovedBackground};case g.DEFAULT:default:return{background:r.unchangedBackground,text:r.unchangedText,markerBg:"transparent"}}}function re(e,r){return j.create({container:{...r?{height:400}:null,backgroundColor:e.background,borderRadius:8,overflow:"hidden",borderWidth:1,borderColor:e.borderColor},themeBadge:{backgroundColor:e.panelBackground,paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:e.borderColor},themeName:{fontSize:12,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:y,letterSpacing:.5},themeDescription:{fontSize:10,color:e.unchangedText,fontFamily:y,marginTop:2,opacity:.8},header:{flexDirection:"row",backgroundColor:e.headerBackground,borderBottomWidth:1,borderBottomColor:e.borderColor},headerLeft:{flex:1,paddingVertical:8,paddingHorizontal:12},headerRight:{flex:1,paddingVertical:8,paddingHorizontal:12},headerTitle:{fontSize:10,fontWeight:"700",color:e.accentColor||e.unchangedText,fontFamily:y,letterSpacing:.5,textTransform:"uppercase"},divider:{width:1,backgroundColor:e.dividerColor},scrollView:{flex:1},scrollContent:{paddingBottom:10},row:{flexDirection:"row",minHeight:20},leftSide:{flex:1,flexDirection:"row"},rightSide:{flex:1,flexDirection:"row"},centerDivider:{width:1,backgroundColor:e.dividerColor},gutter:{width:35,paddingHorizontal:4,justifyContent:"center",alignItems:"flex-end",backgroundColor:e.lineNumberBackground,borderRightWidth:1,borderRightColor:e.lineNumberBorder},emptyGutter:{backgroundColor:e.contextBackground},lineNumber:{fontSize:9,fontFamily:y,color:e.lineNumberText},marker:{width:20,justifyContent:"center",alignItems:"center"},emptyMarker:{backgroundColor:e.contextBackground},markerText:{fontSize:10,fontFamily:y,fontWeight:"600"},contentCell:{flex:1,paddingHorizontal:8,paddingVertical:2},emptyContent:{backgroundColor:e.contextBackground},content:{fontSize:10,fontFamily:y,lineHeight:16},wordDiff:{fontSize:10,fontFamily:y},summaryBar:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:16,paddingVertical:6,backgroundColor:e.summaryBackground,borderTopWidth:1,borderTopColor:e.borderColor},summaryItem:{flexDirection:"row",alignItems:"center"},summaryText:{fontSize:10,fontFamily:y,fontWeight:"700"},separator:{height:20,justifyContent:"center",alignItems:"center",backgroundColor:e.separatorBackground},separatorText:{fontSize:8,color:e.separatorText,fontFamily:y,letterSpacing:2},foldHeader:{paddingVertical:6,paddingHorizontal:12,alignItems:"center",justifyContent:"center",borderTopWidth:1,borderBottomWidth:1,borderColor:e.borderColor},foldHeaderText:{fontSize:10,fontFamily:y,letterSpacing:.5},emptyState:{padding:40,alignItems:"center",justifyContent:"center"},emptyText:{fontSize:11,color:e.emptyStateText,fontStyle:"italic",fontFamily:y}})}