@gloom-sh/terminal 0.20.20 → 0.20.22
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 +6 -3
- package/patches/electrobun-devkit@2.0.5.patch +169 -3
- package/src/api-client/buybacks.ts +108 -0
- package/src/api-client/data.ts +214 -2
- package/src/api-client/dilution.ts +183 -0
- package/src/api-client/earnings.ts +2 -2
- package/src/api-client/equity-screener.ts +24 -0
- package/src/api-client/exchange-announcements.ts +16 -5
- package/src/api-client/exchange-short-balances.ts +24 -0
- package/src/api-client/futures-curve.ts +5 -0
- package/src/api-client/hk-cbbc.ts +134 -0
- package/src/api-client/hk-ccass.ts +233 -0
- package/src/api-client/index.ts +55 -3
- package/src/api-client/jpx-short-positions.ts +24 -0
- package/src/api-client/market-discovery.ts +42 -6
- package/src/api-client/members.ts +7 -0
- package/src/api-client/ownership-disclosures.ts +35 -0
- package/src/api-client/paths.ts +5 -2
- package/src/api-client/perps.ts +20 -0
- package/src/api-client/request.ts +92 -17
- package/src/api-client/revenue-breakdown.ts +6 -2
- package/src/api-client/sfc-short-positions.ts +19 -0
- package/src/api-client/supply-chain.ts +22 -0
- package/src/api-client/taiwan-revenue.ts +134 -0
- package/src/api-client/types/filings-and-calls.ts +2 -0
- package/src/api-client/types/jobs.ts +1 -0
- package/src/api-client/types/world-venues.ts +1 -0
- package/src/app/language-observer.tsx +6 -1
- package/src/app/pane-runtime/plugin-bindings.ts +15 -8
- package/src/app/pro-welcome/model.ts +15 -11
- package/src/app/pro-welcome/row.tsx +3 -3
- package/src/app/pro-welcome/use-pro-welcome.ts +2 -2
- package/src/app/runtime/plugin-bindings.ts +20 -2
- package/src/app/runtime/startup.ts +3 -2
- package/src/app.tsx +3 -2
- package/src/architecture/core-builtin-allowlist.json +2 -2
- package/src/architecture/dom-text-cuts-allowlist.json +2 -2
- package/src/architecture/floating-promise-allowlist.json +2 -2
- package/src/architecture/pane-tabs-allowlist.json +3 -0
- package/src/brokers/account-cache.ts +2 -1
- package/src/brokers/account-choice.ts +121 -0
- package/src/brokers/broker-portfolio-sync.ts +30 -5
- package/src/brokers/profile-form.ts +3 -0
- package/src/brokers/signed-in/adapter.ts +16 -5
- package/src/brokers/sync-broker-instance.ts +27 -3
- package/src/capabilities/asset-data-inputs.ts +13 -0
- package/src/capabilities/factories.ts +12 -3
- package/src/capabilities/registry.ts +1 -0
- package/src/capabilities/types.ts +1 -0
- package/src/cli/commands/market.ts +199 -103
- package/src/cli/commands/news-search.ts +12 -0
- package/src/cli/commands/options-chain.ts +11 -5
- package/src/cli/commands/options-leaps.ts +55 -30
- package/src/cli/commands/overview.ts +24 -24
- package/src/cli/commands/search.ts +2 -1
- package/src/cli/commands/ticker.ts +30 -16
- package/src/cli/csv-export.ts +9 -5
- package/src/cli/desktop-pane-shot-browser.ts +143 -53
- package/src/cli/desktop-pane-shot.ts +61 -67
- package/src/cli/export-source.ts +40 -2
- package/src/cli/glossary.ts +3 -2
- package/src/cli/helpers.ts +2 -1
- package/src/cli/history-demergers.ts +171 -17
- package/src/cli/history-rows.ts +47 -5
- package/src/cli/known-gaps.ts +21 -7
- package/src/cli/listing-arg.ts +22 -11
- package/src/cli/pane-functions/capabilities.ts +4 -9
- package/src/cli/pane-functions/catalog-snapshot.json +48 -44
- package/src/cli/pane-functions/catalog.ts +7 -20
- package/src/cli/pane-functions/data.ts +8 -4
- package/src/cli/pane-functions/dom.ts +8 -5
- package/src/cli/pane-functions/financial-ratio-shot.ts +20 -5
- package/src/cli/pane-functions/freshness.ts +57 -12
- package/src/cli/pane-functions/function-help.ts +36 -4
- package/src/cli/pane-functions/headless.ts +85 -27
- package/src/cli/pane-functions/index.ts +13 -5
- package/src/cli/pane-functions/market-session.ts +26 -1
- package/src/cli/pane-functions/report-notices.ts +10 -0
- package/src/cli/pane-functions/resolver.ts +79 -4
- package/src/cli/pane-functions/screenshot-assessment.ts +26 -10
- package/src/cli/pane-functions/screenshot-bridge.ts +5 -1
- package/src/cli/pane-functions/screenshot-data-evidence.ts +12 -5
- package/src/cli/pane-functions/screenshot-payload.ts +55 -6
- package/src/cli/pane-functions/screenshot-render.ts +22 -7
- package/src/cli/pane-functions/ticker-question.ts +52 -47
- package/src/cli/perpetual-contract.ts +14 -1
- package/src/cli/rendered-table-rows.ts +75 -0
- package/src/cli/report-tables.ts +18 -3
- package/src/cli/result.ts +14 -2
- package/src/cli/visible-key-values.ts +3 -2
- package/src/components/chart/composite/format.ts +14 -1
- package/src/components/chart/composite/panel-surface/panel-cursor.tsx +37 -14
- package/src/components/chart/composite/panel-surface.tsx +1 -0
- package/src/components/chart/composite/text-renderer.ts +104 -44
- package/src/components/chart/curve/model.ts +4 -1
- package/src/components/chart-table/layout.ts +8 -4
- package/src/components/command-bar/list/model.ts +2 -0
- package/src/components/command-bar/pane-templates/items.ts +5 -25
- package/src/components/command-bar/panel/index.tsx +7 -4
- package/src/components/command-bar/routes/root/provider-search.ts +4 -4
- package/src/components/command-bar/routes/root/results.ts +6 -2
- package/src/components/command-bar/routes/root/start-here.ts +1 -1
- package/src/components/command-bar/routes/ticker-search/results.ts +21 -1
- package/src/components/command-bar/routes/ticker-search/route.ts +3 -3
- package/src/components/command-bar/routes/ticker-search/title.ts +23 -0
- package/src/components/command-bar/routing/list-state.ts +17 -5
- package/src/components/command-bar/selection-runtime.ts +3 -2
- package/src/components/command-bar/surface/index.tsx +2 -0
- package/src/components/command-bar/workflow/alert.ts +6 -4
- package/src/components/command-bar/workflow/collection-actions.ts +2 -1
- package/src/components/data-table/export.ts +3 -1
- package/src/components/data-table/sections.ts +12 -1
- package/src/components/data-table/view.tsx +50 -8
- package/src/components/feed-data-table/stack-view.tsx +3 -0
- package/src/components/index.ts +3 -3
- package/src/components/layout/floating-pane.tsx +5 -2
- package/src/components/layout/pane/footer/index.tsx +1 -0
- package/src/components/layout/pane/footer/model.ts +20 -7
- package/src/components/layout/pane/header.tsx +21 -2
- package/src/components/layout/pane/index.tsx +6 -2
- package/src/components/layout/pane/link-note.ts +12 -0
- package/src/components/layout/pane/title.ts +12 -5
- package/src/components/market-board/index.tsx +8 -11
- package/src/components/price-selector-dialog.tsx +8 -4
- package/src/components/reader/reader-text.tsx +25 -2
- package/src/components/ticker/badge/list.tsx +4 -3
- package/src/components/ticker/list-table-view.tsx +16 -1
- package/src/components/ui/data-table/column-fit.ts +129 -0
- package/src/components/ui/data-table/display-columns.ts +28 -9
- package/src/components/ui/data-table/index.tsx +57 -15
- package/src/components/ui/data-table/opentui/index.tsx +5 -0
- package/src/components/ui/data-table/types.ts +96 -5
- package/src/components/ui/data-table/visible-range.ts +9 -1
- package/src/components/ui/day-cell.ts +30 -0
- package/src/components/ui/index.ts +3 -1
- package/src/components/ui/prose.tsx +3 -1
- package/src/components/ui/query-bar.tsx +20 -14
- package/src/components/ui/table-layout.ts +188 -6
- package/src/core/state/app/layout.ts +7 -2
- package/src/core/state/app/state.ts +6 -2
- package/src/data/cached-query.ts +20 -4
- package/src/data/config/store/legacy-tabs.ts +51 -0
- package/src/data/config/store/node.ts +2 -2
- package/src/data/config/store/normalize.ts +11 -5
- package/src/data/config/store/shared-file.ts +8 -7
- package/src/data/config/store/shared-layout.ts +146 -0
- package/src/data/news-pane-snapshots.ts +2 -1
- package/src/data/plugin-cache.ts +5 -1
- package/src/data/saved-copies.ts +68 -2
- package/src/data/sqlite/access.ts +76 -11
- package/src/data/sqlite/checkpointer.ts +73 -10
- package/src/data/sqlite/database.ts +14 -1
- package/src/data/sqlite/retry.ts +1 -1
- package/src/docs/load.ts +5 -2
- package/src/docs/snapshot.json +1665 -4362
- package/src/docs/topics.ts +11 -9
- package/src/i18n/es.ts +109 -0
- package/src/i18n/index.ts +74 -4
- package/src/i18n/ja.ts +109 -0
- package/src/i18n/ko.ts +109 -0
- package/src/i18n/react.ts +10 -2
- package/src/i18n/zh-cn.ts +109 -0
- package/src/i18n/zh-tw.ts +109 -0
- package/src/layout/pane-manager/dock-normalization.ts +61 -0
- package/src/market-data/ah-pair.ts +7 -2
- package/src/market-data/coordinator/index.ts +25 -5
- package/src/market-data/depositary-pair.ts +27 -10
- package/src/market-data/fund-actions.ts +21 -0
- package/src/market-data/futures-roll-returns.ts +54 -7
- package/src/market-data/fx-closes.ts +14 -0
- package/src/market-data/market/freshness.ts +37 -33
- package/src/market-data/market/futures-product-hours.ts +113 -0
- package/src/market-data/market/futures-week.ts +2 -0
- package/src/market-data/market/globex-day.ts +9 -2
- package/src/market-data/market/split-price-basis.ts +55 -0
- package/src/market-data/market/status.ts +30 -25
- package/src/market-data/market/venue-session.ts +18 -0
- package/src/market-data/options-alternatives.ts +49 -7
- package/src/market-data/perpetual-open-interest.ts +41 -0
- package/src/market-data/price-adjustments.ts +115 -0
- package/src/market-data/quotes/balance-sheet-rate.ts +6 -2
- package/src/market-data/quotes/contributions.ts +4 -2
- package/src/market-data/quotes/day-range.ts +24 -9
- package/src/market-data/quotes/export-identity.ts +11 -3
- package/src/market-data/quotes/freshness.ts +7 -5
- package/src/market-data/quotes/regular-session-valuation.ts +6 -0
- package/src/market-data/quotes/resolution.ts +20 -24
- package/src/market-data/quotes/tick-range.ts +22 -1
- package/src/market-data/quotes/time.ts +161 -7
- package/src/market-data/split-terms.ts +3 -2
- package/src/news/aggregator.ts +1 -0
- package/src/news/news-model.ts +12 -2
- package/src/news/query-presets.ts +6 -4
- package/src/news/types.ts +15 -0
- package/src/plugins/builtin/alerts/alert-engine.ts +2 -0
- package/src/plugins/builtin/alerts/cli-forms.ts +6 -2
- package/src/plugins/builtin/alerts/cli-move.ts +5 -2
- package/src/plugins/builtin/alerts/cli.ts +67 -30
- package/src/plugins/builtin/alerts/command.ts +51 -3
- package/src/plugins/builtin/alerts/event-rows.ts +1 -1
- package/src/plugins/builtin/alerts/events-pane.tsx +2 -1
- package/src/plugins/builtin/alerts/format.ts +87 -16
- package/src/plugins/builtin/alerts/headless.ts +29 -10
- package/src/plugins/builtin/alerts/history-pane.tsx +74 -33
- package/src/plugins/builtin/alerts/history-rows.ts +24 -1
- package/src/plugins/builtin/alerts/index.tsx +34 -35
- package/src/plugins/builtin/alerts/metric-data.ts +24 -6
- package/src/plugins/builtin/alerts/move-checks.ts +1 -0
- package/src/plugins/builtin/alerts/pane.tsx +24 -6
- package/src/plugins/builtin/alerts/pro-rules.ts +10 -4
- package/src/plugins/builtin/alerts/quotes.ts +10 -5
- package/src/plugins/builtin/alerts/research-builder.ts +6 -2
- package/src/plugins/builtin/alerts/research-rules.ts +12 -0
- package/src/plugins/builtin/alerts/session.ts +28 -0
- package/src/plugins/builtin/alerts/types.ts +2 -0
- package/src/plugins/builtin/analytics/pane-model.ts +2 -1
- package/src/plugins/builtin/analytics/risk-model.ts +2 -2
- package/src/plugins/builtin/attention/headless.ts +2 -2
- package/src/plugins/builtin/attention/model.ts +7 -2
- package/src/plugins/builtin/attention/pane.tsx +2 -1
- package/src/plugins/builtin/awards/detail.tsx +5 -4
- package/src/plugins/builtin/awards/headless.ts +14 -5
- package/src/plugins/builtin/awards/model.ts +36 -1
- package/src/plugins/builtin/awards/pane.tsx +29 -9
- package/src/plugins/builtin/backtest/pane.tsx +4 -2
- package/src/plugins/builtin/bond-calculator/pane.tsx +2 -1
- package/src/plugins/builtin/broker-manager/detail.tsx +67 -4
- package/src/plugins/builtin/broker-manager/index.tsx +35 -4
- package/src/plugins/builtin/broker-manager/keyboard.ts +10 -0
- package/src/plugins/builtin/broker-manager/pane-actions.tsx +35 -2
- package/src/plugins/builtin/broker-trading/orders.tsx +10 -3
- package/src/plugins/builtin/broker-trading/ticket.tsx +14 -5
- package/src/plugins/builtin/buildout/detail/company.tsx +0 -1
- package/src/plugins/builtin/buildout/detail/ui.tsx +7 -5
- package/src/plugins/builtin/buildout/format.ts +3 -1
- package/src/plugins/builtin/buildout/model/normalizers.ts +0 -1
- package/src/plugins/builtin/buildout/model/types.ts +0 -1
- package/src/plugins/builtin/buildout/pane/index.tsx +9 -0
- package/src/plugins/builtin/buildout/pane/status.tsx +11 -0
- package/src/plugins/builtin/buybacks/client.ts +48 -0
- package/src/plugins/builtin/buybacks/index.tsx +22 -0
- package/src/plugins/builtin/buybacks/model.ts +151 -0
- package/src/plugins/builtin/buybacks/pane.tsx +140 -0
- package/src/plugins/builtin/buybacks/series.ts +36 -0
- package/src/plugins/builtin/catalysts/detail.tsx +14 -8
- package/src/plugins/builtin/catalysts/evidence.ts +11 -3
- package/src/plugins/builtin/catalysts/headless.ts +52 -9
- package/src/plugins/builtin/catalysts/kinds.ts +413 -0
- package/src/plugins/builtin/catalysts/model.ts +61 -18
- package/src/plugins/builtin/catalysts/pane.tsx +85 -19
- package/src/plugins/builtin/cds/client.ts +9 -2
- package/src/plugins/builtin/cds/headless.ts +25 -10
- package/src/plugins/builtin/cds/model.ts +37 -12
- package/src/plugins/builtin/cds/pane.tsx +18 -10
- package/src/plugins/builtin/chart-composer/chart-spec-edit.ts +68 -7
- package/src/plugins/builtin/chart-composer/chart-title.ts +114 -0
- package/src/plugins/builtin/chart-composer/cli-options.ts +1 -1
- package/src/plugins/builtin/chart-composer/headless.ts +27 -7
- package/src/plugins/builtin/chart-composer/index.tsx +2 -68
- package/src/plugins/builtin/chart-composer/leverage-overlay.ts +2 -4
- package/src/plugins/builtin/chart-composer/pane.tsx +13 -4
- package/src/plugins/builtin/chart-composer/presets.ts +1 -1
- package/src/plugins/builtin/chart-composer/session-history.ts +14 -2
- package/src/plugins/builtin/chat/controller/draft-sync.ts +13 -7
- package/src/plugins/builtin/chat/controller/index.ts +5 -3
- package/src/plugins/builtin/chat/controller/session-runtime.ts +18 -8
- package/src/plugins/builtin/chat/controller/state.ts +4 -0
- package/src/plugins/builtin/chat/index.tsx +1 -1
- package/src/plugins/builtin/chat/pane-requests.ts +8 -4
- package/src/plugins/builtin/clinical-trials/model.ts +2 -2
- package/src/plugins/builtin/clinical-trials/pane.tsx +3 -3
- package/src/plugins/builtin/cloud/askg/pane.tsx +60 -50
- package/src/plugins/builtin/cloud/auth-actions.tsx +6 -3
- package/src/plugins/builtin/cloud/mcp-connect/dialog.tsx +4 -1
- package/src/plugins/builtin/cloud/thesis/ticker-tab.tsx +2 -1
- package/src/plugins/builtin/comment-letters/pane.tsx +4 -2
- package/src/plugins/builtin/commodity-balances/headless.ts +2 -1
- package/src/plugins/builtin/company-attention/building-model.ts +3 -4
- package/src/plugins/builtin/company-attention/building.tsx +2 -0
- package/src/plugins/builtin/company-attention/headless.ts +4 -3
- package/src/plugins/builtin/company-attention/model.ts +2 -0
- package/src/plugins/builtin/company-attention/moves-model.ts +2 -1
- package/src/plugins/builtin/company-attention/moves.tsx +2 -0
- package/src/plugins/builtin/company-attention/pane.tsx +17 -3
- package/src/plugins/builtin/company-attention/signals-model.ts +3 -4
- package/src/plugins/builtin/company-attention/signals.tsx +5 -0
- package/src/plugins/builtin/company-kpis/headless.ts +27 -11
- package/src/plugins/builtin/company-kpis/model.ts +47 -7
- package/src/plugins/builtin/company-kpis/pane.tsx +36 -19
- package/src/plugins/builtin/company-kpis/taiwan-monthly-model.ts +99 -0
- package/src/plugins/builtin/company-kpis/taiwan-monthly-view.tsx +327 -0
- package/src/plugins/builtin/composite/ownership-browser.ts +28 -0
- package/src/plugins/builtin/composite/ownership.ts +5 -1
- package/src/plugins/builtin/congress-trades/detail.tsx +44 -8
- package/src/plugins/builtin/congress-trades/headless.ts +15 -11
- package/src/plugins/builtin/congress-trades/model.ts +104 -11
- package/src/plugins/builtin/congress-trades/pane.tsx +11 -6
- package/src/plugins/builtin/congress-trades/table.tsx +17 -10
- package/src/plugins/builtin/congress-trades/use-feed.ts +13 -2
- package/src/plugins/builtin/correlation/headless.ts +5 -5
- package/src/plugins/builtin/correlation/history.ts +1 -0
- package/src/plugins/builtin/correlation/index.tsx +7 -5
- package/src/plugins/builtin/correlation/matrix/selection.ts +21 -3
- package/src/plugins/builtin/correlation/relationship/model.ts +5 -0
- package/src/plugins/builtin/correlation/relationship/pane.tsx +14 -10
- package/src/plugins/builtin/correlation/relationship/view-model.ts +4 -21
- package/src/plugins/builtin/cot/headless.ts +1 -1
- package/src/plugins/builtin/cot/pane.tsx +7 -2
- package/src/plugins/builtin/cpi/headless.ts +2 -1
- package/src/plugins/builtin/credit-conditions/headless.ts +2 -1
- package/src/plugins/builtin/credit-documents/detail.tsx +2 -1
- package/src/plugins/builtin/credit-documents/export.ts +18 -12
- package/src/plugins/builtin/credit-documents/headless.ts +1 -1
- package/src/plugins/builtin/credit-documents/model.ts +106 -25
- package/src/plugins/builtin/credit-documents/pane.tsx +9 -5
- package/src/plugins/builtin/crypto-board/defi-view.tsx +2 -1
- package/src/plugins/builtin/crypto-board/defi.ts +5 -4
- package/src/plugins/builtin/crypto-board/headless.ts +7 -2
- package/src/plugins/builtin/crypto-board/model.ts +6 -4
- package/src/plugins/builtin/crypto-board/pane.tsx +2 -1
- package/src/plugins/builtin/crypto-board/supply.ts +4 -3
- package/src/plugins/builtin/crypto-etf-flows/headless.ts +15 -8
- package/src/plugins/builtin/crypto-etf-flows/pane.tsx +6 -5
- package/src/plugins/builtin/debt-maturities/headless.ts +56 -38
- package/src/plugins/builtin/debt-maturities/model.ts +2 -1
- package/src/plugins/builtin/debt-maturities/pane.tsx +24 -22
- package/src/plugins/builtin/dilution/index.tsx +74 -0
- package/src/plugins/builtin/dilution/model.ts +159 -0
- package/src/plugins/builtin/dilution/pane.tsx +592 -0
- package/src/plugins/builtin/dividend-yield/client.ts +81 -10
- package/src/plugins/builtin/dividend-yield/headless.ts +44 -24
- package/src/plugins/builtin/dividend-yield/index.tsx +2 -1
- package/src/plugins/builtin/dividend-yield/model.ts +9 -6
- package/src/plugins/builtin/dividend-yield/pane.tsx +28 -15
- package/src/plugins/builtin/dividend-yield/ranking-view.tsx +6 -2
- package/src/plugins/builtin/dividend-yield/ranking.ts +22 -8
- package/src/plugins/builtin/dividend-yield/reference-price.ts +3 -0
- package/src/plugins/builtin/dividend-yield/types.ts +12 -0
- package/src/plugins/builtin/dividend-yield/view.ts +61 -12
- package/src/plugins/builtin/docs/index.tsx +1 -1
- package/src/plugins/builtin/docs/pane.tsx +7 -3
- package/src/plugins/builtin/docs/use-docs.ts +2 -1
- package/src/plugins/builtin/doe/headless.ts +1 -1
- package/src/plugins/builtin/doe/pane.tsx +16 -7
- package/src/plugins/builtin/earnings/board-model.ts +19 -6
- package/src/plugins/builtin/earnings/board-table.ts +64 -48
- package/src/plugins/builtin/earnings/board.tsx +93 -51
- package/src/plugins/builtin/earnings/headless.ts +71 -12
- package/src/plugins/builtin/earnings/history-model.ts +28 -15
- package/src/plugins/builtin/earnings/history.tsx +1 -1
- package/src/plugins/builtin/earnings-calls/calendar.tsx +23 -10
- package/src/plugins/builtin/earnings-calls/data.ts +8 -5
- package/src/plugins/builtin/earnings-calls/format.ts +34 -0
- package/src/plugins/builtin/earnings-calls/headless.ts +5 -4
- package/src/plugins/builtin/earnings-calls/pane.tsx +22 -17
- package/src/plugins/builtin/earnings-calls/transcript-view.tsx +14 -12
- package/src/plugins/builtin/earnings-ripple/headless.ts +1 -1
- package/src/plugins/builtin/earnings-ripple/pane.tsx +4 -3
- package/src/plugins/builtin/econ/calendar-model.ts +73 -4
- package/src/plugins/builtin/econ/index.tsx +32 -36
- package/src/plugins/builtin/econ-statistics/detail.tsx +2 -2
- package/src/plugins/builtin/econ-statistics/headless.ts +10 -5
- package/src/plugins/builtin/econ-statistics/pane.tsx +6 -3
- package/src/plugins/builtin/econ-statistics/view.ts +15 -4
- package/src/plugins/builtin/equity-screener/client.ts +1 -1
- package/src/plugins/builtin/equity-screener/headless.ts +149 -31
- package/src/plugins/builtin/equity-screener/live.ts +23 -5
- package/src/plugins/builtin/equity-screener/model.ts +38 -14
- package/src/plugins/builtin/equity-screener/pane.tsx +5 -5
- package/src/plugins/builtin/estimate-revisions/headless.ts +23 -2
- package/src/plugins/builtin/estimate-revisions/model.ts +63 -13
- package/src/plugins/builtin/estimate-revisions/pane.tsx +228 -225
- package/src/plugins/builtin/estimate-revisions/sorting.ts +8 -16
- package/src/plugins/builtin/exposure/drivers.ts +5 -2
- package/src/plugins/builtin/exposure/headless.ts +7 -4
- package/src/plugins/builtin/exposure/holdings.ts +2 -2
- package/src/plugins/builtin/exposure/model.ts +2 -1
- package/src/plugins/builtin/exposure/pane.tsx +16 -7
- package/src/plugins/builtin/fear-greed/format.ts +7 -7
- package/src/plugins/builtin/fear-greed/pane.tsx +21 -7
- package/src/plugins/builtin/futures/index.tsx +29 -1
- package/src/plugins/builtin/futures/model.ts +93 -10
- package/src/plugins/builtin/futures/returns.ts +54 -1
- package/src/plugins/builtin/futures/table.tsx +14 -2
- package/src/plugins/builtin/futures/use-front-returns.ts +20 -3
- package/src/plugins/builtin/futures-curve/client.ts +1 -1
- package/src/plugins/builtin/futures-curve/headless.ts +21 -10
- package/src/plugins/builtin/futures-curve/model.ts +31 -9
- package/src/plugins/builtin/futures-curve/pane.tsx +26 -17
- package/src/plugins/builtin/fx-matrix/headless.ts +3 -2
- package/src/plugins/builtin/gpu/headless.ts +11 -5
- package/src/plugins/builtin/gpu/model.ts +1 -1
- package/src/plugins/builtin/help/function-index.ts +16 -8
- package/src/plugins/builtin/help/functions-table.tsx +6 -4
- package/src/plugins/builtin/help/shortcut-model.ts +7 -2
- package/src/plugins/builtin/holders/beneficial-model.ts +1 -1
- package/src/plugins/builtin/holders/beneficial-view.tsx +3 -2
- package/src/plugins/builtin/holders/ccass-market-pane.tsx +363 -0
- package/src/plugins/builtin/holders/ccass-view.tsx +323 -0
- package/src/plugins/builtin/holders/disclosures-view.tsx +63 -0
- package/src/plugins/builtin/holders/disclosures.ts +33 -0
- package/src/plugins/builtin/holders/headless.ts +25 -7
- package/src/plugins/builtin/holders/index.tsx +75 -1
- package/src/plugins/builtin/holders/pane.tsx +79 -14
- package/src/plugins/builtin/holders/report-rows.ts +2 -0
- package/src/plugins/builtin/holders/table-model.ts +14 -6
- package/src/plugins/builtin/holders/types.ts +2 -2
- package/src/plugins/builtin/insider/activity-chart.ts +141 -0
- package/src/plugins/builtin/insider/client.ts +118 -11
- package/src/plugins/builtin/insider/filing-stories.ts +36 -20
- package/src/plugins/builtin/insider/headless.ts +2 -1
- package/src/plugins/builtin/insider/index.tsx +74 -12
- package/src/plugins/builtin/insider/issuer.ts +5 -2
- package/src/plugins/builtin/insider/signals-cells.tsx +15 -8
- package/src/plugins/builtin/insider/signals.tsx +6 -5
- package/src/plugins/builtin/insider/table-model.ts +17 -17
- package/src/plugins/builtin/insider/table.tsx +18 -10
- package/src/plugins/builtin/ipo-calendar/headless.ts +55 -11
- package/src/plugins/builtin/ipo-calendar/listing-ipo.ts +31 -4
- package/src/plugins/builtin/ipo-calendar/model.ts +208 -47
- package/src/plugins/builtin/ipo-calendar/pane.tsx +87 -25
- package/src/plugins/builtin/iv-history/client.ts +17 -8
- package/src/plugins/builtin/iv-history/format.ts +23 -12
- package/src/plugins/builtin/iv-history/headless.ts +11 -5
- package/src/plugins/builtin/iv-history/model.ts +15 -13
- package/src/plugins/builtin/iv-history/pane.tsx +5 -2
- package/src/plugins/builtin/iv-history/screen-pane.tsx +46 -24
- package/src/plugins/builtin/jobs/headless.ts +4 -3
- package/src/plugins/builtin/jobs/pane.tsx +6 -5
- package/src/plugins/builtin/jodi/headless.ts +15 -2
- package/src/plugins/builtin/jodi/model.ts +46 -5
- package/src/plugins/builtin/jodi/pane.tsx +17 -13
- package/src/plugins/builtin/kelly-sizer/headless.ts +3 -1
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -1
- package/src/plugins/builtin/macro-day/client.ts +2 -3
- package/src/plugins/builtin/macro-day/comparison.ts +58 -0
- package/src/plugins/builtin/macro-day/headless.ts +47 -3
- package/src/plugins/builtin/macro-day/index.tsx +32 -9
- package/src/plugins/builtin/macro-day/model.ts +1 -1
- package/src/plugins/builtin/macro-day/pane.tsx +109 -15
- package/src/plugins/builtin/market-halts/model.ts +10 -8
- package/src/plugins/builtin/market-halts/pane.tsx +1 -1
- package/src/plugins/builtin/market-heatmap/data.ts +17 -2
- package/src/plugins/builtin/market-heatmap/headless.ts +56 -6
- package/src/plugins/builtin/market-heatmap/index.tsx +57 -3
- package/src/plugins/builtin/market-heatmap/model.ts +27 -1
- package/src/plugins/builtin/market-movers/footer.ts +29 -3
- package/src/plugins/builtin/market-movers/headless.ts +12 -5
- package/src/plugins/builtin/market-movers/index.tsx +3 -3
- package/src/plugins/builtin/market-movers/model.ts +7 -1
- package/src/plugins/builtin/market-movers/session-body.tsx +6 -3
- package/src/plugins/builtin/market-movers/session-table.ts +1 -0
- package/src/plugins/builtin/market-movers/session.ts +1 -1
- package/src/plugins/builtin/market-movers/table.ts +1 -1
- package/src/plugins/builtin/market-valuation/detail.tsx +3 -3
- package/src/plugins/builtin/market-valuation/headless.ts +6 -6
- package/src/plugins/builtin/market-valuation/pane.tsx +2 -3
- package/src/plugins/builtin/market-valuation/view.ts +6 -8
- package/src/plugins/builtin/members/client.ts +9 -2
- package/src/plugins/builtin/members/headless.ts +20 -14
- package/src/plugins/builtin/members/model.ts +64 -18
- package/src/plugins/builtin/members/pane.tsx +21 -15
- package/src/plugins/builtin/mna/distress/detail.tsx +7 -6
- package/src/plugins/builtin/mna/distress/model.ts +7 -7
- package/src/plugins/builtin/mna/distress/pane.tsx +8 -7
- package/src/plugins/builtin/mna/headless.ts +40 -7
- package/src/plugins/builtin/mna/model.ts +66 -6
- package/src/plugins/builtin/mna/pane.tsx +118 -60
- package/src/plugins/builtin/money-markets/headless.ts +1 -1
- package/src/plugins/builtin/news/headless.ts +4 -0
- package/src/plugins/builtin/news/index.tsx +3 -1
- package/src/plugins/builtin/news/wire/industry-pane.tsx +3 -1
- package/src/plugins/builtin/news/wire/news/preset-pane.tsx +1 -1
- package/src/plugins/builtin/news/wire/news/table.tsx +15 -4
- package/src/plugins/builtin/news/wire/persisted-articles.ts +8 -4
- package/src/plugins/builtin/notes/headless.ts +7 -0
- package/src/plugins/builtin/notes/index.tsx +3 -2
- package/src/plugins/builtin/notes/quick-notes-pane.tsx +18 -2
- package/src/plugins/builtin/openfda/model.ts +1 -1
- package/src/plugins/builtin/openfda/pane.tsx +37 -9
- package/src/plugins/builtin/options/analytics.ts +30 -6
- package/src/plugins/builtin/options/calc-seed.ts +38 -3
- package/src/plugins/builtin/options/footer.ts +18 -1
- package/src/plugins/builtin/options/live-quotes.ts +21 -6
- package/src/plugins/builtin/options/open-interest-as-of.ts +5 -0
- package/src/plugins/builtin/options/quote-context.tsx +21 -8
- package/src/plugins/builtin/options/table.ts +17 -2
- package/src/plugins/builtin/options/view.tsx +104 -52
- package/src/plugins/builtin/options-calculator/model.ts +65 -3
- package/src/plugins/builtin/options-calculator/pane.tsx +11 -3
- package/src/plugins/builtin/options-calculator/valuation.ts +33 -0
- package/src/plugins/builtin/options-positioning/cbbc-model.ts +160 -0
- package/src/plugins/builtin/options-positioning/cbbc-view.tsx +453 -0
- package/src/plugins/builtin/options-positioning/headless.ts +4 -4
- package/src/plugins/builtin/options-positioning/index.tsx +22 -1
- package/src/plugins/builtin/options-positioning/pane.tsx +23 -4
- package/src/plugins/builtin/options-scenario/charts.tsx +2 -1
- package/src/plugins/builtin/options-scenario/client.ts +20 -4
- package/src/plugins/builtin/options-scenario/csp-screen-headless.ts +5 -5
- package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +11 -14
- package/src/plugins/builtin/options-scenario/csp-screen.ts +9 -1
- package/src/plugins/builtin/options-scenario/headless.ts +4 -4
- package/src/plugins/builtin/options-scenario/index.tsx +1 -1
- package/src/plugins/builtin/options-scenario/model.ts +7 -0
- package/src/plugins/builtin/options-scenario/pane.tsx +24 -14
- package/src/plugins/builtin/pe-band/client.ts +5 -9
- package/src/plugins/builtin/pe-band/headless.ts +11 -13
- package/src/plugins/builtin/pe-band/model.ts +39 -60
- package/src/plugins/builtin/pe-band/pane.tsx +16 -16
- package/src/plugins/builtin/perps/cascade-tabs.tsx +2 -1
- package/src/plugins/builtin/perps/cascade.ts +4 -3
- package/src/plugins/builtin/perps/equity-row.tsx +3 -1
- package/src/plugins/builtin/perps/freshness.ts +16 -9
- package/src/plugins/builtin/perps/headless.ts +21 -11
- package/src/plugins/builtin/perps/markets-section.tsx +16 -10
- package/src/plugins/builtin/perps/model.ts +37 -5
- package/src/plugins/builtin/perps/pane.tsx +3 -2
- package/src/plugins/builtin/perps/status-line.ts +12 -3
- package/src/plugins/builtin/perps/venue-markets.ts +38 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +4 -3
- package/src/plugins/builtin/portfolio-list/cached-account.ts +3 -1
- package/src/plugins/builtin/portfolio-list/cell-version.ts +1 -1
- package/src/plugins/builtin/portfolio-list/cli/render.ts +46 -7
- package/src/plugins/builtin/portfolio-list/headless.ts +31 -8
- package/src/plugins/builtin/portfolio-list/settings.ts +4 -0
- package/src/plugins/builtin/portfolio-list/table.tsx +26 -3
- package/src/plugins/builtin/power/client.ts +2 -2
- package/src/plugins/builtin/power/detail.tsx +11 -8
- package/src/plugins/builtin/power/gas-model.ts +2 -1
- package/src/plugins/builtin/power/gas.tsx +3 -2
- package/src/plugins/builtin/power/headless.ts +5 -2
- package/src/plugins/builtin/power/model.ts +19 -0
- package/src/plugins/builtin/power/pane.tsx +5 -4
- package/src/plugins/builtin/power/prices-headless.ts +4 -3
- package/src/plugins/builtin/power/prices.tsx +7 -6
- package/src/plugins/builtin/primary-dealers/headless.ts +1 -1
- package/src/plugins/builtin/primary-dealers/model.ts +2 -1
- package/src/plugins/builtin/rate-path/headless.ts +5 -2
- package/src/plugins/builtin/rate-path/pane.tsx +13 -10
- package/src/plugins/builtin/realized-vol/fx-proxy.ts +7 -8
- package/src/plugins/builtin/realized-vol/headless.ts +4 -5
- package/src/plugins/builtin/realized-vol/pane.tsx +5 -4
- package/src/plugins/builtin/relative-rotation/headless.ts +2 -1
- package/src/plugins/builtin/research/analyst-model.ts +1 -1
- package/src/plugins/builtin/research/analyst-pane.tsx +2 -1
- package/src/plugins/builtin/research/earnings-estimates-pane.tsx +262 -0
- package/src/plugins/builtin/research/event-charts.ts +322 -0
- package/src/plugins/builtin/research/event-data.ts +138 -0
- package/src/plugins/builtin/research/event-detail.tsx +442 -0
- package/src/plugins/builtin/research/event-model.ts +328 -31
- package/src/plugins/builtin/research/event-sources.ts +58 -8
- package/src/plugins/builtin/research/event-views.tsx +397 -0
- package/src/plugins/builtin/research/events-headless.ts +60 -4
- package/src/plugins/builtin/research/headless-schema.ts +2 -2
- package/src/plugins/builtin/research/headless.ts +84 -7
- package/src/plugins/builtin/research/index.tsx +19 -17
- package/src/plugins/builtin/research/relative-valuation-columns.ts +20 -8
- package/src/plugins/builtin/research/relative-valuation-headless.ts +8 -4
- package/src/plugins/builtin/research/relative-valuation-model.ts +23 -8
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +10 -0
- package/src/plugins/builtin/revenue-breakdown/client.ts +9 -4
- package/src/plugins/builtin/revenue-breakdown/headless.ts +1 -1
- package/src/plugins/builtin/revenue-breakdown/index.tsx +2 -1
- package/src/plugins/builtin/revenue-breakdown/model.ts +2 -0
- package/src/plugins/builtin/revenue-breakdown/pane.tsx +10 -0
- package/src/plugins/builtin/risk-factors/pane.tsx +14 -9
- package/src/plugins/builtin/scanner/feed.ts +7 -4
- package/src/plugins/builtin/scanner/flow-pane.tsx +8 -4
- package/src/plugins/builtin/scanner/headless.ts +59 -26
- package/src/plugins/builtin/scanner/hilo-pane.tsx +6 -3
- package/src/plugins/builtin/scanner/lock-note.ts +7 -10
- package/src/plugins/builtin/scanner/us-session.ts +9 -0
- package/src/plugins/builtin/seasonality/client.ts +46 -10
- package/src/plugins/builtin/seasonality/headless.ts +29 -11
- package/src/plugins/builtin/seasonality/model.ts +101 -24
- package/src/plugins/builtin/seasonality/pane.tsx +10 -6
- package/src/plugins/builtin/sec/exchange-filings.ts +44 -0
- package/src/plugins/builtin/sec/filing-content.ts +13 -0
- package/src/plugins/builtin/sec/fund-facts.ts +10 -8
- package/src/plugins/builtin/sec/headless.ts +60 -8
- package/src/plugins/builtin/sec/index.tsx +144 -71
- package/src/plugins/builtin/sec/model.ts +10 -4
- package/src/plugins/builtin/sec/row-summaries.ts +1 -0
- package/src/plugins/builtin/sectors/client.ts +27 -5
- package/src/plugins/builtin/sectors/headless.ts +2 -1
- package/src/plugins/builtin/sectors/index.tsx +22 -10
- package/src/plugins/builtin/series-inventory.ts +4 -0
- package/src/plugins/builtin/shared/beat-miss-chart.ts +66 -0
- package/src/plugins/builtin/shared/cloud-resource.ts +3 -3
- package/src/plugins/builtin/shared/day-entries.ts +41 -0
- package/src/plugins/builtin/shared/earnings-calendar.ts +80 -53
- package/src/plugins/builtin/shared/earnings-report.ts +53 -15
- package/src/plugins/builtin/shared/extended-print.ts +38 -0
- package/src/plugins/builtin/shared/history-span.ts +2 -1
- package/src/plugins/builtin/shared/locked-rows.tsx +1 -1
- package/src/plugins/builtin/shared/pro-feature-wall.tsx +1 -1
- package/src/plugins/builtin/shared/pro-lock-note.ts +8 -12
- package/src/plugins/builtin/shared/report-freshness.ts +7 -3
- package/src/plugins/builtin/shared/scanner-capture.ts +16 -3
- package/src/plugins/builtin/shared/ticker-company.ts +17 -8
- package/src/plugins/builtin/shared/ticker-request.ts +4 -2
- package/src/plugins/builtin/shared/use-quote-board.ts +11 -4
- package/src/plugins/builtin/shared/volatility/live-session.ts +6 -7
- package/src/plugins/builtin/shared/volatility/option-snapshot.ts +30 -0
- package/src/plugins/builtin/shared/volatility/quote-session.ts +49 -0
- package/src/plugins/builtin/short-interest/exchange-balances.ts +76 -0
- package/src/plugins/builtin/short-interest/exchange-positions-pane.tsx +55 -0
- package/src/plugins/builtin/short-interest/headless.ts +15 -2
- package/src/plugins/builtin/short-interest/index.tsx +7 -3
- package/src/plugins/builtin/short-interest/jpx.ts +38 -0
- package/src/plugins/builtin/short-interest/model.ts +3 -2
- package/src/plugins/builtin/short-interest/pane.tsx +4 -3
- package/src/plugins/builtin/short-interest/publications-model.ts +73 -2
- package/src/plugins/builtin/short-interest/publications-pane.tsx +16 -4
- package/src/plugins/builtin/short-interest/sfc.ts +40 -0
- package/src/plugins/builtin/short-interest/surface.tsx +16 -2
- package/src/plugins/builtin/short-volume/headless.ts +18 -3
- package/src/plugins/builtin/short-volume/model.ts +6 -1
- package/src/plugins/builtin/short-volume/pane.tsx +8 -7
- package/src/plugins/builtin/short-volume/sgx.ts +23 -0
- package/src/plugins/builtin/social-mentions/client.ts +7 -3
- package/src/plugins/builtin/social-mentions/outliers-model.ts +2 -1
- package/src/plugins/builtin/social-mentions/outliers.tsx +9 -2
- package/src/plugins/builtin/social-mentions/pane.tsx +10 -8
- package/src/plugins/builtin/supply-chain/client.ts +10 -2
- package/src/plugins/builtin/supply-chain/directories.ts +18 -0
- package/src/plugins/builtin/supply-chain/evidence.ts +12 -4
- package/src/plugins/builtin/supply-chain/headless.ts +20 -7
- package/src/plugins/builtin/supply-chain/pane.tsx +40 -11
- package/src/plugins/builtin/thirteenf/api.ts +323 -34
- package/src/plugins/builtin/thirteenf/data.ts +147 -40
- package/src/plugins/builtin/thirteenf/format.ts +4 -6
- package/src/plugins/builtin/thirteenf/headless.ts +75 -32
- package/src/plugins/builtin/thirteenf/model.ts +24 -11
- package/src/plugins/builtin/thirteenf/overlap-pane.tsx +16 -8
- package/src/plugins/builtin/thirteenf/pane.tsx +45 -22
- package/src/plugins/builtin/thirteenf/report-notes.ts +52 -2
- package/src/plugins/builtin/thirteenf/session-scope.ts +57 -0
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +27 -7
- package/src/plugins/builtin/thirteenf/signals.ts +22 -1
- package/src/plugins/builtin/thirteenf/split-history.ts +119 -0
- package/src/plugins/builtin/thirteenf/table.ts +6 -6
- package/src/plugins/builtin/thirteenf/types.ts +17 -1
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +4 -2
- package/src/plugins/builtin/ticker-detail/adr-pair/tab.tsx +11 -0
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +12 -8
- package/src/plugins/builtin/ticker-detail/data-panes/history-bars.ts +5 -4
- package/src/plugins/builtin/ticker-detail/data-panes/returns-model.ts +7 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +12 -5
- package/src/plugins/builtin/ticker-detail/financials/aggregation.ts +36 -5
- package/src/plugins/builtin/ticker-detail/financials/model.ts +179 -39
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +77 -14
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +69 -14
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +81 -37
- package/src/plugins/builtin/ticker-detail/headless.ts +65 -38
- package/src/plugins/builtin/ticker-detail/index.tsx +1 -1
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +80 -14
- package/src/plugins/builtin/ticker-detail/overview/model.ts +54 -25
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +28 -9
- package/src/plugins/builtin/ticker-detail/overview/types.ts +2 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +52 -23
- package/src/plugins/builtin/ticker-detail/pane.tsx +19 -10
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +41 -23
- package/src/plugins/builtin/ticker-detail/quote-monitor/rows.ts +30 -13
- package/src/plugins/builtin/ticker-detail/research-groups.ts +15 -2
- package/src/plugins/builtin/ticker-detail/research-tabs.ts +2 -1
- package/src/plugins/builtin/ticker-detail/settings.ts +9 -2
- package/src/plugins/builtin/time-sales/headless.ts +52 -16
- package/src/plugins/builtin/time-sales/model.ts +2 -2
- package/src/plugins/builtin/time-sales/window.ts +84 -10
- package/src/plugins/builtin/trace-bonds/pane.tsx +3 -2
- package/src/plugins/builtin/treasury-auctions/cache.ts +44 -19
- package/src/plugins/builtin/treasury-auctions/client.ts +9 -4
- package/src/plugins/builtin/vol-surface/charts.tsx +7 -3
- package/src/plugins/builtin/vol-surface/events.ts +20 -10
- package/src/plugins/builtin/vol-surface/evidence.ts +2 -2
- package/src/plugins/builtin/vol-surface/headless.ts +47 -29
- package/src/plugins/builtin/vol-surface/heat-grid.tsx +2 -1
- package/src/plugins/builtin/vol-surface/model.ts +34 -9
- package/src/plugins/builtin/vol-surface/pane.tsx +50 -74
- package/src/plugins/builtin/vol-surface/quote-coverage.ts +68 -0
- package/src/plugins/builtin/vol-surface/tables.ts +57 -6
- package/src/plugins/builtin/volatility/charts.tsx +7 -3
- package/src/plugins/builtin/volatility/headless.ts +5 -5
- package/src/plugins/builtin/volatility/pane.tsx +8 -5
- package/src/plugins/builtin/world-indices/footer.ts +1 -1
- package/src/plugins/builtin/world-indices/headless.ts +5 -3
- package/src/plugins/builtin/world-venue-map/chokepoint-report.ts +3 -1
- package/src/plugins/builtin/world-venue-map/headless.ts +42 -14
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +5 -3
- package/src/plugins/builtin/world-venue-map/pane.tsx +4 -3
- package/src/plugins/builtin/world-venue-map/venue-exceptions.ts +72 -0
- package/src/plugins/builtin/world-venue-map/venue-header.tsx +20 -11
- package/src/plugins/builtin/yield-curve/client.ts +3 -1
- package/src/plugins/builtin/yield-curve/headless.ts +4 -2
- package/src/plugins/builtin/yield-curve/index.tsx +4 -3
- package/src/plugins/catalog-browser.ts +3 -34
- package/src/plugins/duplicates.ts +60 -0
- package/src/plugins/loader.ts +12 -3
- package/src/plugins/marketplace/feed.ts +3 -2
- package/src/plugins/marketplace/model.ts +10 -1
- package/src/plugins/registry/contributions.ts +37 -10
- package/src/plugins/registry/index.ts +2 -1
- package/src/portfolio/column-values.ts +51 -5
- package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
- package/src/public/i18n.ts +3 -2
- package/src/react/async-resource.ts +8 -7
- package/src/renderers/browser/bundled-plugins.ts +2 -1
- package/src/renderers/dom/build-assets.ts +20 -0
- package/src/renderers/dom/css.d.ts +1 -0
- package/src/renderers/dom/data-table/index.tsx +96 -10
- package/src/renderers/dom/data-table/row.tsx +1 -1
- package/src/renderers/dom/es2023-array-methods.ts +57 -0
- package/src/renderers/dom/host/surface-fit.ts +64 -13
- package/src/renderers/dom/styles.css +6 -1
- package/src/renderers/electrobun/bun/desktop/backend.ts +12 -1
- package/src/renderers/electrobun/bun/external-plugins.ts +16 -6
- package/src/renderers/electrobun/shared/protocol.ts +2 -0
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +38 -8
- package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +15 -8
- package/src/renderers/electrobun/view/external-plugins.ts +1 -0
- package/src/renderers/electrobun/view/remote/asset-data-client.ts +3 -0
- package/src/series/types.ts +1 -0
- package/src/sources/gloomberb-cloud/batched-lookups.ts +12 -1
- package/src/sources/gloomberb-cloud/fred-attribution.ts +6 -5
- package/src/sources/gloomberb-cloud/index.ts +78 -8
- package/src/sources/gloomberb-cloud/news.ts +15 -2
- package/src/sources/gloomberb-cloud/normalizers.ts +10 -0
- package/src/sources/history-result.ts +2 -1
- package/src/sources/history-retention.ts +14 -2
- package/src/sources/listing-symbols.ts +1 -1
- package/src/sources/provider-router/cache.ts +32 -3
- package/src/sources/provider-router/cached-routes.ts +25 -0
- package/src/sources/provider-router/connection-health.ts +1 -0
- package/src/sources/provider-router/financials.ts +4 -4
- package/src/sources/provider-router/history.ts +2 -2
- package/src/sources/provider-router/index.ts +23 -1
- package/src/sources/provider-router/sec-filings-page.ts +25 -0
- package/src/sources/sec-edgar/content.ts +67 -36
- package/src/state/app/context/index.tsx +12 -4
- package/src/sync/broker-instances.ts +63 -11
- package/src/sync/config-merge.ts +1 -1
- package/src/sync/sanitize.ts +2 -0
- package/src/test-support/cloud-api.ts +34 -0
- package/src/test-support/strict-table-capture.tsx +83 -0
- package/src/tickers/listing-fate.ts +28 -0
- package/src/tickers/search/home-listing.ts +3 -0
- package/src/tickers/search/index-root-lead.ts +40 -0
- package/src/tickers/search/index.ts +23 -7
- package/src/tickers/terminal-codes.ts +7 -4
- package/src/time-series/alignment.ts +14 -4
- package/src/time-series/base-series.ts +20 -10
- package/src/time-series/chart-data.ts +2 -0
- package/src/time-series/chart-seed.ts +3 -1
- package/src/time-series/fundamentals/current-valuation.ts +22 -5
- package/src/time-series/fundamentals/historical-valuation.ts +2 -2
- package/src/time-series/fundamentals/history-link.ts +25 -0
- package/src/time-series/fundamentals/quarterly-ttm.ts +50 -5
- package/src/time-series/fundamentals/series.ts +15 -12
- package/src/time-series/history-acquisition.ts +2 -0
- package/src/time-series/market.ts +33 -5
- package/src/time-series/price-comparison.ts +42 -61
- package/src/time-series/resolve-context.ts +8 -0
- package/src/time-series/resolve.ts +67 -20
- package/src/time-series/spec.ts +2 -1
- package/src/time-series/studies/formula.ts +4 -2
- package/src/time-series/studies/indicators.ts +2 -0
- package/src/time-series/studies/pair.ts +4 -2
- package/src/time-series/studies/shared.ts +1 -0
- package/src/time-series/types.ts +3 -1
- package/src/time-series/use-chart-resolution.ts +34 -16
- package/src/time-series/valuation-currency.ts +40 -12
- package/src/types/config.ts +13 -61
- package/src/types/data-provider.ts +38 -1
- package/src/types/financials.ts +72 -6
- package/src/types/headless.ts +53 -0
- package/src/types/instrument.ts +1 -0
- package/src/types/plugin-context.ts +8 -1
- package/src/utils/crypto-pair.ts +26 -0
- package/src/utils/day-format.ts +104 -0
- package/src/utils/exchange-announcements.ts +36 -12
- package/src/utils/exchange-notation.generated.ts +58 -1
- package/src/utils/exchanges.ts +43 -1
- package/src/utils/financial-statements.ts +40 -46
- package/src/utils/format.ts +74 -12
- package/src/utils/forward-dividend.ts +2 -1
- package/src/utils/function-search.ts +38 -0
- package/src/utils/fuzzy-search.ts +10 -6
- package/src/utils/option-choice.ts +15 -0
- package/src/utils/price-history.ts +15 -1
- package/src/utils/reason-codes.ts +6 -3
- package/src/utils/trailing-dividend.ts +288 -28
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +0 -757
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { logFailure } from "../utils/log-failure";
|
|
2
|
-
import { afterSavedCopyFrame, readSavedCopy, writeSavedCopy, type SavedCopyKey } from "../data/pane-saved-copies";
|
|
2
|
+
import { afterSavedCopyFrame, deleteSavedCopy, readSavedCopy, writeSavedCopy, type SavedCopyKey } from "../data/pane-saved-copies";
|
|
3
3
|
import { reuseSavedData } from "../data/reuse-saved-data";
|
|
4
4
|
import { useSavedCopyFooter } from "../components/layout/pane/footer/registration";
|
|
5
5
|
import { useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
type ChartResolveSources,
|
|
11
11
|
} from "./resolve-context";
|
|
12
12
|
import { chartSeedResolution, seedChartResolutionResult } from "./chart-seed";
|
|
13
|
+
import { priceComparisonSeriesIds } from "./price-comparison";
|
|
13
14
|
import { reconcileChartTail } from "./tail-reconcile";
|
|
14
15
|
import type { ChartResolutionResult, ChartSpec } from "./types";
|
|
15
16
|
import {
|
|
@@ -87,6 +88,15 @@ function hasRenderableData(result: ChartResolutionResult): boolean {
|
|
|
87
88
|
return (result.bufferedSeries ?? result.series).some((series) => series.points.length > 0);
|
|
88
89
|
}
|
|
89
90
|
|
|
91
|
+
function withheldReturns(result: ChartResolutionResult) {
|
|
92
|
+
const comparison = result.priceComparison;
|
|
93
|
+
return comparison?.dropped?.filter(({ seriesId }) => comparison.legs?.[seriesId] !== undefined) ?? [];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function hasChartData(result: ChartResolutionResult): boolean {
|
|
97
|
+
return hasRenderableData(result) || withheldReturns(result).length > 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
90
100
|
function publicChartSpecKey(spec: ChartSpec, scope: string | null | undefined): string | null {
|
|
91
101
|
if (!scope || spec.series.length === 0) return null;
|
|
92
102
|
if (spec.series.some(({ source }) => source.kind === "capability" || (source.kind === "security"
|
|
@@ -100,11 +110,19 @@ function publicChartSpecKey(spec: ChartSpec, scope: string | null | undefined):
|
|
|
100
110
|
return JSON.stringify([scope, { ...spec, series }]);
|
|
101
111
|
}
|
|
102
112
|
|
|
103
|
-
function saveChartResolution(key: SavedCopyKey | null, result: ChartResolutionResult): void {
|
|
104
|
-
if (key
|
|
105
|
-
|
|
106
|
-
|
|
113
|
+
function saveChartResolution(key: SavedCopyKey | null, result: ChartResolutionResult, previous: ChartResolutionResult): void {
|
|
114
|
+
if (!key) return;
|
|
115
|
+
const withheld = withheldReturns(result);
|
|
116
|
+
if (result.savedAt != null || result.errors.length > 0) {
|
|
117
|
+
if (withheld.length) deleteSavedCopy(key);
|
|
118
|
+
return;
|
|
107
119
|
}
|
|
120
|
+
const { bufferedSeries: _buffer, ...visible } = result;
|
|
121
|
+
const hasPoints = hasRenderableData(visible);
|
|
122
|
+
if (!hasPoints && !withheld.length) return;
|
|
123
|
+
const previouslyWithheld = withheldReturns(previous);
|
|
124
|
+
const newlyWithheld = withheld.some(({ seriesId }) => !previouslyWithheld.some((entry) => entry.seriesId === seriesId));
|
|
125
|
+
writeSavedCopy(key, visible, Date.now(), !hasPoints || newlyWithheld ? 0 : TAIL_RECONCILE_MIN_SPACING_MS);
|
|
108
126
|
}
|
|
109
127
|
|
|
110
128
|
function seedWindowIsCurrent(spec: ChartSpec, now: number, options: ChartResolveOptions): boolean {
|
|
@@ -247,7 +265,7 @@ export function useChartResolution(
|
|
|
247
265
|
const scope = options.savedCopyScope;
|
|
248
266
|
const publicSpecKey = useMemo(() => publicChartSpecKey(spec, scope), [spec, scope]);
|
|
249
267
|
const specKey = publicSpecKey ?? JSON.stringify([scope, spec]);
|
|
250
|
-
const savedKey = !snapshot && publicSpecKey ? { version: 2, key: ["chart-resolution", publicSpecKey,
|
|
268
|
+
const savedKey = !snapshot && publicSpecKey ? { version: priceComparisonSeriesIds(spec) ? 4 : 2, key: ["chart-resolution", publicSpecKey,
|
|
251
269
|
options.requestViewport?.start, options.requestViewport?.end, options.autoViewport?.start, options.autoViewport?.end,
|
|
252
270
|
options.autoViewport ? options.targetPointCount : null] } : null;
|
|
253
271
|
const seedResult = () => {
|
|
@@ -272,7 +290,7 @@ export function useChartResolution(
|
|
|
272
290
|
useSavedCopyFooter(state.key === specKey && !snapshot ? state.savedAt : null, result.errors.length === 0);
|
|
273
291
|
// A seed bridges an in-flight request. Once that request settles, an empty
|
|
274
292
|
// or failed result must not be replaced with a fresh loading seed forever.
|
|
275
|
-
const needsSeed = !snapshot && !
|
|
293
|
+
const needsSeed = !snapshot && !hasChartData(result)
|
|
276
294
|
&& (state.key !== specKey || result.loading);
|
|
277
295
|
const subscribeSeed = useCallback((listener: () => void) => {
|
|
278
296
|
if (!needsSeed || !coordinator) return () => {};
|
|
@@ -286,7 +304,7 @@ export function useChartResolution(
|
|
|
286
304
|
const seeded = needsSeed
|
|
287
305
|
? seedResult()
|
|
288
306
|
: null;
|
|
289
|
-
const displayed =
|
|
307
|
+
const displayed = seeded ?? result;
|
|
290
308
|
const resultRef = useRef(displayed);
|
|
291
309
|
resultRef.current = displayed;
|
|
292
310
|
const stateKey = state.key;
|
|
@@ -351,7 +369,7 @@ export function useChartResolution(
|
|
|
351
369
|
// instead of keeping the failure.
|
|
352
370
|
const live = !snapshot;
|
|
353
371
|
const failedRef = useRef(false);
|
|
354
|
-
failedRef.current = live && displayed.errors.length > 0 && !displayed.loading;
|
|
372
|
+
failedRef.current = live && (displayed.errors.length > 0 || displayed.savedAt != null) && !displayed.loading;
|
|
355
373
|
useEffect(() => {
|
|
356
374
|
if (!live) return;
|
|
357
375
|
return connectionHealth.subscribeRecovery((sourceId) => {
|
|
@@ -415,7 +433,7 @@ export function useChartResolution(
|
|
|
415
433
|
request.options,
|
|
416
434
|
);
|
|
417
435
|
if (!current()) return;
|
|
418
|
-
saveChartResolution(request.savedKey, next);
|
|
436
|
+
saveChartResolution(request.savedKey, next, resultRef.current);
|
|
419
437
|
const requestKey = request.specKey;
|
|
420
438
|
// A pass that brought in no source data changed at most the newest points.
|
|
421
439
|
const settled = cache.revision === dataRevision;
|
|
@@ -425,8 +443,8 @@ export function useChartResolution(
|
|
|
425
443
|
if (state.key !== requestKey) return { key: requestKey, result: next };
|
|
426
444
|
if ((state.savedAt != null || request.options.autoViewport || request.options.requestViewport)
|
|
427
445
|
&& !state.result.loading
|
|
428
|
-
&&
|
|
429
|
-
&& !
|
|
446
|
+
&& hasChartData(state.result)
|
|
447
|
+
&& !hasChartData(next)) return state;
|
|
430
448
|
const shown = revisions.get(state.result);
|
|
431
449
|
const edge = settled && shown?.cache === cache && shown.revision === dataRevision ? LIVE_COMPARE_EDGE_POINTS : undefined;
|
|
432
450
|
if (state.savedAt != null || !sameChartResolution(state.result, next, edge)) return { key: requestKey, result: next };
|
|
@@ -561,7 +579,7 @@ export function useChartResolution(
|
|
|
561
579
|
const cache = resolveCacheRef.current;
|
|
562
580
|
const dataRevision = cache.revision;
|
|
563
581
|
const opening = resultRef.current;
|
|
564
|
-
const backgroundRefresh = stateKey === specKey &&
|
|
582
|
+
const backgroundRefresh = stateKey === specKey && hasChartData(opening) && !opening.loading && (!isExplicitReload || stateSavedAt != null);
|
|
565
583
|
if (!backgroundRefresh) {
|
|
566
584
|
setState({ key: specKey, result: { ...opening, loading: true, errors: [] } });
|
|
567
585
|
}
|
|
@@ -570,18 +588,18 @@ export function useChartResolution(
|
|
|
570
588
|
spec,
|
|
571
589
|
withQuoteOverrides(sources, liveQuoteOverridesRef.current, liveSinceRef.current),
|
|
572
590
|
cache,
|
|
573
|
-
resolveOptions,
|
|
591
|
+
{ ...resolveOptions, refreshHistory: isExplicitReload || stateSavedAt != null },
|
|
574
592
|
);
|
|
575
593
|
const frame = stateSavedAt != null ? afterSavedCopyFrame() : undefined;
|
|
576
594
|
(frame ? frame.then(() => generationRef.current === generation ? resolve() : EMPTY_RESULT) : resolve())
|
|
577
595
|
.then((next) => {
|
|
578
596
|
if (generationRef.current !== generation) return;
|
|
579
|
-
if (backgroundRefresh && !
|
|
597
|
+
if (backgroundRefresh && !hasChartData(next)) {
|
|
580
598
|
setState((current) => current.key === specKey && current.savedAt != null
|
|
581
599
|
? { ...current, result: { ...current.result, errors: next.errors, warnings: next.warnings } } : current);
|
|
582
600
|
return;
|
|
583
601
|
}
|
|
584
|
-
saveChartResolution(savedKey, next);
|
|
602
|
+
saveChartResolution(savedKey, next, resultRef.current);
|
|
585
603
|
const series = stateSavedAt != null && !next.bufferedSeries ? reuseSavedData(resultRef.current.series, next.series) : next.series;
|
|
586
604
|
const result = series === next.series ? next : { ...next, series };
|
|
587
605
|
if (cache.revision === dataRevision) resultRevisionsRef.current.set(result, { cache, revision: dataRevision });
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { crossFxCloseOnOrBefore, dailyFxLeg, loadDailyFxCloses, type FxCloses, type FxHistoryClient } from "../market-data/fx-closes";
|
|
1
2
|
import type { FinancialStatement, TickerFinancials } from "../types/financials";
|
|
2
3
|
import { resolveCurrencyUnit, type CurrencyUnitInfo } from "../utils/currency-units";
|
|
4
|
+
import { logFailure } from "../utils/log-failure";
|
|
3
5
|
|
|
4
6
|
function knownUnit(currency?: string): CurrencyUnitInfo | null {
|
|
5
7
|
const unit = resolveCurrencyUnit(currency);
|
|
@@ -13,7 +15,7 @@ function sameUnit(left: CurrencyUnitInfo, right: CurrencyUnitInfo): boolean {
|
|
|
13
15
|
export const VALUATION_CURRENCY_WARNING_PREFIX = "Valuation currency mismatch or unknown basis:";
|
|
14
16
|
|
|
15
17
|
/** Price and statement amounts must share a verified monetary basis before division. */
|
|
16
|
-
export function createValuationCurrencyContext(financials: TickerFinancials) {
|
|
18
|
+
export function createValuationCurrencyContext(financials: TickerFinancials, fx?: ReadonlyMap<string, FxCloses>) {
|
|
17
19
|
const quoteUnit = knownUnit(financials.quote?.currency);
|
|
18
20
|
const declared = knownUnit(financials.financialCurrency);
|
|
19
21
|
const explicit = [...financials.annualStatements, ...financials.quarterlyStatements]
|
|
@@ -24,25 +26,51 @@ export function createValuationCurrencyContext(financials: TickerFinancials) {
|
|
|
24
26
|
? declared : null;
|
|
25
27
|
const statementUnit = (row: FinancialStatement) => row.currency?.trim()
|
|
26
28
|
? knownUnit(row.currency) : fallback;
|
|
29
|
+
const rateFor = (row: FinancialStatement, date: string) => {
|
|
30
|
+
const unit = statementUnit(row);
|
|
31
|
+
if (!quoteUnit || !unit) return null;
|
|
32
|
+
if (unit.currency === quoteUnit.currency) return unit.divisor / quoteUnit.divisor;
|
|
33
|
+
const close = fx && crossFxCloseOnOrBefore(fx, quoteUnit.currency, unit.currency, date);
|
|
34
|
+
return close ? close.rate * unit.divisor / quoteUnit.divisor : null;
|
|
35
|
+
};
|
|
27
36
|
|
|
28
37
|
return {
|
|
29
|
-
priceInStatementUnits(row: FinancialStatement, price: number): number | null {
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
// GBp/GBX prices can be compared with GBP statements without an FX rate.
|
|
33
|
-
// Already normalized GBP prices retain divisor 1 and are not scaled twice.
|
|
34
|
-
return price / quoteUnit.divisor * unit.divisor;
|
|
38
|
+
priceInStatementUnits(row: FinancialStatement, price: number, date = row.date.slice(0, 10)): number | null {
|
|
39
|
+
const rate = rateFor(row, date);
|
|
40
|
+
return rate == null ? null : price * rate;
|
|
35
41
|
},
|
|
36
|
-
warning(rows: readonly FinancialStatement[]): string | undefined {
|
|
37
|
-
const incompatible = rows.filter((row) =>
|
|
38
|
-
const unit = statementUnit(row);
|
|
39
|
-
return !quoteUnit || !unit || unit.currency !== quoteUnit.currency;
|
|
40
|
-
});
|
|
42
|
+
warning(rows: readonly FinancialStatement[], dateOf = (row: FinancialStatement) => row.date.slice(0, 10)): string | undefined {
|
|
43
|
+
const incompatible = rows.filter((row) => rateFor(row, dateOf(row)) == null);
|
|
41
44
|
if (!incompatible.length) return undefined;
|
|
42
45
|
const currencies = [...new Set(incompatible.map((row) => statementUnit(row)?.currency ?? "unknown"))];
|
|
43
46
|
return `${VALUATION_CURRENCY_WARNING_PREFIX} ${currencies.join("/")} reporting, ${quoteUnit?.currency ?? "unknown"} price. Affected ratios are unavailable.`;
|
|
44
47
|
},
|
|
48
|
+
conversionNote(rows: readonly FinancialStatement[], dateOf: (row: FinancialStatement) => string): string | undefined {
|
|
49
|
+
const currencies = new Set(rows.flatMap((row) => {
|
|
50
|
+
const unit = statementUnit(row);
|
|
51
|
+
return unit && unit.currency !== quoteUnit?.currency && rateFor(row, dateOf(row)) != null ? [unit.currency] : [];
|
|
52
|
+
}));
|
|
53
|
+
return currencies.size ? `Period-end FX: ${quoteUnit!.currency} prices converted to ${[...currencies].join("/")}.` : undefined;
|
|
54
|
+
},
|
|
55
|
+
fxCurrencies(rows: readonly FinancialStatement[]): string[] {
|
|
56
|
+
if (!quoteUnit) return [];
|
|
57
|
+
const mismatches = rows.flatMap((row) => {
|
|
58
|
+
const unit = statementUnit(row);
|
|
59
|
+
return unit && unit.currency !== quoteUnit.currency ? [unit.currency, quoteUnit.currency] : [];
|
|
60
|
+
});
|
|
61
|
+
return [...new Set(mismatches)].filter((code) => code !== "USD" && dailyFxLeg(code));
|
|
62
|
+
},
|
|
45
63
|
};
|
|
46
64
|
}
|
|
47
65
|
|
|
48
66
|
export type ValuationCurrencyContext = ReturnType<typeof createValuationCurrencyContext>;
|
|
67
|
+
|
|
68
|
+
export async function valuationFxHistories(currencies: readonly string[], since: string, load: (code: string, since: string) => Promise<FxCloses>): Promise<ReadonlyMap<string, FxCloses>> {
|
|
69
|
+
const histories = await Promise.all(currencies.map((code) => load(code, since)
|
|
70
|
+
.catch(logFailure("valuation-currency", `Daily ${code} FX closes unavailable`, null))));
|
|
71
|
+
return new Map(histories.flatMap((history) => history ? [[history.currency, history] as const] : []));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function loadValuationFx(currencies: readonly string[], since: string, client: FxHistoryClient): Promise<ReadonlyMap<string, FxCloses>> {
|
|
75
|
+
return valuationFxHistories(currencies, since, (code, date) => loadDailyFxCloses(code, date, client));
|
|
76
|
+
}
|
package/src/types/config.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Portfolio, Watchlist } from "./ticker";
|
|
2
2
|
import type { BrokerContractRef, TickerListingRef } from "./instrument";
|
|
3
3
|
import type { LanguagePreference } from "../i18n/languages";
|
|
4
|
-
import {
|
|
4
|
+
import { getDockedPaneIdsFromNode, normalizeDockNode } from "../layout/pane-manager/dock-normalization";
|
|
5
5
|
|
|
6
6
|
export const CURRENT_CONFIG_VERSION = 28;
|
|
7
7
|
|
|
@@ -25,6 +25,18 @@ export interface BrokerInstanceConfig {
|
|
|
25
25
|
* brief, position alerts, the mobile app and Ask Gloom's portfolio context then go without it.
|
|
26
26
|
*/
|
|
27
27
|
localOnly?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The accounts the user left out of Gloom, each with the name it had then so Brokers can list it.
|
|
30
|
+
* Such an account has no portfolio, is offered nowhere an order is placed, and is not synced; a
|
|
31
|
+
* signed-in broker does not read it at all. Every other account is in, so one linked later shows
|
|
32
|
+
* up. Synced with the profile; an empty list says the user took every account back.
|
|
33
|
+
*/
|
|
34
|
+
excludedAccounts?: BrokerExcludedAccount[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface BrokerExcludedAccount {
|
|
38
|
+
accountId: string;
|
|
39
|
+
name: string;
|
|
28
40
|
}
|
|
29
41
|
|
|
30
42
|
export interface ColumnConfig {
|
|
@@ -666,15 +678,6 @@ const BLANK_LAYOUT: LayoutConfig = {
|
|
|
666
678
|
|
|
667
679
|
let nextPaneInstanceSeq = 0;
|
|
668
680
|
|
|
669
|
-
function clampDockRatio(ratio: number | undefined): number {
|
|
670
|
-
if (typeof ratio !== "number" || !Number.isFinite(ratio)) return 0.5;
|
|
671
|
-
return Math.max(0.1, Math.min(0.9, ratio));
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
function isDockAxis(value: unknown): value is DockSplitNode["axis"] {
|
|
675
|
-
return value === "horizontal" || value === "vertical";
|
|
676
|
-
}
|
|
677
|
-
|
|
678
681
|
function cloneDockNode(node: DockLayoutNode): DockLayoutNode {
|
|
679
682
|
if (node.kind === "pane") {
|
|
680
683
|
return { kind: "pane", instanceId: node.instanceId };
|
|
@@ -689,57 +692,6 @@ function cloneDockNode(node: DockLayoutNode): DockLayoutNode {
|
|
|
689
692
|
};
|
|
690
693
|
}
|
|
691
694
|
|
|
692
|
-
function normalizeDockNode(
|
|
693
|
-
node: DockLayoutNode | null | undefined,
|
|
694
|
-
validInstanceIds: Set<string>,
|
|
695
|
-
seenPaneIds: Set<string>,
|
|
696
|
-
): DockLayoutNode | null {
|
|
697
|
-
if (!node || typeof node !== "object") return null;
|
|
698
|
-
|
|
699
|
-
if ((node as DockPaneNode).kind === "pane") {
|
|
700
|
-
const instanceId = (node as DockPaneNode).instanceId;
|
|
701
|
-
if (typeof instanceId !== "string" || !validInstanceIds.has(instanceId) || seenPaneIds.has(instanceId)) {
|
|
702
|
-
return null;
|
|
703
|
-
}
|
|
704
|
-
seenPaneIds.add(instanceId);
|
|
705
|
-
return { kind: "pane", instanceId };
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
if ((node as DockSplitNode).kind !== "split") return null;
|
|
709
|
-
const split = node as DockSplitNode;
|
|
710
|
-
if (split.tabs) {
|
|
711
|
-
// Whatever is under a stack is its tabs, nested or not: a pane put back
|
|
712
|
-
// at a place inside it (its remembered spot) joins it.
|
|
713
|
-
const plain: DockSplitNode = { kind: "split", axis: split.axis, ratio: split.ratio, first: split.first, second: split.second };
|
|
714
|
-
const flat = normalizeDockNode(plain, validInstanceIds, seenPaneIds);
|
|
715
|
-
const active = typeof split.tabs.active === "string" ? split.tabs.active : null;
|
|
716
|
-
return flat ? buildDockStack(getDockedPaneIdsFromNode(flat), active) : null;
|
|
717
|
-
}
|
|
718
|
-
const first = normalizeDockNode(split.first, validInstanceIds, seenPaneIds);
|
|
719
|
-
const second = normalizeDockNode(split.second, validInstanceIds, seenPaneIds);
|
|
720
|
-
if (!first && !second) return null;
|
|
721
|
-
if (!first) return second;
|
|
722
|
-
if (!second) return first;
|
|
723
|
-
return {
|
|
724
|
-
kind: "split",
|
|
725
|
-
axis: isDockAxis(split.axis) ? split.axis : "horizontal",
|
|
726
|
-
ratio: clampDockRatio(split.ratio),
|
|
727
|
-
first,
|
|
728
|
-
second,
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
function getDockedPaneIdsFromNode(node: DockLayoutNode | null, result: string[] = []): string[] {
|
|
733
|
-
if (!node) return result;
|
|
734
|
-
if (node.kind === "pane") {
|
|
735
|
-
result.push(node.instanceId);
|
|
736
|
-
return result;
|
|
737
|
-
}
|
|
738
|
-
getDockedPaneIdsFromNode(node.first, result);
|
|
739
|
-
getDockedPaneIdsFromNode(node.second, result);
|
|
740
|
-
return result;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
695
|
export function getPlacedPaneInstanceIds(layout: LayoutConfig): string[] {
|
|
744
696
|
return [...new Set([
|
|
745
697
|
...getDockedPaneIdsFromNode(layout.dockRoot),
|
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
PricePoint,
|
|
12
12
|
OptionsChain,
|
|
13
13
|
HolderData,
|
|
14
|
+
SplitHistory,
|
|
14
15
|
} from "./financials";
|
|
15
16
|
import type { TimeRange } from "../time-series/range";
|
|
16
17
|
import type { ChartResolutionSupport, ManualChartResolution } from "../time-series/resolution";
|
|
@@ -22,7 +23,7 @@ import type { IssuerListings } from "./issuer-listings";
|
|
|
22
23
|
import type { StreamTickRange } from "../market-data/quotes/tick-range";
|
|
23
24
|
|
|
24
25
|
export type CachedAssetMethod = "getExchangeRate" | "getHolders" | "getAnalystResearch" | "getCorporateActions"
|
|
25
|
-
| "getOptionsChain" | "getSecFilings" | "getSecFilingDocuments" | "getSecFilingContent" | "getArticleSummary";
|
|
26
|
+
| "getOptionsChain" | "getSecFilings" | "getSecFilingsPage" | "getSecFilingDocuments" | "getSecFilingContent" | "getArticleSummary";
|
|
26
27
|
export type CachedAssetArgs<K extends CachedAssetMethod> = Parameters<NonNullable<AssetDataProvider[K]>>;
|
|
27
28
|
export type CachedAssetValue<K extends CachedAssetMethod> = Awaited<ReturnType<NonNullable<AssetDataProvider[K]>>>;
|
|
28
29
|
|
|
@@ -83,6 +84,29 @@ export interface SecFilingItem {
|
|
|
83
84
|
form4?: SecForm4Trade;
|
|
84
85
|
}
|
|
85
86
|
|
|
87
|
+
/** Which of a listing's filings `getSecFilingsPage` reads. */
|
|
88
|
+
export interface SecFilingsPageQuery {
|
|
89
|
+
/** The forms, each with its amendment: `["4"]` is every Form 4 and 4/A. */
|
|
90
|
+
forms: readonly string[];
|
|
91
|
+
limit: number;
|
|
92
|
+
offset?: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface SecFilingsPage {
|
|
96
|
+
filings: SecFilingItem[];
|
|
97
|
+
/** The source holds more of these forms past this page, from `nextOffset`. */
|
|
98
|
+
hasMore: boolean;
|
|
99
|
+
nextOffset: number;
|
|
100
|
+
/**
|
|
101
|
+
* The newest filing day (YYYY-MM-DD) of each form the company's whole list
|
|
102
|
+
* holds, by the form as filed (`10-K/A` apart from `10-K`), whatever forms
|
|
103
|
+
* the page asks for: what the company reports as, and empty when the SEC
|
|
104
|
+
* lists no filing for it. Absent when the source does not say (an older
|
|
105
|
+
* server).
|
|
106
|
+
*/
|
|
107
|
+
newestByForm?: Record<string, string>;
|
|
108
|
+
}
|
|
109
|
+
|
|
86
110
|
/** A Form 4's main transaction, the one moving the most shares. */
|
|
87
111
|
export interface SecForm4Trade {
|
|
88
112
|
/** The first reporting owner, as filed. */
|
|
@@ -353,9 +377,22 @@ export interface AssetDataProvider {
|
|
|
353
377
|
getExchangeRateSnapshot?(fromCurrency: string): Promise<ExchangeRateSnapshot>;
|
|
354
378
|
search(query: string, context?: SearchRequestContext): Promise<InstrumentSearchResult[]>;
|
|
355
379
|
getSecFilings?(ticker: string, count?: number, exchange?: string, context?: MarketDataRequestContext): Promise<SecFilingItem[]>;
|
|
380
|
+
/**
|
|
381
|
+
* One page of a listing's filings of some forms, newest first, picked by the
|
|
382
|
+
* source: a reader of one form (INS's Form 4s) never takes the company's
|
|
383
|
+
* whole list to filter it.
|
|
384
|
+
*/
|
|
385
|
+
getSecFilingsPage?(ticker: string, query: SecFilingsPageQuery, exchange?: string, context?: MarketDataRequestContext): Promise<SecFilingsPage>;
|
|
356
386
|
getHolders?(ticker: string, exchange?: string, context?: MarketDataRequestContext): Promise<HolderData>;
|
|
357
387
|
getAnalystResearch?(ticker: string, exchange?: string, context?: MarketDataRequestContext): Promise<AnalystResearchData>;
|
|
358
388
|
getCorporateActions?(ticker: string, exchange?: string, context?: MarketDataRequestContext): Promise<CorporateActionsData>;
|
|
389
|
+
/**
|
|
390
|
+
* The share splits of several bare symbols in a few requests, and nothing
|
|
391
|
+
* else of their corporate actions, by symbol as asked: null for one the
|
|
392
|
+
* source holds no split history for. A symbol the source could not answer
|
|
393
|
+
* for is left out; null when the source cannot answer a batch at all.
|
|
394
|
+
*/
|
|
395
|
+
getSplitHistoryBatch?(symbols: string[], options?: { signal?: AbortSignal }): Promise<Map<string, SplitHistory | null> | null>;
|
|
359
396
|
/**
|
|
360
397
|
* A US symbol's changes: where the issuer that held it trades now (FB is
|
|
361
398
|
* META), or what its holder was called before. Null when none is on record.
|
package/src/types/financials.ts
CHANGED
|
@@ -147,6 +147,7 @@ export interface Quote extends DepositaryReceiptFacts {
|
|
|
147
147
|
priceBasis?: PriceBasis;
|
|
148
148
|
/** Daily fund net asset value; independent of the units used to format its price. */
|
|
149
149
|
priceObservation?: "nav";
|
|
150
|
+
futuresPriceKind?: "settlement" | "last-trade";
|
|
150
151
|
symbol: string;
|
|
151
152
|
/** Provider-reported security type, independent of the company profile. */
|
|
152
153
|
instrumentType?: string;
|
|
@@ -204,6 +205,10 @@ export interface Quote extends DepositaryReceiptFacts {
|
|
|
204
205
|
regularChangePercent?: number;
|
|
205
206
|
/** Provider's exchange-local session date for the daily quote reference. */
|
|
206
207
|
changeSessionDate?: string;
|
|
208
|
+
/** Range from the listing's settled regular-session daily bar. */
|
|
209
|
+
dayRangeBasis?: "daily-bar";
|
|
210
|
+
/** Date belonging to both range endpoints, not to the last price; null after reconciliation if unknown. */
|
|
211
|
+
dayRangeSessionDate?: string | null;
|
|
207
212
|
high52w?: number;
|
|
208
213
|
low52w?: number;
|
|
209
214
|
/**
|
|
@@ -298,6 +303,14 @@ export interface Quote extends DepositaryReceiptFacts {
|
|
|
298
303
|
ask?: number;
|
|
299
304
|
bidSize?: number;
|
|
300
305
|
askSize?: number;
|
|
306
|
+
/**
|
|
307
|
+
* When the bid and ask were quoted, in milliseconds, as the source stamps
|
|
308
|
+
* the book; absent when it sends a book without a time. A book can be hours
|
|
309
|
+
* from the trade beside it (an after-hours quote left at 19:55 New York
|
|
310
|
+
* against the 16:00 close), so it is never dated by lastUpdated or
|
|
311
|
+
* lastTradeTime (formatQuoteBookTime).
|
|
312
|
+
*/
|
|
313
|
+
bidAskTime?: number;
|
|
301
314
|
open?: number;
|
|
302
315
|
high?: number;
|
|
303
316
|
low?: number;
|
|
@@ -499,6 +512,13 @@ export interface Fundamentals extends DepositaryReceiptFacts {
|
|
|
499
512
|
* can be repriced from a live quote; absent otherwise.
|
|
500
513
|
*/
|
|
501
514
|
dividendRate?: number;
|
|
515
|
+
/**
|
|
516
|
+
* `uneven-regular-payments`: `dividendRate` (a forward one) is the trailing
|
|
517
|
+
* year's regular payments summed, as DVD's forward rate reads a year whose
|
|
518
|
+
* payments differ too widely for one to stand for it (HSBC's three interims
|
|
519
|
+
* beside its final). Absent where the latest distribution is annualized.
|
|
520
|
+
*/
|
|
521
|
+
dividendRateBasis?: "uneven-regular-payments";
|
|
502
522
|
revenue?: number;
|
|
503
523
|
netIncome?: number;
|
|
504
524
|
eps?: number;
|
|
@@ -683,6 +703,13 @@ export interface DividendAction {
|
|
|
683
703
|
* VanEck), and the page it is published on. Absent elsewhere and from older servers.
|
|
684
704
|
*/
|
|
685
705
|
source?: { publisher: string; url: string };
|
|
706
|
+
/**
|
|
707
|
+
* The dividends the row holds by the issuer's own dividend announcement
|
|
708
|
+
* forms (an HKEX listing's): each in the row's currency, summing to its
|
|
709
|
+
* amount, a special marked, with the form's type and where it is published.
|
|
710
|
+
* Absent where no form speaks for the row, and from older servers.
|
|
711
|
+
*/
|
|
712
|
+
parts?: { amount: number; special: boolean; type: string; form: { url: string; publishedOn: string } }[];
|
|
686
713
|
}
|
|
687
714
|
|
|
688
715
|
/**
|
|
@@ -721,17 +748,30 @@ export interface SplitAction {
|
|
|
721
748
|
toFactor?: number;
|
|
722
749
|
}
|
|
723
750
|
|
|
751
|
+
/** A listing's share splits and nothing else of its corporate actions (`getSplitHistoryBatch`). */
|
|
752
|
+
export interface SplitHistory {
|
|
753
|
+
symbol: string;
|
|
754
|
+
splits: SplitAction[];
|
|
755
|
+
/** `unavailable`: the splits could not be read, which says nothing about whether the listing split. */
|
|
756
|
+
coverage: "available" | "unavailable";
|
|
757
|
+
}
|
|
758
|
+
|
|
724
759
|
/**
|
|
725
760
|
* How a reported EPS relates to the company's statements: `gaap` is the
|
|
726
761
|
* quarter's diluted EPS as the statements report it; `adjusted` is the
|
|
727
762
|
* consensus-basis figure, which leaves out items the statements include.
|
|
728
763
|
*/
|
|
729
|
-
export type EarningsEpsBasis = "gaap" | "adjusted";
|
|
764
|
+
export type EarningsEpsBasis = "gaap" | "adjusted" | "company-adjusted";
|
|
765
|
+
|
|
766
|
+
export interface FilingEpsDetails {
|
|
767
|
+
gaapEps?: number;
|
|
768
|
+
streetEps?: { actual: number; estimate: number | null; analysts: number | null; actualBasis: "including-stock-compensation" };
|
|
769
|
+
}
|
|
730
770
|
|
|
731
771
|
/** A report that is out, a date the company announced, or a date projected from its past reports. */
|
|
732
772
|
export type EarningsDateStatus = "reported" | "confirmed" | "projected";
|
|
733
773
|
|
|
734
|
-
export interface EarningsAction {
|
|
774
|
+
export interface EarningsAction extends FilingEpsDetails {
|
|
735
775
|
date: string;
|
|
736
776
|
/** Known release/acceptance timestamp, when the calendar has one. */
|
|
737
777
|
reportedAt?: string;
|
|
@@ -750,7 +790,7 @@ export interface EarningsAction {
|
|
|
750
790
|
epsBasis?: EarningsEpsBasis | null;
|
|
751
791
|
dateStatus?: EarningsDateStatus;
|
|
752
792
|
/** `press-release` when `epsActual` is the company's release's, provisional until the calendar has the quarter. */
|
|
753
|
-
epsActualSource?: "press-release";
|
|
793
|
+
epsActualSource?: "press-release" | "filing";
|
|
754
794
|
}
|
|
755
795
|
|
|
756
796
|
export interface CorporateActionsData {
|
|
@@ -885,12 +925,15 @@ export type StatementFilingKind = "annual_results" | "interim_results" | "quarte
|
|
|
885
925
|
|
|
886
926
|
/** A results announcement or report on HKEXnews or SGXNet, with when it was published and read. */
|
|
887
927
|
export interface StatementFilingDocument {
|
|
888
|
-
source: "hkex" | "sgx" | "lse" | "cninfo" | "ir";
|
|
928
|
+
source: "hkex" | "sgx" | "lse" | "cninfo" | "idx" | "ir" | "mops";
|
|
889
929
|
kind: StatementFilingKind;
|
|
890
930
|
title: string;
|
|
891
931
|
url: string;
|
|
892
932
|
publishedAt: string;
|
|
933
|
+
firstObserved?: true;
|
|
893
934
|
fetchedAt: string;
|
|
935
|
+
dateBasis?: "catalogue";
|
|
936
|
+
dataUrl?: string;
|
|
894
937
|
}
|
|
895
938
|
|
|
896
939
|
/** A row's lines read from the company's results announcement or report, for a period the statements source lags on. */
|
|
@@ -900,8 +943,14 @@ export interface ResultsStatementFill {
|
|
|
900
943
|
fields: ResultsFillField[];
|
|
901
944
|
/** The documents, the one each line was read from first: the row is dated by the earliest publication. */
|
|
902
945
|
documents: StatementFilingDocument[];
|
|
903
|
-
/** Per line, its document
|
|
904
|
-
lines: Partial<Record<ResultsFillField, {
|
|
946
|
+
/** Per line, its document index and location in the original document. */
|
|
947
|
+
lines: Partial<Record<ResultsFillField, {
|
|
948
|
+
document: number;
|
|
949
|
+
page: number | null;
|
|
950
|
+
subtract?: { document: number; page: number | null };
|
|
951
|
+
subtractDocument?: number;
|
|
952
|
+
location?: { sheet: string; cell: string };
|
|
953
|
+
}>>;
|
|
905
954
|
/** The months the row's flows cover where the list's usual is another: 6 for a half in the quarterly list. */
|
|
906
955
|
periodMonths?: number;
|
|
907
956
|
/** A quarter derived as the difference of two year-to-date periods ("6 months to 2026-06-30 − 3 months to 2026-03-31"). */
|
|
@@ -911,6 +960,15 @@ export interface ResultsStatementFill {
|
|
|
911
960
|
* earlier: the document restates that period's figure as the source has it.
|
|
912
961
|
*/
|
|
913
962
|
comparable?: ResultsFillField[];
|
|
963
|
+
/** Reported figures whose definitions differ from the statements provider. */
|
|
964
|
+
definitions?: Array<{
|
|
965
|
+
field: ResultsFillField;
|
|
966
|
+
periodEnd: string;
|
|
967
|
+
months: number;
|
|
968
|
+
currency: string;
|
|
969
|
+
announcements: number;
|
|
970
|
+
source: number;
|
|
971
|
+
}>;
|
|
914
972
|
/**
|
|
915
973
|
* A quarter's lines left blank because the announcements count them otherwise than the statements
|
|
916
974
|
* source (HSBC's revenue): set beside the source's quarters around it, the change would measure that.
|
|
@@ -1251,6 +1309,7 @@ export interface PricePoint {
|
|
|
1251
1309
|
volumeBasis?: string;
|
|
1252
1310
|
/** The bar's period had not ended when it was served: its close is the latest price, and it may have no volume yet. */
|
|
1253
1311
|
partial?: boolean;
|
|
1312
|
+
quoteOnly?: true;
|
|
1254
1313
|
/** The bar's prices were rebuilt from shorter bars where the source left it empty or too coarse. */
|
|
1255
1314
|
filled?: boolean;
|
|
1256
1315
|
/** A future's session that has closed but whose settlement is not confirmed yet: its close is the last trade. */
|
|
@@ -1400,6 +1459,13 @@ export interface OptionContract {
|
|
|
1400
1459
|
* implied volatility, greek or surface point is read from it.
|
|
1401
1460
|
*/
|
|
1402
1461
|
quoteStale?: boolean;
|
|
1462
|
+
/**
|
|
1463
|
+
* The source's bid was above its ask, which no one can trade. After a
|
|
1464
|
+
* stock's options close at 16:00 New York some exchanges keep quoting while
|
|
1465
|
+
* the others' closing quotes stand, and a move after the close crosses the
|
|
1466
|
+
* two. Gloom Cloud serves such a quote with bid and ask 0, `quoteStale` set.
|
|
1467
|
+
*/
|
|
1468
|
+
quoteCrossed?: boolean;
|
|
1403
1469
|
/**
|
|
1404
1470
|
* A contract adjusted for a corporate action (root ETHA1 beside ETHA): it
|
|
1405
1471
|
* prices another deliverable, so a chain lists it only when asked to, with
|