@sofya-ds/react 1.13.1 → 1.14.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.
package/dist/index.js CHANGED
@@ -107,26 +107,42 @@ import * as React2 from "react";
107
107
  // src/components/icon-data.ts
108
108
  import {
109
109
  IconAdjustmentsHorizontalFilled,
110
+ IconActivity,
111
+ IconActivityHeartbeat,
110
112
  IconAlignCenter,
111
113
  IconAlignJustified,
112
114
  IconAlignLeft,
113
115
  IconAlignRight,
116
+ IconAlertCircle,
114
117
  IconArrowUp,
115
118
  IconArchive,
116
119
  IconBold,
120
+ IconBrain,
117
121
  IconBuildingHospital,
118
122
  IconBooks,
119
123
  IconBulb,
120
124
  IconChartBar,
121
125
  IconCheck,
122
126
  IconChecklist,
127
+ IconClipboardList,
128
+ IconClipboardText,
123
129
  IconCode,
130
+ IconFileText,
131
+ IconFlask,
132
+ IconHeartbeat,
124
133
  IconItalic,
125
134
  IconLink,
126
135
  IconList,
136
+ IconListCheck,
127
137
  IconListNumbers,
138
+ IconNotes,
139
+ IconPill,
128
140
  IconQuote,
141
+ IconReportMedical,
129
142
  IconStrikethrough,
143
+ IconStethoscope,
144
+ IconTable,
145
+ IconTemperature,
130
146
  IconUnderline,
131
147
  IconChevronLeft,
132
148
  IconChevronDown,
@@ -166,26 +182,42 @@ import {
166
182
  } from "@tabler/icons-react";
167
183
  var tablerIconRegistry = {
168
184
  IconAdjustmentsHorizontalFilled,
185
+ IconActivity,
186
+ IconActivityHeartbeat,
169
187
  IconAlignCenter,
170
188
  IconAlignJustified,
171
189
  IconAlignLeft,
172
190
  IconAlignRight,
191
+ IconAlertCircle,
173
192
  IconArrowUp,
174
193
  IconArchive,
175
194
  IconBold,
195
+ IconBrain,
176
196
  IconBuildingHospital,
177
197
  IconBooks,
178
198
  IconBulb,
179
199
  IconChartBar,
180
200
  IconCheck,
181
201
  IconChecklist,
202
+ IconClipboardList,
203
+ IconClipboardText,
182
204
  IconCode,
205
+ IconFileText,
206
+ IconFlask,
207
+ IconHeartbeat,
183
208
  IconItalic,
184
209
  IconLink,
185
210
  IconList,
211
+ IconListCheck,
186
212
  IconListNumbers,
213
+ IconNotes,
214
+ IconPill,
187
215
  IconQuote,
216
+ IconReportMedical,
188
217
  IconStrikethrough,
218
+ IconStethoscope,
219
+ IconTable,
220
+ IconTemperature,
189
221
  IconUnderline,
190
222
  IconChevronLeft,
191
223
  IconChevronDown,
@@ -253,6 +285,7 @@ var legacyIconToTablerNameMap = {
253
285
  "lightbulb": "IconBulb",
254
286
  "chats": "IconMessages",
255
287
  "file": "IconFile",
288
+ "file-text": "IconFileText",
256
289
  "folders": "IconFolders",
257
290
  "sparkle": "IconSparkles",
258
291
  "x": "IconX",
@@ -260,6 +293,21 @@ var legacyIconToTablerNameMap = {
260
293
  "search": "IconSearch",
261
294
  "arrow-up": "IconArrowUp",
262
295
  "question": "IconHelpCircle",
296
+ "activity": "IconActivity",
297
+ "activity-heartbeat": "IconActivityHeartbeat",
298
+ "alert-circle": "IconAlertCircle",
299
+ "brain": "IconBrain",
300
+ "clipboard-list": "IconClipboardList",
301
+ "clipboard-text": "IconClipboardText",
302
+ "flask": "IconFlask",
303
+ "heartbeat": "IconHeartbeat",
304
+ "list-check": "IconListCheck",
305
+ "notes": "IconNotes",
306
+ "pill": "IconPill",
307
+ "report-medical": "IconReportMedical",
308
+ "stethoscope": "IconStethoscope",
309
+ "table": "IconTable",
310
+ "temperature": "IconTemperature",
263
311
  "user-filled": "IconUserFilled",
264
312
  "caret-up": "IconChevronUp",
265
313
  "caret-left": "IconChevronLeft",
@@ -475,8 +523,10 @@ var defaultElements = {
475
523
  "body-md": "p",
476
524
  "body-sm": "p",
477
525
  body: "p",
526
+ "clinical-body": "p",
478
527
  "label-md": "span",
479
528
  "settings-section-title": "span",
529
+ "clinical-section-title": "span",
480
530
  "section-label": "span",
481
531
  "eyebrow-md": "span",
482
532
  "overline-md": "span",
@@ -504,7 +554,7 @@ var textSizeStyles = Object.fromEntries(
504
554
  fontWeight: `var(--sofya-text-${size}-font-weight)`,
505
555
  lineHeight: `var(--sofya-text-${size}-line-height)`,
506
556
  letterSpacing: `var(--sofya-text-${size}-letter-spacing)`,
507
- ...size === "settings-section-title" ? { textTransform: "uppercase" } : {}
557
+ ...size === "settings-section-title" || size === "clinical-section-title" ? { textTransform: "uppercase" } : {}
508
558
  }
509
559
  ])
510
560
  );
@@ -2575,7 +2625,7 @@ function FieldShell({
2575
2625
  // src/components/input-upload.tsx
2576
2626
  import * as React14 from "react";
2577
2627
  import {
2578
- IconFileText,
2628
+ IconFileText as IconFileText2,
2579
2629
  IconPhoto,
2580
2630
  IconUpload,
2581
2631
  IconVideo
@@ -2706,7 +2756,7 @@ function UploadFileTypeGlyph({
2706
2756
  );
2707
2757
  }
2708
2758
  return /* @__PURE__ */ jsx15(
2709
- IconFileText,
2759
+ IconFileText2,
2710
2760
  {
2711
2761
  "aria-hidden": "true",
2712
2762
  className: cn("inline-block shrink-0 align-middle", className)
@@ -4994,11 +5044,1424 @@ var RichTextToolbarButton = React31.forwardRef(function RichTextToolbarButton2({
4994
5044
  });
4995
5045
  RichTextToolbarButton.displayName = "RichTextToolbarButton";
4996
5046
 
4997
- // src/components/right-rail-action.tsx
5047
+ // src/components/reasoning-widget.tsx
4998
5048
  import * as React32 from "react";
4999
- import { jsx as jsx34 } from "react/jsx-runtime";
5000
- var RightRailAction = React32.forwardRef(
5001
- ({ active = false, className, icon, ...props }, ref) => /* @__PURE__ */ jsx34(
5049
+ import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
5050
+ var reasoningWidgetToneOptions = [
5051
+ "default",
5052
+ "info",
5053
+ "success",
5054
+ "warning",
5055
+ "critical",
5056
+ "muted"
5057
+ ];
5058
+ var reasoningWidgetDensityOptions = ["default", "compact"];
5059
+ var reasoningWidgetVariantOptions = [
5060
+ "flat",
5061
+ "outline",
5062
+ "muted",
5063
+ "suggestion"
5064
+ ];
5065
+ var reasoningWidgetActionScopeOptions = ["item", "widget"];
5066
+ var reasoningWidgetActionToneOptions = [
5067
+ "primary",
5068
+ "neutral",
5069
+ "danger"
5070
+ ];
5071
+ var reasoningWidgetTableAlignOptions = [
5072
+ "left",
5073
+ "center",
5074
+ "right"
5075
+ ];
5076
+ var reasoningWidgetTableColumnVariantOptions = [
5077
+ "default",
5078
+ "value"
5079
+ ];
5080
+ var reasoningWidgetFrameOptions = ["bordered", "minimal"];
5081
+ var ReasoningWidgetDensityContext = React32.createContext("default");
5082
+ var actionIconNames = {
5083
+ accept: "check",
5084
+ add: "plus",
5085
+ edit: "edit",
5086
+ reject: "x",
5087
+ remove: "trash"
5088
+ };
5089
+ var actionToneById = {
5090
+ accept: "primary",
5091
+ add: "primary",
5092
+ edit: "neutral",
5093
+ reject: "danger",
5094
+ remove: "danger"
5095
+ };
5096
+ var actionVariantByTone = {
5097
+ danger: "destructive",
5098
+ neutral: "ghost",
5099
+ primary: "subtle"
5100
+ };
5101
+ var toneSurfaceClassName = {
5102
+ default: "border-[color:var(--sofya-neutral-600)] bg-card",
5103
+ info: "border-[color:var(--sofya-tone-info-border)] bg-[color:var(--sofya-tone-info-background)]",
5104
+ success: "border-[color:var(--sofya-tone-success-border)] bg-[color:var(--sofya-tone-success-background)]",
5105
+ warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)]",
5106
+ critical: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)]",
5107
+ muted: "border-[color:var(--sofya-neutral-600)] bg-card"
5108
+ };
5109
+ var clinicalToneMarkerClassName = {
5110
+ default: "bg-[color:var(--sofya-neutral-600)]",
5111
+ info: "bg-secondary",
5112
+ success: "bg-[color:var(--sofya-tag-green)]",
5113
+ warning: "bg-[color:var(--sofya-tag-red)]",
5114
+ critical: "bg-[color:var(--sofya-tag-red)]",
5115
+ muted: "bg-[color:var(--sofya-neutral-600)]"
5116
+ };
5117
+ var clinicalToneSurfaceClassName = {
5118
+ default: "bg-transparent",
5119
+ info: "bg-[color:var(--sofya-neutral-50)]",
5120
+ success: "bg-transparent",
5121
+ warning: "bg-transparent",
5122
+ critical: "bg-transparent",
5123
+ muted: "bg-transparent"
5124
+ };
5125
+ var clinicalToneStatusClassName = {
5126
+ default: "text-[color:var(--sofya-text-subtle)]",
5127
+ info: "text-secondary",
5128
+ success: "text-[color:var(--sofya-tag-green)]",
5129
+ warning: "text-[color:var(--sofya-tag-red)]",
5130
+ critical: "text-[color:var(--sofya-tag-red)]",
5131
+ muted: "text-[color:var(--sofya-text-subtle)]"
5132
+ };
5133
+ var clinicalToneValueClassName = {
5134
+ default: "text-[color:var(--sofya-neutral-900)]",
5135
+ info: "text-[color:var(--sofya-neutral-900)]",
5136
+ success: "text-[color:var(--sofya-neutral-900)]",
5137
+ warning: "text-[color:var(--sofya-tag-red)]",
5138
+ critical: "text-[color:var(--sofya-tag-red)]",
5139
+ muted: "text-[color:var(--sofya-neutral-900)]"
5140
+ };
5141
+ var clinicalToneBadgeClassName = {
5142
+ default: "bg-[color:var(--sofya-neutral-50)] text-[color:var(--sofya-text-subtle)]",
5143
+ info: "bg-[color:var(--sofya-neutral-50)] text-secondary",
5144
+ success: "bg-[color:var(--sofya-agent-mint)] text-[color:var(--sofya-tag-green)]",
5145
+ warning: "bg-[color:var(--sofya-tag-sand)] text-[color:var(--sofya-tag-red)]",
5146
+ critical: "bg-[color:var(--sofya-tag-sand)] text-[color:var(--sofya-tag-red)]",
5147
+ muted: "bg-[color:var(--sofya-neutral-50)] text-[color:var(--sofya-text-subtle)]"
5148
+ };
5149
+ var clinicalDataFrameClassName = {
5150
+ bordered: "w-full overflow-hidden rounded-[var(--sofya-radius-lg)] border border-[color:var(--sofya-neutral-600)] bg-card",
5151
+ minimal: "w-full overflow-hidden rounded-[var(--sofya-radius-md)] border-0 bg-[color:var(--sofya-neutral-50)]"
5152
+ };
5153
+ var clinicalDataHeaderClassName = {
5154
+ bordered: "border-b border-[color:var(--sofya-neutral-600)] bg-[color:var(--sofya-neutral-50)]",
5155
+ minimal: "border-b border-[color:var(--sofya-neutral-600)] bg-transparent"
5156
+ };
5157
+ var clinicalLabsFrameClassName = {
5158
+ bordered: "w-full overflow-x-auto overflow-y-hidden rounded-[var(--sofya-radius-lg)] border border-[color:var(--sofya-neutral-600)] bg-card",
5159
+ minimal: "w-fit max-w-full overflow-x-auto overflow-y-hidden rounded-[var(--sofya-radius-md)] border-0 bg-[color:var(--sofya-neutral-50)]"
5160
+ };
5161
+ var tableAlignClassName = {
5162
+ center: "text-center",
5163
+ left: "text-left",
5164
+ right: "text-right"
5165
+ };
5166
+ function isWidgetAction(action) {
5167
+ return action.scope === "widget";
5168
+ }
5169
+ function isItemAction(action) {
5170
+ return action.scope !== "widget";
5171
+ }
5172
+ function getActionIcon(action) {
5173
+ if (action.icon) {
5174
+ return action.icon;
5175
+ }
5176
+ return actionIconNames[action.id] ?? "square-toggle";
5177
+ }
5178
+ function getActionTone(action) {
5179
+ if (action.tone) {
5180
+ return action.tone;
5181
+ }
5182
+ return actionToneById[action.id] ?? "neutral";
5183
+ }
5184
+ function getTargetLabel(target) {
5185
+ if (!target) {
5186
+ return void 0;
5187
+ }
5188
+ if ("label" in target) {
5189
+ return typeof target.label === "string" || typeof target.label === "number" ? String(target.label) : target.id;
5190
+ }
5191
+ return target.id;
5192
+ }
5193
+ function getActionLabel(action, target) {
5194
+ if (action.ariaLabel) {
5195
+ return action.ariaLabel;
5196
+ }
5197
+ const targetLabel = getTargetLabel(target);
5198
+ return targetLabel ? `${action.label} ${targetLabel}` : action.label;
5199
+ }
5200
+ function getItemsFromDescriptor(widget) {
5201
+ return widget.items ?? widget.data?.items ?? [];
5202
+ }
5203
+ function getDescriptionFromDescriptor(widget) {
5204
+ return widget.description ?? widget.data?.description;
5205
+ }
5206
+ function getEmptyLabelFromDescriptor(widget) {
5207
+ return widget.emptyLabel ?? widget.data?.emptyLabel;
5208
+ }
5209
+ function getFrameFromDescriptor(widget) {
5210
+ return widget.frame ?? widget.data?.frame;
5211
+ }
5212
+ function getDescriptorKind(widget) {
5213
+ return `${widget.component ?? ""} ${widget.type ?? ""}`.toLowerCase();
5214
+ }
5215
+ function getIconFromDescriptor(widget) {
5216
+ if (widget.icon) {
5217
+ return widget.icon;
5218
+ }
5219
+ const descriptorKind = getDescriptorKind(widget);
5220
+ if (descriptorKind.includes("summary") || descriptorKind.includes("impression") || hasRenderableNode(widget.data?.impression)) {
5221
+ return "stethoscope";
5222
+ }
5223
+ if (descriptorKind.includes("vitals")) {
5224
+ return "activity-heartbeat";
5225
+ }
5226
+ if (descriptorKind.includes("question")) {
5227
+ return "question";
5228
+ }
5229
+ if (descriptorKind.includes("prescription") || descriptorKind.includes("medication")) {
5230
+ return "pill";
5231
+ }
5232
+ if (descriptorKind.includes("lab")) {
5233
+ return "flask";
5234
+ }
5235
+ if (descriptorKind.includes("alert")) {
5236
+ return "alert-circle";
5237
+ }
5238
+ if (widget.data?.tableColumns && widget.data.rows) {
5239
+ return "table";
5240
+ }
5241
+ return "clipboard-list";
5242
+ }
5243
+ function hasRenderableNode(value) {
5244
+ return value !== null && value !== void 0 && value !== false;
5245
+ }
5246
+ function isEditableTextValue(value) {
5247
+ return typeof value === "string" || typeof value === "number";
5248
+ }
5249
+ function ReasoningEditableText({
5250
+ as = "span",
5251
+ ariaLabel,
5252
+ className,
5253
+ editable = false,
5254
+ multiline = false,
5255
+ onCommit,
5256
+ size,
5257
+ value,
5258
+ weight
5259
+ }) {
5260
+ if (!editable || !isEditableTextValue(value)) {
5261
+ return renderTextContent(value, {
5262
+ as,
5263
+ className,
5264
+ size,
5265
+ weight
5266
+ });
5267
+ }
5268
+ const initialValue = String(value);
5269
+ return /* @__PURE__ */ jsx34(
5270
+ Text,
5271
+ {
5272
+ as,
5273
+ "aria-label": ariaLabel,
5274
+ className: cn(
5275
+ "rounded-[4px] text-inherit outline-none transition-[background-color,box-shadow] duration-sofya ease-sofya",
5276
+ "-mx-1 px-1 hover:bg-[color:var(--sofya-surface-hover)] focus-visible:bg-card focus-visible:ring-2 focus-visible:ring-[color:var(--sofya-focus-ring-strong)]",
5277
+ multiline ? "whitespace-pre-wrap" : "truncate",
5278
+ className
5279
+ ),
5280
+ contentEditable: true,
5281
+ "data-editable": "true",
5282
+ role: "textbox",
5283
+ size,
5284
+ spellCheck: true,
5285
+ suppressContentEditableWarning: true,
5286
+ tabIndex: 0,
5287
+ weight,
5288
+ onBlur: (event) => {
5289
+ const nextValue = event.currentTarget.textContent ?? "";
5290
+ if (nextValue !== initialValue) {
5291
+ onCommit?.(nextValue);
5292
+ }
5293
+ },
5294
+ onKeyDown: (event) => {
5295
+ if (event.key === "Enter" && !multiline) {
5296
+ event.preventDefault();
5297
+ event.currentTarget.blur();
5298
+ }
5299
+ },
5300
+ children: initialValue
5301
+ }
5302
+ );
5303
+ }
5304
+ var ReasoningWidgetActionButton = React32.forwardRef(function ReasoningWidgetActionButton2({ action, className, disabled, onAction, target, widgetId, ...props }, ref) {
5305
+ const tone = getActionTone(action);
5306
+ return /* @__PURE__ */ jsx34(
5307
+ IconButton,
5308
+ {
5309
+ ref,
5310
+ "aria-label": getActionLabel(
5311
+ action,
5312
+ target
5313
+ ),
5314
+ "data-action-id": action.id,
5315
+ "data-action-scope": action.scope,
5316
+ disabled: disabled ?? action.disabled,
5317
+ icon: /* @__PURE__ */ jsx34(Icon, { name: getActionIcon(action), size: "sm" }),
5318
+ size: "sm",
5319
+ variant: actionVariantByTone[tone],
5320
+ className: cn(
5321
+ "rounded-[var(--sofya-radius-sm)] text-[color:var(--sofya-text-soft)]",
5322
+ tone === "primary" && "text-primary",
5323
+ className
5324
+ ),
5325
+ onClick: () => {
5326
+ onAction?.({
5327
+ action,
5328
+ target,
5329
+ widgetId
5330
+ });
5331
+ },
5332
+ ...props
5333
+ }
5334
+ );
5335
+ });
5336
+ var ReasoningWidgetActions = React32.forwardRef(function ReasoningWidgetActions2({
5337
+ actions = [],
5338
+ className,
5339
+ onAction,
5340
+ reveal = "widget-hover",
5341
+ target,
5342
+ widgetId,
5343
+ ...props
5344
+ }, ref) {
5345
+ if (actions.length === 0) {
5346
+ return null;
5347
+ }
5348
+ return /* @__PURE__ */ jsx34(
5349
+ "div",
5350
+ {
5351
+ ref,
5352
+ "data-slot": "reasoning-widget-actions",
5353
+ "data-reveal": reveal,
5354
+ className: cn(
5355
+ "z-10 flex shrink-0 items-center gap-1 transition-opacity duration-sofya ease-sofya",
5356
+ reveal === "widget-hover" && "pointer-events-none opacity-0 group-hover/reasoning:pointer-events-auto group-hover/reasoning:opacity-100 group-focus-within/reasoning:pointer-events-auto group-focus-within/reasoning:opacity-100",
5357
+ reveal === "item-hover" && "pointer-events-none opacity-0 group-hover/item:pointer-events-auto group-hover/item:opacity-100 group-focus-within/item:pointer-events-auto group-focus-within/item:opacity-100",
5358
+ className
5359
+ ),
5360
+ ...props,
5361
+ children: actions.map((action) => /* @__PURE__ */ jsx34(
5362
+ ReasoningWidgetActionButton,
5363
+ {
5364
+ action,
5365
+ onAction,
5366
+ target,
5367
+ widgetId
5368
+ },
5369
+ action.id
5370
+ ))
5371
+ }
5372
+ );
5373
+ });
5374
+ var ReasoningWidget = React32.forwardRef(
5375
+ function ReasoningWidget2({
5376
+ actions = [],
5377
+ children,
5378
+ className,
5379
+ density = "default",
5380
+ description,
5381
+ empty = false,
5382
+ emptyLabel = "No extracted information yet.",
5383
+ eyebrow,
5384
+ icon,
5385
+ onAction,
5386
+ sectionDivider = false,
5387
+ title,
5388
+ variant = "flat",
5389
+ widgetId,
5390
+ ...props
5391
+ }, ref) {
5392
+ const widgetActions = actions.filter(isWidgetAction);
5393
+ return /* @__PURE__ */ jsx34(ReasoningWidgetDensityContext.Provider, { value: density, children: /* @__PURE__ */ jsxs17(
5394
+ "article",
5395
+ {
5396
+ ref,
5397
+ "data-density": density,
5398
+ "data-slot": "reasoning-widget",
5399
+ "data-variant": variant,
5400
+ className: cn(
5401
+ "group/reasoning w-full shadow-none",
5402
+ "transition-[border-color,box-shadow] duration-sofya ease-sofya",
5403
+ variant === "flat" && "rounded-none border-0 bg-transparent p-0",
5404
+ variant === "outline" && "rounded-[var(--sofya-radius-md)] border border-[color:var(--sofya-border-strong)] bg-card",
5405
+ variant === "muted" && "rounded-[var(--sofya-radius-md)] border-0 bg-[color:var(--sofya-surface-muted)]",
5406
+ variant === "suggestion" && "rounded-[var(--sofya-radius-md)] border border-[color:var(--sofya-border-hover)] bg-card",
5407
+ variant !== "flat" && (density === "compact" ? "p-4" : "p-5"),
5408
+ className
5409
+ ),
5410
+ ...props,
5411
+ children: [
5412
+ /* @__PURE__ */ jsxs17(
5413
+ "div",
5414
+ {
5415
+ "data-slot": "reasoning-widget-header",
5416
+ className: "relative flex items-start gap-4",
5417
+ children: [
5418
+ /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-1 items-start gap-3", children: [
5419
+ /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 items-start gap-2.5", children: [
5420
+ icon ? /* @__PURE__ */ jsx34(
5421
+ "span",
5422
+ {
5423
+ "aria-hidden": "true",
5424
+ "data-icon": icon,
5425
+ "data-slot": "reasoning-widget-icon",
5426
+ className: "mt-0.5 inline-flex size-4 shrink-0 items-center justify-center text-secondary",
5427
+ children: /* @__PURE__ */ jsx34(Icon, { name: icon, size: 14, strokeWidth: 1.8 })
5428
+ }
5429
+ ) : null,
5430
+ /* @__PURE__ */ jsxs17("div", { className: "min-w-0", children: [
5431
+ eyebrow ? renderTextContent(eyebrow, {
5432
+ as: "span",
5433
+ className: "mb-1 block uppercase text-secondary [font-weight:var(--sofya-text-section-label-font-weight)]",
5434
+ size: "section-label"
5435
+ }) : null,
5436
+ /* @__PURE__ */ jsx34(
5437
+ "h3",
5438
+ {
5439
+ className: cn(
5440
+ "m-0",
5441
+ eyebrow ? "text-[color:var(--sofya-neutral-800)]" : "text-secondary"
5442
+ ),
5443
+ children: renderTextContent(title, {
5444
+ as: "span",
5445
+ className: cn(
5446
+ "block text-inherit",
5447
+ !eyebrow && "uppercase"
5448
+ ),
5449
+ size: eyebrow ? density === "compact" ? "label-md" : "title-sm" : density === "compact" ? "section-label" : "clinical-section-title"
5450
+ })
5451
+ }
5452
+ ),
5453
+ description ? renderTextContent(description, {
5454
+ as: "p",
5455
+ className: "mt-2 text-[color:var(--sofya-text-subtle)]",
5456
+ size: "body-md"
5457
+ }) : null
5458
+ ] })
5459
+ ] }),
5460
+ sectionDivider ? /* @__PURE__ */ jsx34(
5461
+ "span",
5462
+ {
5463
+ "aria-hidden": "true",
5464
+ "data-slot": "reasoning-widget-section-divider",
5465
+ className: cn(
5466
+ "mt-2 h-px min-w-8 flex-1 bg-[color:var(--sofya-neutral-600)]",
5467
+ widgetActions.length > 0 && "mr-12"
5468
+ )
5469
+ }
5470
+ ) : null
5471
+ ] }),
5472
+ /* @__PURE__ */ jsx34(
5473
+ ReasoningWidgetActions,
5474
+ {
5475
+ actions: widgetActions,
5476
+ className: "absolute right-0 top-1/2 -translate-y-1/2",
5477
+ onAction,
5478
+ reveal: "widget-hover",
5479
+ widgetId
5480
+ }
5481
+ )
5482
+ ]
5483
+ }
5484
+ ),
5485
+ /* @__PURE__ */ jsx34(
5486
+ "div",
5487
+ {
5488
+ "data-slot": "reasoning-widget-content",
5489
+ className: cn(density === "compact" ? "mt-3" : "mt-4"),
5490
+ children: empty ? renderTextContent(emptyLabel, {
5491
+ as: "p",
5492
+ className: "m-0 text-[color:var(--sofya-text-subtle)]",
5493
+ size: "body-md"
5494
+ }) : children
5495
+ }
5496
+ )
5497
+ ]
5498
+ }
5499
+ ) });
5500
+ }
5501
+ );
5502
+ var ReasoningWidgetList = React32.forwardRef(function ReasoningWidgetList2({
5503
+ actions = [],
5504
+ className,
5505
+ editable = false,
5506
+ emptyLabel,
5507
+ items,
5508
+ onAction,
5509
+ onItemEdit,
5510
+ widgetId,
5511
+ ...props
5512
+ }, ref) {
5513
+ const itemActions = actions.filter(isItemAction);
5514
+ const density = React32.useContext(ReasoningWidgetDensityContext);
5515
+ const primaryTextSize = density === "compact" ? "body-md" : "clinical-body";
5516
+ const supportingTextSize = density === "compact" ? "body-sm" : "clinical-body";
5517
+ if (items.length === 0) {
5518
+ return /* @__PURE__ */ jsx34("p", { className: "m-0 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(emptyLabel ?? "No extracted items.", {
5519
+ as: "span",
5520
+ className: "block text-inherit",
5521
+ size: "body-md"
5522
+ }) });
5523
+ }
5524
+ return /* @__PURE__ */ jsx34(
5525
+ "ul",
5526
+ {
5527
+ ref,
5528
+ "data-slot": "reasoning-widget-list",
5529
+ className: cn("m-0 list-none space-y-0 p-0", className),
5530
+ ...props,
5531
+ children: items.map((item, index) => /* @__PURE__ */ jsxs17(
5532
+ "li",
5533
+ {
5534
+ "data-slot": "reasoning-widget-list-item",
5535
+ "data-tone": item.tone,
5536
+ className: "group/item relative grid grid-cols-[auto_minmax(0,1fr)] items-start gap-3 rounded-[var(--sofya-radius-sm)] pr-2 transition-colors duration-sofya ease-sofya hover:bg-[color:var(--sofya-surface-hover)] focus-within:bg-[color:var(--sofya-surface-hover)]",
5537
+ children: [
5538
+ /* @__PURE__ */ jsx34(
5539
+ "span",
5540
+ {
5541
+ "aria-hidden": "true",
5542
+ "data-slot": "reasoning-widget-list-marker",
5543
+ className: "mt-2 size-2 rounded-full bg-[color:var(--sofya-text-soft)]"
5544
+ }
5545
+ ),
5546
+ /* @__PURE__ */ jsxs17("div", { className: "min-w-0", children: [
5547
+ /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1", children: [
5548
+ /* @__PURE__ */ jsx34("span", { className: "min-w-0 text-[color:var(--sofya-neutral-800)]", children: /* @__PURE__ */ jsx34(
5549
+ ReasoningEditableText,
5550
+ {
5551
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "item"} label`,
5552
+ className: "block text-inherit",
5553
+ editable,
5554
+ size: primaryTextSize,
5555
+ value: item.label,
5556
+ onCommit: (value) => {
5557
+ onItemEdit?.({
5558
+ field: "label",
5559
+ item,
5560
+ value,
5561
+ widgetId
5562
+ });
5563
+ }
5564
+ }
5565
+ ) }),
5566
+ hasRenderableNode(item.value) ? /* @__PURE__ */ jsx34(
5567
+ ReasoningEditableText,
5568
+ {
5569
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "item"} value`,
5570
+ className: "text-[color:var(--sofya-text-soft)]",
5571
+ editable,
5572
+ size: primaryTextSize,
5573
+ value: item.value,
5574
+ onCommit: (value) => {
5575
+ onItemEdit?.({
5576
+ field: "value",
5577
+ item,
5578
+ value,
5579
+ widgetId
5580
+ });
5581
+ }
5582
+ }
5583
+ ) : null,
5584
+ hasRenderableNode(item.status) ? /* @__PURE__ */ jsx34(
5585
+ ReasoningEditableText,
5586
+ {
5587
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "item"} status`,
5588
+ className: "text-[color:var(--sofya-text-subtle)]",
5589
+ editable,
5590
+ size: "caption",
5591
+ value: item.status,
5592
+ onCommit: (value) => {
5593
+ onItemEdit?.({
5594
+ field: "status",
5595
+ item,
5596
+ value,
5597
+ widgetId
5598
+ });
5599
+ }
5600
+ }
5601
+ ) : null
5602
+ ] }),
5603
+ hasRenderableNode(item.evidence) ? /* @__PURE__ */ jsx34(
5604
+ ReasoningEditableText,
5605
+ {
5606
+ as: "p",
5607
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "item"} evidence`,
5608
+ className: "mt-1 text-[color:var(--sofya-text-subtle)]",
5609
+ editable,
5610
+ multiline: true,
5611
+ size: supportingTextSize,
5612
+ value: item.evidence,
5613
+ onCommit: (value) => {
5614
+ onItemEdit?.({
5615
+ field: "evidence",
5616
+ item,
5617
+ value,
5618
+ widgetId
5619
+ });
5620
+ }
5621
+ }
5622
+ ) : null
5623
+ ] }),
5624
+ /* @__PURE__ */ jsx34(
5625
+ ReasoningWidgetActions,
5626
+ {
5627
+ actions: itemActions,
5628
+ className: "absolute right-1 top-1",
5629
+ onAction,
5630
+ reveal: "item-hover",
5631
+ target: item,
5632
+ widgetId
5633
+ }
5634
+ )
5635
+ ]
5636
+ },
5637
+ item.id ?? `reasoning-widget-item-${index}`
5638
+ ))
5639
+ }
5640
+ );
5641
+ });
5642
+ var ReasoningWidgetTable = React32.forwardRef(function ReasoningWidgetTable2({
5643
+ actions = [],
5644
+ className,
5645
+ columns,
5646
+ editable = false,
5647
+ emptyLabel = "No rows available.",
5648
+ onAction,
5649
+ onCellEdit,
5650
+ rows,
5651
+ showHeader = true,
5652
+ widgetId,
5653
+ ...props
5654
+ }, ref) {
5655
+ const itemActions = actions.filter(isItemAction);
5656
+ const hasActions = itemActions.length > 0;
5657
+ const density = React32.useContext(ReasoningWidgetDensityContext);
5658
+ const headerTextSize = density === "compact" ? "label-md" : "body-sm";
5659
+ const cellTextSize = density === "compact" ? "body-sm" : "body-sm";
5660
+ if (rows.length === 0) {
5661
+ return /* @__PURE__ */ jsx34("p", { className: "m-0 text-[color:var(--sofya-text-subtle)]", children: renderTextContent(emptyLabel, {
5662
+ as: "span",
5663
+ className: "block text-inherit",
5664
+ size: "body-md"
5665
+ }) });
5666
+ }
5667
+ return /* @__PURE__ */ jsx34(
5668
+ "div",
5669
+ {
5670
+ ref,
5671
+ "data-slot": "reasoning-widget-table",
5672
+ className: cn(
5673
+ "overflow-hidden rounded-[10px] border border-[color:var(--sofya-neutral-600)] bg-[color:var(--sofya-neutral-50)]",
5674
+ className
5675
+ ),
5676
+ ...props,
5677
+ children: /* @__PURE__ */ jsxs17("table", { className: "w-full border-collapse table-fixed", children: [
5678
+ showHeader ? /* @__PURE__ */ jsx34("thead", { children: /* @__PURE__ */ jsx34("tr", { className: "border-b border-[color:var(--sofya-neutral-600)]", children: columns.map((column, columnIndex) => /* @__PURE__ */ jsx34(
5679
+ "th",
5680
+ {
5681
+ className: cn(
5682
+ "align-middle text-[color:var(--sofya-text-subtle)]",
5683
+ density === "compact" ? "px-3 py-2" : "px-4 py-2",
5684
+ columnIndex > 0 && "border-l border-[color:var(--sofya-neutral-600)]",
5685
+ tableAlignClassName[column.align ?? "left"]
5686
+ ),
5687
+ style: column.width ? { width: column.width } : void 0,
5688
+ scope: "col",
5689
+ children: renderTextContent(column.header, {
5690
+ as: "span",
5691
+ className: "block truncate text-inherit",
5692
+ size: headerTextSize
5693
+ })
5694
+ },
5695
+ column.key
5696
+ )) }) }) : null,
5697
+ /* @__PURE__ */ jsx34("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsx34(
5698
+ "tr",
5699
+ {
5700
+ "data-tone": row.tone,
5701
+ className: cn(
5702
+ "group/item border-t border-[color:var(--sofya-neutral-600)] transition-colors duration-sofya ease-sofya first:border-t-0 hover:bg-[color:var(--sofya-surface-hover)] focus-within:bg-[color:var(--sofya-surface-hover)]",
5703
+ row.tone && toneSurfaceClassName[row.tone]
5704
+ ),
5705
+ children: columns.map((column, columnIndex) => {
5706
+ const isLastColumn = columnIndex === columns.length - 1;
5707
+ return /* @__PURE__ */ jsxs17(
5708
+ "td",
5709
+ {
5710
+ className: cn(
5711
+ "relative min-w-0 align-top",
5712
+ density === "compact" ? "px-3 py-2" : "px-4 py-2",
5713
+ column.variant === "value" ? "text-[color:var(--sofya-neutral-800)]" : "text-[color:var(--sofya-neutral-800)]",
5714
+ columnIndex > 0 && "border-l border-[color:var(--sofya-neutral-600)]",
5715
+ hasActions && isLastColumn && "pr-24",
5716
+ tableAlignClassName[column.align ?? "left"]
5717
+ ),
5718
+ children: [
5719
+ /* @__PURE__ */ jsx34(
5720
+ ReasoningEditableText,
5721
+ {
5722
+ ariaLabel: `Edit ${row.id ?? "row"} ${column.key}`,
5723
+ className: "block truncate text-inherit",
5724
+ editable,
5725
+ size: cellTextSize,
5726
+ value: row.cells[column.key] ?? null,
5727
+ weight: column.variant === "value" ? 600 : void 0,
5728
+ onCommit: (value) => {
5729
+ onCellEdit?.({
5730
+ columnKey: column.key,
5731
+ row,
5732
+ value,
5733
+ widgetId
5734
+ });
5735
+ }
5736
+ }
5737
+ ),
5738
+ hasActions && isLastColumn ? /* @__PURE__ */ jsx34(
5739
+ ReasoningWidgetActions,
5740
+ {
5741
+ actions: itemActions,
5742
+ className: "absolute right-2 top-1/2 -translate-y-1/2",
5743
+ onAction,
5744
+ reveal: "item-hover",
5745
+ target: row,
5746
+ widgetId
5747
+ }
5748
+ ) : null
5749
+ ]
5750
+ },
5751
+ column.key
5752
+ );
5753
+ })
5754
+ },
5755
+ row.id ?? `reasoning-widget-row-${rowIndex}`
5756
+ )) })
5757
+ ] })
5758
+ }
5759
+ );
5760
+ });
5761
+ var ReasoningVitalsWidget = React32.forwardRef(function ReasoningVitalsWidget2({
5762
+ actions = [],
5763
+ editable = false,
5764
+ emptyLabel = "No vitals extracted.",
5765
+ frame = "bordered",
5766
+ icon = "activity-heartbeat",
5767
+ items,
5768
+ onAction,
5769
+ onItemEdit,
5770
+ title = "Vitals",
5771
+ widgetId,
5772
+ ...props
5773
+ }, ref) {
5774
+ const itemActions = actions.filter(isItemAction);
5775
+ const hasActions = itemActions.length > 0;
5776
+ return /* @__PURE__ */ jsx34(
5777
+ ReasoningWidget,
5778
+ {
5779
+ ref,
5780
+ actions,
5781
+ empty: items.length === 0,
5782
+ emptyLabel,
5783
+ icon,
5784
+ onAction,
5785
+ title,
5786
+ widgetId,
5787
+ ...props,
5788
+ children: /* @__PURE__ */ jsx34(
5789
+ "div",
5790
+ {
5791
+ "data-slot": "reasoning-vitals-list",
5792
+ "data-frame": frame,
5793
+ className: clinicalDataFrameClassName[frame],
5794
+ children: items.map((item, index) => {
5795
+ const tone = item.tone ?? "muted";
5796
+ const unit = item.unit ?? (typeof item.metadata?.unit === "string" ? item.metadata.unit : void 0);
5797
+ const hasValue = hasRenderableNode(item.value);
5798
+ const value = hasValue ? item.value : item.label;
5799
+ const label = hasValue ? item.label : void 0;
5800
+ return /* @__PURE__ */ jsxs17(
5801
+ "div",
5802
+ {
5803
+ "data-slot": "reasoning-vital",
5804
+ "data-tone": tone,
5805
+ className: cn(
5806
+ "group/item relative grid min-w-0 grid-cols-[auto_minmax(0,1fr)_auto] items-stretch gap-0 border-t border-[color:var(--sofya-neutral-600)] transition-colors duration-sofya ease-sofya first:border-t-0 hover:bg-[color:var(--sofya-surface-hover)] focus-within:bg-[color:var(--sofya-surface-hover)]",
5807
+ clinicalToneSurfaceClassName[tone]
5808
+ ),
5809
+ children: [
5810
+ /* @__PURE__ */ jsx34(
5811
+ "span",
5812
+ {
5813
+ "aria-hidden": "true",
5814
+ "data-slot": "reasoning-vital-marker",
5815
+ className: cn(
5816
+ "my-5 ml-0 mr-5 w-1 rounded-r-full",
5817
+ clinicalToneMarkerClassName[tone]
5818
+ )
5819
+ }
5820
+ ),
5821
+ /* @__PURE__ */ jsxs17("div", { className: "min-w-0 py-5", children: [
5822
+ hasRenderableNode(label) ? /* @__PURE__ */ jsx34(
5823
+ ReasoningEditableText,
5824
+ {
5825
+ as: "p",
5826
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} label`,
5827
+ className: "text-[color:var(--sofya-neutral-900)]",
5828
+ editable,
5829
+ size: "title-sm",
5830
+ weight: 500,
5831
+ value: label,
5832
+ onCommit: (nextValue) => {
5833
+ onItemEdit?.({
5834
+ field: "label",
5835
+ item,
5836
+ value: nextValue,
5837
+ widgetId
5838
+ });
5839
+ }
5840
+ }
5841
+ ) : null,
5842
+ hasRenderableNode(item.referenceRange) ? /* @__PURE__ */ jsx34(
5843
+ ReasoningEditableText,
5844
+ {
5845
+ as: "p",
5846
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} reference range`,
5847
+ className: "mt-1 text-[color:var(--sofya-text-subtle)]",
5848
+ editable,
5849
+ size: "body-sm",
5850
+ value: item.referenceRange,
5851
+ onCommit: (nextValue) => {
5852
+ onItemEdit?.({
5853
+ field: "referenceRange",
5854
+ item,
5855
+ value: nextValue,
5856
+ widgetId
5857
+ });
5858
+ }
5859
+ }
5860
+ ) : null,
5861
+ hasRenderableNode(item.evidence) ? /* @__PURE__ */ jsx34(
5862
+ ReasoningEditableText,
5863
+ {
5864
+ as: "p",
5865
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} evidence`,
5866
+ className: "mt-1 text-[color:var(--sofya-text-subtle)]",
5867
+ editable,
5868
+ multiline: true,
5869
+ size: "body-sm",
5870
+ value: item.evidence,
5871
+ onCommit: (nextValue) => {
5872
+ onItemEdit?.({
5873
+ field: "evidence",
5874
+ item,
5875
+ value: nextValue,
5876
+ widgetId
5877
+ });
5878
+ }
5879
+ }
5880
+ ) : null,
5881
+ hasRenderableNode(item.observedAt) ? /* @__PURE__ */ jsx34(
5882
+ ReasoningEditableText,
5883
+ {
5884
+ as: "p",
5885
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} observed time`,
5886
+ className: "mt-1 text-[color:var(--sofya-text-subtle)]",
5887
+ editable,
5888
+ size: "body-sm",
5889
+ value: item.observedAt,
5890
+ onCommit: (nextValue) => {
5891
+ onItemEdit?.({
5892
+ field: "observedAt",
5893
+ item,
5894
+ value: nextValue,
5895
+ widgetId
5896
+ });
5897
+ }
5898
+ }
5899
+ ) : null
5900
+ ] }),
5901
+ /* @__PURE__ */ jsxs17(
5902
+ "div",
5903
+ {
5904
+ className: cn(
5905
+ "min-w-[7.5rem] py-4 pr-6 text-right",
5906
+ hasActions && "pr-24"
5907
+ ),
5908
+ children: [
5909
+ /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 items-baseline justify-end gap-1", children: [
5910
+ /* @__PURE__ */ jsx34(
5911
+ "span",
5912
+ {
5913
+ className: cn("min-w-0", clinicalToneValueClassName[tone]),
5914
+ children: /* @__PURE__ */ jsx34(
5915
+ ReasoningEditableText,
5916
+ {
5917
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} value`,
5918
+ className: "block text-inherit",
5919
+ editable,
5920
+ size: "title-md",
5921
+ value,
5922
+ weight: 600,
5923
+ onCommit: (nextValue) => {
5924
+ onItemEdit?.({
5925
+ field: hasValue ? "value" : "label",
5926
+ item,
5927
+ value: nextValue,
5928
+ widgetId
5929
+ });
5930
+ }
5931
+ }
5932
+ )
5933
+ }
5934
+ ),
5935
+ hasRenderableNode(unit) && hasValue ? /* @__PURE__ */ jsx34(
5936
+ ReasoningEditableText,
5937
+ {
5938
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} unit`,
5939
+ className: "text-[color:var(--sofya-text-subtle)]",
5940
+ editable,
5941
+ size: "body-sm",
5942
+ value: unit,
5943
+ onCommit: (nextValue) => {
5944
+ onItemEdit?.({
5945
+ field: "unit",
5946
+ item,
5947
+ value: nextValue,
5948
+ widgetId
5949
+ });
5950
+ }
5951
+ }
5952
+ ) : null
5953
+ ] }),
5954
+ hasRenderableNode(item.status) ? /* @__PURE__ */ jsx34(
5955
+ ReasoningEditableText,
5956
+ {
5957
+ as: "p",
5958
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "vital"} status`,
5959
+ className: cn(
5960
+ "mt-1 text-right",
5961
+ clinicalToneStatusClassName[tone]
5962
+ ),
5963
+ editable,
5964
+ size: "label-md",
5965
+ value: item.status,
5966
+ weight: 600,
5967
+ onCommit: (nextValue) => {
5968
+ onItemEdit?.({
5969
+ field: "status",
5970
+ item,
5971
+ value: nextValue,
5972
+ widgetId
5973
+ });
5974
+ }
5975
+ }
5976
+ ) : null
5977
+ ]
5978
+ }
5979
+ ),
5980
+ /* @__PURE__ */ jsx34(
5981
+ ReasoningWidgetActions,
5982
+ {
5983
+ actions: itemActions,
5984
+ className: "absolute right-2 top-1/2 -translate-y-1/2",
5985
+ onAction,
5986
+ reveal: "item-hover",
5987
+ target: item,
5988
+ widgetId
5989
+ }
5990
+ )
5991
+ ]
5992
+ },
5993
+ item.id ?? `reasoning-vital-${index}`
5994
+ );
5995
+ })
5996
+ }
5997
+ )
5998
+ }
5999
+ );
6000
+ });
6001
+ var ReasoningLabsWidget = React32.forwardRef(function ReasoningLabsWidget2({
6002
+ actions = [],
6003
+ columnLabels,
6004
+ editable = false,
6005
+ emptyLabel = "No labs extracted.",
6006
+ frame = "bordered",
6007
+ icon = "flask",
6008
+ items,
6009
+ onAction,
6010
+ onItemEdit,
6011
+ title = "Labs",
6012
+ widgetId,
6013
+ ...props
6014
+ }, ref) {
6015
+ const itemActions = actions.filter(isItemAction);
6016
+ const labColumns = [
6017
+ {
6018
+ key: "test",
6019
+ label: columnLabels?.test ?? "Test",
6020
+ width: "260px"
6021
+ },
6022
+ {
6023
+ key: "result",
6024
+ label: columnLabels?.result ?? "Result",
6025
+ width: "150px"
6026
+ },
6027
+ {
6028
+ key: "reference",
6029
+ label: columnLabels?.reference ?? "Reference",
6030
+ width: "150px"
6031
+ },
6032
+ {
6033
+ key: "flag",
6034
+ label: columnLabels?.flag ?? "Flag",
6035
+ width: "160px"
6036
+ }
6037
+ ];
6038
+ return /* @__PURE__ */ jsx34(
6039
+ ReasoningWidget,
6040
+ {
6041
+ ref,
6042
+ actions,
6043
+ empty: items.length === 0,
6044
+ emptyLabel,
6045
+ icon,
6046
+ onAction,
6047
+ title,
6048
+ widgetId,
6049
+ ...props,
6050
+ children: /* @__PURE__ */ jsx34(
6051
+ "div",
6052
+ {
6053
+ "data-slot": "reasoning-labs-table",
6054
+ "data-frame": frame,
6055
+ className: clinicalLabsFrameClassName[frame],
6056
+ children: /* @__PURE__ */ jsxs17("table", { className: "w-auto min-w-[720px] border-collapse table-fixed", children: [
6057
+ /* @__PURE__ */ jsx34("thead", { children: /* @__PURE__ */ jsxs17("tr", { className: clinicalDataHeaderClassName[frame], children: [
6058
+ /* @__PURE__ */ jsx34("th", { className: "w-7 px-4 py-3", scope: "col", children: /* @__PURE__ */ jsx34("span", { className: "sr-only", children: columnLabels?.tone ?? "Tone" }) }),
6059
+ labColumns.map((column) => /* @__PURE__ */ jsx34(
6060
+ "th",
6061
+ {
6062
+ className: "px-4 py-3 text-left align-middle text-[color:var(--sofya-text-subtle)]",
6063
+ scope: "col",
6064
+ style: { width: column.width },
6065
+ children: renderTextContent(column.label, {
6066
+ as: "span",
6067
+ className: "block truncate text-inherit",
6068
+ size: "clinical-section-title"
6069
+ })
6070
+ },
6071
+ column.key
6072
+ ))
6073
+ ] }) }),
6074
+ /* @__PURE__ */ jsx34("tbody", { children: items.map((item, index) => {
6075
+ const tone = item.tone ?? "muted";
6076
+ const unit = item.unit ?? (typeof item.metadata?.unit === "string" ? item.metadata.unit : void 0);
6077
+ const interpretation = item.interpretation ?? item.status;
6078
+ return /* @__PURE__ */ jsxs17(
6079
+ "tr",
6080
+ {
6081
+ "data-slot": "reasoning-lab",
6082
+ "data-tone": tone,
6083
+ className: cn(
6084
+ "group/item border-t border-[color:var(--sofya-neutral-600)] transition-colors duration-sofya ease-sofya first:border-t-0 hover:bg-[color:var(--sofya-surface-hover)] focus-within:bg-[color:var(--sofya-surface-hover)]",
6085
+ clinicalToneSurfaceClassName[tone]
6086
+ ),
6087
+ children: [
6088
+ /* @__PURE__ */ jsx34("td", { className: "px-0 py-4 align-top", children: /* @__PURE__ */ jsx34(
6089
+ "span",
6090
+ {
6091
+ "aria-hidden": "true",
6092
+ "data-slot": "reasoning-lab-marker",
6093
+ className: cn(
6094
+ "mt-1 block h-12 w-1 rounded-r-full",
6095
+ clinicalToneMarkerClassName[tone]
6096
+ )
6097
+ }
6098
+ ) }),
6099
+ /* @__PURE__ */ jsxs17("td", { className: "min-w-0 px-4 py-4 align-top text-[color:var(--sofya-neutral-900)]", children: [
6100
+ /* @__PURE__ */ jsx34(
6101
+ ReasoningEditableText,
6102
+ {
6103
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} label`,
6104
+ className: "block text-inherit",
6105
+ editable,
6106
+ size: "title-sm",
6107
+ value: item.label,
6108
+ weight: 500,
6109
+ onCommit: (nextValue) => {
6110
+ onItemEdit?.({
6111
+ field: "label",
6112
+ item,
6113
+ value: nextValue,
6114
+ widgetId
6115
+ });
6116
+ }
6117
+ }
6118
+ ),
6119
+ hasRenderableNode(item.evidence) ? /* @__PURE__ */ jsx34(
6120
+ ReasoningEditableText,
6121
+ {
6122
+ as: "p",
6123
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} evidence`,
6124
+ className: "mt-1 text-[color:var(--sofya-text-subtle)]",
6125
+ editable,
6126
+ multiline: true,
6127
+ size: "body-sm",
6128
+ value: item.evidence,
6129
+ onCommit: (nextValue) => {
6130
+ onItemEdit?.({
6131
+ field: "evidence",
6132
+ item,
6133
+ value: nextValue,
6134
+ widgetId
6135
+ });
6136
+ }
6137
+ }
6138
+ ) : null
6139
+ ] }),
6140
+ /* @__PURE__ */ jsx34("td", { className: "min-w-0 px-4 py-4 align-top", children: /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-col items-start", children: [
6141
+ /* @__PURE__ */ jsx34(
6142
+ "span",
6143
+ {
6144
+ className: cn(
6145
+ "min-w-0",
6146
+ clinicalToneValueClassName[tone]
6147
+ ),
6148
+ children: /* @__PURE__ */ jsx34(
6149
+ ReasoningEditableText,
6150
+ {
6151
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} value`,
6152
+ className: "block text-inherit",
6153
+ editable,
6154
+ size: "title-sm",
6155
+ value: item.value ?? null,
6156
+ weight: 600,
6157
+ onCommit: (nextValue) => {
6158
+ onItemEdit?.({
6159
+ field: "value",
6160
+ item,
6161
+ value: nextValue,
6162
+ widgetId
6163
+ });
6164
+ }
6165
+ }
6166
+ )
6167
+ }
6168
+ ),
6169
+ hasRenderableNode(unit) ? /* @__PURE__ */ jsx34(
6170
+ ReasoningEditableText,
6171
+ {
6172
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} unit`,
6173
+ className: "text-[color:var(--sofya-text-subtle)]",
6174
+ editable,
6175
+ size: "body-sm",
6176
+ value: unit,
6177
+ onCommit: (nextValue) => {
6178
+ onItemEdit?.({
6179
+ field: "unit",
6180
+ item,
6181
+ value: nextValue,
6182
+ widgetId
6183
+ });
6184
+ }
6185
+ }
6186
+ ) : null
6187
+ ] }) }),
6188
+ /* @__PURE__ */ jsx34("td", { className: "min-w-0 px-4 py-4 align-top text-[color:var(--sofya-text-soft)]", children: hasRenderableNode(item.referenceRange) ? /* @__PURE__ */ jsx34(
6189
+ ReasoningEditableText,
6190
+ {
6191
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} reference range`,
6192
+ className: "block truncate text-inherit",
6193
+ editable,
6194
+ size: "body-sm",
6195
+ value: item.referenceRange,
6196
+ onCommit: (nextValue) => {
6197
+ onItemEdit?.({
6198
+ field: "referenceRange",
6199
+ item,
6200
+ value: nextValue,
6201
+ widgetId
6202
+ });
6203
+ }
6204
+ }
6205
+ ) : null }),
6206
+ /* @__PURE__ */ jsxs17("td", { className: "relative min-w-0 px-4 py-4 align-top", children: [
6207
+ hasRenderableNode(interpretation) ? /* @__PURE__ */ jsx34(
6208
+ ReasoningEditableText,
6209
+ {
6210
+ ariaLabel: `Edit ${getTargetLabel(item) ?? "lab"} interpretation`,
6211
+ className: cn(
6212
+ "inline-flex rounded-full px-3 py-1",
6213
+ clinicalToneBadgeClassName[tone]
6214
+ ),
6215
+ editable,
6216
+ multiline: true,
6217
+ size: "label-md",
6218
+ value: interpretation,
6219
+ weight: tone === "muted" ? void 0 : 600,
6220
+ onCommit: (nextValue) => {
6221
+ onItemEdit?.({
6222
+ field: "status",
6223
+ item,
6224
+ value: nextValue,
6225
+ widgetId
6226
+ });
6227
+ }
6228
+ }
6229
+ ) : null,
6230
+ /* @__PURE__ */ jsx34(
6231
+ ReasoningWidgetActions,
6232
+ {
6233
+ actions: itemActions,
6234
+ className: "absolute right-2 top-1/2 -translate-y-1/2",
6235
+ onAction,
6236
+ reveal: "item-hover",
6237
+ target: item,
6238
+ widgetId
6239
+ }
6240
+ )
6241
+ ] })
6242
+ ]
6243
+ },
6244
+ item.id ?? `reasoning-lab-${index}`
6245
+ );
6246
+ }) })
6247
+ ] })
6248
+ }
6249
+ )
6250
+ }
6251
+ );
6252
+ });
6253
+ var ReasoningSummaryWidget = React32.forwardRef(function ReasoningSummaryWidget2({
6254
+ actions,
6255
+ clinicalImpression,
6256
+ description,
6257
+ editable = false,
6258
+ findings = [],
6259
+ eyebrow = "Summary",
6260
+ icon = "stethoscope",
6261
+ onAction,
6262
+ onItemEdit,
6263
+ onSummaryEdit,
6264
+ title,
6265
+ widgetId,
6266
+ ...props
6267
+ }, ref) {
6268
+ return /* @__PURE__ */ jsxs17(
6269
+ ReasoningWidget,
6270
+ {
6271
+ ref,
6272
+ actions,
6273
+ description,
6274
+ eyebrow,
6275
+ icon,
6276
+ onAction,
6277
+ title,
6278
+ widgetId,
6279
+ ...props,
6280
+ children: [
6281
+ hasRenderableNode(clinicalImpression) ? /* @__PURE__ */ jsx34(
6282
+ ReasoningEditableText,
6283
+ {
6284
+ as: "p",
6285
+ ariaLabel: "Edit clinical impression",
6286
+ className: "m-0 text-[color:var(--sofya-neutral-800)]",
6287
+ editable,
6288
+ multiline: true,
6289
+ size: "clinical-body",
6290
+ value: clinicalImpression,
6291
+ onCommit: (value) => {
6292
+ onSummaryEdit?.({
6293
+ field: "clinicalImpression",
6294
+ value,
6295
+ widgetId
6296
+ });
6297
+ }
6298
+ }
6299
+ ) : null,
6300
+ findings.length > 0 ? /* @__PURE__ */ jsx34(
6301
+ ReasoningWidgetList,
6302
+ {
6303
+ actions,
6304
+ className: hasRenderableNode(clinicalImpression) ? "mt-3" : void 0,
6305
+ editable,
6306
+ items: findings,
6307
+ onAction,
6308
+ onItemEdit,
6309
+ widgetId
6310
+ }
6311
+ ) : null
6312
+ ]
6313
+ }
6314
+ );
6315
+ });
6316
+ function ReasoningWidgetRenderer({
6317
+ editable = false,
6318
+ onAction,
6319
+ onCellEdit,
6320
+ onItemEdit,
6321
+ onSummaryEdit,
6322
+ widget,
6323
+ ...props
6324
+ }) {
6325
+ const descriptorKind = getDescriptorKind(widget);
6326
+ const description = getDescriptionFromDescriptor(widget);
6327
+ const emptyLabel = getEmptyLabelFromDescriptor(widget);
6328
+ const frame = getFrameFromDescriptor(widget);
6329
+ const items = getItemsFromDescriptor(widget);
6330
+ const actions = widget.actions ?? [];
6331
+ const icon = getIconFromDescriptor(widget);
6332
+ if (descriptorKind.includes("summary") || hasRenderableNode(widget.data?.impression)) {
6333
+ return /* @__PURE__ */ jsx34(
6334
+ ReasoningSummaryWidget,
6335
+ {
6336
+ actions,
6337
+ clinicalImpression: widget.data?.impression,
6338
+ description,
6339
+ editable,
6340
+ findings: items,
6341
+ icon,
6342
+ onAction,
6343
+ onItemEdit,
6344
+ onSummaryEdit,
6345
+ sectionDivider: widget.sectionDivider,
6346
+ title: widget.title,
6347
+ widgetId: widget.id,
6348
+ ...props
6349
+ }
6350
+ );
6351
+ }
6352
+ if (descriptorKind.includes("vitals")) {
6353
+ return /* @__PURE__ */ jsx34(
6354
+ ReasoningVitalsWidget,
6355
+ {
6356
+ actions,
6357
+ description,
6358
+ editable,
6359
+ emptyLabel,
6360
+ frame,
6361
+ icon,
6362
+ items,
6363
+ onAction,
6364
+ onItemEdit,
6365
+ sectionDivider: widget.sectionDivider,
6366
+ title: widget.title,
6367
+ widgetId: widget.id,
6368
+ ...props
6369
+ }
6370
+ );
6371
+ }
6372
+ if (descriptorKind.includes("lab") && items.length > 0) {
6373
+ return /* @__PURE__ */ jsx34(
6374
+ ReasoningLabsWidget,
6375
+ {
6376
+ actions,
6377
+ columnLabels: widget.data?.labColumnLabels,
6378
+ description,
6379
+ editable,
6380
+ emptyLabel,
6381
+ frame,
6382
+ icon,
6383
+ items,
6384
+ onAction,
6385
+ onItemEdit,
6386
+ sectionDivider: widget.sectionDivider,
6387
+ title: widget.title,
6388
+ widgetId: widget.id,
6389
+ ...props
6390
+ }
6391
+ );
6392
+ }
6393
+ if (widget.data?.tableColumns && widget.data.rows) {
6394
+ return /* @__PURE__ */ jsx34(
6395
+ ReasoningWidget,
6396
+ {
6397
+ actions,
6398
+ description,
6399
+ empty: widget.data.rows.length === 0,
6400
+ emptyLabel,
6401
+ icon,
6402
+ onAction,
6403
+ sectionDivider: widget.sectionDivider,
6404
+ title: widget.title,
6405
+ widgetId: widget.id,
6406
+ ...props,
6407
+ children: /* @__PURE__ */ jsx34(
6408
+ ReasoningWidgetTable,
6409
+ {
6410
+ actions,
6411
+ columns: widget.data.tableColumns,
6412
+ editable,
6413
+ emptyLabel,
6414
+ onAction,
6415
+ onCellEdit,
6416
+ rows: widget.data.rows,
6417
+ widgetId: widget.id
6418
+ }
6419
+ )
6420
+ }
6421
+ );
6422
+ }
6423
+ return /* @__PURE__ */ jsx34(
6424
+ ReasoningWidget,
6425
+ {
6426
+ actions,
6427
+ description,
6428
+ empty: items.length === 0,
6429
+ emptyLabel,
6430
+ icon,
6431
+ onAction,
6432
+ sectionDivider: widget.sectionDivider,
6433
+ title: widget.title,
6434
+ widgetId: widget.id,
6435
+ ...props,
6436
+ children: /* @__PURE__ */ jsx34(
6437
+ ReasoningWidgetList,
6438
+ {
6439
+ actions,
6440
+ editable,
6441
+ emptyLabel,
6442
+ items,
6443
+ onAction,
6444
+ onItemEdit,
6445
+ widgetId: widget.id
6446
+ }
6447
+ )
6448
+ }
6449
+ );
6450
+ }
6451
+ ReasoningWidgetActionButton.displayName = "ReasoningWidgetActionButton";
6452
+ ReasoningWidgetActions.displayName = "ReasoningWidgetActions";
6453
+ ReasoningWidget.displayName = "ReasoningWidget";
6454
+ ReasoningWidgetList.displayName = "ReasoningWidgetList";
6455
+ ReasoningWidgetTable.displayName = "ReasoningWidgetTable";
6456
+ ReasoningVitalsWidget.displayName = "ReasoningVitalsWidget";
6457
+ ReasoningLabsWidget.displayName = "ReasoningLabsWidget";
6458
+ ReasoningSummaryWidget.displayName = "ReasoningSummaryWidget";
6459
+
6460
+ // src/components/right-rail-action.tsx
6461
+ import * as React33 from "react";
6462
+ import { jsx as jsx35 } from "react/jsx-runtime";
6463
+ var RightRailAction = React33.forwardRef(
6464
+ ({ active = false, className, icon, ...props }, ref) => /* @__PURE__ */ jsx35(
5002
6465
  IconButton,
5003
6466
  {
5004
6467
  ref,
@@ -5017,12 +6480,12 @@ var RightRailAction = React32.forwardRef(
5017
6480
  RightRailAction.displayName = "RightRailAction";
5018
6481
 
5019
6482
  // src/components/scroll-area.tsx
5020
- import * as React33 from "react";
6483
+ import * as React34 from "react";
5021
6484
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
5022
- import { jsx as jsx35 } from "react/jsx-runtime";
6485
+ import { jsx as jsx36 } from "react/jsx-runtime";
5023
6486
  var scrollAreaOrientationOptions = ["horizontal", "vertical"];
5024
- var ScrollArea = React33.forwardRef(function ScrollArea2({ className, ...props }, ref) {
5025
- return /* @__PURE__ */ jsx35(
6487
+ var ScrollArea = React34.forwardRef(function ScrollArea2({ className, ...props }, ref) {
6488
+ return /* @__PURE__ */ jsx36(
5026
6489
  ScrollAreaPrimitive.Root,
5027
6490
  {
5028
6491
  ref,
@@ -5033,8 +6496,8 @@ var ScrollArea = React33.forwardRef(function ScrollArea2({ className, ...props }
5033
6496
  );
5034
6497
  });
5035
6498
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
5036
- var ScrollAreaViewport = React33.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
5037
- return /* @__PURE__ */ jsx35(
6499
+ var ScrollAreaViewport = React34.forwardRef(function ScrollAreaViewport2({ className, ...props }, ref) {
6500
+ return /* @__PURE__ */ jsx36(
5038
6501
  ScrollAreaPrimitive.Viewport,
5039
6502
  {
5040
6503
  ref,
@@ -5048,8 +6511,8 @@ var ScrollAreaViewport = React33.forwardRef(function ScrollAreaViewport2({ class
5048
6511
  );
5049
6512
  });
5050
6513
  ScrollAreaViewport.displayName = ScrollAreaPrimitive.Viewport.displayName;
5051
- var ScrollAreaScrollbar = React33.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
5052
- return /* @__PURE__ */ jsx35(
6514
+ var ScrollAreaScrollbar = React34.forwardRef(function ScrollAreaScrollbar2({ className, orientation = "vertical", thumbClassName, ...props }, ref) {
6515
+ return /* @__PURE__ */ jsx36(
5053
6516
  ScrollAreaPrimitive.Scrollbar,
5054
6517
  {
5055
6518
  ref,
@@ -5060,7 +6523,7 @@ var ScrollAreaScrollbar = React33.forwardRef(function ScrollAreaScrollbar2({ cla
5060
6523
  className
5061
6524
  ),
5062
6525
  ...props,
5063
- children: /* @__PURE__ */ jsx35(
6526
+ children: /* @__PURE__ */ jsx36(
5064
6527
  ScrollAreaPrimitive.Thumb,
5065
6528
  {
5066
6529
  "data-slot": "scroll-area-thumb",
@@ -5074,8 +6537,8 @@ var ScrollAreaScrollbar = React33.forwardRef(function ScrollAreaScrollbar2({ cla
5074
6537
  );
5075
6538
  });
5076
6539
  ScrollAreaScrollbar.displayName = ScrollAreaPrimitive.Scrollbar.displayName;
5077
- var ScrollAreaCorner = React33.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
5078
- return /* @__PURE__ */ jsx35(
6540
+ var ScrollAreaCorner = React34.forwardRef(function ScrollAreaCorner2({ className, ...props }, ref) {
6541
+ return /* @__PURE__ */ jsx36(
5079
6542
  ScrollAreaPrimitive.Corner,
5080
6543
  {
5081
6544
  ref,
@@ -5088,19 +6551,19 @@ var ScrollAreaCorner = React33.forwardRef(function ScrollAreaCorner2({ className
5088
6551
  ScrollAreaCorner.displayName = ScrollAreaPrimitive.Corner.displayName;
5089
6552
 
5090
6553
  // src/components/select.tsx
5091
- import * as React34 from "react";
6554
+ import * as React35 from "react";
5092
6555
  import * as SelectPrimitive from "@radix-ui/react-select";
5093
6556
 
5094
6557
  // src/lib/form-control-classes.ts
5095
6558
  var formControlBaseClasses = "flex w-full items-center justify-between gap-4 rounded-[10px] border border-[color:var(--sofya-border-strong)] bg-card px-4 text-left [font-family:var(--sofya-text-body-font-family)] text-[length:var(--sofya-text-body-font-size)] [font-weight:var(--sofya-text-body-font-weight)] leading-[var(--sofya-text-body-line-height)] tracking-[var(--sofya-text-body-letter-spacing)] text-[color:var(--sofya-text-default)] shadow-none transition-[border-color,box-shadow,background-color,color] duration-sofya ease-sofya hover:border-[color:var(--sofya-border-hover)] focus:outline-none focus:ring-2 focus:ring-[color:var(--sofya-focus-ring-soft)] focus:ring-offset-0 active:border-transparent active:ring-2 active:ring-[color:var(--sofya-focus-ring-soft)] disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus:ring-destructive/20 data-[placeholder]:text-[color:var(--sofya-text-placeholder)]";
5096
6559
 
5097
6560
  // src/components/select.tsx
5098
- import { jsx as jsx36, jsxs as jsxs17 } from "react/jsx-runtime";
6561
+ import { jsx as jsx37, jsxs as jsxs18 } from "react/jsx-runtime";
5099
6562
  var selectSizeOptions = ["default", "sm"];
5100
6563
  var Select = SelectPrimitive.Root;
5101
6564
  var SelectGroup = SelectPrimitive.Group;
5102
- var SelectValue = React34.forwardRef(function SelectValue2({ className, ...props }, ref) {
5103
- return /* @__PURE__ */ jsx36(
6565
+ var SelectValue = React35.forwardRef(function SelectValue2({ className, ...props }, ref) {
6566
+ return /* @__PURE__ */ jsx37(
5104
6567
  Text,
5105
6568
  {
5106
6569
  ref,
@@ -5109,13 +6572,13 @@ var SelectValue = React34.forwardRef(function SelectValue2({ className, ...props
5109
6572
  className: cn("block truncate text-inherit", className),
5110
6573
  size: "tiny",
5111
6574
  style: inheritedTypographyStyle,
5112
- children: /* @__PURE__ */ jsx36(SelectPrimitive.Value, { className: "block truncate", ...props })
6575
+ children: /* @__PURE__ */ jsx37(SelectPrimitive.Value, { className: "block truncate", ...props })
5113
6576
  }
5114
6577
  );
5115
6578
  });
5116
6579
  SelectValue.displayName = SelectPrimitive.Value.displayName;
5117
- var SelectTrigger = React34.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
5118
- return /* @__PURE__ */ jsxs17(
6580
+ var SelectTrigger = React35.forwardRef(function SelectTrigger2({ className, children, size = "default", ...props }, ref) {
6581
+ return /* @__PURE__ */ jsxs18(
5119
6582
  SelectPrimitive.Trigger,
5120
6583
  {
5121
6584
  ref,
@@ -5129,7 +6592,7 @@ var SelectTrigger = React34.forwardRef(function SelectTrigger2({ className, chil
5129
6592
  ...props,
5130
6593
  children: [
5131
6594
  children,
5132
- /* @__PURE__ */ jsx36(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx36(
6595
+ /* @__PURE__ */ jsx37(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx37(
5133
6596
  Icon,
5134
6597
  {
5135
6598
  name: "caret-down",
@@ -5142,8 +6605,8 @@ var SelectTrigger = React34.forwardRef(function SelectTrigger2({ className, chil
5142
6605
  );
5143
6606
  });
5144
6607
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
5145
- var SelectScrollUpButton = React34.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
5146
- return /* @__PURE__ */ jsx36(
6608
+ var SelectScrollUpButton = React35.forwardRef(function SelectScrollUpButton2({ className, ...props }, ref) {
6609
+ return /* @__PURE__ */ jsx37(
5147
6610
  SelectPrimitive.ScrollUpButton,
5148
6611
  {
5149
6612
  ref,
@@ -5153,13 +6616,13 @@ var SelectScrollUpButton = React34.forwardRef(function SelectScrollUpButton2({ c
5153
6616
  className
5154
6617
  ),
5155
6618
  ...props,
5156
- children: /* @__PURE__ */ jsx36(Icon, { name: "caret-up", size: 12 })
6619
+ children: /* @__PURE__ */ jsx37(Icon, { name: "caret-up", size: 12 })
5157
6620
  }
5158
6621
  );
5159
6622
  });
5160
6623
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
5161
- var SelectScrollDownButton = React34.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
5162
- return /* @__PURE__ */ jsx36(
6624
+ var SelectScrollDownButton = React35.forwardRef(function SelectScrollDownButton2({ className, ...props }, ref) {
6625
+ return /* @__PURE__ */ jsx37(
5163
6626
  SelectPrimitive.ScrollDownButton,
5164
6627
  {
5165
6628
  ref,
@@ -5169,13 +6632,13 @@ var SelectScrollDownButton = React34.forwardRef(function SelectScrollDownButton2
5169
6632
  className
5170
6633
  ),
5171
6634
  ...props,
5172
- children: /* @__PURE__ */ jsx36(Icon, { name: "caret-down", size: 12 })
6635
+ children: /* @__PURE__ */ jsx37(Icon, { name: "caret-down", size: 12 })
5173
6636
  }
5174
6637
  );
5175
6638
  });
5176
6639
  SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
5177
- var SelectContent = React34.forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
5178
- return /* @__PURE__ */ jsx36(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs17(
6640
+ var SelectContent = React35.forwardRef(function SelectContent2({ className, children, position = "popper", ...props }, ref) {
6641
+ return /* @__PURE__ */ jsx37(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs18(
5179
6642
  SelectPrimitive.Content,
5180
6643
  {
5181
6644
  ref,
@@ -5188,8 +6651,8 @@ var SelectContent = React34.forwardRef(function SelectContent2({ className, chil
5188
6651
  ),
5189
6652
  ...props,
5190
6653
  children: [
5191
- /* @__PURE__ */ jsx36(SelectScrollUpButton, {}),
5192
- /* @__PURE__ */ jsx36(
6654
+ /* @__PURE__ */ jsx37(SelectScrollUpButton, {}),
6655
+ /* @__PURE__ */ jsx37(
5193
6656
  SelectPrimitive.Viewport,
5194
6657
  {
5195
6658
  "data-slot": "select-viewport",
@@ -5197,14 +6660,14 @@ var SelectContent = React34.forwardRef(function SelectContent2({ className, chil
5197
6660
  children
5198
6661
  }
5199
6662
  ),
5200
- /* @__PURE__ */ jsx36(SelectScrollDownButton, {})
6663
+ /* @__PURE__ */ jsx37(SelectScrollDownButton, {})
5201
6664
  ]
5202
6665
  }
5203
6666
  ) });
5204
6667
  });
5205
6668
  SelectContent.displayName = SelectPrimitive.Content.displayName;
5206
- var SelectLabel = React34.forwardRef(function SelectLabel2({ className, ...props }, ref) {
5207
- return /* @__PURE__ */ jsx36(
6669
+ var SelectLabel = React35.forwardRef(function SelectLabel2({ className, ...props }, ref) {
6670
+ return /* @__PURE__ */ jsx37(
5208
6671
  SelectPrimitive.Label,
5209
6672
  {
5210
6673
  ref,
@@ -5226,8 +6689,8 @@ var SelectLabel = React34.forwardRef(function SelectLabel2({ className, ...props
5226
6689
  );
5227
6690
  });
5228
6691
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
5229
- var SelectItem = React34.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
5230
- return /* @__PURE__ */ jsxs17(
6692
+ var SelectItem = React35.forwardRef(function SelectItem2({ className, children, ...props }, ref) {
6693
+ return /* @__PURE__ */ jsxs18(
5231
6694
  SelectPrimitive.Item,
5232
6695
  {
5233
6696
  ref,
@@ -5238,20 +6701,20 @@ var SelectItem = React34.forwardRef(function SelectItem2({ className, children,
5238
6701
  ),
5239
6702
  ...props,
5240
6703
  children: [
5241
- /* @__PURE__ */ jsx36(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
6704
+ /* @__PURE__ */ jsx37(SelectPrimitive.ItemText, { className: "truncate", children: renderTextContent(children, {
5242
6705
  as: "span",
5243
6706
  className: "block truncate text-[color:var(--sofya-text-default)]",
5244
6707
  size: "tiny",
5245
6708
  style: inheritedTypographyStyle
5246
6709
  }) }),
5247
- /* @__PURE__ */ jsx36(SelectPrimitive.ItemIndicator, { asChild: true, children: /* @__PURE__ */ jsx36("span", { className: "absolute right-4 inline-flex h-4 w-4 items-center justify-center text-primary", children: /* @__PURE__ */ jsx36(Icon, { name: "check", size: 14 }) }) })
6710
+ /* @__PURE__ */ jsx37(SelectPrimitive.ItemIndicator, { asChild: true, children: /* @__PURE__ */ jsx37("span", { className: "absolute right-4 inline-flex h-4 w-4 items-center justify-center text-primary", children: /* @__PURE__ */ jsx37(Icon, { name: "check", size: 14 }) }) })
5248
6711
  ]
5249
6712
  }
5250
6713
  );
5251
6714
  });
5252
6715
  SelectItem.displayName = SelectPrimitive.Item.displayName;
5253
- var SelectSeparator = React34.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
5254
- return /* @__PURE__ */ jsx36(
6716
+ var SelectSeparator = React35.forwardRef(function SelectSeparator2({ className, ...props }, ref) {
6717
+ return /* @__PURE__ */ jsx37(
5255
6718
  SelectPrimitive.Separator,
5256
6719
  {
5257
6720
  ref,
@@ -5264,11 +6727,11 @@ var SelectSeparator = React34.forwardRef(function SelectSeparator2({ className,
5264
6727
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
5265
6728
 
5266
6729
  // src/components/separator.tsx
5267
- import * as React35 from "react";
6730
+ import * as React36 from "react";
5268
6731
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
5269
- import { jsx as jsx37 } from "react/jsx-runtime";
5270
- var Separator2 = React35.forwardRef(function Separator3({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
5271
- return /* @__PURE__ */ jsx37(
6732
+ import { jsx as jsx38 } from "react/jsx-runtime";
6733
+ var Separator2 = React36.forwardRef(function Separator3({ className, decorative = true, orientation = "horizontal", ...props }, ref) {
6734
+ return /* @__PURE__ */ jsx38(
5272
6735
  SeparatorPrimitive.Root,
5273
6736
  {
5274
6737
  ref,
@@ -5287,8 +6750,8 @@ var Separator2 = React35.forwardRef(function Separator3({ className, decorative
5287
6750
  Separator2.displayName = SeparatorPrimitive.Root.displayName;
5288
6751
 
5289
6752
  // src/components/sidebar-nav-item.tsx
5290
- import * as React36 from "react";
5291
- import { jsx as jsx38, jsxs as jsxs18 } from "react/jsx-runtime";
6753
+ import * as React37 from "react";
6754
+ import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
5292
6755
  var sidebarNavItemAppearanceClassNames = {
5293
6756
  settings: "rounded-[var(--sofya-radius-md)] py-[var(--sofya-space-2)] pl-[var(--sofya-space-3)] pr-[var(--sofya-space-3)] text-[color:var(--sofya-text-soft)] hover:bg-[color:var(--sofya-surface-hover)] hover:text-[color:var(--sofya-text-default)] data-[active=true]:bg-[color:var(--sofya-surface-selected)] data-[active=true]:text-[color:var(--sofya-text-default)] data-[active=true]:hover:bg-[color:var(--sofya-surface-selected-strong)] data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:hover:bg-transparent",
5294
6757
  workspace: "rounded-[var(--sofya-radius-sm)] bg-transparent px-0 py-0 text-[color:var(--sofya-text-subtle)] hover:bg-transparent hover:text-[color:var(--sofya-text-default)] data-[active=true]:bg-transparent data-[active=true]:text-primary data-[active=true]:hover:bg-transparent data-[active=true]:hover:text-primary data-[disabled=true]:text-[color:var(--sofya-text-subtle)] data-[disabled=true]:hover:bg-transparent"
@@ -5301,10 +6764,10 @@ var sidebarNavItemTextSize = {
5301
6764
  settings: "sidebar-title",
5302
6765
  workspace: "sidebar-title-regular"
5303
6766
  };
5304
- var SidebarNav = React36.forwardRef(
6767
+ var SidebarNav = React37.forwardRef(
5305
6768
  ({ as, className, ...props }, ref) => {
5306
6769
  const Comp = as ?? "nav";
5307
- return /* @__PURE__ */ jsx38(
6770
+ return /* @__PURE__ */ jsx39(
5308
6771
  Comp,
5309
6772
  {
5310
6773
  ref,
@@ -5316,8 +6779,8 @@ var SidebarNav = React36.forwardRef(
5316
6779
  }
5317
6780
  );
5318
6781
  SidebarNav.displayName = "SidebarNav";
5319
- var SidebarNavSection = React36.forwardRef(
5320
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
6782
+ var SidebarNavSection = React37.forwardRef(
6783
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
5321
6784
  "div",
5322
6785
  {
5323
6786
  ref,
@@ -5328,10 +6791,10 @@ var SidebarNavSection = React36.forwardRef(
5328
6791
  )
5329
6792
  );
5330
6793
  SidebarNavSection.displayName = "SidebarNavSection";
5331
- var SidebarNavSectionLabel = React36.forwardRef(
6794
+ var SidebarNavSectionLabel = React37.forwardRef(
5332
6795
  ({ as, className, children, ...props }, ref) => {
5333
6796
  const Comp = as ?? "h5";
5334
- return /* @__PURE__ */ jsx38(
6797
+ return /* @__PURE__ */ jsx39(
5335
6798
  Comp,
5336
6799
  {
5337
6800
  ref,
@@ -5348,8 +6811,8 @@ var SidebarNavSectionLabel = React36.forwardRef(
5348
6811
  }
5349
6812
  );
5350
6813
  SidebarNavSectionLabel.displayName = "SidebarNavSectionLabel";
5351
- var SidebarNavSectionItems = React36.forwardRef(
5352
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
6814
+ var SidebarNavSectionItems = React37.forwardRef(
6815
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
5353
6816
  "div",
5354
6817
  {
5355
6818
  ref,
@@ -5360,7 +6823,7 @@ var SidebarNavSectionItems = React36.forwardRef(
5360
6823
  )
5361
6824
  );
5362
6825
  SidebarNavSectionItems.displayName = "SidebarNavSectionItems";
5363
- var SidebarNavItem = React36.forwardRef(
6826
+ var SidebarNavItem = React37.forwardRef(
5364
6827
  function SidebarNavItem2({
5365
6828
  as,
5366
6829
  active = false,
@@ -5373,7 +6836,7 @@ var SidebarNavItem = React36.forwardRef(
5373
6836
  }, ref) {
5374
6837
  const Comp = as ?? (props.href ? "a" : "button");
5375
6838
  const isNativeButton = Comp === "button";
5376
- return /* @__PURE__ */ jsxs18(
6839
+ return /* @__PURE__ */ jsxs19(
5377
6840
  Comp,
5378
6841
  {
5379
6842
  ref,
@@ -5394,7 +6857,7 @@ var SidebarNavItem = React36.forwardRef(
5394
6857
  ),
5395
6858
  ...props,
5396
6859
  children: [
5397
- appearance === "settings" ? /* @__PURE__ */ jsx38(
6860
+ appearance === "settings" ? /* @__PURE__ */ jsx39(
5398
6861
  "span",
5399
6862
  {
5400
6863
  "aria-hidden": "true",
@@ -5405,7 +6868,7 @@ var SidebarNavItem = React36.forwardRef(
5405
6868
  )
5406
6869
  }
5407
6870
  ) : null,
5408
- icon ? /* @__PURE__ */ jsx38(
6871
+ icon ? /* @__PURE__ */ jsx39(
5409
6872
  "span",
5410
6873
  {
5411
6874
  "data-slot": "sidebar-nav-item-icon",
@@ -5413,7 +6876,7 @@ var SidebarNavItem = React36.forwardRef(
5413
6876
  children: icon
5414
6877
  }
5415
6878
  ) : null,
5416
- /* @__PURE__ */ jsx38("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(children, {
6879
+ /* @__PURE__ */ jsx39("span", { className: "min-w-0 flex-1 truncate", children: renderTextContent(children, {
5417
6880
  as: "span",
5418
6881
  className: "block min-w-0 truncate text-inherit",
5419
6882
  size: sidebarNavItemTextSize[appearance]
@@ -5427,8 +6890,8 @@ SidebarNavItem.displayName = "SidebarNavItem";
5427
6890
  var SettingsNavItem = SidebarNavItem;
5428
6891
 
5429
6892
  // src/components/slider.tsx
5430
- import * as React37 from "react";
5431
- import { jsx as jsx39, jsxs as jsxs19 } from "react/jsx-runtime";
6893
+ import * as React38 from "react";
6894
+ import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
5432
6895
  function clampSliderValue(value, min, max) {
5433
6896
  if (Number.isNaN(value)) {
5434
6897
  return min;
@@ -5453,7 +6916,7 @@ function resolveSliderMeasurement(value, fallback) {
5453
6916
  function isTextValue(value) {
5454
6917
  return typeof value === "string" || typeof value === "number";
5455
6918
  }
5456
- var Slider = React37.forwardRef(function Slider2({
6919
+ var Slider = React38.forwardRef(function Slider2({
5457
6920
  className,
5458
6921
  defaultValue,
5459
6922
  formatValue,
@@ -5476,7 +6939,7 @@ var Slider = React37.forwardRef(function Slider2({
5476
6939
  valueClassName,
5477
6940
  ...props
5478
6941
  }, ref) {
5479
- const resolvedId = React37.useId();
6942
+ const resolvedId = React38.useId();
5480
6943
  const inputId = id ?? resolvedId;
5481
6944
  const safeMin = min;
5482
6945
  const safeMax = resolveSliderMax(safeMin, max);
@@ -5485,7 +6948,7 @@ var Slider = React37.forwardRef(function Slider2({
5485
6948
  onChange: onValueChange,
5486
6949
  value
5487
6950
  });
5488
- React37.useEffect(() => {
6951
+ React38.useEffect(() => {
5489
6952
  if (value !== void 0) {
5490
6953
  return;
5491
6954
  }
@@ -5532,14 +6995,14 @@ var Slider = React37.forwardRef(function Slider2({
5532
6995
  setControllableValue(nextValue);
5533
6996
  onChange?.(event);
5534
6997
  };
5535
- return /* @__PURE__ */ jsxs19(
6998
+ return /* @__PURE__ */ jsxs20(
5536
6999
  "div",
5537
7000
  {
5538
7001
  "data-slot": "slider",
5539
7002
  className: cn("grid w-full gap-2", className),
5540
7003
  children: [
5541
- label || showValue ? /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between gap-4", children: [
5542
- label ? /* @__PURE__ */ jsx39(
7004
+ label || showValue ? /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between gap-4", children: [
7005
+ label ? /* @__PURE__ */ jsx40(
5543
7006
  FieldLabel,
5544
7007
  {
5545
7008
  htmlFor: inputId,
@@ -5550,8 +7013,8 @@ var Slider = React37.forwardRef(function Slider2({
5550
7013
  textClassName: "block min-w-0 text-[color:var(--sofya-text-default)]",
5551
7014
  children: label
5552
7015
  }
5553
- ) : /* @__PURE__ */ jsx39("span", {}),
5554
- showValue ? /* @__PURE__ */ jsx39(
7016
+ ) : /* @__PURE__ */ jsx40("span", {}),
7017
+ showValue ? /* @__PURE__ */ jsx40(
5555
7018
  "div",
5556
7019
  {
5557
7020
  className: cn(
@@ -5569,7 +7032,7 @@ var Slider = React37.forwardRef(function Slider2({
5569
7032
  }
5570
7033
  ) : null
5571
7034
  ] }) : null,
5572
- /* @__PURE__ */ jsxs19(
7035
+ /* @__PURE__ */ jsxs20(
5573
7036
  "div",
5574
7037
  {
5575
7038
  "data-slot": "slider-control",
@@ -5579,7 +7042,7 @@ var Slider = React37.forwardRef(function Slider2({
5579
7042
  ),
5580
7043
  style: controlStyle,
5581
7044
  children: [
5582
- /* @__PURE__ */ jsx39(
7045
+ /* @__PURE__ */ jsx40(
5583
7046
  "input",
5584
7047
  {
5585
7048
  ...props,
@@ -5596,7 +7059,7 @@ var Slider = React37.forwardRef(function Slider2({
5596
7059
  style: inputBoundsStyle
5597
7060
  }
5598
7061
  ),
5599
- /* @__PURE__ */ jsx39(
7062
+ /* @__PURE__ */ jsx40(
5600
7063
  "div",
5601
7064
  {
5602
7065
  "data-slot": "slider-track",
@@ -5607,7 +7070,7 @@ var Slider = React37.forwardRef(function Slider2({
5607
7070
  style: trackBoundsStyle
5608
7071
  }
5609
7072
  ),
5610
- /* @__PURE__ */ jsx39(
7073
+ /* @__PURE__ */ jsx40(
5611
7074
  "div",
5612
7075
  {
5613
7076
  "data-slot": "slider-range",
@@ -5618,7 +7081,7 @@ var Slider = React37.forwardRef(function Slider2({
5618
7081
  style: rangeStyle
5619
7082
  }
5620
7083
  ),
5621
- /* @__PURE__ */ jsx39(
7084
+ /* @__PURE__ */ jsx40(
5622
7085
  "div",
5623
7086
  {
5624
7087
  "data-slot": "slider-thumb",
@@ -5639,10 +7102,10 @@ var Slider = React37.forwardRef(function Slider2({
5639
7102
  Slider.displayName = "Slider";
5640
7103
 
5641
7104
  // src/components/skeleton.tsx
5642
- import * as React38 from "react";
5643
- import { jsx as jsx40 } from "react/jsx-runtime";
5644
- var Skeleton = React38.forwardRef(function Skeleton2({ className, ...props }, ref) {
5645
- return /* @__PURE__ */ jsx40(
7105
+ import * as React39 from "react";
7106
+ import { jsx as jsx41 } from "react/jsx-runtime";
7107
+ var Skeleton = React39.forwardRef(function Skeleton2({ className, ...props }, ref) {
7108
+ return /* @__PURE__ */ jsx41(
5646
7109
  "div",
5647
7110
  {
5648
7111
  ref,
@@ -5657,18 +7120,18 @@ var Skeleton = React38.forwardRef(function Skeleton2({ className, ...props }, re
5657
7120
  Skeleton.displayName = "Skeleton";
5658
7121
 
5659
7122
  // src/components/sonner.tsx
5660
- import * as React39 from "react";
7123
+ import * as React40 from "react";
5661
7124
  import {
5662
7125
  Toaster as SonnerToaster,
5663
7126
  toast
5664
7127
  } from "sonner";
5665
- import { jsx as jsx41 } from "react/jsx-runtime";
7128
+ import { jsx as jsx42 } from "react/jsx-runtime";
5666
7129
  var notificationVariantOptions = ["default", "success", "error", "warning"];
5667
7130
  function ToastStatusIcon({
5668
7131
  iconName,
5669
7132
  className
5670
7133
  }) {
5671
- return /* @__PURE__ */ jsx41(
7134
+ return /* @__PURE__ */ jsx42(
5672
7135
  "span",
5673
7136
  {
5674
7137
  "aria-hidden": "true",
@@ -5676,7 +7139,7 @@ function ToastStatusIcon({
5676
7139
  "inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full border shadow-none",
5677
7140
  className
5678
7141
  ),
5679
- children: /* @__PURE__ */ jsx41(Icon, { name: iconName, size: 16 })
7142
+ children: /* @__PURE__ */ jsx42(Icon, { name: iconName, size: 16 })
5680
7143
  }
5681
7144
  );
5682
7145
  }
@@ -5700,35 +7163,35 @@ var defaultToastClassNames = {
5700
7163
  loading: "border-border bg-card text-foreground"
5701
7164
  };
5702
7165
  var defaultToastIcons = {
5703
- success: /* @__PURE__ */ jsx41(
7166
+ success: /* @__PURE__ */ jsx42(
5704
7167
  ToastStatusIcon,
5705
7168
  {
5706
7169
  iconName: "check",
5707
7170
  className: "border-success/15 bg-success/12 text-success"
5708
7171
  }
5709
7172
  ),
5710
- error: /* @__PURE__ */ jsx41(
7173
+ error: /* @__PURE__ */ jsx42(
5711
7174
  ToastStatusIcon,
5712
7175
  {
5713
7176
  iconName: "x",
5714
7177
  className: "border-destructive/15 bg-destructive/12 text-destructive"
5715
7178
  }
5716
7179
  ),
5717
- warning: /* @__PURE__ */ jsx41(
7180
+ warning: /* @__PURE__ */ jsx42(
5718
7181
  ToastStatusIcon,
5719
7182
  {
5720
7183
  iconName: "question",
5721
7184
  className: "border-warning/20 bg-warning/15 text-foreground"
5722
7185
  }
5723
7186
  ),
5724
- info: /* @__PURE__ */ jsx41(
7187
+ info: /* @__PURE__ */ jsx42(
5725
7188
  ToastStatusIcon,
5726
7189
  {
5727
7190
  iconName: "question",
5728
7191
  className: "border-primary/15 bg-primary/10 text-primary"
5729
7192
  }
5730
7193
  ),
5731
- close: /* @__PURE__ */ jsx41(Icon, { name: "x", size: 12 })
7194
+ close: /* @__PURE__ */ jsx42(Icon, { name: "x", size: 12 })
5732
7195
  };
5733
7196
  function mergeToastClassNames(overrides) {
5734
7197
  return {
@@ -5736,7 +7199,7 @@ function mergeToastClassNames(overrides) {
5736
7199
  ...overrides
5737
7200
  };
5738
7201
  }
5739
- var Toaster = React39.forwardRef(
7202
+ var Toaster = React40.forwardRef(
5740
7203
  function Toaster2({
5741
7204
  className,
5742
7205
  closeButton = true,
@@ -5748,7 +7211,7 @@ var Toaster = React39.forwardRef(
5748
7211
  visibleToasts = 5,
5749
7212
  ...props
5750
7213
  }, ref) {
5751
- return /* @__PURE__ */ jsx41(
7214
+ return /* @__PURE__ */ jsx42(
5752
7215
  SonnerToaster,
5753
7216
  {
5754
7217
  ref,
@@ -5803,12 +7266,12 @@ notify.dismiss = toast.dismiss;
5803
7266
  notify.promise = toast.promise;
5804
7267
 
5805
7268
  // src/components/status-indicator.tsx
5806
- import * as React41 from "react";
7269
+ import * as React42 from "react";
5807
7270
 
5808
7271
  // src/components/tooltip.tsx
5809
- import * as React40 from "react";
7272
+ import * as React41 from "react";
5810
7273
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5811
- import { Fragment as Fragment4, jsx as jsx42, jsxs as jsxs20 } from "react/jsx-runtime";
7274
+ import { Fragment as Fragment4, jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
5812
7275
  var TooltipProvider = TooltipPrimitive.Provider;
5813
7276
  var Tooltip = TooltipPrimitive.Root;
5814
7277
  var TooltipTrigger = TooltipPrimitive.Trigger;
@@ -5826,8 +7289,8 @@ var tooltipToneClassNames = {
5826
7289
  warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
5827
7290
  destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
5828
7291
  };
5829
- var TooltipContent = React40.forwardRef(function TooltipContent2({ className, sideOffset = 8, align = "center", tone = "default", ...props }, ref) {
5830
- return /* @__PURE__ */ jsx42(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx42(
7292
+ var TooltipContent = React41.forwardRef(function TooltipContent2({ className, sideOffset = 8, align = "center", tone = "default", ...props }, ref) {
7293
+ return /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx43(
5831
7294
  TooltipPrimitive.Content,
5832
7295
  {
5833
7296
  ref,
@@ -5853,7 +7316,7 @@ var TooltipContent = React40.forwardRef(function TooltipContent2({ className, si
5853
7316
  ) });
5854
7317
  });
5855
7318
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
5856
- var StatusTooltip = React40.forwardRef(function StatusTooltip2({
7319
+ var StatusTooltip = React41.forwardRef(function StatusTooltip2({
5857
7320
  children,
5858
7321
  label,
5859
7322
  status = "default",
@@ -5868,11 +7331,11 @@ var StatusTooltip = React40.forwardRef(function StatusTooltip2({
5868
7331
  className
5869
7332
  }, ref) {
5870
7333
  if (disabled) {
5871
- return /* @__PURE__ */ jsx42(Fragment4, { children });
7334
+ return /* @__PURE__ */ jsx43(Fragment4, { children });
5872
7335
  }
5873
- return /* @__PURE__ */ jsx42(TooltipProvider, { delayDuration, children: /* @__PURE__ */ jsxs20(Tooltip, { open, defaultOpen, onOpenChange, children: [
5874
- /* @__PURE__ */ jsx42(TooltipTrigger, { asChild: true, children }),
5875
- /* @__PURE__ */ jsx42(
7336
+ return /* @__PURE__ */ jsx43(TooltipProvider, { delayDuration, children: /* @__PURE__ */ jsxs21(Tooltip, { open, defaultOpen, onOpenChange, children: [
7337
+ /* @__PURE__ */ jsx43(TooltipTrigger, { asChild: true, children }),
7338
+ /* @__PURE__ */ jsx43(
5876
7339
  TooltipContent,
5877
7340
  {
5878
7341
  ref,
@@ -5890,7 +7353,7 @@ var StatusTooltip = React40.forwardRef(function StatusTooltip2({
5890
7353
  StatusTooltip.displayName = "StatusTooltip";
5891
7354
 
5892
7355
  // src/components/status-indicator.tsx
5893
- import { jsx as jsx43, jsxs as jsxs21 } from "react/jsx-runtime";
7356
+ import { jsx as jsx44, jsxs as jsxs22 } from "react/jsx-runtime";
5894
7357
  var workflowStatusOptions = [
5895
7358
  "draft",
5896
7359
  "in_progress",
@@ -5971,7 +7434,7 @@ var toneTextClassName = {
5971
7434
  warning: "text-[color:var(--sofya-tone-warning-foreground)]",
5972
7435
  destructive: "text-[color:var(--sofya-tone-destructive-foreground)]"
5973
7436
  };
5974
- var StatusIndicator = React41.forwardRef(
7437
+ var StatusIndicator = React42.forwardRef(
5975
7438
  function StatusIndicator2({
5976
7439
  className,
5977
7440
  label,
@@ -5982,7 +7445,7 @@ var StatusIndicator = React41.forwardRef(
5982
7445
  ...props
5983
7446
  }, ref) {
5984
7447
  const resolved = resolveWorkflowStatus(status, { label });
5985
- const indicator = /* @__PURE__ */ jsxs21(
7448
+ const indicator = /* @__PURE__ */ jsxs22(
5986
7449
  "span",
5987
7450
  {
5988
7451
  ref,
@@ -5997,7 +7460,7 @@ var StatusIndicator = React41.forwardRef(
5997
7460
  ),
5998
7461
  ...props,
5999
7462
  children: [
6000
- /* @__PURE__ */ jsx43(
7463
+ /* @__PURE__ */ jsx44(
6001
7464
  "span",
6002
7465
  {
6003
7466
  "aria-hidden": "true",
@@ -6018,15 +7481,15 @@ var StatusIndicator = React41.forwardRef(
6018
7481
  if (!tooltip) {
6019
7482
  return indicator;
6020
7483
  }
6021
- return /* @__PURE__ */ jsx43(StatusTooltip, { status: resolved.tone, label: resolved.label, side, children: indicator });
7484
+ return /* @__PURE__ */ jsx44(StatusTooltip, { status: resolved.tone, label: resolved.label, side, children: indicator });
6022
7485
  }
6023
7486
  );
6024
7487
  StatusIndicator.displayName = "StatusIndicator";
6025
7488
 
6026
7489
  // src/components/switch.tsx
6027
- import * as React42 from "react";
7490
+ import * as React43 from "react";
6028
7491
  import * as SwitchPrimitives from "@radix-ui/react-switch";
6029
- import { jsx as jsx44, jsxs as jsxs22 } from "react/jsx-runtime";
7492
+ import { jsx as jsx45, jsxs as jsxs23 } from "react/jsx-runtime";
6030
7493
  var switchSizeOptions = ["default", "sm"];
6031
7494
  var switchRootSizeClasses = {
6032
7495
  default: "h-6 w-11",
@@ -6036,7 +7499,7 @@ var switchThumbSizeClasses = {
6036
7499
  default: "h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
6037
7500
  sm: "h-4 w-4 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
6038
7501
  };
6039
- var Switch = React42.forwardRef(
7502
+ var Switch = React43.forwardRef(
6040
7503
  ({
6041
7504
  "aria-describedby": ariaDescribedBy,
6042
7505
  "aria-labelledby": ariaLabelledBy,
@@ -6051,7 +7514,7 @@ var Switch = React42.forwardRef(
6051
7514
  size,
6052
7515
  ...props
6053
7516
  }, ref) => {
6054
- const generatedId = React42.useId();
7517
+ const generatedId = React43.useId();
6055
7518
  const resolvedId = id ?? generatedId;
6056
7519
  const labelId = label ? `${resolvedId}-label` : void 0;
6057
7520
  const descriptionId = description ? `${resolvedId}-description` : void 0;
@@ -6060,7 +7523,7 @@ var Switch = React42.forwardRef(
6060
7523
  const alignClassName2 = description ? "items-start" : "items-center";
6061
7524
  const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
6062
7525
  const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
6063
- const switchControl = /* @__PURE__ */ jsx44(
7526
+ const switchControl = /* @__PURE__ */ jsx45(
6064
7527
  SwitchPrimitives.Root,
6065
7528
  {
6066
7529
  id: resolvedId,
@@ -6075,7 +7538,7 @@ var Switch = React42.forwardRef(
6075
7538
  "data-size": resolvedSize,
6076
7539
  ...props,
6077
7540
  ref,
6078
- children: /* @__PURE__ */ jsx44(
7541
+ children: /* @__PURE__ */ jsx45(
6079
7542
  SwitchPrimitives.Thumb,
6080
7543
  {
6081
7544
  className: cn(
@@ -6089,7 +7552,7 @@ var Switch = React42.forwardRef(
6089
7552
  if (!hasTextContent) {
6090
7553
  return switchControl;
6091
7554
  }
6092
- return /* @__PURE__ */ jsxs22(
7555
+ return /* @__PURE__ */ jsxs23(
6093
7556
  "div",
6094
7557
  {
6095
7558
  "data-slot": "switch-container",
@@ -6100,8 +7563,8 @@ var Switch = React42.forwardRef(
6100
7563
  }),
6101
7564
  children: [
6102
7565
  switchControl,
6103
- /* @__PURE__ */ jsxs22("span", { className: selectionControlContentBaseClasses, children: [
6104
- label ? /* @__PURE__ */ jsx44("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ jsx44(
7566
+ /* @__PURE__ */ jsxs23("span", { className: selectionControlContentBaseClasses, children: [
7567
+ label ? /* @__PURE__ */ jsx45("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ jsx45(
6105
7568
  "span",
6106
7569
  {
6107
7570
  id: labelId,
@@ -6116,7 +7579,7 @@ var Switch = React42.forwardRef(
6116
7579
  })
6117
7580
  }
6118
7581
  ) }) : null,
6119
- description ? /* @__PURE__ */ jsx44(
7582
+ description ? /* @__PURE__ */ jsx45(
6120
7583
  "span",
6121
7584
  {
6122
7585
  id: descriptionId,
@@ -6141,8 +7604,8 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
6141
7604
 
6142
7605
  // src/components/table.tsx
6143
7606
  import { cva as cva8 } from "class-variance-authority";
6144
- import * as React43 from "react";
6145
- import { jsx as jsx45 } from "react/jsx-runtime";
7607
+ import * as React44 from "react";
7608
+ import { jsx as jsx46 } from "react/jsx-runtime";
6146
7609
  var tableDensityOptions = ["default", "compact"];
6147
7610
  var tableCellVariantOptions = ["default", "primary", "muted"];
6148
7611
  var tableStatusToneOptions = [
@@ -6152,10 +7615,10 @@ var tableStatusToneOptions = [
6152
7615
  "warning"
6153
7616
  ];
6154
7617
  var tableActionToneOptions = ["primary", "neutral", "danger"];
6155
- var TableDensityContext = React43.createContext("default");
6156
- var TableHeaderDensityContext = React43.createContext("default");
7618
+ var TableDensityContext = React44.createContext("default");
7619
+ var TableHeaderDensityContext = React44.createContext("default");
6157
7620
  function useTableDensity(density) {
6158
- const inheritedDensity = React43.useContext(TableDensityContext);
7621
+ const inheritedDensity = React44.useContext(TableDensityContext);
6159
7622
  return density ?? inheritedDensity;
6160
7623
  }
6161
7624
  var tableCellVariants = cva8(
@@ -6211,13 +7674,13 @@ var tableActionButtonVariants = cva8(
6211
7674
  }
6212
7675
  }
6213
7676
  );
6214
- var Table = React43.forwardRef(function Table2({ className, density = "default", ...props }, ref) {
6215
- return /* @__PURE__ */ jsx45(TableDensityContext.Provider, { value: density, children: /* @__PURE__ */ jsx45(
7677
+ var Table = React44.forwardRef(function Table2({ className, density = "default", ...props }, ref) {
7678
+ return /* @__PURE__ */ jsx46(TableDensityContext.Provider, { value: density, children: /* @__PURE__ */ jsx46(
6216
7679
  "div",
6217
7680
  {
6218
7681
  "data-slot": "table-container",
6219
7682
  className: "relative w-full overflow-x-auto",
6220
- children: /* @__PURE__ */ jsx45(
7683
+ children: /* @__PURE__ */ jsx46(
6221
7684
  "table",
6222
7685
  {
6223
7686
  "data-density": density,
@@ -6234,10 +7697,10 @@ var Table = React43.forwardRef(function Table2({ className, density = "default",
6234
7697
  }
6235
7698
  ) });
6236
7699
  });
6237
- var TableHeader = React43.forwardRef(function TableHeader2({ className, density, ...props }, ref) {
7700
+ var TableHeader = React44.forwardRef(function TableHeader2({ className, density, ...props }, ref) {
6238
7701
  const tableDensity = useTableDensity();
6239
7702
  const headerDensity = density ?? tableDensity;
6240
- return /* @__PURE__ */ jsx45(TableHeaderDensityContext.Provider, { value: headerDensity, children: /* @__PURE__ */ jsx45(TableDensityContext.Provider, { value: "default", children: /* @__PURE__ */ jsx45(
7703
+ return /* @__PURE__ */ jsx46(TableHeaderDensityContext.Provider, { value: headerDensity, children: /* @__PURE__ */ jsx46(TableDensityContext.Provider, { value: "default", children: /* @__PURE__ */ jsx46(
6241
7704
  "thead",
6242
7705
  {
6243
7706
  "data-slot": "table-header",
@@ -6251,8 +7714,8 @@ var TableHeader = React43.forwardRef(function TableHeader2({ className, density,
6251
7714
  }
6252
7715
  ) }) });
6253
7716
  });
6254
- var TableBody = React43.forwardRef(function TableBody2({ className, ...props }, ref) {
6255
- return /* @__PURE__ */ jsx45(
7717
+ var TableBody = React44.forwardRef(function TableBody2({ className, ...props }, ref) {
7718
+ return /* @__PURE__ */ jsx46(
6256
7719
  "tbody",
6257
7720
  {
6258
7721
  "data-slot": "table-body",
@@ -6262,8 +7725,8 @@ var TableBody = React43.forwardRef(function TableBody2({ className, ...props },
6262
7725
  }
6263
7726
  );
6264
7727
  });
6265
- var TableFooter = React43.forwardRef(function TableFooter2({ className, ...props }, ref) {
6266
- return /* @__PURE__ */ jsx45(
7728
+ var TableFooter = React44.forwardRef(function TableFooter2({ className, ...props }, ref) {
7729
+ return /* @__PURE__ */ jsx46(
6267
7730
  "tfoot",
6268
7731
  {
6269
7732
  "data-slot": "table-footer",
@@ -6276,10 +7739,10 @@ var TableFooter = React43.forwardRef(function TableFooter2({ className, ...props
6276
7739
  }
6277
7740
  );
6278
7741
  });
6279
- var TableRow = React43.forwardRef(
7742
+ var TableRow = React44.forwardRef(
6280
7743
  function TableRow2({ className, density, ...props }, ref) {
6281
7744
  const resolvedDensity = useTableDensity(density);
6282
- return /* @__PURE__ */ jsx45(TableDensityContext.Provider, { value: resolvedDensity, children: /* @__PURE__ */ jsx45(
7745
+ return /* @__PURE__ */ jsx46(TableDensityContext.Provider, { value: resolvedDensity, children: /* @__PURE__ */ jsx46(
6283
7746
  "tr",
6284
7747
  {
6285
7748
  "data-density": resolvedDensity,
@@ -6295,9 +7758,9 @@ var TableRow = React43.forwardRef(
6295
7758
  ) });
6296
7759
  }
6297
7760
  );
6298
- var TableHead = React43.forwardRef(function TableHead2({ className, children, ...props }, ref) {
6299
- const headerDensity = React43.useContext(TableHeaderDensityContext);
6300
- return /* @__PURE__ */ jsx45(
7761
+ var TableHead = React44.forwardRef(function TableHead2({ className, children, ...props }, ref) {
7762
+ const headerDensity = React44.useContext(TableHeaderDensityContext);
7763
+ return /* @__PURE__ */ jsx46(
6301
7764
  "th",
6302
7765
  {
6303
7766
  "data-slot": "table-head",
@@ -6318,10 +7781,10 @@ var TableHead = React43.forwardRef(function TableHead2({ className, children, ..
6318
7781
  }
6319
7782
  );
6320
7783
  });
6321
- var TableCell = React43.forwardRef(
7784
+ var TableCell = React44.forwardRef(
6322
7785
  function TableCell2({ className, density, variant, truncate, children, ...props }, ref) {
6323
7786
  const resolvedDensity = useTableDensity(density);
6324
- return /* @__PURE__ */ jsx45(
7787
+ return /* @__PURE__ */ jsx46(
6325
7788
  "td",
6326
7789
  {
6327
7790
  "data-density": resolvedDensity,
@@ -6346,8 +7809,8 @@ var TableCell = React43.forwardRef(
6346
7809
  );
6347
7810
  }
6348
7811
  );
6349
- var TableCaption = React43.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
6350
- return /* @__PURE__ */ jsx45(
7812
+ var TableCaption = React44.forwardRef(function TableCaption2({ className, children, ...props }, ref) {
7813
+ return /* @__PURE__ */ jsx46(
6351
7814
  "caption",
6352
7815
  {
6353
7816
  "data-slot": "table-caption",
@@ -6366,12 +7829,12 @@ var TableCaption = React43.forwardRef(function TableCaption2({ className, childr
6366
7829
  }
6367
7830
  );
6368
7831
  });
6369
- var TableCellTitle = React43.forwardRef(
7832
+ var TableCellTitle = React44.forwardRef(
6370
7833
  function TableCellTitle2({ className, children, size, ...props }, ref) {
6371
7834
  const density = useTableDensity();
6372
7835
  const resolvedSize = size ?? (density === "compact" ? "compact" : "default");
6373
7836
  const textSize = resolvedSize === "compact" ? "label-md" : "body";
6374
- return /* @__PURE__ */ jsx45(
7837
+ return /* @__PURE__ */ jsx46(
6375
7838
  "span",
6376
7839
  {
6377
7840
  "data-slot": "table-cell-title",
@@ -6391,11 +7854,11 @@ var TableCellTitle = React43.forwardRef(
6391
7854
  );
6392
7855
  }
6393
7856
  );
6394
- var TableCellDescription = React43.forwardRef(function TableCellDescription2({ className, children, size, ...props }, ref) {
7857
+ var TableCellDescription = React44.forwardRef(function TableCellDescription2({ className, children, size, ...props }, ref) {
6395
7858
  const density = useTableDensity();
6396
7859
  const resolvedSize = size ?? (density === "compact" ? "compact" : "default");
6397
7860
  const textSize = resolvedSize === "compact" ? "body-sm" : "tiny";
6398
- return /* @__PURE__ */ jsx45(
7861
+ return /* @__PURE__ */ jsx46(
6399
7862
  "span",
6400
7863
  {
6401
7864
  "data-slot": "table-cell-description",
@@ -6423,7 +7886,7 @@ function TableStatusBadge({
6423
7886
  ...props
6424
7887
  }) {
6425
7888
  const resolvedDensity = useTableDensity(density);
6426
- return /* @__PURE__ */ jsx45(
7889
+ return /* @__PURE__ */ jsx46(
6427
7890
  Badge,
6428
7891
  {
6429
7892
  "data-density": resolvedDensity,
@@ -6442,8 +7905,8 @@ function TableStatusBadge({
6442
7905
  }
6443
7906
  );
6444
7907
  }
6445
- var TableActionButton = React43.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
6446
- return /* @__PURE__ */ jsx45(
7908
+ var TableActionButton = React44.forwardRef(function TableActionButton2({ className, tone, type = "button", children, ...props }, ref) {
7909
+ return /* @__PURE__ */ jsx46(
6447
7910
  Button,
6448
7911
  {
6449
7912
  ref,
@@ -6461,8 +7924,8 @@ var TableActionButton = React43.forwardRef(function TableActionButton2({ classNa
6461
7924
  }
6462
7925
  );
6463
7926
  });
6464
- var TableActions = React43.forwardRef(function TableActions2({ className, ...props }, ref) {
6465
- return /* @__PURE__ */ jsx45(
7927
+ var TableActions = React44.forwardRef(function TableActions2({ className, ...props }, ref) {
7928
+ return /* @__PURE__ */ jsx46(
6466
7929
  "div",
6467
7930
  {
6468
7931
  ref,
@@ -6489,8 +7952,8 @@ TableActions.displayName = "TableActions";
6489
7952
 
6490
7953
  // src/components/tag.tsx
6491
7954
  import { cva as cva9 } from "class-variance-authority";
6492
- import * as React44 from "react";
6493
- import { jsx as jsx46, jsxs as jsxs23 } from "react/jsx-runtime";
7955
+ import * as React45 from "react";
7956
+ import { jsx as jsx47, jsxs as jsxs24 } from "react/jsx-runtime";
6494
7957
  var tagVariantOptions = [
6495
7958
  "neutral",
6496
7959
  "organization",
@@ -6531,9 +7994,9 @@ var tagStatusToneClasses = {
6531
7994
  warning: "border-[color:var(--sofya-tone-warning-border)] bg-[color:var(--sofya-tone-warning-background)] text-[color:var(--sofya-tone-warning-foreground)]",
6532
7995
  destructive: "border-[color:var(--sofya-tone-destructive-border)] bg-[color:var(--sofya-tone-destructive-background)] text-[color:var(--sofya-tone-destructive-foreground)]"
6533
7996
  };
6534
- var Tag = React44.forwardRef(function Tag2({ children, className, icon, tone = "info", truncate = false, variant, ...props }, ref) {
7997
+ var Tag = React45.forwardRef(function Tag2({ children, className, icon, tone = "info", truncate = false, variant, ...props }, ref) {
6535
7998
  const resolvedVariant = variant ?? "neutral";
6536
- return /* @__PURE__ */ jsxs23(
7999
+ return /* @__PURE__ */ jsxs24(
6537
8000
  "span",
6538
8001
  {
6539
8002
  ref,
@@ -6547,7 +8010,7 @@ var Tag = React44.forwardRef(function Tag2({ children, className, icon, tone = "
6547
8010
  ),
6548
8011
  ...props,
6549
8012
  children: [
6550
- icon ? /* @__PURE__ */ jsx46("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
8013
+ icon ? /* @__PURE__ */ jsx47("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
6551
8014
  renderTextContent(children, {
6552
8015
  as: "span",
6553
8016
  className: cn("text-inherit", truncate && "min-w-0 truncate"),
@@ -6568,11 +8031,11 @@ var privacyDefaultLabels = {
6568
8031
  organization: "Minha organiza\xE7\xE3o",
6569
8032
  public: "P\xFAblico"
6570
8033
  };
6571
- var PrivacyLabel = React44.forwardRef(
8034
+ var PrivacyLabel = React45.forwardRef(
6572
8035
  function PrivacyLabel2({ appearance = "text", className, icon, label, privacy, ...props }, ref) {
6573
8036
  const content = label ?? privacyDefaultLabels[privacy];
6574
8037
  if (appearance === "tag") {
6575
- return /* @__PURE__ */ jsx46(
8038
+ return /* @__PURE__ */ jsx47(
6576
8039
  Tag,
6577
8040
  {
6578
8041
  ref,
@@ -6585,7 +8048,7 @@ var PrivacyLabel = React44.forwardRef(
6585
8048
  }
6586
8049
  );
6587
8050
  }
6588
- return /* @__PURE__ */ jsxs23(
8051
+ return /* @__PURE__ */ jsxs24(
6589
8052
  "span",
6590
8053
  {
6591
8054
  ref,
@@ -6597,7 +8060,7 @@ var PrivacyLabel = React44.forwardRef(
6597
8060
  ),
6598
8061
  ...props,
6599
8062
  children: [
6600
- icon ? /* @__PURE__ */ jsx46("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
8063
+ icon ? /* @__PURE__ */ jsx47("span", { className: "inline-flex shrink-0 items-center justify-center", children: icon }) : null,
6601
8064
  renderTextContent(content, {
6602
8065
  as: "span",
6603
8066
  className: "text-inherit",
@@ -6611,12 +8074,12 @@ var PrivacyLabel = React44.forwardRef(
6611
8074
  PrivacyLabel.displayName = "PrivacyLabel";
6612
8075
 
6613
8076
  // src/components/template-card.tsx
6614
- import * as React45 from "react";
6615
- import { Fragment as Fragment5, jsx as jsx47, jsxs as jsxs24 } from "react/jsx-runtime";
8077
+ import * as React46 from "react";
8078
+ import { Fragment as Fragment5, jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
6616
8079
  var templateCardLayoutOptions = ["card", "list"];
6617
8080
  var templateCardFavoriteDisplayOptions = ["action", "inline"];
6618
8081
  var templateCardMetaPlacementOptions = ["block", "inline"];
6619
- var TemplateCard = React45.forwardRef(
8082
+ var TemplateCard = React46.forwardRef(
6620
8083
  function TemplateCard2({
6621
8084
  className,
6622
8085
  description,
@@ -6643,14 +8106,14 @@ var TemplateCard = React45.forwardRef(
6643
8106
  const showInlineMeta = metaPlacement === "inline" && Boolean(meta);
6644
8107
  const showBlockMeta = metaPlacement !== "inline" && Boolean(meta);
6645
8108
  const showFavoriteAction = favoriteDisplay !== "inline" && (onToggleFavorite !== void 0 || favorited !== void 0);
6646
- const actions = showFavoriteAction || overflow ? /* @__PURE__ */ jsxs24("div", { className: "flex shrink-0 items-center gap-[var(--sofya-gap-tight)]", children: [
6647
- showFavoriteAction ? /* @__PURE__ */ jsx47(
8109
+ const actions = showFavoriteAction || overflow ? /* @__PURE__ */ jsxs25("div", { className: "flex shrink-0 items-center gap-[var(--sofya-gap-tight)]", children: [
8110
+ showFavoriteAction ? /* @__PURE__ */ jsx48(
6648
8111
  IconButton,
6649
8112
  {
6650
8113
  "aria-label": favoriteLabel,
6651
8114
  selected: Boolean(favorited),
6652
8115
  onClick: onToggleFavorite,
6653
- icon: /* @__PURE__ */ jsx47(Icon, { name: "star", size: 18 })
8116
+ icon: /* @__PURE__ */ jsx48(Icon, { name: "star", size: 18 })
6654
8117
  }
6655
8118
  ) : null,
6656
8119
  overflow
@@ -6665,10 +8128,10 @@ var TemplateCard = React45.forwardRef(
6665
8128
  style: selectable ? { fontSize: "15px", lineHeight: "26px", fontWeight: 600 } : void 0
6666
8129
  });
6667
8130
  const hasInlineTitleExtras = showInlineStar || showInlineMeta;
6668
- const titleRow = hasInlineTitleExtras ? /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 items-center gap-[var(--sofya-gap-tight)]", children: [
6669
- showInlineStar ? /* @__PURE__ */ jsx47(Icon, { name: "star-filled", size: 18, color: "primary" }) : null,
8131
+ const titleRow = hasInlineTitleExtras ? /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 items-center gap-[var(--sofya-gap-tight)]", children: [
8132
+ showInlineStar ? /* @__PURE__ */ jsx48(Icon, { name: "star-filled", size: 18, color: "primary" }) : null,
6670
8133
  titleNode,
6671
- showInlineMeta ? /* @__PURE__ */ jsx47(
8134
+ showInlineMeta ? /* @__PURE__ */ jsx48(
6672
8135
  "span",
6673
8136
  {
6674
8137
  "data-slot": "template-card-meta-inline",
@@ -6677,7 +8140,7 @@ var TemplateCard = React45.forwardRef(
6677
8140
  }
6678
8141
  ) : null
6679
8142
  ] }) : titleNode;
6680
- const heading = /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-col gap-[var(--sofya-space-1)]", children: [
8143
+ const heading = /* @__PURE__ */ jsxs25("div", { className: "flex min-w-0 flex-col gap-[var(--sofya-space-1)]", children: [
6681
8144
  titleRow,
6682
8145
  description ? renderTextContent(description, {
6683
8146
  as: "span",
@@ -6695,7 +8158,7 @@ var TemplateCard = React45.forwardRef(
6695
8158
  style: selectable ? { fontSize: "14px", lineHeight: "18px", fontWeight: 400 } : void 0
6696
8159
  }) : null
6697
8160
  ] });
6698
- const blockMeta = showBlockMeta ? /* @__PURE__ */ jsx47(
8161
+ const blockMeta = showBlockMeta ? /* @__PURE__ */ jsx48(
6699
8162
  "div",
6700
8163
  {
6701
8164
  "data-slot": "template-card-meta",
@@ -6719,7 +8182,7 @@ var TemplateCard = React45.forwardRef(
6719
8182
  }
6720
8183
  onKeyDown?.(event);
6721
8184
  };
6722
- return /* @__PURE__ */ jsx47(
8185
+ return /* @__PURE__ */ jsx48(
6723
8186
  "div",
6724
8187
  {
6725
8188
  ref,
@@ -6745,13 +8208,13 @@ var TemplateCard = React45.forwardRef(
6745
8208
  className
6746
8209
  ),
6747
8210
  ...props,
6748
- children: selectable ? /* @__PURE__ */ jsxs24(Fragment5, { children: [
6749
- /* @__PURE__ */ jsx47(
8211
+ children: selectable ? /* @__PURE__ */ jsxs25(Fragment5, { children: [
8212
+ /* @__PURE__ */ jsx48(
6750
8213
  "span",
6751
8214
  {
6752
8215
  className: "shrink-0",
6753
8216
  onClick: (event) => event.stopPropagation(),
6754
- children: /* @__PURE__ */ jsx47(
8217
+ children: /* @__PURE__ */ jsx48(
6755
8218
  Checkbox,
6756
8219
  {
6757
8220
  checked: selected,
@@ -6761,15 +8224,15 @@ var TemplateCard = React45.forwardRef(
6761
8224
  )
6762
8225
  }
6763
8226
  ),
6764
- /* @__PURE__ */ jsx47("div", { className: "min-w-0 flex-1", children: heading }),
8227
+ /* @__PURE__ */ jsx48("div", { className: "min-w-0 flex-1", children: heading }),
6765
8228
  blockMeta,
6766
8229
  actions
6767
- ] }) : isList ? /* @__PURE__ */ jsxs24(Fragment5, { children: [
6768
- /* @__PURE__ */ jsx47("div", { className: "min-w-0 flex-1", children: heading }),
8230
+ ] }) : isList ? /* @__PURE__ */ jsxs25(Fragment5, { children: [
8231
+ /* @__PURE__ */ jsx48("div", { className: "min-w-0 flex-1", children: heading }),
6769
8232
  blockMeta,
6770
8233
  actions
6771
- ] }) : /* @__PURE__ */ jsxs24(Fragment5, { children: [
6772
- /* @__PURE__ */ jsxs24("div", { className: "flex items-start justify-between gap-[var(--sofya-gap-compact)]", children: [
8234
+ ] }) : /* @__PURE__ */ jsxs25(Fragment5, { children: [
8235
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-start justify-between gap-[var(--sofya-gap-compact)]", children: [
6773
8236
  heading,
6774
8237
  actions
6775
8238
  ] }),
@@ -6780,16 +8243,16 @@ var TemplateCard = React45.forwardRef(
6780
8243
  }
6781
8244
  );
6782
8245
  TemplateCard.displayName = "TemplateCard";
6783
- var TemplateListItem = React45.forwardRef(function TemplateListItem2(props, ref) {
6784
- return /* @__PURE__ */ jsx47(TemplateCard, { ref, layout: "list", ...props });
8246
+ var TemplateListItem = React46.forwardRef(function TemplateListItem2(props, ref) {
8247
+ return /* @__PURE__ */ jsx48(TemplateCard, { ref, layout: "list", ...props });
6785
8248
  });
6786
8249
  TemplateListItem.displayName = "TemplateListItem";
6787
8250
 
6788
8251
  // src/components/tabs.tsx
6789
- import * as React46 from "react";
8252
+ import * as React47 from "react";
6790
8253
  import * as TabsPrimitive from "@radix-ui/react-tabs";
6791
8254
  import { motion as motion3 } from "motion/react";
6792
- import { jsx as jsx48, jsxs as jsxs25 } from "react/jsx-runtime";
8255
+ import { jsx as jsx49, jsxs as jsxs26 } from "react/jsx-runtime";
6793
8256
  function resolveDefaultValue(items, defaultValue) {
6794
8257
  if (defaultValue) {
6795
8258
  return defaultValue;
@@ -6813,13 +8276,13 @@ function Tabs({
6813
8276
  onChange: onValueChange,
6814
8277
  value
6815
8278
  });
6816
- const indicatorLayoutId = React46.useId();
6817
- React46.useEffect(() => {
8279
+ const indicatorLayoutId = React47.useId();
8280
+ React47.useEffect(() => {
6818
8281
  if (value === void 0) {
6819
8282
  setUncontrolledCurrentValue(resolvedDefaultValue);
6820
8283
  }
6821
8284
  }, [resolvedDefaultValue, setUncontrolledCurrentValue, value]);
6822
- return /* @__PURE__ */ jsxs25(
8285
+ return /* @__PURE__ */ jsxs26(
6823
8286
  TabsPrimitive.Root,
6824
8287
  {
6825
8288
  className: cn("w-full", className),
@@ -6827,7 +8290,7 @@ function Tabs({
6827
8290
  value: currentValue,
6828
8291
  ...props,
6829
8292
  children: [
6830
- /* @__PURE__ */ jsx48(
8293
+ /* @__PURE__ */ jsx49(
6831
8294
  TabsPrimitive.List,
6832
8295
  {
6833
8296
  "aria-label": "Subtelas navegaveis",
@@ -6838,7 +8301,7 @@ function Tabs({
6838
8301
  children: items.map((item) => {
6839
8302
  const isUnavailable = item.disabled || item.loading;
6840
8303
  const isActive = item.value === currentValue;
6841
- return /* @__PURE__ */ jsxs25(
8304
+ return /* @__PURE__ */ jsxs26(
6842
8305
  TabsPrimitive.Trigger,
6843
8306
  {
6844
8307
  value: item.value,
@@ -6850,7 +8313,7 @@ function Tabs({
6850
8313
  item.triggerClassName
6851
8314
  ),
6852
8315
  children: [
6853
- isActive ? /* @__PURE__ */ jsx48(
8316
+ isActive ? /* @__PURE__ */ jsx49(
6854
8317
  motion3.span,
6855
8318
  {
6856
8319
  "aria-hidden": "true",
@@ -6860,15 +8323,15 @@ function Tabs({
6860
8323
  transition: { duration: 0.25, ease: "easeInOut" }
6861
8324
  }
6862
8325
  ) : null,
6863
- /* @__PURE__ */ jsxs25("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
6864
- item.loading ? /* @__PURE__ */ jsx48(
8326
+ /* @__PURE__ */ jsxs26("span", { className: "relative z-10 inline-flex items-center gap-2", children: [
8327
+ item.loading ? /* @__PURE__ */ jsx49(
6865
8328
  "span",
6866
8329
  {
6867
8330
  "aria-hidden": "true",
6868
8331
  className: "h-4 w-4 animate-spin rounded-full border-2 border-current border-r-transparent"
6869
8332
  }
6870
8333
  ) : null,
6871
- /* @__PURE__ */ jsx48("span", { children: renderTextContent(item.label, {
8334
+ /* @__PURE__ */ jsx49("span", { children: renderTextContent(item.label, {
6872
8335
  as: "span",
6873
8336
  className: "block text-inherit",
6874
8337
  size: "body"
@@ -6882,7 +8345,7 @@ function Tabs({
6882
8345
  }
6883
8346
  ),
6884
8347
  items.map(
6885
- (item) => item.content !== void 0 ? /* @__PURE__ */ jsx48(
8348
+ (item) => item.content !== void 0 ? /* @__PURE__ */ jsx49(
6886
8349
  TabsPrimitive.Content,
6887
8350
  {
6888
8351
  value: item.value,
@@ -6905,9 +8368,9 @@ function Tabs({
6905
8368
  Tabs.displayName = "Tabs";
6906
8369
 
6907
8370
  // src/components/textarea.tsx
6908
- import * as React47 from "react";
6909
- import { jsx as jsx49 } from "react/jsx-runtime";
6910
- var Textarea = React47.forwardRef(
8371
+ import * as React48 from "react";
8372
+ import { jsx as jsx50 } from "react/jsx-runtime";
8373
+ var Textarea = React48.forwardRef(
6911
8374
  ({
6912
8375
  className,
6913
8376
  containerClassName,
@@ -6917,10 +8380,10 @@ var Textarea = React47.forwardRef(
6917
8380
  rows = 5,
6918
8381
  ...props
6919
8382
  }, ref) => {
6920
- const generatedId = React47.useId();
8383
+ const generatedId = React48.useId();
6921
8384
  const resolvedId = id ?? generatedId;
6922
8385
  const ariaLabel = props["aria-label"] ?? (typeof label === "string" ? label : void 0);
6923
- const control = /* @__PURE__ */ jsx49(
8386
+ const control = /* @__PURE__ */ jsx50(
6924
8387
  "textarea",
6925
8388
  {
6926
8389
  className: cn(
@@ -6934,7 +8397,7 @@ var Textarea = React47.forwardRef(
6934
8397
  "aria-label": ariaLabel
6935
8398
  }
6936
8399
  );
6937
- return /* @__PURE__ */ jsx49(
8400
+ return /* @__PURE__ */ jsx50(
6938
8401
  FieldShell,
6939
8402
  {
6940
8403
  control,
@@ -6949,10 +8412,10 @@ var Textarea = React47.forwardRef(
6949
8412
  Textarea.displayName = "Textarea";
6950
8413
 
6951
8414
  // src/components/toggle.tsx
6952
- import * as React48 from "react";
8415
+ import * as React49 from "react";
6953
8416
  import * as SwitchPrimitives2 from "@radix-ui/react-switch";
6954
- import { jsx as jsx50, jsxs as jsxs26 } from "react/jsx-runtime";
6955
- var Toggle = React48.forwardRef(function Toggle2({
8417
+ import { jsx as jsx51, jsxs as jsxs27 } from "react/jsx-runtime";
8418
+ var Toggle = React49.forwardRef(function Toggle2({
6956
8419
  "aria-describedby": ariaDescribedBy,
6957
8420
  "aria-labelledby": ariaLabelledBy,
6958
8421
  className,
@@ -6965,7 +8428,7 @@ var Toggle = React48.forwardRef(function Toggle2({
6965
8428
  labelClassName,
6966
8429
  ...props
6967
8430
  }, ref) {
6968
- const generatedId = React48.useId();
8431
+ const generatedId = React49.useId();
6969
8432
  const resolvedId = id ?? generatedId;
6970
8433
  const labelId = label ? `${resolvedId}-label` : void 0;
6971
8434
  const descriptionId = description ? `${resolvedId}-description` : void 0;
@@ -6973,7 +8436,7 @@ var Toggle = React48.forwardRef(function Toggle2({
6973
8436
  const alignClassName2 = description ? "items-start" : "items-center";
6974
8437
  const resolvedAriaDescribedBy = [ariaDescribedBy, descriptionId].filter(Boolean).join(" ") || void 0;
6975
8438
  const resolvedAriaLabelledBy = ariaLabelledBy ?? labelId;
6976
- const toggleControl = /* @__PURE__ */ jsx50(
8439
+ const toggleControl = /* @__PURE__ */ jsx51(
6977
8440
  SwitchPrimitives2.Root,
6978
8441
  {
6979
8442
  id: resolvedId,
@@ -6987,7 +8450,7 @@ var Toggle = React48.forwardRef(function Toggle2({
6987
8450
  className
6988
8451
  ),
6989
8452
  ...props,
6990
- children: /* @__PURE__ */ jsx50(
8453
+ children: /* @__PURE__ */ jsx51(
6991
8454
  SwitchPrimitives2.Thumb,
6992
8455
  {
6993
8456
  "data-slot": "toggle-thumb",
@@ -6999,7 +8462,7 @@ var Toggle = React48.forwardRef(function Toggle2({
6999
8462
  if (!hasTextContent) {
7000
8463
  return toggleControl;
7001
8464
  }
7002
- return /* @__PURE__ */ jsxs26(
8465
+ return /* @__PURE__ */ jsxs27(
7003
8466
  "div",
7004
8467
  {
7005
8468
  "data-slot": "toggle-container",
@@ -7010,8 +8473,8 @@ var Toggle = React48.forwardRef(function Toggle2({
7010
8473
  }),
7011
8474
  children: [
7012
8475
  toggleControl,
7013
- /* @__PURE__ */ jsxs26("span", { className: selectionControlContentBaseClasses, children: [
7014
- label ? /* @__PURE__ */ jsx50("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ jsx50(
8476
+ /* @__PURE__ */ jsxs27("span", { className: selectionControlContentBaseClasses, children: [
8477
+ label ? /* @__PURE__ */ jsx51("label", { htmlFor: resolvedId, className: selectionControlLabelTextBaseClasses, children: /* @__PURE__ */ jsx51(
7015
8478
  "span",
7016
8479
  {
7017
8480
  id: labelId,
@@ -7023,7 +8486,7 @@ var Toggle = React48.forwardRef(function Toggle2({
7023
8486
  })
7024
8487
  }
7025
8488
  ) }) : null,
7026
- description ? /* @__PURE__ */ jsx50(
8489
+ description ? /* @__PURE__ */ jsx51(
7027
8490
  "span",
7028
8491
  {
7029
8492
  id: descriptionId,
@@ -7046,13 +8509,13 @@ var Toggle = React48.forwardRef(function Toggle2({
7046
8509
  Toggle.displayName = "Toggle";
7047
8510
 
7048
8511
  // src/theme/provider.tsx
7049
- import * as React49 from "react";
8512
+ import * as React50 from "react";
7050
8513
  import {
7051
8514
  createWhitelabelTheme,
7052
8515
  defaultTheme,
7053
8516
  themeToCssVariables
7054
8517
  } from "@sofya-ds/tokens";
7055
- import { jsx as jsx51 } from "react/jsx-runtime";
8518
+ import { jsx as jsx52 } from "react/jsx-runtime";
7056
8519
  var SOFYA_FONT_LINKS = [
7057
8520
  {
7058
8521
  id: "preconnect-googleapis",
@@ -7072,7 +8535,7 @@ var SOFYA_FONT_LINKS = [
7072
8535
  }
7073
8536
  ];
7074
8537
  function useSofyaFontLinks() {
7075
- React49.useEffect(() => {
8538
+ React50.useEffect(() => {
7076
8539
  if (typeof document === "undefined") {
7077
8540
  return;
7078
8541
  }
@@ -7105,7 +8568,7 @@ function SofyaProvider({
7105
8568
  useSofyaFontLinks();
7106
8569
  const theme = createWhitelabelTheme(overrides ?? {}, preset);
7107
8570
  const cssVariables = themeToCssVariables(theme);
7108
- return /* @__PURE__ */ jsx51(
8571
+ return /* @__PURE__ */ jsx52(
7109
8572
  "div",
7110
8573
  {
7111
8574
  "data-sofya-theme": theme.name,
@@ -7225,6 +8688,15 @@ export {
7225
8688
  RadioGroupOptionDescription,
7226
8689
  RadioGroupOptionIndicator,
7227
8690
  RadioGroupOptionLabel,
8691
+ ReasoningLabsWidget,
8692
+ ReasoningSummaryWidget,
8693
+ ReasoningVitalsWidget,
8694
+ ReasoningWidget,
8695
+ ReasoningWidgetActionButton,
8696
+ ReasoningWidgetActions,
8697
+ ReasoningWidgetList,
8698
+ ReasoningWidgetRenderer,
8699
+ ReasoningWidgetTable,
7228
8700
  RichTextToolbar,
7229
8701
  RichTextToolbarButton,
7230
8702
  RichTextToolbarGroup,
@@ -7329,6 +8801,14 @@ export {
7329
8801
  progressSizeOptions,
7330
8802
  radioGroupOrientationOptions,
7331
8803
  radioGroupVariantOptions,
8804
+ reasoningWidgetActionScopeOptions,
8805
+ reasoningWidgetActionToneOptions,
8806
+ reasoningWidgetDensityOptions,
8807
+ reasoningWidgetFrameOptions,
8808
+ reasoningWidgetTableAlignOptions,
8809
+ reasoningWidgetTableColumnVariantOptions,
8810
+ reasoningWidgetToneOptions,
8811
+ reasoningWidgetVariantOptions,
7332
8812
  renderTextContent,
7333
8813
  resolveSurfaceToken,
7334
8814
  resolveTextStyle,