@alfadocs/ui-kit-debug 1.28.3 → 1.30.0

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.
Files changed (126) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-DwjqZgR5.js → anamnesis-summary-rows-DMO3MWSt.js} +2 -2
  2. package/dist/_chunks/{anamnesis-summary-rows-DwjqZgR5.js.map → anamnesis-summary-rows-DMO3MWSt.js.map} +1 -1
  3. package/dist/_chunks/{booking-BtSOKjQu.js → booking-AabCk7CI.js} +1205 -1148
  4. package/dist/_chunks/booking-AabCk7CI.js.map +1 -0
  5. package/dist/_chunks/{sparkline-BmGcEyZO.js → sparkline-Dx_sxK3J.js} +228 -198
  6. package/dist/_chunks/sparkline-Dx_sxK3J.js.map +1 -0
  7. package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js +210 -0
  8. package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js.map +1 -0
  9. package/dist/agent-catalog.json +5 -2
  10. package/dist/agent-i18n/en.json +1 -1
  11. package/dist/components/booking/booking-types.d.ts +15 -0
  12. package/dist/components/booking/booking-types.d.ts.map +1 -1
  13. package/dist/components/booking/booking.d.ts.map +1 -1
  14. package/dist/components/booking/details-form.d.ts +7 -0
  15. package/dist/components/booking/details-form.d.ts.map +1 -1
  16. package/dist/components/booking/index.js +1 -1
  17. package/dist/components/index.d.ts +2 -2
  18. package/dist/components/index.d.ts.map +1 -1
  19. package/dist/components/sparkline/index.js +1 -1
  20. package/dist/components/sparkline/sparkline.agent.d.ts.map +1 -1
  21. package/dist/components/sparkline/sparkline.d.ts +6 -0
  22. package/dist/components/sparkline/sparkline.d.ts.map +1 -1
  23. package/dist/hooks/index.d.ts +1 -0
  24. package/dist/hooks/index.d.ts.map +1 -1
  25. package/dist/hooks/index.js +56 -54
  26. package/dist/hooks/use-zoom-drilldown.d.ts +23 -0
  27. package/dist/hooks/use-zoom-drilldown.d.ts.map +1 -0
  28. package/dist/host-compat.css +4 -1
  29. package/dist/i18n/locales/ar.d.ts +4 -0
  30. package/dist/i18n/locales/ar.d.ts.map +1 -1
  31. package/dist/i18n/locales/ar.js +4 -0
  32. package/dist/i18n/locales/ar.js.map +1 -1
  33. package/dist/i18n/locales/de.d.ts +4 -0
  34. package/dist/i18n/locales/de.d.ts.map +1 -1
  35. package/dist/i18n/locales/de.js +4 -0
  36. package/dist/i18n/locales/de.js.map +1 -1
  37. package/dist/i18n/locales/el.d.ts +4 -0
  38. package/dist/i18n/locales/el.d.ts.map +1 -1
  39. package/dist/i18n/locales/el.js +4 -0
  40. package/dist/i18n/locales/el.js.map +1 -1
  41. package/dist/i18n/locales/en.d.ts +4 -0
  42. package/dist/i18n/locales/en.d.ts.map +1 -1
  43. package/dist/i18n/locales/en.js +4 -0
  44. package/dist/i18n/locales/en.js.map +1 -1
  45. package/dist/i18n/locales/es.d.ts +4 -0
  46. package/dist/i18n/locales/es.d.ts.map +1 -1
  47. package/dist/i18n/locales/es.js +4 -0
  48. package/dist/i18n/locales/es.js.map +1 -1
  49. package/dist/i18n/locales/fr.d.ts +4 -0
  50. package/dist/i18n/locales/fr.d.ts.map +1 -1
  51. package/dist/i18n/locales/fr.js +4 -0
  52. package/dist/i18n/locales/fr.js.map +1 -1
  53. package/dist/i18n/locales/hi.d.ts +4 -0
  54. package/dist/i18n/locales/hi.d.ts.map +1 -1
  55. package/dist/i18n/locales/hi.js +4 -0
  56. package/dist/i18n/locales/hi.js.map +1 -1
  57. package/dist/i18n/locales/it.d.ts +4 -0
  58. package/dist/i18n/locales/it.d.ts.map +1 -1
  59. package/dist/i18n/locales/it.js +4 -0
  60. package/dist/i18n/locales/it.js.map +1 -1
  61. package/dist/i18n/locales/ja.d.ts +4 -0
  62. package/dist/i18n/locales/ja.d.ts.map +1 -1
  63. package/dist/i18n/locales/ja.js +4 -0
  64. package/dist/i18n/locales/ja.js.map +1 -1
  65. package/dist/i18n/locales/nl.d.ts +4 -0
  66. package/dist/i18n/locales/nl.d.ts.map +1 -1
  67. package/dist/i18n/locales/nl.js +4 -0
  68. package/dist/i18n/locales/nl.js.map +1 -1
  69. package/dist/i18n/locales/pl.d.ts +4 -0
  70. package/dist/i18n/locales/pl.d.ts.map +1 -1
  71. package/dist/i18n/locales/pl.js +4 -0
  72. package/dist/i18n/locales/pl.js.map +1 -1
  73. package/dist/i18n/locales/pt.d.ts +4 -0
  74. package/dist/i18n/locales/pt.d.ts.map +1 -1
  75. package/dist/i18n/locales/pt.js +4 -0
  76. package/dist/i18n/locales/pt.js.map +1 -1
  77. package/dist/i18n/locales/ro.d.ts +4 -0
  78. package/dist/i18n/locales/ro.d.ts.map +1 -1
  79. package/dist/i18n/locales/ro.js +4 -0
  80. package/dist/i18n/locales/ro.js.map +1 -1
  81. package/dist/i18n/locales/ru.d.ts +4 -0
  82. package/dist/i18n/locales/ru.d.ts.map +1 -1
  83. package/dist/i18n/locales/ru.js +4 -0
  84. package/dist/i18n/locales/ru.js.map +1 -1
  85. package/dist/i18n/locales/sq.d.ts +4 -0
  86. package/dist/i18n/locales/sq.d.ts.map +1 -1
  87. package/dist/i18n/locales/sq.js +4 -0
  88. package/dist/i18n/locales/sq.js.map +1 -1
  89. package/dist/i18n/locales/sv.d.ts +4 -0
  90. package/dist/i18n/locales/sv.d.ts.map +1 -1
  91. package/dist/i18n/locales/sv.js +4 -0
  92. package/dist/i18n/locales/sv.js.map +1 -1
  93. package/dist/i18n/locales/tr.d.ts +4 -0
  94. package/dist/i18n/locales/tr.d.ts.map +1 -1
  95. package/dist/i18n/locales/tr.js +4 -0
  96. package/dist/i18n/locales/tr.js.map +1 -1
  97. package/dist/i18n/locales/zh.d.ts +4 -0
  98. package/dist/i18n/locales/zh.d.ts.map +1 -1
  99. package/dist/i18n/locales/zh.js +4 -0
  100. package/dist/i18n/locales/zh.js.map +1 -1
  101. package/dist/index.js +1072 -1070
  102. package/dist/locales/ar.json +4 -0
  103. package/dist/locales/de.json +4 -0
  104. package/dist/locales/el.json +4 -0
  105. package/dist/locales/en.json +4 -0
  106. package/dist/locales/es.json +4 -0
  107. package/dist/locales/fr.json +4 -0
  108. package/dist/locales/hi.json +4 -0
  109. package/dist/locales/it.json +4 -0
  110. package/dist/locales/ja.json +4 -0
  111. package/dist/locales/nl.json +4 -0
  112. package/dist/locales/pl.json +4 -0
  113. package/dist/locales/pt.json +4 -0
  114. package/dist/locales/ro.json +4 -0
  115. package/dist/locales/ru.json +4 -0
  116. package/dist/locales/sq.json +4 -0
  117. package/dist/locales/sv.json +4 -0
  118. package/dist/locales/tr.json +4 -0
  119. package/dist/locales/zh.json +4 -0
  120. package/dist/patterns/anamnesis/index.js +1 -1
  121. package/dist/tokens.css +1 -1
  122. package/package.json +1 -1
  123. package/dist/_chunks/booking-BtSOKjQu.js.map +0 -1
  124. package/dist/_chunks/sparkline-BmGcEyZO.js.map +0 -1
  125. package/dist/_chunks/use-signing-session-CyOZWinp.js +0 -147
  126. package/dist/_chunks/use-signing-session-CyOZWinp.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sparkline-Dx_sxK3J.js","sources":["../../src/components/sparkline/use-linear-trend.ts","../../src/components/sparkline/sparkline.agent.ts","../../src/components/sparkline/sparkline.tsx"],"sourcesContent":["export type TrendDirection = 'increasing' | 'decreasing' | 'steady';\n\nexport interface LinearTrendResult {\n slope: number;\n direction: TrendDirection;\n}\n\nexport function useLinearTrend(data: number[]): LinearTrendResult {\n if (data.length < 2) {\n return { slope: 0, direction: 'steady' };\n }\n\n const n = data.length;\n const xMean = (n - 1) / 2;\n const yMean = data.reduce((sum, y) => sum + y, 0) / n;\n\n let numerator = 0;\n let denominator = 0;\n\n for (let i = 0; i < n; i++) {\n const dx = i - xMean;\n numerator += dx * (data[i] - yMean);\n denominator += dx * dx;\n }\n\n const slope = denominator === 0 ? 0 : numerator / denominator;\n const range = Math.max(...data) - Math.min(...data);\n const threshold = 0.01 * (range || 1);\n\n const direction: TrendDirection =\n Math.abs(slope) < threshold\n ? 'steady'\n : slope > 0\n ? 'increasing'\n : 'decreasing';\n\n return { slope, direction };\n}\n","import type { AgentAdapter } from '../../agent/types';\nimport type { SparklineHandle } from './sparkline';\n\nexport const sparklineAgent: AgentAdapter<SparklineHandle> = {\n id: 'sparkline',\n capabilities: [],\n // `select_annotation` enforces two preconditions silently and\n // `update_series` writes straight into ApexCharts, bypassing React —\n // so nothing in the React tree reflects what is actually rendered.\n // These slots are the checkable form of both.\n //\n // A9 boundary: an annotation `id` is the host's opaque key, so it is\n // exposed; `SparklineAnnotation.label` is human-readable and could\n // name a clinical event, so it is not. The plotted values are\n // measurements in a clinical sparkline and are never exposed — only\n // their count. `trend` from `useLinearTrend` is deliberately left out\n // for the same reason (still derived from the plotted values); adding\n // it needs a DS-maintainer sign-off.\n state: {\n annotationIds: {\n type: 'string[]',\n descriptionKey: 'ui.agent.sparkline.state.annotationIds',\n description:\n 'Ids of the annotations currently drawn, in declaration order. The only ids `select_annotation` will accept — check against this before calling. Ids only, never annotation labels.',\n read: (handle) => handle.getAnnotationIds(),\n },\n selectable: {\n type: 'boolean',\n descriptionKey: 'ui.agent.sparkline.state.selectable',\n description:\n 'True when the host wired an annotation-select handler. False means every `select_annotation` call is a no-op, whatever id is passed.',\n read: (handle) => handle.isSelectable(),\n },\n pointCount: {\n type: 'number',\n descriptionKey: 'ui.agent.sparkline.state.pointCount',\n description:\n 'Number of positions in the currently rendered series, unmeasured gaps included — reflecting whichever applied last, the `data` prop or an `update_series` call. A count only; the plotted values are never exposed.',\n read: (handle) => handle.getPointCount(),\n },\n },\n actions: {\n update_series: {\n // Replacing the rendered series mutates what the chart displays — write,\n // not read.\n safety: 'write',\n argsType: '{ data: number[] }',\n argsSchema: {\n type: 'object',\n properties: {\n data: {\n type: 'array',\n items: { type: 'number' },\n description: 'The new data points to render.',\n },\n },\n required: ['data'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.sparkline.actions.updateSeries',\n description:\n 'Replace the sparkline data without remounting. Writes straight into ApexCharts, bypassing React — read the `pointCount` slot back rather than expecting the host tree to reflect it. Host-supplied point labels are not updated, so the tooltip title is hidden after this call.',\n errors: [\n 'Per-point tooltip titles are hidden after this call — the host point labels describe the previous series, not the one written.',\n ],\n invoke: (handle, args: { data: number[] }) => {\n handle.updateSeries(args.data);\n },\n },\n export_png: {\n // Pure getter — returns an image of the current chart, no state change.\n safety: 'read',\n returns: 'string',\n returnsSchema: {\n type: 'string',\n description: 'A PNG image of the sparkline encoded as a data URI.',\n },\n descriptionKey: 'ui.agent.sparkline.actions.exportPng',\n description: 'Return a PNG data URI of the sparkline.',\n invoke: (handle) => handle.dataURI(),\n },\n select_annotation: {\n // Routes the host somewhere — the same thing a pointer press on the\n // annotation's band does. Nothing in the chart changes, but the host's\n // surface does, so it is not a read.\n safety: 'write',\n argsType: '{ annotationId: string }',\n argsSchema: {\n type: 'object',\n properties: {\n annotationId: {\n type: 'string',\n description:\n \"The annotation's id, as carried by data-annotation-hit-id on the pressable band. The decorative drawn marker carries the same value as data-annotation-id, but is not selectable.\",\n },\n },\n required: ['annotationId'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.sparkline.actions.selectAnnotation',\n description:\n 'Select a drawn annotation, as pressing its band would. No-op unless the host wired onAnnotationSelect and the id names an annotation that is currently drawn — check the `selectable` and `annotationIds` slots first, since neither failure produces a signal.',\n errors: [\n 'Silently ignored when `selectable` is false — the host wired no annotation-select handler.',\n 'Silently ignored when the id is not in `annotationIds` — that annotation is not currently drawn.',\n ],\n invoke: (handle, args: { annotationId: string }) => {\n handle.selectAnnotation(args.annotationId);\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'sparkline' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","import {\n forwardRef,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport ReactApexChart from 'react-apexcharts';\nimport ApexCharts from 'apexcharts';\nimport { getApexChartsTheme } from '../../tokens/apexcharts-theme';\nimport { useNeutraliseHiddenFocus } from '../_shared/use-neutralize-hidden-focus';\nimport { markerPath, type MarkerShape } from '../annotation-marker';\nimport { useLinearTrend } from './use-linear-trend';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { sparklineAgent } from './sparkline.agent';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst sparklineVariants = cva('ds:relative ds:inline-block ds:w-full', {\n variants: {\n size: {\n xs: 'ds:h-6',\n sm: 'ds:h-8',\n md: 'ds:h-10',\n // Applied when an explicit `height` prop is given: the wrapper\n // grows with the svg instead of clipping at the size's fixed height.\n auto: '',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\n/* Tone only TINTS the annotation — the shape is what distinguishes one\n * event from another (WCAG 1.4.1), matching AnnotationMarker's vocabulary. */\nconst annotationVariants = cva('', {\n variants: {\n tone: {\n neutral: 'ds:[--annotation-color:var(--muted-foreground)]',\n info: 'ds:[--annotation-color:var(--info)]',\n success: 'ds:[--annotation-color:var(--success)]',\n /* `--warning-readable`, not `--warning`: a 1.5px dashed line is a\n * non-text graphic (WCAG 1.4.11, 3:1), and yellow-500 is ~1.6:1 on a\n * light card. The token aliases back to `--warning` in dark. */\n warning: 'ds:[--annotation-color:var(--warning-readable)]',\n error: 'ds:[--annotation-color:var(--destructive)]',\n accent: 'ds:[--annotation-color:var(--accent)]',\n },\n },\n defaultVariants: { tone: 'neutral' },\n});\n\n/* A 24–40px sparkline cannot hold a 44px target, so the POINTER layer alone is\n * bled outward to reach it. The drawn layer is a separate div at `inset-y-0`;\n * nothing rendered moves.\n *\n * BOTH axes follow `--min-target-size`: the vertical bleed via the calc\n * variants below, and the JS band width by measuring the resolved token off\n * the wrapper (fallback 44). Under `.theme-accessible` (48px) the band\n * widens on both axes. `auto` (an explicit `height`) cannot be computed here\n * at all and inherits whatever the host set. */\nconst annotationHitVariants = cva(\n 'ds:pointer-events-none ds:absolute ds:inset-x-[2px]',\n {\n variants: {\n // Bleed to the target-size token, not a literal: (token − drawn)/−2 per\n // size, so `.theme-accessible` (48px) widens the band automatically —\n // the same calc idiom IconButton uses for its hit-area expansion.\n size: {\n xs: 'ds:inset-y-[calc((var(--min-target-size)-24px)/-2)]',\n sm: 'ds:inset-y-[calc((var(--min-target-size)-32px)/-2)]',\n md: 'ds:inset-y-[calc((var(--min-target-size)-40px)/-2)]',\n auto: 'ds:inset-y-0',\n },\n },\n defaultVariants: { size: 'md' },\n },\n);\n\n/* ------------------------------------------------------------------ */\n/* Constants */\n/* ------------------------------------------------------------------ */\n\nconst DIRECTION_ARROW = {\n increasing: '↑',\n decreasing: '↓',\n steady: '→',\n} as const;\n\nconst SIZE_HEIGHT: Record<'xs' | 'sm' | 'md', number> = {\n xs: 24,\n sm: 32,\n md: 40,\n};\n\n/** ApexCharts grid padding, in px. The plotted extent is the wrapper inset by\n * this on each edge, so the annotation overlay has to use the same number to\n * land its first/last position on the first/last data point. */\nconst PLOT_EDGE_PADDING = 2;\n\n/** Radius of an annotation's shape cap, in svg user units (= px here). Sized\n * against the SMALLEST sparkline it has to sit on (`xs`, 24px): a 5px cap is\n * ~a fifth of that height, still shape-legible, and no longer competes with\n * the series it annotates. */\nconst ANNOTATION_CAP_RADIUS = 2.5;\n\n/** FALLBACK pointer-band width, in px — the light/dark `--min-target-size`.\n * The live value is measured off the wrapper so `.theme-accessible` (48px)\n * widens the band; this constant only covers the tick before the first\n * measurement and non-browser environments. Wider than the token is never\n * allowed — a sparse set of annotations would turn the whole trend into a\n * click target. */\nconst ANNOTATION_HIT_WIDTH = 44;\n\ninterface AnnotationHitBand {\n annotation: SparklineAnnotation;\n x: number;\n width: number;\n}\n\n/**\n * The pointer bands for a set of annotations across a plot `plotWidth` px wide.\n * Pure — the geometry is the only part needing a measured width, and keeping it\n * out of the render is what makes it testable.\n *\n * Each annotation owns the strip from the midpoint of the gap behind it to the\n * midpoint of the gap ahead, clamped to the plot. Its band is 44px inside that\n * strip, centred on its line and slid inward where the strip's edge would cut\n * it — so a line on the first data point still gets a full band, and no band\n * reaches past the plot onto whatever sits beside the sparkline. Annotations\n * closer than 44px each keep half the gap: a press must mean exactly one.\n */\nfunction annotationHitBands(\n annotations: readonly SparklineAnnotation[],\n plotWidth: number,\n hitWidth: number = ANNOTATION_HIT_WIDTH,\n): AnnotationHitBand[] {\n const centred = annotations\n .map((annotation) => ({\n annotation,\n centre: clampFraction(annotation.position) * plotWidth,\n }))\n .sort((a, b) => a.centre - b.centre);\n\n return centred.map((entry, index) => {\n const before = centred[index - 1];\n const after = centred[index + 1];\n const from = before ? (before.centre + entry.centre) / 2 : 0;\n const to = after ? (entry.centre + after.centre) / 2 : plotWidth;\n const lower = Math.max(0, from);\n const upper = Math.min(plotWidth, to);\n const width = Math.min(hitWidth, Math.max(0, upper - lower));\n const x = Math.min(\n Math.max(entry.centre - width / 2, lower),\n upper - width,\n );\n return { annotation: entry.annotation, x, width };\n });\n}\n\nfunction clampFraction(value: number): number {\n if (!Number.isFinite(value)) return 0;\n return Math.min(1, Math.max(0, value));\n}\n\n/** The measurements in a series, gaps dropped. A `null` is an unmeasured\n * position, not a zero — it must not reach the min/max/trend maths. */\nfunction measured(data: readonly (number | null)[]): number[] {\n return data.filter((value): value is number => value != null);\n}\n\nfunction prefersReducedMotion(): boolean {\n return (\n typeof window !== 'undefined' &&\n window.matchMedia('(prefers-reduced-motion: reduce)').matches\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport interface SparklineHandle {\n updateSeries: (data: (number | null)[]) => void;\n updateOptions: (opts: ApexCharts.ApexOptions) => void;\n dataURI: () => Promise<string>;\n /** Fire the host's annotation handler for `id`, as a pointer press on that\n * annotation's band would. No-op when the sparkline is not selectable, or\n * when `id` names no currently drawn annotation. */\n selectAnnotation: (id: string) => void;\n /* ---- read-back: the two preconditions `selectAnnotation` silently\n * enforces, plus the series length ------------------------------- */\n /** Ids of the annotations currently drawn — the only ids `selectAnnotation`\n * will accept. Ids only: an annotation's `label` is human-readable and could\n * name a clinical event, so it is never exposed. */\n getAnnotationIds: () => string[];\n /** True when the host wired `onAnnotationSelect`. False means every\n * `selectAnnotation` call is a no-op. */\n isSelectable: () => boolean;\n /** Number of positions in the currently rendered series, gaps included.\n * A count only — the plotted values are measurements and stay private. */\n getPointCount: () => number;\n}\n\n/** Semantic tint for an annotation. Decorative reinforcement of `shape` —\n * never the only channel carrying which event this is. */\nexport type SparklineAnnotationTone =\n | 'neutral'\n | 'info'\n | 'success'\n | 'warning'\n | 'error'\n | 'accent';\n\n/**\n * A vertical reference line dropped across the plot — the release-annotation\n * pattern: \"something happened here, look at what the line does around it\".\n *\n * `position` is a FRACTION of the plotted x extent, not an index: `0` is the\n * first data point, `1` the last, `0.5` exactly halfway between them. That is\n * what lets an event that falls BETWEEN two points be placed at all, and what\n * lets the same event land at the same x in a column of stacked sparklines —\n * the caller derives the fraction once, from a domain the whole column shares,\n * rather than per-series from a point count that differs row to row.\n */\nexport interface SparklineAnnotation {\n /** Stable key — also emitted as `data-annotation-id` for test/agent hooks. */\n id: string;\n /** Fraction of the plotted x extent: 0 = first point, 1 = last. Clamped. */\n position: number;\n /** Accessible label, already localised by the caller. Folded into the\n * sparkline's own `aria-label` — the line itself says nothing aloud. */\n label: string;\n /** Shape of the cap drawn at the top of the line. The accessible channel. */\n shape?: MarkerShape;\n tone?: SparklineAnnotationTone;\n}\n\nexport interface SparklineProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'children'>,\n VariantProps<typeof sparklineVariants> {\n /** Data points in plot order. `null` is an unmeasured position — it holds\n * the point's place on the x extent and draws a gap, so a series measured\n * at some positions and not others stays aligned with one that was measured\n * at all of them. */\n data: (number | null)[];\n /** Chart visual style */\n variant?: 'line' | 'bar' | 'area';\n /** Size preset */\n size?: 'xs' | 'sm' | 'md';\n /** Accessible label prefix, e.g. \"Revenue, 30 days\" */\n label?: string;\n /** Stroke / bar colour override — defaults to var(--primary) via bridge */\n color?: string;\n /** Show end-point dot with trend direction arrow */\n showEndpoint?: boolean;\n /**\n * Show Apex's hover tooltip with the data point value. Defaults to\n * `false` — sparklines are intentionally minimal — opt in when the\n * sparkline is large enough to be a primary metric surface (e.g.\n * dashboard widgets) and the user benefits from per-point readout.\n */\n showTooltip?: boolean;\n /** Series name shown in the tooltip, already localised. Defaults to\n * `label`, so the tooltip never falls back to Apex's \"series-1\". */\n seriesName?: string;\n /** Tooltip title per point, same order and length as `data` (gaps\n * included). Omitted = no tooltip title. Never drawn on an axis. */\n pointLabels?: readonly string[];\n /** Width override — defaults to 100% of container */\n width?: string | number;\n /** Height override — defaults to the size variant height */\n height?: string | number;\n /** Vertical reference lines dropped across the plot. Omitted = none, so\n * every existing consumer is unaffected. */\n annotations?: readonly SparklineAnnotation[];\n /**\n * Make the drawn annotations POINTER-selectable — a press anywhere in an\n * annotation's 44px band calls this with its `id`. Omitted (the default, and\n * what every consumer before 1.1.0 gets) leaves them decorative, which is\n * what a dashboard sparkline wants: a trend thumbnail should not be a click\n * target.\n *\n * NOT a keyboard route, and deliberately so. The sparkline is `role=\"img\"`,\n * whose descendants are not exposed to assistive technology at all, so a\n * focusable control drawn inside it would be a tab stop with no accessible\n * name. The host MUST therefore already offer a keyboard control that does\n * the same thing for the same annotation (WCAG 2.1.1) — this is a pointer\n * shortcut to that control, never the only way in.\n *\n * The band is delivered by the `size` variants only, and follows\n * `--min-target-size` on both axes (48px under `.theme-accessible`). Pass\n * an explicit `height` and the pointer layer falls back to the drawn\n * height, so `height={20}` yields a 20px-tall target — below even WCAG\n * 2.5.8.\n */\n onAnnotationSelect?: (annotationId: string) => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* Sparkline component */\n/* ------------------------------------------------------------------ */\n\nexport const Sparkline = forwardRef<SparklineHandle, SparklineProps>(\n (\n {\n id,\n data,\n variant = 'line',\n size = 'md',\n label,\n color,\n showEndpoint = false,\n showTooltip = false,\n seriesName,\n pointLabels,\n width,\n height,\n annotations,\n onAnnotationSelect,\n className,\n ...props\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const rawId = useId();\n const chartId = useMemo(\n () => `sparkline-${rawId.replace(/[^a-zA-Z0-9-_]/g, '')}`,\n [rawId],\n );\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [containerWidth, setContainerWidth] = useState(0);\n const [hitWidth, setHitWidth] = useState(ANNOTATION_HIT_WIDTH);\n\n // Gaps are positions, not values: they hold the point's place on the x\n // extent but never reach the trend, the min/max, or the endpoint dot.\n const points = useMemo(() => measured(data), [data]);\n const { direction } = useLinearTrend(points);\n\n /* ---- accessible summary ---------------------------------------- */\n const ariaLabel = useMemo(() => {\n // The annotations are the only thing a vertical line in an SVG can say\n // aloud, so they ride the summary in every branch — including \"no data\",\n // where the marked events are all there is left to report.\n const marks =\n annotations && annotations.length > 0\n ? t('sparkline.annotations', {\n list: annotations.map((a) => a.label).join(', '),\n })\n : '';\n const withMarks = (summary: string) =>\n marks ? `${summary}. ${marks}` : summary;\n\n if (points.length === 0) {\n return withMarks(t('sparkline.noData', 'No data'));\n }\n const fmt = (n: number) => new Intl.NumberFormat(i18n.language).format(n);\n const dirText = t(`sparkline.direction.${direction}`);\n const nums = {\n min: fmt(Math.min(...points)),\n max: fmt(Math.max(...points)),\n current: fmt(points[points.length - 1]),\n direction: dirText,\n };\n if (label) {\n return withMarks(t('sparkline.summary', { label, ...nums }));\n }\n return withMarks(t('sparkline.summaryNoLabel', nums));\n }, [points, annotations, label, direction, i18n.language, t]);\n\n /* ---- theme-reactive state -------------------------------------- */\n const [themeOptions, setThemeOptions] = useState<ApexCharts.ApexOptions>(\n () => {\n try {\n return getApexChartsTheme();\n } catch {\n return {};\n }\n },\n );\n\n /* ---- MutationObserver: re-read theme on class change ----------- */\n useEffect(() => {\n let timer: ReturnType<typeof setTimeout>;\n const observer = new MutationObserver(() => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n try {\n setThemeOptions(getApexChartsTheme());\n } catch {\n /* no-op in non-browser environments */\n }\n }, 50);\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class'],\n });\n return () => {\n clearTimeout(timer);\n observer.disconnect();\n };\n }, []);\n\n /* ---- ResizeObserver: track container width -------------------- */\n useEffect(() => {\n const el = wrapperRef.current;\n if (!el) return;\n const measureTarget = () => {\n // The resolved token off the wrapper: theme classes live above the\n // component, so the cascade answers for whichever theme applies.\n const raw = getComputedStyle(el).getPropertyValue('--min-target-size');\n const parsed = Number.parseFloat(raw);\n if (Number.isFinite(parsed) && parsed > 0) setHitWidth(parsed);\n };\n measureTarget();\n const ro = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry) setContainerWidth(Math.floor(entry.contentRect.width));\n measureTarget();\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, []);\n\n /* ApexCharts injects focusable canvases inside the `aria-hidden` */\n /* chart wrapper. Neutralise their tabindex so axe's */\n /* `aria-hidden-focus` rule passes. Shared hook — same fix in */\n /* `Chart` (full apex) and the calendar's mirror events. */\n useNeutraliseHiddenFocus(wrapperRef);\n\n /* ---- imperative handle ---------------------------------------- */\n // Through a ref so the handle keeps one identity across a host that\n // re-creates the callback on every render — the agent registry keys on it.\n const selectRef = useRef(onAnnotationSelect);\n useEffect(() => {\n selectRef.current = onAnnotationSelect;\n }, [onAnnotationSelect]);\n // Assigned during render, not in an effect: an agent may call before the\n // next commit, and routing the host to an annotation that is not drawn\n // opens a panel addressed to nothing.\n const drawnRef = useRef(annotations);\n drawnRef.current = annotations;\n // The `data` prop and `updateSeries` are two independent paths into\n // the rendered series — the latter writes straight into ApexCharts,\n // bypassing React — so track whichever applied last. Keyed on the\n // prop (not assigned every render) so an unrelated re-render does\n // not clobber a length an agent just set.\n // Read by `updateSeries`, which replaces the whole series. Never\n // undefined: Apex swaps an undefined name for \"series-1\", while an\n // empty one renders no name at all.\n const resolvedSeriesName = seriesName ?? label ?? '';\n const seriesNameRef = useRef(resolvedSeriesName);\n seriesNameRef.current = resolvedSeriesName;\n const pointCountRef = useRef(data.length);\n // Point labels and their slot map, read by the tooltip formatter through\n // a ref so a formatter Apex already holds never reads stale labels.\n const tooltipLabelsRef = useRef<{\n labels?: readonly string[];\n slotOf?: readonly number[];\n shown: boolean;\n }>({ shown: false });\n // Set by `updateSeries`: the host's labels describe the old series, so\n // the title stays hidden until the host passes new `data`.\n const labelsStaleRef = useRef(false);\n useEffect(() => {\n pointCountRef.current = data.length;\n if (!labelsStaleRef.current) return;\n labelsStaleRef.current = false;\n if (tooltipLabelsRef.current.shown) {\n ApexCharts.getChartByID(chartId)?.updateOptions({\n tooltip: { x: { show: true } },\n });\n }\n }, [data, chartId]);\n\n const agentHandle = useMemo<SparklineHandle>(\n () => ({\n updateSeries(newData: (number | null)[]) {\n const chart = ApexCharts.getChartByID(chartId);\n chart?.updateSeries([{ name: seriesNameRef.current, data: newData }]);\n pointCountRef.current = newData.length;\n if (tooltipLabelsRef.current.shown) {\n labelsStaleRef.current = true;\n chart?.updateOptions({ tooltip: { x: { show: false } } });\n }\n },\n updateOptions(opts: ApexCharts.ApexOptions) {\n ApexCharts.getChartByID(chartId)?.updateOptions(opts);\n },\n async dataURI(): Promise<string> {\n const instance = ApexCharts.getChartByID(chartId);\n if (!instance) return '';\n const result = await instance.dataURI();\n return (result as { imgURI: string }).imgURI;\n },\n selectAnnotation(annotationId: string) {\n const drawn = drawnRef.current?.some((a) => a.id === annotationId);\n if (!drawn) return;\n selectRef.current?.(annotationId);\n },\n // Read-back for the two preconditions `selectAnnotation` enforces\n // silently — without these an agent can check neither and gets no\n // signal from either failure.\n getAnnotationIds: () => (drawnRef.current ?? []).map((a) => a.id),\n isSelectable: () => selectRef.current != null,\n getPointCount: () => pointCountRef.current,\n }),\n [chartId],\n );\n useImperativeHandle(ref, () => agentHandle, [agentHandle]);\n useAgentRegistration(sparklineAgent, agentHandle, id);\n\n /* ---- resolve color -------------------------------------------- */\n const resolvedColor = color ?? themeOptions.colors?.[0] ?? 'currentColor';\n\n /* ---- empty state ---------------------------------------------- */\n if (points.length === 0) {\n return (\n <div\n ref={wrapperRef}\n role=\"img\"\n aria-label={ariaLabel}\n dir=\"ltr\"\n className={sparklineVariants({\n size: height !== undefined ? 'auto' : size,\n className,\n })}\n data-component=\"sparkline\"\n data-component-id={id}\n {...props}\n />\n );\n }\n\n /* ---- chart config ---------------------------------------------- */\n const reducedMotion = prefersReducedMotion();\n\n // A gapped series is plotted as {x, y} pairs on a NUMERIC axis pinned to\n // the full slot count, not as an array with holes in it: ApexCharts draws\n // a line only between consecutive non-null points, so a lab measured at\n // slots 0, 4 and 8 would render as three isolated points and no trend at\n // all. Pairs keep each measurement at its own slot, connect across the\n // gap, and leave the extent — and so every annotation — unchanged.\n // Gapless data keeps the plain-array form, so every existing consumer\n // renders byte-identically.\n const gapped = data.length > points.length;\n const seriesData = gapped\n ? data.flatMap((y, x) => (y == null ? [] : [{ x, y }]))\n : points;\n\n // Apex hands the tooltip the index into the SERIES, whose gaps are\n // removed, so map it back to its slot in `data` before reading a label.\n const slotOf = gapped\n ? data.flatMap((y, slot) => (y == null ? [] : [slot]))\n : undefined;\n tooltipLabelsRef.current = {\n labels: pointLabels,\n slotOf,\n shown: showTooltip && pointLabels !== undefined,\n };\n const tooltip: ApexCharts.ApexOptions['tooltip'] = showTooltip\n ? {\n enabled: true,\n x: pointLabels\n ? {\n show: true,\n formatter: (_value, opts) => {\n const { labels, slotOf: slots } = tooltipLabelsRef.current;\n if (labelsStaleRef.current || !labels) return '';\n const index = opts?.dataPointIndex ?? -1;\n return labels[slots ? (slots[index] ?? -1) : index] ?? '';\n },\n }\n : // No labels: hide the title rather than show a raw index.\n { show: false },\n }\n : { enabled: false };\n\n const chartOptions: ApexCharts.ApexOptions = {\n ...themeOptions,\n chart: {\n ...themeOptions.chart,\n id: chartId,\n type: variant,\n sparkline: { enabled: true },\n toolbar: { show: false },\n animations: {\n enabled: !reducedMotion,\n // A gapped series is re-rendered as {x, y} pairs, and Apex's\n // update tween interpolates between the old and new paths point by\n // point. Across a width change the two have different lengths and\n // the tween emits `d=\"… NaN …\"` for a few frames. The finished\n // render is correct either way; switching the tween off keeps the\n // console clean.\n dynamicAnimation: { enabled: !reducedMotion && !gapped },\n },\n zoom: { enabled: false },\n parentHeightOffset: 0,\n },\n colors: [resolvedColor],\n stroke: {\n curve: 'smooth',\n width: variant === 'bar' ? 0 : 2,\n },\n fill: {\n opacity: variant === 'area' ? 0.15 : 1,\n },\n xaxis: {\n crosshairs: { show: false },\n // Pin the extent to the slot count so a gap at either end still holds\n // its place — otherwise the plot would rescale to the measurements\n // and the annotation fractions would no longer mean the same thing.\n ...(gapped\n ? { type: 'numeric' as const, min: 0, max: data.length - 1 }\n : {}),\n },\n tooltip,\n markers: showEndpoint\n ? {\n size: [0],\n discrete: [\n {\n // An index into the SERIES, whose holes have already been\n // removed — so this is the last MEASURED point, never a slot\n // the parameter was not measured at.\n seriesIndex: 0,\n dataPointIndex: seriesData.length - 1,\n fillColor: resolvedColor,\n strokeColor: resolvedColor,\n size: 4,\n },\n ],\n }\n : { size: 0 },\n grid: {\n ...themeOptions.grid,\n show: false,\n // ApexCharts grid.padding uses physical keys (not CSS logical properties).\n // The chart wrapper enforces dir=\"ltr\" so these always resolve correctly.\n padding: {\n top: PLOT_EDGE_PADDING,\n right: PLOT_EDGE_PADDING,\n bottom: PLOT_EDGE_PADDING,\n left: PLOT_EDGE_PADDING,\n },\n },\n };\n\n const resolvedWidth =\n width ?? (containerWidth > 0 ? containerWidth : '100%');\n const resolvedHeight = height ?? SIZE_HEIGHT[size ?? 'md'];\n\n // Positioned as a percentage of the overlay's own box rather than from a\n // measured width: the overlay is inset to the plot area, so a fraction is\n // exact at any size and cannot lag or disagree with the plot.\n const drawnAnnotations = annotations?.length ? annotations : undefined;\n\n // The plot box in px — the overlay is the wrapper inset by the grid padding\n // on each edge. Nothing is measured before the first ResizeObserver tick,\n // and a band with no width lies about where it is: no width, no bands.\n const plotWidth = containerWidth - PLOT_EDGE_PADDING * 2;\n const hitBands =\n onAnnotationSelect && drawnAnnotations && plotWidth > 0\n ? annotationHitBands(drawnAnnotations, plotWidth, hitWidth)\n : undefined;\n\n return (\n <div\n ref={wrapperRef}\n role=\"img\"\n aria-label={ariaLabel}\n dir=\"ltr\"\n className={sparklineVariants({\n size: height !== undefined ? 'auto' : size,\n className,\n })}\n data-component=\"sparkline\"\n data-component-id={id}\n {...props}\n >\n <ReactApexChart\n type={variant}\n series={[{ name: resolvedSeriesName, data: seriesData }]}\n options={chartOptions}\n width={resolvedWidth}\n height={resolvedHeight}\n aria-hidden=\"true\"\n />\n {drawnAnnotations && (\n /* Drawn over the plot rather than through ApexCharts' own xaxis\n annotations: a fraction of the measured extent is the one\n positioning rule that survives series of different lengths, which\n is what makes a column of sparklines share an x. */\n /* The inset lives on a div: an <svg> is a replaced element, so\n left+right do not size it and it would fall back to its intrinsic\n 300px. The div is the plot box; the svg fills it. The 2px MUST\n equal PLOT_EDGE_PADDING — Tailwind needs a static literal, so the\n two cannot share one source; change them together or the first and\n last annotation drift off the first and last data point. */\n <div className=\"ds:pointer-events-none ds:absolute ds:inset-y-0 ds:inset-x-[2px]\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n data-testid=\"sparkline-annotations\"\n className=\"ds:size-full\"\n >\n {drawnAnnotations.map((annotation) => {\n const fraction = clampFraction(annotation.position);\n return (\n /* A nested viewport placed at a percentage of the plot: the\n one positioning rule that needs no measurement, so a column\n of sparklines shares an x whatever their widths. */\n <svg\n key={annotation.id}\n x={`${fraction * 100}%`}\n y=\"0\"\n width=\"1\"\n height=\"100%\"\n overflow=\"visible\"\n data-annotation-id={annotation.id}\n data-annotation-position={fraction}\n className={annotationVariants({ tone: annotation.tone })}\n >\n <line\n x1={0}\n x2={0}\n y1={0}\n y2=\"100%\"\n /* 1px, more gap than dash: the line marks WHERE, the\n series is what is read, and at 1.5px the annotation\n was the louder of the two. */\n className=\"ds:[stroke:var(--annotation-color)] ds:[stroke-dasharray:2_3] ds:[stroke-width:1]\"\n />\n <path\n d={markerPath(\n annotation.shape ?? 'diamond',\n 0,\n ANNOTATION_CAP_RADIUS,\n ANNOTATION_CAP_RADIUS,\n )}\n className=\"ds:[fill:var(--annotation-color)]\"\n />\n </svg>\n );\n })}\n </svg>\n </div>\n )}\n {hitBands && onAnnotationSelect && (\n /* Sized in px, not percentages: the target size is a measurement,\n not a fraction of a box the reader can resize.\n `pointer-events-none` holds all the way down to the bands, so the\n only live pixels are the token-width each annotation owns. */\n <div\n className={annotationHitVariants({\n size: height !== undefined ? 'auto' : size,\n })}\n >\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n data-testid=\"sparkline-annotation-hits\"\n className=\"ds:size-full\"\n >\n {hitBands.map(({ annotation, x, width }) => (\n <g\n key={annotation.id}\n data-annotation-hit-id={annotation.id}\n onClick={() => onAnnotationSelect(annotation.id)}\n className={`ds:group ds:pointer-events-auto ds:cursor-pointer ${annotationVariants(\n { tone: annotation.tone },\n )}`}\n >\n {/* A native tooltip for the pointer that can act on it. The\n same labels already ride the wrapper's aria-label, and\n this svg is aria-hidden, so nothing is said twice. */}\n <title>\n {t('sparkline.annotationAction', {\n label: annotation.label,\n })}\n </title>\n {/* Target and hover affordance in one rect: it tints on\n hover so the reader sees which event the press means.\n Opacity does not affect hit-testing. */}\n <rect\n x={x}\n y={0}\n width={width}\n height=\"100%\"\n className=\"ds:[fill:var(--annotation-color)] ds:opacity-0 ds:transition-opacity ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:group-hover:opacity-20\"\n />\n </g>\n ))}\n </svg>\n </div>\n )}\n {showEndpoint && (\n <span\n aria-hidden=\"true\"\n className=\"ds:pointer-events-none ds:absolute ds:end-0 ds:top-0 ds:text-[length:var(--font-size-xs)] ds:leading-none\"\n >\n {DIRECTION_ARROW[direction]}\n </span>\n )}\n </div>\n );\n },\n);\n\nSparkline.displayName = 'Sparkline';\n"],"names":["useLinearTrend","data","n","xMean","yMean","sum","y","numerator","denominator","i","dx","slope","threshold","direction","sparklineAgent","handle","args","sparklineVariants","cva","annotationVariants","annotationHitVariants","DIRECTION_ARROW","SIZE_HEIGHT","PLOT_EDGE_PADDING","ANNOTATION_CAP_RADIUS","ANNOTATION_HIT_WIDTH","annotationHitBands","annotations","plotWidth","hitWidth","centred","annotation","clampFraction","b","entry","index","before","after","from","to","lower","upper","width","x","value","measured","prefersReducedMotion","Sparkline","forwardRef","id","variant","size","label","color","showEndpoint","showTooltip","seriesName","pointLabels","height","onAnnotationSelect","className","props","ref","t","i18n","useTranslation","rawId","useId","chartId","useMemo","wrapperRef","useRef","containerWidth","setContainerWidth","useState","setHitWidth","points","ariaLabel","marks","a","withMarks","summary","fmt","dirText","nums","themeOptions","setThemeOptions","getApexChartsTheme","useEffect","timer","observer","el","measureTarget","raw","parsed","ro","entries","useNeutraliseHiddenFocus","selectRef","drawnRef","resolvedSeriesName","seriesNameRef","pointCountRef","tooltipLabelsRef","labelsStaleRef","_a","ApexCharts","agentHandle","newData","chart","opts","instance","annotationId","_b","useImperativeHandle","useAgentRegistration","resolvedColor","jsx","reducedMotion","gapped","seriesData","slotOf","slot","tooltip","_value","labels","slots","chartOptions","resolvedWidth","resolvedHeight","drawnAnnotations","hitBands","jsxs","ReactApexChart","fraction","markerPath"],"mappings":";;;;;;;;;AAOO,SAASA,GAAeC,GAAmC;AAChE,MAAIA,EAAK,SAAS;AAChB,WAAO,EAAE,OAAO,GAAG,WAAW,SAAA;AAGhC,QAAMC,IAAID,EAAK,QACTE,KAASD,IAAI,KAAK,GAClBE,IAAQH,EAAK,OAAO,CAACI,GAAKC,MAAMD,IAAMC,GAAG,CAAC,IAAIJ;AAEpD,MAAIK,IAAY,GACZC,IAAc;AAElB,WAASC,IAAI,GAAGA,IAAIP,GAAGO,KAAK;AAC1B,UAAMC,IAAKD,IAAIN;AACf,IAAAI,KAAaG,KAAMT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;AAAA,kBACZ,WAAU;AAAA,kBACV,eAAY;AAAA,kBACZ,WAAU;AAAA,kBAET,UAAAc,GAAS,IAAI,CAAC,EAAE,YAAApG,GAAY,GAAAY,GAAG,OAAAD,QAC9B,gBAAA0F;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBAEC,0BAAwBrG,EAAW;AAAA,sBACnC,SAAS,MAAM4B,EAAmB5B,EAAW,EAAE;AAAA,sBAC/C,WAAW,qDAAqDZ;AAAA,wBAC9D,EAAE,MAAMY,EAAW,KAAA;AAAA,sBAAK,CACzB;AAAA,sBAKD,UAAA;AAAA,wBAAA,gBAAAsF,EAAC,SAAA,EACE,YAAE,8BAA8B;AAAA,0BAC/B,OAAOtF,EAAW;AAAA,wBAAA,CACnB,GACH;AAAA,wBAIA,gBAAAsF;AAAA,0BAAC;AAAA,0BAAA;AAAA,4BACC,GAAA1E;AAAA,4BACA,GAAG;AAAA,4BACH,OAAOD;AAAAA,4BACP,QAAO;AAAA,4BACP,WAAU;AAAA,0BAAA;AAAA,wBAAA;AAAA,sBACZ;AAAA,oBAAA;AAAA,oBAxBKX,EAAW;AAAA,kBAAA,CA0BnB;AAAA,gBAAA;AAAA,cAAA;AAAA,YACH;AAAA,UAAA;AAAA,UAGHuB,KACC,gBAAA+D;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,eAAY;AAAA,cACZ,WAAU;AAAA,cAET,aAAgBxG,CAAS;AAAA,YAAA;AAAA,UAAA;AAAA,QAC5B;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAkC,GAAU,cAAc;"}
@@ -0,0 +1,210 @@
1
+ import { useRef as I, useEffect as M, useState as F, useMemo as E, useCallback as s } from "react";
2
+ import { flushSync as R } from "react-dom";
3
+ function x(e) {
4
+ return e != null && e.current ? e.current : typeof document > "u" ? null : document;
5
+ }
6
+ function O(e, l) {
7
+ const c = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : (
8
+ // SSR / jsdom fallback — drop every character that's
9
+ // significant in a CSS attribute selector. Conservative but
10
+ // robust enough for the test environment.
11
+ e.replace(/["'\\[\]]/g, "")
12
+ ), d = `[data-error-anchor="${c}"], [name="${c}"], [name$="[${c}]"]`, u = Array.from(l.querySelectorAll(d));
13
+ return u.length === 0 ? null : u.find((p) => p.offsetParent !== null) ?? u[0];
14
+ }
15
+ function $(e, l, c = {}) {
16
+ const {
17
+ scope: d,
18
+ scrollOptions: u = { behavior: "smooth", block: "center" },
19
+ focus: a = !0,
20
+ skipInitialMount: p = !0
21
+ } = c, o = I(!1), f = I(null), i = l.find((h) => !!e[h]) ?? null;
22
+ M(() => {
23
+ if (p && !o.current) {
24
+ o.current = !0, f.current = i;
25
+ return;
26
+ }
27
+ if (!i) {
28
+ f.current = null;
29
+ return;
30
+ }
31
+ if (i === f.current || typeof window > "u") return;
32
+ const h = window.requestAnimationFrame(() => {
33
+ const g = x(d);
34
+ if (!g) return;
35
+ const t = O(i, g);
36
+ t && (t.scrollIntoView(u), a && t.focus({ preventScroll: !0 }), f.current = i);
37
+ });
38
+ return () => window.cancelAnimationFrame(h);
39
+ }, [i]);
40
+ }
41
+ function k(e, l = !1) {
42
+ const c = {};
43
+ for (const d of e)
44
+ c[d.id] = { signed: l ? !1 : !!d.signed };
45
+ return c;
46
+ }
47
+ function D(e) {
48
+ const [l, c] = F(
49
+ () => k(e)
50
+ ), [d, u] = F(null), [a, p] = F(
51
+ () => {
52
+ var n;
53
+ return ((n = e[0]) == null ? void 0 : n.id) ?? null;
54
+ }
55
+ ), o = E(
56
+ () => e.map((n) => {
57
+ const r = l[n.id];
58
+ return {
59
+ ...n,
60
+ signed: r ? r.signed : !!n.signed,
61
+ payload: r == null ? void 0 : r.payload
62
+ };
63
+ }),
64
+ [e, l]
65
+ ), f = E(
66
+ () => o.reduce((n, r) => r.signed ? n + 1 : n, 0),
67
+ [o]
68
+ ), i = o.length, h = i > 0 && f === i, g = s((n) => {
69
+ u(n);
70
+ }, []), t = s(() => {
71
+ u(null);
72
+ }, []), w = s((n, r) => {
73
+ c((m) => ({ ...m, [n]: { signed: !0, payload: r } })), u((m) => m === n ? null : m);
74
+ }, []), T = s(
75
+ (n) => {
76
+ var r;
77
+ return !!((r = l[n]) != null && r.signed);
78
+ },
79
+ [l]
80
+ ), S = s(() => {
81
+ var n;
82
+ c(k(e, !0)), u(null), p(((n = e[0]) == null ? void 0 : n.id) ?? null);
83
+ }, [e]), C = s(() => {
84
+ p((n) => {
85
+ const r = o.length;
86
+ if (r === 0) return null;
87
+ const m = n ? o.findIndex((y) => y.id === n) : -1;
88
+ return o[(m + 1 + r) % r].id;
89
+ });
90
+ }, [o]), v = s(() => {
91
+ p((n) => {
92
+ const r = o.length;
93
+ if (r === 0) return null;
94
+ const m = n ? o.findIndex((y) => y.id === n) : 0;
95
+ return o[(m - 1 + r) % r].id;
96
+ });
97
+ }, [o]), A = s(() => {
98
+ p((n) => {
99
+ const r = o.length;
100
+ if (r === 0) return n;
101
+ const m = n ? o.findIndex((y) => y.id === n) : -1;
102
+ for (let y = 1; y <= r; y += 1) {
103
+ const b = o[(m + y) % r];
104
+ if (!b.signed) return b.id;
105
+ }
106
+ return n;
107
+ });
108
+ }, [o]);
109
+ return E(
110
+ () => ({
111
+ fields: o,
112
+ signedCount: f,
113
+ total: i,
114
+ isComplete: h,
115
+ activeFieldId: d,
116
+ openField: g,
117
+ closeField: t,
118
+ markSigned: w,
119
+ isFieldSigned: T,
120
+ reset: S,
121
+ cursorFieldId: a,
122
+ goToNextField: C,
123
+ goToPreviousField: v,
124
+ goToNextUnsigned: A
125
+ }),
126
+ [
127
+ o,
128
+ f,
129
+ i,
130
+ h,
131
+ d,
132
+ g,
133
+ t,
134
+ w,
135
+ T,
136
+ S,
137
+ a,
138
+ C,
139
+ v,
140
+ A
141
+ ]
142
+ );
143
+ }
144
+ const q = "ds-zoom-drilldown", L = () => {
145
+ if (typeof document > "u") return null;
146
+ const e = document.querySelector("main");
147
+ return e ? e.querySelector("[data-radix-scroll-area-viewport]") ?? e.closest("[data-radix-scroll-area-viewport]") ?? e : null;
148
+ }, N = (e) => typeof e.startViewTransition == "function" && typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("view-transition-class", q);
149
+ function P(e = {}) {
150
+ const [l, c] = F(null), d = I(
151
+ null
152
+ ), u = I(e.getScrollContainer);
153
+ u.current = e.getScrollContainer;
154
+ const a = s(
155
+ () => (u.current ?? L)(),
156
+ []
157
+ ), p = s(() => {
158
+ const t = a();
159
+ return {
160
+ window: typeof window < "u" ? window.scrollY : 0,
161
+ container: t ? t.scrollTop : 0
162
+ };
163
+ }, [a]), o = s(() => {
164
+ const t = d.current;
165
+ if (!t) return;
166
+ d.current = null;
167
+ let w = 0;
168
+ const T = () => {
169
+ const S = a();
170
+ typeof window < "u" && window.scrollTo({ top: t.window }), S && (S.scrollTop = t.container), !((typeof window > "u" || Math.abs(window.scrollY - t.window) < 2) && (!S || Math.abs(S.scrollTop - t.container) < 2)) && w < 20 && (w += 1, requestAnimationFrame(T));
171
+ };
172
+ T();
173
+ }, [a]), f = s(() => {
174
+ const t = a();
175
+ typeof window < "u" && window.scrollTo({ top: 0 }), t && (t.scrollTop = 0);
176
+ }, [a]), i = s(
177
+ (t) => {
178
+ var v;
179
+ const w = document, T = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, S = t === null;
180
+ if (T || !N(w) || !w.startViewTransition) {
181
+ R(() => c(t)), S ? o() : f();
182
+ return;
183
+ }
184
+ const C = w.startViewTransition(() => {
185
+ R(() => c(t)), S || f();
186
+ });
187
+ S && ((v = C == null ? void 0 : C.finished) == null || v.then(o, o));
188
+ },
189
+ [o, f]
190
+ ), h = s(
191
+ (t) => {
192
+ d.current = p(), i(t);
193
+ },
194
+ [p, i]
195
+ ), g = s(() => i(null), [i]);
196
+ return M(() => {
197
+ if (l === null) return;
198
+ const t = (w) => {
199
+ w.key === "Escape" && !w.defaultPrevented && g();
200
+ };
201
+ return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
202
+ }, [l, g]), { selected: l, open: h, close: g };
203
+ }
204
+ export {
205
+ q as Z,
206
+ D as a,
207
+ P as b,
208
+ $ as u
209
+ };
210
+ //# sourceMappingURL=use-zoom-drilldown-qCX34w9I.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-zoom-drilldown-qCX34w9I.js","sources":["../../src/hooks/use-scroll-to-first-error.ts","../../src/hooks/use-signing-session.ts","../../src/hooks/use-zoom-drilldown.ts"],"sourcesContent":["import { useEffect, useRef, type RefObject } from 'react';\n\n/* -------------------------------------------------------------------- */\n/* Types */\n/* -------------------------------------------------------------------- */\n\nexport interface UseScrollToFirstErrorOptions {\n /**\n * Limits the DOM query to this element. Useful when the page renders\n * more than one form, or when an unrelated component happens to share\n * a field name. Defaults to `document`.\n */\n scope?: RefObject<HTMLElement | null>;\n /**\n * Forwarded to `scrollIntoView`. Defaults to\n * `{ behavior: 'smooth', block: 'center' }`. Pass\n * `{ behavior: 'auto' }` (or omit `behavior`) on consumers that\n * respect `prefers-reduced-motion` upstream — the kit doesn't shadow\n * the user's motion preference inside the hook, since some consumers\n * deliberately keep a near-instant snap for power-user form flows.\n */\n scrollOptions?: ScrollIntoViewOptions;\n /**\n * Move keyboard focus to the errored field after scrolling. Default\n * `true`. The focus call uses `preventScroll: true` so the smooth\n * scroll the hook just did isn't replaced by a snap.\n *\n * Setting this `false` defeats the keyboard-user side of WCAG 3.3.1\n * — the viewport will scroll but the active element stays on the\n * submit button, forcing a Shift+Tab back into the form. Only flip\n * this off when an upstream concern (e.g. a custom error summary\n * panel that owns its own focus) is taking responsibility.\n */\n focus?: boolean;\n /**\n * On the very first render, do nothing even if `errors` already has\n * entries. Default `true`. Without this the hook would yank the\n * viewport whenever a form is hydrated with server-rendered errors\n * from a no-JS fallback path — bad UX, since the user landed on the\n * page and hasn't asked for any movement yet. Set `false` only when\n * the consumer explicitly wants the initial-mount scroll (rare).\n */\n skipInitialMount?: boolean;\n}\n\n/* -------------------------------------------------------------------- */\n/* Helpers */\n/* -------------------------------------------------------------------- */\n\nfunction getScopeRoot(\n scope: RefObject<HTMLElement | null> | undefined,\n): ParentNode | null {\n if (scope?.current) return scope.current;\n if (typeof document === 'undefined') return null;\n return document;\n}\n\n/**\n * Resolve the DOM element to scroll/focus for a given errored field\n * name. The match order is:\n *\n * 1. `[data-error-anchor=\"<name>\"]` — the consumer's explicit hook,\n * used for Radix-based fields (Checkbox / Select / Switch) where\n * the named `<input>` is hidden behind a visible `<button>`.\n * Consumers set this on the trigger.\n * 2. `[name=\"<name>\"]` — the literal field name.\n * 3. `[name$=\"[<name>]\"]` — Symfony form-prefixed names like\n * `privacy_generator[fiscal_code]`. Suffix match keeps the hook\n * consumer-agnostic; no need to thread the form prefix through.\n *\n * Returns the first visible element among the matches. \"Visible\" here\n * means `offsetParent !== null` — that's the cheap heuristic Radix's\n * hidden inputs (display:none-equivalent positioning) fail and the\n * visible triggers pass. Falls back to the first match if every match\n * is hidden, so a field can still be scrolled into view even when the\n * trigger uses a non-standard layout.\n */\nfunction findErrorElement(name: string, root: ParentNode): HTMLElement | null {\n // `CSS.escape` is load-bearing here, not cosmetic. The Symfony\n // suffix-match arm embeds `name` inside `[name$=\"[${safe}]\"]`, so a\n // field name containing `]` would otherwise close the attribute\n // selector early and turn the rest of the string into stray\n // selector tokens. We don't expect adversarial input in practice\n // (server-controlled field names), but a server returning a `]`\n // in a 422 payload shouldn't be able to break the query.\n const safe =\n typeof CSS !== 'undefined' && typeof CSS.escape === 'function'\n ? CSS.escape(name)\n : // SSR / jsdom fallback — drop every character that's\n // significant in a CSS attribute selector. Conservative but\n // robust enough for the test environment.\n name.replace(/[\"'\\\\[\\]]/g, '');\n const selector =\n `[data-error-anchor=\"${safe}\"], ` +\n `[name=\"${safe}\"], ` +\n `[name$=\"[${safe}]\"]`;\n\n const matches = Array.from(root.querySelectorAll<HTMLElement>(selector));\n if (matches.length === 0) return null;\n\n const visible = matches.find((el) => el.offsetParent !== null);\n return visible ?? matches[0];\n}\n\n/* -------------------------------------------------------------------- */\n/* Hook */\n/* -------------------------------------------------------------------- */\n\n/**\n * Scrolls the first errored field into view and (by default) focuses\n * it, after `errors` changes. Backs the standard AlfaDocs rebrand\n * validation-error UX: after a 422 with `{ errors: { field: message } }`\n * is rendered inline, the user shouldn't be left staring at red labels\n * they can't see. Implements WCAG 3.3.1 / 3.3.3.\n *\n * The hook is stateless and never mutates the DOM beyond the\n * `scrollIntoView` + `focus` calls.\n *\n * @example\n * const fieldOrder = ['firstName', 'email', 'fiscalCode'] as const;\n * const [errors, setErrors] = useState<Record<string, string>>({});\n * useScrollToFirstError(errors, fieldOrder);\n *\n * @example Radix-based field\n * <Checkbox data-error-anchor=\"consent\" name=\"consent\" />\n * // hook scrolls to the visible <button>, not Radix's hidden input.\n *\n * @example Scoped to one form\n * const formRef = useRef<HTMLFormElement>(null);\n * useScrollToFirstError(errors, fieldOrder, { scope: formRef });\n */\nexport function useScrollToFirstError(\n errors: Readonly<Record<string, string | undefined>>,\n fieldOrder: ReadonlyArray<string>,\n options: UseScrollToFirstErrorOptions = {},\n): void {\n const {\n scope,\n scrollOptions = { behavior: 'smooth', block: 'center' },\n focus = true,\n skipInitialMount = true,\n } = options;\n\n // Single ref guards the initial-mount skip across StrictMode's\n // mount/unmount/remount cycle — flipped inside the effect body, not\n // in cleanup, so the second run sees `true` and stays gated.\n const ranOnceRef = useRef(false);\n\n // Track the previous \"first errored field name\" so a re-render that\n // leaves the same field errored doesn't re-scroll. We intentionally\n // depend on the resolved name (not the whole errors object) — that\n // way callers can mutate `errors` shape freely as long as the head\n // of the validation list is stable, which is the typical pattern\n // after a server returns the same 422 twice in a row.\n const lastScrolledFieldRef = useRef<string | null>(null);\n\n // Resolve the first errored field by visual order. A field is\n // \"errored\" iff its key has a truthy string value — the kit's form\n // contract is `Record<string, string | undefined>` where `undefined`\n // / missing keys mean \"no error\".\n const firstErroredField =\n fieldOrder.find((name) => Boolean(errors[name])) ?? null;\n\n useEffect(() => {\n if (skipInitialMount && !ranOnceRef.current) {\n ranOnceRef.current = true;\n // Record what we skipped so the next render doesn't try to\n // scroll to a field that was already errored at mount.\n lastScrolledFieldRef.current = firstErroredField;\n return;\n }\n\n if (!firstErroredField) {\n lastScrolledFieldRef.current = null;\n return;\n }\n\n if (firstErroredField === lastScrolledFieldRef.current) return;\n\n if (typeof window === 'undefined') return;\n\n // rAF defers the scroll until after the browser has laid out the\n // freshly-rendered error labels. Calling scrollIntoView synchronously\n // inside useEffect would fire before the new DOM is painted on\n // some browsers, leaving the viewport pointing at the old layout.\n const handle = window.requestAnimationFrame(() => {\n const root = getScopeRoot(scope);\n if (!root) return;\n const el = findErrorElement(firstErroredField, root);\n if (!el) return;\n\n el.scrollIntoView(scrollOptions);\n if (focus) {\n // preventScroll: true so the browser doesn't override the\n // smooth scroll above with a snap to put the element at the\n // top of the viewport.\n el.focus({ preventScroll: true });\n }\n lastScrolledFieldRef.current = firstErroredField;\n });\n\n return () => window.cancelAnimationFrame(handle);\n // `scrollOptions` / `focus` / `scope` / `skipInitialMount` are\n // option bag values — re-running on their identity change would\n // be surprising. The hook re-fires only when the field at the\n // head of the errored list changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [firstErroredField]);\n}\n","import { useCallback, useMemo, useState } from 'react';\n\n/* ------------------------------------------------------------------ */\n/* useSigningSession */\n/* */\n/* Orchestration state for a multi-field signing flow: N signature */\n/* fields across M pages (and optionally multiple PDFs per envelope), */\n/* a live \"X of Y signed\" counter, and a completion gate. Pure state — */\n/* no I/O, no globals, no persistence. The consumer owns the documents, */\n/* the capture UI, and where signatures are sent. */\n/* */\n/* Generic over the field shape (so geometry / page / docIndex / label */\n/* ride along untouched and `fields` can map straight onto SignatureField)*/\n/* and over the captured payload type (typically SignatureConfirmPayload).*/\n/* */\n/* The SET of field ids and their initial `signed` flags are captured at */\n/* first render — an envelope's fields are fixed for the session. Field */\n/* geometry/label changes still flow through `fields` on every render. */\n/* ------------------------------------------------------------------ */\n\n/** Minimum shape a signing field must satisfy. */\nexport interface SigningFieldBase {\n /** Stable, unique id for the field within the session. */\n id: string;\n /** Initial signed state (default `false`). */\n signed?: boolean;\n}\n\ninterface SignedEntry<TPayload> {\n signed: boolean;\n payload?: TPayload;\n}\n\n/** A consumer field enriched with the session's live signed state + payload. */\nexport type SigningField<TField extends SigningFieldBase, TPayload> = TField & {\n signed: boolean;\n payload?: TPayload;\n};\n\nexport interface UseSigningSessionReturn<\n TField extends SigningFieldBase,\n TPayload,\n> {\n /** The input fields, each enriched with live `signed` + `payload`. */\n fields: SigningField<TField, TPayload>[];\n /** How many fields are currently signed. */\n signedCount: number;\n /** Total number of fields. */\n total: number;\n /** True when every field is signed (and there is at least one). */\n isComplete: boolean;\n /** The field whose capture UI is currently open, or `null`. */\n activeFieldId: string | null;\n /** Open a field's capture UI (sets `activeFieldId`). */\n openField: (id: string) => void;\n /** Close any open capture UI (clears `activeFieldId`). */\n closeField: () => void;\n /** Flip a field to signed, storing its payload, and close it if active. */\n markSigned: (id: string, payload?: TPayload) => void;\n /** Read a single field's signed state. */\n isFieldSigned: (id: string) => boolean;\n /** Clear all signatures and close any open field. */\n reset: () => void;\n /** The field currently targeted by next/previous navigation, or `null`. */\n cursorFieldId: string | null;\n /** Move the navigation cursor to the next field (input order, cycling). */\n goToNextField: () => void;\n /** Move the navigation cursor to the previous field (cycling). */\n goToPreviousField: () => void;\n /** Move the cursor to the next still-unsigned field (cycling); no-op if all signed. */\n goToNextUnsigned: () => void;\n}\n\nfunction seedSigned<TField extends SigningFieldBase, TPayload>(\n fields: TField[],\n forceUnsigned = false,\n): Record<string, SignedEntry<TPayload>> {\n const map: Record<string, SignedEntry<TPayload>> = {};\n for (const field of fields) {\n map[field.id] = { signed: forceUnsigned ? false : Boolean(field.signed) };\n }\n return map;\n}\n\nexport function useSigningSession<\n TField extends SigningFieldBase,\n TPayload = unknown,\n>(fields: TField[]): UseSigningSessionReturn<TField, TPayload> {\n const [signed, setSigned] = useState<Record<string, SignedEntry<TPayload>>>(\n () => seedSigned<TField, TPayload>(fields),\n );\n const [activeFieldId, setActiveFieldId] = useState<string | null>(null);\n const [cursorFieldId, setCursorFieldId] = useState<string | null>(\n () => fields[0]?.id ?? null,\n );\n\n const enriched = useMemo<SigningField<TField, TPayload>[]>(\n () =>\n fields.map((field) => {\n const entry = signed[field.id];\n return {\n ...field,\n signed: entry ? entry.signed : Boolean(field.signed),\n payload: entry?.payload,\n };\n }),\n [fields, signed],\n );\n\n const signedCount = useMemo(\n () =>\n enriched.reduce((count, field) => (field.signed ? count + 1 : count), 0),\n [enriched],\n );\n const total = enriched.length;\n const isComplete = total > 0 && signedCount === total;\n\n const openField = useCallback((id: string) => {\n setActiveFieldId(id);\n }, []);\n\n const closeField = useCallback(() => {\n setActiveFieldId(null);\n }, []);\n\n const markSigned = useCallback((id: string, payload?: TPayload) => {\n setSigned((prev) => ({ ...prev, [id]: { signed: true, payload } }));\n setActiveFieldId((current) => (current === id ? null : current));\n }, []);\n\n const isFieldSigned = useCallback(\n (id: string) => Boolean(signed[id]?.signed),\n [signed],\n );\n\n const reset = useCallback(() => {\n setSigned(seedSigned<TField, TPayload>(fields, true));\n setActiveFieldId(null);\n setCursorFieldId(fields[0]?.id ?? null);\n }, [fields]);\n\n const goToNextField = useCallback(() => {\n setCursorFieldId((cur) => {\n const len = enriched.length;\n if (len === 0) return null;\n const i = cur ? enriched.findIndex((f) => f.id === cur) : -1;\n return enriched[(i + 1 + len) % len].id;\n });\n }, [enriched]);\n\n const goToPreviousField = useCallback(() => {\n setCursorFieldId((cur) => {\n const len = enriched.length;\n if (len === 0) return null;\n const i = cur ? enriched.findIndex((f) => f.id === cur) : 0;\n return enriched[(i - 1 + len) % len].id;\n });\n }, [enriched]);\n\n const goToNextUnsigned = useCallback(() => {\n setCursorFieldId((cur) => {\n const len = enriched.length;\n if (len === 0) return cur;\n const start = cur ? enriched.findIndex((f) => f.id === cur) : -1;\n for (let step = 1; step <= len; step += 1) {\n const field = enriched[(start + step) % len];\n if (!field.signed) return field.id;\n }\n return cur;\n });\n }, [enriched]);\n\n return useMemo(\n () => ({\n fields: enriched,\n signedCount,\n total,\n isComplete,\n activeFieldId,\n openField,\n closeField,\n markSigned,\n isFieldSigned,\n reset,\n cursorFieldId,\n goToNextField,\n goToPreviousField,\n goToNextUnsigned,\n }),\n [\n enriched,\n signedCount,\n total,\n isComplete,\n activeFieldId,\n openField,\n closeField,\n markSigned,\n isFieldSigned,\n reset,\n cursorFieldId,\n goToNextField,\n goToPreviousField,\n goToNextUnsigned,\n ],\n );\n}\n","// Expand-from-position drill-down: wraps the View Transitions API with a\n// feature-detect, a reduced-motion fallback, Esc-to-close and scroll restore.\n// Animation rules ship in ./use-zoom-drilldown.css (folded into tokens.css).\nimport { useCallback, useEffect, useRef, useState } from 'react';\nimport { flushSync } from 'react-dom';\n\n/**\n * The `view-transition-class` the shipped CSS targets. Add it as a class name\n * to the source element and the detail, next to their shared\n * `view-transition-name`. The kit sheet maps the class to the property.\n */\nexport const ZOOM_DRILLDOWN_TRANSITION_CLASS = 'ds-zoom-drilldown' as const;\n\nexport interface UseZoomDrilldownOptions {\n /** Resolver for the scroll container whose scrollTop should be preserved\n * across the transition. Defaults to the nearest `<main>` element in\n * the document (or the Radix ScrollArea viewport around it). The window\n * scroll position is always tracked alongside. */\n getScrollContainer?: () => HTMLElement | null;\n}\n\nexport interface UseZoomDrilldownReturn<Id extends string> {\n /** The open drill-down target, or `null` while the source view shows. */\n readonly selected: Id | null;\n /** Zoom into `id`: saves the scroll position and enters at the top. */\n readonly open: (id: Id) => void;\n /** Zoom back out and restore the saved scroll position. */\n readonly close: () => void;\n}\n\ntype DocumentWithViewTransitions = Document & {\n startViewTransition?: (callback: () => void) => { finished?: Promise<void> };\n};\n\nconst defaultGetScrollContainer = (): HTMLElement | null => {\n if (typeof document === 'undefined') return null;\n const main = document.querySelector<HTMLElement>('main');\n if (!main) return null;\n // AppFrame layouts scroll a ScrollArea VIEWPORT rather than <main> itself.\n return (\n main.querySelector<HTMLElement>('[data-radix-scroll-area-viewport]') ??\n main.closest<HTMLElement>('[data-radix-scroll-area-viewport]') ??\n main\n );\n};\n\n// The scoped CSS only matches where `view-transition-class` is supported.\n// Elsewhere the UA default animation would ignore --animation-duration (and\n// the accessible themes' 0ms), so those browsers get the instant swap too.\nconst canAnimate = (doc: DocumentWithViewTransitions): boolean =>\n typeof doc.startViewTransition === 'function' &&\n typeof CSS !== 'undefined' &&\n typeof CSS.supports === 'function' &&\n CSS.supports('view-transition-class', ZOOM_DRILLDOWN_TRANSITION_CLASS);\n\nexport function useZoomDrilldown<Id extends string>(\n options: UseZoomDrilldownOptions = {},\n): UseZoomDrilldownReturn<Id> {\n const [selected, setSelected] = useState<Id | null>(null);\n // Captured on open(), restored after close() settles.\n const savedScrollRef = useRef<{ window: number; container: number } | null>(\n null,\n );\n // Through a ref so an inline resolver does not give open/close a new\n // identity on every render (and re-attach the Escape listener with it).\n const resolverRef = useRef(options.getScrollContainer);\n resolverRef.current = options.getScrollContainer;\n const getScrollContainer = useCallback(\n () => (resolverRef.current ?? defaultGetScrollContainer)(),\n [],\n );\n\n const readScroll = useCallback(() => {\n const containerEl = getScrollContainer();\n return {\n window: typeof window !== 'undefined' ? window.scrollY : 0,\n container: containerEl ? containerEl.scrollTop : 0,\n };\n }, [getScrollContainer]);\n\n const restoreScroll = useCallback(() => {\n const saved = savedScrollRef.current;\n if (!saved) return;\n savedScrollRef.current = null;\n // Async content can still be growing the page, so a single scrollTo may\n // clamp short. Re-apply over a few frames until it sticks.\n let tries = 0;\n const apply = () => {\n const containerEl = getScrollContainer();\n if (typeof window !== 'undefined') {\n window.scrollTo({ top: saved.window });\n }\n if (containerEl) containerEl.scrollTop = saved.container;\n const settled =\n (typeof window === 'undefined' ||\n Math.abs(window.scrollY - saved.window) < 2) &&\n (!containerEl || Math.abs(containerEl.scrollTop - saved.container) < 2);\n if (!settled && tries < 20) {\n tries += 1;\n requestAnimationFrame(apply);\n }\n };\n apply();\n }, [getScrollContainer]);\n\n // A drill-down always enters at its top, not at the depth scrolled behind it.\n const scrollToTop = useCallback(() => {\n const containerEl = getScrollContainer();\n if (typeof window !== 'undefined') window.scrollTo({ top: 0 });\n if (containerEl) containerEl.scrollTop = 0;\n }, [getScrollContainer]);\n\n const transition = useCallback(\n (next: Id | null) => {\n const doc = document as DocumentWithViewTransitions;\n const reduce =\n typeof window !== 'undefined' &&\n typeof window.matchMedia === 'function' &&\n window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n const isClosing = next === null;\n if (reduce || !canAnimate(doc) || !doc.startViewTransition) {\n flushSync(() => setSelected(next));\n if (isClosing) restoreScroll();\n else scrollToTop();\n return;\n }\n const vt = doc.startViewTransition(() => {\n flushSync(() => setSelected(next));\n // Inside the callback so the new view is captured already at its top.\n if (!isClosing) scrollToTop();\n });\n if (isClosing) {\n vt?.finished?.then(restoreScroll, restoreScroll);\n }\n },\n [restoreScroll, scrollToTop],\n );\n\n const open = useCallback(\n (id: Id) => {\n savedScrollRef.current = readScroll();\n transition(id);\n },\n [readScroll, transition],\n );\n const close = useCallback(() => transition(null), [transition]);\n\n useEffect(() => {\n if (selected === null) return;\n const onKey = (event: KeyboardEvent) => {\n // An overlay inside the detail (Radix Select, Popover, Dialog) calls\n // preventDefault when Escape dismisses it: leave the drill-down open.\n if (event.key === 'Escape' && !event.defaultPrevented) close();\n };\n window.addEventListener('keydown', onKey);\n return () => window.removeEventListener('keydown', onKey);\n }, [selected, close]);\n\n return { selected, open, close };\n}\n"],"names":["getScopeRoot","scope","findErrorElement","name","root","safe","selector","matches","el","useScrollToFirstError","errors","fieldOrder","options","scrollOptions","focus","skipInitialMount","ranOnceRef","useRef","lastScrolledFieldRef","firstErroredField","useEffect","handle","seedSigned","fields","forceUnsigned","map","field","useSigningSession","signed","setSigned","useState","activeFieldId","setActiveFieldId","cursorFieldId","setCursorFieldId","_a","enriched","useMemo","entry","signedCount","count","total","isComplete","openField","useCallback","id","closeField","markSigned","payload","prev","current","isFieldSigned","reset","goToNextField","cur","len","i","f","goToPreviousField","goToNextUnsigned","start","step","ZOOM_DRILLDOWN_TRANSITION_CLASS","defaultGetScrollContainer","main","canAnimate","doc","useZoomDrilldown","selected","setSelected","savedScrollRef","resolverRef","getScrollContainer","readScroll","containerEl","restoreScroll","saved","tries","apply","scrollToTop","transition","next","reduce","isClosing","flushSync","vt","open","close","onKey","event"],"mappings":";;AAiDA,SAASA,EACPC,GACmB;AACnB,SAAIA,KAAA,QAAAA,EAAO,UAAgBA,EAAM,UAC7B,OAAO,WAAa,MAAoB,OACrC;AACT;AAsBA,SAASC,EAAiBC,GAAcC,GAAsC;AAQ5E,QAAMC,IACJ,OAAO,MAAQ,OAAe,OAAO,IAAI,UAAW,aAChD,IAAI,OAAOF,CAAI;AAAA;AAAA;AAAA;AAAA,IAIfA,EAAK,QAAQ,cAAc,EAAE;AAAA,KAC7BG,IACJ,uBAAuBD,CAAI,cACjBA,CAAI,gBACFA,CAAI,OAEZE,IAAU,MAAM,KAAKH,EAAK,iBAA8BE,CAAQ,CAAC;AACvE,SAAIC,EAAQ,WAAW,IAAU,OAEjBA,EAAQ,KAAK,CAACC,MAAOA,EAAG,iBAAiB,IAAI,KAC3CD,EAAQ,CAAC;AAC7B;AA6BO,SAASE,EACdC,GACAC,GACAC,IAAwC,CAAA,GAClC;AACN,QAAM;AAAA,IACJ,OAAAX;AAAA,IACA,eAAAY,IAAgB,EAAE,UAAU,UAAU,OAAO,SAAA;AAAA,IAC7C,OAAAC,IAAQ;AAAA,IACR,kBAAAC,IAAmB;AAAA,EAAA,IACjBH,GAKEI,IAAaC,EAAO,EAAK,GAQzBC,IAAuBD,EAAsB,IAAI,GAMjDE,IACJR,EAAW,KAAK,CAACR,MAAS,EAAQO,EAAOP,CAAI,CAAE,KAAK;AAEtD,EAAAiB,EAAU,MAAM;AACd,QAAIL,KAAoB,CAACC,EAAW,SAAS;AAC3C,MAAAA,EAAW,UAAU,IAGrBE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AMoC,EAAW,IAAI,GAAG,CAACA,CAAU,CAAC;AAE9D,SAAA5D,EAAU,MAAM;AACd,QAAIgD,MAAa,KAAM;AACvB,UAAMoB,IAAQ,CAACC,MAAyB;AAGtC,MAAIA,EAAM,QAAQ,YAAY,CAACA,EAAM,oBAAkBF,EAAA;AAAA,IACzD;AACA,kBAAO,iBAAiB,WAAWC,CAAK,GACjC,MAAM,OAAO,oBAAoB,WAAWA,CAAK;AAAA,EAC1D,GAAG,CAACpB,GAAUmB,CAAK,CAAC,GAEb,EAAE,UAAAnB,GAAU,MAAAkB,GAAM,OAAAC,EAAA;AAC3B;"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "1.28.3",
3
+ "packageVersion": "1.30.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -12858,7 +12858,10 @@
12858
12858
  ]
12859
12859
  },
12860
12860
  "idempotent": true,
12861
- "description": "Replace the sparkline data without remounting. Writes straight into ApexCharts, bypassing React — read the `pointCount` slot back rather than expecting the host tree to reflect it.",
12861
+ "errors": [
12862
+ "Per-point tooltip titles are hidden after this call — the host point labels describe the previous series, not the one written."
12863
+ ],
12864
+ "description": "Replace the sparkline data without remounting. Writes straight into ApexCharts, bypassing React — read the `pointCount` slot back rather than expecting the host tree to reflect it. Host-supplied point labels are not updated, so the tooltip title is hidden after this call.",
12862
12865
  "descriptionKey": "ui.agent.sparkline.actions.updateSeries"
12863
12866
  },
