gloomberb 0.16.4 → 0.16.5
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 +14 -91
- package/package.json +4 -1
- package/src/{plugins/builtin/cloud → account}/auth-form.tsx +9 -9
- package/src/{plugins/builtin/cloud → account}/auth-model.ts +4 -4
- package/src/account/billing.ts +57 -0
- package/src/{plugins/builtin/cloud → account}/device-signin-dialog.tsx +18 -12
- package/src/{plugins/builtin/cloud → account}/device-signin.ts +2 -2
- package/src/{plugins/builtin/cloud → account}/email-auth-attempt.ts +2 -2
- package/src/account/session.ts +16 -0
- package/src/{plugins/builtin/cloud → account}/upgrade-dialog.tsx +16 -15
- package/src/{plugins/builtin/cloud → account}/upgrade-personalization.ts +7 -7
- package/src/{plugins/builtin/cloud → account}/upgrade-tickers.ts +6 -6
- package/src/{plugins/builtin/cloud → account}/verification-panel.tsx +6 -6
- package/src/api-client/data.ts +24 -2
- package/src/api-client/earnings.ts +6 -0
- package/src/api-client/futures-curve.ts +56 -0
- package/src/api-client/index.ts +4 -1
- package/src/api-client/market-discovery.ts +10 -1
- package/src/api-client/paths.ts +7 -0
- package/src/api-client/research-activity.ts +15 -10
- package/src/api-client/types.ts +17 -1
- package/src/api-client/yield-curves.ts +8 -0
- package/src/app/global-shortcuts.ts +15 -1
- package/src/app/pane-runtime/ticker-open-runtime.ts +7 -3
- package/src/architecture/core-builtin-allowlist.json +4 -13
- package/src/brokers/signed-in/sign-in-dialog.tsx +11 -5
- package/src/capabilities/chart-series.ts +11 -1
- package/src/cli/commands/crypto-hints.ts +7 -0
- package/src/cli/commands/fred-series.ts +61 -0
- package/src/cli/commands/market.ts +407 -104
- package/src/cli/commands/news-hints.ts +62 -0
- package/src/cli/commands/news-search.ts +53 -0
- package/src/cli/commands/options-leaps.ts +5 -2
- package/src/cli/commands/overview.ts +93 -20
- package/src/cli/commands/remote.ts +2 -1
- package/src/cli/commands/search.ts +82 -9
- package/src/cli/commands/system.ts +55 -8
- package/src/cli/commands/ticker.ts +88 -11
- package/src/cli/context.ts +45 -14
- package/src/cli/desktop-pane-shot.ts +59 -7
- package/src/cli/earnings-calendar.ts +71 -0
- package/src/cli/freshness.ts +18 -7
- package/src/cli/glossary.ts +429 -0
- package/src/cli/history-rows.ts +48 -7
- package/src/cli/index-roots.ts +7 -0
- package/src/cli/index.ts +21 -7
- package/src/cli/known-gaps.ts +27 -0
- package/src/cli/listing-arg.ts +417 -56
- package/src/cli/not-a-ticker.ts +12 -5
- package/src/cli/pane-functions/access-gate.ts +5 -0
- package/src/cli/pane-functions/capabilities.ts +3 -2
- package/src/cli/pane-functions/catalog.ts +35 -5
- package/src/cli/pane-functions/data.ts +12 -8
- package/src/cli/pane-functions/discovery.ts +1 -0
- package/src/cli/pane-functions/dom.ts +20 -6
- package/src/cli/pane-functions/freshness.ts +363 -43
- package/src/cli/pane-functions/function-help.ts +12 -5
- package/src/cli/pane-functions/headless.ts +45 -17
- package/src/cli/pane-functions/index.ts +63 -10
- package/src/cli/pane-functions/market-session.ts +22 -8
- package/src/cli/pane-functions/options.ts +63 -22
- package/src/cli/pane-functions/report-notices.ts +25 -7
- package/src/cli/pane-functions/report.ts +15 -8
- package/src/cli/pane-functions/resolver.ts +49 -12
- package/src/cli/pane-functions/screenshot.ts +110 -23
- package/src/cli/report-tables.ts +3 -0
- package/src/cli/result.ts +4 -1
- package/src/cli/staged-tickers.ts +52 -0
- package/src/cli/symbol-args.ts +9 -0
- package/src/cli/symbol-list.ts +172 -0
- package/src/cli/ticker-resolution.ts +223 -30
- package/src/cli/types.ts +5 -0
- package/src/components/chart/composite/axis-overlays.tsx +6 -2
- package/src/components/chart/composite/composite-chart.tsx +40 -6
- package/src/components/chart/composite/legend.tsx +49 -2
- package/src/components/chart/composite/panel-surface.tsx +44 -17
- package/src/components/chart/composite/price-axis-labels.tsx +3 -1
- package/src/components/command-bar/panel/index.tsx +11 -3
- package/src/components/command-bar/panel/runtime.ts +3 -0
- package/src/components/command-bar/panel/types.ts +2 -0
- package/src/components/command-bar/routes/root/provider-search.ts +4 -3
- package/src/components/command-bar/routes/ticker-search/results.ts +12 -11
- package/src/components/command-bar/routes/ticker-search/route.ts +4 -3
- package/src/components/command-bar/workflow/tickers.ts +23 -4
- package/src/components/layout/detached-pane-shell.tsx +9 -0
- package/src/components/layout/floating-pane.tsx +3 -0
- package/src/components/layout/header.tsx +20 -5
- package/src/components/layout/pane/content.tsx +7 -13
- package/src/components/layout/pane/footer/index.tsx +6 -2
- package/src/components/layout/pane/footer/model.ts +35 -1
- package/src/components/layout/pane/header.tsx +24 -1
- package/src/components/layout/pane/index.tsx +12 -2
- package/src/components/layout/pane/sidebar.tsx +78 -10
- package/src/components/layout/shell/active-drag.ts +21 -5
- package/src/components/layout/shell/drag/index.ts +39 -9
- package/src/components/layout/shell/drag/live.ts +61 -51
- package/src/components/layout/shell/drag/runtime.ts +54 -12
- package/src/components/layout/shell/index.tsx +25 -7
- package/src/components/layout/shell/menu.ts +5 -0
- package/src/components/layout/shell/native/pointer-runtime.ts +3 -1
- package/src/components/layout/shell/pane/layers.tsx +192 -45
- package/src/components/layout/shell/terminal-pointer-runtime.ts +24 -0
- package/src/components/markdown-text.tsx +62 -20
- package/src/components/metric-treemap/heat-surface.tsx +10 -1
- package/src/components/onboarding/account-step/form-panel.tsx +1 -1
- package/src/components/onboarding/account-step/index.tsx +1 -1
- package/src/components/onboarding/account-step/qr-panel.tsx +1 -1
- package/src/components/onboarding/account-step/signed-in-panel.tsx +1 -1
- package/src/components/onboarding/onboarding-keyboard.ts +1 -1
- package/src/components/onboarding/onboarding-wizard.tsx +2 -2
- package/src/components/onboarding/use-onboarding-upgrade.ts +3 -3
- package/src/components/onboarding/wizard-account.ts +2 -2
- package/src/components/pane-template-wizard.tsx +9 -1
- package/src/components/price-selector-dialog.tsx +11 -2
- package/src/components/sign-in-gate.tsx +3 -3
- package/src/components/ticker/list-table-view.tsx +24 -1
- package/src/components/ui/action-row.tsx +2 -1
- package/src/components/ui/button.tsx +7 -1
- package/src/components/ui/choice-dialog.tsx +6 -4
- package/src/components/ui/confirm-dialog.tsx +28 -18
- package/src/components/ui/data-table/index.tsx +17 -6
- package/src/components/ui/data-table/opentui/index.tsx +37 -6
- package/src/components/ui/data-table/types.ts +12 -0
- package/src/components/ui/dialog-actions.tsx +64 -0
- package/src/components/ui/display.tsx +17 -3
- package/src/components/ui/frame.tsx +35 -2
- package/src/components/ui/icon.tsx +2 -0
- package/src/components/ui/text-prompt-dialog.tsx +11 -9
- package/src/data/cached-query.ts +2 -0
- package/src/data/config/store/normalize.ts +7 -2
- package/src/data/ticker-repository.ts +5 -0
- package/src/data/ticker-store.ts +15 -0
- package/src/docs/content.ts +215 -0
- package/src/docs/load.ts +139 -0
- package/src/docs/requests.ts +39 -0
- package/src/docs/snapshot.chunk.ts +8 -0
- package/src/docs/snapshot.json +7416 -0
- package/src/docs/topics.ts +216 -0
- package/src/i18n/es.ts +61 -4
- package/src/i18n/ja.ts +61 -4
- package/src/i18n/ko.ts +61 -4
- package/src/i18n/zh-cn.ts +61 -4
- package/src/i18n/zh-tw.ts +61 -4
- package/src/layout/desks.ts +1 -1
- package/src/layout/pane-manager/dock-tree.ts +18 -0
- package/src/layout/pane-manager/index.ts +1 -0
- package/src/market-data/coordinator/chart.ts +10 -4
- package/src/market-data/coordinator/index.ts +6 -3
- package/src/{plugins/builtin/futures/contracts.ts → market-data/futures-board.ts} +81 -28
- package/src/market-data/futures-contract.ts +151 -0
- package/src/market-data/hooks.tsx +10 -2
- package/src/market-data/market/format.ts +39 -21
- package/src/market-data/market/freshness.ts +81 -18
- package/src/market-data/market/status.ts +19 -23
- package/src/market-data/published-apac-sessions.ts +23 -1
- package/src/market-data/quotes/contributions.ts +3 -0
- package/src/market-data/quotes/metadata.ts +7 -24
- package/src/market-data/quotes/resolution.ts +2 -0
- package/src/market-data/quotes/screener-live-quotes.ts +5 -4
- package/src/market-data/result-types.ts +2 -0
- package/src/plugins/builtin/account-management/model.ts +1 -56
- package/src/plugins/builtin/account-management/pane.tsx +6 -4
- package/src/plugins/builtin/account-management/password-dialog.tsx +1 -1
- package/src/plugins/builtin/alerts/cli.ts +313 -47
- package/src/plugins/builtin/alerts/events-pane.tsx +45 -7
- package/src/plugins/builtin/alerts/events.ts +23 -2
- package/src/plugins/builtin/alerts/history-pane.tsx +7 -2
- package/src/plugins/builtin/alerts/history.ts +2 -0
- package/src/plugins/builtin/alerts/index.tsx +41 -9
- package/src/plugins/builtin/alerts/pane.tsx +8 -0
- package/src/plugins/builtin/alerts/research-builder.ts +8 -3
- package/src/plugins/builtin/alerts/research-rules.ts +18 -2
- package/src/plugins/builtin/alerts/scheduled-check.ts +122 -0
- package/src/plugins/builtin/alerts/scheduled-sources.ts +25 -0
- package/src/plugins/builtin/alerts/scheduled.ts +254 -0
- package/src/plugins/builtin/alerts/targets.ts +92 -0
- package/src/plugins/builtin/analytics/index.tsx +4 -2
- package/src/plugins/builtin/analytics/risk-headless.ts +30 -12
- package/src/plugins/builtin/analytics/risk-math.ts +91 -27
- package/src/plugins/builtin/analytics/risk-model.ts +35 -5
- package/src/plugins/builtin/analytics/risk-pane.tsx +15 -8
- package/src/plugins/builtin/attention/index.tsx +2 -0
- package/src/plugins/builtin/attention/pane.tsx +3 -1
- package/src/plugins/builtin/attention/series.ts +26 -0
- package/src/plugins/builtin/awards/index.tsx +2 -0
- package/src/plugins/builtin/awards/pane.tsx +3 -1
- package/src/plugins/builtin/awards/series.ts +29 -0
- package/src/plugins/builtin/bond-calculator/model.ts +2 -1
- package/src/plugins/builtin/catalysts/pane.tsx +3 -1
- package/src/plugins/builtin/cds/client.ts +70 -13
- package/src/plugins/builtin/cds/headless.ts +116 -19
- package/src/plugins/builtin/cds/index.tsx +3 -1
- package/src/plugins/builtin/cds/model.ts +193 -31
- package/src/plugins/builtin/cds/pane.tsx +56 -14
- package/src/plugins/builtin/cds/series.ts +19 -0
- package/src/plugins/builtin/central-bank-rates/index.tsx +2 -0
- package/src/plugins/builtin/central-bank-rates/series.ts +42 -0
- package/src/plugins/builtin/chart-composer/catalog-inventory.ts +192 -255
- package/src/plugins/builtin/chart-composer/data-catalog-pane.tsx +84 -46
- package/src/plugins/builtin/chart-composer/editor.tsx +5 -4
- package/src/plugins/builtin/chart-composer/field-series.ts +40 -0
- package/src/plugins/builtin/chart-composer/headless.ts +8 -3
- package/src/plugins/builtin/chart-composer/index.tsx +9 -2
- package/src/plugins/builtin/chart-composer/series-catalog.ts +58 -50
- package/src/plugins/builtin/chart-composer/series-expression.ts +18 -10
- package/src/plugins/builtin/chart-composer/use-series-catalog.ts +59 -3
- package/src/plugins/builtin/chart-composer/user-series.ts +84 -0
- package/src/plugins/builtin/chat/content/new-dm-dialog.tsx +10 -2
- package/src/plugins/builtin/chat/controller/index.ts +2 -0
- package/src/plugins/builtin/cloud/askg/controller.ts +111 -19
- package/src/plugins/builtin/cloud/askg/executor.ts +57 -3
- package/src/plugins/builtin/cloud/askg/manifest.ts +32 -7
- package/src/plugins/builtin/cloud/askg/model.ts +27 -8
- package/src/plugins/builtin/cloud/askg/protocol.ts +10 -1
- package/src/plugins/builtin/cloud/askg/tool-display.ts +3 -0
- package/src/plugins/builtin/cloud/askg/undo.ts +2 -0
- package/src/plugins/builtin/cloud/auth-actions.tsx +1 -1
- package/src/plugins/builtin/cloud/auth-commands.ts +1 -1
- package/src/plugins/builtin/cloud/auth-dialog.tsx +3 -3
- package/src/plugins/builtin/cloud/company-picker.tsx +1 -1
- package/src/plugins/builtin/cloud/mcp-connect/dialog.tsx +3 -0
- package/src/plugins/builtin/cloud/terminal-relay/engine.ts +77 -9
- package/src/plugins/builtin/cloud/terminal-relay/manifest.ts +6 -1
- package/src/plugins/builtin/cloud/terminal-relay/policy.ts +9 -0
- package/src/plugins/builtin/cloud/terminal-relay/prompts.tsx +35 -11
- package/src/plugins/builtin/cloud/thesis/exposure.ts +1 -1
- package/src/plugins/builtin/cloud/thesis/prompts.tsx +2 -1
- package/src/plugins/builtin/company-attention/app-rank.tsx +1 -1
- package/src/plugins/builtin/company-attention/headless.ts +19 -5
- package/src/plugins/builtin/company-attention/index.tsx +2 -0
- package/src/plugins/builtin/company-attention/model.ts +26 -7
- package/src/plugins/builtin/company-attention/pane.tsx +12 -9
- package/src/plugins/builtin/company-attention/series.ts +52 -0
- package/src/plugins/builtin/company-kpis/pane.tsx +4 -2
- package/src/plugins/builtin/composite-plugins.ts +19 -13
- package/src/plugins/builtin/cot/index.tsx +3 -1
- package/src/plugins/builtin/cot/model.ts +40 -11
- package/src/plugins/builtin/cot/series.ts +27 -0
- package/src/plugins/builtin/credit-boards/index.tsx +2 -0
- package/src/plugins/builtin/credit-boards/series.ts +66 -0
- package/src/plugins/builtin/credit-conditions/index.tsx +2 -0
- package/src/plugins/builtin/credit-conditions/series.ts +26 -0
- package/src/plugins/builtin/credit-documents/headless.ts +31 -1
- package/src/plugins/builtin/credit-documents/pane.tsx +3 -1
- package/src/plugins/builtin/crypto-board/headless.ts +2 -3
- package/src/plugins/builtin/crypto-board/index.tsx +2 -0
- package/src/plugins/builtin/crypto-board/model.ts +12 -0
- package/src/plugins/builtin/crypto-board/pane.tsx +19 -12
- package/src/plugins/builtin/crypto-board/series.ts +48 -0
- package/src/plugins/builtin/custom-view/live-quotes.ts +2 -2
- package/src/plugins/builtin/debt-maturities/index.tsx +2 -0
- package/src/plugins/builtin/debt-maturities/series.ts +45 -0
- package/src/plugins/builtin/dividend-yield/headless.ts +2 -2
- package/src/plugins/builtin/dividend-yield/index.tsx +2 -0
- package/src/plugins/builtin/dividend-yield/series.ts +20 -0
- package/src/plugins/builtin/docs/blocks.tsx +181 -0
- package/src/plugins/builtin/docs/index.tsx +68 -0
- package/src/plugins/builtin/docs/pane.tsx +426 -0
- package/src/plugins/builtin/docs/targets.ts +72 -0
- package/src/plugins/builtin/docs/use-docs.ts +60 -0
- package/src/plugins/builtin/doe/index.tsx +2 -0
- package/src/plugins/builtin/doe/series.ts +62 -0
- package/src/plugins/builtin/earnings/client.ts +3 -2
- package/src/plugins/builtin/earnings/format.ts +1 -5
- package/src/plugins/builtin/earnings/headless.ts +58 -6
- package/src/plugins/builtin/earnings/history-model.ts +15 -1
- package/src/plugins/builtin/earnings/history-table.ts +13 -2
- package/src/plugins/builtin/earnings/history.tsx +7 -3
- package/src/plugins/builtin/econ/fred-catalog.ts +189 -0
- package/src/plugins/builtin/econ/fred-series-map.ts +0 -46
- package/src/plugins/builtin/econ/index.tsx +2 -0
- package/src/plugins/builtin/econ-statistics/defs.ts +5 -0
- package/src/plugins/builtin/econ-statistics/headless.ts +19 -4
- package/src/plugins/builtin/econ-statistics/stats.ts +1 -0
- package/src/plugins/builtin/equity-screener/pane.tsx +4 -11
- package/src/plugins/builtin/exposure/holdings.ts +1 -1
- package/src/plugins/builtin/exposure/pane.tsx +3 -1
- package/src/plugins/builtin/fear-greed/index.tsx +4 -0
- package/src/plugins/builtin/fear-greed/series.ts +52 -0
- package/src/plugins/builtin/futures/index.tsx +43 -3
- package/src/plugins/builtin/futures/model.ts +1 -1
- package/src/plugins/builtin/futures/returns.ts +1 -1
- package/src/plugins/builtin/futures/series.ts +13 -0
- package/src/plugins/builtin/futures/table.tsx +1 -1
- package/src/plugins/builtin/futures/use-front-returns.ts +1 -1
- package/src/plugins/builtin/futures-curve/client.ts +12 -3
- package/src/plugins/builtin/futures-curve/headless.ts +70 -9
- package/src/plugins/builtin/futures-curve/index.tsx +1 -1
- package/src/plugins/builtin/futures-curve/model.ts +66 -11
- package/src/plugins/builtin/futures-curve/pane.tsx +52 -18
- package/src/plugins/builtin/fx-matrix/index.tsx +1 -1
- package/src/plugins/builtin/gpu/board.tsx +13 -10
- package/src/plugins/builtin/gpu/changes.tsx +4 -4
- package/src/plugins/builtin/gpu/client.ts +19 -1
- package/src/plugins/builtin/gpu/equities.tsx +14 -10
- package/src/plugins/builtin/gpu/headless.ts +56 -25
- package/src/plugins/builtin/gpu/history.tsx +3 -3
- package/src/plugins/builtin/gpu/index.tsx +2 -0
- package/src/plugins/builtin/gpu/model.ts +101 -16
- package/src/plugins/builtin/gpu/pane.tsx +28 -12
- package/src/plugins/builtin/gpu/series.ts +38 -0
- package/src/plugins/builtin/help/function-card.tsx +25 -6
- package/src/plugins/builtin/help/index.tsx +17 -8
- package/src/plugins/builtin/holders/beneficial-model.ts +90 -3
- package/src/plugins/builtin/holders/beneficial-report.ts +57 -5
- package/src/plugins/builtin/holders/beneficial-view.tsx +55 -11
- package/src/plugins/builtin/holders/client.ts +22 -3
- package/src/plugins/builtin/holders/format.ts +18 -3
- package/src/plugins/builtin/holders/headless.ts +36 -133
- package/src/plugins/builtin/holders/pane.tsx +11 -4
- package/src/plugins/builtin/holders/report-header.ts +40 -5
- package/src/plugins/builtin/holders/report-rows.ts +240 -0
- package/src/plugins/builtin/insider/client.ts +35 -20
- package/src/plugins/builtin/insider/headless.ts +41 -11
- package/src/plugins/builtin/insider/index.tsx +26 -9
- package/src/plugins/builtin/insider/insider-data.ts +10 -0
- package/src/plugins/builtin/insider/issuer.ts +49 -0
- package/src/plugins/builtin/insider/model.ts +3 -0
- package/src/plugins/builtin/iv-history/client.ts +14 -4
- package/src/plugins/builtin/iv-history/headless.ts +7 -4
- package/src/plugins/builtin/iv-history/index.tsx +2 -0
- package/src/plugins/builtin/iv-history/model.ts +111 -7
- package/src/plugins/builtin/iv-history/screen-pane.tsx +5 -9
- package/src/plugins/builtin/iv-history/series.ts +29 -0
- package/src/plugins/builtin/jobs/headless.ts +28 -3
- package/src/plugins/builtin/jobs/index.tsx +3 -1
- package/src/plugins/builtin/jobs/series.ts +19 -0
- package/src/plugins/builtin/kelly-sizer/pane.tsx +2 -1
- package/src/plugins/builtin/kelly-sizer/portfolio.ts +0 -39
- package/src/plugins/builtin/macro-day/client.ts +44 -3
- package/src/plugins/builtin/macro-day/headless.ts +13 -10
- package/src/plugins/builtin/macro-day/model.ts +56 -10
- package/src/plugins/builtin/macro-day/pane.tsx +30 -20
- package/src/plugins/builtin/market-heatmap/model.ts +19 -11
- package/src/plugins/builtin/market-heatmap/portfolio.ts +2 -2
- package/src/plugins/builtin/market-movers/client.ts +7 -5
- package/src/plugins/builtin/market-movers/index.tsx +3 -2
- package/src/plugins/builtin/market-movers/model.ts +30 -0
- package/src/plugins/builtin/market-movers/screener.ts +31 -0
- package/src/plugins/builtin/market-valuation/chart-series.ts +29 -69
- package/src/plugins/builtin/market-valuation/index.tsx +3 -3
- package/src/plugins/builtin/market-valuation/indicators.ts +0 -5
- package/src/plugins/builtin/members/headless.ts +7 -2
- package/src/plugins/builtin/members/model.ts +31 -3
- package/src/plugins/builtin/members/pane.tsx +3 -6
- package/src/plugins/builtin/mna/headless.ts +15 -3
- package/src/plugins/builtin/money-markets/index.tsx +2 -0
- package/src/plugins/builtin/money-markets/series.ts +41 -0
- package/src/plugins/builtin/notes/cli.ts +12 -7
- package/src/plugins/builtin/options/view.tsx +1 -1
- package/src/plugins/builtin/options-calculator/inputs.ts +2 -1
- package/src/plugins/builtin/options-positioning/client.ts +7 -3
- package/src/plugins/builtin/options-positioning/headless.ts +1 -0
- package/src/plugins/builtin/options-positioning/pane.tsx +2 -2
- package/src/plugins/builtin/options-scenario/client.ts +2 -1
- package/src/plugins/builtin/options-scenario/headless.ts +1 -0
- package/src/plugins/builtin/options-scenario/hedge.ts +2 -1
- package/src/plugins/builtin/perps/client.ts +40 -6
- package/src/plugins/builtin/perps/equity-row.tsx +33 -11
- package/src/plugins/builtin/perps/freshness.ts +66 -0
- package/src/plugins/builtin/perps/headless.ts +45 -30
- package/src/plugins/builtin/perps/index.tsx +18 -1
- package/src/plugins/builtin/perps/model.ts +20 -5
- package/src/plugins/builtin/perps/pane.tsx +76 -20
- package/src/plugins/builtin/perps/series.ts +76 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +67 -61
- package/src/plugins/builtin/plugin-module.ts +3 -0
- package/src/plugins/builtin/portfolio-list/account-metrics.ts +1 -1
- package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +273 -0
- package/src/plugins/builtin/portfolio-list/cli/import-13f.ts +109 -0
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +331 -65
- package/src/plugins/builtin/portfolio-list/cli/render.ts +200 -31
- package/src/plugins/builtin/portfolio-list/cli/shared.ts +24 -0
- package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +120 -47
- package/src/plugins/builtin/portfolio-list/column-values.ts +1 -1
- package/src/plugins/builtin/portfolio-list/grid.tsx +1 -1
- package/src/plugins/builtin/portfolio-list/headless.ts +34 -4
- package/src/plugins/builtin/portfolio-list/imported-from.ts +8 -0
- package/src/plugins/builtin/portfolio-list/live-valuation.ts +6 -2
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +6 -1
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +17 -1
- package/src/plugins/builtin/portfolio-list/summary/totals.ts +1 -1
- package/src/plugins/builtin/portfolio-list/table.tsx +7 -1
- package/src/plugins/builtin/power/client.ts +16 -0
- package/src/plugins/builtin/power/evidence.ts +6 -2
- package/src/plugins/builtin/power/headless.ts +71 -7
- package/src/plugins/builtin/power/index.tsx +4 -1
- package/src/plugins/builtin/power/model.ts +72 -1
- package/src/plugins/builtin/power/pane.tsx +32 -9
- package/src/plugins/builtin/rate-path/headless.ts +11 -3
- package/src/plugins/builtin/realized-vol/headless.ts +5 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +5 -2
- package/src/plugins/builtin/research/event-model.ts +68 -24
- package/src/plugins/builtin/research/events-headless.ts +2 -1
- package/src/plugins/builtin/research/headless.ts +2 -1
- package/src/plugins/builtin/seasonality/client.ts +15 -7
- package/src/plugins/builtin/seasonality/headless.ts +36 -12
- package/src/plugins/builtin/seasonality/index.tsx +2 -2
- package/src/plugins/builtin/seasonality/model.ts +119 -0
- package/src/plugins/builtin/seasonality/pane.tsx +108 -37
- package/src/plugins/builtin/series-inventory.ts +91 -0
- package/src/plugins/builtin/shared/cloud-upgrade.ts +1 -1
- package/src/plugins/builtin/shared/command-tab.ts +30 -12
- package/src/plugins/builtin/shared/earnings-report.ts +55 -0
- package/src/plugins/builtin/shared/fred-points.ts +20 -0
- package/src/plugins/builtin/shared/fx-rate-freshness.ts +101 -0
- package/src/plugins/builtin/shared/open-description.ts +29 -0
- package/src/plugins/builtin/shared/report-freshness.ts +9 -0
- package/src/plugins/builtin/shared/series-warning.ts +5 -0
- package/src/plugins/builtin/short-interest/headless.ts +1 -0
- package/src/plugins/builtin/short-interest/index.tsx +2 -0
- package/src/plugins/builtin/short-interest/series.ts +36 -0
- package/src/plugins/builtin/short-interest/watch-headless.ts +1 -0
- package/src/plugins/builtin/short-interest/watch-model.ts +9 -5
- package/src/plugins/builtin/short-volume/headless.ts +1 -0
- package/src/plugins/builtin/short-volume/index.tsx +2 -0
- package/src/plugins/builtin/short-volume/series.ts +23 -0
- package/src/plugins/builtin/social-mentions/index.tsx +2 -0
- package/src/plugins/builtin/social-mentions/series.ts +23 -0
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +3 -2
- package/src/plugins/builtin/supply-chain/pane.tsx +3 -1
- package/src/plugins/builtin/thirteenf/api.ts +1 -0
- package/src/plugins/builtin/thirteenf/data.ts +6 -4
- package/src/plugins/builtin/thirteenf/headless.ts +217 -36
- package/src/plugins/builtin/thirteenf/model.ts +39 -1
- package/src/plugins/builtin/thirteenf/overlap.ts +75 -0
- package/src/plugins/builtin/thirteenf/pane.tsx +10 -1
- package/src/plugins/builtin/thirteenf/report-notes.ts +103 -1
- package/src/plugins/builtin/thirteenf/types.ts +2 -0
- package/src/plugins/builtin/ticker-detail/index.tsx +3 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +1 -1
- package/src/plugins/builtin/ticker-detail/overview/futures-contract.ts +31 -0
- package/src/plugins/builtin/ticker-detail/overview/model.ts +3 -3
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +2 -1
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +48 -4
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +13 -3
- package/src/plugins/builtin/time-sales/headless.ts +1 -0
- package/src/plugins/builtin/treasury-auctions/headless.ts +16 -2
- package/src/plugins/builtin/treasury-auctions/index.tsx +1 -0
- package/src/plugins/builtin/treasury-auctions/model.ts +8 -0
- package/src/plugins/builtin/vol-surface/headless.ts +1 -0
- package/src/plugins/builtin/volatility/index.tsx +2 -0
- package/src/plugins/builtin/volatility/series.ts +84 -0
- package/src/plugins/builtin/world-venue-map/geo-series.ts +26 -1
- package/src/plugins/builtin/world-venue-map/headless.ts +4 -1
- package/src/plugins/builtin/world-venue-map/index.ts +2 -1
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +8 -4
- package/src/plugins/builtin/world-venue-map/layers.ts +29 -0
- package/src/plugins/builtin/yield-curve/chart.ts +2 -2
- package/src/plugins/builtin/yield-curve/curves.ts +21 -8
- package/src/plugins/builtin/yield-curve/headless.ts +71 -18
- package/src/plugins/builtin/yield-curve/index.tsx +3 -1
- package/src/plugins/builtin/yield-curve/series.ts +86 -0
- package/src/plugins/catalog-browser.ts +2 -1
- package/src/plugins/registry/index.ts +89 -4
- package/src/{plugins/builtin/portfolio-list → portfolio}/position-metrics.ts +6 -6
- package/src/portfolio/position-value.ts +40 -0
- package/src/public/__snapshots__/public-api.test.ts.snap +7 -0
- package/src/public/time-series.ts +17 -0
- package/src/react/auto-refresh.ts +13 -3
- package/src/remote/app-host.tsx +20 -4
- package/src/remote/confirm-change.tsx +85 -0
- package/src/remote/controller-utils.ts +8 -1
- package/src/remote/controller.ts +123 -6
- package/src/remote/pane-screenshot.ts +47 -0
- package/src/remote/schema.ts +62 -0
- package/src/remote/types.ts +30 -0
- package/src/remote/watchlist.ts +306 -0
- package/src/renderers/browser/main.tsx +3 -2
- package/src/renderers/cloudflare/worker.ts +1 -1
- package/src/renderers/dom/data-table/frozen-column.ts +3 -1
- package/src/renderers/dom/data-table/index.tsx +33 -6
- package/src/renderers/dom/data-table/row.tsx +27 -1
- package/src/renderers/dom/desktop/control-styles.ts +63 -1
- package/src/renderers/dom/desktop/controls.tsx +30 -23
- package/src/renderers/dom/desktop/dialog-actions.tsx +170 -0
- package/src/renderers/dom/desktop/icons.tsx +7 -0
- package/src/renderers/dom/dom-ui-host.tsx +3 -0
- package/src/renderers/dom/host/box.tsx +3 -0
- package/src/renderers/dom/host/chart-surface.tsx +6 -2
- package/src/renderers/dom/host/live-frame.ts +6 -2
- package/src/renderers/dom/host/overflow-fade.ts +14 -1
- package/src/renderers/dom/host/size-observer.ts +26 -0
- package/src/renderers/dom/host/surface-3d.tsx +7 -2
- package/src/renderers/dom/host/text.tsx +1 -1
- package/src/renderers/dom/styles.css +61 -0
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +17 -2
- package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +19 -11
- package/src/renderers/electrobun/view/cli-pane-shot-health.ts +10 -26
- package/src/renderers/electrobun/view/main.tsx +2 -0
- package/src/series/capability.ts +75 -0
- package/src/series/csv.ts +160 -0
- package/src/series/files.ts +107 -0
- package/src/series/registry.ts +198 -0
- package/src/series/resolve.ts +107 -0
- package/src/series/standalone.ts +48 -0
- package/src/series/types.ts +145 -0
- package/src/series/validate.ts +171 -0
- package/src/sources/gloomberb-cloud/index.ts +7 -7
- package/src/sources/gloomberb-cloud/normalizers.ts +1 -0
- package/src/sources/history-result.ts +1 -0
- package/src/sources/listing-symbols.ts +4 -1
- package/src/sources/provider-router/batches.ts +4 -1
- package/src/sources/provider-router/cache.ts +4 -2
- package/src/sources/provider-router/cached-routes.ts +1 -1
- package/src/sources/provider-router/financial-routes.ts +1 -0
- package/src/sources/provider-router/financials.ts +13 -0
- package/src/sources/provider-router/history.ts +43 -25
- package/src/sources/provider-router/search.ts +1 -0
- package/src/sync/core-contributors.ts +1 -0
- package/src/tickers/company-name.ts +75 -0
- package/src/tickers/instrument-kind.ts +25 -0
- package/src/tickers/open-target.ts +3 -2
- package/src/tickers/search/index.ts +45 -7
- package/src/tickers/search/ranking.ts +33 -17
- package/src/tickers/search/types.ts +7 -1
- package/src/tickers/us-listing.ts +34 -0
- package/src/time-series/hooks.ts +9 -0
- package/src/time-series/resolve.ts +95 -16
- package/src/time-series/types.ts +4 -2
- package/src/time-series/use-chart-resolution.ts +32 -0
- package/src/types/config.ts +6 -0
- package/src/types/data-provider.ts +5 -0
- package/src/types/financials.ts +52 -1
- package/src/types/headless.ts +61 -0
- package/src/types/plugin.ts +19 -0
- package/src/types/price-history.ts +7 -0
- package/src/types/ticker.ts +14 -0
- package/src/ui/host.tsx +18 -0
- package/src/ui/live-resize.ts +81 -0
- package/src/ui/live-stretch.ts +121 -0
- package/src/ui/measured-cells.ts +58 -0
- package/src/ui/pane-fill.ts +11 -0
- package/src/utils/basis-points.ts +17 -0
- package/src/utils/cli-output.ts +7 -1
- package/src/utils/concurrency.ts +25 -0
- package/src/utils/crypto-pair.ts +20 -0
- package/src/utils/currency-pair.ts +19 -0
- package/src/utils/decimal-comma.ts +19 -0
- package/src/utils/dom-screenshot-css.ts +265 -0
- package/src/utils/dom-screenshot-rasters.ts +276 -0
- package/src/utils/dom-screenshot.ts +437 -52
- package/src/utils/exchange-rate-snapshot.ts +6 -2
- package/src/utils/exchanges.ts +107 -1
- package/src/utils/format.ts +16 -3
- package/src/utils/fundamentals.ts +66 -0
- package/src/utils/futures-generic.ts +6 -12
- package/src/utils/fx-market-hours.ts +15 -5
- package/src/utils/price-history.ts +99 -42
- package/src/utils/sec-eps-basis.ts +24 -11
- package/src/utils/sec.ts +61 -7
- package/src/utils/utc-time.ts +51 -4
- package/src/plugins/builtin/fx-matrix/freshness.ts +0 -65
- /package/src/{plugins/builtin/cloud → tickers}/starter-symbols.ts +0 -0
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
/** What one contract of a root is, from the exchange's rulebook. */
|
|
2
|
+
export interface FuturesContractSpec {
|
|
3
|
+
/** What a quoted price counts: "USD / troy oz", "US cents / bushel", "index points". */
|
|
4
|
+
unit: string
|
|
5
|
+
/** One contract as the exchange words it: "100 troy oz", "$50 x index". */
|
|
6
|
+
size: string
|
|
7
|
+
/** US dollars a move of 1.0 in the quoted price makes on one contract. */
|
|
8
|
+
pointValue: number
|
|
9
|
+
/** The smallest outright price move, in the quoted unit. */
|
|
10
|
+
tick: number
|
|
11
|
+
/** US dollars one tick makes on one contract. */
|
|
12
|
+
tickValue: number
|
|
13
|
+
settlement: "physical" | "cash"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** What a futures symbol trades: the contract behind it, its terms and its latest confirmed settlement. */
|
|
17
|
+
export interface FuturesContractTermsPayload {
|
|
18
|
+
/** The symbol asked for: GC=F, GCZ26 or CL1. */
|
|
19
|
+
symbol: string
|
|
20
|
+
root: string
|
|
21
|
+
name: string
|
|
22
|
+
/** The listed contract the symbol prices today (GCZ26 for GC=F); null where it cannot be placed. */
|
|
23
|
+
contract: string | null
|
|
24
|
+
contractSymbol: string | null
|
|
25
|
+
deliveryMonth: string | null
|
|
26
|
+
spec: FuturesContractSpec | null
|
|
27
|
+
lastTrade: string | null
|
|
28
|
+
firstNotice: string | null
|
|
29
|
+
/** Past first notice: a long can be assigned delivery. */
|
|
30
|
+
inDelivery: boolean
|
|
31
|
+
/** The newest exchange settlement confirmed for the contract, with its session. */
|
|
32
|
+
settlement: { price: number; date: string } | null
|
|
33
|
+
}
|
|
34
|
+
|
|
1
35
|
/** Gloom Cloud futures prices retain provider denomination and explicit quote units. */
|
|
2
36
|
export interface FuturesContract {
|
|
3
37
|
symbol: string
|
|
@@ -17,6 +51,18 @@ export interface FuturesContract {
|
|
|
17
51
|
samples: number
|
|
18
52
|
historyStart: string | null
|
|
19
53
|
historyEnd: string | null
|
|
54
|
+
/**
|
|
55
|
+
* The exchange settlement for the curve's settlementDate; null when none is
|
|
56
|
+
* confirmed for that session. `price` is the latest trade, never a settlement,
|
|
57
|
+
* except on a Cboe curve, whose prices are settlements.
|
|
58
|
+
*/
|
|
59
|
+
settlement?: number | null
|
|
60
|
+
/** The last trading day. */
|
|
61
|
+
lastTrade?: string | null
|
|
62
|
+
/** First notice day of a physically delivered contract; null where there is none. */
|
|
63
|
+
firstNotice?: string | null
|
|
64
|
+
/** Past first notice: a long can be assigned delivery. */
|
|
65
|
+
inDelivery?: boolean
|
|
20
66
|
}
|
|
21
67
|
|
|
22
68
|
export interface FuturesCurvePayload {
|
|
@@ -51,6 +97,10 @@ export interface FuturesCurvePayload {
|
|
|
51
97
|
state: "contango" | "backwardation" | "flat" | "unavailable"
|
|
52
98
|
}
|
|
53
99
|
gaps: string[]
|
|
100
|
+
/** The session the contracts' settlements are for; null when none is confirmed. */
|
|
101
|
+
settlementDate?: string | null
|
|
102
|
+
/** The root's contract terms; null where they are not listed. */
|
|
103
|
+
spec?: FuturesContractSpec | null
|
|
54
104
|
}
|
|
55
105
|
|
|
56
106
|
|
|
@@ -78,6 +128,12 @@ export interface FuturesCurveAsOfPayload {
|
|
|
78
128
|
/** When the price was made; older than tradeDate when the contract did not trade that day. */
|
|
79
129
|
asOf: string
|
|
80
130
|
stale: boolean
|
|
131
|
+
/** The price is the exchange settlement for tradeDate; otherwise that session's last trade or, when stale, an earlier price. */
|
|
132
|
+
settled?: boolean
|
|
133
|
+
lastTrade?: string | null
|
|
134
|
+
firstNotice?: string | null
|
|
135
|
+
inDelivery?: boolean
|
|
81
136
|
}>
|
|
82
137
|
gaps: string[]
|
|
138
|
+
spec?: FuturesContractSpec | null
|
|
83
139
|
}
|
package/src/api-client/index.ts
CHANGED
|
@@ -59,7 +59,7 @@ export type {
|
|
|
59
59
|
/** Server-side caps for `/assist/command`; enforced here so a 422 is never sent. */
|
|
60
60
|
const ASSIST_QUERY_MAX_LENGTH = 200;
|
|
61
61
|
const ASSIST_COMMAND_LIMIT = 150;
|
|
62
|
-
const ASSIST_ARG_OPTION_LIMIT =
|
|
62
|
+
const ASSIST_ARG_OPTION_LIMIT = 64;
|
|
63
63
|
const ASSIST_ARG_OPTION_VALUE_MAX_LENGTH = 40;
|
|
64
64
|
const ASSIST_ARG_OPTION_LABEL_MAX_LENGTH = 60;
|
|
65
65
|
const ASSIST_REQUEST_TIMEOUT_MS = 6_000;
|
|
@@ -775,6 +775,7 @@ class GloomApiClient {
|
|
|
775
775
|
getCloudSocialMentionPosts = this.data.getCloudSocialMentionPosts.bind(this.data);
|
|
776
776
|
getCloudFuturesCurve = this.data.getCloudFuturesCurve.bind(this.data);
|
|
777
777
|
getCloudFuturesCurveAsOf = this.data.getCloudFuturesCurveAsOf.bind(this.data);
|
|
778
|
+
getCloudFuturesContract = this.data.getCloudFuturesContract.bind(this.data);
|
|
778
779
|
getCloudRatePath = this.data.getCloudRatePath.bind(this.data);
|
|
779
780
|
getCloudShiller = this.data.getCloudShiller.bind(this.data);
|
|
780
781
|
getCloudCotBoard = this.data.getCloudCotBoard.bind(this.data);
|
|
@@ -815,6 +816,7 @@ class GloomApiClient {
|
|
|
815
816
|
getCloudTape = this.data.getCloudTape.bind(this.data);
|
|
816
817
|
getCloudYieldCurve = this.data.getCloudYieldCurve.bind(this.data);
|
|
817
818
|
getCloudCurve = this.data.getCloudCurve.bind(this.data);
|
|
819
|
+
getCloudCurveHistory = this.data.getCloudCurveHistory.bind(this.data);
|
|
818
820
|
getCloudWorldCurves = this.data.getCloudWorldCurves.bind(this.data);
|
|
819
821
|
getCloudCds = this.data.getCloudCds.bind(this.data);
|
|
820
822
|
getCloudCdsHistory = this.data.getCloudCdsHistory.bind(this.data);
|
|
@@ -843,6 +845,7 @@ class GloomApiClient {
|
|
|
843
845
|
updateCloudSavedSearch = this.data.updateCloudSavedSearch.bind(this.data);
|
|
844
846
|
deleteCloudSavedSearch = this.data.deleteCloudSavedSearch.bind(this.data);
|
|
845
847
|
getCloudNews = this.data.getCloudNews.bind(this.data);
|
|
848
|
+
searchCloudNews = this.data.searchCloudNews.bind(this.data);
|
|
846
849
|
getCloudNewsStory = this.data.getCloudNewsStory.bind(this.data);
|
|
847
850
|
getCloudTickerTweets = this.data.getCloudTickerTweets.bind(this.data);
|
|
848
851
|
searchCloudTweets = this.data.searchCloudTweets.bind(this.data);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CloudCorporateActionsPayload, CloudQuotePayload } from "./types";
|
|
1
|
+
import type { CloudCorporateActionsPayload, CloudMoverSessionFields, CloudQuotePayload } from "./types";
|
|
2
2
|
|
|
3
3
|
export interface ScreenerQuote {
|
|
4
4
|
symbol: string;
|
|
@@ -19,6 +19,8 @@ export interface ScreenerQuote {
|
|
|
19
19
|
lastUpdated?: number;
|
|
20
20
|
/** Session-fixed, so the price column reads its decimals from it rather than from each tick. */
|
|
21
21
|
previousClose?: number;
|
|
22
|
+
/** The quote's sessions beside the live print the list ranks by, when the server sends them. */
|
|
23
|
+
sessions?: CloudMoverSessionFields;
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
|
|
@@ -63,6 +65,13 @@ export interface MarketHeatmapResult {
|
|
|
63
65
|
session?: "REGULAR" | "PRE" | "POST" | "CLOSED" | null;
|
|
64
66
|
/** The completed regular session every stored tile describes outside the regular session, as a New York date; null while it trades. */
|
|
65
67
|
regularSessionDate?: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* When that session closed, in epoch milliseconds: its real close from the
|
|
70
|
+
* exchange calendar, so an early close reads 13:00 New York. Null while a
|
|
71
|
+
* session trades and when the snapshot names no session; an older server
|
|
72
|
+
* leaves it out.
|
|
73
|
+
*/
|
|
74
|
+
regularSessionClosedAt?: number | null;
|
|
66
75
|
assets: MarketHeatmapAsset[];
|
|
67
76
|
}
|
|
68
77
|
|
package/src/api-client/paths.ts
CHANGED
|
@@ -576,6 +576,13 @@ export function cloudNewsPath(params: CloudNewsParams = {}): string {
|
|
|
576
576
|
return appendQuery("/news", search);
|
|
577
577
|
}
|
|
578
578
|
|
|
579
|
+
/** Stories whose headline, summary or publisher matches the text, best match first; the service takes at most 100. */
|
|
580
|
+
export function cloudNewsSearchPath(query: string, limit?: number): string {
|
|
581
|
+
const search = new URLSearchParams({ query });
|
|
582
|
+
if (limit != null) search.set("limit", String(limit));
|
|
583
|
+
return appendQuery("/news/search", search);
|
|
584
|
+
}
|
|
585
|
+
|
|
579
586
|
export function cloudTickerTweetsPath(params: CloudTickerTweetsParams): string {
|
|
580
587
|
const search = new URLSearchParams({ ticker: params.ticker });
|
|
581
588
|
if (params.limit != null) search.set("limit", String(params.limit));
|
|
@@ -6,6 +6,9 @@ import { createWallExperimentSession, type WallExperiment, type WallExperimentCo
|
|
|
6
6
|
import { createUpgradeExperimentSession, UPGRADE_PERSONALIZED, type UpgradeExperimentContext, type UpgradePersonalizedVariant } from "./upgrade-experiment";
|
|
7
7
|
import { hasProAccess } from "./plan-rules";
|
|
8
8
|
import { withDeadline } from "../utils/async-deadline";
|
|
9
|
+
import { browserDoNotTrack } from "../telemetry/crash-reports-dom";
|
|
10
|
+
import { currentTelemetryConfig } from "../telemetry/live-config";
|
|
11
|
+
import { usageTelemetryAllowed } from "../telemetry/usage-counts";
|
|
9
12
|
|
|
10
13
|
export type ResearchActivity =
|
|
11
14
|
| "workspace_opened"
|
|
@@ -234,12 +237,7 @@ function stripHandoffParams(url: URL): void {
|
|
|
234
237
|
/** Hosted web analytics only. Native local use never creates an identifier. */
|
|
235
238
|
export function initializeBrowserResearchActivity(): void {
|
|
236
239
|
try {
|
|
237
|
-
if (
|
|
238
|
-
navigator.doNotTrack === "1" ||
|
|
239
|
-
(navigator as Navigator & { globalPrivacyControl?: boolean })
|
|
240
|
-
.globalPrivacyControl
|
|
241
|
-
)
|
|
242
|
-
return;
|
|
240
|
+
if (!researchTelemetryAllowed()) return;
|
|
243
241
|
const url = new URL(location.href);
|
|
244
242
|
const incoming = readHandoffId(url);
|
|
245
243
|
const stored = localStorage.getItem(ANONYMOUS_ID_STORAGE_KEY);
|
|
@@ -269,6 +267,7 @@ export function initializeBrowserResearchActivity(): void {
|
|
|
269
267
|
*/
|
|
270
268
|
export function initializeDesktopResearchActivity(storage: StorageLike = localStorage): void {
|
|
271
269
|
try {
|
|
270
|
+
if (!researchTelemetryAllowed()) return;
|
|
272
271
|
const stored = storage.getItem(ANONYMOUS_ID_STORAGE_KEY);
|
|
273
272
|
anonymousId = stored && ANONYMOUS_ID.test(stored) ? stored : undefined;
|
|
274
273
|
attribution = readStoredAttribution(storage.getItem(ATTRIBUTION_STORAGE_KEY));
|
|
@@ -278,6 +277,7 @@ export function initializeDesktopResearchActivity(storage: StorageLike = localSt
|
|
|
278
277
|
}
|
|
279
278
|
|
|
280
279
|
export function adoptDesktopHandoff(href: string, storage: StorageLike = localStorage, now = Date.now()): boolean {
|
|
280
|
+
if (!researchTelemetryAllowed()) return false;
|
|
281
281
|
if (!carriesHandoff(href)) return false;
|
|
282
282
|
try {
|
|
283
283
|
const url = new URL(href);
|
|
@@ -369,6 +369,7 @@ export function recordResearchActivity(
|
|
|
369
369
|
tab?: string,
|
|
370
370
|
{ desks, placement: rawPlacement, teaser_kind, cta }: ResearchActivityDetails = {},
|
|
371
371
|
): void {
|
|
372
|
+
if (!researchTelemetryAllowed()) return;
|
|
372
373
|
const target = getCurrentPluginTarget();
|
|
373
374
|
const user = apiClient.getCurrentUser();
|
|
374
375
|
const wallEvent = event === "wall_viewed" || event === "wall_cta_clicked";
|
|
@@ -451,6 +452,7 @@ function webExperimentAttribution(): { experiments?: string } {
|
|
|
451
452
|
* Privacy Control) and not driven by automation are asked. See web-experiments.ts.
|
|
452
453
|
*/
|
|
453
454
|
export function exposeWebExperiment(experiment: string): Promise<string | null> {
|
|
455
|
+
if (!researchTelemetryAllowed()) return Promise.resolve(null);
|
|
454
456
|
if (getCurrentPluginTarget() !== "web") return Promise.resolve(null);
|
|
455
457
|
try {
|
|
456
458
|
return exposeExperiment(experiment, {
|
|
@@ -473,11 +475,13 @@ export function exposeWebExperiment(experiment: string): Promise<string | null>
|
|
|
473
475
|
}
|
|
474
476
|
}
|
|
475
477
|
|
|
478
|
+
/** Research milestones, attribution and exposures share the Usage off switch. */
|
|
479
|
+
function researchTelemetryAllowed(): boolean {
|
|
480
|
+
return usageTelemetryAllowed(currentTelemetryConfig(undefined)) && !browserDoNotTrack();
|
|
481
|
+
}
|
|
482
|
+
|
|
476
483
|
function wallPrivacyBlocked(): boolean {
|
|
477
|
-
|
|
478
|
-
return navigator.doNotTrack === "1"
|
|
479
|
-
|| (navigator as Navigator & { globalPrivacyControl?: boolean }).globalPrivacyControl === true
|
|
480
|
-
|| navigator.webdriver === true;
|
|
484
|
+
return !researchTelemetryAllowed() || (typeof navigator !== "undefined" && navigator.webdriver === true);
|
|
481
485
|
}
|
|
482
486
|
|
|
483
487
|
function wallExperimentContext(): WallExperimentContext {
|
|
@@ -568,6 +572,7 @@ export function recordWallCtaClicked(placement: string, cta: "login" | "signup")
|
|
|
568
572
|
export function researchUpgradeUrl(returnTo?: string): string {
|
|
569
573
|
const url = new URL("https://gloom.sh/cloud?upgrade=pro");
|
|
570
574
|
if (returnTo) url.searchParams.set("returnTo", returnTo);
|
|
575
|
+
if (!researchTelemetryAllowed()) return url.href;
|
|
571
576
|
if (anonymousId) url.searchParams.set(HANDOFF_ID_KEY, anonymousId);
|
|
572
577
|
for (const [key, value] of Object.entries(attribution)) {
|
|
573
578
|
if (/^(utm_(source|medium|campaign|content|term)|twclid)$/.test(key))
|
package/src/api-client/types.ts
CHANGED
|
@@ -1383,6 +1383,8 @@ export interface CloudMarketResponse<T> {
|
|
|
1383
1383
|
historySession?: unknown;
|
|
1384
1384
|
/** "extended" when the history includes the pre-market and after-hours bars asked for. */
|
|
1385
1385
|
session?: unknown;
|
|
1386
|
+
/** "1day" when daily bars answer an intraday range: the listing has no intraday bars. */
|
|
1387
|
+
servedResolution?: unknown;
|
|
1386
1388
|
/** Untrusted until the history adapter validates its boundary dates. */
|
|
1387
1389
|
coverage?: CloudHistoryCoverage;
|
|
1388
1390
|
providerMeta?: {
|
|
@@ -1427,13 +1429,27 @@ export interface CloudMarketBatchPayload<T> {
|
|
|
1427
1429
|
|
|
1428
1430
|
export type CloudMarketScreenerCategory = "gainers" | "losers" | "most-active";
|
|
1429
1431
|
|
|
1430
|
-
|
|
1432
|
+
/**
|
|
1433
|
+
* A movers row's quote sessions, under the quote's field names and meaning:
|
|
1434
|
+
* the session it was read in, the day its change is dated to, the last
|
|
1435
|
+
* completed regular session's close and move, and an open pre-market or
|
|
1436
|
+
* after-hours print with its move from that close. Older servers send none.
|
|
1437
|
+
*/
|
|
1438
|
+
export type CloudMoverSessionFields = Partial<Pick<Quote,
|
|
1439
|
+
| "marketState" | "changeSessionDate"
|
|
1440
|
+
| "regularClose" | "regularCloseSessionDate" | "regularChange" | "regularChangePercent"
|
|
1441
|
+
| "preMarketPrice" | "preMarketChange" | "preMarketChangePercent"
|
|
1442
|
+
| "postMarketPrice" | "postMarketChange" | "postMarketChangePercent">>;
|
|
1443
|
+
|
|
1444
|
+
/** price, change and changePercent are the live print the list is ranked by; the session fields say how it reads. */
|
|
1445
|
+
export interface CloudMarketScreenerItem extends CloudMoverSessionFields {
|
|
1431
1446
|
rank: number;
|
|
1432
1447
|
symbol: string;
|
|
1433
1448
|
name: string;
|
|
1434
1449
|
price: number;
|
|
1435
1450
|
change: number;
|
|
1436
1451
|
changePercent: number;
|
|
1452
|
+
previousClose?: number;
|
|
1437
1453
|
volume: number;
|
|
1438
1454
|
/** Available average volume for this listing, independent of public ranking membership. */
|
|
1439
1455
|
avgVolume?: number;
|
|
@@ -36,6 +36,14 @@ export interface CloudCurveView {
|
|
|
36
36
|
checkedAt: string | null;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/** One tenor of a stored curve over time, oldest first (`GET /cloud/econ/curves/:curve/history`). */
|
|
40
|
+
export interface CloudCurveHistory {
|
|
41
|
+
curve: CloudCurveHeader;
|
|
42
|
+
tenor: string;
|
|
43
|
+
points: Array<{ date: string; value: number }>;
|
|
44
|
+
checkedAt: string | null;
|
|
45
|
+
}
|
|
46
|
+
|
|
39
47
|
export interface CloudWorldCurves {
|
|
40
48
|
curves: Array<{
|
|
41
49
|
curve: CloudCurveHeader;
|
|
@@ -13,6 +13,8 @@ import { getVisiblePaneCycleOrder } from "../components/layout/pane/cycle-order"
|
|
|
13
13
|
import { requestFunctionHelp, useFunctionHelpHost } from "../plugins/builtin/help/function-card";
|
|
14
14
|
import { buildRegistryHelpIndex, helpFunctionForPane } from "../plugins/builtin/help/function-index";
|
|
15
15
|
import { recordFunctionOpen } from "../telemetry/usage-counts";
|
|
16
|
+
import { DOCS_PANE_TEMPLATE_ID } from "../docs/content";
|
|
17
|
+
import { registerPaneDocsHandler } from "../docs/requests";
|
|
16
18
|
import { isMoveDownShortcut, isMoveUpShortcut } from "../components/command-bar/keyboard-handlers";
|
|
17
19
|
import { pressStarPromptKey } from "./star-prompt/runtime";
|
|
18
20
|
import {
|
|
@@ -120,6 +122,18 @@ export function useAppGlobalShortcuts({
|
|
|
120
122
|
if (state.commandBarOpen) dispatch({ type: "SET_COMMAND_BAR", open: false });
|
|
121
123
|
},
|
|
122
124
|
});
|
|
125
|
+
const layoutRef = useRef(state.config.layout);
|
|
126
|
+
layoutRef.current = state.config.layout;
|
|
127
|
+
// A pane's `?`: its entry in DOCS, or its help card where no pane can open.
|
|
128
|
+
useEffect(() => registerPaneDocsHandler((paneId) => {
|
|
129
|
+
if (!isDetachedWindow) {
|
|
130
|
+
pluginRegistry.createPaneFromTemplate(DOCS_PANE_TEMPLATE_ID, { values: { pane: paneId } });
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const instance = findPaneInstance(layoutRef.current, paneId);
|
|
134
|
+
const fn = instance ? helpFunctionForPane(buildRegistryHelpIndex(pluginRegistry), pluginRegistry, instance) : null;
|
|
135
|
+
if (fn) requestFunctionHelp({ kind: "function", fn, inAppDocs: false });
|
|
136
|
+
}), [isDetachedWindow, pluginRegistry]);
|
|
123
137
|
|
|
124
138
|
useShortcut((event) => {
|
|
125
139
|
if (isCopyShortcut(event) && copyActiveSelection(nativeRenderer)) {
|
|
@@ -237,7 +251,7 @@ export function useAppGlobalShortcuts({
|
|
|
237
251
|
recordFunctionOpen({ shortcut: "HELP", externalPluginId: null });
|
|
238
252
|
const instance = state.focusedPaneId ? findPaneInstance(state.config.layout, state.focusedPaneId) : undefined;
|
|
239
253
|
const fn = instance ? helpFunctionForPane(buildRegistryHelpIndex(pluginRegistry), pluginRegistry, instance) : null;
|
|
240
|
-
if (fn && requestFunctionHelp({ kind: "function", fn })) return;
|
|
254
|
+
if (fn && requestFunctionHelp({ kind: "function", fn, inAppDocs: !isDetachedWindow })) return;
|
|
241
255
|
if (!isDetachedWindow) pluginRegistry.showPane("help");
|
|
242
256
|
return;
|
|
243
257
|
}
|
|
@@ -128,8 +128,12 @@ export function useAppTickerOpenRuntime({
|
|
|
128
128
|
let existing = options?.forceNewPane
|
|
129
129
|
? null
|
|
130
130
|
: findFixedTickerPaneForSymbol(currentLayout, paneType, symbol, instrument);
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
// Without a broker route, the public listing and an unnamed route are the same security: a link that names
|
|
132
|
+
// neither still finds the DES the command bar opened on the public listing, and leaves its binding as it is.
|
|
133
|
+
let keepBinding = false;
|
|
134
|
+
if (!options?.forceNewPane && !existing && !instrument && !target.ticker.metadata.broker_contracts?.length) {
|
|
135
|
+
existing = findFixedTickerPaneForSymbol(currentLayout, paneType, symbol, instrument === null ? undefined : null);
|
|
136
|
+
keepBinding = !!existing && instrument === undefined;
|
|
133
137
|
}
|
|
134
138
|
if (!options?.forceNewPane && !existing && !instrument && (parsePublicTickerKey(symbol).exchange || tickerHasListingSuffix(symbol))) {
|
|
135
139
|
existing = currentLayout.instances.find((instance) => {
|
|
@@ -145,7 +149,7 @@ export function useAppTickerOpenRuntime({
|
|
|
145
149
|
// verified same listing, retaining its pane identity and its followers.
|
|
146
150
|
const previousSymbol = existing.binding?.kind === "fixed" ? existing.binding.symbol : null;
|
|
147
151
|
let nextLayout = currentLayout;
|
|
148
|
-
if (previousSymbol && (previousSymbol !== symbol || JSON.stringify(existing.binding) !== JSON.stringify(binding))) {
|
|
152
|
+
if (previousSymbol && (previousSymbol !== symbol || (!keepBinding && JSON.stringify(existing.binding) !== JSON.stringify(binding)))) {
|
|
149
153
|
const existingId = existing.instanceId;
|
|
150
154
|
nextLayout = { ...currentLayout, instances: currentLayout.instances.map((instance) => (
|
|
151
155
|
instance.instanceId === existingId ? {
|
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
"src/app/runtime/broker-import.ts": ["portfolio-list"],
|
|
7
7
|
"src/app/runtime/desktop-deeplink.ts": ["account-management","chat","cloud"],
|
|
8
8
|
"src/app/runtime/startup.ts": ["chat","plugin-marketplace"],
|
|
9
|
-
"src/
|
|
10
|
-
"src/cli/commands/market.ts": ["holders","research","sec"],
|
|
9
|
+
"src/cli/commands/market.ts": ["holders","insider","research","sec"],
|
|
11
10
|
"src/cli/commands/options-chain.ts": ["options","options-calculator"],
|
|
12
11
|
"src/cli/commands/options-leaps.ts": ["options","vol-surface"],
|
|
13
12
|
"src/cli/commands/overview.ts": ["correlation","econ","market-movers","sectors","world-indices"],
|
|
14
|
-
"src/cli/commands/ticker.ts": ["notes"
|
|
13
|
+
"src/cli/commands/ticker.ts": ["notes"],
|
|
15
14
|
"src/cli/desktop-pane-shot.ts": ["market-valuation","time-sales"],
|
|
16
15
|
"src/cli/pane-functions/data.ts": ["chart-composer","correlation","seasonality","ticker-detail"],
|
|
17
16
|
"src/cli/pane-functions/financial-ratio-shot.ts": ["ticker-detail"],
|
|
@@ -37,23 +36,15 @@
|
|
|
37
36
|
"src/components/layout/shell/index.tsx": ["cloud"],
|
|
38
37
|
"src/components/layout/status-bar-groups.ts": ["cloud"],
|
|
39
38
|
"src/components/layout/status-bar.tsx": ["cloud"],
|
|
40
|
-
"src/components/onboarding/
|
|
41
|
-
"src/components/onboarding/account-step/index.tsx": ["cloud"],
|
|
42
|
-
"src/components/onboarding/account-step/qr-panel.tsx": ["cloud"],
|
|
43
|
-
"src/components/onboarding/account-step/signed-in-panel.tsx": ["cloud"],
|
|
44
|
-
"src/components/onboarding/onboarding-keyboard.ts": ["account-management"],
|
|
45
|
-
"src/components/onboarding/onboarding-wizard.tsx": ["account-management","cloud"],
|
|
46
|
-
"src/components/onboarding/use-onboarding-upgrade.ts": ["account-management","chat","cloud"],
|
|
47
|
-
"src/components/onboarding/wizard-account.ts": ["cloud"],
|
|
39
|
+
"src/components/onboarding/use-onboarding-upgrade.ts": ["chat"],
|
|
48
40
|
"src/components/onboarding/wizard-model.ts": ["portfolio-list"],
|
|
49
41
|
"src/components/onboarding/wizard-positions.ts": ["portfolio-list"],
|
|
50
|
-
"src/components/sign-in-gate.tsx": ["cloud"],
|
|
51
42
|
"src/layout-marketplace/gallery.tsx": ["cloud","plugin-marketplace"],
|
|
52
43
|
"src/layout-marketplace/linked-sync.ts": ["cloud"],
|
|
53
44
|
"src/layout/desks.ts": ["chart-composer"],
|
|
54
45
|
"src/plugins/auto-update-node.ts": ["plugin-marketplace"],
|
|
55
46
|
"src/plugins/auto-update.ts": ["plugin-marketplace"],
|
|
56
|
-
"src/plugins/catalog-browser.ts": ["alerts","analytics","attention","awards","backtest","bond-calculator","catalysts","cds","central-bank-rates","changelog","chart-composer","clinical-trials","cloud","comment-letters","company-attention","company-kpis","connections","correlation","cot","cpi","credit-boards","credit-conditions","credit-documents","crypto-board","debt-maturities","dividend-yield","doe","earnings-calls","earnings-ripple","econ","econ-statistics","equity-screener","estimate-revisions","executives","exposure","fear-greed","filing-events","futures","futures-curve","fx-matrix","gpu","help","insider","ipo-calendar","iv-history","jobs","kelly-sizer","layout-manager","macro-day","market-halts","market-heatmap","market-valuation","members","mna","money-markets","news","openfda","options","options-calculator","options-positioning","options-scenario","pe-band","perps","portfolio-list","power","rate-path","realized-vol","relative-rotation","research","research-search","revenue-breakdown","reverse-dcf","risk-factors","scanner","seasonality","sec","sectors","short-interest","short-volume","social-mentions","supply-chain","ticker-detail","time-sales","treasury-auctions","vol-surface","volatility","world-indices","world-venue-map","yield-curve"],
|
|
47
|
+
"src/plugins/catalog-browser.ts": ["alerts","analytics","attention","awards","backtest","bond-calculator","catalysts","cds","central-bank-rates","changelog","chart-composer","clinical-trials","cloud","comment-letters","company-attention","company-kpis","connections","correlation","cot","cpi","credit-boards","credit-conditions","credit-documents","crypto-board","debt-maturities","dividend-yield","docs","doe","earnings-calls","earnings-ripple","econ","econ-statistics","equity-screener","estimate-revisions","executives","exposure","fear-greed","filing-events","futures","futures-curve","fx-matrix","gpu","help","insider","ipo-calendar","iv-history","jobs","kelly-sizer","layout-manager","macro-day","market-halts","market-heatmap","market-valuation","members","mna","money-markets","news","openfda","options","options-calculator","options-positioning","options-scenario","pe-band","perps","portfolio-list","power","rate-path","realized-vol","relative-rotation","research","research-search","revenue-breakdown","reverse-dcf","risk-factors","scanner","seasonality","sec","sectors","short-interest","short-volume","social-mentions","supply-chain","ticker-detail","time-sales","treasury-auctions","vol-surface","volatility","world-indices","world-venue-map","yield-curve"],
|
|
57
48
|
"src/plugins/catalog-ui.ts": ["alerts","clinical-trials","cloud","comment-letters","custom-view","fear-greed","ipo-calendar","market-halts","market-heatmap","members","news","notes","openfda","research-search"],
|
|
58
49
|
"src/plugins/catalog.ts": ["debug"],
|
|
59
50
|
"src/plugins/installer.ts": ["plugin-marketplace"],
|
|
@@ -13,10 +13,11 @@ import { t, tf } from "../../i18n";
|
|
|
13
13
|
import { useAppLanguage } from "../../i18n/react";
|
|
14
14
|
import { useViewport } from "../../react/input";
|
|
15
15
|
import { colors } from "../../theme/colors";
|
|
16
|
-
import { Box, Text, TextAttributes } from "../../ui";
|
|
16
|
+
import { Box, Text, TextAttributes, useUiCapabilities } from "../../ui";
|
|
17
|
+
import { DialogHints } from "../../components/ui/dialog-actions";
|
|
17
18
|
import { useDialog, useDialogKeyboard, type DialogApi, type PromptContext } from "../../ui/dialog";
|
|
18
19
|
import { isPlainKey } from "../../utils/keyboard";
|
|
19
|
-
import { DeviceSignInDialog } from "../../
|
|
20
|
+
import { DeviceSignInDialog } from "../../account/device-signin-dialog";
|
|
20
21
|
import type { SignedInBroker } from "./client";
|
|
21
22
|
import {
|
|
22
23
|
BrokerSignInController,
|
|
@@ -115,6 +116,7 @@ function BrokerSignInDialog({
|
|
|
115
116
|
renew,
|
|
116
117
|
}: PromptContext<BrokerSignInOutcome> & { broker: SignedInBroker; write: boolean; renew: boolean }) {
|
|
117
118
|
useAppLanguage();
|
|
119
|
+
const { nativePaneChrome } = useUiCapabilities();
|
|
118
120
|
const { height: termHeight } = useViewport();
|
|
119
121
|
// Close after a beat so "Connected" is visible; enter skips the wait. Signed
|
|
120
122
|
// out closes at once, for the host to sign in to Gloom.
|
|
@@ -162,9 +164,13 @@ function BrokerSignInDialog({
|
|
|
162
164
|
</>
|
|
163
165
|
)}
|
|
164
166
|
<Box height={1} />
|
|
165
|
-
|
|
166
|
-
<
|
|
167
|
-
|
|
167
|
+
{nativePaneChrome ? (
|
|
168
|
+
<DialogHints keys={[{ key: "r", label: "new code" }, { key: "Esc", label: "cancel" }]} />
|
|
169
|
+
) : (
|
|
170
|
+
<Box height={1}>
|
|
171
|
+
<Text fg={colors.textMuted}>{t("r for a new code · esc to cancel")}</Text>
|
|
172
|
+
</Box>
|
|
173
|
+
)}
|
|
168
174
|
</Box>
|
|
169
175
|
);
|
|
170
176
|
}
|
|
@@ -253,17 +253,27 @@ export const chartSeriesCatalogOutputSchema: CapabilitySchema<ChartSeriesCatalog
|
|
|
253
253
|
export const chartSeriesResolveRequestSchema: CapabilitySchema<ChartSeriesResolveRequest> = { parse: resolveRequest };
|
|
254
254
|
export const chartSeriesResolveOutputSchema: CapabilitySchema<ResolvedSeries> = { parse: resolvedOutput };
|
|
255
255
|
|
|
256
|
+
/**
|
|
257
|
+
* Set on the capabilities registered series resolve through. The composer
|
|
258
|
+
* searches those series in the series registry, so capability search skips them.
|
|
259
|
+
*/
|
|
260
|
+
export const REGISTERED_SERIES_SOURCE_ID = "registered-series";
|
|
261
|
+
|
|
256
262
|
export function chartSeriesCapabilityManifests(invoker: CapabilityInvoker) {
|
|
257
263
|
return invoker.capabilityManifests(CHART_SERIES_CAPABILITY_KIND);
|
|
258
264
|
}
|
|
259
265
|
|
|
266
|
+
function searchableChartSeriesManifests(invoker: CapabilityInvoker) {
|
|
267
|
+
return chartSeriesCapabilityManifests(invoker).filter((manifest) => manifest.sourceId !== REGISTERED_SERIES_SOURCE_ID);
|
|
268
|
+
}
|
|
269
|
+
|
|
260
270
|
export async function searchChartSeriesCapabilities(
|
|
261
271
|
invoker: CapabilityInvoker,
|
|
262
272
|
query: string,
|
|
263
273
|
limit = 8,
|
|
264
274
|
signal?: AbortSignal,
|
|
265
275
|
): Promise<Array<ChartSeriesCatalogItem & { capabilityId: string; capabilityName: string }>> {
|
|
266
|
-
const manifests =
|
|
276
|
+
const manifests = searchableChartSeriesManifests(invoker);
|
|
267
277
|
const results = await Promise.allSettled(manifests.map(async (manifest) => {
|
|
268
278
|
const items = await invoker.invokeCapability<ChartSeriesCatalogItem[]>(
|
|
269
279
|
manifest.id,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isCryptoInstrumentType } from "../../tickers/search/ranking";
|
|
2
|
+
import { isCryptoVenuePerpetual } from "../../tickers/instrument-kind";
|
|
2
3
|
import type { Quote } from "../../types/financials";
|
|
3
4
|
import { isCryptoPairSymbol } from "../../utils/crypto-pair";
|
|
4
5
|
import { isNotATickerMessage } from "../not-a-ticker";
|
|
@@ -79,5 +80,11 @@ export function quoteNotes(results: QuoteNoteResult[], options: { exchange?: str
|
|
|
79
80
|
if (note) notes.push(note);
|
|
80
81
|
}
|
|
81
82
|
}
|
|
83
|
+
const perpetuals = results
|
|
84
|
+
.filter((result) => result.quote && isCryptoVenuePerpetual(result.quote.instrumentType, result.quote.name))
|
|
85
|
+
.map((result) => result.target.symbol);
|
|
86
|
+
if (perpetuals.length > 0) {
|
|
87
|
+
notes.push(`${perpetuals.join(", ")}: perpetual futures ${perpetuals.length === 1 ? "price" : "prices"} on crypto venues, 24/7; not the listed future, not spot.`);
|
|
88
|
+
}
|
|
82
89
|
return notes;
|
|
83
90
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { toBasisPoints } from "../../utils/basis-points";
|
|
2
|
+
|
|
3
|
+
/** Where `fred` starts when `--start` is not given. */
|
|
4
|
+
export const DEFAULT_FRED_START = "2021-01-01";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* FRED series that are spreads, which FRED serves in percentage points and
|
|
8
|
+
* rates desks read in basis points: `fred` text prints them in bp.
|
|
9
|
+
*/
|
|
10
|
+
const SPREAD_SERIES: ReadonlySet<string> = new Set([
|
|
11
|
+
"T10Y2Y", "T10Y3M",
|
|
12
|
+
"BAMLC0A0CM", "BAMLC0A1CAAA", "BAMLC0A2CAA", "BAMLC0A3CA", "BAMLC0A4CBBB", "BAMLH0A0HYM2",
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
export function isSpreadSeries(seriesId: string): boolean {
|
|
16
|
+
return SPREAD_SERIES.has(seriesId.toUpperCase());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** A spread in percentage points as the bp a text table prints: 0.44 is `44`, -0.125 is `-12.5`. */
|
|
20
|
+
export function spreadBasisPointsCell(value: unknown): string {
|
|
21
|
+
return typeof value === "number" && Number.isFinite(value) ? String(toBasisPoints(value, 1)) : "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Series FRED itself publishes late, with what a reader should know under the
|
|
26
|
+
* table. Add a series here when its newest FRED observation is not the newest
|
|
27
|
+
* reading the source has put out.
|
|
28
|
+
*/
|
|
29
|
+
const LAGGING_SERIES: Readonly<Record<string, string>> = {
|
|
30
|
+
UMCSENT: "FRED publishes the University of Michigan survey with a lag; latest preliminary reading: fn ECO",
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export function laggingSeriesNote(seriesId: string): string | null {
|
|
34
|
+
return LAGGING_SERIES[seriesId.toUpperCase()] ?? null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Where a series' history starts relative to what was asked for: the default
|
|
39
|
+
* start hides everything before it, and a start before the series begins
|
|
40
|
+
* silently begins later.
|
|
41
|
+
*/
|
|
42
|
+
export function fredHistoryNotes(input: {
|
|
43
|
+
startDate: string;
|
|
44
|
+
startGiven: boolean;
|
|
45
|
+
/** The series' first observation date, when FRED's metadata says. */
|
|
46
|
+
seriesStart: string | null | undefined;
|
|
47
|
+
}): string[] {
|
|
48
|
+
const seriesStart = input.seriesStart && /^\d{4}-\d{2}-\d{2}$/.test(input.seriesStart) ? input.seriesStart : null;
|
|
49
|
+
if (!seriesStart) return [];
|
|
50
|
+
if (seriesStart > input.startDate) return [`Series begins ${seriesStart}.`];
|
|
51
|
+
return input.startGiven
|
|
52
|
+
? []
|
|
53
|
+
: [`Showing from ${input.startDate}; earlier: --start YYYY-MM-DD (series begins ${seriesStart}).`];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** What `fred` says when nothing falls on or after `--start`: where the series actually ends. */
|
|
57
|
+
export function fredEmptyMessage(startDate: string, latest: { date: string; value: number | null } | null): string {
|
|
58
|
+
return latest
|
|
59
|
+
? `Latest observation: ${latest.date}${latest.value == null ? "" : ` (${latest.value})`}. Nothing on or after ${startDate}.`
|
|
60
|
+
: "No results.";
|
|
61
|
+
}
|