@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,56 @@
|
|
|
1
|
+
export { VNInvestCharts } from "./VNInvestCharts";
|
|
2
|
+
export { VNInvestMultiCharts } from "./VNInvestMultiCharts";
|
|
3
|
+
export { default as MeasurementOverlay } from "./MeasurementOverlay";
|
|
4
|
+
export { WidgetErrorBoundary } from "./WidgetErrorBoundary";
|
|
5
|
+
export { WidgetEmptyState } from "./WidgetEmptyState";
|
|
6
|
+
export { WidgetI18nContext, WidgetI18nProvider, useWidgetI18n } from "./context/WidgetI18nContext";
|
|
7
|
+
export { VNInvestChartsProvider, useHoverEmitterRef, VNInvestChartsConfigContext, VNInvestChartsConfigProvider, VNInvestChartsStateContext, VNInvestChartsStateProvider, useVNInvestChartsState, createHoverEmitter, emitHover, clearHover, useHoverSubscription, useHoverState, type HoverEventPayload, type HoverEmitter, } from "./context/VNInvestChartsContext";
|
|
8
|
+
export type { VNInvestChartsProviderProps } from "./context/VNInvestChartsContext";
|
|
9
|
+
export type { VNInvestChartsConfigContextValue } from "./context/VNInvestChartsConfigContext";
|
|
10
|
+
export type { VNInvestChartsStateContextValue, PaneState, DrawingInteraction, ActiveToolState } from "./context/VNInvestChartsStateContext";
|
|
11
|
+
export { resolveRequestedRuntime, shouldForceLegacyRuntime } from "./runtimePolicy";
|
|
12
|
+
export type { WidgetI18nContextValue, WidgetI18nProviderProps } from "./context/WidgetI18nContext";
|
|
13
|
+
export { widgetMessagesEn } from "./i18n/messages.en";
|
|
14
|
+
export { widgetMessagesVi } from "./i18n/messages.vi";
|
|
15
|
+
export type { WidgetLocale, WidgetMessages } from "./i18n/types";
|
|
16
|
+
export type { RequestedWidgetRuntime, ResolvedWidgetRuntime, WidgetRuntimeReasonCode } from "./runtimePolicy";
|
|
17
|
+
export type { VNInvestChartsProps, } from "./VNInvestCharts";
|
|
18
|
+
export type { VNInvestMultiChartsProps, VNInvestMultiChartsRef, MultiChartConfig, ChartLayout, } from "./VNInvestMultiCharts";
|
|
19
|
+
export type { VNInvestChartsRef } from "./utils/widgetHelpers";
|
|
20
|
+
export type { WidgetCoordinateBridge, WidgetPaneRuntimeSnapshot, WidgetPaneSplitterRenderContext, WidgetPaneToolbarActions, WidgetPaneToolbarRenderContext, WidgetRuntimeCapabilities, WidgetRuntimeResolutionReason, } from "./utils/widgetHelpers";
|
|
21
|
+
export type { DrawingWorkspaceController } from "@vninvestcharts/engine-react";
|
|
22
|
+
export { createLocalStorageAdapter, createRESTStorageAdapter } from "@vninvestcharts/engine-drawing";
|
|
23
|
+
export type { StockDataAdapter, Timeframe } from "../lib/types/adapter";
|
|
24
|
+
export { toCacheKey, LocalCacheMatrixFactoryImpl } from "./history/cache";
|
|
25
|
+
export type { CacheCoverageIndex, CacheEvictPolicy, CacheEvictResult, CacheInvalidateReason, CacheKey, CacheKeyParts, CacheReadResult, CacheSemanticScope, CacheSegmentMeta, CacheWriteMeta, CacheWriteResult, LocalCacheMatrix, LocalCacheMatrixFactory, TimeRange, } from "./history/cache";
|
|
26
|
+
export { default as DrawingDock } from "./components/drawing/DrawingDock";
|
|
27
|
+
export { default as DrawingInspector } from "./components/drawing/DrawingInspector";
|
|
28
|
+
export { default as DrawingListPanel, generateDrawingLabel, filterDrawings, reorderDrawings } from "./components/drawing/DrawingListPanel";
|
|
29
|
+
export { default as DrawingSemanticPointLegend } from "./components/drawing/DrawingSemanticPointLegend";
|
|
30
|
+
export type { DrawingDockLabels, DrawingDockProps } from "./components/drawing/DrawingDock";
|
|
31
|
+
export type { DrawingListPanelLabels, DrawingListPanelProps } from "./components/drawing/DrawingListPanel";
|
|
32
|
+
export type { DrawingSemanticPointLegendLabels, DrawingSemanticPointLegendProps } from "./components/drawing/DrawingSemanticPointLegend";
|
|
33
|
+
export type { DrawingInspectorLabels, DrawingInspectorProps, DrawingInspectorTextEditorLabels, DrawingInspectorTextEditorProps } from "./components/drawing/DrawingInspector";
|
|
34
|
+
export { PaperTradePanel } from "./components/trading/PaperTradePanel";
|
|
35
|
+
export type { PaperTradePanelProps, PaperTradePosition, PaperTradeJournalEntry } from "./components/trading/PaperTradePanel";
|
|
36
|
+
export { SettingsModal } from "./components/settings/SettingsModal";
|
|
37
|
+
export type { SettingsModalProps } from "./components/settings/SettingsModal";
|
|
38
|
+
export { SnapshotPreviewModal } from "./components/settings/SnapshotPreviewModal";
|
|
39
|
+
export type { SnapshotPreviewModalProps } from "./components/settings/SnapshotPreviewModal";
|
|
40
|
+
export { MultiSourceDataAdapter } from "./adapters/MultiSourceDataAdapter";
|
|
41
|
+
export type { MultiSourceDataAdapterConfig, SourceRoute } from "./adapters/MultiSourceDataAdapter";
|
|
42
|
+
export { BottomPanelHost } from "./components/BottomPanelHost";
|
|
43
|
+
export type { BottomPanelHostProps, BottomTab } from "./components/BottomPanelHost";
|
|
44
|
+
export { VNSymbolSearch, SymbolSearch } from "./components/search/VNSymbolSearch";
|
|
45
|
+
export type { VNSymbolSearchProps } from "./components/search/VNSymbolSearch";
|
|
46
|
+
export type { SymbolSearchItem } from "./types/symbolSearch";
|
|
47
|
+
export { WhalePanel } from "./components/overlays/WhalePanel";
|
|
48
|
+
export type { WhalePanelProps } from "./components/overlays/WhalePanel";
|
|
49
|
+
export { SaaSFeatureProvider, SaaSFeatureContext } from "./contexts/SaaSFeatureContext";
|
|
50
|
+
export { useFeatureGate } from "./hooks/useFeatureGate";
|
|
51
|
+
export { PremiumFeatureGate } from "./components/PremiumFeatureGate";
|
|
52
|
+
export type { SaaSFeatureFlags, TenantMetadata, SaaSFeatureContextValue } from "./types/saas";
|
|
53
|
+
export type { PremiumFeatureGateProps } from "./components/PremiumFeatureGate";
|
|
54
|
+
export { WorkspaceSerializer } from "./runtime/WorkspaceSerializer";
|
|
55
|
+
export type { WorkspaceSchema, WorkspaceSettings } from "./runtime/WorkspaceSerializer";
|
|
56
|
+
export { injectVNInvestChartsCSS } from "./styles/injectStyles";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type PatTier } from "@vninvestcharts/engine-core";
|
|
2
|
+
import type { ChartLayout } from "@vninvestcharts/engine-react";
|
|
3
|
+
import type { GridLayout } from "./grid/types";
|
|
4
|
+
import type { MultiChartConfig } from "./VNInvestMultiCharts.types";
|
|
5
|
+
export declare const DEFAULT_LAYOUTS: Record<string, ChartLayout>;
|
|
6
|
+
/**
|
|
7
|
+
* S5a: số chart tối đa theo tier (ma trận chốt, sửa đổi 2026-09-24 theo quyết
|
|
8
|
+
* định user: Free/Starter/unknown = 2 để nếm, Pro = 4 (mở 1x3 + 2x2),
|
|
9
|
+
* Enterprise+ = full).
|
|
10
|
+
* Enterprise KHÔNG kẹp 4–6 để giữ nguyên preset 8 ô (2x4) sẵn có cho khách trả phí.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveMaxChartsForTier(tier: PatTier | undefined): number;
|
|
13
|
+
/** S5a: đếm chart của layout (slots tường minh, không thì rows*cols). */
|
|
14
|
+
export declare function countLayoutCharts(layout: ChartLayout): number;
|
|
15
|
+
/** S5a: kẹp layout về 1x2 khi vượt max (giữ nguyên khi đủ). */
|
|
16
|
+
export declare function clampChartLayoutToMax(layout: ChartLayout, maxCharts: number): ChartLayout;
|
|
17
|
+
export declare function chartLayoutToGridLayout(chartLayout: ChartLayout, charts: MultiChartConfig[]): GridLayout;
|
|
18
|
+
export declare function gridLayoutToChartLayout(gl: GridLayout): ChartLayout;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type PaneSnapshotLike = {
|
|
2
|
+
paneId: string;
|
|
3
|
+
bounds: {
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
top: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
headerAnchor: {
|
|
10
|
+
top: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type PanePointerEventLike = {
|
|
14
|
+
currentTarget: {
|
|
15
|
+
getBoundingClientRect: () => {
|
|
16
|
+
left: number;
|
|
17
|
+
top: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
clientX: number;
|
|
21
|
+
clientY: number;
|
|
22
|
+
};
|
|
23
|
+
export declare function resolveHoveredPaneId(event: PanePointerEventLike, snapshots: readonly PaneSnapshotLike[]): string | null;
|
|
24
|
+
export declare function findPaneSnapshotAtPosition<T extends PaneSnapshotLike>(snapshots: readonly T[], localX: number, localY: number): T | undefined;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A10 — the scan policy, i.e. the plan's runtime constraints expressed as
|
|
3
|
+
* one pure function the UI and the tests both go through.
|
|
4
|
+
*
|
|
5
|
+
* PLAN_FRONTEND_PROPLUS_TRACKA_2026-09-28 §3.9:
|
|
6
|
+
* §3.9.1 anti-look-ahead → `asOf` is the last **closed** bar.
|
|
7
|
+
* §3.9.3 off on mobile and at `free` → the caller passes `enabled`, which
|
|
8
|
+
* comes from the `auto_pattern` capability (already `DEVICE_HEAVY`
|
|
9
|
+
* and already `pro`-gated in `CapabilityResolver`).
|
|
10
|
+
* §3.9.4 never in the background while panning or zooming → `idle` must be
|
|
11
|
+
* true. A scan is a decision the user made, not a background job.
|
|
12
|
+
* §3.9.5 at most 12 patterns per series.
|
|
13
|
+
*
|
|
14
|
+
* Kept pure so every one of those is testable without a chart, and so the
|
|
15
|
+
* rule "no scan during a gesture" cannot be satisfied in the UI and broken in
|
|
16
|
+
* the engine.
|
|
17
|
+
*/
|
|
18
|
+
import { detectChartPatterns, type DetectedPattern, type PatternBar, type PatternShapeId } from "@vninvestcharts/engine-core";
|
|
19
|
+
export interface ScanRequest {
|
|
20
|
+
readonly bars: readonly PatternBar[];
|
|
21
|
+
/** Capability gate result. `false` covers both `free` and narrow devices. */
|
|
22
|
+
readonly enabled: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* `true` when the scan was triggered deliberately — the panel is open, or
|
|
25
|
+
* the host's idle callback fired. A pan or zoom in progress sets this
|
|
26
|
+
* `false` and the scan is skipped entirely.
|
|
27
|
+
*/
|
|
28
|
+
readonly idle: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Shapes the user has selected. `undefined` means all shipped shapes;
|
|
31
|
+
* an **empty array means none**. Collapsing `[]` to "everything" would
|
|
32
|
+
* make "Clear all" followed by "Scan" quietly draw every pattern the user
|
|
33
|
+
* had just switched off.
|
|
34
|
+
*/
|
|
35
|
+
readonly shapes?: readonly PatternShapeId[];
|
|
36
|
+
/**
|
|
37
|
+
* How many trailing bars are still forming. `1` on a live chart, `0` on
|
|
38
|
+
* a historical one. Those bars are excluded from the scan so a live bar
|
|
39
|
+
* can never confirm a pattern.
|
|
40
|
+
*/
|
|
41
|
+
readonly formingBars?: number;
|
|
42
|
+
/** Plan §3.9.5. */
|
|
43
|
+
readonly maxPatterns?: number;
|
|
44
|
+
/** Extra detector options, for hosts that want to tune the noise floor. */
|
|
45
|
+
readonly detector?: Parameters<typeof detectChartPatterns>[1];
|
|
46
|
+
}
|
|
47
|
+
export type ScanSkipReason = "disabled" | "busy" | "no-data";
|
|
48
|
+
export interface ScanResult {
|
|
49
|
+
readonly patterns: readonly DetectedPattern[];
|
|
50
|
+
readonly skipped: ScanSkipReason | null;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Run a scan, or explain why not.
|
|
54
|
+
*
|
|
55
|
+
* `skipped` is returned rather than an empty `patterns` array so a caller
|
|
56
|
+
* can tell "scanned, found nothing" from "did not scan" — the difference
|
|
57
|
+
* matters for the empty-state copy, and for the test that asserts the
|
|
58
|
+
* gesture rule.
|
|
59
|
+
*/
|
|
60
|
+
export declare function runAutoPatternScan(request: ScanRequest): ScanResult;
|
|
61
|
+
/** Human-facing numbers for the picker; kept here so the panel stays dumb. */
|
|
62
|
+
export interface PatternSummary {
|
|
63
|
+
readonly id: string;
|
|
64
|
+
readonly shape: PatternShapeId;
|
|
65
|
+
readonly direction: "bullish" | "bearish";
|
|
66
|
+
/** 0..1, as reported by the detector. */
|
|
67
|
+
readonly confidence: number;
|
|
68
|
+
readonly rSquared: number;
|
|
69
|
+
readonly barsInPattern: number;
|
|
70
|
+
/**
|
|
71
|
+
* `true` when the gating R² had fewer than three samples and so carries
|
|
72
|
+
* no information. Surfaced rather than hidden: a "R² 1.00" badge on a
|
|
73
|
+
* two-point neckline is a claim the number cannot support.
|
|
74
|
+
*/
|
|
75
|
+
readonly degenerateFit: boolean;
|
|
76
|
+
}
|
|
77
|
+
export declare function summarizePatterns(patterns: readonly DetectedPattern[]): PatternSummary[];
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A10 — turn detected patterns into drawings.
|
|
3
|
+
*
|
|
4
|
+
* PLAN_FRONTEND_PROPLUS_TRACKA_2026-09-28 §3.9. The engine's detector
|
|
5
|
+
* describes shapes in *data* space (bar index + price) and knows nothing
|
|
6
|
+
* about renderers; this module is the seam that maps them onto drawings the
|
|
7
|
+
* existing layer already knows how to draw, hit-test, persist and list.
|
|
8
|
+
*
|
|
9
|
+
* ## Why the shape → drawing-type map is what it is
|
|
10
|
+
*
|
|
11
|
+
* - `headAndShoulders` / `inverseHeadAndShoulders` → the existing manual
|
|
12
|
+
* `headAndShoulders` tool. Its 7-point layout is LS·LV·H·RV·RS·NL·NR and
|
|
13
|
+
* the detector emits exactly those seven anchors, so a detected H&S and a
|
|
14
|
+
* hand-placed one are literally the same drawing. That is the geometry
|
|
15
|
+
* reuse the brief asked for, and it also inherits the tool's dashed
|
|
16
|
+
* neckline rendering.
|
|
17
|
+
* - `doubleTop` / `doubleBottom` / `triangle` → `polyline`. `polyline` has no
|
|
18
|
+
* segment-registry entry, so the generic branch walks all N-1 edges of the
|
|
19
|
+
* detected anchors with nothing dropped.
|
|
20
|
+
*
|
|
21
|
+
* The manual `trianglePattern` tool is the obvious host and is wrong on two
|
|
22
|
+
* independent counts, both measured in
|
|
23
|
+
* `__tests__/harmonicPatternSegments.test.ts`:
|
|
24
|
+
*
|
|
25
|
+
* 1. It drops edges. Its registry entry declares 2 segment keys for a
|
|
26
|
+
* 5-point closed shape, so `buildHarmonicPatternPrimitive` draws one
|
|
27
|
+
* sequential edge plus the dashed closing line and discards the other
|
|
28
|
+
* three. (Same defect class, same builder, also affects `cypherPattern`,
|
|
29
|
+
* `threeDrivesPattern` and `headAndShoulders`.)
|
|
30
|
+
* 2. Fixing (1) would NOT make it a valid host, because the geometries do
|
|
31
|
+
* not match. The detector's `triangle` emits FOUR anchors
|
|
32
|
+
* (`upperA·upperB·lowerB·lowerA`); the tool takes FIVE points
|
|
33
|
+
* (`H1·L1·H2·L2·apex`). Fed four anchors, the tool emits five labels —
|
|
34
|
+
* `H1 L1 H2 L2 apex` — against four pixels, so `apex` has no coordinate
|
|
35
|
+
* at all and the shape is silently wrong. A detected triangle is an open
|
|
36
|
+
* four-point wedge; it has no apex point to give.
|
|
37
|
+
*
|
|
38
|
+
* So `polyline` stays, and (2) is the reason that outlives an engine fix.
|
|
39
|
+
* Re-hosting these on the pattern primitives is a detector-side change
|
|
40
|
+
* (either emit the 5th anchor, or add a 4-point triangle tool), not a
|
|
41
|
+
* widget-side one.
|
|
42
|
+
*
|
|
43
|
+
* The cost of that choice is that the anchors carry no per-point role
|
|
44
|
+
* badges, so the pattern's meaning travels in the drawing `label` — which
|
|
45
|
+
* is also where the confidence and R² are surfaced, and what the objects
|
|
46
|
+
* list shows.
|
|
47
|
+
*/
|
|
48
|
+
import type { DrawingObject, DrawingToolType } from "@vninvestcharts/engine-drawing";
|
|
49
|
+
import type { DetectedPattern, PatternShapeId } from "@vninvestcharts/engine-core";
|
|
50
|
+
export interface PatternDrawingLabels {
|
|
51
|
+
/** e.g. "Head & shoulders" — resolved through i18n by the caller. */
|
|
52
|
+
shape: (shape: PatternShapeId) => string;
|
|
53
|
+
/** e.g. "confirmed · 82% · R²0.91" */
|
|
54
|
+
detail: (pattern: DetectedPattern) => string;
|
|
55
|
+
}
|
|
56
|
+
/** Drawing type each detected shape is rendered as. */
|
|
57
|
+
export declare const PATTERN_DRAWING_TYPE: Readonly<Record<PatternShapeId, DrawingToolType>>;
|
|
58
|
+
/**
|
|
59
|
+
* Anchor role sequence per shape, in the order the polyline should walk.
|
|
60
|
+
*
|
|
61
|
+
* The detector already emits anchors in drawing order, so this is a
|
|
62
|
+
* *contract* rather than a transform: a pattern whose role sequence does not
|
|
63
|
+
* match is refused rather than drawn approximately. It is a sequence and not
|
|
64
|
+
* a set on purpose — `doubleBottom` legitimately contains the role `trough`
|
|
65
|
+
* twice (its two bottoms), which a role→anchor map would silently collapse
|
|
66
|
+
* into one point and draw a broken shape.
|
|
67
|
+
*/
|
|
68
|
+
export declare const PATTERN_ANCHOR_ORDER: Readonly<Record<PatternShapeId, readonly string[]>>;
|
|
69
|
+
/** Group id so every auto-detected pattern collapses to one tree entry. */
|
|
70
|
+
export declare const AUTO_PATTERN_GROUP_ID = "vnsc-auto-patterns";
|
|
71
|
+
export interface PatternDrawingOptions {
|
|
72
|
+
readonly labels: PatternDrawingLabels;
|
|
73
|
+
readonly stroke?: string;
|
|
74
|
+
/** Existing drawings, so ids and z-order can be derived deterministically. */
|
|
75
|
+
readonly existing?: readonly DrawingObject[];
|
|
76
|
+
readonly zIndex?: number;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Convert one detected pattern into a drawing.
|
|
80
|
+
*
|
|
81
|
+
* Returns `null` for a pattern whose anchors do not match the shape's
|
|
82
|
+
* documented layout — a mismatch here would silently draw a wrong shape, so
|
|
83
|
+
* it is refused rather than approximated.
|
|
84
|
+
*/
|
|
85
|
+
export declare function toPatternDrawing(pattern: DetectedPattern, options: PatternDrawingOptions): DrawingObject | null;
|
|
86
|
+
/** Convert a scan result, dropping anything that will not map. */
|
|
87
|
+
export declare function toPatternDrawings(patterns: readonly DetectedPattern[], options: PatternDrawingOptions): DrawingObject[];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { DrawingToolDefinition } from "@vninvestcharts/engine-drawing";
|
|
2
|
+
import type { RegistryEntry } from "../../lib/core/registry/SeriesRegistry";
|
|
3
|
+
import type { SeriesTypeId } from "../../lib/core/types/pane-descriptor";
|
|
4
|
+
export interface ProSeriesDefinition {
|
|
5
|
+
type: SeriesTypeId;
|
|
6
|
+
entry: RegistryEntry;
|
|
7
|
+
}
|
|
8
|
+
/** Module Pro do engine-pro cung cấp (caller tự import trong dự án của họ). */
|
|
9
|
+
export interface ProExtensionModule {
|
|
10
|
+
drawingTools: readonly DrawingToolDefinition[];
|
|
11
|
+
series: readonly ProSeriesDefinition[];
|
|
12
|
+
}
|
|
13
|
+
export declare function isProExtensionActive(): boolean;
|
|
14
|
+
/** Gỡ cờ active (chỉ dùng cho test; registry Map không hỗ trợ unregister từng key). */
|
|
15
|
+
export declare function resetProExtensionForTests(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Nạp Pro extension vào registry. **Fail-closed**: chỉ khi license verify được
|
|
18
|
+
* (chữ ký hợp lệ, chưa hết hạn, tier ∈ {pro, enterprise}) **và** license đó cấp
|
|
19
|
+
* capability `pro_plugin` thì mới nạp. Mọi lỗi — kể cả `verifyLicenseKey` ném —
|
|
20
|
+
* đều trả `false` và **không nạp gì cả**.
|
|
21
|
+
*
|
|
22
|
+
* ## Về `host` — ĐỌC TRƯỚC KHI GỌI
|
|
23
|
+
*
|
|
24
|
+
* `verifyLicenseKey` **bỏ qua** kiểm tra domain khi `opts.host` là falsy
|
|
25
|
+
* (`licenseValidator.ts:353` — `if (opts.host && domains.length > 0 && …)`). Nên
|
|
26
|
+
* "không truyền host" KHÔNG phải là "không kiểm domain": đó là **bỏ qua kiểm
|
|
27
|
+
* domain** — một license ghim cho `buyer.example` vẫn verify ở mọi host.
|
|
28
|
+
*
|
|
29
|
+
* Vì `.eslintrc` cấm đọc `window`/`document`/`globalThis` trực tiếp trong `src/**`
|
|
30
|
+
* (quy tắc này bắt buộc truyền adapter từ ngoài vào), hàm này **không tự đọc
|
|
31
|
+
* `location`**. Người gọi phải truyền `host`.
|
|
32
|
+
*
|
|
33
|
+
* Hệ quả cần biết trước khi tích hợp: nếu license có `d` (ghim domain) mà
|
|
34
|
+
* `host` không được truyền, license **bị từ chối**. Đây là hành vi cố ý — không biết
|
|
35
|
+
* host không phải lý do để lọt license qua. License **không** ghim `d` thì không
|
|
36
|
+
* cần `host` và vẫn verify bình thường.
|
|
37
|
+
*/
|
|
38
|
+
export declare function registerProExtension(extension: ProExtensionModule | null | undefined, licenseKey: string, opts?: {
|
|
39
|
+
host?: string;
|
|
40
|
+
}): Promise<boolean>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type EnrichedDatum } from "../../lib/core/calculators/types";
|
|
2
|
+
import { type WidgetPaneRuntimeSnapshot, type WidgetCoordinateBridge } from "../utils/widgetHelpers";
|
|
3
|
+
import { type IRuntimeEngine, type IRuntimeScale } from "./IRuntimeEngine";
|
|
4
|
+
/**
|
|
5
|
+
* L4: runtime-agnostic LIVE chart scale provider (renamed from LegacyRuntimeAdapter).
|
|
6
|
+
* Despite the old name, this feeds the main DynamicChart surface in ALL modes
|
|
7
|
+
* (useWidgetCoordinateBridge → VNInvestCharts). Discontinuous gap handling lives here.
|
|
8
|
+
*
|
|
9
|
+
* ## READ THIS BEFORE CHANGING ANYTHING ABOUT GAPS — `showNonTradingDays` is a NO-OP FOR X
|
|
10
|
+
*
|
|
11
|
+
* Coordinator decision 2026-10-05 (`G3_DEFER_GATE_HARDEN_B2_2026-10-05` D1) closes G3 as
|
|
12
|
+
* **DEFERRED**. This file is *not* where the X axis is projected, and the flag below does not
|
|
13
|
+
* reach it. Three separate sessions have now written a confident causal sentence here and been
|
|
14
|
+
* wrong; the measurements are in the plan and they are unambiguous.
|
|
15
|
+
*
|
|
16
|
+
* - **The live projection is index-domain.** `showNonTradingDays` does not affect the rendered X
|
|
17
|
+
* axis at this commit. The fork renderer projects through
|
|
18
|
+
* `src/widget/utils/coordinateBridge.ts:316-326` → `resolvePanePixelAtDataIndex` →
|
|
19
|
+
* `indexToPixelX`, which is `left + (index - from) / span * width`. Measured on a weekend
|
|
20
|
+
* fixture (Fri 2026-09-18, Mon 09-21, Tue 09-22, Wed 09-23; `plotBounds = {left: 0, width:
|
|
21
|
+
* 1000}`; `visibleRange {from: 0, to: 4}`): bar centres at **125, 375, 625, 875 px**, deltas
|
|
22
|
+
* **250, 250, 250**, while the wall-clock deltas are **3 d, 1 d, 1 d**. Equal pixel steps over an
|
|
23
|
+
* unequal wall-clock gap *is* the compression. A wall-clock projection would give unequal
|
|
24
|
+
* steps. The lock is `src/widget/runtime/chartScaleAdapter.gap.test.ts`.
|
|
25
|
+
*
|
|
26
|
+
* - **`usesDiscontinuousScale` reads backwards.** `true` means gaps are **COMPRESSED** (the
|
|
27
|
+
* discontinuous provider packs bars at `index + initialIndex`), not "shown". Do not use the name
|
|
28
|
+
* as a definition.
|
|
29
|
+
*
|
|
30
|
+
* - **This class's only consumer is a dead `useCallback`.** `getChartScale`'s result is read at
|
|
31
|
+
* `VNInvestCharts.tsx:1384` and `:1386`, inside `handleLegacyVisibleDomainChange`, declared at
|
|
32
|
+
* `:1383` and referenced nowhere else in that file. `useForkRuntime.ts:276` destructures the
|
|
33
|
+
* value and never uses it.
|
|
34
|
+
*
|
|
35
|
+
* - **What the flag DOES do** (all measured, none of it a pixel): it is a React remount key at
|
|
36
|
+
* `VNInvestCharts.tsx:2876`; it re-runs this `getChartScale` memo, producing a new `data` array
|
|
37
|
+
* identity per toggle; and it round-trips through `localStorage` and the workspace file.
|
|
38
|
+
*
|
|
39
|
+
* - **The engine does not know the flag at all** — 0 hits for `showNonTradingDays` across the
|
|
40
|
+
* whole of `packages` + `src` in `vninvestcharts-engine` at `6264903` (351 files scanned).
|
|
41
|
+
*
|
|
42
|
+
* To actually make gaps appear, the work is a time-scale projection in the engine
|
|
43
|
+
* (`PaneRuntimeSnapshot.time`, `paneProjector`, the X tick generator, `AxisGridRenderCache` keys,
|
|
44
|
+
* both `barWidth` sources, zoom pivot, pan) — plan
|
|
45
|
+
* `G3_ENGINE_TIMESCALE_PLAN_2026-10-03.md`, audit verdict **NEED_REVISION** with 6 open
|
|
46
|
+
* objections. It was **not** done, deliberately, because it could not be verified in a browser.
|
|
47
|
+
* Start by reading that audit, not by editing this file.
|
|
48
|
+
*/
|
|
49
|
+
export declare class ChartScaleAdapter implements IRuntimeEngine {
|
|
50
|
+
getChartScale(options: {
|
|
51
|
+
plotData: readonly EnrichedDatum[];
|
|
52
|
+
enrichedData: readonly EnrichedDatum[];
|
|
53
|
+
controlledXExtents: readonly [Date | number, Date | number] | undefined;
|
|
54
|
+
computedXExtents: readonly [Date | number, Date | number] | undefined;
|
|
55
|
+
showNonTradingDays: boolean;
|
|
56
|
+
}): IRuntimeScale;
|
|
57
|
+
buildPaneSnapshots(options: {
|
|
58
|
+
visiblePanes: any[];
|
|
59
|
+
activeHeights: number[];
|
|
60
|
+
size: {
|
|
61
|
+
width: number;
|
|
62
|
+
height: number;
|
|
63
|
+
};
|
|
64
|
+
scaleSlotDomains: Record<string, [number, number]>;
|
|
65
|
+
}): readonly WidgetPaneRuntimeSnapshot[];
|
|
66
|
+
createCoordinateBridge(options: {
|
|
67
|
+
paneSnapshots: readonly WidgetPaneRuntimeSnapshot[];
|
|
68
|
+
visibleRange: any;
|
|
69
|
+
plotData: readonly EnrichedDatum[];
|
|
70
|
+
}): WidgetCoordinateBridge | null;
|
|
71
|
+
}
|
|
72
|
+
/** L4: deprecated alias kept for old host/test imports (use ChartScaleAdapter). */
|
|
73
|
+
export { ChartScaleAdapter as LegacyRuntimeAdapter };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ChartTemplate {
|
|
2
|
+
name: string;
|
|
3
|
+
activeSeriesConfigs: any[];
|
|
4
|
+
isDark: boolean;
|
|
5
|
+
timeframe: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class ChartSerializer {
|
|
8
|
+
static saveTemplate(name: string, data: Omit<ChartTemplate, "name">): void;
|
|
9
|
+
static loadTemplate(name: string): ChartTemplate | null;
|
|
10
|
+
static getAllTemplates(): Map<string, ChartTemplate>;
|
|
11
|
+
static deleteTemplate(name: string): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type EnrichedDatum } from "../../lib/core/calculators/types";
|
|
2
|
+
import { type WidgetPaneRuntimeSnapshot, type WidgetCoordinateBridge } from "../utils/widgetHelpers";
|
|
3
|
+
import { type IRuntimeEngine } from "./IRuntimeEngine";
|
|
4
|
+
export declare class ForkRuntimeAdapter implements IRuntimeEngine {
|
|
5
|
+
buildPaneSnapshots(options: {
|
|
6
|
+
visiblePanes: any[];
|
|
7
|
+
activeHeights: number[];
|
|
8
|
+
size: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
scaleSlotDomains: Record<string, [number, number]>;
|
|
13
|
+
}): readonly WidgetPaneRuntimeSnapshot[];
|
|
14
|
+
createCoordinateBridge(options: {
|
|
15
|
+
paneSnapshots: readonly WidgetPaneRuntimeSnapshot[];
|
|
16
|
+
visibleRange: any;
|
|
17
|
+
plotData: readonly EnrichedDatum[];
|
|
18
|
+
}): WidgetCoordinateBridge | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type EnrichedDatum } from "../../lib/core/calculators/types";
|
|
2
|
+
import { type WidgetCoordinateBridge, type WidgetPaneRuntimeSnapshot } from "../utils/widgetHelpers";
|
|
3
|
+
export interface IRuntimeScale {
|
|
4
|
+
data: readonly EnrichedDatum[];
|
|
5
|
+
xAccessor: (datum: EnrichedDatum) => number;
|
|
6
|
+
displayXAccessor: (datum: EnrichedDatum) => Date;
|
|
7
|
+
xExtents: readonly [Date, Date] | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* `xScale` was removed from this interface on 2026-10-05.
|
|
10
|
+
*
|
|
11
|
+
* It had **zero readers**. Both branches of `ChartScaleAdapter.getChartScale` produced one —
|
|
12
|
+
* `scaleUtc()` and `financeDiscontinuousScale` — and nothing in the repo ever called it. The
|
|
13
|
+
* only live readers of this object are `VNInvestCharts.tsx:1384` and `:1386`, and both sit
|
|
14
|
+
* inside `handleLegacyVisibleDomainChange`, a `useCallback` declared at `:1383` whose
|
|
15
|
+
* identifier occurs exactly once in the file: it is dead.
|
|
16
|
+
*
|
|
17
|
+
* Removing the field is enforced by the compiler, not by a grep. `legacyChartScale` was typed
|
|
18
|
+
* `any` at both holders, so `tsc` could not see a read; both are now typed `IRuntimeScale`, so
|
|
19
|
+
* any future read of a field that does not exist here is TS2339. `npm run type-check` is the
|
|
20
|
+
* gate. Do not re-add a scale without a consumer — see the docblock at the top of
|
|
21
|
+
* `ChartScaleAdapter.ts` for why the gap feature does not live here.
|
|
22
|
+
*/
|
|
23
|
+
usesDiscontinuousScale: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface IRuntimeEngine {
|
|
26
|
+
buildPaneSnapshots(options: {
|
|
27
|
+
visiblePanes: any[];
|
|
28
|
+
activeHeights: number[];
|
|
29
|
+
size: {
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
};
|
|
33
|
+
scaleSlotDomains: Record<string, [number, number]>;
|
|
34
|
+
}): readonly WidgetPaneRuntimeSnapshot[];
|
|
35
|
+
createCoordinateBridge(options: {
|
|
36
|
+
paneSnapshots: readonly WidgetPaneRuntimeSnapshot[];
|
|
37
|
+
visibleRange: any;
|
|
38
|
+
plotData: readonly EnrichedDatum[];
|
|
39
|
+
}): WidgetCoordinateBridge | null;
|
|
40
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type PaneDescriptor, type ChartTheme } from "../../lib/core";
|
|
2
|
+
import type { DrawingObject } from "@vninvestcharts/engine-drawing";
|
|
3
|
+
export interface WorkspaceSettings {
|
|
4
|
+
theme?: ChartTheme;
|
|
5
|
+
timezone?: string;
|
|
6
|
+
timeframe?: string;
|
|
7
|
+
symbol?: string;
|
|
8
|
+
maxVisiblePanes?: number;
|
|
9
|
+
maxVisibleBars?: number;
|
|
10
|
+
showNonTradingDays?: boolean;
|
|
11
|
+
showDrawingPriceMarkers?: boolean;
|
|
12
|
+
enableWhale?: boolean;
|
|
13
|
+
whaleThreshold?: number;
|
|
14
|
+
enableCVD?: boolean;
|
|
15
|
+
cvdMode?: "oscillator" | "histogram";
|
|
16
|
+
alertAudioEnabled?: boolean;
|
|
17
|
+
overlayTimeframe?: string;
|
|
18
|
+
overlayStyle?: "hollow" | "step" | "area" | "candle";
|
|
19
|
+
}
|
|
20
|
+
export interface WorkspaceSchema {
|
|
21
|
+
version: number;
|
|
22
|
+
timestamp: number;
|
|
23
|
+
panes: readonly PaneDescriptor[];
|
|
24
|
+
drawings: readonly DrawingObject[];
|
|
25
|
+
settings: WorkspaceSettings;
|
|
26
|
+
}
|
|
27
|
+
export declare class WorkspaceSerializer {
|
|
28
|
+
private static CURRENT_VERSION;
|
|
29
|
+
static serialize(panes: readonly PaneDescriptor[], drawings: readonly DrawingObject[], settings: WorkspaceSettings): string;
|
|
30
|
+
static deserialize(jsonString: string): WorkspaceSchema | null;
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime a host may ask for.
|
|
3
|
+
*
|
|
4
|
+
* `"legacy"` was removed on 2026-10-03 along with the DynamicChart lane
|
|
5
|
+
* (G4). `"auto"` stays as a deprecated alias of fork, so hosts that still pass it
|
|
6
|
+
* keep working. See ledger `G4_LEGACY_CUT_2026-10-03`.
|
|
7
|
+
*/
|
|
8
|
+
export type RequestedWidgetRuntime = "fork" | "auto";
|
|
9
|
+
/**
|
|
10
|
+
* Runtime a host can observe.
|
|
11
|
+
*
|
|
12
|
+
* Narrowed to `"fork"` in 0.1.0, when the legacy lane was removed (the version was
|
|
13
|
+
* 3.0.0 until 05d67df renamed it). It stayed a two-member union through the lane's
|
|
14
|
+
* existence purely so existing
|
|
15
|
+
* `onRuntimeResolved` consumers kept compiling, which is why the demo's own policy
|
|
16
|
+
* return type could not be narrowed either.
|
|
17
|
+
*/
|
|
18
|
+
export type ResolvedWidgetRuntime = "fork";
|
|
19
|
+
export type WidgetRuntimeReasonCode = "EXPLICIT_FORK_REQUEST" | "DEFAULT_FORK_RUNTIME" | "DRAWING_UI_DISABLED" | "TOOL_NOT_REGISTERED" | "TOOL_AUTHORING_UNSUPPORTED" | "SELECTED_TOOL_MANIPULATION_UNSUPPORTED" | "TOOL_STATUS_DISABLED" | "AUTO_DEFAULT_FORK_RUNTIME" | "FORK_CAPABILITY_OK";
|
|
20
|
+
export interface WidgetRuntimePolicyInput {
|
|
21
|
+
engineRuntime?: RequestedWidgetRuntime;
|
|
22
|
+
drawingUiEnabled?: boolean;
|
|
23
|
+
drawingActiveTool?: string;
|
|
24
|
+
selectedDrawingType?: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface WidgetRuntimePolicyOutput {
|
|
27
|
+
resolvedRuntime: ResolvedWidgetRuntime;
|
|
28
|
+
reasonCode: WidgetRuntimeReasonCode;
|
|
29
|
+
}
|
|
30
|
+
export declare function evaluateRuntimePolicy(input: WidgetRuntimePolicyInput): WidgetRuntimePolicyOutput;
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Always `false` since the legacy lane was removed on 2026-10-03.
|
|
33
|
+
* Removed from the public API in the same release that dropped DynamicChart.
|
|
34
|
+
*/
|
|
35
|
+
export declare function shouldForceLegacyRuntime(_input: Pick<WidgetRuntimePolicyInput, "drawingUiEnabled" | "drawingActiveTool" | "selectedDrawingType">): boolean;
|
|
36
|
+
export declare function resolveRequestedRuntime(input: WidgetRuntimePolicyInput): ResolvedWidgetRuntime;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-inject VNInvestCharts CSS styling into <head> or ShadowRoot at runtime.
|
|
3
|
+
* This ensures layouts remain intact when importing via React ESM module or IIFE Shadow DOM.
|
|
4
|
+
*
|
|
5
|
+
* Imports combined CSS as raw string for runtime injection.
|
|
6
|
+
* Components use CSS Modules (.module.css) for scoped styles.
|
|
7
|
+
*/
|
|
8
|
+
/** Inject widget CSS into Document, ShadowRoot or HTMLElement if not already present. Safe for SSR. */
|
|
9
|
+
export declare function injectVNInvestChartsCSS(target: Document | ShadowRoot | HTMLElement): HTMLStyleElement | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ThemeConfig {
|
|
2
|
+
mode: "dark" | "light";
|
|
3
|
+
presetName?: string;
|
|
4
|
+
colors?: Partial<{
|
|
5
|
+
bullish: string;
|
|
6
|
+
bearish: string;
|
|
7
|
+
primary: string;
|
|
8
|
+
accent: string;
|
|
9
|
+
bgPrimary: string;
|
|
10
|
+
bgSecondary: string;
|
|
11
|
+
textPrimary: string;
|
|
12
|
+
textSecondary: string;
|
|
13
|
+
border: string;
|
|
14
|
+
grid: string;
|
|
15
|
+
gridSubtle: string;
|
|
16
|
+
gridDash: string;
|
|
17
|
+
gridWidth: string;
|
|
18
|
+
crosshair: string;
|
|
19
|
+
indicators: string[];
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { OverlayBounds } from "./InteractivePositionOverlay";
|
|
2
|
+
export interface DraggableOrderHandlesProps {
|
|
3
|
+
kind: "SL" | "TP";
|
|
4
|
+
price: number;
|
|
5
|
+
baseQuantity: number;
|
|
6
|
+
contractMultiplier?: number;
|
|
7
|
+
accountEquity: number;
|
|
8
|
+
toY: (price: number) => number | null;
|
|
9
|
+
toPrice: (pixelY: number) => number | null;
|
|
10
|
+
bounds: OverlayBounds;
|
|
11
|
+
tickSize: number;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onCommit?: (nextPrice: number) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare function DraggableOrderHandles({ kind, price, baseQuantity, contractMultiplier, accountEquity, toY, toPrice, bounds, tickSize, disabled, onCommit, }: DraggableOrderHandlesProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TradingPosition } from "../../../lib/core/trading/types";
|
|
2
|
+
export interface OverlayBounds {
|
|
3
|
+
top: number;
|
|
4
|
+
bottom: number;
|
|
5
|
+
}
|
|
6
|
+
export interface AxisTagPlacement {
|
|
7
|
+
left: number;
|
|
8
|
+
width: number;
|
|
9
|
+
}
|
|
10
|
+
export interface InteractivePositionOverlayProps {
|
|
11
|
+
position: TradingPosition;
|
|
12
|
+
toY: (price: number) => number | null;
|
|
13
|
+
bounds: OverlayBounds;
|
|
14
|
+
axis?: AxisTagPlacement | null;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
onReverse?: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function InteractivePositionOverlay({ position, toY, bounds, axis, disabled, onClose, onReverse, }: InteractivePositionOverlayProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TradingOrder } from "../../../lib/core/trading/types";
|
|
2
|
+
import type { AxisTagPlacement, OverlayBounds } from "./InteractivePositionOverlay";
|
|
3
|
+
export interface PendingOrderOverlayProps {
|
|
4
|
+
order: TradingOrder;
|
|
5
|
+
toY: (price: number) => number | null;
|
|
6
|
+
bounds: OverlayBounds;
|
|
7
|
+
axis?: AxisTagPlacement | null;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function PendingOrderOverlay({ order, toY, bounds, axis, disabled, onCancel }: PendingOrderOverlayProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MarketQuote } from "../../../lib/core/trading/MarketDataPort";
|
|
2
|
+
export interface QuickTradingHeaderProps {
|
|
3
|
+
symbol: string;
|
|
4
|
+
quote?: MarketQuote | null;
|
|
5
|
+
defaultQuantity?: number;
|
|
6
|
+
lotSize?: number;
|
|
7
|
+
maxQuantity?: number;
|
|
8
|
+
defaultOneClick?: boolean;
|
|
9
|
+
onQuantityChange?: (quantity: number) => void;
|
|
10
|
+
onToggleOneClick?: (enabled: boolean) => void;
|
|
11
|
+
onBuy?: (quantity: number) => void;
|
|
12
|
+
onSell?: (quantity: number) => void;
|
|
13
|
+
onOpenTicket?: (side: "buy" | "sell", quantity: number) => void;
|
|
14
|
+
/** Task M4: ẩn/hiện paper trading của chart (mắt). Bật lại từ Settings. */
|
|
15
|
+
tradingEnabled?: boolean;
|
|
16
|
+
onToggleTradingEnabled?: (enabled: boolean) => void;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
spreadUnit?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function QuickTradingHeader({ symbol, quote, defaultQuantity, lotSize, maxQuantity, defaultOneClick, onQuantityChange, onToggleOneClick, onBuy, onSell, onOpenTicket, tradingEnabled, onToggleTradingEnabled, disabled, spreadUnit, }: QuickTradingHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PaneRuntimeSnapshot, VisibleRange as EngineVisibleRange } from "@vninvestcharts/engine-react";
|
|
2
|
+
export interface TradingChartSurfaceProps {
|
|
3
|
+
snapshot?: PaneRuntimeSnapshot | null;
|
|
4
|
+
visibleRange?: EngineVisibleRange | null;
|
|
5
|
+
scaleSlotId?: string;
|
|
6
|
+
drawingActive?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function TradingChartSurface({ snapshot, visibleRange, scaleSlotId, drawingActive }: TradingChartSurfaceProps): import("react").JSX.Element;
|