@buoy-gg/ask-buoy 7.0.34 → 7.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/blocks/AskBlocks.js +338 -1
  3. package/lib/commonjs/blocks/AskBlocks.js.map +1 -0
  4. package/lib/commonjs/blocks/BlockRenderer.js +250 -1
  5. package/lib/commonjs/blocks/BlockRenderer.js.map +1 -0
  6. package/lib/commonjs/blocks/ChromePrototypes.js +514 -1
  7. package/lib/commonjs/blocks/ChromePrototypes.js.map +1 -0
  8. package/lib/commonjs/blocks/DataBlocks.js +688 -1
  9. package/lib/commonjs/blocks/DataBlocks.js.map +1 -0
  10. package/lib/commonjs/blocks/ExtraBlocks.js +1854 -1
  11. package/lib/commonjs/blocks/ExtraBlocks.js.map +1 -0
  12. package/lib/commonjs/blocks/MediaBlocks.js +140 -1
  13. package/lib/commonjs/blocks/MediaBlocks.js.map +1 -0
  14. package/lib/commonjs/blocks/ReceiptBlocks.js +586 -1
  15. package/lib/commonjs/blocks/ReceiptBlocks.js.map +1 -0
  16. package/lib/commonjs/blocks/context.js +42 -1
  17. package/lib/commonjs/blocks/context.js.map +1 -0
  18. package/lib/commonjs/blocks/icons.js +96 -1
  19. package/lib/commonjs/blocks/icons.js.map +1 -0
  20. package/lib/commonjs/blocks/index.js +95 -1
  21. package/lib/commonjs/blocks/index.js.map +1 -0
  22. package/lib/commonjs/blocks/listRow.test.js +55 -0
  23. package/lib/commonjs/blocks/listRow.test.js.map +1 -0
  24. package/lib/commonjs/blocks/pageState.js +34 -0
  25. package/lib/commonjs/blocks/pageState.js.map +1 -0
  26. package/lib/commonjs/blocks/pageState.test.js +57 -0
  27. package/lib/commonjs/blocks/pageState.test.js.map +1 -0
  28. package/lib/commonjs/blocks/primitives.js +401 -1
  29. package/lib/commonjs/blocks/primitives.js.map +1 -0
  30. package/lib/commonjs/blocks/primitivesIndex.js +62 -1
  31. package/lib/commonjs/blocks/primitivesIndex.js.map +1 -0
  32. package/lib/commonjs/components/ApprovalCard.js +140 -1
  33. package/lib/commonjs/components/ApprovalCard.js.map +1 -0
  34. package/lib/commonjs/components/AskBuoyHeader.js +164 -1
  35. package/lib/commonjs/components/AskBuoyHeader.js.map +1 -0
  36. package/lib/commonjs/components/AskBuoyIcon.js +19 -1
  37. package/lib/commonjs/components/AskBuoyIcon.js.map +1 -0
  38. package/lib/commonjs/components/AskBuoyModal.js +353 -1
  39. package/lib/commonjs/components/AskBuoyModal.js.map +1 -0
  40. package/lib/commonjs/components/AskBuoySettings.js +69 -0
  41. package/lib/commonjs/components/AskBuoySettings.js.map +1 -0
  42. package/lib/commonjs/components/ChangesBar.js +211 -1
  43. package/lib/commonjs/components/ChangesBar.js.map +1 -0
  44. package/lib/commonjs/components/Composer.js +175 -1
  45. package/lib/commonjs/components/Composer.js.map +1 -0
  46. package/lib/commonjs/components/EmptyState.js +154 -1
  47. package/lib/commonjs/components/EmptyState.js.map +1 -0
  48. package/lib/commonjs/components/Markdown.js +252 -1
  49. package/lib/commonjs/components/Markdown.js.map +1 -0
  50. package/lib/commonjs/components/MessageList.js +683 -1
  51. package/lib/commonjs/components/MessageList.js.map +1 -0
  52. package/lib/commonjs/components/ThinkingStrip.js +223 -0
  53. package/lib/commonjs/components/ThinkingStrip.js.map +1 -0
  54. package/lib/commonjs/components/TypingDots.js +63 -1
  55. package/lib/commonjs/components/TypingDots.js.map +1 -0
  56. package/lib/commonjs/components/useCopyAction.js +50 -0
  57. package/lib/commonjs/components/useCopyAction.js.map +1 -0
  58. package/lib/commonjs/index.js +252 -1
  59. package/lib/commonjs/index.js.map +1 -0
  60. package/lib/commonjs/preset.js +90 -1
  61. package/lib/commonjs/preset.js.map +1 -0
  62. package/lib/commonjs/store/askBuoySettings.js +67 -0
  63. package/lib/commonjs/store/askBuoySettings.js.map +1 -0
  64. package/lib/commonjs/store/askBuoyStore.js +365 -1
  65. package/lib/commonjs/store/askBuoyStore.js.map +1 -0
  66. package/lib/commonjs/store/restoredIds.test.js +47 -0
  67. package/lib/commonjs/store/restoredIds.test.js.map +1 -0
  68. package/lib/commonjs/store/traceText.js +81 -0
  69. package/lib/commonjs/store/traceText.js.map +1 -0
  70. package/lib/commonjs/store/traceText.test.js +112 -0
  71. package/lib/commonjs/store/traceText.test.js.map +1 -0
  72. package/lib/commonjs/store/transcriptPersistence.js +208 -0
  73. package/lib/commonjs/store/transcriptPersistence.js.map +1 -0
  74. package/lib/commonjs/store/transcriptPersistence.test.js +185 -0
  75. package/lib/commonjs/store/transcriptPersistence.test.js.map +1 -0
  76. package/lib/commonjs/store/useAskBuoy.js +400 -1
  77. package/lib/commonjs/store/useAskBuoy.js.map +1 -0
  78. package/lib/commonjs/store/useAskBuoySettings.js +14 -0
  79. package/lib/commonjs/store/useAskBuoySettings.js.map +1 -0
  80. package/lib/commonjs/sync/askBuoySyncAdapter.js +119 -1
  81. package/lib/commonjs/sync/askBuoySyncAdapter.js.map +1 -0
  82. package/lib/commonjs/sync/askBuoySyncAdapter.test.js +141 -1
  83. package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +1 -0
  84. package/lib/commonjs/sync/wire.js +58 -1
  85. package/lib/commonjs/sync/wire.js.map +1 -0
  86. package/lib/commonjs/types.js +6 -1
  87. package/lib/commonjs/types.js.map +1 -0
  88. package/lib/module/blocks/AskBlocks.js +331 -1
  89. package/lib/module/blocks/AskBlocks.js.map +1 -0
  90. package/lib/module/blocks/BlockRenderer.js +245 -1
  91. package/lib/module/blocks/BlockRenderer.js.map +1 -0
  92. package/lib/module/blocks/ChromePrototypes.js +503 -1
  93. package/lib/module/blocks/ChromePrototypes.js.map +1 -0
  94. package/lib/module/blocks/DataBlocks.js +674 -1
  95. package/lib/module/blocks/DataBlocks.js.map +1 -0
  96. package/lib/module/blocks/ExtraBlocks.js +1827 -1
  97. package/lib/module/blocks/ExtraBlocks.js.map +1 -0
  98. package/lib/module/blocks/MediaBlocks.js +135 -1
  99. package/lib/module/blocks/MediaBlocks.js.map +1 -0
  100. package/lib/module/blocks/ReceiptBlocks.js +574 -1
  101. package/lib/module/blocks/ReceiptBlocks.js.map +1 -0
  102. package/lib/module/blocks/context.js +35 -1
  103. package/lib/module/blocks/context.js.map +1 -0
  104. package/lib/module/blocks/icons.js +91 -1
  105. package/lib/module/blocks/icons.js.map +1 -0
  106. package/lib/module/blocks/index.js +8 -1
  107. package/lib/module/blocks/index.js.map +1 -0
  108. package/lib/module/blocks/listRow.test.js +56 -0
  109. package/lib/module/blocks/listRow.test.js.map +1 -0
  110. package/lib/module/blocks/pageState.js +30 -0
  111. package/lib/module/blocks/pageState.js.map +1 -0
  112. package/lib/module/blocks/pageState.test.js +56 -0
  113. package/lib/module/blocks/pageState.test.js.map +1 -0
  114. package/lib/module/blocks/primitives.js +389 -1
  115. package/lib/module/blocks/primitives.js.map +1 -0
  116. package/lib/module/blocks/primitivesIndex.js +5 -1
  117. package/lib/module/blocks/primitivesIndex.js.map +1 -0
  118. package/lib/module/components/ApprovalCard.js +135 -1
  119. package/lib/module/components/ApprovalCard.js.map +1 -0
  120. package/lib/module/components/AskBuoyHeader.js +161 -1
  121. package/lib/module/components/AskBuoyHeader.js.map +1 -0
  122. package/lib/module/components/AskBuoyIcon.js +8 -1
  123. package/lib/module/components/AskBuoyIcon.js.map +1 -0
  124. package/lib/module/components/AskBuoyModal.js +348 -1
  125. package/lib/module/components/AskBuoyModal.js.map +1 -0
  126. package/lib/module/components/AskBuoySettings.js +64 -0
  127. package/lib/module/components/AskBuoySettings.js.map +1 -0
  128. package/lib/module/components/ChangesBar.js +206 -1
  129. package/lib/module/components/ChangesBar.js.map +1 -0
  130. package/lib/module/components/Composer.js +170 -1
  131. package/lib/module/components/Composer.js.map +1 -0
  132. package/lib/module/components/EmptyState.js +149 -1
  133. package/lib/module/components/EmptyState.js.map +1 -0
  134. package/lib/module/components/Markdown.js +246 -1
  135. package/lib/module/components/Markdown.js.map +1 -0
  136. package/lib/module/components/MessageList.js +677 -1
  137. package/lib/module/components/MessageList.js.map +1 -0
  138. package/lib/module/components/ThinkingStrip.js +218 -0
  139. package/lib/module/components/ThinkingStrip.js.map +1 -0
  140. package/lib/module/components/TypingDots.js +58 -1
  141. package/lib/module/components/TypingDots.js.map +1 -0
  142. package/lib/module/components/useCopyAction.js +46 -0
  143. package/lib/module/components/useCopyAction.js.map +1 -0
  144. package/lib/module/index.js +34 -1
  145. package/lib/module/index.js.map +1 -0
  146. package/lib/module/preset.js +73 -1
  147. package/lib/module/preset.js.map +1 -0
  148. package/lib/module/store/askBuoySettings.js +62 -0
  149. package/lib/module/store/askBuoySettings.js.map +1 -0
  150. package/lib/module/store/askBuoyStore.js +361 -1
  151. package/lib/module/store/askBuoyStore.js.map +1 -0
  152. package/lib/module/store/restoredIds.test.js +46 -0
  153. package/lib/module/store/restoredIds.test.js.map +1 -0
  154. package/lib/module/store/traceText.js +75 -0
  155. package/lib/module/store/traceText.js.map +1 -0
  156. package/lib/module/store/traceText.test.js +111 -0
  157. package/lib/module/store/traceText.test.js.map +1 -0
  158. package/lib/module/store/transcriptPersistence.js +198 -0
  159. package/lib/module/store/transcriptPersistence.js.map +1 -0
  160. package/lib/module/store/transcriptPersistence.test.js +184 -0
  161. package/lib/module/store/transcriptPersistence.test.js.map +1 -0
  162. package/lib/module/store/useAskBuoy.js +394 -1
  163. package/lib/module/store/useAskBuoy.js.map +1 -0
  164. package/lib/module/store/useAskBuoySettings.js +9 -0
  165. package/lib/module/store/useAskBuoySettings.js.map +1 -0
  166. package/lib/module/sync/askBuoySyncAdapter.js +114 -1
  167. package/lib/module/sync/askBuoySyncAdapter.js.map +1 -0
  168. package/lib/module/sync/askBuoySyncAdapter.test.js +140 -1
  169. package/lib/module/sync/askBuoySyncAdapter.test.js.map +1 -0
  170. package/lib/module/sync/wire.js +47 -1
  171. package/lib/module/sync/wire.js.map +1 -0
  172. package/lib/module/types.js +4 -1
  173. package/lib/module/types.js.map +1 -0
  174. package/lib/typescript/blocks/AskBlocks.d.ts.map +1 -0
  175. package/lib/typescript/blocks/BlockRenderer.d.ts.map +1 -0
  176. package/lib/typescript/blocks/ChromePrototypes.d.ts.map +1 -0
  177. package/lib/typescript/blocks/DataBlocks.d.ts +31 -0
  178. package/lib/typescript/blocks/DataBlocks.d.ts.map +1 -0
  179. package/lib/typescript/blocks/ExtraBlocks.d.ts +11 -0
  180. package/lib/typescript/blocks/ExtraBlocks.d.ts.map +1 -0
  181. package/lib/typescript/blocks/MediaBlocks.d.ts.map +1 -0
  182. package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +1 -0
  183. package/lib/typescript/blocks/context.d.ts.map +1 -0
  184. package/lib/typescript/blocks/icons.d.ts.map +1 -0
  185. package/lib/typescript/blocks/index.d.ts.map +1 -0
  186. package/lib/typescript/blocks/listRow.test.d.ts +2 -0
  187. package/lib/typescript/blocks/listRow.test.d.ts.map +1 -0
  188. package/lib/typescript/blocks/pageState.d.ts +23 -0
  189. package/lib/typescript/blocks/pageState.d.ts.map +1 -0
  190. package/lib/typescript/blocks/pageState.test.d.ts +2 -0
  191. package/lib/typescript/blocks/pageState.test.d.ts.map +1 -0
  192. package/lib/typescript/blocks/primitives.d.ts +39 -9
  193. package/lib/typescript/blocks/primitives.d.ts.map +1 -0
  194. package/lib/typescript/blocks/primitivesIndex.d.ts +2 -1
  195. package/lib/typescript/blocks/primitivesIndex.d.ts.map +1 -0
  196. package/lib/typescript/components/ApprovalCard.d.ts.map +1 -0
  197. package/lib/typescript/components/AskBuoyHeader.d.ts +11 -1
  198. package/lib/typescript/components/AskBuoyHeader.d.ts.map +1 -0
  199. package/lib/typescript/components/AskBuoyIcon.d.ts.map +1 -0
  200. package/lib/typescript/components/AskBuoyModal.d.ts.map +1 -0
  201. package/lib/typescript/components/AskBuoySettings.d.ts +2 -0
  202. package/lib/typescript/components/AskBuoySettings.d.ts.map +1 -0
  203. package/lib/typescript/components/ChangesBar.d.ts.map +1 -0
  204. package/lib/typescript/components/Composer.d.ts.map +1 -0
  205. package/lib/typescript/components/EmptyState.d.ts.map +1 -0
  206. package/lib/typescript/components/Markdown.d.ts.map +1 -0
  207. package/lib/typescript/components/MessageList.d.ts +12 -5
  208. package/lib/typescript/components/MessageList.d.ts.map +1 -0
  209. package/lib/typescript/components/ThinkingStrip.d.ts +5 -0
  210. package/lib/typescript/components/ThinkingStrip.d.ts.map +1 -0
  211. package/lib/typescript/components/TypingDots.d.ts.map +1 -0
  212. package/lib/typescript/components/useCopyAction.d.ts +5 -0
  213. package/lib/typescript/components/useCopyAction.d.ts.map +1 -0
  214. package/lib/typescript/index.d.ts +5 -0
  215. package/lib/typescript/index.d.ts.map +1 -0
  216. package/lib/typescript/preset.d.ts.map +1 -0
  217. package/lib/typescript/store/askBuoySettings.d.ts +22 -0
  218. package/lib/typescript/store/askBuoySettings.d.ts.map +1 -0
  219. package/lib/typescript/store/askBuoyStore.d.ts +74 -13
  220. package/lib/typescript/store/askBuoyStore.d.ts.map +1 -0
  221. package/lib/typescript/store/restoredIds.test.d.ts +2 -0
  222. package/lib/typescript/store/restoredIds.test.d.ts.map +1 -0
  223. package/lib/typescript/store/traceText.d.ts +33 -0
  224. package/lib/typescript/store/traceText.d.ts.map +1 -0
  225. package/lib/typescript/store/traceText.test.d.ts +2 -0
  226. package/lib/typescript/store/traceText.test.d.ts.map +1 -0
  227. package/lib/typescript/store/transcriptPersistence.d.ts +40 -0
  228. package/lib/typescript/store/transcriptPersistence.d.ts.map +1 -0
  229. package/lib/typescript/store/transcriptPersistence.test.d.ts +2 -0
  230. package/lib/typescript/store/transcriptPersistence.test.d.ts.map +1 -0
  231. package/lib/typescript/store/useAskBuoy.d.ts.map +1 -0
  232. package/lib/typescript/store/useAskBuoySettings.d.ts +3 -0
  233. package/lib/typescript/store/useAskBuoySettings.d.ts.map +1 -0
  234. package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +1 -0
  235. package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +1 -0
  236. package/lib/typescript/sync/wire.d.ts.map +1 -0
  237. package/lib/typescript/types.d.ts +24 -1
  238. package/lib/typescript/types.d.ts.map +1 -0
  239. package/package.json +8 -8
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useSyncExternalStore","Pressable","ScrollView","StyleSheet","Text","View","ChevronDown","ChevronRight","night","isReversible","jsx","_jsx","jsxs","_jsxs","EMPTY","useLedgerEntries","ledger","fn","subscribe","list","ChangesBar","onUndoAll","expanded","onToggle","entries","outstanding","filter","e","undoneAt","changes","effect","kind","length","reversible","permanent","transients","Chevron","counts","Boolean","join","style","styles","wrap","children","testID","accessibilityRole","accessibilityState","onPress","bar","dot","summary","numberOfLines","size","color","textSecondary","panel","panelScroll","keyboardShouldPersistTaps","map","entry","oneOff","row","rowLabel","label","rowTag","rowTagMuted","id","rowLabelMuted","footer","pressed","undo","undoText","footnote","create","borderBottomWidth","hairlineWidth","borderBottomColor","border","backgroundColor","warningSoft","flexDirection","alignItems","gap","paddingHorizontal","gutter","paddingVertical","width","height","borderRadius","warning","text","fontSize","font","caption","fontWeight","flex","paddingBottom","maxHeight","borderTopWidth","borderTopColor","separator","lineHeight","accent","micro","letterSpacing","textTransform","paddingTop","textTertiary","flexWrap","radius","button","opacity"],"sourceRoot":"../../../src","sources":["components/ChangesBar.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,QAAQ,OAAO;AAC5C,SAASC,SAAS,EAAEC,UAAU,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAC5E,SAASC,WAAW,EAAEC,YAAY,EAAEC,KAAK,QAAQ,oBAAoB;AACrE,SAASC,YAAY,QAA6C,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AASxF,MAAMC,KAAoB,GAAG,EAAE;AAE/B,SAASC,gBAAgBA,CAACC,MAA2B,EAAiB;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C/B,CAAC;EACDvC,QAAQ,EAAE;IAAElB,KAAK,EAAE7C,KAAK,CAAC6C,KAAK,CAACiD,MAAM;IAAEX,QAAQ,EAAEnF,KAAK,CAACoF,IAAI,CAACC,OAAO;IAAEC,UAAU,EAAE;EAAM,CAAC;EACxFtB,QAAQ,EAAE;IACRuB,IAAI,EAAE,CAAC;IACP1C,KAAK,EAAE7C,KAAK,CAAC6C,KAAK,CAACsD,YAAY;IAC/BhB,QAAQ,EAAEnF,KAAK,CAACoF,IAAI,CAACW;EACvB,CAAC;EACDlC,OAAO,EAAE;IAAE0C,OAAO,EAAE;EAAI;AAC1B,CAAC,CAAC","ignoreList":[]}
@@ -1 +1,170 @@
1
- "use strict";import{useCallback,useState}from"react";import{Platform,Pressable,StyleSheet,Text,TextInput,View}from"react-native";import{night}from"@buoy-gg/shared-ui";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export function Composer({onSend:e,onStop:t,busy:o,disabled:s,placeholder:i}){const[l,r]=useState(""),n=useCallback(()=>{const t=l.trim();t&&(r(""),e(t))},[l,e]),a=l.trim().length>0&&!o&&!s;return _jsxs(View,{style:styles.wrap,children:[_jsx(View,{style:[styles.field,s&&styles.fieldDisabled],children:_jsx(TextInput,{testID:"buoy-ask-buoy-input",style:styles.input,value:l,onChangeText:r,placeholder:i??(s?"Ask Buoy isn't set up yet":"Ask, or tell it what to change…"),placeholderTextColor:night.color.placeholder,multiline:!0,editable:!s,keyboardType:"ascii-capable",autoCorrect:!0,autoCapitalize:"sentences",blurOnSubmit:!1,onSubmitEditing:n,returnKeyType:"send",maxLength:4e3})}),_jsx(Pressable,o?{testID:"buoy-ask-buoy-stop",accessibilityRole:"button",accessibilityLabel:"Stop",onPress:t,style:({pressed:e})=>[styles.button,styles.stop,e&&styles.pressed],children:_jsx(View,{style:styles.stopGlyph})}:{testID:"buoy-ask-buoy-send",accessibilityRole:"button",accessibilityLabel:"Send",disabled:!a,onPress:n,style:({pressed:e})=>[styles.button,a?styles.sendOn:styles.sendOff,e&&a&&styles.pressed],children:_jsx(Text,{style:[styles.sendGlyph,{color:a?night.color.onAccent:night.color.textTertiary}],children:"↑"})})]})}const styles=StyleSheet.create({wrap:{flexDirection:"row",alignItems:"flex-end",gap:8,paddingHorizontal:night.gutter,paddingTop:10,paddingBottom:6,borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:night.color.border,backgroundColor:night.color.bg},field:{flex:1,minHeight:40,justifyContent:"center",borderRadius:20,borderWidth:StyleSheet.hairlineWidth,borderColor:night.color.border,backgroundColor:night.color.surfaceElevated},fieldDisabled:{opacity:.6},input:{maxHeight:120,paddingHorizontal:16,paddingTop:"ios"===Platform.OS?10:6,paddingBottom:"ios"===Platform.OS?10:6,color:night.color.text,fontSize:night.font.row,lineHeight:20},button:{width:40,height:40,borderRadius:20,alignItems:"center",justifyContent:"center"},sendGlyph:{fontSize:20,fontWeight:"700",lineHeight:22},sendOn:{backgroundColor:night.color.accent},sendOff:{backgroundColor:night.color.fill},stop:{backgroundColor:night.color.fillTertiary},stopGlyph:{width:12,height:12,borderRadius:2,backgroundColor:night.color.text},pressed:{opacity:.7}});
1
+ "use strict";
2
+
3
+ /**
4
+ * The message box.
5
+ *
6
+ * This is the first keyboard-safe BOTTOM input in Buoy, and the reason none
7
+ * existed before is that JsModal has no keyboard handling at all: the sheet is
8
+ * `position:absolute; bottom:0` inside the app tree, not an RN `Modal`, so on
9
+ * iOS the keyboard simply draws over it. Two other tools hit this and chose to
10
+ * dodge it — NetworkNumberPrompt and StorageValueEditModal both say so in
11
+ * comments and pin their inputs to the TOP of the screen. A chat cannot.
12
+ *
13
+ * What makes it work:
14
+ * - `KeyboardAvoidingView` with `behavior="padding"`, iOS only. On Android
15
+ * Expo's default `softwareKeyboardLayoutMode: "resize"` shrinks the window
16
+ * and a bottom-anchored view rides up for free; adding padding there would
17
+ * lift it twice.
18
+ * - The parent list carries `keyboardShouldPersistTaps="handled"`. Without it
19
+ * the first tap after typing only dismisses the keyboard and Send never
20
+ * fires — a real shipped bug in Time Machine, and invisible to Detox because
21
+ * `replaceText` opens no keyboard.
22
+ * - `keyboardType="ascii-capable"`, because iOS Smart Punctuation rewrites
23
+ * straight quotes as curly ones. That permanently broke the raw-JSON editor
24
+ * in Storage, and a tester pasting a JSON blob here would hit the same wall.
25
+ *
26
+ * While the agent is working the send button becomes a STOP button — a
27
+ * square, the universal glyph — rather than a spinner in a circle, which
28
+ * looked like a disabled control and gave no hint it was tappable.
29
+ */
30
+ import { useCallback, useState } from "react";
31
+ import { Platform, Pressable, StyleSheet, Text, TextInput, View } from "react-native";
32
+ import { night } from "@buoy-gg/shared-ui";
33
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
34
+ export function Composer({
35
+ onSend,
36
+ onStop,
37
+ busy,
38
+ disabled,
39
+ placeholder
40
+ }) {
41
+ const [text, setText] = useState("");
42
+ const submit = useCallback(() => {
43
+ const value = text.trim();
44
+ if (!value) return;
45
+ setText("");
46
+ onSend(value);
47
+ }, [text, onSend]);
48
+ const canSend = text.trim().length > 0 && !busy && !disabled;
49
+ return /*#__PURE__*/_jsxs(View, {
50
+ style: styles.wrap,
51
+ children: [/*#__PURE__*/_jsx(View, {
52
+ style: [styles.field, disabled && styles.fieldDisabled],
53
+ children: /*#__PURE__*/_jsx(TextInput, {
54
+ testID: "buoy-ask-buoy-input",
55
+ style: styles.input,
56
+ value: text,
57
+ onChangeText: setText,
58
+ placeholder: placeholder ?? (disabled ? "Ask Buoy isn't set up yet" : "Ask, or tell it what to change…"),
59
+ placeholderTextColor: night.color.placeholder,
60
+ multiline: true,
61
+ editable: !disabled
62
+ // Straight quotes only — see the header note.
63
+ ,
64
+ keyboardType: "ascii-capable",
65
+ autoCorrect: true,
66
+ autoCapitalize: "sentences"
67
+ // Enter sends; Shift-Enter is not a thing on a phone keyboard, and a
68
+ // multiline box with no submit affordance strands people.
69
+ ,
70
+ blurOnSubmit: false,
71
+ onSubmitEditing: submit,
72
+ returnKeyType: "send",
73
+ maxLength: 4000
74
+ })
75
+ }), busy ? /*#__PURE__*/_jsx(Pressable, {
76
+ testID: "buoy-ask-buoy-stop",
77
+ accessibilityRole: "button",
78
+ accessibilityLabel: "Stop",
79
+ onPress: onStop,
80
+ style: ({
81
+ pressed
82
+ }) => [styles.button, styles.stop, pressed && styles.pressed],
83
+ children: /*#__PURE__*/_jsx(View, {
84
+ style: styles.stopGlyph
85
+ })
86
+ }) : /*#__PURE__*/_jsx(Pressable, {
87
+ testID: "buoy-ask-buoy-send",
88
+ accessibilityRole: "button",
89
+ accessibilityLabel: "Send",
90
+ disabled: !canSend,
91
+ onPress: submit,
92
+ style: ({
93
+ pressed
94
+ }) => [styles.button, canSend ? styles.sendOn : styles.sendOff, pressed && canSend && styles.pressed],
95
+ children: /*#__PURE__*/_jsx(Text, {
96
+ style: [styles.sendGlyph, {
97
+ color: canSend ? night.color.onAccent : night.color.textTertiary
98
+ }],
99
+ children: "\u2191"
100
+ })
101
+ })]
102
+ });
103
+ }
104
+ const styles = StyleSheet.create({
105
+ wrap: {
106
+ flexDirection: "row",
107
+ alignItems: "flex-end",
108
+ gap: 8,
109
+ paddingHorizontal: night.gutter,
110
+ paddingTop: 10,
111
+ paddingBottom: 6,
112
+ borderTopWidth: StyleSheet.hairlineWidth,
113
+ borderTopColor: night.color.border,
114
+ // Opaque: messages scroll UNDER the composer, and a translucent bar over
115
+ // moving text is unreadable.
116
+ backgroundColor: night.color.bg
117
+ },
118
+ field: {
119
+ flex: 1,
120
+ minHeight: 40,
121
+ justifyContent: "center",
122
+ borderRadius: 20,
123
+ borderWidth: StyleSheet.hairlineWidth,
124
+ borderColor: night.color.border,
125
+ backgroundColor: night.color.surfaceElevated
126
+ },
127
+ fieldDisabled: {
128
+ opacity: 0.6
129
+ },
130
+ input: {
131
+ maxHeight: 120,
132
+ paddingHorizontal: 16,
133
+ paddingTop: Platform.OS === "ios" ? 10 : 6,
134
+ paddingBottom: Platform.OS === "ios" ? 10 : 6,
135
+ color: night.color.text,
136
+ fontSize: night.font.row,
137
+ lineHeight: 20
138
+ },
139
+ button: {
140
+ width: 40,
141
+ height: 40,
142
+ borderRadius: 20,
143
+ alignItems: "center",
144
+ justifyContent: "center"
145
+ },
146
+ sendGlyph: {
147
+ fontSize: 20,
148
+ fontWeight: "700",
149
+ lineHeight: 22
150
+ },
151
+ sendOn: {
152
+ backgroundColor: night.color.accent
153
+ },
154
+ sendOff: {
155
+ backgroundColor: night.color.fill
156
+ },
157
+ stop: {
158
+ backgroundColor: night.color.fillTertiary
159
+ },
160
+ stopGlyph: {
161
+ width: 12,
162
+ height: 12,
163
+ borderRadius: 2,
164
+ backgroundColor: night.color.text
165
+ },
166
+ pressed: {
167
+ opacity: 0.7
168
+ }
169
+ });
170
+ //# sourceMappingURL=Composer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useState","Platform","Pressable","StyleSheet","Text","TextInput","View","night","jsx","_jsx","jsxs","_jsxs","Composer","onSend","onStop","busy","disabled","placeholder","text","setText","submit","value","trim","canSend","length","style","styles","wrap","children","field","fieldDisabled","testID","input","onChangeText","placeholderTextColor","color","multiline","editable","keyboardType","autoCorrect","autoCapitalize","blurOnSubmit","onSubmitEditing","returnKeyType","maxLength","accessibilityRole","accessibilityLabel","onPress","pressed","button","stop","stopGlyph","sendOn","sendOff","sendGlyph","onAccent","textTertiary","create","flexDirection","alignItems","gap","paddingHorizontal","gutter","paddingTop","paddingBottom","borderTopWidth","hairlineWidth","borderTopColor","border","backgroundColor","bg","flex","minHeight","justifyContent","borderRadius","borderWidth","borderColor","surfaceElevated","opacity","maxHeight","OS","fontSize","font","row","lineHeight","width","height","fontWeight","accent","fill","fillTertiary"],"sourceRoot":"../../../src","sources":["components/Composer.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA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CAACC,GAAG;IACxBC,UAAU,EAAE;EACd,CAAC;EACDnC,MAAM,EAAE;IACNoC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVZ,YAAY,EAAE,EAAE;IAChBf,UAAU,EAAE,QAAQ;IACpBc,cAAc,EAAE;EAClB,CAAC;EACDnB,SAAS,EAAE;IAAE2B,QAAQ,EAAE,EAAE;IAAEM,UAAU,EAAE,KAAK;IAAEH,UAAU,EAAE;EAAG,CAAC;EAC9DhC,MAAM,EAAE;IAAEiB,eAAe,EAAE9D,KAAK,CAAC4B,KAAK,CAACqD;EAAO,CAAC;EAC/CnC,OAAO,EAAE;IAAEgB,eAAe,EAAE9D,KAAK,CAAC4B,KAAK,CAACsD;EAAK,CAAC;EAC9CvC,IAAI,EAAE;IAAEmB,eAAe,EAAE9D,KAAK,CAAC4B,KAAK,CAACuD;EAAa,CAAC;EACnDvC,SAAS,EAAE;IACTkC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVZ,YAAY,EAAE,CAAC;IACfL,eAAe,EAAE9D,KAAK,CAAC4B,KAAK,CAACjB;EAC/B,CAAC;EACD8B,OAAO,EAAE;IAAE8B,OAAO,EAAE;EAAI;AAC1B,CAAC,CAAC","ignoreList":[]}
@@ -1 +1,149 @@
1
- "use strict";import{Pressable,StyleSheet,Text,View}from"react-native";import{ChevronRight,night,NightSectionLabel}from"@buoy-gg/shared-ui";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const isRelease="undefined"!=typeof __DEV__&&!__DEV__,SUGGESTIONS=["Why is this screen empty?","What did the last few network calls return?","Show me what's saved for this user","Make the next request to this screen fail with a 500"];export function EmptyState({configured:e,onPick:t}){return _jsxs(View,e?{style:styles.wrap,testID:"buoy-ask-buoy-empty",children:[_jsx(Text,{style:styles.title,children:"Ask about this app"}),_jsx(Text,{style:styles.body,children:"Ask what the app is doing right now, or tell it to change something. Anything it changes shows up in a bar at the top, and you can undo it."}),_jsx(Text,{style:styles.buildLine,testID:"buoy-ask-buoy-build-line",children:isRelease?"Release build — reading, impersonation and navigation work; simulations (forcing server responses, driving the screen) need a dev build.":"Dev build — full simulation available."}),_jsxs(View,{style:styles.group,children:[_jsx(NightSectionLabel,{children:"Try asking"}),_jsx(View,{style:styles.card,children:SUGGESTIONS.map((e,o)=>_jsx(Suggestion,{text:e,onPick:t,last:o===SUGGESTIONS.length-1},e))})]})]}:{style:styles.wrap,testID:"buoy-ask-buoy-unconfigured",children:[_jsx(Text,{style:styles.title,children:"Not set up yet"}),_jsxs(Text,{style:styles.body,children:["Ask Buoy talks to your own company's AI endpoint — nothing goes to Buoy. A developer needs to add the ",_jsx(Text,{style:styles.code,children:"askBuoy"})," prop to"," ",_jsx(Text,{style:styles.code,children:"<FloatingDevTools />"})," with your team's endpoint and model."]})]})}function Suggestion({text:e,onPick:t,last:o}){return _jsxs(Pressable,{testID:`buoy-ask-buoy-suggestion-${e.slice(0,12)}`,accessibilityRole:"button",onPress:()=>t(e),style:({pressed:e})=>[styles.row,!o&&styles.rowDivider,e&&styles.pressed],children:[_jsx(Text,{style:styles.rowText,children:e}),_jsx(ChevronRight,{size:14,color:night.color.textTertiary})]})}const styles=StyleSheet.create({wrap:{flex:1,justifyContent:"center",paddingHorizontal:night.gutter,paddingVertical:24,gap:8},title:{color:night.color.text,fontSize:22,fontWeight:"700",letterSpacing:-.3},body:{color:night.color.textSecondary,fontSize:night.font.body,lineHeight:20},code:{color:night.color.text,fontFamily:"Menlo"},buildLine:{marginTop:8,color:night.color.textTertiary,fontSize:night.font.micro,lineHeight:15},group:{marginTop:night.groupGap-8},card:{borderRadius:night.radius.card,borderWidth:StyleSheet.hairlineWidth,borderColor:night.color.border,backgroundColor:night.color.surface,overflow:"hidden"},row:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:night.rowPadH,paddingVertical:13},rowDivider:{borderBottomWidth:StyleSheet.hairlineWidth,borderBottomColor:night.color.separator},rowText:{flex:1,color:night.color.text,fontSize:night.font.body,lineHeight:19},pressed:{backgroundColor:night.color.fill}});
1
+ "use strict";
2
+
3
+ /**
4
+ * The first screen.
5
+ *
6
+ * Written for someone who has never used a devtool. The suggestions are not
7
+ * decoration — they are the fastest way to teach a tester what kind of sentence
8
+ * works here, and they are phrased as outcomes ("why is this screen empty?")
9
+ * rather than as tool names, because the tools are the thing this feature
10
+ * exists to hide.
11
+ */
12
+ import { Pressable, StyleSheet, Text, View } from "react-native";
13
+ import { ChevronRight, night, NightSectionLabel } from "@buoy-gg/shared-ui";
14
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ const isRelease = typeof __DEV__ !== "undefined" && !__DEV__;
16
+ const SUGGESTIONS = ["Why is this screen empty?", "What did the last few network calls return?", "Show me what's saved for this user", "Make the next request to this screen fail with a 500"];
17
+ export function EmptyState({
18
+ configured,
19
+ onPick
20
+ }) {
21
+ if (!configured) {
22
+ return /*#__PURE__*/_jsxs(View, {
23
+ style: styles.wrap,
24
+ testID: "buoy-ask-buoy-unconfigured",
25
+ children: [/*#__PURE__*/_jsx(Text, {
26
+ style: styles.title,
27
+ children: "Not set up yet"
28
+ }), /*#__PURE__*/_jsxs(Text, {
29
+ style: styles.body,
30
+ children: ["Ask Buoy talks to your own company's AI endpoint \u2014 nothing goes to Buoy. A developer needs to add the ", /*#__PURE__*/_jsx(Text, {
31
+ style: styles.code,
32
+ children: "askBuoy"
33
+ }), " prop to", " ", /*#__PURE__*/_jsx(Text, {
34
+ style: styles.code,
35
+ children: "<FloatingDevTools />"
36
+ }), " with your team's endpoint and model."]
37
+ })]
38
+ });
39
+ }
40
+ return /*#__PURE__*/_jsxs(View, {
41
+ style: styles.wrap,
42
+ testID: "buoy-ask-buoy-empty",
43
+ children: [/*#__PURE__*/_jsx(Text, {
44
+ style: styles.title,
45
+ children: "Ask about this app"
46
+ }), /*#__PURE__*/_jsx(Text, {
47
+ style: styles.body,
48
+ children: "Ask what the app is doing right now, or tell it to change something. Anything it changes shows up in a bar at the top, and you can undo it."
49
+ }), /*#__PURE__*/_jsx(Text, {
50
+ style: styles.buildLine,
51
+ testID: "buoy-ask-buoy-build-line",
52
+ children: isRelease ? "Release build — reading, impersonation and navigation work; simulations (forcing server responses, driving the screen) need a dev build." : "Dev build — full simulation available."
53
+ }), /*#__PURE__*/_jsxs(View, {
54
+ style: styles.group,
55
+ children: [/*#__PURE__*/_jsx(NightSectionLabel, {
56
+ children: "Try asking"
57
+ }), /*#__PURE__*/_jsx(View, {
58
+ style: styles.card,
59
+ children: SUGGESTIONS.map((s, i) => /*#__PURE__*/_jsx(Suggestion, {
60
+ text: s,
61
+ onPick: onPick,
62
+ last: i === SUGGESTIONS.length - 1
63
+ }, s))
64
+ })]
65
+ })]
66
+ });
67
+ }
68
+ function Suggestion({
69
+ text,
70
+ onPick,
71
+ last
72
+ }) {
73
+ return /*#__PURE__*/_jsxs(Pressable, {
74
+ testID: `buoy-ask-buoy-suggestion-${text.slice(0, 12)}`,
75
+ accessibilityRole: "button",
76
+ onPress: () => onPick(text),
77
+ style: ({
78
+ pressed
79
+ }) => [styles.row, !last && styles.rowDivider, pressed && styles.pressed],
80
+ children: [/*#__PURE__*/_jsx(Text, {
81
+ style: styles.rowText,
82
+ children: text
83
+ }), /*#__PURE__*/_jsx(ChevronRight, {
84
+ size: 14,
85
+ color: night.color.textTertiary
86
+ })]
87
+ });
88
+ }
89
+ const styles = StyleSheet.create({
90
+ wrap: {
91
+ flex: 1,
92
+ justifyContent: "center",
93
+ paddingHorizontal: night.gutter,
94
+ paddingVertical: 24,
95
+ gap: 8
96
+ },
97
+ title: {
98
+ color: night.color.text,
99
+ fontSize: 22,
100
+ fontWeight: "700",
101
+ letterSpacing: -0.3
102
+ },
103
+ body: {
104
+ color: night.color.textSecondary,
105
+ fontSize: night.font.body,
106
+ lineHeight: 20
107
+ },
108
+ code: {
109
+ color: night.color.text,
110
+ fontFamily: "Menlo"
111
+ },
112
+ buildLine: {
113
+ marginTop: 8,
114
+ color: night.color.textTertiary,
115
+ fontSize: night.font.micro,
116
+ lineHeight: 15
117
+ },
118
+ group: {
119
+ marginTop: night.groupGap - 8
120
+ },
121
+ card: {
122
+ borderRadius: night.radius.card,
123
+ borderWidth: StyleSheet.hairlineWidth,
124
+ borderColor: night.color.border,
125
+ backgroundColor: night.color.surface,
126
+ overflow: "hidden"
127
+ },
128
+ row: {
129
+ flexDirection: "row",
130
+ alignItems: "center",
131
+ gap: 10,
132
+ paddingHorizontal: night.rowPadH,
133
+ paddingVertical: 13
134
+ },
135
+ rowDivider: {
136
+ borderBottomWidth: StyleSheet.hairlineWidth,
137
+ borderBottomColor: night.color.separator
138
+ },
139
+ rowText: {
140
+ flex: 1,
141
+ color: night.color.text,
142
+ fontSize: night.font.body,
143
+ lineHeight: 19
144
+ },
145
+ pressed: {
146
+ backgroundColor: night.color.fill
147
+ }
148
+ });
149
+ //# sourceMappingURL=EmptyState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Pressable","StyleSheet","Text","View","ChevronRight","night","NightSectionLabel","jsx","_jsx","jsxs","_jsxs","isRelease","__DEV__","SUGGESTIONS","EmptyState","configured","onPick","style","styles","wrap","testID","children","title","body","code","buildLine","group","card","map","s","i","Suggestion","text","last","length","slice","accessibilityRole","onPress","pressed","row","rowDivider","rowText","size","color","textTertiary","create","flex","justifyContent","paddingHorizontal","gutter","paddingVertical","gap","fontSize","fontWeight","letterSpacing","textSecondary","font","lineHeight","fontFamily","marginTop","micro","groupGap","borderRadius","radius","borderWidth","hairlineWidth","borderColor","border","backgroundColor","surface","overflow","flexDirection","alignItems","rowPadH","borderBottomWidth","borderBottomColor","separator","fill"],"sourceRoot":"../../../src","sources":["components/EmptyState.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAChE,SAASC,YAAY,EAAEC,KAAK,EAAEC,iBAAiB,QAAQ,oBAA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EAAE/D,KAAK,CAACsC,KAAK,CAAC0B,OAAO;IACpCC,QAAQ,EAAE;EACZ,CAAC;EACD/B,GAAG,EAAE;IACHgC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBrB,GAAG,EAAE,EAAE;IACPH,iBAAiB,EAAE3C,KAAK,CAACoE,OAAO;IAChCvB,eAAe,EAAE;EACnB,CAAC;EACDV,UAAU,EAAE;IACVkC,iBAAiB,EAAEzE,UAAU,CAACgE,aAAa;IAC3CU,iBAAiB,EAAEtE,KAAK,CAACsC,KAAK,CAACiC;EACjC,CAAC;EACDnC,OAAO,EAAE;IAAEK,IAAI,EAAE,CAAC;IAAEH,KAAK,EAAEtC,KAAK,CAACsC,KAAK,CAACX,IAAI;IAAEoB,QAAQ,EAAE/C,KAAK,CAACmD,IAAI,CAACjC,IAAI;IAAEkC,UAAU,EAAE;EAAG,CAAC;EACxFnB,OAAO,EAAE;IAAE8B,eAAe,EAAE/D,KAAK,CAACsC,KAAK,CAACkC;EAAK;AAC/C,CAAC,CAAC","ignoreList":[]}
@@ -1 +1,246 @@
1
- "use strict";import{StyleSheet,Text,View}from"react-native";import{night}from"@buoy-gg/shared-ui";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const isTableRow=e=>/^\s*\|.*\|\s*$/.test(e),isTableRule=e=>/^\s*\|?\s*:?-{2,}:?\s*(\|\s*:?-{2,}:?\s*)*\|?\s*$/.test(e),splitRow=e=>e.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(e=>e.trim());function parseBlocks(e){const t=[];let l=[];const s=()=>{l.length&&t.push({kind:"p",text:l.join(" ")}),l=[]},i=e.split("\n");for(let e=0;e<i.length;e++){const r=i[e].replace(/\s+$/,"");if(!r.trim()){s();continue}if(isTableRow(r)&&i[e+1]&&isTableRule(i[e+1])){s();const l=splitRow(r),o=[];let n=e+2;for(;n<i.length&&isTableRow(i[n]);)o.push(splitRow(i[n])),n++;t.push({kind:"table",header:l,rows:o}),e=n-1;continue}const o=/^#{1,6}\s+(.*)$/.exec(r);if(o){s(),t.push({kind:"h",text:o[1]});continue}const n=/^(\s*)([-*•]|\d+[.)])\s+(.*)$/.exec(r);if(n){s();const e=Math.min(2,Math.floor(n[1].length/2)),l=/^\d/.test(n[2])?n[2].replace(")","."):"•";t.push({kind:"li",text:n[3],marker:l,depth:e});continue}l.push(r.trim())}return s(),t}export function renderInline(e,t){const l=e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1"),s=[],i=/(\*\*[^*]+\*\*|`[^`]+`|\*[^*\s][^*]*\*|_[^_\s][^_]*_)/g;let r,o=0,n=0;for(;r=i.exec(l);){r.index>o&&s.push(l.slice(o,r.index));const e=r[0];e.startsWith("**")?s.push(_jsx(Text,{style:[t,styles.bold],children:e.slice(2,-2)},n++)):e.startsWith("`")?s.push(_jsx(Text,{style:[t,styles.code],children:e.slice(1,-1)},n++)):s.push(_jsx(Text,{style:[t,styles.italic],children:e.slice(1,-1)},n++)),o=r.index+e.length}return o<l.length&&s.push(l.slice(o)),s}export function Markdown({text:e,style:t}){const l=parseBlocks(e);return _jsx(View,{style:styles.wrap,children:l.map((e,l)=>{if("table"===e.kind){const t=e.header.slice(0,4);return _jsxs(View,{style:styles.table,children:[_jsx(View,{style:styles.tableHead,children:t.map((e,t)=>_jsx(Text,{style:[styles.th,0===t&&styles.firstCol],numberOfLines:1,children:e.replace(/\*\*/g,"")},t))}),e.rows.slice(0,12).map((e,l)=>_jsx(View,{style:[styles.tr,l>0&&styles.trDivider],children:t.map((t,l)=>_jsx(Text,{style:[styles.td,0===l&&styles.firstCol,0===l&&styles.tdFirst],numberOfLines:2,children:renderInline((e[l]??"").replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1"),styles.td)},l))},l))]},l)}return"li"===e.kind?_jsxs(View,{style:[styles.li,{paddingLeft:4+14*e.depth}],children:[_jsx(Text,{style:[t,styles.marker],children:e.marker}),_jsx(Text,{style:[t,styles.liText],selectable:!0,children:renderInline(e.text,t)})]},l):_jsx(Text,{style:[t,"h"===e.kind&&styles.bold],selectable:!0,children:renderInline(e.text,t)},l)})})}const styles=StyleSheet.create({wrap:{gap:8},bold:{fontWeight:"600"},italic:{fontStyle:"italic"},code:{fontFamily:"Menlo",fontSize:13,color:night.color.accent,backgroundColor:night.color.fill},li:{flexDirection:"row",gap:8},table:{borderRadius:night.radius.row,borderWidth:StyleSheet.hairlineWidth,borderColor:night.color.border,backgroundColor:night.color.surface,overflow:"hidden"},tableHead:{flexDirection:"row",paddingHorizontal:10,paddingVertical:6,gap:8,backgroundColor:night.color.fill},th:{flex:1,color:night.color.textTertiary,fontSize:night.font.micro,fontWeight:"700",letterSpacing:.6,textTransform:"uppercase"},tr:{flexDirection:"row",paddingHorizontal:10,paddingVertical:7,gap:8},trDivider:{borderTopWidth:StyleSheet.hairlineWidth,borderTopColor:night.color.separator},td:{flex:1,color:night.color.textSecondary,fontSize:night.font.caption,lineHeight:17},tdFirst:{color:night.color.text,fontWeight:"500"},firstCol:{flex:1.3},marker:{color:night.color.textSecondary,minWidth:14,textAlign:"right"},liText:{flex:1}});
1
+ "use strict";
2
+
3
+ /**
4
+ * Just enough Markdown for a chat answer.
5
+ *
6
+ * Models write `**bold**`, bullet lists and `code` whether or not the prompt
7
+ * asks for prose, and the asterisks rendered raw made every answer look like
8
+ * a broken template. This handles the subset a chat actually receives —
9
+ * paragraphs, `-`/`*`/`1.` lists, `#` headings (rendered bold, not huge),
10
+ * bold, italics and inline code — with no dependency and no HTML. Anything it
11
+ * does not understand falls through as plain text, never as a blank.
12
+ */
13
+ import { StyleSheet, Text, View } from "react-native";
14
+ import { night } from "@buoy-gg/shared-ui";
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
+ const isTableRow = l => /^\s*\|.*\|\s*$/.test(l);
17
+ const isTableRule = l => /^\s*\|?\s*:?-{2,}:?\s*(\|\s*:?-{2,}:?\s*)*\|?\s*$/.test(l);
18
+ const splitRow = l => l.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map(c => c.trim());
19
+ function parseBlocks(source) {
20
+ const blocks = [];
21
+ let para = [];
22
+ const flush = () => {
23
+ if (para.length) blocks.push({
24
+ kind: "p",
25
+ text: para.join(" ")
26
+ });
27
+ para = [];
28
+ };
29
+ const lines = source.split("\n");
30
+ for (let li = 0; li < lines.length; li++) {
31
+ const raw = lines[li];
32
+ const line = raw.replace(/\s+$/, "");
33
+ if (!line.trim()) {
34
+ flush();
35
+ continue;
36
+ }
37
+ // A pipe table: header row, a rule row, then body rows.
38
+ if (isTableRow(line) && lines[li + 1] && isTableRule(lines[li + 1])) {
39
+ flush();
40
+ const header = splitRow(line);
41
+ const rows = [];
42
+ let j = li + 2;
43
+ while (j < lines.length && isTableRow(lines[j])) {
44
+ rows.push(splitRow(lines[j]));
45
+ j++;
46
+ }
47
+ blocks.push({
48
+ kind: "table",
49
+ header,
50
+ rows
51
+ });
52
+ li = j - 1;
53
+ continue;
54
+ }
55
+ const heading = /^#{1,6}\s+(.*)$/.exec(line);
56
+ if (heading) {
57
+ flush();
58
+ blocks.push({
59
+ kind: "h",
60
+ text: heading[1]
61
+ });
62
+ continue;
63
+ }
64
+ const bullet = /^(\s*)([-*•]|\d+[.)])\s+(.*)$/.exec(line);
65
+ if (bullet) {
66
+ flush();
67
+ const depth = Math.min(2, Math.floor(bullet[1].length / 2));
68
+ const marker = /^\d/.test(bullet[2]) ? bullet[2].replace(")", ".") : "•";
69
+ blocks.push({
70
+ kind: "li",
71
+ text: bullet[3],
72
+ marker,
73
+ depth
74
+ });
75
+ continue;
76
+ }
77
+ para.push(line.trim());
78
+ }
79
+ flush();
80
+ return blocks;
81
+ }
82
+
83
+ /**
84
+ * `**bold**`, `*italic*` / `_italic_`, `` `code` `` → styled spans. Links and
85
+ * images collapse to their text: a phone chat has nowhere to open a URL, and
86
+ * `![Snorlax](https://raw.githubusercontent.com/…/143.png)` printed raw is
87
+ * three lines of noise for one word of meaning.
88
+ */
89
+ export function renderInline(source, base) {
90
+ const text = source.replace(/!?\[([^\]]*)\]\([^)]*\)/g, "$1");
91
+ const out = [];
92
+ const re = /(\*\*[^*]+\*\*|`[^`]+`|\*[^*\s][^*]*\*|_[^_\s][^_]*_)/g;
93
+ let last = 0;
94
+ let m;
95
+ let i = 0;
96
+ while (m = re.exec(text)) {
97
+ if (m.index > last) out.push(text.slice(last, m.index));
98
+ const tok = m[0];
99
+ if (tok.startsWith("**")) {
100
+ out.push(/*#__PURE__*/_jsx(Text, {
101
+ style: [base, styles.bold],
102
+ children: tok.slice(2, -2)
103
+ }, i++));
104
+ } else if (tok.startsWith("`")) {
105
+ out.push(/*#__PURE__*/_jsx(Text, {
106
+ style: [base, styles.code],
107
+ children: tok.slice(1, -1)
108
+ }, i++));
109
+ } else {
110
+ out.push(/*#__PURE__*/_jsx(Text, {
111
+ style: [base, styles.italic],
112
+ children: tok.slice(1, -1)
113
+ }, i++));
114
+ }
115
+ last = m.index + tok.length;
116
+ }
117
+ if (last < text.length) out.push(text.slice(last));
118
+ return out;
119
+ }
120
+ export function Markdown({
121
+ text,
122
+ style
123
+ }) {
124
+ const blocks = parseBlocks(text);
125
+ return /*#__PURE__*/_jsx(View, {
126
+ style: styles.wrap,
127
+ children: blocks.map((b, i) => {
128
+ if (b.kind === "table") {
129
+ const cols = b.header.slice(0, 4);
130
+ return /*#__PURE__*/_jsxs(View, {
131
+ style: styles.table,
132
+ children: [/*#__PURE__*/_jsx(View, {
133
+ style: styles.tableHead,
134
+ children: cols.map((c, k) => /*#__PURE__*/_jsx(Text, {
135
+ style: [styles.th, k === 0 && styles.firstCol],
136
+ numberOfLines: 1,
137
+ children: c.replace(/\*\*/g, "")
138
+ }, k))
139
+ }), b.rows.slice(0, 12).map((r, ri) => /*#__PURE__*/_jsx(View, {
140
+ style: [styles.tr, ri > 0 && styles.trDivider],
141
+ children: cols.map((_, k) => /*#__PURE__*/_jsx(Text, {
142
+ style: [styles.td, k === 0 && styles.firstCol, k === 0 && styles.tdFirst],
143
+ numberOfLines: 2,
144
+ children: renderInline((r[k] ?? "").replace(/!?\[([^\]]*)\]\([^)]*\)/g, "$1"), styles.td)
145
+ }, k))
146
+ }, ri))]
147
+ }, i);
148
+ }
149
+ if (b.kind === "li") {
150
+ return /*#__PURE__*/_jsxs(View, {
151
+ style: [styles.li, {
152
+ paddingLeft: 4 + b.depth * 14
153
+ }],
154
+ children: [/*#__PURE__*/_jsx(Text, {
155
+ style: [style, styles.marker],
156
+ children: b.marker
157
+ }), /*#__PURE__*/_jsx(Text, {
158
+ style: [style, styles.liText],
159
+ selectable: true,
160
+ children: renderInline(b.text, style)
161
+ })]
162
+ }, i);
163
+ }
164
+ return /*#__PURE__*/_jsx(Text, {
165
+ style: [style, b.kind === "h" && styles.bold],
166
+ selectable: true,
167
+ children: renderInline(b.text, style)
168
+ }, i);
169
+ })
170
+ });
171
+ }
172
+ const styles = StyleSheet.create({
173
+ wrap: {
174
+ gap: 8
175
+ },
176
+ bold: {
177
+ fontWeight: "600"
178
+ },
179
+ italic: {
180
+ fontStyle: "italic"
181
+ },
182
+ code: {
183
+ fontFamily: "Menlo",
184
+ fontSize: 13,
185
+ color: night.color.accent,
186
+ backgroundColor: night.color.fill
187
+ },
188
+ li: {
189
+ flexDirection: "row",
190
+ gap: 8
191
+ },
192
+ table: {
193
+ borderRadius: night.radius.row,
194
+ borderWidth: StyleSheet.hairlineWidth,
195
+ borderColor: night.color.border,
196
+ backgroundColor: night.color.surface,
197
+ overflow: "hidden"
198
+ },
199
+ tableHead: {
200
+ flexDirection: "row",
201
+ paddingHorizontal: 10,
202
+ paddingVertical: 6,
203
+ gap: 8,
204
+ backgroundColor: night.color.fill
205
+ },
206
+ th: {
207
+ flex: 1,
208
+ color: night.color.textTertiary,
209
+ fontSize: night.font.micro,
210
+ fontWeight: "700",
211
+ letterSpacing: 0.6,
212
+ textTransform: "uppercase"
213
+ },
214
+ tr: {
215
+ flexDirection: "row",
216
+ paddingHorizontal: 10,
217
+ paddingVertical: 7,
218
+ gap: 8
219
+ },
220
+ trDivider: {
221
+ borderTopWidth: StyleSheet.hairlineWidth,
222
+ borderTopColor: night.color.separator
223
+ },
224
+ td: {
225
+ flex: 1,
226
+ color: night.color.textSecondary,
227
+ fontSize: night.font.caption,
228
+ lineHeight: 17
229
+ },
230
+ tdFirst: {
231
+ color: night.color.text,
232
+ fontWeight: "500"
233
+ },
234
+ firstCol: {
235
+ flex: 1.3
236
+ },
237
+ marker: {
238
+ color: night.color.textSecondary,
239
+ minWidth: 14,
240
+ textAlign: "right"
241
+ },
242
+ liText: {
243
+ flex: 1
244
+ }
245
+ });
246
+ //# sourceMappingURL=Markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","Text","View","night","jsx","_jsx","jsxs","_jsxs","isTableRow","l","test","isTableRule","splitRow","trim","replace","split","map","c","parseBlocks","source","blocks","para","flush","length","push","kind","text","join","lines","li","raw","line","header","rows","j","heading","exec","bullet","depth","Math","min","floor","marker","renderInline","base","out","re","last","m","i","index","slice","tok","startsWith","style","styles","bold","children","code","italic","Markdown","wrap","b","cols","table","tableHead","k","th","firstCol","numberOfLines","r","ri","tr","trDivider","_","td","tdFirst","paddingLeft","liText","selectable","create","gap","fontWeight","fontStyle","fontFamily","fontSize","color","accent","backgroundColor","fill","flexDirection","borderRadius","radius","row","borderWidth","hairlineWidth","borderColor","border","surface","overflow","paddingHorizontal","paddingVertical","flex","textTertiary","font","micro","letterSpacing","textTransform","borderTopWidth","borderTopColor","separator","textSecondary","caption","lineHeight","minWidth","textAlign"],"sourceRoot":"../../../src","sources":["components/Markdown.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAwB,cAAc;AACrE,SAASC,KAAK,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQ3C,MAAMC,UAAU,GAA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