@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,57 @@
|
|
|
1
|
+
export interface ChartImperativeHandleContext {
|
|
2
|
+
props: any;
|
|
3
|
+
localSymbol: any;
|
|
4
|
+
settings: any;
|
|
5
|
+
isForkRuntime: any;
|
|
6
|
+
engineInstanceRef: any;
|
|
7
|
+
dataResult: any;
|
|
8
|
+
resolvedLegacyVisibleRange: any;
|
|
9
|
+
paneState: any;
|
|
10
|
+
comparisonState: any;
|
|
11
|
+
drawingsResult: any;
|
|
12
|
+
replay: any;
|
|
13
|
+
/**
|
|
14
|
+
* W1.4 — single entitlement source for image export. When false, the public
|
|
15
|
+
* `saveAsImage()` ref method is a no-op, so a host integration cannot bypass the
|
|
16
|
+
* UI gate. Same shape as `canUseReplay` above: **required boolean, truthy check**
|
|
17
|
+
* ⇒ `undefined` counts as not granted (fail-closed).
|
|
18
|
+
*/
|
|
19
|
+
canExportImage: boolean;
|
|
20
|
+
/** Called instead of exporting when the tier does not grant it. */
|
|
21
|
+
onExportBlocked?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* AUTH-03: single entitlement source for replay. Every mutating replay entry
|
|
24
|
+
* point is a no-op when false, so a Free tier cannot drive replay through the
|
|
25
|
+
* imperative ref even if it bypasses the UI gate.
|
|
26
|
+
*/
|
|
27
|
+
canUseReplay: boolean;
|
|
28
|
+
replayTrading: any;
|
|
29
|
+
replayAwaitingStartBar: any;
|
|
30
|
+
setLegacyVisibleRange: any;
|
|
31
|
+
setChartType: any;
|
|
32
|
+
setIsFrozen: any;
|
|
33
|
+
isFrozen: any;
|
|
34
|
+
setAlertsModalOpen: any;
|
|
35
|
+
setReplayAwaitingStartBar: any;
|
|
36
|
+
isRemoteVisibleRangeRef: any;
|
|
37
|
+
lastRemoteRangeRef: any;
|
|
38
|
+
pendingSyncTimeRangeRef: any;
|
|
39
|
+
visibleRangeTimeoutRef: any;
|
|
40
|
+
isRemoteCrosshairRef: any;
|
|
41
|
+
isRemoteDrawingChangeRef: any;
|
|
42
|
+
syncDrawingHandlersRef: any;
|
|
43
|
+
syncViewportHandlersRef: any;
|
|
44
|
+
replayBarVisibleRef: any;
|
|
45
|
+
replayAwaitingStartBarRef: any;
|
|
46
|
+
suppressReplayTickRef: any;
|
|
47
|
+
onDataChangeCallbacks: any;
|
|
48
|
+
onIndicatorsChangeCallbacks: any;
|
|
49
|
+
containerRef: any;
|
|
50
|
+
handleSaveTemplate: any;
|
|
51
|
+
handleLoadTemplate: any;
|
|
52
|
+
legacyPaneSnapshots: any;
|
|
53
|
+
paneSnapshots: any;
|
|
54
|
+
legacyCoordinateBridge: any;
|
|
55
|
+
CHART_TYPE_MAP: any;
|
|
56
|
+
}
|
|
57
|
+
export declare function useChartImperativeHandle(ref: any, ctx: ChartImperativeHandleContext): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ClockAdapter } from "@vninvestcharts/engine-react";
|
|
2
|
+
export interface UseClockAdapterOptions {
|
|
3
|
+
clockAdapter?: ClockAdapter;
|
|
4
|
+
}
|
|
5
|
+
export declare function useClockAdapter(options?: UseClockAdapterOptions): {
|
|
6
|
+
now: () => number;
|
|
7
|
+
requestFrame: (callback: (time: number) => void) => number;
|
|
8
|
+
cancelFrame: (id: number) => void;
|
|
9
|
+
setTimeout: (callback: () => void, delay: number) => number;
|
|
10
|
+
clearTimeout: (id: number) => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface ComparisonOverlayEntry {
|
|
2
|
+
symbolId: string;
|
|
3
|
+
normalizeToBaseline: boolean;
|
|
4
|
+
visible: boolean;
|
|
5
|
+
color: string;
|
|
6
|
+
yAxis: "left" | "right";
|
|
7
|
+
lineWidth: number;
|
|
8
|
+
lineStyle: "solid" | "dashed" | "dotted";
|
|
9
|
+
fillArea: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface UseComparisonStateResult {
|
|
12
|
+
/** Stable per-mount identity. Feed to comparisonSeriesId to build this chart's series ids. */
|
|
13
|
+
scope: string;
|
|
14
|
+
overlays: ComparisonOverlayEntry[];
|
|
15
|
+
addSymbol: (symbolId: string, options?: {
|
|
16
|
+
normalizeToBaseline?: boolean;
|
|
17
|
+
color?: string;
|
|
18
|
+
yAxis?: "left" | "right";
|
|
19
|
+
lineWidth?: number;
|
|
20
|
+
lineStyle?: "solid" | "dashed" | "dotted";
|
|
21
|
+
fillArea?: boolean;
|
|
22
|
+
}) => void;
|
|
23
|
+
removeSymbol: (symbolId: string) => void;
|
|
24
|
+
toggleVisibility: (symbolId: string) => void;
|
|
25
|
+
updateOverlay: (symbolId: string, partial: Partial<ComparisonOverlayEntry>) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare function createComparisonScope(): string;
|
|
28
|
+
export declare function comparisonSeriesId(scope: string, symbolId: string): string;
|
|
29
|
+
export declare function useComparisonState(storageId?: string | null): UseComparisonStateResult;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
export interface UseDialogFocusOptions {
|
|
3
|
+
/** Whether the dialog is currently open. Focus is only managed while true. */
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Escape key handler. */
|
|
6
|
+
onEscape?: () => void;
|
|
7
|
+
/** Element to focus on open. Falls back to the first focusable node. */
|
|
8
|
+
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
9
|
+
/** Disable the Tab loop (for non-modal panels). */
|
|
10
|
+
trapTab?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* UX-02 — shared dialog focus contract.
|
|
14
|
+
*
|
|
15
|
+
* Before this hook each dialog handled focus ad hoc, so none of them trapped
|
|
16
|
+
* Tab and none returned focus to the trigger: keyboard users were stranded
|
|
17
|
+
* inside a modal, and after closing it focus fell back to the document root.
|
|
18
|
+
*
|
|
19
|
+
* Responsibilities:
|
|
20
|
+
* - move focus into the dialog on open (explicit target, else first focusable)
|
|
21
|
+
* - keep Tab / Shift+Tab inside the dialog while it is open
|
|
22
|
+
* - call `onEscape` on Escape
|
|
23
|
+
* - restore focus to the element focused before the dialog opened
|
|
24
|
+
*/
|
|
25
|
+
export declare function useDialogFocus(containerRef: RefObject<HTMLElement | null>, { open, onEscape, initialFocusRef, trapTab }: UseDialogFocusOptions): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PatTier } from "@vninvestcharts/engine-core";
|
|
2
|
+
interface DrawingToolShortcutsOptions {
|
|
3
|
+
onToolSelect: (toolId: string) => void;
|
|
4
|
+
/** Current PAT tier for premium tool gating. Defaults to "free" when undefined. */
|
|
5
|
+
patTier?: PatTier;
|
|
6
|
+
/** Called when a premium tool is blocked via keyboard shortcut */
|
|
7
|
+
onPremiumToolClick?: (tool: string) => void;
|
|
8
|
+
/** S2.1: when false, no listener is registered (standalone-only mount). */
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/** S4/BUG-6: Shift+M magnet cycle (non-tool action, branched before premium gate). */
|
|
11
|
+
onMagnetCycle?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/** S4: action id reserved for magnet cycling — never a DrawingToolType. */
|
|
14
|
+
export declare const MAGNET_TOGGLE_ACTION = "toggleMagnet";
|
|
15
|
+
export declare function useDrawingToolShortcuts({ onToolSelect, patTier, onPremiumToolClick, enabled, onMagnetCycle }: DrawingToolShortcutsOptions): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SaaSFeatureFlags, TenantMetadata, AdCampaign } from '../types/saas';
|
|
2
|
+
export interface UseFeatureGateReturn {
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
flags: SaaSFeatureFlags;
|
|
6
|
+
tenantMetadata: TenantMetadata | null;
|
|
7
|
+
error: string | null;
|
|
8
|
+
checkFeature: (feature: keyof SaaSFeatureFlags) => boolean;
|
|
9
|
+
invalidateCache: () => void;
|
|
10
|
+
adCampaign: AdCampaign | null;
|
|
11
|
+
isAdLoading: boolean;
|
|
12
|
+
adError: string | null;
|
|
13
|
+
refetchAd: () => Promise<void>;
|
|
14
|
+
/** Whether SaaS config was successfully fetched from server. */
|
|
15
|
+
isSaaSConfigAvailable: boolean;
|
|
16
|
+
userPat: string;
|
|
17
|
+
setUserPat: (pat: string) => boolean;
|
|
18
|
+
effectivePat: string;
|
|
19
|
+
/** The offline license channel. Never shadowed by tenantPat. Empty when none. */
|
|
20
|
+
effectiveLicense: string;
|
|
21
|
+
/** CS-3: attribution for the current tier. Never empty. */
|
|
22
|
+
sources: ("license" | "server" | "server-cache" | "host" | "none")[];
|
|
23
|
+
/** CS-3: why data features are degraded, or null when fully usable. */
|
|
24
|
+
degradedReason: "no-pat" | "plan-limited" | "offline" | "grace-expired" | null;
|
|
25
|
+
/** Last server rejection detail, or null. See SaaSFeatureContextValue. */
|
|
26
|
+
serverRejectReason?: string | null;
|
|
27
|
+
}
|
|
28
|
+
export declare function useFeatureGate(): UseFeatureGateReturn;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useFloatingChartBar — pan callbacks + action passthrough for FloatingChartBar.
|
|
3
|
+
*
|
|
4
|
+
* Pan reuses the scale-overlays SSOT (`scrollbar.onWindowChange`,
|
|
5
|
+
* useScaleOverlays.ts:250-268) clamped by `clampWindow`. Zoom/fit/toggle are
|
|
6
|
+
* pure passthrough of call-site closures (imperative handle via fan-out ref,
|
|
7
|
+
* GridContainer.toggleMaximize) — zero duplicated math in this file.
|
|
8
|
+
*/
|
|
9
|
+
export interface FloatingBarScrollbar {
|
|
10
|
+
dataLength: number;
|
|
11
|
+
from: number;
|
|
12
|
+
to: number;
|
|
13
|
+
onWindowChange: (from: number, to: number) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface UseFloatingChartBarInput {
|
|
16
|
+
zoomIn: () => void;
|
|
17
|
+
zoomOut: () => void;
|
|
18
|
+
fitToData: () => void;
|
|
19
|
+
scrollbar: FloatingBarScrollbar | null;
|
|
20
|
+
onToggleLayout?: () => void;
|
|
21
|
+
isSoloMode?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface UseFloatingChartBarOutput {
|
|
24
|
+
onZoomIn: () => void;
|
|
25
|
+
onZoomOut: () => void;
|
|
26
|
+
onPanLeft: () => void;
|
|
27
|
+
onPanRight: () => void;
|
|
28
|
+
onFitToData: () => void;
|
|
29
|
+
onToggleLayout?: () => void;
|
|
30
|
+
isSoloMode?: boolean;
|
|
31
|
+
panDisabled: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function useFloatingChartBar(input: UseFloatingChartBarInput): UseFloatingChartBarOutput;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { type EngineInstance, type VisibleRange as EngineVisibleRange, type EngineOverlayState, type EngineOverlayInputs, type EngineOverlayDrawingPrimitiveInput, type PaneRuntimeSnapshot, type CrosshairMode } from "@vninvestcharts/engine-core";
|
|
2
|
+
import type { CrosshairPayload, ClockAdapter } from "@vninvestcharts/engine-react";
|
|
3
|
+
import { type PaneDescriptor } from "../../lib/core";
|
|
4
|
+
import { type EnrichedDatum } from "../../lib/core/calculators/types";
|
|
5
|
+
import { type WidgetPaneRuntimeSnapshot, type WidgetRuntimeCapabilities, type ForkXAxisTick, type ForkXAxisHoverLabel } from "../utils/widgetHelpers";
|
|
6
|
+
import type { MagnetSensitivity } from "@vninvestcharts/engine-drawing";
|
|
7
|
+
import type { DrawingObject } from "@vninvestcharts/engine-drawing";
|
|
8
|
+
import type { DrawingWorkspaceController } from "@vninvestcharts/engine-react";
|
|
9
|
+
export interface UseForkRuntimeOptions {
|
|
10
|
+
useForkRuntime: boolean;
|
|
11
|
+
plotData: readonly EnrichedDatum[];
|
|
12
|
+
enrichedData: readonly EnrichedDatum[];
|
|
13
|
+
bars: readonly any[];
|
|
14
|
+
visiblePanes: readonly PaneDescriptor[];
|
|
15
|
+
size: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
scaleSlotDomains: Record<string, [number, number]>;
|
|
20
|
+
activeHeights: number[];
|
|
21
|
+
engineInstanceRef: React.MutableRefObject<EngineInstance | null>;
|
|
22
|
+
forkEngineInstance: EngineInstance | null;
|
|
23
|
+
setForkEngineInstance: React.Dispatch<React.SetStateAction<EngineInstance | null>>;
|
|
24
|
+
forkVisibleRange: EngineVisibleRange | null;
|
|
25
|
+
setForkVisibleRange: React.Dispatch<React.SetStateAction<EngineVisibleRange | null>>;
|
|
26
|
+
forkVisibleRangeRef: React.MutableRefObject<EngineVisibleRange | null>;
|
|
27
|
+
forkPaneSnapshotsRef: React.MutableRefObject<readonly WidgetPaneRuntimeSnapshot[]>;
|
|
28
|
+
paneSnapshots: readonly WidgetPaneRuntimeSnapshot[];
|
|
29
|
+
setPaneSnapshots: React.Dispatch<React.SetStateAction<readonly WidgetPaneRuntimeSnapshot[]>>;
|
|
30
|
+
snapshotRevision: number;
|
|
31
|
+
incrementSnapshotRevision: () => void;
|
|
32
|
+
onPaneSnapshotsChange: ((snapshots: readonly WidgetPaneRuntimeSnapshot[]) => void) | undefined;
|
|
33
|
+
onVisibleDomainChange: ((domain: [Date | number, Date | number]) => void) | undefined;
|
|
34
|
+
controlledXExtents: readonly [Date | number, Date | number] | undefined;
|
|
35
|
+
internalXExtents: readonly [Date | number, Date | number] | undefined;
|
|
36
|
+
setInternalXExtents: React.Dispatch<React.SetStateAction<readonly [Date | number, Date | number] | undefined>>;
|
|
37
|
+
symbol: string | undefined;
|
|
38
|
+
localRange: string | undefined;
|
|
39
|
+
showNonTradingDays: boolean;
|
|
40
|
+
chartSurfaceReady: boolean;
|
|
41
|
+
emitCoordinateBridge: (snapshots: readonly WidgetPaneRuntimeSnapshot[], range: EngineVisibleRange | null) => void;
|
|
42
|
+
pendingForkVisibleRangeRef: React.MutableRefObject<EngineVisibleRange | null>;
|
|
43
|
+
pendingForkVisibleRangeRafRef: React.MutableRefObject<number | null>;
|
|
44
|
+
lastStableForkSpanRef: React.MutableRefObject<number | null>;
|
|
45
|
+
pendingHistoryPatchRef: React.MutableRefObject<any>;
|
|
46
|
+
lastEmittedPaneSnapshotsRef: React.MutableRefObject<readonly WidgetPaneRuntimeSnapshot[]>;
|
|
47
|
+
lastPaneSnapshotsSubscriberRef: React.MutableRefObject<((snapshots: readonly WidgetPaneRuntimeSnapshot[]) => void) | undefined>;
|
|
48
|
+
resolvedLegacyVisibleRangeRef: React.MutableRefObject<any>;
|
|
49
|
+
drawingUiEnabled: boolean;
|
|
50
|
+
isEditingText: boolean;
|
|
51
|
+
drawingWorkspace: DrawingWorkspaceController;
|
|
52
|
+
resolvedDrawings: readonly DrawingObject[];
|
|
53
|
+
resolvedSelectedDrawing: DrawingObject | null;
|
|
54
|
+
resolvedForkSingleSelection: DrawingObject | null;
|
|
55
|
+
onSelectedDrawingChange: ((drawing: DrawingObject | null) => void) | undefined;
|
|
56
|
+
magnetSensitivity: MagnetSensitivity;
|
|
57
|
+
/** P2: crosshair display mode (cross | dot | magnet). Applied to the engine on ready + change. */
|
|
58
|
+
crosshairMode?: CrosshairMode;
|
|
59
|
+
forkMovableSelectionIds: readonly string[];
|
|
60
|
+
activeForkManipulationDrawing: DrawingObject | null;
|
|
61
|
+
forkSelectionModifierPressed: boolean;
|
|
62
|
+
closeForkDrawingContextMenu: () => void;
|
|
63
|
+
setForkDrawingContextMenu: (menu: any) => void;
|
|
64
|
+
onContextMenu: ((payload: any, nativeEvent: any) => void) | undefined;
|
|
65
|
+
onClick: ((payload: any, nativeEvent: any) => void) | undefined;
|
|
66
|
+
forkAltShortcutPressedRef: React.MutableRefObject<boolean>;
|
|
67
|
+
copySelectedDrawing: () => void;
|
|
68
|
+
pasteCopiedDrawing: () => void;
|
|
69
|
+
bringSelectedToFront: () => void;
|
|
70
|
+
sendSelectedToBack: () => void;
|
|
71
|
+
updateForkReadonlySelection: (drawing: DrawingObject | null) => void;
|
|
72
|
+
updateForkReadonlySelectionByIds: (ids: readonly string[]) => void;
|
|
73
|
+
onRuntimeDegraded: ((reason: "fork-no-render-output") => void) | undefined;
|
|
74
|
+
resolvedTheme: any;
|
|
75
|
+
activeLocale: string;
|
|
76
|
+
forkCameraEnvelopeMode: string;
|
|
77
|
+
setForkCameraEnvelopeMode: React.Dispatch<React.SetStateAction<string>>;
|
|
78
|
+
handleForkVisibleRangeChange: (range: any) => void;
|
|
79
|
+
activeTimeframe: string;
|
|
80
|
+
enableCVD: boolean;
|
|
81
|
+
cvdMode: string;
|
|
82
|
+
externalCvdSeries: any[];
|
|
83
|
+
cvdData: any[];
|
|
84
|
+
whaleEvents: any[];
|
|
85
|
+
showDrawingPriceMarkers: boolean;
|
|
86
|
+
resolvedForkPriceMarkerSelection: DrawingObject | null;
|
|
87
|
+
forkOverlayState: EngineOverlayState | null;
|
|
88
|
+
setForkOverlayState: React.Dispatch<React.SetStateAction<EngineOverlayState | null>>;
|
|
89
|
+
measurementEnabled: boolean;
|
|
90
|
+
forkRenderableDrawings: readonly DrawingObject[];
|
|
91
|
+
forkPointerOwnerRef: React.MutableRefObject<any>;
|
|
92
|
+
claimForkPointerOwner: (owner: any) => void;
|
|
93
|
+
releaseForkPointerOwner: (owner: any) => void;
|
|
94
|
+
handleForkPointerDown: (event: any) => void;
|
|
95
|
+
handleForkPointerMove: (event: any) => void;
|
|
96
|
+
handleForkPointerUp: (event: any) => void;
|
|
97
|
+
handleForkPointerLeave: (event: any) => void;
|
|
98
|
+
handleForkClick: (event: any) => void;
|
|
99
|
+
handleForkContextMenu: (event: any) => void;
|
|
100
|
+
handleForkHostContextMenu: (event: any) => void;
|
|
101
|
+
clockAdapter?: ClockAdapter;
|
|
102
|
+
handleForkDrawingClick: (event: any) => void;
|
|
103
|
+
cancelForkInteraction: () => void;
|
|
104
|
+
forkSurfaceCursor: string;
|
|
105
|
+
forkPreviewRevision: number;
|
|
106
|
+
forkManipulationActive: boolean;
|
|
107
|
+
forkManipulationActiveRef?: React.MutableRefObject<boolean>;
|
|
108
|
+
forkRubberBandSelection: any;
|
|
109
|
+
forkDrawingContextMenu: any;
|
|
110
|
+
resolvedForkPrimitiveSelection: DrawingObject | null;
|
|
111
|
+
dateFormatPattern?: "yyyy-mm-dd" | "dd/mm/yyyy" | "mm/dd/yyyy";
|
|
112
|
+
onRuntimeCapabilitiesChange?: (caps: WidgetRuntimeCapabilities) => void;
|
|
113
|
+
t: (key: string) => string;
|
|
114
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
115
|
+
legacyPaneSnapshots: readonly WidgetPaneRuntimeSnapshot[];
|
|
116
|
+
legacyChartScale: import("../runtime/IRuntimeEngine").IRuntimeScale;
|
|
117
|
+
visibleDomainRef: React.MutableRefObject<[Date, Date] | null>;
|
|
118
|
+
requestVisibleHistoryWindowSync: any;
|
|
119
|
+
onPaneHover?: (paneId: string | null) => void;
|
|
120
|
+
onCrosshairChange?: (crosshair: CrosshairPayload) => void;
|
|
121
|
+
hoveredPaneId: string | null;
|
|
122
|
+
setHoveredPaneId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
123
|
+
hoveredPaneIdRef: React.MutableRefObject<string | null>;
|
|
124
|
+
activeSymbol?: string;
|
|
125
|
+
adapterLabel: string;
|
|
126
|
+
forkChartRenderContextValue: any;
|
|
127
|
+
forkStockChartContextValue: any;
|
|
128
|
+
replayTradeMarkerFn?: (visibleRange: EngineVisibleRange, paneSnapshots: readonly PaneRuntimeSnapshot[]) => EngineOverlayDrawingPrimitiveInput[] | null;
|
|
129
|
+
/** When set and .current is true, wall-clock gap extension is suppressed (replay mode). */
|
|
130
|
+
replayActiveRef?: React.MutableRefObject<boolean>;
|
|
131
|
+
}
|
|
132
|
+
export interface UseForkRuntimeReturn {
|
|
133
|
+
forkChartRenderContextValue: any;
|
|
134
|
+
forkStockChartContextValue: any;
|
|
135
|
+
forkXAxisTicks: ForkXAxisTick[];
|
|
136
|
+
forkXAxisHoverLabel: ForkXAxisHoverLabel | undefined;
|
|
137
|
+
forkHoveredDatum: EnrichedDatum | undefined;
|
|
138
|
+
effectiveForkVisibleRange: EngineVisibleRange | null;
|
|
139
|
+
forkDrawingPrimitiveInputs: any[];
|
|
140
|
+
shouldLockForkPan: boolean;
|
|
141
|
+
forkOverlayInputs: EngineOverlayInputs;
|
|
142
|
+
engineDataSource: any;
|
|
143
|
+
runtimeCapabilities: WidgetRuntimeCapabilities;
|
|
144
|
+
paneSnapshotMap: Map<string, WidgetPaneRuntimeSnapshot>;
|
|
145
|
+
forkDrawingContextMenuDrawing: DrawingObject | null;
|
|
146
|
+
forkDrawingContextMenuItems: readonly any[];
|
|
147
|
+
forkCanvasContextMenuItems: readonly any[];
|
|
148
|
+
handleEngineReady: (engine: EngineInstance) => void;
|
|
149
|
+
handleForkOverlayStateChange: (overlayState: EngineOverlayState) => void;
|
|
150
|
+
emitHoveredPaneId: (paneId: string | null) => void;
|
|
151
|
+
handleWidgetPointerMove: (event: any) => void;
|
|
152
|
+
handleWidgetPointerLeave: () => void;
|
|
153
|
+
forkDegradeNotifiedRef: React.MutableRefObject<boolean>;
|
|
154
|
+
}
|
|
155
|
+
export declare function useForkRuntime({ useForkRuntime, plotData, bars, visiblePanes, scaleSlotDomains, engineInstanceRef, forkEngineInstance, setForkEngineInstance, forkVisibleRange, setForkVisibleRange, forkVisibleRangeRef, forkPaneSnapshotsRef, paneSnapshots, setPaneSnapshots, snapshotRevision, incrementSnapshotRevision, onPaneSnapshotsChange, onVisibleDomainChange, controlledXExtents, internalXExtents, setInternalXExtents, symbol, localRange, showNonTradingDays, chartSurfaceReady, emitCoordinateBridge, pendingForkVisibleRangeRef, pendingForkVisibleRangeRafRef, lastStableForkSpanRef, pendingHistoryPatchRef, lastEmittedPaneSnapshotsRef, lastPaneSnapshotsSubscriberRef, resolvedLegacyVisibleRangeRef, drawingUiEnabled, isEditingText, drawingWorkspace, resolvedDrawings, resolvedSelectedDrawing, resolvedForkSingleSelection, onSelectedDrawingChange, forkDrawingContextMenu, forkRenderableDrawings, forkPreviewRevision, forkManipulationActive, forkManipulationActiveRef, magnetSensitivity, crosshairMode, dateFormatPattern, forkMovableSelectionIds, activeForkManipulationDrawing, forkSelectionModifierPressed, closeForkDrawingContextMenu, clockAdapter, setForkDrawingContextMenu, onContextMenu, onClick, forkAltShortcutPressedRef, copySelectedDrawing, pasteCopiedDrawing, bringSelectedToFront, sendSelectedToBack, onRuntimeDegraded, resolvedTheme, setForkCameraEnvelopeMode, activeTimeframe, showDrawingPriceMarkers, resolvedForkPriceMarkerSelection, forkOverlayState, setForkOverlayState, measurementEnabled, forkPointerOwnerRef, t, containerRef, legacyPaneSnapshots, legacyChartScale, visibleDomainRef, requestVisibleHistoryWindowSync, onPaneHover, onCrosshairChange, setHoveredPaneId, hoveredPaneIdRef, activeSymbol, adapterLabel, resolvedForkPrimitiveSelection, onRuntimeCapabilitiesChange, forkChartRenderContextValue, forkStockChartContextValue, replayTradeMarkerFn, replayActiveRef, }: UseForkRuntimeOptions): UseForkRuntimeReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useIndicatorsShareApplier(chartId: string | null | undefined): void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface IntersectionObserverOptions {
|
|
2
|
+
/** Root element for intersection calculations (default: viewport) */
|
|
3
|
+
root?: Element | null;
|
|
4
|
+
/** Margin around root (e.g., "100px 0px") */
|
|
5
|
+
rootMargin?: string;
|
|
6
|
+
/** Threshold(s) for triggering callback (0-1) */
|
|
7
|
+
threshold?: number | number[];
|
|
8
|
+
/** Freeze when visibility drops below this threshold (default: 0.5) */
|
|
9
|
+
freezeThreshold?: number;
|
|
10
|
+
/** Thaw when visibility rises above this threshold (default: 0.1) */
|
|
11
|
+
thawThreshold?: number;
|
|
12
|
+
/** Minimum time frozen before allowing thaw (ms) */
|
|
13
|
+
minFreezeDuration?: number;
|
|
14
|
+
/** Debounce time for intersection changes (ms) */
|
|
15
|
+
debounceMs?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface IntersectionObserverResult {
|
|
18
|
+
/** Current intersection ratio (0-1) */
|
|
19
|
+
ratio: number;
|
|
20
|
+
/** Whether element is currently intersecting */
|
|
21
|
+
isIntersecting: boolean;
|
|
22
|
+
/** Whether WebGL context should be frozen */
|
|
23
|
+
isFrozen: boolean;
|
|
24
|
+
/** Whether WebGL context is thawing */
|
|
25
|
+
isThawing: boolean;
|
|
26
|
+
/** Current visibility state */
|
|
27
|
+
visibilityState: 'visible' | 'partial' | 'hidden';
|
|
28
|
+
/** Ref to attach to target element */
|
|
29
|
+
ref: (element: Element | null) => void;
|
|
30
|
+
/** Manually trigger freeze */
|
|
31
|
+
freeze: () => void;
|
|
32
|
+
/** Manually trigger thaw */
|
|
33
|
+
thaw: () => void;
|
|
34
|
+
}
|
|
35
|
+
export declare function useIntersectionObserver(options?: IntersectionObserverOptions): IntersectionObserverResult;
|
|
36
|
+
/**
|
|
37
|
+
* Hook for WebGL canvas freeze/thaw with snapshot support
|
|
38
|
+
*/
|
|
39
|
+
export declare function useWebGLFreezeThaw(options?: IntersectionObserverOptions & {
|
|
40
|
+
onFreeze?: () => Promise<void>;
|
|
41
|
+
onThaw?: () => Promise<void>;
|
|
42
|
+
}): IntersectionObserverResult;
|
|
43
|
+
/**
|
|
44
|
+
* Hook for multiple elements with shared freeze budget
|
|
45
|
+
*/
|
|
46
|
+
export declare function useIntersectionObserverGroup(elements: (Element | null)[], options?: IntersectionObserverOptions & {
|
|
47
|
+
maxConcurrent?: number;
|
|
48
|
+
}): IntersectionObserverResult[];
|
|
49
|
+
export default useIntersectionObserver;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { KeyboardAdapter } from "@vninvestcharts/engine-react";
|
|
2
|
+
export interface UseKeyboardAdapterOptions {
|
|
3
|
+
keyboardAdapter: KeyboardAdapter;
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function useKeyboardAdapter(options: UseKeyboardAdapterOptions): {
|
|
7
|
+
onKeyDown: (handler: (e: KeyboardEvent) => void) => () => void;
|
|
8
|
+
onShortcut: (combo: string, handler: () => void) => () => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChartLayout } from "@vninvestcharts/engine-react";
|
|
2
|
+
export declare function useLayoutHistory(initialLayout: ChartLayout): {
|
|
3
|
+
pushLayout: (layout: ChartLayout) => void;
|
|
4
|
+
undo: () => ChartLayout | null;
|
|
5
|
+
redo: () => ChartLayout | null;
|
|
6
|
+
canUndo: boolean;
|
|
7
|
+
canRedo: boolean;
|
|
8
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type LicenseDiagnosticReason = "insecure-context" | "subtle-unavailable" | null;
|
|
2
|
+
export interface LicenseDiagnostics {
|
|
3
|
+
/** False on plain http (non-localhost). WebCrypto requires a secure context. */
|
|
4
|
+
secureContext: boolean;
|
|
5
|
+
/** False when crypto.subtle is missing for any reason. */
|
|
6
|
+
subtleAvailable: boolean;
|
|
7
|
+
/** Non-null exactly when a license cannot be verified for environmental reasons. */
|
|
8
|
+
reason: LicenseDiagnosticReason;
|
|
9
|
+
}
|
|
10
|
+
export declare function useLicenseDiagnostics(): LicenseDiagnostics;
|
|
11
|
+
/**
|
|
12
|
+
* Pure environment probe, exported so the provider can report the same reason
|
|
13
|
+
* through `onLicenseDiagnostic` without mounting the hook. Same logic, one place.
|
|
14
|
+
*/
|
|
15
|
+
export declare function detectLicenseEnvironment(): LicenseDiagnosticReason;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { WidgetChartHandle } from "../utils/widgetHelpers";
|
|
2
|
+
export interface MultiChartReplaySyncOptions {
|
|
3
|
+
chartHandles: ReadonlyMap<string, WidgetChartHandle>;
|
|
4
|
+
charts: ReadonlyArray<{
|
|
5
|
+
id: string;
|
|
6
|
+
timeframe: string;
|
|
7
|
+
}>;
|
|
8
|
+
instanceId?: string;
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/** R1-a: 'all' (default) = slaves follow; 'single' = each chart replays alone. */
|
|
11
|
+
mode?: "single" | "all";
|
|
12
|
+
/** F-11: called exactly once per actual master change (not per heartbeat), incl. reset to null. */
|
|
13
|
+
onMasterChange?: (masterId: string | null) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface MultiChartReplaySyncResult {
|
|
16
|
+
masterChartId: string | null;
|
|
17
|
+
slaveChartIds: string[];
|
|
18
|
+
heartbeat: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function electMaster(activeStates: Map<string, {
|
|
21
|
+
tfMinutes: number;
|
|
22
|
+
currentBar: number;
|
|
23
|
+
totalBars: number;
|
|
24
|
+
barTimestamp?: number;
|
|
25
|
+
}>): string | null;
|
|
26
|
+
export declare function replayActive(state: {
|
|
27
|
+
currentBar: number;
|
|
28
|
+
totalBars: number;
|
|
29
|
+
playing: boolean;
|
|
30
|
+
}): boolean;
|
|
31
|
+
export declare function useMultiChartReplaySync(options: MultiChartReplaySyncOptions): MultiChartReplaySyncResult;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import type { ChartLayout } from "@vninvestcharts/engine-react";
|
|
3
|
+
import type { MultiChartConfig, VNInvestMultiChartsProps } from "../VNInvestMultiCharts";
|
|
4
|
+
import type { WidgetChartHandle } from "../utils/widgetHelpers";
|
|
5
|
+
import { type WorkspaceIndexEntry, type WorkspaceScope } from "../workspace/WorkspaceStore";
|
|
6
|
+
import type { PatTier } from "@vninvestcharts/engine-core";
|
|
7
|
+
/** Cấu hình phạm vi lưu trữ do host hoặc test truyền vào. */
|
|
8
|
+
export interface WorkspaceScopeInput {
|
|
9
|
+
/** Tier hiện tại để suy ra capability `server_workspace`. */
|
|
10
|
+
tier?: PatTier | null;
|
|
11
|
+
/** Allowlist `caps` của license (W0.6) — cũng có thể chặn `server_workspace`. */
|
|
12
|
+
licenseNarrowing?: readonly string[];
|
|
13
|
+
/** Ép dùng remote (chỉ test; EP-8 chưa tới nên sẽ ném 501). */
|
|
14
|
+
forceRemote?: boolean;
|
|
15
|
+
/** Probe backend đã sẵn sàng chưa (W0.4 `capabilityProbe`). */
|
|
16
|
+
backendReady?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface MultiWorkspacePersistenceDeps {
|
|
19
|
+
layout: ChartLayout;
|
|
20
|
+
charts: MultiChartConfig[];
|
|
21
|
+
currentWorkspaceId: string | null;
|
|
22
|
+
currentWorkspaceName: string;
|
|
23
|
+
activeChartId: string | null;
|
|
24
|
+
storageAdapter: VNInvestMultiChartsProps["storageAdapter"];
|
|
25
|
+
/**
|
|
26
|
+
* W0.7 — cấu hình phạm vi lưu trữ. `null`/bỏ qua = suy ra từ `tier` + `licenseNarrowing`.
|
|
27
|
+
* Xem `resolveWorkspaceStore`; chỉ sửa factory đó khi EP-8 tới.
|
|
28
|
+
*/
|
|
29
|
+
workspaceScope?: WorkspaceScopeInput;
|
|
30
|
+
onWorkspaceSave?: (workspaceId: string) => void;
|
|
31
|
+
onWorkspaceLoad?: (workspaceId: string) => void;
|
|
32
|
+
chartHandles: RefObject<Map<string, WidgetChartHandle>>;
|
|
33
|
+
setLayoutState: (layout: ChartLayout) => void;
|
|
34
|
+
setChartsState: (charts: MultiChartConfig[]) => void;
|
|
35
|
+
setCurrentWorkspaceId: (id: string | null) => void;
|
|
36
|
+
setCurrentWorkspaceName: (name: string) => void;
|
|
37
|
+
setActiveChartId: (id: string | null) => void;
|
|
38
|
+
}
|
|
39
|
+
export declare function useMultiWorkspacePersistence(deps: MultiWorkspacePersistenceDeps): {
|
|
40
|
+
saveWorkspace: (wsId: string) => Promise<void>;
|
|
41
|
+
loadWorkspace: (wsId: string) => Promise<void>;
|
|
42
|
+
/** Đọc index workspace đã lưu (danh sách cho UI Load). Xem giải thích ở phần cài đặt. */
|
|
43
|
+
listWorkspaces: () => Promise<readonly WorkspaceIndexEntry[]>;
|
|
44
|
+
/**
|
|
45
|
+
* W0.7 — phạm vi lưu trữ đang hoạt động. UI dùng để hiện badge
|
|
46
|
+
* "Chỉ lưu trên thiết bị này" khi scope là "local" (EP-8 chưa tới).
|
|
47
|
+
*/
|
|
48
|
+
workspaceScope: WorkspaceScope;
|
|
49
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type SizingMode = "fixed" | "percent";
|
|
2
|
+
export interface UsePaperTradeConfigOptions {
|
|
3
|
+
/** Fee rate (fraction, ví dụ 0.001 = 0.1%). Default 0 (backward-compat). */
|
|
4
|
+
feeRate?: number;
|
|
5
|
+
/** H2: slippage đơn giản (bps). Default 0. */
|
|
6
|
+
slippageBps?: number;
|
|
7
|
+
/** H4: fixed qty. Default 1. */
|
|
8
|
+
defaultQty?: number;
|
|
9
|
+
/** H4: sizing mode. "fixed" = defaultQty, "percent" = % of equity. Default "fixed". */
|
|
10
|
+
sizingMode?: SizingMode;
|
|
11
|
+
/** H4: risk % of equity per trade (khi sizingMode="percent"). Default 1 = 1%. */
|
|
12
|
+
riskPercent?: number;
|
|
13
|
+
/** H4: vốn ban đầu để tính % equity. Default 10000. */
|
|
14
|
+
initialEquity?: number;
|
|
15
|
+
/** Symbol của active chart (từ context). */
|
|
16
|
+
symbol?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface PaperTradeConfig {
|
|
19
|
+
feeRate: number;
|
|
20
|
+
slippageBps: number;
|
|
21
|
+
defaultQty: number;
|
|
22
|
+
sizingMode: SizingMode;
|
|
23
|
+
riskPercent: number;
|
|
24
|
+
initialEquity: number;
|
|
25
|
+
symbol?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function usePaperTradeConfig(options?: UsePaperTradeConfigOptions): PaperTradeConfig;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReplayOrder, ReplayPosition } from "../../lib/core/replay/replayTradingTypes";
|
|
2
|
+
export interface UseReplayTradingLike {
|
|
3
|
+
placeOrder: (order: Omit<ReplayOrder, "id" | "timestamp">) => void;
|
|
4
|
+
closePosition: (positionId: string) => void;
|
|
5
|
+
positions: ReplayPosition[];
|
|
6
|
+
}
|
|
7
|
+
export interface UsePaperTradeInteractionParams {
|
|
8
|
+
replayTrading: UseReplayTradingLike;
|
|
9
|
+
replayActive: boolean;
|
|
10
|
+
/** Khi true, Alt+click luôn chọn start bar (ngay cả sau Stop khi replayActive=false). = replay toolbar đang mở. */
|
|
11
|
+
replaySelectionEnabled?: boolean;
|
|
12
|
+
/** R2.1 CutMode: click thường chọn start bar, paper-trade bị vô hiệu hóa. */
|
|
13
|
+
isCutMode?: boolean;
|
|
14
|
+
baseOnClick?: (payload: any, nativeEvent: any) => void;
|
|
15
|
+
handleReplayStartBarSelect?: (date: Date | number) => void;
|
|
16
|
+
resolveActiveTool?: () => string | null | undefined;
|
|
17
|
+
defaultQty?: number;
|
|
18
|
+
symbol?: string;
|
|
19
|
+
feeRate?: number;
|
|
20
|
+
sizingMode?: "fixed" | "percent";
|
|
21
|
+
riskPercent?: number;
|
|
22
|
+
initialEquity?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface UsePaperTradeInteractionResult {
|
|
25
|
+
wrappedOnClick: (payload: any, nativeEvent: any) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare function usePaperTradeInteraction(params: UsePaperTradeInteractionParams): UsePaperTradeInteractionResult;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { planToTier, type Capability } from "@vninvestcharts/engine-core";
|
|
2
|
+
import type { VNInvestClient } from "../adapters/VNInvestClient";
|
|
3
|
+
export type WidgetPatTier = ReturnType<typeof planToTier>;
|
|
4
|
+
/**
|
|
5
|
+
* Whether an auth backend is explicitly configured. Explicit signals only:
|
|
6
|
+
* operator-injected client, global base override, or stored base override.
|
|
7
|
+
* The resolved-default base (page origin / placeholder) does NOT count — otherwise
|
|
8
|
+
* every standalone embed would fire doomed requests at its own origin.
|
|
9
|
+
*/
|
|
10
|
+
export declare function hasExplicitBackend(client?: VNInvestClient | null): boolean;
|
|
11
|
+
export interface PatTierAuthInput {
|
|
12
|
+
client?: VNInvestClient | null;
|
|
13
|
+
}
|
|
14
|
+
export interface PatTierAuth {
|
|
15
|
+
/** Fail-closed validator for EngineHost `validatePat` (+ independent widget checks). */
|
|
16
|
+
validatePat: (pat: string) => Promise<WidgetPatTier | null>;
|
|
17
|
+
/** Widget's own server-derived tier for the current effective PAT (null = none/unknown). */
|
|
18
|
+
widgetServerTier: WidgetPatTier | null;
|
|
19
|
+
/** Last tier reported back by the engine via `onTierValidated`. */
|
|
20
|
+
serverPatTier: WidgetPatTier | null;
|
|
21
|
+
/** Tier driving toolbar gating, trademark, ads and premium overlays. Never prefix-derived. */
|
|
22
|
+
effectiveToolbarTier: WidgetPatTier;
|
|
23
|
+
/** PAT forwarded to the engine: real token only when server confirmed pro+, else "". */
|
|
24
|
+
enginePat: string;
|
|
25
|
+
/** Last server rejection detail (verbatim from /auth/me), or null. Never shown raw without mapping. */
|
|
26
|
+
serverRejectReason: string | null;
|
|
27
|
+
/** True when no auth backend is configured (pure-free standalone mode). */
|
|
28
|
+
isStandalone: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* W0.6 — allowlist capability do **license ký số** thu hẹp (payload `caps`).
|
|
31
|
+
* `undefined` = license không giới hạn ⇒ dùng đầy đủ `MIN_TIER`.
|
|
32
|
+
* CHỈ có giá trị khi entitlement đến từ license, không phải từ PAT server.
|
|
33
|
+
* Dùng để gate Track A **hoàn toàn offline** (không cần `/access/capabilities`).
|
|
34
|
+
*/
|
|
35
|
+
licenseCapabilities: readonly Capability[] | undefined;
|
|
36
|
+
/** Downgrade banner state (pro → free transition). */
|
|
37
|
+
showDowngradeBanner: boolean;
|
|
38
|
+
/** Engine `onTierValidated` handler. */
|
|
39
|
+
handleTierValidated: (tier: string) => void;
|
|
40
|
+
handleDismissDowngrade: () => void;
|
|
41
|
+
}
|
|
42
|
+
export declare function usePatTierAuthentication(input: PatTierAuthInput): PatTierAuth;
|