gloomberb 0.20.4 → 0.20.6

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 (316) hide show
  1. package/README.md +3 -1
  2. package/README.zh-CN.md +1 -1
  3. package/bin/gloom +9 -0
  4. package/bin/without-bun.cjs +98 -0
  5. package/package.json +4 -1
  6. package/src/api-client/data.ts +148 -37
  7. package/src/api-client/hk-tenders.ts +59 -0
  8. package/src/api-client/index.ts +1 -0
  9. package/src/api-client/types/econ.ts +30 -0
  10. package/src/api-client/yield-curves.ts +1 -1
  11. package/src/app/global-shortcuts.ts +4 -1
  12. package/src/app/keybindings/actions.ts +6 -0
  13. package/src/app/keybindings/config.ts +2 -1
  14. package/src/app/keybindings/index.ts +1 -0
  15. package/src/app/keybindings/labels.ts +6 -1
  16. package/src/app/keybindings/resolve.ts +23 -4
  17. package/src/app/keybindings/terminal-keys.ts +35 -0
  18. package/src/app/pane-runtime/index.tsx +2 -2
  19. package/src/app/pane-runtime/ticker-open-runtime.ts +68 -40
  20. package/src/app.tsx +18 -13
  21. package/src/architecture/floating-promise-allowlist.json +313 -0
  22. package/src/architecture/ui-literals-allowlist.json +1 -1
  23. package/src/capabilities/chart-series.ts +27 -1
  24. package/src/cli/commands/keybindings.ts +5 -5
  25. package/src/cli/commands/market.ts +238 -57
  26. package/src/cli/commands/news-search.ts +81 -14
  27. package/src/cli/commands/overview.ts +27 -6
  28. package/src/cli/commands/remote.ts +16 -17
  29. package/src/cli/commands/system.ts +1 -1
  30. package/src/cli/commands/ticker.ts +3 -1
  31. package/src/cli/early-command.ts +2 -0
  32. package/src/cli/errors.ts +10 -1
  33. package/src/cli/fx-forward.ts +89 -7
  34. package/src/cli/fx-pair.ts +1 -1
  35. package/src/cli/fx-quote-rate.ts +23 -0
  36. package/src/cli/glossary.ts +19 -5
  37. package/src/cli/help.ts +1 -0
  38. package/src/cli/history-rows.ts +5 -3
  39. package/src/cli/index-roots.ts +5 -4
  40. package/src/cli/index.ts +40 -3
  41. package/src/cli/known-gaps.ts +38 -9
  42. package/src/cli/listing-arg.ts +17 -5
  43. package/src/cli/name-entries.ts +5 -1
  44. package/src/cli/not-a-ticker.ts +4 -0
  45. package/src/cli/options.ts +52 -3
  46. package/src/cli/output-file.ts +5 -3
  47. package/src/cli/pane-functions/catalog.ts +15 -0
  48. package/src/cli/pane-functions/function-help.ts +4 -4
  49. package/src/cli/pane-functions/headless.ts +9 -4
  50. package/src/cli/pane-functions/index.ts +6 -4
  51. package/src/cli/pane-functions/resolver.ts +2 -2
  52. package/src/cli/result.ts +21 -2
  53. package/src/cli/spreadsheet-hint.ts +7 -3
  54. package/src/cli/treasury-yields.ts +5 -3
  55. package/src/components/chart/composite/legend.tsx +40 -2
  56. package/src/components/command-bar/pane-settings.ts +2 -2
  57. package/src/components/command-bar/routes/root/results.ts +6 -2
  58. package/src/components/command-bar/workflow/tickers.ts +2 -2
  59. package/src/components/data-table/view.tsx +9 -2
  60. package/src/components/input-search-bar.tsx +9 -2
  61. package/src/components/layout/pane/header.tsx +2 -0
  62. package/src/components/layout/shell/pane/capture.ts +4 -1
  63. package/src/components/layout/status-bar.tsx +6 -1
  64. package/src/components/onboarding/first-run-workspace.ts +44 -2
  65. package/src/components/onboarding/onboarding-frame.tsx +11 -2
  66. package/src/components/onboarding/onboarding-keyboard.ts +16 -0
  67. package/src/components/onboarding/onboarding-wizard.tsx +8 -8
  68. package/src/components/onboarding/portfolio-step/positions-panel.tsx +62 -1
  69. package/src/components/onboarding/use-onboarding-progress.ts +12 -4
  70. package/src/components/pane-settings-dialog/desktop.tsx +2 -2
  71. package/src/components/pane-settings-dialog/tui.tsx +2 -2
  72. package/src/components/pane-settings-dialog/value.ts +6 -0
  73. package/src/components/pane-settings-dialog.tsx +3 -3
  74. package/src/components/reader/detail-reader.tsx +4 -0
  75. package/src/components/ui/data-table/opentui/index.tsx +11 -4
  76. package/src/components/ui/data-table/opentui/model.ts +8 -6
  77. package/src/components/ui/data-table/types.ts +6 -1
  78. package/src/components/ui/index.ts +1 -1
  79. package/src/components/ui/page-stack-view.tsx +3 -0
  80. package/src/components/ui/pane-link-chip.tsx +269 -54
  81. package/src/components/ui/query-bar.tsx +2 -1
  82. package/src/components/ui/table-layout.ts +38 -1
  83. package/src/components/ui/tabs.tsx +97 -19
  84. package/src/core/state/app/layout-reducer.ts +7 -0
  85. package/src/core/state/app/layout.ts +44 -7
  86. package/src/core/state/app/state.ts +1 -1
  87. package/src/core/state/app/types.ts +22 -2
  88. package/src/docs/snapshot.json +30 -13
  89. package/src/market-data/depositary-pair.ts +5 -3
  90. package/src/market-data/market/change-basis.ts +9 -5
  91. package/src/market-data/market/dated-previous-close.ts +147 -17
  92. package/src/market-data/market/status.ts +17 -1
  93. package/src/market-data/quotes/contributions.ts +2 -0
  94. package/src/market-data/quotes/listing-enterprise-value.ts +50 -0
  95. package/src/plugins/builtin/alerts/metric-data.ts +15 -2
  96. package/src/plugins/builtin/analytics/risk-client.ts +10 -4
  97. package/src/plugins/builtin/analytics/risk-episodes.ts +5 -4
  98. package/src/plugins/builtin/analytics/risk-headless.ts +4 -2
  99. package/src/plugins/builtin/analytics/risk-sectors.ts +91 -0
  100. package/src/plugins/builtin/awards/index.tsx +1 -1
  101. package/src/plugins/builtin/backtest/headless.ts +1 -1
  102. package/src/plugins/builtin/buildout/index.tsx +1 -0
  103. package/src/plugins/builtin/catalysts/index.tsx +2 -2
  104. package/src/plugins/builtin/cds/headless.ts +4 -0
  105. package/src/plugins/builtin/cds/model.ts +0 -6
  106. package/src/plugins/builtin/chart-composer/formula.ts +16 -3
  107. package/src/plugins/builtin/chart-composer/headless-schema.ts +2 -0
  108. package/src/plugins/builtin/chart-composer/headless.ts +4 -2
  109. package/src/plugins/builtin/chart-composer/index.tsx +1 -0
  110. package/src/plugins/builtin/chart-composer/presets.ts +1 -0
  111. package/src/plugins/builtin/chat/content/composer.tsx +5 -4
  112. package/src/plugins/builtin/chat/content/index.tsx +12 -2
  113. package/src/plugins/builtin/chat/content/layout-metrics.ts +3 -3
  114. package/src/plugins/builtin/chat/content/open-targets.ts +3 -3
  115. package/src/plugins/builtin/chat/layout.ts +5 -2
  116. package/src/plugins/builtin/chat/message/pane-chip.tsx +61 -40
  117. package/src/plugins/builtin/chat/message/terminal.tsx +13 -15
  118. package/src/plugins/builtin/chat/pane-links/previews.ts +51 -5
  119. package/src/plugins/builtin/chat/pane-links/share-card.ts +36 -0
  120. package/src/plugins/builtin/cloud/askg/pane.tsx +55 -13
  121. package/src/plugins/builtin/cloud/askg/tool-display.ts +1 -0
  122. package/src/plugins/builtin/cloud/terminal-relay/redact.ts +5 -3
  123. package/src/plugins/builtin/commodity-balances/index.tsx +1 -0
  124. package/src/plugins/builtin/company-attention/index.tsx +1 -1
  125. package/src/plugins/builtin/company-kpis/headless.ts +3 -1
  126. package/src/plugins/builtin/company-kpis/index.tsx +2 -2
  127. package/src/plugins/builtin/cot/index.tsx +1 -1
  128. package/src/plugins/builtin/cpi/index.tsx +1 -1
  129. package/src/plugins/builtin/credit-boards/cdx-pane.tsx +20 -7
  130. package/src/plugins/builtin/credit-boards/client.ts +8 -0
  131. package/src/plugins/builtin/credit-boards/headless.ts +4 -1
  132. package/src/plugins/builtin/credit-boards/model.ts +58 -4
  133. package/src/plugins/builtin/credit-boards/series.ts +63 -6
  134. package/src/plugins/builtin/credit-boards/sovr-pane.tsx +3 -2
  135. package/src/plugins/builtin/credit-conditions/headless.ts +24 -6
  136. package/src/plugins/builtin/credit-conditions/index.tsx +1 -1
  137. package/src/plugins/builtin/credit-conditions/model.ts +12 -6
  138. package/src/plugins/builtin/credit-conditions/series.ts +2 -1
  139. package/src/plugins/builtin/crypto-board/index.tsx +1 -0
  140. package/src/plugins/builtin/dividend-yield/index.tsx +1 -0
  141. package/src/plugins/builtin/doe/index.tsx +1 -1
  142. package/src/plugins/builtin/earnings-calls/headless.ts +5 -1
  143. package/src/plugins/builtin/earnings-calls/index.tsx +1 -0
  144. package/src/plugins/builtin/econ/calendar-model.ts +115 -8
  145. package/src/plugins/builtin/econ/calendar-source.ts +7 -1
  146. package/src/plugins/builtin/econ/fred-catalog.ts +3 -1
  147. package/src/plugins/builtin/econ/index.tsx +42 -8
  148. package/src/plugins/builtin/econ/types.ts +3 -0
  149. package/src/plugins/builtin/econ-statistics/index.tsx +1 -0
  150. package/src/plugins/builtin/econ-statistics/pane.tsx +6 -0
  151. package/src/plugins/builtin/estimate-revisions/index.tsx +1 -0
  152. package/src/plugins/builtin/executives/index.tsx +1 -0
  153. package/src/plugins/builtin/filing-events/index.tsx +1 -0
  154. package/src/plugins/builtin/fixed-income/index.tsx +3 -0
  155. package/src/plugins/builtin/futures-curve/headless.ts +3 -3
  156. package/src/plugins/builtin/futures-curve/index.tsx +1 -1
  157. package/src/plugins/builtin/futures-curve/model.ts +18 -0
  158. package/src/plugins/builtin/fx-matrix/index.tsx +44 -14
  159. package/src/plugins/builtin/gpu/index.tsx +1 -1
  160. package/src/plugins/builtin/help/functions-table.tsx +1 -1
  161. package/src/plugins/builtin/help/index.tsx +11 -1
  162. package/src/plugins/builtin/help/keybindings-editor.tsx +7 -3
  163. package/src/plugins/builtin/holders/index.tsx +1 -0
  164. package/src/plugins/builtin/holders/report-header.ts +2 -2
  165. package/src/plugins/builtin/insider/index.tsx +1 -0
  166. package/src/plugins/builtin/iv-history/index.tsx +1 -1
  167. package/src/plugins/builtin/jobs/index.tsx +1 -0
  168. package/src/plugins/builtin/macro-day/headless.ts +27 -8
  169. package/src/plugins/builtin/macro-day/index.tsx +1 -1
  170. package/src/plugins/builtin/macro-day/model.ts +19 -3
  171. package/src/plugins/builtin/macro-day/pane.tsx +14 -9
  172. package/src/plugins/builtin/macro-day/releases.ts +25 -7
  173. package/src/plugins/builtin/market-valuation/index.tsx +1 -0
  174. package/src/plugins/builtin/market-valuation/pane.tsx +8 -0
  175. package/src/plugins/builtin/members/index.tsx +1 -1
  176. package/src/plugins/builtin/mna/index.tsx +1 -0
  177. package/src/plugins/builtin/news/index.tsx +1 -0
  178. package/src/plugins/builtin/news/wire/index.tsx +5 -1
  179. package/src/plugins/builtin/news/wire/news/detail-view.tsx +4 -0
  180. package/src/plugins/builtin/news/wire/news/list-search.ts +5 -2
  181. package/src/plugins/builtin/options/index.tsx +1 -0
  182. package/src/plugins/builtin/options-positioning/index.tsx +1 -0
  183. package/src/plugins/builtin/pe-band/index.tsx +1 -1
  184. package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +25 -0
  185. package/src/plugins/builtin/portfolio-list/cli/render.ts +20 -3
  186. package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +5 -1
  187. package/src/plugins/builtin/portfolio-list/headless.ts +15 -6
  188. package/src/plugins/builtin/power/index.tsx +1 -1
  189. package/src/plugins/builtin/realized-vol/index.tsx +1 -1
  190. package/src/plugins/builtin/research/headless-schema.ts +4 -3
  191. package/src/plugins/builtin/research/headless.ts +10 -4
  192. package/src/plugins/builtin/research/index.tsx +4 -0
  193. package/src/plugins/builtin/research/relative-valuation-columns.ts +145 -47
  194. package/src/plugins/builtin/research/relative-valuation-currency.ts +31 -0
  195. package/src/plugins/builtin/research/relative-valuation-headless.ts +25 -8
  196. package/src/plugins/builtin/research/relative-valuation-model.ts +40 -9
  197. package/src/plugins/builtin/research/relative-valuation-pane.tsx +3 -2
  198. package/src/plugins/builtin/research/relative-valuation-peers.ts +2 -2
  199. package/src/plugins/builtin/research-search/index.tsx +1 -0
  200. package/src/plugins/builtin/research-search/pane.tsx +8 -0
  201. package/src/plugins/builtin/revenue-breakdown/index.tsx +1 -0
  202. package/src/plugins/builtin/reverse-dcf/index.tsx +1 -1
  203. package/src/plugins/builtin/risk-factors/index.tsx +1 -0
  204. package/src/plugins/builtin/scanner/headless.ts +52 -13
  205. package/src/plugins/builtin/seasonality/index.tsx +1 -1
  206. package/src/plugins/builtin/sec/index.tsx +1 -0
  207. package/src/plugins/builtin/series-inventory.ts +1 -1
  208. package/src/plugins/builtin/shared/scanner-capture.ts +11 -3
  209. package/src/plugins/builtin/shared/series-list-detail.tsx +5 -0
  210. package/src/plugins/builtin/short-interest/index.tsx +1 -0
  211. package/src/plugins/builtin/social-mentions/index.tsx +1 -1
  212. package/src/plugins/builtin/supply-chain/index.tsx +1 -0
  213. package/src/plugins/builtin/thirteenf/api.ts +47 -4
  214. package/src/plugins/builtin/thirteenf/data.ts +43 -10
  215. package/src/plugins/builtin/thirteenf/headless.ts +55 -11
  216. package/src/plugins/builtin/thirteenf/model.ts +25 -9
  217. package/src/plugins/builtin/thirteenf/report-notes.ts +27 -6
  218. package/src/plugins/builtin/thirteenf/types.ts +2 -0
  219. package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +1 -1
  220. package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +8 -7
  221. package/src/plugins/builtin/ticker-detail/data-panes/history-bars.ts +8 -5
  222. package/src/plugins/builtin/ticker-detail/financials/model.ts +18 -2
  223. package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +3 -3
  224. package/src/plugins/builtin/ticker-detail/financials/tab.tsx +6 -6
  225. package/src/plugins/builtin/ticker-detail/headless.ts +24 -17
  226. package/src/plugins/builtin/ticker-detail/index.tsx +4 -0
  227. package/src/plugins/builtin/ticker-detail/overview/model.ts +6 -4
  228. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +6 -4
  229. package/src/plugins/builtin/time-sales/client.ts +9 -11
  230. package/src/plugins/builtin/time-sales/index.tsx +1 -1
  231. package/src/plugins/builtin/treasury-auctions/after.ts +267 -0
  232. package/src/plugins/builtin/treasury-auctions/cache.ts +54 -5
  233. package/src/plugins/builtin/treasury-auctions/client.ts +33 -2
  234. package/src/plugins/builtin/treasury-auctions/headless.ts +150 -22
  235. package/src/plugins/builtin/treasury-auctions/hk-headless.ts +126 -0
  236. package/src/plugins/builtin/treasury-auctions/hk-view.tsx +347 -0
  237. package/src/plugins/builtin/treasury-auctions/hk.ts +363 -0
  238. package/src/plugins/builtin/treasury-auctions/index.tsx +27 -4
  239. package/src/plugins/builtin/treasury-auctions/model.ts +264 -28
  240. package/src/plugins/builtin/treasury-auctions/pane.tsx +176 -41
  241. package/src/plugins/builtin/treasury-auctions/treasury-direct.ts +5 -2
  242. package/src/plugins/builtin/treasury-auctions/types.ts +7 -1
  243. package/src/plugins/builtin/vol-surface/index.tsx +1 -1
  244. package/src/plugins/builtin/world-venue-map/index.ts +1 -0
  245. package/src/plugins/builtin/yield-curve/curves.ts +10 -4
  246. package/src/plugins/builtin/yield-curve/headless.ts +6 -2
  247. package/src/plugins/builtin/yield-curve/index.tsx +3 -3
  248. package/src/plugins/builtin/yield-curve/series.ts +10 -0
  249. package/src/plugins/builtin/yield-curve/world.ts +3 -1
  250. package/src/portfolio/collection-name.ts +22 -0
  251. package/src/portfolio/column-values.ts +2 -1
  252. package/src/public/__snapshots__/public-api.test.ts.snap +4 -0
  253. package/src/public/remote.ts +7 -1
  254. package/src/remote/client.ts +191 -11
  255. package/src/remote/controller-utils.ts +13 -1
  256. package/src/remote/controller.ts +88 -26
  257. package/src/remote/endpoint.ts +24 -0
  258. package/src/remote/form.ts +59 -4
  259. package/src/remote/resources.ts +44 -18
  260. package/src/remote/schema.ts +21 -9
  261. package/src/remote/secrets.ts +12 -0
  262. package/src/remote/semantic-tree.tsx +14 -2
  263. package/src/remote/server.ts +2 -1
  264. package/src/remote/surface.tsx +192 -0
  265. package/src/remote/types.ts +5 -0
  266. package/src/renderers/dom/data-table/frozen-column.ts +3 -1
  267. package/src/renderers/dom/data-table/index.tsx +27 -9
  268. package/src/renderers/dom/data-table/row.tsx +2 -0
  269. package/src/renderers/electrobun/bun/desktop/backend.ts +27 -24
  270. package/src/renderers/electrobun/bun/desktop/detached-windows.ts +3 -3
  271. package/src/renderers/electrobun/bun/desktop/snapshot-commit.ts +77 -0
  272. package/src/renderers/electrobun/shared/protocol.ts +4 -0
  273. package/src/renderers/electrobun/view/backend-rpc.ts +3 -0
  274. package/src/renderers/electrobun/view/desktop/window/bridge.ts +3 -0
  275. package/src/renderers/opentui/host.tsx +6 -0
  276. package/src/series/standalone.ts +2 -2
  277. package/src/shares/api.ts +21 -4
  278. package/src/shares/item.ts +73 -0
  279. package/src/shares/pane-item.ts +205 -0
  280. package/src/shares/pane.ts +4 -0
  281. package/src/shares/payload.ts +9 -5
  282. package/src/sources/gloomberb-cloud/news.ts +2 -0
  283. package/src/sources/gloomberb-cloud/normalizers.ts +9 -5
  284. package/src/sources/provider-router/cache.ts +3 -1
  285. package/src/sync/controller.ts +17 -2
  286. package/src/sync/other-window-tabs.ts +32 -1
  287. package/src/sync/react.ts +4 -4
  288. package/src/tickers/renamed-listings.ts +105 -0
  289. package/src/tickers/search/index.ts +103 -16
  290. package/src/time-series/bar-spacing.ts +33 -0
  291. package/src/time-series/base-series.ts +21 -3
  292. package/src/time-series/chart-bounds.ts +31 -0
  293. package/src/time-series/field-catalog.ts +17 -0
  294. package/src/time-series/fundamentals.ts +143 -11
  295. package/src/time-series/ice-credit.ts +32 -6
  296. package/src/time-series/resolve.ts +11 -7
  297. package/src/time-series/session-bar.ts +78 -9
  298. package/src/time-series/studies/formula.ts +53 -10
  299. package/src/time-series/studies/pair.ts +18 -7
  300. package/src/time-series/studies/units.ts +49 -2
  301. package/src/time-series/types.ts +12 -0
  302. package/src/types/desktop-window.ts +2 -0
  303. package/src/types/financials.ts +7 -0
  304. package/src/types/headless.ts +8 -0
  305. package/src/types/plugin-pane-settings.ts +2 -0
  306. package/src/types/plugin-panes.ts +22 -0
  307. package/src/utils/central-banks.ts +86 -1
  308. package/src/utils/cli-output.ts +6 -3
  309. package/src/utils/datetime-format.ts +12 -3
  310. package/src/utils/depositary-receipt.ts +28 -3
  311. package/src/utils/ebitda.ts +128 -0
  312. package/src/utils/format.ts +1 -1
  313. package/src/utils/fundamentals.ts +14 -0
  314. package/src/utils/max-drawdown.ts +97 -16
  315. package/src/utils/shell-word.ts +13 -0
  316. package/src/utils/untrusted-text.ts +29 -0
