@mieweb/ui 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/MIGRATION.md +112 -0
  2. package/dist/{Animated-Cs-naa2g.d.cts → Animated-XmH6k8pZ.d.cts} +16 -3
  3. package/dist/{Animated-Cs-naa2g.d.ts → Animated-XmH6k8pZ.d.ts} +16 -3
  4. package/dist/{chunk-XUVEF2RQ.js → chunk-24SEAAOH.js} +2 -2
  5. package/dist/{chunk-XUVEF2RQ.js.map → chunk-24SEAAOH.js.map} +1 -1
  6. package/dist/{chunk-FUFBRKOG.cjs → chunk-2WBPNXO2.cjs} +21 -21
  7. package/dist/{chunk-FUFBRKOG.cjs.map → chunk-2WBPNXO2.cjs.map} +1 -1
  8. package/dist/{chunk-IUDY6S7I.cjs → chunk-37UZHCLM.cjs} +35 -14
  9. package/dist/chunk-37UZHCLM.cjs.map +1 -0
  10. package/dist/{chunk-L52N6BEN.cjs → chunk-AUOTJQGO.cjs} +7 -7
  11. package/dist/{chunk-L52N6BEN.cjs.map → chunk-AUOTJQGO.cjs.map} +1 -1
  12. package/dist/{chunk-6XDPJWSC.cjs → chunk-E7G22IQM.cjs} +32 -28
  13. package/dist/chunk-E7G22IQM.cjs.map +1 -0
  14. package/dist/chunk-IIFQ6BSJ.js +1888 -0
  15. package/dist/chunk-IIFQ6BSJ.js.map +1 -0
  16. package/dist/{chunk-ONNY7UO4.js → chunk-JDJQTKTX.js} +3 -3
  17. package/dist/{chunk-ONNY7UO4.js.map → chunk-JDJQTKTX.js.map} +1 -1
  18. package/dist/{chunk-BJKAVWED.js → chunk-MBWF36DJ.js} +35 -14
  19. package/dist/chunk-MBWF36DJ.js.map +1 -0
  20. package/dist/chunk-NV2CWBI2.cjs +290 -0
  21. package/dist/chunk-NV2CWBI2.cjs.map +1 -0
  22. package/dist/{chunk-FQBTGS3E.cjs → chunk-OFUKTVBN.cjs} +363 -285
  23. package/dist/chunk-OFUKTVBN.cjs.map +1 -0
  24. package/dist/{chunk-7KN6J7XV.cjs → chunk-OMAACCFW.cjs} +7 -7
  25. package/dist/{chunk-7KN6J7XV.cjs.map → chunk-OMAACCFW.cjs.map} +1 -1
  26. package/dist/chunk-OYQ7GYAA.cjs +1921 -0
  27. package/dist/chunk-OYQ7GYAA.cjs.map +1 -0
  28. package/dist/{chunk-YJP6DUFO.cjs → chunk-PKD3JLS2.cjs} +6 -6
  29. package/dist/{chunk-YJP6DUFO.cjs.map → chunk-PKD3JLS2.cjs.map} +1 -1
  30. package/dist/{chunk-CXDMZT45.cjs → chunk-PY7XAG4D.cjs} +27 -4
  31. package/dist/chunk-PY7XAG4D.cjs.map +1 -0
  32. package/dist/{chunk-5H7SAEQO.js → chunk-QKFJDQEK.js} +3 -3
  33. package/dist/{chunk-5H7SAEQO.js.map → chunk-QKFJDQEK.js.map} +1 -1
  34. package/dist/{chunk-XJTFZLWH.cjs → chunk-QO6PRHDX.cjs} +2 -2
  35. package/dist/{chunk-XJTFZLWH.cjs.map → chunk-QO6PRHDX.cjs.map} +1 -1
  36. package/dist/{chunk-OHDIJOGG.js → chunk-RD3JDFYJ.js} +3 -3
  37. package/dist/{chunk-OHDIJOGG.js.map → chunk-RD3JDFYJ.js.map} +1 -1
  38. package/dist/{chunk-4SM3I7WE.cjs → chunk-RXPEZXAB.cjs} +67 -38
  39. package/dist/chunk-RXPEZXAB.cjs.map +1 -0
  40. package/dist/{chunk-VTR2KGLY.cjs → chunk-S3BCHPXT.cjs} +9 -9
  41. package/dist/{chunk-VTR2KGLY.cjs.map → chunk-S3BCHPXT.cjs.map} +1 -1
  42. package/dist/{chunk-KU3XRHWA.js → chunk-TZX76ZNZ.js} +67 -38
  43. package/dist/chunk-TZX76ZNZ.js.map +1 -0
  44. package/dist/{chunk-MXQ7J4BB.js → chunk-VSVGMMNO.js} +361 -284
  45. package/dist/chunk-VSVGMMNO.js.map +1 -0
  46. package/dist/{chunk-Q7G56ZIO.js → chunk-WUBMDOTG.js} +3 -3
  47. package/dist/{chunk-Q7G56ZIO.js.map → chunk-WUBMDOTG.js.map} +1 -1
  48. package/dist/{chunk-DGRXAIWK.js → chunk-X5YM3KXY.js} +27 -4
  49. package/dist/chunk-X5YM3KXY.js.map +1 -0
  50. package/dist/chunk-XCP454Q6.js +263 -0
  51. package/dist/chunk-XCP454Q6.js.map +1 -0
  52. package/dist/{chunk-I3DQXUSC.js → chunk-Y6DFMDMH.js} +3 -3
  53. package/dist/{chunk-I3DQXUSC.js.map → chunk-Y6DFMDMH.js.map} +1 -1
  54. package/dist/{chunk-ODYQYLO2.js → chunk-YSEMAI4I.js} +8 -4
  55. package/dist/chunk-YSEMAI4I.js.map +1 -0
  56. package/dist/components/AlertDialog/index.cjs +4 -4
  57. package/dist/components/AlertDialog/index.js +3 -3
  58. package/dist/components/Collapsible/index.cjs +6 -4
  59. package/dist/components/Collapsible/index.js +3 -1
  60. package/dist/components/Dropdown/index.cjs +9 -8
  61. package/dist/components/Dropdown/index.js +2 -1
  62. package/dist/components/KeyboardShortcutsOverlay/index.cjs +5 -5
  63. package/dist/components/KeyboardShortcutsOverlay/index.js +3 -3
  64. package/dist/components/MediaEditor/index.cjs +8 -8
  65. package/dist/components/MediaEditor/index.js +3 -3
  66. package/dist/components/Modal/index.cjs +10 -10
  67. package/dist/components/Modal/index.js +2 -2
  68. package/dist/components/RichTextEditor/index.cjs +6 -5
  69. package/dist/components/RichTextEditor/index.js +3 -2
  70. package/dist/components/SuperChat/index.cjs +40 -17
  71. package/dist/components/SuperChat/index.cjs.map +1 -1
  72. package/dist/components/SuperChat/index.d.cts +20 -7
  73. package/dist/components/SuperChat/index.d.ts +20 -7
  74. package/dist/components/SuperChat/index.js +35 -12
  75. package/dist/components/SuperChat/index.js.map +1 -1
  76. package/dist/components/SuperChat/plugins/index.cjs +10 -3
  77. package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
  78. package/dist/components/SuperChat/plugins/index.d.cts +3 -3
  79. package/dist/components/SuperChat/plugins/index.d.ts +3 -3
  80. package/dist/components/SuperChat/plugins/index.js +9 -2
  81. package/dist/components/SuperChat/plugins/index.js.map +1 -1
  82. package/dist/esheet.cjs +6 -6
  83. package/dist/esheet.js +3 -3
  84. package/dist/hooks/index.cjs +13 -13
  85. package/dist/hooks/index.js +1 -1
  86. package/dist/index.cjs +720 -1671
  87. package/dist/index.cjs.map +1 -1
  88. package/dist/index.d.cts +347 -347
  89. package/dist/index.d.ts +347 -347
  90. package/dist/index.js +459 -1405
  91. package/dist/index.js.map +1 -1
  92. package/dist/motion.cjs +7 -7
  93. package/dist/motion.d.cts +1 -1
  94. package/dist/motion.d.ts +1 -1
  95. package/dist/motion.js +2 -2
  96. package/dist/styles.css +1 -1
  97. package/dist/tailwind-preset.cjs +4 -4
  98. package/dist/tailwind-preset.js +1 -1
  99. package/dist/{types-DZDroUW8.d.cts → types-B97JNRNQ.d.cts} +1 -1
  100. package/dist/{types-B2RLmdVd.d.ts → types-CnPEwzlp.d.cts} +6 -2
  101. package/dist/{types-B2RLmdVd.d.cts → types-CnPEwzlp.d.ts} +6 -2
  102. package/dist/{types-9vK_YdEb.d.ts → types-gZXrfLj6.d.ts} +1 -1
  103. package/package.json +2 -1
  104. package/dist/chunk-4SM3I7WE.cjs.map +0 -1
  105. package/dist/chunk-5BVFVXHN.cjs +0 -1244
  106. package/dist/chunk-5BVFVXHN.cjs.map +0 -1
  107. package/dist/chunk-6XDPJWSC.cjs.map +0 -1
  108. package/dist/chunk-BJKAVWED.js.map +0 -1
  109. package/dist/chunk-BN75TLUN.cjs +0 -163
  110. package/dist/chunk-BN75TLUN.cjs.map +0 -1
  111. package/dist/chunk-CXDMZT45.cjs.map +0 -1
  112. package/dist/chunk-DGRXAIWK.js.map +0 -1
  113. package/dist/chunk-FQBTGS3E.cjs.map +0 -1
  114. package/dist/chunk-IUDY6S7I.cjs.map +0 -1
  115. package/dist/chunk-KU3XRHWA.js.map +0 -1
  116. package/dist/chunk-MXQ7J4BB.js.map +0 -1
  117. package/dist/chunk-O6GJ4IYS.js +0 -1210
  118. package/dist/chunk-O6GJ4IYS.js.map +0 -1
  119. package/dist/chunk-ODYQYLO2.js.map +0 -1
  120. package/dist/chunk-WYMO3IIK.js +0 -136
  121. package/dist/chunk-WYMO3IIK.js.map +0 -1
package/dist/index.js CHANGED
@@ -27,13 +27,13 @@ import { Spinner, SpinnerWithLabel } from './chunk-UA7E7PDS.js';
27
27
  export { FullPageSpinner, Spinner, SpinnerWithLabel, spinnerVariants } from './chunk-UA7E7PDS.js';
28
28
  import { SparklesIcon, RefreshIcon, CloseIcon, AIMessageDisplay } from './chunk-22CYDCXA.js';
29
29
  export { AILogoIcon, AIMessageDisplay, AITypingIndicator, ChatBubble, ChevronIcon, CloseIcon, CollapsiblePill, MCPToolCallDisplay, MessageAvatar, RefreshIcon, ResourceLink, SendIcon, SparklesIcon, SpinnerIcon, ToolStatusIcon, getToolIcon } from './chunk-22CYDCXA.js';
30
- import { EmptyState } from './chunk-MXQ7J4BB.js';
31
- export { AttachmentPreview, ConversationHeader, ConversationListItem, ConversationListSkeleton, DateSeparator, EmptyState, LightboxModal, LoadMoreButton, MessageBubble, MessageList, MessageStatusIcon, MessageThread, MessagingSplitView, ReadReceiptIndicator, SkeletonMessage, TypingIndicator, bubbleVariants, formatDateLabel, formatFileSize, formatLastSeen, getConversationSubtitle, getConversationTitle, groupMessagesByDate, headerVariants, isSameSenderGroup, useMessageScroll, useMessages, useReadReceipts, useTypingIndicator } from './chunk-MXQ7J4BB.js';
32
- import { useMentionAutocomplete, validateFile, getFileType, generateAttachmentId, AttachmentPreviewItem, MentionMenu, DragDropZone, MessageComposer } from './chunk-O6GJ4IYS.js';
33
- export { AttachmentPicker, AttachmentPreviewItem, CameraButton, CharacterCounter, DragDropZone, MessageComposer, SendButton, generateAttachmentId, getFileType, sendButtonVariants, validateFile } from './chunk-O6GJ4IYS.js';
30
+ import { useTypingEmulation, EmptyState } from './chunk-VSVGMMNO.js';
31
+ export { AttachmentPreview, ConversationHeader, ConversationListItem, ConversationListSkeleton, DateSeparator, EmptyState, LightboxModal, LoadMoreButton, MessageBubble, MessageList, MessageStatusIcon, MessageThread, MessagingSplitView, ReadReceiptIndicator, SkeletonMessage, TypingIndicator, bubbleVariants, formatDateLabel, formatFileSize, formatLastSeen, getConversationSubtitle, getConversationTitle, groupMessagesByDate, headerVariants, isSameSenderGroup, useMessageScroll, useMessages, useReadReceipts, useTypingEmulation, useTypingIndicator } from './chunk-VSVGMMNO.js';
32
+ import { notifyComposerMigrationOnce, ChatComposer, DEFAULT_MAX_FILE_SIZE, DEFAULT_ACCEPTED_FILE_TYPES } from './chunk-IIFQ6BSJ.js';
33
+ export { AttachmentPicker, AttachmentPreviewItem, CameraButton, ChatComposer, ComposerModelSelector, DragDropZone, generateAttachmentId, getFileType, validateFile } from './chunk-IIFQ6BSJ.js';
34
34
  import { RecordButton } from './chunk-VNWJTCBQ.js';
35
35
  export { RecordButton, formatDuration, recordButtonVariants } from './chunk-VNWJTCBQ.js';
36
- export { RichTextEditor, convertAngleBracketsToMustache, processDictation } from './chunk-5H7SAEQO.js';
36
+ export { RichTextEditor, convertAngleBracketsToMustache, processDictation } from './chunk-QKFJDQEK.js';
37
37
  export { DateButton, DatePicker, RadioOption, SchedulePicker, TimeButton, TimePicker, dateButtonVariants, radioOptionVariants, timeButtonVariants } from './chunk-23AYDOCH.js';
38
38
  export { ScrollArea, scrollAreaVariants } from './chunk-HS25RPDW.js';
39
39
  export { SectionSpyNav } from './chunk-3RB35GYK.js';
