@fbincon/claude-code-statusline 0.0.0-stage → 3.0.0

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 (648) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE-Unicode.txt +39 -0
  3. package/LICENSE-Wcwidth.txt +27 -0
  4. package/README.md +420 -2
  5. package/bin/claude-statusline.js +2 -0
  6. package/candidate.json +1244 -0
  7. package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.d.ts +35 -0
  8. package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.js +228 -0
  9. package/node_modules/@fbincon/statusline-cli/dist/src/config/arguments.js.map +1 -0
  10. package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.d.ts +6 -0
  11. package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.js +72 -0
  12. package/node_modules/@fbincon/statusline-cli/dist/src/config/backend-preferences.js.map +1 -0
  13. package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.d.ts +10 -0
  14. package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.js +140 -0
  15. package/node_modules/@fbincon/statusline-cli/dist/src/config/commands.js.map +1 -0
  16. package/node_modules/@fbincon/statusline-cli/dist/src/config/host.d.ts +10 -0
  17. package/node_modules/@fbincon/statusline-cli/dist/src/config/host.js +101 -0
  18. package/node_modules/@fbincon/statusline-cli/dist/src/config/host.js.map +1 -0
  19. package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.d.ts +10 -0
  20. package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js +96 -0
  21. package/node_modules/@fbincon/statusline-cli/dist/src/config/operations.js.map +1 -0
  22. package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.d.ts +11 -0
  23. package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.js +80 -0
  24. package/node_modules/@fbincon/statusline-cli/dist/src/config/preferences.js.map +1 -0
  25. package/node_modules/@fbincon/statusline-cli/dist/src/config/service.d.ts +45 -0
  26. package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js +99 -0
  27. package/node_modules/@fbincon/statusline-cli/dist/src/config/service.js.map +1 -0
  28. package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.d.ts +30 -0
  29. package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.js +134 -0
  30. package/node_modules/@fbincon/statusline-cli/dist/src/config/storage.js.map +1 -0
  31. package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.d.ts +3 -0
  32. package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js +89 -0
  33. package/node_modules/@fbincon/statusline-cli/dist/src/config/transfer.js.map +1 -0
  34. package/node_modules/@fbincon/statusline-cli/dist/src/context.d.ts +11 -0
  35. package/node_modules/@fbincon/statusline-cli/dist/src/context.js +2 -0
  36. package/node_modules/@fbincon/statusline-cli/dist/src/context.js.map +1 -0
  37. package/node_modules/@fbincon/statusline-cli/dist/src/entry.d.ts +1 -0
  38. package/node_modules/@fbincon/statusline-cli/dist/src/entry.js +3 -0
  39. package/node_modules/@fbincon/statusline-cli/dist/src/entry.js.map +1 -0
  40. package/node_modules/@fbincon/statusline-cli/dist/src/errors.d.ts +4 -0
  41. package/node_modules/@fbincon/statusline-cli/dist/src/errors.js +8 -0
  42. package/node_modules/@fbincon/statusline-cli/dist/src/errors.js.map +1 -0
  43. package/node_modules/@fbincon/statusline-cli/dist/src/help.d.ts +3 -0
  44. package/node_modules/@fbincon/statusline-cli/dist/src/help.js +67 -0
  45. package/node_modules/@fbincon/statusline-cli/dist/src/help.js.map +1 -0
  46. package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.d.ts +10 -0
  47. package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js +40 -0
  48. package/node_modules/@fbincon/statusline-cli/dist/src/integration/arguments.js.map +1 -0
  49. package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.d.ts +3 -0
  50. package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js +63 -0
  51. package/node_modules/@fbincon/statusline-cli/dist/src/integration/configure.js.map +1 -0
  52. package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.d.ts +4 -0
  53. package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.js +153 -0
  54. package/node_modules/@fbincon/statusline-cli/dist/src/integration/doctor.js.map +1 -0
  55. package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.d.ts +14 -0
  56. package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.js +3 -0
  57. package/node_modules/@fbincon/statusline-cli/dist/src/integration/editor.js.map +1 -0
  58. package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.d.ts +6 -0
  59. package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js +142 -0
  60. package/node_modules/@fbincon/statusline-cli/dist/src/integration/install.js.map +1 -0
  61. package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.d.ts +15 -0
  62. package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.js +91 -0
  63. package/node_modules/@fbincon/statusline-cli/dist/src/integration/launcher.js.map +1 -0
  64. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.d.ts +20 -0
  65. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.js +109 -0
  66. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mod-ownership.js.map +1 -0
  67. package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.d.ts +60 -0
  68. package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.js +12 -0
  69. package/node_modules/@fbincon/statusline-cli/dist/src/integration/model.js.map +1 -0
  70. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.d.ts +10 -0
  71. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.js +234 -0
  72. package/node_modules/@fbincon/statusline-cli/dist/src/integration/mods.js.map +1 -0
  73. package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.d.ts +8 -0
  74. package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.js +41 -0
  75. package/node_modules/@fbincon/statusline-cli/dist/src/integration/ownership.js.map +1 -0
  76. package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.d.ts +1 -0
  77. package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.js +14 -0
  78. package/node_modules/@fbincon/statusline-cli/dist/src/integration/paths.js.map +1 -0
  79. package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.d.ts +13 -0
  80. package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.js +92 -0
  81. package/node_modules/@fbincon/statusline-cli/dist/src/integration/plan.js.map +1 -0
  82. package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.d.ts +19 -0
  83. package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.js +91 -0
  84. package/node_modules/@fbincon/statusline-cli/dist/src/integration/resources.js.map +1 -0
  85. package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.d.ts +6 -0
  86. package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.js +94 -0
  87. package/node_modules/@fbincon/statusline-cli/dist/src/integration/slash-hook.js.map +1 -0
  88. package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.d.ts +8 -0
  89. package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.js +3 -0
  90. package/node_modules/@fbincon/statusline-cli/dist/src/integration/transaction.js.map +1 -0
  91. package/node_modules/@fbincon/statusline-cli/dist/src/main.d.ts +22 -0
  92. package/node_modules/@fbincon/statusline-cli/dist/src/main.js +197 -0
  93. package/node_modules/@fbincon/statusline-cli/dist/src/main.js.map +1 -0
  94. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.d.ts +7 -0
  95. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.js +134 -0
  96. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/files.js.map +1 -0
  97. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.d.ts +58 -0
  98. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js +144 -0
  99. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/journal.js.map +1 -0
  100. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.d.ts +5 -0
  101. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.js +125 -0
  102. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/official.js.map +1 -0
  103. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.d.ts +11 -0
  104. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.js +55 -0
  105. package/node_modules/@fbincon/statusline-cli/dist/src/recovery/service.js.map +1 -0
  106. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.d.ts +15 -0
  107. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.js +95 -0
  108. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/environment.js.map +1 -0
  109. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.d.ts +6 -0
  110. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js +48 -0
  111. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/main.js.map +1 -0
  112. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.d.ts +2 -0
  113. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.js +13 -0
  114. package/node_modules/@fbincon/statusline-cli/dist/src/rendering/preview.js.map +1 -0
  115. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.d.ts +11 -0
  116. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.js +11 -0
  117. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/context.js.map +1 -0
  118. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.d.ts +19 -0
  119. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.js +162 -0
  120. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/git.js.map +1 -0
  121. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.d.ts +3 -0
  122. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.js +19 -0
  123. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/hook.js.map +1 -0
  124. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.d.ts +37 -0
  125. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.js +75 -0
  126. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/io.js.map +1 -0
  127. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.d.ts +9 -0
  128. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.js +241 -0
  129. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/json-data.js.map +1 -0
  130. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.d.ts +2 -0
  131. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.js +14 -0
  132. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/collect.js.map +1 -0
  133. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.d.ts +15 -0
  134. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.js +69 -0
  135. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/durations.js.map +1 -0
  136. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.d.ts +16 -0
  137. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.js +90 -0
  138. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/protocol.js.map +1 -0
  139. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.d.ts +25 -0
  140. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.js +80 -0
  141. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/live/store.js.map +1 -0
  142. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.d.ts +4 -0
  143. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.js +40 -0
  144. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/registry.js.map +1 -0
  145. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.d.ts +5 -0
  146. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.js +59 -0
  147. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/collect.js.map +1 -0
  148. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.d.ts +17 -0
  149. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.js +69 -0
  150. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/service.js.map +1 -0
  151. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.d.ts +17 -0
  152. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.js +70 -0
  153. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/store.js.map +1 -0
  154. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.d.ts +13 -0
  155. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.js +75 -0
  156. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/tasks/submissions.js.map +1 -0
  157. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.d.ts +33 -0
  158. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.js +227 -0
  159. package/node_modules/@fbincon/statusline-cli/dist/src/runtime/usage.js.map +1 -0
  160. package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.d.ts +20 -0
  161. package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js +144 -0
  162. package/node_modules/@fbincon/statusline-cli/dist/src/ui/protocol.js.map +1 -0
  163. package/node_modules/@fbincon/statusline-cli/package.json +17 -0
  164. package/node_modules/@fbincon/statusline-cli/resources/statusline-config/SKILL.md +80 -0
  165. package/node_modules/@fbincon/statusline-cli/resources/statusline-configure/SKILL.md +19 -0
  166. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/.claude-plugin/plugin.json +37 -0
  167. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/hooks.json +6 -0
  168. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/hooks/register.ts +820 -0
  169. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/backend.ts +503 -0
  170. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/forms.ts +3 -0
  171. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/keys.ts +198 -0
  172. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/messages.ts +101 -0
  173. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/client/settings.ts +218 -0
  174. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/appearance.ts +29 -0
  175. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/draft.ts +254 -0
  176. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/forms.ts +167 -0
  177. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/guidance.ts +20 -0
  178. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/import-review.ts +55 -0
  179. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/instances.ts +30 -0
  180. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/navigation.ts +98 -0
  181. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/numeric.ts +42 -0
  182. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/editor/search.ts +114 -0
  183. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-contracts.ts +276 -0
  184. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/generated-unicode.ts +92 -0
  185. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/generated-locales.ts +6842 -0
  186. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/index.ts +40 -0
  187. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/messages.ts +33 -0
  188. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/i18n/presentation.ts +62 -0
  189. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/launch.ts +25 -0
  190. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/preferences.ts +61 -0
  191. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/preview-preferences.ts +8 -0
  192. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/session.ts +124 -0
  193. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/lib/unicode.ts +121 -0
  194. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/resource-manifest.json +47 -0
  195. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/draw.ts +159 -0
  196. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/help.ts +84 -0
  197. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/client/surface.ts +89 -0
  198. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/catalog.ts +23 -0
  199. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/preview.ts +45 -0
  200. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/section.ts +49 -0
  201. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/components/shortcuts.ts +83 -0
  202. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/layout.ts +49 -0
  203. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/styled-text.ts +56 -0
  204. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/text.ts +23 -0
  205. package/node_modules/@fbincon/statusline-cli/resources/statusline-native/ui/theme.ts +27 -0
  206. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/.claude-plugin/plugin.json +49 -0
  207. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/hooks/hooks.json +1 -0
  208. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/hooks/observe.ts +279 -0
  209. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/checklists.ts +45 -0
  210. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/costs.ts +23 -0
  211. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/generated-contracts.ts +18 -0
  212. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/identity.ts +14 -0
  213. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/launch.ts +25 -0
  214. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/queue.ts +68 -0
  215. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/streams.ts +28 -0
  216. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/lib/timing.ts +11 -0
  217. package/node_modules/@fbincon/statusline-cli/resources/statusline-runtime/resource-manifest.json +19 -0
  218. package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.d.ts +14 -0
  219. package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.js +72 -0
  220. package/node_modules/@fbincon/statusline-core/dist/src/config/backend-preferences.js.map +1 -0
  221. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.d.ts +86 -0
  222. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.js +3462 -0
  223. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog-data.js.map +1 -0
  224. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.d.ts +10 -0
  225. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.js +17 -0
  226. package/node_modules/@fbincon/statusline-core/dist/src/config/catalog.js.map +1 -0
  227. package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.d.ts +5 -0
  228. package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js +19 -0
  229. package/node_modules/@fbincon/statusline-core/dist/src/config/defaults.js.map +1 -0
  230. package/node_modules/@fbincon/statusline-core/dist/src/config/display.d.ts +13 -0
  231. package/node_modules/@fbincon/statusline-core/dist/src/config/display.js +232 -0
  232. package/node_modules/@fbincon/statusline-core/dist/src/config/display.js.map +1 -0
  233. package/node_modules/@fbincon/statusline-core/dist/src/config/draft.d.ts +4 -0
  234. package/node_modules/@fbincon/statusline-core/dist/src/config/draft.js +48 -0
  235. package/node_modules/@fbincon/statusline-core/dist/src/config/draft.js.map +1 -0
  236. package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.d.ts +8 -0
  237. package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.js +104 -0
  238. package/node_modules/@fbincon/statusline-core/dist/src/config/editor-fields.js.map +1 -0
  239. package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.d.ts +11 -0
  240. package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js +99 -0
  241. package/node_modules/@fbincon/statusline-core/dist/src/config/formatting.js.map +1 -0
  242. package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.d.ts +36 -0
  243. package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.js +5 -0
  244. package/node_modules/@fbincon/statusline-core/dist/src/config/generated-constants.js.map +1 -0
  245. package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.d.ts +4 -0
  246. package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.js +80 -0
  247. package/node_modules/@fbincon/statusline-core/dist/src/config/import-review.js.map +1 -0
  248. package/node_modules/@fbincon/statusline-core/dist/src/config/instances.d.ts +29 -0
  249. package/node_modules/@fbincon/statusline-core/dist/src/config/instances.js +159 -0
  250. package/node_modules/@fbincon/statusline-core/dist/src/config/instances.js.map +1 -0
  251. package/node_modules/@fbincon/statusline-core/dist/src/config/presets.d.ts +10 -0
  252. package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js +34 -0
  253. package/node_modules/@fbincon/statusline-core/dist/src/config/presets.js.map +1 -0
  254. package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.d.ts +6 -0
  255. package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.js +23 -0
  256. package/node_modules/@fbincon/statusline-core/dist/src/config/transfer.js.map +1 -0
  257. package/node_modules/@fbincon/statusline-core/dist/src/config/validation.d.ts +15 -0
  258. package/node_modules/@fbincon/statusline-core/dist/src/config/validation.js +55 -0
  259. package/node_modules/@fbincon/statusline-core/dist/src/config/validation.js.map +1 -0
  260. package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.d.ts +33 -0
  261. package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js +5 -0
  262. package/node_modules/@fbincon/statusline-core/dist/src/contracts/generated-catalog.js.map +1 -0
  263. package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.d.ts +18 -0
  264. package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.js +3 -0
  265. package/node_modules/@fbincon/statusline-core/dist/src/contracts/runtime.js.map +1 -0
  266. package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.d.ts +663 -0
  267. package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js +23 -0
  268. package/node_modules/@fbincon/statusline-core/dist/src/contracts/ui.js.map +1 -0
  269. package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.d.ts +5 -0
  270. package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.js +27 -0
  271. package/node_modules/@fbincon/statusline-core/dist/src/editor/appearance.js.map +1 -0
  272. package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.d.ts +18 -0
  273. package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js +401 -0
  274. package/node_modules/@fbincon/statusline-core/dist/src/editor/backend.js.map +1 -0
  275. package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.d.ts +73 -0
  276. package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js +251 -0
  277. package/node_modules/@fbincon/statusline-core/dist/src/editor/draft.js.map +1 -0
  278. package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.d.ts +26 -0
  279. package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js +146 -0
  280. package/node_modules/@fbincon/statusline-core/dist/src/editor/forms.js.map +1 -0
  281. package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.d.ts +3 -0
  282. package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.js +17 -0
  283. package/node_modules/@fbincon/statusline-core/dist/src/editor/guidance.js.map +1 -0
  284. package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.d.ts +19 -0
  285. package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.js +53 -0
  286. package/node_modules/@fbincon/statusline-core/dist/src/editor/import-review.js.map +1 -0
  287. package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.d.ts +4 -0
  288. package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.js +36 -0
  289. package/node_modules/@fbincon/statusline-core/dist/src/editor/instances.js.map +1 -0
  290. package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.d.ts +37 -0
  291. package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.js +73 -0
  292. package/node_modules/@fbincon/statusline-core/dist/src/editor/navigation.js.map +1 -0
  293. package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.d.ts +11 -0
  294. package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.js +27 -0
  295. package/node_modules/@fbincon/statusline-core/dist/src/editor/numeric.js.map +1 -0
  296. package/node_modules/@fbincon/statusline-core/dist/src/editor/search.d.ts +22 -0
  297. package/node_modules/@fbincon/statusline-core/dist/src/editor/search.js +122 -0
  298. package/node_modules/@fbincon/statusline-core/dist/src/editor/search.js.map +1 -0
  299. package/node_modules/@fbincon/statusline-core/dist/src/editor/text.d.ts +2 -0
  300. package/node_modules/@fbincon/statusline-core/dist/src/editor/text.js +30 -0
  301. package/node_modules/@fbincon/statusline-core/dist/src/editor/text.js.map +1 -0
  302. package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.d.ts +6841 -0
  303. package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js +6841 -0
  304. package/node_modules/@fbincon/statusline-core/dist/src/i18n/generated-locales.js.map +1 -0
  305. package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.d.ts +16 -0
  306. package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.js +38 -0
  307. package/node_modules/@fbincon/statusline-core/dist/src/i18n/messages.js.map +1 -0
  308. package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.d.ts +3 -0
  309. package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.js +4 -0
  310. package/node_modules/@fbincon/statusline-core/dist/src/i18n/registry.js.map +1 -0
  311. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.d.ts +222 -0
  312. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js +224 -0
  313. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/en.js.map +1 -0
  314. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.d.ts +222 -0
  315. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js +224 -0
  316. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ja.js.map +1 -0
  317. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.d.ts +222 -0
  318. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js +224 -0
  319. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/ko.js.map +1 -0
  320. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.d.ts +222 -0
  321. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js +224 -0
  322. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-CN.js.map +1 -0
  323. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.d.ts +222 -0
  324. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.js +224 -0
  325. package/node_modules/@fbincon/statusline-core/dist/src/i18n/statusline/zh-Hant.js.map +1 -0
  326. package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.d.ts +9 -0
  327. package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.js +27 -0
  328. package/node_modules/@fbincon/statusline-core/dist/src/integration/binding.js.map +1 -0
  329. package/node_modules/@fbincon/statusline-core/dist/src/json-equality.d.ts +2 -0
  330. package/node_modules/@fbincon/statusline-core/dist/src/json-equality.js +31 -0
  331. package/node_modules/@fbincon/statusline-core/dist/src/json-equality.js.map +1 -0
  332. package/node_modules/@fbincon/statusline-core/dist/src/json-read.d.ts +9 -0
  333. package/node_modules/@fbincon/statusline-core/dist/src/json-read.js +137 -0
  334. package/node_modules/@fbincon/statusline-core/dist/src/json-read.js.map +1 -0
  335. package/node_modules/@fbincon/statusline-core/dist/src/json-text.d.ts +9 -0
  336. package/node_modules/@fbincon/statusline-core/dist/src/json-text.js +56 -0
  337. package/node_modules/@fbincon/statusline-core/dist/src/json-text.js.map +1 -0
  338. package/node_modules/@fbincon/statusline-core/dist/src/json.d.ts +18 -0
  339. package/node_modules/@fbincon/statusline-core/dist/src/json.js +165 -0
  340. package/node_modules/@fbincon/statusline-core/dist/src/json.js.map +1 -0
  341. package/node_modules/@fbincon/statusline-core/dist/src/numbers.d.ts +4 -0
  342. package/node_modules/@fbincon/statusline-core/dist/src/numbers.js +47 -0
  343. package/node_modules/@fbincon/statusline-core/dist/src/numbers.js.map +1 -0
  344. package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.d.ts +21 -0
  345. package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.js +105 -0
  346. package/node_modules/@fbincon/statusline-core/dist/src/ordered-record.js.map +1 -0
  347. package/node_modules/@fbincon/statusline-core/dist/src/release.d.ts +7 -0
  348. package/node_modules/@fbincon/statusline-core/dist/src/release.js +14 -0
  349. package/node_modules/@fbincon/statusline-core/dist/src/release.js.map +1 -0
  350. package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.d.ts +10 -0
  351. package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js +73 -0
  352. package/node_modules/@fbincon/statusline-core/dist/src/rendering/appearance.js.map +1 -0
  353. package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.d.ts +2 -0
  354. package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.js +50 -0
  355. package/node_modules/@fbincon/statusline-core/dist/src/rendering/coercion.js.map +1 -0
  356. package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.d.ts +3 -0
  357. package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.js +36 -0
  358. package/node_modules/@fbincon/statusline-core/dist/src/rendering/colors.js.map +1 -0
  359. package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.d.ts +10 -0
  360. package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js +49 -0
  361. package/node_modules/@fbincon/statusline-core/dist/src/rendering/components.js.map +1 -0
  362. package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.d.ts +36 -0
  363. package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.js +2 -0
  364. package/node_modules/@fbincon/statusline-core/dist/src/rendering/context.js.map +1 -0
  365. package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.d.ts +10 -0
  366. package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.js +58 -0
  367. package/node_modules/@fbincon/statusline-core/dist/src/rendering/formatters.js.map +1 -0
  368. package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.d.ts +7 -0
  369. package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.js +34 -0
  370. package/node_modules/@fbincon/statusline-core/dist/src/rendering/git.js.map +1 -0
  371. package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.d.ts +49 -0
  372. package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js +399 -0
  373. package/node_modules/@fbincon/statusline-core/dist/src/rendering/items.js.map +1 -0
  374. package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.d.ts +13 -0
  375. package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.js +36 -0
  376. package/node_modules/@fbincon/statusline-core/dist/src/rendering/language.js.map +1 -0
  377. package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.d.ts +19 -0
  378. package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.js +176 -0
  379. package/node_modules/@fbincon/statusline-core/dist/src/rendering/layout.js.map +1 -0
  380. package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.d.ts +4 -0
  381. package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.js +29 -0
  382. package/node_modules/@fbincon/statusline-core/dist/src/rendering/live.js.map +1 -0
  383. package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.d.ts +13 -0
  384. package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.js +93 -0
  385. package/node_modules/@fbincon/statusline-core/dist/src/rendering/metrics.js.map +1 -0
  386. package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.d.ts +3 -0
  387. package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.js +46 -0
  388. package/node_modules/@fbincon/statusline-core/dist/src/rendering/numeric-format.js.map +1 -0
  389. package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.d.ts +23 -0
  390. package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.js +9 -0
  391. package/node_modules/@fbincon/statusline-core/dist/src/rendering/palette.js.map +1 -0
  392. package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.d.ts +10 -0
  393. package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js +76 -0
  394. package/node_modules/@fbincon/statusline-core/dist/src/rendering/powerline.js.map +1 -0
  395. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.d.ts +14 -0
  396. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js +98 -0
  397. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preferences.js.map +1 -0
  398. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.d.ts +67 -0
  399. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.js +36 -0
  400. package/node_modules/@fbincon/statusline-core/dist/src/rendering/preview.js.map +1 -0
  401. package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.d.ts +8 -0
  402. package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.js +14 -0
  403. package/node_modules/@fbincon/statusline-core/dist/src/rendering/spans.js.map +1 -0
  404. package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.d.ts +24 -0
  405. package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.js +116 -0
  406. package/node_modules/@fbincon/statusline-core/dist/src/rendering/styles.js.map +1 -0
  407. package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.d.ts +13 -0
  408. package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js +305 -0
  409. package/node_modules/@fbincon/statusline-core/dist/src/rendering/subagents.js.map +1 -0
  410. package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.d.ts +8 -0
  411. package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.js +33 -0
  412. package/node_modules/@fbincon/statusline-core/dist/src/rendering/timer.js.map +1 -0
  413. package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.d.ts +4 -0
  414. package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.js +52 -0
  415. package/node_modules/@fbincon/statusline-core/dist/src/rendering/visibility.js.map +1 -0
  416. package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.d.ts +9 -0
  417. package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.js +115 -0
  418. package/node_modules/@fbincon/statusline-core/dist/src/runtime/git.js.map +1 -0
  419. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.d.ts +4 -0
  420. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.js +104 -0
  421. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/bindings.js.map +1 -0
  422. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.d.ts +27 -0
  423. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.js +196 -0
  424. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/model.js.map +1 -0
  425. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.d.ts +6 -0
  426. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.js +45 -0
  427. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/ownership.js.map +1 -0
  428. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.d.ts +5 -0
  429. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.js +228 -0
  430. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/reducer.js.map +1 -0
  431. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.d.ts +24 -0
  432. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.js +145 -0
  433. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/requests.js.map +1 -0
  434. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.d.ts +6 -0
  435. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.js +70 -0
  436. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/snapshot.js.map +1 -0
  437. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.d.ts +36 -0
  438. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.js +110 -0
  439. package/node_modules/@fbincon/statusline-core/dist/src/runtime/live/state.js.map +1 -0
  440. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.d.ts +8 -0
  441. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.js +75 -0
  442. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/agents.js.map +1 -0
  443. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.d.ts +10 -0
  444. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.js +121 -0
  445. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/hooks.js.map +1 -0
  446. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.d.ts +43 -0
  447. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.js +198 -0
  448. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/model.js.map +1 -0
  449. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.d.ts +6 -0
  450. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.js +192 -0
  451. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/native.js.map +1 -0
  452. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.d.ts +16 -0
  453. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.js +245 -0
  454. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/transitions.js.map +1 -0
  455. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.d.ts +4 -0
  456. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.js +28 -0
  457. package/node_modules/@fbincon/statusline-core/dist/src/runtime/tasks/view.js.map +1 -0
  458. package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.d.ts +26 -0
  459. package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.js +183 -0
  460. package/node_modules/@fbincon/statusline-core/dist/src/runtime/transcript.js.map +1 -0
  461. package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.d.ts +64 -0
  462. package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.js +263 -0
  463. package/node_modules/@fbincon/statusline-core/dist/src/runtime/usage.js.map +1 -0
  464. package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.d.ts +18 -0
  465. package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.js +103 -0
  466. package/node_modules/@fbincon/statusline-core/dist/src/runtime/values.js.map +1 -0
  467. package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.d.ts +7 -0
  468. package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.js +2 -0
  469. package/node_modules/@fbincon/statusline-core/dist/src/terminal/key.js.map +1 -0
  470. package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.d.ts +6 -0
  471. package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.js +50 -0
  472. package/node_modules/@fbincon/statusline-core/dist/src/terminal/spans.js.map +1 -0
  473. package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.d.ts +8 -0
  474. package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.js +13 -0
  475. package/node_modules/@fbincon/statusline-core/dist/src/timing/sample.js.map +1 -0
  476. package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.d.ts +22 -0
  477. package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.js +75 -0
  478. package/node_modules/@fbincon/statusline-core/dist/src/timing/timer.js.map +1 -0
  479. package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.d.ts +12 -0
  480. package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.js +93 -0
  481. package/node_modules/@fbincon/statusline-core/dist/src/unicode/generated-unicode.js.map +1 -0
  482. package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.d.ts +5 -0
  483. package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.js +178 -0
  484. package/node_modules/@fbincon/statusline-core/dist/src/unicode/index.js.map +1 -0
  485. package/node_modules/@fbincon/statusline-core/package.json +8 -0
  486. package/node_modules/@fbincon/statusline-core/resources/i18n/languages.json +7 -0
  487. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/en.json +1367 -0
  488. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ja.json +1367 -0
  489. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/ko.json +1367 -0
  490. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-CN.json +1367 -0
  491. package/node_modules/@fbincon/statusline-core/resources/i18n/locales/zh-Hant.json +1367 -0
  492. package/node_modules/@fbincon/statusline-platform/dist/src/architecture.d.ts +15 -0
  493. package/node_modules/@fbincon/statusline-platform/dist/src/architecture.js +22 -0
  494. package/node_modules/@fbincon/statusline-platform/dist/src/architecture.js.map +1 -0
  495. package/node_modules/@fbincon/statusline-platform/dist/src/clocks.d.ts +4 -0
  496. package/node_modules/@fbincon/statusline-platform/dist/src/clocks.js +102 -0
  497. package/node_modules/@fbincon/statusline-platform/dist/src/clocks.js.map +1 -0
  498. package/node_modules/@fbincon/statusline-platform/dist/src/command.d.ts +16 -0
  499. package/node_modules/@fbincon/statusline-platform/dist/src/command.js +18 -0
  500. package/node_modules/@fbincon/statusline-platform/dist/src/command.js.map +1 -0
  501. package/node_modules/@fbincon/statusline-platform/dist/src/commands.d.ts +12 -0
  502. package/node_modules/@fbincon/statusline-platform/dist/src/commands.js +160 -0
  503. package/node_modules/@fbincon/statusline-platform/dist/src/commands.js.map +1 -0
  504. package/node_modules/@fbincon/statusline-platform/dist/src/errors.d.ts +1 -0
  505. package/node_modules/@fbincon/statusline-platform/dist/src/errors.js +19 -0
  506. package/node_modules/@fbincon/statusline-platform/dist/src/errors.js.map +1 -0
  507. package/node_modules/@fbincon/statusline-platform/dist/src/files.d.ts +8 -0
  508. package/node_modules/@fbincon/statusline-platform/dist/src/files.js +164 -0
  509. package/node_modules/@fbincon/statusline-platform/dist/src/files.js.map +1 -0
  510. package/node_modules/@fbincon/statusline-platform/dist/src/hash.d.ts +2 -0
  511. package/node_modules/@fbincon/statusline-platform/dist/src/hash.js +5 -0
  512. package/node_modules/@fbincon/statusline-platform/dist/src/hash.js.map +1 -0
  513. package/node_modules/@fbincon/statusline-platform/dist/src/input.d.ts +2 -0
  514. package/node_modules/@fbincon/statusline-platform/dist/src/input.js +14 -0
  515. package/node_modules/@fbincon/statusline-platform/dist/src/input.js.map +1 -0
  516. package/node_modules/@fbincon/statusline-platform/dist/src/launch.d.ts +12 -0
  517. package/node_modules/@fbincon/statusline-platform/dist/src/launch.js +21 -0
  518. package/node_modules/@fbincon/statusline-platform/dist/src/launch.js.map +1 -0
  519. package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.d.ts +2 -0
  520. package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.js +31 -0
  521. package/node_modules/@fbincon/statusline-platform/dist/src/line-cursor.js.map +1 -0
  522. package/node_modules/@fbincon/statusline-platform/dist/src/native.d.ts +15 -0
  523. package/node_modules/@fbincon/statusline-platform/dist/src/native.js +36 -0
  524. package/node_modules/@fbincon/statusline-platform/dist/src/native.js.map +1 -0
  525. package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.d.ts +17 -0
  526. package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.js +44 -0
  527. package/node_modules/@fbincon/statusline-platform/dist/src/plugin-host.js.map +1 -0
  528. package/node_modules/@fbincon/statusline-platform/dist/src/presentation.d.ts +4 -0
  529. package/node_modules/@fbincon/statusline-platform/dist/src/presentation.js +48 -0
  530. package/node_modules/@fbincon/statusline-platform/dist/src/presentation.js.map +1 -0
  531. package/node_modules/@fbincon/statusline-platform/dist/src/processes.d.ts +2 -0
  532. package/node_modules/@fbincon/statusline-platform/dist/src/processes.js +67 -0
  533. package/node_modules/@fbincon/statusline-platform/dist/src/processes.js.map +1 -0
  534. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.d.ts +42 -0
  535. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.js +180 -0
  536. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/bridge.js.map +1 -0
  537. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.d.ts +11 -0
  538. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.js +81 -0
  539. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/input.js.map +1 -0
  540. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.d.ts +32 -0
  541. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js +157 -0
  542. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/launchers.js.map +1 -0
  543. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.d.ts +18 -0
  544. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.js +150 -0
  545. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/session.js.map +1 -0
  546. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.d.ts +6 -0
  547. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.js +39 -0
  548. package/node_modules/@fbincon/statusline-platform/dist/src/terminal/windows-modes.js.map +1 -0
  549. package/node_modules/@fbincon/statusline-platform/dist/src/utf8.d.ts +5 -0
  550. package/node_modules/@fbincon/statusline-platform/dist/src/utf8.js +82 -0
  551. package/node_modules/@fbincon/statusline-platform/dist/src/utf8.js.map +1 -0
  552. package/node_modules/@fbincon/statusline-platform/package.json +8 -0
  553. package/node_modules/@fbincon/statusline-tui/dist/src/drawing.d.ts +14 -0
  554. package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js +230 -0
  555. package/node_modules/@fbincon/statusline-tui/dist/src/drawing.js.map +1 -0
  556. package/node_modules/@fbincon/statusline-tui/dist/src/layout.d.ts +30 -0
  557. package/node_modules/@fbincon/statusline-tui/dist/src/layout.js +34 -0
  558. package/node_modules/@fbincon/statusline-tui/dist/src/layout.js.map +1 -0
  559. package/node_modules/@fbincon/statusline-tui/dist/src/session.d.ts +28 -0
  560. package/node_modules/@fbincon/statusline-tui/dist/src/session.js +126 -0
  561. package/node_modules/@fbincon/statusline-tui/dist/src/session.js.map +1 -0
  562. package/node_modules/@fbincon/statusline-tui/dist/src/state.d.ts +52 -0
  563. package/node_modules/@fbincon/statusline-tui/dist/src/state.js +352 -0
  564. package/node_modules/@fbincon/statusline-tui/dist/src/state.js.map +1 -0
  565. package/node_modules/@fbincon/statusline-tui/dist/src/theme.d.ts +7 -0
  566. package/node_modules/@fbincon/statusline-tui/dist/src/theme.js +5 -0
  567. package/node_modules/@fbincon/statusline-tui/dist/src/theme.js.map +1 -0
  568. package/node_modules/@fbincon/statusline-tui/package.json +16 -0
  569. package/node_modules/@koromix/koffi-darwin-arm64/README.md +6 -0
  570. package/node_modules/@koromix/koffi-darwin-arm64/darwin_arm64/koffi.node +0 -0
  571. package/node_modules/@koromix/koffi-darwin-arm64/index.js +1 -0
  572. package/node_modules/@koromix/koffi-darwin-arm64/package.json +24 -0
  573. package/node_modules/@koromix/koffi-darwin-x64/README.md +6 -0
  574. package/node_modules/@koromix/koffi-darwin-x64/darwin_x64/koffi.node +0 -0
  575. package/node_modules/@koromix/koffi-darwin-x64/index.js +1 -0
  576. package/node_modules/@koromix/koffi-darwin-x64/package.json +24 -0
  577. package/node_modules/@koromix/koffi-linux-x64/README.md +6 -0
  578. package/node_modules/@koromix/koffi-linux-x64/index.js +198 -0
  579. package/node_modules/@koromix/koffi-linux-x64/linux_x64/koffi.node +0 -0
  580. package/node_modules/@koromix/koffi-linux-x64/musl_x64/koffi.node +0 -0
  581. package/node_modules/@koromix/koffi-linux-x64/package.json +24 -0
  582. package/node_modules/@koromix/koffi-win32-x64/README.md +6 -0
  583. package/node_modules/@koromix/koffi-win32-x64/index.js +1 -0
  584. package/node_modules/@koromix/koffi-win32-x64/package.json +24 -0
  585. package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.lib +0 -0
  586. package/node_modules/@koromix/koffi-win32-x64/win32_x64/koffi.node +0 -0
  587. package/node_modules/koffi/LICENSE.txt +22 -0
  588. package/node_modules/koffi/README.md +46 -0
  589. package/node_modules/koffi/index.cjs +1 -0
  590. package/node_modules/koffi/index.d.ts +390 -0
  591. package/node_modules/koffi/index.js +2 -0
  592. package/node_modules/koffi/indirect.cjs +1 -0
  593. package/node_modules/koffi/indirect.js +2 -0
  594. package/node_modules/koffi/package.json +73 -0
  595. package/node_modules/koffi/src/koffi/index.cjs +327 -0
  596. package/node_modules/koffi/src/koffi/index.js +312 -0
  597. package/node_modules/koffi/src/koffi/indirect.cjs +326 -0
  598. package/node_modules/koffi/src/koffi/indirect.js +311 -0
  599. package/node_modules/koffi/src/koffi/src/static.cjs +170 -0
  600. package/node_modules/koffi/src/koffi/src/static.js +173 -0
  601. package/node_modules/lossless-json/LICENSE.md +9 -0
  602. package/node_modules/lossless-json/README.md +549 -0
  603. package/node_modules/lossless-json/lib/esm/LosslessNumber.js +92 -0
  604. package/node_modules/lossless-json/lib/esm/LosslessNumber.js.map +1 -0
  605. package/node_modules/lossless-json/lib/esm/config.js +9 -0
  606. package/node_modules/lossless-json/lib/esm/config.js.map +1 -0
  607. package/node_modules/lossless-json/lib/esm/index.js +9 -0
  608. package/node_modules/lossless-json/lib/esm/index.js.map +1 -0
  609. package/node_modules/lossless-json/lib/esm/numberParsers.js +9 -0
  610. package/node_modules/lossless-json/lib/esm/numberParsers.js.map +1 -0
  611. package/node_modules/lossless-json/lib/esm/package.json +3 -0
  612. package/node_modules/lossless-json/lib/esm/parse.js +346 -0
  613. package/node_modules/lossless-json/lib/esm/parse.js.map +1 -0
  614. package/node_modules/lossless-json/lib/esm/revive.js +57 -0
  615. package/node_modules/lossless-json/lib/esm/revive.js.map +1 -0
  616. package/node_modules/lossless-json/lib/esm/reviveDate.js +10 -0
  617. package/node_modules/lossless-json/lib/esm/reviveDate.js.map +1 -0
  618. package/node_modules/lossless-json/lib/esm/stringify.js +166 -0
  619. package/node_modules/lossless-json/lib/esm/stringify.js.map +1 -0
  620. package/node_modules/lossless-json/lib/esm/types.js +2 -0
  621. package/node_modules/lossless-json/lib/esm/types.js.map +1 -0
  622. package/node_modules/lossless-json/lib/esm/utils.js +236 -0
  623. package/node_modules/lossless-json/lib/esm/utils.js.map +1 -0
  624. package/node_modules/lossless-json/lib/types/LosslessNumber.d.ts +40 -0
  625. package/node_modules/lossless-json/lib/types/LosslessNumber.d.ts.map +1 -0
  626. package/node_modules/lossless-json/lib/types/config.d.ts +13 -0
  627. package/node_modules/lossless-json/lib/types/config.d.ts.map +1 -0
  628. package/node_modules/lossless-json/lib/types/index.d.ts +9 -0
  629. package/node_modules/lossless-json/lib/types/index.d.ts.map +1 -0
  630. package/node_modules/lossless-json/lib/types/numberParsers.d.ts +4 -0
  631. package/node_modules/lossless-json/lib/types/numberParsers.d.ts.map +1 -0
  632. package/node_modules/lossless-json/lib/types/parse.d.ts +33 -0
  633. package/node_modules/lossless-json/lib/types/parse.d.ts.map +1 -0
  634. package/node_modules/lossless-json/lib/types/revive.d.ts +13 -0
  635. package/node_modules/lossless-json/lib/types/revive.d.ts.map +1 -0
  636. package/node_modules/lossless-json/lib/types/reviveDate.d.ts +5 -0
  637. package/node_modules/lossless-json/lib/types/reviveDate.d.ts.map +1 -0
  638. package/node_modules/lossless-json/lib/types/stringify.d.ts +37 -0
  639. package/node_modules/lossless-json/lib/types/stringify.d.ts.map +1 -0
  640. package/node_modules/lossless-json/lib/types/types.d.ts +61 -0
  641. package/node_modules/lossless-json/lib/types/types.d.ts.map +1 -0
  642. package/node_modules/lossless-json/lib/types/utils.d.ts +79 -0
  643. package/node_modules/lossless-json/lib/types/utils.d.ts.map +1 -0
  644. package/node_modules/lossless-json/lib/umd/lossless-json.js +1 -0
  645. package/node_modules/lossless-json/lib/umd/lossless-json.js.map +1 -0
  646. package/node_modules/lossless-json/lib/umd/package.json +3 -0
  647. package/node_modules/lossless-json/package.json +89 -0
  648. package/package.json +57 -4
