@buoy-gg/shared-ui 7.0.33 → 7.0.35

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 (323) hide show
  1. package/lib/commonjs/JsModal.js +57 -22
  2. package/lib/commonjs/dataViewer/CyberpunkInput.js +3 -2
  3. package/lib/commonjs/dataViewer/DataTreeActionBar.js +3 -2
  4. package/lib/commonjs/dataViewer/DataTreeActionDock.js +2 -1
  5. package/lib/commonjs/dataViewer/DiffSummary.js +4 -3
  6. package/lib/commonjs/dataViewer/LiveExplorer.js +11 -10
  7. package/lib/commonjs/dataViewer/SplitDiffViewer.js +10 -9
  8. package/lib/commonjs/dataViewer/ThemedSplitView.js +12 -11
  9. package/lib/commonjs/dataViewer/ValueEditModal.js +6 -5
  10. package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +4 -3
  11. package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +15 -14
  12. package/lib/commonjs/hooks/index.js +26 -0
  13. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  14. package/lib/commonjs/hooks/useChangeLog.js +55 -0
  15. package/lib/commonjs/hooks/useEventStoreEvents.js +65 -0
  16. package/lib/commonjs/hooks/usePersistedState.js +45 -10
  17. package/lib/commonjs/icons/index.js +533 -1
  18. package/lib/commonjs/index.js +143 -0
  19. package/lib/commonjs/license/FreeAccountPrompt.js +2 -1
  20. package/lib/commonjs/license/LicenseEntryModal.js +2 -1
  21. package/lib/commonjs/storage/definePersistedSetting.js +67 -0
  22. package/lib/commonjs/storage/index.js +8 -1
  23. package/lib/commonjs/stores/ChangeLog.js +197 -0
  24. package/lib/commonjs/stores/createToolStore.js +175 -0
  25. package/lib/commonjs/stores/index.js +15 -1
  26. package/lib/commonjs/sync/toolSyncAdapter.js +63 -0
  27. package/lib/commonjs/sync/wireForm.js +172 -0
  28. package/lib/commonjs/tools/defineTool.js +79 -0
  29. package/lib/commonjs/ui/components/ChangeRow.js +111 -0
  30. package/lib/commonjs/ui/components/ChipStrip.js +94 -0
  31. package/lib/commonjs/ui/components/ClipboardHintBanner.js +2 -1
  32. package/lib/commonjs/ui/components/CompactRow.js +3 -2
  33. package/lib/commonjs/ui/components/DataInspector.js +3 -2
  34. package/lib/commonjs/ui/components/DetailView.js +2 -1
  35. package/lib/commonjs/ui/components/DetailViewToggle.js +130 -0
  36. package/lib/commonjs/ui/components/DevToolsCard.js +3 -1
  37. package/lib/commonjs/ui/components/DynamicFilterView.js +8 -7
  38. package/lib/commonjs/ui/components/EntityFilterView.js +355 -0
  39. package/lib/commonjs/ui/components/EventHistoryViewer/CompareBar.js +5 -4
  40. package/lib/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.js +2 -1
  41. package/lib/commonjs/ui/components/EventHistoryViewer/EventPickerModal.js +5 -4
  42. package/lib/commonjs/ui/components/EventStepperFooter.js +4 -3
  43. package/lib/commonjs/ui/components/ExpandablePopover.js +12 -4
  44. package/lib/commonjs/ui/components/ExpandedInfoRow.js +3 -2
  45. package/lib/commonjs/ui/components/ExportPreview.js +174 -0
  46. package/lib/commonjs/ui/components/FilterComponents.js +2 -1
  47. package/lib/commonjs/ui/components/InfoRow.js +91 -0
  48. package/lib/commonjs/ui/components/ModalHeader.js +40 -7
  49. package/lib/commonjs/ui/components/Pill.js +115 -0
  50. package/lib/commonjs/ui/components/ToggleRow.js +116 -0
  51. package/lib/commonjs/ui/components/ToolFooter.js +205 -0
  52. package/lib/commonjs/ui/components/index.js +100 -1
  53. package/lib/commonjs/ui/console/CyberpunkSectionButton.js +3 -2
  54. package/lib/commonjs/ui/fonts.js +12 -0
  55. package/lib/commonjs/ui/gameUI/components/GameUICollapsibleSection.js +4 -3
  56. package/lib/commonjs/ui/gameUI/components/GameUICompactStats.js +12 -11
  57. package/lib/commonjs/ui/gameUI/components/GameUIIssuesList.js +9 -8
  58. package/lib/commonjs/ui/gameUI/components/GameUIStatusHeader.js +4 -3
  59. package/lib/commonjs/ui/index.js +32 -2
  60. package/lib/commonjs/ui/listPresets.js +43 -0
  61. package/lib/commonjs/ui/night/primitives.js +3 -1
  62. package/lib/commonjs/ui/toolTheme.js +4 -3
  63. package/lib/commonjs/utils/snapshotProviderKit.js +167 -0
  64. package/lib/commonjs/utils/stateTools.js +160 -0
  65. package/lib/module/JsModal.js +57 -22
  66. package/lib/module/dataViewer/CyberpunkInput.js +3 -2
  67. package/lib/module/dataViewer/DataTreeActionBar.js +3 -2
  68. package/lib/module/dataViewer/DataTreeActionDock.js +2 -1
  69. package/lib/module/dataViewer/DiffSummary.js +4 -3
  70. package/lib/module/dataViewer/LiveExplorer.js +11 -11
  71. package/lib/module/dataViewer/SplitDiffViewer.js +10 -9
  72. package/lib/module/dataViewer/ThemedSplitView.js +12 -11
  73. package/lib/module/dataViewer/ValueEditModal.js +6 -5
  74. package/lib/module/dataViewer/VirtualizedDataExplorer.js +5 -4
  75. package/lib/module/dataViewer/tree/TreeDiffViewer.js +15 -15
  76. package/lib/module/hooks/index.js +3 -1
  77. package/lib/module/hooks/safe-area-impl.js +1 -1
  78. package/lib/module/hooks/useChangeLog.js +50 -0
  79. package/lib/module/hooks/useEventStoreEvents.js +61 -0
  80. package/lib/module/hooks/usePersistedState.js +44 -10
  81. package/lib/module/icons/index.js +27 -2
  82. package/lib/module/index.js +11 -1
  83. package/lib/module/license/FreeAccountPrompt.js +2 -2
  84. package/lib/module/license/LicenseEntryModal.js +3 -3
  85. package/lib/module/storage/definePersistedSetting.js +63 -0
  86. package/lib/module/storage/index.js +2 -1
  87. package/lib/module/stores/ChangeLog.js +192 -0
  88. package/lib/module/stores/createToolStore.js +171 -0
  89. package/lib/module/stores/index.js +3 -1
  90. package/lib/module/sync/toolSyncAdapter.js +58 -0
  91. package/lib/module/sync/wireForm.js +159 -0
  92. package/lib/module/tools/defineTool.js +74 -0
  93. package/lib/module/ui/components/ChangeRow.js +106 -0
  94. package/lib/module/ui/components/ChipStrip.js +91 -0
  95. package/lib/module/ui/components/ClipboardHintBanner.js +2 -1
  96. package/lib/module/ui/components/CompactRow.js +3 -2
  97. package/lib/module/ui/components/DataInspector.js +3 -2
  98. package/lib/module/ui/components/DetailView.js +2 -1
  99. package/lib/module/ui/components/DetailViewToggle.js +125 -0
  100. package/lib/module/ui/components/DevToolsCard.js +3 -1
  101. package/lib/module/ui/components/DynamicFilterView.js +8 -7
  102. package/lib/module/ui/components/EntityFilterView.js +351 -0
  103. package/lib/module/ui/components/EventHistoryViewer/CompareBar.js +6 -5
  104. package/lib/module/ui/components/EventHistoryViewer/DiffModeTabs.js +3 -2
  105. package/lib/module/ui/components/EventHistoryViewer/EventPickerModal.js +6 -5
  106. package/lib/module/ui/components/EventStepperFooter.js +4 -3
  107. package/lib/module/ui/components/ExpandablePopover.js +12 -4
  108. package/lib/module/ui/components/ExpandedInfoRow.js +3 -2
  109. package/lib/module/ui/components/ExportPreview.js +169 -0
  110. package/lib/module/ui/components/FilterComponents.js +2 -2
  111. package/lib/module/ui/components/InfoRow.js +87 -0
  112. package/lib/module/ui/components/ModalHeader.js +40 -7
  113. package/lib/module/ui/components/Pill.js +111 -0
  114. package/lib/module/ui/components/ToggleRow.js +112 -0
  115. package/lib/module/ui/components/ToolFooter.js +197 -0
  116. package/lib/module/ui/components/index.js +10 -1
  117. package/lib/module/ui/console/CyberpunkSectionButton.js +3 -2
  118. package/lib/module/ui/fonts.js +8 -0
  119. package/lib/module/ui/gameUI/components/GameUICollapsibleSection.js +4 -3
  120. package/lib/module/ui/gameUI/components/GameUICompactStats.js +12 -11
  121. package/lib/module/ui/gameUI/components/GameUIIssuesList.js +9 -8
  122. package/lib/module/ui/gameUI/components/GameUIStatusHeader.js +4 -3
  123. package/lib/module/ui/index.js +7 -1
  124. package/lib/module/ui/listPresets.js +39 -0
  125. package/lib/module/ui/night/primitives.js +3 -1
  126. package/lib/module/ui/toolTheme.js +4 -4
  127. package/lib/module/utils/snapshotProviderKit.js +156 -0
  128. package/lib/module/utils/stateTools.js +154 -0
  129. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/dataViewer/CyberpunkInput.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/dataViewer/DataTreeActionBar.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/dataViewer/DiffSummary.d.ts.map +1 -1
  134. package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/dataViewer/SplitDiffViewer.d.ts.map +1 -1
  136. package/lib/typescript/commonjs/dataViewer/ThemedSplitView.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/dataViewer/ValueEditModal.d.ts.map +1 -1
  138. package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/hooks/index.d.ts +3 -1
  141. package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -1
  142. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  143. package/lib/typescript/commonjs/hooks/useChangeLog.d.ts +38 -0
  144. package/lib/typescript/commonjs/hooks/useChangeLog.d.ts.map +1 -0
  145. package/lib/typescript/commonjs/hooks/useEventStoreEvents.d.ts +25 -0
  146. package/lib/typescript/commonjs/hooks/useEventStoreEvents.d.ts.map +1 -0
  147. package/lib/typescript/commonjs/hooks/usePersistedState.d.ts +34 -5
  148. package/lib/typescript/commonjs/hooks/usePersistedState.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/icons/index.d.ts +4 -1
  150. package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/index.d.ts +6 -1
  152. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/license/FreeAccountPrompt.d.ts.map +1 -1
  154. package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/storage/definePersistedSetting.d.ts +39 -0
  156. package/lib/typescript/commonjs/storage/definePersistedSetting.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/storage/index.d.ts +1 -0
  158. package/lib/typescript/commonjs/storage/index.d.ts.map +1 -1
  159. package/lib/typescript/commonjs/stores/ChangeLog.d.ts +100 -0
  160. package/lib/typescript/commonjs/stores/ChangeLog.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/stores/createToolStore.d.ts +92 -0
  162. package/lib/typescript/commonjs/stores/createToolStore.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/stores/index.d.ts +2 -0
  164. package/lib/typescript/commonjs/stores/index.d.ts.map +1 -1
  165. package/lib/typescript/commonjs/sync/toolSyncAdapter.d.ts +66 -0
  166. package/lib/typescript/commonjs/sync/toolSyncAdapter.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/sync/wireForm.d.ts +100 -0
  168. package/lib/typescript/commonjs/sync/wireForm.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/tools/defineTool.d.ts +100 -0
  170. package/lib/typescript/commonjs/tools/defineTool.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/ui/components/ChangeRow.d.ts +52 -0
  172. package/lib/typescript/commonjs/ui/components/ChangeRow.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/ui/components/ChipStrip.d.ts +41 -0
  174. package/lib/typescript/commonjs/ui/components/ChipStrip.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/ui/components/ClipboardHintBanner.d.ts.map +1 -1
  176. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
  177. package/lib/typescript/commonjs/ui/components/DataInspector.d.ts.map +1 -1
  178. package/lib/typescript/commonjs/ui/components/DetailView.d.ts.map +1 -1
  179. package/lib/typescript/commonjs/ui/components/DetailViewToggle.d.ts +36 -0
  180. package/lib/typescript/commonjs/ui/components/DetailViewToggle.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts +8 -1
  182. package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -1
  184. package/lib/typescript/commonjs/ui/components/EntityFilterView.d.ts +51 -0
  185. package/lib/typescript/commonjs/ui/components/EntityFilterView.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/CompareBar.d.ts.map +1 -1
  187. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -1
  188. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +1 -1
  189. package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -1
  190. package/lib/typescript/commonjs/ui/components/ExpandablePopover.d.ts +5 -1
  191. package/lib/typescript/commonjs/ui/components/ExpandablePopover.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/ui/components/ExportPreview.d.ts +48 -0
  194. package/lib/typescript/commonjs/ui/components/ExportPreview.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/ui/components/FilterComponents.d.ts.map +1 -1
  196. package/lib/typescript/commonjs/ui/components/InfoRow.d.ts +33 -0
  197. package/lib/typescript/commonjs/ui/components/InfoRow.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts +31 -1
  199. package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +1 -1
  200. package/lib/typescript/commonjs/ui/components/Pill.d.ts +38 -0
  201. package/lib/typescript/commonjs/ui/components/Pill.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/ui/components/ToggleRow.d.ts +33 -0
  203. package/lib/typescript/commonjs/ui/components/ToggleRow.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/ui/components/ToolFooter.d.ts +69 -0
  205. package/lib/typescript/commonjs/ui/components/ToolFooter.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/ui/components/index.d.ts +9 -0
  207. package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
  208. package/lib/typescript/commonjs/ui/console/CyberpunkSectionButton.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/ui/fonts.d.ts +7 -0
  210. package/lib/typescript/commonjs/ui/fonts.d.ts.map +1 -0
  211. package/lib/typescript/commonjs/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +1 -1
  212. package/lib/typescript/commonjs/ui/gameUI/components/GameUICompactStats.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/ui/gameUI/components/GameUIIssuesList.d.ts.map +1 -1
  214. package/lib/typescript/commonjs/ui/gameUI/components/GameUIStatusHeader.d.ts.map +1 -1
  215. package/lib/typescript/commonjs/ui/index.d.ts +2 -0
  216. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  217. package/lib/typescript/commonjs/ui/listPresets.d.ts +28 -0
  218. package/lib/typescript/commonjs/ui/listPresets.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/ui/night/primitives.d.ts +3 -1
  220. package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/ui/toolTheme.d.ts.map +1 -1
  222. package/lib/typescript/commonjs/utils/snapshotProviderKit.d.ts +81 -0
  223. package/lib/typescript/commonjs/utils/snapshotProviderKit.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/utils/stateTools.d.ts +44 -0
  225. package/lib/typescript/commonjs/utils/stateTools.d.ts.map +1 -0
  226. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  227. package/lib/typescript/module/dataViewer/CyberpunkInput.d.ts.map +1 -1
  228. package/lib/typescript/module/dataViewer/DataTreeActionBar.d.ts.map +1 -1
  229. package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts.map +1 -1
  230. package/lib/typescript/module/dataViewer/DiffSummary.d.ts.map +1 -1
  231. package/lib/typescript/module/dataViewer/LiveExplorer.d.ts.map +1 -1
  232. package/lib/typescript/module/dataViewer/SplitDiffViewer.d.ts.map +1 -1
  233. package/lib/typescript/module/dataViewer/ThemedSplitView.d.ts.map +1 -1
  234. package/lib/typescript/module/dataViewer/ValueEditModal.d.ts.map +1 -1
  235. package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  236. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  237. package/lib/typescript/module/hooks/index.d.ts +3 -1
  238. package/lib/typescript/module/hooks/index.d.ts.map +1 -1
  239. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  240. package/lib/typescript/module/hooks/useChangeLog.d.ts +38 -0
  241. package/lib/typescript/module/hooks/useChangeLog.d.ts.map +1 -0
  242. package/lib/typescript/module/hooks/useEventStoreEvents.d.ts +25 -0
  243. package/lib/typescript/module/hooks/useEventStoreEvents.d.ts.map +1 -0
  244. package/lib/typescript/module/hooks/usePersistedState.d.ts +34 -5
  245. package/lib/typescript/module/hooks/usePersistedState.d.ts.map +1 -1
  246. package/lib/typescript/module/icons/index.d.ts +4 -1
  247. package/lib/typescript/module/icons/index.d.ts.map +1 -1
  248. package/lib/typescript/module/index.d.ts +6 -1
  249. package/lib/typescript/module/index.d.ts.map +1 -1
  250. package/lib/typescript/module/license/FreeAccountPrompt.d.ts.map +1 -1
  251. package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -1
  252. package/lib/typescript/module/storage/definePersistedSetting.d.ts +39 -0
  253. package/lib/typescript/module/storage/definePersistedSetting.d.ts.map +1 -0
  254. package/lib/typescript/module/storage/index.d.ts +1 -0
  255. package/lib/typescript/module/storage/index.d.ts.map +1 -1
  256. package/lib/typescript/module/stores/ChangeLog.d.ts +100 -0
  257. package/lib/typescript/module/stores/ChangeLog.d.ts.map +1 -0
  258. package/lib/typescript/module/stores/createToolStore.d.ts +92 -0
  259. package/lib/typescript/module/stores/createToolStore.d.ts.map +1 -0
  260. package/lib/typescript/module/stores/index.d.ts +2 -0
  261. package/lib/typescript/module/stores/index.d.ts.map +1 -1
  262. package/lib/typescript/module/sync/toolSyncAdapter.d.ts +66 -0
  263. package/lib/typescript/module/sync/toolSyncAdapter.d.ts.map +1 -0
  264. package/lib/typescript/module/sync/wireForm.d.ts +100 -0
  265. package/lib/typescript/module/sync/wireForm.d.ts.map +1 -0
  266. package/lib/typescript/module/tools/defineTool.d.ts +100 -0
  267. package/lib/typescript/module/tools/defineTool.d.ts.map +1 -0
  268. package/lib/typescript/module/ui/components/ChangeRow.d.ts +52 -0
  269. package/lib/typescript/module/ui/components/ChangeRow.d.ts.map +1 -0
  270. package/lib/typescript/module/ui/components/ChipStrip.d.ts +41 -0
  271. package/lib/typescript/module/ui/components/ChipStrip.d.ts.map +1 -0
  272. package/lib/typescript/module/ui/components/ClipboardHintBanner.d.ts.map +1 -1
  273. package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
  274. package/lib/typescript/module/ui/components/DataInspector.d.ts.map +1 -1
  275. package/lib/typescript/module/ui/components/DetailView.d.ts.map +1 -1
  276. package/lib/typescript/module/ui/components/DetailViewToggle.d.ts +36 -0
  277. package/lib/typescript/module/ui/components/DetailViewToggle.d.ts.map +1 -0
  278. package/lib/typescript/module/ui/components/DevToolsCard.d.ts +8 -1
  279. package/lib/typescript/module/ui/components/DevToolsCard.d.ts.map +1 -1
  280. package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -1
  281. package/lib/typescript/module/ui/components/EntityFilterView.d.ts +51 -0
  282. package/lib/typescript/module/ui/components/EntityFilterView.d.ts.map +1 -0
  283. package/lib/typescript/module/ui/components/EventHistoryViewer/CompareBar.d.ts.map +1 -1
  284. package/lib/typescript/module/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -1
  285. package/lib/typescript/module/ui/components/EventHistoryViewer/EventPickerModal.d.ts.map +1 -1
  286. package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -1
  287. package/lib/typescript/module/ui/components/ExpandablePopover.d.ts +5 -1
  288. package/lib/typescript/module/ui/components/ExpandablePopover.d.ts.map +1 -1
  289. package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts.map +1 -1
  290. package/lib/typescript/module/ui/components/ExportPreview.d.ts +48 -0
  291. package/lib/typescript/module/ui/components/ExportPreview.d.ts.map +1 -0
  292. package/lib/typescript/module/ui/components/FilterComponents.d.ts.map +1 -1
  293. package/lib/typescript/module/ui/components/InfoRow.d.ts +33 -0
  294. package/lib/typescript/module/ui/components/InfoRow.d.ts.map +1 -0
  295. package/lib/typescript/module/ui/components/ModalHeader.d.ts +31 -1
  296. package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +1 -1
  297. package/lib/typescript/module/ui/components/Pill.d.ts +38 -0
  298. package/lib/typescript/module/ui/components/Pill.d.ts.map +1 -0
  299. package/lib/typescript/module/ui/components/ToggleRow.d.ts +33 -0
  300. package/lib/typescript/module/ui/components/ToggleRow.d.ts.map +1 -0
  301. package/lib/typescript/module/ui/components/ToolFooter.d.ts +69 -0
  302. package/lib/typescript/module/ui/components/ToolFooter.d.ts.map +1 -0
  303. package/lib/typescript/module/ui/components/index.d.ts +9 -0
  304. package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
  305. package/lib/typescript/module/ui/console/CyberpunkSectionButton.d.ts.map +1 -1
  306. package/lib/typescript/module/ui/fonts.d.ts +7 -0
  307. package/lib/typescript/module/ui/fonts.d.ts.map +1 -0
  308. package/lib/typescript/module/ui/gameUI/components/GameUICollapsibleSection.d.ts.map +1 -1
  309. package/lib/typescript/module/ui/gameUI/components/GameUICompactStats.d.ts.map +1 -1
  310. package/lib/typescript/module/ui/gameUI/components/GameUIIssuesList.d.ts.map +1 -1
  311. package/lib/typescript/module/ui/gameUI/components/GameUIStatusHeader.d.ts.map +1 -1
  312. package/lib/typescript/module/ui/index.d.ts +2 -0
  313. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  314. package/lib/typescript/module/ui/listPresets.d.ts +28 -0
  315. package/lib/typescript/module/ui/listPresets.d.ts.map +1 -0
  316. package/lib/typescript/module/ui/night/primitives.d.ts +3 -1
  317. package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -1
  318. package/lib/typescript/module/ui/toolTheme.d.ts.map +1 -1
  319. package/lib/typescript/module/utils/snapshotProviderKit.d.ts +81 -0
  320. package/lib/typescript/module/utils/snapshotProviderKit.d.ts.map +1 -0
  321. package/lib/typescript/module/utils/stateTools.d.ts +44 -0
  322. package/lib/typescript/module/utils/stateTools.d.ts.map +1 -0
  323. package/package.json +4 -4