@@ -46,18 +46,18 @@ export { QuickAction, QuickActionGroup, QuickActionIcons, quickActionIconVariant
46
46
  export { ReadingProgressBar } from './chunk-WKSUL2ZN.js';
47
47
  export { FreshnessBadge, FreshnessDot, daysSince, freshnessLevel } from './chunk-HQ3XPCHG.js';
48
48
  export { GlossaryTooltip } from './chunk-L5W7TJQ5.js';
49
- export { Kbd, KeyboardShortcutsOverlay } from './chunk-I3DQXUSC.js';
49
+ export { Kbd, KeyboardShortcutsOverlay } from './chunk-Y6DFMDMH.js';
50
50
  export { CodeBlock, MarkdownRenderer, highlightCode, useMarkdown } from './chunk-D25WH7MH.js';
51
51
  export { CsvBlock } from './chunk-NHN6A3ZO.js';
52
52
  export { HtmlPreviewBlock } from './chunk-EG7XFZ3W.js';
53
53
  export { MermaidBlock } from './chunk-ZB54MTMQ.js';
54
54
  export { SurveyBlock } from './chunk-OSPTA4UR.js';
55
55
  export { FenceBlock } from './chunk-CK3KLRNF.js';
56
- export { FillerWordsModal, MediaEditor, SilenceSettingsModal, SpeedMarkerMenu, WordEditorModal } from './chunk-ONNY7UO4.js';
56
+ export { FillerWordsModal, MediaEditor, SilenceSettingsModal, SpeedMarkerMenu, WordEditorModal } from './chunk-JDJQTKTX.js';
57
57
  export { Slider, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants } from './chunk-2BPIVWAK.js';
58
58
  import './chunk-RISZWWEQ.js';
59
59
  export { MediaPlayer, inferMediaKind, mediaPlayerVariants } from './chunk-5WOB4UBD.js';
60
- export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './chunk-BJKAVWED.js';
60
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './chunk-MBWF36DJ.js';
61
61
  export { CopyButton } from './chunk-5QZ73PZC.js';
62
62
  import { CountryDropdownBase } from './chunk-QAKASRE6.js';
63
63
  export { CountryCodeDropdown, formatE164, validatePhoneNumber } from './chunk-QAKASRE6.js';
@@ -65,8 +65,8 @@ export { CustomizableDashboard, DashboardCustomizePanel, consolidateColumns, mer
65
65
  import { Switch, switchThumbVariants, switchTrackVariants } from './chunk-AQ564XO7.js';
66
66
  export { Switch, switchThumbVariants, switchTrackVariants } from './chunk-AQ564XO7.js';
67
67
  export { Sheet, SheetBody, SheetClose, SheetDescription, SheetFooter, SheetHeader, SheetTitle, sheetContentVariants, sheetOverlayVariants } from './chunk-ON4JULCA.js';
68
- import { Dropdown, DropdownItem, DropdownSeparator, DropdownContent, DropdownHeader } from './chunk-KU3XRHWA.js';
69
- export { Dropdown, DropdownContent, DropdownHeader, DropdownItem, DropdownLabel, DropdownSeparator, DropdownSubmenu } from './chunk-KU3XRHWA.js';
68
+ import { Dropdown, DropdownItem, DropdownSeparator, DropdownContent, DropdownHeader } from './chunk-TZX76ZNZ.js';
69
+ export { Dropdown, DropdownContent, DropdownHeader, DropdownItem, DropdownLabel, DropdownSeparator, DropdownSubmenu } from './chunk-TZX76ZNZ.js';
70
70
  export { FilterSummaryBar } from './chunk-6SCQ7FKT.js';
71
71
  export { FloatingWindow, MinimizedWindow } from './chunk-PYHFVYVZ.js';
72
72
  import { Avatar } from './chunk-HZ4MBUC3.js';
@@ -81,19 +81,19 @@ export { CollabStatus, defaultCollabStatusLabels, useYjsCollabStatus } from './c
81
81
  import './chunk-7XUN3OQT.js';
82
82
  export { isHtmlEmpty, stripHtmlTags } from './chunk-ERLPVXOV.js';
83
83
  export { formatPhoneNumber, isPhoneNumberEmpty, isValidPhoneNumber, unformatPhoneNumber } from './chunk-ZVPJ2MH6.js';
84
- export { miewebUIPreset, miewebUISafelist } from './chunk-DGRXAIWK.js';
84
+ export { miewebUIPreset, miewebUISafelist } from './chunk-X5YM3KXY.js';
85
85
  export { Accordion } from './chunk-KRU6IGV7.js';
86
86
  import { Alert, AlertTitle, AlertDescription } from './chunk-3JWAABYI.js';
87
87
  export { Alert, AlertDescription, AlertTitle, alertVariants } from './chunk-3JWAABYI.js';
88
- import { AlertDialog } from './chunk-OHDIJOGG.js';
89
- export { AlertDialog } from './chunk-OHDIJOGG.js';
88
+ import { AlertDialog } from './chunk-RD3JDFYJ.js';
89
+ export { AlertDialog } from './chunk-RD3JDFYJ.js';
90
90
  export { AudioPlayer, ProgressBar, audioPlayerVariants, formatTime as formatAudioTime, playButtonVariants } from './chunk-VVDE4CHU.js';
91
91
  export { AudioRecorder, audioRecorderVariants, controlButtonVariants, formatTime, waveformContainerVariants } from './chunk-2DW4PUJD.js';
92
92
  export { Autocomplete } from './chunk-QAQOCS2J.js';
93
93
  import { evaluateDue, completedKeys, normalizeOrders } from './chunk-Y5KEFV5O.js';
94
94
  export { buildChartOrderRows, buildEncounterOrderRows, dueForOrder, evaluateDue, evaluateProgram, isApplicable } from './chunk-Y5KEFV5O.js';
95
- import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-ODYQYLO2.js';
96
- export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-ODYQYLO2.js';
95
+ import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-YSEMAI4I.js';
96
+ export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-YSEMAI4I.js';
97
97
  import { Textarea } from './chunk-H3YO5GBM.js';
98
98
  export { Textarea, textareaVariants } from './chunk-H3YO5GBM.js';
99
99
  import { Tooltip } from './chunk-MUIDWFYJ.js';
@@ -110,23 +110,23 @@ import { Card, CardHeader, CardContent, CardTitle } from './chunk-QYSUYB3S.js';
110
110
  export { Card, CardActions, CardBadge, CardCollapsible, CardContent, CardDescription, CardDivider, CardFooter, CardHeader, CardMedia, CardStat, CardTitle, cardAccentVariants, cardVariants } from './chunk-QYSUYB3S.js';
111
111
  import { dateToDisplayFormat, isValidDate, displayFormatToDateString } from './chunk-RC2YMOMS.js';
112
112
  export { calculateAge, dateToDisplayFormat, displayFormatToDateString, formatDateValue, isDateEmpty, isDateInFuture, isDateInPast, isValidDate, isValidDrivingAge, parseDateValue } from './chunk-RC2YMOMS.js';
113
- import { Modal, ModalHeader, ModalTitle, ModalClose, ModalBody, ModalFooter } from './chunk-Q7G56ZIO.js';
114
- export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from './chunk-Q7G56ZIO.js';
113
+ import { Modal, ModalHeader, ModalTitle, ModalClose, ModalBody, ModalFooter } from './chunk-WUBMDOTG.js';
114
+ export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from './chunk-WUBMDOTG.js';
115
115
  import './chunk-6NZXWKUE.js';
116
116
  import { Input, inputVariants } from './chunk-3IMM2PM4.js';
117
117
  export { Input, RequiredMark, floatingGroupLabelVariants, floatingGroupVariants, floatingLabelVariants, inputVariants } from './chunk-3IMM2PM4.js';
118
- import { Plus, GripVertical, RefreshCw, Pencil, AlertCircle, ArrowLeft, Users, FilePlus, CheckCircle, ChevronDown, AlertTriangle, Paperclip, Mic, Square, Loader2, ArrowUp, Check, Bot, ChevronUp, Clock, FileText, ClipboardList, Stethoscope, Mail, Phone, ClipboardCheck, Eye, Info, Link, History, StickyNote, ExternalLink, MoreVertical, Trash2, Send, Scan, TestTube2, Pill, Share, User, Download, ChevronRight as ChevronRight$1, Calendar, Printer, ClipboardPlus, FileCheck, Wheat, Bell, FileHeart, HeartPulse, HelpCircle, MoreHorizontal, Upload as Upload$1, Camera, X as X$1, ScanLine, Image } from './chunk-BKSPDTX4.js';
118
+ import { Plus, GripVertical, RefreshCw, Pencil, Trash2, AlertCircle, ArrowLeft, Users, FilePlus, CheckCircle, ChevronDown, Clock, FileText, ClipboardList, Stethoscope, Mail, Phone, ClipboardCheck, Eye, Info, Link, ChevronUp, History, StickyNote, ExternalLink, MoreVertical, Send, Scan, TestTube2, Pill, Share, User, Download, ChevronRight, Calendar, Printer, ClipboardPlus, FileCheck, Wheat, Bell, FileHeart, HeartPulse, Paperclip, HelpCircle, MoreHorizontal, AlertTriangle, Upload as Upload$1, Camera, Check as Check$1, X as X$1, ScanLine, Image } from './chunk-BKSPDTX4.js';
119
119
  export { Accessibility as AccessibilityIcon, Activity as ActivityIcon, AlertCircle as AlertCircleIcon, AlertTriangle as AlertTriangleIcon, Wheat as AllergyIcon, WheatOff as AllergyOffIcon, Ambulance as AmbulanceIcon, ArrowLeft as ArrowLeftIcon, ArrowRight as ArrowRightIcon, ArrowUpDown as ArrowUpDownIcon, ArrowUp as ArrowUpIcon, AtSign as AtSignIcon, Baby as BabyIcon, BadgeAlert as BadgeAlertIcon, BadgeCheck as BadgeCheckIcon, BadgeMinus as BadgeMinusIcon, BadgePlus as BadgePlusIcon, BadgeX as BadgeXIcon, Ban as BanIcon, Bandage as BandageIcon, BedDouble as BedDoubleIcon, Bed as BedIcon, BedSingle as BedSingleIcon, Bell as BellIcon, BellOff as BellOffIcon, Biohazard as BiohazardIcon, Bone as BoneIcon, BookOpenCheck as BookOpenCheckIcon, BookOpen as BookOpenIcon, Bookmark as BookmarkIcon, Bot as BotIcon, Brain as BrainIcon, Briefcase as BriefcaseIcon, BriefcaseMedical as BriefcaseMedicalIcon, Building as BuildingIcon, CalendarCheck as CalendarCheckIcon, Calendar as CalendarIcon, Camera as CameraIcon, Cannabis as CannabisIcon, BarChart3 as ChartIcon, CheckCircle as CheckCircleIcon, Check as CheckIcon, ChevronDown as ChevronDownIcon, ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, ChevronUp as ChevronUpIcon, Cigarette as CigaretteIcon, CigaretteOff as CigaretteOffIcon, CircleDotDashed as CircleDotDashedIcon, CircleDot as CircleDotIcon, CircleUser as CircleUserIcon, ClipboardCheck as ClipboardCheckIcon, Clipboard as ClipboardIcon, ClipboardList as ClipboardListIcon, ClipboardPlus as ClipboardPlusIcon, Clock as ClockIcon, Cog as CogIcon, Columns as ColumnsIcon, Copy as CopyIcon, CreditCard as CreditCardIcon, Cross as CrossIcon, Dna as DnaIcon, DollarSign as DollarSignIcon, Download as DownloadIcon, Droplet as DropletIcon, Droplets as DropletsIcon, Ear as EarIcon, ExternalLink as ExternalLinkIcon, Eye as EyeIcon, EyeOff as EyeOffIcon, FileCheck2 as FileCheck2Icon, FileCheck as FileCheckIcon, FileHeart as FileHeartIcon, File as FileIcon, FilePlus2 as FilePlus2Icon, FilePlus as FilePlusIcon, FileText as FileTextIcon, Filter as FilterIcon, Fingerprint as FingerprintIcon, Flag as FlagIcon, FlaskConical as FlaskIcon, FlaskRound as FlaskRoundIcon, Folder as FolderIcon, FolderOpen as FolderOpenIcon, Footprints as FootprintsIcon, Glasses as GlassesIcon, Globe as GlobeIcon, LayoutGrid as GridIcon, GripVertical as GripVerticalIcon, Hand as HandIcon, HandMetal as HandMetalIcon, Hash as HashIcon, Heart as HeartIcon, HeartOff as HeartOffIcon, HeartPulse as HeartPulseIcon, HelpCircle as HelpCircleIcon, History as HistoryIcon, Home as HomeIcon, Hospital as HospitalIcon, Image as ImageIcon, Info as InfoIcon, Key as KeyIcon, Link as LinkIcon, List as ListIcon, Loader2 as LoaderIcon, Lock as LockIcon, LogIn as LogInIcon, LogOut as LogOutIcon, Mail as MailIcon, MapPin as MapPinIcon, Maximize as MaximizeIcon, Menu as MenuIcon, MessageSquare as MessageIcon, Mic as MicIcon, Microscope as MicroscopeIcon, Minimize as MinimizeIcon, Minus as MinusIcon, Monitor as MonitorIcon, Moon as MoonIcon, MoreHorizontal as MoreHorizontalIcon, MoreVertical as MoreVerticalIcon, NotebookPen as NotebookPenIcon, Palette as PaletteIcon, Paperclip as PaperclipIcon, CircleUserRound as PatientIcon, Pencil as PencilIcon, UserRound as PersonIcon, Phone as PhoneIcon, PieChart as PieChartIcon, Pill as PillIcon, Plus as PlusIcon, Printer as PrinterIcon, Radiation as RadiationIcon, Ruler as RulerIcon, Save as SaveIcon, Scale as ScaleIcon, Scaling as ScalingIcon, ScanEye as ScanEyeIcon, Scan as ScanIcon, ScanLine as ScanLineIcon, Search as SearchIcon, Settings as SettingsIcon, Share as ShareIcon, ShieldCheck as ShieldCheckIcon, Shield as ShieldIcon, ShieldPlus as ShieldPlusIcon, Sliders as SlidersIcon, Sparkle as SparkleIcon, Star as StarIcon, Stethoscope as StethoscopeIcon, StickyNote as StickyNoteIcon, Square as StopIcon, Sun as SunIcon, Syringe as SyringeIcon, Table as TableIcon, Tablets as TabletsIcon, Tag as TagIcon, TestTube2 as TestTubeIcon, TestTubes as TestTubesIcon, Thermometer as ThermometerIcon, ThermometerSun as ThermometerSunIcon, ThumbsDown as ThumbsDownIcon, ThumbsUp as ThumbsUpIcon, Timer as TimerIcon, Trash2 as TrashIcon, TrendingDown as TrendingDownIcon, TrendingUp as TrendingUpIcon, Truck as TruckIcon, Unlock as UnlockIcon, Upload as UploadIcon, UserCheck as UserCheckIcon, User as UserIcon, UserMinus as UserMinusIcon, UserPlus as UserPlusIcon, UserRoundCheck as UserRoundCheckIcon, UserRoundMinus as UserRoundMinusIcon, UserRoundPlus as UserRoundPlusIcon, UserRoundX as UserRoundXIcon, Users as UsersIcon, Weight as WeightIcon, Wrench as WrenchIcon, XCircle as XCircleIcon, X2 as XIcon, Zap as ZapIcon } from './chunk-BKSPDTX4.js';
120
120
  import { Badge } from './chunk-BMSG4NBH.js';
121
121
  export { Badge, badgeVariants } from './chunk-BMSG4NBH.js';
122
122
  import { Button, buttonVariants } from './chunk-KREUYVMZ.js';
123
123
  export { Button, buttonVariants } from './chunk-KREUYVMZ.js';
124
- import { AnimatedPresence, Animated } from './chunk-WYMO3IIK.js';
125
- export { Animated, AnimatedPresence, motionPresets, useMotionRuntime } from './chunk-WYMO3IIK.js';
124
+ import { AnimatedPresence, Animated } from './chunk-XCP454Q6.js';
125
+ export { Animated, AnimatedPresence, motionPresets, useMotionRuntime } from './chunk-XCP454Q6.js';
126
126
  import { cn } from './chunk-TQONQSJO.js';
127
127
  export { cn, miewebUITwMergeConflicts } from './chunk-TQONQSJO.js';
128
- import { useCommandK, useIsMobile, useMediaQuery, useDirection } from './chunk-XUVEF2RQ.js';
129
- export { RTL_LOCALES, isRtlLocale, useCommandK, useDirection, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useMediaQuery } from './chunk-XUVEF2RQ.js';
128
+ import { useDirection, useCommandK, useIsMobile, useMediaQuery } from './chunk-24SEAAOH.js';
129
+ export { RTL_LOCALES, isRtlLocale, useCommandK, useDirection, useIsDesktop, useIsLargeDesktop, useIsMobile, useIsMobileOrTablet, useIsSmallTablet, useIsTablet, useKeyboardShortcut, useMediaQuery } from './chunk-24SEAAOH.js';
130
130
  export { useTheme } from './chunk-KJZNEVYM.js';
131
131
  import { useScrollSpy } from './chunk-WBGUYSWY.js';
132
132
  export { useScrollSpy } from './chunk-WBGUYSWY.js';
@@ -153,7 +153,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
153
153
  import { cva } from 'class-variance-authority';
154
154
  import * as ReactDOM from 'react-dom';
155
155
  import { createPortal } from 'react-dom';
156
- import { FileUp, X, AlertCircle as AlertCircle$1, ChevronUp as ChevronUp$1, Check as Check$1, ChevronRight, ChevronLeft, Calendar as Calendar$1, ChevronDown as ChevronDown$1, Maximize2, Minimize2, FolderUp, Upload, Edit2, Phone as Phone$1, Mail as Mail$1, Clock as Clock$1, MapPin, Shield, Building2, SlidersHorizontal, Trash2 as Trash2$1, Pencil as Pencil$1, Plus as Plus$1, Link as Link$1, AlertTriangle as AlertTriangle$1, RefreshCw as RefreshCw$1 } from 'lucide-react';
156
+ import { FileUp, X, AlertCircle as AlertCircle$1, Calendar as Calendar$1, ChevronLeft, ChevronRight as ChevronRight$1, ChevronDown as ChevronDown$1, Maximize2, Minimize2, FolderUp, Upload, Edit2, Check, ChevronUp as ChevronUp$1, Phone as Phone$1, Mail as Mail$1, Clock as Clock$1, MapPin, Shield, Building2, SlidersHorizontal, Trash2 as Trash2$1, Pencil as Pencil$1, Plus as Plus$1, Link as Link$1, AlertTriangle as AlertTriangle$1, RefreshCw as RefreshCw$1 } from 'lucide-react';
157
157
 
158
158
  var SEX_OPTIONS = [
159
159
  { value: "F", label: "Female" },
@@ -1464,6 +1464,7 @@ var chatVariants = cva("flex flex-col", {
1464
1464
  size: "full"
1465
1465
  }
1466
1466
  });
1467
+ var normalizeLegacySlot = (node) => node || void 0;
1467
1468
  function AIChat({
1468
1469
  session,
1469
1470
  messages: messagesProp,
@@ -1493,6 +1494,9 @@ function AIChat({
1493
1494
  renderMessageFooter
1494
1495
  }) {
1495
1496
  const messagesContainerRef = React13.useRef(null);
1497
+ React13.useEffect(() => {
1498
+ notifyComposerMigrationOnce("AIChat");
1499
+ }, []);
1496
1500
  const messages = React13.useMemo(
1497
1501
  () => session?.messages || messagesProp || [],
1498
1502
  [session?.messages, messagesProp]
@@ -1502,11 +1506,64 @@ function AIChat({
1502
1506
  const container = messagesContainerRef.current;
1503
1507
  if (container) container.scrollTop = container.scrollHeight;
1504
1508
  }, [messages]);
1505
- const handleSend = async (message) => {
1506
- if (message.content.trim() && onSendMessage) {
1507
- onSendMessage(message.content.trim());
1509
+ const {
1510
+ showAttachmentPicker,
1511
+ inputTrailing,
1512
+ onTypingStart,
1513
+ onTypingStop,
1514
+ value: hostValue,
1515
+ onValueChange: hostOnValueChange,
1516
+ onSend: hostOnSend,
1517
+ micSlot: hostMicSlot,
1518
+ ...composerRest
1519
+ } = composerProps ?? {};
1520
+ delete composerRest.showCameraButton;
1521
+ delete composerRest.variant;
1522
+ const hasInputTrailing = !!composerProps && "inputTrailing" in composerProps;
1523
+ const legacyAttachments = !!composerProps && "showAttachmentPicker" in composerProps ? showAttachmentPicker ?? true : false;
1524
+ const [draft, setDraft] = React13.useState("");
1525
+ const draftEpochRef = React13.useRef(0);
1526
+ const composerValue = hostValue ?? draft;
1527
+ const isHostControlled = hostValue !== void 0;
1528
+ const handleComposerValueChange = React13.useCallback(
1529
+ (value) => {
1530
+ draftEpochRef.current += 1;
1531
+ setDraft(value);
1532
+ if (isHostControlled) hostOnValueChange?.(value);
1533
+ },
1534
+ [isHostControlled, hostOnValueChange]
1535
+ );
1536
+ const { stopTyping } = useTypingEmulation({
1537
+ value: composerValue,
1538
+ onTypingStart,
1539
+ onTypingStop
1540
+ });
1541
+ const sendWithRestore = async (message, send) => {
1542
+ stopTyping();
1543
+ const epoch = draftEpochRef.current;
1544
+ try {
1545
+ await Promise.resolve(send(message));
1546
+ } catch (error) {
1547
+ if (draftEpochRef.current === epoch) {
1548
+ setDraft(message.content);
1549
+ if (isHostControlled) hostOnValueChange?.(message.content);
1550
+ }
1551
+ throw error;
1508
1552
  }
1509
1553
  };
1554
+ const handleSend = async (message) => {
1555
+ if (!onSendMessage) return;
1556
+ const content = message.content.trim();
1557
+ const attachments = message.attachments?.length ? message.attachments : void 0;
1558
+ if (!content && !attachments) return;
1559
+ await sendWithRestore(
1560
+ message,
1561
+ () => (
1562
+ // Keep the exact legacy call shape for text-only sends.
1563
+ attachments ? onSendMessage(content, attachments) : onSendMessage(content)
1564
+ )
1565
+ );
1566
+ };
1510
1567
  const handleSuggestionSelect = (action) => {
1511
1568
  if (onSuggestedAction) {
1512
1569
  onSuggestedAction(action);
@@ -1625,18 +1682,14 @@ function AIChat({
1625
1682
  onSelect: handleSuggestionSelect
1626
1683
  }
1627
1684
  ) }),
1628
- /* @__PURE__ */ jsx(
1629
- MessageComposer,
1685
+ /* @__PURE__ */ jsx("div", { "data-slot": "ai-chat-composer", className: "p-3", children: /* @__PURE__ */ jsx(
1686
+ ChatComposer,
1630
1687
  {
1631
- onSend: handleSend,
1688
+ onSend: hostOnSend ? (message) => sendWithRestore(message, hostOnSend) : handleSend,
1632
1689
  placeholder: inputPlaceholder,
1633
1690
  disabled: isGenerating,
1634
1691
  isSending: isGenerating,
1635
- showAttachmentPicker: false,
1636
- showCameraButton: false,
1637
- showCharacterCount: false,
1638
- variant: "minimal",
1639
- inputTrailing: talkToText ? /* @__PURE__ */ jsx(
1692
+ micSlot: hostMicSlot !== void 0 ? hostMicSlot : hasInputTrailing ? normalizeLegacySlot(inputTrailing) : talkToText ? /* @__PURE__ */ jsx(
1640
1693
  RecordButton,
1641
1694
  {
1642
1695
  variant: "ghost",
@@ -1648,9 +1701,16 @@ function AIChat({
1648
1701
  onRecordingComplete
1649
1702
  }
1650
1703
  ) : void 0,
1651
- ...composerProps
1704
+ ...composerRest,
1705
+ allowAttachments: composerRest.allowAttachments ?? legacyAttachments,
1706
+ maxLength: composerRest.maxLength ?? 1600,
1707
+ inputLabel: composerRest.inputLabel ?? "Message",
1708
+ acceptedFileTypes: composerRest.acceptedFileTypes ?? (legacyAttachments ? DEFAULT_ACCEPTED_FILE_TYPES : void 0),
1709
+ maxFileSize: composerRest.maxFileSize ?? (legacyAttachments ? DEFAULT_MAX_FILE_SIZE : void 0),
1710
+ value: composerValue,
1711
+ onValueChange: handleComposerValueChange
1652
1712
  }
1653
- )
1713
+ ) })
1654
1714
  ]
1655
1715
  }
1656
1716
  )
@@ -1909,7 +1969,6 @@ function Toast({
1909
1969
  className: cn(
1910
1970
  "flex items-start gap-3 rounded-lg border p-4 shadow-lg",
1911
1971
  "max-w-[420px] min-w-[300px]",
1912
- "animate-slide-in-right rtl:animate-slide-in-left",
1913
1972
  styles.container
1914
1973
  ),
1915
1974
  children: [
@@ -1954,17 +2013,27 @@ var positionStyles = {
1954
2013
  "bottom-left": "bottom-4 start-4 items-start",
1955
2014
  "bottom-right": "bottom-4 end-4 items-end"
1956
2015
  };
2016
+ function toastEdge(position, isRtl) {
2017
+ if (position === "top-center") return "top";
2018
+ if (position === "bottom-center") return "bottom";
2019
+ const isStart = position.endsWith("-start") || position.endsWith("-left");
2020
+ return isStart === isRtl ? "right" : "left";
2021
+ }
2022
+ var TOAST_FALLBACK_ANIMATION = "animate-slide-in-right rtl:animate-slide-in-left";
1957
2023
  function ToastContainer({
1958
2024
  toasts,
1959
2025
  position,
1960
2026
  onDismiss
1961
2027
  }) {
1962
2028
  const context = useOptionalToast();
2029
+ const containerRef = React13__default.useRef(null);
2030
+ const isRtl = useDirection(containerRef) === "rtl";
1963
2031
  const resolvedPosition = position ?? context?.position ?? "bottom-end";
1964
- if (toasts.length === 0) return null;
2032
+ const edge = toastEdge(resolvedPosition, isRtl);
1965
2033
  return /* @__PURE__ */ jsx(
1966
2034
  "div",
1967
2035
  {
2036
+ ref: containerRef,
1968
2037
  "data-slot": "toast-container",
1969
2038
  className: cn(
1970
2039
  "pointer-events-none fixed z-50 flex flex-col gap-2",
@@ -1972,533 +2041,21 @@ function ToastContainer({
1972
2041
  ),
1973
2042
  "aria-live": "polite",
1974
2043
  "aria-atomic": "true",
1975
- children: toasts.map((toast) => /* @__PURE__ */ jsx("div", { className: "pointer-events-auto", children: /* @__PURE__ */ jsx(Toast, { ...toast, onClose: () => onDismiss(toast.id) }) }, toast.id))
1976
- }
1977
- );
1978
- }
1979
- var MENU_OFFSET_PX = 6;
1980
- var MENU_MAX_HEIGHT_PX = 320;
1981
- function optionKey(option) {
1982
- return `${option.provider}\0${option.model}`;
1983
- }
1984
- function renderedOptionKey(option, index) {
1985
- return `${option.id ?? optionKey(option)}\0${index}`;
1986
- }
1987
- function groupByProvider(models) {
1988
- const groups = /* @__PURE__ */ new Map();
1989
- for (const model of models) {
1990
- const group = groups.get(model.provider);
1991
- if (group) {
1992
- group.push(model);
1993
- } else {
1994
- groups.set(model.provider, [model]);
1995
- }
1996
- }
1997
- return Array.from(groups, ([provider, options]) => ({ provider, options }));
1998
- }
1999
- function getProviderLabel(models, provider) {
2000
- return models.find((model) => model.provider === provider && model.providerLabel)?.providerLabel ?? provider;
2001
- }
2002
- function ComposerModelSelector({
2003
- models,
2004
- value,
2005
- providerFilter,
2006
- onProviderFilterChange,
2007
- onChange,
2008
- disabled = false,
2009
- variant = "default",
2010
- className,
2011
- boundaryRef,
2012
- placeholder = "Model",
2013
- anyLabel = "Any",
2014
- emptyLabel = "No models",
2015
- ariaLabel = "Model",
2016
- effortOptions,
2017
- effort = null,
2018
- defaultEffort,
2019
- onEffortChange,
2020
- effortLabel = "Effort",
2021
- effortHint,
2022
- defaultBadgeLabel = "Default",
2023
- backLabel = "Back"
2024
- }) {
2025
- const [open, setOpen] = React13.useState(false);
2026
- const [view, setView] = React13.useState("models");
2027
- const [effortHighlight, setEffortHighlight] = React13.useState(0);
2028
- const [internalProviderFilter, setInternalProviderFilter] = React13.useState(null);
2029
- const [highlightedIndex, setHighlightedIndex] = React13.useState(0);
2030
- const listRef = React13.useRef(null);
2031
- const effortListRef = React13.useRef(null);
2032
- const menuId = React13.useId();
2033
- const {
2034
- anchorRef: triggerRef,
2035
- floatingRef: menuRef,
2036
- style: menuStyle
2037
- } = useAnchoredPosition({
2038
- open,
2039
- placement: "top-start",
2040
- offset: MENU_OFFSET_PX,
2041
- matchMinWidth: true,
2042
- maxHeight: MENU_MAX_HEIGHT_PX,
2043
- allowFlip: false,
2044
- boundaryRef
2045
- });
2046
- const activeProviderFilter = providerFilter === void 0 ? internalProviderFilter : providerFilter;
2047
- const selectedKey = value ? optionKey(value) : null;
2048
- const selectedOption = models.find(
2049
- (model) => optionKey(model) === selectedKey
2050
- );
2051
- const providers = React13.useMemo(
2052
- () => Array.from(new Set(models.map((model) => model.provider))),
2053
- [models]
2054
- );
2055
- const providerLabels = React13.useMemo(
2056
- () => new Map(
2057
- providers.map((provider) => [
2058
- provider,
2059
- getProviderLabel(models, provider)
2060
- ])
2061
- ),
2062
- [models, providers]
2063
- );
2064
- const filteredModels = React13.useMemo(
2065
- () => activeProviderFilter === null ? models : models.filter((model) => model.provider === activeProviderFilter),
2066
- [activeProviderFilter, models]
2067
- );
2068
- const groupedModels = React13.useMemo(
2069
- () => groupByProvider(filteredModels),
2070
- [filteredModels]
2071
- );
2072
- const groupedRenderedModels = React13.useMemo(() => {
2073
- let index = 0;
2074
- return groupedModels.map((group) => ({
2075
- provider: group.provider,
2076
- options: group.options.map((option) => {
2077
- const rendered = {
2078
- option,
2079
- index,
2080
- key: renderedOptionKey(option, index)
2081
- };
2082
- index += 1;
2083
- return rendered;
2084
- })
2085
- }));
2086
- }, [groupedModels]);
2087
- const renderedModels = React13.useMemo(
2088
- () => groupedRenderedModels.flatMap((group) => group.options),
2089
- [groupedRenderedModels]
2090
- );
2091
- const getOptionId = React13.useCallback(
2092
- (index) => `${menuId}-option-${index}`,
2093
- [menuId]
2094
- );
2095
- const getEffortOptionId = React13.useCallback(
2096
- (index) => `${menuId}-effort-option-${index}`,
2097
- [menuId]
2098
- );
2099
- const activeOptionId = open && renderedModels[highlightedIndex] ? getOptionId(highlightedIndex) : void 0;
2100
- const selectedRenderedIndex = React13.useMemo(
2101
- () => selectedKey ? renderedModels.findIndex(
2102
- (renderedModel) => optionKey(renderedModel.option) === selectedKey
2103
- ) : -1,
2104
- [renderedModels, selectedKey]
2105
- );
2106
- const setProvider = React13.useCallback(
2107
- (provider) => {
2108
- if (providerFilter === void 0) {
2109
- setInternalProviderFilter(provider);
2110
- }
2111
- onProviderFilterChange?.(provider);
2112
- },
2113
- [onProviderFilterChange, providerFilter]
2114
- );
2115
- const close = React13.useCallback(
2116
- (restoreFocus = true) => {
2117
- setOpen(false);
2118
- if (restoreFocus) {
2119
- triggerRef.current?.focus({ preventScroll: true });
2120
- }
2121
- },
2122
- [triggerRef]
2123
- );
2124
- const selectModel = React13.useCallback(
2125
- (model) => {
2126
- onChange({ provider: model.provider, model: model.model });
2127
- close();
2128
- },
2129
- [close, onChange]
2130
- );
2131
- const efforts = React13.useMemo(() => effortOptions ?? [], [effortOptions]);
2132
- const activeEffortOptionId = open && efforts[effortHighlight] ? getEffortOptionId(effortHighlight) : void 0;
2133
- const selectedEffortOption = efforts.find(
2134
- (option) => option.value === effort
2135
- );
2136
- const selectEffort = React13.useCallback(
2137
- (value2) => {
2138
- onEffortChange?.(value2);
2139
- close();
2140
- },
2141
- [close, onEffortChange]
2142
- );
2143
- const handleEffortKeyDown = (event) => {
2144
- if (efforts.length === 0) return;
2145
- if (event.key === "ArrowDown") {
2146
- event.preventDefault();
2147
- setEffortHighlight((current) => (current + 1) % efforts.length);
2148
- }
2149
- if (event.key === "ArrowUp") {
2150
- event.preventDefault();
2151
- setEffortHighlight(
2152
- (current) => (current - 1 + efforts.length) % efforts.length
2153
- );
2154
- }
2155
- if (event.key === "Home") {
2156
- event.preventDefault();
2157
- setEffortHighlight(0);
2158
- }
2159
- if (event.key === "End") {
2160
- event.preventDefault();
2161
- setEffortHighlight(efforts.length - 1);
2162
- }
2163
- if (event.key === "ArrowLeft" || event.key === "Backspace") {
2164
- event.preventDefault();
2165
- setView("models");
2166
- }
2167
- if (event.key === "Enter" || event.key === " ") {
2168
- event.preventDefault();
2169
- const highlighted = efforts[effortHighlight];
2170
- if (highlighted) selectEffort(highlighted.value);
2044
+ children: /* @__PURE__ */ jsx(AnimatedPresence, { children: toasts.map((toast) => /* @__PURE__ */ jsx(
2045
+ Animated,
2046
+ {
2047
+ preset: "toast",
2048
+ mode: "presence",
2049
+ custom: edge,
2050
+ className: "pointer-events-auto",
2051
+ fallbackClassName: TOAST_FALLBACK_ANIMATION,
2052
+ children: /* @__PURE__ */ jsx(Toast, { ...toast, onClose: () => onDismiss(toast.id) })
2053
+ },
2054
+ toast.id
2055
+ )) })
2171
2056
  }
2172
- };
2173
- const outsideRefs = React13.useMemo(
2174
- () => [triggerRef, menuRef],
2175
- [triggerRef, menuRef]
2176
2057
  );
2177
- useClickOutside(outsideRefs, () => close(false), open);
2178
- useEscapeKey(close, open);
2179
- React13.useEffect(() => {
2180
- if (!open) return;
2181
- setHighlightedIndex(selectedRenderedIndex >= 0 ? selectedRenderedIndex : 0);
2182
- }, [activeProviderFilter, open, selectedRenderedIndex]);
2183
- React13.useEffect(() => {
2184
- if (!open) return;
2185
- setView("models");
2186
- }, [open]);
2187
- React13.useEffect(() => {
2188
- if (!open) return;
2189
- const current = efforts.findIndex((option) => option.value === effort);
2190
- setEffortHighlight(current >= 0 ? current : 0);
2191
- }, [effort, efforts, open]);
2192
- React13.useEffect(() => {
2193
- if (!open) return;
2194
- setHighlightedIndex(
2195
- (current) => Math.min(current, Math.max(renderedModels.length - 1, 0))
2196
- );
2197
- }, [open, renderedModels.length]);
2198
- React13.useEffect(() => {
2199
- if (!open) return;
2200
- requestAnimationFrame(() => {
2201
- const target = view === "effort" ? effortListRef.current : listRef.current;
2202
- target?.focus({ preventScroll: true });
2203
- });
2204
- }, [open, view]);
2205
- const handleTriggerKeyDown = (event) => {
2206
- if (event.key === "ArrowDown" || event.key === "ArrowUp") {
2207
- event.preventDefault();
2208
- setOpen(true);
2209
- }
2210
- };
2211
- const handleMenuKeyDown = (event) => {
2212
- if (renderedModels.length === 0) return;
2213
- if (event.key === "ArrowDown") {
2214
- event.preventDefault();
2215
- setHighlightedIndex((current) => (current + 1) % renderedModels.length);
2216
- }
2217
- if (event.key === "ArrowUp") {
2218
- event.preventDefault();
2219
- setHighlightedIndex(
2220
- (current) => (current - 1 + renderedModels.length) % renderedModels.length
2221
- );
2222
- }
2223
- if (event.key === "Home") {
2224
- event.preventDefault();
2225
- setHighlightedIndex(0);
2226
- }
2227
- if (event.key === "End") {
2228
- event.preventDefault();
2229
- setHighlightedIndex(renderedModels.length - 1);
2230
- }
2231
- if (event.key === "Enter" || event.key === " ") {
2232
- event.preventDefault();
2233
- const highlightedModel = renderedModels[highlightedIndex]?.option;
2234
- if (highlightedModel) {
2235
- selectModel(highlightedModel);
2236
- }
2237
- }
2238
- };
2239
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2240
- /* @__PURE__ */ jsxs(
2241
- "button",
2242
- {
2243
- ref: triggerRef,
2244
- type: "button",
2245
- disabled,
2246
- "aria-haspopup": "listbox",
2247
- "aria-expanded": open,
2248
- "aria-controls": open ? menuId : void 0,
2249
- onClick: () => setOpen((current) => !current),
2250
- onKeyDown: handleTriggerKeyDown,
2251
- "data-slot": "composer-model-selector-trigger",
2252
- className: cn(
2253
- variant === "ghost" ? [
2254
- "inline-flex max-w-full min-w-0 items-center gap-1 rounded-md px-2 py-1 text-xs",
2255
- "text-neutral-600 dark:text-neutral-400",
2256
- "transition-colors duration-150",
2257
- "hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-700 dark:hover:text-white",
2258
- "focus-visible:ring-primary-500 focus-visible:ring-2 focus-visible:outline-none",
2259
- "disabled:pointer-events-none disabled:opacity-40"
2260
- ] : [
2261
- "inline-flex h-8 max-w-full items-center gap-1.5 rounded-full border px-2.5 text-sm font-medium",
2262
- "border-border bg-background text-foreground shadow-sm",
2263
- "hover:bg-muted/50",
2264
- "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
2265
- "disabled:cursor-not-allowed disabled:opacity-50"
2266
- ],
2267
- className
2268
- ),
2269
- children: [
2270
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: selectedOption?.label ?? selectedOption?.model ?? placeholder }),
2271
- selectedEffortOption && /* @__PURE__ */ jsx(
2272
- "span",
2273
- {
2274
- "data-slot": "composer-model-selector-trigger-effort",
2275
- className: "text-muted-foreground min-w-0 truncate font-normal",
2276
- children: selectedEffortOption.label
2277
- }
2278
- ),
2279
- /* @__PURE__ */ jsx(
2280
- ChevronUp$1,
2281
- {
2282
- "aria-hidden": "true",
2283
- className: cn(
2284
- "shrink-0",
2285
- variant === "ghost" ? "h-3 w-3" : "h-3.5 w-3.5"
2286
- )
2287
- }
2288
- )
2289
- ]
2290
- }
2291
- ),
2292
- open && createPortal(
2293
- /* @__PURE__ */ jsxs(
2294
- "div",
2295
- {
2296
- ref: menuRef,
2297
- style: menuStyle,
2298
- "data-slot": "composer-model-selector-menu",
2299
- className: cn(
2300
- "border-border bg-card text-card-foreground flex w-80 max-w-full flex-col rounded-lg border shadow-lg",
2301
- "animate-in fade-in overflow-hidden duration-100"
2302
- ),
2303
- children: [
2304
- view === "models" && /* @__PURE__ */ jsxs(Fragment, { children: [
2305
- /* @__PURE__ */ jsx(
2306
- "div",
2307
- {
2308
- "data-slot": "composer-model-selector-provider-filter",
2309
- className: "border-border flex min-h-9 items-center gap-1 overflow-x-auto overflow-y-hidden border-b p-2",
2310
- children: [null, ...providers].map((provider) => {
2311
- const selected = activeProviderFilter === provider;
2312
- return /* @__PURE__ */ jsx(
2313
- "button",
2314
- {
2315
- type: "button",
2316
- "aria-pressed": selected,
2317
- onMouseDown: (event) => event.preventDefault(),
2318
- onClick: () => setProvider(provider),
2319
- className: cn(
2320
- "inline-flex h-6 shrink-0 items-center justify-center rounded-full px-2.5 text-xs font-medium whitespace-nowrap transition-colors",
2321
- "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
2322
- selected ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"
2323
- ),
2324
- children: provider === null ? anyLabel : providerLabels.get(provider) ?? provider
2325
- },
2326
- provider ?? "all-providers"
2327
- );
2328
- })
2329
- }
2330
- ),
2331
- /* @__PURE__ */ jsx(
2332
- "div",
2333
- {
2334
- ref: listRef,
2335
- id: menuId,
2336
- role: "listbox",
2337
- "aria-label": ariaLabel,
2338
- "aria-activedescendant": activeOptionId,
2339
- tabIndex: -1,
2340
- onKeyDown: handleMenuKeyDown,
2341
- className: "min-h-0 flex-1 overflow-y-auto p-1",
2342
- children: groupedModels.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-muted-foreground px-3 py-4 text-center text-sm", children: emptyLabel }) : groupedRenderedModels.map((group) => /* @__PURE__ */ jsxs(
2343
- "div",
2344
- {
2345
- role: "group",
2346
- "aria-label": providerLabels.get(group.provider) ?? group.provider,
2347
- children: [
2348
- /* @__PURE__ */ jsx("div", { className: "text-muted-foreground px-3 py-1.5 text-xs font-semibold uppercase", children: providerLabels.get(group.provider) ?? group.provider }),
2349
- group.options.map((renderedModel) => {
2350
- const { index, key, option: model } = renderedModel;
2351
- const selected = optionKey(model) === selectedKey;
2352
- const highlighted = index === highlightedIndex;
2353
- return /* @__PURE__ */ jsxs(
2354
- "button",
2355
- {
2356
- id: getOptionId(index),
2357
- type: "button",
2358
- role: "option",
2359
- "aria-selected": selected,
2360
- onMouseDown: (event) => event.preventDefault(),
2361
- onClick: () => selectModel(model),
2362
- onMouseEnter: () => setHighlightedIndex(index),
2363
- className: cn(
2364
- "flex w-full items-center gap-2 rounded-md px-3 py-2 text-start text-sm",
2365
- "focus-visible:ring-ring transition-colors focus-visible:ring-2 focus-visible:outline-none",
2366
- highlighted && "bg-muted",
2367
- selected && "bg-primary/10 text-primary"
2368
- ),
2369
- children: [
2370
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: model.label ?? model.model }),
2371
- selected && /* @__PURE__ */ jsx(
2372
- Check$1,
2373
- {
2374
- "aria-hidden": "true",
2375
- className: "text-primary h-4 w-4 shrink-0"
2376
- }
2377
- )
2378
- ]
2379
- },
2380
- key
2381
- );
2382
- })
2383
- ]
2384
- },
2385
- group.provider
2386
- ))
2387
- }
2388
- ),
2389
- efforts.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-border border-t p-1", children: /* @__PURE__ */ jsxs(
2390
- "button",
2391
- {
2392
- type: "button",
2393
- "data-slot": "composer-model-selector-effort-row",
2394
- "aria-haspopup": "listbox",
2395
- onMouseDown: (event) => event.preventDefault(),
2396
- onClick: () => setView("effort"),
2397
- className: cn(
2398
- "flex w-full items-center gap-2 rounded-md px-3 py-2 text-start text-sm",
2399
- "hover:bg-muted transition-colors",
2400
- "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none"
2401
- ),
2402
- children: [
2403
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: effortLabel }),
2404
- selectedEffortOption && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground min-w-0 truncate", children: selectedEffortOption.label }),
2405
- /* @__PURE__ */ jsx(
2406
- ChevronRight,
2407
- {
2408
- "aria-hidden": "true",
2409
- className: "text-muted-foreground h-4 w-4 shrink-0 rtl:-scale-x-100"
2410
- }
2411
- )
2412
- ]
2413
- }
2414
- ) })
2415
- ] }),
2416
- view === "effort" && /* @__PURE__ */ jsxs(Fragment, { children: [
2417
- /* @__PURE__ */ jsx("div", { className: "border-border flex items-center gap-1 border-b p-2", children: /* @__PURE__ */ jsxs(
2418
- "button",
2419
- {
2420
- type: "button",
2421
- "data-slot": "composer-model-selector-effort-back",
2422
- "aria-label": backLabel,
2423
- onMouseDown: (event) => event.preventDefault(),
2424
- onClick: () => setView("models"),
2425
- className: cn(
2426
- "inline-flex h-6 shrink-0 items-center gap-1 rounded-full px-2 text-xs font-medium",
2427
- "text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
2428
- "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none"
2429
- ),
2430
- children: [
2431
- /* @__PURE__ */ jsx(
2432
- ChevronLeft,
2433
- {
2434
- "aria-hidden": "true",
2435
- className: "h-3.5 w-3.5 rtl:-scale-x-100"
2436
- }
2437
- ),
2438
- effortLabel
2439
- ]
2440
- }
2441
- ) }),
2442
- effortHint && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground px-3 pt-2 text-xs", children: effortHint }),
2443
- /* @__PURE__ */ jsx(
2444
- "div",
2445
- {
2446
- ref: effortListRef,
2447
- id: menuId,
2448
- role: "listbox",
2449
- "aria-label": effortLabel,
2450
- "aria-activedescendant": activeEffortOptionId,
2451
- tabIndex: -1,
2452
- onKeyDown: handleEffortKeyDown,
2453
- className: "min-h-0 flex-1 overflow-y-auto p-1",
2454
- children: efforts.map((option, index) => {
2455
- const selected = option.value === effort;
2456
- const highlighted = index === effortHighlight;
2457
- return /* @__PURE__ */ jsxs(
2458
- "button",
2459
- {
2460
- id: getEffortOptionId(index),
2461
- type: "button",
2462
- role: "option",
2463
- "aria-selected": selected,
2464
- onMouseDown: (event) => event.preventDefault(),
2465
- onClick: () => selectEffort(option.value),
2466
- onMouseEnter: () => setEffortHighlight(index),
2467
- className: cn(
2468
- "flex w-full items-center gap-2 rounded-md px-3 py-2 text-start text-sm",
2469
- "focus-visible:ring-ring transition-colors focus-visible:ring-2 focus-visible:outline-none",
2470
- highlighted && "bg-muted",
2471
- selected && "bg-primary/10 text-primary"
2472
- ),
2473
- children: [
2474
- /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
2475
- /* @__PURE__ */ jsx("span", { className: "block truncate", children: option.label }),
2476
- option.description && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground block truncate text-xs", children: option.description })
2477
- ] }),
2478
- option.value === defaultEffort && /* @__PURE__ */ jsx("span", { className: "bg-muted text-muted-foreground shrink-0 rounded px-1.5 py-0.5 text-xs", children: defaultBadgeLabel }),
2479
- selected && /* @__PURE__ */ jsx(
2480
- Check$1,
2481
- {
2482
- "aria-hidden": "true",
2483
- className: "text-primary h-4 w-4 shrink-0"
2484
- }
2485
- )
2486
- ]
2487
- },
2488
- option.value
2489
- );
2490
- })
2491
- }
2492
- )
2493
- ] })
2494
- ]
2495
- }
2496
- ),
2497
- document.body
2498
- )
2499
- ] });
2500
2058
  }
