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