@buoy-gg/shared-ui 7.0.40 → 7.0.42

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 (1126) hide show
  1. package/README.md +6 -0
  2. package/dataViewer.js +1 -9
  3. package/floating.js +1 -2
  4. package/history.js +1 -7
  5. package/hooks.js +1 -7
  6. package/lib/commonjs/JsModal.js +1 -1814
  7. package/lib/commonjs/JsModal.web.js +1 -1652
  8. package/lib/commonjs/clipboard/autoDetectClipboard.js +1 -67
  9. package/lib/commonjs/clipboard/clipboard-impl.js +1 -128
  10. package/lib/commonjs/clipboard/clipboard-impl.web.js +1 -0
  11. package/lib/commonjs/clipboard/copyToClipboard.js +1 -64
  12. package/lib/commonjs/clipboard/index.js +1 -25
  13. package/lib/commonjs/colors/index.js +1 -49
  14. package/lib/commonjs/context/HintsContext.js +1 -49
  15. package/lib/commonjs/context/index.js +1 -24
  16. package/lib/commonjs/dataViewer/CyberpunkInput.js +1 -388
  17. package/lib/commonjs/dataViewer/DataTreeActionBar.js +1 -390
  18. package/lib/commonjs/dataViewer/DataTreeActionDock.js +1 -226
  19. package/lib/commonjs/dataViewer/DataViewer.js +1 -158
  20. package/lib/commonjs/dataViewer/DiffSummary.js +1 -134
  21. package/lib/commonjs/dataViewer/IndentGuides.js +1 -128
  22. package/lib/commonjs/dataViewer/IndentGuidesOverlay.js +1 -104
  23. package/lib/commonjs/dataViewer/JsonStringNotice.js +1 -59
  24. package/lib/commonjs/dataViewer/LiveExplorer.js +1 -943
  25. package/lib/commonjs/dataViewer/SplitDiffViewer.js +1 -421
  26. package/lib/commonjs/dataViewer/ThemedSplitView.js +1 -642
  27. package/lib/commonjs/dataViewer/TimestampDeltaBar.js +1 -96
  28. package/lib/commonjs/dataViewer/TypeLegend.js +1 -111
  29. package/lib/commonjs/dataViewer/ValueEditModal.js +1 -386
  30. package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +1 -1270
  31. package/lib/commonjs/dataViewer/diffThemes.js +1 -113
  32. package/lib/commonjs/dataViewer/index.js +1 -320
  33. package/lib/commonjs/dataViewer/jsonOps.js +1 -320
  34. package/lib/commonjs/dataViewer/jsonStringValue.js +1 -94
  35. package/lib/commonjs/dataViewer/lineDiff.js +1 -568
  36. package/lib/commonjs/dataViewer/nestedPath.js +1 -115
  37. package/lib/commonjs/dataViewer/objectDiff.js +1 -304
  38. package/lib/commonjs/dataViewer/timestampDiff.js +1 -146
  39. package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +1 -913
  40. package/lib/commonjs/dataViewer/treeActions.js +1 -168
  41. package/lib/commonjs/dataViewer/useTreeDraft.js +1 -125
  42. package/lib/commonjs/dataViewer/useTreeEditor.js +1 -105
  43. package/lib/commonjs/env/EnvironmentIndicator.js +1 -129
  44. package/lib/commonjs/env/EnvironmentIndicator.web.js +1 -114
  45. package/lib/commonjs/env/EnvironmentSelector.js +1 -205
  46. package/lib/commonjs/env/EnvironmentSelectorInline.js +1 -299
  47. package/lib/commonjs/env/EnvironmentSelectorInline.web.js +1 -178
  48. package/lib/commonjs/history/HistoryProvider.js +1 -246
  49. package/lib/commonjs/history/components/HistoryEntryRow.js +1 -146
  50. package/lib/commonjs/history/components/HistoryList.js +1 -174
  51. package/lib/commonjs/history/components/index.js +1 -25
  52. package/lib/commonjs/history/index.js +1 -61
  53. package/lib/commonjs/history/types.js +1 -5
  54. package/lib/commonjs/hooks/index.js +1 -77
  55. package/lib/commonjs/hooks/safe-area-impl.js +1 -28
  56. package/lib/commonjs/hooks/useChangeLog.js +1 -55
  57. package/lib/commonjs/hooks/useDeviceInfo.js +1 -524
  58. package/lib/commonjs/hooks/useEventStoreEvents.js +1 -65
  59. package/lib/commonjs/hooks/useFilterManager.js +1 -136
  60. package/lib/commonjs/hooks/usePersistedState.js +1 -106
  61. package/lib/commonjs/hooks/useSafeAreaInsets.js +1 -250
  62. package/lib/commonjs/hooks/useSafeAreaInsets.web.js +1 -0
  63. package/lib/commonjs/icons/BenchmarkIcon.js +1 -109
  64. package/lib/commonjs/icons/EnvLaptopIcon.js +1 -204
  65. package/lib/commonjs/icons/IconBackground.js +1 -279
  66. package/lib/commonjs/icons/ReactQueryIcon.js +1 -17
  67. package/lib/commonjs/icons/RenderCountIcon.js +1 -147
  68. package/lib/commonjs/icons/RouteMapIcon.js +1 -250
  69. package/lib/commonjs/icons/SentryBugIcon.js +1 -19
  70. package/lib/commonjs/icons/StackPulseIcon.js +1 -158
  71. package/lib/commonjs/icons/StorageStackIcon.js +1 -156
  72. package/lib/commonjs/icons/WifiCircuitIcon.js +1 -169
  73. package/lib/commonjs/icons/index.js +1 -826
  74. package/lib/commonjs/icons/lucide-icons-original-full.js +1 -3248
  75. package/lib/commonjs/icons/lucide-icons.js +1 -2476
  76. package/lib/commonjs/icons/primitives/GlobeIcon.js +1 -66
  77. package/lib/commonjs/icons/primitives/icon-primitives.js +1 -169
  78. package/lib/commonjs/icons/primitives/index.js +1 -49
  79. package/lib/commonjs/index.js +1 -1098
  80. package/lib/commonjs/license/AccountSetup.js +1 -56
  81. package/lib/commonjs/license/AccountSetup.web.js +14 -81
  82. package/lib/commonjs/license/AccountSetupContent.js +1 -0
  83. package/lib/commonjs/license/FeatureGate.js +1 -788
  84. package/lib/commonjs/license/FreeAccountPrompt.js +1 -205
  85. package/lib/commonjs/license/LicenseEntryModal.js +2 -394
  86. package/lib/commonjs/license/accountRuntime.js +1 -0
  87. package/lib/commonjs/license/accountRuntime.web.js +1 -0
  88. package/lib/commonjs/license/index.js +1 -106
  89. package/lib/commonjs/license/licenseModule.js +1 -119
  90. package/lib/commonjs/license/openPricing.js +1 -36
  91. package/lib/commonjs/license/tierLimits.js +1 -128
  92. package/lib/commonjs/logger/index-sentry.js +1 -245
  93. package/lib/commonjs/logger/index.js +1 -62
  94. package/lib/commonjs/logger/logDump.js +1 -19
  95. package/lib/commonjs/logger/types.js +1 -38
  96. package/lib/commonjs/settings/components/BubbleSettingsSection.js +1 -384
  97. package/lib/commonjs/settings/index.js +1 -24
  98. package/lib/commonjs/storage/definePersistedSetting.js +1 -67
  99. package/lib/commonjs/storage/devToolsStorageKeys.js +1 -359
  100. package/lib/commonjs/storage/index.js +1 -25
  101. package/lib/commonjs/stores/BaseEventStore.js +1 -343
  102. package/lib/commonjs/stores/ChangeLog.js +1 -197
  103. package/lib/commonjs/stores/createToolStore.js +1 -193
  104. package/lib/commonjs/stores/floatingToolStore.js +1 -71
  105. package/lib/commonjs/stores/floatingToolStore.test.js +1 -112
  106. package/lib/commonjs/stores/ignoredPatternsCore.js +1 -75
  107. package/lib/commonjs/stores/ignoredPatternsStore.js +1 -205
  108. package/lib/commonjs/stores/ignoredPatternsStore.shared.js +1 -0
  109. package/lib/commonjs/stores/ignoredPatternsStore.web.js +1 -236
  110. package/lib/commonjs/stores/index.js +1 -51
  111. package/lib/commonjs/sync/keyedArrays.js +1 -209
  112. package/lib/commonjs/sync/toolActionRegistry.js +1 -249
  113. package/lib/commonjs/sync/toolAttention.test.js +1 -51
  114. package/lib/commonjs/sync/toolSyncAdapter.js +1 -63
  115. package/lib/commonjs/sync/toolUiBridge.js +1 -132
  116. package/lib/commonjs/sync/typedEdit.js +1 -228
  117. package/lib/commonjs/sync/valuePath.js +1 -337
  118. package/lib/commonjs/sync/valueShape.js +1 -161
  119. package/lib/commonjs/sync/wireBudget.js +1 -97
  120. package/lib/commonjs/sync/wireForm.js +1 -172
  121. package/lib/commonjs/tools/defineTool.js +1 -79
  122. package/lib/commonjs/types/types.d.js +1 -1
  123. package/lib/commonjs/types/types.js +1 -37
  124. package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.js +1 -354
  125. package/lib/commonjs/ui/backgrounds/ToolBackground.js +1 -76
  126. package/lib/commonjs/ui/backgrounds/backgroundStore.js +1 -130
  127. package/lib/commonjs/ui/backgrounds/index.js +1 -167
  128. package/lib/commonjs/ui/backgrounds/primitives.js +1 -369
  129. package/lib/commonjs/ui/backgrounds/registry.js +1 -98
  130. package/lib/commonjs/ui/backgrounds/rng.js +1 -93
  131. package/lib/commonjs/ui/backgrounds/skyClock.js +1 -45
  132. package/lib/commonjs/ui/backgrounds/types.js +1 -1
  133. package/lib/commonjs/ui/backgrounds/variants/daylight.js +1 -453
  134. package/lib/commonjs/ui/backgrounds/variants/deepField.js +1 -381
  135. package/lib/commonjs/ui/backgrounds/variants/hyperspace.js +1 -218
  136. package/lib/commonjs/ui/backgrounds/variants/liveSky.js +1 -898
  137. package/lib/commonjs/ui/backgrounds/variants/meteors.js +1 -401
  138. package/lib/commonjs/ui/backgrounds/variants/moonlight.js +1 -472
  139. package/lib/commonjs/ui/backgrounds/variants/underwater.js +1 -757
  140. package/lib/commonjs/ui/backgrounds/variants/wormhole/motion.js +1 -48
  141. package/lib/commonjs/ui/backgrounds/variants/wormhole/textures.js +1 -3
  142. package/lib/commonjs/ui/backgrounds/variants/wormhole.js +1 -133
  143. package/lib/commonjs/ui/components/BackButton.js +1 -47
  144. package/lib/commonjs/ui/components/Badge.js +1 -226
  145. package/lib/commonjs/ui/components/ChangeRow.js +1 -111
  146. package/lib/commonjs/ui/components/ChipStrip.js +1 -94
  147. package/lib/commonjs/ui/components/ClipboardHintBanner.js +1 -149
  148. package/lib/commonjs/ui/components/CollapsibleSection.js +1 -170
  149. package/lib/commonjs/ui/components/CompactFilterChips.js +1 -114
  150. package/lib/commonjs/ui/components/CompactRow.js +1 -295
  151. package/lib/commonjs/ui/components/CopyButton.js +1 -307
  152. package/lib/commonjs/ui/components/DataInspector.js +1 -323
  153. package/lib/commonjs/ui/components/DetailView.js +1 -358
  154. package/lib/commonjs/ui/components/DetailViewToggle.js +1 -130
  155. package/lib/commonjs/ui/components/DevToolsCard.js +1 -126
  156. package/lib/commonjs/ui/components/DraggableHeader.js +1 -215
  157. package/lib/commonjs/ui/components/DynamicFilterView.js +1 -758
  158. package/lib/commonjs/ui/components/EmptyState.js +1 -151
  159. package/lib/commonjs/ui/components/EntityFilterView.js +1 -355
  160. package/lib/commonjs/ui/components/EventHistoryViewer/CompareBar.js +1 -211
  161. package/lib/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.js +1 -99
  162. package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -184
  163. package/lib/commonjs/ui/components/EventHistoryViewer/EventPickerModal.js +1 -208
  164. package/lib/commonjs/ui/components/EventHistoryViewer/ViewToggleCards.js +1 -137
  165. package/lib/commonjs/ui/components/EventHistoryViewer/index.js +1 -40
  166. package/lib/commonjs/ui/components/EventHistoryViewer/types.js +1 -5
  167. package/lib/commonjs/ui/components/EventListItem.js +1 -247
  168. package/lib/commonjs/ui/components/EventStepperFooter.js +1 -185
  169. package/lib/commonjs/ui/components/ExpandablePopover.js +1 -381
  170. package/lib/commonjs/ui/components/ExpandedInfoRow.js +1 -108
  171. package/lib/commonjs/ui/components/ExportPreview.js +1 -174
  172. package/lib/commonjs/ui/components/FilterComponents.js +1 -291
  173. package/lib/commonjs/ui/components/GripVerticalIcon.js +1 -65
  174. package/lib/commonjs/ui/components/HeaderSearchButton.js +1 -50
  175. package/lib/commonjs/ui/components/InfoRow.js +1 -91
  176. package/lib/commonjs/ui/components/ListItem.js +1 -173
  177. package/lib/commonjs/ui/components/ModalHeader.js +1 -305
  178. package/lib/commonjs/ui/components/ModalHintBanner.js +1 -147
  179. package/lib/commonjs/ui/components/Pill.js +1 -115
  180. package/lib/commonjs/ui/components/PowerToggleButton.js +1 -78
  181. package/lib/commonjs/ui/components/SearchBar.js +1 -165
  182. package/lib/commonjs/ui/components/SectionHeader.js +1 -129
  183. package/lib/commonjs/ui/components/StatsCard.js +1 -198
  184. package/lib/commonjs/ui/components/StatusIndicator.js +1 -231
  185. package/lib/commonjs/ui/components/StorageTypeBadge.js +1 -97
  186. package/lib/commonjs/ui/components/TabSelector.js +1 -102
  187. package/lib/commonjs/ui/components/TimeDisplay.js +1 -142
  188. package/lib/commonjs/ui/components/ToggleRow.js +1 -116
  189. package/lib/commonjs/ui/components/ToolButton.js +1 -93
  190. package/lib/commonjs/ui/components/ToolEmptyState.js +1 -154
  191. package/lib/commonjs/ui/components/ToolFooter.js +1 -205
  192. package/lib/commonjs/ui/components/ValueTypeBadge.js +1 -147
  193. package/lib/commonjs/ui/components/WindowControls.js +1 -387
  194. package/lib/commonjs/ui/components/index.js +1 -507
  195. package/lib/commonjs/ui/components/windowDrag.js +1 -45
  196. package/lib/commonjs/ui/console/CyberpunkButtonOutline.js +1 -261
  197. package/lib/commonjs/ui/console/CyberpunkIconContainer.js +1 -186
  198. package/lib/commonjs/ui/console/CyberpunkSectionButton.js +1 -123
  199. package/lib/commonjs/ui/floating/FloatingTool.js +1 -1010
  200. package/lib/commonjs/ui/floating/FloatingTool.web.js +1 -591
  201. package/lib/commonjs/ui/floating/FloatingToolHost.js +1 -32
  202. package/lib/commonjs/ui/floating/FloatingToolHost.web.js +1 -28
  203. package/lib/commonjs/ui/floating/index.js +1 -105
  204. package/lib/commonjs/ui/floating/index.web.js +1 -105
  205. package/lib/commonjs/ui/floating/onboardingConstants.js +1 -70
  206. package/lib/commonjs/ui/floating/onboardingConstants.web.js +1 -34
  207. package/lib/commonjs/ui/fonts.js +1 -12
  208. package/lib/commonjs/ui/gameUI/components/GameUICollapsibleSection.js +1 -121
  209. package/lib/commonjs/ui/gameUI/components/GameUICompactStats.js +1 -336
  210. package/lib/commonjs/ui/gameUI/components/GameUIIssuesList.js +1 -284
  211. package/lib/commonjs/ui/gameUI/components/GameUIStatusHeader.js +1 -145
  212. package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +1 -224
  213. package/lib/commonjs/ui/gameUI/constants/macOSDesignSystemColors.js +1 -224
  214. package/lib/commonjs/ui/gameUI/hooks/useGameUIAlertState.js +1 -110
  215. package/lib/commonjs/ui/gameUI/index.js +1 -72
  216. package/lib/commonjs/ui/index.js +1 -217
  217. package/lib/commonjs/ui/listPresets.js +1 -43
  218. package/lib/commonjs/ui/night/nightTheme.js +1 -130
  219. package/lib/commonjs/ui/night/primitives.js +1 -517
  220. package/lib/commonjs/ui/otto/OttoSceneView.js +1 -69
  221. package/lib/commonjs/ui/otto/OttoSprite.js +1 -510
  222. package/lib/commonjs/ui/otto/index.js +1 -60
  223. package/lib/commonjs/ui/otto/ottoEngine.js +1 -2737
  224. package/lib/commonjs/ui/otto/ottoScenes.js +1 -949
  225. package/lib/commonjs/ui/otto/ottoSheet.js +1 -191
  226. package/lib/commonjs/ui/toolTheme.js +1 -97
  227. package/lib/commonjs/utils/absoluteFill.js +1 -28
  228. package/lib/commonjs/utils/browserAsyncStorage.js +1 -0
  229. package/lib/commonjs/utils/browserNavigation.js +1 -0
  230. package/lib/commonjs/utils/devServer.js +1 -62
  231. package/lib/commonjs/utils/devServer.web.js +1 -0
  232. package/lib/commonjs/utils/displayValue.js +1 -41
  233. package/lib/commonjs/utils/domRuntime.js +1 -0
  234. package/lib/commonjs/utils/expoRouterModule.js +1 -0
  235. package/lib/commonjs/utils/expoRouterModule.web.js +1 -0
  236. package/lib/commonjs/utils/formatting/dataFormatting.js +1 -102
  237. package/lib/commonjs/utils/formatting/httpFormatting.js +1 -147
  238. package/lib/commonjs/utils/formatting/index.js +1 -27
  239. package/lib/commonjs/utils/getSafeAreaInsets.js +1 -40
  240. package/lib/commonjs/utils/getSafeAreaInsets.web.js +1 -0
  241. package/lib/commonjs/utils/index.js +1 -309
  242. package/lib/commonjs/utils/loadOptionalModule.js +1 -94
  243. package/lib/commonjs/utils/loadToolModule.js +1 -0
  244. package/lib/commonjs/utils/loadToolModule.web.js +1 -0
  245. package/lib/commonjs/utils/minimalSuperJSON.js +1 -347
  246. package/lib/commonjs/utils/modalStorage.js +1 -0
  247. package/lib/commonjs/utils/nativeWeb.js +1 -0
  248. package/lib/commonjs/utils/persistentStorage.js +1 -609
  249. package/lib/commonjs/utils/persistentStorage.web.js +1 -0
  250. package/lib/commonjs/utils/realNow.js +1 -0
  251. package/lib/commonjs/utils/reloadApp.js +1 -144
  252. package/lib/commonjs/utils/reloadPlatform.js +1 -0
  253. package/lib/commonjs/utils/reloadPlatform.web.js +1 -0
  254. package/lib/commonjs/utils/renderCaptureRegistry.js +1 -59
  255. package/lib/commonjs/utils/safeExpoRouter.js +1 -250
  256. package/lib/commonjs/utils/safeExpoRouter.web.js +1 -0
  257. package/lib/commonjs/utils/safeStringify.js +1 -229
  258. package/lib/commonjs/utils/snapshotProviderKit.js +1 -167
  259. package/lib/commonjs/utils/stateSnapshotRegistry.js +1 -71
  260. package/lib/commonjs/utils/stateTools.js +1 -160
  261. package/lib/commonjs/utils/subscribable.js +1 -113
  262. package/lib/commonjs/utils/subscriberCountNotifier.js +1 -72
  263. package/lib/commonjs/utils/time/RelativeTime.js +1 -31
  264. package/lib/commonjs/utils/time/TickContext.js +1 -43
  265. package/lib/commonjs/utils/time/formatRelativeTime.js +1 -34
  266. package/lib/commonjs/utils/time/index.js +1 -39
  267. package/lib/commonjs/utils/time/useRelativeTime.js +1 -36
  268. package/lib/commonjs/utils/toolModules.js +1 -0
  269. package/lib/commonjs/utils/typeHelpers.js +1 -142
  270. package/lib/commonjs/utils/valueFormatting.js +1 -140
  271. package/lib/module/JsModal.js +1 -1810
  272. package/lib/module/JsModal.web.js +1 -1648
  273. package/lib/module/clipboard/autoDetectClipboard.js +1 -45
  274. package/lib/module/clipboard/clipboard-impl.js +1 -121
  275. package/lib/module/clipboard/clipboard-impl.web.js +1 -0
  276. package/lib/module/clipboard/copyToClipboard.js +1 -60
  277. package/lib/module/clipboard/index.js +1 -5
  278. package/lib/module/colors/index.js +1 -21
  279. package/lib/module/context/HintsContext.js +1 -43
  280. package/lib/module/context/index.js +1 -3
  281. package/lib/module/dataViewer/CyberpunkInput.js +1 -384
  282. package/lib/module/dataViewer/DataTreeActionBar.js +1 -385
  283. package/lib/module/dataViewer/DataTreeActionDock.js +1 -222
  284. package/lib/module/dataViewer/DataViewer.js +1 -153
  285. package/lib/module/dataViewer/DiffSummary.js +1 -129
  286. package/lib/module/dataViewer/IndentGuides.js +1 -124
  287. package/lib/module/dataViewer/IndentGuidesOverlay.js +1 -99
  288. package/lib/module/dataViewer/JsonStringNotice.js +1 -54
  289. package/lib/module/dataViewer/LiveExplorer.js +1 -937
  290. package/lib/module/dataViewer/SplitDiffViewer.js +1 -416
  291. package/lib/module/dataViewer/ThemedSplitView.js +1 -637
  292. package/lib/module/dataViewer/TimestampDeltaBar.js +1 -91
  293. package/lib/module/dataViewer/TypeLegend.js +1 -105
  294. package/lib/module/dataViewer/ValueEditModal.js +1 -382
  295. package/lib/module/dataViewer/VirtualizedDataExplorer.js +1 -1265
  296. package/lib/module/dataViewer/diffThemes.js +1 -109
  297. package/lib/module/dataViewer/index.js +1 -57
  298. package/lib/module/dataViewer/jsonOps.js +1 -311
  299. package/lib/module/dataViewer/jsonStringValue.js +1 -89
  300. package/lib/module/dataViewer/lineDiff.js +1 -564
  301. package/lib/module/dataViewer/nestedPath.js +1 -109
  302. package/lib/module/dataViewer/objectDiff.js +1 -297
  303. package/lib/module/dataViewer/timestampDiff.js +1 -139
  304. package/lib/module/dataViewer/tree/TreeDiffViewer.js +1 -907
  305. package/lib/module/dataViewer/treeActions.js +1 -162
  306. package/lib/module/dataViewer/useTreeDraft.js +1 -121
  307. package/lib/module/dataViewer/useTreeEditor.js +1 -101
  308. package/lib/module/env/EnvironmentIndicator.js +1 -125
  309. package/lib/module/env/EnvironmentIndicator.web.js +1 -108
  310. package/lib/module/env/EnvironmentSelector.js +1 -201
  311. package/lib/module/env/EnvironmentSelectorInline.js +1 -295
  312. package/lib/module/env/EnvironmentSelectorInline.web.js +1 -173
  313. package/lib/module/history/HistoryProvider.js +1 -237
  314. package/lib/module/history/components/HistoryEntryRow.js +1 -142
  315. package/lib/module/history/components/HistoryList.js +1 -169
  316. package/lib/module/history/components/index.js +1 -8
  317. package/lib/module/history/index.js +1 -15
  318. package/lib/module/history/types.js +1 -3
  319. package/lib/module/hooks/index.js +1 -9
  320. package/lib/module/hooks/safe-area-impl.js +1 -23
  321. package/lib/module/hooks/useChangeLog.js +1 -50
  322. package/lib/module/hooks/useDeviceInfo.js +1 -519
  323. package/lib/module/hooks/useEventStoreEvents.js +1 -61
  324. package/lib/module/hooks/useFilterManager.js +1 -132
  325. package/lib/module/hooks/usePersistedState.js +1 -102
  326. package/lib/module/hooks/useSafeAreaInsets.js +1 -245
  327. package/lib/module/hooks/useSafeAreaInsets.web.js +1 -0
  328. package/lib/module/icons/BenchmarkIcon.js +1 -104
  329. package/lib/module/icons/EnvLaptopIcon.js +1 -199
  330. package/lib/module/icons/IconBackground.js +1 -274
  331. package/lib/module/icons/ReactQueryIcon.js +1 -12
  332. package/lib/module/icons/RenderCountIcon.js +1 -142
  333. package/lib/module/icons/RouteMapIcon.js +1 -245
  334. package/lib/module/icons/SentryBugIcon.js +1 -14
  335. package/lib/module/icons/StackPulseIcon.js +1 -153
  336. package/lib/module/icons/StorageStackIcon.js +1 -151
  337. package/lib/module/icons/WifiCircuitIcon.js +1 -164
  338. package/lib/module/icons/index.js +1 -62
  339. package/lib/module/icons/lucide-icons-original-full.js +1 -3178
  340. package/lib/module/icons/lucide-icons.js +1 -2420
  341. package/lib/module/icons/primitives/GlobeIcon.js +1 -61
  342. package/lib/module/icons/primitives/icon-primitives.js +1 -161
  343. package/lib/module/icons/primitives/index.js +1 -15
  344. package/lib/module/index.js +1 -108
  345. package/lib/module/license/AccountSetup.js +1 -52
  346. package/lib/module/license/AccountSetup.web.js +14 -77
  347. package/lib/module/license/AccountSetupContent.js +1 -0
  348. package/lib/module/license/FeatureGate.js +1 -778
  349. package/lib/module/license/FreeAccountPrompt.js +1 -199
  350. package/lib/module/license/LicenseEntryModal.js +2 -388
  351. package/lib/module/license/accountRuntime.js +1 -0
  352. package/lib/module/license/accountRuntime.web.js +1 -0
  353. package/lib/module/license/index.js +1 -9
  354. package/lib/module/license/licenseModule.js +1 -107
  355. package/lib/module/license/openPricing.js +1 -31
  356. package/lib/module/license/tierLimits.js +1 -122
  357. package/lib/module/logger/index-sentry.js +1 -230
  358. package/lib/module/logger/index.js +1 -13
  359. package/lib/module/logger/logDump.js +1 -13
  360. package/lib/module/logger/types.js +1 -37
  361. package/lib/module/settings/components/BubbleSettingsSection.js +1 -378
  362. package/lib/module/settings/index.js +1 -3
  363. package/lib/module/storage/definePersistedSetting.js +1 -63
  364. package/lib/module/storage/devToolsStorageKeys.js +1 -352
  365. package/lib/module/storage/index.js +1 -4
  366. package/lib/module/stores/BaseEventStore.js +1 -339
  367. package/lib/module/stores/ChangeLog.js +1 -192
  368. package/lib/module/stores/createToolStore.js +1 -189
  369. package/lib/module/stores/floatingToolStore.js +1 -61
  370. package/lib/module/stores/floatingToolStore.test.js +1 -111
  371. package/lib/module/stores/ignoredPatternsCore.js +1 -69
  372. package/lib/module/stores/ignoredPatternsStore.js +1 -189
  373. package/lib/module/stores/ignoredPatternsStore.shared.js +1 -0
  374. package/lib/module/stores/ignoredPatternsStore.web.js +1 -221
  375. package/lib/module/stores/index.js +1 -10
  376. package/lib/module/sync/keyedArrays.js +1 -204
  377. package/lib/module/sync/toolActionRegistry.js +1 -236
  378. package/lib/module/sync/toolAttention.test.js +1 -50
  379. package/lib/module/sync/toolSyncAdapter.js +1 -58
  380. package/lib/module/sync/toolUiBridge.js +1 -123
  381. package/lib/module/sync/typedEdit.js +1 -220
  382. package/lib/module/sync/valuePath.js +1 -330
  383. package/lib/module/sync/valueShape.js +1 -153
  384. package/lib/module/sync/wireBudget.js +1 -92
  385. package/lib/module/sync/wireForm.js +1 -159
  386. package/lib/module/tools/defineTool.js +1 -74
  387. package/lib/module/types/types.d.js +1 -1
  388. package/lib/module/types/types.js +1 -32
  389. package/lib/module/ui/backgrounds/BackgroundSwitcher.js +1 -350
  390. package/lib/module/ui/backgrounds/ToolBackground.js +1 -72
  391. package/lib/module/ui/backgrounds/backgroundStore.js +1 -125
  392. package/lib/module/ui/backgrounds/index.js +1 -19
  393. package/lib/module/ui/backgrounds/primitives.js +1 -365
  394. package/lib/module/ui/backgrounds/registry.js +1 -91
  395. package/lib/module/ui/backgrounds/rng.js +1 -85
  396. package/lib/module/ui/backgrounds/skyClock.js +1 -39
  397. package/lib/module/ui/backgrounds/types.js +1 -1
  398. package/lib/module/ui/backgrounds/variants/daylight.js +1 -449
  399. package/lib/module/ui/backgrounds/variants/deepField.js +1 -378
  400. package/lib/module/ui/backgrounds/variants/hyperspace.js +1 -214
  401. package/lib/module/ui/backgrounds/variants/liveSky.js +1 -893
  402. package/lib/module/ui/backgrounds/variants/meteors.js +1 -397
  403. package/lib/module/ui/backgrounds/variants/moonlight.js +1 -468
  404. package/lib/module/ui/backgrounds/variants/underwater.js +1 -753
  405. package/lib/module/ui/backgrounds/variants/wormhole/motion.js +1 -44
  406. package/lib/module/ui/backgrounds/variants/wormhole/textures.js +1 -3
  407. package/lib/module/ui/backgrounds/variants/wormhole.js +1 -129
  408. package/lib/module/ui/components/BackButton.js +1 -43
  409. package/lib/module/ui/components/Badge.js +1 -218
  410. package/lib/module/ui/components/ChangeRow.js +1 -106
  411. package/lib/module/ui/components/ChipStrip.js +1 -91
  412. package/lib/module/ui/components/ClipboardHintBanner.js +1 -145
  413. package/lib/module/ui/components/CollapsibleSection.js +1 -166
  414. package/lib/module/ui/components/CompactFilterChips.js +1 -110
  415. package/lib/module/ui/components/CompactRow.js +1 -291
  416. package/lib/module/ui/components/CopyButton.js +1 -303
  417. package/lib/module/ui/components/DataInspector.js +1 -319
  418. package/lib/module/ui/components/DetailView.js +1 -354
  419. package/lib/module/ui/components/DetailViewToggle.js +1 -125
  420. package/lib/module/ui/components/DevToolsCard.js +1 -122
  421. package/lib/module/ui/components/DraggableHeader.js +1 -211
  422. package/lib/module/ui/components/DynamicFilterView.js +1 -754
  423. package/lib/module/ui/components/EmptyState.js +1 -144
  424. package/lib/module/ui/components/EntityFilterView.js +1 -351
  425. package/lib/module/ui/components/EventHistoryViewer/CompareBar.js +1 -206
  426. package/lib/module/ui/components/EventHistoryViewer/DiffModeTabs.js +1 -94
  427. package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.js +1 -179
  428. package/lib/module/ui/components/EventHistoryViewer/EventPickerModal.js +1 -203
  429. package/lib/module/ui/components/EventHistoryViewer/ViewToggleCards.js +1 -132
  430. package/lib/module/ui/components/EventHistoryViewer/index.js +1 -19
  431. package/lib/module/ui/components/EventHistoryViewer/types.js +1 -3
  432. package/lib/module/ui/components/EventListItem.js +1 -243
  433. package/lib/module/ui/components/EventStepperFooter.js +1 -180
  434. package/lib/module/ui/components/ExpandablePopover.js +1 -378
  435. package/lib/module/ui/components/ExpandedInfoRow.js +1 -103
  436. package/lib/module/ui/components/ExportPreview.js +1 -169
  437. package/lib/module/ui/components/FilterComponents.js +1 -282
  438. package/lib/module/ui/components/GripVerticalIcon.js +1 -61
  439. package/lib/module/ui/components/HeaderSearchButton.js +1 -46
  440. package/lib/module/ui/components/InfoRow.js +1 -87
  441. package/lib/module/ui/components/ListItem.js +1 -169
  442. package/lib/module/ui/components/ModalHeader.js +1 -297
  443. package/lib/module/ui/components/ModalHintBanner.js +1 -143
  444. package/lib/module/ui/components/Pill.js +1 -111
  445. package/lib/module/ui/components/PowerToggleButton.js +1 -74
  446. package/lib/module/ui/components/SearchBar.js +1 -161
  447. package/lib/module/ui/components/SectionHeader.js +1 -125
  448. package/lib/module/ui/components/StatsCard.js +1 -194
  449. package/lib/module/ui/components/StatusIndicator.js +1 -227
  450. package/lib/module/ui/components/StorageTypeBadge.js +1 -93
  451. package/lib/module/ui/components/TabSelector.js +1 -98
  452. package/lib/module/ui/components/TimeDisplay.js +1 -138
  453. package/lib/module/ui/components/ToggleRow.js +1 -112
  454. package/lib/module/ui/components/ToolButton.js +1 -89
  455. package/lib/module/ui/components/ToolEmptyState.js +1 -149
  456. package/lib/module/ui/components/ToolFooter.js +1 -197
  457. package/lib/module/ui/components/ValueTypeBadge.js +1 -143
  458. package/lib/module/ui/components/WindowControls.js +1 -383
  459. package/lib/module/ui/components/index.js +1 -52
  460. package/lib/module/ui/components/windowDrag.js +1 -41
  461. package/lib/module/ui/console/CyberpunkButtonOutline.js +1 -257
  462. package/lib/module/ui/console/CyberpunkIconContainer.js +1 -182
  463. package/lib/module/ui/console/CyberpunkSectionButton.js +1 -119
  464. package/lib/module/ui/floating/FloatingTool.js +1 -1003
  465. package/lib/module/ui/floating/FloatingTool.web.js +1 -590
  466. package/lib/module/ui/floating/FloatingToolHost.js +1 -29
  467. package/lib/module/ui/floating/FloatingToolHost.web.js +1 -25
  468. package/lib/module/ui/floating/index.js +1 -6
  469. package/lib/module/ui/floating/index.web.js +1 -6
  470. package/lib/module/ui/floating/onboardingConstants.js +1 -64
  471. package/lib/module/ui/floating/onboardingConstants.web.js +1 -27
  472. package/lib/module/ui/fonts.js +1 -8
  473. package/lib/module/ui/gameUI/components/GameUICollapsibleSection.js +1 -117
  474. package/lib/module/ui/gameUI/components/GameUICompactStats.js +1 -332
  475. package/lib/module/ui/gameUI/components/GameUIIssuesList.js +1 -280
  476. package/lib/module/ui/gameUI/components/GameUIStatusHeader.js +1 -141
  477. package/lib/module/ui/gameUI/constants/gameUIColors.js +1 -220
  478. package/lib/module/ui/gameUI/constants/macOSDesignSystemColors.js +1 -219
  479. package/lib/module/ui/gameUI/hooks/useGameUIAlertState.js +1 -105
  480. package/lib/module/ui/gameUI/index.js +1 -19
  481. package/lib/module/ui/index.js +1 -31
  482. package/lib/module/ui/listPresets.js +1 -39
  483. package/lib/module/ui/night/nightTheme.js +1 -126
  484. package/lib/module/ui/night/primitives.js +1 -504
  485. package/lib/module/ui/otto/OttoSceneView.js +1 -64
  486. package/lib/module/ui/otto/OttoSprite.js +1 -496
  487. package/lib/module/ui/otto/index.js +1 -22
  488. package/lib/module/ui/otto/ottoEngine.js +1 -2729
  489. package/lib/module/ui/otto/ottoScenes.js +1 -942
  490. package/lib/module/ui/otto/ottoSheet.js +1 -180
  491. package/lib/module/ui/toolTheme.js +1 -93
  492. package/lib/module/utils/absoluteFill.js +1 -24
  493. package/lib/module/utils/browserAsyncStorage.js +1 -0
  494. package/lib/module/utils/browserNavigation.js +1 -0
  495. package/lib/module/utils/devServer.js +1 -58
  496. package/lib/module/utils/devServer.web.js +1 -0
  497. package/lib/module/utils/displayValue.js +1 -36
  498. package/lib/module/utils/domRuntime.js +1 -0
  499. package/lib/module/utils/expoRouterModule.js +1 -0
  500. package/lib/module/utils/expoRouterModule.web.js +1 -0
  501. package/lib/module/utils/formatting/dataFormatting.js +1 -93
  502. package/lib/module/utils/formatting/httpFormatting.js +1 -142
  503. package/lib/module/utils/formatting/index.js +1 -8
  504. package/lib/module/utils/getSafeAreaInsets.js +1 -36
  505. package/lib/module/utils/getSafeAreaInsets.web.js +1 -0
  506. package/lib/module/utils/index.js +1 -18
  507. package/lib/module/utils/loadOptionalModule.js +1 -89
  508. package/lib/module/utils/loadToolModule.js +1 -0
  509. package/lib/module/utils/loadToolModule.web.js +1 -0
  510. package/lib/module/utils/minimalSuperJSON.js +1 -342
  511. package/lib/module/utils/modalStorage.js +1 -0
  512. package/lib/module/utils/nativeWeb.js +1 -0
  513. package/lib/module/utils/persistentStorage.js +1 -603
  514. package/lib/module/utils/persistentStorage.web.js +1 -0
  515. package/lib/module/utils/realNow.js +1 -0
  516. package/lib/module/utils/reloadApp.js +1 -137
  517. package/lib/module/utils/reloadPlatform.js +1 -0
  518. package/lib/module/utils/reloadPlatform.web.js +1 -0
  519. package/lib/module/utils/renderCaptureRegistry.js +1 -54
  520. package/lib/module/utils/safeExpoRouter.js +1 -239
  521. package/lib/module/utils/safeExpoRouter.web.js +1 -0
  522. package/lib/module/utils/safeStringify.js +1 -225
  523. package/lib/module/utils/snapshotProviderKit.js +1 -156
  524. package/lib/module/utils/stateSnapshotRegistry.js +1 -64
  525. package/lib/module/utils/stateTools.js +1 -154
  526. package/lib/module/utils/subscribable.js +1 -108
  527. package/lib/module/utils/subscriberCountNotifier.js +1 -66
  528. package/lib/module/utils/time/RelativeTime.js +1 -28
  529. package/lib/module/utils/time/TickContext.js +1 -38
  530. package/lib/module/utils/time/formatRelativeTime.js +1 -30
  531. package/lib/module/utils/time/index.js +1 -6
  532. package/lib/module/utils/time/useRelativeTime.js +1 -33
  533. package/lib/module/utils/toolModules.js +1 -0
  534. package/lib/module/utils/typeHelpers.js +1 -130
  535. package/lib/module/utils/valueFormatting.js +1 -131
  536. package/lib/typescript/commonjs/JsModal.web.d.ts +7 -18
  537. package/lib/typescript/commonjs/clipboard/clipboard-impl.web.d.ts +5 -0
  538. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  539. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.web.d.ts +6 -0
  540. package/lib/typescript/commonjs/icons/index.d.ts +2 -0
  541. package/lib/typescript/commonjs/index.d.ts +3 -1
  542. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts +1 -1
  543. package/lib/typescript/commonjs/license/AccountSetupContent.d.ts +11 -0
  544. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts +3 -15
  545. package/lib/typescript/commonjs/license/accountRuntime.d.ts +2 -0
  546. package/lib/typescript/commonjs/license/accountRuntime.web.d.ts +2 -0
  547. package/lib/typescript/commonjs/license/licenseModule.d.ts +3 -1
  548. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +8 -0
  549. package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts +1 -59
  550. package/lib/typescript/commonjs/stores/ignoredPatternsStore.shared.d.ts +60 -0
  551. package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts +1 -71
  552. package/lib/typescript/commonjs/ui/night/primitives.d.ts +9 -3
  553. package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts +1 -1
  554. package/lib/typescript/commonjs/utils/browserAsyncStorage.d.ts +25 -0
  555. package/lib/typescript/commonjs/utils/browserNavigation.d.ts +31 -0
  556. package/lib/typescript/commonjs/utils/devServer.web.d.ts +2 -0
  557. package/lib/typescript/commonjs/utils/domRuntime.d.ts +27 -0
  558. package/lib/typescript/commonjs/utils/expoRouterModule.d.ts +3 -0
  559. package/lib/typescript/commonjs/utils/expoRouterModule.web.d.ts +3 -0
  560. package/lib/typescript/commonjs/utils/getSafeAreaInsets.web.d.ts +8 -0
  561. package/lib/typescript/commonjs/utils/index.d.ts +6 -0
  562. package/lib/typescript/commonjs/utils/loadToolModule.d.ts +3 -0
  563. package/lib/typescript/commonjs/utils/loadToolModule.web.d.ts +2 -0
  564. package/lib/typescript/commonjs/utils/modalStorage.d.ts +21 -0
  565. package/lib/typescript/commonjs/utils/nativeWeb.d.ts +22 -0
  566. package/lib/typescript/commonjs/utils/persistentStorage.web.d.ts +6 -0
  567. package/lib/typescript/commonjs/utils/realNow.d.ts +11 -0
  568. package/lib/typescript/commonjs/utils/reloadApp.d.ts +7 -25
  569. package/lib/typescript/commonjs/utils/reloadPlatform.d.ts +8 -0
  570. package/lib/typescript/commonjs/utils/reloadPlatform.web.d.ts +4 -0
  571. package/lib/typescript/commonjs/utils/safeExpoRouter.web.d.ts +43 -0
  572. package/lib/typescript/commonjs/utils/toolModules.d.ts +5 -0
  573. package/lib/typescript/module/JsModal.web.d.ts +7 -18
  574. package/lib/typescript/module/clipboard/clipboard-impl.web.d.ts +5 -0
  575. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  576. package/lib/typescript/module/hooks/useSafeAreaInsets.web.d.ts +6 -0
  577. package/lib/typescript/module/icons/index.d.ts +2 -0
  578. package/lib/typescript/module/index.d.ts +3 -1
  579. package/lib/typescript/module/license/AccountSetup.web.d.ts +1 -1
  580. package/lib/typescript/module/license/AccountSetupContent.d.ts +11 -0
  581. package/lib/typescript/module/license/FreeAccountPrompt.d.ts +3 -15
  582. package/lib/typescript/module/license/accountRuntime.d.ts +2 -0
  583. package/lib/typescript/module/license/accountRuntime.web.d.ts +2 -0
  584. package/lib/typescript/module/license/licenseModule.d.ts +3 -1
  585. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +8 -0
  586. package/lib/typescript/module/stores/ignoredPatternsStore.d.ts +1 -59
  587. package/lib/typescript/module/stores/ignoredPatternsStore.shared.d.ts +60 -0
  588. package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts +1 -71
  589. package/lib/typescript/module/ui/night/primitives.d.ts +9 -3
  590. package/lib/typescript/module/ui/otto/ottoEngine.d.ts +1 -1
  591. package/lib/typescript/module/utils/browserAsyncStorage.d.ts +25 -0
  592. package/lib/typescript/module/utils/browserNavigation.d.ts +31 -0
  593. package/lib/typescript/module/utils/devServer.web.d.ts +2 -0
  594. package/lib/typescript/module/utils/domRuntime.d.ts +27 -0
  595. package/lib/typescript/module/utils/expoRouterModule.d.ts +3 -0
  596. package/lib/typescript/module/utils/expoRouterModule.web.d.ts +3 -0
  597. package/lib/typescript/module/utils/getSafeAreaInsets.web.d.ts +8 -0
  598. package/lib/typescript/module/utils/index.d.ts +6 -0
  599. package/lib/typescript/module/utils/loadToolModule.d.ts +3 -0
  600. package/lib/typescript/module/utils/loadToolModule.web.d.ts +2 -0
  601. package/lib/typescript/module/utils/modalStorage.d.ts +21 -0
  602. package/lib/typescript/module/utils/nativeWeb.d.ts +22 -0
  603. package/lib/typescript/module/utils/persistentStorage.web.d.ts +6 -0
  604. package/lib/typescript/module/utils/realNow.d.ts +11 -0
  605. package/lib/typescript/module/utils/reloadApp.d.ts +7 -25
  606. package/lib/typescript/module/utils/reloadPlatform.d.ts +8 -0
  607. package/lib/typescript/module/utils/reloadPlatform.web.d.ts +4 -0
  608. package/lib/typescript/module/utils/safeExpoRouter.web.d.ts +43 -0
  609. package/lib/typescript/module/utils/toolModules.d.ts +5 -0
  610. package/lib/web/asyncStorage.mjs +1 -0
  611. package/lib/web/chunks/chunk-26OV3QDY.mjs +1 -0
  612. package/lib/web/chunks/chunk-3UTMGIUG.mjs +1 -0
  613. package/lib/web/chunks/chunk-53J2FMUD.mjs +1 -0
  614. package/lib/web/chunks/chunk-5KWAGM5V.mjs +1 -0
  615. package/lib/web/chunks/chunk-5NZOQR6Q.mjs +1 -0
  616. package/lib/web/chunks/chunk-7PRKERDN.mjs +1 -0
  617. package/lib/web/chunks/chunk-CE5U3CSQ.mjs +1 -0
  618. package/lib/web/chunks/chunk-D4RXBAOO.mjs +15 -0
  619. package/lib/web/chunks/chunk-ER3T3IDI.mjs +1 -0
  620. package/lib/web/chunks/chunk-GF5C5DVX.mjs +1 -0
  621. package/lib/web/chunks/chunk-K7CGIEFU.mjs +1 -0
  622. package/lib/web/chunks/chunk-L3AFTHWX.mjs +14 -0
  623. package/lib/web/chunks/chunk-LZ7FZZ7R.mjs +1 -0
  624. package/lib/web/chunks/chunk-PTK5FO6C.mjs +1 -0
  625. package/lib/web/chunks/chunk-TJUBBXXK.mjs +1 -0
  626. package/lib/web/chunks/chunk-UKYVRCMZ.mjs +1 -0
  627. package/lib/web/chunks/chunk-XYUAUO57.mjs +1 -0
  628. package/lib/web/chunks/persistentStorage.web-6OAJAVRK.mjs +1 -0
  629. package/lib/web/colors.mjs +1 -0
  630. package/lib/web/dataViewer.mjs +2 -0
  631. package/lib/web/floating.mjs +1 -0
  632. package/lib/web/history.mjs +1 -0
  633. package/lib/web/hooks.mjs +1 -0
  634. package/lib/web/index.mjs +14 -0
  635. package/lib/web/native.mjs +1 -0
  636. package/lib/web/ui.mjs +1 -0
  637. package/lib/web/utils.mjs +1 -0
  638. package/package.json +121 -38
  639. package/scripts/detect-clipboard.js +5 -121
  640. package/scripts/detect-safe-area.js +3 -127
  641. package/ui.js +1 -7
  642. package/utils.js +1 -7
  643. package/lib/typescript/commonjs/JsModal.d.ts.map +0 -1
  644. package/lib/typescript/commonjs/JsModal.web.d.ts.map +0 -1
  645. package/lib/typescript/commonjs/clipboard/autoDetectClipboard.d.ts.map +0 -1
  646. package/lib/typescript/commonjs/clipboard/clipboard-impl.d.ts.map +0 -1
  647. package/lib/typescript/commonjs/clipboard/copyToClipboard.d.ts.map +0 -1
  648. package/lib/typescript/commonjs/clipboard/index.d.ts.map +0 -1
  649. package/lib/typescript/commonjs/colors/index.d.ts.map +0 -1
  650. package/lib/typescript/commonjs/context/HintsContext.d.ts.map +0 -1
  651. package/lib/typescript/commonjs/context/index.d.ts.map +0 -1
  652. package/lib/typescript/commonjs/dataViewer/CyberpunkInput.d.ts.map +0 -1
  653. package/lib/typescript/commonjs/dataViewer/DataTreeActionBar.d.ts.map +0 -1
  654. package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts.map +0 -1
  655. package/lib/typescript/commonjs/dataViewer/DataViewer.d.ts.map +0 -1
  656. package/lib/typescript/commonjs/dataViewer/DiffSummary.d.ts.map +0 -1
  657. package/lib/typescript/commonjs/dataViewer/IndentGuides.d.ts.map +0 -1
  658. package/lib/typescript/commonjs/dataViewer/IndentGuidesOverlay.d.ts.map +0 -1
  659. package/lib/typescript/commonjs/dataViewer/JsonStringNotice.d.ts.map +0 -1
  660. package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts.map +0 -1
  661. package/lib/typescript/commonjs/dataViewer/SplitDiffViewer.d.ts.map +0 -1
  662. package/lib/typescript/commonjs/dataViewer/ThemedSplitView.d.ts.map +0 -1
  663. package/lib/typescript/commonjs/dataViewer/TimestampDeltaBar.d.ts.map +0 -1
  664. package/lib/typescript/commonjs/dataViewer/TypeLegend.d.ts.map +0 -1
  665. package/lib/typescript/commonjs/dataViewer/ValueEditModal.d.ts.map +0 -1
  666. package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +0 -1
  667. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +0 -1
  668. package/lib/typescript/commonjs/dataViewer/index.d.ts.map +0 -1
  669. package/lib/typescript/commonjs/dataViewer/jsonOps.d.ts.map +0 -1
  670. package/lib/typescript/commonjs/dataViewer/jsonStringValue.d.ts.map +0 -1
  671. package/lib/typescript/commonjs/dataViewer/lineDiff.d.ts.map +0 -1
  672. package/lib/typescript/commonjs/dataViewer/nestedPath.d.ts.map +0 -1
  673. package/lib/typescript/commonjs/dataViewer/objectDiff.d.ts.map +0 -1
  674. package/lib/typescript/commonjs/dataViewer/timestampDiff.d.ts.map +0 -1
  675. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +0 -1
  676. package/lib/typescript/commonjs/dataViewer/treeActions.d.ts.map +0 -1
  677. package/lib/typescript/commonjs/dataViewer/useTreeDraft.d.ts.map +0 -1
  678. package/lib/typescript/commonjs/dataViewer/useTreeEditor.d.ts.map +0 -1
  679. package/lib/typescript/commonjs/env/EnvironmentIndicator.d.ts.map +0 -1
  680. package/lib/typescript/commonjs/env/EnvironmentIndicator.web.d.ts.map +0 -1
  681. package/lib/typescript/commonjs/env/EnvironmentSelector.d.ts.map +0 -1
  682. package/lib/typescript/commonjs/env/EnvironmentSelectorInline.d.ts.map +0 -1
  683. package/lib/typescript/commonjs/env/EnvironmentSelectorInline.web.d.ts.map +0 -1
  684. package/lib/typescript/commonjs/history/HistoryProvider.d.ts.map +0 -1
  685. package/lib/typescript/commonjs/history/components/HistoryEntryRow.d.ts.map +0 -1
  686. package/lib/typescript/commonjs/history/components/HistoryList.d.ts.map +0 -1
  687. package/lib/typescript/commonjs/history/components/index.d.ts.map +0 -1
  688. package/lib/typescript/commonjs/history/index.d.ts.map +0 -1
  689. package/lib/typescript/commonjs/history/types.d.ts.map +0 -1
  690. package/lib/typescript/commonjs/hooks/index.d.ts.map +0 -1
  691. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts.map +0 -1
  692. package/lib/typescript/commonjs/hooks/useChangeLog.d.ts.map +0 -1
  693. package/lib/typescript/commonjs/hooks/useDeviceInfo.d.ts.map +0 -1
  694. package/lib/typescript/commonjs/hooks/useEventStoreEvents.d.ts.map +0 -1
  695. package/lib/typescript/commonjs/hooks/useFilterManager.d.ts.map +0 -1
  696. package/lib/typescript/commonjs/hooks/usePersistedState.d.ts.map +0 -1
  697. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.d.ts.map +0 -1
  698. package/lib/typescript/commonjs/icons/BenchmarkIcon.d.ts.map +0 -1
  699. package/lib/typescript/commonjs/icons/EnvLaptopIcon.d.ts.map +0 -1
  700. package/lib/typescript/commonjs/icons/IconBackground.d.ts.map +0 -1
  701. package/lib/typescript/commonjs/icons/ReactQueryIcon.d.ts.map +0 -1
  702. package/lib/typescript/commonjs/icons/RenderCountIcon.d.ts.map +0 -1
  703. package/lib/typescript/commonjs/icons/RouteMapIcon.d.ts.map +0 -1
  704. package/lib/typescript/commonjs/icons/SentryBugIcon.d.ts.map +0 -1
  705. package/lib/typescript/commonjs/icons/StackPulseIcon.d.ts.map +0 -1
  706. package/lib/typescript/commonjs/icons/StorageStackIcon.d.ts.map +0 -1
  707. package/lib/typescript/commonjs/icons/WifiCircuitIcon.d.ts.map +0 -1
  708. package/lib/typescript/commonjs/icons/index.d.ts.map +0 -1
  709. package/lib/typescript/commonjs/icons/lucide-icons-original-full.d.ts.map +0 -1
  710. package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +0 -1
  711. package/lib/typescript/commonjs/icons/primitives/GlobeIcon.d.ts.map +0 -1
  712. package/lib/typescript/commonjs/icons/primitives/icon-primitives.d.ts.map +0 -1
  713. package/lib/typescript/commonjs/icons/primitives/index.d.ts.map +0 -1
  714. package/lib/typescript/commonjs/index.d.ts.map +0 -1
  715. package/lib/typescript/commonjs/license/AccountSetup.d.ts.map +0 -1
  716. package/lib/typescript/commonjs/license/AccountSetup.web.d.ts.map +0 -1
  717. package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +0 -1
  718. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +0 -1
  719. package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +0 -1
  720. package/lib/typescript/commonjs/license/index.d.ts.map +0 -1
  721. package/lib/typescript/commonjs/license/licenseModule.d.ts.map +0 -1
  722. package/lib/typescript/commonjs/license/openPricing.d.ts.map +0 -1
  723. package/lib/typescript/commonjs/license/tierLimits.d.ts.map +0 -1
  724. package/lib/typescript/commonjs/logger/index-sentry.d.ts.map +0 -1
  725. package/lib/typescript/commonjs/logger/index.d.ts.map +0 -1
  726. package/lib/typescript/commonjs/logger/logDump.d.ts.map +0 -1
  727. package/lib/typescript/commonjs/logger/types.d.ts.map +0 -1
  728. package/lib/typescript/commonjs/settings/components/BubbleSettingsSection.d.ts.map +0 -1
  729. package/lib/typescript/commonjs/settings/index.d.ts.map +0 -1
  730. package/lib/typescript/commonjs/storage/definePersistedSetting.d.ts.map +0 -1
  731. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +0 -1
  732. package/lib/typescript/commonjs/storage/index.d.ts.map +0 -1
  733. package/lib/typescript/commonjs/stores/BaseEventStore.d.ts.map +0 -1
  734. package/lib/typescript/commonjs/stores/ChangeLog.d.ts.map +0 -1
  735. package/lib/typescript/commonjs/stores/createToolStore.d.ts.map +0 -1
  736. package/lib/typescript/commonjs/stores/floatingToolStore.d.ts.map +0 -1
  737. package/lib/typescript/commonjs/stores/floatingToolStore.test.d.ts.map +0 -1
  738. package/lib/typescript/commonjs/stores/ignoredPatternsCore.d.ts.map +0 -1
  739. package/lib/typescript/commonjs/stores/ignoredPatternsStore.d.ts.map +0 -1
  740. package/lib/typescript/commonjs/stores/ignoredPatternsStore.web.d.ts.map +0 -1
  741. package/lib/typescript/commonjs/stores/index.d.ts.map +0 -1
  742. package/lib/typescript/commonjs/sync/keyedArrays.d.ts.map +0 -1
  743. package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts.map +0 -1
  744. package/lib/typescript/commonjs/sync/toolAttention.test.d.ts.map +0 -1
  745. package/lib/typescript/commonjs/sync/toolSyncAdapter.d.ts.map +0 -1
  746. package/lib/typescript/commonjs/sync/toolUiBridge.d.ts.map +0 -1
  747. package/lib/typescript/commonjs/sync/typedEdit.d.ts.map +0 -1
  748. package/lib/typescript/commonjs/sync/valuePath.d.ts.map +0 -1
  749. package/lib/typescript/commonjs/sync/valueShape.d.ts.map +0 -1
  750. package/lib/typescript/commonjs/sync/wireBudget.d.ts.map +0 -1
  751. package/lib/typescript/commonjs/sync/wireForm.d.ts.map +0 -1
  752. package/lib/typescript/commonjs/tools/defineTool.d.ts.map +0 -1
  753. package/lib/typescript/commonjs/types/types.d.ts.map +0 -1
  754. package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +0 -1
  755. package/lib/typescript/commonjs/ui/backgrounds/ToolBackground.d.ts.map +0 -1
  756. package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +0 -1
  757. package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +0 -1
  758. package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +0 -1
  759. package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +0 -1
  760. package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +0 -1
  761. package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts.map +0 -1
  762. package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +0 -1
  763. package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts.map +0 -1
  764. package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +0 -1
  765. package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts.map +0 -1
  766. package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts.map +0 -1
  767. package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts.map +0 -1
  768. package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts.map +0 -1
  769. package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts.map +0 -1
  770. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/motion.d.ts.map +0 -1
  771. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole/textures.d.ts.map +0 -1
  772. package/lib/typescript/commonjs/ui/backgrounds/variants/wormhole.d.ts.map +0 -1
  773. package/lib/typescript/commonjs/ui/components/BackButton.d.ts.map +0 -1
  774. package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +0 -1
  775. package/lib/typescript/commonjs/ui/components/ChangeRow.d.ts.map +0 -1
  776. package/lib/typescript/commonjs/ui/components/ChipStrip.d.ts.map +0 -1
  777. package/lib/typescript/commonjs/ui/components/ClipboardHintBanner.d.ts.map +0 -1
  778. package/lib/typescript/commonjs/ui/components/CollapsibleSection.d.ts.map +0 -1
  779. package/lib/typescript/commonjs/ui/components/CompactFilterChips.d.ts.map +0 -1
  780. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +0 -1
  781. package/lib/typescript/commonjs/ui/components/CopyButton.d.ts.map +0 -1
  782. package/lib/typescript/commonjs/ui/components/DataInspector.d.ts.map +0 -1
  783. package/lib/typescript/commonjs/ui/components/DetailView.d.ts.map +0 -1
  784. package/lib/typescript/commonjs/ui/components/DetailViewToggle.d.ts.map +0 -1
  785. package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts.map +0 -1
  786. package/lib/typescript/commonjs/ui/components/DraggableHeader.d.ts.map +0 -1
  787. package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +0 -1
  788. package/lib/typescript/commonjs/ui/components/EmptyState.d.ts.map +0 -1
  789. package/lib/typescript/commonjs/ui/components/EntityFilterView.d.ts.map +0 -1
  790. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/CompareBar.d.ts.map +0 -1
  791. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +0 -1
  792. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +0 -1
  793. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +0 -1
  794. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/ViewToggleCards.d.ts.map +0 -1
  795. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/index.d.ts.map +0 -1
  796. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts.map +0 -1
  797. package/lib/typescript/commonjs/ui/components/EventListItem.d.ts.map +0 -1
  798. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +0 -1
  799. package/lib/typescript/commonjs/ui/components/ExpandablePopover.d.ts.map +0 -1
  800. package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts.map +0 -1
  801. package/lib/typescript/commonjs/ui/components/ExportPreview.d.ts.map +0 -1
  802. package/lib/typescript/commonjs/ui/components/FilterComponents.d.ts.map +0 -1
  803. package/lib/typescript/commonjs/ui/components/GripVerticalIcon.d.ts.map +0 -1
  804. package/lib/typescript/commonjs/ui/components/HeaderSearchButton.d.ts.map +0 -1
  805. package/lib/typescript/commonjs/ui/components/InfoRow.d.ts.map +0 -1
  806. package/lib/typescript/commonjs/ui/components/ListItem.d.ts.map +0 -1
  807. package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +0 -1
  808. package/lib/typescript/commonjs/ui/components/ModalHintBanner.d.ts.map +0 -1
  809. package/lib/typescript/commonjs/ui/components/Pill.d.ts.map +0 -1
  810. package/lib/typescript/commonjs/ui/components/PowerToggleButton.d.ts.map +0 -1
  811. package/lib/typescript/commonjs/ui/components/SearchBar.d.ts.map +0 -1
  812. package/lib/typescript/commonjs/ui/components/SectionHeader.d.ts.map +0 -1
  813. package/lib/typescript/commonjs/ui/components/StatsCard.d.ts.map +0 -1
  814. package/lib/typescript/commonjs/ui/components/StatusIndicator.d.ts.map +0 -1
  815. package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +0 -1
  816. package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +0 -1
  817. package/lib/typescript/commonjs/ui/components/TimeDisplay.d.ts.map +0 -1
  818. package/lib/typescript/commonjs/ui/components/ToggleRow.d.ts.map +0 -1
  819. package/lib/typescript/commonjs/ui/components/ToolButton.d.ts.map +0 -1
  820. package/lib/typescript/commonjs/ui/components/ToolEmptyState.d.ts.map +0 -1
  821. package/lib/typescript/commonjs/ui/components/ToolFooter.d.ts.map +0 -1
  822. package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +0 -1
  823. package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +0 -1
  824. package/lib/typescript/commonjs/ui/components/index.d.ts.map +0 -1
  825. package/lib/typescript/commonjs/ui/components/windowDrag.d.ts.map +0 -1
  826. package/lib/typescript/commonjs/ui/console/CyberpunkButtonOutline.d.ts.map +0 -1
  827. package/lib/typescript/commonjs/ui/console/CyberpunkIconContainer.d.ts.map +0 -1
  828. package/lib/typescript/commonjs/ui/console/CyberpunkSectionButton.d.ts.map +0 -1
  829. package/lib/typescript/commonjs/ui/floating/FloatingTool.d.ts.map +0 -1
  830. package/lib/typescript/commonjs/ui/floating/FloatingTool.web.d.ts.map +0 -1
  831. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.d.ts.map +0 -1
  832. package/lib/typescript/commonjs/ui/floating/FloatingToolHost.web.d.ts.map +0 -1
  833. package/lib/typescript/commonjs/ui/floating/index.d.ts.map +0 -1
  834. package/lib/typescript/commonjs/ui/floating/index.web.d.ts.map +0 -1
  835. package/lib/typescript/commonjs/ui/floating/onboardingConstants.d.ts.map +0 -1
  836. package/lib/typescript/commonjs/ui/floating/onboardingConstants.web.d.ts.map +0 -1
  837. package/lib/typescript/commonjs/ui/fonts.d.ts.map +0 -1
  838. package/lib/typescript/commonjs/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +0 -1
  839. package/lib/typescript/commonjs/ui/gameUI/components/GameUICompactStats.d.ts.map +0 -1
  840. package/lib/typescript/commonjs/ui/gameUI/components/GameUIIssuesList.d.ts.map +0 -1
  841. package/lib/typescript/commonjs/ui/gameUI/components/GameUIStatusHeader.d.ts.map +0 -1
  842. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +0 -1
  843. package/lib/typescript/commonjs/ui/gameUI/constants/macOSDesignSystemColors.d.ts.map +0 -1
  844. package/lib/typescript/commonjs/ui/gameUI/hooks/useGameUIAlertState.d.ts.map +0 -1
  845. package/lib/typescript/commonjs/ui/gameUI/index.d.ts.map +0 -1
  846. package/lib/typescript/commonjs/ui/index.d.ts.map +0 -1
  847. package/lib/typescript/commonjs/ui/listPresets.d.ts.map +0 -1
  848. package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +0 -1
  849. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +0 -1
  850. package/lib/typescript/commonjs/ui/otto/OttoSceneView.d.ts.map +0 -1
  851. package/lib/typescript/commonjs/ui/otto/OttoSprite.d.ts.map +0 -1
  852. package/lib/typescript/commonjs/ui/otto/index.d.ts.map +0 -1
  853. package/lib/typescript/commonjs/ui/otto/ottoEngine.d.ts.map +0 -1
  854. package/lib/typescript/commonjs/ui/otto/ottoScenes.d.ts.map +0 -1
  855. package/lib/typescript/commonjs/ui/otto/ottoSheet.d.ts.map +0 -1
  856. package/lib/typescript/commonjs/ui/toolTheme.d.ts.map +0 -1
  857. package/lib/typescript/commonjs/utils/absoluteFill.d.ts.map +0 -1
  858. package/lib/typescript/commonjs/utils/devServer.d.ts.map +0 -1
  859. package/lib/typescript/commonjs/utils/displayValue.d.ts.map +0 -1
  860. package/lib/typescript/commonjs/utils/formatting/dataFormatting.d.ts.map +0 -1
  861. package/lib/typescript/commonjs/utils/formatting/httpFormatting.d.ts.map +0 -1
  862. package/lib/typescript/commonjs/utils/formatting/index.d.ts.map +0 -1
  863. package/lib/typescript/commonjs/utils/getSafeAreaInsets.d.ts.map +0 -1
  864. package/lib/typescript/commonjs/utils/index.d.ts.map +0 -1
  865. package/lib/typescript/commonjs/utils/loadOptionalModule.d.ts.map +0 -1
  866. package/lib/typescript/commonjs/utils/minimalSuperJSON.d.ts.map +0 -1
  867. package/lib/typescript/commonjs/utils/persistentStorage.d.ts.map +0 -1
  868. package/lib/typescript/commonjs/utils/reloadApp.d.ts.map +0 -1
  869. package/lib/typescript/commonjs/utils/renderCaptureRegistry.d.ts.map +0 -1
  870. package/lib/typescript/commonjs/utils/safeExpoRouter.d.ts.map +0 -1
  871. package/lib/typescript/commonjs/utils/safeStringify.d.ts.map +0 -1
  872. package/lib/typescript/commonjs/utils/snapshotProviderKit.d.ts.map +0 -1
  873. package/lib/typescript/commonjs/utils/stateSnapshotRegistry.d.ts.map +0 -1
  874. package/lib/typescript/commonjs/utils/stateTools.d.ts.map +0 -1
  875. package/lib/typescript/commonjs/utils/subscribable.d.ts.map +0 -1
  876. package/lib/typescript/commonjs/utils/subscriberCountNotifier.d.ts.map +0 -1
  877. package/lib/typescript/commonjs/utils/time/RelativeTime.d.ts.map +0 -1
  878. package/lib/typescript/commonjs/utils/time/TickContext.d.ts.map +0 -1
  879. package/lib/typescript/commonjs/utils/time/formatRelativeTime.d.ts.map +0 -1
  880. package/lib/typescript/commonjs/utils/time/index.d.ts.map +0 -1
  881. package/lib/typescript/commonjs/utils/time/useRelativeTime.d.ts.map +0 -1
  882. package/lib/typescript/commonjs/utils/typeHelpers.d.ts.map +0 -1
  883. package/lib/typescript/commonjs/utils/valueFormatting.d.ts.map +0 -1
  884. package/lib/typescript/module/JsModal.d.ts.map +0 -1
  885. package/lib/typescript/module/JsModal.web.d.ts.map +0 -1
  886. package/lib/typescript/module/clipboard/autoDetectClipboard.d.ts.map +0 -1
  887. package/lib/typescript/module/clipboard/clipboard-impl.d.ts.map +0 -1
  888. package/lib/typescript/module/clipboard/copyToClipboard.d.ts.map +0 -1
  889. package/lib/typescript/module/clipboard/index.d.ts.map +0 -1
  890. package/lib/typescript/module/colors/index.d.ts.map +0 -1
  891. package/lib/typescript/module/context/HintsContext.d.ts.map +0 -1
  892. package/lib/typescript/module/context/index.d.ts.map +0 -1
  893. package/lib/typescript/module/dataViewer/CyberpunkInput.d.ts.map +0 -1
  894. package/lib/typescript/module/dataViewer/DataTreeActionBar.d.ts.map +0 -1
  895. package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts.map +0 -1
  896. package/lib/typescript/module/dataViewer/DataViewer.d.ts.map +0 -1
  897. package/lib/typescript/module/dataViewer/DiffSummary.d.ts.map +0 -1
  898. package/lib/typescript/module/dataViewer/IndentGuides.d.ts.map +0 -1
  899. package/lib/typescript/module/dataViewer/IndentGuidesOverlay.d.ts.map +0 -1
  900. package/lib/typescript/module/dataViewer/JsonStringNotice.d.ts.map +0 -1
  901. package/lib/typescript/module/dataViewer/LiveExplorer.d.ts.map +0 -1
  902. package/lib/typescript/module/dataViewer/SplitDiffViewer.d.ts.map +0 -1
  903. package/lib/typescript/module/dataViewer/ThemedSplitView.d.ts.map +0 -1
  904. package/lib/typescript/module/dataViewer/TimestampDeltaBar.d.ts.map +0 -1
  905. package/lib/typescript/module/dataViewer/TypeLegend.d.ts.map +0 -1
  906. package/lib/typescript/module/dataViewer/ValueEditModal.d.ts.map +0 -1
  907. package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +0 -1
  908. package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +0 -1
  909. package/lib/typescript/module/dataViewer/index.d.ts.map +0 -1
  910. package/lib/typescript/module/dataViewer/jsonOps.d.ts.map +0 -1
  911. package/lib/typescript/module/dataViewer/jsonStringValue.d.ts.map +0 -1
  912. package/lib/typescript/module/dataViewer/lineDiff.d.ts.map +0 -1
  913. package/lib/typescript/module/dataViewer/nestedPath.d.ts.map +0 -1
  914. package/lib/typescript/module/dataViewer/objectDiff.d.ts.map +0 -1
  915. package/lib/typescript/module/dataViewer/timestampDiff.d.ts.map +0 -1
  916. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +0 -1
  917. package/lib/typescript/module/dataViewer/treeActions.d.ts.map +0 -1
  918. package/lib/typescript/module/dataViewer/useTreeDraft.d.ts.map +0 -1
  919. package/lib/typescript/module/dataViewer/useTreeEditor.d.ts.map +0 -1
  920. package/lib/typescript/module/env/EnvironmentIndicator.d.ts.map +0 -1
  921. package/lib/typescript/module/env/EnvironmentIndicator.web.d.ts.map +0 -1
  922. package/lib/typescript/module/env/EnvironmentSelector.d.ts.map +0 -1
  923. package/lib/typescript/module/env/EnvironmentSelectorInline.d.ts.map +0 -1
  924. package/lib/typescript/module/env/EnvironmentSelectorInline.web.d.ts.map +0 -1
  925. package/lib/typescript/module/history/HistoryProvider.d.ts.map +0 -1
  926. package/lib/typescript/module/history/components/HistoryEntryRow.d.ts.map +0 -1
  927. package/lib/typescript/module/history/components/HistoryList.d.ts.map +0 -1
  928. package/lib/typescript/module/history/components/index.d.ts.map +0 -1
  929. package/lib/typescript/module/history/index.d.ts.map +0 -1
  930. package/lib/typescript/module/history/types.d.ts.map +0 -1
  931. package/lib/typescript/module/hooks/index.d.ts.map +0 -1
  932. package/lib/typescript/module/hooks/safe-area-impl.d.ts.map +0 -1
  933. package/lib/typescript/module/hooks/useChangeLog.d.ts.map +0 -1
  934. package/lib/typescript/module/hooks/useDeviceInfo.d.ts.map +0 -1
  935. package/lib/typescript/module/hooks/useEventStoreEvents.d.ts.map +0 -1
  936. package/lib/typescript/module/hooks/useFilterManager.d.ts.map +0 -1
  937. package/lib/typescript/module/hooks/usePersistedState.d.ts.map +0 -1
  938. package/lib/typescript/module/hooks/useSafeAreaInsets.d.ts.map +0 -1
  939. package/lib/typescript/module/icons/BenchmarkIcon.d.ts.map +0 -1
  940. package/lib/typescript/module/icons/EnvLaptopIcon.d.ts.map +0 -1
  941. package/lib/typescript/module/icons/IconBackground.d.ts.map +0 -1
  942. package/lib/typescript/module/icons/ReactQueryIcon.d.ts.map +0 -1
  943. package/lib/typescript/module/icons/RenderCountIcon.d.ts.map +0 -1
  944. package/lib/typescript/module/icons/RouteMapIcon.d.ts.map +0 -1
  945. package/lib/typescript/module/icons/SentryBugIcon.d.ts.map +0 -1
  946. package/lib/typescript/module/icons/StackPulseIcon.d.ts.map +0 -1
  947. package/lib/typescript/module/icons/StorageStackIcon.d.ts.map +0 -1
  948. package/lib/typescript/module/icons/WifiCircuitIcon.d.ts.map +0 -1
  949. package/lib/typescript/module/icons/index.d.ts.map +0 -1
  950. package/lib/typescript/module/icons/lucide-icons-original-full.d.ts.map +0 -1
  951. package/lib/typescript/module/icons/lucide-icons.d.ts.map +0 -1
  952. package/lib/typescript/module/icons/primitives/GlobeIcon.d.ts.map +0 -1
  953. package/lib/typescript/module/icons/primitives/icon-primitives.d.ts.map +0 -1
  954. package/lib/typescript/module/icons/primitives/index.d.ts.map +0 -1
  955. package/lib/typescript/module/index.d.ts.map +0 -1
  956. package/lib/typescript/module/license/AccountSetup.d.ts.map +0 -1
  957. package/lib/typescript/module/license/AccountSetup.web.d.ts.map +0 -1
  958. package/lib/typescript/module/license/FeatureGate.d.ts.map +0 -1
  959. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +0 -1
  960. package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +0 -1
  961. package/lib/typescript/module/license/index.d.ts.map +0 -1
  962. package/lib/typescript/module/license/licenseModule.d.ts.map +0 -1
  963. package/lib/typescript/module/license/openPricing.d.ts.map +0 -1
  964. package/lib/typescript/module/license/tierLimits.d.ts.map +0 -1
  965. package/lib/typescript/module/logger/index-sentry.d.ts.map +0 -1
  966. package/lib/typescript/module/logger/index.d.ts.map +0 -1
  967. package/lib/typescript/module/logger/logDump.d.ts.map +0 -1
  968. package/lib/typescript/module/logger/types.d.ts.map +0 -1
  969. package/lib/typescript/module/settings/components/BubbleSettingsSection.d.ts.map +0 -1
  970. package/lib/typescript/module/settings/index.d.ts.map +0 -1
  971. package/lib/typescript/module/storage/definePersistedSetting.d.ts.map +0 -1
  972. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +0 -1
  973. package/lib/typescript/module/storage/index.d.ts.map +0 -1
  974. package/lib/typescript/module/stores/BaseEventStore.d.ts.map +0 -1
  975. package/lib/typescript/module/stores/ChangeLog.d.ts.map +0 -1
  976. package/lib/typescript/module/stores/createToolStore.d.ts.map +0 -1
  977. package/lib/typescript/module/stores/floatingToolStore.d.ts.map +0 -1
  978. package/lib/typescript/module/stores/floatingToolStore.test.d.ts.map +0 -1
  979. package/lib/typescript/module/stores/ignoredPatternsCore.d.ts.map +0 -1
  980. package/lib/typescript/module/stores/ignoredPatternsStore.d.ts.map +0 -1
  981. package/lib/typescript/module/stores/ignoredPatternsStore.web.d.ts.map +0 -1
  982. package/lib/typescript/module/stores/index.d.ts.map +0 -1
  983. package/lib/typescript/module/sync/keyedArrays.d.ts.map +0 -1
  984. package/lib/typescript/module/sync/toolActionRegistry.d.ts.map +0 -1
  985. package/lib/typescript/module/sync/toolAttention.test.d.ts.map +0 -1
  986. package/lib/typescript/module/sync/toolSyncAdapter.d.ts.map +0 -1
  987. package/lib/typescript/module/sync/toolUiBridge.d.ts.map +0 -1
  988. package/lib/typescript/module/sync/typedEdit.d.ts.map +0 -1
  989. package/lib/typescript/module/sync/valuePath.d.ts.map +0 -1
  990. package/lib/typescript/module/sync/valueShape.d.ts.map +0 -1
  991. package/lib/typescript/module/sync/wireBudget.d.ts.map +0 -1
  992. package/lib/typescript/module/sync/wireForm.d.ts.map +0 -1
  993. package/lib/typescript/module/tools/defineTool.d.ts.map +0 -1
  994. package/lib/typescript/module/types/types.d.ts.map +0 -1
  995. package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +0 -1
  996. package/lib/typescript/module/ui/backgrounds/ToolBackground.d.ts.map +0 -1
  997. package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +0 -1
  998. package/lib/typescript/module/ui/backgrounds/index.d.ts.map +0 -1
  999. package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +0 -1
  1000. package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +0 -1
  1001. package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +0 -1
  1002. package/lib/typescript/module/ui/backgrounds/skyClock.d.ts.map +0 -1
  1003. package/lib/typescript/module/ui/backgrounds/types.d.ts.map +0 -1
  1004. package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts.map +0 -1
  1005. package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +0 -1
  1006. package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts.map +0 -1
  1007. package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts.map +0 -1
  1008. package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts.map +0 -1
  1009. package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts.map +0 -1
  1010. package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts.map +0 -1
  1011. package/lib/typescript/module/ui/backgrounds/variants/wormhole/motion.d.ts.map +0 -1
  1012. package/lib/typescript/module/ui/backgrounds/variants/wormhole/textures.d.ts.map +0 -1
  1013. package/lib/typescript/module/ui/backgrounds/variants/wormhole.d.ts.map +0 -1
  1014. package/lib/typescript/module/ui/components/BackButton.d.ts.map +0 -1
  1015. package/lib/typescript/module/ui/components/Badge.d.ts.map +0 -1
  1016. package/lib/typescript/module/ui/components/ChangeRow.d.ts.map +0 -1
  1017. package/lib/typescript/module/ui/components/ChipStrip.d.ts.map +0 -1
  1018. package/lib/typescript/module/ui/components/ClipboardHintBanner.d.ts.map +0 -1
  1019. package/lib/typescript/module/ui/components/CollapsibleSection.d.ts.map +0 -1
  1020. package/lib/typescript/module/ui/components/CompactFilterChips.d.ts.map +0 -1
  1021. package/lib/typescript/module/ui/components/CompactRow.d.ts.map +0 -1
  1022. package/lib/typescript/module/ui/components/CopyButton.d.ts.map +0 -1
  1023. package/lib/typescript/module/ui/components/DataInspector.d.ts.map +0 -1
  1024. package/lib/typescript/module/ui/components/DetailView.d.ts.map +0 -1
  1025. package/lib/typescript/module/ui/components/DetailViewToggle.d.ts.map +0 -1
  1026. package/lib/typescript/module/ui/components/DevToolsCard.d.ts.map +0 -1
  1027. package/lib/typescript/module/ui/components/DraggableHeader.d.ts.map +0 -1
  1028. package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +0 -1
  1029. package/lib/typescript/module/ui/components/EmptyState.d.ts.map +0 -1
  1030. package/lib/typescript/module/ui/components/EntityFilterView.d.ts.map +0 -1
  1031. package/lib/typescript/module/ui/components/EventHistoryViewer/CompareBar.d.ts.map +0 -1
  1032. package/lib/typescript/module/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +0 -1
  1033. package/lib/typescript/module/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +0 -1
  1034. package/lib/typescript/module/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +0 -1
  1035. package/lib/typescript/module/ui/components/EventHistoryViewer/ViewToggleCards.d.ts.map +0 -1
  1036. package/lib/typescript/module/ui/components/EventHistoryViewer/index.d.ts.map +0 -1
  1037. package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts.map +0 -1
  1038. package/lib/typescript/module/ui/components/EventListItem.d.ts.map +0 -1
  1039. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +0 -1
  1040. package/lib/typescript/module/ui/components/ExpandablePopover.d.ts.map +0 -1
  1041. package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts.map +0 -1
  1042. package/lib/typescript/module/ui/components/ExportPreview.d.ts.map +0 -1
  1043. package/lib/typescript/module/ui/components/FilterComponents.d.ts.map +0 -1
  1044. package/lib/typescript/module/ui/components/GripVerticalIcon.d.ts.map +0 -1
  1045. package/lib/typescript/module/ui/components/HeaderSearchButton.d.ts.map +0 -1
  1046. package/lib/typescript/module/ui/components/InfoRow.d.ts.map +0 -1
  1047. package/lib/typescript/module/ui/components/ListItem.d.ts.map +0 -1
  1048. package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +0 -1
  1049. package/lib/typescript/module/ui/components/ModalHintBanner.d.ts.map +0 -1
  1050. package/lib/typescript/module/ui/components/Pill.d.ts.map +0 -1
  1051. package/lib/typescript/module/ui/components/PowerToggleButton.d.ts.map +0 -1
  1052. package/lib/typescript/module/ui/components/SearchBar.d.ts.map +0 -1
  1053. package/lib/typescript/module/ui/components/SectionHeader.d.ts.map +0 -1
  1054. package/lib/typescript/module/ui/components/StatsCard.d.ts.map +0 -1
  1055. package/lib/typescript/module/ui/components/StatusIndicator.d.ts.map +0 -1
  1056. package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +0 -1
  1057. package/lib/typescript/module/ui/components/TabSelector.d.ts.map +0 -1
  1058. package/lib/typescript/module/ui/components/TimeDisplay.d.ts.map +0 -1
  1059. package/lib/typescript/module/ui/components/ToggleRow.d.ts.map +0 -1
  1060. package/lib/typescript/module/ui/components/ToolButton.d.ts.map +0 -1
  1061. package/lib/typescript/module/ui/components/ToolEmptyState.d.ts.map +0 -1
  1062. package/lib/typescript/module/ui/components/ToolFooter.d.ts.map +0 -1
  1063. package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +0 -1
  1064. package/lib/typescript/module/ui/components/WindowControls.d.ts.map +0 -1
  1065. package/lib/typescript/module/ui/components/index.d.ts.map +0 -1
  1066. package/lib/typescript/module/ui/components/windowDrag.d.ts.map +0 -1
  1067. package/lib/typescript/module/ui/console/CyberpunkButtonOutline.d.ts.map +0 -1
  1068. package/lib/typescript/module/ui/console/CyberpunkIconContainer.d.ts.map +0 -1
  1069. package/lib/typescript/module/ui/console/CyberpunkSectionButton.d.ts.map +0 -1
  1070. package/lib/typescript/module/ui/floating/FloatingTool.d.ts.map +0 -1
  1071. package/lib/typescript/module/ui/floating/FloatingTool.web.d.ts.map +0 -1
  1072. package/lib/typescript/module/ui/floating/FloatingToolHost.d.ts.map +0 -1
  1073. package/lib/typescript/module/ui/floating/FloatingToolHost.web.d.ts.map +0 -1
  1074. package/lib/typescript/module/ui/floating/index.d.ts.map +0 -1
  1075. package/lib/typescript/module/ui/floating/index.web.d.ts.map +0 -1
  1076. package/lib/typescript/module/ui/floating/onboardingConstants.d.ts.map +0 -1
  1077. package/lib/typescript/module/ui/floating/onboardingConstants.web.d.ts.map +0 -1
  1078. package/lib/typescript/module/ui/fonts.d.ts.map +0 -1
  1079. package/lib/typescript/module/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +0 -1
  1080. package/lib/typescript/module/ui/gameUI/components/GameUICompactStats.d.ts.map +0 -1
  1081. package/lib/typescript/module/ui/gameUI/components/GameUIIssuesList.d.ts.map +0 -1
  1082. package/lib/typescript/module/ui/gameUI/components/GameUIStatusHeader.d.ts.map +0 -1
  1083. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +0 -1
  1084. package/lib/typescript/module/ui/gameUI/constants/macOSDesignSystemColors.d.ts.map +0 -1
  1085. package/lib/typescript/module/ui/gameUI/hooks/useGameUIAlertState.d.ts.map +0 -1
  1086. package/lib/typescript/module/ui/gameUI/index.d.ts.map +0 -1
  1087. package/lib/typescript/module/ui/index.d.ts.map +0 -1
  1088. package/lib/typescript/module/ui/listPresets.d.ts.map +0 -1
  1089. package/lib/typescript/module/ui/night/nightTheme.d.ts.map +0 -1
  1090. package/lib/typescript/module/ui/night/primitives.d.ts.map +0 -1
  1091. package/lib/typescript/module/ui/otto/OttoSceneView.d.ts.map +0 -1
  1092. package/lib/typescript/module/ui/otto/OttoSprite.d.ts.map +0 -1
  1093. package/lib/typescript/module/ui/otto/index.d.ts.map +0 -1
  1094. package/lib/typescript/module/ui/otto/ottoEngine.d.ts.map +0 -1
  1095. package/lib/typescript/module/ui/otto/ottoScenes.d.ts.map +0 -1
  1096. package/lib/typescript/module/ui/otto/ottoSheet.d.ts.map +0 -1
  1097. package/lib/typescript/module/ui/toolTheme.d.ts.map +0 -1
  1098. package/lib/typescript/module/utils/absoluteFill.d.ts.map +0 -1
  1099. package/lib/typescript/module/utils/devServer.d.ts.map +0 -1
  1100. package/lib/typescript/module/utils/displayValue.d.ts.map +0 -1
  1101. package/lib/typescript/module/utils/formatting/dataFormatting.d.ts.map +0 -1
  1102. package/lib/typescript/module/utils/formatting/httpFormatting.d.ts.map +0 -1
  1103. package/lib/typescript/module/utils/formatting/index.d.ts.map +0 -1
  1104. package/lib/typescript/module/utils/getSafeAreaInsets.d.ts.map +0 -1
  1105. package/lib/typescript/module/utils/index.d.ts.map +0 -1
  1106. package/lib/typescript/module/utils/loadOptionalModule.d.ts.map +0 -1
  1107. package/lib/typescript/module/utils/minimalSuperJSON.d.ts.map +0 -1
  1108. package/lib/typescript/module/utils/persistentStorage.d.ts.map +0 -1
  1109. package/lib/typescript/module/utils/reloadApp.d.ts.map +0 -1
  1110. package/lib/typescript/module/utils/renderCaptureRegistry.d.ts.map +0 -1
  1111. package/lib/typescript/module/utils/safeExpoRouter.d.ts.map +0 -1
  1112. package/lib/typescript/module/utils/safeStringify.d.ts.map +0 -1
  1113. package/lib/typescript/module/utils/snapshotProviderKit.d.ts.map +0 -1
  1114. package/lib/typescript/module/utils/stateSnapshotRegistry.d.ts.map +0 -1
  1115. package/lib/typescript/module/utils/stateTools.d.ts.map +0 -1
  1116. package/lib/typescript/module/utils/subscribable.d.ts.map +0 -1
  1117. package/lib/typescript/module/utils/subscriberCountNotifier.d.ts.map +0 -1
  1118. package/lib/typescript/module/utils/time/RelativeTime.d.ts.map +0 -1
  1119. package/lib/typescript/module/utils/time/TickContext.d.ts.map +0 -1
  1120. package/lib/typescript/module/utils/time/formatRelativeTime.d.ts.map +0 -1
  1121. package/lib/typescript/module/utils/time/index.d.ts.map +0 -1
  1122. package/lib/typescript/module/utils/time/useRelativeTime.d.ts.map +0 -1
  1123. package/lib/typescript/module/utils/typeHelpers.d.ts.map +0 -1
  1124. package/lib/typescript/module/utils/valueFormatting.d.ts.map +0 -1
  1125. package/scripts/generate-wormhole-textures.cjs +0 -261
  1126. package/scripts/test-wormhole-motion.cjs +0 -59
