@alfadocs/ui-kit-debug 1.3.11 → 1.3.13

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 (72) hide show
  1. package/dist/_chunks/{anamnesis-i18n-DFXSM72N.js → anamnesis-i18n-CfC0qYzy.js} +883 -875
  2. package/dist/_chunks/anamnesis-i18n-CfC0qYzy.js.map +1 -0
  3. package/dist/_chunks/{appointment-timeline-BB-c1LeR.js → appointment-timeline-B630OT_J.js} +2 -2
  4. package/dist/_chunks/{appointment-timeline-BB-c1LeR.js.map → appointment-timeline-B630OT_J.js.map} +1 -1
  5. package/dist/_chunks/{bmi-calculator-Bk2GAju7.js → bmi-calculator-CM0-G2mg.js} +2 -2
  6. package/dist/_chunks/{bmi-calculator-Bk2GAju7.js.map → bmi-calculator-CM0-G2mg.js.map} +1 -1
  7. package/dist/_chunks/{booking-BxFV0hT5.js → booking-DjNbd7C1.js} +2 -2
  8. package/dist/_chunks/{booking-BxFV0hT5.js.map → booking-DjNbd7C1.js.map} +1 -1
  9. package/dist/_chunks/{cycle-calculator-DNvvr0bP.js → cycle-calculator-BwqYVPB4.js} +3 -3
  10. package/dist/_chunks/{cycle-calculator-DNvvr0bP.js.map → cycle-calculator-BwqYVPB4.js.map} +1 -1
  11. package/dist/_chunks/{date-picker-BP_W6VtE.js → date-picker-ZHejTVAJ.js} +81 -77
  12. package/dist/_chunks/date-picker-ZHejTVAJ.js.map +1 -0
  13. package/dist/_chunks/{due-date-calculator-BEcdoy_E.js → due-date-calculator-CwfsFd3T.js} +3 -3
  14. package/dist/_chunks/{due-date-calculator-BEcdoy_E.js.map → due-date-calculator-CwfsFd3T.js.map} +1 -1
  15. package/dist/_chunks/{fetal-weight-1F9N4IMx.js → fetal-weight-ePlLjJPc.js} +2 -2
  16. package/dist/_chunks/{fetal-weight-1F9N4IMx.js.map → fetal-weight-ePlLjJPc.js.map} +1 -1
  17. package/dist/_chunks/{gestational-age-calculator-CuGkVqKp.js → gestational-age-calculator-DdgbH69Z.js} +2 -2
  18. package/dist/_chunks/{gestational-age-calculator-CuGkVqKp.js.map → gestational-age-calculator-DdgbH69Z.js.map} +1 -1
  19. package/dist/_chunks/{hcg-doubling-fZ6qQN08.js → hcg-doubling-BBqD2wI2.js} +2 -2
  20. package/dist/_chunks/{hcg-doubling-fZ6qQN08.js.map → hcg-doubling-BBqD2wI2.js.map} +1 -1
  21. package/dist/_chunks/{link-cell-renderer-_DlEZHLI.js → link-cell-renderer-C5XLwVXQ.js} +2 -2
  22. package/dist/_chunks/{link-cell-renderer-_DlEZHLI.js.map → link-cell-renderer-C5XLwVXQ.js.map} +1 -1
  23. package/dist/_chunks/number-input-DrozbZAU.js +370 -0
  24. package/dist/_chunks/number-input-DrozbZAU.js.map +1 -0
  25. package/dist/_chunks/{optical-prescription-BEjYQjiO.js → optical-prescription-BDHJr8Zz.js} +2 -2
  26. package/dist/_chunks/{optical-prescription-BEjYQjiO.js.map → optical-prescription-BDHJr8Zz.js.map} +1 -1
  27. package/dist/_chunks/{patient-details-BAUg0FWs.js → patient-details-DqjjwPmt.js} +3 -3
  28. package/dist/_chunks/{patient-details-BAUg0FWs.js.map → patient-details-DqjjwPmt.js.map} +1 -1
  29. package/dist/_chunks/{patient-table-C7QHFC63.js → patient-table-BmIDrLIS.js} +2 -2
  30. package/dist/_chunks/{patient-table-C7QHFC63.js.map → patient-table-BmIDrLIS.js.map} +1 -1
  31. package/dist/_chunks/{pregnancy-dating-BdFl-rB1.js → pregnancy-dating-DzYTlBkT.js} +3 -3
  32. package/dist/_chunks/{pregnancy-dating-BdFl-rB1.js.map → pregnancy-dating-DzYTlBkT.js.map} +1 -1
  33. package/dist/_chunks/{pregnancy-weight-gain-B-CkVYnU.js → pregnancy-weight-gain-O6J0sUIi.js} +2 -2
  34. package/dist/_chunks/{pregnancy-weight-gain-B-CkVYnU.js.map → pregnancy-weight-gain-O6J0sUIi.js.map} +1 -1
  35. package/dist/_chunks/{radiograph-panel.agent-AsXJBr1p.js → radiograph-panel.agent-BQZ64Riy.js} +2 -2
  36. package/dist/_chunks/{radiograph-panel.agent-AsXJBr1p.js.map → radiograph-panel.agent-BQZ64Riy.js.map} +1 -1
  37. package/dist/_chunks/{unit-converter-CSLWFDQh.js → unit-converter-COgkN7YP.js} +2 -2
  38. package/dist/_chunks/{unit-converter-CSLWFDQh.js.map → unit-converter-COgkN7YP.js.map} +1 -1
  39. package/dist/agent-catalog.json +1 -1
  40. package/dist/components/appointment-timeline/index.js +1 -1
  41. package/dist/components/bmi-calculator/index.js +1 -1
  42. package/dist/components/booking/index.js +1 -1
  43. package/dist/components/cycle-calculator/index.js +1 -1
  44. package/dist/components/data-table/index.js +1 -1
  45. package/dist/components/date-picker/date-picker.d.ts +8 -0
  46. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  47. package/dist/components/date-picker/index.js +1 -1
  48. package/dist/components/due-date-calculator/index.js +1 -1
  49. package/dist/components/fetal-weight/index.js +1 -1
  50. package/dist/components/gestational-age-calculator/index.js +1 -1
  51. package/dist/components/hcg-doubling/index.js +1 -1
  52. package/dist/components/number-input/index.js +1 -1
  53. package/dist/components/number-input/number-input.d.ts.map +1 -1
  54. package/dist/components/optical-prescription/index.js +1 -1
  55. package/dist/components/patient-details/index.js +1 -1
  56. package/dist/components/patient-table/index.js +1 -1
  57. package/dist/components/pregnancy-dating/index.js +1 -1
  58. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  59. package/dist/components/radiograph-panel/index.js +1 -1
  60. package/dist/components/unit-converter/index.js +1 -1
  61. package/dist/index.js +19 -19
  62. package/dist/patterns/anamnesis/anamnesis-derive.d.ts +16 -0
  63. package/dist/patterns/anamnesis/anamnesis-derive.d.ts.map +1 -1
  64. package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts.map +1 -1
  65. package/dist/patterns/anamnesis/anamnesis-target-strip.d.ts +4 -3
  66. package/dist/patterns/anamnesis/anamnesis-target-strip.d.ts.map +1 -1
  67. package/dist/patterns/anamnesis/index.js +1 -1
  68. package/package.json +1 -1
  69. package/dist/_chunks/anamnesis-i18n-DFXSM72N.js.map +0 -1
  70. package/dist/_chunks/date-picker-BP_W6VtE.js.map +0 -1
  71. package/dist/_chunks/number-input-DjWzmlEY.js +0 -350
  72. package/dist/_chunks/number-input-DjWzmlEY.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"radiograph-panel.agent-AsXJBr1p.js","sources":["../../node_modules/lucide-react/dist/esm/icons/git-compare-arrows.mjs","../../node_modules/lucide-react/dist/esm/icons/images.mjs","../../src/components/radiograph-panel/radiograph-panel.tsx","../../src/components/radiograph-panel/radiograph-panel.agent.ts"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"circle\", { cx: \"5\", cy: \"6\", r: \"3\", key: \"1qnov2\" }],\n [\"path\", { d: \"M12 6h5a2 2 0 0 1 2 2v7\", key: \"1yj91y\" }],\n [\"path\", { d: \"m15 9-3-3 3-3\", key: \"1lwv8l\" }],\n [\"circle\", { cx: \"19\", cy: \"18\", r: \"3\", key: \"1qljk2\" }],\n [\"path\", { d: \"M12 18H7a2 2 0 0 1-2-2V9\", key: \"16sdep\" }],\n [\"path\", { d: \"m9 15 3 3-3 3\", key: \"1m3kbl\" }]\n];\nconst GitCompareArrows = createLucideIcon(\"git-compare-arrows\", __iconNode);\n\nexport { __iconNode, GitCompareArrows as default };\n//# sourceMappingURL=git-compare-arrows.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16\", key: \"9kzy35\" }],\n [\"path\", { d: \"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2\", key: \"1t0f0t\" }],\n [\"circle\", { cx: \"13\", cy: \"7\", r: \"1\", fill: \"currentColor\", key: \"1obus6\" }],\n [\"rect\", { x: \"8\", y: \"2\", width: \"14\", height: \"14\", rx: \"2\", key: \"1gvhby\" }]\n];\nconst Images = createLucideIcon(\"images\", __iconNode);\n\nexport { __iconNode, Images as default };\n//# sourceMappingURL=images.mjs.map\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactElement,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport {\n Upload,\n ZoomIn,\n ZoomOut,\n ChevronLeft,\n ChevronRight,\n Trash2,\n Eye,\n GitCompareArrows,\n Images,\n} from 'lucide-react';\nimport type { FdiId, Radiograph, RadiographKind } from '../tooth-scheme';\nimport { Dialog } from '../dialog';\nimport { Button } from '../button';\nimport { IconButton } from '../icon-button';\nimport { Badge } from '../badge';\nimport { FormField } from '../form-field';\nimport { TextArea } from '../text-area';\nimport { FileUpload } from '../file-upload';\nimport { DatePicker } from '../date-picker';\nimport { DateRangePicker, type DateRangeValue } from '../date-range-picker';\nimport { EmptyState } from '../empty-state';\nimport { PanelHeader } from '../panel-header';\n\n/* ------------------------------------------------------------------ */\n/* RadiographPanel — the Imaging tool for the Control Room rail. */\n/* */\n/* Shows one tooth's radiographs (x-rays / endorali): an upload */\n/* composer, a sortable + date-filtered history, and a fullscreen */\n/* viewer that zooms / steps / compares films. Drops into a */\n/* `ControlRoomRail` tool `panel`, the patient profile, or a care-plan */\n/* editor — anywhere a selected tooth's imaging belongs. The host owns */\n/* the films (`radiographs`) and persistence (`onAddRadiograph` / */\n/* `onDeleteRadiograph`); the panel owns only view state. The chart */\n/* drives selection via `ToothScheme.onOpenRadiographs(toothId)`. */\n/* */\n/* Image urls are opaque / consumer-hosted — never bundled. Real */\n/* radiographs are PHI; stories use synthetic placeholders only. */\n/* ------------------------------------------------------------------ */\n\nconst ZOOM_CLASS = ['ds:scale-100', 'ds:scale-150', 'ds:scale-200'] as const;\n\n/** Sort films newest-first (or oldest-first); undated films sink to the end in\n * BOTH directions — mirrors `ToothScheme.sortByDateDesc`. */\nfunction sortByDate(films: Radiograph[], desc: boolean): Radiograph[] {\n return [...films].sort((a, b) => {\n if (a.date === b.date) return 0;\n if (!a.date) return 1;\n if (!b.date) return -1;\n return (a.date < b.date ? -1 : 1) * (desc ? -1 : 1);\n });\n}\n\n/** Date-range membership. ISO `YYYY-MM-DD` is parsed at LOCAL midnight (the\n * `+'T00:00:00'`) so the filter agrees with the local-midnight `Date` objects\n * the DateRangePicker emits — without it, films are off-by-one west of UTC. */\nfunction inRange(film: Radiograph, range: DateRangeValue): boolean {\n if (!film.date) return !range.from && !range.to;\n const d = new Date(`${film.date}T00:00:00`);\n if (range.from && d < range.from) return false;\n if (range.to && d > range.to) return false;\n return true;\n}\n\n/** Local `YYYY-MM-DD` — avoids the UTC shift `Date.toISOString()` introduces\n * west of UTC for the local-midnight Date the DatePicker emits. */\nfunction toLocalIsoDate(d: Date): string {\n const pad = (n: number) => String(n).padStart(2, '0');\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n}\n\nexport interface RadiographPanelHandle {\n /** Read the films currently shown (after the host's `radiographs` prop). */\n getRadiographs: () => Radiograph[];\n /** Open the fullscreen viewer on a film by id. */\n openViewer: (id: string) => void;\n /** Close the fullscreen viewer. */\n closeViewer: () => void;\n}\n\nexport interface RadiographPanelProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title' | 'children'\n> {\n /** Instance id — emitted as `data-component-id` for the agent registry. */\n id?: string;\n /** The tooth whose films are shown (FDI id). Null → a \"select a tooth\" prompt. */\n toothId?: FdiId | null;\n /** Display label for the selected tooth. Defaults to the localised \"Tooth {{id}}\". */\n toothLabel?: string;\n /** The selected tooth's films. The panel sorts + filters; order in is irrelevant. */\n radiographs?: Radiograph[];\n /** Commit a new film (the host persists it). Omit to hide the upload composer. */\n onAddRadiograph?: (draft: {\n fileName: string;\n date?: string;\n note?: string;\n }) => void;\n /** Remove a film by id. Omit to hide the delete affordance. */\n onDeleteRadiograph?: (id: string) => void;\n /** Panel heading. Defaults to the localised \"Imaging\". */\n title?: string;\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n}\n\nfunction KindBadge({ kind }: { kind: RadiographKind }): ReactElement {\n const { t } = useTranslation();\n const label = t(`radiographPanel.kind.${kind}`, {\n defaultValue: {\n periapical: 'Periapical',\n bitewing: 'Bitewing',\n panoramic: 'Panoramic',\n other: 'Other',\n }[kind],\n });\n return (\n <Badge variant=\"neutral\" size=\"sm\">\n {label}\n </Badge>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Fullscreen viewer — lightbox + compare */\n/* ------------------------------------------------------------------ */\n\ninterface ViewerState {\n films: Radiograph[];\n index: number;\n compare: boolean;\n}\n\nfunction RadiographViewer({\n state,\n toothLabel,\n onClose,\n onIndexChange,\n}: {\n state: ViewerState | null;\n toothLabel: string;\n onClose: () => void;\n onIndexChange: (index: number) => void;\n}): ReactElement {\n const { t } = useTranslation();\n const [zoom, setZoom] = useState(0);\n // Reset zoom when the viewed film changes (prev/next) or the mode flips, so a\n // user doesn't carry one film's zoom into the next.\n useEffect(() => {\n setZoom(0);\n }, [state?.index, state?.compare]);\n const films = state?.films ?? [];\n const current = state ? films[state.index] : undefined;\n\n return (\n <Dialog.Root\n open={state !== null}\n onOpenChange={(next) => {\n if (!next) {\n setZoom(0);\n onClose();\n }\n }}\n >\n <Dialog.Content size=\"fullscreen\" aria-describedby={undefined}>\n <Dialog.Header>\n <Dialog.Title>\n {state?.compare\n ? t('radiographPanel.viewer.compareTitle', {\n defaultValue: '{{tooth}} — comparison',\n tooth: toothLabel,\n })\n : t('radiographPanel.viewer.title', {\n defaultValue: '{{tooth}} — radiograph',\n tooth: toothLabel,\n })}\n </Dialog.Title>\n </Dialog.Header>\n <Dialog.Body>\n {state?.compare ? (\n <div className=\"ds:grid ds:grid-cols-2 ds:gap-[var(--spacing-md)]\">\n {films.slice(0, 2).map((film) => (\n <figure\n key={film.id}\n className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)]\"\n >\n <div className=\"ds:flex ds:items-center ds:justify-center ds:overflow-hidden ds:rounded-[var(--radius-md)] ds:bg-[var(--muted)] ds:p-[var(--spacing-xs)]\">\n <img\n src={film.thumbnailUrl ?? film.url}\n alt={film.alt ?? toothLabel}\n className=\"ds:max-h-full ds:max-w-full ds:object-contain\"\n />\n </div>\n <figcaption className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {film.date}\n </figcaption>\n </figure>\n ))}\n </div>\n ) : (\n <div className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:max-h-full ds:items-center ds:justify-center ds:overflow-hidden ds:rounded-[var(--radius-md)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]\">\n <img\n src={current?.thumbnailUrl ?? current?.url}\n alt={current?.alt ?? toothLabel}\n className={[\n 'ds:max-h-full ds:max-w-full ds:object-contain',\n 'ds:origin-center ds:transition-transform ds:motion-reduce:transition-none',\n ZOOM_CLASS[zoom],\n ].join(' ')}\n />\n </div>\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <IconButton\n icon={<ChevronLeft aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.viewer.prev', {\n defaultValue: 'Previous radiograph',\n })}\n size=\"sm\"\n flipIconInRtl\n disabled={!state || state.index === 0}\n onClick={() =>\n state && onIndexChange(Math.max(0, state.index - 1))\n }\n />\n <span\n aria-live=\"polite\"\n className=\"type-meta ds:text-[color:var(--muted-foreground)]\"\n >\n {t('radiographPanel.viewer.position', {\n defaultValue: '{{current}} / {{total}}',\n current: (state?.index ?? 0) + 1,\n total: films.length,\n })}\n </span>\n <IconButton\n icon={<ChevronRight aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.viewer.next', {\n defaultValue: 'Next radiograph',\n })}\n size=\"sm\"\n flipIconInRtl\n disabled={!state || state.index >= films.length - 1}\n onClick={() =>\n state &&\n onIndexChange(Math.min(films.length - 1, state.index + 1))\n }\n />\n <span\n aria-hidden=\"true\"\n className=\"ds:ms-[var(--spacing-xs)] ds:me-[var(--spacing-xs)] ds:h-[var(--spacing-md)] ds:w-px ds:bg-[var(--border)]\"\n />\n <IconButton\n icon={<ZoomOut aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.viewer.zoomOut', {\n defaultValue: 'Zoom out',\n })}\n size=\"sm\"\n disabled={zoom === 0}\n onClick={() => setZoom((z) => Math.max(0, z - 1))}\n />\n <IconButton\n icon={<ZoomIn aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.viewer.zoomIn', {\n defaultValue: 'Zoom in',\n })}\n size=\"sm\"\n disabled={zoom === ZOOM_CLASS.length - 1}\n onClick={() =>\n setZoom((z) => Math.min(ZOOM_CLASS.length - 1, z + 1))\n }\n />\n </div>\n {current?.note ? (\n <p className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {current.note}\n </p>\n ) : null}\n </div>\n )}\n </Dialog.Body>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* RadiographPanel */\n/* ------------------------------------------------------------------ */\n\nexport const RadiographPanel = forwardRef<\n RadiographPanelHandle,\n RadiographPanelProps\n>(function RadiographPanel(\n {\n id,\n toothId,\n toothLabel: toothLabelProp,\n radiographs = [],\n onAddRadiograph,\n onDeleteRadiograph,\n title,\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n) {\n const { t } = useTranslation();\n\n const [viewer, setViewer] = useState<ViewerState | null>(null);\n const [compareIds, setCompareIds] = useState<string[]>([]);\n const [sortDesc, setSortDesc] = useState(true);\n const [range, setRange] = useState<DateRangeValue>({});\n const [pendingFile, setPendingFile] = useState<string | null>(null);\n const [date, setDate] = useState<Date | undefined>(undefined);\n const [note, setNote] = useState('');\n\n // Stable, current snapshot for the imperative handle.\n const filmsRef = useRef<Radiograph[]>(radiographs);\n filmsRef.current = radiographs;\n\n useImperativeHandle(\n ref,\n () => ({\n getRadiographs: () => filmsRef.current,\n openViewer: (filmId) => {\n const index = filmsRef.current.findIndex((f) => f.id === filmId);\n if (index >= 0) {\n setViewer({ films: filmsRef.current, index, compare: false });\n }\n },\n closeViewer: () => setViewer(null),\n }),\n [],\n );\n\n const heading =\n title ?? t('radiographPanel.title', { defaultValue: 'Imaging' });\n const toothLabel =\n toothLabelProp ??\n (toothId\n ? t('radiographPanel.toothLabel', {\n defaultValue: 'Tooth {{id}}',\n id: toothId,\n })\n : '');\n\n const visible = useMemo(\n () =>\n sortByDate(\n radiographs.filter((f) => inRange(f, range)),\n sortDesc,\n ),\n [radiographs, range, sortDesc],\n );\n\n const toggleCompare = useCallback((filmId: string) => {\n setCompareIds((ids) =>\n ids.includes(filmId)\n ? ids.filter((x) => x !== filmId)\n : [...ids, filmId].slice(-2),\n );\n }, []);\n\n const handleUpload = useCallback(() => {\n if (!pendingFile || !onAddRadiograph) return;\n onAddRadiograph({\n fileName: pendingFile,\n date: date ? toLocalIsoDate(date) : undefined,\n note: note || undefined,\n });\n setPendingFile(null);\n setNote('');\n setDate(undefined);\n }, [pendingFile, date, note, onAddRadiograph]);\n\n // History filter controls — pinned in the PanelHeader's filters row (only\n // meaningful once a tooth is selected) so they stay put as the list scrolls.\n const historyFilters = toothId ? (\n <>\n <FormField\n label={t('radiographPanel.history.range', {\n defaultValue: 'Date range',\n })}\n >\n <DateRangePicker value={range} onChange={setRange} />\n </FormField>\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <Button intent=\"ghost\" size=\"sm\" onClick={() => setSortDesc((s) => !s)}>\n {sortDesc\n ? t('radiographPanel.history.sortNewest', {\n defaultValue: 'Newest first',\n })\n : t('radiographPanel.history.sortOldest', {\n defaultValue: 'Oldest first',\n })}\n </Button>\n <Button\n intent=\"ghost\"\n size=\"sm\"\n startIcon={<GitCompareArrows aria-hidden=\"true\" />}\n disabled={compareIds.length !== 2}\n onClick={() => {\n const films = radiographs.filter((f) => compareIds.includes(f.id));\n if (films.length === 2) {\n setViewer({ films, index: 0, compare: true });\n }\n }}\n >\n {t('radiographPanel.history.compare', {\n defaultValue: 'Compare',\n })}\n </Button>\n </div>\n </>\n ) : undefined;\n\n return (\n <section\n data-component=\"radiograph-panel\"\n data-component-id={id}\n data-tooth={toothId ?? undefined}\n aria-label={ariaLabel ?? heading}\n className={['ds:flex ds:flex-col', className].filter(Boolean).join(' ')}\n {...rest}\n >\n {/* Shared rail-panel header: title + film-count badge, history filters\n pinned beneath, divider, sticky so it stays visible as the list\n scrolls. The rail injects favourite/close into the action cluster. */}\n <PanelHeader\n sticky\n icon={<Images aria-hidden=\"true\" />}\n title={\n <>\n {toothId ? toothLabel : heading}\n {toothId ? (\n <Badge variant=\"info\" size=\"sm\">\n {radiographs.length}\n </Badge>\n ) : null}\n </>\n }\n filters={historyFilters}\n />\n\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]\">\n {!toothId ? (\n <EmptyState\n variant=\"first-use\"\n title={t('radiographPanel.noTooth.title', {\n defaultValue: 'No tooth selected',\n })}\n description={t('radiographPanel.noTooth.body', {\n defaultValue:\n 'Select a tooth on the chart to view its radiographs.',\n })}\n />\n ) : (\n <>\n {/* Upload */}\n {onAddRadiograph ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <FormField\n label={t('radiographPanel.upload.file', {\n defaultValue: 'Image file',\n })}\n >\n <FileUpload\n accept={{ 'image/*': ['.png', '.jpg', '.jpeg', '.webp'] }}\n variant=\"both\"\n showPreview\n onDrop={(accepted) =>\n setPendingFile(accepted[0]?.name ?? null)\n }\n />\n </FormField>\n <FormField\n label={t('radiographPanel.upload.date', {\n defaultValue: 'Acquisition date',\n })}\n >\n <DatePicker value={date} onChange={(d) => setDate(d)} />\n </FormField>\n <FormField\n label={t('radiographPanel.upload.note', {\n defaultValue: 'Note (optional)',\n })}\n >\n <TextArea\n rows={2}\n value={note}\n onChange={(e) => setNote(e.target.value)}\n placeholder={t('radiographPanel.upload.notePlaceholder', {\n defaultValue: 'E.g. routine check, apical lesion…',\n })}\n />\n </FormField>\n <Button\n intent=\"primary\"\n size=\"sm\"\n startIcon={<Upload aria-hidden=\"true\" />}\n disabled={!pendingFile}\n onClick={handleUpload}\n className=\"ds:self-start\"\n >\n {t('radiographPanel.upload.submit', {\n defaultValue: 'Upload',\n })}\n </Button>\n </div>\n ) : null}\n\n {/* History */}\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {visible.length === 0 ? (\n <EmptyState\n variant=\"first-use\"\n title={t('radiographPanel.history.emptyTitle', {\n defaultValue: 'No radiographs yet',\n })}\n description={t('radiographPanel.history.emptyBody', {\n defaultValue: 'Upload the first film for this tooth.',\n })}\n />\n ) : (\n <ul className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-xs)] ds:p-0\">\n {visible.map((film, visibleIndex) => {\n const selected = compareIds.includes(film.id);\n // Disambiguate the repeated row actions for screen readers by\n // the film's date (falls back to its 1-based position).\n const filmLabel = film.date ?? String(visibleIndex + 1);\n return (\n <li\n key={film.id}\n data-radiograph-id={film.id}\n data-selected={selected}\n className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--card-border)] ds:bg-[var(--card)] ds:p-[var(--spacing-xs)] ds:data-[selected=true]:border-[color:var(--info-foreground)]\"\n >\n <img\n src={film.thumbnailUrl ?? film.url}\n alt={film.alt ?? ''}\n className=\"ds:h-16 ds:w-12 ds:shrink-0 ds:rounded-[var(--radius-sm)] ds:object-cover\"\n />\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span className=\"type-body-sm ds:text-[color:var(--foreground)]\">\n {film.date}\n </span>\n <KindBadge kind={film.kind ?? 'periapical'} />\n </div>\n <IconButton\n icon={<Eye aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.history.view', {\n defaultValue: 'View radiograph {{film}}',\n film: filmLabel,\n })}\n size=\"sm\"\n intent=\"ghost\"\n // Step the viewer through the FILTERED + sorted list the\n // user is looking at, not every film on the tooth.\n onClick={() =>\n setViewer({\n films: visible,\n index: visibleIndex,\n compare: false,\n })\n }\n />\n <IconButton\n icon={<GitCompareArrows aria-hidden=\"true\" />}\n aria-label={\n selected\n ? t('radiographPanel.history.compareRemove', {\n defaultValue:\n 'Remove {{film}} from comparison',\n film: filmLabel,\n })\n : t('radiographPanel.history.compareAdd', {\n defaultValue:\n 'Select {{film}} for comparison',\n film: filmLabel,\n })\n }\n aria-pressed={selected}\n size=\"sm\"\n intent={selected ? 'secondary' : 'ghost'}\n onClick={() => toggleCompare(film.id)}\n />\n {onDeleteRadiograph ? (\n <IconButton\n icon={<Trash2 aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.history.delete', {\n defaultValue: 'Delete radiograph {{film}}',\n film: filmLabel,\n })}\n size=\"sm\"\n intent=\"ghost\"\n onClick={() => onDeleteRadiograph(film.id)}\n />\n ) : null}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </>\n )}\n </div>\n\n <RadiographViewer\n state={viewer}\n toothLabel={toothLabel}\n onClose={() => setViewer(null)}\n onIndexChange={(index) => setViewer((v) => (v ? { ...v, index } : v))}\n />\n </section>\n );\n});\n\n// `Images` is the panel's imaging glyph (a films archive, not a radiation\n// hazard) — re-exported so a host registering the Control Room tool can use\n// the same icon as the panel.\nexport { Images as RadiographPanelIcon };\n","import type { AgentAdapter } from '../../agent/types';\nimport type { RadiographPanelHandle } from './radiograph-panel';\nimport type { Radiograph } from '../tooth-scheme';\n\n/**\n * The Imaging panel for the Control Room rail. It DISPLAYS the selected tooth's\n * radiographs and drives the fullscreen viewer; uploads and deletes are the\n * host's responsibility (the `onAddRadiograph` / `onDeleteRadiograph` props),\n * so they are not exposed here — the consuming pattern/app owns those `write` /\n * `destructive` workflows and their `radiograph.*` API contracts.\n */\nexport const radiographPanelAgent: AgentAdapter<RadiographPanelHandle> = {\n id: 'radiograph-panel',\n // pick — open a specific film in the viewer; view_change — the viewer is a\n // view surface over the host-owned films.\n capabilities: ['pick', 'view_change'],\n state: {\n radiographs: {\n // A9: structural refs only (id + kind) — never the free-text `note`,\n // service dates, or consumer-hosted image URLs in the always-on snapshot.\n type: 'Array<{ id: string; kind?: string }>',\n descriptionKey: 'ui.agent.radiographPanel.state.radiographs',\n description:\n 'Structural references (id + kind) to the films shown for the selected tooth.',\n read: (handle) =>\n handle\n .getRadiographs()\n .map((film) => ({ id: film.id, kind: film.kind ?? 'periapical' })),\n },\n },\n actions: {\n view_radiograph: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.radiographPanel.actions.viewRadiograph',\n description: 'Open a film in the fullscreen viewer by id.',\n invoke: (handle, args: { id: string }) => {\n handle.openViewer(args.id);\n },\n },\n close_viewer: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.radiographPanel.actions.closeViewer',\n description: 'Close the fullscreen radiograph viewer.',\n invoke: (handle) => {\n handle.closeViewer();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'radiograph-panel' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-radiograph-id',\n description:\n \"Each film row (`<li>`) carries its radiograph id as `data-radiograph-id`. The panel root additionally carries the selected tooth's FDI id as `data-tooth`.\",\n },\n },\n};\n\n// Re-exported for callers building typed reads against the adapter.\nexport type { Radiograph };\n"],"names":["__iconNode","GitCompareArrows","createLucideIcon","Images","ZOOM_CLASS","sortByDate","films","desc","a","b","inRange","film","range","d","toLocalIsoDate","pad","n","KindBadge","kind","t","useTranslation","label","Badge","RadiographViewer","state","toothLabel","onClose","onIndexChange","zoom","setZoom","useState","useEffect","current","jsx","Dialog","next","jsxs","IconButton","ChevronLeft","ChevronRight","ZoomOut","z","ZoomIn","RadiographPanel","forwardRef","id","toothId","toothLabelProp","radiographs","onAddRadiograph","onDeleteRadiograph","title","ariaLabel","className","rest","ref","viewer","setViewer","compareIds","setCompareIds","sortDesc","setSortDesc","setRange","pendingFile","setPendingFile","date","setDate","note","setNote","filmsRef","useRef","useImperativeHandle","filmId","index","f","heading","visible","useMemo","toggleCompare","useCallback","ids","x","handleUpload","historyFilters","Fragment","FormField","DateRangePicker","Button","s","PanelHeader","FileUpload","accepted","_a","DatePicker","TextArea","e","Upload","EmptyState","visibleIndex","selected","filmLabel","Eye","Trash2","v","radiographPanelAgent","handle","args"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,UAAU,EAAE,IAAI,KAAK,IAAI,KAAK,GAAG,KAAK,KAAK,UAAU;AAAA,EACtD,CAAC,QAAQ,EAAE,GAAG,2BAA2B,KAAK,SAAQ,CAAE;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG,iBAAiB,KAAK,SAAQ,CAAE;AAAA,EAC9C,CAAC,UAAU,EAAE,IAAI,MAAM,IAAI,MAAM,GAAG,KAAK,KAAK,UAAU;AAAA,EACxD,CAAC,QAAQ,EAAE,GAAG,4BAA4B,KAAK,SAAQ,CAAE;AAAA,EACzD,CAAC,QAAQ,EAAE,GAAG,iBAAiB,KAAK,SAAQ,CAAE;AAChD,GACMC,IAAmBC,EAAiB,sBAAsBF,EAAU;ACjB1E;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,KAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,kDAAkD,KAAK,SAAQ,C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AAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MACLA,EACG,eAAA,EACA,IAAI,CAAC9F,OAAU,EAAE,IAAIA,EAAK,IAAI,MAAMA,EAAK,QAAQ,eAAe;AAAA,IAAA;AAAA,EACvE;AAAA,EAEF,SAAS;AAAA,IACP,iBAAiB;AAAA,MACf,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,MAAM;AAAA,QACN,YAAY,EAAE,IAAI,EAAE,MAAM,WAAS;AAAA,QACnC,UAAU,CAAC,IAAI;AAAA,MAAA;AAAA,MAEjB,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAAC8F,GAAQC,MAAyB;AACxC,QAAAD,EAAO,WAAWC,EAAK,EAAE;AAAA,MAC3B;AAAA,IAAA;AAAA,IAEF,cAAc;AAAA,MACZ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACD,MAAW;AAClB,QAAAA,EAAO,YAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM,EAAE,MAAM,kBAAkB,OAAO,mBAAA;AAAA,IACvC,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aACE;AAAA,IAAA;AAAA,EACJ;AAEJ;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"radiograph-panel.agent-BQZ64Riy.js","sources":["../../node_modules/lucide-react/dist/esm/icons/git-compare-arrows.mjs","../../node_modules/lucide-react/dist/esm/icons/images.mjs","../../src/components/radiograph-panel/radiograph-panel.tsx","../../src/components/radiograph-panel/radiograph-panel.agent.ts"],"sourcesContent":["/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"circle\", { cx: \"5\", cy: \"6\", r: \"3\", key: \"1qnov2\" }],\n [\"path\", { d: \"M12 6h5a2 2 0 0 1 2 2v7\", key: \"1yj91y\" }],\n [\"path\", { d: \"m15 9-3-3 3-3\", key: \"1lwv8l\" }],\n [\"circle\", { cx: \"19\", cy: \"18\", r: \"3\", key: \"1qljk2\" }],\n [\"path\", { d: \"M12 18H7a2 2 0 0 1-2-2V9\", key: \"16sdep\" }],\n [\"path\", { d: \"m9 15 3 3-3 3\", key: \"1m3kbl\" }]\n];\nconst GitCompareArrows = createLucideIcon(\"git-compare-arrows\", __iconNode);\n\nexport { __iconNode, GitCompareArrows as default };\n//# sourceMappingURL=git-compare-arrows.mjs.map\n","/**\n * @license lucide-react v1.22.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16\", key: \"9kzy35\" }],\n [\"path\", { d: \"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2\", key: \"1t0f0t\" }],\n [\"circle\", { cx: \"13\", cy: \"7\", r: \"1\", fill: \"currentColor\", key: \"1obus6\" }],\n [\"rect\", { x: \"8\", y: \"2\", width: \"14\", height: \"14\", rx: \"2\", key: \"1gvhby\" }]\n];\nconst Images = createLucideIcon(\"images\", __iconNode);\n\nexport { __iconNode, Images as default };\n//# sourceMappingURL=images.mjs.map\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactElement,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport {\n Upload,\n ZoomIn,\n ZoomOut,\n ChevronLeft,\n ChevronRight,\n Trash2,\n Eye,\n GitCompareArrows,\n Images,\n} from 'lucide-react';\nimport type { FdiId, Radiograph, RadiographKind } from '../tooth-scheme';\nimport { Dialog } from '../dialog';\nimport { Button } from '../button';\nimport { IconButton } from '../icon-button';\nimport { Badge } from '../badge';\nimport { FormField } from '../form-field';\nimport { TextArea } from '../text-area';\nimport { FileUpload } from '../file-upload';\nimport { DatePicker } from '../date-picker';\nimport { DateRangePicker, type DateRangeValue } from '../date-range-picker';\nimport { EmptyState } from '../empty-state';\nimport { PanelHeader } from '../panel-header';\n\n/* ------------------------------------------------------------------ */\n/* RadiographPanel — the Imaging tool for the Control Room rail. */\n/* */\n/* Shows one tooth's radiographs (x-rays / endorali): an upload */\n/* composer, a sortable + date-filtered history, and a fullscreen */\n/* viewer that zooms / steps / compares films. Drops into a */\n/* `ControlRoomRail` tool `panel`, the patient profile, or a care-plan */\n/* editor — anywhere a selected tooth's imaging belongs. The host owns */\n/* the films (`radiographs`) and persistence (`onAddRadiograph` / */\n/* `onDeleteRadiograph`); the panel owns only view state. The chart */\n/* drives selection via `ToothScheme.onOpenRadiographs(toothId)`. */\n/* */\n/* Image urls are opaque / consumer-hosted — never bundled. Real */\n/* radiographs are PHI; stories use synthetic placeholders only. */\n/* ------------------------------------------------------------------ */\n\nconst ZOOM_CLASS = ['ds:scale-100', 'ds:scale-150', 'ds:scale-200'] as const;\n\n/** Sort films newest-first (or oldest-first); undated films sink to the end in\n * BOTH directions — mirrors `ToothScheme.sortByDateDesc`. */\nfunction sortByDate(films: Radiograph[], desc: boolean): Radiograph[] {\n return [...films].sort((a, b) => {\n if (a.date === b.date) return 0;\n if (!a.date) return 1;\n if (!b.date) return -1;\n return (a.date < b.date ? -1 : 1) * (desc ? -1 : 1);\n });\n}\n\n/** Date-range membership. ISO `YYYY-MM-DD` is parsed at LOCAL midnight (the\n * `+'T00:00:00'`) so the filter agrees with the local-midnight `Date` objects\n * the DateRangePicker emits — without it, films are off-by-one west of UTC. */\nfunction inRange(film: Radiograph, range: DateRangeValue): boolean {\n if (!film.date) return !range.from && !range.to;\n const d = new Date(`${film.date}T00:00:00`);\n if (range.from && d < range.from) return false;\n if (range.to && d > range.to) return false;\n return true;\n}\n\n/** Local `YYYY-MM-DD` — avoids the UTC shift `Date.toISOString()` introduces\n * west of UTC for the local-midnight Date the DatePicker emits. */\nfunction toLocalIsoDate(d: Date): string {\n const pad = (n: number) => String(n).padStart(2, '0');\n return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;\n}\n\nexport interface RadiographPanelHandle {\n /** Read the films currently shown (after the host's `radiographs` prop). */\n getRadiographs: () => Radiograph[];\n /** Open the fullscreen viewer on a film by id. */\n openViewer: (id: string) => void;\n /** Close the fullscreen viewer. */\n closeViewer: () => void;\n}\n\nexport interface RadiographPanelProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title' | 'children'\n> {\n /** Instance id — emitted as `data-component-id` for the agent registry. */\n id?: string;\n /** The tooth whose films are shown (FDI id). Null → a \"select a tooth\" prompt. */\n toothId?: FdiId | null;\n /** Display label for the selected tooth. Defaults to the localised \"Tooth {{id}}\". */\n toothLabel?: string;\n /** The selected tooth's films. The panel sorts + filters; order in is irrelevant. */\n radiographs?: Radiograph[];\n /** Commit a new film (the host persists it). Omit to hide the upload composer. */\n onAddRadiograph?: (draft: {\n fileName: string;\n date?: string;\n note?: string;\n }) => void;\n /** Remove a film by id. Omit to hide the delete affordance. */\n onDeleteRadiograph?: (id: string) => void;\n /** Panel heading. Defaults to the localised \"Imaging\". */\n title?: string;\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n}\n\nfunction KindBadge({ kind }: { kind: RadiographKind }): ReactElement {\n const { t } = useTranslation();\n const label = t(`radiographPanel.kind.${kind}`, {\n defaultValue: {\n periapical: 'Periapical',\n bitewing: 'Bitewing',\n panoramic: 'Panoramic',\n other: 'Other',\n }[kind],\n });\n return (\n <Badge variant=\"neutral\" size=\"sm\">\n {label}\n </Badge>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Fullscreen viewer — lightbox + compare */\n/* ------------------------------------------------------------------ */\n\ninterface ViewerState {\n films: Radiograph[];\n index: number;\n compare: boolean;\n}\n\nfunction RadiographViewer({\n state,\n toothLabel,\n onClose,\n onIndexChange,\n}: {\n state: ViewerState | null;\n toothLabel: string;\n onClose: () => void;\n onIndexChange: (index: number) => void;\n}): ReactElement {\n const { t } = useTranslation();\n const [zoom, setZoom] = useState(0);\n // Reset zoom when the viewed film changes (prev/next) or the mode flips, so a\n // user doesn't carry one film's zoom into the next.\n useEffect(() => {\n setZoom(0);\n }, [state?.index, state?.compare]);\n const films = state?.films ?? [];\n const current = state ? films[state.index] : undefined;\n\n return (\n <Dialog.Root\n open={state !== null}\n onOpenChange={(next) => {\n if (!next) {\n setZoom(0);\n onClose();\n }\n }}\n >\n <Dialog.Content size=\"fullscreen\" aria-describedby={undefined}>\n <Dialog.Header>\n <Dialog.Title>\n {state?.compare\n ? t('radiographPanel.viewer.compareTitle', {\n defaultValue: '{{tooth}} — comparison',\n tooth: toothLabel,\n })\n : t('radiographPanel.viewer.title', {\n defaultValue: '{{tooth}} — radiograph',\n tooth: toothLabel,\n })}\n </Dialog.Title>\n </Dialog.Header>\n <Dialog.Body>\n {state?.compare ? (\n <div className=\"ds:grid ds:grid-cols-2 ds:gap-[var(--spacing-md)]\">\n {films.slice(0, 2).map((film) => (\n <figure\n key={film.id}\n className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)]\"\n >\n <div className=\"ds:flex ds:items-center ds:justify-center ds:overflow-hidden ds:rounded-[var(--radius-md)] ds:bg-[var(--muted)] ds:p-[var(--spacing-xs)]\">\n <img\n src={film.thumbnailUrl ?? film.url}\n alt={film.alt ?? toothLabel}\n className=\"ds:max-h-full ds:max-w-full ds:object-contain\"\n />\n </div>\n <figcaption className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {film.date}\n </figcaption>\n </figure>\n ))}\n </div>\n ) : (\n <div className=\"ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)]\">\n <div className=\"ds:flex ds:max-h-full ds:items-center ds:justify-center ds:overflow-hidden ds:rounded-[var(--radius-md)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]\">\n <img\n src={current?.thumbnailUrl ?? current?.url}\n alt={current?.alt ?? toothLabel}\n className={[\n 'ds:max-h-full ds:max-w-full ds:object-contain',\n 'ds:origin-center ds:transition-transform ds:motion-reduce:transition-none',\n ZOOM_CLASS[zoom],\n ].join(' ')}\n />\n </div>\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <IconButton\n icon={<ChevronLeft aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.viewer.prev', {\n defaultValue: 'Previous radiograph',\n })}\n size=\"sm\"\n flipIconInRtl\n disabled={!state || state.index === 0}\n onClick={() =>\n state && onIndexChange(Math.max(0, state.index - 1))\n }\n />\n <span\n aria-live=\"polite\"\n className=\"type-meta ds:text-[color:var(--muted-foreground)]\"\n >\n {t('radiographPanel.viewer.position', {\n defaultValue: '{{current}} / {{total}}',\n current: (state?.index ?? 0) + 1,\n total: films.length,\n })}\n </span>\n <IconButton\n icon={<ChevronRight aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.viewer.next', {\n defaultValue: 'Next radiograph',\n })}\n size=\"sm\"\n flipIconInRtl\n disabled={!state || state.index >= films.length - 1}\n onClick={() =>\n state &&\n onIndexChange(Math.min(films.length - 1, state.index + 1))\n }\n />\n <span\n aria-hidden=\"true\"\n className=\"ds:ms-[var(--spacing-xs)] ds:me-[var(--spacing-xs)] ds:h-[var(--spacing-md)] ds:w-px ds:bg-[var(--border)]\"\n />\n <IconButton\n icon={<ZoomOut aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.viewer.zoomOut', {\n defaultValue: 'Zoom out',\n })}\n size=\"sm\"\n disabled={zoom === 0}\n onClick={() => setZoom((z) => Math.max(0, z - 1))}\n />\n <IconButton\n icon={<ZoomIn aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.viewer.zoomIn', {\n defaultValue: 'Zoom in',\n })}\n size=\"sm\"\n disabled={zoom === ZOOM_CLASS.length - 1}\n onClick={() =>\n setZoom((z) => Math.min(ZOOM_CLASS.length - 1, z + 1))\n }\n />\n </div>\n {current?.note ? (\n <p className=\"type-body-sm ds:text-[color:var(--muted-foreground)]\">\n {current.note}\n </p>\n ) : null}\n </div>\n )}\n </Dialog.Body>\n </Dialog.Content>\n </Dialog.Root>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* RadiographPanel */\n/* ------------------------------------------------------------------ */\n\nexport const RadiographPanel = forwardRef<\n RadiographPanelHandle,\n RadiographPanelProps\n>(function RadiographPanel(\n {\n id,\n toothId,\n toothLabel: toothLabelProp,\n radiographs = [],\n onAddRadiograph,\n onDeleteRadiograph,\n title,\n 'aria-label': ariaLabel,\n className,\n ...rest\n },\n ref,\n) {\n const { t } = useTranslation();\n\n const [viewer, setViewer] = useState<ViewerState | null>(null);\n const [compareIds, setCompareIds] = useState<string[]>([]);\n const [sortDesc, setSortDesc] = useState(true);\n const [range, setRange] = useState<DateRangeValue>({});\n const [pendingFile, setPendingFile] = useState<string | null>(null);\n const [date, setDate] = useState<Date | undefined>(undefined);\n const [note, setNote] = useState('');\n\n // Stable, current snapshot for the imperative handle.\n const filmsRef = useRef<Radiograph[]>(radiographs);\n filmsRef.current = radiographs;\n\n useImperativeHandle(\n ref,\n () => ({\n getRadiographs: () => filmsRef.current,\n openViewer: (filmId) => {\n const index = filmsRef.current.findIndex((f) => f.id === filmId);\n if (index >= 0) {\n setViewer({ films: filmsRef.current, index, compare: false });\n }\n },\n closeViewer: () => setViewer(null),\n }),\n [],\n );\n\n const heading =\n title ?? t('radiographPanel.title', { defaultValue: 'Imaging' });\n const toothLabel =\n toothLabelProp ??\n (toothId\n ? t('radiographPanel.toothLabel', {\n defaultValue: 'Tooth {{id}}',\n id: toothId,\n })\n : '');\n\n const visible = useMemo(\n () =>\n sortByDate(\n radiographs.filter((f) => inRange(f, range)),\n sortDesc,\n ),\n [radiographs, range, sortDesc],\n );\n\n const toggleCompare = useCallback((filmId: string) => {\n setCompareIds((ids) =>\n ids.includes(filmId)\n ? ids.filter((x) => x !== filmId)\n : [...ids, filmId].slice(-2),\n );\n }, []);\n\n const handleUpload = useCallback(() => {\n if (!pendingFile || !onAddRadiograph) return;\n onAddRadiograph({\n fileName: pendingFile,\n date: date ? toLocalIsoDate(date) : undefined,\n note: note || undefined,\n });\n setPendingFile(null);\n setNote('');\n setDate(undefined);\n }, [pendingFile, date, note, onAddRadiograph]);\n\n // History filter controls — pinned in the PanelHeader's filters row (only\n // meaningful once a tooth is selected) so they stay put as the list scrolls.\n const historyFilters = toothId ? (\n <>\n <FormField\n label={t('radiographPanel.history.range', {\n defaultValue: 'Date range',\n })}\n >\n <DateRangePicker value={range} onChange={setRange} />\n </FormField>\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n <Button intent=\"ghost\" size=\"sm\" onClick={() => setSortDesc((s) => !s)}>\n {sortDesc\n ? t('radiographPanel.history.sortNewest', {\n defaultValue: 'Newest first',\n })\n : t('radiographPanel.history.sortOldest', {\n defaultValue: 'Oldest first',\n })}\n </Button>\n <Button\n intent=\"ghost\"\n size=\"sm\"\n startIcon={<GitCompareArrows aria-hidden=\"true\" />}\n disabled={compareIds.length !== 2}\n onClick={() => {\n const films = radiographs.filter((f) => compareIds.includes(f.id));\n if (films.length === 2) {\n setViewer({ films, index: 0, compare: true });\n }\n }}\n >\n {t('radiographPanel.history.compare', {\n defaultValue: 'Compare',\n })}\n </Button>\n </div>\n </>\n ) : undefined;\n\n return (\n <section\n data-component=\"radiograph-panel\"\n data-component-id={id}\n data-tooth={toothId ?? undefined}\n aria-label={ariaLabel ?? heading}\n className={['ds:flex ds:flex-col', className].filter(Boolean).join(' ')}\n {...rest}\n >\n {/* Shared rail-panel header: title + film-count badge, history filters\n pinned beneath, divider, sticky so it stays visible as the list\n scrolls. The rail injects favourite/close into the action cluster. */}\n <PanelHeader\n sticky\n icon={<Images aria-hidden=\"true\" />}\n title={\n <>\n {toothId ? toothLabel : heading}\n {toothId ? (\n <Badge variant=\"info\" size=\"sm\">\n {radiographs.length}\n </Badge>\n ) : null}\n </>\n }\n filters={historyFilters}\n />\n\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]\">\n {!toothId ? (\n <EmptyState\n variant=\"first-use\"\n title={t('radiographPanel.noTooth.title', {\n defaultValue: 'No tooth selected',\n })}\n description={t('radiographPanel.noTooth.body', {\n defaultValue:\n 'Select a tooth on the chart to view its radiographs.',\n })}\n />\n ) : (\n <>\n {/* Upload */}\n {onAddRadiograph ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n <FormField\n label={t('radiographPanel.upload.file', {\n defaultValue: 'Image file',\n })}\n >\n <FileUpload\n accept={{ 'image/*': ['.png', '.jpg', '.jpeg', '.webp'] }}\n variant=\"both\"\n showPreview\n onDrop={(accepted) =>\n setPendingFile(accepted[0]?.name ?? null)\n }\n />\n </FormField>\n <FormField\n label={t('radiographPanel.upload.date', {\n defaultValue: 'Acquisition date',\n })}\n >\n <DatePicker value={date} onChange={(d) => setDate(d)} />\n </FormField>\n <FormField\n label={t('radiographPanel.upload.note', {\n defaultValue: 'Note (optional)',\n })}\n >\n <TextArea\n rows={2}\n value={note}\n onChange={(e) => setNote(e.target.value)}\n placeholder={t('radiographPanel.upload.notePlaceholder', {\n defaultValue: 'E.g. routine check, apical lesion…',\n })}\n />\n </FormField>\n <Button\n intent=\"primary\"\n size=\"sm\"\n startIcon={<Upload aria-hidden=\"true\" />}\n disabled={!pendingFile}\n onClick={handleUpload}\n className=\"ds:self-start\"\n >\n {t('radiographPanel.upload.submit', {\n defaultValue: 'Upload',\n })}\n </Button>\n </div>\n ) : null}\n\n {/* History */}\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {visible.length === 0 ? (\n <EmptyState\n variant=\"first-use\"\n title={t('radiographPanel.history.emptyTitle', {\n defaultValue: 'No radiographs yet',\n })}\n description={t('radiographPanel.history.emptyBody', {\n defaultValue: 'Upload the first film for this tooth.',\n })}\n />\n ) : (\n <ul className=\"ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-xs)] ds:p-0\">\n {visible.map((film, visibleIndex) => {\n const selected = compareIds.includes(film.id);\n // Disambiguate the repeated row actions for screen readers by\n // the film's date (falls back to its 1-based position).\n const filmLabel = film.date ?? String(visibleIndex + 1);\n return (\n <li\n key={film.id}\n data-radiograph-id={film.id}\n data-selected={selected}\n className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--card-border)] ds:bg-[var(--card)] ds:p-[var(--spacing-xs)] ds:data-[selected=true]:border-[color:var(--info-foreground)]\"\n >\n <img\n src={film.thumbnailUrl ?? film.url}\n alt={film.alt ?? ''}\n className=\"ds:h-16 ds:w-12 ds:shrink-0 ds:rounded-[var(--radius-sm)] ds:object-cover\"\n />\n <div className=\"ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n <span className=\"type-body-sm ds:text-[color:var(--foreground)]\">\n {film.date}\n </span>\n <KindBadge kind={film.kind ?? 'periapical'} />\n </div>\n <IconButton\n icon={<Eye aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.history.view', {\n defaultValue: 'View radiograph {{film}}',\n film: filmLabel,\n })}\n size=\"sm\"\n intent=\"ghost\"\n // Step the viewer through the FILTERED + sorted list the\n // user is looking at, not every film on the tooth.\n onClick={() =>\n setViewer({\n films: visible,\n index: visibleIndex,\n compare: false,\n })\n }\n />\n <IconButton\n icon={<GitCompareArrows aria-hidden=\"true\" />}\n aria-label={\n selected\n ? t('radiographPanel.history.compareRemove', {\n defaultValue:\n 'Remove {{film}} from comparison',\n film: filmLabel,\n })\n : t('radiographPanel.history.compareAdd', {\n defaultValue:\n 'Select {{film}} for comparison',\n film: filmLabel,\n })\n }\n aria-pressed={selected}\n size=\"sm\"\n intent={selected ? 'secondary' : 'ghost'}\n onClick={() => toggleCompare(film.id)}\n />\n {onDeleteRadiograph ? (\n <IconButton\n icon={<Trash2 aria-hidden=\"true\" />}\n aria-label={t('radiographPanel.history.delete', {\n defaultValue: 'Delete radiograph {{film}}',\n film: filmLabel,\n })}\n size=\"sm\"\n intent=\"ghost\"\n onClick={() => onDeleteRadiograph(film.id)}\n />\n ) : null}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </>\n )}\n </div>\n\n <RadiographViewer\n state={viewer}\n toothLabel={toothLabel}\n onClose={() => setViewer(null)}\n onIndexChange={(index) => setViewer((v) => (v ? { ...v, index } : v))}\n />\n </section>\n );\n});\n\n// `Images` is the panel's imaging glyph (a films archive, not a radiation\n// hazard) — re-exported so a host registering the Control Room tool can use\n// the same icon as the panel.\nexport { Images as RadiographPanelIcon };\n","import type { AgentAdapter } from '../../agent/types';\nimport type { RadiographPanelHandle } from './radiograph-panel';\nimport type { Radiograph } from '../tooth-scheme';\n\n/**\n * The Imaging panel for the Control Room rail. It DISPLAYS the selected tooth's\n * radiographs and drives the fullscreen viewer; uploads and deletes are the\n * host's responsibility (the `onAddRadiograph` / `onDeleteRadiograph` props),\n * so they are not exposed here — the consuming pattern/app owns those `write` /\n * `destructive` workflows and their `radiograph.*` API contracts.\n */\nexport const radiographPanelAgent: AgentAdapter<RadiographPanelHandle> = {\n id: 'radiograph-panel',\n // pick — open a specific film in the viewer; view_change — the viewer is a\n // view surface over the host-owned films.\n capabilities: ['pick', 'view_change'],\n state: {\n radiographs: {\n // A9: structural refs only (id + kind) — never the free-text `note`,\n // service dates, or consumer-hosted image URLs in the always-on snapshot.\n type: 'Array<{ id: string; kind?: string }>',\n descriptionKey: 'ui.agent.radiographPanel.state.radiographs',\n description:\n 'Structural references (id + kind) to the films shown for the selected tooth.',\n read: (handle) =>\n handle\n .getRadiographs()\n .map((film) => ({ id: film.id, kind: film.kind ?? 'periapical' })),\n },\n },\n actions: {\n view_radiograph: {\n safety: 'read',\n argsType: '{ id: string }',\n argsSchema: {\n type: 'object',\n properties: { id: { type: 'string' } },\n required: ['id'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.radiographPanel.actions.viewRadiograph',\n description: 'Open a film in the fullscreen viewer by id.',\n invoke: (handle, args: { id: string }) => {\n handle.openViewer(args.id);\n },\n },\n close_viewer: {\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.radiographPanel.actions.closeViewer',\n description: 'Close the fullscreen radiograph viewer.',\n invoke: (handle) => {\n handle.closeViewer();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'radiograph-panel' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n item: {\n attr: 'data-radiograph-id',\n description:\n \"Each film row (`<li>`) carries its radiograph id as `data-radiograph-id`. The panel root additionally carries the selected tooth's FDI id as `data-tooth`.\",\n },\n },\n};\n\n// Re-exported for callers building typed reads against the adapter.\nexport type { Radiograph };\n"],"names":["__iconNode","GitCompareArrows","createLucideIcon","Images","ZOOM_CLASS","sortByDate","films","desc","a","b","inRange","film","range","d","toLocalIsoDate","pad","n","KindBadge","kind","t","useTranslation","label","Badge","RadiographViewer","state","toothLabel","onClose","onIndexChange","zoom","setZoom","useState","useEffect","current","jsx","Dialog","next","jsxs","IconButton","ChevronLeft","ChevronRight","ZoomOut","z","ZoomIn","RadiographPanel","forwardRef","id","toothId","toothLabelProp","radiographs","onAddRadiograph","onDeleteRadiograph","title","ariaLabel","className","rest","ref","viewer","setViewer","compareIds","setCompareIds","sortDesc","setSortDesc","setRange","pendingFile","setPendingFile","date","setDate","note","setNote","filmsRef","useRef","useImperativeHandle","filmId","index","f","heading","visible","useMemo","toggleCompare","useCallback","ids","x","handleUpload","historyFilters","Fragment","FormField","DateRangePicker","Button","s","PanelHeader","FileUpload","accepted","_a","DatePicker","TextArea","e","Up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IAAA;AAAA,IAEF,cAAc;AAAA,MACZ,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,aAAa;AAAA,MACb,QAAQ,CAACD,MAAW;AAClB,QAAAA,EAAO,YAAA;AAAA,MACT;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,UAAU;AAAA,IACR,MAAM,EAAE,MAAM,kBAAkB,OAAO,mBAAA;AAAA,IACvC,YAAY;AAAA,MACV,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,aAAa;AAAA,IAAA;AAAA,IAEf,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,aACE;AAAA,IAAA;AAAA,EACJ;AAEJ;","x_google_ignoreList":[0,1]}
@@ -4,7 +4,7 @@ import { c as z } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as M } from "react-i18next";
5
5
  import { u as Y } from "./registry-DvAUVLHh.js";
