@gloom-sh/terminal 0.20.17 → 0.20.19
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.
- package/package.json +3 -1
- package/src/account/auth-dialog.tsx +19 -1
- package/src/account/billing.ts +2 -1
- package/src/account/heard-from-question.tsx +235 -0
- package/src/account/heard-from.ts +97 -0
- package/src/api-client/cot.ts +5 -6
- package/src/api-client/data.ts +14 -3
- package/src/api-client/heard-from.ts +72 -0
- package/src/api-client/index.ts +64 -6
- package/src/api-client/mna.ts +18 -0
- package/src/api-client/request.ts +162 -40
- package/src/api-client/supply-chain.ts +9 -0
- package/src/api-client/types/billing.ts +35 -1
- package/src/api-client/types/news.ts +45 -0
- package/src/api-client/types/world-venues.ts +9 -0
- package/src/app/global-shortcuts.ts +5 -3
- package/src/app/pro-welcome/keys.ts +27 -0
- package/src/app/pro-welcome/model.ts +158 -0
- package/src/app/pro-welcome/row.tsx +176 -0
- package/src/app/pro-welcome/use-pro-welcome.ts +156 -0
- package/src/app/runtime/external-profile-changes.ts +135 -0
- package/src/app.tsx +37 -4
- package/src/architecture/core-builtin-allowlist.json +1 -1
- package/src/architecture/floating-promise-allowlist.json +1 -2
- package/src/architecture/shortcut-labels-allowlist.json +1 -0
- package/src/cli/alert-listing.ts +98 -0
- package/src/cli/commands/market.ts +191 -39
- package/src/cli/commands/overview.ts +7 -1
- package/src/cli/commands/plugins.ts +3 -2
- package/src/cli/commands/search.ts +30 -6
- package/src/cli/commands/ticker.ts +13 -6
- package/src/cli/context.ts +24 -5
- package/src/cli/csv-export.ts +2 -1
- package/src/cli/desktop-pane-shot-browser.ts +3 -1
- package/src/cli/desktop-pane-shot-view.ts +0 -1
- package/src/cli/desktop-pane-shot.ts +276 -52
- package/src/cli/errors.ts +3 -9
- package/src/cli/exit-codes.ts +1 -1
- package/src/cli/glossary.ts +65 -11
- package/src/cli/help.ts +1 -1
- package/src/cli/history-demergers.ts +117 -0
- package/src/cli/history-rows.ts +8 -4
- package/src/cli/index.ts +2 -1
- package/src/cli/known-gaps.ts +16 -0
- package/src/cli/known-us-stocks.ts +18 -0
- package/src/cli/listing-arg.ts +192 -38
- package/src/cli/pane-functions/catalog-snapshot-build.ts +83 -0
- package/src/cli/pane-functions/catalog-snapshot.json +877 -0
- package/src/cli/pane-functions/catalog-snapshot.ts +62 -0
- package/src/cli/pane-functions/catalog.ts +50 -16
- package/src/cli/pane-functions/data.ts +16 -4
- package/src/cli/pane-functions/dom.ts +54 -8
- package/src/cli/pane-functions/freshness.ts +39 -4
- package/src/cli/pane-functions/function-help.ts +3 -3
- package/src/cli/pane-functions/headless.ts +9 -1
- package/src/cli/pane-functions/index.ts +175 -50
- package/src/cli/pane-functions/report-notices.ts +10 -0
- package/src/cli/pane-functions/resolver.ts +11 -7
- package/src/cli/pane-functions/screenshot-assessment.ts +38 -10
- package/src/cli/pane-functions/screenshot-data-evidence.ts +7 -15
- package/src/cli/pane-functions/screenshot-payload.ts +36 -1
- package/src/cli/pane-functions/screenshot-render.ts +24 -9
- package/src/cli/pane-functions/screenshot-types.ts +9 -0
- package/src/cli/quote-answer.ts +33 -17
- package/src/cli/registry.ts +22 -2
- package/src/cli/result.ts +22 -4
- package/src/cli/scroll-truncation.ts +7 -2
- package/src/cli/series-search.ts +45 -6
- package/src/cli/shot-temp-dir.ts +4 -9
- package/src/cli/ticker-resolution.ts +1 -1
- package/src/cli/unreachable.ts +21 -0
- package/src/components/chart/composite/drawing-store.ts +11 -7
- package/src/components/chart/composite/format.ts +1 -0
- package/src/components/chart/composite/legend.tsx +48 -20
- package/src/components/chart/composite/panel-surface/panel-cursor.tsx +3 -3
- package/src/components/chart/composite/panel-surface/plot-gestures.ts +9 -2
- package/src/components/chart/composite/panel-surface.tsx +1 -1
- package/src/components/chart/composite/price-axis-labels.tsx +7 -5
- package/src/components/chart/composite/tools.ts +164 -39
- package/src/components/chart-table/header.tsx +11 -2
- package/src/components/chart-table/layout.ts +16 -17
- package/src/components/command-bar/pane-templates/items.ts +17 -1
- package/src/components/command-bar/routes/root/provider-search.ts +10 -1
- package/src/components/command-bar/routes/root/results.ts +34 -2
- package/src/components/command-bar/routes/root/runtime.ts +19 -4
- package/src/components/command-bar/routes/ticker-search/results.ts +5 -0
- package/src/components/command-bar/routes/ticker-search/route.ts +5 -0
- package/src/components/command-bar/selection-runtime.ts +29 -5
- package/src/components/command-bar/surface/index.tsx +4 -1
- package/src/components/command-bar/workflow/alert.ts +32 -13
- package/src/components/data-table/view.tsx +15 -2
- package/src/components/form-modal/content.tsx +9 -4
- package/src/components/index.ts +1 -1
- package/src/components/layout/header.tsx +9 -5
- package/src/components/layout/pane/capture-status.ts +6 -0
- package/src/components/layout/pane/footer/index.tsx +2 -0
- package/src/components/layout/pane/footer/model.ts +123 -17
- package/src/components/layout/pane/header.tsx +16 -2
- package/src/components/layout/pane/status-footer.ts +24 -0
- package/src/components/market-board/index.tsx +4 -2
- package/src/components/onboarding/onboarding-frame.tsx +6 -2
- package/src/components/onboarding/onboarding-keyboard.ts +7 -1
- package/src/components/onboarding/onboarding-wizard.tsx +3 -1
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +24 -15
- package/src/components/onboarding/setup-cards.ts +36 -0
- package/src/components/onboarding/use-onboarding-progress.ts +22 -1
- package/src/components/onboarding/wizard-account.ts +6 -1
- package/src/components/onboarding/wizard-model.ts +32 -6
- package/src/components/onboarding/wizard-positions.ts +1 -1
- package/src/components/price-performance.tsx +26 -8
- package/src/components/reader/article-reader.tsx +12 -5
- package/src/components/sign-in-gate.tsx +3 -1
- package/src/components/toggle-list.tsx +6 -8
- package/src/components/ui/confirm-dialog.tsx +47 -7
- package/src/components/ui/data-table/opentui/index.tsx +7 -0
- package/src/components/ui/data-table/types.ts +8 -0
- package/src/components/ui/display.tsx +17 -2
- package/src/components/ui/index.ts +1 -1
- package/src/components/ui/stat-grid.tsx +4 -0
- package/src/components/ui/status.tsx +13 -1
- package/src/components/ui/table-layout.ts +34 -2
- package/src/components/use-pane-notice-footer.tsx +16 -3
- package/src/data/config/store/index.ts +31 -0
- package/src/data/config/store/node.ts +61 -11
- package/src/data/config/store/normalize.ts +4 -6
- package/src/data/config/store/shared-file.ts +309 -0
- package/src/data/profile-merge.ts +299 -0
- package/src/data/sqlite/checkpointer.ts +11 -1
- package/src/data/sqlite/database.ts +1 -1
- package/src/data/ticker-repository.ts +134 -10
- package/src/data/ticker-store.ts +67 -0
- package/src/data/ticker-writes.ts +5 -0
- package/src/i18n/es.ts +27 -0
- package/src/i18n/ja.ts +27 -0
- package/src/i18n/ko.ts +27 -0
- package/src/i18n/zh-cn.ts +27 -0
- package/src/i18n/zh-tw.ts +27 -0
- package/src/layout-marketplace/gallery-desktop.tsx +2 -2
- package/src/market-data/ah-pair.ts +122 -0
- package/src/market-data/coordinator/entries.ts +6 -4
- package/src/market-data/coordinator/index.ts +14 -3
- package/src/market-data/depositary-pair.ts +6 -2
- package/src/market-data/futures-board.ts +36 -29
- package/src/market-data/futures-contract.ts +37 -1
- package/src/market-data/hooks.tsx +33 -2
- package/src/market-data/market/change-basis.ts +11 -1
- package/src/market-data/market/header-market.ts +11 -0
- package/src/market-data/market/status.ts +40 -4
- package/src/market-data/performance.ts +127 -32
- package/src/market-data/quotes/time.ts +5 -2
- package/src/market-data/split-terms.ts +28 -0
- package/src/news/types.ts +28 -0
- package/src/notifications/app-badge.ts +2 -3
- package/src/notifications/app-notifier.ts +5 -0
- package/src/plugins/builtin/account-management/footer.ts +1 -1
- package/src/plugins/builtin/account-management/keyboard.ts +4 -0
- package/src/plugins/builtin/account-management/model.ts +1 -0
- package/src/plugins/builtin/account-management/pane.tsx +75 -7
- package/src/plugins/builtin/account-management/payment-recovery-row.tsx +12 -5
- package/src/plugins/builtin/account-management/pro-cancel.tsx +197 -0
- package/src/plugins/builtin/account-management/trial-cancel.ts +1 -1
- package/src/plugins/builtin/alerts/cli-move.ts +2 -2
- package/src/plugins/builtin/alerts/cli.ts +101 -48
- package/src/plugins/builtin/alerts/command.ts +39 -9
- package/src/plugins/builtin/alerts/constants.ts +10 -0
- package/src/plugins/builtin/alerts/earnings-listing.ts +20 -0
- package/src/plugins/builtin/alerts/event-rows.ts +9 -3
- package/src/plugins/builtin/alerts/events-pane.tsx +16 -10
- package/src/plugins/builtin/alerts/format.ts +24 -8
- package/src/plugins/builtin/alerts/headless.ts +12 -6
- package/src/plugins/builtin/alerts/index.tsx +97 -16
- package/src/plugins/builtin/alerts/move-checks.ts +7 -0
- package/src/plugins/builtin/alerts/option-contract.ts +197 -0
- package/src/plugins/builtin/alerts/pane.tsx +1 -1
- package/src/plugins/builtin/alerts/price.ts +30 -5
- package/src/plugins/builtin/alerts/pro-rules.ts +62 -0
- package/src/plugins/builtin/alerts/quotes.ts +26 -2
- package/src/plugins/builtin/alerts/research-builder.ts +5 -10
- package/src/plugins/builtin/alerts/scheduled.ts +6 -1
- package/src/plugins/builtin/alerts/types.ts +7 -0
- package/src/plugins/builtin/analytics/account-returns.ts +1 -1
- package/src/plugins/builtin/analytics/manual-value.ts +61 -0
- package/src/plugins/builtin/analytics/pane-model.ts +2 -2
- package/src/plugins/builtin/analytics/risk-book.ts +7 -7
- package/src/plugins/builtin/analytics/risk-client.ts +27 -14
- package/src/plugins/builtin/analytics/risk-headless.ts +13 -8
- package/src/plugins/builtin/analytics/risk-model.ts +92 -4
- package/src/plugins/builtin/analytics/risk-pane.tsx +85 -38
- package/src/plugins/builtin/awards/pane.tsx +1 -1
- package/src/plugins/builtin/broker-trading/orders.tsx +2 -2
- package/src/plugins/builtin/buildout/company/pane.tsx +4 -14
- package/src/plugins/builtin/catalysts/model.ts +2 -1
- package/src/plugins/builtin/central-bank-rates/model.ts +8 -2
- package/src/plugins/builtin/central-bank-rates/pane.tsx +5 -3
- package/src/plugins/builtin/chart-composer/chart-spec.ts +5 -0
- package/src/plugins/builtin/chart-composer/cli-options.ts +9 -5
- package/src/plugins/builtin/chart-composer/data-catalog-pane.tsx +2 -6
- package/src/plugins/builtin/chart-composer/headless-schema.ts +14 -10
- package/src/plugins/builtin/chart-composer/headless.ts +2 -0
- package/src/plugins/builtin/chart-composer/index.tsx +17 -5
- package/src/plugins/builtin/chart-composer/pane.tsx +19 -6
- package/src/plugins/builtin/chart-composer/viewport-labels.ts +2 -17
- package/src/plugins/builtin/chat/controller/notifications.ts +1 -0
- package/src/plugins/builtin/chat/index.tsx +0 -1
- package/src/plugins/builtin/cloud/auth-actions.tsx +11 -6
- package/src/plugins/builtin/cloud/company-picker.tsx +5 -3
- package/src/plugins/builtin/cloud/upgrade-command.ts +1 -1
- package/src/plugins/builtin/commodities-energy/index.tsx +1 -1
- package/src/plugins/builtin/company-kpis/headless.ts +10 -5
- package/src/plugins/builtin/company-kpis/latest.ts +45 -0
- package/src/plugins/builtin/company-kpis/model.ts +57 -15
- package/src/plugins/builtin/company-kpis/pane.tsx +22 -8
- package/src/plugins/builtin/composite/alt-data.ts +20 -0
- package/src/plugins/builtin/composite/application.ts +14 -0
- package/src/plugins/builtin/composite/broker.ts +12 -0
- package/src/plugins/builtin/composite/credit.ts +33 -0
- package/src/plugins/builtin/composite/crypto.ts +10 -0
- package/src/plugins/builtin/composite/earnings.ts +12 -0
- package/src/plugins/builtin/composite/filings.ts +13 -0
- package/src/plugins/builtin/composite/futures-commodities.ts +23 -0
- package/src/plugins/builtin/composite/global-markets.ts +12 -0
- package/src/plugins/builtin/composite/options-volatility.ts +23 -0
- package/src/plugins/builtin/composite/ownership.ts +23 -0
- package/src/plugins/builtin/composite/portfolio.ts +10 -0
- package/src/plugins/builtin/composite/quant.ts +15 -0
- package/src/plugins/builtin/composite/rates-macro.ts +30 -0
- package/src/plugins/builtin/composite/screeners.ts +11 -0
- package/src/plugins/builtin/composite/shared.ts +11 -0
- package/src/plugins/builtin/composite/ticker-core.ts +36 -0
- package/src/plugins/builtin/congress-trades/headless.ts +31 -3
- package/src/plugins/builtin/congress-trades/model.ts +9 -5
- package/src/plugins/builtin/correlation/index.tsx +13 -17
- package/src/plugins/builtin/correlation/matrix/model.ts +18 -0
- package/src/plugins/builtin/cot/client.ts +2 -3
- package/src/plugins/builtin/cot/headless.ts +16 -16
- package/src/plugins/builtin/cot/index.tsx +6 -6
- package/src/plugins/builtin/cot/model.ts +25 -5
- package/src/plugins/builtin/cot/pane.tsx +11 -6
- package/src/plugins/builtin/cot/series.ts +11 -8
- package/src/plugins/builtin/cpi/model.ts +15 -4
- package/src/plugins/builtin/cpi/pane.tsx +29 -7
- package/src/plugins/builtin/dividend-yield/client.ts +57 -16
- package/src/plugins/builtin/dividend-yield/headless.ts +17 -11
- package/src/plugins/builtin/dividend-yield/model.ts +4 -3
- package/src/plugins/builtin/dividend-yield/pane.tsx +22 -18
- package/src/plugins/builtin/dividend-yield/ranking.ts +1 -1
- package/src/plugins/builtin/dividend-yield/types.ts +4 -0
- package/src/plugins/builtin/dividend-yield/view.ts +23 -12
- package/src/plugins/builtin/doe/model.ts +30 -0
- package/src/plugins/builtin/doe/pane.tsx +8 -2
- package/src/plugins/builtin/earnings/board-table.ts +9 -4
- package/src/plugins/builtin/earnings/fiscal-quarter.ts +39 -0
- package/src/plugins/builtin/earnings/headless.ts +16 -6
- package/src/plugins/builtin/earnings/history-model.ts +6 -4
- package/src/plugins/builtin/earnings/history-table.ts +7 -4
- package/src/plugins/builtin/earnings-calls/calendar.tsx +4 -3
- package/src/plugins/builtin/earnings-calls/pane.tsx +8 -2
- package/src/plugins/builtin/earnings-ripple/pane.tsx +2 -2
- package/src/plugins/builtin/econ/calendar-model.ts +16 -0
- package/src/plugins/builtin/econ/index.tsx +7 -2
- package/src/plugins/builtin/equity-screener/headless.ts +4 -1
- package/src/plugins/builtin/equity-screener/model.ts +7 -6
- package/src/plugins/builtin/estimate-revisions/headless.ts +1 -1
- package/src/plugins/builtin/exposure/model.ts +10 -0
- package/src/plugins/builtin/exposure/pane.tsx +10 -3
- package/src/plugins/builtin/futures/model.ts +14 -1
- package/src/plugins/builtin/futures/series.ts +1 -8
- package/src/plugins/builtin/fx-matrix/amount.ts +15 -1
- package/src/plugins/builtin/fx-matrix/headless.ts +12 -6
- package/src/plugins/builtin/fx-matrix/index.tsx +25 -7
- package/src/plugins/builtin/fx-matrix/settings.ts +9 -4
- package/src/plugins/builtin/insider/detail.tsx +36 -7
- package/src/plugins/builtin/insider/filing-stories.ts +110 -0
- package/src/plugins/builtin/insider/headless.ts +37 -2
- package/src/plugins/builtin/insider/index.tsx +79 -10
- package/src/plugins/builtin/insider/model.ts +43 -5
- package/src/plugins/builtin/ipo-calendar/client.ts +11 -1
- package/src/plugins/builtin/ipo-calendar/model.ts +3 -7
- package/src/plugins/builtin/jobs/headless.ts +2 -1
- package/src/plugins/builtin/jobs/model.ts +6 -0
- package/src/plugins/builtin/jobs/pane.tsx +8 -3
- package/src/plugins/builtin/kelly-sizer/pane.tsx +9 -4
- package/src/plugins/builtin/market-valuation/pane.tsx +22 -10
- package/src/plugins/builtin/mna/detail.tsx +67 -6
- package/src/plugins/builtin/mna/headless.ts +128 -13
- package/src/plugins/builtin/mna/model.ts +219 -16
- package/src/plugins/builtin/mna/pane.tsx +34 -6
- package/src/plugins/builtin/money-markets/model.ts +14 -5
- package/src/plugins/builtin/money-markets/pane.tsx +4 -3
- package/src/plugins/builtin/news/wire/news/detail-view.tsx +118 -10
- package/src/plugins/builtin/news/wire/news/footer.ts +3 -8
- package/src/plugins/builtin/news/wire/news/story-evidence.ts +178 -0
- package/src/plugins/builtin/options/analytics.ts +1 -1
- package/src/plugins/builtin/options/view.tsx +18 -11
- package/src/plugins/builtin/options-positioning/model.ts +11 -0
- package/src/plugins/builtin/options-positioning/pane.tsx +22 -1
- package/src/plugins/builtin/options-scenario/client.ts +49 -8
- package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +22 -6
- package/src/plugins/builtin/options-scenario/csp-screen.ts +39 -12
- package/src/plugins/builtin/options-scenario/headless.ts +7 -3
- package/src/plugins/builtin/options-scenario/model.ts +33 -2
- package/src/plugins/builtin/options-scenario/pane.tsx +3 -4
- package/src/plugins/builtin/options-scenario/strategy-screen.ts +7 -5
- package/src/plugins/builtin/pe-band/client.ts +13 -1
- package/src/plugins/builtin/pe-band/headless.ts +2 -2
- package/src/plugins/builtin/pe-band/model.ts +63 -10
- package/src/plugins/builtin/pe-band/pane.tsx +5 -5
- package/src/plugins/builtin/perps/cascade.ts +4 -3
- package/src/plugins/builtin/perps/markets-section.tsx +5 -2
- package/src/plugins/builtin/perps/model.ts +4 -3
- package/src/plugins/builtin/portfolio-list/allocation-rows.ts +26 -7
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +66 -13
- package/src/plugins/builtin/portfolio-list/cli/render.ts +76 -33
- package/src/plugins/builtin/portfolio-list/headless.ts +69 -22
- package/src/plugins/builtin/portfolio-list/pane/data.ts +3 -3
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +29 -14
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +2 -2
- package/src/plugins/builtin/portfolio-list/table.tsx +3 -2
- package/src/plugins/builtin/relative-rotation/pane.tsx +2 -3
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +33 -14
- package/src/plugins/builtin/research/event-model.ts +43 -19
- package/src/plugins/builtin/research/headless.ts +8 -1
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +19 -17
- package/src/plugins/builtin/research-search/index.tsx +3 -1
- package/src/plugins/builtin/scanner/denied.tsx +16 -4
- package/src/plugins/builtin/scanner/flow-pane.tsx +1 -1
- package/src/plugins/builtin/scanner/hilo-pane.tsx +1 -1
- package/src/plugins/builtin/sec/filing-display.tsx +14 -2
- package/src/plugins/builtin/sec/headless.ts +42 -4
- package/src/plugins/builtin/sec/index.tsx +21 -1
- package/src/plugins/builtin/sectors/index.tsx +6 -9
- package/src/plugins/builtin/sectors/sector-model.ts +1 -1
- package/src/plugins/builtin/shared/cloud-upgrade.ts +1 -1
- package/src/plugins/builtin/shared/earnings-report.ts +49 -5
- package/src/plugins/builtin/shared/options-pro-copy.ts +34 -0
- package/src/plugins/builtin/shared/report-freshness.ts +2 -3
- package/src/plugins/builtin/shared/statement-currency.ts +23 -0
- package/src/plugins/builtin/shared/ticker-surface.ts +1 -1
- package/src/plugins/builtin/supply-chain/client.ts +34 -9
- package/src/plugins/builtin/supply-chain/evidence.ts +3 -2
- package/src/plugins/builtin/supply-chain/flow.tsx +4 -3
- package/src/plugins/builtin/supply-chain/graph-model.ts +14 -7
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +3 -1
- package/src/plugins/builtin/supply-chain/graph.tsx +6 -3
- package/src/plugins/builtin/supply-chain/headless.ts +19 -4
- package/src/plugins/builtin/supply-chain/model.ts +50 -6
- package/src/plugins/builtin/supply-chain/pane.tsx +79 -18
- package/src/plugins/builtin/themes/headless.ts +4 -4
- package/src/plugins/builtin/themes/model.ts +11 -8
- package/src/plugins/builtin/themes/pane.tsx +2 -2
- package/src/plugins/builtin/ticker-detail/adr-pair/ah.ts +62 -0
- package/src/plugins/builtin/ticker-detail/adr-pair/headless.ts +119 -20
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +51 -1
- package/src/plugins/builtin/ticker-detail/adr-pair/tab.tsx +25 -14
- package/src/plugins/builtin/ticker-detail/financials/model.ts +22 -32
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +7 -9
- package/src/plugins/builtin/ticker-detail/headless-schema.ts +2 -0
- package/src/plugins/builtin/ticker-detail/headless.ts +28 -12
- package/src/plugins/builtin/ticker-detail/overview/board-lot.ts +21 -0
- package/src/plugins/builtin/ticker-detail/overview/model.ts +28 -2
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +8 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +68 -13
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +9 -2
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +5 -2
- package/src/plugins/builtin/volatility/model.ts +17 -0
- package/src/plugins/builtin/volatility/pane.tsx +16 -7
- package/src/plugins/builtin/world-indices/index.tsx +2 -0
- package/src/plugins/builtin/world-indices/table.tsx +15 -0
- package/src/plugins/builtin/world-venue-map/evidence.ts +3 -2
- package/src/plugins/builtin/world-venue-map/headless.ts +32 -18
- package/src/plugins/builtin/world-venue-map/index.ts +19 -6
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +9 -5
- package/src/plugins/builtin/world-venue-map/layers.ts +33 -11
- package/src/plugins/builtin/world-venue-map/map.tsx +12 -0
- package/src/plugins/builtin/world-venue-map/model.ts +6 -1
- package/src/plugins/builtin/world-venue-map/pane.tsx +35 -6
- package/src/plugins/builtin/world-venue-map/place.ts +119 -0
- package/src/plugins/builtin/world-venue-map/venue-header.tsx +5 -3
- package/src/plugins/catalog-browser.ts +10 -1
- package/src/plugins/catalog-data.ts +20 -0
- package/src/plugins/catalog-lazy.ts +51 -0
- package/src/plugins/catalog-ui.ts +16 -18
- package/src/plugins/host-smoke.ts +5 -2
- package/src/portfolio/allocation.ts +79 -19
- package/src/portfolio/cash-balances.ts +76 -0
- package/src/portfolio/mutations.ts +43 -8
- package/src/public/__snapshots__/public-api.test.ts.snap +1 -0
- package/src/renderers/browser/activity.ts +16 -0
- package/src/renderers/browser/app-badge-host.ts +14 -0
- package/src/renderers/browser/main.tsx +5 -0
- package/src/renderers/browser/notifications.ts +103 -0
- package/src/renderers/browser/ui-host.tsx +4 -0
- package/src/renderers/desktop/window-layouts.ts +14 -0
- package/src/renderers/dom/data-table/index.tsx +27 -4
- package/src/renderers/dom/data-table/row.tsx +2 -0
- package/src/renderers/dom/host/tabs.tsx +57 -8
- package/src/renderers/dom/styles.css +13 -5
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +4 -0
- package/src/renderers/electrobun/bun/desktop/backend.ts +22 -1
- package/src/renderers/electrobun/bun/window/native-min-size.ts +6 -1
- package/src/renderers/electrobun/shared/protocol.ts +4 -0
- package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +50 -12
- package/src/renderers/electrobun/view/http-fetch.ts +3 -2
- package/src/renderers/electrobun/view/remote/ticker-repository.ts +10 -0
- package/src/series/standalone-catalog.ts +5 -4
- package/src/series/standalone.ts +13 -7
- package/src/sources/gloomberb-cloud/index.ts +22 -9
- package/src/sources/gloomberb-cloud/news.ts +35 -0
- package/src/sources/gloomberb-cloud/perpetuals.ts +60 -3
- package/src/sources/provider-errors.ts +34 -7
- package/src/sources/provider-router/financials.ts +20 -13
- package/src/sources/provider-router/history.ts +32 -6
- package/src/sources/provider-router/index.ts +4 -0
- package/src/sources/provider-router/search.ts +1 -0
- package/src/sync/collections-contributor.ts +3 -1
- package/src/sync/config-merge.ts +10 -1
- package/src/sync/sanitize.ts +26 -2
- package/src/tickers/company-name-listing.ts +16 -2
- package/src/tickers/listing-fate.ts +12 -8
- package/src/tickers/renamed-listings.ts +43 -10
- package/src/tickers/search/home-listing.ts +28 -0
- package/src/tickers/search/index.ts +19 -7
- package/src/tickers/terminal-codes.ts +11 -1
- package/src/time-series/base-series.ts +39 -6
- package/src/time-series/chart-seed.ts +2 -2
- package/src/time-series/history-quality.ts +4 -1
- package/src/time-series/hooks.ts +2 -0
- package/src/time-series/price-comparison.ts +17 -23
- package/src/time-series/reporting.ts +1 -1
- package/src/time-series/resolution.ts +13 -0
- package/src/time-series/resolve-context.ts +6 -0
- package/src/time-series/resolve.ts +42 -3
- package/src/time-series/spec.ts +2 -2
- package/src/time-series/types.ts +3 -2
- package/src/types/data-provider.ts +11 -0
- package/src/types/financials.ts +48 -4
- package/src/types/headless.ts +1 -0
- package/src/types/issuer-listings.ts +2 -0
- package/src/types/plugin-notifications.ts +3 -0
- package/src/types/price-history.ts +6 -4
- package/src/types/ticker.ts +10 -2
- package/src/ui/host.tsx +2 -0
- package/src/utils/cli-output.ts +1 -1
- package/src/utils/declared-dividends.ts +13 -1
- package/src/utils/dividend-cash.ts +5 -1
- package/src/utils/exchange-announcements.ts +7 -2
- package/src/utils/forward-dividend.ts +4 -3
- package/src/utils/fundamentals.ts +40 -0
- package/src/utils/network-failure.ts +2 -0
- package/src/utils/price-history-integrity.ts +9 -1
- package/src/utils/remove-folder.ts +37 -0
- package/src/utils/trailing-dividend.ts +1 -1
- package/src/plugins/builtin/composite-plugins.ts +0 -285
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { useAsyncResource } from "../../../../react/async-resource";
|
|
3
|
+
import { listingBoardLot, statesBoardLot } from "../../../../market-data/ah-pair";
|
|
4
|
+
import { useAssetData } from "../../../runtime";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The shares one lot of an HKEX or SGX listing trades in, from its company's
|
|
8
|
+
* listings as Gloom Cloud holds them (`getIssuerListings`, the read an A+H
|
|
9
|
+
* line's DES already makes); null for a listing elsewhere, while it loads, or
|
|
10
|
+
* when none is stated.
|
|
11
|
+
*/
|
|
12
|
+
export function useListingBoardLot(symbol: string | null | undefined, exchange: string | null | undefined): number | null {
|
|
13
|
+
const dataProvider = useAssetData();
|
|
14
|
+
const reads = statesBoardLot(symbol, exchange) && !!dataProvider?.getIssuerListings;
|
|
15
|
+
const loader = useCallback(
|
|
16
|
+
() => dataProvider!.getIssuerListings!(symbol!, exchange ?? undefined),
|
|
17
|
+
[dataProvider, exchange, symbol],
|
|
18
|
+
);
|
|
19
|
+
const issuer = useAsyncResource(reads ? loader : null);
|
|
20
|
+
return reads && symbol ? listingBoardLot(issuer.data, symbol, exchange) : null;
|
|
21
|
+
}
|
|
@@ -6,7 +6,7 @@ import { NOT_MEANINGFUL_TEXT } from "../../../../utils/growth";
|
|
|
6
6
|
import type { ServedRate } from "../../../../utils/served-rates";
|
|
7
7
|
import type { CedearRatio, CompanyProfile, DepositaryPair, NextEarnings, Quote, TickerFinancials } from "../../../../types/financials";
|
|
8
8
|
import { adrRatioText } from "../../../../utils/depositary-receipt";
|
|
9
|
-
import { cedearRatioText, ratioCount } from "../../../../market-data/depositary-pair";
|
|
9
|
+
import { cedearRatioText, premiumText, ratioCount } from "../../../../market-data/depositary-pair";
|
|
10
10
|
import { ADR_PAIR_TAB_ID, ADR_PAIR_TEMPLATE_ID } from "../adr-pair/model";
|
|
11
11
|
import type { Portfolio, TickerPosition, TickerRecord } from "../../../../types/ticker";
|
|
12
12
|
import type { BrokerInstanceConfig } from "../../../../types/config";
|
|
@@ -158,7 +158,9 @@ export function buildOverviewStats({
|
|
|
158
158
|
nextEarnings,
|
|
159
159
|
depositaryReceipt = false,
|
|
160
160
|
depositaryPair = null,
|
|
161
|
+
ahPair = null,
|
|
161
162
|
cedearRatio = null,
|
|
163
|
+
boardLot = null,
|
|
162
164
|
today,
|
|
163
165
|
dividend,
|
|
164
166
|
bond = null,
|
|
@@ -179,8 +181,15 @@ export function buildOverviewStats({
|
|
|
179
181
|
depositaryReceipt?: boolean;
|
|
180
182
|
/** The receipt pair the listing is a side of, as Gloom Cloud serves it; `receiptSide` when the listing is the receipt. */
|
|
181
183
|
depositaryPair?: { pair: DepositaryPair; receiptSide: boolean } | null;
|
|
184
|
+
/**
|
|
185
|
+
* An A+H company's other line (`useAhPair`): the A share on the H line's DES, the H share on the A line's, with
|
|
186
|
+
* the H price over the A price at spot. `linked` when this DES has the ADR vs Home tab that shows them.
|
|
187
|
+
*/
|
|
188
|
+
ahPair?: { other: string; side: "h" | "a"; premiumPercent: number | null; linked: boolean } | null;
|
|
182
189
|
/** A Buenos Aires CEDEAR's ratio in its company's shares, as Gloom Cloud serves it. */
|
|
183
190
|
cedearRatio?: CedearRatio | null;
|
|
191
|
+
/** The shares one lot of the listing trades in, as its exchange states it (an HKEX or SGX line). */
|
|
192
|
+
boardLot?: number | null;
|
|
184
193
|
/** The listing's calendar day, YYYY-MM-DD; dates before it are left out. */
|
|
185
194
|
today?: string;
|
|
186
195
|
/** The history the dividend yield reads (useOverviewDividend): a trailing one is measured from its cash, a forward one stops with it; without it the yield stands. */
|
|
@@ -247,6 +256,10 @@ export function buildOverviewStats({
|
|
|
247
256
|
if (finite(fundamentals?.floatShares) && fundamentals.floatShares > 0) {
|
|
248
257
|
stats.push({ label: "Float", value: formatCompact(fundamentals.floatShares), ...counted(fundamentals.floatSharesAsOf) });
|
|
249
258
|
}
|
|
259
|
+
// The shares one lot trades in, which an order on the venue is sized by.
|
|
260
|
+
if (boardLot != null && Number.isSafeInteger(boardLot) && boardLot > 0) {
|
|
261
|
+
stats.push({ label: "Board Lot", value: boardLot.toLocaleString("en-US"), detail: ["shares", "sh"] });
|
|
262
|
+
}
|
|
250
263
|
// A receipt says how many shares it holds and a home line which receipt holds it, both opening ADR vs Home.
|
|
251
264
|
if (depositaryPair) {
|
|
252
265
|
const { pair, receiptSide } = depositaryPair;
|
|
@@ -255,6 +268,16 @@ export function buildOverviewStats({
|
|
|
255
268
|
? { label: "ADR Ratio", value: `1:${count}`, detail: [adrRatioText(pair.ratio, pair.ordinary[0])!, `${count} sh per ADR`], link: ADR_PAIR }
|
|
256
269
|
: { label: "ADR", value: pair.receipt, detail: [`1 ADR = ${count} of these shares`, `1:${count}`], link: ADR_PAIR });
|
|
257
270
|
}
|
|
271
|
+
// An A+H company's other line, and the H price over the A price at spot, as ADR vs Home shows them.
|
|
272
|
+
if (ahPair) {
|
|
273
|
+
const premium = ahPair.premiumPercent == null ? null : premiumText(ahPair.premiumPercent);
|
|
274
|
+
stats.push({
|
|
275
|
+
label: ahPair.side === "h" ? "A Share" : "H Share",
|
|
276
|
+
value: ahPair.other,
|
|
277
|
+
...(premium ? { detail: [`H ${premium} at spot`, `H ${premium.replace(/ (?:premium|discount|at par)$/, "")}`] } : {}),
|
|
278
|
+
...(ahPair.linked ? { link: ADR_PAIR } : {}),
|
|
279
|
+
});
|
|
280
|
+
}
|
|
258
281
|
if (cedearRatio) {
|
|
259
282
|
const receipts = ratioCount(cedearRatio.receipts);
|
|
260
283
|
const shares = ratioCount(cedearRatio.shares);
|
|
@@ -320,7 +343,10 @@ export function buildOverviewStats({
|
|
|
320
343
|
});
|
|
321
344
|
}
|
|
322
345
|
if (fundamentals?.revenue != null) {
|
|
323
|
-
|
|
346
|
+
// Which twelve months the revenue, net income and margin are, as Financials' TTM column names them.
|
|
347
|
+
const end = fundamentals.trailingPeriodEnd;
|
|
348
|
+
const revenue = money(fundamentals.revenue);
|
|
349
|
+
stats.push({ label: "Revenue", ...revenue, ...(end && ISO_DATE.test(end) && !revenue.detail ? { detail: [`TTM to ${end}`, `to ${end}`] } : {}) });
|
|
324
350
|
}
|
|
325
351
|
if (fundamentals?.netIncome != null) {
|
|
326
352
|
stats.push({ label: "Net Income", ...money(fundamentals.netIncome) });
|
|
@@ -18,6 +18,8 @@ import { OverviewTab } from "../overview-tab";
|
|
|
18
18
|
import { useOpenResearchTab } from "../research-tab-navigation";
|
|
19
19
|
import type { OverviewFunctionLink } from "./types";
|
|
20
20
|
import { useOverviewDividend } from "./dividend";
|
|
21
|
+
import { useAhPair } from "../adr-pair/ah";
|
|
22
|
+
import { useListingBoardLot } from "./board-lot";
|
|
21
23
|
import { useTickerSnapshotState } from "../../../../market-data/hooks";
|
|
22
24
|
import { taxRatesFromSettings } from "../../../../market-data/tax-equivalent";
|
|
23
25
|
import { PaneLinkMenu } from "../../../../components";
|
|
@@ -38,6 +40,10 @@ export function OverviewResearchTab({ width, height, focused }: TickerResearchTa
|
|
|
38
40
|
const openResearchTab = useOpenResearchTab();
|
|
39
41
|
const { createPaneFromTemplate } = usePluginAppActions();
|
|
40
42
|
const dividend = useOverviewDividend(ticker?.metadata.ticker ?? null, ticker?.metadata.exchange ?? "", financials?.fundamentals);
|
|
43
|
+
// An A+H company's other line and the premium between them, beside the ADR row.
|
|
44
|
+
const ah = useAhPair(ticker?.metadata.ticker ?? null, ticker?.metadata.exchange || financials?.quote?.listingExchangeName, financials?.quote);
|
|
45
|
+
// A Hong Kong or Singapore line's board lot, the shares one lot trades in.
|
|
46
|
+
const boardLot = useListingBoardLot(ticker?.metadata.ticker ?? null, ticker?.metadata.exchange || financials?.quote?.listingExchangeName);
|
|
41
47
|
// A pane locked to one tab has nowhere to go.
|
|
42
48
|
const lockedToOneTab = getTickerResearchPaneSettings(paneInstance?.settings).hideTabs;
|
|
43
49
|
// The chart's scale, once set from the pane menu, holds for every ticker the pane shows.
|
|
@@ -63,6 +69,8 @@ export function OverviewResearchTab({ width, height, focused }: TickerResearchTa
|
|
|
63
69
|
onOpenChart={paneId && !lockedToOneTab ? openChart : undefined}
|
|
64
70
|
onOpenFunction={openFunction}
|
|
65
71
|
dividend={dividend}
|
|
72
|
+
ah={ah}
|
|
73
|
+
boardLot={boardLot}
|
|
66
74
|
snapshot={snapshot}
|
|
67
75
|
tax={taxRatesFromSettings(paneInstance?.settings)}
|
|
68
76
|
chartScale={parseOverviewChartScaleChoice(chartScale)}
|
|
@@ -12,19 +12,26 @@ import { CompanyLogo, resolveCompanyLogoSrc } from "../../../components/company-
|
|
|
12
12
|
import { bodyLineInk, FigureText, figureLineInk, useFigureCells } from "../../../components/ui/figure";
|
|
13
13
|
import { PriceReturnStrip } from "../../../components/price-performance";
|
|
14
14
|
import { t } from "../../../i18n";
|
|
15
|
-
import { useFxRateObservations, type TickerSnapshotState } from "../../../market-data/hooks";
|
|
15
|
+
import { useChartQueries, useFxRateObservations, useResolvedEntryValue, useTickerChangeNote, type TickerSnapshotState } from "../../../market-data/hooks";
|
|
16
16
|
import { formatMarketPriceWithCurrency, formatSignedMarketPrice, liveQuoteFormatOptions } from "../../../market-data/market/format";
|
|
17
17
|
import { priceSeriesUnit } from "../../../market-data/market/index-level";
|
|
18
18
|
import {
|
|
19
19
|
exchangeShortName,
|
|
20
|
+
extendedPrintTime,
|
|
20
21
|
extendedSessionLineLabel,
|
|
21
22
|
getExtendedSessionDisplay,
|
|
22
23
|
getRegularSessionDisplay,
|
|
24
|
+
headlineCloseDate,
|
|
23
25
|
quoteSessionColor,
|
|
24
26
|
quoteSessionLabel,
|
|
25
27
|
} from "../../../market-data/market/status";
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
+
import { buildPriceReturnFields, headlinePriceReturnEnd, priceReturnDailyWindow, priceReturnIntegrityNotice } from "../../../market-data/performance";
|
|
29
|
+
import type { ChartRequest } from "../../../market-data/request-types";
|
|
30
|
+
import { buildChartKey } from "../../../market-data/selectors";
|
|
31
|
+
import { changeBasisLabel, changeBasisNote, closeDayLabel, futuresQuoteFromSettle, quoteChangeBasis, quoteSettleText } from "../../../market-data/market/change-basis";
|
|
32
|
+
import { asOfClock } from "../../../market-data/quotes/time";
|
|
33
|
+
import { useRemoteUiNode } from "../../../remote/semantic-tree";
|
|
34
|
+
import { quoteObservation } from "../shared/report-freshness";
|
|
28
35
|
import {
|
|
29
36
|
fitFuturesContractLines, futuresContractLines, isFuturesInstrument, futuresPricePer, usdPerMmbtu, usdPerMmbtuText,
|
|
30
37
|
type FuturesContractLine,
|
|
@@ -39,7 +46,8 @@ import { Box, ScrollBox, Text, useUiCapabilities } from "../../../ui";
|
|
|
39
46
|
import { publicTickerKey, resolveExchangeTimeZone } from "../../../utils/exchanges";
|
|
40
47
|
import { convertCurrency, displayWidth, formatPercentRaw, truncateToDisplayWidth } from "../../../utils/format";
|
|
41
48
|
import {
|
|
42
|
-
appTtmRate, enterpriseValueGapIsLarge, enterpriseValueReconciliationNote, trailingEpsFiscalYear, ttmAtAppRate,
|
|
49
|
+
appTtmRate, baseCurrencyFiguresNote, enterpriseValueGapIsLarge, enterpriseValueReconciliationNote, trailingEpsFiscalYear, ttmAtAppRate,
|
|
50
|
+
ttmConversionNote, withFinancialEnterpriseValue,
|
|
43
51
|
} from "../../../utils/fundamentals";
|
|
44
52
|
import { servedRatesNotMeaningful } from "../../../utils/served-rates";
|
|
45
53
|
import { atRegularSessionPrice } from "../../../market-data/quotes/regular-session-valuation";
|
|
@@ -78,6 +86,7 @@ import { currentListingName } from "../../../tickers/listing-name";
|
|
|
78
86
|
import { isYieldIndexSymbol } from "../../../tickers/index-roots";
|
|
79
87
|
import { coinPriceVenueText, quoteStatsBasisText } from "../../../market-data/quotes/export-identity";
|
|
80
88
|
import { hiddenOnLogScale, logScaleHiddenWarning } from "../../../time-series/log-scale";
|
|
89
|
+
import type { AhPairState } from "./adr-pair/ah";
|
|
81
90
|
import {
|
|
82
91
|
autoOverviewChartScale, resolveOverviewChartScale, toggledOverviewChartScale, type OverviewChartScaleChoice,
|
|
83
92
|
} from "./overview/chart-scale";
|
|
@@ -119,6 +128,10 @@ interface OverviewTabProps {
|
|
|
119
128
|
onOpenFunction?: (link: OverviewFunctionLink) => void;
|
|
120
129
|
/** The history the dividend yield reads (useOverviewDividend): a trailing one's cash, a forward one's lapse; without it the yield stands. */
|
|
121
130
|
dividend?: OverviewDividendState;
|
|
131
|
+
/** An A+H company's other line and how the two prices compare (useAhPair); none for any other listing. */
|
|
132
|
+
ah?: AhPairState | null;
|
|
133
|
+
/** The shares one lot of an HKEX or SGX line trades in (useListingBoardLot); none elsewhere. */
|
|
134
|
+
boardLot?: number | null;
|
|
122
135
|
/** Where the ticker's snapshot load stands (useTickerSnapshotState), for the state shown before anything of it is in. */
|
|
123
136
|
snapshot?: TickerSnapshotState;
|
|
124
137
|
/** The rates `fn DES --tax-rate` set (taxRatesFromSettings): a fund's tax-equivalent yield and muni/Treasury ratio follow its facts. */
|
|
@@ -159,7 +172,7 @@ export function OverviewTab(props: OverviewTabProps) {
|
|
|
159
172
|
const FUND_FACTS_LINK: OverviewFunctionLink = { name: "Fund Facts", templateId: "sec-etf-pane" };
|
|
160
173
|
|
|
161
174
|
function ResolvedOverviewTab({
|
|
162
|
-
width, height, focused = false, ticker, financials, onOpenChart, onOpenFunction, perpetuals, news, dividend, tax = null,
|
|
175
|
+
width, height, focused = false, ticker, financials, onOpenChart, onOpenFunction, perpetuals, news, dividend, ah = null, boardLot = null, tax = null,
|
|
163
176
|
chartScale: chartScaleChoice = "auto", onChartScaleChange,
|
|
164
177
|
}: OverviewTabProps & { ticker: TickerRecord }) {
|
|
165
178
|
const trade = useResearchTrading();
|
|
@@ -177,6 +190,13 @@ function ResolvedOverviewTab({
|
|
|
177
190
|
|
|
178
191
|
const quote = financials?.quote;
|
|
179
192
|
const quoteDelayMinutes = useDelayedMarkMinutes(quote);
|
|
193
|
+
// `fn DES` and a capture are dated by the quote the header shows, as `quote` dates it: its last print,
|
|
194
|
+
// its delay and its session, the time it was read after them.
|
|
195
|
+
useRemoteUiNode(quote ? {
|
|
196
|
+
role: "report-freshness",
|
|
197
|
+
label: "Quote freshness",
|
|
198
|
+
getMetadata: () => ({ observations: [quoteObservation(quote, Date.now())] }),
|
|
199
|
+
} : null);
|
|
180
200
|
const fundamentals = financials?.fundamentals;
|
|
181
201
|
const capitalization = liveMarketCapitalization(quote, fundamentals);
|
|
182
202
|
const profile = financials?.profile;
|
|
@@ -252,6 +272,16 @@ function ResolvedOverviewTab({
|
|
|
252
272
|
const unknownHistoryBasis = hasUnknownBondHistoryBasis(quote, ticker.metadata.assetCategory, financials?.quoteMetadata?.instrumentType);
|
|
253
273
|
const historyQuote = unknownHistoryBasis ? undefined : quote;
|
|
254
274
|
const chartHistory = appendLiveQuotePoint(financials?.priceHistory ?? [], historyQuote);
|
|
275
|
+
// Five years of daily closes, which the Price Return strip measures each horizon on: the chart's bars are weekly.
|
|
276
|
+
const returnInstrument = useMemo(() => instrumentFromTicker(ticker), [ticker]);
|
|
277
|
+
const returnWindowDay = new Date().toISOString().slice(0, 10);
|
|
278
|
+
const dailyReturnsRequest = useMemo<ChartRequest | null>(() => {
|
|
279
|
+
if (!returnInstrument || unknownHistoryBasis) return null;
|
|
280
|
+
const { start, end } = priceReturnDailyWindow(Date.parse(`${returnWindowDay}T12:00:00Z`));
|
|
281
|
+
return { instrument: returnInstrument, bufferRange: "5Y", granularity: "detail", barSize: "1d", startDate: start, endDate: end };
|
|
282
|
+
}, [returnInstrument, returnWindowDay, unknownHistoryBasis]);
|
|
283
|
+
const dailyReturnEntries = useChartQueries(dailyReturnsRequest ? [dailyReturnsRequest] : []);
|
|
284
|
+
const dailyReturnBars = useResolvedEntryValue(dailyReturnsRequest ? dailyReturnEntries.get(buildChartKey(dailyReturnsRequest)) ?? null : null);
|
|
255
285
|
const chartDelta = (chartHistory.at(-1)?.close ?? 0) - (chartHistory[0]?.close ?? 0);
|
|
256
286
|
const chartTimeZone = resolveExchangeTimeZone(
|
|
257
287
|
ticker.metadata.exchange || quote?.listingExchangeName || quote?.exchangeName,
|
|
@@ -266,6 +296,15 @@ function ResolvedOverviewTab({
|
|
|
266
296
|
panelId: "price",
|
|
267
297
|
timeBasis: chartTimeZone ? { kind: "market", timeZone: chartTimeZone } : undefined,
|
|
268
298
|
});
|
|
299
|
+
// Each horizon runs from the daily close on its start date to the headline's close, as CMP and `history` measure
|
|
300
|
+
// it; the chart's weekly bars stand in until the daily ones are in. Bars and the quote are dated on the listing's clock.
|
|
301
|
+
const returnVenue = ticker.metadata.exchange || quote?.listingExchangeName || quote?.exchangeName || undefined;
|
|
302
|
+
const performanceFields = buildPriceReturnFields(
|
|
303
|
+
dailyReturnBars?.length ? dailyReturnBars : financials?.priceHistory ?? [],
|
|
304
|
+
returnVenue,
|
|
305
|
+
undefined,
|
|
306
|
+
historyQuote ? headlinePriceReturnEnd(historyQuote, returnVenue) : null,
|
|
307
|
+
);
|
|
269
308
|
// Years of history from a few dollars to hundreds read on a log axis, the Chart tab's own, so the early ones do not lie flat.
|
|
270
309
|
const autoChartScale = autoOverviewChartScale(priceSeries.points, { rate: isYieldIndexSymbol(ticker.metadata.ticker) });
|
|
271
310
|
const chartScale = resolveOverviewChartScale(chartScaleChoice, autoChartScale);
|
|
@@ -288,16 +327,25 @@ function ResolvedOverviewTab({
|
|
|
288
327
|
// A converted TTM block names what it was converted from, at the pane's rate and its time.
|
|
289
328
|
const ttmNote = [shownFundamentals?.revenue, shownFundamentals?.netIncome, shownFundamentals?.freeCashFlow].some((value) => value != null)
|
|
290
329
|
? ttmConversionNote(shownFundamentals) : undefined;
|
|
330
|
+
// A cap shown in the base currency too (7.80T ARS, 5.03B USD) says at what rate, and when it was read.
|
|
331
|
+
const capRateNote = capitalization ? baseCurrencyFiguresNote(capitalization.currency, baseCurrency, fxObservations) : undefined;
|
|
332
|
+
// FB lists a fund now, and Meta trades as META: said for someone who typed FB meaning the company, as `quote FB` says it.
|
|
333
|
+
const changeNote = useTickerChangeNote(ticker.metadata.ticker, ticker, quote);
|
|
334
|
+
const returnIntegrityNotice = priceReturnIntegrityNotice(performanceFields);
|
|
291
335
|
usePaneNoticeFooter({
|
|
292
336
|
registrationId: "overview-notices",
|
|
293
337
|
notices: [
|
|
338
|
+
...(changeNote ? [changeNote] : []),
|
|
294
339
|
...(!quote && financials ? [t("Current quote unavailable. Other research data is still available.")] : []),
|
|
295
340
|
...(runwayOfferingNote ? [runwayOfferingNote] : []),
|
|
296
341
|
...(runway?.trailingGap === "short-history" ? [`Runway TTM: ${SHORT_RUNWAY_HISTORY}.`] : []),
|
|
297
|
-
|
|
342
|
+
// A bar with contradictory prices is said only where it leaves a shown return blank: on a chart of years one
|
|
343
|
+
// bar's gap is a hairline that changes no figure, and a return reads only the bars at its ends.
|
|
344
|
+
...(returnIntegrityNotice ? [returnIntegrityNotice] : []),
|
|
298
345
|
...(hiddenOnLog > 0 ? [logScaleHiddenWarning(priceSeries.label, hiddenOnLog)] : []),
|
|
299
346
|
...(enterpriseValueNote ? [enterpriseValueNote] : []),
|
|
300
347
|
...(ttmNote ? [ttmNote] : []),
|
|
348
|
+
...(capRateNote ? [capRateNote] : []),
|
|
301
349
|
...(capitalization?.provenance.kind === "fundamentals" && !capitalization.live
|
|
302
350
|
? [`Market cap: ${describeFundamentalMarketCap(capitalization.provenance)}.`] : []),
|
|
303
351
|
],
|
|
@@ -323,7 +371,13 @@ function ResolvedOverviewTab({
|
|
|
323
371
|
const quoteChangeText = sessionQuote && !delisted ? formatSignedMarketPrice(sessionQuote.change, moneyOptions) : "";
|
|
324
372
|
const quotePercentText = sessionQuote && !delisted ? `(${formatPercentRaw(sessionQuote.changePercent)})` : "";
|
|
325
373
|
const changeBasis = delisted ? null : quoteChangeBasis(movedQuote, { terms: contractTerms });
|
|
326
|
-
|
|
374
|
+
// Once the session is over the headline is its close, dated apart from the extended print below it:
|
|
375
|
+
// "Tue 17 Nov close · vs Mon 16 Nov close". A future's settle is dated on its own line.
|
|
376
|
+
const closeDate = contractTerms ? null : headlineCloseDate(movedQuote);
|
|
377
|
+
const changeBasisText = [
|
|
378
|
+
closeDate ? closeDayLabel(closeDate) : "",
|
|
379
|
+
changeBasis ? changeBasisLabel(changeBasis) : "",
|
|
380
|
+
].filter(Boolean).join(" \u00b7 ");
|
|
327
381
|
// The days the venue was closed since that close, under the move: "HKEX closed Mon 19 Oct, holiday".
|
|
328
382
|
const changeBasisNoteText = changeBasisNote(changeBasis);
|
|
329
383
|
// The pane title already names the ticker, so the line leads with the company and drops a name that only repeats it.
|
|
@@ -373,7 +427,11 @@ function ResolvedOverviewTab({
|
|
|
373
427
|
: "";
|
|
374
428
|
// The extended session's line keeps its label and price whole on a narrow pane: the move gives
|
|
375
429
|
// way to its percent, then goes, rather than wrapping a figure across two lines ("(+0." / "08%)").
|
|
376
|
-
|
|
430
|
+
// The extended print says when it was observed (After-Hours 00:10 UTC), as the close above says its day.
|
|
431
|
+
const extendedTime = extendedQuote ? extendedPrintTime(quote) : null;
|
|
432
|
+
const extendedLabelText = extendedQuote
|
|
433
|
+
? `${extendedSessionLineLabel(extendedQuote, t)}${extendedTime != null ? ` ${asOfClock(Math.min(extendedTime, Date.now()))}` : ""}:`
|
|
434
|
+
: "";
|
|
377
435
|
const extendedPriceText = extendedQuote ? formatMarketPriceWithCurrency(extendedQuote.price, quote?.currency, moneyOptions) : "";
|
|
378
436
|
const extendedMoveText = extendedQuote
|
|
379
437
|
? [
|
|
@@ -432,6 +490,7 @@ function ResolvedOverviewTab({
|
|
|
432
490
|
const contractGridColumns = futuresFields.length > 0 ? contractColumns : textGridColumns(optionFields, contentWidth);
|
|
433
491
|
const depositaryPair = listingDepositaryPair(financials);
|
|
434
492
|
const stats = buildOverviewStats({
|
|
493
|
+
ahPair: ah ? { other: ah.side === "h" ? ah.pair.a : ah.pair.h, side: ah.side, premiumPercent: ah.comparison?.premiumPercent ?? null, linked: !!depositaryPair } : null,
|
|
435
494
|
quote,
|
|
436
495
|
fundamentals: shownFundamentals,
|
|
437
496
|
financialCurrency: financials?.financialCurrency,
|
|
@@ -443,6 +502,7 @@ function ResolvedOverviewTab({
|
|
|
443
502
|
depositaryReceipt: sharesOutstandingInReceipts(quote, fundamentals, description),
|
|
444
503
|
depositaryPair: depositaryPair ? { pair: depositaryPair, receiptSide: isReceiptSide(financials) } : null,
|
|
445
504
|
cedearRatio: listingCedearRatio(financials),
|
|
505
|
+
boardLot,
|
|
446
506
|
// Report and ex-dividend dates are the listing's calendar days.
|
|
447
507
|
today: zonedDateKey(Date.now(), chartTimeZone ?? "America/New_York"),
|
|
448
508
|
dividend,
|
|
@@ -459,11 +519,6 @@ function ResolvedOverviewTab({
|
|
|
459
519
|
profile,
|
|
460
520
|
isin: ticker.metadata.isin,
|
|
461
521
|
});
|
|
462
|
-
// Bars and the quote are dated on the listing's clock.
|
|
463
|
-
const performanceFields = buildPriceReturnFields(
|
|
464
|
-
appendQuoteToPriceReturnHistory(financials?.priceHistory ?? [], historyQuote),
|
|
465
|
-
ticker.metadata.exchange || quote?.listingExchangeName || quote?.exchangeName || undefined,
|
|
466
|
-
);
|
|
467
522
|
const hasPerformance = performanceFields.some((field) => field.value != null || field.unavailableReason);
|
|
468
523
|
const positionRows = buildPositionRows({
|
|
469
524
|
ticker,
|
|
@@ -66,6 +66,9 @@ function extendedLineParts(
|
|
|
66
66
|
|
|
67
67
|
const DESKTOP_DETAIL_TEXT_STYLE = { fontSize: "var(--gloom-type-ui)", lineHeight: "14px", whiteSpace: "nowrap" };
|
|
68
68
|
|
|
69
|
+
/** A desktop card row: its line's height at least, more only as its line needs. */
|
|
70
|
+
const CARD_LINE_ROW = "minmax(min-content, auto)";
|
|
71
|
+
|
|
69
72
|
/** The desktop card's muted lines: the name under its symbol, and what the price is as of. */
|
|
70
73
|
/** A line set over the sparkline, backed in the card's colour (the theme's, as drawn) so the line does not run through it. */
|
|
71
74
|
function backedLineStyle() {
|
|
@@ -304,8 +307,12 @@ export function QuoteMonitorCard({
|
|
|
304
307
|
display: "grid",
|
|
305
308
|
// The symbol and the price keep their natural widths; the name gives way first.
|
|
306
309
|
gridTemplateColumns: "minmax(min-content, 1fr) auto",
|
|
307
|
-
// The symbol and price, what the price is as of, an extended print, the range, a perpetual.
|
|
308
|
-
|
|
310
|
+
// The symbol and price, what the price is as of, an extended print, the range, a perpetual. Each row
|
|
311
|
+
// keeps its line's height however short the card: a line cut for width (overflow hidden) counts for
|
|
312
|
+
// no height in an `auto` row, and on a narrow board the as-of, after-hours and range lines drew over
|
|
313
|
+
// one another ("After-Hours $155.90 -0." under the range, the as-of half hidden). The board gives the
|
|
314
|
+
// card that height (QuoteMonitorPane).
|
|
315
|
+
gridTemplateRows: `${CARD_LINE_ROW} ${CARD_LINE_ROW} minmax(min-content, 1fr) ${CARD_LINE_ROW} ${CARD_LINE_ROW}`,
|
|
309
316
|
columnGap: "var(--gloom-space-md)",
|
|
310
317
|
width: "100%",
|
|
311
318
|
height: "100%",
|
|
@@ -285,11 +285,14 @@ export function QuoteMonitorPane({ paneId, focused, width, height }: PaneProps)
|
|
|
285
285
|
<Box
|
|
286
286
|
flexGrow={1}
|
|
287
287
|
backgroundColor={colors.bg}
|
|
288
|
-
overflow="hidden"
|
|
289
288
|
style={{
|
|
290
289
|
display: "grid",
|
|
291
290
|
gridTemplateColumns: `repeat(${desktopColumns}, minmax(0, 1fr))`,
|
|
292
|
-
|
|
291
|
+
// The rows share the board, each at least as tall as its cards' lines: a board too short for every card
|
|
292
|
+
// scrolls rather than draw a card's lines over one another.
|
|
293
|
+
gridAutoRows: "minmax(min-content, 1fr)",
|
|
294
|
+
overflowX: "hidden",
|
|
295
|
+
overflowY: "auto",
|
|
293
296
|
alignItems: "stretch",
|
|
294
297
|
alignContent: "stretch",
|
|
295
298
|
width: "100%",
|
|
@@ -442,6 +442,23 @@ export function buildVolatilityTermHistory(inputs: VolatilityInputs): Volatility
|
|
|
442
442
|
return termHistory([boardTermSource(spot, threeMonth), fredTermSource(fredHistory(inputs.fred))]);
|
|
443
443
|
}
|
|
444
444
|
|
|
445
|
+
/** What a curve point says of itself (`no close aligned to …`), from the curve's warnings that name it. */
|
|
446
|
+
export function curvePointWarnings(data: Pick<VolatilityData, "curve">, label: string): string[] {
|
|
447
|
+
return data.curve.warnings.flatMap((warning) => warning.startsWith(`${label}: `) ? [warning.slice(label.length + 2)] : []);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* The warnings that concern the whole pane, for its footer: the data's
|
|
452
|
+
* warnings less a board row's and a curve point's own, which their rows say.
|
|
453
|
+
*/
|
|
454
|
+
export function volatilityPaneWarnings(data: VolatilityData): string[] {
|
|
455
|
+
const rows = new Set([
|
|
456
|
+
...data.board.flatMap((row) => row.warnings.map((warning) => `${row.label}: ${warning}`)),
|
|
457
|
+
...data.curve.points.flatMap((point) => curvePointWarnings(data, point.label).map((warning) => `${point.label}: ${warning}`)),
|
|
458
|
+
]);
|
|
459
|
+
return data.warnings.filter((warning) => !rows.has(warning));
|
|
460
|
+
}
|
|
461
|
+
|
|
445
462
|
/** Curve values share one date and source family; board rows keep their own dates. */
|
|
446
463
|
export function buildVolatilityData(inputs: VolatilityInputs): VolatilityData {
|
|
447
464
|
const fred = fredHistory(inputs.fred);
|
|
@@ -4,7 +4,7 @@ import { ChartTableHeader, CurveSurface, curveGhostColors, DataTableView, format
|
|
|
4
4
|
import { curveStrip, curveSurfaceMinRows } from "../../../components/chart/curve";
|
|
5
5
|
import { savedCopyFooterInfo } from "../../../components/layout/pane/footer";
|
|
6
6
|
import { STALE_SEGMENT } from "../../../components/layout/pane/status-footer";
|
|
7
|
-
import { dropColumnsToFit } from "../../../components/ui/table-layout";
|
|
7
|
+
import { dropColumnsToFit, hiddenTableColumnRows } from "../../../components/ui/table-layout";
|
|
8
8
|
import { useAsyncResource } from "../../../react/async-resource";
|
|
9
9
|
import { usePaneRefreshKey } from "../../../components/data-table/table-pane";
|
|
10
10
|
import { usePaneSettingValue, usePluginPaneState } from "../../../public/react";
|
|
@@ -24,7 +24,7 @@ import { useIndexCloseSettled, useLiveSessionRefresh, useThrottledValue } from "
|
|
|
24
24
|
import { DAY_SO_FAR_TEXT } from "../../../time-series/session-bar";
|
|
25
25
|
import { getCachedVolatilityData, loadVolatilityData, type VolatilityLoadResult } from "./client";
|
|
26
26
|
import { VOLATILITY_CURVE_INDICES, VOLATILITY_INDICES } from "../shared/volatility-indices";
|
|
27
|
-
import { boardOrder, buildVolatilityData, IMPLIED_CORRELATION_ROWS, termStateLabel, volatilityCurveLookbacks, withLiveVolatilityLevels, type VolatilityBoardRow, type VolatilityIndexId, type VolatilityLiveLevel } from "./model";
|
|
27
|
+
import { boardOrder, buildVolatilityData, curvePointWarnings, IMPLIED_CORRELATION_ROWS, termStateLabel, volatilityCurveLookbacks, volatilityPaneWarnings, withLiveVolatilityLevels, type VolatilityBoardRow, type VolatilityIndexId, type VolatilityLiveLevel } from "./model";
|
|
28
28
|
import { VolatilityHistoryChart, VolatilityIndexHistoryChart } from "./charts";
|
|
29
29
|
import { volatilityCurveRows, volatilityCurveSeries, type VolatilityCurveRow } from "./chart-model";
|
|
30
30
|
import { useVolatilityEvidence } from "./evidence";
|
|
@@ -141,8 +141,9 @@ export function VolatilityPane({ focused, width, height }: PaneProps) {
|
|
|
141
141
|
}, [data?.board, sort, loading]);
|
|
142
142
|
const selected = rows.find((row) => row.id === selectedId) ?? rows[0] ?? null;
|
|
143
143
|
useVolatilityEvidence(result, tab, selected, resource.loading);
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
// The footer's notes are the pane's; a board row's or a curve point's are that row's (rowNote).
|
|
145
|
+
const notices = [resource.error, levelRefresh.error, ...(result?.errors ?? []), ...(data ? volatilityPaneWarnings(data) : [])]
|
|
146
|
+
.filter((notice): notice is string => !!notice);
|
|
146
147
|
usePaneNoticeFooter({ registrationId: "volatility-notices", notices, focused });
|
|
147
148
|
// From the tab the press finds, so the footer's hint never holds an old one.
|
|
148
149
|
const cycleTab = useCallback(() => setTab((current) =>
|
|
@@ -183,8 +184,9 @@ export function VolatilityPane({ focused, width, height }: PaneProps) {
|
|
|
183
184
|
], hints: [{ id: "view", key: "v", label: "iew", onPress: cycleTab }] }), [resource.loading, result?.stale, result?.savedAt, data, asOf, observationTime, observationBasis, cycleTab]);
|
|
184
185
|
const { strip: tabStrip, rows: tabRows } = usePaneTabs({ tabs: TABS, activeValue: tab, onSelect: setTab, focused, dense: true });
|
|
185
186
|
const contentHeight = Math.max(5, height - tabRows);
|
|
187
|
+
const boardColumns = useMemo(() => dropColumnsToFit(BOARD_COLUMNS, width - 1, BOARD_DROP_ORDER), [width]);
|
|
186
188
|
// The board needs only its rows; the selected index history takes the rest.
|
|
187
|
-
const boardHeight = Math.max(5, Math.min(rows.length + 2, Math.floor(contentHeight * 0.62)));
|
|
189
|
+
const boardHeight = Math.max(5, Math.min(rows.length + 2 + hiddenTableColumnRows(boardColumns, rows.length), Math.floor(contentHeight * 0.62)));
|
|
188
190
|
const curve = data?.curve;
|
|
189
191
|
// The week- and month-back curves come from the histories the board already loaded.
|
|
190
192
|
const lookbacks = useMemo(() => data ? volatilityCurveLookbacks(data) : [], [data]);
|
|
@@ -207,7 +209,6 @@ export function VolatilityPane({ focused, width, height }: PaneProps) {
|
|
|
207
209
|
{ id: "spread", label: "Spread", value: `${number(curve.slope, true)} pts` },
|
|
208
210
|
] : [];
|
|
209
211
|
const ready = !!data && (data.board.some((row) => row.value != null) || data.fred.metrics.some((metric) => metric.value != null));
|
|
210
|
-
const boardColumns = useMemo(() => dropColumnsToFit(BOARD_COLUMNS, width - 1, BOARD_DROP_ORDER), [width]);
|
|
211
212
|
return <Box width={width} height={height} flexDirection="column" overflow="hidden">
|
|
212
213
|
{tabStrip}
|
|
213
214
|
<PaneStatusBody subject="volatility" loading={resource.loading && !ready} error={!ready ? resource.error ?? result?.errors[0] ?? null : null} empty={!resource.loading && !ready}>
|
|
@@ -216,6 +217,10 @@ export function VolatilityPane({ focused, width, height }: PaneProps) {
|
|
|
216
217
|
emptyStateTitle="VIX curve unavailable." getItemKey={curveRowKey}
|
|
217
218
|
selection={{ kind: "id", selectedId: curveSelectedId, getId: curveRowKey, onChange: setSelectedId }}
|
|
218
219
|
onActivate={(row) => { setSelectedId(row.id); setTab("board"); }}
|
|
220
|
+
rowNote={(row) => {
|
|
221
|
+
const notes = curvePointWarnings(data, row.label);
|
|
222
|
+
return notes.length ? `${row.label}: ${notes.join("; ")}.` : null;
|
|
223
|
+
}}
|
|
219
224
|
sortColumnId={null} sortDirection="asc"
|
|
220
225
|
getExportMetadata={() => [["as of", data.curve.date], ["source", data.curve.source === "fred" ? "FRED" : "Cboe"], ["units", "IV percent"], ["warnings", ...notices]]}
|
|
221
226
|
renderCell={(row, column) => {
|
|
@@ -237,11 +242,15 @@ export function VolatilityPane({ focused, width, height }: PaneProps) {
|
|
|
237
242
|
<DataTableView<VolatilityBoardRow> focused={focused} columns={boardColumns} items={rows} rootWidth={width} rootHeight={boardHeight}
|
|
238
243
|
emptyStateTitle="Volatility indices unavailable." getItemKey={(row) => row.id} selection={{ kind: "id", selectedId: selected?.id ?? null, getId: (row) => row.id, onChange: setSelectedId }}
|
|
239
244
|
onActivate={(row) => setSelectedId(row.id)} sortable
|
|
245
|
+
rowNote={(row) => row.warnings.length ? `${row.label}: ${row.warnings.join("; ")}.` : null}
|
|
240
246
|
sortColumnId={sort.columnId} sortDirection={sort.direction}
|
|
241
247
|
onHeaderClick={(id) => setSort((current) => nextHeaderSort(current, id, { resetTo: { columnId: null, direction: "asc" } }))}
|
|
242
248
|
onSortChange={(columnId, direction) => setSort({ columnId, direction })}
|
|
243
249
|
getExportMetadata={() => [["basis", "daily history; sparse observations retain their timestamp"], ["percentile", "one year, at least 200 observations and 300 calendar days"], ["warnings", ...notices]]}
|
|
244
|
-
renderCell={(row, column) =>
|
|
250
|
+
renderCell={(row, column) => column.id === "id" && row.warnings.length
|
|
251
|
+
// A row with a note under the table when selected says so on its symbol.
|
|
252
|
+
? { text: row.id.toUpperCase(), color: colors.warning }
|
|
253
|
+
: ({ text: column.id === "id" ? row.id.toUpperCase()
|
|
245
254
|
: column.id === "label" ? row.label
|
|
246
255
|
: column.id === "percentile1y" ? percentile(row.percentile1y)
|
|
247
256
|
: ["value", "change1d", "change1dPercent"].includes(column.id)
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
createWorldIndexColumns,
|
|
24
24
|
renderWorldIndexCell,
|
|
25
25
|
usesSessionText,
|
|
26
|
+
worldIndexRowNote,
|
|
26
27
|
type WorldIndexColumn,
|
|
27
28
|
} from "./table";
|
|
28
29
|
|
|
@@ -139,6 +140,7 @@ function WorldIndicesPane({ focused, width, height }: PaneProps) {
|
|
|
139
140
|
onVisibleRangeChange={setVisibleRange}
|
|
140
141
|
renderSectionHeader={renderRegionHeader}
|
|
141
142
|
renderCell={renderCell}
|
|
143
|
+
rowNote={(row) => worldIndexRowNote(row, quotes)}
|
|
142
144
|
selectedTextOverridesCellColor
|
|
143
145
|
emptyStateTitle="No market data provider connected."
|
|
144
146
|
/>
|
|
@@ -72,6 +72,18 @@ function isUnavailableInFeed(state: BoardQuoteState | undefined): boolean {
|
|
|
72
72
|
return !!state && !state.quote && !state.loading && isFeedGap(state.error);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
/** Why an index's quote failed to load (a timeout, an outage), not a gap in the feed; null while it has one or is loading. */
|
|
76
|
+
function quoteFailure(state: BoardQuoteState | undefined): string | null {
|
|
77
|
+
return state && !state.quote && !state.loading && state.error && !isFeedGap(state.error) ? state.error : null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** The selected index's failure in full, under the table: its row says `no quote` (WorldIndicesPane `rowNote`). */
|
|
81
|
+
export function worldIndexRowNote(row: WorldIndexTableRow, quotes: BoardQuoteMap): string | null {
|
|
82
|
+
if (row.type !== "row") return null;
|
|
83
|
+
const failure = quoteFailure(quotes.get(row.entry.symbol));
|
|
84
|
+
return failure ? `${row.entry.shortName}: ${failure}` : null;
|
|
85
|
+
}
|
|
86
|
+
|
|
75
87
|
export function renderWorldIndexCell(
|
|
76
88
|
row: WorldIndexTableRow,
|
|
77
89
|
column: WorldIndexColumn,
|
|
@@ -83,6 +95,7 @@ export function renderWorldIndexCell(
|
|
|
83
95
|
const { entry } = row;
|
|
84
96
|
// The figures are blank and the name cell says why, ahead of the name so a narrow pane clips the name, not the reason.
|
|
85
97
|
const unavailable = isUnavailableInFeed(quotes.get(entry.symbol));
|
|
98
|
+
const failed = !!quoteFailure(quotes.get(entry.symbol));
|
|
86
99
|
switch (column.id) {
|
|
87
100
|
case "symbol":
|
|
88
101
|
return {
|
|
@@ -93,6 +106,8 @@ export function renderWorldIndexCell(
|
|
|
93
106
|
case "name":
|
|
94
107
|
return unavailable
|
|
95
108
|
? { text: `${NOT_IN_FEED} · ${entry.name}`, color: colors.textDim }
|
|
109
|
+
// A quote that failed to load says so in a few words; its reason is under the table when selected.
|
|
110
|
+
: failed ? { text: `no quote · ${entry.name}`, color: colors.warning }
|
|
96
111
|
: { text: entry.name };
|
|
97
112
|
default:
|
|
98
113
|
if (unavailable) return { text: "" };
|
|
@@ -7,7 +7,8 @@ import { useRemoteUiNode } from "../../../remote/semantic-tree";
|
|
|
7
7
|
import { isRecord } from "../../../utils/guards";
|
|
8
8
|
import type { GeoLayerState } from "./feed";
|
|
9
9
|
import { WORLD_VENUE_MAP_PANE_ID } from "./ids";
|
|
10
|
-
import { parseLayerTokens } from "./layers";
|
|
10
|
+
import { parseLayerTokens, parseMapPreset } from "./layers";
|
|
11
|
+
import { peekGeoCatalog } from "../../../api-client/geo";
|
|
11
12
|
|
|
12
13
|
interface WorldMapEvidenceLayer {
|
|
13
14
|
id: string;
|
|
@@ -51,7 +52,7 @@ export function useWorldMapEvidence(tokens: readonly string[], states: readonly
|
|
|
51
52
|
|
|
52
53
|
function requestedTokens(request: Parameters<PaneScreenshotEvidenceHook["mismatches"]>[1]): string[] {
|
|
53
54
|
const fromOption = parseLayerTokens(request.resolved.options.layer);
|
|
54
|
-
return fromOption.length ? fromOption :
|
|
55
|
+
return fromOption.length ? fromOption : parseMapPreset(request.resolved.createOptions?.arg, peekGeoCatalog()?.layers)?.layers ?? [];
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
export const worldMapScreenshotEvidence: PaneScreenshotEvidenceHook<WorldMapEvidence> = {
|