@@ -0,0 +1,14 @@
1
+ /** Application identity. Internal workspaces are private implementation packages. */
2
+ export const VERSION = '3.0.0';
3
+ export const PACKAGE_NAME = '@fbincon/claude-code-statusline';
4
+ export const REPOSITORY_URL = 'https://github.com/fbincon/claude-code-statusline';
5
+ export function isPrerelease(version) {
6
+ return /^\d+\.\d+\.\d+-[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*$/u.test(version)
7
+ || /(?:a|b|rc|dev)\d/u.test(version);
8
+ }
9
+ /** TS previews retain the stable editor experience approved for TS-06. */
10
+ export function editorsEnabledByDefault(version) {
11
+ return /^([3-9]|[1-9]\d+)\.\d+\.\d+(?:-[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?$/u.test(version)
12
+ || !isPrerelease(version);
13
+ }
14
+ //# sourceMappingURL=release.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/release.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAC/B,MAAM,CAAC,MAAM,YAAY,GAAG,iCAAiC,CAAC;AAC9D,MAAM,CAAC,MAAM,cAAc,GAAG,mDAAmD,CAAC;AAElF,MAAM,UAAU,YAAY,CAAC,OAAe;IACxC,OAAO,oDAAoD,CAAC,IAAI,CAAC,OAAO,CAAC;WAClE,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACnD,OAAO,sEAAsE,CAAC,IAAI,CAAC,OAAO,CAAC;WACpF,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { DisplayDraft, ItemOptionsDraft, Scope } from '../contracts/ui.js';
2
+ import * as styles from './styles.js';
3
+ export declare function color(value: string | null): styles.Color | null;
4
+ export declare function outputColor(value: styles.Color | null, config: DisplayDraft): styles.Color | null;
5
+ export declare function themeStyles(theme: string, ansi: boolean): Record<string, string>;
6
+ export declare function themedPalette<T extends Record<string, string>>(palette: T, config: DisplayDraft, subagent?: boolean): T;
7
+ export declare function itemRole(item: string, scope: Scope): string;
8
+ export declare function baseStyle(config: DisplayDraft, item: string, scope: Scope): styles.Style;
9
+ export declare function riskColor(used: number | null, config: DisplayDraft): styles.Color | null;
10
+ export declare function apply(text: string, config: DisplayDraft, item: string, options: ItemOptionsDraft, scope?: Scope, used?: number | null): string;
@@ -0,0 +1,73 @@
1
+ import { BY_SCOPE } from '../config/catalog.js';
2
+ import * as styles from './styles.js';
3
+ import { terminalColor } from './colors.js';
4
+ import * as layout from './layout.js';
5
+ const ROLES = ['model', 'directory', 'branch', 'percentage', 'tokens', 'timer'];
6
+ const DARK = ['#f6e2b7', '#abdfa7', '#c8a9ee', '#f2b590', '#e990a9', '#8ed3d3'], LIGHT = ['#664515', '#205727', '#633487', '#864511', '#93284a', '#126168'];
7
+ const BLOCK_DARK = ['#3c3548', '#234337', '#3d3155', '#543720', '#542b3c', '#1f4148'], BLOCK_LIGHT = ['#eee1c4', '#d6ecd4', '#e7dcf2', '#f5dfce', '#f4d8e1', '#d1ecec'];
8
+ const ANSI = [3, 2, 5, 3, 5, 6], BLOCK_ANSI = [4, 2, 5, 3, 1, 6];
9
+ export function color(value) { return value === null || value === 'default' ? null : value.startsWith('ansi:') ? ['ansi', Number(value.slice(5))] : ['rgb', value]; }
10
+ export function outputColor(value, config) { return value !== null && config.palette === 'ansi' ? ['ansi', terminalColor(value, 16)] : value; }
11
+ const themes = styles.memo(16, key => {
12
+ const [theme, ansi] = JSON.parse(key), values = theme === 'light' ? LIGHT : DARK;
13
+ const result = Object.fromEntries(ROLES.map((role, i) => [role, styles.serialize({ bold: true, foreground: ansi || theme === 'terminal' ? ['ansi', ANSI[i]] : ['rgb', values[i]], background: null })]));
14
+ result.size = result.percentage;
15
+ result.git_error = styles.serialize({ bold: true, foreground: ansi || theme === 'terminal' ? ['ansi', 1] : ['rgb', theme === 'light' ? '#a02020' : '#f28686'], background: null });
16
+ result.separator = styles.serialize({ bold: false, foreground: ansi || theme === 'terminal' ? ['ansi', 8] : ['rgb', theme === 'light' ? '#58616b' : '#aab2bd'], background: null });
17
+ return result;
18
+ });
19
+ export function themeStyles(theme, ansi) { return themes(JSON.stringify([theme, ansi])); }
20
+ export function themedPalette(palette, config, subagent = false) {
21
+ if (!config.use_colors || config.theme === 'classic')
22
+ return palette;
23
+ const roles = themeStyles(config.theme, config.palette === 'ansi');
24
+ if (!subagent)
25
+ return { ...palette, ...roles };
26
+ const mapping = { status: 'timer', name: 'model', model: 'model', context: 'percentage', elapsed: 'timer', task: 'directory', tokens: 'tokens', directory: 'directory', separator: 'separator' };
27
+ return { ...palette, ...Object.fromEntries(Object.entries(mapping).map(([key, role]) => [key, roles[role]])) };
28
+ }
29
+ export function itemRole(item, scope) {
30
+ const group = BY_SCOPE[scope].get(item)?.group ?? 'task';
31
+ const roles = { model: 'model', location: 'directory', repo: 'branch', context: 'percentage', limits: 'percentage', usage: 'tokens', cache: 'tokens', requests: 'tokens' };
32
+ return roles[group] ?? 'timer';
33
+ }
34
+ export function baseStyle(config, item, scope) {
35
+ const role = itemRole(item, scope), index = ROLES.indexOf(role);
36
+ if (config.separator_style === 'powerline') {
37
+ let foreground, background;
38
+ if (config.palette === 'ansi' || config.theme === 'terminal') {
39
+ background = ['ansi', BLOCK_ANSI[index]];
40
+ foreground = ['ansi', [3, 6].includes(BLOCK_ANSI[index]) ? 0 : 15];
41
+ }
42
+ else {
43
+ const light = config.theme === 'light';
44
+ background = ['rgb', (light ? BLOCK_LIGHT : BLOCK_DARK)[index]];
45
+ foreground = ['rgb', light ? '#202630' : '#f4f5f7'];
46
+ }
47
+ return { bold: true, foreground, background };
48
+ }
49
+ return styles.parse(themeStyles(config.theme, config.palette === 'ansi')[role]);
50
+ }
51
+ export function riskColor(used, config) {
52
+ const limits = config.formatting.thresholds;
53
+ if (!limits.enabled || used === null || used < limits.warning)
54
+ return null;
55
+ const critical = used >= limits.critical;
56
+ if (config.palette === 'ansi' || config.theme === 'terminal')
57
+ return ['ansi', critical ? 1 : 3];
58
+ return ['rgb', config.theme === 'light' ? critical ? '#a02020' : '#805000' : critical ? '#f28686' : '#f2b550'];
59
+ }
60
+ export function apply(text, config, item, options, scope = 'main', used = null) {
61
+ if (!config.use_colors)
62
+ return layout.strip(text);
63
+ const block = config.separator_style === 'powerline', risk = riskColor(used, config);
64
+ if (config.theme === 'classic' && !block && options.foreground === null && options.background === null && risk === null)
65
+ return text;
66
+ const base = baseStyle(config, item, scope), foreground = outputColor(color(options.foreground), config), background = outputColor(color(options.background), config);
67
+ return layout.renderStyledUnits(layout.styledUnits(text).map(unit => {
68
+ const state = styles.parse(unit.style), fg = options.foreground !== null ? foreground : block ? base.foreground : state.foreground ?? base.foreground;
69
+ const bg = options.background !== null ? background : block ? base.background : state.background;
70
+ return { ...unit, style: styles.serialize({ bold: state.bold || block || risk !== null, foreground: risk ?? fg, background: bg }) };
71
+ }));
72
+ }
73
+ //# sourceMappingURL=appearance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appearance.js","sourceRoot":"","sources":["../../../src/rendering/appearance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAChF,MAAM,IAAI,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,KAAK,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAC5J,MAAM,UAAU,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACxK,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACjE,MAAM,UAAU,KAAK,CAAC,KAAoB,IAAyB,OAAO,KAAK,KAAK,IA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;QAChE,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC;QACtJ,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;QACjG,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,IAAI,EAAE,UAAU,EAAE,IAAI,IAAI,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;IACxI,CAAC,CAAC,CAAC,CAAC;AACR,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function coercedFloat(value: unknown): number | null;
2
+ export declare function coercedInteger(value: unknown): bigint | null;
@@ -0,0 +1,50 @@
1
+ import { int, numeric } from '../runtime/values.js';
2
+ // Python numeric constructors accept Unicode decimal digits and surrounding
3
+ // Unicode whitespace, but not JavaScript hexadecimal/empty-string coercion.
4
+ function normalized(value) {
5
+ return value.replace(/^[\p{White_Space}]+|[\p{White_Space}]+$/gu, '').replace(/\p{Decimal_Number}/gu, char => {
6
+ const code = char.codePointAt(0);
7
+ if (code < 128 || code >= 0x11de0 && code <= 0x11de9)
8
+ return char;
9
+ let start = code;
10
+ while (/\p{Decimal_Number}/u.test(String.fromCodePoint(start - 1)))
11
+ start--;
12
+ return String((code - start) % 10);
13
+ });
14
+ }
15
+ export function coercedFloat(value) {
16
+ if (typeof value === 'boolean')
17
+ return Number(value);
18
+ if (typeof value !== 'string') {
19
+ const n = numeric(value);
20
+ return n !== null && !Number.isFinite(n) && int(value) !== null ? null : n;
21
+ }
22
+ const text = normalized(value), digits = '[0-9](?:_?[0-9])*';
23
+ if (new RegExp('^[+-]?(?:' + digits + '(?:\\.(?:' + digits + ')?)?|\\.' + digits + ')(?:[eE][+-]?' + digits + ')?$', 'u').test(text))
24
+ return Number(text.replaceAll('_', ''));
25
+ if (/^[+-]?(?:inf(?:inity)?|nan)$/iu.test(text))
26
+ return /nan/iu.test(text) ? NaN : text.startsWith('-') ? -Infinity : Infinity;
27
+ return null;
28
+ }
29
+ export function coercedInteger(value) {
30
+ const whole = int(value, false);
31
+ if (whole !== null)
32
+ return whole;
33
+ if (typeof value === 'string') {
34
+ const text = normalized(value);
35
+ if (!/^[+-]?[0-9](?:_?[0-9])*$/u.test(text))
36
+ return null;
37
+ const digits = text.replaceAll('_', '');
38
+ if (digits.replace(/^[+-]/u, '').length > 4300)
39
+ return null;
40
+ try {
41
+ return BigInt(digits);
42
+ }
43
+ catch {
44
+ return null;
45
+ }
46
+ }
47
+ const n = numeric(value);
48
+ return n !== null && Number.isFinite(n) ? BigInt(Math.trunc(n)) : null;
49
+ }
50
+ //# sourceMappingURL=coercion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coercion.js","sourceRoot":"","sources":["../../../src/rendering/coercion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,4EAA4E;AAC5E,4EAA4E;AAC5E,SAAS,UAAU,CAAC,KAAa;IAC7B,OAAO,KAAK,CAAC,OAAO,CAAC,2CAA2C,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAsB,EAAE,IAAI,CAAC,EAAE;QACzG,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAE,CAAC;QAClC,IAAI,IAAI,GAAG,GAAG,I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C,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IAClF,OAAO,IAAI,CAAC;AAChB,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,KAAc;IACzC,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAChC,IAAI,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,CAAC;IACjB,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;QAC/B,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC;YACvC,OAAO,IAAI,CAAC;QAChB,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,MAAM,GAAG,IAAI;YAC1C,OAAO,IAAI,CAAC;QAChB,IAAI,CAAC;YACD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;QACD,MAAM,CAAC;YACH,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IACD,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,OAAO,CAAC,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3E,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type Color } from './styles.js';
2
+ export declare function nearestTerminalColor(red: number, green: number, blue: number, colors: number): number | null;
3
+ export declare function terminalColor(color: Color | null, colors: number): number | null;
@@ -0,0 +1,36 @@
1
+ import { memo } from './styles.js';
2
+ const BASE = [[0, 0, 0], [128, 0, 0], [0, 128, 0], [128, 128, 0], [0, 0, 128], [128, 0, 128], [0, 128, 128], [192, 192, 192], [128, 128, 128], [255, 0, 0], [0, 255, 0], [255, 255, 0], [0, 0, 255], [255, 0, 255], [0, 255, 255], [255, 255, 255]];
3
+ const LEVELS = [0, 95, 135, 175, 215, 255];
4
+ const RGB = [...BASE, ...LEVELS.flatMap(r => LEVELS.flatMap(g => LEVELS.map(b => [r, g, b]))), ...Array.from({ length: 24 }, (_, i) => Array(3).fill(8 + 10 * i))];
5
+ const nearest = memo(2048, key => {
6
+ const [red, green, blue, colors] = JSON.parse(key);
7
+ if (colors < 8)
8
+ return null;
9
+ const limit = colors >= 256 ? 256 : colors >= 16 ? 16 : 8;
10
+ let best = 0, distance = Infinity;
11
+ for (let i = 0; i < limit; i++) {
12
+ const [r, g, b] = RGB[i], d = (r - red) ** 2 + (g - green) ** 2 + (b - blue) ** 2;
13
+ if (d < distance) {
14
+ best = i;
15
+ distance = d;
16
+ }
17
+ }
18
+ return best;
19
+ });
20
+ export function nearestTerminalColor(red, green, blue, colors) { return nearest(JSON.stringify([red, green, blue, colors])); }
21
+ export function terminalColor(color, colors) {
22
+ if (color === null || colors < 8)
23
+ return null;
24
+ let rgb;
25
+ if (color[0] === 'ansi') {
26
+ if (color[1] < Math.min(colors, 256))
27
+ return color[1];
28
+ if (color[1] < 16 && colors === 8)
29
+ return color[1] % 8;
30
+ rgb = RGB[color[1]];
31
+ }
32
+ else
33
+ rgb = [1, 3, 5].map(i => parseInt(color[1].slice(i, i + 2), 16));
34
+ return nearestTerminalColor(rgb[0], rgb[1], rgb[2], colors);
35
+ }
36
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sourceRoot":"","sources":["../../../src/rendering/colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,aAAa,CAAC;AAC/C,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,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AM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7K,MAAM,UAAU,aAAa,CAAC,KAAmB,EAAE,MAAc;IAC7D,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,GAAG,CAAC;QAC5B,OAAO,IAAI,CAAC;IAChB,IAAI,GAAa,CAAC;IAClB,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;QACtB,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;YAChC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,MAAM,KAAK,CAAC;YAC7B,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QACxB,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,CAAC;IACzB,CAAC;;QAEG,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACrE,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAE,EAAE,GAAG,CAAC,CAAC,CAAE,EAAE,GAAG,CAAC,CAAC,CAAE,EAAE,MAAM,CAAC,CAAC;AACnE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { DisplayDraft, InstanceDraft, Scope } from '../contracts/ui.js';
2
+ export interface Cell<T = unknown> {
3
+ id: string;
4
+ text: string;
5
+ priority: number;
6
+ spacer?: boolean;
7
+ payload?: T;
8
+ }
9
+ export declare function literal(node: InstanceDraft, config: DisplayDraft, scope?: Scope): string;
10
+ export declare function fitRow<T>(cells: readonly Cell<T>[], columns: number, config: DisplayDraft, join: (side: Cell<T>[]) => string, measure?: (text: string) => number): string;
@@ -0,0 +1,49 @@
1
+ import * as layout from './layout.js';
2
+ import * as appearance from './appearance.js';
3
+ import * as styles from './styles.js';
4
+ import * as powerline from './powerline.js';
5
+ export function literal(node, config, scope = 'main') {
6
+ let text = node.text || '';
7
+ if (!text)
8
+ return '';
9
+ const options = node.options;
10
+ if (options.icon)
11
+ text = options.icon + ' ' + text;
12
+ if (options.label)
13
+ text = options.label + ' ' + text;
14
+ if (config.use_colors)
15
+ text = appearance.apply(text, config, 'text', options, scope);
16
+ if (options.max_width !== null)
17
+ text = layout.truncateStyled(text, options.max_width);
18
+ return text;
19
+ }
20
+ export function fitRow(cells, columns, config, join, measure = layout.displayWidth) {
21
+ if (columns < 1)
22
+ return '';
23
+ const divider = cells.findIndex(cell => cell.spacer), left = (divider < 0 ? cells : cells.slice(0, divider)).filter(cell => cell.text), right = divider < 0 ? [] : cells.slice(divider + 1).filter(cell => cell.text);
24
+ if (!left.length && !right.length)
25
+ return '';
26
+ const isPowerline = config.separator_style === 'powerline';
27
+ let padding = 1, cap = true;
28
+ const text = (side) => isPowerline ? powerline.row(side, config, padding, cap) : join(side), occupied = () => measure(text(left)) + measure(text(right));
29
+ if (isPowerline && occupied() > columns)
30
+ padding = 0;
31
+ if (isPowerline && occupied() > columns)
32
+ cap = false;
33
+ while (left.length + right.length > 1 && occupied() > columns) {
34
+ const ordered = [...left.map((cell, index) => ({ side: left, index, cell })), ...right.map((cell, index) => ({ side: right, index, cell }))];
35
+ let victim = 0;
36
+ for (let i = 1; i < ordered.length; i++)
37
+ if (ordered[i].cell.priority <= ordered[victim].cell.priority)
38
+ victim = i;
39
+ const row = ordered[victim];
40
+ row.side.splice(row.index, 1);
41
+ }
42
+ if (occupied() > columns) {
43
+ const side = left.length ? left : right;
44
+ side[0] = { ...side[0], text: layout.truncateStyled(side[0].text, columns) };
45
+ }
46
+ const a = text(left), b = text(right), gap = divider < 0 ? 0 : Math.max(0, columns - measure(a) - measure(b)), reset = config.use_colors ? styles.RESET : '';
47
+ return layout.ensureReset(a + (gap ? reset + ' '.repeat(gap) : '') + b, reset);
48
+ }
49
+ //# sourceMappingURL=components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/rendering/components.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAQ5C,MAAM,UAAU,OAAO,CAAC,IAAmB,EAAE,MAAoB,EAAE,QAAe,MAAM;IACpF,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;IAC3B,IAAI,CAAC,IAAI;QACL,OAAO,EAAE,CAAC;IACd,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC7B,IAAI,OAAO,CAAC,IAAI;QACZ,IAAI,GAAG,OAAO,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;IACrC,IAAI,OAAO,CAAC,KAAK;QACb,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC;IACtC,IAAI,MAAM,CAAC,UAAU;QACjB,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAClE,IAAI,OAAO,CAAC,SAAS,KAAK,IAAI;QAC1B,IAAI,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC;AAChB,CAAC;AACD,MAAM,UAAU,MAAM,CAAI,KAAyB,EAAE,OAAe,EAAE,MAAoB,EAAE,IAAiC,EAAE,UAAoC,MAAM,CAAC,YAAY;IAClL,IAAI,OAAO,GAAG,C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CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7J,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;AACnF,CAAC"}
@@ -0,0 +1,36 @@
1
+ import type { Data } from '../runtime/values.js';
2
+ import type { Sample } from '../timing/sample.js';
3
+ import type { SessionTokenCounts } from '../runtime/usage.js';
4
+ import type { DirectoryStyle } from '../contracts/ui.js';
5
+ import type { Presentation } from './language.js';
6
+ import type { DateFormatter } from './preferences.js';
7
+ export interface UsageObservation {
8
+ hit: string;
9
+ miss: string;
10
+ out: string;
11
+ last_prompt: unknown;
12
+ entry: Data;
13
+ counts: SessionTokenCounts | null;
14
+ }
15
+ export interface TaskObservation {
16
+ state: Data | null;
17
+ sample: Sample;
18
+ }
19
+ /** The renderer calls only selected sources; providers own all platform effects. */
20
+ export interface RenderEnvironment {
21
+ language: Presentation;
22
+ compactStaged: boolean;
23
+ now(): number;
24
+ directory(value: string, style: DirectoryStyle, project?: string | null): string;
25
+ basename(value: string): string;
26
+ formatDate: DateFormatter;
27
+ hostname(): string | null;
28
+ git(cwd: string, session: unknown): Data;
29
+ branchDiff(cwd: string | null, base: string | null): Data;
30
+ usage(data: unknown): UsageObservation | null;
31
+ task(data: unknown, usage: UsageObservation): TaskObservation;
32
+ activePoint(data: unknown): Data;
33
+ hadSubagents(data: unknown): boolean;
34
+ live(data: unknown, nowMs: number): Data;
35
+ agentEndings(session: string): Data;
36
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/rendering/context.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { displayWidth } from './layout.js';
2
+ import { coercedInteger } from './coercion.js';
3
+ export { coercedInteger };
4
+ export { formatDuration } from './timer.js';
5
+ export { displayWidth };
6
+ export declare function deepGet(value: unknown, path: readonly string[]): unknown;
7
+ export declare function sanitizePayloadText(value: unknown): string | null;
8
+ export declare function humanizeTokens(value: unknown): string | null;
9
+ export declare function humanizeApiTokens(value: unknown): string;
10
+ export declare function truncateText(text: string, width: number, ellipsis?: string): string;
@@ -0,0 +1,58 @@
1
+ import { own, object } from '../runtime/values.js';
2
+ import { divideIntegers, fixed } from '../numbers.js';
3
+ import { clip } from '../unicode/index.js';
4
+ import { truncateStyled, displayWidth } from './layout.js';
5
+ import { coercedInteger } from './coercion.js';
6
+ export { coercedInteger };
7
+ export { formatDuration } from './timer.js';
8
+ export { displayWidth };
9
+ export function deepGet(value, path) {
10
+ for (const key of path) {
11
+ if (!object(value))
12
+ return null;
13
+ value = own(value, key);
14
+ }
15
+ return value ?? null;
16
+ }
17
+ export function sanitizePayloadText(value) {
18
+ if (typeof value !== 'string')
19
+ return null;
20
+ let text = '';
21
+ for (const char of value) {
22
+ const code = char.codePointAt(0);
23
+ text += /[\p{Cc}\p{Cs}]/u.test(char) || /\p{Cf}/u.test(char) && code !== 0x200d && !(code >= 0xe0020 && code <= 0xe007f) ? ' ' : char;
24
+ }
25
+ return text.split(/[\p{White_Space}\x1c-\x1f]+/u).filter(Boolean).join(' ') || null;
26
+ }
27
+ export function humanizeTokens(value) {
28
+ const parsed = coercedInteger(value);
29
+ if (typeof value === 'boolean' || parsed === null || parsed < 0n)
30
+ return null;
31
+ try {
32
+ if (parsed >= 1000000n)
33
+ return fixed(divideIntegers(parsed, 1000000n), 2).replace(/0+$/u, '').replace(/\.$/u, '') + 'M';
34
+ if (parsed >= 1000n)
35
+ return fixed(divideIntegers(parsed, 1000n), 1).replace(/0+$/u, '').replace(/\.$/u, '') + 'K';
36
+ return String(parsed);
37
+ }
38
+ catch {
39
+ return null;
40
+ }
41
+ }
42
+ export function humanizeApiTokens(value) {
43
+ const parsed = coercedInteger(value);
44
+ if (parsed === null)
45
+ return '0';
46
+ try {
47
+ if (parsed >= 1000000n)
48
+ return fixed(divideIntegers(parsed, 1000000n), 2).replace(/0+$/u, '').replace(/\.$/u, '') + 'M';
49
+ if (parsed >= 1000n)
50
+ return fixed(divideIntegers(parsed, 1000n), 1) + 'K';
51
+ return String(parsed < 0n ? 0n : parsed);
52
+ }
53
+ catch {
54
+ return '0';
55
+ }
56
+ }
57
+ export function truncateText(text, width, ellipsis = '…') { return text.includes('\x1b[') ? truncateStyled(text, width, ellipsis) : clip(text, Math.trunc(width), ellipsis); }
58
+ //# sourceMappingURL=formatters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../src/rendering/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAA2B,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,MAAM,UAAU,OAAO,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,CAAC,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type Data } from '../runtime/values.js';
2
+ import type { Presentation } from './language.js';
3
+ import type { Palette } from './palette.js';
4
+ export declare function changeMarkers(result: Data, compactStaged?: boolean): string[];
5
+ export declare function divergenceMarkers(result: Data, language: Presentation, showZero?: boolean): string[];
6
+ export declare function component(result: unknown, item: string, language: Presentation, compactStaged?: boolean): string | null;
7
+ export declare function segment(result: Data, palette: Palette, language: Presentation, compactStaged?: boolean): string | null;
@@ -0,0 +1,34 @@
1
+ import { object, truth, string } from '../runtime/values.js';
2
+ import { sanitizePayloadText } from './formatters.js';
3
+ export function changeMarkers(result, compactStaged = false) {
4
+ return [['staged', compactStaged ? '●' : '● '], ['unstaged', '~'], ['conflicts', '!'], ['untracked', '?']].filter(([key]) => truth(result[key])).map(([key, symbol]) => symbol + string(result[key]));
5
+ }
6
+ export function divergenceMarkers(result, language, showZero = false) {
7
+ return truth(result.upstream_gone) ? [language.text('git.gone')] : [['ahead', '↑'], ['behind', '↓']].filter(([key]) => truth(result[key]) || showZero).map(([key, symbol]) => symbol + string(result[key]));
8
+ }
9
+ export function component(result, item, language, compactStaged = false) {
10
+ if (!object(result) || result.kind === 'not_repo')
11
+ return null;
12
+ if (result.kind === 'error')
13
+ return 'Git!';
14
+ if (result.kind !== 'ok')
15
+ return null;
16
+ if (item === 'git-branch') {
17
+ const branch = sanitizePayloadText(result.branch);
18
+ return branch ? 'Git ' + branch : null;
19
+ }
20
+ if (item === 'git-changes') {
21
+ const markers = changeMarkers(result, compactStaged);
22
+ return 'Git ' + (markers.length ? markers.join(' ') : language.text('git.clean'));
23
+ }
24
+ return truth(result.upstream) ? 'Git ' + divergenceMarkers(result, language, true).join(' ') : null;
25
+ }
26
+ export function segment(result, palette, language, compactStaged = false) {
27
+ if (result.kind === 'error')
28
+ return palette.git_error + 'Git!' + palette.reset;
29
+ if (result.kind !== 'ok')
30
+ return null;
31
+ const statuses = [...divergenceMarkers(result, language), ...changeMarkers(result, compactStaged)];
32
+ return palette.branch + 'Git ' + string(result.branch) + (statuses.length ? ' ' + statuses.join('') : '') + palette.reset;
33
+ }
34
+ //# sourceMappingURL=git.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.js","sourceRoot":"","sources":["../../../src/rendering/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAa,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,UAAU,aAAa,CAAC,MAAY,EAAE,aAAa,GAAG,KAAK;IAC7D,OAAQ,CAAC,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC,CAAW,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACrN,CAAC;AACD,MAAM,UAAU,iBAAiB,CAAC,MAAY,EAAE,QAAsB,EAAE,QAAQ,GAAG,KAAK;IACpF,OAAO,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAE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AAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACxG,CAAC;AACD,MAAM,UAAU,OAAO,CAAC,MAAY,EAAE,OAAgB,EAAE,QAAsB,EAAE,aAAa,GAAG,KAAK;IACjG,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO;QACvB,OAAO,OAAO,CAAC,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IACtD,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI;QACpB,OAAO,IAAI,CAAC;IAChB,MAAM,QAAQ,GAAG,CAAC,GAAG,iBAAiB,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,GAAG,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACnG,OAAO,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;AAC9H,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { DisplayDraft, FormattingDraft, InstanceDraft } from '../contracts/ui.js';
2
+ import { type Data } from '../runtime/values.js';
3
+ import type { RenderEnvironment, UsageObservation } from './context.js';
4
+ import type { Palette } from './palette.js';
5
+ import * as layout from './layout.js';
6
+ export interface RenderedItem {
7
+ text: string;
8
+ group?: string | null;
9
+ prefer_slash_breaks?: boolean;
10
+ }
11
+ export declare function liveDirectory(data: unknown): string | null;
12
+ export declare function enabledIds(config: DisplayDraft): string[];
13
+ export declare class RenderState {
14
+ readonly config: DisplayDraft;
15
+ readonly palette: Palette;
16
+ readonly inner: string;
17
+ readonly env: RenderEnvironment;
18
+ readonly data: Data;
19
+ readonly liveDir: string | null;
20
+ readonly instances: Map<string, InstanceDraft>;
21
+ fmt: FormattingDraft;
22
+ private gitValue;
23
+ private usageValue;
24
+ private liveValue;
25
+ private timeValue;
26
+ private branchValue;
27
+ private activeValue;
28
+ private taskValue;
29
+ constructor(data: unknown, config: DisplayDraft, palette: Palette, inner: string, env: RenderEnvironment);
30
+ text(key: string, params?: Data): string;
31
+ now(): number;
32
+ styled(text: string | null | undefined, style: string, group?: string | null): RenderedItem | null;
33
+ liveData(): Data;
34
+ branchData(): Data;
35
+ totals(): UsageObservation | null;
36
+ rawTotals(): import("../runtime/usage.ts").SessionTokenCounts | null;
37
+ hadSubagents(): boolean;
38
+ gitData(): Data | null;
39
+ git(): RenderedItem | null;
40
+ hostname(): RenderedItem | null;
41
+ promptTimer(): RenderedItem | null;
42
+ activeTimer(): RenderedItem | null;
43
+ private rateLimit;
44
+ private renderType;
45
+ render(id: string): RenderedItem | null;
46
+ }
47
+ export type StateFactory = (data: unknown, config: DisplayDraft, palette: Palette, inner: string, env: RenderEnvironment) => RenderState;
48
+ export declare function coalesce(items: readonly RenderedItem[], inner: string): layout.LayoutSegment[];
49
+ export declare function configuredRows(data: unknown, config: DisplayDraft, width: number, env: RenderEnvironment, factory?: StateFactory): string[];