import { FetchApi } from '@backstage/core-plugin-api'; import { LicenseValidationResponse } from '@spotify/backstage-plugin-core-common'; import * as react_jsx_runtime from 'react/jsx-runtime'; export { default as invariant } from 'tiny-invariant'; import { Unit } from 'humanize-duration'; import { PropsWithChildren, HTMLAttributes } from 'react'; import { Placement } from '@floating-ui/react'; /** @public */ type SpotifyLicenseContext = { response: LicenseValidationResponse | undefined; }; /** @public */ declare function useSpotifyLicense(options: { fetchApi: FetchApi; backend: string; licenseKey?: string; }): SpotifyLicenseContext; /** @public */ type SpotifyLicenseBannerProps = { backend: string; invalidLicenseMessage?: string; inline?: boolean; }; /** @public */ declare const SpotifyLicenseBanner: ({ backend, invalidLicenseMessage, inline, }: SpotifyLicenseBannerProps) => react_jsx_runtime.JSX.Element | null; /** * From https://www.figma.com/file/OWIRK4z6i5DvhXGXC0hSGy/%5BTEST%5D-Backstage-DataViz-2.0?node-id=0%3A1&t=Ekm1VKU8nLClme7D-0 * * Usage guidelines: * https://docs.google.com/presentation/d/1Hopb7oxqHzyVuP2BhmCQay0MJMYP_beLDZmtmGVqDLE/ * * @public */ declare const DATA_VIZ_LIGHT_THEME: string[]; /** * From https://www.figma.com/file/xbks1FKE2DulPy3ZZlJYjE/DataViz?type=design&node-id=607-85144&mode=design&t=boIusYz7LpV4mZeo-0 * * Usage guidelines: * https://docs.google.com/presentation/d/1Hopb7oxqHzyVuP2BhmCQay0MJMYP_beLDZmtmGVqDLE/ * * @public */ declare const DATA_VIZ_DARK_THEME: string[]; /** * Converts a supplied timestamp to a string containing * that time relative to the current instant. * * @public */ declare function getRelativeTime(timestamp: string): string | null; /** * React hook that provides a relative time string which * stays up to date as time passes. * * @public */ declare const useAutoUpdatingRelativeTime: (timestamp: string) => string | null; /** * @public * @param percentage - Number between 0-1; * @param locales - Locale or locales to use; * @param options - Intl.NumberFormatOptions; */ declare const getLocalizedNumber: (value: number, locales?: string | string[], options?: Intl.NumberFormatOptions) => string; /** * @public * @param percentage - Number between 0-1; * @param fractionDigits - Number of fraction digits to display; * @param locales - Locale or locales to use; * */ declare const getLocalizedPercentage: (percentage: number, fractionDigits?: number, locales?: string | string[]) => string; /** @public */ type GetHumanDurationOptions = { units?: Unit[]; }; /** @public */ declare const getHumanDuration: (durationInMilliseconds: number, options?: GetHumanDurationOptions) => { exactDuration: string; duration: string; durationUnit: string; durationValue: number; }; /** @public */ type DataPoint = { key: string; value: TValue; }; /** @public */ type TimeSeriesChartProps = { data: DataPoint[]; unit?: string; color?: string; smooth?: boolean; tooltipEnabled?: boolean; }; /** @public */ declare function TimeSeriesChart({ unit, data, color, smooth, tooltipEnabled, }: TimeSeriesChartProps): react_jsx_runtime.JSX.Element; /** @public */ type DonutChartProps = PropsWithChildren<{ total: number; value: number; unit: string; color?: string; height?: number; thickness?: number; cornerRadius?: number; tooltipEnabled?: boolean; }>; /** @public */ declare function DonutChart(props: DonutChartProps): react_jsx_runtime.JSX.Element; /** @public */ declare function Tooltip({ children, placement, }: PropsWithChildren<{ placement?: Placement; }>): react_jsx_runtime.JSX.Element; /** @public */ declare function TooltipTrigger({ children, ...rest }: PropsWithChildren>): react_jsx_runtime.JSX.Element; export { DATA_VIZ_DARK_THEME, DATA_VIZ_LIGHT_THEME, type DataPoint, DonutChart, type DonutChartProps, type GetHumanDurationOptions, SpotifyLicenseBanner, type SpotifyLicenseBannerProps, type SpotifyLicenseContext, TimeSeriesChart, type TimeSeriesChartProps, Tooltip, TooltipTrigger, getHumanDuration, getLocalizedNumber, getLocalizedPercentage, getRelativeTime, useAutoUpdatingRelativeTime, useSpotifyLicense };