12864
12867
  {
@@ -1322,7 +1322,7 @@
1322
1322
  "pointCount": "Number of positions in the currently rendered series, unmeasured gaps included — reflecting whichever applied last, the `data` prop or an `update_series` call. A count only; the plotted values are never exposed."
1323
1323
  },
1324
1324
  "actions": {
1325
- "updateSeries": "Replace the sparkline data without remounting. Writes straight into ApexCharts, bypassing React — read the `pointCount` slot back rather than expecting the host tree to reflect it.",
1325
+ "updateSeries": "Replace the sparkline data without remounting. Writes straight into ApexCharts, bypassing React — read the `pointCount` slot back rather than expecting the host tree to reflect it. Host-supplied point labels are not updated, so the tooltip title is hidden after this call.",
1326
1326
  "exportPng": "Return a PNG data URI of the sparkline.",
1327
1327
  "selectAnnotation": "Select a drawn annotation, as pressing its band would. No-op unless the host wired onAnnotationSelect and the id names an annotation that is currently drawn — check the `selectable` and `annotationIds` slots first, since neither failure produces a signal."
1328
1328
  }
@@ -31,6 +31,15 @@ export interface BookingService {
31
31
  specialtyId?: string;
32
32
  /** Operators who can perform this service. */
33
33
  operatorIds?: string[];
34
+ /**
35
+ * Practice-authored plain text the patient must read and accept before
36
+ * the booking can be submitted (the platform's
37
+ * `criticalInformationToAccept` on a booking reason). When present, the
38
+ * details step renders it above the consents with a required checkbox;
39
+ * when absent, the step adds nothing. Always rendered as text, never as
40
+ * HTML: a practice cannot inject markup through it.
41
+ */
42
+ criticalInformationToAccept?: string;
34
43
  }
