@primeui/chart-core 0.0.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/README.md +1 -0
- package/dist/animations/index.d.mts +136 -0
- package/dist/animations/index.mjs +18 -0
- package/dist/annotation.utils-Bm0lOO1o.d.mts +290 -0
- package/dist/borderRadius.utils-Cz73LLR_.d.mts +54 -0
- package/dist/canvas-D4vigq47.d.mts +34 -0
- package/dist/canvas.utils-D2WHi2gL.d.mts +167 -0
- package/dist/cartesian/index.d.mts +94 -0
- package/dist/cartesian/index.mjs +93 -0
- package/dist/chunk-22ST6YPP.mjs +304 -0
- package/dist/chunk-2QK2KOBN.mjs +10 -0
- package/dist/chunk-2QRS4YQ5.mjs +18 -0
- package/dist/chunk-3FFJEX4A.mjs +261 -0
- package/dist/chunk-3IYSJ2U7.mjs +567 -0
- package/dist/chunk-3OZLP4I4.mjs +190 -0
- package/dist/chunk-3WEMHXZI.mjs +198 -0
- package/dist/chunk-3Z62EUJN.mjs +138 -0
- package/dist/chunk-4C6EVJ54.mjs +362 -0
- package/dist/chunk-53HW45JB.mjs +102 -0
- package/dist/chunk-55Y3WI6S.mjs +186 -0
- package/dist/chunk-5JCI2DEB.mjs +97 -0
- package/dist/chunk-66T4MRC5.mjs +113 -0
- package/dist/chunk-6HSEJLSR.mjs +376 -0
- package/dist/chunk-6STOLMCA.mjs +187 -0
- package/dist/chunk-7CMVDIOU.mjs +54 -0
- package/dist/chunk-7QQ6ETB4.mjs +228 -0
- package/dist/chunk-A6ZQZFL2.mjs +272 -0
- package/dist/chunk-ADKLH73T.mjs +1 -0
- package/dist/chunk-AGU3NG6D.mjs +22 -0
- package/dist/chunk-AHYIS6EB.mjs +230 -0
- package/dist/chunk-AP3UYWYT.mjs +4 -0
- package/dist/chunk-ARB5T6MP.mjs +326 -0
- package/dist/chunk-ARRGOEFX.mjs +585 -0
- package/dist/chunk-AUF4CHDP.mjs +422 -0
- package/dist/chunk-B4FTADAZ.mjs +561 -0
- package/dist/chunk-BABQKA6K.mjs +339 -0
- package/dist/chunk-BETFQBM2.mjs +197 -0
- package/dist/chunk-BKP26M4K.mjs +413 -0
- package/dist/chunk-BZN2QHGP.mjs +200 -0
- package/dist/chunk-C36VWQ7A.mjs +86 -0
- package/dist/chunk-CHW4RKY3.mjs +16 -0
- package/dist/chunk-CINXJIRR.mjs +120 -0
- package/dist/chunk-DN6AXQYZ.mjs +667 -0
- package/dist/chunk-DP2IZNN3.mjs +92 -0
- package/dist/chunk-DTWTCFRG.mjs +119 -0
- package/dist/chunk-EAMUNLRU.mjs +172 -0
- package/dist/chunk-EDAKJLNA.mjs +17 -0
- package/dist/chunk-ERVQB2VZ.mjs +59 -0
- package/dist/chunk-FFMT6OCO.mjs +92 -0
- package/dist/chunk-FHTC2YDB.mjs +102 -0
- package/dist/chunk-FRST55HY.mjs +16 -0
- package/dist/chunk-HDFGCN2F.mjs +132 -0
- package/dist/chunk-IEGLX7VL.mjs +42 -0
- package/dist/chunk-ILUWFYGY.mjs +220 -0
- package/dist/chunk-IXOWSEHO.mjs +114 -0
- package/dist/chunk-J4RI2C2G.mjs +172 -0
- package/dist/chunk-J65DBT4R.mjs +13 -0
- package/dist/chunk-JGOVWSKH.mjs +179 -0
- package/dist/chunk-JO7VACY2.mjs +25 -0
- package/dist/chunk-JWFBOPM6.mjs +122 -0
- package/dist/chunk-KNDZP446.mjs +895 -0
- package/dist/chunk-KP2TWD4Z.mjs +90 -0
- package/dist/chunk-KQIFO5I3.mjs +225 -0
- package/dist/chunk-KVDEROP6.mjs +59 -0
- package/dist/chunk-LKC7MZKK.mjs +87 -0
- package/dist/chunk-LVMDQ4OJ.mjs +305 -0
- package/dist/chunk-M7B3JF43.mjs +90 -0
- package/dist/chunk-MTGMXRNF.mjs +136 -0
- package/dist/chunk-N3TIT3OH.mjs +1040 -0
- package/dist/chunk-NHRK5KU2.mjs +890 -0
- package/dist/chunk-NKUYIWAP.mjs +243 -0
- package/dist/chunk-NPDZLYIF.mjs +238 -0
- package/dist/chunk-O2X6FF45.mjs +499 -0
- package/dist/chunk-OGJ6IIBW.mjs +176 -0
- package/dist/chunk-OHGCZZPZ.mjs +403 -0
- package/dist/chunk-OWW3K55O.mjs +351 -0
- package/dist/chunk-OXTFAWSK.mjs +60 -0
- package/dist/chunk-PLSDU3C2.mjs +890 -0
- package/dist/chunk-PRDVPOZX.mjs +223 -0
- package/dist/chunk-Q6PPVIHU.mjs +21 -0
- package/dist/chunk-QQBXUDM4.mjs +885 -0
- package/dist/chunk-QS76E3TD.mjs +111 -0
- package/dist/chunk-QWQ6HY4I.mjs +209 -0
- package/dist/chunk-R6Y3R7EW.mjs +135 -0
- package/dist/chunk-RBLZRT5K.mjs +190 -0
- package/dist/chunk-RO4N6YFS.mjs +167 -0
- package/dist/chunk-RQ3CKQOX.mjs +984 -0
- package/dist/chunk-SALTGZFR.mjs +208 -0
- package/dist/chunk-SANZPAJ4.mjs +14 -0
- package/dist/chunk-SDBPQ5CF.mjs +624 -0
- package/dist/chunk-SSLTFJ3U.mjs +364 -0
- package/dist/chunk-SXHVDJGF.mjs +77 -0
- package/dist/chunk-TA4MVAEX.mjs +243 -0
- package/dist/chunk-TAHCOZHF.mjs +1772 -0
- package/dist/chunk-TQ6S34QZ.mjs +152 -0
- package/dist/chunk-UPRXABX5.mjs +90 -0
- package/dist/chunk-VGLSBZDN.mjs +71 -0
- package/dist/chunk-VN7CKCSE.mjs +364 -0
- package/dist/chunk-VVI3OBPJ.mjs +524 -0
- package/dist/chunk-VWF57TS3.mjs +62 -0
- package/dist/chunk-WA3OVISZ.mjs +179 -0
- package/dist/chunk-WCG35U6M.mjs +964 -0
- package/dist/chunk-WFTX4AQJ.mjs +194 -0
- package/dist/chunk-WFVOQ2QZ.mjs +18 -0
- package/dist/chunk-WH3C3Y7P.mjs +149 -0
- package/dist/chunk-WPFUV7K3.mjs +488 -0
- package/dist/chunk-WRULPWHD.mjs +492 -0
- package/dist/chunk-WS64BZXT.mjs +1 -0
- package/dist/chunk-WY4AURRE.mjs +2419 -0
- package/dist/chunk-WYLILAOO.mjs +167 -0
- package/dist/chunk-X4D7FKUS.mjs +62 -0
- package/dist/chunk-X7T34OLW.mjs +139 -0
- package/dist/chunk-XIHBK5D3.mjs +68 -0
- package/dist/chunk-XQQCGFYB.mjs +50 -0
- package/dist/chunk-XTVE4P3L.mjs +214 -0
- package/dist/chunk-XUAASRXW.mjs +579 -0
- package/dist/chunk-Y3L3D4GQ.mjs +685 -0
- package/dist/chunk-YBJ56XJS.mjs +132 -0
- package/dist/chunk-ZQFK6CAE.mjs +1 -0
- package/dist/chunk-ZT2Z7ERM.mjs +874 -0
- package/dist/chunk-ZTL2FQEW.mjs +714 -0
- package/dist/circular/arc/index.d.mts +8 -0
- package/dist/circular/arc/index.mjs +3 -0
- package/dist/circular/index.d.mts +44 -0
- package/dist/circular/index.mjs +13 -0
- package/dist/collect.utils-DiKB4ciO.d.mts +12 -0
- package/dist/computeChartState-BTVIqwyO.d.mts +304 -0
- package/dist/controller-BJE1AZ3q.d.mts +82 -0
- package/dist/controller-BoNigQJr.d.mts +63 -0
- package/dist/controllers/index.d.mts +16 -0
- package/dist/controllers/index.mjs +110 -0
- package/dist/datalabel.utils-CkjGeB8S.d.mts +122 -0
- package/dist/decimation.utils-CcvJVhI4.d.mts +244 -0
- package/dist/geometry-DUUQJXVM.d.mts +60 -0
- package/dist/index-DseIZa1j.d.mts +167 -0
- package/dist/index.d.mts +88 -0
- package/dist/index.mjs +110 -0
- package/dist/orchestrator/index.d.mts +264 -0
- package/dist/orchestrator/index.mjs +33 -0
- package/dist/plugins/index.d.mts +18 -0
- package/dist/plugins/index.mjs +1 -0
- package/dist/property-animations-D433wXzz.d.mts +580 -0
- package/dist/property-store-NORUWFND.d.mts +17 -0
- package/dist/radial/index.d.mts +14 -0
- package/dist/radial/index.mjs +37 -0
- package/dist/renderers/axis/index.d.mts +39 -0
- package/dist/renderers/axis/index.mjs +8 -0
- package/dist/renderers/circular/index.d.mts +13 -0
- package/dist/renderers/circular/index.mjs +13 -0
- package/dist/renderers/index.d.mts +83 -0
- package/dist/renderers/index.mjs +75 -0
- package/dist/renderers/navigator/index.d.mts +103 -0
- package/dist/renderers/navigator/index.mjs +8 -0
- package/dist/resize.utils-D_2qm6rv.d.mts +142 -0
- package/dist/ring.utils-DXvrxMkU.d.mts +138 -0
- package/dist/scale-KFv30jqZ.d.mts +307 -0
- package/dist/scales-Drf8AIhL.d.mts +75 -0
- package/dist/series/bar/canvas/index.d.mts +8 -0
- package/dist/series/bar/canvas/index.mjs +10 -0
- package/dist/series/bar/controller/index.d.mts +105 -0
- package/dist/series/bar/controller/index.mjs +44 -0
- package/dist/series/bar/controller-canvas/index.d.mts +7 -0
- package/dist/series/bar/controller-canvas/index.mjs +49 -0
- package/dist/series/bar/controller-svg/index.d.mts +7 -0
- package/dist/series/bar/controller-svg/index.mjs +49 -0
- package/dist/series/bar/index.d.mts +60 -0
- package/dist/series/bar/index.mjs +13 -0
- package/dist/series/bar/svg/index.d.mts +8 -0
- package/dist/series/bar/svg/index.mjs +11 -0
- package/dist/series/candlestick/canvas/index.d.mts +8 -0
- package/dist/series/candlestick/canvas/index.mjs +8 -0
- package/dist/series/candlestick/controller/index.d.mts +123 -0
- package/dist/series/candlestick/controller/index.mjs +40 -0
- package/dist/series/candlestick/controller-canvas/index.d.mts +7 -0
- package/dist/series/candlestick/controller-canvas/index.mjs +45 -0
- package/dist/series/candlestick/controller-svg/index.d.mts +7 -0
- package/dist/series/candlestick/controller-svg/index.mjs +45 -0
- package/dist/series/candlestick/index.d.mts +11 -0
- package/dist/series/candlestick/index.mjs +10 -0
- package/dist/series/candlestick/svg/index.d.mts +8 -0
- package/dist/series/candlestick/svg/index.mjs +8 -0
- package/dist/series/heatmap/canvas/index.d.mts +16 -0
- package/dist/series/heatmap/canvas/index.mjs +9 -0
- package/dist/series/heatmap/controller/index.d.mts +110 -0
- package/dist/series/heatmap/controller/index.mjs +23 -0
- package/dist/series/heatmap/controller-canvas/index.d.mts +7 -0
- package/dist/series/heatmap/controller-canvas/index.mjs +28 -0
- package/dist/series/heatmap/controller-svg/index.d.mts +7 -0
- package/dist/series/heatmap/controller-svg/index.mjs +28 -0
- package/dist/series/heatmap/index.d.mts +34 -0
- package/dist/series/heatmap/index.mjs +13 -0
- package/dist/series/heatmap/svg/index.d.mts +15 -0
- package/dist/series/heatmap/svg/index.mjs +10 -0
- package/dist/series/line/canvas/index.d.mts +6 -0
- package/dist/series/line/canvas/index.mjs +9 -0
- package/dist/series/line/controller/index.d.mts +111 -0
- package/dist/series/line/controller/index.mjs +47 -0
- package/dist/series/line/controller-canvas/index.d.mts +7 -0
- package/dist/series/line/controller-canvas/index.mjs +54 -0
- package/dist/series/line/controller-svg/index.d.mts +7 -0
- package/dist/series/line/controller-svg/index.mjs +54 -0
- package/dist/series/line/index.d.mts +49 -0
- package/dist/series/line/index.mjs +13 -0
- package/dist/series/line/svg/index.d.mts +6 -0
- package/dist/series/line/svg/index.mjs +9 -0
- package/dist/series/pie/canvas/index.d.mts +8 -0
- package/dist/series/pie/canvas/index.mjs +10 -0
- package/dist/series/pie/controller/index.d.mts +174 -0
- package/dist/series/pie/controller/index.mjs +110 -0
- package/dist/series/pie/controller-canvas/index.d.mts +8 -0
- package/dist/series/pie/controller-canvas/index.mjs +119 -0
- package/dist/series/pie/controller-svg/index.d.mts +8 -0
- package/dist/series/pie/controller-svg/index.mjs +118 -0
- package/dist/series/pie/index.d.mts +59 -0
- package/dist/series/pie/index.mjs +15 -0
- package/dist/series/pie/svg/index.d.mts +6 -0
- package/dist/series/pie/svg/index.mjs +11 -0
- package/dist/series/polar/canvas/index.d.mts +6 -0
- package/dist/series/polar/canvas/index.mjs +7 -0
- package/dist/series/polar/controller/index.d.mts +102 -0
- package/dist/series/polar/controller/index.mjs +46 -0
- package/dist/series/polar/controller-canvas/index.d.mts +8 -0
- package/dist/series/polar/controller-canvas/index.mjs +52 -0
- package/dist/series/polar/controller-svg/index.d.mts +8 -0
- package/dist/series/polar/controller-svg/index.mjs +52 -0
- package/dist/series/polar/index.d.mts +25 -0
- package/dist/series/polar/index.mjs +16 -0
- package/dist/series/polar/svg/index.d.mts +10 -0
- package/dist/series/polar/svg/index.mjs +8 -0
- package/dist/series/radar/canvas/index.d.mts +6 -0
- package/dist/series/radar/canvas/index.mjs +8 -0
- package/dist/series/radar/controller/index.d.mts +121 -0
- package/dist/series/radar/controller/index.mjs +43 -0
- package/dist/series/radar/controller-canvas/index.d.mts +8 -0
- package/dist/series/radar/controller-canvas/index.mjs +51 -0
- package/dist/series/radar/controller-svg/index.d.mts +8 -0
- package/dist/series/radar/controller-svg/index.mjs +51 -0
- package/dist/series/radar/index.d.mts +40 -0
- package/dist/series/radar/index.mjs +13 -0
- package/dist/series/radar/svg/index.d.mts +12 -0
- package/dist/series/radar/svg/index.mjs +9 -0
- package/dist/series/scatter/canvas/index.d.mts +8 -0
- package/dist/series/scatter/canvas/index.mjs +11 -0
- package/dist/series/scatter/controller/index.d.mts +124 -0
- package/dist/series/scatter/controller/index.mjs +44 -0
- package/dist/series/scatter/controller-canvas/index.d.mts +7 -0
- package/dist/series/scatter/controller-canvas/index.mjs +51 -0
- package/dist/series/scatter/controller-svg/index.d.mts +7 -0
- package/dist/series/scatter/controller-svg/index.mjs +51 -0
- package/dist/series/scatter/index.d.mts +25 -0
- package/dist/series/scatter/index.mjs +14 -0
- package/dist/series/scatter/svg/index.d.mts +8 -0
- package/dist/series/scatter/svg/index.mjs +12 -0
- package/dist/series/treemap/canvas/index.d.mts +50 -0
- package/dist/series/treemap/canvas/index.mjs +10 -0
- package/dist/series/treemap/controller/index.d.mts +130 -0
- package/dist/series/treemap/controller/index.mjs +20 -0
- package/dist/series/treemap/controller-canvas/index.d.mts +7 -0
- package/dist/series/treemap/controller-canvas/index.mjs +25 -0
- package/dist/series/treemap/controller-svg/index.d.mts +7 -0
- package/dist/series/treemap/controller-svg/index.mjs +25 -0
- package/dist/series/treemap/index.d.mts +15 -0
- package/dist/series/treemap/index.mjs +12 -0
- package/dist/series/treemap/svg/index.d.mts +15 -0
- package/dist/series/treemap/svg/index.mjs +9 -0
- package/dist/slices-DtewiwJx.d.mts +72 -0
- package/dist/spatialIndex.utils-B_GJkotZ.d.mts +5 -0
- package/dist/squarify.utils-B9CQBpa1.d.mts +50 -0
- package/dist/stacking-CChuAcLN.d.mts +319 -0
- package/dist/streaming.utils-DH-g1gNP.d.mts +49 -0
- package/dist/sync/index.d.mts +130 -0
- package/dist/sync/index.mjs +5 -0
- package/dist/tooltip.renderer-D5wpSlBa.d.mts +210 -0
- package/dist/utils/color/index.d.mts +58 -0
- package/dist/utils/color/index.mjs +4 -0
- package/dist/utils/data/index.d.mts +180 -0
- package/dist/utils/data/index.mjs +7 -0
- package/dist/utils/export/index.d.mts +14 -0
- package/dist/utils/export/index.mjs +6 -0
- package/dist/utils/index.d.mts +49 -0
- package/dist/utils/index.mjs +29 -0
- package/dist/utils/interaction/index.d.mts +255 -0
- package/dist/utils/interaction/index.mjs +9 -0
- package/dist/utils/layout/index.d.mts +3 -0
- package/dist/utils/layout/index.mjs +10 -0
- package/dist/utils/math/index.d.mts +162 -0
- package/dist/utils/math/index.mjs +1 -0
- package/dist/utils/render/index.d.mts +19 -0
- package/dist/utils/render/index.mjs +3 -0
- package/dist/utils/specialized/index.d.mts +37 -0
- package/dist/utils/specialized/index.mjs +66 -0
- package/dist/utils/text/index.d.mts +39 -0
- package/dist/utils/text/index.mjs +8 -0
- package/dist/utils/theme/index.d.mts +295 -0
- package/dist/utils/theme/index.mjs +5 -0
- package/dist/utils/zoom/index.d.mts +90 -0
- package/dist/utils/zoom/index.mjs +3 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2026 PrimeTek
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# PrimeUI Chart Core
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export { A as AXIS_SETTLED_THRESHOLD, a as AXIS_SMOOTHING, b as AnimatedElement, c as AnimatedScene, d as AnimationRegistry, e as AxisTransitionState, B as BAR_ANIMATABLE_PROPS, C as CanvasCompositor, F as FrameSchedulerAPI, L as LINE_ANIMATABLE_PROPS, f as animatableBarToComputedBar, g as buildCandlestickFingerprint, h as buildHeatmapFingerprint, i as buildLineFingerprint, j as computeDrillOutOrigin, k as computeZoomTransform, l as createPolarEntranceLayout, m as createRadarEntranceLayout, n as detectLineUpdateKind, o as easeInBounce, p as easeInOutBounce, q as easeInOutCubic, r as easeInOutQuart, s as easeOutBack, t as easeOutBounce, u as easeOutCubic, v as easeOutElastic, w as easeOutExpo, x as easeOutQuad, y as easeOutQuart, z as easeOutQuint, D as easings, E as getEasing, G as getEasingNames, H as hasEasing, I as interpolateCartesianAxisLayout, J as interpolatePolarLayout, K as interpolateRadialGrid, M as lerp, N as lerpColor, O as lerpValues, P as linear, Q as normalizeAnimationsMap, R as registerEasing, S as resolveAnimatedProps, T as setFrameScheduler, U as setupPropertyAnimations } from '../property-animations-D433wXzz.mjs';
|
|
2
|
+
export { A as AnimationController, a as animate } from '../controller-BJE1AZ3q.mjs';
|
|
3
|
+
import { DomainLerpState, AxisLayoutInfo, BoxArea, LinearScale, GlobalFont, AxisTransitionHandle, DomainLerpFrame, BandScale, CategoryLerpState } from '@primeui/chart-types';
|
|
4
|
+
export { A as AnimatedPropertyStore } from '../property-store-NORUWFND.mjs';
|
|
5
|
+
export { L as LineGeometry, S as StreamingHint, d as detectStreamingUpdateKind, s as streamingPointsInterpolator } from '../streaming.utils-DH-g1gNP.mjs';
|
|
6
|
+
import '@primeui/chart-types/axes';
|
|
7
|
+
import '@primeui/chart-types/layout';
|
|
8
|
+
import '@primeui/chart-types/polar';
|
|
9
|
+
import '@primeui/chart-types/radar';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Initialize domain lerp state for a new animation pass.
|
|
13
|
+
*
|
|
14
|
+
* For each axis in targetDomains:
|
|
15
|
+
* - If an existing lerp state exists, use its current values as the start
|
|
16
|
+
* - Otherwise, start = target (first render, no animation needed)
|
|
17
|
+
*
|
|
18
|
+
* Stale axes (in existing state but not in targetDomains) are removed.
|
|
19
|
+
*
|
|
20
|
+
* @param existingLerp - Current lerp state (mutated in place)
|
|
21
|
+
* @param targetDomains - New target domains from layout computation
|
|
22
|
+
* @param options.expansionStart - When true, start domain = union(currentStart, target).
|
|
23
|
+
* Expansion is applied instantly (start ≥ target bounds so any new-extreme data stays
|
|
24
|
+
* inside the scale at progress=0); contraction still lerps smoothly. Prevents the
|
|
25
|
+
* "zoom bulge" where a new extreme value maps beyond the plot edge while the scale
|
|
26
|
+
* catches up. Applies uniformly to every cartesian chart type.
|
|
27
|
+
*
|
|
28
|
+
* Heuristic exception (Task 4 — toggle-on asymmetry fix): when the target domain
|
|
29
|
+
* strictly grows on BOTH ends (target.min < start.min AND target.max > start.max),
|
|
30
|
+
* we treat this as a likely dataset-visibility toggle-on. In that case `expansionStart`
|
|
31
|
+
* would collapse the animation entirely (union == target, so the axis snaps to its
|
|
32
|
+
* final state at t=0). We drop the union for that axis so the lerp animates from the
|
|
33
|
+
* OLD (smaller) domain outward to the new target. Single-end expansions (steady-state
|
|
34
|
+
* data growth) keep `expansionStart` semantics — no regression for the streaming case.
|
|
35
|
+
*/
|
|
36
|
+
declare function initDomainLerp(existingLerp: Map<string, DomainLerpState>, targetDomains: Map<string, [number, number]>, options?: {
|
|
37
|
+
expansionStart?: boolean;
|
|
38
|
+
}): void;
|
|
39
|
+
/**
|
|
40
|
+
* For each value-axis lerp state, diff the START vs TARGET tick set and feed the
|
|
41
|
+
* result to `axisTransitionState.setTickTargets`. The categorization is also
|
|
42
|
+
* stored on the lerp state so `advanceDomainLerp` can:
|
|
43
|
+
* - render exiting ticks (no longer in target layout) at their mapped position
|
|
44
|
+
* - apply per-tick opacity to ticks + grid lines via `applyTicks`
|
|
45
|
+
*
|
|
46
|
+
* Implementation notes:
|
|
47
|
+
* - The TARGET tick set is taken straight from `axisLayouts.get(...).layout.ticks`
|
|
48
|
+
* — that layout is computed from the new (target) scale by the layout pass.
|
|
49
|
+
* - The START tick set is recomputed by re-running `calculateAxisLayout` against
|
|
50
|
+
* a linear scale built from each lerp's `minStart/maxStart`. This is the only
|
|
51
|
+
* extra layout pass per animation init (paid once, not per frame).
|
|
52
|
+
* - Hidden / logarithmic axes are skipped — they don't lerp inside
|
|
53
|
+
* `advanceDomainLerp` either, so wiring fade for them would be dead code.
|
|
54
|
+
* - Ticks without a numeric `rawValue` are skipped — only linear value-axis
|
|
55
|
+
* ticks participate in this lerp. Category-axis fade is Task 6.
|
|
56
|
+
*/
|
|
57
|
+
declare function initDomainLerpTickFade(lerpStates: Map<string, DomainLerpState>, axisLayouts: Map<string, AxisLayoutInfo>, valueScaleRange: [number, number], cartesianArea: BoxArea, orientation: 'vertical' | 'horizontal', axisTransitionState: Pick<AxisTransitionHandle, 'setTickTargets' | 'setRotationTargets'>, globalFont?: GlobalFont, locale?: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Advance domain lerp by one frame.
|
|
60
|
+
*
|
|
61
|
+
* For each axis:
|
|
62
|
+
* - Skips hidden axes (no ticks to animate)
|
|
63
|
+
* - Skips logarithmic axes (linear interpolation is wrong for log scale)
|
|
64
|
+
* - Interpolates min/max between start and target at given progress
|
|
65
|
+
* - Creates a new linear scale from the interpolated domain
|
|
66
|
+
* - Recalculates axis layout (tick positions) for the new domain
|
|
67
|
+
*
|
|
68
|
+
* @param lerpStates - Mutable lerp state map (minCurrent/maxCurrent are updated)
|
|
69
|
+
* @param progress - Animation progress [0..1]
|
|
70
|
+
* @param axisLayouts - Current axis layouts from layout computation
|
|
71
|
+
* @param valueScaleRange - Scale output range [min, max] in pixels
|
|
72
|
+
* @param cartesianArea - Chart area bounds
|
|
73
|
+
* @param orientation - Chart orientation ('vertical' | 'horizontal')
|
|
74
|
+
* @param baseValueScales - Base (non-animated) value scales to clone
|
|
75
|
+
* @param baseValueDomains - Base (non-animated) value domains to clone
|
|
76
|
+
*/
|
|
77
|
+
declare function advanceDomainLerp(lerpStates: Map<string, DomainLerpState>, progress: number, axisLayouts: Map<string, AxisLayoutInfo>, valueScaleRange: [number, number], cartesianArea: BoxArea, orientation: 'vertical' | 'horizontal', baseValueScales: Map<string, LinearScale>, baseValueDomains: Map<string, [number, number]>, globalFont?: GlobalFont, locale?: string, axisTransitionState?: Pick<AxisTransitionHandle, 'applyTicks' | 'applyRotations' | 'hasTickEntry'>): DomainLerpFrame;
|
|
78
|
+
/**
|
|
79
|
+
* Snap all lerp states to their target values (no animation).
|
|
80
|
+
* Call this when animation is disabled or on the non-animated render path.
|
|
81
|
+
*/
|
|
82
|
+
declare function snapDomainLerp(lerpStates: Map<string, DomainLerpState>): void;
|
|
83
|
+
/**
|
|
84
|
+
* Initialize or update the time-domain lerp state.
|
|
85
|
+
* Uses the current interpolated value as start so mid-animation updates chain smoothly.
|
|
86
|
+
*
|
|
87
|
+
* @param options.expansionStart - When true, start = union(current, target). Expansion
|
|
88
|
+
* is applied instantly (wider bounds); contraction lerps smoothly. Prevents timestamps
|
|
89
|
+
* at the new domain's edges from mapping past the category range at progress=0 (the
|
|
90
|
+
* "right-edge overflow" bulge during streaming).
|
|
91
|
+
*/
|
|
92
|
+
declare function initTimeDomainLerp(existing: DomainLerpState | null, target: [number, number], options?: {
|
|
93
|
+
expansionStart?: boolean;
|
|
94
|
+
}): DomainLerpState;
|
|
95
|
+
/**
|
|
96
|
+
* Advance the time-domain lerp by one frame.
|
|
97
|
+
*
|
|
98
|
+
* Interpolates the time-axis min/max, rebuilds the time scale and band adapter,
|
|
99
|
+
* and recomputes the category-axis layout so ticks slide smoothly.
|
|
100
|
+
*
|
|
101
|
+
* @returns Animated categoryScale + updated axisLayouts with the new time-axis layout
|
|
102
|
+
*/
|
|
103
|
+
declare function advanceTimeDomainLerp(lerp: DomainLerpState, progress: number, axisLayouts: Map<string, AxisLayoutInfo>, cached: {
|
|
104
|
+
orientation: 'vertical' | 'horizontal';
|
|
105
|
+
cartesianArea: BoxArea;
|
|
106
|
+
timestamps: number[];
|
|
107
|
+
}): {
|
|
108
|
+
categoryScale: BandScale;
|
|
109
|
+
axisLayouts: Map<string, AxisLayoutInfo>;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Snap time-domain lerp to target (no animation).
|
|
113
|
+
*/
|
|
114
|
+
declare function snapTimeDomainLerp(lerp: DomainLerpState): void;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Snapshot the current category-axis tick positions so the next sort
|
|
118
|
+
* transition can animate from these positions to the new ones.
|
|
119
|
+
*
|
|
120
|
+
* Call this BEFORE updating layout data — pass the OLD axisLayouts.
|
|
121
|
+
*/
|
|
122
|
+
declare function initCategoryLerp(axisLayouts: Map<string, AxisLayoutInfo>, orientation: 'vertical' | 'horizontal'): CategoryLerpState;
|
|
123
|
+
/**
|
|
124
|
+
* Produce interpolated axis layouts for the given animation progress (0→1).
|
|
125
|
+
*
|
|
126
|
+
* Ticks, tick marks, and grid lines all slide from their previous positions
|
|
127
|
+
* (in `prevPositions`) toward the current positions in `axisLayouts`.
|
|
128
|
+
*/
|
|
129
|
+
declare function advanceCategoryLerp(axisLayouts: Map<string, AxisLayoutInfo>, prevPositions: CategoryLerpState, progress: number, orientation: 'vertical' | 'horizontal'): Map<string, AxisLayoutInfo>;
|
|
130
|
+
/**
|
|
131
|
+
* Instantly settle the category lerp (non-animated path or on complete).
|
|
132
|
+
* Clears the state so no further interpolation occurs.
|
|
133
|
+
*/
|
|
134
|
+
declare function snapCategoryLerp(state: CategoryLerpState): void;
|
|
135
|
+
|
|
136
|
+
export { advanceCategoryLerp, advanceDomainLerp, advanceTimeDomainLerp, initCategoryLerp, initDomainLerp, initDomainLerpTickFade, initTimeDomainLerp, snapCategoryLerp, snapDomainLerp, snapTimeDomainLerp };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { AXIS_SETTLED_THRESHOLD, AXIS_SMOOTHING, AnimatedPropertyStore, AnimationRegistry, AxisTransitionState, CanvasCompositor, advanceCategoryLerp, advanceDomainLerp, advanceTimeDomainLerp, initCategoryLerp, initDomainLerp, initDomainLerpTickFade, initTimeDomainLerp, snapCategoryLerp, snapDomainLerp, snapTimeDomainLerp } from '../chunk-KNDZP446.mjs';
|
|
2
|
+
export { animatableBarToComputedBar } from '../chunk-FRST55HY.mjs';
|
|
3
|
+
export { buildCandlestickFingerprint } from '../chunk-JO7VACY2.mjs';
|
|
4
|
+
export { buildHeatmapFingerprint } from '../chunk-SANZPAJ4.mjs';
|
|
5
|
+
export { computeDrillOutOrigin, computeZoomTransform } from '../chunk-AGU3NG6D.mjs';
|
|
6
|
+
import '../chunk-ZTL2FQEW.mjs';
|
|
7
|
+
export { AnimatedElement, AnimatedScene, BAR_ANIMATABLE_PROPS, LINE_ANIMATABLE_PROPS, normalizeAnimationsMap, resolveAnimatedProps, setupPropertyAnimations } from '../chunk-VN7CKCSE.mjs';
|
|
8
|
+
export { AnimationController, animate, easeInBounce, easeInOutBounce, easeInOutCubic, easeInOutQuart, easeOutBack, easeOutBounce, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easings, getEasing, getEasingNames, hasEasing, linear, registerEasing } from '../chunk-3WEMHXZI.mjs';
|
|
9
|
+
export { setFrameScheduler } from '../chunk-EDAKJLNA.mjs';
|
|
10
|
+
import '../chunk-R6Y3R7EW.mjs';
|
|
11
|
+
import '../chunk-XTVE4P3L.mjs';
|
|
12
|
+
import '../chunk-NKUYIWAP.mjs';
|
|
13
|
+
export { buildLineFingerprint, detectLineUpdateKind, detectStreamingUpdateKind, streamingPointsInterpolator } from '../chunk-XQQCGFYB.mjs';
|
|
14
|
+
export { createPolarEntranceLayout, createRadarEntranceLayout, interpolateCartesianAxisLayout, interpolatePolarLayout, interpolateRadialGrid, lerp, lerpColor, lerpValues } from '../chunk-WH3C3Y7P.mjs';
|
|
15
|
+
import '../chunk-QS76E3TD.mjs';
|
|
16
|
+
import '../chunk-O2X6FF45.mjs';
|
|
17
|
+
import '../chunk-SSLTFJ3U.mjs';
|
|
18
|
+
import '../chunk-RQ3CKQOX.mjs';
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { FieldAccessor, ItemContext, DashAccessor, ChartTheme, SvgNode, CustomMarkerEntry, MarkerRenderItem, BuildLegendItemsOptions, LegendItem, SyncDatasetInfo, SharedLegendMode, SharedLegendItem, LegendStyleConfig, BoxArea, LegendInteractionContext, LegendClickAction, LegendHoverTarget, ReferenceBandFeatureProps, AxisLayoutInfo, BandScale, ReferenceBandGeometry, ReferenceLineFeatureProps, ReferenceLineGeometry, FeatureType, FeatureConfig, RadialGridLayout, GlobalFont, AnnotationContextParams, AnnotationContext, AnnotationRender } from '@primeui/chart-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Field Accessor Utilities
|
|
5
|
+
*
|
|
6
|
+
* Provides functions to resolve a FieldAccessor from data items.
|
|
7
|
+
* Supports: field names, nested paths, functions, static values, and arrays.
|
|
8
|
+
*
|
|
9
|
+
* Per-item callbacks receive an {@link ItemContext} object — see common.types.ts.
|
|
10
|
+
* Array semantics (cycle vs clip) are chosen at the call site via {@link ResolveOptions}.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare function isAccessorFunction<T, R>(accessor: FieldAccessor<T, R>): accessor is (ctx: ItemContext<T>) => R | undefined;
|
|
14
|
+
declare function isAccessorArray<T, R>(accessor: FieldAccessor<T, R>): accessor is R[];
|
|
15
|
+
declare function isAccessorString<T, R>(accessor: FieldAccessor<T, R>): accessor is string;
|
|
16
|
+
/**
|
|
17
|
+
* Build a minimal {@link ItemContext} from a datum + index. For call sites that
|
|
18
|
+
* don't have full series context (combo-chart `seriesIndex`, resolved `value`,
|
|
19
|
+
* `category`, etc.) — pass `extras` to fill in what's available.
|
|
20
|
+
*/
|
|
21
|
+
declare function makeItemContext<T>(datum: T, index: number, extras?: Partial<Omit<ItemContext<T>, 'datum' | 'index'>>): ItemContext<T>;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve a nested path like "customer.address.city" from an object
|
|
24
|
+
*/
|
|
25
|
+
declare function resolveNestedPath<T extends object>(obj: T, path: string): unknown;
|
|
26
|
+
/**
|
|
27
|
+
* Check if a string looks like a nested path (contains dots but isn't a color)
|
|
28
|
+
*/
|
|
29
|
+
declare function isNestedPath(str: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Options for {@link resolveAccessor}.
|
|
32
|
+
*/
|
|
33
|
+
interface ResolveOptions<R> {
|
|
34
|
+
/**
|
|
35
|
+
* Array form behaviour:
|
|
36
|
+
* - `'cycle'` (default) — `arr[index % length]`, palette semantics
|
|
37
|
+
* - `'clip'` — return fallback when `index >= length`, highlight semantics
|
|
38
|
+
*/
|
|
39
|
+
arrayMode?: 'cycle' | 'clip';
|
|
40
|
+
/** Returned when the accessor resolves to undefined (callback returned undefined, array out-of-range, etc). */
|
|
41
|
+
fallback?: R;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolve a value from a FieldAccessor. Single resolver for every per-item
|
|
45
|
+
* prop in the chart library — array semantics chosen at call site.
|
|
46
|
+
*
|
|
47
|
+
* - function → invoked with `ctx`; `undefined` return uses fallback
|
|
48
|
+
* - array → cycle (default) or clip + fallback per `opts.arrayMode`
|
|
49
|
+
* - string → field name / nested path on `ctx.datum`, else treated as static value
|
|
50
|
+
* - scalar → returned as-is
|
|
51
|
+
*/
|
|
52
|
+
declare function resolveAccessor<T, R>(accessor: FieldAccessor<T, R> | undefined, ctx: ItemContext<T>, opts?: ResolveOptions<R>): R | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Resolve accessor for all items in a data array. Builds a minimal ItemContext
|
|
55
|
+
* per item — callers needing richer context (seriesIndex, value) should iterate
|
|
56
|
+
* themselves and call {@link resolveAccessor} with a fully-populated ctx.
|
|
57
|
+
*
|
|
58
|
+
* Returns `(R | undefined)[]`: per-item resolution can produce `undefined` when
|
|
59
|
+
* a function accessor returns nothing, a keyof T points to a missing field, or
|
|
60
|
+
* the accessor argument itself is undefined. Callers must handle the `undefined`
|
|
61
|
+
* case explicitly (e.g., `Number(v) || 0`, `String(v ?? '')`, or
|
|
62
|
+
* `.filter((v): v is R => v != null)`).
|
|
63
|
+
*/
|
|
64
|
+
declare function batchResolveAccessor<T, R>(accessor: FieldAccessor<T, R> | undefined, data: T[]): (R | undefined)[];
|
|
65
|
+
/**
|
|
66
|
+
* Assert that a resolved accessor value is defined. Use at the boundary of
|
|
67
|
+
* required-field paths (categoryField, valueField, xField, yField, etc.)
|
|
68
|
+
* where `undefined` indicates a programming error in the caller's data,
|
|
69
|
+
* not a legitimate gap. Throws with a precise locator on failure.
|
|
70
|
+
*/
|
|
71
|
+
declare function resolveRequired<R>(value: R | undefined, fieldName: string, rowIndex?: number): R;
|
|
72
|
+
/**
|
|
73
|
+
* Batch-resolve a required accessor over a data array, asserting that every
|
|
74
|
+
* row produced a value. Returns a plain `R[]` (no undefined) — callers can
|
|
75
|
+
* consume directly without per-item guards. For optional accessors that may
|
|
76
|
+
* legitimately return undefined, use {@link batchResolveAccessor} instead.
|
|
77
|
+
*/
|
|
78
|
+
declare function batchResolveRequired<T, R>(accessor: FieldAccessor<T, R> | undefined, data: T[], fieldName: string): R[];
|
|
79
|
+
/**
|
|
80
|
+
* Resolve a {@link DashAccessor} to a `number[]` dash pattern at a given item.
|
|
81
|
+
* Accepts scalar arrays, named pattern shortcuts, `keyof T`, and per-item
|
|
82
|
+
* callbacks. Named shortcuts are expanded to their numeric equivalents.
|
|
83
|
+
*
|
|
84
|
+
* Returns `undefined` when the accessor is missing or its callback returns
|
|
85
|
+
* undefined — callers can treat that as "no dash" (solid stroke).
|
|
86
|
+
*/
|
|
87
|
+
declare function resolveDash<T>(accessor: DashAccessor<T> | undefined, ctx: ItemContext<T>): number[] | undefined;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Resolve a default series color by index. Picks from `theme.series` looped via
|
|
91
|
+
* modulo. When a caller doesn't have a resolved theme in scope, omitting the
|
|
92
|
+
* argument falls back to `defaultLightTheme` — same hexes the wrapper would
|
|
93
|
+
* have produced via `resolveTheme(undefined)`.
|
|
94
|
+
*/
|
|
95
|
+
declare function getDefaultColor(index: number, theme?: Required<ChartTheme>): string;
|
|
96
|
+
/**
|
|
97
|
+
* Resolve color with default fallback
|
|
98
|
+
*/
|
|
99
|
+
declare function resolveColor<T>(accessor: FieldAccessor<T, string> | undefined, ctx: ItemContext<T>, theme?: Required<ChartTheme>): string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Sibling-key uniqueness contract
|
|
103
|
+
* --------------------------------
|
|
104
|
+
* Callers MUST ensure no two *sibling* descriptors resolve to the same key (see
|
|
105
|
+
* `keyOf`/`keyOfNode` below) unless their tags can never differ. When two same-key
|
|
106
|
+
* siblings exist and one flips tag between renders (e.g. `rect` <-> `path`), the
|
|
107
|
+
* FIFO tag-guard in `reconcileSvgChildren` can cross-match them — patching one
|
|
108
|
+
* element's attributes onto the other's live node.
|
|
109
|
+
*
|
|
110
|
+
* Renderers satisfy this three different ways, chosen by feature need (so the
|
|
111
|
+
* border-emission strategy is deliberately NOT uniform across renderers):
|
|
112
|
+
* 1. a separate `data-layer` GROUP for the secondary shape — line/radar borders;
|
|
113
|
+
* 2. the secondary style applied to the SAME element as a stroke — scatter,
|
|
114
|
+
* polar, heatmap, pie, candlestick (one keyed element per item, so a tag flip
|
|
115
|
+
* is the safe single-element replace case);
|
|
116
|
+
* 3. a distinct key when a true sibling is unavoidable — the bar fill keeps
|
|
117
|
+
* `data-index` while its border element keys by `id`, because `borderSkipped`
|
|
118
|
+
* and `borderAlign: 'inner'` require a separate partial/clipped path that a
|
|
119
|
+
* single stroked rect cannot express.
|
|
120
|
+
*/
|
|
121
|
+
/** Stable identity of a live element among its siblings, or null (→ tag-positional). */
|
|
122
|
+
declare function keyOf(el: Element): string | null;
|
|
123
|
+
/** Same identity, computed from a descriptor's attributes. */
|
|
124
|
+
declare function keyOfNode(node: SvgNode): string | null;
|
|
125
|
+
/** Reconcile a single matched (live, descriptor) pair in place. Caller guarantees same tag. */
|
|
126
|
+
declare function reconcileSvgElement(live: Element, next: SvgNode): void;
|
|
127
|
+
declare function reconcileSvgChildren(parent: Element, nextChildren: (SvgNode | string)[]): void;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Render custom markers on a canvas context.
|
|
131
|
+
* Framework-agnostic — used by both React and Vue.
|
|
132
|
+
*
|
|
133
|
+
* Each entry represents a dataset with a `renderMarker` callback.
|
|
134
|
+
* The callback receives a `PointRenderContext` with `ctx` set to the canvas context,
|
|
135
|
+
* pre-translated to the point position.
|
|
136
|
+
*/
|
|
137
|
+
declare function renderCustomMarkersCanvas(ctx: CanvasRenderingContext2D, entries: CustomMarkerEntry[], hover: {
|
|
138
|
+
datasetId: string | null;
|
|
139
|
+
index: number | null;
|
|
140
|
+
}, options?: {
|
|
141
|
+
createAnimate?: (dsId: string, pointIndex: number) => unknown;
|
|
142
|
+
onImageLoad?: () => void;
|
|
143
|
+
}): void;
|
|
144
|
+
/**
|
|
145
|
+
* Build marker render items from entries and hover state.
|
|
146
|
+
* Returns pure data — no DOM access. Framework adapters render these natively
|
|
147
|
+
* (React via JSX, Vue via h()/template).
|
|
148
|
+
*/
|
|
149
|
+
declare function buildMarkerRenderItems(entries: CustomMarkerEntry[], hover: {
|
|
150
|
+
datasetId: string | null;
|
|
151
|
+
index: number | null;
|
|
152
|
+
}): MarkerRenderItem[];
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Resolve the effective text direction by walking up from `target` to the
|
|
156
|
+
* nearest ancestor with a `dir` attribute. Returns `'ltr'` when no ancestor
|
|
157
|
+
* has `dir="rtl"` or when `target` is null.
|
|
158
|
+
*
|
|
159
|
+
* Pure DOM read — safe to call repeatedly. Caller invokes this whenever it
|
|
160
|
+
* wants a fresh value (e.g. after `observeDocumentDir` fires).
|
|
161
|
+
*/
|
|
162
|
+
declare function resolveDirFromElement(target: Element | null | undefined): 'ltr' | 'rtl';
|
|
163
|
+
/**
|
|
164
|
+
* Watch `<html dir>` mutations and run `onChange` whenever the attribute is
|
|
165
|
+
* updated. Returns a stop function that disconnects the observer.
|
|
166
|
+
*
|
|
167
|
+
* SSR-safe: when `document` or `MutationObserver` are unavailable, returns a
|
|
168
|
+
* no-op stop function and never observes anything.
|
|
169
|
+
*
|
|
170
|
+
* Does NOT call `onChange` synchronously — callers should resolve the initial
|
|
171
|
+
* value themselves before calling this.
|
|
172
|
+
*/
|
|
173
|
+
declare function observeDocumentDir(onChange: () => void): () => void;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Build legend items from dataset registrations.
|
|
177
|
+
* Pure function — no framework dependency.
|
|
178
|
+
*
|
|
179
|
+
* Cartesian/Radar/Polar charts get one legend item per dataset.
|
|
180
|
+
* Radial charts (pie/donut) get one legend item per data point.
|
|
181
|
+
*/
|
|
182
|
+
declare function buildLegendItems(options: BuildLegendItemsOptions): LegendItem[];
|
|
183
|
+
/**
|
|
184
|
+
* Build deduplicated rows for a multi-chart shared legend.
|
|
185
|
+
*
|
|
186
|
+
* Dedup strategy is **by label** (not by datasetId) — synced charts that share
|
|
187
|
+
* a series name (e.g. KPI sparklines + a detail chart, all rendering "Revenue")
|
|
188
|
+
* collapse into a single legend entry. Items inherit the first matching entry's
|
|
189
|
+
* color and order.
|
|
190
|
+
*
|
|
191
|
+
* Final order follows each label's first-seen `order` value across the
|
|
192
|
+
* flattened entry list.
|
|
193
|
+
*/
|
|
194
|
+
declare function buildSharedLegendItems(entries: SyncDatasetInfo[], mode: SharedLegendMode, visibilityMap: Map<string, boolean>): SharedLegendItem[];
|
|
195
|
+
/**
|
|
196
|
+
* Compute CSS position/layout styles for the legend container.
|
|
197
|
+
* Returns a plain object compatible with any framework's style binding.
|
|
198
|
+
*/
|
|
199
|
+
declare function computeLegendStyle(config: LegendStyleConfig, legendArea: BoxArea): Record<string, string | number>;
|
|
200
|
+
/**
|
|
201
|
+
* Pure reducer for legend item clicks.
|
|
202
|
+
*
|
|
203
|
+
* The user-supplied `onClick` callback short-circuits this — wrappers should
|
|
204
|
+
* invoke the callback first and only fall through to this reducer when no
|
|
205
|
+
* callback is set.
|
|
206
|
+
*
|
|
207
|
+
* Behavior:
|
|
208
|
+
* - Cartesian / rect / radar / polar: toggle entire dataset visibility.
|
|
209
|
+
* - Radial (pie/donut) `dataset` item: collapse-or-expand all data points (if
|
|
210
|
+
* any are visible, hide them all; otherwise show them all).
|
|
211
|
+
* - Radial `item`: toggle that single data point.
|
|
212
|
+
*/
|
|
213
|
+
declare function resolveLegendClickAction(item: LegendItem, ctx: LegendInteractionContext): LegendClickAction;
|
|
214
|
+
/**
|
|
215
|
+
* Resolve a legend hover event to the target the wrapper should pass to
|
|
216
|
+
* `setHover(datasetId, index)`. `null` means clear hover entirely.
|
|
217
|
+
*
|
|
218
|
+
* - Cartesian/radar/polar dataset hover sets `index: null` to highlight the whole
|
|
219
|
+
* series (and dim the rest) — consistent across all per-series legends.
|
|
220
|
+
* - Radial item hover (pie/donut) sets the specific point.
|
|
221
|
+
* - Any other dataset legend (e.g. stacked-pie headers) and null/empty input clear hover.
|
|
222
|
+
*/
|
|
223
|
+
declare function resolveLegendHoverTarget(item: LegendItem | null, ctx: {
|
|
224
|
+
isCartesian: boolean;
|
|
225
|
+
hasRadarDatasets: boolean;
|
|
226
|
+
hasPolarDatasets: boolean;
|
|
227
|
+
}): LegendHoverTarget | null;
|
|
228
|
+
|
|
229
|
+
declare class ItemCollector<T extends object> {
|
|
230
|
+
private readonly items;
|
|
231
|
+
private counter;
|
|
232
|
+
registerItem(index: number, props: T): void;
|
|
233
|
+
unregisterItem(index: number): void;
|
|
234
|
+
getNextIndex(): number;
|
|
235
|
+
getItems(): T[];
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Compute plot line geometries from feature props.
|
|
240
|
+
*/
|
|
241
|
+
declare function computeReferenceLines(referenceLines: ReferenceLineFeatureProps[], axisLayouts: Map<string, AxisLayoutInfo>, cartesianArea: BoxArea, categoryScale: BandScale | null, orientation: 'horizontal' | 'vertical'): ReferenceLineGeometry[];
|
|
242
|
+
/**
|
|
243
|
+
* Compute plot band geometries from feature props.
|
|
244
|
+
*/
|
|
245
|
+
declare function computeReferenceBands(referenceBands: ReferenceBandFeatureProps[], axisLayouts: Map<string, AxisLayoutInfo>, cartesianArea: BoxArea, categoryScale: BandScale | null, orientation: 'horizontal' | 'vertical'): ReferenceBandGeometry[];
|
|
246
|
+
|
|
247
|
+
declare function renderReferenceBandsCanvas(ctx: CanvasRenderingContext2D, bands: ReferenceBandGeometry[], globalFont: GlobalFont | undefined, theme: Required<ChartTheme>): void;
|
|
248
|
+
declare function renderReferenceLinesCanvas(ctx: CanvasRenderingContext2D, lines: ReferenceLineGeometry[], globalFont: GlobalFont | undefined, theme: Required<ChartTheme>): void;
|
|
249
|
+
/**
|
|
250
|
+
* Collect reference-line and reference-band feature props from a chart's feature map.
|
|
251
|
+
* Features are keyed `referenceLine:<id>` / `referenceBand:<id>` at registration.
|
|
252
|
+
*/
|
|
253
|
+
declare function extractReferenceFeatures(features: ReadonlyMap<FeatureType, FeatureConfig>): {
|
|
254
|
+
referenceLines: ReferenceLineFeatureProps[];
|
|
255
|
+
referenceBands: ReferenceBandFeatureProps[];
|
|
256
|
+
};
|
|
257
|
+
/** Merge extracted reference features into a radial grid layout (undefined when empty). */
|
|
258
|
+
declare function withReferenceFeatures(layout: RadialGridLayout, features: ReadonlyMap<FeatureType, FeatureConfig>): RadialGridLayout;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Shared style constants for chart overlay components (legend, tooltip).
|
|
262
|
+
* Framework adapters import these instead of duplicating the values.
|
|
263
|
+
*/
|
|
264
|
+
/** Base styles for legend items (static properties only) */
|
|
265
|
+
declare const LEGEND_ITEM_BASE_STYLE: Record<string, string | number>;
|
|
266
|
+
/** Styles for legend color swatch */
|
|
267
|
+
declare const LEGEND_SWATCH_STYLE: Record<string, string | number>;
|
|
268
|
+
/** Base styles for tooltip positioning (static properties only) */
|
|
269
|
+
declare const TOOLTIP_BASE_STYLE: Record<string, string | number>;
|
|
270
|
+
/**
|
|
271
|
+
* Default tooltip layout (stacks content vertically). Visual chrome
|
|
272
|
+
* (background, blur, border, radius, padding, shadow, color) lives in the
|
|
273
|
+
* `.p-chart-tooltip` CSS rule so it's overridable via CSS or the theme tokens.
|
|
274
|
+
*/
|
|
275
|
+
declare const TOOLTIP_DEFAULT_STYLE: Record<string, string | number>;
|
|
276
|
+
/** Tooltip color indicator styles (retained for backward-compat; default renderers use the `.p-chart-tooltip__swatch` class). */
|
|
277
|
+
declare const TOOLTIP_COLOR_INDICATOR_STYLE: Record<string, string | number>;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Build an AnnotationContext from ChartRenderer-level inputs.
|
|
281
|
+
* Returns a context without `ctx` — the caller adds it for canvas mode.
|
|
282
|
+
*/
|
|
283
|
+
declare function buildAnnotationContext(params: AnnotationContextParams): Omit<AnnotationContext, 'ctx'>;
|
|
284
|
+
/**
|
|
285
|
+
* Render all annotations to a canvas context.
|
|
286
|
+
* Each annotation is wrapped in save/restore with textColor as default fillStyle.
|
|
287
|
+
*/
|
|
288
|
+
declare function renderAnnotationsCanvas(ctx: CanvasRenderingContext2D, annotations: Map<string, AnnotationRender>, baseContext: Omit<AnnotationContext, 'ctx'>): void;
|
|
289
|
+
|
|
290
|
+
export { resolveRequired as A, withReferenceFeatures as B, getDefaultColor as C, isAccessorArray as D, isAccessorFunction as E, isAccessorString as F, isNestedPath as G, renderReferenceBandsCanvas as H, ItemCollector as I, renderReferenceLinesCanvas as J, resolveColor as K, LEGEND_ITEM_BASE_STYLE as L, resolveNestedPath as M, TOOLTIP_BASE_STYLE as T, LEGEND_SWATCH_STYLE as a, TOOLTIP_COLOR_INDICATOR_STYLE as b, TOOLTIP_DEFAULT_STYLE as c, batchResolveAccessor as d, batchResolveRequired as e, buildAnnotationContext as f, buildLegendItems as g, buildMarkerRenderItems as h, buildSharedLegendItems as i, computeLegendStyle as j, computeReferenceBands as k, computeReferenceLines as l, extractReferenceFeatures as m, keyOf as n, keyOfNode as o, makeItemContext as p, observeDocumentDir as q, reconcileSvgChildren as r, reconcileSvgElement as s, renderAnnotationsCanvas as t, renderCustomMarkersCanvas as u, resolveAccessor as v, resolveDash as w, resolveDirFromElement as x, resolveLegendClickAction as y, resolveLegendHoverTarget as z };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { BorderRadius, ResolvedArcBorderRadius, ResolvedBorderRadius } from '@primeui/chart-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resolve border radius configuration to individual corner values.
|
|
5
|
+
* Handles: undefined, number (uniform), or per-corner object.
|
|
6
|
+
*
|
|
7
|
+
* @param borderRadius - Border radius prop (number | BorderRadiusConfig | undefined)
|
|
8
|
+
* @returns Resolved values for each corner
|
|
9
|
+
*/
|
|
10
|
+
declare function resolveBorderRadius(borderRadius: BorderRadius | undefined): ResolvedBorderRadius;
|
|
11
|
+
/**
|
|
12
|
+
* Check if any border radius is non-zero.
|
|
13
|
+
*/
|
|
14
|
+
declare function hasBorderRadius(radius: ResolvedBorderRadius): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Check if border radius is uniform (all corners same value).
|
|
17
|
+
*/
|
|
18
|
+
declare function isUniformBorderRadius(radius: ResolvedBorderRadius): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Clamp border radius values to fit within rectangular dimensions.
|
|
21
|
+
* Used for bar charts where corners can't exceed half width/height.
|
|
22
|
+
*
|
|
23
|
+
* @param radius - Resolved border radius values
|
|
24
|
+
* @param width - Rectangle width
|
|
25
|
+
* @param height - Rectangle height
|
|
26
|
+
* @returns Clamped border radius values
|
|
27
|
+
*/
|
|
28
|
+
declare function clampRectBorderRadius(radius: ResolvedBorderRadius, width: number, height: number): ResolvedBorderRadius;
|
|
29
|
+
/**
|
|
30
|
+
* Resolve border radius configuration to arc corner values.
|
|
31
|
+
* Maps standard CSS names to arc-semantic names:
|
|
32
|
+
* - topLeft → outerStart (where outer arc begins)
|
|
33
|
+
* - topRight → outerEnd (where outer arc ends)
|
|
34
|
+
* - bottomLeft → innerStart (where inner arc begins)
|
|
35
|
+
* - bottomRight → innerEnd (where inner arc ends)
|
|
36
|
+
*/
|
|
37
|
+
declare function resolveArcBorderRadius(borderRadius: BorderRadius | undefined): ResolvedArcBorderRadius;
|
|
38
|
+
/**
|
|
39
|
+
* Check if any arc border radius is non-zero.
|
|
40
|
+
*/
|
|
41
|
+
declare function hasArcBorderRadius(radius: ResolvedArcBorderRadius): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Parse and clamp arc border radius values based on arc geometry.
|
|
44
|
+
* Ensures corner radii don't exceed available space within the arc.
|
|
45
|
+
*
|
|
46
|
+
* @param borderRadius - Border radius prop
|
|
47
|
+
* @param innerRadius - Inner radius of arc (0 for pie, >0 for donut)
|
|
48
|
+
* @param outerRadius - Outer radius of arc
|
|
49
|
+
* @param angleDelta - Angle span in radians
|
|
50
|
+
* @returns Clamped border radius values
|
|
51
|
+
*/
|
|
52
|
+
declare function clampArcBorderRadius(borderRadius: BorderRadius | undefined, innerRadius: number, outerRadius: number, angleDelta: number): ResolvedArcBorderRadius;
|
|
53
|
+
|
|
54
|
+
export { clampRectBorderRadius as a, hasBorderRadius as b, clampArcBorderRadius as c, resolveBorderRadius as d, hasArcBorderRadius as h, isUniformBorderRadius as i, resolveArcBorderRadius as r };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { RadialFrameContext, HoverConfig, ChartTheme, SvgNode, SvgSliceRefs, SliceRenderInfo, BoxArea, DataLabelConfig, FieldAccessor } from '@primeui/chart-types';
|
|
2
|
+
|
|
3
|
+
/** Apply brightness adjustment to SVG gradient stops */
|
|
4
|
+
declare function applyGradientBrightness(pathEl: SVGPathElement, brightness: number): void;
|
|
5
|
+
/** Restore original colors on SVG gradient stops */
|
|
6
|
+
declare function restoreGradientBrightness(pathEl: SVGPathElement): void;
|
|
7
|
+
/** Imperatively update SVG slice elements each animation frame */
|
|
8
|
+
declare function updateSvgSlices(frame: RadialFrameContext, refs: SvgSliceRefs, hoverConfig: HoverConfig | undefined, theme: Required<ChartTheme>, fontFamily?: string): void;
|
|
9
|
+
/** Per-frame custom-render content pass (sibling `customEl` transform/opacity/text). */
|
|
10
|
+
declare function updatePieCustomContent(frame: RadialFrameContext, refs: Pick<SvgSliceRefs, 'customContent' | 'renderFns'>, theme: Required<ChartTheme>, fontFamily?: string): void;
|
|
11
|
+
/**
|
|
12
|
+
* Build the per-slice SVG descriptors for one pie/donut dataset, from the scene
|
|
13
|
+
* state. Declarative counterpart to `updateSvgSlices`. The returned nodes are the
|
|
14
|
+
* children of the `[data-dataset]` group (a `<defs>` first when gradients/clips
|
|
15
|
+
* exist, then one keyed `<g data-slice-index data-index>` per slice).
|
|
16
|
+
*
|
|
17
|
+
* @param frame - Per-frame radial context (slices, center, ring radii, hover state).
|
|
18
|
+
* @param hoverConfig - Resolved Chart.Hover config (drives brightness / dim / overrides).
|
|
19
|
+
* @param theme - Resolved chart theme (series palette + hover defaults).
|
|
20
|
+
* @param chartId - Chart id used to build stable gradient/clip def IDs.
|
|
21
|
+
* @param datasetIndex - The dataset (ring) whose slices to emit. Slices for other
|
|
22
|
+
* datasets in `frame.slices` are skipped (reconcile runs per-dataset-group).
|
|
23
|
+
*/
|
|
24
|
+
declare function buildPieSvgChildren(frame: RadialFrameContext, hoverConfig: HoverConfig | undefined, theme: Required<ChartTheme>, chartId: string, datasetIndex: number): SvgNode[];
|
|
25
|
+
|
|
26
|
+
/** Render data labels to canvas for pie/donut charts */
|
|
27
|
+
declare function renderCanvasDataLabels(ctx: CanvasRenderingContext2D, frame: RadialFrameContext, viewportBounds: BoxArea, labelConfig: DataLabelConfig, textColor: string, datasetPropsMap: Map<number, {
|
|
28
|
+
label?: FieldAccessor<unknown, string>;
|
|
29
|
+
data?: unknown[];
|
|
30
|
+
}>, hoverConfig: HoverConfig | undefined, theme: Required<ChartTheme>, onImageLoad?: () => void): void;
|
|
31
|
+
/** Render custom slice content to canvas */
|
|
32
|
+
declare function renderCanvasCustomContent(ctx: CanvasRenderingContext2D, frame: RadialFrameContext, canvasRenderFns: Map<string, SliceRenderInfo>, onImageLoad: () => void, theme: Required<ChartTheme>, fontFamily?: string): void;
|
|
33
|
+
|
|
34
|
+
export { renderCanvasDataLabels as a, buildPieSvgChildren as b, updateSvgSlices as c, applyGradientBrightness as d, restoreGradientBrightness as e, renderCanvasCustomContent as r, updatePieCustomContent as u };
|