2501
- ComposerModelSelector.displayName = "ComposerModelSelector";
2502
2059
  var THINKING_OPTIONS = [
2503
2060
  {
2504
2061
  value: "never",
@@ -2619,20 +2176,17 @@ function OzwellChat({
2619
2176
  });
2620
2177
  setMessagesMenuOpen(false);
2621
2178
  };
2622
- const modelSelector = showModelSelector && models ? /* @__PURE__ */ jsx(
2623
- ComposerModelSelector,
2624
- {
2625
- models: models.options,
2626
- value: models.value,
2627
- onChange: models.onChange,
2628
- ...models.providerFilter !== void 0 ? {
2629
- providerFilter: models.providerFilter,
2630
- onProviderFilterChange: models.onProviderFilterChange
2631
- } : { onProviderFilterChange: models.onProviderFilterChange },
2632
- boundaryRef: shellRef,
2633
- className: "border-border bg-card text-foreground max-w-[min(142px,38vw)] shadow-sm"
2634
- }
2635
- ) : void 0;
2179
+ const modelSelectorProps = showModelSelector && models ? {
2180
+ models: models.options,
2181
+ value: models.value,
2182
+ onChange: models.onChange,
2183
+ ...models.providerFilter !== void 0 ? {
2184
+ providerFilter: models.providerFilter,
2185
+ onProviderFilterChange: models.onProviderFilterChange
2186
+ } : { onProviderFilterChange: models.onProviderFilterChange },
2187
+ boundaryRef: shellRef,
2188
+ className: "max-w-[min(160px,44vw)]"
2189
+ } : void 0;
2636
2190
  const startQueuedMessageEdit = () => {
2637
2191
  setQueuedMessageDraft(queuedMessage ?? "");
2638
2192
  setIsEditingQueuedMessage(true);
@@ -2678,7 +2232,7 @@ function OzwellChat({
2678
2232
  variant: "ghost",
2679
2233
  "aria-label": "Save queued message",
2680
2234
  onClick: saveQueuedMessage,
2681
- children: /* @__PURE__ */ jsx(Check, { size: 14, "aria-hidden": "true" })
2235
+ children: /* @__PURE__ */ jsx(Check$1, { size: 14, "aria-hidden": "true" })
2682
2236
  }
2683
2237
  ) }),