@@ -5,19 +5,25 @@ import { ICE_SPREAD_SERIES, type IceCreditSeries } from "../../../time-series/ic
5
5
 
6
6
  export type CreditSeriesDefinition = Pick<IceCreditSeries, "seriesId" | "label" | "region">;
7
7
 
8
- /** US investment grade and high yield by rating, then euro high yield. */
8
+ /** US investment grade and high yield by rating, euro high yield, then emerging markets corporates by grade and region. */
9
9
  export const CREDIT_SERIES: readonly CreditSeriesDefinition[] = ICE_SPREAD_SERIES
10
10
  .map(({ seriesId, label, region }) => ({ seriesId, label, region }));
11
11
 
12
- const CREDIT_REGIONS = ["all", "us", "euro"] as const;
12
+ const CREDIT_REGIONS = ["all", "us", "euro", "em", "asia"] as const;
13
13
  type CreditRegion = typeof CREDIT_REGIONS[number];
14
14
 
15
- export function creditRegion(value: unknown): CreditRegion {
16
- return CREDIT_REGIONS.includes(value as CreditRegion) ? value as CreditRegion : "all";
15
+ /** The regions to list, from a setting or `--region` (one, or a comma list such as `asia,us`); every one when none is known. */
16
+ export function creditRegion(value: unknown): readonly CreditRegion[] {
17
+ const regions = typeof value === "string"
18
+ ? [...new Set(value.split(",").map((part) => part.trim().toLowerCase()))].filter((part): part is CreditRegion => CREDIT_REGIONS.includes(part as CreditRegion))
19
+ : [];
20
+ return regions.length === 0 || regions.includes("all") ? ["all"] : regions;
17
21
  }
18
22
 
19
- export function creditSeriesIn(region: CreditRegion): readonly CreditSeriesDefinition[] {
20
- return region === "all" ? CREDIT_SERIES : CREDIT_SERIES.filter((series) => series.region === region);
23
+ /** The series in the regions, in the board's order: emerging markets take in Asia, its biggest region. */
24
+ export function creditSeriesIn(regions: readonly CreditRegion[]): readonly CreditSeriesDefinition[] {
25
+ if (regions.includes("all")) return CREDIT_SERIES;
26
+ return CREDIT_SERIES.filter((series) => regions.includes(series.region) || (series.region === "asia" && regions.includes("em")));
21
27
  }
22
28
 
23
29
  export interface CreditConditionRow {
@@ -6,7 +6,8 @@ import { ICE_CREDIT_SERIES, ICE_HISTORY_LIMIT_NOTICE } from "../../../time-serie
6
6
  export const CREDIT_SPREAD_SERIES: readonly SeriesDefinition[] = ICE_CREDIT_SERIES.map((series) => ({
7
7
  id: `fred:${series.seriesId}`,
8
8
  name: series.name,
9
- unit: "%",
9
+ // Spreads in bp, as G draws them; yields in percent.
10
+ unit: series.measure === "spread" ? "bp" : "%",
10
11
  frequency: "daily",
11
12
  group: "Credit",
12
13
  tags: [series.measure, ...series.tags, "corporate bonds"],
@@ -14,6 +14,7 @@ export const cryptoBoardModule: PluginModule = {
14
14
  id: "crypto-board",
15
15
  name: "Crypto",
16
16
  icon: "C",
17
+ shareItem: { argument: true },
17
18
  get component(): typeof import("./pane").CryptoBoardPane { const { CryptoBoardPane } = require("./pane"); return CryptoBoardPane; },
18
19
  defaultPosition: "right",
19
20
  defaultMode: "floating",
@@ -59,6 +59,7 @@ function createDividendYieldModule({
59
59
  icon: "D",
60
60
  component,
61
61
  defaultPosition: "right",
62
+ shareItem: { ticker: true },
62
63
  tickerFollower: true,
63
64
  defaultMode: "floating",
64
65
  defaultFloatingSize: { width: 90, height: 28 },
@@ -24,7 +24,7 @@ const shortcut = (prefix: string, tab: DoeTab | null) => ({
24
24
 
25
25
  export const doeModule: PluginModule = {
26
26
  series: DOE_CATALOG_SERIES,
27
- panes: [{ id: "doe", name: "Oil and Gas Inventories", icon: "D", get component(): typeof import("./pane").DoePane { const { DoePane } = require("./pane"); return DoePane; },
27
+ panes: [{ id: "doe", name: "Oil and Gas Inventories", icon: "D", shareItem: { argument: true }, get component(): typeof import("./pane").DoePane { const { DoePane } = require("./pane"); return DoePane; },
28
28
  defaultPosition: "right", defaultMode: "floating", defaultFloatingSize: { width: 96, height: 34 },
29
29
  tableExport: true, headless: doeHeadless("all") }],
30
30
  paneTemplates: [{
@@ -447,8 +447,12 @@ export function createEarningsCallsHeadless(
447
447
  return projectEarningsCallsHeadless(calls, { ...args, options: { ...args.options, limit: args.options.limit ?? 50 } }, now);
448
448
  }
449
449
  const quarter = String(args.options.quarter || "latest");
450
- const selected = findCallForQuarter(calls.calls, quarter);
450
+ // A call still to come has no transcript to read, and asking for one would ask the server to produce it before
451
+ // the call is held: the latest is the latest held, and a quarter whose call is ahead says when it is.
452
+ const selected = findCallForQuarter(calls.calls.filter((call) => !isUpcomingCall(call, now)), quarter);
451
453
  if (!selected) {
454
+ const ahead = findCallForQuarter(calls.calls, quarter);
455
+ if (ahead) throw new Error(`${ticker}'s ${quarter} call is still to come. ${nextCallNotice(ahead, now)}`);
452
456
  if (calls.unknownTicker) throw new Error(`${ticker} is not a known listed company.`);
453
457
  if (calls.pending) throw new Error(`Earnings call discovery for ${ticker} is still pending.`);
454
458
  if (calls.sourceLimitReached ?? calls.calls.length >= (calls.sourceLimit ?? 200)) {
@@ -38,6 +38,7 @@ export const earningsCallsModule: PluginModule = {
38
38
  icon: "C",
39
39
  component: EarningsCallsPane,
40
40
  defaultPosition: "right",
41
+ shareItem: { ticker: true },
41
42
  tickerFollower: true,
42
43
  instruments: ["equity"],
43
44
  defaultMode: "floating",
@@ -123,15 +123,41 @@ export function dayLabel(d: Date, today: Date): string {
123
123
  const MIN_DAYS_LISTED_AHEAD = 7;
124
124
 
125
125
  /**
126
- * When the calendar stops short of a week past `windowStart`, the time of its
127
- * last event; null when it reaches that far or lists nothing.
126
+ * The last UTC day the calendar lists releases for, YYYY-MM-DD, as Gloom Cloud
127
+ * says it: on the calendar from a day (`served`), or on each central bank's
128
+ * next decision it lists past the end (`listedThrough`). From a server that
129
+ * says neither, which lists nothing past the end, the day of the last event.
130
+ * Null when it lists nothing.
128
131
  */
129
- export function shortCalendarEnd(events: readonly EconEvent[], windowStart: number): Date | null {
132
+ export function listingEnd(
133
+ events: readonly Pick<EconEvent, "date" | "listedThrough">[],
134
+ served?: string | null,
135
+ ): string | null {
136
+ const said = served ?? events.find((event) => event.listedThrough)?.listedThrough;
137
+ if (said && /^\d{4}-\d{2}-\d{2}$/.test(said)) return said;
130
138
  let last: Date | null = null;
131
139
  for (const event of events) {
132
140
  if (!last || event.date.getTime() > last.getTime()) last = event.date;
133
141
  }
134
- return last && last.getTime() < windowStart + MIN_DAYS_LISTED_AHEAD * 86_400_000 ? last : null;
142
+ return last ? dateKey(last) : null;
143
+ }
144
+
145
+ /**
146
+ * When the listing (`listingEnd`) stops short of a week past `windowStart`,
147
+ * its last day; null when it reaches that far or lists nothing.
148
+ */
149
+ export function shortCalendarEnd(
150
+ events: readonly Pick<EconEvent, "date" | "listedThrough">[],
151
+ windowStart: number,
152
+ served?: string | null,
153
+ ): string | null {
154
+ const end = listingEnd(events, served);
155
+ return end && Date.parse(`${end}T00:00:00Z`) + 86_400_000 <= windowStart + MIN_DAYS_LISTED_AHEAD * 86_400_000 ? end : null;
156
+ }
157
+
158
+ /** Whether a row is a central bank's next decision Gloom Cloud lists past the end of the listing. */
159
+ export function pastReleaseListing(event: Pick<EconEvent, "pastListing">): boolean {
160
+ return event.pastListing === true;
135
161
  }
136
162
 
137
163
  /**
@@ -314,9 +340,82 @@ export function eventSeriesId(event: Pick<EconEvent, "country" | "event">): stri
314
340
  */
315
341
  export function eventSearchNames(event: Pick<EconEvent, "country" | "event" | "actual" | "forecast" | "prior">): string[] {
316
342
  const series = resolveFredMapping(event.event, event.country)?.seriesId;
317
- return [...[event.event, econEventName(event)].map(compactName), ...series ? statNamesOf(series) : []];
343
+ const policy = POLICY_DECISION.test(event.event) ? policyRateNames(event.country) : [];
344
+ return [...[event.event, econEventName(event)].map(compactName), ...series ? statNamesOf(series) : [], ...policy];
318
345
  }
319
346
 
347
+ /** A central bank's decision or fixing, under the titles the calendar gives them. */
348
+ const POLICY_DECISION = /interest rate decision|rate decision|loan prime rate|policy rate|cash rate|bank rate|funds rate|deposit facility rate|selic|repo rate|key rate/i;
349
+
350
+ /**
351
+ * The names people give a bank's policy rate and its committee, so `--search
352
+ * selic` finds the Copom's decision and `--search banxico` Banxico's: by the
353
+ * calendar's country, with the names every bank's decision answers to.
354
+ */
355
+ const POLICY_RATE_NAMES: Readonly<Record<string, readonly string[]>> = {
356
+ US: ["fed funds", "federal funds", "FOMC", "Federal Reserve"],
357
+ EU: ["ECB", "deposit rate", "deposit facility", "refi rate"],
358
+ GB: ["Bank Rate", "BoE", "MPC"],
359
+ JP: ["BoJ", "Bank of Japan"],
360
+ CA: ["BoC", "overnight rate"],
361
+ AU: ["RBA", "cash rate"],
362
+ NZ: ["RBNZ", "OCR", "official cash rate"],
363
+ CH: ["SNB"],
364
+ CN: ["LPR", "loan prime rate", "PBoC"],
365
+ IN: ["RBI", "repo rate"],
366
+ ID: ["BI rate", "Bank Indonesia"],
367
+ KR: ["BoK", "base rate"],
368
+ BR: ["Selic", "Copom", "Banco Central do Brasil", "BCB"],
369
+ MX: ["Banxico", "Banco de Mexico", "tasa objetivo", "target rate"],
370
+ RU: ["key rate", "Bank of Russia", "CBR"],
371
+ TR: ["CBRT", "TCMB", "one-week repo"],
372
+ ZA: ["SARB", "repo rate"],
373
+ NO: ["Norges Bank", "sight deposit rate"],
374
+ SE: ["Riksbank"],
375
+ };
376
+ const ANY_POLICY_RATE = ["policy rate", "rate decision", "interest rate", "central bank", "monetary policy"];
377
+
378
+ function policyRateNames(country: string): string[] {
379
+ return [...POLICY_RATE_NAMES[country.toUpperCase()] ?? [], ...ANY_POLICY_RATE].map(compactName);
380
+ }
381
+
382
+ const nameWords = (text: string) => text.toLowerCase().split(/[^a-z0-9]+/).filter(Boolean);
383
+ /** Words of many banks' names that name none alone: "bank" is the BoE's, the BoJ's and three more. */
384
+ const SHARED_NAME_WORDS = new Set(["bank", "of", "de", "do", "rate", "central"]);
385
+
386
+ /**
387
+ * The decisions a search for a bank's own names means, for an empty answer to
388
+ * say: `selic` is Brazil's Copom decision. Every word of the query must be a
389
+ * whole word of one of the bank's names, or the name run together (`fedfunds`):
390
+ * `cbr` is the Bank of Russia's and not the CBRT's, and words many names share
391
+ * name none alone (`bank`, SHARED_NAME_WORDS). Only the
392
+ * banks of the countries the calendar lists (`countries`, as --country reads).
393
+ * Empty for a query no bank's names hold, and for the names every bank's
394
+ * decision answers to (a query of those already lists them).
395
+ */
396
+ export function policyDecisionsNamed(query: string, countries: CountryFilter = "all"): Array<{ country: string; event: string }> {
397
+ const words = nameWords(query);
398
+ if (words.every((word) => SHARED_NAME_WORDS.has(word))) return [];
399
+ return Object.entries(POLICY_RATE_NAMES).flatMap(([country, names]) => {
400
+ const event = POLICY_DECISION_TITLES[country] ?? "Interest Rate Decision";
401
+ if (!matchesCountry({ country, event }, countries)) return [];
402
+ const named = names.some((name) => {
403
+ const parts = nameWords(name);
404
+ return words.every((word) => parts.includes(word) || word === compactName(name));
405
+ });
406
+ return named ? [{ country, event }] : [];
407
+ });
408
+ }
409
+
410
+ /** How the calendar titles each bank's decision (China's is its LPR fixing). */
411
+ const POLICY_DECISION_TITLES: Readonly<Record<string, string>> = {
412
+ US: "Fed Interest Rate Decision", EU: "ECB Interest Rate Decision", GB: "BoE Interest Rate Decision", JP: "BoJ Interest Rate Decision",
413
+ CA: "BoC Interest Rate Decision", AU: "RBA Interest Rate Decision", NZ: "RBNZ Interest Rate Decision", CH: "SNB Interest Rate Decision",
414
+ CN: "1-y Loan Prime Rate", IN: "RBI Interest Rate Decision", ID: "BI Interest Rate Decision", KR: "BoK Interest Rate Decision",
415
+ BR: "Copom Interest Rate Decision", MX: "Banxico Interest Rate Decision", RU: "Bank of Russia Interest Rate Decision",
416
+ TR: "CBRT Interest Rate Decision", ZA: "SARB Interest Rate Decision", NO: "Norges Bank Interest Rate Decision", SE: "Riksbank Interest Rate Decision",
417
+ };
418
+
320
419
  /**
321
420
  * Whether a row carries every word of `query` in one of its names or its
322
421
  * publisher's, case, spaces and hyphens aside: `nonfarm` finds Non Farm
@@ -343,6 +442,11 @@ export function awaitsConsensus(event: Pick<EconEvent, "actual" | "forecast" | "
343
442
  /** What a dash under Forecast means on a row still to come. */
344
443
  export const NO_CONSENSUS_NOTE = `${MISSING_VALUE} forecast = no consensus yet`;
345
444
 
445
+ /** What the dash under Time means on a bank's decision whose calendar gives the day and not the time, from its note. */
446
+ export function noTimeNote(timeNote: string): string {
447
+ return `${MISSING_VALUE} time = ${timeNote.charAt(0).toLowerCase()}${timeNote.slice(1).replace(/\.$/, "")}`;
448
+ }
449
+
346
450
  /** A national euro-area release matches EU (and G7, as EU) and its own member's code. */
347
451
  export function matchesCountry(event: Pick<EconEvent, "country" | "event">, filter: CountryFilter): boolean {
348
452
  const member = euroAreaMember(event);
@@ -409,10 +513,13 @@ export function countriesWithoutEvents(filter: CountryFilter, events: ReadonlyAr
409
513
  return filterCountries(filter).filter((country) => !listed.has(country));
410
514
  }
411
515
 
412
- /** "No scheduled releases for MX in this window", or for MX or ZA. */
413
- export function noScheduledReleasesMessage(countries: readonly string[]): string {
516
+ /**
517
+ * "No scheduled releases for MX in this window", or for MX or ZA; with the
518
+ * day the listing ends, where it does ("; releases are listed through 2026-11-20").
519
+ */
520
+ export function noScheduledReleasesMessage(countries: readonly string[], listedThrough?: string | null): string {
414
521
  const named = countries.length > 1 ? `${countries.slice(0, -1).join(", ")} or ${countries.at(-1)}` : countries.join("");
415
- return `No scheduled releases for ${named} in this window.`;
522
+ return `No scheduled releases for ${named} in this window${listedThrough ? `; releases are listed through ${listedThrough}` : ""}.`;
416
523
  }
417
524
 
418
525
  /**
@@ -22,6 +22,8 @@ export type EconCalendarFrom =
22
22
  events: EconEvent[];
23
23
  /** The first UTC day the stored calendar holds; null when it holds nothing. */
24
24
  storedFrom: string | null;
25
+ /** The last UTC day the calendar lists releases for; null from a server that does not say. */
26
+ listedThrough: string | null;
25
27
  }
26
28
  | {
27
29
  events: null;
@@ -42,7 +44,11 @@ export async function fetchEconCalendarFrom(from: string): Promise<EconCalendarF
42
44
  if (!payload || !Array.isArray(payload.events) || !(payload.storedFrom === null || /^\d{4}-\d{2}-\d{2}$/.test(String(payload.storedFrom)))) {
43
45
  return { events: null, failure: "the server returned an unreadable calendar" };
44
46
  }
45
- return { events: withPercentUnits(payload.events.map(toEconEvent)), storedFrom: payload.storedFrom };
47
+ return {
48
+ events: withPercentUnits(payload.events.map(toEconEvent)),
49
+ storedFrom: payload.storedFrom,
50
+ listedThrough: typeof payload.listedThrough === "string" && /^\d{4}-\d{2}-\d{2}$/.test(payload.listedThrough) ? payload.listedThrough : null,
51
+ };
46
52
  } catch (error) {
47
53
  if (error instanceof ApiRequestError && error.status === 404) return { events: null, failure: null };
48
54
  if (isPermanentClientError(error)) throw error;
@@ -184,11 +184,13 @@ const GROUPS: ReadonlyArray<{ group: string; rows: readonly FredRow[] }> = [
184
184
  ],
185
185
  },
186
186
  {
187
- // The IMF's monthly world prices: the closest public series to LME copper and aluminium, which FUT does not list.
187
+ // The IMF's monthly world prices: the closest public series to LME copper and aluminium, which FUT does not list,
188
+ // and to iron ore, whose futures are licensed.
188
189
  group: "Commodities",
189
190
  rows: [
190
191
  ["PCOPPUSDM", "Global price of copper", "USD/ton", "monthly", ["copper", "metals", "LME"]],
191
192
  ["PALUMUSDM", "Global price of aluminum", "USD/ton", "monthly", ["aluminum", "aluminium", "metals", "LME"]],
193
+ ["PIORECRUSDM", "Global price of iron ore (dry metric ton)", "USD/ton", "monthly", ["iron ore", "iron", "steel", "metals"]],
192
194
  ],
193
195
  },
194
196
  {
@@ -39,7 +39,6 @@ import {
39
39
  awaitsConsensus,
40
40
  calendarDisplayRows,
41
41
  CALENDAR_TIME_ZONE_LABEL,
42
- dateKey,
43
42
  dayLabel,
44
43
  econEventName,
45
44
  filteredEmptyTitle,
@@ -54,7 +53,10 @@ import {
54
53
  matchesImpact,
55
54
  NO_CONSENSUS_NOTE,
56
55
  noScheduledReleasesMessage,
56
+ noTimeNote as noTimeNoteText,
57
57
  parseCountryFilter,
58
+ listingEnd,
59
+ pastReleaseListing,
58
60
  resetEconCalendarPersistence,
59
61
  shortCalendarEnd,
60
62
  shortDayLabel,
@@ -67,6 +69,7 @@ import {
67
69
  type ImpactFilter,
68
70
  } from "./calendar-model";
69
71
  import { figureWithCurrency } from "./figures";
72
+ import { MISSING_VALUE } from "../../../utils/format";
70
73
  import { usePaneStatusFooter } from "../../../components/layout/pane/status-footer";
71
74
  import { handleRefreshKey } from "../../../components/data-table/table-pane";
72
75
  import { tableColumnWidth } from "../../../components/ui/table-layout";
@@ -80,6 +83,8 @@ const IMPACT_LABELS: Record<ImpactFilter, string> = {
80
83
  };
81
84
 
82
85
  const NO_EVENTS: EconEvent[] = [];
86
+ /** The start (UTC) of a YYYY-MM-DD day, to label it. */
87
+ const dayStart = (day: string) => new Date(`${day}T00:00:00Z`);
83
88
  const SPELLED_IMPACT = "IMPACT";
84
89
  const SPELLED_COUNTRY = "COUNTRY";
85
90
  /** Event names this wide still read; past it the headers spell themselves out. */
@@ -163,7 +168,11 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
163
168
  const todayStart = Math.floor(now / 86_400_000) * 86_400_000;
164
169
  // A calendar that stops short of a week ahead says where it stops.
165
170
  const listedEnd = shortCalendarEnd(events, todayStart);
166
- const listedAfter = listedEnd ? `No events listed after ${shortDayLabel(listedEnd)}` : null;
171
+ const listedAfter = listedEnd ? `No events listed after ${shortDayLabel(dayStart(listedEnd))}` : null;
172
+ // Past the listing's end Gloom Cloud lists each central bank's next decision: where the rows shown run past it, the
173
+ // footer says where the releases end, as the CLI does under its table.
174
+ const releasesThrough = useMemo(() => listingEnd(events), [events]);
175
+ const showsPastListing = filtered.some(pastReleaseListing);
167
176
 
168
177
  // Map from eventIdx to flat row index (for scroll tracking)
169
178
  const eventIdxToRowIdx = new Map<number, number>();
@@ -309,7 +318,8 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
309
318
  // Countries named one by one with nothing in the calendar: a quiet window there, said plainly.
310
319
  const unscheduled = useMemo(() => countriesWithoutEvents(countryFilter, events), [countryFilter, events]);
311
320
  const filterEmptyTitle = events.length === 0 ? null
312
- : unscheduled.length > 0 && unscheduled.length === countryFilter.split(",").length ? noScheduledReleasesMessage(unscheduled).replace(/\.$/, "")
321
+ : unscheduled.length > 0 && unscheduled.length === countryFilter.split(",").length
322
+ ? noScheduledReleasesMessage(unscheduled, releasesThrough ? shortDayLabel(dayStart(releasesThrough)) : null).replace(/\.$/, "")
313
323
  : filteredEmptyTitle(impactFilter, countryFilter);
314
324
  const emptyStateHint = !loading && !error
315
325
  ? [
@@ -338,6 +348,10 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
338
348
  // The dash under Forecast on the row in hand, while its consensus is not in yet.
339
349
  const focusedEvent = detailEvent ?? filtered[selectedIdx];
340
350
  const noConsensus = !!focusedEvent && awaitsConsensus(focusedEvent);
351
+ // The blank time on the row in hand, with why: a bank whose calendar gives the day and not the time.
352
+ const noTimeNote = focusedEvent && hasNoStatedTime(focusedEvent) ? noTimeNoteText(focusedEvent.timeNote!) : null;
353
+ const pastListingStatus = showsPastListing && releasesThrough && !detailEvent && !listedAfterStatus
354
+ ? `releases listed through ${shortDayLabel(dayStart(releasesThrough))}, then each bank's next decision` : null;
341
355
  const calendarStatus = useMemo<PaneFooterSegment[]>(() => [
342
356
  ...(hiddenStatus ? [{
343
357
  id: "hidden-impact",
@@ -348,19 +362,33 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
348
362
  }] : []),
349
363
  ...(nextText && !detailEvent ? [{ id: "next", parts: [{ text: nextText, tone: "muted" as const }] }] : []),
350
364
  ...(listedAfterStatus ? [{ id: "listed-after", parts: [{ text: listedAfterStatus, tone: "warning" as const }] }] : []),
365
+ ...(pastListingStatus ? [{ id: "listed-through", parts: [{ text: pastListingStatus, tone: "muted" as const }],
366
+ variants: [[{ text: `releases through ${shortDayLabel(dayStart(releasesThrough!))}`, tone: "muted" as const }]] }] : []),
351
367
  ...(showStale ? [{ id: "stale", parts: [{ text: "STALE", tone: "warning" as const }] }] : []),
352
368
  // Behind the warnings, so a narrow footer gives it up before them, and ahead of the update time, which goes first.
369
+ // The blank time first: of the row in hand's notes it is the one the row cannot say itself.
370
+ ...(noTimeNote ? [{ id: "no-time", parts: [{ text: noTimeNote, tone: "muted" as const }],
371
+ variants: [[{ text: "no time stated", tone: "muted" as const }]] }] : []),
353
372
  ...(noConsensus ? [{ id: "no-consensus", parts: [{ text: NO_CONSENSUS_NOTE, tone: "muted" as const }],
354
373
  variants: [[{ text: "no consensus yet", tone: "muted" as const }]] }] : []),
355
374
  ...(staleness ? [{ id: "updated", parts: [{ text: staleness, tone: "muted" as const }] }] : []),
356
- ], [allImpactKey, detailEvent, hiddenStatus, listedAfterStatus, nextText, noConsensus, showStale, staleness]);
375
+ ], [allImpactKey, detailEvent, hiddenStatus, listedAfterStatus, nextText, noConsensus, noTimeNote, pastListingStatus, releasesThrough, showStale, staleness]);
357
376
  // A report of the pane (`gloom fn ECO`) says it too.
358
- const listedThrough = listedEnd ? dateKey(listedEnd) : null;
377
+ const listedThrough = listedEnd;
359
378
  useRemoteUiNode(listedAfter && listedThrough ? {
360
379
  role: "report-notice",
361
380
  label: "Listed through",
362
381
  getMetadata: () => ({ text: listedAfter, key: "listedThrough", value: listedThrough }),
363
382
  } : null);
383
+ useRemoteUiNode(pastListingStatus && releasesThrough ? {
384
+ role: "report-notice",
385
+ label: "Releases listed through",
386
+ getMetadata: () => ({
387
+ text: `No releases listed after ${releasesThrough}; the rows after it are each central bank's next decision.`,
388
+ key: "releasesListedThrough",
389
+ value: releasesThrough,
390
+ }),
391
+ } : null);
364
392
  useRemoteUiNode(hiddenCount > 0 ? {
365
393
  role: "report-notice",
366
394
  label: "Lower-impact hidden",
@@ -424,10 +452,15 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
424
452
  const ev = row.event;
425
453
  switch (column.id) {
426
454
  case "time":
427
- // A bank that states no time has none here, and its detail says why; an all-day event (a plenum, an election) says so.
428
- return { text: hasNoStatedTime(ev) ? "" : isAllDayEvent(ev) ? "All day" : timeLabel(ev.date), color: colors.textMuted };
455
+ // A bank that states no time has a dash here, and the footer and its detail say why; an all-day event (a plenum,
456
+ // an election) says so.
457
+ return { text: hasNoStatedTime(ev) ? MISSING_VALUE : isAllDayEvent(ev) ? "All day" : timeLabel(ev.date), color: colors.textMuted };
429
458
  case "readerTime":
430
- return { text: hasNoReleaseTime(ev) || !readerZone ? "" : zonedClock(ev.date.getTime(), readerZone).label, color: colors.textMuted };
459
+ // The reader's clock has no time to give a bank that states none: the same dash as its time.
460
+ return {
461
+ text: !readerZone ? "" : hasNoStatedTime(ev) ? MISSING_VALUE : hasNoReleaseTime(ev) ? "" : zonedClock(ev.date.getTime(), readerZone).label,
462
+ color: colors.textMuted,
463
+ };
431
464
  case "impact": {
432
465
  const indicator = impactIndicator(ev.impact);
433
466
  return {
@@ -544,6 +577,7 @@ export const economicCalendarModule: PluginModule = {
544
577
  id: "econ-calendar",
545
578
  reportFreshness: { status: "not-a-feed", basis: "calendar" },
546
579
  name: "Economic Calendar",
580
+ shareItem: { argument: true },
547
581
  icon: "E",
548
582
  component: EconCalendarPane,
549
583
  defaultPosition: "right",
@@ -36,6 +36,9 @@ export interface EconEvent {
36
36
  indicatorId?: string | null;
37
37
  /** Which feed the forecast was read from (`week-feed`, `release-calendar`) and when that feed was read. */
38
38
  consensus?: { source: string; readAt: string } | null;
39
+ /** A central bank's next decision Gloom Cloud lists past the end of the listing, which ends on `listedThrough` (UTC). */
40
+ pastListing?: boolean;
41
+ listedThrough?: string;
39
42
  }
40
43
 
41
44
  /** Whether a row's time is blank because its publisher states none (a bank whose calendar gives the day only). */
@@ -12,6 +12,7 @@ export const econStatisticsModule: PluginModule = {
12
12
  id: ECON_STATISTICS_PANE_ID,
13
13
  name: "Economic Statistics",
14
14
  icon: "E",
15
+ shareItem: { open: true, argument: true },
15
16
  get component(): typeof import("./pane").EconStatisticsPane { const { EconStatisticsPane } = require("./pane"); return EconStatisticsPane; },
16
17
  defaultPosition: "right",
17
18
  defaultMode: "floating",
@@ -88,6 +88,11 @@ function buildColumns(width: number, stacked: boolean): Column[] {
88
88
  ];
89
89
  }
90
90
 
91
+ /** A link to the pane names the statistic its chart shows, with its latest print. */
92
+ function statShareItem(view: StatViewModel) {
93
+ return { title: view.stat.label, excerpt: [view.stat.formatValue(view.latest.value), view.period].filter(Boolean).join(" · ") };
94
+ }
95
+
91
96
  /**
92
97
  * The previous print rather than the difference. For a statistic that is already a
93
98
  * change, like payrolls, a delta would be a second derivative and mean very little.
@@ -142,6 +147,7 @@ export function EconStatisticsPane({ focused, width, height }: PaneProps) {
142
147
  onSelect: setStatId,
143
148
  reload,
144
149
  range: { value: range, options: RANGE_OPTIONS, onChange: setRange, chartRange: true },
150
+ shareItem: statShareItem,
145
151
  });
146
152
  const { selected, searchFocused } = list;
147
153
  const rows = useMemo(() => withCategoryHeaders(list.visible), [list.visible]);
@@ -13,6 +13,7 @@ export const estimateRevisionsModule: PluginModule = {
13
13
  icon: "E",
14
14
  get component(): typeof import("./pane").EstimateRevisionsPane { const { EstimateRevisionsPane } = require("./pane"); return EstimateRevisionsPane; },
15
15
  defaultPosition: "right",
16
+ shareItem: { ticker: true },
16
17
  tickerFollower: true,
17
18
  instruments: ["equity"],
18
19
  defaultMode: "floating",
@@ -37,6 +37,7 @@ export const executivesModule: PluginModule = {
37
37
  icon: "X",
38
38
  component: ExecutivesPane,
39
39
  defaultPosition: "right",
40
+ shareItem: { ticker: true },
40
41
  tickerFollower: true,
41
42
  instruments: ["equity"],
42
43
  defaultMode: "floating",
@@ -50,6 +50,7 @@ export const filingEventsModule: PluginModule = {
50
50
  icon: "K",
51
51
  component: FilingEventsPane,
52
52
  defaultPosition: "right",
53
+ shareItem: { ticker: true },
53
54
  tickerFollower: true,
54
55
  instruments: ["equity"],
55
56
  defaultMode: "floating",
@@ -11,6 +11,7 @@ export const fixedIncomeModule: PluginModule = {
11
11
  defaultPosition: "right",
12
12
  defaultMode: "floating",
13
13
  defaultFloatingSize: { width: 116, height: 32 },
14
+ shareItem: { ticker: true },
14
15
  tickerFollower: true,
15
16
  tableExport: true,
16
17
  settings: {
@@ -24,6 +25,8 @@ export const fixedIncomeModule: PluginModule = {
24
25
  { value: "all", label: "All" },
25
26
  { value: "us", label: "US" },
26
27
  { value: "euro", label: "Euro" },
28
+ { value: "em", label: "Emerging markets" },
29
+ { value: "asia", label: "Asia" },
27
30
  ],
28
31
  },
29
32
  ...treasuryAuctionsSettings().fields,
@@ -5,7 +5,7 @@ import { formatPercentRaw } from "../../../utils/format";
5
5
  import { DATE_OPTION_EXAMPLES } from "../../../utils/calendar-date";
6
6
  import { newestReportTime, oldestReportTime } from "../../../utils/utc-time";
7
7
  import { fetchFuturesCurve, loadCurveSpot, loadCurveSpotBars, loadCurveSpotCloses, loadFuturesCurveAsOf } from "./client";
8
- import { basisSpotSymbol, BASIS_CONVENTION, blankBasisNote, catalogueCurveUnit, curveAsOfDate, curveCache, curveSpotBars, curveBasisPercent, curveBasisRows, curveChangeText, curveContractCode, curvePrice, curveReadsThirtySeconds, curveRoundedPrice, curveSpotSource, curveSpotPremium, curveSpreadLabel, curveTimestamp, curveNoTradeSince, curveSettleShown, curveUnitLabel, noTradeChangeNote, normalizeCurveRoot, shortDatedBasisNote, skippedSpreadNotice, spotIndexSymbol, thinSpreadNotice, unpairedContractCount, unsupportedCurveRootMessage, type ContractBasis, type CurveSpotPremium } from "./model";
8
+ import { basisSpotSymbol, BASIS_CONVENTION, blankBasisNote, catalogueCurveUnit, curveAsOfDate, curveCache, curveSpotBars, curveBasisPercent, curveBasisRows, curveChangeText, curveContractCode, curvePrice, curveReadsThirtySeconds, curveRoundedPrice, curveSpotSource, curveSpotPremium, curveSpreadLabel, curveTimestamp, curveNoTradeSince, curveSettleShown, curveUnitLabel, curveRootNamed, noTradeChangeNote, normalizeCurveRoot, shortDatedBasisNote, skippedSpreadNotice, spotIndexSymbol, thinSpreadNotice, unpairedContractCount, unsupportedCurveRootMessage, type ContractBasis, type CurveSpotPremium } from "./model";
9
9
  import { COMMODITIES_VIEW_STATE } from "../commodities-energy/view-state";
10
10
  import { knownGapMessage } from "../../../cli/known-gaps";
11
11
 
@@ -171,7 +171,7 @@ export const futuresCurveHeadless: HeadlessPaneDefinition<"bundle"> = {
171
171
  "Ann Basis is simple actual/365, each last trade against spot in the same minute, and noisy under 7 days to expiry."],
172
172
  intents: ["futures basis trade", "cash and carry", "basis against spot"],
173
173
  opens: [{ words: ["VX", "vix futures", "vix futures curve"], argument: "VIX" }] },
174
- shape: "bundle", argument: { kind: "free-text", optional: true, placeholder: "root", description: "FUT root such as CL, ES, ZN or VX, or a CME crypto root (BTC, ETH, SOL, XRP). Defaults to ES.",
174
+ shape: "bundle", argument: { kind: "free-text", optional: true, placeholder: "root", description: "FUT root such as CL, ES, ZN or VX, a CME crypto root (BTC, ETH, SOL, XRP), or a root's name (gold, natural gas, crude oil). Defaults to ES.",
175
175
  examples: ["VIX", "CL", "BTC"] },
176
176
  // Only the pane reads the tab; the report always carries both.
177
177
  options: [{ key: "tab", description: "Curve or the full contract table.", type: "enum",
@@ -181,7 +181,7 @@ export const futuresCurveHeadless: HeadlessPaneDefinition<"bundle"> = {
181
181
  describe: (args) => `Futures curve ${args.argument || DEFAULT_ROOT}`,
182
182
  async load(args, ctx) {
183
183
  const input = args.argument || DEFAULT_ROOT;
184
- const root = normalizeCurveRoot(input);
184
+ const root = normalizeCurveRoot(input) ?? curveRootNamed(input);
185
185
  if (!root) {
186
186
  // A subject no source carries (`fn CTM BDI`, the Baltic Dry Index) is said with its proxies, as search says it.
187
187
  const gap = typeof input === "string" ? knownGapMessage(input) : null;
@@ -4,7 +4,7 @@ import { futuresCurveHeadless } from "./headless";
4
4
  import { BASIS_FORMULA, CURVE_HORIZONS, CURVE_ROOTS, curveRootForTicker, curveTitle, DEFAULT_CURVE_HORIZON, normalizeCurveRoot } from "./model";
5
5
 
6
6
  export const futuresCurveModule: PluginModule = {
7
- panes: [{ id: "futures-curve", name: "Futures Curve", icon: "F", get component(): typeof import("./pane").FuturesCurvePane { const { FuturesCurvePane } = require("./pane"); return FuturesCurvePane; },
7
+ panes: [{ id: "futures-curve", name: "Futures Curve", icon: "F", shareItem: { argument: true }, get component(): typeof import("./pane").FuturesCurvePane { const { FuturesCurvePane } = require("./pane"); return FuturesCurvePane; },
8
8
  defaultPosition: "right", defaultMode: "floating", defaultFloatingSize: { width: 98, height: 30 },
9
9
  tableExport: true, headless: futuresCurveHeadless,
10
10
  settings: (context) => ({ title: "Futures Curve Settings",
@@ -32,6 +32,24 @@ export function normalizeCurveRoot(value: unknown): string | null {
32
32
  return CURVE_ROOTS.some((row) => row.value === root) ? root : null;
33
33
  }
34
34
 
35
+ /** What a commodity is called rather than coded: the WTI and Brent crude curves by the words they are asked for in. */
36
+ const CURVE_ROOT_WORDS: Readonly<Record<string, string>> = { "CRUDE": "CL", "CRUDE OIL": "CL", "OIL": "CL", "WTI": "CL", "BRENT": "BZ" };
37
+
38
+ /**
39
+ * A root named in words, as a typed argument or a question asks for it
40
+ * ("gold", "Natural Gas futures", "crude oil"): a listed root's name, or a
41
+ * crude benchmark's. Not for the ticker under the cursor, where GOLD is a
42
+ * security, so only CTM's typed argument reads it.
43
+ */
44
+ export function curveRootNamed(value: unknown): string | null {
45
+ if (typeof value !== "string") return null;
46
+ const words = value.trim().toUpperCase().replace(/\s+/g, " ").replace(/( (FUTURES?|CURVE))+$/, "");
47
+ if (!words) return null;
48
+ return CURVE_ROOT_WORDS[words]
49
+ ?? CURVE_ROOTS.find((row) => row.label.toUpperCase() === `${row.value} ${words}`)?.value
50
+ ?? null;
51
+ }
52
+
35
53
  /**
36
54
  * A curve's window title, its root ("Curve · BZ"), so two curves open at once
37
55
  * are told apart in their windows and in the layout list.