{"version":3,"file":"charts.mjs","names":[],"sources":["../../src/types/charts.ts"],"sourcesContent":["import type {\n  AnimationEvent,\n  ClipboardEvent,\n  CompositionEvent,\n  DOMAttributes,\n  DragEvent,\n  FocusEvent,\n  FormEvent,\n  HTMLAttributes,\n  JSXElementConstructor,\n  KeyboardEvent,\n  MouseEvent,\n  PointerEvent,\n  ReactElement,\n  SVGAttributes,\n  SyntheticEvent,\n  TouchEvent,\n  TransitionEvent,\n  UIEvent,\n  WheelEvent,\n} from 'react';\n\nexport interface Activity {\n  count: number;\n  date: string;\n  level: number;\n}\n\nexport type Week = Array<Activity | undefined>;\n\nexport type Labels = Partial<{\n  legend: Partial<{\n    less: string;\n    more: string;\n  }>;\n  months: Array<string>;\n  tooltip: string;\n  totalCount: string;\n  weekdays: Array<string>;\n}>;\n\ninterface BlockAttributes extends SVGAttributes<SVGRectElement>, HTMLAttributes<SVGRectElement> {}\n\nexport type BlockElement = ReactElement<BlockAttributes, JSXElementConstructor<SVGRectElement>>;\n\nexport type SVGRectEventHandler = Omit<\n  DOMAttributes<SVGRectElement>,\n  'css' | 'children' | 'dangerouslySetInnerHTML'\n>;\n\nexport type EventHandlerMap = {\n  [key in keyof SVGRectEventHandler]: (\n    ...event: Parameters<NonNullable<SVGRectEventHandler[keyof SVGRectEventHandler]>>\n  ) => (activity: Activity) => void;\n};\n\nexport type ReactEvent<E extends Element> = AnimationEvent<E> &\n  ClipboardEvent<E> &\n  CompositionEvent<E> &\n  DragEvent<E> &\n  FocusEvent<E> &\n  FormEvent<E> &\n  KeyboardEvent<E> &\n  MouseEvent<E> &\n  PointerEvent<E> &\n  SyntheticEvent<E> &\n  TouchEvent<E> &\n  TransitionEvent<E> &\n  UIEvent<E> &\n  WheelEvent<E>;\n\ntype FixedProps = {\n  categoryClicked: string;\n  eventType: 'dot' | 'category' | 'bar' | 'slice' | 'bubble';\n};\n\ntype BaseEventProps = FixedProps & {\n  [key: string]: number | string;\n};\n\nexport type EventProps = BaseEventProps | null | undefined;\n\nexport type Interval = 'preserveStartEnd' | 'equidistantPreserveStart';\n\nexport type IntervalType = 'preserveStartEnd' | Interval;\n\nexport type CurveType = 'linear' | 'natural' | 'monotone' | 'step';\n\nexport type ValueFormatter = {\n  (value: number): string;\n};\n\nexport type LabelFormatter = {\n  (value: number | string): string;\n};\n\nexport type ScatterChartValueFormatter = {\n  size?: ValueFormatter;\n  x?: ValueFormatter;\n  y?: ValueFormatter;\n};\n\nconst deltaTypeValues = [\n  'increase',\n  'moderateIncrease',\n  'decrease',\n  'moderateDecrease',\n  'unchanged',\n] as const;\n\nexport type DeltaType = (typeof deltaTypeValues)[number];\n\nexport const DeltaTypes: { [key: string]: DeltaType } = {\n  Decrease: 'decrease',\n  Increase: 'increase',\n  ModerateDecrease: 'moderateDecrease',\n  ModerateIncrease: 'moderateIncrease',\n  Unchanged: 'unchanged',\n};\n"],"mappings":";AAgHA,MAAa,aAA2C;CACtD,UAAU;CACV,UAAU;CACV,kBAAkB;CAClB,kBAAkB;CAClB,WAAW;AACb"}