@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,137 @@
1
+ import { LosslessNumber } from './json.js';
2
+ import { orderedRecord } from './ordered-record.js';
3
+ export class JsonSyntaxError extends SyntaxError {
4
+ }
5
+ /** Python JSON diagnostics and exact numeric kinds at public compatibility boundaries. */
6
+ export function readJson(input, options = {}) {
7
+ let raw = input, offset = 0;
8
+ function error(message, position = offset) {
9
+ const before = raw.slice(0, position), line = before.split('\n').length;
10
+ const column = [...before.slice(before.lastIndexOf('\n') + 1)].length + 1;
11
+ throw new JsonSyntaxError(`${message}: line ${line} column ${column} (char ${[...before].length})`);
12
+ }
13
+ if (raw.startsWith('\uFEFF')) {
14
+ if (options.allowBom)
15
+ raw = raw.slice(1);
16
+ else
17
+ error('Unexpected UTF-8 BOM (decode using utf-8-sig)', 0);
18
+ }
19
+ function whitespace() {
20
+ while (/[ \t\r\n]/u.test(raw[offset] ?? 'x'))
21
+ offset++;
22
+ }
23
+ function string() {
24
+ const start = offset++;
25
+ while (offset < raw.length) {
26
+ const c = raw[offset++];
27
+ if (c === '"')
28
+ return JSON.parse(raw.slice(start, offset));
29
+ if (c.charCodeAt(0) < 32)
30
+ error('Invalid control character at', offset - 1);
31
+ if (c === '\\') {
32
+ const escape = raw[offset++];
33
+ if (escape === undefined)
34
+ error('Unterminated string starting at', start);
35
+ if (escape === 'u') {
36
+ if (!/^[0-9a-fA-F]{4}$/u.test(raw.slice(offset, offset + 4)))
37
+ error('Invalid \\uXXXX escape', offset - 1);
38
+ offset += 4;
39
+ }
40
+ else if (!'"\\/bfnrt'.includes(escape))
41
+ error('Invalid \\escape', offset - 2);
42
+ }
43
+ }
44
+ return error('Unterminated string starting at', start);
45
+ }
46
+ function value() {
47
+ whitespace();
48
+ const c = raw[offset];
49
+ if (c === '"')
50
+ return string();
51
+ if (c === '{') {
52
+ offset++;
53
+ whitespace();
54
+ const pairs = [];
55
+ if (raw[offset] === '}') {
56
+ offset++;
57
+ return orderedRecord([]);
58
+ }
59
+ for (;;) {
60
+ if (raw[offset] !== '"')
61
+ error('Expecting property name enclosed in double quotes');
62
+ const key = string();
63
+ whitespace();
64
+ if (raw[offset] !== ':')
65
+ error("Expecting ':' delimiter");
66
+ offset++;
67
+ pairs.push([key, value()]);
68
+ whitespace();
69
+ if (raw[offset] === '}') {
70
+ offset++;
71
+ break;
72
+ }
73
+ if (raw[offset] !== ',')
74
+ error("Expecting ',' delimiter");
75
+ const comma = offset++;
76
+ whitespace();
77
+ if (raw[offset] === '}')
78
+ error('Illegal trailing comma before end of object', comma);
79
+ }
80
+ const seen = new Set();
81
+ for (const [key] of pairs) {
82
+ if (seen.has(key))
83
+ options.duplicate?.(key);
84
+ seen.add(key);
85
+ }
86
+ return orderedRecord(pairs);
87
+ }
88
+ if (c === '[') {
89
+ offset++;
90
+ whitespace();
91
+ const result = [];
92
+ if (raw[offset] === ']') {
93
+ offset++;
94
+ return result;
95
+ }
96
+ for (;;) {
97
+ result.push(value());
98
+ whitespace();
99
+ if (raw[offset] === ']') {
100
+ offset++;
101
+ return result;
102
+ }
103
+ if (raw[offset] !== ',')
104
+ error("Expecting ',' delimiter");
105
+ const comma = offset++;
106
+ whitespace();
107
+ if (raw[offset] === ']')
108
+ error('Illegal trailing comma before end of array', comma);
109
+ }
110
+ }
111
+ for (const [literal, result] of [['null', null], ['true', true], ['false', false]]) {
112
+ if (raw.startsWith(literal, offset)) {
113
+ offset += literal.length;
114
+ return result;
115
+ }
116
+ }
117
+ for (const token of ['NaN', 'Infinity', '-Infinity']) {
118
+ if (raw.startsWith(token, offset)) {
119
+ offset += token.length;
120
+ options.constant?.(token);
121
+ return Number(token);
122
+ }
123
+ }
124
+ const match = raw.slice(offset).match(/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/u);
125
+ if (match) {
126
+ offset += match[0].length;
127
+ return new LosslessNumber(match[0]);
128
+ }
129
+ return error('Expecting value');
130
+ }
131
+ const result = value();
132
+ whitespace();
133
+ if (offset !== raw.length)
134
+ error('Extra data');
135
+ return result;
136
+ }
137
+ //# sourceMappingURL=json-read.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-read.js","sourceRoot":"","sources":["../../src/json-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,MAAM,OAAO,eAAgB,SAAQ,WAAW;CAC/C;AAMD,0FAA0F;AAC1F,MAAM,UAAU,QAAQ,CAAC,KAAa,EAAE,UAA2B,EAAE;IACjE,IAAI,GAAG,GAAG,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IAC5B,SAAS,KAAK,CAAC,OAAe,EAAE,QAAQ,GAAG,MAAM;QAC7C,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ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AAI,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC;IACvB,UAAU,EAAE,CAAC;IACb,IAAI,MAAM,KAAK,GAAG,CAAC,MAAM;QACrB,KAAK,CAAC,YAAY,CAAC,CAAC;IACxB,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export interface JsonTextOptions {
2
+ indent?: number;
3
+ ensureAscii?: boolean;
4
+ sortKeys?: boolean;
5
+ compact?: boolean;
6
+ allowNan?: boolean;
7
+ }
8
+ /** Python-compatible JSON text for persisted snapshots and generated resources. */
9
+ export declare function pythonJson(value: unknown, options?: JsonTextOptions): string;
@@ -0,0 +1,56 @@
1
+ import { isLosslessNumber, pythonFloat, scalarCompare } from './json.js';
2
+ import { recordKeys } from './ordered-record.js';
3
+ /** Python-compatible JSON text for persisted snapshots and generated resources. */
4
+ export function pythonJson(value, options = {}) {
5
+ const { indent, ensureAscii = true, sortKeys = false, compact = false, allowNan = false } = options;
6
+ if (indent !== undefined && (!Number.isSafeInteger(indent) || indent < 0))
7
+ throw new TypeError('Invalid JSON indent');
8
+ const ancestors = new Set();
9
+ function quote(value) {
10
+ if (!ensureAscii && /\p{Cs}/u.test(value))
11
+ throw new TypeError('Unpaired Unicode surrogate');
12
+ const text = JSON.stringify(value);
13
+ return ensureAscii ? text.replace(/[\u007f-\uffff]/g, character => '\\u' + character.charCodeAt(0).toString(16).padStart(4, '0')) : text;
14
+ }
15
+ function visit(item, depth) {
16
+ if (item === null || typeof item === 'boolean')
17
+ return String(item);
18
+ if (typeof item === 'string')
19
+ return quote(item);
20
+ if (typeof item === 'bigint')
21
+ return String(item);
22
+ if (isLosslessNumber(item))
23
+ return /^-?\d+$/u.test(item.value) ? String(BigInt(item.value)) : number(Number(item.value));
24
+ if (typeof item === 'number')
25
+ return Number.isSafeInteger(item) && !Object.is(item, -0) ? String(item) : number(item);
26
+ if (!item || typeof item !== 'object' || ancestors.has(item))
27
+ throw new TypeError('Unsupported or circular JSON value');
28
+ ancestors.add(item);
29
+ try {
30
+ const array = Array.isArray(item);
31
+ if (!array && ![Object.prototype, null].includes(Object.getPrototypeOf(item)))
32
+ throw new TypeError('Expected a JSON object');
33
+ const colon = compact ? ':' : ': ';
34
+ const entries = array ? Array.from(item, child => visit(child, depth + 1)) :
35
+ (sortKeys ? recordKeys(item).sort(scalarCompare) : recordKeys(item)).map(key => quote(key) + colon + visit(item[key], depth + 1));
36
+ const [open, close] = array ? ['[', ']'] : ['{', '}'];
37
+ if (!entries.length)
38
+ return open + close;
39
+ if (indent !== undefined) {
40
+ const padding = ' '.repeat(indent * depth), childPadding = padding + ' '.repeat(indent);
41
+ return open + '\n' + childPadding + entries.join(',\n' + childPadding) + '\n' + padding + close;
42
+ }
43
+ return open + entries.join(compact ? ',' : ', ') + close;
44
+ }
45
+ finally {
46
+ ancestors.delete(item);
47
+ }
48
+ }
49
+ function number(value) {
50
+ if (allowNan && !Number.isFinite(value))
51
+ return Number.isNaN(value) ? 'NaN' : value < 0 ? '-Infinity' : 'Infinity';
52
+ return pythonFloat(value);
53
+ }
54
+ return visit(value, 0);
55
+ }
56
+ //# sourceMappingURL=json-text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-text.js","sourceRoot":"","sources":["../../src/json-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAQjD,mFAAmF;AACnF,MAAM,UAAU,UAAU,CAAC,KAAc,EAAE,UAA2B,EAAE;IACpE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,QAAQ,GAAG,K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,CAAC,CAAC,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { LosslessNumber } from 'lossless-json';
2
+ export { LosslessNumber };
3
+ export declare function isLosslessNumber(value: unknown): value is LosslessNumber;
4
+ export type Json = null | boolean | string | number | bigint | LosslessNumber | Json[] | {
5
+ [key: string]: Json;
6
+ };
7
+ /** Parse before validation without rounding integers or losing their numeric kind. */
8
+ export declare function decode(text: string): unknown;
9
+ export declare function integer(value: unknown): bigint;
10
+ export declare function safeInteger(value: unknown, minimum?: number, maximum?: number): number;
11
+ export declare function finiteNumber(value: unknown): number;
12
+ /** Numeric disk literals remain literals, including integers larger than 2^53. */
13
+ export declare function encode(value: unknown): string;
14
+ /** Python repr(float): shortest round trip, exponent threshold and signed zero. */
15
+ export declare function pythonFloat(value: number): string;
16
+ export declare function scalarCompare(a: string, b: string): number;
17
+ /** json.dumps(ensure_ascii=False, sort_keys=True, separators=(',', ':'), allow_nan=False). */
18
+ export declare function canonical(value: unknown): string;
@@ -0,0 +1,165 @@
1
+ import { LosslessNumber } from 'lossless-json';
2
+ export { LosslessNumber };
3
+ // Do not use the dependency's marker-property guard at an untrusted boundary.
4
+ export function isLosslessNumber(value) { return value instanceof LosslessNumber; }
5
+ /** Parse before validation without rounding integers or losing their numeric kind. */
6
+ export function decode(text) {
7
+ const raw = text.replace(/^\uFEFF/, '');
8
+ const parse = JSON.parse;
9
+ const value = parse(raw, (_key, item, context) => {
10
+ if (typeof item !== 'number')
11
+ return item;
12
+ if (!context.source)
13
+ throw new Error('JSON source lexemes are unavailable');
14
+ return new LosslessNumber(context.source);
15
+ });
16
+ // The dependency parser suppresses equal duplicates. Scan keys after the
17
+ // native parser has checked grammar, decoding escaped keys before comparison.
18
+ const stack = [];
19
+ for (const match of raw.matchAll(/"(?:\\[\s\S]|[^"\\])*"|[{}\[\],:]/gu)) {
20
+ const token = match[0], top = stack.at(-1);
21
+ if (token === '{' || token === '[')
22
+ stack.push({ object: token === '{', key: true, seen: new Set() });
23
+ else if (token === '}' || token === ']')
24
+ stack.pop();
25
+ else if (token === ',' && top?.object)
26
+ top.key = true;
27
+ else if (token.startsWith('"') && top?.object && top.key) {
28
+ const key = JSON.parse(token);
29
+ if (top.seen.has(key))
30
+ throw new SyntaxError(`Duplicate JSON key: ${key}`);
31
+ top.seen.add(key);
32
+ top.key = false;
33
+ }
34
+ }
35
+ return value;
36
+ }
37
+ export function integer(value) {
38
+ if (typeof value === 'bigint')
39
+ return value;
40
+ if (typeof value === 'number' && Number.isSafeInteger(value))
41
+ return BigInt(value);
42
+ if (isLosslessNumber(value) && /^-?\d+$/.test(value.value))
43
+ return BigInt(value.value);
44
+ throw new TypeError('Expected an exact JSON integer');
45
+ }
46
+ export function safeInteger(value, minimum = Number.MIN_SAFE_INTEGER, maximum = Number.MAX_SAFE_INTEGER) {
47
+ const result = integer(value);
48
+ if (result < BigInt(minimum) || result > BigInt(maximum))
49
+ throw new RangeError('Integer outside the permitted range');
50
+ return Number(result);
51
+ }
52
+ export function finiteNumber(value) {
53
+ const result = isLosslessNumber(value) ? Number(value.value) : typeof value === 'number' ? value : NaN;
54
+ if (!Number.isFinite(result))
55
+ throw new TypeError('Expected a finite JSON number');
56
+ return result;
57
+ }
58
+ /** Numeric disk literals remain literals, including integers larger than 2^53. */
59
+ export function encode(value) {
60
+ const ancestors = new Set();
61
+ function visit(item) {
62
+ if (isLosslessNumber(item)) {
63
+ if (!/^-?\d+$/.test(item.value) && !Number.isFinite(Number(item.value)))
64
+ throw new TypeError('Non-finite JSON number');
65
+ return item.value;
66
+ }
67
+ if (typeof item === 'bigint')
68
+ return String(item);
69
+ if (typeof item === 'number') {
70
+ if (!Number.isFinite(item))
71
+ throw new TypeError('Non-finite JSON number');
72
+ return String(item);
73
+ }
74
+ if (typeof item === 'string' || typeof item === 'boolean' || item === null)
75
+ return JSON.stringify(item);
76
+ if (typeof item !== 'object' || ancestors.has(item))
77
+ throw new TypeError('Unsupported or circular JSON value');
78
+ ancestors.add(item);
79
+ try {
80
+ if (Array.isArray(item))
81
+ return '[' + Array.from(item, visit).join(',') + ']';
82
+ if (![Object.prototype, null].includes(Object.getPrototypeOf(item)))
83
+ throw new TypeError('Expected a JSON object');
84
+ return '{' + Object.keys(item).map(key => JSON.stringify(key) + ':' + visit(item[key])).join(',') + '}';
85
+ }
86
+ finally {
87
+ ancestors.delete(item);
88
+ }
89
+ }
90
+ return visit(value);
91
+ }
92
+ /** Python repr(float): shortest round trip, exponent threshold and signed zero. */
93
+ export function pythonFloat(value) {
94
+ if (!Number.isFinite(value))
95
+ throw new TypeError('Non-finite JSON number');
96
+ if (value === 0)
97
+ return Object.is(value, -0) ? '-0.0' : '0.0';
98
+ const negative = value < 0 ? '-' : '';
99
+ const [mantissa, rawExponent] = Math.abs(value).toExponential().split('e');
100
+ const exponent = Number(rawExponent);
101
+ if (exponent < -4 || exponent >= 16) {
102
+ return negative + mantissa + 'e' + (exponent < 0 ? '-' : '+') + String(Math.abs(exponent)).padStart(2, '0');
103
+ }
104
+ const digits = mantissa.replace('.', ''), point = exponent + 1;
105
+ if (point <= 0)
106
+ return negative + '0.' + '0'.repeat(-point) + digits;
107
+ if (point >= digits.length)
108
+ return negative + digits + '0'.repeat(point - digits.length) + '.0';
109
+ return negative + digits.slice(0, point) + '.' + digits.slice(point);
110
+ }
111
+ export function scalarCompare(a, b) {
112
+ const x = [...a], y = [...b];
113
+ for (let i = 0; i < Math.min(x.length, y.length); i++) {
114
+ const difference = x[i].codePointAt(0) - y[i].codePointAt(0);
115
+ if (difference)
116
+ return difference;
117
+ }
118
+ return x.length - y.length;
119
+ }
120
+ function quoted(value) {
121
+ // Python's ensure_ascii=False output cannot be encoded as UTF-8 with lone
122
+ // surrogates. Do not silently hash escaped/replacement bytes in its place.
123
+ for (const character of value) {
124
+ const point = character.codePointAt(0);
125
+ if (point >= 0xd800 && point <= 0xdfff)
126
+ throw new TypeError('Unpaired Unicode surrogate');
127
+ }
128
+ return JSON.stringify(value);
129
+ }
130
+ /** json.dumps(ensure_ascii=False, sort_keys=True, separators=(',', ':'), allow_nan=False). */
131
+ export function canonical(value) {
132
+ const ancestors = new Set();
133
+ function visit(item) {
134
+ if (isLosslessNumber(item))
135
+ return /^-?\d+$/.test(item.value) ? BigInt(item.value).toString() : pythonFloat(Number(item.value));
136
+ if (typeof item === 'bigint')
137
+ return String(item);
138
+ if (typeof item === 'string')
139
+ return quoted(item);
140
+ if (item === null || typeof item === 'boolean')
141
+ return JSON.stringify(item);
142
+ if (typeof item === 'number') {
143
+ if (Number.isSafeInteger(item) && !Object.is(item, -0))
144
+ return String(item);
145
+ return pythonFloat(item);
146
+ }
147
+ if (typeof item !== 'object')
148
+ throw new TypeError('Unsupported canonical value');
149
+ if (ancestors.has(item))
150
+ throw new TypeError('Circular JSON value');
151
+ ancestors.add(item);
152
+ try {
153
+ if (Array.isArray(item))
154
+ return '[' + Array.from(item, visit).join(',') + ']';
155
+ if (![Object.prototype, null].includes(Object.getPrototypeOf(item)))
156
+ throw new TypeError('Expected a JSON object');
157
+ return '{' + Object.keys(item).sort(scalarCompare).map(key => quoted(key) + ':' + visit(item[key])).join(',') + '}';
158
+ }
159
+ finally {
160
+ ancestors.delete(item);
161
+ }
162
+ }
163
+ return visit(value);
164
+ }
165
+ //# sourceMappingURL=json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/json.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,8EAA8E;AAC9E,MAAM,UAAU,gBAAgB,CAAC,KAAc,IAA6B,OAAO,KAAK,YAAY,cAAc,CAAC,CAAC,CAAC;AAGrH,sFAAsF;AACtF,MAAM,UAAU,MAAM,CAAC,IAAY;IACjC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,IAAI,CA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CAAC;QACnJ,CAAC;gBAAS,CAAC;YAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAAC,CAAC;IACvC,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC;AACtB,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Fixed-point rounding of the actual IEEE-754 value, with Python's ties-to-even. */
2
+ export declare function fixed(value: number, places: number): string;
3
+ /** Correctly rounded integer true division without an intermediate float cast. */
4
+ export declare function divideIntegers(numerator: bigint, denominator: bigint): number;
@@ -0,0 +1,47 @@
1
+ /** Fixed-point rounding of the actual IEEE-754 value, with Python's ties-to-even. */
2
+ export function fixed(value, places) {
3
+ if (!Number.isFinite(value) || !Number.isSafeInteger(places) || places < 0 || places > 20)
4
+ throw new RangeError('Invalid fixed-point number');
5
+ const view = new DataView(new ArrayBuffer(8));
6
+ view.setFloat64(0, value);
7
+ const bits = view.getBigUint64(0), negative = bits >> 63n === 1n;
8
+ const exponent = Number((bits >> 52n) & 0x7ffn);
9
+ const mantissa = (bits & 0xfffffffffffffn) + (exponent ? 1n << 52n : 0n);
10
+ const shift = (exponent || 1) - 1023 - 52;
11
+ let numerator = mantissa * 10n ** BigInt(places), denominator = 1n;
12
+ if (shift >= 0)
13
+ numerator <<= BigInt(shift);
14
+ else
15
+ denominator <<= BigInt(-shift);
16
+ let rounded = numerator / denominator;
17
+ const remainder = numerator % denominator;
18
+ if (2n * remainder > denominator || (2n * remainder === denominator && rounded % 2n !== 0n))
19
+ rounded++;
20
+ const digits = String(rounded).padStart(places + 1, '0');
21
+ return (negative ? '-' : '') + (places ? digits.slice(0, -places) + '.' + digits.slice(-places) : digits);
22
+ }
23
+ /** Correctly rounded integer true division without an intermediate float cast. */
24
+ export function divideIntegers(numerator, denominator) {
25
+ if (denominator === 0n)
26
+ throw new RangeError('division by zero');
27
+ const negative = (numerator < 0n) !== (denominator < 0n);
28
+ const n = numerator < 0n ? -numerator : numerator, d = denominator < 0n ? -denominator : denominator;
29
+ if (n === 0n)
30
+ return negative ? -0 : 0;
31
+ let exponent = n.toString(2).length - d.toString(2).length;
32
+ if (exponent >= 0 ? n < d << BigInt(exponent) : n << BigInt(-exponent) < d)
33
+ exponent--;
34
+ if (exponent > 1023)
35
+ throw new RangeError('integer division result too large for a float');
36
+ const shift = exponent < -1022 ? 1074 : 52 - exponent;
37
+ const top = shift >= 0 ? n << BigInt(shift) : n, bottom = shift >= 0 ? d : d << BigInt(-shift);
38
+ let quotient = top / bottom;
39
+ const remainder = top % bottom;
40
+ if (2n * remainder > bottom || 2n * remainder === bottom && quotient % 2n !== 0n)
41
+ quotient++;
42
+ const value = Number(quotient) * 2 ** (exponent < -1022 ? -1074 : exponent - 52);
43
+ if (!Number.isFinite(value))
44
+ throw new RangeError('integer division result too large for a float');
45
+ return negative ? -value : value;
46
+ }
47
+ //# sourceMappingURL=numbers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numbers.js","sourceRoot":"","sources":["../../src/numbers.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,UAAU,KAAK,CAAC,KAAa,EAAE,MAAc;IACjD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,GAAG,EAAE;QAAE,MAAM,IAAI,UAAU,CAAC,4BAA4B,CAAC,CAAC;IAC9I,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACzE,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAG,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;IACjE,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,M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QAAQ,GAAG,GAAG,GAAG,MAAM,CAAC;IAC5B,MAAM,SAAS,GAAG,GAAG,GAAG,MAAM,CAAC;IAC/B,IAAI,EAAE,GAAG,SAAS,GAAG,MAAM,IAAI,EAAE,GAAG,SAAS,KAAK,MAAM,IAAI,QAAQ,GAAG,EAAE,KAAK,EAAE;QAAE,QAAQ,EAAE,CAAC;IAC7F,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,GAAG,EAAE,CAAC,CAAC;IACjF,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,+CAA+C,CAAC,CAAC;IACnG,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;AACnC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /** Preserve JSON member order, including integer-like keys that JS reorders. */
2
+ export declare function orderedRecord(entries: Iterable<readonly [
3
+ string,
4
+ unknown
5
+ ]>): Record<string, unknown>;
6
+ export declare function isOrderedRecord(value: object): boolean;
7
+ /** Wrap parsed data without allocating a second large dictionary and entry list.
8
+ * The caller must have already preserved any numeric member ordering at parse.
9
+ */
10
+ export declare function orderedDataRecord<T>(value: Record<string, T>): Record<string, T>;
11
+ /** Internal iterations avoid repeating Proxy descriptor traps for every entry. */
12
+ export declare function recordKeys(value: object): string[];
13
+ export declare function recordEntries<T>(value: Record<string, T>): [
14
+ string,
15
+ T
16
+ ][];
17
+ export declare function recordValues<T>(value: Record<string, T>): T[];
18
+ /** Iterate large accounting dictionaries without allocating key/value arrays. */
19
+ export declare function forEachRecord<T>(value: Record<string, T>, visit: (value: T, key: string) => void): void;
20
+ /** A native serializer can bypass a Proxy only when JS preserves its key order. */
21
+ export declare function nativeRecord(value: object): object | null;
@@ -0,0 +1,105 @@
1
+ const records = new WeakMap();
2
+ function arrayIndex(key) {
3
+ if (typeof key !== 'string')
4
+ return false;
5
+ const first = key.charCodeAt(0);
6
+ if (key.length > 10 || first < 48 || first > 57 || !key.length)
7
+ return false;
8
+ const value = Number(key);
9
+ return Number.isInteger(value) && value >= 0 && value < 4294967295 && String(value) === key;
10
+ }
11
+ /** Preserve JSON member order, including integer-like keys that JS reorders. */
12
+ export function orderedRecord(entries) {
13
+ const target = Object.create(null), indexed = new Set();
14
+ let keys = null;
15
+ for (const [key, value] of entries) {
16
+ if (!keys && arrayIndex(key))
17
+ keys = new Set(Reflect.ownKeys(target));
18
+ target[key] = value;
19
+ keys?.add(key);
20
+ if (arrayIndex(key))
21
+ indexed.add(key);
22
+ }
23
+ Object.setPrototypeOf(target, Object.prototype);
24
+ return wrap(target, keys, indexed);
25
+ }
26
+ function wrap(target, keys, indexed) {
27
+ const state = { target, keys, indexed };
28
+ const define = (key, descriptor) => {
29
+ const exists = Object.hasOwn(target, key);
30
+ // Native property order already preserves ordinary string IDs. Allocate
31
+ // the insertion-order index only before a numeric or symbol key arrives.
32
+ if (!exists && !state.keys && (typeof key === 'symbol' || arrayIndex(key)))
33
+ state.keys = new Set(Reflect.ownKeys(target));
34
+ const defined = Reflect.defineProperty(target, key, descriptor);
35
+ if (defined && !exists) {
36
+ state.keys?.add(key);
37
+ if (arrayIndex(key))
38
+ indexed.add(key);
39
+ }
40
+ return defined;
41
+ };
42
+ const result = new Proxy(target, {
43
+ ownKeys: () => state.keys ? [...state.keys] : Reflect.ownKeys(target),
44
+ set(_object, key, value) {
45
+ return define(key, { value, enumerable: true, configurable: true, writable: true });
46
+ },
47
+ defineProperty(object, key, descriptor) {
48
+ return define(key, descriptor);
49
+ },
50
+ deleteProperty(object, key) {
51
+ const deleted = Reflect.deleteProperty(object, key);
52
+ if (deleted) {
53
+ state.keys?.delete(key);
54
+ if (typeof key === 'string')
55
+ indexed.delete(key);
56
+ }
57
+ return deleted;
58
+ },
59
+ });
60
+ records.set(result, state);
61
+ return result;
62
+ }
63
+ export function isOrderedRecord(value) { return records.has(value); }
64
+ /** Wrap parsed data without allocating a second large dictionary and entry list.
65
+ * The caller must have already preserved any numeric member ordering at parse.
66
+ */
67
+ export function orderedDataRecord(value) {
68
+ if (records.has(value))
69
+ return value;
70
+ const keys = Reflect.ownKeys(value), indexed = new Set(keys.filter(arrayIndex));
71
+ return wrap(value, indexed.size || keys.some(key => typeof key === 'symbol') ? new Set(keys) : null, indexed);
72
+ }
73
+ /** Internal iterations avoid repeating Proxy descriptor traps for every entry. */
74
+ export function recordKeys(value) {
75
+ const record = records.get(value);
76
+ return record?.keys ? [...record.keys].filter((key) => typeof key === 'string' && Object.prototype.propertyIsEnumerable.call(record.target, key)) : Object.keys(record?.target ?? value);
77
+ }
78
+ export function recordEntries(value) {
79
+ const record = records.get(value);
80
+ return record ? recordKeys(value).map(key => [key, record.target[key]]) : Object.entries(value);
81
+ }
82
+ export function recordValues(value) {
83
+ const record = records.get(value);
84
+ return record ? recordKeys(value).map(key => record.target[key]) : Object.values(value);
85
+ }
86
+ /** Iterate large accounting dictionaries without allocating key/value arrays. */
87
+ export function forEachRecord(value, visit) {
88
+ const record = records.get(value), target = (record?.target ?? value);
89
+ if (record?.keys) {
90
+ for (const key of record.keys)
91
+ if (typeof key === 'string' && Object.prototype.propertyIsEnumerable.call(target, key))
92
+ visit(target[key], key);
93
+ }
94
+ else {
95
+ for (const key in target)
96
+ if (Object.hasOwn(target, key))
97
+ visit(target[key], key);
98
+ }
99
+ }
100
+ /** A native serializer can bypass a Proxy only when JS preserves its key order. */
101
+ export function nativeRecord(value) {
102
+ const record = records.get(value);
103
+ return record ? record.indexed.size ? null : record.target : value;
104
+ }
105
+ //# sourceMappingURL=ordered-record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ordered-record.js","sourceRoot":"","sources":["../../src/ordered-record.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG,IAAI,OAAO,EAIv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7F,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,IAAI,KAAK,CAAsB,CAAC;IAC3F,IAAI,MAAM,EAAE,IAAI,EAAE,CAAC;QACf,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI;YAAE,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC;gBAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAE,EAAE,GAAG,CAAC,CAAC;IACpJ,CAAC;SAAM,CAAC;QACJ,KAAK,MAAM,GAAG,IAAI,MAAM;YAAE,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;gBAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAE,EAAE,GAAG,CAAC,CAAC;IACvF,CAAC;AACL,CAAC;AACD,mFAAmF;AACnF,MAAM,UAAU,YAAY,CAAC,KAAa;IACtC,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;AACvE,CAAC"}
@@ -0,0 +1,7 @@
1
+ /** Application identity. Internal workspaces are private implementation packages. */
2
+ export declare const VERSION = "3.0.0";
3
+ export declare const PACKAGE_NAME = "@fbincon/claude-code-statusline";
4
+ export declare const REPOSITORY_URL = "https://github.com/fbincon/claude-code-statusline";
5
+ export declare function isPrerelease(version: string): boolean;
6
+ /** TS previews retain the stable editor experience approved for TS-06. */
7
+ export declare function editorsEnabledByDefault(version: string): boolean;