gloomberb 0.20.11 → 0.20.13
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 +2 -1
- package/src/account/billing.ts +3 -2
- package/src/account/upgrade-dialog.tsx +8 -8
- package/src/api-client/awards.ts +16 -0
- package/src/api-client/central-bank-rates.ts +5 -0
- package/src/api-client/data.ts +55 -2
- package/src/api-client/index.ts +28 -3
- package/src/api-client/install-experiments.ts +146 -0
- package/src/api-client/request.ts +86 -3
- package/src/api-client/socket-connection.ts +12 -1
- package/src/api-client/socket.ts +21 -3
- package/src/api-client/supply-chain-graph.ts +4 -2
- package/src/api-client/supply-chain.ts +8 -0
- package/src/api-client/telemetry.ts +47 -0
- package/src/api-client/types/econ.ts +10 -7
- package/src/api-client/types/filings-and-calls.ts +8 -0
- package/src/api-client/types/market.ts +4 -0
- package/src/api-client/types/news.ts +16 -0
- package/src/app/global-shortcuts.ts +2 -1
- package/src/app/keybindings/actions.ts +19 -0
- package/src/app/pane-runtime/index.tsx +18 -3
- package/src/app/pane-runtime/layout-placement.ts +63 -0
- package/src/app/pane-runtime/ticker-open-runtime.ts +10 -2
- package/src/architecture/floating-promise-allowlist.json +17 -33
- package/src/brokers/signed-in/adapter.ts +2 -2
- package/src/brokers/signed-in/catalog.ts +13 -4
- package/src/capabilities/chart-series.ts +4 -1
- package/src/cli/board-coins.ts +10 -1
- package/src/cli/commands/crypto-hints.ts +3 -2
- package/src/cli/commands/fred-series.ts +0 -54
- package/src/cli/commands/market.ts +260 -63
- package/src/cli/commands/overview.ts +50 -17
- package/src/cli/commands/search.ts +140 -17
- package/src/cli/commands/ticker.ts +37 -17
- package/src/cli/desktop-pane-shot.ts +27 -2
- package/src/cli/earnings-calendar.ts +33 -53
- package/src/cli/fx-quote-rate.ts +1 -1
- package/src/cli/glossary.ts +14 -5
- package/src/cli/history-catalog-series.ts +85 -0
- package/src/cli/history-rows.ts +18 -1
- package/src/cli/index.ts +1 -1
- package/src/cli/known-gaps.ts +9 -0
- package/src/cli/list-progress.ts +45 -0
- package/src/cli/listing-arg.ts +176 -25
- package/src/cli/name-entries.ts +8 -4
- package/src/cli/not-a-ticker.ts +2 -2
- package/src/cli/pane-functions/catalog.ts +55 -7
- package/src/cli/pane-functions/dom.ts +8 -1
- package/src/cli/pane-functions/freshness.ts +52 -5
- package/src/cli/pane-functions/headless.ts +8 -8
- package/src/cli/pane-functions/index.ts +8 -5
- package/src/cli/pane-functions/market-session.ts +66 -14
- package/src/cli/pane-functions/options.ts +5 -0
- package/src/cli/pane-functions/report.ts +4 -1
- package/src/cli/pane-functions/resolver.ts +9 -2
- package/src/cli/pane-functions/screenshot-assessment.ts +28 -3
- package/src/cli/pane-functions/screenshot-types.ts +6 -0
- package/src/cli/perpetual-contract.ts +4 -4
- package/src/cli/quote-answer.ts +55 -12
- package/src/cli/quote-list-reads.ts +87 -0
- package/src/cli/report-tables.ts +70 -13
- package/src/cli/result.ts +26 -3
- package/src/cli/symbol-list.ts +31 -4
- package/src/cli/terminal-code-hints.ts +83 -0
- package/src/cli/ticker-resolution.ts +2 -1
- package/src/cli/treasury-yields.ts +5 -0
- package/src/components/chart/composite/axis-overlays.tsx +5 -2
- package/src/components/chart/composite/composite-chart.tsx +1 -0
- package/src/components/chart/composite/format.ts +101 -15
- package/src/components/chart/composite/legend.tsx +60 -25
- package/src/components/chart/composite/time-axis.ts +51 -29
- package/src/components/chart/composite/toolbar.tsx +42 -6
- package/src/components/chart/curve/curve-surface.tsx +5 -5
- package/src/components/command-bar/action-runtime.ts +2 -0
- package/src/components/command-bar/list/badge.ts +8 -5
- package/src/components/command-bar/list/model.ts +0 -5
- package/src/components/command-bar/list/view.tsx +39 -2
- package/src/components/command-bar/routes/root/plugin-install.ts +4 -2
- package/src/components/command-bar/routes/root/provider-search.ts +23 -3
- package/src/components/command-bar/routes/root/results.ts +20 -9
- package/src/components/command-bar/routes/root/start-here.ts +1 -2
- package/src/components/command-bar/routes/ticker-search/actions.ts +2 -3
- package/src/components/command-bar/routes/ticker-search/results.ts +23 -4
- package/src/components/command-bar/routing/launch-request.ts +2 -1
- package/src/components/command-bar/routing/navigation-state.ts +4 -2
- package/src/components/command-bar/workflow/types.ts +6 -0
- package/src/components/data-table/view.tsx +29 -6
- package/src/components/form-modal/host.tsx +1 -1
- package/src/components/layout/detached-pane-shell.tsx +3 -0
- package/src/components/layout/double-escape-close.ts +34 -3
- package/src/components/layout/floating-pane.tsx +10 -4
- package/src/components/layout/header.tsx +3 -2
- package/src/components/layout/market-summary.ts +3 -3
- package/src/components/layout/pane/cycle-order.ts +66 -2
- package/src/components/layout/pane/error-boundary.tsx +2 -1
- package/src/components/layout/pane/header.tsx +140 -31
- package/src/components/layout/pane/sidebar.tsx +13 -5
- package/src/components/layout/pane/status-footer.ts +3 -1
- package/src/components/layout/shell/drag/runtime.ts +5 -0
- package/src/components/layout/shell/index.tsx +25 -0
- package/src/components/layout/shell/menu.ts +9 -0
- package/src/components/layout/shell/pane/actions.ts +36 -0
- package/src/components/layout/shell/pane/management-shortcuts.ts +27 -3
- package/src/components/layout/shell/pane-occlusion.ts +40 -0
- package/src/components/layout/shell/shortcuts.ts +17 -1
- package/src/components/layout/shell/terminal-pointer-runtime.ts +39 -6
- package/src/components/layout/shell/window-mode/index.ts +5 -16
- package/src/components/layout/shell/window-mode/overlays.tsx +3 -1
- package/src/components/markdown-text.tsx +36 -0
- package/src/components/market-board/index.tsx +18 -8
- package/src/components/metric-treemap/index.tsx +3 -1
- package/src/components/onboarding/first-run-workspace.ts +46 -11
- package/src/components/onboarding/onboarding-keyboard.ts +57 -5
- package/src/components/onboarding/onboarding-wizard.tsx +91 -24
- package/src/components/onboarding/portfolio-step/index.tsx +1 -0
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +36 -9
- package/src/components/onboarding/portfolio-step/types.ts +2 -0
- package/src/components/onboarding/tickers-step-model.ts +140 -0
- package/src/components/onboarding/tickers-step.tsx +116 -0
- package/src/components/onboarding/use-onboarding-broker-form.ts +1 -1
- package/src/components/onboarding/use-onboarding-progress.ts +100 -11
- package/src/components/onboarding/use-onboarding-upgrade.ts +3 -2
- package/src/components/onboarding/wizard-model.ts +3 -1
- package/src/components/onboarding/wizard-tickers.ts +139 -0
- package/src/components/price-performance.tsx +2 -2
- package/src/components/speedometer-gauge/model.ts +2 -1
- package/src/components/speedometer-gauge/terminal.tsx +13 -8
- package/src/components/ui/button.tsx +48 -4
- package/src/components/ui/choice-dialog.tsx +101 -32
- package/src/components/ui/data-table/opentui/index.tsx +24 -9
- package/src/components/ui/data-table/types.ts +7 -0
- package/src/components/ui/inline-quick-add.tsx +19 -3
- package/src/components/ui/list-view.tsx +11 -5
- package/src/components/ui/multi-select/dialog.tsx +1 -7
- package/src/components/ui/not-meaningful.ts +16 -0
- package/src/components/ui/query-bar.tsx +32 -5
- package/src/components/ui/selection-fill.ts +39 -0
- package/src/components/ui/stat-grid.tsx +27 -6
- package/src/core/state/app/layout-reducer.ts +2 -1
- package/src/core/state/app/pane-choices.ts +68 -0
- package/src/core/state/app/state.ts +14 -6
- package/src/core/state/app/types.ts +8 -0
- package/src/data/config/store/normalize.ts +2 -0
- package/src/docs/snapshot.json +1 -1
- package/src/i18n/es.ts +5 -2
- package/src/i18n/ja.ts +5 -2
- package/src/i18n/ko.ts +5 -2
- package/src/i18n/zh-cn.ts +5 -2
- package/src/i18n/zh-tw.ts +5 -2
- package/src/layout/pane-manager/dock-tree.ts +19 -0
- package/src/layout/pane-manager/index.ts +3 -0
- package/src/layout-marketplace/model.ts +2 -1
- package/src/market-data/futures-contract.ts +2 -1
- package/src/market-data/hooks.tsx +1 -1
- package/src/market-data/market/change-basis.ts +27 -5
- package/src/market-data/market/format.ts +13 -13
- package/src/market-data/market/freshness.ts +33 -0
- package/src/market-data/market/status.ts +5 -1
- package/src/market-data/quotes/contributions.ts +10 -0
- package/src/market-data/quotes/freshness.ts +19 -0
- package/src/market-data/quotes/listing-enterprise-value.ts +3 -3
- package/src/market-data/quotes/live-valuation.ts +31 -4
- package/src/market-data/quotes/resolution.ts +4 -0
- package/src/market-data/quotes/time.ts +17 -24
- package/src/market-data/tax-equivalent.ts +3 -2
- package/src/news/aggregator.ts +19 -8
- package/src/news/hooks.ts +1 -1
- package/src/news/news-model.ts +49 -0
- package/src/news/types.ts +9 -0
- package/src/plugins/builtin/account-management/calendar-tab.tsx +8 -3
- package/src/plugins/builtin/account-management/index.tsx +1 -0
- package/src/plugins/builtin/account-management/pane.tsx +9 -8
- package/src/plugins/builtin/alerts/calendar-events.ts +4 -5
- package/src/plugins/builtin/alerts/format.ts +6 -5
- package/src/plugins/builtin/alerts/headless.ts +3 -2
- package/src/plugins/builtin/alerts/history.ts +2 -1
- package/src/plugins/builtin/alerts/pane.tsx +2 -1
- package/src/plugins/builtin/alerts/price-text.ts +2 -1
- package/src/plugins/builtin/alerts/scheduled.ts +6 -5
- package/src/plugins/builtin/analytics/account-returns.ts +6 -7
- package/src/plugins/builtin/analytics/display.ts +2 -1
- package/src/plugins/builtin/analytics/pane-model.ts +5 -9
- package/src/plugins/builtin/analytics/risk-model.ts +6 -6
- package/src/plugins/builtin/analytics/risk-pane.tsx +6 -5
- package/src/plugins/builtin/analytics/view.tsx +5 -5
- package/src/plugins/builtin/attention/model.ts +6 -5
- package/src/plugins/builtin/attention/pane.tsx +5 -4
- package/src/plugins/builtin/awards/detail.tsx +17 -8
- package/src/plugins/builtin/awards/headless.ts +37 -15
- package/src/plugins/builtin/awards/model.ts +40 -5
- package/src/plugins/builtin/awards/pane.tsx +11 -8
- package/src/plugins/builtin/backtest/format.ts +3 -2
- package/src/plugins/builtin/backtest/report.ts +3 -2
- package/src/plugins/builtin/bond-calculator/headless.ts +2 -1
- package/src/plugins/builtin/bond-calculator/pane.tsx +2 -1
- package/src/plugins/builtin/broker-manager/add-flow.tsx +1 -1
- package/src/plugins/builtin/broker-manager/index.tsx +1 -0
- package/src/plugins/builtin/broker-trading/index.tsx +1 -1
- package/src/plugins/builtin/broker-trading/orders-data.ts +3 -3
- package/src/plugins/builtin/broker-trading/orders.tsx +3 -2
- package/src/plugins/builtin/broker-trading/ticket.tsx +2 -2
- package/src/plugins/builtin/buildout/cells.tsx +2 -1
- package/src/plugins/builtin/buildout/company/pane.tsx +4 -3
- package/src/plugins/builtin/buildout/data-runtime.ts +21 -23
- package/src/plugins/builtin/buildout/detail/values.ts +2 -1
- package/src/plugins/builtin/buildout/format.ts +4 -3
- package/src/plugins/builtin/buildout/pane/index.tsx +3 -3
- package/src/plugins/builtin/catalysts/detail.tsx +2 -1
- package/src/plugins/builtin/catalysts/model.ts +6 -5
- package/src/plugins/builtin/catalysts/pane.tsx +2 -1
- package/src/plugins/builtin/cds/headless.ts +3 -2
- package/src/plugins/builtin/cds/model.ts +8 -8
- package/src/plugins/builtin/cds/pane.tsx +3 -2
- package/src/plugins/builtin/central-bank-rates/headless.ts +8 -7
- package/src/plugins/builtin/central-bank-rates/index.tsx +1 -1
- package/src/plugins/builtin/central-bank-rates/model.ts +24 -5
- package/src/plugins/builtin/central-bank-rates/pane.tsx +19 -9
- package/src/plugins/builtin/changelog/index.tsx +2 -2
- package/src/plugins/builtin/chart-composer/headless.ts +5 -1
- package/src/plugins/builtin/chart-composer/index.tsx +4 -2
- package/src/plugins/builtin/chart-composer/pane.tsx +8 -3
- package/src/plugins/builtin/chart-composer/use-series-catalog.ts +3 -1
- package/src/plugins/builtin/chart-composer/user-series.ts +3 -1
- package/src/plugins/builtin/chat/attachments/desktop.tsx +2 -1
- package/src/plugins/builtin/chat/content/handle-prompt.tsx +4 -0
- package/src/plugins/builtin/chat/controller/realtime.ts +17 -1
- package/src/plugins/builtin/chat/controller/utils.ts +2 -1
- package/src/plugins/builtin/chat/message/terminal.tsx +4 -1
- package/src/plugins/builtin/chat/sidebar.tsx +3 -4
- package/src/plugins/builtin/clinical-trials/model.ts +4 -3
- package/src/plugins/builtin/clinical-trials/sponsor-tickers.ts +4 -2
- package/src/plugins/builtin/cloud/askg/lock-note.ts +16 -4
- package/src/plugins/builtin/cloud/askg/model.ts +2 -1
- package/src/plugins/builtin/cloud/askg/pane.tsx +39 -1
- package/src/plugins/builtin/cloud/company-picker.tsx +1 -3
- package/src/plugins/builtin/cloud/plugin.tsx +1 -0
- package/src/plugins/builtin/cloud/team/module.tsx +1 -0
- package/src/plugins/builtin/cloud/team/pane.tsx +12 -12
- package/src/plugins/builtin/cloud/thesis/detail.tsx +22 -12
- package/src/plugins/builtin/cloud-tweets/model.ts +2 -2
- package/src/plugins/builtin/comment-letters/pane.tsx +2 -1
- package/src/plugins/builtin/commodity-balances/headless.ts +3 -2
- package/src/plugins/builtin/commodity-balances/pane.tsx +13 -5
- package/src/plugins/builtin/company-attention/app-rank.tsx +5 -4
- package/src/plugins/builtin/company-attention/building-model.ts +7 -7
- package/src/plugins/builtin/company-attention/headless.ts +6 -5
- package/src/plugins/builtin/company-attention/model.ts +4 -4
- package/src/plugins/builtin/company-attention/moves-model.ts +9 -9
- package/src/plugins/builtin/company-attention/signals-model.ts +9 -9
- package/src/plugins/builtin/company-kpis/headless.ts +2 -1
- package/src/plugins/builtin/company-kpis/model.ts +18 -13
- package/src/plugins/builtin/company-kpis/pane.tsx +2 -2
- package/src/plugins/builtin/congress-trades/detail.tsx +6 -5
- package/src/plugins/builtin/congress-trades/headless.ts +2 -1
- package/src/plugins/builtin/congress-trades/model.ts +6 -6
- package/src/plugins/builtin/congress-trades/table.tsx +7 -6
- package/src/plugins/builtin/connections/index.ts +1 -0
- package/src/plugins/builtin/connections/pane.tsx +5 -5
- package/src/plugins/builtin/correlation/headless.ts +2 -2
- package/src/plugins/builtin/correlation/index.tsx +4 -1
- package/src/plugins/builtin/correlation/matrix/selection.ts +2 -1
- package/src/plugins/builtin/correlation/relationship/view-model.ts +3 -3
- package/src/plugins/builtin/cot/headless.ts +3 -2
- package/src/plugins/builtin/cot/model.ts +2 -1
- package/src/plugins/builtin/cot/pane.tsx +4 -3
- package/src/plugins/builtin/cpi/headless.ts +4 -3
- package/src/plugins/builtin/cpi/model.ts +8 -7
- package/src/plugins/builtin/credit-boards/cdx-pane.tsx +14 -9
- package/src/plugins/builtin/credit-boards/client.ts +5 -0
- package/src/plugins/builtin/credit-boards/headless.ts +3 -7
- package/src/plugins/builtin/credit-boards/model.ts +5 -11
- package/src/plugins/builtin/credit-boards/series.ts +19 -8
- package/src/plugins/builtin/credit-boards/sovr-pane.tsx +9 -5
- package/src/plugins/builtin/credit-conditions/headless.ts +2 -1
- package/src/plugins/builtin/credit-conditions/index.tsx +2 -2
- package/src/plugins/builtin/credit-documents/model.ts +2 -2
- package/src/plugins/builtin/crypto-board/defi-view.tsx +7 -7
- package/src/plugins/builtin/crypto-board/defi.ts +2 -2
- package/src/plugins/builtin/crypto-board/model.ts +4 -3
- package/src/plugins/builtin/crypto-board/pane.tsx +8 -8
- package/src/plugins/builtin/crypto-board/supply.ts +2 -2
- package/src/plugins/builtin/crypto-etf-flows/headless.ts +23 -13
- package/src/plugins/builtin/crypto-etf-flows/model.ts +4 -4
- package/src/plugins/builtin/crypto-etf-flows/pane.tsx +8 -3
- package/src/plugins/builtin/custom-view/index.tsx +3 -1
- package/src/plugins/builtin/custom-view/pane.tsx +5 -1
- package/src/plugins/builtin/custom-view/view-spec.ts +11 -0
- package/src/plugins/builtin/debt-maturities/headless.ts +16 -7
- package/src/plugins/builtin/debt-maturities/model.ts +12 -18
- package/src/plugins/builtin/debt-maturities/pane.tsx +11 -12
- package/src/plugins/builtin/dividend-yield/client.ts +7 -3
- package/src/plugins/builtin/dividend-yield/headless.ts +16 -11
- package/src/plugins/builtin/dividend-yield/pane.tsx +12 -10
- package/src/plugins/builtin/dividend-yield/ranking-view.tsx +4 -1
- package/src/plugins/builtin/dividend-yield/ranking.ts +19 -11
- package/src/plugins/builtin/dividend-yield/types.ts +4 -0
- package/src/plugins/builtin/dividend-yield/view.ts +3 -3
- package/src/plugins/builtin/docs/use-docs.ts +4 -2
- package/src/plugins/builtin/doe/headless.ts +2 -1
- package/src/plugins/builtin/doe/model.ts +12 -11
- package/src/plugins/builtin/earnings/board-model.ts +42 -7
- package/src/plugins/builtin/earnings/board-table.ts +13 -8
- package/src/plugins/builtin/earnings/board.tsx +15 -3
- package/src/plugins/builtin/earnings/calendar-model.ts +5 -5
- package/src/plugins/builtin/earnings/calendar.tsx +11 -6
- package/src/plugins/builtin/earnings/client.ts +0 -9
- package/src/plugins/builtin/earnings/format.ts +16 -14
- package/src/plugins/builtin/earnings/headless.ts +64 -23
- package/src/plugins/builtin/earnings/history-model.ts +11 -7
- package/src/plugins/builtin/earnings/history-table.ts +14 -9
- package/src/plugins/builtin/earnings/history.tsx +22 -14
- package/src/plugins/builtin/earnings-calls/calendar.tsx +2 -1
- package/src/plugins/builtin/earnings-calls/data.ts +24 -4
- package/src/plugins/builtin/earnings-calls/format.ts +29 -10
- package/src/plugins/builtin/earnings-calls/headless.ts +23 -3
- package/src/plugins/builtin/earnings-calls/index.tsx +1 -0
- package/src/plugins/builtin/earnings-calls/model.ts +11 -1
- package/src/plugins/builtin/earnings-calls/pane.tsx +2 -5
- package/src/plugins/builtin/earnings-calls/upcoming.ts +5 -5
- package/src/plugins/builtin/earnings-ripple/headless.ts +2 -1
- package/src/plugins/builtin/earnings-ripple/model.ts +3 -2
- package/src/plugins/builtin/earnings-ripple/pane.tsx +6 -6
- package/src/plugins/builtin/econ/calendar-model.ts +29 -2
- package/src/plugins/builtin/econ/detail-view.tsx +2 -2
- package/src/plugins/builtin/econ/fred-catalog.ts +3 -0
- package/src/plugins/builtin/econ/index.tsx +16 -8
- package/src/plugins/builtin/econ-statistics/detail.tsx +2 -1
- package/src/plugins/builtin/econ-statistics/headless.ts +7 -5
- package/src/plugins/builtin/econ-statistics/index.tsx +1 -1
- package/src/plugins/builtin/econ-statistics/pane.tsx +2 -2
- package/src/plugins/builtin/equity-screener/headless.ts +5 -5
- package/src/plugins/builtin/equity-screener/model.ts +6 -4
- package/src/plugins/builtin/equity-screener/pane.tsx +7 -7
- package/src/plugins/builtin/equity-screener/screen-check.ts +2 -1
- package/src/plugins/builtin/equity-screener/ticker-check.tsx +2 -1
- package/src/plugins/builtin/estimate-revisions/model.ts +3 -2
- package/src/plugins/builtin/estimate-revisions/pane.tsx +8 -8
- package/src/plugins/builtin/executives/format.ts +4 -4
- package/src/plugins/builtin/exposure/headless.ts +8 -8
- package/src/plugins/builtin/exposure/model.ts +4 -3
- package/src/plugins/builtin/exposure/pane.tsx +6 -5
- package/src/plugins/builtin/fear-greed/format.ts +7 -7
- package/src/plugins/builtin/fear-greed/headless.ts +18 -14
- package/src/plugins/builtin/fear-greed/pane.tsx +12 -4
- package/src/plugins/builtin/filing-events/feed.ts +2 -1
- package/src/plugins/builtin/filing-events/index.tsx +1 -0
- package/src/plugins/builtin/futures/table.tsx +8 -8
- package/src/plugins/builtin/futures-curve/headless.ts +18 -18
- package/src/plugins/builtin/futures-curve/model.ts +5 -5
- package/src/plugins/builtin/futures-curve/pane.tsx +8 -8
- package/src/plugins/builtin/fx-matrix/index.tsx +32 -21
- package/src/plugins/builtin/fx-matrix/pairs.ts +2 -1
- package/src/plugins/builtin/gpu/board.tsx +6 -5
- package/src/plugins/builtin/gpu/changes.tsx +2 -1
- package/src/plugins/builtin/gpu/equities.tsx +2 -2
- package/src/plugins/builtin/gpu/headless.ts +4 -3
- package/src/plugins/builtin/gpu/model.ts +8 -7
- package/src/plugins/builtin/help/functions-table.tsx +41 -9
- package/src/plugins/builtin/help/index.tsx +6 -3
- package/src/plugins/builtin/help/keybindings-editor.tsx +35 -7
- package/src/plugins/builtin/help/shortcut-table.tsx +19 -7
- package/src/plugins/builtin/help/table-cells.tsx +51 -0
- package/src/plugins/builtin/holders/pane.tsx +4 -1
- package/src/plugins/builtin/insider/base-values.ts +2 -2
- package/src/plugins/builtin/insider/display.ts +2 -1
- package/src/plugins/builtin/insider/headless.ts +16 -16
- package/src/plugins/builtin/insider/insider-data.ts +2 -1
- package/src/plugins/builtin/insider/signals-model.ts +3 -3
- package/src/plugins/builtin/insider/table-model.ts +27 -13
- package/src/plugins/builtin/insider/table.tsx +11 -8
- package/src/plugins/builtin/insider/tickers.tsx +1 -1
- package/src/plugins/builtin/ipo-calendar/model.ts +4 -4
- package/src/plugins/builtin/iv-history/format.ts +8 -7
- package/src/plugins/builtin/iv-history/headless.ts +18 -16
- package/src/plugins/builtin/iv-history/pane.tsx +3 -2
- package/src/plugins/builtin/iv-history/screen-pane.tsx +5 -4
- package/src/plugins/builtin/jobs/headless.ts +11 -11
- package/src/plugins/builtin/jobs/index.tsx +1 -0
- package/src/plugins/builtin/jobs/model.ts +2 -2
- package/src/plugins/builtin/jobs/pane.tsx +5 -5
- package/src/plugins/builtin/jodi/model.ts +2 -2
- package/src/plugins/builtin/jodi/pane.tsx +2 -1
- package/src/plugins/builtin/kelly-sizer/headless.ts +4 -4
- package/src/plugins/builtin/kelly-sizer/model.ts +2 -1
- package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -2
- package/src/plugins/builtin/macro-day/headless.ts +9 -8
- package/src/plugins/builtin/macro-day/model.ts +3 -2
- package/src/plugins/builtin/macro-day/pane.tsx +4 -4
- package/src/plugins/builtin/macro-day/releases.ts +25 -16
- package/src/plugins/builtin/market-halts/model.ts +11 -10
- package/src/plugins/builtin/market-halts/pane.tsx +2 -1
- package/src/plugins/builtin/market-heatmap/index.tsx +4 -4
- package/src/plugins/builtin/market-movers/index.tsx +20 -8
- package/src/plugins/builtin/market-movers/model.ts +5 -0
- package/src/plugins/builtin/market-movers/session-body.tsx +2 -1
- package/src/plugins/builtin/market-movers/session-table.ts +3 -3
- package/src/plugins/builtin/market-movers/session.ts +2 -1
- package/src/plugins/builtin/market-movers/table.ts +5 -5
- package/src/plugins/builtin/market-valuation/detail.tsx +2 -2
- package/src/plugins/builtin/market-valuation/headless.ts +7 -7
- package/src/plugins/builtin/market-valuation/pane.tsx +7 -7
- package/src/plugins/builtin/members/breadth-pane.tsx +5 -4
- package/src/plugins/builtin/members/headless.ts +2 -1
- package/src/plugins/builtin/members/model.ts +3 -2
- package/src/plugins/builtin/members/pane.tsx +10 -9
- package/src/plugins/builtin/mna/distress/model.ts +2 -1
- package/src/plugins/builtin/mna/model.ts +5 -5
- package/src/plugins/builtin/money-markets/headless.ts +14 -3
- package/src/plugins/builtin/money-markets/model.ts +3 -2
- package/src/plugins/builtin/money-markets/pane.tsx +14 -5
- package/src/plugins/builtin/news/headless.ts +5 -2
- package/src/plugins/builtin/news/wire/breaking/notifications.ts +21 -19
- package/src/plugins/builtin/news/wire/news/row.ts +3 -1
- package/src/plugins/builtin/news/wire/news/table.tsx +3 -2
- package/src/plugins/builtin/news/wire/persisted-articles.ts +28 -3
- package/src/plugins/builtin/notes/headless.ts +2 -1
- package/src/plugins/builtin/notes/model.ts +2 -1
- package/src/plugins/builtin/openfda/pane.tsx +4 -3
- package/src/plugins/builtin/options/carry.ts +3 -2
- package/src/plugins/builtin/options/market-reference.ts +2 -1
- package/src/plugins/builtin/options/table.ts +48 -9
- package/src/plugins/builtin/options/view.tsx +48 -17
- package/src/plugins/builtin/options-calculator/headless.ts +3 -2
- package/src/plugins/builtin/options-calculator/pane.tsx +7 -7
- package/src/plugins/builtin/options-positioning/headless.ts +8 -7
- package/src/plugins/builtin/options-positioning/model.ts +10 -10
- package/src/plugins/builtin/options-positioning/pane.tsx +6 -6
- package/src/plugins/builtin/options-scenario/collar.ts +5 -4
- package/src/plugins/builtin/options-scenario/csp-screen-headless.ts +11 -10
- package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +15 -14
- package/src/plugins/builtin/options-scenario/csp-screen.ts +2 -1
- package/src/plugins/builtin/options-scenario/csp.ts +6 -5
- package/src/plugins/builtin/options-scenario/headless.ts +6 -5
- package/src/plugins/builtin/options-scenario/hedge.ts +3 -3
- package/src/plugins/builtin/options-scenario/pane.tsx +7 -6
- package/src/plugins/builtin/options-scenario/strategy-screen.ts +1 -1
- package/src/plugins/builtin/pe-band/headless.ts +9 -8
- package/src/plugins/builtin/pe-band/pane.tsx +7 -7
- package/src/plugins/builtin/perps/cascade.ts +3 -2
- package/src/plugins/builtin/perps/headless.ts +10 -9
- package/src/plugins/builtin/perps/model.ts +14 -14
- package/src/plugins/builtin/perps/pane.tsx +3 -2
- package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +4 -31
- package/src/plugins/builtin/portfolio-list/header.tsx +2 -2
- package/src/plugins/builtin/portfolio-list/index.tsx +3 -2
- package/src/plugins/builtin/portfolio-list/pane/futures-terms.ts +4 -2
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +6 -1
- package/src/plugins/builtin/portfolio-list/pane/period-pnl.ts +2 -1
- package/src/plugins/builtin/portfolio-list/pane/purchase-date-fx.ts +4 -2
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +24 -10
- package/src/plugins/builtin/portfolio-list/settings.ts +4 -1
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +9 -11
- package/src/plugins/builtin/portfolio-list/table.tsx +10 -1
- package/src/plugins/builtin/power/detail.tsx +6 -5
- package/src/plugins/builtin/power/gas-model.ts +8 -7
- package/src/plugins/builtin/power/gas.tsx +2 -1
- package/src/plugins/builtin/power/headless.ts +7 -6
- package/src/plugins/builtin/power/model.ts +3 -2
- package/src/plugins/builtin/power/prices-headless.ts +10 -9
- package/src/plugins/builtin/power/prices-model.ts +3 -2
- package/src/plugins/builtin/power/prices.tsx +2 -1
- package/src/plugins/builtin/primary-dealers/model.ts +3 -3
- package/src/plugins/builtin/primary-dealers/pane.tsx +2 -2
- package/src/plugins/builtin/rate-path/headless.ts +8 -7
- package/src/plugins/builtin/rate-path/model.ts +6 -5
- package/src/plugins/builtin/rate-path/pane.tsx +6 -5
- package/src/plugins/builtin/realized-vol/fx-proxy.ts +2 -1
- package/src/plugins/builtin/realized-vol/headless.ts +37 -10
- package/src/plugins/builtin/realized-vol/pane.tsx +5 -4
- package/src/plugins/builtin/relative-rotation/headless.ts +2 -1
- package/src/plugins/builtin/relative-rotation/pane.tsx +6 -6
- package/src/plugins/builtin/research/analyst-headless.ts +5 -5
- package/src/plugins/builtin/research/analyst-model.ts +7 -7
- package/src/plugins/builtin/research/analyst-pane.tsx +7 -7
- package/src/plugins/builtin/research/client.ts +14 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +40 -30
- package/src/plugins/builtin/research/event-model.ts +55 -22
- package/src/plugins/builtin/research/event-sources.ts +26 -8
- package/src/plugins/builtin/research/relative-valuation-columns.ts +20 -12
- package/src/plugins/builtin/research/relative-valuation-currency.ts +16 -0
- package/src/plugins/builtin/research/relative-valuation-headless.ts +33 -21
- package/src/plugins/builtin/research/relative-valuation-model.ts +31 -17
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +29 -14
- package/src/plugins/builtin/research-search/model.ts +2 -1
- package/src/plugins/builtin/research-search/saved-view.tsx +4 -3
- package/src/plugins/builtin/revenue-breakdown/model.ts +4 -4
- package/src/plugins/builtin/reverse-dcf/headless.ts +7 -7
- package/src/plugins/builtin/reverse-dcf/model.ts +4 -4
- package/src/plugins/builtin/reverse-dcf/pane.tsx +2 -2
- package/src/plugins/builtin/risk-factors/index.tsx +1 -0
- package/src/plugins/builtin/scanner/flow-model.ts +7 -4
- package/src/plugins/builtin/scanner/flow-pane.tsx +1 -1
- package/src/plugins/builtin/scanner/headless.ts +3 -2
- package/src/plugins/builtin/scanner/hilo-model.ts +2 -1
- package/src/plugins/builtin/scanner/live-headless.ts +2 -2
- package/src/plugins/builtin/scanner/live-model.ts +3 -2
- package/src/plugins/builtin/scanner/live-pane.tsx +5 -5
- package/src/plugins/builtin/seasonality/headless.ts +2 -1
- package/src/plugins/builtin/seasonality/pane.tsx +4 -3
- package/src/plugins/builtin/sec/filing-display.tsx +12 -15
- package/src/plugins/builtin/sec/fund-facts.ts +2 -2
- package/src/plugins/builtin/sec/headless.ts +2 -1
- package/src/plugins/builtin/sec/index.tsx +6 -2
- package/src/plugins/builtin/sectors/headless.ts +4 -4
- package/src/plugins/builtin/sectors/index.tsx +7 -7
- package/src/plugins/builtin/shared/earnings-calendar.ts +90 -6
- package/src/plugins/builtin/shared/earnings-report.ts +13 -6
- package/src/plugins/builtin/shared/research-cells.tsx +2 -2
- package/src/plugins/builtin/shared/source-footer.ts +71 -0
- package/src/plugins/builtin/shared/trend.ts +2 -2
- package/src/plugins/builtin/shared/use-quote-board.ts +9 -8
- package/src/plugins/builtin/short-interest/headless.ts +6 -6
- package/src/plugins/builtin/short-interest/model.ts +9 -9
- package/src/plugins/builtin/short-interest/publications-model.ts +5 -5
- package/src/plugins/builtin/short-interest/publications-pane.tsx +8 -3
- package/src/plugins/builtin/short-interest/watch-headless.ts +5 -5
- package/src/plugins/builtin/short-interest/watch-pane.tsx +6 -6
- package/src/plugins/builtin/short-volume/model.ts +5 -5
- package/src/plugins/builtin/short-volume/pane.tsx +9 -5
- package/src/plugins/builtin/social-mentions/headless.ts +2 -1
- package/src/plugins/builtin/social-mentions/model.ts +4 -4
- package/src/plugins/builtin/social-mentions/outliers.tsx +10 -1
- package/src/plugins/builtin/social-mentions/pane.tsx +7 -0
- package/src/plugins/builtin/supply-chain/client.ts +3 -1
- package/src/plugins/builtin/supply-chain/flow.tsx +25 -8
- package/src/plugins/builtin/supply-chain/graph-client.ts +1 -1
- package/src/plugins/builtin/supply-chain/graph-evidence.ts +1 -1
- package/src/plugins/builtin/supply-chain/graph-model.ts +14 -2
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +11 -10
- package/src/plugins/builtin/supply-chain/graph.tsx +12 -6
- package/src/plugins/builtin/supply-chain/headless.ts +15 -8
- package/src/plugins/builtin/supply-chain/model.ts +72 -15
- package/src/plugins/builtin/supply-chain/pane.tsx +11 -8
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +7 -6
- package/src/plugins/builtin/themes/headless.ts +2 -1
- package/src/plugins/builtin/themes/model.ts +3 -2
- package/src/plugins/builtin/themes/pane.tsx +3 -2
- package/src/plugins/builtin/thirteenf/format.ts +9 -9
- package/src/plugins/builtin/thirteenf/headless.ts +3 -2
- package/src/plugins/builtin/thirteenf/model.ts +2 -1
- package/src/plugins/builtin/thirteenf/overlap-pane.tsx +2 -1
- package/src/plugins/builtin/thirteenf/pane.tsx +5 -4
- package/src/plugins/builtin/thirteenf/report-notes.ts +2 -1
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +3 -2
- package/src/plugins/builtin/thirteenf/table.ts +6 -5
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +4 -3
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +4 -4
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +3 -3
- package/src/plugins/builtin/ticker-detail/financials/model.ts +83 -35
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +3 -1
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +2 -2
- package/src/plugins/builtin/ticker-detail/financials/schema.ts +14 -18
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +8 -13
- package/src/plugins/builtin/ticker-detail/headless.ts +7 -5
- package/src/plugins/builtin/ticker-detail/overview/chart-scale.ts +52 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +18 -5
- package/src/plugins/builtin/ticker-detail/overview/model.ts +24 -13
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +6 -0
- package/src/plugins/builtin/ticker-detail/overview/tax-equivalent.ts +2 -1
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +35 -7
- package/src/plugins/builtin/ticker-detail/pane.tsx +48 -24
- package/src/plugins/builtin/ticker-detail/quote-footer.ts +5 -0
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +13 -8
- package/src/plugins/builtin/ticker-detail/quote-monitor/rows.ts +4 -4
- package/src/plugins/builtin/ticker-detail/settings.ts +17 -0
- package/src/plugins/builtin/time-sales/headless.ts +3 -2
- package/src/plugins/builtin/time-sales/model.ts +7 -5
- package/src/plugins/builtin/time-sales/pane.tsx +7 -6
- package/src/plugins/builtin/trace-bonds/model.ts +3 -2
- package/src/plugins/builtin/trace-bonds/pane.tsx +3 -2
- package/src/plugins/builtin/treasury-auctions/after.ts +50 -23
- package/src/plugins/builtin/treasury-auctions/cache.ts +23 -5
- package/src/plugins/builtin/treasury-auctions/client.ts +2 -1
- package/src/plugins/builtin/treasury-auctions/headless.ts +231 -42
- package/src/plugins/builtin/treasury-auctions/hk-headless.ts +14 -7
- package/src/plugins/builtin/treasury-auctions/hk-view.tsx +37 -34
- package/src/plugins/builtin/treasury-auctions/hk.ts +65 -13
- package/src/plugins/builtin/treasury-auctions/index.tsx +3 -0
- package/src/plugins/builtin/treasury-auctions/keys.ts +27 -0
- package/src/plugins/builtin/treasury-auctions/like.ts +137 -0
- package/src/plugins/builtin/treasury-auctions/model.ts +101 -23
- package/src/plugins/builtin/treasury-auctions/pane.tsx +56 -28
- package/src/plugins/builtin/treasury-auctions/treasury-direct.ts +2 -1
- package/src/plugins/builtin/treasury-daily/model.ts +2 -2
- package/src/plugins/builtin/vol-surface/events.ts +5 -4
- package/src/plugins/builtin/vol-surface/headless.ts +19 -18
- package/src/plugins/builtin/vol-surface/heat-grid.tsx +6 -3
- package/src/plugins/builtin/vol-surface/pane.tsx +13 -9
- package/src/plugins/builtin/vol-surface/stored.ts +2 -1
- package/src/plugins/builtin/vol-surface/tables.ts +4 -3
- package/src/plugins/builtin/volatility/headless.ts +5 -4
- package/src/plugins/builtin/volatility/pane.tsx +6 -6
- package/src/plugins/builtin/world-indices/headless.ts +7 -7
- package/src/plugins/builtin/world-indices/index.tsx +3 -1
- package/src/plugins/builtin/world-venue-map/headless.ts +2 -1
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +2 -1
- package/src/plugins/builtin/world-venue-map/layers.ts +3 -2
- package/src/plugins/builtin/world-venue-map/use-geo.ts +4 -2
- package/src/plugins/builtin/yield-curve/curves.ts +3 -3
- package/src/plugins/builtin/yield-curve/headless.ts +7 -6
- package/src/plugins/builtin/yield-curve/index.tsx +5 -4
- package/src/plugins/builtin/yield-curve/swaps.tsx +2 -1
- package/src/plugins/runtime/index.tsx +1 -0
- package/src/plugins/runtime/state.ts +20 -0
- package/src/portfolio/allocation.ts +5 -5
- package/src/portfolio/column-values.ts +54 -42
- package/src/portfolio/futures-positions.ts +2 -1
- package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
- package/src/public/react.ts +7 -0
- package/src/react/auto-refresh.ts +29 -0
- package/src/renderers/browser/deeplink-bridge.ts +24 -3
- package/src/renderers/dom/desktop/query-bar.tsx +229 -60
- package/src/renderers/dom/host/overflow-fade-px.ts +2 -0
- package/src/renderers/dom/host/overflow-fade.ts +1 -2
- package/src/renderers/dom/styles.css +25 -5
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +7 -1
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +2 -1
- package/src/renderers/opentui/ui-host.tsx +32 -2
- package/src/renderers/share/layout-view.tsx +2 -1
- package/src/series/types.ts +2 -0
- package/src/sources/gloomberb-cloud/fred-attribution.ts +86 -0
- package/src/sources/gloomberb-cloud/index.ts +25 -1
- package/src/sources/gloomberb-cloud/news.ts +9 -0
- package/src/sources/gloomberb-cloud/normalizers.ts +24 -3
- package/src/sources/provider-errors.ts +64 -1
- package/src/sources/provider-router/batches.ts +19 -0
- package/src/sources/provider-router/index.ts +7 -1
- package/src/sources/provider-router/search.ts +15 -10
- package/src/state/app/context/index.tsx +24 -1
- package/src/state/hooks/inline-tickers.ts +3 -2
- package/src/state/hooks/quote-streaming.ts +9 -10
- package/src/state/pane-unsent-work.ts +47 -0
- package/src/team/collections-sync.ts +8 -3
- package/src/telemetry/usage-counts.ts +26 -0
- package/src/test-support/shell-pane-keys.tsx +5 -0
- package/src/test-support/telemetry-guard.ts +83 -0
- package/src/test-support/test-env.ts +12 -0
- package/src/theme/colors.ts +17 -1
- package/src/theme/ui-tokens.ts +50 -1
- package/src/tickers/company-name-listing.ts +2 -2
- package/src/tickers/company-name.ts +17 -1
- package/src/tickers/listing-venues.ts +37 -2
- package/src/tickers/renamed-listings.ts +2 -1
- package/src/tickers/search/index.ts +19 -0
- package/src/tickers/search/japanese-names.json +1 -0
- package/src/tickers/search/japanese-names.ts +152 -0
- package/src/tickers/starter-symbols.ts +7 -0
- package/src/tickers/terminal-codes.ts +55 -6
- package/src/time-series/base-series.ts +3 -0
- package/src/time-series/fundamentals/statement-fields.ts +11 -14
- package/src/time-series/history-acquisition.ts +1 -1
- package/src/time-series/log-scale.ts +9 -0
- package/src/time-series/reporting.ts +3 -3
- package/src/time-series/resolve.ts +6 -4
- package/src/time-series/transforms.ts +10 -5
- package/src/types/config.ts +9 -0
- package/src/types/data-provider.ts +9 -2
- package/src/types/financials.ts +26 -0
- package/src/types/instrument.ts +6 -0
- package/src/types/plugin-contributions.ts +7 -0
- package/src/types/plugin-panes.ts +8 -1
- package/src/types/plugin-reports.ts +8 -0
- package/src/ui/host.tsx +6 -0
- package/src/utils/datetime-format.ts +74 -33
- package/src/utils/double-escape-close.ts +42 -0
- package/src/utils/financial-statements.ts +39 -15
- package/src/utils/format.ts +4 -9
- package/src/utils/fundamentals.ts +38 -16
- package/src/utils/fx-status.ts +30 -7
- package/src/utils/growth.ts +67 -0
- package/src/utils/keyboard.ts +6 -0
- package/src/utils/network-failure.ts +23 -0
- package/src/utils/options.ts +1 -1
- package/src/utils/report-timing.ts +2 -2
- package/src/utils/served-rates.ts +45 -0
- package/src/utils/text-wrap.ts +84 -3
- package/src/utils/zoned-date-time.ts +47 -22
|
@@ -26,6 +26,9 @@ import {
|
|
|
26
26
|
import { useThemeColors } from "../../../theme/theme-context";
|
|
27
27
|
import { SPACE } from "../../../theme/ui-tokens";
|
|
28
28
|
import { getPaneDisplayTitle } from "../pane/title";
|
|
29
|
+
import { adjacentStackTabId, registerCoveredPaneSource } from "../pane/cycle-order";
|
|
30
|
+
import { resolveTitleCoveredPaneIds } from "./pane-occlusion";
|
|
31
|
+
import { paneHeaderRows } from "../pane/sizing";
|
|
29
32
|
import type { PaneHeaderQuickSetting } from "../pane/header";
|
|
30
33
|
import { getPaneFooter } from "../pane/footer";
|
|
31
34
|
import { getShortcutDisplayMode } from "../../../utils/shortcut-labels";
|
|
@@ -312,7 +315,9 @@ export function Shell({
|
|
|
312
315
|
const {
|
|
313
316
|
canExportPaneCsv,
|
|
314
317
|
closeAllFloatingPanes,
|
|
318
|
+
closeFocusedFloatingPane,
|
|
315
319
|
closeFocusedPane,
|
|
320
|
+
closeFocusedPaneOnEscape,
|
|
316
321
|
copyFocusedPaneScreenshot,
|
|
317
322
|
copyPaneScreenshot,
|
|
318
323
|
exportFocusedPaneCsv,
|
|
@@ -322,6 +327,7 @@ export function Shell({
|
|
|
322
327
|
openFocusedPaneSettings,
|
|
323
328
|
openPaneSettings,
|
|
324
329
|
popOutFocusedPane,
|
|
330
|
+
showAdjacentStackTab,
|
|
325
331
|
toggleFocusedPaneFloating,
|
|
326
332
|
} = useShellPaneActions({
|
|
327
333
|
closePaneMenu,
|
|
@@ -498,6 +504,16 @@ export function Shell({
|
|
|
498
504
|
? visibleFloatingPanes.filter(({ pane }) => pane.instance.instanceId === transientFocusPaneId).map((entry) => ({ ...entry, rect: fullscreenRect }))
|
|
499
505
|
: visibleFloatingPanes
|
|
500
506
|
), [fullscreenRect, transientFocusActive, transientFocusPaneId, visibleFloatingPanes]);
|
|
507
|
+
// Docked panes whose title bar a floating window hides: Tab passes them by,
|
|
508
|
+
// so focus never lands where it cannot be seen.
|
|
509
|
+
const titleCoveredPaneIds = useMemo(() => resolveTitleCoveredPaneIds(
|
|
510
|
+
screenDockLeafLayouts.map((leaf) => ({ paneId: leaf.instanceId, rect: leaf.rect })),
|
|
511
|
+
screenFloatingPanes.map((entry) => entry.rect),
|
|
512
|
+
{ headerRows: paneHeaderRows(nativePaneChrome) },
|
|
513
|
+
), [nativePaneChrome, screenDockLeafLayouts, screenFloatingPanes]);
|
|
514
|
+
const titleCoveredRef = useRef(titleCoveredPaneIds);
|
|
515
|
+
titleCoveredRef.current = titleCoveredPaneIds;
|
|
516
|
+
useEffect(() => registerCoveredPaneSource(() => titleCoveredRef.current), []);
|
|
501
517
|
const screenDockedPanes = useMemo(() => (
|
|
502
518
|
transientFocusActive
|
|
503
519
|
? dockedPanes.filter((pane) => pane.instance.instanceId === transientFocusPaneId)
|
|
@@ -610,7 +626,9 @@ export function Shell({
|
|
|
610
626
|
askAboutFocusedPane,
|
|
611
627
|
cancelActiveDrag,
|
|
612
628
|
closeAllFloatingPanes,
|
|
629
|
+
closeFocusedFloatingPane: transientFocusActive ? () => false : closeFocusedFloatingPane,
|
|
613
630
|
closeFocusedPane,
|
|
631
|
+
closeFocusedPaneOnEscape,
|
|
614
632
|
copyFocusedPaneScreenshot,
|
|
615
633
|
exportFocusedPaneCsv,
|
|
616
634
|
focusedPaneId,
|
|
@@ -623,6 +641,7 @@ export function Shell({
|
|
|
623
641
|
overlayOpen,
|
|
624
642
|
popOutFocusedPane,
|
|
625
643
|
shareFocusedPane,
|
|
644
|
+
showAdjacentStackTab,
|
|
626
645
|
startWindowMode,
|
|
627
646
|
toggleFocusedPaneFullscreen,
|
|
628
647
|
toggleFocusedPaneFloating,
|
|
@@ -657,6 +676,8 @@ export function Shell({
|
|
|
657
676
|
title: getPaneTitle(pane),
|
|
658
677
|
floating: !!pane.floating,
|
|
659
678
|
};
|
|
679
|
+
const nextStackTab = adjacentStackTabId(visibleLayout, paneId, 1);
|
|
680
|
+
const previousStackTab = adjacentStackTabId(visibleLayout, paneId, -1);
|
|
660
681
|
const items = menuForPane(
|
|
661
682
|
pane,
|
|
662
683
|
visibleLayout,
|
|
@@ -700,6 +721,9 @@ export function Shell({
|
|
|
700
721
|
canReportPaneBug(nativePaneChrome || !!nativeRenderer.capturePaneImage)
|
|
701
722
|
? () => { pluginRegistry.reportPaneBug(paneId); }
|
|
702
723
|
: undefined,
|
|
724
|
+
nextStackTab && previousStackTab
|
|
725
|
+
? { next: () => focusPane(nextStackTab), previous: () => focusPane(previousStackTab) }
|
|
726
|
+
: undefined,
|
|
703
727
|
);
|
|
704
728
|
const showKitMenu = () => {
|
|
705
729
|
const fallbackSourceItems = withPluginContextMenuItems(context, items, pluginRegistry);
|
|
@@ -820,6 +844,7 @@ export function Shell({
|
|
|
820
844
|
openPaneMenu,
|
|
821
845
|
openPaneDocs,
|
|
822
846
|
getPaneTitle,
|
|
847
|
+
getPaneQuickSettings,
|
|
823
848
|
paneMap,
|
|
824
849
|
persistLayout,
|
|
825
850
|
precisePointer,
|
|
@@ -119,6 +119,8 @@ export function menuForPane(
|
|
|
119
119
|
askGloom?: () => void,
|
|
120
120
|
/** Report a Bug: the pane's picture and a line to #bugs; absent where it cannot be posted or pictured. */
|
|
121
121
|
reportBug?: () => void,
|
|
122
|
+
/** The pane is a tab of a stack: show the next or the previous tab. */
|
|
123
|
+
stackTabs?: { next: () => void; previous: () => void },
|
|
122
124
|
): ContextMenuItem[] {
|
|
123
125
|
const baseActions: ContextMenuItem[] = [...paneItems];
|
|
124
126
|
if (baseActions.length > 0) baseActions.push(contextMenuDivider("pane:own-actions-divider"));
|
|
@@ -175,6 +177,13 @@ export function menuForPane(
|
|
|
175
177
|
// Plugin actions sit with sharing and exporting.
|
|
176
178
|
baseActions.push(pluginContextMenuSlot("pane"));
|
|
177
179
|
|
|
180
|
+
if (stackTabs) {
|
|
181
|
+
baseActions.push(
|
|
182
|
+
{ id: "stack-next-tab", label: "Next Tab", accelerator: accelerators.nextTab, onSelect: stackTabs.next },
|
|
183
|
+
{ id: "stack-prev-tab", label: "Previous Tab", accelerator: accelerators.prevTab, onSelect: stackTabs.previous },
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
178
187
|
if (fullscreen) {
|
|
179
188
|
baseActions.push({
|
|
180
189
|
id: "toggle-fullscreen",
|
|
@@ -22,6 +22,8 @@ import {
|
|
|
22
22
|
} from "../../../../state/pane-table-export-registry";
|
|
23
23
|
import { getDesktopWindows } from "../../../../state/desktop-windows";
|
|
24
24
|
import { getTopFloatingPaneId } from "../../../../core/state/app/layout";
|
|
25
|
+
import { paneHoldsUnsentWork } from "../../../../state/pane-unsent-work";
|
|
26
|
+
import { adjacentStackTabId } from "../../pane/cycle-order";
|
|
25
27
|
|
|
26
28
|
function notifyPaneLocked(pluginRegistry: PluginRegistry): void {
|
|
27
29
|
pluginRegistry.notify({ body: "Pane is locked. Unlock it in pane settings.", type: "info" });
|
|
@@ -141,6 +143,37 @@ export function useShellPaneActions({
|
|
|
141
143
|
return true;
|
|
142
144
|
}, [focusedPaneId, persistLayout, pluginRegistry, previousFocusedPaneId, visibleLayout]);
|
|
143
145
|
|
|
146
|
+
/**
|
|
147
|
+
* Esc Esc closes the focused pane, as Ctrl+W does, except one holding work
|
|
148
|
+
* an Esc must not throw away (a draft not sent, an answer coming in): then
|
|
149
|
+
* the Esc goes on to the pane.
|
|
150
|
+
*/
|
|
151
|
+
const closeFocusedPaneOnEscape = useCallback(() => {
|
|
152
|
+
if (paneHoldsUnsentWork(focusedPaneId)) return false;
|
|
153
|
+
return closeFocusedPane({ focusNextFloating: true });
|
|
154
|
+
}, [closeFocusedPane, focusedPaneId]);
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* One Esc closes the focused floating window, unless it is locked or holds
|
|
158
|
+
* unsent work (then the Esc goes on, with no notice: a stray Esc is not a
|
|
159
|
+
* close request). As with Esc Esc, the next floating window takes the
|
|
160
|
+
* focus, and with none left it goes back where it was before the window
|
|
161
|
+
* took it.
|
|
162
|
+
*/
|
|
163
|
+
const closeFocusedFloatingPane = useCallback(() => {
|
|
164
|
+
if (!focusedPaneId || !visibleLayout.floating.some((entry) => entry.instanceId === focusedPaneId)) return false;
|
|
165
|
+
if (isPaneLockedInLayout(visibleLayout, focusedPaneId)) return false;
|
|
166
|
+
return closeFocusedPaneOnEscape();
|
|
167
|
+
}, [closeFocusedPaneOnEscape, focusedPaneId, visibleLayout]);
|
|
168
|
+
|
|
169
|
+
/** Shows and focuses the next or previous tab of the focused pane's stack; false when it is in none. */
|
|
170
|
+
const showAdjacentStackTab = useCallback((direction: 1 | -1) => {
|
|
171
|
+
const next = adjacentStackTabId(visibleLayout, focusedPaneId, direction);
|
|
172
|
+
if (!next) return false;
|
|
173
|
+
focusPane(next);
|
|
174
|
+
return true;
|
|
175
|
+
}, [focusPane, focusedPaneId, visibleLayout]);
|
|
176
|
+
|
|
144
177
|
const closeAllFloatingPanes = useCallback(() => {
|
|
145
178
|
if (visibleLayout.floating.length === 0) return false;
|
|
146
179
|
const lockedIds = new Set(visibleLayout.floating
|
|
@@ -219,7 +252,9 @@ export function useShellPaneActions({
|
|
|
219
252
|
return {
|
|
220
253
|
canExportPaneCsv,
|
|
221
254
|
closeAllFloatingPanes,
|
|
255
|
+
closeFocusedFloatingPane,
|
|
222
256
|
closeFocusedPane,
|
|
257
|
+
closeFocusedPaneOnEscape,
|
|
223
258
|
copyFocusedPaneScreenshot,
|
|
224
259
|
copyPaneScreenshot,
|
|
225
260
|
exportFocusedPaneCsv,
|
|
@@ -229,6 +264,7 @@ export function useShellPaneActions({
|
|
|
229
264
|
openFocusedPaneSettings,
|
|
230
265
|
openPaneSettings,
|
|
231
266
|
popOutFocusedPane,
|
|
267
|
+
showAdjacentStackTab,
|
|
232
268
|
toggleFocusedPaneFloating,
|
|
233
269
|
};
|
|
234
270
|
}
|
|
@@ -15,6 +15,10 @@ interface ShellPaneManagementShortcutOptions {
|
|
|
15
15
|
closeAllFloatingPanes(): boolean;
|
|
16
16
|
/** `focusNextFloating`: the top floating pane left takes the focus, for closing them one after another. */
|
|
17
17
|
closeFocusedPane(options?: { focusNextFloating?: boolean }): boolean;
|
|
18
|
+
/** Closes the focused pane when it is a floating window one Esc closes; false otherwise. */
|
|
19
|
+
closeFocusedFloatingPane(): boolean;
|
|
20
|
+
/** Esc Esc's close: the focused pane, then the next floating one, unless it holds unsent work. */
|
|
21
|
+
closeFocusedPaneOnEscape(): boolean;
|
|
18
22
|
copyFocusedPaneScreenshot(): boolean;
|
|
19
23
|
exportFocusedPaneCsv(): boolean;
|
|
20
24
|
focusedPaneId: string | null;
|
|
@@ -27,6 +31,8 @@ interface ShellPaneManagementShortcutOptions {
|
|
|
27
31
|
overlayOpen: boolean;
|
|
28
32
|
popOutFocusedPane(): boolean;
|
|
29
33
|
shareFocusedPane(): boolean;
|
|
34
|
+
/** Shows the tab of the focused pane's stack `direction` steps to; false when it is in no stack. */
|
|
35
|
+
showAdjacentStackTab(direction: 1 | -1): boolean;
|
|
30
36
|
startWindowMode(paneId?: string, mode?: WindowEditMode): void;
|
|
31
37
|
toggleFocusedPaneFullscreen(): boolean;
|
|
32
38
|
toggleFocusedPaneFloating(): boolean;
|
|
@@ -37,7 +43,9 @@ export function useShellPaneManagementShortcuts({
|
|
|
37
43
|
askAboutFocusedPane,
|
|
38
44
|
cancelActiveDrag,
|
|
39
45
|
closeAllFloatingPanes,
|
|
46
|
+
closeFocusedFloatingPane,
|
|
40
47
|
closeFocusedPane,
|
|
48
|
+
closeFocusedPaneOnEscape,
|
|
41
49
|
copyFocusedPaneScreenshot,
|
|
42
50
|
exportFocusedPaneCsv,
|
|
43
51
|
focusedPaneId,
|
|
@@ -50,6 +58,7 @@ export function useShellPaneManagementShortcuts({
|
|
|
50
58
|
overlayOpen,
|
|
51
59
|
popOutFocusedPane,
|
|
52
60
|
shareFocusedPane,
|
|
61
|
+
showAdjacentStackTab,
|
|
53
62
|
startWindowMode,
|
|
54
63
|
toggleFocusedPaneFullscreen,
|
|
55
64
|
toggleFocusedPaneFloating,
|
|
@@ -59,13 +68,15 @@ export function useShellPaneManagementShortcuts({
|
|
|
59
68
|
const [shots] = useState(createOneShots);
|
|
60
69
|
const keybindings = useKeybindings();
|
|
61
70
|
|
|
62
|
-
// Esc Esc closes the focused pane and hands the focus to the next floating
|
|
71
|
+
// Esc Esc closes the focused pane and hands the focus to the next floating
|
|
72
|
+
// one; one Esc nothing took closes a floating window.
|
|
63
73
|
useDoubleEscapeClose({
|
|
64
74
|
targetId: focusedPaneId,
|
|
65
75
|
overlayOpen,
|
|
66
76
|
editing: inputCaptured,
|
|
67
77
|
dragging: hasActiveDrag,
|
|
68
|
-
close:
|
|
78
|
+
close: closeFocusedPaneOnEscape,
|
|
79
|
+
closeOnSingle: closeFocusedFloatingPane,
|
|
69
80
|
});
|
|
70
81
|
|
|
71
82
|
useShortcut((event) => {
|
|
@@ -109,6 +120,19 @@ export function useShellPaneManagementShortcuts({
|
|
|
109
120
|
}
|
|
110
121
|
}
|
|
111
122
|
|
|
123
|
+
// A stack's tabs step like movement keys, a press each and no cooldown,
|
|
124
|
+
// and ahead of the panes: a list that reads PageDown without its
|
|
125
|
+
// modifiers would otherwise take Ctrl+PageDown.
|
|
126
|
+
if ((shortcut === "next-tab" || shortcut === "prev-tab") && !overlayOpen && !hasActiveDrag()) {
|
|
127
|
+
if (!inputCaptured || inputCaptureAllowsPaneManagementShortcut(shortcut, event)) {
|
|
128
|
+
if (showAdjacentStackTab(shortcut === "next-tab" ? 1 : -1)) {
|
|
129
|
+
event.preventDefault();
|
|
130
|
+
event.stopPropagation();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
112
136
|
if ((event.name === "escape" || event.name === "esc") && hasActiveDrag()) {
|
|
113
137
|
cancelActiveDrag();
|
|
114
138
|
event.preventDefault();
|
|
@@ -136,7 +160,7 @@ export function useShellPaneManagementShortcuts({
|
|
|
136
160
|
const shortcut = resolvePaneManagementShortcut(event, keybindings);
|
|
137
161
|
if (!shortcut || hasActiveDrag() || overlayOpen) return;
|
|
138
162
|
if (inputCaptured && !inputCaptureAllowsPaneManagementShortcut(shortcut, event)) return;
|
|
139
|
-
if (shortcut === "menu") return;
|
|
163
|
+
if (shortcut === "menu" || shortcut === "next-tab" || shortcut === "prev-tab") return;
|
|
140
164
|
const shot = shots.get(shortcut);
|
|
141
165
|
if (shot.refuses(event)) {
|
|
142
166
|
event.preventDefault();
|
|
@@ -62,6 +62,46 @@ export function resolveOccludedPaneIds(
|
|
|
62
62
|
return occluded;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Docked panes whose title bar floating windows hide, half of it or more. A
|
|
67
|
+
* focused pane shows its focus there (the frame, the title), so focus moved
|
|
68
|
+
* to one of these could not be seen: Tab passes them by. The bar is judged
|
|
69
|
+
* along its middle line, where the title reads: the terminal's one row (the
|
|
70
|
+
* frame's top line, title in it), the desktop's taller bar whatever line
|
|
71
|
+
* sits over its top (a divider, a window's border). A window over the body,
|
|
72
|
+
* or over no more than the top edge of the bar, hides nothing that says
|
|
73
|
+
* focus.
|
|
74
|
+
*
|
|
75
|
+
* `headerRows` is the bar's height in the layout's units: 1 on the terminal,
|
|
76
|
+
* the chrome row on the desktop (`paneHeaderRows`).
|
|
77
|
+
*/
|
|
78
|
+
export function resolveTitleCoveredPaneIds(
|
|
79
|
+
docked: ReadonlyArray<{ paneId: string; rect: LayoutBounds }>,
|
|
80
|
+
floating: readonly LayoutBounds[],
|
|
81
|
+
{ headerRows = 1 }: { headerRows?: number } = {},
|
|
82
|
+
): Set<string> {
|
|
83
|
+
const covered = new Set<string>();
|
|
84
|
+
if (floating.length === 0) return covered;
|
|
85
|
+
for (const { paneId, rect } of docked) {
|
|
86
|
+
if (rect.width <= 0) continue;
|
|
87
|
+
const titleLine = rect.y + Math.min(headerRows, rect.height) / 2;
|
|
88
|
+
const spans = floating
|
|
89
|
+
.filter((window) => titleLine >= window.y && titleLine < window.y + window.height)
|
|
90
|
+
.map((window) => [Math.max(rect.x, window.x), Math.min(rect.x + rect.width, window.x + window.width)] as const)
|
|
91
|
+
.filter(([start, end]) => end > start)
|
|
92
|
+
.toSorted((left, right) => left[0] - right[0]);
|
|
93
|
+
let hidden = 0;
|
|
94
|
+
let reach = rect.x;
|
|
95
|
+
for (const [start, end] of spans) {
|
|
96
|
+
if (end <= reach) continue;
|
|
97
|
+
hidden += end - Math.max(start, reach);
|
|
98
|
+
reach = end;
|
|
99
|
+
}
|
|
100
|
+
if (hidden * 2 >= rect.width) covered.add(paneId);
|
|
101
|
+
}
|
|
102
|
+
return covered;
|
|
103
|
+
}
|
|
104
|
+
|
|
65
105
|
/**
|
|
66
106
|
* Where focus belongs when the focused pane is hidden under floating panes,
|
|
67
107
|
* as a docked pane is under a window that fills a narrow terminal: the
|
|
@@ -13,6 +13,8 @@ import type { ShortcutDisplayMode } from "../../../utils/shortcut-labels";
|
|
|
13
13
|
|
|
14
14
|
export type PaneManagementShortcut =
|
|
15
15
|
| "menu"
|
|
16
|
+
| "next-tab"
|
|
17
|
+
| "prev-tab"
|
|
16
18
|
| "settings"
|
|
17
19
|
| "toggle-fullscreen"
|
|
18
20
|
| "new-layout"
|
|
@@ -31,6 +33,8 @@ export type PaneManagementShortcut =
|
|
|
31
33
|
|
|
32
34
|
const PANE_ACTION_TO_SHORTCUT: Partial<Record<CoreKeybindingActionId, PaneManagementShortcut>> = {
|
|
33
35
|
"pane-menu": "menu",
|
|
36
|
+
"pane-next-tab": "next-tab",
|
|
37
|
+
"pane-prev-tab": "prev-tab",
|
|
34
38
|
"pane-settings": "settings",
|
|
35
39
|
"pane-fullscreen": "toggle-fullscreen",
|
|
36
40
|
"pane-new-layout": "new-layout",
|
|
@@ -50,7 +54,8 @@ const PANE_ACTION_TO_SHORTCUT: Partial<Record<CoreKeybindingActionId, PaneManage
|
|
|
50
54
|
|
|
51
55
|
export type PaneManagementAccelerators = Record<
|
|
52
56
|
"menu" | "settings" | "fullscreen" | "newLayout" | "toggleFloating" | "popOut" | "copyScreenshot" | "exportCsv" | "share" | "ask" | "close"
|
|
53
|
-
| "closeAllFloating" | "layoutGallery" | "gridlockAll" | "windowMode" | "windowResizeMode" | "tickerSearch"
|
|
57
|
+
| "closeAllFloating" | "layoutGallery" | "gridlockAll" | "windowMode" | "windowResizeMode" | "tickerSearch"
|
|
58
|
+
| "nextTab" | "prevTab",
|
|
54
59
|
string | undefined
|
|
55
60
|
>;
|
|
56
61
|
|
|
@@ -67,6 +72,13 @@ export function paneManagementAccelerators(
|
|
|
67
72
|
const terminalAsk = mode === "terminal" ? advertisedChord(keybindings, "pane-ask", "terminal") : null;
|
|
68
73
|
// The backtick has no modifier, so it is said as the terminal advertises it.
|
|
69
74
|
const tickerSearch = advertisedChord(keybindings, "ticker-search", mode);
|
|
75
|
+
// Stack tabs are on Control in every host; a native menu shows no
|
|
76
|
+
// accelerator it cannot take on the platform modifier.
|
|
77
|
+
const tabChord = (id: "pane-next-tab" | "pane-prev-tab") => {
|
|
78
|
+
if (mode !== "terminal") return menuAcceleratorFor(keybindings, id);
|
|
79
|
+
const chord = advertisedChord(keybindings, id, mode);
|
|
80
|
+
return chord ? serializeKeyChord(chord) : undefined;
|
|
81
|
+
};
|
|
70
82
|
return {
|
|
71
83
|
menu: menuAcceleratorFor(keybindings, "pane-menu"),
|
|
72
84
|
settings: menuAcceleratorFor(keybindings, "pane-settings"),
|
|
@@ -85,6 +97,8 @@ export function paneManagementAccelerators(
|
|
|
85
97
|
windowMode: menuAcceleratorFor(keybindings, "window-move-mode"),
|
|
86
98
|
windowResizeMode: menuAcceleratorFor(keybindings, "window-resize-mode"),
|
|
87
99
|
tickerSearch: tickerSearch ? serializeKeyChord(tickerSearch) : undefined,
|
|
100
|
+
nextTab: tabChord("pane-next-tab"),
|
|
101
|
+
prevTab: tabChord("pane-prev-tab"),
|
|
88
102
|
};
|
|
89
103
|
}
|
|
90
104
|
|
|
@@ -119,6 +133,8 @@ export function inputCaptureAllowsPaneManagementShortcut(
|
|
|
119
133
|
// A screenshot does not edit the field that captured input. Keep it available
|
|
120
134
|
// from composers (ASKG, chat, etc.) on both desktop modifier layouts.
|
|
121
135
|
if (shortcut === "copy-screenshot") return event.ctrl || event.meta || event.super === true;
|
|
136
|
+
// Stepping a stack's tabs edits no field; a chord rebound to a plain key stays the field's.
|
|
137
|
+
if (shortcut === "next-tab" || shortcut === "prev-tab") return event.ctrl || event.meta || event.super === true;
|
|
122
138
|
// Command chords are never text. Alt+A and Ctrl+Shift+A edit a terminal
|
|
123
139
|
// field (line start), so a field that has the keyboard keeps them there.
|
|
124
140
|
if (shortcut === "toggle-fullscreen" || shortcut === "new-layout" || shortcut === "ask") return event.meta || event.super === true;
|
|
@@ -19,7 +19,13 @@ import type {
|
|
|
19
19
|
VisibleFloatingPane,
|
|
20
20
|
} from "./drag/runtime";
|
|
21
21
|
import type { WindowEditState } from "../window-edit/mode";
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
paneHeaderTitleStart,
|
|
24
|
+
stackTabSpans,
|
|
25
|
+
terminalHeaderTitleWidth,
|
|
26
|
+
terminalHeaderTrailingWidth,
|
|
27
|
+
type PaneHeaderQuickSetting,
|
|
28
|
+
} from "../pane/header";
|
|
23
29
|
import { displayWidth } from "../../../utils/format";
|
|
24
30
|
|
|
25
31
|
interface UseShellTerminalPointerRuntimeOptions {
|
|
@@ -43,6 +49,8 @@ interface UseShellTerminalPointerRuntimeOptions {
|
|
|
43
49
|
/** The header's `?`: the pane's entry in DOCS. */
|
|
44
50
|
openPaneDocs: (paneId: string) => void;
|
|
45
51
|
getPaneTitle: (pane: ResolvedPane) => string;
|
|
52
|
+
/** A pane's quick settings, which take room from a stack's tabs in its header. */
|
|
53
|
+
getPaneQuickSettings: (paneId: string) => ReadonlyArray<Pick<PaneHeaderQuickSetting, "icon">>;
|
|
46
54
|
paneMap: Map<string, ResolvedPane>;
|
|
47
55
|
selectWindowModePane: (paneId: string) => void;
|
|
48
56
|
setHoveredMenuItemId: Dispatch<SetStateAction<string | null>>;
|
|
@@ -67,19 +75,29 @@ function getVisibleFloatingRect(
|
|
|
67
75
|
: visibleRect;
|
|
68
76
|
}
|
|
69
77
|
|
|
70
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* The tab of a stack whose title is `x` cells into its header's title, laid
|
|
80
|
+
* out as the header lays it out (`stackTabSpans`) in a header `width` wide
|
|
81
|
+
* that shows `shown`.
|
|
82
|
+
*/
|
|
71
83
|
function stackTabAt(
|
|
72
84
|
stack: readonly string[],
|
|
85
|
+
shown: string,
|
|
73
86
|
x: number,
|
|
87
|
+
header: { width: number; framed: boolean; corner: boolean },
|
|
74
88
|
paneMap: Map<string, ResolvedPane>,
|
|
75
89
|
getPaneTitle: (pane: ResolvedPane) => string,
|
|
90
|
+
getPaneQuickSettings: (paneId: string) => ReadonlyArray<Pick<PaneHeaderQuickSetting, "icon">>,
|
|
76
91
|
): string | null {
|
|
77
92
|
const titles = stack.map((id) => {
|
|
78
93
|
const pane = paneMap.get(id);
|
|
79
94
|
return pane ? getPaneTitle(pane) : id;
|
|
80
95
|
});
|
|
81
|
-
const
|
|
82
|
-
|
|
96
|
+
const trailing = terminalHeaderTrailingWidth(getPaneQuickSettings(shown), paneMap.get(shown)?.instance.locked === true, true);
|
|
97
|
+
const titleWidth = terminalHeaderTitleWidth(header.width, { framed: header.framed, corner: header.corner, trailing });
|
|
98
|
+
const span = stackTabSpans(titles, stack.indexOf(shown), titleWidth)
|
|
99
|
+
.find((candidate) => x >= candidate.start && x < candidate.start + displayWidth(candidate.text));
|
|
100
|
+
return span ? stack[span.index]! : null;
|
|
83
101
|
}
|
|
84
102
|
|
|
85
103
|
function sortedFloatingPanes(visibleFloatingPanes: VisibleFloatingPane[]): VisibleFloatingPane[] {
|
|
@@ -102,6 +120,7 @@ export function useShellTerminalPointerRuntime({
|
|
|
102
120
|
openPaneMenu,
|
|
103
121
|
openPaneDocs,
|
|
104
122
|
getPaneTitle,
|
|
123
|
+
getPaneQuickSettings,
|
|
105
124
|
paneMap,
|
|
106
125
|
selectWindowModePane,
|
|
107
126
|
setHoveredMenuItemId,
|
|
@@ -269,7 +288,13 @@ export function useShellTerminalPointerRuntime({
|
|
|
269
288
|
// A press on a tab of a floating stack pulls that tab out; the rest
|
|
270
289
|
// of the bar moves the stack. A floating title bar is always framed.
|
|
271
290
|
const stack = floatingStacks(visibleFloatingPanes.map((entry) => entry.pane.floating!), floatingOrder).get(paneId);
|
|
272
|
-
const tabId = stack
|
|
291
|
+
const tabId = stack
|
|
292
|
+
? stackTabAt(stack, paneId, relativeX - paneHeaderTitleStart(true), {
|
|
293
|
+
width: rect.width,
|
|
294
|
+
framed: true,
|
|
295
|
+
corner: true,
|
|
296
|
+
}, paneMap, getPaneTitle, getPaneQuickSettings)
|
|
297
|
+
: null;
|
|
273
298
|
startDrag({
|
|
274
299
|
type: "pane-drag",
|
|
275
300
|
paneId: tabId ?? paneId,
|
|
@@ -360,7 +385,14 @@ export function useShellTerminalPointerRuntime({
|
|
|
360
385
|
if (relativeY === 0) {
|
|
361
386
|
// A press on one of a stack's tabs moves that pane; the release
|
|
362
387
|
// shows it if the pointer did not move.
|
|
363
|
-
const
|
|
388
|
+
const framed = isFocused || transientFocusActive;
|
|
389
|
+
const tabId = leaf.stack
|
|
390
|
+
? stackTabAt(leaf.stack, leaf.instanceId, relativeX - paneHeaderTitleStart(framed), {
|
|
391
|
+
width: leaf.rect.width,
|
|
392
|
+
framed,
|
|
393
|
+
corner: transientFocusActive,
|
|
394
|
+
}, paneMap, getPaneTitle, getPaneQuickSettings)
|
|
395
|
+
: null;
|
|
364
396
|
startDrag({
|
|
365
397
|
type: "pane-drag",
|
|
366
398
|
paneId: tabId ?? leaf.instanceId,
|
|
@@ -389,6 +421,7 @@ export function useShellTerminalPointerRuntime({
|
|
|
389
421
|
focusPane,
|
|
390
422
|
floatingOrder,
|
|
391
423
|
focusedPaneId,
|
|
424
|
+
getPaneQuickSettings,
|
|
392
425
|
getPaneTitle,
|
|
393
426
|
handleActiveDrag,
|
|
394
427
|
handleFloatingClose,
|
|
@@ -126,26 +126,15 @@ export function useShellWindowMode({
|
|
|
126
126
|
setWindowMode(null);
|
|
127
127
|
}, []);
|
|
128
128
|
|
|
129
|
+
// Enter applies what the mode changed and leaves it, as Enter does in a
|
|
130
|
+
// dialog; Esc leaves it with nothing changed.
|
|
129
131
|
const commitWindowMode = useCallback(() => {
|
|
130
132
|
if (!windowMode) return;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
if (!hasPendingCommit) {
|
|
134
|
-
focusPane(windowMode.paneId);
|
|
135
|
-
setWindowMode(null);
|
|
136
|
-
return;
|
|
133
|
+
if (windowEditHasPendingCommit(windowMode, bounds, dockGeometryOptions)) {
|
|
134
|
+
persistLayout(resolveWindowEditCommitLayout(windowMode, bounds, dockGeometryOptions));
|
|
137
135
|
}
|
|
138
|
-
|
|
139
|
-
persistLayout(committedLayout);
|
|
140
136
|
focusPane(windowMode.paneId);
|
|
141
|
-
setWindowMode(
|
|
142
|
-
paneId: windowMode.paneId,
|
|
143
|
-
previewLayout: committedLayout,
|
|
144
|
-
mode: "move",
|
|
145
|
-
focus: normalizeWindowEditFocus({ kind: "move" }, committedLayout, windowMode.paneId, "move", bounds, dockGeometryOptions),
|
|
146
|
-
dirty: false,
|
|
147
|
-
notice: "Committed",
|
|
148
|
-
});
|
|
137
|
+
setWindowMode(null);
|
|
149
138
|
}, [bounds, dockGeometryOptions, focusPane, persistLayout, windowMode]);
|
|
150
139
|
|
|
151
140
|
const updateWindowModePreviewLayout = useCallback((nextLayout: LayoutConfig, paneId?: string) => {
|
|
@@ -129,7 +129,9 @@ export function ShellWindowModeOverlays({
|
|
|
129
129
|
/>
|
|
130
130
|
))}
|
|
131
131
|
|
|
132
|
-
{
|
|
132
|
+
{/* Outside window mode a floating pane draws its own sides, in the focus colour when focused (floating-pane.tsx). */}
|
|
133
|
+
{highlightedPaneId && !nativePaneChrome && highlightedRect && highlightedRect.height >= 2 && (!overlayOpen || menuOpen)
|
|
134
|
+
&& (windowMode || !highlightedFloatingPane) && (() => {
|
|
133
135
|
const selectedInWindowMode = !!windowMode;
|
|
134
136
|
const borderColor = selectedInWindowMode ? colors.borderFocused : colors.border;
|
|
135
137
|
const bodyTop = highlightedRect.y + 1;
|
|
@@ -7,6 +7,7 @@ import { tokenizeTickerText } from "../tickers/tokenizer";
|
|
|
7
7
|
import type { InlineTickerCatalogEntry } from "../state/hooks/inline-tickers";
|
|
8
8
|
import { colors } from "../theme/colors";
|
|
9
9
|
import { displayWidth } from "../utils/format";
|
|
10
|
+
import { wrapSegmentLines } from "../utils/text-wrap";
|
|
10
11
|
import { useUiCapabilities } from "../ui";
|
|
11
12
|
import { MARKDOWN_HEADING_RE, markdownListItem, parseInlineMarkdown, type MarkdownSegment } from "../utils/markdown";
|
|
12
13
|
|
|
@@ -100,6 +101,11 @@ type MarkdownBlock =
|
|
|
100
101
|
/** One rendered line of a table, already padded to its column widths. */
|
|
101
102
|
type TableLine = StyledSegment[];
|
|
102
103
|
|
|
104
|
+
/** The half blocks a citation chip's square is drawn between in the terminal (`PaneLinkMarker`). */
|
|
105
|
+
const CHIP_OPEN = "\u2590";
|
|
106
|
+
const CHIP_CLOSE = "\u258c";
|
|
107
|
+
const CHIP_ENDS = /[\u2590\u258c]/g;
|
|
108
|
+
|
|
103
109
|
const TABLE_DELIMITER_RE = /^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?\s*$/;
|
|
104
110
|
const TABLE_GAP = 2;
|
|
105
111
|
/** A long word (a URL, a hyphenated compound) breaks rather than claiming a whole column. */
|
|
@@ -537,6 +543,36 @@ function MarkdownLine({
|
|
|
537
543
|
const tickerTokens = tokenizeTickerText(fullText);
|
|
538
544
|
const hasTickers = tickerTokens.some((t) => t.kind === "ticker" && catalog[t.symbol]?.status !== "missing");
|
|
539
545
|
|
|
546
|
+
if (!hasTickers && !nativePaneChrome && lineWidth != null) {
|
|
547
|
+
// The terminal's own word wrap breaks after punctuation (`(0.` / `20.0)`), so
|
|
548
|
+
// the line is laid out here at its spaces, as the reader kit lays out prose;
|
|
549
|
+
// a list item's later lines hang under its text, as on the desktop.
|
|
550
|
+
const marker = parsed.segments[0];
|
|
551
|
+
const hang = parsed.heading || !marker || !/^([-*\u2022]|\d+\.) $/.test(marker.text) ? 0 : indent + displayWidth(marker.text);
|
|
552
|
+
// A chip is measured as drawn (`[ 3 ]` is `▐3▌`), so a line holding one never runs over.
|
|
553
|
+
const chips = linkChips && onOpenLink;
|
|
554
|
+
const asDrawn = (segments: readonly StyledSegment[]) => chips
|
|
555
|
+
? segments.map((segment) => segment.link ? { ...segment, text: `${CHIP_OPEN}${segment.text.trim()}${CHIP_CLOSE}` } : segment)
|
|
556
|
+
: segments;
|
|
557
|
+
const lines = (hang > 0
|
|
558
|
+
? wrapSegmentLines(asDrawn(parsed.segments.slice(1)), Math.max(1, lineWidth - hang))
|
|
559
|
+
: wrapSegmentLines([{ text: indentStr }, ...asDrawn(parsed.segments)], lineWidth)
|
|
560
|
+
).map((line) => chips ? line.map((segment) => segment.link ? { ...segment, text: segment.text.replace(CHIP_ENDS, "") } : segment) : line);
|
|
561
|
+
return (
|
|
562
|
+
<Box flexDirection="column" width={lineWidth}>
|
|
563
|
+
{lines.map((line, lineIndex) => (
|
|
564
|
+
<Text key={lineIndex} fg={textColor}>
|
|
565
|
+
{hang > 0 ? (lineIndex === 0 ? indentStr : " ".repeat(hang)) : ""}
|
|
566
|
+
{hang > 0 && lineIndex === 0 ? <SegmentSpan segment={marker!} onOpenLink={onOpenLink} linkChips={linkChips} /> : null}
|
|
567
|
+
{line.map((segment, index) => (
|
|
568
|
+
<SegmentSpan key={index} segment={segment} onOpenLink={onOpenLink} linkChips={linkChips} />
|
|
569
|
+
))}
|
|
570
|
+
</Text>
|
|
571
|
+
))}
|
|
572
|
+
</Box>
|
|
573
|
+
);
|
|
574
|
+
}
|
|
575
|
+
|
|
540
576
|
if (!hasTickers) {
|
|
541
577
|
// Simple case: no tickers, render as styled text
|
|
542
578
|
return (
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MISSING_VALUE } from "../../utils/format";
|
|
1
2
|
import { useMemo, useState, type ReactNode } from "react";
|
|
2
3
|
import { useThemeColors } from "../../theme/theme-context";
|
|
3
4
|
import type { PricePoint } from "../../types/financials";
|
|
@@ -88,13 +89,19 @@ export interface MarketBoardStackProps<T extends MarketBoardRow> {
|
|
|
88
89
|
|
|
89
90
|
/**
|
|
90
91
|
* What a board gives up, in order, when the pane is too narrow for it: the
|
|
91
|
-
* second label, the sparkline, the as-of year, then the change date
|
|
92
|
-
* percentile
|
|
93
|
-
* before the data columns.
|
|
92
|
+
* second label, the sparkline, the as-of year, then the change date, the
|
|
93
|
+
* percentile, the pane's own extra columns and the change. Shortening dates
|
|
94
|
+
* costs less than losing a column, so it comes before the data columns. The
|
|
95
|
+
* value and its date are never given up: a narrow board read as names alone
|
|
96
|
+
* (SOVR without its 5Y) or without the date of its figures (CBR without AS OF).
|
|
94
97
|
*/
|
|
95
|
-
const FIT_STEPS = ["labelDetail", "history", "shortAsOf", "changeAsOf", "percentile"] as const;
|
|
98
|
+
const FIT_STEPS = ["labelDetail", "history", "shortAsOf", "changeAsOf", "percentile", "extra", "change"] as const;
|
|
96
99
|
/** The narrowest the name column gives way to in a board too narrow for every column. */
|
|
97
100
|
const MIN_GROW_WIDTH = 10;
|
|
101
|
+
/** Narrower still, once only the name, the value and its date are left, so those two stay whole. */
|
|
102
|
+
const MIN_LABEL_WIDTH = 6;
|
|
103
|
+
/** The columns a board always has; any other is a pane's extra one. */
|
|
104
|
+
const BOARD_COLUMN_IDS = new Set(["label", "labelDetail", "value", "change", "changeAsOf", "percentile", "history", "asOf"]);
|
|
98
105
|
/** An as-of date without its year ("09-17"). */
|
|
99
106
|
const SHORT_AS_OF_WIDTH = 5;
|
|
100
107
|
/** The word a stale or partial row's date carries, with its space: "2026-09-17 stale", "2026-10-19 so far". */
|
|
@@ -116,6 +123,8 @@ function fitBoardColumns(candidates: DataTableColumn[], width: number, wordWidth
|
|
|
116
123
|
if (step === "shortAsOf") {
|
|
117
124
|
shortAsOf = true;
|
|
118
125
|
columns = withAsOfWidth(columns, SHORT_AS_OF_WIDTH + wordWidth);
|
|
126
|
+
} else if (step === "extra") {
|
|
127
|
+
columns = columns.filter((column) => BOARD_COLUMN_IDS.has(column.id));
|
|
119
128
|
} else {
|
|
120
129
|
columns = columns.filter((column) => column.id !== step);
|
|
121
130
|
}
|
|
@@ -130,9 +139,10 @@ function fitBoardColumns(candidates: DataTableColumn[], width: number, wordWidth
|
|
|
130
139
|
// that gives way when the board is still too wide, so the date and its word are never cut.
|
|
131
140
|
const growId = columns.some((column) => column.id === "labelDetail") ? "labelDetail" : "label";
|
|
132
141
|
const excess = Math.max(0, getTableWidth(columns) - width);
|
|
142
|
+
const floor = columns.length <= 3 ? MIN_LABEL_WIDTH : MIN_GROW_WIDTH;
|
|
133
143
|
return {
|
|
134
144
|
columns: columns.map((column) => column.id === growId
|
|
135
|
-
? { ...column, width: Math.max(
|
|
145
|
+
? { ...column, width: Math.max(Math.min(floor, column.width), column.width - excess), flexGrow: 1 } : column),
|
|
136
146
|
shortAsOf,
|
|
137
147
|
};
|
|
138
148
|
}
|
|
@@ -177,10 +187,10 @@ export function MarketBoardStack<T extends MarketBoardRow>({ rows, width, height
|
|
|
177
187
|
if (column.id === "value") return { text: row.valueText, color: muted };
|
|
178
188
|
if (column.id === "change") return { text: row.changeText,
|
|
179
189
|
color: signedChange ? signedMoveColor(row.change, row.adverseMove, colors) : colors.textMuted };
|
|
180
|
-
if (column.id === "changeAsOf") return { text: row.changeAsOf ??
|
|
181
|
-
if (column.id === "percentile") return { text: row.percentileText ?? row.percentile?.toFixed(0) ??
|
|
190
|
+
if (column.id === "changeAsOf") return { text: row.changeAsOf ?? MISSING_VALUE, color: colors.textDim };
|
|
191
|
+
if (column.id === "percentile") return { text: row.percentileText ?? row.percentile?.toFixed(0) ?? MISSING_VALUE, color: row.percentile != null && (row.percentile <= 10 || row.percentile >= 90) ? colors.warning : colors.textMuted };
|
|
182
192
|
if (column.id === "history") return { text: "", content: <PriceSparkline priceHistory={row.history} width={column.width} period="1Y" trend="neutral" /> };
|
|
183
|
-
const asOf = row.asOfText ?? row.asOf ??
|
|
193
|
+
const asOf = row.asOfText ?? row.asOf ?? MISSING_VALUE;
|
|
184
194
|
const asOfText = shortAsOf ? shortIsoDate(asOf) : asOf;
|
|
185
195
|
// A narrow board drops the year; the export keeps the full date. The word
|
|
186
196
|
// stays with the color, so a stale row is not color alone.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useCallback, useMemo, useRef, useState, type CSSProperties } from "react";
|
|
2
2
|
import { Box, Text, TextAttributes, useUiCapabilities } from "../../ui";
|
|
3
3
|
import { blendHex, colors, priceColor } from "../../theme/colors";
|
|
4
|
+
import { useSelectionFill } from "../ui/selection-fill";
|
|
4
5
|
import { blendForContrast, higherContrast } from "../../theme/color-utils";
|
|
5
6
|
import { t } from "../../i18n";
|
|
6
7
|
import { padTo } from "../../utils/format";
|
|
@@ -98,7 +99,8 @@ function Tile<T>({ tile, selected, onSelect, onActivate, pointerMoved }: {
|
|
|
98
99
|
const renderWidth = Math.max(1, tile.width - (tile.width > 2 ? 1 : 0));
|
|
99
100
|
const renderHeight = Math.max(1, tile.height - (tile.height > 2 ? 1 : 0));
|
|
100
101
|
const innerWidth = Math.max(1, renderWidth - 1);
|
|
101
|
-
const
|
|
102
|
+
const selectionFill = useSelectionFill();
|
|
103
|
+
const backgroundColor = selected ? selectionFill.bg : metricTileColor(tile.item);
|
|
102
104
|
const textColor = tileTextColor(backgroundColor);
|
|
103
105
|
const attributes = selected ? TextAttributes.BOLD : TextAttributes.NONE;
|
|
104
106
|
const lines = visibleLines(tile.item);
|