@@ -0,0 +1,175 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createToolStore = createToolStore;
7
+ /**
8
+ * createToolStore — the one bounded, subscribable buffer every tool used to
9
+ * hand-roll.
10
+ *
11
+ * Before this existed, console, sentry, images, assets, focus-inspector,
12
+ * tv-remote, redux, zustand, jotai and react-query each carried their own copy
13
+ * of the same ~100 lines: a `Set` of listeners, a `Set` of clear listeners
14
+ * (so the desktop dashboard can forward a clear to the device in mirror
15
+ * mode), a ring buffer with a max, an optional frame-coalesced emit, and the
16
+ * `__buoyFlushToolSync` escape hatch that pushes a tool's snapshot to the
17
+ * dashboard NOW (a crash's last words must not wait on the sync throttle).
18
+ *
19
+ * This is a plain function, not a class, on purpose: every consumer exposes a
20
+ * module-level functional API (`subscribe`, `getSnapshot`, `clearX`) and
21
+ * feeds `useSyncExternalStore`, so the store is a value the module wraps
22
+ * rather than something it extends. `BaseEventStore` stays for the
23
+ * class-based, auto-start/stop capture stores (network, storage, routes).
24
+ *
25
+ * Contract:
26
+ * - `getSnapshot()` returns the SAME array reference until the next
27
+ * mutation, so `useSyncExternalStore` never re-renders for nothing.
28
+ * - `order: "append"` keeps the newest item LAST (console-style scrollback);
29
+ * `order: "prepend"` keeps it FIRST (event-log style). Trimming drops from
30
+ * the opposite end. Consumers never have to `.reverse()`.
31
+ * - `clear()` fires `onClear` listeners even when the buffer is already
32
+ * empty — the dashboard's forwarded clear must reach the device regardless.
33
+ * - `set()` (mirror mode) never fires clear listeners; it is a replacement.
34
+ */
35
+
36
+ /** Listener signature: change-only, read the snapshot yourself. */
37
+
38
+ function scheduleFrame(cb) {
39
+ if (typeof requestAnimationFrame === "function") {
40
+ requestAnimationFrame(() => cb());
41
+ } else {
42
+ setTimeout(cb, 0);
43
+ }
44
+ }
45
+ function createToolStore(options) {
46
+ const id = options.id;
47
+ const order = options.order ?? "append";
48
+ const coalesce = options.coalesce ?? "sync";
49
+ const flushMinIntervalMs = options.flushMinIntervalMs ?? 150;
50
+ let max = options.max;
51
+ let items = [];
52
+ let paused = false;
53
+ let nextId = options.firstId ?? 1;
54
+ let lastFlushAt = 0;
55
+ let emitScheduled = false;
56
+ const listeners = new Set();
57
+ const clearListeners = new Set();
58
+ function fire() {
59
+ for (const listener of listeners) {
60
+ try {
61
+ listener();
62
+ } catch {
63
+ // A broken subscriber must not take the store (or a crash path) down.
64
+ }
65
+ }
66
+ }
67
+ function emit() {
68
+ if (coalesce === "sync") {
69
+ fire();
70
+ return;
71
+ }
72
+ if (emitScheduled) return;
73
+ emitScheduled = true;
74
+ scheduleFrame(() => {
75
+ emitScheduled = false;
76
+ fire();
77
+ });
78
+ }
79
+ function trim(list) {
80
+ if (list.length <= max) return list;
81
+ return order === "append" ? list.slice(list.length - max) : list.slice(0, max);
82
+ }
83
+ const store = {
84
+ id,
85
+ subscribe(listener) {
86
+ listeners.add(listener);
87
+ return () => {
88
+ listeners.delete(listener);
89
+ };
90
+ },
91
+ getSnapshot() {
92
+ return items;
93
+ },
94
+ size() {
95
+ return items.length;
96
+ },
97
+ add(item) {
98
+ if (paused) return;
99
+ if (order === "append") {
100
+ items = items.length >= max ? [...items.slice(items.length - max + 1), item] : [...items, item];
101
+ } else {
102
+ items = items.length >= max ? [item, ...items.slice(0, max - 1)] : [item, ...items];
103
+ }
104
+ emit();
105
+ },
106
+ set(next) {
107
+ items = trim(next);
108
+ emit();
109
+ },
110
+ update(fn) {
111
+ items = trim(fn(items));
112
+ emit();
113
+ },
114
+ clear() {
115
+ for (const listener of clearListeners) {
116
+ try {
117
+ listener();
118
+ } catch {
119
+ // ignore
120
+ }
121
+ }
122
+ if (items.length === 0) return;
123
+ items = [];
124
+ emit();
125
+ },
126
+ onClear(listener) {
127
+ clearListeners.add(listener);
128
+ return () => {
129
+ clearListeners.delete(listener);
130
+ };
131
+ },
132
+ notify() {
133
+ emit();
134
+ },
135
+ flushSync(force = false) {
136
+ const now = Date.now();
137
+ if (!force && now - lastFlushAt < flushMinIntervalMs) return;
138
+ lastFlushAt = now;
139
+ try {
140
+ const set = globalThis.__buoyFlushToolSync;
141
+ if (!set) return;
142
+ for (const flush of set) flush(id);
143
+ } catch {
144
+ // Best-effort: a crash path must never crash.
145
+ }
146
+ },
147
+ setPaused(next) {
148
+ paused = next;
149
+ },
150
+ isPaused() {
151
+ return paused;
152
+ },
153
+ setMax(next) {
154
+ max = next;
155
+ const trimmed = trim(items);
156
+ if (trimmed !== items) {
157
+ items = trimmed;
158
+ emit();
159
+ }
160
+ },
161
+ getMax() {
162
+ return max;
163
+ },
164
+ allocId() {
165
+ return nextId++;
166
+ },
167
+ bumpIdAbove(idFloor) {
168
+ if (idFloor + 1 > nextId) nextId = idFloor + 1;
169
+ },
170
+ listenerCount() {
171
+ return listeners.size;
172
+ }
173
+ };
174
+ return store;
175
+ }
@@ -9,6 +9,18 @@ Object.defineProperty(exports, "BaseEventStore", {
9
9
  return _BaseEventStore.BaseEventStore;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "ChangeLog", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _ChangeLog.ChangeLog;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "createToolStore", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _createToolStore.createToolStore;
22
+ }
23
+ });
12
24
  Object.defineProperty(exports, "ignoredPatternsStore", {
13
25
  enumerable: true,
14
26
  get: function () {
@@ -34,4 +46,6 @@ Object.defineProperty(exports, "useIgnoredPatterns", {
34
46
  }
35
47
  });
36
48
  var _BaseEventStore = require("./BaseEventStore.js");
37
- var _ignoredPatternsStore = require("./ignoredPatternsStore");
49
+ var _ignoredPatternsStore = require("./ignoredPatternsStore");
50
+ var _createToolStore = require("./createToolStore.js");
51
+ var _ChangeLog = require("./ChangeLog.js");
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createSyncAdapter = createSyncAdapter;
7
+ exports.mergeChangeSources = mergeChangeSources;
8
+ /**
9
+ * ToolSyncAdapter — the contract a tool implements to sync to Buoy Desktop /
10
+ * the MCP server, plus `createSyncAdapter`, the one way to build one.
11
+ *
12
+ * Every tool package used to declare its adapter as a bare object literal
13
+ * with the comment "structurally matches external-sync's ToolSyncAdapter so
14
+ * this package doesn't need a dependency on it". That kept the packages
15
+ * decoupled but left the contract unchecked: storage shipped `version: 3`
16
+ * while every sibling was on 2 and nothing noticed. The type now lives here,
17
+ * in shared (which every tool already depends on), and external-sync
18
+ * re-exports it — one definition, checked everywhere.
19
+ *
20
+ * `createSyncAdapter` is deliberately thin. It:
21
+ * - type-checks the literal against the contract (a wrong `subscribe`
22
+ * signature or a non-function action fails at compile time),
23
+ * - keeps the CONCRETE `actions` type, so `adapter.actions.getChangeDetail()`
24
+ * stays typed for tests and callers,
25
+ * - merges several change sources into one `subscribe` (a store plus its
26
+ * registry, envelopes plus drops) — the second most-copied block.
27
+ */
28
+
29
+ /** A remote-invocable action. Thrown errors are reported back to the dashboard. */
30
+
31
+ /** Anything that can tell the bridge "something changed". */
32
+
33
+ /**
34
+ * The contract each dev tool implements to become remotely syncable.
35
+ * Works with BaseEventStore, ChangeLog, createToolStore, or any pattern
36
+ * exposing subscribe + getSnapshot.
37
+ *
38
+ * Payloads (snapshots and action results) must be JSON-serializable —
39
+ * no functions, circular references, or class instances.
40
+ */
41
+
42
+ /** Subscribe to every source; the returned function unsubscribes from all. */
43
+ function mergeChangeSources(sources) {
44
+ if (sources.length === 1) return sources[0];
45
+ return onChange => {
46
+ const offs = sources.map(source => source(onChange));
47
+ return () => {
48
+ for (const off of offs) off();
49
+ };
50
+ };
51
+ }
52
+ function createSyncAdapter(definition) {
53
+ const subscribe = Array.isArray(definition.subscribe) ? mergeChangeSources(definition.subscribe) : definition.subscribe;
54
+ const adapter = {
55
+ version: definition.version,
56
+ getSnapshot: definition.getSnapshot,
57
+ subscribe,
58
+ ...(definition.actions ? {
59
+ actions: definition.actions
60
+ } : {})
61
+ };
62
+ return adapter;
63
+ }
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.WIRE_INLINE_LIMIT_BYTES = exports.WIRE_DETAIL_LIMIT_BYTES = void 0;
7
+ exports.capDetail = capDetail;
8
+ exports.detailByIdAction = detailByIdAction;
9
+ exports.isOnDeviceMarker = isOnDeviceMarker;
10
+ exports.memoByIdentity = memoByIdentity;
11
+ exports.newestFitting = newestFitting;
12
+ exports.onDeviceMarker = onDeviceMarker;
13
+ exports.readParams = readParams;
14
+ exports.sizeOrStub = sizeOrStub;
15
+ exports.toWire = toWire;
16
+ exports.truncatedNote = truncatedNote;
17
+ var _wireBudget = require("./wireBudget.js");
18
+ /**
19
+ * wireForm — how a tool turns what it holds into what it may put on the wire.
20
+ *
21
+ * Every adapter that ships large values faces the same four problems, and
22
+ * nine of them solved each one separately:
23
+ *
24
+ * 1. A per-item cap on the snapshot stream (16 KB), with a MARKER left in
25
+ * the value's place so the dashboard knows to fetch it on demand.
26
+ * 2. A much larger cap on that on-demand detail fetch (8 MB), with a
27
+ * TRUNCATION NOTE when even that is exceeded.
28
+ * 3. An identity-keyed cache for the wire form, because a snapshot is
29
+ * rebuilt ~5×/sec while a dashboard watches and stores never mutate a
30
+ * recorded item — so converting each item once is correct and cheap.
31
+ * 4. For tools whose items are individually fat (console, sentry), a
32
+ * newest-first walk that keeps as many items as fit a snapshot budget.
33
+ *
34
+ * Marker KEY NAMES are part of the wire protocol — Buoy Desktop and the
35
+ * tool stores test for `__buoyStateOnDevice`, `__buoyPayloadOnDevice`,
36
+ * `__buoyValueOnDevice` — so the factory builds exactly those keys.
37
+ */
38
+
39
+ /** Per-item budget on the snapshot stream. Anything larger stays on-device. */
40
+ const WIRE_INLINE_LIMIT_BYTES = exports.WIRE_INLINE_LIMIT_BYTES = 16 * 1024;
41
+
42
+ /**
43
+ * Upper bound for one on-demand detail response. Generous — this is a single
44
+ * explicit fetch, not a per-item stream — but still guarded so a pathological
45
+ * tree can't OOM the device through the reply emit.
46
+ */
47
+ const WIRE_DETAIL_LIMIT_BYTES = exports.WIRE_DETAIL_LIMIT_BYTES = 8 * 1024 * 1024;
48
+
49
+ /** A frozen `{ __buoy<Kind>OnDevice: true, note }` marker. */
50
+
51
+ /**
52
+ * Build the sentinel a wire-form snapshot carries in place of a value that
53
+ * stays on the device. `kind` names the value ("State", "Payload", "Value",
54
+ * "Params", "Data", …) and becomes the key the reader tests for.
55
+ */
56
+ function onDeviceMarker(kind, note) {
57
+ return Object.freeze({
58
+ [`__buoy${kind}OnDevice`]: true,
59
+ note
60
+ });
61
+ }
62
+
63
+ /** True when `value` is the on-device marker for `kind`. */
64
+ function isOnDeviceMarker(value, kind) {
65
+ return typeof value === "object" && value !== null && value[`__buoy${kind}OnDevice`] === true;
66
+ }
67
+
68
+ /** The note a detail fetch returns when a single field exceeds the detail cap. */
69
+ function truncatedNote(limitBytes = WIRE_DETAIL_LIMIT_BYTES) {
70
+ const mb = limitBytes / (1024 * 1024);
71
+ return {
72
+ __buoyTruncated: true,
73
+ note: `Exceeds the ${mb}MB detail limit — inspect it on-device.`
74
+ };
75
+ }
76
+
77
+ /**
78
+ * The value itself if it fits `limit` (and is serializable), else `marker`.
79
+ * `undefined` passes through untouched: an absent field must stay absent.
80
+ */
81
+ function toWire(value, marker, limit = WIRE_INLINE_LIMIT_BYTES) {
82
+ if (value === undefined) return value;
83
+ return (0, _wireBudget.isOverWireBudget)(value, limit) ? marker : value;
84
+ }
85
+
86
+ /** Detail-fetch cap: the value, or a truncation note when it is too big. */
87
+ function capDetail(value, limit = WIRE_DETAIL_LIMIT_BYTES) {
88
+ return (0, _wireBudget.isOverWireBudget)(value, limit) ? truncatedNote(limit) : value;
89
+ }
90
+
91
+ /**
92
+ * Memoize a wire-form conversion by item identity. Correct for any store
93
+ * that prepends and never mutates a recorded item — the cache self-invalidates
94
+ * when the item is dropped from the buffer.
95
+ */
96
+ function memoByIdentity(convert) {
97
+ const cache = new WeakMap();
98
+ return item => {
99
+ const cached = cache.get(item);
100
+ if (cached !== undefined) return cached;
101
+ const converted = convert(item);
102
+ cache.set(item, converted);
103
+ return converted;
104
+ };
105
+ }
106
+ /**
107
+ * Walk `items` (oldest-first) from the newest end, keeping every item until
108
+ * the budget is spent. Always keeps at least one so an over-budget newest
109
+ * item still reaches the dashboard as a stub rather than an empty panel.
110
+ * Returns oldest-first, matching the input.
111
+ */
112
+ function newestFitting(items, options) {
113
+ const out = [];
114
+ let bytes = options.baseBytes ?? 16;
115
+ for (let i = items.length - 1; i >= 0; i--) {
116
+ const wired = options.toWire(items[i]);
117
+ if (bytes + wired.bytes > options.budget && out.length > 0) break;
118
+ out.push(wired.value);
119
+ bytes += wired.bytes;
120
+ }
121
+ out.reverse();
122
+ return out;
123
+ }
124
+
125
+ /**
126
+ * Size one wire-form item against a per-item cap, substituting a stub when it
127
+ * is too fat. One walk decides both "too big?" and "what does it cost".
128
+ */
129
+ function sizeOrStub(wired, limit, stub) {
130
+ const size = (0, _wireBudget.approxJsonSize)(wired, limit);
131
+ if (size.bytes <= limit) return {
132
+ value: wired,
133
+ bytes: size.bytes
134
+ };
135
+ const stubbed = stub();
136
+ return {
137
+ value: stubbed,
138
+ bytes: (0, _wireBudget.approxJsonSize)(stubbed, limit).bytes
139
+ };
140
+ }
141
+
142
+ /** `(params as T | undefined) ?? {}` — the first line of every action. */
143
+ function readParams(params) {
144
+ return params ?? {};
145
+ }
146
+ /**
147
+ * The on-demand detail action every change-log tool exposes: look one item
148
+ * up by id, and return its detail fields size-capped. Replaces the
149
+ * `missing id` / `unknown id` boilerplate copied into each adapter.
150
+ */
151
+ function detailByIdAction(lookup, detail, limit = WIRE_DETAIL_LIMIT_BYTES) {
152
+ const cap = value => capDetail(value, limit);
153
+ return params => {
154
+ const {
155
+ id
156
+ } = readParams(params);
157
+ if (!id) return {
158
+ found: false,
159
+ reason: "missing id"
160
+ };
161
+ const item = lookup(id);
162
+ if (!item) return {
163
+ found: false,
164
+ reason: "unknown id"
165
+ };
166
+ return {
167
+ found: true,
168
+ id,
169
+ ...detail(item, cap)
170
+ };
171
+ };
172
+ }
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createToolFactory = createToolFactory;
7
+ exports.defineToolPreset = defineToolPreset;
8
+ /**
9
+ * defineToolPreset / createToolFactory — the typed way to declare a tool.
10
+ *
11
+ * Every tool package exports a `xToolPreset` object literal and a
12
+ * `createXTool(options)` factory that restates the same literal with
13
+ * `options?.name || default` on each field. None of the 23 presets was
14
+ * annotated with core's `InstalledApp`, so a preset that drifted from the
15
+ * contract (a bad `slot`, a missing `component`) failed at runtime in the
16
+ * dial, not at compile time.
17
+ *
18
+ * `ToolPreset` is that contract, declared here in shared (which every tool
19
+ * already depends on) and structurally identical to core's `InstalledApp`.
20
+ * `defineToolPreset` is an identity function that type-checks the literal;
21
+ * `createToolFactory` derives the `createXTool` function from the preset so
22
+ * the defaults live in exactly one place.
23
+ *
24
+ * Auto-discovery (core's `autoDiscoverPresets` / `autoExternalSync`) stays
25
+ * as hand-written `require()` blocks on purpose: Metro needs each package
26
+ * name as a static string lexically inside its own try, so a manifest can't
27
+ * replace them.
28
+ */
29
+
30
+ /** Where a tool should render within the floating menu surface. */
31
+
32
+ /** What an icon renderer receives. Mirrors core's `FloatingMenuRenderCtx`. */
33
+
34
+ /** Declarative modal chrome for a body-only tool. Mirrors core's `ToolModalConfig`. */
35
+
36
+ /**
37
+ * The shape the floating menu installs. Structurally identical to core's
38
+ * `InstalledApp`; declared here so tool packages can type their presets
39
+ * without depending on core.
40
+ */
41
+
42
+ /** Identity with a type check: the literal must satisfy `ToolPreset`. */
43
+ function defineToolPreset(preset) {
44
+ return preset;
45
+ }
46
+
47
+ /** The overrides every `createXTool` accepted. */
48
+
49
+ /**
50
+ * Derive `createXTool(options)` from a preset: id/name/description overrides
51
+ * apply on top, and `mapProps` turns tool-specific options into `props`
52
+ * (merged over the preset's defaults).
53
+ *
54
+ * ```ts
55
+ * export const createNetworkTool = createToolFactory(networkToolPreset, (o: { enableSharedModalDimensions?: boolean }) => ({
56
+ * enableSharedModalDimensions: o.enableSharedModalDimensions ?? false,
57
+ * }));
58
+ * ```
59
+ */
60
+ function createToolFactory(preset, mapProps, /** Last word on any other preset field (a recolored icon, say). */
61
+ extend) {
62
+ return options => {
63
+ const overrides = options ?? {};
64
+ const props = preset.props === undefined && !mapProps ? undefined : {
65
+ ...(preset.props ?? {}),
66
+ ...(mapProps ? mapProps(overrides) : {})
67
+ };
68
+ return {
69
+ ...preset,
70
+ id: overrides.id || preset.id,
71
+ name: overrides.name || preset.name,
72
+ description: overrides.description || preset.description,
73
+ ...(props !== undefined ? {
74
+ props
75
+ } : {}),
76
+ ...(extend ? extend(overrides, preset) : {})
77
+ };
78
+ };
79
+ }
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ChangeRow = ChangeRow;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _gameUIColors = require("../gameUI/constants/gameUIColors.js");
10
+ var _CompactRow = require("./CompactRow.js");
11
+ var _index = require("../../icons/index.js");
12
+ var _RelativeTime = require("../../utils/time/RelativeTime.js");
13
+ var _fonts = require("../fonts.js");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ /**
17
+ * ChangeRow — one recorded change in a state tool's history list.
18
+ *
19
+ * redux, zustand and jotai each drew the same row on top of `CompactRow`:
20
+ * a colored status word (the slice / store / atom), a sublabel ("1.2ms ·
21
+ * 3 keys changed"), the primary line (changed keys or a value preview), a
22
+ * relative timestamp, and a right-hand badge made of a mono verb (SET,
23
+ * WRITE, ADDITEM) plus an icon — a lightning bolt when state actually
24
+ * changed, a clock when the update was slow. The three copies differed
25
+ * only in how they computed those strings. This component owns the drawing;
26
+ * tools own the strings.
27
+ *
28
+ * testID convention (unchanged from the originals): `${testID}-badge`,
29
+ * `${testID}-change`, `${testID}-slow`, `${testID}-status`,
30
+ * `${testID}-sublabel`, `${testID}-keys`.
31
+ */
32
+
33
+ function ChangeRow({
34
+ statusColor,
35
+ statusLabel,
36
+ sublabel,
37
+ primaryText,
38
+ timestamp,
39
+ badgeText,
40
+ changed = false,
41
+ slow = false,
42
+ badgePrefix,
43
+ customBadge,
44
+ plainBadgeText,
45
+ onPress,
46
+ testID,
47
+ accessibilityLabel
48
+ }) {
49
+ // Always a custom badge, even when there is no icon to hang off it. The
50
+ // alternative — letting CompactRow draw `badgeText` itself — leaves the one
51
+ // row whose badge matters most (a write that changed NOTHING) as the only
52
+ // row in the list with no handle on its badge.
53
+ const badge = customBadge ?? (badgeText !== undefined || badgePrefix || changed || slow ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
54
+ style: styles.badgeContainer,
55
+ children: [badgePrefix, badgeText !== undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
56
+ style: [styles.badgeText, {
57
+ color: statusColor
58
+ }],
59
+ testID: testID ? `${testID}-badge` : undefined,
60
+ children: badgeText
61
+ }) : null, slow ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
62
+ style: styles.iconBadge,
63
+ testID: testID ? `${testID}-slow` : undefined,
64
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Clock, {
65
+ size: 12,
66
+ color: _gameUIColors.buoyColors.error
67
+ })
68
+ }) : changed ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
69
+ style: styles.iconBadge,
70
+ testID: testID ? `${testID}-change` : undefined,
71
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Zap, {
72
+ size: 12,
73
+ color: _gameUIColors.buoyColors.warning
74
+ })
75
+ }) : null]
76
+ }) : undefined);
77
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CompactRow.CompactRow, {
78
+ statusDotColor: statusColor,
79
+ statusLabel: statusLabel,
80
+ statusSublabel: sublabel,
81
+ primaryText: primaryText,
82
+ bottomRightText: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RelativeTime.RelativeTime, {
83
+ timestamp: timestamp
84
+ }),
85
+ customBadge: badge,
86
+ badgeText: badge ? undefined : plainBadgeText,
87
+ badgeColor: statusColor,
88
+ showChevron: true,
89
+ onPress: onPress,
90
+ testID: testID,
91
+ statusTestID: testID ? `${testID}-status` : undefined,
92
+ statusSublabelTestID: testID ? `${testID}-sublabel` : undefined,
93
+ primaryTestID: testID ? `${testID}-keys` : undefined,
94
+ accessibilityLabel: accessibilityLabel
95
+ });
96
+ }
97
+ const styles = _reactNative.StyleSheet.create({
98
+ badgeContainer: {
99
+ flexDirection: "row",
100
+ alignItems: "center",
101
+ gap: 4
102
+ },
103
+ badgeText: {
104
+ fontSize: 11,
105
+ fontWeight: "600",
106
+ fontFamily: _fonts.monoFont
107
+ },
108
+ iconBadge: {
109
+ paddingHorizontal: 4
110
+ }
111
+ });