velo-plot 1.11.1
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 +21 -0
- package/README.md +119 -0
- package/dist/EventEmitter-DAbs2K1C.js +60 -0
- package/dist/EventEmitter-DAbs2K1C.js.map +1 -0
- package/dist/core/Chart.d.ts +15 -0
- package/dist/core/ChartControls.d.ts +41 -0
- package/dist/core/ChartInitQueue.d.ts +50 -0
- package/dist/core/ChartLegend.d.ts +74 -0
- package/dist/core/ChartStatistics.d.ts +18 -0
- package/dist/core/EventEmitter.d.ts +30 -0
- package/dist/core/InteractionManager.d.ts +96 -0
- package/dist/core/OverlayRenderer.d.ts +89 -0
- package/dist/core/Series.d.ts +4 -0
- package/dist/core/animation/AnimationEngine.d.ts +156 -0
- package/dist/core/animation/index.d.ts +6 -0
- package/dist/core/annotations/AnnotationManager.d.ts +61 -0
- package/dist/core/annotations/index.d.ts +5 -0
- package/dist/core/annotations/types.d.ts +159 -0
- package/dist/core/chart/ChartAnimatedNavigation.d.ts +53 -0
- package/dist/core/chart/ChartAxisManager.d.ts +61 -0
- package/dist/core/chart/ChartCore.d.ts +336 -0
- package/dist/core/chart/ChartExporter.d.ts +18 -0
- package/dist/core/chart/ChartNavigation.d.ts +33 -0
- package/dist/core/chart/ChartPluginBridge.d.ts +34 -0
- package/dist/core/chart/ChartRenderLoop.d.ts +100 -0
- package/dist/core/chart/ChartRenderer.d.ts +52 -0
- package/dist/core/chart/ChartScaling.d.ts +31 -0
- package/dist/core/chart/ChartSeries.d.ts +4 -0
- package/dist/core/chart/ChartSetup.d.ts +67 -0
- package/dist/core/chart/ChartStateManager.d.ts +54 -0
- package/dist/core/chart/ChartUI.d.ts +40 -0
- package/dist/core/chart/exporter/SVGExporter.d.ts +6 -0
- package/dist/core/chart/exporter/index.d.ts +5 -0
- package/dist/core/chart/index.d.ts +14 -0
- package/dist/core/chart/series/SeriesActions.d.ts +7 -0
- package/dist/core/chart/series/SeriesBuffer.d.ts +4 -0
- package/dist/core/chart/series/index.d.ts +6 -0
- package/dist/core/chart/series/types.d.ts +22 -0
- package/dist/core/chart/types.d.ts +188 -0
- package/dist/core/clipboard/index.d.ts +137 -0
- package/dist/core/debug/index.d.ts +143 -0
- package/dist/core/index.d.ts +17 -0
- package/dist/core/keybindings/index.d.ts +157 -0
- package/dist/core/layout/index.d.ts +12 -0
- package/dist/core/layout/types.d.ts +165 -0
- package/dist/core/loading/index.d.ts +104 -0
- package/dist/core/locale/index.d.ts +91 -0
- package/dist/core/responsive/ResponsiveManager.d.ts +133 -0
- package/dist/core/responsive/index.d.ts +4 -0
- package/dist/core/selection/SelectionManager.d.ts +165 -0
- package/dist/core/selection/index.d.ts +4 -0
- package/dist/core/series/Series.d.ts +73 -0
- package/dist/core/series/SeriesBounds.d.ts +3 -0
- package/dist/core/series/SeriesDataUtils.d.ts +7 -0
- package/dist/core/series/index.d.ts +6 -0
- package/dist/core/sync/index.d.ts +147 -0
- package/dist/core/theme-editor/index.d.ts +122 -0
- package/dist/examples/PluginDemonstration.d.ts +20 -0
- package/dist/examples.d.ts +25 -0
- package/dist/gpu/adapter/gpuRenderer.d.ts +135 -0
- package/dist/gpu/adapter/index.d.ts +7 -0
- package/dist/gpu/adapter/seriesAdapter.d.ts +88 -0
- package/dist/gpu/backends/webgl/WebGLBackend.d.ts +42 -0
- package/dist/gpu/backends/webgl/index.d.ts +5 -0
- package/dist/gpu/backends/webgl/programFactory.d.ts +30 -0
- package/dist/gpu/backends/webgl/shaders.d.ts +14 -0
- package/dist/gpu/backends/webgpu/MassiveDataRenderer.d.ts +111 -0
- package/dist/gpu/backends/webgpu/WebGPUBackend.d.ts +58 -0
- package/dist/gpu/backends/webgpu/pipelines/bandPipeline.d.ts +24 -0
- package/dist/gpu/backends/webgpu/pipelines/heatmapPipeline.d.ts +28 -0
- package/dist/gpu/backends/webgpu/pipelines/index.d.ts +10 -0
- package/dist/gpu/backends/webgpu/pipelines/instancedLinePipeline.d.ts +23 -0
- package/dist/gpu/backends/webgpu/pipelines/instancedPointPipeline.d.ts +25 -0
- package/dist/gpu/backends/webgpu/pipelines/linePipeline.d.ts +23 -0
- package/dist/gpu/backends/webgpu/pipelines/pointPipeline.d.ts +28 -0
- package/dist/gpu/backends/webgpu/pipelines/trianglePipeline.d.ts +5 -0
- package/dist/gpu/backends/webgpu/pipelines/triangleShader.d.ts +1 -0
- package/dist/gpu/backends/webgpu/shaders/heatmap.wgsl.d.ts +8 -0
- package/dist/gpu/backends/webgpu/shaders/index.d.ts +8 -0
- package/dist/gpu/backends/webgpu/shaders/instanced.wgsl.d.ts +16 -0
- package/dist/gpu/backends/webgpu/shaders/line.wgsl.d.ts +8 -0
- package/dist/gpu/backends/webgpu/shaders/point.wgsl.d.ts +9 -0
- package/dist/gpu/benchmark/benchmark.d.ts +74 -0
- package/dist/gpu/benchmark/index.d.ts +5 -0
- package/dist/gpu/compute/gpuCompute.d.ts +72 -0
- package/dist/gpu/compute/index.d.ts +6 -0
- package/dist/gpu/compute/shaders.d.ts +9 -0
- package/dist/gpu/drawList.d.ts +77 -0
- package/dist/gpu/examples/gallery.d.ts +20 -0
- package/dist/gpu/examples/index.d.ts +3 -0
- package/dist/gpu/examples/webgpu-line-demo.d.ts +8 -0
- package/dist/gpu/examples/webgpu-triangle.d.ts +1 -0
- package/dist/gpu/frame.d.ts +25 -0
- package/dist/gpu/index.d.ts +24 -0
- package/dist/gpu/resources/bufferStore.d.ts +40 -0
- package/dist/gpu/resources/index.d.ts +9 -0
- package/dist/gpu/resources/pipelineCache.d.ts +33 -0
- package/dist/gpu/resources/textureStore.d.ts +41 -0
- package/dist/gpu/types.d.ts +47 -0
- package/dist/index-BMiZoKmm.js +536 -0
- package/dist/index-BMiZoKmm.js.map +1 -0
- package/dist/index-Ce2JgkH_.js +282 -0
- package/dist/index-Ce2JgkH_.js.map +1 -0
- package/dist/index-D8ifudJH.js +2431 -0
- package/dist/index-D8ifudJH.js.map +1 -0
- package/dist/index-Dag88bW4.js +499 -0
- package/dist/index-Dag88bW4.js.map +1 -0
- package/dist/index-qhscKTDy.js +309 -0
- package/dist/index-qhscKTDy.js.map +1 -0
- package/dist/index-x4stH3jD.js +282 -0
- package/dist/index-x4stH3jD.js.map +1 -0
- package/dist/index.core-CYu3tydL.js +7252 -0
- package/dist/index.core-CYu3tydL.js.map +1 -0
- package/dist/index.core.d.ts +20 -0
- package/dist/index.d.ts +51 -0
- package/dist/overlay/CanvasOverlay.d.ts +102 -0
- package/dist/overlay/index.d.ts +4 -0
- package/dist/plugins/3d/Area3DRenderer.d.ts +122 -0
- package/dist/plugins/3d/Axes3D.d.ts +104 -0
- package/dist/plugins/3d/Bubble3DRenderer.d.ts +198 -0
- package/dist/plugins/3d/Impulse3DRenderer.d.ts +130 -0
- package/dist/plugins/3d/Line3DRenderer.d.ts +118 -0
- package/dist/plugins/3d/PointCloud3DRenderer.d.ts +84 -0
- package/dist/plugins/3d/Raycaster3D.d.ts +137 -0
- package/dist/plugins/3d/Ribbon3DRenderer.d.ts +83 -0
- package/dist/plugins/3d/SurfaceBar3DRenderer.d.ts +92 -0
- package/dist/plugins/3d/SurfaceMesh3DRenderer.d.ts +130 -0
- package/dist/plugins/3d/Tooltip3D.d.ts +71 -0
- package/dist/plugins/3d/VectorField3DRenderer.d.ts +86 -0
- package/dist/plugins/3d/Voxel3DRenderer.d.ts +89 -0
- package/dist/plugins/3d/Waterfall3DRenderer.d.ts +94 -0
- package/dist/plugins/3d/camera/OrbitCamera.d.ts +99 -0
- package/dist/plugins/3d/camera/index.d.ts +1 -0
- package/dist/plugins/3d/colorThemes.d.ts +39 -0
- package/dist/plugins/3d/controls/OrbitController.d.ts +69 -0
- package/dist/plugins/3d/controls/index.d.ts +1 -0
- package/dist/plugins/3d/index.d.ts +50 -0
- package/dist/plugins/3d/math/Mat4.d.ts +33 -0
- package/dist/plugins/3d/math/Vec3.d.ts +37 -0
- package/dist/plugins/3d/math/index.d.ts +4 -0
- package/dist/plugins/3d/mesh/InstancedMesh.d.ts +42 -0
- package/dist/plugins/3d/mesh/geometry.d.ts +34 -0
- package/dist/plugins/3d/mesh/index.d.ts +2 -0
- package/dist/plugins/3d/series/Area3D.d.ts +17 -0
- package/dist/plugins/3d/series/Column3D.d.ts +20 -0
- package/dist/plugins/3d/series/Heatmap3D.d.ts +17 -0
- package/dist/plugins/3d/series/Impulse3D.d.ts +16 -0
- package/dist/plugins/3d/series/PointLine3D.d.ts +20 -0
- package/dist/plugins/3d/series/Ribbon3D.d.ts +17 -0
- package/dist/plugins/3d/series/Scatter3D.d.ts +21 -0
- package/dist/plugins/3d/series/SurfaceMesh3D.d.ts +35 -0
- package/dist/plugins/3d/series/Waterfall3D.d.ts +38 -0
- package/dist/plugins/3d/series/index.d.ts +13 -0
- package/dist/plugins/3d/series/types.d.ts +143 -0
- package/dist/plugins/3d/shader/index.d.ts +2 -0
- package/dist/plugins/3d/shader/programs.d.ts +24 -0
- package/dist/plugins/3d/shader/sources.d.ts +27 -0
- package/dist/plugins/3d/types.d.ts +71 -0
- package/dist/plugins/3d.d.ts +3 -0
- package/dist/plugins/3d.js +5498 -0
- package/dist/plugins/3d.js.map +1 -0
- package/dist/plugins/PluginContext.d.ts +53 -0
- package/dist/plugins/PluginManager.d.ts +129 -0
- package/dist/plugins/PluginRegistry.d.ts +38 -0
- package/dist/plugins/analysis/SeriesFit.d.ts +3 -0
- package/dist/plugins/analysis/contours.d.ts +20 -0
- package/dist/plugins/analysis/fft.d.ts +138 -0
- package/dist/plugins/analysis/filters.d.ts +76 -0
- package/dist/plugins/analysis/fitting.d.ts +24 -0
- package/dist/plugins/analysis/index.d.ts +29 -0
- package/dist/plugins/analysis/indicators.d.ts +148 -0
- package/dist/plugins/analysis/math.d.ts +32 -0
- package/dist/plugins/analysis/statistics.d.ts +78 -0
- package/dist/plugins/analysis/utils.d.ts +150 -0
- package/dist/plugins/analysis.d.ts +3 -0
- package/dist/plugins/analysis.js +1202 -0
- package/dist/plugins/analysis.js.map +1 -0
- package/dist/plugins/annotations/index.d.ts +16 -0
- package/dist/plugins/annotations.d.ts +3 -0
- package/dist/plugins/annotations.js +438 -0
- package/dist/plugins/annotations.js.map +1 -0
- package/dist/plugins/anomaly-detection/algorithms.d.ts +38 -0
- package/dist/plugins/anomaly-detection/index.d.ts +16 -0
- package/dist/plugins/anomaly-detection/types.d.ts +57 -0
- package/dist/plugins/broken-axis/BrokenAxisScale.d.ts +24 -0
- package/dist/plugins/broken-axis/exports.d.ts +6 -0
- package/dist/plugins/broken-axis/index.d.ts +6 -0
- package/dist/plugins/broken-axis/types.d.ts +50 -0
- package/dist/plugins/builtins/crosshair/CrosshairPlugin.d.ts +40 -0
- package/dist/plugins/builtins/crosshair/index.d.ts +1 -0
- package/dist/plugins/builtins/data-logger/DataLoggerPlugin.d.ts +11 -0
- package/dist/plugins/builtins/data-logger/index.d.ts +1 -0
- package/dist/plugins/builtins/direction-indicator/DirectionIndicatorPlugin.d.ts +17 -0
- package/dist/plugins/builtins/direction-indicator/index.d.ts +2 -0
- package/dist/plugins/builtins/grid-highlight/GridHighlightPlugin.d.ts +17 -0
- package/dist/plugins/builtins/grid-highlight/index.d.ts +1 -0
- package/dist/plugins/builtins/index.d.ts +25 -0
- package/dist/plugins/builtins/stats/StatsPlugin.d.ts +11 -0
- package/dist/plugins/builtins/stats/index.d.ts +1 -0
- package/dist/plugins/builtins/watermark/WatermarkPlugin.d.ts +15 -0
- package/dist/plugins/builtins/watermark/index.d.ts +1 -0
- package/dist/plugins/caching/exports.d.ts +6 -0
- package/dist/plugins/caching/index.d.ts +6 -0
- package/dist/plugins/caching/types.d.ts +120 -0
- package/dist/plugins/clipboard/index.d.ts +20 -0
- package/dist/plugins/clipboard.d.ts +3 -0
- package/dist/plugins/clipboard.js +270 -0
- package/dist/plugins/clipboard.js.map +1 -0
- package/dist/plugins/context-menu/index.d.ts +12 -0
- package/dist/plugins/context-menu/renderer.d.ts +43 -0
- package/dist/plugins/context-menu/types.d.ts +202 -0
- package/dist/plugins/context-menu.d.ts +3 -0
- package/dist/plugins/context-menu.js +621 -0
- package/dist/plugins/context-menu.js.map +1 -0
- package/dist/plugins/data-export/formatters.d.ts +34 -0
- package/dist/plugins/data-export/index.d.ts +15 -0
- package/dist/plugins/data-export/types.d.ts +166 -0
- package/dist/plugins/data-export.d.ts +3 -0
- package/dist/plugins/data-export.js +463 -0
- package/dist/plugins/data-export.js.map +1 -0
- package/dist/plugins/data-transform/index.d.ts +6 -0
- package/dist/plugins/data-transform/types.d.ts +34 -0
- package/dist/plugins/debug/index.d.ts +24 -0
- package/dist/plugins/debug.d.ts +3 -0
- package/dist/plugins/debug.js +330 -0
- package/dist/plugins/debug.js.map +1 -0
- package/dist/plugins/drag-edit/exports.d.ts +6 -0
- package/dist/plugins/drag-edit/index.d.ts +6 -0
- package/dist/plugins/drag-edit/types.d.ts +118 -0
- package/dist/plugins/forecasting/algorithms.d.ts +6 -0
- package/dist/plugins/forecasting/exports.d.ts +3 -0
- package/dist/plugins/forecasting/index.d.ts +11 -0
- package/dist/plugins/forecasting/types.d.ts +88 -0
- package/dist/plugins/gpu/index.d.ts +24 -0
- package/dist/plugins/gpu.d.ts +3 -0
- package/dist/plugins/gpu.js +2430 -0
- package/dist/plugins/gpu.js.map +1 -0
- package/dist/plugins/i18n/index.d.ts +22 -0
- package/dist/plugins/i18n.d.ts +3 -0
- package/dist/plugins/i18n.js +37 -0
- package/dist/plugins/i18n.js.map +1 -0
- package/dist/plugins/index.d.ts +110 -0
- package/dist/plugins/keyboard/index.d.ts +15 -0
- package/dist/plugins/keyboard.d.ts +3 -0
- package/dist/plugins/keyboard.js +8 -0
- package/dist/plugins/keyboard.js.map +1 -0
- package/dist/plugins/latex/exports.d.ts +6 -0
- package/dist/plugins/latex/index.d.ts +8 -0
- package/dist/plugins/latex/parser.d.ts +6 -0
- package/dist/plugins/latex/renderer.d.ts +6 -0
- package/dist/plugins/latex/symbols.d.ts +28 -0
- package/dist/plugins/latex/types.d.ts +88 -0
- package/dist/plugins/lazy-load/exports.d.ts +6 -0
- package/dist/plugins/lazy-load/index.d.ts +6 -0
- package/dist/plugins/lazy-load/types.d.ts +121 -0
- package/dist/plugins/loading/index.d.ts +15 -0
- package/dist/plugins/loading.d.ts +3 -0
- package/dist/plugins/loading.js +7 -0
- package/dist/plugins/loading.js.map +1 -0
- package/dist/plugins/ml-integration/exports.d.ts +11 -0
- package/dist/plugins/ml-integration/index.d.ts +6 -0
- package/dist/plugins/ml-integration/native-algorithms.d.ts +69 -0
- package/dist/plugins/ml-integration/types.d.ts +74 -0
- package/dist/plugins/offscreen/exports.d.ts +6 -0
- package/dist/plugins/offscreen/index.d.ts +6 -0
- package/dist/plugins/offscreen/pool.d.ts +32 -0
- package/dist/plugins/offscreen/types.d.ts +35 -0
- package/dist/plugins/pattern-recognition/index.d.ts +6 -0
- package/dist/plugins/pattern-recognition/patterns.d.ts +3 -0
- package/dist/plugins/pattern-recognition/types.d.ts +245 -0
- package/dist/plugins/radar/index.d.ts +6 -0
- package/dist/plugins/radar/types.d.ts +40 -0
- package/dist/plugins/regression/algorithms.d.ts +6 -0
- package/dist/plugins/regression/index.d.ts +6 -0
- package/dist/plugins/regression/types.d.ts +261 -0
- package/dist/plugins/roi/exports.d.ts +6 -0
- package/dist/plugins/roi/index.d.ts +49 -0
- package/dist/plugins/roi/types.d.ts +60 -0
- package/dist/plugins/snapshot/index.d.ts +11 -0
- package/dist/plugins/snapshot/types.d.ts +38 -0
- package/dist/plugins/streaming/index.d.ts +32 -0
- package/dist/plugins/streaming.d.ts +3 -0
- package/dist/plugins/streaming.js +13 -0
- package/dist/plugins/streaming.js.map +1 -0
- package/dist/plugins/sync/index.d.ts +22 -0
- package/dist/plugins/sync.d.ts +3 -0
- package/dist/plugins/sync.js +261 -0
- package/dist/plugins/sync.js.map +1 -0
- package/dist/plugins/theme-editor/index.d.ts +18 -0
- package/dist/plugins/theme-editor.d.ts +3 -0
- package/dist/plugins/theme-editor.js +7 -0
- package/dist/plugins/theme-editor.js.map +1 -0
- package/dist/plugins/tools/delta-tool/index.d.ts +159 -0
- package/dist/plugins/tools/index.d.ts +21 -0
- package/dist/plugins/tools/peak-tool/index.d.ts +159 -0
- package/dist/plugins/tools/tooltip/TooltipManager.d.ts +213 -0
- package/dist/plugins/tools/tooltip/TooltipPositioner.d.ts +83 -0
- package/dist/plugins/tools/tooltip/TooltipRenderer.d.ts +64 -0
- package/dist/plugins/tools/tooltip/index.d.ts +18 -0
- package/dist/plugins/tools/tooltip/templates/AnnotationTemplate.d.ts +18 -0
- package/dist/plugins/tools/tooltip/templates/CrosshairTemplate.d.ts +39 -0
- package/dist/plugins/tools/tooltip/templates/DefaultTemplate.d.ts +30 -0
- package/dist/plugins/tools/tooltip/templates/HeatmapTemplate.d.ts +34 -0
- package/dist/plugins/tools/tooltip/templates/MinimalTemplate.d.ts +26 -0
- package/dist/plugins/tools/tooltip/templates/RangeTemplate.d.ts +18 -0
- package/dist/plugins/tools/tooltip/templates/ScientificTemplate.d.ts +34 -0
- package/dist/plugins/tools/tooltip/templates/index.d.ts +27 -0
- package/dist/plugins/tools/tooltip/themes.d.ts +48 -0
- package/dist/plugins/tools/tooltip/types.d.ts +396 -0
- package/dist/plugins/tools.d.ts +3 -0
- package/dist/plugins/tools.js +9 -0
- package/dist/plugins/tools.js.map +1 -0
- package/dist/plugins/types.d.ts +451 -0
- package/dist/plugins/video-recorder/exports.d.ts +6 -0
- package/dist/plugins/video-recorder/index.d.ts +6 -0
- package/dist/plugins/video-recorder/types.d.ts +55 -0
- package/dist/plugins/virtualization/exports.d.ts +6 -0
- package/dist/plugins/virtualization/index.d.ts +6 -0
- package/dist/plugins/virtualization/types.d.ts +48 -0
- package/dist/react/SciPlot.d.ts +60 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/useSciPlot.d.ts +56 -0
- package/dist/renderer/BarRenderer.d.ts +14 -0
- package/dist/renderer/CandlestickRenderer.d.ts +12 -0
- package/dist/renderer/GaugeRenderer.d.ts +3 -0
- package/dist/renderer/HeatmapRenderer.d.ts +15 -0
- package/dist/renderer/NativeWebGLRenderer.d.ts +16 -0
- package/dist/renderer/PolarRenderer.d.ts +64 -0
- package/dist/renderer/RendererInterface.d.ts +70 -0
- package/dist/renderer/SankeyRenderer.d.ts +3 -0
- package/dist/renderer/WebGPURenderer.d.ts +16 -0
- package/dist/renderer/index.d.ts +13 -0
- package/dist/renderer/native/NativeWebGLRenderer.d.ts +31 -0
- package/dist/renderer/native/bufferStore.d.ts +11 -0
- package/dist/renderer/native/draw.d.ts +47 -0
- package/dist/renderer/native/programFactory.d.ts +3 -0
- package/dist/renderer/native/renderFrame.d.ts +3 -0
- package/dist/renderer/native/shaderSources.d.ts +6 -0
- package/dist/renderer/native/textureStore.d.ts +8 -0
- package/dist/renderer/native/types.d.ts +77 -0
- package/dist/renderer/native/utils.d.ts +31 -0
- package/dist/renderer/radar/RadarRenderer.d.ts +71 -0
- package/dist/renderer/radar/index.d.ts +10 -0
- package/dist/renderer/shaders.d.ts +77 -0
- package/dist/renderer/ternary/TernaryRenderer.d.ts +39 -0
- package/dist/renderer/ternary/index.d.ts +6 -0
- package/dist/renderer/ternary/types.d.ts +56 -0
- package/dist/scales/index.d.ts +54 -0
- package/dist/serialization/index.d.ts +153 -0
- package/dist/streaming/backpressure.d.ts +179 -0
- package/dist/streaming/index.d.ts +7 -0
- package/dist/streaming/mock.d.ts +12 -0
- package/dist/streaming/types.d.ts +57 -0
- package/dist/streaming/utils.d.ts +19 -0
- package/dist/streaming/websocket.d.ts +6 -0
- package/dist/testing/index.d.ts +225 -0
- package/dist/theme/colorSchemes.d.ts +56 -0
- package/dist/theme/index.d.ts +138 -0
- package/dist/types.d.ts +753 -0
- package/dist/utils-Dbro9-qM.js +254 -0
- package/dist/utils-Dbro9-qM.js.map +1 -0
- package/dist/velo-plot.d.ts +1 -0
- package/dist/velo-plot.full.d.ts +1 -0
- package/dist/velo-plot.full.js +5804 -0
- package/dist/velo-plot.full.js.map +1 -0
- package/dist/velo-plot.js +31 -0
- package/dist/velo-plot.js.map +1 -0
- package/dist/workers/downsample.d.ts +34 -0
- package/dist/workers/downsample.worker.d.ts +46 -0
- package/package.json +185 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var f = (r, e, t) => e in r ? c(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var n = (r, e, t) => f(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { c as m, i as g } from "../utils-Dbro9-qM.js";
|
|
5
|
+
class u {
|
|
6
|
+
constructor(e, t) {
|
|
7
|
+
n(this, "container");
|
|
8
|
+
n(this, "element", null);
|
|
9
|
+
n(this, "options");
|
|
10
|
+
n(this, "visible", !1);
|
|
11
|
+
n(this, "updateIntervalId", null);
|
|
12
|
+
n(this, "statsProvider", null);
|
|
13
|
+
n(this, "lastStats", {});
|
|
14
|
+
// FPS calculation
|
|
15
|
+
n(this, "frameCount", 0);
|
|
16
|
+
n(this, "lastFpsUpdate", 0);
|
|
17
|
+
n(this, "currentFps", 0);
|
|
18
|
+
n(this, "frameTimes", []);
|
|
19
|
+
this.container = e, this.options = {
|
|
20
|
+
showFps: !0,
|
|
21
|
+
showPointCount: !0,
|
|
22
|
+
showBounds: !0,
|
|
23
|
+
showRendererInfo: !0,
|
|
24
|
+
showMemory: !0,
|
|
25
|
+
showDrawCalls: !0,
|
|
26
|
+
position: "top-left",
|
|
27
|
+
opacity: 0.8,
|
|
28
|
+
fontSize: 11,
|
|
29
|
+
updateInterval: 250,
|
|
30
|
+
className: "velo-plot-debug-overlay",
|
|
31
|
+
...t
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Set the stats provider function
|
|
36
|
+
*/
|
|
37
|
+
setStatsProvider(e) {
|
|
38
|
+
this.statsProvider = e;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Record a frame for FPS calculation
|
|
42
|
+
*/
|
|
43
|
+
recordFrame(e) {
|
|
44
|
+
const t = performance.now();
|
|
45
|
+
this.frameCount++, e !== void 0 && (this.frameTimes.push(e), this.frameTimes.length > 60 && this.frameTimes.shift()), t - this.lastFpsUpdate >= 1e3 && (this.currentFps = Math.round(this.frameCount * 1e3 / (t - this.lastFpsUpdate)), this.frameCount = 0, this.lastFpsUpdate = t);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Show the debug overlay
|
|
49
|
+
*/
|
|
50
|
+
show() {
|
|
51
|
+
this.visible || (this.visible = !0, this.createElement(), this.startUpdates());
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Hide the debug overlay
|
|
55
|
+
*/
|
|
56
|
+
hide() {
|
|
57
|
+
this.visible && (this.visible = !1, this.stopUpdates(), this.destroyElement());
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Toggle visibility
|
|
61
|
+
*/
|
|
62
|
+
toggle() {
|
|
63
|
+
this.visible ? this.hide() : this.show();
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Check if visible
|
|
67
|
+
*/
|
|
68
|
+
isVisible() {
|
|
69
|
+
return this.visible;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Update the display with new stats
|
|
73
|
+
*/
|
|
74
|
+
update(e) {
|
|
75
|
+
var i;
|
|
76
|
+
if (!this.visible || !this.element) return;
|
|
77
|
+
const t = ((i = this.statsProvider) == null ? void 0 : i.call(this)) || {};
|
|
78
|
+
this.lastStats = {
|
|
79
|
+
...this.lastStats,
|
|
80
|
+
...t,
|
|
81
|
+
...e,
|
|
82
|
+
fps: this.currentFps,
|
|
83
|
+
frameTime: this.getAverageFrameTime()
|
|
84
|
+
}, this.renderStats();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get current stats
|
|
88
|
+
*/
|
|
89
|
+
getStats() {
|
|
90
|
+
return {
|
|
91
|
+
...this.lastStats,
|
|
92
|
+
fps: this.currentFps,
|
|
93
|
+
frameTime: this.getAverageFrameTime()
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Destroy the overlay
|
|
98
|
+
*/
|
|
99
|
+
destroy() {
|
|
100
|
+
this.hide(), this.statsProvider = null;
|
|
101
|
+
}
|
|
102
|
+
// ============================================
|
|
103
|
+
// Private Methods
|
|
104
|
+
// ============================================
|
|
105
|
+
createElement() {
|
|
106
|
+
this.element || (this.element = document.createElement("div"), this.element.className = this.options.className, Object.assign(this.element.style, {
|
|
107
|
+
position: "absolute",
|
|
108
|
+
zIndex: "9999",
|
|
109
|
+
fontFamily: "monospace",
|
|
110
|
+
fontSize: `${this.options.fontSize}px`,
|
|
111
|
+
lineHeight: "1.4",
|
|
112
|
+
padding: "8px 12px",
|
|
113
|
+
backgroundColor: `rgba(0, 0, 0, ${this.options.opacity})`,
|
|
114
|
+
color: "#00ff00",
|
|
115
|
+
borderRadius: "4px",
|
|
116
|
+
pointerEvents: "none",
|
|
117
|
+
userSelect: "none",
|
|
118
|
+
whiteSpace: "pre",
|
|
119
|
+
...this.getPositionStyles()
|
|
120
|
+
}), this.container.style.position = "relative", this.container.appendChild(this.element));
|
|
121
|
+
}
|
|
122
|
+
destroyElement() {
|
|
123
|
+
this.element && this.element.parentNode && this.element.parentNode.removeChild(this.element), this.element = null;
|
|
124
|
+
}
|
|
125
|
+
getPositionStyles() {
|
|
126
|
+
switch (this.options.position) {
|
|
127
|
+
case "top-right":
|
|
128
|
+
return { top: "8px", right: "8px" };
|
|
129
|
+
case "bottom-left":
|
|
130
|
+
return { bottom: "8px", left: "8px" };
|
|
131
|
+
case "bottom-right":
|
|
132
|
+
return { bottom: "8px", right: "8px" };
|
|
133
|
+
case "top-left":
|
|
134
|
+
default:
|
|
135
|
+
return { top: "8px", left: "8px" };
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
startUpdates() {
|
|
139
|
+
this.updateIntervalId === null && (this.updateIntervalId = window.setInterval(() => {
|
|
140
|
+
this.update();
|
|
141
|
+
}, this.options.updateInterval));
|
|
142
|
+
}
|
|
143
|
+
stopUpdates() {
|
|
144
|
+
this.updateIntervalId !== null && (clearInterval(this.updateIntervalId), this.updateIntervalId = null);
|
|
145
|
+
}
|
|
146
|
+
getAverageFrameTime() {
|
|
147
|
+
return this.frameTimes.length === 0 ? 0 : this.frameTimes.reduce((t, i) => t + i, 0) / this.frameTimes.length;
|
|
148
|
+
}
|
|
149
|
+
renderStats() {
|
|
150
|
+
if (!this.element) return;
|
|
151
|
+
const e = [], t = this.lastStats;
|
|
152
|
+
if (this.options.showFps && t.fps !== void 0) {
|
|
153
|
+
const i = t.fps >= 55 ? "#00ff00" : t.fps >= 30 ? "#ffff00" : "#ff4444";
|
|
154
|
+
e.push(`<span style="color:${i}">FPS: ${t.fps}</span>`), t.frameTime && e.push(`Frame: ${t.frameTime.toFixed(2)}ms`);
|
|
155
|
+
}
|
|
156
|
+
if (this.options.showPointCount && t.pointCount !== void 0 && e.push(`Points: ${this.formatNumber(t.pointCount)}`), t.seriesCount !== void 0 && e.push(`Series: ${t.seriesCount}`), this.options.showDrawCalls && t.drawCalls !== void 0 && e.push(`Draw calls: ${t.drawCalls}`), this.options.showMemory && t.memoryEstimate !== void 0 && e.push(`Memory: ${this.formatBytes(t.memoryEstimate)}`), this.options.showBounds && t.viewBounds) {
|
|
157
|
+
const i = t.viewBounds;
|
|
158
|
+
e.push(`X: [${this.formatValue(i.xMin)}, ${this.formatValue(i.xMax)}]`), e.push(`Y: [${this.formatValue(i.yMin)}, ${this.formatValue(i.yMax)}]`);
|
|
159
|
+
}
|
|
160
|
+
if (this.options.showRendererInfo && t.rendererInfo) {
|
|
161
|
+
const i = t.rendererInfo;
|
|
162
|
+
if (e.push(`Renderer: ${i.type.toUpperCase()}`), i.renderer) {
|
|
163
|
+
const s = i.renderer.length > 30 ? i.renderer.substring(0, 27) + "..." : i.renderer;
|
|
164
|
+
e.push(`GPU: ${s}`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
t.canvasSize && e.push(`Canvas: ${t.canvasSize.width}×${t.canvasSize.height}`), t.downsamplingActive !== void 0 && e.push(`Downsampling: ${t.downsamplingActive ? "ON" : "OFF"}`), t.devicePixelRatio !== void 0 && e.push(`DPR: ${t.devicePixelRatio}`), this.element.innerHTML = e.join(`
|
|
168
|
+
`);
|
|
169
|
+
}
|
|
170
|
+
formatNumber(e) {
|
|
171
|
+
return e >= 1e9 ? (e / 1e9).toFixed(1) + "B" : e >= 1e6 ? (e / 1e6).toFixed(1) + "M" : e >= 1e3 ? (e / 1e3).toFixed(1) + "K" : e.toLocaleString();
|
|
172
|
+
}
|
|
173
|
+
formatBytes(e) {
|
|
174
|
+
return e >= 1e9 ? (e / 1e9).toFixed(2) + " GB" : e >= 1e6 ? (e / 1e6).toFixed(2) + " MB" : e >= 1e3 ? (e / 1e3).toFixed(2) + " KB" : e + " B";
|
|
175
|
+
}
|
|
176
|
+
formatValue(e) {
|
|
177
|
+
return isFinite(e) ? Math.abs(e) >= 1e6 || Math.abs(e) < 1e-3 && e !== 0 ? e.toExponential(2) : e.toFixed(3) : e.toString();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
function w(r, e) {
|
|
181
|
+
return new u(r, e);
|
|
182
|
+
}
|
|
183
|
+
function S(r) {
|
|
184
|
+
const e = document.querySelector(".velo-plot-container");
|
|
185
|
+
if (!e)
|
|
186
|
+
return console.warn("[SciPlot] No chart container found for debug overlay"), null;
|
|
187
|
+
const t = new u(e, r);
|
|
188
|
+
return t.show(), t;
|
|
189
|
+
}
|
|
190
|
+
class x {
|
|
191
|
+
constructor(e, t, i) {
|
|
192
|
+
n(this, "container");
|
|
193
|
+
n(this, "content");
|
|
194
|
+
n(this, "theme");
|
|
195
|
+
n(this, "series");
|
|
196
|
+
n(this, "isExpanded", !1);
|
|
197
|
+
this.theme = t, this.series = i, this.container = document.createElement("div"), this.container.className = "velo-plot-stats-panel", this.updateContainerStyle();
|
|
198
|
+
const s = document.createElement("div");
|
|
199
|
+
s.innerHTML = "📊 Statistics", s.style.cssText = `
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
font-size: 11px;
|
|
202
|
+
text-transform: uppercase;
|
|
203
|
+
letter-spacing: 0.5px;
|
|
204
|
+
margin-bottom: 8px;
|
|
205
|
+
display: flex;
|
|
206
|
+
justify-content: space-between;
|
|
207
|
+
align-items: center;
|
|
208
|
+
cursor: pointer;
|
|
209
|
+
`, s.onclick = () => this.toggle(), this.content = document.createElement("div"), this.content.style.display = "none", this.container.appendChild(s), this.container.appendChild(this.content), e.appendChild(this.container);
|
|
210
|
+
}
|
|
211
|
+
isDarkTheme() {
|
|
212
|
+
const e = this.theme.name.toLowerCase();
|
|
213
|
+
return e.includes("dark") || e.includes("midnight") || e.includes("electro");
|
|
214
|
+
}
|
|
215
|
+
updateContainerStyle() {
|
|
216
|
+
const e = this.isDarkTheme(), t = e ? "rgba(15, 23, 42, 0.85)" : "rgba(255, 255, 255, 0.95)", i = e ? "#f1f5f9" : "#1e293b", s = e ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.1)", o = e ? "0 4px 12px rgba(0, 0, 0, 0.5)" : "0 4px 12px rgba(0, 0, 0, 0.1)";
|
|
217
|
+
this.container.style.cssText = `
|
|
218
|
+
position: absolute;
|
|
219
|
+
bottom: 8px;
|
|
220
|
+
right: 8px;
|
|
221
|
+
width: 240px;
|
|
222
|
+
background: ${t};
|
|
223
|
+
backdrop-filter: blur(8px);
|
|
224
|
+
-webkit-backdrop-filter: blur(8px);
|
|
225
|
+
border: 1px solid ${s};
|
|
226
|
+
border-radius: 8px;
|
|
227
|
+
box-shadow: ${o};
|
|
228
|
+
color: ${i};
|
|
229
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
230
|
+
padding: 8px 12px;
|
|
231
|
+
z-index: 90;
|
|
232
|
+
transition: all 0.3s ease;
|
|
233
|
+
font-size: 12px;
|
|
234
|
+
pointer-events: auto;
|
|
235
|
+
`;
|
|
236
|
+
}
|
|
237
|
+
update(e) {
|
|
238
|
+
this.isExpanded && (this.content.innerHTML = "", this.series.forEach((t) => {
|
|
239
|
+
if (!t.getVisible()) return;
|
|
240
|
+
const i = t.getData();
|
|
241
|
+
if (!i) return;
|
|
242
|
+
const s = [], o = [];
|
|
243
|
+
for (let a = 0; a < i.x.length; a++)
|
|
244
|
+
i.x[a] >= e.xMin && i.x[a] <= e.xMax && (o.push(i.x[a]), s.push(i.y[a]));
|
|
245
|
+
if (s.length === 0) return;
|
|
246
|
+
const l = m(s), p = g(o, s), h = t.getStyle(), d = document.createElement("div");
|
|
247
|
+
d.style.cssText = `
|
|
248
|
+
padding: 8px 0;
|
|
249
|
+
border-top: 1px solid ${this.isDarkTheme() ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.05)"};
|
|
250
|
+
`, d.innerHTML = `
|
|
251
|
+
<div style="display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-weight: 600;">
|
|
252
|
+
<div style="width: 8px; height: 8px; border-radius: 2px; background: ${h.color}"></div>
|
|
253
|
+
${t.getId()}
|
|
254
|
+
</div>
|
|
255
|
+
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 4px; opacity: 0.9; font-size: 11px;">
|
|
256
|
+
<span>Min: ${l.min.toExponential(3)}</span>
|
|
257
|
+
<span>Max: ${l.max.toExponential(3)}</span>
|
|
258
|
+
<span>Mean: ${l.mean.toExponential(3)}</span>
|
|
259
|
+
<span>Count: ${l.count}</span>
|
|
260
|
+
<span style="grid-column: span 2;">Area: ${p.toExponential(4)}</span>
|
|
261
|
+
</div>
|
|
262
|
+
`, this.content.appendChild(d);
|
|
263
|
+
}), this.content.innerHTML === "" && (this.content.innerHTML = "<div style='opacity: 0.5; font-style: italic;'>No series visible in range</div>"));
|
|
264
|
+
}
|
|
265
|
+
toggle() {
|
|
266
|
+
this.isExpanded = !this.isExpanded, this.content.style.display = this.isExpanded ? "block" : "none", this.isExpanded;
|
|
267
|
+
}
|
|
268
|
+
updateTheme(e) {
|
|
269
|
+
this.theme = e, this.updateContainerStyle();
|
|
270
|
+
}
|
|
271
|
+
destroy() {
|
|
272
|
+
this.container.remove();
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
const v = {
|
|
276
|
+
name: "velo-plot-debug",
|
|
277
|
+
version: "1.0.0",
|
|
278
|
+
description: "Performance monitoring and debugging overlay for velo-plot",
|
|
279
|
+
provides: ["ui"],
|
|
280
|
+
tags: ["debug", "performance", "fps", "monitoring"]
|
|
281
|
+
};
|
|
282
|
+
function C(r = {}) {
|
|
283
|
+
let e = null, t = null, i;
|
|
284
|
+
return {
|
|
285
|
+
manifest: v,
|
|
286
|
+
onInit(s) {
|
|
287
|
+
i = s, r.showFPS !== !1 && (e = new u(i.ui.container, {
|
|
288
|
+
showFps: !0,
|
|
289
|
+
showMemory: !0,
|
|
290
|
+
showPointCount: !0,
|
|
291
|
+
updateInterval: 500,
|
|
292
|
+
...r
|
|
293
|
+
}), e.show(), e.setStatsProvider(() => {
|
|
294
|
+
const o = i.data.getAllSeries();
|
|
295
|
+
return {
|
|
296
|
+
pointCount: o.reduce((p, h) => p + h.getData().x.length, 0),
|
|
297
|
+
seriesCount: o.length,
|
|
298
|
+
viewBounds: i.data.getViewBounds(),
|
|
299
|
+
devicePixelRatio: i.chart.dpr || 1
|
|
300
|
+
};
|
|
301
|
+
})), r.showDataStats && (t = new x(
|
|
302
|
+
i.ui.container,
|
|
303
|
+
i.chart.theme,
|
|
304
|
+
i.chart.series
|
|
305
|
+
));
|
|
306
|
+
},
|
|
307
|
+
onBeforeRender() {
|
|
308
|
+
e && e.recordFrame();
|
|
309
|
+
},
|
|
310
|
+
onAfterRender(s, o) {
|
|
311
|
+
e && e.update({
|
|
312
|
+
frameTime: o.frameTime || o.renderTime
|
|
313
|
+
});
|
|
314
|
+
},
|
|
315
|
+
onRenderOverlay(s) {
|
|
316
|
+
t && t.update(i.data.getViewBounds());
|
|
317
|
+
},
|
|
318
|
+
onDestroy(s) {
|
|
319
|
+
e && (e.destroy(), e = null), t && (t.destroy(), t = null);
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
export {
|
|
324
|
+
u as DebugOverlay,
|
|
325
|
+
C as PluginDebug,
|
|
326
|
+
w as createDebugOverlay,
|
|
327
|
+
C as default,
|
|
328
|
+
S as enableDebugMode
|
|
329
|
+
};
|
|
330
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.js","sources":["../../src/core/debug/index.ts","../../src/core/ChartStatistics.ts","../../src/plugins/debug/index.ts"],"sourcesContent":["/**\n * Sci Plot - Debug Overlay Module\n * \n * Provides a visual debug overlay showing performance metrics,\n * rendering info, and chart state for development and debugging.\n * \n * @module debug\n */\n\n// ============================================\n// Types\n// ============================================\n\nexport interface DebugStats {\n /** Current frames per second */\n fps: number;\n /** Average frame time in ms */\n frameTime: number;\n /** Total number of points being rendered */\n pointCount: number;\n /** Number of visible series */\n seriesCount: number;\n /** Current view bounds */\n viewBounds: {\n xMin: number;\n xMax: number;\n yMin: number;\n yMax: number;\n };\n /** WebGL/WebGPU renderer info */\n rendererInfo: {\n type: 'webgl' | 'webgpu' | 'unknown';\n vendor?: string;\n renderer?: string;\n };\n /** Memory usage estimate (bytes) */\n memoryEstimate: number;\n /** Number of draw calls per frame */\n drawCalls: number;\n /** Whether GPU downsampling is active */\n downsamplingActive: boolean;\n /** Device pixel ratio */\n devicePixelRatio: number;\n /** Canvas dimensions */\n canvasSize: { width: number; height: number };\n /** Plot area dimensions */\n plotArea: { x: number; y: number; width: number; height: number };\n}\n\nexport interface DebugOverlayOptions {\n /** Show FPS counter (default: true) */\n showFps?: boolean;\n /** Show point count (default: true) */\n showPointCount?: boolean;\n /** Show view bounds (default: true) */\n showBounds?: boolean;\n /** Show renderer info (default: true) */\n showRendererInfo?: boolean;\n /** Show memory estimate (default: true) */\n showMemory?: boolean;\n /** Show draw calls (default: true) */\n showDrawCalls?: boolean;\n /** Position: 'top-left', 'top-right', 'bottom-left', 'bottom-right' */\n position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n /** Background opacity (0-1, default: 0.8) */\n opacity?: number;\n /** Font size in pixels (default: 11) */\n fontSize?: number;\n /** Update interval in ms (default: 250) */\n updateInterval?: number;\n /** Custom CSS class name */\n className?: string;\n}\n\n// ============================================\n// Debug Overlay Implementation\n// ============================================\n\nexport class DebugOverlay {\n private container: HTMLElement;\n private element: HTMLDivElement | null = null;\n private options: Required<DebugOverlayOptions>;\n private visible: boolean = false;\n private updateIntervalId: number | null = null;\n private statsProvider: (() => Partial<DebugStats>) | null = null;\n private lastStats: Partial<DebugStats> = {};\n\n // FPS calculation\n private frameCount: number = 0;\n private lastFpsUpdate: number = 0;\n private currentFps: number = 0;\n private frameTimes: number[] = [];\n\n constructor(container: HTMLElement, options?: DebugOverlayOptions) {\n this.container = container;\n this.options = {\n showFps: true,\n showPointCount: true,\n showBounds: true,\n showRendererInfo: true,\n showMemory: true,\n showDrawCalls: true,\n position: 'top-left',\n opacity: 0.8,\n fontSize: 11,\n updateInterval: 250,\n className: 'velo-plot-debug-overlay',\n ...options,\n };\n }\n\n /**\n * Set the stats provider function\n */\n setStatsProvider(provider: () => Partial<DebugStats>): void {\n this.statsProvider = provider;\n }\n\n /**\n * Record a frame for FPS calculation\n */\n recordFrame(frameTime?: number): void {\n const now = performance.now();\n this.frameCount++;\n\n if (frameTime !== undefined) {\n this.frameTimes.push(frameTime);\n if (this.frameTimes.length > 60) {\n this.frameTimes.shift();\n }\n }\n\n // Update FPS every second\n if (now - this.lastFpsUpdate >= 1000) {\n this.currentFps = Math.round((this.frameCount * 1000) / (now - this.lastFpsUpdate));\n this.frameCount = 0;\n this.lastFpsUpdate = now;\n }\n }\n\n /**\n * Show the debug overlay\n */\n show(): void {\n if (this.visible) return;\n \n this.visible = true;\n this.createElement();\n this.startUpdates();\n }\n\n /**\n * Hide the debug overlay\n */\n hide(): void {\n if (!this.visible) return;\n \n this.visible = false;\n this.stopUpdates();\n this.destroyElement();\n }\n\n /**\n * Toggle visibility\n */\n toggle(): void {\n if (this.visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Check if visible\n */\n isVisible(): boolean {\n return this.visible;\n }\n\n /**\n * Update the display with new stats\n */\n update(stats?: Partial<DebugStats>): void {\n if (!this.visible || !this.element) return;\n\n // Merge with provider stats\n const providerStats = this.statsProvider?.() || {};\n this.lastStats = {\n ...this.lastStats,\n ...providerStats,\n ...stats,\n fps: this.currentFps,\n frameTime: this.getAverageFrameTime(),\n };\n\n this.renderStats();\n }\n\n /**\n * Get current stats\n */\n getStats(): Partial<DebugStats> {\n return {\n ...this.lastStats,\n fps: this.currentFps,\n frameTime: this.getAverageFrameTime(),\n };\n }\n\n /**\n * Destroy the overlay\n */\n destroy(): void {\n this.hide();\n this.statsProvider = null;\n }\n\n // ============================================\n // Private Methods\n // ============================================\n\n private createElement(): void {\n if (this.element) return;\n\n this.element = document.createElement('div');\n this.element.className = this.options.className;\n \n // Apply styles\n Object.assign(this.element.style, {\n position: 'absolute',\n zIndex: '9999',\n fontFamily: 'monospace',\n fontSize: `${this.options.fontSize}px`,\n lineHeight: '1.4',\n padding: '8px 12px',\n backgroundColor: `rgba(0, 0, 0, ${this.options.opacity})`,\n color: '#00ff00',\n borderRadius: '4px',\n pointerEvents: 'none',\n userSelect: 'none',\n whiteSpace: 'pre',\n ...this.getPositionStyles(),\n });\n\n this.container.style.position = 'relative';\n this.container.appendChild(this.element);\n }\n\n private destroyElement(): void {\n if (this.element && this.element.parentNode) {\n this.element.parentNode.removeChild(this.element);\n }\n this.element = null;\n }\n\n private getPositionStyles(): Partial<CSSStyleDeclaration> {\n switch (this.options.position) {\n case 'top-right':\n return { top: '8px', right: '8px' };\n case 'bottom-left':\n return { bottom: '8px', left: '8px' };\n case 'bottom-right':\n return { bottom: '8px', right: '8px' };\n case 'top-left':\n default:\n return { top: '8px', left: '8px' };\n }\n }\n\n private startUpdates(): void {\n if (this.updateIntervalId !== null) return;\n \n this.updateIntervalId = window.setInterval(() => {\n this.update();\n }, this.options.updateInterval);\n }\n\n private stopUpdates(): void {\n if (this.updateIntervalId !== null) {\n clearInterval(this.updateIntervalId);\n this.updateIntervalId = null;\n }\n }\n\n private getAverageFrameTime(): number {\n if (this.frameTimes.length === 0) return 0;\n const sum = this.frameTimes.reduce((a, b) => a + b, 0);\n return sum / this.frameTimes.length;\n }\n\n private renderStats(): void {\n if (!this.element) return;\n\n const lines: string[] = [];\n const stats = this.lastStats;\n\n // FPS\n if (this.options.showFps && stats.fps !== undefined) {\n const fpsColor = stats.fps >= 55 ? '#00ff00' : stats.fps >= 30 ? '#ffff00' : '#ff4444';\n lines.push(`<span style=\"color:${fpsColor}\">FPS: ${stats.fps}</span>`);\n if (stats.frameTime) {\n lines.push(`Frame: ${stats.frameTime.toFixed(2)}ms`);\n }\n }\n\n // Point count\n if (this.options.showPointCount && stats.pointCount !== undefined) {\n lines.push(`Points: ${this.formatNumber(stats.pointCount)}`);\n }\n\n // Series count\n if (stats.seriesCount !== undefined) {\n lines.push(`Series: ${stats.seriesCount}`);\n }\n\n // Draw calls\n if (this.options.showDrawCalls && stats.drawCalls !== undefined) {\n lines.push(`Draw calls: ${stats.drawCalls}`);\n }\n\n // Memory\n if (this.options.showMemory && stats.memoryEstimate !== undefined) {\n lines.push(`Memory: ${this.formatBytes(stats.memoryEstimate)}`);\n }\n\n // Bounds\n if (this.options.showBounds && stats.viewBounds) {\n const b = stats.viewBounds;\n lines.push(`X: [${this.formatValue(b.xMin)}, ${this.formatValue(b.xMax)}]`);\n lines.push(`Y: [${this.formatValue(b.yMin)}, ${this.formatValue(b.yMax)}]`);\n }\n\n // Renderer info\n if (this.options.showRendererInfo && stats.rendererInfo) {\n const info = stats.rendererInfo;\n lines.push(`Renderer: ${info.type.toUpperCase()}`);\n if (info.renderer) {\n // Truncate long renderer names\n const shortRenderer = info.renderer.length > 30 \n ? info.renderer.substring(0, 27) + '...'\n : info.renderer;\n lines.push(`GPU: ${shortRenderer}`);\n }\n }\n\n // Canvas size\n if (stats.canvasSize) {\n lines.push(`Canvas: ${stats.canvasSize.width}×${stats.canvasSize.height}`);\n }\n\n // Downsampling\n if (stats.downsamplingActive !== undefined) {\n lines.push(`Downsampling: ${stats.downsamplingActive ? 'ON' : 'OFF'}`);\n }\n\n // DPR\n if (stats.devicePixelRatio !== undefined) {\n lines.push(`DPR: ${stats.devicePixelRatio}`);\n }\n\n this.element.innerHTML = lines.join('\\n');\n }\n\n private formatNumber(n: number): string {\n if (n >= 1e9) return (n / 1e9).toFixed(1) + 'B';\n if (n >= 1e6) return (n / 1e6).toFixed(1) + 'M';\n if (n >= 1e3) return (n / 1e3).toFixed(1) + 'K';\n return n.toLocaleString();\n }\n\n private formatBytes(bytes: number): string {\n if (bytes >= 1e9) return (bytes / 1e9).toFixed(2) + ' GB';\n if (bytes >= 1e6) return (bytes / 1e6).toFixed(2) + ' MB';\n if (bytes >= 1e3) return (bytes / 1e3).toFixed(2) + ' KB';\n return bytes + ' B';\n }\n\n private formatValue(v: number): string {\n if (!isFinite(v)) return v.toString();\n if (Math.abs(v) >= 1e6 || (Math.abs(v) < 0.001 && v !== 0)) {\n return v.toExponential(2);\n }\n return v.toFixed(3);\n }\n}\n\n// ============================================\n// Convenience Functions\n// ============================================\n\n/**\n * Create a debug overlay for a chart container\n */\nexport function createDebugOverlay(\n container: HTMLElement,\n options?: DebugOverlayOptions\n): DebugOverlay {\n return new DebugOverlay(container, options);\n}\n\n/**\n * Quick enable debug mode (attaches to first chart container found)\n */\nexport function enableDebugMode(options?: DebugOverlayOptions): DebugOverlay | null {\n const container = document.querySelector('.velo-plot-container') as HTMLElement;\n if (!container) {\n console.warn('[SciPlot] No chart container found for debug overlay');\n return null;\n }\n \n const overlay = new DebugOverlay(container, options);\n overlay.show();\n return overlay;\n}\n","/**\n * ChartStatistics - In-chart statistics panel\n * \n * Displays real-time statistics (Min, Max, Mean, StdDev, Area) \n * for the visible data range of active series.\n */\n\nimport { ChartTheme } from \"../theme\";\nimport { Series } from \"./Series\";\nimport { calculateStats, integrate } from \"../plugins/analysis\";\nimport { Bounds } from \"../types\";\n\nexport class ChartStatistics {\n private container: HTMLDivElement;\n private content: HTMLDivElement;\n private theme: ChartTheme;\n private series: Map<string, Series>;\n private isExpanded = false;\n\n constructor(\n parent: HTMLElement,\n theme: ChartTheme,\n series: Map<string, Series>\n ) {\n this.theme = theme;\n this.series = series;\n\n this.container = document.createElement(\"div\");\n this.container.className = \"velo-plot-stats-panel\";\n this.updateContainerStyle();\n\n const title = document.createElement(\"div\");\n title.innerHTML = \"📊 Statistics\";\n title.style.cssText = `\n font-weight: 600;\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 8px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n `;\n title.onclick = () => this.toggle();\n\n this.content = document.createElement(\"div\");\n this.content.style.display = \"none\";\n \n this.container.appendChild(title);\n this.container.appendChild(this.content);\n parent.appendChild(this.container);\n }\n\n private isDarkTheme(): boolean {\n const name = this.theme.name.toLowerCase();\n return name.includes(\"dark\") || name.includes(\"midnight\") || name.includes(\"electro\");\n }\n\n private updateContainerStyle(): void {\n const isDark = this.isDarkTheme();\n const bg = isDark ? \"rgba(15, 23, 42, 0.85)\" : \"rgba(255, 255, 255, 0.95)\";\n const color = isDark ? \"#f1f5f9\" : \"#1e293b\";\n const borderColor = isDark ? \"rgba(255, 255, 255, 0.1)\" : \"rgba(0, 0, 0, 0.1)\";\n const shadow = isDark ? \"0 4px 12px rgba(0, 0, 0, 0.5)\" : \"0 4px 12px rgba(0, 0, 0, 0.1)\";\n\n this.container.style.cssText = `\n position: absolute;\n bottom: 8px;\n right: 8px;\n width: 240px;\n background: ${bg};\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n border: 1px solid ${borderColor};\n border-radius: 8px;\n box-shadow: ${shadow};\n color: ${color};\n font-family: system-ui, -apple-system, sans-serif;\n padding: 8px 12px;\n z-index: 90;\n transition: all 0.3s ease;\n font-size: 12px;\n pointer-events: auto;\n `;\n }\n\n public update(viewBounds: Bounds): void {\n if (!this.isExpanded) return;\n\n this.content.innerHTML = \"\";\n \n this.series.forEach((s) => {\n if (!s.getVisible()) return;\n\n const data = s.getData();\n if (!data) return;\n\n // Filter data in visible range\n const visibleY: number[] = [];\n const visibleX: number[] = [];\n for (let i = 0; i < data.x.length; i++) {\n if (data.x[i] >= viewBounds.xMin && data.x[i] <= viewBounds.xMax) {\n visibleX.push(data.x[i]);\n visibleY.push(data.y[i]);\n }\n }\n\n if (visibleY.length === 0) return;\n\n const stats = calculateStats(visibleY);\n const area = integrate(visibleX as any, visibleY as any);\n const style = s.getStyle();\n\n const item = document.createElement(\"div\");\n item.style.cssText = `\n padding: 8px 0;\n border-top: 1px solid ${this.isDarkTheme() ? \"rgba(255,255,255,0.05)\" : \"rgba(0,0,0,0.05)\"};\n `;\n\n item.innerHTML = `\n <div style=\"display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-weight: 600;\">\n <div style=\"width: 8px; height: 8px; border-radius: 2px; background: ${style.color}\"></div>\n ${s.getId()}\n </div>\n <div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: 4px; opacity: 0.9; font-size: 11px;\">\n <span>Min: ${stats.min.toExponential(3)}</span>\n <span>Max: ${stats.max.toExponential(3)}</span>\n <span>Mean: ${stats.mean.toExponential(3)}</span>\n <span>Count: ${stats.count}</span>\n <span style=\"grid-column: span 2;\">Area: ${area.toExponential(4)}</span>\n </div>\n `;\n\n this.content.appendChild(item);\n });\n\n if (this.content.innerHTML === \"\") {\n this.content.innerHTML = \"<div style='opacity: 0.5; font-style: italic;'>No series visible in range</div>\";\n }\n }\n\n public toggle(): void {\n this.isExpanded = !this.isExpanded;\n this.content.style.display = this.isExpanded ? \"block\" : \"none\";\n if (this.isExpanded) {\n // Redraw immediately will be handled by the chart's next render\n }\n }\n\n public updateTheme(theme: ChartTheme): void {\n this.theme = theme;\n this.updateContainerStyle();\n }\n\n public destroy(): void {\n this.container.remove();\n }\n}\n","/**\n * SciPlot Engine - Debug Overlay Plugin\n * \n * Provides performance metrics and debugging information.\n * \n * @module plugins/debug\n */\n\nexport * from \"../../core/debug\";\nimport type { PluginManifest, ChartPlugin, PluginContext, AfterRenderEvent } from \"../types\";\n\nexport interface PluginDebugConfig extends Partial<DebugOverlayOptions> {\n /** Show FPS counter */\n showFPS?: boolean;\n /** Show data stats */\n showDataStats?: boolean;\n}\n\nconst manifestDebug: PluginManifest = {\n name: \"velo-plot-debug\",\n version: \"1.0.0\",\n description: \"Performance monitoring and debugging overlay for velo-plot\",\n provides: [\"ui\"],\n tags: [\"debug\", \"performance\", \"fps\", \"monitoring\"],\n};\n\nimport { DebugOverlay, DebugOverlayOptions } from \"../../core/debug\";\nimport { ChartStatistics } from \"../../core/ChartStatistics\";\n\n/**\n * SciPlot Debug Plugin\n * \n * Adds a useful overlay with real-time performance metrics and debugging info.\n */\nexport function PluginDebug(config: PluginDebugConfig = {}): ChartPlugin<PluginDebugConfig> {\n let overlay: DebugOverlay | null = null;\n let stats: ChartStatistics | null = null;\n\n let ctx: PluginContext;\n\n return {\n manifest: manifestDebug,\n\n onInit(pCtx: PluginContext) {\n ctx = pCtx;\n\n // Initialize FPS/Performance overlay\n if (config.showFPS !== false) {\n overlay = new DebugOverlay(ctx.ui.container, {\n showFps: true,\n showMemory: true,\n showPointCount: true,\n updateInterval: 500,\n ...config\n });\n overlay.show();\n\n // Set stats provider for more detailed info\n overlay.setStatsProvider(() => {\n const series = ctx.data.getAllSeries();\n const pointCount = series.reduce((sum, s) => sum + s.getData().x.length, 0);\n\n return {\n pointCount,\n seriesCount: series.length,\n viewBounds: ctx.data.getViewBounds(),\n devicePixelRatio: (ctx.chart as any).dpr || 1,\n };\n });\n }\n\n // Initialize data statistics panel\n if (config.showDataStats) {\n stats = new ChartStatistics(\n ctx.ui.container,\n (ctx.chart as any).theme,\n (ctx.chart as any).series\n );\n }\n },\n\n onBeforeRender() {\n if (overlay) {\n overlay.recordFrame();\n }\n },\n\n onAfterRender(_ctx, event: AfterRenderEvent) {\n if (overlay) {\n overlay.update({\n frameTime: (event as any).frameTime || event.renderTime,\n });\n }\n },\n\n onRenderOverlay(_ctx) {\n if (stats) {\n stats.update(ctx.data.getViewBounds());\n }\n },\n\n onDestroy(_ctx: PluginContext) {\n if (overlay) {\n overlay.destroy();\n overlay = null;\n }\n if (stats) {\n stats.destroy();\n stats = null;\n }\n }\n };\n}\n\nexport { DebugOverlay };\nexport default PluginDebug;\n"],"names":["DebugOverlay","container","options","__publicField","provider","frameTime","now","stats","providerStats","_a","a","b","lines","fpsColor","info","shortRenderer","n","bytes","v","createDebugOverlay","enableDebugMode","overlay","ChartStatistics","parent","theme","series","title","name","isDark","bg","color","borderColor","shadow","viewBounds","s","data","visibleY","visibleX","i","calculateStats","area","integrate","style","item","manifestDebug","PluginDebug","config","ctx","pCtx","sum","_ctx","event"],"mappings":";;;;AA8EO,MAAMA,EAAa;AAAA,EAexB,YAAYC,GAAwBC,GAA+B;AAd3D,IAAAC,EAAA;AACA,IAAAA,EAAA,iBAAiC;AACjC,IAAAA,EAAA;AACA,IAAAA,EAAA,iBAAmB;AACnB,IAAAA,EAAA,0BAAkC;AAClC,IAAAA,EAAA,uBAAoD;AACpD,IAAAA,EAAA,mBAAiC,CAAA;AAGjC;AAAA,IAAAA,EAAA,oBAAqB;AACrB,IAAAA,EAAA,uBAAwB;AACxB,IAAAA,EAAA,oBAAqB;AACrB,IAAAA,EAAA,oBAAuB,CAAA;AAG7B,SAAK,YAAYF,GACjB,KAAK,UAAU;AAAA,MACb,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,YAAY;AAAA,MACZ,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,UAAU;AAAA,MACV,SAAS;AAAA,M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AAA,CACN,GACDzB,EAAQ,KAAA,GAGRA,EAAQ,iBAAiB,MAAM;AAC3B,cAAMI,IAASsB,EAAI,KAAK,aAAA;AAGxB,eAAO;AAAA,UACH,YAHetB,EAAO,OAAO,CAACwB,GAAKf,MAAMe,IAAMf,EAAE,QAAA,EAAU,EAAE,QAAQ,CAAC;AAAA,UAItE,aAAaT,EAAO;AAAA,UACpB,YAAYsB,EAAI,KAAK,cAAA;AAAA,UACrB,kBAAmBA,EAAI,MAAc,OAAO;AAAA,QAAA;AAAA,MAEpD,CAAC,IAIDD,EAAO,kBACPvC,IAAQ,IAAIe;AAAA,QACRyB,EAAI,GAAG;AAAA,QACNA,EAAI,MAAc;AAAA,QAClBA,EAAI,MAAc;AAAA,MAAA;AAAA,IAG/B;AAAA,IAEA,iBAAiB;AACb,MAAI1B,KACAA,EAAQ,YAAA;AAAA,IAEhB;AAAA,IAEA,cAAc6B,GAAMC,GAAyB;AACzC,MAAI9B,KACAA,EAAQ,OAAO;AAAA,QACX,WAAY8B,EAAc,aAAaA,EAAM;AAAA,MAAA,CAChD;AAAA,IAET;AAAA,IAEA,gBAAgBD,GAAM;AAClB,MAAI3C,KACAA,EAAM,OAAOwC,EAAI,KAAK,cAAA,CAAe;AAAA,IAE7C;AAAA,IAEA,UAAUG,GAAqB;AACvB,MAAI7B,MACJA,EAAQ,QAAA,GACRA,IAAU,OAEVd,MACAA,EAAM,QAAA,GACNA,IAAQ;AAAA,IAEhB;AAAA,EAAA;AAER;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Drag & Drop editing plugin exports
|
|
3
|
+
* @module plugins/drag-edit
|
|
4
|
+
*/
|
|
5
|
+
export { PluginDragEdit, default } from './index';
|
|
6
|
+
export type { PluginDragEditConfig, DragEditAPI, DraggedPoint, DragEditEvent, DragConstraint, DragValidation, } from './types';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PluginDragEditConfig } from './types';
|
|
2
|
+
import { ChartPlugin } from '../types';
|
|
3
|
+
|
|
4
|
+
export declare function PluginDragEdit(userConfig?: Partial<PluginDragEditConfig>): ChartPlugin<PluginDragEditConfig>;
|
|
5
|
+
export default PluginDragEdit;
|
|
6
|
+
export type { PluginDragEditConfig, DragEditAPI, DraggedPoint, DragEditEvent, DragConstraint, } from './types';
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types for drag and drop editing
|
|
3
|
+
* @module plugins/drag-edit/types
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Drag constraint (which axis can be edited)
|
|
7
|
+
*/
|
|
8
|
+
export type DragConstraint = 'x' | 'y' | 'both' | 'none';
|
|
9
|
+
/**
|
|
10
|
+
* Point being dragged
|
|
11
|
+
*/
|
|
12
|
+
export interface DraggedPoint {
|
|
13
|
+
/** Series ID */
|
|
14
|
+
seriesId: string;
|
|
15
|
+
/** Point index in the data array */
|
|
16
|
+
index: number;
|
|
17
|
+
/** Original X value */
|
|
18
|
+
originalX: number;
|
|
19
|
+
/** Original Y value */
|
|
20
|
+
originalY: number;
|
|
21
|
+
/** Current X value (during drag) */
|
|
22
|
+
currentX: number;
|
|
23
|
+
/** Current Y value (during drag) */
|
|
24
|
+
currentY: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Drag validation result
|
|
28
|
+
*/
|
|
29
|
+
export interface DragValidation {
|
|
30
|
+
/** Whether the drag is valid */
|
|
31
|
+
valid: boolean;
|
|
32
|
+
/** Error message if invalid */
|
|
33
|
+
message?: string;
|
|
34
|
+
/** Adjusted X value (if snapping) */
|
|
35
|
+
snapX?: number;
|
|
36
|
+
/** Adjusted Y value (if snapping) */
|
|
37
|
+
snapY?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Drag edit event
|
|
41
|
+
*/
|
|
42
|
+
export interface DragEditEvent {
|
|
43
|
+
/** Series ID */
|
|
44
|
+
seriesId: string;
|
|
45
|
+
/** Point index */
|
|
46
|
+
index: number;
|
|
47
|
+
/** Old X value */
|
|
48
|
+
oldX: number;
|
|
49
|
+
/** Old Y value */
|
|
50
|
+
oldY: number;
|
|
51
|
+
/** New X value */
|
|
52
|
+
newX: number;
|
|
53
|
+
/** New Y value */
|
|
54
|
+
newY: number;
|
|
55
|
+
/** Delta X */
|
|
56
|
+
deltaX: number;
|
|
57
|
+
/** Delta Y */
|
|
58
|
+
deltaY: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Plugin configuration
|
|
62
|
+
*/
|
|
63
|
+
export interface PluginDragEditConfig {
|
|
64
|
+
/** Enable drag editing (default: true) */
|
|
65
|
+
enabled?: boolean;
|
|
66
|
+
/** Which axis can be edited (default: 'both') */
|
|
67
|
+
constraint?: DragConstraint;
|
|
68
|
+
/** Snap to grid (default: false) */
|
|
69
|
+
snapToGrid?: boolean;
|
|
70
|
+
/** Grid snap interval for X (data units) */
|
|
71
|
+
snapIntervalX?: number;
|
|
72
|
+
/** Grid snap interval for Y (data units) */
|
|
73
|
+
snapIntervalY?: number;
|
|
74
|
+
/** Minimum distance in pixels to start drag (default: 5) */
|
|
75
|
+
dragThreshold?: number;
|
|
76
|
+
/** Point detection radius in pixels (default: 10) */
|
|
77
|
+
hitRadius?: number;
|
|
78
|
+
/** Series IDs that are editable (empty = all editable) */
|
|
79
|
+
editableSeries?: string[];
|
|
80
|
+
/** Validation function called before applying changes */
|
|
81
|
+
validator?: (point: DraggedPoint) => DragValidation | boolean;
|
|
82
|
+
/** Callback when a point starts being dragged */
|
|
83
|
+
onDragStart?: (event: DragEditEvent) => void;
|
|
84
|
+
/** Callback during drag (called on mouse move) */
|
|
85
|
+
onDrag?: (event: DragEditEvent) => void;
|
|
86
|
+
/** Callback when drag is complete */
|
|
87
|
+
onDragEnd?: (event: DragEditEvent) => void;
|
|
88
|
+
/** Highlight color for dragged point (default: '#ffff00') */
|
|
89
|
+
highlightColor?: string;
|
|
90
|
+
/** Show preview line during drag (default: true) */
|
|
91
|
+
showPreview?: boolean;
|
|
92
|
+
/** Preview line style */
|
|
93
|
+
previewStyle?: {
|
|
94
|
+
color?: string;
|
|
95
|
+
width?: number;
|
|
96
|
+
dash?: number[];
|
|
97
|
+
opacity?: number;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Plugin API
|
|
102
|
+
*/
|
|
103
|
+
export interface DragEditAPI {
|
|
104
|
+
/** Enable drag editing */
|
|
105
|
+
enable(): void;
|
|
106
|
+
/** Disable drag editing */
|
|
107
|
+
disable(): void;
|
|
108
|
+
/** Check if drag editing is enabled */
|
|
109
|
+
isEnabled(): boolean;
|
|
110
|
+
/** Set editable series */
|
|
111
|
+
setEditableSeries(seriesIds: string[]): void;
|
|
112
|
+
/** Get currently dragged point (if any) */
|
|
113
|
+
getDraggedPoint(): DraggedPoint | null;
|
|
114
|
+
/** Cancel current drag operation */
|
|
115
|
+
cancelDrag(): void;
|
|
116
|
+
/** Update configuration */
|
|
117
|
+
updateConfig(config: Partial<PluginDragEditConfig>): void;
|
|
118
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ForecastingMethod, ForecastingParams, ForecastingResult } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Main dispatcher for forecasting algorithms
|
|
5
|
+
*/
|
|
6
|
+
export declare function calculateForecast(x: number[] | Float64Array | Float32Array, y: number[] | Float64Array | Float32Array, method: ForecastingMethod, horizon: number, params?: ForecastingParams): ForecastingResult;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PluginForecastingConfig } from './types';
|
|
2
|
+
import { PluginManifest, ChartPlugin } from '../types';
|
|
3
|
+
|
|
4
|
+
declare const manifestForecasting: PluginManifest;
|
|
5
|
+
/**
|
|
6
|
+
* Forecasting Plugin for Sci Plot
|
|
7
|
+
*/
|
|
8
|
+
export declare function PluginForecasting(config?: Partial<PluginForecastingConfig>): ChartPlugin<PluginForecastingConfig>;
|
|
9
|
+
export * from './types';
|
|
10
|
+
export * from './algorithms';
|
|
11
|
+
export { manifestForecasting };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { SeriesData } from '../../types';
|
|
2
|
+
|
|
3
|
+
export type ForecastingMethod = 'sma' | 'ema' | 'wma' | 'linear' | 'expSmoothing' | 'holt' | 'holtWinters';
|
|
4
|
+
export interface ForecastingOptions {
|
|
5
|
+
/** Method to use for forecasting */
|
|
6
|
+
method: ForecastingMethod;
|
|
7
|
+
/** Number of periods to forecast ahead */
|
|
8
|
+
horizon: number;
|
|
9
|
+
/** Confidence level (e.g., 0.95 for 95% confidence interval) */
|
|
10
|
+
confidence?: number;
|
|
11
|
+
/** Parameters specific to the chosen method */
|
|
12
|
+
params?: ForecastingParams;
|
|
13
|
+
}
|
|
14
|
+
export interface ForecastingParams {
|
|
15
|
+
/** Period for moving averages */
|
|
16
|
+
windowSize?: number;
|
|
17
|
+
/** Smoothing factor for level (alpha) */
|
|
18
|
+
alpha?: number;
|
|
19
|
+
/** Smoothing factor for trend (beta) */
|
|
20
|
+
beta?: number;
|
|
21
|
+
/** Smoothing factor for seasonality (gamma) */
|
|
22
|
+
gamma?: number;
|
|
23
|
+
/** Length of the seasonal cycle (for Holt-Winters) */
|
|
24
|
+
period?: number;
|
|
25
|
+
/** Polynomial order for trend fitting (default: 1) */
|
|
26
|
+
polynomialOrder?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface ForecastingResult {
|
|
29
|
+
/** Forecasted points (X values) */
|
|
30
|
+
xValues: Float64Array | number[];
|
|
31
|
+
/** Forecasted values (Y values) */
|
|
32
|
+
yValues: Float64Array | number[];
|
|
33
|
+
/** Lower confidence bound */
|
|
34
|
+
lowerBound?: Float64Array | number[];
|
|
35
|
+
/** Upper confidence bound */
|
|
36
|
+
upperBound?: Float64Array | number[];
|
|
37
|
+
/** Method used */
|
|
38
|
+
method: ForecastingMethod;
|
|
39
|
+
/** Metadata and fit statistics */
|
|
40
|
+
metadata: {
|
|
41
|
+
mse?: number;
|
|
42
|
+
mae?: number;
|
|
43
|
+
r2?: number;
|
|
44
|
+
aic?: number;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export interface ForecastingVisualizationConfig {
|
|
48
|
+
/** Whether to show the forecast line (default: true) */
|
|
49
|
+
showLine?: boolean;
|
|
50
|
+
/** Whether to show the confidence interval (default: true) */
|
|
51
|
+
showConfidenceInterval?: boolean;
|
|
52
|
+
/** Line style for the forecast */
|
|
53
|
+
lineStyle?: {
|
|
54
|
+
color?: string;
|
|
55
|
+
width?: number;
|
|
56
|
+
dash?: number[];
|
|
57
|
+
};
|
|
58
|
+
/** Style for the confidence interval */
|
|
59
|
+
intervalStyle?: {
|
|
60
|
+
fillColor?: string;
|
|
61
|
+
opacity?: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export interface PluginForecastingConfig {
|
|
65
|
+
/** Default forecasting options */
|
|
66
|
+
defaultOptions?: Partial<ForecastingOptions>;
|
|
67
|
+
/** Default visualization settings */
|
|
68
|
+
defaultVisualization?: ForecastingVisualizationConfig;
|
|
69
|
+
}
|
|
70
|
+
export interface ForecastingAPI {
|
|
71
|
+
/**
|
|
72
|
+
* Forecast future values for a given dataset
|
|
73
|
+
*/
|
|
74
|
+
forecast(data: SeriesData | number[] | Float32Array, options: ForecastingOptions): ForecastingResult;
|
|
75
|
+
/**
|
|
76
|
+
* Forecast future values for a series by ID
|
|
77
|
+
*/
|
|
78
|
+
forecastSeries(seriesId: string, options: ForecastingOptions): Promise<ForecastingResult>;
|
|
79
|
+
/**
|
|
80
|
+
* Visualize the forecast on the chart overlay
|
|
81
|
+
*/
|
|
82
|
+
visualize(result: ForecastingResult, config?: ForecastingVisualizationConfig): string;
|
|
83
|
+
/**
|
|
84
|
+
* Clear active forecast visualizations
|
|
85
|
+
*/
|
|
86
|
+
clear(id?: string): void;
|
|
87
|
+
[key: string]: unknown;
|
|
88
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChartPlugin } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* SciPlot Engine - GPU Abstraction Plugin
|
|
4
|
+
*
|
|
5
|
+
* Provides WebGPU and WebGL2 backend support, GPU compute capabilities,
|
|
6
|
+
* and performance benchmarking tools.
|
|
7
|
+
*
|
|
8
|
+
* @module plugins/gpu
|
|
9
|
+
*/
|
|
10
|
+
export { WebGPUBackend, WebGLBackend, GpuRenderer, createGpuRenderer, SeriesAdapter, parseColorToRGBA, PipelineCache, BaseBufferStore, BaseTextureStore, GpuBenchmark, GpuCompute, } from '../../gpu';
|
|
11
|
+
export * from '../../gpu/types';
|
|
12
|
+
export interface PluginGpuConfig {
|
|
13
|
+
/** Preferred backend: 'webgpu' | 'webgl2' | 'webgl1' */
|
|
14
|
+
preferredBackend?: string;
|
|
15
|
+
/** Enable hardware acceleration for compute tasks */
|
|
16
|
+
enableCompute?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* SciPlot GPU Plugin
|
|
20
|
+
*
|
|
21
|
+
* Enables high-performance GPU-accelerated rendering and compute.
|
|
22
|
+
*/
|
|
23
|
+
export declare function PluginGpu(_config?: PluginGpuConfig): ChartPlugin<PluginGpuConfig>;
|
|
24
|
+
export default PluginGpu;
|