@gloom-sh/terminal 0.20.17 → 0.20.18

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 (304) hide show
  1. package/package.json +3 -1
  2. package/src/account/auth-dialog.tsx +19 -1
  3. package/src/account/billing.ts +2 -1
  4. package/src/account/heard-from-question.tsx +235 -0
  5. package/src/account/heard-from.ts +97 -0
  6. package/src/api-client/data.ts +3 -2
  7. package/src/api-client/heard-from.ts +72 -0
  8. package/src/api-client/index.ts +63 -6
  9. package/src/api-client/mna.ts +18 -0
  10. package/src/api-client/supply-chain.ts +9 -0
  11. package/src/api-client/types/billing.ts +35 -1
  12. package/src/app/global-shortcuts.ts +5 -3
  13. package/src/app/pro-welcome/keys.ts +27 -0
  14. package/src/app/pro-welcome/model.ts +158 -0
  15. package/src/app/pro-welcome/row.tsx +176 -0
  16. package/src/app/pro-welcome/use-pro-welcome.ts +156 -0
  17. package/src/app/runtime/external-profile-changes.ts +135 -0
  18. package/src/app.tsx +33 -2
  19. package/src/architecture/core-builtin-allowlist.json +1 -1
  20. package/src/architecture/floating-promise-allowlist.json +0 -1
  21. package/src/architecture/shortcut-labels-allowlist.json +1 -0
  22. package/src/cli/alert-listing.ts +98 -0
  23. package/src/cli/commands/market.ts +138 -22
  24. package/src/cli/commands/overview.ts +7 -1
  25. package/src/cli/commands/plugins.ts +3 -2
  26. package/src/cli/commands/search.ts +30 -6
  27. package/src/cli/context.ts +16 -5
  28. package/src/cli/csv-export.ts +2 -1
  29. package/src/cli/desktop-pane-shot.ts +72 -9
  30. package/src/cli/glossary.ts +64 -10
  31. package/src/cli/history-demergers.ts +117 -0
  32. package/src/cli/history-rows.ts +6 -2
  33. package/src/cli/index.ts +1 -0
  34. package/src/cli/known-gaps.ts +16 -0
  35. package/src/cli/known-us-stocks.ts +18 -0
  36. package/src/cli/listing-arg.ts +105 -15
  37. package/src/cli/pane-functions/catalog-snapshot-build.ts +83 -0
  38. package/src/cli/pane-functions/catalog-snapshot.json +866 -0
  39. package/src/cli/pane-functions/catalog-snapshot.ts +62 -0
  40. package/src/cli/pane-functions/catalog.ts +50 -16
  41. package/src/cli/pane-functions/data.ts +16 -4
  42. package/src/cli/pane-functions/dom.ts +24 -6
  43. package/src/cli/pane-functions/freshness.ts +17 -1
  44. package/src/cli/pane-functions/index.ts +100 -42
  45. package/src/cli/pane-functions/resolver.ts +8 -5
  46. package/src/cli/pane-functions/screenshot-assessment.ts +30 -7
  47. package/src/cli/pane-functions/screenshot-payload.ts +21 -0
  48. package/src/cli/pane-functions/screenshot-render.ts +3 -1
  49. package/src/cli/quote-answer.ts +32 -16
  50. package/src/cli/registry.ts +22 -2
  51. package/src/cli/result.ts +5 -4
  52. package/src/cli/series-search.ts +45 -6
  53. package/src/cli/shot-temp-dir.ts +4 -9
  54. package/src/components/chart/composite/legend.tsx +43 -18
  55. package/src/components/chart/composite/panel-surface/panel-cursor.tsx +3 -3
  56. package/src/components/chart/composite/price-axis-labels.tsx +7 -5
  57. package/src/components/chart-table/header.tsx +9 -0
  58. package/src/components/chart-table/layout.ts +11 -11
  59. package/src/components/command-bar/pane-templates/items.ts +17 -1
  60. package/src/components/command-bar/routes/root/provider-search.ts +10 -1
  61. package/src/components/command-bar/routes/root/results.ts +34 -2
  62. package/src/components/command-bar/routes/root/runtime.ts +8 -1
  63. package/src/components/command-bar/routes/ticker-search/route.ts +5 -0
  64. package/src/components/command-bar/workflow/alert.ts +19 -8
  65. package/src/components/data-table/view.tsx +15 -2
  66. package/src/components/form-modal/content.tsx +9 -4
  67. package/src/components/index.ts +1 -1
  68. package/src/components/layout/header.tsx +9 -5
  69. package/src/components/layout/pane/capture-status.ts +6 -0
  70. package/src/components/layout/pane/footer/index.tsx +2 -0
  71. package/src/components/layout/pane/footer/model.ts +113 -15
  72. package/src/components/layout/pane/header.tsx +16 -2
  73. package/src/components/market-board/index.tsx +4 -2
  74. package/src/components/onboarding/onboarding-frame.tsx +6 -2
  75. package/src/components/onboarding/onboarding-keyboard.ts +7 -1
  76. package/src/components/onboarding/onboarding-wizard.tsx +3 -1
  77. package/src/components/onboarding/portfolio-step/positions-panel.tsx +24 -15
  78. package/src/components/onboarding/setup-cards.ts +36 -0
  79. package/src/components/onboarding/use-onboarding-progress.ts +22 -1
  80. package/src/components/onboarding/wizard-account.ts +6 -1
  81. package/src/components/onboarding/wizard-model.ts +32 -6
  82. package/src/components/onboarding/wizard-positions.ts +1 -1
  83. package/src/components/sign-in-gate.tsx +3 -1
  84. package/src/components/toggle-list.tsx +6 -8
  85. package/src/components/ui/confirm-dialog.tsx +47 -7
  86. package/src/components/ui/data-table/types.ts +8 -0
  87. package/src/components/ui/display.tsx +17 -2
  88. package/src/components/ui/index.ts +1 -1
  89. package/src/components/ui/stat-grid.tsx +4 -0
  90. package/src/components/ui/status.tsx +13 -1
  91. package/src/components/ui/table-layout.ts +2 -1
  92. package/src/components/use-pane-notice-footer.tsx +16 -3
  93. package/src/data/config/store/index.ts +31 -0
  94. package/src/data/config/store/node.ts +61 -11
  95. package/src/data/config/store/normalize.ts +4 -6
  96. package/src/data/config/store/shared-file.ts +309 -0
  97. package/src/data/profile-merge.ts +299 -0
  98. package/src/data/sqlite/checkpointer.ts +11 -1
  99. package/src/data/sqlite/database.ts +1 -1
  100. package/src/data/ticker-repository.ts +134 -10
  101. package/src/data/ticker-store.ts +67 -0
  102. package/src/data/ticker-writes.ts +5 -0
  103. package/src/i18n/es.ts +27 -0
  104. package/src/i18n/ja.ts +27 -0
  105. package/src/i18n/ko.ts +27 -0
  106. package/src/i18n/zh-cn.ts +27 -0
  107. package/src/i18n/zh-tw.ts +27 -0
  108. package/src/layout-marketplace/gallery-desktop.tsx +2 -2
  109. package/src/market-data/ah-pair.ts +103 -0
  110. package/src/market-data/depositary-pair.ts +6 -2
  111. package/src/market-data/hooks.tsx +33 -2
  112. package/src/market-data/market/change-basis.ts +2 -1
  113. package/src/market-data/market/header-market.ts +11 -0
  114. package/src/market-data/split-terms.ts +28 -0
  115. package/src/plugins/builtin/account-management/footer.ts +1 -1
  116. package/src/plugins/builtin/account-management/keyboard.ts +4 -0
  117. package/src/plugins/builtin/account-management/model.ts +1 -0
  118. package/src/plugins/builtin/account-management/pane.tsx +75 -7
  119. package/src/plugins/builtin/account-management/payment-recovery-row.tsx +12 -5
  120. package/src/plugins/builtin/account-management/pro-cancel.tsx +197 -0
  121. package/src/plugins/builtin/account-management/trial-cancel.ts +1 -1
  122. package/src/plugins/builtin/alerts/cli-move.ts +2 -2
  123. package/src/plugins/builtin/alerts/cli.ts +36 -30
  124. package/src/plugins/builtin/alerts/constants.ts +10 -0
  125. package/src/plugins/builtin/alerts/earnings-listing.ts +20 -0
  126. package/src/plugins/builtin/alerts/format.ts +24 -8
  127. package/src/plugins/builtin/alerts/index.tsx +38 -9
  128. package/src/plugins/builtin/alerts/move-checks.ts +7 -0
  129. package/src/plugins/builtin/alerts/pane.tsx +1 -1
  130. package/src/plugins/builtin/alerts/quotes.ts +26 -2
  131. package/src/plugins/builtin/alerts/scheduled.ts +6 -1
  132. package/src/plugins/builtin/alerts/types.ts +7 -0
  133. package/src/plugins/builtin/analytics/manual-value.ts +61 -0
  134. package/src/plugins/builtin/analytics/risk-book.ts +7 -7
  135. package/src/plugins/builtin/analytics/risk-client.ts +26 -13
  136. package/src/plugins/builtin/analytics/risk-headless.ts +13 -8
  137. package/src/plugins/builtin/analytics/risk-model.ts +92 -4
  138. package/src/plugins/builtin/analytics/risk-pane.tsx +85 -38
  139. package/src/plugins/builtin/awards/pane.tsx +1 -1
  140. package/src/plugins/builtin/broker-trading/orders.tsx +2 -2
  141. package/src/plugins/builtin/central-bank-rates/model.ts +8 -2
  142. package/src/plugins/builtin/central-bank-rates/pane.tsx +5 -3
  143. package/src/plugins/builtin/chart-composer/cli-options.ts +4 -2
  144. package/src/plugins/builtin/chart-composer/data-catalog-pane.tsx +2 -6
  145. package/src/plugins/builtin/chart-composer/pane.tsx +5 -2
  146. package/src/plugins/builtin/cloud/auth-actions.tsx +11 -6
  147. package/src/plugins/builtin/cloud/company-picker.tsx +5 -3
  148. package/src/plugins/builtin/cloud/upgrade-command.ts +1 -1
  149. package/src/plugins/builtin/company-kpis/headless.ts +9 -4
  150. package/src/plugins/builtin/company-kpis/latest.ts +45 -0
  151. package/src/plugins/builtin/company-kpis/model.ts +38 -8
  152. package/src/plugins/builtin/company-kpis/pane.tsx +22 -8
  153. package/src/plugins/builtin/composite/alt-data.ts +20 -0
  154. package/src/plugins/builtin/composite/application.ts +14 -0
  155. package/src/plugins/builtin/composite/broker.ts +12 -0
  156. package/src/plugins/builtin/composite/credit.ts +33 -0
  157. package/src/plugins/builtin/composite/crypto.ts +10 -0
  158. package/src/plugins/builtin/composite/earnings.ts +12 -0
  159. package/src/plugins/builtin/composite/filings.ts +13 -0
  160. package/src/plugins/builtin/composite/futures-commodities.ts +23 -0
  161. package/src/plugins/builtin/composite/global-markets.ts +12 -0
  162. package/src/plugins/builtin/composite/options-volatility.ts +23 -0
  163. package/src/plugins/builtin/composite/ownership.ts +23 -0
  164. package/src/plugins/builtin/composite/portfolio.ts +10 -0
  165. package/src/plugins/builtin/composite/quant.ts +15 -0
  166. package/src/plugins/builtin/composite/rates-macro.ts +30 -0
  167. package/src/plugins/builtin/composite/screeners.ts +11 -0
  168. package/src/plugins/builtin/composite/shared.ts +11 -0
  169. package/src/plugins/builtin/composite/ticker-core.ts +36 -0
  170. package/src/plugins/builtin/congress-trades/headless.ts +31 -3
  171. package/src/plugins/builtin/correlation/index.tsx +13 -17
  172. package/src/plugins/builtin/correlation/matrix/model.ts +18 -0
  173. package/src/plugins/builtin/dividend-yield/client.ts +57 -16
  174. package/src/plugins/builtin/dividend-yield/headless.ts +17 -11
  175. package/src/plugins/builtin/dividend-yield/model.ts +4 -3
  176. package/src/plugins/builtin/dividend-yield/pane.tsx +22 -18
  177. package/src/plugins/builtin/dividend-yield/ranking.ts +1 -1
  178. package/src/plugins/builtin/dividend-yield/types.ts +4 -0
  179. package/src/plugins/builtin/dividend-yield/view.ts +23 -12
  180. package/src/plugins/builtin/earnings/fiscal-quarter.ts +39 -0
  181. package/src/plugins/builtin/earnings/headless.ts +7 -4
  182. package/src/plugins/builtin/earnings/history-model.ts +6 -4
  183. package/src/plugins/builtin/earnings/history-table.ts +4 -3
  184. package/src/plugins/builtin/earnings-calls/pane.tsx +8 -2
  185. package/src/plugins/builtin/econ/calendar-model.ts +16 -0
  186. package/src/plugins/builtin/econ/index.tsx +3 -0
  187. package/src/plugins/builtin/equity-screener/headless.ts +4 -1
  188. package/src/plugins/builtin/equity-screener/model.ts +7 -6
  189. package/src/plugins/builtin/estimate-revisions/headless.ts +1 -1
  190. package/src/plugins/builtin/exposure/model.ts +10 -0
  191. package/src/plugins/builtin/exposure/pane.tsx +10 -3
  192. package/src/plugins/builtin/fx-matrix/amount.ts +15 -1
  193. package/src/plugins/builtin/fx-matrix/headless.ts +12 -6
  194. package/src/plugins/builtin/fx-matrix/index.tsx +23 -5
  195. package/src/plugins/builtin/fx-matrix/settings.ts +9 -4
  196. package/src/plugins/builtin/kelly-sizer/pane.tsx +9 -4
  197. package/src/plugins/builtin/market-valuation/pane.tsx +22 -10
  198. package/src/plugins/builtin/mna/detail.tsx +67 -6
  199. package/src/plugins/builtin/mna/headless.ts +128 -13
  200. package/src/plugins/builtin/mna/model.ts +219 -16
  201. package/src/plugins/builtin/mna/pane.tsx +34 -6
  202. package/src/plugins/builtin/money-markets/model.ts +14 -5
  203. package/src/plugins/builtin/money-markets/pane.tsx +4 -3
  204. package/src/plugins/builtin/news/wire/news/footer.ts +3 -8
  205. package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +22 -6
  206. package/src/plugins/builtin/options-scenario/csp-screen.ts +39 -12
  207. package/src/plugins/builtin/options-scenario/strategy-screen.ts +7 -5
  208. package/src/plugins/builtin/pe-band/client.ts +13 -1
  209. package/src/plugins/builtin/pe-band/headless.ts +2 -2
  210. package/src/plugins/builtin/pe-band/model.ts +63 -10
  211. package/src/plugins/builtin/pe-band/pane.tsx +5 -5
  212. package/src/plugins/builtin/portfolio-list/allocation-rows.ts +26 -7
  213. package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +66 -13
  214. package/src/plugins/builtin/portfolio-list/cli/render.ts +76 -33
  215. package/src/plugins/builtin/portfolio-list/headless.ts +69 -22
  216. package/src/plugins/builtin/portfolio-list/pane/data.ts +3 -3
  217. package/src/plugins/builtin/portfolio-list/pane/index.tsx +29 -14
  218. package/src/plugins/builtin/portfolio-list/summary/index.tsx +2 -2
  219. package/src/plugins/builtin/relative-rotation/pane.tsx +2 -3
  220. package/src/plugins/builtin/research/corporate-actions-pane.tsx +5 -1
  221. package/src/plugins/builtin/research/event-model.ts +31 -13
  222. package/src/plugins/builtin/research/headless.ts +8 -1
  223. package/src/plugins/builtin/research/relative-valuation-pane.tsx +19 -17
  224. package/src/plugins/builtin/sectors/index.tsx +6 -9
  225. package/src/plugins/builtin/shared/cloud-upgrade.ts +1 -1
  226. package/src/plugins/builtin/shared/earnings-report.ts +19 -4
  227. package/src/plugins/builtin/shared/report-freshness.ts +2 -3
  228. package/src/plugins/builtin/supply-chain/client.ts +34 -9
  229. package/src/plugins/builtin/supply-chain/evidence.ts +3 -2
  230. package/src/plugins/builtin/supply-chain/flow.tsx +4 -3
  231. package/src/plugins/builtin/supply-chain/graph-model.ts +14 -7
  232. package/src/plugins/builtin/supply-chain/graph-pane.tsx +3 -1
  233. package/src/plugins/builtin/supply-chain/graph.tsx +6 -3
  234. package/src/plugins/builtin/supply-chain/headless.ts +19 -4
  235. package/src/plugins/builtin/supply-chain/model.ts +50 -6
  236. package/src/plugins/builtin/supply-chain/pane.tsx +76 -16
  237. package/src/plugins/builtin/ticker-detail/adr-pair/ah.ts +62 -0
  238. package/src/plugins/builtin/ticker-detail/adr-pair/headless.ts +119 -20
  239. package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +51 -1
  240. package/src/plugins/builtin/ticker-detail/adr-pair/tab.tsx +25 -14
  241. package/src/plugins/builtin/ticker-detail/overview/model.ts +17 -1
  242. package/src/plugins/builtin/ticker-detail/overview/pane.tsx +4 -0
  243. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +9 -2
  244. package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +9 -2
  245. package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +5 -2
  246. package/src/plugins/builtin/volatility/model.ts +17 -0
  247. package/src/plugins/builtin/volatility/pane.tsx +13 -4
  248. package/src/plugins/builtin/world-indices/index.tsx +2 -0
  249. package/src/plugins/builtin/world-indices/table.tsx +15 -0
  250. package/src/plugins/builtin/world-venue-map/evidence.ts +3 -2
  251. package/src/plugins/builtin/world-venue-map/headless.ts +28 -16
  252. package/src/plugins/builtin/world-venue-map/index.ts +19 -6
  253. package/src/plugins/builtin/world-venue-map/layered-pane.tsx +9 -5
  254. package/src/plugins/builtin/world-venue-map/layers.ts +33 -11
  255. package/src/plugins/builtin/world-venue-map/map.tsx +12 -0
  256. package/src/plugins/builtin/world-venue-map/pane.tsx +35 -6
  257. package/src/plugins/builtin/world-venue-map/place.ts +119 -0
  258. package/src/plugins/catalog-data.ts +20 -0
  259. package/src/plugins/catalog-lazy.ts +51 -0
  260. package/src/plugins/catalog-ui.ts +16 -18
  261. package/src/plugins/host-smoke.ts +5 -2
  262. package/src/portfolio/allocation.ts +79 -19
  263. package/src/portfolio/cash-balances.ts +76 -0
  264. package/src/portfolio/mutations.ts +43 -8
  265. package/src/public/__snapshots__/public-api.test.ts.snap +1 -0
  266. package/src/renderers/desktop/window-layouts.ts +14 -0
  267. package/src/renderers/dom/data-table/row.tsx +2 -0
  268. package/src/renderers/dom/host/tabs.tsx +57 -8
  269. package/src/renderers/dom/styles.css +13 -5
  270. package/src/renderers/electrobun/bun/desktop/backend-requests.ts +4 -0
  271. package/src/renderers/electrobun/bun/desktop/backend.ts +22 -1
  272. package/src/renderers/electrobun/bun/window/native-min-size.ts +6 -1
  273. package/src/renderers/electrobun/shared/protocol.ts +4 -0
  274. package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +50 -12
  275. package/src/renderers/electrobun/view/remote/ticker-repository.ts +10 -0
  276. package/src/series/standalone-catalog.ts +5 -4
  277. package/src/series/standalone.ts +13 -7
  278. package/src/sources/gloomberb-cloud/index.ts +14 -3
  279. package/src/sources/gloomberb-cloud/perpetuals.ts +60 -3
  280. package/src/sources/provider-router/financials.ts +20 -13
  281. package/src/sources/provider-router/index.ts +4 -0
  282. package/src/sources/provider-router/search.ts +1 -0
  283. package/src/sync/collections-contributor.ts +3 -1
  284. package/src/sync/config-merge.ts +10 -1
  285. package/src/sync/sanitize.ts +26 -2
  286. package/src/tickers/company-name-listing.ts +16 -2
  287. package/src/tickers/listing-fate.ts +12 -8
  288. package/src/tickers/renamed-listings.ts +43 -10
  289. package/src/tickers/search/home-listing.ts +28 -0
  290. package/src/tickers/search/index.ts +19 -7
  291. package/src/tickers/terminal-codes.ts +11 -1
  292. package/src/time-series/resolve.ts +3 -1
  293. package/src/time-series/spec.ts +2 -2
  294. package/src/time-series/types.ts +1 -1
  295. package/src/types/data-provider.ts +11 -0
  296. package/src/types/financials.ts +39 -3
  297. package/src/types/ticker.ts +10 -2
  298. package/src/utils/cli-output.ts +1 -1
  299. package/src/utils/declared-dividends.ts +13 -1
  300. package/src/utils/dividend-cash.ts +5 -1
  301. package/src/utils/forward-dividend.ts +4 -3
  302. package/src/utils/remove-folder.ts +37 -0
  303. package/src/utils/trailing-dividend.ts +1 -1
  304. package/src/plugins/builtin/composite-plugins.ts +0 -285
