@buoy-gg/ask-buoy 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 (314) hide show
  1. package/README.md +13 -94
  2. package/lib/commonjs/blocks/AskBlocks.js +1 -338
  3. package/lib/commonjs/blocks/BlockRenderer.js +1 -262
  4. package/lib/commonjs/blocks/ChromePrototypes.js +1 -514
  5. package/lib/commonjs/blocks/DataBlocks.js +1 -781
  6. package/lib/commonjs/blocks/ExtraBlocks.js +1 -1860
  7. package/lib/commonjs/blocks/MediaBlocks.js +1 -156
  8. package/lib/commonjs/blocks/ReceiptBlocks.js +2 -586
  9. package/lib/commonjs/blocks/blockText.js +1 -60
  10. package/lib/commonjs/blocks/blockText.test.js +1 -53
  11. package/lib/commonjs/blocks/context.js +1 -42
  12. package/lib/commonjs/blocks/icons.js +1 -96
  13. package/lib/commonjs/blocks/index.js +1 -95
  14. package/lib/commonjs/blocks/listRow.test.js +1 -55
  15. package/lib/commonjs/blocks/pageState.js +1 -34
  16. package/lib/commonjs/blocks/pageState.test.js +1 -57
  17. package/lib/commonjs/blocks/primitives.js +1 -457
  18. package/lib/commonjs/blocks/primitivesIndex.js +1 -62
  19. package/lib/commonjs/blocks/ruleStates.js +1 -0
  20. package/lib/commonjs/components/ApprovalCard.js +1 -297
  21. package/lib/commonjs/components/AskBuoyHeader.js +1 -196
  22. package/lib/commonjs/components/AskBuoyIcon.js +1 -19
  23. package/lib/commonjs/components/AskBuoyModal.js +2 -478
  24. package/lib/commonjs/components/AskBuoySettings.js +1 -181
  25. package/lib/commonjs/components/ChangesBar.js +1 -211
  26. package/lib/commonjs/components/Composer.js +1 -255
  27. package/lib/commonjs/components/EmptyState.js +1 -161
  28. package/lib/commonjs/components/KeyboardPad.js +1 -80
  29. package/lib/commonjs/components/Markdown.js +1 -310
  30. package/lib/commonjs/components/MessageList.js +1 -970
  31. package/lib/commonjs/components/QueuedMessages.js +1 -145
  32. package/lib/commonjs/components/ThinkingStrip.js +1 -223
  33. package/lib/commonjs/components/TypingDots.js +1 -63
  34. package/lib/commonjs/components/markdownParse.js +1 -131
  35. package/lib/commonjs/components/markdownParse.test.js +1 -99
  36. package/lib/commonjs/components/useCopyAction.js +1 -50
  37. package/lib/commonjs/index.js +1 -252
  38. package/lib/commonjs/preset.js +1 -91
  39. package/lib/commonjs/store/activityGroups.js +1 -110
  40. package/lib/commonjs/store/activityGroups.test.js +1 -78
  41. package/lib/commonjs/store/askBuoySettings.js +1 -72
  42. package/lib/commonjs/store/askBuoyStore.js +2 -588
  43. package/lib/commonjs/store/blockPlacement.js +1 -64
  44. package/lib/commonjs/store/blockPlacement.test.js +1 -123
  45. package/lib/commonjs/store/queue.test.js +1 -150
  46. package/lib/commonjs/store/resetConversation.js +1 -77
  47. package/lib/commonjs/store/restorePending.test.js +1 -63
  48. package/lib/commonjs/store/restoredIds.test.js +1 -47
  49. package/lib/commonjs/store/suggestions.js +1 -54
  50. package/lib/commonjs/store/suggestions.test.js +1 -58
  51. package/lib/commonjs/store/systemLine.test.js +1 -77
  52. package/lib/commonjs/store/ticketPrompt.js +1 -17
  53. package/lib/commonjs/store/traceText.js +1 -81
  54. package/lib/commonjs/store/traceText.test.js +1 -112
  55. package/lib/commonjs/store/transcriptPersistence.js +1 -297
  56. package/lib/commonjs/store/transcriptPersistence.test.js +1 -333
  57. package/lib/commonjs/store/turnRendering.test.js +1 -151
  58. package/lib/commonjs/store/useAskBuoy.js +1 -651
  59. package/lib/commonjs/store/useAskBuoySettings.js +1 -14
  60. package/lib/commonjs/sync/askBuoySyncAdapter.js +1 -153
  61. package/lib/commonjs/sync/askBuoySyncAdapter.test.js +1 -141
  62. package/lib/commonjs/sync/wire.js +1 -58
  63. package/lib/commonjs/types.js +1 -6
  64. package/lib/module/blocks/AskBlocks.js +1 -331
  65. package/lib/module/blocks/BlockRenderer.js +1 -257
  66. package/lib/module/blocks/ChromePrototypes.js +1 -503
  67. package/lib/module/blocks/DataBlocks.js +1 -767
  68. package/lib/module/blocks/ExtraBlocks.js +1 -1833
  69. package/lib/module/blocks/MediaBlocks.js +1 -151
  70. package/lib/module/blocks/ReceiptBlocks.js +2 -574
  71. package/lib/module/blocks/blockText.js +1 -55
  72. package/lib/module/blocks/blockText.test.js +1 -53
  73. package/lib/module/blocks/context.js +1 -35
  74. package/lib/module/blocks/icons.js +1 -91
  75. package/lib/module/blocks/index.js +1 -8
  76. package/lib/module/blocks/listRow.test.js +1 -56
  77. package/lib/module/blocks/pageState.js +1 -30
  78. package/lib/module/blocks/pageState.test.js +1 -56
  79. package/lib/module/blocks/primitives.js +1 -445
  80. package/lib/module/blocks/primitivesIndex.js +1 -5
  81. package/lib/module/blocks/ruleStates.js +1 -0
  82. package/lib/module/components/ApprovalCard.js +1 -292
  83. package/lib/module/components/AskBuoyHeader.js +1 -193
  84. package/lib/module/components/AskBuoyIcon.js +1 -8
  85. package/lib/module/components/AskBuoyModal.js +2 -473
  86. package/lib/module/components/AskBuoySettings.js +1 -176
  87. package/lib/module/components/ChangesBar.js +1 -206
  88. package/lib/module/components/Composer.js +1 -250
  89. package/lib/module/components/EmptyState.js +1 -156
  90. package/lib/module/components/KeyboardPad.js +1 -75
  91. package/lib/module/components/Markdown.js +1 -305
  92. package/lib/module/components/MessageList.js +1 -964
  93. package/lib/module/components/QueuedMessages.js +1 -140
  94. package/lib/module/components/ThinkingStrip.js +1 -218
  95. package/lib/module/components/TypingDots.js +1 -58
  96. package/lib/module/components/markdownParse.js +1 -125
  97. package/lib/module/components/markdownParse.test.js +1 -98
  98. package/lib/module/components/useCopyAction.js +1 -46
  99. package/lib/module/index.js +1 -34
  100. package/lib/module/preset.js +1 -74
  101. package/lib/module/store/activityGroups.js +1 -103
  102. package/lib/module/store/activityGroups.test.js +1 -77
  103. package/lib/module/store/askBuoySettings.js +1 -67
  104. package/lib/module/store/askBuoyStore.js +2 -582
  105. package/lib/module/store/blockPlacement.js +1 -59
  106. package/lib/module/store/blockPlacement.test.js +1 -122
  107. package/lib/module/store/queue.test.js +1 -149
  108. package/lib/module/store/resetConversation.js +1 -72
  109. package/lib/module/store/restorePending.test.js +1 -62
  110. package/lib/module/store/restoredIds.test.js +1 -46
  111. package/lib/module/store/suggestions.js +1 -49
  112. package/lib/module/store/suggestions.test.js +1 -57
  113. package/lib/module/store/systemLine.test.js +1 -76
  114. package/lib/module/store/ticketPrompt.js +1 -13
  115. package/lib/module/store/traceText.js +1 -75
  116. package/lib/module/store/traceText.test.js +1 -111
  117. package/lib/module/store/transcriptPersistence.js +1 -287
  118. package/lib/module/store/transcriptPersistence.test.js +1 -332
  119. package/lib/module/store/turnRendering.test.js +1 -150
  120. package/lib/module/store/useAskBuoy.js +1 -646
  121. package/lib/module/store/useAskBuoySettings.js +1 -9
  122. package/lib/module/sync/askBuoySyncAdapter.js +1 -148
  123. package/lib/module/sync/askBuoySyncAdapter.test.js +1 -140
  124. package/lib/module/sync/wire.js +1 -47
  125. package/lib/module/types.js +1 -4
  126. package/lib/typescript/blocks/context.d.ts +3 -0
  127. package/lib/typescript/blocks/ruleStates.d.ts +15 -0
  128. package/lib/typescript/components/ChangesBar.d.ts +2 -1
  129. package/lib/typescript/sync/askBuoySyncAdapter.d.ts +2 -2
  130. package/lib/web/index.mjs +15 -0
  131. package/package.json +44 -11
  132. package/lib/commonjs/blocks/AskBlocks.js.map +0 -1
  133. package/lib/commonjs/blocks/BlockRenderer.js.map +0 -1
  134. package/lib/commonjs/blocks/ChromePrototypes.js.map +0 -1
  135. package/lib/commonjs/blocks/DataBlocks.js.map +0 -1
  136. package/lib/commonjs/blocks/ExtraBlocks.js.map +0 -1
  137. package/lib/commonjs/blocks/MediaBlocks.js.map +0 -1
  138. package/lib/commonjs/blocks/ReceiptBlocks.js.map +0 -1
  139. package/lib/commonjs/blocks/blockText.js.map +0 -1
  140. package/lib/commonjs/blocks/blockText.test.js.map +0 -1
  141. package/lib/commonjs/blocks/context.js.map +0 -1
  142. package/lib/commonjs/blocks/icons.js.map +0 -1
  143. package/lib/commonjs/blocks/index.js.map +0 -1
  144. package/lib/commonjs/blocks/listRow.test.js.map +0 -1
  145. package/lib/commonjs/blocks/pageState.js.map +0 -1
  146. package/lib/commonjs/blocks/pageState.test.js.map +0 -1
  147. package/lib/commonjs/blocks/primitives.js.map +0 -1
  148. package/lib/commonjs/blocks/primitivesIndex.js.map +0 -1
  149. package/lib/commonjs/components/ApprovalCard.js.map +0 -1
  150. package/lib/commonjs/components/AskBuoyHeader.js.map +0 -1
  151. package/lib/commonjs/components/AskBuoyIcon.js.map +0 -1
  152. package/lib/commonjs/components/AskBuoyModal.js.map +0 -1
  153. package/lib/commonjs/components/AskBuoySettings.js.map +0 -1
  154. package/lib/commonjs/components/ChangesBar.js.map +0 -1
  155. package/lib/commonjs/components/Composer.js.map +0 -1
  156. package/lib/commonjs/components/EmptyState.js.map +0 -1
  157. package/lib/commonjs/components/KeyboardPad.js.map +0 -1
  158. package/lib/commonjs/components/Markdown.js.map +0 -1
  159. package/lib/commonjs/components/MessageList.js.map +0 -1
  160. package/lib/commonjs/components/QueuedMessages.js.map +0 -1
  161. package/lib/commonjs/components/ThinkingStrip.js.map +0 -1
  162. package/lib/commonjs/components/TypingDots.js.map +0 -1
  163. package/lib/commonjs/components/markdownParse.js.map +0 -1
  164. package/lib/commonjs/components/markdownParse.test.js.map +0 -1
  165. package/lib/commonjs/components/useCopyAction.js.map +0 -1
  166. package/lib/commonjs/index.js.map +0 -1
  167. package/lib/commonjs/preset.js.map +0 -1
  168. package/lib/commonjs/store/activityGroups.js.map +0 -1
  169. package/lib/commonjs/store/activityGroups.test.js.map +0 -1
  170. package/lib/commonjs/store/askBuoySettings.js.map +0 -1
  171. package/lib/commonjs/store/askBuoyStore.js.map +0 -1
  172. package/lib/commonjs/store/blockPlacement.js.map +0 -1
  173. package/lib/commonjs/store/blockPlacement.test.js.map +0 -1
  174. package/lib/commonjs/store/queue.test.js.map +0 -1
  175. package/lib/commonjs/store/resetConversation.js.map +0 -1
  176. package/lib/commonjs/store/restorePending.test.js.map +0 -1
  177. package/lib/commonjs/store/restoredIds.test.js.map +0 -1
  178. package/lib/commonjs/store/suggestions.js.map +0 -1
  179. package/lib/commonjs/store/suggestions.test.js.map +0 -1
  180. package/lib/commonjs/store/systemLine.test.js.map +0 -1
  181. package/lib/commonjs/store/ticketPrompt.js.map +0 -1
  182. package/lib/commonjs/store/traceText.js.map +0 -1
  183. package/lib/commonjs/store/traceText.test.js.map +0 -1
  184. package/lib/commonjs/store/transcriptPersistence.js.map +0 -1
  185. package/lib/commonjs/store/transcriptPersistence.test.js.map +0 -1
  186. package/lib/commonjs/store/turnRendering.test.js.map +0 -1
  187. package/lib/commonjs/store/useAskBuoy.js.map +0 -1
  188. package/lib/commonjs/store/useAskBuoySettings.js.map +0 -1
  189. package/lib/commonjs/sync/askBuoySyncAdapter.js.map +0 -1
  190. package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +0 -1
  191. package/lib/commonjs/sync/wire.js.map +0 -1
  192. package/lib/commonjs/types.js.map +0 -1
  193. package/lib/module/blocks/AskBlocks.js.map +0 -1
  194. package/lib/module/blocks/BlockRenderer.js.map +0 -1
  195. package/lib/module/blocks/ChromePrototypes.js.map +0 -1
  196. package/lib/module/blocks/DataBlocks.js.map +0 -1
  197. package/lib/module/blocks/ExtraBlocks.js.map +0 -1
  198. package/lib/module/blocks/MediaBlocks.js.map +0 -1
  199. package/lib/module/blocks/ReceiptBlocks.js.map +0 -1
  200. package/lib/module/blocks/blockText.js.map +0 -1
  201. package/lib/module/blocks/blockText.test.js.map +0 -1
  202. package/lib/module/blocks/context.js.map +0 -1
  203. package/lib/module/blocks/icons.js.map +0 -1
  204. package/lib/module/blocks/index.js.map +0 -1
  205. package/lib/module/blocks/listRow.test.js.map +0 -1
  206. package/lib/module/blocks/pageState.js.map +0 -1
  207. package/lib/module/blocks/pageState.test.js.map +0 -1
  208. package/lib/module/blocks/primitives.js.map +0 -1
  209. package/lib/module/blocks/primitivesIndex.js.map +0 -1
  210. package/lib/module/components/ApprovalCard.js.map +0 -1
  211. package/lib/module/components/AskBuoyHeader.js.map +0 -1
  212. package/lib/module/components/AskBuoyIcon.js.map +0 -1
  213. package/lib/module/components/AskBuoyModal.js.map +0 -1
  214. package/lib/module/components/AskBuoySettings.js.map +0 -1
  215. package/lib/module/components/ChangesBar.js.map +0 -1
  216. package/lib/module/components/Composer.js.map +0 -1
  217. package/lib/module/components/EmptyState.js.map +0 -1
  218. package/lib/module/components/KeyboardPad.js.map +0 -1
  219. package/lib/module/components/Markdown.js.map +0 -1
  220. package/lib/module/components/MessageList.js.map +0 -1
  221. package/lib/module/components/QueuedMessages.js.map +0 -1
  222. package/lib/module/components/ThinkingStrip.js.map +0 -1
  223. package/lib/module/components/TypingDots.js.map +0 -1
  224. package/lib/module/components/markdownParse.js.map +0 -1
  225. package/lib/module/components/markdownParse.test.js.map +0 -1
  226. package/lib/module/components/useCopyAction.js.map +0 -1
  227. package/lib/module/index.js.map +0 -1
  228. package/lib/module/preset.js.map +0 -1
  229. package/lib/module/store/activityGroups.js.map +0 -1
  230. package/lib/module/store/activityGroups.test.js.map +0 -1
  231. package/lib/module/store/askBuoySettings.js.map +0 -1
  232. package/lib/module/store/askBuoyStore.js.map +0 -1
  233. package/lib/module/store/blockPlacement.js.map +0 -1
  234. package/lib/module/store/blockPlacement.test.js.map +0 -1
  235. package/lib/module/store/queue.test.js.map +0 -1
  236. package/lib/module/store/resetConversation.js.map +0 -1
  237. package/lib/module/store/restorePending.test.js.map +0 -1
  238. package/lib/module/store/restoredIds.test.js.map +0 -1
  239. package/lib/module/store/suggestions.js.map +0 -1
  240. package/lib/module/store/suggestions.test.js.map +0 -1
  241. package/lib/module/store/systemLine.test.js.map +0 -1
  242. package/lib/module/store/ticketPrompt.js.map +0 -1
  243. package/lib/module/store/traceText.js.map +0 -1
  244. package/lib/module/store/traceText.test.js.map +0 -1
  245. package/lib/module/store/transcriptPersistence.js.map +0 -1
  246. package/lib/module/store/transcriptPersistence.test.js.map +0 -1
  247. package/lib/module/store/turnRendering.test.js.map +0 -1
  248. package/lib/module/store/useAskBuoy.js.map +0 -1
  249. package/lib/module/store/useAskBuoySettings.js.map +0 -1
  250. package/lib/module/sync/askBuoySyncAdapter.js.map +0 -1
  251. package/lib/module/sync/askBuoySyncAdapter.test.js.map +0 -1
  252. package/lib/module/sync/wire.js.map +0 -1
  253. package/lib/module/types.js.map +0 -1
  254. package/lib/typescript/blocks/AskBlocks.d.ts.map +0 -1
  255. package/lib/typescript/blocks/BlockRenderer.d.ts.map +0 -1
  256. package/lib/typescript/blocks/ChromePrototypes.d.ts.map +0 -1
  257. package/lib/typescript/blocks/DataBlocks.d.ts.map +0 -1
  258. package/lib/typescript/blocks/ExtraBlocks.d.ts.map +0 -1
  259. package/lib/typescript/blocks/MediaBlocks.d.ts.map +0 -1
  260. package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +0 -1
  261. package/lib/typescript/blocks/blockText.d.ts.map +0 -1
  262. package/lib/typescript/blocks/blockText.test.d.ts.map +0 -1
  263. package/lib/typescript/blocks/context.d.ts.map +0 -1
  264. package/lib/typescript/blocks/icons.d.ts.map +0 -1
  265. package/lib/typescript/blocks/index.d.ts.map +0 -1
  266. package/lib/typescript/blocks/listRow.test.d.ts.map +0 -1
  267. package/lib/typescript/blocks/pageState.d.ts.map +0 -1
  268. package/lib/typescript/blocks/pageState.test.d.ts.map +0 -1
  269. package/lib/typescript/blocks/primitives.d.ts.map +0 -1
  270. package/lib/typescript/blocks/primitivesIndex.d.ts.map +0 -1
  271. package/lib/typescript/components/ApprovalCard.d.ts.map +0 -1
  272. package/lib/typescript/components/AskBuoyHeader.d.ts.map +0 -1
  273. package/lib/typescript/components/AskBuoyIcon.d.ts.map +0 -1
  274. package/lib/typescript/components/AskBuoyModal.d.ts.map +0 -1
  275. package/lib/typescript/components/AskBuoySettings.d.ts.map +0 -1
  276. package/lib/typescript/components/ChangesBar.d.ts.map +0 -1
  277. package/lib/typescript/components/Composer.d.ts.map +0 -1
  278. package/lib/typescript/components/EmptyState.d.ts.map +0 -1
  279. package/lib/typescript/components/KeyboardPad.d.ts.map +0 -1
  280. package/lib/typescript/components/Markdown.d.ts.map +0 -1
  281. package/lib/typescript/components/MessageList.d.ts.map +0 -1
  282. package/lib/typescript/components/QueuedMessages.d.ts.map +0 -1
  283. package/lib/typescript/components/ThinkingStrip.d.ts.map +0 -1
  284. package/lib/typescript/components/TypingDots.d.ts.map +0 -1
  285. package/lib/typescript/components/markdownParse.d.ts.map +0 -1
  286. package/lib/typescript/components/markdownParse.test.d.ts.map +0 -1
  287. package/lib/typescript/components/useCopyAction.d.ts.map +0 -1
  288. package/lib/typescript/index.d.ts.map +0 -1
  289. package/lib/typescript/preset.d.ts.map +0 -1
  290. package/lib/typescript/store/activityGroups.d.ts.map +0 -1
  291. package/lib/typescript/store/activityGroups.test.d.ts.map +0 -1
  292. package/lib/typescript/store/askBuoySettings.d.ts.map +0 -1
  293. package/lib/typescript/store/askBuoyStore.d.ts.map +0 -1
  294. package/lib/typescript/store/blockPlacement.d.ts.map +0 -1
  295. package/lib/typescript/store/blockPlacement.test.d.ts.map +0 -1
  296. package/lib/typescript/store/queue.test.d.ts.map +0 -1
  297. package/lib/typescript/store/resetConversation.d.ts.map +0 -1
  298. package/lib/typescript/store/restorePending.test.d.ts.map +0 -1
  299. package/lib/typescript/store/restoredIds.test.d.ts.map +0 -1
  300. package/lib/typescript/store/suggestions.d.ts.map +0 -1
  301. package/lib/typescript/store/suggestions.test.d.ts.map +0 -1
  302. package/lib/typescript/store/systemLine.test.d.ts.map +0 -1
  303. package/lib/typescript/store/ticketPrompt.d.ts.map +0 -1
  304. package/lib/typescript/store/traceText.d.ts.map +0 -1
  305. package/lib/typescript/store/traceText.test.d.ts.map +0 -1
  306. package/lib/typescript/store/transcriptPersistence.d.ts.map +0 -1
  307. package/lib/typescript/store/transcriptPersistence.test.d.ts.map +0 -1
  308. package/lib/typescript/store/turnRendering.test.d.ts.map +0 -1
  309. package/lib/typescript/store/useAskBuoy.d.ts.map +0 -1
  310. package/lib/typescript/store/useAskBuoySettings.d.ts.map +0 -1
  311. package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +0 -1
  312. package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +0 -1
  313. package/lib/typescript/sync/wire.d.ts.map +0 -1
  314. package/lib/typescript/types.d.ts.map +0 -1
