@primeui/vue-chart 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/Chart.parts.d.ts +39 -0
- package/dist/Chart.vue.d.ts +27 -0
- package/dist/ChartCanvas.mjs +14 -0
- package/dist/ChartCanvas.render.spec.d.ts +1 -0
- package/dist/ChartCanvas.vue.d.ts +23 -0
- package/dist/ChartStacked.spec.d.ts +1 -0
- package/dist/ChartSvg.axes.spec.d.ts +1 -0
- package/dist/ChartSvg.context.spec.d.ts +1 -0
- package/dist/ChartSvg.customizations.spec.d.ts +1 -0
- package/dist/ChartSvg.features.spec.d.ts +1 -0
- package/dist/ChartSvg.legend.spec.d.ts +1 -0
- package/dist/ChartSvg.mjs +14 -0
- package/dist/ChartSvg.registration.spec.d.ts +1 -0
- package/dist/ChartSvg.render.spec.d.ts +1 -0
- package/dist/ChartSvg.vue.d.ts +23 -0
- package/dist/_test/fixtures.d.ts +34 -0
- package/dist/bundle-discipline.spec.d.ts +1 -0
- package/dist/chunk-2D3PWFR2.mjs +214 -0
- package/dist/chunk-32XIRBZ7.mjs +87 -0
- package/dist/chunk-372K2BMN.mjs +1476 -0
- package/dist/chunk-42J32DPD.mjs +70 -0
- package/dist/chunk-44BAFHPK.mjs +51 -0
- package/dist/chunk-4CRHCZV3.mjs +142 -0
- package/dist/chunk-4NJ2PSHV.mjs +230 -0
- package/dist/chunk-4THCGGER.mjs +53 -0
- package/dist/chunk-4UVPCLJ7.mjs +70 -0
- package/dist/chunk-54DLUFIA.mjs +96 -0
- package/dist/chunk-56NMBNNX.mjs +52 -0
- package/dist/chunk-5DWO3G33.mjs +276 -0
- package/dist/chunk-5FTUGKPC.mjs +167 -0
- package/dist/chunk-5SRBQVU5.mjs +6 -0
- package/dist/chunk-62NGBLQ7.mjs +28 -0
- package/dist/chunk-644ROAHU.mjs +362 -0
- package/dist/chunk-6S4JMPKC.mjs +55 -0
- package/dist/chunk-72KINEJ6.mjs +52 -0
- package/dist/chunk-7P6ASYW6.mjs +7 -0
- package/dist/chunk-AAX7FOW3.mjs +210 -0
- package/dist/chunk-AUI5R4DA.mjs +84 -0
- package/dist/chunk-CDXF6ZTL.mjs +50 -0
- package/dist/chunk-CQHNYT2V.mjs +1692 -0
- package/dist/chunk-DLUFOM5K.mjs +218 -0
- package/dist/chunk-DOOXGOOB.mjs +123 -0
- package/dist/chunk-DYVFVVTO.mjs +97 -0
- package/dist/chunk-E2U4W5FW.mjs +288 -0
- package/dist/chunk-E4ROAOPT.mjs +291 -0
- package/dist/chunk-FFBK7Q3W.mjs +91 -0
- package/dist/chunk-FQTWLAVA.mjs +23 -0
- package/dist/chunk-FZ3PZ66C.mjs +12 -0
- package/dist/chunk-GA4VV5V4.mjs +21 -0
- package/dist/chunk-GFC24374.mjs +244 -0
- package/dist/chunk-GX2MK6VT.mjs +255 -0
- package/dist/chunk-HANSF33Z.mjs +169 -0
- package/dist/chunk-HTZVV6VV.mjs +550 -0
- package/dist/chunk-J2P5JBHC.mjs +26 -0
- package/dist/chunk-J43KLCZF.mjs +10 -0
- package/dist/chunk-JKK3D33U.mjs +64 -0
- package/dist/chunk-K326BBF7.mjs +276 -0
- package/dist/chunk-KOWFD2AE.mjs +72 -0
- package/dist/chunk-LD57I4SY.mjs +5 -0
- package/dist/chunk-MDA22SIZ.mjs +29 -0
- package/dist/chunk-NLXOJSKK.mjs +727 -0
- package/dist/chunk-O6L3PNFC.mjs +49 -0
- package/dist/chunk-PJVOZSPF.mjs +55 -0
- package/dist/chunk-PQV55JYI.mjs +38 -0
- package/dist/chunk-PSSXPTLQ.mjs +210 -0
- package/dist/chunk-RQURY2H3.mjs +40 -0
- package/dist/chunk-RRHYGSK6.mjs +29 -0
- package/dist/chunk-RSAZ7V5Z.mjs +42 -0
- package/dist/chunk-RSTIA3KM.mjs +41 -0
- package/dist/chunk-TEOO4OLV.mjs +6 -0
- package/dist/chunk-TIV2FI4S.mjs +53 -0
- package/dist/chunk-UO27BCRL.mjs +86 -0
- package/dist/chunk-VWABO23U.mjs +143 -0
- package/dist/chunk-W5M3BR6N.mjs +26 -0
- package/dist/chunk-WA735Y26.mjs +101 -0
- package/dist/chunk-WKSQR6L5.mjs +247 -0
- package/dist/chunk-WYV2MHP6.mjs +34 -0
- package/dist/chunk-XBDNMPF7.mjs +87 -0
- package/dist/chunk-YGHWUR7K.mjs +45 -0
- package/dist/chunk-YRKAI2R2.mjs +151 -0
- package/dist/chunk-ZHFL3RYO.mjs +228 -0
- package/dist/chunk-ZNINPVG7.mjs +30 -0
- package/dist/chunk-ZRCOVQQM.mjs +47 -0
- package/dist/components/charts/ChartBar.mjs +13 -0
- package/dist/components/charts/ChartBar.vue.d.ts +11 -0
- package/dist/components/charts/ChartCandlestick.mjs +11 -0
- package/dist/components/charts/ChartCandlestick.vue.d.ts +11 -0
- package/dist/components/charts/ChartHeatmap.mjs +11 -0
- package/dist/components/charts/ChartHeatmap.vue.d.ts +11 -0
- package/dist/components/charts/ChartLine.mjs +11 -0
- package/dist/components/charts/ChartLine.vue.d.ts +11 -0
- package/dist/components/charts/ChartPie.mjs +11 -0
- package/dist/components/charts/ChartPie.vue.d.ts +15 -0
- package/dist/components/charts/ChartPolar.mjs +11 -0
- package/dist/components/charts/ChartPolar.vue.d.ts +11 -0
- package/dist/components/charts/ChartRadar.mjs +11 -0
- package/dist/components/charts/ChartRadar.vue.d.ts +11 -0
- package/dist/components/charts/ChartScatter.mjs +11 -0
- package/dist/components/charts/ChartScatter.vue.d.ts +11 -0
- package/dist/components/charts/ChartTreemap.mjs +10 -0
- package/dist/components/charts/ChartTreemap.vue.d.ts +15 -0
- package/dist/components/charts/index.d.ts +2 -0
- package/dist/components/containers/ChartDecimation.mjs +6 -0
- package/dist/components/containers/ChartDecimation.vue.d.ts +29 -0
- package/dist/components/containers/ChartGroup.mjs +4 -0
- package/dist/components/containers/ChartGroup.vue.d.ts +13 -0
- package/dist/components/containers/ChartOverlap.mjs +5 -0
- package/dist/components/containers/ChartOverlap.vue.d.ts +13 -0
- package/dist/components/containers/ChartRange.mjs +6 -0
- package/dist/components/containers/ChartRange.vue.d.ts +13 -0
- package/dist/components/containers/ChartStacked.mjs +6 -0
- package/dist/components/containers/ChartStacked.vue.d.ts +21 -0
- package/dist/components/containers/ChartWaterfall.mjs +5 -0
- package/dist/components/containers/ChartWaterfall.vue.d.ts +17 -0
- package/dist/components/containers/keys.d.ts +5 -0
- package/dist/components/customizations/ChartAccessibility.mjs +9 -0
- package/dist/components/customizations/ChartAccessibility.vue.d.ts +28 -0
- package/dist/components/customizations/ChartAnnotation.mjs +5 -0
- package/dist/components/customizations/ChartAnnotation.vue.d.ts +8 -0
- package/dist/components/customizations/ChartAxisCategory.mjs +3 -0
- package/dist/components/customizations/ChartAxisCategory.vue.d.ts +4 -0
- package/dist/components/customizations/ChartAxisGroup.mjs +3 -0
- package/dist/components/customizations/ChartAxisGroup.vue.d.ts +14 -0
- package/dist/components/customizations/ChartBreadcrumb.mjs +6 -0
- package/dist/components/customizations/ChartBreadcrumb.vue.d.ts +15 -0
- package/dist/components/customizations/ChartCaption.mjs +9 -0
- package/dist/components/customizations/ChartCaption.vue.d.ts +4 -0
- package/dist/components/customizations/ChartColorLegend.mjs +9 -0
- package/dist/components/customizations/ChartColorLegend.vue.d.ts +47 -0
- package/dist/components/customizations/ChartDataLabels.mjs +9 -0
- package/dist/components/customizations/ChartDataLabels.vue.d.ts +53 -0
- package/dist/components/customizations/ChartExportMenu.mjs +9 -0
- package/dist/components/customizations/ChartExportMenu.vue.d.ts +29 -0
- package/dist/components/customizations/ChartHover.mjs +9 -0
- package/dist/components/customizations/ChartHover.vue.d.ts +4 -0
- package/dist/components/customizations/ChartLegend.mjs +9 -0
- package/dist/components/customizations/ChartLegend.vue.d.ts +7 -0
- package/dist/components/customizations/ChartNavigator.mjs +10 -0
- package/dist/components/customizations/ChartNavigator.vue.d.ts +4 -0
- package/dist/components/customizations/ChartReferenceBand.mjs +5 -0
- package/dist/components/customizations/ChartReferenceBand.vue.d.ts +4 -0
- package/dist/components/customizations/ChartReferenceLine.mjs +5 -0
- package/dist/components/customizations/ChartReferenceLine.vue.d.ts +4 -0
- package/dist/components/customizations/ChartResponsive.mjs +9 -0
- package/dist/components/customizations/ChartResponsive.vue.d.ts +12 -0
- package/dist/components/customizations/ChartTitle.mjs +9 -0
- package/dist/components/customizations/ChartTitle.vue.d.ts +4 -0
- package/dist/components/customizations/ChartTooltip.mjs +9 -0
- package/dist/components/customizations/ChartTooltip.vue.d.ts +6 -0
- package/dist/components/customizations/ChartXAxis.mjs +10 -0
- package/dist/components/customizations/ChartXAxis.vue.d.ts +24 -0
- package/dist/components/customizations/ChartYAxis.mjs +10 -0
- package/dist/components/customizations/ChartYAxis.vue.d.ts +23 -0
- package/dist/components/customizations/ChartZoom.mjs +9 -0
- package/dist/components/customizations/ChartZoom.vue.d.ts +4 -0
- package/dist/components/customizations/axisGroupKeys.d.ts +8 -0
- package/dist/components/customizations/index.d.ts +20 -0
- package/dist/components/items/ChartItem.mjs +3 -0
- package/dist/components/items/ChartItem.vue.d.ts +4 -0
- package/dist/components/items/ChartTreemapGroup.mjs +5 -0
- package/dist/components/items/ChartTreemapGroup.vue.d.ts +11 -0
- package/dist/components/items/index.d.ts +1 -0
- package/dist/components/renderers/CartesianRenderer.mjs +9 -0
- package/dist/components/renderers/CartesianRenderer.vue.d.ts +66 -0
- package/dist/components/renderers/ColorLegendRenderer.mjs +2 -0
- package/dist/components/renderers/ColorLegendRenderer.vue.d.ts +15 -0
- package/dist/components/renderers/LegendRenderer.mjs +3 -0
- package/dist/components/renderers/LegendRenderer.vue.d.ts +20 -0
- package/dist/components/renderers/NavigatorRenderer.mjs +5 -0
- package/dist/components/renderers/NavigatorRenderer.vue.d.ts +16 -0
- package/dist/components/renderers/RadialRenderer.mjs +9 -0
- package/dist/components/renderers/RadialRenderer.vue.d.ts +39 -0
- package/dist/components/renderers/RectRenderer.mjs +9 -0
- package/dist/components/renderers/RectRenderer.vue.d.ts +32 -0
- package/dist/components/renderers/TooltipRenderer.mjs +4 -0
- package/dist/components/renderers/TooltipRenderer.vue.d.ts +11 -0
- package/dist/components/renderers/layers/BarLayerCanvas.mjs +10 -0
- package/dist/components/renderers/layers/BarLayerCanvas.vue.d.ts +3 -0
- package/dist/components/renderers/layers/BarLayerSvg.mjs +10 -0
- package/dist/components/renderers/layers/BarLayerSvg.vue.d.ts +3 -0
- package/dist/components/renderers/layers/CandlestickLayer.mjs +9 -0
- package/dist/components/renderers/layers/CandlestickLayer.vue.d.ts +3 -0
- package/dist/components/renderers/layers/HeatmapLayer.mjs +9 -0
- package/dist/components/renderers/layers/HeatmapLayer.vue.d.ts +3 -0
- package/dist/components/renderers/layers/LineLayer.mjs +9 -0
- package/dist/components/renderers/layers/LineLayer.vue.d.ts +3 -0
- package/dist/components/renderers/layers/PieLayer.mjs +9 -0
- package/dist/components/renderers/layers/PieLayer.vue.d.ts +12 -0
- package/dist/components/renderers/layers/PolarLayer.mjs +9 -0
- package/dist/components/renderers/layers/PolarLayer.vue.d.ts +16 -0
- package/dist/components/renderers/layers/RadarLayer.mjs +9 -0
- package/dist/components/renderers/layers/RadarLayer.vue.d.ts +16 -0
- package/dist/components/renderers/layers/ScatterLayer.mjs +9 -0
- package/dist/components/renderers/layers/ScatterLayer.vue.d.ts +3 -0
- package/dist/composables/index.d.ts +35 -0
- package/dist/composables/useAnimationProps.d.ts +21 -0
- package/dist/composables/useAxisComponentBase.d.ts +11 -0
- package/dist/composables/useAxisRegistration.d.ts +7 -0
- package/dist/composables/useAxisTransition.d.ts +6 -0
- package/dist/composables/useBarLayer.d.ts +9 -0
- package/dist/composables/useBarRenderer.canvas.d.ts +2 -0
- package/dist/composables/useBarRenderer.svg.d.ts +2 -0
- package/dist/composables/useBarRendererBase.d.ts +3 -0
- package/dist/composables/useCandlestickRenderer.d.ts +2 -0
- package/dist/composables/useCartesianAnimation.d.ts +2 -0
- package/dist/composables/useCartesianFrame.d.ts +72 -0
- package/dist/composables/useCartesianLayout.d.ts +3 -0
- package/dist/composables/useChartContext.d.ts +40 -0
- package/dist/composables/useChartLayers.d.ts +31 -0
- package/dist/composables/useChartRefreshHook.d.ts +1 -0
- package/dist/composables/useChartSync.d.ts +2 -0
- package/dist/composables/useChartSyncCoordinator.d.ts +23 -0
- package/dist/composables/useControllerLifecycle.d.ts +18 -0
- package/dist/composables/useCustomizationRegistration.d.ts +18 -0
- package/dist/composables/useDatasetAnimationContext.d.ts +14 -0
- package/dist/composables/useDatasetRegistration.d.ts +6 -0
- package/dist/composables/useDrilldownState.d.ts +3 -0
- package/dist/composables/useFamilyRenderers.d.ts +10 -0
- package/dist/composables/useFamilyRenderers.spec.d.ts +1 -0
- package/dist/composables/useHeatmapRenderer.d.ts +2 -0
- package/dist/composables/useItemCollector.d.ts +2 -0
- package/dist/composables/useKeyboardController.d.ts +8 -0
- package/dist/composables/useKeyboardNavigation.d.ts +2 -0
- package/dist/composables/useLineRenderer.d.ts +2 -0
- package/dist/composables/useNavigatorRenderer.d.ts +7 -0
- package/dist/composables/usePieRenderer.d.ts +2 -0
- package/dist/composables/usePolarRenderer.d.ts +2 -0
- package/dist/composables/usePropertyAnimations.d.ts +4 -0
- package/dist/composables/useRadarRenderer.d.ts +2 -0
- package/dist/composables/useRadialFrame.d.ts +39 -0
- package/dist/composables/useResponsiveConfig.d.ts +8 -0
- package/dist/composables/useResponsiveDimensions.d.ts +2 -0
- package/dist/composables/useScatterRenderer.d.ts +2 -0
- package/dist/composables/useTreemapRenderer.d.ts +2 -0
- package/dist/composables/useZoomController.d.ts +9 -0
- package/dist/composables/useZoomPan.d.ts +2 -0
- package/dist/context/ChartContext.d.ts +21 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/keys.d.ts +52 -0
- package/dist/context/syncKeys.d.ts +5 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.mjs +67 -0
- package/dist/namespace.d.ts +1 -0
- package/dist/namespace.mjs +112 -0
- package/dist/release-date.d.ts +11 -0
- package/dist/types/animation.types.d.ts +38 -0
- package/dist/types/axes.types.d.ts +27 -0
- package/dist/types/axisComponentBase.types.d.ts +5 -0
- package/dist/types/axisGroup.types.d.ts +1 -0
- package/dist/types/bar.types.d.ts +42 -0
- package/dist/types/breadcrumb.types.d.ts +12 -0
- package/dist/types/candlestick.types.d.ts +41 -0
- package/dist/types/canvas.types.d.ts +5 -0
- package/dist/types/caption.types.d.ts +8 -0
- package/dist/types/cartesian.types.d.ts +22 -0
- package/dist/types/chart.types.d.ts +51 -0
- package/dist/types/heatmap.types.d.ts +58 -0
- package/dist/types/index.d.ts +27 -0
- package/dist/types/item.types.d.ts +25 -0
- package/dist/types/keyboard.types.d.ts +24 -0
- package/dist/types/layout.types.d.ts +35 -0
- package/dist/types/legend.types.d.ts +13 -0
- package/dist/types/line.types.d.ts +64 -0
- package/dist/types/pie.types.d.ts +49 -0
- package/dist/types/polar.types.d.ts +63 -0
- package/dist/types/radar.types.d.ts +56 -0
- package/dist/types/responsiveDimensions.types.d.ts +16 -0
- package/dist/types/scatter.types.d.ts +50 -0
- package/dist/types/svg.types.d.ts +44 -0
- package/dist/types/tooltip.types.d.ts +6 -0
- package/dist/types/treemap.types.d.ts +50 -0
- package/dist/types/zoom.types.d.ts +45 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/styles.d.ts +10 -0
- package/package.json +63 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export { useAnimationProps } from './useAnimationProps';
|
|
2
|
+
export { useAxisComponentBase } from './useAxisComponentBase';
|
|
3
|
+
export { useDatasetAnimationRegistration } from './useDatasetAnimationContext';
|
|
4
|
+
export { useAxisRegistration } from './useAxisRegistration';
|
|
5
|
+
export { useAxisTransition } from './useAxisTransition';
|
|
6
|
+
export { useCandlestickRenderer } from './useCandlestickRenderer';
|
|
7
|
+
export { useCartesianAnimation } from './useCartesianAnimation';
|
|
8
|
+
export { useCartesianLayout } from './useCartesianLayout';
|
|
9
|
+
export { useChartContext } from './useChartContext';
|
|
10
|
+
export { useChartRefreshHook } from './useChartRefreshHook';
|
|
11
|
+
export { useChartSync } from './useChartSync';
|
|
12
|
+
export { useChartSyncCoordinator } from './useChartSyncCoordinator';
|
|
13
|
+
export { useCustomizationRegistration } from './useCustomizationRegistration';
|
|
14
|
+
export { useDatasetRegistration } from './useDatasetRegistration';
|
|
15
|
+
export { useDrilldownState } from './useDrilldownState';
|
|
16
|
+
export { provideFamilyRenderers, registerFamilyRenderer, type ChartFamily, type FamilyRendererRegistry } from './useFamilyRenderers';
|
|
17
|
+
export { provideNavigatorRenderer, registerNavigatorRenderer } from './useNavigatorRenderer';
|
|
18
|
+
export { provideZoomController, registerZoomController, type ZoomControllerCtor } from './useZoomController';
|
|
19
|
+
export { provideKeyboardController, registerKeyboardController, type KeyboardControllerCtor } from './useKeyboardController';
|
|
20
|
+
export { provideChartLayers, registerChartLayer, useChartLayers, type ChartLayerEntry, type ChartLayerRegistry, type FrameKind } from './useChartLayers';
|
|
21
|
+
export { provideRadialFrame, useRadialFrameRegistration, type RadialFrame, type RadialLayerHandle } from './useRadialFrame';
|
|
22
|
+
export { provideCartesianFrame, useCartesianFrame, useCartesianFrameRegistration, type CartesianFrame, type CartesianFrameShared, type CartesianLayerHandle } from './useCartesianFrame';
|
|
23
|
+
export { useHeatmapRenderer } from './useHeatmapRenderer';
|
|
24
|
+
export { useItemCollector } from './useItemCollector';
|
|
25
|
+
export { useKeyboardNavigation } from './useKeyboardNavigation';
|
|
26
|
+
export { useLineRenderer } from './useLineRenderer';
|
|
27
|
+
export { usePieRenderer } from './usePieRenderer';
|
|
28
|
+
export { usePolarRenderer } from './usePolarRenderer';
|
|
29
|
+
export { useRadarRenderer } from './useRadarRenderer';
|
|
30
|
+
export { useResponsiveConfig } from './useResponsiveConfig';
|
|
31
|
+
export { useResponsiveDimensions } from './useResponsiveDimensions';
|
|
32
|
+
export { useScatterRenderer } from './useScatterRenderer';
|
|
33
|
+
export { useTreemapRenderer } from './useTreemapRenderer';
|
|
34
|
+
export { usePropertyAnimations } from './usePropertyAnimations';
|
|
35
|
+
export { useZoomPan } from './useZoomPan';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { ChartAnimationProps } from '@primeui/chart-types';
|
|
3
|
+
import type { ChartMethodsContextValue } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Parses the chart-level `animation` / `animations` / `transitions` props and
|
|
6
|
+
* registers them as the singleton `'animation'` customization feature.
|
|
7
|
+
*
|
|
8
|
+
* Called from Chart.vue's setup right after `provideChartContext`. Vue 3's
|
|
9
|
+
* `inject()` walks the parent chain and cannot see the current component's
|
|
10
|
+
* own `provide()`, so the caller passes its locally resolved `methods` in
|
|
11
|
+
* explicitly — mirroring the pure-composable style used in vue-scheduler.
|
|
12
|
+
*
|
|
13
|
+
* Per-dataset `animations` props register themselves directly under
|
|
14
|
+
* `animation:${datasetId}` keys via `useDatasetAnimationRegistration` (see
|
|
15
|
+
* each ChartBar/ChartLine/etc. SFC). The CartesianRenderer reads all
|
|
16
|
+
* `animation:*` keys and merges them with this chart-level entry.
|
|
17
|
+
*
|
|
18
|
+
* `transitions` is parsed but not yet wired to triggers in Phase 1a — it lives
|
|
19
|
+
* on the feature payload so Phase 3 can hook into it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useAnimationProps(props: MaybeRefOrGetter<ChartAnimationProps>, methods: ChartMethodsContextValue): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { SharedAxisProps, UseAxisComponentBaseResult } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Shared logic for ChartXAxis and ChartYAxis.
|
|
5
|
+
*
|
|
6
|
+
* Handles:
|
|
7
|
+
* - Axis props construction
|
|
8
|
+
* - useAxisRegistration call
|
|
9
|
+
* - AxisGroup children collection
|
|
10
|
+
*/
|
|
11
|
+
export declare function useAxisComponentBase(axis: 'x' | 'y', axisId: Ref<string>, props: SharedAxisProps, hasChildren?: boolean): UseAxisComponentBaseResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { XAxisProps as CoreXAxisProps, YAxisProps as CoreYAxisProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Composable for axis registration lifecycle.
|
|
5
|
+
* Delegates all lifecycle logic to AxisRegistrationController in chart-core.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useAxisRegistration(axis: 'x' | 'y', id: Ref<string>, props: Ref<CoreXAxisProps | CoreYAxisProps>): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AxisTransitionState } from '@primeui/chart-core';
|
|
2
|
+
/**
|
|
3
|
+
* Vue composable wrapping the framework-agnostic AxisTransitionState.
|
|
4
|
+
* Instance persists for the component lifetime (plain variable in setup).
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAxisTransition(): AxisTransitionState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useCartesianFrame } from './index';
|
|
2
|
+
import { useChartMethods } from '../context';
|
|
3
|
+
import type { UseBarRendererOptions, UseBarRendererResult } from '../types';
|
|
4
|
+
export interface UseBarLayerResult {
|
|
5
|
+
bar: UseBarRendererResult;
|
|
6
|
+
methods: ReturnType<typeof useChartMethods>;
|
|
7
|
+
frame: NonNullable<ReturnType<typeof useCartesianFrame>>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useBarLayer(useBarRenderer: (options: UseBarRendererOptions) => UseBarRendererResult): UseBarLayerResult;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { BarRendererController } from '@primeui/chart-core';
|
|
2
|
+
import type { UseBarRendererOptions, UseBarRendererResult } from '../types';
|
|
3
|
+
export declare function useBarRendererBase(controller: BarRendererController, options: UseBarRendererOptions): UseBarRendererResult;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref, type VNode } from 'vue';
|
|
2
|
+
import type { AnimatedPropertyStoreLike, CanvasCompositorLike } from '@primeui/chart-types';
|
|
3
|
+
import type { normalizeDataLabelConfig } from '@primeui/chart-core';
|
|
4
|
+
import type { BandScale, BoxArea, CartesianHitTestResult, CartesianLayoutData, ColorScaleInfo, CrosshairSeriesHit, CustomMarkerEntry, HoverConfig, LinearScale, ZoomState } from '../types';
|
|
5
|
+
type LabelConfig = ReturnType<typeof normalizeDataLabelConfig> | null;
|
|
6
|
+
export interface CartesianLayerHandle {
|
|
7
|
+
type: string;
|
|
8
|
+
hitTest(x: number, y: number): CartesianHitTestResult | null;
|
|
9
|
+
findNearest?(x: number, y: number): CartesianHitTestResult | null;
|
|
10
|
+
findAllNearest?(x: number, y: number): {
|
|
11
|
+
primary: CartesianHitTestResult;
|
|
12
|
+
allSeries: CrosshairSeriesHit[];
|
|
13
|
+
} | null;
|
|
14
|
+
getPointPosition(datasetId: string, index: number): {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
shape: 'rect' | 'circle';
|
|
20
|
+
} | null;
|
|
21
|
+
/** Render-prop data labels (bar/line) — frame renders these on top, after chrome. */
|
|
22
|
+
dataLabelVNodes?: Ref<VNode[]>;
|
|
23
|
+
/** Custom marker overlays (line/scatter) — frame composites these in the marker group. */
|
|
24
|
+
markerOverlays?: Ref<CustomMarkerEntry[]>;
|
|
25
|
+
/** Property-animation appliers (bar/line) — frame's onAnimFrame iterates these. */
|
|
26
|
+
applyPropertyAnimations?(store: AnimatedPropertyStoreLike): void;
|
|
27
|
+
/** Restore-on-release — frame's onPropertyComplete iterates these when a non-looping property animation completes. */
|
|
28
|
+
renderFrameCycle?(): void;
|
|
29
|
+
/** Line + scatter track the chrome-animated scales every frame. `valueXScales` carries
|
|
30
|
+
* the animated X value axis (scatter's numeric X). */
|
|
31
|
+
syncWithAnimatedScale?(categoryScale: BandScale, valueScales?: Map<string, LinearScale>, valueXScales?: Map<string, LinearScale>): void;
|
|
32
|
+
/** Scatter boost — frame skips chrome repaint on hover when all-scatter in boost. */
|
|
33
|
+
boostActive?: Ref<boolean>;
|
|
34
|
+
/** Heatmap self-contained color scale + band scales. */
|
|
35
|
+
getColorScaleInfo?(): ColorScaleInfo | null;
|
|
36
|
+
scaleResult?: Ref<{
|
|
37
|
+
xScale: BandScale;
|
|
38
|
+
yScale: BandScale;
|
|
39
|
+
xCategories: string[];
|
|
40
|
+
yCategories: string[];
|
|
41
|
+
} | null>;
|
|
42
|
+
}
|
|
43
|
+
/** The frame-computed bundle layers read. */
|
|
44
|
+
export interface CartesianFrameShared {
|
|
45
|
+
canvasEl: Ref<HTMLCanvasElement | null>;
|
|
46
|
+
width: ComputedRef<number>;
|
|
47
|
+
height: ComputedRef<number>;
|
|
48
|
+
/** Plot-area clip-path element id. Series layers render `<g>` at the template root (so they
|
|
49
|
+
* mount in both renderers), each clipping itself — equivalent to the old wrapping clip group. */
|
|
50
|
+
plotClipId: string;
|
|
51
|
+
cartesianArea: ComputedRef<BoxArea>;
|
|
52
|
+
layoutData: ComputedRef<CartesianLayoutData | null>;
|
|
53
|
+
labelConfig: ComputedRef<LabelConfig>;
|
|
54
|
+
hoverConfig: ComputedRef<HoverConfig | undefined>;
|
|
55
|
+
zoomState: ComputedRef<ZoomState | null>;
|
|
56
|
+
adaptiveDataLabelFontSize: ComputedRef<number | undefined>;
|
|
57
|
+
adaptiveDataLabelRotation: ComputedRef<number | undefined>;
|
|
58
|
+
compositor: CanvasCompositorLike;
|
|
59
|
+
animStore: Ref<AnimatedPropertyStoreLike | null>;
|
|
60
|
+
}
|
|
61
|
+
export interface CartesianFrame extends CartesianFrameShared {
|
|
62
|
+
handles: Map<string, CartesianLayerHandle>;
|
|
63
|
+
register(handle: CartesianLayerHandle): void;
|
|
64
|
+
unregister(type: string): void;
|
|
65
|
+
}
|
|
66
|
+
/** Called by CartesianRenderer with its computed shared bundle. */
|
|
67
|
+
export declare function provideCartesianFrame(shared: CartesianFrameShared): CartesianFrame;
|
|
68
|
+
/** Called by a layer to read the shared bundle. */
|
|
69
|
+
export declare function useCartesianFrame(): CartesianFrame | null;
|
|
70
|
+
/** Called by a layer to register its handle; auto-unregisters on unmount. */
|
|
71
|
+
export declare function useCartesianFrameRegistration(handle: CartesianLayerHandle): void;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ChartTheme, RendererDelegate, SyncedHighlightResult } from '@primeui/chart-types';
|
|
2
|
+
import { type ComputedRef, type Ref, type ShallowRef } from 'vue';
|
|
3
|
+
import type { ChartCoreInstanceContextValue } from '../context/keys';
|
|
4
|
+
import type { ChartSyncInfo } from '../types/chart.types';
|
|
5
|
+
import type { LegendItem, TooltipState } from '../types';
|
|
6
|
+
export interface UseChartContextOptions {
|
|
7
|
+
coreCtx: ChartCoreInstanceContextValue;
|
|
8
|
+
width: Ref<number> | ComputedRef<number>;
|
|
9
|
+
height: Ref<number> | ComputedRef<number>;
|
|
10
|
+
dir: Ref<'ltr' | 'rtl'> | ComputedRef<'ltr' | 'rtl'>;
|
|
11
|
+
theme: ComputedRef<Required<ChartTheme>>;
|
|
12
|
+
rendererDelegate: ComputedRef<RendererDelegate | null>;
|
|
13
|
+
drilldownEnabled: ComputedRef<boolean>;
|
|
14
|
+
onClickCb: ComputedRef<((hit: {
|
|
15
|
+
datasetId: string;
|
|
16
|
+
index: number;
|
|
17
|
+
label: string;
|
|
18
|
+
value: number;
|
|
19
|
+
color: string;
|
|
20
|
+
}) => void) | undefined>;
|
|
21
|
+
onLegendClickCb: ComputedRef<((item: {
|
|
22
|
+
datasetId: string;
|
|
23
|
+
index?: number;
|
|
24
|
+
label: string;
|
|
25
|
+
type: 'dataset' | 'item';
|
|
26
|
+
}) => void) | undefined>;
|
|
27
|
+
syncInfo: ChartSyncInfo | null;
|
|
28
|
+
containerRef: Ref<HTMLDivElement | null>;
|
|
29
|
+
}
|
|
30
|
+
export interface UseChartContextResult {
|
|
31
|
+
tooltip: ShallowRef<TooltipState | null>;
|
|
32
|
+
onMouseMove: (x: number, y: number) => void;
|
|
33
|
+
onMouseLeave: () => void;
|
|
34
|
+
onClick: (x: number, y: number) => void;
|
|
35
|
+
onLegendClick: (item: LegendItem) => void;
|
|
36
|
+
onLegendHover: (item: LegendItem | null) => void;
|
|
37
|
+
/** Routes a synced-highlight result through core so state flows via emits. */
|
|
38
|
+
onSyncedResult: (result: SyncedHighlightResult) => void;
|
|
39
|
+
}
|
|
40
|
+
export declare function useChartContext(options: UseChartContextOptions): UseChartContextResult;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type Component } from 'vue';
|
|
2
|
+
import type { DatasetRenderer } from '@primeui/chart-types';
|
|
3
|
+
import type { ChartFamily } from './useFamilyRenderers';
|
|
4
|
+
/** `'grid'` = attaches to a coordinate grid frame (axes/scales). `null` = frameless (center/radius slices, rect packing). */
|
|
5
|
+
export type FrameKind = 'grid' | null;
|
|
6
|
+
export interface ChartLayerEntry {
|
|
7
|
+
family: ChartFamily;
|
|
8
|
+
frameKind: FrameKind;
|
|
9
|
+
/** Single shared layer (mode-agnostic types). */
|
|
10
|
+
layer?: Component;
|
|
11
|
+
/** Per-renderer-mode layer. Used by renderer-mode-split types (e.g. bar) so the
|
|
12
|
+
* family renderer mounts only the layer matching the active renderer. The two
|
|
13
|
+
* variants statically import different painter-construction modules, so the
|
|
14
|
+
* unused-mode layer (and its painter) can drop from a single-mode consumer's
|
|
15
|
+
* bundle. Exactly one of `layer` / `layerByMode` is set. */
|
|
16
|
+
layerByMode?: {
|
|
17
|
+
svg: Component;
|
|
18
|
+
canvas: Component;
|
|
19
|
+
};
|
|
20
|
+
/** Renderer's axis-hint provider, contributed at <ChartX> setup so the frame reserves axis
|
|
21
|
+
* space without statically importing the renderer (keeps the renderer out of the frame bundle). */
|
|
22
|
+
axisHints?: Pick<DatasetRenderer<unknown, unknown>, 'getAxisHints'>;
|
|
23
|
+
}
|
|
24
|
+
export type ChartLayerRegistry = Map<string, ChartLayerEntry>;
|
|
25
|
+
/** Called by the <Chart> root. Provides an empty reactive registry that
|
|
26
|
+
* chart-type components populate during their own setup. */
|
|
27
|
+
export declare function provideChartLayers(): ChartLayerRegistry;
|
|
28
|
+
/** Called in a chart-type component's setup(). First registration wins. */
|
|
29
|
+
export declare function registerChartLayer(type: string, entry: ChartLayerEntry): void;
|
|
30
|
+
/** Read the registered layers for a family (e.g. RadialRenderer reads `'radial'`). */
|
|
31
|
+
export declare function useChartLayers(): ChartLayerRegistry | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useChartRefreshHook(callback: () => void): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ChartTheme, DatasetRegistration, RendererDelegate, SyncedHighlightResult, ZoomState } from '@primeui/chart-types';
|
|
2
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
3
|
+
import type { ChartSyncInfo } from '../types';
|
|
4
|
+
export interface UseChartSyncCoordinatorOptions {
|
|
5
|
+
syncInfo: ChartSyncInfo | null;
|
|
6
|
+
datasets: ComputedRef<Map<string, DatasetRegistration>>;
|
|
7
|
+
datasetVisibility: ComputedRef<Map<string, boolean>>;
|
|
8
|
+
theme: ComputedRef<Required<ChartTheme>>;
|
|
9
|
+
zoomState: Ref<ZoomState>;
|
|
10
|
+
hasCrosshair: ComputedRef<boolean>;
|
|
11
|
+
isSharedMode: ComputedRef<boolean>;
|
|
12
|
+
isCartesian: ComputedRef<boolean>;
|
|
13
|
+
isRect: ComputedRef<boolean>;
|
|
14
|
+
width: Ref<number>;
|
|
15
|
+
height: Ref<number>;
|
|
16
|
+
getZoomState: () => ZoomState;
|
|
17
|
+
rendererDelegate: ComputedRef<RendererDelegate | null>;
|
|
18
|
+
updateZoom: (state: ZoomState) => void;
|
|
19
|
+
setDatasetVisibility: (seriesId: string, visible: boolean) => void;
|
|
20
|
+
toggleItemVisibility: (seriesId: string, itemLabel: number) => void;
|
|
21
|
+
onSyncedResult: (result: SyncedHighlightResult) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare function useChartSyncCoordinator({ syncInfo, datasets, datasetVisibility, theme, zoomState, hasCrosshair, isSharedMode, isCartesian, isRect, width, height, getZoomState, rendererDelegate, updateZoom, setDatasetVisibility, toggleItemVisibility, onSyncedResult }: UseChartSyncCoordinatorOptions): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AnimatedPropertyStoreLike } from '@primeui/chart-types';
|
|
2
|
+
/** The minimal controller surface every renderer controller shares. */
|
|
3
|
+
interface LifecycleController {
|
|
4
|
+
destroy(): void;
|
|
5
|
+
applyPropertyAnimations(store: AnimatedPropertyStoreLike): void;
|
|
6
|
+
renderFrameCycle(): void;
|
|
7
|
+
}
|
|
8
|
+
export interface ControllerLifecycle {
|
|
9
|
+
applyPropertyAnimations: (store: AnimatedPropertyStoreLike) => void;
|
|
10
|
+
renderFrameCycle: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Wire a renderer controller's universal lifecycle: destroy on unmount, plus the
|
|
14
|
+
* two stable pass-through delegates. Returns the delegates to spread into the
|
|
15
|
+
* composable's return object.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useControllerLifecycle(controller: LifecycleController): ControllerLifecycle;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { ChartMethodsContextValue, FeaturePropsMap, FeatureType } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Composable for customization/feature registration lifecycle.
|
|
5
|
+
* Handles register on mount, update on prop changes, unregister on unmount.
|
|
6
|
+
*
|
|
7
|
+
* Generic K-keyed: `type` and `props` are linked via `FeaturePropsMap`, so
|
|
8
|
+
* `useCustomizationRegistration('hover', refOf<HoverProps>)` typechecks without
|
|
9
|
+
* a cast at call sites.
|
|
10
|
+
*
|
|
11
|
+
* `methodsOverride` is for the chart root (Chart.vue), which both provides the
|
|
12
|
+
* chart context AND wants to register the chart-level `animation` feature in
|
|
13
|
+
* the same setup. Vue 3's `inject()` only walks the parent chain — it cannot
|
|
14
|
+
* see the current component's own `provide()` — so the root passes its locally
|
|
15
|
+
* resolved methods directly. Child customization components (legend, navigator,
|
|
16
|
+
* dataset registrations) leave this undefined and inject normally.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useCustomizationRegistration<K extends FeatureType>(type: K, props: Ref<FeaturePropsMap[K]>, methodsOverride?: ChartMethodsContextValue): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { NamedAnimationSpec } from '@primeui/chart-types';
|
|
3
|
+
/**
|
|
4
|
+
* Wires a dataset's `animations` prop into the chart's feature map under a
|
|
5
|
+
* per-dataset keyed entry (`animation:${datasetId}`), matching the same
|
|
6
|
+
* keyed-registration pattern used by `ChartReferenceLine` / `ChartReferenceBand`
|
|
7
|
+
* / `ChartAxisGroup`. The CartesianRenderer reads all `animation:*` keys and
|
|
8
|
+
* merges their `propertyAnimations` arrays alongside the chart-level `animation`
|
|
9
|
+
* entry.
|
|
10
|
+
*
|
|
11
|
+
* No parent state, no provide/inject — each dataset writes directly to the
|
|
12
|
+
* chart core's single source of truth.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useDatasetAnimationRegistration(datasetId: MaybeRefOrGetter<string | undefined>, animations: MaybeRefOrGetter<Record<string, NamedAnimationSpec> | undefined>): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { UseDatasetRegistrationOptions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Composable for dataset registration lifecycle.
|
|
4
|
+
* Delegates all lifecycle logic to DatasetRegistrationController in chart-core.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useDatasetRegistration<T extends Record<string, unknown>>({ id, type, props, typeResolver }: UseDatasetRegistrationOptions<T>): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Component } from 'vue';
|
|
2
|
+
export type ChartFamily = 'cartesian' | 'radial' | 'rect';
|
|
3
|
+
export type FamilyRendererRegistry = Record<ChartFamily, Component | undefined>;
|
|
4
|
+
/** Called by the <Chart> root. Provides an empty reactive registry that
|
|
5
|
+
* chart-type components populate during their own setup. */
|
|
6
|
+
export declare function provideFamilyRenderers(): FamilyRendererRegistry;
|
|
7
|
+
/** Called in a chart-type component's setup(). The component statically imports
|
|
8
|
+
* its family renderer (so the renderer tree-shakes with the component) and
|
|
9
|
+
* registers it. First registration wins; subsequent ones are idempotent. */
|
|
10
|
+
export declare function registerFamilyRenderer(family: ChartFamily, component: Component): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ShallowRef } from 'vue';
|
|
2
|
+
import type { KeyboardNavigationController } from '@primeui/chart-core';
|
|
3
|
+
export type KeyboardControllerCtor = new () => KeyboardNavigationController;
|
|
4
|
+
/** Called by the <Chart> root. Provides an empty slot that <Chart.Accessibility> fills. */
|
|
5
|
+
export declare function provideKeyboardController(): ShallowRef<KeyboardControllerCtor | null>;
|
|
6
|
+
/** Called in <Chart.Accessibility>'s setup(). Statically imports
|
|
7
|
+
* KeyboardNavigationController (so it tree-shakes with the feature) and registers it. */
|
|
8
|
+
export declare function registerKeyboardController(ctor: KeyboardControllerCtor): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Component, type ShallowRef } from 'vue';
|
|
2
|
+
/** Called by the <Chart> root. Provides an empty slot that <Chart.Navigator>
|
|
3
|
+
* populates during its own setup when the feature is present in the tree. */
|
|
4
|
+
export declare function provideNavigatorRenderer(): ShallowRef<Component | null>;
|
|
5
|
+
/** Called in <Chart.Navigator>'s setup(). The component statically imports
|
|
6
|
+
* NavigatorRenderer (so it tree-shakes with the feature) and registers it. */
|
|
7
|
+
export declare function registerNavigatorRenderer(component: Component): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import type { AnimatedPropertyStoreLike, PropertyAnimationConfig } from '@primeui/chart-types';
|
|
3
|
+
import type { AnimationRegistry } from '@primeui/chart-core';
|
|
4
|
+
export declare function usePropertyAnimations(configs: MaybeRefOrGetter<PropertyAnimationConfig[] | undefined>, registry: AnimationRegistry | null, store: AnimatedPropertyStoreLike | null, onPropertyComplete?: (storeKey: string) => void): void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { AnimatedPropertyStoreLike } from '@primeui/chart-types';
|
|
3
|
+
import type { CrosshairSeriesHit, PolarRenderData, RadarRenderData, RadialHitTestResult } from '../types';
|
|
4
|
+
export interface RadialLayerHandle {
|
|
5
|
+
type: string;
|
|
6
|
+
hitTest(x: number, y: number): RadialHitTestResult | null;
|
|
7
|
+
getPointPosition(datasetId: string, index: number): {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
shape: 'circle';
|
|
13
|
+
} | null;
|
|
14
|
+
getCenter?(): {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
} | null;
|
|
18
|
+
findAllNearest?(x: number, y: number): {
|
|
19
|
+
primary: RadialHitTestResult;
|
|
20
|
+
allSeries: CrosshairSeriesHit[];
|
|
21
|
+
} | null;
|
|
22
|
+
/** Grid layers (radar/polar) expose their per-frame layout so the frame can build the shared radial grid. */
|
|
23
|
+
layout?: Ref<RadarRenderData | PolarRenderData | null>;
|
|
24
|
+
/** Grid layers expose their canvas painter so the frame's redraw pipeline can composite grid + series. */
|
|
25
|
+
renderCanvasContent?: (ctx: CanvasRenderingContext2D, canvas: HTMLCanvasElement) => void;
|
|
26
|
+
/** Property-animation appliers — frame's onAnimFrame iterates these (scaffolded for Tasks 3-9). */
|
|
27
|
+
applyPropertyAnimations?(store: AnimatedPropertyStoreLike): void;
|
|
28
|
+
/** Restore-on-release — frame's onPropertyComplete iterates these when a non-looping property animation completes. */
|
|
29
|
+
renderFrameCycle?(): void;
|
|
30
|
+
}
|
|
31
|
+
export interface RadialFrame {
|
|
32
|
+
handles: Map<string, RadialLayerHandle>;
|
|
33
|
+
register(handle: RadialLayerHandle): void;
|
|
34
|
+
unregister(type: string): void;
|
|
35
|
+
}
|
|
36
|
+
/** Called by RadialRenderer. */
|
|
37
|
+
export declare function provideRadialFrame(): RadialFrame;
|
|
38
|
+
/** Called in a layer's setup(); auto-unregisters on unmount. */
|
|
39
|
+
export declare function useRadialFrameRegistration(handle: RadialLayerHandle): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { ResponsiveFeatureProps } from '../types';
|
|
3
|
+
export declare function useResponsiveConfig(width: Ref<number>, height: Ref<number>, responsiveFeature: Ref<ResponsiveFeatureProps | undefined>, globalFont?: {
|
|
4
|
+
size?: number;
|
|
5
|
+
}): {
|
|
6
|
+
defaults: import("vue").ComputedRef<import("packages/components/chart/chart-types/src").AdaptiveDefaults>;
|
|
7
|
+
ruleOverrides: import("vue").ComputedRef<Record<string, Record<string, unknown>>>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ShallowRef } from 'vue';
|
|
2
|
+
import type { ZoomPanDeps } from '@primeui/chart-types';
|
|
3
|
+
import type { ZoomPanController } from '@primeui/chart-core';
|
|
4
|
+
export type ZoomControllerCtor = new (deps: ZoomPanDeps) => ZoomPanController;
|
|
5
|
+
/** Called by the <Chart> root. Provides an empty slot that <Chart.Zoom> fills. */
|
|
6
|
+
export declare function provideZoomController(): ShallowRef<ZoomControllerCtor | null>;
|
|
7
|
+
/** Called in <Chart.Zoom>'s setup(). Statically imports ZoomPanController (so it
|
|
8
|
+
* tree-shakes with the feature) and registers its constructor. */
|
|
9
|
+
export declare function registerZoomController(ctor: ZoomControllerCtor): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
import type { ChartHoverContextValue, ChartMethodsContextValue, ChartProviderOptions, ChartStateContextValue, RendererHint } from '../types';
|
|
3
|
+
/** Access stable chart methods (registration, actions). */
|
|
4
|
+
export declare function useChartMethods(): ChartMethodsContextValue;
|
|
5
|
+
/** Access reactive chart state (datasets, features, visibility). */
|
|
6
|
+
export declare function useChartState(): ComputedRef<ChartStateContextValue>;
|
|
7
|
+
/** Access hover state only. */
|
|
8
|
+
export declare function useChartHover(): ComputedRef<ChartHoverContextValue>;
|
|
9
|
+
/** Set the renderer hint synchronously in setup(). Called by chart components. */
|
|
10
|
+
export declare function useRendererHint(hint: RendererHint): void;
|
|
11
|
+
export declare function provideChartContext(options: ChartProviderOptions): {
|
|
12
|
+
coreChart: import("@primeui/chart-core").ChartCoreInstance;
|
|
13
|
+
emitHandlerRef: {
|
|
14
|
+
current: ((event: string, ...args: unknown[]) => void) | null;
|
|
15
|
+
};
|
|
16
|
+
methods: ChartMethodsContextValue;
|
|
17
|
+
state: ComputedRef<ChartStateContextValue>;
|
|
18
|
+
hover: ComputedRef<ChartHoverContextValue>;
|
|
19
|
+
rendererHint: import("vue").Ref<RendererHint | null, RendererHint | null>;
|
|
20
|
+
redraw: () => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { provideChartContext, useChartHover, useChartMethods, useChartState, useRendererHint } from './ChartContext';
|
|
2
|
+
export { CHART_GROUP_TEXT_KEY, CHART_HOVER_KEY, CHART_METHODS_KEY, CHART_STATE_KEY, ITEM_COLLECTOR_KEY, RENDERER_HINT_KEY } from './keys';
|
|
3
|
+
export type { ChartGroupTextContextValue } from './keys';
|
|
4
|
+
export { CHART_SYNC_INFO_KEY, SYNC_BUS_KEY } from './syncKeys';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ChartCoreInstance } from '@primeui/chart-core';
|
|
2
|
+
import type { ComputedRef, InjectionKey, Ref, ShallowRef } from 'vue';
|
|
3
|
+
import type { ChartHoverContextValue, ChartMethodsContextValue, ChartStateContextValue, ItemCollectorContextValue, RendererHint, TooltipState } from '../types';
|
|
4
|
+
export interface ChartCoreInstanceContextValue {
|
|
5
|
+
coreChart: ChartCoreInstance;
|
|
6
|
+
/** Write your emit handler here; provideChartContext's stable wrappers call it for all event emits. */
|
|
7
|
+
emitHandlerRef: {
|
|
8
|
+
current: ((event: string, ...args: unknown[]) => void) | null;
|
|
9
|
+
};
|
|
10
|
+
setHover: (datasetId: string | null, index: number | null, axisIdx?: number | null, axisX?: number | null) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface ChartGroupTextContextValue {
|
|
13
|
+
setTitle: (text: string | undefined) => void;
|
|
14
|
+
setCaption: (text: string | undefined) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Provides stable methods (registration, actions, static info).
|
|
18
|
+
* Rarely changes — only on dimension updates.
|
|
19
|
+
*/
|
|
20
|
+
export declare const CHART_METHODS_KEY: InjectionKey<ChartMethodsContextValue>;
|
|
21
|
+
/**
|
|
22
|
+
* Provides reactive chart state (datasets, features, visibility).
|
|
23
|
+
* Provided as ComputedRef — consumers access .value for reactivity.
|
|
24
|
+
*/
|
|
25
|
+
export declare const CHART_STATE_KEY: InjectionKey<ComputedRef<ChartStateContextValue>>;
|
|
26
|
+
/**
|
|
27
|
+
* Provides hover state — separated for performance.
|
|
28
|
+
* Provided as ComputedRef — consumers access .value for reactivity.
|
|
29
|
+
*/
|
|
30
|
+
export declare const CHART_HOVER_KEY: InjectionKey<ComputedRef<ChartHoverContextValue>>;
|
|
31
|
+
export declare const ITEM_COLLECTOR_KEY: InjectionKey<ItemCollectorContextValue<any>>;
|
|
32
|
+
/**
|
|
33
|
+
* Renderer hint — synchronously set by chart components (ChartBar, ChartScatter, etc.)
|
|
34
|
+
* so ChartRenderer knows which sub-renderer to mount on the very first render,
|
|
35
|
+
* before datasets register via onMounted.
|
|
36
|
+
*/
|
|
37
|
+
export declare const RENDERER_HINT_KEY: InjectionKey<Ref<RendererHint | null>>;
|
|
38
|
+
/** Provided by ChartGroup — lets ChartTitle/ChartCaption register group-level text. */
|
|
39
|
+
export declare const CHART_GROUP_TEXT_KEY: InjectionKey<ChartGroupTextContextValue>;
|
|
40
|
+
/** Tooltip state — provided by ChartRenderer, injected by TooltipRenderer.
|
|
41
|
+
* Decouples tooltip position updates from ChartRenderer's render cycle. */
|
|
42
|
+
export declare const TOOLTIP_CONTEXT_KEY: InjectionKey<ShallowRef<TooltipState | null>>;
|
|
43
|
+
/** Core chart instance + emit handler slot — injected by useChartContext. */
|
|
44
|
+
export declare const CHART_CORE_INSTANCE_KEY: InjectionKey<ChartCoreInstanceContextValue>;
|
|
45
|
+
/**
|
|
46
|
+
* Refresh nonce — incremented by `chart.redraw()` to force a one-shot bypass
|
|
47
|
+
* of the framework wrapper's prop-equality gate. Lets users imperatively
|
|
48
|
+
* push fresh prop values (including new function refs) into chart state when
|
|
49
|
+
* only function references changed and the smart shallowEqual would otherwise
|
|
50
|
+
* short-circuit the update.
|
|
51
|
+
*/
|
|
52
|
+
export declare const CHART_REFRESH_NONCE_KEY: InjectionKey<Ref<number>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { ChartSyncInfo, SyncBus } from '../types';
|
|
3
|
+
/** Injection key for the shared SyncBus (provided by ChartGroup) */
|
|
4
|
+
export declare const SYNC_BUS_KEY: InjectionKey<SyncBus>;
|
|
5
|
+
export declare const CHART_SYNC_INFO_KEY: InjectionKey<ChartSyncInfo>;
|