35
44
  export interface BookingOperator {
36
45
  id: string;
@@ -55,6 +64,12 @@ export interface BookingDetails {
55
64
  mobilePhone: string;
56
65
  privacyConsent: boolean;
57
66
  termsConsent: boolean;
67
+ /**
68
+ * `true` once the patient has ticked the acceptance box for the selected
69
+ * service's `criticalInformationToAccept`. Present in the submit payload
70
+ * only when the service carries that text; omitted otherwise.
71
+ */
72
+ criticalInformationAccepted?: boolean;
58
73
  codiceFiscale?: string;
59
74
  dateOfBirth?: string;
60
75
  insuranceNumber?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"booking-types.d.ts","sourceRoot":"","sources":["../../../src/components/booking/booking-types.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMjE,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAMf,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjD,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,UAAU,GAAG,KA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;;;;;;;;;;;OAoBG;IACH,eAAe,CAAC,EAAE,gBAAgB,GAAG,eAAe,CAAC;IACrD;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,wBAAwB,CAAC,EAAE,SAAS,CAAC;IAGrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"booking-types.d.ts","sourceRoot":"","sources":["../../../src/components/booking/booking-types.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMjE,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAMf,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEjD,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,CAAC;AAE/D,0DAA0D;AAC1D,eAAO,MAAM,0BAA0B,EAAE,SAAS,mBAAmB,EAI3D,CAAC;AAEX,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC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;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb"}
@@ -1 +1 @@
1
- {"version":3,"file":"booking.d.ts","sourceRoot":"","sources":["../../../src/components/booking/booking.tsx"],"names":[],"mappings":"AA8EA,OAAO,KAAK,EAIV,YAAY,EAOb,MAAM,iBAAiB,CAAC;AA4BzB,YAAY,EACV,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AA+iF1C,eAAO,MAAM,OAAO,yGAglBnB,CAAC"}
1
+ {"version":3,"file":"booking.d.ts","sourceRoot":"","sources":["../../../src/components/booking/booking.tsx"],"names":[],"mappings":"AA8EA,OAAO,KAAK,EAIV,YAAY,EAOb,MAAM,iBAAiB,CAAC;AA4BzB,YAAY,EACV,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AA+iF1C,eAAO,MAAM,OAAO,yGAwmBnB,CAAC"}
@@ -13,6 +13,13 @@ export interface BookingDetailsFormProps {
13
13
  showReturningPatientFlag?: boolean;
14
14
  privacyPolicyUrl?: string;
15
15
  termsUrl?: string;
16
+ /**
17
+ * The selected service's `criticalInformationToAccept`. When set (and not
18
+ * blank), a "Before you book" block renders above the consents and the
19
+ * patient must tick its checkbox before submit enables. Rendered as
20
+ * plain text — never parsed as HTML.
21
+ */
22
+ criticalInformationToAccept?: string;
16
23
  validateCodiceFiscale?: BookingValidator;
17
24
  validateInsuranceNumber?: BookingValidator;
18
25
  submitting?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"details-form.d.ts","sourceRoot":"","sources":["../../../src/components/booking/details-form.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAkBf,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAqBzB,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAG5D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,yFAAyF;IACzF,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,aAAa,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAGnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,qBAAqB,CAAC,EAAE,gBAAgB,CAAC;IACzC,uBAAuB,CAAC,EAAE,gBAAgB,CAAC;IAG3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8EAA8E;IAC9E,WAAW,CAAC,EAAE,SAAS,CAAC;IAIxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAG7B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,mBA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AAE,MAAM,CAAC;IAG7B;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC7C,oEAAoE;IACpE,2BAA2B,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACpD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAaD,eAAO,MAAM,kBAAkB,qHAynB9B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-BtSOKjQu.js";
1
+ import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-AabCk7CI.js";
2
2
  export {
3
3
  A as Booking,
4
4
  R as CONFIRMATION_CHANNEL_ORDER,
@@ -1,5 +1,5 @@
1
- export { usePrefersReducedMotion, useMediaQuery, useScrollToFirstError, useLocale, useTheme, resolveTheme, themeClassList, THEME_CLASS, THEME_STORAGE_KEY, ACCESSIBILITY_STORAGE_KEY, useSigningSession, } from '../hooks';
2
- export type { LocaleDir, UseLocaleReturn, UseScrollToFirstErrorOptions, ThemePreference, AccessibilityPreference, ResolvedTheme, UseThemeReturn, SigningField, SigningFieldBase, UseSigningSessionReturn, } from '../hooks';
1
+ export { usePrefersReducedMotion, useMediaQuery, useScrollToFirstError, useLocale, useTheme, resolveTheme, themeClassList, THEME_CLASS, THEME_STORAGE_KEY, ACCESSIBILITY_STORAGE_KEY, useSigningSession, useZoomDrilldown, ZOOM_DRILLDOWN_TRANSITION_CLASS, } from '../hooks';
2
+ export type { LocaleDir, UseLocaleReturn, UseScrollToFirstErrorOptions, ThemePreference, AccessibilityPreference, ResolvedTheme, UseThemeReturn, SigningField, SigningFieldBase, UseSigningSessionReturn, UseZoomDrilldownOptions, UseZoomDrilldownReturn, } from '../hooks';
3
3
  export * from './button';
4
4
  export * from './button-group';
5
5
  export * from './floating-action-button';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,uBAA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B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAO3B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAG9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { S as r, s, u as n } from "../../_chunks/sparkline-BmGcEyZO.js";
1
+ import { S as r, s, u as n } from "../../_chunks/sparkline-Dx_sxK3J.js";
2
2
  export {
3
3
  r as Sparkline,
4
4
  s as sparklineAgent,
@@ -1 +1 @@
1
- {"version":3,"file":"sparkline.agent.d.ts","sourceRoot":"","sources":["../../../src/components/sparkline/sparkline.agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,cAAc,EAAE,YAAY,CAAC,eAAe,CAiHxD,CAAC"}
1
+ {"version":3,"file":"sparkline.agent.d.ts","sourceRoot":"","sources":["../../../src/components/sparkline/sparkline.agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,cAAc,EAAE,YAAY,CAAC,eAAe,CAoHxD,CAAC"}
@@ -73,6 +73,12 @@ export interface SparklineProps extends Omit<HTMLAttributes<HTMLDivElement>, 'ro
73
73
  * dashboard widgets) and the user benefits from per-point readout.
74
74
  */
75
75
  showTooltip?: boolean;
76
+ /** Series name shown in the tooltip, already localised. Defaults to
77
+ * `label`, so the tooltip never falls back to Apex's "series-1". */
78
+ seriesName?: string;
79
+ /** Tooltip title per point, same order and length as `data` (gaps
80
+ * included). Omitted = no tooltip title. Never drawn on an axis. */
81
+ pointLabels?: readonly string[];
76
82
  /** Width override — defaults to 100% of container */
77
83
  width?: string | number;
78
84
  /** Height override — defaults to the size variant height */