@@ -1,6 +1,7 @@
1
1
  import { Box, type InputRenderable } from "../../../ui";
2
2
  import { useCallback, useMemo, useRef, useState } from "react";
3
- import { PaneStatusBody, QueryBar, usePaneFooter, usePaneNoticeFooter } from "../../../components";
3
+ import { PaneStatusBody, QueryBar, RowNote, usePaneFooter } from "../../../components";
4
+ import { wrapTextLines } from "../../../utils/text-wrap";
4
5
  import { handleRefreshKey } from "../../../components/data-table/table-pane";
5
6
  import type { PaneProps } from "../../../types/plugin";
6
7
  import type { PluginModule } from "../plugin-module";
@@ -37,7 +38,7 @@ import {
37
38
  buildCorrelationPaneTitle,
38
39
  buildGeoCorrelationSeries,
39
40
  buildStatusSummary,
40
- correlationRollNotes,
41
+ matrixCellNotes,
41
42
  type CorrelationSeries,
42
43
  getSeriesForEntry,
43
44
  pairKey,
@@ -215,29 +216,23 @@ function CorrelationMatrixPane({ focused, width, height }: PaneProps) {
215
216
  phase: "before",
216
217
  scope: "correlation:tickers",
217
218
  });
218
- usePaneNoticeFooter({
219
- registrationId: "correlation-warnings", focused,
220
- notices: [...seriesBySymbol.values()].flatMap((series) => series.refreshError
221
- ? [`${series.symbol}: ${series.refreshError}${series.fetchedAt ? ` Retained history retrieved ${new Date(series.fetchedAt).toISOString()}.` : ""}`]
222
- : []).concat(pair && pairHistory?.unavailable ? [`${pair.join("/")}: ${pairHistory.unavailable}`] : []),
223
- });
224
-
225
- // The ticker set and range are visible in-pane and an invalid list shows in
226
- // the body, so the footer carries load state, and a future's rolls as GR
227
- // says them. `r` is global: no hint.
228
- const rollNotes = correlationRollNotes(symbols, seriesBySymbol).join(" · ");
219
+ // What concerns a symbol (a failed refresh, a future's rolls as GR says them) or the selected pair is said under
220
+ // the matrix while a cell of it is selected, as a table's row note is; the footer carries the matrix's load state.
221
+ // The ticker set and range are visible in-pane and an invalid list shows in the body. `r` is global: no hint.
222
+ const cellNote = matrixCellNotes(selection ? [...new Set(selection)] : [], seriesBySymbol,
223
+ pair && pairHistory?.unavailable ? `${pair.join("/")}: ${pairHistory.unavailable}` : null).join(" ");
229
224
  usePaneFooter("correlation", () => ({
230
225
  info: !settings.symbolsError && symbols.length >= 2 && statusSummary
231
- ? [{ id: "status", parts: [{ text: statusSummary, tone: "muted" as const }] },
232
- ...(rollNotes ? [{ id: "rolls", parts: [{ text: rollNotes, tone: "muted" as const }] }] : [])]
226
+ ? [{ id: "status", parts: [{ text: statusSummary, tone: "muted" as const }] }]
233
227
  : [],
234
- }), [rollNotes, settings.symbolsError, statusSummary, symbols.length]);
228
+ }), [settings.symbolsError, statusSummary, symbols.length]);
235
229
 
