@btndprojects/loam-ui-native 0.1.0 → 0.2.1

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 (263) hide show
  1. package/README.md +56 -0
  2. package/dist/accordion/index.js +5 -3
  3. package/dist/adaptive/index.js +6 -2
  4. package/dist/alert/index.js +5 -2
  5. package/dist/analyzer/index.js +9 -6
  6. package/dist/announcement/index.js +8 -5
  7. package/dist/audio-player/index.js +5 -3
  8. package/dist/avatar/index.js +5 -2
  9. package/dist/avatar-group/index.js +7 -3
  10. package/dist/badge/index.js +7 -4
  11. package/dist/banner/index.js +5 -2
  12. package/dist/board/index.js +11 -6
  13. package/dist/button/index.js +6 -3
  14. package/dist/camera-permission/index.js +15 -12
  15. package/dist/capture-result/index.js +19 -16
  16. package/dist/card/index.js +6 -3
  17. package/dist/card-form/index.js +12 -8
  18. package/dist/carousel/index.js +4 -2
  19. package/dist/chart/index.js +8 -5
  20. package/dist/charts/index.js +8 -6
  21. package/dist/chat/index.js +16 -0
  22. package/dist/checkbox/index.js +6 -4
  23. package/dist/checklist/index.js +11 -8
  24. package/dist/checkout/index.js +16 -11
  25. package/dist/chip/index.js +7 -4
  26. package/dist/{chunk-XNUVB5OL.js → chunk-2OLKPG4E.js} +92 -28
  27. package/dist/{chunk-RUZHTGKB.js → chunk-2PKYGLQ6.js} +71 -40
  28. package/dist/{chunk-UC2WGUP3.js → chunk-2SWKL3AJ.js} +91 -252
  29. package/dist/{chunk-AI4DWZCD.js → chunk-2SY63FCH.js} +63 -16
  30. package/dist/{chunk-F5XNPWS7.js → chunk-2TXERVVA.js} +92 -35
  31. package/dist/chunk-36EC2T6P.js +581 -0
  32. package/dist/chunk-3DUWIYV5.js +437 -0
  33. package/dist/{chunk-RGQWWKLA.js → chunk-3QMEOFW5.js} +275 -71
  34. package/dist/chunk-3WEZCGHX.js +265 -0
  35. package/dist/chunk-46MMSDGL.js +194 -0
  36. package/dist/{chunk-7O2FMUPT.js → chunk-4IZXHVFJ.js} +297 -92
  37. package/dist/{chunk-LAECSR4H.js → chunk-5LAAAXFP.js} +14 -8
  38. package/dist/{chunk-2A5NIQAK.js → chunk-5RENVKBQ.js} +134 -46
  39. package/dist/{chunk-2ZZ7TDJ4.js → chunk-5UTRIXQ6.js} +37 -31
  40. package/dist/{chunk-LOE5YNN3.js → chunk-5VFZRGVD.js} +37 -10
  41. package/dist/{chunk-52X2VYTD.js → chunk-67IZZ2MJ.js} +115 -60
  42. package/dist/{chunk-UYG5L34B.js → chunk-6YAQBXB3.js} +10 -4
  43. package/dist/{chunk-BTTFCMKG.js → chunk-74FLKD24.js} +94 -23
  44. package/dist/{chunk-ITTYJZWX.js → chunk-7BUIKDD6.js} +73 -18
  45. package/dist/{chunk-FOKG57CR.js → chunk-7OVVSVEZ.js} +273 -109
  46. package/dist/chunk-AEB7KCHQ.js +287 -0
  47. package/dist/chunk-APCWFOZW.js +28 -0
  48. package/dist/chunk-AWKQIE5I.js +139 -0
  49. package/dist/{chunk-VCDBXW5H.js → chunk-B7N4ASYE.js} +86 -42
  50. package/dist/{chunk-IVNRBPGC.js → chunk-C4GTDLRC.js} +104 -20
  51. package/dist/{chunk-4ZAHCY44.js → chunk-C6APNDVA.js} +12 -5
  52. package/dist/{chunk-4SZYY6AN.js → chunk-CMTVNF3D.js} +18 -13
  53. package/dist/{chunk-WVKKJA6U.js → chunk-CPTOADB2.js} +151 -96
  54. package/dist/chunk-D5N5QWI7.js +1325 -0
  55. package/dist/{chunk-IIQTAY3J.js → chunk-DN7MNQIP.js} +113 -29
  56. package/dist/{chunk-47FWHGUN.js → chunk-DVGBZ3TX.js} +84 -23
  57. package/dist/chunk-DW3L54DQ.js +305 -0
  58. package/dist/{chunk-3ARE4TES.js → chunk-E2E3I5W2.js} +69 -18
  59. package/dist/{chunk-DHWADYZX.js → chunk-EDCBJV7J.js} +41 -28
  60. package/dist/{chunk-WSW6ZFAQ.js → chunk-ENP3BMZU.js} +4 -4
  61. package/dist/{chunk-OOPPQH27.js → chunk-EVOIGUBI.js} +43 -19
  62. package/dist/{chunk-VEAYTRPX.js → chunk-EY4DD67D.js} +165 -97
  63. package/dist/{chunk-223Q2T2Q.js → chunk-F3H33DQX.js} +132 -61
  64. package/dist/{chunk-CYRBHQQZ.js → chunk-F5B3UINI.js} +68 -35
  65. package/dist/{chunk-6X6PQ443.js → chunk-FAJI7BSC.js} +20 -9
  66. package/dist/{chunk-MOUJOP55.js → chunk-FUMHAAF3.js} +96 -29
  67. package/dist/{chunk-6HT2LP62.js → chunk-FV6HMP7W.js} +192 -73
  68. package/dist/{chunk-S7F6XLTK.js → chunk-FYWNRX4F.js} +76 -47
  69. package/dist/{chunk-YG3ZJHGU.js → chunk-FZGAAOKS.js} +30 -8
  70. package/dist/{chunk-YDGVJETP.js → chunk-G3AFC24V.js} +1 -1
  71. package/dist/{chunk-EJBDRVIH.js → chunk-G6UESEVN.js} +15 -8
  72. package/dist/chunk-GDKVKNR2.js +339 -0
  73. package/dist/chunk-GEIGMWNF.js +10 -0
  74. package/dist/{chunk-JUAMLEHX.js → chunk-H7DWSL4O.js} +24 -12
  75. package/dist/chunk-HJFFOOJ4.js +1 -0
  76. package/dist/{chunk-RW6ZL2FQ.js → chunk-HJLPZA4X.js} +106 -21
  77. package/dist/chunk-HYEOQWT7.js +647 -0
  78. package/dist/chunk-I2KLQ2HA.js +19 -0
  79. package/dist/{chunk-CJ5EOYZE.js → chunk-I4FHVKEC.js} +11 -5
  80. package/dist/{chunk-JNH2TYIN.js → chunk-IDM7JJMO.js} +19 -5
  81. package/dist/{chunk-O4AEHWII.js → chunk-IPUNJMAQ.js} +141 -49
  82. package/dist/{chunk-J7Q7VCVC.js → chunk-IT6FUXXG.js} +13 -6
  83. package/dist/{chunk-QJJ6MADV.js → chunk-IVKMZ7BB.js} +80 -28
  84. package/dist/{chunk-Z7H7VSFZ.js → chunk-IXKWIFWZ.js} +17 -6
  85. package/dist/chunk-J64KGCGX.js +55 -0
  86. package/dist/chunk-JBMLWFSJ.js +270 -0
  87. package/dist/{chunk-4BXMXBJO.js → chunk-JJLPBRVZ.js} +22 -11
  88. package/dist/chunk-JLC6PM5S.js +406 -0
  89. package/dist/chunk-JUYWSSKW.js +335 -0
  90. package/dist/{chunk-7CFF4HXS.js → chunk-JV5YOTOB.js} +49 -11
  91. package/dist/{chunk-LZLHELAG.js → chunk-KFJGFLMW.js} +29 -8
  92. package/dist/{chunk-O7AE6DAF.js → chunk-KQZ3GLHR.js} +18 -8
  93. package/dist/{chunk-N32RGOA5.js → chunk-LKFC4CS7.js} +80 -24
  94. package/dist/{chunk-YC6WORFL.js → chunk-LMPHCVJJ.js} +82 -50
  95. package/dist/{chunk-3WPW4KUN.js → chunk-LQP4KEXZ.js} +45 -13
  96. package/dist/{chunk-TKQYWZ5V.js → chunk-LUMVGO2K.js} +47 -31
  97. package/dist/{chunk-AWJOCGFZ.js → chunk-M656FYNH.js} +25 -13
  98. package/dist/{chunk-35OFI3JG.js → chunk-MKSNFG7H.js} +73 -20
  99. package/dist/{chunk-4GBOGOTV.js → chunk-NBEF4EPJ.js} +16 -6
  100. package/dist/chunk-NNCOFLNE.js +24 -0
  101. package/dist/{chunk-4YQOR7JM.js → chunk-NTQ2F3AU.js} +73 -20
  102. package/dist/{chunk-QCDXZBC5.js → chunk-O5V4TG3V.js} +126 -44
  103. package/dist/{chunk-U7TFM2JA.js → chunk-OJQUBQWA.js} +3 -3
  104. package/dist/{chunk-VQHPQEUH.js → chunk-OWAMM2DK.js} +13 -6
  105. package/dist/chunk-PID3NJB7.js +405 -0
  106. package/dist/{chunk-66SG2H23.js → chunk-PMMTGBBS.js} +27 -17
  107. package/dist/{chunk-RIBDXGUG.js → chunk-PNF3NKB5.js} +49 -16
  108. package/dist/{chunk-JXJB2X6M.js → chunk-Q6NKEPRE.js} +81 -32
  109. package/dist/chunk-QDZGFXQD.js +176 -0
  110. package/dist/{chunk-SYNOJOQO.js → chunk-QEYFDRHR.js} +60 -26
  111. package/dist/{chunk-VBOXAEPI.js → chunk-QHAITQIF.js} +97 -22
  112. package/dist/{chunk-VXDZFJGP.js → chunk-QHTVYA65.js} +230 -76
  113. package/dist/{chunk-TUTI5HOZ.js → chunk-QIKT7LIB.js} +14 -8
  114. package/dist/{chunk-3ENTMPQY.js → chunk-QP3KMOVF.js} +82 -42
  115. package/dist/{chunk-GNNJ4GCC.js → chunk-QPWDDJJ4.js} +62 -148
  116. package/dist/{chunk-QWCMU5B2.js → chunk-QRUMA22E.js} +205 -80
  117. package/dist/{chunk-ZVFE5QGU.js → chunk-QYPE5JX3.js} +50 -10
  118. package/dist/{chunk-PUPM2YGF.js → chunk-ROCUG24E.js} +76 -36
  119. package/dist/{chunk-NQYBUO3K.js → chunk-RU3ZPNL6.js} +333 -142
  120. package/dist/{chunk-TOXAGRDQ.js → chunk-RXSCIO6W.js} +14 -5
  121. package/dist/{chunk-FIF2M24N.js → chunk-SATMR6SG.js} +631 -203
  122. package/dist/{chunk-4YIP3CWS.js → chunk-SHHY5OMK.js} +7 -5
  123. package/dist/chunk-SKWO3SZF.js +2284 -0
  124. package/dist/{chunk-YF4NSSMT.js → chunk-SWS5JQIF.js} +41 -13
  125. package/dist/{chunk-CUMUNPXY.js → chunk-T5LTPKX6.js} +15 -7
  126. package/dist/{chunk-H6NIOQHK.js → chunk-TDMG26JI.js} +26 -6
  127. package/dist/{chunk-UWFLYMAR.js → chunk-TLCIR6RG.js} +267 -126
  128. package/dist/{chunk-SBMNWWBV.js → chunk-TN2ZNJUI.js} +47 -9
  129. package/dist/{chunk-5YNTNN5A.js → chunk-TQVAIKFD.js} +106 -41
  130. package/dist/chunk-TRGFFU6A.js +1456 -0
  131. package/dist/{chunk-2GK6PHGE.js → chunk-TY4MTKQJ.js} +100 -22
  132. package/dist/{chunk-AZRX6SAC.js → chunk-U23FYWME.js} +15 -7
  133. package/dist/{chunk-PZXZJBMP.js → chunk-U5NLHYV6.js} +26 -12
  134. package/dist/chunk-UQEN55EY.js +1 -0
  135. package/dist/chunk-UQGBTPXH.js +218 -0
  136. package/dist/chunk-UXGIW7OK.js +116 -0
  137. package/dist/{chunk-PJXUJYS6.js → chunk-UYGDJWMN.js} +55 -30
  138. package/dist/{chunk-QDYDBCFP.js → chunk-V2OEB75Z.js} +50 -51
  139. package/dist/{chunk-LSS54GLJ.js → chunk-VAOAKWUK.js} +34 -13
  140. package/dist/{chunk-DM5QUKKO.js → chunk-VDPK5CY4.js} +18 -6
  141. package/dist/chunk-W23G6JLF.js +37 -0
  142. package/dist/{chunk-CDRZHT42.js → chunk-W63AJTM7.js} +276 -12
  143. package/dist/{chunk-XXXEFXY5.js → chunk-W74TXYFB.js} +13 -5
  144. package/dist/{chunk-LRJNDEIA.js → chunk-WRDSPUE7.js} +144 -29
  145. package/dist/{chunk-C2NTXVWM.js → chunk-XBZGDDMR.js} +11 -4
  146. package/dist/{chunk-BV3B2HYZ.js → chunk-XIDTBCBA.js} +189 -131
  147. package/dist/{chunk-DSJBXLUG.js → chunk-XN4KG3P4.js} +348 -153
  148. package/dist/chunk-XQXMLMH3.js +211 -0
  149. package/dist/{chunk-HPPW424V.js → chunk-XTORZWRF.js} +19 -8
  150. package/dist/{chunk-P23EQNRQ.js → chunk-YAAHPATV.js} +181 -30
  151. package/dist/{chunk-KMI5ML5I.js → chunk-YXOAPXMU.js} +57 -18
  152. package/dist/{chunk-RJQOOHT2.js → chunk-ZECZOOSB.js} +59 -28
  153. package/dist/{chunk-QKXCPTFS.js → chunk-ZLTO5VQI.js} +121 -31
  154. package/dist/{chunk-BEDBFJND.js → chunk-ZVATDZOM.js} +16 -18
  155. package/dist/coachmark/index.js +6 -3
  156. package/dist/code-block/index.js +5 -3
  157. package/dist/color-field/index.js +6 -4
  158. package/dist/commerce/index.js +19 -16
  159. package/dist/connectivity/index.js +5 -2
  160. package/dist/context-menu/index.js +5 -3
  161. package/dist/copy-button/index.js +4 -2
  162. package/dist/data-grid/index.js +21 -16
  163. package/dist/date-range-picker/index.js +11 -8
  164. package/dist/description-list/index.js +3 -1
  165. package/dist/dialog/index.js +4 -2
  166. package/dist/empty-state/index.js +4 -2
  167. package/dist/error-summary/index.js +4 -2
  168. package/dist/fab/index.js +5 -2
  169. package/dist/file-manager/index.js +28 -0
  170. package/dist/file-upload/index.js +10 -7
  171. package/dist/filter-bar/index.js +9 -6
  172. package/dist/flow-run/index.js +15 -12
  173. package/dist/form/index.js +5 -3
  174. package/dist/gallery/index.js +5 -2
  175. package/dist/hold-to-confirm/index.js +4 -2
  176. package/dist/index.d.ts +9557 -2985
  177. package/dist/index.js +355 -122
  178. package/dist/infinite-list/index.js +4 -2
  179. package/dist/inline-edit/index.js +6 -4
  180. package/dist/input/index.js +5 -3
  181. package/dist/interactions/index.js +2 -1
  182. package/dist/invoice/index.js +13 -9
  183. package/dist/kbd/index.js +5 -1
  184. package/dist/keyboard/index.js +4 -2
  185. package/dist/list-row/index.js +6 -4
  186. package/dist/log-viewer/index.js +4 -2
  187. package/dist/map-view/index.js +5 -3
  188. package/dist/markdown/index.js +9 -6
  189. package/dist/metric/index.js +7 -4
  190. package/dist/money/index.js +9 -3
  191. package/dist/nav-drawer/index.js +4 -2
  192. package/dist/nav-header/index.js +9 -0
  193. package/dist/navigation/index.js +5 -2
  194. package/dist/notification-center/index.js +12 -10
  195. package/dist/number-roll/index.js +5 -2
  196. package/dist/one-handed/index.js +5 -3
  197. package/dist/os-surfaces/index.js +6 -3
  198. package/dist/otp/index.js +7 -4
  199. package/dist/page-header/index.js +1 -0
  200. package/dist/pagination/index.js +6 -0
  201. package/dist/payment-method/index.js +14 -10
  202. package/dist/payment-status/index.js +17 -14
  203. package/dist/permission/index.js +5 -2
  204. package/dist/picker/index.js +11 -6
  205. package/dist/progress/index.js +6 -3
  206. package/dist/pull-to-refresh/index.js +4 -2
  207. package/dist/radio-group/index.js +6 -4
  208. package/dist/rating/index.js +5 -2
  209. package/dist/receivables/index.js +21 -16
  210. package/dist/refund/index.js +18 -14
  211. package/dist/save-status/index.js +5 -3
  212. package/dist/scroll-area/index.js +3 -1
  213. package/dist/search-field/index.js +8 -0
  214. package/dist/segmented-control/index.js +4 -3
  215. package/dist/sheet/index.js +5 -3
  216. package/dist/skeleton/index.js +3 -1
  217. package/dist/slider/index.js +4 -2
  218. package/dist/sortable/index.js +7 -0
  219. package/dist/spinner/index.js +3 -1
  220. package/dist/split-button/index.js +9 -6
  221. package/dist/spotlight/index.js +3 -1
  222. package/dist/stage-timeline/index.js +5 -3
  223. package/dist/status-dot/index.js +4 -2
  224. package/dist/stepper/index.js +7 -4
  225. package/dist/streaming-text/index.js +3 -2
  226. package/dist/survey/index.js +18 -15
  227. package/dist/switch/index.js +5 -3
  228. package/dist/system-state/index.js +7 -4
  229. package/dist/tab-bar/index.js +5 -2
  230. package/dist/tabs/index.js +4 -2
  231. package/dist/tags-input/index.js +10 -0
  232. package/dist/textarea/index.js +6 -4
  233. package/dist/thinking/index.js +3 -1
  234. package/dist/time-field/index.js +12 -0
  235. package/dist/time-range-control/index.js +22 -0
  236. package/dist/timeline/index.js +4 -2
  237. package/dist/toast/index.js +4 -2
  238. package/dist/toolbar/index.js +4 -2
  239. package/dist/tour/index.js +12 -9
  240. package/dist/truncation-notice/index.js +5 -2
  241. package/dist/update-notice/index.js +12 -9
  242. package/dist/video-player/index.js +5 -2
  243. package/dist/viewfinder/index.js +6 -4
  244. package/dist/widget/index.js +7 -4
  245. package/dist/wizard/index.js +7 -4
  246. package/package.json +13 -12
  247. package/dist/chunk-6N33LFQA.js +0 -35
  248. package/dist/chunk-GDKZTW34.js +0 -395
  249. package/dist/chunk-GL7B2DOW.js +0 -134
  250. package/dist/chunk-NKB7BZYK.js +0 -167
  251. package/dist/chunk-OETCUXQP.js +0 -134
  252. package/dist/chunk-OPXFZ4Y5.js +0 -204
  253. package/dist/chunk-Q72LJOVE.js +0 -169
  254. package/dist/chunk-RNGLIHFA.js +0 -191
  255. package/dist/chunk-RQ3HASCC.js +0 -6
  256. package/dist/chunk-RSOJT5YW.js +0 -124
  257. package/dist/chunk-TKVFVF5D.js +0 -95
  258. package/dist/chunk-XOSCY2CW.js +0 -242
  259. package/dist/header/index.js +0 -5
  260. package/dist/search-bar/index.js +0 -5
  261. /package/dist/{chunk-3ECPOSKO.js → chunk-3UG6JUCV.js} +0 -0
  262. /package/dist/{chunk-JRLTGLN4.js → chunk-5WWRTEPS.js} +0 -0
  263. /package/dist/{chunk-RTIKSY6A.js → chunk-5Z5ZYMOJ.js} +0 -0
