@363045841yyt/klinechart-core 0.8.11-alpha.0 → 0.8.12
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/dist/alerts/createAlertController.d.ts +30 -0
- package/dist/alerts/createAlertController.d.ts.map +1 -0
- package/dist/alerts/createAlertController.js +261 -0
- package/dist/alerts/createAlertController.js.map +1 -0
- package/dist/alerts/index.d.ts +5 -0
- package/dist/alerts/index.d.ts.map +1 -0
- package/dist/alerts/index.js +4 -0
- package/dist/alerts/index.js.map +1 -0
- package/dist/alerts/predicates.d.ts +28 -0
- package/dist/alerts/predicates.d.ts.map +1 -0
- package/dist/alerts/predicates.js +211 -0
- package/dist/alerts/predicates.js.map +1 -0
- package/dist/alerts/rollingVolume.d.ts +15 -0
- package/dist/alerts/rollingVolume.d.ts.map +1 -0
- package/dist/alerts/rollingVolume.js +42 -0
- package/dist/alerts/rollingVolume.js.map +1 -0
- package/dist/alerts/ruleSchema.d.ts +42 -0
- package/dist/alerts/ruleSchema.d.ts.map +1 -0
- package/dist/alerts/ruleSchema.js +240 -0
- package/dist/alerts/ruleSchema.js.map +1 -0
- package/dist/alerts/types.d.ts +169 -0
- package/dist/alerts/types.d.ts.map +1 -0
- package/dist/alerts/types.js +24 -0
- package/dist/alerts/types.js.map +1 -0
- package/dist/chartTypes/heikinAshi.d.ts +49 -0
- package/dist/chartTypes/heikinAshi.d.ts.map +1 -0
- package/dist/chartTypes/heikinAshi.js +94 -0
- package/dist/chartTypes/heikinAshi.js.map +1 -0
- package/dist/chartTypes/index.d.ts +6 -0
- package/dist/chartTypes/index.d.ts.map +1 -0
- package/dist/chartTypes/index.js +5 -0
- package/dist/chartTypes/index.js.map +1 -0
- package/dist/chartTypes/pointAndFigure.d.ts +83 -0
- package/dist/chartTypes/pointAndFigure.d.ts.map +1 -0
- package/dist/chartTypes/pointAndFigure.js +159 -0
- package/dist/chartTypes/pointAndFigure.js.map +1 -0
- package/dist/chartTypes/rangeBars.d.ts +61 -0
- package/dist/chartTypes/rangeBars.d.ts.map +1 -0
- package/dist/chartTypes/rangeBars.js +181 -0
- package/dist/chartTypes/rangeBars.js.map +1 -0
- package/dist/chartTypes/renko.d.ts +94 -0
- package/dist/chartTypes/renko.d.ts.map +1 -0
- package/dist/chartTypes/renko.js +207 -0
- package/dist/chartTypes/renko.js.map +1 -0
- package/dist/chartTypes/types.d.ts +97 -0
- package/dist/chartTypes/types.d.ts.map +1 -0
- package/dist/chartTypes/types.js +39 -0
- package/dist/chartTypes/types.js.map +1 -0
- package/dist/components/anchoredVwap/computeAnchoredVwap.d.ts +76 -0
- package/dist/components/anchoredVwap/computeAnchoredVwap.d.ts.map +1 -0
- package/dist/components/anchoredVwap/computeAnchoredVwap.js +155 -0
- package/dist/components/anchoredVwap/computeAnchoredVwap.js.map +1 -0
- package/dist/components/anchoredVwap/createAnchoredVwapController.d.ts +28 -0
- package/dist/components/anchoredVwap/createAnchoredVwapController.d.ts.map +1 -0
- package/dist/components/anchoredVwap/createAnchoredVwapController.js +282 -0
- package/dist/components/anchoredVwap/createAnchoredVwapController.js.map +1 -0
- package/dist/components/anchoredVwap/index.d.ts +11 -0
- package/dist/components/anchoredVwap/index.d.ts.map +1 -0
- package/dist/components/anchoredVwap/index.js +10 -0
- package/dist/components/anchoredVwap/index.js.map +1 -0
- package/dist/components/anchoredVwap/types.d.ts +171 -0
- package/dist/components/anchoredVwap/types.d.ts.map +1 -0
- package/dist/components/anchoredVwap/types.js +25 -0
- package/dist/components/anchoredVwap/types.js.map +1 -0
- package/dist/components/crosshairSync/createCrosshairSync.d.ts +94 -0
- package/dist/components/crosshairSync/createCrosshairSync.d.ts.map +1 -0
- package/dist/components/crosshairSync/createCrosshairSync.js +118 -0
- package/dist/components/crosshairSync/createCrosshairSync.js.map +1 -0
- package/dist/components/crosshairSync/index.d.ts +2 -0
- package/dist/components/crosshairSync/index.d.ts.map +1 -0
- package/dist/components/crosshairSync/index.js +2 -0
- package/dist/components/crosshairSync/index.js.map +1 -0
- package/dist/components/footprint/aggressor.d.ts +89 -0
- package/dist/components/footprint/aggressor.d.ts.map +1 -0
- package/dist/components/footprint/aggressor.js +106 -0
- package/dist/components/footprint/aggressor.js.map +1 -0
- package/dist/components/footprint/createFootprintController.d.ts +29 -0
- package/dist/components/footprint/createFootprintController.d.ts.map +1 -0
- package/dist/components/footprint/createFootprintController.js +264 -0
- package/dist/components/footprint/createFootprintController.js.map +1 -0
- package/dist/components/footprint/index.d.ts +7 -0
- package/dist/components/footprint/index.d.ts.map +1 -0
- package/dist/components/footprint/index.js +4 -0
- package/dist/components/footprint/index.js.map +1 -0
- package/dist/components/footprint/perBarStats.d.ts +63 -0
- package/dist/components/footprint/perBarStats.d.ts.map +1 -0
- package/dist/components/footprint/perBarStats.js +123 -0
- package/dist/components/footprint/perBarStats.js.map +1 -0
- package/dist/components/footprint/types.d.ts +197 -0
- package/dist/components/footprint/types.d.ts.map +1 -0
- package/dist/components/footprint/types.js +23 -0
- package/dist/components/footprint/types.js.map +1 -0
- package/dist/components/mtfOverlay/alignToBaseIndex.d.ts +45 -0
- package/dist/components/mtfOverlay/alignToBaseIndex.d.ts.map +1 -0
- package/dist/components/mtfOverlay/alignToBaseIndex.js +92 -0
- package/dist/components/mtfOverlay/alignToBaseIndex.js.map +1 -0
- package/dist/components/mtfOverlay/createMtfController.d.ts +7 -0
- package/dist/components/mtfOverlay/createMtfController.d.ts.map +1 -0
- package/dist/components/mtfOverlay/createMtfController.js +134 -0
- package/dist/components/mtfOverlay/createMtfController.js.map +1 -0
- package/dist/components/mtfOverlay/index.d.ts +19 -0
- package/dist/components/mtfOverlay/index.d.ts.map +1 -0
- package/dist/components/mtfOverlay/index.js +18 -0
- package/dist/components/mtfOverlay/index.js.map +1 -0
- package/dist/components/mtfOverlay/resampleBars.d.ts +37 -0
- package/dist/components/mtfOverlay/resampleBars.d.ts.map +1 -0
- package/dist/components/mtfOverlay/resampleBars.js +93 -0
- package/dist/components/mtfOverlay/resampleBars.js.map +1 -0
- package/dist/components/mtfOverlay/types.d.ts +132 -0
- package/dist/components/mtfOverlay/types.d.ts.map +1 -0
- package/dist/components/mtfOverlay/types.js +22 -0
- package/dist/components/mtfOverlay/types.js.map +1 -0
- package/dist/components/orderBookHeatmap/createHeatmapController.d.ts +21 -0
- package/dist/components/orderBookHeatmap/createHeatmapController.d.ts.map +1 -0
- package/dist/components/orderBookHeatmap/createHeatmapController.js +234 -0
- package/dist/components/orderBookHeatmap/createHeatmapController.js.map +1 -0
- package/dist/components/orderBookHeatmap/createOrderBookState.d.ts +18 -0
- package/dist/components/orderBookHeatmap/createOrderBookState.d.ts.map +1 -0
- package/dist/components/orderBookHeatmap/createOrderBookState.js +102 -0
- package/dist/components/orderBookHeatmap/createOrderBookState.js.map +1 -0
- package/dist/components/orderBookHeatmap/deltaArchive.d.ts +25 -0
- package/dist/components/orderBookHeatmap/deltaArchive.d.ts.map +1 -0
- package/dist/components/orderBookHeatmap/deltaArchive.js +106 -0
- package/dist/components/orderBookHeatmap/deltaArchive.js.map +1 -0
- package/dist/components/orderBookHeatmap/index.d.ts +13 -0
- package/dist/components/orderBookHeatmap/index.d.ts.map +1 -0
- package/dist/components/orderBookHeatmap/index.js +12 -0
- package/dist/components/orderBookHeatmap/index.js.map +1 -0
- package/dist/components/orderBookHeatmap/logColorScale.d.ts +20 -0
- package/dist/components/orderBookHeatmap/logColorScale.d.ts.map +1 -0
- package/dist/components/orderBookHeatmap/logColorScale.js +71 -0
- package/dist/components/orderBookHeatmap/logColorScale.js.map +1 -0
- package/dist/components/orderBookHeatmap/snapshotRing.d.ts +16 -0
- package/dist/components/orderBookHeatmap/snapshotRing.d.ts.map +1 -0
- package/dist/components/orderBookHeatmap/snapshotRing.js +61 -0
- package/dist/components/orderBookHeatmap/snapshotRing.js.map +1 -0
- package/dist/components/orderBookHeatmap/types.d.ts +128 -0
- package/dist/components/orderBookHeatmap/types.d.ts.map +1 -0
- package/dist/components/orderBookHeatmap/types.js +16 -0
- package/dist/components/orderBookHeatmap/types.js.map +1 -0
- package/dist/components/volumeProfile/binning.d.ts +54 -0
- package/dist/components/volumeProfile/binning.d.ts.map +1 -0
- package/dist/components/volumeProfile/binning.js +123 -0
- package/dist/components/volumeProfile/binning.js.map +1 -0
- package/dist/components/volumeProfile/createVolumeProfileController.d.ts +31 -0
- package/dist/components/volumeProfile/createVolumeProfileController.d.ts.map +1 -0
- package/dist/components/volumeProfile/createVolumeProfileController.js +179 -0
- package/dist/components/volumeProfile/createVolumeProfileController.js.map +1 -0
- package/dist/components/volumeProfile/index.d.ts +6 -0
- package/dist/components/volumeProfile/index.d.ts.map +1 -0
- package/dist/components/volumeProfile/index.js +5 -0
- package/dist/components/volumeProfile/index.js.map +1 -0
- package/dist/components/volumeProfile/poc.d.ts +35 -0
- package/dist/components/volumeProfile/poc.d.ts.map +1 -0
- package/dist/components/volumeProfile/poc.js +51 -0
- package/dist/components/volumeProfile/poc.js.map +1 -0
- package/dist/components/volumeProfile/types.d.ts +138 -0
- package/dist/components/volumeProfile/types.d.ts.map +1 -0
- package/dist/components/volumeProfile/types.js +19 -0
- package/dist/components/volumeProfile/types.js.map +1 -0
- package/dist/components/volumeProfile/valueArea.d.ts +58 -0
- package/dist/components/volumeProfile/valueArea.d.ts.map +1 -0
- package/dist/components/volumeProfile/valueArea.js +172 -0
- package/dist/components/volumeProfile/valueArea.js.map +1 -0
- package/dist/controllers/createChartController.d.ts.map +1 -1
- package/dist/controllers/createChartController.js +22 -11
- package/dist/controllers/createChartController.js.map +1 -1
- package/dist/controllers/types.d.ts +3 -1
- package/dist/controllers/types.d.ts.map +1 -1
- package/dist/data-fetchers/baostock.d.ts.map +1 -1
- package/dist/data-fetchers/baostock.js +2 -1
- package/dist/data-fetchers/baostock.js.map +1 -1
- package/dist/data-fetchers/dataBuffer.effects.d.ts.map +1 -1
- package/dist/data-fetchers/dataBuffer.effects.js +2 -1
- package/dist/data-fetchers/dataBuffer.effects.js.map +1 -1
- package/dist/data-fetchers/fetcherDefinitionRegistry.d.ts.map +1 -1
- package/dist/data-fetchers/fetcherDefinitionRegistry.js +2 -1
- package/dist/data-fetchers/fetcherDefinitionRegistry.js.map +1 -1
- package/dist/data-fetchers/gotdx.js +4 -3
- package/dist/data-fetchers/gotdx.js.map +1 -1
- package/dist/data-fetchers/router.d.ts.map +1 -1
- package/dist/data-fetchers/router.js +4 -3
- package/dist/data-fetchers/router.js.map +1 -1
- package/dist/data-fetchers/tradingview.js +3 -2
- package/dist/data-fetchers/tradingview.js.map +1 -1
- package/dist/engine/chart.d.ts +13 -0
- package/dist/engine/chart.d.ts.map +1 -1
- package/dist/engine/chart.js +109 -0
- package/dist/engine/chart.js.map +1 -1
- package/dist/engine/data/chartDataManager.d.ts +1 -0
- package/dist/engine/data/chartDataManager.d.ts.map +1 -1
- package/dist/engine/data/chartDataManager.js +27 -4
- package/dist/engine/data/chartDataManager.js.map +1 -1
- package/dist/engine/drawing/toolConfig.d.ts.map +1 -1
- package/dist/engine/drawing/toolConfig.js +2 -1
- package/dist/engine/drawing/toolConfig.js.map +1 -1
- package/dist/engine/indicators/chartIndicatorManager.d.ts.map +1 -1
- package/dist/engine/indicators/chartIndicatorManager.js +2 -1
- package/dist/engine/indicators/chartIndicatorManager.js.map +1 -1
- package/dist/engine/indicators/indicatorDefinitionRegistry.d.ts.map +1 -1
- package/dist/engine/indicators/indicatorDefinitionRegistry.js +2 -1
- package/dist/engine/indicators/indicatorDefinitionRegistry.js.map +1 -1
- package/dist/engine/indicators/indicatorMetadata.d.ts.map +1 -1
- package/dist/engine/indicators/indicatorMetadata.js +2 -1
- package/dist/engine/indicators/indicatorMetadata.js.map +1 -1
- package/dist/engine/indicators/indicatorRegistry.d.ts.map +1 -1
- package/dist/engine/indicators/indicatorRegistry.js +6 -5
- package/dist/engine/indicators/indicatorRegistry.js.map +1 -1
- package/dist/engine/indicators/registerBuiltins.d.ts.map +1 -1
- package/dist/engine/indicators/registerBuiltins.js +2 -1
- package/dist/engine/indicators/registerBuiltins.js.map +1 -1
- package/dist/engine/indicators/scheduler.d.ts +6 -0
- package/dist/engine/indicators/scheduler.d.ts.map +1 -1
- package/dist/engine/indicators/scheduler.js +12 -0
- package/dist/engine/indicators/scheduler.js.map +1 -1
- package/dist/engine/indicators/soa.d.ts.map +1 -1
- package/dist/engine/indicators/soa.js +2 -1
- package/dist/engine/indicators/soa.js.map +1 -1
- package/dist/engine/indicators/stateComposer.d.ts.map +1 -1
- package/dist/engine/indicators/stateComposer.js +2 -1
- package/dist/engine/indicators/stateComposer.js.map +1 -1
- package/dist/engine/subPaneManager.d.ts.map +1 -1
- package/dist/engine/subPaneManager.js +2 -1
- package/dist/engine/subPaneManager.js.map +1 -1
- package/dist/engine/utils/chartZoomController.d.ts +2 -0
- package/dist/engine/utils/chartZoomController.d.ts.map +1 -1
- package/dist/engine/utils/chartZoomController.js +5 -1
- package/dist/engine/utils/chartZoomController.js.map +1 -1
- package/dist/errors-help.d.ts +72 -0
- package/dist/errors-help.d.ts.map +1 -0
- package/dist/errors-help.js +149 -0
- package/dist/errors-help.js.map +1 -0
- package/dist/errors.d.ts +64 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +61 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/indicators/alma.d.ts +27 -0
- package/dist/indicators/alma.d.ts.map +1 -0
- package/dist/indicators/alma.js +36 -0
- package/dist/indicators/alma.js.map +1 -0
- package/dist/indicators/awesomeOscillator.d.ts +19 -0
- package/dist/indicators/awesomeOscillator.d.ts.map +1 -0
- package/dist/indicators/awesomeOscillator.js +36 -0
- package/dist/indicators/awesomeOscillator.js.map +1 -0
- package/dist/indicators/dpo.d.ts +17 -0
- package/dist/indicators/dpo.d.ts.map +1 -0
- package/dist/indicators/dpo.js +24 -0
- package/dist/indicators/dpo.js.map +1 -0
- package/dist/indicators/fisherTransform.d.ts +26 -0
- package/dist/indicators/fisherTransform.d.ts.map +1 -0
- package/dist/indicators/fisherTransform.js +44 -0
- package/dist/indicators/fisherTransform.js.map +1 -0
- package/dist/indicators/frama.d.ts +25 -0
- package/dist/indicators/frama.d.ts.map +1 -0
- package/dist/indicators/frama.js +61 -0
- package/dist/indicators/frama.js.map +1 -0
- package/dist/indicators/index.d.ts +24 -0
- package/dist/indicators/index.d.ts.map +1 -0
- package/dist/indicators/index.js +26 -0
- package/dist/indicators/index.js.map +1 -0
- package/dist/indicators/lsma.d.ts +21 -0
- package/dist/indicators/lsma.d.ts.map +1 -0
- package/dist/indicators/lsma.js +37 -0
- package/dist/indicators/lsma.js.map +1 -0
- package/dist/indicators/schaffTrendCycle.d.ts +24 -0
- package/dist/indicators/schaffTrendCycle.d.ts.map +1 -0
- package/dist/indicators/schaffTrendCycle.js +70 -0
- package/dist/indicators/schaffTrendCycle.js.map +1 -0
- package/dist/indicators/stochRSI.d.ts +24 -0
- package/dist/indicators/stochRSI.d.ts.map +1 -0
- package/dist/indicators/stochRSI.js +86 -0
- package/dist/indicators/stochRSI.js.map +1 -0
- package/dist/indicators/t3.d.ts +31 -0
- package/dist/indicators/t3.d.ts.map +1 -0
- package/dist/indicators/t3.js +63 -0
- package/dist/indicators/t3.js.map +1 -0
- package/dist/indicators/ultimateOscillator.d.ts +26 -0
- package/dist/indicators/ultimateOscillator.d.ts.map +1 -0
- package/dist/indicators/ultimateOscillator.js +59 -0
- package/dist/indicators/ultimateOscillator.js.map +1 -0
- package/dist/indicators/vidya.d.ts +24 -0
- package/dist/indicators/vidya.d.ts.map +1 -0
- package/dist/indicators/vidya.js +54 -0
- package/dist/indicators/vidya.js.map +1 -0
- package/dist/indicators/zlema.d.ts +16 -0
- package/dist/indicators/zlema.d.ts.map +1 -0
- package/dist/indicators/zlema.js +26 -0
- package/dist/indicators/zlema.js.map +1 -0
- package/dist/input/gesture.d.ts +125 -0
- package/dist/input/gesture.d.ts.map +1 -0
- package/dist/input/gesture.js +249 -0
- package/dist/input/gesture.js.map +1 -0
- package/dist/input/index.d.ts +9 -0
- package/dist/input/index.d.ts.map +1 -0
- package/dist/input/index.js +9 -0
- package/dist/input/index.js.map +1 -0
- package/dist/input/keyboard.d.ts +140 -0
- package/dist/input/keyboard.d.ts.map +1 -0
- package/dist/input/keyboard.js +260 -0
- package/dist/input/keyboard.js.map +1 -0
- package/dist/mcp/chartBridge.d.ts +2 -2
- package/dist/mcp/chartBridge.d.ts.map +1 -1
- package/dist/mcp/chartBridge.js +27 -21
- package/dist/mcp/chartBridge.js.map +1 -1
- package/dist/plugin/PluginHost.d.ts +0 -3
- package/dist/plugin/PluginHost.d.ts.map +1 -1
- package/dist/plugin/PluginHost.js +7 -3
- package/dist/plugin/PluginHost.js.map +1 -1
- package/dist/plugin/PluginRegistry.d.ts +0 -3
- package/dist/plugin/PluginRegistry.d.ts.map +1 -1
- package/dist/plugin/PluginRegistry.js +5 -1
- package/dist/plugin/PluginRegistry.js.map +1 -1
- package/dist/render/Renderer.d.ts +116 -0
- package/dist/render/Renderer.d.ts.map +1 -0
- package/dist/render/Renderer.js +31 -0
- package/dist/render/Renderer.js.map +1 -0
- package/dist/render/SurfaceBackend.d.ts +83 -0
- package/dist/render/SurfaceBackend.d.ts.map +1 -0
- package/dist/render/SurfaceBackend.js +27 -0
- package/dist/render/SurfaceBackend.js.map +1 -0
- package/dist/render/index.d.ts +12 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +11 -0
- package/dist/render/index.js.map +1 -0
- package/dist/renderer-tier/detectRendererTier.d.ts +57 -0
- package/dist/renderer-tier/detectRendererTier.d.ts.map +1 -0
- package/dist/renderer-tier/detectRendererTier.js +143 -0
- package/dist/renderer-tier/detectRendererTier.js.map +1 -0
- package/dist/renderer-tier/index.d.ts +12 -0
- package/dist/renderer-tier/index.d.ts.map +1 -0
- package/dist/renderer-tier/index.js +12 -0
- package/dist/renderer-tier/index.js.map +1 -0
- package/dist/renderer-tier/selectBackend.d.ts +106 -0
- package/dist/renderer-tier/selectBackend.d.ts.map +1 -0
- package/dist/renderer-tier/selectBackend.js +113 -0
- package/dist/renderer-tier/selectBackend.js.map +1 -0
- package/dist/renderer-tier/types.d.ts +50 -0
- package/dist/renderer-tier/types.d.ts.map +1 -0
- package/dist/renderer-tier/types.js +24 -0
- package/dist/renderer-tier/types.js.map +1 -0
- package/dist/replay/createReplayController.d.ts +3 -0
- package/dist/replay/createReplayController.d.ts.map +1 -0
- package/dist/replay/createReplayController.js +251 -0
- package/dist/replay/createReplayController.js.map +1 -0
- package/dist/replay/index.d.ts +5 -0
- package/dist/replay/index.d.ts.map +1 -0
- package/dist/replay/index.js +3 -0
- package/dist/replay/index.js.map +1 -0
- package/dist/replay/timeline.d.ts +50 -0
- package/dist/replay/timeline.d.ts.map +1 -0
- package/dist/replay/timeline.js +104 -0
- package/dist/replay/timeline.js.map +1 -0
- package/dist/replay/types.d.ts +94 -0
- package/dist/replay/types.d.ts.map +1 -0
- package/dist/replay/types.js +21 -0
- package/dist/replay/types.js.map +1 -0
- package/dist/scale/anchoredZoom.d.ts +64 -0
- package/dist/scale/anchoredZoom.d.ts.map +1 -0
- package/dist/scale/anchoredZoom.js +67 -0
- package/dist/scale/anchoredZoom.js.map +1 -0
- package/dist/scale/createPriceScale.d.ts +49 -0
- package/dist/scale/createPriceScale.d.ts.map +1 -0
- package/dist/scale/createPriceScale.js +175 -0
- package/dist/scale/createPriceScale.js.map +1 -0
- package/dist/scale/createTimeScale.d.ts +27 -0
- package/dist/scale/createTimeScale.d.ts.map +1 -0
- package/dist/scale/createTimeScale.js +139 -0
- package/dist/scale/createTimeScale.js.map +1 -0
- package/dist/scale/index.d.ts +6 -0
- package/dist/scale/index.d.ts.map +1 -0
- package/dist/scale/index.js +5 -0
- package/dist/scale/index.js.map +1 -0
- package/dist/scale/originShift.d.ts +69 -0
- package/dist/scale/originShift.d.ts.map +1 -0
- package/dist/scale/originShift.js +41 -0
- package/dist/scale/originShift.js.map +1 -0
- package/dist/scale/types.d.ts +90 -0
- package/dist/scale/types.d.ts.map +1 -0
- package/dist/scale/types.js +17 -0
- package/dist/scale/types.js.map +1 -0
- package/dist/scene/createScene.d.ts +22 -0
- package/dist/scene/createScene.d.ts.map +1 -0
- package/dist/scene/createScene.js +114 -0
- package/dist/scene/createScene.js.map +1 -0
- package/dist/scene/index.d.ts +13 -0
- package/dist/scene/index.d.ts.map +1 -0
- package/dist/scene/index.js +11 -0
- package/dist/scene/index.js.map +1 -0
- package/dist/scene/layerRegistry.d.ts +83 -0
- package/dist/scene/layerRegistry.d.ts.map +1 -0
- package/dist/scene/layerRegistry.js +43 -0
- package/dist/scene/layerRegistry.js.map +1 -0
- package/dist/scene/types.d.ts +128 -0
- package/dist/scene/types.d.ts.map +1 -0
- package/dist/scene/types.js +21 -0
- package/dist/scene/types.js.map +1 -0
- package/dist/scheduler/createFrameBudget.d.ts +91 -0
- package/dist/scheduler/createFrameBudget.d.ts.map +1 -0
- package/dist/scheduler/createFrameBudget.js +232 -0
- package/dist/scheduler/createFrameBudget.js.map +1 -0
- package/dist/scheduler/index.d.ts +2 -0
- package/dist/scheduler/index.d.ts.map +1 -0
- package/dist/scheduler/index.js +2 -0
- package/dist/scheduler/index.js.map +1 -0
- package/dist/tokens/themeToCssVars.d.ts.map +1 -1
- package/dist/tokens/themeToCssVars.js +2 -28
- package/dist/tokens/themeToCssVars.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
- package/src/__bench__/indicators.bench.ts +215 -0
- package/src/__bench__/orderBookHeatmap.bench.ts +68 -0
- package/src/__bench__/scale.bench.ts +80 -0
- package/src/__bench__/signal.bench.ts +41 -0
- package/src/__bench__/volumeProfile.bench.ts +66 -0
- package/src/__tests__/errors-help.test.ts +184 -0
- package/src/__tests__/errors.test.ts +187 -0
- package/src/alerts/__tests__/controller.test.ts +231 -0
- package/src/alerts/__tests__/predicates.test.ts +374 -0
- package/src/alerts/__tests__/ruleSchema.test.ts +180 -0
- package/src/alerts/createAlertController.ts +312 -0
- package/src/alerts/index.ts +18 -0
- package/src/alerts/predicates.ts +231 -0
- package/src/alerts/rollingVolume.ts +51 -0
- package/src/alerts/ruleSchema.ts +278 -0
- package/src/alerts/types.ts +177 -0
- package/src/chartTypes/__tests__/heikinAshi.test.ts +122 -0
- package/src/chartTypes/__tests__/pointAndFigure.test.ts +167 -0
- package/src/chartTypes/__tests__/rangeBars.test.ts +146 -0
- package/src/chartTypes/__tests__/renko.test.ts +160 -0
- package/src/chartTypes/heikinAshi.ts +116 -0
- package/src/chartTypes/index.ts +5 -0
- package/src/chartTypes/pointAndFigure.ts +278 -0
- package/src/chartTypes/rangeBars.ts +303 -0
- package/src/chartTypes/renko.ts +311 -0
- package/src/chartTypes/types.ts +99 -0
- package/src/components/anchoredVwap/__tests__/computeAnchoredVwap.test.ts +331 -0
- package/src/components/anchoredVwap/__tests__/controller.test.ts +430 -0
- package/src/components/anchoredVwap/computeAnchoredVwap.ts +174 -0
- package/src/components/anchoredVwap/createAnchoredVwapController.ts +358 -0
- package/src/components/anchoredVwap/index.ts +17 -0
- package/src/components/anchoredVwap/types.ts +187 -0
- package/src/components/crosshairSync/__tests__/crosshairSync.test.ts +261 -0
- package/src/components/crosshairSync/createCrosshairSync.ts +187 -0
- package/src/components/crosshairSync/index.ts +5 -0
- package/src/components/footprint/__tests__/aggressor.test.ts +127 -0
- package/src/components/footprint/__tests__/controller.test.ts +130 -0
- package/src/components/footprint/__tests__/perBarStats.test.ts +114 -0
- package/src/components/footprint/aggressor.ts +165 -0
- package/src/components/footprint/createFootprintController.ts +338 -0
- package/src/components/footprint/index.ts +21 -0
- package/src/components/footprint/perBarStats.ts +137 -0
- package/src/components/footprint/types.ts +232 -0
- package/src/components/mtfOverlay/__tests__/alignToBaseIndex.test.ts +103 -0
- package/src/components/mtfOverlay/__tests__/controller.test.ts +172 -0
- package/src/components/mtfOverlay/__tests__/resampleBars.test.ts +106 -0
- package/src/components/mtfOverlay/alignToBaseIndex.ts +108 -0
- package/src/components/mtfOverlay/createMtfController.ts +180 -0
- package/src/components/mtfOverlay/index.ts +26 -0
- package/src/components/mtfOverlay/resampleBars.ts +134 -0
- package/src/components/mtfOverlay/types.ts +148 -0
- package/src/components/orderBookHeatmap/__tests__/controller.test.ts +237 -0
- package/src/components/orderBookHeatmap/__tests__/deltaArchive.test.ts +88 -0
- package/src/components/orderBookHeatmap/__tests__/logColorScale.test.ts +69 -0
- package/src/components/orderBookHeatmap/__tests__/orderBookState.test.ts +113 -0
- package/src/components/orderBookHeatmap/__tests__/snapshotRing.test.ts +53 -0
- package/src/components/orderBookHeatmap/computeShader.wgsl.md +130 -0
- package/src/components/orderBookHeatmap/createHeatmapController.ts +273 -0
- package/src/components/orderBookHeatmap/createOrderBookState.ts +116 -0
- package/src/components/orderBookHeatmap/deltaArchive.ts +113 -0
- package/src/components/orderBookHeatmap/index.ts +25 -0
- package/src/components/orderBookHeatmap/logColorScale.ts +77 -0
- package/src/components/orderBookHeatmap/snapshotRing.ts +65 -0
- package/src/components/orderBookHeatmap/types.ts +168 -0
- package/src/components/volumeProfile/__tests__/binning.test.ts +133 -0
- package/src/components/volumeProfile/__tests__/poc.test.ts +44 -0
- package/src/components/volumeProfile/__tests__/valueArea.test.ts +177 -0
- package/src/components/volumeProfile/binning.ts +133 -0
- package/src/components/volumeProfile/createVolumeProfileController.ts +213 -0
- package/src/components/volumeProfile/index.ts +12 -0
- package/src/components/volumeProfile/poc.ts +53 -0
- package/src/components/volumeProfile/types.ts +148 -0
- package/src/components/volumeProfile/valueArea.ts +187 -0
- package/src/controllers/createChartController.ts +23 -10
- package/src/controllers/types.ts +5 -1
- package/src/data-fetchers/baostock.ts +2 -1
- package/src/data-fetchers/dataBuffer.effects.ts +3 -1
- package/src/data-fetchers/fetcherDefinitionRegistry.ts +2 -1
- package/src/data-fetchers/gotdx.ts +4 -3
- package/src/data-fetchers/router.ts +6 -3
- package/src/data-fetchers/tradingview.ts +3 -2
- package/src/engine/chart.ts +126 -3
- package/src/engine/data/chartDataManager.ts +26 -4
- package/src/engine/drawing/toolConfig.ts +2 -1
- package/src/engine/indicators/chartIndicatorManager.ts +2 -1
- package/src/engine/indicators/indicatorDefinitionRegistry.ts +2 -1
- package/src/engine/indicators/indicatorMetadata.ts +2 -1
- package/src/engine/indicators/indicatorRegistry.ts +6 -5
- package/src/engine/indicators/registerBuiltins.ts +2 -1
- package/src/engine/indicators/scheduler.ts +15 -0
- package/src/engine/indicators/soa.ts +2 -1
- package/src/engine/indicators/stateComposer.ts +2 -1
- package/src/engine/subPaneManager.ts +2 -1
- package/src/engine/utils/chartZoomController.ts +7 -1
- package/src/errors-help.ts +218 -0
- package/src/errors.ts +128 -0
- package/src/index.ts +37 -0
- package/src/indicators/__tests__/maFamily.test.ts +159 -0
- package/src/indicators/__tests__/oscillators.test.ts +150 -0
- package/src/indicators/alma.ts +61 -0
- package/src/indicators/awesomeOscillator.ts +54 -0
- package/src/indicators/dpo.ts +37 -0
- package/src/indicators/fisherTransform.ts +63 -0
- package/src/indicators/frama.ts +87 -0
- package/src/indicators/index.ts +39 -0
- package/src/indicators/lsma.ts +58 -0
- package/src/indicators/schaffTrendCycle.ts +92 -0
- package/src/indicators/stochRSI.ts +108 -0
- package/src/indicators/t3.ts +96 -0
- package/src/indicators/ultimateOscillator.ts +83 -0
- package/src/indicators/vidya.ts +80 -0
- package/src/indicators/zlema.ts +41 -0
- package/src/input/__tests__/gesture.test.ts +271 -0
- package/src/input/__tests__/keyboard.test.ts +317 -0
- package/src/input/gesture.ts +357 -0
- package/src/input/index.ts +26 -0
- package/src/input/keyboard.ts +373 -0
- package/src/mcp/chartBridge.ts +98 -72
- package/src/plugin/PluginHost.ts +4 -3
- package/src/plugin/PluginRegistry.ts +2 -1
- package/src/render/Renderer.ts +127 -0
- package/src/render/SurfaceBackend.ts +94 -0
- package/src/render/__tests__/contract.test.ts +176 -0
- package/src/render/index.ts +27 -0
- package/src/renderer-tier/__tests__/detectRendererTier.test.ts +180 -0
- package/src/renderer-tier/__tests__/selectBackend.test.ts +253 -0
- package/src/renderer-tier/detectRendererTier.ts +168 -0
- package/src/renderer-tier/index.ts +30 -0
- package/src/renderer-tier/selectBackend.ts +201 -0
- package/src/renderer-tier/types.ts +59 -0
- package/src/replay/__tests__/controller.test.ts +309 -0
- package/src/replay/__tests__/timeline.test.ts +99 -0
- package/src/replay/createReplayController.ts +302 -0
- package/src/replay/index.ts +15 -0
- package/src/replay/timeline.ts +106 -0
- package/src/replay/types.ts +107 -0
- package/src/scale/__tests__/anchoredZoom.test.ts +125 -0
- package/src/scale/__tests__/originShift.test.ts +97 -0
- package/src/scale/__tests__/priceScale.test.ts +219 -0
- package/src/scale/__tests__/timeScale.test.ts +119 -0
- package/src/scale/anchoredZoom.ts +104 -0
- package/src/scale/createPriceScale.ts +226 -0
- package/src/scale/createTimeScale.ts +150 -0
- package/src/scale/index.ts +9 -0
- package/src/scale/originShift.ts +111 -0
- package/src/scale/types.ts +100 -0
- package/src/scene/__tests__/layerRegistry.test.ts +207 -0
- package/src/scene/__tests__/scene.test.ts +411 -0
- package/src/scene/createScene.ts +117 -0
- package/src/scene/index.ts +29 -0
- package/src/scene/layerRegistry.ts +117 -0
- package/src/scene/types.ts +143 -0
- package/src/scheduler/__tests__/createFrameBudget.test.ts +315 -0
- package/src/scheduler/createFrameBudget.ts +316 -0
- package/src/scheduler/index.ts +7 -0
- package/src/tokens/themeToCssVars.ts +3 -1
- package/src/version.ts +1 -1
- package/dist/data-fetchers/gotdx/gotdx.d.ts +0 -7
- package/dist/data-fetchers/gotdx/gotdx.d.ts.map +0 -1
- package/dist/data-fetchers/gotdx/gotdx.js +0 -7
- package/dist/data-fetchers/gotdx/gotdx.js.map +0 -1
- package/src/data-fetchers/gotdx/gotdx.ts +0 -6
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layer factory registry.
|
|
3
|
+
*
|
|
4
|
+
* The registry is a tiny lookup table from a stable string `typeId` to a
|
|
5
|
+
* factory function that builds a `Layer` instance. It exists so that:
|
|
6
|
+
*
|
|
7
|
+
* 1. Chart adapters can choose which built-in layer types to wire in,
|
|
8
|
+
* rather than the core forcing all of them on every consumer.
|
|
9
|
+
* 2. Component layers built by sibling agents (Volume Profile, Order Book
|
|
10
|
+
* Heatmap, Footprint) register their factories without touching the
|
|
11
|
+
* scene code itself — the registry is the integration point.
|
|
12
|
+
* 3. The registry is decoupled from `Scene`: a factory produces a `Layer`;
|
|
13
|
+
* the consumer is responsible for calling `scene.addLayer(layer)`. This
|
|
14
|
+
* avoids forcing every consumer through a single "register + auto-add"
|
|
15
|
+
* pipeline that would be hard to compose with config-driven scenes.
|
|
16
|
+
*
|
|
17
|
+
* This PR does NOT pre-register any factories — that's a follow-up PR
|
|
18
|
+
* once the legacy WebGL renderers have adapters that satisfy the `Layer`
|
|
19
|
+
* interface. This file ships the registry mechanism plus the canonical
|
|
20
|
+
* `typeId` constants so the rest of the codebase can reference layer types
|
|
21
|
+
* by symbol rather than magic string.
|
|
22
|
+
*/
|
|
23
|
+
import type { Layer, LayerRole } from './types';
|
|
24
|
+
/**
|
|
25
|
+
* A layer factory turns a typed config into a `Layer`.
|
|
26
|
+
*
|
|
27
|
+
* `TConfig` is parameterised so factories can declare their own config
|
|
28
|
+
* shape (e.g. the Volume Profile factory takes `{ store, bins, modes }`).
|
|
29
|
+
* The registry stores factories with `unknown` config — callers know which
|
|
30
|
+
* factory they're calling and cast on retrieval.
|
|
31
|
+
*/
|
|
32
|
+
export interface LayerFactory<TConfig = unknown> {
|
|
33
|
+
/** Stable id for this layer TYPE (not instance) — e.g. 'volume-profile'. */
|
|
34
|
+
typeId: string;
|
|
35
|
+
role: LayerRole;
|
|
36
|
+
/** Create a Layer instance; consumers pass any config + their store ref. */
|
|
37
|
+
create(config: TConfig): Layer;
|
|
38
|
+
}
|
|
39
|
+
export interface LayerRegistry {
|
|
40
|
+
/**
|
|
41
|
+
* Register a factory. Returns nothing on success.
|
|
42
|
+
* Throws on duplicate `typeId` — duplicates are programmer errors
|
|
43
|
+
* (two systems trying to claim the same layer type id), not runtime
|
|
44
|
+
* conditions to be silently handled. The error message names the
|
|
45
|
+
* conflicting typeId so the caller can locate it.
|
|
46
|
+
*/
|
|
47
|
+
register(factory: LayerFactory): void;
|
|
48
|
+
/**
|
|
49
|
+
* Remove a factory by typeId. Returns true if a factory was removed,
|
|
50
|
+
* false if no such typeId was registered.
|
|
51
|
+
*/
|
|
52
|
+
unregister(typeId: string): boolean;
|
|
53
|
+
/** Look up a factory by typeId. Returns null when not registered. */
|
|
54
|
+
get(typeId: string): LayerFactory | null;
|
|
55
|
+
/** Snapshot of all registered factories. Safe to iterate; do not mutate. */
|
|
56
|
+
list(): ReadonlyArray<LayerFactory>;
|
|
57
|
+
}
|
|
58
|
+
export declare function createLayerRegistry(): LayerRegistry;
|
|
59
|
+
/**
|
|
60
|
+
* Canonical typeIds for the layer types this codebase intends to ship.
|
|
61
|
+
*
|
|
62
|
+
* Grouped into:
|
|
63
|
+
* - "builtin:" — layers backed by existing v0 WebGL renderers (will arrive
|
|
64
|
+
* via adapter factories in a follow-up PR).
|
|
65
|
+
* - "component:" — the three P1 differentiating components from ROADMAP §3.
|
|
66
|
+
*
|
|
67
|
+
* These are string constants (not enums) so external code can pass through
|
|
68
|
+
* string literal types without an enum import — useful for config blobs.
|
|
69
|
+
*/
|
|
70
|
+
export declare const BUILTIN_LAYER_TYPES: {
|
|
71
|
+
readonly CANDLE: "builtin:candle";
|
|
72
|
+
readonly VOLUME: "builtin:volume";
|
|
73
|
+
readonly INDICATOR_MA: "builtin:indicator:ma";
|
|
74
|
+
readonly INDICATOR_BOLL: "builtin:indicator:boll";
|
|
75
|
+
readonly DRAWING: "builtin:drawing";
|
|
76
|
+
readonly CROSSHAIR: "builtin:crosshair";
|
|
77
|
+
readonly GRID: "builtin:grid";
|
|
78
|
+
readonly VOLUME_PROFILE: "component:volume-profile";
|
|
79
|
+
readonly ORDER_BOOK_HEATMAP: "component:order-book-heatmap";
|
|
80
|
+
readonly FOOTPRINT: "component:footprint";
|
|
81
|
+
};
|
|
82
|
+
export type BuiltinLayerType = (typeof BUILTIN_LAYER_TYPES)[keyof typeof BUILTIN_LAYER_TYPES];
|
|
83
|
+
//# sourceMappingURL=layerRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerRegistry.d.ts","sourceRoot":"","sources":["../../src/scene/layerRegistry.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY,CAAC,OAAO,GAAG,OAAO;IAC3C,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,SAAS,CAAA;IACf,4EAA4E;IAC5E,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,CAAA;CACjC;AAED,MAAM,WAAW,aAAa;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IACrC;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAA;IACnC,qEAAqE;IACrE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAA;IACxC,4EAA4E;IAC5E,IAAI,IAAI,aAAa,CAAC,YAAY,CAAC,CAAA;CACtC;AAED,wBAAgB,mBAAmB,IAAI,aAAa,CAyBnD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;CAatB,CAAA;AAEV,MAAM,MAAM,gBAAgB,GACxB,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { KLineChartError } from '../errors';
|
|
2
|
+
export function createLayerRegistry() {
|
|
3
|
+
// Map preserves insertion order, which makes `list()` deterministic —
|
|
4
|
+
// useful for snapshot tests and for UI surfaces (e.g. an "available
|
|
5
|
+
// layers" picker) that render the list in registration order.
|
|
6
|
+
const factories = new Map();
|
|
7
|
+
const register = (factory) => {
|
|
8
|
+
if (factories.has(factory.typeId)) {
|
|
9
|
+
throw new KLineChartError('NOT_REGISTERED', `LayerRegistry: typeId "${factory.typeId}" is already registered`);
|
|
10
|
+
}
|
|
11
|
+
factories.set(factory.typeId, factory);
|
|
12
|
+
};
|
|
13
|
+
const unregister = (typeId) => factories.delete(typeId);
|
|
14
|
+
const get = (typeId) => factories.get(typeId) ?? null;
|
|
15
|
+
const list = () => Array.from(factories.values());
|
|
16
|
+
return { register, unregister, get, list };
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Canonical typeIds for the layer types this codebase intends to ship.
|
|
20
|
+
*
|
|
21
|
+
* Grouped into:
|
|
22
|
+
* - "builtin:" — layers backed by existing v0 WebGL renderers (will arrive
|
|
23
|
+
* via adapter factories in a follow-up PR).
|
|
24
|
+
* - "component:" — the three P1 differentiating components from ROADMAP §3.
|
|
25
|
+
*
|
|
26
|
+
* These are string constants (not enums) so external code can pass through
|
|
27
|
+
* string literal types without an enum import — useful for config blobs.
|
|
28
|
+
*/
|
|
29
|
+
export const BUILTIN_LAYER_TYPES = {
|
|
30
|
+
// Existing in v0 (handled by legacy renderers)
|
|
31
|
+
CANDLE: 'builtin:candle',
|
|
32
|
+
VOLUME: 'builtin:volume',
|
|
33
|
+
INDICATOR_MA: 'builtin:indicator:ma',
|
|
34
|
+
INDICATOR_BOLL: 'builtin:indicator:boll',
|
|
35
|
+
DRAWING: 'builtin:drawing',
|
|
36
|
+
CROSSHAIR: 'builtin:crosshair',
|
|
37
|
+
GRID: 'builtin:grid',
|
|
38
|
+
// P1 component layers (controllers from sibling agents will provide factories)
|
|
39
|
+
VOLUME_PROFILE: 'component:volume-profile',
|
|
40
|
+
ORDER_BOOK_HEATMAP: 'component:order-book-heatmap',
|
|
41
|
+
FOOTPRINT: 'component:footprint',
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=layerRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layerRegistry.js","sourceRoot":"","sources":["../../src/scene/layerRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AA8D3C,MAAM,UAAU,mBAAmB;IAC/B,sEAAsE;IACtE,oEAAoE;IACpE,8DAA8D;IAC9D,MAAM,SAAS,GAAG,IAAI,GAAG,EAAwB,CAAA;IAEjD,MAAM,QAAQ,GAAG,CAAC,OAAqB,EAAQ,EAAE;QAC7C,IAAI,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YAChC,MAAM,IAAI,eAAe,CACrB,gBAAgB,EAChB,0BAA0B,OAAO,CAAC,MAAM,yBAAyB,CACpE,CAAA;QACL,CAAC;QACD,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC1C,CAAC,CAAA;IAED,MAAM,UAAU,GAAG,CAAC,MAAc,EAAW,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAExE,MAAM,GAAG,GAAG,CAAC,MAAc,EAAuB,EAAE,CAChD,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,CAAA;IAEjC,MAAM,IAAI,GAAG,GAAgC,EAAE,CAC3C,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAgC,CAAA;IAEjE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,CAAA;AAC9C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,+CAA+C;IAC/C,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,gBAAgB;IACxB,YAAY,EAAE,sBAAsB;IACpC,cAAc,EAAE,wBAAwB;IACxC,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,IAAI,EAAE,cAAc;IACpB,+EAA+E;IAC/E,cAAc,EAAE,0BAA0B;IAC1C,kBAAkB,EAAE,8BAA8B;IAClD,SAAS,EAAE,qBAAqB;CAC1B,CAAA"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scene + Layer type definitions.
|
|
3
|
+
*
|
|
4
|
+
* The scene is the level above `render` in core's dependency stack
|
|
5
|
+
* (see `docs/ROADMAP.md` §0):
|
|
6
|
+
*
|
|
7
|
+
* interaction → store → scene → render
|
|
8
|
+
*
|
|
9
|
+
* A `Layer` is a self-contained drawing module — candles, volume bars,
|
|
10
|
+
* indicator plots, drawings, crosshair, and the P1 component layers
|
|
11
|
+
* (Volume Profile, Order Book Heatmap, Footprint) all conform to the same
|
|
12
|
+
* shape. The scene composes layers, owns ordering, and drives per-frame
|
|
13
|
+
* paint dispatch; it does NOT know which GPU backend is underneath
|
|
14
|
+
* because `paint()` only sees a `Renderer` reference via `PaintContext`.
|
|
15
|
+
*
|
|
16
|
+
* This file is **pure interface** — `createScene.ts` implements `Scene`,
|
|
17
|
+
* but the types here are zero-runtime so framework adapters and indicator
|
|
18
|
+
* controllers can compile against them without pulling in the implementation.
|
|
19
|
+
*/
|
|
20
|
+
import type { Renderer } from '../render/Renderer';
|
|
21
|
+
import type { SurfaceRegion } from '../render/SurfaceBackend';
|
|
22
|
+
import type { Signal } from '../reactivity/signal';
|
|
23
|
+
/**
|
|
24
|
+
* Roles let the scene group layers and let other systems target them
|
|
25
|
+
* (e.g. picking ignores `background`; drawings live above indicators).
|
|
26
|
+
*
|
|
27
|
+
* The ordering here is informational, not enforced — z-order is the
|
|
28
|
+
* authoritative paint order. Roles exist so a follow-up PR can build
|
|
29
|
+
* features like "hit-test only drawing + component layers" without
|
|
30
|
+
* peeking at layer ids.
|
|
31
|
+
*/
|
|
32
|
+
export type LayerRole = 'background' | 'primary' | 'indicator' | 'component' | 'drawing' | 'overlay';
|
|
33
|
+
/**
|
|
34
|
+
* Which pane a layer belongs to. The chart has a main pane (candles +
|
|
35
|
+
* primary indicators) and zero-or-more sub panes (volume, RSI, MACD).
|
|
36
|
+
* Layers declare their pane statically; the scene's `paintPane` filters
|
|
37
|
+
* by this field so each pane's region only sees its own layers.
|
|
38
|
+
*
|
|
39
|
+
* NOTE for implementations: this PR uses a flat 'main' / 'sub' split.
|
|
40
|
+
* If a future iteration needs to address a specific sub-pane (e.g. the
|
|
41
|
+
* volume pane vs the RSI pane), extend this to a string id (e.g. 'sub:rsi')
|
|
42
|
+
* — the Layer / Scene contract here does not pre-commit a multi-sub-pane
|
|
43
|
+
* scheme on purpose.
|
|
44
|
+
*/
|
|
45
|
+
export type PaneRole = 'main' | 'sub';
|
|
46
|
+
/**
|
|
47
|
+
* Stateless paint context handed to each layer per frame.
|
|
48
|
+
*
|
|
49
|
+
* The layer reads what it needs from the store via subscriptions
|
|
50
|
+
* (the store reference is held by the layer itself, set up at construction
|
|
51
|
+
* time by its factory); this context is the per-frame state.
|
|
52
|
+
*
|
|
53
|
+
* Invariants:
|
|
54
|
+
* - `renderer` MUST already be inside a `beginFrame` / `endFrame` pair
|
|
55
|
+
* when paint runs. The scene does not call beginFrame/endFrame itself —
|
|
56
|
+
* that's the chart engine's responsibility (see `docs/ROADMAP.md` §0
|
|
57
|
+
* for the layered call chain).
|
|
58
|
+
* - `region` is the surface region for the pane currently being painted.
|
|
59
|
+
* Layers MUST treat all coordinates as logical pixels relative to this
|
|
60
|
+
* region's origin (the renderer's surface handles DPR scaling).
|
|
61
|
+
* - `frameNumber` is monotonic across the chart's lifetime; layers can use
|
|
62
|
+
* it to drive animations or detect skipped frames.
|
|
63
|
+
* - `deltaMs` is the wall-clock delta since the previous paint of any pane,
|
|
64
|
+
* in milliseconds. May be `0` on the very first frame.
|
|
65
|
+
*/
|
|
66
|
+
export interface PaintContext {
|
|
67
|
+
renderer: Renderer;
|
|
68
|
+
region: SurfaceRegion;
|
|
69
|
+
paneRole: PaneRole;
|
|
70
|
+
/** monotonically increasing frame counter for animation/timing */
|
|
71
|
+
frameNumber: number;
|
|
72
|
+
/** time elapsed since last frame in ms (for animations) */
|
|
73
|
+
deltaMs: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A Layer is a self-contained drawing module.
|
|
77
|
+
*
|
|
78
|
+
* The contract:
|
|
79
|
+
* - Pure function `paint()`: given context, produce GPU commands.
|
|
80
|
+
* - `paint()` MUST NOT mutate any shared state visible to other layers.
|
|
81
|
+
* Layer-private state (cached buffers, last-seen frame number) is fine.
|
|
82
|
+
* - `paint()` runs in scene-defined order; order matters for visual stacking
|
|
83
|
+
* (lower z paints first, so higher-z layers visually sit on top).
|
|
84
|
+
* - `dispose()` MUST release any renderer resources the layer allocated
|
|
85
|
+
* (buffers, pipelines). After dispose, the layer is dead — the scene
|
|
86
|
+
* removes it and will not call paint again.
|
|
87
|
+
* - `visible` is a runtime toggle. Invisible layers are skipped entirely
|
|
88
|
+
* (no paint() call); the layer keeps its allocated resources so a flip
|
|
89
|
+
* back to visible is cheap.
|
|
90
|
+
*/
|
|
91
|
+
export interface Layer {
|
|
92
|
+
readonly id: string;
|
|
93
|
+
readonly role: LayerRole;
|
|
94
|
+
/** which pane this layer belongs to */
|
|
95
|
+
readonly paneRole: PaneRole;
|
|
96
|
+
/** lower z first; ties broken by registration order */
|
|
97
|
+
readonly z: number;
|
|
98
|
+
/** quick toggle without removing the layer from the scene */
|
|
99
|
+
visible: boolean;
|
|
100
|
+
paint(ctx: PaintContext): void;
|
|
101
|
+
dispose(): void;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The Scene composes layers and exposes them to subscribers via a Signal.
|
|
105
|
+
*
|
|
106
|
+
* Add/remove operations produce a NEW array on the `layers` signal — never
|
|
107
|
+
* mutate the previous value in place. This guarantees framework adapters
|
|
108
|
+
* (React, Vue, Angular) using `Object.is` equality detect changes correctly.
|
|
109
|
+
*
|
|
110
|
+
* `paintPane` is the only entry point that draws anything; it filters layers
|
|
111
|
+
* by `paneRole`, drops invisible layers, and dispatches in z order with ties
|
|
112
|
+
* broken by registration order (FIFO stable sort).
|
|
113
|
+
*
|
|
114
|
+
* `dispose` tears down every layer the scene currently owns and freezes the
|
|
115
|
+
* scene — subsequent add/remove/setLayerVisibility/paintPane calls are silent
|
|
116
|
+
* no-ops. This matches the renderer's "dispose freezes the object" semantics.
|
|
117
|
+
*/
|
|
118
|
+
export interface Scene {
|
|
119
|
+
readonly layers: Signal<ReadonlyArray<Layer>>;
|
|
120
|
+
addLayer(layer: Layer): void;
|
|
121
|
+
removeLayer(id: string): boolean;
|
|
122
|
+
getLayer(id: string): Layer | null;
|
|
123
|
+
setLayerVisibility(id: string, visible: boolean): boolean;
|
|
124
|
+
/** paint layers for one pane in z-order, then by registration order */
|
|
125
|
+
paintPane(ctx: PaintContext): void;
|
|
126
|
+
dispose(): void;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/scene/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GACf,YAAY,GACZ,SAAS,GACT,WAAW,GACX,WAAW,GACX,SAAS,GACT,SAAS,CAAA;AAEf;;;;;;;;;;;GAWG;AACH,MA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|
2
|
+
* Scene + Layer type definitions.
|
|
3
|
+
*
|
|
4
|
+
* The scene is the level above `render` in core's dependency stack
|
|
5
|
+
* (see `docs/ROADMAP.md` §0):
|
|
6
|
+
*
|
|
7
|
+
* interaction → store → scene → render
|
|
8
|
+
*
|
|
9
|
+
* A `Layer` is a self-contained drawing module — candles, volume bars,
|
|
10
|
+
* indicator plots, drawings, crosshair, and the P1 component layers
|
|
11
|
+
* (Volume Profile, Order Book Heatmap, Footprint) all conform to the same
|
|
12
|
+
* shape. The scene composes layers, owns ordering, and drives per-frame
|
|
13
|
+
* paint dispatch; it does NOT know which GPU backend is underneath
|
|
14
|
+
* because `paint()` only sees a `Renderer` reference via `PaintContext`.
|
|
15
|
+
*
|
|
16
|
+
* This file is **pure interface** — `createScene.ts` implements `Scene`,
|
|
17
|
+
* but the types here are zero-runtime so framework adapters and indicator
|
|
18
|
+
* controllers can compile against them without pulling in the implementation.
|
|
19
|
+
*/
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/scene/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frame budget scheduler — adaptive workload manager.
|
|
3
|
+
*
|
|
4
|
+
* Real-time finance charts share a constraint with games and trading
|
|
5
|
+
* terminals: the renderer has a wall-clock budget per frame (16.67 ms
|
|
6
|
+
* at 60 fps, 6.94 ms at 144 fps), and exceeding it means dropped frames.
|
|
7
|
+
* Work that doesn't fit gets deferred to the next frame, but the work
|
|
8
|
+
* *queue* must not grow without bound — a stale indicator update is
|
|
9
|
+
* worse than a missed update.
|
|
10
|
+
*
|
|
11
|
+
* This module owns the policy. Consumers submit prioritised tasks;
|
|
12
|
+
* `flush(deadline)` drains as many as fit; the rest stay queued until
|
|
13
|
+
* the next call. A rolling-average frame-time signal lets components
|
|
14
|
+
* back off proactively rather than waiting for budget exhaustion.
|
|
15
|
+
*
|
|
16
|
+
* Pure data: no requestAnimationFrame, no performance.now() side effects.
|
|
17
|
+
* The host (browser / Node test / Deno) supplies the clock via a `now`
|
|
18
|
+
* function. Default: `performance.now()` if available, else `Date.now()`.
|
|
19
|
+
*
|
|
20
|
+
* const budget = createFrameBudget({ targetMs: 16 })
|
|
21
|
+
*
|
|
22
|
+
* // Host's rAF loop:
|
|
23
|
+
* function tick(t) {
|
|
24
|
+
* budget.beginFrame(t)
|
|
25
|
+
* budget.submit({ id: 'indicators', priority: 'high', work: recompute })
|
|
26
|
+
* budget.submit({ id: 'labels', priority: 'low', work: drawLabels })
|
|
27
|
+
* budget.flush(t + budget.targetMs)
|
|
28
|
+
* budget.endFrame(performance.now())
|
|
29
|
+
* requestAnimationFrame(tick)
|
|
30
|
+
* }
|
|
31
|
+
*
|
|
32
|
+
* // Consumers can read the load signal to back off:
|
|
33
|
+
* if (budget.recentFrameMs() > 18) skipLowPriorityWork()
|
|
34
|
+
*/
|
|
35
|
+
import { type Signal } from '../reactivity';
|
|
36
|
+
export type TaskPriority = 'high' | 'medium' | 'low';
|
|
37
|
+
export interface FrameTask {
|
|
38
|
+
/** Stable id. Duplicate submissions with the same id are coalesced — the
|
|
39
|
+
* later submission's `work` and `priority` win. */
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly priority: TaskPriority;
|
|
42
|
+
/** Synchronous unit of work. Throws are caught and logged but do NOT
|
|
43
|
+
* abort the frame; the task is dropped. */
|
|
44
|
+
readonly work: () => void;
|
|
45
|
+
}
|
|
46
|
+
export interface FrameBudgetOptions {
|
|
47
|
+
/** Target frame budget in milliseconds. Default 16 (≈60 fps). */
|
|
48
|
+
readonly targetMs?: number;
|
|
49
|
+
/** Rolling window for `recentFrameMs`. Default 60 frames (1 s at 60 fps). */
|
|
50
|
+
readonly historySize?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Clock function. Default: `performance.now()` if available, else
|
|
53
|
+
* `Date.now()`. Injected for tests so timing is deterministic.
|
|
54
|
+
*/
|
|
55
|
+
readonly now?: () => number;
|
|
56
|
+
/**
|
|
57
|
+
* Maximum queued tasks. Older low/medium tasks are dropped when the
|
|
58
|
+
* queue exceeds this. Default 256 — high enough that legitimate
|
|
59
|
+
* workloads never hit it, low enough that runaway producers fail loud.
|
|
60
|
+
*/
|
|
61
|
+
readonly maxQueueSize?: number;
|
|
62
|
+
}
|
|
63
|
+
export interface FrameBudget {
|
|
64
|
+
readonly targetMs: number;
|
|
65
|
+
/** Current rolling-average frame time in ms. */
|
|
66
|
+
readonly recentFrameMs: Signal<number>;
|
|
67
|
+
/** Number of tasks currently queued (not yet flushed). */
|
|
68
|
+
readonly queueDepth: Signal<number>;
|
|
69
|
+
/** Frames whose work exceeded targetMs (cumulative). */
|
|
70
|
+
readonly overruns: Signal<number>;
|
|
71
|
+
/** Mark the start of a frame. Pass `performance.now()` (or test clock). */
|
|
72
|
+
beginFrame(t: number): void;
|
|
73
|
+
/** Queue a task. Coalesces on id (later submission wins). */
|
|
74
|
+
submit(task: FrameTask): void;
|
|
75
|
+
/**
|
|
76
|
+
* Drain queued tasks until the deadline (absolute timestamp in the
|
|
77
|
+
* `now`-clock's scale). Returns the number of tasks completed.
|
|
78
|
+
*
|
|
79
|
+
* Tasks run in priority order: all `high` first, then `medium`, then
|
|
80
|
+
* `low`. Within a priority, FIFO. A task that throws is caught and
|
|
81
|
+
* dropped; remaining tasks continue.
|
|
82
|
+
*/
|
|
83
|
+
flush(deadlineAbs: number): number;
|
|
84
|
+
/** Mark the end of a frame. Updates `recentFrameMs` + overrun count. */
|
|
85
|
+
endFrame(t: number): void;
|
|
86
|
+
/** Drop all queued tasks. */
|
|
87
|
+
clear(): void;
|
|
88
|
+
dispose(): void;
|
|
89
|
+
}
|
|
90
|
+
export declare function createFrameBudget(opts?: FrameBudgetOptions): FrameBudget;
|
|
91
|
+
//# sourceMappingURL=createFrameBudget.d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CAAA;IAC7B;;;;;;;OAOG;IACH,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAA;IAClC,wEAAwE;IACxE,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,6BAA6B;IAC7B,KAAK,IAAI,IAAI,CAAA;IACb,OAAO,IAAI,IAAI,CAAA;CAClB;AAkBD,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,kBAAuB,GAAG,WAAW,CAsM5E"}
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frame budget scheduler — adaptive workload manager.
|
|
3
|
+
*
|
|
4
|
+
* Real-time finance charts share a constraint with games and trading
|
|
5
|
+
* terminals: the renderer has a wall-clock budget per frame (16.67 ms
|
|
6
|
+
* at 60 fps, 6.94 ms at 144 fps), and exceeding it means dropped frames.
|
|
7
|
+
* Work that doesn't fit gets deferred to the next frame, but the work
|
|
8
|
+
* *queue* must not grow without bound — a stale indicator update is
|
|
9
|
+
* worse than a missed update.
|
|
10
|
+
*
|
|
11
|
+
* This module owns the policy. Consumers submit prioritised tasks;
|
|
12
|
+
* `flush(deadline)` drains as many as fit; the rest stay queued until
|
|
13
|
+
* the next call. A rolling-average frame-time signal lets components
|
|
14
|
+
* back off proactively rather than waiting for budget exhaustion.
|
|
15
|
+
*
|
|
16
|
+
* Pure data: no requestAnimationFrame, no performance.now() side effects.
|
|
17
|
+
* The host (browser / Node test / Deno) supplies the clock via a `now`
|
|
18
|
+
* function. Default: `performance.now()` if available, else `Date.now()`.
|
|
19
|
+
*
|
|
20
|
+
* const budget = createFrameBudget({ targetMs: 16 })
|
|
21
|
+
*
|
|
22
|
+
* // Host's rAF loop:
|
|
23
|
+
* function tick(t) {
|
|
24
|
+
* budget.beginFrame(t)
|
|
25
|
+
* budget.submit({ id: 'indicators', priority: 'high', work: recompute })
|
|
26
|
+
* budget.submit({ id: 'labels', priority: 'low', work: drawLabels })
|
|
27
|
+
* budget.flush(t + budget.targetMs)
|
|
28
|
+
* budget.endFrame(performance.now())
|
|
29
|
+
* requestAnimationFrame(tick)
|
|
30
|
+
* }
|
|
31
|
+
*
|
|
32
|
+
* // Consumers can read the load signal to back off:
|
|
33
|
+
* if (budget.recentFrameMs() > 18) skipLowPriorityWork()
|
|
34
|
+
*/
|
|
35
|
+
import { createSignal } from '../reactivity';
|
|
36
|
+
import { KLineChartError } from '../errors';
|
|
37
|
+
const PRIORITY_ORDER = ['high', 'medium', 'low'];
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
// Internals
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
function defaultNow() {
|
|
42
|
+
const perf = globalThis.performance;
|
|
43
|
+
if (typeof perf?.now === 'function')
|
|
44
|
+
return perf.now();
|
|
45
|
+
return Date.now();
|
|
46
|
+
}
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// Factory
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
export function createFrameBudget(opts = {}) {
|
|
51
|
+
const targetMs = opts.targetMs ?? 16;
|
|
52
|
+
const historySize = opts.historySize ?? 60;
|
|
53
|
+
const maxQueueSize = opts.maxQueueSize ?? 256;
|
|
54
|
+
const now = opts.now ?? defaultNow;
|
|
55
|
+
if (!(targetMs > 0) || !Number.isFinite(targetMs)) {
|
|
56
|
+
throw new KLineChartError('INVALID_PARAM', `createFrameBudget: targetMs must be > 0, got ${targetMs}`);
|
|
57
|
+
}
|
|
58
|
+
if (!(historySize > 0) || !Number.isInteger(historySize)) {
|
|
59
|
+
throw new KLineChartError('INVALID_PARAM', `createFrameBudget: historySize must be a positive integer, got ${historySize}`);
|
|
60
|
+
}
|
|
61
|
+
if (!(maxQueueSize > 0) || !Number.isInteger(maxQueueSize)) {
|
|
62
|
+
throw new KLineChartError('INVALID_PARAM', `createFrameBudget: maxQueueSize must be a positive integer, got ${maxQueueSize}`);
|
|
63
|
+
}
|
|
64
|
+
const recentFrameMs = createSignal(0);
|
|
65
|
+
const queueDepth = createSignal(0);
|
|
66
|
+
const overruns = createSignal(0);
|
|
67
|
+
// One queue per priority; preserves FIFO inside a tier.
|
|
68
|
+
const queues = {
|
|
69
|
+
high: [],
|
|
70
|
+
medium: [],
|
|
71
|
+
low: [],
|
|
72
|
+
};
|
|
73
|
+
// Reverse lookup so coalesce-by-id is O(1).
|
|
74
|
+
const byId = new Map();
|
|
75
|
+
const frameTimes = [];
|
|
76
|
+
let frameStart = 0;
|
|
77
|
+
let disposed = false;
|
|
78
|
+
function publishDepth() {
|
|
79
|
+
queueDepth.set(queues.high.length + queues.medium.length + queues.low.length);
|
|
80
|
+
}
|
|
81
|
+
function totalQueued() {
|
|
82
|
+
return queues.high.length + queues.medium.length + queues.low.length;
|
|
83
|
+
}
|
|
84
|
+
function dropOldestLowOrMedium() {
|
|
85
|
+
// Prefer dropping low first, then medium. We never drop high.
|
|
86
|
+
if (queues.low.length > 0) {
|
|
87
|
+
const dropped = queues.low.shift();
|
|
88
|
+
byId.delete(dropped.id);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (queues.medium.length > 0) {
|
|
92
|
+
const dropped = queues.medium.shift();
|
|
93
|
+
byId.delete(dropped.id);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
// Only high tasks remain. We don't drop high tasks for queue
|
|
97
|
+
// pressure; the producer is misbehaving. Surface via overruns
|
|
98
|
+
// signal so the host can decide.
|
|
99
|
+
}
|
|
100
|
+
function submit(task) {
|
|
101
|
+
if (disposed)
|
|
102
|
+
return;
|
|
103
|
+
if (task.id === '' || typeof task.id !== 'string') {
|
|
104
|
+
throw new KLineChartError('INVALID_PARAM', `FrameBudget.submit: task.id must be a non-empty string`);
|
|
105
|
+
}
|
|
106
|
+
// Coalesce by id — replace existing entry.
|
|
107
|
+
const existing = byId.get(task.id);
|
|
108
|
+
if (existing !== undefined) {
|
|
109
|
+
queues[existing.tier][existing.index] = task;
|
|
110
|
+
// The tier might be changing; if it is, we need to re-bucket.
|
|
111
|
+
if (existing.tier !== task.priority) {
|
|
112
|
+
// Mark old slot as a tombstone (we can't splice cheaply mid-iteration
|
|
113
|
+
// in some paths). The flush loop tolerates undefined entries.
|
|
114
|
+
;
|
|
115
|
+
queues[existing.tier][existing.index] = undefined;
|
|
116
|
+
queues[task.priority].push(task);
|
|
117
|
+
byId.set(task.id, {
|
|
118
|
+
tier: task.priority,
|
|
119
|
+
index: queues[task.priority].length - 1,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
publishDepth();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
// Enforce maxQueueSize by dropping older low/medium first.
|
|
126
|
+
while (totalQueued() >= maxQueueSize) {
|
|
127
|
+
dropOldestLowOrMedium();
|
|
128
|
+
// If only high tasks left and we're still at the cap, bail.
|
|
129
|
+
if (totalQueued() >= maxQueueSize && queues.low.length === 0 && queues.medium.length === 0) {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
queues[task.priority].push(task);
|
|
134
|
+
byId.set(task.id, {
|
|
135
|
+
tier: task.priority,
|
|
136
|
+
index: queues[task.priority].length - 1,
|
|
137
|
+
});
|
|
138
|
+
publishDepth();
|
|
139
|
+
}
|
|
140
|
+
function flush(deadlineAbs) {
|
|
141
|
+
if (disposed)
|
|
142
|
+
return 0;
|
|
143
|
+
let completed = 0;
|
|
144
|
+
for (const tier of PRIORITY_ORDER) {
|
|
145
|
+
const q = queues[tier];
|
|
146
|
+
while (q.length > 0) {
|
|
147
|
+
if (now() >= deadlineAbs) {
|
|
148
|
+
// Compact the tier so later flushes skip tombstones.
|
|
149
|
+
queues[tier] = q.filter((t) => t !== undefined);
|
|
150
|
+
// Rebuild byId indices for this tier.
|
|
151
|
+
for (let i = 0; i < queues[tier].length; i++) {
|
|
152
|
+
const t = queues[tier][i];
|
|
153
|
+
byId.set(t.id, { tier, index: i });
|
|
154
|
+
}
|
|
155
|
+
publishDepth();
|
|
156
|
+
return completed;
|
|
157
|
+
}
|
|
158
|
+
const task = q.shift();
|
|
159
|
+
if (task === undefined)
|
|
160
|
+
continue; // tombstone
|
|
161
|
+
byId.delete(task.id);
|
|
162
|
+
try {
|
|
163
|
+
task.work();
|
|
164
|
+
completed++;
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
// Task threw; drop it. We don't propagate — one
|
|
168
|
+
// bad task must not poison the frame.
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
publishDepth();
|
|
173
|
+
return completed;
|
|
174
|
+
}
|
|
175
|
+
function beginFrame(t) {
|
|
176
|
+
if (disposed)
|
|
177
|
+
return;
|
|
178
|
+
if (!Number.isFinite(t)) {
|
|
179
|
+
throw new KLineChartError('INVALID_PARAM', `FrameBudget.beginFrame: t must be finite, got ${t}`);
|
|
180
|
+
}
|
|
181
|
+
frameStart = t;
|
|
182
|
+
}
|
|
183
|
+
function endFrame(t) {
|
|
184
|
+
if (disposed)
|
|
185
|
+
return;
|
|
186
|
+
if (!Number.isFinite(t)) {
|
|
187
|
+
throw new KLineChartError('INVALID_PARAM', `FrameBudget.endFrame: t must be finite, got ${t}`);
|
|
188
|
+
}
|
|
189
|
+
const dur = Math.max(0, t - frameStart);
|
|
190
|
+
frameTimes.push(dur);
|
|
191
|
+
while (frameTimes.length > historySize)
|
|
192
|
+
frameTimes.shift();
|
|
193
|
+
let sum = 0;
|
|
194
|
+
for (const v of frameTimes)
|
|
195
|
+
sum += v;
|
|
196
|
+
recentFrameMs.set(sum / frameTimes.length);
|
|
197
|
+
if (dur > targetMs)
|
|
198
|
+
overruns.set(overruns.peek() + 1);
|
|
199
|
+
}
|
|
200
|
+
function clear() {
|
|
201
|
+
if (disposed)
|
|
202
|
+
return;
|
|
203
|
+
queues.high = [];
|
|
204
|
+
queues.medium = [];
|
|
205
|
+
queues.low = [];
|
|
206
|
+
byId.clear();
|
|
207
|
+
publishDepth();
|
|
208
|
+
}
|
|
209
|
+
function dispose() {
|
|
210
|
+
if (disposed)
|
|
211
|
+
return;
|
|
212
|
+
disposed = true;
|
|
213
|
+
queues.high = [];
|
|
214
|
+
queues.medium = [];
|
|
215
|
+
queues.low = [];
|
|
216
|
+
byId.clear();
|
|
217
|
+
frameTimes.length = 0;
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
targetMs,
|
|
221
|
+
recentFrameMs,
|
|
222
|
+
queueDepth,
|
|
223
|
+
overruns,
|
|
224
|
+
beginFrame,
|
|
225
|
+
submit,
|
|
226
|
+
flush,
|
|
227
|
+
endFrame,
|
|
228
|
+
clear,
|
|
229
|
+
dispose,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
//# sourceMappingURL=createFrameBudget.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFrameBudget.js","sourceRoot":"","sources":["../../src/scheduler/createFrameBudget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,YAAY,EAAe,MAAM,eAAe,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAiE3C,MAAM,cAAc,GAAgC,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;AAE7E,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,SAAS,UAAU;IACf,MAAM,IAAI,GAAI,UAAuD,CAAC,WAAW,CAAA;IACjF,IAAI,OAAO,IAAI,EAAE,GAAG,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC,GAAG,EAAE,CAAA;IACtD,OAAO,IAAI,CAAC,GAAG,EAAE,CAAA;AACrB,CAAC;AAED,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,MAAM,UAAU,iBAAiB,CAAC,OAA2B,EAAE;IAC3D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;IACpC,MAAM,WAAW,GAAG,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ACZ,IAAI,QAAQ;YAAE,OAAM;QACpB,QAAQ,GAAG,IAAI,CAAA;QACf,MAAM,CAAC,IAAI,GAAG,EAAE,CAAA;QAChB,MAAM,CAAC,MAAM,GAAG,EAAE,CAAA;QAClB,MAAM,CAAC,GAAG,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,UAAU,CAAC,MAAM,GAAG,CAAC,CAAA;IACzB,CAAC;IAED,OAAO;QACH,QAAQ;QACR,aAAa;QACb,UAAU;QACV,QAAQ;QACR,UAAU;QACV,MAAM;QACN,KAAK;QACL,QAAQ;QACR,KAAK;QACL,OAAO;KACV,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scheduler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,YAAY,GACpB,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scheduler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,GAKpB,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeToCssVars.d.ts","sourceRoot":"","sources":["../../src/tokens/themeToCssVars.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"themeToCssVars.d.ts","sourceRoot":"","sources":["../../src/tokens/themeToCssVars.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,MAAM,WAAW,qBAAqB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAC3B;AAID;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9C;AAgCD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAC1B,KAAK,EAAE,KAAK,EACZ,IAAI,CAAC,EAAE,qBAAqB,GAC7B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAexB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,QAAQ,GAAE,MAAgB,GAC3B,MAAM,CAKR"}
|