236
230
  // Rows are exactly as wide as the matrix (after the one-cell inset), so the
237
231
  // zebra and hover bands stop at the last column instead of running on.
238
232
  const matrixRowWidth = correlationMatrixLayout(symbols, width).rowWidth;
239
233
  const chartRows = pair ? matrixChartRows(width, height, symbols.length, matrixRowWidth) : 0;
240
- const matrixHeight = Math.max(1, height - 1 - (chartRows > 0 ? chartRows + 1 : 0));
234
+ const noteRows = cellNote ? wrapTextLines(cellNote, Math.max(1, width - 2)).length : 0;
235
+ const matrixHeight = Math.max(1, height - 1 - noteRows - (chartRows > 0 ? chartRows + 1 : 0));
241
236
  const bodyStatus = settings.symbolsError
242
237
  ? <PaneStatusBody error={settings.symbolsError} />
243
238
  : symbols.length < 2
@@ -287,6 +282,7 @@ function CorrelationMatrixPane({ focused, width, height }: PaneProps) {
287
282
  rowColor={(symbol) => rowHeaderColor(seriesBySymbol.get(symbol)?.status ?? "loading")}
288
283
  onOpenSymbol={openSymbol}
289
284
  />
285
+ <RowNote>{cellNote}</RowNote>
290
286
  {chartRows > 0 && pair && pairHistory ? (
291
287
  <MatrixPairChart
292
288
  pair={pair}
@@ -204,6 +204,24 @@ export function correlationRollNotes(symbols: readonly string[], seriesBySymbol:
204
204
  });
205
205
  }
206
206
 
207
+ /**
208
+ * What the matrix says under itself for the selected cell: each of its
209
+ * symbols' rolls and failed refresh, then the pair's own note. A note about
210
+ * one symbol is said where that symbol is selected, never in the footer.
211
+ */
212
+ export function matrixCellNotes(symbols: readonly string[], seriesBySymbol: ReadonlyMap<string, CorrelationSeries>, pairNote: string | null): string[] {
213
+ return [
214
+ ...correlationRollNotes(symbols, seriesBySymbol).map((note) => `${note.replace(/\.$/, "")}.`),
215
+ ...symbols.flatMap((symbol) => {
216
+ const series = seriesBySymbol.get(symbol);
217
+ return series?.refreshError
218
+ ? [`${symbol}: ${series.refreshError}${series.fetchedAt ? ` Retained history retrieved ${new Date(series.fetchedAt).toISOString()}.` : ""}`]
219
+ : [];
220
+ }),
221
+ ...(pairNote ? [pairNote] : []),
222
+ ];
223
+ }
224
+
207
225
  /**
208
226
  * The matrix already labels every symbol on both axes and the pane now carries
209
227
  * its own range control, so the title stays generic instead of repeating them.
@@ -4,7 +4,7 @@ import type { ConnectionHealthRegistry } from "../../../core/connection-health";
4
4
  import type { DividendMetrics, DividendPayment, GrowthPayments } from "./types";
5
5
  import { resolveCurrencyUnit } from "../../../utils/currency-units";
6
6
  import { calendarMonthsBefore } from "../../../utils/calendar-date";
7
- import { cashDistribution, dividendReferencePrice, dividendYieldAt, inferCadence, trailingCashAt, trailingDividendRate, trailingPaymentShortfall, unevenRegularPayments } from "../../../utils/trailing-dividend";
7
+ import { cashDistribution, dividendReferencePrice, dividendYieldAt, inferCadence, trailingCashAt, trailingDividendRate, trailingPayments as countedTrailingPayments, trailingPaymentShortfall, unevenRegularPayments } from "../../../utils/trailing-dividend";
8
8
  import { dividendQuotePriceMetadata } from "./reference-price";
9
9
  import { mapQuote } from "../../../sources/gloomberb-cloud/normalizers";
10
10
  import { regularSessionValuationPrice } from "../../../market-data/quotes/regular-session-valuation";
@@ -35,8 +35,8 @@ function unavailableDividendHistory(triedAt?: string): string {
35
35
  return `Cash history unavailable${lastTried(triedAt)}; no payments, totals or growth.`;
36
36
  }
37
37
  /** A read without its summary; `forward` when another source still gave the forward rate. */
38
- function unavailableDividendSummary(triedAt?: string, { forward = false } = {}): string {
39
- return `Dividend summary unavailable${lastTried(triedAt)}; no ${forward ? "payout ratio or pay date" : "forward rate, payout ratio or pay date"}.`;
38
+ function unavailableDividendSummary(triedAt?: string, { forward = false, payDate = false } = {}): string {
39
+ return `Dividend summary unavailable${lastTried(triedAt)}; no ${forward ? "payout ratio" : "forward rate, payout ratio"}${payDate ? "" : " or pay date"}.`;
40
40
  }
41
41
  export const INCOMPLETE_DIVIDEND_HISTORY = incompleteDividendHistory();
42
42
  export const MISSING_DIVIDEND_CURRENCY = "Dividend currency is unavailable; cash amounts cannot be compared safely.";
@@ -163,7 +163,7 @@ export interface DividendData {
163
163
  convertedFrom?: string;
164
164
  /** Beside convertedFrom, the sub-unit the source states the cash in (GBp, ZAc): converted amounts are written in it. */
165
165
  convertedSubUnit?: string;
166
- /** Declared and unpaid, in `currency`; never in `payments` or any figure. Absent from older servers. */
166
+ /** Declared and unpaid, in `currency`; issuer-confirmed ex-dated rows also enter `payments`. Absent from older servers. */
167
167
  declared?: DeclaredDividendAction[];
168
168
  metrics: DividendMetrics;
169
169
  price: number | null;
@@ -179,6 +179,8 @@ export interface DividendData {
179
179
  providerId?: string;
180
180
  /** Source fetch time, not the last ex-date or this pane's cache-read time. */
181
181
  fetchedAt?: string;
182
+ declaredCashAsOf?: string;
183
+ cashVerificationWarning?: string;
182
184
  stale?: boolean;
183
185
  priceAsOf?: string;
184
186
  priceStale?: boolean;
@@ -218,7 +220,7 @@ export async function fetchDividendData(
218
220
  : null;
219
221
  const statedFields = !summary && stated && (!cashCurrency || stated.currency === cashCurrency) ? statedRateSummary(stated) : null;
220
222
  const quoteFields = summary ?? statedFields;
221
- const summaryError = !summary ? unavailableDividendSummary(triedAt, { forward: quoteFields != null })
223
+ let summaryError = !summary ? unavailableDividendSummary(triedAt, { forward: quoteFields != null, payDate: !!actions?.declaredCash?.announced?.payDate })
222
224
  : response.data.summaryError ?? ([summary.exDividendDate, summary.dividendDate]
223
225
  .some((timestamp) => timestamp != null && reportedDividendDate(timestamp) === null)
224
226
  ? INVALID_DIVIDEND_SUMMARY_DATE : undefined);
@@ -233,13 +235,18 @@ export async function fetchDividendData(
233
235
  const convertedFrom = cashCurrency ? declaredCurrencyOf(actions?.declaredCash, cashCurrency) : undefined;
234
236
  const sourceUnit = sourceActions?.currency;
235
237
  const convertedSubUnit = convertedFrom && sourceUnit && resolveCurrencyUnit(sourceUnit).divisor !== 1 ? sourceUnit : undefined;
236
- const payments = actions && cashCurrency ? actions.dividends.flatMap(action => {
238
+ const declared = actions && cashCurrency ? declaredDividends(actions) : [];
239
+ const distributions = actions ? [...actions.dividends, ...declared.filter((row) => declaredCash.has(row.exDate) && Date.parse(row.exDate) <= Date.now())] : [];
240
+ const payments = cashCurrency ? distributions.flatMap(action => {
237
241
  const payment = toDividendPayment(action.exDate, action.amount, cashCurrency);
238
242
  const declared = declaredCash.get(action.exDate);
239
- const source = distributionSource(action.source);
240
- return payment ? [{ ...payment, ...(declared ? { declared } : {}), ...(source ? { source } : {}) }] : [];
243
+ const source = distributionSource("source" in action ? action.source : undefined);
244
+ return payment ? [{ ...payment, paymentDate: action.payDate ? reportedDividendDate(Date.parse(action.payDate) / 1000) : null,
245
+ recordDate: action.recordDate ? reportedDividendDate(Date.parse(action.recordDate) / 1000) : null,
246
+ ...(declared ? { declared } : {}), ...("cashEstimate" in action && action.cashEstimate ? { cashEstimate: action.cashEstimate } : {}),
247
+ ...(source ? { source } : {}) }] : [];
241
248
  }).sort((a, b) => b.exDate.getTime() - a.exDate.getTime()) : [];
242
- if (!historyError && actions && (actions.coverage?.dividends === "unavailable" || payments.length !== actions.dividends.length)) {
249
+ if (!historyError && actions && (actions.coverage?.dividends === "unavailable" || payments.length !== distributions.length)) {
243
250
  // A read with no rows is not an incomplete one.
244
251
  historyError = actions.dividends.length === 0 ? unavailableDividendHistory(triedAt) : incompleteDividendHistory(triedAt);
245
252
  }
@@ -250,14 +257,40 @@ export async function fetchDividendData(
250
257
  // The annual rates are in the summary's currency, the major unit Gloom Cloud states it in. One stated in a
251
258
  // sub-unit, as an older server's is, has them in an unstated unit (SBK's 17.8 "ZAc" is rand), so none is read.
252
259
  const summaryRatesComparable = !!summaryUnit.currency && summaryUnit.divisor === 1 && summaryUnit.currency === currency;
253
- const metricFields = actions && historyError && quoteFields ? { ...quoteFields, trailingAnnualDividendRate: null } : quoteFields;
254
- const declared = actions && cashCurrency ? declaredDividends(actions) : [];
260
+ const announced = actions?.declaredCash?.announced;
261
+ const announcedFields = announced ? { trailingAnnualDividendRate: null, trailingAnnualDividendYield: null,
262
+ forwardAnnualDividendRate: null, payoutRatio: null, currency: currency || null, ...quoteFields,
263
+ exDividendDate: Date.parse(announced.exDate) / 1000, dividendDate: Date.parse(announced.payDate) / 1000,
264
+ } : quoteFields;
265
+ const metricFields = actions && historyError && announcedFields ? { ...announcedFields, trailingAnnualDividendRate: null } : announcedFields;
255
266
  const token = isToken(symbol, exchange, quote?.instrumentType);
256
267
  const built = buildDividendMetrics(payments, metricFields, price, { historyAvailable, summaryRatesComparable, declared });
257
268
  // A token's empty history is no 0.00% yield: it has none to measure.
258
- const metrics = token && payments.length === 0
269
+ let metrics = token && payments.length === 0
259
270
  ? { ...built, trailingRate: null, forwardRate: null, trailingYield: null, forwardYield: null, forwardRateAsOf: null }
260
271
  : built;
272
+ const annualCount = { monthly: 12, quarterly: 4, "semi-annual": 2, annual: 1, irregular: 0 }[metrics.paymentFrequency ?? "irregular"];
273
+ const announcedCash = declared.find((row) => row.exDate === announced?.exDate);
274
+ const announcedAmount = announced?.paidAmount ?? announcedCash?.amount;
275
+ const announcedUneven = announcedCash && historyAvailable && !metrics.lapse ? unevenRegularPayments(payments, new Date()) : null;
276
+ if (announcedUneven) {
277
+ metrics = repriceDividendMetrics({ ...metrics, forwardRate: announcedUneven.total, forwardBasis: "uneven",
278
+ forwardRateAsOf: announcedUneven.latest.toISOString().slice(0, 10) }, price);
279
+ } else if (announced && announcedAmount != null && !metrics.lapse && metrics.forwardBasis !== "uneven" && annualCount > 0) {
280
+ metrics = repriceDividendMetrics({ ...metrics, forwardRate: announcedAmount * annualCount, forwardRateAsOf: announced.exDate }, price);
281
+ }
282
+ if (!summary && metrics.forwardRate != null) {
283
+ summaryError = unavailableDividendSummary(triedAt, { forward: true, payDate: !!announced?.payDate });
284
+ }
285
+ if (metrics.forwardRate != null && metrics.forwardBasis === "uneven" && metrics.trailingEstimates?.length) {
286
+ metrics.forwardEstimate = metrics.trailingEstimates.at(-1);
287
+ } else if (metrics.forwardRate != null && metrics.forwardBasis !== "uneven" && convertedFrom && (!announced || announced.paidAmount == null || !annualCount)) {
288
+ metrics.forwardEstimate = announcedCash?.cashEstimate ?? { declaredCurrency: convertedFrom,
289
+ ...(announced ? { declaredAmount: announced.amount, fixingDate: announced.fixingDate } : {}),
290
+ basis: announced ? "Indicated annual rate converted from the declared currency; the issuer's cash-currency conversion is not fixed."
291
+ : "Indicated annual rate converted from the declared currency; the conversion rate and fixing date are unavailable.",
292
+ };
293
+ }
261
294
  if (!historyAvailable && !historyError && metrics.trailingRate == null && metrics.forwardRate == null && !token) {
262
295
  throw new Error(`No dividend data found for ${symbol}`);
263
296
  }
@@ -268,9 +301,12 @@ export async function fetchDividendData(
268
301
  ...(historyError ? { historyError } : {}), ...(summaryError ? { summaryError } : {}),
269
302
  ...(statedFields && metrics.forwardRate != null ? { forwardFromFundamentals: true } : {}),
270
303
  // A history standing in for a refresh that could not read it is dated by its own read.
271
- providerId: actions?.providerId ?? "gloom", fetchedAt: actions?.dividendsAsOf ?? actions?.fetchedAt,
272
- stale: response.stale === true || response.data.stale === true || actions?.stale === true,
273
- notes: ["Cash yield excludes taxes and reinvestment. SEC yield, tax components and future payments are not modeled."],
304
+ providerId: actions?.providerId ?? "gloom", fetchedAt: [actions?.dividendsAsOf ?? actions?.fetchedAt, actions?.declaredCash?.fetchedAt]
305
+ .filter((value): value is string => !!value && Number.isFinite(Date.parse(value))).sort()[0],
306
+ declaredCashAsOf: actions?.declaredCash?.fetchedAt,
307
+ ...(actions?.declaredCash?.verification === "unavailable" ? { cashVerificationWarning: "Dividend cash is not issuer-verified; issuer confirmation is unavailable. Upstream history is shown." } : {}),
308
+ stale: response.stale === true || response.data.stale === true || actions?.stale === true || actions?.declaredCash?.stale === true,
309
+ notes: ["Cash yield excludes taxes and reinvestment. Unannounced future payments and tax components are not modeled."],
274
310
  };
275
311
  }
276
312
 
@@ -296,6 +332,8 @@ export function buildDividendMetrics(
296
332
  const trailingRate = options.historyAvailable !== false
297
333
  ? trailingDividendRate(payments, now)
298
334
  : options.summaryRatesComparable !== false ? quoteFields?.trailingAnnualDividendRate ?? null : null;
335
+ const trailingEstimates = options.historyAvailable !== false
336
+ ? countedTrailingPayments(payments, now).counted.flatMap((payment) => payment.cashEstimate ? [payment.cashEstimate] : []) : [];
299
337
  const statedRate = options.summaryRatesComparable !== false ? quoteFields?.forwardAnnualDividendRate ?? null : null;
300
338
  const statedAsOf = statedRate != null && /^\d{4}-\d{2}-\d{2}$/.test(quoteFields?.forwardRateAsOf ?? "")
301
339
  ? quoteFields!.forwardRateAsOf! : null;
@@ -310,7 +348,9 @@ export function buildDividendMetrics(
310
348
 
311
349
  const reportedPayDate = reportedDividendDate(quoteFields?.dividendDate ?? null);
312
350
  const today = new Date(now.toISOString().slice(0, 10));
313
- const nextPayDate = reportedPayDate && reportedPayDate >= today ? reportedPayDate : null;
351
+ const paymentDates = payments.flatMap((payment) => payment.paymentDate && payment.paymentDate >= today ? [payment.paymentDate] : []);
352
+ if (reportedPayDate && reportedPayDate >= today) paymentDates.push(reportedPayDate);
353
+ const nextPayDate = paymentDates.length ? new Date(Math.min(...paymentDates.map((date) => date.getTime()))) : null;
314
354
 
315
355
  // A dividend that has stopped has no forward rate, whatever is still stated for it.
316
356
  // Without a usable history only the latest date known says it, on the annual window.
@@ -344,6 +384,7 @@ export function buildDividendMetrics(
344
384
  trailingYield: null,
345
385
  forwardYield: null,
346
386
  trailingRate,
387
+ ...(trailingEstimates.length ? { trailingEstimates } : {}),
347
388
  forwardRate,
348
389
  forwardRateAsOf,
349
390
  ...(uneven ? { forwardBasis: "uneven" as const } : {}),
@@ -8,7 +8,7 @@ import { fetchDividendData, requestDividendHistory, statedForwardRate, TOKEN_YIE
8
8
  import { dividendReferencePrice } from "../../../utils/trailing-dividend";
9
9
  import type { DividendPayment, GrowthPayments } from "./types";
10
10
  import {
11
- convertedFromText, formatConvertedAmount, formatDividendYield, growthPaymentsText, PAYOUT_NOT_MEANINGFUL, staleHistoryText, toDividendRows, trailingPaymentsText,
11
+ cashEstimateText, convertedFromText, formatConvertedAmount, formatDividendYield, forwardEstimateText, growthPaymentsText, PAYOUT_NOT_MEANINGFUL, staleHistoryText, toDividendRows, trailingPaymentsText,
12
12
  } from "./view";
13
13
  import { MISSING_VALUE, formatDistributionAmount, formatPercent } from "../../../utils/format";
14
14
  import { NOT_MEANINGFUL_TEXT } from "../../../utils/growth";
@@ -40,7 +40,7 @@ function paymentColumns(converted: boolean, subUnit?: string) {
40
40
  { key: "exDate", header: "Ex-date" },
41
41
  { key: "amount", header: "Amount", align: "right" as const,
42
42
  format: (value: unknown, row: Record<string, unknown>) => typeof value === "number" && typeof row.currency === "string" && row.currency
43
- ? amount(value, row.currency) : value == null ? MISSING_VALUE : String(value) },
43
+ ? `${row.cashEstimate ? "estimated " : ""}${amount(value, row.currency)}` : value == null ? MISSING_VALUE : String(value) },
44
44
  { key: "currency", header: "CCY" },
45
45
  { key: "type", header: "Type" },
46
46
  ];
@@ -211,11 +211,12 @@ export function projectDividendYieldHeadless(
211
211
  const priceStatus = dividendPriceStatus(data.price, data.priceAsOf, data.priceStale);
212
212
  // A regular payer's year with fewer payments than its cadence pays: the yield says how many it counts.
213
213
  const shortfall = trailingPaymentsText(metrics.trailingPayments, { cadence: true });
214
- const errors = [data.historyError, data.summaryError, tax?.checkError].filter((error): error is string => !!error);
214
+ const trailingEstimate = metrics.trailingEstimates?.length ? metrics.trailingEstimates.map(cashEstimateText).join("; ") : null;
215
+ const errors = [data.historyError, data.summaryError, data.cashVerificationWarning, tax?.checkError].filter((error): error is string => !!error);
215
216
 
216
217
  // A monthly payer's history that ends early: its yields and last ex-date stop there, and each says so.
217
218
  const historyEnd = metrics.lapse?.historyEnds ? metrics.lapse.lastPaid : null;
218
- const trailingNotes = [TRAILING_DIVIDEND_BASIS, shortfall ? `counts ${shortfall}` : null, historyEnd ? historyEndsText(historyEnd) : null]
219
+ const trailingNotes = [TRAILING_DIVIDEND_BASIS, shortfall ? `counts ${shortfall}` : null, historyEnd ? historyEndsText(historyEnd) : null, trailingEstimate]
219
220
  .filter((note): note is string => !!note).join("; ");
220
221
  const trailingLabel = bond ? `Trailing distribution yield (${NOT_SEC_YIELD})` : "Trailing yield";
221
222
  const forwardLabel = bond ? `Forward distribution yield (${NOT_SEC_YIELD})` : "Forward yield";
@@ -226,7 +227,7 @@ export function projectDividendYieldHeadless(
226
227
  const datesAndCash = [
227
228
  dateEntry("Last ex-dividend", metrics.lastExDividendDate),
228
229
  dateEntry("Next ex-dividend", metrics.nextExDividendDate),
229
- dateEntry("Next pay", metrics.nextPayDate),
230
+ metrics.nextPayDate ? dateEntry("Next pay", metrics.nextPayDate) : { label: "Next pay", value: null, formatted: "Unavailable" },
230
231
  ...(data.payments.length > 0 && metrics.trailingRate === 0
231
232
  ? [{ label: "Cash status", value: "No cash distributions reported in the past 12 months." }] : []),
232
233
  ];
@@ -252,16 +253,16 @@ export function projectDividendYieldHeadless(
252
253
  { label: forwardLabel, value: roundedRatio(metrics.forwardYield),
253
254
  formatted: forwardText
254
255
  ?? (metrics.forwardYield == null ? formatDividendYield(null)
255
- : `${formatDividendYield(metrics.forwardYield)} (${metrics.forwardBasis === "uneven" ? UNEVEN_REGULAR_PAYMENTS
256
- : forwardDividendBasis(metrics.forwardRateAsOf, { payDate: forwardPayDate(metrics), declared: data.declared, currency })})`) },
256
+ : `${formatDividendYield(metrics.forwardYield)} (${forwardEstimateText(metrics) ?? (metrics.forwardBasis === "uneven" ? UNEVEN_REGULAR_PAYMENTS
257
+ : forwardDividendBasis(metrics.forwardRateAsOf, { payDate: forwardPayDate(metrics), declared: data.declared, currency }))})`) },
257
258
  ...figures.map((figure) => ({
258
259
  label: figureLabel(figure),
259
260
  value: figure.value,
260
261
  formatted: `${figure.text}${figure.date ? ` (as of ${figure.date})` : ""}`,
261
262
  })),
262
- { label: "Trailing rate", value: metrics.trailingRate, formatted: cashRate(metrics.trailingRate) },
263
- { label: "Forward rate", value: metrics.forwardRate, formatted: cashRate(metrics.forwardRate) },
264
- { label: "Earnings Payout", value: roundedRatio(metrics.payoutRatio), formatted: metrics.payoutNotMeaningful ? PAYOUT_NOT_MEANINGFUL : formatDividendYield(metrics.payoutRatio) },
263
+ { label: "Trailing rate", value: metrics.trailingRate, formatted: `${cashRate(metrics.trailingRate)}${trailingEstimate ? ` (${trailingEstimate})` : ""}` },
264
+ { label: "Forward rate", value: metrics.forwardRate, formatted: `${cashRate(metrics.forwardRate)}${metrics.forwardEstimate ? ` (${forwardEstimateText(metrics)})` : ""}` },
265
+ { label: "Payout (basis/date unstated)", value: roundedRatio(metrics.payoutRatio), formatted: metrics.payoutNotMeaningful ? PAYOUT_NOT_MEANINGFUL : formatDividendYield(metrics.payoutRatio) },
265
266
  growthEntry("1Y Cash Growth", metrics.growth1Y, metrics.growth1YPayments, metrics.growth1YNotMeaningful),
266
267
  growthEntry("3Y Cash CAGR", metrics.growth3Y, metrics.growth3YPayments, metrics.growth3YNotMeaningful),
267
268
  { label: "Frequency", value: metrics.paymentFrequency },
@@ -284,7 +285,7 @@ export function projectDividendYieldHeadless(
284
285
  asOf: metrics.trailingRate == null ? null : lastEx },
285
286
  { label: "Forward rate", value: metrics.forwardRate, ...(metrics.forwardRate != null && currency && !convertedFrom ? { unit: currency } : { formatted: cashRate(metrics.forwardRate) }),
286
287
  asOf: metrics.forwardRate == null ? null : metrics.forwardRateAsOf },
287
- { label: "Earnings Payout", value: roundedRatio(metrics.payoutRatio), formatted: metrics.payoutNotMeaningful ? PAYOUT_NOT_MEANINGFUL : formatDividendYield(metrics.payoutRatio),
288
+ { label: "Payout (basis/date unstated)", value: roundedRatio(metrics.payoutRatio), formatted: metrics.payoutNotMeaningful ? PAYOUT_NOT_MEANINGFUL : formatDividendYield(metrics.payoutRatio),
288
289
  exportUnit: "pct", asOf: null },
289
290
  { ...growthEntry("1Y Cash Growth", metrics.growth1Y, metrics.growth1YPayments, metrics.growth1YNotMeaningful), exportUnit: "pct", asOf: metrics.growth1Y == null ? null : lastEx },
290
291
  { ...growthEntry("3Y Cash CAGR", metrics.growth3Y, metrics.growth3YPayments, metrics.growth3YNotMeaningful), exportUnit: "pct", asOf: metrics.growth3Y == null ? null : lastEx },
@@ -328,6 +329,11 @@ export function projectDividendYieldHeadless(
328
329
  growth1YNotMeaningful: metrics.growth1YNotMeaningful === true,
329
330
  growth3YNotMeaningful: metrics.growth3YNotMeaningful === true,
330
331
  forwardRateAsOf: metrics.forwardRateAsOf,
332
+ forwardRateEstimate: metrics.forwardEstimate ?? null,
333
+ trailingRateEstimates: metrics.trailingEstimates ?? [],
334
+ nextPayDateStatus: metrics.nextPayDate ? "announced" : "unavailable",
335
+ declaredCashAsOf: data.declaredCashAsOf ?? null,
336
+ cashVerificationWarning: data.cashVerificationWarning ?? null,
331
337
  // Set when a monthly payer's history stops more than 40 days ago: its forward yield is withheld and its trailing yield counts the history to then.
332
338
  historyEnds: metrics.lapse?.historyEnds ? metrics.lapse.lastPaid : null,
333
339
  // "uneven": the year's regular payments differ too widely for one to be annualized, so the forward rate is their total.
@@ -1,6 +1,7 @@
1
1
  import type { DataTableColumn } from "../../../components";
2
2
  import { compareSortValues, type SortDirection } from "../../../utils/sort-values";
3
- import type { DividendRow } from "./view";
3
+ import { displayWidth } from "../../../utils/format";
4
+ import { formatDividendRowAmount, type DividendRow } from "./view";
4
5
 
5
6
  export type DividendColumnId = "exDate" | "amount" | "declared" | "currency" | "source";
6
7
  export type DividendColumn = DataTableColumn & { id: DividendColumnId };
@@ -22,11 +23,11 @@ export const DEFAULT_SORT_PREFERENCE: DividendSortPreference = {
22
23
  * when the payments mix currencies; otherwise the amount's own symbol says it.
23
24
  * The source column shows only when a fund's sponsor gave a row its history lacks.
24
25
  */
25
- export function buildDividendColumns(rows: readonly Pick<DividendRow, "currency" | "declared" | "source">[] = []): DividendColumn[] {
26
+ export function buildDividendColumns(rows: readonly Pick<DividendRow, "amount" | "currency" | "declared" | "source" | "cashEstimate">[] = [], converted = false, subUnit?: string): DividendColumn[] {
26
27
  const mixed = new Set(rows.map((row) => row.currency)).size > 1;
27
28
  return [
28
29
  { id: "exDate", label: "EX-DATE", width: 10, align: "left" },
29
- { id: "amount", label: "AMOUNT", width: 12, align: "right" },
30
+ { id: "amount", label: "AMOUNT", width: Math.max(12, ...rows.map((row) => displayWidth(formatDividendRowAmount(row, converted, subUnit)))), align: "right" },
30
31
  ...(rows.some((row) => row.declared) ? [{ id: "declared" as const, label: "DECLARED", width: 10, align: "right" as const }] : []),
31
32
  ...(mixed ? [{ id: "currency" as const, label: "CCY", width: 6, align: "left" as const }] : []),
32
33
  ...(rows.some((row) => row.source) ? [{ id: "source" as const, label: "SOURCE", width: 12, align: "left" as const }] : []),
@@ -32,7 +32,7 @@ import { isCloudSessionRequired, useResearchCloudSession } from "../shared/resea
32
32
  import { fetchDividendData, repriceDividendMetrics, statedForwardRate, type DividendData } from "./client";
33
33
  import { dividendReferencePrice } from "../../../utils/trailing-dividend";
34
34
  import { useTickerQuoteStream } from "../../../state/hooks/live-ticker-financials";
35
- import { buildTrailingCashChartPoints, convertedFromText, formatConvertedAmount, formatDividendYield, growthPaymentsDetail, PAYOUT_NOT_MEANINGFUL, staleHistoryText, toDividendRows, trailingPaymentsText, type DividendRow } from "./view";
35
+ import { buildTrailingCashChartPoints, convertedFromText, formatConvertedAmount, formatDividendRowAmount, formatDividendYield, forwardEstimateText, growthPaymentsDetail, PAYOUT_NOT_MEANINGFUL, staleHistoryText, toDividendRows, trailingPaymentsText, type DividendRow } from "./view";
36
36
  import {
37
37
  DEFAULT_SORT_PREFERENCE,
38
38
  buildDividendColumns,
@@ -99,41 +99,44 @@ function buildMetricItems(metrics: DividendMetrics, currency: string, hasHistory
99
99
  // The rates of a listing paid in a conversion of what its company declares say what they were converted from.
100
100
  const converted = convertedFrom ? { detail: convertedFromText(convertedFrom) } : {};
101
101
  const exDate: StatItem[] = metrics.nextExDividendDate
102
- ? [{ id: "next-ex", label: "Next ex", value: formatDate(metrics.nextExDividendDate) }]
102
+ ? [{ id: "next-ex", label: "Next ex", value: formatDate(metrics.nextExDividendDate), essential: true }]
103
103
  : hasHistory ? [] : [{ id: "last-ex", label: "Last ex", value: formatDate(metrics.lastExDividendDate) }];
104
104
  const dated = metrics.lapse ? lastPaidNote(metrics.lapse)
105
105
  : metrics.forwardYield == null ? null
106
- : metrics.forwardBasis === "uneven" ? UNEVEN_REGULAR_PAYMENTS : forwardDividendNote(metrics.forwardRateAsOf, { declared, currency });
106
+ : forwardEstimateText(metrics) ?? (metrics.forwardBasis === "uneven" ? UNEVEN_REGULAR_PAYMENTS : forwardDividendNote(metrics.forwardRateAsOf, { declared, currency }));
107
107
  // "not SEC" in the grid: the SEC yield is the next cell, and the long form costs the header a column.
108
108
  const notSec = (note: string | null) => bond ? [note, "not SEC"].filter(Boolean).join(", ") : note;
109
- const forwardNote = notSec(dated);
109
+ const forwardNote = metrics.forwardEstimate ? null : notSec(dated);
110
110
  // A regular payer's year with fewer payments than its cadence pays says how many the yield counts.
111
111
  const trailingNote = notSec(trailingPaymentsText(metrics.trailingPayments));
112
112
  const ttmLabel = bond ? (short ? "TTM dist" : "TTM dist yld") : short ? "TTM yld" : "TTM yield";
113
113
  const fwdLabel = bond ? (short ? "Fwd dist" : "Fwd dist yld") : short ? "Fwd yld" : "Fwd yield";
114
114
  const sec = bond ? bondFigures(bond).find((figure) => figure.key === "secYield") : undefined;
115
115
  return [
116
- { id: "ttm-yield", label: ttmLabel, value: formatDividendYield(metrics.trailingYield), color: priceColor(metrics.trailingYield ?? 0),
116
+ { id: "ttm-yield", essential: true, label: ttmLabel, value: `${formatDividendYield(metrics.trailingYield)}${metrics.trailingEstimates?.length ? " estimated" : ""}`, color: priceColor(metrics.trailingYield ?? 0),
117
117
  ...(trailingNote ? { detail: trailingNote } : {}) },
118
118
  // Dated by the distribution it annualizes, or marked declared (with its stated amount) beside the next ex-date;
119
119
  // a dividend that stopped has none, dated by its last ex-date, and a monthly payer's history that ends says so.
120
120
  // docs/research-data.md says how it is built.
121
121
  metrics.lapse
122
- ? { id: "forward-yield", label: fwdLabel, value: lapseValue(metrics.lapse), ...(forwardNote ? { detail: forwardNote } : {}) }
123
- : { id: "forward-yield", label: fwdLabel, value: formatDividendYield(metrics.forwardYield), color: priceColor(metrics.forwardYield ?? 0),
122
+ ? { id: "forward-yield", essential: true, label: fwdLabel, value: lapseValue(metrics.lapse), ...(forwardNote ? { detail: forwardNote } : {}) }
123
+ : { id: "forward-yield", essential: true, label: fwdLabel, value: `${formatDividendYield(metrics.forwardYield)}${metrics.forwardEstimate ? " estimated" : ""}`, color: priceColor(metrics.forwardYield ?? 0),
124
124
  ...(forwardNote ? { detail: forwardNote } : {}) },
125
+ ...(metrics.forwardEstimate ? [{ id: "forward-fx", essential: true, label: metrics.forwardEstimate.fixingDate ? "FX fixing" : "FX basis",
126
+ value: metrics.forwardEstimate.fixingDate ?? `${metrics.forwardEstimate.declaredCurrency}, ${metrics.forwardEstimate.declaredAmount != null ? "not fixed" : "FX unknown"}` }] : []),
125
127
  // The 30-day SEC yield as the fund's sponsor publishes it, dated.
126
128
  ...(sec ? [{ id: "sec-yield", label: short ? "SEC yld" : "SEC yield", value: sec.text, ...(sec.date ? { detail: `as of ${sec.date}` } : {}) }] : []),
127
- { id: "ttm-rate", label: short ? "TTM/sh" : "TTM/share", value: formatRate(metrics.trailingRate, currency, !!convertedFrom, convertedSubUnit),
129
+ { id: "ttm-rate", essential: false, label: short ? "TTM/sh" : "TTM/share", value: formatRate(metrics.trailingRate, currency, !!convertedFrom, convertedSubUnit),
128
130
  ...metrics.trailingRate != null ? converted : {} },
129
- { id: "forward-rate", label: short ? "Fwd/sh" : "Fwd/share", value: formatRate(metrics.forwardRate, currency, !!convertedFrom, convertedSubUnit),
131
+ { id: "forward-rate", essential: false, label: short ? "Fwd/sh" : "Fwd/share", value: formatRate(metrics.forwardRate, currency, !!convertedFrom, convertedSubUnit),
130
132
  ...metrics.forwardRate != null ? converted : {} },
131
- growthItem("growth-1y", short ? "1Y chg" : "1Y growth", metrics.growth1Y, metrics.growth1YPayments, metrics.growth1YNotMeaningful),
132
- growthItem("cagr-3y", "3Y CAGR", metrics.growth3Y, metrics.growth3YPayments, metrics.growth3YNotMeaningful),
133
- { id: "payout", label: "Payout", value: metrics.payoutNotMeaningful ? PAYOUT_NOT_MEANINGFUL : metrics.payoutRatio != null ? `${(metrics.payoutRatio * 100).toFixed(1)}%` : MISSING_VALUE },
134
- { id: "cadence", label: "Cadence", value: formatFrequency(metrics.paymentFrequency) },
133
+ { ...growthItem("growth-1y", short ? "1Y chg" : "1Y growth", metrics.growth1Y, metrics.growth1YPayments, metrics.growth1YNotMeaningful), essential: false },
134
+ { ...growthItem("cagr-3y", "3Y CAGR", metrics.growth3Y, metrics.growth3YPayments, metrics.growth3YNotMeaningful), essential: false },
135
+ { id: "payout", essential: false, label: "Payout", value: metrics.payoutNotMeaningful ? PAYOUT_NOT_MEANINGFUL : metrics.payoutRatio != null ? `${(metrics.payoutRatio * 100).toFixed(1)}%` : MISSING_VALUE,
136
+ detail: "Basis/date unstated" },
137
+ { id: "cadence", essential: false, label: "Cadence", value: formatFrequency(metrics.paymentFrequency) },
135
138
  ...exDate,
136
- { id: "next-pay", label: "Next pay", value: formatDate(metrics.nextPayDate) },
139
+ { id: "next-pay", essential: true, label: "Next pay", value: metrics.nextPayDate ? formatDate(metrics.nextPayDate) : "Unavailable" },
137
140
  ];
138
141
  }
139
142
 
@@ -162,7 +165,7 @@ function renderCell(
162
165
  return { text: row.exDate, color: colors.textDim };
163
166
  case "amount":
164
167
  return {
165
- text: converted ? formatConvertedAmount(row.amount, row.currency, subUnit) : formatDistributionAmount(row.amount, row.currency),
168
+ text: formatDividendRowAmount(row, converted, subUnit),
166
169
  color: colors.textBright,
167
170
  attributes: TextAttributes.BOLD,
168
171
  };
@@ -257,6 +260,7 @@ function DividendTickerPane({ focused, width, height, loadData = fetchDividendDa
257
260
 
258
261
  const sourceWarnings = [
259
262
  ...(data?.stale ? [staleHistoryText(data.fetchedAt)] : []),
263
+ ...(data?.cashVerificationWarning ? [data.cashVerificationWarning] : []),
260
264
  ];
261
265
  usePaneNoticeFooter({
262
266
  registrationId: "dividend-yield-notices",
@@ -267,7 +271,9 @@ function DividendTickerPane({ focused, width, height, loadData = fetchDividendDa
267
271
  const metrics = data?.metrics ? repriceDividendMetrics(data.metrics, currentPrice) : undefined;
268
272
  const rows = useMemo(() => toDividendRows(payments), [payments]);
269
273
  const sortedRows = useMemo(() => sortRows(rows, sortPreference), [rows, sortPreference]);
270
- const columns = useMemo(() => buildDividendColumns(rows), [rows]);
274
+ const convertedFrom = historyData?.convertedFrom;
275
+ const convertedSubUnit = historyData?.convertedSubUnit;
276
+ const columns = useMemo(() => buildDividendColumns(rows, !!convertedFrom, convertedSubUnit), [rows, convertedFrom, convertedSubUnit]);
271
277
  const chartPoints = useMemo(
272
278
  () => data?.historyAvailable === false ? [] : buildTrailingCashChartPoints(payments),
273
279
  [data?.historyAvailable, payments],
@@ -295,8 +301,6 @@ function DividendTickerPane({ focused, width, height, loadData = fetchDividendDa
295
301
  });
296
302
  // The header row, plus the scrollbar row once the columns overflow the pane.
297
303
  const tableChromeRows = chartTableChromeRows(columns, width);
298
- const convertedFrom = historyData?.convertedFrom;
299
- const convertedSubUnit = historyData?.convertedSubUnit;
300
304
  const renderRowCell = useCallback((row: DividendRow, column: DividendColumn) => renderCell(row, column, !!convertedFrom, convertedSubUnit),
301
305
  [convertedFrom, convertedSubUnit]);
302
306
  const fullFigures = metrics ? buildMetricItems(metrics, currency, sortedRows.length > 0, false, data?.declared, bond, convertedFrom, convertedSubUnit) : [];
@@ -216,7 +216,7 @@ const RANKING_COLUMNS: HeadlessPaneColumn[] = [
216
216
  // CSV and NDJSON say `n/m` where JSON has null; the text report draws `N/M` as P/E does.
217
217
  format: (value, row) => row.payoutNotMeaningful === true ? PAYOUT_NOT_MEANINGFUL.toLowerCase() : ratio(value),
218
218
  textFormat: (value, row) => row.payoutNotMeaningful === true ? PAYOUT_NOT_MEANINGFUL : ratio(value),
219
- description: "Trailing twelve-month dividends over trailing twelve-month diluted EPS; N/M when that EPS is zero or negative." },
219
+ description: "Supplied earnings payout ratio; its accounting basis and measurement period are unstated. N/M when known trailing EPS is non-positive." },
220
220
  { key: "growth1Y", header: "1Y growth", align: "right", format: growth("growth1Y"), textFormat: growth("growth1Y", NOT_MEANINGFUL_TEXT),
221
221
  description: "Trailing twelve-month cash per share against a year earlier; N/M when the year earlier paid nothing; n/a when either year holds fewer payments than the cadence pays." },
222
222
  { key: "growth3Y", header: "3Y CAGR", align: "right", format: growth("growth3Y"), textFormat: growth("growth3Y", NOT_MEANINGFUL_TEXT),
@@ -1,5 +1,6 @@
1
1
  import type { DividendLapse } from "../../../utils/forward-dividend";
2
2
  import type { DistributionCadence, TrailingPayments } from "../../../utils/trailing-dividend";
3
+ import type { DividendCashEstimate } from "../../../types/financials";
3
4
 
4
5
  export interface DividendPayment {
5
6
  exDate: Date;
@@ -11,6 +12,7 @@ export interface DividendPayment {
11
12
  type: "cash" | "special" | "stock" | "unknown";
12
13
  /** The amount as the company declared it, in another currency than `currency` (BP's dollars beside the pence its London line paid). */
13
14
  declared?: { amount: number; currency: string };
15
+ cashEstimate?: DividendCashEstimate;
14
16
  /** Who published it when not the listing's history: the fund's sponsor (DividendAction.source). */
15
17
  source?: { publisher: string; url: string };
16
18
  }
@@ -28,6 +30,8 @@ export interface DividendMetrics {
28
30
  forwardRate: number | null;
29
31
  /** The ex-date of the distribution the forward rate annualizes, YYYY-MM-DD; with `forwardBasis`, the latest of the year's payments. */
30
32
  forwardRateAsOf: string | null;
33
+ forwardEstimate?: DividendCashEstimate;
34
+ trailingEstimates?: DividendCashEstimate[];
31
35
  /** `uneven`: the year's regular payments differ widely, so the forward rate is their total rather than one annualized (unevenRegularPayments). */
32
36
  forwardBasis?: "uneven" | null;
33
37
  /** Set once the dividend has stopped (lapsedDividend), when there is no forward rate or yield. */
@@ -1,27 +1,36 @@
1
- import type { DividendPayment, GrowthPayments } from "./types";
2
- import { MISSING_VALUE, formatCurrency } from "../../../utils/format";
3
- import { currencyMinorDigits } from "../../../market-data/market/format";
1
+ import type { DividendMetrics, DividendPayment, GrowthPayments } from "./types";
2
+ import { MISSING_VALUE, formatCurrency, formatDistributionAmount } from "../../../utils/format";
4
3
  import { resolveCurrencyUnit } from "../../../utils/currency-units";
5
4
  import type { ProjectedChartPoint } from "../../../components/chart/core/data";
6
5
  import { calendarMonthsBefore } from "../../../utils/calendar-date";
7
6
  import { NOT_MEANINGFUL, formatPriceEarnings } from "../../../utils/price-earnings";
7
+ import { UNEVEN_REGULAR_PAYMENTS } from "../../../utils/forward-dividend";
8
8
  import { CADENCE_GRACE_DAYS, LATE_GRACE_DAYS, trailingCashAt, type TrailingPayments } from "../../../utils/trailing-dividend";
9
9
 
10
10
  const DAY = 24 * 60 * 60 * 1000;
11
11
 
12
- /**
13
- * A cash amount the listing pays as a conversion of the currency its company
14
- * declares in (`DividendData.convertedFrom`), to two decimals of the unit its
15
- * source states it in: pence stay pence (BP's 6.4059p is `6.41p`, never
16
- * `£0.06`), and a major unit keeps its currency's decimals (`ZAR 0.87`, not
17
- * `ZAR 0.866087`), as the conversion gives it no more.
18
- */
19
12
  export function formatConvertedAmount(value: number | null | undefined, currency: string, subUnit?: string): string {
20
13
  if (value == null || !Number.isFinite(value)) return MISSING_VALUE;
21
14
  const unit = subUnit ? resolveCurrencyUnit(subUnit) : null;
22
15
  return unit && unit.divisor !== 1 && unit.currency === currency
23
- ? formatCurrency(value * unit.divisor, subUnit!, 2)
24
- : formatCurrency(value, currency, currencyMinorDigits(currency));
16
+ ? formatCurrency(value * unit.divisor, subUnit!, 6)
17
+ : formatCurrency(value, currency, 8);
18
+ }
19
+
20
+ export function formatDividendRowAmount(row: Pick<DividendRow, "amount" | "currency" | "cashEstimate">, converted = false, subUnit?: string): string {
21
+ const cash = converted ? formatConvertedAmount(row.amount, row.currency, subUnit) : formatDistributionAmount(row.amount, row.currency);
22
+ return `${row.cashEstimate ? "estimated " : ""}${cash}`;
23
+ }
24
+
25
+ export function forwardEstimateText(metrics: DividendMetrics): string | null {
26
+ const estimate = metrics.forwardEstimate;
27
+ if (!estimate) return null;
28
+ return `${metrics.forwardBasis === "uneven" ? `${UNEVEN_REGULAR_PAYMENTS}; ` : ""}${cashEstimateText(estimate)}`;
29
+ }
30
+
31
+ export function cashEstimateText(estimate: NonNullable<DividendMetrics["forwardEstimate"]>): string {
32
+ const declared = estimate.declaredAmount == null ? estimate.declaredCurrency : `${estimate.declaredAmount} ${estimate.declaredCurrency}/share`;
33
+ return `estimated from ${declared}; FX ${estimate.fixingDate ? `fixing ${estimate.fixingDate}` : "fixing unavailable"}${estimate.basis ? `; ${estimate.basis}` : ""}`;
25
34
  }
26
35
 
27
36
  /** What a converted amount says beside it: `converted from USD`. */
@@ -101,6 +110,7 @@ export interface DividendRow {
101
110
  key: string;
102
111
  exDate: string;
103
112
  amount: number;
113
+ cashEstimate?: DividendPayment["cashEstimate"];
104
114
  currency: string;
105
115
  /** The amount as the company declared it, in another currency (DividendPayment.declared). */
106
116
  declared?: { amount: number; currency: string };
@@ -113,6 +123,7 @@ export function toDividendRows(payments: DividendPayment[]): DividendRow[] {
113
123
  key: `${payment.exDate.toISOString()}:${index}`,
114
124
  exDate: payment.exDate.toISOString().slice(0, 10),
115
125
  amount: payment.amount,
126
+ ...(payment.cashEstimate ? { cashEstimate: payment.cashEstimate } : {}),
116
127
  currency: payment.currency,
117
128
  ...(payment.declared ? { declared: payment.declared } : {}),
118
129
  ...(payment.source ? { source: payment.source.publisher } : {}),