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