@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/i18n/zh-cn.ts
CHANGED
|
@@ -329,6 +329,7 @@ export const zhCN: Record<string, string> = {
|
|
|
329
329
|
"Compare": "对比",
|
|
330
330
|
"Comparison Chart": "对比图表",
|
|
331
331
|
"Financials": "财务报表",
|
|
332
|
+
"Statements": "三大报表",
|
|
332
333
|
"Financial Analysis": "财务分析",
|
|
333
334
|
"Fundamental Graph": "基本面图表",
|
|
334
335
|
"Valuation Graph": "估值图表",
|
|
@@ -344,9 +345,11 @@ export const zhCN: Record<string, string> = {
|
|
|
344
345
|
"Earnings Monitor": "财报监控",
|
|
345
346
|
"Economic Calendar": "经济日历",
|
|
346
347
|
"Corporate Actions": "公司行动",
|
|
348
|
+
"Dividend Yield": "股息率",
|
|
347
349
|
"Analyst Research": "分析师研究",
|
|
348
350
|
"Analyst": "分析师",
|
|
349
351
|
"Analysts": "分析师",
|
|
352
|
+
"Coverage": "机构评级",
|
|
350
353
|
"Filings": "文件",
|
|
351
354
|
"Ownership": "持股",
|
|
352
355
|
"People": "人员",
|
|
@@ -357,6 +360,7 @@ export const zhCN: Record<string, string> = {
|
|
|
357
360
|
"Insider Trading": "内部人交易",
|
|
358
361
|
"SEC": "SEC 文件",
|
|
359
362
|
"Notes": "笔记",
|
|
363
|
+
"Notebook": "记事本",
|
|
360
364
|
"Alerts": "提醒",
|
|
361
365
|
"Market Heatmap": "市场热力图",
|
|
362
366
|
"Market Movers": "市场异动",
|
|
@@ -1620,6 +1624,7 @@ export const zhCN: Record<string, string> = {
|
|
|
1620
1624
|
"Article or newsletter": "文章或新闻通讯",
|
|
1621
1625
|
"Where?": "在哪里?",
|
|
1622
1626
|
"Which account or post?": "哪个账号或帖子?",
|
|
1627
|
+
"Which AI, and what did you ask?": "你用了哪个 AI,问了什么?",
|
|
1623
1628
|
"Skip": "跳过",
|
|
1624
1629
|
"Equities": "股票",
|
|
1625
1630
|
"Futures & commodities": "期货与大宗商品",
|
|
@@ -1812,6 +1817,9 @@ export const zhCN: Record<string, string> = {
|
|
|
1812
1817
|
"Keep on this device": "保留在此设备上",
|
|
1813
1818
|
"Daily roundups, the weekly brief, position alerts, the mobile app and Ask Gloom will go without this account.": "每日汇总、每周简报、持仓提醒、移动应用和 Ask Gloom 将不再包含此账户。",
|
|
1814
1819
|
"Account data stays on this device, out of Gloom Cloud": "账户数据保留在此设备上,不上传到 Gloom Cloud",
|
|
1820
|
+
"Keep at least one account, or disable the profile.": "请至少保留一个账户,或停用此资料。",
|
|
1821
|
+
"1 account left out of Gloom": "1 个账户未纳入 Gloom",
|
|
1822
|
+
"{count} accounts left out of Gloom": "{count} 个账户未纳入 Gloom",
|
|
1815
1823
|
"{venue} open": "{venue} 盘中",
|
|
1816
1824
|
"{venue} lunch": "{venue} 午休",
|
|
1817
1825
|
"{venue} pre-market": "{venue} 盘前",
|
|
@@ -1853,4 +1861,105 @@ export const zhCN: Record<string, string> = {
|
|
|
1853
1861
|
"Pro stays on until {date}.": "Pro 将保留至 {date}。",
|
|
1854
1862
|
"Pro stays on until {date}. Cancelling now stops the renewal after that date.": "Pro 将保留至 {date}。现在取消会在该日期后停止续订。",
|
|
1855
1863
|
"Cancelled. Pro stays on until {date}.": "已取消。Pro 将保留至 {date}。",
|
|
1864
|
+
// ── Layout gallery, key bindings, tabs, diagnostics ──────────
|
|
1865
|
+
"Search or run a command": "搜索或运行命令",
|
|
1866
|
+
"Contact support": "联系支持",
|
|
1867
|
+
"Send the team a message, with a screenshot if it helps": "给团队留言,可附截图",
|
|
1868
|
+
"Try its mnemonic, such as HELP OMON, or a word from its name": "试试助记符(如 HELP OMON)或名称中的词",
|
|
1869
|
+
"Type a command, then choose Bind a key.": "输入命令,然后选择“绑定按键”。",
|
|
1870
|
+
"Sort by": "排序方式",
|
|
1871
|
+
"retry": "重试",
|
|
1872
|
+
"Resize sidebar": "调整侧栏宽度",
|
|
1873
|
+
"Open {label}": "打开 {label}",
|
|
1874
|
+
"Clear Filters": "清除筛选",
|
|
1875
|
+
"Loading {thing}...": "正在加载{thing}...",
|
|
1876
|
+
"{thing} unavailable.": "{thing}不可用。",
|
|
1877
|
+
"Nothing to show yet.": "暂无内容。",
|
|
1878
|
+
"New Tab": "新建标签页",
|
|
1879
|
+
"Close Tab": "关闭标签页",
|
|
1880
|
+
"Move Tab Left": "标签页左移",
|
|
1881
|
+
"Move Tab Right": "标签页右移",
|
|
1882
|
+
"Go to Tab…": "跳转到标签页…",
|
|
1883
|
+
"Go to Tab": "跳转到标签页",
|
|
1884
|
+
"unavailable": "不可用",
|
|
1885
|
+
"saving": "保存中",
|
|
1886
|
+
"New conversation": "新对话",
|
|
1887
|
+
"Delete": "删除",
|
|
1888
|
+
"List unavailable": "列表不可用",
|
|
1889
|
+
"Keep exploring": "继续探索",
|
|
1890
|
+
"{title} ({count})": "{title}({count})",
|
|
1891
|
+
"{name}, {panes} panes": "{name},{panes} 个面板",
|
|
1892
|
+
"No community layouts match this search.": "没有匹配的社区布局。",
|
|
1893
|
+
"No community layouts published yet.": "暂无已发布的社区布局。",
|
|
1894
|
+
"Loading team layouts…": "正在加载团队布局…",
|
|
1895
|
+
"No team layouts yet.": "暂无团队布局。",
|
|
1896
|
+
"No layout selected.": "未选择布局。",
|
|
1897
|
+
"team has r{revision}": "团队版本 r{revision}",
|
|
1898
|
+
"edited since the last publish": "上次发布后有改动",
|
|
1899
|
+
"in sync with the team": "与团队同步",
|
|
1900
|
+
"layouts and panes": "布局和面板",
|
|
1901
|
+
"No saved layouts match this search.": "没有匹配的已保存布局。",
|
|
1902
|
+
"No saved layouts yet.": "暂无已保存布局。",
|
|
1903
|
+
"YOUR LAYOUTS ({count})": "我的布局({count})",
|
|
1904
|
+
"{team} ({count})": "{team}({count})",
|
|
1905
|
+
"DISCOVER ({count})": "发现({count})",
|
|
1906
|
+
"Search layouts and panes": "搜索布局和面板",
|
|
1907
|
+
"Layouts": "布局",
|
|
1908
|
+
"Team has r{revision}. g to pull.": "团队版本 r{revision}。按 g 拉取。",
|
|
1909
|
+
"Edited since the last publish. t to publish.": "上次发布后有改动。按 t 发布。",
|
|
1910
|
+
"In sync with the team.": "已与团队同步。",
|
|
1911
|
+
"+{count} more panes": "另有 {count} 个面板",
|
|
1912
|
+
"1 pane type is not installed here.": "有 1 种面板未在此安装。",
|
|
1913
|
+
"{count} pane types are not installed here.": "有 {count} 种面板未在此安装。",
|
|
1914
|
+
"Manage account": "管理账户",
|
|
1915
|
+
"Hide password": "隐藏密码",
|
|
1916
|
+
"Show password": "显示密码",
|
|
1917
|
+
"Your plan ({key}, then {command})": "你的套餐({key},然后 {command})",
|
|
1918
|
+
"Upgrade to Pro ({key}, then {command})": "升级到 Pro({key},然后 {command})",
|
|
1919
|
+
"Resend the verification email ({key}, then {command})": "重发验证邮件({key},然后 {command})",
|
|
1920
|
+
"every plan": "所有套餐",
|
|
1921
|
+
"your plan": "你的套餐",
|
|
1922
|
+
"Free preview": "免费预览",
|
|
1923
|
+
"Manage Pro plan": "管理 Pro 套餐",
|
|
1924
|
+
"also": "另外",
|
|
1925
|
+
"The chart tool icons sit over its top-left corner. Most terminals keep shift-drag and option-drag for their own text selection, so pick the tool there instead.": "图表工具图标位于左上角。多数终端把 shift 拖动和 option 拖动留给自身的文本选择,请改在那里选择工具。",
|
|
1926
|
+
"also {target}": "也绑定到 {target}",
|
|
1927
|
+
"custom, default {chord}": "自定义,默认 {chord}",
|
|
1928
|
+
"none": "无",
|
|
1929
|
+
"That key would fire while typing. Use Ctrl, Cmd, Alt or a function key.": "这个键在打字时会被触发,请使用 Ctrl、Cmd、Alt 或功能键。",
|
|
1930
|
+
"Also bound to {target}.": "也绑定到了 {target}。",
|
|
1931
|
+
"Bound to {chord}.": "已绑定到 {chord}。",
|
|
1932
|
+
"Key removed.": "已移除按键。",
|
|
1933
|
+
"Unbound.": "已解除绑定。",
|
|
1934
|
+
"Back on {chord}.": "已恢复为 {chord}。",
|
|
1935
|
+
"nothing": "无",
|
|
1936
|
+
"Press a key. Esc cancels.": "请按键。Esc 取消。",
|
|
1937
|
+
"Press a key for {target}. Esc cancels.": "为 {target} 按键。Esc 取消。",
|
|
1938
|
+
"Press a key": "请按键",
|
|
1939
|
+
"Rate limited. Try again in a moment.": "请求过于频繁,请稍后再试。",
|
|
1940
|
+
"Diagnostic service is unavailable.": "诊断服务不可用。",
|
|
1941
|
+
"Risk skewed": "偏向风险",
|
|
1942
|
+
"Opportunity skewed": "偏向机会",
|
|
1943
|
+
"Balanced": "均衡",
|
|
1944
|
+
"Unclear": "不明确",
|
|
1945
|
+
"HIGH": "高",
|
|
1946
|
+
"MEDIUM": "中",
|
|
1947
|
+
"LOW": "低",
|
|
1948
|
+
"available": "可用",
|
|
1949
|
+
"no data": "无数据",
|
|
1950
|
+
"unsupported": "不支持",
|
|
1951
|
+
"failed": "失败",
|
|
1952
|
+
"{value} confidence": "置信度{value}",
|
|
1953
|
+
"confidence {value}": "置信度 {value}",
|
|
1954
|
+
"See the overall verdict, every red flag, anomaly, green flag, and watch item.": "查看整体结论,以及所有危险信号、异常、积极信号和观察项。",
|
|
1955
|
+
"Open Source": "打开来源",
|
|
1956
|
+
"scanning": "扫描中",
|
|
1957
|
+
"partial": "部分",
|
|
1958
|
+
"stale": "过期",
|
|
1959
|
+
"cached": "已缓存",
|
|
1960
|
+
"generated {age}": "生成于 {age}",
|
|
1961
|
+
"No diagnostic available yet.": "暂无诊断。",
|
|
1962
|
+
"Open ticker": "打开代码",
|
|
1963
|
+
"Current quote unavailable. Other research data is still available.": "当前报价不可用,其他研究数据仍可查看。",
|
|
1964
|
+
"Stale quote": "报价过期",
|
|
1856
1965
|
};
|
package/src/i18n/zh-tw.ts
CHANGED
|
@@ -329,6 +329,7 @@ export const zhTW: Record<string, string> = {
|
|
|
329
329
|
"Compare": "比較",
|
|
330
330
|
"Comparison Chart": "比較圖表",
|
|
331
331
|
"Financials": "財務報表",
|
|
332
|
+
"Statements": "三大報表",
|
|
332
333
|
"Financial Analysis": "財務分析",
|
|
333
334
|
"Fundamental Graph": "基本面圖表",
|
|
334
335
|
"Valuation Graph": "估值圖表",
|
|
@@ -344,9 +345,11 @@ export const zhTW: Record<string, string> = {
|
|
|
344
345
|
"Earnings Monitor": "財報監控",
|
|
345
346
|
"Economic Calendar": "經濟行事曆",
|
|
346
347
|
"Corporate Actions": "公司行動",
|
|
348
|
+
"Dividend Yield": "股利殖利率",
|
|
347
349
|
"Analyst Research": "分析師研究",
|
|
348
350
|
"Analyst": "分析師",
|
|
349
351
|
"Analysts": "分析師",
|
|
352
|
+
"Coverage": "機構評級",
|
|
350
353
|
"Filings": "文件",
|
|
351
354
|
"Ownership": "持股",
|
|
352
355
|
"People": "人員",
|
|
@@ -357,6 +360,7 @@ export const zhTW: Record<string, string> = {
|
|
|
357
360
|
"Insider Trading": "內部人士交易",
|
|
358
361
|
"SEC": "SEC 申報",
|
|
359
362
|
"Notes": "筆記",
|
|
363
|
+
"Notebook": "記事本",
|
|
360
364
|
"Alerts": "提醒",
|
|
361
365
|
"Market Heatmap": "市場熱力圖",
|
|
362
366
|
"Market Movers": "市場異動",
|
|
@@ -1620,6 +1624,7 @@ export const zhTW: Record<string, string> = {
|
|
|
1620
1624
|
"Article or newsletter": "文章或電子報",
|
|
1621
1625
|
"Where?": "在哪裡?",
|
|
1622
1626
|
"Which account or post?": "哪個帳號或貼文?",
|
|
1627
|
+
"Which AI, and what did you ask?": "你用了哪個 AI,問了什麼?",
|
|
1623
1628
|
"Skip": "略過",
|
|
1624
1629
|
"Equities": "股票",
|
|
1625
1630
|
"Futures & commodities": "期貨與大宗商品",
|
|
@@ -1812,6 +1817,9 @@ export const zhTW: Record<string, string> = {
|
|
|
1812
1817
|
"Keep on this device": "保留在此裝置上",
|
|
1813
1818
|
"Daily roundups, the weekly brief, position alerts, the mobile app and Ask Gloom will go without this account.": "每日摘要、每週簡報、持倉提醒、行動應用程式和 Ask Gloom 將不再包含此帳戶。",
|
|
1814
1819
|
"Account data stays on this device, out of Gloom Cloud": "帳戶資料保留在此裝置上,不上傳至 Gloom Cloud",
|
|
1820
|
+
"Keep at least one account, or disable the profile.": "請至少保留一個帳戶,或停用此設定檔。",
|
|
1821
|
+
"1 account left out of Gloom": "1 個帳戶未納入 Gloom",
|
|
1822
|
+
"{count} accounts left out of Gloom": "{count} 個帳戶未納入 Gloom",
|
|
1815
1823
|
"{venue} open": "{venue} 盤中",
|
|
1816
1824
|
"{venue} lunch": "{venue} 午休",
|
|
1817
1825
|
"{venue} pre-market": "{venue} 盤前",
|
|
@@ -1853,4 +1861,105 @@ export const zhTW: Record<string, string> = {
|
|
|
1853
1861
|
"Pro stays on until {date}.": "Pro 將保留至 {date}。",
|
|
1854
1862
|
"Pro stays on until {date}. Cancelling now stops the renewal after that date.": "Pro 將保留至 {date}。現在取消會在該日期後停止續訂。",
|
|
1855
1863
|
"Cancelled. Pro stays on until {date}.": "已取消。Pro 將保留至 {date}。",
|
|
1864
|
+
// ── Layout gallery, key bindings, tabs, diagnostics ──────────
|
|
1865
|
+
"Search or run a command": "搜尋或執行命令",
|
|
1866
|
+
"Contact support": "聯絡支援",
|
|
1867
|
+
"Send the team a message, with a screenshot if it helps": "給團隊留言,可附截圖",
|
|
1868
|
+
"Try its mnemonic, such as HELP OMON, or a word from its name": "試試助記碼(如 HELP OMON)或名稱中的字詞",
|
|
1869
|
+
"Type a command, then choose Bind a key.": "輸入命令,然後選擇「綁定按鍵」。",
|
|
1870
|
+
"Sort by": "排序方式",
|
|
1871
|
+
"retry": "重試",
|
|
1872
|
+
"Resize sidebar": "調整側欄寬度",
|
|
1873
|
+
"Open {label}": "開啟 {label}",
|
|
1874
|
+
"Clear Filters": "清除篩選",
|
|
1875
|
+
"Loading {thing}...": "正在載入{thing}...",
|
|
1876
|
+
"{thing} unavailable.": "{thing}無法使用。",
|
|
1877
|
+
"Nothing to show yet.": "暫無內容。",
|
|
1878
|
+
"New Tab": "新增分頁",
|
|
1879
|
+
"Close Tab": "關閉分頁",
|
|
1880
|
+
"Move Tab Left": "分頁左移",
|
|
1881
|
+
"Move Tab Right": "分頁右移",
|
|
1882
|
+
"Go to Tab…": "跳到分頁…",
|
|
1883
|
+
"Go to Tab": "跳到分頁",
|
|
1884
|
+
"unavailable": "無法使用",
|
|
1885
|
+
"saving": "儲存中",
|
|
1886
|
+
"New conversation": "新對話",
|
|
1887
|
+
"Delete": "刪除",
|
|
1888
|
+
"List unavailable": "清單無法使用",
|
|
1889
|
+
"Keep exploring": "繼續探索",
|
|
1890
|
+
"{title} ({count})": "{title}({count})",
|
|
1891
|
+
"{name}, {panes} panes": "{name},{panes} 個面板",
|
|
1892
|
+
"No community layouts match this search.": "沒有符合的社群版面設定。",
|
|
1893
|
+
"No community layouts published yet.": "尚無已發布的社群版面設定。",
|
|
1894
|
+
"Loading team layouts…": "正在載入團隊版面設定…",
|
|
1895
|
+
"No team layouts yet.": "尚無團隊版面設定。",
|
|
1896
|
+
"No layout selected.": "未選擇版面設定。",
|
|
1897
|
+
"team has r{revision}": "團隊版本 r{revision}",
|
|
1898
|
+
"edited since the last publish": "上次發布後有變更",
|
|
1899
|
+
"in sync with the team": "與團隊同步",
|
|
1900
|
+
"layouts and panes": "版面設定和面板",
|
|
1901
|
+
"No saved layouts match this search.": "沒有符合的已儲存版面設定。",
|
|
1902
|
+
"No saved layouts yet.": "尚無已儲存的版面設定。",
|
|
1903
|
+
"YOUR LAYOUTS ({count})": "我的版面設定({count})",
|
|
1904
|
+
"{team} ({count})": "{team}({count})",
|
|
1905
|
+
"DISCOVER ({count})": "探索({count})",
|
|
1906
|
+
"Search layouts and panes": "搜尋版面設定和面板",
|
|
1907
|
+
"Layouts": "版面設定",
|
|
1908
|
+
"Team has r{revision}. g to pull.": "團隊版本 r{revision}。按 g 拉取。",
|
|
1909
|
+
"Edited since the last publish. t to publish.": "上次發布後有變更。按 t 發布。",
|
|
1910
|
+
"In sync with the team.": "已與團隊同步。",
|
|
1911
|
+
"+{count} more panes": "另有 {count} 個面板",
|
|
1912
|
+
"1 pane type is not installed here.": "有 1 種面板未在此安裝。",
|
|
1913
|
+
"{count} pane types are not installed here.": "有 {count} 種面板未在此安裝。",
|
|
1914
|
+
"Manage account": "管理帳戶",
|
|
1915
|
+
"Hide password": "隱藏密碼",
|
|
1916
|
+
"Show password": "顯示密碼",
|
|
1917
|
+
"Your plan ({key}, then {command})": "你的方案({key},然後 {command})",
|
|
1918
|
+
"Upgrade to Pro ({key}, then {command})": "升級到 Pro({key},然後 {command})",
|
|
1919
|
+
"Resend the verification email ({key}, then {command})": "重新寄送驗證郵件({key},然後 {command})",
|
|
1920
|
+
"every plan": "所有方案",
|
|
1921
|
+
"your plan": "你的方案",
|
|
1922
|
+
"Free preview": "免費預覽",
|
|
1923
|
+
"Manage Pro plan": "管理 Pro 方案",
|
|
1924
|
+
"also": "另見",
|
|
1925
|
+
"The chart tool icons sit over its top-left corner. Most terminals keep shift-drag and option-drag for their own text selection, so pick the tool there instead.": "圖表工具圖示位於左上角。多數終端機會把 shift 拖曳和 option 拖曳保留給自身的文字選取,請改在那裡選擇工具。",
|
|
1926
|
+
"also {target}": "也綁定到 {target}",
|
|
1927
|
+
"custom, default {chord}": "自訂,預設 {chord}",
|
|
1928
|
+
"none": "無",
|
|
1929
|
+
"That key would fire while typing. Use Ctrl, Cmd, Alt or a function key.": "這個鍵在打字時會被觸發,請使用 Ctrl、Cmd、Alt 或功能鍵。",
|
|
1930
|
+
"Also bound to {target}.": "也綁定到了 {target}。",
|
|
1931
|
+
"Bound to {chord}.": "已綁定到 {chord}。",
|
|
1932
|
+
"Key removed.": "已移除按鍵。",
|
|
1933
|
+
"Unbound.": "已解除綁定。",
|
|
1934
|
+
"Back on {chord}.": "已恢復為 {chord}。",
|
|
1935
|
+
"nothing": "無",
|
|
1936
|
+
"Press a key. Esc cancels.": "請按鍵。Esc 取消。",
|
|
1937
|
+
"Press a key for {target}. Esc cancels.": "為 {target} 按鍵。Esc 取消。",
|
|
1938
|
+
"Press a key": "請按鍵",
|
|
1939
|
+
"Rate limited. Try again in a moment.": "請求過於頻繁,請稍後再試。",
|
|
1940
|
+
"Diagnostic service is unavailable.": "診斷服務無法使用。",
|
|
1941
|
+
"Risk skewed": "偏向風險",
|
|
1942
|
+
"Opportunity skewed": "偏向機會",
|
|
1943
|
+
"Balanced": "均衡",
|
|
1944
|
+
"Unclear": "不明確",
|
|
1945
|
+
"HIGH": "高",
|
|
1946
|
+
"MEDIUM": "中",
|
|
1947
|
+
"LOW": "低",
|
|
1948
|
+
"available": "可用",
|
|
1949
|
+
"no data": "無資料",
|
|
1950
|
+
"unsupported": "不支援",
|
|
1951
|
+
"failed": "失敗",
|
|
1952
|
+
"{value} confidence": "信心{value}",
|
|
1953
|
+
"confidence {value}": "信心 {value}",
|
|
1954
|
+
"See the overall verdict, every red flag, anomaly, green flag, and watch item.": "查看整體結論,以及所有危險訊號、異常、正面訊號和觀察項目。",
|
|
1955
|
+
"Open Source": "開啟來源",
|
|
1956
|
+
"scanning": "掃描中",
|
|
1957
|
+
"partial": "部分",
|
|
1958
|
+
"stale": "過期",
|
|
1959
|
+
"cached": "已快取",
|
|
1960
|
+
"generated {age}": "產生於 {age}",
|
|
1961
|
+
"No diagnostic available yet.": "尚無診斷。",
|
|
1962
|
+
"Open ticker": "開啟股票代號",
|
|
1963
|
+
"Current quote unavailable. Other research data is still available.": "目前報價無法使用,其他研究資料仍可查看。",
|
|
1964
|
+
"Stale quote": "報價過期",
|
|
1856
1965
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { DockLayoutNode, DockSplitNode } from "../../types/config";
|
|
2
|
+
import { buildDockStack } from "./dock-stack";
|
|
3
|
+
|
|
4
|
+
function clampDockRatio(ratio: number | undefined): number {
|
|
5
|
+
if (typeof ratio !== "number" || !Number.isFinite(ratio)) return 0.5;
|
|
6
|
+
return Math.max(0.1, Math.min(0.9, ratio));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function isDockAxis(value: unknown): value is DockSplitNode["axis"] {
|
|
10
|
+
return value === "horizontal" || value === "vertical";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function getDockedPaneIdsFromNode(node: DockLayoutNode | null, result: string[] = []): string[] {
|
|
14
|
+
if (!node) return result;
|
|
15
|
+
if (node.kind === "pane") {
|
|
16
|
+
result.push(node.instanceId);
|
|
17
|
+
return result;
|
|
18
|
+
}
|
|
19
|
+
getDockedPaneIdsFromNode(node.first, result);
|
|
20
|
+
getDockedPaneIdsFromNode(node.second, result);
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function normalizeDockNode(
|
|
25
|
+
node: DockLayoutNode | null | undefined,
|
|
26
|
+
validInstanceIds: Set<string>,
|
|
27
|
+
seenPaneIds: Set<string>,
|
|
28
|
+
): DockLayoutNode | null {
|
|
29
|
+
if (!node || typeof node !== "object") return null;
|
|
30
|
+
|
|
31
|
+
if (node.kind === "pane") {
|
|
32
|
+
const { instanceId } = node;
|
|
33
|
+
if (typeof instanceId !== "string" || !validInstanceIds.has(instanceId) || seenPaneIds.has(instanceId)) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
seenPaneIds.add(instanceId);
|
|
37
|
+
return { kind: "pane", instanceId };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (node.kind !== "split") return null;
|
|
41
|
+
if (node.tabs) {
|
|
42
|
+
// Whatever is under a stack is its tabs, nested or not: a pane put back
|
|
43
|
+
// at a place inside it (its remembered spot) joins it.
|
|
44
|
+
const plain: DockSplitNode = { kind: "split", axis: node.axis, ratio: node.ratio, first: node.first, second: node.second };
|
|
45
|
+
const flat = normalizeDockNode(plain, validInstanceIds, seenPaneIds);
|
|
46
|
+
const active = typeof node.tabs.active === "string" ? node.tabs.active : null;
|
|
47
|
+
return flat ? buildDockStack(getDockedPaneIdsFromNode(flat), active) : null;
|
|
48
|
+
}
|
|
49
|
+
const first = normalizeDockNode(node.first, validInstanceIds, seenPaneIds);
|
|
50
|
+
const second = normalizeDockNode(node.second, validInstanceIds, seenPaneIds);
|
|
51
|
+
if (!first && !second) return null;
|
|
52
|
+
if (!first) return second;
|
|
53
|
+
if (!second) return first;
|
|
54
|
+
return {
|
|
55
|
+
kind: "split",
|
|
56
|
+
axis: isDockAxis(node.axis) ? node.axis : "horizontal",
|
|
57
|
+
ratio: clampDockRatio(node.ratio),
|
|
58
|
+
first,
|
|
59
|
+
second,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -21,11 +21,16 @@ export interface AhPair {
|
|
|
21
21
|
|
|
22
22
|
const A_SHARE_VENUES = new Set(["SSE", "SZSE"]);
|
|
23
23
|
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* A listing of the company universe as a key: `1088:HKEX`, `601088:SSE`. A
|
|
26
|
+
* Hong Kong code in the five digits HKEX writes it in (`01211`, as a ticker
|
|
27
|
+
* may be saved) is the four-digit line the company universe lists (`1211`).
|
|
28
|
+
*/
|
|
25
29
|
function listingKey(line: { symbol: string; exchange: string }): string {
|
|
26
30
|
const { symbol, exchange } = parsePublicTickerKey(line.symbol);
|
|
27
31
|
const venue = canonicalExchange(exchange ?? line.exchange);
|
|
28
|
-
|
|
32
|
+
const code = venue === "HKEX" && /^0\d{4}$/.test(symbol) ? symbol.slice(1) : symbol;
|
|
33
|
+
return `${hongKongListingCode(code, venue)}:${venue}`;
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { CorporateActionsData } from "../types/financials";
|
|
2
|
+
import { canonicalExchange } from "../utils/exchanges";
|
|
3
|
+
|
|
4
|
+
export const INCOMPLETE_DISTRIBUTIONS = "Distribution history incomplete";
|
|
5
|
+
|
|
6
|
+
export function isIndianEtfListing(exchange: string | undefined, name: string | undefined): boolean {
|
|
7
|
+
const venue = canonicalExchange(exchange);
|
|
8
|
+
return (venue === "NSE" || venue === "BSE") && /\b(?:ETF|BeES)\b/i.test(name ?? "");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function fundCorporateActions(actions: CorporateActionsData, { uncertainEmptyPayouts = false } = {}): CorporateActionsData {
|
|
12
|
+
const { earnings: _earnings, ...coverage } = actions.coverage ?? {};
|
|
13
|
+
return {
|
|
14
|
+
...actions,
|
|
15
|
+
earnings: [],
|
|
16
|
+
coverage: {
|
|
17
|
+
...coverage,
|
|
18
|
+
...(uncertainEmptyPayouts && actions.dividends.length === 0 ? { dividends: "unavailable" } : {}),
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MarketState, Quote, QuoteIndexSession } from "../../types/financials";
|
|
2
|
-
import { canonicalExchange, EXCHANGE_TIME_ZONES, isUsListingExchange } from "../../utils/exchanges";
|
|
2
|
+
import { canonicalExchange, EXCHANGE_TIME_ZONES, isUsListingExchange, isUsOtcVenue } from "../../utils/exchanges";
|
|
3
3
|
import { hasPublishedApacCalendar, isPublishedApacClosure, publishedApacEarlyClose } from "../published-apac-sessions";
|
|
4
4
|
import { hasPublishedCnCalendar, isPublishedCnClosure } from "../published-cn-sessions";
|
|
5
5
|
import { hasPublishedFuturesCalendar, isPublishedFuturesClosure, isPublishedFuturesVenue } from "../published-futures-sessions";
|
|
@@ -228,13 +228,6 @@ const DELAYED_FEED_LAG_MS = 15 * 60_000;
|
|
|
228
228
|
const SLOWER_DELAYED_FEED_LAG_MS = 20 * 60_000;
|
|
229
229
|
const SLOWER_DELAYED_FEEDS = new Set(["ASX", "KRX", "KOSDAQ", "TWSE", "TPEX", "SGX", "NZX"]);
|
|
230
230
|
const exchangeLocalTimeFormatters = new Map<string, Intl.DateTimeFormat>();
|
|
231
|
-
const usSessionFormatter = new Intl.DateTimeFormat("en-US", {
|
|
232
|
-
timeZone: "America/New_York",
|
|
233
|
-
weekday: "short",
|
|
234
|
-
hour: "2-digit",
|
|
235
|
-
minute: "2-digit",
|
|
236
|
-
hourCycle: "h23",
|
|
237
|
-
});
|
|
238
231
|
|
|
239
232
|
type UsSessionState = Exclude<MarketState, never>;
|
|
240
233
|
|
|
@@ -245,7 +238,7 @@ type UsSessionState = Exclude<MarketState, never>;
|
|
|
245
238
|
const MINUTE_CACHE_LIMIT = 4096;
|
|
246
239
|
const localDateCache = new Map<string, string | null>();
|
|
247
240
|
const localMinuteCache = new Map<string, number | null>();
|
|
248
|
-
const usSessionCache = new Map<
|
|
241
|
+
const usSessionCache = new Map<string, UsSessionState>();
|
|
249
242
|
|
|
250
243
|
function perMinute<K, V>(cache: Map<K, V>, key: K, compute: () => V): V {
|
|
251
244
|
const cached = cache.get(key);
|
|
@@ -271,7 +264,7 @@ function getExchangeLocalTimeFormatter(timeZone: string): Intl.DateTimeFormat {
|
|
|
271
264
|
}
|
|
272
265
|
|
|
273
266
|
function exchangeLocalDate(exchange: string, timestampMs: number): string | null {
|
|
274
|
-
const timeZone = EXCHANGE_TIME_ZONES[canonicalExchange(exchange)];
|
|
267
|
+
const timeZone = isUsOtcVenue(exchange) ? "America/New_York" : EXCHANGE_TIME_ZONES[canonicalExchange(exchange)];
|
|
275
268
|
if (!timeZone) return null;
|
|
276
269
|
const minute = Math.floor(timestampMs / 60_000);
|
|
277
270
|
return perMinute(localDateCache, `${timeZone}:${minute}`, () => zonedDateKey(minute * 60_000, timeZone));
|
|
@@ -364,6 +357,16 @@ function isLocalTradingDay(exchange: string, date: string, weekendDays?: readonl
|
|
|
364
357
|
return weekday != null && isTradingWeekday(exchange, weekday, weekendDays) && !isPublishedClosure(exchange, date);
|
|
365
358
|
}
|
|
366
359
|
|
|
360
|
+
/** A published equity closure, not a weekend, shortened session or futures trade-date holiday. */
|
|
361
|
+
export function isPublishedEquityHoliday(exchange: string | undefined, now: number, weekendDays?: readonly number[]): boolean {
|
|
362
|
+
const venue = canonicalExchange(exchange);
|
|
363
|
+
if (isPublishedFuturesVenue(venue)) return false;
|
|
364
|
+
const date = exchangeLocalDate(venue, now);
|
|
365
|
+
const weekday = date ? localWeekday(date) : null;
|
|
366
|
+
return date != null && weekday != null && isTradingWeekday(venue, weekday, weekendDays)
|
|
367
|
+
&& isPublishedClosure(venue, date) && !publishedSpecialSession(venue, date);
|
|
368
|
+
}
|
|
369
|
+
|
|
367
370
|
/** Days of the venue's trading week in (earlier, later], less published closures for venues with a calendar. */
|
|
368
371
|
function localTradingDaysBetween(
|
|
369
372
|
exchange: string,
|
|
@@ -700,37 +703,37 @@ export function middayBreakOn(exchange: string | undefined, now: number): { star
|
|
|
700
703
|
return { start: at(start), end: at(end) };
|
|
701
704
|
}
|
|
702
705
|
|
|
703
|
-
function usSessionState(timestampMs: number): UsSessionState {
|
|
706
|
+
function usSessionState(timestampMs: number, exchange: string | undefined): UsSessionState {
|
|
707
|
+
const venue = canonicalExchange(exchange);
|
|
704
708
|
const minute = Math.floor(timestampMs / 60_000);
|
|
705
|
-
return perMinute(usSessionCache, minute
|
|
709
|
+
return perMinute(usSessionCache, `${venue}:${minute}`, () => formatUsSessionState(minute * 60_000, venue));
|
|
706
710
|
}
|
|
707
711
|
|
|
708
|
-
function formatUsSessionState(timestampMs: number): UsSessionState {
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
const hour = Number(parts.find((part) => part.type === "hour")?.value ?? "0");
|
|
715
|
-
const minute = Number(parts.find((part) => part.type === "minute")?.value ?? "0");
|
|
716
|
-
const totalMinutes = hour * 60 + minute;
|
|
712
|
+
function formatUsSessionState(timestampMs: number, venue: string): UsSessionState {
|
|
713
|
+
const date = exchangeLocalDate("NYSE", timestampMs);
|
|
714
|
+
const weekday = date ? localWeekday(date) : null;
|
|
715
|
+
if (!date || weekday == null || !isTradingWeekday("NYSE", weekday)) return "CLOSED";
|
|
716
|
+
const published = getPublishedUsEquitySession(venue, date);
|
|
717
|
+
if (published?.kind === "closed") return "CLOSED";
|
|
717
718
|
|
|
719
|
+
const totalMinutes = exchangeLocalMinuteOfDay("NYSE", timestampMs);
|
|
720
|
+
if (totalMinutes == null) return "CLOSED";
|
|
718
721
|
if (totalMinutes < US_PRE_MARKET_OPEN_MINUTES) return "PREPRE";
|
|
719
|
-
if (totalMinutes < 9 * 60 + 30) return "PRE";
|
|
720
|
-
if (totalMinutes < 16 * 60) return "REGULAR";
|
|
722
|
+
if (published ? timestampMs < published.open : totalMinutes < 9 * 60 + 30) return "PRE";
|
|
723
|
+
if (published ? timestampMs < published.close : totalMinutes < 16 * 60) return "REGULAR";
|
|
721
724
|
if (totalMinutes < 20 * 60) return "POST";
|
|
722
725
|
return "POSTPOST";
|
|
723
726
|
}
|
|
724
727
|
|
|
725
728
|
/** Provider session labels may outlive the active session they described. */
|
|
726
|
-
export function activeUsMarketSession(now: number): "PRE" | "REGULAR" | "POST" | null {
|
|
729
|
+
export function activeUsMarketSession(now: number, exchange: string | undefined): "PRE" | "REGULAR" | "POST" | null {
|
|
727
730
|
if (!Number.isFinite(new Date(now).getTime())) return null;
|
|
728
|
-
const session = usSessionState(now);
|
|
731
|
+
const session = usSessionState(now, exchange);
|
|
729
732
|
return session === "PRE" || session === "REGULAR" || session === "POST" ? session : null;
|
|
730
733
|
}
|
|
731
734
|
|
|
732
|
-
export function activeUsExtendedHoursSession(now: number): "PRE" | "POST" | null {
|
|
733
|
-
const session = activeUsMarketSession(now);
|
|
735
|
+
export function activeUsExtendedHoursSession(now: number, exchange: string | undefined): "PRE" | "POST" | null {
|
|
736
|
+
const session = activeUsMarketSession(now, exchange);
|
|
734
737
|
return session === "PRE" || session === "POST" ? session : null;
|
|
735
738
|
}
|
|
736
739
|
|
|
@@ -751,12 +754,12 @@ export function isUsPriorSessionPremarketQuote(
|
|
|
751
754
|
const canonical = canonicalExchange(exchange);
|
|
752
755
|
if (marketState !== "PRE" || !isUsListingExchange(canonical)) return false;
|
|
753
756
|
if (!Number.isFinite(timestampMs) || !Number.isFinite(now) || timestampMs > now + quoteFutureToleranceMs()) return false;
|
|
754
|
-
if (!Number.isFinite(new Date(now).getTime()) || usSessionState(now) !== "PRE") return false;
|
|
757
|
+
if (!Number.isFinite(new Date(now).getTime()) || usSessionState(now, canonical) !== "PRE") return false;
|
|
755
758
|
const timestampDate = exchangeLocalDate(canonical, timestampMs);
|
|
756
759
|
const currentDate = exchangeLocalDate(canonical, now);
|
|
757
760
|
if (!timestampDate || !currentDate || timestampDate >= currentDate) return false;
|
|
758
761
|
if (!isLocalTradingDay(canonical, timestampDate)) return false;
|
|
759
|
-
const printSession = usSessionState(timestampMs);
|
|
762
|
+
const printSession = usSessionState(timestampMs, canonical);
|
|
760
763
|
if (printSession !== "REGULAR" && printSession !== "POST" && printSession !== "POSTPOST") return false;
|
|
761
764
|
return localTradingDaysBetween(canonical, timestampDate, currentDate) === 1;
|
|
762
765
|
}
|
|
@@ -780,13 +783,13 @@ export function isUsRegularCloseQuoteInPostSession(
|
|
|
780
783
|
const canonical = canonicalExchange(exchange);
|
|
781
784
|
if ((marketState !== "POST" && marketState !== "CLOSED") || !isUsListingExchange(canonical)) return false;
|
|
782
785
|
if (!Number.isFinite(timestampMs) || !Number.isFinite(now) || timestampMs > now + quoteFutureToleranceMs()) return false;
|
|
783
|
-
if (!Number.isFinite(new Date(now).getTime()) || usSessionState(now) !== "POST") return false;
|
|
786
|
+
if (!Number.isFinite(new Date(now).getTime()) || usSessionState(now, canonical) !== "POST") return false;
|
|
784
787
|
const currentDate = exchangeLocalDate(canonical, now);
|
|
785
788
|
if (!currentDate || exchangeLocalDate(canonical, timestampMs) !== currentDate) return false;
|
|
786
789
|
if (!isLocalTradingDay(canonical, currentDate)) return false;
|
|
787
790
|
const published = getPublishedUsEquitySession(canonical, currentDate);
|
|
788
791
|
if (published) return published.kind === "session" && timestampMs >= published.open && timestampMs <= published.close;
|
|
789
|
-
return usSessionState(timestampMs) === "REGULAR";
|
|
792
|
+
return usSessionState(timestampMs, canonical) === "REGULAR";
|
|
790
793
|
}
|
|
791
794
|
|
|
792
795
|
/**
|
|
@@ -811,9 +814,9 @@ export function isUsExtendedHoursSessionPrint(
|
|
|
811
814
|
const today = exchangeLocalDate(canonical, now);
|
|
812
815
|
const close = latestRegularSessionClose(canonical, now);
|
|
813
816
|
if (!today || !close || !isLocalTradingDay(canonical, today)) return false;
|
|
814
|
-
const session = usSessionState(now);
|
|
817
|
+
const session = usSessionState(now, canonical);
|
|
815
818
|
const closedToday = close.date === today;
|
|
816
|
-
if (marketState === "POST" ? !closedToday ||
|
|
819
|
+
if (marketState === "POST" ? !closedToday || session !== "POST" : closedToday || session !== "PRE") {
|
|
817
820
|
return false;
|
|
818
821
|
}
|
|
819
822
|
// The open of the session that closed last: today's after the close, the previous one before the open.
|
|
@@ -850,11 +853,12 @@ function isTimestampStaleForExchangeSessionUnsafe(
|
|
|
850
853
|
const timestampDate = exchangeLocalDate(canonical, timestampMs);
|
|
851
854
|
const currentDate = exchangeLocalDate(canonical, now);
|
|
852
855
|
if (!timestampDate || !currentDate || timestampDate === currentDate) return false;
|
|
853
|
-
if (marketState === "REGULAR" && !
|
|
856
|
+
if (marketState === "REGULAR" && !isPublishedEquityHoliday(canonical, now, weekendDays)
|
|
857
|
+
&& !isBeforeKnownRegularOpen(canonical, now)) return true;
|
|
854
858
|
|
|
855
859
|
if (isUsPriorSessionPremarketQuote(timestampMs, canonical, marketState, now)) return false;
|
|
856
860
|
if (isUsListingExchange(canonical)) {
|
|
857
|
-
const session = usSessionState(now);
|
|
861
|
+
const session = usSessionState(now, canonical);
|
|
858
862
|
if (session === "PRE" || session === "REGULAR" || session === "POST" || session === "POSTPOST") {
|
|
859
863
|
return true;
|
|
860
864
|
}
|
|
@@ -78,3 +78,17 @@ export function globexPrintSession(exchange: string | null | undefined, time: nu
|
|
|
78
78
|
while (new Date(trade * MS_PER_DAY).getUTCDay() % 6 === 0) trade += 1;
|
|
79
79
|
return { tradeDate: isoDay(trade), overnight: trade > local || minutes < DAY_SESSION_MINUTES };
|
|
80
80
|
}
|
|
81
|
+
|
|
82
|
+
export function publishedGlobexPrintTradeDate(venue: string, time: number): string | null {
|
|
83
|
+
const print = globexPrintSession(venue, time);
|
|
84
|
+
if (!print) return null;
|
|
85
|
+
const first = Date.parse(print.tradeDate) / MS_PER_DAY;
|
|
86
|
+
for (let offset = 0; offset < 7; offset += 1) {
|
|
87
|
+
const day = new Date((first + offset) * MS_PER_DAY);
|
|
88
|
+
if (day.getUTCDay() % 6 === 0) continue;
|
|
89
|
+
const date = isoDay(first + offset);
|
|
90
|
+
if (!hasPublishedFuturesCalendar(venue, date)) return null;
|
|
91
|
+
if (!isPublishedFuturesClosure(venue, date)) return date;
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { SplitAction } from "../../types/financials";
|
|
2
|
+
import { barCloseDay } from "./period-return";
|
|
3
|
+
|
|
4
|
+
const DAY_MS = 86_400_000;
|
|
5
|
+
const SPLIT_NEIGHBORHOOD_MS = 10 * DAY_MS;
|
|
6
|
+
const LARGE_MOVE = 5;
|
|
7
|
+
|
|
8
|
+
export interface PriceBasisBreak {
|
|
9
|
+
day: string;
|
|
10
|
+
ratio: number;
|
|
11
|
+
kind: "close" | "range";
|
|
12
|
+
split?: SplitAction;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface PriceBasisBar {
|
|
16
|
+
date: string;
|
|
17
|
+
close?: number | null;
|
|
18
|
+
high?: number | null;
|
|
19
|
+
low?: number | null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function positive(price?: number | null): price is number {
|
|
23
|
+
return price != null && Number.isFinite(price) && price > 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Flag inconsistencies in the served prices, without treating an observed discontinuity as a split. */
|
|
27
|
+
export function priceBasisBreaks(
|
|
28
|
+
bars: readonly PriceBasisBar[], splits: readonly SplitAction[],
|
|
29
|
+
options: { interval?: string | null; venue?: string; includeUnrecorded?: boolean; includeUnrecordedRange?: boolean } = {},
|
|
30
|
+
): PriceBasisBreak[] {
|
|
31
|
+
const dated = splits.filter(({ fromFactor, toFactor }) => Number.isInteger(fromFactor) && Number.isInteger(toFactor)
|
|
32
|
+
&& fromFactor! > 0 && toFactor! > 0 && fromFactor !== toFactor)
|
|
33
|
+
.map((split) => ({ split, time: Date.parse(split.date.slice(0, 10)) }));
|
|
34
|
+
if (!dated.length && !options.includeUnrecorded && !options.includeUnrecordedRange) return [];
|
|
35
|
+
const breaks: PriceBasisBreak[] = [];
|
|
36
|
+
let previous: number | null = null;
|
|
37
|
+
for (const bar of bars) {
|
|
38
|
+
const day = bar.date.slice(0, 10);
|
|
39
|
+
const ratio = previous !== null && positive(bar.close) ? bar.close / previous : 1;
|
|
40
|
+
if (positive(bar.close)) previous = bar.close;
|
|
41
|
+
const range = positive(bar.high) && positive(bar.low) ? bar.high / bar.low : 1;
|
|
42
|
+
const closeBreak = ratio > LARGE_MOVE || ratio < 1 / LARGE_MOVE;
|
|
43
|
+
if (!closeBreak && range <= LARGE_MOVE) continue;
|
|
44
|
+
const first = Date.parse(day);
|
|
45
|
+
const last = Date.parse(barCloseDay(day, options.interval ?? undefined, options.venue));
|
|
46
|
+
const split = dated.find(({ time }) => time >= first - SPLIT_NEIGHBORHOOD_MS && time <= last + SPLIT_NEIGHBORHOOD_MS)?.split;
|
|
47
|
+
if (closeBreak && (split || options.includeUnrecorded)) breaks.push({ day, ratio, kind: "close", split });
|
|
48
|
+
else if (range > LARGE_MOVE && (split || options.includeUnrecordedRange)) breaks.push({ day, ratio: range, kind: "range", split });
|
|
49
|
+
}
|
|
50
|
+
return breaks;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function priceBasisFactor(ratio: number): string {
|
|
54
|
+
return String(Number(Math.max(ratio, 1 / ratio).toPrecision(3)));
|
|
55
|
+
}
|