@@ -1,17 +1,18 @@
1
- import { Icon } from './chunk-TKVFVF5D.js';
1
+ import { useLabels } from './chunk-APCWFOZW.js';
2
+ import { Icon } from './chunk-UXGIW7OK.js';
2
3
  import * as React from 'react';
3
4
  import { View, Pressable, Text, TextInput, ScrollView } from 'react-native';
4
5
  import { createStyleSheet, useLoamTheme, useStyles } from '@btndprojects/loam-theme-native';
5
6
  import { jsxs, jsx } from 'react/jsx-runtime';
6
7
 
7
8
  var LOG_LEVELS = ["debug", "info", "warn", "error"];
8
- function levelMeta(theme, level) {
9
+ function levelMeta(theme, labels, level) {
9
10
  switch (level) {
10
11
  case "error":
11
12
  return {
12
13
  icon: "alert-circle",
13
- label: "Error",
14
- short: "ERR",
14
+ label: labels.levels.error,
15
+ short: labels.levelsShort.error,
15
16
  bg: theme.color.dangerSoft,
16
17
  fg: theme.color.dangerOnSoft,
17
18
  edge: theme.edge.danger
@@ -19,8 +20,8 @@ function levelMeta(theme, level) {
19
20
  case "warn":
20
21
  return {
21
22
  icon: "alert-triangle",
22
- label: "Warning",
23
- short: "WARN",
23
+ label: labels.levels.warn,
24
+ short: labels.levelsShort.warn,
24
25
  bg: theme.color.warnSoft,
25
26
  fg: theme.color.warnOnSoft,
26
27
  edge: theme.edge.warn
@@ -28,8 +29,8 @@ function levelMeta(theme, level) {
28
29
  case "info":
29
30
  return {
30
31
  icon: "info",
31
- label: "Info",
32
- short: "INFO",
32
+ label: labels.levels.info,
33
+ short: labels.levelsShort.info,
33
34
  bg: theme.color.infoSoft,
34
35
  fg: theme.color.infoOnSoft,
35
36
  edge: theme.edge.info
@@ -37,8 +38,8 @@ function levelMeta(theme, level) {
37
38
  case "debug":
38
39
  return {
39
40
  icon: "code",
40
- label: "Debug",
41
- short: "DBG",
41
+ label: labels.levels.debug,
42
+ short: labels.levelsShort.debug,
42
43
  bg: theme.color.surface3,
43
44
  // Primary ink on the neutral soft tint: `text3` is only ~4.2:1 on
44
45
  // surface-3, short of AA; primary `text` clears it (>12:1 both modes).
@@ -48,6 +49,42 @@ function levelMeta(theme, level) {
48
49
  }
49
50
  }
50
51
  var BOTTOM_THRESHOLD = 8;
52
+ var DEFAULT_LABELS = {
53
+ levels: { error: "Error", warn: "Warning", info: "Info", debug: "Debug" },
54
+ levelsShort: { error: "ERR", warn: "WARN", info: "INFO", debug: "DBG" },
55
+ levelPrefix: (level) => `${level}: `,
56
+ announcement: (level, text) => `${level}: ${text}`,
57
+ filterByLevel: "Filter by level",
58
+ region: "Log output",
59
+ search: "Search log",
60
+ searchPlaceholder: "Search log\u2026",
61
+ invalidPattern: "Invalid pattern",
62
+ noMatches: "No matches",
63
+ matchCount: (current, total) => `${current} of ${total}`,
64
+ searchOptions: "Search options",
65
+ matchCase: "Match case",
66
+ regex: "Regular expression",
67
+ filterMode: "Show only matching lines",
68
+ filterModeGlyph: "Filter",
69
+ timeFormats: { absolute: "Local", relative: "Relative", utc: "UTC" },
70
+ timeFormat: (format) => `Timestamp format: ${format}`,
71
+ timeFormatTitle: "Cycle timestamp format",
72
+ secondsAgo: (n) => `${n}s ago`,
73
+ minutesAgo: (n) => `${n}m ago`,
74
+ hoursAgo: (n) => `${n}h ago`,
75
+ daysAgo: (n) => `${n}d ago`,
76
+ copied: "Copied",
77
+ copyLine: "Copy line",
78
+ copyLines: (count) => `Copy ${count} lines`,
79
+ lineNumber: (n) => `Line ${n}`,
80
+ collapseJson: "Collapse JSON",
81
+ expandJson: "Expand JSON",
82
+ truncated: (hidden, shown) => `${hidden.toLocaleString()} earlier ${hidden === 1 ? "line" : "lines"} hidden \u2014 showing the latest ${shown.toLocaleString()}.`,
83
+ noLevelMatch: "No lines match the selected levels.",
84
+ showAllLevels: "Show all levels",
85
+ empty: "No log lines.",
86
+ jumpToLatest: "Jump to latest"
87
+ };
51
88
  function renderText(text, query, markStyle) {
52
89
  if (!query) return text;
53
90
  const needle = query.toLowerCase();
@@ -79,6 +116,7 @@ function formatLogTime(time) {
79
116
  }
80
117
  function LogViewer({
81
118
  lines,
119
+ labels: labelsProp,
82
120
  follow = true,
83
121
  levelFilter,
84
122
  onLevelFilterChange,
@@ -88,12 +126,14 @@ function LogViewer({
88
126
  maxHeight = 320,
89
127
  showTimestamps = false,
90
128
  maxLines = 2e3,
91
- label = "Log output",
129
+ label: labelOverride,
92
130
  liveRegion = "none",
93
131
  testID,
94
132
  motion: _motion = "full"
95
133
  }) {
96
- const theme = useLoamTheme();
134
+ const labels = useLabels("logViewer", DEFAULT_LABELS, labelsProp);
135
+ const label = labelOverride ?? labels.region;
136
+ const theme = useLoamTheme("log-viewer");
97
137
  const { styles } = useStyles(sheet);
98
138
  const scrollRef = React.useRef(null);
99
139
  const filterControlled = levelFilter !== void 0;
@@ -108,6 +148,11 @@ function LogViewer({
108
148
  onLevelFilterChange?.(next);
109
149
  if (!filterControlled) setInternalFilter(next);
110
150
  };
151
+ const showAllLevels = () => {
152
+ const all = [...LOG_LEVELS];
153
+ onLevelFilterChange?.(all);
154
+ if (!filterControlled) setInternalFilter(all);
155
+ };
111
156
  const setSearch = (value) => {
112
157
  onSearchChange?.(value);
113
158
  if (!searchControlled) setInternalSearch(value);
@@ -134,7 +179,7 @@ function LogViewer({
134
179
  const showJump = follow && paused;
135
180
  const tapSlop = Math.max(0, (theme.tapMin - theme.ctl.md) / 2);
136
181
  const renderLines = () => /* @__PURE__ */ jsx(View, { style: wrap ? styles.linesStretch : void 0, children: visible.map((line) => {
137
- const meta = line.level ? levelMeta(theme, line.level) : null;
182
+ const meta = line.level ? levelMeta(theme, labels, line.level) : null;
138
183
  return /* @__PURE__ */ jsxs(View, { style: styles.line, children: [
139
184
  showTimestamps ? /* @__PURE__ */ jsx(Text, { style: styles.time, children: formatLogTime(line.time) }) : null,
140
185
  meta ? /* @__PURE__ */ jsxs(
@@ -153,8 +198,8 @@ function LogViewer({
153
198
  }) });
154
199
  return /* @__PURE__ */ jsxs(View, { style: styles.root, children: [
155
200
  /* @__PURE__ */ jsxs(View, { style: styles.toolbar, children: [
156
- /* @__PURE__ */ jsx(View, { style: styles.filterGroup, role: "group", accessibilityLabel: "Filter by level", children: LOG_LEVELS.map((level) => {
157
- const meta = levelMeta(theme, level);
201
+ /* @__PURE__ */ jsx(View, { style: styles.filterGroup, role: "group", accessibilityLabel: labels.filterByLevel, children: LOG_LEVELS.map((level) => {
202
+ const meta = levelMeta(theme, labels, level);
158
203
  const on = activeFilter.includes(level);
159
204
  return /* @__PURE__ */ jsxs(
160
205
  Pressable,
@@ -191,8 +236,8 @@ function LogViewer({
191
236
  {
192
237
  value: activeSearch,
193
238
  onChangeText: setSearch,
194
- accessibilityLabel: "Search log",
195
- placeholder: "Search log\u2026",
239
+ accessibilityLabel: labels.search,
240
+ placeholder: labels.searchPlaceholder,
196
241
  placeholderTextColor: theme.color.text3,
197
242
  style: styles.searchInput
198
243
  }
@@ -215,15 +260,24 @@ function LogViewer({
215
260
  style: [styles.surface, { maxHeight }],
216
261
  contentContainerStyle: styles.surfaceContent,
217
262
  children: [
218
- hiddenCount > 0 ? /* @__PURE__ */ jsx(View, { style: styles.notice, accessibilityRole: "text", children: /* @__PURE__ */ jsxs(Text, { style: styles.noticeText, children: [
219
- hiddenCount.toLocaleString(),
220
- " earlier line",
221
- hiddenCount === 1 ? "" : "s",
222
- " hidden \u2014 showing the latest ",
223
- maxLines.toLocaleString(),
224
- "."
225
- ] }) }) : null,
226
- visible.length === 0 ? /* @__PURE__ */ jsx(Text, { style: styles.empty, children: "No log lines." }) : wrap ? renderLines() : (
263
+ hiddenCount > 0 ? /* @__PURE__ */ jsx(View, { style: styles.notice, accessibilityRole: "text", children: /* @__PURE__ */ jsx(Text, { style: styles.noticeText, children: labels.truncated(hiddenCount, maxLines) }) }) : null,
264
+ visible.length === 0 ? lines.length > 0 ? (
265
+ // Lines exist but the level filter hides every one: say so and
266
+ // offer the one-step way back.
267
+ /* @__PURE__ */ jsxs(View, { style: styles.emptyRow, children: [
268
+ /* @__PURE__ */ jsx(Text, { style: styles.empty, children: labels.noLevelMatch }),
269
+ /* @__PURE__ */ jsx(
270
+ Pressable,
271
+ {
272
+ accessibilityRole: "button",
273
+ accessibilityLabel: labels.showAllLevels,
274
+ onPress: showAllLevels,
275
+ hitSlop: { top: tapSlop, bottom: tapSlop },
276
+ children: /* @__PURE__ */ jsx(Text, { style: styles.emptyAction, children: labels.showAllLevels })
277
+ }
278
+ )
279
+ ] })
280
+ ) : /* @__PURE__ */ jsx(Text, { style: styles.empty, children: labels.empty }) : wrap ? renderLines() : (
227
281
  // No-wrap: a horizontal ScrollView lets wide lines scroll sideways
228
282
  // rather than soft-wrapping. Vertical follow stays on the outer view.
229
283
  /* @__PURE__ */ jsx(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: true, focusable: true, children: renderLines() })
@@ -235,12 +289,13 @@ function LogViewer({
235
289
  Pressable,
236
290
  {
237
291
  accessibilityRole: "button",
238
- accessibilityLabel: "Jump to latest",
292
+ accessibilityLabel: labels.jumpToLatest,
239
293
  onPress: jumpToLatest,
294
+ hitSlop: { top: tapSlop, bottom: tapSlop },
240
295
  style: ({ pressed }) => [styles.jump, pressed && { opacity: theme.state.pressedOpacity }],
241
296
  children: [
242
297
  /* @__PURE__ */ jsx(Icon, { name: "arrow-down", size: theme.icon.sm, color: theme.color.accentInk }),
243
- /* @__PURE__ */ jsx(Text, { style: styles.jumpLabel, children: "Jump to latest" })
298
+ /* @__PURE__ */ jsx(Text, { style: styles.jumpLabel, children: labels.jumpToLatest })
244
299
  ]
245
300
  }
246
301
  ) : null
@@ -318,6 +373,15 @@ var sheet = createStyleSheet((theme) => ({
318
373
  paddingHorizontal: theme.space.s3,
319
374
  paddingVertical: theme.space.s2
320
375
  },
376
+ emptyRow: { flexDirection: "row", flexWrap: "wrap", alignItems: "center" },
377
+ emptyAction: {
378
+ fontFamily: theme.font.mono,
379
+ fontSize: theme.type.footnote.fontSize,
380
+ fontWeight: theme.fontWeight.bold,
381
+ color: theme.code.fg,
382
+ textDecorationLine: "underline",
383
+ paddingHorizontal: theme.space.s3
384
+ },
321
385
  line: {
322
386
  flexDirection: "row",
323
387
  alignItems: "flex-start",
@@ -1,7 +1,8 @@
1
- import { Progress } from './chunk-2ZZ7TDJ4.js';
2
- import { Sheet } from './chunk-ZVFE5QGU.js';
3
- import { Button } from './chunk-3ARE4TES.js';
4
- import { Icon } from './chunk-TKVFVF5D.js';
1
+ import { Progress } from './chunk-5UTRIXQ6.js';
2
+ import { Sheet } from './chunk-QYPE5JX3.js';
3
+ import { Button } from './chunk-E2E3I5W2.js';
4
+ import { useLabels } from './chunk-APCWFOZW.js';
5
+ import { Icon } from './chunk-UXGIW7OK.js';
5
6
  import * as React from 'react';
6
7
  import { View, Text, Modal } from 'react-native';
7
8
  import { createStyleSheet, useStyles, useLoamTheme } from '@btndprojects/loam-theme-native';
@@ -9,21 +10,20 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
9
10
 
10
11
  function ReleaseSummary({
11
12
  release,
12
- productName = "Version"
13
+ productName: productNameProp,
14
+ labels: labelsProp
13
15
  }) {
14
16
  const { styles } = useStyles(sheet);
15
- const meta = [release.from ? `from ${release.from}` : null, release.size].filter(Boolean).join(" \xB7 ");
17
+ const labels = useLabels("updateNotice", DEFAULT_LABELS, labelsProp);
18
+ const productName = productNameProp ?? labels.product;
19
+ const meta = [release.from ? labels.fromVersion(release.from) : null, release.size].filter(Boolean).join(" \xB7 ");
16
20
  return /* @__PURE__ */ jsxs(View, { style: styles.summaryRow, children: [
17
- /* @__PURE__ */ jsxs(Text, { style: styles.version, children: [
18
- productName,
19
- " ",
20
- release.version
21
- ] }),
21
+ /* @__PURE__ */ jsx(Text, { style: styles.version, children: labels.versionLine(productName, release.version) }),
22
22
  meta ? /* @__PURE__ */ jsx(Text, { style: styles.meta, children: meta }) : null
23
23
  ] });
24
24
  }
25
25
  function ReleaseNotes({ notes }) {
26
- const theme = useLoamTheme();
26
+ const theme = useLoamTheme("update-notice");
27
27
  const { styles } = useStyles(sheet);
28
28
  if (!notes.length) return null;
29
29
  return /* @__PURE__ */ jsx(View, { style: styles.notes, children: notes.map((n) => /* @__PURE__ */ jsxs(View, { style: styles.noteRow, children: [
@@ -31,19 +31,37 @@ function ReleaseNotes({ notes }) {
31
31
  /* @__PURE__ */ jsx(Text, { style: styles.noteText, children: n })
32
32
  ] }, n)) });
33
33
  }
34
- function ReleaseMeta({ release }) {
34
+ function ReleaseMeta({ release, labels: labelsProp }) {
35
35
  const { styles } = useStyles(sheet);
36
+ const labels = useLabels("updateNotice", DEFAULT_LABELS, labelsProp);
36
37
  const pairs = [
37
- ["Installed", release.from],
38
- ["Required", release.version],
39
- ["Download", release.size]
38
+ [labels.installed, release.from],
39
+ [labels.required, release.version],
40
+ [labels.download, release.size]
40
41
  ];
41
- return /* @__PURE__ */ jsx(View, { style: styles.chips, children: pairs.filter((pair) => Boolean(pair[1])).map(([k, v]) => /* @__PURE__ */ jsx(View, { style: styles.chip, children: /* @__PURE__ */ jsxs(Text, { style: styles.meta, children: [
42
- k,
43
- " \xB7 ",
44
- v
45
- ] }) }, k)) });
42
+ return /* @__PURE__ */ jsx(View, { style: styles.chips, children: pairs.filter((pair) => Boolean(pair[1])).map(([k, v]) => /* @__PURE__ */ jsx(View, { style: styles.chip, children: /* @__PURE__ */ jsx(Text, { style: styles.meta, children: labels.metaItem(k, v) }) }, k)) });
46
43
  }
44
+ var DEFAULT_LABELS = {
45
+ product: "Version",
46
+ versionLine: (product, version) => `${product} ${version}`,
47
+ fromVersion: (version) => `from ${version}`,
48
+ installed: "Installed",
49
+ required: "Required",
50
+ download: "Download",
51
+ metaItem: (caption, value) => `${caption} \xB7 ${value}`,
52
+ updateReady: "Update ready",
53
+ downloading: "Downloading",
54
+ updateAvailable: "Update available",
55
+ downloadProgress: "Download progress",
56
+ progressLine: (percent, timeRemaining) => `${percent}%${timeRemaining ? ` \xB7 ${timeRemaining}` : ""} \xB7 you can keep working`,
57
+ notNow: "Not now",
58
+ cancel: "Cancel",
59
+ appliesOnRestart: "Applies on restart. Your open work is restored.",
60
+ apply: "Restart",
61
+ blockingTitle: "This build can no longer connect.",
62
+ blockingAction: "Update and restart",
63
+ requiredUpdate: "Required update"
64
+ };
47
65
  function UpdateNotice({
48
66
  release,
49
67
  open = true,
@@ -51,16 +69,20 @@ function UpdateNotice({
51
69
  defaultState = "available",
52
70
  onStateChange,
53
71
  progress = 0,
72
+ timeRemaining,
54
73
  onDownload,
55
74
  onCancel,
56
75
  onApply,
57
76
  onSnooze,
58
- applyLabel = "Restart",
59
- productName = "Version",
77
+ applyLabel: applyLabelProp,
78
+ productName,
60
79
  layout = "sheet",
61
- motion = "full"
80
+ motion = "full",
81
+ labels: labelsProp
62
82
  }) {
63
83
  const { styles } = useStyles(sheet);
84
+ const labels = useLabels("updateNotice", DEFAULT_LABELS, labelsProp);
85
+ const applyLabel = applyLabelProp ?? labels.apply;
64
86
  const [uncontrolled, setUncontrolled] = React.useState(defaultState);
65
87
  const state = stateProp ?? uncontrolled;
66
88
  const pct = Math.max(0, Math.min(100, Math.round(progress)));
@@ -68,20 +90,25 @@ function UpdateNotice({
68
90
  if (stateProp === void 0) setUncontrolled(next);
69
91
  onStateChange?.(next);
70
92
  };
71
- const kicker = state === "ready" ? "Update ready" : state === "downloading" ? "Downloading" : "Update available";
93
+ const kicker = state === "ready" ? labels.updateReady : state === "downloading" ? labels.downloading : labels.updateAvailable;
72
94
  const content = /* @__PURE__ */ jsxs(View, { accessibilityLiveRegion: "polite", style: styles.body, children: [
73
95
  /* @__PURE__ */ jsx(Text, { style: styles.kicker, children: kicker }),
74
- /* @__PURE__ */ jsx(ReleaseSummary, { release, productName }),
96
+ /* @__PURE__ */ jsx(ReleaseSummary, { release, productName, labels }),
75
97
  state !== "downloading" ? /* @__PURE__ */ jsx(ReleaseNotes, { notes: release.notes ?? [] }) : null,
76
98
  state === "downloading" ? /* @__PURE__ */ jsxs(View, { style: styles.progressBlock, children: [
77
- /* @__PURE__ */ jsx(Progress, { size: "sm", value: pct, accessibilityLabel: "Download progress", motion }),
78
- /* @__PURE__ */ jsxs(Text, { style: styles.meta, children: [
79
- pct,
80
- "% \xB7 you can keep working"
81
- ] })
99
+ /* @__PURE__ */ jsx(
100
+ Progress,
101
+ {
102
+ size: "sm",
103
+ value: pct,
104
+ accessibilityLabel: labels.downloadProgress,
105
+ motion
106
+ }
107
+ ),
108
+ /* @__PURE__ */ jsx(Text, { style: styles.meta, children: labels.progressLine(pct, timeRemaining) })
82
109
  ] }) : null,
83
110
  /* @__PURE__ */ jsx(View, { style: styles.actions, children: state === "available" ? /* @__PURE__ */ jsxs(Fragment, { children: [
84
- onSnooze ? /* @__PURE__ */ jsx(Button, { size: "lg", variant: "outline", onPress: onSnooze, children: "Not now" }) : null,
111
+ onSnooze ? /* @__PURE__ */ jsx(Button, { size: "lg", variant: "outline", onPress: onSnooze, children: labels.notNow }) : null,
85
112
  /* @__PURE__ */ jsx(View, { style: styles.grow }),
86
113
  /* @__PURE__ */ jsx(
87
114
  Button,
@@ -93,7 +120,7 @@ function UpdateNotice({
93
120
  go("downloading");
94
121
  onDownload?.();
95
122
  },
96
- children: "Download"
123
+ children: labels.download
97
124
  }
98
125
  )
99
126
  ] }) : state === "downloading" ? /* @__PURE__ */ jsx(
@@ -105,10 +132,10 @@ function UpdateNotice({
105
132
  go("available");
106
133
  onCancel?.();
107
134
  },
108
- children: "Cancel"
135
+ children: labels.cancel
109
136
  }
110
137
  ) : /* @__PURE__ */ jsxs(Fragment, { children: [
111
- /* @__PURE__ */ jsx(Text, { style: styles.applyNote, children: "Applies on restart. Your open work is restored." }),
138
+ /* @__PURE__ */ jsx(Text, { style: styles.applyNote, children: labels.appliesOnRestart }),
112
139
  /* @__PURE__ */ jsx(Button, { size: "lg", variant: "primary", leadingIcon: "refresh", onPress: onApply, children: applyLabel })
113
140
  ] }) })
114
141
  ] });
@@ -118,11 +145,15 @@ function UpdateNotice({
118
145
  function BlockingUpdate({
119
146
  open = true,
120
147
  release,
121
- title = "This build can no longer connect.",
122
- actionLabel = "Update and restart",
123
- onApply
148
+ title: titleProp,
149
+ actionLabel: actionLabelProp,
150
+ onApply,
151
+ labels: labelsProp
124
152
  }) {
125
153
  const { styles } = useStyles(sheet);
154
+ const labels = useLabels("updateNotice", DEFAULT_LABELS, labelsProp);
155
+ const title = titleProp ?? labels.blockingTitle;
156
+ const actionLabel = actionLabelProp ?? labels.blockingAction;
126
157
  return /* @__PURE__ */ jsx(
127
158
  Modal,
128
159
  {
@@ -132,10 +163,10 @@ function BlockingUpdate({
132
163
  onRequestClose: () => {
133
164
  },
134
165
  children: /* @__PURE__ */ jsx(View, { style: styles.blockScrim, children: /* @__PURE__ */ jsxs(View, { accessibilityRole: "alert", accessibilityViewIsModal: true, style: styles.blockCard, children: [
135
- /* @__PURE__ */ jsx(Text, { style: styles.blockKicker, children: "Required update" }),
166
+ /* @__PURE__ */ jsx(Text, { style: styles.blockKicker, children: labels.requiredUpdate }),
136
167
  /* @__PURE__ */ jsx(Text, { style: styles.blockTitle, children: title }),
137
168
  release.reason ? /* @__PURE__ */ jsx(Text, { style: styles.blockReason, children: release.reason }) : null,
138
- /* @__PURE__ */ jsx(ReleaseMeta, { release }),
169
+ /* @__PURE__ */ jsx(ReleaseMeta, { release, labels }),
139
170
  /* @__PURE__ */ jsx(Button, { size: "lg", fullWidth: true, variant: "primary", leadingIcon: "download", onPress: onApply, children: actionLabel })
140
171
  ] }) })
141
172
  }