@alfadocs/ui-kit-debug 1.4.12 → 1.4.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.
- package/dist/_chunks/actions-cell-renderer-BD-jruqA.js +1784 -0
- package/dist/_chunks/actions-cell-renderer-BD-jruqA.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-DAIpD0Or.js → anamnesis-summary-rows-B5MAYkJ-.js} +2150 -2092
- package/dist/_chunks/anamnesis-summary-rows-B5MAYkJ-.js.map +1 -0
- package/dist/_chunks/{bmi-calculator-CxPn0T0s.js → bmi-calculator-DC5SaqXT.js} +2 -2
- package/dist/_chunks/{bmi-calculator-CxPn0T0s.js.map → bmi-calculator-DC5SaqXT.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-D9M7IKfh.js → cycle-calculator-B_NlctlQ.js} +2 -2
- package/dist/_chunks/{cycle-calculator-D9M7IKfh.js.map → cycle-calculator-B_NlctlQ.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-BkqZEvL4.js → due-date-calculator-le1z3KpW.js} +2 -2
- package/dist/_chunks/{due-date-calculator-BkqZEvL4.js.map → due-date-calculator-le1z3KpW.js.map} +1 -1
- package/dist/_chunks/{fetal-weight-C7JXGg6E.js → fetal-weight-DXA6ZpMq.js} +2 -2
- package/dist/_chunks/{fetal-weight-C7JXGg6E.js.map → fetal-weight-DXA6ZpMq.js.map} +1 -1
- package/dist/_chunks/{file-manager-DzWYcRpE.js → file-manager-BjCM2fZB.js} +2 -2
- package/dist/_chunks/{file-manager-DzWYcRpE.js.map → file-manager-BjCM2fZB.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-CFJlMH7Z.js → hcg-doubling-BT6lki_i.js} +2 -2
- package/dist/_chunks/{hcg-doubling-CFJlMH7Z.js.map → hcg-doubling-BT6lki_i.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-DCCca2m3.js → link-cell-renderer-C7GvyK66.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-DCCca2m3.js.map → link-cell-renderer-C7GvyK66.js.map} +1 -1
- package/dist/_chunks/number-input-CM1q9zvH.js +414 -0
- package/dist/_chunks/number-input-CM1q9zvH.js.map +1 -0
- package/dist/_chunks/{optical-prescription-Brs0CeP3.js → optical-prescription-CQR_WJiS.js} +2 -2
- package/dist/_chunks/{optical-prescription-Brs0CeP3.js.map → optical-prescription-CQR_WJiS.js.map} +1 -1
- package/dist/_chunks/{patient-details-CGhnfdUB.js → patient-details-CnFgF3MU.js} +2 -2
- package/dist/_chunks/{patient-details-CGhnfdUB.js.map → patient-details-CnFgF3MU.js.map} +1 -1
- package/dist/_chunks/{patient-table-D2fhV4mV.js → patient-table-BXzcrC79.js} +3 -3
- package/dist/_chunks/{patient-table-D2fhV4mV.js.map → patient-table-BXzcrC79.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-iI6_j2K2.js → pregnancy-dating-4tPV_Yko.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-iI6_j2K2.js.map → pregnancy-dating-4tPV_Yko.js.map} +1 -1
- package/dist/_chunks/{pregnancy-weight-gain-Co-YFMJZ.js → pregnancy-weight-gain-BBgbWBGe.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-Co-YFMJZ.js.map → pregnancy-weight-gain-BBgbWBGe.js.map} +1 -1
- package/dist/_chunks/{signature-status-chip-DUcTgQ0E.js → signature-status-chip-DlLJk1VA.js} +16 -14
- package/dist/_chunks/signature-status-chip-DlLJk1VA.js.map +1 -0
- package/dist/_chunks/{unit-converter-BeTicruA.js → unit-converter-Dsk__pjA.js} +2 -2
- package/dist/_chunks/{unit-converter-BeTicruA.js.map → unit-converter-Dsk__pjA.js.map} +1 -1
- package/dist/agent-catalog.json +14 -8
- package/dist/agent-i18n/en.json +3 -2
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/data-table.agent.d.ts.map +1 -1
- package/dist/components/data-table/data-table.d.ts +19 -0
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/expanded-row-renderer.d.ts +47 -0
- package/dist/components/data-table/expanded-row-renderer.d.ts.map +1 -0
- package/dist/components/data-table/index.d.ts +2 -0
- package/dist/components/data-table/index.d.ts.map +1 -1
- package/dist/components/data-table/index.js +31 -27
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/number-input/number-input.d.ts +11 -0
- package/dist/components/number-input/number-input.d.ts.map +1 -1
- package/dist/components/optical-prescription/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/signature-status-chip/index.js +1 -1
- package/dist/components/signature-status-chip/signature-status-chip.d.ts.map +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +1 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +1 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +1 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +1 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +1 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +1 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +1 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +1 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +1 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +1 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +1 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +1 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +1 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +1 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +779 -775
- package/dist/locales/ar.json +1 -0
- package/dist/locales/de.json +1 -0
- package/dist/locales/el.json +1 -0
- package/dist/locales/en.json +1 -0
- package/dist/locales/es.json +1 -0
- package/dist/locales/fr.json +1 -0
- package/dist/locales/hi.json +1 -0
- package/dist/locales/it.json +1 -0
- package/dist/locales/ja.json +1 -0
- package/dist/locales/nl.json +1 -0
- package/dist/locales/pl.json +1 -0
- package/dist/locales/pt.json +1 -0
- package/dist/locales/ro.json +1 -0
- package/dist/locales/ru.json +1 -0
- package/dist/locales/sq.json +1 -0
- package/dist/locales/sv.json +1 -0
- package/dist/locales/tr.json +1 -0
- package/dist/locales/zh.json +1 -0
- package/dist/patterns/anamnesis/anamnesis-evolution.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis-field.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis-i18n.d.ts.map +1 -1
- package/dist/patterns/anamnesis/anamnesis-intake.d.ts +5 -1
- package/dist/patterns/anamnesis/anamnesis-intake.d.ts.map +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/tokens.css +5 -2
- package/package.json +1 -1
- package/dist/_chunks/actions-cell-renderer-C67oj7mR.js +0 -1581
- package/dist/_chunks/actions-cell-renderer-C67oj7mR.js.map +0 -1
- package/dist/_chunks/anamnesis-summary-rows-DAIpD0Or.js.map +0 -1
- package/dist/_chunks/number-input-DOe5VYei.js +0 -370
- package/dist/_chunks/number-input-DOe5VYei.js.map +0 -1
- package/dist/_chunks/signature-status-chip-DUcTgQ0E.js.map +0 -1
|
@@ -4,7 +4,7 @@ import { c as q } from "./index-D2ZczOXr.js";
|
|
|
4
4
|
import { useTranslation as J } from "react-i18next";
|
|
5
5
|
import { u as Q } from "./registry-DvAUVLHh.js";
|
|
6
6
|
import { F as S } from "./form-field-D1oqYisL.js";
|
|
7
|
-
import { N as P } from "./number-input-
|
|
7
|
+
import { N as P } from "./number-input-CM1q9zvH.js";
|
|
8
8
|
import { D as G } from "./date-time-picker-DVETwpzc.js";
|
|
9
9
|
import { C as B } from "./card-DPmk26CL.js";
|
|
10
10
|
import { B as X } from "./badge-CIt-UFEx.js";
|
|
@@ -309,4 +309,4 @@ export {
|
|
|
309
309
|
re as M,
|
|
310
310
|
oe as a
|
|
311
311
|
};
|
|
312
|
-
//# sourceMappingURL=hcg-doubling-
|
|
312
|
+
//# sourceMappingURL=hcg-doubling-BT6lki_i.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hcg-doubling-CFJlMH7Z.js","sources":["../../node_modules/date-fns/formatISO.js","../../src/components/hcg-doubling/hcg-doubling.agent.ts","../../src/components/hcg-doubling/hcg.ts","../../src/components/hcg-doubling/hcg-doubling.tsx"],"sourcesContent":["import { addLeadingZeros } from \"./_lib/addLeadingZeros.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link formatISO} function options.\n */\n\n/**\n * @name formatISO\n * @category Common Helpers\n * @summary Format the date according to the ISO 8601 standard (https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003169814.htm).\n *\n * @description\n * Return the formatted date string in ISO 8601 format. Options may be passed to control the parts and notations of the date.\n *\n * @param date - The original date\n * @param options - An object with options.\n *\n * @returns The formatted date string (in local time zone)\n *\n * @throws `date` must not be Invalid Date\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52))\n * //=> '2019-09-18T19:00:52Z'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601, short format (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' })\n * //=> '20190918T190052'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format, date only:\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' })\n * //=> '2019-09-18'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format, time only (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' })\n * //=> '19:00:52Z'\n */\nexport function formatISO(date, options) {\n const date_ = toDate(date, options?.in);\n\n if (isNaN(+date_)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n const format = options?.format ?? \"extended\";\n const representation = options?.representation ?? \"complete\";\n\n let result = \"\";\n let tzOffset = \"\";\n\n const dateDelimiter = format === \"extended\" ? \"-\" : \"\";\n const timeDelimiter = format === \"extended\" ? \":\" : \"\";\n\n // Representation is either 'date' or 'complete'\n if (representation !== \"time\") {\n const day = addLeadingZeros(date_.getDate(), 2);\n const month = addLeadingZeros(date_.getMonth() + 1, 2);\n const year = addLeadingZeros(date_.getFullYear(), 4);\n\n // yyyyMMdd or yyyy-MM-dd.\n result = `${year}${dateDelimiter}${month}${dateDelimiter}${day}`;\n }\n\n // Representation is either 'time' or 'complete'\n if (representation !== \"date\") {\n // Add the timezone.\n const offset = date_.getTimezoneOffset();\n\n if (offset !== 0) {\n const absoluteOffset = Math.abs(offset);\n const hourOffset = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);\n const minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);\n // If less than 0, the sign is +, because it is ahead of time.\n const sign = offset < 0 ? \"+\" : \"-\";\n\n tzOffset = `${sign}${hourOffset}:${minuteOffset}`;\n } else {\n tzOffset = \"Z\";\n }\n\n const hour = addLeadingZeros(date_.getHours(), 2);\n const minute = addLeadingZeros(date_.getMinutes(), 2);\n const second = addLeadingZeros(date_.getSeconds(), 2);\n\n // If there's also date, separate it with time with 'T'\n const separator = result === \"\" ? \"\" : \"T\";\n\n // Creates a time string consisting of hour, minute, and second, separated by delimiters, if defined.\n const time = [hour, minute, second].join(timeDelimiter);\n\n // HHmmss or HH:mm:ss.\n result = `${result}${separator}${time}${tzOffset}`;\n }\n\n return result;\n}\n\n// Fallback for modularized imports:\nexport default formatISO;\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — HcgDoubling. */\n/* */\n/* Clinical calculator: two timed serum β-hCG values → doubling time, */\n/* 48-hour-normalised rise and a viability trend band. The agent surface */\n/* is the two timed samples plus the computed trend; the handle is the */\n/* curated `HcgDoublingHandle` (the public `ref` stays the root <div>, */\n/* exactly as `slider.tsx` and `bmi-calculator.tsx` keep theirs). */\n/* */\n/* Sample times cross the boundary as ISO-8601 strings WITH an offset, so */\n/* the interval between the two draws survives serialisation. */\n/* */\n/* PHI (§7): never exposes patient identity — the slots return the */\n/* operator's own structural lab figures and the numbers derived from */\n/* them. See `src/docs/26-agent-readiness.mdx`. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HcgDoublingHandle } from './hcg-doubling';\n\n/** JSON Schema fragment for one optional β-hCG value, mIU/mL. */\nconst hcgValue = (label: string) => ({\n oneOf: [{ type: 'number', exclusiveMinimum: 0 }, { type: 'null' }],\n description: `${label} in mIU/mL, or null to clear it.`,\n});\n\n/** JSON Schema fragment for one optional sample time. */\nconst sampleTime = (label: string) => ({\n oneOf: [{ type: 'string', format: 'date-time' }, { type: 'null' }],\n description: `${label} as an ISO-8601 timestamp with offset (e.g. 2026-08-01T09:30:00+02:00), not in the future, or null to clear it.`,\n});\n\nexport const hcgDoublingAgent: AgentAdapter<HcgDoublingHandle> = {\n id: 'hcg-doubling',\n // set_value → the `set_samples` action + the `samples` state slot.\n capabilities: ['set_value'],\n state: {\n samples: {\n type: '{ hcg1: number | null, date1: string | null, hcg2: number | null, date2: string | null }',\n descriptionKey: 'ui.agent.hcgDoubling.state.samples',\n description:\n 'The two timed β-hCG samples as entered — value in mIU/mL plus the draw time as an ISO-8601 timestamp. Null where unset. Read this to see why a result is still null.',\n read: (handle) => handle.getSamples(),\n },\n result: {\n type: \"{ intervalHours: number, ratio: number, percentRise: number, twoDayRisePercent: number, doublingTimeHours: number | null, trend: 'rising-normal' | 'rising-slow' | 'plateau-falling' } | null\",\n descriptionKey: 'ui.agent.hcgDoubling.state.result',\n description:\n 'Computed doubling time in hours (null when not rising), the rise normalised to 48 hours, and the trend band against the minimal-rise benchmark. Null until both samples are set and the second is after the first.',\n read: (handle) => handle.getResult(),\n },\n },\n actions: {\n set_samples: {\n // Drives the same local input state a user types into; nothing is\n // persisted to a record, and every value is reversible in the same UI.\n safety: 'write',\n argsType:\n '{ hcg1?: number | null, date1?: string | null, hcg2?: number | null, date2?: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n hcg1: hcgValue('First β-hCG value'),\n date1: sampleTime('When the first sample was drawn'),\n hcg2: hcgValue('Second β-hCG value'),\n date2: sampleTime('When the second sample was drawn'),\n },\n additionalProperties: false,\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the samples were applied.',\n },\n errors: [\n 'Returns false and writes nothing when a value is not positive, a timestamp is unparseable, or a timestamp is in the future — the payload applies all-or-nothing.',\n 'Applies cleanly but leaves `result` null when the second sample is not strictly after the first — the analysis needs a forward interval.',\n ],\n examples: [\n {\n args: {\n hcg1: 1200,\n date1: '2026-08-01T09:00:00+02:00',\n hcg2: 2500,\n date2: '2026-08-03T09:00:00+02:00',\n },\n note: 'A doubling over 48 hours → the rising-normal band.',\n },\n ],\n descriptionKey: 'ui.agent.hcgDoubling.actions.setSamples',\n description:\n 'Set any subset of the two timed β-hCG samples. Omitted keys are left unchanged; an explicit null clears one. All four are needed before a trend is computed.',\n invoke: (\n handle,\n args: {\n hcg1?: number | null;\n date1?: string | null;\n hcg2?: number | null;\n date2?: string | null;\n },\n ) => handle.setSamples(args),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'hcg-doubling',\n description:\n 'Marks the HcgDoubling calculator (serum β-hCG doubling time from two timed values).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Also the registry key — without an `id` the instance does not register and the handle-driven action/state are unreachable.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Serum β-hCG doubling time — early-pregnancy viability. */\n/* */\n/* Pure, framework-free, unit-testable. From two timed β-hCG values it */\n/* derives the doubling time, the rise over the actual interval, and the */\n/* rise normalised to 48 hours (the standard comparison window). A */\n/* normal early intrauterine pregnancy rises at least ~35% over 48h */\n/* (Barnhart 2004); a plateau or fall is abnormal. */\n/* */\n/* Barnhart KT et al. \"Symptomatic patients with an early viable */\n/* intrauterine pregnancy.\" Obstet Gynecol 2004;104:50-5. */\n/* ------------------------------------------------------------------ */\n\nconst MS_PER_HOUR = 1000 * 60 * 60;\n/** Conservative minimal 48-hour rise for a potentially viable IUP, %. */\nexport const MINIMAL_48H_RISE_PERCENT = 35;\n\nexport interface HcgInput {\n /** First β-hCG value, mIU/mL. */\n hcg1: number;\n /** When the first sample was drawn. */\n date1: Date;\n /** Second β-hCG value, mIU/mL. */\n hcg2: number;\n /** When the second sample was drawn (must be after `date1`). */\n date2: Date;\n}\n\nexport type HcgTrend = 'rising-normal' | 'rising-slow' | 'plateau-falling';\n\nexport interface HcgResult {\n /** Hours between the two samples. */\n intervalHours: number;\n /** hcg2 / hcg1. */\n ratio: number;\n /** Rise over the actual interval, %. */\n percentRise: number;\n /** Rise normalised to a 48-hour window, % (comparable to the benchmark). */\n twoDayRisePercent: number;\n /** Doubling time in hours, or `null` when not rising. */\n doublingTimeHours: number | null;\n /** Trend band against the Barnhart minimal-rise benchmark. */\n trend: HcgTrend;\n}\n\n/**\n * Analyse a two-point β-hCG series. Returns `null` unless both values are\n * positive and the second sample is strictly after the first.\n */\nexport function analyseHcg(input: HcgInput): HcgResult | null {\n const { hcg1, hcg2, date1, date2 } = input;\n if (!(hcg1 > 0) || !(hcg2 > 0)) return null;\n\n const intervalHours = (date2.getTime() - date1.getTime()) / MS_PER_HOUR;\n if (!(intervalHours > 0)) return null;\n\n const ratio = hcg2 / hcg1;\n const percentRise = (ratio - 1) * 100;\n const twoDayRisePercent = (ratio ** (48 / intervalHours) - 1) * 100;\n const doublingTimeHours =\n ratio > 1 ? (intervalHours * Math.LN2) / Math.log(ratio) : null;\n\n const trend: HcgTrend =\n ratio <= 1\n ? 'plateau-falling'\n : twoDayRisePercent >= MINIMAL_48H_RISE_PERCENT\n ? 'rising-normal'\n : 'rising-slow';\n\n return {\n intervalHours,\n ratio,\n percentRise,\n twoDayRisePercent,\n doublingTimeHours,\n trend,\n };\n}\n","/* ------------------------------------------------------------------ */\n/* HcgDoubling — serum β-hCG doubling time from two timed values. */\n/* */\n/* Maths in `./hcg` (pure, tested). Two timepoints (value + datetime) */\n/* → doubling time, 48-hour-normalised rise and a viability trend band. */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, useEffect, useMemo, useRef, useState } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { formatISO, isAfter, parseISO } from 'date-fns';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { hcgDoublingAgent } from './hcg-doubling.agent';\nimport { FormField } from '../form-field';\nimport { NumberInput } from '../number-input';\nimport { DateTimePicker } from '../date-time-picker';\nimport { Card } from '../card';\nimport { Badge } from '../badge';\nimport {\n InsertButton,\n type InsertPayload,\n type InsertVariant,\n type InsertMode,\n} from '../_shared/insert-result';\nimport { type HcgResult, type HcgTrend, analyseHcg } from './hcg';\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\nconst TREND_BADGE: Record<HcgTrend, 'success' | 'warning' | 'error'> = {\n 'rising-normal': 'success',\n 'rising-slow': 'warning',\n 'plateau-falling': 'error',\n};\nconst TREND_TOKEN: Record<HcgTrend, string> = {\n 'rising-normal': '--success',\n 'rising-slow': '--warning-readable',\n 'plateau-falling': '--destructive',\n};\n\n/* ------------------------------------------------------------------ */\n/* Agent boundary */\n/* */\n/* Sample times cross the boundary as ISO-8601 strings WITH an offset */\n/* (`2026-08-01T09:30:00+02:00`), never `Date` objects — the doubling */\n/* maths is a difference between two instants, so the offset has to */\n/* survive the trip. */\n/* ------------------------------------------------------------------ */\n\nconst toIsoDateTime = (d: Date): string => formatISO(d);\n\nconst fromIsoDateTime = (iso: string): Date | null => {\n const d = parseISO(iso);\n return Number.isNaN(d.getTime()) ? null : d;\n};\n\n/** A β-hCG figure is usable when it is a positive finite number, or cleared. */\nconst isHcgValue = (n: number | null | undefined): boolean =>\n n === null || n === undefined || (Number.isFinite(n) && n > 0);\n\n/** The two timed samples as entered. */\nexport interface HcgSamplesSnapshot {\n /** First β-hCG value, mIU/mL, or null. */\n hcg1: number | null;\n /** When the first sample was drawn, ISO-8601 with offset, or null. */\n date1: string | null;\n /** Second β-hCG value, mIU/mL, or null. */\n hcg2: number | null;\n /** When the second sample was drawn, ISO-8601 with offset, or null. */\n date2: string | null;\n}\n\n/**\n * Curated imperative handle for agent / external automation. Reads the two\n * timed samples and the computed trend, and writes the samples the way a user\n * would enter them. Never exposes patient identity — only structural lab\n * figures, sample times and the derived doubling numbers. Consumed by\n * `hcg-doubling.agent.ts`; the public `ref` stays the root DOM element.\n */\nexport interface HcgDoublingHandle {\n /** The two timed samples as entered, or null where unset. */\n getSamples: () => HcgSamplesSnapshot;\n /** Computed doubling time, 48-hour rise and trend band, or null. */\n getResult: () => HcgResult | null;\n /**\n * Set any subset of the two timed samples. Omitted keys are left unchanged;\n * an explicit `null` clears one. Applies all-or-nothing — returns false and\n * writes nothing if any value is unusable.\n */\n setSamples: (next: Partial<HcgSamplesSnapshot>) => boolean;\n}\n\nexport interface HcgDoublingProps extends VariantProps<typeof rootVariants> {\n /** Pre-fill the first sample's date/time (e.g. from the lab record). */\n defaultDate1?: Date;\n /** Pre-fill the second sample's date/time. */\n defaultDate2?: Date;\n /** Fires whenever both timed values resolve (and `null` when not). */\n onResultChange?: (result: HcgResult | null) => void;\n /** When provided, shows the result-action buttons that emit / copy the result. */\n onInsert?: (payload: InsertPayload) => void;\n /** Which verb the result button performs. Defaults to `'insert'`. */\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 /** Brand wordmark printed in the inserted/copied result-card footer. */\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\nexport const HcgDoubling = forwardRef<HTMLDivElement, HcgDoublingProps>(\n (\n {\n defaultDate1,\n defaultDate2,\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 [hcg1, setHcg1] = useState<number | null>(null);\n const [date1, setDate1] = useState<Date | undefined>(defaultDate1);\n const [hcg2, setHcg2] = useState<number | null>(null);\n const [date2, setDate2] = useState<Date | undefined>(defaultDate2);\n\n const today = useMemo(() => new Date(), []);\n\n const result = useMemo(() => {\n if (hcg1 === null || hcg2 === null || !date1 || !date2) return null;\n return analyseHcg({ hcg1, date1, hcg2, date2 });\n }, [hcg1, date1, hcg2, date2]);\n\n useEffect(() => {\n onResultChange?.(result);\n }, [result, onResultChange]);\n\n /* ── Agent handle ────────────────────────────────────────────────── */\n const liveRef = useRef({ hcg1, date1, hcg2, date2, result });\n liveRef.current = { hcg1, date1, hcg2, date2, result };\n\n const agentHandle = useMemo<HcgDoublingHandle>(\n () => ({\n getSamples: () => {\n const live = liveRef.current;\n return {\n hcg1: live.hcg1,\n date1: live.date1 ? toIsoDateTime(live.date1) : null,\n hcg2: live.hcg2,\n date2: live.date2 ? toIsoDateTime(live.date2) : null,\n };\n },\n getResult: () => liveRef.current.result,\n setSamples: (next) => {\n const now = new Date();\n const parsed: { date1?: Date | undefined; date2?: Date | undefined } =\n {};\n // Validate the whole payload before writing any of it, so a bad\n // value can't leave the form half-updated.\n for (const key of ['hcg1', 'hcg2'] as const) {\n if (key in next && !isHcgValue(next[key])) return false;\n }\n for (const key of ['date1', 'date2'] as const) {\n if (!(key in next)) continue;\n const iso = next[key];\n if (iso === null || iso === undefined) {\n parsed[key] = undefined;\n continue;\n }\n const d = fromIsoDateTime(iso);\n // The DateTimePickers cap at now; the handle honours the same bound.\n if (!d || isAfter(d, now)) return false;\n parsed[key] = d;\n }\n if ('hcg1' in next) setHcg1(next.hcg1 ?? null);\n if ('hcg2' in next) setHcg2(next.hcg2 ?? null);\n if ('date1' in next) setDate1(parsed.date1);\n if ('date2' in next) setDate2(parsed.date2);\n return true;\n },\n }),\n [],\n );\n useAgentRegistration(hcgDoublingAgent, agentHandle, id);\n\n const num = useMemo(\n () => new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 0 }),\n [i18n.language],\n );\n\n const doublingText = (r: HcgResult): string =>\n r.doublingTimeHours === null\n ? '—'\n : t('hcgDoubling.hoursValue', {\n hours: num.format(r.doublingTimeHours),\n });\n const riseText = (r: HcgResult): string =>\n t('hcgDoubling.percentValue', { value: num.format(r.twoDayRisePercent) });\n\n return (\n <div\n ref={ref}\n data-component=\"hcg-doubling\"\n data-component-id={id}\n className={rootVariants({ width, className })}\n >\n <div className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2\">\n <FormField\n label={`${t('hcgDoubling.hcg1')} (${t('hcgDoubling.units')})`}\n >\n <NumberInput\n mode=\"decimal\"\n min={0}\n value={hcg1}\n onChange={setHcg1}\n />\n </FormField>\n <FormField label={t('hcgDoubling.date1')}>\n <DateTimePicker value={date1} onChange={setDate1} maxDate={today} />\n </FormField>\n <FormField\n label={`${t('hcgDoubling.hcg2')} (${t('hcgDoubling.units')})`}\n >\n <NumberInput\n mode=\"decimal\"\n min={0}\n value={hcg2}\n onChange={setHcg2}\n />\n </FormField>\n <FormField label={t('hcgDoubling.date2')}>\n <DateTimePicker value={date2} onChange={setDate2} maxDate={today} />\n </FormField>\n </div>\n\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {result\n ? `${t('hcgDoubling.doublingLabel')}: ${doublingText(result)}. ${t(\n `hcgDoubling.trend.${result.trend}`,\n )}.`\n : ''}\n </p>\n\n {result ? (\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n <dl className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3\">\n <div className=\"ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('hcgDoubling.doublingLabel')}\n </dt>\n <dd className=\"type-metric ds:text-foreground\">\n {doublingText(result)}\n </dd>\n </div>\n <div className=\"ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('hcgDoubling.riseLabel')}\n </dt>\n <dd className=\"type-body ds:text-foreground\">\n {riseText(result)}\n </dd>\n </div>\n <div className=\"ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('hcgDoubling.trendLabel')}\n </dt>\n <dd>\n <Badge variant={TREND_BADGE[result.trend]} size=\"lg\">\n {t(`hcgDoubling.trend.${result.trend}`)}\n </Badge>\n </dd>\n </div>\n </dl>\n <p className=\"type-body-sm ds:text-muted-foreground\">\n {t('hcgDoubling.disclaimer')}\n </p>\n {insertVariant === 'copy' || onInsert ? (\n <InsertButton\n onInsert={onInsert}\n variant={insertVariant}\n onCopy={onCopy}\n onError={onError}\n card={{\n title: t('insert.title.hcg'),\n icon: 'activity',\n highlight: t(`hcgDoubling.trend.${result.trend}`),\n highlightToken: TREND_TOKEN[result.trend],\n brand: insertBrand,\n fields: [\n {\n icon: 'clock',\n label: t('hcgDoubling.doublingLabel'),\n value: doublingText(result),\n },\n {\n icon: 'trending-up',\n label: t('hcgDoubling.riseLabel'),\n value: riseText(result),\n },\n {\n icon: 'tag',\n label: t('hcgDoubling.trendLabel'),\n value: t(`hcgDoubling.trend.${result.trend}`),\n },\n ],\n }}\n />\n ) : null}\n </Card.Body>\n </Card>\n ) : (\n <p className=\"type-body ds:text-muted-foreground\">\n {t('hcgDoubling.empty')}\n </p>\n )}\n </div>\n );\n },\n);\n\nHcgDoubling.displayName = 'HcgDoubling';\n"],"names":["formatISO","date","options","date_","toDate","result","tzOffset","dateDelimiter","timeDelimiter","day","addLeadingZeros","month","offset","absoluteOffset","hourOffset","minuteOffset","hour","minute","second","separator","time","hcgValue","label","sampleTime","hcgDoublingAgent","handle","args","MS_PER_HOUR","MINIMAL_48H_RISE_PERCENT","analyseHcg","input","hcg1","hcg2","date1","date2","intervalHours","ratio","percentRise","twoDayRisePercent","doublingTimeHours","trend","rootVariants","cva","TREND_BADGE","TREND_TOKEN","toIsoDateTime","d","fromIsoDateTime","iso","parseISO","isHcgValue","n","HcgDoubling","forwardRef","defaultDate1","defaultDate2","onResultChange","onInsert","insertVariant","onCopy","onError","insertBrand","id","width","className","ref","i18n","useTranslation","setHcg1","useState","setDate1","setHcg2","setDate2","today","useMemo","useEffect","liveRef","useRef","agentHandle","live","next","now","parsed","key","isAfter","useAgentRegistration","num","doublingText","r","riseText","jsxs","jsx","FormField","NumberInput","DateTimePicker","Card","Badge","InsertButton"],"mappings":";;;;;;;;;;;;;;AA0CO,SAASA,GA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google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"hcg-doubling-BT6lki_i.js","sources":["../../node_modules/date-fns/formatISO.js","../../src/components/hcg-doubling/hcg-doubling.agent.ts","../../src/components/hcg-doubling/hcg.ts","../../src/components/hcg-doubling/hcg-doubling.tsx"],"sourcesContent":["import { addLeadingZeros } from \"./_lib/addLeadingZeros.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link formatISO} function options.\n */\n\n/**\n * @name formatISO\n * @category Common Helpers\n * @summary Format the date according to the ISO 8601 standard (https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003169814.htm).\n *\n * @description\n * Return the formatted date string in ISO 8601 format. Options may be passed to control the parts and notations of the date.\n *\n * @param date - The original date\n * @param options - An object with options.\n *\n * @returns The formatted date string (in local time zone)\n *\n * @throws `date` must not be Invalid Date\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52))\n * //=> '2019-09-18T19:00:52Z'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601, short format (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' })\n * //=> '20190918T190052'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format, date only:\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' })\n * //=> '2019-09-18'\n *\n * @example\n * // Represent 18 September 2019 in ISO 8601 format, time only (local time zone is UTC):\n * const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' })\n * //=> '19:00:52Z'\n */\nexport function formatISO(date, options) {\n const date_ = toDate(date, options?.in);\n\n if (isNaN(+date_)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n const format = options?.format ?? \"extended\";\n const representation = options?.representation ?? \"complete\";\n\n let result = \"\";\n let tzOffset = \"\";\n\n const dateDelimiter = format === \"extended\" ? \"-\" : \"\";\n const timeDelimiter = format === \"extended\" ? \":\" : \"\";\n\n // Representation is either 'date' or 'complete'\n if (representation !== \"time\") {\n const day = addLeadingZeros(date_.getDate(), 2);\n const month = addLeadingZeros(date_.getMonth() + 1, 2);\n const year = addLeadingZeros(date_.getFullYear(), 4);\n\n // yyyyMMdd or yyyy-MM-dd.\n result = `${year}${dateDelimiter}${month}${dateDelimiter}${day}`;\n }\n\n // Representation is either 'time' or 'complete'\n if (representation !== \"date\") {\n // Add the timezone.\n const offset = date_.getTimezoneOffset();\n\n if (offset !== 0) {\n const absoluteOffset = Math.abs(offset);\n const hourOffset = addLeadingZeros(Math.trunc(absoluteOffset / 60), 2);\n const minuteOffset = addLeadingZeros(absoluteOffset % 60, 2);\n // If less than 0, the sign is +, because it is ahead of time.\n const sign = offset < 0 ? \"+\" : \"-\";\n\n tzOffset = `${sign}${hourOffset}:${minuteOffset}`;\n } else {\n tzOffset = \"Z\";\n }\n\n const hour = addLeadingZeros(date_.getHours(), 2);\n const minute = addLeadingZeros(date_.getMinutes(), 2);\n const second = addLeadingZeros(date_.getSeconds(), 2);\n\n // If there's also date, separate it with time with 'T'\n const separator = result === \"\" ? \"\" : \"T\";\n\n // Creates a time string consisting of hour, minute, and second, separated by delimiters, if defined.\n const time = [hour, minute, second].join(timeDelimiter);\n\n // HHmmss or HH:mm:ss.\n result = `${result}${separator}${time}${tzOffset}`;\n }\n\n return result;\n}\n\n// Fallback for modularized imports:\nexport default formatISO;\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — HcgDoubling. */\n/* */\n/* Clinical calculator: two timed serum β-hCG values → doubling time, */\n/* 48-hour-normalised rise and a viability trend band. The agent surface */\n/* is the two timed samples plus the computed trend; the handle is the */\n/* curated `HcgDoublingHandle` (the public `ref` stays the root <div>, */\n/* exactly as `slider.tsx` and `bmi-calculator.tsx` keep theirs). */\n/* */\n/* Sample times cross the boundary as ISO-8601 strings WITH an offset, so */\n/* the interval between the two draws survives serialisation. */\n/* */\n/* PHI (§7): never exposes patient identity — the slots return the */\n/* operator's own structural lab figures and the numbers derived from */\n/* them. See `src/docs/26-agent-readiness.mdx`. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HcgDoublingHandle } from './hcg-doubling';\n\n/** JSON Schema fragment for one optional β-hCG value, mIU/mL. */\nconst hcgValue = (label: string) => ({\n oneOf: [{ type: 'number', exclusiveMinimum: 0 }, { type: 'null' }],\n description: `${label} in mIU/mL, or null to clear it.`,\n});\n\n/** JSON Schema fragment for one optional sample time. */\nconst sampleTime = (label: string) => ({\n oneOf: [{ type: 'string', format: 'date-time' }, { type: 'null' }],\n description: `${label} as an ISO-8601 timestamp with offset (e.g. 2026-08-01T09:30:00+02:00), not in the future, or null to clear it.`,\n});\n\nexport const hcgDoublingAgent: AgentAdapter<HcgDoublingHandle> = {\n id: 'hcg-doubling',\n // set_value → the `set_samples` action + the `samples` state slot.\n capabilities: ['set_value'],\n state: {\n samples: {\n type: '{ hcg1: number | null, date1: string | null, hcg2: number | null, date2: string | null }',\n descriptionKey: 'ui.agent.hcgDoubling.state.samples',\n description:\n 'The two timed β-hCG samples as entered — value in mIU/mL plus the draw time as an ISO-8601 timestamp. Null where unset. Read this to see why a result is still null.',\n read: (handle) => handle.getSamples(),\n },\n result: {\n type: \"{ intervalHours: number, ratio: number, percentRise: number, twoDayRisePercent: number, doublingTimeHours: number | null, trend: 'rising-normal' | 'rising-slow' | 'plateau-falling' } | null\",\n descriptionKey: 'ui.agent.hcgDoubling.state.result',\n description:\n 'Computed doubling time in hours (null when not rising), the rise normalised to 48 hours, and the trend band against the minimal-rise benchmark. Null until both samples are set and the second is after the first.',\n read: (handle) => handle.getResult(),\n },\n },\n actions: {\n set_samples: {\n // Drives the same local input state a user types into; nothing is\n // persisted to a record, and every value is reversible in the same UI.\n safety: 'write',\n argsType:\n '{ hcg1?: number | null, date1?: string | null, hcg2?: number | null, date2?: string | null }',\n argsSchema: {\n type: 'object',\n properties: {\n hcg1: hcgValue('First β-hCG value'),\n date1: sampleTime('When the first sample was drawn'),\n hcg2: hcgValue('Second β-hCG value'),\n date2: sampleTime('When the second sample was drawn'),\n },\n additionalProperties: false,\n },\n idempotent: true,\n returns: 'boolean',\n returnsSchema: {\n type: 'boolean',\n description: 'True when the samples were applied.',\n },\n errors: [\n 'Returns false and writes nothing when a value is not positive, a timestamp is unparseable, or a timestamp is in the future — the payload applies all-or-nothing.',\n 'Applies cleanly but leaves `result` null when the second sample is not strictly after the first — the analysis needs a forward interval.',\n ],\n examples: [\n {\n args: {\n hcg1: 1200,\n date1: '2026-08-01T09:00:00+02:00',\n hcg2: 2500,\n date2: '2026-08-03T09:00:00+02:00',\n },\n note: 'A doubling over 48 hours → the rising-normal band.',\n },\n ],\n descriptionKey: 'ui.agent.hcgDoubling.actions.setSamples',\n description:\n 'Set any subset of the two timed β-hCG samples. Omitted keys are left unchanged; an explicit null clears one. All four are needed before a trend is computed.',\n invoke: (\n handle,\n args: {\n hcg1?: number | null;\n date1?: string | null;\n hcg2?: number | null;\n date2?: string | null;\n },\n ) => handle.setSamples(args),\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'hcg-doubling',\n description:\n 'Marks the HcgDoubling calculator (serum β-hCG doubling time from two timed values).',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Also the registry key — without an `id` the instance does not register and the handle-driven action/state are unreachable.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* Serum β-hCG doubling time — early-pregnancy viability. */\n/* */\n/* Pure, framework-free, unit-testable. From two timed β-hCG values it */\n/* derives the doubling time, the rise over the actual interval, and the */\n/* rise normalised to 48 hours (the standard comparison window). A */\n/* normal early intrauterine pregnancy rises at least ~35% over 48h */\n/* (Barnhart 2004); a plateau or fall is abnormal. */\n/* */\n/* Barnhart KT et al. \"Symptomatic patients with an early viable */\n/* intrauterine pregnancy.\" Obstet Gynecol 2004;104:50-5. */\n/* ------------------------------------------------------------------ */\n\nconst MS_PER_HOUR = 1000 * 60 * 60;\n/** Conservative minimal 48-hour rise for a potentially viable IUP, %. */\nexport const MINIMAL_48H_RISE_PERCENT = 35;\n\nexport interface HcgInput {\n /** First β-hCG value, mIU/mL. */\n hcg1: number;\n /** When the first sample was drawn. */\n date1: Date;\n /** Second β-hCG value, mIU/mL. */\n hcg2: number;\n /** When the second sample was drawn (must be after `date1`). */\n date2: Date;\n}\n\nexport type HcgTrend = 'rising-normal' | 'rising-slow' | 'plateau-falling';\n\nexport interface HcgResult {\n /** Hours between the two samples. */\n intervalHours: number;\n /** hcg2 / hcg1. */\n ratio: number;\n /** Rise over the actual interval, %. */\n percentRise: number;\n /** Rise normalised to a 48-hour window, % (comparable to the benchmark). */\n twoDayRisePercent: number;\n /** Doubling time in hours, or `null` when not rising. */\n doublingTimeHours: number | null;\n /** Trend band against the Barnhart minimal-rise benchmark. */\n trend: HcgTrend;\n}\n\n/**\n * Analyse a two-point β-hCG series. Returns `null` unless both values are\n * positive and the second sample is strictly after the first.\n */\nexport function analyseHcg(input: HcgInput): HcgResult | null {\n const { hcg1, hcg2, date1, date2 } = input;\n if (!(hcg1 > 0) || !(hcg2 > 0)) return null;\n\n const intervalHours = (date2.getTime() - date1.getTime()) / MS_PER_HOUR;\n if (!(intervalHours > 0)) return null;\n\n const ratio = hcg2 / hcg1;\n const percentRise = (ratio - 1) * 100;\n const twoDayRisePercent = (ratio ** (48 / intervalHours) - 1) * 100;\n const doublingTimeHours =\n ratio > 1 ? (intervalHours * Math.LN2) / Math.log(ratio) : null;\n\n const trend: HcgTrend =\n ratio <= 1\n ? 'plateau-falling'\n : twoDayRisePercent >= MINIMAL_48H_RISE_PERCENT\n ? 'rising-normal'\n : 'rising-slow';\n\n return {\n intervalHours,\n ratio,\n percentRise,\n twoDayRisePercent,\n doublingTimeHours,\n trend,\n };\n}\n","/* ------------------------------------------------------------------ */\n/* HcgDoubling — serum β-hCG doubling time from two timed values. */\n/* */\n/* Maths in `./hcg` (pure, tested). Two timepoints (value + datetime) */\n/* → doubling time, 48-hour-normalised rise and a viability trend band. */\n/* ------------------------------------------------------------------ */\n\nimport { forwardRef, useEffect, useMemo, useRef, useState } from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { formatISO, isAfter, parseISO } from 'date-fns';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { hcgDoublingAgent } from './hcg-doubling.agent';\nimport { FormField } from '../form-field';\nimport { NumberInput } from '../number-input';\nimport { DateTimePicker } from '../date-time-picker';\nimport { Card } from '../card';\nimport { Badge } from '../badge';\nimport {\n InsertButton,\n type InsertPayload,\n type InsertVariant,\n type InsertMode,\n} from '../_shared/insert-result';\nimport { type HcgResult, type HcgTrend, analyseHcg } from './hcg';\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\nconst TREND_BADGE: Record<HcgTrend, 'success' | 'warning' | 'error'> = {\n 'rising-normal': 'success',\n 'rising-slow': 'warning',\n 'plateau-falling': 'error',\n};\nconst TREND_TOKEN: Record<HcgTrend, string> = {\n 'rising-normal': '--success',\n 'rising-slow': '--warning-readable',\n 'plateau-falling': '--destructive',\n};\n\n/* ------------------------------------------------------------------ */\n/* Agent boundary */\n/* */\n/* Sample times cross the boundary as ISO-8601 strings WITH an offset */\n/* (`2026-08-01T09:30:00+02:00`), never `Date` objects — the doubling */\n/* maths is a difference between two instants, so the offset has to */\n/* survive the trip. */\n/* ------------------------------------------------------------------ */\n\nconst toIsoDateTime = (d: Date): string => formatISO(d);\n\nconst fromIsoDateTime = (iso: string): Date | null => {\n const d = parseISO(iso);\n return Number.isNaN(d.getTime()) ? null : d;\n};\n\n/** A β-hCG figure is usable when it is a positive finite number, or cleared. */\nconst isHcgValue = (n: number | null | undefined): boolean =>\n n === null || n === undefined || (Number.isFinite(n) && n > 0);\n\n/** The two timed samples as entered. */\nexport interface HcgSamplesSnapshot {\n /** First β-hCG value, mIU/mL, or null. */\n hcg1: number | null;\n /** When the first sample was drawn, ISO-8601 with offset, or null. */\n date1: string | null;\n /** Second β-hCG value, mIU/mL, or null. */\n hcg2: number | null;\n /** When the second sample was drawn, ISO-8601 with offset, or null. */\n date2: string | null;\n}\n\n/**\n * Curated imperative handle for agent / external automation. Reads the two\n * timed samples and the computed trend, and writes the samples the way a user\n * would enter them. Never exposes patient identity — only structural lab\n * figures, sample times and the derived doubling numbers. Consumed by\n * `hcg-doubling.agent.ts`; the public `ref` stays the root DOM element.\n */\nexport interface HcgDoublingHandle {\n /** The two timed samples as entered, or null where unset. */\n getSamples: () => HcgSamplesSnapshot;\n /** Computed doubling time, 48-hour rise and trend band, or null. */\n getResult: () => HcgResult | null;\n /**\n * Set any subset of the two timed samples. Omitted keys are left unchanged;\n * an explicit `null` clears one. Applies all-or-nothing — returns false and\n * writes nothing if any value is unusable.\n */\n setSamples: (next: Partial<HcgSamplesSnapshot>) => boolean;\n}\n\nexport interface HcgDoublingProps extends VariantProps<typeof rootVariants> {\n /** Pre-fill the first sample's date/time (e.g. from the lab record). */\n defaultDate1?: Date;\n /** Pre-fill the second sample's date/time. */\n defaultDate2?: Date;\n /** Fires whenever both timed values resolve (and `null` when not). */\n onResultChange?: (result: HcgResult | null) => void;\n /** When provided, shows the result-action buttons that emit / copy the result. */\n onInsert?: (payload: InsertPayload) => void;\n /** Which verb the result button performs. Defaults to `'insert'`. */\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 /** Brand wordmark printed in the inserted/copied result-card footer. */\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\nexport const HcgDoubling = forwardRef<HTMLDivElement, HcgDoublingProps>(\n (\n {\n defaultDate1,\n defaultDate2,\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 [hcg1, setHcg1] = useState<number | null>(null);\n const [date1, setDate1] = useState<Date | undefined>(defaultDate1);\n const [hcg2, setHcg2] = useState<number | null>(null);\n const [date2, setDate2] = useState<Date | undefined>(defaultDate2);\n\n const today = useMemo(() => new Date(), []);\n\n const result = useMemo(() => {\n if (hcg1 === null || hcg2 === null || !date1 || !date2) return null;\n return analyseHcg({ hcg1, date1, hcg2, date2 });\n }, [hcg1, date1, hcg2, date2]);\n\n useEffect(() => {\n onResultChange?.(result);\n }, [result, onResultChange]);\n\n /* ── Agent handle ────────────────────────────────────────────────── */\n const liveRef = useRef({ hcg1, date1, hcg2, date2, result });\n liveRef.current = { hcg1, date1, hcg2, date2, result };\n\n const agentHandle = useMemo<HcgDoublingHandle>(\n () => ({\n getSamples: () => {\n const live = liveRef.current;\n return {\n hcg1: live.hcg1,\n date1: live.date1 ? toIsoDateTime(live.date1) : null,\n hcg2: live.hcg2,\n date2: live.date2 ? toIsoDateTime(live.date2) : null,\n };\n },\n getResult: () => liveRef.current.result,\n setSamples: (next) => {\n const now = new Date();\n const parsed: { date1?: Date | undefined; date2?: Date | undefined } =\n {};\n // Validate the whole payload before writing any of it, so a bad\n // value can't leave the form half-updated.\n for (const key of ['hcg1', 'hcg2'] as const) {\n if (key in next && !isHcgValue(next[key])) return false;\n }\n for (const key of ['date1', 'date2'] as const) {\n if (!(key in next)) continue;\n const iso = next[key];\n if (iso === null || iso === undefined) {\n parsed[key] = undefined;\n continue;\n }\n const d = fromIsoDateTime(iso);\n // The DateTimePickers cap at now; the handle honours the same bound.\n if (!d || isAfter(d, now)) return false;\n parsed[key] = d;\n }\n if ('hcg1' in next) setHcg1(next.hcg1 ?? null);\n if ('hcg2' in next) setHcg2(next.hcg2 ?? null);\n if ('date1' in next) setDate1(parsed.date1);\n if ('date2' in next) setDate2(parsed.date2);\n return true;\n },\n }),\n [],\n );\n useAgentRegistration(hcgDoublingAgent, agentHandle, id);\n\n const num = useMemo(\n () => new Intl.NumberFormat(i18n.language, { maximumFractionDigits: 0 }),\n [i18n.language],\n );\n\n const doublingText = (r: HcgResult): string =>\n r.doublingTimeHours === null\n ? '—'\n : t('hcgDoubling.hoursValue', {\n hours: num.format(r.doublingTimeHours),\n });\n const riseText = (r: HcgResult): string =>\n t('hcgDoubling.percentValue', { value: num.format(r.twoDayRisePercent) });\n\n return (\n <div\n ref={ref}\n data-component=\"hcg-doubling\"\n data-component-id={id}\n className={rootVariants({ width, className })}\n >\n <div className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-2\">\n <FormField\n label={`${t('hcgDoubling.hcg1')} (${t('hcgDoubling.units')})`}\n >\n <NumberInput\n mode=\"decimal\"\n min={0}\n value={hcg1}\n onChange={setHcg1}\n />\n </FormField>\n <FormField label={t('hcgDoubling.date1')}>\n <DateTimePicker value={date1} onChange={setDate1} maxDate={today} />\n </FormField>\n <FormField\n label={`${t('hcgDoubling.hcg2')} (${t('hcgDoubling.units')})`}\n >\n <NumberInput\n mode=\"decimal\"\n min={0}\n value={hcg2}\n onChange={setHcg2}\n />\n </FormField>\n <FormField label={t('hcgDoubling.date2')}>\n <DateTimePicker value={date2} onChange={setDate2} maxDate={today} />\n </FormField>\n </div>\n\n <p className=\"ds:sr-only\" role=\"status\" aria-live=\"polite\">\n {result\n ? `${t('hcgDoubling.doublingLabel')}: ${doublingText(result)}. ${t(\n `hcgDoubling.trend.${result.trend}`,\n )}.`\n : ''}\n </p>\n\n {result ? (\n <Card variant=\"elevated\">\n <Card.Body className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n <dl className=\"ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:sm:grid-cols-3\">\n <div className=\"ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('hcgDoubling.doublingLabel')}\n </dt>\n <dd className=\"type-metric ds:text-foreground\">\n {doublingText(result)}\n </dd>\n </div>\n <div className=\"ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-xs)]\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('hcgDoubling.riseLabel')}\n </dt>\n <dd className=\"type-body ds:text-foreground\">\n {riseText(result)}\n </dd>\n </div>\n <div className=\"ds:flex ds:flex-col ds:items-end ds:gap-[var(--spacing-xs)] ds:text-end\">\n <dt className=\"type-label ds:text-muted-foreground\">\n {t('hcgDoubling.trendLabel')}\n </dt>\n <dd>\n <Badge variant={TREND_BADGE[result.trend]} size=\"lg\">\n {t(`hcgDoubling.trend.${result.trend}`)}\n </Badge>\n </dd>\n </div>\n </dl>\n <p className=\"type-body-sm ds:text-muted-foreground\">\n {t('hcgDoubling.disclaimer')}\n </p>\n {insertVariant === 'copy' || onInsert ? (\n <InsertButton\n onInsert={onInsert}\n variant={insertVariant}\n onCopy={onCopy}\n onError={onError}\n card={{\n title: t('insert.title.hcg'),\n icon: 'activity',\n highlight: t(`hcgDoubling.trend.${result.trend}`),\n highlightToken: TREND_TOKEN[result.trend],\n brand: insertBrand,\n fields: [\n {\n icon: 'clock',\n label: t('hcgDoubling.doublingLabel'),\n value: doublingText(result),\n },\n {\n icon: 'trending-up',\n label: t('hcgDoubling.riseLabel'),\n value: riseText(result),\n },\n {\n icon: 'tag',\n label: t('hcgDoubling.trendLabel'),\n value: t(`hcgDoubling.trend.${result.trend}`),\n },\n ],\n }}\n />\n ) : null}\n </Card.Body>\n </Card>\n ) : (\n <p className=\"type-body ds:text-muted-foreground\">\n {t('hcgDoubling.empty')}\n </p>\n )}\n </div>\n );\n },\n);\n\nHcgDoubling.displayName = 'HcgDoubling';\n"],"names":["formatISO","date","options","date_","toDate","result","tzOffset","dateDelimiter","timeDelimiter","day","addLeadingZeros","month","offset","absoluteOffset","hourOffset","minuteOffset","hour","minute","second","separator","time","hcgValue","label","sampleTime","hcgDoublingAgent","handle","args","MS_PER_HOUR","MINIMAL_48H_RISE_PERCENT","analyseHcg","input","hcg1","hcg2","date1","date2","intervalHours","ratio","percentRise","twoDayRisePercent","doublingTimeHours","trend","rootVariants","cva","TREND_BADGE","TREND_TOKEN","toIsoDateTime","d","fromIsoDateTime","iso","parseISO","isHcgValue","n","HcgDoubling","forwardRef","defaultDate1","defaultDate2","onResultChange","onInsert","insertVariant","onCopy","onError","insertBrand","id","width","className","ref","i18n","useTranslation","setHcg1","useState","setDate1","setHcg2","setDate2","today","useMemo","useEffect","liveRef","useRef","agentHandle","live","next","now","parsed","key","isAfter","useAgentRegistration","num","doublingText","r","riseText","jsxs","jsx","FormField","NumberInput","DateTimePicker","Card","Badge","InsertButton"],"mappings":";;;;;;;;;;;;;;AA0CO,SAASA,GAAUC,GAAMC,GAAS;AACvC,QAAMC,IAAQC,GAAOH,GAAMC,KAAA,gBAAAA,EAAS,EAAE;AAEtC,MAAI,MAAM,CAACC,CAAK;AACd,UAAM,IAAI,WAAW,oBAAoB;AAM3C,MAAIE,IAAS,IACTC,IAAW;AAEf,QAAMC,IAAwC,KACxCC,IAAwC;AAGf;AAC7B,UAAMC,IAAMC,EAAgBP,EAAM,QAAO,GAAI,CAAC,GACxCQ,IAAQD,EAAgBP,EAAM,SAAQ,IAAK,GAAG,CAAC;AAIrD,IAAAE,IAAS,GAHIK,EAAgBP,EAAM,YAAW,GAAI,CAAC,CAGnC,GAAGI,CAAa,GAAGI,CAAK,GAAGJ,CAAa,GAAGE,CAAG;AAAA,EAChE;AAG+B;AAE7B,UAAMG,IAAST,EAAM,kBAAiB;AAEtC,QAAIS,MAAW,GAAG;AAChB,YAAMC,IAAiB,KAAK,IAAID,CAAM,GAChCE,IAAaJ,EAAgB,KAAK,MAAMG,IAAiB,EAAE,GAAG,CAAC,GAC/DE,IAAeL,EAAgBG,IAAiB,IAAI,CAAC;AAI3D,MAAAP,IAAW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BAA2B;AAAA,sBACpC,OAAO0B,EAAalF,CAAM;AAAA,oBAAA;AAAA,oBAE5B;AAAA,sBACE,MAAM;AAAA,sBACN,OAAO,EAAE,uBAAuB;AAAA,sBAChC,OAAOoF,EAASpF,CAAM;AAAA,oBAAA;AAAA,oBAExB;AAAA,sBACE,MAAM;AAAA,sBACN,OAAO,EAAE,wBAAwB;AAAA,sBACjC,OAAO,EAAE,qBAAqBA,EAAO,KAAK,EAAE;AAAA,oBAAA;AAAA,kBAC9C;AAAA,gBACF;AAAA,cACF;AAAA,YAAA,IAEA;AAAA,UAAA,EAAA,CACN,EAAA,CACF,IAEA,gBAAAsF,EAAC,KAAA,EAAE,WAAU,sCACV,UAAA,EAAE,mBAAmB,EAAA,CACxB;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEAvC,GAAY,cAAc;","x_google_ignoreList":[0]}
|
|
@@ -8,7 +8,7 @@ import { B as P } from "./button-BvNtqHAS.js";
|
|
|
8
8
|
import { M as W } from "./multi-select-DqL4o0qV.js";
|
|
9
9
|
import { S as X } from "./scroll-area-BZOvUhwQ.js";
|
|
10
10
|
import { A as $ } from "./autocomplete-BrONKN8l.js";
|
|
11
|
-
import { N as D } from "./number-input-
|
|
11
|
+
import { N as D } from "./number-input-CM1q9zvH.js";
|
|
12
12
|
import { S as Y } from "./select-BW5ecXlX.js";
|
|
13
13
|
import { B as ee } from "./badge-CIt-UFEx.js";
|
|
14
14
|
import { A as G } from "./avatar-BNQNhoyL.js";
|
|
@@ -769,4 +769,4 @@ export {
|
|
|
769
769
|
Ae as f,
|
|
770
770
|
qe as g
|
|
771
771
|
};
|
|
772
|
-
//# sourceMappingURL=link-cell-renderer-
|
|
772
|
+
//# sourceMappingURL=link-cell-renderer-C7GvyK66.js.map
|