@mieweb/ui 0.7.3-dev.1 → 0.7.3-dev.10

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 (104) hide show
  1. package/README.md +45 -24
  2. package/agent/README.md +20 -0
  3. package/agent/init-agent.mjs +61 -0
  4. package/agent/mieweb-ui.instructions.md +169 -0
  5. package/dist/ag-grid.cjs +11 -0
  6. package/dist/ag-grid.cjs.map +1 -1
  7. package/dist/ag-grid.d.cts +4 -0
  8. package/dist/ag-grid.d.ts +4 -0
  9. package/dist/ag-grid.js +11 -0
  10. package/dist/ag-grid.js.map +1 -1
  11. package/dist/{chunk-URHXR5SC.cjs → chunk-3T3JKV6Q.cjs} +7 -7
  12. package/dist/{chunk-URHXR5SC.cjs.map → chunk-3T3JKV6Q.cjs.map} +1 -1
  13. package/dist/{chunk-CVZYOMEW.js → chunk-4VDL3C3X.js} +67 -3
  14. package/dist/chunk-4VDL3C3X.js.map +1 -0
  15. package/dist/{chunk-HIDV32ZX.js → chunk-AHEIXYLT.js} +3 -3
  16. package/dist/{chunk-HIDV32ZX.js.map → chunk-AHEIXYLT.js.map} +1 -1
  17. package/dist/{chunk-FKLUSYFP.cjs → chunk-BPUOFQNK.cjs} +4 -4
  18. package/dist/{chunk-FKLUSYFP.cjs.map → chunk-BPUOFQNK.cjs.map} +1 -1
  19. package/dist/{chunk-KRGKPUJH.js → chunk-CXMGO7TD.js} +6 -6
  20. package/dist/{chunk-KRGKPUJH.js.map → chunk-CXMGO7TD.js.map} +1 -1
  21. package/dist/{chunk-P6L74SKG.js → chunk-DEHYGDBC.js} +3 -3
  22. package/dist/{chunk-P6L74SKG.js.map → chunk-DEHYGDBC.js.map} +1 -1
  23. package/dist/{chunk-3D4ITDLO.js → chunk-EXSGF4YH.js} +3 -3
  24. package/dist/{chunk-3D4ITDLO.js.map → chunk-EXSGF4YH.js.map} +1 -1
  25. package/dist/{chunk-OAHORW4N.cjs → chunk-FRZGGC5P.cjs} +126 -97
  26. package/dist/chunk-FRZGGC5P.cjs.map +1 -0
  27. package/dist/{chunk-AFGADE3B.js → chunk-GP5CRU2I.js} +105 -26
  28. package/dist/chunk-GP5CRU2I.js.map +1 -0
  29. package/dist/{chunk-6J7UGYT5.cjs → chunk-JF6C5B3I.cjs} +4 -4
  30. package/dist/{chunk-6J7UGYT5.cjs.map → chunk-JF6C5B3I.cjs.map} +1 -1
  31. package/dist/{chunk-EGWWTIWS.js → chunk-MSGYPBA4.js} +124 -95
  32. package/dist/chunk-MSGYPBA4.js.map +1 -0
  33. package/dist/{chunk-WUNWHOLA.cjs → chunk-NHR33YWI.cjs} +104 -25
  34. package/dist/chunk-NHR33YWI.cjs.map +1 -0
  35. package/dist/{chunk-MJFF4AXH.cjs → chunk-O3V3VI4U.cjs} +67 -3
  36. package/dist/chunk-O3V3VI4U.cjs.map +1 -0
  37. package/dist/{chunk-RBS3GHDZ.cjs → chunk-O5UATYAO.cjs} +4 -4
  38. package/dist/{chunk-RBS3GHDZ.cjs.map → chunk-O5UATYAO.cjs.map} +1 -1
  39. package/dist/chunk-RP355H4V.js +203 -0
  40. package/dist/chunk-RP355H4V.js.map +1 -0
  41. package/dist/{chunk-DLBV42JD.js → chunk-U35KWHXP.js} +86 -7
  42. package/dist/chunk-U35KWHXP.js.map +1 -0
  43. package/dist/{chunk-ZBI52NP2.cjs → chunk-VAKZEVDE.cjs} +86 -7
  44. package/dist/chunk-VAKZEVDE.cjs.map +1 -0
  45. package/dist/chunk-VD6GHFMF.cjs +227 -0
  46. package/dist/chunk-VD6GHFMF.cjs.map +1 -0
  47. package/dist/{chunk-NQ2D2V6O.cjs → chunk-VPQ4WZ66.cjs} +25 -25
  48. package/dist/{chunk-NQ2D2V6O.cjs.map → chunk-VPQ4WZ66.cjs.map} +1 -1
  49. package/dist/{chunk-SYIFEJSF.cjs → chunk-WDHWMROB.cjs} +10 -10
  50. package/dist/{chunk-SYIFEJSF.cjs.map → chunk-WDHWMROB.cjs.map} +1 -1
  51. package/dist/{chunk-LC7YHZXM.js → chunk-XCIH6I4D.js} +4 -4
  52. package/dist/{chunk-LC7YHZXM.js.map → chunk-XCIH6I4D.js.map} +1 -1
  53. package/dist/{chunk-FTRGZOVJ.js → chunk-ZI6KNWOK.js} +3 -3
  54. package/dist/{chunk-FTRGZOVJ.js.map → chunk-ZI6KNWOK.js.map} +1 -1
  55. package/dist/components/Autocomplete/index.cjs +3 -3
  56. package/dist/components/Autocomplete/index.js +2 -2
  57. package/dist/components/DateInput/index.cjs +3 -3
  58. package/dist/components/DateInput/index.js +2 -2
  59. package/dist/components/Dropdown/index.cjs +8 -8
  60. package/dist/components/Dropdown/index.js +2 -2
  61. package/dist/components/Input/index.cjs +7 -3
  62. package/dist/components/Input/index.d.cts +17 -2
  63. package/dist/components/Input/index.d.ts +17 -2
  64. package/dist/components/Input/index.js +1 -1
  65. package/dist/components/MediaEditor/index.cjs +8 -8
  66. package/dist/components/MediaEditor/index.js +3 -3
  67. package/dist/components/PhoneInput/index.cjs +4 -4
  68. package/dist/components/PhoneInput/index.js +2 -2
  69. package/dist/components/RichTextEditor/index.cjs +6 -6
  70. package/dist/components/RichTextEditor/index.js +3 -3
  71. package/dist/components/Select/index.cjs +3 -3
  72. package/dist/components/Select/index.d.cts +11 -2
  73. package/dist/components/Select/index.d.ts +11 -2
  74. package/dist/components/Select/index.js +1 -1
  75. package/dist/components/SuperChat/index.cjs +6 -6
  76. package/dist/components/SuperChat/index.js +2 -2
  77. package/dist/components/Textarea/index.cjs +3 -3
  78. package/dist/components/Textarea/index.d.cts +11 -1
  79. package/dist/components/Textarea/index.d.ts +11 -1
  80. package/dist/components/Textarea/index.js +1 -1
  81. package/dist/esheet.cjs +8 -8
  82. package/dist/esheet.js +5 -5
  83. package/dist/index.cjs +534 -355
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.d.cts +26 -3
  86. package/dist/index.d.ts +26 -3
  87. package/dist/index.js +280 -105
  88. package/dist/index.js.map +1 -1
  89. package/dist/styles.css +1 -1
  90. package/dist/tailwind-preset.cjs +4 -4
  91. package/dist/tailwind-preset.js +1 -1
  92. package/package.json +5 -1
  93. package/dist/chunk-6ECKH4DJ.cjs +0 -147
  94. package/dist/chunk-6ECKH4DJ.cjs.map +0 -1
  95. package/dist/chunk-AFGADE3B.js.map +0 -1
  96. package/dist/chunk-CVZYOMEW.js.map +0 -1
  97. package/dist/chunk-DLBV42JD.js.map +0 -1
  98. package/dist/chunk-EGWWTIWS.js.map +0 -1
  99. package/dist/chunk-MJFF4AXH.cjs.map +0 -1
  100. package/dist/chunk-OAHORW4N.cjs.map +0 -1
  101. package/dist/chunk-WUNWHOLA.cjs.map +0 -1
  102. package/dist/chunk-YXCE2HSK.js +0 -124
  103. package/dist/chunk-YXCE2HSK.js.map +0 -1
  104. package/dist/chunk-ZBI52NP2.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -29,7 +29,7 @@ export { FloatingWindow, FloatingWindowProps, MinimizedWindow, MinimizedWindowPr
29
29
  import { P as PatientHistory, a as ProgramsMap } from './orderRows-BUJYgSc7.cjs';
30
30
  export { D as DueItem, b as DueStatus, H as HistoryAllergy, c as HistoryCondition, d as HistoryImmunization, e as HistoryMedication, f as HistoryObservation, g as HistoryOrder, h as HistoryProcedure, I as IsoDate, O as OrderRow, i as OrderRowStatus, j as OrderRowsOptions, k as ProgramMeta, l as buildChartOrderRows, m as buildEncounterOrderRows, n as dueForOrder, o as evaluateDue, p as evaluateProgram, q as isApplicable } from './orderRows-BUJYgSc7.cjs';
31
31
  import { InputProps } from './components/Input/index.cjs';
32
- export { Input, inputVariants } from './components/Input/index.cjs';
32
+ export { Input, floatingLabelVariants, inputVariants } from './components/Input/index.cjs';
33
33
  export { Label, LabelProps, labelVariants } from './components/Label/index.cjs';
34
34
  import { SpinnerProps } from './components/Spinner/index.cjs';
35
35
  export { FullPageSpinner, FullPageSpinnerProps, Spinner, SpinnerWithLabel, SpinnerWithLabelProps, spinnerVariants } from './components/Spinner/index.cjs';
@@ -978,7 +978,7 @@ interface SuggestedActionsProps {
978
978
  }
979
979
  declare function SuggestedActions({ actions, onSelect, className, }: SuggestedActionsProps): react_jsx_runtime.JSX.Element;
980
980
  declare const chatVariants: (props?: ({
981
- variant?: "default" | "embedded" | "floating" | null | undefined;
981
+ variant?: "floating" | "default" | "embedded" | null | undefined;
982
982
  size?: "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
983
983
  } & class_variance_authority_types.ClassProp) | undefined) => string;
984
984
  interface AIChatProps extends VariantProps<typeof chatVariants>, AIChatCallbacks {
@@ -1037,6 +1037,13 @@ type ProviderModelOption = ProviderModelValue & {
1037
1037
  providerLabel?: string;
1038
1038
  id?: string;
1039
1039
  };
1040
+ /** A reasoning-effort level offered alongside the model. */
1041
+ type ComposerEffortOption = {
1042
+ value: string;
1043
+ label: string;
1044
+ /** Optional secondary line, e.g. a caveat about cost or latency. */
1045
+ description?: string;
1046
+ };
1040
1047
  type ComposerModelSelectorBaseProps = {
1041
1048
  models: ProviderModelOption[];
1042
1049
  value: ProviderModelValue | null;
@@ -1048,6 +1055,22 @@ type ComposerModelSelectorBaseProps = {
1048
1055
  anyLabel?: string;
1049
1056
  emptyLabel?: string;
1050
1057
  ariaLabel?: string;
1058
+ /**
1059
+ * Reasoning-effort levels for the selected model. Omit or pass an empty
1060
+ * array to hide the effort row entirely, which is what a model that cannot
1061
+ * reason should resolve to — the levels are provider-specific, so the caller
1062
+ * owns deciding which apply.
1063
+ */
1064
+ effortOptions?: ComposerEffortOption[];
1065
+ /** Currently selected effort. */
1066
+ effort?: string | null;
1067
+ /** Effort marked with a "default" badge in the list. */
1068
+ defaultEffort?: string;
1069
+ onEffortChange?: (value: string) => void;
1070
+ effortLabel?: string;
1071
+ effortHint?: string;
1072
+ defaultBadgeLabel?: string;
1073
+ backLabel?: string;
1051
1074
  };
1052
1075
  type ControlledProviderFilterProps = {
1053
1076
  providerFilter: string | null;
@@ -1058,7 +1081,7 @@ type UncontrolledProviderFilterProps = {
1058
1081
  onProviderFilterChange?: (provider: string | null) => void;
1059
1082
  };
1060
1083
  type ComposerModelSelectorProps = ComposerModelSelectorBaseProps & (ControlledProviderFilterProps | UncontrolledProviderFilterProps);
1061
- declare function ComposerModelSelector({ models, value, providerFilter, onProviderFilterChange, onChange, disabled, className, boundaryRef, placeholder, anyLabel, emptyLabel, ariaLabel, }: ComposerModelSelectorProps): react_jsx_runtime.JSX.Element;
1084
+ declare function ComposerModelSelector({ models, value, providerFilter, onProviderFilterChange, onChange, disabled, className, boundaryRef, placeholder, anyLabel, emptyLabel, ariaLabel, effortOptions, effort, defaultEffort, onEffortChange, effortLabel, effortHint, defaultBadgeLabel, backLabel, }: ComposerModelSelectorProps): react_jsx_runtime.JSX.Element;
1062
1085
  declare namespace ComposerModelSelector {
1063
1086
  var displayName: string;
1064
1087
  }
package/dist/index.d.ts CHANGED
@@ -29,7 +29,7 @@ export { FloatingWindow, FloatingWindowProps, MinimizedWindow, MinimizedWindowPr
29
29
  import { P as PatientHistory, a as ProgramsMap } from './orderRows-BUJYgSc7.js';
30
30
  export { D as DueItem, b as DueStatus, H as HistoryAllergy, c as HistoryCondition, d as HistoryImmunization, e as HistoryMedication, f as HistoryObservation, g as HistoryOrder, h as HistoryProcedure, I as IsoDate, O as OrderRow, i as OrderRowStatus, j as OrderRowsOptions, k as ProgramMeta, l as buildChartOrderRows, m as buildEncounterOrderRows, n as dueForOrder, o as evaluateDue, p as evaluateProgram, q as isApplicable } from './orderRows-BUJYgSc7.js';
31
31
  import { InputProps } from './components/Input/index.js';
32
- export { Input, inputVariants } from './components/Input/index.js';
32
+ export { Input, floatingLabelVariants, inputVariants } from './components/Input/index.js';
33
33
  export { Label, LabelProps, labelVariants } from './components/Label/index.js';
34
34
  import { SpinnerProps } from './components/Spinner/index.js';
35
35
  export { FullPageSpinner, FullPageSpinnerProps, Spinner, SpinnerWithLabel, SpinnerWithLabelProps, spinnerVariants } from './components/Spinner/index.js';
@@ -978,7 +978,7 @@ interface SuggestedActionsProps {
978
978
  }
979
979
  declare function SuggestedActions({ actions, onSelect, className, }: SuggestedActionsProps): react_jsx_runtime.JSX.Element;
980
980
  declare const chatVariants: (props?: ({
981
- variant?: "default" | "embedded" | "floating" | null | undefined;
981
+ variant?: "floating" | "default" | "embedded" | null | undefined;
982
982
  size?: "sm" | "md" | "lg" | "xl" | "full" | null | undefined;
983
983
  } & class_variance_authority_types.ClassProp) | undefined) => string;
984
984
  interface AIChatProps extends VariantProps<typeof chatVariants>, AIChatCallbacks {
@@ -1037,6 +1037,13 @@ type ProviderModelOption = ProviderModelValue & {
1037
1037
  providerLabel?: string;
1038
1038
  id?: string;
1039
1039
  };
1040
+ /** A reasoning-effort level offered alongside the model. */
1041
+ type ComposerEffortOption = {
1042
+ value: string;
1043
+ label: string;
1044
+ /** Optional secondary line, e.g. a caveat about cost or latency. */
1045
+ description?: string;
1046
+ };
1040
1047
  type ComposerModelSelectorBaseProps = {
1041
1048
  models: ProviderModelOption[];
1042
1049
  value: ProviderModelValue | null;
@@ -1048,6 +1055,22 @@ type ComposerModelSelectorBaseProps = {
1048
1055
  anyLabel?: string;
1049
1056
  emptyLabel?: string;
1050
1057
  ariaLabel?: string;
1058
+ /**
1059
+ * Reasoning-effort levels for the selected model. Omit or pass an empty
1060
+ * array to hide the effort row entirely, which is what a model that cannot
1061
+ * reason should resolve to — the levels are provider-specific, so the caller
1062
+ * owns deciding which apply.
1063
+ */
1064
+ effortOptions?: ComposerEffortOption[];
1065
+ /** Currently selected effort. */
1066
+ effort?: string | null;
1067
+ /** Effort marked with a "default" badge in the list. */
1068
+ defaultEffort?: string;
1069
+ onEffortChange?: (value: string) => void;
1070
+ effortLabel?: string;
1071
+ effortHint?: string;
1072
+ defaultBadgeLabel?: string;
1073
+ backLabel?: string;
1051
1074
  };
1052
1075
  type ControlledProviderFilterProps = {
1053
1076
  providerFilter: string | null;
@@ -1058,7 +1081,7 @@ type UncontrolledProviderFilterProps = {
1058
1081
  onProviderFilterChange?: (provider: string | null) => void;
1059
1082
  };
1060
1083
  type ComposerModelSelectorProps = ComposerModelSelectorBaseProps & (ControlledProviderFilterProps | UncontrolledProviderFilterProps);
1061
- declare function ComposerModelSelector({ models, value, providerFilter, onProviderFilterChange, onChange, disabled, className, boundaryRef, placeholder, anyLabel, emptyLabel, ariaLabel, }: ComposerModelSelectorProps): react_jsx_runtime.JSX.Element;
1084
+ declare function ComposerModelSelector({ models, value, providerFilter, onProviderFilterChange, onChange, disabled, className, boundaryRef, placeholder, anyLabel, emptyLabel, ariaLabel, effortOptions, effort, defaultEffort, onEffortChange, effortLabel, effortHint, defaultBadgeLabel, backLabel, }: ComposerModelSelectorProps): react_jsx_runtime.JSX.Element;
1062
1085
  declare namespace ComposerModelSelector {
1063
1086
  var displayName: string;
1064
1087
  }
package/dist/index.js CHANGED
@@ -35,16 +35,16 @@ export { Skeleton, SkeletonCard, SkeletonTable, SkeletonText, skeletonVariants }
35
35
  import { Spinner, SpinnerWithLabel } from './chunk-UA7E7PDS.js';
36
36
  export { FullPageSpinner, Spinner, SpinnerWithLabel, spinnerVariants } from './chunk-UA7E7PDS.js';
37
37
  export { Pagination, SimplePagination, paginationButtonVariants } from './chunk-FDUA6OGN.js';
38
- export { PhoneInput, PhoneInputGroup } from './chunk-3D4ITDLO.js';
38
+ export { PhoneInput, PhoneInputGroup } from './chunk-EXSGF4YH.js';
39
39
  import { Progress } from './chunk-CEQJGUAS.js';
40
40
  export { CircularProgress, Progress, circularProgressVariants, progressBarFillVariants, progressBarTrackVariants } from './chunk-CEQJGUAS.js';
41
41
  export { QuickAction, QuickActionGroup, QuickActionIcons, quickActionIconVariants, quickActionVariants } from './chunk-5U6GETAW.js';
42
42
  import { RecordButton } from './chunk-VNWJTCBQ.js';
43
43
  export { RecordButton, formatDuration, recordButtonVariants } from './chunk-VNWJTCBQ.js';
44
- export { RichTextEditor, convertAngleBracketsToMustache, processDictation } from './chunk-FTRGZOVJ.js';
44
+ export { RichTextEditor, convertAngleBracketsToMustache, processDictation } from './chunk-ZI6KNWOK.js';
45
45
  export { Separator, separatorVariants } from './chunk-OQWZYKJM.js';
46
- import { Dropdown, DropdownItem, DropdownSeparator, DropdownContent, DropdownHeader } from './chunk-HIDV32ZX.js';
47
- export { Dropdown, DropdownContent, DropdownHeader, DropdownItem, DropdownLabel, DropdownSeparator } from './chunk-HIDV32ZX.js';
46
+ import { Dropdown, DropdownItem, DropdownSeparator, DropdownContent, DropdownHeader } from './chunk-AHEIXYLT.js';
47
+ export { Dropdown, DropdownContent, DropdownHeader, DropdownItem, DropdownLabel, DropdownSeparator } from './chunk-AHEIXYLT.js';
48
48
  export { FloatingWindow, MinimizedWindow } from './chunk-N3Y43KOB.js';
49
49
  export { CodeBlock, MarkdownRenderer, highlightCode, useMarkdown } from './chunk-Z4PECE5S.js';
50
50
  export { CsvBlock } from './chunk-5J5PEUUA.js';
@@ -52,7 +52,7 @@ export { HtmlPreviewBlock } from './chunk-UZ5NGGMI.js';
52
52
  export { MermaidBlock } from './chunk-EHQ77LL5.js';
53
53
  export { SurveyBlock } from './chunk-DWCYEPTT.js';
54
54
  export { FenceBlock } from './chunk-NLBT5O2X.js';
55
- export { FillerWordsModal, MediaEditor, SilenceSettingsModal, SpeedMarkerMenu, WordEditorModal } from './chunk-LC7YHZXM.js';
55
+ export { FillerWordsModal, MediaEditor, SilenceSettingsModal, SpeedMarkerMenu, WordEditorModal } from './chunk-XCIH6I4D.js';
56
56
  export { Slider, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants } from './chunk-OTQ72WX3.js';
57
57
  import './chunk-RISZWWEQ.js';
58
58
  export { MediaPlayer, inferMediaKind, mediaPlayerVariants } from './chunk-EMMYFHOT.js';
@@ -64,39 +64,39 @@ export { CollabStatus, defaultCollabStatusLabels, useYjsCollabStatus } from './c
64
64
  export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './chunk-BJKAVWED.js';
65
65
  import { CountryDropdownBase } from './chunk-4PIW3Y5M.js';
66
66
  export { CountryCodeDropdown, formatE164, validatePhoneNumber } from './chunk-4PIW3Y5M.js';
67
- export { miewebUIPreset, miewebUISafelist } from './chunk-CVZYOMEW.js';
67
+ export { miewebUIPreset, miewebUISafelist } from './chunk-4VDL3C3X.js';
68
68
  import { Alert, AlertTitle, AlertDescription } from './chunk-6EWJGRC3.js';
69
69
  export { Alert, AlertDescription, AlertTitle, alertVariants } from './chunk-6EWJGRC3.js';
70
70
  import { AlertDialog } from './chunk-FPVRQCCL.js';
71
71
  export { AlertDialog } from './chunk-FPVRQCCL.js';
72
72
  export { AudioPlayer, ProgressBar, audioPlayerVariants, formatTime as formatAudioTime, playButtonVariants } from './chunk-XO3WLK65.js';
73
73
  export { AudioRecorder, audioRecorderVariants, controlButtonVariants, formatTime, waveformContainerVariants } from './chunk-2DW4PUJD.js';
74
- export { Autocomplete } from './chunk-P6L74SKG.js';
74
+ export { Autocomplete } from './chunk-DEHYGDBC.js';
75
75
  import { Avatar } from './chunk-DCBMTFLE.js';
76
76
  export { Avatar, AvatarGroup, avatarVariants, getInitials } from './chunk-DCBMTFLE.js';
77
77
  import './chunk-IQ4KQJAO.js';
78
78
  import { evaluateDue, completedKeys, normalizeOrders } from './chunk-Y5KEFV5O.js';
79
79
  export { buildChartOrderRows, buildEncounterOrderRows, dueForOrder, evaluateDue, evaluateProgram, isApplicable } from './chunk-Y5KEFV5O.js';
80
- import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-KRGKPUJH.js';
81
- export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-KRGKPUJH.js';
82
- import { Textarea } from './chunk-AFGADE3B.js';
83
- export { Textarea, textareaVariants } from './chunk-AFGADE3B.js';
80
+ import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-CXMGO7TD.js';
81
+ export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-CXMGO7TD.js';
82
+ import { Textarea } from './chunk-GP5CRU2I.js';
83
+ export { Textarea, textareaVariants } from './chunk-GP5CRU2I.js';
84
84
  import { Tooltip } from './chunk-FJ7YPVKV.js';
85
85
  export { Tooltip } from './chunk-FJ7YPVKV.js';
86
86
  import { RadioGroup, Radio } from './chunk-QUUBTNMH.js';
87
87
  export { Radio, RadioGroup, radioVariants } from './chunk-QUUBTNMH.js';
88
88
  import { Label } from './chunk-I3WGZPI6.js';
89
89
  export { Label, labelVariants } from './chunk-I3WGZPI6.js';
90
- import { Select } from './chunk-DLBV42JD.js';
91
- export { Select, selectTriggerVariants } from './chunk-DLBV42JD.js';
90
+ import { Select } from './chunk-U35KWHXP.js';
91
+ export { Select, selectTriggerVariants } from './chunk-U35KWHXP.js';
92
92
  import { Card, CardHeader, CardContent, CardTitle } from './chunk-QYSUYB3S.js';
93
93
  export { Card, CardActions, CardBadge, CardCollapsible, CardContent, CardDescription, CardDivider, CardFooter, CardHeader, CardMedia, CardStat, CardTitle, cardAccentVariants, cardVariants } from './chunk-QYSUYB3S.js';
94
- import { DateInput } from './chunk-EGWWTIWS.js';
95
- export { DateInput } from './chunk-EGWWTIWS.js';
94
+ import { DateInput } from './chunk-MSGYPBA4.js';
95
+ export { DateInput } from './chunk-MSGYPBA4.js';
96
96
  import { Modal, ModalHeader, ModalTitle, ModalClose, ModalBody, ModalFooter } from './chunk-XMCIXHGH.js';
97
97
  export { Modal, ModalBody, ModalClose, ModalFooter, ModalHeader, ModalTitle, modalContentVariants, modalOverlayVariants } from './chunk-XMCIXHGH.js';
98
- import { Input, inputVariants } from './chunk-YXCE2HSK.js';
99
- export { Input, inputVariants } from './chunk-YXCE2HSK.js';
98
+ import { Input, inputVariants } from './chunk-RP355H4V.js';
99
+ export { Input, floatingLabelVariants, inputVariants } from './chunk-RP355H4V.js';
100
100
  import { Plus, GripVertical, RefreshCw, Pencil, AlertCircle, ArrowLeft, Users, FilePlus, CheckCircle, ChevronDown, Clock, FileText, ClipboardList, Stethoscope, Mail, Phone, ClipboardCheck, Eye, Info, Link, ChevronUp, History, StickyNote, ExternalLink, MoreVertical, Trash2, 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-3PXOIAF6.js';
101
101
  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, 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, 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, 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, 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-3PXOIAF6.js';
102
102
  import { Button, buttonVariants } from './chunk-D2GID3YK.js';
@@ -135,7 +135,7 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
135
135
  import { cva } from 'class-variance-authority';
136
136
  import * as ReactDOM from 'react-dom';
137
137
  import { createPortal } from 'react-dom';
138
- import { FileUp, X, AlertCircle as AlertCircle$1, ChevronUp as ChevronUp$1, Check, Calendar as Calendar$1, ChevronLeft, ChevronRight as ChevronRight$1, ChevronDown as ChevronDown$1, 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';
138
+ import { FileUp, X, AlertCircle as AlertCircle$1, ChevronUp as ChevronUp$1, Check, ChevronRight as ChevronRight$1, ChevronLeft, Calendar as Calendar$1, ChevronDown as ChevronDown$1, 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';
139
139
 
140
140
  var SEX_OPTIONS = [
141
141
  { value: "F", label: "Female" },
@@ -1971,12 +1971,23 @@ function ComposerModelSelector({
1971
1971
  placeholder = "Model",
1972
1972
  anyLabel = "Any",
1973
1973
  emptyLabel = "No models",
1974
- ariaLabel = "Model"
1974
+ ariaLabel = "Model",
1975
+ effortOptions,
1976
+ effort = null,
1977
+ defaultEffort,
1978
+ onEffortChange,
1979
+ effortLabel = "Effort",
1980
+ effortHint,
1981
+ defaultBadgeLabel = "Default",
1982
+ backLabel = "Back"
1975
1983
  }) {
1976
1984
  const [open, setOpen] = React13.useState(false);
1985
+ const [view, setView] = React13.useState("models");
1986
+ const [effortHighlight, setEffortHighlight] = React13.useState(0);
1977
1987
  const [internalProviderFilter, setInternalProviderFilter] = React13.useState(null);
1978
1988
  const [highlightedIndex, setHighlightedIndex] = React13.useState(0);
1979
1989
  const listRef = React13.useRef(null);
1990
+ const effortListRef = React13.useRef(null);
1980
1991
  const menuId = React13.useId();
1981
1992
  const {
1982
1993
  anchorRef: triggerRef,
@@ -2040,6 +2051,10 @@ function ComposerModelSelector({
2040
2051
  (index) => `${menuId}-option-${index}`,
2041
2052
  [menuId]
2042
2053
  );
2054
+ const getEffortOptionId = React13.useCallback(
2055
+ (index) => `${menuId}-effort-option-${index}`,
2056
+ [menuId]
2057
+ );
2043
2058
  const activeOptionId = open && renderedModels[highlightedIndex] ? getOptionId(highlightedIndex) : void 0;
2044
2059
  const selectedRenderedIndex = React13.useMemo(
2045
2060
  () => selectedKey ? renderedModels.findIndex(
@@ -2072,6 +2087,48 @@ function ComposerModelSelector({
2072
2087
  },
2073
2088
  [close, onChange]
2074
2089
  );
2090
+ const efforts = React13.useMemo(() => effortOptions ?? [], [effortOptions]);
2091
+ const activeEffortOptionId = open && efforts[effortHighlight] ? getEffortOptionId(effortHighlight) : void 0;
2092
+ const selectedEffortOption = efforts.find(
2093
+ (option) => option.value === effort
2094
+ );
2095
+ const selectEffort = React13.useCallback(
2096
+ (value2) => {
2097
+ onEffortChange?.(value2);
2098
+ close();
2099
+ },
2100
+ [close, onEffortChange]
2101
+ );
2102
+ const handleEffortKeyDown = (event) => {
2103
+ if (efforts.length === 0) return;
2104
+ if (event.key === "ArrowDown") {
2105
+ event.preventDefault();
2106
+ setEffortHighlight((current) => (current + 1) % efforts.length);
2107
+ }
2108
+ if (event.key === "ArrowUp") {
2109
+ event.preventDefault();
2110
+ setEffortHighlight(
2111
+ (current) => (current - 1 + efforts.length) % efforts.length
2112
+ );
2113
+ }
2114
+ if (event.key === "Home") {
2115
+ event.preventDefault();
2116
+ setEffortHighlight(0);
2117
+ }
2118
+ if (event.key === "End") {
2119
+ event.preventDefault();
2120
+ setEffortHighlight(efforts.length - 1);
2121
+ }
2122
+ if (event.key === "ArrowLeft" || event.key === "Backspace") {
2123
+ event.preventDefault();
2124
+ setView("models");
2125
+ }
2126
+ if (event.key === "Enter" || event.key === " ") {
2127
+ event.preventDefault();
2128
+ const highlighted = efforts[effortHighlight];
2129
+ if (highlighted) selectEffort(highlighted.value);
2130
+ }
2131
+ };
2075
2132
  const outsideRefs = React13.useMemo(
2076
2133
  () => [triggerRef, menuRef],
2077
2134
  [triggerRef, menuRef]
@@ -2082,6 +2139,15 @@ function ComposerModelSelector({
2082
2139
  if (!open) return;
2083
2140
  setHighlightedIndex(selectedRenderedIndex >= 0 ? selectedRenderedIndex : 0);
2084
2141
  }, [activeProviderFilter, open, selectedRenderedIndex]);
2142
+ React13.useEffect(() => {
2143
+ if (!open) return;
2144
+ setView("models");
2145
+ }, [open]);
2146
+ React13.useEffect(() => {
2147
+ if (!open) return;
2148
+ const current = efforts.findIndex((option) => option.value === effort);
2149
+ setEffortHighlight(current >= 0 ? current : 0);
2150
+ }, [effort, efforts, open]);
2085
2151
  React13.useEffect(() => {
2086
2152
  if (!open) return;
2087
2153
  setHighlightedIndex(
@@ -2090,10 +2156,11 @@ function ComposerModelSelector({
2090
2156
  }, [open, renderedModels.length]);
2091
2157
  React13.useEffect(() => {
2092
2158
  if (!open) return;
2093
- requestAnimationFrame(
2094
- () => listRef.current?.focus({ preventScroll: true })
2095
- );
2096
- }, [open]);
2159
+ requestAnimationFrame(() => {
2160
+ const target = view === "effort" ? effortListRef.current : listRef.current;
2161
+ target?.focus({ preventScroll: true });
2162
+ });
2163
+ }, [open, view]);
2097
2164
  const handleTriggerKeyDown = (event) => {
2098
2165
  if (event.key === "ArrowDown" || event.key === "ArrowUp") {
2099
2166
  event.preventDefault();
@@ -2151,6 +2218,14 @@ function ComposerModelSelector({
2151
2218
  ),
2152
2219
  children: [
2153
2220
  /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: selectedOption?.label ?? selectedOption?.model ?? placeholder }),
2221
+ selectedEffortOption && /* @__PURE__ */ jsx(
2222
+ "span",
2223
+ {
2224
+ "data-slot": "composer-model-selector-trigger-effort",
2225
+ className: "text-muted-foreground min-w-0 truncate font-normal",
2226
+ children: selectedEffortOption.label
2227
+ }
2228
+ ),
2154
2229
  /* @__PURE__ */ jsx(ChevronUp$1, { "aria-hidden": "true", className: "h-3.5 w-3.5 shrink-0" })
2155
2230
  ]
2156
2231
  }
@@ -2167,90 +2242,190 @@ function ComposerModelSelector({
2167
2242
  "animate-in fade-in overflow-hidden duration-100"
2168
2243
  ),
2169
2244
  children: [
2170
- /* @__PURE__ */ jsx(
2171
- "div",
2172
- {
2173
- "data-slot": "composer-model-selector-provider-filter",
2174
- className: "border-border flex min-h-9 items-center gap-1 overflow-x-auto overflow-y-hidden border-b p-2",
2175
- children: [null, ...providers].map((provider) => {
2176
- const selected = activeProviderFilter === provider;
2177
- return /* @__PURE__ */ jsx(
2178
- "button",
2245
+ view === "models" && /* @__PURE__ */ jsxs(Fragment, { children: [
2246
+ /* @__PURE__ */ jsx(
2247
+ "div",
2248
+ {
2249
+ "data-slot": "composer-model-selector-provider-filter",
2250
+ className: "border-border flex min-h-9 items-center gap-1 overflow-x-auto overflow-y-hidden border-b p-2",
2251
+ children: [null, ...providers].map((provider) => {
2252
+ const selected = activeProviderFilter === provider;
2253
+ return /* @__PURE__ */ jsx(
2254
+ "button",
2255
+ {
2256
+ type: "button",
2257
+ "aria-pressed": selected,
2258
+ onMouseDown: (event) => event.preventDefault(),
2259
+ onClick: () => setProvider(provider),
2260
+ className: cn(
2261
+ "inline-flex h-6 shrink-0 items-center justify-center rounded-full px-2.5 text-xs font-medium whitespace-nowrap transition-colors",
2262
+ "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
2263
+ selected ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"
2264
+ ),
2265
+ children: provider === null ? anyLabel : providerLabels.get(provider) ?? provider
2266
+ },
2267
+ provider ?? "all-providers"
2268
+ );
2269
+ })
2270
+ }
2271
+ ),
2272
+ /* @__PURE__ */ jsx(
2273
+ "div",
2274
+ {
2275
+ ref: listRef,
2276
+ id: menuId,
2277
+ role: "listbox",
2278
+ "aria-label": ariaLabel,
2279
+ "aria-activedescendant": activeOptionId,
2280
+ tabIndex: -1,
2281
+ onKeyDown: handleMenuKeyDown,
2282
+ className: "min-h-0 flex-1 overflow-y-auto p-1",
2283
+ 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(
2284
+ "div",
2179
2285
  {
2180
- type: "button",
2181
- "aria-pressed": selected,
2182
- onMouseDown: (event) => event.preventDefault(),
2183
- onClick: () => setProvider(provider),
2184
- className: cn(
2185
- "inline-flex h-6 shrink-0 items-center justify-center rounded-full px-2.5 text-xs font-medium whitespace-nowrap transition-colors",
2186
- "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
2187
- selected ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"
2188
- ),
2189
- children: provider === null ? anyLabel : providerLabels.get(provider) ?? provider
2286
+ role: "group",
2287
+ "aria-label": providerLabels.get(group.provider) ?? group.provider,
2288
+ children: [
2289
+ /* @__PURE__ */ jsx("div", { className: "text-muted-foreground px-3 py-1.5 text-xs font-semibold uppercase", children: providerLabels.get(group.provider) ?? group.provider }),
2290
+ group.options.map((renderedModel) => {
2291
+ const { index, key, option: model } = renderedModel;
2292
+ const selected = optionKey(model) === selectedKey;
2293
+ const highlighted = index === highlightedIndex;
2294
+ return /* @__PURE__ */ jsxs(
2295
+ "button",
2296
+ {
2297
+ id: getOptionId(index),
2298
+ type: "button",
2299
+ role: "option",
2300
+ "aria-selected": selected,
2301
+ onMouseDown: (event) => event.preventDefault(),
2302
+ onClick: () => selectModel(model),
2303
+ onMouseEnter: () => setHighlightedIndex(index),
2304
+ className: cn(
2305
+ "flex w-full items-center gap-2 rounded-md px-3 py-2 text-start text-sm",
2306
+ "focus-visible:ring-ring transition-colors focus-visible:ring-2 focus-visible:outline-none",
2307
+ highlighted && "bg-muted",
2308
+ selected && "bg-primary/10 text-primary"
2309
+ ),
2310
+ children: [
2311
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: model.label ?? model.model }),
2312
+ selected && /* @__PURE__ */ jsx(
2313
+ Check,
2314
+ {
2315
+ "aria-hidden": "true",
2316
+ className: "text-primary h-4 w-4 shrink-0"
2317
+ }
2318
+ )
2319
+ ]
2320
+ },
2321
+ key
2322
+ );
2323
+ })
2324
+ ]
2190
2325
  },
2191
- provider ?? "all-providers"
2192
- );
2193
- })
2194
- }
2195
- ),
2196
- /* @__PURE__ */ jsx(
2197
- "div",
2198
- {
2199
- ref: listRef,
2200
- id: menuId,
2201
- role: "listbox",
2202
- "aria-label": ariaLabel,
2203
- "aria-activedescendant": activeOptionId,
2204
- tabIndex: -1,
2205
- onKeyDown: handleMenuKeyDown,
2206
- className: "min-h-0 flex-1 overflow-y-auto p-1",
2207
- 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(
2208
- "div",
2209
- {
2210
- role: "group",
2211
- "aria-label": providerLabels.get(group.provider) ?? group.provider,
2212
- children: [
2213
- /* @__PURE__ */ jsx("div", { className: "text-muted-foreground px-3 py-1.5 text-xs font-semibold uppercase", children: providerLabels.get(group.provider) ?? group.provider }),
2214
- group.options.map((renderedModel) => {
2215
- const { index, key, option: model } = renderedModel;
2216
- const selected = optionKey(model) === selectedKey;
2217
- const highlighted = index === highlightedIndex;
2218
- return /* @__PURE__ */ jsxs(
2219
- "button",
2220
- {
2221
- id: getOptionId(index),
2222
- type: "button",
2223
- role: "option",
2224
- "aria-selected": selected,
2225
- onMouseDown: (event) => event.preventDefault(),
2226
- onClick: () => selectModel(model),
2227
- onMouseEnter: () => setHighlightedIndex(index),
2228
- className: cn(
2229
- "flex w-full items-center gap-2 rounded-md px-3 py-2 text-start text-sm",
2230
- "focus-visible:ring-ring transition-colors focus-visible:ring-2 focus-visible:outline-none",
2231
- highlighted && "bg-muted",
2232
- selected && "bg-primary/10 text-primary"
2233
- ),
2234
- children: [
2235
- /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: model.label ?? model.model }),
2236
- selected && /* @__PURE__ */ jsx(
2237
- Check,
2238
- {
2239
- "aria-hidden": "true",
2240
- className: "text-primary h-4 w-4 shrink-0"
2241
- }
2242
- )
2243
- ]
2244
- },
2245
- key
2246
- );
2247
- })
2248
- ]
2249
- },
2250
- group.provider
2251
- ))
2252
- }
2253
- )
2326
+ group.provider
2327
+ ))
2328
+ }
2329
+ ),
2330
+ efforts.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-border border-t p-1", children: /* @__PURE__ */ jsxs(
2331
+ "button",
2332
+ {
2333
+ type: "button",
2334
+ "data-slot": "composer-model-selector-effort-row",
2335
+ "aria-haspopup": "listbox",
2336
+ onMouseDown: (event) => event.preventDefault(),
2337
+ onClick: () => setView("effort"),
2338
+ className: cn(
2339
+ "flex w-full items-center gap-2 rounded-md px-3 py-2 text-start text-sm",
2340
+ "hover:bg-muted transition-colors",
2341
+ "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none"
2342
+ ),
2343
+ children: [
2344
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate", children: effortLabel }),
2345
+ selectedEffortOption && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground min-w-0 truncate", children: selectedEffortOption.label }),
2346
+ /* @__PURE__ */ jsx(
2347
+ ChevronRight$1,
2348
+ {
2349
+ "aria-hidden": "true",
2350
+ className: "text-muted-foreground h-4 w-4 shrink-0"
2351
+ }
2352
+ )
2353
+ ]
2354
+ }
2355
+ ) })
2356
+ ] }),
2357
+ view === "effort" && /* @__PURE__ */ jsxs(Fragment, { children: [
2358
+ /* @__PURE__ */ jsx("div", { className: "border-border flex items-center gap-1 border-b p-2", children: /* @__PURE__ */ jsxs(
2359
+ "button",
2360
+ {
2361
+ type: "button",
2362
+ "data-slot": "composer-model-selector-effort-back",
2363
+ "aria-label": backLabel,
2364
+ onMouseDown: (event) => event.preventDefault(),
2365
+ onClick: () => setView("models"),
2366
+ className: cn(
2367
+ "inline-flex h-6 shrink-0 items-center gap-1 rounded-full px-2 text-xs font-medium",
2368
+ "text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",
2369
+ "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none"
2370
+ ),
2371
+ children: [
2372
+ /* @__PURE__ */ jsx(ChevronLeft, { "aria-hidden": "true", className: "h-3.5 w-3.5" }),
2373
+ effortLabel
2374
+ ]
2375
+ }
2376
+ ) }),
2377
+ effortHint && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground px-3 pt-2 text-xs", children: effortHint }),
2378
+ /* @__PURE__ */ jsx(
2379
+ "div",
2380
+ {
2381
+ ref: effortListRef,
2382
+ id: menuId,
2383
+ role: "listbox",
2384
+ "aria-label": effortLabel,
2385
+ "aria-activedescendant": activeEffortOptionId,
2386
+ tabIndex: -1,
2387
+ onKeyDown: handleEffortKeyDown,
2388
+ className: "min-h-0 flex-1 overflow-y-auto p-1",
2389
+ children: efforts.map((option, index) => {
2390
+ const selected = option.value === effort;
2391
+ const highlighted = index === effortHighlight;
2392
+ return /* @__PURE__ */ jsxs(
2393
+ "button",
2394
+ {
2395
+ id: getEffortOptionId(index),
2396
+ type: "button",
2397
+ role: "option",
2398
+ "aria-selected": selected,
2399
+ onMouseDown: (event) => event.preventDefault(),
2400
+ onClick: () => selectEffort(option.value),
2401
+ onMouseEnter: () => setEffortHighlight(index),
2402
+ className: cn(
2403
+ "flex w-full items-center gap-2 rounded-md px-3 py-2 text-start text-sm",
2404
+ "focus-visible:ring-ring transition-colors focus-visible:ring-2 focus-visible:outline-none",
2405
+ highlighted && "bg-muted",
2406
+ selected && "bg-primary/10 text-primary"
2407
+ ),
2408
+ children: [
2409
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
2410
+ /* @__PURE__ */ jsx("span", { className: "block truncate", children: option.label }),
2411
+ option.description && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground block truncate text-xs", children: option.description })
2412
+ ] }),
2413
+ 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 }),
2414
+ selected && /* @__PURE__ */ jsx(
2415
+ Check,
2416
+ {
2417
+ "aria-hidden": "true",
2418
+ className: "text-primary h-4 w-4 shrink-0"
2419
+ }
2420
+ )
2421
+ ]
2422
+ },
2423
+ option.value
2424
+ );
2425
+ })
2426
+ }
2427
+ )
2428
+ ] })
2254
2429
  ]
2255
2430
  }
2256
2431
  ),