gloomberb 0.20.1 → 0.20.2
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/README.md +16 -26
- package/README.zh-CN.md +21 -65
- package/package.json +1 -1
- package/src/account/auth-model.ts +20 -1
- package/src/account/upgrade-dialog.tsx +8 -4
- package/src/api-client/askg.ts +7 -1
- package/src/api-client/auth.ts +27 -0
- package/src/api-client/catalysts.ts +2 -0
- package/src/api-client/company-kpis.ts +2 -1
- package/src/api-client/cot.ts +14 -2
- package/src/api-client/data.ts +3 -2
- package/src/api-client/earnings.ts +46 -3
- package/src/api-client/futures-curve.ts +17 -0
- package/src/api-client/index.ts +4 -1
- package/src/api-client/one-tap-reasons.ts +42 -0
- package/src/api-client/perps.ts +2 -1
- package/src/api-client/request.ts +3 -1
- package/src/api-client/research-activity.ts +16 -3
- package/src/api-client/types/filings-and-calls.ts +3 -0
- package/src/api-client/types/search.ts +3 -0
- package/src/app/keybindings/chord.ts +153 -9
- package/src/app/keybindings/index.ts +1 -1
- package/src/app/keybindings/labels.ts +49 -6
- package/src/app/runtime/desktop-deeplink.ts +73 -8
- package/src/app.tsx +7 -1
- package/src/architecture/core-builtin-allowlist.json +1 -2
- package/src/architecture/pane-tabs-allowlist.json +2 -1
- package/src/architecture/shortcut-labels-allowlist.json +11 -0
- package/src/architecture/ui-literals-allowlist.json +8 -8
- package/src/brokers/broker-portfolio-sync.ts +1 -1
- package/src/cli/bank-section.ts +26 -12
- package/src/cli/commands/market.ts +266 -75
- package/src/cli/commands/ticker.ts +12 -7
- package/src/cli/desktop-pane-shot-browser.ts +47 -31
- package/src/cli/desktop-pane-shot.ts +15 -0
- package/src/cli/entry.ts +5 -0
- package/src/cli/export-source.ts +7 -1
- package/src/cli/freshness.ts +0 -16
- package/src/cli/fx-pair.ts +64 -12
- package/src/cli/fx-quote-rate.ts +144 -0
- package/src/cli/glossary.ts +5 -0
- package/src/cli/history-back-adjust.ts +122 -0
- package/src/cli/history-rows.ts +114 -10
- package/src/cli/index.ts +4 -1
- package/src/cli/known-gaps.ts +45 -3
- package/src/cli/listing-arg.ts +48 -4
- package/src/cli/name-entries.ts +25 -5
- package/src/cli/pane-functions/catalog.ts +12 -2
- package/src/cli/pane-functions/dom.ts +4 -2
- package/src/cli/pane-functions/headless.ts +8 -5
- package/src/cli/pane-functions/index.ts +3 -0
- package/src/cli/pane-functions/resolver.ts +4 -1
- package/src/cli/pane-functions/screenshot-assessment.ts +15 -3
- package/src/cli/pane-functions/screenshot-payload.ts +130 -66
- package/src/cli/pane-functions/screenshot-render.ts +14 -2
- package/src/cli/pane-functions/screenshot-types.ts +4 -0
- package/src/cli/symbol-rows.ts +22 -2
- package/src/cli/ticker-resolution.ts +74 -17
- package/src/components/chart/composite/axis-overlays.tsx +13 -3
- package/src/components/chart/composite/composite-chart.tsx +8 -1
- package/src/components/chart/composite/format.ts +16 -1
- package/src/components/chart/composite/legend.tsx +4 -3
- package/src/components/chart/composite/panel-labels.ts +2 -1
- package/src/components/chart/composite/panel-surface.tsx +33 -4
- package/src/components/chart/composite/time-scale.ts +1 -1
- package/src/components/chart/composite/toolbar.tsx +8 -4
- package/src/components/chart/composite/types.ts +17 -1
- package/src/components/chart/composite/use-composite-chart-keyboard.ts +15 -5
- package/src/components/chart/composite/use-composite-viewport.ts +31 -8
- package/src/components/chart/static/scatter-chart-surface.tsx +25 -9
- package/src/components/chart-table/axis.ts +11 -0
- package/src/components/command-bar/assist/inventory.ts +3 -2
- package/src/components/command-bar/commands/collection-list.ts +3 -2
- package/src/components/command-bar/panel/layout.ts +8 -1
- package/src/components/command-bar/panel/prompt-width.ts +34 -0
- package/src/components/command-bar/panel/state.ts +4 -0
- package/src/components/command-bar/routes/root/search-providers.ts +3 -2
- package/src/components/command-bar/routes/root/search-report.ts +2 -2
- package/src/components/command-bar/workflow/ticker-listing-picker.ts +1 -0
- package/src/components/company-logo.tsx +2 -2
- package/src/components/data-table/view.tsx +11 -2
- package/src/components/feed-data-table/stack-view.tsx +20 -6
- package/src/components/feedback-dialog.tsx +3 -1
- package/src/components/form-modal/field-row.tsx +1 -1
- package/src/components/form-modal/routes.ts +1 -0
- package/src/components/index.ts +1 -1
- package/src/components/layout/header.tsx +12 -3
- package/src/components/layout/market-summary.ts +2 -1
- package/src/components/layout/pane/footer/index.tsx +9 -5
- package/src/components/layout/pane/footer/model.ts +26 -10
- package/src/components/layout/pane/footer/registration.tsx +60 -1
- package/src/components/layout/pane/header-tabs.tsx +17 -3
- package/src/components/layout/pane/header.tsx +5 -2
- package/src/components/layout/pane/pane-tabs.tsx +57 -3
- package/src/components/layout/shell/active-drag.ts +38 -30
- package/src/components/layout/shell/drag/index.ts +51 -21
- package/src/components/layout/shell/menu.ts +3 -5
- package/src/components/layout/shell/pane/actions.ts +4 -1
- package/src/components/layout/shell/pane/ask.ts +5 -2
- package/src/components/layout/status-bar.tsx +59 -54
- package/src/components/markdown-text.tsx +35 -10
- package/src/components/onboarding/first-run-workspace.ts +25 -23
- package/src/components/onboarding/onboarding-keyboard.ts +6 -1
- package/src/components/onboarding/onboarding-wizard.tsx +12 -2
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +3 -3
- package/src/components/onboarding/use-onboarding-broker-form.ts +2 -1
- package/src/components/onboarding/use-onboarding-progress.ts +11 -4
- package/src/components/onboarding/use-onboarding-upgrade.ts +3 -2
- package/src/components/onboarding/wizard-positions.ts +8 -1
- package/src/components/pane-notice-seen.ts +125 -0
- package/src/components/pane-settings-dialog/field-dialogs.tsx +2 -1
- package/src/components/pane-settings-dialog.tsx +7 -6
- package/src/components/sign-in-code-panel.tsx +3 -2
- package/src/components/speedometer-gauge/terminal.tsx +30 -9
- package/src/components/ticker/list-table-view.tsx +39 -3
- package/src/components/ui/confirm-dialog.tsx +2 -1
- package/src/components/ui/data-table/index.tsx +4 -2
- package/src/components/ui/data-table/opentui/index.tsx +15 -5
- package/src/components/ui/data-table/types.ts +8 -0
- package/src/components/ui/external-link.tsx +4 -1
- package/src/components/ui/field-grid.tsx +1 -1
- package/src/components/ui/index.ts +2 -0
- package/src/components/ui/inline-quick-add.tsx +5 -0
- package/src/components/ui/multi-select/dialog.tsx +10 -9
- package/src/components/ui/pane-link-chip.tsx +354 -0
- package/src/components/ui/query-bar.tsx +22 -13
- package/src/components/ui/ratio-bar.tsx +24 -1
- package/src/components/ui/select-button.tsx +2 -1
- package/src/components/ui/shortcut-hint.tsx +6 -3
- package/src/components/ui/table-layout.ts +81 -0
- package/src/components/ui/tabs.tsx +45 -6
- package/src/components/use-pane-notice-footer.tsx +12 -4
- package/src/core/app-service-ports.ts +1 -1
- package/src/data/plugin-state-store.ts +44 -8
- package/src/docs/snapshot.json +53 -32
- package/src/i18n/es.ts +25 -6
- package/src/i18n/ja.ts +25 -5
- package/src/i18n/ko.ts +25 -5
- package/src/i18n/zh-cn.ts +25 -5
- package/src/i18n/zh-tw.ts +25 -5
- package/src/layout/pane-manager/gridlock-inference.ts +2 -1
- package/src/layout/pane-manager/gridlock.ts +47 -2
- package/src/layout-marketplace/api.ts +1 -0
- package/src/layout-marketplace/gallery.tsx +4 -3
- package/src/layout-marketplace/linked.ts +6 -4
- package/src/layout-marketplace/model.ts +3 -2
- package/src/market-data/futures-contract.ts +77 -31
- package/src/market-data/fx-closes.ts +5 -2
- package/src/market-data/hooks.tsx +23 -0
- package/src/market-data/market/change-basis.ts +72 -14
- package/src/market-data/market/format.ts +19 -11
- package/src/market-data/market/globex-day.ts +73 -0
- package/src/market-data/market/index-level.ts +10 -1
- package/src/market-data/quotes/intraday-bar.ts +1 -1
- package/src/market-data/quotes/session-split.ts +28 -0
- package/src/plugins/builtin/account-management/pane.tsx +1 -1
- package/src/plugins/builtin/analytics/account-returns.ts +1 -1
- package/src/plugins/builtin/analytics/index.tsx +10 -3
- package/src/plugins/builtin/analytics/pane-model.ts +1 -1
- package/src/plugins/builtin/analytics/risk-client.ts +4 -1
- package/src/plugins/builtin/analytics/risk-episodes.ts +422 -0
- package/src/plugins/builtin/analytics/risk-fx.ts +1 -1
- package/src/plugins/builtin/analytics/risk-headless.ts +28 -10
- package/src/plugins/builtin/analytics/risk-math.ts +1 -1
- package/src/plugins/builtin/analytics/risk-model.ts +115 -26
- package/src/plugins/builtin/analytics/risk-pane.tsx +201 -23
- package/src/plugins/builtin/analytics/sharpe-cadence.ts +1 -1
- package/src/plugins/builtin/backtest/format.ts +14 -0
- package/src/plugins/builtin/backtest/pane.tsx +3 -3
- package/src/plugins/builtin/backtest/report.ts +5 -3
- package/src/plugins/builtin/broker-manager/add-request.ts +10 -1
- package/src/plugins/builtin/broker-trading/pane.tsx +20 -2
- package/src/plugins/builtin/buildout/company/flow.tsx +5 -5
- package/src/plugins/builtin/buildout/company/model.ts +14 -2
- package/src/plugins/builtin/catalysts/detail.tsx +2 -2
- package/src/plugins/builtin/catalysts/model.ts +7 -2
- package/src/plugins/builtin/catalysts/pane.tsx +2 -2
- package/src/plugins/builtin/chat/message/pane-chip.tsx +36 -208
- package/src/plugins/builtin/cloud/askg/answer-follow-ups.tsx +61 -0
- package/src/plugins/builtin/cloud/askg/answer-sources.tsx +102 -0
- package/src/plugins/builtin/cloud/askg/controller.ts +7 -1
- package/src/plugins/builtin/cloud/askg/host.ts +57 -0
- package/src/plugins/builtin/cloud/askg/model.ts +45 -5
- package/src/plugins/builtin/cloud/askg/pane.tsx +304 -25
- package/src/plugins/builtin/cloud/askg/protocol.ts +26 -1
- package/src/plugins/builtin/cloud/askg/sources.ts +466 -0
- package/src/plugins/builtin/cloud/one-tap/controller.ts +309 -0
- package/src/plugins/builtin/cloud/one-tap/google-identity.ts +142 -0
- package/src/plugins/builtin/cloud/one-tap/one-tap-prompt.tsx +101 -0
- package/src/plugins/builtin/cloud/plugin.tsx +7 -1
- package/src/plugins/builtin/company-kpis/client.ts +4 -3
- package/src/plugins/builtin/company-kpis/model.ts +34 -3
- package/src/plugins/builtin/correlation/index.tsx +39 -167
- package/src/plugins/builtin/correlation/matrix/grid.tsx +285 -0
- package/src/plugins/builtin/correlation/relationship/pane.tsx +6 -7
- package/src/plugins/builtin/correlation/relationship/view-model.ts +14 -5
- package/src/plugins/builtin/cot/client.ts +8 -3
- package/src/plugins/builtin/cot/headless.ts +65 -12
- package/src/plugins/builtin/cot/pane.tsx +11 -5
- package/src/plugins/builtin/earnings/client.ts +40 -6
- package/src/plugins/builtin/earnings/fiscal-quarter.ts +54 -0
- package/src/plugins/builtin/earnings/headless.ts +47 -11
- package/src/plugins/builtin/earnings/history-model.ts +136 -24
- package/src/plugins/builtin/earnings/history-table.ts +42 -10
- package/src/plugins/builtin/earnings/history.tsx +23 -8
- package/src/plugins/builtin/earnings-ripple/client.ts +5 -2
- package/src/plugins/builtin/earnings-ripple/headless.ts +8 -3
- package/src/plugins/builtin/earnings-ripple/model.ts +21 -0
- package/src/plugins/builtin/earnings-ripple/pane.tsx +2 -3
- package/src/plugins/builtin/econ/index.tsx +5 -4
- package/src/plugins/builtin/econ-statistics/stats.ts +13 -5
- package/src/plugins/builtin/equity-screener/headless.ts +2 -1
- package/src/plugins/builtin/filing-events/feed.ts +56 -18
- package/src/plugins/builtin/filing-events/pane.tsx +8 -2
- package/src/plugins/builtin/futures/index.tsx +32 -10
- package/src/plugins/builtin/futures/model.ts +93 -6
- package/src/plugins/builtin/futures/returns.ts +29 -7
- package/src/plugins/builtin/futures/table.tsx +59 -17
- package/src/plugins/builtin/futures/use-front-returns.ts +32 -6
- package/src/plugins/builtin/futures-curve/client.ts +12 -2
- package/src/plugins/builtin/futures-curve/headless.ts +58 -17
- package/src/plugins/builtin/futures-curve/model.ts +111 -15
- package/src/plugins/builtin/futures-curve/pane.tsx +11 -6
- package/src/plugins/builtin/fx-matrix/amount.ts +132 -0
- package/src/plugins/builtin/fx-matrix/headless.ts +53 -13
- package/src/plugins/builtin/fx-matrix/index.tsx +205 -42
- package/src/plugins/builtin/fx-matrix/pairs.ts +10 -8
- package/src/plugins/builtin/fx-matrix/settings.ts +22 -1
- package/src/plugins/builtin/help/index.tsx +68 -61
- package/src/plugins/builtin/holders/format.ts +7 -2
- package/src/plugins/builtin/holders/pane.tsx +11 -3
- package/src/plugins/builtin/holders/report-header.ts +5 -4
- package/src/plugins/builtin/holders/report-rows.ts +4 -1
- package/src/plugins/builtin/holders/treemap.tsx +5 -3
- package/src/plugins/builtin/insider/signals-model.ts +4 -5
- package/src/plugins/builtin/ipo-calendar/headless.ts +18 -7
- package/src/plugins/builtin/ipo-calendar/listing-ipo.ts +3 -1
- package/src/plugins/builtin/ipo-calendar/model.ts +28 -8
- package/src/plugins/builtin/ipo-calendar/pane.tsx +2 -1
- package/src/plugins/builtin/kelly-sizer/headless.ts +4 -0
- package/src/plugins/builtin/perps/headless.ts +73 -17
- package/src/plugins/builtin/perps/index.tsx +3 -1
- package/src/plugins/builtin/perps/model.ts +1 -1
- package/src/plugins/builtin/perps/pane.tsx +2 -0
- package/src/plugins/builtin/portfolio-list/cell-version.ts +1 -0
- package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +20 -1
- package/src/plugins/builtin/portfolio-list/cli/import-positions.ts +260 -0
- package/src/plugins/builtin/portfolio-list/cli/period-report.ts +154 -0
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +64 -22
- package/src/plugins/builtin/portfolio-list/cli/render.ts +18 -7
- package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +5 -3
- package/src/plugins/builtin/portfolio-list/grid.tsx +56 -12
- package/src/plugins/builtin/portfolio-list/headless.ts +128 -0
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +42 -4
- package/src/plugins/builtin/portfolio-list/pane/period-pnl.ts +124 -0
- package/src/plugins/builtin/portfolio-list/period-pnl.ts +179 -0
- package/src/plugins/builtin/portfolio-list/positions-import/dialog.tsx +445 -0
- package/src/plugins/builtin/portfolio-list/positions-import/index.tsx +255 -0
- package/src/plugins/builtin/portfolio-list/positions-import/lookup.ts +78 -0
- package/src/plugins/builtin/portfolio-list/positions-import/read-file.ts +32 -0
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +186 -50
- package/src/plugins/builtin/portfolio-list/quick-add/resolution.ts +118 -4
- package/src/plugins/builtin/portfolio-list/settings.ts +25 -0
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +16 -1
- package/src/plugins/builtin/portfolio-list/summary/totals.ts +7 -5
- package/src/plugins/builtin/portfolio-list/table.tsx +105 -6
- package/src/plugins/builtin/power/headless.ts +47 -9
- package/src/plugins/builtin/research/relative-valuation-model.ts +8 -3
- package/src/plugins/builtin/research-search/article.ts +12 -2
- package/src/plugins/builtin/research-search/data.ts +5 -2
- package/src/plugins/builtin/research-search/document-view.tsx +1 -1
- package/src/plugins/builtin/research-search/model.ts +47 -3
- package/src/plugins/builtin/research-search/pane.tsx +3 -2
- package/src/plugins/builtin/reverse-dcf/model.ts +7 -4
- package/src/plugins/builtin/risk-factors/headless.ts +3 -2
- package/src/plugins/builtin/risk-factors/pane.tsx +5 -3
- package/src/plugins/builtin/scanner/flow-model.ts +17 -13
- package/src/plugins/builtin/scanner/flow-pane.tsx +8 -9
- package/src/plugins/builtin/scanner/flow-session.ts +2 -9
- package/src/plugins/builtin/sec/filing-display.tsx +0 -5
- package/src/plugins/builtin/sec/forms.ts +19 -0
- package/src/plugins/builtin/sec/headless.ts +7 -11
- package/src/plugins/builtin/sec/index.tsx +11 -3
- package/src/plugins/builtin/shared/earnings-calendar.ts +6 -3
- package/src/plugins/builtin/shared/earnings-report.ts +1 -1
- package/src/plugins/builtin/shared/fx-rate-freshness.ts +0 -35
- package/src/plugins/builtin/shared/use-quote-board.ts +42 -27
- package/src/plugins/builtin/supply-chain/graph-model.ts +7 -1
- package/src/plugins/builtin/supply-chain/headless.ts +20 -10
- package/src/plugins/builtin/supply-chain/model.ts +117 -20
- package/src/plugins/builtin/supply-chain/pane.tsx +22 -15
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +1 -1
- package/src/plugins/builtin/ticker-detail/data-panes/returns-chart-model.ts +69 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-chart.tsx +118 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-model.ts +1 -1
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +103 -40
- package/src/plugins/builtin/ticker-detail/headless-schema.ts +10 -1
- package/src/plugins/builtin/ticker-detail/headless.ts +8 -1
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +2 -1
- package/src/plugins/builtin/ticker-detail/overview/model.ts +4 -2
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +11 -8
- package/src/plugins/builtin/ticker-detail/pane.tsx +95 -20
- package/src/plugins/builtin/ticker-detail/research-groups.ts +89 -0
- package/src/plugins/builtin/ticker-detail/settings.ts +4 -3
- package/src/plugins/builtin/volatility/charts.tsx +2 -2
- package/src/plugins/host-resolver.ts +3 -2
- package/src/portfolio/column-values.ts +42 -8
- package/src/portfolio/futures-positions.ts +10 -2
- package/src/portfolio/mutations.ts +4 -3
- package/src/portfolio/period-pnl.ts +119 -0
- package/src/portfolio/positions-import/describe.ts +89 -0
- package/src/portfolio/positions-import/parse.ts +682 -0
- package/src/portfolio/positions-import/plan.ts +295 -0
- package/src/{plugins/builtin/analytics/metrics.ts → portfolio/return-metrics.ts} +24 -11
- package/src/public/__snapshots__/public-api.test.ts.snap +1 -0
- package/src/react/jsx-dev-fallback.ts +62 -0
- package/src/renderers/browser/cloud-transport.ts +1 -1
- package/src/renderers/browser/config-host.ts +3 -1
- package/src/renderers/browser/deeplink-bridge.ts +8 -1
- package/src/renderers/browser/http-proxy-transport.ts +9 -2
- package/src/renderers/browser/main.tsx +2 -1
- package/src/renderers/browser/research-entry.ts +12 -0
- package/src/renderers/cloudflare/http-proxy.ts +8 -2
- package/src/renderers/cloudflare/proxy-session.ts +1 -0
- package/src/renderers/cloudflare/worker.ts +12 -3
- package/src/renderers/dom/desktop/audio-player.tsx +2 -2
- package/src/renderers/dom/desktop/controls.tsx +1 -1
- package/src/renderers/dom/desktop/dialog-actions.tsx +10 -24
- package/src/renderers/dom/desktop/icons.tsx +4 -2
- package/src/renderers/dom/desktop/query-bar.tsx +23 -19
- package/src/renderers/dom/dom-host-providers.tsx +7 -2
- package/src/renderers/dom/host/box.tsx +2 -2
- package/src/renderers/dom/host/input.tsx +13 -0
- package/src/renderers/dom/key-event.ts +1 -0
- package/src/renderers/dom/styles.css +3 -0
- package/src/renderers/electrobun/bun/context-menu/click.ts +1 -0
- package/src/renderers/electrobun/bun/desktop/backend.ts +1 -0
- package/src/renderers/electrobun/bun/desktop/capability-bridge.ts +5 -4
- package/src/renderers/electrobun/bun/desktop/host-requests.ts +5 -4
- package/src/renderers/electrobun/bun/desktop/http-fetch.ts +1 -0
- package/src/renderers/electrobun/bun/desktop/http-stream.ts +1 -1
- package/src/renderers/electrobun/bun/desktop/initialization.ts +3 -1
- package/src/renderers/electrobun/bun/desktop/install-records.ts +4 -1
- package/src/renderers/electrobun/bun/desktop/installer-folder.ts +5 -2
- package/src/renderers/electrobun/bun/desktop/macos-objc.ts +3 -1
- package/src/renderers/electrobun/bun/desktop/screen-setup-file.ts +9 -4
- package/src/renderers/electrobun/bun/desktop/update.ts +27 -13
- package/src/renderers/electrobun/bun/desktop/windows-script.ts +6 -2
- package/src/renderers/electrobun/bun/window/attention.ts +1 -0
- package/src/renderers/electrobun/bun/window/boot-frame.ts +1 -0
- package/src/renderers/electrobun/bun/window/create.ts +1 -0
- package/src/renderers/electrobun/bun/window/electrobun-window-host.ts +13 -8
- package/src/renderers/electrobun/bun/window/native-min-size.ts +1 -1
- package/src/renderers/electrobun/bun/window/remembered-frame.ts +1 -0
- package/src/renderers/electrobun/bun/window/windows-native.ts +3 -1
- package/src/renderers/electrobun/bun/window/windows-quit.ts +3 -1
- package/src/renderers/electrobun/view/app-badge-host.ts +2 -1
- package/src/renderers/electrobun/view/capability-subscription.ts +2 -1
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +7 -10
- package/src/renderers/electrobun/view/cli-pane-shot-mutations.ts +36 -0
- package/src/renderers/electrobun/view/http-fetch.ts +2 -1
- package/src/renderers/electrobun/view/main.tsx +9 -4
- package/src/renderers/electrobun/view/remote/capability-invoker.ts +6 -3
- package/src/renderers/electrobun/view/remote/persistence.ts +63 -27
- package/src/renderers/electrobun/view/rpc-timeout.ts +1 -0
- package/src/renderers/electrobun/view/ui-host.tsx +3 -2
- package/src/renderers/electrobun/view/window-fullscreen.ts +3 -1
- package/src/renderers/opentui/browser-open.ts +2 -1
- package/src/renderers/opentui/dialog-host.tsx +1 -1
- package/src/renderers/opentui/interaction-performance.ts +3 -1
- package/src/renderers/opentui/start.tsx +2 -1
- package/src/renderers/opentui/terminal-media.ts +11 -6
- package/src/renderers/opentui/ui-host.tsx +5 -8
- package/src/shares/open.ts +22 -1
- package/src/shares/pane.ts +2 -1
- package/src/sources/gloomberb-cloud/normalizers.ts +3 -0
- package/src/sync/analytics-payload.ts +194 -0
- package/src/sync/baseline.ts +19 -9
- package/src/sync/broker-identity.ts +171 -0
- package/src/sync/broker-instances.ts +137 -0
- package/src/sync/collections-contributor.ts +173 -0
- package/src/sync/config-contributor.ts +100 -0
- package/src/sync/config-merge.ts +229 -0
- package/src/sync/controller.ts +139 -28
- package/src/sync/core-contributors.ts +8 -1583
- package/src/sync/history-memo.ts +32 -0
- package/src/sync/layout-merge.ts +259 -0
- package/src/sync/sanitize.ts +114 -0
- package/src/sync/ticker-merge.ts +208 -0
- package/src/sync/ticker-payload.ts +81 -0
- package/src/sync/types.ts +15 -1
- package/src/telemetry/attention-setting.ts +1 -1
- package/src/telemetry/usage-counts.ts +16 -0
- package/src/test-support/preload.ts +5 -0
- package/src/theme/color-utils.ts +10 -0
- package/src/theme/font-scale.ts +34 -3
- package/src/theme/series-colors.ts +44 -0
- package/src/theme/themes.ts +2 -1
- package/src/tickers/batched-lookups.ts +263 -6
- package/src/tickers/company-name-listing.ts +44 -2
- package/src/tickers/company-name.ts +7 -2
- package/src/tickers/search/upsert.ts +16 -1
- package/src/time-series/base-series.ts +18 -4
- package/src/time-series/studies/indicators.ts +3 -1
- package/src/time-series/studies/resolve.ts +1 -1
- package/src/time-series/types.ts +6 -0
- package/src/types/financials.ts +18 -0
- package/src/types/headless.ts +11 -0
- package/src/ui/host.tsx +26 -3
- package/src/ui/index.tsx +1 -0
- package/src/utils/concurrency.ts +6 -0
- package/src/utils/currency-pair.ts +56 -4
- package/src/utils/datetime-format.ts +11 -0
- package/src/utils/decimal-comma.ts +9 -6
- package/src/utils/exchanges.ts +32 -0
- package/src/utils/fundamentals.ts +41 -0
- package/src/utils/markdown.ts +4 -2
- package/src/utils/pasted-lines.ts +14 -0
- package/src/utils/price-window.ts +2 -1
- package/src/utils/sec-filings.ts +17 -0
- package/src/utils/sec.ts +4 -23
- package/src/utils/shortcut-labels.ts +6 -30
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fxRateDigits } from "../../../utils/currency-pair";
|
|
1
2
|
import { WORD_CURRENCY_CODES } from "../../../utils/currency-names";
|
|
2
3
|
|
|
3
4
|
/** The default board, in its default order. */
|
|
@@ -62,17 +63,18 @@ export const CURRENCY_SETS: readonly { id: string; label: string; currencies: re
|
|
|
62
63
|
];
|
|
63
64
|
|
|
64
65
|
/**
|
|
65
|
-
*
|
|
66
|
-
* rate
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
66
|
+
* A cross at its pair's precision (`fxRateDigits`), as `fx` and `quote` print
|
|
67
|
+
* it: a rate in yen from 1 up to three decimals, from 1000 up to two, from 50
|
|
68
|
+
* up to three, from 1 up to five, and below 1 five significant digits (KRW/JPY
|
|
69
|
+
* 0.10712, VND/GBP 0.000030400). `currency` is the one the rate is in, the
|
|
70
|
+
* cross's quote currency. Decimals are counted at `referenceRate` (the cross at
|
|
71
|
+
* a rate that holds still) when there is one, so a live rate ticking across a
|
|
72
|
+
* power of ten, such as JPY/AUD near 0.0100, keeps its decimals.
|
|
70
73
|
*/
|
|
71
|
-
export function formatRate(rate: number, referenceRate = rate): string {
|
|
74
|
+
export function formatRate(rate: number, currency: string, referenceRate = rate): string {
|
|
72
75
|
if (!Number.isFinite(rate) || rate <= 0) return "—";
|
|
73
76
|
const basis = Number.isFinite(referenceRate) && referenceRate > 0 ? referenceRate : rate;
|
|
74
|
-
|
|
75
|
-
return rate.toFixed(decimals);
|
|
77
|
+
return rate.toFixed(fxRateDigits(currency, basis));
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
export function isFxCurrency(code: unknown): code is FxCurrency {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PaneReportOptionDef, PaneSettingsContext, PaneSettingsDef } from "../../../types/plugin";
|
|
2
2
|
import { CURRENCY_SETS, FX_CURRENCIES, MAJOR_CURRENCIES, isFxCurrency, resolveCurrencies } from "./pairs";
|
|
3
|
+
import { parseFxBoardAmountEdit, storedFxBoardAmount, withAmountCurrencies } from "./amount";
|
|
3
4
|
|
|
4
5
|
const CUSTOM_SET = "custom";
|
|
5
6
|
|
|
@@ -33,7 +34,11 @@ export function fxMatrixSettings(context: PaneSettingsContext): PaneSettingsDef
|
|
|
33
34
|
));
|
|
34
35
|
return {
|
|
35
36
|
title: "FX Cross Rates Settings",
|
|
36
|
-
values: {
|
|
37
|
+
values: {
|
|
38
|
+
currencies,
|
|
39
|
+
currencySet: matching?.id ?? CUSTOM_SET,
|
|
40
|
+
...(typeof context.settings.amount === "string" ? { amount: context.settings.amount } : {}),
|
|
41
|
+
},
|
|
37
42
|
fields: [
|
|
38
43
|
{
|
|
39
44
|
key: "currencySet",
|
|
@@ -51,8 +56,24 @@ export function fxMatrixSettings(context: PaneSettingsContext): PaneSettingsDef
|
|
|
51
56
|
searchable: true,
|
|
52
57
|
options: FX_CURRENCIES.map((code) => ({ value: code, label: code, description: currencyName(code) ?? undefined })),
|
|
53
58
|
},
|
|
59
|
+
{
|
|
60
|
+
key: "amount",
|
|
61
|
+
label: "Amount",
|
|
62
|
+
type: "text",
|
|
63
|
+
placeholder: "2,500,000 EUR",
|
|
64
|
+
description: "Shown in every listed currency at the board's rates. Empty for none.",
|
|
65
|
+
},
|
|
54
66
|
],
|
|
55
67
|
applyValue: (settings, field, value) => {
|
|
68
|
+
if (field.key === "amount") {
|
|
69
|
+
// Saved ungrouped (`storedFxBoardAmount`), so it reads back as itself; shown grouped on the board.
|
|
70
|
+
const request = parseFxBoardAmountEdit(String(value ?? ""), settings.amount);
|
|
71
|
+
if (request && "error" in request) throw new Error(request.error);
|
|
72
|
+
const { amount: _cleared, ...rest } = settings;
|
|
73
|
+
return request
|
|
74
|
+
? { ...rest, amount: storedFxBoardAmount(request), currencies: withAmountCurrencies(resolveCurrencies(settings.currencies), request) }
|
|
75
|
+
: rest;
|
|
76
|
+
}
|
|
56
77
|
if (field.key !== "currencySet") return { ...settings, [field.key]: value };
|
|
57
78
|
// The set is a way to fill the list, never a setting of its own.
|
|
58
79
|
const { currencySet: _unused, ...rest } = settings;
|
|
@@ -4,8 +4,8 @@ import { Notice, usePaneFooter, usePaneMenuItems, usePaneTabs, type PaneHint, ty
|
|
|
4
4
|
import { t, tf } from "../../../i18n";
|
|
5
5
|
import { colors } from "../../../theme/colors";
|
|
6
6
|
import type { PaneProps } from "../../../types/plugin";
|
|
7
|
-
import { Box, ScrollBox, Text, useRendererHost, useUiHost } from "../../../ui";
|
|
8
|
-
import { detectShortcutPlatform,
|
|
7
|
+
import { Box, ScrollBox, Text, useRendererHost, useShortcutLabel, useUiHost } from "../../../ui";
|
|
8
|
+
import { detectShortcutPlatform, getShortcutDisplayMode } from "../../../utils/shortcut-labels";
|
|
9
9
|
import { getSharedRegistry } from "../../registry";
|
|
10
10
|
import { apiClient, type CloudPricing } from "../../../api-client";
|
|
11
11
|
import { trialDaysOf } from "../../../account/billing";
|
|
@@ -46,6 +46,11 @@ function entry(id: string, badges: string[], description: string): ShortcutTable
|
|
|
46
46
|
return { id, badges, description };
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
/** A key with a modifier, or the backtick: either one closes the bar it opened, where a plain letter would be typed. */
|
|
50
|
+
function closesCommandBar(label: string): boolean {
|
|
51
|
+
return label === "`" || label.includes("+") || /[⌃⌥⇧⌘]/.test(label);
|
|
52
|
+
}
|
|
53
|
+
|
|
49
54
|
/**
|
|
50
55
|
* Real functions on real tickers, one click each, for someone who has not
|
|
51
56
|
* learned a code yet. Each row runs its text as if typed into the bar.
|
|
@@ -81,7 +86,8 @@ function HelpPane({ focused, width, height }: PaneProps) {
|
|
|
81
86
|
const uiHost = useUiHost();
|
|
82
87
|
const shortcutPlatform = detectShortcutPlatform();
|
|
83
88
|
const shortcutDisplayMode = getShortcutDisplayMode(uiHost.kind);
|
|
84
|
-
|
|
89
|
+
// Every key a row names reads as this host writes keys: ⇧↩ and ⌃P/N on a Mac.
|
|
90
|
+
const keyLabel = useShortcutLabel();
|
|
85
91
|
const keybindings = useKeybindings();
|
|
86
92
|
const actionBadges = (actionId: string) => formatActionChords(keybindings, actionId, shortcutDisplayMode, shortcutPlatform);
|
|
87
93
|
const commandBarBadges = actionBadges("command-bar");
|
|
@@ -91,8 +97,8 @@ function HelpPane({ focused, width, height }: PaneProps) {
|
|
|
91
97
|
const functionHelpBadges = actionBadges("function-help");
|
|
92
98
|
const askBadges = actionBadges("pane-ask");
|
|
93
99
|
useEffect(() => subscribeKeybindingCapture(() => setActiveTabId("shortcuts")), []);
|
|
94
|
-
const copyBadges = shortcutDisplayMode === "terminal" ? ["Ctrl+Shift+C"] : [
|
|
95
|
-
const pasteBadges = shortcutDisplayMode === "terminal" ? ["Ctrl+Shift+V"] : [
|
|
100
|
+
const copyBadges = shortcutDisplayMode === "terminal" ? ["Ctrl+Shift+C"] : [keyLabel("CmdOrCtrl+C")];
|
|
101
|
+
const pasteBadges = shortcutDisplayMode === "terminal" ? ["Ctrl+Shift+V"] : [keyLabel("CmdOrCtrl+V")];
|
|
96
102
|
const [functionsSearching, setFunctionsSearching] = useState(false);
|
|
97
103
|
// The UPGRADE line says how long the trial is; the length comes from /pricing.
|
|
98
104
|
const [pricing, setPricing] = useState<CloudPricing | null>(null);
|
|
@@ -238,6 +244,7 @@ function HelpPane({ focused, width, height }: PaneProps) {
|
|
|
238
244
|
}))
|
|
239
245
|
: null, [activeTabId, aboutRows]);
|
|
240
246
|
|
|
247
|
+
const keyEntry = (id: string, badges: string[], description: string) => entry(id, badges.map(keyLabel), description);
|
|
241
248
|
const referenceSections = useMemo<Array<TableSection<ShortcutTableEntry>>>(() => [
|
|
242
249
|
{
|
|
243
250
|
label: "Command Bar",
|
|
@@ -246,30 +253,30 @@ function HelpPane({ focused, width, height }: PaneProps) {
|
|
|
246
253
|
? [entry("cmd-open", commandBarBadges, "Open command mode for actions, pane commands, and typed prefixes.")]
|
|
247
254
|
: []),
|
|
248
255
|
...(tickerSearchBadges.length > 0
|
|
249
|
-
? [entry("cmd-ticker-search", tickerSearchBadges, "Ticker search:
|
|
256
|
+
? [entry("cmd-ticker-search", tickerSearchBadges, tf("Ticker search: {enter} changes the focused pane's ticker and the panes linked to it, as a click on the ticker in a pane's title does on the desktop and the web. {key} opens a new pane. From a pane with no ticker it opens DES.", { enter: keyLabel("Enter"), key: keyLabel("Shift+Enter") }))]
|
|
250
257
|
: []),
|
|
251
258
|
entry("cmd-des", ["DES", "<ticker>"], "Open security details for a specific ticker."),
|
|
252
259
|
entry("cmd-help-card", ["HELP", "<function>"], "Open a function's help card: what it shows, its keys, how fresh its data is. HELP HELP reaches support."),
|
|
253
260
|
entry("cmd-docs", ["DOCS", "<function>"], "Read the docs and Academy lessons in the app. The ? on a pane opens its entry."),
|
|
254
261
|
entry("cmd-upgrade", ["UPGRADE"], tf("Go Pro for real-time data at gloom.sh/cloud, free for {days} days.", { days: trialDays })),
|
|
255
262
|
entry("cmd-mcp", ["MCP"], "Connect Claude Code, Codex, Cursor or any MCP client to Gloom's research tools."),
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
entry("cmd-close", ["Esc", ...tickerSearchBadges.filter(
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
263
|
+
keyEntry("cmd-move", ["Up/Down", "Ctrl+P/N"], "Move through command bar results."),
|
|
264
|
+
keyEntry("cmd-page", ["PageUp/PageDown", "Ctrl+Home/End"], "Jump a page, or to the first or last result."),
|
|
265
|
+
keyEntry("cmd-run", ["Enter", "Shift+Enter"], "Run the selected result or its secondary action."),
|
|
266
|
+
keyEntry("cmd-accept-arg", ["Tab"], "Accept a suggested command argument when one is available."),
|
|
267
|
+
entry("cmd-close", [keyLabel("Esc"), ...tickerSearchBadges.filter(closesCommandBar)], "Close the command bar."),
|
|
268
|
+
keyEntry("cmd-clear", ["Ctrl+U"], "Clear command text."),
|
|
269
|
+
keyEntry("cmd-delete-word", ["Ctrl+W"], "Delete the previous word in command text."),
|
|
270
|
+
keyEntry("cmd-back", ["Backspace"], "Go back from a nested command screen when the query is empty."),
|
|
264
271
|
],
|
|
265
272
|
},
|
|
266
273
|
{
|
|
267
274
|
label: "Navigation",
|
|
268
275
|
items: [
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
276
|
+
keyEntry("rows", ["Up/Down", "j/k"], "Move through focused table and list rows."),
|
|
277
|
+
keyEntry("activate", ["Enter"], "Open or activate the selected row."),
|
|
278
|
+
keyEntry("tabs", ["Left/Right", "h/l"], "Switch tabs when a tab bar is focused."),
|
|
279
|
+
keyEntry("back", ["Esc", "Backspace"], "Go back from a detail view."),
|
|
273
280
|
entry("pane-menu", actionBadges("pane-menu"), "Open the focused pane's menu: every action in the pane with its key, sorting, filters, tabs, toggles and the pane actions."),
|
|
274
281
|
...(functionHelpBadges.length > 0
|
|
275
282
|
? [entry("function-help", functionHelpBadges, "Open the focused pane's help card; Enter reads its docs.")]
|
|
@@ -277,9 +284,9 @@ function HelpPane({ focused, width, height }: PaneProps) {
|
|
|
277
284
|
...(askBadges.length > 0
|
|
278
285
|
? [entry("ask-gloom", askBadges, "Ask Gloom about the focused pane, in a new conversation with the pane attached. Also Ask Gloom in the pane menu.")]
|
|
279
286
|
: []),
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
287
|
+
keyEntry("search", ["/"], "Search in the focused pane."),
|
|
288
|
+
keyEntry("sidebar", ["<", ">"], "Narrow or widen the list beside the content, as in MAP and ASKG."),
|
|
289
|
+
keyEntry("warnings", ["!"], "Open the focused pane's data warnings."),
|
|
283
290
|
entry("notification", actionBadges("notification-action"), "Run the newest notification."),
|
|
284
291
|
entry("notification-dismiss", actionBadges("notification-dismiss"), "Dismiss the newest notification."),
|
|
285
292
|
],
|
|
@@ -287,52 +294,52 @@ function HelpPane({ focused, width, height }: PaneProps) {
|
|
|
287
294
|
{
|
|
288
295
|
label: "Forms",
|
|
289
296
|
items: [
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
297
|
+
keyEntry("toggle", ["Space"], "Toggle a checkbox or a multi-select choice."),
|
|
298
|
+
keyEntry("reorder", ["[", "]"], "Reorder ordered multi-select choices."),
|
|
299
|
+
keyEntry("submit", [shortcutDisplayMode === "terminal" ? "Ctrl+S" : "CmdOrCtrl+S"], "Submit a form from any field."),
|
|
293
300
|
],
|
|
294
301
|
},
|
|
295
302
|
{
|
|
296
303
|
label: "Scrolling",
|
|
297
304
|
items: [
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
305
|
+
keyEntry("page", ["PageUp/PageDown"], "Move a table or list a page at a time, or scroll the focused pane."),
|
|
306
|
+
keyEntry("ends", ["Home/End"], "Jump to the first or last row, or the start or end of the pane."),
|
|
307
|
+
keyEntry("columns", ["Shift+Left/Right"], "Scroll a wide table's columns."),
|
|
301
308
|
],
|
|
302
309
|
},
|
|
303
310
|
{
|
|
304
311
|
label: "Charts",
|
|
305
312
|
items: [
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
313
|
+
keyEntry("pan", ["Drag", "Scroll"], "Pan the chart through time."),
|
|
314
|
+
keyEntry("pan-keys", ["a/d", "Shift+Left/Right"], "Pan the focused chart through time."),
|
|
315
|
+
keyEntry("cursor", ["Left/Right", "Esc"], "Step the focused chart's cursor through its dates, or clear it."),
|
|
316
|
+
keyEntry("legend", ["[", "]", "Space"], "Pick a legend series and show or hide it."),
|
|
317
|
+
keyEntry("zoom-tool", ["Shift+Z", "Shift+Drag"], "Pick the zoom tool, then drag a time range."),
|
|
318
|
+
keyEntry("ruler", ["Shift+M", "Alt+Drag"], "Pick the ruler, then drag to measure a move."),
|
|
319
|
+
keyEntry("draw", ["Shift+D", "Shift+P"], "Draw a trend line or a freehand shape."),
|
|
320
|
+
keyEntry("shapes", ["Shift+J", "Shift+B", "Shift+F"], "Draw a horizontal ray, a rectangle or a Fib retracement."),
|
|
321
|
+
keyEntry("place", ["Enter", "Arrows"], "With a tool picked, Enter starts it at the cursor, the arrows move its end, and Enter finishes it."),
|
|
322
|
+
keyEntry("drawings", ["[", "]"], "With a drawing tool picked, pick a drawing."),
|
|
323
|
+
keyEntry("colour", ["c", "Backspace"], "Cycle the drawing colour, or delete the picked drawing (the last one while a drawing tool is picked)."),
|
|
324
|
+
keyEntry("zoom-pointer", shortcutDisplayMode === "terminal" ? ["Ctrl+Scroll"] : ["Ctrl+Scroll", "Pinch"], "Zoom time around the pointer."),
|
|
325
|
+
keyEntry("time-axis", ["Drag"], "On the time axis, zoom time: left zooms in, right zooms out. Double-click fits it again."),
|
|
326
|
+
keyEntry("value-axis", ["Drag", "Scroll"], "On a value axis, stretch or squeeze that panel's values. Dragging the plot then moves them too."),
|
|
327
|
+
keyEntry("value-fit", ["Double-click", "Auto"], "Fit a hand-scaled panel's values again, from its axis or the Auto button at its foot."),
|
|
328
|
+
keyEntry("zoom-keys", ["+/-", "0"], "Zoom the focused chart in or out, or reset it, values included."),
|
|
322
329
|
shortcutDisplayMode === "terminal"
|
|
323
|
-
?
|
|
324
|
-
:
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
330
|
+
? keyEntry("panel-height", ["Shift+Up/Down"], "Make the top panel taller or shorter; Reset Panel Heights in the pane menu puts back the split.")
|
|
331
|
+
: keyEntry("panel-height", ["Drag", "Shift+Up/Down"], tf("Drag the line between two panels to resize them, double-click it for the default split; {taller} and {shorter} resize the top panel.", { taller: keyLabel("Shift+Up"), shorter: keyLabel("Shift+Down") })),
|
|
332
|
+
keyEntry("panel-max", ["Double-click"], "Double-click a panel to give it the whole chart, and again to show every panel."),
|
|
333
|
+
keyEntry("tools-hide", ["Shift+T"], "Hide the drawing tools to a single button, or show them again."),
|
|
334
|
+
keyEntry("legend-fold", ["Shift+L"], "Fold the legend to its first series and a count of the rest, or open it again."),
|
|
328
335
|
],
|
|
329
336
|
},
|
|
330
337
|
{
|
|
331
338
|
label: "Map",
|
|
332
339
|
items: [
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
340
|
+
keyEntry("map-pan", ["m", "Arrows"], "Give the arrow keys to the map and pan it; Shift pans further, Esc gives them back to the list."),
|
|
341
|
+
keyEntry("map-zoom", ["+/-", "0"], "Zoom the map in or out, or reset it."),
|
|
342
|
+
keyEntry("map-pointer", ["Scroll", "Pinch"], "Zoom the map around the pointer; drag to pan, double-click to zoom in."),
|
|
336
343
|
],
|
|
337
344
|
},
|
|
338
345
|
{
|
|
@@ -345,15 +352,15 @@ function HelpPane({ focused, width, height }: PaneProps) {
|
|
|
345
352
|
{
|
|
346
353
|
label: "Panes",
|
|
347
354
|
items: [
|
|
348
|
-
|
|
349
|
-
|
|
355
|
+
keyEntry("cancel-drag", ["Esc"], "Cancel an active pane drag."),
|
|
356
|
+
keyEntry("close-pane", ["Esc", "Esc"], "Close the focused pane when nothing is being dragged."),
|
|
350
357
|
],
|
|
351
358
|
},
|
|
352
359
|
{
|
|
353
360
|
// Docked panes keep the saved layout and floating ones follow the pointer; the keyboard's way is Window Mode below.
|
|
354
361
|
label: "Layout",
|
|
355
362
|
items: [
|
|
356
|
-
|
|
363
|
+
keyEntry("layout-drag", ["Drag"], "Floating panes can be dragged by the title bar and resized from the lower-right corner."),
|
|
357
364
|
{ ...entry("layout-actions", ["LMA"], "Use Layout Actions for split, move, duplicate, close all floating panes, undo, redo, and layout presets."), run: openLayoutActions },
|
|
358
365
|
],
|
|
359
366
|
},
|
|
@@ -366,15 +373,15 @@ function HelpPane({ focused, width, height }: PaneProps) {
|
|
|
366
373
|
...(windowResizeBadges.length > 0
|
|
367
374
|
? [entry("enter-resize", windowResizeBadges, "Enter window mode to resize the focused window.")]
|
|
368
375
|
: []),
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
376
|
+
keyEntry("mode", ["m", "r"], "Switch between move and resize."),
|
|
377
|
+
keyEntry("dock", ["d"], "Dock or float the selected window."),
|
|
378
|
+
keyEntry("move", ["Arrows", "h/j/k/l"], "Move, resize, or choose a dock target."),
|
|
379
|
+
keyEntry("step", ["Shift"], "Use larger move and resize steps with direction keys."),
|
|
380
|
+
keyEntry("cycle", ["Tab", "w"], "Cycle windows or resize handles."),
|
|
381
|
+
keyEntry("commit", ["Enter", "Esc"], "Commit pending changes or exit window mode."),
|
|
375
382
|
],
|
|
376
383
|
},
|
|
377
|
-
], [askBadges, commandBarBadges, copyBadges, functionHelpBadges, openLayoutActions, pasteBadges, tickerSearchBadges, trialDays, windowMoveBadges, windowResizeBadges]);
|
|
384
|
+
], [askBadges, commandBarBadges, copyBadges, functionHelpBadges, keyLabel, openLayoutActions, pasteBadges, tickerSearchBadges, trialDays, windowMoveBadges, windowResizeBadges]);
|
|
378
385
|
|
|
379
386
|
// One key column for every key table in Help, wide enough for the longest group of chips, so the descriptions
|
|
380
387
|
// line up from table to table. A narrow pane caps it, and a row past the cap shows the chips that fit whole.
|
|
@@ -2,9 +2,14 @@ import type { HolderData, HolderRecord } from "../../../types/financials";
|
|
|
2
2
|
import { formatCompact, MISSING_VALUE } from "../../../utils/format";
|
|
3
3
|
import type { HolderRow } from "./types";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* A compact amount: dollars as "$3.31M", any other currency by its code. With
|
|
7
|
+
* `code`, dollars too read "3.31M USD": values in dollars on a line priced in
|
|
8
|
+
* another currency (Alibaba's 9988 in Hong Kong dollars) must not read as it.
|
|
9
|
+
*/
|
|
10
|
+
export function formatMoneyCompact(value: number | undefined, currency = "USD", { code = false }: { code?: boolean } = {}): string {
|
|
6
11
|
if (value == null) return MISSING_VALUE;
|
|
7
|
-
if (currency === "USD") {
|
|
12
|
+
if (currency === "USD" && !code) {
|
|
8
13
|
const sign = value < 0 ? "-" : "";
|
|
9
14
|
return `${sign}$${formatCompact(Math.abs(value))}`;
|
|
10
15
|
}
|
|
@@ -3,6 +3,7 @@ import { Box, Text, TextAttributes, useUiCapabilities, type ScrollBoxRenderable
|
|
|
3
3
|
import {
|
|
4
4
|
Badge,
|
|
5
5
|
DataTableView,
|
|
6
|
+
Notice,
|
|
6
7
|
usePagedRows,
|
|
7
8
|
usePaneFooter,
|
|
8
9
|
usePaneTabs,
|
|
@@ -34,7 +35,7 @@ import {
|
|
|
34
35
|
holderValueCurrency,
|
|
35
36
|
resolveHolderOwnershipPercent,
|
|
36
37
|
} from "./format";
|
|
37
|
-
import { holderPeriodsDiffer, holderShareBasisMarker } from "./report-header";
|
|
38
|
+
import { holderPeriodsDiffer, holderShareBasisMarker, nonUsHolderCaveat } from "./report-header";
|
|
38
39
|
import {
|
|
39
40
|
buildColumns,
|
|
40
41
|
hasHolderChanges,
|
|
@@ -120,6 +121,9 @@ export function HoldersView({ focused, width, height }: { focused: boolean; widt
|
|
|
120
121
|
|
|
121
122
|
// The values' own currency: dollars from the 13F filings on a London line, not its pence.
|
|
122
123
|
const currency = holderValueCurrency(listData, ticker?.metadata.currency || "USD")!;
|
|
124
|
+
// Dollars on a line priced in another currency (Alibaba's 9988) say USD, never a "$" read as Hong Kong dollars.
|
|
125
|
+
const listingCurrency = listData?.currency?.trim() || ticker?.metadata.currency || currency;
|
|
126
|
+
const currencyCode = currency !== listingCurrency;
|
|
123
127
|
// A stake without a reported percentage is the holding's value over the
|
|
124
128
|
// market cap, when both are in one currency. The stream keeps the cap
|
|
125
129
|
// current, about once a second; the stakes follow it at most every few
|
|
@@ -299,7 +303,7 @@ export function HoldersView({ focused, width, height }: { focused: boolean; widt
|
|
|
299
303
|
};
|
|
300
304
|
}
|
|
301
305
|
case "value":
|
|
302
|
-
return { text: formatMoneyCompact(row.value, currency), color: colors.text };
|
|
306
|
+
return { text: formatMoneyCompact(row.value, currency, { code: currencyCode }), color: colors.text };
|
|
303
307
|
case "shares":
|
|
304
308
|
return { text: formatCompact(row.shares), color: colors.text };
|
|
305
309
|
case "changeShares":
|
|
@@ -320,7 +324,7 @@ export function HoldersView({ focused, width, height }: { focused: boolean; widt
|
|
|
320
324
|
case "reportDate":
|
|
321
325
|
return { text: displayDate(row.reportDate), color: colors.textDim };
|
|
322
326
|
}
|
|
323
|
-
}, [currency, fundMatches, marketCap]);
|
|
327
|
+
}, [currency, currencyCode, fundMatches, marketCap]);
|
|
324
328
|
|
|
325
329
|
// Holders read from the company's home line say whose; the SEC index's rows are the listing's own.
|
|
326
330
|
useCompanyDataFooter(indexed ? null : listData?.companyFrom, viewMode !== "13dg");
|
|
@@ -373,6 +377,8 @@ export function HoldersView({ focused, width, height }: { focused: boolean; widt
|
|
|
373
377
|
? "Loading holders..."
|
|
374
378
|
: !listData && error ? error : sortedRows.length === 0 ? "No holders available" : null;
|
|
375
379
|
const chartHeight = Math.max(1, height - tabRows - (nativePaneChrome ? 1 : 0));
|
|
380
|
+
// A line abroad lists US 13F filers, not its own market's register: the table says so above the holders.
|
|
381
|
+
const registerCaveat = listData && sortedRows.length > 0 ? nonUsHolderCaveat(exchange || listData.exchange, listData.currency ?? "USD") : null;
|
|
376
382
|
|
|
377
383
|
// A list shorter than the table cannot scroll to load more, so it pages on
|
|
378
384
|
// until it fills the table, as a scroll would; a failed page waits for one.
|
|
@@ -410,6 +416,7 @@ export function HoldersView({ focused, width, height }: { focused: boolean; widt
|
|
|
410
416
|
renderCell={renderCell}
|
|
411
417
|
selectedTextOverridesCellColor
|
|
412
418
|
emptyStateTitle={statusTitle ?? "No holders available"}
|
|
419
|
+
rootBefore={registerCaveat ? <Box paddingX={1}><Notice tone="muted">{registerCaveat}</Notice></Box> : undefined}
|
|
413
420
|
/>
|
|
414
421
|
) : viewMode === "13dg" ? (
|
|
415
422
|
<BeneficialOwnersView
|
|
@@ -434,6 +441,7 @@ export function HoldersView({ focused, width, height }: { focused: boolean; widt
|
|
|
434
441
|
onSelect={(row) => setSelectedId(row.id)}
|
|
435
442
|
onActivate={openFundDetail}
|
|
436
443
|
currency={currency}
|
|
444
|
+
currencyCode={currencyCode}
|
|
437
445
|
marketCap={marketCap}
|
|
438
446
|
/>
|
|
439
447
|
)}
|
|
@@ -158,14 +158,15 @@ function isNonUsHolderListing(exchange?: string | null, currency?: string | null
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
|
-
* Holder lists are
|
|
162
|
-
* listing outside the US they are not that market's
|
|
163
|
-
* reader would otherwise assume
|
|
161
|
+
* Holder lists are quarterly SEC 13F filings, by the managers that file them
|
|
162
|
+
* wherever they are. On a listing outside the US they are not that market's
|
|
163
|
+
* share register, which a reader would otherwise assume, so the list says
|
|
164
|
+
* plainly what it is.
|
|
164
165
|
*/
|
|
165
166
|
export function nonUsHolderCaveat(exchange?: string | null, currency?: string | null): string | null {
|
|
166
167
|
if (!isNonUsHolderListing(exchange, currency)) return null;
|
|
167
168
|
const canonical = canonicalExchange(exchange ?? "");
|
|
168
169
|
const venue = resolveExchangeTimeZone(canonical) ? canonical : "local";
|
|
169
170
|
// Few filers report a line abroad, so a small position can lead the list.
|
|
170
|
-
return `
|
|
171
|
+
return `SEC 13F filings only, not the ${venue} share register: the line's largest holders may be missing.`;
|
|
171
172
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { HeadlessPaneColumn } from "../../../types/plugin";
|
|
2
2
|
import type { HolderData, ShareBasis } from "../../../types/financials";
|
|
3
3
|
import { formatCompact, MISSING_VALUE } from "../../../utils/format";
|
|
4
|
+
import { parsePublicTickerKey } from "../../../utils/exchanges";
|
|
4
5
|
import {
|
|
5
6
|
displayDate,
|
|
6
7
|
formatChangePercent,
|
|
@@ -206,7 +207,9 @@ export function holderReportNotices({
|
|
|
206
207
|
const valueCurrency = holderValueCurrency(data, "USD")!;
|
|
207
208
|
const changeReported = holderChangeReported(shown);
|
|
208
209
|
const valueBasis = holderValueBasis(sharedReportDate(shown), data.valueBasis, valueCurrency);
|
|
209
|
-
|
|
210
|
+
// The venue as asked (9988:HKEX) names the register; the list's own code can be a vendor's (HKSE).
|
|
211
|
+
const venue = parsePublicTickerKey(requested).exchange || data.exchange;
|
|
212
|
+
const positionsBasis = shown.length > 0 ? nonUsHolderCaveat(venue, data.currency ?? "USD") : null;
|
|
210
213
|
// The title names the ticker and the closing line carries the as-of date,
|
|
211
214
|
// which is one date only when every row has it.
|
|
212
215
|
const header = holdersHeaderLine({
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./format";
|
|
9
9
|
import type { HolderRow } from "./types";
|
|
10
10
|
|
|
11
|
-
export function HoldersTreemap({ rows, width, height, selectedId, onSelect, onActivate, currency, marketCap, emptyStateTitle }: {
|
|
11
|
+
export function HoldersTreemap({ rows, width, height, selectedId, onSelect, onActivate, currency, currencyCode = false, marketCap, emptyStateTitle }: {
|
|
12
12
|
rows: HolderRow[];
|
|
13
13
|
width: number;
|
|
14
14
|
height: number;
|
|
@@ -16,6 +16,8 @@ export function HoldersTreemap({ rows, width, height, selectedId, onSelect, onAc
|
|
|
16
16
|
onSelect: (row: HolderRow) => void;
|
|
17
17
|
onActivate?: (row: HolderRow) => void;
|
|
18
18
|
currency: string;
|
|
19
|
+
/** Dollars by their code too: values in dollars on a line priced in another currency. */
|
|
20
|
+
currencyCode?: boolean;
|
|
19
21
|
marketCap?: number;
|
|
20
22
|
/** Loading, error, and no-ticker states the pane resolves for both views. */
|
|
21
23
|
emptyStateTitle?: string;
|
|
@@ -29,13 +31,13 @@ export function HoldersTreemap({ rows, width, height, selectedId, onSelect, onAc
|
|
|
29
31
|
weight: row.value ?? row.shares ?? 0,
|
|
30
32
|
colorValue: row.changePercent ?? null,
|
|
31
33
|
primaryText: row.value != null
|
|
32
|
-
? formatMoneyCompact(row.value, currency)
|
|
34
|
+
? formatMoneyCompact(row.value, currency, { code: currencyCode })
|
|
33
35
|
: formatCompact(row.shares),
|
|
34
36
|
secondaryText: ownership ?? change,
|
|
35
37
|
tertiaryText: ownership ? change : null,
|
|
36
38
|
data: row,
|
|
37
39
|
};
|
|
38
|
-
}), [currency, marketCap, rows]);
|
|
40
|
+
}), [currency, currencyCode, marketCap, rows]);
|
|
39
41
|
|
|
40
42
|
return (
|
|
41
43
|
<MetricTreemapSurface
|
|
@@ -456,10 +456,9 @@ export function formatSignalValue(value: number): string {
|
|
|
456
456
|
return `$${formatCompact(value)}`;
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
/** A trade day as
|
|
459
|
+
/** A trade day as ISO, 2026-11-04, as the Filed column beside it: 11/4/26 reads as 11 April to a day-first reader. */
|
|
460
460
|
export function formatSignalDay(day: string): string {
|
|
461
|
-
|
|
462
|
-
return match ? `${Number(match[2])}/${Number(match[3])}/${match[1]!.slice(2)}` : "--";
|
|
461
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(day) ? day : "--";
|
|
463
462
|
}
|
|
464
463
|
|
|
465
464
|
export function insiderSignalsEmptyTitle(window: number, side: InsiderSignalSide = "buy", filtered = false): string {
|
|
@@ -559,7 +558,7 @@ export function buildInsiderActivityColumns(width: number, lines: readonly Insid
|
|
|
559
558
|
stake: fitWidth(lines.map((line) => line.stake.text), "Stake", 10),
|
|
560
559
|
bought: fitWidth(dollars((line) => line.bought), "Bought", 8),
|
|
561
560
|
sold: fitWidth(dollars((line) => line.sold), "Sold", 8),
|
|
562
|
-
last: fitWidth(lines.map((line) => line.last), "Last",
|
|
561
|
+
last: fitWidth(lines.map((line) => line.last), "Last", 10),
|
|
563
562
|
};
|
|
564
563
|
const show = { usual: true, nth: true, last: true, role: true };
|
|
565
564
|
const available = Math.max(0, Math.floor(width) - TABLE_PADDING);
|
|
@@ -654,7 +653,7 @@ export function buildInsiderSignalColumns(
|
|
|
654
653
|
stake: fitWidth(facts.map((fact) => fact.stake.text), "Stake", 10),
|
|
655
654
|
insiders: fitWidth(rows.map((row) => String(row.insiders)), words.insiders, 4),
|
|
656
655
|
value: fitWidth(rows.map((row) => formatSignalValue(row.value)), words.traded, 8),
|
|
657
|
-
lastBuy: fitWidth(rows.map((row) => formatSignalDay(row.lastBuy)), words.last,
|
|
656
|
+
lastBuy: fitWidth(rows.map((row) => formatSignalDay(row.lastBuy)), words.last, 10),
|
|
658
657
|
};
|
|
659
658
|
const show = { usual: true, nth: true, company: true, insiders: true, lastBuy: true };
|
|
660
659
|
const available = Math.max(0, Math.floor(width) - TABLE_PADDING);
|
|
@@ -42,7 +42,17 @@ const COLUMNS: HeadlessPaneColumn[] = [
|
|
|
42
42
|
{ key: "lockupEnds", header: "Lockup ends", format: (value) => formatIpoLockupEnd(typeof value === "string" ? value : null) },
|
|
43
43
|
];
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
/** A stage the server sends, or `delayed`: the upcoming deals past their date, which `upcoming` leaves out. */
|
|
46
|
+
type StatusOption = IpoStatus | "delayed" | "all";
|
|
47
|
+
const STATUS_OPTIONS: readonly string[] = [...IPO_STATUSES, "delayed"];
|
|
48
|
+
|
|
49
|
+
/** Whether a deal is at the stage asked for, as the board reads it. */
|
|
50
|
+
function atStatus(deal: IpoDeal, status: StatusOption, now: Date): boolean {
|
|
51
|
+
if (status === "all") return true;
|
|
52
|
+
const shown = ipoBoardStatus(deal, now);
|
|
53
|
+
if (status === "delayed") return shown === "delayed";
|
|
54
|
+
return deal.status === status && shown !== "delayed";
|
|
55
|
+
}
|
|
46
56
|
|
|
47
57
|
function regionOption(args: HeadlessPaneLoadArgs): IpoTab {
|
|
48
58
|
const value = args.options.region;
|
|
@@ -51,7 +61,7 @@ function regionOption(args: HeadlessPaneLoadArgs): IpoTab {
|
|
|
51
61
|
|
|
52
62
|
function statusOption(args: HeadlessPaneLoadArgs): StatusOption {
|
|
53
63
|
const value = String(args.options.status ?? "all");
|
|
54
|
-
return
|
|
64
|
+
return STATUS_OPTIONS.includes(value) ? value as StatusOption : "all";
|
|
55
65
|
}
|
|
56
66
|
|
|
57
67
|
function toRow(deal: IpoDeal, now: Date) {
|
|
@@ -71,7 +81,7 @@ function toRow(deal: IpoDeal, now: Date) {
|
|
|
71
81
|
dateKind: deal.dateKind,
|
|
72
82
|
subscriptionOpen: deal.subscriptionOpen,
|
|
73
83
|
subscriptionClose: deal.subscriptionClose,
|
|
74
|
-
// As the pane reads it: an upcoming deal may be offering or
|
|
84
|
+
// As the pane reads it: an upcoming deal may be offering, overdue or delayed.
|
|
75
85
|
status: ipoBoardStatus(deal, now),
|
|
76
86
|
listingType: deal.listingType,
|
|
77
87
|
currency: deal.currency,
|
|
@@ -122,7 +132,7 @@ export function projectIpoCalendarHeadless(
|
|
|
122
132
|
const status = statusOption(args);
|
|
123
133
|
const limit = Number(args.options.limit ?? 50);
|
|
124
134
|
const keyword = ipoKeyword(query);
|
|
125
|
-
const found = filterIpoDeals(payload.deals, region, query, now).filter((deal) =>
|
|
135
|
+
const found = filterIpoDeals(payload.deals, region, query, now).filter((deal) => atStatus(deal, status, now));
|
|
126
136
|
const matching = keyword === "lockup" ? byLockupEnd(found, now) : sortIpoDeals(found, DEFAULT_IPO_SORT, now);
|
|
127
137
|
const rows = matching.slice(0, limit).map((deal) => toRow(deal, now));
|
|
128
138
|
const behind = marketsBehindText(marketsBehind(payload.sources, region, payload.deals));
|
|
@@ -177,11 +187,11 @@ export const ipoCalendarHeadless: HeadlessPaneDefinition<"rows"> = {
|
|
|
177
187
|
{
|
|
178
188
|
key: "status",
|
|
179
189
|
shot: REPORT_FILTER,
|
|
180
|
-
description: "IPO stage to include; upcoming takes in the deals listed as offering or overdue.",
|
|
190
|
+
description: "IPO stage to include; upcoming takes in the deals listed as offering or overdue, and delayed the ones still not listed 3 weekdays past their date.",
|
|
181
191
|
type: "enum",
|
|
182
192
|
defaultValue: "all",
|
|
183
193
|
// `trading` was the plugin's word for a deal that has listed.
|
|
184
|
-
values: ["all", ...
|
|
194
|
+
values: ["all", ...STATUS_OPTIONS].map((value) => (value === "listed" ? { value, aliases: ["trading"] } : { value })),
|
|
185
195
|
},
|
|
186
196
|
{
|
|
187
197
|
key: "limit",
|
|
@@ -214,7 +224,8 @@ export const ipoCalendarHeadless: HeadlessPaneDefinition<"rows"> = {
|
|
|
214
224
|
// The default window has no filed or withdrawn deals, so a stage is asked for by name.
|
|
215
225
|
const status = statusOption(args);
|
|
216
226
|
const from = typeof args.options.from === "string" && args.options.from ? args.options.from : undefined;
|
|
217
|
-
|
|
227
|
+
// A delayed deal is one the server still calls upcoming.
|
|
228
|
+
const params = { ...(status === "all" ? {} : { status: status === "delayed" ? "upcoming" as const : status }), ...(from ? { from } : {}) };
|
|
218
229
|
const payload = await fetchIpoCalendar(ctx.apiClient, ctx.signal, params);
|
|
219
230
|
const projected = projectIpoCalendarHeadless(payload, args);
|
|
220
231
|
// One deal found: its price now and its lock-up news, which never fail the report.
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
formatIpoAmount,
|
|
8
8
|
formatIpoPrice,
|
|
9
9
|
formatIpoReturn,
|
|
10
|
+
ipoBoardStatus,
|
|
10
11
|
ipoLockupBasis,
|
|
11
12
|
ipoLockupText,
|
|
12
13
|
ipoReturnSince,
|
|
@@ -113,7 +114,8 @@ export function ipoDetailNotes(deal: IpoDeal, news: readonly IpoLockupStory[]):
|
|
|
113
114
|
export function ipoDetailSentences(deal: IpoDeal, price: number | null | undefined, news: readonly IpoLockupStory[], now = new Date()): string[] {
|
|
114
115
|
const name = deal.symbol ?? deal.company;
|
|
115
116
|
const day = deal.listingDate ?? deal.firstDay?.session ?? null;
|
|
116
|
-
const listed = deal.status === "listed" ? "listed"
|
|
117
|
+
const listed = deal.status === "listed" ? "listed"
|
|
118
|
+
: ipoBoardStatus(deal, now) === "delayed" ? "is delayed: it was expected to list" : "prices to list";
|
|
117
119
|
const where = `${day ? ` ${day}` : ""}${deal.venue ? ` on ${deal.venue}` : ""}`;
|
|
118
120
|
const offer = deal.offerPrice != null ? ` at a ${formatIpoAmount(deal, deal.offerPrice)} offer price`
|
|
119
121
|
: deal.listingType === "direct" ? `: ${formatIpoPrice(deal, { full: true })}` : "";
|