gloomberb 0.15.7 → 0.16.0
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 +11 -2
- package/package.json +1 -1
- package/src/api-client/app-attention.ts +147 -0
- package/src/api-client/attention.ts +26 -0
- package/src/api-client/awards.ts +215 -0
- package/src/api-client/catalysts.ts +160 -0
- package/src/api-client/chat.ts +137 -14
- package/src/api-client/company-kpis.ts +153 -0
- package/src/api-client/cpi.ts +52 -0
- package/src/api-client/credit-documents.ts +107 -0
- package/src/api-client/data.ts +192 -3
- package/src/api-client/distress.ts +164 -0
- package/src/api-client/doe.ts +75 -0
- package/src/api-client/equity-screener.ts +11 -0
- package/src/api-client/exposure.ts +202 -0
- package/src/api-client/gpu.ts +93 -0
- package/src/api-client/hiring.ts +110 -0
- package/src/api-client/index.ts +78 -3
- package/src/api-client/normalizers.ts +31 -1
- package/src/api-client/paths.ts +3 -0
- package/src/api-client/perps.ts +127 -0
- package/src/api-client/power.ts +148 -0
- package/src/api-client/request.ts +58 -1
- package/src/api-client/research-activity.ts +172 -13
- package/src/api-client/socket.ts +75 -27
- package/src/api-client/supply-chain-graph.ts +40 -0
- package/src/api-client/supply-chain.ts +98 -0
- package/src/api-client/telemetry.ts +29 -0
- package/src/api-client/themes.ts +28 -0
- package/src/api-client/types.ts +33 -1
- package/src/api-client/wall-experiments.ts +100 -0
- package/src/api-client/wall-summary.ts +49 -0
- package/src/api-client/web-experiments.ts +136 -0
- package/src/app/pane-runtime/plugin-bindings.ts +5 -0
- package/src/app/pane-runtime/ticker-open-runtime.ts +8 -2
- package/src/app/runtime/update.ts +13 -1
- package/src/cli/commands/system.ts +2 -0
- package/src/cli/desktop-pane-shot.ts +3 -4
- package/src/cli/pane-functions/data.ts +78 -0
- package/src/cli/pane-functions/financial-ratio-shot.ts +160 -0
- package/src/cli/pane-functions/function-help.ts +220 -8
- package/src/cli/pane-functions/headless.ts +4 -0
- package/src/cli/pane-functions/screenshot-evidence.ts +21 -0
- package/src/cli/pane-functions/screenshot.ts +49 -5
- package/src/components/chart/composite/composite-chart.tsx +15 -2
- package/src/components/chart/composite/format.ts +24 -11
- package/src/components/chart/composite/rasterizer.ts +67 -16
- package/src/components/chart/composite/scene.ts +53 -2
- package/src/components/chart/composite/session-shading.ts +3 -2
- package/src/components/chart/composite/text-renderer.ts +52 -1
- package/src/components/chart/composite/time-axis.ts +100 -30
- package/src/components/chart/composite/tools.ts +2 -1
- package/src/components/chart/composite/types.ts +4 -0
- package/src/components/chart-table/index.ts +1 -0
- package/src/components/chart-table/layout.ts +15 -0
- package/src/components/command-bar/action-runtime.ts +1 -0
- package/src/components/command-bar/commands/direct/index.ts +32 -0
- package/src/components/command-bar/commands/registry.ts +7 -0
- package/src/components/command-bar/pane-templates/items.ts +11 -0
- package/src/components/command-bar/pane-templates/workflow.ts +19 -4
- package/src/components/command-bar/routes/root/command-items.ts +6 -0
- package/src/components/command-bar/routes/root/provider-search.ts +2 -0
- package/src/components/command-bar/routes/root/results.ts +64 -0
- package/src/components/command-bar/routes/root/runtime.ts +8 -0
- package/src/components/command-bar/routes/ticker-search/results.ts +89 -24
- package/src/components/command-bar/routes/ticker-search/route.ts +2 -0
- package/src/components/command-bar/surface/index.tsx +15 -0
- package/src/components/command-bar/view-model.ts +3 -0
- package/src/components/command-bar/workflow/collection-actions.ts +9 -7
- package/src/components/command-bar/workflow/ops.ts +19 -0
- package/src/components/command-bar/workflow/tickers.ts +5 -0
- package/src/components/company-logo.tsx +15 -2
- package/src/components/data-table/table-pane.ts +2 -1
- package/src/components/index.ts +1 -0
- package/src/components/layout/detached-pane-shell.tsx +12 -1
- package/src/components/layout/missing-pane.tsx +87 -23
- package/src/components/layout/pane/footer/index.tsx +64 -18
- package/src/components/layout/pane/footer/model.ts +85 -0
- package/src/components/layout/pane/sidebar.tsx +19 -1
- package/src/components/layout/shell/index.tsx +38 -28
- package/src/components/layout/shell/pane/management-shortcuts.ts +13 -1
- package/src/components/layout/status-bar.tsx +93 -28
- package/src/components/layout/status-widget-space.ts +72 -0
- package/src/components/onboarding/first-run-workspace.ts +8 -2
- package/src/components/onboarding/onboarding-wizard.tsx +35 -16
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +14 -5
- package/src/components/onboarding/wizard-model.ts +13 -5
- package/src/components/onboarding/wizard-positions.ts +56 -7
- package/src/components/price-performance.tsx +31 -34
- package/src/components/ui/data-table/index.tsx +11 -8
- package/src/components/ui/display.tsx +15 -6
- package/src/components/ui/fields.tsx +5 -0
- package/src/components/ui/figure.tsx +94 -0
- package/src/components/ui/header-case.ts +25 -3
- package/src/components/ui/icon.tsx +3 -1
- package/src/components/ui/message-composer.tsx +8 -1
- package/src/components/ui/query-bar.tsx +8 -1
- package/src/components/ui/ratio-bar.tsx +84 -0
- package/src/components/ui/toggle.tsx +3 -1
- package/src/components/use-scrollbox-layout.ts +17 -0
- package/src/core/state/app/layout.ts +35 -1
- package/src/core/state/app/state.ts +15 -0
- package/src/core/state/app/types.ts +1 -0
- package/src/data/config/store/normalize.ts +24 -0
- package/src/i18n/es.ts +2 -0
- package/src/i18n/ja.ts +2 -0
- package/src/i18n/ko.ts +2 -0
- package/src/i18n/zh-cn.ts +2 -0
- package/src/i18n/zh-tw.ts +2 -0
- package/src/layout-marketplace/pane-imagery.ts +1 -0
- package/src/market-data/coordinator/entries.ts +13 -0
- package/src/market-data/coordinator/financials.ts +33 -8
- package/src/market-data/market/freshness.ts +16 -5
- package/src/market-data/market/trading-sessions.ts +65 -1
- package/src/market-data/published-cn-sessions.ts +25 -0
- package/src/market-data/published-nse-sessions.ts +20 -0
- package/src/news/aggregator.ts +4 -0
- package/src/plugins/builtin/account-management/model.ts +6 -1
- package/src/plugins/builtin/account-management/pane.tsx +36 -25
- package/src/plugins/builtin/alerts/catalysts.ts +77 -0
- package/src/plugins/builtin/alerts/events-pane.tsx +3 -0
- package/src/plugins/builtin/alerts/events.ts +10 -4
- package/src/plugins/builtin/alerts/history-pane.tsx +1 -1
- package/src/plugins/builtin/alerts/history.ts +1 -0
- package/src/plugins/builtin/alerts/index.tsx +6 -0
- package/src/plugins/builtin/alerts/research-builder.ts +10 -3
- package/src/plugins/builtin/alerts/research-rules.ts +15 -1
- package/src/plugins/builtin/analytics/risk-client.ts +15 -3
- package/src/plugins/builtin/analytics/risk-headless.ts +123 -18
- package/src/plugins/builtin/attention/client.ts +80 -0
- package/src/plugins/builtin/attention/evidence.ts +30 -0
- package/src/plugins/builtin/attention/headless.ts +33 -0
- package/src/plugins/builtin/attention/index.tsx +18 -0
- package/src/plugins/builtin/attention/model.ts +59 -0
- package/src/plugins/builtin/attention/pane.tsx +211 -0
- package/src/plugins/builtin/attention/trending.tsx +59 -0
- package/src/plugins/builtin/awards/alerts.ts +32 -0
- package/src/plugins/builtin/awards/client.ts +82 -0
- package/src/plugins/builtin/awards/detail.tsx +107 -0
- package/src/plugins/builtin/awards/evidence.ts +36 -0
- package/src/plugins/builtin/awards/headless.ts +55 -0
- package/src/plugins/builtin/awards/index.tsx +20 -0
- package/src/plugins/builtin/awards/model.ts +42 -0
- package/src/plugins/builtin/awards/pane.tsx +263 -0
- package/src/plugins/builtin/catalysts/client.ts +28 -0
- package/src/plugins/builtin/catalysts/detail.tsx +88 -0
- package/src/plugins/builtin/catalysts/evidence.ts +47 -0
- package/src/plugins/builtin/catalysts/headless.ts +42 -0
- package/src/plugins/builtin/catalysts/history.ts +26 -0
- package/src/plugins/builtin/catalysts/index.tsx +29 -0
- package/src/plugins/builtin/catalysts/model.ts +135 -0
- package/src/plugins/builtin/catalysts/pane.tsx +159 -0
- package/src/plugins/builtin/chart-composer/cli-options.ts +4 -0
- package/src/plugins/builtin/chart-composer/headless-schema.ts +6 -0
- package/src/plugins/builtin/chart-composer/index.tsx +8 -1
- package/src/plugins/builtin/chart-composer/pane.tsx +28 -1
- package/src/plugins/builtin/chat/attachments/desktop.tsx +610 -0
- package/src/plugins/builtin/chat/attachments/files.ts +45 -0
- package/src/plugins/builtin/chat/attachments/model.ts +164 -0
- package/src/plugins/builtin/chat/attachments/terminal.tsx +72 -0
- package/src/plugins/builtin/chat/attachments/transfer.ts +165 -0
- package/src/plugins/builtin/chat/content/channel-navigation.ts +13 -12
- package/src/plugins/builtin/chat/content/composer-runtime.ts +25 -4
- package/src/plugins/builtin/chat/content/composer.tsx +46 -4
- package/src/plugins/builtin/chat/content/footer.tsx +46 -8
- package/src/plugins/builtin/chat/content/index.tsx +263 -62
- package/src/plugins/builtin/chat/content/layout-metrics.ts +10 -2
- package/src/plugins/builtin/chat/content/open-targets.ts +17 -3
- package/src/plugins/builtin/chat/content/scroll.ts +7 -1
- package/src/plugins/builtin/chat/content/shortcuts.ts +36 -11
- package/src/plugins/builtin/chat/content/snapshot.ts +3 -0
- package/src/plugins/builtin/chat/content/transcript.tsx +17 -1
- package/src/plugins/builtin/chat/content/types.ts +7 -0
- package/src/plugins/builtin/chat/controller/attachments.ts +213 -0
- package/src/plugins/builtin/chat/controller/connections.ts +3 -1
- package/src/plugins/builtin/chat/controller/index.ts +114 -2
- package/src/plugins/builtin/chat/controller/lifecycle.ts +9 -0
- package/src/plugins/builtin/chat/controller/messages.ts +35 -2
- package/src/plugins/builtin/chat/controller/send.ts +128 -25
- package/src/plugins/builtin/chat/controller/state.ts +12 -1
- package/src/plugins/builtin/chat/controller/utils.ts +7 -5
- package/src/plugins/builtin/chat/controller/view.ts +2 -0
- package/src/plugins/builtin/chat/index.tsx +21 -0
- package/src/plugins/builtin/chat/layout.ts +9 -4
- package/src/plugins/builtin/chat/message/desktop.tsx +55 -20
- package/src/plugins/builtin/chat/message/header.tsx +30 -5
- package/src/plugins/builtin/chat/message/inline-tokens.tsx +9 -0
- package/src/plugins/builtin/chat/message/pending-send.ts +35 -0
- package/src/plugins/builtin/chat/message/profile-popover.tsx +5 -1
- package/src/plugins/builtin/chat/message/render-state.ts +12 -2
- package/src/plugins/builtin/chat/message/terminal.tsx +51 -4
- package/src/plugins/builtin/chat/message/types.ts +6 -1
- package/src/plugins/builtin/chat/pane-state.ts +59 -1
- package/src/plugins/builtin/chat/profile-popover.ts +50 -1
- package/src/plugins/builtin/chat/sidebar.tsx +8 -3
- package/src/plugins/builtin/chat/status-widget.tsx +29 -12
- package/src/plugins/builtin/chat/unread-inbox-pane.tsx +143 -0
- package/src/plugins/builtin/chat/unread-inbox.ts +91 -0
- package/src/plugins/builtin/clinical-trials/client.ts +237 -0
- package/src/plugins/builtin/clinical-trials/index.tsx +74 -0
- package/src/plugins/builtin/clinical-trials/pane.tsx +225 -0
- package/src/plugins/builtin/clinical-trials/types.ts +2 -0
- package/src/plugins/builtin/cloud/askg/controller.ts +37 -6
- package/src/plugins/builtin/cloud/askg/executor.ts +59 -44
- package/src/plugins/builtin/cloud/askg/host.ts +8 -1
- package/src/plugins/builtin/cloud/askg/manifest.ts +29 -2
- package/src/plugins/builtin/cloud/askg/model.ts +47 -13
- package/src/plugins/builtin/cloud/askg/notes.ts +100 -0
- package/src/plugins/builtin/cloud/askg/pane.tsx +50 -14
- package/src/plugins/builtin/cloud/askg/protocol.ts +39 -1
- package/src/plugins/builtin/cloud/askg/result-budget.ts +156 -0
- package/src/plugins/builtin/cloud/askg/user-data.ts +89 -0
- package/src/plugins/builtin/cloud/auth-actions.tsx +55 -31
- package/src/plugins/builtin/cloud/plugin.tsx +4 -1
- package/src/plugins/builtin/cloud/team/pane-sections.tsx +10 -1
- package/src/plugins/builtin/cloud/team/pane.tsx +3 -2
- package/src/plugins/builtin/cloud/thesis/board-pane.tsx +2 -2
- package/src/plugins/builtin/cloud/thesis/detail.tsx +1 -1
- package/src/plugins/builtin/cloud/thesis/ticker-tab.tsx +2 -2
- package/src/plugins/builtin/cloud/trial-offer-status-widget.tsx +202 -0
- package/src/plugins/builtin/cloud/upgrade-command.ts +1 -1
- package/src/plugins/builtin/cloud/upgrade-dialog.tsx +29 -3
- package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +1 -1
- package/src/plugins/builtin/cloud-tweets/table.tsx +1 -1
- package/src/plugins/builtin/comment-letters/client.ts +342 -0
- package/src/plugins/builtin/comment-letters/index.tsx +74 -0
- package/src/plugins/builtin/comment-letters/pane.tsx +295 -0
- package/src/plugins/builtin/comment-letters/types.ts +43 -0
- package/src/plugins/builtin/company-attention/app-rank.tsx +79 -0
- package/src/plugins/builtin/company-attention/client.ts +69 -0
- package/src/plugins/builtin/company-attention/evidence.ts +45 -0
- package/src/plugins/builtin/company-attention/headless.ts +47 -0
- package/src/plugins/builtin/company-attention/index.tsx +30 -0
- package/src/plugins/builtin/company-attention/model.ts +129 -0
- package/src/plugins/builtin/company-attention/pane.tsx +183 -0
- package/src/plugins/builtin/company-kpis/client.ts +92 -0
- package/src/plugins/builtin/company-kpis/headless.ts +32 -0
- package/src/plugins/builtin/company-kpis/index.tsx +26 -0
- package/src/plugins/builtin/company-kpis/model.ts +124 -0
- package/src/plugins/builtin/company-kpis/pane.tsx +226 -0
- package/src/plugins/builtin/company-kpis/related.ts +11 -0
- package/src/plugins/builtin/company-kpis/screenshot-evidence.ts +44 -0
- package/src/plugins/builtin/composite-plugins.ts +34 -0
- package/src/plugins/builtin/correlation/history.ts +4 -1
- package/src/plugins/builtin/correlation/index.tsx +139 -80
- package/src/plugins/builtin/correlation/matrix/pair-chart.tsx +48 -0
- package/src/plugins/builtin/correlation/matrix/selection.ts +77 -0
- package/src/plugins/builtin/correlation/relationship/model.ts +2 -2
- package/src/plugins/builtin/cpi/client.ts +66 -0
- package/src/plugins/builtin/cpi/headless.ts +78 -0
- package/src/plugins/builtin/cpi/index.tsx +31 -0
- package/src/plugins/builtin/cpi/model.ts +198 -0
- package/src/plugins/builtin/cpi/pane.tsx +157 -0
- package/src/plugins/builtin/credit-documents/client.ts +99 -0
- package/src/plugins/builtin/credit-documents/detail.tsx +109 -0
- package/src/plugins/builtin/credit-documents/evidence.ts +64 -0
- package/src/plugins/builtin/credit-documents/gauge.tsx +55 -0
- package/src/plugins/builtin/credit-documents/headless.ts +40 -0
- package/src/plugins/builtin/credit-documents/index.tsx +19 -0
- package/src/plugins/builtin/credit-documents/model.ts +336 -0
- package/src/plugins/builtin/credit-documents/pane.tsx +185 -0
- package/src/plugins/builtin/custom-view/view-spec.ts +14 -2
- package/src/plugins/builtin/debt-maturities/pane.tsx +1 -0
- package/src/plugins/builtin/dividend-yield/pane.tsx +1 -1
- package/src/plugins/builtin/doe/client.ts +73 -0
- package/src/plugins/builtin/doe/headless.ts +93 -0
- package/src/plugins/builtin/doe/index.tsx +41 -0
- package/src/plugins/builtin/doe/model.ts +215 -0
- package/src/plugins/builtin/doe/pane.tsx +148 -0
- package/src/plugins/builtin/doe/range-bar.tsx +45 -0
- package/src/plugins/builtin/earnings/board.tsx +3 -0
- package/src/plugins/builtin/earnings/index.tsx +2 -0
- package/src/plugins/builtin/earnings-calls/pane.tsx +7 -1
- package/src/plugins/builtin/earnings-calls/transcript-view.tsx +7 -7
- package/src/plugins/builtin/earnings-ripple/client.ts +60 -0
- package/src/plugins/builtin/earnings-ripple/headless.ts +35 -0
- package/src/plugins/builtin/earnings-ripple/index.tsx +35 -0
- package/src/plugins/builtin/earnings-ripple/model.ts +98 -0
- package/src/plugins/builtin/earnings-ripple/pane.tsx +103 -0
- package/src/plugins/builtin/equity-screener/client.ts +1 -1
- package/src/plugins/builtin/equity-screener/criterion-editor.tsx +1 -1
- package/src/plugins/builtin/equity-screener/model.ts +74 -9
- package/src/plugins/builtin/equity-screener/pane.tsx +2 -0
- package/src/plugins/builtin/estimate-revisions/pane.tsx +3 -0
- package/src/plugins/builtin/executives/pane.tsx +7 -5
- package/src/plugins/builtin/exposure/charts.tsx +66 -0
- package/src/plugins/builtin/exposure/client.ts +53 -0
- package/src/plugins/builtin/exposure/drivers.ts +29 -0
- package/src/plugins/builtin/exposure/editor.tsx +61 -0
- package/src/plugins/builtin/exposure/evidence.ts +39 -0
- package/src/plugins/builtin/exposure/headless.ts +51 -0
- package/src/plugins/builtin/exposure/holdings.ts +56 -0
- package/src/plugins/builtin/exposure/index.tsx +13 -0
- package/src/plugins/builtin/exposure/model.ts +104 -0
- package/src/plugins/builtin/exposure/pane.tsx +247 -0
- package/src/plugins/builtin/fear-greed/charts.tsx +1 -1
- package/src/plugins/builtin/fear-greed/pane.tsx +2 -9
- package/src/plugins/builtin/filing-events/pane.tsx +2 -1
- package/src/plugins/builtin/gpu/board.tsx +163 -0
- package/src/plugins/builtin/gpu/changes.tsx +94 -0
- package/src/plugins/builtin/gpu/client.ts +130 -0
- package/src/plugins/builtin/gpu/equities.tsx +112 -0
- package/src/plugins/builtin/gpu/headless.ts +67 -0
- package/src/plugins/builtin/gpu/history.tsx +140 -0
- package/src/plugins/builtin/gpu/index.tsx +18 -0
- package/src/plugins/builtin/gpu/ladder.tsx +127 -0
- package/src/plugins/builtin/gpu/model.ts +317 -0
- package/src/plugins/builtin/gpu/pane.tsx +63 -0
- package/src/plugins/builtin/help/index.tsx +19 -2
- package/src/plugins/builtin/holders/pane.tsx +5 -9
- package/src/plugins/builtin/insider/detail.tsx +119 -0
- package/src/plugins/builtin/insider/display.ts +221 -0
- package/src/plugins/builtin/insider/headless.ts +24 -3
- package/src/plugins/builtin/insider/index.tsx +206 -108
- package/src/plugins/builtin/insider/insider-data.ts +31 -3
- package/src/plugins/builtin/insider/model.ts +53 -4
- package/src/plugins/builtin/insider/table-model.ts +226 -0
- package/src/plugins/builtin/insider/table.tsx +79 -0
- package/src/plugins/builtin/iv-history/screen-pane.tsx +1 -1
- package/src/plugins/builtin/jobs/pane.tsx +14 -7
- package/src/plugins/builtin/kelly-sizer/pane.tsx +1 -1
- package/src/plugins/builtin/macro-day/client.ts +50 -0
- package/src/plugins/builtin/macro-day/headless.ts +51 -0
- package/src/plugins/builtin/macro-day/index.tsx +21 -0
- package/src/plugins/builtin/macro-day/model.ts +137 -0
- package/src/plugins/builtin/macro-day/pane.tsx +118 -0
- package/src/plugins/builtin/macro-day/releases.ts +58 -0
- package/src/plugins/builtin/market-halts/model.ts +30 -17
- package/src/plugins/builtin/market-halts/pane.tsx +15 -21
- package/src/plugins/builtin/market-heatmap/data.ts +1 -1
- package/src/plugins/builtin/market-heatmap/index.tsx +198 -50
- package/src/plugins/builtin/market-heatmap/portfolio.ts +220 -0
- package/src/plugins/builtin/market-movers/index.tsx +1 -0
- package/src/plugins/builtin/market-movers/session-body.tsx +5 -2
- package/src/plugins/builtin/mna/distress/client.ts +326 -0
- package/src/plugins/builtin/mna/distress/detail.tsx +247 -0
- package/src/plugins/builtin/mna/distress/headless.ts +257 -0
- package/src/plugins/builtin/mna/distress/model.ts +427 -0
- package/src/plugins/builtin/mna/distress/pane.tsx +606 -0
- package/src/plugins/builtin/mna/index.tsx +15 -0
- package/src/plugins/builtin/mna/pane.tsx +42 -1
- package/src/plugins/builtin/news/index.tsx +62 -16
- package/src/plugins/builtin/news/wire/filter-articles.ts +54 -0
- package/src/plugins/builtin/news/wire/index.tsx +37 -3
- package/src/plugins/builtin/news/wire/industry-pane.tsx +29 -13
- package/src/plugins/builtin/news/wire/mutes.ts +253 -0
- package/src/plugins/builtin/news/wire/news/command-bar-search.ts +117 -0
- package/src/plugins/builtin/news/wire/news/footer.ts +4 -0
- package/src/plugins/builtin/news/wire/news/list-search.ts +34 -0
- package/src/plugins/builtin/news/wire/news/pop-out.tsx +158 -0
- package/src/plugins/builtin/news/wire/news/preset-pane.tsx +64 -19
- package/src/plugins/builtin/openfda/client.ts +300 -0
- package/src/plugins/builtin/openfda/index.tsx +71 -0
- package/src/plugins/builtin/openfda/pane.tsx +382 -0
- package/src/plugins/builtin/openfda/types.ts +76 -0
- package/src/plugins/builtin/options/footer.ts +1 -0
- package/src/plugins/builtin/options/view.tsx +1 -1
- package/src/plugins/builtin/options-calculator/pane.tsx +0 -1
- package/src/plugins/builtin/options-positioning/index.tsx +4 -2
- package/src/plugins/builtin/options-positioning/pane.tsx +1 -1
- package/src/plugins/builtin/pe-band/client.ts +61 -0
- package/src/plugins/builtin/pe-band/headless.ts +51 -0
- package/src/plugins/builtin/pe-band/index.tsx +20 -0
- package/src/plugins/builtin/pe-band/model.ts +267 -0
- package/src/plugins/builtin/pe-band/pane.tsx +159 -0
- package/src/plugins/builtin/perps/client.ts +66 -0
- package/src/plugins/builtin/perps/equity-row.tsx +28 -0
- package/src/plugins/builtin/perps/headless.ts +34 -0
- package/src/plugins/builtin/perps/index.tsx +14 -0
- package/src/plugins/builtin/perps/model.ts +58 -0
- package/src/plugins/builtin/perps/pane.tsx +185 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +0 -1
- package/src/plugins/builtin/portfolio-list/cli/render.ts +177 -87
- package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +6 -20
- package/src/plugins/builtin/portfolio-list/command-bar.ts +6 -2
- package/src/plugins/builtin/portfolio-list/headless.ts +237 -0
- package/src/plugins/builtin/portfolio-list/index.tsx +2 -0
- package/src/plugins/builtin/portfolio-list/mutations.ts +70 -1
- package/src/plugins/builtin/portfolio-list/pane/data.ts +17 -0
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +88 -5
- package/src/plugins/builtin/portfolio-list/pane/remove-ticker.ts +85 -0
- package/src/plugins/builtin/portfolio-list/pane/streaming.ts +18 -12
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +6 -0
- package/src/plugins/builtin/power/client.ts +100 -0
- package/src/plugins/builtin/power/detail.tsx +82 -0
- package/src/plugins/builtin/power/evidence.ts +56 -0
- package/src/plugins/builtin/power/generation.tsx +37 -0
- package/src/plugins/builtin/power/headless.ts +43 -0
- package/src/plugins/builtin/power/index.tsx +16 -0
- package/src/plugins/builtin/power/model.ts +89 -0
- package/src/plugins/builtin/power/pane.tsx +209 -0
- package/src/plugins/builtin/power/query.ts +25 -0
- package/src/plugins/builtin/relative-rotation/pane.tsx +3 -3
- package/src/plugins/builtin/research/analyst-pane.tsx +1 -1
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +13 -4
- package/src/plugins/builtin/research/equity-diagnostic-pane.tsx +11 -9
- package/src/plugins/builtin/research-search/pane.tsx +21 -7
- package/src/plugins/builtin/revenue-breakdown/pane.tsx +1 -1
- package/src/plugins/builtin/reverse-dcf/client.ts +35 -0
- package/src/plugins/builtin/reverse-dcf/headless.ts +44 -0
- package/src/plugins/builtin/reverse-dcf/index.tsx +20 -0
- package/src/plugins/builtin/reverse-dcf/model.ts +87 -0
- package/src/plugins/builtin/reverse-dcf/pane.tsx +107 -0
- package/src/plugins/builtin/risk-factors/pane.tsx +6 -5
- package/src/plugins/builtin/scanner/denied.tsx +4 -2
- package/src/plugins/builtin/scanner/feed.ts +1 -0
- package/src/plugins/builtin/scanner/flow-pane.tsx +3 -2
- package/src/plugins/builtin/scanner/hilo-pane.tsx +1 -1
- package/src/plugins/builtin/seasonality/client.ts +4 -1
- package/src/plugins/builtin/sec/command-bar-search.ts +217 -0
- package/src/plugins/builtin/sec/forms.ts +54 -0
- package/src/plugins/builtin/sec/headless.ts +31 -5
- package/src/plugins/builtin/sec/index.tsx +67 -11
- package/src/plugins/builtin/sec/model.ts +35 -5
- package/src/plugins/builtin/sectors/headless.ts +1 -0
- package/src/plugins/builtin/sectors/index.tsx +72 -26
- package/src/plugins/builtin/shared/cloud-upgrade.ts +143 -39
- package/src/plugins/builtin/shared/pro-feature-wall.tsx +8 -4
- package/src/plugins/builtin/shared/research-cells.tsx +107 -0
- package/src/plugins/builtin/shared/series-list-detail.tsx +5 -1
- package/src/plugins/builtin/shared/ticker-request.ts +1 -1
- package/src/plugins/builtin/shared/wall-teaser-catalog.ts +80 -0
- package/src/plugins/builtin/shared/wall-teaser.tsx +192 -0
- package/src/plugins/builtin/shared/wall-view-lifecycle.ts +43 -0
- package/src/plugins/builtin/short-interest/index.tsx +31 -0
- package/src/plugins/builtin/short-interest/watch-client.ts +70 -0
- package/src/plugins/builtin/short-interest/watch-headless.ts +49 -0
- package/src/plugins/builtin/short-interest/watch-model.ts +185 -0
- package/src/plugins/builtin/short-interest/watch-pane.tsx +169 -0
- package/src/plugins/builtin/short-volume/pane.tsx +1 -1
- package/src/plugins/builtin/social-mentions/pane.tsx +1 -1
- package/src/plugins/builtin/supply-chain/client.ts +104 -0
- package/src/plugins/builtin/supply-chain/disclosure-quote.tsx +17 -0
- package/src/plugins/builtin/supply-chain/evidence.ts +88 -0
- package/src/plugins/builtin/supply-chain/flow-layout.ts +133 -0
- package/src/plugins/builtin/supply-chain/flow.tsx +323 -0
- package/src/plugins/builtin/supply-chain/graph-client.ts +83 -0
- package/src/plugins/builtin/supply-chain/graph-evidence.ts +25 -0
- package/src/plugins/builtin/supply-chain/graph-model.ts +45 -0
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +218 -0
- package/src/plugins/builtin/supply-chain/graph.tsx +163 -0
- package/src/plugins/builtin/supply-chain/headless.ts +105 -0
- package/src/plugins/builtin/supply-chain/index.tsx +17 -0
- package/src/plugins/builtin/supply-chain/model.ts +145 -0
- package/src/plugins/builtin/supply-chain/pane.tsx +276 -0
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +96 -0
- package/src/plugins/builtin/supply-chain/trust.ts +34 -0
- package/src/plugins/builtin/themes/client.ts +39 -0
- package/src/plugins/builtin/themes/headless.ts +38 -0
- package/src/plugins/builtin/themes/model.ts +92 -0
- package/src/plugins/builtin/themes/pane.tsx +125 -0
- package/src/plugins/builtin/thirteenf/pane.tsx +6 -15
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +5 -6
- package/src/plugins/builtin/ticker-detail/data-panes/returns-model.ts +201 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +327 -0
- package/src/plugins/builtin/ticker-detail/financials/period-end-history.ts +5 -2
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +60 -12
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +2 -1
- package/src/plugins/builtin/ticker-detail/headless.ts +7 -2
- package/src/plugins/builtin/ticker-detail/index.tsx +22 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +53 -30
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +2 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +112 -47
- package/src/plugins/builtin/ticker-detail/pane.tsx +50 -6
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +21 -42
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +3 -0
- package/src/plugins/builtin/time-sales/pane.tsx +1 -1
- package/src/plugins/builtin/world-indices/indices.ts +1 -0
- package/src/plugins/catalog-browser.ts +40 -0
- package/src/plugins/catalog-manifest.ts +3 -0
- package/src/plugins/catalog-ui.ts +6 -0
- package/src/plugins/current-target.ts +0 -9
- package/src/public/__snapshots__/public-api.test.ts.snap +1 -0
- package/src/renderers/browser/cloud-transport.ts +66 -1
- package/src/renderers/browser/main.tsx +2 -0
- package/src/renderers/dom/data-table/row.tsx +2 -0
- package/src/renderers/dom/desktop/controls.tsx +38 -25
- package/src/renderers/dom/desktop/icons.tsx +8 -0
- package/src/renderers/dom/host/chart-surface.tsx +36 -2
- package/src/renderers/dom/host/focus-scope.ts +11 -1
- package/src/renderers/dom/styles.css +28 -0
- package/src/renderers/electrobun/view/backend-rpc.ts +3 -2
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +1 -1
- package/src/renderers/electrobun/view/http-fetch.ts +2 -0
- package/src/renderers/electrobun/view/main.tsx +3 -1
- package/src/renderers/electrobun/view/rpc-timeout.ts +59 -0
- package/src/renderers/opentui/start.tsx +3 -0
- package/src/shares/api.ts +3 -1
- package/src/sources/gloomberb-cloud/index.ts +47 -13
- package/src/sources/history-result.ts +1 -0
- package/src/sources/history-retention.ts +16 -0
- package/src/sources/provider-router/history.ts +4 -2
- package/src/sources/sec-edgar/identity.ts +36 -0
- package/src/sources/sec-edgar.ts +1 -34
- package/src/state/app/context/index.tsx +8 -0
- package/src/sync/core-contributors.ts +20 -2
- package/src/telemetry/attention-counts.ts +164 -0
- package/src/telemetry/live-config.ts +7 -0
- package/src/test-support/rpc-loopback.ts +7 -3
- package/src/test-support/shell-pane-keys.tsx +34 -0
- package/src/tickers/instrument-kind.ts +12 -6
- package/src/tickers/open-target.ts +1 -1
- package/src/tickers/search/asset-classes.ts +91 -0
- package/src/tickers/search/index.ts +62 -15
- package/src/tickers/search/ranking.ts +22 -3
- package/src/tickers/search/upsert.ts +4 -1
- package/src/time-series/live-bars.ts +8 -3
- package/src/time-series/resolve.ts +224 -17
- package/src/time-series/spec.ts +1 -0
- package/src/time-series/types.ts +9 -1
- package/src/types/config.ts +23 -1
- package/src/types/data-provider.ts +2 -0
- package/src/types/headless.ts +17 -0
- package/src/types/price-history.ts +2 -0
- package/src/ui/host.tsx +6 -0
- package/src/utils/double-escape-close.ts +20 -0
- package/src/utils/exchanges.ts +1 -0
- package/src/utils/html-entities.ts +15 -0
- package/src/utils/http-proxy-response.ts +44 -7
- package/src/utils/plugin-proxy-hosts.json +3 -0
- package/src/utils/price-history.ts +35 -1
- package/src/utils/sec.ts +21 -2
- package/src/utils/text-wrap.ts +13 -8
- package/src/utils/zoned-date-time.ts +67 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
2
|
+
import { DataTableView, EmptyState, PaneStatusBody, QueryBar, StatGrid, statGridRows, usePaneFooter, usePaneNoticeFooter,
|
|
3
|
+
usePaneTicker, type DataTableCell, type DataTableColumn, type StatItem } from "../../../components";
|
|
4
|
+
import { usePaneRefreshKey } from "../../../components/data-table/table-pane";
|
|
5
|
+
import { instrumentFromTicker } from "../../../market-data/request-types";
|
|
6
|
+
import { usePaneSettingValue, usePluginPaneState } from "../../../public/react";
|
|
7
|
+
import { useAsyncResource } from "../../../react/async-resource";
|
|
8
|
+
import { useAutoRefresh } from "../../../react/auto-refresh";
|
|
9
|
+
import { useThemeColors } from "../../../theme/theme-context";
|
|
10
|
+
import type { PaneProps } from "../../../types/plugin";
|
|
11
|
+
import { Box } from "../../../ui";
|
|
12
|
+
import { loadMacroDayHistory } from "./client";
|
|
13
|
+
import { projectMacroDays, type MacroDayEvent, type MacroDayModel } from "./model";
|
|
14
|
+
import { MACRO_EVENT_KINDS, MACRO_EVENT_LABELS, type MacroEventKind } from "./releases";
|
|
15
|
+
|
|
16
|
+
export const LOOKBACK_OPTIONS = [{ value: "1", label: "1Y" }, { value: "2", label: "2Y" }, { value: "3", label: "3Y" }, { value: "5", label: "5Y" }];
|
|
17
|
+
const RELEASE_OPTIONS = [{ value: "all", label: "All" }, ...MACRO_EVENT_KINDS.map((kind) => ({ value: kind, label: MACRO_EVENT_LABELS[kind] }))];
|
|
18
|
+
|
|
19
|
+
function pct(value: number | null | undefined, signed = true): string {
|
|
20
|
+
if (value == null) return "--";
|
|
21
|
+
const fixed = (value * 100).toFixed(2);
|
|
22
|
+
return /[1-9]/.test(fixed) ? `${signed && value > 0 ? "+" : ""}${fixed}%` : "0.00%";
|
|
23
|
+
}
|
|
24
|
+
const times = (value: number | null | undefined) => value == null ? "--" : `${value.toFixed(1)}x`;
|
|
25
|
+
|
|
26
|
+
const COLUMNS: DataTableColumn[] = [
|
|
27
|
+
{ id: "date", label: "Date", width: 19, align: "left" },
|
|
28
|
+
{ id: "release", label: "Release", width: 8, align: "left" },
|
|
29
|
+
{ id: "move", label: "Move", width: 9, align: "right" },
|
|
30
|
+
{ id: "multiple", label: "vs Normal", width: 10, align: "right" },
|
|
31
|
+
];
|
|
32
|
+
/** One release selected: every row would repeat its name. */
|
|
33
|
+
const ONE_RELEASE_COLUMNS = COLUMNS.filter((column) => column.id !== "release");
|
|
34
|
+
|
|
35
|
+
function figures(model: MacroDayModel, release: string): StatItem[] {
|
|
36
|
+
const normal: StatItem = { id: "normal", label: "Normal day", value: pct(model.normal.meanAbs, false), detail: "avg |move|" };
|
|
37
|
+
if (release === "all") {
|
|
38
|
+
return [...MACRO_EVENT_KINDS.map((kind): StatItem => {
|
|
39
|
+
const stats = model.byKind[kind];
|
|
40
|
+
return { id: kind, label: `${MACRO_EVENT_LABELS[kind]} day`, value: pct(stats.meanAbs, false),
|
|
41
|
+
detail: stats.count ? `${times(stats.multiple)} normal` : undefined };
|
|
42
|
+
}), normal];
|
|
43
|
+
}
|
|
44
|
+
const stats = model.byKind[release as MacroEventKind];
|
|
45
|
+
const tone = (value: number | null) => value == null ? undefined : value >= 0 ? "positive" as const : "negative" as const;
|
|
46
|
+
return [
|
|
47
|
+
{ id: "abs", label: "Avg |move|", value: pct(stats.meanAbs, false), detail: stats.count ? `${times(stats.multiple)} normal` : undefined },
|
|
48
|
+
{ id: "mean", label: "Avg move", value: pct(stats.mean), tone: tone(stats.mean) },
|
|
49
|
+
{ id: "up", label: "Up", value: stats.hitRate == null ? "--" : `${Math.round(stats.hitRate * 100)}%`,
|
|
50
|
+
detail: stats.count ? `${Math.round(stats.hitRate! * stats.count)} of ${stats.count}` : undefined },
|
|
51
|
+
normal,
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function MacroDayPane({ width, height, focused }: PaneProps) {
|
|
56
|
+
const colors = useThemeColors();
|
|
57
|
+
const { symbol, ticker, error: identityError } = usePaneTicker();
|
|
58
|
+
const [lookback, setLookback] = usePaneSettingValue("lookbackYears", "5");
|
|
59
|
+
const [release, setRelease] = usePluginPaneState("release", "all");
|
|
60
|
+
const [selectedRow, setSelectedRow] = usePluginPaneState<string | null>("selectedRow", null);
|
|
61
|
+
const instrument = instrumentFromTicker(ticker, symbol);
|
|
62
|
+
const instrumentKey = JSON.stringify(instrument);
|
|
63
|
+
const controller = useRef<AbortController | null>(null);
|
|
64
|
+
const loader = useCallback(async (force: boolean) => {
|
|
65
|
+
controller.current?.abort();
|
|
66
|
+
controller.current = new AbortController();
|
|
67
|
+
const snapshot = await loadMacroDayHistory({ instrument: instrument!, forceRefresh: force, signal: controller.current.signal });
|
|
68
|
+
if (!snapshot.history.length && snapshot.error) throw new Error(snapshot.error);
|
|
69
|
+
return snapshot;
|
|
70
|
+
}, [instrumentKey]);
|
|
71
|
+
const history = useAsyncResource(instrument ? loader : null);
|
|
72
|
+
useEffect(() => () => controller.current?.abort(), [loader]);
|
|
73
|
+
useAutoRefresh(history.updatedAt, history.load);
|
|
74
|
+
usePaneRefreshKey(() => { void history.reload(); }, { focused });
|
|
75
|
+
|
|
76
|
+
const model = useMemo(() => history.data ? projectMacroDays(history.data.history, { symbol: symbol ?? "", lookbackYears: Number(lookback) || 5 }) : null,
|
|
77
|
+
[history.data, lookback, symbol]);
|
|
78
|
+
const rows = useMemo(() => model ? model.events.filter((event) => release === "all" || event.kind === release) : [], [model, release]);
|
|
79
|
+
const stats = useMemo(() => model?.events.length ? figures(model, release) : [], [model, release]);
|
|
80
|
+
|
|
81
|
+
usePaneNoticeFooter({ registrationId: "macro-day-notices", focused,
|
|
82
|
+
notices: [...new Set([identityError, history.error, history.data?.error].filter((value): value is string => !!value))] });
|
|
83
|
+
usePaneFooter("macro-day", () => ({ info: [
|
|
84
|
+
...(history.loading ? [{ id: "loading", parts: [{ text: "loading history", tone: "muted" as const }] }] : []),
|
|
85
|
+
...(history.data?.stale ? [{ id: "stale", parts: [{ text: "stale history", tone: "warning" as const }] }] : []),
|
|
86
|
+
...(model?.asOf ? [{ id: "date", parts: [{ text: `daily closes ${model.start} to ${model.asOf}`, tone: "muted" as const }] }] : []),
|
|
87
|
+
] }), [history.loading, history.data?.stale, model?.start, model?.asOf]);
|
|
88
|
+
|
|
89
|
+
const renderCell = useCallback((event: MacroDayEvent, column: DataTableColumn): DataTableCell => {
|
|
90
|
+
if (column.id === "date") return { text: event.session === event.date ? event.date : `${event.date} → ${event.session.slice(5)}`, value: event.date };
|
|
91
|
+
if (column.id === "release") return { text: MACRO_EVENT_LABELS[event.kind] };
|
|
92
|
+
if (column.id === "move") return { text: pct(event.move), value: event.move * 100,
|
|
93
|
+
color: event.move > 0 ? colors.positive : event.move < 0 ? colors.negative : undefined };
|
|
94
|
+
return { text: times(event.multiple), value: event.multiple };
|
|
95
|
+
}, [colors]);
|
|
96
|
+
|
|
97
|
+
const contentHeight = Math.max(4, height - 1 - statGridRows(stats, width));
|
|
98
|
+
const key = (event: MacroDayEvent) => `${event.kind}:${event.date}`;
|
|
99
|
+
|
|
100
|
+
return <Box width={width} height={height} flexDirection="column" overflow="hidden">
|
|
101
|
+
<QueryBar width={width} filters={[
|
|
102
|
+
{ id: "release", label: "Release", value: release, options: RELEASE_OPTIONS, onChange: setRelease, inline: true },
|
|
103
|
+
{ id: "lookback", label: "Lookback", value: String(lookback), options: LOOKBACK_OPTIONS, onChange: setLookback },
|
|
104
|
+
]} />
|
|
105
|
+
{!symbol ? <EmptyState title="Choose a ticker." /> : <PaneStatusBody subject="macro-day moves" loading={history.loading && !model}
|
|
106
|
+
error={!model ? history.error ?? identityError ?? null : null} empty={!!model && !model.events.length}>
|
|
107
|
+
{model ? <>
|
|
108
|
+
<StatGrid items={stats} width={width} />
|
|
109
|
+
<DataTableView<MacroDayEvent> focused={focused} columns={release === "all" ? COLUMNS : ONE_RELEASE_COLUMNS} items={rows} rootWidth={width} rootHeight={contentHeight}
|
|
110
|
+
getItemKey={key} emptyStateTitle="No release days." sortColumnId={null} sortDirection="desc" selectedTextOverridesCellColor
|
|
111
|
+
selection={{ kind: "id", selectedId: selectedRow, getId: key, onChange: (id) => setSelectedRow(id) }}
|
|
112
|
+
getExportMetadata={() => [["symbol", model.symbol], ["from", model.start ?? ""], ["to", model.asOf ?? ""],
|
|
113
|
+
["units", "percent, close to close on the release day"]]}
|
|
114
|
+
renderCell={renderCell} />
|
|
115
|
+
</> : null}
|
|
116
|
+
</PaneStatusBody>}
|
|
117
|
+
</Box>;
|
|
118
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Published US release days, not a rule engine: the dates each release came
|
|
2
|
+
// out, read from the publishers' own archives. A release cancelled or moved (the
|
|
3
|
+
// 2025 shutdown) is as published. Dates are New York calendar days.
|
|
4
|
+
export type MacroEventKind = "cpi" | "jobs" | "fomc";
|
|
5
|
+
|
|
6
|
+
export const MACRO_EVENT_KINDS: readonly MacroEventKind[] = ["cpi", "jobs", "fomc"];
|
|
7
|
+
|
|
8
|
+
export const MACRO_EVENT_LABELS: Record<MacroEventKind, string> = { cpi: "CPI", jobs: "Jobs", fomc: "FOMC" };
|
|
9
|
+
|
|
10
|
+
const RELEASES: Record<MacroEventKind, Record<number, readonly string[]>> = {
|
|
11
|
+
// BLS Consumer Price Index, 8:30 ET.
|
|
12
|
+
cpi: {
|
|
13
|
+
2021: ["01-13", "02-10", "03-10", "04-13", "05-12", "06-10", "07-13", "08-11", "09-14", "10-13", "11-10", "12-10"],
|
|
14
|
+
2022: ["01-12", "02-10", "03-10", "04-12", "05-11", "06-10", "07-13", "08-10", "09-13", "10-13", "11-10", "12-13"],
|
|
15
|
+
2023: ["01-12", "02-14", "03-14", "04-12", "05-10", "06-13", "07-12", "08-10", "09-13", "10-12", "11-14", "12-12"],
|
|
16
|
+
2024: ["01-11", "02-13", "03-12", "04-10", "05-15", "06-12", "07-11", "08-14", "09-11", "10-10", "11-13", "12-11"],
|
|
17
|
+
2025: ["01-15", "02-12", "03-12", "04-10", "05-13", "06-11", "07-15", "08-12", "09-11", "10-24", "12-18"],
|
|
18
|
+
2026: ["01-13", "02-13", "03-11", "04-10", "05-12", "06-10", "07-14", "08-12", "09-11"],
|
|
19
|
+
},
|
|
20
|
+
// BLS Employment Situation (nonfarm payrolls), 8:30 ET.
|
|
21
|
+
jobs: {
|
|
22
|
+
2021: ["01-08", "02-05", "03-05", "04-02", "05-07", "06-04", "07-02", "08-06", "09-03", "10-08", "11-05", "12-03"],
|
|
23
|
+
2022: ["01-07", "02-04", "03-04", "04-01", "05-06", "06-03", "07-08", "08-05", "09-02", "10-07", "11-04", "12-02"],
|
|
24
|
+
2023: ["01-06", "02-03", "03-10", "04-07", "05-05", "06-02", "07-07", "08-04", "09-01", "10-06", "11-03", "12-08"],
|
|
25
|
+
2024: ["01-05", "02-02", "03-08", "04-05", "05-03", "06-07", "07-05", "08-02", "09-06", "10-04", "11-01", "12-06"],
|
|
26
|
+
2025: ["01-10", "02-07", "03-07", "04-04", "05-02", "06-06", "07-03", "08-01", "09-05", "11-20", "12-16"],
|
|
27
|
+
2026: ["01-09", "02-11", "03-06", "04-03", "05-08", "06-05", "07-02", "08-07", "09-04"],
|
|
28
|
+
},
|
|
29
|
+
// FOMC statement days (the meeting's last day), 14:00 ET. The August 2025 notation vote is not a meeting.
|
|
30
|
+
fomc: {
|
|
31
|
+
2021: ["01-27", "03-17", "04-28", "06-16", "07-28", "09-22", "11-03", "12-15"],
|
|
32
|
+
2022: ["01-26", "03-16", "05-04", "06-15", "07-27", "09-21", "11-02", "12-14"],
|
|
33
|
+
2023: ["02-01", "03-22", "05-03", "06-14", "07-26", "09-20", "11-01", "12-13"],
|
|
34
|
+
2024: ["01-31", "03-20", "05-01", "06-12", "07-31", "09-18", "11-07", "12-18"],
|
|
35
|
+
2025: ["01-29", "03-19", "05-07", "06-18", "07-30", "09-17", "10-29", "12-10"],
|
|
36
|
+
2026: ["01-28", "03-18", "04-29", "06-17", "07-29", "09-16"],
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const MACRO_RELEASE_BASIS = {
|
|
41
|
+
checkedAt: "2026-10-04",
|
|
42
|
+
/** The last day the lists are complete for: later sessions are left out, release day or not. */
|
|
43
|
+
coveredThrough: "2026-10-01",
|
|
44
|
+
sources: [
|
|
45
|
+
"https://www.bls.gov/bls/news-release/cpi.htm",
|
|
46
|
+
"https://www.bls.gov/bls/news-release/empsit.htm",
|
|
47
|
+
"https://www.federalreserve.gov/monetarypolicy/fomccalendars.htm",
|
|
48
|
+
],
|
|
49
|
+
} as const;
|
|
50
|
+
|
|
51
|
+
export interface MacroRelease { kind: MacroEventKind; date: string }
|
|
52
|
+
|
|
53
|
+
/** Every published release day, oldest first. */
|
|
54
|
+
export function macroReleases(): MacroRelease[] {
|
|
55
|
+
return MACRO_EVENT_KINDS.flatMap((kind) => Object.entries(RELEASES[kind]).flatMap(([year, days]) =>
|
|
56
|
+
days.map((day) => ({ kind, date: `${year}-${day}` }))))
|
|
57
|
+
.sort((left, right) => left.date.localeCompare(right.date) || left.kind.localeCompare(right.kind));
|
|
58
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { DataTableColumn } from "../../../components";
|
|
2
|
+
import { fitChartTableColumns } from "../../../components/chart-table";
|
|
3
|
+
import { getTableWidth } from "../../../components/ui/table-layout";
|
|
2
4
|
import { colors } from "../../../theme/colors";
|
|
3
5
|
import { compareSortValues, type SortPreference } from "../../../utils/sort-values";
|
|
4
6
|
import { zonedDateTimeParts, zonedWallClockToUtcMs } from "../../../utils/zoned-date-time";
|
|
@@ -172,12 +174,25 @@ export function haltStatusColor(status: HaltStatus): string {
|
|
|
172
174
|
}
|
|
173
175
|
}
|
|
174
176
|
|
|
175
|
-
export type HaltFilter = "all" | "active" | "resumed";
|
|
177
|
+
export type HaltFilter = "all" | "active" | "resumed" | "long-term";
|
|
178
|
+
|
|
179
|
+
const DAY_MS = 86_400_000;
|
|
180
|
+
/** Unresolved halts move out of the recent views at 30 elapsed days. */
|
|
181
|
+
const LONG_TERM_MS = 30 * DAY_MS;
|
|
182
|
+
|
|
183
|
+
export function formatHaltAge(record: HaltRecord, now: number): string {
|
|
184
|
+
const end = record.tradeResumeAt == null ? now : Math.min(now, record.tradeResumeAt);
|
|
185
|
+
const elapsed = Math.max(0, end - record.haltedAt);
|
|
186
|
+
if (elapsed >= DAY_MS) return `${Math.floor(elapsed / DAY_MS)}d`;
|
|
187
|
+
if (elapsed >= 3_600_000) return `${Math.floor(elapsed / 3_600_000)}h`;
|
|
188
|
+
return `${Math.floor(elapsed / 60_000)}m`;
|
|
189
|
+
}
|
|
176
190
|
|
|
177
191
|
export const HALT_FILTERS: ReadonlyArray<{ label: string; value: HaltFilter }> = [
|
|
178
192
|
{ label: "All", value: "all" },
|
|
179
193
|
{ label: "Active", value: "active" },
|
|
180
194
|
{ label: "Resumed", value: "resumed" },
|
|
195
|
+
{ label: "Long-term", value: "long-term" },
|
|
181
196
|
];
|
|
182
197
|
|
|
183
198
|
export function nextHaltFilter(current: HaltFilter): HaltFilter {
|
|
@@ -186,10 +201,12 @@ export function nextHaltFilter(current: HaltFilter): HaltFilter {
|
|
|
186
201
|
}
|
|
187
202
|
|
|
188
203
|
export function filterHalts(records: HaltRecord[], filter: HaltFilter, now: number): HaltRecord[] {
|
|
189
|
-
if (filter === "all") return records;
|
|
190
204
|
return records.filter((record) => {
|
|
191
205
|
const status = resolveHaltStatus(record, now);
|
|
192
|
-
|
|
206
|
+
const longTerm = status !== "resumed" && now - record.haltedAt >= LONG_TERM_MS;
|
|
207
|
+
if (filter === "long-term") return longTerm;
|
|
208
|
+
if (filter === "resumed") return status === "resumed";
|
|
209
|
+
return !longTerm && (filter === "all" || status !== "resumed");
|
|
193
210
|
});
|
|
194
211
|
}
|
|
195
212
|
|
|
@@ -200,6 +217,7 @@ export type HaltColumnId =
|
|
|
200
217
|
| "code"
|
|
201
218
|
| "reason"
|
|
202
219
|
| "date"
|
|
220
|
+
| "age"
|
|
203
221
|
| "halted"
|
|
204
222
|
| "quote"
|
|
205
223
|
| "trade"
|
|
@@ -213,6 +231,7 @@ export const HALT_SORT_COLUMN_IDS: readonly HaltColumnId[] = [
|
|
|
213
231
|
"company",
|
|
214
232
|
"code",
|
|
215
233
|
"reason",
|
|
234
|
+
"age",
|
|
216
235
|
"halted",
|
|
217
236
|
"quote",
|
|
218
237
|
"trade",
|
|
@@ -239,6 +258,7 @@ const HALT_COLUMNS: readonly HaltColumn[] = [
|
|
|
239
258
|
{ id: "code", label: "CODE", width: 6, align: "left" },
|
|
240
259
|
{ id: "reason", label: "REASON", width: REASON_MIN_WIDTH, align: "left", flexGrow: 1 },
|
|
241
260
|
{ id: "date", label: "DATE ET", width: 9, align: "left" },
|
|
261
|
+
{ id: "age", label: "AGE", width: 6, align: "right" },
|
|
242
262
|
{ id: "halted", label: "HALT ET", width: 9, align: "left" },
|
|
243
263
|
{ id: "quote", label: "QUOTE ET", width: 11, align: "left" },
|
|
244
264
|
{ id: "trade", label: "TRADE ET", width: 11, align: "left" },
|
|
@@ -248,24 +268,15 @@ const HALT_COLUMNS: readonly HaltColumn[] = [
|
|
|
248
268
|
/**
|
|
249
269
|
* What a narrow pane gives up first, so STATUS never scrolls out of view. MKT
|
|
250
270
|
* is only the venue, STATUS already reads QUOTE once quoting resumes, and
|
|
251
|
-
* REASON spells out CODE.
|
|
252
|
-
*
|
|
271
|
+
* REASON spells out CODE. Trade resumption and halt time give way only in
|
|
272
|
+
* the narrowest panes; symbol, reason, halt date, age and status always stay.
|
|
253
273
|
*/
|
|
254
|
-
const NARROW_DROP_ORDER: readonly HaltColumnId[] = ["market", "quote", "code", "company"];
|
|
255
|
-
|
|
256
|
-
/** One gap after every column, a pad cell at each edge, and a cell for the scrollbar. */
|
|
257
|
-
function haltTableWidth(columns: readonly HaltColumn[]): number {
|
|
258
|
-
return columns.reduce((total, column) => total + column.width + 1, 3);
|
|
259
|
-
}
|
|
274
|
+
const NARROW_DROP_ORDER: readonly HaltColumnId[] = ["market", "quote", "code", "company", "trade", "halted"];
|
|
260
275
|
|
|
261
276
|
export function buildHaltColumns(width: number): HaltColumn[] {
|
|
262
|
-
|
|
263
|
-
for (const id of NARROW_DROP_ORDER) {
|
|
264
|
-
if (haltTableWidth(columns) <= width) break;
|
|
265
|
-
columns = columns.filter((column) => column.id !== id);
|
|
266
|
-
}
|
|
277
|
+
const columns = fitChartTableColumns(HALT_COLUMNS, width, NARROW_DROP_ORDER);
|
|
267
278
|
// The two text columns share what is left, the company a little under half.
|
|
268
|
-
const spare = Math.max(0, width -
|
|
279
|
+
const spare = Math.max(0, width - 1 - getTableWidth(columns));
|
|
269
280
|
const hasCompany = columns.some((column) => column.id === "company");
|
|
270
281
|
const text = (hasCompany ? COMPANY_MIN_WIDTH : 0) + REASON_MIN_WIDTH + spare;
|
|
271
282
|
const companyWidth = hasCompany ? Math.max(COMPANY_MIN_WIDTH, Math.floor(text * 0.45)) : 0;
|
|
@@ -292,6 +303,8 @@ function haltSortValue(columnId: HaltColumnId, record: HaltRecord, now: number):
|
|
|
292
303
|
case "date":
|
|
293
304
|
case "halted":
|
|
294
305
|
return record.haltedAt;
|
|
306
|
+
case "age":
|
|
307
|
+
return Math.max(0, Math.min(now, record.tradeResumeAt ?? now) - record.haltedAt);
|
|
295
308
|
case "quote":
|
|
296
309
|
return record.quoteResumeAt;
|
|
297
310
|
case "trade":
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
DataTableView,
|
|
4
|
-
PaneStatusBody,
|
|
4
|
+
PaneStatusBody, usePaneTabs, usePaneStatusFooter,
|
|
5
5
|
type DataTableCell,
|
|
6
6
|
type DataTableKeyEvent
|
|
7
7
|
} from "../../../components";
|
|
@@ -14,8 +14,9 @@ import type { PaneProps } from "../../../types/plugin";
|
|
|
14
14
|
import { Box, TextAttributes } from "../../../ui";
|
|
15
15
|
import { isPlainKey } from "../../../utils/keyboard";
|
|
16
16
|
import { cycleSortPreference } from "../../../utils/sort-values";
|
|
17
|
-
import { useConnectionHealth, usePluginTickerActions } from "../../runtime";
|
|
17
|
+
import { useConnectionHealth, usePluginPaneState, usePluginTickerActions } from "../../runtime";
|
|
18
18
|
import { useAutoRefresh } from "../../../react/auto-refresh";
|
|
19
|
+
import { usePaneSettingValue } from "../../../public/react";
|
|
19
20
|
import { acquireMarketHaltsHealth, fetchMarketHalts } from "./client";
|
|
20
21
|
import {
|
|
21
22
|
DEFAULT_HALT_SORT,
|
|
@@ -27,6 +28,7 @@ import {
|
|
|
27
28
|
formatEtDate,
|
|
28
29
|
formatEtResumption,
|
|
29
30
|
formatEtTime,
|
|
31
|
+
formatHaltAge,
|
|
30
32
|
haltStatusColor,
|
|
31
33
|
haltStatusLabel,
|
|
32
34
|
nextHaltFilter,
|
|
@@ -51,7 +53,9 @@ export function MarketHaltsPane({ focused, width, height }: PaneProps) {
|
|
|
51
53
|
const request = useCallback(() => fetchMarketHalts(connectionHealth), [connectionHealth]);
|
|
52
54
|
const { data, status, error, updatedAt: fetchedAt, load } = useAsyncResource(request);
|
|
53
55
|
const records = data ?? EMPTY_RECORDS;
|
|
54
|
-
const [
|
|
56
|
+
const [initialTab] = usePaneSettingValue("initialTab", "all");
|
|
57
|
+
const [filter, setFilter] = usePluginPaneState<HaltFilter>("filter",
|
|
58
|
+
HALT_FILTERS.find(({ value }) => value === initialTab)?.value ?? "all");
|
|
55
59
|
const [selectedId, setSelectedId] = useState<string | null>(null);
|
|
56
60
|
const [sortPreference, setSortPreference] = useState<HaltSortPreference>(DEFAULT_HALT_SORT);
|
|
57
61
|
const [now, setNow] = useState(() => Date.now());
|
|
@@ -78,8 +82,8 @@ export function MarketHaltsPane({ focused, width, height }: PaneProps) {
|
|
|
78
82
|
}, [rows, selectedId]);
|
|
79
83
|
|
|
80
84
|
const refresh = useCallback(() => load(), [load]);
|
|
81
|
-
const selectFilter = useCallback((value: string) => setFilter(value as HaltFilter), []);
|
|
82
|
-
const cycleFilter = useCallback(() => setFilter((current) => nextHaltFilter(current)), []);
|
|
85
|
+
const selectFilter = useCallback((value: string) => setFilter(value as HaltFilter), [setFilter]);
|
|
86
|
+
const cycleFilter = useCallback(() => setFilter((current) => nextHaltFilter(current)), [setFilter]);
|
|
83
87
|
const columns = useMemo(() => buildHaltColumns(width), [width]);
|
|
84
88
|
// A narrow pane drops columns; the sort keys only step through the ones on screen.
|
|
85
89
|
const sortColumnIds = useMemo(
|
|
@@ -120,12 +124,14 @@ export function MarketHaltsPane({ focused, width, height }: PaneProps) {
|
|
|
120
124
|
|
|
121
125
|
// The only partition of this pane: the desktop draws it in the title bar and
|
|
122
126
|
// the body starts with the table instead of spending a row on the strip.
|
|
123
|
-
const
|
|
127
|
+
const { strip: tabs, rows: tabRows } = usePaneTabs({
|
|
124
128
|
tabs: HALT_FILTER_TABS,
|
|
125
129
|
activeValue: filter,
|
|
126
130
|
onSelect: selectFilter,
|
|
127
131
|
focused,
|
|
128
132
|
keyboardNavigation: false,
|
|
133
|
+
compact: true,
|
|
134
|
+
variant: "bare",
|
|
129
135
|
});
|
|
130
136
|
|
|
131
137
|
usePaneStatusFooter({
|
|
@@ -159,6 +165,8 @@ export function MarketHaltsPane({ focused, width, height }: PaneProps) {
|
|
|
159
165
|
return { text: row.reason, color: selectedColor ?? colors.text };
|
|
160
166
|
case "date":
|
|
161
167
|
return { text: formatEtDate(row.haltedAt), color: selectedColor ?? colors.textMuted };
|
|
168
|
+
case "age":
|
|
169
|
+
return { text: formatHaltAge(row, now), color: selectedColor ?? colors.textMuted };
|
|
162
170
|
case "halted":
|
|
163
171
|
return { text: formatEtTime(row.haltedAt), color: selectedColor ?? colors.textMuted };
|
|
164
172
|
case "quote":
|
|
@@ -182,20 +190,6 @@ export function MarketHaltsPane({ focused, width, height }: PaneProps) {
|
|
|
182
190
|
}
|
|
183
191
|
}, [now]);
|
|
184
192
|
|
|
185
|
-
const tabs = tabsInHeader ? null : (
|
|
186
|
-
<Box height={1} flexShrink={0} overflow="hidden">
|
|
187
|
-
<Tabs
|
|
188
|
-
tabs={HALT_FILTER_TABS}
|
|
189
|
-
activeValue={filter}
|
|
190
|
-
onSelect={selectFilter}
|
|
191
|
-
compact
|
|
192
|
-
variant="bare"
|
|
193
|
-
focused={focused}
|
|
194
|
-
keyboardNavigation={false}
|
|
195
|
-
/>
|
|
196
|
-
</Box>
|
|
197
|
-
);
|
|
198
|
-
|
|
199
193
|
if (status === "loading" && records.length === 0) {
|
|
200
194
|
return (
|
|
201
195
|
<Box flexDirection="column" width={width} height={height}>
|
|
@@ -220,7 +214,7 @@ export function MarketHaltsPane({ focused, width, height }: PaneProps) {
|
|
|
220
214
|
<DataTableView<HaltRecord, HaltColumn>
|
|
221
215
|
focused={focused}
|
|
222
216
|
rootWidth={width}
|
|
223
|
-
rootHeight={Math.max(1, height -
|
|
217
|
+
rootHeight={Math.max(1, height - tabRows)}
|
|
224
218
|
selection={{
|
|
225
219
|
kind: "id",
|
|
226
220
|
selectedId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { apiClient } from "../../../api-client";
|
|
2
2
|
import type { MarketHeatmapResult, MarketHeatmapUniverseId } from "../../../api-client/market-discovery";
|
|
3
|
-
export type {
|
|
3
|
+
export type { MarketHeatmapResult, MarketHeatmapUniverseId } from "../../../api-client/market-discovery";
|
|
4
4
|
|
|
5
5
|
export const MARKET_HEATMAP_UNIVERSES = [
|
|
6
6
|
{ id: "us-equity", label: "US Stocks" },
|