minerva-design 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +21 -21
- package/custom-elements.json +3072 -611
- package/dist/angular/fesm2022/minerva-angular.mjs +1491 -5
- package/dist/angular/fesm2022/minerva-angular.mjs.map +1 -1
- package/dist/angular/types/minerva-angular.d.ts +595 -5
- package/dist/charts/canvas.d.cts +4 -3
- package/dist/charts/canvas.d.ts +4 -3
- package/dist/charts/core.cjs +1 -1
- package/dist/charts/core.d.cts +6 -4
- package/dist/charts/core.d.ts +6 -4
- package/dist/charts/core.js +24 -16
- package/dist/charts/engine/axis.cjs +1 -1
- package/dist/charts/engine/axis.cjs.map +1 -1
- package/dist/charts/engine/axis.js +42 -19
- package/dist/charts/engine/axis.js.map +1 -1
- package/dist/charts/engine/canvas.cjs +1 -1
- package/dist/charts/engine/canvas.cjs.map +1 -1
- package/dist/charts/engine/canvas.js +155 -127
- package/dist/charts/engine/canvas.js.map +1 -1
- package/dist/charts/engine/chart.cjs +1 -1
- package/dist/charts/engine/chart.cjs.map +1 -1
- package/dist/charts/engine/chart.js +370 -255
- package/dist/charts/engine/chart.js.map +1 -1
- package/dist/charts/engine/color.cjs +1 -1
- package/dist/charts/engine/color.cjs.map +1 -1
- package/dist/charts/engine/color.d.cts +18 -0
- package/dist/charts/engine/color.d.ts +18 -0
- package/dist/charts/engine/color.js +48 -2
- package/dist/charts/engine/color.js.map +1 -1
- package/dist/charts/engine/controller.cjs +2 -2
- package/dist/charts/engine/controller.cjs.map +1 -1
- package/dist/charts/engine/controller.d.cts +34 -1
- package/dist/charts/engine/controller.d.ts +34 -1
- package/dist/charts/engine/controller.js +318 -273
- package/dist/charts/engine/controller.js.map +1 -1
- package/dist/charts/engine/data.cjs +1 -1
- package/dist/charts/engine/data.cjs.map +1 -1
- package/dist/charts/engine/data.d.cts +3 -1
- package/dist/charts/engine/data.d.ts +3 -1
- package/dist/charts/engine/data.js +6 -4
- package/dist/charts/engine/data.js.map +1 -1
- package/dist/charts/engine/defaults.cjs +2 -0
- package/dist/charts/engine/defaults.cjs.map +1 -0
- package/dist/charts/engine/defaults.d.cts +20 -0
- package/dist/charts/engine/defaults.d.ts +20 -0
- package/dist/charts/engine/defaults.js +35 -0
- package/dist/charts/engine/defaults.js.map +1 -0
- package/dist/charts/engine/format.cjs +1 -1
- package/dist/charts/engine/format.cjs.map +1 -1
- package/dist/charts/engine/format.d.cts +6 -0
- package/dist/charts/engine/format.d.ts +6 -0
- package/dist/charts/engine/format.js +15 -2
- package/dist/charts/engine/format.js.map +1 -1
- package/dist/charts/engine/graph/chart.cjs +2 -0
- package/dist/charts/engine/graph/chart.cjs.map +1 -0
- package/dist/charts/engine/graph/chart.d.cts +3 -0
- package/dist/charts/engine/graph/chart.d.ts +3 -0
- package/dist/charts/engine/graph/chart.js +1708 -0
- package/dist/charts/engine/graph/chart.js.map +1 -0
- package/dist/charts/engine/graph/circular.cjs +2 -0
- package/dist/charts/engine/graph/circular.cjs.map +1 -0
- package/dist/charts/engine/graph/circular.d.cts +16 -0
- package/dist/charts/engine/graph/circular.d.ts +16 -0
- package/dist/charts/engine/graph/circular.js +62 -0
- package/dist/charts/engine/graph/circular.js.map +1 -0
- package/dist/charts/engine/graph/dag.cjs +2 -0
- package/dist/charts/engine/graph/dag.cjs.map +1 -0
- package/dist/charts/engine/graph/dag.d.cts +34 -0
- package/dist/charts/engine/graph/dag.d.ts +34 -0
- package/dist/charts/engine/graph/dag.js +339 -0
- package/dist/charts/engine/graph/dag.js.map +1 -0
- package/dist/charts/engine/graph/dom.cjs +2 -0
- package/dist/charts/engine/graph/dom.cjs.map +1 -0
- package/dist/charts/engine/graph/dom.d.cts +23 -0
- package/dist/charts/engine/graph/dom.d.ts +23 -0
- package/dist/charts/engine/graph/dom.js +158 -0
- package/dist/charts/engine/graph/dom.js.map +1 -0
- package/dist/charts/engine/graph/force.cjs +2 -0
- package/dist/charts/engine/graph/force.cjs.map +1 -0
- package/dist/charts/engine/graph/force.d.cts +76 -0
- package/dist/charts/engine/graph/force.d.ts +76 -0
- package/dist/charts/engine/graph/force.js +423 -0
- package/dist/charts/engine/graph/force.js.map +1 -0
- package/dist/charts/engine/graph/geometry.cjs +2 -0
- package/dist/charts/engine/graph/geometry.cjs.map +1 -0
- package/dist/charts/engine/graph/geometry.d.cts +50 -0
- package/dist/charts/engine/graph/geometry.d.ts +50 -0
- package/dist/charts/engine/graph/geometry.js +197 -0
- package/dist/charts/engine/graph/geometry.js.map +1 -0
- package/dist/charts/engine/graph/index.cjs +1 -0
- package/dist/charts/engine/graph/index.d.cts +6 -0
- package/dist/charts/engine/graph/index.d.ts +6 -0
- package/dist/charts/engine/graph/index.js +6 -0
- package/dist/charts/engine/graph/labels.cjs +2 -0
- package/dist/charts/engine/graph/labels.cjs.map +1 -0
- package/dist/charts/engine/graph/labels.d.cts +12 -0
- package/dist/charts/engine/graph/labels.d.ts +12 -0
- package/dist/charts/engine/graph/labels.js +128 -0
- package/dist/charts/engine/graph/labels.js.map +1 -0
- package/dist/charts/engine/graph/model.cjs +2 -0
- package/dist/charts/engine/graph/model.cjs.map +1 -0
- package/dist/charts/engine/graph/model.d.cts +52 -0
- package/dist/charts/engine/graph/model.d.ts +52 -0
- package/dist/charts/engine/graph/model.js +108 -0
- package/dist/charts/engine/graph/model.js.map +1 -0
- package/dist/charts/engine/graph/sizing.cjs +2 -0
- package/dist/charts/engine/graph/sizing.cjs.map +1 -0
- package/dist/charts/engine/graph/sizing.d.cts +33 -0
- package/dist/charts/engine/graph/sizing.d.ts +33 -0
- package/dist/charts/engine/graph/sizing.js +60 -0
- package/dist/charts/engine/graph/sizing.js.map +1 -0
- package/dist/charts/engine/graph/tree.cjs +2 -0
- package/dist/charts/engine/graph/tree.cjs.map +1 -0
- package/dist/charts/engine/graph/tree.d.cts +30 -0
- package/dist/charts/engine/graph/tree.d.ts +30 -0
- package/dist/charts/engine/graph/tree.js +218 -0
- package/dist/charts/engine/graph/tree.js.map +1 -0
- package/dist/charts/engine/graph/types.d.cts +640 -0
- package/dist/charts/engine/graph/types.d.ts +640 -0
- package/dist/charts/engine/graph/worker.cjs +52 -0
- package/dist/charts/engine/graph/worker.cjs.map +1 -0
- package/dist/charts/engine/graph/worker.d.cts +36 -0
- package/dist/charts/engine/graph/worker.d.ts +36 -0
- package/dist/charts/engine/graph/worker.js +135 -0
- package/dist/charts/engine/graph/worker.js.map +1 -0
- package/dist/charts/engine/items.cjs +1 -1
- package/dist/charts/engine/items.cjs.map +1 -1
- package/dist/charts/engine/items.d.cts +15 -2
- package/dist/charts/engine/items.d.ts +15 -2
- package/dist/charts/engine/items.js +131 -112
- package/dist/charts/engine/items.js.map +1 -1
- package/dist/charts/engine/labels.cjs +1 -1
- package/dist/charts/engine/labels.cjs.map +1 -1
- package/dist/charts/engine/labels.d.cts +17 -0
- package/dist/charts/engine/labels.d.ts +17 -0
- package/dist/charts/engine/labels.js +28 -4
- package/dist/charts/engine/labels.js.map +1 -1
- package/dist/charts/engine/layout.cjs +1 -1
- package/dist/charts/engine/layout.cjs.map +1 -1
- package/dist/charts/engine/layout.d.cts +9 -0
- package/dist/charts/engine/layout.d.ts +9 -0
- package/dist/charts/engine/layout.js +11 -2
- package/dist/charts/engine/layout.js.map +1 -1
- package/dist/charts/engine/model.cjs +1 -1
- package/dist/charts/engine/model.cjs.map +1 -1
- package/dist/charts/engine/model.d.cts +73 -3
- package/dist/charts/engine/model.d.ts +73 -3
- package/dist/charts/engine/model.js +258 -154
- package/dist/charts/engine/model.js.map +1 -1
- package/dist/charts/engine/orderbook/field.cjs +37 -0
- package/dist/charts/engine/orderbook/field.cjs.map +1 -0
- package/dist/charts/engine/orderbook/field.d.cts +92 -0
- package/dist/charts/engine/orderbook/field.d.ts +92 -0
- package/dist/charts/engine/orderbook/field.js +297 -0
- package/dist/charts/engine/orderbook/field.js.map +1 -0
- package/dist/charts/engine/orderbook/format.cjs +1 -1
- package/dist/charts/engine/orderbook/format.cjs.map +1 -1
- package/dist/charts/engine/orderbook/format.d.cts +3 -2
- package/dist/charts/engine/orderbook/format.d.ts +3 -2
- package/dist/charts/engine/orderbook/format.js +5 -5
- package/dist/charts/engine/orderbook/format.js.map +1 -1
- package/dist/charts/engine/orderbook/heatmap.cjs +1 -1
- package/dist/charts/engine/orderbook/heatmap.cjs.map +1 -1
- package/dist/charts/engine/orderbook/heatmap.js +566 -475
- package/dist/charts/engine/orderbook/heatmap.js.map +1 -1
- package/dist/charts/engine/orderbook/host.cjs +1 -1
- package/dist/charts/engine/orderbook/host.cjs.map +1 -1
- package/dist/charts/engine/orderbook/host.d.cts +8 -1
- package/dist/charts/engine/orderbook/host.d.ts +8 -1
- package/dist/charts/engine/orderbook/host.js +27 -5
- package/dist/charts/engine/orderbook/host.js.map +1 -1
- package/dist/charts/engine/orderbook/ladder.cjs +1 -1
- package/dist/charts/engine/orderbook/ladder.cjs.map +1 -1
- package/dist/charts/engine/orderbook/ladder.js +1 -1
- package/dist/charts/engine/orderbook/ladder.js.map +1 -1
- package/dist/charts/engine/orderbook/layout.cjs +2 -0
- package/dist/charts/engine/orderbook/layout.cjs.map +1 -0
- package/dist/charts/engine/orderbook/layout.d.cts +42 -0
- package/dist/charts/engine/orderbook/layout.d.ts +42 -0
- package/dist/charts/engine/orderbook/layout.js +76 -0
- package/dist/charts/engine/orderbook/layout.js.map +1 -0
- package/dist/charts/engine/orderbook/tape.cjs +1 -1
- package/dist/charts/engine/orderbook/tape.cjs.map +1 -1
- package/dist/charts/engine/orderbook/tape.js +4 -4
- package/dist/charts/engine/orderbook/tape.js.map +1 -1
- package/dist/charts/engine/orderbook/types.d.cts +27 -3
- package/dist/charts/engine/orderbook/types.d.ts +27 -3
- package/dist/charts/engine/overlay.cjs +1 -1
- package/dist/charts/engine/overlay.cjs.map +1 -1
- package/dist/charts/engine/overlay.d.cts +27 -0
- package/dist/charts/engine/overlay.d.ts +27 -0
- package/dist/charts/engine/overlay.js +34 -12
- package/dist/charts/engine/overlay.js.map +1 -1
- package/dist/charts/engine/presets.cjs +2 -2
- package/dist/charts/engine/presets.cjs.map +1 -1
- package/dist/charts/engine/presets.d.cts +35 -3
- package/dist/charts/engine/presets.d.ts +35 -3
- package/dist/charts/engine/presets.js +121 -101
- package/dist/charts/engine/presets.js.map +1 -1
- package/dist/charts/engine/renderers/canvas2d.cjs +1 -1
- package/dist/charts/engine/renderers/canvas2d.cjs.map +1 -1
- package/dist/charts/engine/renderers/canvas2d.js +13 -9
- package/dist/charts/engine/renderers/canvas2d.js.map +1 -1
- package/dist/charts/engine/renderers/detect.cjs +1 -1
- package/dist/charts/engine/renderers/detect.cjs.map +1 -1
- package/dist/charts/engine/renderers/detect.d.cts +2 -1
- package/dist/charts/engine/renderers/detect.d.ts +2 -1
- package/dist/charts/engine/renderers/detect.js +23 -21
- package/dist/charts/engine/renderers/detect.js.map +1 -1
- package/dist/charts/engine/renderers/follow.cjs +2 -0
- package/dist/charts/engine/renderers/follow.cjs.map +1 -0
- package/dist/charts/engine/renderers/follow.d.cts +8 -0
- package/dist/charts/engine/renderers/follow.d.ts +8 -0
- package/dist/charts/engine/renderers/follow.js +10 -0
- package/dist/charts/engine/renderers/follow.js.map +1 -0
- package/dist/charts/engine/renderers/gl-budget.cjs +2 -0
- package/dist/charts/engine/renderers/gl-budget.cjs.map +1 -0
- package/dist/charts/engine/renderers/gl-budget.d.cts +32 -0
- package/dist/charts/engine/renderers/gl-budget.d.ts +32 -0
- package/dist/charts/engine/renderers/gl-budget.js +95 -0
- package/dist/charts/engine/renderers/gl-budget.js.map +1 -0
- package/dist/charts/engine/renderers/gl.cjs +1 -1
- package/dist/charts/engine/renderers/gl.cjs.map +1 -1
- package/dist/charts/engine/renderers/gl.js +1 -1
- package/dist/charts/engine/renderers/gl.js.map +1 -1
- package/dist/charts/engine/renderers/shaders.cjs +9 -6
- package/dist/charts/engine/renderers/shaders.cjs.map +1 -1
- package/dist/charts/engine/renderers/shaders.d.cts +1 -1
- package/dist/charts/engine/renderers/shaders.d.ts +1 -1
- package/dist/charts/engine/renderers/shaders.js +9 -6
- package/dist/charts/engine/renderers/shaders.js.map +1 -1
- package/dist/charts/engine/renderers/types.cjs.map +1 -1
- package/dist/charts/engine/renderers/types.d.cts +2 -0
- package/dist/charts/engine/renderers/types.d.ts +2 -0
- package/dist/charts/engine/renderers/types.js.map +1 -1
- package/dist/charts/engine/renderers/webgl.cjs +1 -1
- package/dist/charts/engine/renderers/webgl.cjs.map +1 -1
- package/dist/charts/engine/renderers/webgl.js +85 -64
- package/dist/charts/engine/renderers/webgl.js.map +1 -1
- package/dist/charts/engine/renderers/webgl2.cjs +1 -1
- package/dist/charts/engine/renderers/webgl2.cjs.map +1 -1
- package/dist/charts/engine/renderers/webgl2.js +72 -58
- package/dist/charts/engine/renderers/webgl2.js.map +1 -1
- package/dist/charts/engine/renderers/webgpu.cjs +1 -1
- package/dist/charts/engine/renderers/webgpu.cjs.map +1 -1
- package/dist/charts/engine/renderers/webgpu.js +1 -1
- package/dist/charts/engine/renderers/webgpu.js.map +1 -1
- package/dist/charts/engine/scene.cjs +1 -1
- package/dist/charts/engine/scene.cjs.map +1 -1
- package/dist/charts/engine/scene.d.cts +104 -4
- package/dist/charts/engine/scene.d.ts +104 -4
- package/dist/charts/engine/scene.js +412 -193
- package/dist/charts/engine/scene.js.map +1 -1
- package/dist/charts/engine/shapes/bullet.cjs +1 -1
- package/dist/charts/engine/shapes/bullet.cjs.map +1 -1
- package/dist/charts/engine/shapes/bullet.js +110 -110
- package/dist/charts/engine/shapes/bullet.js.map +1 -1
- package/dist/charts/engine/shapes/chart.cjs +1 -1
- package/dist/charts/engine/shapes/chart.cjs.map +1 -1
- package/dist/charts/engine/shapes/chart.js +4 -1
- package/dist/charts/engine/shapes/chart.js.map +1 -1
- package/dist/charts/engine/shapes/chord.cjs +2 -0
- package/dist/charts/engine/shapes/chord.cjs.map +1 -0
- package/dist/charts/engine/shapes/chord.d.cts +18 -0
- package/dist/charts/engine/shapes/chord.d.ts +18 -0
- package/dist/charts/engine/shapes/chord.js +419 -0
- package/dist/charts/engine/shapes/chord.js.map +1 -0
- package/dist/charts/engine/shapes/draw.cjs +1 -1
- package/dist/charts/engine/shapes/draw.cjs.map +1 -1
- package/dist/charts/engine/shapes/draw.d.cts +5 -1
- package/dist/charts/engine/shapes/draw.d.ts +5 -1
- package/dist/charts/engine/shapes/draw.js +47 -17
- package/dist/charts/engine/shapes/draw.js.map +1 -1
- package/dist/charts/engine/shapes/hit.cjs +1 -1
- package/dist/charts/engine/shapes/hit.cjs.map +1 -1
- package/dist/charts/engine/shapes/hit.d.cts +3 -1
- package/dist/charts/engine/shapes/hit.d.ts +3 -1
- package/dist/charts/engine/shapes/hit.js +75 -46
- package/dist/charts/engine/shapes/hit.js.map +1 -1
- package/dist/charts/engine/shapes/index.d.cts +3 -2
- package/dist/charts/engine/shapes/index.d.ts +3 -2
- package/dist/charts/engine/shapes/labels.cjs +1 -1
- package/dist/charts/engine/shapes/labels.cjs.map +1 -1
- package/dist/charts/engine/shapes/labels.js +12 -4
- package/dist/charts/engine/shapes/labels.js.map +1 -1
- package/dist/charts/engine/shapes/layout.cjs +2 -2
- package/dist/charts/engine/shapes/layout.cjs.map +1 -1
- package/dist/charts/engine/shapes/layout.d.cts +3 -1
- package/dist/charts/engine/shapes/layout.d.ts +3 -1
- package/dist/charts/engine/shapes/layout.js +106 -78
- package/dist/charts/engine/shapes/layout.js.map +1 -1
- package/dist/charts/engine/shapes/scene.cjs +1 -1
- package/dist/charts/engine/shapes/scene.cjs.map +1 -1
- package/dist/charts/engine/shapes/scene.d.cts +33 -3
- package/dist/charts/engine/shapes/scene.d.ts +33 -3
- package/dist/charts/engine/shapes/scene.js +62 -19
- package/dist/charts/engine/shapes/scene.js.map +1 -1
- package/dist/charts/engine/shapes/types.d.cts +121 -8
- package/dist/charts/engine/shapes/types.d.ts +121 -8
- package/dist/charts/engine/signature.cjs +1 -1
- package/dist/charts/engine/signature.cjs.map +1 -1
- package/dist/charts/engine/signature.js +1 -1
- package/dist/charts/engine/signature.js.map +1 -1
- package/dist/charts/engine/three-d/canvas2d.cjs +1 -1
- package/dist/charts/engine/three-d/canvas2d.cjs.map +1 -1
- package/dist/charts/engine/three-d/canvas2d.d.cts +41 -3
- package/dist/charts/engine/three-d/canvas2d.d.ts +41 -3
- package/dist/charts/engine/three-d/canvas2d.js +166 -67
- package/dist/charts/engine/three-d/canvas2d.js.map +1 -1
- package/dist/charts/engine/three-d/chart.cjs +1 -1
- package/dist/charts/engine/three-d/chart.cjs.map +1 -1
- package/dist/charts/engine/three-d/chart.js +219 -215
- package/dist/charts/engine/three-d/chart.js.map +1 -1
- package/dist/charts/engine/three-d/detect.cjs +1 -1
- package/dist/charts/engine/three-d/detect.cjs.map +1 -1
- package/dist/charts/engine/three-d/detect.d.cts +3 -2
- package/dist/charts/engine/three-d/detect.d.ts +3 -2
- package/dist/charts/engine/three-d/detect.js +22 -20
- package/dist/charts/engine/three-d/detect.js.map +1 -1
- package/dist/charts/engine/three-d/geometry.cjs +1 -1
- package/dist/charts/engine/three-d/geometry.cjs.map +1 -1
- package/dist/charts/engine/three-d/geometry.d.cts +6 -0
- package/dist/charts/engine/three-d/geometry.d.ts +6 -0
- package/dist/charts/engine/three-d/geometry.js +106 -90
- package/dist/charts/engine/three-d/geometry.js.map +1 -1
- package/dist/charts/engine/three-d/model.cjs +1 -1
- package/dist/charts/engine/three-d/model.cjs.map +1 -1
- package/dist/charts/engine/three-d/model.d.cts +2 -0
- package/dist/charts/engine/three-d/model.d.ts +2 -0
- package/dist/charts/engine/three-d/model.js +2 -0
- package/dist/charts/engine/three-d/model.js.map +1 -1
- package/dist/charts/engine/three-d/oit.cjs +109 -0
- package/dist/charts/engine/three-d/oit.cjs.map +1 -0
- package/dist/charts/engine/three-d/oit.d.cts +34 -0
- package/dist/charts/engine/three-d/oit.d.ts +34 -0
- package/dist/charts/engine/three-d/oit.js +111 -0
- package/dist/charts/engine/three-d/oit.js.map +1 -0
- package/dist/charts/engine/three-d/overlay.cjs +1 -1
- package/dist/charts/engine/three-d/overlay.cjs.map +1 -1
- package/dist/charts/engine/three-d/overlay.js +43 -36
- package/dist/charts/engine/three-d/overlay.js.map +1 -1
- package/dist/charts/engine/three-d/render-types.cjs +1 -1
- package/dist/charts/engine/three-d/render-types.cjs.map +1 -1
- package/dist/charts/engine/three-d/render-types.d.cts +37 -3
- package/dist/charts/engine/three-d/render-types.d.ts +37 -3
- package/dist/charts/engine/three-d/render-types.js +6 -10
- package/dist/charts/engine/three-d/render-types.js.map +1 -1
- package/dist/charts/engine/three-d/shaders.cjs +109 -48
- package/dist/charts/engine/three-d/shaders.cjs.map +1 -1
- package/dist/charts/engine/three-d/shaders.d.cts +12 -5
- package/dist/charts/engine/three-d/shaders.d.ts +12 -5
- package/dist/charts/engine/three-d/shaders.js +118 -55
- package/dist/charts/engine/three-d/shaders.js.map +1 -1
- package/dist/charts/engine/three-d/sort.cjs +1 -1
- package/dist/charts/engine/three-d/sort.cjs.map +1 -1
- package/dist/charts/engine/three-d/sort.d.cts +18 -5
- package/dist/charts/engine/three-d/sort.d.ts +18 -5
- package/dist/charts/engine/three-d/sort.js +129 -43
- package/dist/charts/engine/three-d/sort.js.map +1 -1
- package/dist/charts/engine/three-d/types.d.cts +36 -0
- package/dist/charts/engine/three-d/types.d.ts +36 -0
- package/dist/charts/engine/three-d/webgl.cjs +1 -1
- package/dist/charts/engine/three-d/webgl.cjs.map +1 -1
- package/dist/charts/engine/three-d/webgl.d.cts +9 -0
- package/dist/charts/engine/three-d/webgl.d.ts +9 -0
- package/dist/charts/engine/three-d/webgl.js +199 -74
- package/dist/charts/engine/three-d/webgl.js.map +1 -1
- package/dist/charts/engine/three-d/webgpu.cjs +1 -1
- package/dist/charts/engine/three-d/webgpu.cjs.map +1 -1
- package/dist/charts/engine/three-d/webgpu.js +231 -94
- package/dist/charts/engine/three-d/webgpu.js.map +1 -1
- package/dist/charts/engine/trading/chart.cjs +1 -1
- package/dist/charts/engine/trading/chart.cjs.map +1 -1
- package/dist/charts/engine/trading/chart.d.cts +10 -1
- package/dist/charts/engine/trading/chart.d.ts +10 -1
- package/dist/charts/engine/trading/chart.js +1677 -813
- package/dist/charts/engine/trading/chart.js.map +1 -1
- package/dist/charts/engine/trading/drawings.cjs +2 -1
- package/dist/charts/engine/trading/drawings.cjs.map +1 -1
- package/dist/charts/engine/trading/drawings.d.cts +53 -9
- package/dist/charts/engine/trading/drawings.d.ts +53 -9
- package/dist/charts/engine/trading/drawings.js +346 -71
- package/dist/charts/engine/trading/drawings.js.map +1 -1
- package/dist/charts/engine/trading/format.cjs +1 -1
- package/dist/charts/engine/trading/format.cjs.map +1 -1
- package/dist/charts/engine/trading/format.d.cts +19 -0
- package/dist/charts/engine/trading/format.d.ts +19 -0
- package/dist/charts/engine/trading/format.js +65 -21
- package/dist/charts/engine/trading/format.js.map +1 -1
- package/dist/charts/engine/trading/geometry.cjs +1 -1
- package/dist/charts/engine/trading/geometry.cjs.map +1 -1
- package/dist/charts/engine/trading/geometry.d.cts +16 -0
- package/dist/charts/engine/trading/geometry.d.ts +16 -0
- package/dist/charts/engine/trading/geometry.js +19 -4
- package/dist/charts/engine/trading/geometry.js.map +1 -1
- package/dist/charts/engine/trading/index.cjs +1 -1
- package/dist/charts/engine/trading/index.d.cts +2 -1
- package/dist/charts/engine/trading/index.d.ts +2 -1
- package/dist/charts/engine/trading/index.js +4 -3
- package/dist/charts/engine/trading/indicators.cjs +1 -1
- package/dist/charts/engine/trading/indicators.cjs.map +1 -1
- package/dist/charts/engine/trading/indicators.d.cts +180 -10
- package/dist/charts/engine/trading/indicators.d.ts +180 -10
- package/dist/charts/engine/trading/indicators.js +449 -173
- package/dist/charts/engine/trading/indicators.js.map +1 -1
- package/dist/charts/engine/trading/labels.cjs +1 -1
- package/dist/charts/engine/trading/labels.cjs.map +1 -1
- package/dist/charts/engine/trading/labels.js +104 -4
- package/dist/charts/engine/trading/labels.js.map +1 -1
- package/dist/charts/engine/trading/store.cjs +1 -1
- package/dist/charts/engine/trading/store.cjs.map +1 -1
- package/dist/charts/engine/trading/store.d.cts +21 -0
- package/dist/charts/engine/trading/store.d.ts +21 -0
- package/dist/charts/engine/trading/store.js +22 -1
- package/dist/charts/engine/trading/store.js.map +1 -1
- package/dist/charts/engine/trading/studies.cjs +1 -1
- package/dist/charts/engine/trading/studies.cjs.map +1 -1
- package/dist/charts/engine/trading/studies.d.cts +49 -8
- package/dist/charts/engine/trading/studies.d.ts +49 -8
- package/dist/charts/engine/trading/studies.js +352 -93
- package/dist/charts/engine/trading/studies.js.map +1 -1
- package/dist/charts/engine/trading/sync.cjs +2 -0
- package/dist/charts/engine/trading/sync.cjs.map +1 -0
- package/dist/charts/engine/trading/sync.d.cts +8 -0
- package/dist/charts/engine/trading/sync.d.ts +8 -0
- package/dist/charts/engine/trading/sync.js +25 -0
- package/dist/charts/engine/trading/sync.js.map +1 -0
- package/dist/charts/engine/trading/types.d.cts +514 -16
- package/dist/charts/engine/trading/types.d.ts +514 -16
- package/dist/charts/engine/types.d.cts +106 -11
- package/dist/charts/engine/types.d.ts +106 -11
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.d.cts +3 -2
- package/dist/charts/index.d.ts +3 -2
- package/dist/charts/index.js +30 -22
- package/dist/charts/react/charts.cjs +1 -1
- package/dist/charts/react/charts.cjs.map +1 -1
- package/dist/charts/react/charts.js +51 -34
- package/dist/charts/react/charts.js.map +1 -1
- package/dist/charts/react/graph.cjs +2 -0
- package/dist/charts/react/graph.cjs.map +1 -0
- package/dist/charts/react/graph.d.cts +219 -0
- package/dist/charts/react/graph.d.ts +219 -0
- package/dist/charts/react/graph.js +160 -0
- package/dist/charts/react/graph.js.map +1 -0
- package/dist/charts/react/orderbook.cjs +1 -1
- package/dist/charts/react/orderbook.cjs.map +1 -1
- package/dist/charts/react/orderbook.d.cts +3 -1
- package/dist/charts/react/orderbook.d.ts +3 -1
- package/dist/charts/react/orderbook.js +1 -0
- package/dist/charts/react/orderbook.js.map +1 -1
- package/dist/charts/react/shapes.cjs +1 -1
- package/dist/charts/react/shapes.cjs.map +1 -1
- package/dist/charts/react/shapes.d.cts +88 -4
- package/dist/charts/react/shapes.d.ts +88 -4
- package/dist/charts/react/shapes.js +55 -12
- package/dist/charts/react/shapes.js.map +1 -1
- package/dist/charts/react/three-d.cjs +1 -1
- package/dist/charts/react/three-d.cjs.map +1 -1
- package/dist/charts/react/three-d.d.cts +7 -0
- package/dist/charts/react/three-d.d.ts +7 -0
- package/dist/charts/react/three-d.js +14 -13
- package/dist/charts/react/three-d.js.map +1 -1
- package/dist/charts/react/trading.cjs +1 -1
- package/dist/charts/react/trading.cjs.map +1 -1
- package/dist/charts/react/trading.d.cts +54 -2
- package/dist/charts/react/trading.d.ts +54 -2
- package/dist/charts/react/trading.js +68 -37
- package/dist/charts/react/trading.js.map +1 -1
- package/dist/charts/react/types.d.cts +11 -0
- package/dist/charts/react/types.d.ts +11 -0
- package/dist/core/contracts.cjs +1 -1
- package/dist/core/contracts.cjs.map +1 -1
- package/dist/core/contracts.js +1 -1
- package/dist/core/contracts.js.map +1 -1
- package/dist/native/charts/src/canvas.cjs +1 -1
- package/dist/native/charts/src/canvas.js +5 -4
- package/dist/native/charts/src/engine/axis.cjs +1 -1
- package/dist/native/charts/src/engine/axis.cjs.map +1 -1
- package/dist/native/charts/src/engine/axis.js +42 -19
- package/dist/native/charts/src/engine/axis.js.map +1 -1
- package/dist/native/charts/src/engine/color.cjs +1 -1
- package/dist/native/charts/src/engine/color.cjs.map +1 -1
- package/dist/native/charts/src/engine/color.js +47 -5
- package/dist/native/charts/src/engine/color.js.map +1 -1
- package/dist/native/charts/src/engine/controller.cjs +2 -2
- package/dist/native/charts/src/engine/controller.cjs.map +1 -1
- package/dist/native/charts/src/engine/controller.js +296 -251
- package/dist/native/charts/src/engine/controller.js.map +1 -1
- package/dist/native/charts/src/engine/data.cjs +1 -1
- package/dist/native/charts/src/engine/data.cjs.map +1 -1
- package/dist/native/charts/src/engine/data.js +6 -4
- package/dist/native/charts/src/engine/data.js.map +1 -1
- package/dist/native/charts/src/engine/format.cjs +1 -1
- package/dist/native/charts/src/engine/format.cjs.map +1 -1
- package/dist/native/charts/src/engine/format.js +15 -2
- package/dist/native/charts/src/engine/format.js.map +1 -1
- package/dist/native/charts/src/engine/labels.cjs +1 -1
- package/dist/native/charts/src/engine/labels.cjs.map +1 -1
- package/dist/native/charts/src/engine/labels.js +42 -5
- package/dist/native/charts/src/engine/labels.js.map +1 -1
- package/dist/native/charts/src/engine/layout.cjs +1 -1
- package/dist/native/charts/src/engine/layout.cjs.map +1 -1
- package/dist/native/charts/src/engine/layout.js +11 -2
- package/dist/native/charts/src/engine/layout.js.map +1 -1
- package/dist/native/charts/src/engine/model.cjs +1 -1
- package/dist/native/charts/src/engine/model.cjs.map +1 -1
- package/dist/native/charts/src/engine/model.js +278 -174
- package/dist/native/charts/src/engine/model.js.map +1 -1
- package/dist/native/charts/src/engine/overlay.cjs.map +1 -1
- package/dist/native/charts/src/engine/overlay.js.map +1 -1
- package/dist/native/charts/src/engine/presets.cjs +2 -2
- package/dist/native/charts/src/engine/presets.cjs.map +1 -1
- package/dist/native/charts/src/engine/presets.js +110 -90
- package/dist/native/charts/src/engine/presets.js.map +1 -1
- package/dist/native/charts/src/engine/scene.cjs +1 -1
- package/dist/native/charts/src/engine/scene.cjs.map +1 -1
- package/dist/native/charts/src/engine/scene.js +421 -202
- package/dist/native/charts/src/engine/scene.js.map +1 -1
- package/dist/native/charts/src/engine/shapes/bullet.cjs +1 -1
- package/dist/native/charts/src/engine/shapes/bullet.cjs.map +1 -1
- package/dist/native/charts/src/engine/shapes/bullet.js +110 -110
- package/dist/native/charts/src/engine/shapes/bullet.js.map +1 -1
- package/dist/native/charts/src/engine/shapes/calendar.cjs +1 -1
- package/dist/native/charts/src/engine/shapes/calendar.cjs.map +1 -1
- package/dist/native/charts/src/engine/shapes/calendar.js +21 -16
- package/dist/native/charts/src/engine/shapes/calendar.js.map +1 -1
- package/dist/native/charts/src/engine/shapes/chord.cjs +2 -0
- package/dist/native/charts/src/engine/shapes/chord.cjs.map +1 -0
- package/dist/native/charts/src/engine/shapes/chord.js +419 -0
- package/dist/native/charts/src/engine/shapes/chord.js.map +1 -0
- package/dist/native/charts/src/engine/shapes/draw.cjs +1 -1
- package/dist/native/charts/src/engine/shapes/draw.cjs.map +1 -1
- package/dist/native/charts/src/engine/shapes/draw.js +47 -17
- package/dist/native/charts/src/engine/shapes/draw.js.map +1 -1
- package/dist/native/charts/src/engine/shapes/hit.cjs +1 -1
- package/dist/native/charts/src/engine/shapes/hit.cjs.map +1 -1
- package/dist/native/charts/src/engine/shapes/hit.js +73 -44
- package/dist/native/charts/src/engine/shapes/hit.js.map +1 -1
- package/dist/native/charts/src/engine/shapes/labels.cjs +1 -1
- package/dist/native/charts/src/engine/shapes/labels.cjs.map +1 -1
- package/dist/native/charts/src/engine/shapes/labels.js +12 -4
- package/dist/native/charts/src/engine/shapes/labels.js.map +1 -1
- package/dist/native/charts/src/engine/shapes/layout.cjs +2 -2
- package/dist/native/charts/src/engine/shapes/layout.cjs.map +1 -1
- package/dist/native/charts/src/engine/shapes/layout.js +136 -94
- package/dist/native/charts/src/engine/shapes/layout.js.map +1 -1
- package/dist/native/charts/src/engine/shapes/scene.cjs +1 -1
- package/dist/native/charts/src/engine/shapes/scene.cjs.map +1 -1
- package/dist/native/charts/src/engine/shapes/scene.js +62 -19
- package/dist/native/charts/src/engine/shapes/scene.js.map +1 -1
- package/dist/native/components/Chart/ChartBase.cjs +1 -1
- package/dist/native/components/Chart/ChartBase.cjs.map +1 -1
- package/dist/native/components/Chart/ChartBase.js +127 -115
- package/dist/native/components/Chart/ChartBase.js.map +1 -1
- package/dist/native/components/Chart/charts.cjs +1 -1
- package/dist/native/components/Chart/charts.cjs.map +1 -1
- package/dist/native/components/Chart/charts.js +8 -5
- package/dist/native/components/Chart/charts.js.map +1 -1
- package/dist/native/components/Chart/scene.cjs +1 -1
- package/dist/native/components/Chart/scene.cjs.map +1 -1
- package/dist/native/components/Chart/scene.d.cts +6 -1
- package/dist/native/components/Chart/scene.d.ts +6 -1
- package/dist/native/components/Chart/scene.js +226 -108
- package/dist/native/components/Chart/scene.js.map +1 -1
- package/dist/native/components/Chart/types.d.cts +7 -1
- package/dist/native/components/Chart/types.d.ts +7 -1
- package/dist/native/components/Charts/charts.cjs +1 -1
- package/dist/native/components/Charts/charts.cjs.map +1 -1
- package/dist/native/components/Charts/charts.js +60 -43
- package/dist/native/components/Charts/charts.js.map +1 -1
- package/dist/native/components/Charts/types.d.cts +11 -0
- package/dist/native/components/Charts/types.d.ts +11 -0
- package/dist/native/components/ShapeChart/ShapeChartBase.cjs +1 -1
- package/dist/native/components/ShapeChart/ShapeChartBase.cjs.map +1 -1
- package/dist/native/components/ShapeChart/ShapeChartBase.d.cts +1 -1
- package/dist/native/components/ShapeChart/ShapeChartBase.d.ts +1 -1
- package/dist/native/components/ShapeChart/ShapeChartBase.js +97 -106
- package/dist/native/components/ShapeChart/ShapeChartBase.js.map +1 -1
- package/dist/native/components/ShapeChart/charts.cjs +1 -1
- package/dist/native/components/ShapeChart/charts.cjs.map +1 -1
- package/dist/native/components/ShapeChart/charts.d.cts +6 -1
- package/dist/native/components/ShapeChart/charts.d.ts +6 -1
- package/dist/native/components/ShapeChart/charts.js +138 -96
- package/dist/native/components/ShapeChart/charts.js.map +1 -1
- package/dist/native/components/ShapeChart/draw.cjs +1 -1
- package/dist/native/components/ShapeChart/draw.cjs.map +1 -1
- package/dist/native/components/ShapeChart/draw.d.cts +1 -1
- package/dist/native/components/ShapeChart/draw.d.ts +1 -1
- package/dist/native/components/ShapeChart/draw.js +26 -17
- package/dist/native/components/ShapeChart/draw.js.map +1 -1
- package/dist/native/components/ShapeChart/geometry.cjs +1 -1
- package/dist/native/components/ShapeChart/geometry.cjs.map +1 -1
- package/dist/native/components/ShapeChart/geometry.js +233 -70
- package/dist/native/components/ShapeChart/geometry.js.map +1 -1
- package/dist/native/components/ShapeChart/index.cjs +1 -1
- package/dist/native/components/ShapeChart/index.d.cts +1 -1
- package/dist/native/components/ShapeChart/index.d.ts +1 -1
- package/dist/native/components/ShapeChart/index.js +2 -2
- package/dist/native/components/ShapeChart/recorder.cjs +1 -1
- package/dist/native/components/ShapeChart/recorder.cjs.map +1 -1
- package/dist/native/components/ShapeChart/recorder.d.cts +10 -1
- package/dist/native/components/ShapeChart/recorder.d.ts +10 -1
- package/dist/native/components/ShapeChart/recorder.js +19 -10
- package/dist/native/components/ShapeChart/recorder.js.map +1 -1
- package/dist/native/components/ShapeChart/types.d.cts +95 -8
- package/dist/native/components/ShapeChart/types.d.ts +95 -8
- package/dist/native/index.cjs +1 -1
- package/dist/native/index.js +2 -2
- package/dist/native/source/components/Chart/ChartBase.tsx +19 -6
- package/dist/native/source/components/Chart/charts.tsx +10 -3
- package/dist/native/source/components/Chart/scene.tsx +243 -14
- package/dist/native/source/components/Chart/types.ts +7 -0
- package/dist/native/source/components/Charts/charts.tsx +37 -2
- package/dist/native/source/components/Charts/types.ts +11 -0
- package/dist/native/source/components/ShapeChart/ShapeChartBase.tsx +10 -34
- package/dist/native/source/components/ShapeChart/charts.tsx +91 -35
- package/dist/native/source/components/ShapeChart/draw.tsx +39 -8
- package/dist/native/source/components/ShapeChart/geometry.ts +376 -25
- package/dist/native/source/components/ShapeChart/index.ts +1 -0
- package/dist/native/source/components/ShapeChart/recorder.ts +20 -5
- package/dist/native/source/components/ShapeChart/types.ts +99 -6
- package/dist/native/source/manifest.ts +1 -0
- package/dist/taro/chart-a11y.d.ts +7 -0
- package/dist/taro/charts.d.ts +29 -6
- package/dist/taro/index.js +3129 -1902
- package/dist/taro/shape-charts.d.ts +99 -5
- package/dist/uni/AreaChart.vue +2 -1
- package/dist/uni/AreaChart.vue.d.ts +5 -1
- package/dist/uni/Badge.vue.d.ts +1 -1
- package/dist/uni/BarChart.vue +2 -1
- package/dist/uni/BarChart.vue.d.ts +5 -1
- package/dist/uni/BoxPlotChart.vue +2 -1
- package/dist/uni/BoxPlotChart.vue.d.ts +8 -0
- package/dist/uni/BubbleChart.vue +2 -1
- package/dist/uni/BubbleChart.vue.d.ts +4 -0
- package/dist/uni/BulletChart.vue.d.ts +4 -0
- package/dist/uni/CalendarHeatmap.vue.d.ts +2 -0
- package/dist/uni/CandlestickChart.vue +2 -1
- package/dist/uni/CandlestickChart.vue.d.ts +4 -0
- package/dist/uni/Chart.vue +2 -1
- package/dist/uni/Chart.vue.d.ts +4 -0
- package/dist/uni/ChordChart.vue +93 -0
- package/dist/uni/ChordChart.vue.d.ts +136 -0
- package/dist/uni/Divider.vue.d.ts +1 -1
- package/dist/uni/DonutChart.vue.d.ts +5 -1
- package/dist/uni/FunnelChart.vue.d.ts +4 -0
- package/dist/uni/GanttChart.vue +2 -1
- package/dist/uni/GanttChart.vue.d.ts +15 -0
- package/dist/uni/GaugeChart.vue.d.ts +5 -1
- package/dist/uni/HeatmapChart.vue +2 -1
- package/dist/uni/HeatmapChart.vue.d.ts +8 -2
- package/dist/uni/HistogramChart.vue +2 -1
- package/dist/uni/HistogramChart.vue.d.ts +4 -0
- package/dist/uni/HorizontalBarChart.vue +2 -1
- package/dist/uni/HorizontalBarChart.vue.d.ts +3 -1
- package/dist/uni/LineChart.vue +2 -1
- package/dist/uni/LineChart.vue.d.ts +4 -0
- package/dist/uni/MixedChart.vue +2 -1
- package/dist/uni/MixedChart.vue.d.ts +4 -0
- package/dist/uni/PieChart.vue.d.ts +5 -1
- package/dist/uni/QuadrantChart.vue +2 -1
- package/dist/uni/QuadrantChart.vue.d.ts +4 -0
- package/dist/uni/RadarChart.vue.d.ts +4 -0
- package/dist/uni/RadialBarChart.vue.d.ts +4 -0
- package/dist/uni/RangeAreaChart.vue +2 -1
- package/dist/uni/RangeAreaChart.vue.d.ts +4 -0
- package/dist/uni/SankeyChart.vue.d.ts +4 -0
- package/dist/uni/ScatterChart.vue +2 -1
- package/dist/uni/ScatterChart.vue.d.ts +4 -0
- package/dist/uni/Sparkline.vue +2 -1
- package/dist/uni/Sparkline.vue.d.ts +4 -0
- package/dist/uni/SunburstChart.vue.d.ts +4 -0
- package/dist/uni/ToastProvider.vue.d.ts +1 -1
- package/dist/uni/TreemapChart.vue.d.ts +4 -0
- package/dist/uni/WaterfallChart.vue +2 -1
- package/dist/uni/WaterfallChart.vue.d.ts +9 -0
- package/dist/uni/chart-a11y.d.ts +7 -0
- package/dist/uni/chart-a11y.js +29 -0
- package/dist/uni/chart-canvas.d.ts +12 -0
- package/dist/uni/chart-canvas.js +15 -1
- package/dist/uni/chart-types.d.ts +36 -5
- package/dist/uni/chart-types.js +31 -3
- package/dist/uni/charts-canvas.js +3 -2
- package/dist/uni/index.d.ts +2 -1
- package/dist/uni/index.js +1 -0
- package/dist/uni/manifest.d.ts +7 -0
- package/dist/uni/manifest.js +10 -0
- package/dist/uni/named-chart-options.d.ts +11 -2
- package/dist/uni/named-chart-options.js +21 -1
- package/dist/uni/shape-chart-canvas.d.ts +3 -3
- package/dist/uni/shape-chart-canvas.js +17 -58
- package/dist/uni/shape-chart-types.d.ts +53 -3
- package/dist/uni/shape-chart-types.js +45 -1
- package/dist/vue/charts-global.d.ts +48 -0
- package/dist/vue/charts.d.ts +18 -0
- package/dist/vue/charts.js +56 -0
- package/dist/vue/charts.js.map +1 -0
- package/dist/vue/components/Chart/Bar3DChart.vue.d.ts +2 -0
- package/dist/vue/components/Chart/BoxPlotChart.vue.d.ts +8 -0
- package/dist/vue/components/Chart/BoxPlotChart.vue.js.map +1 -1
- package/dist/vue/components/Chart/BoxPlotChart.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/vue/components/Chart/BoxPlotChart.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/vue/components/Chart/ChordChart.vue.d.ts +153 -0
- package/dist/vue/components/Chart/ChordChart.vue.js +7 -0
- package/dist/vue/components/Chart/ChordChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/ChordChart.vue_vue_type_script_setup_true_lang.js +81 -0
- package/dist/vue/components/Chart/ChordChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/DependencyGraph.vue.d.ts +181 -0
- package/dist/vue/components/Chart/DependencyGraph.vue.js +7 -0
- package/dist/vue/components/Chart/DependencyGraph.vue.js.map +1 -0
- package/dist/vue/components/Chart/DependencyGraph.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/vue/components/Chart/DependencyGraph.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/GanttChart.vue.d.ts +19 -0
- package/dist/vue/components/Chart/GanttChart.vue.js.map +1 -1
- package/dist/vue/components/Chart/GanttChart.vue_vue_type_script_setup_true_lang.js +12 -1
- package/dist/vue/components/Chart/GanttChart.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/vue/components/Chart/GraphChart.vue.d.ts +186 -0
- package/dist/vue/components/Chart/GraphChart.vue.js +7 -0
- package/dist/vue/components/Chart/GraphChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/GraphChart.vue_vue_type_script_setup_true_lang.js +62 -0
- package/dist/vue/components/Chart/GraphChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/HeatmapChart.vue.d.ts +9 -5
- package/dist/vue/components/Chart/HeatmapChart.vue.js.map +1 -1
- package/dist/vue/components/Chart/HeatmapChart.vue_vue_type_script_setup_true_lang.js +3 -1
- package/dist/vue/components/Chart/HeatmapChart.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/vue/components/Chart/Line3DChart.vue.d.ts +2 -0
- package/dist/vue/components/Chart/OrderBookHeatmap.vue.d.ts +2 -0
- package/dist/vue/components/Chart/Scatter3DChart.vue.d.ts +2 -0
- package/dist/vue/components/Chart/Surface3DChart.vue.d.ts +2 -0
- package/dist/vue/components/Chart/TimeAndSales.vue.d.ts +2 -0
- package/dist/vue/components/Chart/TradingChart.vue.d.ts +58 -1
- package/dist/vue/components/Chart/TradingChart.vue.js.map +1 -1
- package/dist/vue/components/Chart/TradingChart.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/vue/components/Chart/TradingChart.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/vue/components/Chart/TreeChart.vue.d.ts +174 -0
- package/dist/vue/components/Chart/TreeChart.vue.js +7 -0
- package/dist/vue/components/Chart/TreeChart.vue.js.map +1 -0
- package/dist/vue/components/Chart/TreeChart.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/vue/components/Chart/TreeChart.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/vue/components/Chart/WaterfallChart.vue.d.ts +12 -1
- package/dist/vue/components/Chart/WaterfallChart.vue.js.map +1 -1
- package/dist/vue/components/Chart/WaterfallChart.vue_vue_type_script_setup_true_lang.js +8 -2
- package/dist/vue/components/Chart/WaterfallChart.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/vue/components/Chart/graph.d.ts +156 -0
- package/dist/vue/components/Chart/graph.js +137 -0
- package/dist/vue/components/Chart/graph.js.map +1 -0
- package/dist/vue/components/Chart/index.d.ts +5 -1
- package/dist/vue/components/Chart/index.js +5 -1
- package/dist/vue/components/Chart/orderbook.d.ts +5 -1
- package/dist/vue/components/Chart/orderbook.js +2 -0
- package/dist/vue/components/Chart/orderbook.js.map +1 -1
- package/dist/vue/components/Chart/three-d.d.ts +3 -0
- package/dist/vue/components/Chart/three-d.js +2 -0
- package/dist/vue/components/Chart/three-d.js.map +1 -1
- package/dist/vue/components/Chart/trading.d.ts +30 -3
- package/dist/vue/components/Chart/trading.js +9 -0
- package/dist/vue/components/Chart/trading.js.map +1 -1
- package/dist/vue/components/Chart/types.d.ts +74 -2
- package/dist/vue/global.d.ts +2 -38
- package/dist/vue/groups/charts.js +10 -2
- package/dist/vue/groups/charts.js.map +1 -1
- package/dist/vue/index.js +6 -2
- package/dist/vue/internal/register.d.ts +7 -0
- package/dist/vue/internal/register.js +14 -0
- package/dist/vue/internal/register.js.map +1 -0
- package/dist/vue/plugin.d.ts +9 -4
- package/dist/vue/plugin.js +6 -11
- package/dist/vue/plugin.js.map +1 -1
- package/dist/weapp/area-chart/index.wxml +1 -1
- package/dist/weapp/bar-chart/index.wxml +1 -1
- package/dist/weapp/box-plot-chart/index.wxml +1 -1
- package/dist/weapp/bubble-chart/index.wxml +1 -1
- package/dist/weapp/candlestick-chart/index.wxml +1 -1
- package/dist/weapp/chart/index.wxml +1 -1
- package/dist/weapp/charts/canvas.js +1987 -175
- package/dist/weapp/charts/core.js +3 -0
- package/dist/weapp/chord-chart/index.js +1 -0
- package/dist/weapp/chord-chart/index.json +1 -0
- package/dist/weapp/chord-chart/index.wxml +1 -0
- package/dist/weapp/chord-chart/index.wxss +1 -0
- package/dist/weapp/controls.js +148 -57
- package/dist/weapp/gantt-chart/index.wxml +1 -1
- package/dist/weapp/heatmap-chart/index.wxml +1 -1
- package/dist/weapp/histogram-chart/index.wxml +1 -1
- package/dist/weapp/horizontal-bar-chart/index.wxml +1 -1
- package/dist/weapp/line-chart/index.wxml +1 -1
- package/dist/weapp/mixed-chart/index.wxml +1 -1
- package/dist/weapp/quadrant-chart/index.wxml +1 -1
- package/dist/weapp/range-area-chart/index.wxml +1 -1
- package/dist/weapp/scatter-chart/index.wxml +1 -1
- package/dist/weapp/sparkline/index.wxml +1 -1
- package/dist/weapp/types.d.ts +96 -4
- package/dist/weapp/waterfall-chart/index.wxml +1 -1
- package/dist/web-components/components/chart/charts.d.ts +4 -2
- package/dist/web-components/components/chart/charts.js +8 -1
- package/dist/web-components/components/chart/charts.js.map +1 -1
- package/dist/web-components/components/chart/extended.d.ts +21 -7
- package/dist/web-components/components/chart/extended.js +29 -9
- package/dist/web-components/components/chart/extended.js.map +1 -1
- package/dist/web-components/components/chart/shapes-extended.d.ts +37 -1
- package/dist/web-components/components/chart/shapes-extended.js +27 -1
- package/dist/web-components/components/chart/shapes-extended.js.map +1 -1
- package/dist/web-components/components/chart-3d/chart-3d.d.ts +1 -1
- package/dist/web-components/components/chart-3d/chart-3d.js.map +1 -1
- package/dist/web-components/components/graph/graph.d.ts +156 -0
- package/dist/web-components/components/graph/graph.js +150 -0
- package/dist/web-components/components/graph/graph.js.map +1 -0
- package/dist/web-components/components/trading-chart/trading-chart.d.ts +49 -2
- package/dist/web-components/components/trading-chart/trading-chart.js +62 -0
- package/dist/web-components/components/trading-chart/trading-chart.js.map +1 -1
- package/dist/web-components/elements/chart.d.ts +1 -1
- package/dist/web-components/elements/chart.js +6 -5
- package/dist/web-components/elements/chart.js.map +1 -1
- package/dist/web-components/elements/graph.d.ts +2 -0
- package/dist/web-components/elements/graph.js +12 -0
- package/dist/web-components/elements/graph.js.map +1 -0
- package/dist/web-components/html-custom-data.json +318 -4
- package/dist/web-components/types/react.d.ts +63 -4
- package/dist/web-components/types/solid.d.ts +55 -8
- package/dist/web-components/types/svelte.d.ts +55 -8
- package/dist/web-components/types/vue.d.ts +55 -4
- package/package.json +16 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChartPadding } from '../types.cjs';
|
|
2
2
|
/** Kind of shape chart */
|
|
3
|
-
export type ShapeChartType = "pie" | "radar" | "gauge" | "funnel" | "treemap" | "sankey" | "sunburst" | "radialBar" | "calendarHeatmap" | "bullet";
|
|
3
|
+
export type ShapeChartType = "pie" | "radar" | "gauge" | "funnel" | "treemap" | "sankey" | "sunburst" | "radialBar" | "calendarHeatmap" | "bullet" | "chord";
|
|
4
4
|
/** A named value (pie slice, funnel stage) */
|
|
5
5
|
export interface ShapeDatum {
|
|
6
6
|
/** Name shown in the legend, the labels and the tooltip */
|
|
@@ -29,7 +29,9 @@ export interface ShapeHoverEvent {
|
|
|
29
29
|
* Index of the slice / stage / series / leaf (treemap: in the flattened
|
|
30
30
|
* leaves; sunburst: of the node, in depth-first order; sankey: of the node,
|
|
31
31
|
* or the number of nodes + the link index for a link; calendar heatmap:
|
|
32
|
-
* days since the first day shown; radial bar / bullet: of the datum
|
|
32
|
+
* days since the first day shown; radial bar / bullet: of the datum;
|
|
33
|
+
* chord: of the group, or the number of groups × (1 + source index) +
|
|
34
|
+
* target index for a ribbon)
|
|
33
35
|
*/
|
|
34
36
|
index: number;
|
|
35
37
|
/** Radar: index of the indicator closest to the pointer */
|
|
@@ -43,7 +45,7 @@ export interface ShapeHoverEvent {
|
|
|
43
45
|
* treemap / sunburst: of the root, gauge: of the range, radial bar: of the
|
|
44
46
|
* bar's max, bullet: of the target (else of the scale), sankey: of the
|
|
45
47
|
* flow entering the diagram (links: of the source node), calendar heatmap:
|
|
46
|
-
* of the largest day)
|
|
48
|
+
* of the largest day, chord: of all the flows)
|
|
47
49
|
*/
|
|
48
50
|
percent: number;
|
|
49
51
|
/** Resolved CSS color of the mark */
|
|
@@ -52,10 +54,12 @@ export interface ShapeHoverEvent {
|
|
|
52
54
|
path?: string[];
|
|
53
55
|
/** Calendar heatmap: day of the cell, `YYYY-MM-DD` */
|
|
54
56
|
date?: string;
|
|
55
|
-
/** Sankey: name of the source node of the hovered link */
|
|
57
|
+
/** Sankey / chord: name of the source node / group of the hovered link or ribbon */
|
|
56
58
|
source?: string;
|
|
57
|
-
/** Sankey: name of the target node of the hovered link */
|
|
59
|
+
/** Sankey / chord: name of the target node / group of the hovered link or ribbon */
|
|
58
60
|
target?: string;
|
|
61
|
+
/** Chord: flow from the target back to the source of the hovered ribbon */
|
|
62
|
+
reverseValue?: number;
|
|
59
63
|
}
|
|
60
64
|
/** Tooltip of a shape chart */
|
|
61
65
|
export interface ShapeTooltipOptions {
|
|
@@ -95,6 +99,8 @@ export interface ShapeChartLabels {
|
|
|
95
99
|
ofTarget: string;
|
|
96
100
|
/** Bullet tooltip row: name of the qualitative range of the value */
|
|
97
101
|
range: string;
|
|
102
|
+
/** Chord tooltip row: the flow from the target back to the source */
|
|
103
|
+
reverse: string;
|
|
98
104
|
/** Name of a radar series without `name`, `Series {index}` (1-based) */
|
|
99
105
|
series: string;
|
|
100
106
|
/** Accessible name of a pie chart */
|
|
@@ -123,6 +129,8 @@ export interface ShapeChartLabels {
|
|
|
123
129
|
calendarHeatmap: string;
|
|
124
130
|
/** Accessible name of a bullet chart */
|
|
125
131
|
bulletChart: string;
|
|
132
|
+
/** Accessible name of a chord diagram */
|
|
133
|
+
chordChart: string;
|
|
126
134
|
}
|
|
127
135
|
/** Options shared by every shape chart */
|
|
128
136
|
export interface ShapeChartCommonOptions {
|
|
@@ -154,7 +162,7 @@ export interface ShapeChartCommonOptions {
|
|
|
154
162
|
/**
|
|
155
163
|
* Indexes of the hidden slices / stages / radar series / top-level treemap
|
|
156
164
|
* or sunburst nodes / sankey nodes / radial bars / bullet rows / calendar
|
|
157
|
-
* heatmap levels. When set, the chart is controlled: this list wins over
|
|
165
|
+
* heatmap levels / chord groups. When set, the chart is controlled: this list wins over
|
|
158
166
|
* the legend state, and legend clicks (or `toggle()`) only emit the
|
|
159
167
|
* `toggle` event, whose `hiddenIndexes` should be passed back here.
|
|
160
168
|
*/
|
|
@@ -657,11 +665,116 @@ export interface BulletChartOptions extends ShapeChartCommonOptions {
|
|
|
657
665
|
*/
|
|
658
666
|
ticks?: boolean;
|
|
659
667
|
}
|
|
668
|
+
/** A group (arc) of a chord diagram */
|
|
669
|
+
export interface ChordGroup {
|
|
670
|
+
/** Name shown in the label, the legend and the tooltip; links refer to the group by this name (or by index) */
|
|
671
|
+
name: string;
|
|
672
|
+
/** Color of the arc (and of the ribbons' ends); the palette when omitted */
|
|
673
|
+
color?: string;
|
|
674
|
+
}
|
|
675
|
+
/** A flow between two groups of a chord diagram */
|
|
676
|
+
export interface ChordLink {
|
|
677
|
+
/** Source group: its name, or its index in `groups` */
|
|
678
|
+
source: string | number;
|
|
679
|
+
/** Target group: its name, or its index in `groups` */
|
|
680
|
+
target: string | number;
|
|
681
|
+
/** Size of the flow (negative values count as 0; flows between the same ends add up) */
|
|
682
|
+
value: number;
|
|
683
|
+
/** Color of the ribbon; follows `ribbonColor` when omitted */
|
|
684
|
+
color?: string;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Chord diagram: flows between groups placed around a circle, as ribbons
|
|
688
|
+
* whose ends are proportional to the flow in each direction
|
|
689
|
+
*/
|
|
690
|
+
export interface ChordChartOptions extends ShapeChartCommonOptions {
|
|
691
|
+
type: "chord";
|
|
692
|
+
/**
|
|
693
|
+
* Groups (names or `{ name, color }`), in their order around the circle;
|
|
694
|
+
* groups only named by `links` are appended. With `matrix`, unnamed rows
|
|
695
|
+
* are numbered from 1.
|
|
696
|
+
*/
|
|
697
|
+
groups?: readonly (string | ChordGroup)[];
|
|
698
|
+
/** Square flow matrix: `matrix[i][j]` flows from group `i` to group `j` (used when `links` is absent) */
|
|
699
|
+
matrix?: readonly (readonly number[])[];
|
|
700
|
+
/** Flows as a list (by group name or index); takes precedence over `matrix` */
|
|
701
|
+
links?: readonly ChordLink[];
|
|
702
|
+
/**
|
|
703
|
+
* `false`: one ribbon per pair of groups, as wide as the flows between
|
|
704
|
+
* them in both directions (a symmetric matrix holds each relation in both
|
|
705
|
+
* cells and counts it once), arcs sized by the ribbons of the group, so a
|
|
706
|
+
* group that only receives flows keeps its arc. `true`: one ribbon per
|
|
707
|
+
* direction (same width at both ends), arcs sized by the outgoing plus
|
|
708
|
+
* the incoming flows; flows from a group to itself are ignored.
|
|
709
|
+
* @default false
|
|
710
|
+
*/
|
|
711
|
+
directed?: boolean;
|
|
712
|
+
/**
|
|
713
|
+
* Arrowheads at the target end of the ribbons
|
|
714
|
+
* @default true when `directed`
|
|
715
|
+
*/
|
|
716
|
+
arrows?: boolean;
|
|
717
|
+
/**
|
|
718
|
+
* Gap between the groups, in degrees
|
|
719
|
+
* @default 2
|
|
720
|
+
*/
|
|
721
|
+
padAngle?: number;
|
|
722
|
+
/**
|
|
723
|
+
* Angle of the first group, degrees clockwise from 12 o'clock
|
|
724
|
+
* @default 0
|
|
725
|
+
*/
|
|
726
|
+
startAngle?: number;
|
|
727
|
+
/**
|
|
728
|
+
* Order of the groups around the circle
|
|
729
|
+
* @default "none" (data order)
|
|
730
|
+
*/
|
|
731
|
+
sortGroups?: "none" | "ascending" | "descending";
|
|
732
|
+
/**
|
|
733
|
+
* Order of the ribbon ends along an arc: `auto` puts the flows toward the
|
|
734
|
+
* next groups at the end of the arc (fewest crossings); otherwise the
|
|
735
|
+
* order of the groups, or by value
|
|
736
|
+
* @default "auto"
|
|
737
|
+
*/
|
|
738
|
+
sortSubgroups?: "auto" | "none" | "ascending" | "descending";
|
|
739
|
+
/**
|
|
740
|
+
* Color of the ribbons without `color`: a gradient from the source to the
|
|
741
|
+
* target color, one of the two, or a neutral gray
|
|
742
|
+
* @default "gradient"
|
|
743
|
+
*/
|
|
744
|
+
ribbonColor?: "gradient" | "source" | "target" | "neutral";
|
|
745
|
+
/**
|
|
746
|
+
* Opacity of the ribbons, 0-1 (hovered ribbons are more opaque)
|
|
747
|
+
* @default 0.65
|
|
748
|
+
*/
|
|
749
|
+
ribbonOpacity?: number;
|
|
750
|
+
/**
|
|
751
|
+
* Thickness of the group arcs, in pixels
|
|
752
|
+
* @default 6% of the radius (8-18 px)
|
|
753
|
+
*/
|
|
754
|
+
arcWidth?: number;
|
|
755
|
+
/**
|
|
756
|
+
* Value ticks outside the arcs (labelled where there is room); a number sets the step between ticks
|
|
757
|
+
* @default true when the diagram is large enough
|
|
758
|
+
*/
|
|
759
|
+
ticks?: boolean | number;
|
|
760
|
+
/**
|
|
761
|
+
* Formats the tick labels
|
|
762
|
+
* @default compact numbers of the `locale` (not `format`, whose units would crowd the ticks)
|
|
763
|
+
*/
|
|
764
|
+
tickFormat?: (value: number) => string;
|
|
765
|
+
/**
|
|
766
|
+
* Group labels: `tangential` along the arc, `radial` along the radius,
|
|
767
|
+
* `auto` tangential when every name fits its arc, radial otherwise;
|
|
768
|
+
* labels that would collide are shortened or skipped
|
|
769
|
+
* @default "auto"
|
|
770
|
+
*/
|
|
771
|
+
labels?: "auto" | "tangential" | "radial" | "none";
|
|
772
|
+
}
|
|
660
773
|
/** Options of a shape chart, by `type` */
|
|
661
|
-
export type ShapeChartOptions = PieChartOptions | RadarChartOptions | GaugeChartOptions | FunnelChartOptions | TreemapChartOptions | SankeyChartOptions | SunburstChartOptions | RadialBarChartOptions | CalendarHeatmapOptions | BulletChartOptions;
|
|
774
|
+
export type ShapeChartOptions = PieChartOptions | RadarChartOptions | GaugeChartOptions | FunnelChartOptions | TreemapChartOptions | SankeyChartOptions | SunburstChartOptions | RadialBarChartOptions | CalendarHeatmapOptions | BulletChartOptions | ChordChartOptions;
|
|
662
775
|
/** A legend item was clicked (or `toggle()` was called) */
|
|
663
776
|
export interface ShapeToggleEvent {
|
|
664
|
-
/** Index of the toggled entry (slice, stage, series, top-level node, sankey node, bar, row or
|
|
777
|
+
/** Index of the toggled entry (slice, stage, series, top-level node, sankey node, bar, row, level or chord group) */
|
|
665
778
|
index: number;
|
|
666
779
|
/** Whether that entry is (or, in a controlled chart, would be) hidden */
|
|
667
780
|
hidden: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChartPadding } from '../types.js';
|
|
2
2
|
/** Kind of shape chart */
|
|
3
|
-
export type ShapeChartType = "pie" | "radar" | "gauge" | "funnel" | "treemap" | "sankey" | "sunburst" | "radialBar" | "calendarHeatmap" | "bullet";
|
|
3
|
+
export type ShapeChartType = "pie" | "radar" | "gauge" | "funnel" | "treemap" | "sankey" | "sunburst" | "radialBar" | "calendarHeatmap" | "bullet" | "chord";
|
|
4
4
|
/** A named value (pie slice, funnel stage) */
|
|
5
5
|
export interface ShapeDatum {
|
|
6
6
|
/** Name shown in the legend, the labels and the tooltip */
|
|
@@ -29,7 +29,9 @@ export interface ShapeHoverEvent {
|
|
|
29
29
|
* Index of the slice / stage / series / leaf (treemap: in the flattened
|
|
30
30
|
* leaves; sunburst: of the node, in depth-first order; sankey: of the node,
|
|
31
31
|
* or the number of nodes + the link index for a link; calendar heatmap:
|
|
32
|
-
* days since the first day shown; radial bar / bullet: of the datum
|
|
32
|
+
* days since the first day shown; radial bar / bullet: of the datum;
|
|
33
|
+
* chord: of the group, or the number of groups × (1 + source index) +
|
|
34
|
+
* target index for a ribbon)
|
|
33
35
|
*/
|
|
34
36
|
index: number;
|
|
35
37
|
/** Radar: index of the indicator closest to the pointer */
|
|
@@ -43,7 +45,7 @@ export interface ShapeHoverEvent {
|
|
|
43
45
|
* treemap / sunburst: of the root, gauge: of the range, radial bar: of the
|
|
44
46
|
* bar's max, bullet: of the target (else of the scale), sankey: of the
|
|
45
47
|
* flow entering the diagram (links: of the source node), calendar heatmap:
|
|
46
|
-
* of the largest day)
|
|
48
|
+
* of the largest day, chord: of all the flows)
|
|
47
49
|
*/
|
|
48
50
|
percent: number;
|
|
49
51
|
/** Resolved CSS color of the mark */
|
|
@@ -52,10 +54,12 @@ export interface ShapeHoverEvent {
|
|
|
52
54
|
path?: string[];
|
|
53
55
|
/** Calendar heatmap: day of the cell, `YYYY-MM-DD` */
|
|
54
56
|
date?: string;
|
|
55
|
-
/** Sankey: name of the source node of the hovered link */
|
|
57
|
+
/** Sankey / chord: name of the source node / group of the hovered link or ribbon */
|
|
56
58
|
source?: string;
|
|
57
|
-
/** Sankey: name of the target node of the hovered link */
|
|
59
|
+
/** Sankey / chord: name of the target node / group of the hovered link or ribbon */
|
|
58
60
|
target?: string;
|
|
61
|
+
/** Chord: flow from the target back to the source of the hovered ribbon */
|
|
62
|
+
reverseValue?: number;
|
|
59
63
|
}
|
|
60
64
|
/** Tooltip of a shape chart */
|
|
61
65
|
export interface ShapeTooltipOptions {
|
|
@@ -95,6 +99,8 @@ export interface ShapeChartLabels {
|
|
|
95
99
|
ofTarget: string;
|
|
96
100
|
/** Bullet tooltip row: name of the qualitative range of the value */
|
|
97
101
|
range: string;
|
|
102
|
+
/** Chord tooltip row: the flow from the target back to the source */
|
|
103
|
+
reverse: string;
|
|
98
104
|
/** Name of a radar series without `name`, `Series {index}` (1-based) */
|
|
99
105
|
series: string;
|
|
100
106
|
/** Accessible name of a pie chart */
|
|
@@ -123,6 +129,8 @@ export interface ShapeChartLabels {
|
|
|
123
129
|
calendarHeatmap: string;
|
|
124
130
|
/** Accessible name of a bullet chart */
|
|
125
131
|
bulletChart: string;
|
|
132
|
+
/** Accessible name of a chord diagram */
|
|
133
|
+
chordChart: string;
|
|
126
134
|
}
|
|
127
135
|
/** Options shared by every shape chart */
|
|
128
136
|
export interface ShapeChartCommonOptions {
|
|
@@ -154,7 +162,7 @@ export interface ShapeChartCommonOptions {
|
|
|
154
162
|
/**
|
|
155
163
|
* Indexes of the hidden slices / stages / radar series / top-level treemap
|
|
156
164
|
* or sunburst nodes / sankey nodes / radial bars / bullet rows / calendar
|
|
157
|
-
* heatmap levels. When set, the chart is controlled: this list wins over
|
|
165
|
+
* heatmap levels / chord groups. When set, the chart is controlled: this list wins over
|
|
158
166
|
* the legend state, and legend clicks (or `toggle()`) only emit the
|
|
159
167
|
* `toggle` event, whose `hiddenIndexes` should be passed back here.
|
|
160
168
|
*/
|
|
@@ -657,11 +665,116 @@ export interface BulletChartOptions extends ShapeChartCommonOptions {
|
|
|
657
665
|
*/
|
|
658
666
|
ticks?: boolean;
|
|
659
667
|
}
|
|
668
|
+
/** A group (arc) of a chord diagram */
|
|
669
|
+
export interface ChordGroup {
|
|
670
|
+
/** Name shown in the label, the legend and the tooltip; links refer to the group by this name (or by index) */
|
|
671
|
+
name: string;
|
|
672
|
+
/** Color of the arc (and of the ribbons' ends); the palette when omitted */
|
|
673
|
+
color?: string;
|
|
674
|
+
}
|
|
675
|
+
/** A flow between two groups of a chord diagram */
|
|
676
|
+
export interface ChordLink {
|
|
677
|
+
/** Source group: its name, or its index in `groups` */
|
|
678
|
+
source: string | number;
|
|
679
|
+
/** Target group: its name, or its index in `groups` */
|
|
680
|
+
target: string | number;
|
|
681
|
+
/** Size of the flow (negative values count as 0; flows between the same ends add up) */
|
|
682
|
+
value: number;
|
|
683
|
+
/** Color of the ribbon; follows `ribbonColor` when omitted */
|
|
684
|
+
color?: string;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Chord diagram: flows between groups placed around a circle, as ribbons
|
|
688
|
+
* whose ends are proportional to the flow in each direction
|
|
689
|
+
*/
|
|
690
|
+
export interface ChordChartOptions extends ShapeChartCommonOptions {
|
|
691
|
+
type: "chord";
|
|
692
|
+
/**
|
|
693
|
+
* Groups (names or `{ name, color }`), in their order around the circle;
|
|
694
|
+
* groups only named by `links` are appended. With `matrix`, unnamed rows
|
|
695
|
+
* are numbered from 1.
|
|
696
|
+
*/
|
|
697
|
+
groups?: readonly (string | ChordGroup)[];
|
|
698
|
+
/** Square flow matrix: `matrix[i][j]` flows from group `i` to group `j` (used when `links` is absent) */
|
|
699
|
+
matrix?: readonly (readonly number[])[];
|
|
700
|
+
/** Flows as a list (by group name or index); takes precedence over `matrix` */
|
|
701
|
+
links?: readonly ChordLink[];
|
|
702
|
+
/**
|
|
703
|
+
* `false`: one ribbon per pair of groups, as wide as the flows between
|
|
704
|
+
* them in both directions (a symmetric matrix holds each relation in both
|
|
705
|
+
* cells and counts it once), arcs sized by the ribbons of the group, so a
|
|
706
|
+
* group that only receives flows keeps its arc. `true`: one ribbon per
|
|
707
|
+
* direction (same width at both ends), arcs sized by the outgoing plus
|
|
708
|
+
* the incoming flows; flows from a group to itself are ignored.
|
|
709
|
+
* @default false
|
|
710
|
+
*/
|
|
711
|
+
directed?: boolean;
|
|
712
|
+
/**
|
|
713
|
+
* Arrowheads at the target end of the ribbons
|
|
714
|
+
* @default true when `directed`
|
|
715
|
+
*/
|
|
716
|
+
arrows?: boolean;
|
|
717
|
+
/**
|
|
718
|
+
* Gap between the groups, in degrees
|
|
719
|
+
* @default 2
|
|
720
|
+
*/
|
|
721
|
+
padAngle?: number;
|
|
722
|
+
/**
|
|
723
|
+
* Angle of the first group, degrees clockwise from 12 o'clock
|
|
724
|
+
* @default 0
|
|
725
|
+
*/
|
|
726
|
+
startAngle?: number;
|
|
727
|
+
/**
|
|
728
|
+
* Order of the groups around the circle
|
|
729
|
+
* @default "none" (data order)
|
|
730
|
+
*/
|
|
731
|
+
sortGroups?: "none" | "ascending" | "descending";
|
|
732
|
+
/**
|
|
733
|
+
* Order of the ribbon ends along an arc: `auto` puts the flows toward the
|
|
734
|
+
* next groups at the end of the arc (fewest crossings); otherwise the
|
|
735
|
+
* order of the groups, or by value
|
|
736
|
+
* @default "auto"
|
|
737
|
+
*/
|
|
738
|
+
sortSubgroups?: "auto" | "none" | "ascending" | "descending";
|
|
739
|
+
/**
|
|
740
|
+
* Color of the ribbons without `color`: a gradient from the source to the
|
|
741
|
+
* target color, one of the two, or a neutral gray
|
|
742
|
+
* @default "gradient"
|
|
743
|
+
*/
|
|
744
|
+
ribbonColor?: "gradient" | "source" | "target" | "neutral";
|
|
745
|
+
/**
|
|
746
|
+
* Opacity of the ribbons, 0-1 (hovered ribbons are more opaque)
|
|
747
|
+
* @default 0.65
|
|
748
|
+
*/
|
|
749
|
+
ribbonOpacity?: number;
|
|
750
|
+
/**
|
|
751
|
+
* Thickness of the group arcs, in pixels
|
|
752
|
+
* @default 6% of the radius (8-18 px)
|
|
753
|
+
*/
|
|
754
|
+
arcWidth?: number;
|
|
755
|
+
/**
|
|
756
|
+
* Value ticks outside the arcs (labelled where there is room); a number sets the step between ticks
|
|
757
|
+
* @default true when the diagram is large enough
|
|
758
|
+
*/
|
|
759
|
+
ticks?: boolean | number;
|
|
760
|
+
/**
|
|
761
|
+
* Formats the tick labels
|
|
762
|
+
* @default compact numbers of the `locale` (not `format`, whose units would crowd the ticks)
|
|
763
|
+
*/
|
|
764
|
+
tickFormat?: (value: number) => string;
|
|
765
|
+
/**
|
|
766
|
+
* Group labels: `tangential` along the arc, `radial` along the radius,
|
|
767
|
+
* `auto` tangential when every name fits its arc, radial otherwise;
|
|
768
|
+
* labels that would collide are shortened or skipped
|
|
769
|
+
* @default "auto"
|
|
770
|
+
*/
|
|
771
|
+
labels?: "auto" | "tangential" | "radial" | "none";
|
|
772
|
+
}
|
|
660
773
|
/** Options of a shape chart, by `type` */
|
|
661
|
-
export type ShapeChartOptions = PieChartOptions | RadarChartOptions | GaugeChartOptions | FunnelChartOptions | TreemapChartOptions | SankeyChartOptions | SunburstChartOptions | RadialBarChartOptions | CalendarHeatmapOptions | BulletChartOptions;
|
|
774
|
+
export type ShapeChartOptions = PieChartOptions | RadarChartOptions | GaugeChartOptions | FunnelChartOptions | TreemapChartOptions | SankeyChartOptions | SunburstChartOptions | RadialBarChartOptions | CalendarHeatmapOptions | BulletChartOptions | ChordChartOptions;
|
|
662
775
|
/** A legend item was clicked (or `toggle()` was called) */
|
|
663
776
|
export interface ShapeToggleEvent {
|
|
664
|
-
/** Index of the toggled entry (slice, stage, series, top-level node, sankey node, bar, row or
|
|
777
|
+
/** Index of the toggled entry (slice, stage, series, top-level node, sankey node, bar, row, level or chord group) */
|
|
665
778
|
index: number;
|
|
666
779
|
/** Whether that entry is (or, in a controlled chart, would be) hidden */
|
|
667
780
|
hidden: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=new WeakMap,t=0,n=n=>{let r=e.get(n);return r===void 0&&e.set(n,r=++t),r},r=(e,t,r)=>{let{base:i}=e,a=`${t}|${e.baseline}|${e.percent}|${i.x[0]},${i.x[1]}|${i.y[0]},${i.y[1]}`;for(let t of e.series)a+=`\n${t.key}|${t.type}|${n(t.cols)}|${t.colorCss}|${t.hidden}|${t.lineWidth}|${t.pointSize}|${t.opacity}|${t.barOffset}|${t.barHalfWidth}|${r(t.index)??``}|${t.curve}|${t.radius}`,t.type===`candlestick`?a+=`|${t.upColor}/${t.downColor}`:t.type===`heatmap
|
|
1
|
+
var e=new WeakMap,t=0,n=n=>{let r=e.get(n);return r===void 0&&e.set(n,r=++t),r},r=(e,t,r)=>{let{base:i}=e,a=`${t}|${e.baseline}|${e.percent}|${i.x[0]},${i.x[1]}|${i.y[0]},${i.y[1]}`;for(let t of e.series)a+=`\n${t.key}|${t.type}|${n(t.cols)}|${t.colorCss}|${t.hidden}|${t.lineWidth}|${t.pointSize}|${t.opacity}|${t.barOffset}|${t.barHalfWidth}|${r(t.index)??``}|${t.curve}|${t.radius}`,t.type===`candlestick`?a+=`|${t.upColor}/${t.downColor}`:t.type===`heatmap`?a+=`|${t.colorScale.join(`;`)}/${t.valueRange[0]},${t.valueRange[1]}/${t.colorMidpoint}/${t.cellHalf.x},${t.cellHalf.y}`:t.type===`boxplot`&&(a+=`|${t.outlierShape}/${t.outlierSize}`);return a};exports.itemsSignature=r;
|
|
2
2
|
//# sourceMappingURL=signature.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signature.cjs","names":["ids","counter","idOf","id","value","itemsSignature","model","signature","themeKey","base","s","stackOf"],"sources":["../../../../charts/src/engine/signature.ts"],"sourcesContent":["// Signature of what the render items (GPU buffers) of a model depend on:\n// when it is unchanged, the items of the previous model can be kept.\n\nimport type { ChartModel } from \"./model\";\n\nconst ids = new WeakMap<object, number>();\nlet counter = 0;\n\n/** Stable id of an object (data columns compare by identity) */\nconst idOf = (value: object): number => {\n let id = ids.get(value);\n if (id === undefined) ids.set(value, (id = ++counter));\n return id;\n};\n\n/**\n * Every input of `buildItems` (and of the origin of its positions): data\n * identity, types, colors, visibility, widths, bar layout, stacks, curves,\n * radii, candlestick and heatmap colors. `themeKey` covers the colors resolved\n * from the theme that the model doesn't spell out (per-point colors);\n * `stackOf` gives the `stack` option of a series.\n */\nexport const itemsSignature = (\n model: ChartModel,\n themeKey: number | string,\n stackOf: (index: number) => string | undefined,\n): string => {\n const { base } = model;\n let signature = `${themeKey}|${model.baseline}|${model.percent}|${base.x[0]},${base.x[1]}|${base.y[0]},${base.y[1]}`;\n for (const s of model.series) {\n signature += `\\n${s.key}|${s.type}|${idOf(s.cols)}|${s.colorCss}|${s.hidden}|${s.lineWidth}|${s.pointSize}|${s.opacity}|${s.barOffset}|${s.barHalfWidth}|${stackOf(s.index) ?? \"\"}|${s.curve}|${s.radius}`;\n if (s.type === \"candlestick\") signature += `|${s.upColor}/${s.downColor}`;\n else if (s.type === \"heatmap\")\n signature += `|${s.colorScale.join(\";\")}/${s.valueRange[0]},${s.valueRange[1]}/${s.cellHalf.x},${s.cellHalf.y}`;\n }\n return signature;\n};\n"],"mappings":"AAKA,IAAMA,EAAM,IAAI,QACZC,EAAU,EAGRC,EAAQ,GAA0B,CACtC,IAAIC,EAAKH,EAAI,IAAII,CAAK,EAEtB,OADID,IAAO,IAAA,IAAWH,EAAI,IAAII,EAAQ,EAAK,EAAEH,CAAQ,EAC9CE,CACT,EASaE,GACX,EACA,EACA,IACW,CACX,GAAM,CAAE,QAASC,EACbC,EAAY,GAAGC,EAAS,GAAGF,EAAM,SAAS,GAAGA,EAAM,QAAQ,GAAGG,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,KAChH,IAAK,IAAMC,KAAKJ,EAAM,OACpB,GAAa,KAAKI,EAAE,IAAI,GAAGA,EAAE,KAAK,GAAGR,EAAKQ,EAAE,IAAI,EAAE,GAAGA,EAAE,SAAS,GAAGA,EAAE,OAAO,GAAGA,EAAE,UAAU,GAAGA,EAAE,UAAU,GAAGA,EAAE,QAAQ,GAAGA,EAAE,UAAU,GAAGA,EAAE,aAAa,GAAGC,EAAQD,EAAE,KAAK,GAAK,GAAG,GAAGA,EAAE,MAAM,GAAGA,EAAE,SAC9LA,EAAE,OAAS,cAAe,GAAa,IAAIA,EAAE,QAAQ,GAAGA,EAAE,YACrDA,EAAE,OAAS,
|
|
1
|
+
{"version":3,"file":"signature.cjs","names":["ids","counter","idOf","id","value","itemsSignature","model","signature","themeKey","base","s","stackOf"],"sources":["../../../../charts/src/engine/signature.ts"],"sourcesContent":["// Signature of what the render items (GPU buffers) of a model depend on:\n// when it is unchanged, the items of the previous model can be kept.\n\nimport type { ChartModel } from \"./model\";\n\nconst ids = new WeakMap<object, number>();\nlet counter = 0;\n\n/** Stable id of an object (data columns compare by identity) */\nconst idOf = (value: object): number => {\n let id = ids.get(value);\n if (id === undefined) ids.set(value, (id = ++counter));\n return id;\n};\n\n/**\n * Every input of `buildItems` (and of the origin of its positions): data\n * identity, types, colors, visibility, widths, bar layout, stacks, curves,\n * radii, candlestick and heatmap colors. `themeKey` covers the colors resolved\n * from the theme that the model doesn't spell out (per-point colors);\n * `stackOf` gives the `stack` option of a series.\n */\nexport const itemsSignature = (\n model: ChartModel,\n themeKey: number | string,\n stackOf: (index: number) => string | undefined,\n): string => {\n const { base } = model;\n let signature = `${themeKey}|${model.baseline}|${model.percent}|${base.x[0]},${base.x[1]}|${base.y[0]},${base.y[1]}`;\n for (const s of model.series) {\n signature += `\\n${s.key}|${s.type}|${idOf(s.cols)}|${s.colorCss}|${s.hidden}|${s.lineWidth}|${s.pointSize}|${s.opacity}|${s.barOffset}|${s.barHalfWidth}|${stackOf(s.index) ?? \"\"}|${s.curve}|${s.radius}`;\n if (s.type === \"candlestick\") signature += `|${s.upColor}/${s.downColor}`;\n else if (s.type === \"heatmap\")\n signature += `|${s.colorScale.join(\";\")}/${s.valueRange[0]},${s.valueRange[1]}/${s.colorMidpoint}/${s.cellHalf.x},${s.cellHalf.y}`;\n else if (s.type === \"boxplot\")\n signature += `|${s.outlierShape}/${s.outlierSize}`;\n }\n return signature;\n};\n"],"mappings":"AAKA,IAAMA,EAAM,IAAI,QACZC,EAAU,EAGRC,EAAQ,GAA0B,CACtC,IAAIC,EAAKH,EAAI,IAAII,CAAK,EAEtB,OADID,IAAO,IAAA,IAAWH,EAAI,IAAII,EAAQ,EAAK,EAAEH,CAAQ,EAC9CE,CACT,EASaE,GACX,EACA,EACA,IACW,CACX,GAAM,CAAE,QAASC,EACbC,EAAY,GAAGC,EAAS,GAAGF,EAAM,SAAS,GAAGA,EAAM,QAAQ,GAAGG,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,KAChH,IAAK,IAAMC,KAAKJ,EAAM,OACpB,GAAa,KAAKI,EAAE,IAAI,GAAGA,EAAE,KAAK,GAAGR,EAAKQ,EAAE,IAAI,EAAE,GAAGA,EAAE,SAAS,GAAGA,EAAE,OAAO,GAAGA,EAAE,UAAU,GAAGA,EAAE,UAAU,GAAGA,EAAE,QAAQ,GAAGA,EAAE,UAAU,GAAGA,EAAE,aAAa,GAAGC,EAAQD,EAAE,KAAK,GAAK,GAAG,GAAGA,EAAE,MAAM,GAAGA,EAAE,SAC9LA,EAAE,OAAS,cAAe,GAAa,IAAIA,EAAE,QAAQ,GAAGA,EAAE,YACrDA,EAAE,OAAS,UAClB,GAAa,IAAIA,EAAE,WAAW,KAAK,GAAG,EAAE,GAAGA,EAAE,WAAW,GAAG,GAAGA,EAAE,WAAW,GAAG,GAAGA,EAAE,cAAc,GAAGA,EAAE,SAAS,EAAE,GAAGA,EAAE,SAAS,IACxHA,EAAE,OAAS,YAClB,GAAa,IAAIA,EAAE,aAAa,GAAGA,EAAE,eAEzC,OAAOH,CACT"}
|
|
@@ -4,7 +4,7 @@ var e = /* @__PURE__ */ new WeakMap(), t = 0, n = (n) => {
|
|
|
4
4
|
return r === void 0 && e.set(n, r = ++t), r;
|
|
5
5
|
}, r = (e, t, r) => {
|
|
6
6
|
let { base: i } = e, a = `${t}|${e.baseline}|${e.percent}|${i.x[0]},${i.x[1]}|${i.y[0]},${i.y[1]}`;
|
|
7
|
-
for (let t of e.series) a += `\n${t.key}|${t.type}|${n(t.cols)}|${t.colorCss}|${t.hidden}|${t.lineWidth}|${t.pointSize}|${t.opacity}|${t.barOffset}|${t.barHalfWidth}|${r(t.index) ?? ""}|${t.curve}|${t.radius}`, t.type === "candlestick" ? a += `|${t.upColor}/${t.downColor}` : t.type === "heatmap"
|
|
7
|
+
for (let t of e.series) a += `\n${t.key}|${t.type}|${n(t.cols)}|${t.colorCss}|${t.hidden}|${t.lineWidth}|${t.pointSize}|${t.opacity}|${t.barOffset}|${t.barHalfWidth}|${r(t.index) ?? ""}|${t.curve}|${t.radius}`, t.type === "candlestick" ? a += `|${t.upColor}/${t.downColor}` : t.type === "heatmap" ? a += `|${t.colorScale.join(";")}/${t.valueRange[0]},${t.valueRange[1]}/${t.colorMidpoint}/${t.cellHalf.x},${t.cellHalf.y}` : t.type === "boxplot" && (a += `|${t.outlierShape}/${t.outlierSize}`);
|
|
8
8
|
return a;
|
|
9
9
|
};
|
|
10
10
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signature.js","names":["ids","counter","idOf","id","value","itemsSignature","model","signature","themeKey","base","s","stackOf"],"sources":["../../../../charts/src/engine/signature.ts"],"sourcesContent":["// Signature of what the render items (GPU buffers) of a model depend on:\n// when it is unchanged, the items of the previous model can be kept.\n\nimport type { ChartModel } from \"./model\";\n\nconst ids = new WeakMap<object, number>();\nlet counter = 0;\n\n/** Stable id of an object (data columns compare by identity) */\nconst idOf = (value: object): number => {\n let id = ids.get(value);\n if (id === undefined) ids.set(value, (id = ++counter));\n return id;\n};\n\n/**\n * Every input of `buildItems` (and of the origin of its positions): data\n * identity, types, colors, visibility, widths, bar layout, stacks, curves,\n * radii, candlestick and heatmap colors. `themeKey` covers the colors resolved\n * from the theme that the model doesn't spell out (per-point colors);\n * `stackOf` gives the `stack` option of a series.\n */\nexport const itemsSignature = (\n model: ChartModel,\n themeKey: number | string,\n stackOf: (index: number) => string | undefined,\n): string => {\n const { base } = model;\n let signature = `${themeKey}|${model.baseline}|${model.percent}|${base.x[0]},${base.x[1]}|${base.y[0]},${base.y[1]}`;\n for (const s of model.series) {\n signature += `\\n${s.key}|${s.type}|${idOf(s.cols)}|${s.colorCss}|${s.hidden}|${s.lineWidth}|${s.pointSize}|${s.opacity}|${s.barOffset}|${s.barHalfWidth}|${stackOf(s.index) ?? \"\"}|${s.curve}|${s.radius}`;\n if (s.type === \"candlestick\") signature += `|${s.upColor}/${s.downColor}`;\n else if (s.type === \"heatmap\")\n signature += `|${s.colorScale.join(\";\")}/${s.valueRange[0]},${s.valueRange[1]}/${s.cellHalf.x},${s.cellHalf.y}`;\n }\n return signature;\n};\n"],"mappings":";AAKA,IAAMA,oBAAM,IAAI,QAAwB,GACpCC,IAAU,GAGRC,KAAQ,MAA0B;CACtC,IAAIC,IAAKH,EAAI,IAAII,CAAK;CAEtB,OADID,MAAO,KAAA,KAAWH,EAAI,IAAII,GAAQ,IAAK,EAAEH,CAAQ,GAC9CE;AACT,GASaE,KACX,GACA,GACA,MACW;CACX,IAAM,EAAE,YAASC,GACbC,IAAY,GAAGC,EAAS,GAAGF,EAAM,SAAS,GAAGA,EAAM,QAAQ,GAAGG,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE;CAChH,KAAK,IAAMC,KAAKJ,EAAM,QAEpB,AADA,KAAa,KAAKI,EAAE,IAAI,GAAGA,EAAE,KAAK,GAAGR,EAAKQ,EAAE,IAAI,EAAE,GAAGA,EAAE,SAAS,GAAGA,EAAE,OAAO,GAAGA,EAAE,UAAU,GAAGA,EAAE,UAAU,GAAGA,EAAE,QAAQ,GAAGA,EAAE,UAAU,GAAGA,EAAE,aAAa,GAAGC,EAAQD,EAAE,KAAK,KAAK,GAAG,GAAGA,EAAE,MAAM,GAAGA,EAAE,UAC9LA,EAAE,SAAS,gBAAe,KAAa,IAAIA,EAAE,QAAQ,GAAGA,EAAE,cACrDA,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"signature.js","names":["ids","counter","idOf","id","value","itemsSignature","model","signature","themeKey","base","s","stackOf"],"sources":["../../../../charts/src/engine/signature.ts"],"sourcesContent":["// Signature of what the render items (GPU buffers) of a model depend on:\n// when it is unchanged, the items of the previous model can be kept.\n\nimport type { ChartModel } from \"./model\";\n\nconst ids = new WeakMap<object, number>();\nlet counter = 0;\n\n/** Stable id of an object (data columns compare by identity) */\nconst idOf = (value: object): number => {\n let id = ids.get(value);\n if (id === undefined) ids.set(value, (id = ++counter));\n return id;\n};\n\n/**\n * Every input of `buildItems` (and of the origin of its positions): data\n * identity, types, colors, visibility, widths, bar layout, stacks, curves,\n * radii, candlestick and heatmap colors. `themeKey` covers the colors resolved\n * from the theme that the model doesn't spell out (per-point colors);\n * `stackOf` gives the `stack` option of a series.\n */\nexport const itemsSignature = (\n model: ChartModel,\n themeKey: number | string,\n stackOf: (index: number) => string | undefined,\n): string => {\n const { base } = model;\n let signature = `${themeKey}|${model.baseline}|${model.percent}|${base.x[0]},${base.x[1]}|${base.y[0]},${base.y[1]}`;\n for (const s of model.series) {\n signature += `\\n${s.key}|${s.type}|${idOf(s.cols)}|${s.colorCss}|${s.hidden}|${s.lineWidth}|${s.pointSize}|${s.opacity}|${s.barOffset}|${s.barHalfWidth}|${stackOf(s.index) ?? \"\"}|${s.curve}|${s.radius}`;\n if (s.type === \"candlestick\") signature += `|${s.upColor}/${s.downColor}`;\n else if (s.type === \"heatmap\")\n signature += `|${s.colorScale.join(\";\")}/${s.valueRange[0]},${s.valueRange[1]}/${s.colorMidpoint}/${s.cellHalf.x},${s.cellHalf.y}`;\n else if (s.type === \"boxplot\")\n signature += `|${s.outlierShape}/${s.outlierSize}`;\n }\n return signature;\n};\n"],"mappings":";AAKA,IAAMA,oBAAM,IAAI,QAAwB,GACpCC,IAAU,GAGRC,KAAQ,MAA0B;CACtC,IAAIC,IAAKH,EAAI,IAAII,CAAK;CAEtB,OADID,MAAO,KAAA,KAAWH,EAAI,IAAII,GAAQ,IAAK,EAAEH,CAAQ,GAC9CE;AACT,GASaE,KACX,GACA,GACA,MACW;CACX,IAAM,EAAE,YAASC,GACbC,IAAY,GAAGC,EAAS,GAAGF,EAAM,SAAS,GAAGA,EAAM,QAAQ,GAAGG,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE,GAAG,GAAGA,EAAK,EAAE;CAChH,KAAK,IAAMC,KAAKJ,EAAM,QAEpB,AADA,KAAa,KAAKI,EAAE,IAAI,GAAGA,EAAE,KAAK,GAAGR,EAAKQ,EAAE,IAAI,EAAE,GAAGA,EAAE,SAAS,GAAGA,EAAE,OAAO,GAAGA,EAAE,UAAU,GAAGA,EAAE,UAAU,GAAGA,EAAE,QAAQ,GAAGA,EAAE,UAAU,GAAGA,EAAE,aAAa,GAAGC,EAAQD,EAAE,KAAK,KAAK,GAAG,GAAGA,EAAE,MAAM,GAAGA,EAAE,UAC9LA,EAAE,SAAS,gBAAe,KAAa,IAAIA,EAAE,QAAQ,GAAGA,EAAE,cACrDA,EAAE,SAAS,YAClB,KAAa,IAAIA,EAAE,WAAW,KAAK,GAAG,EAAE,GAAGA,EAAE,WAAW,GAAG,GAAGA,EAAE,WAAW,GAAG,GAAGA,EAAE,cAAc,GAAGA,EAAE,SAAS,EAAE,GAAGA,EAAE,SAAS,MACxHA,EAAE,SAAS,cAClB,KAAa,IAAIA,EAAE,aAAa,GAAGA,EAAE;CAEzC,OAAOH;AACT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./render-types.cjs");var t=
|
|
1
|
+
const e=require("./render-types.cjs");var t=0,n=1,r=2,i=32,a=2.2,o=4,s=1.25,c=3,l=(e,t,n,r=c)=>{let i=Math.max(1,t);if(e<=0)return{alpha:0,grow:1};let a=Math.max(1,Math.min(r,Math.sqrt(i))),o=i/(a*a);return n?{alpha:Math.min(1,e*o),grow:a}:o===1?{alpha:Math.min(e,1),grow:a}:{alpha:1-(1-Math.min(e,.999))**o,grow:a}},u=(e,t)=>{let n=Math.max(0,Math.min(1,t*.6+.5-e)),r=e/t;return[n+(1-n)*Math.exp(-1.2*r*r),.2*n]},d=(e,t,n,r,i,a,o)=>{let s=new Float32Array(i),c=new Float32Array(i),l=new Float32Array(i),u=new Float32Array(i);for(let d=0;d<i;d++){let i=d*n+r,f=t[i],p=t[i+1],m=t[i+2],h=e[3]*f+e[7]*p+e[11]*m+e[15],g=1/(h>1e-9?h:1e-9);s[d]=((e[0]*f+e[4]*p+e[8]*m+e[12])*g+1)*.5*a,c[d]=(1-(e[1]*f+e[5]*p+e[9]*m+e[13])*g)*.5*o,l[d]=(e[2]*f+e[6]*p+e[10]*m+e[14])*g,u[d]=h}return{x:s,y:c,z:l,w:u}},f=e=>e<0?0:e>255?255:Math.round(e),p=(e,t,n)=>{let r=new Float32Array(e),i=new Uint8Array(e),a=new Float32Array(t*3),[o,s,c,l]=n.lighting,[u,d,f]=n.light,[p,m,h]=n.eye;for(let e=0;e<t;e++){let t=e*7,n=r[t+3],g=r[t+4],_=r[t+5],v=Math.hypot(n,g,_);v>1e-6?(n/=v,g/=v,_/=v):(n=0,g=0,_=1);let y=p-r[t],b=m-r[t+1],x=h-r[t+2],S=Math.hypot(y,b,x)||1;y/=S,b/=S,x/=S,n*y+g*b+_*x<0&&(n=-n,g=-g,_=-_);let C=Math.max(0,n*u+g*d+_*f),w=u+y,T=d+b,E=f+x,D=Math.hypot(w,T,E)||1;w/=D,T/=D,E/=D;let O=c>0?Math.max(0,n*w+g*T+_*E)**+l*c*255:0,k=o+s*C,A=e*28+24;a[e*3]=i[A]*k+O,a[e*3+1]=i[A+1]*k+O,a[e*3+2]=i[A+2]*k+O}return a},m=(e,t,n)=>{let r=e[1]-e[0],i=t[1]-t[0],a=e[2]-e[0],o=t[2]-t[0],s=r*o-i*a;if(Math.abs(s)<1e-6)return null;let c=n[1]-n[0],l=n[2]-n[0],u=(c*o-l*i)/s,d=(r*l-a*c)/s,f=u*u+d*d,p=Math.min(n[0],n[1],n[2]),m=Math.max(n[0],n[1],n[2]);if(!(f>1e-12)||m-p<1e-6)return null;let h=(p-n[0])/f,g=(m-n[0])/f;return{x0:e[0]+u*h,y0:t[0]+d*h,x1:e[0]+u*g,y1:t[0]+d*g,t:[0,1,2].map(e=>(n[e]-p)/(m-p))}},h=14,g=i=>{let u=i.getContext(`2d`);if(!u)return null;let g=new Map,y=(e,t,n)=>{let r=f(e)<<16|f(t)<<8|f(n),i=g.get(r);return i===void 0&&(i=`rgb(${r>>16},${r>>8&255},${r&255})`,g.size>4096&&g.clear(),g.set(r,i)),i},b=new Map,x=(e,t,n,r)=>{let a=!!e<<12|f(t)>>4<<8|f(n)>>4<<4|f(r)>>4,o=b.get(a);return o===void 0&&(o=v(i,e,(a>>8&15)*17,(a>>4&15)*17,(a&15)*17),b.set(a,o)),o},S=(f,g)=>{let{width:v,height:b}=i,S=g.dpr;u.setTransform(1,0,0,1,0,0),u.clearRect(0,0,v,b);let C=e.drawOrder(f),w=g.viewProj,T=g.fog[0]*255,E=g.fog[1]*255,D=g.fog[2]*255,O=[],k=[],A=[],j=[],M=0;for(let e of C)M+=e.kind===`mesh`?e.indices.length/3:e.count;let N=new Float32Array(M),P=new Uint8Array(M),F=new Uint16Array(M),I=new Uint32Array(M),L=0;C.forEach((e,i)=>{let a=e.kind===`mesh`?e.vertices:e.data;if(k.push(new Float32Array(a)),A.push(new Uint8Array(a)),j.push(e.kind===`mesh`?p(e.vertices,e.vertexCount,g):null),e.kind===`mesh`){let n=k[i],r=d(w,n,7,0,e.vertexCount,v,b);O.push(r);let a=e.indices;for(let e=0;e+2<a.length;e+=3){let n=a[e],o=a[e+1],s=a[e+2];r.w[n]<=0||r.w[o]<=0||r.w[s]<=0||(N[L]=(r.z[n]+r.z[o]+r.z[s])/3,P[L]=t,F[L]=i,I[L]=e,L++)}}else if(e.kind===`points`){let t=k[i],r=d(w,t,5,0,e.count,v,b);O.push(r);for(let t=0;t<e.count;t++)r.w[t]<=0||(N[L]=r.z[t],P[L]=n,F[L]=i,I[L]=t,L++)}else{let t=k[i],n=d(w,t,7,0,e.count,v,b),a=d(w,t,7,3,e.count,v,b);O.push({x:_(n.x,a.x),y:_(n.y,a.y),z:_(n.z,a.z),w:_(n.w,a.w)});let o=e.bias*5;for(let t=0;t<e.count;t++)n.w[t]<=0||a.w[t]<=0||(N[L]=(n.z[t]+a.z[t])/2-o,P[L]=r,F[L]=i,I[L]=t,L++)}});let R=new Uint32Array(L);for(let e=0;e<L;e++)R[e]=e;R.sort((e,t)=>N[t]-N[e]),u.lineJoin=`round`,u.lineCap=`round`;let z=-1,B=e=>{e!==z&&(u.globalAlpha=e,z=e)},V=!1,H=e=>{e!==V&&(u.globalCompositeOperation=e?`lighter`:`source-over`,V=e)},U=g.distance-g.radius,W=Math.max(0,g.exposure);for(let e=0;e<L;e++){let i=R[e],d=C[F[i]],f=O[F[i]],p=k[F[i]],_=A[F[i]];if(!d||!f||!p||!_)continue;let v=I[i];if(H(d.kind===`points`&&!!d.additive),d.kind===`mesh`&&P[i]===t){let e=d.indices[v],t=d.indices[v+1],n=d.indices[v+2],r=j[F[i]];if(!r)continue;let a=e*28+24,o=t*28+24,s=n*28+24,c=(_[a+3]+_[o+3]+_[s+3])/765,l=y((r[e*3]+r[t*3]+r[n*3])/3,(r[e*3+1]+r[t*3+1]+r[n*3+1])/3,(r[e*3+2]+r[t*3+2]+r[n*3+2])/3),p=0,g=0;for(let i=0;i<3;i++){let a=r[e*3+i],o=r[t*3+i],s=r[n*3+i],c=Math.max(a,o,s)-Math.min(a,o,s);c>g&&(g=c,p=i)}if(g>h){let i=m([f.x[e],f.x[t],f.x[n]],[f.y[e],f.y[t],f.y[n]],[r[e*3+p],r[t*3+p],r[n*3+p]]);if(i){let a=u.createLinearGradient(i.x0,i.y0,i.x1,i.y1);[e,t,n].forEach((e,t)=>a.addColorStop(i.t[t],y(r[e*3],r[e*3+1],r[e*3+2]))),l=a}}B(d.opacity*c),u.beginPath(),u.moveTo(f.x[e],f.y[e]),u.lineTo(f.x[t],f.y[t]),u.lineTo(f.x[n],f.y[n]),u.closePath(),u.fillStyle=l,u.fill(),d.opacity>=1&&!d.transparent&&(u.strokeStyle=l,u.lineWidth=Math.max(1,S*.6),u.stroke())}else if(d.kind===`points`&&P[i]===n){let e=d.perspective&&!g.orthographic?Math.max(.5,Math.min(2,g.distance/Math.max(f.w[v],1e-6))):1,t=d.style===2,n=!!d.additive,r=Math.max(0,p[v*5+3])*S*e/2,i=t?.75:.5,m=v*20+16,h=p[v*5]-g.eye[0],b=p[v*5+1]-g.eye[1],C=p[v*5+2]-g.eye[2],w=Math.max(0,Math.min(1,(Math.hypot(h,b,C)-U)/(2*g.radius)))*.45,O=_[m],k=_[m+1],A=_[m+2],j=d.opacity*(_[m+3]/255)*Math.min(1,r*r/(i*i));n?j*=(1-w)*W:(O+=(T-O)*w,k+=(E-k)*w,A+=(D-A)*w);let M=l(j,d.thinned??1,n,n?c:1+2*Math.max(0,Math.min(1,(4-r)/2.5))),N=Math.max(r,i)*M.grow;B(M.alpha);let P=t||N<=o?x(t,O,k,A):null;if(P){let e=t?N*a:N*s;u.drawImage(P,f.x[v]-e,f.y[v]-e,e*2,e*2)}else u.fillStyle=y(O,k,A),u.beginPath(),u.arc(f.x[v],f.y[v],N,0,Math.PI*2),u.fill()}else if(d.kind===`lines`&&P[i]===r){let e=v*28+24,t=f.x.length/2;B(d.opacity*(_[e+3]/255)),u.strokeStyle=y(_[e],_[e+1],_[e+2]),u.lineWidth=Math.max(.5,d.width*S),u.beginPath(),u.moveTo(f.x[v],f.y[v]),u.lineTo(f.x[t+v],f.y[t+v]),u.stroke()}}u.globalAlpha=1,H(!1)};return{kind:`canvas2d`,canvas:i,resize(e,t){i.width=Math.max(1,e),i.height=Math.max(1,t)},render(e,t){S(e,t)},destroy(){g.clear(),b.clear(),u.setTransform(1,0,0,1,0,0),u.clearRect(0,0,i.width,i.height)}}},_=(e,t)=>{let n=new Float32Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n},v=(e,t,n,r,o)=>{let c=e.ownerDocument.createElement(`canvas`);c.width=i,c.height=i;let l=c.getContext(`2d`);if(!l||typeof l.createImageData!=`function`)return null;let d=l.createImageData(i,i);if(!d)return null;let f=i/2,p=f/(t?a:s);for(let e=0;e<i;e++)for(let a=0;a<i;a++){let s=Math.hypot(a+.5-f,e+.5-f),[c,l]=t?u(s,p):[y(s,p,f-p),0],m=(e*i+a)*4;d.data[m]=n+(255-n)*l,d.data[m+1]=r+(255-r)*l,d.data[m+2]=o+(255-o)*l,d.data[m+3]=s<f?c*255:0}return l.putImageData(d,0,0),c},y=(e,t,n)=>{let r=Math.max(0,Math.min(1,(t+n/2-e)/n));return r*r*(3-2*r)};exports.createCanvas2d3D=g,exports.discProfile=y,exports.glowProfile=u,exports.gradientAxis=m,exports.lightVertices=p,exports.thinnedDot=l;
|
|
2
2
|
//# sourceMappingURL=canvas2d.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas2d.cjs","names":["drawOrder","require_render_types","CPU_POINT_BUDGET","TRIANGLE","POINT","SEGMENT","projectAll","x","count","y","z","w","i","o","stride","offset","px","data","py","pz","cw","m","iw","width","height","clamp255","v","createCanvas2d3D","ctx","canvas","styles","style","key","r","g","b","s","render","dpr","frame","ordered","items","ambient","diffuse","specular","shininess","L","fogR","fogG","fogB","totalPoints","item","pointStride","projected","floats","bytes","capacity","depth","kind","owner","element","n","raw","f32","k","p","idx","t","a","c","concat","bias","order","currentAlpha","alpha","value","near","u8","e","ax","ay","az","ux","uy","uz","vx","vy","vz","nx","ny","nz","len","ex","ey","ez","el","lambert","hx","hy","hz","hl","spec","light","ca","cb","cc","bl","ac","fill","scale","radius","wx","wy","wz","fog","half","out"],"sources":["../../../../../charts/src/engine/three-d/canvas2d.ts"],"sourcesContent":["// Canvas2D backend of the 3D charts: CPU projection and the painter's\n// algorithm (every triangle, dot and segment sorted back to front), flat\n// lighting per triangle. Point clouds are decimated to a fixed budget; the\n// chart also resamples the surfaces (`CPU_BUDGET`) for this backend.\n\nimport {\n drawOrder,\n type Frame3D,\n type Item3D,\n type Renderer3D,\n} from \"./render-types\";\n\n/** Largest number of dots drawn per frame (by stride over every point item) */\nexport const CPU_POINT_BUDGET = 40_000;\n\nconst TRIANGLE = 0;\nconst POINT = 1;\nconst SEGMENT = 2;\n\ninterface Projected {\n x: Float32Array;\n y: Float32Array;\n z: Float32Array;\n w: Float32Array;\n}\n\nconst projectAll = (\n m: Float32Array,\n data: Float32Array,\n stride: number,\n offset: number,\n count: number,\n width: number,\n height: number,\n): Projected => {\n const x = new Float32Array(count);\n const y = new Float32Array(count);\n const z = new Float32Array(count);\n const w = new Float32Array(count);\n for (let i = 0; i < count; i++) {\n const o = i * stride + offset;\n const px = data[o];\n const py = data[o + 1];\n const pz = data[o + 2];\n const cw = m[3] * px + m[7] * py + m[11] * pz + m[15];\n const iw = 1 / (cw > 1e-9 ? cw : 1e-9);\n x[i] = ((m[0] * px + m[4] * py + m[8] * pz + m[12]) * iw + 1) * 0.5 * width;\n y[i] =\n (1 - (m[1] * px + m[5] * py + m[9] * pz + m[13]) * iw) * 0.5 * height;\n z[i] = (m[2] * px + m[6] * py + m[10] * pz + m[14]) * iw;\n w[i] = cw;\n }\n return { x, y, z, w };\n};\n\nconst clamp255 = (v: number) => (v < 0 ? 0 : v > 255 ? 255 : Math.round(v));\n\nexport const createCanvas2d3D = (\n canvas: HTMLCanvasElement,\n): Renderer3D | null => {\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return null;\n const styles = new Map<number, string>();\n const style = (r: number, g: number, b: number) => {\n const key = (clamp255(r) << 16) | (clamp255(g) << 8) | clamp255(b);\n let s = styles.get(key);\n if (s === undefined) {\n s = `rgb(${key >> 16},${(key >> 8) & 255},${key & 255})`;\n if (styles.size > 4096) styles.clear();\n styles.set(key, s);\n }\n return s;\n };\n\n const render = (items: readonly Item3D[], frame: Frame3D) => {\n const { width, height } = canvas;\n const dpr = frame.dpr;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, width, height);\n const ordered = drawOrder(items);\n const m = frame.viewProj;\n const [ambient, diffuse, specular, shininess] = frame.lighting;\n const L = frame.light;\n const fogR = frame.fog[0] * 255;\n const fogG = frame.fog[1] * 255;\n const fogB = frame.fog[2] * 255;\n\n let totalPoints = 0;\n for (const item of ordered)\n if (item.kind === \"points\") totalPoints += item.count;\n const pointStride = Math.max(1, Math.ceil(totalPoints / CPU_POINT_BUDGET));\n\n // ---- collect the primitives\n const projected: (Projected | null)[] = [];\n // typed views of every item (floats and bytes of the same buffer)\n const floats: Float32Array[] = [];\n const bytes: Uint8Array[] = [];\n let capacity = 0;\n for (const item of ordered) {\n capacity +=\n item.kind === \"mesh\"\n ? item.indices.length / 3\n : item.kind === \"points\"\n ? Math.ceil(item.count / pointStride)\n : item.count;\n }\n const depth = new Float32Array(capacity);\n const kind = new Uint8Array(capacity);\n const owner = new Uint16Array(capacity);\n const element = new Uint32Array(capacity);\n let n = 0;\n ordered.forEach((item, k) => {\n const raw = item.kind === \"mesh\" ? item.vertices : item.data;\n floats.push(new Float32Array(raw));\n bytes.push(new Uint8Array(raw));\n if (item.kind === \"mesh\") {\n const f32 = floats[k]!;\n const p = projectAll(m, f32, 7, 0, item.vertexCount, width, height);\n projected.push(p);\n const idx = item.indices;\n for (let t = 0; t + 2 < idx.length; t += 3) {\n const a = idx[t];\n const b = idx[t + 1];\n const c = idx[t + 2];\n if (p.w[a] <= 0 || p.w[b] <= 0 || p.w[c] <= 0) continue;\n depth[n] = (p.z[a] + p.z[b] + p.z[c]) / 3;\n kind[n] = TRIANGLE;\n owner[n] = k;\n element[n] = t;\n n++;\n }\n } else if (item.kind === \"points\") {\n const f32 = floats[k]!;\n const p = projectAll(m, f32, 5, 0, item.count, width, height);\n projected.push(p);\n for (let i = 0; i < item.count; i += pointStride) {\n if (p.w[i] <= 0) continue;\n depth[n] = p.z[i];\n kind[n] = POINT;\n owner[n] = k;\n element[n] = i;\n n++;\n }\n } else {\n const f32 = floats[k]!;\n // both ends: projected as two interleaved point lists\n const a = projectAll(m, f32, 7, 0, item.count, width, height);\n const b = projectAll(m, f32, 7, 3, item.count, width, height);\n projected.push({\n x: concat(a.x, b.x),\n y: concat(a.y, b.y),\n z: concat(a.z, b.z),\n w: concat(a.w, b.w),\n });\n const bias = item.bias * 5;\n for (let i = 0; i < item.count; i++) {\n if (a.w[i] <= 0 || b.w[i] <= 0) continue;\n depth[n] = (a.z[i] + b.z[i]) / 2 - bias;\n kind[n] = SEGMENT;\n owner[n] = k;\n element[n] = i;\n n++;\n }\n }\n });\n const order = new Uint32Array(n);\n for (let i = 0; i < n; i++) order[i] = i;\n order.sort((a, b) => depth[b] - depth[a]);\n\n // ---- draw back to front\n ctx.lineJoin = \"round\";\n ctx.lineCap = \"round\";\n let currentAlpha = -1;\n const alpha = (value: number) => {\n if (value !== currentAlpha) {\n ctx.globalAlpha = value;\n currentAlpha = value;\n }\n };\n const near = frame.distance - frame.radius;\n for (let o = 0; o < n; o++) {\n const i = order[o];\n const item = ordered[owner[i]];\n const p = projected[owner[i]];\n const f32 = floats[owner[i]];\n const u8 = bytes[owner[i]];\n if (!item || !p || !f32 || !u8) continue;\n const e = element[i];\n if (item.kind === \"mesh\" && kind[i] === TRIANGLE) {\n const a = item.indices[e];\n const b = item.indices[e + 1];\n const c = item.indices[e + 2];\n // flat normal facing the camera\n const ax = f32[a * 7],\n ay = f32[a * 7 + 1],\n az = f32[a * 7 + 2];\n const ux = f32[b * 7] - ax,\n uy = f32[b * 7 + 1] - ay,\n uz = f32[b * 7 + 2] - az;\n const vx = f32[c * 7] - ax,\n vy = f32[c * 7 + 1] - ay,\n vz = f32[c * 7 + 2] - az;\n let nx = uy * vz - uz * vy;\n let ny = uz * vx - ux * vz;\n let nz = ux * vy - uy * vx;\n const len = Math.hypot(nx, ny, nz) || 1;\n nx /= len;\n ny /= len;\n nz /= len;\n let ex = frame.eye[0] - ax;\n let ey = frame.eye[1] - ay;\n let ez = frame.eye[2] - az;\n const el = Math.hypot(ex, ey, ez) || 1;\n ex /= el;\n ey /= el;\n ez /= el;\n if (nx * ex + ny * ey + nz * ez < 0) {\n nx = -nx;\n ny = -ny;\n nz = -nz;\n }\n const lambert = Math.max(0, nx * L[0] + ny * L[1] + nz * L[2]);\n let hx = L[0] + ex;\n let hy = L[1] + ey;\n let hz = L[2] + ez;\n const hl = Math.hypot(hx, hy, hz) || 1;\n hx /= hl;\n hy /= hl;\n hz /= hl;\n const spec =\n Math.pow(Math.max(0, nx * hx + ny * hy + nz * hz), shininess) *\n specular *\n 255;\n const light = ambient + diffuse * lambert;\n const ca = a * 28 + 24;\n const cb = b * 28 + 24;\n const cc = c * 28 + 24;\n const r = (u8[ca] + u8[cb] + u8[cc]) / 3;\n const g = (u8[ca + 1] + u8[cb + 1] + u8[cc + 1]) / 3;\n const bl = (u8[ca + 2] + u8[cb + 2] + u8[cc + 2]) / 3;\n const ac = (u8[ca + 3] + u8[cb + 3] + u8[cc + 3]) / 765;\n const fill = style(\n r * light + spec,\n g * light + spec,\n bl * light + spec,\n );\n alpha(item.opacity * ac);\n ctx.beginPath();\n ctx.moveTo(p.x[a], p.y[a]);\n ctx.lineTo(p.x[b], p.y[b]);\n ctx.lineTo(p.x[c], p.y[c]);\n ctx.closePath();\n ctx.fillStyle = fill;\n ctx.fill();\n if (item.opacity >= 1) {\n // hides the seams between neighbouring triangles\n ctx.strokeStyle = fill;\n ctx.lineWidth = 0.75;\n ctx.stroke();\n }\n } else if (item.kind === \"points\" && kind[i] === POINT) {\n const scale =\n item.perspective && !frame.orthographic\n ? Math.max(\n 0.5,\n Math.min(2, frame.distance / Math.max(p.w[e], 1e-6)),\n )\n : 1;\n const radius = Math.max(0.5, (f32[e * 5 + 3] * dpr * scale) / 2);\n const c = e * 20 + 16;\n const wx = f32[e * 5] - frame.eye[0];\n const wy = f32[e * 5 + 1] - frame.eye[1];\n const wz = f32[e * 5 + 2] - frame.eye[2];\n const fog =\n Math.max(\n 0,\n Math.min(1, (Math.hypot(wx, wy, wz) - near) / (2 * frame.radius)),\n ) * 0.45;\n const r = u8[c] + (fogR - u8[c]) * fog;\n const g = u8[c + 1] + (fogG - u8[c + 1]) * fog;\n const b = u8[c + 2] + (fogB - u8[c + 2]) * fog;\n alpha(item.opacity * (u8[c + 3] / 255));\n ctx.fillStyle = style(r, g, b);\n if (radius < 1.5) {\n ctx.fillRect(\n p.x[e] - radius,\n p.y[e] - radius,\n radius * 2,\n radius * 2,\n );\n } else {\n ctx.beginPath();\n ctx.arc(p.x[e], p.y[e], radius, 0, Math.PI * 2);\n ctx.fill();\n }\n } else if (item.kind === \"lines\" && kind[i] === SEGMENT) {\n const c = e * 28 + 24;\n const half = p.x.length / 2;\n alpha(item.opacity * (u8[c + 3] / 255));\n ctx.strokeStyle = style(u8[c], u8[c + 1], u8[c + 2]);\n ctx.lineWidth = Math.max(0.5, item.width * dpr);\n ctx.beginPath();\n ctx.moveTo(p.x[e], p.y[e]);\n ctx.lineTo(p.x[half + e], p.y[half + e]);\n ctx.stroke();\n }\n }\n ctx.globalAlpha = 1;\n };\n\n return {\n kind: \"canvas2d\",\n canvas,\n resize(width, height) {\n canvas.width = Math.max(1, width);\n canvas.height = Math.max(1, height);\n },\n render(items, frame) {\n render(items, frame);\n },\n destroy() {\n styles.clear();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n },\n };\n};\n\nconst concat = (a: Float32Array, b: Float32Array) => {\n const out = new Float32Array(a.length + b.length);\n out.set(a, 0);\n out.set(b, a.length);\n return out;\n};\n"],"mappings":"sCAaA,IAAaE,EAAmB,IAE1BC,EAAW,EACXC,EAAQ,EACRC,EAAU,EASVC,GACJ,EACA,EACA,EACA,EACA,EACA,EACA,IACc,CACd,IAAMC,EAAI,IAAI,aAAaC,CAAK,EAC1BC,EAAI,IAAI,aAAaD,CAAK,EAC1BE,EAAI,IAAI,aAAaF,CAAK,EAC1BG,EAAI,IAAI,aAAaH,CAAK,EAChC,IAAK,IAAII,EAAI,EAAGA,EAAIJ,EAAO,IAAK,CAC9B,IAAMK,EAAID,EAAIE,EAASC,EACjBC,EAAKC,EAAKJ,GACVK,EAAKD,EAAKJ,EAAI,GACdM,EAAKF,EAAKJ,EAAI,GACdO,EAAKC,EAAE,GAAKL,EAAKK,EAAE,GAAKH,EAAKG,EAAE,IAAMF,EAAKE,EAAE,IAC5CC,EAAK,GAAKF,EAAK,KAAOA,EAAK,MACj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,EAAG,EAAG,EAAG,CAAC,EACjCA,EAAI,UAAU,EAAG,EAAGC,EAAO,MAAOA,EAAO,MAAM,CACjD,CACF,CACF,EAEMyC,GAAU,EAAiB,IAAoB,CACnD,IAAM8C,EAAM,IAAI,aAAahD,EAAE,OAASjC,EAAE,MAAM,EAGhD,OAFAiF,EAAI,IAAIhD,EAAG,CAAC,EACZgD,EAAI,IAAIjF,EAAGiC,EAAE,MAAM,EACZgD,CACT"}
|
|
1
|
+
{"version":3,"file":"canvas2d.cjs","names":["drawOrder","require_render_types","TRIANGLE","POINT","SEGMENT","SPRITE","GLOW_REACH","SPRITE_DISC_MAX","DISC_REACH","MAX_GROW","thinnedDot","k","thinned","alpha","grow","maxGrow","density","additive","glowProfile","core","r","d","q","projectAll","x","count","y","z","w","i","o","stride","offset","px","data","py","pz","cw","m","iw","width","height","clamp255","v","lightVertices","f32","vertices","u8","out","ambient","diffuse","specular","shininess","frame","lx","ly","lz","cx","cy","cz","nx","ny","nz","len","ex","ey","ez","el","lambert","hx","hy","hz","hl","spec","light","c","gradientAxis","d1x","d1y","d2x","d2y","det","ds1","s","ds2","gx","gy","gg","lo","hi","k0","k1","GRADIENT_SPREAD","createCanvas2d3D","ctx","canvas","styles","style","key","g","b","sprites","sprite","makeSprite","glow","render","dpr","ordered","items","fogR","fogG","fogB","projected","floats","bytes","lit","capacity","item","depth","kind","owner","element","n","raw","p","idx","t","a","concat","bias","order","currentAlpha","value","lighter","composite","add","near","exposure","e","lc","ca","cb","cc","ac","fill","channel","spread","ch","va","vb","vc","axis","gradient","scale","raw0","min","wx","wy","wz","fog","dot","radius","image","reach","half","pixels","center","white","discProfile","edge"],"sources":["../../../../../charts/src/engine/three-d/canvas2d.ts"],"sourcesContent":["// Canvas2D backend of the 3D charts: CPU projection and the painter's\n// algorithm (every triangle, dot and segment of every item sorted back to\n// front together: transparent meshes and dots blend in the right order),\n// lighting per vertex as on the GPU (gradients across the triangles whose\n// corners differ). The chart thins the point clouds and resamples\n// the surfaces for this backend (`CPU_BUDGET`): what it gets is what is\n// drawn, and what can be hovered. Small dots are anti-aliased sprites (soft\n// discs, glows); a cloud thinned to 1 dot out of k keeps the look of the\n// full cloud (`thinnedDot`).\n\nimport {\n POINT_GLOW,\n drawOrder,\n type Frame3D,\n type Item3D,\n type Renderer3D,\n} from \"./render-types\";\n\nconst TRIANGLE = 0;\nconst POINT = 1;\nconst SEGMENT = 2;\n\n/** Side of the sprites (px); the glow halo reaches 2.2 × the core radius */\nconst SPRITE = 32;\nconst GLOW_REACH = 2.2;\n/** Dots up to this radius (device px) are disc sprites, larger ones arcs */\nconst SPRITE_DISC_MAX = 4;\n/** The disc sprites extend past the dot radius by this factor (soft edge) */\nconst DISC_REACH = 1.25;\n/** Largest growth of the radius of a thinned dot */\nconst MAX_GROW = 3;\n\n/**\n * Alpha and radius factor of a dot standing for `thinned` dots of the full\n * cloud (alpha `alpha`) spread around it: the dot covers their area (radius\n * × √k, at most × 3) and keeps the density of the cloud, k / grow² dots\n * per dot area: their light adds up (additive blending, at most 1) or their\n * coverage stacks, 1 − (1 − alpha)^(k / grow²). A haze of faint dots, as\n * the GPU draws it, instead of sparse bright sparkles.\n */\nexport const thinnedDot = (\n alpha: number,\n thinned: number,\n additive: boolean,\n maxGrow = MAX_GROW,\n): { alpha: number; grow: number } => {\n const k = Math.max(1, thinned);\n if (alpha <= 0) return { alpha: 0, grow: 1 };\n const grow = Math.max(1, Math.min(maxGrow, Math.sqrt(k)));\n const density = k / (grow * grow);\n if (additive) return { alpha: Math.min(1, alpha * density), grow };\n const a = Math.min(alpha, 0.999);\n if (density === 1) return { alpha: Math.min(alpha, 1), grow };\n return { alpha: 1 - Math.pow(1 - a, density), grow };\n};\n\n/**\n * Glow profile (as the GPU shaders): an anti-aliased core and a gaussian\n * halo; `d` and `r` in pixels. Returns the alpha and the whitening.\n */\nexport const glowProfile = (d: number, r: number): [number, number] => {\n const core = Math.max(0, Math.min(1, r * 0.6 + 0.5 - d));\n const q = d / r;\n return [core + (1 - core) * Math.exp(-1.2 * q * q), 0.2 * core];\n};\n\ninterface Projected {\n x: Float32Array;\n y: Float32Array;\n z: Float32Array;\n w: Float32Array;\n}\n\nconst projectAll = (\n m: Float32Array,\n data: Float32Array,\n stride: number,\n offset: number,\n count: number,\n width: number,\n height: number,\n): Projected => {\n const x = new Float32Array(count);\n const y = new Float32Array(count);\n const z = new Float32Array(count);\n const w = new Float32Array(count);\n for (let i = 0; i < count; i++) {\n const o = i * stride + offset;\n const px = data[o];\n const py = data[o + 1];\n const pz = data[o + 2];\n const cw = m[3] * px + m[7] * py + m[11] * pz + m[15];\n const iw = 1 / (cw > 1e-9 ? cw : 1e-9);\n x[i] = ((m[0] * px + m[4] * py + m[8] * pz + m[12]) * iw + 1) * 0.5 * width;\n y[i] =\n (1 - (m[1] * px + m[5] * py + m[9] * pz + m[13]) * iw) * 0.5 * height;\n z[i] = (m[2] * px + m[6] * py + m[10] * pz + m[14]) * iw;\n w[i] = cw;\n }\n return { x, y, z, w };\n};\n\nconst clamp255 = (v: number) => (v < 0 ? 0 : v > 255 ? 255 : Math.round(v));\n\n/**\n * Lit color (RGB, 0–255) of every vertex of a mesh: Blinn-Phong as in the\n * GPU shaders, two-sided (the normal turned toward the eye)\n */\nexport const lightVertices = (\n vertices: ArrayBuffer,\n count: number,\n frame: Frame3D,\n): Float32Array => {\n const f32 = new Float32Array(vertices);\n const u8 = new Uint8Array(vertices);\n const out = new Float32Array(count * 3);\n const [ambient, diffuse, specular, shininess] = frame.lighting;\n const [lx, ly, lz] = frame.light;\n const [cx, cy, cz] = frame.eye;\n for (let v = 0; v < count; v++) {\n const o = v * 7;\n let nx = f32[o + 3];\n let ny = f32[o + 4];\n let nz = f32[o + 5];\n const len = Math.hypot(nx, ny, nz);\n if (len > 1e-6) {\n nx /= len;\n ny /= len;\n nz /= len;\n } else {\n nx = 0;\n ny = 0;\n nz = 1;\n }\n let ex = cx - f32[o];\n let ey = cy - f32[o + 1];\n let ez = cz - f32[o + 2];\n const el = Math.hypot(ex, ey, ez) || 1;\n ex /= el;\n ey /= el;\n ez /= el;\n if (nx * ex + ny * ey + nz * ez < 0) {\n nx = -nx;\n ny = -ny;\n nz = -nz;\n }\n const lambert = Math.max(0, nx * lx + ny * ly + nz * lz);\n let hx = lx + ex;\n let hy = ly + ey;\n let hz = lz + ez;\n const hl = Math.hypot(hx, hy, hz) || 1;\n hx /= hl;\n hy /= hl;\n hz /= hl;\n const spec =\n specular > 0\n ? Math.pow(Math.max(0, nx * hx + ny * hy + nz * hz), shininess) *\n specular *\n 255\n : 0;\n const light = ambient + diffuse * lambert;\n const c = v * 28 + 24;\n out[v * 3] = u8[c] * light + spec;\n out[v * 3 + 1] = u8[c + 1] * light + spec;\n out[v * 3 + 2] = u8[c + 2] * light + spec;\n }\n return out;\n};\n\n/**\n * Axis of the linear gradient reproducing a value given at the 3 corners of\n * a screen triangle (affine over it): from where it is lowest to where it\n * is highest, and the offset of each corner on it. Null when it hardly\n * changes or the triangle is degenerate.\n */\nexport const gradientAxis = (\n x: readonly [number, number, number],\n y: readonly [number, number, number],\n s: readonly [number, number, number],\n): { x0: number; y0: number; x1: number; y1: number; t: number[] } | null => {\n const d1x = x[1] - x[0];\n const d1y = y[1] - y[0];\n const d2x = x[2] - x[0];\n const d2y = y[2] - y[0];\n const det = d1x * d2y - d1y * d2x;\n if (Math.abs(det) < 1e-6) return null;\n const ds1 = s[1] - s[0];\n const ds2 = s[2] - s[0];\n // screen gradient of the value: g · d1 = ds1, g · d2 = ds2\n const gx = (ds1 * d2y - ds2 * d1y) / det;\n const gy = (d1x * ds2 - d2x * ds1) / det;\n const gg = gx * gx + gy * gy;\n const lo = Math.min(s[0], s[1], s[2]);\n const hi = Math.max(s[0], s[1], s[2]);\n if (!(gg > 1e-12) || hi - lo < 1e-6) return null;\n const k0 = (lo - s[0]) / gg;\n const k1 = (hi - s[0]) / gg;\n return {\n x0: x[0] + gx * k0,\n y0: y[0] + gy * k0,\n x1: x[0] + gx * k1,\n y1: y[0] + gy * k1,\n t: [0, 1, 2].map((i) => (s[i]! - lo) / (hi - lo)),\n };\n};\n\n/**\n * Triangles whose corner colors differ by more than this (0–255, on one\n * channel) are filled with a gradient (smooth like the GPU): the others,\n * most of a surface, with their mean color (much cheaper)\n */\nconst GRADIENT_SPREAD = 14;\n\nexport const createCanvas2d3D = (\n canvas: HTMLCanvasElement,\n): Renderer3D | null => {\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return null;\n const styles = new Map<number, string>();\n const style = (r: number, g: number, b: number) => {\n const key = (clamp255(r) << 16) | (clamp255(g) << 8) | clamp255(b);\n let s = styles.get(key);\n if (s === undefined) {\n s = `rgb(${key >> 16},${(key >> 8) & 255},${key & 255})`;\n if (styles.size > 4096) styles.clear();\n styles.set(key, s);\n }\n return s;\n };\n // sprites by shape and color (4 bits per channel); null: no offscreen canvas\n const sprites = new Map<number, HTMLCanvasElement | null>();\n const sprite = (glow: boolean, r: number, g: number, b: number) => {\n const key =\n ((glow ? 1 : 0) << 12) |\n ((clamp255(r) >> 4) << 8) |\n ((clamp255(g) >> 4) << 4) |\n (clamp255(b) >> 4);\n let s = sprites.get(key);\n if (s === undefined) {\n s = makeSprite(\n canvas,\n glow,\n ((key >> 8) & 15) * 17,\n ((key >> 4) & 15) * 17,\n (key & 15) * 17,\n );\n sprites.set(key, s);\n }\n return s;\n };\n\n const render = (items: readonly Item3D[], frame: Frame3D) => {\n const { width, height } = canvas;\n const dpr = frame.dpr;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, width, height);\n const ordered = drawOrder(items);\n const m = frame.viewProj;\n const fogR = frame.fog[0] * 255;\n const fogG = frame.fog[1] * 255;\n const fogB = frame.fog[2] * 255;\n\n // ---- collect the primitives\n const projected: (Projected | null)[] = [];\n // typed views of every item (floats and bytes of the same buffer)\n const floats: Float32Array[] = [];\n const bytes: Uint8Array[] = [];\n // lit color of every mesh vertex (null for dots and segments)\n const lit: (Float32Array | null)[] = [];\n let capacity = 0;\n for (const item of ordered) {\n capacity += item.kind === \"mesh\" ? item.indices.length / 3 : item.count;\n }\n const depth = new Float32Array(capacity);\n const kind = new Uint8Array(capacity);\n const owner = new Uint16Array(capacity);\n const element = new Uint32Array(capacity);\n let n = 0;\n ordered.forEach((item, k) => {\n const raw = item.kind === \"mesh\" ? item.vertices : item.data;\n floats.push(new Float32Array(raw));\n bytes.push(new Uint8Array(raw));\n lit.push(\n item.kind === \"mesh\"\n ? lightVertices(item.vertices, item.vertexCount, frame)\n : null,\n );\n if (item.kind === \"mesh\") {\n const f32 = floats[k]!;\n const p = projectAll(m, f32, 7, 0, item.vertexCount, width, height);\n projected.push(p);\n const idx = item.indices;\n for (let t = 0; t + 2 < idx.length; t += 3) {\n const a = idx[t];\n const b = idx[t + 1];\n const c = idx[t + 2];\n if (p.w[a] <= 0 || p.w[b] <= 0 || p.w[c] <= 0) continue;\n depth[n] = (p.z[a] + p.z[b] + p.z[c]) / 3;\n kind[n] = TRIANGLE;\n owner[n] = k;\n element[n] = t;\n n++;\n }\n } else if (item.kind === \"points\") {\n const f32 = floats[k]!;\n const p = projectAll(m, f32, 5, 0, item.count, width, height);\n projected.push(p);\n for (let i = 0; i < item.count; i++) {\n if (p.w[i] <= 0) continue;\n depth[n] = p.z[i];\n kind[n] = POINT;\n owner[n] = k;\n element[n] = i;\n n++;\n }\n } else {\n const f32 = floats[k]!;\n // both ends: projected as two interleaved point lists\n const a = projectAll(m, f32, 7, 0, item.count, width, height);\n const b = projectAll(m, f32, 7, 3, item.count, width, height);\n projected.push({\n x: concat(a.x, b.x),\n y: concat(a.y, b.y),\n z: concat(a.z, b.z),\n w: concat(a.w, b.w),\n });\n const bias = item.bias * 5;\n for (let i = 0; i < item.count; i++) {\n if (a.w[i] <= 0 || b.w[i] <= 0) continue;\n depth[n] = (a.z[i] + b.z[i]) / 2 - bias;\n kind[n] = SEGMENT;\n owner[n] = k;\n element[n] = i;\n n++;\n }\n }\n });\n const order = new Uint32Array(n);\n for (let i = 0; i < n; i++) order[i] = i;\n order.sort((a, b) => depth[b] - depth[a]);\n\n // ---- draw back to front\n ctx.lineJoin = \"round\";\n ctx.lineCap = \"round\";\n let currentAlpha = -1;\n const alpha = (value: number) => {\n if (value !== currentAlpha) {\n ctx.globalAlpha = value;\n currentAlpha = value;\n }\n };\n let lighter = false;\n const composite = (add: boolean) => {\n if (add !== lighter) {\n ctx.globalCompositeOperation = add ? \"lighter\" : \"source-over\";\n lighter = add;\n }\n };\n const near = frame.distance - frame.radius;\n const exposure = Math.max(0, frame.exposure);\n for (let o = 0; o < n; o++) {\n const i = order[o];\n const item = ordered[owner[i]];\n const p = projected[owner[i]];\n const f32 = floats[owner[i]];\n const u8 = bytes[owner[i]];\n if (!item || !p || !f32 || !u8) continue;\n const e = element[i];\n composite(item.kind === \"points\" && !!item.additive);\n if (item.kind === \"mesh\" && kind[i] === TRIANGLE) {\n const a = item.indices[e];\n const b = item.indices[e + 1];\n const c = item.indices[e + 2];\n // smooth shading like the GPU (per-fragment there): the colors of\n // the lit vertices, blended by a gradient where they differ (steep\n // cells of a color-mapped surface), else their mean. One flat color\n // per triangle shows the grid as rings and steps on curved surfaces.\n const lc = lit[owner[i]];\n if (!lc) continue;\n const ca = a * 28 + 24;\n const cb = b * 28 + 24;\n const cc = c * 28 + 24;\n const ac = (u8[ca + 3] + u8[cb + 3] + u8[cc + 3]) / 765;\n let fill: string | CanvasGradient = style(\n (lc[a * 3] + lc[b * 3] + lc[c * 3]) / 3,\n (lc[a * 3 + 1] + lc[b * 3 + 1] + lc[c * 3 + 1]) / 3,\n (lc[a * 3 + 2] + lc[b * 3 + 2] + lc[c * 3 + 2]) / 3,\n );\n // the channel that changes most gives the axis of the gradient\n let channel = 0;\n let spread = 0;\n for (let ch = 0; ch < 3; ch++) {\n const va = lc[a * 3 + ch];\n const vb = lc[b * 3 + ch];\n const vc = lc[c * 3 + ch];\n const d = Math.max(va, vb, vc) - Math.min(va, vb, vc);\n if (d > spread) {\n spread = d;\n channel = ch;\n }\n }\n if (spread > GRADIENT_SPREAD) {\n const axis = gradientAxis(\n [p.x[a], p.x[b], p.x[c]],\n [p.y[a], p.y[b], p.y[c]],\n [lc[a * 3 + channel], lc[b * 3 + channel], lc[c * 3 + channel]],\n );\n if (axis) {\n const gradient = ctx.createLinearGradient(\n axis.x0,\n axis.y0,\n axis.x1,\n axis.y1,\n );\n [a, b, c].forEach((v, k) =>\n gradient.addColorStop(\n axis.t[k]!,\n style(lc[v * 3], lc[v * 3 + 1], lc[v * 3 + 2]),\n ),\n );\n fill = gradient;\n }\n }\n alpha(item.opacity * ac);\n ctx.beginPath();\n ctx.moveTo(p.x[a], p.y[a]);\n ctx.lineTo(p.x[b], p.y[b]);\n ctx.lineTo(p.x[c], p.y[c]);\n ctx.closePath();\n ctx.fillStyle = fill;\n ctx.fill();\n if (item.opacity >= 1 && !item.transparent) {\n // hides the anti-aliasing seams between neighbouring triangles\n ctx.strokeStyle = fill;\n ctx.lineWidth = Math.max(1, dpr * 0.6);\n ctx.stroke();\n }\n } else if (item.kind === \"points\" && kind[i] === POINT) {\n const scale =\n item.perspective && !frame.orthographic\n ? Math.max(\n 0.5,\n Math.min(2, frame.distance / Math.max(p.w[e], 1e-6)),\n )\n : 1;\n const glow = item.style === POINT_GLOW;\n const additive = !!item.additive;\n const raw0 = (Math.max(0, f32[e * 5 + 3]) * dpr * scale) / 2;\n const min = glow ? 0.75 : 0.5;\n const c = e * 20 + 16;\n const wx = f32[e * 5] - frame.eye[0];\n const wy = f32[e * 5 + 1] - frame.eye[1];\n const wz = f32[e * 5 + 2] - frame.eye[2];\n const fog =\n Math.max(\n 0,\n Math.min(1, (Math.hypot(wx, wy, wz) - near) / (2 * frame.radius)),\n ) * 0.45;\n let r = u8[c];\n let g = u8[c + 1];\n let b = u8[c + 2];\n // alpha of the dot as the GPU draws it (sub-pixel dots: by area)\n let a =\n item.opacity *\n (u8[c + 3] / 255) *\n Math.min(1, (raw0 * raw0) / (min * min));\n if (additive) {\n a *= (1 - fog) * exposure;\n } else {\n r += (fogR - r) * fog;\n g += (fogG - g) * fog;\n b += (fogB - b) * fog;\n }\n // thinned clouds: each dot stands for the dropped ones (blended\n // dots grow only while small: big markers keep their size)\n const dot = thinnedDot(\n a,\n item.thinned ?? 1,\n additive,\n additive\n ? MAX_GROW\n : 1 + (MAX_GROW - 1) * Math.max(0, Math.min(1, (4 - raw0) / 2.5)),\n );\n const radius = Math.max(raw0, min) * dot.grow;\n alpha(dot.alpha);\n const image =\n glow || radius <= SPRITE_DISC_MAX ? sprite(glow, r, g, b) : null;\n if (image) {\n const reach = glow ? radius * GLOW_REACH : radius * DISC_REACH;\n ctx.drawImage(\n image,\n p.x[e] - reach,\n p.y[e] - reach,\n reach * 2,\n reach * 2,\n );\n } else {\n ctx.fillStyle = style(r, g, b);\n ctx.beginPath();\n ctx.arc(p.x[e], p.y[e], radius, 0, Math.PI * 2);\n ctx.fill();\n }\n } else if (item.kind === \"lines\" && kind[i] === SEGMENT) {\n const c = e * 28 + 24;\n const half = p.x.length / 2;\n alpha(item.opacity * (u8[c + 3] / 255));\n ctx.strokeStyle = style(u8[c], u8[c + 1], u8[c + 2]);\n ctx.lineWidth = Math.max(0.5, item.width * dpr);\n ctx.beginPath();\n ctx.moveTo(p.x[e], p.y[e]);\n ctx.lineTo(p.x[half + e], p.y[half + e]);\n ctx.stroke();\n }\n }\n ctx.globalAlpha = 1;\n composite(false);\n };\n\n return {\n kind: \"canvas2d\",\n canvas,\n resize(width, height) {\n canvas.width = Math.max(1, width);\n canvas.height = Math.max(1, height);\n },\n render(items, frame) {\n render(items, frame);\n },\n destroy() {\n styles.clear();\n sprites.clear();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n },\n };\n};\n\nconst concat = (a: Float32Array, b: Float32Array) => {\n const out = new Float32Array(a.length + b.length);\n out.set(a, 0);\n out.set(b, a.length);\n return out;\n};\n\n/**\n * A sprite of a color (`SPRITE` px): a glow (core and halo filling it) or\n * an anti-aliased disc (radius `SPRITE / 2 / DISC_REACH`, a soft 1 px edge\n * once scaled to the dot); null without offscreen canvas\n */\nconst makeSprite = (\n canvas: HTMLCanvasElement,\n glow: boolean,\n r: number,\n g: number,\n b: number,\n): HTMLCanvasElement | null => {\n const image = canvas.ownerDocument.createElement(\"canvas\");\n image.width = SPRITE;\n image.height = SPRITE;\n const ctx = image.getContext(\"2d\");\n if (!ctx || typeof ctx.createImageData !== \"function\") return null;\n const pixels = ctx.createImageData(SPRITE, SPRITE) as ImageData | undefined;\n if (!pixels) return null;\n const center = SPRITE / 2;\n const radius = center / (glow ? GLOW_REACH : DISC_REACH);\n for (let y = 0; y < SPRITE; y++) {\n for (let x = 0; x < SPRITE; x++) {\n const d = Math.hypot(x + 0.5 - center, y + 0.5 - center);\n const [a, white] = glow\n ? glowProfile(d, radius)\n : [discProfile(d, radius, center - radius), 0];\n const o = (y * SPRITE + x) * 4;\n pixels.data[o] = r + (255 - r) * white;\n pixels.data[o + 1] = g + (255 - g) * white;\n pixels.data[o + 2] = b + (255 - b) * white;\n pixels.data[o + 3] = d < center ? a * 255 : 0;\n }\n }\n ctx.putImageData(pixels, 0, 0);\n return image;\n};\n\n/**\n * Alpha of an anti-aliased disc of radius `r` at the distance `d`, with an\n * edge `edge` wide (pixels of the sprite): 1 inside, smooth to 0 outside\n */\nexport const discProfile = (d: number, r: number, edge: number): number => {\n const t = Math.max(0, Math.min(1, (r + edge / 2 - d) / edge));\n return t * t * (3 - 2 * t);\n};\n"],"mappings":"sCAkBA,IAAME,EAAW,EACXC,EAAQ,EACRC,EAAU,EAGVC,EAAS,GACTC,EAAa,IAEbC,EAAkB,EAElBC,EAAa,KAEbC,EAAW,EAUJC,GACX,EACA,EACA,EACA,EAAUD,IAC0B,CACpC,IAAME,EAAI,KAAK,IAAI,EAAGC,CAAO,EAC7B,GAAIC,GAAS,EAAG,MAAO,CAAE,MAAO,EAAG,KAAM,CAAE,EAC3C,I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