@gloom-sh/terminal 0.0.0-stage → 0.18.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/LICENSE +25 -0
- package/README.md +73 -2
- package/README.zh-CN.md +116 -0
- package/bin/gloom +13 -0
- package/package.json +144 -4
- package/patches/@opentui%2Fcore@0.3.2.patch +624 -0
- package/patches/electrobun@1.18.1.patch +371 -0
- package/patches/react-reconciler@0.33.0.patch +10 -0
- package/src/account/auth-dialog.tsx +88 -0
- package/src/account/auth-form.tsx +276 -0
- package/src/account/auth-model.ts +167 -0
- package/src/account/billing.ts +57 -0
- package/src/account/checkout-handoff.tsx +225 -0
- package/src/account/device-signin-dialog.tsx +210 -0
- package/src/account/device-signin.ts +235 -0
- package/src/account/email-auth-attempt.ts +173 -0
- package/src/account/session.ts +16 -0
- package/src/account/upgrade-dialog.tsx +286 -0
- package/src/account/upgrade-personalization.ts +57 -0
- package/src/account/upgrade-tickers.ts +124 -0
- package/src/account/verification-panel.tsx +63 -0
- package/src/api-client/app-attention.ts +147 -0
- package/src/api-client/askg.ts +710 -0
- package/src/api-client/attention.ts +26 -0
- package/src/api-client/auth.ts +361 -0
- package/src/api-client/awards.ts +215 -0
- package/src/api-client/bank-figures.ts +73 -0
- package/src/api-client/beneficial-owners.ts +96 -0
- package/src/api-client/catalysts.ts +161 -0
- package/src/api-client/central-bank-rates.ts +51 -0
- package/src/api-client/chat-pane-link.ts +47 -0
- package/src/api-client/chat.ts +370 -0
- package/src/api-client/collections.ts +45 -0
- package/src/api-client/commodity-balances.ts +83 -0
- package/src/api-client/company-kpis.ts +174 -0
- package/src/api-client/cot.ts +74 -0
- package/src/api-client/cpi.ts +52 -0
- package/src/api-client/credit-boards.ts +89 -0
- package/src/api-client/credit-documents.ts +107 -0
- package/src/api-client/crypto-etf-flows.ts +37 -0
- package/src/api-client/crypto-markets.ts +205 -0
- package/src/api-client/data.ts +1303 -0
- package/src/api-client/debt-maturities.ts +110 -0
- package/src/api-client/distress.ts +164 -0
- package/src/api-client/doe.ts +109 -0
- package/src/api-client/earnings.ts +98 -0
- package/src/api-client/equity-screener.ts +221 -0
- package/src/api-client/errors.ts +142 -0
- package/src/api-client/estimate-revisions.ts +113 -0
- package/src/api-client/europe-energy.ts +197 -0
- package/src/api-client/exchange-announcements.ts +38 -0
- package/src/api-client/exposure.ts +202 -0
- package/src/api-client/feedback.ts +34 -0
- package/src/api-client/fund-facts.ts +111 -0
- package/src/api-client/futures-curve.ts +186 -0
- package/src/api-client/geo.ts +373 -0
- package/src/api-client/gpu.ts +93 -0
- package/src/api-client/hiring.ts +411 -0
- package/src/api-client/index.ts +1079 -0
- package/src/api-client/insider-signals.ts +159 -0
- package/src/api-client/ipo.ts +99 -0
- package/src/api-client/letters.ts +41 -0
- package/src/api-client/live-scan.ts +91 -0
- package/src/api-client/market-discovery.ts +120 -0
- package/src/api-client/market-movers.ts +67 -0
- package/src/api-client/members.ts +44 -0
- package/src/api-client/mna.ts +124 -0
- package/src/api-client/money-markets.ts +57 -0
- package/src/api-client/normalizers.ts +266 -0
- package/src/api-client/notes.ts +75 -0
- package/src/api-client/organization-tickers.ts +44 -0
- package/src/api-client/paths.ts +648 -0
- package/src/api-client/perps.ts +176 -0
- package/src/api-client/plan-access.ts +27 -0
- package/src/api-client/plan-rules.ts +87 -0
- package/src/api-client/power.ts +148 -0
- package/src/api-client/rates.ts +56 -0
- package/src/api-client/request.ts +681 -0
- package/src/api-client/research-activity.ts +589 -0
- package/src/api-client/revenue-breakdown.ts +36 -0
- package/src/api-client/session-cookie.ts +6 -0
- package/src/api-client/short-side-publications.ts +37 -0
- package/src/api-client/short-volume.ts +55 -0
- package/src/api-client/social-mentions.ts +63 -0
- package/src/api-client/socket.ts +1109 -0
- package/src/api-client/supply-chain-graph.ts +40 -0
- package/src/api-client/supply-chain.ts +106 -0
- package/src/api-client/swap-curve.ts +35 -0
- package/src/api-client/tape.ts +56 -0
- package/src/api-client/teams.ts +216 -0
- package/src/api-client/telemetry.ts +226 -0
- package/src/api-client/themes.ts +55 -0
- package/src/api-client/theses.ts +150 -0
- package/src/api-client/types.ts +2341 -0
- package/src/api-client/upgrade-experiment.ts +91 -0
- package/src/api-client/views.ts +98 -0
- package/src/api-client/wall-experiments.ts +102 -0
- package/src/api-client/wall-summary.ts +51 -0
- package/src/api-client/web-experiments.ts +139 -0
- package/src/api-client/yield-curves.ts +72 -0
- package/src/app/app-bootstrap-state.ts +121 -0
- package/src/app/command-bar-intro.ts +38 -0
- package/src/app/dialog-bridge.tsx +33 -0
- package/src/app/global-shortcuts.ts +334 -0
- package/src/app/keybindings/actions.ts +298 -0
- package/src/app/keybindings/capture-request.ts +36 -0
- package/src/app/keybindings/chord.ts +304 -0
- package/src/app/keybindings/config.ts +83 -0
- package/src/app/keybindings/index.ts +51 -0
- package/src/app/keybindings/labels.ts +104 -0
- package/src/app/keybindings/react.tsx +35 -0
- package/src/app/keybindings/resolve.ts +295 -0
- package/src/app/language-observer.tsx +13 -0
- package/src/app/pane-runtime/index.tsx +320 -0
- package/src/app/pane-runtime/layout-placement.ts +56 -0
- package/src/app/pane-runtime/pane-settings-runtime.tsx +69 -0
- package/src/app/pane-runtime/pane-template-runtime.ts +123 -0
- package/src/app/pane-runtime/plugin-bindings.ts +537 -0
- package/src/app/pane-runtime/ticker-inspector-runtime.ts +190 -0
- package/src/app/pane-runtime/ticker-open-runtime.ts +238 -0
- package/src/app/pane-runtime/ticker-open-target.ts +31 -0
- package/src/app/runtime/broker-import.ts +189 -0
- package/src/app/runtime/desktop-deeplink.ts +641 -0
- package/src/app/runtime/desktop-menu.ts +95 -0
- package/src/app/runtime/layout-warmup.ts +124 -0
- package/src/app/runtime/plugin-bindings.ts +284 -0
- package/src/app/runtime/startup.ts +256 -0
- package/src/app/runtime/ticker-refresh.ts +206 -0
- package/src/app/runtime/update.ts +260 -0
- package/src/app/star-prompt/model.ts +98 -0
- package/src/app/star-prompt/runtime.ts +41 -0
- package/src/app/star-prompt/status-line.tsx +190 -0
- package/src/app.tsx +663 -0
- package/src/architecture/core-builtin-allowlist.json +39 -0
- package/src/architecture/dom-cell-metrics-allowlist.json +102 -0
- package/src/architecture/pane-tabs-allowlist.json +65 -0
- package/src/architecture/silent-catch-allowlist.json +3 -0
- package/src/architecture/ui-literals-allowlist.json +186 -0
- package/src/architecture/ui-tokens-allowlist.json +40 -0
- package/src/ask-gloom/pane-context.ts +130 -0
- package/src/ask-gloom/pane-request.ts +70 -0
- package/src/ask-gloom/pane-text.ts +201 -0
- package/src/assets/gloomberb-logo-windows.ico +0 -0
- package/src/assets/gloomberb-logo-windows.png +0 -0
- package/src/assets/gloomberb-logo.svg +1 -0
- package/src/assets/gloomberb-mark.ico +0 -0
- package/src/assets/gloomberb-mark.svg +1 -0
- package/src/brokers/account-cache.ts +218 -0
- package/src/brokers/broker-portfolio-sync.ts +357 -0
- package/src/brokers/broker-ticker-sync.ts +146 -0
- package/src/brokers/cloud-broker-link.ts +26 -0
- package/src/brokers/directory.ts +76 -0
- package/src/brokers/logos.ts +68 -0
- package/src/brokers/profile-form.ts +113 -0
- package/src/brokers/remote-broker-adapter.ts +115 -0
- package/src/brokers/remove-profile.ts +61 -0
- package/src/brokers/signed-in/adapter.ts +568 -0
- package/src/brokers/signed-in/catalog.ts +130 -0
- package/src/brokers/signed-in/client.ts +81 -0
- package/src/brokers/signed-in/connect.ts +90 -0
- package/src/brokers/signed-in/profile.ts +18 -0
- package/src/brokers/signed-in/sign-in-dialog.tsx +339 -0
- package/src/brokers/signed-in/sign-in.ts +237 -0
- package/src/brokers/sync-broker-instance.ts +479 -0
- package/src/capabilities/chart-series.ts +354 -0
- package/src/capabilities/factories.ts +168 -0
- package/src/capabilities/index.ts +42 -0
- package/src/capabilities/registry.ts +181 -0
- package/src/capabilities/service-capabilities.ts +78 -0
- package/src/capabilities/stream-client.ts +39 -0
- package/src/capabilities/types.ts +161 -0
- package/src/cli/bank-section.ts +147 -0
- package/src/cli/base-converter.ts +86 -0
- package/src/cli/board-coins.ts +70 -0
- package/src/cli/central-bank-events.ts +23 -0
- package/src/cli/command-options.ts +141 -0
- package/src/cli/commands/api.ts +142 -0
- package/src/cli/commands/broker.ts +49 -0
- package/src/cli/commands/command-utils.ts +83 -0
- package/src/cli/commands/crypto-hints.ts +103 -0
- package/src/cli/commands/fred-series.ts +319 -0
- package/src/cli/commands/keybindings.ts +125 -0
- package/src/cli/commands/market.ts +3523 -0
- package/src/cli/commands/news-hints.ts +62 -0
- package/src/cli/commands/news-search.ts +166 -0
- package/src/cli/commands/options-chain.ts +314 -0
- package/src/cli/commands/options-leaps.ts +839 -0
- package/src/cli/commands/overview.ts +916 -0
- package/src/cli/commands/plugins.ts +382 -0
- package/src/cli/commands/remote.ts +219 -0
- package/src/cli/commands/search.ts +633 -0
- package/src/cli/commands/system.ts +699 -0
- package/src/cli/commands/themes.ts +64 -0
- package/src/cli/commands/ticker.ts +1651 -0
- package/src/cli/context.ts +159 -0
- package/src/cli/currency-hints.ts +27 -0
- package/src/cli/desktop-pane-shot-routes.ts +7 -0
- package/src/cli/desktop-pane-shot-view.ts +114 -0
- package/src/cli/desktop-pane-shot.ts +1010 -0
- package/src/cli/earnings-calendar.ts +72 -0
- package/src/cli/entry.ts +97 -0
- package/src/cli/errors.ts +162 -0
- package/src/cli/exit-codes.ts +8 -0
- package/src/cli/export-source.ts +150 -0
- package/src/cli/freshness.ts +84 -0
- package/src/cli/fx-forward.ts +130 -0
- package/src/cli/fx-pair.ts +189 -0
- package/src/cli/glossary.ts +986 -0
- package/src/cli/help.ts +246 -0
- package/src/cli/helpers.ts +169 -0
- package/src/cli/history-export.ts +126 -0
- package/src/cli/history-rows.ts +799 -0
- package/src/cli/index-roots.ts +44 -0
- package/src/cli/index.ts +513 -0
- package/src/cli/issuer-membership.ts +103 -0
- package/src/cli/known-gaps.ts +402 -0
- package/src/cli/listing-arg.ts +1401 -0
- package/src/cli/listing-suggestion.ts +174 -0
- package/src/cli/name-entries.ts +127 -0
- package/src/cli/native-smoke.ts +43 -0
- package/src/cli/not-a-ticker.ts +83 -0
- package/src/cli/opentui-libc.ts +5 -0
- package/src/cli/options.ts +166 -0
- package/src/cli/pane-functions/access-gate.ts +75 -0
- package/src/cli/pane-functions/capabilities.ts +364 -0
- package/src/cli/pane-functions/catalog.ts +761 -0
- package/src/cli/pane-functions/cloud-session.ts +47 -0
- package/src/cli/pane-functions/data.ts +254 -0
- package/src/cli/pane-functions/discovery.ts +234 -0
- package/src/cli/pane-functions/dom.ts +415 -0
- package/src/cli/pane-functions/financial-ratio-shot.ts +160 -0
- package/src/cli/pane-functions/freshness.ts +1205 -0
- package/src/cli/pane-functions/function-help.ts +1447 -0
- package/src/cli/pane-functions/headless.ts +1049 -0
- package/src/cli/pane-functions/index.ts +601 -0
- package/src/cli/pane-functions/lock-note.ts +59 -0
- package/src/cli/pane-functions/market-session.ts +235 -0
- package/src/cli/pane-functions/options.ts +392 -0
- package/src/cli/pane-functions/report-notices.ts +121 -0
- package/src/cli/pane-functions/report.ts +102 -0
- package/src/cli/pane-functions/resolver.ts +417 -0
- package/src/cli/pane-functions/screenshot-assessment.ts +322 -0
- package/src/cli/pane-functions/screenshot-bridge.ts +152 -0
- package/src/cli/pane-functions/screenshot-chart-evidence.ts +396 -0
- package/src/cli/pane-functions/screenshot-data-evidence.ts +383 -0
- package/src/cli/pane-functions/screenshot-evidence.ts +131 -0
- package/src/cli/pane-functions/screenshot-payload.ts +453 -0
- package/src/cli/pane-functions/screenshot-render.ts +316 -0
- package/src/cli/pane-functions/screenshot-types.ts +162 -0
- package/src/cli/pane-functions/shot-options.ts +73 -0
- package/src/cli/perpetual-contract.ts +62 -0
- package/src/cli/peso-dollar-rates.ts +79 -0
- package/src/cli/quote-answer.ts +220 -0
- package/src/cli/registry.ts +178 -0
- package/src/cli/report-tables.ts +692 -0
- package/src/cli/restore-plugins.ts +77 -0
- package/src/cli/result.ts +670 -0
- package/src/cli/row-window.ts +76 -0
- package/src/cli/scoped-context.ts +41 -0
- package/src/cli/scroll-truncation.ts +38 -0
- package/src/cli/series-search.ts +117 -0
- package/src/cli/staged-tickers.ts +57 -0
- package/src/cli/statement-filings.ts +280 -0
- package/src/cli/suffixed-listing-rows.ts +49 -0
- package/src/cli/symbol-args.ts +158 -0
- package/src/cli/symbol-cells.ts +120 -0
- package/src/cli/symbol-list.ts +374 -0
- package/src/cli/symbol-rows.ts +517 -0
- package/src/cli/ticker-resolution.ts +565 -0
- package/src/cli/treasury-yields.ts +86 -0
- package/src/cli/types.ts +42 -0
- package/src/cli/uncovered-instrument.ts +20 -0
- package/src/cli/unknown-command.ts +88 -0
- package/src/cli/visible-key-values.ts +29 -0
- package/src/components/chart/composite/axis-overlays.tsx +452 -0
- package/src/components/chart/composite/bitmap.ts +71 -0
- package/src/components/chart/composite/chart-layout.ts +131 -0
- package/src/components/chart/composite/column-layout.ts +215 -0
- package/src/components/chart/composite/composite-chart.tsx +1244 -0
- package/src/components/chart/composite/downsample.ts +221 -0
- package/src/components/chart/composite/drawing-store.ts +79 -0
- package/src/components/chart/composite/format.ts +574 -0
- package/src/components/chart/composite/index.ts +16 -0
- package/src/components/chart/composite/interactions.ts +379 -0
- package/src/components/chart/composite/legend.tsx +585 -0
- package/src/components/chart/composite/level-labels.ts +30 -0
- package/src/components/chart/composite/levels.ts +172 -0
- package/src/components/chart/composite/panel-bitmap.ts +180 -0
- package/src/components/chart/composite/panel-gestures.ts +100 -0
- package/src/components/chart/composite/panel-labels.ts +147 -0
- package/src/components/chart/composite/panel-series.ts +106 -0
- package/src/components/chart/composite/panel-surface.tsx +1279 -0
- package/src/components/chart/composite/price-axis-labels.tsx +320 -0
- package/src/components/chart/composite/price-series.ts +83 -0
- package/src/components/chart/composite/range-statistics.ts +62 -0
- package/src/components/chart/composite/rasterizer.ts +634 -0
- package/src/components/chart/composite/scene.ts +936 -0
- package/src/components/chart/composite/series-axis-tags.tsx +74 -0
- package/src/components/chart/composite/series-cues.ts +71 -0
- package/src/components/chart/composite/session-shading.ts +100 -0
- package/src/components/chart/composite/text-renderer.ts +400 -0
- package/src/components/chart/composite/time-axis.ts +705 -0
- package/src/components/chart/composite/time-scale.ts +335 -0
- package/src/components/chart/composite/tool-catalog.ts +98 -0
- package/src/components/chart/composite/toolbar.tsx +238 -0
- package/src/components/chart/composite/tools.ts +610 -0
- package/src/components/chart/composite/types.ts +354 -0
- package/src/components/chart/composite/use-composite-chart-keyboard.ts +837 -0
- package/src/components/chart/composite/use-composite-value-scales.ts +44 -0
- package/src/components/chart/composite/use-composite-viewport.ts +180 -0
- package/src/components/chart/composite/value-scale.ts +149 -0
- package/src/components/chart/composite/volume-profile-paint.ts +80 -0
- package/src/components/chart/core/data.ts +9 -0
- package/src/components/chart/core/date-window.ts +179 -0
- package/src/components/chart/core/palette.ts +49 -0
- package/src/components/chart/core/pointer.ts +182 -0
- package/src/components/chart/core/types.ts +22 -0
- package/src/components/chart/core/view-reset.ts +46 -0
- package/src/components/chart/curve/curve-surface.tsx +280 -0
- package/src/components/chart/curve/index.ts +4 -0
- package/src/components/chart/curve/model.ts +354 -0
- package/src/components/chart/native/bitmap-support.ts +55 -0
- package/src/components/chart/native/chart-rasterizer.ts +16 -0
- package/src/components/chart/native/kitty/adapter.ts +9 -0
- package/src/components/chart/native/kitty/manager.ts +145 -0
- package/src/components/chart/native/kitty/protocol.ts +112 -0
- package/src/components/chart/native/kitty/support.ts +104 -0
- package/src/components/chart/native/raster/crosshair.ts +89 -0
- package/src/components/chart/native/raster/placement.ts +138 -0
- package/src/components/chart/native/raster/primitives.ts +209 -0
- package/src/components/chart/native/raster/types.ts +25 -0
- package/src/components/chart/native/renderer-selection.ts +154 -0
- package/src/components/chart/native/surface/manager.ts +290 -0
- package/src/components/chart/native/surface/visibility.ts +85 -0
- package/src/components/chart/native/use-chart-text-fallback.ts +19 -0
- package/src/components/chart/static/chart-surface.tsx +162 -0
- package/src/components/chart/static/index.ts +5 -0
- package/src/components/chart/static/scatter-chart-surface.tsx +184 -0
- package/src/components/chart/static/series.ts +91 -0
- package/src/components/chart/static/trail-chart-model.ts +105 -0
- package/src/components/chart/static/trail-chart-surface.tsx +422 -0
- package/src/components/chart/surface3d/chart.tsx +104 -0
- package/src/components/chart/surface3d/model.ts +426 -0
- package/src/components/chart/surface3d/software.ts +360 -0
- package/src/components/chart-table/axis.ts +49 -0
- package/src/components/chart-table/header.tsx +264 -0
- package/src/components/chart-table/index.ts +13 -0
- package/src/components/chart-table/layout.ts +154 -0
- package/src/components/chart-table/read.tsx +74 -0
- package/src/components/chart-table/selection.ts +145 -0
- package/src/components/command-bar/action-runtime.ts +268 -0
- package/src/components/command-bar/assist/inventory.ts +145 -0
- package/src/components/command-bar/assist/model.ts +279 -0
- package/src/components/command-bar/assist/runtime.ts +246 -0
- package/src/components/command-bar/commands/collection-list.ts +262 -0
- package/src/components/command-bar/commands/collection.ts +285 -0
- package/src/components/command-bar/commands/direct/index.ts +445 -0
- package/src/components/command-bar/commands/direct/runtime.ts +181 -0
- package/src/components/command-bar/commands/plugin/actions.ts +143 -0
- package/src/components/command-bar/commands/plugin/items.ts +178 -0
- package/src/components/command-bar/commands/registry.ts +362 -0
- package/src/components/command-bar/helpers.ts +86 -0
- package/src/components/command-bar/keyboard-handlers.ts +129 -0
- package/src/components/command-bar/keyboard-shortcuts.ts +165 -0
- package/src/components/command-bar/layout-items/current-layout.ts +210 -0
- package/src/components/command-bar/layout-items/focused-pane.ts +193 -0
- package/src/components/command-bar/layout-items/types.ts +26 -0
- package/src/components/command-bar/layout-items/window-mode.ts +72 -0
- package/src/components/command-bar/layout-items.ts +93 -0
- package/src/components/command-bar/list/badge.ts +63 -0
- package/src/components/command-bar/list/model.ts +213 -0
- package/src/components/command-bar/list/navigation.ts +121 -0
- package/src/components/command-bar/list/view.tsx +362 -0
- package/src/components/command-bar/pane-actions.ts +128 -0
- package/src/components/command-bar/pane-settings.ts +44 -0
- package/src/components/command-bar/pane-templates/items.ts +288 -0
- package/src/components/command-bar/pane-templates/workflow-route.ts +91 -0
- package/src/components/command-bar/pane-templates/workflow.ts +344 -0
- package/src/components/command-bar/panel/index.tsx +260 -0
- package/src/components/command-bar/panel/layout.ts +150 -0
- package/src/components/command-bar/panel/native-surface.ts +26 -0
- package/src/components/command-bar/panel/palette.ts +28 -0
- package/src/components/command-bar/panel/prompt-binding.ts +54 -0
- package/src/components/command-bar/panel/prompt-example.ts +22 -0
- package/src/components/command-bar/panel/runtime.ts +230 -0
- package/src/components/command-bar/panel/state.ts +161 -0
- package/src/components/command-bar/panel/types.ts +50 -0
- package/src/components/command-bar/picker-activation.ts +87 -0
- package/src/components/command-bar/routes/root/command-items.ts +253 -0
- package/src/components/command-bar/routes/root/help-items.ts +66 -0
- package/src/components/command-bar/routes/root/pick-prefetch.ts +38 -0
- package/src/components/command-bar/routes/root/plugin-install.ts +304 -0
- package/src/components/command-bar/routes/root/plugin-turn-on.ts +92 -0
- package/src/components/command-bar/routes/root/provider-search.ts +271 -0
- package/src/components/command-bar/routes/root/results.ts +439 -0
- package/src/components/command-bar/routes/root/runtime.ts +396 -0
- package/src/components/command-bar/routes/root/search-providers.ts +311 -0
- package/src/components/command-bar/routes/root/search-report.ts +247 -0
- package/src/components/command-bar/routes/root/selection.ts +250 -0
- package/src/components/command-bar/routes/root/shortcut-feedback.ts +116 -0
- package/src/components/command-bar/routes/root/shortcut-items.ts +161 -0
- package/src/components/command-bar/routes/root/shortcuts.ts +221 -0
- package/src/components/command-bar/routes/root/start-here.ts +90 -0
- package/src/components/command-bar/routes/ticker-search/actions.ts +248 -0
- package/src/components/command-bar/routes/ticker-search/results.ts +328 -0
- package/src/components/command-bar/routes/ticker-search/route.ts +151 -0
- package/src/components/command-bar/routing/actions.ts +194 -0
- package/src/components/command-bar/routing/confirm.ts +23 -0
- package/src/components/command-bar/routing/effects.ts +63 -0
- package/src/components/command-bar/routing/launch-request.ts +41 -0
- package/src/components/command-bar/routing/list-state.ts +196 -0
- package/src/components/command-bar/routing/navigation-state.ts +197 -0
- package/src/components/command-bar/selection-runtime.ts +411 -0
- package/src/components/command-bar/surface/environment.ts +136 -0
- package/src/components/command-bar/surface/index.tsx +633 -0
- package/src/components/command-bar/theme-picker.tsx +336 -0
- package/src/components/command-bar/theme-preview.ts +84 -0
- package/src/components/command-bar/view-model.ts +237 -0
- package/src/components/command-bar/workflow/alert.ts +170 -0
- package/src/components/command-bar/workflow/broker.ts +186 -0
- package/src/components/command-bar/workflow/builtin.ts +174 -0
- package/src/components/command-bar/workflow/collection-actions.ts +398 -0
- package/src/components/command-bar/workflow/collection-ticker.ts +93 -0
- package/src/components/command-bar/workflow/coordinator.ts +72 -0
- package/src/components/command-bar/workflow/fields.ts +252 -0
- package/src/components/command-bar/workflow/ops.ts +459 -0
- package/src/components/command-bar/workflow/pane-reuse.ts +178 -0
- package/src/components/command-bar/workflow/portfolio-position.ts +211 -0
- package/src/components/command-bar/workflow/route-builder.ts +56 -0
- package/src/components/command-bar/workflow/submit.ts +220 -0
- package/src/components/command-bar/workflow/ticker-listing-picker.ts +38 -0
- package/src/components/command-bar/workflow/tickers.ts +288 -0
- package/src/components/command-bar/workflow/types.ts +106 -0
- package/src/components/company-logo.tsx +112 -0
- package/src/components/data-table/export.ts +76 -0
- package/src/components/data-table/sections.ts +57 -0
- package/src/components/data-table/sort-menu.tsx +75 -0
- package/src/components/data-table/stack-view.tsx +114 -0
- package/src/components/data-table/table-pane.ts +46 -0
- package/src/components/data-table/view.tsx +767 -0
- package/src/components/feed-data-table/stack-view.tsx +304 -0
- package/src/components/feed-stack-controller.ts +39 -0
- package/src/components/feedback-dialog.tsx +341 -0
- package/src/components/form-modal/broker-step.tsx +63 -0
- package/src/components/form-modal/confirm.tsx +147 -0
- package/src/components/form-modal/content.tsx +703 -0
- package/src/components/form-modal/deps.ts +77 -0
- package/src/components/form-modal/field-row.tsx +316 -0
- package/src/components/form-modal/host.tsx +169 -0
- package/src/components/form-modal/index.ts +2 -0
- package/src/components/form-modal/model.ts +134 -0
- package/src/components/form-modal/request.ts +74 -0
- package/src/components/form-modal/routes.ts +157 -0
- package/src/components/index.ts +162 -0
- package/src/components/input-search-bar.tsx +171 -0
- package/src/components/layout/detached-pane-shell.tsx +487 -0
- package/src/components/layout/floating-pane.tsx +196 -0
- package/src/components/layout/header.tsx +967 -0
- package/src/components/layout/market-summary.ts +154 -0
- package/src/components/layout/missing-pane.tsx +172 -0
- package/src/components/layout/pane/capture-stamp.ts +41 -0
- package/src/components/layout/pane/capture-status.ts +12 -0
- package/src/components/layout/pane/content.tsx +113 -0
- package/src/components/layout/pane/cycle-order.ts +23 -0
- package/src/components/layout/pane/error-boundary.tsx +103 -0
- package/src/components/layout/pane/footer/index.tsx +406 -0
- package/src/components/layout/pane/footer/keyboard.ts +99 -0
- package/src/components/layout/pane/footer/model.ts +456 -0
- package/src/components/layout/pane/footer/registration.tsx +278 -0
- package/src/components/layout/pane/frame.tsx +56 -0
- package/src/components/layout/pane/header-tabs.tsx +135 -0
- package/src/components/layout/pane/header.tsx +471 -0
- package/src/components/layout/pane/index.tsx +148 -0
- package/src/components/layout/pane/instrument-coverage-gate.tsx +57 -0
- package/src/components/layout/pane/pane-tabs.tsx +50 -0
- package/src/components/layout/pane/sidebar-metrics.ts +65 -0
- package/src/components/layout/pane/sidebar.tsx +448 -0
- package/src/components/layout/pane/sizing.ts +100 -0
- package/src/components/layout/pane/status-footer.ts +92 -0
- package/src/components/layout/pane/surface.ts +26 -0
- package/src/components/layout/pane/ticker-fate-gate.tsx +62 -0
- package/src/components/layout/pane/title.ts +111 -0
- package/src/components/layout/presentation.ts +22 -0
- package/src/components/layout/shell/action-menu-overlay.tsx +149 -0
- package/src/components/layout/shell/active-drag.ts +266 -0
- package/src/components/layout/shell/chrome.ts +127 -0
- package/src/components/layout/shell/cursor-occlusion.ts +206 -0
- package/src/components/layout/shell/drag/index.ts +456 -0
- package/src/components/layout/shell/drag/live.ts +203 -0
- package/src/components/layout/shell/drag/overlays.tsx +222 -0
- package/src/components/layout/shell/drag/runtime.ts +347 -0
- package/src/components/layout/shell/drag/slide.ts +10 -0
- package/src/components/layout/shell/fullscreen.ts +10 -0
- package/src/components/layout/shell/index.tsx +970 -0
- package/src/components/layout/shell/layout-state.ts +86 -0
- package/src/components/layout/shell/menu.ts +303 -0
- package/src/components/layout/shell/native/pointer-runtime.ts +209 -0
- package/src/components/layout/shell/native/surfaces.ts +143 -0
- package/src/components/layout/shell/native/window-state.ts +208 -0
- package/src/components/layout/shell/pane/actions.ts +223 -0
- package/src/components/layout/shell/pane/ask.ts +136 -0
- package/src/components/layout/shell/pane/capture.ts +177 -0
- package/src/components/layout/shell/pane/layers.tsx +777 -0
- package/src/components/layout/shell/pane/management-shortcuts.ts +239 -0
- package/src/components/layout/shell/pane/new-layout.ts +116 -0
- package/src/components/layout/shell/pane-occlusion.ts +63 -0
- package/src/components/layout/shell/shortcuts.ts +124 -0
- package/src/components/layout/shell/terminal-pointer-runtime.ts +380 -0
- package/src/components/layout/shell/ticker-link-menu.ts +115 -0
- package/src/components/layout/shell/visible-layout.ts +60 -0
- package/src/components/layout/shell/window-mode/index.ts +271 -0
- package/src/components/layout/shell/window-mode/overlays.tsx +225 -0
- package/src/components/layout/status-bar-groups.ts +85 -0
- package/src/components/layout/status-bar.tsx +755 -0
- package/src/components/layout/status-widget-space.ts +72 -0
- package/src/components/layout/titlebar-overlay.ts +17 -0
- package/src/components/layout/transient-layout.tsx +60 -0
- package/src/components/layout/window-controls.tsx +104 -0
- package/src/components/layout/window-edit/mode.ts +509 -0
- package/src/components/layout/window-edit/presentation.ts +138 -0
- package/src/components/layout/window-edit/status.tsx +121 -0
- package/src/components/layout/window-fullscreen.ts +32 -0
- package/src/components/markdown-editor.tsx +150 -0
- package/src/components/markdown-text.tsx +645 -0
- package/src/components/market-board/index.tsx +224 -0
- package/src/components/metric-treemap/heat-surface.tsx +828 -0
- package/src/components/metric-treemap/heat-tiles.ts +261 -0
- package/src/components/metric-treemap/index.tsx +352 -0
- package/src/components/metric-treemap/layout.ts +484 -0
- package/src/components/metric-treemap/scene.ts +432 -0
- package/src/components/onboarding/account-step/form-panel.tsx +196 -0
- package/src/components/onboarding/account-step/index.tsx +51 -0
- package/src/components/onboarding/account-step/qr-panel.tsx +47 -0
- package/src/components/onboarding/account-step/signed-in-panel.tsx +28 -0
- package/src/components/onboarding/desks-step.tsx +43 -0
- package/src/components/onboarding/first-run-workspace.ts +223 -0
- package/src/components/onboarding/onboarding-frame.tsx +597 -0
- package/src/components/onboarding/onboarding-keyboard.ts +311 -0
- package/src/components/onboarding/onboarding-steps.tsx +2 -0
- package/src/components/onboarding/onboarding-wizard.tsx +742 -0
- package/src/components/onboarding/portfolio-step/broker-fields-panel.tsx +177 -0
- package/src/components/onboarding/portfolio-step/broker-setup-panel.tsx +121 -0
- package/src/components/onboarding/portfolio-step/broker-sync-panel.tsx +40 -0
- package/src/components/onboarding/portfolio-step/choose-panel.tsx +39 -0
- package/src/components/onboarding/portfolio-step/index.tsx +74 -0
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +374 -0
- package/src/components/onboarding/portfolio-step/types.ts +34 -0
- package/src/components/onboarding/portfolio-step/utils.ts +15 -0
- package/src/components/onboarding/pro-step-layout.ts +86 -0
- package/src/components/onboarding/use-onboarding-broker-form.ts +266 -0
- package/src/components/onboarding/use-onboarding-progress.ts +298 -0
- package/src/components/onboarding/use-onboarding-upgrade.ts +87 -0
- package/src/components/onboarding/wizard-account.ts +182 -0
- package/src/components/onboarding/wizard-broker-sync.ts +282 -0
- package/src/components/onboarding/wizard-model.ts +161 -0
- package/src/components/onboarding/wizard-positions.ts +434 -0
- package/src/components/paged-rows.ts +217 -0
- package/src/components/pane-settings-dialog/desktop.tsx +261 -0
- package/src/components/pane-settings-dialog/field-dialogs.tsx +214 -0
- package/src/components/pane-settings-dialog/tui.tsx +121 -0
- package/src/components/pane-settings-dialog/value.ts +68 -0
- package/src/components/pane-settings-dialog.tsx +248 -0
- package/src/components/pane-template-wizard.tsx +60 -0
- package/src/components/price-performance.tsx +85 -0
- package/src/components/price-selector-dialog.tsx +215 -0
- package/src/components/price-sparkline/bitmap.ts +150 -0
- package/src/components/price-sparkline/index.ts +73 -0
- package/src/components/price-sparkline/model.ts +150 -0
- package/src/components/price-sparkline/view.tsx +226 -0
- package/src/components/quote-flash.ts +168 -0
- package/src/components/reader/article-reader.tsx +468 -0
- package/src/components/reader/article-text.ts +527 -0
- package/src/components/reader/detail-reader.tsx +239 -0
- package/src/components/reader/reader-text.tsx +281 -0
- package/src/components/sign-in-code-panel.tsx +203 -0
- package/src/components/sign-in-gate.tsx +169 -0
- package/src/components/speedometer-gauge/desktop.tsx +142 -0
- package/src/components/speedometer-gauge/index.tsx +42 -0
- package/src/components/speedometer-gauge/model.ts +57 -0
- package/src/components/speedometer-gauge/terminal.tsx +283 -0
- package/src/components/table-view-shared.tsx +243 -0
- package/src/components/textarea-keys.ts +13 -0
- package/src/components/ticker/badge/format.ts +121 -0
- package/src/components/ticker/badge/index.tsx +144 -0
- package/src/components/ticker/badge/list.tsx +146 -0
- package/src/components/ticker/badge/text.tsx +157 -0
- package/src/components/ticker/list-table-view.tsx +418 -0
- package/src/components/toggle-list.tsx +194 -0
- package/src/components/ui/action-row.tsx +36 -0
- package/src/components/ui/action-scope.tsx +96 -0
- package/src/components/ui/audio-player.tsx +70 -0
- package/src/components/ui/button.tsx +189 -0
- package/src/components/ui/card.tsx +75 -0
- package/src/components/ui/checkbox.tsx +80 -0
- package/src/components/ui/choice-dialog.tsx +120 -0
- package/src/components/ui/column-grid.tsx +250 -0
- package/src/components/ui/confirm-dialog.tsx +175 -0
- package/src/components/ui/country-flag-art.tsx +629 -0
- package/src/components/ui/country-flag.tsx +147 -0
- package/src/components/ui/data-table/hooks.ts +46 -0
- package/src/components/ui/data-table/index.tsx +179 -0
- package/src/components/ui/data-table/opentui/index.tsx +794 -0
- package/src/components/ui/data-table/opentui/model.ts +256 -0
- package/src/components/ui/data-table/stable-columns.ts +34 -0
- package/src/components/ui/data-table/types.ts +189 -0
- package/src/components/ui/data-table/visible-range.ts +47 -0
- package/src/components/ui/detail-scroll-body.tsx +75 -0
- package/src/components/ui/dialog-actions.tsx +44 -0
- package/src/components/ui/disclosure-marker.tsx +38 -0
- package/src/components/ui/display.tsx +260 -0
- package/src/components/ui/external-link.tsx +181 -0
- package/src/components/ui/field-grid.tsx +473 -0
- package/src/components/ui/field-ring.ts +125 -0
- package/src/components/ui/fields.tsx +425 -0
- package/src/components/ui/figure.tsx +96 -0
- package/src/components/ui/fill.ts +8 -0
- package/src/components/ui/frame.tsx +149 -0
- package/src/components/ui/header-case.ts +30 -0
- package/src/components/ui/icon.tsx +199 -0
- package/src/components/ui/index.ts +84 -0
- package/src/components/ui/inline-quick-add.tsx +144 -0
- package/src/components/ui/list-row-lines.tsx +87 -0
- package/src/components/ui/list-view.tsx +399 -0
- package/src/components/ui/loading.tsx +17 -0
- package/src/components/ui/logo-mark.tsx +73 -0
- package/src/components/ui/menu.tsx +152 -0
- package/src/components/ui/message-composer.tsx +172 -0
- package/src/components/ui/multi-select/dialog.tsx +643 -0
- package/src/components/ui/multi-select/index.ts +190 -0
- package/src/components/ui/number-prompt-dialog.tsx +71 -0
- package/src/components/ui/number-step.ts +54 -0
- package/src/components/ui/page-stack-view.tsx +137 -0
- package/src/components/ui/popover.tsx +10 -0
- package/src/components/ui/prose.tsx +280 -0
- package/src/components/ui/query-bar-keys.tsx +194 -0
- package/src/components/ui/query-bar.tsx +553 -0
- package/src/components/ui/quote.ts +42 -0
- package/src/components/ui/range-track.tsx +66 -0
- package/src/components/ui/ratio-bar.tsx +84 -0
- package/src/components/ui/remote-image.tsx +37 -0
- package/src/components/ui/reveal-in-scroll-box.ts +52 -0
- package/src/components/ui/row-notes.ts +79 -0
- package/src/components/ui/row-value-cache.ts +41 -0
- package/src/components/ui/select-button.tsx +215 -0
- package/src/components/ui/select-field.tsx +54 -0
- package/src/components/ui/shortcut-hint.tsx +69 -0
- package/src/components/ui/split-bar.tsx +69 -0
- package/src/components/ui/stat-grid.tsx +198 -0
- package/src/components/ui/status.tsx +347 -0
- package/src/components/ui/table-layout.ts +256 -0
- package/src/components/ui/tabs.tsx +587 -0
- package/src/components/ui/text-prompt-dialog.tsx +135 -0
- package/src/components/ui/toggle.tsx +136 -0
- package/src/components/ui/windowed-list.tsx +27 -0
- package/src/components/use-double-click-activation.ts +40 -0
- package/src/components/use-external-link-footer.ts +82 -0
- package/src/components/use-pane-notice-footer.tsx +128 -0
- package/src/components/use-pinned-moment.ts +19 -0
- package/src/components/use-scrollbox-layout.ts +17 -0
- package/src/core/app-runtime.ts +134 -0
- package/src/core/app-service-ports.ts +54 -0
- package/src/core/app-services.ts +48 -0
- package/src/core/connection-health.ts +293 -0
- package/src/core/state/app/instrument.ts +99 -0
- package/src/core/state/app/layout-reducer.ts +405 -0
- package/src/core/state/app/layout.ts +613 -0
- package/src/core/state/app/state.ts +401 -0
- package/src/core/state/app/types.ts +201 -0
- package/src/core/state/session-persistence.ts +150 -0
- package/src/data/app-persistence.ts +25 -0
- package/src/data/cached-query.ts +120 -0
- package/src/data/config/chart-settings.ts +709 -0
- package/src/data/config/home.ts +123 -0
- package/src/data/config/layout.ts +317 -0
- package/src/data/config/store/fold-panes.ts +340 -0
- package/src/data/config/store/index.ts +63 -0
- package/src/data/config/store/migrations.ts +294 -0
- package/src/data/config/store/node.ts +178 -0
- package/src/data/config/store/normalize.ts +517 -0
- package/src/data/config/store/pane-state.ts +47 -0
- package/src/data/config/store/portfolio-as-of-column.ts +57 -0
- package/src/data/json-persistence.ts +85 -0
- package/src/data/json-storage.ts +57 -0
- package/src/data/json-ticker-repository.ts +58 -0
- package/src/data/memory-resource-store.ts +152 -0
- package/src/data/plugin-cache.ts +119 -0
- package/src/data/plugin-state-store.ts +150 -0
- package/src/data/resource-store.ts +434 -0
- package/src/data/response-sequence.ts +6 -0
- package/src/data/saved-copies.ts +123 -0
- package/src/data/session-store.ts +59 -0
- package/src/data/sqlite/database.ts +80 -0
- package/src/data/sqlite/json.ts +18 -0
- package/src/data/sqlite/retry.ts +90 -0
- package/src/data/ticker-repository.ts +53 -0
- package/src/data/ticker-store.ts +65 -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 +8172 -0
- package/src/docs/topics.ts +216 -0
- package/src/feedback/diagnostics.ts +152 -0
- package/src/feedback/redact.ts +54 -0
- package/src/feedback/screenshot.ts +45 -0
- package/src/feedback/types.ts +60 -0
- package/src/i18n/es.ts +1674 -0
- package/src/i18n/index.ts +159 -0
- package/src/i18n/ja.ts +1670 -0
- package/src/i18n/ko.ts +1668 -0
- package/src/i18n/languages.ts +101 -0
- package/src/i18n/react.ts +6 -0
- package/src/i18n/zh-cn.ts +1670 -0
- package/src/i18n/zh-tw.ts +1670 -0
- package/src/layout/desk-keys.ts +7 -0
- package/src/layout/desks.ts +334 -0
- package/src/layout/launch-layout.ts +147 -0
- package/src/layout/pane-follow.ts +47 -0
- package/src/layout/pane-layout-move.ts +264 -0
- package/src/layout/pane-manager/dock-tree.ts +302 -0
- package/src/layout/pane-manager/docking.ts +209 -0
- package/src/layout/pane-manager/floating-actions.ts +160 -0
- package/src/layout/pane-manager/floating.ts +124 -0
- package/src/layout/pane-manager/gridlock-inference.ts +126 -0
- package/src/layout/pane-manager/gridlock.ts +143 -0
- package/src/layout/pane-manager/hidden-panes.ts +160 -0
- package/src/layout/pane-manager/index.ts +71 -0
- package/src/layout/pane-manager/layout-state.ts +203 -0
- package/src/layout/pane-manager/queries.ts +82 -0
- package/src/layout/pane-manager/types.ts +24 -0
- package/src/layout/pane-state.ts +48 -0
- package/src/layout/selected-ticker.ts +74 -0
- package/src/layout/ticker-navigation.ts +128 -0
- package/src/layout-marketplace/api.ts +65 -0
- package/src/layout-marketplace/cloud.ts +183 -0
- package/src/layout-marketplace/gallery-desktop.tsx +476 -0
- package/src/layout-marketplace/gallery-terminal.tsx +371 -0
- package/src/layout-marketplace/gallery.tsx +776 -0
- package/src/layout-marketplace/geometry.ts +80 -0
- package/src/layout-marketplace/linked-sync.ts +109 -0
- package/src/layout-marketplace/linked.ts +140 -0
- package/src/layout-marketplace/mini-workspace.tsx +428 -0
- package/src/layout-marketplace/model.ts +270 -0
- package/src/layout-marketplace/pane-imagery.ts +87 -0
- package/src/layout-marketplace/pane.tsx +20 -0
- package/src/layout-marketplace/use-marketplace.ts +130 -0
- package/src/market-data/bars-per-year.ts +43 -0
- package/src/market-data/bond-funds.ts +85 -0
- package/src/market-data/commodity-names.ts +80 -0
- package/src/market-data/coordinator/auxiliary.ts +275 -0
- package/src/market-data/coordinator/chart.ts +164 -0
- package/src/market-data/coordinator/entries.ts +180 -0
- package/src/market-data/coordinator/events.ts +103 -0
- package/src/market-data/coordinator/financials.ts +260 -0
- package/src/market-data/coordinator/fx-legs.ts +71 -0
- package/src/market-data/coordinator/index.ts +854 -0
- package/src/market-data/coordinator/quotes.ts +485 -0
- package/src/market-data/depositary-pair.ts +251 -0
- package/src/market-data/frame-scheduler.ts +335 -0
- package/src/market-data/futures-board.ts +255 -0
- package/src/market-data/futures-contract.ts +486 -0
- package/src/market-data/fx-closes.ts +164 -0
- package/src/market-data/history-session.ts +97 -0
- package/src/market-data/hooks.tsx +630 -0
- package/src/market-data/market/bar-period.ts +107 -0
- package/src/market-data/market/change-basis.ts +289 -0
- package/src/market-data/market/dated-previous-close.ts +203 -0
- package/src/market-data/market/format.ts +688 -0
- package/src/market-data/market/freshness.ts +793 -0
- package/src/market-data/market/futures-week.ts +68 -0
- package/src/market-data/market/index-level.ts +51 -0
- package/src/market-data/market/period-return.ts +163 -0
- package/src/market-data/market/price-basis.ts +9 -0
- package/src/market-data/market/session-close-note.ts +58 -0
- package/src/market-data/market/status.ts +588 -0
- package/src/market-data/market/trading-sessions.ts +149 -0
- package/src/market-data/market/year-to-date.ts +41 -0
- package/src/market-data/model-dividend-yield.ts +117 -0
- package/src/market-data/options-alternatives.ts +129 -0
- package/src/market-data/performance.ts +125 -0
- package/src/market-data/perpetual-premium.ts +32 -0
- package/src/market-data/portfolio-financials.ts +37 -0
- package/src/market-data/published-apac-sessions.ts +99 -0
- package/src/market-data/published-cn-sessions.ts +25 -0
- package/src/market-data/published-futures-sessions.ts +69 -0
- package/src/market-data/published-jpx-sessions.ts +22 -0
- package/src/market-data/published-nse-sessions.ts +20 -0
- package/src/market-data/published-us-sessions.ts +87 -0
- package/src/market-data/query-store.ts +95 -0
- package/src/market-data/quote-subscription-target.ts +79 -0
- package/src/market-data/quotes/clock.ts +56 -0
- package/src/market-data/quotes/contributions.ts +336 -0
- package/src/market-data/quotes/day-range.ts +106 -0
- package/src/market-data/quotes/delisting.ts +34 -0
- package/src/market-data/quotes/freshness.ts +174 -0
- package/src/market-data/quotes/intraday-bar.ts +37 -0
- package/src/market-data/quotes/live-valuation.ts +235 -0
- package/src/market-data/quotes/metadata.ts +66 -0
- package/src/market-data/quotes/regular-session-valuation.ts +198 -0
- package/src/market-data/quotes/resolution.ts +653 -0
- package/src/market-data/quotes/screener-live-quotes.ts +283 -0
- package/src/market-data/quotes/time.ts +83 -0
- package/src/market-data/realized-volatility.ts +301 -0
- package/src/market-data/request-types.ts +127 -0
- package/src/market-data/result-types.ts +53 -0
- package/src/market-data/selectors.ts +131 -0
- package/src/market-data/snapshot-provider.ts +299 -0
- package/src/market-data/tax-equivalent.ts +352 -0
- package/src/market-data/ticker-price-returns.ts +20 -0
- package/src/market-data/trace.ts +7 -0
- package/src/news/aggregator.ts +585 -0
- package/src/news/hooks.ts +66 -0
- package/src/news/news-model.ts +246 -0
- package/src/news/source-label.ts +22 -0
- package/src/news/ticker-symbols.ts +21 -0
- package/src/news/types.ts +99 -0
- package/src/notifications/app-badge.ts +30 -0
- package/src/notifications/app-notifier.ts +287 -0
- package/src/notifications/notification-log.ts +186 -0
- package/src/pane-settings.ts +89 -0
- package/src/plugins/absorbed.ts +33 -0
- package/src/plugins/auto-update-node.ts +115 -0
- package/src/plugins/auto-update.ts +281 -0
- package/src/plugins/builtin/account-management/calendar-tab.tsx +196 -0
- package/src/plugins/builtin/account-management/footer.ts +37 -0
- package/src/plugins/builtin/account-management/form-components.tsx +199 -0
- package/src/plugins/builtin/account-management/index.tsx +28 -0
- package/src/plugins/builtin/account-management/keyboard.ts +102 -0
- package/src/plugins/builtin/account-management/model.ts +358 -0
- package/src/plugins/builtin/account-management/navigation.ts +9 -0
- package/src/plugins/builtin/account-management/pane.tsx +1100 -0
- package/src/plugins/builtin/account-management/password-dialog.tsx +127 -0
- package/src/plugins/builtin/account-management/trial-cancel.ts +40 -0
- package/src/plugins/builtin/alerts/alert-engine.ts +119 -0
- package/src/plugins/builtin/alerts/calendar-events.ts +429 -0
- package/src/plugins/builtin/alerts/catalysts.ts +77 -0
- package/src/plugins/builtin/alerts/cli.ts +875 -0
- package/src/plugins/builtin/alerts/command.ts +88 -0
- package/src/plugins/builtin/alerts/constants.ts +12 -0
- package/src/plugins/builtin/alerts/event-rows.ts +20 -0
- package/src/plugins/builtin/alerts/events-pane.tsx +240 -0
- package/src/plugins/builtin/alerts/events.ts +260 -0
- package/src/plugins/builtin/alerts/fired-log.ts +119 -0
- package/src/plugins/builtin/alerts/focus.ts +27 -0
- package/src/plugins/builtin/alerts/format.ts +76 -0
- package/src/plugins/builtin/alerts/headless.ts +248 -0
- package/src/plugins/builtin/alerts/history-pane.tsx +161 -0
- package/src/plugins/builtin/alerts/history-rows.ts +92 -0
- package/src/plugins/builtin/alerts/history.ts +91 -0
- package/src/plugins/builtin/alerts/index.tsx +457 -0
- package/src/plugins/builtin/alerts/iv-level.ts +365 -0
- package/src/plugins/builtin/alerts/levels.ts +60 -0
- package/src/plugins/builtin/alerts/live.ts +136 -0
- package/src/plugins/builtin/alerts/metric-command.ts +61 -0
- package/src/plugins/builtin/alerts/metric-data.ts +70 -0
- package/src/plugins/builtin/alerts/metric-model.ts +175 -0
- package/src/plugins/builtin/alerts/metric-parity-fixture.json +725 -0
- package/src/plugins/builtin/alerts/pane.tsx +446 -0
- package/src/plugins/builtin/alerts/price.ts +35 -0
- package/src/plugins/builtin/alerts/quotes.ts +92 -0
- package/src/plugins/builtin/alerts/research-builder.ts +160 -0
- package/src/plugins/builtin/alerts/research-rules.ts +316 -0
- package/src/plugins/builtin/alerts/scheduled-check.ts +296 -0
- package/src/plugins/builtin/alerts/scheduled-sources.ts +48 -0
- package/src/plugins/builtin/alerts/scheduled.ts +413 -0
- package/src/plugins/builtin/alerts/storage.ts +62 -0
- package/src/plugins/builtin/alerts/targets.ts +101 -0
- package/src/plugins/builtin/alerts/types.ts +27 -0
- package/src/plugins/builtin/analytics/account-returns.ts +109 -0
- package/src/plugins/builtin/analytics/broker-performance.ts +131 -0
- package/src/plugins/builtin/analytics/display.ts +15 -0
- package/src/plugins/builtin/analytics/index.tsx +501 -0
- package/src/plugins/builtin/analytics/metrics.ts +218 -0
- package/src/plugins/builtin/analytics/pane-model.ts +487 -0
- package/src/plugins/builtin/analytics/portfolio-selection.ts +29 -0
- package/src/plugins/builtin/analytics/risk-book.ts +215 -0
- package/src/plugins/builtin/analytics/risk-client.ts +700 -0
- package/src/plugins/builtin/analytics/risk-evidence.ts +485 -0
- package/src/plugins/builtin/analytics/risk-fx.ts +163 -0
- package/src/plugins/builtin/analytics/risk-headless.ts +386 -0
- package/src/plugins/builtin/analytics/risk-math.ts +489 -0
- package/src/plugins/builtin/analytics/risk-model.ts +1242 -0
- package/src/plugins/builtin/analytics/risk-options.ts +265 -0
- package/src/plugins/builtin/analytics/risk-pane.tsx +833 -0
- package/src/plugins/builtin/analytics/risk-test-data.ts +262 -0
- package/src/plugins/builtin/analytics/sector-model.ts +187 -0
- package/src/plugins/builtin/analytics/sharpe-cadence.ts +136 -0
- package/src/plugins/builtin/analytics/view.tsx +186 -0
- 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 +44 -0
- package/src/plugins/builtin/attention/index.tsx +20 -0
- package/src/plugins/builtin/attention/model.ts +81 -0
- package/src/plugins/builtin/attention/pane.tsx +219 -0
- package/src/plugins/builtin/attention/series.ts +26 -0
- package/src/plugins/builtin/attention/trending.tsx +61 -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 +135 -0
- package/src/plugins/builtin/awards/index.tsx +22 -0
- package/src/plugins/builtin/awards/model.ts +100 -0
- package/src/plugins/builtin/awards/pane.tsx +286 -0
- package/src/plugins/builtin/awards/series.ts +29 -0
- package/src/plugins/builtin/backtest/client.ts +92 -0
- package/src/plugins/builtin/backtest/engine.ts +185 -0
- package/src/plugins/builtin/backtest/export.ts +27 -0
- package/src/plugins/builtin/backtest/format.ts +52 -0
- package/src/plugins/builtin/backtest/headless.ts +81 -0
- package/src/plugins/builtin/backtest/index.tsx +33 -0
- package/src/plugins/builtin/backtest/pane.tsx +301 -0
- package/src/plugins/builtin/backtest/presets.ts +60 -0
- package/src/plugins/builtin/backtest/report.ts +160 -0
- package/src/plugins/builtin/backtest/rules.ts +209 -0
- package/src/plugins/builtin/backtest/window.ts +125 -0
- package/src/plugins/builtin/bond-calculator/client.ts +28 -0
- package/src/plugins/builtin/bond-calculator/headless.ts +56 -0
- package/src/plugins/builtin/bond-calculator/index.tsx +10 -0
- package/src/plugins/builtin/bond-calculator/math.ts +164 -0
- package/src/plugins/builtin/bond-calculator/model.ts +64 -0
- package/src/plugins/builtin/bond-calculator/pane.tsx +160 -0
- package/src/plugins/builtin/broker-manager/add-flow.tsx +662 -0
- package/src/plugins/builtin/broker-manager/add-request.ts +34 -0
- package/src/plugins/builtin/broker-manager/detail.tsx +380 -0
- package/src/plugins/builtin/broker-manager/footer.ts +89 -0
- package/src/plugins/builtin/broker-manager/index.tsx +407 -0
- package/src/plugins/builtin/broker-manager/keyboard.ts +59 -0
- package/src/plugins/builtin/broker-manager/model.ts +181 -0
- package/src/plugins/builtin/broker-manager/pane-actions.tsx +364 -0
- package/src/plugins/builtin/broker-manager/sign-in-end.ts +82 -0
- package/src/plugins/builtin/broker-manager/table.ts +86 -0
- package/src/plugins/builtin/broker-trading/account-picker.tsx +92 -0
- package/src/plugins/builtin/broker-trading/chart-levels.ts +123 -0
- package/src/plugins/builtin/broker-trading/command.ts +103 -0
- package/src/plugins/builtin/broker-trading/controller.ts +730 -0
- package/src/plugins/builtin/broker-trading/dock.tsx +202 -0
- package/src/plugins/builtin/broker-trading/headless.ts +77 -0
- package/src/plugins/builtin/broker-trading/index.tsx +95 -0
- package/src/plugins/builtin/broker-trading/linked-orders.ts +148 -0
- package/src/plugins/builtin/broker-trading/order-feed.ts +456 -0
- package/src/plugins/builtin/broker-trading/orders-data.ts +133 -0
- package/src/plugins/builtin/broker-trading/orders.tsx +515 -0
- package/src/plugins/builtin/broker-trading/overview-orders.tsx +127 -0
- package/src/plugins/builtin/broker-trading/pane-model.ts +235 -0
- package/src/plugins/builtin/broker-trading/pane.tsx +594 -0
- package/src/plugins/builtin/broker-trading/strategy.ts +153 -0
- package/src/plugins/builtin/broker-trading/ticket-parts.tsx +146 -0
- package/src/plugins/builtin/broker-trading/ticket.tsx +659 -0
- package/src/plugins/builtin/buildout/cells.tsx +198 -0
- package/src/plugins/builtin/buildout/data-runtime.ts +243 -0
- package/src/plugins/builtin/buildout/detail/company.tsx +279 -0
- package/src/plugins/builtin/buildout/detail/index.tsx +82 -0
- package/src/plugins/builtin/buildout/detail/intel.tsx +56 -0
- package/src/plugins/builtin/buildout/detail/satellite-images.tsx +80 -0
- package/src/plugins/builtin/buildout/detail/site.tsx +115 -0
- package/src/plugins/builtin/buildout/detail/ui.tsx +235 -0
- package/src/plugins/builtin/buildout/detail/values.ts +67 -0
- package/src/plugins/builtin/buildout/format.ts +186 -0
- package/src/plugins/builtin/buildout/index.tsx +24 -0
- package/src/plugins/builtin/buildout/model/index.ts +144 -0
- package/src/plugins/builtin/buildout/model/normalizers.ts +396 -0
- package/src/plugins/builtin/buildout/model/types.ts +321 -0
- package/src/plugins/builtin/buildout/pane/index.tsx +467 -0
- package/src/plugins/builtin/buildout/pane/status.tsx +87 -0
- package/src/plugins/builtin/buildout/table-model.ts +431 -0
- package/src/plugins/builtin/builtin-plugin-meta.ts +161 -0
- package/src/plugins/builtin/catalysts/client.ts +28 -0
- package/src/plugins/builtin/catalysts/detail.tsx +89 -0
- package/src/plugins/builtin/catalysts/evidence.ts +47 -0
- package/src/plugins/builtin/catalysts/headless.ts +59 -0
- package/src/plugins/builtin/catalysts/history.ts +26 -0
- package/src/plugins/builtin/catalysts/index.tsx +31 -0
- package/src/plugins/builtin/catalysts/model.ts +280 -0
- package/src/plugins/builtin/catalysts/pane.tsx +163 -0
- package/src/plugins/builtin/cds/client.ts +169 -0
- package/src/plugins/builtin/cds/headless.ts +367 -0
- package/src/plugins/builtin/cds/index.tsx +39 -0
- package/src/plugins/builtin/cds/model.ts +815 -0
- package/src/plugins/builtin/cds/pane.tsx +547 -0
- package/src/plugins/builtin/cds/series.ts +19 -0
- package/src/plugins/builtin/central-bank-rates/client.ts +66 -0
- package/src/plugins/builtin/central-bank-rates/headless.ts +81 -0
- package/src/plugins/builtin/central-bank-rates/index.tsx +20 -0
- package/src/plugins/builtin/central-bank-rates/model.ts +151 -0
- package/src/plugins/builtin/central-bank-rates/pane.tsx +73 -0
- package/src/plugins/builtin/central-bank-rates/series.ts +36 -0
- package/src/plugins/builtin/changelog/index.tsx +310 -0
- package/src/plugins/builtin/changelog/model.ts +88 -0
- package/src/plugins/builtin/chart-composer/catalog-inventory.ts +365 -0
- package/src/plugins/builtin/chart-composer/chart-spec-edit.ts +580 -0
- package/src/plugins/builtin/chart-composer/chart-spec.ts +159 -0
- package/src/plugins/builtin/chart-composer/cli-options.ts +127 -0
- package/src/plugins/builtin/chart-composer/data-catalog-pane.tsx +316 -0
- package/src/plugins/builtin/chart-composer/editor/controller.ts +657 -0
- package/src/plugins/builtin/chart-composer/editor/desktop-view.tsx +138 -0
- package/src/plugins/builtin/chart-composer/editor/model.ts +297 -0
- package/src/plugins/builtin/chart-composer/editor/opentui-view.tsx +111 -0
- package/src/plugins/builtin/chart-composer/editor.tsx +252 -0
- package/src/plugins/builtin/chart-composer/field-series.ts +40 -0
- package/src/plugins/builtin/chart-composer/follow-binding.ts +78 -0
- package/src/plugins/builtin/chart-composer/formula.ts +286 -0
- package/src/plugins/builtin/chart-composer/headless-schema.ts +250 -0
- package/src/plugins/builtin/chart-composer/headless.ts +802 -0
- package/src/plugins/builtin/chart-composer/index.tsx +544 -0
- package/src/plugins/builtin/chart-composer/leverage-overlay.ts +142 -0
- package/src/plugins/builtin/chart-composer/option-range.ts +39 -0
- package/src/plugins/builtin/chart-composer/pane.tsx +1448 -0
- package/src/plugins/builtin/chart-composer/presets.ts +320 -0
- package/src/plugins/builtin/chart-composer/price-levels.ts +80 -0
- package/src/plugins/builtin/chart-composer/quick-add.tsx +488 -0
- package/src/plugins/builtin/chart-composer/semantic.ts +113 -0
- package/src/plugins/builtin/chart-composer/series-catalog.ts +473 -0
- package/src/plugins/builtin/chart-composer/series-expression.ts +274 -0
- package/src/plugins/builtin/chart-composer/series-listings.ts +178 -0
- package/src/plugins/builtin/chart-composer/session-history.ts +382 -0
- package/src/plugins/builtin/chart-composer/session-range.ts +89 -0
- package/src/plugins/builtin/chart-composer/settings.ts +500 -0
- package/src/plugins/builtin/chart-composer/shortcuts.ts +27 -0
- package/src/plugins/builtin/chart-composer/studies.ts +242 -0
- package/src/plugins/builtin/chart-composer/use-series-catalog.ts +384 -0
- package/src/plugins/builtin/chart-composer/user-series.ts +84 -0
- package/src/plugins/builtin/chart-composer/viewport-labels.ts +93 -0
- package/src/plugins/builtin/chat/attachments/desktop.tsx +614 -0
- package/src/plugins/builtin/chat/attachments/files.ts +45 -0
- package/src/plugins/builtin/chat/attachments/model.ts +168 -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/channel-labels.ts +67 -0
- package/src/plugins/builtin/chat/channels.ts +170 -0
- package/src/plugins/builtin/chat/command-bar.ts +136 -0
- package/src/plugins/builtin/chat/composer-commands.ts +54 -0
- package/src/plugins/builtin/chat/content/channel-navigation.ts +285 -0
- package/src/plugins/builtin/chat/content/command-suggestions.ts +92 -0
- package/src/plugins/builtin/chat/content/composer-cursor.ts +29 -0
- package/src/plugins/builtin/chat/content/composer-runtime.ts +471 -0
- package/src/plugins/builtin/chat/content/composer.tsx +310 -0
- package/src/plugins/builtin/chat/content/footer.tsx +321 -0
- package/src/plugins/builtin/chat/content/handle-prompt.tsx +326 -0
- package/src/plugins/builtin/chat/content/index.tsx +1289 -0
- package/src/plugins/builtin/chat/content/layout-metrics.ts +98 -0
- package/src/plugins/builtin/chat/content/mentions.ts +118 -0
- package/src/plugins/builtin/chat/content/new-dm-dialog.tsx +431 -0
- package/src/plugins/builtin/chat/content/new-messages.tsx +89 -0
- package/src/plugins/builtin/chat/content/open-targets.ts +80 -0
- package/src/plugins/builtin/chat/content/row-activity.ts +132 -0
- package/src/plugins/builtin/chat/content/scroll.ts +396 -0
- package/src/plugins/builtin/chat/content/selection-runtime.ts +66 -0
- package/src/plugins/builtin/chat/content/shortcuts.ts +344 -0
- package/src/plugins/builtin/chat/content/snapshot.ts +202 -0
- package/src/plugins/builtin/chat/content/transcript.tsx +296 -0
- package/src/plugins/builtin/chat/content/types.ts +35 -0
- package/src/plugins/builtin/chat/content/user-map.ts +23 -0
- package/src/plugins/builtin/chat/content/whole-message-copy.ts +112 -0
- package/src/plugins/builtin/chat/controller/attachments.ts +213 -0
- package/src/plugins/builtin/chat/controller/channel-actions.ts +97 -0
- package/src/plugins/builtin/chat/controller/channels.ts +180 -0
- package/src/plugins/builtin/chat/controller/connections.ts +110 -0
- package/src/plugins/builtin/chat/controller/draft-sync.ts +41 -0
- package/src/plugins/builtin/chat/controller/fetch.ts +85 -0
- package/src/plugins/builtin/chat/controller/index.ts +980 -0
- package/src/plugins/builtin/chat/controller/lifecycle.ts +153 -0
- package/src/plugins/builtin/chat/controller/mention-candidates.ts +104 -0
- package/src/plugins/builtin/chat/controller/message-loading.ts +104 -0
- package/src/plugins/builtin/chat/controller/messages.ts +243 -0
- package/src/plugins/builtin/chat/controller/notifications.ts +153 -0
- package/src/plugins/builtin/chat/controller/persistence.ts +170 -0
- package/src/plugins/builtin/chat/controller/realtime.ts +169 -0
- package/src/plugins/builtin/chat/controller/send.ts +250 -0
- package/src/plugins/builtin/chat/controller/session-runtime.ts +245 -0
- package/src/plugins/builtin/chat/controller/session.ts +41 -0
- package/src/plugins/builtin/chat/controller/state.ts +221 -0
- package/src/plugins/builtin/chat/controller/storage.ts +134 -0
- package/src/plugins/builtin/chat/controller/unread-people.ts +240 -0
- package/src/plugins/builtin/chat/controller/utils.ts +65 -0
- package/src/plugins/builtin/chat/controller/view.ts +103 -0
- package/src/plugins/builtin/chat/conversation-recency.ts +73 -0
- package/src/plugins/builtin/chat/conversations.ts +263 -0
- package/src/plugins/builtin/chat/direct-messages.ts +200 -0
- package/src/plugins/builtin/chat/discord-command.ts +91 -0
- package/src/plugins/builtin/chat/edit-window.ts +30 -0
- package/src/plugins/builtin/chat/ghost-user.ts +42 -0
- package/src/plugins/builtin/chat/handle-prompt.ts +128 -0
- package/src/plugins/builtin/chat/index.tsx +229 -0
- package/src/plugins/builtin/chat/layout.ts +570 -0
- package/src/plugins/builtin/chat/markdown.ts +94 -0
- package/src/plugins/builtin/chat/message/desktop.tsx +276 -0
- package/src/plugins/builtin/chat/message/header.tsx +209 -0
- package/src/plugins/builtin/chat/message/inline-tokens.tsx +315 -0
- package/src/plugins/builtin/chat/message/pane-chip.tsx +349 -0
- package/src/plugins/builtin/chat/message/pending-send.ts +35 -0
- package/src/plugins/builtin/chat/message/person-icons.tsx +53 -0
- package/src/plugins/builtin/chat/message/profile-popover.tsx +379 -0
- package/src/plugins/builtin/chat/message/reactions.tsx +210 -0
- package/src/plugins/builtin/chat/message/render-state.ts +151 -0
- package/src/plugins/builtin/chat/message/terminal.tsx +234 -0
- package/src/plugins/builtin/chat/message/types.ts +52 -0
- package/src/plugins/builtin/chat/pane-links/commands.ts +265 -0
- package/src/plugins/builtin/chat/pane-links/composer.ts +87 -0
- package/src/plugins/builtin/chat/pane-links/model.ts +158 -0
- package/src/plugins/builtin/chat/pane-links/open.ts +36 -0
- package/src/plugins/builtin/chat/pane-links/previews.ts +119 -0
- package/src/plugins/builtin/chat/pane-requests.ts +60 -0
- package/src/plugins/builtin/chat/pane-state.ts +115 -0
- package/src/plugins/builtin/chat/pane.tsx +145 -0
- package/src/plugins/builtin/chat/people.ts +202 -0
- package/src/plugins/builtin/chat/profile-popover.ts +207 -0
- package/src/plugins/builtin/chat/reactions.ts +197 -0
- package/src/plugins/builtin/chat/share/flow.tsx +32 -0
- package/src/plugins/builtin/chat/sidebar-rows.ts +109 -0
- package/src/plugins/builtin/chat/sidebar-store.ts +100 -0
- package/src/plugins/builtin/chat/sidebar.tsx +345 -0
- package/src/plugins/builtin/chat/status-widget.tsx +114 -0
- package/src/plugins/builtin/chat/unread-badge.ts +96 -0
- package/src/plugins/builtin/chat/unread-inbox-pane.tsx +281 -0
- package/src/plugins/builtin/chat/unread-inbox.ts +113 -0
- package/src/plugins/builtin/clinical-trials/client.ts +265 -0
- package/src/plugins/builtin/clinical-trials/index.tsx +83 -0
- package/src/plugins/builtin/clinical-trials/model.ts +278 -0
- package/src/plugins/builtin/clinical-trials/pane.tsx +430 -0
- package/src/plugins/builtin/clinical-trials/sponsor-tickers.ts +156 -0
- package/src/plugins/builtin/clinical-trials/ticker-sponsor.ts +17 -0
- package/src/plugins/builtin/clinical-trials/types.ts +2 -0
- package/src/plugins/builtin/cloud/askg/attached-pane.tsx +69 -0
- package/src/plugins/builtin/cloud/askg/controller.ts +714 -0
- package/src/plugins/builtin/cloud/askg/conversation-store.ts +243 -0
- package/src/plugins/builtin/cloud/askg/executor.ts +476 -0
- package/src/plugins/builtin/cloud/askg/host.ts +94 -0
- package/src/plugins/builtin/cloud/askg/json.ts +31 -0
- package/src/plugins/builtin/cloud/askg/lock-note.ts +16 -0
- package/src/plugins/builtin/cloud/askg/manifest.ts +368 -0
- package/src/plugins/builtin/cloud/askg/model.ts +854 -0
- package/src/plugins/builtin/cloud/askg/notes.ts +100 -0
- package/src/plugins/builtin/cloud/askg/pane-attachment.ts +93 -0
- package/src/plugins/builtin/cloud/askg/pane.tsx +1749 -0
- package/src/plugins/builtin/cloud/askg/pending-question.ts +27 -0
- package/src/plugins/builtin/cloud/askg/protocol.ts +377 -0
- package/src/plugins/builtin/cloud/askg/result-budget.ts +156 -0
- package/src/plugins/builtin/cloud/askg/sidebar.tsx +184 -0
- package/src/plugins/builtin/cloud/askg/tool-display.ts +440 -0
- package/src/plugins/builtin/cloud/askg/tool-timeline.tsx +404 -0
- package/src/plugins/builtin/cloud/askg/undo.ts +254 -0
- package/src/plugins/builtin/cloud/askg/user-data.ts +89 -0
- package/src/plugins/builtin/cloud/auth-actions.tsx +158 -0
- package/src/plugins/builtin/cloud/auth-commands.ts +103 -0
- package/src/plugins/builtin/cloud/browser.tsx +3 -0
- package/src/plugins/builtin/cloud/company-picker.tsx +645 -0
- package/src/plugins/builtin/cloud/index.tsx +4 -0
- package/src/plugins/builtin/cloud/mcp-connect/command.ts +24 -0
- package/src/plugins/builtin/cloud/mcp-connect/dialog.tsx +366 -0
- package/src/plugins/builtin/cloud/mcp-connect/model.ts +135 -0
- package/src/plugins/builtin/cloud/mcp-connect/sections.ts +62 -0
- package/src/plugins/builtin/cloud/plugin.tsx +203 -0
- package/src/plugins/builtin/cloud/team/acm-tab.tsx +127 -0
- package/src/plugins/builtin/cloud/team/capability.ts +71 -0
- package/src/plugins/builtin/cloud/team/command.ts +313 -0
- package/src/plugins/builtin/cloud/team/module.tsx +81 -0
- package/src/plugins/builtin/cloud/team/pane-model.ts +185 -0
- package/src/plugins/builtin/cloud/team/pane-sections.tsx +576 -0
- package/src/plugins/builtin/cloud/team/pane-ui.tsx +362 -0
- package/src/plugins/builtin/cloud/team/pane.tsx +940 -0
- package/src/plugins/builtin/cloud/team/status-widget.tsx +78 -0
- package/src/plugins/builtin/cloud/team/team-state-host.ts +70 -0
- package/src/plugins/builtin/cloud/team/views.ts +192 -0
- package/src/plugins/builtin/cloud/terminal-relay/acm-tab.tsx +89 -0
- package/src/plugins/builtin/cloud/terminal-relay/client.ts +97 -0
- package/src/plugins/builtin/cloud/terminal-relay/connect-section.tsx +57 -0
- package/src/plugins/builtin/cloud/terminal-relay/engine.ts +739 -0
- package/src/plugins/builtin/cloud/terminal-relay/grants.ts +137 -0
- package/src/plugins/builtin/cloud/terminal-relay/host.tsx +81 -0
- package/src/plugins/builtin/cloud/terminal-relay/indicator.tsx +82 -0
- package/src/plugins/builtin/cloud/terminal-relay/manifest.ts +250 -0
- package/src/plugins/builtin/cloud/terminal-relay/policy.ts +162 -0
- package/src/plugins/builtin/cloud/terminal-relay/prompts.tsx +193 -0
- package/src/plugins/builtin/cloud/terminal-relay/redact.ts +73 -0
- package/src/plugins/builtin/cloud/terminal-relay/summary.ts +62 -0
- package/src/plugins/builtin/cloud/thesis/board-pane.tsx +484 -0
- package/src/plugins/builtin/cloud/thesis/detail.tsx +539 -0
- package/src/plugins/builtin/cloud/thesis/exposure.ts +145 -0
- package/src/plugins/builtin/cloud/thesis/flows.ts +553 -0
- package/src/plugins/builtin/cloud/thesis/model.ts +399 -0
- package/src/plugins/builtin/cloud/thesis/module.tsx +65 -0
- package/src/plugins/builtin/cloud/thesis/pane-request.ts +30 -0
- package/src/plugins/builtin/cloud/thesis/prompts.tsx +104 -0
- package/src/plugins/builtin/cloud/thesis/store.ts +302 -0
- package/src/plugins/builtin/cloud/thesis/ticker-tab.tsx +140 -0
- package/src/plugins/builtin/cloud/trial-offer-status-widget.tsx +203 -0
- package/src/plugins/builtin/cloud/upgrade-command.ts +35 -0
- package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +45 -0
- package/src/plugins/builtin/cloud/verification-status-widget.tsx +75 -0
- package/src/plugins/builtin/cloud-tweets/footer.ts +40 -0
- package/src/plugins/builtin/cloud-tweets/index.ts +6 -0
- package/src/plugins/builtin/cloud-tweets/keyboard.ts +34 -0
- package/src/plugins/builtin/cloud-tweets/model.ts +280 -0
- package/src/plugins/builtin/cloud-tweets/pane.tsx +327 -0
- package/src/plugins/builtin/cloud-tweets/registration.ts +130 -0
- package/src/plugins/builtin/cloud-tweets/search-bar.tsx +38 -0
- package/src/plugins/builtin/cloud-tweets/table.tsx +551 -0
- package/src/plugins/builtin/cloud-tweets/tweet-text.ts +18 -0
- package/src/plugins/builtin/comment-letters/client.ts +340 -0
- package/src/plugins/builtin/comment-letters/index.tsx +75 -0
- package/src/plugins/builtin/comment-letters/pane.tsx +314 -0
- package/src/plugins/builtin/comment-letters/types.ts +43 -0
- package/src/plugins/builtin/commodities-energy/index.tsx +228 -0
- package/src/plugins/builtin/commodities-energy/view-state.ts +13 -0
- package/src/plugins/builtin/commodity-balances/client.ts +68 -0
- package/src/plugins/builtin/commodity-balances/headless.ts +107 -0
- package/src/plugins/builtin/commodity-balances/index.tsx +47 -0
- package/src/plugins/builtin/commodity-balances/model.ts +108 -0
- package/src/plugins/builtin/commodity-balances/pane.tsx +267 -0
- package/src/plugins/builtin/company-attention/app-rank.tsx +80 -0
- package/src/plugins/builtin/company-attention/building-model.ts +222 -0
- package/src/plugins/builtin/company-attention/building.tsx +172 -0
- package/src/plugins/builtin/company-attention/client.ts +185 -0
- package/src/plugins/builtin/company-attention/evidence.ts +58 -0
- package/src/plugins/builtin/company-attention/headless.ts +172 -0
- package/src/plugins/builtin/company-attention/index.tsx +35 -0
- package/src/plugins/builtin/company-attention/model.ts +270 -0
- package/src/plugins/builtin/company-attention/moves-model.ts +253 -0
- package/src/plugins/builtin/company-attention/moves.tsx +159 -0
- package/src/plugins/builtin/company-attention/pane.tsx +246 -0
- package/src/plugins/builtin/company-attention/series.ts +52 -0
- package/src/plugins/builtin/company-attention/signals-model.ts +229 -0
- package/src/plugins/builtin/company-attention/signals.tsx +160 -0
- package/src/plugins/builtin/company-kpis/client.ts +108 -0
- package/src/plugins/builtin/company-kpis/headless.ts +122 -0
- package/src/plugins/builtin/company-kpis/index.tsx +26 -0
- package/src/plugins/builtin/company-kpis/model.ts +229 -0
- package/src/plugins/builtin/company-kpis/pane.tsx +256 -0
- package/src/plugins/builtin/company-kpis/related.ts +11 -0
- package/src/plugins/builtin/company-kpis/screenshot-evidence.ts +51 -0
- package/src/plugins/builtin/composite-plugins.ts +284 -0
- package/src/plugins/builtin/congress-trades/aggregates.ts +69 -0
- package/src/plugins/builtin/congress-trades/client.ts +13 -0
- package/src/plugins/builtin/congress-trades/detail.tsx +340 -0
- package/src/plugins/builtin/congress-trades/filters.tsx +36 -0
- package/src/plugins/builtin/congress-trades/footer.ts +86 -0
- package/src/plugins/builtin/congress-trades/headless.ts +212 -0
- package/src/plugins/builtin/congress-trades/index.tsx +26 -0
- package/src/plugins/builtin/congress-trades/keyboard.ts +45 -0
- package/src/plugins/builtin/congress-trades/model.ts +399 -0
- package/src/plugins/builtin/congress-trades/pane.tsx +519 -0
- package/src/plugins/builtin/congress-trades/table.tsx +102 -0
- package/src/plugins/builtin/connections/index.ts +58 -0
- package/src/plugins/builtin/connections/pane.tsx +243 -0
- package/src/plugins/builtin/correlation/compute.ts +139 -0
- package/src/plugins/builtin/correlation/geo.ts +34 -0
- package/src/plugins/builtin/correlation/headless-schema.ts +73 -0
- package/src/plugins/builtin/correlation/headless.ts +150 -0
- package/src/plugins/builtin/correlation/history.ts +21 -0
- package/src/plugins/builtin/correlation/index.tsx +490 -0
- package/src/plugins/builtin/correlation/matrix/model.ts +199 -0
- package/src/plugins/builtin/correlation/matrix/pair-chart.tsx +48 -0
- package/src/plugins/builtin/correlation/matrix/selection.ts +79 -0
- package/src/plugins/builtin/correlation/matrix/symbol-cell.tsx +57 -0
- package/src/plugins/builtin/correlation/relationship/history.ts +46 -0
- package/src/plugins/builtin/correlation/relationship/model.ts +267 -0
- package/src/plugins/builtin/correlation/relationship/pane.tsx +354 -0
- package/src/plugins/builtin/correlation/relationship/view-model.ts +123 -0
- package/src/plugins/builtin/correlation/settings.ts +95 -0
- package/src/plugins/builtin/cot/client.ts +107 -0
- package/src/plugins/builtin/cot/headless.ts +91 -0
- package/src/plugins/builtin/cot/index.tsx +28 -0
- package/src/plugins/builtin/cot/model.ts +264 -0
- package/src/plugins/builtin/cot/pane.tsx +192 -0
- package/src/plugins/builtin/cot/series.ts +27 -0
- package/src/plugins/builtin/cpi/client.ts +66 -0
- package/src/plugins/builtin/cpi/headless.ts +86 -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 +160 -0
- package/src/plugins/builtin/credit-boards/cdx-pane.tsx +178 -0
- package/src/plugins/builtin/credit-boards/client.ts +119 -0
- package/src/plugins/builtin/credit-boards/headless.ts +218 -0
- package/src/plugins/builtin/credit-boards/index.tsx +54 -0
- package/src/plugins/builtin/credit-boards/model.ts +323 -0
- package/src/plugins/builtin/credit-boards/series.ts +66 -0
- package/src/plugins/builtin/credit-boards/sovr-pane.tsx +156 -0
- package/src/plugins/builtin/credit-conditions/client.ts +121 -0
- package/src/plugins/builtin/credit-conditions/headless.ts +68 -0
- package/src/plugins/builtin/credit-conditions/index.tsx +159 -0
- package/src/plugins/builtin/credit-conditions/model.ts +94 -0
- package/src/plugins/builtin/credit-conditions/series.ts +16 -0
- package/src/plugins/builtin/credit-documents/client.ts +99 -0
- package/src/plugins/builtin/credit-documents/detail.tsx +110 -0
- package/src/plugins/builtin/credit-documents/evidence.ts +64 -0
- package/src/plugins/builtin/credit-documents/gauge.tsx +52 -0
- package/src/plugins/builtin/credit-documents/headless.ts +72 -0
- package/src/plugins/builtin/credit-documents/index.tsx +39 -0
- package/src/plugins/builtin/credit-documents/model.ts +329 -0
- package/src/plugins/builtin/credit-documents/pane.tsx +188 -0
- package/src/plugins/builtin/crypto-board/client.ts +369 -0
- package/src/plugins/builtin/crypto-board/defi-view.tsx +218 -0
- package/src/plugins/builtin/crypto-board/defi.ts +239 -0
- package/src/plugins/builtin/crypto-board/headless.ts +304 -0
- package/src/plugins/builtin/crypto-board/index.tsx +49 -0
- package/src/plugins/builtin/crypto-board/model.ts +521 -0
- package/src/plugins/builtin/crypto-board/pane.tsx +419 -0
- package/src/plugins/builtin/crypto-board/series.ts +117 -0
- package/src/plugins/builtin/crypto-board/supply.ts +123 -0
- package/src/plugins/builtin/crypto-etf-flows/client.ts +60 -0
- package/src/plugins/builtin/crypto-etf-flows/headless.ts +132 -0
- package/src/plugins/builtin/crypto-etf-flows/index.tsx +44 -0
- package/src/plugins/builtin/crypto-etf-flows/model.ts +121 -0
- package/src/plugins/builtin/crypto-etf-flows/pane.tsx +193 -0
- package/src/plugins/builtin/custom-view/index.tsx +69 -0
- package/src/plugins/builtin/custom-view/live-quotes.ts +143 -0
- package/src/plugins/builtin/custom-view/loader.ts +158 -0
- package/src/plugins/builtin/custom-view/pane.tsx +415 -0
- package/src/plugins/builtin/custom-view/sources.ts +146 -0
- package/src/plugins/builtin/custom-view/view-spec.ts +462 -0
- package/src/plugins/builtin/debt-maturities/client.ts +438 -0
- package/src/plugins/builtin/debt-maturities/headless.ts +125 -0
- package/src/plugins/builtin/debt-maturities/index.tsx +33 -0
- package/src/plugins/builtin/debt-maturities/model.ts +231 -0
- package/src/plugins/builtin/debt-maturities/pane.tsx +692 -0
- package/src/plugins/builtin/debt-maturities/series.ts +45 -0
- package/src/plugins/builtin/debt-maturities/wall-bar.tsx +36 -0
- package/src/plugins/builtin/debug/index.tsx +336 -0
- package/src/plugins/builtin/debug/template.ts +8 -0
- package/src/plugins/builtin/dividend-yield/browser.tsx +3 -0
- package/src/plugins/builtin/dividend-yield/client.ts +223 -0
- package/src/plugins/builtin/dividend-yield/headless.ts +312 -0
- package/src/plugins/builtin/dividend-yield/index.tsx +85 -0
- package/src/plugins/builtin/dividend-yield/model.ts +50 -0
- package/src/plugins/builtin/dividend-yield/pane.tsx +307 -0
- package/src/plugins/builtin/dividend-yield/provider-client.ts +52 -0
- package/src/plugins/builtin/dividend-yield/ranking.ts +187 -0
- package/src/plugins/builtin/dividend-yield/reference-price.ts +50 -0
- package/src/plugins/builtin/dividend-yield/series.ts +20 -0
- package/src/plugins/builtin/dividend-yield/types.ts +31 -0
- package/src/plugins/builtin/dividend-yield/view.ts +64 -0
- package/src/plugins/builtin/docs/blocks.tsx +239 -0
- package/src/plugins/builtin/docs/index.tsx +70 -0
- package/src/plugins/builtin/docs/pane.tsx +447 -0
- package/src/plugins/builtin/docs/targets.ts +74 -0
- package/src/plugins/builtin/docs/use-docs.ts +60 -0
- package/src/plugins/builtin/doe/client.ts +77 -0
- package/src/plugins/builtin/doe/headless.ts +110 -0
- package/src/plugins/builtin/doe/index.tsx +50 -0
- package/src/plugins/builtin/doe/model.ts +252 -0
- package/src/plugins/builtin/doe/pane.tsx +156 -0
- package/src/plugins/builtin/doe/prices.ts +84 -0
- package/src/plugins/builtin/doe/range-bar.tsx +15 -0
- package/src/plugins/builtin/doe/series.ts +65 -0
- package/src/plugins/builtin/earnings/board-model.ts +251 -0
- package/src/plugins/builtin/earnings/board-table.ts +147 -0
- package/src/plugins/builtin/earnings/board.tsx +475 -0
- package/src/plugins/builtin/earnings/calendar-model.ts +188 -0
- package/src/plugins/builtin/earnings/calendar.tsx +338 -0
- package/src/plugins/builtin/earnings/client.ts +99 -0
- package/src/plugins/builtin/earnings/data/cache.ts +84 -0
- package/src/plugins/builtin/earnings/format.ts +58 -0
- package/src/plugins/builtin/earnings/headless.ts +303 -0
- package/src/plugins/builtin/earnings/history-model.ts +213 -0
- package/src/plugins/builtin/earnings/history-table.ts +106 -0
- package/src/plugins/builtin/earnings/history.tsx +141 -0
- package/src/plugins/builtin/earnings/index.tsx +158 -0
- package/src/plugins/builtin/earnings/model.ts +22 -0
- package/src/plugins/builtin/earnings/no-earnings.ts +52 -0
- package/src/plugins/builtin/earnings/scope.ts +89 -0
- package/src/plugins/builtin/earnings-calls/calendar.tsx +310 -0
- package/src/plugins/builtin/earnings-calls/data.ts +515 -0
- package/src/plugins/builtin/earnings-calls/format.ts +43 -0
- package/src/plugins/builtin/earnings-calls/headless.ts +456 -0
- package/src/plugins/builtin/earnings-calls/index.tsx +82 -0
- package/src/plugins/builtin/earnings-calls/lock-note.ts +26 -0
- package/src/plugins/builtin/earnings-calls/model.ts +336 -0
- package/src/plugins/builtin/earnings-calls/pane.tsx +1124 -0
- package/src/plugins/builtin/earnings-calls/prose.ts +62 -0
- package/src/plugins/builtin/earnings-calls/transcript-view.tsx +457 -0
- package/src/plugins/builtin/earnings-calls/upcoming.ts +195 -0
- package/src/plugins/builtin/earnings-calls/use-call-playback.ts +194 -0
- package/src/plugins/builtin/earnings-ripple/client.ts +133 -0
- package/src/plugins/builtin/earnings-ripple/headless.ts +55 -0
- package/src/plugins/builtin/earnings-ripple/index.tsx +37 -0
- package/src/plugins/builtin/earnings-ripple/model.ts +188 -0
- package/src/plugins/builtin/earnings-ripple/pane.tsx +233 -0
- package/src/plugins/builtin/econ/calendar-model.ts +409 -0
- package/src/plugins/builtin/econ/calendar-source.ts +49 -0
- package/src/plugins/builtin/econ/detail-view.tsx +324 -0
- package/src/plugins/builtin/econ/figures.ts +72 -0
- package/src/plugins/builtin/econ/fred-catalog.ts +219 -0
- package/src/plugins/builtin/econ/fred-series-map.ts +103 -0
- package/src/plugins/builtin/econ/index.tsx +612 -0
- package/src/plugins/builtin/econ/print-watch.ts +280 -0
- package/src/plugins/builtin/econ/types.ts +47 -0
- package/src/plugins/builtin/econ-statistics/cache.ts +8 -0
- package/src/plugins/builtin/econ-statistics/client.ts +153 -0
- package/src/plugins/builtin/econ-statistics/defs.ts +94 -0
- package/src/plugins/builtin/econ-statistics/detail.tsx +85 -0
- package/src/plugins/builtin/econ-statistics/headless.ts +266 -0
- package/src/plugins/builtin/econ-statistics/index.tsx +54 -0
- package/src/plugins/builtin/econ-statistics/pane.tsx +219 -0
- package/src/plugins/builtin/econ-statistics/stats.ts +651 -0
- package/src/plugins/builtin/econ-statistics/view.ts +182 -0
- package/src/plugins/builtin/equity-screener/client.ts +101 -0
- package/src/plugins/builtin/equity-screener/criterion-editor.tsx +174 -0
- package/src/plugins/builtin/equity-screener/headless.ts +284 -0
- package/src/plugins/builtin/equity-screener/index.tsx +38 -0
- package/src/plugins/builtin/equity-screener/live.ts +149 -0
- package/src/plugins/builtin/equity-screener/model.ts +639 -0
- package/src/plugins/builtin/equity-screener/pane.tsx +1072 -0
- package/src/plugins/builtin/equity-screener/results.ts +135 -0
- package/src/plugins/builtin/equity-screener/screen-check.ts +90 -0
- package/src/plugins/builtin/equity-screener/ticker-check.tsx +148 -0
- package/src/plugins/builtin/estimate-revisions/client.ts +283 -0
- package/src/plugins/builtin/estimate-revisions/headless.ts +108 -0
- package/src/plugins/builtin/estimate-revisions/index.tsx +92 -0
- package/src/plugins/builtin/estimate-revisions/lock-note.ts +45 -0
- package/src/plugins/builtin/estimate-revisions/model.ts +108 -0
- package/src/plugins/builtin/estimate-revisions/pane.tsx +601 -0
- package/src/plugins/builtin/estimate-revisions/sorting.ts +111 -0
- package/src/plugins/builtin/executives/data.ts +148 -0
- package/src/plugins/builtin/executives/format.ts +44 -0
- package/src/plugins/builtin/executives/index.tsx +68 -0
- package/src/plugins/builtin/executives/pane.tsx +448 -0
- package/src/plugins/builtin/exposure/charts.tsx +67 -0
- package/src/plugins/builtin/exposure/client.ts +56 -0
- package/src/plugins/builtin/exposure/drivers.ts +42 -0
- package/src/plugins/builtin/exposure/editor.tsx +61 -0
- package/src/plugins/builtin/exposure/evidence.ts +42 -0
- package/src/plugins/builtin/exposure/headless.ts +290 -0
- package/src/plugins/builtin/exposure/holdings.ts +58 -0
- package/src/plugins/builtin/exposure/index.tsx +40 -0
- package/src/plugins/builtin/exposure/model.ts +143 -0
- package/src/plugins/builtin/exposure/pane.tsx +276 -0
- package/src/plugins/builtin/fear-greed/cache.ts +100 -0
- package/src/plugins/builtin/fear-greed/charts.tsx +262 -0
- package/src/plugins/builtin/fear-greed/data.ts +376 -0
- package/src/plugins/builtin/fear-greed/format.ts +87 -0
- package/src/plugins/builtin/fear-greed/headless.ts +87 -0
- package/src/plugins/builtin/fear-greed/index.tsx +104 -0
- package/src/plugins/builtin/fear-greed/pane.tsx +105 -0
- package/src/plugins/builtin/fear-greed/series.ts +52 -0
- package/src/plugins/builtin/filing-events/feed.ts +169 -0
- package/src/plugins/builtin/filing-events/index.tsx +79 -0
- package/src/plugins/builtin/filing-events/pane.tsx +312 -0
- package/src/plugins/builtin/fixed-income/index.tsx +46 -0
- package/src/plugins/builtin/fixed-income/model.ts +27 -0
- package/src/plugins/builtin/fixed-income/pane.tsx +163 -0
- package/src/plugins/builtin/fixed-income/shortcut.ts +52 -0
- package/src/plugins/builtin/futures/index.tsx +436 -0
- package/src/plugins/builtin/futures/model.ts +257 -0
- package/src/plugins/builtin/futures/returns.ts +104 -0
- package/src/plugins/builtin/futures/series.ts +71 -0
- package/src/plugins/builtin/futures/table.tsx +274 -0
- package/src/plugins/builtin/futures/use-board-terms.ts +89 -0
- package/src/plugins/builtin/futures/use-front-returns.ts +120 -0
- package/src/plugins/builtin/futures-curve/client.ts +136 -0
- package/src/plugins/builtin/futures-curve/headless.ts +174 -0
- package/src/plugins/builtin/futures-curve/index.tsx +33 -0
- package/src/plugins/builtin/futures-curve/model.ts +769 -0
- package/src/plugins/builtin/futures-curve/pane.tsx +332 -0
- package/src/plugins/builtin/fx-matrix/client.ts +75 -0
- package/src/plugins/builtin/fx-matrix/direction.ts +81 -0
- package/src/plugins/builtin/fx-matrix/export.ts +33 -0
- package/src/plugins/builtin/fx-matrix/headless.ts +175 -0
- package/src/plugins/builtin/fx-matrix/index.tsx +302 -0
- package/src/plugins/builtin/fx-matrix/live-legs.ts +128 -0
- package/src/plugins/builtin/fx-matrix/pairs.ts +81 -0
- package/src/plugins/builtin/fx-matrix/settings.ts +103 -0
- package/src/plugins/builtin/gpu/board.tsx +169 -0
- package/src/plugins/builtin/gpu/changes.tsx +94 -0
- package/src/plugins/builtin/gpu/client.ts +148 -0
- package/src/plugins/builtin/gpu/equities.tsx +122 -0
- package/src/plugins/builtin/gpu/headless.ts +113 -0
- package/src/plugins/builtin/gpu/history.tsx +142 -0
- package/src/plugins/builtin/gpu/index.tsx +20 -0
- package/src/plugins/builtin/gpu/ladder.tsx +123 -0
- package/src/plugins/builtin/gpu/model.ts +437 -0
- package/src/plugins/builtin/gpu/pane.tsx +81 -0
- package/src/plugins/builtin/gpu/series.ts +38 -0
- package/src/plugins/builtin/help/feedback-tab.tsx +98 -0
- package/src/plugins/builtin/help/function-card.tsx +221 -0
- package/src/plugins/builtin/help/function-index.ts +195 -0
- package/src/plugins/builtin/help/functions-table.tsx +188 -0
- package/src/plugins/builtin/help/index.tsx +431 -0
- package/src/plugins/builtin/help/keybindings-editor.tsx +437 -0
- package/src/plugins/builtin/help/shortcut-model.ts +116 -0
- package/src/plugins/builtin/help/shortcut-table.tsx +130 -0
- package/src/plugins/builtin/help/table-cells.tsx +66 -0
- package/src/plugins/builtin/holders/beneficial-client.ts +231 -0
- package/src/plugins/builtin/holders/beneficial-model.ts +363 -0
- package/src/plugins/builtin/holders/beneficial-report.ts +179 -0
- package/src/plugins/builtin/holders/beneficial-view.tsx +293 -0
- package/src/plugins/builtin/holders/client.ts +58 -0
- package/src/plugins/builtin/holders/format.ts +100 -0
- package/src/plugins/builtin/holders/headless.ts +285 -0
- package/src/plugins/builtin/holders/index-holders.ts +264 -0
- package/src/plugins/builtin/holders/index.tsx +52 -0
- package/src/plugins/builtin/holders/pane.tsx +439 -0
- package/src/plugins/builtin/holders/report-header.ts +171 -0
- package/src/plugins/builtin/holders/report-rows.ts +268 -0
- package/src/plugins/builtin/holders/table-model.ts +86 -0
- package/src/plugins/builtin/holders/thirteenf-match.ts +117 -0
- package/src/plugins/builtin/holders/treemap.tsx +51 -0
- package/src/plugins/builtin/holders/types.ts +17 -0
- package/src/plugins/builtin/insider/amendments.ts +65 -0
- package/src/plugins/builtin/insider/base-values.ts +76 -0
- package/src/plugins/builtin/insider/client.ts +64 -0
- package/src/plugins/builtin/insider/detail.tsx +127 -0
- package/src/plugins/builtin/insider/display.ts +221 -0
- package/src/plugins/builtin/insider/headless.ts +574 -0
- package/src/plugins/builtin/insider/index.tsx +771 -0
- package/src/plugins/builtin/insider/insider-data.ts +176 -0
- package/src/plugins/builtin/insider/insiders.tsx +224 -0
- package/src/plugins/builtin/insider/issuer.ts +79 -0
- package/src/plugins/builtin/insider/model.ts +207 -0
- package/src/plugins/builtin/insider/signals-cells.tsx +52 -0
- package/src/plugins/builtin/insider/signals-client.ts +193 -0
- package/src/plugins/builtin/insider/signals-model.ts +718 -0
- package/src/plugins/builtin/insider/signals.tsx +376 -0
- package/src/plugins/builtin/insider/table-model.ts +248 -0
- package/src/plugins/builtin/insider/table.tsx +82 -0
- package/src/plugins/builtin/ipo-calendar/client.ts +93 -0
- package/src/plugins/builtin/ipo-calendar/headless.ts +170 -0
- package/src/plugins/builtin/ipo-calendar/index.tsx +67 -0
- package/src/plugins/builtin/ipo-calendar/model.ts +389 -0
- package/src/plugins/builtin/ipo-calendar/pane.tsx +248 -0
- package/src/plugins/builtin/iv-history/charts.tsx +64 -0
- package/src/plugins/builtin/iv-history/client.ts +213 -0
- package/src/plugins/builtin/iv-history/events.ts +145 -0
- package/src/plugins/builtin/iv-history/format.ts +64 -0
- package/src/plugins/builtin/iv-history/headless.ts +242 -0
- package/src/plugins/builtin/iv-history/index.tsx +50 -0
- package/src/plugins/builtin/iv-history/model.ts +396 -0
- package/src/plugins/builtin/iv-history/pane.tsx +137 -0
- package/src/plugins/builtin/iv-history/rank.ts +10 -0
- package/src/plugins/builtin/iv-history/screen-pane.tsx +186 -0
- package/src/plugins/builtin/iv-history/series.ts +31 -0
- package/src/plugins/builtin/iv-history/universe.ts +40 -0
- package/src/plugins/builtin/jobs/client.ts +85 -0
- package/src/plugins/builtin/jobs/headless.ts +221 -0
- package/src/plugins/builtin/jobs/index.tsx +88 -0
- package/src/plugins/builtin/jobs/lock-note.ts +27 -0
- package/src/plugins/builtin/jobs/model.ts +332 -0
- package/src/plugins/builtin/jobs/pages.ts +48 -0
- package/src/plugins/builtin/jobs/pane.tsx +781 -0
- package/src/plugins/builtin/jobs/series.ts +19 -0
- package/src/plugins/builtin/jobs/share-bars.tsx +76 -0
- package/src/plugins/builtin/jodi/client.ts +57 -0
- package/src/plugins/builtin/jodi/headless.ts +74 -0
- package/src/plugins/builtin/jodi/index.tsx +32 -0
- package/src/plugins/builtin/jodi/model.ts +50 -0
- package/src/plugins/builtin/jodi/pane.tsx +152 -0
- package/src/plugins/builtin/kelly-sizer/constants.ts +3 -0
- package/src/plugins/builtin/kelly-sizer/fields.ts +195 -0
- package/src/plugins/builtin/kelly-sizer/headless.ts +149 -0
- package/src/plugins/builtin/kelly-sizer/history.ts +82 -0
- package/src/plugins/builtin/kelly-sizer/index.tsx +49 -0
- package/src/plugins/builtin/kelly-sizer/model.ts +562 -0
- package/src/plugins/builtin/kelly-sizer/pane.tsx +650 -0
- package/src/plugins/builtin/kelly-sizer/portfolio.ts +55 -0
- package/src/plugins/builtin/kelly-sizer/sections.tsx +206 -0
- package/src/plugins/builtin/kelly-sizer/state.ts +67 -0
- package/src/plugins/builtin/kelly-sizer/test-support.tsx +165 -0
- package/src/plugins/builtin/kelly-sizer/types.ts +164 -0
- package/src/plugins/builtin/kelly-sizer/view.tsx +22 -0
- package/src/plugins/builtin/layout-manager/index.tsx +306 -0
- package/src/plugins/builtin/macro-day/client.ts +115 -0
- package/src/plugins/builtin/macro-day/headless.ts +72 -0
- package/src/plugins/builtin/macro-day/index.tsx +25 -0
- package/src/plugins/builtin/macro-day/model.ts +209 -0
- package/src/plugins/builtin/macro-day/pane.tsx +170 -0
- package/src/plugins/builtin/macro-day/release-table.ts +40 -0
- package/src/plugins/builtin/macro-day/releases.ts +118 -0
- package/src/plugins/builtin/macro-resources.ts +15 -0
- package/src/plugins/builtin/market-halts/client.ts +114 -0
- package/src/plugins/builtin/market-halts/index.tsx +42 -0
- package/src/plugins/builtin/market-halts/model.ts +361 -0
- package/src/plugins/builtin/market-halts/pane.tsx +240 -0
- package/src/plugins/builtin/market-heatmap/data.ts +117 -0
- package/src/plugins/builtin/market-heatmap/evidence.ts +99 -0
- package/src/plugins/builtin/market-heatmap/headless.ts +154 -0
- package/src/plugins/builtin/market-heatmap/index.tsx +845 -0
- package/src/plugins/builtin/market-heatmap/live.ts +89 -0
- package/src/plugins/builtin/market-heatmap/model.ts +248 -0
- package/src/plugins/builtin/market-heatmap/portfolio.ts +317 -0
- package/src/plugins/builtin/market-movers/client.ts +147 -0
- package/src/plugins/builtin/market-movers/footer.ts +19 -0
- package/src/plugins/builtin/market-movers/headless.ts +188 -0
- package/src/plugins/builtin/market-movers/index.tsx +380 -0
- package/src/plugins/builtin/market-movers/model.ts +370 -0
- package/src/plugins/builtin/market-movers/screener.ts +449 -0
- package/src/plugins/builtin/market-movers/session-body.tsx +258 -0
- package/src/plugins/builtin/market-movers/session-table.ts +98 -0
- package/src/plugins/builtin/market-movers/session.ts +248 -0
- package/src/plugins/builtin/market-movers/table.ts +125 -0
- package/src/plugins/builtin/market-valuation/align.ts +146 -0
- package/src/plugins/builtin/market-valuation/cache.ts +3 -0
- package/src/plugins/builtin/market-valuation/chart-projection.ts +196 -0
- package/src/plugins/builtin/market-valuation/chart-series.ts +59 -0
- package/src/plugins/builtin/market-valuation/client.ts +158 -0
- package/src/plugins/builtin/market-valuation/defs.ts +253 -0
- package/src/plugins/builtin/market-valuation/detail.tsx +93 -0
- package/src/plugins/builtin/market-valuation/headless.ts +172 -0
- package/src/plugins/builtin/market-valuation/index.tsx +83 -0
- package/src/plugins/builtin/market-valuation/indicators.ts +386 -0
- package/src/plugins/builtin/market-valuation/pane.tsx +197 -0
- package/src/plugins/builtin/market-valuation/series.ts +29 -0
- package/src/plugins/builtin/market-valuation/settings.ts +38 -0
- package/src/plugins/builtin/market-valuation/sources.ts +192 -0
- package/src/plugins/builtin/market-valuation/view.ts +154 -0
- package/src/plugins/builtin/market-valuation/zone-scale/desktop.tsx +97 -0
- package/src/plugins/builtin/market-valuation/zone-scale/index.tsx +12 -0
- package/src/plugins/builtin/market-valuation/zone-scale/model.ts +67 -0
- package/src/plugins/builtin/market-valuation/zone-scale/terminal.tsx +94 -0
- package/src/plugins/builtin/members/breadth-pane.tsx +81 -0
- package/src/plugins/builtin/members/client.ts +68 -0
- package/src/plugins/builtin/members/headless.ts +54 -0
- package/src/plugins/builtin/members/index.tsx +20 -0
- package/src/plugins/builtin/members/model.ts +115 -0
- package/src/plugins/builtin/members/pane.tsx +205 -0
- package/src/plugins/builtin/mna/client.ts +154 -0
- package/src/plugins/builtin/mna/detail.tsx +285 -0
- package/src/plugins/builtin/mna/distress/client.ts +326 -0
- package/src/plugins/builtin/mna/distress/detail.tsx +259 -0
- package/src/plugins/builtin/mna/distress/headless.ts +259 -0
- package/src/plugins/builtin/mna/distress/model.ts +479 -0
- package/src/plugins/builtin/mna/distress/pane.tsx +614 -0
- package/src/plugins/builtin/mna/headless.ts +100 -0
- package/src/plugins/builtin/mna/index.tsx +74 -0
- package/src/plugins/builtin/mna/model.ts +282 -0
- package/src/plugins/builtin/mna/pane.tsx +477 -0
- package/src/plugins/builtin/money-markets/client.ts +54 -0
- package/src/plugins/builtin/money-markets/headless.ts +29 -0
- package/src/plugins/builtin/money-markets/index.tsx +20 -0
- package/src/plugins/builtin/money-markets/model.ts +55 -0
- package/src/plugins/builtin/money-markets/pane.tsx +142 -0
- package/src/plugins/builtin/money-markets/series.ts +41 -0
- package/src/plugins/builtin/news/headless.ts +233 -0
- package/src/plugins/builtin/news/index.tsx +233 -0
- package/src/plugins/builtin/news/wire/breaking/filters.ts +110 -0
- package/src/plugins/builtin/news/wire/breaking/notifications.ts +202 -0
- package/src/plugins/builtin/news/wire/categories.ts +172 -0
- package/src/plugins/builtin/news/wire/default-feeds.ts +43 -0
- package/src/plugins/builtin/news/wire/feed-config.ts +251 -0
- package/src/plugins/builtin/news/wire/filter-articles.ts +54 -0
- package/src/plugins/builtin/news/wire/hash.ts +9 -0
- package/src/plugins/builtin/news/wire/index.tsx +252 -0
- package/src/plugins/builtin/news/wire/industry-pane.tsx +183 -0
- package/src/plugins/builtin/news/wire/letters/client.ts +109 -0
- package/src/plugins/builtin/news/wire/letters/model.ts +69 -0
- package/src/plugins/builtin/news/wire/letters/pane.tsx +155 -0
- package/src/plugins/builtin/news/wire/mutes.ts +254 -0
- package/src/plugins/builtin/news/wire/news/command-bar-search.ts +136 -0
- package/src/plugins/builtin/news/wire/news/detail-view.tsx +329 -0
- package/src/plugins/builtin/news/wire/news/footer.ts +78 -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 +215 -0
- package/src/plugins/builtin/news/wire/news/query-presets.ts +126 -0
- package/src/plugins/builtin/news/wire/news/table.tsx +422 -0
- package/src/plugins/builtin/news/wire/persisted-articles.ts +123 -0
- package/src/plugins/builtin/news/wire/read-state.ts +29 -0
- package/src/plugins/builtin/news/wire/rss/cli.ts +48 -0
- package/src/plugins/builtin/news/wire/rss/feed-xml.ts +109 -0
- package/src/plugins/builtin/news/wire/rss/managed-feed.ts +20 -0
- package/src/plugins/builtin/news/wire/rss/parser.ts +182 -0
- package/src/plugins/builtin/news/wire/rss/source.ts +191 -0
- package/src/plugins/builtin/notes/cli.ts +172 -0
- package/src/plugins/builtin/notes/export.ts +114 -0
- package/src/plugins/builtin/notes/files.ts +315 -0
- package/src/plugins/builtin/notes/index.tsx +134 -0
- package/src/plugins/builtin/notes/markdown-note-preview.tsx +39 -0
- package/src/plugins/builtin/notes/migration.ts +94 -0
- package/src/plugins/builtin/notes/model.ts +36 -0
- package/src/plugins/builtin/notes/owner.tsx +131 -0
- package/src/plugins/builtin/notes/quick-notes-pane.tsx +503 -0
- package/src/plugins/builtin/notes/store.ts +314 -0
- package/src/plugins/builtin/notes/text-state.ts +11 -0
- package/src/plugins/builtin/notes/ticker-notes-tab.tsx +222 -0
- package/src/plugins/builtin/openfda/client.ts +408 -0
- package/src/plugins/builtin/openfda/index.tsx +72 -0
- package/src/plugins/builtin/openfda/model.ts +163 -0
- package/src/plugins/builtin/openfda/pane.tsx +426 -0
- package/src/plugins/builtin/openfda/types.ts +101 -0
- package/src/plugins/builtin/options/analytics-as-of.tsx +41 -0
- package/src/plugins/builtin/options/analytics.ts +234 -0
- package/src/plugins/builtin/options/calc-seed.ts +65 -0
- package/src/plugins/builtin/options/carry.ts +131 -0
- package/src/plugins/builtin/options/enrichment-client.ts +70 -0
- package/src/plugins/builtin/options/enrichment-model.ts +168 -0
- package/src/plugins/builtin/options/enrichment.ts +127 -0
- package/src/plugins/builtin/options/expiry-catalogue.ts +43 -0
- package/src/plugins/builtin/options/footer.ts +143 -0
- package/src/plugins/builtin/options/index.tsx +159 -0
- package/src/plugins/builtin/options/live-quotes.ts +295 -0
- package/src/plugins/builtin/options/market-reference.ts +92 -0
- package/src/plugins/builtin/options/model-spot.ts +163 -0
- package/src/plugins/builtin/options/open-interest-as-of.ts +74 -0
- package/src/plugins/builtin/options/quote-context.tsx +29 -0
- package/src/plugins/builtin/options/strike-window.ts +184 -0
- package/src/plugins/builtin/options/table.ts +362 -0
- package/src/plugins/builtin/options/types.ts +57 -0
- package/src/plugins/builtin/options/view.tsx +1042 -0
- package/src/plugins/builtin/options-calculator/binomial.ts +332 -0
- package/src/plugins/builtin/options-calculator/evidence.ts +228 -0
- package/src/plugins/builtin/options-calculator/headless.ts +137 -0
- package/src/plugins/builtin/options-calculator/index.tsx +37 -0
- package/src/plugins/builtin/options-calculator/inputs.ts +79 -0
- package/src/plugins/builtin/options-calculator/model.ts +119 -0
- package/src/plugins/builtin/options-calculator/pane.tsx +429 -0
- package/src/plugins/builtin/options-calculator/premium-history.ts +34 -0
- package/src/plugins/builtin/options-calculator/surface.ts +194 -0
- package/src/plugins/builtin/options-positioning/client.ts +138 -0
- package/src/plugins/builtin/options-positioning/headless.ts +242 -0
- package/src/plugins/builtin/options-positioning/index.tsx +72 -0
- package/src/plugins/builtin/options-positioning/model.ts +268 -0
- package/src/plugins/builtin/options-positioning/pane.tsx +654 -0
- package/src/plugins/builtin/options-scenario/charts.tsx +47 -0
- package/src/plugins/builtin/options-scenario/client.ts +576 -0
- package/src/plugins/builtin/options-scenario/collar.ts +143 -0
- package/src/plugins/builtin/options-scenario/csp-screen-headless.ts +127 -0
- package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +165 -0
- package/src/plugins/builtin/options-scenario/csp-screen.ts +258 -0
- package/src/plugins/builtin/options-scenario/csp.ts +248 -0
- package/src/plugins/builtin/options-scenario/editor.tsx +139 -0
- package/src/plugins/builtin/options-scenario/evidence.ts +127 -0
- package/src/plugins/builtin/options-scenario/freshness.ts +27 -0
- package/src/plugins/builtin/options-scenario/headless.ts +208 -0
- package/src/plugins/builtin/options-scenario/hedge.ts +291 -0
- package/src/plugins/builtin/options-scenario/index.tsx +62 -0
- package/src/plugins/builtin/options-scenario/live.ts +50 -0
- package/src/plugins/builtin/options-scenario/model.ts +407 -0
- package/src/plugins/builtin/options-scenario/pane.tsx +475 -0
- package/src/plugins/builtin/options-scenario/state.ts +71 -0
- package/src/plugins/builtin/pe-band/client.ts +133 -0
- package/src/plugins/builtin/pe-band/headless.ts +69 -0
- package/src/plugins/builtin/pe-band/index.tsx +20 -0
- package/src/plugins/builtin/pe-band/model.ts +334 -0
- package/src/plugins/builtin/pe-band/pane.tsx +177 -0
- package/src/plugins/builtin/pe-band/report-dates.ts +82 -0
- package/src/plugins/builtin/perps/client.ts +272 -0
- package/src/plugins/builtin/perps/equity-identity.ts +16 -0
- package/src/plugins/builtin/perps/equity-row.tsx +76 -0
- package/src/plugins/builtin/perps/freshness.ts +71 -0
- package/src/plugins/builtin/perps/headless.ts +207 -0
- package/src/plugins/builtin/perps/index.tsx +33 -0
- package/src/plugins/builtin/perps/list-perpetuals.ts +139 -0
- package/src/plugins/builtin/perps/live-rows.ts +168 -0
- package/src/plugins/builtin/perps/markets-section.tsx +154 -0
- package/src/plugins/builtin/perps/model.ts +335 -0
- package/src/plugins/builtin/perps/open-market.ts +15 -0
- package/src/plugins/builtin/perps/pane.tsx +466 -0
- package/src/plugins/builtin/perps/series.ts +76 -0
- package/src/plugins/builtin/perps/venue-markets.ts +96 -0
- package/src/plugins/builtin/plugin-marketplace/index.tsx +44 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +1059 -0
- package/src/plugins/builtin/plugin-module.ts +205 -0
- package/src/plugins/builtin/portfolio-list/account-metrics.ts +206 -0
- package/src/plugins/builtin/portfolio-list/cached-account.ts +42 -0
- package/src/plugins/builtin/portfolio-list/cell-version.ts +79 -0
- package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +330 -0
- package/src/plugins/builtin/portfolio-list/cli/import-13f.ts +109 -0
- package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +1151 -0
- package/src/plugins/builtin/portfolio-list/cli/render.ts +1402 -0
- package/src/plugins/builtin/portfolio-list/cli/shared.ts +151 -0
- package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +297 -0
- package/src/plugins/builtin/portfolio-list/grid.tsx +288 -0
- package/src/plugins/builtin/portfolio-list/header.tsx +65 -0
- package/src/plugins/builtin/portfolio-list/headless.ts +552 -0
- package/src/plugins/builtin/portfolio-list/imported-from.ts +8 -0
- package/src/plugins/builtin/portfolio-list/income.ts +307 -0
- package/src/plugins/builtin/portfolio-list/index.tsx +125 -0
- package/src/plugins/builtin/portfolio-list/metrics.ts +25 -0
- package/src/plugins/builtin/portfolio-list/pane/data.ts +277 -0
- package/src/plugins/builtin/portfolio-list/pane/futures-terms.ts +58 -0
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +843 -0
- package/src/plugins/builtin/portfolio-list/pane/purchase-date-fx.ts +46 -0
- package/src/plugins/builtin/portfolio-list/pane/remove-ticker.ts +85 -0
- package/src/plugins/builtin/portfolio-list/pane/streaming.ts +328 -0
- package/src/plugins/builtin/portfolio-list/pane/supplemental.ts +300 -0
- package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +435 -0
- package/src/plugins/builtin/portfolio-list/quick-add/resolution.ts +208 -0
- package/src/plugins/builtin/portfolio-list/row-actions.ts +8 -0
- package/src/plugins/builtin/portfolio-list/settings.ts +409 -0
- package/src/plugins/builtin/portfolio-list/since-last-seen.ts +197 -0
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +530 -0
- package/src/plugins/builtin/portfolio-list/summary/live-accounts.ts +167 -0
- package/src/plugins/builtin/portfolio-list/summary/totals.ts +280 -0
- package/src/plugins/builtin/portfolio-list/table.tsx +243 -0
- package/src/plugins/builtin/portfolio-list/use-column-clock.ts +41 -0
- package/src/plugins/builtin/portfolio-list/use-cursor-neighbor-prefetch.ts +87 -0
- package/src/plugins/builtin/portfolio-list/use-throttled-cursor-symbol.ts +26 -0
- package/src/plugins/builtin/portfolio-list/use-throttled-memo.ts +59 -0
- package/src/plugins/builtin/portfolio-list/use-throttled-ticker-order.ts +78 -0
- package/src/plugins/builtin/power/client.ts +119 -0
- package/src/plugins/builtin/power/detail.tsx +82 -0
- package/src/plugins/builtin/power/evidence.ts +153 -0
- package/src/plugins/builtin/power/gas-client.ts +110 -0
- package/src/plugins/builtin/power/gas-model.ts +194 -0
- package/src/plugins/builtin/power/gas.tsx +149 -0
- package/src/plugins/builtin/power/generation.tsx +37 -0
- package/src/plugins/builtin/power/headless.ts +116 -0
- package/src/plugins/builtin/power/index.tsx +51 -0
- package/src/plugins/builtin/power/model.ts +160 -0
- package/src/plugins/builtin/power/pane.tsx +248 -0
- package/src/plugins/builtin/power/prices-client.ts +139 -0
- package/src/plugins/builtin/power/prices-headless.ts +206 -0
- package/src/plugins/builtin/power/prices-model.ts +103 -0
- package/src/plugins/builtin/power/prices.tsx +209 -0
- package/src/plugins/builtin/power/query.ts +25 -0
- package/src/plugins/builtin/primary-dealers/client.ts +183 -0
- package/src/plugins/builtin/primary-dealers/headless.ts +78 -0
- package/src/plugins/builtin/primary-dealers/index.tsx +18 -0
- package/src/plugins/builtin/primary-dealers/model.ts +256 -0
- package/src/plugins/builtin/primary-dealers/pane.tsx +269 -0
- package/src/plugins/builtin/rate-path/client.ts +52 -0
- package/src/plugins/builtin/rate-path/headless.ts +93 -0
- package/src/plugins/builtin/rate-path/index.tsx +18 -0
- package/src/plugins/builtin/rate-path/model.ts +127 -0
- package/src/plugins/builtin/rate-path/pane.tsx +214 -0
- package/src/plugins/builtin/realized-vol/chart-model.ts +70 -0
- package/src/plugins/builtin/realized-vol/charts.tsx +44 -0
- package/src/plugins/builtin/realized-vol/client.ts +108 -0
- package/src/plugins/builtin/realized-vol/evidence.ts +103 -0
- package/src/plugins/builtin/realized-vol/headless.ts +86 -0
- package/src/plugins/builtin/realized-vol/index.tsx +34 -0
- package/src/plugins/builtin/realized-vol/model.ts +149 -0
- package/src/plugins/builtin/realized-vol/pane.tsx +211 -0
- package/src/plugins/builtin/realized-vol/settings.ts +16 -0
- package/src/plugins/builtin/relative-rotation/client.ts +190 -0
- package/src/plugins/builtin/relative-rotation/headless.ts +95 -0
- package/src/plugins/builtin/relative-rotation/index.tsx +91 -0
- package/src/plugins/builtin/relative-rotation/model.ts +325 -0
- package/src/plugins/builtin/relative-rotation/pane.tsx +385 -0
- package/src/plugins/builtin/research/analyst-headless.ts +200 -0
- package/src/plugins/builtin/research/analyst-model.ts +557 -0
- package/src/plugins/builtin/research/analyst-pane.tsx +319 -0
- package/src/plugins/builtin/research/client.ts +12 -0
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +715 -0
- package/src/plugins/builtin/research/equity-diagnostic-pane.tsx +597 -0
- package/src/plugins/builtin/research/event-model.ts +523 -0
- package/src/plugins/builtin/research/event-sources.ts +72 -0
- package/src/plugins/builtin/research/events-headless.ts +82 -0
- package/src/plugins/builtin/research/headless-schema.ts +48 -0
- package/src/plugins/builtin/research/headless.ts +138 -0
- package/src/plugins/builtin/research/index.tsx +183 -0
- package/src/plugins/builtin/research/relative-valuation-basis.ts +58 -0
- package/src/plugins/builtin/research/relative-valuation-columns.ts +340 -0
- package/src/plugins/builtin/research/relative-valuation-currency.ts +171 -0
- package/src/plugins/builtin/research/relative-valuation-headless.ts +235 -0
- package/src/plugins/builtin/research/relative-valuation-model.ts +212 -0
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +367 -0
- package/src/plugins/builtin/research/relative-valuation-peers.ts +302 -0
- package/src/plugins/builtin/research-search/article.ts +65 -0
- package/src/plugins/builtin/research-search/command-bar-search.ts +175 -0
- package/src/plugins/builtin/research-search/data.ts +116 -0
- package/src/plugins/builtin/research-search/document-view.tsx +74 -0
- package/src/plugins/builtin/research-search/focus-handoff.ts +47 -0
- package/src/plugins/builtin/research-search/index.tsx +87 -0
- package/src/plugins/builtin/research-search/model.ts +266 -0
- package/src/plugins/builtin/research-search/pane.tsx +690 -0
- package/src/plugins/builtin/research-search/saved-view.tsx +172 -0
- package/src/plugins/builtin/research-search/snippet-text.tsx +35 -0
- package/src/plugins/builtin/research-search/snippet.ts +105 -0
- package/src/plugins/builtin/revenue-breakdown/bars.tsx +113 -0
- package/src/plugins/builtin/revenue-breakdown/client.ts +121 -0
- package/src/plugins/builtin/revenue-breakdown/headless.ts +89 -0
- package/src/plugins/builtin/revenue-breakdown/index.tsx +60 -0
- package/src/plugins/builtin/revenue-breakdown/model.ts +157 -0
- package/src/plugins/builtin/revenue-breakdown/pane.tsx +293 -0
- package/src/plugins/builtin/reverse-dcf/client.ts +36 -0
- package/src/plugins/builtin/reverse-dcf/headless.ts +69 -0
- package/src/plugins/builtin/reverse-dcf/index.tsx +23 -0
- package/src/plugins/builtin/reverse-dcf/model.ts +174 -0
- package/src/plugins/builtin/reverse-dcf/pane.tsx +130 -0
- package/src/plugins/builtin/risk-factors/data.ts +135 -0
- package/src/plugins/builtin/risk-factors/headless.ts +82 -0
- package/src/plugins/builtin/risk-factors/index.tsx +93 -0
- package/src/plugins/builtin/risk-factors/pane.tsx +308 -0
- package/src/plugins/builtin/scanner/denied.tsx +20 -0
- package/src/plugins/builtin/scanner/feed.ts +118 -0
- package/src/plugins/builtin/scanner/flow-history.ts +98 -0
- package/src/plugins/builtin/scanner/flow-model.ts +272 -0
- package/src/plugins/builtin/scanner/flow-pane.tsx +260 -0
- package/src/plugins/builtin/scanner/headless.ts +249 -0
- package/src/plugins/builtin/scanner/hilo-bars.tsx +65 -0
- package/src/plugins/builtin/scanner/hilo-model.ts +96 -0
- package/src/plugins/builtin/scanner/hilo-pane.tsx +208 -0
- package/src/plugins/builtin/scanner/index.ts +142 -0
- package/src/plugins/builtin/scanner/live-condition-editor.tsx +222 -0
- package/src/plugins/builtin/scanner/live-feed.ts +168 -0
- package/src/plugins/builtin/scanner/live-headless.ts +114 -0
- package/src/plugins/builtin/scanner/live-model.ts +351 -0
- package/src/plugins/builtin/scanner/live-pane.tsx +677 -0
- package/src/plugins/builtin/scanner/live-track.ts +186 -0
- package/src/plugins/builtin/scanner/lock-note.ts +18 -0
- package/src/plugins/builtin/seasonality/client.ts +76 -0
- package/src/plugins/builtin/seasonality/headless.ts +64 -0
- package/src/plugins/builtin/seasonality/index.tsx +20 -0
- package/src/plugins/builtin/seasonality/model.ts +243 -0
- package/src/plugins/builtin/seasonality/pane.tsx +229 -0
- package/src/plugins/builtin/sec/client.ts +16 -0
- package/src/plugins/builtin/sec/command-bar-search.ts +227 -0
- package/src/plugins/builtin/sec/filing-content.ts +160 -0
- package/src/plugins/builtin/sec/filing-display.tsx +53 -0
- package/src/plugins/builtin/sec/filing-documents.ts +65 -0
- package/src/plugins/builtin/sec/forms.ts +75 -0
- package/src/plugins/builtin/sec/fund-abroad.ts +32 -0
- package/src/plugins/builtin/sec/fund-facts-view.tsx +53 -0
- package/src/plugins/builtin/sec/fund-facts.ts +388 -0
- package/src/plugins/builtin/sec/headless.ts +294 -0
- package/src/plugins/builtin/sec/index.tsx +690 -0
- package/src/plugins/builtin/sec/model.ts +266 -0
- package/src/plugins/builtin/sec/row-summaries.ts +105 -0
- package/src/plugins/builtin/sectors/client.ts +182 -0
- package/src/plugins/builtin/sectors/headless.ts +137 -0
- package/src/plugins/builtin/sectors/index.tsx +454 -0
- package/src/plugins/builtin/sectors/move-bar.tsx +21 -0
- package/src/plugins/builtin/sectors/sector-data.ts +75 -0
- package/src/plugins/builtin/sectors/sector-model.ts +536 -0
- package/src/plugins/builtin/series-inventory.ts +99 -0
- package/src/plugins/builtin/shared/broker-reconnect.ts +190 -0
- package/src/plugins/builtin/shared/cloud-denied.ts +47 -0
- package/src/plugins/builtin/shared/cloud-resource.ts +69 -0
- package/src/plugins/builtin/shared/cloud-upgrade.ts +366 -0
- package/src/plugins/builtin/shared/command-tab.ts +69 -0
- package/src/plugins/builtin/shared/crypto-pair.ts +14 -0
- package/src/plugins/builtin/shared/earnings-calendar.ts +375 -0
- package/src/plugins/builtin/shared/earnings-estimate-basis.ts +71 -0
- package/src/plugins/builtin/shared/earnings-report.ts +108 -0
- package/src/plugins/builtin/shared/filing-year-reader.tsx +123 -0
- package/src/plugins/builtin/shared/fred-points.ts +20 -0
- package/src/plugins/builtin/shared/free-preview.ts +47 -0
- package/src/plugins/builtin/shared/free-routes.ts +24 -0
- package/src/plugins/builtin/shared/futures-session.ts +34 -0
- package/src/plugins/builtin/shared/fx-rate-freshness.ts +123 -0
- package/src/plugins/builtin/shared/headless-market-data.ts +72 -0
- package/src/plugins/builtin/shared/headless-options.ts +54 -0
- package/src/plugins/builtin/shared/history-span.ts +55 -0
- package/src/plugins/builtin/shared/job-posting.ts +129 -0
- package/src/plugins/builtin/shared/locked-rows.tsx +58 -0
- package/src/plugins/builtin/shared/macro-releases.ts +65 -0
- package/src/plugins/builtin/shared/members-menu.tsx +260 -0
- package/src/plugins/builtin/shared/mine-tickers.ts +19 -0
- package/src/plugins/builtin/shared/move-rank.ts +108 -0
- package/src/plugins/builtin/shared/open-description.ts +29 -0
- package/src/plugins/builtin/shared/pane-request.ts +35 -0
- package/src/plugins/builtin/shared/pro-feature-wall.tsx +56 -0
- package/src/plugins/builtin/shared/pro-lock-note.ts +140 -0
- package/src/plugins/builtin/shared/public-pane.ts +9 -0
- package/src/plugins/builtin/shared/report-freshness.ts +148 -0
- package/src/plugins/builtin/shared/research-cells.tsx +102 -0
- package/src/plugins/builtin/shared/research-cloud-session.ts +18 -0
- package/src/plugins/builtin/shared/research-trading.tsx +85 -0
- package/src/plugins/builtin/shared/scanner-capture.ts +98 -0
- package/src/plugins/builtin/shared/series-cache.ts +140 -0
- package/src/plugins/builtin/shared/series-detail-chart.tsx +171 -0
- package/src/plugins/builtin/shared/series-list-detail.tsx +223 -0
- package/src/plugins/builtin/shared/series-warning.ts +5 -0
- package/src/plugins/builtin/shared/stat-transform.ts +94 -0
- package/src/plugins/builtin/shared/ticker-choice.tsx +34 -0
- package/src/plugins/builtin/shared/ticker-request.ts +71 -0
- package/src/plugins/builtin/shared/ticker-surface.ts +149 -0
- package/src/plugins/builtin/shared/treasury-cutoffs.ts +15 -0
- package/src/plugins/builtin/shared/trend.ts +81 -0
- package/src/plugins/builtin/shared/use-quote-board.ts +694 -0
- package/src/plugins/builtin/shared/volatility/index.ts +4 -0
- package/src/plugins/builtin/shared/volatility/live-session.ts +185 -0
- package/src/plugins/builtin/shared/volatility/options.ts +212 -0
- package/src/plugins/builtin/shared/volatility/pricing.ts +217 -0
- package/src/plugins/builtin/shared/volatility/smile.ts +413 -0
- package/src/plugins/builtin/shared/volatility-indices.ts +32 -0
- 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/client.ts +48 -0
- package/src/plugins/builtin/short-interest/headless.ts +166 -0
- package/src/plugins/builtin/short-interest/index.tsx +143 -0
- package/src/plugins/builtin/short-interest/model.ts +265 -0
- package/src/plugins/builtin/short-interest/pane.tsx +178 -0
- package/src/plugins/builtin/short-interest/publications-client.ts +82 -0
- package/src/plugins/builtin/short-interest/publications-headless.ts +29 -0
- package/src/plugins/builtin/short-interest/publications-model.ts +50 -0
- package/src/plugins/builtin/short-interest/publications-pane.tsx +66 -0
- package/src/plugins/builtin/short-interest/schedule.ts +140 -0
- package/src/plugins/builtin/short-interest/series.ts +36 -0
- package/src/plugins/builtin/short-interest/surface.tsx +49 -0
- package/src/plugins/builtin/short-interest/types.ts +16 -0
- package/src/plugins/builtin/short-interest/watch-client.ts +122 -0
- package/src/plugins/builtin/short-interest/watch-headless.ts +56 -0
- package/src/plugins/builtin/short-interest/watch-model.ts +214 -0
- package/src/plugins/builtin/short-interest/watch-pane.tsx +173 -0
- package/src/plugins/builtin/short-volume/client.ts +86 -0
- package/src/plugins/builtin/short-volume/headless.ts +31 -0
- package/src/plugins/builtin/short-volume/index.tsx +20 -0
- package/src/plugins/builtin/short-volume/model.ts +53 -0
- package/src/plugins/builtin/short-volume/pane.tsx +108 -0
- package/src/plugins/builtin/short-volume/series.ts +23 -0
- package/src/plugins/builtin/social-mentions/client.ts +93 -0
- package/src/plugins/builtin/social-mentions/headless.ts +33 -0
- package/src/plugins/builtin/social-mentions/index.tsx +24 -0
- package/src/plugins/builtin/social-mentions/lock-note.ts +15 -0
- package/src/plugins/builtin/social-mentions/model.ts +92 -0
- package/src/plugins/builtin/social-mentions/pane.tsx +158 -0
- package/src/plugins/builtin/social-mentions/series.ts +23 -0
- package/src/plugins/builtin/supply-chain/client.ts +113 -0
- package/src/plugins/builtin/supply-chain/disclosure-quote.tsx +21 -0
- package/src/plugins/builtin/supply-chain/evidence.ts +90 -0
- package/src/plugins/builtin/supply-chain/flow-layout.ts +134 -0
- package/src/plugins/builtin/supply-chain/flow.tsx +366 -0
- package/src/plugins/builtin/supply-chain/graph-client.ts +86 -0
- package/src/plugins/builtin/supply-chain/graph-evidence.ts +25 -0
- package/src/plugins/builtin/supply-chain/graph-model.ts +53 -0
- package/src/plugins/builtin/supply-chain/graph-pane.tsx +221 -0
- package/src/plugins/builtin/supply-chain/graph.tsx +167 -0
- package/src/plugins/builtin/supply-chain/headless.ts +185 -0
- package/src/plugins/builtin/supply-chain/index.tsx +26 -0
- package/src/plugins/builtin/supply-chain/model.ts +292 -0
- package/src/plugins/builtin/supply-chain/pane.tsx +373 -0
- package/src/plugins/builtin/supply-chain/row-evidence.tsx +97 -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 +129 -0
- package/src/plugins/builtin/themes/model.ts +199 -0
- package/src/plugins/builtin/themes/pane.tsx +166 -0
- package/src/plugins/builtin/thirteenf/api.ts +434 -0
- package/src/plugins/builtin/thirteenf/data.ts +593 -0
- package/src/plugins/builtin/thirteenf/format.ts +56 -0
- package/src/plugins/builtin/thirteenf/headless.ts +927 -0
- package/src/plugins/builtin/thirteenf/index.tsx +94 -0
- package/src/plugins/builtin/thirteenf/model.ts +933 -0
- package/src/plugins/builtin/thirteenf/overlap-pane.tsx +207 -0
- package/src/plugins/builtin/thirteenf/overlap.ts +123 -0
- package/src/plugins/builtin/thirteenf/pane.tsx +781 -0
- package/src/plugins/builtin/thirteenf/report-notes.ts +329 -0
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +153 -0
- package/src/plugins/builtin/thirteenf/signals.ts +74 -0
- package/src/plugins/builtin/thirteenf/table.ts +196 -0
- package/src/plugins/builtin/thirteenf/types.ts +254 -0
- package/src/plugins/builtin/ticker-detail/adr-pair/headless.ts +123 -0
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +132 -0
- package/src/plugins/builtin/ticker-detail/adr-pair/tab.tsx +87 -0
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +394 -0
- package/src/plugins/builtin/ticker-detail/data-panes/history-bars.ts +112 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-history.ts +178 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-model.ts +363 -0
- package/src/plugins/builtin/ticker-detail/data-panes/returns-pane.tsx +324 -0
- package/src/plugins/builtin/ticker-detail/financials/aggregation.ts +322 -0
- package/src/plugins/builtin/ticker-detail/financials/model.ts +643 -0
- package/src/plugins/builtin/ticker-detail/financials/offerings.ts +56 -0
- package/src/plugins/builtin/ticker-detail/financials/pane.tsx +29 -0
- package/src/plugins/builtin/ticker-detail/financials/period-end-history.ts +44 -0
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +175 -0
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +830 -0
- package/src/plugins/builtin/ticker-detail/financials/schema.ts +389 -0
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +592 -0
- package/src/plugins/builtin/ticker-detail/headless-schema.ts +111 -0
- package/src/plugins/builtin/ticker-detail/headless.ts +576 -0
- package/src/plugins/builtin/ticker-detail/index.tsx +248 -0
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +361 -0
- package/src/plugins/builtin/ticker-detail/overview/dividend.ts +60 -0
- package/src/plugins/builtin/ticker-detail/overview/futures-contract.ts +31 -0
- package/src/plugins/builtin/ticker-detail/overview/model.ts +446 -0
- package/src/plugins/builtin/ticker-detail/overview/option-contract.ts +64 -0
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +60 -0
- package/src/plugins/builtin/ticker-detail/overview/types.ts +40 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +618 -0
- package/src/plugins/builtin/ticker-detail/pane.tsx +419 -0
- package/src/plugins/builtin/ticker-detail/quote-footer.ts +48 -0
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +489 -0
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +319 -0
- package/src/plugins/builtin/ticker-detail/research-tab-keys.tsx +58 -0
- package/src/plugins/builtin/ticker-detail/research-tab-navigation.tsx +14 -0
- package/src/plugins/builtin/ticker-detail/research-tabs.ts +43 -0
- package/src/plugins/builtin/ticker-detail/settings.ts +203 -0
- package/src/plugins/builtin/time-sales/client.ts +84 -0
- package/src/plugins/builtin/time-sales/headless.ts +117 -0
- package/src/plugins/builtin/time-sales/index.tsx +18 -0
- package/src/plugins/builtin/time-sales/model.ts +125 -0
- package/src/plugins/builtin/time-sales/pane.tsx +177 -0
- package/src/plugins/builtin/time-sales/snapshot-client.ts +28 -0
- package/src/plugins/builtin/time-sales/use-tape.ts +58 -0
- package/src/plugins/builtin/time-sales/window.ts +128 -0
- package/src/plugins/builtin/trace-bonds/client.ts +525 -0
- package/src/plugins/builtin/trace-bonds/headless.ts +107 -0
- package/src/plugins/builtin/trace-bonds/index.tsx +35 -0
- package/src/plugins/builtin/trace-bonds/model.ts +117 -0
- package/src/plugins/builtin/trace-bonds/pane.tsx +209 -0
- package/src/plugins/builtin/treasury-auctions/cache.ts +115 -0
- package/src/plugins/builtin/treasury-auctions/client.ts +230 -0
- package/src/plugins/builtin/treasury-auctions/headless.ts +172 -0
- package/src/plugins/builtin/treasury-auctions/index.tsx +88 -0
- package/src/plugins/builtin/treasury-auctions/model.ts +379 -0
- package/src/plugins/builtin/treasury-auctions/pane.tsx +413 -0
- package/src/plugins/builtin/treasury-auctions/types.ts +72 -0
- package/src/plugins/builtin/treasury-daily/client.ts +96 -0
- package/src/plugins/builtin/treasury-daily/headless.ts +69 -0
- package/src/plugins/builtin/treasury-daily/index.tsx +17 -0
- package/src/plugins/builtin/treasury-daily/model.ts +69 -0
- package/src/plugins/builtin/treasury-daily/pane.tsx +140 -0
- package/src/plugins/builtin/vol-surface/charts.tsx +117 -0
- package/src/plugins/builtin/vol-surface/client.ts +270 -0
- package/src/plugins/builtin/vol-surface/evidence.ts +207 -0
- package/src/plugins/builtin/vol-surface/headless.ts +286 -0
- package/src/plugins/builtin/vol-surface/heat-grid.tsx +113 -0
- package/src/plugins/builtin/vol-surface/index.tsx +47 -0
- package/src/plugins/builtin/vol-surface/live.ts +60 -0
- package/src/plugins/builtin/vol-surface/model.ts +661 -0
- package/src/plugins/builtin/vol-surface/pane.tsx +580 -0
- package/src/plugins/builtin/vol-surface/raster.ts +113 -0
- package/src/plugins/builtin/vol-surface/stored.ts +170 -0
- package/src/plugins/builtin/vol-surface/surface.tsx +59 -0
- package/src/plugins/builtin/vol-surface/tables.ts +166 -0
- package/src/plugins/builtin/volatility/chart-model.ts +163 -0
- package/src/plugins/builtin/volatility/charts.tsx +40 -0
- package/src/plugins/builtin/volatility/client.ts +256 -0
- package/src/plugins/builtin/volatility/dvol.ts +46 -0
- package/src/plugins/builtin/volatility/evidence.ts +144 -0
- package/src/plugins/builtin/volatility/headless.ts +78 -0
- package/src/plugins/builtin/volatility/index.tsx +27 -0
- package/src/plugins/builtin/volatility/model.ts +443 -0
- package/src/plugins/builtin/volatility/pane.tsx +254 -0
- package/src/plugins/builtin/volatility/series.ts +119 -0
- package/src/plugins/builtin/world-indices/client.ts +58 -0
- package/src/plugins/builtin/world-indices/footer.ts +25 -0
- package/src/plugins/builtin/world-indices/headless.ts +148 -0
- package/src/plugins/builtin/world-indices/index.tsx +189 -0
- package/src/plugins/builtin/world-indices/indices.ts +63 -0
- package/src/plugins/builtin/world-indices/model.ts +94 -0
- package/src/plugins/builtin/world-indices/table.tsx +105 -0
- package/src/plugins/builtin/world-venue-map/basemap-layer.tsx +161 -0
- package/src/plugins/builtin/world-venue-map/basemap.ts +237 -0
- package/src/plugins/builtin/world-venue-map/chokepoint-chart.ts +40 -0
- package/src/plugins/builtin/world-venue-map/client.ts +45 -0
- package/src/plugins/builtin/world-venue-map/country-labels.ts +78 -0
- package/src/plugins/builtin/world-venue-map/entity-detail.tsx +160 -0
- package/src/plugins/builtin/world-venue-map/entity-table.ts +59 -0
- package/src/plugins/builtin/world-venue-map/evidence.ts +77 -0
- package/src/plugins/builtin/world-venue-map/feed.ts +293 -0
- package/src/plugins/builtin/world-venue-map/geo-draw.tsx +249 -0
- package/src/plugins/builtin/world-venue-map/geo-series.ts +255 -0
- package/src/plugins/builtin/world-venue-map/geo-svg.tsx +448 -0
- package/src/plugins/builtin/world-venue-map/headless.ts +166 -0
- package/src/plugins/builtin/world-venue-map/ids.ts +1 -0
- package/src/plugins/builtin/world-venue-map/index.ts +82 -0
- package/src/plugins/builtin/world-venue-map/layered-pane.tsx +576 -0
- package/src/plugins/builtin/world-venue-map/layers.ts +435 -0
- package/src/plugins/builtin/world-venue-map/map-symbols.ts +220 -0
- package/src/plugins/builtin/world-venue-map/map.tsx +1122 -0
- package/src/plugins/builtin/world-venue-map/model.ts +321 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/index.chunk.ts +202 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/labels.chunk.ts +244 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e000n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e000n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e000n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e000n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e000n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e000n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e000s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e000s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e000s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e015n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e015n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e015n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e015n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e015n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e015n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e015s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e015s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e015s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e030s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e045n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e045n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e045n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e045n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e045n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e045n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e045s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e045s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e045s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e060n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e060n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e060n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e060n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e060n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e060n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e060s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e060s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e060s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e075n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e075n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e075n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e075n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e075n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e075n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e075s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e090n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e090n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e090n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e090n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e090n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e090n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e090s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e105n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e105n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e105n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e105n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e105n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e105n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e105s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e105s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e105s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e120n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e120n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e120n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e120n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e120n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e120s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e120s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e120s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e135n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e135n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e135n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e135n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e135n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e135n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e135s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e135s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e135s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e150n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e150n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e150n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e150n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e150n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e150s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e150s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e150s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e150s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e165n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e165n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e165n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e165n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e165s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e165s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e165s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/e165s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w015n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w015n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w015n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w015n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w015n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w015n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w015s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w015s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w015s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w030n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w030n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w030n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w030n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w030n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w030s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w030s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w045n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w045n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w045n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w045n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w045s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w045s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w045s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w060n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w060n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w060n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w060n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w060n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w060s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w060s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w060s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w060s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w075s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w090s60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w105n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w105n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w105n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w105n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w105n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w105n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w105s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w120n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w120n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w120n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w120n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w120n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w120n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w120s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w135n30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w135n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w135n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w135n75.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w135s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w150n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w150n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w150s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w150s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w165n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w165n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w165n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w165n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w165s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w165s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w180n00.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w180n15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w180n45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w180n60.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w180s15.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w180s30.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/tiles/w180s45.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/natural-earth/world-50m.chunk.ts +4 -0
- package/src/plugins/builtin/world-venue-map/pane.tsx +260 -0
- package/src/plugins/builtin/world-venue-map/use-geo.ts +55 -0
- package/src/plugins/builtin/world-venue-map/venue-header.tsx +43 -0
- package/src/plugins/builtin/world-venue-map/world-outlines.ts +2 -0
- package/src/plugins/builtin/yield-curve/chart.ts +159 -0
- package/src/plugins/builtin/yield-curve/client.ts +25 -0
- package/src/plugins/builtin/yield-curve/curves.ts +225 -0
- package/src/plugins/builtin/yield-curve/forward.ts +102 -0
- package/src/plugins/builtin/yield-curve/headless.ts +287 -0
- package/src/plugins/builtin/yield-curve/history.ts +166 -0
- package/src/plugins/builtin/yield-curve/index.tsx +494 -0
- package/src/plugins/builtin/yield-curve/series.ts +96 -0
- package/src/plugins/builtin/yield-curve/swaps-model.ts +93 -0
- package/src/plugins/builtin/yield-curve/swaps.tsx +99 -0
- package/src/plugins/builtin/yield-curve/treasury-data.ts +73 -0
- package/src/plugins/builtin/yield-curve/world.ts +57 -0
- package/src/plugins/builtin-editorial.ts +126 -0
- package/src/plugins/bundle.ts +200 -0
- package/src/plugins/catalog-backend.ts +37 -0
- package/src/plugins/catalog-browser.ts +344 -0
- package/src/plugins/catalog-manifest.ts +143 -0
- package/src/plugins/catalog-ui.ts +84 -0
- package/src/plugins/catalog.ts +44 -0
- package/src/plugins/compat.ts +225 -0
- package/src/plugins/current-target.ts +30 -0
- package/src/plugins/dependencies.ts +143 -0
- package/src/plugins/event-bus.ts +43 -0
- package/src/plugins/external-runtime.ts +54 -0
- package/src/plugins/extracted-plugins.ts +202 -0
- package/src/plugins/health.ts +21 -0
- package/src/plugins/host-link.ts +422 -0
- package/src/plugins/host-modules.ts +141 -0
- package/src/plugins/host-resolver.ts +100 -0
- package/src/plugins/host-smoke.ts +103 -0
- package/src/plugins/installer.ts +649 -0
- package/src/plugins/loader.ts +580 -0
- package/src/plugins/manager-node.ts +55 -0
- package/src/plugins/marketplace/activation.ts +95 -0
- package/src/plugins/marketplace/deactivation.ts +22 -0
- package/src/plugins/marketplace/feed.ts +92 -0
- package/src/plugins/marketplace/ids.ts +2 -0
- package/src/plugins/marketplace/model.ts +585 -0
- package/src/plugins/marketplace/packs.ts +118 -0
- package/src/plugins/marketplace/store.ts +130 -0
- package/src/plugins/ownership.ts +281 -0
- package/src/plugins/peer-retry.ts +155 -0
- package/src/plugins/plugin-export.ts +24 -0
- package/src/plugins/plugin-functions.ts +54 -0
- package/src/plugins/plugin-icon.ts +61 -0
- package/src/plugins/plugin-names.ts +32 -0
- package/src/plugins/plugin-off.ts +36 -0
- package/src/plugins/plugin-persistence.ts +84 -0
- package/src/plugins/registry/context-menu.ts +36 -0
- package/src/plugins/registry/contributions.ts +159 -0
- package/src/plugins/registry/host-actions.ts +276 -0
- package/src/plugins/registry/index.ts +777 -0
- package/src/plugins/registry/pane-settings.ts +188 -0
- package/src/plugins/registry/plugin-state.ts +135 -0
- package/src/plugins/registry/setup-command.ts +93 -0
- package/src/plugins/registry/shared.ts +28 -0
- package/src/plugins/registry/slots.ts +67 -0
- package/src/plugins/runtime/context.tsx +110 -0
- package/src/plugins/runtime/index.tsx +95 -0
- package/src/plugins/runtime/state.ts +256 -0
- package/src/plugins/seed-notice.ts +20 -0
- package/src/plugins/shortcut-argument.ts +39 -0
- package/src/plugins/team-state.ts +70 -0
- package/src/plugins/web-bundled.ts +33 -0
- package/src/portfolio/allocation.ts +316 -0
- package/src/portfolio/collection-name.ts +62 -0
- package/src/portfolio/column-values.ts +846 -0
- package/src/portfolio/cost-fx.ts +338 -0
- package/src/portfolio/futures-positions.ts +213 -0
- package/src/portfolio/futures-terms.ts +75 -0
- package/src/portfolio/manual-lots.ts +153 -0
- package/src/portfolio/mutations.ts +532 -0
- package/src/portfolio/position-metrics.ts +332 -0
- package/src/portfolio/position-quantity.ts +43 -0
- package/src/portfolio/position-value.ts +40 -0
- package/src/portfolio/suffixed-listings.ts +209 -0
- package/src/portfolio/totals-currency.ts +24 -0
- package/src/portfolio/valuation-basis.ts +89 -0
- package/src/public/__snapshots__/public-api.test.ts.snap +557 -0
- package/src/public/broker.ts +50 -0
- package/src/public/i18n.ts +17 -0
- package/src/public/index.ts +3 -0
- package/src/public/layout.ts +12 -0
- package/src/public/market-data.ts +43 -0
- package/src/public/pane-hooks.ts +72 -0
- package/src/public/quotes.ts +50 -0
- package/src/public/react.ts +130 -0
- package/src/public/remote.ts +23 -0
- package/src/public/test-support.ts +84 -0
- package/src/public/tickers.ts +40 -0
- package/src/public/time-series.ts +61 -0
- package/src/public/utils.ts +112 -0
- package/src/react/assign-ref.ts +10 -0
- package/src/react/async-resource.ts +79 -0
- package/src/react/auto-refresh.ts +107 -0
- package/src/react/input.ts +278 -0
- package/src/react/key-repeat.ts +86 -0
- package/src/react/plugins/plugin-slot.tsx +16 -0
- package/src/react/read-state.ts +104 -0
- package/src/react/ticker-source.ts +32 -0
- package/src/react/use-raf-callback.ts +44 -0
- package/src/react/use-throttled-commit-value.ts +133 -0
- package/src/remote/app-host.tsx +115 -0
- package/src/remote/client.ts +34 -0
- package/src/remote/command-bar.ts +98 -0
- package/src/remote/confirm-change.tsx +86 -0
- package/src/remote/controller-utils.ts +113 -0
- package/src/remote/controller.ts +727 -0
- package/src/remote/endpoint.ts +41 -0
- package/src/remote/form.ts +20 -0
- package/src/remote/json-patch.ts +103 -0
- package/src/remote/layout-helpers.ts +55 -0
- package/src/remote/matching.ts +69 -0
- package/src/remote/pane-screenshot.ts +47 -0
- package/src/remote/resources.ts +235 -0
- package/src/remote/revision.ts +5 -0
- package/src/remote/schema.ts +544 -0
- package/src/remote/semantic-helpers.ts +161 -0
- package/src/remote/semantic-tree.tsx +167 -0
- package/src/remote/server.ts +131 -0
- package/src/remote/types.ts +211 -0
- package/src/remote/watchlist.ts +314 -0
- package/src/renderers/browser/app-services.ts +33 -0
- package/src/renderers/browser/bundled-plugins.ts +91 -0
- package/src/renderers/browser/cloud-transport.ts +111 -0
- package/src/renderers/browser/config-host.ts +146 -0
- package/src/renderers/browser/deeplink-bridge.ts +52 -0
- package/src/renderers/browser/http-proxy-transport.ts +55 -0
- package/src/renderers/browser/main.tsx +142 -0
- package/src/renderers/browser/research-entry.ts +23 -0
- package/src/renderers/browser/ui-host.tsx +51 -0
- package/src/renderers/cloudflare/http-proxy.ts +289 -0
- package/src/renderers/cloudflare/proxy-session.ts +270 -0
- package/src/renderers/cloudflare/worker.ts +145 -0
- package/src/renderers/dom/boot-frame-page.ts +187 -0
- package/src/renderers/dom/boot-frame.ts +237 -0
- package/src/renderers/dom/build-assets.ts +273 -0
- package/src/renderers/dom/data-frames.ts +24 -0
- package/src/renderers/dom/data-table/dom.ts +253 -0
- package/src/renderers/dom/data-table/frozen-column.ts +24 -0
- package/src/renderers/dom/data-table/index.tsx +558 -0
- package/src/renderers/dom/data-table/row.tsx +480 -0
- package/src/renderers/dom/desktop/audio-player.tsx +312 -0
- package/src/renderers/dom/desktop/control-styles.ts +90 -0
- package/src/renderers/dom/desktop/controls.tsx +706 -0
- package/src/renderers/dom/desktop/dialog-actions.tsx +130 -0
- package/src/renderers/dom/desktop/icons.tsx +258 -0
- package/src/renderers/dom/desktop/list-view.tsx +331 -0
- package/src/renderers/dom/desktop/menu.tsx +115 -0
- package/src/renderers/dom/desktop/popover.tsx +249 -0
- package/src/renderers/dom/desktop/query-bar.tsx +350 -0
- package/src/renderers/dom/desktop/select-field.tsx +153 -0
- package/src/renderers/dom/desktop/stack-header.ts +22 -0
- package/src/renderers/dom/dialog-host.tsx +148 -0
- package/src/renderers/dom/dom-host-providers.tsx +64 -0
- package/src/renderers/dom/dom-ui-host.tsx +121 -0
- package/src/renderers/dom/host/ascii-text.ts +51 -0
- package/src/renderers/dom/host/block-glyph-canvas.tsx +118 -0
- package/src/renderers/dom/host/box.tsx +368 -0
- package/src/renderers/dom/host/chart-surface.tsx +310 -0
- package/src/renderers/dom/host/drag-shield.ts +35 -0
- package/src/renderers/dom/host/focus-scope.ts +105 -0
- package/src/renderers/dom/host/hls.chunk.ts +3 -0
- package/src/renderers/dom/host/image-surface.tsx +49 -0
- package/src/renderers/dom/host/input.tsx +403 -0
- package/src/renderers/dom/host/live-frame.ts +66 -0
- package/src/renderers/dom/host/media-surface.tsx +270 -0
- package/src/renderers/dom/host/mouse.ts +183 -0
- package/src/renderers/dom/host/overflow-fade.ts +89 -0
- package/src/renderers/dom/host/resize-rows.ts +111 -0
- package/src/renderers/dom/host/scroll-box.tsx +344 -0
- package/src/renderers/dom/host/size-observer.ts +70 -0
- package/src/renderers/dom/host/sticky-scroll.ts +147 -0
- package/src/renderers/dom/host/style.ts +148 -0
- package/src/renderers/dom/host/surface-3d.tsx +707 -0
- package/src/renderers/dom/host/surface-fit.ts +413 -0
- package/src/renderers/dom/host/tabs.tsx +380 -0
- package/src/renderers/dom/host/text.tsx +174 -0
- package/src/renderers/dom/host/top-surface.ts +127 -0
- package/src/renderers/dom/input-host.tsx +163 -0
- package/src/renderers/dom/key-event.ts +186 -0
- package/src/renderers/dom/native-renderer.ts +114 -0
- package/src/renderers/dom/scrollbar-activity.ts +23 -0
- package/src/renderers/dom/styles.css +1633 -0
- package/src/renderers/dom/test-utils.tsx +79 -0
- package/src/renderers/dom/toast-host.tsx +95 -0
- package/src/renderers/dom/windowed-list.tsx +201 -0
- package/src/renderers/dom/windowed-rows.ts +65 -0
- package/src/renderers/electrobun/bun/application-menu/click.ts +66 -0
- package/src/renderers/electrobun/bun/application-menu/index.ts +137 -0
- package/src/renderers/electrobun/bun/context-menu/click.ts +42 -0
- package/src/renderers/electrobun/bun/context-menu/normalize.ts +62 -0
- package/src/renderers/electrobun/bun/core-capabilities.ts +241 -0
- package/src/renderers/electrobun/bun/desktop/app-badge.ts +37 -0
- package/src/renderers/electrobun/bun/desktop/app-icon.ts +127 -0
- package/src/renderers/electrobun/bun/desktop/app-name.ts +222 -0
- package/src/renderers/electrobun/bun/desktop/backend-requests.ts +119 -0
- package/src/renderers/electrobun/bun/desktop/backend.ts +591 -0
- package/src/renderers/electrobun/bun/desktop/capability-bridge.ts +144 -0
- package/src/renderers/electrobun/bun/desktop/detached-windows.ts +275 -0
- package/src/renderers/electrobun/bun/desktop/host-requests.ts +177 -0
- package/src/renderers/electrobun/bun/desktop/http-fetch.ts +84 -0
- package/src/renderers/electrobun/bun/desktop/http-stream.ts +191 -0
- package/src/renderers/electrobun/bun/desktop/initialization.ts +196 -0
- package/src/renderers/electrobun/bun/desktop/macos-dock-badge.ts +38 -0
- package/src/renderers/electrobun/bun/desktop/macos-dock-icon.ts +52 -0
- package/src/renderers/electrobun/bun/desktop/macos-objc.ts +52 -0
- package/src/renderers/electrobun/bun/desktop/plugin-state.ts +90 -0
- package/src/renderers/electrobun/bun/desktop/relaunch.ts +97 -0
- package/src/renderers/electrobun/bun/desktop/rpc-registry.ts +43 -0
- package/src/renderers/electrobun/bun/desktop/state-broadcaster.ts +119 -0
- package/src/renderers/electrobun/bun/desktop/update.ts +621 -0
- package/src/renderers/electrobun/bun/desktop/workspace/index.ts +256 -0
- package/src/renderers/electrobun/bun/desktop/workspace/requests.ts +74 -0
- package/src/renderers/electrobun/bun/external-plugins.ts +242 -0
- package/src/renderers/electrobun/bun/index.ts +185 -0
- package/src/renderers/electrobun/bun/menu-event.ts +17 -0
- package/src/renderers/electrobun/bun/tui-entry.ts +18 -0
- package/src/renderers/electrobun/bun/window/boot-frame.ts +67 -0
- package/src/renderers/electrobun/bun/window/controls.ts +69 -0
- package/src/renderers/electrobun/bun/window/create.ts +87 -0
- package/src/renderers/electrobun/bun/window/events.ts +49 -0
- package/src/renderers/electrobun/bun/window/focus.ts +42 -0
- package/src/renderers/electrobun/bun/window/frame.ts +51 -0
- package/src/renderers/electrobun/bun/window/remembered-frame.ts +122 -0
- package/src/renderers/electrobun/bun/window/windows-custom-chrome.ts +43 -0
- package/src/renderers/electrobun/bun/window/windows-icons.ts +55 -0
- package/src/renderers/electrobun/bun/window/windows-native.ts +96 -0
- package/src/renderers/electrobun/shared/app-name.ts +17 -0
- package/src/renderers/electrobun/shared/boot-frame.ts +7 -0
- package/src/renderers/electrobun/shared/protocol.ts +362 -0
- package/src/renderers/electrobun/shared/quote-event-batch.ts +103 -0
- package/src/renderers/electrobun/shared/rpc-codec.ts +94 -0
- package/src/renderers/electrobun/view/app-badge-host.ts +17 -0
- package/src/renderers/electrobun/view/app-services.ts +38 -0
- package/src/renderers/electrobun/view/backend-rpc.ts +229 -0
- package/src/renderers/electrobun/view/broker-remote-client.ts +157 -0
- package/src/renderers/electrobun/view/capability-stream-client.ts +31 -0
- package/src/renderers/electrobun/view/capability-subscription.ts +50 -0
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +546 -0
- package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +179 -0
- package/src/renderers/electrobun/view/cli-pane-shot-health.ts +15 -0
- package/src/renderers/electrobun/view/config-host.ts +38 -0
- package/src/renderers/electrobun/view/context-menu.ts +147 -0
- package/src/renderers/electrobun/view/desktop/window/bridge.ts +68 -0
- package/src/renderers/electrobun/view/desktop/window/snapshot.ts +60 -0
- package/src/renderers/electrobun/view/external-plugins.ts +88 -0
- package/src/renderers/electrobun/view/fatal-screen.tsx +76 -0
- package/src/renderers/electrobun/view/host/native.ts +33 -0
- package/src/renderers/electrobun/view/host/window-move.ts +28 -0
- package/src/renderers/electrobun/view/http-fetch.ts +199 -0
- package/src/renderers/electrobun/view/main.tsx +286 -0
- package/src/renderers/electrobun/view/native-stubs/backend-rpc.ts +34 -0
- package/src/renderers/electrobun/view/news-source.ts +44 -0
- package/src/renderers/electrobun/view/remote/asset-data-client.ts +156 -0
- package/src/renderers/electrobun/view/remote/backend-quote-subscription.ts +127 -0
- package/src/renderers/electrobun/view/remote/capability-invoker.ts +57 -0
- package/src/renderers/electrobun/view/remote/connection-health.ts +31 -0
- package/src/renderers/electrobun/view/remote/persistence.ts +149 -0
- package/src/renderers/electrobun/view/remote/quote-subscription-registry.ts +74 -0
- package/src/renderers/electrobun/view/remote/ticker-repository.ts +26 -0
- package/src/renderers/electrobun/view/renderer-window-error.ts +18 -0
- package/src/renderers/electrobun/view/rpc-timeout.ts +70 -0
- package/src/renderers/electrobun/view/screenshot-watermark.ts +105 -0
- package/src/renderers/electrobun/view/ui-host.tsx +80 -0
- package/src/renderers/electrobun/view/update-host.ts +62 -0
- package/src/renderers/electrobun/view/window-fullscreen.ts +57 -0
- package/src/renderers/opentui/browser-open.ts +88 -0
- package/src/renderers/opentui/chart-surface.tsx +152 -0
- package/src/renderers/opentui/dialog-host.tsx +229 -0
- package/src/renderers/opentui/frame-capture.ts +33 -0
- package/src/renderers/opentui/host.tsx +280 -0
- package/src/renderers/opentui/image/loader.ts +116 -0
- package/src/renderers/opentui/image/surface.tsx +107 -0
- package/src/renderers/opentui/input-host.tsx +41 -0
- package/src/renderers/opentui/interaction-performance.ts +214 -0
- package/src/renderers/opentui/kitty-services.ts +15 -0
- package/src/renderers/opentui/native-smoke.ts +10 -0
- package/src/renderers/opentui/native-surface.ts +176 -0
- package/src/renderers/opentui/pane-image/glyphs-license.txt +107 -0
- package/src/renderers/opentui/pane-image/glyphs.json +1 -0
- package/src/renderers/opentui/pane-image/index.ts +108 -0
- package/src/renderers/opentui/pane-image/raster.ts +428 -0
- package/src/renderers/opentui/render-lib.ts +253 -0
- package/src/renderers/opentui/render-timing-smoke.ts +20 -0
- package/src/renderers/opentui/scrollbox-layout.ts +35 -0
- package/src/renderers/opentui/start.tsx +186 -0
- package/src/renderers/opentui/terminal-input-reset.ts +25 -0
- package/src/renderers/opentui/terminal-media.ts +234 -0
- package/src/renderers/opentui/test-utils.tsx +310 -0
- package/src/renderers/opentui/toast-host.tsx +129 -0
- package/src/renderers/opentui/ui-host.tsx +271 -0
- package/src/renderers/share/chart.ts +74 -0
- package/src/renderers/share/layout-view.tsx +133 -0
- package/src/renderers/share/main.tsx +110 -0
- package/src/renderers/share/styles.css +83 -0
- package/src/renderers/share/view.tsx +159 -0
- package/src/series/capability.ts +76 -0
- package/src/series/csv.ts +160 -0
- package/src/series/files.ts +113 -0
- package/src/series/registry.ts +224 -0
- package/src/series/resolve.ts +227 -0
- package/src/series/standalone.ts +77 -0
- package/src/series/types.ts +214 -0
- package/src/series/validate.ts +215 -0
- package/src/shares/api.ts +150 -0
- package/src/shares/bug-report-dialog.tsx +162 -0
- package/src/shares/bug-report-flow.tsx +81 -0
- package/src/shares/bug-report.ts +42 -0
- package/src/shares/capture-flow.ts +20 -0
- package/src/shares/capture-preview.tsx +129 -0
- package/src/shares/chat.ts +23 -0
- package/src/shares/flow.tsx +98 -0
- package/src/shares/location.ts +40 -0
- package/src/shares/open.ts +26 -0
- package/src/shares/pane-image.ts +166 -0
- package/src/shares/pane.ts +60 -0
- package/src/shares/payload.ts +206 -0
- package/src/shares/personal-pane.ts +86 -0
- package/src/shares/portable-layout.ts +734 -0
- package/src/shares/prepare.ts +20 -0
- package/src/shares/ready.ts +42 -0
- package/src/shares/test-harness.ts +62 -0
- package/src/sources/gloomberb-cloud/batched-lookups.ts +73 -0
- package/src/sources/gloomberb-cloud/fred-series.ts +202 -0
- package/src/sources/gloomberb-cloud/index.ts +986 -0
- package/src/sources/gloomberb-cloud/news.ts +170 -0
- package/src/sources/gloomberb-cloud/normalizers.ts +464 -0
- package/src/sources/gloomberb-cloud/perpetuals.ts +316 -0
- package/src/sources/history-coverage.ts +56 -0
- package/src/sources/history-omitted.ts +34 -0
- package/src/sources/history-result.ts +88 -0
- package/src/sources/history-retention.ts +177 -0
- package/src/sources/listing-symbols.ts +206 -0
- package/src/sources/listing-target.ts +45 -0
- package/src/sources/provider-errors.ts +170 -0
- package/src/sources/provider-router/batches.ts +233 -0
- package/src/sources/provider-router/brokers.ts +104 -0
- package/src/sources/provider-router/cache.ts +229 -0
- package/src/sources/provider-router/cached-routes.ts +261 -0
- package/src/sources/provider-router/connection-health.ts +48 -0
- package/src/sources/provider-router/financial-routes.ts +383 -0
- package/src/sources/provider-router/financials.ts +615 -0
- package/src/sources/provider-router/history.ts +973 -0
- package/src/sources/provider-router/index.ts +710 -0
- package/src/sources/provider-router/news.ts +51 -0
- package/src/sources/provider-router/primary.ts +228 -0
- package/src/sources/provider-router/quote-route.ts +70 -0
- package/src/sources/provider-router/realtime-access.ts +64 -0
- package/src/sources/provider-router/route-types.ts +34 -0
- package/src/sources/provider-router/routing.ts +44 -0
- package/src/sources/provider-router/search.ts +272 -0
- package/src/sources/provider-router/sources.ts +55 -0
- package/src/sources/provider-router/statement-history.ts +15 -0
- package/src/sources/provider-router/streaming.ts +359 -0
- package/src/sources/provider-router/supplemental.ts +53 -0
- package/src/sources/provider-router/test-support.ts +47 -0
- package/src/sources/sec-edgar/acceptance-time.ts +11 -0
- package/src/sources/sec-edgar/content.ts +207 -0
- package/src/sources/sec-edgar/fourth-quarter.ts +179 -0
- package/src/sources/sec-edgar/identity.ts +36 -0
- package/src/sources/sec-edgar.ts +890 -0
- package/src/sources/sec-registrant.ts +75 -0
- package/src/state/app/activity.ts +216 -0
- package/src/state/app/bootstrap.ts +418 -0
- package/src/state/app/context/index.tsx +656 -0
- package/src/state/app/input-capture.ts +12 -0
- package/src/state/app/tab-cursor.ts +222 -0
- package/src/state/config-save-scheduler.ts +38 -0
- package/src/state/hooks/inline-ticker-failures.ts +100 -0
- package/src/state/hooks/inline-tickers.ts +545 -0
- package/src/state/hooks/live-streaming.ts +60 -0
- package/src/state/hooks/live-ticker-financials.ts +171 -0
- package/src/state/hooks/pane-ticker.ts +58 -0
- package/src/state/hooks/quote-streaming.ts +326 -0
- package/src/state/hooks/session-snapshot.ts +101 -0
- package/src/state/pane-scroll-registry.tsx +299 -0
- package/src/state/pane-table-export-registry.ts +50 -0
- package/src/state/persist-scheduler.ts +123 -0
- package/src/state/ticker-refresh-queue.ts +89 -0
- package/src/sync/auth-transition.ts +32 -0
- package/src/sync/baseline.ts +43 -0
- package/src/sync/controller.ts +574 -0
- package/src/sync/core-contributors.ts +1491 -0
- package/src/sync/local-only.ts +121 -0
- package/src/sync/profile-analytics.ts +42 -0
- package/src/sync/react.ts +89 -0
- package/src/sync/types.ts +142 -0
- package/src/team/collections-sync.ts +235 -0
- package/src/team/collections.ts +369 -0
- package/src/team/model.ts +210 -0
- package/src/team/pane-request.ts +30 -0
- package/src/team/store.ts +324 -0
- package/src/telemetry/attention-counts.ts +170 -0
- package/src/telemetry/benign-window-error.ts +7 -0
- package/src/telemetry/crash-reports-dom.ts +79 -0
- package/src/telemetry/crash-reports-node.ts +173 -0
- package/src/telemetry/crash-reports.ts +373 -0
- package/src/telemetry/live-config.ts +26 -0
- package/src/telemetry/update-failures-node.ts +59 -0
- package/src/telemetry/update-failures.ts +307 -0
- package/src/telemetry/usage-counts-dom.ts +22 -0
- package/src/telemetry/usage-counts.ts +393 -0
- package/src/test-support/app-store.ts +21 -0
- package/src/test-support/broker.ts +81 -0
- package/src/test-support/builtin-panes.ts +31 -0
- package/src/test-support/cli-context.ts +37 -0
- package/src/test-support/cloud-api.ts +85 -0
- package/src/test-support/config-store.ts +31 -0
- package/src/test-support/console.ts +40 -0
- package/src/test-support/daily-nav.ts +25 -0
- package/src/test-support/data-provider.ts +85 -0
- package/src/test-support/headless.ts +32 -0
- package/src/test-support/margin-account.ts +108 -0
- package/src/test-support/market-session.ts +12 -0
- package/src/test-support/moved-symbols.ts +64 -0
- package/src/test-support/network-guard.ts +35 -0
- package/src/test-support/news.ts +21 -0
- package/src/test-support/pane.tsx +72 -0
- package/src/test-support/plugin-persistence.ts +112 -0
- package/src/test-support/plugin-runtime.ts +145 -0
- package/src/test-support/quote-store.ts +49 -0
- package/src/test-support/renderer-host.ts +10 -0
- package/src/test-support/rpc-loopback.ts +26 -0
- package/src/test-support/shell-pane-keys.tsx +36 -0
- package/src/test-support/temp-db.ts +19 -0
- package/src/test-support/ticker.ts +15 -0
- package/src/test-support/time-series.ts +27 -0
- package/src/theme/color-utils.ts +126 -0
- package/src/theme/colors.ts +311 -0
- package/src/theme/font-scale.ts +71 -0
- package/src/theme/heat-colors.ts +455 -0
- package/src/theme/series-colors.ts +46 -0
- package/src/theme/theme-context.tsx +44 -0
- package/src/theme/themes.ts +812 -0
- package/src/theme/ui-tokens.ts +107 -0
- package/src/tickers/batched-lookups.ts +186 -0
- package/src/tickers/company-name-listing.ts +276 -0
- package/src/tickers/company-name.ts +190 -0
- package/src/tickers/index-roots.ts +47 -0
- package/src/tickers/instrument-coverage.ts +112 -0
- package/src/tickers/instrument-kind.ts +165 -0
- package/src/tickers/instrument-label.ts +15 -0
- package/src/tickers/list.ts +36 -0
- package/src/tickers/listing-fate.ts +331 -0
- package/src/tickers/listing-name.ts +34 -0
- package/src/tickers/listing-venues.ts +196 -0
- package/src/tickers/metadata.ts +74 -0
- package/src/tickers/open-target.ts +183 -0
- package/src/tickers/perpetual-listing.ts +154 -0
- package/src/tickers/prediction-listing.ts +26 -0
- package/src/tickers/search/asset-classes.ts +106 -0
- package/src/tickers/search/bare-symbol.ts +36 -0
- package/src/tickers/search/home-listing.ts +75 -0
- package/src/tickers/search/identity.ts +19 -0
- package/src/tickers/search/index.ts +977 -0
- package/src/tickers/search/ranking.ts +1002 -0
- package/src/tickers/search/result.ts +27 -0
- package/src/tickers/search/types.ts +63 -0
- package/src/tickers/search/upsert.ts +156 -0
- package/src/tickers/selection.ts +21 -0
- package/src/tickers/starter-symbols.ts +8 -0
- package/src/tickers/terminal-codes.ts +455 -0
- package/src/tickers/ticker-changes.ts +301 -0
- package/src/tickers/tokenizer.ts +37 -0
- package/src/tickers/us-listing.ts +35 -0
- package/src/time-series/alignment.ts +173 -0
- package/src/time-series/bar-aggregation.ts +243 -0
- package/src/time-series/bar-spacing.ts +19 -0
- package/src/time-series/base-series.ts +315 -0
- package/src/time-series/chart-bounds.ts +349 -0
- package/src/time-series/chart-data.ts +329 -0
- package/src/time-series/chart-seed.ts +142 -0
- package/src/time-series/daily-valuation.ts +62 -0
- package/src/time-series/date-window.ts +41 -0
- package/src/time-series/economic.ts +92 -0
- package/src/time-series/field-catalog.ts +318 -0
- package/src/time-series/financial-period-coverage.ts +59 -0
- package/src/time-series/forward-valuation.ts +285 -0
- package/src/time-series/fundamentals.ts +1232 -0
- package/src/time-series/history-acquisition.ts +499 -0
- package/src/time-series/history-quality.ts +68 -0
- package/src/time-series/history-window.ts +21 -0
- package/src/time-series/hooks.ts +88 -0
- package/src/time-series/ice-credit.ts +54 -0
- package/src/time-series/leverage.ts +100 -0
- package/src/time-series/live-bars.ts +428 -0
- package/src/time-series/live-quotes.ts +234 -0
- package/src/time-series/market-resolution.ts +55 -0
- package/src/time-series/market.ts +177 -0
- package/src/time-series/parsed-history-cache.ts +79 -0
- package/src/time-series/price-comparison.ts +318 -0
- package/src/time-series/price-units.ts +139 -0
- package/src/time-series/range.ts +29 -0
- package/src/time-series/reporting-currency.ts +37 -0
- package/src/time-series/reporting.ts +134 -0
- package/src/time-series/resolution.ts +554 -0
- package/src/time-series/resolve-context.ts +161 -0
- package/src/time-series/resolve.ts +1138 -0
- package/src/time-series/series-name.ts +38 -0
- package/src/time-series/series-presentation.ts +242 -0
- package/src/time-series/session-bar.ts +138 -0
- package/src/time-series/spec.ts +557 -0
- package/src/time-series/studies.ts +1622 -0
- package/src/time-series/tail-reconcile.ts +121 -0
- package/src/time-series/trader-studies.ts +188 -0
- package/src/time-series/transforms.ts +174 -0
- package/src/time-series/types.ts +325 -0
- package/src/time-series/use-chart-resolution.ts +549 -0
- package/src/time-series/valuation-currency.ts +48 -0
- package/src/time-series/valuation-price.ts +81 -0
- package/src/time-series/valuation-releases.ts +39 -0
- package/src/types/broker.ts +237 -0
- package/src/types/capability-route-source.ts +25 -0
- package/src/types/config.ts +1046 -0
- package/src/types/context-menu.ts +101 -0
- package/src/types/data-provider.ts +355 -0
- package/src/types/desktop-deeplink.ts +8 -0
- package/src/types/desktop-menu.ts +16 -0
- package/src/types/desktop-window.ts +39 -0
- package/src/types/exchange-rate.ts +19 -0
- package/src/types/financials.ts +1077 -0
- package/src/types/headless.ts +764 -0
- package/src/types/instrument.ts +90 -0
- package/src/types/issuer-listings.ts +28 -0
- package/src/types/news-source.ts +8 -0
- package/src/types/persistence.ts +22 -0
- package/src/types/plugin.ts +1151 -0
- package/src/types/price-history.ts +52 -0
- package/src/types/ticker-changes.ts +45 -0
- package/src/types/ticker.ts +126 -0
- package/src/types/trading.ts +253 -0
- package/src/ui/ascii-font.ts +97 -0
- package/src/ui/context-menu.tsx +481 -0
- package/src/ui/dialog-bridge.tsx +50 -0
- package/src/ui/dialog-context.ts +24 -0
- package/src/ui/dialog-stack.ts +126 -0
- package/src/ui/dialog.tsx +98 -0
- package/src/ui/host.tsx +827 -0
- package/src/ui/index.tsx +313 -0
- package/src/ui/live-resize.ts +91 -0
- package/src/ui/live-stretch.ts +153 -0
- package/src/ui/measured-cells.ts +64 -0
- package/src/ui/pointer-drag.ts +12 -0
- package/src/ui/qr.ts +84 -0
- package/src/ui/resize-settle.ts +128 -0
- package/src/ui/scroll-box-axis.ts +26 -0
- package/src/ui/sticky-scroll.ts +7 -0
- package/src/ui/toast.tsx +147 -0
- package/src/updater/channel.ts +51 -0
- package/src/updater/command-names.ts +180 -0
- package/src/updater/failure.ts +163 -0
- package/src/updater/github-releases.ts +142 -0
- package/src/updater/index.ts +677 -0
- package/src/utils/asset-category.ts +20 -0
- package/src/utils/async-deadline.ts +81 -0
- package/src/utils/back-navigation.ts +52 -0
- package/src/utils/base-currency.ts +108 -0
- package/src/utils/basis-points.ts +17 -0
- package/src/utils/broker-instances.ts +47 -0
- package/src/utils/calendar-date.ts +163 -0
- package/src/utils/cash-runway.ts +241 -0
- package/src/utils/central-banks.ts +118 -0
- package/src/utils/cli-output.ts +646 -0
- package/src/utils/concurrency.ts +25 -0
- package/src/utils/contract-month.ts +16 -0
- package/src/utils/crypto-pair.ts +119 -0
- package/src/utils/csv.ts +54 -0
- package/src/utils/currency-names.ts +128 -0
- package/src/utils/currency-pair.ts +112 -0
- package/src/utils/currency-units.ts +255 -0
- package/src/utils/datetime-format.ts +174 -0
- package/src/utils/debug-log.ts +201 -0
- package/src/utils/decimal-comma.ts +238 -0
- package/src/utils/declared-dividends.ts +39 -0
- package/src/utils/depositary-receipt.ts +70 -0
- package/src/utils/display-number.ts +63 -0
- package/src/utils/dividend-cash.ts +48 -0
- package/src/utils/dom-screenshot-css.ts +265 -0
- package/src/utils/dom-screenshot-rasters.ts +278 -0
- package/src/utils/dom-screenshot.ts +860 -0
- package/src/utils/double-escape-close.ts +82 -0
- package/src/utils/errors.ts +4 -0
- package/src/utils/exchange-announcements.ts +71 -0
- package/src/utils/exchange-notation.generated.ts +360 -0
- package/src/utils/exchange-rate-snapshot.ts +82 -0
- package/src/utils/exchanges.ts +214 -0
- package/src/utils/external-url.ts +24 -0
- package/src/utils/financial-statements.ts +342 -0
- package/src/utils/fire-and-forget.ts +24 -0
- package/src/utils/fiscal-period.ts +47 -0
- package/src/utils/format.ts +446 -0
- package/src/utils/forward-dividend.ts +216 -0
- package/src/utils/fundamentals.ts +269 -0
- package/src/utils/futures-generic.ts +221 -0
- package/src/utils/fuzzy-search.ts +105 -0
- package/src/utils/fx-market-hours.ts +95 -0
- package/src/utils/fx-status.ts +47 -0
- package/src/utils/guards.ts +62 -0
- package/src/utils/hash.ts +23 -0
- package/src/utils/html-entities.ts +45 -0
- package/src/utils/http-proxy-response.ts +257 -0
- package/src/utils/http-transport.ts +31 -0
- package/src/utils/income-statement.ts +46 -0
- package/src/utils/inline-content-tokenizer.ts +116 -0
- package/src/utils/instrument-identity.ts +72 -0
- package/src/utils/keyboard.ts +31 -0
- package/src/utils/latest-financial-period.ts +34 -0
- package/src/utils/link-tokenizer.ts +93 -0
- package/src/utils/linux-libc.ts +54 -0
- package/src/utils/local-utc-offset.ts +39 -0
- package/src/utils/log-failure.ts +31 -0
- package/src/utils/main-thread-stall.ts +64 -0
- package/src/utils/markdown.ts +180 -0
- package/src/utils/market-capitalization.ts +184 -0
- package/src/utils/math.ts +12 -0
- package/src/utils/max-drawdown.ts +64 -0
- package/src/utils/network-failure.ts +86 -0
- package/src/utils/object-version.ts +17 -0
- package/src/utils/one-shot.ts +73 -0
- package/src/utils/option-expiry.ts +321 -0
- package/src/utils/options.ts +170 -0
- package/src/utils/perf-marks.ts +96 -0
- package/src/utils/platform.ts +34 -0
- package/src/utils/plugin-proxy-hosts.json +23 -0
- package/src/utils/plugin-proxy-hosts.ts +28 -0
- package/src/utils/price-earnings.ts +86 -0
- package/src/utils/price-history-integrity.ts +127 -0
- package/src/utils/price-history.ts +528 -0
- package/src/utils/price-window.ts +131 -0
- package/src/utils/release-date.ts +47 -0
- package/src/utils/reported-money.ts +35 -0
- package/src/utils/rpc-timeout-error.ts +31 -0
- package/src/utils/save-text-file.ts +36 -0
- package/src/utils/screenshot-watermark.ts +27 -0
- package/src/utils/search-focus-navigation.ts +24 -0
- package/src/utils/sec-eps-basis.ts +294 -0
- package/src/utils/sec-filings.ts +245 -0
- package/src/utils/sec.ts +258 -0
- package/src/utils/selection-clipboard.ts +99 -0
- package/src/utils/semver.ts +108 -0
- package/src/utils/shortcut-labels.ts +42 -0
- package/src/utils/slugify.ts +4 -0
- package/src/utils/sort-values.ts +78 -0
- package/src/utils/statement-gaps.ts +94 -0
- package/src/utils/text-wrap.ts +107 -0
- package/src/utils/throttled-fetch.ts +253 -0
- package/src/utils/timestamp.ts +54 -0
- package/src/utils/trailing-dividend.ts +130 -0
- package/src/utils/trailing-eps.ts +67 -0
- package/src/utils/typed-text.ts +21 -0
- package/src/utils/typo-distance.ts +22 -0
- package/src/utils/url.ts +12 -0
- package/src/utils/utc-time.ts +183 -0
- package/src/utils/zoned-date-time.ts +146 -0
- package/src/version.ts +9 -0
|
@@ -0,0 +1,1491 @@
|
|
|
1
|
+
import { saveConfigImmediately, scheduleConfigSave } from "../state/config-save-scheduler";
|
|
2
|
+
import { normalizeStoredBaseCurrency } from "../utils/base-currency";
|
|
3
|
+
import { debugLog } from "../utils/debug-log";
|
|
4
|
+
import { fnv1aHex, stableStringify } from "../utils/hash";
|
|
5
|
+
import type { AppConfig, BrokerInstanceConfig, SavedLayout } from "../types/config";
|
|
6
|
+
import type { PricePoint, TickerFinancials } from "../types/financials";
|
|
7
|
+
import type { Portfolio, TickerMetadata, TickerPosition, TickerRecord, Watchlist } from "../types/ticker";
|
|
8
|
+
import type { BrokerAccount } from "../types/trading";
|
|
9
|
+
import { hydrateTickerMetadata } from "../tickers/metadata";
|
|
10
|
+
import type { SyncContributor } from "./types";
|
|
11
|
+
import { convertCurrency } from "../utils/format";
|
|
12
|
+
import { fxRateCurrencies } from "../utils/currency-units";
|
|
13
|
+
import { getSharedMarketDataCoordinator, resolveEntryValue } from "../market-data/coordinator";
|
|
14
|
+
import {
|
|
15
|
+
computeDatedBeta,
|
|
16
|
+
resolveDatedReturns,
|
|
17
|
+
computeWeightedPortfolioReturns,
|
|
18
|
+
syntheticAccountUnsupportedReason,
|
|
19
|
+
syntheticPositionUnsupportedReason,
|
|
20
|
+
type DatedReturn,
|
|
21
|
+
type ReturnHistoryResult,
|
|
22
|
+
type WeightedReturnSeries,
|
|
23
|
+
} from "../plugins/builtin/analytics/metrics";
|
|
24
|
+
import {
|
|
25
|
+
getSyncedProfileAnalytics,
|
|
26
|
+
setSyncedProfileAnalytics,
|
|
27
|
+
} from "./profile-analytics";
|
|
28
|
+
import {
|
|
29
|
+
addLegacyBuiltinDisabledPluginAliases,
|
|
30
|
+
addLegacyBuiltinPluginOwnerAliases,
|
|
31
|
+
decodeBuiltinDisabledPluginIds,
|
|
32
|
+
encodeBuiltinDisabledPluginIds,
|
|
33
|
+
normalizeBuiltinPluginStateMap,
|
|
34
|
+
} from "../plugins/ownership";
|
|
35
|
+
import { isFiniteNumber, isRecord, recordOrNull } from "../utils/guards";
|
|
36
|
+
import { getBrokerInstance } from "../utils/broker-instances";
|
|
37
|
+
import { withoutMissingWatchlists } from "../portfolio/mutations";
|
|
38
|
+
import { mergeSuffixedListings, moveTargetWeights } from "../portfolio/suffixed-listings";
|
|
39
|
+
import { positionContractMultiplier } from "../portfolio/position-metrics";
|
|
40
|
+
import {
|
|
41
|
+
clearLeftoverBrokerHoldings,
|
|
42
|
+
knownBrokerHoldings,
|
|
43
|
+
type KnownBrokerHoldings,
|
|
44
|
+
} from "../brokers/broker-portfolio-sync";
|
|
45
|
+
import {
|
|
46
|
+
isLocalOnlyInstance,
|
|
47
|
+
isLocalOnlyPortfolio,
|
|
48
|
+
localOnlyScope,
|
|
49
|
+
publicConfig,
|
|
50
|
+
publicMarketData,
|
|
51
|
+
publicTickers,
|
|
52
|
+
withLocalOnlyEntries,
|
|
53
|
+
type LocalOnlyScope,
|
|
54
|
+
} from "./local-only";
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* What a saved layout mirrors from the live session rather than from the
|
|
58
|
+
* workspace the user arranged. None of it crosses the network: it is the view
|
|
59
|
+
* this device is looking at right now, not a layout two devices should agree
|
|
60
|
+
* on. Syncing it made every poll hand each client the other's open detail,
|
|
61
|
+
* cursor and scroll position, and each apply pushed the view straight back.
|
|
62
|
+
*/
|
|
63
|
+
const SESSION_SAVED_LAYOUT_KEYS = ["paneState", "focusedPaneId", "activePanel"] as const;
|
|
64
|
+
|
|
65
|
+
/** Together these are the workspace: the tabs, the one showing, and its arrangement. */
|
|
66
|
+
const LAYOUT_SYNC_KEYS = ["layout", "layouts", "activeLayoutIndex"] as const;
|
|
67
|
+
|
|
68
|
+
const SENSITIVE_KEY_PATTERN = /(token|secret|password|credential|private|api[_-]?key|access[_-]?key|refresh[_-]?key|session|cookie|dataDir|path|directory|localPath)/i;
|
|
69
|
+
|
|
70
|
+
const log = debugLog.createLogger("sync");
|
|
71
|
+
|
|
72
|
+
function sanitizeUnknown(value: unknown): unknown {
|
|
73
|
+
if (Array.isArray(value)) {
|
|
74
|
+
return value.map(sanitizeUnknown).filter((entry) => entry !== undefined);
|
|
75
|
+
}
|
|
76
|
+
if (!isRecord(value)) return value;
|
|
77
|
+
|
|
78
|
+
const output: Record<string, unknown> = {};
|
|
79
|
+
for (const [key, child] of Object.entries(value)) {
|
|
80
|
+
if (SENSITIVE_KEY_PATTERN.test(key)) continue;
|
|
81
|
+
const sanitized = sanitizeUnknown(child);
|
|
82
|
+
if (sanitized !== undefined) output[key] = sanitized;
|
|
83
|
+
}
|
|
84
|
+
return output;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Puts back what `sanitizeUnknown` keeps off the wire. A pulled config never
|
|
89
|
+
* carries a token, password, key or local path, so taking it as-is deleted
|
|
90
|
+
* them on this device: any plugin setting changed elsewhere (an alert, a
|
|
91
|
+
* price level) wiped every plugin's saved credentials, and the user had to
|
|
92
|
+
* paste them again. Those values belong to this device, so they always win.
|
|
93
|
+
*/
|
|
94
|
+
function withLocalSensitiveValues(
|
|
95
|
+
pulled: Record<string, unknown>,
|
|
96
|
+
local: Record<string, unknown>,
|
|
97
|
+
): Record<string, unknown> {
|
|
98
|
+
const output: Record<string, unknown> = { ...pulled };
|
|
99
|
+
for (const [key, localChild] of Object.entries(local)) {
|
|
100
|
+
if (SENSITIVE_KEY_PATTERN.test(key)) {
|
|
101
|
+
output[key] = localChild;
|
|
102
|
+
} else if (isRecord(output[key]) && isRecord(localChild)) {
|
|
103
|
+
output[key] = withLocalSensitiveValues(output[key] as Record<string, unknown>, localChild);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return output;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function withLocalPluginSecrets(
|
|
110
|
+
pulled: AppConfig["pluginConfig"],
|
|
111
|
+
local: AppConfig["pluginConfig"],
|
|
112
|
+
): AppConfig["pluginConfig"] {
|
|
113
|
+
const next = { ...pulled };
|
|
114
|
+
for (const [pluginId, localState] of Object.entries(local)) {
|
|
115
|
+
if (!isRecord(localState)) continue;
|
|
116
|
+
// A plugin the other device has no settings for still keeps its secrets here.
|
|
117
|
+
const merged = withLocalSensitiveValues(next[pluginId] ?? {}, localState);
|
|
118
|
+
if (pluginId in next || Object.keys(merged).length > 0) next[pluginId] = merged;
|
|
119
|
+
}
|
|
120
|
+
return next;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function sanitizePortfolio(portfolio: Portfolio): Portfolio {
|
|
124
|
+
return {
|
|
125
|
+
id: portfolio.id,
|
|
126
|
+
name: portfolio.name,
|
|
127
|
+
description: portfolio.description,
|
|
128
|
+
currency: portfolio.currency,
|
|
129
|
+
...(portfolio.fixedCurrency ? { fixedCurrency: true } : {}),
|
|
130
|
+
brokerId: portfolio.brokerId,
|
|
131
|
+
lastSyncedAt: portfolio.lastSyncedAt,
|
|
132
|
+
// Cash and targets are the user's own entries: a pulled portfolio without
|
|
133
|
+
// them would erase them on this device.
|
|
134
|
+
...(portfolio.cash ? { cash: { ...portfolio.cash } } : {}),
|
|
135
|
+
...(portfolio.targetWeights ? { targetWeights: { ...portfolio.targetWeights } } : {}),
|
|
136
|
+
...(portfolio.importedFrom ? {
|
|
137
|
+
importedFrom: {
|
|
138
|
+
...portfolio.importedFrom,
|
|
139
|
+
...(portfolio.importedFrom.weights ? { weights: { ...portfolio.importedFrom.weights } } : {}),
|
|
140
|
+
},
|
|
141
|
+
} : {}),
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function brokerAccountIdFromPortfolioId(portfolioId: string): string | undefined {
|
|
146
|
+
const [kind, instanceId, ...accountParts] = portfolioId.split(":");
|
|
147
|
+
if (kind !== "broker" || !instanceId) return undefined;
|
|
148
|
+
const accountId = accountParts.join(":").trim();
|
|
149
|
+
return accountId && accountId !== "default" ? accountId : undefined;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function brokerPortfolioKey(brokerId: string | undefined, accountId: string | undefined): string | undefined {
|
|
153
|
+
if (!brokerId || !accountId) return undefined;
|
|
154
|
+
return [brokerId, accountId].join("\u0000");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function portfolioSyncTimestamp(portfolio: Portfolio): number {
|
|
158
|
+
return typeof portfolio.lastSyncedAt === "number" && Number.isFinite(portfolio.lastSyncedAt)
|
|
159
|
+
? portfolio.lastSyncedAt
|
|
160
|
+
: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function latestBrokerSyncByType(portfolios: Portfolio[], linkedOnly: boolean): Map<string, number> {
|
|
164
|
+
const latest = new Map<string, number>();
|
|
165
|
+
for (const portfolio of portfolios) {
|
|
166
|
+
if (!portfolio.brokerId || (linkedOnly && !portfolio.brokerInstanceId)) continue;
|
|
167
|
+
const timestamp = portfolioSyncTimestamp(portfolio);
|
|
168
|
+
latest.set(portfolio.brokerId, Math.max(latest.get(portfolio.brokerId) ?? 0, timestamp));
|
|
169
|
+
}
|
|
170
|
+
return latest;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Broker identity is deliberately excluded from cloud payloads, but it is
|
|
175
|
+
* still local state that must survive applying a sanitized portfolio back to
|
|
176
|
+
* this device. Match by the stable portfolio ID first, then by the account
|
|
177
|
+
* suffix in that stable ID. A newer local broker snapshot also wins over old
|
|
178
|
+
* unlinked records left in a cloud snapshot from before a reset.
|
|
179
|
+
*/
|
|
180
|
+
function mergeLocalBrokerPortfolioIdentity(
|
|
181
|
+
localPortfolios: Portfolio[],
|
|
182
|
+
syncedPortfolios: Portfolio[],
|
|
183
|
+
): Portfolio[] {
|
|
184
|
+
const localById = new Map(localPortfolios.map((portfolio) => [portfolio.id, portfolio] as const));
|
|
185
|
+
const localByBrokerAccount = new Map<string, Portfolio[]>();
|
|
186
|
+
for (const portfolio of localPortfolios) {
|
|
187
|
+
if (!portfolio.brokerInstanceId) continue;
|
|
188
|
+
const key = brokerPortfolioKey(portfolio.brokerId, portfolio.brokerAccountId);
|
|
189
|
+
if (!key) continue;
|
|
190
|
+
const entries = localByBrokerAccount.get(key) ?? [];
|
|
191
|
+
entries.push(portfolio);
|
|
192
|
+
localByBrokerAccount.set(key, entries);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const exactIncomingIds = new Set(
|
|
196
|
+
syncedPortfolios
|
|
197
|
+
.map((portfolio) => portfolio.id)
|
|
198
|
+
.filter((portfolioId) => localById.has(portfolioId)),
|
|
199
|
+
);
|
|
200
|
+
const localLatestByBroker = latestBrokerSyncByType(localPortfolios, true);
|
|
201
|
+
const syncedLatestByBroker = latestBrokerSyncByType(syncedPortfolios, false);
|
|
202
|
+
const merged: Portfolio[] = [];
|
|
203
|
+
const seenIds = new Set<string>();
|
|
204
|
+
|
|
205
|
+
for (const portfolio of syncedPortfolios) {
|
|
206
|
+
const localByStableId = localById.get(portfolio.id);
|
|
207
|
+
const accountId = brokerAccountIdFromPortfolioId(portfolio.id);
|
|
208
|
+
const accountCandidates = localByBrokerAccount.get(brokerPortfolioKey(portfolio.brokerId, accountId) ?? "");
|
|
209
|
+
const local = localByStableId?.brokerInstanceId && localByStableId.brokerId === portfolio.brokerId
|
|
210
|
+
? localByStableId
|
|
211
|
+
: accountCandidates?.length === 1
|
|
212
|
+
? accountCandidates[0]
|
|
213
|
+
: undefined;
|
|
214
|
+
|
|
215
|
+
if (local) {
|
|
216
|
+
// Prefer an exact stable-ID entry when an older duplicate appears first
|
|
217
|
+
// in the remote array.
|
|
218
|
+
if (portfolio.id !== local.id && exactIncomingIds.has(local.id)) continue;
|
|
219
|
+
if (seenIds.has(local.id)) continue;
|
|
220
|
+
|
|
221
|
+
const localIsNewer = portfolioSyncTimestamp(local) > portfolioSyncTimestamp(portfolio);
|
|
222
|
+
merged.push(localIsNewer
|
|
223
|
+
? local
|
|
224
|
+
: {
|
|
225
|
+
...portfolio,
|
|
226
|
+
id: local.id,
|
|
227
|
+
brokerInstanceId: local.brokerInstanceId,
|
|
228
|
+
brokerAccountId: local.brokerAccountId,
|
|
229
|
+
});
|
|
230
|
+
seenIds.add(local.id);
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const localLatest = portfolio.brokerId ? localLatestByBroker.get(portfolio.brokerId) : undefined;
|
|
235
|
+
if (localLatest !== undefined && localLatest > portfolioSyncTimestamp(portfolio)) continue;
|
|
236
|
+
merged.push(portfolio);
|
|
237
|
+
seenIds.add(portfolio.id);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// If the newer local broker snapshot is absent from the cloud array
|
|
241
|
+
// altogether, keep it instead of treating the older array as authoritative.
|
|
242
|
+
for (const portfolio of localPortfolios) {
|
|
243
|
+
if (!portfolio.brokerInstanceId || seenIds.has(portfolio.id)) continue;
|
|
244
|
+
const localLatest = portfolio.brokerId ? localLatestByBroker.get(portfolio.brokerId) : undefined;
|
|
245
|
+
const syncedLatest = portfolio.brokerId ? syncedLatestByBroker.get(portfolio.brokerId) ?? 0 : 0;
|
|
246
|
+
if (localLatest !== undefined && localLatest > syncedLatest) {
|
|
247
|
+
merged.push(portfolio);
|
|
248
|
+
seenIds.add(portfolio.id);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
return merged;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function sanitizeWatchlist(watchlist: Watchlist): Watchlist {
|
|
256
|
+
return {
|
|
257
|
+
id: watchlist.id,
|
|
258
|
+
name: watchlist.name,
|
|
259
|
+
description: watchlist.description,
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
function sanitizeBrokerInstance(instance: BrokerInstanceConfig): Omit<BrokerInstanceConfig, "config"> {
|
|
264
|
+
return {
|
|
265
|
+
id: instance.id,
|
|
266
|
+
brokerType: instance.brokerType,
|
|
267
|
+
label: instance.label,
|
|
268
|
+
connectionMode: instance.connectionMode,
|
|
269
|
+
enabled: instance.enabled,
|
|
270
|
+
lastSyncedAt: instance.lastSyncedAt,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function sanitizePosition(position: TickerPosition): TickerPosition {
|
|
275
|
+
return {
|
|
276
|
+
portfolio: position.portfolio,
|
|
277
|
+
shares: position.shares,
|
|
278
|
+
avgCost: position.avgCost,
|
|
279
|
+
currency: position.currency,
|
|
280
|
+
dateAcquired: position.dateAcquired,
|
|
281
|
+
...(position.costFxRate != null && position.costFxCurrency ? { costFxRate: position.costFxRate, costFxCurrency: position.costFxCurrency } : {}),
|
|
282
|
+
broker: position.broker,
|
|
283
|
+
side: position.side,
|
|
284
|
+
marketValue: position.marketValue,
|
|
285
|
+
unrealizedPnl: position.unrealizedPnl,
|
|
286
|
+
multiplier: position.multiplier,
|
|
287
|
+
markPrice: position.markPrice,
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function brokerPositionKey(position: Pick<TickerPosition, "portfolio" | "broker" | "side">): string {
|
|
292
|
+
return [position.portfolio, position.broker, position.side ?? ""].join("\u0000");
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/** Keep broker position identity local while applying public cloud fields. */
|
|
296
|
+
function mergeLocalBrokerPositionIdentity(
|
|
297
|
+
localPositions: TickerPosition[],
|
|
298
|
+
syncedPositions: TickerPosition[],
|
|
299
|
+
): TickerPosition[] {
|
|
300
|
+
const localByKey = new Map<string, TickerPosition[]>();
|
|
301
|
+
for (const position of localPositions) {
|
|
302
|
+
if (!position.brokerInstanceId) continue;
|
|
303
|
+
const key = brokerPositionKey(position);
|
|
304
|
+
const entries = localByKey.get(key) ?? [];
|
|
305
|
+
entries.push(position);
|
|
306
|
+
localByKey.set(key, entries);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return syncedPositions.map((position) => {
|
|
310
|
+
const entries = localByKey.get(brokerPositionKey(position));
|
|
311
|
+
const local = entries?.shift();
|
|
312
|
+
if (!local) return position;
|
|
313
|
+
|
|
314
|
+
return {
|
|
315
|
+
...position,
|
|
316
|
+
brokerInstanceId: local.brokerInstanceId,
|
|
317
|
+
brokerAccountId: local.brokerAccountId,
|
|
318
|
+
brokerContractId: local.brokerContractId,
|
|
319
|
+
};
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function pricePointTime(point: { date: Date | string | number }): number {
|
|
324
|
+
const value = point.date;
|
|
325
|
+
if (value instanceof Date) return value.getTime();
|
|
326
|
+
return new Date(value).getTime();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/** The bars a week's move can start from, oldest first. */
|
|
330
|
+
const datedCloses = historyMemo((history) => history
|
|
331
|
+
.filter((point) => Number.isFinite(point.close) && point.close > 0 && Number.isFinite(pricePointTime(point)))
|
|
332
|
+
.sort((left, right) => pricePointTime(left) - pricePointTime(right)));
|
|
333
|
+
|
|
334
|
+
function weeklyQuoteMove(financials: TickerFinancials | null | undefined) {
|
|
335
|
+
const quote = financials?.quote;
|
|
336
|
+
if (!quote || !Number.isFinite(quote.price) || quote.price <= 0) return undefined;
|
|
337
|
+
const history = datedCloses(financials?.priceHistory);
|
|
338
|
+
if (history.length === 0) return undefined;
|
|
339
|
+
const latestTime = Number.isFinite(quote.lastUpdated)
|
|
340
|
+
? quote.lastUpdated
|
|
341
|
+
: pricePointTime(history[history.length - 1]!);
|
|
342
|
+
const cutoff = latestTime - 7 * 24 * 60 * 60 * 1000;
|
|
343
|
+
const reference = history.find((point) => pricePointTime(point) >= cutoff) ?? history[Math.max(0, history.length - 7)];
|
|
344
|
+
if (!reference || !Number.isFinite(reference.close) || reference.close <= 0) return undefined;
|
|
345
|
+
const weekChange = quote.price - reference.close;
|
|
346
|
+
return {
|
|
347
|
+
weekReferencePrice: reference.close,
|
|
348
|
+
weekChange,
|
|
349
|
+
weekChangePercent: (weekChange / reference.close) * 100,
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
function sanitizeQuote(financials: TickerFinancials | null | undefined) {
|
|
354
|
+
const quote = financials?.quote;
|
|
355
|
+
if (!quote) return undefined;
|
|
356
|
+
const week = weeklyQuoteMove(financials);
|
|
357
|
+
return {
|
|
358
|
+
price: Number.isFinite(quote.price) ? quote.price : undefined,
|
|
359
|
+
currency: quote.currency,
|
|
360
|
+
changePercent: Number.isFinite(quote.changePercent) ? quote.changePercent : undefined,
|
|
361
|
+
previousClose: Number.isFinite(quote.previousClose) ? quote.previousClose : undefined,
|
|
362
|
+
weekReferencePrice: week?.weekReferencePrice,
|
|
363
|
+
weekChange: week?.weekChange,
|
|
364
|
+
weekChangePercent: week?.weekChangePercent,
|
|
365
|
+
lastUpdated: quote.lastUpdated,
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
function sanitizeTickerMetadata(metadata: TickerMetadata, financials?: TickerFinancials | null): Omit<TickerMetadata, "broker_contracts"> & { quote?: ReturnType<typeof sanitizeQuote> } {
|
|
370
|
+
return {
|
|
371
|
+
ticker: metadata.ticker,
|
|
372
|
+
exchange: metadata.exchange,
|
|
373
|
+
currency: metadata.currency,
|
|
374
|
+
name: metadata.name,
|
|
375
|
+
sector: metadata.sector,
|
|
376
|
+
industry: metadata.industry,
|
|
377
|
+
assetCategory: metadata.assetCategory,
|
|
378
|
+
isin: metadata.isin,
|
|
379
|
+
cusip: metadata.cusip,
|
|
380
|
+
portfolios: [...metadata.portfolios],
|
|
381
|
+
watchlists: [...metadata.watchlists],
|
|
382
|
+
positions: metadata.positions.map(sanitizePosition),
|
|
383
|
+
custom: (sanitizeUnknown(metadata.custom) as Record<string, unknown>) ?? {},
|
|
384
|
+
tags: [...metadata.tags],
|
|
385
|
+
// What a listing's row took from a suffixed key's row, so a device that merges it later never counts a lot twice.
|
|
386
|
+
...metadata.mergedLots ? { mergedLots: metadata.mergedLots } : {},
|
|
387
|
+
quote: sanitizeQuote(financials),
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function collectLayoutPayload(config: Pick<AppConfig, typeof LAYOUT_SYNC_KEYS[number]>) {
|
|
392
|
+
return sanitizeUnknown({
|
|
393
|
+
layout: config.layout,
|
|
394
|
+
layouts: config.layouts.map(withoutSessionLayoutState),
|
|
395
|
+
activeLayoutIndex: config.activeLayoutIndex,
|
|
396
|
+
}) as Record<string, unknown>;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
function collectCoreConfigPayload(config: AppConfig) {
|
|
400
|
+
return sanitizeUnknown({
|
|
401
|
+
configVersion: config.configVersion,
|
|
402
|
+
baseCurrency: config.baseCurrency,
|
|
403
|
+
refreshIntervalMinutes: config.refreshIntervalMinutes,
|
|
404
|
+
portfolios: config.portfolios.map(sanitizePortfolio),
|
|
405
|
+
watchlists: config.watchlists.map(sanitizeWatchlist),
|
|
406
|
+
...collectLayoutPayload(config),
|
|
407
|
+
brokerInstances: config.brokerInstances.map(sanitizeBrokerInstance),
|
|
408
|
+
// This build merges profiles one by one before it pushes, so a profile
|
|
409
|
+
// missing from its list was removed, not one it never pulled.
|
|
410
|
+
brokerInstancesMergedById: true,
|
|
411
|
+
disabledPlugins: addLegacyBuiltinDisabledPluginAliases(encodeBuiltinDisabledPluginIds(config.disabledPlugins)),
|
|
412
|
+
disabledSources: config.disabledSources,
|
|
413
|
+
pluginConfig: addLegacyBuiltinPluginOwnerAliases(config.pluginConfig),
|
|
414
|
+
theme: config.theme,
|
|
415
|
+
chartPreferences: config.chartPreferences,
|
|
416
|
+
valueFlashingEnabled: config.valueFlashingEnabled,
|
|
417
|
+
recentTickers: config.recentTickers,
|
|
418
|
+
recentCommands: config.recentCommands,
|
|
419
|
+
// Completion is monotonic in synced state. A device only advertises the
|
|
420
|
+
// completed state, while resumable progress and incomplete state stay local.
|
|
421
|
+
onboardingComplete: config.onboardingComplete === true ? true : undefined,
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function positionValueBase(
|
|
426
|
+
ticker: TickerRecord,
|
|
427
|
+
position: TickerPosition,
|
|
428
|
+
financials: TickerFinancials | null | undefined,
|
|
429
|
+
baseCurrency: string,
|
|
430
|
+
exchangeRates: Map<string, number>,
|
|
431
|
+
): number | null {
|
|
432
|
+
const quoteCurrency = financials?.quote?.currency || position.currency || baseCurrency;
|
|
433
|
+
const positionCurrency = position.currency || quoteCurrency;
|
|
434
|
+
if (typeof position.marketValue === "number" && Number.isFinite(position.marketValue)) {
|
|
435
|
+
return convertCurrency(Math.abs(position.marketValue), positionCurrency, baseCurrency, exchangeRates);
|
|
436
|
+
}
|
|
437
|
+
const hasMarkPrice = typeof position.markPrice === "number" && Number.isFinite(position.markPrice);
|
|
438
|
+
const hasQuotePrice = typeof financials?.quote?.price === "number" && Number.isFinite(financials.quote.price);
|
|
439
|
+
const price = hasMarkPrice ? position.markPrice : hasQuotePrice ? financials!.quote!.price : position.avgCost;
|
|
440
|
+
// The multiplier the portfolio values the lot by: a future of unknown size has no value, never one at 1x.
|
|
441
|
+
const multiplier = positionContractMultiplier(ticker, position);
|
|
442
|
+
if (!Number.isFinite(position.shares) || typeof price !== "number" || !Number.isFinite(price) || multiplier === null) return null;
|
|
443
|
+
return convertCurrency(
|
|
444
|
+
Math.abs(position.shares * price * multiplier),
|
|
445
|
+
hasQuotePrice && !hasMarkPrice ? quoteCurrency : positionCurrency,
|
|
446
|
+
baseCurrency,
|
|
447
|
+
exchangeRates,
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
function pricePointTimeOrNull(point: PricePoint): number | null {
|
|
452
|
+
const value = point.date;
|
|
453
|
+
if (value == null) return null;
|
|
454
|
+
const time = value instanceof Date ? value.getTime() : new Date(value).getTime();
|
|
455
|
+
return Number.isFinite(time) ? time : null;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
function recentPriceHistory(history: PricePoint[], days: number): PricePoint[] {
|
|
459
|
+
let latestTime = 0;
|
|
460
|
+
for (const point of history) {
|
|
461
|
+
const time = pricePointTimeOrNull(point);
|
|
462
|
+
if (time != null && time > latestTime) latestTime = time;
|
|
463
|
+
}
|
|
464
|
+
if (latestTime <= 0) return [];
|
|
465
|
+
const cutoff = latestTime - days * 24 * 60 * 60 * 1000;
|
|
466
|
+
return history.filter((point) => {
|
|
467
|
+
const time = pricePointTimeOrNull(point);
|
|
468
|
+
return time != null && time >= cutoff;
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Work derived from a bar history, kept with the history. Every sync values
|
|
474
|
+
* every portfolio and quotes every filed ticker (each 15 s poll, and after
|
|
475
|
+
* each workspace change), and redoing that work from each holding's bars
|
|
476
|
+
* blocked the view for a quarter of a second on a few hundred holdings.
|
|
477
|
+
* Bars change when a history loads again, which replaces the
|
|
478
|
+
* array; a last bar extended or revised in place, or one appended, is caught
|
|
479
|
+
* by its length, time and close.
|
|
480
|
+
*/
|
|
481
|
+
function historyMemo<T>(derive: (history: PricePoint[]) => T): (history: PricePoint[] | undefined) => T {
|
|
482
|
+
const kept = new WeakMap<PricePoint[], { length: number; lastTime: number | null; lastClose: number | undefined; value: T }>();
|
|
483
|
+
const empty = derive([]);
|
|
484
|
+
return (history) => {
|
|
485
|
+
if (!history || history.length === 0) return empty;
|
|
486
|
+
const last = history[history.length - 1]!;
|
|
487
|
+
const lastTime = pricePointTimeOrNull(last);
|
|
488
|
+
const cached = kept.get(history);
|
|
489
|
+
if (cached && cached.length === history.length && cached.lastTime === lastTime && cached.lastClose === last.close) return cached.value;
|
|
490
|
+
const value = derive(history);
|
|
491
|
+
kept.set(history, { length: history.length, lastTime, lastClose: last.close, value });
|
|
492
|
+
return value;
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/** A holding's daily returns over its last year of bars. */
|
|
497
|
+
const lastYearReturns = historyMemo((history): ReturnHistoryResult => resolveDatedReturns(recentPriceHistory(history, 366)));
|
|
498
|
+
|
|
499
|
+
/** The holdings' beta to SPY at today's weights, worked out only when no preview supplies one. */
|
|
500
|
+
function holdingsBeta(series: WeightedReturnSeries[], spyReturns: DatedReturn[]): number | null {
|
|
501
|
+
if (series.length === 0 || spyReturns.length === 0) return null;
|
|
502
|
+
const returns = computeWeightedPortfolioReturns(series);
|
|
503
|
+
return returns.length > 0 ? computeDatedBeta(returns, spyReturns) : null;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
function collectAnalyticsByPortfolio(
|
|
507
|
+
config: AppConfig,
|
|
508
|
+
tickers: Map<string, TickerRecord>,
|
|
509
|
+
financials: Map<string, TickerFinancials>,
|
|
510
|
+
exchangeRates: Map<string, number>,
|
|
511
|
+
brokerAccounts: Record<string, BrokerAccount[]>,
|
|
512
|
+
) {
|
|
513
|
+
const output: Record<string, Record<string, unknown>> = {};
|
|
514
|
+
const spySample = lastYearReturns(financials.get("SPY")?.priceHistory);
|
|
515
|
+
const spyReturns = spySample.returns;
|
|
516
|
+
for (const portfolio of config.portfolios) {
|
|
517
|
+
const account = portfolio.brokerInstanceId && portfolio.brokerAccountId
|
|
518
|
+
? brokerAccounts[portfolio.brokerInstanceId]?.find((entry) => entry.accountId === portfolio.brokerAccountId)
|
|
519
|
+
: undefined;
|
|
520
|
+
let unsupported = !!syntheticAccountUnsupportedReason(account);
|
|
521
|
+
let invalidHistory = false;
|
|
522
|
+
const datedReturnSeries: WeightedReturnSeries[] = [];
|
|
523
|
+
for (const ticker of tickers.values()) {
|
|
524
|
+
const tickerFinancials = financials.get(ticker.metadata.ticker);
|
|
525
|
+
const portfolioPositions = ticker.metadata.positions.filter((position) => position.portfolio === portfolio.id);
|
|
526
|
+
if (portfolioPositions.length === 0) continue;
|
|
527
|
+
unsupported ||= !!syntheticPositionUnsupportedReason(
|
|
528
|
+
ticker, tickerFinancials?.quote?.currency || ticker.metadata.currency || config.baseCurrency, portfolio.id,
|
|
529
|
+
);
|
|
530
|
+
for (const position of portfolioPositions) {
|
|
531
|
+
if (position.shares === 0) continue;
|
|
532
|
+
const value = positionValueBase(ticker, position, tickerFinancials, config.baseCurrency, exchangeRates);
|
|
533
|
+
if (value == null || !Number.isFinite(value)) {
|
|
534
|
+
unsupported = true;
|
|
535
|
+
continue;
|
|
536
|
+
}
|
|
537
|
+
const sample = lastYearReturns(tickerFinancials?.priceHistory);
|
|
538
|
+
invalidHistory ||= sample.integrity != null;
|
|
539
|
+
const returns = sample.returns;
|
|
540
|
+
if (returns.length >= 10) datedReturnSeries.push({ weight: value, returns });
|
|
541
|
+
else unsupported = true;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
const previewAnalytics = getSyncedProfileAnalytics(portfolio.id);
|
|
545
|
+
// The broker's own returns do not depend on the holdings' price histories.
|
|
546
|
+
const accountBasis = previewAnalytics?.basis === "account";
|
|
547
|
+
// A weighted history of today's holdings is not the investor's actual
|
|
548
|
+
// one-year account return. Only preserve an explicitly supplied preview.
|
|
549
|
+
const oneYearReturn = invalidHistory && !accountBasis ? null : previewAnalytics?.oneYearReturn ?? null;
|
|
550
|
+
const spyBeta = (invalidHistory && !accountBasis) || spySample.integrity ? null : previewAnalytics?.spyBeta
|
|
551
|
+
?? holdingsBeta(unsupported ? [] : datedReturnSeries, spyReturns);
|
|
552
|
+
output[portfolio.id] = {
|
|
553
|
+
oneYearReturn,
|
|
554
|
+
spyBeta,
|
|
555
|
+
basis: oneYearReturn == null && spyBeta == null ? null : previewAnalytics?.basis ?? "holdings",
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
return output;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
function collectAccountsByPortfolio(
|
|
562
|
+
config: AppConfig,
|
|
563
|
+
brokerAccounts: Record<string, BrokerAccount[]>,
|
|
564
|
+
) {
|
|
565
|
+
const output: Record<string, Record<string, string | number>> = {};
|
|
566
|
+
for (const portfolio of config.portfolios) {
|
|
567
|
+
if (!portfolio.brokerInstanceId || !portfolio.brokerAccountId) continue;
|
|
568
|
+
const account = brokerAccounts[portfolio.brokerInstanceId]?.find(
|
|
569
|
+
(entry) => entry.accountId === portfolio.brokerAccountId,
|
|
570
|
+
);
|
|
571
|
+
if (!account || !Number.isFinite(account.netLiquidation)) continue;
|
|
572
|
+
output[portfolio.id] = {
|
|
573
|
+
currency: account.currency ?? portfolio.currency ?? config.baseCurrency,
|
|
574
|
+
netLiquidation: account.netLiquidation!,
|
|
575
|
+
...(Number.isFinite(account.dailyPnl) ? { dailyPnl: account.dailyPnl! } : {}),
|
|
576
|
+
...(Number.isFinite(account.unrealizedPnl) ? { unrealizedPnl: account.unrealizedPnl! } : {}),
|
|
577
|
+
...(Number.isFinite(account.updatedAt) ? { updatedAt: account.updatedAt! } : {}),
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
return output;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
type SanitizedTickerMetadata = ReturnType<typeof sanitizeTickerMetadata>;
|
|
584
|
+
|
|
585
|
+
/** Only tickers the user actually filed somewhere are worth syncing. */
|
|
586
|
+
function isSyncableTicker(metadata: Pick<SanitizedTickerMetadata, "portfolios" | "watchlists" | "positions">): boolean {
|
|
587
|
+
return metadata.portfolios.length > 0
|
|
588
|
+
|| metadata.watchlists.length > 0
|
|
589
|
+
|| metadata.positions.length > 0;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* USD-per-unit rates for the base currency and every currency a holding is
|
|
594
|
+
* valued in, read from the same FX store the portfolio panes use. A currency
|
|
595
|
+
* without a usable rate stays missing, so its holdings count as unsupported.
|
|
596
|
+
*/
|
|
597
|
+
async function loadHoldingExchangeRates(
|
|
598
|
+
config: AppConfig,
|
|
599
|
+
tickers: Map<string, TickerRecord>,
|
|
600
|
+
financials: Map<string, TickerFinancials>,
|
|
601
|
+
): Promise<Map<string, number>> {
|
|
602
|
+
const rates = new Map([["USD", 1]]);
|
|
603
|
+
const coordinator = getSharedMarketDataCoordinator();
|
|
604
|
+
if (!coordinator) return rates;
|
|
605
|
+
const held: Array<string | undefined> = [config.baseCurrency];
|
|
606
|
+
for (const ticker of tickers.values()) {
|
|
607
|
+
if (ticker.metadata.positions.length === 0) continue;
|
|
608
|
+
held.push(financials.get(ticker.metadata.ticker)?.quote?.currency);
|
|
609
|
+
for (const position of ticker.metadata.positions) held.push(position.currency);
|
|
610
|
+
}
|
|
611
|
+
// With a minor unit's major currency, as the panes load them (GBX and ILA have no rate of their own).
|
|
612
|
+
const currencies = fxRateCurrencies(held).filter((currency) => currency !== "USD");
|
|
613
|
+
await Promise.all(currencies.map(async (currency) => {
|
|
614
|
+
// A failed FX load must not hold back the rest of the push.
|
|
615
|
+
await coordinator.loadFxRate(currency).catch(() => {});
|
|
616
|
+
const rate = resolveEntryValue(coordinator.getFxEntry(currency));
|
|
617
|
+
if (rate != null) rates.set(currency, rate);
|
|
618
|
+
}));
|
|
619
|
+
return rates;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
function collectCoreCollectionsPayload(
|
|
623
|
+
config: AppConfig,
|
|
624
|
+
tickers: Map<string, TickerRecord>,
|
|
625
|
+
financials: Map<string, TickerFinancials>,
|
|
626
|
+
exchangeRates: Map<string, number>,
|
|
627
|
+
brokerAccounts: Record<string, BrokerAccount[]>,
|
|
628
|
+
/** The financials whose quotes may be uploaded: without those a source that keeps its market data local supplied. */
|
|
629
|
+
quoted: Map<string, TickerFinancials> = financials,
|
|
630
|
+
) {
|
|
631
|
+
const records = [...tickers.values()]
|
|
632
|
+
.map((ticker) => sanitizeTickerMetadata(ticker.metadata, quoted.get(ticker.metadata.ticker)))
|
|
633
|
+
.filter(isSyncableTicker);
|
|
634
|
+
|
|
635
|
+
// Only the USD anchor goes on the wire, as before: readers of the snapshot
|
|
636
|
+
// use any rate found here instead of fetching a current one, and a rate
|
|
637
|
+
// loaded for this push would age with it.
|
|
638
|
+
return {
|
|
639
|
+
baseCurrency: config.baseCurrency,
|
|
640
|
+
exchangeRates: { USD: 1 },
|
|
641
|
+
portfolios: config.portfolios.map(sanitizePortfolio),
|
|
642
|
+
watchlists: config.watchlists.map(sanitizeWatchlist),
|
|
643
|
+
analyticsByPortfolio: collectAnalyticsByPortfolio(config, tickers, financials, exchangeRates, brokerAccounts),
|
|
644
|
+
accountsByPortfolio: collectAccountsByPortfolio(config, brokerAccounts),
|
|
645
|
+
tickers: records,
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
function hydrateProfileAnalytics(payload: Record<string, unknown>): void {
|
|
650
|
+
if (!isRecord(payload.analyticsByPortfolio)) return;
|
|
651
|
+
for (const [portfolioId, analytics] of Object.entries(payload.analyticsByPortfolio)) {
|
|
652
|
+
if (!isRecord(analytics)) continue;
|
|
653
|
+
setSyncedProfileAnalytics(portfolioId, {
|
|
654
|
+
oneYearReturn: typeof analytics.oneYearReturn === "number" ? analytics.oneYearReturn : null,
|
|
655
|
+
spyBeta: typeof analytics.spyBeta === "number" ? analytics.spyBeta : null,
|
|
656
|
+
basis: analytics.basis === "account" || analytics.basis === "holdings" ? analytics.basis : null,
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
function valuesEqual(left: unknown, right: unknown): boolean {
|
|
662
|
+
return stableStringify(left) === stableStringify(right);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
function isPluginStateMap(value: unknown): value is Record<string, Record<string, unknown>> {
|
|
666
|
+
return isRecord(value) && Object.values(value).every(isRecord);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
function withoutSessionLayoutState(savedLayout: SavedLayout): SavedLayout {
|
|
670
|
+
if (!isRecord(savedLayout)) return savedLayout;
|
|
671
|
+
if (!SESSION_SAVED_LAYOUT_KEYS.some((key) => key in savedLayout)) return savedLayout;
|
|
672
|
+
const { paneState: _paneState, focusedPaneId: _focusedPaneId, activePanel: _activePanel, ...rest } = savedLayout;
|
|
673
|
+
return rest;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* A pulled layout list describes the workspace; the session state stays with
|
|
678
|
+
* this device. Entries are matched by name first so a renamed or reordered
|
|
679
|
+
* list still hands each layout back its own pane state.
|
|
680
|
+
*/
|
|
681
|
+
function withLocalSessionLayoutState(
|
|
682
|
+
pulled: SavedLayout[],
|
|
683
|
+
local: SavedLayout[],
|
|
684
|
+
): SavedLayout[] {
|
|
685
|
+
const localByName = new Map(local.map((savedLayout) => [savedLayout?.name, savedLayout]));
|
|
686
|
+
return pulled.map((savedLayout, index) => {
|
|
687
|
+
if (!isRecord(savedLayout)) return savedLayout;
|
|
688
|
+
const stripped = withoutSessionLayoutState(savedLayout);
|
|
689
|
+
const source = localByName.get(savedLayout.name) ?? local[index];
|
|
690
|
+
if (!source) return stripped;
|
|
691
|
+
return {
|
|
692
|
+
...stripped,
|
|
693
|
+
paneState: source.paneState,
|
|
694
|
+
focusedPaneId: source.focusedPaneId,
|
|
695
|
+
};
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* A layout as the user arranged it. Stacking order follows whichever floating
|
|
701
|
+
* pane was focused last, and a pane in its own desktop window is one a
|
|
702
|
+
* terminal draws inline as a floating pane, so neither tells two copies apart.
|
|
703
|
+
*/
|
|
704
|
+
function arrangedLayout(layout: unknown): unknown {
|
|
705
|
+
if (!isRecord(layout)) return layout;
|
|
706
|
+
const windows = [
|
|
707
|
+
...(Array.isArray(layout.floating) ? layout.floating : []),
|
|
708
|
+
...(Array.isArray(layout.detached) ? layout.detached : []),
|
|
709
|
+
].map((entry) => {
|
|
710
|
+
if (!isRecord(entry)) return entry;
|
|
711
|
+
const { zIndex: _zIndex, ...rest } = entry;
|
|
712
|
+
return rest;
|
|
713
|
+
});
|
|
714
|
+
const instanceId = (entry: unknown) => (isRecord(entry) ? String(entry.instanceId) : "");
|
|
715
|
+
windows.sort((left, right) => instanceId(left).localeCompare(instanceId(right)));
|
|
716
|
+
return { ...layout, floating: windows, detached: [] };
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
// Pulled and last synced payloads are compared on every sync and never change.
|
|
720
|
+
const layoutIntents = new WeakMap<object, string | null>();
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* A key for the workspace a payload describes, equal for two copies that only
|
|
724
|
+
* differ in what reflects one device, so a real edit can be told from them.
|
|
725
|
+
* Null when the payload holds no complete workspace.
|
|
726
|
+
*/
|
|
727
|
+
function layoutIntent(payload: unknown): string | null {
|
|
728
|
+
if (!isRecord(payload) || !Array.isArray(payload.layouts)) return null;
|
|
729
|
+
if (!LAYOUT_SYNC_KEYS.every((key) => key in payload)) return null;
|
|
730
|
+
const cached = layoutIntents.get(payload);
|
|
731
|
+
if (cached !== undefined) return cached;
|
|
732
|
+
const intent = stableStringify(sanitizeUnknown({
|
|
733
|
+
layout: arrangedLayout(payload.layout),
|
|
734
|
+
layouts: payload.layouts.map((entry) => (
|
|
735
|
+
isRecord(entry)
|
|
736
|
+
? { ...withoutSessionLayoutState(entry as unknown as SavedLayout), layout: arrangedLayout(entry.layout) }
|
|
737
|
+
: entry
|
|
738
|
+
)),
|
|
739
|
+
activeLayoutIndex: payload.activeLayoutIndex,
|
|
740
|
+
}));
|
|
741
|
+
const key = `${fnv1aHex(intent)}:${intent.length}`;
|
|
742
|
+
layoutIntents.set(payload, key);
|
|
743
|
+
return key;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
/** The workspace keys of a payload, with the time its layout was last edited when it says. */
|
|
747
|
+
function pickLayoutPayload(payload: Record<string, unknown>): Record<string, unknown> {
|
|
748
|
+
const picked = Object.fromEntries([...LAYOUT_SYNC_KEYS, "layoutEditedAt"].flatMap((key) => (
|
|
749
|
+
key in payload ? [[key, payload[key]]] : []
|
|
750
|
+
)));
|
|
751
|
+
// An older build still sent the view it was looking at with each layout.
|
|
752
|
+
if (Array.isArray(picked.layouts)) {
|
|
753
|
+
picked.layouts = picked.layouts.map((entry) => (isRecord(entry) ? withoutSessionLayoutState(entry as unknown as SavedLayout) : entry));
|
|
754
|
+
}
|
|
755
|
+
return picked;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/**
|
|
759
|
+
* What this device remembers about its workspace between syncs: when it last
|
|
760
|
+
* edited it (null when that happened while the app was closed, so the time is
|
|
761
|
+
* unknown), or, when it took the workspace from the cloud, that copy as synced.
|
|
762
|
+
*/
|
|
763
|
+
interface LayoutMemo {
|
|
764
|
+
intent: string;
|
|
765
|
+
editedAt: number | null;
|
|
766
|
+
synced?: Record<string, unknown>;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
function readLayoutMemo(value: unknown): LayoutMemo | null {
|
|
770
|
+
if (!isRecord(value) || typeof value.intent !== "string") return null;
|
|
771
|
+
return {
|
|
772
|
+
intent: value.intent,
|
|
773
|
+
editedAt: typeof value.editedAt === "number" && Number.isFinite(value.editedAt) ? value.editedAt : null,
|
|
774
|
+
...(isRecord(value.synced) ? { synced: value.synced } : {}),
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* When a pulled workspace was last edited. A copy from a build that did not
|
|
780
|
+
* date edits counts as edited when it was pushed, which is never earlier.
|
|
781
|
+
*/
|
|
782
|
+
function pulledLayoutEditedAt(payload: Record<string, unknown>, pushedAt: string | undefined): number {
|
|
783
|
+
if (typeof payload.layoutEditedAt === "number" && Number.isFinite(payload.layoutEditedAt)) return payload.layoutEditedAt;
|
|
784
|
+
const pushed = pushedAt ? Date.parse(pushedAt) : Number.NaN;
|
|
785
|
+
return Number.isFinite(pushed) ? pushed : Number.POSITIVE_INFINITY;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Whether a pulled workspace replaces this device's, three ways: against the
|
|
790
|
+
* copy this device last synced, the one it had when the pull started, and the
|
|
791
|
+
* pulled one. Only a real edit here keeps the local copy; the pane state,
|
|
792
|
+
* focus and window stacking that change on every launch never do.
|
|
793
|
+
*/
|
|
794
|
+
function shouldAdoptPulledLayout({
|
|
795
|
+
local,
|
|
796
|
+
atPullStart,
|
|
797
|
+
lastSynced,
|
|
798
|
+
pulled,
|
|
799
|
+
memo,
|
|
800
|
+
pulledEditedAt,
|
|
801
|
+
}: {
|
|
802
|
+
local: string | null;
|
|
803
|
+
atPullStart: string | null;
|
|
804
|
+
lastSynced: string | null;
|
|
805
|
+
pulled: string | null;
|
|
806
|
+
memo: LayoutMemo | null;
|
|
807
|
+
pulledEditedAt: number;
|
|
808
|
+
}): boolean {
|
|
809
|
+
if (pulled === null || pulled === local) return false;
|
|
810
|
+
// Edited while the pull was in flight: newer than anything it carries.
|
|
811
|
+
if (local !== atPullStart) return false;
|
|
812
|
+
const takenFromCloud = !!memo?.synced && memo.intent === local;
|
|
813
|
+
const editedHere = lastSynced !== null && local !== lastSynced && !takenFromCloud;
|
|
814
|
+
if (!editedHere) return true;
|
|
815
|
+
// The cloud still holds what this device last synced: only this side changed.
|
|
816
|
+
if (pulled === lastSynced) return false;
|
|
817
|
+
// Both sides changed since: the later edit wins, and an undated local one loses.
|
|
818
|
+
const localEditedAt = memo?.intent === local ? memo.editedAt : null;
|
|
819
|
+
return localEditedAt === null || localEditedAt <= pulledEditedAt;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* The workspace as the cloud already has it unless this device really edited
|
|
824
|
+
* it, so what only reflects this device never replaces another device's copy,
|
|
825
|
+
* and a real edit goes out dated.
|
|
826
|
+
*/
|
|
827
|
+
function withLayoutProvenance(
|
|
828
|
+
payload: Record<string, unknown>,
|
|
829
|
+
lastSyncedPayload: unknown,
|
|
830
|
+
memoValue: unknown,
|
|
831
|
+
): Record<string, unknown> {
|
|
832
|
+
const local = layoutIntent(payload);
|
|
833
|
+
if (local === null) return payload;
|
|
834
|
+
const memo = readLayoutMemo(memoValue);
|
|
835
|
+
if (memo?.synced && memo.intent === local) return { ...payload, ...memo.synced };
|
|
836
|
+
if (isRecord(lastSyncedPayload) && layoutIntent(lastSyncedPayload) === local) {
|
|
837
|
+
return { ...payload, ...pickLayoutPayload(lastSyncedPayload) };
|
|
838
|
+
}
|
|
839
|
+
return {
|
|
840
|
+
...payload,
|
|
841
|
+
layoutEditedAt: memo?.intent === local && memo.editedAt !== null ? memo.editedAt : Date.now(),
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* Dates a workspace edit when it happens, online or not, so a later conflict
|
|
847
|
+
* with another device's edit goes to the newer one.
|
|
848
|
+
*/
|
|
849
|
+
function noteLayoutEdit(config: AppConfig, lastSyncedPayload: unknown, memoValue: unknown, launch: boolean): LayoutMemo | null {
|
|
850
|
+
const lastSynced = layoutIntent(lastSyncedPayload);
|
|
851
|
+
if (lastSynced === null) return null;
|
|
852
|
+
const local = layoutIntent(collectLayoutPayload(config));
|
|
853
|
+
if (local === null || local === lastSynced) return null;
|
|
854
|
+
if (readLayoutMemo(memoValue)?.intent === local) return null;
|
|
855
|
+
// Seen at launch, it was made while the app was closed or just before it
|
|
856
|
+
// quit; when is unknown, so it gives way to a dated edit elsewhere.
|
|
857
|
+
return { intent: local, editedAt: launch ? null : Date.now() };
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* Once this device holds the cloud's workspace, by taking it or because the
|
|
862
|
+
* two already matched, it remembers that copy as synced, keyed by how it
|
|
863
|
+
* looks here once applied. The next push then sends the cloud's own copy back
|
|
864
|
+
* rather than this device's rendering of it.
|
|
865
|
+
*/
|
|
866
|
+
function rememberCloudLayout(
|
|
867
|
+
payload: Record<string, unknown>,
|
|
868
|
+
pushedAt: string | undefined,
|
|
869
|
+
applied: AppConfig,
|
|
870
|
+
memo: { get(): unknown; set(value: unknown): void },
|
|
871
|
+
adopted: boolean,
|
|
872
|
+
): void {
|
|
873
|
+
const local = layoutIntent(collectLayoutPayload(applied));
|
|
874
|
+
if (local === null || (!adopted && local !== layoutIntent(payload))) return;
|
|
875
|
+
const current = readLayoutMemo(memo.get());
|
|
876
|
+
if (!adopted && current?.synced && current.intent === local) return;
|
|
877
|
+
const editedAt = pulledLayoutEditedAt(payload, pushedAt);
|
|
878
|
+
memo.set({
|
|
879
|
+
intent: local,
|
|
880
|
+
editedAt: Number.isFinite(editedAt) ? editedAt : null,
|
|
881
|
+
synced: pickLayoutPayload(payload),
|
|
882
|
+
} satisfies LayoutMemo);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
interface LayoutMergeContext {
|
|
886
|
+
memo?: unknown;
|
|
887
|
+
/** When the pulled copy was pushed, for one from a build that did not date layout edits. */
|
|
888
|
+
pushedAt?: string;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/** A pulled config without profiles and portfolios that are local-only here (an older build may have pushed them). */
|
|
892
|
+
function publicConfigPayload(payload: Record<string, unknown>, scope: LocalOnlyScope): Record<string, unknown> {
|
|
893
|
+
const without = (entries: unknown, isLocal: (entry: Record<string, unknown>) => boolean) => (
|
|
894
|
+
Array.isArray(entries) ? entries.filter((entry) => !isRecord(entry) || !isLocal(entry)) : entries
|
|
895
|
+
);
|
|
896
|
+
return {
|
|
897
|
+
...payload,
|
|
898
|
+
...("brokerInstances" in payload ? { brokerInstances: without(payload.brokerInstances, (entry) => isLocalOnlyInstance({ id: String(entry.id) }, scope)) } : {}),
|
|
899
|
+
...("portfolios" in payload ? { portfolios: without(payload.portfolios, (entry) => isLocalOnlyPortfolio(entry as unknown as Portfolio, scope)) } : {}),
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
function mergeConfigPayload(
|
|
904
|
+
config: AppConfig,
|
|
905
|
+
payload: unknown,
|
|
906
|
+
baselineConfig: AppConfig = config,
|
|
907
|
+
lastSyncedPayload?: unknown,
|
|
908
|
+
layoutContext: LayoutMergeContext = {},
|
|
909
|
+
scope: LocalOnlyScope | null = null,
|
|
910
|
+
): AppConfig | null {
|
|
911
|
+
if (!isRecord(payload)) return null;
|
|
912
|
+
if (scope) {
|
|
913
|
+
// Merged as if the local-only profiles and portfolios were not here, then put back as they were.
|
|
914
|
+
const local = publicConfig(config, scope);
|
|
915
|
+
const merged = mergeConfigPayload(local, publicConfigPayload(payload, scope), baselineConfig === config ? local : publicConfig(baselineConfig, scope),
|
|
916
|
+
lastSyncedPayload, layoutContext);
|
|
917
|
+
return merged && {
|
|
918
|
+
...merged,
|
|
919
|
+
brokerInstances: withLocalOnlyEntries(merged.brokerInstances, config.brokerInstances, (instance) => isLocalOnlyInstance(instance, scope)),
|
|
920
|
+
portfolios: withLocalOnlyEntries(merged.portfolios, config.portfolios, (portfolio) => isLocalOnlyPortfolio(portfolio, scope)),
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
const next: AppConfig = { ...config };
|
|
924
|
+
// Two guards, both needed. baselineConfig catches edits made while this pull
|
|
925
|
+
// was in flight; lastSyncedPayload catches edits made while the app was not
|
|
926
|
+
// running at all (CLI writes, offline edits), which otherwise look pristine.
|
|
927
|
+
const lastSynced = isRecord(lastSyncedPayload) ? lastSyncedPayload : null;
|
|
928
|
+
const localPayload = collectCoreConfigPayload(config) as Record<string, unknown>;
|
|
929
|
+
const matchesLastSynced = (key: string) => (
|
|
930
|
+
!lastSynced || valuesEqual(localPayload[key], lastSynced[key])
|
|
931
|
+
);
|
|
932
|
+
const canApply = <K extends keyof AppConfig>(key: K) => (
|
|
933
|
+
valuesEqual(config[key], baselineConfig[key]) && matchesLastSynced(key as string)
|
|
934
|
+
);
|
|
935
|
+
const assign = <K extends keyof AppConfig>(key: K) => {
|
|
936
|
+
if (key in payload && canApply(key)) {
|
|
937
|
+
next[key] = payload[key as string] as AppConfig[K];
|
|
938
|
+
}
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
assign("baseCurrency");
|
|
942
|
+
// A device on an older version may still send a name or sign (Canadian dollar, CA$): it applies as its code, as a saved one loads.
|
|
943
|
+
if (typeof next.baseCurrency === "string" && next.baseCurrency.trim()) next.baseCurrency = normalizeStoredBaseCurrency(next.baseCurrency);
|
|
944
|
+
assign("refreshIntervalMinutes");
|
|
945
|
+
if ("portfolios" in payload && canApply("portfolios")) {
|
|
946
|
+
const syncedPortfolios = payload.portfolios;
|
|
947
|
+
next.portfolios = Array.isArray(syncedPortfolios)
|
|
948
|
+
? mergeLocalBrokerPortfolioIdentity(config.portfolios, syncedPortfolios as Portfolio[])
|
|
949
|
+
: syncedPortfolios as AppConfig["portfolios"];
|
|
950
|
+
}
|
|
951
|
+
assign("watchlists");
|
|
952
|
+
assign("disabledSources");
|
|
953
|
+
assign("theme");
|
|
954
|
+
assign("chartPreferences");
|
|
955
|
+
assign("valueFlashingEnabled");
|
|
956
|
+
assign("recentTickers");
|
|
957
|
+
assign("recentCommands");
|
|
958
|
+
// Sync can complete onboarding on another device, but never reopen it.
|
|
959
|
+
// Resumable progress remains local until this installation completes it.
|
|
960
|
+
if (
|
|
961
|
+
!config.onboardingProgress
|
|
962
|
+
&& config.onboardingComplete !== true
|
|
963
|
+
&& payload.onboardingComplete === true
|
|
964
|
+
&& canApply("onboardingComplete")
|
|
965
|
+
) {
|
|
966
|
+
next.onboardingComplete = true;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
if (
|
|
970
|
+
canApply("disabledPlugins")
|
|
971
|
+
&& Array.isArray(payload.disabledPlugins)
|
|
972
|
+
&& payload.disabledPlugins.every((pluginId) => typeof pluginId === "string")
|
|
973
|
+
) {
|
|
974
|
+
next.disabledPlugins = decodeBuiltinDisabledPluginIds(payload.disabledPlugins);
|
|
975
|
+
}
|
|
976
|
+
if (canApply("pluginConfig") && isPluginStateMap(payload.pluginConfig)) {
|
|
977
|
+
next.pluginConfig = withLocalPluginSecrets(
|
|
978
|
+
normalizeBuiltinPluginStateMap(payload.pluginConfig),
|
|
979
|
+
config.pluginConfig,
|
|
980
|
+
);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
// Compared by content, not identity: the active layout mirrors pane state,
|
|
984
|
+
// so a cursor settling at launch replaced it mid-pull, the pulled workspace
|
|
985
|
+
// was refused, and the push that followed wrote this device's older one
|
|
986
|
+
// over it on every other device.
|
|
987
|
+
const localIntent = layoutIntent(localPayload);
|
|
988
|
+
const adoptLayout = shouldAdoptPulledLayout({
|
|
989
|
+
local: localIntent,
|
|
990
|
+
atPullStart: baselineConfig === config ? localIntent : layoutIntent(collectLayoutPayload(baselineConfig)),
|
|
991
|
+
lastSynced: layoutIntent(lastSynced),
|
|
992
|
+
pulled: layoutIntent(payload),
|
|
993
|
+
memo: readLayoutMemo(layoutContext.memo),
|
|
994
|
+
pulledEditedAt: pulledLayoutEditedAt(payload, layoutContext.pushedAt),
|
|
995
|
+
});
|
|
996
|
+
if (adoptLayout) {
|
|
997
|
+
next.layout = payload.layout as unknown as AppConfig["layout"];
|
|
998
|
+
next.layouts = withLocalSessionLayoutState(payload.layouts as AppConfig["layouts"], config.layouts);
|
|
999
|
+
next.activeLayoutIndex = payload.activeLayoutIndex as number;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
if (Array.isArray(payload.brokerInstances)) {
|
|
1003
|
+
const syncedIds = Array.isArray(lastSynced?.brokerInstances) ? idsOf(lastSynced.brokerInstances) : null;
|
|
1004
|
+
next.brokerInstances = mergeBrokerInstances(
|
|
1005
|
+
config.brokerInstances,
|
|
1006
|
+
payload.brokerInstances as Array<Partial<BrokerInstanceConfig>>,
|
|
1007
|
+
canApply("brokerInstances"),
|
|
1008
|
+
syncedIds,
|
|
1009
|
+
payload.brokerInstancesMergedById === true,
|
|
1010
|
+
);
|
|
1011
|
+
if (syncedIds) next.portfolios = withoutRemovedBrokerPortfolios(config, next, syncedIds, payload.portfolios);
|
|
1012
|
+
}
|
|
1013
|
+
return next;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/** The entries of a pulled list that carry an id. */
|
|
1017
|
+
function idEntries(entries: unknown): Array<{ id: string }> {
|
|
1018
|
+
return Array.isArray(entries)
|
|
1019
|
+
? entries.flatMap((entry) => (isRecord(entry) && typeof entry.id === "string" ? [{ id: entry.id }] : []))
|
|
1020
|
+
: [];
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
function idsOf(entries: unknown[]): Set<string> {
|
|
1024
|
+
return new Set(entries.flatMap((entry) => (isRecord(entry) && typeof entry.id === "string" ? [entry.id] : [])));
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* Takes the pulled profiles when this device has not changed its own since it
|
|
1029
|
+
* last synced. When it has (a broker sync alone moves `lastSyncedAt`), it keeps
|
|
1030
|
+
* its own, but profile by profile against the ids it last synced: one removed
|
|
1031
|
+
* on another device goes, one removed here stays gone, and one added elsewhere
|
|
1032
|
+
* arrives. Keeping the whole list instead pushed a profile removed elsewhere
|
|
1033
|
+
* back to every device.
|
|
1034
|
+
*
|
|
1035
|
+
* An older build that changed its own profiles pushes its whole list, without
|
|
1036
|
+
* a profile added here since it last pulled, so only a list merged the same
|
|
1037
|
+
* way (`removalsCount`) can remove one: the profile's settings never sync and
|
|
1038
|
+
* would be lost for good.
|
|
1039
|
+
*/
|
|
1040
|
+
function mergeBrokerInstances(
|
|
1041
|
+
local: BrokerInstanceConfig[],
|
|
1042
|
+
incoming: Array<Partial<BrokerInstanceConfig>>,
|
|
1043
|
+
localUnchanged: boolean,
|
|
1044
|
+
syncedIds: ReadonlySet<string> | null,
|
|
1045
|
+
removalsCount: boolean,
|
|
1046
|
+
): BrokerInstanceConfig[] {
|
|
1047
|
+
const localById = new Map(local.map((instance) => [instance.id, instance]));
|
|
1048
|
+
const fromIncoming = (instance: Partial<BrokerInstanceConfig>): BrokerInstanceConfig => {
|
|
1049
|
+
const current = instance.id ? localById.get(instance.id) : undefined;
|
|
1050
|
+
return {
|
|
1051
|
+
id: instance.id ?? current?.id ?? crypto.randomUUID(),
|
|
1052
|
+
brokerType: instance.brokerType ?? current?.brokerType ?? "",
|
|
1053
|
+
label: instance.label ?? current?.label ?? "",
|
|
1054
|
+
connectionMode: instance.connectionMode ?? current?.connectionMode,
|
|
1055
|
+
enabled: instance.enabled ?? current?.enabled,
|
|
1056
|
+
lastSyncedAt: instance.lastSyncedAt ?? current?.lastSyncedAt,
|
|
1057
|
+
config: current?.config ?? {},
|
|
1058
|
+
};
|
|
1059
|
+
};
|
|
1060
|
+
if (localUnchanged) return incoming.map(fromIncoming);
|
|
1061
|
+
if (!syncedIds) return local;
|
|
1062
|
+
|
|
1063
|
+
const incomingIds = idsOf(incoming);
|
|
1064
|
+
const kept = removalsCount
|
|
1065
|
+
? local.filter((instance) => incomingIds.has(instance.id) || !syncedIds.has(instance.id))
|
|
1066
|
+
: local;
|
|
1067
|
+
const added = incoming.filter((instance) => (
|
|
1068
|
+
typeof instance.id === "string" && !localById.has(instance.id) && !syncedIds.has(instance.id)
|
|
1069
|
+
));
|
|
1070
|
+
return kept.length === local.length && added.length === 0 ? local : [...kept, ...added.map(fromIncoming)];
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
/**
|
|
1074
|
+
* A broker portfolio goes with a profile the pull removed, unless the pulled
|
|
1075
|
+
* portfolios still list it: another device handed it to a profile it kept.
|
|
1076
|
+
* Only a profile this device had synced counts as removed elsewhere.
|
|
1077
|
+
*/
|
|
1078
|
+
function withoutRemovedBrokerPortfolios(
|
|
1079
|
+
config: AppConfig,
|
|
1080
|
+
next: AppConfig,
|
|
1081
|
+
syncedIds: ReadonlySet<string>,
|
|
1082
|
+
pulledPortfolios: unknown,
|
|
1083
|
+
): Portfolio[] {
|
|
1084
|
+
const remaining = new Set(next.brokerInstances.map((instance) => instance.id));
|
|
1085
|
+
const removed = new Set(config.brokerInstances.flatMap((instance) => (
|
|
1086
|
+
syncedIds.has(instance.id) && !remaining.has(instance.id) ? [instance.id] : []
|
|
1087
|
+
)));
|
|
1088
|
+
if (removed.size === 0) return next.portfolios;
|
|
1089
|
+
const pulledIds = Array.isArray(pulledPortfolios) ? idsOf(pulledPortfolios) : new Set<string>();
|
|
1090
|
+
const portfolios = next.portfolios.filter((portfolio) => (
|
|
1091
|
+
!portfolio.brokerInstanceId || !removed.has(portfolio.brokerInstanceId) || pulledIds.has(portfolio.id)
|
|
1092
|
+
));
|
|
1093
|
+
return portfolios.length === next.portfolios.length ? next.portfolios : portfolios;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
interface RemovedBrokerHoldings {
|
|
1097
|
+
instanceIds: ReadonlySet<string>;
|
|
1098
|
+
portfolioIds: ReadonlySet<string>;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
/** The profiles a pull removed, and the portfolios that went with them. */
|
|
1102
|
+
function removedBrokerHoldings(before: AppConfig, after: AppConfig): RemovedBrokerHoldings | null {
|
|
1103
|
+
const remaining = new Set(after.brokerInstances.map((instance) => instance.id));
|
|
1104
|
+
const instanceIds = new Set(before.brokerInstances.flatMap((instance) => (
|
|
1105
|
+
remaining.has(instance.id) ? [] : [instance.id]
|
|
1106
|
+
)));
|
|
1107
|
+
if (instanceIds.size === 0) return null;
|
|
1108
|
+
const keptPortfolios = new Set(after.portfolios.map((portfolio) => portfolio.id));
|
|
1109
|
+
const portfolioIds = new Set(before.portfolios.flatMap((portfolio) => (
|
|
1110
|
+
portfolio.brokerInstanceId && instanceIds.has(portfolio.brokerInstanceId) && !keptPortfolios.has(portfolio.id)
|
|
1111
|
+
? [portfolio.id]
|
|
1112
|
+
: []
|
|
1113
|
+
)));
|
|
1114
|
+
return { instanceIds, portfolioIds };
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
/**
|
|
1118
|
+
* The ticker as the removal on the other device left it: without the removed
|
|
1119
|
+
* profiles' positions and contracts, or its place in their portfolios. Null
|
|
1120
|
+
* when nothing is left to keep, as that removal deleted it; the same record
|
|
1121
|
+
* when the removal did not touch it.
|
|
1122
|
+
*/
|
|
1123
|
+
function withoutRemovedBrokerHoldings(ticker: TickerRecord, removed: RemovedBrokerHoldings): TickerRecord | null {
|
|
1124
|
+
const { metadata } = ticker;
|
|
1125
|
+
const positions = metadata.positions.filter((position) => (
|
|
1126
|
+
!(position.brokerInstanceId && removed.instanceIds.has(position.brokerInstanceId))
|
|
1127
|
+
&& !removed.portfolioIds.has(position.portfolio)
|
|
1128
|
+
));
|
|
1129
|
+
const portfolios = metadata.portfolios.filter((portfolioId) => !removed.portfolioIds.has(portfolioId));
|
|
1130
|
+
const contracts = (metadata.broker_contracts ?? []).filter((contract) => (
|
|
1131
|
+
!(contract.brokerInstanceId && removed.instanceIds.has(contract.brokerInstanceId))
|
|
1132
|
+
));
|
|
1133
|
+
if (
|
|
1134
|
+
positions.length === metadata.positions.length
|
|
1135
|
+
&& portfolios.length === metadata.portfolios.length
|
|
1136
|
+
&& contracts.length === (metadata.broker_contracts ?? []).length
|
|
1137
|
+
) {
|
|
1138
|
+
return ticker;
|
|
1139
|
+
}
|
|
1140
|
+
const empty = positions.length === 0
|
|
1141
|
+
&& portfolios.length === 0
|
|
1142
|
+
&& contracts.length === 0
|
|
1143
|
+
&& metadata.watchlists.length === 0
|
|
1144
|
+
&& metadata.tags.length === 0
|
|
1145
|
+
&& Object.keys(metadata.custom).length === 0;
|
|
1146
|
+
if (empty) return null;
|
|
1147
|
+
return { ...ticker, metadata: { ...metadata, positions, portfolios, broker_contracts: contracts } };
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
function lastSyncedTickersById(baselinePayload: unknown): Map<string, Record<string, unknown>> | null {
|
|
1151
|
+
if (!isRecord(baselinePayload) || !Array.isArray(baselinePayload.tickers)) return null;
|
|
1152
|
+
const byId = new Map<string, Record<string, unknown>>();
|
|
1153
|
+
for (const entry of baselinePayload.tickers) {
|
|
1154
|
+
if (isRecord(entry) && typeof entry.ticker === "string") byId.set(entry.ticker, entry);
|
|
1155
|
+
}
|
|
1156
|
+
return byId;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* Compared as stored. What this device last synced is read back from storage
|
|
1161
|
+
* at launch without the fields that were undefined, so set against a copy
|
|
1162
|
+
* collected fresh as is, every ticker read as edited here: a device started
|
|
1163
|
+
* after a while away kept all its old rows and pushed them over newer ones.
|
|
1164
|
+
*/
|
|
1165
|
+
function sameAsStored(left: unknown, right: unknown): boolean {
|
|
1166
|
+
const stored = (value: unknown) => (value === undefined ? null : JSON.parse(JSON.stringify(value)));
|
|
1167
|
+
return stableStringify(stored(left)) === stableStringify(stored(right));
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
/**
|
|
1171
|
+
* A ticker's own fields. Quotes churn on every refresh, and which portfolios
|
|
1172
|
+
* hold it, and how much, merges portfolio by portfolio.
|
|
1173
|
+
*/
|
|
1174
|
+
function tickerOwnFields(metadata: Record<string, unknown>): Record<string, unknown> {
|
|
1175
|
+
const { quote: _quote, positions: _positions, portfolios: _portfolios, ...rest } = metadata;
|
|
1176
|
+
return rest;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
/** One portfolio's part of a ticker: whether it lists the ticker, and the positions it holds in it. */
|
|
1180
|
+
function holdingIn(positions: readonly TickerPosition[], links: readonly unknown[], portfolioId: string) {
|
|
1181
|
+
return {
|
|
1182
|
+
linked: links.includes(portfolioId),
|
|
1183
|
+
positions: positions.filter((position) => position.portfolio === portfolioId).map(sanitizePosition),
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
interface PulledTickersMerge {
|
|
1188
|
+
lastSyncedTickers: Map<string, Record<string, unknown>> | null;
|
|
1189
|
+
/** This device's live broker portfolios, each with the side holding its latest broker sync. */
|
|
1190
|
+
brokerPortfolios: ReadonlyMap<string, "local" | "pulled">;
|
|
1191
|
+
known: KnownBrokerHoldings;
|
|
1192
|
+
/** Connections kept on this device: their portfolios' holdings here outlast any pull. */
|
|
1193
|
+
localOnly: LocalOnlyScope | null;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* Which side holds the latest sync of each live broker portfolio. Its
|
|
1198
|
+
* positions are what the broker last reported, so only a later sync replaces
|
|
1199
|
+
* them: a pushed copy older than this device's (from a device that was away,
|
|
1200
|
+
* or an older build) never takes away positions this device's broker reported
|
|
1201
|
+
* since, whatever other portfolios hold on the same ticker.
|
|
1202
|
+
*/
|
|
1203
|
+
function latestBrokerPortfolioSyncs(
|
|
1204
|
+
atPullStart: AppConfig,
|
|
1205
|
+
live: AppConfig,
|
|
1206
|
+
pulledPortfolios: unknown,
|
|
1207
|
+
): Map<string, "local" | "pulled"> {
|
|
1208
|
+
const pulledSyncedAt = new Map<string, number>();
|
|
1209
|
+
for (const portfolio of Array.isArray(pulledPortfolios) ? pulledPortfolios : []) {
|
|
1210
|
+
if (isRecord(portfolio) && typeof portfolio.id === "string" && isFiniteNumber(portfolio.lastSyncedAt)) {
|
|
1211
|
+
pulledSyncedAt.set(portfolio.id, portfolio.lastSyncedAt);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
const sides = new Map<string, "local" | "pulled">();
|
|
1215
|
+
for (const portfolio of live.portfolios) {
|
|
1216
|
+
if (!getBrokerInstance(live.brokerInstances, portfolio.brokerInstanceId)) continue;
|
|
1217
|
+
const localSyncedAt = atPullStart.portfolios.find((entry) => entry.id === portfolio.id)?.lastSyncedAt;
|
|
1218
|
+
// Never synced here: its positions merge like a manual portfolio's.
|
|
1219
|
+
if (!isFiniteNumber(localSyncedAt)) continue;
|
|
1220
|
+
const pulled = pulledSyncedAt.get(portfolio.id);
|
|
1221
|
+
// Later than this device's copy, and than a sync here that ended while the pull was out.
|
|
1222
|
+
const pulledIsLater = pulled !== undefined
|
|
1223
|
+
&& pulled > localSyncedAt
|
|
1224
|
+
&& pulled >= (isFiniteNumber(portfolio.lastSyncedAt) ? portfolio.lastSyncedAt : 0);
|
|
1225
|
+
sides.set(portfolio.id, pulledIsLater ? "pulled" : "local");
|
|
1226
|
+
}
|
|
1227
|
+
return sides;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* A pulled ticker merged with this device's, portfolio by portfolio: this
|
|
1232
|
+
* device's part in a portfolio stays when it changed it since it last synced,
|
|
1233
|
+
* a live broker portfolio goes to the side with its latest sync, and the rest
|
|
1234
|
+
* comes from the pull. Broker contracts never sync and stay local.
|
|
1235
|
+
*/
|
|
1236
|
+
function mergePulledTicker(
|
|
1237
|
+
current: TickerRecord | undefined,
|
|
1238
|
+
pulled: Record<string, unknown>,
|
|
1239
|
+
merge: PulledTickersMerge,
|
|
1240
|
+
): TickerRecord {
|
|
1241
|
+
const local = current?.metadata;
|
|
1242
|
+
const baseline = merge.lastSyncedTickers?.get(String(pulled.ticker));
|
|
1243
|
+
// Nothing to compare with (no copy here, or this device never synced): the pull is taken.
|
|
1244
|
+
const comparable = !!local && !!merge.lastSyncedTickers;
|
|
1245
|
+
// No copy last synced means this device never uploaded the ticker: filed
|
|
1246
|
+
// locally it is unsynced work, unfiled it is not something sync tracks.
|
|
1247
|
+
const ownFieldsEdited = comparable && (baseline
|
|
1248
|
+
? !sameAsStored(tickerOwnFields(sanitizeTickerMetadata(local)), tickerOwnFields(baseline))
|
|
1249
|
+
: isSyncableTicker(sanitizeTickerMetadata(local)));
|
|
1250
|
+
|
|
1251
|
+
const localPositions = local?.positions ?? [];
|
|
1252
|
+
const localLinks = local?.portfolios ?? [];
|
|
1253
|
+
const pulledPositions = Array.isArray(pulled.positions)
|
|
1254
|
+
? mergeLocalBrokerPositionIdentity(localPositions, pulled.positions as TickerPosition[])
|
|
1255
|
+
: localPositions;
|
|
1256
|
+
const pulledLinks = Array.isArray(pulled.portfolios)
|
|
1257
|
+
? pulled.portfolios.filter((portfolioId): portfolioId is string => typeof portfolioId === "string")
|
|
1258
|
+
: localLinks;
|
|
1259
|
+
const baselinePositions = Array.isArray(baseline?.positions) ? baseline.positions as TickerPosition[] : [];
|
|
1260
|
+
const baselineLinks = Array.isArray(baseline?.portfolios) ? baseline.portfolios : [];
|
|
1261
|
+
|
|
1262
|
+
const portfolioIds = [...new Set([
|
|
1263
|
+
...localLinks, ...localPositions.map((position) => position.portfolio),
|
|
1264
|
+
...pulledLinks, ...pulledPositions.map((position) => position.portfolio),
|
|
1265
|
+
])];
|
|
1266
|
+
const positions: TickerPosition[] = [];
|
|
1267
|
+
const portfolios: string[] = [];
|
|
1268
|
+
for (const portfolioId of portfolioIds) {
|
|
1269
|
+
const brokerSide = merge.brokerPortfolios.get(portfolioId);
|
|
1270
|
+
const takePulled = merge.localOnly?.portfolioIds.has(portfolioId) ? false : brokerSide
|
|
1271
|
+
? brokerSide === "pulled"
|
|
1272
|
+
: !comparable || sameAsStored(
|
|
1273
|
+
holdingIn(localPositions, localLinks, portfolioId),
|
|
1274
|
+
holdingIn(baselinePositions, baselineLinks, portfolioId),
|
|
1275
|
+
);
|
|
1276
|
+
const [sidePositions, sideLinks] = takePulled ? [pulledPositions, pulledLinks] : [localPositions, localLinks];
|
|
1277
|
+
positions.push(...sidePositions.filter((position) => position.portfolio === portfolioId));
|
|
1278
|
+
if (sideLinks.includes(portfolioId)) portfolios.push(portfolioId);
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
const record: TickerRecord = {
|
|
1282
|
+
metadata: hydrateTickerMetadata({
|
|
1283
|
+
...(ownFieldsEdited ? local : { ...local, ...pulled }),
|
|
1284
|
+
positions,
|
|
1285
|
+
portfolios,
|
|
1286
|
+
broker_contracts: local?.broker_contracts ?? [],
|
|
1287
|
+
}),
|
|
1288
|
+
};
|
|
1289
|
+
return clearLeftoverBrokerHoldings(record, merge.known) ?? record;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* A ticker the pull did not carry: without what removed broker profiles left,
|
|
1294
|
+
* and without positions in a broker portfolio whose later sync elsewhere no
|
|
1295
|
+
* longer reports the ticker. Null when nothing changes.
|
|
1296
|
+
*/
|
|
1297
|
+
function withoutUnpulledHoldings(ticker: TickerRecord, merge: PulledTickersMerge): TickerRecord | null {
|
|
1298
|
+
const sold = (portfolioId: string) => merge.brokerPortfolios.get(portfolioId) === "pulled";
|
|
1299
|
+
const { metadata } = ticker;
|
|
1300
|
+
const positions = metadata.positions.filter((position) => !sold(position.portfolio));
|
|
1301
|
+
const portfolios = metadata.portfolios.filter((portfolioId) => !sold(portfolioId));
|
|
1302
|
+
const kept = positions.length === metadata.positions.length && portfolios.length === metadata.portfolios.length
|
|
1303
|
+
? ticker
|
|
1304
|
+
: { ...ticker, metadata: { ...metadata, positions, portfolios } };
|
|
1305
|
+
const cleaned = clearLeftoverBrokerHoldings(kept, merge.known) ?? kept;
|
|
1306
|
+
return cleaned === ticker ? null : cleaned;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
const CORE_CONFIG_CONTRIBUTOR_ID = "core.config";
|
|
1310
|
+
|
|
1311
|
+
export const coreConfigSyncContributor: SyncContributor = {
|
|
1312
|
+
id: CORE_CONFIG_CONTRIBUTOR_ID,
|
|
1313
|
+
schemaVersion: 1,
|
|
1314
|
+
collect: ({ state, baselinePayload, memo }) => withLayoutProvenance(
|
|
1315
|
+
collectCoreConfigPayload(publicConfig(state.config, localOnlyScope(state.config))) as Record<string, unknown>,
|
|
1316
|
+
baselinePayload,
|
|
1317
|
+
memo?.get(),
|
|
1318
|
+
),
|
|
1319
|
+
observe: ({ state, baselinePayload, memo, launch }) => {
|
|
1320
|
+
const edit = noteLayoutEdit(state.config, baselinePayload, memo.get(), launch);
|
|
1321
|
+
if (edit) memo.set(edit);
|
|
1322
|
+
},
|
|
1323
|
+
apply: async (payload, { snapshot, baselinePayload, baselineState, state, getState, isCurrent, dispatch, tickerRepository, memo }) => {
|
|
1324
|
+
const pushedAt = snapshot?.contributors[CORE_CONFIG_CONTRIBUTOR_ID]?.updatedAt;
|
|
1325
|
+
const nextConfig = mergeConfigPayload(state.config, payload, baselineState.config, baselinePayload, {
|
|
1326
|
+
memo: memo?.get(),
|
|
1327
|
+
pushedAt,
|
|
1328
|
+
}, localOnlyScope(state.config));
|
|
1329
|
+
if (!nextConfig) return;
|
|
1330
|
+
const configChanged = !valuesEqual(nextConfig, state.config);
|
|
1331
|
+
if (configChanged) {
|
|
1332
|
+
// Adopting another device's workspace rearranges the screen under the
|
|
1333
|
+
// user, so it is worth a line in the log when a report says "my panes
|
|
1334
|
+
// moved on their own".
|
|
1335
|
+
if (nextConfig.layout !== state.config.layout) {
|
|
1336
|
+
log.info("config.layout.adopted", {
|
|
1337
|
+
panes: nextConfig.layout.instances.length,
|
|
1338
|
+
activeLayoutIndex: nextConfig.activeLayoutIndex,
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
dispatch({ type: "SET_CONFIG", config: nextConfig });
|
|
1342
|
+
scheduleConfigSave(nextConfig);
|
|
1343
|
+
}
|
|
1344
|
+
if (memo && isRecord(payload)) rememberCloudLayout(payload, pushedAt, getState().config, memo, nextConfig.layouts !== state.config.layouts);
|
|
1345
|
+
if (!configChanged) return;
|
|
1346
|
+
|
|
1347
|
+
// A profile removed on another device takes its positions with it here
|
|
1348
|
+
// too; kept, this device would push them back and recreate the tickers
|
|
1349
|
+
// that removal deleted.
|
|
1350
|
+
const removed = removedBrokerHoldings(state.config, nextConfig);
|
|
1351
|
+
if (!removed) return;
|
|
1352
|
+
const nextTickers = new Map(getState().tickers);
|
|
1353
|
+
let changed = false;
|
|
1354
|
+
for (const ticker of getState().tickers.values()) {
|
|
1355
|
+
if (!isCurrent()) return;
|
|
1356
|
+
const next = withoutRemovedBrokerHoldings(ticker, removed);
|
|
1357
|
+
if (next === ticker) continue;
|
|
1358
|
+
changed = true;
|
|
1359
|
+
if (next) {
|
|
1360
|
+
await tickerRepository.saveTicker(next);
|
|
1361
|
+
nextTickers.set(next.metadata.ticker, next);
|
|
1362
|
+
} else {
|
|
1363
|
+
await tickerRepository.deleteTicker(ticker.metadata.ticker);
|
|
1364
|
+
nextTickers.delete(ticker.metadata.ticker);
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
if (changed && isCurrent()) dispatch({ type: "SET_TICKERS", tickers: nextTickers });
|
|
1368
|
+
},
|
|
1369
|
+
};
|
|
1370
|
+
|
|
1371
|
+
export const coreCollectionsSyncContributor: SyncContributor = {
|
|
1372
|
+
id: "core.collections",
|
|
1373
|
+
schemaVersion: 1,
|
|
1374
|
+
collect: async ({ state, isLocalMarketData }) => {
|
|
1375
|
+
// Connections the user keeps on this device stay here, with their portfolios, account values and
|
|
1376
|
+
// positions; so do the quotes and bars of a source that keeps its market data local.
|
|
1377
|
+
const scope = localOnlyScope(state.config);
|
|
1378
|
+
const config = publicConfig(state.config, scope);
|
|
1379
|
+
const tickers = publicTickers(state.tickers, scope);
|
|
1380
|
+
return collectCoreCollectionsPayload(
|
|
1381
|
+
config,
|
|
1382
|
+
tickers,
|
|
1383
|
+
state.financials,
|
|
1384
|
+
await loadHoldingExchangeRates(config, tickers, state.financials),
|
|
1385
|
+
state.brokerAccounts,
|
|
1386
|
+
publicMarketData(state.financials, isLocalMarketData),
|
|
1387
|
+
);
|
|
1388
|
+
},
|
|
1389
|
+
apply: async (payload, { snapshot, baselinePayload, baselineState, getState, isCurrent, dispatch, tickerRepository }) => {
|
|
1390
|
+
if (!isRecord(payload)) return;
|
|
1391
|
+
const scope = localOnlyScope(getState().config);
|
|
1392
|
+
hydrateProfileAnalytics(payload);
|
|
1393
|
+
if (!isCurrent()) return;
|
|
1394
|
+
// The config contributor applies first, so this is the config this pull left.
|
|
1395
|
+
const state = getState();
|
|
1396
|
+
const pulledConfig = recordOrNull(snapshot?.contributors[CORE_CONFIG_CONTRIBUTOR_ID]?.payload);
|
|
1397
|
+
const pulledPortfolios = Array.isArray(payload.portfolios) ? payload.portfolios : pulledConfig?.portfolios;
|
|
1398
|
+
// A copy without its ticker list says nothing of what any portfolio holds:
|
|
1399
|
+
// a later sync stamp there must not take this device's broker positions.
|
|
1400
|
+
const pulledTickers = Array.isArray(payload.tickers) ? payload.tickers : null;
|
|
1401
|
+
const merge: PulledTickersMerge = {
|
|
1402
|
+
lastSyncedTickers: lastSyncedTickersById(baselinePayload),
|
|
1403
|
+
brokerPortfolios: pulledTickers
|
|
1404
|
+
? latestBrokerPortfolioSyncs(baselineState.config, state.config, pulledPortfolios)
|
|
1405
|
+
: new Map(),
|
|
1406
|
+
// A broker portfolio the pull still lists may only exist on another device: it stays.
|
|
1407
|
+
known: knownBrokerHoldings(state.config, {
|
|
1408
|
+
portfolios: [pulledPortfolios, pulledConfig?.portfolios].flatMap(idEntries),
|
|
1409
|
+
brokerInstances: idEntries(pulledConfig?.brokerInstances),
|
|
1410
|
+
}),
|
|
1411
|
+
localOnly: scope,
|
|
1412
|
+
};
|
|
1413
|
+
// Tickers here and pulled ones drop the ids of any watchlist that is gone
|
|
1414
|
+
// (removed elsewhere, or deleted by an older build that left its id on the
|
|
1415
|
+
// tickers), so this device never pushes them back.
|
|
1416
|
+
const watchlistIds = new Set(state.config.watchlists.map((watchlist) => watchlist.id));
|
|
1417
|
+
|
|
1418
|
+
// Merged and handed to the app in one go, with no wait in between, so a
|
|
1419
|
+
// broker sync committing meanwhile is not overwritten with an older row.
|
|
1420
|
+
const nextTickers = new Map(state.tickers);
|
|
1421
|
+
const changed: TickerRecord[] = [];
|
|
1422
|
+
const pulledSymbols = new Set<string>();
|
|
1423
|
+
for (const rawTicker of pulledTickers ?? []) {
|
|
1424
|
+
if (!isRecord(rawTicker) || typeof rawTicker.ticker !== "string") continue;
|
|
1425
|
+
pulledSymbols.add(rawTicker.ticker);
|
|
1426
|
+
const current = state.tickers.get(rawTicker.ticker);
|
|
1427
|
+
const record = withoutMissingWatchlists(mergePulledTicker(current, rawTicker, merge), watchlistIds);
|
|
1428
|
+
if (current ? sameAsStored(record.metadata, hydrateTickerMetadata({ ...current.metadata })) : !isSyncableTicker(record.metadata)) continue;
|
|
1429
|
+
nextTickers.set(record.metadata.ticker, record);
|
|
1430
|
+
changed.push(record);
|
|
1431
|
+
}
|
|
1432
|
+
for (const ticker of state.tickers.values()) {
|
|
1433
|
+
if (pulledSymbols.has(ticker.metadata.ticker)) continue;
|
|
1434
|
+
const kept = withoutUnpulledHoldings(ticker, merge) ?? ticker;
|
|
1435
|
+
const next = withoutMissingWatchlists(kept, watchlistIds);
|
|
1436
|
+
if (next === ticker) continue;
|
|
1437
|
+
nextTickers.set(next.metadata.ticker, next);
|
|
1438
|
+
changed.push(next);
|
|
1439
|
+
}
|
|
1440
|
+
const suffixed = mergePulledSuffixedListings(nextTickers, changed, state.config);
|
|
1441
|
+
if (changed.length === 0 && !suffixed.config) return;
|
|
1442
|
+
if (suffixed.config) dispatch({ type: "SET_CONFIG", config: suffixed.config });
|
|
1443
|
+
if (changed.length > 0) dispatch({ type: "SET_TICKERS", tickers: nextTickers });
|
|
1444
|
+
// The moved targets first, so a stop before the rows strands none on an emptied key.
|
|
1445
|
+
if (suffixed.config) await saveConfigImmediately(suffixed.config);
|
|
1446
|
+
// Written one at a time, so an edit or a broker sync can replace a row
|
|
1447
|
+
// before its turn. That copy is newer and its writer saves it; this one
|
|
1448
|
+
// written over it would come back at launch as an edit and be pushed.
|
|
1449
|
+
for (const record of changed) {
|
|
1450
|
+
if (getState().tickers.get(record.metadata.ticker) !== record) continue;
|
|
1451
|
+
await tickerRepository.saveTicker(record);
|
|
1452
|
+
}
|
|
1453
|
+
},
|
|
1454
|
+
};
|
|
1455
|
+
|
|
1456
|
+
/**
|
|
1457
|
+
* An older build still files lots under a vendor's suffixed key (GARAN.IS)
|
|
1458
|
+
* and pushes them: pulled, they merge into the listing's row here as at
|
|
1459
|
+
* launch (`mergeSuffixedListings`), each lot once, so they never count in
|
|
1460
|
+
* both rows or go back out under the old key. The merged rows replace their
|
|
1461
|
+
* entries in `tickers` and `changed`; the config comes back with targets
|
|
1462
|
+
* moved, or null when none moved.
|
|
1463
|
+
*/
|
|
1464
|
+
function mergePulledSuffixedListings(
|
|
1465
|
+
tickers: Map<string, TickerRecord>,
|
|
1466
|
+
changed: TickerRecord[],
|
|
1467
|
+
config: AppConfig,
|
|
1468
|
+
): { config: AppConfig | null } {
|
|
1469
|
+
const merged = mergeSuffixedListings([...tickers.values()]);
|
|
1470
|
+
if (!merged) return { config: null };
|
|
1471
|
+
for (const row of merged.saves) {
|
|
1472
|
+
tickers.set(row.metadata.ticker, row);
|
|
1473
|
+
const at = changed.findIndex((record) => record.metadata.ticker === row.metadata.ticker);
|
|
1474
|
+
if (at >= 0) changed[at] = row;
|
|
1475
|
+
else changed.push(row);
|
|
1476
|
+
}
|
|
1477
|
+
for (const kept of merged.keptCustom) log.info("sync.suffixed-listing.custom-kept", kept);
|
|
1478
|
+
const next = moveTargetWeights(config, merged.moved);
|
|
1479
|
+
return { config: next === config ? null : next };
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
export function createCoreSyncContributors(): SyncContributor[] {
|
|
1483
|
+
return [coreConfigSyncContributor, coreCollectionsSyncContributor];
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
export const __syncContributorInternalsForTests = {
|
|
1487
|
+
sanitizeUnknown,
|
|
1488
|
+
collectCoreConfigPayload,
|
|
1489
|
+
collectCoreCollectionsPayload,
|
|
1490
|
+
mergeConfigPayload,
|
|
1491
|
+
};
|