@@ -1,1652 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.JsModal = void 0;
7
- var _licenseModule = require("./license/licenseModule.js");
8
- var _AccountSetup = require("./license/AccountSetup");
9
- var _react = require("react");
10
- var _devToolsStorageKeys = require("./storage/devToolsStorageKeys.js");
11
- var _index = require("./context/index.js");
12
- var _ToolBackground = require("./ui/backgrounds/ToolBackground.js");
13
- var _nightTheme = require("./ui/night/nightTheme.js");
14
- var _jsxRuntime = require("react/jsx-runtime");
15
- /**
16
- * JsModal.web — DOM port of JsModal.tsx (React Native).
17
- *
18
- * The dual-mode tool-panel container: draggable bottom sheet ⇄ floating
19
- * window. Same exported names (`JsModal`, `ModalMode`, `ModalState`), same
20
- * prop contract, same gesture spec and persistence key/JSON shape as the
21
- * native file. Zero react-native imports — header chrome that lives in
22
- * shared-ui RN components (`WindowControls`, `DraggableHeader`, `ModalHeader`,
23
- * `ModalHintBanner`) is replicated as DOM with provenance comments, the same
24
- * way DevToolsSettingsModal.web.tsx replicates the WindowControls close dot.
25
- *
26
- * Gesture spec (verbatim from native):
27
- * - Sheet header drag: steal at |dy| > 3px, absolute finger anchoring
28
- * (height = screenH − (pointerY − grab offset)), clamped to
29
- * [minHeight, maxHeight ?? screenH − safeTop]. Fast downward swipe closes:
30
- * (vy > 0.8 px/ms && dy > 50) || (dy > 150 && height <= minHeight).
31
- * - Floating header drag (DraggableHeader.tsx): drag starts at
32
- * |dx|+|dy| > 5, position unclamped during move, clamped on release to
33
- * x ∈ [0, screenW − width], y ∈ [safeTop, screenH − height].
34
- * - Corner resize (bottom corners only): moves < 0.5px ignored; rect clamped
35
- * to safe-area bounds; min size = screenW*0.25 × 80.
36
- * - Header taps (both modes): taps accumulate within a 500ms window and
37
- * settle after 300ms — 2 taps toggles mode, ≥3 taps minimizes.
38
- *
39
- * Persistence (verbatim from native ModalStorage): the `persistenceKey` prop
40
- * is the storage key, used verbatim (native callers pass fully-derived
41
- * `@react_buoy…` keys or short keys — no extra derivation happens here
42
- * either). JSON shape `{ mode, panelHeight, dimensions: {width, height, top,
43
- * left}, isVisible }`, saved on a 500ms debounce after state loads, with the
44
- * same in-memory cache in front of storage. Backed by a local
45
- * localStorage adapter matching the `persistentStorage` API — importing
46
- * `./utils/persistentStorage` is avoided on purpose: its lazy `require()`
47
- * probing of expo-file-system/AsyncStorage doesn't survive Vite's ESM graph.
48
- * The hint-acknowledged flag uses the real `devToolsStorageKeys` helper
49
- * (zero-dep) so the key matches native exactly.
50
- *
51
- * Intentional deviations from the native file (all logged):
52
- * - No native-driver springs: rAF drives all animations. The open/close
53
- * spring (tension 180, friction 22, ~300ms settle) is approximated with a
54
- * 300ms ease-out-cubic; native `Animated.timing` calls keep their exact
55
- * durations (200ms fades, 300ms minimize) with ease-in-out.
56
- * - No RN Modal/overlay layer: fixed-position divs with the `zIndex` prop
57
- * (default 1000, same as the native styles).
58
- * - `benchMotion` and `animatedHeight` (DEV-only benchmark seams) are
59
- * accepted and no-op'd — the web build has no tool-bench harness.
60
- * - `CyberpunkModalHeader` complete-replacement detection in ModalHeader is
61
- * not ported (that component is RN-only); custom header content renders
62
- * inside the standard header structure, with `onMinimize` injected via
63
- * cloneElement like native's non-replacement path.
64
- * - Native captures `Dimensions.get("window")` once at module load; the web
65
- * twin reads `window.innerWidth/innerHeight` lazily so late layout (Tauri/
66
- * WKWebView) doesn't bake in a 0×0 screen.
67
- * - Safe-area insets come from a one-shot `env(safe-area-inset-*)` probe
68
- * (same trick as floatingTools.web.tsx) instead of the RN hook.
69
- * - On restore-from-minimize, the floating position re-syncs from the last
70
- * committed dimensions when the panel becomes visible: the web AppHost
71
- * doesn't pass `initialModalState` back, and without the re-sync the panel
72
- * would reappear at the minimize target.
73
- * - `JsModalProps` is additionally exported (native keeps it private) so web
74
- * consumers can type wrappers without redeclaring the contract.
75
- * - `visible={false}` renders children in a `display:none` div (state and
76
- * listeners survive) instead of native's offscreen −9999 container.
77
- * - The hidden/floating/bottomSheet root branches carry distinct React keys:
78
- * the rAF animations write opacity/transform straight to the DOM, and DOM
79
- * reuse across branches (e.g. an async persisted-mode flip mid-entrance)
80
- * would leak those styles onto unrelated chrome (blank header bug).
81
- *
82
- * @platform React DOM Web (Vite, Tauri, Capacitor/Ionic, Electron)
83
- */
84
-
85
- // RN component, but safe here: every consumer of the web modal (desktop
86
- // renderer, website demos) aliases `react-native` to react-native-web, and
87
- // the backgrounds primitives handle RNW explicitly (see backgrounds/README).
88
-
89
- // Pure token module (no react-native import) — safe on web.
90
-
91
- // ============================================================================
92
- // PALETTE — inlined from shared-ui with provenance (RN-only modules on web)
93
- // ============================================================================
94
-
95
- /** buoyColors from ui/gameUI/constants/gameUIColors.ts — inlined verbatim. */const buoy = {
96
- base: "#121212",
97
- card: "#1A1A1A",
98
- border: "#333333",
99
- textMuted: "#888888",
100
- primary: "#20C997" // Buoy teal
101
- };
102
-
103
- /**
104
- * gameUIColors resolved values (macOS theme active — see gameUIColors.ts
105
- * `activeTheme = macOSTheme` and macOSDesignSystemColors.ts).
106
- */
107
- const gameUI = {
108
- primary: "#F5F5F7",
109
- // macOSColors.text.primary — header title
110
- primaryLight: "#F5F5F7",
111
- // macOS theme maps primaryLight to text.primary too
112
- secondary: "#A1A1A6",
113
- // macOSColors.text.secondary — header subtitle
114
- muted: "#8E8E93",
115
- // macOSColors.text.muted — hint text
116
- success: "#34C759",
117
- // macOSColors.semantic.success — resize grips/handles
118
- info: "#00B8E6" // macOSColors.semantic.info — hint banner
119
- };
120
-
121
- // ============================================================================
122
- // CONSTANTS — same values as native JsModal.tsx
123
- // ============================================================================
124
- const MIN_HEIGHT = 100;
125
- const DEFAULT_HEIGHT = 400;
126
- const FLOATING_HEIGHT = 500;
127
- const FLOATING_MIN_HEIGHT = 80; // header (60) + 20px content
128
- // native: FLOATING_WIDTH = SCREEN.width, FLOATING_MIN_WIDTH = SCREEN.width/4 —
129
- // read lazily on web (see deviations in the file header).
130
- const screenW = () => typeof window !== "undefined" ? window.innerWidth : 0;
131
- const screenH = () => typeof window !== "undefined" ? window.innerHeight : 0;
132
-
133
- // ============================================================================
134
- // STORAGE — exact native ModalStorage semantics over localStorage
135
- // ============================================================================
136
-
137
- /**
138
- * Local localStorage-backed adapter matching the shared `persistentStorage`
139
- * API surface JsModal uses (getItem/setItem). Same recipe as the app shims
140
- * (example-tauri/src/shims/shared-ui.web.ts).
141
- */
142
- const webPersistentStorage = {
143
- async getItem(key) {
144
- try {
145
- return window.localStorage.getItem(key);
146
- } catch {
147
- return null;
148
- }
149
- },
150
- async setItem(key, value) {
151
- try {
152
- window.localStorage.setItem(key, value);
153
- } catch {
154
- // Best-effort, like native's swallowed save errors.
155
- }
156
- }
157
- };
158
-
159
- /** Persisted JSON shape — identical to native `PersistedModalState`. */
160
-
161
- /** Native `ModalStorage` twin: memory cache in front of persistent storage. */
162
- class ModalStorage {
163
- static memoryCache = {};
164
- static async save(key, value) {
165
- try {
166
- this.memoryCache[key] = value;
167
- await webPersistentStorage.setItem(key, JSON.stringify(value));
168
- } catch {
169
- // Failed to save modal state
170
- }
171
- }
172
- static async load(key) {
173
- try {
174
- if (this.memoryCache[key]) {
175
- return this.memoryCache[key];
176
- }
177
- const stored = await webPersistentStorage.getItem(key);
178
- if (stored) {
179
- const parsed = JSON.parse(stored);
180
- this.memoryCache[key] = parsed;
181
- return parsed;
182
- }
183
- } catch {
184
- // Failed to load modal state
185
- }
186
- return null;
187
- }
188
- }
189
-
190
- // ============================================================================
191
- // TYPES — same exported names as native
192
- // ============================================================================
193
-
194
- /** Modal state that can be saved and restored when minimizing/restoring. */
195
-
196
- // ============================================================================
197
- // rAF ANIMATION HELPERS (native-driver springs/timings stand-in)
198
- // ============================================================================
199
-
200
- const easeOutCubic = t => 1 - Math.pow(1 - t, 3);
201
- // Animated.timing's default easing is ease-in-out
202
- const easeInOut = t => t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2;
203
- function runAnim(duration, ease, onFrame, onDone) {
204
- let raf = 0;
205
- let cancelled = false;
206
- const start = performance.now();
207
- const tick = now => {
208
- if (cancelled) return;
209
- const t = Math.min((now - start) / duration, 1);
210
- onFrame(ease(t));
211
- if (t < 1) {
212
- raf = requestAnimationFrame(tick);
213
- } else {
214
- onDone?.();
215
- }
216
- };
217
- raf = requestAnimationFrame(tick);
218
- return () => {
219
- cancelled = true;
220
- cancelAnimationFrame(raf);
221
- };
222
- }
223
-
224
- // ============================================================================
225
- // SAFE AREA — env() probe (floatingTools.web.tsx pattern), one-shot on mount
226
- // ============================================================================
227
-
228
- function readSafeAreaInsets() {
229
- if (typeof document === "undefined") {
230
- return {
231
- top: 0,
232
- left: 0,
233
- right: 0,
234
- bottom: 0
235
- };
236
- }
237
- const probe = document.createElement("div");
238
- probe.style.cssText = "position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);" + "right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);" + "visibility:hidden;pointer-events:none";
239
- document.body.appendChild(probe);
240
- const rect = probe.getBoundingClientRect();
241
- document.body.removeChild(probe);
242
- return {
243
- top: Math.max(0, rect.top),
244
- left: Math.max(0, rect.left),
245
- right: Math.max(0, window.innerWidth - rect.right),
246
- bottom: Math.max(0, window.innerHeight - rect.bottom)
247
- };
248
- }
249
-
250
- /**
251
- * Keep a floating rect fully inside the safe area. Applied on every entry
252
- * path — initial position, persisted restore, drag release — so the window
253
- * can never sit under a notch/Dynamic Island or the home indicator.
254
- * (Deliberate improvement over native, whose release clamp allows the
255
- * window to reach the raw screen bottom.)
256
- */
257
- function clampRectToSafeArea(rect, insets) {
258
- const maxW = Math.max(FLOATING_MIN_HEIGHT, window.innerWidth - insets.left - insets.right);
259
- const maxH = Math.max(FLOATING_MIN_HEIGHT, window.innerHeight - insets.top - insets.bottom);
260
- const width = Math.min(rect.width, maxW);
261
- const height = Math.min(rect.height, maxH);
262
- return {
263
- width,
264
- height,
265
- left: Math.max(insets.left, Math.min(rect.left, window.innerWidth - insets.right - width)),
266
- top: Math.max(insets.top, Math.min(rect.top, window.innerHeight - insets.bottom - height))
267
- };
268
- }
269
-
270
- // ============================================================================
271
- // ICONS — DOM twins of shared-ui icons (icons/lucide-icons.tsx)
272
- // ============================================================================
273
-
274
- /** shared-ui X icon (lucide-icons.tsx). */
275
- const XIcon = ({
276
- size = 24,
277
- color = "currentColor",
278
- strokeWidth = 2
279
- }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
280
- width: size,
281
- height: size,
282
- viewBox: "0 0 24 24",
283
- fill: "none",
284
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
285
- x1: 18,
286
- y1: 6,
287
- x2: 6,
288
- y2: 18,
289
- stroke: color,
290
- strokeWidth: strokeWidth,
291
- strokeLinecap: "round"
292
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
293
- x1: 6,
294
- y1: 6,
295
- x2: 18,
296
- y2: 18,
297
- stroke: color,
298
- strokeWidth: strokeWidth,
299
- strokeLinecap: "round"
300
- })]
301
- });
302
-
303
- /** shared-ui Minus icon (lucide-icons.tsx). */
304
- const MinusIcon = ({
305
- size = 24,
306
- color = "currentColor",
307
- strokeWidth = 2
308
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
309
- width: size,
310
- height: size,
311
- viewBox: "0 0 24 24",
312
- fill: "none",
313
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
314
- x1: 5,
315
- y1: 12,
316
- x2: 19,
317
- y2: 12,
318
- stroke: color,
319
- strokeWidth: strokeWidth,
320
- strokeLinecap: "round"
321
- })
322
- });
323
-
324
- /** shared-ui DockBottom icon — outer frame + filled bottom panel. */
325
- const DockBottomIcon = ({
326
- size = 24,
327
- color = "currentColor",
328
- strokeWidth = 2
329
- }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
330
- width: size,
331
- height: size,
332
- viewBox: "0 0 24 24",
333
- fill: "none",
334
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
335
- x: 3,
336
- y: 3,
337
- width: 18,
338
- height: 18,
339
- rx: 2,
340
- stroke: color,
341
- strokeWidth: strokeWidth
342
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
343
- x: 3,
344
- y: 14,
345
- width: 18,
346
- height: 7,
347
- fill: color
348
- })]
349
- });
350
-
351
- /** shared-ui FloatWindow icon — window with offset shadow. */
352
- const FloatWindowIcon = ({
353
- size = 24,
354
- color = "currentColor",
355
- strokeWidth = 2
356
- }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
357
- width: size,
358
- height: size,
359
- viewBox: "0 0 24 24",
360
- fill: "none",
361
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("rect", {
362
- x: 3,
363
- y: 3,
364
- width: 14,
365
- height: 14,
366
- rx: 2,
367
- stroke: color,
368
- strokeWidth: strokeWidth
369
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
370
- x1: 7,
371
- y1: 17,
372
- x2: 7,
373
- y2: 21,
374
- stroke: color,
375
- strokeWidth: strokeWidth
376
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
377
- x1: 7,
378
- y1: 21,
379
- x2: 21,
380
- y2: 21,
381
- stroke: color,
382
- strokeWidth: strokeWidth
383
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
384
- x1: 21,
385
- y1: 21,
386
- x2: 21,
387
- y2: 7,
388
- stroke: color,
389
- strokeWidth: strokeWidth
390
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", {
391
- x1: 17,
392
- y1: 7,
393
- x2: 21,
394
- y2: 7,
395
- stroke: color,
396
- strokeWidth: strokeWidth
397
- })]
398
- });
399
-
400
- // ============================================================================
401
- // WINDOW CONTROLS — DOM twin of ui/components/WindowControls.tsx.
402
- // Native renders the non-expandable branch on web (EXPANDABLE_SUPPORTED =
403
- // Platform.OS !== "web"), so the plain macOS dots ARE the 1:1 web look.
404
- // ============================================================================
405
- // native WindowControls COLORS
406
- const WC_COLORS = {
407
- close: "#FF5F57",
408
- minimize: "#FEBC2E",
409
- toggleMode: "#28C840"
410
- };
411
- const WC_BUTTON_SIZE = 12; // native BUTTON_SIZE
412
- const WC_BUTTON_SPACING = 8; // native BUTTON_SPACING
413
- const WC_ICON_SIZE = 8; // native ICON_SIZE
414
-
415
- const wcDotStyle = bg => ({
416
- width: WC_BUTTON_SIZE,
417
- height: WC_BUTTON_SIZE,
418
- borderRadius: WC_BUTTON_SIZE / 2,
419
- display: "flex",
420
- alignItems: "center",
421
- justifyContent: "center",
422
- backgroundColor: bg,
423
- border: "none",
424
- padding: 0,
425
- cursor: "pointer",
426
- flexShrink: 0
427
- });
428
- function WindowControls({
429
- onClose,
430
- onMinimize,
431
- onToggleMode,
432
- mode
433
- }) {
434
- const ToggleModeIcon = mode === "floating" ? DockBottomIcon : FloatWindowIcon;
435
- const toggleModeLabel = mode === "floating" ? "Dock to bottom sheet" : "Make floating window";
436
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
437
- style: {
438
- display: "flex",
439
- flexDirection: "row",
440
- alignItems: "center",
441
- gap: WC_BUTTON_SPACING
442
- },
443
- children: [onMinimize && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
444
- type: "button",
445
- onClick: onMinimize,
446
- style: wcDotStyle(WC_COLORS.minimize),
447
- "aria-label": "Minimize modal",
448
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(MinusIcon, {
449
- size: WC_ICON_SIZE,
450
- color: "#7A5A00",
451
- strokeWidth: 1.5
452
- })
453
- }), onToggleMode && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
454
- type: "button",
455
- onClick: onToggleMode,
456
- style: wcDotStyle(WC_COLORS.toggleMode),
457
- "aria-label": toggleModeLabel,
458
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ToggleModeIcon, {
459
- size: WC_ICON_SIZE,
460
- color: "#004A1A",
461
- strokeWidth: 1.5
462
- })
463
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
464
- type: "button",
465
- onClick: onClose,
466
- style: wcDotStyle(WC_COLORS.close),
467
- "aria-label": "Close modal",
468
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(XIcon, {
469
- size: WC_ICON_SIZE,
470
- color: "#4A0000",
471
- strokeWidth: 1.5
472
- })
473
- })]
474
- });
475
- }
476
-
477
- // ============================================================================
478
- // DRAG INDICATOR — DOM twin of native DragIndicator
479
- // ============================================================================
480
- const DragIndicator = /*#__PURE__*/(0, _react.memo)(function DragIndicator({
481
- isResizing,
482
- mode,
483
- hasCustomContent = false,
484
- variant = "default"
485
- }) {
486
- const floating = mode === "floating";
487
- const isNight = variant === "night";
488
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
489
- style: {
490
- display: "flex",
491
- flexDirection: "column",
492
- alignItems: "center",
493
- position: "relative",
494
- // native dragIndicatorContainer: paddingVertical 8; custom variant
495
- // claims the 20pt window-controls band (native WINDOW_CONTROLS_BAND)
496
- // so the header row below can run the full width.
497
- justifyContent: hasCustomContent ? "center" : undefined,
498
- minHeight: hasCustomContent ? 20 : undefined,
499
- paddingTop: hasCustomContent ? 0 : 8,
500
- paddingBottom: hasCustomContent ? 0 : 8,
501
- backgroundColor: "transparent"
502
- },
503
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
504
- style: {
505
- // native dragIndicator: 40x3 teal bar, radius 2, teal glow
506
- // (shadowOpacity 0.6, radius 4); floating variant: 50x5 textMuted;
507
- // active (isResizing/isDragging): teal, width 40.
508
- // Night: the neutral 36x5 Everlights handle, no glow, both modes.
509
- width: isNight ? 36 : isResizing ? 40 : floating ? 50 : 40,
510
- height: isNight ? 5 : floating ? 5 : 3,
511
- backgroundColor: isNight ? _nightTheme.night.color.placeholder : isResizing ? buoy.primary : floating ? buoy.textMuted : buoy.primary,
512
- borderRadius: isNight ? 2.5 : 2,
513
- boxShadow: isNight ? "none" : `0 0 4px ${buoy.primary}99`
514
- }
515
- }), isResizing && mode === "bottomSheet" && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
516
- style: {
517
- position: "absolute",
518
- display: "flex",
519
- flexDirection: "row",
520
- gap: 2,
521
- // native resizeGripContainer: gap 2
522
- marginTop: 12 // native: marginTop 12
523
- },
524
- children: [0, 1, 2].map(i => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
525
- style: {
526
- width: 12,
527
- // native resizeGripLine: 12x1
528
- height: 1,
529
- backgroundColor: gameUI.success,
530
- opacity: 0.6
531
- }
532
- }, i))
533
- })]
534
- });
535
- });
536
-
537
- // ============================================================================
538
- // MODAL HINT BANNER — DOM twin of ui/components/ModalHintBanner.tsx
539
- // ============================================================================
540
- const ModalHintBanner = /*#__PURE__*/(0, _react.memo)(function ModalHintBanner({
541
- onAcknowledge
542
- }) {
543
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
544
- style: {
545
- // native container: info+15 bg, 3px info left border, radius 8,
546
- // marginHorizontal 12, mt 8, mb 4, info glow (opacity 0.3, radius 8)
547
- backgroundColor: `${gameUI.info}15`,
548
- borderLeft: `3px solid ${gameUI.info}`,
549
- borderRadius: 8,
550
- margin: "8px 12px 4px",
551
- overflow: "hidden",
552
- boxShadow: `0 0 8px ${gameUI.info}4D`,
553
- flexShrink: 0
554
- },
555
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
556
- style: {
557
- display: "flex",
558
- flexDirection: "row",
559
- alignItems: "center",
560
- padding: 12,
561
- // native inner: padding 12, gap 12
562
- gap: 12
563
- },
564
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
565
- style: {
566
- width: 32,
567
- height: 32,
568
- position: "relative",
569
- display: "flex",
570
- alignItems: "center",
571
- justifyContent: "center",
572
- flexShrink: 0
573
- },
574
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
575
- style: {
576
- position: "absolute",
577
- width: 20,
578
- height: 20,
579
- borderRadius: 10,
580
- border: `2px solid ${gameUI.info}`,
581
- opacity: 0.6,
582
- transform: "scale(0.8)",
583
- boxSizing: "border-box"
584
- }
585
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
586
- style: {
587
- position: "absolute",
588
- width: 20,
589
- height: 20,
590
- borderRadius: 10,
591
- border: `2px solid ${gameUI.info}`,
592
- boxSizing: "border-box"
593
- }
594
- })]
595
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
596
- style: {
597
- flex: 1,
598
- display: "flex",
599
- flexDirection: "column",
600
- gap: 2
601
- },
602
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
603
- style: {
604
- fontSize: 13,
605
- fontWeight: 600,
606
- color: gameUI.info,
607
- letterSpacing: 0.3
608
- },
609
- children: "\uD83D\uDCA1 Pro Tip"
610
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
611
- style: {
612
- fontSize: 12,
613
- color: gameUI.primaryLight,
614
- lineHeight: "16px"
615
- },
616
- children: "Double-tap the header to transform this into a floating modal"
617
- })]
618
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
619
- type: "button",
620
- onClick: onAcknowledge,
621
- style: {
622
- backgroundColor: `${gameUI.info}30`,
623
- padding: "6px 12px",
624
- // native: paddingVertical 6 / horizontal 12
625
- borderRadius: 6,
626
- border: `1px solid ${gameUI.info}50`,
627
- fontSize: 12,
628
- fontWeight: 600,
629
- color: gameUI.info,
630
- cursor: "pointer",
631
- fontFamily: "inherit",
632
- flexShrink: 0
633
- },
634
- children: "Got it!"
635
- })]
636
- })
637
- });
638
- });
639
-
640
- // ============================================================================
641
- // MODAL HEADER — DOM twin of native ModalHeader (title/subtitle/hint text)
642
- // ============================================================================
643
- function ModalHeaderContent({
644
- header,
645
- isResizing,
646
- mode,
647
- onMinimize,
648
- variant = "default"
649
- }) {
650
- if (header?.customContent) {
651
- // native (non-CyberpunkModalHeader path): inject onMinimize into the
652
- // custom element so it can trigger minimize; render inside the standard
653
- // header structure with the compact drag indicator.
654
- let customContent = header.customContent;
655
- if (/*#__PURE__*/(0, _react.isValidElement)(header.customContent) && onMinimize) {
656
- customContent = /*#__PURE__*/(0, _react.cloneElement)(header.customContent, {
657
- onMinimize
658
- });
659
- }
660
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
661
- style: {
662
- flex: 1,
663
- display: "flex",
664
- flexDirection: "column",
665
- justifyContent: "center",
666
- minWidth: 0
667
- },
668
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DragIndicator, {
669
- isResizing: isResizing,
670
- mode: mode,
671
- hasCustomContent: true,
672
- variant: variant
673
- }), customContent]
674
- });
675
- }
676
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
677
- style: {
678
- flex: 1,
679
- display: "flex",
680
- flexDirection: "column",
681
- justifyContent: "center",
682
- position: "relative",
683
- minWidth: 0
684
- },
685
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DragIndicator, {
686
- isResizing: isResizing,
687
- mode: mode,
688
- variant: variant
689
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
690
- style: {
691
- // native headerContent: paddingHorizontal 16, alignItems center
692
- padding: "0 16px",
693
- display: "flex",
694
- flexDirection: "column",
695
- alignItems: "center"
696
- },
697
- children: [header?.title && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
698
- style: {
699
- fontSize: 16,
700
- // native headerTitle
701
- fontWeight: 600,
702
- color: gameUI.primary
703
- },
704
- children: header.title
705
- }), header?.subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
706
- style: {
707
- fontSize: 12,
708
- // native headerSubtitle
709
- color: gameUI.secondary,
710
- paddingTop: 4
711
- },
712
- children: header.subtitle
713
- })]
714
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
715
- style: {
716
- position: "absolute",
717
- inset: 0,
718
- display: "flex",
719
- alignItems: "center",
720
- justifyContent: "center",
721
- pointerEvents: "none"
722
- },
723
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
724
- style: {
725
- fontSize: 10,
726
- // native hintText
727
- color: gameUI.muted,
728
- fontStyle: "italic"
729
- },
730
- children: "Double tap: Toggle \u2022 Triple tap: Close"
731
- })
732
- })]
733
- });
734
- }
735
-
736
- // ============================================================================
737
- // MAIN COMPONENT
738
- // ============================================================================
739
- const JsModalComponent = ({
740
- visible,
741
- onClose,
742
- children,
743
- header,
744
- styles: customStyles = {},
745
- minHeight = MIN_HEIGHT,
746
- maxHeight,
747
- initialHeight = DEFAULT_HEIGHT,
748
- animatedHeight: _animatedHeight,
749
- // no-op on web (DEV benchmark seam)
750
- benchMotion: _benchMotion,
751
- // no-op on web (DEV benchmark seam)
752
- initialMode = "bottomSheet",
753
- onModeChange,
754
- persistenceKey,
755
- enablePersistence = true,
756
- initialFloatingPosition,
757
- footer,
758
- footerHeight = 0,
759
- onBack: _onBack,
760
- // native never invokes it from JsModal either
761
- onMinimize,
762
- minimizeRequest = 0,
763
- minimizeTargetPosition,
764
- initialModalState,
765
- zIndex,
766
- disableScrollWrapper = false,
767
- background = true,
768
- variant = "night"
769
- }) => {
770
- const [insets] = (0, _react.useState)(readSafeAreaInsets);
771
- const [isStateLoaded, setIsStateLoaded] = (0, _react.useState)(!enablePersistence);
772
- const [mode, setMode] = (0, _react.useState)(initialMode);
773
- const [isResizing, setIsResizing] = (0, _react.useState)(false);
774
- const [isDragging, setIsDragging] = (0, _react.useState)(false);
775
- const [panelHeight, setPanelHeight] = (0, _react.useState)(initialHeight);
776
- const [dimensions, setDimensions] = (0, _react.useState)(() => clampRectToSafeArea({
777
- width: screenW(),
778
- // native FLOATING_WIDTH = SCREEN.width
779
- height: FLOATING_HEIGHT,
780
- top: initialFloatingPosition?.y ?? (screenH() - FLOATING_HEIGHT) / 2,
781
- left: initialFloatingPosition?.x ?? 0 // flush with left edge
782
- }, insets));
783
- const [showHint, setShowHint] = (0, _react.useState)(false);
784
- const [hintLoaded, setHintLoaded] = (0, _react.useState)(false);
785
- const hintsDisabled = (0, _index.useHintsDisabled)();
786
-
787
- // -- imperative value refs (native Animated.Value stand-ins) --------------
788
- const currentHeightRef = (0, _react.useRef)(initialHeight);
789
- const currentDimensionsRef = (0, _react.useRef)(dimensions);
790
- const posRef = (0, _react.useRef)({
791
- x: dimensions.left,
792
- y: dimensions.top
793
- });
794
-
795
- // -- DOM refs -------------------------------------------------------------
796
- const sheetWrapperRef = (0, _react.useRef)(null);
797
- const sheetRef = (0, _react.useRef)(null);
798
- const floatRef = (0, _react.useRef)(null);
799
-
800
- // Active rAF animations (cancelled on new visibility runs / unmount).
801
- const animCancelsRef = (0, _react.useRef)([]);
802
- const cancelAnims = (0, _react.useCallback)(() => {
803
- animCancelsRef.current.forEach(c => c());
804
- animCancelsRef.current = [];
805
- }, []);
806
- (0, _react.useEffect)(() => {
807
- currentDimensionsRef.current = dimensions;
808
- }, [dimensions]);
809
- (0, _react.useEffect)(() => cancelAnims, [cancelAnims]);
810
- const effectiveMaxHeight = maxHeight || screenH() - insets.top;
811
-
812
- // ==========================================================================
813
- // PERSISTENCE — exact native key usage, shape and 500ms debounce
814
- // ==========================================================================
815
- (0, _react.useEffect)(() => {
816
- if (!enablePersistence || !persistenceKey) {
817
- setIsStateLoaded(true);
818
- return;
819
- }
820
- let mounted = true;
821
- const loadState = async () => {
822
- const savedState = await ModalStorage.load(persistenceKey);
823
- if (mounted && savedState) {
824
- if (savedState.mode) {
825
- setMode(savedState.mode);
826
- onModeChange?.(savedState.mode);
827
- }
828
- if (savedState.panelHeight) {
829
- setPanelHeight(savedState.panelHeight);
830
- currentHeightRef.current = savedState.panelHeight;
831
- }
832
- if (savedState.dimensions) {
833
- // Clamp persisted rects too — a position saved on a different
834
- // viewport (or before the safe-area fix) may be out of bounds.
835
- const clamped = clampRectToSafeArea(savedState.dimensions, insets);
836
- setDimensions(clamped);
837
- posRef.current = {
838
- x: clamped.left,
839
- y: clamped.top
840
- };
841
- }
842
- }
843
- if (mounted) setIsStateLoaded(true);
844
- };
845
- loadState();
846
- return () => {
847
- mounted = false;
848
- };
849
- // eslint-disable-next-line react-hooks/exhaustive-deps
850
- }, [persistenceKey, enablePersistence, onModeChange]);
851
- (0, _react.useEffect)(() => {
852
- if (!enablePersistence || !persistenceKey || !isStateLoaded) return;
853
- const timeoutId = setTimeout(() => {
854
- ModalStorage.save(persistenceKey, {
855
- mode,
856
- panelHeight: currentHeightRef.current,
857
- dimensions,
858
- isVisible: visible
859
- });
860
- }, 500); // native: 500ms debounce
861
- return () => clearTimeout(timeoutId);
862
- }, [mode, panelHeight, dimensions, visible, persistenceKey, enablePersistence, isStateLoaded]);
863
-
864
- // ==========================================================================
865
- // HINT BANNER — same @react_buoy_modal_hint_acknowledged key as native
866
- // ==========================================================================
867
- (0, _react.useEffect)(() => {
868
- let mounted = true;
869
- const loadHintStatus = async () => {
870
- try {
871
- const hintKey = _devToolsStorageKeys.devToolsStorageKeys.modal.hintAcknowledged();
872
- const acknowledged = await webPersistentStorage.getItem(hintKey);
873
- if (mounted) {
874
- setShowHint(acknowledged !== "true");
875
- setHintLoaded(true);
876
- }
877
- } catch {
878
- if (mounted) {
879
- setShowHint(true);
880
- setHintLoaded(true);
881
- }
882
- }
883
- };
884
- loadHintStatus();
885
- return () => {
886
- mounted = false;
887
- };
888
- }, []);
889
- const handleHintAcknowledge = (0, _react.useCallback)(async () => {
890
- try {
891
- const hintKey = _devToolsStorageKeys.devToolsStorageKeys.modal.hintAcknowledged();
892
- await webPersistentStorage.setItem(hintKey, "true");
893
- setShowHint(false);
894
- } catch {
895
- setShowHint(false);
896
- }
897
- }, []);
898
-
899
- // ==========================================================================
900
- // MODE TOGGLE + MINIMIZE
901
- // ==========================================================================
902
- const toggleMode = (0, _react.useCallback)(() => {
903
- setIsDragging(false);
904
- setIsResizing(false);
905
- setMode(prev => {
906
- const newMode = prev === "bottomSheet" ? "floating" : "bottomSheet";
907
- onModeChange?.(newMode);
908
- return newMode;
909
- });
910
- }, [onModeChange]);
911
-
912
- // Belt-and-suspenders: also clear flags when mode changes (native parity).
913
- (0, _react.useEffect)(() => {
914
- setIsDragging(false);
915
- setIsResizing(false);
916
- }, [mode]);
917
- const handleMinimize = (0, _react.useCallback)(() => {
918
- if (!onMinimize) return;
919
- const currentState = {
920
- mode,
921
- panelHeight: currentHeightRef.current,
922
- floatingPosition: {
923
- x: currentDimensionsRef.current.left,
924
- y: currentDimensionsRef.current.top
925
- },
926
- floatingDimensions: {
927
- width: currentDimensionsRef.current.width,
928
- height: currentDimensionsRef.current.height
929
- }
930
- };
931
-
932
- // native defaults: SCREEN.width - 50 / SCREEN.height - 150
933
- const targetX = minimizeTargetPosition?.x ?? screenW() - 50;
934
- const targetY = minimizeTargetPosition?.y ?? screenH() - 150;
935
- cancelAnims();
936
- if (mode === "bottomSheet") {
937
- const wrapper = sheetWrapperRef.current;
938
- if (!wrapper) {
939
- onMinimize(currentState);
940
- return;
941
- }
942
- const distance = screenH();
943
- // native: parallel timing(300) opacity→0 + translateY→SCREEN.height
944
- animCancelsRef.current.push(runAnim(300, easeInOut, v => {
945
- wrapper.style.opacity = String(1 - v);
946
- wrapper.style.transform = `translateY(${v * distance}px)`;
947
- }, () => onMinimize(currentState)));
948
- } else {
949
- const el = floatRef.current;
950
- if (!el) {
951
- onMinimize(currentState);
952
- return;
953
- }
954
- const from = {
955
- ...posRef.current
956
- };
957
- // native animates floatingScale too, but the floating render never
958
- // applies scale in its transform list — so visually it's fade + move,
959
- // which is what we replicate.
960
- animCancelsRef.current.push(runAnim(300, easeInOut, v => {
961
- el.style.opacity = String(1 - v);
962
- const x = from.x + (targetX - from.x) * v;
963
- const y = from.y + (targetY - from.y) * v;
964
- el.style.transform = `translate(${x}px, ${y}px)`;
965
- }, () => onMinimize(currentState)));
966
- }
967
- }, [mode, onMinimize, minimizeTargetPosition, cancelAnims]);
968
- const lastMinimizeRequest = (0, _react.useRef)(minimizeRequest);
969
- (0, _react.useEffect)(() => {
970
- if (lastMinimizeRequest.current === minimizeRequest) return;
971
- lastMinimizeRequest.current = minimizeRequest;
972
- handleMinimize();
973
- }, [minimizeRequest, handleMinimize]);
974
-
975
- // Apply initial modal state when restoring from minimized (native parity).
976
- (0, _react.useEffect)(() => {
977
- if (!initialModalState) return;
978
- if (initialModalState.mode) {
979
- setMode(initialModalState.mode);
980
- onModeChange?.(initialModalState.mode);
981
- }
982
- if (initialModalState.panelHeight) {
983
- setPanelHeight(initialModalState.panelHeight);
984
- currentHeightRef.current = initialModalState.panelHeight;
985
- }
986
- if (initialModalState.floatingDimensions && initialModalState.floatingPosition) {
987
- const newDimensions = {
988
- width: initialModalState.floatingDimensions.width,
989
- height: initialModalState.floatingDimensions.height,
990
- top: initialModalState.floatingPosition.y,
991
- left: initialModalState.floatingPosition.x
992
- };
993
- setDimensions(newDimensions);
994
- posRef.current = {
995
- x: initialModalState.floatingPosition.x,
996
- y: initialModalState.floatingPosition.y
997
- };
998
- }
999
- // eslint-disable-next-line react-hooks/exhaustive-deps
1000
- }, [initialModalState]);
1001
-
1002
- // ==========================================================================
1003
- // VISIBILITY / OPEN ANIMATIONS (mirrors native visibility effect: runs on
1004
- // visible AND mode changes; visible=false skips — the hidden tree renders)
1005
- // ==========================================================================
1006
- (0, _react.useLayoutEffect)(() => {
1007
- if (!visible) return;
1008
- cancelAnims();
1009
- if (mode === "bottomSheet") {
1010
- const wrapper = sheetWrapperRef.current;
1011
- if (!wrapper) return;
1012
- const distance = screenH();
1013
- // native: reset translateY to SCREEN.height + progress 0, then
1014
- // spring(tension 180, friction 22) → 0 and timing(200) opacity → 1.
1015
- wrapper.style.transform = `translateY(${distance}px)`;
1016
- wrapper.style.opacity = "0";
1017
- animCancelsRef.current.push(
1018
- // spring stand-in: 300ms ease-out-cubic (logged deviation)
1019
- runAnim(300, easeOutCubic, v => {
1020
- wrapper.style.transform = `translateY(${(1 - v) * distance}px)`;
1021
- }), runAnim(200, easeInOut, v => {
1022
- wrapper.style.opacity = String(v);
1023
- }));
1024
- } else {
1025
- const el = floatRef.current;
1026
- if (!el) return;
1027
- // Restore-from-minimize deviation (see header): re-sync position from
1028
- // the last committed rect so the panel doesn't reopen at the minimize
1029
- // target the web AppHost never restores via initialModalState.
1030
- posRef.current = {
1031
- x: currentDimensionsRef.current.left,
1032
- y: currentDimensionsRef.current.top
1033
- };
1034
- el.style.transform = `translate(${posRef.current.x}px, ${posRef.current.y}px)`;
1035
- // native: floatingScale jumps to 1 (no pop) + timing(200) opacity → 1
1036
- el.style.opacity = "0";
1037
- animCancelsRef.current.push(runAnim(200, easeInOut, v => {
1038
- el.style.opacity = String(v);
1039
- }));
1040
- }
1041
- }, [visible, mode, cancelAnims]);
1042
-
1043
- // ==========================================================================
1044
- // TAP COUNTING — native spec: 500ms window, 300ms settle;
1045
- // 2 taps → toggle mode, ≥3 taps → minimize
1046
- // ==========================================================================
1047
- const lastTapRef = (0, _react.useRef)(0);
1048
- const tapCountRef = (0, _react.useRef)(0);
1049
- const tapTimeoutRef = (0, _react.useRef)(null);
1050
- const registerTap = (0, _react.useCallback)(() => {
1051
- const now = Date.now();
1052
- if (now - lastTapRef.current > 500) {
1053
- tapCountRef.current = 0;
1054
- }
1055
- tapCountRef.current++;
1056
- lastTapRef.current = now;
1057
- if (tapTimeoutRef.current) clearTimeout(tapTimeoutRef.current);
1058
- tapTimeoutRef.current = setTimeout(() => {
1059
- if (tapCountRef.current === 2) {
1060
- toggleMode();
1061
- } else if (tapCountRef.current >= 3) {
1062
- if (onMinimize) handleMinimize();
1063
- }
1064
- tapCountRef.current = 0;
1065
- }, 300);
1066
- }, [toggleMode, onMinimize, handleMinimize]);
1067
- (0, _react.useEffect)(() => {
1068
- return () => {
1069
- if (tapTimeoutRef.current) clearTimeout(tapTimeoutRef.current);
1070
- };
1071
- }, []);
1072
-
1073
- // ==========================================================================
1074
- // GESTURE: bottom-sheet header drag-resize (native bottomSheetPanResponder)
1075
- // ==========================================================================
1076
- const sheetGestureRef = (0, _react.useRef)({
1077
- active: false,
1078
- resizing: false,
1079
- startY: 0,
1080
- headerOffsetY: 0,
1081
- samples: []
1082
- });
1083
- const handleSheetPointerDown = (0, _react.useCallback)(e => {
1084
- if (mode !== "bottomSheet") return;
1085
- // Ignore clicks on interactive header children (window controls live
1086
- // outside the header, but custom content may contain buttons).
1087
- if (e.target.closest("button")) return;
1088
- const g = sheetGestureRef.current;
1089
- g.active = true;
1090
- g.resizing = false;
1091
- g.startY = e.clientY;
1092
- // native onPanResponderGrant: locationY — where inside the header the
1093
- // pointer grabbed (absolute finger anchoring).
1094
- const rect = e.currentTarget.getBoundingClientRect();
1095
- g.headerOffsetY = e.clientY - rect.top;
1096
- g.samples = [{
1097
- t: performance.now(),
1098
- y: e.clientY
1099
- }];
1100
- e.currentTarget.setPointerCapture(e.pointerId);
1101
- }, [mode]);
1102
- const handleSheetPointerMove = (0, _react.useCallback)(e => {
1103
- const g = sheetGestureRef.current;
1104
- if (!g.active) return;
1105
- const dy = e.clientY - g.startY;
1106
- // native onMoveShouldSetPanResponder: |dy| > 3
1107
- if (!g.resizing && Math.abs(dy) > 3) {
1108
- g.resizing = true;
1109
- cancelAnims();
1110
- setIsResizing(true);
1111
- }
1112
- if (!g.resizing) return;
1113
- // native onPanResponderMove: sheetTop = pageY - headerTouchOffset;
1114
- // height = SCREEN.height - sheetTop, clamped
1115
- const sheetTop = e.clientY - g.headerOffsetY;
1116
- let targetHeight = screenH() - sheetTop;
1117
- targetHeight = Math.max(minHeight, Math.min(targetHeight, effectiveMaxHeight));
1118
- currentHeightRef.current = targetHeight;
1119
- if (sheetRef.current) sheetRef.current.style.height = `${targetHeight}px`;
1120
- // velocity samples (~last 100ms) for the swipe-to-close check
1121
- const now = performance.now();
1122
- g.samples.push({
1123
- t: now,
1124
- y: e.clientY
1125
- });
1126
- while (g.samples.length > 2 && now - g.samples[0].t > 100) g.samples.shift();
1127
- }, [minHeight, effectiveMaxHeight, cancelAnims]);
1128
- const handleSheetPointerUp = (0, _react.useCallback)(e => {
1129
- const g = sheetGestureRef.current;
1130
- if (!g.active) return;
1131
- g.active = false;
1132
- if (!g.resizing) {
1133
- // Tap path — native: TouchableWithoutFeedback keeps the touch when
1134
- // movement stays under the 3px steal threshold.
1135
- registerTap();
1136
- return;
1137
- }
1138
- setIsResizing(false);
1139
- const finalHeight = currentHeightRef.current;
1140
- const dy = e.clientY - g.startY;
1141
- // vy in px/ms — same unit as RN gestureState.vy
1142
- const first = g.samples[0];
1143
- const last = g.samples[g.samples.length - 1];
1144
- const vy = last && first && last.t > first.t ? (last.y - first.y) / (last.t - first.t) : 0;
1145
-
1146
- // native close spec: (vy > 0.8 && dy > 50) || (dy > 150 && h <= minHeight)
1147
- const shouldClose = vy > 0.8 && dy > 50 || dy > 150 && finalHeight <= minHeight;
1148
- if (shouldClose) {
1149
- const wrapper = sheetWrapperRef.current;
1150
- cancelAnims();
1151
- if (wrapper) {
1152
- const distance = screenH();
1153
- // native: timing(200) opacity→0 + spring translateY→SCREEN.height
1154
- animCancelsRef.current.push(runAnim(200, easeInOut, v => {
1155
- wrapper.style.opacity = String(1 - v);
1156
- }), runAnim(300, easeOutCubic, v => {
1157
- wrapper.style.transform = `translateY(${v * distance}px)`;
1158
- }, () => onClose()));
1159
- } else {
1160
- onClose();
1161
- }
1162
- return;
1163
- }
1164
-
1165
- // Already at the finger-tracked height; just commit state.
1166
- setPanelHeight(finalHeight);
1167
- }, [minHeight, onClose, registerTap, cancelAnims]);
1168
- const handleSheetPointerCancel = (0, _react.useCallback)(() => {
1169
- const g = sheetGestureRef.current;
1170
- if (!g.active) return;
1171
- g.active = false;
1172
- g.resizing = false;
1173
- setIsResizing(false);
1174
- }, []);
1175
-
1176
- // ==========================================================================
1177
- // GESTURE: floating header drag (native DraggableHeader semantics)
1178
- // ==========================================================================
1179
- const dragGestureRef = (0, _react.useRef)({
1180
- active: false,
1181
- dragging: false,
1182
- startX: 0,
1183
- startY: 0,
1184
- startPos: {
1185
- x: 0,
1186
- y: 0
1187
- }
1188
- });
1189
- const handleFloatPointerDown = (0, _react.useCallback)(e => {
1190
- // native: DraggableHeader enabled = mode === "floating" && !isResizing
1191
- if (mode !== "floating" || isResizing) return;
1192
- if (e.target.closest("button")) return;
1193
- const g = dragGestureRef.current;
1194
- g.active = true;
1195
- g.dragging = false;
1196
- g.startX = e.clientX;
1197
- g.startY = e.clientY;
1198
- g.startPos = {
1199
- ...posRef.current
1200
- };
1201
- e.currentTarget.setPointerCapture(e.pointerId);
1202
- }, [mode, isResizing]);
1203
- const handleFloatPointerMove = (0, _react.useCallback)(e => {
1204
- const g = dragGestureRef.current;
1205
- if (!g.active) return;
1206
- const dx = e.clientX - g.startX;
1207
- const dy = e.clientY - g.startY;
1208
- // native DraggableHeader: drag begins when |dx| + |dy| > 5
1209
- if (!g.dragging && Math.abs(dx) + Math.abs(dy) > 5) {
1210
- g.dragging = true;
1211
- setIsDragging(true);
1212
- }
1213
- if (!g.dragging) return;
1214
- // relative dx/dy motion, unclamped during move (native parity)
1215
- const x = g.startPos.x + dx;
1216
- const y = g.startPos.y + dy;
1217
- posRef.current = {
1218
- x,
1219
- y
1220
- };
1221
- if (floatRef.current) {
1222
- floatRef.current.style.transform = `translate(${x}px, ${y}px)`;
1223
- }
1224
- }, []);
1225
- const handleFloatPointerUp = (0, _react.useCallback)(() => {
1226
- const g = dragGestureRef.current;
1227
- if (!g.active) return;
1228
- g.active = false;
1229
- if (!g.dragging) {
1230
- registerTap(); // native: DraggableHeader onTap → handleFloatingTap
1231
- return;
1232
- }
1233
- setIsDragging(false);
1234
- // Release clamp keeps the whole window inside the safe area (all four
1235
- // insets — deliberate improvement over native, which only clamps top).
1236
- const dims = currentDimensionsRef.current;
1237
- const clampedRect = clampRectToSafeArea({
1238
- ...dims,
1239
- left: posRef.current.x,
1240
- top: posRef.current.y
1241
- }, insets);
1242
- const clampedX = clampedRect.left;
1243
- const clampedY = clampedRect.top;
1244
- posRef.current = {
1245
- x: clampedX,
1246
- y: clampedY
1247
- };
1248
- if (floatRef.current) {
1249
- floatRef.current.style.transform = `translate(${clampedX}px, ${clampedY}px)`;
1250
- }
1251
- setDimensions(prev => ({
1252
- ...prev,
1253
- left: clampedX,
1254
- top: clampedY
1255
- }));
1256
- }, [insets, registerTap]);
1257
- const handleFloatPointerCancel = (0, _react.useCallback)(() => {
1258
- const g = dragGestureRef.current;
1259
- if (!g.active) return;
1260
- g.active = false;
1261
- g.dragging = false;
1262
- setIsDragging(false);
1263
- }, []);
1264
-
1265
- // ==========================================================================
1266
- // GESTURE: floating corner resize (native createResizeHandler — only the
1267
- // bottom corners are rendered, to avoid conflicts with the window controls)
1268
- // ==========================================================================
1269
- const resizeGestureRef = (0, _react.useRef)({
1270
- active: false,
1271
- corner: "bottomRight",
1272
- startX: 0,
1273
- startY: 0,
1274
- start: {
1275
- width: 0,
1276
- height: 0,
1277
- top: 0,
1278
- left: 0
1279
- }
1280
- });
1281
- const handleResizePointerDown = (0, _react.useCallback)(corner => e => {
1282
- if (mode !== "floating") return;
1283
- e.stopPropagation();
1284
- const g = resizeGestureRef.current;
1285
- g.active = true;
1286
- g.corner = corner;
1287
- g.startX = e.clientX;
1288
- g.startY = e.clientY;
1289
- g.start = {
1290
- ...currentDimensionsRef.current
1291
- };
1292
- setIsResizing(true);
1293
- e.currentTarget.setPointerCapture(e.pointerId);
1294
- }, [mode]);
1295
- const handleResizePointerMove = (0, _react.useCallback)(e => {
1296
- const g = resizeGestureRef.current;
1297
- if (!g.active) return;
1298
- const dx = e.clientX - g.startX;
1299
- const dy = e.clientY - g.startY;
1300
- // native: moves under 0.5px are ignored
1301
- if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;
1302
-
1303
- // native safe-area-aware bounds
1304
- const minLeft = Math.max(0, insets.left);
1305
- const maxBottom = screenH() - Math.max(0, insets.bottom);
1306
- const maxRight = screenW() - Math.max(0, insets.right);
1307
- const floatingMinWidth = screenW() * 0.25; // native FLOATING_MIN_WIDTH
1308
- const start = g.start;
1309
- const startRight = start.left + start.width;
1310
- const startBottom = start.top + start.height;
1311
- let left = start.left;
1312
- const top = start.top; // bottom corners anchor the top edge
1313
- let right = startRight;
1314
- let bottom = startBottom;
1315
- if (g.corner === "bottomLeft") {
1316
- // move left & bottom; anchor right & top
1317
- left = Math.max(minLeft, Math.min(start.left + dx, startRight - floatingMinWidth));
1318
- bottom = Math.min(maxBottom, Math.max(startBottom + dy, start.top + FLOATING_MIN_HEIGHT));
1319
- } else {
1320
- // bottomRight: move right & bottom; anchor left & top
1321
- right = Math.min(maxRight, Math.max(startRight + dx, start.left + floatingMinWidth));
1322
- bottom = Math.min(maxBottom, Math.max(startBottom + dy, start.top + FLOATING_MIN_HEIGHT));
1323
- }
1324
- const updatedWidth = Math.max(floatingMinWidth, right - left);
1325
- const updatedHeight = Math.max(FLOATING_MIN_HEIGHT, bottom - top);
1326
- const next = {
1327
- width: updatedWidth,
1328
- height: updatedHeight,
1329
- left,
1330
- top
1331
- };
1332
- currentDimensionsRef.current = next;
1333
- posRef.current = {
1334
- x: left,
1335
- y: top
1336
- };
1337
- // native pushes setDimensions per move (state drives width/height)
1338
- setDimensions(next);
1339
- if (floatRef.current) {
1340
- floatRef.current.style.transform = `translate(${left}px, ${top}px)`;
1341
- }
1342
- }, [insets.left, insets.right, insets.bottom]);
1343
- const handleResizePointerUp = (0, _react.useCallback)(() => {
1344
- const g = resizeGestureRef.current;
1345
- if (!g.active) return;
1346
- g.active = false;
1347
- setIsResizing(false);
1348
- setDimensions(currentDimensionsRef.current);
1349
- }, []);
1350
-
1351
- // ==========================================================================
1352
- // RENDER
1353
- // ==========================================================================
1354
-
1355
- // Hidden but mounted — panel state and listeners survive minimize/close-
1356
- // to-background, same as native's offscreen container.
1357
- // The three branches below carry distinct keys ON PURPOSE: the open/
1358
- // minimize animations write opacity/transform imperatively (rAF, outside
1359
- // React's style props), so if React reused a DOM node across branches —
1360
- // e.g. a fresh mount whose async-persisted mode flips bottomSheet→floating
1361
- // mid-entrance — the old sheet wrapper (opacity ≈ 0, translateY offscreen)
1362
- // would be recycled as the floating header and render a blank strip.
1363
- // React never clears styles it didn't set via props; distinct keys force a
1364
- // clean remount of the chrome instead. (Children remount with it, matching
1365
- // native, whose mode branches are different trees too — tool panels hold
1366
- // their state above JsModal or in external stores.)
1367
- if (!visible) {
1368
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1369
- style: {
1370
- display: "none"
1371
- },
1372
- "aria-hidden": true,
1373
- children: children
1374
- }, "hidden");
1375
- }
1376
- const dialogLabel = header?.title || "Dev tool panel";
1377
- const isNight = variant === "night";
1378
-
1379
- // Night: the star field fills the whole sheet — header included — instead
1380
- // of starting under the header band (native parity: hoisted to sheet root).
1381
- const nightBackdrop = background && isNight ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1382
- style: {
1383
- position: "absolute",
1384
- inset: 0,
1385
- pointerEvents: "none"
1386
- },
1387
- "aria-hidden": true,
1388
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToolBackground.ToolBackground, {})
1389
- }) : null;
1390
-
1391
- // Content block shared by both modes — native styles.content:
1392
- // flex 1, bg base #121212, borderBottomRadius 16, overflow hidden.
1393
- // Night: transparent, so the sheet-level star field shows through.
1394
- const contentBlock = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1395
- style: {
1396
- flex: 1,
1397
- minHeight: 0,
1398
- position: "relative",
1399
- display: "flex",
1400
- flexDirection: "column",
1401
- backgroundColor: isNight ? "transparent" : buoy.base,
1402
- borderBottomLeftRadius: 16,
1403
- borderBottomRightRadius: 16,
1404
- overflow: "hidden",
1405
- ...customStyles.content
1406
- },
1407
- children: [background && !isNight ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToolBackground.ToolBackground, {}) : null, disableScrollWrapper ?
1408
- /*#__PURE__*/
1409
- // children manage their own scrolling (native: plain flex View)
1410
- (0, _jsxRuntime.jsx)("div", {
1411
- style: {
1412
- flex: 1,
1413
- minHeight: 0,
1414
- display: "flex",
1415
- flexDirection: "column",
1416
- paddingBottom: footerHeight
1417
- },
1418
- children: children
1419
- }) :
1420
- /*#__PURE__*/
1421
- // native: ScrollView with flexGrow 1 + paddingBottom footerHeight
1422
- (0, _jsxRuntime.jsx)("div", {
1423
- style: {
1424
- flex: 1,
1425
- minHeight: 0,
1426
- overflowY: "auto",
1427
- paddingBottom: footerHeight
1428
- },
1429
- children: children
1430
- }), footer ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1431
- style: {
1432
- // native footerStyles.footerContainer
1433
- position: "absolute",
1434
- left: 0,
1435
- right: 0,
1436
- bottom: 0,
1437
- backgroundColor: buoy.base,
1438
- borderBottomLeftRadius: 16,
1439
- borderBottomRightRadius: 16
1440
- },
1441
- children: footer
1442
- }) : null]
1443
- });
1444
- const windowControlsBlock =
1445
- /*#__PURE__*/
1446
- // native windowControlsContainer: absolute top 4 right 4, zIndex 10
1447
- (0, _jsxRuntime.jsx)("div", {
1448
- style: {
1449
- position: "absolute",
1450
- top: 4,
1451
- right: 4,
1452
- zIndex: 10
1453
- },
1454
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(WindowControls, {
1455
- onClose: onClose,
1456
- onMinimize: onMinimize ? handleMinimize : undefined,
1457
- onToggleMode: toggleMode,
1458
- mode: mode
1459
- })
1460
- });
1461
-
1462
- // ----- FLOATING MODE ------------------------------------------------------
1463
- if (mode === "floating") {
1464
- const active = isDragging || isResizing;
1465
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1466
- ref: floatRef,
1467
- role: "dialog",
1468
- "aria-label": dialogLabel,
1469
- style: {
1470
- // native floatingModal: absolute, card bg, radius 6, 1px #333
1471
- // border, teal glow (shadowOpacity 0.3, radius 20), zIndex 1000.
1472
- // Dragging: 2px teal border + tighter teal glow
1473
- // (primary+"99" × shadowOpacity 0.8 ≈ 0.48 effective alpha).
1474
- position: "fixed",
1475
- left: 0,
1476
- top: 0,
1477
- width: dimensions.width,
1478
- height: dimensions.height,
1479
- transform: `translate(${posRef.current.x}px, ${posRef.current.y}px)`,
1480
- display: "flex",
1481
- flexDirection: "column",
1482
- backgroundColor: isNight ? _nightTheme.night.color.bg : buoy.card,
1483
- borderRadius: isNight ? _nightTheme.night.radius.sheet : 6,
1484
- border: isNight ? `1px solid ${_nightTheme.night.color.accent}55` : active ? `2px solid ${buoy.primary}` : `1px solid ${buoy.border}`,
1485
- boxShadow: isNight ? `0 0 14px ${_nightTheme.night.color.accent}38` : active ? `0 0 12px ${buoy.primary}7A` : `0 0 20px ${buoy.primary}4D`,
1486
- // Night clips the hoisted star field to the rounded window.
1487
- ...(isNight ? {
1488
- overflow: "hidden"
1489
- } : null),
1490
- boxSizing: "border-box",
1491
- // RN borders draw inside the rect
1492
- zIndex: zIndex ?? 1000,
1493
- ...customStyles.container
1494
- },
1495
- children: [nightBackdrop, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1496
- onPointerDown: handleFloatPointerDown,
1497
- onPointerMove: handleFloatPointerMove,
1498
- onPointerUp: handleFloatPointerUp,
1499
- onPointerCancel: handleFloatPointerCancel,
1500
- style: {
1501
- // native styles.header (+ floatingHeader top radius 6);
1502
- // night: transparent glass, no border — the field runs through
1503
- borderTopLeftRadius: isNight ? _nightTheme.night.radius.sheet : 6,
1504
- borderTopRightRadius: isNight ? _nightTheme.night.radius.sheet : 6,
1505
- backgroundColor: isNight ? "transparent" : buoy.card,
1506
- minHeight: 56,
1507
- border: isNight ? "none" : `1px solid ${buoy.border}`,
1508
- boxSizing: "border-box",
1509
- display: "flex",
1510
- flexDirection: "column",
1511
- justifyContent: "center",
1512
- flexShrink: 0,
1513
- touchAction: "none",
1514
- userSelect: "none",
1515
- cursor: isDragging ? "grabbing" : "grab",
1516
- // web-only affordance
1517
- position: "relative"
1518
- },
1519
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ModalHeaderContent, {
1520
- header: header,
1521
- isResizing: isDragging || isResizing,
1522
- mode: mode,
1523
- onMinimize: onMinimize ? handleMinimize : undefined,
1524
- variant: variant
1525
- })
1526
- }), windowControlsBlock, contentBlock, ["bottomLeft", "bottomRight"].map(corner => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1527
- onPointerDown: handleResizePointerDown(corner),
1528
- onPointerMove: handleResizePointerMove,
1529
- onPointerUp: handleResizePointerUp,
1530
- onPointerCancel: handleResizePointerUp,
1531
- style: {
1532
- position: "absolute",
1533
- width: 30,
1534
- height: 30,
1535
- bottom: 4,
1536
- ...(corner === "bottomLeft" ? {
1537
- left: 4
1538
- } : {
1539
- right: 4
1540
- }),
1541
- zIndex: 1000,
1542
- touchAction: "none",
1543
- cursor: corner === "bottomLeft" ? "nesw-resize" : "nwse-resize"
1544
- },
1545
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1546
- style: {
1547
- width: 20,
1548
- height: 20,
1549
- borderRadius: 10,
1550
- boxSizing: "border-box",
1551
- backgroundColor: active ? `${gameUI.success}1A` : "transparent",
1552
- border: active ? `2px solid ${gameUI.success}` : "none",
1553
- boxShadow: active ? `0 0 8px ${gameUI.success}99` : "none"
1554
- }
1555
- })
1556
- }, corner))]
1557
- }, "floating");
1558
- }
1559
-
1560
- // ----- BOTTOM SHEET MODE --------------------------------------------------
1561
- return (
1562
- /*#__PURE__*/
1563
- // native fullScreenContainer: absolute fill, zIndex 1000, box-none
1564
- (0, _jsxRuntime.jsx)("div", {
1565
- style: {
1566
- position: "fixed",
1567
- inset: 0,
1568
- zIndex: zIndex ?? 1000,
1569
- pointerEvents: "none"
1570
- },
1571
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1572
- ref: sheetWrapperRef,
1573
- style: {
1574
- position: "absolute",
1575
- bottom: 0,
1576
- left: 0,
1577
- right: 0,
1578
- pointerEvents: "auto"
1579
- },
1580
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1581
- ref: sheetRef,
1582
- role: "dialog",
1583
- "aria-label": dialogLabel,
1584
- style: {
1585
- // native bottomSheet: card bg, top radius 6, 1px #333 border,
1586
- // teal shadow (offset 0/-4, opacity 0.2, radius 12).
1587
- // Night: #050505 sheet, top radius 16, hairline accent border.
1588
- height: currentHeightRef.current,
1589
- display: "flex",
1590
- flexDirection: "column",
1591
- backgroundColor: isNight ? _nightTheme.night.color.bg : buoy.card,
1592
- borderTopLeftRadius: isNight ? _nightTheme.night.radius.sheet : 6,
1593
- borderTopRightRadius: isNight ? _nightTheme.night.radius.sheet : 6,
1594
- border: isNight ? `1px solid ${_nightTheme.night.color.accent}55` : `1px solid ${buoy.border}`,
1595
- boxShadow: isNight ? `0 -4px 10px ${_nightTheme.night.color.accent}38` : `0 -4px 12px ${buoy.primary}33`,
1596
- // Night clips the hoisted star field to the rounded sheet.
1597
- ...(isNight ? {
1598
- overflow: "hidden"
1599
- } : null),
1600
- boxSizing: "border-box",
1601
- position: "relative",
1602
- ...customStyles.container
1603
- },
1604
- children: [nightBackdrop, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1605
- onPointerDown: handleSheetPointerDown,
1606
- onPointerMove: handleSheetPointerMove,
1607
- onPointerUp: handleSheetPointerUp,
1608
- onPointerCancel: handleSheetPointerCancel,
1609
- style: {
1610
- // native styles.header; night: transparent glass, no border
1611
- borderTopLeftRadius: isNight ? _nightTheme.night.radius.sheet : 6,
1612
- borderTopRightRadius: isNight ? _nightTheme.night.radius.sheet : 6,
1613
- backgroundColor: isNight ? "transparent" : buoy.card,
1614
- minHeight: 56,
1615
- border: isNight ? "none" : `1px solid ${buoy.border}`,
1616
- boxSizing: "border-box",
1617
- display: "flex",
1618
- flexDirection: "column",
1619
- justifyContent: "center",
1620
- flexShrink: 0,
1621
- touchAction: "none",
1622
- userSelect: "none",
1623
- cursor: "ns-resize",
1624
- // web-only affordance
1625
- position: "relative"
1626
- },
1627
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ModalHeaderContent, {
1628
- header: header,
1629
- isResizing: isResizing,
1630
- mode: mode,
1631
- onMinimize: onMinimize ? handleMinimize : undefined,
1632
- variant: variant
1633
- })
1634
- }), windowControlsBlock, hintLoaded && showHint && !hintsDisabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(ModalHintBanner, {
1635
- onAcknowledge: handleHintAcknowledge
1636
- }), contentBlock]
1637
- })
1638
- })
1639
- }, "bottomSheet")
1640
- );
1641
- };
1642
-
1643
- // ============================================================================
1644
- // EXPORT — memoized like native
1645
- // ============================================================================
1646
- const JsModal = exports.JsModal = /*#__PURE__*/(0, _react.memo)(props => {
1647
- const access = (0, _licenseModule.getUseAccountAccess)()();
1648
- if (access.status !== "admitted") return props.visible ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AccountSetup.AccountSetup, {}) : null;
1649
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(JsModalComponent, {
1650
- ...props
1651
- });
1652
- });
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.JsModal=void 0;var _licenseModule=require("./license/licenseModule.js");var _AccountSetup=require("./license/AccountSetup");var _react=require("react");var _persistentStorage=require("./utils/persistentStorage");var _modalStorage=require("./utils/modalStorage.js");var _devToolsStorageKeys=require("./storage/devToolsStorageKeys.js");var _index=require("./context/index.js");var _ToolBackground=require("./ui/backgrounds/ToolBackground.js");var _nightTheme=require("./ui/night/nightTheme.js");var _jsxRuntime=require("react/jsx-runtime");const buoy={base:"#121212",card:"#1A1A1A",border:"#333333",textMuted:"#888888",primary:"#20C997"};const gameUI={primary:"#F5F5F7",primaryLight:"#F5F5F7",secondary:"#A1A1A6",muted:"#8E8E93",success:"#34C759",info:"#00B8E6"};const MIN_HEIGHT=100;const DEFAULT_HEIGHT=400;const FLOATING_HEIGHT=500;const FLOATING_MIN_HEIGHT=80;const screenW=()=>typeof window!=="undefined"?window.innerWidth:0;const screenH=()=>typeof window!=="undefined"?window.innerHeight:0;const easeOutCubic=n=>1-Math.pow(1-n,3);const easeInOut=n=>n<.5?2*n*n:1-Math.pow(-2*n+2,2)/2;function runAnim(n,o,i,f){let h=0;let u=false;const w=performance.now();const S=it=>{if(u)return;const J=Math.min((it-w)/n,1);i(o(J));if(J<1){h=requestAnimationFrame(S)}else{f?.()}};h=requestAnimationFrame(S);return()=>{u=true;cancelAnimationFrame(h)}}function readSafeAreaInsets(){if(typeof document==="undefined"){return{top:0,left:0,right:0,bottom:0}}const n=document.createElement("div");n.style.cssText="position:fixed;top:env(safe-area-inset-top);left:env(safe-area-inset-left);right:env(safe-area-inset-right);bottom:env(safe-area-inset-bottom);visibility:hidden;pointer-events:none";document.body.appendChild(n);const o=n.getBoundingClientRect();document.body.removeChild(n);return{top:Math.max(0,o.top),left:Math.max(0,o.left),right:Math.max(0,window.innerWidth-o.right),bottom:Math.max(0,window.innerHeight-o.bottom)}}function clampRectToSafeArea(n,o){const i=Math.max(FLOATING_MIN_HEIGHT,window.innerWidth-o.left-o.right);const f=Math.max(FLOATING_MIN_HEIGHT,window.innerHeight-o.top-o.bottom);const h=Math.min(n.width,i);const u=Math.min(n.height,f);return{width:h,height:u,left:Math.max(o.left,Math.min(n.left,window.innerWidth-o.right-h)),top:Math.max(o.top,Math.min(n.top,window.innerHeight-o.bottom-u))}}const XIcon=({size:n=24,color:o="currentColor",strokeWidth:i=2})=>(0,_jsxRuntime.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,_jsxRuntime.jsx)("line",{x1:18,y1:6,x2:6,y2:18,stroke:o,strokeWidth:i,strokeLinecap:"round"}),(0,_jsxRuntime.jsx)("line",{x1:6,y1:6,x2:18,y2:18,stroke:o,strokeWidth:i,strokeLinecap:"round"})]});const MinusIcon=({size:n=24,color:o="currentColor",strokeWidth:i=2})=>(0,_jsxRuntime.jsx)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:(0,_jsxRuntime.jsx)("line",{x1:5,y1:12,x2:19,y2:12,stroke:o,strokeWidth:i,strokeLinecap:"round"})});const DockBottomIcon=({size:n=24,color:o="currentColor",strokeWidth:i=2})=>(0,_jsxRuntime.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,_jsxRuntime.jsx)("rect",{x:3,y:3,width:18,height:18,rx:2,stroke:o,strokeWidth:i}),(0,_jsxRuntime.jsx)("rect",{x:3,y:14,width:18,height:7,fill:o})]});const FloatWindowIcon=({size:n=24,color:o="currentColor",strokeWidth:i=2})=>(0,_jsxRuntime.jsxs)("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"none",children:[(0,_jsxRuntime.jsx)("rect",{x:3,y:3,width:14,height:14,rx:2,stroke:o,strokeWidth:i}),(0,_jsxRuntime.jsx)("line",{x1:7,y1:17,x2:7,y2:21,stroke:o,strokeWidth:i}),(0,_jsxRuntime.jsx)("line",{x1:7,y1:21,x2:21,y2:21,stroke:o,strokeWidth:i}),(0,_jsxRuntime.jsx)("line",{x1:21,y1:21,x2:21,y2:7,stroke:o,strokeWidth:i}),(0,_jsxRuntime.jsx)("line",{x1:17,y1:7,x2:21,y2:7,stroke:o,strokeWidth:i})]});const WC_COLORS={close:"#FF5F57",minimize:"#FEBC2E",toggleMode:"#28C840"};const WC_BUTTON_SIZE=24;const WC_BUTTON_SPACING=2;const WC_ICON_SIZE=8;const wcDotStyle=n=>({width:WC_BUTTON_SIZE,height:WC_BUTTON_SIZE,borderRadius:WC_BUTTON_SIZE/2,display:"flex",alignItems:"center",justifyContent:"center",background:`radial-gradient(circle, ${n} 6px, transparent 6px)`,border:"none",padding:0,cursor:"pointer",flexShrink:0});function WindowControls({onClose:n,onMinimize:o,onToggleMode:i,mode:f}){const h=f==="floating"?DockBottomIcon:FloatWindowIcon;const u=f==="floating"?"Dock to bottom sheet":"Make floating window";return(0,_jsxRuntime.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:WC_BUTTON_SPACING},children:[o&&(0,_jsxRuntime.jsx)("button",{type:"button",onClick:o,style:wcDotStyle(WC_COLORS.minimize),"aria-label":"Minimize modal",children:(0,_jsxRuntime.jsx)(MinusIcon,{size:WC_ICON_SIZE,color:"#7A5A00",strokeWidth:1.5})}),i&&(0,_jsxRuntime.jsx)("button",{type:"button",onClick:i,style:wcDotStyle(WC_COLORS.toggleMode),"aria-label":u,children:(0,_jsxRuntime.jsx)(h,{size:WC_ICON_SIZE,color:"#004A1A",strokeWidth:1.5})}),(0,_jsxRuntime.jsx)("button",{type:"button",onClick:n,style:wcDotStyle(WC_COLORS.close),"aria-label":"Close modal",children:(0,_jsxRuntime.jsx)(XIcon,{size:WC_ICON_SIZE,color:"#4A0000",strokeWidth:1.5})})]})}const DragIndicator=(0,_react.memo)(function n({isResizing:o,mode:i,hasCustomContent:f=false,variant:h="default"}){const u=i==="floating";const w=h==="night";return(0,_jsxRuntime.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",position:"relative",justifyContent:f?"center":void 0,minHeight:f?32:void 0,paddingTop:f?0:8,paddingBottom:f?0:8,backgroundColor:"transparent"},children:[(0,_jsxRuntime.jsx)("div",{style:{width:w?36:o?40:u?50:40,height:w?5:u?5:3,backgroundColor:w?_nightTheme.night.color.placeholder:o?buoy.primary:u?buoy.textMuted:buoy.primary,borderRadius:w?2.5:2,boxShadow:w?"none":`0 0 4px ${buoy.primary}99`}}),o&&i==="bottomSheet"&&(0,_jsxRuntime.jsx)("div",{style:{position:"absolute",display:"flex",flexDirection:"row",gap:2,marginTop:12},children:[0,1,2].map(S=>(0,_jsxRuntime.jsx)("div",{style:{width:12,height:1,backgroundColor:gameUI.success,opacity:.6}},S))})]})});const ModalHintBanner=(0,_react.memo)(function n({onAcknowledge:o}){return(0,_jsxRuntime.jsx)("div",{style:{backgroundColor:`${gameUI.info}15`,borderLeft:`3px solid ${gameUI.info}`,borderRadius:8,margin:"8px 12px 4px",overflow:"hidden",boxShadow:`0 0 8px ${gameUI.info}4D`,flexShrink:0},children:(0,_jsxRuntime.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:12,gap:12},children:[(0,_jsxRuntime.jsxs)("div",{style:{width:32,height:32,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:[(0,_jsxRuntime.jsx)("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${gameUI.info}`,opacity:.6,transform:"scale(0.8)",boxSizing:"border-box"}}),(0,_jsxRuntime.jsx)("div",{style:{position:"absolute",width:20,height:20,borderRadius:10,border:`2px solid ${gameUI.info}`,boxSizing:"border-box"}})]}),(0,_jsxRuntime.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[(0,_jsxRuntime.jsx)("span",{style:{fontSize:13,fontWeight:600,color:gameUI.info,letterSpacing:.3},children:"\u{1F4A1} Pro Tip"}),(0,_jsxRuntime.jsx)("span",{style:{fontSize:12,color:gameUI.primaryLight,lineHeight:"16px"},children:"Double-tap the header to transform this into a floating modal"})]}),(0,_jsxRuntime.jsx)("button",{type:"button",onClick:o,style:{backgroundColor:`${gameUI.info}30`,padding:"6px 12px",borderRadius:6,border:`1px solid ${gameUI.info}50`,fontSize:12,fontWeight:600,color:gameUI.info,cursor:"pointer",fontFamily:"inherit",flexShrink:0},children:"Got it!"})]})})});function ModalHeaderContent({header:n,isResizing:o,mode:i,onMinimize:f,variant:h="default"}){if(n?.customContent){let u=n.customContent;if((0,_react.isValidElement)(n.customContent)&&f){u=(0,_react.cloneElement)(n.customContent,{onMinimize:f})}return(0,_jsxRuntime.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",minWidth:0},children:[(0,_jsxRuntime.jsx)(DragIndicator,{isResizing:o,mode:i,hasCustomContent:true,variant:h}),u]})}return(0,_jsxRuntime.jsxs)("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",position:"relative",minWidth:0},children:[(0,_jsxRuntime.jsx)(DragIndicator,{isResizing:o,mode:i,variant:h}),(0,_jsxRuntime.jsxs)("div",{style:{padding:"0 16px",display:"flex",flexDirection:"column",alignItems:"center"},children:[n?.title&&(0,_jsxRuntime.jsx)("span",{style:{fontSize:16,fontWeight:600,color:gameUI.primary},children:n.title}),n?.subtitle&&(0,_jsxRuntime.jsx)("span",{style:{fontSize:12,color:gameUI.secondary,paddingTop:4},children:n.subtitle})]}),(0,_jsxRuntime.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:(0,_jsxRuntime.jsx)("span",{style:{fontSize:10,color:gameUI.muted,fontStyle:"italic"},children:"Double tap: Toggle \u2022 Triple tap: Close"})})]})}const JsModalComponent=({visible:n,onClose:o,children:i,header:f,styles:h={},minHeight:u=MIN_HEIGHT,maxHeight:w,initialHeight:S=DEFAULT_HEIGHT,animatedHeight:it,benchMotion:J,initialMode:St="bottomSheet",onModeChange:st,persistenceKey:j,enablePersistence:R=true,initialFloatingPosition:at,footer:lt,footerHeight:ct=0,onBack:Xt,onMinimize:m,minimizeRequest:z=0,minimizeTargetPosition:V,initialModalState:g,zIndex:dt,disableScrollWrapper:Rt=false,background:ut=true,variant:Z="night"})=>{const[b]=(0,_react.useState)(readSafeAreaInsets);const[ft,ht]=(0,_react.useState)(!R);const[d,Q]=(0,_react.useState)(St);const F=(0,_react.useRef)(st);F.current=st;const[A,M]=(0,_react.useState)(false);const[K,P]=(0,_react.useState)(false);const[Mt,tt]=(0,_react.useState)(S);const[C,B]=(0,_react.useState)(()=>clampRectToSafeArea({width:screenW(),height:FLOATING_HEIGHT,top:at?.y??(screenH()-FLOATING_HEIGHT)/2,left:at?.x??0},b));const[Tt,O]=(0,_react.useState)(false);const[Dt,gt]=(0,_react.useState)(false);const Ht=(0,_index.useHintsDisabled)();const T=(0,_react.useRef)(S);const y=(0,_react.useRef)(C);const p=(0,_react.useRef)({x:C.left,y:C.top});const X=(0,_react.useRef)(null);const et=(0,_react.useRef)(null);const k=(0,_react.useRef)(null);const D=(0,_react.useRef)([]);const v=(0,_react.useCallback)(()=>{D.current.forEach(t=>t());D.current=[]},[]);(0,_react.useEffect)(()=>{y.current=C},[C]);(0,_react.useEffect)(()=>v,[v]);const pt=w||screenH()-b.top;(0,_react.useEffect)(()=>{if(!R||!j){ht(true);return}let t=true;const e=async()=>{const r=await _modalStorage.ModalStorage.load(j);if(t&&r){if(r.mode){Q(r.mode);F.current?.(r.mode)}if(r.panelHeight){tt(r.panelHeight);T.current=r.panelHeight}if(r.dimensions){const s=clampRectToSafeArea(r.dimensions,b);B(s);p.current={x:s.left,y:s.top}}}if(t)ht(true)};e();return()=>{t=false}},[j,R]);(0,_react.useEffect)(()=>{if(!R||!j||!ft)return;const t=setTimeout(()=>{_modalStorage.ModalStorage.save(j,{mode:d,panelHeight:T.current,dimensions:C,isVisible:n})},500);return()=>clearTimeout(t)},[d,Mt,C,n,j,R,ft]);(0,_react.useEffect)(()=>{let t=true;const e=async()=>{try{const r=_devToolsStorageKeys.devToolsStorageKeys.modal.hintAcknowledged();const s=await _persistentStorage.persistentStorage.getItem(r);if(t){O(s!=="true");gt(true)}}catch{if(t){O(true);gt(true)}}};e();return()=>{t=false}},[]);const It=(0,_react.useCallback)(async()=>{try{const t=_devToolsStorageKeys.devToolsStorageKeys.modal.hintAcknowledged();await _persistentStorage.persistentStorage.setItem(t,"true");O(false)}catch{O(false)}},[]);const nt=(0,_react.useCallback)(()=>{P(false);M(false);const t=d==="bottomSheet"?"floating":"bottomSheet";Q(t);F.current?.(t)},[d]);(0,_react.useEffect)(()=>{P(false);M(false)},[d]);const H=(0,_react.useCallback)(()=>{if(!m)return;const t={mode:d,panelHeight:T.current,floatingPosition:{x:y.current.left,y:y.current.top},floatingDimensions:{width:y.current.width,height:y.current.height}};if(R&&j)void _modalStorage.ModalStorage.saveMinimized(j,t);const e=V?.x??screenW()-50;const r=V?.y??screenH()-150;v();if(d==="bottomSheet"){const s=X.current;if(!s){m(t);return}const a=screenH();D.current.push(runAnim(300,easeInOut,c=>{s.style.opacity=String(1-c);s.style.transform=`translateY(${c*a}px)`},()=>m(t)))}else{const s=k.current;if(!s){m(t);return}const a={...p.current};D.current.push(runAnim(300,easeInOut,c=>{s.style.opacity=String(1-c);const L=a.x+(e-a.x)*c;const I=a.y+(r-a.y)*c;s.style.transform=`translate(${L}px, ${I}px)`},()=>m(t)))}},[d,m,V,v,R,j]);const xt=(0,_react.useRef)(z);(0,_react.useEffect)(()=>{if(xt.current===z)return;xt.current=z;H()},[z,H]);(0,_react.useEffect)(()=>{if(!g)return;if(g.mode){Q(g.mode);F.current?.(g.mode)}if(g.panelHeight){tt(g.panelHeight);T.current=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};B(t);p.current={x:g.floatingPosition.x,y:g.floatingPosition.y}}},[g]);(0,_react.useLayoutEffect)(()=>{if(!n)return;v();if(d==="bottomSheet"){const t=X.current;if(!t)return;const e=screenH();t.style.transform=`translateY(${e}px)`;t.style.opacity="0";D.current.push(runAnim(300,easeOutCubic,r=>{t.style.transform=`translateY(${(1-r)*e}px)`}),runAnim(200,easeInOut,r=>{t.style.opacity=String(r)}))}else{const t=k.current;if(!t)return;p.current={x:y.current.left,y:y.current.top};t.style.transform=`translate(${p.current.x}px, ${p.current.y}px)`;t.style.opacity="0";D.current.push(runAnim(200,easeInOut,e=>{t.style.opacity=String(e)}))}},[n,d,v]);const mt=(0,_react.useRef)(0);const Y=(0,_react.useRef)(0);const E=(0,_react.useRef)(null);const G=(0,_react.useCallback)(()=>{const t=Date.now();if(t-mt.current>500){Y.current=0}Y.current++;mt.current=t;if(E.current)clearTimeout(E.current);E.current=setTimeout(()=>{if(Y.current===2){nt()}else if(Y.current>=3){if(m)H()}Y.current=0},300)},[nt,m,H]);(0,_react.useEffect)(()=>{return()=>{if(E.current)clearTimeout(E.current)}},[]);const U=(0,_react.useRef)({active:false,resizing:false,startY:0,headerOffsetY:0,samples:[]});const $t=(0,_react.useCallback)(t=>{if(d!=="bottomSheet")return;if(t.button!==0||t.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;const e=U.current;e.active=true;e.resizing=false;e.startY=t.clientY;const r=t.currentTarget.getBoundingClientRect();e.headerOffsetY=t.clientY-r.top;e.samples=[{t:performance.now(),y:t.clientY}];t.currentTarget.setPointerCapture(t.pointerId)},[d]);const At=(0,_react.useCallback)(t=>{const e=U.current;if(!e.active)return;const r=t.clientY-e.startY;if(!e.resizing&&Math.abs(r)>3){e.resizing=true;v();M(true)}if(!e.resizing)return;const s=t.clientY-e.headerOffsetY;let a=screenH()-s;a=Math.max(u,Math.min(a,pt));T.current=a;if(et.current)et.current.style.height=`${a}px`;const c=performance.now();e.samples.push({t:c,y:t.clientY});while(e.samples.length>2&&c-e.samples[0].t>100)e.samples.shift()},[u,pt,v]);const Pt=(0,_react.useCallback)(t=>{const e=U.current;if(!e.active)return;e.active=false;if(!e.resizing){G();return}M(false);const r=T.current;const s=t.clientY-e.startY;const a=e.samples[0];const c=e.samples[e.samples.length-1];const L=c&&a&&c.t>a.t?(c.y-a.y)/(c.t-a.t):0;const I=L>.8&&s>50||s>150&&r<=u;if(I){const x=X.current;v();if(x){const W=screenH();D.current.push(runAnim(200,easeInOut,$=>{x.style.opacity=String(1-$)}),runAnim(300,easeOutCubic,$=>{x.style.transform=`translateY(${$*W}px)`},()=>o()))}else{o()}return}tt(r)},[u,o,G,v]);const Bt=(0,_react.useCallback)(()=>{const t=U.current;if(!t.active)return;t.active=false;t.resizing=false;M(false)},[]);const q=(0,_react.useRef)({active:false,dragging:false,startX:0,startY:0,startPos:{x:0,y:0}});const Yt=(0,_react.useCallback)(t=>{if(d!=="floating"||A)return;if(t.button!==0||t.target.closest('button, a, input, textarea, select, [role="button"], [role="tab"], [role="switch"], [contenteditable="true"], [tabindex]'))return;const e=q.current;e.active=true;e.dragging=false;e.startX=t.clientX;e.startY=t.clientY;e.startPos={...p.current};t.currentTarget.setPointerCapture(t.pointerId)},[d,A]);const Et=(0,_react.useCallback)(t=>{const e=q.current;if(!e.active)return;const r=t.clientX-e.startX;const s=t.clientY-e.startY;if(!e.dragging&&Math.abs(r)+Math.abs(s)>5){e.dragging=true;P(true)}if(!e.dragging)return;const a=e.startPos.x+r;const c=e.startPos.y+s;p.current={x:a,y:c};if(k.current){k.current.style.transform=`translate(${a}px, ${c}px)`}},[]);const Lt=(0,_react.useCallback)(()=>{const t=q.current;if(!t.active)return;t.active=false;if(!t.dragging){G();return}P(false);const e=y.current;const r=clampRectToSafeArea({...e,left:p.current.x,top:p.current.y},b);const s=r.left;const a=r.top;p.current={x:s,y:a};if(k.current){k.current.style.transform=`translate(${s}px, ${a}px)`}B(c=>({...c,left:s,top:a}))},[b,G]);const Wt=(0,_react.useCallback)(()=>{const t=q.current;if(!t.active)return;t.active=false;t.dragging=false;P(false)},[]);const ot=(0,_react.useRef)({active:false,corner:"bottomRight",startX:0,startY:0,start:{width:0,height:0,top:0,left:0}});const _t=(0,_react.useCallback)(t=>e=>{if(d!=="floating")return;e.stopPropagation();const r=ot.current;r.active=true;r.corner=t;r.startX=e.clientX;r.startY=e.clientY;r.start={...y.current};M(true);e.currentTarget.setPointerCapture(e.pointerId)},[d]);const zt=(0,_react.useCallback)(t=>{const e=ot.current;if(!e.active)return;const r=t.clientX-e.startX;const s=t.clientY-e.startY;if(Math.abs(r)<.5&&Math.abs(s)<.5)return;const a=Math.max(0,b.left);const c=screenH()-Math.max(0,b.bottom);const L=screenW()-Math.max(0,b.right);const I=screenW()*.25;const x=e.start;const W=x.left+x.width;const $=x.top+x.height;let _=x.left;const N=x.top;let Ct=W;let rt=$;if(e.corner==="bottomLeft"){_=Math.max(a,Math.min(x.left+r,W-I));rt=Math.min(c,Math.max($+s,x.top+FLOATING_MIN_HEIGHT))}else{Ct=Math.min(L,Math.max(W+r,x.left+I));rt=Math.min(c,Math.max($+s,x.top+FLOATING_MIN_HEIGHT))}const Ft=Math.max(I,Ct-_);const Ot=Math.max(FLOATING_MIN_HEIGHT,rt-N);const kt={width:Ft,height:Ot,left:_,top:N};y.current=kt;p.current={x:_,y:N};B(kt);if(k.current){k.current.style.transform=`translate(${_}px, ${N}px)`}},[b.left,b.right,b.bottom]);const bt=(0,_react.useCallback)(()=>{const t=ot.current;if(!t.active)return;t.active=false;M(false);B(y.current)},[]);if(!n){return(0,_jsxRuntime.jsx)("div",{style:{display:"none"},"aria-hidden":true,children:i},"hidden")}const yt=f?.title||"Dev tool panel";const l=Z==="night";const vt=ut&&l?(0,_jsxRuntime.jsx)("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},"aria-hidden":true,children:(0,_jsxRuntime.jsx)(_ToolBackground.ToolBackground,{})}):null;const wt=(0,_jsxRuntime.jsxs)("div",{style:{flex:1,minHeight:0,position:"relative",display:"flex",flexDirection:"column",backgroundColor:l?"transparent":buoy.base,borderBottomLeftRadius:16,borderBottomRightRadius:16,overflow:"hidden",...h.content},children:[ut&&!l?(0,_jsxRuntime.jsx)(_ToolBackground.ToolBackground,{}):null,Rt?(0,_jsxRuntime.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",paddingBottom:ct},children:i}):(0,_jsxRuntime.jsx)("div",{style:{flex:1,minHeight:0,overflowY:"auto",paddingBottom:ct},children:i}),lt?(0,_jsxRuntime.jsx)("div",{style:{position:"absolute",left:0,right:0,bottom:0,backgroundColor:buoy.base,borderBottomLeftRadius:16,borderBottomRightRadius:16},children:lt}):null]});const jt=(0,_jsxRuntime.jsx)("div",{style:{position:"absolute",top:4,right:4,zIndex:10},children:(0,_jsxRuntime.jsx)(WindowControls,{onClose:o,onMinimize:m?H:void 0,onToggleMode:nt,mode:d})});if(d==="floating"){const t=K||A;return(0,_jsxRuntime.jsxs)("div",{ref:k,role:"dialog","aria-label":yt,style:{position:"fixed",left:0,top:0,width:C.width,height:C.height,transform:`translate(${p.current.x}px, ${p.current.y}px)`,display:"flex",flexDirection:"column",backgroundColor:l?_nightTheme.night.color.bg:buoy.card,borderRadius:l?_nightTheme.night.radius.sheet:6,border:l?`1px solid ${_nightTheme.night.color.accent}55`:t?`2px solid ${buoy.primary}`:`1px solid ${buoy.border}`,boxShadow:l?`0 0 14px ${_nightTheme.night.color.accent}38`:t?`0 0 12px ${buoy.primary}7A`:`0 0 20px ${buoy.primary}4D`,...l?{overflow:"hidden"}:null,boxSizing:"border-box",zIndex:dt??1e3,...h.container},children:[vt,(0,_jsxRuntime.jsx)("div",{onPointerDown:Yt,onPointerMove:Et,onPointerUp:Lt,onPointerCancel:Wt,style:{borderTopLeftRadius:l?_nightTheme.night.radius.sheet:6,borderTopRightRadius:l?_nightTheme.night.radius.sheet:6,backgroundColor:l?"transparent":buoy.card,minHeight:56,border:l?"none":`1px solid ${buoy.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:K?"grabbing":"grab",position:"relative"},children:(0,_jsxRuntime.jsx)(ModalHeaderContent,{header:f,isResizing:K||A,mode:d,onMinimize:m?H:void 0,variant:Z})}),jt,wt,["bottomLeft","bottomRight"].map(e=>(0,_jsxRuntime.jsx)("div",{onPointerDown:_t(e),onPointerMove:zt,onPointerUp:bt,onPointerCancel:bt,style:{position:"absolute",width:30,height:30,bottom:4,...e==="bottomLeft"?{left:4}:{right:4},zIndex:1e3,touchAction:"none",cursor:e==="bottomLeft"?"nesw-resize":"nwse-resize"},children:(0,_jsxRuntime.jsx)("div",{style:{width:20,height:20,borderRadius:10,boxSizing:"border-box",backgroundColor:t?`${gameUI.success}1A`:"transparent",border:t?`2px solid ${gameUI.success}`:"none",boxShadow:t?`0 0 8px ${gameUI.success}99`:"none"}})},e))]},"floating")}return(0,_jsxRuntime.jsx)("div",{style:{position:"fixed",inset:0,zIndex:dt??1e3,pointerEvents:"none"},children:(0,_jsxRuntime.jsx)("div",{ref:X,style:{position:"absolute",bottom:0,left:0,right:0,pointerEvents:"auto"},children:(0,_jsxRuntime.jsxs)("div",{ref:et,role:"dialog","aria-label":yt,style:{height:T.current,display:"flex",flexDirection:"column",backgroundColor:l?_nightTheme.night.color.bg:buoy.card,borderTopLeftRadius:l?_nightTheme.night.radius.sheet:6,borderTopRightRadius:l?_nightTheme.night.radius.sheet:6,border:l?`1px solid ${_nightTheme.night.color.accent}55`:`1px solid ${buoy.border}`,boxShadow:l?`0 -4px 10px ${_nightTheme.night.color.accent}38`:`0 -4px 12px ${buoy.primary}33`,...l?{overflow:"hidden"}:null,boxSizing:"border-box",position:"relative",...h.container},children:[vt,(0,_jsxRuntime.jsx)("div",{onPointerDown:$t,onPointerMove:At,onPointerUp:Pt,onPointerCancel:Bt,style:{borderTopLeftRadius:l?_nightTheme.night.radius.sheet:6,borderTopRightRadius:l?_nightTheme.night.radius.sheet:6,backgroundColor:l?"transparent":buoy.card,minHeight:56,border:l?"none":`1px solid ${buoy.border}`,boxSizing:"border-box",display:"flex",flexDirection:"column",justifyContent:"center",flexShrink:0,touchAction:"none",userSelect:"none",cursor:"ns-resize",position:"relative"},children:(0,_jsxRuntime.jsx)(ModalHeaderContent,{header:f,isResizing:A,mode:d,onMinimize:m?H:void 0,variant:Z})}),jt,Dt&&Tt&&!Ht&&(0,_jsxRuntime.jsx)(ModalHintBanner,{onAcknowledge:It}),wt]})})},"bottomSheet")};const JsModal=exports.JsModal=(0,_react.memo)(n=>{const o=(0,_licenseModule.getUseAccountAccess)()();if(o.status!=="admitted")return n.visible?(0,_jsxRuntime.jsx)(_AccountSetup.AccountSetup,{}):null;return(0,_jsxRuntime.jsx)(JsModalComponent,{...n})});