@gloom-sh/terminal 0.20.21 → 0.20.23
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 +4 -3
- package/patches/electrobun-devkit@2.0.5.patch +169 -3
- package/src/account/heard-from-question.tsx +6 -4
- package/src/account/heard-from.ts +3 -4
- package/src/api-client/buybacks.ts +108 -0
- package/src/api-client/data.ts +213 -1
- package/src/api-client/dilution.ts +183 -0
- package/src/api-client/earnings.ts +2 -2
- package/src/api-client/equity-screener.ts +7 -0
- package/src/api-client/exchange-announcements.ts +16 -5
- package/src/api-client/exchange-short-balances.ts +24 -0
- package/src/api-client/heard-from.ts +5 -7
- 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 +34 -6
- package/src/api-client/members.ts +5 -0
- package/src/api-client/ownership-disclosures.ts +68 -0
- package/src/api-client/paths.ts +2 -2
- package/src/api-client/request.ts +39 -10
- 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/jobs.ts +1 -0
- package/src/api-client/types/ticker-data.ts +3 -1
- 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 +9 -4
- package/src/app/runtime/plugin-bindings.ts +20 -2
- package/src/architecture/core-builtin-allowlist.json +2 -2
- package/src/architecture/dom-cell-metrics-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 +8 -0
- package/src/capabilities/factories.ts +4 -0
- package/src/cli/commands/market.ts +141 -76
- package/src/cli/commands/news-search.ts +12 -0
- package/src/cli/commands/options-chain.ts +9 -3
- package/src/cli/commands/options-leaps.ts +55 -30
- package/src/cli/commands/overview.ts +20 -23
- package/src/cli/commands/search.ts +2 -1
- package/src/cli/commands/ticker.ts +17 -18
- 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 +50 -64
- package/src/cli/export-source.ts +9 -4
- package/src/cli/history-demergers.ts +134 -11
- package/src/cli/history-rows.ts +47 -7
- package/src/cli/listing-arg.ts +45 -18
- package/src/cli/pane-functions/catalog-snapshot.json +26 -22
- package/src/cli/pane-functions/catalog.ts +6 -2
- package/src/cli/pane-functions/data.ts +3 -1
- package/src/cli/pane-functions/dom.ts +8 -5
- package/src/cli/pane-functions/freshness.ts +6 -1
- package/src/cli/pane-functions/function-help.ts +32 -2
- package/src/cli/pane-functions/headless.ts +79 -27
- package/src/cli/pane-functions/index.ts +2 -1
- package/src/cli/pane-functions/market-session.ts +13 -3
- package/src/cli/pane-functions/resolver.ts +4 -1
- package/src/cli/pane-functions/screenshot-assessment.ts +26 -10
- package/src/cli/pane-functions/screenshot-bridge.ts +4 -1
- package/src/cli/pane-functions/screenshot-data-evidence.ts +11 -5
- package/src/cli/pane-functions/screenshot-payload.ts +21 -3
- package/src/cli/pane-functions/screenshot-render.ts +2 -0
- package/src/cli/pane-functions/ticker-question.ts +52 -47
- package/src/cli/rendered-table-rows.ts +75 -0
- package/src/cli/report-tables.ts +7 -1
- package/src/cli/result.ts +9 -2
- package/src/cli/symbol-list.ts +52 -14
- package/src/cli/ticker-resolution.ts +133 -38
- package/src/cli/visible-key-values.ts +3 -2
- package/src/components/chart/composite/composite-chart.tsx +12 -0
- 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/composite/types.ts +18 -0
- package/src/components/chart/composite/use-composite-chart-keyboard.ts +38 -15
- package/src/components/chart/curve/model.ts +4 -1
- package/src/components/chart-table/header.tsx +11 -5
- package/src/components/chart-table/selection.ts +20 -1
- package/src/components/command-bar/routes/root/start-here.ts +1 -1
- package/src/components/command-bar/routes/ticker-search/results.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 +52 -8
- package/src/components/feed-data-table/stack-view.tsx +88 -5
- package/src/components/index.ts +3 -3
- package/src/components/layout/floating-pane.tsx +5 -2
- package/src/components/layout/pane/header.tsx +33 -32
- 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 +1 -3
- package/src/components/market-board/index.tsx +8 -11
- package/src/components/reader/reader-text.tsx +25 -2
- package/src/components/ticker/badge/index.tsx +9 -4
- package/src/components/ticker/badge/list.tsx +3 -1
- package/src/components/ticker/list-table-view.tsx +4 -0
- 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 +64 -16
- package/src/components/ui/data-table/muted-row.tsx +47 -0
- package/src/components/ui/data-table/opentui/index.tsx +47 -11
- package/src/components/ui/data-table/spill.ts +36 -0
- package/src/components/ui/data-table/types.ts +113 -6
- package/src/components/ui/data-table/use-column-order.ts +11 -0
- package/src/components/ui/data-table/visible-range.ts +9 -1
- package/src/components/ui/day-cell.ts +30 -0
- package/src/components/ui/icon.tsx +50 -3
- package/src/components/ui/index.ts +3 -1
- package/src/components/ui/list-view.tsx +2 -2
- package/src/components/ui/prose.tsx +3 -1
- package/src/components/ui/table-layout.ts +220 -6
- package/src/components/ui/terminal-hover-label.tsx +49 -0
- package/src/components/use-pinned-moment.ts +222 -13
- package/src/core/state/app/layout.ts +7 -2
- package/src/core/state/app/state.ts +17 -4
- package/src/core/state/app/types.ts +2 -1
- 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/sqlite/access.ts +90 -12
- package/src/data/sqlite/checkpointer.ts +75 -12
- package/src/data/sqlite/database.ts +18 -1
- package/src/data/sqlite/retry.ts +1 -1
- package/src/docs/load.ts +5 -2
- package/src/docs/snapshot.json +1862 -4456
- 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/fund-actions.ts +21 -0
- package/src/market-data/market/freshness.ts +39 -35
- package/src/market-data/market/globex-day.ts +14 -0
- package/src/market-data/market/split-price-basis.ts +55 -0
- package/src/market-data/market/status.ts +2 -4
- package/src/market-data/price-adjustments.ts +115 -0
- package/src/market-data/published-us-sessions.ts +3 -2
- package/src/market-data/quotes/balance-sheet-rate.ts +6 -2
- package/src/market-data/quotes/day-range.ts +24 -9
- package/src/market-data/quotes/freshness.ts +4 -3
- package/src/market-data/quotes/live-valuation.ts +4 -2
- package/src/market-data/quotes/metadata.ts +48 -5
- package/src/market-data/quotes/regular-session-valuation.ts +18 -1
- package/src/market-data/quotes/resolution.ts +18 -29
- package/src/market-data/quotes/time.ts +138 -14
- package/src/news/query-presets.ts +6 -4
- package/src/plugins/builtin/alerts/cli-forms.ts +3 -0
- package/src/plugins/builtin/alerts/cli.ts +19 -7
- package/src/plugins/builtin/alerts/events-pane.tsx +1 -0
- package/src/plugins/builtin/alerts/format.ts +22 -10
- package/src/plugins/builtin/alerts/headless.ts +7 -4
- package/src/plugins/builtin/alerts/history-pane.tsx +93 -36
- package/src/plugins/builtin/alerts/history-rows.ts +24 -1
- package/src/plugins/builtin/alerts/index.tsx +8 -10
- package/src/plugins/builtin/alerts/metric-data.ts +24 -6
- package/src/plugins/builtin/alerts/pane.tsx +9 -0
- package/src/plugins/builtin/alerts/pro-rules.ts +1 -0
- 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/types.ts +1 -0
- package/src/plugins/builtin/awards/detail.tsx +5 -4
- package/src/plugins/builtin/awards/headless.ts +13 -4
- 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 +14 -5
- package/src/plugins/builtin/broker-trading/ticket.tsx +1 -0
- package/src/plugins/builtin/buildout/format.ts +3 -1
- 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 +51 -8
- 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 +13 -1
- 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 +11 -3
- package/src/plugins/builtin/chart-composer/presets.ts +1 -1
- package/src/plugins/builtin/chat/attachments/desktop.tsx +46 -12
- package/src/plugins/builtin/chat/channels.ts +5 -2
- package/src/plugins/builtin/chat/content/composer-runtime.ts +64 -65
- package/src/plugins/builtin/chat/content/footer.tsx +17 -7
- package/src/plugins/builtin/chat/content/index.tsx +108 -36
- package/src/plugins/builtin/chat/content/new-dm-dialog.tsx +21 -8
- package/src/plugins/builtin/chat/content/selection-runtime.ts +16 -0
- package/src/plugins/builtin/chat/content/shortcuts.ts +3 -0
- package/src/plugins/builtin/chat/content/snapshot.ts +37 -13
- package/src/plugins/builtin/chat/content/transcript.tsx +12 -0
- package/src/plugins/builtin/chat/content/types.ts +2 -0
- package/src/plugins/builtin/chat/controller/channels.ts +15 -15
- package/src/plugins/builtin/chat/controller/draft-sync.ts +13 -7
- package/src/plugins/builtin/chat/controller/index.ts +140 -34
- package/src/plugins/builtin/chat/controller/lifecycle.ts +8 -12
- package/src/plugins/builtin/chat/controller/persistence.ts +32 -4
- package/src/plugins/builtin/chat/controller/send.ts +41 -17
- package/src/plugins/builtin/chat/controller/session-runtime.ts +28 -27
- package/src/plugins/builtin/chat/controller/state.ts +21 -8
- package/src/plugins/builtin/chat/controller/storage.ts +41 -4
- package/src/plugins/builtin/chat/controller/view.ts +6 -3
- package/src/plugins/builtin/chat/index.tsx +1 -1
- package/src/plugins/builtin/chat/layout.ts +8 -1
- package/src/plugins/builtin/chat/message/desktop.tsx +15 -11
- package/src/plugins/builtin/chat/message/header.tsx +112 -30
- package/src/plugins/builtin/chat/message/reactions.tsx +10 -11
- package/src/plugins/builtin/chat/message/render-state.ts +4 -2
- package/src/plugins/builtin/chat/message/terminal.tsx +13 -15
- package/src/plugins/builtin/chat/message/types.ts +5 -0
- 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 +2 -1
- package/src/plugins/builtin/cloud-tweets/table.tsx +25 -2
- 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 +2 -2
- 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 +26 -10
- package/src/plugins/builtin/company-kpis/model.ts +58 -10
- 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/compute.ts +6 -1
- package/src/plugins/builtin/correlation/headless.ts +2 -2
- package/src/plugins/builtin/correlation/relationship/pane.tsx +11 -8
- package/src/plugins/builtin/correlation/relationship/view-model.ts +1 -19
- 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/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/custom-view/loader.ts +95 -34
- package/src/plugins/builtin/custom-view/pane.tsx +31 -41
- package/src/plugins/builtin/custom-view/table.ts +201 -0
- 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 +14 -17
- package/src/plugins/builtin/dividend-yield/headless.ts +24 -16
- package/src/plugins/builtin/dividend-yield/index.tsx +2 -1
- package/src/plugins/builtin/dividend-yield/model.ts +52 -10
- package/src/plugins/builtin/dividend-yield/pane.tsx +89 -17
- package/src/plugins/builtin/dividend-yield/ranking-view.tsx +6 -2
- package/src/plugins/builtin/dividend-yield/ranking.ts +7 -3
- package/src/plugins/builtin/dividend-yield/types.ts +2 -3
- package/src/plugins/builtin/dividend-yield/view.ts +58 -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/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/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/pane.tsx +4 -3
- package/src/plugins/builtin/econ/calendar-model.ts +207 -3
- package/src/plugins/builtin/econ/columns.ts +132 -0
- package/src/plugins/builtin/econ/index.tsx +27 -79
- 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/model.ts +12 -3
- 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 +6 -3
- 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-curve/headless.ts +14 -9
- package/src/plugins/builtin/futures-curve/model.ts +12 -4
- package/src/plugins/builtin/futures-curve/pane.tsx +18 -15
- package/src/plugins/builtin/fx-matrix/headless.ts +3 -2
- package/src/plugins/builtin/gpu/headless.ts +10 -4
- 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 +66 -0
- package/src/plugins/builtin/holders/disclosures.ts +47 -0
- package/src/plugins/builtin/holders/headless.ts +9 -2
- package/src/plugins/builtin/holders/index.tsx +75 -1
- package/src/plugins/builtin/holders/pane.tsx +37 -10
- 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/headless.ts +2 -1
- package/src/plugins/builtin/insider/index.tsx +74 -12
- 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 +238 -48
- package/src/plugins/builtin/ipo-calendar/pane.tsx +91 -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 +9 -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 +11 -4
- package/src/plugins/builtin/kelly-sizer/pane.tsx +19 -9
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -1
- package/src/plugins/builtin/kelly-sizer/units.ts +26 -0
- package/src/plugins/builtin/macro-day/pane.tsx +12 -5
- package/src/plugins/builtin/market-halts/model.ts +10 -8
- package/src/plugins/builtin/market-halts/pane.tsx +15 -3
- 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 +55 -1
- package/src/plugins/builtin/market-heatmap/model.ts +27 -1
- package/src/plugins/builtin/market-movers/model.ts +7 -1
- 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/members/headless.ts +13 -5
- package/src/plugins/builtin/members/model.ts +35 -1
- package/src/plugins/builtin/members/pane.tsx +16 -8
- 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/news/wire/industry-pane.tsx +1 -0
- package/src/plugins/builtin/news/wire/news/row.ts +5 -12
- package/src/plugins/builtin/news/wire/news/table.tsx +46 -44
- package/src/plugins/builtin/notes/index.tsx +2 -1
- 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 +97 -46
- 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/index.tsx +22 -1
- package/src/plugins/builtin/options-positioning/pane.tsx +16 -1
- package/src/plugins/builtin/options-scenario/charts.tsx +2 -1
- 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 +3 -3
- 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/headless.ts +1 -1
- package/src/plugins/builtin/pe-band/model.ts +41 -18
- package/src/plugins/builtin/pe-band/pane.tsx +8 -6
- 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 +4 -6
- package/src/plugins/builtin/perps/headless.ts +19 -12
- package/src/plugins/builtin/perps/markets-section.tsx +19 -15
- package/src/plugins/builtin/perps/model.ts +14 -5
- package/src/plugins/builtin/portfolio-list/cached-account.ts +3 -1
- package/src/plugins/builtin/portfolio-list/cli/import-positions.ts +6 -18
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +1 -1
- package/src/plugins/builtin/portfolio-list/pane/purchase-date-fx.ts +1 -1
- package/src/plugins/builtin/portfolio-list/positions-import/index.tsx +1 -1
- package/src/plugins/builtin/portfolio-list/positions-import/lookup.ts +28 -57
- package/src/plugins/builtin/portfolio-list/settings.ts +4 -3
- package/src/plugins/builtin/portfolio-list/table.tsx +19 -2
- 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 +4 -1
- 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 +3 -4
- 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 +140 -0
- package/src/plugins/builtin/research/event-detail.tsx +442 -0
- package/src/plugins/builtin/research/event-model.ts +338 -39
- 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 +39 -14
- package/src/plugins/builtin/research/relative-valuation-headless.ts +9 -5
- 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/flow-pane.tsx +10 -0
- package/src/plugins/builtin/scanner/headless.ts +2 -0
- package/src/plugins/builtin/scanner/lock-note.ts +5 -9
- package/src/plugins/builtin/sec/exchange-filings.ts +69 -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 +169 -61
- package/src/plugins/builtin/sec/model.ts +10 -4
- package/src/plugins/builtin/sec/row-summaries.ts +1 -0
- 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/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/history-span.ts +2 -1
- package/src/plugins/builtin/shared/locked-rows.tsx +1 -1
- package/src/plugins/builtin/shared/pro-lock-note.ts +8 -12
- package/src/plugins/builtin/shared/report-freshness.ts +4 -1
- package/src/plugins/builtin/shared/ticker-request.ts +4 -2
- 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/outliers-model.ts +2 -1
- 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 +299 -31
- package/src/plugins/builtin/thirteenf/data.ts +126 -32
- package/src/plugins/builtin/thirteenf/format.ts +4 -6
- package/src/plugins/builtin/thirteenf/headless.ts +68 -29
- 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 +17 -4
- 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/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 +35 -5
- package/src/plugins/builtin/ticker-detail/financials/exchange-table.tsx +61 -0
- package/src/plugins/builtin/ticker-detail/financials/model.ts +210 -43
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +69 -8
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +64 -10
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +132 -68
- package/src/plugins/builtin/ticker-detail/headless.ts +37 -13
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +75 -14
- package/src/plugins/builtin/ticker-detail/overview/model.ts +87 -35
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +14 -8
- package/src/plugins/builtin/ticker-detail/overview/types.ts +2 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +50 -17
- package/src/plugins/builtin/ticker-detail/pane.tsx +5 -3
- 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/time-sales/headless.ts +3 -3
- package/src/plugins/builtin/time-sales/model.ts +16 -9
- package/src/plugins/builtin/time-sales/pane.tsx +27 -24
- 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/treasury-daily/client.ts +43 -9
- package/src/plugins/builtin/treasury-daily/pane.tsx +48 -27
- package/src/plugins/builtin/treasury-daily/resource.ts +33 -0
- package/src/plugins/builtin/vol-surface/charts.tsx +3 -1
- package/src/plugins/builtin/vol-surface/events.ts +8 -5
- package/src/plugins/builtin/vol-surface/evidence.ts +2 -2
- package/src/plugins/builtin/vol-surface/headless.ts +46 -28
- 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 +35 -67
- 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/headless.ts +5 -3
- package/src/plugins/builtin/world-venue-map/headless.ts +15 -1
- 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/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/marketplace/feed.ts +3 -2
- package/src/plugins/registry/contributions.ts +37 -10
- package/src/plugins/registry/index.ts +2 -1
- package/src/portfolio/column-values.ts +8 -9
- package/src/portfolio/positions-import/parse.ts +14 -6
- package/src/portfolio/positions-import/plan.ts +3 -2
- package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
- package/src/public/i18n.ts +3 -2
- package/src/react/async-resource.ts +3 -1
- package/src/renderers/dom/css.d.ts +1 -0
- package/src/renderers/dom/data-table/index.tsx +100 -8
- package/src/renderers/dom/data-table/row.tsx +40 -4
- package/src/renderers/dom/desktop/icons.tsx +147 -3
- package/src/renderers/dom/desktop/popover.tsx +2 -2
- package/src/renderers/dom/host/media-surface.tsx +204 -45
- package/src/renderers/dom/host/tabs.tsx +1 -0
- package/src/renderers/dom/styles.css +14 -2
- package/src/renderers/electrobun/bun/desktop/backend.ts +14 -1
- package/src/renderers/electrobun/bun/desktop/rpc-timing.ts +9 -3
- package/src/renderers/electrobun/shared/protocol.ts +2 -0
- package/src/renderers/electrobun/view/backend-rpc.ts +5 -2
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +7 -1
- package/src/renderers/electrobun/view/remote/asset-data-client.ts +2 -0
- package/src/renderers/electrobun/view/rpc-timeout.ts +44 -3
- package/src/sources/gloomberb-cloud/batched-lookups.ts +12 -1
- package/src/sources/gloomberb-cloud/index.ts +44 -10
- package/src/sources/gloomberb-cloud/normalizers.ts +8 -2
- package/src/sources/listing-symbols.ts +7 -1
- package/src/sources/provider-router/cache.ts +5 -4
- package/src/sources/provider-router/financials.ts +44 -22
- package/src/sources/provider-router/index.ts +9 -1
- package/src/state/app/context/index.tsx +12 -4
- package/src/state/app/tab-cursor.ts +47 -6
- 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/telemetry/stall-clocks.ts +3 -0
- package/src/telemetry/stall-reports.ts +12 -3
- package/src/telemetry/windows-process-activity.ts +41 -0
- package/src/telemetry/windows-time.ts +32 -0
- package/src/test-support/cloud-api.ts +34 -0
- package/src/test-support/scoped-earnings.ts +24 -0
- package/src/test-support/strict-table-capture.tsx +83 -0
- package/src/tickers/search/index.ts +23 -7
- package/src/tickers/terminal-codes.ts +1 -6
- package/src/time-series/alignment.ts +14 -4
- package/src/time-series/base-series.ts +5 -4
- package/src/time-series/chart-data.ts +2 -0
- package/src/time-series/chart-seed.ts +3 -1
- package/src/time-series/daily-valuation.ts +13 -6
- package/src/time-series/filed-trailing-eps.ts +16 -3
- package/src/time-series/fundamentals/current-valuation.ts +30 -5
- package/src/time-series/fundamentals/historical-valuation.ts +20 -0
- 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 +13 -1
- package/src/time-series/market.ts +30 -4
- package/src/time-series/price-comparison.ts +39 -60
- package/src/time-series/resolve.ts +18 -11
- 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 +2 -1
- package/src/time-series/use-chart-resolution.ts +32 -14
- package/src/time-series/valuation-currency.ts +2 -0
- package/src/types/config.ts +13 -61
- package/src/types/data-provider.ts +8 -0
- package/src/types/financials.ts +94 -15
- package/src/types/headless.ts +30 -0
- package/src/types/plugin-context.ts +8 -1
- package/src/ui/dialog-context.ts +8 -0
- package/src/utils/crypto-pair.ts +10 -0
- package/src/utils/datetime-format.ts +23 -1
- package/src/utils/day-format.ts +104 -0
- package/src/utils/declared-dividends.ts +12 -2
- package/src/utils/exchange-announcements.ts +38 -12
- package/src/utils/exchange-notation.generated.ts +3 -1
- package/src/utils/exchanges.ts +2 -1
- package/src/utils/financial-statements.ts +40 -46
- package/src/utils/format.ts +39 -12
- package/src/utils/forward-dividend.ts +2 -1
- package/src/utils/fundamentals.ts +1 -0
- package/src/utils/main-thread-stall.ts +9 -1
- package/src/utils/rpc-timeout-error.ts +36 -11
- package/src/utils/sec.ts +3 -1
- package/src/utils/share-multiples.ts +1 -1
- package/src/utils/stall-process-activity.ts +70 -0
- package/src/utils/statement-scope.ts +103 -0
- package/src/utils/trailing-dividend.ts +47 -0
- package/src/utils/trailing-eps.ts +1 -1
- package/src/utils/zoned-date-time.ts +1 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +0 -771
package/src/types/financials.ts
CHANGED
|
@@ -38,8 +38,8 @@ export interface QuoteProvenance {
|
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* A US listing that no longer trades, as Gloom Cloud states it: TWTR, last
|
|
41
|
-
* traded 2022-10-27
|
|
42
|
-
*
|
|
41
|
+
* traded 2022-10-27. Its daily history ends on that session; the last trade
|
|
42
|
+
* date is not the effective delisting date. Dates are New York trading dates.
|
|
43
43
|
*/
|
|
44
44
|
export interface ListingDelisting {
|
|
45
45
|
/** "delisted": the exchange's removal of the listing is on record; "inactive": only its last trade is known. */
|
|
@@ -205,6 +205,10 @@ export interface Quote extends DepositaryReceiptFacts {
|
|
|
205
205
|
regularChangePercent?: number;
|
|
206
206
|
/** Provider's exchange-local session date for the daily quote reference. */
|
|
207
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;
|
|
208
212
|
high52w?: number;
|
|
209
213
|
low52w?: number;
|
|
210
214
|
/**
|
|
@@ -499,6 +503,7 @@ export interface Fundamentals extends DepositaryReceiptFacts {
|
|
|
499
503
|
marketCapUnavailable?: "receipt-priced-as-ordinary";
|
|
500
504
|
operatingCashFlow?: number;
|
|
501
505
|
freeCashFlow?: number;
|
|
506
|
+
freeCashFlowCurrency?: string | null;
|
|
502
507
|
dividendYield?: number;
|
|
503
508
|
dividendYieldBasis?: "forward" | "trailing";
|
|
504
509
|
dividendYieldSource?: "gloom";
|
|
@@ -530,6 +535,7 @@ export interface Fundamentals extends DepositaryReceiptFacts {
|
|
|
530
535
|
*/
|
|
531
536
|
trailingEpsSource?: "filed-quarters" | "served";
|
|
532
537
|
trailingEpsPeriodEnd?: string;
|
|
538
|
+
scopedEarnings?: { eps: number; currency: string; periodEnd: string; epsAvailableAt: string; priced: boolean } | null;
|
|
533
539
|
/**
|
|
534
540
|
* Why a multiple is withdrawn though its figures are numbers (utils/share-multiples): a warrant's price over its
|
|
535
541
|
* company's EPS, a receipt's with no ratio on record, an EPS that is not net income over the shares. The multiple
|
|
@@ -688,17 +694,20 @@ export interface AnalystResearchData {
|
|
|
688
694
|
revenueEstimates: AnalystEstimateRecord[];
|
|
689
695
|
}
|
|
690
696
|
|
|
697
|
+
export interface DividendNoticeSource {
|
|
698
|
+
publisher: string;
|
|
699
|
+
url: string;
|
|
700
|
+
/** Original timetable when the final cash amount was published separately. */
|
|
701
|
+
scheduleUrl?: string;
|
|
702
|
+
}
|
|
703
|
+
|
|
691
704
|
export interface DividendAction {
|
|
692
705
|
exDate: string;
|
|
693
706
|
amount: number;
|
|
694
707
|
payDate?: string;
|
|
695
708
|
recordDate?: string;
|
|
696
|
-
/**
|
|
697
|
-
|
|
698
|
-
* sponsor, for a distribution the history lacks (iShares, SPDR, J.P. Morgan,
|
|
699
|
-
* VanEck), and the page it is published on. Absent elsewhere and from older servers.
|
|
700
|
-
*/
|
|
701
|
-
source?: { publisher: string; url: string };
|
|
709
|
+
/** Original notice or sponsor page, when it supplies facts for this row. */
|
|
710
|
+
source?: DividendNoticeSource;
|
|
702
711
|
/**
|
|
703
712
|
* The dividends the row holds by the issuer's own dividend announcement
|
|
704
713
|
* forms (an HKEX listing's): each in the row's currency, summing to its
|
|
@@ -721,6 +730,7 @@ export interface DeclaredDividendAction {
|
|
|
721
730
|
declarationDate?: string;
|
|
722
731
|
recordDate?: string;
|
|
723
732
|
payDate?: string;
|
|
733
|
+
source?: DividendNoticeSource;
|
|
724
734
|
/** A one-off beside the regular payments (AIOK's $3.50), as the server marks it. */
|
|
725
735
|
special?: true;
|
|
726
736
|
}
|
|
@@ -744,17 +754,30 @@ export interface SplitAction {
|
|
|
744
754
|
toFactor?: number;
|
|
745
755
|
}
|
|
746
756
|
|
|
757
|
+
/** A listing's share splits and nothing else of its corporate actions (`getSplitHistoryBatch`). */
|
|
758
|
+
export interface SplitHistory {
|
|
759
|
+
symbol: string;
|
|
760
|
+
splits: SplitAction[];
|
|
761
|
+
/** `unavailable`: the splits could not be read, which says nothing about whether the listing split. */
|
|
762
|
+
coverage: "available" | "unavailable";
|
|
763
|
+
}
|
|
764
|
+
|
|
747
765
|
/**
|
|
748
766
|
* How a reported EPS relates to the company's statements: `gaap` is the
|
|
749
767
|
* quarter's diluted EPS as the statements report it; `adjusted` is the
|
|
750
768
|
* consensus-basis figure, which leaves out items the statements include.
|
|
751
769
|
*/
|
|
752
|
-
export type EarningsEpsBasis = "gaap" | "adjusted";
|
|
770
|
+
export type EarningsEpsBasis = "gaap" | "adjusted" | "company-adjusted";
|
|
771
|
+
|
|
772
|
+
export interface FilingEpsDetails {
|
|
773
|
+
gaapEps?: number;
|
|
774
|
+
streetEps?: { actual: number; estimate: number | null; analysts: number | null; actualBasis: "including-stock-compensation" };
|
|
775
|
+
}
|
|
753
776
|
|
|
754
777
|
/** A report that is out, a date the company announced, or a date projected from its past reports. */
|
|
755
778
|
export type EarningsDateStatus = "reported" | "confirmed" | "projected";
|
|
756
779
|
|
|
757
|
-
export interface EarningsAction {
|
|
780
|
+
export interface EarningsAction extends FilingEpsDetails {
|
|
758
781
|
date: string;
|
|
759
782
|
/** Known release/acceptance timestamp, when the calendar has one. */
|
|
760
783
|
reportedAt?: string;
|
|
@@ -773,7 +796,7 @@ export interface EarningsAction {
|
|
|
773
796
|
epsBasis?: EarningsEpsBasis | null;
|
|
774
797
|
dateStatus?: EarningsDateStatus;
|
|
775
798
|
/** `press-release` when `epsActual` is the company's release's, provisional until the calendar has the quarter. */
|
|
776
|
-
epsActualSource?: "press-release";
|
|
799
|
+
epsActualSource?: "press-release" | "filing";
|
|
777
800
|
}
|
|
778
801
|
|
|
779
802
|
export interface CorporateActionsData {
|
|
@@ -906,14 +929,24 @@ export type ResultsFillField =
|
|
|
906
929
|
|
|
907
930
|
export type StatementFilingKind = "annual_results" | "interim_results" | "quarterly_results" | "annual_report" | "interim_report";
|
|
908
931
|
|
|
909
|
-
/**
|
|
932
|
+
/** An issuer's results announcement or report, with when it was published and read. */
|
|
910
933
|
export interface StatementFilingDocument {
|
|
911
|
-
source: "hkex" | "sgx" | "lse" | "cninfo" | "ir";
|
|
934
|
+
source: "hkex" | "sgx" | "lse" | "cninfo" | "idx" | "ir" | "mops" | "jpx" | "dart" | "nse";
|
|
912
935
|
kind: StatementFilingKind;
|
|
913
936
|
title: string;
|
|
937
|
+
accountingScope?: "consolidated" | "individual";
|
|
914
938
|
url: string;
|
|
915
939
|
publishedAt: string;
|
|
940
|
+
firstObserved?: true;
|
|
916
941
|
fetchedAt: string;
|
|
942
|
+
dateBasis?: "catalogue";
|
|
943
|
+
dataUrl?: string;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
/** The original report for a fiscal period, independent of the source of each normalized figure. */
|
|
947
|
+
export interface StatementPeriodFiling extends StatementFilingDocument {
|
|
948
|
+
periodEnd: string;
|
|
949
|
+
periodMonths: number;
|
|
917
950
|
}
|
|
918
951
|
|
|
919
952
|
/** A row's lines read from the company's results announcement or report, for a period the statements source lags on. */
|
|
@@ -923,8 +956,15 @@ export interface ResultsStatementFill {
|
|
|
923
956
|
fields: ResultsFillField[];
|
|
924
957
|
/** The documents, the one each line was read from first: the row is dated by the earliest publication. */
|
|
925
958
|
documents: StatementFilingDocument[];
|
|
926
|
-
/** Per line, its document
|
|
927
|
-
lines: Partial<Record<ResultsFillField, {
|
|
959
|
+
/** Per line, its document index and location in the original document. */
|
|
960
|
+
lines: Partial<Record<ResultsFillField, {
|
|
961
|
+
document: number;
|
|
962
|
+
page: number | null;
|
|
963
|
+
subtract?: { document: number; page: number | null };
|
|
964
|
+
xbrl?: { concept: string; context: string };
|
|
965
|
+
subtractDocument?: number;
|
|
966
|
+
location?: { sheet: string; cell: string };
|
|
967
|
+
}>>;
|
|
928
968
|
/** The months the row's flows cover where the list's usual is another: 6 for a half in the quarterly list. */
|
|
929
969
|
periodMonths?: number;
|
|
930
970
|
/** A quarter derived as the difference of two year-to-date periods ("6 months to 2026-06-30 − 3 months to 2026-03-31"). */
|
|
@@ -934,6 +974,15 @@ export interface ResultsStatementFill {
|
|
|
934
974
|
* earlier: the document restates that period's figure as the source has it.
|
|
935
975
|
*/
|
|
936
976
|
comparable?: ResultsFillField[];
|
|
977
|
+
/** Reported figures whose definitions differ from the statements provider. */
|
|
978
|
+
definitions?: Array<{
|
|
979
|
+
field: ResultsFillField;
|
|
980
|
+
periodEnd: string;
|
|
981
|
+
months: number;
|
|
982
|
+
currency: string;
|
|
983
|
+
announcements: number;
|
|
984
|
+
source: number;
|
|
985
|
+
}>;
|
|
937
986
|
/**
|
|
938
987
|
* A quarter's lines left blank because the announcements count them otherwise than the statements
|
|
939
988
|
* source (HSBC's revenue): set beside the source's quarters around it, the change would measure that.
|
|
@@ -1044,7 +1093,15 @@ export interface ReportedEarningsCohort {
|
|
|
1044
1093
|
/** @deprecated No longer populated. */
|
|
1045
1094
|
export interface EarningsResultProvenance { version: 1; reported: ReportedEarningsCohort }
|
|
1046
1095
|
|
|
1096
|
+
export interface StatementScope {
|
|
1097
|
+
registrant: string;
|
|
1098
|
+
entity?: string;
|
|
1099
|
+
basis: "predecessor" | "carve-out" | "standalone";
|
|
1100
|
+
label: string;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1047
1103
|
export interface FinancialStatement {
|
|
1104
|
+
statementScope?: StatementScope;
|
|
1048
1105
|
/** The basis of this row's share counts and per-share earnings; absent when unproven. */
|
|
1049
1106
|
shareBasis?: ShareBasis;
|
|
1050
1107
|
/** @deprecated No longer populated. */
|
|
@@ -1274,6 +1331,7 @@ export interface PricePoint {
|
|
|
1274
1331
|
volumeBasis?: string;
|
|
1275
1332
|
/** The bar's period had not ended when it was served: its close is the latest price, and it may have no volume yet. */
|
|
1276
1333
|
partial?: boolean;
|
|
1334
|
+
quoteOnly?: true;
|
|
1277
1335
|
/** The bar's prices were rebuilt from shorter bars where the source left it empty or too coarse. */
|
|
1278
1336
|
filled?: boolean;
|
|
1279
1337
|
/** A future's session that has closed but whose settlement is not confirmed yet: its close is the last trade. */
|
|
@@ -1352,7 +1410,18 @@ export interface EpsEstimateHistory {
|
|
|
1352
1410
|
snapshots: ConsensusEpsSnapshot[];
|
|
1353
1411
|
}
|
|
1354
1412
|
|
|
1413
|
+
export interface TaiwanExchangeStatement {
|
|
1414
|
+
kind: "income" | "balance";
|
|
1415
|
+
periodEnd: string;
|
|
1416
|
+
months: number;
|
|
1417
|
+
currency: "TWD";
|
|
1418
|
+
figures: { label: string; sourceLabel: string; value: number; perShare?: true }[];
|
|
1419
|
+
source: { venue: "TWSE" | "TPEX"; url: string; snapshotDate: string; observedAt: string };
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1355
1422
|
export interface TickerFinancials {
|
|
1423
|
+
statementScope?: StatementScope;
|
|
1424
|
+
statementReview?: { status: "reviewed" | "pending" | "index-unavailable"; reviewedThrough: string };
|
|
1356
1425
|
/** Reported earnings-release events retained with daily valuation snapshots. */
|
|
1357
1426
|
earningsReleases?: EarningsAction[];
|
|
1358
1427
|
statementHistory?: StatementHistoryAttempt;
|
|
@@ -1369,6 +1438,9 @@ export interface TickerFinancials {
|
|
|
1369
1438
|
nextEarnings?: NextEarnings;
|
|
1370
1439
|
annualStatements: FinancialStatement[];
|
|
1371
1440
|
quarterlyStatements: FinancialStatement[];
|
|
1441
|
+
periodFilings?: StatementPeriodFiling[];
|
|
1442
|
+
/** Exchange summaries have their own reporting basis and do not enter the normalized statements. */
|
|
1443
|
+
taiwanExchangeStatements?: TaiwanExchangeStatement[];
|
|
1372
1444
|
/** Twelve months to the latest half or quarter where the quarters do not give them (a half-yearly reporter). */
|
|
1373
1445
|
trailingStatement?: FinancialStatement & { trailing: StatementTrailing };
|
|
1374
1446
|
priceHistory: PricePoint[];
|
|
@@ -1423,6 +1495,13 @@ export interface OptionContract {
|
|
|
1423
1495
|
* implied volatility, greek or surface point is read from it.
|
|
1424
1496
|
*/
|
|
1425
1497
|
quoteStale?: boolean;
|
|
1498
|
+
/**
|
|
1499
|
+
* The source's bid was above its ask, which no one can trade. After a
|
|
1500
|
+
* stock's options close at 16:00 New York some exchanges keep quoting while
|
|
1501
|
+
* the others' closing quotes stand, and a move after the close crosses the
|
|
1502
|
+
* two. Gloom Cloud serves such a quote with bid and ask 0, `quoteStale` set.
|
|
1503
|
+
*/
|
|
1504
|
+
quoteCrossed?: boolean;
|
|
1426
1505
|
/**
|
|
1427
1506
|
* A contract adjusted for a corporate action (root ETHA1 beside ETHA): it
|
|
1428
1507
|
* prices another deliverable, so a chain lists it only when asked to, with
|
package/src/types/headless.ts
CHANGED
|
@@ -253,6 +253,13 @@ export interface HeadlessPaneColumn {
|
|
|
253
253
|
* the width, never wrapped (a story's summary under its headline).
|
|
254
254
|
*/
|
|
255
255
|
underRow?: boolean | "line";
|
|
256
|
+
/** The text report leaves the column out while every row prints it blank or as MISSING_VALUE (DataTableColumn.omitWhenEmpty); exports keep it. */
|
|
257
|
+
omitWhenEmpty?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* The text report leaves the column out while every row, two or more, prints the same text in it
|
|
260
|
+
* (DataTableColumn.omitWhenSame): set it only where the rows are all the report holds. Exports keep it.
|
|
261
|
+
*/
|
|
262
|
+
omitWhenSame?: boolean;
|
|
256
263
|
}
|
|
257
264
|
|
|
258
265
|
export interface HeadlessPaneEntry {
|
|
@@ -542,6 +549,12 @@ interface HeadlessPaneResultBase {
|
|
|
542
549
|
* `complete: false` says when the report does not cover what was asked.
|
|
543
550
|
*/
|
|
544
551
|
notes?: string[];
|
|
552
|
+
/**
|
|
553
|
+
* The notes as the text report prints them, one for each of `notes` in
|
|
554
|
+
* order, where it writes their days first as the pane does. JSON, CSV and
|
|
555
|
+
* NDJSON keep `notes`.
|
|
556
|
+
*/
|
|
557
|
+
textNotes?: string[];
|
|
545
558
|
/**
|
|
546
559
|
* What the report could not do as it was asked and did instead, such as a
|
|
547
560
|
* bar size the source does not serve for the range: `fn` prints each on
|
|
@@ -549,6 +562,12 @@ interface HeadlessPaneResultBase {
|
|
|
549
562
|
*/
|
|
550
563
|
warnings?: string[];
|
|
551
564
|
metadata?: Record<string, unknown>;
|
|
565
|
+
/**
|
|
566
|
+
* The notices (`metadata.notices`) as the text report prints them, one for
|
|
567
|
+
* each in order, days first as the pane writes them. JSON and the exports
|
|
568
|
+
* keep `metadata.notices`.
|
|
569
|
+
*/
|
|
570
|
+
textNotices?: string[];
|
|
552
571
|
/**
|
|
553
572
|
* Options the load settled from what it was given rather than from a flag
|
|
554
573
|
* (AUCT's market, from a search naming Hong Kong's paper): the report's
|
|
@@ -581,6 +600,8 @@ export interface HeadlessRowsResult extends HeadlessPaneResultBase {
|
|
|
581
600
|
rows: HeadlessPaneRow[];
|
|
582
601
|
/** The rows `textColumns` read, when the text report adds lines that are no record (the position under its lots); `rows` when absent. CSV, NDJSON and JSON keep `rows`. */
|
|
583
602
|
textRows?: HeadlessPaneRow[];
|
|
603
|
+
/** Replace full-report text rows and sections with the selected records when a row window is requested. */
|
|
604
|
+
textRowsUseRecordsWhenWindowed?: boolean;
|
|
584
605
|
/** What the report says when `rows` is empty, in place of "No data.": why there are none. */
|
|
585
606
|
empty?: string;
|
|
586
607
|
/**
|
|
@@ -635,6 +656,8 @@ export type HeadlessBundleSection =
|
|
|
635
656
|
textColumns?: HeadlessPaneColumn[];
|
|
636
657
|
/** The rows `textColumns` read, when the pane's rows are not the records (one per holding and scenario shock); `rows` when absent. */
|
|
637
658
|
textRows?: HeadlessPaneRow[];
|
|
659
|
+
/** Default text-only preview. An explicit row window replaces it. */
|
|
660
|
+
textPreview?: { title: string; limit: number };
|
|
638
661
|
/**
|
|
639
662
|
* The currency or unit the rows' figures are in (`USD per 1% move`),
|
|
640
663
|
* which every exported row names in `currency_or_unit`.
|
|
@@ -729,6 +752,8 @@ export interface HeadlessBundleResult extends HeadlessPaneResultBase {
|
|
|
729
752
|
|
|
730
753
|
export interface HeadlessSeriesPoint extends HeadlessPaneRow {
|
|
731
754
|
date: string | number | Date;
|
|
755
|
+
availableAt?: string | number | Date;
|
|
756
|
+
barStart?: string | number | Date;
|
|
732
757
|
nativeAmount?: { value: number; currency: string };
|
|
733
758
|
value?: number | null;
|
|
734
759
|
open?: number | null;
|
|
@@ -753,6 +778,7 @@ export interface HeadlessSeries {
|
|
|
753
778
|
name?: string;
|
|
754
779
|
/** Explicit unit of the point values; report formatting does not rescale them. */
|
|
755
780
|
unit?: string;
|
|
781
|
+
unitGroup?: string;
|
|
756
782
|
/** The symbol or series ID the series was asked for as (`USDZAR=X`, `DEXSFUS`), which exports name each row by. */
|
|
757
783
|
symbol?: string;
|
|
758
784
|
/** The bar interval or observation frequency the points are at (`1d`, `1mo`, `daily`), as served, not as asked. */
|
|
@@ -816,6 +842,8 @@ export interface HeadlessPaneResultByShape {
|
|
|
816
842
|
|
|
817
843
|
export interface HeadlessPaneDefinition<Shape extends HeadlessPaneShape = HeadlessPaneShape> {
|
|
818
844
|
shape: Shape;
|
|
845
|
+
/** New portable CSV columns that follow even the existing export_notes column. */
|
|
846
|
+
csvTrailingColumns?: readonly string[];
|
|
819
847
|
/** Optional discovery information; executors derive the rest from the definition. */
|
|
820
848
|
discovery?: {
|
|
821
849
|
id?: string;
|
|
@@ -862,6 +890,8 @@ export interface HeadlessPaneDefinition<Shape extends HeadlessPaneShape = Headle
|
|
|
862
890
|
* in the US never shows that company's numbers.
|
|
863
891
|
*/
|
|
864
892
|
usListingsOnly?: string;
|
|
893
|
+
/** Home venues where the function has its own local source. */
|
|
894
|
+
additionalListingVenues?: readonly string[];
|
|
865
895
|
/**
|
|
866
896
|
* The data covers US over-the-counter lines too (FINRA's short interest
|
|
867
897
|
* and weekly off-exchange volume, the SEC's fails to deliver, daily
|
|
@@ -6,7 +6,7 @@ import type { SeriesDefinition } from "../series/types";
|
|
|
6
6
|
import type { SyncContributor, SyncTransport } from "../sync/types";
|
|
7
7
|
import type { PluginLogger } from "../utils/debug-log";
|
|
8
8
|
import type { BrokerAdapter } from "./broker";
|
|
9
|
-
import type { BrokerInstanceConfig } from "./config";
|
|
9
|
+
import type { BrokerExcludedAccount, BrokerInstanceConfig } from "./config";
|
|
10
10
|
import type { DataProvider } from "./data-provider";
|
|
11
11
|
import type { TickerFinancials } from "./financials";
|
|
12
12
|
import type { BrokerContractRef, TickerListingRef } from "./instrument";
|
|
@@ -35,6 +35,13 @@ export interface BrokerInstanceUpdateOptions {
|
|
|
35
35
|
replaceConfig?: boolean;
|
|
36
36
|
/** Keep this connection's data on this device, out of Gloom Cloud sync (`BrokerInstanceConfig.localOnly`). */
|
|
37
37
|
localOnly?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The accounts to leave out of Gloom (`BrokerInstanceConfig.excludedAccounts`); an empty list takes
|
|
40
|
+
* every account back. Their portfolios go at once; sync the profile to bring back one taken back.
|
|
41
|
+
* A list that would leave out every account the profile is known to have is refused (the update
|
|
42
|
+
* throws and changes nothing): keep one, or disable the profile instead.
|
|
43
|
+
*/
|
|
44
|
+
excludedAccounts?: BrokerExcludedAccount[];
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
export interface BrokerInstanceCreateOptions {
|
package/src/ui/dialog-context.ts
CHANGED
|
@@ -22,3 +22,11 @@ export const DialogContext = createContext<DialogContextValue | null>(null);
|
|
|
22
22
|
export function useDialogIsTopmost(): boolean {
|
|
23
23
|
return useContext(DialogContext)?.keyboardEnabled ?? true;
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* True while any dialog is open, so it has the keyboard. False outside a
|
|
28
|
+
* dialog host (a pane drawn on its own), where `useDialogState` throws.
|
|
29
|
+
*/
|
|
30
|
+
export function useAnyDialogOpen(): boolean {
|
|
31
|
+
return useContext(DialogContext)?.isOpen ?? false;
|
|
32
|
+
}
|
package/src/utils/crypto-pair.ts
CHANGED
|
@@ -229,6 +229,16 @@ export const MAJOR_COIN_NAMES: ReadonlyMap<string, string> = new Map([
|
|
|
229
229
|
["BNB", "BNB"],
|
|
230
230
|
]);
|
|
231
231
|
|
|
232
|
+
export function exactCoinNameListing(query: string): { symbol: string; name: string } | null {
|
|
233
|
+
const name = query.trim().toLowerCase();
|
|
234
|
+
for (const [code, coin] of MAJOR_COIN_NAMES) {
|
|
235
|
+
if (coin.toLowerCase() === name && code.toLowerCase() !== name) {
|
|
236
|
+
return { symbol: `${code}-USD`, name: coin.replace(/\b[a-z]/g, (letter) => letter.toUpperCase()) };
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
|
|
232
242
|
/**
|
|
233
243
|
* The largest coins by market value, stablecoins and gold tokens left out, with
|
|
234
244
|
* how a note names each: the coins whose bare ticker a listed company or fund
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MISSING_VALUE } from "./format";
|
|
2
2
|
import { toTimestampMillis } from "./timestamp";
|
|
3
|
-
import { timeZoneLabel } from "./zoned-date-time";
|
|
3
|
+
import { timeZoneLabel, zonedDateTimeParts } from "./zoned-date-time";
|
|
4
4
|
|
|
5
5
|
export type DisplayDateValue = Date | string | number | null | undefined;
|
|
6
6
|
|
|
@@ -272,3 +272,25 @@ export function formatDetailTime(value: DisplayDateValue, fallback = MISSING_VAL
|
|
|
272
272
|
if (!date) return fallback;
|
|
273
273
|
return `${formatClockTime(date, fallback, timeZone)} ${localTimeZoneShortName(date, timeZone)}`;
|
|
274
274
|
}
|
|
275
|
+
|
|
276
|
+
const zonedDayFormatters = new Map<string, Intl.DateTimeFormat>();
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* An instant on the host's clock (or `timeZone`'s) with its day and zone
|
|
280
|
+
* named, the year only when it is not this one: "20 Nov 14:30 HKT", "3 Mar
|
|
281
|
+
* 2025 09:31 ET". For one moment several panes name on the same clock, such
|
|
282
|
+
* as the tab's pinned crosshair, whatever clock their own rows read on.
|
|
283
|
+
*/
|
|
284
|
+
export function formatZonedMoment(value: DisplayDateValue, now = Date.now(), timeZone?: string): string {
|
|
285
|
+
const date = parseDisplayDate(value);
|
|
286
|
+
if (!date) return MISSING_VALUE;
|
|
287
|
+
const zone = timeZone ?? new Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
|
|
288
|
+
const withYear = zonedDateTimeParts(date.getTime(), zone).year !== zonedDateTimeParts(now, zone).year;
|
|
289
|
+
const key = `${zone}:${withYear}`;
|
|
290
|
+
let formatter = zonedDayFormatters.get(key);
|
|
291
|
+
if (!formatter) {
|
|
292
|
+
formatter = new Intl.DateTimeFormat("en-US", { day: "numeric", month: "short", year: withYear ? "numeric" : undefined, timeZone: zone });
|
|
293
|
+
zonedDayFormatters.set(key, formatter);
|
|
294
|
+
}
|
|
295
|
+
return `${dayFirstParts(formatter, date)} ${formatDetailTime(date, MISSING_VALUE, zone)}`;
|
|
296
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { formatFilingDate, formatShortDate, parseDisplayDate, type DisplayDateValue } from "./datetime-format";
|
|
2
|
+
import { MISSING_VALUE } from "./format";
|
|
3
|
+
|
|
4
|
+
const ISO_DAY = /^(\d{4}-\d{2}-\d{2})(?:$|[T ])/;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The calendar day a value names, as an ISO day (`2026-08-21`): the day an
|
|
8
|
+
* ISO date or timestamp string starts with, as written, or a Date or epoch
|
|
9
|
+
* read in UTC. Null for anything else, a month (`2026-10`) or a word included.
|
|
10
|
+
*/
|
|
11
|
+
export function isoDay(value: unknown): string | null {
|
|
12
|
+
if (typeof value === "string") return ISO_DAY.exec(value.trim())?.[1] ?? null;
|
|
13
|
+
const date = value instanceof Date || typeof value === "number" ? parseDisplayDate(value) : null;
|
|
14
|
+
return date ? date.toISOString().slice(0, 10) : null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** `21 Aug 2026`, or `21 Aug` where a column has no room for the year. */
|
|
18
|
+
export type DayCellForm = "full" | "no-year";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A calendar day as every table, and the text report beside it, writes one
|
|
22
|
+
* (docs/pane-conventions.md, "One date format"): `21 Aug 2026`, `21 Aug`.
|
|
23
|
+
* Text that names no day (`TBD`) is kept; nothing is the dash.
|
|
24
|
+
*/
|
|
25
|
+
export function formatDay(value: unknown, form: DayCellForm = "full"): string {
|
|
26
|
+
const day = isoDay(value);
|
|
27
|
+
if (!day) return typeof value === "string" && value.trim() ? value : MISSING_VALUE;
|
|
28
|
+
return form === "no-year" ? formatShortDate(day, { year: false, day: "2-digit", utc: true }) : formatFilingDate(day);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const ISO_DAYS_IN_TEXT = /\b\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])\b/g;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Words with every ISO day in them written day first, for a figure's dated
|
|
35
|
+
* detail (`2026-10-16 close` is `16 Oct 2026 close`). A timestamp's day
|
|
36
|
+
* (`2026-10-16T13:21Z`) is not a day on its own and stays as it is.
|
|
37
|
+
*/
|
|
38
|
+
export function formatDaysInText(text: string, form: DayCellForm = "full"): string {
|
|
39
|
+
return text.replace(ISO_DAYS_IN_TEXT, (day) => formatDay(day, form));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
43
|
+
const DAY_TEXT = /^(\d{2}) ([A-Z][a-z]{2}) (\d{4})$/;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The ISO day `formatDay` wrote (`21 Aug 2026` is `2026-08-21`), so an export
|
|
47
|
+
* of a drawn day keeps the day; null for other text, a day no calendar has
|
|
48
|
+
* (`31 Feb 2026`) included.
|
|
49
|
+
*/
|
|
50
|
+
export function dayFromText(text: string): string | null {
|
|
51
|
+
const match = DAY_TEXT.exec(text.trim());
|
|
52
|
+
const month = match ? MONTHS.indexOf(match[2]!) : -1;
|
|
53
|
+
if (!match || month < 0) return null;
|
|
54
|
+
const day = Number(match[1]);
|
|
55
|
+
if (new Date(Date.UTC(Number(match[3]), month, day)).getUTCDate() !== day) return null;
|
|
56
|
+
return `${match[3]}-${String(month + 1).padStart(2, "0")}-${match[1]}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const DAYS_IN_TEXT = /\b(\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4})\b/g;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Words with every day `formatDaysInText` wrote day first back as ISO days, as
|
|
63
|
+
* an export writes them (`ended 16 Nov 2026` is `ended 2026-11-16`). A day
|
|
64
|
+
* without its year (`16 Nov`) stays as it is.
|
|
65
|
+
*/
|
|
66
|
+
export function isoDaysInText(text: string): string {
|
|
67
|
+
return text.replace(DAYS_IN_TEXT, (day) => dayFromText(day) ?? day);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const DAY_TIME_TEXT = /^(\d{2} [A-Z][a-z]{2} \d{4}) ([01]\d|2[0-3]):([0-5]\d)( UTC)?$/;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A day or instant a table drew day first, as an export writes it: `21 Aug
|
|
74
|
+
* 2026` is `2026-08-21`, `09 Oct 2026 13:21` is `2026-10-09 13:21`, and a
|
|
75
|
+
* zone it names stays (`09 Oct 2026 13:21 UTC` is `2026-10-09 13:21 UTC`).
|
|
76
|
+
* Null for any other text: a day without its year (`21 Aug`), or words or a
|
|
77
|
+
* figure around a day.
|
|
78
|
+
*/
|
|
79
|
+
export function isoFromDayText(text: string): string | null {
|
|
80
|
+
const trimmed = text.trim();
|
|
81
|
+
const timed = DAY_TIME_TEXT.exec(trimmed);
|
|
82
|
+
if (!timed) return dayFromText(trimmed);
|
|
83
|
+
const day = dayFromText(timed[1]!);
|
|
84
|
+
return day ? `${day} ${timed[2]}:${timed[3]}${timed[4] ?? ""}` : null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const dayTimeFormatters = new Map<string, Intl.DateTimeFormat>();
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* An instant as a table writes it beside its day: `09 Oct 2026 13:21`, the day
|
|
91
|
+
* first as every table's dates, in UTC unless a zone is given; the column's
|
|
92
|
+
* header names the zone (`LAST UTC`). The dash when there is none.
|
|
93
|
+
*/
|
|
94
|
+
export function formatDayTime(value: DisplayDateValue, timeZone = "UTC"): string {
|
|
95
|
+
const date = parseDisplayDate(value);
|
|
96
|
+
if (!date) return MISSING_VALUE;
|
|
97
|
+
let formatter = dayTimeFormatters.get(timeZone);
|
|
98
|
+
if (!formatter) {
|
|
99
|
+
formatter = new Intl.DateTimeFormat("en-US", { day: "2-digit", month: "short", year: "numeric", hour: "2-digit", minute: "2-digit", hourCycle: "h23", timeZone });
|
|
100
|
+
dayTimeFormatters.set(timeZone, formatter);
|
|
101
|
+
}
|
|
102
|
+
const parts = Object.fromEntries(formatter.formatToParts(date).map((part) => [part.type, part.value]));
|
|
103
|
+
return `${parts.day} ${parts.month} ${parts.year} ${parts.hour}:${parts.minute}`;
|
|
104
|
+
}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import type { CorporateActionsData, DeclaredDividendAction } from "../types/financials";
|
|
1
|
+
import type { CorporateActionsData, DeclaredDividendAction, DividendNoticeSource } from "../types/financials";
|
|
2
2
|
import { formatDistributionAmount } from "./format";
|
|
3
|
+
import { normalizedHttpUrl } from "./url";
|
|
3
4
|
|
|
4
5
|
const ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
5
6
|
/** A paid row this close to a declared one is that distribution, dated a day apart. */
|
|
6
7
|
const SAME_DISTRIBUTION_DAYS = 3;
|
|
7
8
|
const DAY_MS = 86_400_000;
|
|
8
9
|
|
|
10
|
+
export function dividendNoticeSource(raw: DividendNoticeSource | undefined): DividendNoticeSource | undefined {
|
|
11
|
+
const publisher = typeof raw?.publisher === "string" ? raw.publisher.trim() : "";
|
|
12
|
+
const url = normalizedHttpUrl(raw?.url);
|
|
13
|
+
if (!publisher || !url) return undefined;
|
|
14
|
+
const scheduleUrl = normalizedHttpUrl(raw?.scheduleUrl);
|
|
15
|
+
return { publisher, url, ...(scheduleUrl ? { scheduleUrl } : {}) };
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
export function declaredDividendCash(row: DeclaredDividendAction, currency?: string | null): { amount: string; estimate?: string } {
|
|
10
19
|
const cash = currency ? formatDistributionAmount(row.amount, currency) : String(row.amount);
|
|
11
20
|
const estimate = row.cashEstimate;
|
|
@@ -44,8 +53,9 @@ export function declaredDividends(
|
|
|
44
53
|
if ((payDate ?? exDate) < today) return [];
|
|
45
54
|
const at = Date.parse(`${exDate}T00:00:00Z`);
|
|
46
55
|
if (paid.some((time) => Math.abs(time - at) <= SAME_DISTRIBUTION_DAYS * DAY_MS)) return [];
|
|
56
|
+
const source = dividendNoticeSource(row.source);
|
|
47
57
|
return [{ exDate, amount: row.amount, ...declarationDate ? { declarationDate } : {},
|
|
48
58
|
...recordDate ? { recordDate } : {}, ...payDate ? { payDate } : {}, ...row.special === true ? { special: true as const } : {},
|
|
49
|
-
...row.cashEstimate ? { cashEstimate: row.cashEstimate } : {} }];
|
|
59
|
+
...row.cashEstimate ? { cashEstimate: row.cashEstimate } : {}, ...source ? { source } : {} }];
|
|
50
60
|
}).sort((left, right) => left.exDate.localeCompare(right.exDate));
|
|
51
61
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { listingSuffixExchange } from "../sources/listing-symbols";
|
|
2
|
-
import { canonicalExchange, parsePublicTickerKey } from "./exchanges";
|
|
2
|
+
import { canonicalExchange, parsePublicTickerKey, typedExchangeVenue } from "./exchanges";
|
|
3
|
+
import { nonUsSecListingVenue } from "./sec";
|
|
3
4
|
|
|
4
5
|
/** Where a listing's company announcements are published: the venue's page for the company, or its disclosure search. */
|
|
5
6
|
export interface ExchangeAnnouncementsPage {
|
|
@@ -11,6 +12,12 @@ export interface ExchangeAnnouncementsPage {
|
|
|
11
12
|
const EURONEXT = { name: "Euronext company news", url: "https://live.euronext.com/en/products/equities/company-news" };
|
|
12
13
|
const SEDAR = { name: "SEDAR+ filings", url: "https://www.sedarplus.ca/landingpage/" };
|
|
13
14
|
const NASDAQ_NORDIC = { name: "Nasdaq Nordic company news", url: "https://www.nasdaqomxnordic.com/news/companynews" };
|
|
15
|
+
const IDX_ALIASES = new Set(["IDX", "XIDX", "JKT"]);
|
|
16
|
+
|
|
17
|
+
export function exchangeAnnouncementsVenue(exchange?: string | null): string {
|
|
18
|
+
const venue = typedExchangeVenue(exchange ?? undefined) ?? canonicalExchange(exchange ?? undefined);
|
|
19
|
+
return IDX_ALIASES.has(venue) ? "JAKARTA" : venue;
|
|
20
|
+
}
|
|
14
21
|
|
|
15
22
|
/**
|
|
16
23
|
* The page each venue abroad publishes its listed companies' announcements
|
|
@@ -29,40 +36,59 @@ const PAGES: Readonly<Record<string, (code: string) => ExchangeAnnouncementsPage
|
|
|
29
36
|
SFB: () => NASDAQ_NORDIC, HEL: () => NASDAQ_NORDIC, CPH: () => NASDAQ_NORDIC, ICEX: () => NASDAQ_NORDIC,
|
|
30
37
|
XETRA: () => ({ name: "Unternehmensregister", url: "https://www.unternehmensregister.de/" }),
|
|
31
38
|
FWB2: () => PAGES.XETRA!(""),
|
|
39
|
+
HNX: (code) => ({ name: "Hanoi Stock Exchange issuer disclosures", url: `https://www.hnx.vn/cophieu-etfs/chi-tiet-chung-khoan-ny-${encodeURIComponent(code.toLowerCase())}.html?_des_tab=3` }),
|
|
40
|
+
HOSE: () => ({ name: "Ho Chi Minh Stock Exchange issuer disclosures", url: "https://www.hsx.vn/vi/tin-tuc/tin-to-chuc-niem-yet" }),
|
|
41
|
+
JAKARTA: () => ({ name: "Indonesia Stock Exchange disclosures", url: "https://www.idx.id/en/listed-companies/disclosure" }),
|
|
42
|
+
XPHS: () => ({ name: "Philippine Stock Exchange company announcements", url: "https://edge.pse.com.ph/announcements/form.do" }),
|
|
32
43
|
JPX: () => ({ name: "TDnet timely disclosures", url: "https://www.release.tdnet.info/inbs/I_main_00.html" }),
|
|
33
44
|
HKEX: () => ({ name: "HKEXnews", url: "https://www1.hkexnews.hk/search/titlesearch.xhtml?lang=en" }),
|
|
34
45
|
SWX: () => ({ name: "SIX Swiss Exchange", url: "https://www.six-group.com/en/market-data/news-tools/equity-issuer-news.html" }),
|
|
35
46
|
KRX: () => ({ name: "DART filings", url: "https://dart.fss.or.kr/" }),
|
|
36
47
|
KOSDAQ: () => PAGES.KRX!(""),
|
|
37
|
-
TWSE: () => ({ name: "MOPS filings", url: "https://
|
|
48
|
+
TWSE: () => ({ name: "MOPS filings", url: "https://doc.twse.com.tw/server-java/t57sb01" }),
|
|
38
49
|
TPEX: () => PAGES.TWSE!(""),
|
|
39
|
-
NSE: () => ({ name: "NSE corporate announcements", url: "https://www.nseindia.
|
|
50
|
+
NSE: () => ({ name: "NSE corporate announcements", url: "https://www.nseindia.in/companies-listing/corporate-filings-announcements" }),
|
|
40
51
|
BSE: () => ({ name: "BSE corporate announcements", url: "https://www.bseindia.com/corporates/ann.html" }),
|
|
52
|
+
BURSAMY: () => ({ name: "Bursa Malaysia company announcements", url: "https://www.bursamalaysia.com/market_information/announcements/company_announcement" }),
|
|
53
|
+
SSE: () => ({ name: "CNINFO filings", url: "https://www.cninfo.com.cn/new/index" }),
|
|
54
|
+
SZSE: () => PAGES.SSE!(""),
|
|
41
55
|
SGX: () => ({ name: "SGX company announcements", url: "https://www.sgx.com/securities/company-announcements" }),
|
|
42
56
|
SET: () => ({ name: "SET company news", url: "https://www.set.or.th/en/market/news-and-alert/news" }),
|
|
43
57
|
// The Public Disclosure Platform, where every Borsa Istanbul company files its disclosures.
|
|
44
58
|
BIST: () => ({ name: "KAP disclosures", url: "https://www.kap.org.tr/en/bildirim-sorgu" }),
|
|
45
59
|
};
|
|
46
60
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
61
|
+
export function issuerFilingSuffixVenue(symbol: string): string | undefined {
|
|
62
|
+
if (/^\d{4}\.KL$/i.test(symbol)) return "BURSAMY";
|
|
63
|
+
if (/^[A-Z]{4}\.JK$/i.test(symbol)) return "JAKARTA";
|
|
64
|
+
if (/^[A-Z0-9][A-Z0-9&-]*\.BK$/i.test(symbol)) return "SET";
|
|
65
|
+
return nonUsSecListingVenue(symbol) ?? undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** The overseas venue's disclosure page, when the listing has one. */
|
|
52
69
|
function exchangeAnnouncementsPage(symbol: string, exchange: string | null | undefined): ExchangeAnnouncementsPage | null {
|
|
53
|
-
const page = PAGES[
|
|
70
|
+
const page = PAGES[exchangeAnnouncementsVenue(exchange)];
|
|
54
71
|
const code = symbol.trim().toUpperCase();
|
|
55
72
|
return page && code ? page(code) : null;
|
|
56
73
|
}
|
|
57
74
|
|
|
75
|
+
const PUBLISHERS: Readonly<Record<string, string>> = {
|
|
76
|
+
TWSE: "MOPS", TPEX: "MOPS",
|
|
77
|
+
BURSAMY: "Bursa Malaysia",
|
|
78
|
+
JAKARTA: "Indonesia Stock Exchange",
|
|
79
|
+
XPHS: "Philippine Stock Exchange",
|
|
80
|
+
ASX: "ASX", CXA: "ASX", HKEX: "HKEXnews", SWX: "SIX Swiss Exchange", NSE: "NSE", SET: "SET",
|
|
81
|
+
JPX: "TDnet", HNX: "HNX", HOSE: "HOSE", KRX: "DART", KOSDAQ: "DART", SGX: "SGX", SSE: "CNINFO", SZSE: "CNINFO",
|
|
82
|
+
};
|
|
83
|
+
|
|
58
84
|
/**
|
|
59
85
|
* Who publishes the announcements Gloom Cloud lists for a listing on this
|
|
60
86
|
* venue, as a source line names them: "ASX" (and Cboe Australia's, which
|
|
61
87
|
* trade under ASX codes), "HKEXnews". Null for a venue it lists none for.
|
|
62
88
|
*/
|
|
63
89
|
export function exchangeAnnouncementsPublisher(exchange: string | null | undefined): string | null {
|
|
64
|
-
const venue =
|
|
65
|
-
return venue
|
|
90
|
+
const venue = exchangeAnnouncementsVenue(exchange);
|
|
91
|
+
return PUBLISHERS[venue] ?? null;
|
|
66
92
|
}
|
|
67
93
|
|
|
68
94
|
/** Whether Gloom Cloud lists the company's announcements on this venue (ASX, HKEX). */
|
|
@@ -92,7 +118,7 @@ export function isRoutineReturn(item: { category?: string | null }): boolean {
|
|
|
92
118
|
*/
|
|
93
119
|
export function listingAnnouncementsPage(key: string, exchange?: string | null): ExchangeAnnouncementsPage | null {
|
|
94
120
|
const parsed = parsePublicTickerKey(key.trim());
|
|
95
|
-
const suffixed = parsed.exchange ? null : listingSuffixExchange(parsed.symbol);
|
|
121
|
+
const suffixed = parsed.exchange ? null : listingSuffixExchange(parsed.symbol) ?? issuerFilingSuffixVenue(parsed.symbol);
|
|
96
122
|
const venue = parsed.exchange || suffixed || exchange;
|
|
97
123
|
const symbol = suffixed ? parsed.symbol.replace(/\.[A-Z]+$/i, "") : parsed.symbol;
|
|
98
124
|
const issuerPage = !listsExchangeAnnouncements(venue) && ISSUER_RESULTS_PAGES[`${symbol.toUpperCase()}:${canonicalExchange(venue ?? "")}`];
|