@@ -1,781 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Chart = Chart;
7
- exports.Code = Code;
8
- exports.Diff = Diff;
9
- exports.Finding = Finding;
10
- exports.KeyValue = KeyValue;
11
- exports.List = List;
12
- exports.Notice = Notice;
13
- exports.Steps = Steps;
14
- exports.Table = Table;
15
- exports.listRowBehaviour = listRowBehaviour;
16
- var _react = require("react");
17
- var _reactNative = require("react-native");
18
- var _sharedUi = require("@buoy-gg/shared-ui");
19
- var _dataViewer = require("@buoy-gg/shared-ui/dataViewer");
20
- var _agentCore = require("@buoy-gg/agent-core");
21
- var _primitivesIndex = require("./primitivesIndex");
22
- var _Markdown = require("../components/Markdown");
23
- var _useCopyAction = require("../components/useCopyAction");
24
- var _blockText = require("./blockText");
25
- var _icons = require("./icons");
26
- var _jsxRuntime = require("react/jsx-runtime");
27
- /**
28
- * Show blocks — data the user should see rather than read.
29
- * Every one honours a cap and says "+N more" rather than growing the page.
30
- */
31
-
32
- function fmt(v) {
33
- if (v === undefined) return "—";
34
- if (v === null) return "null";
35
- if (typeof v === "string") return v;
36
- if (typeof v === "number" || typeof v === "boolean") return String(v);
37
- try {
38
- const s = JSON.stringify(v);
39
- return s.length > 120 ? `${s.slice(0, 117)}…` : s;
40
- } catch {
41
- return String(v);
42
- }
43
- }
44
- function Table({
45
- block
46
- }) {
47
- const paged = (0, _primitivesIndex.usePaged)(block.rows, _agentCore.CAPS.tableRows);
48
- const {
49
- visible
50
- } = paged;
51
- const cols = block.columns.slice(0, 4);
52
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitivesIndex.Card, {
53
- title: block.title,
54
- source: block.source,
55
- testID: `buoy-block-table-${block.id}`,
56
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
57
- style: styles.tableHead,
58
- children: cols.map((c, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
59
- style: [styles.th, i === 0 && styles.firstCol],
60
- numberOfLines: 1,
61
- children: c
62
- }, c))
63
- }), visible.map((row, r) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
64
- style: [styles.tr, r > 0 && _primitivesIndex.blockStyles.rowDivider],
65
- children: cols.map((_, i) => {
66
- const cell = row[i];
67
- const text = typeof cell === "string" ? cell : cell?.text ?? "";
68
- const tone = typeof cell === "string" ? undefined : cell?.tone;
69
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
70
- style: [styles.td, i === 0 && styles.firstCol, i === 0 && styles.tdFirst, tone && {
71
- color: (0, _primitivesIndex.toneColor)(tone)
72
- }],
73
- numberOfLines: 2,
74
- children: (0, _Markdown.renderInline)(text, styles.td)
75
- }, i);
76
- })
77
- }, r)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.More, {
78
- paged: paged
79
- })]
80
- });
81
- }
82
- function KeyValue({
83
- block
84
- }) {
85
- const paged = (0, _primitivesIndex.usePaged)(block.pairs, _agentCore.CAPS.keyValuePairs);
86
- const {
87
- visible
88
- } = paged;
89
- const [open, setOpen] = (0, _react.useState)(null);
90
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitivesIndex.Card, {
91
- title: block.title,
92
- source: block.source,
93
- testID: `buoy-block-keyvalue-${block.id}`,
94
- children: [visible.map((p, i) => {
95
- const long = typeof p.value === "object" && p.value !== null;
96
- const isOpen = open === p.key;
97
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
98
- onPress: long ? () => setOpen(isOpen ? null : p.key) : undefined,
99
- style: [styles.kvRow, i > 0 && _primitivesIndex.blockStyles.rowDivider],
100
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
101
- style: styles.kvKey,
102
- numberOfLines: 1,
103
- children: p.key
104
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
105
- style: [styles.kvValue, isOpen && _primitivesIndex.blockStyles.mono],
106
- numberOfLines: isOpen ? undefined : 2,
107
- selectable: true,
108
- children: isOpen ? JSON.stringify(p.value, null, 2) : fmt(p.value)
109
- })]
110
- }, p.key);
111
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.More, {
112
- paged: paged
113
- })]
114
- });
115
- }
116
-
117
- /**
118
- * Keys carry the index as well as the id.
119
- *
120
- * The ids in here come from the app's own data, and app data is not required
121
- * to be unique — a Poké Mart bag in this repo holds two lines sharing one
122
- * `lineId`, which is a bug in that app but must not be one in a devtool
123
- * rendering it. Paging made it visible: the duplicate sat past the initial cap,
124
- * so React only saw the collision on the first "Show more".
125
- */
126
- /**
127
- * What a tapped list row does.
128
- *
129
- * A row can carry a picture and an action, and they want the same gesture. The
130
- * picture wins the row body — looking at a thing must not fire it — and the
131
- * action keeps its label as its own control. A row with no picture is
132
- * unchanged: the whole row runs the action, which is what it did before rows
133
- * could open.
134
- */
135
- function listRowBehaviour(item) {
136
- const canExpand = Boolean(item.image);
137
- return {
138
- canExpand,
139
- rowRunsAction: Boolean(item.action) && !canExpand,
140
- actionIsOwnControl: Boolean(item.action) && canExpand
141
- };
142
- }
143
- function List({
144
- block
145
- }) {
146
- const h = (0, _primitivesIndex.useBlockHandlers)();
147
- const paged = (0, _primitivesIndex.usePaged)(block.items, _agentCore.CAPS.listItems);
148
- const {
149
- visible
150
- } = paged;
151
- // One row open at a time, keyed the same way the row is — the list can hold
152
- // duplicate ids (see the note above), so the index is part of the key.
153
- const [open, setOpen] = (0, _react.useState)(null);
154
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitivesIndex.Card, {
155
- title: block.title,
156
- source: block.source,
157
- testID: `buoy-block-list-${block.id}`,
158
- children: [visible.map((it, i) => {
159
- const key = `${it.id ?? it.title}-${i}`;
160
- const expanded = open === key;
161
- // A row with a picture opens it; a row without one keeps the old
162
- // behaviour, where the whole row runs its action. When an item has
163
- // BOTH, the body toggles the image and the action label becomes its
164
- // own control — otherwise the two gestures would sit on one target and
165
- // looking at a thing would fire it.
166
- const {
167
- canExpand,
168
- rowRunsAction,
169
- actionIsOwnControl
170
- } = listRowBehaviour(it);
171
- const Row = canExpand || rowRunsAction ? _reactNative.Pressable : _reactNative.View;
172
- const rowProps = canExpand ? {
173
- onPress: () => setOpen(expanded ? null : key),
174
- accessibilityRole: "button",
175
- accessibilityState: {
176
- expanded
177
- },
178
- accessibilityLabel: `${it.title}, ${expanded ? "hide" : "show"} picture`,
179
- testID: `buoy-block-list-row-${key}`
180
- } : rowRunsAction ? {
181
- onPress: () => void h.runAction(it.action, block.id),
182
- accessibilityRole: "button"
183
- } : {};
184
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
185
- style: i > 0 ? _primitivesIndex.blockStyles.rowDivider : undefined,
186
- children: [expanded && it.image ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
187
- onPress: () => setOpen(null),
188
- accessibilityRole: "button",
189
- accessibilityLabel: `Hide ${it.title}`,
190
- testID: `buoy-block-list-hero-${key}`,
191
- style: styles.listHero,
192
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
193
- source: {
194
- uri: it.image
195
- },
196
- style: styles.listHeroImage,
197
- resizeMode: "contain",
198
- accessibilityLabel: it.title
199
- })
200
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(Row, {
201
- ...rowProps,
202
- style: _primitivesIndex.blockStyles.row,
203
- children: [it.image && !expanded ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
204
- source: {
205
- uri: it.image
206
- },
207
- style: styles.thumb,
208
- resizeMode: "contain",
209
- accessibilityLabel: it.title
210
- }) : it.icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.BlockIcon, {
211
- name: it.icon
212
- }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
213
- style: styles.flex,
214
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
215
- style: [_primitivesIndex.blockStyles.rowTitle, it.tone && {
216
- color: (0, _primitivesIndex.toneColor)(it.tone)
217
- }],
218
- numberOfLines: expanded ? undefined : 2,
219
- children: (0, _Markdown.renderInline)(it.title, _primitivesIndex.blockStyles.rowTitle)
220
- }), it.subtitle ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
221
- style: _primitivesIndex.blockStyles.rowSub,
222
- numberOfLines: expanded ? undefined : 2,
223
- children: (0, _Markdown.renderInline)(it.subtitle, _primitivesIndex.blockStyles.rowSub)
224
- }) : null]
225
- }), it.trailing ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
226
- style: [_primitivesIndex.blockStyles.rowTrailing, it.tone && {
227
- color: (0, _primitivesIndex.toneColor)(it.tone)
228
- }],
229
- numberOfLines: 1,
230
- children: it.trailing
231
- }) : null, it.action ? actionIsOwnControl ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
232
- onPress: () => void h.runAction(it.action, block.id),
233
- accessibilityRole: "button",
234
- accessibilityLabel: it.action.label,
235
- hitSlop: 8,
236
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
237
- style: styles.rowAction,
238
- children: it.action.label
239
- })
240
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
241
- style: styles.rowAction,
242
- children: it.action.label
243
- }) : null]
244
- })]
245
- }, key);
246
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.More, {
247
- paged: paged
248
- })]
249
- });
250
- }
251
-
252
- /** An object or an array — something the tree viewer can drill into. */
253
- function isStructured(v) {
254
- return v !== null && typeof v === "object";
255
- }
256
-
257
- /**
258
- * The line that stands in for a folded diff: how many fields, and which.
259
- * Names beat a bare count — "1 field · lines" tells you whether to open it.
260
- */
261
- function diffSummary(changes) {
262
- const names = changes.map(c => c.path);
263
- const shown = names.slice(0, 3).join(", ");
264
- const rest = names.length - 3;
265
- const noun = names.length === 1 ? "1 field" : `${names.length} fields`;
266
- return `${noun} · ${shown}${rest > 0 ? `, +${rest}` : ""}`;
267
- }
268
-
269
- /**
270
- * What a write changed. Folded by default (see `Card`), and drilled into
271
- * rather than dumped.
272
- *
273
- * A changed field is rendered by the same tree diff viewer the Zustand and
274
- * Storage tools use, with unchanged branches hidden — so editing one line of a
275
- * bag shows `qty 4 => 14` and not both copies of a fifty-key array serialised
276
- * to JSON, which is what the reader was given before and could not read. Only
277
- * a scalar keeps the plain −/+ pair: a tree of one root node says less than
278
- * the two values side by side.
279
- */
280
- function Diff({
281
- block
282
- }) {
283
- const paged = (0, _primitivesIndex.usePaged)(block.changes, _agentCore.CAPS.keyValuePairs);
284
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitivesIndex.Card, {
285
- title: block.title ?? "What changed",
286
- source: block.source,
287
- testID: `buoy-block-diff-${block.id}`,
288
- collapsible: true,
289
- summary: diffSummary(block.changes),
290
- children: [paged.visible.map((c, i) => {
291
- const added = c.before === undefined && c.after !== undefined;
292
- const removed = c.after === undefined && c.before !== undefined;
293
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
294
- style: [styles.diffRow, i > 0 && _primitivesIndex.blockStyles.rowDivider],
295
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
296
- style: styles.diffPath,
297
- numberOfLines: 1,
298
- children: c.path
299
- }), isStructured(c.before) || isStructured(c.after) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
300
- style: styles.diffTree,
301
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.TreeDiffViewer, {
302
- oldValue: c.before,
303
- newValue: c.after,
304
- showUnchanged: false,
305
- scrollEnabled: false
306
- })
307
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
308
- children: [!added ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
309
- style: styles.diffLine,
310
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
311
- style: [styles.diffMark, {
312
- color: _sharedUi.night.color.danger
313
- }],
314
- children: "\u2212"
315
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
316
- style: [styles.diffValue, {
317
- color: _sharedUi.night.color.danger
318
- }],
319
- numberOfLines: 3,
320
- selectable: true,
321
- children: fmt(c.before)
322
- })]
323
- }) : null, !removed ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
324
- style: styles.diffLine,
325
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
326
- style: [styles.diffMark, {
327
- color: _sharedUi.night.color.accent
328
- }],
329
- children: "+"
330
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
331
- style: [styles.diffValue, {
332
- color: _sharedUi.night.color.accent
333
- }],
334
- numberOfLines: 3,
335
- selectable: true,
336
- children: fmt(c.after)
337
- })]
338
- }) : null]
339
- })]
340
- }, `${c.path}-${i}`);
341
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.More, {
342
- paged: paged
343
- })]
344
- });
345
- }
346
- function Chart({
347
- block
348
- }) {
349
- const bars = block.bars.slice(0, _agentCore.CAPS.chartBars);
350
- const max = block.max ?? Math.max(1, ...bars.map(x => x.value));
351
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.Card, {
352
- title: block.title,
353
- source: block.source,
354
- testID: `buoy-block-chart-${block.id}`,
355
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
356
- style: styles.chart,
357
- children: bars.map((x, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
358
- style: styles.barRow,
359
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
360
- style: styles.barLabel,
361
- numberOfLines: 1,
362
- children: x.label
363
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
364
- style: styles.barTrack,
365
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
366
- style: [styles.bar, {
367
- width: `${Math.max(2, Math.round(x.value / max * 100))}%`,
368
- backgroundColor: (0, _primitivesIndex.toneColor)(x.tone ?? "accent")
369
- }]
370
- })
371
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
372
- style: styles.barValue,
373
- numberOfLines: 1,
374
- children: [x.value, x.unit ? ` ${x.unit}` : ""]
375
- })]
376
- }, `${x.label}-${i}`))
377
- })
378
- });
379
- }
380
- function Steps({
381
- block
382
- }) {
383
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.Card, {
384
- title: block.title,
385
- testID: `buoy-block-steps-${block.id}`,
386
- children: block.steps.map((s, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
387
- style: [styles.step, i > 0 && _primitivesIndex.blockStyles.rowDivider],
388
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
389
- style: [styles.stepMark, s.state === "done" && styles.stepDone, s.state === "failed" && styles.stepFailed],
390
- children: s.state === "done" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Check, {
391
- size: 10,
392
- color: _sharedUi.night.color.onAccent
393
- }) : s.state === "failed" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.X, {
394
- size: 10,
395
- color: _sharedUi.night.color.text
396
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
397
- style: styles.stepNum,
398
- children: i + 1
399
- })
400
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
401
- style: [_primitivesIndex.blockStyles.rowTitle, s.state === "done" && styles.stepTextDone],
402
- children: s.text
403
- })]
404
- }, i))
405
- });
406
- }
407
-
408
- /**
409
- * Parsed JSON, or `undefined` when the payload is not JSON at all.
410
- *
411
- * A bare string, number or boolean parses fine and is deliberately rejected:
412
- * `"hello"` is valid JSON and a tree of one leaf is a worse way to read it
413
- * than the line itself.
414
- */
415
- function parseJson(text) {
416
- try {
417
- const value = JSON.parse(text);
418
- return value !== null && typeof value === "object" ? value : undefined;
419
- } catch {
420
- return undefined;
421
- }
422
- }
423
-
424
- /**
425
- * A JSON payload, in the same explorer Storage and Network use.
426
- *
427
- * Worth the weight over a pretty-printed string: it collapses, it types its
428
- * values, and the thing you are usually hunting — one wrong field deep in a
429
- * response body — is findable instead of buried in forty lines of monospace.
430
- * The explorer's own lists run `scrollEnabled={false}` and grow to their
431
- * content, so nothing nests a scroller inside the transcript.
432
- */
433
- function JsonCode({
434
- block,
435
- value
436
- }) {
437
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.Card, {
438
- title: block.title,
439
- testID: `buoy-block-code-${block.id}`,
440
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
441
- style: styles.viewer,
442
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_dataViewer.DataViewer, {
443
- title: block.title ?? "Payload",
444
- data: value,
445
- initialExpanded: true,
446
- showTypeFilter: false,
447
- testIDPrefix: `buoy-block-code-${block.id}`
448
- })
449
- })
450
- });
451
- }
452
-
453
- /** Anything that is not a JSON object: a log line, a stack, a snippet. */
454
- function TextCode({
455
- block
456
- }) {
457
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.Card, {
458
- title: block.title,
459
- testID: `buoy-block-code-${block.id}`,
460
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
461
- style: [_primitivesIndex.blockStyles.mono, styles.code],
462
- selectable: true,
463
- children: block.text
464
- })
465
- });
466
- }
467
-
468
- /**
469
- * Router, per rule4: two specialised components rather than one that changes
470
- * shape. A `cond ? <A/> : <B/>` inside a single component is the Fabric
471
- * view-index hazard, and these two subtrees have nothing in common.
472
- */
473
- function Code({
474
- block
475
- }) {
476
- const value = parseJson(block.text);
477
- if (value === undefined) return /*#__PURE__*/(0, _jsxRuntime.jsx)(TextCode, {
478
- block: block
479
- });
480
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(JsonCode, {
481
- block: block,
482
- value: value
483
- });
484
- }
485
- function Notice({
486
- block
487
- }) {
488
- const color = block.tone === "danger" ? _sharedUi.night.color.danger : block.tone === "warning" ? _sharedUi.night.color.warning : _sharedUi.night.color.info;
489
- const Icon = block.tone === "info" ? _sharedUi.Info : _sharedUi.AlertTriangle;
490
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitivesIndex.Card, {
491
- tone: block.tone,
492
- testID: `buoy-block-notice-${block.id}`,
493
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
494
- style: styles.noticeRow,
495
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
496
- size: 14,
497
- color: color
498
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
499
- style: styles.noticeText,
500
- children: block.text
501
- })]
502
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.ActionRow, {
503
- actions: block.actions,
504
- blockId: block.id
505
- })]
506
- });
507
- }
508
- function Finding({
509
- block
510
- }) {
511
- // A finding exists to leave the phone. Its own Copy, with the title and
512
- // every evidence row — the conversation-wide Copy includes it too, but a
513
- // ticket wants just this.
514
- const {
515
- copied,
516
- copy
517
- } = (0, _useCopyAction.useCopyAction)(() => (0, _blockText.blockToText)(block) ?? block.title);
518
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitivesIndex.Card, {
519
- title: block.title,
520
- source: block.source,
521
- testID: `buoy-block-finding-${block.id}`,
522
- tone: "warning",
523
- children: [block.evidence.map((e, i) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
524
- style: [styles.kvRow, i > 0 && _primitivesIndex.blockStyles.rowDivider],
525
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
526
- style: styles.kvKey,
527
- numberOfLines: 1,
528
- children: e.label
529
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
530
- style: [styles.kvValue, e.tone && {
531
- color: (0, _primitivesIndex.toneColor)(e.tone)
532
- }],
533
- selectable: true,
534
- children: e.value
535
- })]
536
- }, `${e.label}-${i}`)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
537
- style: styles.findingFoot,
538
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
539
- testID: `buoy-block-finding-copy-${block.id}`,
540
- accessibilityRole: "button",
541
- accessibilityLabel: copied ? "Copied" : "Copy this finding",
542
- onPress: copy,
543
- style: ({
544
- pressed
545
- }) => [styles.findingCopy, pressed && {
546
- opacity: 0.7
547
- }],
548
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
549
- style: [styles.findingCopyText, copied && {
550
- color: _sharedUi.night.color.accent
551
- }],
552
- children: copied ? "Copied" : "Copy finding"
553
- })
554
- })
555
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitivesIndex.ActionRow, {
556
- actions: block.actions,
557
- blockId: block.id
558
- })]
559
- });
560
- }
561
- const styles = _reactNative.StyleSheet.create({
562
- flex: {
563
- flex: 1
564
- },
565
- tableHead: {
566
- flexDirection: "row",
567
- paddingHorizontal: 12,
568
- paddingVertical: 6,
569
- gap: 8,
570
- backgroundColor: _sharedUi.night.color.fill
571
- },
572
- th: {
573
- flex: 1,
574
- color: _sharedUi.night.color.textTertiary,
575
- fontSize: _sharedUi.night.font.micro,
576
- fontWeight: "700",
577
- letterSpacing: 0.6,
578
- textTransform: "uppercase"
579
- },
580
- tr: {
581
- flexDirection: "row",
582
- paddingHorizontal: 12,
583
- paddingVertical: 8,
584
- gap: 8,
585
- alignItems: "center"
586
- },
587
- td: {
588
- flex: 1,
589
- color: _sharedUi.night.color.textSecondary,
590
- fontSize: _sharedUi.night.font.caption,
591
- lineHeight: 17
592
- },
593
- tdFirst: {
594
- color: _sharedUi.night.color.text,
595
- fontWeight: "500"
596
- },
597
- firstCol: {
598
- flex: 1.4
599
- },
600
- kvRow: {
601
- flexDirection: "row",
602
- gap: 12,
603
- paddingHorizontal: 12,
604
- paddingVertical: 8,
605
- alignItems: "flex-start"
606
- },
607
- kvKey: {
608
- width: 110,
609
- color: _sharedUi.night.color.textSecondary,
610
- fontSize: _sharedUi.night.font.caption,
611
- paddingTop: 1
612
- },
613
- kvValue: {
614
- flex: 1,
615
- color: _sharedUi.night.color.text,
616
- fontSize: _sharedUi.night.font.caption,
617
- lineHeight: 17
618
- },
619
- findingFoot: {
620
- flexDirection: "row",
621
- paddingHorizontal: 12,
622
- paddingVertical: 8,
623
- borderTopWidth: _reactNative.StyleSheet.hairlineWidth,
624
- borderTopColor: _sharedUi.night.color.separator
625
- },
626
- findingCopy: {
627
- paddingHorizontal: 10,
628
- paddingVertical: 5,
629
- borderRadius: _sharedUi.night.radius.badge,
630
- backgroundColor: _sharedUi.night.color.fill
631
- },
632
- findingCopyText: {
633
- color: _sharedUi.night.color.textSecondary,
634
- fontSize: _sharedUi.night.font.micro,
635
- fontWeight: "600"
636
- },
637
- thumb: {
638
- width: 40,
639
- height: 40,
640
- borderRadius: 8,
641
- backgroundColor: _sharedUi.night.color.fill
642
- },
643
- // The enlarged picture, sitting above the row it belongs to. Same height and
644
- // fitting as `imageGrid`'s hero so the two blocks enlarge alike.
645
- listHero: {
646
- paddingHorizontal: 12,
647
- paddingTop: 12
648
- },
649
- listHeroImage: {
650
- width: "100%",
651
- height: 240,
652
- borderRadius: _sharedUi.night.radius.row,
653
- backgroundColor: _sharedUi.night.color.fill
654
- },
655
- rowAction: {
656
- color: _sharedUi.night.color.accent,
657
- fontSize: _sharedUi.night.font.caption,
658
- fontWeight: "600"
659
- },
660
- diffRow: {
661
- paddingHorizontal: 12,
662
- paddingVertical: 8,
663
- gap: 3
664
- },
665
- diffPath: {
666
- color: _sharedUi.night.color.textSecondary,
667
- fontSize: _sharedUi.night.font.micro,
668
- fontWeight: "600",
669
- letterSpacing: 0.3
670
- },
671
- diffLine: {
672
- flexDirection: "row",
673
- gap: 8,
674
- alignItems: "flex-start"
675
- },
676
- diffMark: {
677
- fontFamily: "Menlo",
678
- fontSize: 12,
679
- width: 10
680
- },
681
- diffValue: {
682
- flex: 1,
683
- fontFamily: "Menlo",
684
- fontSize: 12,
685
- lineHeight: 16
686
- },
687
- // The tree viewer paints its own ground; round it so it reads as a well
688
- // inside the card rather than a second card butted against the first.
689
- diffTree: {
690
- borderRadius: _sharedUi.night.radius.row,
691
- overflow: "hidden"
692
- },
693
- chart: {
694
- paddingHorizontal: 12,
695
- paddingVertical: 10,
696
- gap: 8
697
- },
698
- barRow: {
699
- flexDirection: "row",
700
- alignItems: "center",
701
- gap: 8
702
- },
703
- barLabel: {
704
- width: 96,
705
- color: _sharedUi.night.color.textSecondary,
706
- fontSize: _sharedUi.night.font.caption
707
- },
708
- barTrack: {
709
- flex: 1,
710
- height: 10,
711
- borderRadius: 5,
712
- backgroundColor: _sharedUi.night.color.fill,
713
- overflow: "hidden"
714
- },
715
- bar: {
716
- height: 10,
717
- borderRadius: 5
718
- },
719
- barValue: {
720
- width: 72,
721
- textAlign: "right",
722
- color: _sharedUi.night.color.text,
723
- fontSize: _sharedUi.night.font.caption,
724
- fontWeight: "600"
725
- },
726
- step: {
727
- flexDirection: "row",
728
- alignItems: "center",
729
- gap: 10,
730
- paddingHorizontal: 12,
731
- paddingVertical: 9
732
- },
733
- stepMark: {
734
- width: 20,
735
- height: 20,
736
- borderRadius: 10,
737
- backgroundColor: _sharedUi.night.color.fillTertiary,
738
- alignItems: "center",
739
- justifyContent: "center"
740
- },
741
- stepDone: {
742
- backgroundColor: _sharedUi.night.color.accent
743
- },
744
- stepFailed: {
745
- backgroundColor: _sharedUi.night.color.danger
746
- },
747
- stepNum: {
748
- color: _sharedUi.night.color.text,
749
- fontSize: _sharedUi.night.font.micro,
750
- fontWeight: "700"
751
- },
752
- stepTextDone: {
753
- color: _sharedUi.night.color.textSecondary
754
- },
755
- // The explorer draws its own rows; this is only the inset that keeps them
756
- // off the card's edge, matching every other block's 12pt gutter.
757
- viewer: {
758
- paddingHorizontal: 4,
759
- paddingBottom: 8
760
- },
761
- code: {
762
- paddingHorizontal: 12,
763
- paddingVertical: 10,
764
- lineHeight: 17
765
- },
766
- noticeRow: {
767
- flexDirection: "row",
768
- alignItems: "flex-start",
769
- gap: 8,
770
- paddingHorizontal: 12,
771
- paddingTop: 10,
772
- paddingBottom: 4
773
- },
774
- noticeText: {
775
- flex: 1,
776
- color: _sharedUi.night.color.text,
777
- fontSize: _sharedUi.night.font.caption,
778
- lineHeight: 18
779
- }
780
- });
781
- //# sourceMappingURL=DataBlocks.js.map
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Chart=Chart;exports.Code=Code;exports.Diff=Diff;exports.Finding=Finding;exports.KeyValue=KeyValue;exports.List=List;exports.Notice=Notice;exports.Steps=Steps;exports.Table=Table;exports.listRowBehaviour=listRowBehaviour;var _react=require("react");var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _dataViewer=require("@buoy-gg/shared-ui/dataViewer");var _agentCore=require("@buoy-gg/agent-core");var _primitivesIndex=require("./primitivesIndex");var _Markdown=require("../components/Markdown");var _useCopyAction=require("../components/useCopyAction");var _blockText=require("./blockText");var _icons=require("./icons");var _jsxRuntime=require("react/jsx-runtime");function fmt(e){if(e===void 0)return"\u2014";if(e===null)return"null";if(typeof e==="string")return e;if(typeof e==="number"||typeof e==="boolean")return String(e);try{const t=JSON.stringify(e);return t.length>120?`${t.slice(0,117)}\u2026`:t}catch{return String(e)}}function Table({block:e}){const t=(0,_primitivesIndex.usePaged)(e.rows,_agentCore.CAPS.tableRows);const{visible:n}=t;const o=e.columns.slice(0,4);return(0,_jsxRuntime.jsxs)(_primitivesIndex.Card,{title:e.title,source:e.source,testID:`buoy-block-table-${e.id}`,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.tableHead,children:o.map((l,r)=>(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.th,r===0&&styles.firstCol],numberOfLines:1,children:l},l))}),n.map((l,r)=>(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.tr,r>0&&_primitivesIndex.blockStyles.rowDivider],children:o.map((i,a)=>{const s=l[a];const c=typeof s==="string"?s:s?.text??"";const d=typeof s==="string"?void 0:s?.tone;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.td,a===0&&styles.firstCol,a===0&&styles.tdFirst,d&&{color:(0,_primitivesIndex.toneColor)(d)}],numberOfLines:2,children:(0,_Markdown.renderInline)(c,styles.td)},a)})},r)),(0,_jsxRuntime.jsx)(_primitivesIndex.More,{paged:t})]})}function KeyValue({block:e}){const t=(0,_primitivesIndex.usePaged)(e.pairs,_agentCore.CAPS.keyValuePairs);const{visible:n}=t;const[o,l]=(0,_react.useState)(null);return(0,_jsxRuntime.jsxs)(_primitivesIndex.Card,{title:e.title,source:e.source,testID:`buoy-block-keyvalue-${e.id}`,children:[n.map((r,i)=>{const a=typeof r.value==="object"&&r.value!==null;const s=o===r.key;return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onPress:a?()=>l(s?null:r.key):void 0,style:[styles.kvRow,i>0&&_primitivesIndex.blockStyles.rowDivider],children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.kvKey,numberOfLines:1,children:r.key}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.kvValue,s&&_primitivesIndex.blockStyles.mono],numberOfLines:s?void 0:2,selectable:true,children:s?JSON.stringify(r.value,null,2):fmt(r.value)})]},r.key)}),(0,_jsxRuntime.jsx)(_primitivesIndex.More,{paged:t})]})}function listRowBehaviour(e){const t=Boolean(e.image);return{canExpand:t,rowRunsAction:Boolean(e.action)&&!t,actionIsOwnControl:Boolean(e.action)&&t}}function List({block:e}){const t=(0,_primitivesIndex.useBlockHandlers)();const n=(0,_primitivesIndex.usePaged)(e.items,_agentCore.CAPS.listItems);const{visible:o}=n;const[l,r]=(0,_react.useState)(null);return(0,_jsxRuntime.jsxs)(_primitivesIndex.Card,{title:e.title,source:e.source,testID:`buoy-block-list-${e.id}`,children:[o.map((i,a)=>{const s=`${i.id??i.title}-${a}`;const c=l===s;const{canExpand:d,rowRunsAction:u,actionIsOwnControl:f}=listRowBehaviour(i);const g=d||u?_reactNative.Pressable:_reactNative.View;const h=d?{onPress:()=>r(c?null:s),accessibilityRole:"button",accessibilityState:{expanded:c},accessibilityLabel:`${i.title}, ${c?"hide":"show"} picture`,testID:`buoy-block-list-row-${s}`}:u?{onPress:()=>void t.runAction(i.action,e.id),accessibilityRole:"button"}:{};return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:a>0?_primitivesIndex.blockStyles.rowDivider:void 0,children:[c&&i.image?(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>r(null),accessibilityRole:"button",accessibilityLabel:`Hide ${i.title}`,testID:`buoy-block-list-hero-${s}`,style:styles.listHero,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{testID:"buoy-internal-chat-image",source:{uri:i.image},style:styles.listHeroImage,resizeMode:"contain",accessibilityLabel:i.title})}):null,(0,_jsxRuntime.jsxs)(g,{...h,style:_primitivesIndex.blockStyles.row,children:[i.image&&!c?(0,_jsxRuntime.jsx)(_reactNative.Image,{testID:"buoy-internal-chat-image",source:{uri:i.image},style:styles.thumb,resizeMode:"contain",accessibilityLabel:i.title}):i.icon?(0,_jsxRuntime.jsx)(_icons.BlockIcon,{name:i.icon}):null,(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.flex,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[_primitivesIndex.blockStyles.rowTitle,i.tone&&{color:(0,_primitivesIndex.toneColor)(i.tone)}],numberOfLines:c?void 0:2,children:(0,_Markdown.renderInline)(i.title,_primitivesIndex.blockStyles.rowTitle)}),i.subtitle?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:_primitivesIndex.blockStyles.rowSub,numberOfLines:c?void 0:2,children:(0,_Markdown.renderInline)(i.subtitle,_primitivesIndex.blockStyles.rowSub)}):null]}),i.trailing?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[_primitivesIndex.blockStyles.rowTrailing,i.tone&&{color:(0,_primitivesIndex.toneColor)(i.tone)}],numberOfLines:1,children:i.trailing}):null,i.action?f?(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>void t.runAction(i.action,e.id),accessibilityRole:"button",accessibilityLabel:i.action.label,hitSlop:8,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.rowAction,children:i.action.label})}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.rowAction,children:i.action.label}):null]})]},s)}),(0,_jsxRuntime.jsx)(_primitivesIndex.More,{paged:n})]})}function isStructured(e){return e!==null&&typeof e==="object"}function diffSummary(e){const t=e.map(r=>r.path);const n=t.slice(0,3).join(", ");const o=t.length-3;const l=t.length===1?"1 field":`${t.length} fields`;return`${l} \xB7 ${n}${o>0?`, +${o}`:""}`}function Diff({block:e}){const t=(0,_primitivesIndex.usePaged)(e.changes,_agentCore.CAPS.keyValuePairs);return(0,_jsxRuntime.jsxs)(_primitivesIndex.Card,{title:e.title??"What changed",source:e.source,testID:`buoy-block-diff-${e.id}`,collapsible:true,summary:diffSummary(e.changes),children:[t.visible.map((n,o)=>{const l=n.before===void 0&&n.after!==void 0;const r=n.after===void 0&&n.before!==void 0;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.diffRow,o>0&&_primitivesIndex.blockStyles.rowDivider],children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.diffPath,numberOfLines:1,children:n.path}),isStructured(n.before)||isStructured(n.after)?(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.diffTree,children:(0,_jsxRuntime.jsx)(_dataViewer.TreeDiffViewer,{oldValue:n.before,newValue:n.after,showUnchanged:false,scrollEnabled:false})}):(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[!l?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffLine,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.diffMark,{color:_sharedUi.night.color.danger}],children:"\u2212"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.diffValue,{color:_sharedUi.night.color.danger}],numberOfLines:3,selectable:true,children:fmt(n.before)})]}):null,!r?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.diffLine,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.diffMark,{color:_sharedUi.night.color.accent}],children:"+"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.diffValue,{color:_sharedUi.night.color.accent}],numberOfLines:3,selectable:true,children:fmt(n.after)})]}):null]})]},`${n.path}-${o}`)}),(0,_jsxRuntime.jsx)(_primitivesIndex.More,{paged:t})]})}function Chart({block:e}){const t=e.bars.slice(0,_agentCore.CAPS.chartBars);const n=e.max??Math.max(1,...t.map(o=>o.value));return(0,_jsxRuntime.jsx)(_primitivesIndex.Card,{title:e.title,source:e.source,testID:`buoy-block-chart-${e.id}`,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.chart,children:t.map((o,l)=>(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.barRow,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.barLabel,numberOfLines:1,children:o.label}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.barTrack,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.bar,{width:`${Math.max(2,Math.round(o.value/n*100))}%`,backgroundColor:(0,_primitivesIndex.toneColor)(o.tone??"accent")}]})}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.barValue,numberOfLines:1,children:[o.value,o.unit?` ${o.unit}`:""]})]},`${o.label}-${l}`))})})}function Steps({block:e}){return(0,_jsxRuntime.jsx)(_primitivesIndex.Card,{title:e.title,testID:`buoy-block-steps-${e.id}`,children:e.steps.map((t,n)=>(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.step,n>0&&_primitivesIndex.blockStyles.rowDivider],children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.stepMark,t.state==="done"&&styles.stepDone,t.state==="failed"&&styles.stepFailed],children:t.state==="done"?(0,_jsxRuntime.jsx)(_sharedUi.Check,{size:10,color:_sharedUi.night.color.onAccent}):t.state==="failed"?(0,_jsxRuntime.jsx)(_sharedUi.X,{size:10,color:_sharedUi.night.color.text}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.stepNum,children:n+1})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[_primitivesIndex.blockStyles.rowTitle,t.state==="done"&&styles.stepTextDone],children:t.text})]},n))})}function parseJson(e){try{const t=JSON.parse(e);return t!==null&&typeof t==="object"?t:void 0}catch{return void 0}}function JsonCode({block:e,value:t}){return(0,_jsxRuntime.jsx)(_primitivesIndex.Card,{title:e.title,testID:`buoy-block-code-${e.id}`,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.viewer,children:(0,_jsxRuntime.jsx)(_dataViewer.DataViewer,{title:e.title??"Payload",data:t,initialExpanded:true,showTypeFilter:false,testIDPrefix:`buoy-block-code-${e.id}`})})})}function TextCode({block:e}){return(0,_jsxRuntime.jsx)(_primitivesIndex.Card,{title:e.title,testID:`buoy-block-code-${e.id}`,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[_primitivesIndex.blockStyles.mono,styles.code],selectable:true,children:e.text})})}function Code({block:e}){const t=parseJson(e.text);if(t===void 0)return(0,_jsxRuntime.jsx)(TextCode,{block:e});return(0,_jsxRuntime.jsx)(JsonCode,{block:e,value:t})}function Notice({block:e}){const t=e.tone==="danger"?_sharedUi.night.color.danger:e.tone==="warning"?_sharedUi.night.color.warning:_sharedUi.night.color.info;const n=e.tone==="info"?_sharedUi.Info:_sharedUi.AlertTriangle;return(0,_jsxRuntime.jsxs)(_primitivesIndex.Card,{tone:e.tone,testID:`buoy-block-notice-${e.id}`,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.noticeRow,children:[(0,_jsxRuntime.jsx)(n,{size:14,color:t}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.noticeText,children:e.text})]}),(0,_jsxRuntime.jsx)(_primitivesIndex.ActionRow,{actions:e.actions,blockId:e.id})]})}function Finding({block:e}){const{copied:t,copy:n}=(0,_useCopyAction.useCopyAction)(()=>(0,_blockText.blockToText)(e)??e.title);return(0,_jsxRuntime.jsxs)(_primitivesIndex.Card,{title:e.title,source:e.source,testID:`buoy-block-finding-${e.id}`,tone:"warning",children:[e.evidence.map((o,l)=>(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.kvRow,l>0&&_primitivesIndex.blockStyles.rowDivider],children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.kvKey,numberOfLines:1,children:o.label}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.kvValue,o.tone&&{color:(0,_primitivesIndex.toneColor)(o.tone)}],selectable:true,children:o.value})]},`${o.label}-${l}`)),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.findingFoot,children:(0,_jsxRuntime.jsx)(_reactNative.Pressable,{testID:`buoy-block-finding-copy-${e.id}`,accessibilityRole:"button",accessibilityLabel:t?"Copied":"Copy this finding",onPress:n,style:({pressed:o})=>[styles.findingCopy,o&&{opacity:.7}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.findingCopyText,t&&{color:_sharedUi.night.color.accent}],children:t?"Copied":"Copy finding"})})}),(0,_jsxRuntime.jsx)(_primitivesIndex.ActionRow,{actions:e.actions,blockId:e.id})]})}const styles=_reactNative.StyleSheet.create({flex:{flex:1},tableHead:{flexDirection:"row",paddingHorizontal:12,paddingVertical:6,gap:8,backgroundColor:_sharedUi.night.color.fill},th:{flex:1,color:_sharedUi.night.color.textTertiary,fontSize:_sharedUi.night.font.micro,fontWeight:"700",letterSpacing:.6,textTransform:"uppercase"},tr:{flexDirection:"row",paddingHorizontal:12,paddingVertical:8,gap:8,alignItems:"center"},td:{flex:1,color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.caption,lineHeight:17},tdFirst:{color:_sharedUi.night.color.text,fontWeight:"500"},firstCol:{flex:1.4},kvRow:{flexDirection:"row",gap:12,paddingHorizontal:12,paddingVertical:8,alignItems:"flex-start"},kvKey:{width:110,color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.caption,paddingTop:1},kvValue:{flex:1,color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.caption,lineHeight:17},findingFoot:{flexDirection:"row",paddingHorizontal:12,paddingVertical:8,borderTopWidth:_reactNative.StyleSheet.hairlineWidth,borderTopColor:_sharedUi.night.color.separator},findingCopy:{paddingHorizontal:10,paddingVertical:5,borderRadius:_sharedUi.night.radius.badge,backgroundColor:_sharedUi.night.color.fill},findingCopyText:{color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.micro,fontWeight:"600"},thumb:{width:40,height:40,borderRadius:8,backgroundColor:_sharedUi.night.color.fill},listHero:{paddingHorizontal:12,paddingTop:12},listHeroImage:{width:"100%",height:240,borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.fill},rowAction:{color:_sharedUi.night.color.accent,fontSize:_sharedUi.night.font.caption,fontWeight:"600"},diffRow:{paddingHorizontal:12,paddingVertical:8,gap:3},diffPath:{color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.micro,fontWeight:"600",letterSpacing:.3},diffLine:{flexDirection:"row",gap:8,alignItems:"flex-start"},diffMark:{fontFamily:"Menlo",fontSize:12,width:10},diffValue:{flex:1,fontFamily:"Menlo",fontSize:12,lineHeight:16},diffTree:{borderRadius:_sharedUi.night.radius.row,overflow:"hidden"},chart:{paddingHorizontal:12,paddingVertical:10,gap:8},barRow:{flexDirection:"row",alignItems:"center",gap:8},barLabel:{width:96,color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.caption},barTrack:{flex:1,height:10,borderRadius:5,backgroundColor:_sharedUi.night.color.fill,overflow:"hidden"},bar:{height:10,borderRadius:5},barValue:{width:72,textAlign:"right",color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.caption,fontWeight:"600"},step:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:9},stepMark:{width:20,height:20,borderRadius:10,backgroundColor:_sharedUi.night.color.fillTertiary,alignItems:"center",justifyContent:"center"},stepDone:{backgroundColor:_sharedUi.night.color.accent},stepFailed:{backgroundColor:_sharedUi.night.color.danger},stepNum:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.micro,fontWeight:"700"},stepTextDone:{color:_sharedUi.night.color.textSecondary},viewer:{paddingHorizontal:4,paddingBottom:8},code:{paddingHorizontal:12,paddingVertical:10,lineHeight:17},noticeRow:{flexDirection:"row",alignItems:"flex-start",gap:8,paddingHorizontal:12,paddingTop:10,paddingBottom:4},noticeText:{flex:1,color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.caption,lineHeight:18}});