@vninvestcharts/widget 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/NOTICE.md +83 -0
- package/README.md +851 -3
- package/dist/AlertsModal-WKEUDTUZ.js +2 -0
- package/dist/ConnectedTradingPanel-KWJMIKTN.css +2 -0
- package/dist/ConnectedTradingPanel-XDKMOQY5.js +2 -0
- package/dist/PineEditorPanel-AUXB4FD3.js +2 -0
- package/dist/PineEditorPanel-V6YN2OTU.css +2 -0
- package/dist/RightSidebarDockHost-6FPZ6EKV.css +2 -0
- package/dist/RightSidebarDockHost-OBFXKSIY.js +2 -0
- package/dist/StrategyTesterPanel-6IUTS2P4.js +2 -0
- package/dist/StrategyTesterPanel-LEWEUMXP.css +2 -0
- package/dist/VolumeProfileWorker-UREKVPUE.js +189 -0
- package/dist/adapters/index.cjs +2532 -0
- package/dist/adapters/index.d.mts +673 -0
- package/dist/adapters/index.d.ts +673 -0
- package/dist/adapters/index.js +2521 -0
- package/dist/adapters/index.umd.js +2535 -0
- package/dist/chunk-5T6DGB3V.js +2 -0
- package/dist/chunk-66JBEGR3.js +4 -0
- package/dist/chunk-6D7DVBIK.js +2 -0
- package/dist/chunk-76E7CKUD.js +2 -0
- package/dist/chunk-AKWVXRQ6.js +2 -0
- package/dist/chunk-FHHSTO6Z.js +2 -0
- package/dist/chunk-HPL723JA.js +2 -0
- package/dist/chunk-NVGTF73S.js +2 -0
- package/dist/chunk-PNIB4OM3.js +2 -0
- package/dist/chunk-UKJ5AKQX.js +595 -0
- package/dist/chunk-UYJTX3SD.js +2 -0
- package/dist/combined.css +3068 -0
- package/dist/css-modules-manifest.json +297 -0
- package/dist/dist-Y6PZ2RN3.js +12 -0
- package/dist/drawing/index.cjs +53 -0
- package/dist/drawing/index.d.mts +2 -0
- package/dist/drawing/index.d.ts +2 -0
- package/dist/drawing/index.js +2 -0
- package/dist/drawing/index.umd.js +54 -0
- package/dist/dts/drawing-shim.d.ts +3 -0
- package/dist/dts/index.d.ts +31 -0
- package/dist/dts/lib/Chart.d.ts +31 -0
- package/dist/dts/lib/ChartContext.d.ts +10 -0
- package/dist/dts/lib/EventCapture.d.ts +3 -0
- package/dist/dts/lib/GenericChartComponent.d.ts +5 -0
- package/dist/dts/lib/GenericComponent.d.ts +124 -0
- package/dist/dts/lib/StockChartContext.d.ts +53 -0
- package/dist/dts/lib/adapters/BaseAdapter.d.ts +25 -0
- package/dist/dts/lib/adapters/BinanceAdapter.d.ts +51 -0
- package/dist/dts/lib/adapters/CSVAdapter.d.ts +17 -0
- package/dist/dts/lib/adapters/ContinuousContractAdapter.d.ts +63 -0
- package/dist/dts/lib/adapters/ContinuousContractTypes.d.ts +154 -0
- package/dist/dts/lib/adapters/DBAdapter.d.ts +16 -0
- package/dist/dts/lib/adapters/DataAdapter.d.ts +136 -0
- package/dist/dts/lib/adapters/DjangoVnstockAdapter.d.ts +15 -0
- package/dist/dts/lib/adapters/LocalCacheAdapter.d.ts +18 -0
- package/dist/dts/lib/adapters/MockAdapter.d.ts +22 -0
- package/dist/dts/lib/adapters/RESTAdapter.d.ts +16 -0
- package/dist/dts/lib/adapters/StockDataAdapter.d.ts +1 -0
- package/dist/dts/lib/adapters/UDFDataAdapter.d.ts +29 -0
- package/dist/dts/lib/adapters/VNStocksAdapter.d.ts +8 -0
- package/dist/dts/lib/adapters/WSAdapter.d.ts +30 -0
- package/dist/dts/lib/adapters/gapFixture.d.ts +71 -0
- package/dist/dts/lib/adapters/index.d.ts +15 -0
- package/dist/dts/lib/adapters/rollAlgorithms.d.ts +68 -0
- package/dist/dts/lib/advisory/AdvisoryPanel.d.ts +5 -0
- package/dist/dts/lib/alerts/AlertEvaluator.d.ts +5 -0
- package/dist/dts/lib/alerts/AlertManager.d.ts +123 -0
- package/dist/dts/lib/alerts/types.d.ts +58 -0
- package/dist/dts/lib/cache/cacheDebug.d.ts +3 -0
- package/dist/dts/lib/calendars/ExchangeCalendar.d.ts +23 -0
- package/dist/dts/lib/calendars/calendarRegistry.d.ts +10 -0
- package/dist/dts/lib/calendars/index.d.ts +3 -0
- package/dist/dts/lib/core/ChartPane.d.ts +8 -0
- package/dist/dts/lib/core/ChartSplitter.d.ts +70 -0
- package/dist/dts/lib/core/ChartTerminal.d.ts +12 -0
- package/dist/dts/lib/core/ErrorBoundary.d.ts +17 -0
- package/dist/dts/lib/core/IndicatorLegend.d.ts +47 -0
- package/dist/dts/lib/core/PaneHeader.d.ts +24 -0
- package/dist/dts/lib/core/PaneLabel.d.ts +8 -0
- package/dist/dts/lib/core/PaneSplitter.d.ts +9 -0
- package/dist/dts/lib/core/SeriesPicker.d.ts +10 -0
- package/dist/dts/lib/core/calculators/alignBarsByDate.d.ts +38 -0
- package/dist/dts/lib/core/calculators/buildIndicatorComputationPlan.d.ts +16 -0
- package/dist/dts/lib/core/calculators/calcCVDApprox.d.ts +6 -0
- package/dist/dts/lib/core/calculators/calcStrengthElder.d.ts +7 -0
- package/dist/dts/lib/core/calculators/calcWhaleApprox.d.ts +6 -0
- package/dist/dts/lib/core/calculators/computationHelpers.d.ts +12 -0
- package/dist/dts/lib/core/calculators/computeIndicatorComputationResult.d.ts +3 -0
- package/dist/dts/lib/core/calculators/computeMarketStructure.d.ts +8 -0
- package/dist/dts/lib/core/calculators/computeMomentum.d.ts +22 -0
- package/dist/dts/lib/core/calculators/computeMovingAverage.d.ts +15 -0
- package/dist/dts/lib/core/calculators/computeProfile.d.ts +9 -0
- package/dist/dts/lib/core/calculators/computeTrend.d.ts +10 -0
- package/dist/dts/lib/core/calculators/computeVolatility.d.ts +14 -0
- package/dist/dts/lib/core/calculators/computeVolumeFlow.d.ts +19 -0
- package/dist/dts/lib/core/calculators/enrichData.d.ts +7 -0
- package/dist/dts/lib/core/calculators/enrichDataWithCanonicalStore.d.ts +33 -0
- package/dist/dts/lib/core/calculators/exoticChartData.d.ts +140 -0
- package/dist/dts/lib/core/calculators/fixtures/mockData.d.ts +2 -0
- package/dist/dts/lib/core/calculators/indicatorComputation.d.ts +27 -0
- package/dist/dts/lib/core/calculators/indicatorComputationTypes.d.ts +249 -0
- package/dist/dts/lib/core/calculators/materializeIndicatorValues.d.ts +3 -0
- package/dist/dts/lib/core/calculators/normalizePrices.d.ts +36 -0
- package/dist/dts/lib/core/calculators/resolveCalculationOrder.d.ts +17 -0
- package/dist/dts/lib/core/calculators/types.d.ts +269 -0
- package/dist/dts/lib/core/canvas/ChartRenderContext.d.ts +14 -0
- package/dist/dts/lib/core/canvas/OverlayCanvas.d.ts +19 -0
- package/dist/dts/lib/core/context/ChartSyncContext.d.ts +21 -0
- package/dist/dts/lib/core/context/DataContext.d.ts +15 -0
- package/dist/dts/lib/core/context/PaneManagerContext.d.ts +10 -0
- package/dist/dts/lib/core/hooks/paneSizingHelpers.d.ts +13 -0
- package/dist/dts/lib/core/hooks/useCanvasResize.d.ts +8 -0
- package/dist/dts/lib/core/hooks/useChartTheme.d.ts +12 -0
- package/dist/dts/lib/core/hooks/useDynamicPanes.d.ts +155 -0
- package/dist/dts/lib/core/hooks/useIndicatorSets.d.ts +20 -0
- package/dist/dts/lib/core/hooks/usePaneManager.d.ts +39 -0
- package/dist/dts/lib/core/hooks/usePaneSizes.d.ts +52 -0
- package/dist/dts/lib/core/index.d.ts +41 -0
- package/dist/dts/lib/core/paneScaleSlotDomains.d.ts +3 -0
- package/dist/dts/lib/core/registry/SeriesRegistry.d.ts +22 -0
- package/dist/dts/lib/core/registry/filterPanesBySeriesTier.d.ts +43 -0
- package/dist/dts/lib/core/registry/marketStructure.d.ts +7 -0
- package/dist/dts/lib/core/registry/momentum.d.ts +20 -0
- package/dist/dts/lib/core/registry/movingAverage.d.ts +14 -0
- package/dist/dts/lib/core/registry/priceChartTypes.d.ts +16 -0
- package/dist/dts/lib/core/registry/profile.d.ts +8 -0
- package/dist/dts/lib/core/registry/registerAll.d.ts +1 -0
- package/dist/dts/lib/core/registry/registerPhaseOne.d.ts +3 -0
- package/dist/dts/lib/core/registry/registryCore.d.ts +77 -0
- package/dist/dts/lib/core/registry/trend.d.ts +11 -0
- package/dist/dts/lib/core/registry/volatility.d.ts +11 -0
- package/dist/dts/lib/core/registry/volumeFlow.d.ts +20 -0
- package/dist/dts/lib/core/replay/BarReplayController.d.ts +62 -0
- package/dist/dts/lib/core/replay/ReplayEventBus.d.ts +68 -0
- package/dist/dts/lib/core/replay/ReplayFillSimulator.d.ts +33 -0
- package/dist/dts/lib/core/replay/ReplayOrderBook.d.ts +24 -0
- package/dist/dts/lib/core/replay/ReplayPositionManager.d.ts +30 -0
- package/dist/dts/lib/core/replay/ReplaySessionAnalytics.d.ts +31 -0
- package/dist/dts/lib/core/replay/createReplayTradeMarkerPrimitives.d.ts +7 -0
- package/dist/dts/lib/core/replay/pnlUtils.d.ts +2 -0
- package/dist/dts/lib/core/replay/replayBrokerAdapters.d.ts +51 -0
- package/dist/dts/lib/core/replay/replayTradingTypes.d.ts +61 -0
- package/dist/dts/lib/core/scales/computeScales.d.ts +8 -0
- package/dist/dts/lib/core/seriesValueResolver.d.ts +27 -0
- package/dist/dts/lib/core/sets/builtins.d.ts +2 -0
- package/dist/dts/lib/core/sets/indicatorSetCodec.d.ts +15 -0
- package/dist/dts/lib/core/trading/AnalyticsEngine.d.ts +56 -0
- package/dist/dts/lib/core/trading/BrokerAPI.d.ts +40 -0
- package/dist/dts/lib/core/trading/ExecutionSimulator.d.ts +53 -0
- package/dist/dts/lib/core/trading/FillSettlement.d.ts +38 -0
- package/dist/dts/lib/core/trading/MarketDataPort.d.ts +41 -0
- package/dist/dts/lib/core/trading/MarketRules.d.ts +58 -0
- package/dist/dts/lib/core/trading/OrderManagementSystem.d.ts +57 -0
- package/dist/dts/lib/core/trading/PositionManager.d.ts +79 -0
- package/dist/dts/lib/core/trading/RiskEngine.d.ts +40 -0
- package/dist/dts/lib/core/trading/SettlementCalendar.d.ts +10 -0
- package/dist/dts/lib/core/trading/VirtualBrokerEngine.d.ts +92 -0
- package/dist/dts/lib/core/trading/orderMargin.d.ts +3 -0
- package/dist/dts/lib/core/trading/storage/InMemoryStorageAdapter.d.ts +10 -0
- package/dist/dts/lib/core/trading/storage/TradingStorage.d.ts +34 -0
- package/dist/dts/lib/core/trading/types.d.ts +99 -0
- package/dist/dts/lib/core/types/chart.d.ts +21 -0
- package/dist/dts/lib/core/types/indicator-catalog.d.ts +38 -0
- package/dist/dts/lib/core/types/indicator-set.d.ts +19 -0
- package/dist/dts/lib/core/types/pane-descriptor.d.ts +46 -0
- package/dist/dts/lib/core/types/seriesComponents.d.ts +15 -0
- package/dist/dts/lib/credentials/credentialStore.d.ts +93 -0
- package/dist/dts/lib/helper/SaveChartAsImage.d.ts +90 -0
- package/dist/dts/lib/indicator/defaultOptionsForAppearance.d.ts +105 -0
- package/dist/dts/lib/indicators/builtin/MTFWrapper.d.ts +3 -0
- package/dist/dts/lib/indicators/builtin/VolumeProfileWorker.d.ts +19 -0
- package/dist/dts/lib/indicators/builtin/ac.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/alligator.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/anchoredVwap.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/ao.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/bbi.d.ts +10 -0
- package/dist/dts/lib/indicators/builtin/bias.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/bollinger.d.ts +9 -0
- package/dist/dts/lib/indicators/builtin/brar.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/cci.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/chaikinOscillator.d.ts +14 -0
- package/dist/dts/lib/indicators/builtin/chaikinVol.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/ci.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/cmf.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/cr.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/cvd.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/deltaProfile.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/dema.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/dma.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/dmi.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/donchian.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/ema.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/emv.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/footprint.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/fractals.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/gator.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/hma.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/hv.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/ichimoku.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/kdj.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/keltner.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/ma.d.ts +10 -0
- package/dist/dts/lib/indicators/builtin/maRibbon.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/macd.d.ts +9 -0
- package/dist/dts/lib/indicators/builtin/marketProfile.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/mfi.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/mtm.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/obv.d.ts +10 -0
- package/dist/dts/lib/indicators/builtin/pivotHighLow.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/pivotStandard.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/psy.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/pvt.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/roc.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/rsi.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/sar.d.ts +10 -0
- package/dist/dts/lib/indicators/builtin/sma.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/smfi.d.ts +8 -0
- package/dist/dts/lib/indicators/builtin/stdDev.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/strengthRelative.d.ts +7 -0
- package/dist/dts/lib/indicators/builtin/supertrend.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/tema.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/trix.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/volOsc.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/volume.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/volumeProfile.d.ts +8 -0
- package/dist/dts/lib/indicators/builtin/vr.d.ts +10 -0
- package/dist/dts/lib/indicators/builtin/vwap.d.ts +5 -0
- package/dist/dts/lib/indicators/builtin/vwma.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/wma.d.ts +4 -0
- package/dist/dts/lib/indicators/builtin/wr.d.ts +10 -0
- package/dist/dts/lib/indicators/builtin/wyckoffWave.d.ts +15 -0
- package/dist/dts/lib/indicators/index.d.ts +63 -0
- package/dist/dts/lib/indicators/indicatorValueShapes.d.ts +15 -0
- package/dist/dts/lib/indicators/outputKeys.d.ts +50 -0
- package/dist/dts/lib/indicators/overlays/CVDIndicator.d.ts +26 -0
- package/dist/dts/lib/indicators/overlays/DarkFlowBadge.d.ts +19 -0
- package/dist/dts/lib/indicators/overlays/ExternalCVDOverlay.d.ts +15 -0
- package/dist/dts/lib/indicators/overlays/WhaleBubbleOverlay.d.ts +14 -0
- package/dist/dts/lib/indicators/overlays/WhaleMarketBubbleOverlay.d.ts +27 -0
- package/dist/dts/lib/indicators/overlays/whaleDetector.d.ts +66 -0
- package/dist/dts/lib/indicators/registry.d.ts +6 -0
- package/dist/dts/lib/indicators/types.d.ts +5 -0
- package/dist/dts/lib/indicators/utils.d.ts +259 -0
- package/dist/dts/lib/pinescript/PineCompiler.d.ts +34 -0
- package/dist/dts/lib/pinescript/ast.d.ts +73 -0
- package/dist/dts/lib/pinescript/compile.d.ts +40 -0
- package/dist/dts/lib/pinescript/grammar.d.ts +12 -0
- package/dist/dts/lib/pinescript/pine.worker.d.ts +1 -0
- package/dist/dts/lib/pinescript/pineBlocks.d.ts +54 -0
- package/dist/dts/lib/pinescript/pineBuiltins.d.ts +47 -0
- package/dist/dts/lib/pinescript/pineEnv.d.ts +46 -0
- package/dist/dts/lib/pinescript/pineMath.d.ts +13 -0
- package/dist/dts/lib/pinescript/pineParse.d.ts +25 -0
- package/dist/dts/lib/pinescript/pineStrings.d.ts +50 -0
- package/dist/dts/lib/pinescript/runtime.d.ts +5 -0
- package/dist/dts/lib/pinescript/scriptRegistry.d.ts +40 -0
- package/dist/dts/lib/pinescript/series-value.d.ts +64 -0
- package/dist/dts/lib/pinescript/vnscript-completion.d.ts +1 -0
- package/dist/dts/lib/pinescript/vnscript-grammar.d.ts +19 -0
- package/dist/dts/lib/scale/discontinuousTimeScaleProvider.d.ts +3 -0
- package/dist/dts/lib/scale/financeDiscontinuousScale.d.ts +15 -0
- package/dist/dts/lib/scale/index.d.ts +1 -0
- package/dist/dts/lib/scale/levels.d.ts +12 -0
- package/dist/dts/lib/series/AlternatingFillAreaSeries.d.ts +13 -0
- package/dist/dts/lib/series/AreaOnlySeries.d.ts +10 -0
- package/dist/dts/lib/series/AreaSeries.d.ts +30 -0
- package/dist/dts/lib/series/BarSeries.d.ts +40 -0
- package/dist/dts/lib/series/BollingerSeries.d.ts +11 -0
- package/dist/dts/lib/series/CandlestickSeries.d.ts +56 -0
- package/dist/dts/lib/series/CircleMarker.d.ts +28 -0
- package/dist/dts/lib/series/ElderRaySeries.d.ts +14 -0
- package/dist/dts/lib/series/FootprintSeries.d.ts +21 -0
- package/dist/dts/lib/series/GroupedBarSeries.d.ts +9 -0
- package/dist/dts/lib/series/HTFOverlaySeries.d.ts +32 -0
- package/dist/dts/lib/series/HistogramSeries.d.ts +51 -0
- package/dist/dts/lib/series/KagiSeries.d.ts +9 -0
- package/dist/dts/lib/series/LineBreakSeries.d.ts +28 -0
- package/dist/dts/lib/series/LineSeries.d.ts +54 -0
- package/dist/dts/lib/series/MACDSeries.d.ts +28 -0
- package/dist/dts/lib/series/MarketProfileSeries.d.ts +18 -0
- package/dist/dts/lib/series/OHLCSeries.d.ts +9 -0
- package/dist/dts/lib/series/OverlayBarSeries.d.ts +9 -0
- package/dist/dts/lib/series/PointAndFigureSeries.d.ts +45 -0
- package/dist/dts/lib/series/RSISeries.d.ts +38 -0
- package/dist/dts/lib/series/RenkoSeries.d.ts +9 -0
- package/dist/dts/lib/series/SARSeries.d.ts +10 -0
- package/dist/dts/lib/series/SVGComponent.d.ts +5 -0
- package/dist/dts/lib/series/ScatterSeries.d.ts +9 -0
- package/dist/dts/lib/series/SquareMarker.d.ts +28 -0
- package/dist/dts/lib/series/StackedBarSeries.d.ts +19 -0
- package/dist/dts/lib/series/StochasticSeries.d.ts +9 -0
- package/dist/dts/lib/series/StraightLine.d.ts +18 -0
- package/dist/dts/lib/series/TriangleMarker.d.ts +30 -0
- package/dist/dts/lib/series/VolumeProfileSeries.d.ts +9 -0
- package/dist/dts/lib/series/index.d.ts +28 -0
- package/dist/dts/lib/strategy/BrokerSimulator.d.ts +11 -0
- package/dist/dts/lib/strategy/types.d.ts +35 -0
- package/dist/dts/lib/tape/TapePanel.d.ts +5 -0
- package/dist/dts/lib/types/adapter.d.ts +1 -0
- package/dist/dts/lib/types/index.d.ts +5 -0
- package/dist/dts/lib/types/indicator.d.ts +11 -0
- package/dist/dts/lib/types/ohlcv.d.ts +1 -0
- package/dist/dts/lib/types/pane.d.ts +23 -0
- package/dist/dts/lib/types/runtime.d.ts +11 -0
- package/dist/dts/lib/types/vninvest.d.ts +320 -0
- package/dist/dts/lib/types.d.ts +45 -0
- package/dist/dts/lib/utils/ChartDataUtil.d.ts +26 -0
- package/dist/dts/lib/utils/PureComponent.d.ts +5 -0
- package/dist/dts/lib/utils/accumulatingWindow.d.ts +1 -0
- package/dist/dts/lib/utils/axisPriceFormat.d.ts +6 -0
- package/dist/dts/lib/utils/barWidth.d.ts +14 -0
- package/dist/dts/lib/utils/identity.d.ts +1 -0
- package/dist/dts/lib/utils/index.d.ts +70 -0
- package/dist/dts/lib/utils/logger.d.ts +28 -0
- package/dist/dts/lib/utils/mappedSlidingWindow.d.ts +1 -0
- package/dist/dts/lib/utils/merge.d.ts +6 -0
- package/dist/dts/lib/utils/noop.d.ts +1 -0
- package/dist/dts/lib/utils/rebind.d.ts +1 -0
- package/dist/dts/lib/utils/shallowEqual.d.ts +1 -0
- package/dist/dts/lib/utils/slidingWindow.d.ts +1 -0
- package/dist/dts/lib/utils/storage.d.ts +32 -0
- package/dist/dts/lib/utils/strokeDasharray.d.ts +3 -0
- package/dist/dts/lib/utils/timezoneFormatter.d.ts +14 -0
- package/dist/dts/lib/utils/zipper.d.ts +4 -0
- package/dist/dts/public-api.d.ts +31 -0
- package/dist/dts/widget/BackfillWorkerFlags.d.ts +12 -0
- package/dist/dts/widget/CanaryRollbackHelper.d.ts +95 -0
- package/dist/dts/widget/CanaryRolloutConfig.d.ts +100 -0
- package/dist/dts/widget/DrawingPriceLabelsOverlay.d.ts +20 -0
- package/dist/dts/widget/ForkDrawingsOverlay.d.ts +16 -0
- package/dist/dts/widget/MeasurementOverlay.d.ts +24 -0
- package/dist/dts/widget/VNInvestCharts.d.ts +5 -0
- package/dist/dts/widget/VNInvestChartsProps.d.ts +302 -0
- package/dist/dts/widget/VNInvestMultiCharts.d.ts +8 -0
- package/dist/dts/widget/VNInvestMultiCharts.types.d.ts +130 -0
- package/dist/dts/widget/WidgetEmptyState.d.ts +11 -0
- package/dist/dts/widget/WidgetErrorBoundary.d.ts +26 -0
- package/dist/dts/widget/adapters/ContinuousFuturesStockDataAdapter.d.ts +18 -0
- package/dist/dts/widget/adapters/DataProviderAdapterWrapper.d.ts +14 -0
- package/dist/dts/widget/adapters/MultiSourceDataAdapter.d.ts +24 -0
- package/dist/dts/widget/adapters/VNInvestClient.d.ts +161 -0
- package/dist/dts/widget/adapters/VNInvestDataAdapter.d.ts +77 -0
- package/dist/dts/widget/adapters/VNInvestWebSocketClient.d.ts +79 -0
- package/dist/dts/widget/adapters/barsPagingPolicy.d.ts +18 -0
- package/dist/dts/widget/adapters/corporateEvents.d.ts +13 -0
- package/dist/dts/widget/adapters/index.d.ts +20 -0
- package/dist/dts/widget/adapters/nativeShapes.d.ts +32 -0
- package/dist/dts/widget/adapters/watchlistRealtimeSync.d.ts +16 -0
- package/dist/dts/widget/alerts/DrawingAlertsHost.d.ts +18 -0
- package/dist/dts/widget/alerts/useDrawingAlerts.d.ts +37 -0
- package/dist/dts/widget/canaryBarFiltering.d.ts +35 -0
- package/dist/dts/widget/capabilities/CapabilityResolver.d.ts +71 -0
- package/dist/dts/widget/capabilities/capabilityProbe.d.ts +28 -0
- package/dist/dts/widget/capabilities/useTierGatedFeatures.d.ts +48 -0
- package/dist/dts/widget/components/BottomPanelHost.d.ts +80 -0
- package/dist/dts/widget/components/BottomPanelSplitter.d.ts +15 -0
- package/dist/dts/widget/components/CapabilityGate.d.ts +65 -0
- package/dist/dts/widget/components/ChartDiagOverlay.d.ts +31 -0
- package/dist/dts/widget/components/ConfirmDialog.d.ts +12 -0
- package/dist/dts/widget/components/DowngradeBanner.d.ts +9 -0
- package/dist/dts/widget/components/ForkPaneSeparators.d.ts +11 -0
- package/dist/dts/widget/components/ForkPaneTooltips.d.ts +23 -0
- package/dist/dts/widget/components/ForkXAxisOverlay.d.ts +11 -0
- package/dist/dts/widget/components/ForkYAxisCrosshairLabels.d.ts +9 -0
- package/dist/dts/widget/components/LayoutDesigner.d.ts +26 -0
- package/dist/dts/widget/components/PremiumFeatureGate.d.ts +10 -0
- package/dist/dts/widget/components/ShortcutHelpModal.d.ts +44 -0
- package/dist/dts/widget/components/SystemMenu.d.ts +66 -0
- package/dist/dts/widget/components/Toast.d.ts +20 -0
- package/dist/dts/widget/components/canvas/BarCountdownBadge.d.ts +8 -0
- package/dist/dts/widget/components/canvas/ChartA11ySummary.d.ts +40 -0
- package/dist/dts/widget/components/canvas/ChartStatusLine.d.ts +39 -0
- package/dist/dts/widget/components/canvas/PricePaneHeader.d.ts +24 -0
- package/dist/dts/widget/components/canvas/PriceScaleMenu.d.ts +27 -0
- package/dist/dts/widget/components/canvas/TimeAxisScrollbar.d.ts +18 -0
- package/dist/dts/widget/components/common/Icons.d.ts +67 -0
- package/dist/dts/widget/components/dock/DataWindow.d.ts +7 -0
- package/dist/dts/widget/components/dock/DockUpgradeNudge.d.ts +10 -0
- package/dist/dts/widget/components/dock/RightSidebarDockHost.d.ts +57 -0
- package/dist/dts/widget/components/dock/WatchlistPanel.d.ts +7 -0
- package/dist/dts/widget/components/dock/WorkspaceRightDockSlot.d.ts +46 -0
- package/dist/dts/widget/components/dock/dockAccess.d.ts +20 -0
- package/dist/dts/widget/components/dock/drawingDockContentBuilders.d.ts +29 -0
- package/dist/dts/widget/components/drawing/DrawingDock.d.ts +47 -0
- package/dist/dts/widget/components/drawing/DrawingInspector.d.ts +94 -0
- package/dist/dts/widget/components/drawing/DrawingListPanel.d.ts +62 -0
- package/dist/dts/widget/components/drawing/DrawingSemanticPointLegend.d.ts +14 -0
- package/dist/dts/widget/components/drawing/FloatingDrawingInspector.d.ts +18 -0
- package/dist/dts/widget/components/drawing/IconPickerPanel.d.ts +5 -0
- package/dist/dts/widget/components/drawing/InlineTextEditor.d.ts +20 -0
- package/dist/dts/widget/components/drawing/PatternScanPanel.d.ts +27 -0
- package/dist/dts/widget/components/drawing/TemplateManagerPanel.d.ts +18 -0
- package/dist/dts/widget/components/events/CorporateEventsOverlay.d.ts +23 -0
- package/dist/dts/widget/components/events/EventMarkerIcon.d.ts +6 -0
- package/dist/dts/widget/components/footer/ChartFooter.d.ts +26 -0
- package/dist/dts/widget/components/footer/MultiChartsFooter.d.ts +37 -0
- package/dist/dts/widget/components/footer/TimeframeFooter.d.ts +25 -0
- package/dist/dts/widget/components/footer/useBarCountdown.d.ts +5 -0
- package/dist/dts/widget/components/header/OHLCHeader.d.ts +72 -0
- package/dist/dts/widget/components/layout/DrawingConflictNotice.d.ts +4 -0
- package/dist/dts/widget/components/layout/GridContainer.d.ts +70 -0
- package/dist/dts/widget/components/layout/GridSlotErrorBoundary.d.ts +17 -0
- package/dist/dts/widget/components/layout/Splitter.d.ts +23 -0
- package/dist/dts/widget/components/layout/gridSplitterMath.d.ts +40 -0
- package/dist/dts/widget/components/layout/useGridSplitterDrag.d.ts +18 -0
- package/dist/dts/widget/components/mobile/MobileChartCarousel.d.ts +11 -0
- package/dist/dts/widget/components/mobile/MobileToolbar.d.ts +29 -0
- package/dist/dts/widget/components/overlays/AdvisoryPanel.d.ts +25 -0
- package/dist/dts/widget/components/overlays/TapePanel.d.ts +25 -0
- package/dist/dts/widget/components/overlays/WhalePanel.d.ts +5 -0
- package/dist/dts/widget/components/panels/AdvisoryPanel.d.ts +25 -0
- package/dist/dts/widget/components/panels/PineEditorPanel.d.ts +18 -0
- package/dist/dts/widget/components/panels/StrategyTesterPanel.d.ts +7 -0
- package/dist/dts/widget/components/panels/TapePanel.d.ts +17 -0
- package/dist/dts/widget/components/panels/index.d.ts +8 -0
- package/dist/dts/widget/components/replay/FloatingReplayToolbar.d.ts +24 -0
- package/dist/dts/widget/components/replay/ReplayCutOverlay.d.ts +8 -0
- package/dist/dts/widget/components/search/SymbolCompareModal.d.ts +24 -0
- package/dist/dts/widget/components/search/SymbolSearchModal.d.ts +12 -0
- package/dist/dts/widget/components/search/VNSymbolSearch.d.ts +83 -0
- package/dist/dts/widget/components/settings/AlertsModal.d.ts +74 -0
- package/dist/dts/widget/components/settings/SettingsContext.d.ts +58 -0
- package/dist/dts/widget/components/settings/SettingsModal.d.ts +78 -0
- package/dist/dts/widget/components/settings/SettingsRangeSlider.d.ts +17 -0
- package/dist/dts/widget/components/settings/SnapshotPreviewModal.d.ts +16 -0
- package/dist/dts/widget/components/settings/WorkspaceSettingsContext.d.ts +27 -0
- package/dist/dts/widget/components/settings/helpers/seriesFormatters.d.ts +11 -0
- package/dist/dts/widget/components/settings/model/appearancePayload.d.ts +31 -0
- package/dist/dts/widget/components/settings/model/chartSettingsSchema.d.ts +100 -0
- package/dist/dts/widget/components/settings/model/defaultSettings.d.ts +5 -0
- package/dist/dts/widget/components/settings/model/indicatorShare.d.ts +29 -0
- package/dist/dts/widget/components/settings/storageKeys.d.ts +29 -0
- package/dist/dts/widget/components/settings/tabs/AppearanceSettingsTab.d.ts +5 -0
- package/dist/dts/widget/components/settings/tabs/IndicatorParamsForm.d.ts +12 -0
- package/dist/dts/widget/components/settings/tabs/IndicatorsSettingsTab.d.ts +34 -0
- package/dist/dts/widget/components/settings/tabs/LicensingSettingsTab.d.ts +5 -0
- package/dist/dts/widget/components/settings/tabs/PanesLayoutSettingsTab.d.ts +11 -0
- package/dist/dts/widget/components/settings/tabs/ResetSettingsTab.d.ts +8 -0
- package/dist/dts/widget/components/settings/tabs/ScalesSettingsTab.d.ts +5 -0
- package/dist/dts/widget/components/settings/tabs/StatusLineSettingsTab.d.ts +5 -0
- package/dist/dts/widget/components/settings/tabs/SymbolSettingsTab.d.ts +5 -0
- package/dist/dts/widget/components/settings/tabs/ThemePaletteSettingsTab.d.ts +9 -0
- package/dist/dts/widget/components/settings/tabs/TradingEventsSettingsTab.d.ts +8 -0
- package/dist/dts/widget/components/toolbar/DrawingToolIcon.d.ts +10 -0
- package/dist/dts/widget/components/toolbar/DrawingToolbar.d.ts +33 -0
- package/dist/dts/widget/components/toolbar/FloatingChartBar.d.ts +20 -0
- package/dist/dts/widget/components/toolbar/FloatingFavoritesBar.d.ts +18 -0
- package/dist/dts/widget/components/toolbar/MultiChartTopbar.d.ts +47 -0
- package/dist/dts/widget/components/toolbar/UnifiedDrawingToolbar.d.ts +28 -0
- package/dist/dts/widget/components/trading/PaperTradePanel.d.ts +41 -0
- package/dist/dts/widget/components/workspace/WorkspaceToolbar.d.ts +25 -0
- package/dist/dts/widget/config/toolGroups.d.ts +11 -0
- package/dist/dts/widget/config/toolShortcuts.d.ts +27 -0
- package/dist/dts/widget/constants/comparison.d.ts +1 -0
- package/dist/dts/widget/constants/symbolSearch.d.ts +14 -0
- package/dist/dts/widget/constants/vn30.d.ts +7 -0
- package/dist/dts/widget/context/DataProviderContext.d.ts +7 -0
- package/dist/dts/widget/context/HoverEmitter.d.ts +50 -0
- package/dist/dts/widget/context/SyncContextShare.d.ts +11 -0
- package/dist/dts/widget/context/VNInvestChartsConfigContext.d.ts +24 -0
- package/dist/dts/widget/context/VNInvestChartsContext.d.ts +70 -0
- package/dist/dts/widget/context/VNInvestChartsStateContext.d.ts +50 -0
- package/dist/dts/widget/context/WidgetI18nContext.d.ts +25 -0
- package/dist/dts/widget/context/WorkspaceLiveTradingContext.d.ts +30 -0
- package/dist/dts/widget/context/WorkspacePaperVisibilityContext.d.ts +23 -0
- package/dist/dts/widget/context/WorkspaceReplayTradingContext.d.ts +36 -0
- package/dist/dts/widget/contexts/SaaSFeatureContext.d.ts +23 -0
- package/dist/dts/widget/data/DataEnvelope.d.ts +100 -0
- package/dist/dts/widget/drawingPriceLabelInputs.d.ts +3 -0
- package/dist/dts/widget/export/chartCsv.d.ts +59 -0
- package/dist/dts/widget/forkAnchorReconciliation.d.ts +6 -0
- package/dist/dts/widget/forkInteractionHelpers.d.ts +69 -0
- package/dist/dts/widget/grid/DeviceProfiles.d.ts +49 -0
- package/dist/dts/widget/grid/GridChartRegistry.d.ts +9 -0
- package/dist/dts/widget/grid/MemoryBudgetManager.d.ts +63 -0
- package/dist/dts/widget/grid/PerformanceMonitor.d.ts +70 -0
- package/dist/dts/widget/grid/customPresets.d.ts +42 -0
- package/dist/dts/widget/grid/presets.d.ts +18 -0
- package/dist/dts/widget/grid/types.d.ts +39 -0
- package/dist/dts/widget/history/BackfillDedupContext.d.ts +63 -0
- package/dist/dts/widget/history/RequestCoordinator.d.ts +59 -0
- package/dist/dts/widget/history/SharedBarStoreContext.d.ts +22 -0
- package/dist/dts/widget/history/cache/IndexedDBCacheMatrix.d.ts +16 -0
- package/dist/dts/widget/history/cache/LocalCacheMatrix.d.ts +86 -0
- package/dist/dts/widget/history/cache/index.d.ts +3 -0
- package/dist/dts/widget/history/chunkStore.d.ts +77 -0
- package/dist/dts/widget/history/externalBarsNormalization.d.ts +9 -0
- package/dist/dts/widget/history/externalBarsNormalization.worker.d.ts +1 -0
- package/dist/dts/widget/history/externalBarsNormalizationAsync.d.ts +25 -0
- package/dist/dts/widget/history/historyDataUtils.d.ts +82 -0
- package/dist/dts/widget/history/historyWindowPlanner.d.ts +89 -0
- package/dist/dts/widget/history/inflightController.d.ts +15 -0
- package/dist/dts/widget/history/requestCoalescing.d.ts +10 -0
- package/dist/dts/widget/history/sessionGuards.d.ts +3 -0
- package/dist/dts/widget/history/singleWriterLane.d.ts +4 -0
- package/dist/dts/widget/history/useExternalBarsNormalization.d.ts +5 -0
- package/dist/dts/widget/hooks/ShortcutManager.d.ts +65 -0
- package/dist/dts/widget/hooks/overlays/PaneHeaderWrapper.d.ts +11 -0
- package/dist/dts/widget/hooks/overlays/overlayHelpers.d.ts +60 -0
- package/dist/dts/widget/hooks/overlays/useDrawingDockNode.d.ts +15 -0
- package/dist/dts/widget/hooks/overlays/useLegendChrome.d.ts +36 -0
- package/dist/dts/widget/hooks/overlays/useMultiSelectActions.d.ts +22 -0
- package/dist/dts/widget/hooks/overlays/useSidebarResize.d.ts +13 -0
- package/dist/dts/widget/hooks/resolveEntitlement.d.ts +73 -0
- package/dist/dts/widget/hooks/useBottomPanelBehavior.d.ts +38 -0
- package/dist/dts/widget/hooks/useBottomPanelHeight.d.ts +39 -0
- package/dist/dts/widget/hooks/useCanvasTheme.d.ts +24 -0
- package/dist/dts/widget/hooks/useChartImperativeHandle.d.ts +57 -0
- package/dist/dts/widget/hooks/useClockAdapter.d.ts +11 -0
- package/dist/dts/widget/hooks/useComparisonState.d.ts +29 -0
- package/dist/dts/widget/hooks/useDialogFocus.d.ts +25 -0
- package/dist/dts/widget/hooks/useDrawingToolShortcuts.d.ts +16 -0
- package/dist/dts/widget/hooks/useFeatureGate.d.ts +28 -0
- package/dist/dts/widget/hooks/useFloatingChartBar.d.ts +33 -0
- package/dist/dts/widget/hooks/useForkRuntime.d.ts +155 -0
- package/dist/dts/widget/hooks/useIndicatorsShareApplier.d.ts +1 -0
- package/dist/dts/widget/hooks/useIntersectionObserver.d.ts +49 -0
- package/dist/dts/widget/hooks/useKeyboardAdapter.d.ts +9 -0
- package/dist/dts/widget/hooks/useLayoutHistory.d.ts +8 -0
- package/dist/dts/widget/hooks/useLicenseDiagnostics.d.ts +15 -0
- package/dist/dts/widget/hooks/useMultiChartReplaySync.d.ts +31 -0
- package/dist/dts/widget/hooks/useMultiWorkspacePersistence.d.ts +49 -0
- package/dist/dts/widget/hooks/usePaperTradeConfig.d.ts +27 -0
- package/dist/dts/widget/hooks/usePaperTradeInteraction.d.ts +27 -0
- package/dist/dts/widget/hooks/usePatTierAuthentication.d.ts +42 -0
- package/dist/dts/widget/hooks/usePineScriptRestore.d.ts +23 -0
- package/dist/dts/widget/hooks/usePortalAdapter.d.ts +8 -0
- package/dist/dts/widget/hooks/useRecentSymbols.d.ts +3 -0
- package/dist/dts/widget/hooks/useReplayState.d.ts +28 -0
- package/dist/dts/widget/hooks/useReplayTrading.d.ts +26 -0
- package/dist/dts/widget/hooks/useResizeAdapter.d.ts +13 -0
- package/dist/dts/widget/hooks/useScaleOverlays.d.ts +62 -0
- package/dist/dts/widget/hooks/useScriptPersistence.d.ts +72 -0
- package/dist/dts/widget/hooks/useSymbolSearch.d.ts +30 -0
- package/dist/dts/widget/hooks/useViewportBreakpoint.d.ts +15 -0
- package/dist/dts/widget/hooks/useWidgetCoordinateBridge.d.ts +70 -0
- package/dist/dts/widget/hooks/useWidgetData.d.ts +138 -0
- package/dist/dts/widget/hooks/useWidgetDataBackfill.d.ts +67 -0
- package/dist/dts/widget/hooks/useWidgetDataEnrichment.d.ts +32 -0
- package/dist/dts/widget/hooks/useWidgetDrawings.d.ts +38 -0
- package/dist/dts/widget/hooks/useWidgetForkInteraction.d.ts +68 -0
- package/dist/dts/widget/hooks/useWidgetInteractionActions.d.ts +36 -0
- package/dist/dts/widget/hooks/useWidgetOverlays.d.ts +190 -0
- package/dist/dts/widget/hooks/useWidgetRuntime.d.ts +20 -0
- package/dist/dts/widget/hooks/useWidgetSettings.d.ts +244 -0
- package/dist/dts/widget/hooks/useWidgetWorkspaceIO.d.ts +24 -0
- package/dist/dts/widget/hooks/useWorkspaceDockPanels.d.ts +11 -0
- package/dist/dts/widget/hooks/useWorkspaceLiveTrading.d.ts +28 -0
- package/dist/dts/widget/hooks/useWorkspaceReplayTrading.d.ts +22 -0
- package/dist/dts/widget/i18n/a11y.messages.en.d.ts +8 -0
- package/dist/dts/widget/i18n/a11y.messages.vi.d.ts +3 -0
- package/dist/dts/widget/i18n/capability.messages.en.d.ts +7 -0
- package/dist/dts/widget/i18n/capability.messages.vi.d.ts +3 -0
- package/dist/dts/widget/i18n/dock.messages.en.d.ts +2 -0
- package/dist/dts/widget/i18n/dock.messages.vi.d.ts +2 -0
- package/dist/dts/widget/i18n/messages.en.d.ts +2 -0
- package/dist/dts/widget/i18n/messages.licensing.d.ts +48 -0
- package/dist/dts/widget/i18n/messages.vi.d.ts +2 -0
- package/dist/dts/widget/i18n/trading.messages.en.d.ts +2 -0
- package/dist/dts/widget/i18n/trading.messages.vi.d.ts +2 -0
- package/dist/dts/widget/i18n/types.d.ts +3 -0
- package/dist/dts/widget/iframe/builtInAdapters.d.ts +63 -0
- package/dist/dts/widget/iframe/host-entry.d.ts +11 -0
- package/dist/dts/widget/iframe/hostSDK.d.ts +151 -0
- package/dist/dts/widget/iframe/iframeBridge.d.ts +165 -0
- package/dist/dts/widget/iframe/iframeEntry.d.ts +52 -0
- package/dist/dts/widget/iframe/iframeFrame.d.ts +15 -0
- package/dist/dts/widget/iframe/iframeQuotes.d.ts +20 -0
- package/dist/dts/widget/iframe/messageProtocol.d.ts +545 -0
- package/dist/dts/widget/iframe/quoteHub.d.ts +20 -0
- package/dist/dts/widget/iframe/useVNInvestChartsHost.d.ts +8 -0
- package/dist/dts/widget/iife-entry.d.ts +61 -0
- package/dist/dts/widget/iifeWidgetInstance.d.ts +60 -0
- package/dist/dts/widget/index.d.ts +56 -0
- package/dist/dts/widget/multiChartDefaults.d.ts +18 -0
- package/dist/dts/widget/paneInteractionUtils.d.ts +25 -0
- package/dist/dts/widget/patterns/autoPatternScan.d.ts +77 -0
- package/dist/dts/widget/patterns/patternDrawingFactory.d.ts +87 -0
- package/dist/dts/widget/plugin/ProPluginRegistry.d.ts +40 -0
- package/dist/dts/widget/runtime/ChartScaleAdapter.d.ts +73 -0
- package/dist/dts/widget/runtime/ChartSerializer.d.ts +12 -0
- package/dist/dts/widget/runtime/ForkRuntimeAdapter.d.ts +19 -0
- package/dist/dts/widget/runtime/IRuntimeEngine.d.ts +40 -0
- package/dist/dts/widget/runtime/WorkspaceSerializer.d.ts +31 -0
- package/dist/dts/widget/runtimePolicy.d.ts +36 -0
- package/dist/dts/widget/styles/injectStyles.d.ts +9 -0
- package/dist/dts/widget/theme/ThemeConfig.d.ts +21 -0
- package/dist/dts/widget/theme/applyTheme.d.ts +3 -0
- package/dist/dts/widget/trading/chart/DraggableOrderHandles.d.ts +15 -0
- package/dist/dts/widget/trading/chart/InteractivePositionOverlay.d.ts +19 -0
- package/dist/dts/widget/trading/chart/PendingOrderOverlay.d.ts +11 -0
- package/dist/dts/widget/trading/chart/QuickTradingHeader.d.ts +20 -0
- package/dist/dts/widget/trading/chart/TradingChartSurface.d.ts +8 -0
- package/dist/dts/widget/trading/chart/TradingOverlaysHost.d.ts +28 -0
- package/dist/dts/widget/trading/chart/priceTicks.d.ts +1 -0
- package/dist/dts/widget/trading/chart/useFloatingDrag.d.ts +40 -0
- package/dist/dts/widget/trading/chart/useTradingHotkeys.d.ts +21 -0
- package/dist/dts/widget/trading/config/paperRuntimeConfig.d.ts +53 -0
- package/dist/dts/widget/trading/context/PaperPanelRegistry.d.ts +45 -0
- package/dist/dts/widget/trading/context/TradingContext.d.ts +80 -0
- package/dist/dts/widget/trading/context/WorkspaceTradingSync.d.ts +24 -0
- package/dist/dts/widget/trading/hooks/usePaperRuntimeConfig.d.ts +36 -0
- package/dist/dts/widget/trading/index.d.ts +5 -0
- package/dist/dts/widget/trading/panel/AccountSummaryTab.d.ts +7 -0
- package/dist/dts/widget/trading/panel/ActiveChartPaperPanel.d.ts +26 -0
- package/dist/dts/widget/trading/panel/ConnectedTradingPanel.d.ts +3 -0
- package/dist/dts/widget/trading/panel/HistoryTab.d.ts +5 -0
- package/dist/dts/widget/trading/panel/MarketFallbackBanner.d.ts +4 -0
- package/dist/dts/widget/trading/panel/OrdersTab.d.ts +8 -0
- package/dist/dts/widget/trading/panel/PaperCapitalDialog.d.ts +8 -0
- package/dist/dts/widget/trading/panel/PaperSettingsModal.d.ts +17 -0
- package/dist/dts/widget/trading/panel/PositionsTab.d.ts +15 -0
- package/dist/dts/widget/trading/panel/TradeHistoryTab.d.ts +5 -0
- package/dist/dts/widget/trading/panel/TradingBottomPanel.d.ts +36 -0
- package/dist/dts/widget/trading/panel/TradingLogTab.d.ts +8 -0
- package/dist/dts/widget/trading/panel/TradingPanelHeader.d.ts +17 -0
- package/dist/dts/widget/trading/panel/csvExport.d.ts +18 -0
- package/dist/dts/widget/trading/ticket/ConnectedTradingDockPanel.d.ts +5 -0
- package/dist/dts/widget/trading/ticket/OrderTicketForm.d.ts +31 -0
- package/dist/dts/widget/trading/ticket/OrderTicketModal.d.ts +29 -0
- package/dist/dts/widget/trading/ticket/RegistryTradingDockPanel.d.ts +9 -0
- package/dist/dts/widget/trading/ticket/RiskCalculatorView.d.ts +9 -0
- package/dist/dts/widget/trading/ticket/TradingDockPanel.d.ts +36 -0
- package/dist/dts/widget/trading/ticket/orderTicketModel.d.ts +49 -0
- package/dist/dts/widget/trading/visibility/paperVisibility.d.ts +38 -0
- package/dist/dts/widget/types/dataProvider.d.ts +8 -0
- package/dist/dts/widget/types/fullChartHandle.d.ts +25 -0
- package/dist/dts/widget/types/saas.d.ts +83 -0
- package/dist/dts/widget/types/symbolSearch.d.ts +9 -0
- package/dist/dts/widget/types/watchlist.d.ts +26 -0
- package/dist/dts/widget/utils/axisHit.d.ts +16 -0
- package/dist/dts/widget/utils/chartRange.d.ts +12 -0
- package/dist/dts/widget/utils/chartTypeOptions.d.ts +38 -0
- package/dist/dts/widget/utils/clickOutside.d.ts +1 -0
- package/dist/dts/widget/utils/coordinateBridge.d.ts +31 -0
- package/dist/dts/widget/utils/crosshairSync.d.ts +50 -0
- package/dist/dts/widget/utils/drawingSync.d.ts +198 -0
- package/dist/dts/widget/utils/enrichedHash.d.ts +15 -0
- package/dist/dts/widget/utils/headerSync.d.ts +12 -0
- package/dist/dts/widget/utils/numberFormat.d.ts +13 -0
- package/dist/dts/widget/utils/paperTradeAdapters.d.ts +11 -0
- package/dist/dts/widget/utils/pineSeriesData.d.ts +71 -0
- package/dist/dts/widget/utils/rangeSync.d.ts +29 -0
- package/dist/dts/widget/utils/telemetry.d.ts +19 -0
- package/dist/dts/widget/utils/widgetEquality.d.ts +57 -0
- package/dist/dts/widget/utils/widgetErrors.d.ts +29 -0
- package/dist/dts/widget/utils/widgetHelpers.d.ts +395 -0
- package/dist/dts/widget/utils/xAxisTickFormatter.d.ts +33 -0
- package/dist/dts/widget/visibleRangeBridge.d.ts +28 -0
- package/dist/dts/widget/visibleRangeDiagnostics.d.ts +10 -0
- package/dist/dts/widget/visibleRangePolicies.d.ts +6 -0
- package/dist/dts/widget/workspace/WorkspaceManager.d.ts +23 -0
- package/dist/dts/widget/workspace/WorkspaceStore.d.ts +85 -0
- package/dist/dts/widget/workspace/types.d.ts +21 -0
- package/dist/externalBarsNormalization.worker.js +108 -0
- package/dist/iframe/index.html +63 -0
- package/dist/iframe/injected.css +6456 -0
- package/dist/iframe/vninvestchart.iframe.css +2 -0
- package/dist/iframe/vninvestchart.iframe.js +945 -0
- package/dist/iframe-host/host-entry.cjs +687 -0
- package/dist/iframe-host/host-entry.d.mts +818 -0
- package/dist/iframe-host/host-entry.d.ts +818 -0
- package/dist/iframe-host/host-entry.js +680 -0
- package/dist/index.cjs +7253 -0
- package/dist/index.css +3390 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +6461 -0
- package/dist/injected.css +6456 -0
- package/dist/rollAlgorithms-2P2ZKKHO.js +2 -0
- package/dist/types/runtime.cjs +8 -0
- package/dist/types/runtime.d.mts +92 -0
- package/dist/types/runtime.d.ts +92 -0
- package/dist/types/runtime.js +5 -0
- package/dist/types/runtime.umd.js +14 -0
- package/dist/vninvestchart.iife.css +2 -0
- package/dist/vninvestchart.iife.js +945 -0
- package/package.json +225 -5
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CanonicalFetchResult, DataAdapter, GetBarsParams, GetBarsResult, KLineBar } from "./DataAdapter";
|
|
2
|
+
import type { SourceSemanticsDescriptor } from "@vninvestcharts/engine-core";
|
|
3
|
+
/**
|
|
4
|
+
* In-memory adapter backed by pre-loaded bars (e.g. offline CSV data).
|
|
5
|
+
* Useful for testing and offline demo mode.
|
|
6
|
+
*/
|
|
7
|
+
export declare class LocalCacheAdapter implements DataAdapter {
|
|
8
|
+
readonly name = "local";
|
|
9
|
+
private readonly store;
|
|
10
|
+
getSourceSemantics(): SourceSemanticsDescriptor;
|
|
11
|
+
/**
|
|
12
|
+
* Pre-load bars for a given symbol/interval pair.
|
|
13
|
+
* Bars are sorted ascending by timestamp after loading.
|
|
14
|
+
*/
|
|
15
|
+
loadBars(symbol: string, interval: string, bars: KLineBar[]): void;
|
|
16
|
+
getBars(params: GetBarsParams): Promise<GetBarsResult>;
|
|
17
|
+
getBarsCanonical(params: GetBarsParams): Promise<CanonicalFetchResult>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { OrderbookSnapshot, StockDataAdapter, SymbolInfo, Timeframe, Trade, Unsubscribe } from "../types/adapter";
|
|
2
|
+
import type { OHLCVBar } from "../types/ohlcv";
|
|
3
|
+
export interface MockAdapterOptions {
|
|
4
|
+
symbols?: readonly SymbolInfo[];
|
|
5
|
+
bars?: readonly OHLCVBar[];
|
|
6
|
+
intervalMs?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class MockAdapter implements StockDataAdapter {
|
|
9
|
+
private readonly bars;
|
|
10
|
+
private readonly symbols;
|
|
11
|
+
private readonly intervalMs;
|
|
12
|
+
constructor(options?: MockAdapterOptions);
|
|
13
|
+
fetchBars(symbol: string, timeframe: Timeframe, from: Date, to: Date): Promise<readonly OHLCVBar[]>;
|
|
14
|
+
fetchMoreBars(symbol: string, timeframe: Timeframe, before: Date, limit?: number): Promise<readonly OHLCVBar[]>;
|
|
15
|
+
fetchBarsInRange(symbol: string, timeframe: Timeframe, from: Date, to: Date): Promise<readonly OHLCVBar[]>;
|
|
16
|
+
fetchBarsBefore(symbol: string, timeframe: Timeframe, before: Date, limit?: number): Promise<readonly OHLCVBar[]>;
|
|
17
|
+
subscribeToBar(symbol: string, timeframe: Timeframe, onBar: (bar: OHLCVBar) => void): Unsubscribe;
|
|
18
|
+
subscribeToTrades(symbol: string, onTrade: (trade: Trade) => void): Unsubscribe;
|
|
19
|
+
subscribeToOrderbook(symbol: string, onUpdate: (snapshot: OrderbookSnapshot) => void): Unsubscribe;
|
|
20
|
+
searchSymbols(query: string): Promise<readonly SymbolInfo[]>;
|
|
21
|
+
}
|
|
22
|
+
export declare function createMockBars(count?: number): OHLCVBar[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseAdapter } from "./BaseAdapter";
|
|
2
|
+
import type { OHLCVBar } from "../types/ohlcv";
|
|
3
|
+
import type { OrderbookSnapshot, SymbolInfo, Timeframe, Trade, Unsubscribe } from "../types/adapter";
|
|
4
|
+
/**
|
|
5
|
+
* RESTAdapter handles standard REST API request logic for OHLCV data.
|
|
6
|
+
*/
|
|
7
|
+
export declare class RESTAdapter extends BaseAdapter {
|
|
8
|
+
private readonly headers;
|
|
9
|
+
constructor(baseUrl: string, authHeader?: string, cacheTtlMs?: number);
|
|
10
|
+
fetchBarsInRange(symbol: string, timeframe: Timeframe, from: Date, to: Date): Promise<readonly OHLCVBar[]>;
|
|
11
|
+
fetchBarsBefore(symbol: string, timeframe: Timeframe, before: Date, limit?: number): Promise<readonly OHLCVBar[]>;
|
|
12
|
+
subscribeToBar(symbol: string, timeframe: Timeframe, onBar: (bar: OHLCVBar) => void): Unsubscribe;
|
|
13
|
+
subscribeToTrades(symbol: string, onTrade: (trade: Trade) => void): Unsubscribe;
|
|
14
|
+
subscribeToOrderbook(symbol: string, onUpdate: (snapshot: OrderbookSnapshot) => void): Unsubscribe;
|
|
15
|
+
searchSymbols(query: string): Promise<readonly SymbolInfo[]>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { OrderbookLevel, OrderbookSnapshot, StockDataAdapter, SymbolInfo, Timeframe, Trade, Unsubscribe, } from "../types/adapter";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { StockDataAdapter, Unsubscribe, Timeframe, Trade, OrderbookSnapshot, SymbolInfo } from "../types/adapter";
|
|
2
|
+
import type { OHLCVBar } from "../types/ohlcv";
|
|
3
|
+
import type { SourceSemanticsDescriptor } from "@vninvestcharts/engine-core";
|
|
4
|
+
export interface UDFDataAdapterConfig {
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
wsUrl?: string;
|
|
7
|
+
pollIntervalMs?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class UDFDataAdapter implements StockDataAdapter {
|
|
10
|
+
private readonly baseUrl;
|
|
11
|
+
private readonly wsUrl;
|
|
12
|
+
private readonly pollIntervalMs;
|
|
13
|
+
private ws;
|
|
14
|
+
private wsConnecting;
|
|
15
|
+
private readonly activeSubscriptions;
|
|
16
|
+
constructor(config: UDFDataAdapterConfig);
|
|
17
|
+
getSourceSemantics(): SourceSemanticsDescriptor;
|
|
18
|
+
private mapTimeframe;
|
|
19
|
+
private parseHistory;
|
|
20
|
+
fetchBarsInRange(symbol: string, timeframe: Timeframe, from: Date, to: Date): Promise<readonly OHLCVBar[]>;
|
|
21
|
+
fetchBarsBefore(symbol: string, timeframe: Timeframe, before: Date, limit?: number): Promise<readonly OHLCVBar[]>;
|
|
22
|
+
subscribeToBar(symbol: string, timeframe: Timeframe, onBar: (bar: OHLCVBar) => void): Unsubscribe;
|
|
23
|
+
private startHttpPolling;
|
|
24
|
+
private connectWebSocket;
|
|
25
|
+
private sendWsMessage;
|
|
26
|
+
subscribeToTrades(_symbol: string, _onTrade: (trade: Trade) => void): Unsubscribe;
|
|
27
|
+
subscribeToOrderbook(_symbol: string, _onUpdate: (snapshot: OrderbookSnapshot) => void): Unsubscribe;
|
|
28
|
+
searchSymbols(query: string): Promise<readonly SymbolInfo[]>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CanonicalFetchResult, DataAdapter, GetBarsParams, GetBarsResult } from "./DataAdapter";
|
|
2
|
+
import type { SourceSemanticsDescriptor } from "@vninvestcharts/engine-core";
|
|
3
|
+
export declare class VNStocksAdapter implements DataAdapter {
|
|
4
|
+
readonly name = "vnstocks";
|
|
5
|
+
getSourceSemantics(): SourceSemanticsDescriptor;
|
|
6
|
+
getBars(params: GetBarsParams): Promise<GetBarsResult>;
|
|
7
|
+
getBarsCanonical(params: GetBarsParams): Promise<CanonicalFetchResult>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { BaseAdapter } from "./BaseAdapter";
|
|
2
|
+
import type { OHLCVBar } from "../types/ohlcv";
|
|
3
|
+
import type { OrderbookSnapshot, SymbolInfo, Timeframe, Trade, Unsubscribe } from "../types/adapter";
|
|
4
|
+
/**
|
|
5
|
+
* WSAdapter manages a persistent WebSocket connection for real-time market data streaming
|
|
6
|
+
* with automated exponential backoff reconnection.
|
|
7
|
+
*/
|
|
8
|
+
export declare class WSAdapter extends BaseAdapter {
|
|
9
|
+
private ws;
|
|
10
|
+
private isConnecting;
|
|
11
|
+
private reconnectAttempts;
|
|
12
|
+
private readonly baseDelayMs;
|
|
13
|
+
private readonly maxDelayMs;
|
|
14
|
+
private readonly wsUrl;
|
|
15
|
+
private readonly barSubscriptions;
|
|
16
|
+
private readonly tradeSubscriptions;
|
|
17
|
+
private readonly orderbookSubscriptions;
|
|
18
|
+
constructor(baseUrl: string, wsPath?: string, cacheTtlMs?: number);
|
|
19
|
+
private connect;
|
|
20
|
+
private scheduleReconnect;
|
|
21
|
+
private resubscribeAll;
|
|
22
|
+
private sendWsMessage;
|
|
23
|
+
private handleMessage;
|
|
24
|
+
fetchBarsInRange(symbol: string, timeframe: Timeframe, from: Date, to: Date): Promise<readonly OHLCVBar[]>;
|
|
25
|
+
fetchBarsBefore(symbol: string, timeframe: Timeframe, before: Date, limit?: number): Promise<readonly OHLCVBar[]>;
|
|
26
|
+
subscribeToBar(symbol: string, timeframe: Timeframe, onBar: (bar: OHLCVBar) => void): Unsubscribe;
|
|
27
|
+
subscribeToTrades(symbol: string, onTrade: (trade: Trade) => void): Unsubscribe;
|
|
28
|
+
subscribeToOrderbook(symbol: string, onUpdate: (snapshot: OrderbookSnapshot) => void): Unsubscribe;
|
|
29
|
+
searchSymbols(query: string): Promise<readonly SymbolInfo[]>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* W-18 - a fixture with a REAL gap, so lane-switch parity can be proved at all.
|
|
3
|
+
*
|
|
4
|
+
* ## Why this file exists
|
|
5
|
+
*
|
|
6
|
+
* G0.4 was FAILED and the recorded reason was "the demo uses LIVE, continuous data so
|
|
7
|
+
* it cannot demonstrate a lane switch". That diagnosis was right, and here is the
|
|
8
|
+
* measurement behind it.
|
|
9
|
+
*
|
|
10
|
+
* `MockAdapter.createSampleBars` emitted:
|
|
11
|
+
*
|
|
12
|
+
* date: new Date(Date.UTC(2024, 0, index + 1))
|
|
13
|
+
*
|
|
14
|
+
* Consecutive days, weekends included, no exchange calendar, no gap.
|
|
15
|
+
*
|
|
16
|
+
* The discontinuous time scale only diverges between the legacy and fork lanes AT A
|
|
17
|
+
* GAP. With continuous data there is literally nothing for the two runtimes to
|
|
18
|
+
* disagree about, so no screenshot could ever have proved a lane switch. The evidence
|
|
19
|
+
* gap was never a tooling problem - the input could not express the thing being tested.
|
|
20
|
+
*
|
|
21
|
+
* ## What this fixture guarantees
|
|
22
|
+
*
|
|
23
|
+
* `buildGapFixture` produces a series that crosses a weekend AND a national holiday,
|
|
24
|
+
* so the whitespace detector has something real to find. `assertHasGap` is the gate:
|
|
25
|
+
* if a future edit accidentally makes the fixture continuous again, the parity work
|
|
26
|
+
* that depends on it fails loudly instead of producing screenshots that prove
|
|
27
|
+
* nothing.
|
|
28
|
+
*
|
|
29
|
+
* ## Why the fixture is a separate module rather than a MockAdapter option
|
|
30
|
+
*
|
|
31
|
+
* Because it is test and documentation input, not product behaviour. MockAdapter
|
|
32
|
+
* stays the continuous synthetic series the demo and unit tests use; a demo that
|
|
33
|
+
* suddenly had holes in it would change what every other test observes. The fixture is
|
|
34
|
+
* opt-in, and the demo can adopt it explicitly once a lane switch is actually wired to
|
|
35
|
+
* a UI control.
|
|
36
|
+
*/
|
|
37
|
+
import type { OHLCVBar } from "../types/ohlcv";
|
|
38
|
+
export interface GapFixtureOptions {
|
|
39
|
+
/** Trading days to emit, counting only sessions that actually trade. */
|
|
40
|
+
tradingDays?: number;
|
|
41
|
+
/** Starting price; a gentle drift keeps the series visually plausible. */
|
|
42
|
+
startPrice?: number;
|
|
43
|
+
}
|
|
44
|
+
export declare const FIXTURE_INCLUDE_HOLIDAYS = false;
|
|
45
|
+
/**
|
|
46
|
+
* Build a bar series that contains real gaps.
|
|
47
|
+
*
|
|
48
|
+
* Trading sessions are taken from the repository's own exchange calendar, so the
|
|
49
|
+
* fixture and `ExchangeCalendar` cannot drift apart: if the calendar stops or starts
|
|
50
|
+
* treating a date as a session, the fixture follows.
|
|
51
|
+
*/
|
|
52
|
+
export declare function buildGapFixture(options?: GapFixtureOptions): OHLCVBar[];
|
|
53
|
+
/** Every interval between consecutive bars, in ms. */
|
|
54
|
+
export declare function gapsOf(bars: readonly OHLCVBar[]): number[];
|
|
55
|
+
/** Distinct intervals, ascending. One value means the series is continuous. */
|
|
56
|
+
export declare function distinctGaps(bars: readonly OHLCVBar[]): number[];
|
|
57
|
+
/**
|
|
58
|
+
* The gate a fixture must pass before any lane-switch screenshot is worth taking.
|
|
59
|
+
*
|
|
60
|
+
* Returns the gaps it found. Throws when the series is continuous, because that is
|
|
61
|
+
* the exact condition that made G0.3/G0.4 produce no evidence - and it fails silently,
|
|
62
|
+
* the worst way to fail.
|
|
63
|
+
*/
|
|
64
|
+
export declare function assertHasGap(bars: readonly OHLCVBar[]): number[];
|
|
65
|
+
/**
|
|
66
|
+
* True when the repository's own calendar considers the bar's day a session.
|
|
67
|
+
*
|
|
68
|
+
* Exported so a test can cross-check the fixture against the calendar instead of
|
|
69
|
+
* trusting two copies of the same rule.
|
|
70
|
+
*/
|
|
71
|
+
export declare function fixtureMatchesExchangeCalendar(bars: readonly OHLCVBar[]): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type { StockDataAdapter, Timeframe, Trade, OrderbookSnapshot, SymbolInfo, Unsubscribe } from "./StockDataAdapter";
|
|
2
|
+
export { BaseAdapter } from "./BaseAdapter";
|
|
3
|
+
export { DjangoVnstockAdapter, createRestAdapter } from "./DjangoVnstockAdapter";
|
|
4
|
+
export { MockAdapter, createMockBars } from "./MockAdapter";
|
|
5
|
+
export type { CoverageMode, SessionModel, FinalityMode, GapReason, CoverageFragment, SourceSemanticsDescriptor, } from "@vninvestcharts/engine-core";
|
|
6
|
+
export type { DataAdapter, KLineBar, GetBarsType, GetBarsParams, GetBarsResult, CanonicalFetchResult, } from "./DataAdapter";
|
|
7
|
+
export { BinanceAdapter, binanceAdapter } from "./BinanceAdapter";
|
|
8
|
+
export { LocalCacheAdapter } from "./LocalCacheAdapter";
|
|
9
|
+
export { VNStocksAdapter } from "./VNStocksAdapter";
|
|
10
|
+
export { UDFDataAdapter } from "./UDFDataAdapter";
|
|
11
|
+
export type { UDFDataAdapterConfig } from "./UDFDataAdapter";
|
|
12
|
+
export { CSVAdapter } from "./CSVAdapter";
|
|
13
|
+
export { RESTAdapter } from "./RESTAdapter";
|
|
14
|
+
export { WSAdapter } from "./WSAdapter";
|
|
15
|
+
export { DBAdapter } from "./DBAdapter";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roll Algorithms - Pure TypeScript Implementation
|
|
3
|
+
*
|
|
4
|
+
* Shared between client and server for continuous futures roll adjustment.
|
|
5
|
+
* Supports three methods: Ratio, Panama (Cumulative Difference), Backward Ratio.
|
|
6
|
+
*
|
|
7
|
+
* These are pure functions with no side effects - fully testable.
|
|
8
|
+
*/
|
|
9
|
+
import type { KLineBar } from "./DataAdapter";
|
|
10
|
+
import type { RollMethod, RollPoint, FuturesContract } from "./ContinuousContractTypes";
|
|
11
|
+
/** Result of roll adjustment computation */
|
|
12
|
+
export interface RollAdjustmentResult {
|
|
13
|
+
/** Adjusted bars */
|
|
14
|
+
bars: KLineBar[];
|
|
15
|
+
/** Roll points with adjustment details */
|
|
16
|
+
rollPoints: RollPoint[];
|
|
17
|
+
/** Total cumulative adjustment (for Panama) */
|
|
18
|
+
totalCumulativeAdjustment: number;
|
|
19
|
+
/** Warnings during computation */
|
|
20
|
+
warnings: string[];
|
|
21
|
+
}
|
|
22
|
+
/** Input for roll computation */
|
|
23
|
+
export interface RollComputationInput {
|
|
24
|
+
/** Contracts in chronological order */
|
|
25
|
+
contracts: FuturesContract[];
|
|
26
|
+
/** Raw bars for each contract (keyed by contract symbol) */
|
|
27
|
+
contractBars: Map<string, KLineBar[]>;
|
|
28
|
+
/** Roll configuration */
|
|
29
|
+
config: {
|
|
30
|
+
rollMethod: RollMethod;
|
|
31
|
+
adjustVolumes: boolean;
|
|
32
|
+
};
|
|
33
|
+
/** Requested time range */
|
|
34
|
+
from: number;
|
|
35
|
+
to: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Compute roll adjustments for a chain of futures contracts
|
|
39
|
+
*
|
|
40
|
+
* This is the core algorithm - pure, deterministic, and fully testable.
|
|
41
|
+
*/
|
|
42
|
+
export declare function computeRollAdjustment(input: RollComputationInput): RollAdjustmentResult;
|
|
43
|
+
/**
|
|
44
|
+
* Compute roll adjustment for a single roll point (for testing)
|
|
45
|
+
*/
|
|
46
|
+
export declare function computeSingleRollAdjustment(fromPrice: number, toPrice: number, method: RollMethod): {
|
|
47
|
+
factor: number;
|
|
48
|
+
offset: number;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Verify no price gaps at roll dates
|
|
52
|
+
* Returns true if all roll transitions are smooth (gap < threshold)
|
|
53
|
+
*/
|
|
54
|
+
export declare function verifyNoPriceGaps(rollPoints: RollPoint[], thresholdPercent?: number): {
|
|
55
|
+
passed: boolean;
|
|
56
|
+
gaps: Array<{
|
|
57
|
+
rollPoint: RollPoint;
|
|
58
|
+
gapPercent: number;
|
|
59
|
+
}>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Generate synthetic contract chain for testing
|
|
63
|
+
*/
|
|
64
|
+
export declare function generateTestContractChain(rootSymbol: string, count: number, startDate: number, intervalDays?: number): FuturesContract[];
|
|
65
|
+
/**
|
|
66
|
+
* Generate test bars with known roll gap for verification
|
|
67
|
+
*/
|
|
68
|
+
export declare function generateTestBarsWithRollGap(contracts: FuturesContract[], rollMethod: RollMethod, gapPercent?: number): Map<string, KLineBar[]>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { AlertCondition } from "./types";
|
|
2
|
+
import type { SeriesConfig, PaneDescriptor } from "../core/types/pane-descriptor";
|
|
3
|
+
/**
|
|
4
|
+
* Every series an alert is allowed to reference: those that HAVE a canonical indicator
|
|
5
|
+
* key, i.e. those the evaluator can actually read out of `indicatorValues`.
|
|
6
|
+
*
|
|
7
|
+
* This predicate replaces an eight-entry type blacklist that used to live in
|
|
8
|
+
* `VNInvestCharts.tsx`. That list was a hand-maintained duplicate of what
|
|
9
|
+
* `buildIndicatorSeriesKey` already answers, and it had drifted from the thing it was
|
|
10
|
+
* mirroring: it was applied to `settings.visiblePanes` AND filtered by type, so the
|
|
11
|
+
* demo's six indicators — which live in `momentum`, `orderflow` and `strength`, all
|
|
12
|
+
* three `visible: false` — reduced to an EMPTY list. Every indicator-sourced alert then
|
|
13
|
+
* persisted an instance id nothing could resolve, and no E2E had ever exercised that
|
|
14
|
+
* branch. Measured, not inferred: the resolver logged `seriesCount: 0` on every tick.
|
|
15
|
+
*
|
|
16
|
+
* Spanning every pane is deliberate. A hidden pane is a display concern, not an
|
|
17
|
+
* evaluation one — measured in the browser, `indicatorValues` still carries
|
|
18
|
+
* `RSI:period=14`, `MACD:fast=12:slow=26:signal=9`, `Whale:threshold=50000`, `CVDApprox`
|
|
19
|
+
* and `StrengthElder` while those panes are collapsed.
|
|
20
|
+
*
|
|
21
|
+
* "Has a canonical key" needs no maintenance, unlike the blacklist it replaces: a new
|
|
22
|
+
* chart type or indicator is classified correctly by `buildIndicatorSeriesKey` alone.
|
|
23
|
+
*
|
|
24
|
+
* Module-level and exported so it can be tested directly. It is the whole fix, and a
|
|
25
|
+
* predicate buried in a component's `useMemo` is untestable — which is how the empty
|
|
26
|
+
* list survived three audit rounds.
|
|
27
|
+
*/
|
|
28
|
+
export declare function selectAlertableSeries(panes: readonly PaneDescriptor[]): SeriesConfig[];
|
|
29
|
+
export declare class AlertManager {
|
|
30
|
+
private alerts;
|
|
31
|
+
private onAlertTriggeredCallbacks;
|
|
32
|
+
/** (alert, side, key) triples already reported by `reportUnreadableSubKey`, so a
|
|
33
|
+
* permanently dead alert reports once instead of once per bar for the life of the
|
|
34
|
+
* chart. In memory only: a reload re-reports, which is the right behaviour for a
|
|
35
|
+
* diagnostic rather than a stored flag the user cannot see. */
|
|
36
|
+
private reportedUnreadable;
|
|
37
|
+
constructor();
|
|
38
|
+
getAlerts(): AlertCondition[];
|
|
39
|
+
addAlert(alert: AlertCondition): void;
|
|
40
|
+
removeAlert(id: string): void;
|
|
41
|
+
toggleAlert(id: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Register a listener. Returns a DISPOSER, and callers are expected to call it.
|
|
44
|
+
*
|
|
45
|
+
* This used to be push-only, so a React effect that subscribed without
|
|
46
|
+
* unsubscribing accumulated one listener per mount. The demo wraps the widget in
|
|
47
|
+
* `StrictMode` (`src/demo/index.tsx:37`), which mounts effects twice on the same
|
|
48
|
+
* instance, so ONE alert firing invoked every listener twice — measured in the
|
|
49
|
+
* browser as `DIALOG COUNT: 2` with two sounds. `indexOf` + `splice` (not
|
|
50
|
+
* `filter`) keeps repeated subscribe/unsubscribe cycles stable, and `indexOf`
|
|
51
|
+
* returning -1 makes a double-dispose a no-op rather than a removal of a
|
|
52
|
+
* different listener.
|
|
53
|
+
*/
|
|
54
|
+
onAlertTriggered(cb: (alert: AlertCondition) => void): () => void;
|
|
55
|
+
checkAlerts(symbol: string, timeframe: string, current: any, previous: any, activeSeries: SeriesConfig[]): void;
|
|
56
|
+
/**
|
|
57
|
+
* Rewrite an alert's indicator instance ids into the canonical keys that
|
|
58
|
+
* `indicatorValues` is keyed by.
|
|
59
|
+
*
|
|
60
|
+
* Both failure branches below used to be silent, which is why this class of bug
|
|
61
|
+
* survived: an alert whose id could not be resolved kept the raw uuid, evaluated to
|
|
62
|
+
* `null`, never fired, and stayed in the list labelled "Active" with no trace of
|
|
63
|
+
* why. The two ids that reached here — a uuid belonging to a series the caller did
|
|
64
|
+
* not pass, and a uuid whose series has no canonical key at all — are both real
|
|
65
|
+
* states, so they are reported rather than swallowed.
|
|
66
|
+
*
|
|
67
|
+
* Measured on the demo layout, `strength/StrengthRelative` resolves to
|
|
68
|
+
* `StrengthRelative:compareSymbol=VNINDEX:period=14`, which no bar ever carries, so
|
|
69
|
+
* it hits the second branch. That is correct reporting of a genuine defect, not a
|
|
70
|
+
* new failure introduced here.
|
|
71
|
+
*/
|
|
72
|
+
/**
|
|
73
|
+
* Report an indicator alert whose SUB-KEY cannot be read, which `resolveCanonicalKeys`
|
|
74
|
+
* cannot see and `AlertEvaluator` cannot express.
|
|
75
|
+
*
|
|
76
|
+
* An indicator alert has three distinct failure modes and only two were reported. The
|
|
77
|
+
* instance id may be unresolvable (C2), or its series may have no canonical key (C3) —
|
|
78
|
+
* both visible in `resolveCanonicalKeys`. But an alert can resolve perfectly and still
|
|
79
|
+
* be dead: the canonical key IS present in `indicatorValues`, its value IS an object,
|
|
80
|
+
* and the requested member is not on it — or the member is an array or boolean, or the
|
|
81
|
+
* key is blank. `getValue` then reads `val[key]` (or `val[""]`), gets undefined, and
|
|
82
|
+
* `evaluate` returns false on every bar forever with nothing logged anywhere. That is
|
|
83
|
+
* exactly how the old map's `StrengthElder: ["bull"]` stayed invisible: it offered a
|
|
84
|
+
* confident choice against a `{bullPower, bearPower}` value.
|
|
85
|
+
*
|
|
86
|
+
* Fires only when the value is present AND is an object, so it never duplicates the
|
|
87
|
+
* id-resolution reports and never fires for a SCALAR — there `getValue` ignores the
|
|
88
|
+
* sub-key entirely, which is why a blank key is correct rather than broken for RSI.
|
|
89
|
+
*
|
|
90
|
+
* Reported once per (alert, side, key). The condition is re-checked on every bar for
|
|
91
|
+
* the life of the alert, so reporting per evaluation would be a console flood rather
|
|
92
|
+
* than a diagnostic.
|
|
93
|
+
*/
|
|
94
|
+
private reportUnreadableSubKey;
|
|
95
|
+
private resolveCanonicalKeys;
|
|
96
|
+
private triggerAlert;
|
|
97
|
+
/**
|
|
98
|
+
* POST one webhook delivery, reporting the three ways it can silently fail today.
|
|
99
|
+
*
|
|
100
|
+
* The old call was `fetch(url, {...}).catch(console.error)`, which has three holes that
|
|
101
|
+
* all look like success to the user, whose alert list still reads "Active":
|
|
102
|
+
*
|
|
103
|
+
* - `fetch` only REJECTS on a network error. A webhook answering 404 or 500 resolves
|
|
104
|
+
* normally, so the request was treated as delivered and nothing was logged. This is
|
|
105
|
+
* the worst one: a mistyped or dead endpoint fails silently for the life of the alert.
|
|
106
|
+
* - No timeout. An endpoint that accepts the connection and never responds leaves the
|
|
107
|
+
* promise pending forever, and one such alert per symbol accumulates them.
|
|
108
|
+
* - No `keepalive`, so a page that unloads right after firing — exactly when the user
|
|
109
|
+
* most expects delivery — cancels the request in flight.
|
|
110
|
+
*
|
|
111
|
+
* The URL is validated before anything is sent, so a malformed value fails immediately
|
|
112
|
+
* and legibly instead of becoming a network error nobody can attribute.
|
|
113
|
+
*
|
|
114
|
+
* Every failure path also RECORDS on the alert (`lastDeliveryError`) and persists it.
|
|
115
|
+
* The console line is for a developer; the recorded state is for the user, who otherwise
|
|
116
|
+
* has no way to learn that their endpoint is rejecting deliveries. Both are kept: the
|
|
117
|
+
* console keeps the stack, the record survives a reload so the alerts list can still
|
|
118
|
+
* show it later. A successful delivery clears it.
|
|
119
|
+
*/
|
|
120
|
+
private postWebhook;
|
|
121
|
+
private loadAlerts;
|
|
122
|
+
private saveAlerts;
|
|
123
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export type AlertConditionType = "crossing" | "crossing_up" | "crossing_down" | "greater_than" | "less_than";
|
|
2
|
+
export interface AlertSource {
|
|
3
|
+
type: "price" | "indicator" | "value";
|
|
4
|
+
indicatorId?: string;
|
|
5
|
+
key?: string;
|
|
6
|
+
value?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface AlertCondition {
|
|
9
|
+
id: string;
|
|
10
|
+
symbol: string;
|
|
11
|
+
timeframe: string;
|
|
12
|
+
sourceA: AlertSource;
|
|
13
|
+
condition: AlertConditionType;
|
|
14
|
+
sourceB: AlertSource;
|
|
15
|
+
frequency: "once" | "once_per_bar" | "once_per_bar_close" | "continuous";
|
|
16
|
+
actions: {
|
|
17
|
+
popup: boolean;
|
|
18
|
+
sound: boolean;
|
|
19
|
+
email: boolean;
|
|
20
|
+
webhook?: string;
|
|
21
|
+
};
|
|
22
|
+
message: string;
|
|
23
|
+
createdAt: number;
|
|
24
|
+
isTriggered: boolean;
|
|
25
|
+
lastTriggeredBarTime?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the condition was satisfied at the previous evaluation. Only used by
|
|
28
|
+
* `frequency: "continuous"`, which fires on a false → true TRANSITION rather than on
|
|
29
|
+
* every evaluation.
|
|
30
|
+
*
|
|
31
|
+
* Persisted deliberately: without it, reloading a tab while the condition happens to be
|
|
32
|
+
* true would re-fire every continuous alert once on the first tick, which is the same
|
|
33
|
+
* storm in a smaller window. Only written when the value changes, so a live feed
|
|
34
|
+
* re-evaluating the same bar does not hammer localStorage.
|
|
35
|
+
*/
|
|
36
|
+
lastConditionMet?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Why the last webhook delivery failed, or `undefined` when the last attempt
|
|
39
|
+
* succeeded or there is no webhook configured.
|
|
40
|
+
*
|
|
41
|
+
* Persisted, and deliberately so. A delivery failure is not something the user can
|
|
42
|
+
* act on inside an eight-second toast — they need to open the alerts list later and
|
|
43
|
+
* still see that their endpoint is rejecting. Keeping it on the alert itself is what
|
|
44
|
+
* makes the failure discoverable at all: before this, a 500 from a user's webhook was
|
|
45
|
+
* indistinguishable from working, because `fetch` only rejects on a network error.
|
|
46
|
+
*
|
|
47
|
+
* Cleared on the next successful delivery, so a fixed endpoint does not leave a stale
|
|
48
|
+
* failure behind.
|
|
49
|
+
*/
|
|
50
|
+
lastDeliveryError?: {
|
|
51
|
+
/** epoch ms */
|
|
52
|
+
at: number;
|
|
53
|
+
/** HTTP status when the endpoint answered; absent for network/invalid-URL failures. */
|
|
54
|
+
status?: number;
|
|
55
|
+
/** Short reason, already localised-agnostic — the UI formats it. */
|
|
56
|
+
reason: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExchangeCalendar — minimal interface for session-based gap classification.
|
|
3
|
+
*
|
|
4
|
+
* Used by the history planner to distinguish "market closed" gaps (weekends,
|
|
5
|
+
* outside session hours) from "not fetched" gaps that require a backfill request.
|
|
6
|
+
*
|
|
7
|
+
* Intentionally minimal: only public holidays are NOT modelled here (they change
|
|
8
|
+
* annually and require a data-maintenance concern separate from core logic).
|
|
9
|
+
*/
|
|
10
|
+
export interface ExchangeCalendar {
|
|
11
|
+
readonly calendarId: string;
|
|
12
|
+
/**
|
|
13
|
+
* Returns true if ANY trading time exists inside [fromMs, toMs).
|
|
14
|
+
* A missing segment whose entire range returns false here should be
|
|
15
|
+
* reclassified as `market-closed` and NOT enqueued for backfill.
|
|
16
|
+
*/
|
|
17
|
+
hasAnyTradingTime(fromMs: number, toMs: number): boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* VN Exchange Calendar singleton for HOSE/HNX trading hours.
|
|
21
|
+
*/
|
|
22
|
+
export declare const vnExchangeCalendar: ExchangeCalendar;
|
|
23
|
+
export declare function isVNTradingTime(epochMs: number): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calendar registry: maps sessionCalendarId strings to ExchangeCalendar instances.
|
|
3
|
+
* Adapters declare their calendar via SourceSemanticsDescriptor.sessionCalendarId;
|
|
4
|
+
* the widget uses this registry to look up the right calendar for gap classification.
|
|
5
|
+
*/
|
|
6
|
+
import type { ExchangeCalendar } from "./ExchangeCalendar";
|
|
7
|
+
/**
|
|
8
|
+
* Returns the ExchangeCalendar for the given calendarId, or null if unknown.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCalendar(calendarId: string | undefined): ExchangeCalendar | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { PaneConfig } from "../types/pane";
|
|
3
|
+
export interface ChartPaneProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
pane: PaneConfig;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function ChartPane({ pane, children, className, style, ...rest }: ChartPaneProps): import("react").JSX.Element;
|
|
8
|
+
export type { ChartSyncState } from "./context/ChartSyncContext";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChartSplitter
|
|
3
|
+
* Library-level draggable pane-splitter for use with usePaneSizes.
|
|
4
|
+
*
|
|
5
|
+
* Renders as an absolutely-positioned overlay on top of a ChartCanvas container.
|
|
6
|
+
* During drag: only moves visually via CSS translateY (no React state churn).
|
|
7
|
+
* On release: commits total delta to the parent via onCommitDelta (triggers
|
|
8
|
+
* ChartCanvas remount via key when heights change).
|
|
9
|
+
*
|
|
10
|
+
* Styled by chart-splitter.css (.rsc-splitter). Extra classes can be merged
|
|
11
|
+
* via the `className` prop for custom styling.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { ChartSplitter, usePaneSizes } from "@vninvestcharts/widget";
|
|
15
|
+
* import "@vninvestcharts/widget/styles/chart-splitter.css";
|
|
16
|
+
*
|
|
17
|
+
* const { heights, applyDelta, reset, available } = usePaneSizes(chartHeight, { ... });
|
|
18
|
+
*
|
|
19
|
+
* // Between pane[0] and pane[1]:
|
|
20
|
+
* <ChartSplitter
|
|
21
|
+
* splitterIndex={0}
|
|
22
|
+
* available={available}
|
|
23
|
+
* onCommitDelta={applyDelta}
|
|
24
|
+
* onDoubleClick={reset}
|
|
25
|
+
* style={{ top: marginTop + heights[0] }}
|
|
26
|
+
* />
|
|
27
|
+
*/
|
|
28
|
+
import type { CSSProperties, ForwardedRef } from "react";
|
|
29
|
+
export interface ChartSplitterProps {
|
|
30
|
+
/** Index of this splitter: 0 = between pane[0] and pane[1], 1 = between pane[1] and pane[2], … */
|
|
31
|
+
splitterIndex: number;
|
|
32
|
+
/** Total usable height passed back to onCommitDelta. Use the `available` value from usePaneSizes. */
|
|
33
|
+
available: number;
|
|
34
|
+
/** Called with the full drag delta (px) when the pointer is released. */
|
|
35
|
+
onCommitDelta: (splitterIndex: number, deltaY: number, available: number) => void;
|
|
36
|
+
/** Optional handler for double-click (e.g. reset to default ratios). */
|
|
37
|
+
onDoubleClick?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* Additional CSS class names merged after the default `rsc-splitter` class.
|
|
40
|
+
* Use to apply custom styling or override defaults.
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
/** Inline styles merged with the translate preview during drag. */
|
|
44
|
+
style?: CSSProperties;
|
|
45
|
+
/** Tooltip/title shown on hover. */
|
|
46
|
+
title?: string;
|
|
47
|
+
minDeltaY?: number;
|
|
48
|
+
maxDeltaY?: number;
|
|
49
|
+
topHeight?: number;
|
|
50
|
+
bottomHeight?: number;
|
|
51
|
+
/** Accessible name for the separator (WCAG). Falls back to title if not provided. */
|
|
52
|
+
ariaLabel?: string;
|
|
53
|
+
/** Localized labels for the drag badge (Rule 1). Default to Top/Bottom for EN fallback. */
|
|
54
|
+
badgeTopLabel?: string;
|
|
55
|
+
badgeBottomLabel?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ChartSplitterHandle {
|
|
58
|
+
/** Synchronize geometry after parent layout commit */
|
|
59
|
+
syncGeometry: () => void;
|
|
60
|
+
/** Get current splitter geometry */
|
|
61
|
+
getGeometry: () => {
|
|
62
|
+
top: number;
|
|
63
|
+
height: number;
|
|
64
|
+
} | null;
|
|
65
|
+
}
|
|
66
|
+
export interface ChartSplitterWithHandleProps extends ChartSplitterProps {
|
|
67
|
+
/** Optional ref to access imperative methods */
|
|
68
|
+
handleRef?: ForwardedRef<ChartSplitterHandle>;
|
|
69
|
+
}
|
|
70
|
+
export declare const ChartSplitter: import("react").NamedExoticComponent<ChartSplitterWithHandleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { StockDataAdapter } from "../types/adapter";
|
|
3
|
+
import type { OHLCVBar } from "../types/ohlcv";
|
|
4
|
+
import { type PaneInput } from "./hooks/usePaneManager";
|
|
5
|
+
export interface ChartTerminalProps extends HTMLAttributes<HTMLElement> {
|
|
6
|
+
data: readonly OHLCVBar[];
|
|
7
|
+
panes: readonly PaneInput[];
|
|
8
|
+
adapter?: StockDataAdapter;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function ChartTerminal({ data, panes, adapter, children, className, style, ...rest }: ChartTerminalProps): import("react").JSX.Element;
|
|
12
|
+
export type { PaneInput } from "./hooks/usePaneManager";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { Component, ErrorInfo, ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
fallback?: ReactNode;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
paneId: string;
|
|
6
|
+
}
|
|
7
|
+
interface State {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
error: Error | null;
|
|
10
|
+
}
|
|
11
|
+
export declare class PaneErrorBoundary extends Component<Props, State> {
|
|
12
|
+
state: State;
|
|
13
|
+
static getDerivedStateFromError(error: Error): State;
|
|
14
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
15
|
+
render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
16
|
+
}
|
|
17
|
+
export {};
|