2684
2238
  /* @__PURE__ */ jsx(Tooltip, { content: "Cancel editing", children: /* @__PURE__ */ jsx(
@@ -2846,7 +2400,6 @@ function OzwellChat({
2846
2400
  {
2847
2401
  messages: chatMessages,
2848
2402
  isGenerating,
2849
- className: showModelSelector ? '[&_[data-slot="composer-input"]]:pe-[min(160px,44vw)]' : void 0,
2850
2403
  showHeader: false,
2851
2404
  height: "100%",
2852
2405
  variant: "embedded",
@@ -2856,9 +2409,9 @@ function OzwellChat({
2856
2409
  renderTextContent: renderMessageTextContent,
2857
2410
  renderMessageFooter: renderQueuedMessageFooter,
2858
2411
  composerProps: {
2859
- inputTrailing: modelSelector,
2860
2412
  disabled: false,
2861
- isSending: false
2413
+ isSending: false,
2414
+ ...modelSelectorProps ? { showModelSelector: true, modelSelectorProps } : {}
2862
2415
  }
2863
2416
  }
2864
2417
  ),
@@ -6245,9 +5798,9 @@ function HandsFreeChat({
6245
5798
  // Controlled input (value/onValueChange) comes from the hook — it fills the box with the live
6246
5799
  // caption while dictating, else the typed text. We only add the mic button here.
6247
5800
  ...oz.chatProps.composerProps,
6248
- // The composer's OWN mic button, driven by our shared stream (controlled mode disables its
5801
+ // The composer's OWN mic slot, driven by our shared stream (controlled mode disables its
6249
5802
  // internal recorder). So the built-in mic and "hey ozwell" both do the same thing — one mic.
6250
- inputTrailing: /* @__PURE__ */ jsx(
5803
+ micSlot: /* @__PURE__ */ jsx(
6251
5804
  "span",
6252
5805
  {
6253
5806
  onClickCapture: () => {
@@ -8399,11 +7952,11 @@ function OrderRow({
8399
7952
  "aria-label": `Edit order ${order.display}`,
8400
7953
  className: "flex flex-1 flex-wrap items-center gap-1.5",
8401
7954
  children: [
8402
- /* @__PURE__ */ jsx(
8403
- "input",
7955
+ /* @__PURE__ */ jsx("div", { className: "min-w-40 flex-1", children: /* @__PURE__ */ jsx(
7956
+ Input,
8404
7957
  {
8405
- type: "text",
8406
7958
  autoFocus: true,
7959
+ size: "sm",
8407
7960
  value: editing.display,
8408
7961
  onChange: (e) => setEditing(
8409
7962
  (prev) => prev ? { ...prev, display: e.target.value } : prev
@@ -8413,17 +7966,13 @@ function OrderRow({
8413
7966
  else if (e.key === "Escape") setEditing(null);
8414
7967
  },
8415
7968
  "aria-label": "Order description",
8416
- className: cn(
8417
- "border-border bg-background text-foreground",
8418
- "h-7 min-w-40 flex-1 rounded-md border px-2 text-sm",
8419
- "focus:ring-ring focus:ring-2 focus:outline-none"
8420
- )
7969
+ className: "h-7"
8421
7970
  }
8422
- ),
8423
- /* @__PURE__ */ jsx(
8424
- "input",
7971
+ ) }),
7972
+ /* @__PURE__ */ jsx("div", { className: "w-40", children: /* @__PURE__ */ jsx(
7973
+ Input,
8425
7974
  {
8426
- type: "text",
7975
+ size: "sm",
8427
7976
  value: editing.detail,
8428
7977
  onChange: (e) => setEditing(
8429
7978
  (prev) => prev ? { ...prev, detail: e.target.value } : prev
@@ -8434,13 +7983,9 @@ function OrderRow({
8434
7983
  },
8435
7984
  placeholder: "detail (sig, timing\u2026)",
8436
7985
  "aria-label": "Order detail",
8437
- className: cn(
8438
- "border-border bg-background text-foreground placeholder:text-muted-foreground",
8439
- "h-7 w-40 rounded-md border px-2 text-xs",
8440
- "focus:ring-ring focus:ring-2 focus:outline-none"
8441
- )
7986
+ className: "h-7 text-xs"
8442
7987
  }
8443
- ),
7988
+ ) }),
8444
7989
  /* @__PURE__ */ jsx(
8445
7990
  Button,
8446
7991
  {
@@ -8559,6 +8104,7 @@ function OrderRow({
8559
8104
  );
8560
8105
  }
8561
8106
  function AddOrderForm({
8107
+ id,
8562
8108
  problemText,
8563
8109
  onSubmit,
8564
8110
  onCancel,
@@ -8593,6 +8139,7 @@ function AddOrderForm({
8593
8139
  return /* @__PURE__ */ jsxs(
8594
8140
  "div",
8595
8141
  {
8142
+ id,
8596
8143
  role: "form",
8597
8144
  "aria-label": `Add order for ${problemText}`,
8598
8145
  className: "border-border bg-muted/40 ms-2.5 mt-1.5 flex flex-wrap items-center gap-1.5 rounded-md border border-dashed p-2",
@@ -8631,12 +8178,11 @@ function AddOrderForm({
8631
8178
  });
8632
8179
  }
8633
8180
  }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
8634
- /* @__PURE__ */ jsx(
8635
- "input",
8181
+ /* @__PURE__ */ jsx("div", { className: "min-w-48 flex-1", children: /* @__PURE__ */ jsx(
8182
+ Input,
8636
8183
  {
8637
8184
  ref: inputRef,
8638
- type: "text",
8639
- "data-slot": "input",
8185
+ size: "sm",
8640
8186
  value: display,
8641
8187
  onChange: (e) => setDisplay(e.target.value),
8642
8188
  onKeyDown: (e) => {
@@ -8644,14 +8190,9 @@ function AddOrderForm({
8644
8190
  else if (e.key === "Escape") onCancel();
8645
8191
  },
8646
8192
  placeholder: "e.g. lisinopril 10 mg tablet \u2014 1 po daily",
8647
- "aria-label": "Order description",
8648
- className: cn(
8649
- "border-border bg-background text-foreground placeholder:text-muted-foreground",
8650
- "h-8 min-w-48 flex-1 rounded-md border px-2.5 text-sm",
8651
- "focus:ring-ring focus:ring-2 focus:outline-none"
8652
- )
8193
+ "aria-label": "Order description"
8653
8194
  }
8654
- ),
8195
+ ) }),
8655
8196
  /* @__PURE__ */ jsx(
8656
8197
  Button,
8657
8198
  {
@@ -8688,6 +8229,7 @@ var Assessment = React13.forwardRef(
8688
8229
  showPlan = true,
8689
8230
  onShowPlanChange,
8690
8231
  onAction,
8232
+ onRemoveAssessment,
8691
8233
  onAddOrder,
8692
8234
  onAddAssessment,
8693
8235
  onLinkOrder,
@@ -8704,6 +8246,7 @@ var Assessment = React13.forwardRef(
8704
8246
  "data-testid": dataTestId,
8705
8247
  ...props
8706
8248
  }, ref) => {
8249
+ const instanceId = React13.useId();
8707
8250
  const [addingFor, setAddingFor] = React13.useState(null);
8708
8251
  const [addMode, setAddMode] = React13.useState(
8709
8252
  defaultAddMode
@@ -8904,18 +8447,15 @@ var Assessment = React13.forwardRef(
8904
8447
  children: [
8905
8448
  title !== null && /* @__PURE__ */ jsxs(CardHeader, { className: "border-border bg-muted/50 flex flex-row items-center justify-between border-b px-4 py-3", children: [
8906
8449
  /* @__PURE__ */ jsx("h3", { className: "text-foreground text-sm font-semibold tracking-wide uppercase", children: title }),
8907
- onShowPlanChange && /* @__PURE__ */ jsxs("label", { className: "text-muted-foreground flex items-center gap-1.5 text-xs font-medium", children: [
8908
- /* @__PURE__ */ jsx(
8909
- "input",
8910
- {
8911
- type: "checkbox",
8912
- checked: showPlan,
8913
- onChange: (e) => onShowPlanChange(e.target.checked),
8914
- className: "accent-primary-600 h-3.5 w-3.5"
8915
- }
8916
- ),
8917
- "Show plan"
8918
- ] })
8450
+ onShowPlanChange && /* @__PURE__ */ jsx(
8451
+ Checkbox,
8452
+ {
8453
+ size: "sm",
8454
+ checked: showPlan,
8455
+ onChange: (e) => onShowPlanChange(e.target.checked),
8456
+ label: "Show plan"
8457
+ }
8458
+ )
8919
8459
  ] }),
8920
8460
  /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4 px-4 py-4", children: [
8921
8461
  items.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: "No problems assessed this visit." }),
@@ -8927,6 +8467,7 @@ var Assessment = React13.forwardRef(
8927
8467
  );
8928
8468
  const bp = blockProps(item.concernId);
8929
8469
  const formOpen = addingFor === item.concernId;
8470
+ const addOrderFormId = `${instanceId}-add-order-${item.concernId}`;
8930
8471
  return /* @__PURE__ */ jsxs(
8931
8472
  "li",
8932
8473
  {
@@ -8967,36 +8508,62 @@ var Assessment = React13.forwardRef(
8967
8508
  /* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: assertion.text }),
8968
8509
  assertion.verificationStatus !== "confirmed" && /* @__PURE__ */ jsx(Badge, { variant: "warning", size: "sm", children: assertion.verificationStatus }),
8969
8510
  /* @__PURE__ */ jsx(CodingChips, { coding: assertion.coding }),
8970
- !readOnly && /* @__PURE__ */ jsx(
8511
+ !readOnly && (onAction || onAddOrder || onRemoveAssessment) && /* @__PURE__ */ jsxs(
8971
8512
  RowActionToolbar,
8972
8513
  {
8973
8514
  label: `Actions for ${assertion.text}`,
8974
8515
  align: "top",
8975
- children: Object.keys(ACTION_META2).map(
8976
- (action) => {
8977
- const meta = ACTION_META2[action];
8978
- if (action === "add-order" && !onAddOrder && !onAction)
8979
- return null;
8980
- return /* @__PURE__ */ jsx(
8981
- RowIconButton,
8982
- {
8983
- label: meta.label,
8984
- icon: meta.icon,
8985
- size: "sm",
8986
- onClick: () => {
8987
- if (action === "add-order" && onAddOrder) {
8988
- setAddingFor(
8989
- (prev) => prev === item.concernId ? null : item.concernId
8990
- );
8991
- } else {
8992
- onAction?.(item, action);
8516
+ className: cn(
8517
+ "pointer-fine:group-has-[[data-order-id]:hover]:pointer-events-none",
8518
+ "pointer-fine:group-has-[[data-order-id]:hover]:opacity-0",
8519
+ "pointer-fine:group-has-[[data-order-id]:focus-within]:pointer-events-none",
8520
+ "pointer-fine:group-has-[[data-order-id]:focus-within]:opacity-0"
8521
+ ),
8522
+ children: [
8523
+ Object.keys(ACTION_META2).map(
8524
+ (action) => {
8525
+ const meta = ACTION_META2[action];
8526
+ if (action !== "add-order" && !onAction)
8527
+ return null;
8528
+ if (action === "add-order" && !onAddOrder && !onAction)
8529
+ return null;
8530
+ return /* @__PURE__ */ jsx(
8531
+ RowIconButton,
8532
+ {
8533
+ label: meta.label,
8534
+ icon: meta.icon,
8535
+ size: "sm",
8536
+ expanded: action === "add-order" && onAddOrder ? addingFor === item.concernId : void 0,
8537
+ controls: action === "add-order" && onAddOrder ? addOrderFormId : void 0,
8538
+ onClick: () => {
8539
+ if (action === "add-order" && onAddOrder) {
8540
+ setAddingFor(
8541
+ (prev) => prev === item.concernId ? null : item.concernId
8542
+ );
8543
+ } else {
8544
+ onAction?.(item, action);
8545
+ }
8993
8546
  }
8994
- }
8995
- },
8996
- action
8997
- );
8998
- }
8999
- )
8547
+ },
8548
+ action
8549
+ );
8550
+ }
8551
+ ),
8552
+ onRemoveAssessment && /* @__PURE__ */ jsx(
8553
+ RowIconButton,
8554
+ {
8555
+ label: `Remove ${assertion.text} from assessment`,
8556
+ icon: Trash2,
8557
+ size: "sm",
8558
+ onClick: () => {
8559
+ onRemoveAssessment(item);
8560
+ setAnnouncement(
8561
+ `${assertion.text} removed from assessment`
8562
+ );
8563
+ }
8564
+ }
8565
+ )
8566
+ ]
9000
8567
  }
9001
8568
  )
9002
8569
  ]
@@ -9022,8 +8589,15 @@ var Assessment = React13.forwardRef(
9022
8589
  !readOnly && onAddOrder && addingFor === item.concernId && /* @__PURE__ */ jsx(
9023
8590
  AddOrderForm,
9024
8591
  {
8592
+ id: addOrderFormId,
9025
8593
  problemText: assertion.text,
9026
- onSubmit: (order) => onAddOrder(item, order),
8594
+ onSubmit: (order) => {
8595
+ onAddOrder(item, order);
8596
+ setAnnouncement(
8597
+ `${order.display} added to ${assertion.text}`
8598
+ );
8599
+ setAddingFor(null);
8600
+ },
9027
8601
  onCancel: () => setAddingFor(null),
9028
8602
  renderSearch: effectiveRenderOrderSearch
9029
8603
  }
@@ -12499,599 +12073,6 @@ var CaseManagementHeader = React13.forwardRef(
12499
12073
  }
12500
12074
  );
12501
12075
  CaseManagementHeader.displayName = "CaseManagementHeader";
12502
- var iconButtonClasses = cn(
12503
- "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg",
12504
- "text-neutral-500 dark:text-neutral-400",
12505
- "transition-colors duration-150",
12506
- "hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-700 dark:hover:text-white",
12507
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
12508
- "disabled:pointer-events-none disabled:opacity-40"
12509
- );
12510
- var selectorTriggerClasses = cn(
12511
- "flex min-w-0 items-center gap-1 rounded-md px-2 py-1 text-xs",
12512
- "text-neutral-600 dark:text-neutral-400",
12513
- "transition-colors duration-150",
12514
- "hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-700 dark:hover:text-white",
12515
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500",
12516
- "disabled:pointer-events-none disabled:opacity-40"
12517
- );
12518
- var MAX_INPUT_HEIGHT = 160;
12519
- var ChatComposer = React13.forwardRef(function ChatComposer2({
12520
- onSend,
12521
- value: controlledValue,
12522
- onValueChange,
12523
- placeholder = "Type a message\u2026",
12524
- disabled = false,
12525
- isSending = false,
12526
- autoFocus = false,
12527
- maxLength,
12528
- showCharacterCount = false,
12529
- canSendWhenEmpty = false,
12530
- maxHeight = MAX_INPUT_HEIGHT,
12531
- textareaProps,
12532
- addMenuItems,
12533
- allowAttachments = true,
12534
- acceptedFileTypes,
12535
- maxFileSize,
12536
- maxAttachments = 10,
12537
- mentionOptions,
12538
- showMic = false,
12539
- onMicClick,
12540
- micSlot,
12541
- micBehavior = "always",
12542
- isStreaming = false,
12543
- onStop,
12544
- showAgentSelector = false,
12545
- agents = [],
12546
- selectedAgent = null,
12547
- onAgentChange,
12548
- showModelSelector = false,
12549
- modelSelectorProps,
12550
- readOnly = false,
12551
- readOnlyMessage = "You have read-only access and cannot send messages.",
12552
- onError,
12553
- attachmentLimitLabel,
12554
- sendFailedLabel = "Failed to send message",
12555
- sendingLabel = "Sending message\u2026",
12556
- inputLabel = "Message input",
12557
- addMenuLabel = "Add to message",
12558
- attachFilesLabel = "Attach files",
12559
- micLabel = "Start voice input",
12560
- sendLabel = "Send message",
12561
- stopLabel = "Stop generating",
12562
- agentSelectorLabel = "Select agent",
12563
- mentionListLabel = "Mention",
12564
- dropFilesLabel = "Drop files here",
12565
- className
12566
- }, ref) {
12567
- const [internalValue, setInternalValue] = React13.useState("");
12568
- const isControlled = controlledValue !== void 0;
12569
- const value = isControlled ? controlledValue : internalValue;
12570
- const [attachments, setAttachments] = React13.useState([]);
12571
- const attachmentsRef = React13.useRef(attachments);
12572
- attachmentsRef.current = attachments;
12573
- const textareaRef = React13.useRef(null);
12574
- const fileInputRef = React13.useRef(null);
12575
- const [addMenuOpen, setAddMenuOpen] = React13.useState(false);
12576
- const [agentMenuOpen, setAgentMenuOpen] = React13.useState(false);
12577
- const hasText = value.trim().length > 0;
12578
- const hasContent = hasText || attachments.length > 0;
12579
- const isOverLimit = maxLength !== void 0 && value.length > maxLength;
12580
- const canSend = (hasContent || canSendWhenEmpty) && onSend !== void 0 && !disabled && !isSending && !isStreaming && !isOverLimit;
12581
- const setValue = React13.useCallback(
12582
- (next) => {
12583
- if (!isControlled) setInternalValue(next);
12584
- onValueChange?.(next);
12585
- },
12586
- [isControlled, onValueChange]
12587
- );
12588
- const mention = useMentionAutocomplete({
12589
- options: mentionOptions,
12590
- value,
12591
- setValue,
12592
- textareaRef
12593
- });
12594
- const resizeTextarea = React13.useCallback(() => {
12595
- const textarea = textareaRef.current;
12596
- if (!textarea) return;
12597
- textarea.style.height = "auto";
12598
- if (textarea.scrollHeight === 0) return;
12599
- textarea.style.height = `${textarea.scrollHeight}px`;
12600
- }, []);
12601
- React13.useLayoutEffect(resizeTextarea, [resizeTextarea, value]);
12602
- React13.useEffect(() => {
12603
- const textarea = textareaRef.current;
12604
- if (!textarea || typeof ResizeObserver === "undefined") return;
12605
- let frame = 0;
12606
- const observer = new ResizeObserver(() => {
12607
- cancelAnimationFrame(frame);
12608
- frame = requestAnimationFrame(resizeTextarea);
12609
- });
12610
- observer.observe(textarea);
12611
- return () => {
12612
- cancelAnimationFrame(frame);
12613
- observer.disconnect();
12614
- };
12615
- }, [resizeTextarea]);
12616
- const addFiles = React13.useCallback(
12617
- (files) => {
12618
- if (!allowAttachments || files.length === 0) return;
12619
- const limitMessage = attachmentLimitLabel ?? `Attachment limit reached (max ${maxAttachments})`;
12620
- const room = maxAttachments - attachmentsRef.current.length;
12621
- if (files.length > room) {
12622
- onError?.(limitMessage, { reason: "attachment-limit" });
12623
- if (room <= 0) return;
12624
- }
12625
- const staged = [];
12626
- for (const file of files.slice(0, Math.max(room, 0))) {
12627
- const typeCheck = validateFile(file, acceptedFileTypes, void 0);
12628
- if (!typeCheck.valid) {
12629
- onError?.(`${file.name}: ${typeCheck.error}`, {
12630
- reason: "file-type",
12631
- file
12632
- });
12633
- continue;
12634
- }
12635
- const sizeCheck = validateFile(file, void 0, maxFileSize);
12636
- if (!sizeCheck.valid) {
12637
- onError?.(`${file.name}: ${sizeCheck.error}`, {
12638
- reason: "file-size",
12639
- file
12640
- });
12641
- continue;
12642
- }
12643
- const type = getFileType(file.type);
12644
- staged.push({
12645
- id: generateAttachmentId(),
12646
- file,
12647
- type,
12648
- previewUrl: type === "image" || type === "video" ? URL.createObjectURL(file) : void 0
12649
- });
12650
- }
12651
- if (staged.length > 0) {
12652
- attachmentsRef.current = [...attachmentsRef.current, ...staged];
12653
- setAttachments((current) => [...current, ...staged]);
12654
- }
12655
- },
12656
- [
12657
- allowAttachments,
12658
- maxAttachments,
12659
- acceptedFileTypes,
12660
- maxFileSize,
12661
- onError,
12662
- attachmentLimitLabel
12663
- ]
12664
- );
12665
- const removeAttachment = React13.useCallback((id) => {
12666
- const target = attachmentsRef.current.find(
12667
- (attachment) => attachment.id === id
12668
- );
12669
- if (target?.previewUrl) URL.revokeObjectURL(target.previewUrl);
12670
- attachmentsRef.current = attachmentsRef.current.filter(
12671
- (attachment) => attachment.id !== id
12672
- );
12673
- setAttachments(
12674
- (current) => current.filter((attachment) => attachment.id !== id)
12675
- );
12676
- }, []);
12677
- React13.useEffect(() => {
12678
- return () => {
12679
- for (const attachment of attachmentsRef.current) {
12680
- if (attachment.previewUrl) URL.revokeObjectURL(attachment.previewUrl);
12681
- }
12682
- };
12683
- }, []);
12684
- const handleFileInputChange = (event) => {
12685
- const files = Array.from(event.target.files ?? []);
12686
- addFiles(files);
12687
- event.target.value = "";
12688
- };
12689
- const handlePaste = (event) => {
12690
- if (!allowAttachments) return;
12691
- const files = Array.from(event.clipboardData.files);
12692
- if (files.length > 0) {
12693
- event.preventDefault();
12694
- addFiles(files);
12695
- }
12696
- };
12697
- React13.useImperativeHandle(
12698
- ref,
12699
- () => ({
12700
- addFiles,
12701
- focus: () => textareaRef.current?.focus(),
12702
- getTextarea: () => textareaRef.current
12703
- }),
12704
- [addFiles]
12705
- );
12706
- const handleSend = () => {
12707
- if (!canSend || !onSend) return;
12708
- const message = {
12709
- content: value.trim(),
12710
- attachments: attachments.map((attachment) => attachment.file)
12711
- };
12712
- for (const attachment of attachments) {
12713
- if (attachment.previewUrl) URL.revokeObjectURL(attachment.previewUrl);
12714
- }
12715
- attachmentsRef.current = [];
12716
- setAttachments([]);
12717
- setValue("");
12718
- try {
12719
- Promise.resolve(onSend(message)).catch(() => {
12720
- onError?.(sendFailedLabel, { reason: "send-failed" });
12721
- });
12722
- } catch {
12723
- onError?.(sendFailedLabel, { reason: "send-failed" });
12724
- }
12725
- textareaRef.current?.focus();
12726
- };
12727
- const handleKeyDown = (event) => {
12728
- if (mention.handleKeyDown(event)) return;
12729
- if (event.key === "Enter" && !event.shiftKey) {
12730
- event.preventDefault();
12731
- handleSend();
12732
- }
12733
- };
12734
- if (readOnly) {
12735
- return /* @__PURE__ */ jsxs(
12736
- "div",
12737
- {
12738
- "data-slot": "chat-composer",
12739
- role: "status",
12740
- className: cn(
12741
- "flex items-center gap-2 rounded-xl border px-4 py-3 text-sm",
12742
- "border-amber-300 bg-amber-50 text-amber-900",
12743
- "dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200",
12744
- className
12745
- ),
12746
- children: [
12747
- /* @__PURE__ */ jsx(AlertTriangle, { className: "h-4 w-4 shrink-0", "aria-hidden": "true" }),
12748
- /* @__PURE__ */ jsx("span", { "data-slot": "chat-composer-readonly", children: readOnlyMessage })
12749
- ]
12750
- }
12751
- );
12752
- }
12753
- const showAddMenu = allowAttachments || addMenuItems && addMenuItems.length > 0;
12754
- const micVisible = (showMic || onMicClick !== void 0 || micSlot !== void 0) && (micBehavior === "always" || !hasContent);
12755
- const showSelectorRow = showAgentSelector || showModelSelector;
12756
- const selectedAgentOption = agents.find((agent) => agent.id === selectedAgent) ?? null;
12757
- const cells = {
12758
- input: "col-span-3 col-start-1 row-start-1 px-1 pt-1 md:col-span-1 md:col-start-2 md:self-end md:px-0 md:py-1.5",
12759
- textarea: "px-2 pt-2 pb-1 md:py-1.5",
12760
- add: "col-start-1 row-start-2 pb-2 ps-2 md:row-start-1 md:self-end md:p-1.5 md:pe-0.5",
12761
- actions: "col-start-3 row-start-2 flex items-center gap-1 pb-2 pe-2 md:row-start-1 md:self-end md:gap-0.5 md:p-1.5 md:ps-0.5"
12762
- };
12763
- const composerCard = /* @__PURE__ */ jsxs(Fragment, { children: [
12764
- attachments.length > 0 && /* @__PURE__ */ jsx(
12765
- "div",
12766
- {
12767
- "data-slot": "chat-composer-attachments",
12768
- className: "flex flex-wrap gap-2 px-3 pt-3",
12769
- children: attachments.map((attachment) => /* @__PURE__ */ jsx(
12770
- AttachmentPreviewItem,
12771
- {
12772
- attachment: { ...attachment, state: "pending" },
12773
- onRemove: () => removeAttachment(attachment.id),
12774
- disabled
12775
- },
12776
- attachment.id
12777
- ))
12778
- }
12779
- ),
12780
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[auto_minmax(0,1fr)_auto]", children: [
12781
- /* @__PURE__ */ jsxs("div", { className: cells.input, ref: mention.anchorRef, children: [
12782
- /* @__PURE__ */ jsx(
12783
- MentionMenu,
12784
- {
12785
- mention,
12786
- label: mentionListLabel,
12787
- dataSlot: "chat-composer-mention-list"
12788
- }
12789
- ),
12790
- /* @__PURE__ */ jsx(
12791
- "textarea",
12792
- {
12793
- ...textareaProps,
12794
- ref: textareaRef,
12795
- "data-slot": "chat-composer-input",
12796
- value,
12797
- onChange: (event) => {
12798
- textareaProps?.onChange?.(event);
12799
- setValue(event.target.value);
12800
- mention.sync(
12801
- event.target.value,
12802
- event.target.selectionStart ?? event.target.value.length
12803
- );
12804
- },
12805
- onKeyDown: (event) => {
12806
- textareaProps?.onKeyDown?.(event);
12807
- if (event.defaultPrevented) return;
12808
- handleKeyDown(event);
12809
- },
12810
- onClick: (event) => {
12811
- textareaProps?.onClick?.(event);
12812
- if (event.defaultPrevented) return;
12813
- const el = event.currentTarget;
12814
- mention.sync(el.value, el.selectionStart ?? el.value.length);
12815
- },
12816
- onPaste: (event) => {
12817
- textareaProps?.onPaste?.(event);
12818
- if (event.defaultPrevented) return;
12819
- handlePaste(event);
12820
- },
12821
- placeholder,
12822
- disabled,
12823
- autoFocus,
12824
- rows: 1,
12825
- "aria-label": inputLabel,
12826
- ...mention.inputProps,
12827
- style: {
12828
- ...textareaProps?.style,
12829
- maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight
12830
- },
12831
- className: cn(
12832
- "block w-full resize-none bg-transparent",
12833
- "rounded-lg text-sm",
12834
- cells.textarea,
12835
- "text-neutral-900 placeholder:text-neutral-400 dark:text-white dark:placeholder:text-neutral-500",
12836
- // Ring the input itself on focus rather than the whole shell.
12837
- "focus:ring-primary-500 focus:ring-1 focus:outline-none",
12838
- "disabled:cursor-not-allowed",
12839
- textareaProps?.className
12840
- )
12841
- }
12842
- )
12843
- ] }),
12844
- showAddMenu && /* @__PURE__ */ jsx("div", { className: cells.add, children: /* @__PURE__ */ jsxs(
12845
- Dropdown,
12846
- {
12847
- placement: "top-start",
12848
- open: addMenuOpen,
12849
- onOpenChange: setAddMenuOpen,
12850
- trigger: /* @__PURE__ */ jsx(
12851
- "button",
12852
- {
12853
- type: "button",
12854
- "data-slot": "chat-composer-add-button",
12855
- "aria-label": addMenuLabel,
12856
- disabled,
12857
- className: iconButtonClasses,
12858
- children: /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" })
12859
- }
12860
- ),
12861
- children: [
12862
- allowAttachments && /* @__PURE__ */ jsx(
12863
- DropdownItem,
12864
- {
12865
- icon: /* @__PURE__ */ jsx(Paperclip, { className: "h-4 w-4", "aria-hidden": "true" }),
12866
- onClick: () => {
12867
- setAddMenuOpen(false);
12868
- fileInputRef.current?.click();
12869
- },
12870
- children: attachFilesLabel
12871
- }
12872
- ),
12873
- allowAttachments && addMenuItems && addMenuItems.length > 0 && /* @__PURE__ */ jsx(DropdownSeparator, {}),
12874
- addMenuItems?.map((item) => /* @__PURE__ */ jsx(
12875
- DropdownItem,
12876
- {
12877
- icon: item.icon,
12878
- disabled: item.disabled,
12879
- variant: item.variant,
12880
- checked: item.checked,
12881
- onClick: () => {
12882
- setAddMenuOpen(false);
12883
- item.onSelect?.();
12884
- },
12885
- children: /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: item.label })
12886
- },
12887
- item.id
12888
- ))
12889
- ]
12890
- }
12891
- ) }),
12892
- allowAttachments && /* @__PURE__ */ jsx(
12893
- "input",
12894
- {
12895
- ref: fileInputRef,
12896
- type: "file",
12897
- multiple: true,
12898
- accept: acceptedFileTypes?.join(","),
12899
- onChange: handleFileInputChange,
12900
- className: "hidden",
12901
- "aria-hidden": "true",
12902
- tabIndex: -1
12903
- }
12904
- ),
12905
- /* @__PURE__ */ jsxs("div", { className: cells.actions, children: [
12906
- showCharacterCount && maxLength !== void 0 && /* @__PURE__ */ jsxs(
12907
- "span",
12908
- {
12909
- "data-slot": "chat-composer-char-count",
12910
- "aria-live": "polite",
12911
- className: cn(
12912
- "pe-1 text-xs tabular-nums",
12913
- isOverLimit ? "font-medium text-red-700 dark:text-red-400" : "text-neutral-500 dark:text-neutral-400"
12914
- ),
12915
- children: [
12916
- value.length,
12917
- "/",
12918
- maxLength
12919
- ]
12920
- }
12921
- ),
12922
- micVisible && (micSlot != null ? (
12923
- // Normalize slot content (e.g. a RecordButton) to the 32px
12924
- // control row: taller content overflow-centers instead of
12925
- // inflating the pill and pushing the other cells apart. A div
12926
- // so block-level slot content stays valid HTML.
12927
- /* @__PURE__ */ jsx(
12928
- "div",
12929
- {
12930
- "data-slot": "chat-composer-mic-slot",
12931
- className: "flex h-8 shrink-0 items-center",
12932
- children: micSlot
12933
- }
12934
- )
12935
- ) : /* @__PURE__ */ jsx(
12936
- "button",
12937
- {
12938
- type: "button",
12939
- "data-slot": "chat-composer-mic-button",
12940
- "aria-label": micLabel,
12941
- disabled,
12942
- onClick: onMicClick,
12943
- className: iconButtonClasses,
12944
- children: /* @__PURE__ */ jsx(Mic, { className: "h-4 w-4", "aria-hidden": "true" })
12945
- }
12946
- )),
12947
- isStreaming && onStop ? /* @__PURE__ */ jsx(
12948
- "button",
12949
- {
12950
- type: "button",
12951
- "data-slot": "chat-composer-stop-button",
12952
- "aria-label": stopLabel,
12953
- disabled,
12954
- onClick: onStop,
12955
- className: cn(
12956
- iconButtonClasses,
12957
- "text-neutral-700 dark:text-neutral-200"
12958
- ),
12959
- children: /* @__PURE__ */ jsx(
12960
- Square,
12961
- {
12962
- className: "h-3.5 w-3.5 fill-current",
12963
- "aria-hidden": "true"
12964
- }
12965
- )
12966
- }
12967
- ) : /* @__PURE__ */ jsx(
12968
- "button",
12969
- {
12970
- type: "button",
12971
- "data-slot": "chat-composer-send-button",
12972
- "aria-label": isSending ? sendingLabel : sendLabel,
12973
- "aria-busy": isSending || void 0,
12974
- disabled: !canSend,
12975
- onClick: handleSend,
12976
- className: cn(
12977
- iconButtonClasses,
12978
- canSend && "bg-primary-800 hover:bg-primary-700 dark:bg-primary-600 dark:hover:bg-primary-500 text-white hover:text-white dark:hover:text-white"
12979
- ),
12980
- children: isSending ? /* @__PURE__ */ jsx(
12981
- Loader2,
12982
- {
12983
- className: "h-4 w-4 animate-spin",
12984
- "aria-hidden": "true"
12985
- }
12986
- ) : /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4", "aria-hidden": "true" })
12987
- }
12988
- )
12989
- ] })
12990
- ] })
12991
- ] });
12992
- const selectorsRow = showSelectorRow && /* @__PURE__ */ jsxs(
12993
- "div",
12994
- {
12995
- "data-slot": "chat-composer-selectors",
12996
- className: "flex items-center justify-between gap-2 px-2 pt-1",
12997
- children: [
12998
- showAgentSelector ? /* @__PURE__ */ jsx(
12999
- Dropdown,
13000
- {
13001
- placement: "top-start",
13002
- open: agentMenuOpen,
13003
- onOpenChange: setAgentMenuOpen,
13004
- trigger: /* @__PURE__ */ jsxs(
13005
- "button",
13006
- {
13007
- type: "button",
13008
- "data-slot": "chat-composer-agent-trigger",
13009
- "aria-label": selectedAgentOption ? `${agentSelectorLabel}: ${selectedAgentOption.label}` : agentSelectorLabel,
13010
- disabled,
13011
- className: selectorTriggerClasses,
13012
- children: [
13013
- selectedAgentOption?.icon ?? /* @__PURE__ */ jsx(Bot, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
13014
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: selectedAgentOption?.label ?? agentSelectorLabel }),
13015
- /* @__PURE__ */ jsx(ChevronUp, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" })
13016
- ]
13017
- }
13018
- ),
13019
- children: agents.map((agent) => /* @__PURE__ */ jsx(
13020
- DropdownItem,
13021
- {
13022
- icon: agent.icon,
13023
- role: "menuitemradio",
13024
- "aria-checked": agent.id === selectedAgent,
13025
- onClick: () => {
13026
- setAgentMenuOpen(false);
13027
- onAgentChange?.(agent.id);
13028
- },
13029
- children: /* @__PURE__ */ jsxs("span", { className: "flex w-full items-center justify-between gap-2", children: [
13030
- /* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
13031
- /* @__PURE__ */ jsx("span", { className: "block truncate", children: agent.label }),
13032
- agent.description && /* @__PURE__ */ jsx("span", { className: "block truncate text-xs text-neutral-500 dark:text-neutral-400", children: agent.description })
13033
- ] }),
13034
- agent.id === selectedAgent && /* @__PURE__ */ jsx(
13035
- Check,
13036
- {
13037
- className: "text-primary-600 dark:text-primary-400 h-4 w-4 shrink-0",
13038
- "aria-hidden": "true"
13039
- }
13040
- )
13041
- ] })
13042
- },
13043
- agent.id
13044
- ))
13045
- }
13046
- ) : /* @__PURE__ */ jsx("span", { "aria-hidden": "true" }),
13047
- showModelSelector && modelSelectorProps && /* @__PURE__ */ jsx(
13048
- ComposerModelSelector,
13049
- {
13050
- variant: "ghost",
13051
- ...modelSelectorProps,
13052
- disabled: disabled || modelSelectorProps.disabled
13053
- }
13054
- )
13055
- ]
13056
- }
13057
- );
13058
- const card = /* @__PURE__ */ jsx(
13059
- "div",
13060
- {
13061
- "data-slot": "chat-composer-card",
13062
- className: cn(
13063
- "rounded-2xl border border-neutral-200 bg-white shadow-sm",
13064
- "dark:border-[#2e2e30] dark:bg-[#1c1c1e]"
13065
- ),
13066
- children: composerCard
13067
- }
13068
- );
13069
- return /* @__PURE__ */ jsxs(
13070
- "div",
13071
- {
13072
- "data-slot": "chat-composer",
13073
- className: cn(
13074
- "flex w-full flex-col",
13075
- disabled && "opacity-60",
13076
- className
13077
- ),
13078
- children: [
13079
- allowAttachments ? /* @__PURE__ */ jsx(
13080
- DragDropZone,
13081
- {
13082
- onFilesDropped: addFiles,
13083
- maxFiles: Number.MAX_SAFE_INTEGER,
13084
- disabled,
13085
- overlayLabel: dropFilesLabel,
13086
- children: card
13087
- }
13088
- ) : card,
13089
- selectorsRow
13090
- ]
13091
- }
13092
- );
13093
- });
13094
- ChatComposer.displayName = "ChatComposer";
13095
12076
  var MODE_META = {
13096
12077
  add: { title: "Add problem", changeType: void 0 },
13097
12078
  observe: { title: "Progress observation", changeType: void 0 },
@@ -13114,13 +12095,24 @@ var RELATIONSHIP_OPTIONS = [
13114
12095
  ];
13115
12096
  var SEVERITIES = ["mild", "moderate", "severe"];
13116
12097
  var CONFIDENCES = ["low", "medium", "high"];
13117
- function systemForCodetype(codetype) {
12098
+ function normalizeConditionCodingSystem(codetype) {
13118
12099
  const ct = codetype.toUpperCase().replace(/[^A-Z0-9]/g, "");
13119
12100
  if (ct === "ICD10" || ct === "ICD10CM") return "ICD-10-CM";
13120
12101
  if (ct === "ICD11") return "ICD-11";
13121
- if (ct === "SNOMED" || ct === "SNOMEDCT") return "SNOMED";
12102
+ if (ct === "SNOMED" || ct === "SNOMEDCT" || ct === "SNOMEDUS") {
12103
+ return "SNOMED";
12104
+ }
13122
12105
  return codetype;
13123
12106
  }
12107
+ function withSinglePrimary(coding) {
12108
+ if (coding.length === 0) return coding;
12109
+ const primaryIndex = coding.findIndex((entry) => entry.primary);
12110
+ const selectedIndex = primaryIndex >= 0 ? primaryIndex : 0;
12111
+ return coding.map((entry, index) => ({
12112
+ ...entry,
12113
+ primary: index === selectedIndex
12114
+ }));
12115
+ }
13124
12116
  function contextConditionCodeSearch(ctx) {
13125
12117
  const ContextConditionCodeSearch = ({
13126
12118
  placeholder,
@@ -13174,7 +12166,7 @@ function FieldFlag({
13174
12166
  ),
13175
12167
  className: cn(
13176
12168
  "rounded-full border px-2 py-0.5 text-[11px] font-medium transition-colors",
13177
- unknown ? "border-amber-400 bg-amber-100 text-amber-900 dark:border-amber-600 dark:bg-amber-950 dark:text-amber-200" : "border-border text-muted-foreground hover:text-foreground"
12169
+ unknown ? "border-warning/50 bg-warning/10 text-warning-800 dark:text-warning-200" : "border-border text-muted-foreground hover:text-foreground"
13178
12170
  ),
13179
12171
  children: "Unknown"
13180
12172
  }
@@ -13247,13 +12239,14 @@ function ConditionEditor({
13247
12239
  React13.useEffect(() => {
13248
12240
  if (!open) return;
13249
12241
  setText(prior?.text ?? "");
13250
- setCoding(prior?.coding ?? []);
12242
+ setCoding(withSinglePrimary(prior?.coding ?? []));
13251
12243
  setVerification(
13252
12244
  mode === "add" ? "unconfirmed" : prior?.verificationStatus ?? "confirmed"
13253
12245
  );
13254
12246
  setSeverity(prior?.severity);
13255
- setOnsetDate(prior?.onset?.date ?? "");
13256
- setOnsetFuzzy(prior?.onset?.fuzzy ?? "");
12247
+ const priorOnsetDate = prior?.onset?.date;
12248
+ setOnsetDate(priorOnsetDate ? dateToDisplayFormat(priorOnsetDate) : "");
12249
+ setOnsetFuzzy(priorOnsetDate ? "" : prior?.onset?.fuzzy ?? "");
13257
12250
  setNote("");
13258
12251
  setProgression(false);
13259
12252
  setFields(prior?.uncertainty?.fields ?? {});
@@ -13269,18 +12262,14 @@ function ConditionEditor({
13269
12262
  });
13270
12263
  const updateCoding = (i, patch) => setCoding((prev) => prev.map((c, j) => j === i ? { ...c, ...patch } : c));
13271
12264
  const codingUnknown = fields.coding?.known === false;
12265
+ const hasInvalidOnsetDate = fields.onset?.known !== false && Boolean(onsetDate) && !isValidDate(onsetDate);
13272
12266
  const handleCodePick = (pick) => {
13273
- const system = systemForCodetype(pick.codetype);
12267
+ const system = normalizeConditionCodingSystem(pick.codetype);
13274
12268
  setCoding(
13275
- (prev) => prev.some((c) => c.system === system && c.code === pick.fullcode) ? prev : [
12269
+ (prev) => prev.some((c) => c.system === system && c.code === pick.fullcode) ? prev : withSinglePrimary([
13276
12270
  ...prev,
13277
- {
13278
- system,
13279
- code: pick.fullcode,
13280
- display: pick.label,
13281
- primary: prev.length === 0
13282
- }
13283
- ]
12271
+ { system, code: pick.fullcode, display: pick.label }
12272
+ ])
13284
12273
  );
13285
12274
  setText((prev) => prev || pick.label);
13286
12275
  setFields((prev) => {
@@ -13303,7 +12292,7 @@ function ConditionEditor({
13303
12292
  onOpenChange(false);
13304
12293
  return;
13305
12294
  }
13306
- if (!text.trim()) return;
12295
+ if (!text.trim() || hasInvalidOnsetDate) return;
13307
12296
  if (observation.trim()) onAddObservation?.(observation.trim());
13308
12297
  const uncertainty = Object.keys(fields).length > 0 ? { fields } : void 0;
13309
12298
  onSave?.({
@@ -13312,41 +12301,46 @@ function ConditionEditor({
13312
12301
  // checks downstream. A field marked explicitly unknown must not carry a
13313
12302
  // value (e.g. one seeded from the prior assertion): value + "unknown"
13314
12303
  // would be contradictory, so unknown wins and the value is dropped.
13315
- coding: fields.coding?.known === false ? [] : coding.filter((c) => c.code.trim()).map((c) => ({
13316
- ...c,
13317
- code: c.code.trim(),
13318
- display: c.display?.trim() || void 0,
13319
- mappedFrom: c.mappedFrom?.trim() || void 0
13320
- })),
12304
+ coding: fields.coding?.known === false ? [] : withSinglePrimary(
12305
+ coding.filter((c) => c.code.trim()).map((c) => ({
12306
+ ...c,
12307
+ code: c.code.trim(),
12308
+ display: c.display?.trim() || void 0,
12309
+ mappedFrom: c.mappedFrom?.trim() || void 0
12310
+ }))
12311
+ ),
13321
12312
  verificationStatus: verification,
13322
12313
  changeType: mode === "refine" ? progression ? "progression" : "refinement" : MODE_META[mode].changeType,
13323
12314
  supersedes: prior?.id,
13324
12315
  severity: fields.severity?.known === false ? void 0 : severity,
13325
- onset: fields.onset?.known === false ? void 0 : onsetDate || onsetFuzzy ? { date: onsetDate || void 0, fuzzy: onsetFuzzy || void 0 } : void 0,
12316
+ onset: fields.onset?.known === false ? void 0 : onsetDate || onsetFuzzy ? {
12317
+ date: onsetDate ? displayFormatToDateString(onsetDate) : void 0,
12318
+ fuzzy: onsetFuzzy || void 0
12319
+ } : void 0,
13326
12320
  uncertainty,
13327
12321
  note: note.trim() || void 0
13328
12322
  });
13329
12323
  onOpenChange(false);
13330
12324
  };
13331
- const saveDisabled = mode === "relate" ? !relTarget : mode === "observe" ? !observation.trim() : !text.trim();
12325
+ const saveDisabled = mode === "relate" ? !relTarget : mode === "observe" ? !observation.trim() : !text.trim() || hasInvalidOnsetDate;
13332
12326
  return /* @__PURE__ */ jsxs(
13333
12327
  Modal,
13334
12328
  {
13335
12329
  open,
13336
12330
  onOpenChange,
13337
- size: "lg",
12331
+ size: "2xl",
13338
12332
  className,
13339
12333
  children: [
13340
12334
  /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsxs(ModalTitle, { children: [
13341
12335
  MODE_META[mode].title,
13342
12336
  prior ? ` \u2014 ${prior.text}` : ""
13343
12337
  ] }) }),
13344
- /* @__PURE__ */ jsx(ModalBody, { "data-testid": dataTestId, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
12338
+ /* @__PURE__ */ jsx(ModalBody, { "data-testid": dataTestId, className: "space-y-5", children: /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
13345
12339
  mode === "revise" && /* @__PURE__ */ jsxs(
13346
12340
  "div",
13347
12341
  {
13348
12342
  role: "alert",
13349
- className: "flex items-start gap-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950 dark:text-amber-200",
12343
+ className: "border-warning/30 bg-warning/10 text-warning-800 dark:text-warning-200 flex items-start gap-2 rounded-md border px-3 py-2 text-sm",
13350
12344
  children: [
13351
12345
  /* @__PURE__ */ jsx(AlertTriangle, { size: 16 }),
13352
12346
  /* @__PURE__ */ jsxs("span", { children: [
@@ -13419,21 +12413,19 @@ function ConditionEditor({
13419
12413
  placeholder: "e.g. Type 1 diabetes mellitus with neuropathy"
13420
12414
  }
13421
12415
  ),
13422
- mode === "refine" && /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 text-sm", children: [
13423
- /* @__PURE__ */ jsx(
13424
- "input",
13425
- {
13426
- type: "checkbox",
13427
- checked: progression,
13428
- onChange: (e) => setProgression(e.target.checked),
13429
- className: "accent-primary-600 h-4 w-4"
13430
- }
13431
- ),
13432
- "Disease progressed (e.g. new complication) rather than a more specific diagnosis"
13433
- ] }),
13434
- /* @__PURE__ */ jsxs("fieldset", { className: "space-y-2", children: [
13435
- /* @__PURE__ */ jsxs("legend", { className: "flex w-full items-center justify-between text-sm font-medium", children: [
13436
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
12416
+ mode === "refine" && /* @__PURE__ */ jsx(
12417
+ Checkbox,
12418
+ {
12419
+ size: "sm",
12420
+ checked: progression,
12421
+ onChange: (e) => setProgression(e.target.checked),
12422
+ label: "Disease progressed (e.g. new complication) rather than a more specific diagnosis"
12423
+ }
12424
+ ),
12425
+ /* @__PURE__ */ jsxs("fieldset", { className: "space-y-3", children: [
12426
+ /* @__PURE__ */ jsx("legend", { className: "sr-only", children: "Coding" }),
12427
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
12428
+ /* @__PURE__ */ jsxs("span", { className: "flex flex-wrap items-center gap-2 text-sm font-medium", children: [
13437
12429
  "Coding",
13438
12430
  /* @__PURE__ */ jsx(
13439
12431
  FieldFlag,
@@ -13460,82 +12452,136 @@ function ConditionEditor({
13460
12452
  }
13461
12453
  ]),
13462
12454
  leftIcon: /* @__PURE__ */ jsx(Plus, { size: 12 }),
13463
- className: "h-7 text-xs",
12455
+ className: "h-8 shrink-0 text-xs",
13464
12456
  children: "Add code"
13465
12457
  }
13466
12458
  )
13467
12459
  ] }),
13468
- effectiveRenderCodeSearch && !(mode === "add" && !text.trim()) && /* @__PURE__ */ jsx("div", { className: "max-w-md", children: effectiveRenderCodeSearch({
12460
+ effectiveRenderCodeSearch && !(mode === "add" && !text.trim()) && /* @__PURE__ */ jsx("div", { children: effectiveRenderCodeSearch({
13469
12461
  placeholder: "Search codes \u2014 ICD-10-CM / SNOMED\u2026",
13470
12462
  onPick: handleCodePick,
13471
12463
  onFreeText: (t) => setText((prev) => prev || t)
13472
12464
  }) }),
13473
12465
  coding.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Optional \u2014 a name-only problem is valid. Codes can be added any time." }),
13474
- coding.map((c, i) => /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
13475
- /* @__PURE__ */ jsx(
13476
- Select,
13477
- {
13478
- "aria-label": `Coding system ${i + 1}`,
13479
- options: CODING_SYSTEMS.map((s) => ({
13480
- value: s,
13481
- label: s
13482
- })),
13483
- value: c.system,
13484
- onValueChange: (v) => updateCoding(i, { system: v }),
13485
- disabled: codingUnknown,
13486
- className: "w-32"
13487
- }
13488
- ),
13489
- /* @__PURE__ */ jsx(
13490
- Input,
13491
- {
13492
- "aria-label": `Code ${i + 1}`,
13493
- value: c.code,
13494
- onChange: (e) => updateCoding(i, { code: e.target.value }),
13495
- placeholder: "Code",
13496
- disabled: codingUnknown,
13497
- className: "w-28 font-mono"
13498
- }
13499
- ),
13500
- /* @__PURE__ */ jsx(
13501
- Input,
13502
- {
13503
- "aria-label": `Display ${i + 1}`,
13504
- value: c.display ?? "",
13505
- onChange: (e) => updateCoding(i, { display: e.target.value }),
13506
- placeholder: "Display",
13507
- disabled: codingUnknown,
13508
- className: "min-w-32 flex-1"
13509
- }
13510
- ),
13511
- /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1 text-xs", children: [
13512
- /* @__PURE__ */ jsx(
13513
- "input",
13514
- {
13515
- type: "radio",
13516
- name: "primary-coding",
13517
- checked: Boolean(c.primary),
13518
- disabled: codingUnknown,
13519
- onChange: () => setCoding(
13520
- (prev) => prev.map((cc, j) => ({ ...cc, primary: j === i }))
13521
- ),
13522
- className: "accent-primary-600"
13523
- }
12466
+ coding.length > 0 && /* @__PURE__ */ jsxs(
12467
+ "div",
12468
+ {
12469
+ "aria-hidden": "true",
12470
+ "data-slot": "condition-coding-header",
12471
+ className: "text-muted-foreground hidden grid-cols-[minmax(8rem,1.1fr)_minmax(7rem,0.9fr)_minmax(10rem,1.5fr)_5.5rem_2.5rem] items-center gap-2 px-1 text-xs font-medium sm:!grid",
12472
+ children: [
12473
+ /* @__PURE__ */ jsx("span", { children: "System" }),
12474
+ /* @__PURE__ */ jsx("span", { children: "Code" }),
12475
+ /* @__PURE__ */ jsx("span", { children: "Display" }),
12476
+ /* @__PURE__ */ jsx("span", { className: "text-center", children: "Primary code" }),
12477
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Actions" })
12478
+ ]
12479
+ }
12480
+ ),
12481
+ coding.length > 0 && /* @__PURE__ */ jsx(
12482
+ RadioGroup,
12483
+ {
12484
+ name: "primary-coding",
12485
+ label: "Primary display code",
12486
+ value: String(
12487
+ Math.max(
12488
+ 0,
12489
+ coding.findIndex((entry) => entry.primary)
12490
+ )
13524
12491
  ),
13525
- "primary"
13526
- ] }),
13527
- /* @__PURE__ */ jsx(
13528
- Button,
13529
- {
13530
- variant: "ghost",
13531
- size: "icon",
13532
- "aria-label": `Remove code ${i + 1}`,
13533
- onClick: () => setCoding((prev) => prev.filter((_, j) => j !== i)),
13534
- className: "h-7 w-7",
13535
- children: /* @__PURE__ */ jsx(Trash2, { size: 14 })
13536
- }
13537
- )
13538
- ] }, i))
12492
+ onValueChange: (value) => {
12493
+ const selectedIndex = Number(value);
12494
+ setCoding(
12495
+ (prev) => prev.map((entry, index) => ({
12496
+ ...entry,
12497
+ primary: index === selectedIndex
12498
+ }))
12499
+ );
12500
+ },
12501
+ size: "sm",
12502
+ className: "gap-2 [&_[data-slot=radio-group-items]]:gap-2 sm:[&_[data-slot=radio-group-legend]]:sr-only",
12503
+ children: coding.map((c, i) => /* @__PURE__ */ jsxs(
12504
+ "div",
12505
+ {
12506
+ "data-slot": "condition-coding-row",
12507
+ className: "border-border/70 grid grid-cols-1 gap-2 rounded-md border p-2 sm:grid-cols-[minmax(8rem,1.1fr)_minmax(7rem,0.9fr)_minmax(10rem,1.5fr)_5.5rem_2.5rem] sm:items-center sm:border-0 sm:p-0",
12508
+ children: [
12509
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12510
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "System" }),
12511
+ /* @__PURE__ */ jsx(
12512
+ Select,
12513
+ {
12514
+ "aria-label": `Coding system ${i + 1}`,
12515
+ options: CODING_SYSTEMS.map((s) => ({
12516
+ value: s,
12517
+ label: s
12518
+ })),
12519
+ value: c.system,
12520
+ onValueChange: (v) => updateCoding(i, { system: v }),
12521
+ disabled: codingUnknown
12522
+ }
12523
+ )
12524
+ ] }),
12525
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12526
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "Code" }),
12527
+ /* @__PURE__ */ jsx(
12528
+ Input,
12529
+ {
12530
+ "aria-label": `Code ${i + 1}`,
12531
+ value: c.code,
12532
+ onChange: (e) => updateCoding(i, { code: e.target.value }),
12533
+ placeholder: "Code",
12534
+ disabled: codingUnknown,
12535
+ className: "font-mono"
12536
+ }
12537
+ )
12538
+ ] }),
12539
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12540
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs sm:hidden", children: "Display" }),
12541
+ /* @__PURE__ */ jsx(
12542
+ Input,
12543
+ {
12544
+ "aria-label": `Display ${i + 1}`,
12545
+ value: c.display ?? "",
12546
+ onChange: (e) => updateCoding(i, { display: e.target.value }),
12547
+ placeholder: "Display",
12548
+ disabled: codingUnknown
12549
+ }
12550
+ )
12551
+ ] }),
12552
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-10 items-center gap-1.5 text-xs sm:justify-center", children: [
12553
+ /* @__PURE__ */ jsx(
12554
+ Radio,
12555
+ {
12556
+ value: String(i),
12557
+ "aria-label": `Primary code: ${c.system} ${c.code || `row ${i + 1}`}`,
12558
+ disabled: codingUnknown
12559
+ }
12560
+ ),
12561
+ /* @__PURE__ */ jsx("span", { className: "sm:sr-only", children: "Primary code" })
12562
+ ] }),
12563
+ /* @__PURE__ */ jsx(
12564
+ Button,
12565
+ {
12566
+ variant: "ghost",
12567
+ size: "icon",
12568
+ "aria-label": `Remove code ${i + 1}`,
12569
+ disabled: codingUnknown,
12570
+ onClick: () => setCoding(
12571
+ (prev) => withSinglePrimary(
12572
+ prev.filter((_, index) => index !== i)
12573
+ )
12574
+ ),
12575
+ className: "h-10 w-10 justify-self-start sm:justify-self-center",
12576
+ children: /* @__PURE__ */ jsx(Trash2, { size: 14 })
12577
+ }
12578
+ )
12579
+ ]
12580
+ },
12581
+ i
12582
+ ))
12583
+ }
12584
+ )
13539
12585
  ] }),
13540
12586
  /* @__PURE__ */ jsx(
13541
12587
  Select,
@@ -13546,9 +12592,39 @@ function ConditionEditor({
13546
12592
  onValueChange: (v) => setVerification(v)
13547
12593
  }
13548
12594
  ),
13549
- /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
13550
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
13551
- "Severity",
12595
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-end gap-x-4 gap-y-2", children: [
12596
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12597
+ /* @__PURE__ */ jsx("span", { className: "block text-sm font-medium", children: "Severity" }),
12598
+ /* @__PURE__ */ jsx(
12599
+ "div",
12600
+ {
12601
+ role: "group",
12602
+ "aria-label": "Severity",
12603
+ className: "border-border inline-flex items-center overflow-hidden rounded-md border",
12604
+ children: SEVERITIES.map((s) => {
12605
+ const active = severity === s;
12606
+ return /* @__PURE__ */ jsx(
12607
+ "button",
12608
+ {
12609
+ type: "button",
12610
+ "aria-pressed": active,
12611
+ disabled: fields.severity?.known === false,
12612
+ onClick: () => setSeverity(active ? void 0 : s),
12613
+ className: cn(
12614
+ "border-border border-s px-2.5 py-1 text-xs font-medium capitalize transition-colors first:border-s-0",
12615
+ "disabled:opacity-40",
12616
+ active ? "bg-primary-600 text-white" : "bg-background text-muted-foreground hover:text-foreground"
12617
+ ),
12618
+ children: s
12619
+ },
12620
+ s
12621
+ );
12622
+ })
12623
+ }
12624
+ )
12625
+ ] }),
12626
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
12627
+ /* @__PURE__ */ jsx("span", { className: "block text-sm font-medium", children: "Certainty" }),
13552
12628
  /* @__PURE__ */ jsx(
13553
12629
  FieldFlag,
13554
12630
  {
@@ -13558,34 +12634,7 @@ function ConditionEditor({
13558
12634
  hasValue: Boolean(severity)
13559
12635
  }
13560
12636
  )
13561
- ] }),
13562
- /* @__PURE__ */ jsx(
13563
- "div",
13564
- {
13565
- role: "group",
13566
- "aria-label": "Severity",
13567
- className: "border-border inline-flex items-center overflow-hidden rounded-md border",
13568
- children: SEVERITIES.map((s) => {
13569
- const active = severity === s;
13570
- return /* @__PURE__ */ jsx(
13571
- "button",
13572
- {
13573
- type: "button",
13574
- "aria-pressed": active,
13575
- disabled: fields.severity?.known === false,
13576
- onClick: () => setSeverity(active ? void 0 : s),
13577
- className: cn(
13578
- "border-border border-s px-2.5 py-1 text-xs font-medium capitalize transition-colors first:border-s-0",
13579
- "disabled:opacity-40",
13580
- active ? "bg-primary-600 text-white" : "bg-background text-muted-foreground hover:text-foreground"
13581
- ),
13582
- children: s
13583
- },
13584
- s
13585
- );
13586
- })
13587
- }
13588
- )
12637
+ ] })
13589
12638
  ] }),
13590
12639
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
13591
12640
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
@@ -13600,28 +12649,33 @@ function ConditionEditor({
13600
12649
  }
13601
12650
  )
13602
12651
  ] }),
13603
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [
12652
+ /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 items-end gap-2 sm:grid-cols-[minmax(10rem,0.8fr)_auto_minmax(14rem,1.2fr)]", children: [
13604
12653
  /* @__PURE__ */ jsx(
13605
- Input,
12654
+ DateInput,
13606
12655
  {
13607
- type: "date",
13608
12656
  "aria-label": "Onset date (exact)",
13609
12657
  value: onsetDate,
13610
- onChange: (e) => setOnsetDate(e.target.value),
12658
+ onChange: (value) => {
12659
+ setOnsetDate(value);
12660
+ if (value) setOnsetFuzzy("");
12661
+ },
13611
12662
  disabled: fields.onset?.known === false,
13612
- className: "w-40"
12663
+ validateOnBlur: true,
12664
+ width: "full"
13613
12665
  }
13614
12666
  ),
13615
- /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: "or" }),
12667
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground pb-3 text-center text-xs", children: "or" }),
13616
12668
  /* @__PURE__ */ jsx(
13617
12669
  Input,
13618
12670
  {
13619
12671
  "aria-label": "Onset (fuzzy)",
13620
12672
  value: onsetFuzzy,
13621
- onChange: (e) => setOnsetFuzzy(e.target.value),
12673
+ onChange: (e) => {
12674
+ setOnsetFuzzy(e.target.value);
12675
+ if (e.target.value) setOnsetDate("");
12676
+ },
13622
12677
  disabled: fields.onset?.known === false,
13623
- placeholder: 'Fuzzy \u2014 "since her twenties", "~3 months ago"',
13624
- className: "min-w-48 flex-1"
12678
+ placeholder: 'Fuzzy \u2014 "since her twenties", "~3 months ago"'
13625
12679
  }
13626
12680
  )
13627
12681
  ] })
@@ -13642,7 +12696,7 @@ function ConditionEditor({
13642
12696
  "Uncertainty recorded:",
13643
12697
  " ",
13644
12698
  Object.entries(fields).map(
13645
- ([k, f]) => f?.known === false ? `${k} unknown` : `${k} ${f?.confidence ?? "soft"}`
12699
+ ([k, f]) => f?.known === false ? `${k} unknown` : `${f?.confidence ?? "unspecified"} confidence in ${k}`
13646
12700
  ).join(", ")
13647
12701
  ] })
13648
12702
  ] })
@@ -17845,7 +16899,7 @@ function DateRangePicker({
17845
16899
  className: "hover:bg-muted rounded-md p-1 transition-colors",
17846
16900
  "aria-label": "Next month",
17847
16901
  "data-slot": "date-range-nav",
17848
- children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 rtl:-scale-x-100" })
16902
+ children: /* @__PURE__ */ jsx(ChevronRight$1, { className: "h-4 w-4 rtl:-scale-x-100" })
17849
16903
  }
17850
16904
  )
17851
16905
  ]
@@ -17976,7 +17030,7 @@ function DateRangePicker({
17976
17030
  className: "hover:bg-muted rounded-md p-1 transition-colors md:hidden",
17977
17031
  "aria-label": "Next month",
17978
17032
  "data-slot": "date-range-nav",
17979
- children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 rtl:-scale-x-100" })
17033
+ children: /* @__PURE__ */ jsx(ChevronRight$1, { className: "h-4 w-4 rtl:-scale-x-100" })
17980
17034
  }
17981
17035
  )
17982
17036
  ]
@@ -18011,7 +17065,7 @@ function DateRangePicker({
18011
17065
  className: "hover:bg-muted rounded-md p-1 transition-colors",
18012
17066
  "aria-label": "Next month",
18013
17067
  "data-slot": "date-range-nav",
18014
- children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 rtl:-scale-x-100" })
17068
+ children: /* @__PURE__ */ jsx(ChevronRight$1, { className: "h-4 w-4 rtl:-scale-x-100" })
18015
17069
  }
18016
17070
  )
18017
17071
  ]
@@ -18976,7 +18030,7 @@ function PhotoPreview({
18976
18030
  {
18977
18031
  variant: "primary",
18978
18032
  onClick: onConfirm,
18979
- leftIcon: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }),
18033
+ leftIcon: /* @__PURE__ */ jsx(Check$1, { className: "h-4 w-4" }),
18980
18034
  children: "Use this photo"
18981
18035
  }
18982
18036
  )
@@ -19207,7 +18261,7 @@ function WebcamModal({
19207
18261
  WebcamModal.displayName = "WebcamModal";
19208
18262
 
19209
18263
  // src/components/DocumentScanner/types.ts
19210
- var DEFAULT_ACCEPTED_FILE_TYPES = [
18264
+ var DEFAULT_ACCEPTED_FILE_TYPES2 = [
19211
18265
  "image/jpeg",
19212
18266
  "image/jpg",
19213
18267
  "image/png",
@@ -19243,7 +18297,7 @@ function createPreviewUrl(file) {
19243
18297
  return URL.createObjectURL(file);
19244
18298
  }
19245
18299
  function useFileUpload({
19246
- acceptedFileTypes = [...DEFAULT_ACCEPTED_FILE_TYPES],
18300
+ acceptedFileTypes = [...DEFAULT_ACCEPTED_FILE_TYPES2],
19247
18301
  maxFileSizeMb = DEFAULT_MAX_FILE_SIZE_MB,
19248
18302
  multiple = false,
19249
18303
  onValidationError
@@ -19326,7 +18380,7 @@ function DocumentScanner({
19326
18380
  onScan,
19327
18381
  onResult,
19328
18382
  multiple = false,
19329
- acceptedFileTypes = [...DEFAULT_ACCEPTED_FILE_TYPES],
18383
+ acceptedFileTypes = [...DEFAULT_ACCEPTED_FILE_TYPES2],
19330
18384
  maxFileSizeMb = DEFAULT_MAX_FILE_SIZE_MB,
19331
18385
  disabled = false,
19332
18386
  enableWebcam = true,
@@ -21825,7 +20879,7 @@ function EmployeeProfileCard({
21825
20879
  "flex h-5 w-5 items-center justify-center rounded-full text-white",
21826
20880
  employee.isActive ? "bg-success" : "bg-destructive"
21827
20881
  ),
21828
- children: employee.isActive ? /* @__PURE__ */ jsx(Check$1, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
20882
+ children: employee.isActive ? /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
21829
20883
  }
21830
20884
  ),
21831
20885
  /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: fullName })
@@ -21939,7 +20993,7 @@ function EmployeeProfileCard({
21939
20993
  "data-cy": "header-payment-status",
21940
20994
  "data-slot": "employee-card-detail-row",
21941
20995
  children: employee.isPaid ? /* @__PURE__ */ jsxs(Fragment, { children: [
21942
- /* @__PURE__ */ jsx(Check$1, { className: "text-success-700 dark:text-success-400 h-4 w-4" }),
20996
+ /* @__PURE__ */ jsx(Check, { className: "text-success-700 dark:text-success-400 h-4 w-4" }),
21943
20997
  /* @__PURE__ */ jsx("span", { className: "text-success-700 dark:text-success-400", children: paid })
21944
20998
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
21945
20999
  /* @__PURE__ */ jsx(Clock$1, { className: "text-muted-foreground h-4 w-4" }),
@@ -24252,7 +23306,7 @@ var HealthSurveillance = React13.forwardRef(
24252
23306
  "aria-expanded": isOpen,
24253
23307
  "aria-label": `${isOpen ? "Hide" : "Show"} orders for ${programLabel(item.key)}`,
24254
23308
  className: "text-muted-foreground hover:text-foreground shrink-0",
24255
- children: isOpen ? /* @__PURE__ */ jsx(ChevronDown, { size: 14 }) : /* @__PURE__ */ jsx(ChevronRight$1, { size: 14, className: "rtl:-scale-x-100" })
23309
+ children: isOpen ? /* @__PURE__ */ jsx(ChevronDown, { size: 14 }) : /* @__PURE__ */ jsx(ChevronRight, { size: 14, className: "rtl:-scale-x-100" })
24256
23310
  }
24257
23311
  ) : /* @__PURE__ */ jsx("span", { className: "w-3.5 shrink-0" }),
24258
23312
  /* @__PURE__ */ jsx(Badge, { variant: badge.variant, size: "sm", children: badge.label }),
@@ -31660,7 +30714,7 @@ function PermissionItem({
31660
30714
  "aria-expanded": isExpanded,
31661
30715
  "aria-label": isExpanded ? `Collapse ${permission.name}` : `Expand ${permission.name}`,
31662
30716
  "data-slot": "perm-item-toggle",
31663
- children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown$1, { className: "text-muted-foreground h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "text-muted-foreground h-4 w-4 rtl:-scale-x-100" })
30717
+ children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown$1, { className: "text-muted-foreground h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight$1, { className: "text-muted-foreground h-4 w-4 rtl:-scale-x-100" })
31664
30718
  }
31665
30719
  ),
31666
30720
  !hasChildren && /* @__PURE__ */ jsx("span", { className: "w-5" }),
@@ -31804,7 +30858,7 @@ function PermissionsEditor({
31804
30858
  className: "hover:bg-muted/50 -ms-2 flex w-full items-center gap-2 rounded py-2 ps-2 text-start",
31805
30859
  "data-slot": "perm-group-header",
31806
30860
  children: [
31807
- expandedGroups.has(group.id) ? /* @__PURE__ */ jsx(ChevronDown$1, { className: "text-muted-foreground h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "text-muted-foreground h-4 w-4 rtl:-scale-x-100" }),
30861
+ expandedGroups.has(group.id) ? /* @__PURE__ */ jsx(ChevronDown$1, { className: "text-muted-foreground h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronRight$1, { className: "text-muted-foreground h-4 w-4 rtl:-scale-x-100" }),
31808
30862
  /* @__PURE__ */ jsx("span", { className: "font-semibold", "data-slot": "perm-group-name", children: group.name })
31809
30863
  ]
31810
30864
  }
@@ -44852,7 +43906,7 @@ function WebChartReportViewer({
44852
43906
  className: "flex items-center gap-3",
44853
43907
  children: [
44854
43908
  /* @__PURE__ */ jsx(ModalTitle, { children: currentReport?.name || "Report Results" }),
44855
- reportResult?.error ? /* @__PURE__ */ jsx(AlertTriangle$1, { className: "h-5 w-5 text-yellow-500" }) : reportResult?.success ? /* @__PURE__ */ jsx(Check$1, { className: "h-5 w-5 text-green-500" }) : null
43909
+ reportResult?.error ? /* @__PURE__ */ jsx(AlertTriangle$1, { className: "h-5 w-5 text-yellow-500" }) : reportResult?.success ? /* @__PURE__ */ jsx(Check, { className: "h-5 w-5 text-green-500" }) : null
44856
43910
  ]
44857
43911
  }
44858
43912
  ),
@@ -45310,6 +44364,6 @@ function WebsiteInputGroup({
45310
44364
  }
45311
44365
  WebsiteInputGroup.displayName = "WebsiteInputGroup";
45312
44366
 
45313
- export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, ButtonGroup, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, ChatComposer, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ComposerModelSelector, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, askOzwell, askOzwellStream, attributeSegments, calculateDateRange, centroid, chime, clearVoiceprints, clearWhatPrints, clusterEmbeddings, concernGroupKey, concernHistoryContent, cosine, countBadgeVariants, countChipVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, currentAssertion, decodeTo16kMono, defaultCaseManagementHeaderLabels, defaultOrderTabs, defaultReconciliationIsEqual, endsWithDone, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, generateId, getDefaultPresets, getDictationLoad, getExtendedPresets, getGoogleMapsSearchUrl, getGoogleMapsUrl, getOzwellConfig, getVoiceprints, getWakeWarm, inferSpeakerRoles, isConditionCodetype, isOzwellConfigured, isValidUrl, isWhisperLoaded, labelClusters, loadWhatPrints, medicationToOrder, mergeTurns, openRollingRecorder, orderToMedication, orderTypeForCodetype, panelVariants as reconciliationPanelVariants, saveWhatPrints, setVoiceprints, stripStopPhrase, subscribeDictationLoad, subscribeWakeWarm, toOzwellMessages, transcribeBlob, transcribeGate, transcribeSamples, transcribeSegments, transcribeServer, trimTrailingStopPhrase, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDiarization, useDocumentDetection, useDropzone, useFileUpload, useHeyOzwell, useOptionalToast, useSidebar, useSpeakerVerify, useToast, useVisitScribe, useVoiceSetup, useWakeWord, warmStopGate, warmWakeModels, warmWhisper, widgetVariants };
44367
+ export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, ButtonGroup, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, askOzwell, askOzwellStream, attributeSegments, calculateDateRange, centroid, chime, clearVoiceprints, clearWhatPrints, clusterEmbeddings, concernGroupKey, concernHistoryContent, cosine, countBadgeVariants, countChipVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, currentAssertion, decodeTo16kMono, defaultCaseManagementHeaderLabels, defaultOrderTabs, defaultReconciliationIsEqual, endsWithDone, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, generateId, getDefaultPresets, getDictationLoad, getExtendedPresets, getGoogleMapsSearchUrl, getGoogleMapsUrl, getOzwellConfig, getVoiceprints, getWakeWarm, inferSpeakerRoles, isConditionCodetype, isOzwellConfigured, isValidUrl, isWhisperLoaded, labelClusters, loadWhatPrints, medicationToOrder, mergeTurns, normalizeConditionCodingSystem, openRollingRecorder, orderToMedication, orderTypeForCodetype, panelVariants as reconciliationPanelVariants, saveWhatPrints, setVoiceprints, stripStopPhrase, subscribeDictationLoad, subscribeWakeWarm, toOzwellMessages, transcribeBlob, transcribeGate, transcribeSamples, transcribeSegments, transcribeServer, trimTrailingStopPhrase, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDiarization, useDocumentDetection, useDropzone, useFileUpload, useHeyOzwell, useOptionalToast, useSidebar, useSpeakerVerify, useToast, useVisitScribe, useVoiceSetup, useWakeWord, warmStopGate, warmWakeModels, warmWhisper, widgetVariants };
45314
44368
  //# sourceMappingURL=index.js.map
45315
44369
  //# sourceMappingURL=index.js.map