6
6
  import { F as C } from "./form-field-M5UpX65Z.js";
7
- import { N as B } from "./number-input-DjWzmlEY.js";
7
+ import { N as B } from "./number-input-DrozbZAU.js";
8
8
  import { S } from "./select-BW5ecXlX.js";
9
9
  import { I as D } from "./insert-result-D074GtHX.js";
10
10
  const L = [
@@ -334,4 +334,4 @@ export {
334
334
  ee as b,
335
335
  Q as c
336
336
  };
337
- //# sourceMappingURL=unit-converter-CSLWFDQh.js.map
337
+ //# sourceMappingURL=unit-converter-COgkN7YP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unit-converter-CSLWFDQh.js","sources":["../../src/components/unit-converter/unit-converter.agent.ts","../../src/components/unit-converter/units.ts","../../src/components/unit-converter/unit-converter.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — UnitConverter. */\n/* */\n/* Generic clinical/everyday unit conversion. The agent-relevant surface */\n/* is the read-only converted result plus the structural inputs (category, */\n/* source value, from-unit, to-unit) and `set_value` actions to drive */\n/* them. Values are plain measurements — no patient identity. The handle */\n/* is the curated `UnitConverterHandle`. See `src/docs/26-agent-readiness`.*/\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { UnitConverterHandle } from './unit-converter';\nimport type { UnitCategory } from './units';\n\n/**\n * Measurement families, mirrored from `./units`'s `CATEGORIES`. Inlined as a\n * literal (rather than runtime-imported) so the ESM catalog build can load this\n * pure module without TS path resolution; `satisfies` keeps it in lockstep with\n * the `UnitCategory` union at compile time.\n */\nconst CATEGORIES = [\n 'weight',\n 'length',\n 'temperature',\n 'glucose',\n] as const satisfies readonly UnitCategory[];\n\nexport const unitConverterAgent: AgentAdapter<UnitConverterHandle> = {\n id: 'unit-converter',\n capabilities: ['set_value', 'view_change'],\n state: {\n category: {\n type: \"'weight' | 'length' | 'temperature' | 'glucose'\",\n descriptionKey: 'ui.agent.unitConverter.state.category',\n description:\n 'Active measurement family. Determines which from/to units are selectable.',\n read: (handle) => handle.getCategory(),\n },\n inputs: {\n type: '{ value: number | null, fromId: string, toId: string }',\n descriptionKey: 'ui.agent.unitConverter.state.inputs',\n description:\n 'Source value plus the from-unit and to-unit ids within the active category.',\n read: (handle) => handle.getInputs(),\n },\n result: {\n type: 'number | null',\n descriptionKey: 'ui.agent.unitConverter.state.result',\n description:\n 'Converted value in the to-unit, or null when the source value is empty.',\n read: (handle) => handle.getResult(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: number | null }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: ['number', 'null'],\n description: 'Source value to convert, or null to clear.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.unitConverter.actions.setValue',\n description: 'Set the source value to convert.',\n examples: [{ args: { value: 70 }, note: 'Convert 70 of the from-unit.' }],\n invoke: (handle, args: { value: number | null }) => {\n handle.setValue(args.value);\n },\n },\n set_units: {\n safety: 'read',\n argsType: '{ fromId?: string, toId?: string }',\n argsSchema: {\n type: 'object',\n properties: {\n fromId: {\n type: 'string',\n description: 'Source unit id within the active category.',\n },\n toId: {\n type: 'string',\n description: 'Target unit id within the active category.',\n },\n },\n additionalProperties: false,\n },\n idempotent: true,\n descriptionKey: 'ui.agent.unitConverter.actions.setUnits',\n description:\n 'Set the from-unit and/or to-unit. Ids outside the active category are ignored.',\n examples: [\n { args: { fromId: 'kg', toId: 'lb' }, note: 'Convert kg → lb.' },\n ],\n invoke: (handle, args: { fromId?: string; toId?: string }) => {\n handle.setUnits(args);\n },\n },\n set_category: {\n safety: 'read',\n argsType: \"{ category: 'weight' | 'length' | 'temperature' | 'glucose' }\",\n argsSchema: {\n type: 'object',\n properties: {\n category: {\n enum: [...CATEGORIES],\n description: 'Measurement family to switch to.',\n },\n },\n required: ['category'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.unitConverter.actions.setCategory',\n description:\n 'Switch the measurement family. Resets the from/to units to that category defaults.',\n invoke: (\n handle,\n args: {\n category: 'weight' | 'length' | 'temperature' | 'glucose';\n },\n ) => {\n handle.setCategory(args.category);\n },\n },\n get_result: {\n safety: 'read',\n returns: 'number | null',\n returnsSchema: { type: ['number', 'null'] },\n idempotent: true,\n descriptionKey: 'ui.agent.unitConverter.actions.getResult',\n description:\n 'Return the converted value in the to-unit, or null when no source value is set.',\n invoke: (handle) => handle.getResult(),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'unit-converter',\n description: 'Marks the UnitConverter wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific converter instance.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Generic unit conversion — pure, framework-free, unit-testable. */\n/* */\n/* Every unit is described by an affine map to its category's base */\n/* unit: base = value * factor + offset. Conversion is base-in then */\n/* base-out, so the same code handles linear scales (weight, length, */\n/* glucose) and offset scales (temperature) uniformly. */\n/* ------------------------------------------------------------------ */\n\nexport type UnitCategory = 'weight' | 'length' | 'temperature' | 'glucose';\n\nexport interface UnitDef {\n id: string;\n category: UnitCategory;\n /** Multiplier to the category base unit. */\n factor: number;\n /** Additive offset to the base unit (non-zero only for temperature). */\n offset: number;\n}\n\n/* Base units: kg, cm, °C, mmol/L. */\nexport const UNITS: Record<string, UnitDef> = {\n // weight → base kg\n kg: { id: 'kg', category: 'weight', factor: 1, offset: 0 },\n g: { id: 'g', category: 'weight', factor: 0.001, offset: 0 },\n lb: { id: 'lb', category: 'weight', factor: 0.45359237, offset: 0 },\n oz: { id: 'oz', category: 'weight', factor: 0.028349523125, offset: 0 },\n // length → base cm\n cm: { id: 'cm', category: 'length', factor: 1, offset: 0 },\n m: { id: 'm', category: 'length', factor: 100, offset: 0 },\n in: { id: 'in', category: 'length', factor: 2.54, offset: 0 },\n ft: { id: 'ft', category: 'length', factor: 30.48, offset: 0 },\n // temperature → base °C (affine: °C = °F·5/9 − 32·5/9)\n c: { id: 'c', category: 'temperature', factor: 1, offset: 0 },\n f: { id: 'f', category: 'temperature', factor: 5 / 9, offset: (-32 * 5) / 9 },\n // glucose → base mmol/L (1 mg/dL = 1/18.0156 mmol/L)\n mmol_l: { id: 'mmol_l', category: 'glucose', factor: 1, offset: 0 },\n mg_dl: { id: 'mg_dl', category: 'glucose', factor: 1 / 18.0156, offset: 0 },\n};\n\nexport const UNITS_BY_CATEGORY: Record<UnitCategory, string[]> = {\n weight: ['kg', 'g', 'lb', 'oz'],\n length: ['cm', 'm', 'in', 'ft'],\n temperature: ['c', 'f'],\n glucose: ['mmol_l', 'mg_dl'],\n};\n\nexport const CATEGORIES: UnitCategory[] = [\n 'weight',\n 'length',\n 'temperature',\n 'glucose',\n];\n\n/**\n * Convert `value` from one unit to another. Both ids must belong to the same\n * category; mismatched categories throw (a programming error, not user input).\n */\nexport function convertUnits(\n value: number,\n fromId: string,\n toId: string,\n): number {\n const from = UNITS[fromId];\n const to = UNITS[toId];\n if (!from || !to) throw new Error(`Unknown unit: ${fromId} → ${toId}`);\n if (from.category !== to.category) {\n throw new Error(\n `Cannot convert across categories: ${from.category} → ${to.category}`,\n );\n }\n const base = value * from.factor + from.offset;\n return (base - to.offset) / to.factor;\n}\n","/* ------------------------------------------------------------------ */\n/* UnitConverter — generic clinical/everyday unit conversion across */\n/* weight, length, temperature and glucose. */\n/* */\n/* Maths lives in `./units` (pure, separately tested). */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, useEffect, useMemo, useRef, useState } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { unitConverterAgent } from './unit-converter.agent';\nimport { FormField } from '../form-field';\nimport { NumberInput } from '../number-input';\nimport { Select } from '../select';\nimport {\n InsertButton,\n type InsertPayload,\n type InsertVariant,\n type InsertMode,\n} from '../_shared/insert-result';\nimport {\n type UnitCategory,\n CATEGORIES,\n UNITS_BY_CATEGORY,\n convertUnits,\n} from './units';\n\nconst rootVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]', {\n variants: {\n width: { full: 'ds:w-full', auto: 'ds:inline-flex' },\n },\n defaultVariants: { width: 'full' },\n});\n\n/**\n * DS token NAME backing the result-card category chip, one per measurement\n * family. The converter shows no on-screen badge, but the inserted card carries\n * a category chip so the reader can tell at a glance which family the figure\n * belongs to; each token is a closed-palette semantic alias resolved to a\n * concrete colour at raster time by `InsertButton`.\n */\nconst CATEGORY_HIGHLIGHT_TOKEN: Record<UnitCategory, string> = {\n weight: '--info',\n length: '--success',\n temperature: '--warning-readable',\n glucose: '--accent',\n};\n\n/**\n * Category chip token. The `temperature` family resolves to `--warning-readable`,\n * which the result card's colour probe resolves in the live themed DOM: orange-600\n * in light, non-accessible mode (where bare `--warning` yellow only reaches\n * ~3.2:1 on the white card) and `--warning` elsewhere, whose deepened ramp already\n * clears contrast. Resolving the token NAME at the card means the choice tracks\n * the live theme regardless of where the theme class lives. Other families are\n * unchanged.\n */\nfunction categoryHighlightToken(category: UnitCategory): string {\n return CATEGORY_HIGHLIGHT_TOKEN[category];\n}\n\nexport interface UnitConverterProps extends VariantProps<typeof rootVariants> {\n /** Initial category. Defaults to `'weight'`. */\n defaultCategory?: UnitCategory;\n /** Fires with the converted value (and `null` when input is empty). */\n onResultChange?: (value: number | null) => void;\n /** When provided, shows an \"Insert\" button that emits the result for an editor. */\n onInsert?: (payload: InsertPayload) => void;\n /**\n * Which verb the result button performs. Defaults to `'insert'`.\n * Use `'copy'` in an app-shell surface (no editor to insert into) — the\n * button writes the result to the clipboard as a multi-format `ClipboardItem`.\n */\n insertVariant?: InsertVariant;\n /** `copy` variant only — fired after a successful clipboard write. */\n onCopy?: (mode: InsertMode) => void;\n /** `copy` variant only — fired if the clipboard write can't proceed. */\n onError?: (error: unknown) => void;\n /**\n * Brand wordmark printed in the inserted/copied result-card footer.\n * Omitted → no brand line (and no footer hairline); a string → that custom\n * brand; `false` → no brand line. Brand is opt-in.\n */\n insertBrand?: string | false;\n /** Opaque instance id, emitted as `data-component-id`. */\n id?: string;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\n/**\n * Curated imperative handle for agent / external automation. Reads/writes the\n * structural inputs (category, value, from/to units) and the converted result.\n * No patient identity. Consumed by the `unit-converter.agent.ts` adapter; the\n * public `ref` stays the DOM element.\n */\nexport interface UnitConverterHandle {\n /** Active measurement family. */\n getCategory: () => UnitCategory;\n /** Switch the measurement family (resets from/to units to that category). */\n setCategory: (next: UnitCategory) => void;\n /** Source value + from/to unit ids. */\n getInputs: () => { value: number | null; fromId: string; toId: string };\n /** Set the source value to convert. */\n setValue: (value: number | null) => void;\n /** Set from-unit and/or to-unit (ids outside the active category are ignored). */\n setUnits: (next: { fromId?: string; toId?: string }) => void;\n /** Converted value in the to-unit, or null when no source value is set. */\n getResult: () => number | null;\n}\n\nexport const UnitConverter = forwardRef<HTMLDivElement, UnitConverterProps>(\n (\n {\n defaultCategory = 'weight',\n onResultChange,\n onInsert,\n insertVariant = 'insert',\n onCopy,\n onError,\n insertBrand,\n id,\n width,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n const [category, setCategory] = useState<UnitCategory>(defaultCategory);\n const [value, setValue] = useState<number | null>(null);\n const [fromId, setFromId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][0],\n );\n const [toId, setToId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][1],\n );\n\n const handleCategoryChange = (next: string): void => {\n const cat = next as UnitCategory;\n const units = UNITS_BY_CATEGORY[cat];\n setCategory(cat);\n setFromId(units[0]);\n setToId(units[1] ?? units[0]);\n };\n\n const converted = useMemo(\n () => (value === null ? null : convertUnits(value, fromId, toId)),\n [value, fromId, toId],\n );\n\n const numberFmt = useMemo(\n () => new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 3 }),\n [i18n.language],\n );\n\n useEffect(() => {\n onResultChange?.(converted);\n }, [converted, onResultChange]);\n\n // Live refs so the once-built agent handle reads/writes current state\n // without re-creating on every keystroke. Public `ref` stays the DOM node.\n const liveRef = useRef({ category, value, fromId, toId, converted });\n liveRef.current = { category, value, fromId, toId, converted };\n const agentHandle = useMemo<UnitConverterHandle>(\n () => ({\n getCategory: () => liveRef.current.category,\n setCategory: (next) => handleCategoryChange(next),\n getInputs: () => ({\n value: liveRef.current.value,\n fromId: liveRef.current.fromId,\n toId: liveRef.current.toId,\n }),\n setValue: (next) => setValue(next),\n setUnits: (next) => {\n const units = UNITS_BY_CATEGORY[liveRef.current.category];\n if (next.fromId !== undefined && units.includes(next.fromId)) {\n setFromId(next.fromId);\n }\n if (next.toId !== undefined && units.includes(next.toId)) {\n setToId(next.toId);\n }\n },\n getResult: () => liveRef.current.converted,\n }),\n [],\n );\n useAgentRegistration(unitConverterAgent, agentHandle, id);\n\n const categoryOptions = CATEGORIES.map((c) => ({\n value: c,\n label: t(`unitConverter.category.${c}`),\n }));\n const unitOptions = UNITS_BY_CATEGORY[category].map((u) => ({\n value: u,\n label: t(`unitConverter.units.${u}`),\n }));\n\n return (\n <div\n ref={ref}\n data-component=\"unit-converter\"\n data-component-id={id}\n className={rootVariants({ width, className })}\n >\n <FormField label={t('unitConverter.categoryLabel')}>\n <Select\n options={categoryOptions}\n value={category}\n onValueChange={handleCategoryChange}\n />\n </FormField>\n\n <div className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3\">\n <FormField label={t('unitConverter.value')}>\n <NumberInput mode=\"decimal\" value={value} onChange={setValue} />\n </FormField>\n <FormField label={t('unitConverter.from')}>\n <Select\n options={unitOptions}\n value={fromId}\n onValueChange={setFromId}\n />\n </FormField>\n <FormField label={t('unitConverter.to')}>\n <Select\n options={unitOptions}\n value={toId}\n onValueChange={setToId}\n />\n </FormField>\n </div>\n\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {converted !== null\n ? `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )} = ${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`\n : ''}\n </p>\n\n {converted !== null ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <span className=\"type-label ds:text-muted-foreground\">\n {t('unitConverter.result')}\n </span>\n <span className=\"type-metric ds:text-foreground\">\n {numberFmt.format(converted)} {t(`unitConverter.units.${toId}`)}\n </span>\n {insertVariant === 'copy' || onInsert ? (\n <InsertButton\n variant={insertVariant}\n onInsert={onInsert}\n onCopy={onCopy}\n onError={onError}\n card={{\n title: t('insert.title.unitConverter'),\n icon: 'ruler',\n highlight: t(`unitConverter.category.${category}`),\n // Chip tints by measurement family so the inserted card\n // signals the category at a glance — with the contrast-safe\n // orange override for the `--warning` temperature family.\n highlightToken: categoryHighlightToken(category),\n brand: insertBrand,\n fields: [\n {\n // Source measurement → ruler glyph (matches the header).\n icon: 'ruler',\n label: t('unitConverter.from'),\n value: `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )}`,\n },\n {\n // Converted result → trending-up (arrow) glyph signals the\n // conversion direction to the output value.\n icon: 'trending-up',\n label: t('unitConverter.to'),\n value: `${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`,\n },\n ],\n }}\n />\n ) : null}\n </div>\n ) : (\n <p className=\"type-body ds:text-muted-foreground\">\n {t('unitConverter.empty')}\n </p>\n )}\n </div>\n );\n },\n);\n\nUnitConverter.displayName = 'UnitConverter';\n"],"names":["CATEGORIES","unitConverterAgent","handle","args","UNITS","UNITS_BY_CATEGORY","convertUnits","value","fromId","toId","from","to","rootVariants","cva","CATEGORY_HIGHLIGHT_TOKEN","categoryHighlightToken","category","UnitConverter","forwardRef","defaultCategory","onResultChange","onInsert","insertVariant","onCopy","onError","insertBrand","id","width","className","ref","t","i18n","useTranslation","setCategory","useState","setValue","setFromId","setToId","handleCategoryChange","next","cat","units","converted","useMemo","numberFmt","useEffect","liveRef","useRef","agentHandle","useAgentRegistration","categoryOptions","c","unitOptions","u","jsxs","jsx","FormField","Select","NumberInput","InsertButton"],"mappings":";;;;;;;;;AAoBA,MAAMA,IAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAAwD;AAAA,EACnE,IAAI;AAAA,EACJ,cAAc,CAAC,aAAa,aAAa;AAAA,EACzC,OAAO;AAAA,IACL,UAAU;AAAA,MACR,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,YAAA;AAAA,IAAY;AAAA,IAEvC,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,EACrC;AAAA,EAEF,SAAS;AAAA,IACP,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,YAAY;AAAA,QACV,M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kN7YP.js","sources":["../../src/components/unit-converter/unit-converter.agent.ts","../../src/components/unit-converter/units.ts","../../src/components/unit-converter/unit-converter.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — UnitConverter. */\n/* */\n/* Generic clinical/everyday unit conversion. The agent-relevant surface */\n/* is the read-only converted result plus the structural inputs (category, */\n/* source value, from-unit, to-unit) and `set_value` actions to drive */\n/* them. Values are plain measurements — no patient identity. The handle */\n/* is the curated `UnitConverterHandle`. See `src/docs/26-agent-readiness`.*/\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { UnitConverterHandle } from './unit-converter';\nimport type { UnitCategory } from './units';\n\n/**\n * Measurement families, mirrored from `./units`'s `CATEGORIES`. Inlined as a\n * literal (rather than runtime-imported) so the ESM catalog build can load this\n * pure module without TS path resolution; `satisfies` keeps it in lockstep with\n * the `UnitCategory` union at compile time.\n */\nconst CATEGORIES = [\n 'weight',\n 'length',\n 'temperature',\n 'glucose',\n] as const satisfies readonly UnitCategory[];\n\nexport const unitConverterAgent: AgentAdapter<UnitConverterHandle> = {\n id: 'unit-converter',\n capabilities: ['set_value', 'view_change'],\n state: {\n category: {\n type: \"'weight' | 'length' | 'temperature' | 'glucose'\",\n descriptionKey: 'ui.agent.unitConverter.state.category',\n description:\n 'Active measurement family. Determines which from/to units are selectable.',\n read: (handle) => handle.getCategory(),\n },\n inputs: {\n type: '{ value: number | null, fromId: string, toId: string }',\n descriptionKey: 'ui.agent.unitConverter.state.inputs',\n description:\n 'Source value plus the from-unit and to-unit ids within the active category.',\n read: (handle) => handle.getInputs(),\n },\n result: {\n type: 'number | null',\n descriptionKey: 'ui.agent.unitConverter.state.result',\n description:\n 'Converted value in the to-unit, or null when the source value is empty.',\n read: (handle) => handle.getResult(),\n },\n },\n actions: {\n set_value: {\n safety: 'write',\n argsType: '{ value: number | null }',\n argsSchema: {\n type: 'object',\n properties: {\n value: {\n type: ['number', 'null'],\n description: 'Source value to convert, or null to clear.',\n },\n },\n required: ['value'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.unitConverter.actions.setValue',\n description: 'Set the source value to convert.',\n examples: [{ args: { value: 70 }, note: 'Convert 70 of the from-unit.' }],\n invoke: (handle, args: { value: number | null }) => {\n handle.setValue(args.value);\n },\n },\n set_units: {\n safety: 'read',\n argsType: '{ fromId?: string, toId?: string }',\n argsSchema: {\n type: 'object',\n properties: {\n fromId: {\n type: 'string',\n description: 'Source unit id within the active category.',\n },\n toId: {\n type: 'string',\n description: 'Target unit id within the active category.',\n },\n },\n additionalProperties: false,\n },\n idempotent: true,\n descriptionKey: 'ui.agent.unitConverter.actions.setUnits',\n description:\n 'Set the from-unit and/or to-unit. Ids outside the active category are ignored.',\n examples: [\n { args: { fromId: 'kg', toId: 'lb' }, note: 'Convert kg → lb.' },\n ],\n invoke: (handle, args: { fromId?: string; toId?: string }) => {\n handle.setUnits(args);\n },\n },\n set_category: {\n safety: 'read',\n argsType: \"{ category: 'weight' | 'length' | 'temperature' | 'glucose' }\",\n argsSchema: {\n type: 'object',\n properties: {\n category: {\n enum: [...CATEGORIES],\n description: 'Measurement family to switch to.',\n },\n },\n required: ['category'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.unitConverter.actions.setCategory',\n description:\n 'Switch the measurement family. Resets the from/to units to that category defaults.',\n invoke: (\n handle,\n args: {\n category: 'weight' | 'length' | 'temperature' | 'glucose';\n },\n ) => {\n handle.setCategory(args.category);\n },\n },\n get_result: {\n safety: 'read',\n returns: 'number | null',\n returnsSchema: { type: ['number', 'null'] },\n idempotent: true,\n descriptionKey: 'ui.agent.unitConverter.actions.getResult',\n description:\n 'Return the converted value in the to-unit, or null when no source value is set.',\n invoke: (handle) => handle.getResult(),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'unit-converter',\n description: 'Marks the UnitConverter wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific converter instance.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Generic unit conversion — pure, framework-free, unit-testable. */\n/* */\n/* Every unit is described by an affine map to its category's base */\n/* unit: base = value * factor + offset. Conversion is base-in then */\n/* base-out, so the same code handles linear scales (weight, length, */\n/* glucose) and offset scales (temperature) uniformly. */\n/* ------------------------------------------------------------------ */\n\nexport type UnitCategory = 'weight' | 'length' | 'temperature' | 'glucose';\n\nexport interface UnitDef {\n id: string;\n category: UnitCategory;\n /** Multiplier to the category base unit. */\n factor: number;\n /** Additive offset to the base unit (non-zero only for temperature). */\n offset: number;\n}\n\n/* Base units: kg, cm, °C, mmol/L. */\nexport const UNITS: Record<string, UnitDef> = {\n // weight → base kg\n kg: { id: 'kg', category: 'weight', factor: 1, offset: 0 },\n g: { id: 'g', category: 'weight', factor: 0.001, offset: 0 },\n lb: { id: 'lb', category: 'weight', factor: 0.45359237, offset: 0 },\n oz: { id: 'oz', category: 'weight', factor: 0.028349523125, offset: 0 },\n // length → base cm\n cm: { id: 'cm', category: 'length', factor: 1, offset: 0 },\n m: { id: 'm', category: 'length', factor: 100, offset: 0 },\n in: { id: 'in', category: 'length', factor: 2.54, offset: 0 },\n ft: { id: 'ft', category: 'length', factor: 30.48, offset: 0 },\n // temperature → base °C (affine: °C = °F·5/9 − 32·5/9)\n c: { id: 'c', category: 'temperature', factor: 1, offset: 0 },\n f: { id: 'f', category: 'temperature', factor: 5 / 9, offset: (-32 * 5) / 9 },\n // glucose → base mmol/L (1 mg/dL = 1/18.0156 mmol/L)\n mmol_l: { id: 'mmol_l', category: 'glucose', factor: 1, offset: 0 },\n mg_dl: { id: 'mg_dl', category: 'glucose', factor: 1 / 18.0156, offset: 0 },\n};\n\nexport const UNITS_BY_CATEGORY: Record<UnitCategory, string[]> = {\n weight: ['kg', 'g', 'lb', 'oz'],\n length: ['cm', 'm', 'in', 'ft'],\n temperature: ['c', 'f'],\n glucose: ['mmol_l', 'mg_dl'],\n};\n\nexport const CATEGORIES: UnitCategory[] = [\n 'weight',\n 'length',\n 'temperature',\n 'glucose',\n];\n\n/**\n * Convert `value` from one unit to another. Both ids must belong to the same\n * category; mismatched categories throw (a programming error, not user input).\n */\nexport function convertUnits(\n value: number,\n fromId: string,\n toId: string,\n): number {\n const from = UNITS[fromId];\n const to = UNITS[toId];\n if (!from || !to) throw new Error(`Unknown unit: ${fromId} → ${toId}`);\n if (from.category !== to.category) {\n throw new Error(\n `Cannot convert across categories: ${from.category} → ${to.category}`,\n );\n }\n const base = value * from.factor + from.offset;\n return (base - to.offset) / to.factor;\n}\n","/* ------------------------------------------------------------------ */\n/* UnitConverter — generic clinical/everyday unit conversion across */\n/* weight, length, temperature and glucose. */\n/* */\n/* Maths lives in `./units` (pure, separately tested). */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, useEffect, useMemo, useRef, useState } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { unitConverterAgent } from './unit-converter.agent';\nimport { FormField } from '../form-field';\nimport { NumberInput } from '../number-input';\nimport { Select } from '../select';\nimport {\n InsertButton,\n type InsertPayload,\n type InsertVariant,\n type InsertMode,\n} from '../_shared/insert-result';\nimport {\n type UnitCategory,\n CATEGORIES,\n UNITS_BY_CATEGORY,\n convertUnits,\n} from './units';\n\nconst rootVariants = cva('ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]', {\n variants: {\n width: { full: 'ds:w-full', auto: 'ds:inline-flex' },\n },\n defaultVariants: { width: 'full' },\n});\n\n/**\n * DS token NAME backing the result-card category chip, one per measurement\n * family. The converter shows no on-screen badge, but the inserted card carries\n * a category chip so the reader can tell at a glance which family the figure\n * belongs to; each token is a closed-palette semantic alias resolved to a\n * concrete colour at raster time by `InsertButton`.\n */\nconst CATEGORY_HIGHLIGHT_TOKEN: Record<UnitCategory, string> = {\n weight: '--info',\n length: '--success',\n temperature: '--warning-readable',\n glucose: '--accent',\n};\n\n/**\n * Category chip token. The `temperature` family resolves to `--warning-readable`,\n * which the result card's colour probe resolves in the live themed DOM: orange-600\n * in light, non-accessible mode (where bare `--warning` yellow only reaches\n * ~3.2:1 on the white card) and `--warning` elsewhere, whose deepened ramp already\n * clears contrast. Resolving the token NAME at the card means the choice tracks\n * the live theme regardless of where the theme class lives. Other families are\n * unchanged.\n */\nfunction categoryHighlightToken(category: UnitCategory): string {\n return CATEGORY_HIGHLIGHT_TOKEN[category];\n}\n\nexport interface UnitConverterProps extends VariantProps<typeof rootVariants> {\n /** Initial category. Defaults to `'weight'`. */\n defaultCategory?: UnitCategory;\n /** Fires with the converted value (and `null` when input is empty). */\n onResultChange?: (value: number | null) => void;\n /** When provided, shows an \"Insert\" button that emits the result for an editor. */\n onInsert?: (payload: InsertPayload) => void;\n /**\n * Which verb the result button performs. Defaults to `'insert'`.\n * Use `'copy'` in an app-shell surface (no editor to insert into) — the\n * button writes the result to the clipboard as a multi-format `ClipboardItem`.\n */\n insertVariant?: InsertVariant;\n /** `copy` variant only — fired after a successful clipboard write. */\n onCopy?: (mode: InsertMode) => void;\n /** `copy` variant only — fired if the clipboard write can't proceed. */\n onError?: (error: unknown) => void;\n /**\n * Brand wordmark printed in the inserted/copied result-card footer.\n * Omitted → no brand line (and no footer hairline); a string → that custom\n * brand; `false` → no brand line. Brand is opt-in.\n */\n insertBrand?: string | false;\n /** Opaque instance id, emitted as `data-component-id`. */\n id?: string;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\n/**\n * Curated imperative handle for agent / external automation. Reads/writes the\n * structural inputs (category, value, from/to units) and the converted result.\n * No patient identity. Consumed by the `unit-converter.agent.ts` adapter; the\n * public `ref` stays the DOM element.\n */\nexport interface UnitConverterHandle {\n /** Active measurement family. */\n getCategory: () => UnitCategory;\n /** Switch the measurement family (resets from/to units to that category). */\n setCategory: (next: UnitCategory) => void;\n /** Source value + from/to unit ids. */\n getInputs: () => { value: number | null; fromId: string; toId: string };\n /** Set the source value to convert. */\n setValue: (value: number | null) => void;\n /** Set from-unit and/or to-unit (ids outside the active category are ignored). */\n setUnits: (next: { fromId?: string; toId?: string }) => void;\n /** Converted value in the to-unit, or null when no source value is set. */\n getResult: () => number | null;\n}\n\nexport const UnitConverter = forwardRef<HTMLDivElement, UnitConverterProps>(\n (\n {\n defaultCategory = 'weight',\n onResultChange,\n onInsert,\n insertVariant = 'insert',\n onCopy,\n onError,\n insertBrand,\n id,\n width,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n\n const [category, setCategory] = useState<UnitCategory>(defaultCategory);\n const [value, setValue] = useState<number | null>(null);\n const [fromId, setFromId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][0],\n );\n const [toId, setToId] = useState<string>(\n UNITS_BY_CATEGORY[defaultCategory][1],\n );\n\n const handleCategoryChange = (next: string): void => {\n const cat = next as UnitCategory;\n const units = UNITS_BY_CATEGORY[cat];\n setCategory(cat);\n setFromId(units[0]);\n setToId(units[1] ?? units[0]);\n };\n\n const converted = useMemo(\n () => (value === null ? null : convertUnits(value, fromId, toId)),\n [value, fromId, toId],\n );\n\n const numberFmt = useMemo(\n () => new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 3 }),\n [i18n.language],\n );\n\n useEffect(() => {\n onResultChange?.(converted);\n }, [converted, onResultChange]);\n\n // Live refs so the once-built agent handle reads/writes current state\n // without re-creating on every keystroke. Public `ref` stays the DOM node.\n const liveRef = useRef({ category, value, fromId, toId, converted });\n liveRef.current = { category, value, fromId, toId, converted };\n const agentHandle = useMemo<UnitConverterHandle>(\n () => ({\n getCategory: () => liveRef.current.category,\n setCategory: (next) => handleCategoryChange(next),\n getInputs: () => ({\n value: liveRef.current.value,\n fromId: liveRef.current.fromId,\n toId: liveRef.current.toId,\n }),\n setValue: (next) => setValue(next),\n setUnits: (next) => {\n const units = UNITS_BY_CATEGORY[liveRef.current.category];\n if (next.fromId !== undefined && units.includes(next.fromId)) {\n setFromId(next.fromId);\n }\n if (next.toId !== undefined && units.includes(next.toId)) {\n setToId(next.toId);\n }\n },\n getResult: () => liveRef.current.converted,\n }),\n [],\n );\n useAgentRegistration(unitConverterAgent, agentHandle, id);\n\n const categoryOptions = CATEGORIES.map((c) => ({\n value: c,\n label: t(`unitConverter.category.${c}`),\n }));\n const unitOptions = UNITS_BY_CATEGORY[category].map((u) => ({\n value: u,\n label: t(`unitConverter.units.${u}`),\n }));\n\n return (\n <div\n ref={ref}\n data-component=\"unit-converter\"\n data-component-id={id}\n className={rootVariants({ width, className })}\n >\n <FormField label={t('unitConverter.categoryLabel')}>\n <Select\n options={categoryOptions}\n value={category}\n onValueChange={handleCategoryChange}\n />\n </FormField>\n\n <div className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3\">\n <FormField label={t('unitConverter.value')}>\n <NumberInput mode=\"decimal\" value={value} onChange={setValue} />\n </FormField>\n <FormField label={t('unitConverter.from')}>\n <Select\n options={unitOptions}\n value={fromId}\n onValueChange={setFromId}\n />\n </FormField>\n <FormField label={t('unitConverter.to')}>\n <Select\n options={unitOptions}\n value={toId}\n onValueChange={setToId}\n />\n </FormField>\n </div>\n\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {converted !== null\n ? `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )} = ${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`\n : ''}\n </p>\n\n {converted !== null ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n <span className=\"type-label ds:text-muted-foreground\">\n {t('unitConverter.result')}\n </span>\n <span className=\"type-metric ds:text-foreground\">\n {numberFmt.format(converted)} {t(`unitConverter.units.${toId}`)}\n </span>\n {insertVariant === 'copy' || onInsert ? (\n <InsertButton\n variant={insertVariant}\n onInsert={onInsert}\n onCopy={onCopy}\n onError={onError}\n card={{\n title: t('insert.title.unitConverter'),\n icon: 'ruler',\n highlight: t(`unitConverter.category.${category}`),\n // Chip tints by measurement family so the inserted card\n // signals the category at a glance — with the contrast-safe\n // orange override for the `--warning` temperature family.\n highlightToken: categoryHighlightToken(category),\n brand: insertBrand,\n fields: [\n {\n // Source measurement → ruler glyph (matches the header).\n icon: 'ruler',\n label: t('unitConverter.from'),\n value: `${numberFmt.format(value ?? 0)} ${t(\n `unitConverter.units.${fromId}`,\n )}`,\n },\n {\n // Converted result → trending-up (arrow) glyph signals the\n // conversion direction to the output value.\n icon: 'trending-up',\n label: t('unitConverter.to'),\n value: `${numberFmt.format(converted)} ${t(\n `unitConverter.units.${toId}`,\n )}`,\n },\n ],\n }}\n />\n ) : null}\n </div>\n ) : (\n <p className=\"type-body ds:text-muted-foreground\">\n {t('unitConverter.empty')}\n </p>\n )}\n </div>\n );\n },\n);\n\nUnitConverter.displayName = 'UnitConverter';\n"],"names":["CATEGORIES","unitConverterAgent","handle","args","UNITS","UNITS_BY_CATEGORY","convertUnits","value","fromId","toId","from","to","rootVariants","cva","CATEGORY_HIGHLIGHT_TOKEN","categoryHighlightToken","category","UnitConverter","forwardRef","defaultCategory","onResultChange","onInsert","insertVariant","onCopy","onError","insertBrand","id","width","className","ref","t","i18n","useTranslation","setCategory","useState","setValue","setFromId","setToId","handleCategoryChange","next","cat","units","converted","useMemo","numberFmt","useEffect","liveRef","useRef","agentHandle","useAgentRegistration","categoryOptions","c","unitOptions","u","jsxs","jsx","FormField","Select","NumberInput","InsertButton"],"mappings":";;;;;;;;;AAoBA,MAAMA,IAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAAwD;AAAA,EACnE,IAAI;AAAA,EACJ,cAAc,CAAC,aAAa,aAAa;AAAA,EACzC,OAAO;AAAA,IACL,UAAU;AAAA,MACR,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,YAAA;AAAA,IAAY;AAAA,IAEvC,QAAQ;AAAA,MACN,MAAM;AAAA,MAC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;AAAA,wBACvC,uBAAuBrB,CAAI;AAAA,sBAAA,CAC5B;AAAA,oBAAA;AAAA,kBACH;AAAA,gBACF;AAAA,cACF;AAAA,YAAA,IAEA;AAAA,UAAA,GACN,IAEA,gBAAA8C,EAAC,KAAA,EAAE,WAAU,sCACV,UAAAzB,EAAE,qBAAqB,EAAA,CAC1B;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAb,GAAc,cAAc;"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "1.3.11",
3
+ "packageVersion": "1.3.13",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -1,4 +1,4 @@
1
- import { A as i, a as t } from "../../_chunks/appointment-timeline-BB-c1LeR.js";
1
+ import { A as i, a as t } from "../../_chunks/appointment-timeline-B630OT_J.js";
2
2
  export {
3
3
  i as AppointmentTimeline,
4
4
  t as appointmentTimelineAgent
@@ -1,4 +1,4 @@
1
- import { B as m } from "../../_chunks/bmi-calculator-Bk2GAju7.js";
1
+ import { B as m } from "../../_chunks/bmi-calculator-CM0-G2mg.js";
2
2
  import { b as e, a as t, c as r, d as T, e as c, f as i, i as b, k as n, l as f } from "../../_chunks/bmi-BxD-tFzU.js";
3
3
  export {
4
4
  m as BmiCalculator,
@@ -1,4 +1,4 @@
1
- import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-BxFV0hT5.js";
1
+ import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-DjNbd7C1.js";
2
2
  export {
3
3
  A as Booking,
4
4
  R as CONFIRMATION_CHANNEL_ORDER,
@@ -1,4 +1,4 @@
1
- import { C as e, L as l, p as r } from "../../_chunks/cycle-calculator-DNvvr0bP.js";
1
+ import { C as e, L as l, p as r } from "../../_chunks/cycle-calculator-BwqYVPB4.js";
2
2
  export {
3
3
  e as CycleCalculator,
4
4
  l as LUTEAL_PHASE_DAYS,
@@ -1,6 +1,6 @@
1
1
  import { A as r, D as l, T as t, a as s, b as n, c as o, d, e as i, f as C } from "../../_chunks/actions-cell-renderer-Ceah0ywE.js";
2
2
  import { B as T, C as F, E as g, a as b, R as u, T as c, b as m, r as f, u as x } from "../../_chunks/editable-currency-cell-renderer-Uhzkd0ZP.js";
3
- import { C as p, D as h, a as y, b as E, I as S, L as A, N as L, c as N, S as B, d as I, e as P, T as U, f as W, g as k, U as v } from "../../_chunks/link-cell-renderer-_DlEZHLI.js";
3
+ import { C as p, D as h, a as y, b as E, I as S, L as A, N as L, c as N, S as B, d as I, e as P, T as U, f as W, g as k, U as v } from "../../_chunks/link-cell-renderer-C5XLwVXQ.js";
4
4
  export {
5
5
  r as ActionsCellRenderer,
6
6
  T as BalanceCellRenderer,
@@ -46,6 +46,14 @@ export interface DatePickerProps extends Pick<VariantProps<typeof triggerVariant
46
46
  className?: string;
47
47
  /** id override. */
48
48
  id?: string;
49
+ /** Accessible name for the date input, when the picker is NOT wrapped in a
50
+ * `FormField`. Without one — and without a FormField's `<label htmlFor>` —
51
+ * the input has no accessible name at all, so a picker placed inline beside
52
+ * chips or in a toolbar was unnamed to a screen reader. Ignored in favour of
53
+ * the FormField label when both are present. */
54
+ 'aria-label'?: string;
55
+ /** Accessible name by reference, same conditions as `aria-label`. */
56
+ 'aria-labelledby'?: string;
49
57
  }
50
58
  export declare const DatePicker: import("react").ForwardRefExoticComponent<DatePickerProps & import("react").RefAttributes<HTMLDivElement>>;
51
59
  //# sourceMappingURL=date-picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAe7D,OAAO,EAML,eAAe,EAIhB,MAAM,YAAY,CAAC;AAQpB,wFAAwF;AACxF,MAAM,WAAW,gBAAgB;IAC/B,mDAAmD;IACnD,QAAQ,EAAE,MAAM,IAAI,GAAG,SAAS,CAAC;IACjC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OAAO,CAAC,EAAE,IAAI,CAAC;IACf,2CAA2C;IAC3C,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC;IACnD,uEAAuE;IACvE,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACzC,6DAA6D;IAC7D,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,sBAAsB;IACtB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;oDAIgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAMD,eAAO,MAAM,UAAU,4GA4RtB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { D as r, d as t } from "../../_chunks/date-picker-BP_W6VtE.js";
1
+ import { D as r, d as t } from "../../_chunks/date-picker-ZHejTVAJ.js";
2
2
  export {
3
3
  r as DatePicker,
4
4
  t as datePickerAgent
@@ -1,4 +1,4 @@
1
- import { D as e } from "../../_chunks/due-date-calculator-BEcdoy_E.js";
1
+ import { D as e } from "../../_chunks/due-date-calculator-CwfsFd3T.js";
2
2
  import { C as r, a as o, D, G as _, M as T, T as M, c as E, b as l, g as C, p as A, r as N, d as i, t as n } from "../../_chunks/antenatal-schedule-timeline-BMMpi2lb.js";
3
3
  export {
4
4
  r as CRL_DATING_MAX_MM,
@@ -1,4 +1,4 @@
1
- import { F as a, e as i } from "../../_chunks/fetal-weight-1F9N4IMx.js";
1
+ import { F as a, e as i } from "../../_chunks/fetal-weight-ePlLjJPc.js";
2
2
  export {
3
3
  a as FetalWeight,
4
4
  i as estimateFetalWeight
@@ -1,4 +1,4 @@
1
- import { G as t } from "../../_chunks/gestational-age-calculator-CuGkVqKp.js";
1
+ import { G as t } from "../../_chunks/gestational-age-calculator-DdgbH69Z.js";
2
2
  export {
3
3
  t as GestationalAgeCalculator
4
4
  };
@@ -1,4 +1,4 @@
1
- import { H, M as g, a as o } from "../../_chunks/hcg-doubling-fZ6qQN08.js";
1
+ import { H, M as g, a as o } from "../../_chunks/hcg-doubling-BBqD2wI2.js";
2
2
  export {
3
3
  H as HcgDoubling,
4
4
  g as MINIMAL_48H_RISE_PERCENT,
@@ -1,4 +1,4 @@
1
- import { N as r, u as a } from "../../_chunks/number-input-DjWzmlEY.js";
1
+ import { N as r, u as a } from "../../_chunks/number-input-DrozbZAU.js";
2
2
  export {
3
3
  r as NumberInput,
4
4
  a as useLocaleNumber
@@ -1 +1 @@
1
- {"version":3,"file":"number-input.d.ts","sourceRoot":"","sources":["../../../src/components/number-input/number-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,mBAAmB,EAGzB,MAAM,OAAO,CAAC;AACf,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQlE,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE5E,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,QAAA,MAAM,mBAAmB;;;8EAwBxB,CAAC;AAUF,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC,MAAM,WAAW,gBACf,SACE,IAAI,CACF,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,CACxD,EACD,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAC1C,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAwBD,eAAO,MAAM,WAAW,+GA4SvB,CAAC"}
1
+ {"version":3,"file":"number-input.d.ts","sourceRoot":"","sources":["../../../src/components/number-input/number-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,mBAAmB,EAGzB,MAAM,OAAO,CAAC;AACf,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQlE,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE5E,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,QAAA,MAAM,mBAAmB;;;8EAwBxB,CAAC;AAUF,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC,MAAM,WAAW,gBACf,SACE,IAAI,CACF,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,CACxD,EACD,YAAY,CAAC,OAAO,mBAAmB,CAAC;IAC1C,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAwBD,eAAO,MAAM,WAAW,+GA+WvB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { A as S, a as r, b as A, c as e, d as I, e as _, C as t, f as E, g as o, D as M, h as i, E as P, L as N, O as R, P as m, i as D, j as n, k as f, l, R as X, S as C, m as d, n as p, o as T, p as c, q as L, r as O, s as Y, t as g, u as x, v as B, w as u, x as w, y, z as H, B as b, F as h } from "../../_chunks/optical-prescription-BEjYQjiO.js";
1
+ import { A as S, a as r, b as A, c as e, d as I, e as _, C as t, f as E, g as o, D as M, h as i, E as P, L as N, O as R, P as m, i as D, j as n, k as f, l, R as X, S as C, m as d, n as p, o as T, p as c, q as L, r as O, s as Y, t as g, u as x, v as B, w as u, x as w, y, z as H, B as b, F as h } from "../../_chunks/optical-prescription-BDHJr8Zz.js";
2
2
  export {
3
3
  S as ADD_MAX,
4
4
  r as ADD_MIN,
@@ -1,4 +1,4 @@
1
- import { P as e, p as i } from "../../_chunks/patient-details-BAUg0FWs.js";
1
+ import { P as e, p as i } from "../../_chunks/patient-details-DqjjwPmt.js";
2
2
  export {
3
3
  e as PatientDetails,
4
4
  i as patientDetailsAgent
@@ -1,4 +1,4 @@
1
- import { B as s, C as l, N as t, P as n, a as C, b as i, g as o, u } from "../../_chunks/patient-table-C7QHFC63.js";
1
+ import { B as s, C as l, N as t, P as n, a as C, b as i, g as o, u } from "../../_chunks/patient-table-BmIDrLIS.js";
2
2
  export {
3
3
  s as BalanceBadgeCell,
4
4
  l as CarePlanStatusCell,
@@ -1,4 +1,4 @@
1
- import { P as r } from "../../_chunks/pregnancy-dating-BdFl-rB1.js";
1
+ import { P as r } from "../../_chunks/pregnancy-dating-DzYTlBkT.js";
2
2
  export {
3
3
  r as PregnancyDating
4
4
  };
@@ -1,4 +1,4 @@
1
- import { P as s, R as n, T as i, a as r, r as A } from "../../_chunks/pregnancy-weight-gain-B-CkVYnU.js";
1
+ import { P as s, R as n, T as i, a as r, r as A } from "../../_chunks/pregnancy-weight-gain-O6J0sUIi.js";
2
2
  export {
3
3
  s as PregnancyWeightGain,
4
4
  n as RATE_BANDS,
@@ -1,4 +1,4 @@
1
- import { R as o, I as e, r as n } from "../../_chunks/radiograph-panel.agent-AsXJBr1p.js";
1
+ import { R as o, I as e, r as n } from "../../_chunks/radiograph-panel.agent-BQZ64Riy.js";
2
2
  export {
3
3
  o as RadiographPanel,
4
4
  e as RadiographPanelIcon,
@@ -1,4 +1,4 @@
1
- import { C as r, U as t, a as U, b as e, c as n } from "../../_chunks/unit-converter-CSLWFDQh.js";
1
+ import { C as r, U as t, a as U, b as e, c as n } from "../../_chunks/unit-converter-COgkN7YP.js";
2
2
  export {
3
3
  r as CATEGORIES,
4
4
  t as UNITS,