import { ComponentPublicInstance, Ref, ComputedRef } from '../../node_modules/vue'; import { ChartData, LoadedData } from './useChartData'; export type { ChartData, LoadedData }; interface ChartEmit[] | Record> { emit: { (event: 'resized'): void; (event: 'loaded', data: LoadedData): void; }; } interface ChartPropsDefinition { chartHeightRatio: { type: NumberConstructor; }; data: { default: () => object[] | string; validator(value: string): boolean; type: (ArrayConstructor | StringConstructor | ObjectConstructor)[]; }; dataUrlType: { default: string; validator(value: string): boolean; type: StringConstructor; }; socialMode: { type: BooleanConstructor; }; socialModeRatio: { default: number; type: NumberConstructor; }; } export interface ChartPropsRefs { chartHeightRatio: Ref; data: Ref; dataUrlType: Ref<'json' | 'csv' | 'tsv'>; socialMode: Ref; socialModeRatio: Ref; } /** * Wraps a chart component's raw props into individual refs consumable by {@link useChart}. * * @param props - The chart component props (typically from `defineProps`). * @returns A {@link ChartPropsRefs} object exposing each chart prop as its own ref. * @remarks Internal building block consumed by {@link useChart}; not exported from the package root. * @example * // Inside a chart component, alongside chartProps() and useChart(): * const props = defineProps(chartProps()) * const chart = useChart(resizableRef, getChartProps(props), { emit }, isLoaded) */ export declare function getChartProps(props: { chartHeightRatio?: number; data?: ChartData; dataUrlType?: 'json' | 'csv' | 'tsv'; socialMode?: boolean; socialModeRatio?: number; }): ChartPropsRefs; /** * Builds the shared Vue prop definitions every chart component accepts. * * @returns A {@link ChartPropsDefinition} object passable to `defineProps`. * @remarks Internal building block used by chart components together with {@link useChart}; not exported from the package root. * @example * // Inside a chart component's * * */ export declare function useChart[] | Record>(resizableRef: Ref | null>, props: ChartPropsRefs, { emit }: ChartEmit, isLoaded: Ref, onResized?: () => void, afterLoaded?: () => Promise): UseChartReturn;