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,309 @@
|
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var u = (s, e, t) => e in s ? c(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var r = (s, e, t) => u(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
class d {
|
|
5
|
+
constructor(e, t) {
|
|
6
|
+
r(this, "container");
|
|
7
|
+
r(this, "element", null);
|
|
8
|
+
r(this, "options");
|
|
9
|
+
r(this, "state", {
|
|
10
|
+
isLoading: !1,
|
|
11
|
+
progress: 0,
|
|
12
|
+
message: "",
|
|
13
|
+
startTime: null,
|
|
14
|
+
eta: null
|
|
15
|
+
});
|
|
16
|
+
// For ETA calculation
|
|
17
|
+
r(this, "progressHistory", []);
|
|
18
|
+
this.container = e, this.options = {
|
|
19
|
+
type: "spinner",
|
|
20
|
+
message: "Loading...",
|
|
21
|
+
showPercentage: !0,
|
|
22
|
+
overlayOpacity: 0.7,
|
|
23
|
+
accentColor: "#00f2ff",
|
|
24
|
+
backgroundColor: "rgba(0, 0, 0, 0.7)",
|
|
25
|
+
textColor: "#ffffff",
|
|
26
|
+
size: "medium",
|
|
27
|
+
className: "velo-plot-loading",
|
|
28
|
+
autoHide: !0,
|
|
29
|
+
hideDelay: 200,
|
|
30
|
+
...t
|
|
31
|
+
}, this.state.message = this.options.message;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Show the loading indicator
|
|
35
|
+
*/
|
|
36
|
+
show(e) {
|
|
37
|
+
this.state.isLoading = !0, this.state.progress = 0, this.state.startTime = performance.now(), this.state.eta = null, this.progressHistory = [], e && (this.state.message = e), this.createElement(), this.render();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Hide the loading indicator
|
|
41
|
+
*/
|
|
42
|
+
hide() {
|
|
43
|
+
this.state.isLoading && (this.state.isLoading = !1, this.element && (this.element.style.opacity = "0"), this.options.autoHide ? setTimeout(() => {
|
|
44
|
+
this.destroyElement();
|
|
45
|
+
}, this.options.hideDelay) : this.destroyElement());
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Update progress (0-100)
|
|
49
|
+
*/
|
|
50
|
+
setProgress(e, t) {
|
|
51
|
+
const i = Math.max(0, Math.min(100, e));
|
|
52
|
+
this.state.progress = i, t && (this.state.message = t), this.progressHistory.push({
|
|
53
|
+
time: performance.now(),
|
|
54
|
+
progress: i
|
|
55
|
+
}), this.progressHistory.length > 10 && this.progressHistory.shift(), this.calculateEta(), this.render(), i >= 100 && this.options.autoHide && this.hide();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Update message only
|
|
59
|
+
*/
|
|
60
|
+
setMessage(e) {
|
|
61
|
+
this.state.message = e, this.render();
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Check if loading is in progress
|
|
65
|
+
*/
|
|
66
|
+
isLoading() {
|
|
67
|
+
return this.state.isLoading;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get current progress
|
|
71
|
+
*/
|
|
72
|
+
getProgress() {
|
|
73
|
+
return this.state.progress;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get current state
|
|
77
|
+
*/
|
|
78
|
+
getState() {
|
|
79
|
+
return { ...this.state };
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Destroy the indicator
|
|
83
|
+
*/
|
|
84
|
+
destroy() {
|
|
85
|
+
this.hide(), this.destroyElement();
|
|
86
|
+
}
|
|
87
|
+
// ============================================
|
|
88
|
+
// Private Methods
|
|
89
|
+
// ============================================
|
|
90
|
+
createElement() {
|
|
91
|
+
this.element || (this.element = document.createElement("div"), this.element.className = this.options.className, Object.assign(this.element.style, {
|
|
92
|
+
position: "absolute",
|
|
93
|
+
top: "0",
|
|
94
|
+
left: "0",
|
|
95
|
+
right: "0",
|
|
96
|
+
bottom: "0",
|
|
97
|
+
display: "flex",
|
|
98
|
+
flexDirection: "column",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
justifyContent: "center",
|
|
101
|
+
backgroundColor: this.options.backgroundColor,
|
|
102
|
+
zIndex: "9998",
|
|
103
|
+
transition: "opacity 0.2s ease"
|
|
104
|
+
}), this.element.innerHTML = this.getInnerHtml(), this.injectStyles(), this.container.style.position = "relative", this.container.appendChild(this.element));
|
|
105
|
+
}
|
|
106
|
+
destroyElement() {
|
|
107
|
+
this.element && this.element.parentNode && this.element.parentNode.removeChild(this.element), this.element = null;
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
this.element && (this.element.innerHTML = this.getInnerHtml());
|
|
111
|
+
}
|
|
112
|
+
getInnerHtml() {
|
|
113
|
+
const { type: e, accentColor: t, textColor: i, size: o, showPercentage: a } = this.options, { progress: l, message: m, eta: p } = this.state, h = { small: 24, medium: 40, large: 56 }[o], g = o === "small" ? 12 : o === "large" ? 16 : 14;
|
|
114
|
+
let n = "";
|
|
115
|
+
switch (e) {
|
|
116
|
+
case "spinner":
|
|
117
|
+
n = `
|
|
118
|
+
<div class="velo-plot-loading-spinner" style="
|
|
119
|
+
width: ${h}px;
|
|
120
|
+
height: ${h}px;
|
|
121
|
+
border: 3px solid rgba(255,255,255,0.2);
|
|
122
|
+
border-top-color: ${t};
|
|
123
|
+
border-radius: 50%;
|
|
124
|
+
animation: velo-plot-spin 0.8s linear infinite;
|
|
125
|
+
"></div>
|
|
126
|
+
`;
|
|
127
|
+
break;
|
|
128
|
+
case "progress":
|
|
129
|
+
n = `
|
|
130
|
+
<div class="velo-plot-loading-progress" style="
|
|
131
|
+
width: 200px;
|
|
132
|
+
height: 8px;
|
|
133
|
+
background: rgba(255,255,255,0.2);
|
|
134
|
+
border-radius: 4px;
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
">
|
|
137
|
+
<div style="
|
|
138
|
+
width: ${l}%;
|
|
139
|
+
height: 100%;
|
|
140
|
+
background: ${t};
|
|
141
|
+
transition: width 0.2s ease;
|
|
142
|
+
"></div>
|
|
143
|
+
</div>
|
|
144
|
+
${a ? `
|
|
145
|
+
<div style="
|
|
146
|
+
color: ${i};
|
|
147
|
+
font-size: ${g}px;
|
|
148
|
+
margin-top: 8px;
|
|
149
|
+
font-family: system-ui, sans-serif;
|
|
150
|
+
">${Math.round(l)}%</div>
|
|
151
|
+
` : ""}
|
|
152
|
+
`;
|
|
153
|
+
break;
|
|
154
|
+
case "skeleton":
|
|
155
|
+
n = `
|
|
156
|
+
<div class="velo-plot-loading-skeleton" style="
|
|
157
|
+
width: 80%;
|
|
158
|
+
max-width: 300px;
|
|
159
|
+
">
|
|
160
|
+
<div class="velo-plot-skeleton-line" style="height: 20px; margin-bottom: 8px;"></div>
|
|
161
|
+
<div class="velo-plot-skeleton-line" style="height: 16px; width: 60%; margin-bottom: 8px;"></div>
|
|
162
|
+
<div class="velo-plot-skeleton-line" style="height: 40px;"></div>
|
|
163
|
+
</div>
|
|
164
|
+
`;
|
|
165
|
+
break;
|
|
166
|
+
case "pulse":
|
|
167
|
+
n = `
|
|
168
|
+
<div class="velo-plot-loading-pulse" style="
|
|
169
|
+
width: ${h}px;
|
|
170
|
+
height: ${h}px;
|
|
171
|
+
background: ${t};
|
|
172
|
+
border-radius: 50%;
|
|
173
|
+
animation: velo-plot-pulse 1.2s ease-in-out infinite;
|
|
174
|
+
"></div>
|
|
175
|
+
`;
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
return m && (n += `
|
|
179
|
+
<div style="
|
|
180
|
+
color: ${i};
|
|
181
|
+
font-size: ${g}px;
|
|
182
|
+
margin-top: 12px;
|
|
183
|
+
font-family: system-ui, sans-serif;
|
|
184
|
+
">${m}</div>
|
|
185
|
+
`), p !== null && p > 0 && e === "progress" && (n += `
|
|
186
|
+
<div style="
|
|
187
|
+
color: rgba(255,255,255,0.6);
|
|
188
|
+
font-size: ${g - 2}px;
|
|
189
|
+
margin-top: 4px;
|
|
190
|
+
font-family: system-ui, sans-serif;
|
|
191
|
+
">~${this.formatTime(p)} remaining</div>
|
|
192
|
+
`), n;
|
|
193
|
+
}
|
|
194
|
+
injectStyles() {
|
|
195
|
+
const e = "velo-plot-loading-styles";
|
|
196
|
+
if (document.getElementById(e)) return;
|
|
197
|
+
const t = document.createElement("style");
|
|
198
|
+
t.id = e, t.textContent = `
|
|
199
|
+
@keyframes velo-plot-spin {
|
|
200
|
+
to { transform: rotate(360deg); }
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@keyframes velo-plot-pulse {
|
|
204
|
+
0%, 100% { transform: scale(1); opacity: 1; }
|
|
205
|
+
50% { transform: scale(1.2); opacity: 0.7; }
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@keyframes velo-plot-skeleton-shimmer {
|
|
209
|
+
0% { background-position: -200% 0; }
|
|
210
|
+
100% { background-position: 200% 0; }
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.velo-plot-skeleton-line {
|
|
214
|
+
background: linear-gradient(
|
|
215
|
+
90deg,
|
|
216
|
+
rgba(255,255,255,0.1) 25%,
|
|
217
|
+
rgba(255,255,255,0.2) 50%,
|
|
218
|
+
rgba(255,255,255,0.1) 75%
|
|
219
|
+
);
|
|
220
|
+
background-size: 200% 100%;
|
|
221
|
+
animation: velo-plot-skeleton-shimmer 1.5s infinite;
|
|
222
|
+
border-radius: 4px;
|
|
223
|
+
}
|
|
224
|
+
`, document.head.appendChild(t);
|
|
225
|
+
}
|
|
226
|
+
calculateEta() {
|
|
227
|
+
if (this.progressHistory.length < 2) {
|
|
228
|
+
this.state.eta = null;
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const e = this.progressHistory[0], t = this.progressHistory[this.progressHistory.length - 1], i = t.progress - e.progress, o = t.time - e.time;
|
|
232
|
+
if (i <= 0) {
|
|
233
|
+
this.state.eta = null;
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
const a = 100 - t.progress, l = i / o;
|
|
237
|
+
this.state.eta = a / l;
|
|
238
|
+
}
|
|
239
|
+
formatTime(e) {
|
|
240
|
+
const t = Math.ceil(e / 1e3);
|
|
241
|
+
if (t < 60) return `${t}s`;
|
|
242
|
+
const i = Math.floor(t / 60), o = t % 60;
|
|
243
|
+
return `${i}m ${o}s`;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function b(s, e) {
|
|
247
|
+
return new d(s, e);
|
|
248
|
+
}
|
|
249
|
+
function x(s, e) {
|
|
250
|
+
const t = new d(s, { message: e });
|
|
251
|
+
return t.show(), t;
|
|
252
|
+
}
|
|
253
|
+
function w(s, e) {
|
|
254
|
+
const t = new d(s, {
|
|
255
|
+
type: "progress",
|
|
256
|
+
message: e
|
|
257
|
+
});
|
|
258
|
+
return t.show(), t;
|
|
259
|
+
}
|
|
260
|
+
const f = {
|
|
261
|
+
name: "velo-plot-loading",
|
|
262
|
+
version: "1.0.0",
|
|
263
|
+
description: "Loading and progress indicators for velo-plot",
|
|
264
|
+
provides: ["ui"],
|
|
265
|
+
tags: ["loading", "progress", "ui", "ux"]
|
|
266
|
+
};
|
|
267
|
+
function k(s = {}) {
|
|
268
|
+
let e = null;
|
|
269
|
+
return {
|
|
270
|
+
manifest: f,
|
|
271
|
+
onInit(t) {
|
|
272
|
+
if (e = new d(t.ui.container, {
|
|
273
|
+
...s,
|
|
274
|
+
// Inherit theme colors if not explicitly provided
|
|
275
|
+
accentColor: s.accentColor || (t.ui.theme.isDark ? "#00f2ff" : "#00b4d8")
|
|
276
|
+
}), s.autoShow !== !1 && e.show(s.message || "Initializing Chart..."), s.autoHide !== !1) {
|
|
277
|
+
const i = t.events.on("render", () => {
|
|
278
|
+
t.data.getAllSeries().some((a) => a.getPointCount() > 0) && (e == null || e.hide(), i());
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
onDestroy(t) {
|
|
283
|
+
e == null || e.destroy(), e = null;
|
|
284
|
+
},
|
|
285
|
+
api: {
|
|
286
|
+
show(t) {
|
|
287
|
+
e == null || e.show(t);
|
|
288
|
+
},
|
|
289
|
+
hide() {
|
|
290
|
+
e == null || e.hide();
|
|
291
|
+
},
|
|
292
|
+
setProgress(t, i) {
|
|
293
|
+
e == null || e.setProgress(t, i);
|
|
294
|
+
},
|
|
295
|
+
setMessage(t) {
|
|
296
|
+
e == null || e.setMessage(t);
|
|
297
|
+
},
|
|
298
|
+
getIndicator: () => e
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
export {
|
|
303
|
+
d as L,
|
|
304
|
+
k as P,
|
|
305
|
+
w as a,
|
|
306
|
+
b as c,
|
|
307
|
+
x as s
|
|
308
|
+
};
|
|
309
|
+
//# sourceMappingURL=index-qhscKTDy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-qhscKTDy.js","sources":["../src/core/loading/index.ts","../src/plugins/loading/index.ts"],"sourcesContent":["/**\n * Sci Plot - Loading Indicator Module\n * \n * Provides visual loading/progress indicators for chart operations.\n * Supports progress bars, spinners, and skeleton placeholders.\n * \n * @module loading\n */\n\n// ============================================\n// Types\n// ============================================\n\nexport type LoadingIndicatorType = 'spinner' | 'progress' | 'skeleton' | 'pulse';\n\nexport interface LoadingIndicatorOptions {\n /** Indicator type (default: 'spinner') */\n type?: LoadingIndicatorType;\n /** Message to display (default: 'Loading...') */\n message?: string;\n /** Show percentage for progress type (default: true) */\n showPercentage?: boolean;\n /** Background overlay opacity (0-1, default: 0.7) */\n overlayOpacity?: number;\n /** Accent color for spinner/progress (default: '#00f2ff') */\n accentColor?: string;\n /** Background color (default: 'rgba(0,0,0,0.7)') */\n backgroundColor?: string;\n /** Text color (default: '#ffffff') */\n textColor?: string;\n /** Size: 'small', 'medium', 'large' (default: 'medium') */\n size?: 'small' | 'medium' | 'large';\n /** Custom CSS class */\n className?: string;\n /** Auto-hide after completion (default: true) */\n autoHide?: boolean;\n /** Hide delay in ms after completion (default: 300) */\n hideDelay?: number;\n}\n\nexport interface LoadingState {\n /** Whether loading is in progress */\n isLoading: boolean;\n /** Progress value (0-100) */\n progress: number;\n /** Current message */\n message: string;\n /** Start time of loading */\n startTime: number | null;\n /** Estimated time remaining in ms */\n eta: number | null;\n}\n\n// ============================================\n// Loading Indicator Implementation\n// ============================================\n\nexport class LoadingIndicator {\n private container: HTMLElement;\n private element: HTMLDivElement | null = null;\n private options: Required<LoadingIndicatorOptions>;\n private state: LoadingState = {\n isLoading: false,\n progress: 0,\n message: '',\n startTime: null,\n eta: null,\n };\n\n // For ETA calculation\n private progressHistory: { time: number; progress: number }[] = [];\n\n constructor(container: HTMLElement, options?: LoadingIndicatorOptions) {\n this.container = container;\n this.options = {\n type: 'spinner',\n message: 'Loading...',\n showPercentage: true,\n overlayOpacity: 0.7,\n accentColor: '#00f2ff',\n backgroundColor: 'rgba(0, 0, 0, 0.7)',\n textColor: '#ffffff',\n size: 'medium',\n className: 'velo-plot-loading',\n autoHide: true,\n hideDelay: 200,\n ...options,\n };\n this.state.message = this.options.message;\n }\n\n /**\n * Show the loading indicator\n */\n show(message?: string): void {\n this.state.isLoading = true;\n this.state.progress = 0;\n this.state.startTime = performance.now();\n this.state.eta = null;\n this.progressHistory = [];\n \n if (message) {\n this.state.message = message;\n }\n\n this.createElement();\n this.render();\n }\n\n /**\n * Hide the loading indicator\n */\n hide(): void {\n if (!this.state.isLoading) return;\n this.state.isLoading = false;\n \n if (this.element) {\n this.element.style.opacity = '0';\n }\n\n if (this.options.autoHide) {\n setTimeout(() => {\n this.destroyElement();\n }, this.options.hideDelay);\n } else {\n this.destroyElement();\n }\n }\n\n /**\n * Update progress (0-100)\n */\n setProgress(progress: number, message?: string): void {\n const clampedProgress = Math.max(0, Math.min(100, progress));\n this.state.progress = clampedProgress;\n \n if (message) {\n this.state.message = message;\n }\n\n // Track progress for ETA\n this.progressHistory.push({\n time: performance.now(),\n progress: clampedProgress,\n });\n\n // Keep only recent history\n if (this.progressHistory.length > 10) {\n this.progressHistory.shift();\n }\n\n // Calculate ETA\n this.calculateEta();\n \n this.render();\n\n // Auto-complete\n if (clampedProgress >= 100 && this.options.autoHide) {\n this.hide();\n }\n }\n\n /**\n * Update message only\n */\n setMessage(message: string): void {\n this.state.message = message;\n this.render();\n }\n\n /**\n * Check if loading is in progress\n */\n isLoading(): boolean {\n return this.state.isLoading;\n }\n\n /**\n * Get current progress\n */\n getProgress(): number {\n return this.state.progress;\n }\n\n /**\n * Get current state\n */\n getState(): LoadingState {\n return { ...this.state };\n }\n\n /**\n * Destroy the indicator\n */\n destroy(): void {\n this.hide();\n this.destroyElement();\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 overlay styles\n Object.assign(this.element.style, {\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: this.options.backgroundColor,\n zIndex: '9998',\n transition: 'opacity 0.2s ease',\n });\n\n // Create inner content\n this.element.innerHTML = this.getInnerHtml();\n \n // Inject styles\n this.injectStyles();\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 render(): void {\n if (!this.element) return;\n this.element.innerHTML = this.getInnerHtml();\n }\n\n private getInnerHtml(): string {\n const { type, accentColor, textColor, size, showPercentage } = this.options;\n const { progress, message, eta } = this.state;\n \n const sizeMap = { small: 24, medium: 40, large: 56 };\n const spinnerSize = sizeMap[size];\n const fontSize = size === 'small' ? 12 : size === 'large' ? 16 : 14;\n\n let content = '';\n\n switch (type) {\n case 'spinner':\n content = `\n <div class=\"velo-plot-loading-spinner\" style=\"\n width: ${spinnerSize}px;\n height: ${spinnerSize}px;\n border: 3px solid rgba(255,255,255,0.2);\n border-top-color: ${accentColor};\n border-radius: 50%;\n animation: velo-plot-spin 0.8s linear infinite;\n \"></div>\n `;\n break;\n\n case 'progress':\n content = `\n <div class=\"velo-plot-loading-progress\" style=\"\n width: 200px;\n height: 8px;\n background: rgba(255,255,255,0.2);\n border-radius: 4px;\n overflow: hidden;\n \">\n <div style=\"\n width: ${progress}%;\n height: 100%;\n background: ${accentColor};\n transition: width 0.2s ease;\n \"></div>\n </div>\n ${showPercentage ? `\n <div style=\"\n color: ${textColor};\n font-size: ${fontSize}px;\n margin-top: 8px;\n font-family: system-ui, sans-serif;\n \">${Math.round(progress)}%</div>\n ` : ''}\n `;\n break;\n\n case 'skeleton':\n content = `\n <div class=\"velo-plot-loading-skeleton\" style=\"\n width: 80%;\n max-width: 300px;\n \">\n <div class=\"velo-plot-skeleton-line\" style=\"height: 20px; margin-bottom: 8px;\"></div>\n <div class=\"velo-plot-skeleton-line\" style=\"height: 16px; width: 60%; margin-bottom: 8px;\"></div>\n <div class=\"velo-plot-skeleton-line\" style=\"height: 40px;\"></div>\n </div>\n `;\n break;\n\n case 'pulse':\n content = `\n <div class=\"velo-plot-loading-pulse\" style=\"\n width: ${spinnerSize}px;\n height: ${spinnerSize}px;\n background: ${accentColor};\n border-radius: 50%;\n animation: velo-plot-pulse 1.2s ease-in-out infinite;\n \"></div>\n `;\n break;\n }\n\n // Add message\n if (message) {\n content += `\n <div style=\"\n color: ${textColor};\n font-size: ${fontSize}px;\n margin-top: 12px;\n font-family: system-ui, sans-serif;\n \">${message}</div>\n `;\n }\n\n // Add ETA if available\n if (eta !== null && eta > 0 && type === 'progress') {\n content += `\n <div style=\"\n color: rgba(255,255,255,0.6);\n font-size: ${fontSize - 2}px;\n margin-top: 4px;\n font-family: system-ui, sans-serif;\n \">~${this.formatTime(eta)} remaining</div>\n `;\n }\n\n return content;\n }\n\n private injectStyles(): void {\n const styleId = 'velo-plot-loading-styles';\n if (document.getElementById(styleId)) return;\n\n const style = document.createElement('style');\n style.id = styleId;\n style.textContent = `\n @keyframes velo-plot-spin {\n to { transform: rotate(360deg); }\n }\n \n @keyframes velo-plot-pulse {\n 0%, 100% { transform: scale(1); opacity: 1; }\n 50% { transform: scale(1.2); opacity: 0.7; }\n }\n \n @keyframes velo-plot-skeleton-shimmer {\n 0% { background-position: -200% 0; }\n 100% { background-position: 200% 0; }\n }\n \n .velo-plot-skeleton-line {\n background: linear-gradient(\n 90deg,\n rgba(255,255,255,0.1) 25%,\n rgba(255,255,255,0.2) 50%,\n rgba(255,255,255,0.1) 75%\n );\n background-size: 200% 100%;\n animation: velo-plot-skeleton-shimmer 1.5s infinite;\n border-radius: 4px;\n }\n `;\n document.head.appendChild(style);\n }\n\n private calculateEta(): void {\n if (this.progressHistory.length < 2) {\n this.state.eta = null;\n return;\n }\n\n const first = this.progressHistory[0];\n const last = this.progressHistory[this.progressHistory.length - 1];\n \n const progressDelta = last.progress - first.progress;\n const timeDelta = last.time - first.time;\n\n if (progressDelta <= 0) {\n this.state.eta = null;\n return;\n }\n\n const remainingProgress = 100 - last.progress;\n const rate = progressDelta / timeDelta;\n this.state.eta = remainingProgress / rate;\n }\n\n private formatTime(ms: number): string {\n const seconds = Math.ceil(ms / 1000);\n if (seconds < 60) return `${seconds}s`;\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = seconds % 60;\n return `${minutes}m ${remainingSeconds}s`;\n }\n}\n\n// ============================================\n// Convenience Functions\n// ============================================\n\n/**\n * Create a loading indicator for a container\n */\nexport function createLoadingIndicator(\n container: HTMLElement,\n options?: LoadingIndicatorOptions\n): LoadingIndicator {\n return new LoadingIndicator(container, options);\n}\n\n/**\n * Show loading with a simple spinner\n */\nexport function showLoading(\n container: HTMLElement,\n message?: string\n): LoadingIndicator {\n const indicator = new LoadingIndicator(container, { message });\n indicator.show();\n return indicator;\n}\n\n/**\n * Show progress loading\n */\nexport function showProgress(\n container: HTMLElement,\n message?: string\n): LoadingIndicator {\n const indicator = new LoadingIndicator(container, {\n type: 'progress',\n message,\n });\n indicator.show();\n return indicator;\n}\n","/**\n * SciPlot Engine - Loading Indicator Plugin\n * \n * Provides customizable loading and progress indicators.\n * \n * @module plugins/loading\n */\n\nimport { LoadingIndicator } from \"../../core/loading\";\nimport type { LoadingIndicatorOptions } from \"../../core/loading\";\nimport type { PluginManifest, ChartPlugin, PluginContext } from \"../types\";\n\nexport interface PluginLoadingConfig extends Partial<LoadingIndicatorOptions> {\n /** Auto-show on heavy data operations */\n autoShow?: boolean;\n}\n\nconst manifestLoading: PluginManifest = {\n name: \"velo-plot-loading\",\n version: \"1.0.0\",\n description: \"Loading and progress indicators for velo-plot\",\n provides: [\"ui\"],\n tags: [\"loading\", \"progress\", \"ui\", \"ux\"],\n};\n\n/**\n * SciPlot Loading Plugin\n * \n * Adds sleek loading indicators and progress trackers to the chart.\n */\nexport function PluginLoading(_config: PluginLoadingConfig = {}): ChartPlugin<PluginLoadingConfig> {\n let indicator: LoadingIndicator | null = null;\n\n return {\n manifest: manifestLoading,\n\n onInit(ctx: PluginContext) { \n // Create the indicator using the container from the UI context\n indicator = new LoadingIndicator(ctx.ui.container, {\n ..._config,\n // Inherit theme colors if not explicitly provided\n accentColor: _config.accentColor || (ctx.ui.theme.isDark ? '#00f2ff' : '#00b4d8'),\n });\n\n // If autoShow is enabled (or by default during init), show it\n if (_config.autoShow !== false) {\n indicator.show(_config.message || 'Initializing Chart...');\n }\n\n // Optional: Auto-hide on first successful render WITH data\n if (_config.autoHide !== false) {\n const off = ctx.events.on('render', () => {\n const hasData = ctx.data.getAllSeries().some(s => s.getPointCount() > 0);\n if (hasData) {\n indicator?.hide();\n off();\n }\n });\n }\n },\n\n onDestroy(_ctx: PluginContext) {\n indicator?.destroy();\n indicator = null;\n },\n\n api: {\n show(message?: string) {\n indicator?.show(message);\n },\n hide() {\n indicator?.hide();\n },\n setProgress(progress: number, message?: string) {\n indicator?.setProgress(progress, message);\n },\n setMessage(message: string) {\n indicator?.setMessage(message);\n },\n getIndicator: () => indicator\n }\n };\n}\n\nexport { LoadingIndicator };\nexport default PluginLoading;\n"],"names":["LoadingIndicator","container","options","__publicField","message","progress","clampedProgress","type","accentColor","textColor","size","showPercentage","eta","spinnerSize","fontSize","content","styleId","style","first","last","progressDelta","timeDelta","remainingProgress","rate","ms","seconds","minutes","remainingSeconds","createLoadingIndicator","showLoading","indicator","showProgress","manifestLoading","PluginLoading","_config","ctx","off","s","_ctx"],"mappings":";;;AAyDO,MAAMA,EAAiB;AAAA,EAe5B,YAAYC,GAAwBC,GAAmC;AAd/D,IAAAC,EAAA;AACA,IAAAA,EAAA,iBAAiC;AACjC,IAAAA,EAAA;AACA,IAAAA,EAAA,eAAsB;AAAA,MAC5B,WAAW;AAAA,MACX,UAAU;AAAA,MACV,SAAS;AAAA,MACT,WAAW;AAAA,MACX,KAAK;AAAA,IAAA;AAIC;AAAA,IAAAA,EAAA,yBAAwD,CAAA;AAG9D,SAAK,YAAYF,GACjB,KAAK,UAAU;AAAA,MACb,MAAM;AAAA,MACN,SAAS;AAAA,MACT,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,iBAAiB;AAAA,MACjB,WAAW;AAAA,MACX,MAAM;AAAA,MACN,WAAW;AAAA,MACX,UAAU;AAAA,MACV,WAAW;AAAA,MACX,GAAGC;AAAA,IAAA,GAEL,KAAK,MAAM,UAAU,KAAK,QAAQ;AAAA,EACpC;AAAA;AAAA;AAAA;AAAA,EAKA,KAAKE,GAAwB;AAC3B,SAAK,MAAM,YAAY,IACvB,KAAK,MAAM,WAAW,GACtB,KAAK,MAAM,YAAY,YAAY,IAAA,GACnC,KAAK,MAAM,MAAM,MACjB,KAAK,kBAAkB,CAAA,GAEnBA,MACF,KAAK,MAAM,UAAUA,IAGvB,KAAK,cAAA,GACL,KAAK,OAAA;AAAA,EACP;AAAA;AAAA;AAAA;AAAA,EAKA,OAAa;AACX,IAAK,K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BC,EAAI,GAAG,MAAM,SAAS,YAAY;AAAA,MAAA,CAC1E,GAGGD,EAAQ,aAAa,MACrBJ,EAAU,KAAKI,EAAQ,WAAW,uBAAuB,GAIzDA,EAAQ,aAAa,IAAO;AAC5B,cAAME,IAAMD,EAAI,OAAO,GAAG,UAAU,MAAM;AAEvC,UADgBA,EAAI,KAAK,aAAA,EAAe,KAAK,CAAAE,MAAKA,EAAE,cAAA,IAAkB,CAAC,MAEnEP,KAAA,QAAAA,EAAW,QACXM,EAAA;AAAA,QAEP,CAAC;AAAA,MACL;AAAA,IACJ;AAAA,IAEA,UAAUE,GAAqB;AAC3B,MAAAR,KAAA,QAAAA,EAAW,WACXA,IAAY;AAAA,IAChB;AAAA,IAEA,KAAK;AAAA,MACD,KAAK1B,GAAkB;AACnB,QAAA0B,KAAA,QAAAA,EAAW,KAAK1B;AAAA,MACpB;AAAA,MACA,OAAO;AACH,QAAA0B,KAAA,QAAAA,EAAW;AAAA,MACf;AAAA,MACA,YAAYzB,GAAkBD,GAAkB;AAC5C,QAAA0B,KAAA,QAAAA,EAAW,YAAYzB,GAAUD;AAAA,MACrC;AAAA,MACA,WAAWA,GAAiB;AACxB,QAAA0B,KAAA,QAAAA,EAAW,WAAW1B;AAAA,MAC1B;AAAA,MACA,cAAc,MAAM0B;AAAA,IAAA;AAAA,EACxB;AAER;"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
locale: "en-US",
|
|
3
|
+
decimalSeparator: ".",
|
|
4
|
+
thousandsSeparator: ",",
|
|
5
|
+
dateFormat: "MM/DD/YYYY",
|
|
6
|
+
timeFormat: "hh:mm:ss a",
|
|
7
|
+
labels: {
|
|
8
|
+
start: "Start",
|
|
9
|
+
pause: "Pause",
|
|
10
|
+
reset: "Reset",
|
|
11
|
+
export: "Export",
|
|
12
|
+
autoScale: "Auto Scale",
|
|
13
|
+
pan: "Pan",
|
|
14
|
+
zoom: "Zoom",
|
|
15
|
+
select: "Select",
|
|
16
|
+
legend: "Legend",
|
|
17
|
+
fps: "FPS",
|
|
18
|
+
points: "points",
|
|
19
|
+
loading: "Loading...",
|
|
20
|
+
noData: "No data",
|
|
21
|
+
error: "Error"
|
|
22
|
+
}
|
|
23
|
+
}, f = {
|
|
24
|
+
locale: "es-ES",
|
|
25
|
+
decimalSeparator: ",",
|
|
26
|
+
thousandsSeparator: ".",
|
|
27
|
+
dateFormat: "DD/MM/YYYY",
|
|
28
|
+
timeFormat: "HH:mm:ss",
|
|
29
|
+
labels: {
|
|
30
|
+
start: "Iniciar",
|
|
31
|
+
pause: "Pausar",
|
|
32
|
+
reset: "Reiniciar",
|
|
33
|
+
export: "Exportar",
|
|
34
|
+
autoScale: "Auto Escala",
|
|
35
|
+
pan: "Mover",
|
|
36
|
+
zoom: "Zoom",
|
|
37
|
+
select: "Seleccionar",
|
|
38
|
+
legend: "Leyenda",
|
|
39
|
+
fps: "FPS",
|
|
40
|
+
points: "puntos",
|
|
41
|
+
loading: "Cargando...",
|
|
42
|
+
noData: "Sin datos",
|
|
43
|
+
error: "Error"
|
|
44
|
+
}
|
|
45
|
+
}, g = {
|
|
46
|
+
locale: "de-DE",
|
|
47
|
+
decimalSeparator: ",",
|
|
48
|
+
thousandsSeparator: ".",
|
|
49
|
+
dateFormat: "DD.MM.YYYY",
|
|
50
|
+
timeFormat: "HH:mm:ss",
|
|
51
|
+
labels: {
|
|
52
|
+
start: "Start",
|
|
53
|
+
pause: "Pause",
|
|
54
|
+
reset: "Zurücksetzen",
|
|
55
|
+
export: "Exportieren",
|
|
56
|
+
autoScale: "Auto-Skalierung",
|
|
57
|
+
pan: "Verschieben",
|
|
58
|
+
zoom: "Zoom",
|
|
59
|
+
select: "Auswählen",
|
|
60
|
+
legend: "Legende",
|
|
61
|
+
fps: "FPS",
|
|
62
|
+
points: "Punkte",
|
|
63
|
+
loading: "Laden...",
|
|
64
|
+
noData: "Keine Daten",
|
|
65
|
+
error: "Fehler"
|
|
66
|
+
}
|
|
67
|
+
}, F = {
|
|
68
|
+
locale: "fr-FR",
|
|
69
|
+
decimalSeparator: ",",
|
|
70
|
+
thousandsSeparator: " ",
|
|
71
|
+
dateFormat: "DD/MM/YYYY",
|
|
72
|
+
timeFormat: "HH:mm:ss",
|
|
73
|
+
labels: {
|
|
74
|
+
start: "Démarrer",
|
|
75
|
+
pause: "Pause",
|
|
76
|
+
reset: "Réinitialiser",
|
|
77
|
+
export: "Exporter",
|
|
78
|
+
autoScale: "Échelle auto",
|
|
79
|
+
pan: "Déplacer",
|
|
80
|
+
zoom: "Zoom",
|
|
81
|
+
select: "Sélectionner",
|
|
82
|
+
legend: "Légende",
|
|
83
|
+
fps: "FPS",
|
|
84
|
+
points: "points",
|
|
85
|
+
loading: "Chargement...",
|
|
86
|
+
noData: "Aucune donnée",
|
|
87
|
+
error: "Erreur"
|
|
88
|
+
}
|
|
89
|
+
}, h = {
|
|
90
|
+
locale: "pt-BR",
|
|
91
|
+
decimalSeparator: ",",
|
|
92
|
+
thousandsSeparator: ".",
|
|
93
|
+
dateFormat: "DD/MM/YYYY",
|
|
94
|
+
timeFormat: "HH:mm:ss",
|
|
95
|
+
labels: {
|
|
96
|
+
start: "Iniciar",
|
|
97
|
+
pause: "Pausar",
|
|
98
|
+
reset: "Reiniciar",
|
|
99
|
+
export: "Exportar",
|
|
100
|
+
autoScale: "Escala Auto",
|
|
101
|
+
pan: "Mover",
|
|
102
|
+
zoom: "Zoom",
|
|
103
|
+
select: "Selecionar",
|
|
104
|
+
legend: "Legenda",
|
|
105
|
+
fps: "FPS",
|
|
106
|
+
points: "pontos",
|
|
107
|
+
loading: "Carregando...",
|
|
108
|
+
noData: "Sem dados",
|
|
109
|
+
error: "Erro"
|
|
110
|
+
}
|
|
111
|
+
}, D = {
|
|
112
|
+
locale: "zh-CN",
|
|
113
|
+
decimalSeparator: ".",
|
|
114
|
+
thousandsSeparator: ",",
|
|
115
|
+
dateFormat: "YYYY/MM/DD",
|
|
116
|
+
timeFormat: "HH:mm:ss",
|
|
117
|
+
labels: {
|
|
118
|
+
start: "开始",
|
|
119
|
+
pause: "暂停",
|
|
120
|
+
reset: "重置",
|
|
121
|
+
export: "导出",
|
|
122
|
+
autoScale: "自动缩放",
|
|
123
|
+
pan: "平移",
|
|
124
|
+
zoom: "缩放",
|
|
125
|
+
select: "选择",
|
|
126
|
+
legend: "图例",
|
|
127
|
+
fps: "FPS",
|
|
128
|
+
points: "点",
|
|
129
|
+
loading: "加载中...",
|
|
130
|
+
noData: "无数据",
|
|
131
|
+
error: "错误"
|
|
132
|
+
}
|
|
133
|
+
}, b = {
|
|
134
|
+
locale: "ja-JP",
|
|
135
|
+
decimalSeparator: ".",
|
|
136
|
+
thousandsSeparator: ",",
|
|
137
|
+
dateFormat: "YYYY/MM/DD",
|
|
138
|
+
timeFormat: "HH:mm:ss",
|
|
139
|
+
labels: {
|
|
140
|
+
start: "開始",
|
|
141
|
+
pause: "一時停止",
|
|
142
|
+
reset: "リセット",
|
|
143
|
+
export: "エクスポート",
|
|
144
|
+
autoScale: "自動スケール",
|
|
145
|
+
pan: "パン",
|
|
146
|
+
zoom: "ズーム",
|
|
147
|
+
select: "選択",
|
|
148
|
+
legend: "凡例",
|
|
149
|
+
fps: "FPS",
|
|
150
|
+
points: "ポイント",
|
|
151
|
+
loading: "読み込み中...",
|
|
152
|
+
noData: "データなし",
|
|
153
|
+
error: "エラー"
|
|
154
|
+
}
|
|
155
|
+
}, S = {
|
|
156
|
+
"en-US": l,
|
|
157
|
+
en: l,
|
|
158
|
+
"es-ES": f,
|
|
159
|
+
es: f,
|
|
160
|
+
"de-DE": g,
|
|
161
|
+
de: g,
|
|
162
|
+
"fr-FR": F,
|
|
163
|
+
fr: F,
|
|
164
|
+
"pt-BR": h,
|
|
165
|
+
pt: h,
|
|
166
|
+
"zh-CN": D,
|
|
167
|
+
zh: D,
|
|
168
|
+
"ja-JP": b,
|
|
169
|
+
ja: b
|
|
170
|
+
}, d = [
|
|
171
|
+
{ value: 1e-15, symbol: "f" },
|
|
172
|
+
{ value: 1e-12, symbol: "p" },
|
|
173
|
+
{ value: 1e-9, symbol: "n" },
|
|
174
|
+
{ value: 1e-6, symbol: "µ" },
|
|
175
|
+
{ value: 1e-3, symbol: "m" },
|
|
176
|
+
{ value: 1, symbol: "" },
|
|
177
|
+
{ value: 1e3, symbol: "k" },
|
|
178
|
+
{ value: 1e6, symbol: "M" },
|
|
179
|
+
{ value: 1e9, symbol: "G" },
|
|
180
|
+
{ value: 1e12, symbol: "T" },
|
|
181
|
+
{ value: 1e15, symbol: "P" }
|
|
182
|
+
];
|
|
183
|
+
let c = l;
|
|
184
|
+
function P(a) {
|
|
185
|
+
if (typeof a == "string") {
|
|
186
|
+
const t = S[a];
|
|
187
|
+
t ? c = t : c = { ...l, locale: a };
|
|
188
|
+
} else
|
|
189
|
+
c = { ...l, ...a };
|
|
190
|
+
}
|
|
191
|
+
function x() {
|
|
192
|
+
return c;
|
|
193
|
+
}
|
|
194
|
+
function H(a) {
|
|
195
|
+
return S[a];
|
|
196
|
+
}
|
|
197
|
+
function A(a, t) {
|
|
198
|
+
S[a] = t;
|
|
199
|
+
}
|
|
200
|
+
function L(a) {
|
|
201
|
+
let t;
|
|
202
|
+
a ? typeof a == "string" ? t = S[a] || { ...l, locale: a } : t = { ...l, ...a } : t = c;
|
|
203
|
+
const p = t.decimalSeparator || ".", Y = t.thousandsSeparator || ",", E = { ...l.labels, ...t.labels };
|
|
204
|
+
return {
|
|
205
|
+
formatNumber(e, o = 2) {
|
|
206
|
+
if (t.numberFormatter)
|
|
207
|
+
return t.numberFormatter(e, o);
|
|
208
|
+
if (!isFinite(e))
|
|
209
|
+
return e.toString();
|
|
210
|
+
const r = Math.abs(e).toFixed(o).split("."), s = r[0].replace(/\B(?=(\d{3})+(?!\d))/g, Y), n = r[1];
|
|
211
|
+
let m = s;
|
|
212
|
+
return n && (m += p + n), e < 0 ? "-" + m : m;
|
|
213
|
+
},
|
|
214
|
+
formatDate(e) {
|
|
215
|
+
if (t.dateFormatter)
|
|
216
|
+
return t.dateFormatter(e);
|
|
217
|
+
const o = t.dateFormat || "YYYY-MM-DD", r = String(e.getDate()).padStart(2, "0"), s = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getFullYear());
|
|
218
|
+
return o.replace("YYYY", n).replace("MM", s).replace("DD", r);
|
|
219
|
+
},
|
|
220
|
+
formatTime(e) {
|
|
221
|
+
const o = t.timeFormat || "HH:mm:ss", r = e.getHours(), s = r % 12 || 12, n = String(e.getMinutes()).padStart(2, "0"), m = String(e.getSeconds()).padStart(2, "0"), i = r >= 12 ? "PM" : "AM";
|
|
222
|
+
return o.replace("HH", String(r).padStart(2, "0")).replace("hh", String(s).padStart(2, "0")).replace("mm", n).replace("ss", m).replace("a", i.toLowerCase()).replace("A", i);
|
|
223
|
+
},
|
|
224
|
+
formatDateTime(e) {
|
|
225
|
+
return this.formatDate(e) + " " + this.formatTime(e);
|
|
226
|
+
},
|
|
227
|
+
formatWithPrefix(e, o = "") {
|
|
228
|
+
if (e === 0) return "0" + (o ? " " + o : "");
|
|
229
|
+
const r = Math.abs(e);
|
|
230
|
+
let s = d[5];
|
|
231
|
+
for (let u = d.length - 1; u >= 0; u--)
|
|
232
|
+
if (r >= d[u].value * 0.9999) {
|
|
233
|
+
s = d[u];
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
const n = e / s.value, m = this.formatNumber(n, 2), i = s.symbol + o;
|
|
237
|
+
return m + (i ? " " + i : "");
|
|
238
|
+
},
|
|
239
|
+
formatScientific(e, o = 2) {
|
|
240
|
+
if (e === 0) return "0";
|
|
241
|
+
if (!isFinite(e)) return e.toString();
|
|
242
|
+
const r = Math.floor(Math.log10(Math.abs(e))), s = e / Math.pow(10, r);
|
|
243
|
+
return this.formatNumber(s, o) + " × 10" + M(r);
|
|
244
|
+
},
|
|
245
|
+
getLabel(e) {
|
|
246
|
+
return E[e] || e;
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
function M(a) {
|
|
251
|
+
const t = {
|
|
252
|
+
"-": "⁻",
|
|
253
|
+
0: "⁰",
|
|
254
|
+
1: "¹",
|
|
255
|
+
2: "²",
|
|
256
|
+
3: "³",
|
|
257
|
+
4: "⁴",
|
|
258
|
+
5: "⁵",
|
|
259
|
+
6: "⁶",
|
|
260
|
+
7: "⁷",
|
|
261
|
+
8: "⁸",
|
|
262
|
+
9: "⁹"
|
|
263
|
+
};
|
|
264
|
+
return String(a).split("").map((p) => t[p] || p).join("");
|
|
265
|
+
}
|
|
266
|
+
const y = L();
|
|
267
|
+
export {
|
|
268
|
+
l as L,
|
|
269
|
+
f as a,
|
|
270
|
+
g as b,
|
|
271
|
+
F as c,
|
|
272
|
+
h as d,
|
|
273
|
+
D as e,
|
|
274
|
+
b as f,
|
|
275
|
+
x as g,
|
|
276
|
+
H as h,
|
|
277
|
+
L as i,
|
|
278
|
+
y as j,
|
|
279
|
+
A as r,
|
|
280
|
+
P as s
|
|
281
|
+
};
|
|
282
|
+
//# sourceMappingURL=index-x4stH3jD.js.map
|