@alfadocs/ui-kit-debug 1.129.0 → 1.130.1

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 (154) hide show
  1. package/dist/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js +13663 -0
  2. package/dist/_chunks/calendar-appointment-editor-dialog-CXch4Pmu.js.map +1 -0
  3. package/dist/_chunks/contact-round-DiSvB3LP.js +18 -0
  4. package/dist/_chunks/contact-round-DiSvB3LP.js.map +1 -0
  5. package/dist/_chunks/{entity-summary-Dzk54yom.js → entity-summary-KHM0PnSI.js} +55 -67
  6. package/dist/_chunks/entity-summary-KHM0PnSI.js.map +1 -0
  7. package/dist/_chunks/{header-settings-DsvheAOt.js → header-settings-ZGvYAuKF.js} +101 -97
  8. package/dist/_chunks/header-settings-ZGvYAuKF.js.map +1 -0
  9. package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js → marketplace-app-shell-D_HA8CKx.js} +2 -2
  10. package/dist/_chunks/{marketplace-app-shell-BOBWmzoT.js.map → marketplace-app-shell-D_HA8CKx.js.map} +1 -1
  11. package/dist/_chunks/{muscle-scheme-CHrjv7p2.js → muscle-scheme-DdIdm8Gw.js} +2 -1
  12. package/dist/_chunks/{muscle-scheme-CHrjv7p2.js.map → muscle-scheme-DdIdm8Gw.js.map} +1 -1
  13. package/dist/_chunks/{patient-search-D_S7joff.js → patient-search-OAwFgOW3.js} +2 -2
  14. package/dist/_chunks/{patient-search-D_S7joff.js.map → patient-search-OAwFgOW3.js.map} +1 -1
  15. package/dist/_chunks/{toast-BNoN8Qjh.js → toast-DQ1Zu1kk.js} +264 -251
  16. package/dist/_chunks/{toast-BNoN8Qjh.js.map → toast-DQ1Zu1kk.js.map} +1 -1
  17. package/dist/_chunks/use-appointment-details-read-BrykoTOR.js +2475 -0
  18. package/dist/_chunks/use-appointment-details-read-BrykoTOR.js.map +1 -0
  19. package/dist/agent-catalog.json +1 -1
  20. package/dist/browser-support.js +1 -1
  21. package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +7 -0
  22. package/dist/components/appointment-details-panel/appointment-details-panel.d.ts.map +1 -1
  23. package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts +2 -0
  24. package/dist/components/appointment-details-panel/appointment-details-panel.links.d.ts.map +1 -1
  25. package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +5 -1
  26. package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts.map +1 -1
  27. package/dist/components/appointment-details-panel/index.js +1 -1
  28. package/dist/components/entity-summary/index.js +1 -1
  29. package/dist/components/header-settings/header-settings.d.ts.map +1 -1
  30. package/dist/components/header-settings/index.js +1 -1
  31. package/dist/components/muscle-scheme/index.js +1 -1
  32. package/dist/components/muscle-scheme/muscle-scheme.d.ts.map +1 -1
  33. package/dist/components/patient-search/index.js +1 -1
  34. package/dist/components/toast/index.js +1 -1
  35. package/dist/components/toast/toast.d.ts.map +1 -1
  36. package/dist/core.css +1 -1
  37. package/dist/i18n/locales/ar.d.ts +13 -4
  38. package/dist/i18n/locales/ar.d.ts.map +1 -1
  39. package/dist/i18n/locales/ar.js +16 -7
  40. package/dist/i18n/locales/ar.js.map +1 -1
  41. package/dist/i18n/locales/de.d.ts +13 -4
  42. package/dist/i18n/locales/de.d.ts.map +1 -1
  43. package/dist/i18n/locales/de.js +16 -7
  44. package/dist/i18n/locales/de.js.map +1 -1
  45. package/dist/i18n/locales/el.d.ts +13 -4
  46. package/dist/i18n/locales/el.d.ts.map +1 -1
  47. package/dist/i18n/locales/el.js +16 -7
  48. package/dist/i18n/locales/el.js.map +1 -1
  49. package/dist/i18n/locales/en.d.ts +13 -4
  50. package/dist/i18n/locales/en.d.ts.map +1 -1
  51. package/dist/i18n/locales/en.js +13 -4
  52. package/dist/i18n/locales/en.js.map +1 -1
  53. package/dist/i18n/locales/es.d.ts +13 -4
  54. package/dist/i18n/locales/es.d.ts.map +1 -1
  55. package/dist/i18n/locales/es.js +16 -7
  56. package/dist/i18n/locales/es.js.map +1 -1
  57. package/dist/i18n/locales/fr.d.ts +13 -4
  58. package/dist/i18n/locales/fr.d.ts.map +1 -1
  59. package/dist/i18n/locales/fr.js +16 -7
  60. package/dist/i18n/locales/fr.js.map +1 -1
  61. package/dist/i18n/locales/hi.d.ts +13 -4
  62. package/dist/i18n/locales/hi.d.ts.map +1 -1
  63. package/dist/i18n/locales/hi.js +16 -7
  64. package/dist/i18n/locales/hi.js.map +1 -1
  65. package/dist/i18n/locales/it.d.ts +13 -4
  66. package/dist/i18n/locales/it.d.ts.map +1 -1
  67. package/dist/i18n/locales/it.js +16 -7
  68. package/dist/i18n/locales/it.js.map +1 -1
  69. package/dist/i18n/locales/ja.d.ts +13 -4
  70. package/dist/i18n/locales/ja.d.ts.map +1 -1
  71. package/dist/i18n/locales/ja.js +16 -7
  72. package/dist/i18n/locales/ja.js.map +1 -1
  73. package/dist/i18n/locales/nl.d.ts +13 -4
  74. package/dist/i18n/locales/nl.d.ts.map +1 -1
  75. package/dist/i18n/locales/nl.js +16 -7
  76. package/dist/i18n/locales/nl.js.map +1 -1
  77. package/dist/i18n/locales/pl.d.ts +13 -4
  78. package/dist/i18n/locales/pl.d.ts.map +1 -1
  79. package/dist/i18n/locales/pl.js +16 -7
  80. package/dist/i18n/locales/pl.js.map +1 -1
  81. package/dist/i18n/locales/pt.d.ts +13 -4
  82. package/dist/i18n/locales/pt.d.ts.map +1 -1
  83. package/dist/i18n/locales/pt.js +16 -7
  84. package/dist/i18n/locales/pt.js.map +1 -1
  85. package/dist/i18n/locales/ro.d.ts +13 -4
  86. package/dist/i18n/locales/ro.d.ts.map +1 -1
  87. package/dist/i18n/locales/ro.js +16 -7
  88. package/dist/i18n/locales/ro.js.map +1 -1
  89. package/dist/i18n/locales/ru.d.ts +13 -4
  90. package/dist/i18n/locales/ru.d.ts.map +1 -1
  91. package/dist/i18n/locales/ru.js +16 -7
  92. package/dist/i18n/locales/ru.js.map +1 -1
  93. package/dist/i18n/locales/sq.d.ts +13 -4
  94. package/dist/i18n/locales/sq.d.ts.map +1 -1
  95. package/dist/i18n/locales/sq.js +16 -7
  96. package/dist/i18n/locales/sq.js.map +1 -1
  97. package/dist/i18n/locales/sv.d.ts +13 -4
  98. package/dist/i18n/locales/sv.d.ts.map +1 -1
  99. package/dist/i18n/locales/sv.js +16 -7
  100. package/dist/i18n/locales/sv.js.map +1 -1
  101. package/dist/i18n/locales/tr.d.ts +13 -4
  102. package/dist/i18n/locales/tr.d.ts.map +1 -1
  103. package/dist/i18n/locales/tr.js +16 -7
  104. package/dist/i18n/locales/tr.js.map +1 -1
  105. package/dist/i18n/locales/zh.d.ts +13 -4
  106. package/dist/i18n/locales/zh.d.ts.map +1 -1
  107. package/dist/i18n/locales/zh.js +16 -7
  108. package/dist/i18n/locales/zh.js.map +1 -1
  109. package/dist/index.js +7 -7
  110. package/dist/locales/ar.json +16 -7
  111. package/dist/locales/de.json +16 -7
  112. package/dist/locales/el.json +16 -7
  113. package/dist/locales/en.json +13 -4
  114. package/dist/locales/es.json +16 -7
  115. package/dist/locales/fr.json +16 -7
  116. package/dist/locales/hi.json +16 -7
  117. package/dist/locales/it.json +16 -7
  118. package/dist/locales/ja.json +16 -7
  119. package/dist/locales/nl.json +16 -7
  120. package/dist/locales/pl.json +16 -7
  121. package/dist/locales/pt.json +16 -7
  122. package/dist/locales/ro.json +16 -7
  123. package/dist/locales/ru.json +16 -7
  124. package/dist/locales/sq.json +16 -7
  125. package/dist/locales/sv.json +16 -7
  126. package/dist/locales/tr.json +16 -7
  127. package/dist/locales/zh.json +16 -7
  128. package/dist/patterns/calendar/calendar-appointment-details.d.ts +10 -1
  129. package/dist/patterns/calendar/calendar-appointment-details.d.ts.map +1 -1
  130. package/dist/patterns/calendar/calendar-appointment-editor-dialog.d.ts.map +1 -1
  131. package/dist/patterns/calendar/calendar-load-error.d.ts.map +1 -1
  132. package/dist/patterns/calendar/calendar-settings-practice.d.ts.map +1 -1
  133. package/dist/patterns/calendar/calendar-waiting-list-panel.d.ts.map +1 -1
  134. package/dist/patterns/calendar/calendar-workspace.d.ts +27 -0
  135. package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
  136. package/dist/patterns/calendar/calendar-workspace.model.d.ts +5 -6
  137. package/dist/patterns/calendar/calendar-workspace.model.d.ts.map +1 -1
  138. package/dist/patterns/calendar/calendar.model.d.ts +57 -8
  139. package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
  140. package/dist/patterns/calendar/calendar.sheets.d.ts +46 -3
  141. package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
  142. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  143. package/dist/patterns/calendar/calendar.types.d.ts +13 -5
  144. package/dist/patterns/calendar/calendar.types.d.ts.map +1 -1
  145. package/dist/patterns/calendar/index.js +1 -1
  146. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  147. package/dist/tokens.css +1 -1
  148. package/package.json +1 -1
  149. package/dist/_chunks/calendar-appointment-editor-dialog-DnPADcj9.js +0 -13438
  150. package/dist/_chunks/calendar-appointment-editor-dialog-DnPADcj9.js.map +0 -1
  151. package/dist/_chunks/entity-summary-Dzk54yom.js.map +0 -1
  152. package/dist/_chunks/header-settings-DsvheAOt.js.map +0 -1
  153. package/dist/_chunks/use-appointment-details-read-n7kycxrm.js +0 -2439
  154. package/dist/_chunks/use-appointment-details-read-n7kycxrm.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-summary-Dzk54yom.js","sources":["../../node_modules/lucide-react/dist/esm/icons/contact-round.mjs","../../src/components/entity-summary/entity-summary.agent.ts","../../src/components/entity-summary/entity-summary.tsx"],"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 [\"path\", { d: \"M16 2v2\", key: \"scm5qe\" }],\n [\"path\", { d: \"M17.915 22a6 6 0 0 0-12 0\", key: \"suqz9p\" }],\n [\"path\", { d: \"M8 2v2\", key: \"pbkmx\" }],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }],\n [\"rect\", { x: \"3\", y: \"4\", width: \"18\", height: \"18\", rx: \"2\", key: \"12vinp\" }]\n];\nconst ContactRound = createLucideIcon(\"contact-round\", __iconNode);\n\nexport { __iconNode, ContactRound as default };\n//# sourceMappingURL=contact-round.mjs.map\n","/* -------------------------------------------------------------------- */\n/* Agent adapter — EntitySummary. */\n/* */\n/* The AI narrative brief (\"Sintesi IA\") for an entity. The agent can */\n/* read the brief's STRUCTURE (generated-at + section ids / headings / */\n/* tone / item counts — fixed category labels, never the entity name or */\n/* the bullet items, both PHI) and drive the two affordances: regenerate */\n/* the brief and dismiss the panel. Generation itself is gated upstream */\n/* by AiConsentBanner; this adapter only re-requests an already-consented */\n/* brief. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { EntitySummaryHandle } from './entity-summary';\n\nexport const entitySummaryAgent: AgentAdapter<EntitySummaryHandle> = {\n id: 'entity-summary',\n // 'close' backs close; regenerate is a host-driven refresh with no\n // dedicated capability in the closed vocabulary.\n capabilities: ['close'],\n state: {\n sections: {\n type: 'Array<{ id: string; heading: string; tone: \"default\" | \"attention\"; itemCount: number }>',\n descriptionKey: 'ui.agent.entitySummary.state.sections',\n description:\n 'Structural section list — ids, fixed category headings, tone and item counts. Never the entity name or the bullet items (both PHI).',\n read: (handle) => handle.getState().sections,\n },\n generatedAtIso: {\n type: 'string | undefined',\n descriptionKey: 'ui.agent.entitySummary.state.generatedAtIso',\n description: 'ISO-8601 instant the brief was generated, when known.',\n read: (handle) => handle.getState().generatedAtIso,\n },\n },\n actions: {\n regenerate: {\n // Re-requests a fresh brief from the model — reaches an external system.\n safety: 'write',\n openWorld: true,\n descriptionKey: 'ui.agent.entitySummary.actions.regenerate',\n description:\n 'Request the host to regenerate the AI brief. No-op when the regenerate affordance is not available.',\n invoke: (handle) => {\n if (handle.canRegenerate()) handle.regenerate();\n },\n },\n close: {\n // Ephemeral panel-visibility change — read.\n safety: 'read',\n idempotent: true,\n descriptionKey: 'ui.agent.entitySummary.actions.close',\n description:\n 'Dismiss the summary panel. No-op when the close affordance is not available (e.g. docked in the rail).',\n invoke: (handle) => {\n if (handle.canClose()) handle.close();\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'entity-summary',\n description: 'Marks the EntitySummary panel region.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description:\n 'Sourced from the id prop. Required to address a specific summary panel from the agent.',\n },\n },\n};\n","import {\n forwardRef,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { ContactRound, Clock, RefreshCw, X } from 'lucide-react';\nimport { Alert } from '../alert';\nimport { Avatar } from '../avatar';\nimport { Button } from '../button';\nimport { Card } from '../card';\nimport { IconButton } from '../button/icon-button';\nimport { Link } from '../link';\nimport { PanelHeader } from '../panel-header';\nimport { Timestamp } from '../timestamp';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { entitySummaryAgent } from './entity-summary.agent';\n\n/* ------------------------------------------------------------------ */\n/* EntitySummary — the AI narrative brief for an entity. */\n/* */\n/* The kit form of platform's \"Sintesi IA\": a generated, sectioned */\n/* brief of a patient / care plan — header (entity · generated-at · */\n/* regenerate · corpus stats), N labelled sections of bullet items */\n/* (with inline entity links), and a BETA disclaimer. The `attention` */\n/* section tone carries the clinically valuable risk flags. */\n/* */\n/* The kit owns the layout, i18n and theming; the consumer passes */\n/* structured `sections` (data-in) so the brief re-themes and */\n/* localises rather than rendering a model HTML blob. Gate generation */\n/* behind `AiConsentBanner` upstream. */\n/* ------------------------------------------------------------------ */\n\n/** A corpus stat shown in the header (e.g. `{ value: 5, label: 'care plans' }`). */\nexport interface EntitySummaryStat {\n value: string | number;\n label: string;\n}\n\n/** One narrative section — a heading over a list of bullet items. */\nexport interface EntitySummarySection {\n id: string;\n heading: string;\n /**\n * Leading glyph for the section. On default sections it's the scannability\n * anchor shown in a `--primary`-tinted medallion beside the heading (e.g. a\n * calendar for \"Scheduled\", a wallet for \"Financial\"); omit it to render no\n * medallion. On `attention` sections it overrides the warning Alert's icon\n * (which defaults to an alert triangle).\n */\n icon?: ReactNode;\n /**\n * `attention` renders the section as the kit's warning `Alert` — the\n * standard risk-flag treatment (border, warning surface, alert glyph,\n * `--warning-foreground` text) — for clinically important callouts.\n */\n tone?: 'default' | 'attention';\n /** Bullet items — `ReactNode` so consumers compose inline entity links. */\n items: ReactNode[];\n}\n\n/**\n * Curated agent handle for EntitySummary. Exposes structural state only —\n * never the entity name or the section items (both PHI). See\n * `entity-summary.agent.ts`.\n */\nexport interface EntitySummaryHandle {\n /** Structural snapshot — generated-at + section ids/headings/tone/count. No PHI. */\n getState: () => {\n generatedAtIso?: string;\n sections: Array<{\n id: string;\n heading: string;\n tone: 'default' | 'attention';\n itemCount: number;\n }>;\n };\n /** Whether the regenerate affordance is available. */\n canRegenerate: () => boolean;\n /** Request the host to regenerate the brief (mirrors onRegenerate). */\n regenerate: () => void;\n /** Whether the close affordance is available. */\n canClose: () => boolean;\n /** Dismiss the panel (mirrors onClose). */\n close: () => void;\n}\n\nexport interface EntitySummaryProps extends Omit<\n HTMLAttributes<HTMLElement>,\n 'title' | 'children'\n> {\n /**\n * Stable instance id. Surfaced on the root as `data-component-id` so an\n * agent / MCP UI bridge can address this specific summary panel.\n */\n id?: string;\n /** Panel title. Defaults to the localised \"AI summary\". */\n title?: string;\n /** Entity name shown beside its avatar in the header (links when `entityHref` is set). */\n entityName?: string;\n /** Entity href for the name link. */\n entityHref?: string;\n /** Avatar image URL for the entity. Falls back to initials derived from `entityName`. */\n entityAvatarSrc?: string;\n /** ISO-8601 instant the brief was generated. */\n generatedAtIso?: string;\n /** Corpus the brief was built from, shown as a compact KPI card. */\n stats?: EntitySummaryStat[];\n /** The narrative sections, in order. */\n sections: EntitySummarySection[];\n /** Regenerate the brief. Omit to hide the affordance. */\n onRegenerate?: () => void;\n /** Regenerate-button label. */\n regenerateLabel?: string;\n /**\n * Dismiss the panel. Renders a close button in the panel header for\n * STANDALONE use (outside the rail). When docked in `ControlRoomRail`, omit\n * this — the rail injects its own close via `PanelHeaderActionsProvider`\n * (passing it while docked would render a duplicate close control).\n */\n onClose?: () => void;\n /** Footer disclaimer. Defaults to the BETA clinical-judgement note. */\n disclaimer?: ReactNode;\n /** BCP-47 locale for the generated-at timestamp. */\n locale?: string;\n /** Accessible name for the panel region (defaults to `title`). */\n 'aria-label'?: string;\n}\n\n/* ------------------------------------------------------------------ */\n/* Section presentation. The `attention` tone renders a different */\n/* element tree (the kit's warning Alert) rather than a class variant, */\n/* so the branch lives in `Section`; these constants carry the shared */\n/* class sets for the default (prose) sections. */\n/* ------------------------------------------------------------------ */\n\n// The default section's leading icon chip — a --primary-tinted medallion\n// that anchors the heading. No tone variants: the attention tone is owned\n// by the Alert primitive, so this stays a plain class set.\nconst MEDALLION_CLASSES =\n 'ds:flex ds:size-7 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-md)] ds:[&_svg]:size-4 ds:bg-primary/10 ds:text-[color:var(--primary)]';\n\n// The bullet list shared by every section — indented disc items.\nconst ITEMS_CLASSES =\n 'ds:m-0 ds:flex ds:list-disc ds:flex-col ds:gap-[var(--spacing-2xs)] ds:ps-[var(--spacing-md)] type-body-sm';\n\nexport const EntitySummary = forwardRef<HTMLElement, EntitySummaryProps>(\n function EntitySummary(\n {\n id,\n title,\n entityName,\n entityHref,\n entityAvatarSrc,\n generatedAtIso,\n stats,\n sections,\n onRegenerate,\n regenerateLabel,\n onClose,\n disclaimer,\n locale,\n className,\n 'aria-label': ariaLabel,\n ...rest\n },\n ref,\n ) {\n const { t } = useTranslation('ui');\n const headingId = useId();\n const heading =\n title ?? t('entitySummary.title', { defaultValue: 'AI summary' });\n\n /* ----- Agent handle (structural state + regenerate / close) ----- */\n const sectionsRef = useRef(sections);\n sectionsRef.current = sections;\n const generatedAtRef = useRef(generatedAtIso);\n generatedAtRef.current = generatedAtIso;\n const onRegenerateRef = useRef(onRegenerate);\n onRegenerateRef.current = onRegenerate;\n const onCloseRef = useRef(onClose);\n onCloseRef.current = onClose;\n\n const rootRef = useRef<HTMLElement>(null);\n useImperativeHandle(ref, () => rootRef.current as HTMLElement, []);\n\n const handle = useMemo<EntitySummaryHandle>(\n () => ({\n // Structural only — section headings are fixed category labels, never\n // the entity name or the bullet items (both PHI).\n getState: () => ({\n generatedAtIso: generatedAtRef.current,\n sections: sectionsRef.current.map((s) => ({\n id: s.id,\n heading: s.heading,\n tone: s.tone ?? 'default',\n itemCount: s.items.length,\n })),\n }),\n canRegenerate: () => !!onRegenerateRef.current,\n regenerate: () => onRegenerateRef.current?.(),\n canClose: () => !!onCloseRef.current,\n close: () => onCloseRef.current?.(),\n }),\n [],\n );\n useAgentRegistration(entitySummaryAgent, handle, id);\n\n // The generated-at line — the brief's \"subtitle\" under the entity name,\n // or a standalone line when there's no entity. A clock glyph leads it.\n const generatedLine = generatedAtIso ? (\n <span className=\"ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]\">\n <Clock aria-hidden=\"true\" className=\"ds:size-3.5 ds:shrink-0\" />\n <span>\n {t('entitySummary.generatedAt', { defaultValue: 'Generated' })}\n </span>\n <Timestamp value={generatedAtIso} format=\"absolute\" locale={locale} />\n </span>\n ) : null;\n\n return (\n <section\n ref={rootRef}\n data-component=\"entity-summary\"\n data-component-id={id}\n aria-labelledby={ariaLabel ? undefined : headingId}\n aria-label={ariaLabel}\n className={['ds:flex ds:flex-col', className].filter(Boolean).join(' ')}\n {...rest}\n >\n {/* Header — the shared rail-panel pattern. Title + Regenerate;\n the close affordance is injected by the rail, not the panel. */}\n <PanelHeader\n title={heading}\n icon={<ContactRound aria-hidden=\"true\" />}\n headingId={ariaLabel ? undefined : headingId}\n sticky\n divider\n actions={\n onRegenerate || onClose ? (\n <>\n {onRegenerate ? (\n <Button\n type=\"button\"\n size=\"sm\"\n intent=\"ghost\"\n startIcon={<RefreshCw aria-hidden=\"true\" />}\n onClick={onRegenerate}\n >\n {regenerateLabel ??\n t('entitySummary.regenerate', {\n defaultValue: 'Regenerate',\n })}\n </Button>\n ) : null}\n {onClose ? (\n <IconButton\n icon={<X aria-hidden=\"true\" />}\n size=\"sm\"\n intent=\"ghost\"\n aria-label={t('common.close', { defaultValue: 'Close' })}\n onClick={onClose}\n />\n ) : null}\n </>\n ) : undefined\n }\n />\n\n {/* Body */}\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]\">\n {entityName || generatedAtIso || (stats && stats.length > 0) ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n {/* Identity — the entity's avatar + name, generated-at as the\n subtitle beneath. Without a name, the generated line stands\n alone. */}\n {entityName ? (\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]\">\n <Avatar\n name={entityName}\n src={entityAvatarSrc}\n size=\"sm\"\n className=\"ds:shrink-0\"\n />\n <div className=\"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]\">\n {entityHref ? (\n <Link\n href={entityHref}\n className=\"type-body-sm ds:font-semibold\"\n >\n {entityName}\n </Link>\n ) : (\n <span className=\"type-body-sm ds:font-semibold ds:text-[color:var(--foreground)]\">\n {entityName}\n </span>\n )}\n {generatedLine}\n </div>\n </div>\n ) : (\n generatedLine\n )}\n\n {/* Corpus stats — a compact KPI card: value over label, with a\n hairline divider between cells. */}\n {stats && stats.length > 0 ? (\n <Card variant=\"elevated\">\n {/* eslint-disable-next-line jsx-a11y/no-redundant-roles -- role=\"list\" restores list semantics that ds:list-none strips in Safari/VoiceOver */}\n <ul\n role=\"list\"\n className=\"ds:m-0 ds:flex ds:list-none ds:items-stretch\"\n >\n {stats.map((stat, index) => (\n <li\n key={`${stat.label}-${index}`}\n className={[\n 'ds:flex ds:flex-1 ds:flex-col ds:items-center ds:gap-[var(--spacing-2xs)] ds:p-[var(--spacing-sm)] ds:text-center',\n index > 0\n ? 'ds:border-s ds:border-[color:var(--card-border)]'\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <span className=\"type-metric ds:[--type-metric-size:var(--font-size-lg)] ds:text-[color:var(--foreground)]\">\n {stat.value}\n </span>\n <span className=\"type-meta ds:text-[color:var(--muted-foreground)]\">\n {stat.label}\n </span>\n </li>\n ))}\n </ul>\n </Card>\n ) : null}\n </div>\n ) : null}\n\n {/* Sections */}\n {sections.map((section) => (\n <Section key={section.id} section={section} />\n ))}\n\n {/* Disclaimer */}\n <p className=\"ds:m-0 type-meta ds:text-[color:var(--muted-foreground)]\">\n {disclaimer ??\n t('entitySummary.disclaimer', {\n defaultValue:\n 'Does not replace clinical judgement · verify accuracy before clinical use · BETA',\n })}\n </p>\n </div>\n </section>\n );\n },\n);\n\nfunction Section({ section }: { section: EntitySummarySection }): ReactNode {\n const headingId = useId();\n\n // The risk-flag section composes the kit's warning `Alert` primitive rather\n // than re-painting the warning tokens by hand — same border, surface, alert\n // glyph, and `--warning-foreground` treatment as every other warning in the\n // app. `live=\"off\"`: the brief is static content, not a just-occurred event,\n // so the items read in normal flow instead of being announced assertively.\n // A per-section `icon` overrides Alert's default alert triangle.\n if (section.tone === 'attention') {\n // The shared `--shadow-card` lifts the warning callout to the same\n // elevation as the surrounding section cards, so the stack reads as one\n // set of raised panels rather than a flat warning band among cards.\n return (\n <Alert\n variant=\"warning\"\n live=\"off\"\n icon={section.icon}\n className=\"ds:shadow-[var(--shadow-card)]\"\n >\n <Alert.Title as=\"h3\">{section.heading}</Alert.Title>\n <ul className={ITEMS_CLASSES}>\n {section.items.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ul>\n </Alert>\n );\n }\n\n // Default sections are raised cards — the scannable \"panel per topic\" stack,\n // matching platform's Sintesi IA. The card owns its own padding (so we drive\n // it from a single content div rather than Card.Header/Body) and is named by\n // its heading for assistive tech.\n return (\n <Card variant=\"elevated\" aria-labelledby={headingId}>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]\">\n <div className=\"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]\">\n {section.icon ? (\n <span aria-hidden=\"true\" className={MEDALLION_CLASSES}>\n {section.icon}\n </span>\n ) : null}\n <h3\n id={headingId}\n className=\"ds:m-0 type-eyebrow ds:text-[color:var(--foreground)]\"\n >\n {section.heading}\n </h3>\n </div>\n <ul className={`${ITEMS_CLASSES} ds:text-[color:var(--foreground)]`}>\n {section.items.map((item, index) => (\n <li key={index}>{item}</li>\n ))}\n </ul>\n </div>\n </Card>\n );\n}\n"],"names":["__iconNode","ContactRound","createLucideIcon","entitySummaryAgent","handle","MEDALLION_CLASSES","ITEMS_CLASSES","EntitySummary","forwardRef","id","title","entityName","entityHref","entityAvatarSrc","generatedAtIso","stats","sections","onRegenerate","regenerateLabel","onClose","disclaimer","locale","className","ariaLabel","rest","ref","t","useTranslation","headingId","useId","heading","sectionsRef","useRef","generatedAtRef","onRegenerateRef","onCloseRef","rootRef","useImperativeHandle","useMemo","s","_a","useAgentRegistration","generatedLine","jsxs","jsx","Clock","Timestamp","PanelHeader","Fragment","Button","RefreshCw","IconButton","X","Avatar","Link","Card","stat","index","section","Section","Alert","item"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,MAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,WAAW,KAAK,SAAQ,CAAE;AAAA,EACxC,CAAC,QAAQ,EAAE,GAAG,6BAA6B,KAAK,SAAQ,CAAE;AAAA,EAC1D,CAAC,QAAQ,EAAE,GAAG,UAAU,KAAK,QAAO,CAAE;AAAA,EACtC,CAAC,UAAU,EAAE,IAAI,MA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,WAAWtC,GACZ,YAAQ,MAAM,IAAI,CAACuD,GAAMJ,MACxB,gBAAAb,EAAC,MAAA,EAAgB,UAAAiB,EAAA,GAARJ,CAAa,CACvB,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAUJ,gBAAAb,EAACW,KAAK,SAAQ,YAAW,mBAAiB3B,GACxC,UAAA,gBAAAe,EAAC,OAAA,EAAI,WAAU,2EACb,UAAA;AAAA,IAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,sDACZ,UAAA;AAAA,MAAAe,EAAQ,yBACN,QAAA,EAAK,eAAY,QAAO,WAAWrD,IACjC,UAAAqD,EAAQ,KAAA,CACX,IACE;AAAA,MACJ,gBAAAd;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,IAAIhB;AAAA,UACJ,WAAU;AAAA,UAET,UAAA8B,EAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,GACF;AAAA,sBACC,MAAA,EAAG,WAAW,GAAGpD,CAAa,sCAC5B,UAAAoD,EAAQ,MAAM,IAAI,CAACG,GAAMJ,MACxB,gBAAAb,EAAC,QAAgB,UAAAiB,EAAA,GAARJ,CAAa,CACvB,EAAA,CACH;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"header-settings-DsvheAOt.js","sources":["../../src/components/header-settings/header-settings.agent.ts","../../src/components/header-settings/header-settings.tsx"],"sourcesContent":["/* -------------------------------------------------------------------- */\n/* Agent adapter — HeaderSettings. */\n/* -------------------------------------------------------------------- */\n\nimport type { AgentAdapter } from '../../agent/types';\nimport type { HeaderSettingsHandle } from './header-settings';\n\nexport const headerSettingsAgent: AgentAdapter<HeaderSettingsHandle> = {\n id: 'header-settings',\n // Each setter persists a single preference value (locale / theme /\n // accessibility) — `set_value` semantics, not an ephemeral view switch.\n capabilities: ['set_value'],\n // Read-back for all three setters. None of these preferences is\n // recoverable from the DOM — `useTheme` resolves preference + OS into\n // a single applied class, so `theme: 'system'` and `theme: 'light'`\n // both paint `.theme-light` — and `set_locale` swallows unknown tags.\n // Without these slots an agent cannot distinguish \"switched to\n // Italian\" from \"the tag was dropped on the floor\". All four are UI\n // preferences: no PHI, no patient-identifiable data (§7).\n state: {\n locale: {\n type: 'string',\n descriptionKey: 'ui.agent.headerSettings.state.locale',\n description:\n 'Active IETF language tag (e.g. \"en\", \"it\", \"ar\"). Initially uses HTML lang first when followHtmlLang is enabled; otherwise storage, then HTML lang when initialLocaleFromHtmlLang is enabled, then the browser. Read after set_locale to confirm the switch; unknown tags leave it unchanged.',\n read: (handle) => handle.getLocale(),\n },\n theme: {\n type: \"'light' | 'dark' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.theme',\n description:\n \"Stored base-theme preference. `'system'` means no override is set and the OS decides — read `resolvedTheme` for what is actually painted.\",\n read: (handle) => handle.getTheme(),\n },\n accessibility: {\n type: \"'default' | 'accessible' | 'system'\",\n descriptionKey: 'ui.agent.headerSettings.state.accessibility',\n description:\n \"Stored AAA-contrast preference. `'system'` means no override is set and `prefers-contrast` decides.\",\n read: (handle) => handle.getAccessibility(),\n },\n resolvedTheme: {\n type: \"'light' | 'dark' | 'light-accessible' | 'dark-accessible'\",\n descriptionKey: 'ui.agent.headerSettings.state.resolvedTheme',\n description:\n 'The theme actually applied to the document once preference and OS signals resolve. This is what makes a `set_theme(\"system\")` or `set_accessibility(\"system\")` write verifiable.',\n read: (handle) => handle.getResolvedTheme(),\n },\n },\n actions: {\n set_locale: {\n safety: 'write',\n argsType: '{ locale: string }',\n argsSchema: {\n type: 'object',\n properties: {\n locale: {\n type: 'string',\n description:\n 'IETF language tag (e.g. \"en\", \"it\", \"ar\"). Unknown tags are silently dropped.',\n },\n },\n required: ['locale'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setLocale',\n description:\n \"Switch the active locale to the given IETF tag. Unknown tags are silently dropped — read the `locale` state slot afterwards to confirm. On a site with one address per language, the host may then load that language's address.\",\n errors: [\n 'Silently ignored when the tag names a locale the kit ships no bundle for — `locale` is unchanged.',\n ],\n examples: [{ args: { locale: 'it' }, note: 'Switch to Italian.' }],\n invoke: (handle, args: { locale: string }) => {\n // Validation happens inside the handle so the agent surface\n // accepts arbitrary tags and silently drops unknown ones.\n handle.setLocale(args.locale);\n },\n },\n set_theme: {\n safety: 'write',\n argsType: '{ theme: \"light\" | \"dark\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: { theme: { enum: ['light', 'dark', 'system'] } },\n required: ['theme'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setTheme',\n description:\n 'Switch the theme preference. Verify with the `theme` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n { args: { theme: 'dark' }, note: 'Switch to the dark theme.' },\n ],\n invoke: (handle, args: { theme: 'light' | 'dark' | 'system' }) => {\n handle.setTheme(args.theme);\n },\n },\n set_accessibility: {\n safety: 'write',\n argsType: '{ accessibility: \"default\" | \"accessible\" | \"system\" }',\n argsSchema: {\n type: 'object',\n properties: {\n accessibility: {\n enum: ['default', 'accessible', 'system'],\n description:\n \"`'system'` clears the override and follows `prefers-contrast`.\",\n },\n },\n required: ['accessibility'],\n },\n idempotent: true,\n descriptionKey: 'ui.agent.headerSettings.actions.setAccessibility',\n description:\n 'Switch the accessibility preference. Verify with the `accessibility` slot (the stored preference) and `resolvedTheme` (what is actually painted).',\n examples: [\n {\n args: { accessibility: 'accessible' },\n note: 'Enable the AAA-accessible profile.',\n },\n ],\n invoke: (\n handle,\n args: { accessibility: 'default' | 'accessible' | 'system' },\n ) => {\n handle.setAccessibility(args.accessibility);\n },\n },\n },\n domHooks: {\n root: {\n attr: 'data-component',\n value: 'header-settings',\n description: 'Marks the HeaderSettings wrapper.',\n },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop (forwarded via HTMLAttributes).',\n },\n },\n};\n","import {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type FocusEvent,\n type HTMLAttributes,\n type KeyboardEvent,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ArrowLeft, ChevronRight, Settings } from 'lucide-react';\nimport { Button } from '../button/button';\nimport { IconButton } from '../button/icon-button';\nimport { DropdownMenu } from '../dropdown-menu/dropdown-menu';\nimport {\n LocalePicker,\n persistLocalePreference,\n reportLocaleChange,\n type LocaleChangeHandler,\n useInitialLocale,\n} from '../locale-picker/locale-picker';\nimport {\n useTheme,\n type AccessibilityPreference,\n type ResolvedTheme,\n type ThemePreference,\n} from '../../hooks';\nimport { useLocale } from '../../hooks/use-locale';\nimport { useMediaQuery } from '../../hooks/use-media-query';\nimport { useDocumentDirection } from '../../hooks/use-direction';\nimport { useIsomorphicLayoutEffect } from '../../hooks/use-isomorphic-layout-effect';\nimport { LOCALE_META, type Locale } from '../../i18n/locale-meta';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { headerSettingsAgent } from './header-settings.agent';\nimport { useLengthTokenPx } from '../_shared/length-token';\nimport {\n accessibleTargetSquareClass,\n accessibleTargetSquareFromSmClass,\n} from '../_shared/accessible-target';\n\nfunction applyDocumentAttrs(locale: Locale): void {\n if (typeof document === 'undefined') return;\n const root = document.documentElement;\n root.lang = locale;\n root.dir = LOCALE_META[locale].dir;\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst wrapperVariants = cva('ds:inline-flex ds:items-center', {\n variants: {\n align: {\n start: '',\n end: '',\n },\n },\n defaultVariants: { align: 'end' },\n});\n\n// In the standard themes the cog keeps its IconButton box at every size, so\n// `sm` is as tall as a `Button size=\"sm\"` beside it: 44px on phones, 32px\n// from `sm:` up. The hit area still reaches --min-target-size at every width.\n// IconButton hides its `::before` hit box from `sm:` up; this rule is keyed\n// on the button's own marker, so it outranks that rule whatever order the\n// CSS is emitted in (as in DashboardGrid). The box reaches 6px past each\n// edge, no more than the header's --spacing-sm gap.\n// In the accessible themes the cog grows to the 48px target instead, as the\n// kit's other compact controls do (RowActions, DataGrid), so it never looks\n// smaller there than it did before. `lg` (48px) already meets the target.\nconst triggerVariants = cva('', {\n variants: {\n size: {\n // Button sm is 44px tall on phones; IconButton sm is only 32px wide.\n // The unscoped floor's `auto` fallback would undo that phone minimum,\n // so `sm` takes the floor scoped from `sm:` up.\n sm: `ds:min-w-[var(--min-target-size)] ds:sm:min-w-0 ds:data-[component=icon-button]:sm:before:block ${accessibleTargetSquareFromSmClass}`,\n md: `ds:data-[component=icon-button]:sm:before:block ${accessibleTargetSquareClass}`,\n lg: '',\n },\n },\n defaultVariants: { size: 'md' },\n});\n\n// The language flyout hosts the searchable locale list, so it takes a\n// popover width rather than the menu's minimum.\nconst languageFlyoutClasses = 'ds:w-[var(--popover-size-md)]';\n\nconst panelVariants = cva('', {\n variants: {\n language: {\n true: 'ds:[inline-size:var(--popover-size-md)] ds:[min-inline-size:0] ds:[max-inline-size:calc(100vw_-_2_*_var(--spacing-lg))] ds:[&_input]:min-w-0',\n false: '',\n },\n },\n});\n\ntype PhoneView = 'main' | 'language' | 'appearance';\n\nconst phoneRowClasses = cva(\n 'ds:flex ds:flex-1 ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]',\n);\n\nfunction SettingRowLabel({\n label,\n value,\n lang,\n}: {\n label: string;\n value: string;\n lang?: string;\n}) {\n return (\n <span className={phoneRowClasses()}>\n <span className=\"ds:truncate\">{label}</span>\n <span\n lang={lang}\n className=\"ds:shrink-0 ds:text-muted-foreground ds:[[data-highlighted]_&]:text-current\"\n >\n {value}\n </span>\n </span>\n );\n}\n\nfunction isLocale(tag: string): tag is Locale {\n return Object.prototype.hasOwnProperty.call(LOCALE_META, tag);\n}\n\n/* ------------------------------------------------------------------ */\n/* LanguageSub */\n/* */\n/* One menu row naming the setting and showing the current language */\n/* (\"Language · English ›\"), laid out like DropdownMenu.ChoiceSub. It */\n/* opens a flyout beside the menu holding LocalePicker.SearchList, so */\n/* the 18 locales stay searchable. The flyout is a dialog, not a menu: */\n/* it holds a search combobox and a listbox, which a menu may not own. */\n/* ------------------------------------------------------------------ */\n\nfunction LanguageSub({\n locale,\n onLocaleChange,\n}: {\n locale: string;\n onLocaleChange?: LocaleChangeHandler;\n}) {\n const { t } = useTranslation('ui');\n const current = LOCALE_META[isLocale(locale) ? locale : 'en'];\n\n // Radix focuses the flyout itself when a keyboard user opens it. Hand\n // that focus on to the search field so typing filters at once.\n const handleFocus = (event: FocusEvent<HTMLDivElement>) => {\n if (event.target !== event.currentTarget) return;\n event.currentTarget\n .querySelector<HTMLInputElement>('input')\n ?.focus({ preventScroll: true });\n };\n\n // The flyout closes on the \"back\" arrow (ArrowLeft, or ArrowRight in\n // RTL). Inside the search field that key moves the caret instead,\n // unless the caret is already at the start of the field. Capture\n // phase, so Radix's own handler on the flyout never sees the key.\n const handleKeyDownCapture = (event: KeyboardEvent<HTMLDivElement>) => {\n const target = event.target;\n if (!(target instanceof HTMLInputElement)) return;\n // Keys pressed while an IME is composing (Japanese, Chinese) belong to\n // the composition, never to the menu.\n if (event.nativeEvent.isComposing) {\n event.stopPropagation();\n return;\n }\n if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return;\n if (target.selectionStart !== 0 || target.selectionEnd !== 0) {\n event.stopPropagation();\n }\n };\n\n return (\n <DropdownMenu.Sub>\n <DropdownMenu.SubTrigger aria-haspopup=\"dialog\" data-value={current.code}>\n <span className=\"ds:flex ds:min-w-0 ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]\">\n <span className=\"ds:truncate\">\n {t('navigation.headerSettings.language.label')}\n </span>\n <span\n lang={current.code}\n className=\"ds:shrink-0 ds:text-[color:var(--muted-foreground)] ds:[[data-highlighted]_&]:text-current\"\n >\n {current.nativeName}\n </span>\n </span>\n </DropdownMenu.SubTrigger>\n {/* Radix renders a `menu`; override to `dialog` and drop the\n menu-only `aria-orientation`, which a dialog may not carry. */}\n <DropdownMenu.SubContent\n role=\"dialog\"\n aria-orientation={undefined}\n className={languageFlyoutClasses}\n onFocus={handleFocus}\n onKeyDownCapture={handleKeyDownCapture}\n // Escape that cancels an IME conversion must not close the menu.\n onEscapeKeyDown={(escapeEvent) => {\n if (escapeEvent.isComposing) escapeEvent.preventDefault();\n }}\n >\n <LocalePicker.SearchList onLocaleChange={onLocaleChange} />\n </DropdownMenu.SubContent>\n </DropdownMenu.Sub>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport interface HeaderSettingsProps\n extends\n Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>,\n VariantProps<typeof wrapperVariants> {\n /** Anchor side for the dropdown. Defaults to `end` (matches LTR + RTL). */\n align?: 'start' | 'end';\n /**\n * Size of the cog trigger only. Forwards to the underlying\n * `IconButton`. In the standard themes the cog shows that button's own\n * box; in the accessible themes `sm` and `md` grow to the 48px target.\n * Defaults to `md`. The hit area always meets `--min-target-size`,\n * including on desktop: where the cog is smaller, an invisible box\n * around it makes up the difference.\n * Use `sm` when composing alongside other `<Button size=\"sm\">`\n * actions in a header row: in the standard themes the cog is then as\n * tall as those buttons.\n *\n * The menu itself (language, appearance and accessible-mode rows)\n * stays at kit defaults regardless — this prop only sizes the\n * trigger.\n */\n size?: 'sm' | 'md' | 'lg';\n /** Disable the trigger entirely. */\n disabled?: boolean;\n /**\n * With no saved choice, start from the page's HTML lang before falling back\n * to the browser. Defaults to false. The first locale surface's mount effect\n * decides for the app lifecycle; pass the same option to LocalePicker.\n */\n initialLocaleFromHtmlLang?: boolean;\n /**\n * The page's HTML lang decides the starting locale, ahead of a saved\n * choice. For sites with one address per language, where the address\n * decides. Defaults to false. Pass the same option to LocalePicker.\n */\n followHtmlLang?: boolean;\n /**\n * Called after a language picked in the menu (or set through the agent\n * handle) has been applied and changed the language. Not called for the\n * starting locale. A site with one address per language navigates to\n * `resolved` here.\n */\n onLocaleChange?: LocaleChangeHandler;\n}\n\nexport interface HeaderSettingsHandle {\n /**\n * Switch the active locale. Widened to `string` (vs. `Locale`) so\n * agent surfaces with untyped inputs can call through without\n * extra casting — invalid tags no-op silently.\n */\n setLocale: (next: string) => void;\n setTheme: (next: ThemePreference) => void;\n setAccessibility: (next: AccessibilityPreference) => void;\n /* ---- read-back for the three setters above -------------------- */\n /** Active IETF language tag, as i18next resolved it. */\n getLocale: () => string;\n /** Stored base-theme preference (`'system'` when no override is set). */\n getTheme: () => ThemePreference;\n /** Stored AAA-contrast preference (`'system'` when no override is set). */\n getAccessibility: () => AccessibilityPreference;\n /**\n * The theme actually painted once preference + OS signals resolve.\n * `theme: 'system'` and `theme: 'light'` both render `.theme-light`,\n * so this is what makes a `setTheme('system')` write verifiable.\n */\n getResolvedTheme: () => ResolvedTheme;\n}\n\n/* ------------------------------------------------------------------ */\n/* HeaderSettings */\n/* */\n/* Single button → single DropdownMenu surface, laid out as a View */\n/* menu: Language, Appearance (light / dark / system) and an Accessible */\n/* mode SwitchItem. On phones the lists replace the panel with a Back */\n/* row; on larger screens they open beside it. Every row uses the hooks */\n/* (`useLocale`, `useTheme`) as the standalone components, so there is */\n/* no state duplication. */\n/* ------------------------------------------------------------------ */\n\nexport const HeaderSettings = forwardRef<HTMLDivElement, HeaderSettingsProps>(\n (props, ref) => {\n const {\n align = 'end',\n size = 'md',\n disabled = false,\n initialLocaleFromHtmlLang = false,\n followHtmlLang = false,\n onLocaleChange,\n className,\n id,\n ...rest\n } = props as HeaderSettingsProps & { id?: string };\n\n const { t } = useTranslation('ui');\n const theme = useTheme();\n const { locale, setLocale: setLocaleI18n } = useLocale();\n // The language search only mounts with its flyout, so apply the saved\n // (or HTML/browser) language here, on mount.\n useInitialLocale(initialLocaleFromHtmlLang, followHtmlLang);\n const onLocaleChangeRef = useRef(onLocaleChange);\n onLocaleChangeRef.current = onLocaleChange;\n\n const forwardedRef = useRef<HTMLDivElement | null>(null);\n useImperativeHandle(ref, () => forwardedRef.current as HTMLDivElement, []);\n\n // PublicHeader uses ds:md:hidden / ds:hidden ds:md:flex for its phone\n // sheet and inline actions. Match that same Tailwind md boundary (768px).\n const isPhone = useMediaQuery('(width < 48rem)');\n const direction = useDocumentDirection();\n const [phoneView, setPhoneView] = useState<PhoneView>('main');\n const view = isPhone ? phoneView : 'main';\n const panelRef = useRef<HTMLDivElement>(null);\n const languageRowRef = useRef<HTMLDivElement>(null);\n const appearanceRowRef = useRef<HTMLDivElement>(null);\n const returnFocusRef = useRef<Exclude<PhoneView, 'main'> | null>(null);\n const activationRef = useRef('keyboard');\n\n useIsomorphicLayoutEffect(() => {\n if (!isPhone && phoneView !== 'main') {\n returnFocusRef.current = phoneView;\n setPhoneView('main');\n }\n if (view === 'language') {\n panelRef.current\n ?.querySelector<HTMLElement>(\n activationRef.current === 'keyboard' ? 'input' : 'button',\n )\n ?.focus({ preventScroll: true });\n } else if (view === 'appearance') {\n panelRef.current\n ?.querySelector<HTMLElement>('[role=\"menuitem\"]')\n ?.focus({ preventScroll: true });\n } else if (returnFocusRef.current) {\n const section = returnFocusRef.current;\n // Desktop renders SubTrigger/ChoiceSub in place of the phone rows.\n const row = isPhone\n ? (section === 'language' ? languageRowRef : appearanceRowRef).current\n : panelRef.current?.querySelector<HTMLElement>(\n `[role=\"menuitem\"][aria-haspopup=\"${section === 'language' ? 'dialog' : 'menu'}\"]`,\n );\n row?.focus({ preventScroll: true });\n returnFocusRef.current = null;\n }\n }, [isPhone, phoneView, view]);\n\n const handlePhoneRowKeyDown = (\n event: KeyboardEvent<HTMLDivElement>,\n section: Exclude<PhoneView, 'main'>,\n ) => {\n if (event.nativeEvent.isComposing) return;\n const forwardKey = direction === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n if (\n event.key === 'Enter' ||\n event.key === ' ' ||\n event.key === forwardKey\n )\n activationRef.current = 'keyboard';\n if (event.key === forwardKey) {\n event.preventDefault();\n setPhoneView(section);\n }\n };\n\n const goBack = () => {\n if (view === 'main') return;\n returnFocusRef.current = view;\n setPhoneView('main');\n };\n\n const handlePhoneKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (view === 'main') return;\n if (event.nativeEvent.isComposing) {\n event.stopPropagation();\n return;\n }\n if (event.key !== (direction === 'rtl' ? 'ArrowRight' : 'ArrowLeft'))\n return;\n const target = event.target;\n // As in LanguageSub, leave the caret alone until it reaches the start.\n if (\n target instanceof HTMLInputElement &&\n (target.selectionStart !== 0 || target.selectionEnd !== 0)\n )\n return;\n event.preventDefault();\n event.stopPropagation();\n goBack();\n };\n\n // Same side-effect chain as LocalePicker's internal helper:\n // i18next.changeLanguage → document.dir/lang → persist.\n // Share persistence and session preference with every locale picker.\n const setLocaleWithPersistence = useCallback(\n (next: Locale) => {\n void setLocaleI18n(next);\n applyDocumentAttrs(next);\n persistLocalePreference(next);\n },\n [setLocaleI18n],\n );\n const setLocaleRef = useRef(setLocaleWithPersistence);\n setLocaleRef.current = setLocaleWithPersistence;\n // Assigned during render (not in an effect) so an agent reading the\n // slot immediately after `set_locale` sees the settled value rather\n // than the pre-commit one.\n const localeRef = useRef(locale);\n localeRef.current = locale;\n\n const themeRef = useRef(theme);\n themeRef.current = theme;\n const agentHandle = useMemo<HeaderSettingsHandle>(\n () => ({\n setLocale: (next: string) => {\n // Mirrors LocalePicker's gating — silently drop unknown tags\n // rather than crash mid-cascade. `LOCALES_WITH_BUNDLES` is\n // re-imported via the LOCALE_META keys so this file doesn't\n // need the resources module on the build-agent-catalog path.\n if (Object.prototype.hasOwnProperty.call(LOCALE_META, next)) {\n const previous = localeRef.current;\n setLocaleRef.current(next as Locale);\n reportLocaleChange(\n onLocaleChangeRef.current,\n next as Locale,\n previous as Locale,\n );\n }\n },\n setTheme: (next) => themeRef.current.setTheme(next),\n setAccessibility: (next) => themeRef.current.setAccessibility(next),\n // Read-back. None of the three preferences is recoverable from\n // the DOM: `useTheme` resolves preference + OS into one applied\n // class, so `theme: 'system'` and `theme: 'light'` both paint\n // `.theme-light`. Without these an agent cannot tell a switch\n // that landed from one that was dropped.\n getLocale: () => localeRef.current,\n getTheme: () => themeRef.current.theme,\n getAccessibility: () => themeRef.current.accessibility,\n getResolvedTheme: () => themeRef.current.resolvedTheme,\n }),\n [],\n );\n useAgentRegistration(headerSettingsAgent, agentHandle, id);\n\n const accessibleChecked = theme.accessibility === 'accessible';\n // Keep the panel clear of the screen edge by the phone menu's own\n // side margin. In the PublicHeader sheet the gear is\n // 24px from the edge and an end-aligned 224px panel would otherwise be\n // pushed flush against it. On desktop it never reaches the edge.\n const edgeMargin = useLengthTokenPx('--spacing-lg', forwardedRef, 24);\n const languageLabel = t('navigation.headerSettings.language.label');\n const appearanceLabel = t('navigation.headerSettings.appearance.label');\n const currentLocale = LOCALE_META[isLocale(locale) ? locale : 'en'];\n const appearanceOptions = [\n {\n value: 'light',\n label: t('navigation.headerSettings.appearance.light'),\n },\n { value: 'dark', label: t('navigation.headerSettings.appearance.dark') },\n {\n value: 'system',\n label: t('navigation.headerSettings.appearance.system'),\n },\n ] as const;\n const backLabel = t('navigation.headerSettings.back');\n\n return (\n <div\n ref={forwardedRef}\n data-component=\"header-settings\"\n data-component-id={id}\n className={wrapperVariants({ align, className })}\n {...rest}\n >\n <DropdownMenu.Root\n onOpenChange={(open) => {\n if (!open) {\n returnFocusRef.current = null;\n setPhoneView('main');\n }\n }}\n >\n <DropdownMenu.Trigger asChild>\n <IconButton\n size={size}\n className={triggerVariants({ size })}\n disabled={disabled}\n icon={<Settings aria-hidden />}\n aria-label={t('navigation.headerSettings.trigger')}\n />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content\n ref={panelRef}\n align={align}\n collisionPadding={edgeMargin}\n className={panelVariants({ language: view === 'language' })}\n {...(view === 'language'\n ? {\n role: 'dialog',\n 'aria-orientation': undefined,\n 'aria-label': languageLabel,\n 'aria-labelledby': undefined,\n }\n : {})}\n onKeyDownCapture={handlePhoneKeyDown}\n onEscapeKeyDown={(event) => {\n if (event.isComposing) event.preventDefault();\n }}\n >\n {view === 'language' ? (\n <div\n role=\"presentation\"\n onKeyDown={(event) => {\n // The dialog owns typing and Tab, not Radix's menu\n // typeahead. Its two tab stops are Back and search.\n if (\n event.key === 'Tab' &&\n !event.altKey &&\n !event.ctrlKey &&\n !event.metaKey\n ) {\n event.preventDefault();\n event.currentTarget\n .querySelector<HTMLElement>(\n event.target instanceof HTMLInputElement\n ? 'button'\n : 'input',\n )\n ?.focus();\n }\n event.stopPropagation();\n }}\n >\n <Button\n intent=\"ghost\"\n size=\"sm\"\n className=\"ds:w-full ds:justify-start ds:text-start ds:font-normal ds:min-h-[var(--min-target-size)] ds:sm:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:gap-[var(--spacing-sm)] ds:[&>span:last-child]:flex-1\"\n startIcon={<ArrowLeft aria-hidden className=\"ds:size-4\" />}\n flipIconInRtl\n onClick={goBack}\n >\n <SettingRowLabel label={backLabel} value={languageLabel} />\n </Button>\n <DropdownMenu.Separator />\n <LocalePicker.SearchList onLocaleChange={onLocaleChange} />\n </div>\n ) : view === 'appearance' ? (\n <>\n <DropdownMenu.Item\n startIcon={\n <ArrowLeft\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onSelect={(event) => {\n event.preventDefault();\n goBack();\n }}\n >\n <SettingRowLabel label={backLabel} value={appearanceLabel} />\n </DropdownMenu.Item>\n <DropdownMenu.Separator />\n <DropdownMenu.RadioGroup\n aria-label={appearanceLabel}\n value={theme.theme}\n onValueChange={(next) =>\n theme.setTheme(next as ThemePreference)\n }\n >\n {appearanceOptions.map((option) => (\n <DropdownMenu.RadioItem\n key={option.value}\n value={option.value}\n onSelect={(event) => event.preventDefault()}\n >\n {option.label}\n </DropdownMenu.RadioItem>\n ))}\n </DropdownMenu.RadioGroup>\n </>\n ) : (\n <>\n {isPhone ? (\n <DropdownMenu.Item\n ref={languageRowRef}\n aria-haspopup=\"dialog\"\n data-value={currentLocale.code}\n endIcon={\n <ChevronRight\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onPointerDown={(event) => {\n activationRef.current = event.pointerType;\n }}\n onKeyDown={(event) =>\n handlePhoneRowKeyDown(event, 'language')\n }\n onSelect={(event) => {\n event.preventDefault();\n setPhoneView('language');\n }}\n >\n <SettingRowLabel\n label={languageLabel}\n value={currentLocale.nativeName}\n lang={currentLocale.code}\n />\n </DropdownMenu.Item>\n ) : (\n <LanguageSub\n locale={locale}\n onLocaleChange={onLocaleChange}\n />\n )}\n <DropdownMenu.Separator />\n {isPhone ? (\n <DropdownMenu.Item\n ref={appearanceRowRef}\n aria-haspopup=\"menu\"\n data-value={theme.theme}\n endIcon={\n <ChevronRight\n aria-hidden\n className=\"ds:size-4 ds:rtl:-scale-x-100\"\n />\n }\n onPointerDown={(event) => {\n activationRef.current = event.pointerType;\n }}\n onKeyDown={(event) =>\n handlePhoneRowKeyDown(event, 'appearance')\n }\n onSelect={(event) => {\n event.preventDefault();\n setPhoneView('appearance');\n }}\n >\n <SettingRowLabel\n label={appearanceLabel}\n value={\n appearanceOptions.find(\n (option) => option.value === theme.theme,\n )?.label ?? ''\n }\n />\n </DropdownMenu.Item>\n ) : (\n <DropdownMenu.ChoiceSub\n label={appearanceLabel}\n value={theme.theme}\n onValueChange={theme.setTheme}\n options={appearanceOptions}\n />\n )}\n {/* Writes through useTheme, so the document gets the\n `theme-accessible` class at once (including the Lexend\n swap for Latin scripts, see src/tokens/index.css). */}\n <DropdownMenu.SwitchItem\n checked={accessibleChecked}\n onCheckedChange={(next) =>\n theme.setAccessibility(next ? 'accessible' : 'default')\n }\n >\n {t('navigation.headerSettings.appearance.accessible')}\n </DropdownMenu.SwitchItem>\n </>\n )}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n </div>\n );\n },\n);\n\nHeaderSettings.displayName = 'HeaderSettings';\n"],"names":["headerSettingsAgent","handle","args","applyDocumentAttrs","locale","root","LOCALE_META","wrapperVariants","cva","triggerVariants","accessibleTargetSquareFromSmClass","accessibleTargetSquareClass","languageFlyoutClasses","panelVariants","phoneRowClasses","SettingRowLabel","label","value","lang","jsxs","jsx","isLocale","tag","LanguageSub","onLocaleChange","t","useTranslation","current","handleFocus","event","_a","handleKeyDownCapture","target","DropdownMenu","escapeEvent","LocalePicker","HeaderSettings","forwardRef","props","ref","align","size","disabled","initialLocaleFromHtmlLang","followHtmlLang","className","id","rest","theme","useTheme","setLocaleI18n","useLocale","useInitialLocale","onLocaleChangeRef","useRef","forwardedRef","useImperativeHandle","isPhone","useMediaQuery","direction","useDocumentDirection","phoneView","setPhoneView","useState","view","panelRef","languageRowRef","appearanceRowRef","returnFocusRef","activationRef","useIsomorphicLayoutEffect","_b","_d","_c","section","row","_e","handlePhoneRowKeyDown","forwardKey","goBack","handlePhoneKeyDown","setLocaleWithPersistence","useCallback","next","persistLocalePreference","setLocaleRef","localeRef","themeRef","agentHandle","useMemo","previous","reportLocaleChange","useAgentRegistration","accessibleChecked","edgeMargin","useLengthTokenPx","languageLabel","appearanceLabel","currentLocale","appearanceOptions","backLabel","open","IconButton","Settings","Button","ArrowLeft","Fragment","option","ChevronRight"],"mappings":";;;;;;;;;;;;;;;;;;;AAOO,MAAMA,KAA0D;AAAA,EACrE,IAAI;AAAA;AAAA;AAAA,EAGJ,cAAc,CAAC,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ1B,OAAO;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACC,MAAWA,EAAO,UAAA;AAAA,IAAU;AAAA,IAErC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,MACF,MAAM,CAACA,MAAWA,EAAO,SAAA;AAAA,IAAS;AAAA,IAEpC,eAAe;AAAA,MACb,MAAM;AAAA,MACN,gBAAgB;AAAA,MAChB,aACE;AAAA,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