@refraction-ui/react 0.12.3 → 0.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.
Files changed (75) hide show
  1. package/dist/index.cjs +4285 -10
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +28 -0
  4. package/dist/index.d.ts +28 -0
  5. package/dist/index.js +4238 -11
  6. package/dist/index.js.map +1 -1
  7. package/dist/internal/audio-room/index.d.ts +91 -0
  8. package/dist/internal/call-controls/index.d.ts +83 -0
  9. package/dist/internal/checklist/index.d.ts +84 -0
  10. package/dist/internal/editor-status-bar/index.d.ts +70 -0
  11. package/dist/internal/editor-tabs/index.d.ts +68 -0
  12. package/dist/internal/empty-state/index.d.cts +39 -0
  13. package/dist/internal/empty-state/index.d.ts +39 -0
  14. package/dist/internal/floating-reactions/index.d.ts +98 -0
  15. package/dist/internal/flow-editor/index.d.ts +91 -0
  16. package/dist/internal/graph-view/index.d.ts +107 -0
  17. package/dist/internal/infinite-canvas/index.d.ts +74 -0
  18. package/dist/internal/input/index.d.cts +19 -1
  19. package/dist/internal/input/index.d.ts +19 -1
  20. package/dist/internal/live-captions/index.d.ts +59 -0
  21. package/dist/internal/live-cursors/index.d.ts +65 -0
  22. package/dist/internal/live-transcript/index.d.ts +73 -0
  23. package/dist/internal/mini-map/index.d.ts +81 -0
  24. package/dist/internal/pre-call-lobby/index.d.ts +97 -0
  25. package/dist/internal/radial-gauge/index.d.ts +120 -0
  26. package/dist/internal/rating-scale/index.d.ts +76 -0
  27. package/dist/internal/react-audio-room/index.d.ts +39 -0
  28. package/dist/internal/react-call-controls/index.d.ts +44 -0
  29. package/dist/internal/react-checklist/index.d.ts +27 -0
  30. package/dist/internal/react-editor-status-bar/index.d.ts +43 -0
  31. package/dist/internal/react-editor-tabs/index.d.ts +25 -0
  32. package/dist/internal/react-empty-state/index.d.cts +36 -0
  33. package/dist/internal/react-empty-state/index.d.ts +36 -0
  34. package/dist/internal/react-floating-reactions/index.d.ts +65 -0
  35. package/dist/internal/react-flow-editor/index.d.ts +35 -0
  36. package/dist/internal/react-graph-view/index.d.ts +25 -0
  37. package/dist/internal/react-infinite-canvas/index.d.ts +40 -0
  38. package/dist/internal/react-input/index.d.cts +16 -0
  39. package/dist/internal/react-input/index.d.ts +16 -0
  40. package/dist/internal/react-live-captions/index.d.ts +29 -0
  41. package/dist/internal/react-live-cursors/index.d.ts +42 -0
  42. package/dist/internal/react-live-transcript/index.d.ts +22 -0
  43. package/dist/internal/react-mini-map/index.d.ts +35 -0
  44. package/dist/internal/react-password-input/index.d.cts +26 -0
  45. package/dist/internal/react-password-input/index.d.ts +26 -0
  46. package/dist/internal/react-pre-call-lobby/index.d.ts +47 -0
  47. package/dist/internal/react-radial-gauge/index.d.ts +43 -0
  48. package/dist/internal/react-rating-scale/index.d.ts +38 -0
  49. package/dist/internal/react-segmented-control/index.d.cts +38 -0
  50. package/dist/internal/react-segmented-control/index.d.ts +38 -0
  51. package/dist/internal/react-separator/index.d.cts +29 -0
  52. package/dist/internal/react-separator/index.d.ts +29 -0
  53. package/dist/internal/react-social-auth-button/index.d.cts +31 -0
  54. package/dist/internal/react-social-auth-button/index.d.ts +31 -0
  55. package/dist/internal/react-sticky-note/index.d.ts +39 -0
  56. package/dist/internal/react-terminal/index.d.ts +39 -0
  57. package/dist/internal/react-test-results/index.d.ts +21 -0
  58. package/dist/internal/react-timeline/index.d.ts +35 -0
  59. package/dist/internal/react-video-grid/index.d.ts +33 -0
  60. package/dist/internal/react-video-tile/index.d.ts +41 -0
  61. package/dist/internal/react-wizard/index.d.ts +59 -0
  62. package/dist/internal/segmented-control/index.d.cts +56 -0
  63. package/dist/internal/segmented-control/index.d.ts +56 -0
  64. package/dist/internal/separator/index.d.cts +55 -0
  65. package/dist/internal/separator/index.d.ts +55 -0
  66. package/dist/internal/social-auth-button/index.d.cts +47 -0
  67. package/dist/internal/social-auth-button/index.d.ts +47 -0
  68. package/dist/internal/sticky-note/index.d.ts +49 -0
  69. package/dist/internal/terminal/index.d.ts +65 -0
  70. package/dist/internal/test-results/index.d.ts +97 -0
  71. package/dist/internal/timeline/index.d.ts +111 -0
  72. package/dist/internal/video-grid/index.d.ts +83 -0
  73. package/dist/internal/video-tile/index.d.ts +88 -0
  74. package/dist/internal/wizard/index.d.ts +148 -0
  75. package/package.json +48 -20
package/dist/index.js CHANGED
@@ -134,13 +134,13 @@ function createAnimatedText(props) {
134
134
  if (words.length === 0) return "";
135
135
  return words[state.currentIndex];
136
136
  }
137
- function getNextIndex() {
137
+ function getNextIndex2() {
138
138
  if (words.length === 0) return 0;
139
139
  return (state.currentIndex + 1) % words.length;
140
140
  }
141
141
  return {
142
142
  getCurrentWord,
143
- getNextIndex,
143
+ getNextIndex: getNextIndex2,
144
144
  state
145
145
  };
146
146
  }
@@ -6046,19 +6046,33 @@ function InlineEditor({
6046
6046
  InlineEditor.displayName = "InlineEditor";
6047
6047
 
6048
6048
  // ../input/dist/index.js
6049
+ function resolveAriaInvalid(ariaInvalid, validationState) {
6050
+ if (ariaInvalid !== void 0) {
6051
+ return ariaInvalid;
6052
+ }
6053
+ if (validationState === "invalid") {
6054
+ return true;
6055
+ }
6056
+ if (validationState === "valid") {
6057
+ return false;
6058
+ }
6059
+ return void 0;
6060
+ }
6049
6061
  function createInput(props = {}) {
6050
6062
  const {
6051
6063
  disabled = false,
6052
6064
  readOnly = false,
6053
6065
  required = false,
6054
- "aria-invalid": ariaInvalid
6066
+ "aria-invalid": ariaInvalid,
6067
+ validationState
6055
6068
  } = props;
6069
+ const resolvedInvalid = resolveAriaInvalid(ariaInvalid, validationState);
6056
6070
  const ariaProps = {};
6057
6071
  if (disabled) {
6058
6072
  ariaProps["aria-disabled"] = true;
6059
6073
  }
6060
- if (ariaInvalid) {
6061
- ariaProps["aria-invalid"] = true;
6074
+ if (resolvedInvalid !== void 0) {
6075
+ ariaProps["aria-invalid"] = resolvedInvalid;
6062
6076
  }
6063
6077
  if (required) {
6064
6078
  ariaProps["aria-required"] = true;
@@ -6070,7 +6084,7 @@ function createInput(props = {}) {
6070
6084
  if (readOnly) {
6071
6085
  dataAttributes["data-readonly"] = "";
6072
6086
  }
6073
- if (ariaInvalid) {
6087
+ if (resolvedInvalid === true) {
6074
6088
  dataAttributes["data-invalid"] = "";
6075
6089
  }
6076
6090
  return {
@@ -6085,22 +6099,58 @@ var inputVariants = cva({
6085
6099
  sm: "h-8 text-xs",
6086
6100
  default: "h-9",
6087
6101
  lg: "h-10 text-base"
6102
+ },
6103
+ validationState: {
6104
+ valid: "border-green-500 focus-visible:ring-green-500",
6105
+ invalid: "border-destructive focus-visible:ring-destructive"
6088
6106
  }
6089
6107
  },
6090
6108
  defaultVariants: {
6091
6109
  size: "default"
6092
6110
  }
6093
6111
  });
6112
+ var CheckIcon = /* @__PURE__ */ jsx(
6113
+ "svg",
6114
+ {
6115
+ "aria-hidden": "true",
6116
+ viewBox: "0 0 24 24",
6117
+ fill: "none",
6118
+ stroke: "currentColor",
6119
+ strokeWidth: "2",
6120
+ strokeLinecap: "round",
6121
+ strokeLinejoin: "round",
6122
+ className: "pointer-events-none absolute right-3 top-1/2 size-4 -translate-y-1/2 text-green-500",
6123
+ children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" })
6124
+ }
6125
+ );
6094
6126
  var Input = React11.forwardRef(
6095
- ({ type = "text", size, className, disabled, readOnly, required, "aria-invalid": ariaInvalid, ...props }, ref) => {
6127
+ ({
6128
+ type = "text",
6129
+ size,
6130
+ className,
6131
+ disabled,
6132
+ readOnly,
6133
+ required,
6134
+ validationState,
6135
+ leadingIcon,
6136
+ "aria-invalid": ariaInvalid,
6137
+ ...props
6138
+ }, ref) => {
6096
6139
  const api = createInput({
6097
6140
  disabled,
6098
6141
  readOnly,
6099
6142
  required,
6100
- "aria-invalid": ariaInvalid === true ? true : void 0
6143
+ "aria-invalid": ariaInvalid === void 0 ? void 0 : ariaInvalid === true || ariaInvalid === "true",
6144
+ validationState
6101
6145
  });
6102
- const classes = cn(inputVariants({ size }), className);
6103
- return /* @__PURE__ */ jsx(
6146
+ const hasWrapper = leadingIcon != null || validationState != null;
6147
+ const classes = cn(
6148
+ inputVariants({ size, validationState }),
6149
+ leadingIcon != null && "pl-9",
6150
+ validationState === "valid" && "pr-9",
6151
+ className
6152
+ );
6153
+ const inputEl = /* @__PURE__ */ jsx(
6104
6154
  "input",
6105
6155
  {
6106
6156
  ref,
@@ -6114,6 +6164,21 @@ var Input = React11.forwardRef(
6114
6164
  ...props
6115
6165
  }
6116
6166
  );
6167
+ if (!hasWrapper) {
6168
+ return inputEl;
6169
+ }
6170
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
6171
+ leadingIcon != null && /* @__PURE__ */ jsx(
6172
+ "span",
6173
+ {
6174
+ "aria-hidden": "true",
6175
+ className: "pointer-events-none absolute left-3 top-1/2 flex size-4 -translate-y-1/2 items-center justify-center text-muted-foreground",
6176
+ children: leadingIcon
6177
+ }
6178
+ ),
6179
+ inputEl,
6180
+ validationState === "valid" && CheckIcon
6181
+ ] });
6117
6182
  }
6118
6183
  );
6119
6184
  Input.displayName = "Input";
@@ -13491,6 +13556,164 @@ function RadioItem({ value, children, disabled = false, className }) {
13491
13556
  RadioGroup.displayName = "RadioGroup";
13492
13557
  RadioItem.displayName = "RadioItem";
13493
13558
 
13559
+ // ../rating-scale/dist/index.js
13560
+ function createRatingScale(props = {}) {
13561
+ const { value, size = "md" } = props;
13562
+ const ariaProps = {
13563
+ role: "radiogroup"
13564
+ };
13565
+ const dataAttributes = {
13566
+ "data-size": size
13567
+ };
13568
+ if (value !== void 0) {
13569
+ dataAttributes["data-value"] = String(value);
13570
+ }
13571
+ return { ariaProps, dataAttributes };
13572
+ }
13573
+ function resolveRatingPoints(points, count = 5) {
13574
+ if (points && points.length > 0) return points;
13575
+ return Array.from({ length: Math.max(0, count) }, (_, i) => ({ value: i + 1 }));
13576
+ }
13577
+ function getNextRatingIndex(current, key, count) {
13578
+ if (count <= 0) return current;
13579
+ switch (key) {
13580
+ case "ArrowRight":
13581
+ case "ArrowUp":
13582
+ return Math.min(current + 1, count - 1);
13583
+ case "ArrowLeft":
13584
+ case "ArrowDown":
13585
+ return Math.max(current - 1, 0);
13586
+ case "Home":
13587
+ return 0;
13588
+ case "End":
13589
+ return count - 1;
13590
+ default:
13591
+ return current;
13592
+ }
13593
+ }
13594
+ var ratingScaleVariants = cva({
13595
+ base: "inline-flex items-center gap-3",
13596
+ variants: {
13597
+ size: {
13598
+ sm: "",
13599
+ md: ""
13600
+ }
13601
+ },
13602
+ defaultVariants: {
13603
+ size: "md"
13604
+ }
13605
+ });
13606
+ var ratingScaleTrackClass = "inline-flex items-center gap-1.5";
13607
+ var ratingScaleItemVariants = cva({
13608
+ base: [
13609
+ "inline-flex items-center justify-center rounded-md border font-medium tabular-nums",
13610
+ "transition-colors focus-visible:outline-none focus-visible:ring-2",
13611
+ "focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
13612
+ "disabled:pointer-events-none disabled:opacity-50"
13613
+ ].join(" "),
13614
+ variants: {
13615
+ size: {
13616
+ sm: "size-8 text-xs",
13617
+ md: "size-10 text-sm"
13618
+ },
13619
+ state: {
13620
+ checked: "border-primary bg-primary text-primary-foreground",
13621
+ unchecked: "border-input bg-background text-foreground hover:bg-accent hover:text-accent-foreground"
13622
+ }
13623
+ },
13624
+ defaultVariants: {
13625
+ size: "md",
13626
+ state: "unchecked"
13627
+ }
13628
+ });
13629
+ var ratingScaleLabelClass = "text-xs text-muted-foreground";
13630
+ var RatingScale = React11.forwardRef(
13631
+ ({
13632
+ value: valueProp,
13633
+ defaultValue,
13634
+ onValueChange,
13635
+ count = 5,
13636
+ points,
13637
+ minLabel,
13638
+ maxLabel,
13639
+ size = "md",
13640
+ disabled = false,
13641
+ className,
13642
+ ...props
13643
+ }, ref) => {
13644
+ const resolved = React11.useMemo(
13645
+ () => resolveRatingPoints(points, count),
13646
+ [points, count]
13647
+ );
13648
+ const isControlled = valueProp !== void 0;
13649
+ const [internal, setInternal] = React11.useState(
13650
+ defaultValue
13651
+ );
13652
+ const value = isControlled ? valueProp : internal;
13653
+ const btnRefs = React11.useRef([]);
13654
+ const select = React11.useCallback(
13655
+ (next) => {
13656
+ if (!isControlled) setInternal(next);
13657
+ onValueChange?.(next);
13658
+ },
13659
+ [isControlled, onValueChange]
13660
+ );
13661
+ const selectedIndex = resolved.findIndex((p) => p.value === value);
13662
+ const tabbableIndex = selectedIndex === -1 ? 0 : selectedIndex;
13663
+ const handleKeyDown = (event, index) => {
13664
+ const target = getNextRatingIndex(index, event.key, resolved.length);
13665
+ if (target !== index) {
13666
+ event.preventDefault();
13667
+ select(resolved[target].value);
13668
+ btnRefs.current[target]?.focus();
13669
+ }
13670
+ };
13671
+ const api = createRatingScale({ value, size });
13672
+ return /* @__PURE__ */ jsxs(
13673
+ "div",
13674
+ {
13675
+ ref,
13676
+ className: cn(ratingScaleVariants({ size }), className),
13677
+ "aria-disabled": disabled || void 0,
13678
+ ...api.ariaProps,
13679
+ ...api.dataAttributes,
13680
+ ...props,
13681
+ children: [
13682
+ minLabel != null && /* @__PURE__ */ jsx("span", { className: ratingScaleLabelClass, children: minLabel }),
13683
+ /* @__PURE__ */ jsx("div", { className: ratingScaleTrackClass, children: resolved.map((point, index) => {
13684
+ const checked = point.value === value;
13685
+ return /* @__PURE__ */ jsx(
13686
+ "button",
13687
+ {
13688
+ ref: (node) => {
13689
+ btnRefs.current[index] = node;
13690
+ },
13691
+ type: "button",
13692
+ role: "radio",
13693
+ "aria-checked": checked,
13694
+ "aria-label": point.label ?? String(point.value),
13695
+ tabIndex: index === tabbableIndex ? 0 : -1,
13696
+ disabled,
13697
+ "data-state": checked ? "checked" : "unchecked",
13698
+ className: ratingScaleItemVariants({
13699
+ size,
13700
+ state: checked ? "checked" : "unchecked"
13701
+ }),
13702
+ onClick: () => select(point.value),
13703
+ onKeyDown: (e) => handleKeyDown(e, index),
13704
+ children: point.label ?? point.value
13705
+ },
13706
+ point.value
13707
+ );
13708
+ }) }),
13709
+ maxLabel != null && /* @__PURE__ */ jsx("span", { className: ratingScaleLabelClass, children: maxLabel })
13710
+ ]
13711
+ }
13712
+ );
13713
+ }
13714
+ );
13715
+ RatingScale.displayName = "RatingScale";
13716
+
13494
13717
  // ../reaction-bar/dist/index.js
13495
13718
  function createReactionBar(props) {
13496
13719
  const { reactions, onToggle, onAdd } = props;
@@ -17025,6 +17248,4010 @@ function useTrackEvent(options) {
17025
17248
  );
17026
17249
  }
17027
17250
 
17028
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, AnalyticsProvider, AnimatedText, AppShell, AuthGuard, AuthProvider, Avatar2 as Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BadgeDisplay, BottomNav, Breadcrumbs, Button, CATEGORY_LABELS, Calendar, CalendarHeader, Callout, CalloutContent, CalloutDescription, CalloutIcon, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselTrigger, Chat, Checkbox, CodeBlock, CodeBlockContent, CodeBlockHeader, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, Composer, ContentProtection, CookieConsent, DEFAULT_CATEGORIES, DEFAULT_VOICE_PILL_POSITION, DEFAULT_VOICE_PILL_SPEAKER, DEFAULT_WAVEFORM_BAR_COUNT, DEFAULT_WAVEFORM_COLOR, DEFAULT_WAVEFORM_HEIGHT, DEFAULT_WAVEFORM_INTENSITY, DEFAULT_WAVEFORM_SMOOTHING, DataTable, DatePicker, DeviceFrame, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EMOJI_CATEGORIES, EMOJI_DATA, EmojiPicker, FeedbackButton, FeedbackDialog, FileTree, FileUpload, Footer, IconSystem, InlineEditor, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InstallPrompt, KeyboardShortcut, LanguageSelector, LinkCard, MarkdownRenderer, MobileNav, MobileNavContent, MobileNavLink, MobileNavTrigger, Navbar, OtpInput, STATUS_COLORS as PRESENCE_STATUS_COLORS, STATUS_LABELS as PRESENCE_STATUS_LABELS, Pagination, Payment, Popover, PopoverClose, PopoverContent, PopoverTrigger, PresenceIndicator, ProgressBar, RadioGroup, RadioItem, ReactionBar, ResizableDivider, ResizableLayout, ResizablePane, SANE_DEFAULTS, STATUS_INDICATOR_COLORS as STATUS_COLORS, STATUS_INDICATOR_LABELS as STATUS_LABELS, SearchBar, SearchResultItem, SearchResults, Select, SelectContent, SelectItem, SelectTrigger, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, ShortcutBadge, ShortcutContext, ShortcutHint, ShortcutProvider, ShortcutRegistry, Sidebar, Skeleton, SkeletonText, SkipToContent, SlideViewer, StatsGrid, StatusIndicator, Step, StepContent, StepDescription, StepIndicator, StepTitle, Steps, Switch, TableOfContents, Tabs, TabsContent, TabsList, TabsTrigger, TelemetryErrorBoundary, TelemetryProvider, Textarea, ThreadView, Toast, ToastProvider, Toaster, Tooltip, TooltipContent, TooltipTrigger, TypewriterText, VersionSelector, VideoPlayer, VoicePill, Waveform, altHintState, animatedTextVariants, avatarFallbackVariants, avatarImageVariants, avatarTokens, avatarVariants, badgeGridVariants, badgeItemVariants, badgeVariants, bottomNavTabVariants, bottomNavVariants, breadcrumbItemVariants, breadcrumbSeparatorStyles, breadcrumbsVariants, buttonTokens, buttonVariants, calendarVariants, canAccessAdmin, canAccessReviewer, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants, cellVariants, checkIconPath, checkboxTokens, checkboxVariants, clampVoicePillIntensity, codeEditorTokens, codeEditorVariants, collapsibleContentVariants, comboboxContentVariants, comboboxEmptyVariants, comboboxInputVariants, comboboxItemVariants, comboboxListVariants, comboboxTriggerVariants, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants, contentProtectionVariants, controlsVariants, createAnalytics, createAppInsightsSink, createConsoleSink, createConversation, createCookieConsent, createGA4ClientSdkSink, createGA4HttpSink, createGA4Sink, createIntensitySamples, createPostHogClientSdkSink, createPostHogHttpSink, createPostHogSink, createSilentSamples, createTelemetry, createVoicePill, createWaveform, dayVariants, deviceFrameVariants, dialogContentVariants, drawWaveform, editorVariants, emojiPickerContainerStyles, emojiPickerEmojiButtonStyles, emojiPickerGridStyles, feedbackDialogVariants, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, findMessage, footerVariants, formatFileSize, formatRelativeTime, formatShortcut, formatTimestamp, getAssignableRoles, getDefaultPortal, getInitials, getReplyCount, getVoicePillAriaLabel, getVoicePillInitials, getVoicePillPosition, getVoicePillPulseStyle, getVoicePillSpeakerKey, getVoicePillSpeakerLabel, getWaveformPeak, globalShortcutRegistry, hasAllRoles, hasAnyRole, hasRole, headerVariants, indeterminateIconPath, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupTokens, inputGroupVariants, inputVariants, installPromptVariants, isWaveformSampleInput, latestBadgeVariants, markdownRendererTokens, menuContentVariants, menuItemVariants, mobileNavContentVariants, mobileNavLinkVariants, mobileNavTokens, mobileNavTriggerVariants, mobileNavVariants, navLinkVariants, navbarVariants, normalizeBarCount, normalizeIntensity, normalizeSmoothing, normalizeWaveformConfig, normalizeWaveformSamples, optionVariants, otpInputContainerVariants, otpInputSlotVariants, otpInputTokens, overlayStyles, overlayVariants, playerVariants, popoverContentVariants, prepareWaveformCanvas, previewVariants, progressBarVariants, proseVariants, radioCircleVariants, radioGroupVariants, radioItemVariants, reactionAddButtonStyles, reactionBarStyles, reactionCountStyles, reactionEmojiStyles, reactionPillVariants, resampleWaveformSamples, resizableDividerVariants, resizableLayoutTokens, resizableLayoutVariants, resizablePaneVariants, rootIdOf, rowVariants, scaleWaveformSamples, searchBarVariants, searchResultVariants, selectContentVariants, selectItemVariants, selectMainTimeline, selectReplies, selectRoots, selectThreadMessages, selectTimelineFromState, selectTokens, selectTriggerVariants, selectorVariants, sheetContentVariants, sheetOverlayStyles, shortcutBadgeStyles, shortcutKeyStyles, shortcutSeparatorStyles, sidebarItemVariants, sidebarVariants, skeletonVariants, slideTypeBadgeVariants, slideViewerProgressBarVariants, slideViewerTokens, slideViewerVariants, smoothWaveformSamples, startSessionReplay, statCardVariants, statsGridVariants, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants, switchThumbVariants, switchTokens, switchVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadMessageStyles, threadReactionsStyles, threadTimestampStyles, toCssDimension, toastVariants, toolbarVariants, tooltipContentVariants, typewriterVariants, useAnalytics, useAuth, useConversation, useCookieConsent, useLogger, useShortcut, useSpan, useTelemetry, useToast, useTrackEvent, versionSelectorOptionVariants, versionSelectorVariants, voicePillAvatarStyles, voicePillAvatarWrapStyles, voicePillLabelStyles, voicePillMuteButtonStyles, voicePillPositionVariants, voicePillPulseRingStyles, voicePillRootStyles, voicePillSpeakerStyles, voicePillSubStyles, voicePillTextStyles, voicePillTokens, watermarkVariants, waveformCanvasVariants, waveformVariants };
17251
+ // ../segmented-control/dist/index.js
17252
+ function createSegmentedControl(props = {}) {
17253
+ const { value, size = "md" } = props;
17254
+ const ariaProps = {
17255
+ role: "radiogroup"
17256
+ };
17257
+ const dataAttributes = {
17258
+ "data-size": size
17259
+ };
17260
+ if (value !== void 0) {
17261
+ dataAttributes["data-value"] = value;
17262
+ }
17263
+ return { ariaProps, dataAttributes };
17264
+ }
17265
+ function getNextSegmentIndex(current, key, count) {
17266
+ if (count <= 0) return current;
17267
+ switch (key) {
17268
+ case "ArrowRight":
17269
+ case "ArrowDown":
17270
+ return (current + 1) % count;
17271
+ case "ArrowLeft":
17272
+ case "ArrowUp":
17273
+ return (current - 1 + count) % count;
17274
+ case "Home":
17275
+ return 0;
17276
+ case "End":
17277
+ return count - 1;
17278
+ default:
17279
+ return current;
17280
+ }
17281
+ }
17282
+ var segmentedControlVariants = cva({
17283
+ base: "inline-flex items-center gap-1 rounded-lg bg-muted p-1",
17284
+ variants: {
17285
+ size: {
17286
+ sm: "",
17287
+ md: ""
17288
+ }
17289
+ },
17290
+ defaultVariants: {
17291
+ size: "md"
17292
+ }
17293
+ });
17294
+ var segmentedControlItemVariants = cva({
17295
+ base: [
17296
+ "inline-flex items-center justify-center gap-1.5 rounded-md font-medium",
17297
+ "whitespace-nowrap transition-colors",
17298
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
17299
+ "focus-visible:ring-offset-2 focus-visible:ring-offset-muted"
17300
+ ].join(" "),
17301
+ variants: {
17302
+ size: {
17303
+ sm: "px-2.5 py-1 text-xs",
17304
+ md: "px-3 py-1.5 text-sm"
17305
+ },
17306
+ state: {
17307
+ checked: "bg-background text-foreground shadow-sm",
17308
+ unchecked: "text-muted-foreground hover:text-foreground"
17309
+ }
17310
+ },
17311
+ defaultVariants: {
17312
+ size: "md",
17313
+ state: "unchecked"
17314
+ }
17315
+ });
17316
+ var SegmentedControlContext = React11.createContext(null);
17317
+ function useSegmentedControlContext(component) {
17318
+ const ctx = React11.useContext(SegmentedControlContext);
17319
+ if (!ctx) {
17320
+ throw new Error(`<${component}> must be used within <SegmentedControl>`);
17321
+ }
17322
+ return ctx;
17323
+ }
17324
+ var SegmentedControl = React11.forwardRef(
17325
+ ({
17326
+ value: valueProp,
17327
+ defaultValue,
17328
+ onValueChange,
17329
+ size = "md",
17330
+ className,
17331
+ children,
17332
+ ...props
17333
+ }, ref) => {
17334
+ const isControlled = valueProp !== void 0;
17335
+ const [internalValue, setInternalValue] = React11.useState(defaultValue);
17336
+ const value = isControlled ? valueProp : internalValue;
17337
+ const itemsRef = React11.useRef([]);
17338
+ const select = React11.useCallback(
17339
+ (next) => {
17340
+ if (!isControlled) setInternalValue(next);
17341
+ onValueChange?.(next);
17342
+ },
17343
+ [isControlled, onValueChange]
17344
+ );
17345
+ const register = React11.useCallback((itemValue, focus) => {
17346
+ const entry = { value: itemValue, focus };
17347
+ itemsRef.current.push(entry);
17348
+ return () => {
17349
+ itemsRef.current = itemsRef.current.filter((e) => e !== entry);
17350
+ };
17351
+ }, []);
17352
+ const move = React11.useCallback(
17353
+ (from, key) => {
17354
+ const items = itemsRef.current;
17355
+ const currentIndex = items.findIndex((e) => e.value === from);
17356
+ if (currentIndex === -1) return;
17357
+ const targetIndex = getNextSegmentIndex(currentIndex, key, items.length);
17358
+ if (targetIndex === currentIndex) return;
17359
+ const target = items[targetIndex];
17360
+ select(target.value);
17361
+ target.focus();
17362
+ },
17363
+ [select]
17364
+ );
17365
+ const ctx = React11.useMemo(
17366
+ () => ({ value, size, select, register, move }),
17367
+ [value, size, select, register, move]
17368
+ );
17369
+ const api = createSegmentedControl({ value, size });
17370
+ return /* @__PURE__ */ jsx(SegmentedControlContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
17371
+ "div",
17372
+ {
17373
+ ref,
17374
+ className: cn(segmentedControlVariants({ size }), className),
17375
+ ...api.ariaProps,
17376
+ ...api.dataAttributes,
17377
+ ...props,
17378
+ children
17379
+ }
17380
+ ) });
17381
+ }
17382
+ );
17383
+ SegmentedControl.displayName = "SegmentedControl";
17384
+ var SegmentedControlItem = React11.forwardRef(({ value, className, children, onKeyDown, onClick, ...props }, ref) => {
17385
+ const ctx = useSegmentedControlContext("SegmentedControlItem");
17386
+ const selected = ctx.value === value;
17387
+ const internalRef = React11.useRef(null);
17388
+ const mergedRef = React11.useCallback(
17389
+ (node) => {
17390
+ internalRef.current = node;
17391
+ if (typeof ref === "function") ref(node);
17392
+ else if (ref) ref.current = node;
17393
+ },
17394
+ [ref]
17395
+ );
17396
+ React11.useEffect(() => {
17397
+ return ctx.register(value, () => internalRef.current?.focus());
17398
+ }, [ctx, value]);
17399
+ const handleKeyDown = (event) => {
17400
+ onKeyDown?.(event);
17401
+ if (event.defaultPrevented) return;
17402
+ switch (event.key) {
17403
+ case "ArrowRight":
17404
+ case "ArrowDown":
17405
+ case "ArrowLeft":
17406
+ case "ArrowUp":
17407
+ case "Home":
17408
+ case "End":
17409
+ event.preventDefault();
17410
+ ctx.move(value, event.key);
17411
+ break;
17412
+ case " ":
17413
+ case "Enter":
17414
+ event.preventDefault();
17415
+ ctx.select(value);
17416
+ break;
17417
+ }
17418
+ };
17419
+ const handleClick = (event) => {
17420
+ onClick?.(event);
17421
+ if (event.defaultPrevented) return;
17422
+ ctx.select(value);
17423
+ };
17424
+ return /* @__PURE__ */ jsx(
17425
+ "button",
17426
+ {
17427
+ ref: mergedRef,
17428
+ type: "button",
17429
+ role: "radio",
17430
+ "aria-checked": selected,
17431
+ tabIndex: selected ? 0 : -1,
17432
+ "data-state": selected ? "checked" : "unchecked",
17433
+ className: cn(
17434
+ segmentedControlItemVariants({
17435
+ size: ctx.size,
17436
+ state: selected ? "checked" : "unchecked"
17437
+ }),
17438
+ className
17439
+ ),
17440
+ onKeyDown: handleKeyDown,
17441
+ onClick: handleClick,
17442
+ ...props,
17443
+ children
17444
+ }
17445
+ );
17446
+ });
17447
+ SegmentedControlItem.displayName = "SegmentedControlItem";
17448
+
17449
+ // ../password-input/dist/index.js
17450
+ var DEFAULT_REVEAL_LABEL = "Show password";
17451
+ var DEFAULT_HIDE_LABEL = "Hide password";
17452
+ function createPasswordInput(props = {}) {
17453
+ const {
17454
+ revealed = false,
17455
+ revealLabel = DEFAULT_REVEAL_LABEL,
17456
+ hideLabel = DEFAULT_HIDE_LABEL
17457
+ } = props;
17458
+ return {
17459
+ inputType: revealed ? "text" : "password",
17460
+ toggleLabel: revealed ? hideLabel : revealLabel,
17461
+ togglePressed: revealed
17462
+ };
17463
+ }
17464
+ var passwordToggleVariants = cva({
17465
+ base: "absolute right-2 top-1/2 flex size-7 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
17466
+ });
17467
+ var EyeIcon = /* @__PURE__ */ jsxs(
17468
+ "svg",
17469
+ {
17470
+ "aria-hidden": "true",
17471
+ viewBox: "0 0 24 24",
17472
+ fill: "none",
17473
+ stroke: "currentColor",
17474
+ strokeWidth: "2",
17475
+ strokeLinecap: "round",
17476
+ strokeLinejoin: "round",
17477
+ className: "size-4",
17478
+ children: [
17479
+ /* @__PURE__ */ jsx("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
17480
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" })
17481
+ ]
17482
+ }
17483
+ );
17484
+ var EyeOffIcon = /* @__PURE__ */ jsxs(
17485
+ "svg",
17486
+ {
17487
+ "aria-hidden": "true",
17488
+ viewBox: "0 0 24 24",
17489
+ fill: "none",
17490
+ stroke: "currentColor",
17491
+ strokeWidth: "2",
17492
+ strokeLinecap: "round",
17493
+ strokeLinejoin: "round",
17494
+ className: "size-4",
17495
+ children: [
17496
+ /* @__PURE__ */ jsx("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
17497
+ /* @__PURE__ */ jsx("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
17498
+ /* @__PURE__ */ jsx("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
17499
+ /* @__PURE__ */ jsx("line", { x1: "2", x2: "22", y1: "2", y2: "22" })
17500
+ ]
17501
+ }
17502
+ );
17503
+ var PasswordInput = React11.forwardRef(
17504
+ ({ revealLabel = "Show password", hideLabel = "Hide password", className, ...props }, ref) => {
17505
+ const [revealed, setRevealed] = React11.useState(false);
17506
+ const { inputType, toggleLabel, togglePressed } = createPasswordInput({
17507
+ revealed,
17508
+ revealLabel,
17509
+ hideLabel
17510
+ });
17511
+ return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
17512
+ /* @__PURE__ */ jsx(
17513
+ Input,
17514
+ {
17515
+ ref,
17516
+ type: inputType,
17517
+ className: cn("pr-10", className),
17518
+ ...props
17519
+ }
17520
+ ),
17521
+ /* @__PURE__ */ jsx(
17522
+ "button",
17523
+ {
17524
+ type: "button",
17525
+ "aria-label": toggleLabel,
17526
+ "aria-pressed": togglePressed,
17527
+ onClick: () => setRevealed((v) => !v),
17528
+ className: passwordToggleVariants(),
17529
+ children: revealed ? EyeOffIcon : EyeIcon
17530
+ }
17531
+ )
17532
+ ] });
17533
+ }
17534
+ );
17535
+ PasswordInput.displayName = "PasswordInput";
17536
+
17537
+ // ../social-auth-button/dist/index.js
17538
+ var PROVIDER_LABELS = {
17539
+ google: "Continue with Google",
17540
+ github: "Continue with GitHub",
17541
+ microsoft: "Continue with Microsoft",
17542
+ apple: "Continue with Apple"
17543
+ };
17544
+ var PROVIDER_MONO = {
17545
+ google: false,
17546
+ github: true,
17547
+ microsoft: false,
17548
+ apple: true
17549
+ };
17550
+ function createSocialAuthButton(props) {
17551
+ const { provider } = props;
17552
+ return {
17553
+ dataAttributes: { "data-provider": provider },
17554
+ label: PROVIDER_LABELS[provider],
17555
+ mono: PROVIDER_MONO[provider]
17556
+ };
17557
+ }
17558
+ var socialAuthButtonVariants = cva({
17559
+ base: "relative"
17560
+ });
17561
+ var socialAuthRowVariants = cva({
17562
+ base: "grid grid-cols-1 sm:grid-cols-2 gap-3"
17563
+ });
17564
+ var lastUsedBadgeVariants = cva({
17565
+ base: "absolute -top-2 -right-2 rounded-full bg-primary text-primary-foreground text-[10px] px-1.5"
17566
+ });
17567
+ var baseProps = {
17568
+ width: 18,
17569
+ height: 18,
17570
+ viewBox: "0 0 24 24",
17571
+ xmlns: "http://www.w3.org/2000/svg",
17572
+ "aria-hidden": true
17573
+ };
17574
+ function GoogleIcon({ mono, ...props }) {
17575
+ if (mono) {
17576
+ return /* @__PURE__ */ jsx("svg", { ...baseProps, ...props, children: /* @__PURE__ */ jsx(
17577
+ "path",
17578
+ {
17579
+ fill: "currentColor",
17580
+ d: "M21.35 11.1H12v2.92h5.35c-.23 1.4-1.65 4.1-5.35 4.1a5.99 5.99 0 0 1 0-11.98c1.71 0 2.86.73 3.52 1.36l2.4-2.31C16.46 3.7 14.43 2.8 12 2.8a9.2 9.2 0 1 0 0 18.4c5.31 0 8.82-3.73 8.82-8.99 0-.6-.07-1.06-.17-1.51Z"
17581
+ }
17582
+ ) });
17583
+ }
17584
+ return /* @__PURE__ */ jsxs("svg", { ...baseProps, ...props, children: [
17585
+ /* @__PURE__ */ jsx(
17586
+ "path",
17587
+ {
17588
+ fill: "#4285F4",
17589
+ d: "M21.35 11.1H12v2.92h5.35c-.23 1.4-1.65 4.1-5.35 4.1a5.99 5.99 0 0 1 0-11.98c1.71 0 2.86.73 3.52 1.36l2.4-2.31C16.46 3.7 14.43 2.8 12 2.8a9.2 9.2 0 0 0 0 18.4c5.31 0 8.82-3.73 8.82-8.99 0-.6-.07-1.06-.17-1.51Z"
17590
+ }
17591
+ ),
17592
+ /* @__PURE__ */ jsx(
17593
+ "path",
17594
+ {
17595
+ fill: "#34A853",
17596
+ d: "M3.88 7.55l2.41 1.77C6.93 7.76 8.32 6.74 10 6.4l-.34-2.85C7.06 4.02 4.93 5.5 3.88 7.55Z",
17597
+ opacity: 0
17598
+ }
17599
+ ),
17600
+ /* @__PURE__ */ jsx(
17601
+ "path",
17602
+ {
17603
+ fill: "#FBBC05",
17604
+ d: "M12 21.2c2.43 0 4.46-.8 5.95-2.18l-2.74-2.13c-.74.5-1.74.86-3.21.86-2.66 0-4.92-1.79-5.73-4.2l-2.84 2.18A9.2 9.2 0 0 0 12 21.2Z",
17605
+ opacity: 0
17606
+ }
17607
+ )
17608
+ ] });
17609
+ }
17610
+ function GitHubIcon({ mono: _mono, ...props }) {
17611
+ return /* @__PURE__ */ jsx("svg", { ...baseProps, ...props, children: /* @__PURE__ */ jsx(
17612
+ "path",
17613
+ {
17614
+ fill: "currentColor",
17615
+ d: "M12 2a10 10 0 0 0-3.16 19.49c.5.09.68-.22.68-.48l-.01-1.7c-2.78.6-3.37-1.34-3.37-1.34-.45-1.16-1.11-1.46-1.11-1.46-.91-.62.07-.61.07-.61 1 .07 1.53 1.03 1.53 1.03.9 1.53 2.36 1.09 2.94.83.09-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.94 0-1.09.39-1.98 1.03-2.68-.1-.25-.45-1.27.1-2.65 0 0 .84-.27 2.75 1.02a9.6 9.6 0 0 1 5 0c1.91-1.29 2.75-1.02 2.75-1.02.55 1.38.2 2.4.1 2.65.64.7 1.03 1.59 1.03 2.68 0 3.84-2.34 4.69-4.57 4.94.36.31.68.92.68 1.85l-.01 2.74c0 .27.18.58.69.48A10 10 0 0 0 12 2Z"
17616
+ }
17617
+ ) });
17618
+ }
17619
+ function MicrosoftIcon({ mono, ...props }) {
17620
+ if (mono) {
17621
+ return /* @__PURE__ */ jsxs("svg", { ...baseProps, ...props, children: [
17622
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M3 3h8v8H3z" }),
17623
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M13 3h8v8h-8z", opacity: 0.7 }),
17624
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M3 13h8v8H3z", opacity: 0.7 }),
17625
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M13 13h8v8h-8z", opacity: 0.4 })
17626
+ ] });
17627
+ }
17628
+ return /* @__PURE__ */ jsxs("svg", { ...baseProps, ...props, children: [
17629
+ /* @__PURE__ */ jsx("path", { fill: "#F25022", d: "M3 3h8v8H3z" }),
17630
+ /* @__PURE__ */ jsx("path", { fill: "#7FBA00", d: "M13 3h8v8h-8z" }),
17631
+ /* @__PURE__ */ jsx("path", { fill: "#00A4EF", d: "M3 13h8v8H3z" }),
17632
+ /* @__PURE__ */ jsx("path", { fill: "#FFB900", d: "M13 13h8v8h-8z" })
17633
+ ] });
17634
+ }
17635
+ function AppleIcon({ mono: _mono, ...props }) {
17636
+ return /* @__PURE__ */ jsx("svg", { ...baseProps, ...props, children: /* @__PURE__ */ jsx(
17637
+ "path",
17638
+ {
17639
+ fill: "currentColor",
17640
+ d: "M16.37 12.78c-.03-2.62 2.14-3.88 2.24-3.94-1.22-1.79-3.12-2.03-3.79-2.06-1.61-.16-3.15.95-3.97.95-.82 0-2.08-.93-3.42-.9-1.76.03-3.39 1.02-4.29 2.6-1.83 3.18-.47 7.88 1.31 10.46.87 1.26 1.91 2.67 3.27 2.62 1.31-.05 1.81-.85 3.4-.85 1.58 0 2.03.85 3.42.82 1.41-.02 2.31-1.28 3.17-2.55.99-1.46 1.4-2.88 1.42-2.95-.03-.01-2.73-1.05-2.76-4.15M13.9 5.1c.72-.88 1.21-2.09 1.08-3.3-1.04.04-2.3.69-3.04 1.56-.66.77-1.24 2.01-1.09 3.19 1.16.09 2.34-.59 3.05-1.45"
17641
+ }
17642
+ ) });
17643
+ }
17644
+ var PROVIDER_ICONS = {
17645
+ google: GoogleIcon,
17646
+ github: GitHubIcon,
17647
+ microsoft: MicrosoftIcon,
17648
+ apple: AppleIcon
17649
+ };
17650
+ var SocialAuthButton = React11.forwardRef(({ provider, lastUsed, loading, disabled, className, ...props }, ref) => {
17651
+ const { label, mono, dataAttributes } = createSocialAuthButton({ provider });
17652
+ const Icon = PROVIDER_ICONS[provider];
17653
+ return /* @__PURE__ */ jsxs("div", { className: socialAuthButtonVariants(), children: [
17654
+ /* @__PURE__ */ jsxs(
17655
+ Button,
17656
+ {
17657
+ ref,
17658
+ variant: "outline",
17659
+ loading,
17660
+ disabled,
17661
+ className: cn("w-full justify-center gap-2", className),
17662
+ ...dataAttributes,
17663
+ ...props,
17664
+ children: [
17665
+ !loading && /* @__PURE__ */ jsx(Icon, { mono, className: "shrink-0" }),
17666
+ label
17667
+ ]
17668
+ }
17669
+ ),
17670
+ lastUsed && /* @__PURE__ */ jsx("span", { className: lastUsedBadgeVariants(), children: "Last used" })
17671
+ ] });
17672
+ });
17673
+ SocialAuthButton.displayName = "SocialAuthButton";
17674
+ var SocialAuthRow = React11.forwardRef(
17675
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
17676
+ "div",
17677
+ {
17678
+ ref,
17679
+ className: cn(socialAuthRowVariants(), className),
17680
+ ...props,
17681
+ children
17682
+ }
17683
+ )
17684
+ );
17685
+ SocialAuthRow.displayName = "SocialAuthRow";
17686
+
17687
+ // ../separator/dist/index.js
17688
+ function createSeparator(props = {}) {
17689
+ const { orientation = "horizontal", decorative = true } = props;
17690
+ const ariaProps = decorative ? { role: "none" } : { role: "separator", "aria-orientation": orientation };
17691
+ const dataAttributes = {
17692
+ "data-orientation": orientation
17693
+ };
17694
+ return {
17695
+ ariaProps,
17696
+ dataAttributes
17697
+ };
17698
+ }
17699
+ var separatorVariants = cva({
17700
+ base: "",
17701
+ variants: {
17702
+ orientation: {
17703
+ horizontal: "h-px w-full bg-border",
17704
+ vertical: "w-px h-full bg-border"
17705
+ },
17706
+ labeled: {
17707
+ true: "flex items-center",
17708
+ false: ""
17709
+ }
17710
+ },
17711
+ defaultVariants: {
17712
+ orientation: "horizontal",
17713
+ labeled: "false"
17714
+ }
17715
+ });
17716
+ var separatorLineClass = "h-px flex-1 bg-border";
17717
+ var separatorLabelClass = "px-3 text-xs uppercase tracking-wide text-muted-foreground";
17718
+ var Separator = React11.forwardRef(
17719
+ ({
17720
+ orientation = "horizontal",
17721
+ label,
17722
+ decorative = true,
17723
+ className,
17724
+ ...props
17725
+ }, ref) => {
17726
+ if (orientation === "horizontal" && label != null) {
17727
+ return /* @__PURE__ */ jsxs(
17728
+ "div",
17729
+ {
17730
+ ref,
17731
+ role: "none",
17732
+ className: cn(separatorVariants({ labeled: "true" }), className),
17733
+ ...props,
17734
+ children: [
17735
+ /* @__PURE__ */ jsx("span", { className: separatorLineClass }),
17736
+ /* @__PURE__ */ jsx("span", { className: separatorLabelClass, children: label }),
17737
+ /* @__PURE__ */ jsx("span", { className: separatorLineClass })
17738
+ ]
17739
+ }
17740
+ );
17741
+ }
17742
+ const { ariaProps, dataAttributes } = createSeparator({
17743
+ orientation,
17744
+ decorative
17745
+ });
17746
+ return /* @__PURE__ */ jsx(
17747
+ "div",
17748
+ {
17749
+ ref,
17750
+ className: cn(separatorVariants({ orientation }), className),
17751
+ ...ariaProps,
17752
+ ...dataAttributes,
17753
+ ...props
17754
+ }
17755
+ );
17756
+ }
17757
+ );
17758
+ Separator.displayName = "Separator";
17759
+
17760
+ // ../empty-state/dist/index.js
17761
+ function createEmptyState(options = {}) {
17762
+ const { tone = "neutral" } = options;
17763
+ const dataAttributes = {
17764
+ "data-tone": tone
17765
+ };
17766
+ return {
17767
+ dataAttributes
17768
+ };
17769
+ }
17770
+ var emptyStateVariants = cva({
17771
+ base: "flex flex-col items-center text-center gap-3 p-8",
17772
+ variants: {
17773
+ bordered: {
17774
+ true: "rounded-xl border border-border bg-card",
17775
+ false: ""
17776
+ }
17777
+ },
17778
+ defaultVariants: {
17779
+ bordered: "false"
17780
+ }
17781
+ });
17782
+ var emptyStateIconChipVariants = cva({
17783
+ base: "flex size-12 items-center justify-center rounded-full",
17784
+ variants: {
17785
+ tone: {
17786
+ neutral: "bg-muted text-muted-foreground",
17787
+ success: "bg-green-500/10 text-green-600",
17788
+ warning: "bg-yellow-500/10 text-yellow-600",
17789
+ danger: "bg-destructive/10 text-destructive"
17790
+ }
17791
+ },
17792
+ defaultVariants: {
17793
+ tone: "neutral"
17794
+ }
17795
+ });
17796
+ var emptyStateTitleClass = "text-lg font-semibold text-foreground";
17797
+ var emptyStateDescriptionClass = "text-sm text-muted-foreground";
17798
+ var emptyStateActionsClass = "flex items-center justify-center gap-2";
17799
+ var EmptyState = React11.forwardRef(
17800
+ ({
17801
+ icon,
17802
+ tone = "neutral",
17803
+ title,
17804
+ description,
17805
+ actions,
17806
+ bordered = false,
17807
+ className,
17808
+ ...props
17809
+ }, ref) => {
17810
+ const api = createEmptyState({ tone });
17811
+ return /* @__PURE__ */ jsxs(
17812
+ "div",
17813
+ {
17814
+ ref,
17815
+ className: cn(
17816
+ emptyStateVariants({ bordered: bordered ? "true" : "false" }),
17817
+ className
17818
+ ),
17819
+ ...api.dataAttributes,
17820
+ ...props,
17821
+ children: [
17822
+ icon != null && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: emptyStateIconChipVariants({ tone }), children: icon }),
17823
+ /* @__PURE__ */ jsx("h3", { className: emptyStateTitleClass, children: title }),
17824
+ description != null && /* @__PURE__ */ jsx("p", { className: emptyStateDescriptionClass, children: description }),
17825
+ actions != null && /* @__PURE__ */ jsx("div", { className: emptyStateActionsClass, children: actions })
17826
+ ]
17827
+ }
17828
+ );
17829
+ }
17830
+ );
17831
+ EmptyState.displayName = "EmptyState";
17832
+ var ConfirmationCard = React11.forwardRef(({ bordered = true, ...props }, ref) => /* @__PURE__ */ jsx(EmptyState, { ref, bordered, ...props }));
17833
+ ConfirmationCard.displayName = "ConfirmationCard";
17834
+
17835
+ // ../wizard/dist/index.js
17836
+ function getStepState(steps, currentIndex) {
17837
+ return steps.map((step, index) => {
17838
+ let status;
17839
+ if (index < currentIndex) {
17840
+ status = "complete";
17841
+ } else if (index === currentIndex) {
17842
+ status = "current";
17843
+ } else {
17844
+ status = "upcoming";
17845
+ }
17846
+ return { step, status, index };
17847
+ });
17848
+ }
17849
+ function getNextIndex(currentIndex, count) {
17850
+ if (count <= 0) return currentIndex;
17851
+ return Math.min(currentIndex + 1, count - 1);
17852
+ }
17853
+ function getPrevIndex(currentIndex) {
17854
+ return Math.max(currentIndex - 1, 0);
17855
+ }
17856
+ function canAdvance(currentIndex, count) {
17857
+ if (count <= 0) return false;
17858
+ return currentIndex < count - 1;
17859
+ }
17860
+ function createWizard(props = {}) {
17861
+ const { currentIndex = 0, count = 0, orientation = "vertical" } = props;
17862
+ const ariaProps = {
17863
+ role: "group"
17864
+ };
17865
+ const dataAttributes = {
17866
+ "data-step": String(currentIndex),
17867
+ "data-orientation": orientation
17868
+ };
17869
+ if (count > 0) {
17870
+ dataAttributes["data-count"] = String(count);
17871
+ }
17872
+ return { ariaProps, dataAttributes };
17873
+ }
17874
+ var wizardVariants = cva({
17875
+ base: "flex gap-8",
17876
+ variants: {
17877
+ orientation: {
17878
+ vertical: "flex-row",
17879
+ horizontal: "flex-col"
17880
+ }
17881
+ },
17882
+ defaultVariants: {
17883
+ orientation: "vertical"
17884
+ }
17885
+ });
17886
+ var wizardRailVariants = cva({
17887
+ base: "flex shrink-0",
17888
+ variants: {
17889
+ orientation: {
17890
+ vertical: "flex-col gap-0",
17891
+ horizontal: "flex-row items-center gap-0"
17892
+ }
17893
+ },
17894
+ defaultVariants: {
17895
+ orientation: "vertical"
17896
+ }
17897
+ });
17898
+ var wizardStepItemVariants = cva({
17899
+ base: "flex items-center gap-3 relative",
17900
+ variants: {
17901
+ orientation: {
17902
+ vertical: "flex-row",
17903
+ horizontal: "flex-col"
17904
+ },
17905
+ status: {
17906
+ complete: "",
17907
+ current: "",
17908
+ upcoming: ""
17909
+ }
17910
+ },
17911
+ defaultVariants: {
17912
+ orientation: "vertical",
17913
+ status: "upcoming"
17914
+ }
17915
+ });
17916
+ var wizardStepIndicatorVariants = cva({
17917
+ base: [
17918
+ "relative z-10 flex size-8 shrink-0 items-center justify-center",
17919
+ "rounded-full border-2 text-xs font-semibold transition-colors"
17920
+ ].join(" "),
17921
+ variants: {
17922
+ status: {
17923
+ complete: "border-primary bg-primary text-primary-foreground",
17924
+ current: "border-primary bg-background text-primary",
17925
+ upcoming: "border-border bg-background text-muted-foreground"
17926
+ }
17927
+ },
17928
+ defaultVariants: {
17929
+ status: "upcoming"
17930
+ }
17931
+ });
17932
+ var wizardStepLabelVariants = cva({
17933
+ base: "text-sm font-medium transition-colors",
17934
+ variants: {
17935
+ status: {
17936
+ complete: "text-foreground",
17937
+ current: "text-foreground",
17938
+ upcoming: "text-muted-foreground"
17939
+ }
17940
+ },
17941
+ defaultVariants: {
17942
+ status: "upcoming"
17943
+ }
17944
+ });
17945
+ var wizardStepOptionalClass = "text-xs text-muted-foreground";
17946
+ var wizardConnectorVariants = cva({
17947
+ base: "shrink-0 transition-colors",
17948
+ variants: {
17949
+ orientation: {
17950
+ vertical: "mx-4 w-0.5 flex-1 min-h-[1.5rem]",
17951
+ horizontal: "my-4 h-0.5 flex-1 min-w-[1.5rem]"
17952
+ },
17953
+ complete: {
17954
+ true: "bg-primary",
17955
+ false: "bg-border"
17956
+ }
17957
+ },
17958
+ defaultVariants: {
17959
+ orientation: "vertical",
17960
+ complete: "false"
17961
+ }
17962
+ });
17963
+ var wizardContentClass = "flex min-w-0 flex-1 flex-col";
17964
+ var wizardFooterClass = "mt-6 flex items-center gap-3";
17965
+ var wizardPrimaryButtonVariants = cva({
17966
+ base: [
17967
+ "inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium",
17968
+ "bg-primary text-primary-foreground transition-colors",
17969
+ "hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2",
17970
+ "focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
17971
+ "disabled:pointer-events-none disabled:opacity-50"
17972
+ ].join(" ")
17973
+ });
17974
+ var wizardSecondaryButtonVariants = cva({
17975
+ base: [
17976
+ "inline-flex items-center justify-center rounded-md px-4 py-2 text-sm font-medium",
17977
+ "border border-input bg-background text-foreground transition-colors",
17978
+ "hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2",
17979
+ "focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
17980
+ "disabled:pointer-events-none disabled:opacity-50"
17981
+ ].join(" ")
17982
+ });
17983
+ var WizardContext = React11.createContext(null);
17984
+ function useWizardContext() {
17985
+ const ctx = React11.useContext(WizardContext);
17986
+ if (!ctx) throw new Error("useWizardContext must be used inside <Wizard>");
17987
+ return ctx;
17988
+ }
17989
+ var Wizard = React11.forwardRef(
17990
+ ({
17991
+ steps,
17992
+ step: stepProp,
17993
+ defaultStep = 0,
17994
+ onStepChange,
17995
+ onComplete,
17996
+ orientation = "vertical",
17997
+ nextLabel = "Next",
17998
+ backLabel = "Back",
17999
+ completeLabel = "Complete",
18000
+ skipLabel = "Skip",
18001
+ children,
18002
+ className,
18003
+ ...props
18004
+ }, ref) => {
18005
+ const isControlled = stepProp !== void 0;
18006
+ const [internal, setInternal] = React11.useState(defaultStep);
18007
+ const currentIndex = isControlled ? stepProp : internal;
18008
+ const advance = React11.useCallback(() => {
18009
+ if (!canAdvance(currentIndex, steps.length)) {
18010
+ onComplete?.();
18011
+ return;
18012
+ }
18013
+ const next = getNextIndex(currentIndex, steps.length);
18014
+ if (!isControlled) setInternal(next);
18015
+ onStepChange?.(next);
18016
+ }, [currentIndex, steps.length, isControlled, onStepChange, onComplete]);
18017
+ const back = React11.useCallback(() => {
18018
+ if (currentIndex === 0) return;
18019
+ const prev = getPrevIndex(currentIndex);
18020
+ if (!isControlled) setInternal(prev);
18021
+ onStepChange?.(prev);
18022
+ }, [currentIndex, isControlled, onStepChange]);
18023
+ const skip = React11.useCallback(() => {
18024
+ advance();
18025
+ }, [advance]);
18026
+ const stepStates = React11.useMemo(
18027
+ () => getStepState(steps, currentIndex),
18028
+ [steps, currentIndex]
18029
+ );
18030
+ const isLastStep = currentIndex === steps.length - 1;
18031
+ const currentStep = steps[currentIndex];
18032
+ const isOptional = currentStep?.optional ?? false;
18033
+ const api = createWizard({
18034
+ currentIndex,
18035
+ count: steps.length,
18036
+ orientation
18037
+ });
18038
+ return /* @__PURE__ */ jsx(WizardContext.Provider, { value: { currentIndex, steps, orientation }, children: /* @__PURE__ */ jsxs(
18039
+ "div",
18040
+ {
18041
+ ref,
18042
+ className: cn(wizardVariants({ orientation }), className),
18043
+ ...api.ariaProps,
18044
+ ...api.dataAttributes,
18045
+ ...props,
18046
+ children: [
18047
+ /* @__PURE__ */ jsx(
18048
+ "nav",
18049
+ {
18050
+ "aria-label": "Progress",
18051
+ className: wizardRailVariants({ orientation }),
18052
+ children: stepStates.map((state, i) => {
18053
+ const isLast = i === stepStates.length - 1;
18054
+ return /* @__PURE__ */ jsxs(React11.Fragment, { children: [
18055
+ /* @__PURE__ */ jsxs(
18056
+ "div",
18057
+ {
18058
+ className: wizardStepItemVariants({
18059
+ orientation,
18060
+ status: state.status
18061
+ }),
18062
+ children: [
18063
+ /* @__PURE__ */ jsx(
18064
+ "span",
18065
+ {
18066
+ "aria-current": state.status === "current" ? "step" : void 0,
18067
+ className: wizardStepIndicatorVariants({ status: state.status }),
18068
+ children: state.status === "complete" ? /* @__PURE__ */ jsx(CheckIcon2, {}) : /* @__PURE__ */ jsx("span", { children: state.index + 1 })
18069
+ }
18070
+ ),
18071
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
18072
+ /* @__PURE__ */ jsx(
18073
+ "span",
18074
+ {
18075
+ className: wizardStepLabelVariants({ status: state.status }),
18076
+ children: state.step.label
18077
+ }
18078
+ ),
18079
+ state.step.optional && /* @__PURE__ */ jsx("span", { className: wizardStepOptionalClass, children: "(Optional)" })
18080
+ ] })
18081
+ ]
18082
+ }
18083
+ ),
18084
+ !isLast && /* @__PURE__ */ jsx(
18085
+ "div",
18086
+ {
18087
+ "aria-hidden": "true",
18088
+ className: wizardConnectorVariants({
18089
+ orientation,
18090
+ complete: state.status === "complete" ? "true" : "false"
18091
+ })
18092
+ }
18093
+ )
18094
+ ] }, state.step.id);
18095
+ })
18096
+ }
18097
+ ),
18098
+ /* @__PURE__ */ jsxs("div", { className: wizardContentClass, children: [
18099
+ /* @__PURE__ */ jsx("div", { className: "flex-1", children: typeof children === "function" ? children(currentIndex) : children }),
18100
+ /* @__PURE__ */ jsxs("div", { className: wizardFooterClass, children: [
18101
+ /* @__PURE__ */ jsx(
18102
+ "button",
18103
+ {
18104
+ type: "button",
18105
+ disabled: currentIndex === 0,
18106
+ className: wizardSecondaryButtonVariants(),
18107
+ onClick: back,
18108
+ children: backLabel
18109
+ }
18110
+ ),
18111
+ isOptional && /* @__PURE__ */ jsx(
18112
+ "button",
18113
+ {
18114
+ type: "button",
18115
+ className: wizardSecondaryButtonVariants(),
18116
+ onClick: skip,
18117
+ children: skipLabel
18118
+ }
18119
+ ),
18120
+ /* @__PURE__ */ jsx(
18121
+ "button",
18122
+ {
18123
+ type: "button",
18124
+ className: wizardPrimaryButtonVariants(),
18125
+ onClick: advance,
18126
+ children: isLastStep ? completeLabel : nextLabel
18127
+ }
18128
+ )
18129
+ ] })
18130
+ ] })
18131
+ ]
18132
+ }
18133
+ ) });
18134
+ }
18135
+ );
18136
+ Wizard.displayName = "Wizard";
18137
+ function useWizard() {
18138
+ return useWizardContext();
18139
+ }
18140
+ function CheckIcon2() {
18141
+ return /* @__PURE__ */ jsx(
18142
+ "svg",
18143
+ {
18144
+ "aria-hidden": "true",
18145
+ xmlns: "http://www.w3.org/2000/svg",
18146
+ viewBox: "0 0 24 24",
18147
+ fill: "none",
18148
+ stroke: "currentColor",
18149
+ strokeWidth: 2.5,
18150
+ strokeLinecap: "round",
18151
+ strokeLinejoin: "round",
18152
+ className: "size-4",
18153
+ children: /* @__PURE__ */ jsx("polyline", { points: "20 6 9 17 4 12" })
18154
+ }
18155
+ );
18156
+ }
18157
+
18158
+ // ../radial-gauge/dist/index.js
18159
+ var GAUGE_SIZE_PX = {
18160
+ sm: 80,
18161
+ md: 120,
18162
+ lg: 160
18163
+ };
18164
+ function clampValue(value, min, max) {
18165
+ return Math.min(Math.max(value, min), max);
18166
+ }
18167
+ function valueToFraction(value, min, max) {
18168
+ if (max === min) return 0;
18169
+ return clampValue((value - min) / (max - min), 0, 1);
18170
+ }
18171
+ function gaugeStrokeDashoffset(fraction, circumference) {
18172
+ return circumference * (1 - fraction);
18173
+ }
18174
+ function resolveZoneTone(value, zones, _max) {
18175
+ if (!zones || zones.length === 0) return "default";
18176
+ const sorted = [...zones].sort((a, b) => a.upTo - b.upTo);
18177
+ for (const zone of sorted) {
18178
+ if (value <= zone.upTo) return zone.tone;
18179
+ }
18180
+ return sorted[sorted.length - 1].tone;
18181
+ }
18182
+ function createRadialGauge(props) {
18183
+ const { value, min = 0, max = 100, size = "md" } = props;
18184
+ const clamped = clampValue(value, min, max);
18185
+ const ariaProps = {
18186
+ role: "meter",
18187
+ "aria-valuenow": clamped,
18188
+ "aria-valuemin": min,
18189
+ "aria-valuemax": max
18190
+ };
18191
+ const dataAttributes = {
18192
+ "data-size": size,
18193
+ "data-value": String(clamped)
18194
+ };
18195
+ return { ariaProps, dataAttributes };
18196
+ }
18197
+ var radialGaugeRootVariants = cva({
18198
+ base: "inline-block shrink-0",
18199
+ variants: {
18200
+ size: {
18201
+ sm: "",
18202
+ md: "",
18203
+ lg: ""
18204
+ }
18205
+ },
18206
+ defaultVariants: {
18207
+ size: "md"
18208
+ }
18209
+ });
18210
+ var gaugeTrackClass = "fill-none stroke-muted-foreground/20";
18211
+ var gaugeArcClass = "fill-none stroke-current transition-[stroke-dashoffset] duration-300 ease-out";
18212
+ var gaugeArcToneVariants = cva({
18213
+ base: "",
18214
+ variants: {
18215
+ tone: {
18216
+ default: "text-foreground",
18217
+ success: "text-emerald-500",
18218
+ warning: "text-amber-500",
18219
+ danger: "text-destructive"
18220
+ }
18221
+ },
18222
+ defaultVariants: {
18223
+ tone: "default"
18224
+ }
18225
+ });
18226
+ var gaugeLabelClass = "fill-foreground text-center font-semibold";
18227
+ var gaugeSublabelClass = "fill-muted-foreground";
18228
+ var GAUGE_LABEL_FONT_SIZE = {
18229
+ sm: 14,
18230
+ md: 20,
18231
+ lg: 26
18232
+ };
18233
+ var GAUGE_SUBLABEL_FONT_SIZE = {
18234
+ sm: 9,
18235
+ md: 11,
18236
+ lg: 13
18237
+ };
18238
+ var RadialGauge = React11.forwardRef(
18239
+ ({
18240
+ value,
18241
+ min = 0,
18242
+ max = 100,
18243
+ size = "md",
18244
+ thickness = 8,
18245
+ label,
18246
+ sublabel,
18247
+ zones,
18248
+ showValue = true,
18249
+ className,
18250
+ ...props
18251
+ }, ref) => {
18252
+ const diameter = GAUGE_SIZE_PX[size];
18253
+ const cx = diameter / 2;
18254
+ const cy = diameter / 2;
18255
+ const r = cx - thickness / 2;
18256
+ const clamped = clampValue(value, min, max);
18257
+ const fraction = valueToFraction(clamped, min, max);
18258
+ const circumference = 2 * Math.PI * r;
18259
+ const dashoffset = gaugeStrokeDashoffset(fraction, circumference);
18260
+ const tone = zones && zones.length > 0 ? resolveZoneTone(clamped, zones) : "default";
18261
+ const api = createRadialGauge({ value, min, max, size });
18262
+ const centerLabel = label ?? (showValue ? String(clamped) : null);
18263
+ const labelFontSize = GAUGE_LABEL_FONT_SIZE[size];
18264
+ const sublabelFontSize = GAUGE_SUBLABEL_FONT_SIZE[size];
18265
+ const labelDy = sublabel ? -sublabelFontSize * 0.8 : 0;
18266
+ return /* @__PURE__ */ jsxs(
18267
+ "svg",
18268
+ {
18269
+ ref,
18270
+ width: diameter,
18271
+ height: diameter,
18272
+ viewBox: `0 0 ${diameter} ${diameter}`,
18273
+ role: "meter",
18274
+ "aria-valuenow": Number(api.ariaProps["aria-valuenow"]),
18275
+ "aria-valuemin": Number(api.ariaProps["aria-valuemin"]),
18276
+ "aria-valuemax": Number(api.ariaProps["aria-valuemax"]),
18277
+ className: cn(radialGaugeRootVariants({ size }), className),
18278
+ ...api.dataAttributes,
18279
+ ...props,
18280
+ children: [
18281
+ /* @__PURE__ */ jsx(
18282
+ "circle",
18283
+ {
18284
+ cx,
18285
+ cy,
18286
+ r,
18287
+ strokeWidth: thickness,
18288
+ className: gaugeTrackClass
18289
+ }
18290
+ ),
18291
+ /* @__PURE__ */ jsx(
18292
+ "circle",
18293
+ {
18294
+ cx,
18295
+ cy,
18296
+ r,
18297
+ strokeWidth: thickness,
18298
+ strokeDasharray: `${circumference} ${circumference}`,
18299
+ strokeDashoffset: dashoffset,
18300
+ strokeLinecap: "round",
18301
+ transform: `rotate(-90 ${cx} ${cy})`,
18302
+ className: cn(gaugeArcClass, gaugeArcToneVariants({ tone }))
18303
+ }
18304
+ ),
18305
+ centerLabel != null && /* @__PURE__ */ jsx(
18306
+ "text",
18307
+ {
18308
+ x: cx,
18309
+ y: cy,
18310
+ textAnchor: "middle",
18311
+ dominantBaseline: "central",
18312
+ fontSize: labelFontSize,
18313
+ dy: labelDy,
18314
+ className: gaugeLabelClass,
18315
+ children: centerLabel
18316
+ }
18317
+ ),
18318
+ sublabel != null && /* @__PURE__ */ jsx(
18319
+ "text",
18320
+ {
18321
+ x: cx,
18322
+ y: cy,
18323
+ textAnchor: "middle",
18324
+ dominantBaseline: "central",
18325
+ fontSize: sublabelFontSize,
18326
+ dy: labelDy + labelFontSize * 1.1,
18327
+ className: gaugeSublabelClass,
18328
+ children: sublabel
18329
+ }
18330
+ )
18331
+ ]
18332
+ }
18333
+ );
18334
+ }
18335
+ );
18336
+ RadialGauge.displayName = "RadialGauge";
18337
+
18338
+ // ../timeline/dist/index.js
18339
+ function createTimeline(props = {}) {
18340
+ const { orientation = "vertical" } = props;
18341
+ const ariaProps = {
18342
+ role: "list"
18343
+ };
18344
+ const dataAttributes = {
18345
+ "data-orientation": orientation
18346
+ };
18347
+ return { ariaProps, dataAttributes };
18348
+ }
18349
+ function getTimelineItemAria() {
18350
+ return { role: "listitem" };
18351
+ }
18352
+ function resolveTimelineItems(items) {
18353
+ return items.map((item) => ({
18354
+ ...item,
18355
+ status: item.status ?? "default",
18356
+ time: item.time ?? "",
18357
+ description: item.description ?? ""
18358
+ }));
18359
+ }
18360
+ var timelineVariants = cva({
18361
+ base: "relative",
18362
+ variants: {
18363
+ orientation: {
18364
+ vertical: "flex flex-col",
18365
+ horizontal: "flex flex-row items-start overflow-x-auto"
18366
+ }
18367
+ },
18368
+ defaultVariants: {
18369
+ orientation: "vertical"
18370
+ }
18371
+ });
18372
+ var timelineItemVariants = cva({
18373
+ base: "relative flex gap-4",
18374
+ variants: {
18375
+ orientation: {
18376
+ vertical: "flex-row pb-8 last:pb-0",
18377
+ horizontal: "flex-col items-center flex-1 px-2"
18378
+ }
18379
+ },
18380
+ defaultVariants: {
18381
+ orientation: "vertical"
18382
+ }
18383
+ });
18384
+ var timelineMarkerVariants = cva({
18385
+ base: [
18386
+ "relative z-10 flex shrink-0 items-center justify-center",
18387
+ "size-3 rounded-full border-2",
18388
+ "transition-colors"
18389
+ ].join(" "),
18390
+ variants: {
18391
+ status: {
18392
+ done: "bg-primary border-primary",
18393
+ current: "bg-background border-primary ring-2 ring-primary ring-offset-2 ring-offset-background",
18394
+ upcoming: "bg-muted border-muted-foreground/30",
18395
+ default: "bg-background border-border"
18396
+ }
18397
+ },
18398
+ defaultVariants: {
18399
+ status: "default"
18400
+ }
18401
+ });
18402
+ var timelineConnectorVariants = cva({
18403
+ base: "absolute bg-border",
18404
+ variants: {
18405
+ orientation: {
18406
+ vertical: "left-[5px] top-3 w-0.5 h-full",
18407
+ horizontal: "top-[5px] left-1/2 w-full h-0.5"
18408
+ }
18409
+ },
18410
+ defaultVariants: {
18411
+ orientation: "vertical"
18412
+ }
18413
+ });
18414
+ var timelineGutterClass = "relative flex flex-col items-center";
18415
+ var timelineTimeClass = "text-xs text-muted-foreground tabular-nums";
18416
+ var timelineTitleClass = "text-sm font-medium text-foreground leading-snug";
18417
+ var timelineDescriptionClass = "mt-0.5 text-xs text-muted-foreground leading-relaxed";
18418
+ var timelineContentClass = "flex flex-col min-w-0";
18419
+ var TimelineItem = React11.forwardRef(
18420
+ ({ item, orientation, isLast }, ref) => {
18421
+ const itemAria = getTimelineItemAria();
18422
+ return /* @__PURE__ */ jsxs(
18423
+ "li",
18424
+ {
18425
+ ref,
18426
+ ...itemAria,
18427
+ className: timelineItemVariants({ orientation }),
18428
+ "data-status": item.status,
18429
+ children: [
18430
+ /* @__PURE__ */ jsxs("div", { className: timelineGutterClass, children: [
18431
+ /* @__PURE__ */ jsx("div", { className: timelineMarkerVariants({ status: item.status }) }),
18432
+ !isLast && /* @__PURE__ */ jsx("div", { className: timelineConnectorVariants({ orientation }) })
18433
+ ] }),
18434
+ /* @__PURE__ */ jsxs("div", { className: timelineContentClass, children: [
18435
+ item.time && /* @__PURE__ */ jsx("span", { className: timelineTimeClass, children: item.time }),
18436
+ /* @__PURE__ */ jsx("span", { className: timelineTitleClass, children: item.title }),
18437
+ item.description && /* @__PURE__ */ jsx("p", { className: timelineDescriptionClass, children: item.description })
18438
+ ] })
18439
+ ]
18440
+ }
18441
+ );
18442
+ }
18443
+ );
18444
+ TimelineItem.displayName = "TimelineItem";
18445
+ var Timeline = React11.forwardRef(
18446
+ ({ items, orientation = "vertical", renderItem, className, ...props }, ref) => {
18447
+ const resolved = React11.useMemo(() => resolveTimelineItems(items), [items]);
18448
+ const api = createTimeline({ orientation });
18449
+ return /* @__PURE__ */ jsx(
18450
+ "ul",
18451
+ {
18452
+ ref,
18453
+ className: cn(timelineVariants({ orientation }), className),
18454
+ ...api.ariaProps,
18455
+ ...api.dataAttributes,
18456
+ ...props,
18457
+ children: resolved.map((item, index) => {
18458
+ const isLast = index === resolved.length - 1;
18459
+ if (renderItem) {
18460
+ return /* @__PURE__ */ jsx(React11.Fragment, { children: renderItem(item, index, isLast) }, item.id);
18461
+ }
18462
+ return /* @__PURE__ */ jsx(
18463
+ TimelineItem,
18464
+ {
18465
+ item,
18466
+ orientation,
18467
+ isLast
18468
+ },
18469
+ item.id
18470
+ );
18471
+ })
18472
+ }
18473
+ );
18474
+ }
18475
+ );
18476
+ Timeline.displayName = "Timeline";
18477
+
18478
+ // ../checklist/dist/index.js
18479
+ function createChecklist() {
18480
+ return {
18481
+ ariaProps: { role: "list" },
18482
+ dataAttributes: { "data-component": "checklist" }
18483
+ };
18484
+ }
18485
+ function checklistProgress(items) {
18486
+ const total = items.length;
18487
+ const completed = items.filter((item) => item.checked).length;
18488
+ const fraction = total === 0 ? 0 : completed / total;
18489
+ return { completed, total, fraction };
18490
+ }
18491
+ function toggleChecklistItem(items, id) {
18492
+ return items.map(
18493
+ (item) => item.id === id ? { ...item, checked: !item.checked } : item
18494
+ );
18495
+ }
18496
+ var checklistContainerClass = "flex flex-col gap-2";
18497
+ var checklistListClass = "flex flex-col gap-1";
18498
+ var checklistItemVariants = cva({
18499
+ base: [
18500
+ "flex items-start gap-3 rounded-md px-2 py-2 text-left",
18501
+ "transition-colors hover:bg-accent",
18502
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
18503
+ "disabled:pointer-events-none disabled:opacity-50"
18504
+ ].join(" "),
18505
+ variants: {
18506
+ checked: {
18507
+ true: "text-muted-foreground",
18508
+ false: "text-foreground"
18509
+ }
18510
+ },
18511
+ defaultVariants: {
18512
+ checked: "false"
18513
+ }
18514
+ });
18515
+ var checklistBoxVariants = cva({
18516
+ base: [
18517
+ "mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded",
18518
+ "border transition-colors"
18519
+ ].join(" "),
18520
+ variants: {
18521
+ checked: {
18522
+ true: "border-primary bg-primary text-primary-foreground",
18523
+ false: "border-input bg-background"
18524
+ }
18525
+ },
18526
+ defaultVariants: {
18527
+ checked: "false"
18528
+ }
18529
+ });
18530
+ var checklistLabelWrapClass = "flex flex-col gap-0.5 min-w-0";
18531
+ var checklistLabelVariants = cva({
18532
+ base: "text-sm font-medium leading-none transition-colors",
18533
+ variants: {
18534
+ checked: {
18535
+ true: "line-through text-muted-foreground",
18536
+ false: "text-foreground"
18537
+ }
18538
+ },
18539
+ defaultVariants: {
18540
+ checked: "false"
18541
+ }
18542
+ });
18543
+ var checklistDescriptionClass = "text-xs text-muted-foreground";
18544
+ var checklistProgressClass = "text-xs text-muted-foreground tabular-nums";
18545
+ var Checklist = React11.forwardRef(
18546
+ ({
18547
+ items: itemsProp,
18548
+ defaultItems,
18549
+ onChange,
18550
+ onItemToggle,
18551
+ showProgress = false,
18552
+ className,
18553
+ ...props
18554
+ }, ref) => {
18555
+ const isControlled = itemsProp !== void 0;
18556
+ const [internal, setInternal] = React11.useState(
18557
+ defaultItems ?? []
18558
+ );
18559
+ const items = isControlled ? itemsProp : internal;
18560
+ const handleToggle = React11.useCallback(
18561
+ (id) => {
18562
+ const next = toggleChecklistItem(items, id);
18563
+ if (!isControlled) setInternal(next);
18564
+ onChange?.(next);
18565
+ onItemToggle?.(id);
18566
+ },
18567
+ [items, isControlled, onChange, onItemToggle]
18568
+ );
18569
+ const { ariaProps, dataAttributes } = createChecklist();
18570
+ const progress = showProgress ? checklistProgress(items) : null;
18571
+ return /* @__PURE__ */ jsxs(
18572
+ "div",
18573
+ {
18574
+ ref,
18575
+ className: cn(checklistContainerClass, className),
18576
+ ...dataAttributes,
18577
+ ...props,
18578
+ children: [
18579
+ /* @__PURE__ */ jsx("ul", { className: checklistListClass, ...ariaProps, children: items.map((item) => {
18580
+ const checked = Boolean(item.checked);
18581
+ return /* @__PURE__ */ jsx("li", { role: "presentation", children: /* @__PURE__ */ jsxs(
18582
+ "button",
18583
+ {
18584
+ type: "button",
18585
+ role: "checkbox",
18586
+ "aria-checked": checked,
18587
+ "data-state": checked ? "checked" : "unchecked",
18588
+ className: checklistItemVariants({ checked: checked ? "true" : "false" }),
18589
+ onClick: () => handleToggle(item.id),
18590
+ children: [
18591
+ /* @__PURE__ */ jsx(
18592
+ "span",
18593
+ {
18594
+ "aria-hidden": "true",
18595
+ className: checklistBoxVariants({ checked: checked ? "true" : "false" }),
18596
+ children: checked && /* @__PURE__ */ jsx(
18597
+ "svg",
18598
+ {
18599
+ viewBox: "0 0 12 12",
18600
+ fill: "none",
18601
+ className: "h-3 w-3",
18602
+ "aria-hidden": "true",
18603
+ children: /* @__PURE__ */ jsx(
18604
+ "path",
18605
+ {
18606
+ d: "M2 6l3 3 5-5",
18607
+ stroke: "currentColor",
18608
+ strokeWidth: "1.5",
18609
+ strokeLinecap: "round",
18610
+ strokeLinejoin: "round"
18611
+ }
18612
+ )
18613
+ }
18614
+ )
18615
+ }
18616
+ ),
18617
+ /* @__PURE__ */ jsxs("span", { className: checklistLabelWrapClass, children: [
18618
+ /* @__PURE__ */ jsx("span", { className: checklistLabelVariants({ checked: checked ? "true" : "false" }), children: item.label }),
18619
+ item.description && /* @__PURE__ */ jsx("span", { className: checklistDescriptionClass, children: item.description })
18620
+ ] })
18621
+ ]
18622
+ }
18623
+ ) }, item.id);
18624
+ }) }),
18625
+ progress !== null && /* @__PURE__ */ jsx("p", { className: checklistProgressClass, children: `${progress.completed}/${progress.total} completed` })
18626
+ ]
18627
+ }
18628
+ );
18629
+ }
18630
+ );
18631
+ Checklist.displayName = "Checklist";
18632
+
18633
+ // ../editor-tabs/dist/index.js
18634
+ function createEditorTabs(props = {}) {
18635
+ const { activeId } = props;
18636
+ const ariaProps = {
18637
+ role: "tablist"
18638
+ };
18639
+ const dataAttributes = {};
18640
+ if (activeId !== void 0) {
18641
+ dataAttributes["data-active-id"] = activeId;
18642
+ }
18643
+ return { ariaProps, dataAttributes };
18644
+ }
18645
+ function getNextTabIndex(currentIndex, key, count) {
18646
+ if (count <= 0) return currentIndex;
18647
+ switch (key) {
18648
+ case "ArrowRight":
18649
+ return (currentIndex + 1) % count;
18650
+ case "ArrowLeft":
18651
+ return (currentIndex - 1 + count) % count;
18652
+ case "Home":
18653
+ return 0;
18654
+ case "End":
18655
+ return count - 1;
18656
+ default:
18657
+ return currentIndex;
18658
+ }
18659
+ }
18660
+ var editorTabsVariants = cva({
18661
+ base: "inline-flex items-end gap-0 border-b border-border bg-muted/40 overflow-x-auto",
18662
+ variants: {},
18663
+ defaultVariants: {}
18664
+ });
18665
+ var editorTabVariants = cva({
18666
+ base: [
18667
+ "group inline-flex items-center gap-1.5 px-3 py-2 text-sm font-medium",
18668
+ "border-b-2 transition-colors select-none whitespace-nowrap",
18669
+ "focus-visible:outline-none focus-visible:ring-2",
18670
+ "focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"
18671
+ ].join(" "),
18672
+ variants: {
18673
+ state: {
18674
+ active: [
18675
+ "border-primary text-foreground bg-background",
18676
+ "border-t border-l border-r border-border border-b-background -mb-px"
18677
+ ].join(" "),
18678
+ inactive: [
18679
+ "border-transparent text-muted-foreground",
18680
+ "hover:text-foreground hover:bg-background/60"
18681
+ ].join(" ")
18682
+ }
18683
+ },
18684
+ defaultVariants: {
18685
+ state: "inactive"
18686
+ }
18687
+ });
18688
+ var editorTabDirtyDotClass = "size-1.5 rounded-full bg-amber-400 shrink-0";
18689
+ var editorTabCloseButtonClass = [
18690
+ "ml-1 inline-flex items-center justify-center rounded-sm size-4 shrink-0",
18691
+ "text-muted-foreground opacity-0 transition-opacity",
18692
+ "group-hover:opacity-100 focus-visible:opacity-100",
18693
+ "hover:bg-accent hover:text-foreground",
18694
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
18695
+ ].join(" ");
18696
+ var editorTabIconClass = "shrink-0 text-[0.85em] leading-none";
18697
+ var EditorTabs = React11.forwardRef(
18698
+ ({ tabs, activeId, onSelect, onClose, className, ...props }, ref) => {
18699
+ const tabRefs = React11.useRef([]);
18700
+ const activeIndex = tabs.findIndex((t) => t.id === activeId);
18701
+ const tabbableIndex = activeIndex === -1 ? 0 : activeIndex;
18702
+ const handleKeyDown = (event, index) => {
18703
+ const next = getNextTabIndex(index, event.key, tabs.length);
18704
+ if (next !== index) {
18705
+ event.preventDefault();
18706
+ onSelect(tabs[next].id);
18707
+ tabRefs.current[next]?.focus();
18708
+ }
18709
+ };
18710
+ const api = createEditorTabs({ activeId });
18711
+ return /* @__PURE__ */ jsx(
18712
+ "div",
18713
+ {
18714
+ ref,
18715
+ className: cn(editorTabsVariants(), className),
18716
+ ...api.ariaProps,
18717
+ ...api.dataAttributes,
18718
+ ...props,
18719
+ children: tabs.map((tab, index) => {
18720
+ const isActive = tab.id === activeId;
18721
+ return /* @__PURE__ */ jsxs(
18722
+ "button",
18723
+ {
18724
+ ref: (node) => {
18725
+ tabRefs.current[index] = node;
18726
+ },
18727
+ type: "button",
18728
+ role: "tab",
18729
+ "aria-selected": isActive,
18730
+ "aria-controls": `tabpanel-${tab.id}`,
18731
+ id: `tab-${tab.id}`,
18732
+ tabIndex: index === tabbableIndex ? 0 : -1,
18733
+ "data-state": isActive ? "active" : "inactive",
18734
+ className: editorTabVariants({ state: isActive ? "active" : "inactive" }),
18735
+ onClick: () => onSelect(tab.id),
18736
+ onKeyDown: (e) => handleKeyDown(e, index),
18737
+ children: [
18738
+ tab.icon && /* @__PURE__ */ jsx("span", { className: editorTabIconClass, "aria-hidden": "true", children: tab.icon }),
18739
+ /* @__PURE__ */ jsx("span", { children: tab.label }),
18740
+ tab.dirty && /* @__PURE__ */ jsx(
18741
+ "span",
18742
+ {
18743
+ className: editorTabDirtyDotClass,
18744
+ "aria-label": "unsaved changes",
18745
+ role: "status"
18746
+ }
18747
+ ),
18748
+ tab.closable && /* @__PURE__ */ jsx(
18749
+ "span",
18750
+ {
18751
+ role: "button",
18752
+ "aria-label": `Close ${tab.label}`,
18753
+ tabIndex: -1,
18754
+ className: editorTabCloseButtonClass,
18755
+ onClick: (e) => {
18756
+ e.stopPropagation();
18757
+ onClose?.(tab.id);
18758
+ },
18759
+ onKeyDown: (e) => {
18760
+ if (e.key === "Enter" || e.key === " ") {
18761
+ e.stopPropagation();
18762
+ onClose?.(tab.id);
18763
+ }
18764
+ },
18765
+ children: "\xD7"
18766
+ }
18767
+ )
18768
+ ]
18769
+ },
18770
+ tab.id
18771
+ );
18772
+ })
18773
+ }
18774
+ );
18775
+ }
18776
+ );
18777
+ EditorTabs.displayName = "EditorTabs";
18778
+
18779
+ // ../terminal/dist/index.js
18780
+ function createTerminal(options = {}) {
18781
+ const ariaProps = {
18782
+ role: "log",
18783
+ "aria-live": "polite"
18784
+ };
18785
+ if (options.label) {
18786
+ ariaProps["aria-label"] = options.label;
18787
+ }
18788
+ const dataAttributes = {
18789
+ "data-component": "terminal"
18790
+ };
18791
+ return { ariaProps, dataAttributes };
18792
+ }
18793
+ var terminalVariants = cva({
18794
+ base: [
18795
+ "relative rounded-lg border border-border bg-card font-mono text-sm",
18796
+ "overflow-y-auto overflow-x-auto",
18797
+ "p-4 space-y-0.5"
18798
+ ].join(" "),
18799
+ variants: {
18800
+ maxHeight: {
18801
+ sm: "max-h-48",
18802
+ md: "max-h-80",
18803
+ lg: "max-h-[32rem]",
18804
+ none: ""
18805
+ }
18806
+ },
18807
+ defaultVariants: {
18808
+ maxHeight: "md"
18809
+ }
18810
+ });
18811
+ var terminalLineVariants = cva({
18812
+ base: "block whitespace-pre-wrap break-all leading-relaxed",
18813
+ variants: {
18814
+ kind: {
18815
+ /** The user-typed command: full foreground, bold weight. */
18816
+ command: "text-foreground font-semibold",
18817
+ /** Normal program output. */
18818
+ stdout: "text-foreground",
18819
+ /** Error / stderr output — uses the destructive semantic token. */
18820
+ stderr: "text-destructive",
18821
+ /** Informational summary lines — muted, visually de-emphasised. */
18822
+ info: "text-muted-foreground",
18823
+ /**
18824
+ * Success / passing lines — green-family.
18825
+ * Maps to `text-emerald-500` via the Tailwind semantic alias used
18826
+ * across the design system; downstream themes can override this token.
18827
+ */
18828
+ success: "text-emerald-500 dark:text-emerald-400"
18829
+ }
18830
+ },
18831
+ defaultVariants: {
18832
+ kind: "stdout"
18833
+ }
18834
+ });
18835
+ var terminalPromptClass = "select-none mr-2 text-muted-foreground";
18836
+ var Terminal = React11.forwardRef(
18837
+ ({
18838
+ lines,
18839
+ promptSymbol = "$",
18840
+ maxHeight = "md",
18841
+ className,
18842
+ "aria-label": ariaLabel,
18843
+ ...props
18844
+ }, ref) => {
18845
+ const api = createTerminal({ label: ariaLabel });
18846
+ return /* @__PURE__ */ jsx(
18847
+ "div",
18848
+ {
18849
+ ref,
18850
+ className: cn(terminalVariants({ maxHeight }), className),
18851
+ ...api.ariaProps,
18852
+ ...api.dataAttributes,
18853
+ ...props,
18854
+ children: lines.map((line, index) => {
18855
+ const key = line.id ?? index;
18856
+ return /* @__PURE__ */ jsx("span", { className: terminalLineVariants({ kind: line.kind }), children: line.kind === "command" ? /* @__PURE__ */ jsxs(Fragment, { children: [
18857
+ /* @__PURE__ */ jsx("span", { className: terminalPromptClass, children: promptSymbol }),
18858
+ line.text
18859
+ ] }) : line.text }, key);
18860
+ })
18861
+ }
18862
+ );
18863
+ }
18864
+ );
18865
+ Terminal.displayName = "Terminal";
18866
+
18867
+ // ../test-results/dist/index.js
18868
+ function summarizeTests(results) {
18869
+ let passed = 0;
18870
+ let failed = 0;
18871
+ let skipped = 0;
18872
+ for (const r of results) {
18873
+ if (r.status === "pass") passed++;
18874
+ else if (r.status === "fail") failed++;
18875
+ else skipped++;
18876
+ }
18877
+ return {
18878
+ total: results.length,
18879
+ passed,
18880
+ failed,
18881
+ skipped,
18882
+ allPassed: failed === 0 && skipped === 0 && results.length > 0
18883
+ };
18884
+ }
18885
+ function createTestResults() {
18886
+ const ariaProps = {
18887
+ role: "list"
18888
+ };
18889
+ const dataAttributes = {
18890
+ "data-component": "test-results"
18891
+ };
18892
+ return { ariaProps, dataAttributes };
18893
+ }
18894
+ var testResultsContainerVariants = cva({
18895
+ base: "flex flex-col gap-3 w-full",
18896
+ variants: {},
18897
+ defaultVariants: {}
18898
+ });
18899
+ var testResultsSummaryVariants = cva({
18900
+ base: [
18901
+ "flex items-center gap-2 rounded-md px-3 py-2 text-sm font-medium",
18902
+ "border"
18903
+ ].join(" "),
18904
+ variants: {
18905
+ outcome: {
18906
+ pass: "border-success/30 bg-success/10 text-success",
18907
+ fail: "border-destructive/30 bg-destructive/10 text-destructive",
18908
+ skip: "border-muted/30 bg-muted/10 text-muted-foreground"
18909
+ }
18910
+ },
18911
+ defaultVariants: {
18912
+ outcome: "pass"
18913
+ }
18914
+ });
18915
+ var testRowVariants = cva({
18916
+ base: [
18917
+ "flex flex-col gap-1.5 rounded-md border px-3 py-2.5 text-sm"
18918
+ ].join(" "),
18919
+ variants: {
18920
+ status: {
18921
+ pass: "border-success/20 bg-success/5",
18922
+ fail: "border-destructive/20 bg-destructive/5",
18923
+ skip: "border-muted/20 bg-muted/5"
18924
+ }
18925
+ },
18926
+ defaultVariants: {
18927
+ status: "pass"
18928
+ }
18929
+ });
18930
+ var testStatusBadgeVariants = cva({
18931
+ base: "inline-flex items-center rounded px-1.5 py-0.5 text-xs font-semibold uppercase tracking-wide",
18932
+ variants: {
18933
+ status: {
18934
+ pass: "bg-success/20 text-success",
18935
+ fail: "bg-destructive/20 text-destructive",
18936
+ skip: "bg-muted text-muted-foreground"
18937
+ }
18938
+ },
18939
+ defaultVariants: {
18940
+ status: "pass"
18941
+ }
18942
+ });
18943
+ var testNameClass = "font-medium text-foreground";
18944
+ var testDurationClass = "text-xs text-muted-foreground";
18945
+ var testDiffBlockVariants = cva({
18946
+ base: [
18947
+ "rounded border-l-2 bg-muted/30 px-3 py-2 font-mono text-xs text-foreground"
18948
+ ].join(" "),
18949
+ variants: {
18950
+ side: {
18951
+ expected: "border-l-success text-success",
18952
+ actual: "border-l-destructive text-destructive"
18953
+ }
18954
+ },
18955
+ defaultVariants: {
18956
+ side: "actual"
18957
+ }
18958
+ });
18959
+ var testMessageClass = "text-xs text-muted-foreground italic";
18960
+ var TestResults = React11.forwardRef(
18961
+ ({ results, showSummary = true, className, ...props }, ref) => {
18962
+ const summary = React11.useMemo(() => summarizeTests(results), [results]);
18963
+ const { ariaProps, dataAttributes } = createTestResults();
18964
+ const summaryOutcome = summary.failed > 0 ? "fail" : summary.skipped > 0 ? "skip" : "pass";
18965
+ return /* @__PURE__ */ jsxs(
18966
+ "div",
18967
+ {
18968
+ ref,
18969
+ className: cn(testResultsContainerVariants(), className),
18970
+ ...dataAttributes,
18971
+ ...props,
18972
+ children: [
18973
+ showSummary && results.length > 0 && /* @__PURE__ */ jsxs(
18974
+ "div",
18975
+ {
18976
+ className: testResultsSummaryVariants({ outcome: summaryOutcome }),
18977
+ "aria-live": "polite",
18978
+ children: [
18979
+ /* @__PURE__ */ jsx("span", { children: `${summary.passed}/${summary.total} passed` }),
18980
+ summary.failed > 0 && /* @__PURE__ */ jsx("span", { children: `\xB7 ${summary.failed} failed` }),
18981
+ summary.skipped > 0 && /* @__PURE__ */ jsx("span", { children: `\xB7 ${summary.skipped} skipped` })
18982
+ ]
18983
+ }
18984
+ ),
18985
+ /* @__PURE__ */ jsx("ul", { ...ariaProps, className: "flex flex-col gap-2", children: results.map((result) => /* @__PURE__ */ jsxs("li", { role: "listitem", className: testRowVariants({ status: result.status }), children: [
18986
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
18987
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
18988
+ /* @__PURE__ */ jsx("span", { className: testStatusBadgeVariants({ status: result.status }), children: result.status }),
18989
+ /* @__PURE__ */ jsx("span", { className: cn(testNameClass, "truncate"), children: result.name })
18990
+ ] }),
18991
+ result.durationMs !== void 0 && /* @__PURE__ */ jsx("span", { className: testDurationClass, children: `${result.durationMs} ms` })
18992
+ ] }),
18993
+ result.status === "fail" && result.expected !== void 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 mt-1", children: [
18994
+ /* @__PURE__ */ jsxs("div", { className: testDiffBlockVariants({ side: "expected" }), children: [
18995
+ /* @__PURE__ */ jsx("span", { className: "opacity-60 mr-1 select-none", children: "expected" }),
18996
+ result.expected
18997
+ ] }),
18998
+ result.actual !== void 0 && /* @__PURE__ */ jsxs("div", { className: testDiffBlockVariants({ side: "actual" }), children: [
18999
+ /* @__PURE__ */ jsx("span", { className: "opacity-60 mr-1 select-none", children: "actual" }),
19000
+ result.actual
19001
+ ] })
19002
+ ] }),
19003
+ result.message && /* @__PURE__ */ jsx("p", { className: testMessageClass, children: result.message })
19004
+ ] }, result.id)) })
19005
+ ]
19006
+ }
19007
+ );
19008
+ }
19009
+ );
19010
+ TestResults.displayName = "TestResults";
19011
+
19012
+ // ../editor-status-bar/dist/index.js
19013
+ function formatCursorPosition(line, col) {
19014
+ return `Ln ${line}, Col ${col}`;
19015
+ }
19016
+ function partitionSegments(segments) {
19017
+ const left = [];
19018
+ const right = [];
19019
+ for (const seg of segments) {
19020
+ if (seg.align === "right") {
19021
+ right.push(seg);
19022
+ } else {
19023
+ left.push(seg);
19024
+ }
19025
+ }
19026
+ return { left, right };
19027
+ }
19028
+ function createEditorStatusBar() {
19029
+ const ariaProps = {
19030
+ role: "status",
19031
+ "aria-live": "polite"
19032
+ };
19033
+ const dataAttributes = {
19034
+ "data-component": "editor-status-bar"
19035
+ };
19036
+ return { ariaProps, dataAttributes };
19037
+ }
19038
+ var editorStatusBarVariants = cva({
19039
+ base: [
19040
+ "flex items-center justify-between",
19041
+ "w-full h-6 px-2 gap-4",
19042
+ "text-xs font-mono",
19043
+ "bg-muted text-muted-foreground",
19044
+ "border-t border-border",
19045
+ "select-none"
19046
+ ].join(" "),
19047
+ variants: {},
19048
+ defaultVariants: {}
19049
+ });
19050
+ var statusBarGroupClass = "flex items-center gap-3 overflow-hidden";
19051
+ var statusBarSegmentVariants = cva({
19052
+ base: "inline-flex items-center whitespace-nowrap truncate leading-none",
19053
+ variants: {
19054
+ tone: {
19055
+ default: "text-muted-foreground",
19056
+ muted: "text-muted-foreground/60",
19057
+ accent: "text-primary"
19058
+ }
19059
+ },
19060
+ defaultVariants: {
19061
+ tone: "default"
19062
+ }
19063
+ });
19064
+ function buildSegmentsFromConvenienceProps(props) {
19065
+ const segs = [];
19066
+ if (props.line !== void 0 && props.col !== void 0) {
19067
+ segs.push({
19068
+ id: "cursor",
19069
+ label: formatCursorPosition(props.line, props.col),
19070
+ align: "left",
19071
+ tone: "default"
19072
+ });
19073
+ }
19074
+ if (props.indentation) {
19075
+ segs.push({ id: "indentation", label: props.indentation, align: "left", tone: "muted" });
19076
+ }
19077
+ if (props.language) {
19078
+ segs.push({ id: "language", label: props.language, align: "right", tone: "accent" });
19079
+ }
19080
+ if (props.encoding) {
19081
+ segs.push({ id: "encoding", label: props.encoding, align: "right", tone: "muted" });
19082
+ }
19083
+ if (props.eol) {
19084
+ segs.push({ id: "eol", label: props.eol, align: "right", tone: "muted" });
19085
+ }
19086
+ if (props.status) {
19087
+ segs.push({ id: "status", label: props.status, align: "right", tone: "muted" });
19088
+ }
19089
+ return segs;
19090
+ }
19091
+ var EditorStatusBar = React11.forwardRef(
19092
+ ({
19093
+ segments: segmentsProp,
19094
+ line,
19095
+ col,
19096
+ indentation,
19097
+ language,
19098
+ encoding,
19099
+ eol,
19100
+ status,
19101
+ className,
19102
+ ...props
19103
+ }, ref) => {
19104
+ const segments = segmentsProp ?? buildSegmentsFromConvenienceProps({
19105
+ line,
19106
+ col,
19107
+ indentation,
19108
+ language,
19109
+ encoding,
19110
+ eol,
19111
+ status
19112
+ });
19113
+ const { left, right } = partitionSegments(segments);
19114
+ const api = createEditorStatusBar();
19115
+ return /* @__PURE__ */ jsxs(
19116
+ "div",
19117
+ {
19118
+ ref,
19119
+ className: cn(editorStatusBarVariants(), className),
19120
+ ...api.ariaProps,
19121
+ ...api.dataAttributes,
19122
+ ...props,
19123
+ children: [
19124
+ /* @__PURE__ */ jsx("div", { className: statusBarGroupClass, children: left.map((seg) => /* @__PURE__ */ jsx(
19125
+ "span",
19126
+ {
19127
+ className: statusBarSegmentVariants({ tone: seg.tone ?? "default" }),
19128
+ children: seg.label
19129
+ },
19130
+ seg.id
19131
+ )) }),
19132
+ /* @__PURE__ */ jsx("div", { className: statusBarGroupClass, children: right.map((seg) => /* @__PURE__ */ jsx(
19133
+ "span",
19134
+ {
19135
+ className: statusBarSegmentVariants({ tone: seg.tone ?? "default" }),
19136
+ children: seg.label
19137
+ },
19138
+ seg.id
19139
+ )) })
19140
+ ]
19141
+ }
19142
+ );
19143
+ }
19144
+ );
19145
+ EditorStatusBar.displayName = "EditorStatusBar";
19146
+
19147
+ // ../video-tile/dist/index.js
19148
+ function createVideoTile(props = {}) {
19149
+ const { speaking = false, pinned = false } = props;
19150
+ return {
19151
+ dataAttributes: {
19152
+ "data-speaking": speaking ? "true" : "false",
19153
+ "data-pinned": pinned ? "true" : "false"
19154
+ },
19155
+ ariaProps: {
19156
+ role: "group"
19157
+ }
19158
+ };
19159
+ }
19160
+ function getInitials3(name) {
19161
+ const words = name.trim().split(/\s+/).filter(Boolean);
19162
+ return words.slice(0, 2).map((w) => w[0].toUpperCase()).join("");
19163
+ }
19164
+ var videoTileVariants = cva({
19165
+ base: [
19166
+ "relative aspect-video overflow-hidden rounded-lg bg-muted",
19167
+ "transition-shadow duration-200"
19168
+ ].join(" "),
19169
+ variants: {
19170
+ speaking: {
19171
+ "true": "ring-2 ring-emerald-500 dark:ring-emerald-400 ring-offset-2 ring-offset-background",
19172
+ "false": ""
19173
+ },
19174
+ pinned: {
19175
+ "true": "ring-2 ring-primary ring-offset-2 ring-offset-background",
19176
+ "false": ""
19177
+ }
19178
+ },
19179
+ defaultVariants: {
19180
+ speaking: "false",
19181
+ pinned: "false"
19182
+ }
19183
+ });
19184
+ var videoTileNameChipClass = "absolute bottom-2 left-2 flex items-center gap-1.5 rounded-md bg-background/70 px-2 py-0.5 text-xs font-medium text-foreground backdrop-blur-sm";
19185
+ var videoTileMicIconClass = "text-destructive";
19186
+ var videoTileAvatarFallbackClass = "absolute inset-0 flex items-center justify-center";
19187
+ var videoTileAvatarCircleClass = "flex size-16 items-center justify-center rounded-full bg-card text-foreground text-xl font-semibold select-none";
19188
+ var videoTileReactionBadgeClass = "absolute right-2 top-2 flex items-center justify-center rounded-full bg-background/70 px-1.5 py-0.5 text-sm backdrop-blur-sm";
19189
+ var VideoTile = React11.forwardRef(
19190
+ ({
19191
+ name,
19192
+ micState = "on",
19193
+ speaking = false,
19194
+ pinned = false,
19195
+ avatarUrl,
19196
+ mediaSlot,
19197
+ reaction,
19198
+ className,
19199
+ ...props
19200
+ }, ref) => {
19201
+ const api = createVideoTile({ speaking, pinned });
19202
+ const initials = getInitials3(name);
19203
+ const isMuted = micState === "muted";
19204
+ return /* @__PURE__ */ jsxs(
19205
+ "div",
19206
+ {
19207
+ ref,
19208
+ className: cn(
19209
+ videoTileVariants({
19210
+ speaking: speaking ? "true" : "false",
19211
+ pinned: pinned ? "true" : "false"
19212
+ }),
19213
+ className
19214
+ ),
19215
+ "aria-label": name,
19216
+ ...api.ariaProps,
19217
+ ...api.dataAttributes,
19218
+ ...props,
19219
+ children: [
19220
+ mediaSlot != null ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0 h-full w-full object-cover", children: mediaSlot }) : (
19221
+ /* Avatar fallback */
19222
+ /* @__PURE__ */ jsx("div", { className: videoTileAvatarFallbackClass, children: avatarUrl ? /* @__PURE__ */ jsx(
19223
+ "img",
19224
+ {
19225
+ src: avatarUrl,
19226
+ alt: name,
19227
+ className: videoTileAvatarCircleClass
19228
+ }
19229
+ ) : /* @__PURE__ */ jsx("div", { className: videoTileAvatarCircleClass, "aria-hidden": "true", children: initials }) })
19230
+ ),
19231
+ reaction != null && /* @__PURE__ */ jsx("div", { className: videoTileReactionBadgeClass, "aria-hidden": "true", children: reaction }),
19232
+ /* @__PURE__ */ jsxs("div", { className: videoTileNameChipClass, children: [
19233
+ /* @__PURE__ */ jsx("span", { children: `${name}${isMuted ? "" : ""}` }),
19234
+ isMuted && /* @__PURE__ */ jsx("span", { className: videoTileMicIconClass, "aria-label": "Microphone muted", children: /* @__PURE__ */ jsxs(
19235
+ "svg",
19236
+ {
19237
+ xmlns: "http://www.w3.org/2000/svg",
19238
+ width: "12",
19239
+ height: "12",
19240
+ viewBox: "0 0 24 24",
19241
+ fill: "none",
19242
+ stroke: "currentColor",
19243
+ strokeWidth: "2",
19244
+ strokeLinecap: "round",
19245
+ strokeLinejoin: "round",
19246
+ "aria-hidden": "true",
19247
+ children: [
19248
+ /* @__PURE__ */ jsx("line", { x1: "2", y1: "2", x2: "22", y2: "22" }),
19249
+ /* @__PURE__ */ jsx("path", { d: "M18.89 13.23A7.12 7.12 0 0 0 19 12v-2" }),
19250
+ /* @__PURE__ */ jsx("path", { d: "M5 10v2a7 7 0 0 0 12 5" }),
19251
+ /* @__PURE__ */ jsx("path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33" }),
19252
+ /* @__PURE__ */ jsx("path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12" }),
19253
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "19", x2: "12", y2: "22" })
19254
+ ]
19255
+ }
19256
+ ) })
19257
+ ] })
19258
+ ]
19259
+ }
19260
+ );
19261
+ }
19262
+ );
19263
+ VideoTile.displayName = "VideoTile";
19264
+
19265
+ // ../video-grid/dist/index.js
19266
+ function computeGridColumns(count) {
19267
+ if (count <= 1) return 1;
19268
+ if (count <= 4) return 2;
19269
+ if (count <= 9) return 3;
19270
+ if (count <= 16) return 4;
19271
+ if (count <= 25) return 5;
19272
+ return 6;
19273
+ }
19274
+ function createVideoGrid(props = {}) {
19275
+ const { layout = "auto" } = props;
19276
+ return {
19277
+ ariaProps: {
19278
+ role: "group"
19279
+ },
19280
+ dataAttributes: {
19281
+ "data-layout": layout
19282
+ }
19283
+ };
19284
+ }
19285
+ var videoGridVariants = cva({
19286
+ base: "w-full h-full gap-2",
19287
+ variants: {
19288
+ layout: {
19289
+ grid: "grid",
19290
+ speaker: "flex flex-col",
19291
+ auto: "grid"
19292
+ }
19293
+ },
19294
+ defaultVariants: {
19295
+ layout: "auto"
19296
+ }
19297
+ });
19298
+ var videoGridSpotlightClass = "relative flex-1 min-h-0 rounded-xl overflow-hidden bg-muted";
19299
+ var videoGridFilmstripClass = "flex flex-row gap-2 overflow-x-auto py-1 shrink-0";
19300
+ var videoGridFilmstripTileClass = "w-36 shrink-0";
19301
+ var VideoGrid = React11.forwardRef(
19302
+ ({
19303
+ participants,
19304
+ layout = "auto",
19305
+ spotlightId,
19306
+ className,
19307
+ style,
19308
+ ...props
19309
+ }, ref) => {
19310
+ const count = participants.length;
19311
+ const effectiveLayout = layout === "auto" ? count <= 1 ? "speaker" : "grid" : layout;
19312
+ const api = createVideoGrid({ layout: effectiveLayout });
19313
+ const columns = computeGridColumns(count);
19314
+ const gridStyle = effectiveLayout !== "speaker" ? { gridTemplateColumns: `repeat(${columns}, 1fr)`, ...style } : { ...style };
19315
+ if (effectiveLayout === "speaker") {
19316
+ const spotlightParticipant = participants.find((p) => p.id === spotlightId) ?? participants[0];
19317
+ const filmstrip = participants.filter(
19318
+ (p) => p.id !== spotlightParticipant?.id
19319
+ );
19320
+ return /* @__PURE__ */ jsxs(
19321
+ "div",
19322
+ {
19323
+ ref,
19324
+ className: cn(videoGridVariants({ layout: "speaker" }), className),
19325
+ style,
19326
+ ...api.ariaProps,
19327
+ ...api.dataAttributes,
19328
+ ...props,
19329
+ children: [
19330
+ /* @__PURE__ */ jsx("div", { className: videoGridSpotlightClass, children: spotlightParticipant && /* @__PURE__ */ jsx(
19331
+ VideoTile,
19332
+ {
19333
+ name: spotlightParticipant.name,
19334
+ micState: spotlightParticipant.micState ?? "on",
19335
+ speaking: spotlightParticipant.speaking,
19336
+ pinned: spotlightParticipant.pinned
19337
+ },
19338
+ spotlightParticipant.id
19339
+ ) }),
19340
+ filmstrip.length > 0 && /* @__PURE__ */ jsx("div", { className: videoGridFilmstripClass, children: filmstrip.map((p) => /* @__PURE__ */ jsx("div", { className: videoGridFilmstripTileClass, children: /* @__PURE__ */ jsx(
19341
+ VideoTile,
19342
+ {
19343
+ name: p.name,
19344
+ micState: p.micState ?? "on",
19345
+ speaking: p.speaking,
19346
+ pinned: p.pinned
19347
+ }
19348
+ ) }, p.id)) })
19349
+ ]
19350
+ }
19351
+ );
19352
+ }
19353
+ return /* @__PURE__ */ jsx(
19354
+ "div",
19355
+ {
19356
+ ref,
19357
+ className: cn(videoGridVariants({ layout: effectiveLayout }), className),
19358
+ style: gridStyle,
19359
+ ...api.ariaProps,
19360
+ ...api.dataAttributes,
19361
+ ...props,
19362
+ children: participants.map((p) => /* @__PURE__ */ jsx(
19363
+ VideoTile,
19364
+ {
19365
+ name: p.name,
19366
+ micState: p.micState ?? "on",
19367
+ speaking: p.speaking,
19368
+ pinned: p.pinned
19369
+ },
19370
+ p.id
19371
+ ))
19372
+ }
19373
+ );
19374
+ }
19375
+ );
19376
+ VideoGrid.displayName = "VideoGrid";
19377
+
19378
+ // ../call-controls/dist/index.js
19379
+ function createCallControls(_props = {}) {
19380
+ const ariaProps = {
19381
+ role: "toolbar",
19382
+ "aria-label": "Call controls"
19383
+ };
19384
+ const dataAttributes = {
19385
+ "data-component": "call-controls"
19386
+ };
19387
+ return { ariaProps, dataAttributes };
19388
+ }
19389
+ var callControlsVariants = cva({
19390
+ base: [
19391
+ "inline-flex items-center justify-center gap-2",
19392
+ "rounded-xl bg-card px-4 py-3",
19393
+ "shadow-sm border border-border"
19394
+ ].join(" "),
19395
+ variants: {
19396
+ size: {
19397
+ sm: "gap-1.5 px-3 py-2",
19398
+ md: "gap-2 px-4 py-3"
19399
+ }
19400
+ },
19401
+ defaultVariants: {
19402
+ size: "md"
19403
+ }
19404
+ });
19405
+ var callControlButtonVariants = cva({
19406
+ base: [
19407
+ "inline-flex flex-col items-center justify-center rounded-full",
19408
+ "font-medium transition-colors",
19409
+ "focus-visible:outline-none focus-visible:ring-2",
19410
+ "focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
19411
+ "disabled:pointer-events-none disabled:opacity-50",
19412
+ "cursor-pointer"
19413
+ ].join(" "),
19414
+ variants: {
19415
+ size: {
19416
+ sm: "size-9 text-xs",
19417
+ md: "size-11 text-xs"
19418
+ },
19419
+ tone: {
19420
+ default: "bg-muted text-foreground hover:bg-muted/80",
19421
+ active: "bg-primary text-primary-foreground hover:bg-primary/90",
19422
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90"
19423
+ }
19424
+ },
19425
+ defaultVariants: {
19426
+ size: "md",
19427
+ tone: "default"
19428
+ }
19429
+ });
19430
+ var callControlLabelClass = "sr-only text-[10px] leading-none mt-0.5";
19431
+ var CallControlButton = React11.forwardRef(
19432
+ ({
19433
+ label,
19434
+ icon,
19435
+ tone = "default",
19436
+ pressed,
19437
+ size = "md",
19438
+ className,
19439
+ ...props
19440
+ }, ref) => {
19441
+ const ariaPressedProps = pressed !== void 0 ? { "aria-pressed": pressed } : {};
19442
+ return /* @__PURE__ */ jsxs(
19443
+ "button",
19444
+ {
19445
+ ref,
19446
+ type: "button",
19447
+ "aria-label": label,
19448
+ ...ariaPressedProps,
19449
+ className: cn(callControlButtonVariants({ tone, size }), className),
19450
+ ...props,
19451
+ children: [
19452
+ icon,
19453
+ /* @__PURE__ */ jsx("span", { className: callControlLabelClass, children: label })
19454
+ ]
19455
+ }
19456
+ );
19457
+ }
19458
+ );
19459
+ CallControlButton.displayName = "CallControlButton";
19460
+ var CallControls = React11.forwardRef(
19461
+ ({ size = "md", className, children, ...props }, ref) => {
19462
+ const api = createCallControls();
19463
+ return /* @__PURE__ */ jsx(
19464
+ "div",
19465
+ {
19466
+ ref,
19467
+ className: cn(callControlsVariants({ size }), className),
19468
+ ...api.ariaProps,
19469
+ ...api.dataAttributes,
19470
+ ...props,
19471
+ children
19472
+ }
19473
+ );
19474
+ }
19475
+ );
19476
+ CallControls.displayName = "CallControls";
19477
+
19478
+ // ../live-captions/dist/index.js
19479
+ function visibleCues(cues, maxLines = 2) {
19480
+ if (maxLines <= 0) return [];
19481
+ return cues.slice(-maxLines);
19482
+ }
19483
+ function createLiveCaptions() {
19484
+ const ariaProps = {
19485
+ role: "log",
19486
+ "aria-live": "polite",
19487
+ "aria-atomic": false
19488
+ };
19489
+ const dataAttributes = {
19490
+ "data-component": "live-captions"
19491
+ };
19492
+ return { ariaProps, dataAttributes };
19493
+ }
19494
+ var liveCaptionsVariants = cva({
19495
+ base: [
19496
+ "relative mx-auto w-full max-w-2xl rounded-xl",
19497
+ "bg-card/80 backdrop-blur-sm",
19498
+ "px-4 py-3 space-y-1"
19499
+ ].join(" "),
19500
+ variants: {
19501
+ /** Controls how the container is positioned in the layout. */
19502
+ position: {
19503
+ /** Sits in normal document flow (default). */
19504
+ static: "",
19505
+ /** Absolutely positioned — consumer places it with inset utilities. */
19506
+ absolute: "absolute"
19507
+ }
19508
+ },
19509
+ defaultVariants: {
19510
+ position: "static"
19511
+ }
19512
+ });
19513
+ var liveCaptionsCueVariants = cva({
19514
+ base: "text-sm leading-snug text-foreground",
19515
+ variants: {
19516
+ interim: {
19517
+ true: "opacity-60 italic",
19518
+ false: ""
19519
+ }
19520
+ },
19521
+ defaultVariants: {
19522
+ interim: "false"
19523
+ }
19524
+ });
19525
+ var liveCaptionsSpeakerClass = "font-medium text-muted-foreground";
19526
+ var LiveCaptions = React11.forwardRef(
19527
+ ({ cues, maxLines = 2, position = "static", className, ...props }, ref) => {
19528
+ const { ariaProps, dataAttributes } = createLiveCaptions();
19529
+ const shown = visibleCues(cues, maxLines);
19530
+ return /* @__PURE__ */ jsx(
19531
+ "div",
19532
+ {
19533
+ ref,
19534
+ className: cn(liveCaptionsVariants({ position }), className),
19535
+ ...ariaProps,
19536
+ ...dataAttributes,
19537
+ ...props,
19538
+ children: shown.map((cue) => /* @__PURE__ */ jsx(
19539
+ "p",
19540
+ {
19541
+ className: liveCaptionsCueVariants({
19542
+ interim: cue.final === false ? "true" : "false"
19543
+ }),
19544
+ children: cue.speaker ? /* @__PURE__ */ jsxs(Fragment, { children: [
19545
+ /* @__PURE__ */ jsx("span", { className: liveCaptionsSpeakerClass, children: cue.speaker }),
19546
+ `: ${cue.text}`
19547
+ ] }) : cue.text
19548
+ },
19549
+ cue.id
19550
+ ))
19551
+ }
19552
+ );
19553
+ }
19554
+ );
19555
+ LiveCaptions.displayName = "LiveCaptions";
19556
+
19557
+ // ../live-transcript/dist/index.js
19558
+ function groupConsecutiveBySpeaker(entries) {
19559
+ const blocks = [];
19560
+ for (const entry of entries) {
19561
+ const last = blocks[blocks.length - 1];
19562
+ if (last && last.speaker === entry.speaker) {
19563
+ last.texts.push(entry.text);
19564
+ } else {
19565
+ blocks.push({
19566
+ speaker: entry.speaker,
19567
+ timestamp: entry.timestamp,
19568
+ speakerColor: entry.speakerColor,
19569
+ texts: [entry.text]
19570
+ });
19571
+ }
19572
+ }
19573
+ return blocks;
19574
+ }
19575
+ function createLiveTranscript() {
19576
+ const ariaProps = {
19577
+ role: "log",
19578
+ "aria-live": "polite"
19579
+ };
19580
+ const dataAttributes = {
19581
+ "data-component": "live-transcript"
19582
+ };
19583
+ return { ariaProps, dataAttributes };
19584
+ }
19585
+ var liveTranscriptVariants = cva({
19586
+ base: "flex flex-col overflow-y-auto p-4 gap-4",
19587
+ variants: {
19588
+ compact: {
19589
+ true: "gap-2 p-3",
19590
+ false: ""
19591
+ }
19592
+ },
19593
+ defaultVariants: {
19594
+ compact: "false"
19595
+ }
19596
+ });
19597
+ var transcriptBlockVariants = cva({
19598
+ base: "flex flex-col gap-1",
19599
+ variants: {
19600
+ compact: {
19601
+ true: "gap-0.5",
19602
+ false: ""
19603
+ }
19604
+ },
19605
+ defaultVariants: {
19606
+ compact: "false"
19607
+ }
19608
+ });
19609
+ var transcriptSpeakerRowClass = "flex items-baseline gap-2";
19610
+ var transcriptSpeakerNameClass = "text-sm font-semibold text-foreground leading-snug";
19611
+ var transcriptTimestampClass = "text-xs text-muted-foreground tabular-nums";
19612
+ var transcriptTextLineClass = "text-sm text-foreground/80 leading-relaxed";
19613
+ var LiveTranscript = React11.forwardRef(({ entries, compact = false, className, ...props }, ref) => {
19614
+ const api = createLiveTranscript();
19615
+ const blocks = React11.useMemo(
19616
+ () => groupConsecutiveBySpeaker(entries),
19617
+ [entries]
19618
+ );
19619
+ const compactVariant = compact ? "true" : "false";
19620
+ return /* @__PURE__ */ jsx(
19621
+ "div",
19622
+ {
19623
+ ref,
19624
+ className: cn(liveTranscriptVariants({ compact: compactVariant }), className),
19625
+ ...api.ariaProps,
19626
+ ...api.dataAttributes,
19627
+ ...props,
19628
+ children: blocks.map((block, blockIndex) => /* @__PURE__ */ jsxs(
19629
+ "div",
19630
+ {
19631
+ className: transcriptBlockVariants({ compact: compactVariant }),
19632
+ children: [
19633
+ /* @__PURE__ */ jsxs("div", { className: transcriptSpeakerRowClass, children: [
19634
+ /* @__PURE__ */ jsx(
19635
+ "span",
19636
+ {
19637
+ className: transcriptSpeakerNameClass,
19638
+ style: block.speakerColor ? { color: block.speakerColor } : void 0,
19639
+ children: block.speaker
19640
+ }
19641
+ ),
19642
+ block.timestamp && /* @__PURE__ */ jsx("span", { className: transcriptTimestampClass, children: block.timestamp })
19643
+ ] }),
19644
+ block.texts.map((text, textIndex) => /* @__PURE__ */ jsx(
19645
+ "p",
19646
+ {
19647
+ className: transcriptTextLineClass,
19648
+ children: text
19649
+ },
19650
+ textIndex
19651
+ ))
19652
+ ]
19653
+ },
19654
+ `${block.speaker}-${blockIndex}`
19655
+ ))
19656
+ }
19657
+ );
19658
+ });
19659
+ LiveTranscript.displayName = "LiveTranscript";
19660
+
19661
+ // ../audio-room/dist/index.js
19662
+ function getInitials4(name) {
19663
+ const words = name.trim().split(/\s+/).filter((w) => /[A-Za-z]/.test(w));
19664
+ if (words.length === 0) return "";
19665
+ if (words.length === 1) return words[0][0].toUpperCase();
19666
+ return (words[0][0] + words[words.length - 1][0]).toUpperCase();
19667
+ }
19668
+ function orbColumns(count) {
19669
+ if (count <= 1) return 1;
19670
+ if (count <= 4) return 2;
19671
+ if (count <= 9) return 3;
19672
+ return 4;
19673
+ }
19674
+ function createAudioRoom() {
19675
+ return {
19676
+ ariaProps: { role: "group" },
19677
+ dataAttributes: {
19678
+ "data-component": "audio-room"
19679
+ }
19680
+ };
19681
+ }
19682
+ var audioRoomVariants = cva({
19683
+ base: "grid place-items-center gap-6 p-6 w-full",
19684
+ variants: {},
19685
+ defaultVariants: {}
19686
+ });
19687
+ var audioRoomOrbCellVariants = cva({
19688
+ base: "flex flex-col items-center gap-2",
19689
+ variants: {},
19690
+ defaultVariants: {}
19691
+ });
19692
+ var speakingOrbVariants = cva({
19693
+ base: [
19694
+ "relative inline-flex items-center justify-center",
19695
+ "size-20 rounded-full",
19696
+ "bg-muted text-muted-foreground font-semibold text-xl select-none",
19697
+ "overflow-hidden",
19698
+ "transition-shadow duration-300"
19699
+ ].join(" "),
19700
+ variants: {
19701
+ speaking: {
19702
+ true: [
19703
+ "ring-4 ring-primary ring-offset-2 ring-offset-background",
19704
+ "shadow-[0_0_0_4px_hsl(var(--primary)/0.25),0_0_16px_4px_hsl(var(--primary)/0.35)]"
19705
+ ].join(" "),
19706
+ false: "ring-2 ring-border"
19707
+ },
19708
+ muted: {
19709
+ true: "opacity-60",
19710
+ false: ""
19711
+ }
19712
+ },
19713
+ defaultVariants: {
19714
+ speaking: "false",
19715
+ muted: "false"
19716
+ }
19717
+ });
19718
+ var audioRoomNameLabelClass = "text-sm font-medium text-foreground text-center max-w-[6rem] truncate";
19719
+ var audioRoomMutedBadgeClass = [
19720
+ "absolute bottom-0 right-0",
19721
+ "inline-flex items-center justify-center",
19722
+ "size-6 rounded-full",
19723
+ "bg-destructive text-destructive-foreground",
19724
+ "text-[10px] leading-none",
19725
+ "border-2 border-background",
19726
+ "translate-x-1 translate-y-1"
19727
+ ].join(" ");
19728
+ var audioRoomHandBadgeClass = [
19729
+ "absolute top-0 right-0",
19730
+ "inline-flex items-center justify-center",
19731
+ "size-6 rounded-full",
19732
+ "bg-warning text-warning-foreground",
19733
+ "text-[12px] leading-none",
19734
+ "border-2 border-background",
19735
+ "translate-x-1 -translate-y-1"
19736
+ ].join(" ");
19737
+ var SpeakingOrb = React11.forwardRef(
19738
+ ({
19739
+ name,
19740
+ avatarUrl,
19741
+ speaking = false,
19742
+ muted = false,
19743
+ handRaised = false,
19744
+ className,
19745
+ ...props
19746
+ }, ref) => {
19747
+ const initials = getInitials4(name);
19748
+ return /* @__PURE__ */ jsxs(
19749
+ "div",
19750
+ {
19751
+ ref,
19752
+ role: "img",
19753
+ "aria-label": name,
19754
+ "data-speaking": speaking ? "true" : "false",
19755
+ "data-muted": muted ? "true" : "false",
19756
+ "data-hand-raised": handRaised ? "true" : "false",
19757
+ className: cn(
19758
+ speakingOrbVariants({
19759
+ speaking: speaking ? "true" : "false",
19760
+ muted: muted ? "true" : "false"
19761
+ }),
19762
+ className
19763
+ ),
19764
+ ...props,
19765
+ children: [
19766
+ avatarUrl ? /* @__PURE__ */ jsx(
19767
+ "img",
19768
+ {
19769
+ src: avatarUrl,
19770
+ alt: name,
19771
+ className: "absolute inset-0 size-full object-cover"
19772
+ }
19773
+ ) : /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: initials }),
19774
+ muted && /* @__PURE__ */ jsx("span", { className: audioRoomMutedBadgeClass, "aria-label": "Muted", children: "\u{1F507}" }),
19775
+ handRaised && /* @__PURE__ */ jsx("span", { className: audioRoomHandBadgeClass, "aria-label": "Hand raised", children: "\u270B" })
19776
+ ]
19777
+ }
19778
+ );
19779
+ }
19780
+ );
19781
+ SpeakingOrb.displayName = "SpeakingOrb";
19782
+ var AudioRoom = React11.forwardRef(
19783
+ ({ participants, className, ...props }, ref) => {
19784
+ const cols = orbColumns(participants.length);
19785
+ const { ariaProps, dataAttributes } = createAudioRoom();
19786
+ return /* @__PURE__ */ jsx(
19787
+ "div",
19788
+ {
19789
+ ref,
19790
+ className: cn(audioRoomVariants(), className),
19791
+ style: { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` },
19792
+ ...ariaProps,
19793
+ ...dataAttributes,
19794
+ ...props,
19795
+ children: participants.map((participant) => /* @__PURE__ */ jsxs("div", { className: audioRoomOrbCellVariants(), children: [
19796
+ /* @__PURE__ */ jsx(
19797
+ SpeakingOrb,
19798
+ {
19799
+ name: participant.name,
19800
+ avatarUrl: participant.avatarUrl,
19801
+ speaking: participant.speaking,
19802
+ muted: participant.muted,
19803
+ handRaised: participant.handRaised
19804
+ }
19805
+ ),
19806
+ /* @__PURE__ */ jsx("span", { className: audioRoomNameLabelClass, children: participant.name })
19807
+ ] }, participant.id))
19808
+ }
19809
+ );
19810
+ }
19811
+ );
19812
+ AudioRoom.displayName = "AudioRoom";
19813
+
19814
+ // ../floating-reactions/dist/index.js
19815
+ var REACTION_LIFETIME_MS = 3e3;
19816
+ function laneOffsetPercent(lane = 0, lanes = 5) {
19817
+ if (lanes <= 0) return 50;
19818
+ const clamped = Math.max(0, Math.min(lane, lanes - 1));
19819
+ const step = 100 / lanes;
19820
+ return step * clamped + step / 2;
19821
+ }
19822
+ function createFloatingReactions() {
19823
+ const ariaProps = {
19824
+ role: "status",
19825
+ "aria-live": "polite",
19826
+ "aria-label": "Reactions"
19827
+ };
19828
+ const dataAttributes = {
19829
+ "data-component": "floating-reactions"
19830
+ };
19831
+ return { ariaProps, dataAttributes };
19832
+ }
19833
+ var floatingReactionsVariants = cva({
19834
+ base: "absolute inset-0 pointer-events-none overflow-hidden",
19835
+ variants: {
19836
+ /**
19837
+ * Whether the overlay is currently active (has reactions). The parent may
19838
+ * toggle visibility, but we keep the node mounted to preserve live-region
19839
+ * semantics.
19840
+ */
19841
+ active: {
19842
+ true: "",
19843
+ false: ""
19844
+ }
19845
+ },
19846
+ defaultVariants: {
19847
+ active: "false"
19848
+ }
19849
+ });
19850
+ var floatingReactionItemClass = [
19851
+ "absolute bottom-4",
19852
+ "text-3xl leading-none select-none",
19853
+ "animate-[float-up_3s_ease-out_forwards]"
19854
+ ].join(" ");
19855
+ var floatingReactionLabelClass = "sr-only";
19856
+ var FloatingReactions = React11.forwardRef(({ reactions, lanes = 5, className, ...props }, ref) => {
19857
+ const { ariaProps, dataAttributes } = createFloatingReactions();
19858
+ return /* @__PURE__ */ jsx(
19859
+ "div",
19860
+ {
19861
+ ref,
19862
+ className: cn(floatingReactionsVariants({ active: reactions.length > 0 ? "true" : "false" }), className),
19863
+ ...ariaProps,
19864
+ ...dataAttributes,
19865
+ ...props,
19866
+ children: reactions.map((reaction) => {
19867
+ const left = laneOffsetPercent(reaction.lane ?? 0, lanes);
19868
+ return /* @__PURE__ */ jsxs(
19869
+ "span",
19870
+ {
19871
+ className: floatingReactionItemClass,
19872
+ style: { left: `${left}%` },
19873
+ "aria-hidden": "true",
19874
+ children: [
19875
+ reaction.emoji,
19876
+ /* @__PURE__ */ jsx("span", { className: floatingReactionLabelClass, children: reaction.emoji })
19877
+ ]
19878
+ },
19879
+ reaction.id
19880
+ );
19881
+ })
19882
+ }
19883
+ );
19884
+ });
19885
+ FloatingReactions.displayName = "FloatingReactions";
19886
+ function ReactionBurst({ emoji, lane = 0, lanes = 5 }) {
19887
+ const left = laneOffsetPercent(lane, lanes);
19888
+ return /* @__PURE__ */ jsxs(
19889
+ "span",
19890
+ {
19891
+ className: floatingReactionItemClass,
19892
+ style: { left: `${left}%` },
19893
+ "aria-hidden": "true",
19894
+ children: [
19895
+ emoji,
19896
+ /* @__PURE__ */ jsx("span", { className: floatingReactionLabelClass, children: emoji })
19897
+ ]
19898
+ }
19899
+ );
19900
+ }
19901
+ function useFloatingReactions() {
19902
+ const [reactions, setReactions] = React11.useState([]);
19903
+ const counter = React11.useRef(0);
19904
+ const emit = React11.useCallback(
19905
+ (emoji, options = {}) => {
19906
+ counter.current += 1;
19907
+ const id = options.id ?? `fr-${counter.current}`;
19908
+ const lane = options.lane;
19909
+ const reaction = { id, emoji, lane };
19910
+ setReactions((prev) => [...prev, reaction]);
19911
+ setTimeout(() => {
19912
+ setReactions((prev) => prev.filter((r) => r.id !== id));
19913
+ }, REACTION_LIFETIME_MS);
19914
+ },
19915
+ []
19916
+ );
19917
+ const clear = React11.useCallback(() => {
19918
+ setReactions([]);
19919
+ }, []);
19920
+ return { reactions, emit, clear };
19921
+ }
19922
+
19923
+ // ../pre-call-lobby/dist/index.js
19924
+ function createPreCallLobby(props) {
19925
+ const { cameraOn, micOn } = props;
19926
+ return {
19927
+ ariaProps: {
19928
+ role: "group",
19929
+ "aria-label": "Device setup"
19930
+ },
19931
+ dataAttributes: {
19932
+ "data-camera": cameraOn ? "on" : "off",
19933
+ "data-mic": micOn ? "on" : "off"
19934
+ }
19935
+ };
19936
+ }
19937
+ function micLevelToBars(level, barCount) {
19938
+ if (barCount <= 0) return 0;
19939
+ const clamped = Math.min(1, Math.max(0, level));
19940
+ return Math.round(clamped * barCount);
19941
+ }
19942
+ var preCallLobbyVariants = cva({
19943
+ base: [
19944
+ "flex flex-col gap-6 rounded-2xl border border-border bg-card p-6 shadow-sm",
19945
+ "w-full max-w-lg mx-auto"
19946
+ ].join(" "),
19947
+ variants: {},
19948
+ defaultVariants: {}
19949
+ });
19950
+ var preCallCameraVariants = cva({
19951
+ base: [
19952
+ "relative flex items-center justify-center overflow-hidden rounded-xl",
19953
+ "aspect-video w-full bg-muted"
19954
+ ].join(" "),
19955
+ variants: {
19956
+ camera: {
19957
+ on: "",
19958
+ off: "bg-muted"
19959
+ }
19960
+ },
19961
+ defaultVariants: {
19962
+ camera: "on"
19963
+ }
19964
+ });
19965
+ var preCallCameraPlaceholderClass = [
19966
+ "flex flex-col items-center justify-center gap-2",
19967
+ "text-muted-foreground select-none"
19968
+ ].join(" ");
19969
+ var preCallDeviceRowClass = "flex flex-col gap-1";
19970
+ var preCallDeviceLabelClass = "text-xs font-medium text-muted-foreground";
19971
+ var preCallDeviceSelectClass = [
19972
+ "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1",
19973
+ "text-sm text-foreground shadow-sm",
19974
+ "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
19975
+ "disabled:cursor-not-allowed disabled:opacity-50"
19976
+ ].join(" ");
19977
+ var preCallMicMeterClass = "flex items-end gap-0.5 h-5";
19978
+ var preCallMicBarVariants = cva({
19979
+ base: "w-1.5 rounded-sm transition-colors",
19980
+ variants: {
19981
+ lit: {
19982
+ true: "bg-primary",
19983
+ false: "bg-muted-foreground/30"
19984
+ }
19985
+ },
19986
+ defaultVariants: {
19987
+ lit: "false"
19988
+ }
19989
+ });
19990
+ var preCallControlsRowClass = "flex items-center gap-3";
19991
+ var preCallToggleVariants = cva({
19992
+ base: [
19993
+ "inline-flex items-center justify-center rounded-full p-2.5",
19994
+ "transition-colors focus-visible:outline-none focus-visible:ring-2",
19995
+ "focus-visible:ring-ring focus-visible:ring-offset-2"
19996
+ ].join(" "),
19997
+ variants: {
19998
+ active: {
19999
+ true: "bg-primary text-primary-foreground hover:bg-primary/90",
20000
+ false: "bg-destructive/10 text-destructive hover:bg-destructive/20"
20001
+ }
20002
+ },
20003
+ defaultVariants: {
20004
+ active: "false"
20005
+ }
20006
+ });
20007
+ var preCallJoinButtonClass = [
20008
+ "inline-flex w-full items-center justify-center rounded-lg px-4 py-2.5",
20009
+ "bg-primary text-primary-foreground text-sm font-semibold",
20010
+ "shadow transition-colors hover:bg-primary/90",
20011
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
20012
+ "disabled:pointer-events-none disabled:opacity-50"
20013
+ ].join(" ");
20014
+ var MIC_BAR_COUNT = 8;
20015
+ var PreCallLobby = React11.forwardRef(
20016
+ ({
20017
+ cameraOn,
20018
+ micOn,
20019
+ onToggleCamera,
20020
+ onToggleMic,
20021
+ micLevel = 0,
20022
+ cameras = [],
20023
+ microphones = [],
20024
+ speakers = [],
20025
+ selectedCamera,
20026
+ selectedMicrophone,
20027
+ selectedSpeaker,
20028
+ onDeviceChange,
20029
+ previewSlot,
20030
+ joinLabel = "Join",
20031
+ onJoin,
20032
+ className,
20033
+ ...props
20034
+ }, ref) => {
20035
+ const api = createPreCallLobby({ cameraOn, micOn });
20036
+ const litBars = micLevelToBars(micLevel, MIC_BAR_COUNT);
20037
+ return /* @__PURE__ */ jsxs(
20038
+ "div",
20039
+ {
20040
+ ref,
20041
+ className: cn(preCallLobbyVariants(), className),
20042
+ ...api.ariaProps,
20043
+ ...api.dataAttributes,
20044
+ ...props,
20045
+ children: [
20046
+ /* @__PURE__ */ jsx("div", { className: preCallCameraVariants({ camera: cameraOn ? "on" : "off" }), children: cameraOn && previewSlot ? previewSlot : /* @__PURE__ */ jsxs("div", { className: preCallCameraPlaceholderClass, "data-testid": "camera-off-placeholder", children: [
20047
+ /* @__PURE__ */ jsxs(
20048
+ "svg",
20049
+ {
20050
+ xmlns: "http://www.w3.org/2000/svg",
20051
+ width: "40",
20052
+ height: "40",
20053
+ viewBox: "0 0 24 24",
20054
+ fill: "none",
20055
+ stroke: "currentColor",
20056
+ strokeWidth: "1.5",
20057
+ strokeLinecap: "round",
20058
+ strokeLinejoin: "round",
20059
+ "aria-hidden": "true",
20060
+ children: [
20061
+ /* @__PURE__ */ jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
20062
+ /* @__PURE__ */ jsx("circle", { cx: "9", cy: "7", r: "4" }),
20063
+ /* @__PURE__ */ jsx("line", { x1: "2", y1: "2", x2: "22", y2: "22" })
20064
+ ]
20065
+ }
20066
+ ),
20067
+ /* @__PURE__ */ jsx("span", { className: "text-xs", children: "Camera is off" })
20068
+ ] }) }),
20069
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
20070
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Mic" }),
20071
+ /* @__PURE__ */ jsx("div", { className: preCallMicMeterClass, "aria-label": `Mic level: ${litBars} of ${MIC_BAR_COUNT}`, children: Array.from({ length: MIC_BAR_COUNT }, (_, i) => /* @__PURE__ */ jsx(
20072
+ "div",
20073
+ {
20074
+ "data-testid": `mic-bar-${i}`,
20075
+ "data-lit": i < litBars ? "true" : "false",
20076
+ className: `${preCallMicBarVariants({ lit: i < litBars ? "true" : "false" })} ${/* Staggered heights for a visual meter effect */
20077
+ i < 2 ? "h-2" : i < 4 ? "h-3" : i < 6 ? "h-4" : "h-5"}`
20078
+ },
20079
+ i
20080
+ )) })
20081
+ ] }),
20082
+ cameras.length > 0 && /* @__PURE__ */ jsxs("div", { className: preCallDeviceRowClass, children: [
20083
+ /* @__PURE__ */ jsx("label", { htmlFor: "pcl-camera-select", className: preCallDeviceLabelClass, children: "Camera" }),
20084
+ /* @__PURE__ */ jsx(
20085
+ "select",
20086
+ {
20087
+ id: "pcl-camera-select",
20088
+ className: preCallDeviceSelectClass,
20089
+ value: selectedCamera,
20090
+ onChange: (e) => onDeviceChange?.("camera", e.target.value),
20091
+ "data-testid": "camera-select",
20092
+ children: cameras.map((d) => /* @__PURE__ */ jsx("option", { value: d.id, children: d.label }, d.id))
20093
+ }
20094
+ )
20095
+ ] }),
20096
+ microphones.length > 0 && /* @__PURE__ */ jsxs("div", { className: preCallDeviceRowClass, children: [
20097
+ /* @__PURE__ */ jsx("label", { htmlFor: "pcl-mic-select", className: preCallDeviceLabelClass, children: "Microphone" }),
20098
+ /* @__PURE__ */ jsx(
20099
+ "select",
20100
+ {
20101
+ id: "pcl-mic-select",
20102
+ className: preCallDeviceSelectClass,
20103
+ value: selectedMicrophone,
20104
+ onChange: (e) => onDeviceChange?.("microphone", e.target.value),
20105
+ "data-testid": "microphone-select",
20106
+ children: microphones.map((d) => /* @__PURE__ */ jsx("option", { value: d.id, children: d.label }, d.id))
20107
+ }
20108
+ )
20109
+ ] }),
20110
+ speakers.length > 0 && /* @__PURE__ */ jsxs("div", { className: preCallDeviceRowClass, children: [
20111
+ /* @__PURE__ */ jsx("label", { htmlFor: "pcl-speaker-select", className: preCallDeviceLabelClass, children: "Speaker" }),
20112
+ /* @__PURE__ */ jsx(
20113
+ "select",
20114
+ {
20115
+ id: "pcl-speaker-select",
20116
+ className: preCallDeviceSelectClass,
20117
+ value: selectedSpeaker,
20118
+ onChange: (e) => onDeviceChange?.("speaker", e.target.value),
20119
+ "data-testid": "speaker-select",
20120
+ children: speakers.map((d) => /* @__PURE__ */ jsx("option", { value: d.id, children: d.label }, d.id))
20121
+ }
20122
+ )
20123
+ ] }),
20124
+ /* @__PURE__ */ jsxs("div", { className: preCallControlsRowClass, children: [
20125
+ /* @__PURE__ */ jsx(
20126
+ "button",
20127
+ {
20128
+ type: "button",
20129
+ "aria-label": cameraOn ? "Turn camera off" : "Turn camera on",
20130
+ "aria-pressed": cameraOn,
20131
+ className: preCallToggleVariants({ active: cameraOn ? "true" : "false" }),
20132
+ onClick: onToggleCamera,
20133
+ "data-testid": "camera-toggle",
20134
+ children: /* @__PURE__ */ jsx(
20135
+ "svg",
20136
+ {
20137
+ xmlns: "http://www.w3.org/2000/svg",
20138
+ width: "18",
20139
+ height: "18",
20140
+ viewBox: "0 0 24 24",
20141
+ fill: "none",
20142
+ stroke: "currentColor",
20143
+ strokeWidth: "2",
20144
+ strokeLinecap: "round",
20145
+ strokeLinejoin: "round",
20146
+ "aria-hidden": "true",
20147
+ children: cameraOn ? /* @__PURE__ */ jsxs(Fragment, { children: [
20148
+ /* @__PURE__ */ jsx("path", { d: "M23 7l-7 5 7 5V7z" }),
20149
+ /* @__PURE__ */ jsx("rect", { x: "1", y: "5", width: "15", height: "14", rx: "2", ry: "2" })
20150
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
20151
+ /* @__PURE__ */ jsx("line", { x1: "2", y1: "2", x2: "22", y2: "22" }),
20152
+ /* @__PURE__ */ jsx("path", { d: "M10.66 6H14a2 2 0 0 1 2 2v2.34l1 1L23 7v10" }),
20153
+ /* @__PURE__ */ jsx("path", { d: "M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2l10 10z" })
20154
+ ] })
20155
+ }
20156
+ )
20157
+ }
20158
+ ),
20159
+ /* @__PURE__ */ jsx(
20160
+ "button",
20161
+ {
20162
+ type: "button",
20163
+ "aria-label": micOn ? "Mute microphone" : "Unmute microphone",
20164
+ "aria-pressed": micOn,
20165
+ className: preCallToggleVariants({ active: micOn ? "true" : "false" }),
20166
+ onClick: onToggleMic,
20167
+ "data-testid": "mic-toggle",
20168
+ children: /* @__PURE__ */ jsx(
20169
+ "svg",
20170
+ {
20171
+ xmlns: "http://www.w3.org/2000/svg",
20172
+ width: "18",
20173
+ height: "18",
20174
+ viewBox: "0 0 24 24",
20175
+ fill: "none",
20176
+ stroke: "currentColor",
20177
+ strokeWidth: "2",
20178
+ strokeLinecap: "round",
20179
+ strokeLinejoin: "round",
20180
+ "aria-hidden": "true",
20181
+ children: micOn ? /* @__PURE__ */ jsxs(Fragment, { children: [
20182
+ /* @__PURE__ */ jsx("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
20183
+ /* @__PURE__ */ jsx("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
20184
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "19", x2: "12", y2: "23" }),
20185
+ /* @__PURE__ */ jsx("line", { x1: "8", y1: "23", x2: "16", y2: "23" })
20186
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
20187
+ /* @__PURE__ */ jsx("line", { x1: "2", y1: "2", x2: "22", y2: "22" }),
20188
+ /* @__PURE__ */ jsx("path", { d: "M18.89 13.23A7.12 7.12 0 0 0 19 12v-2" }),
20189
+ /* @__PURE__ */ jsx("path", { d: "M5 10v2a7 7 0 0 0 12 5" }),
20190
+ /* @__PURE__ */ jsx("path", { d: "M15 9.34V4a3 3 0 0 0-5.68-1.33" }),
20191
+ /* @__PURE__ */ jsx("path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12" }),
20192
+ /* @__PURE__ */ jsx("line", { x1: "12", y1: "19", x2: "12", y2: "23" }),
20193
+ /* @__PURE__ */ jsx("line", { x1: "8", y1: "23", x2: "16", y2: "23" })
20194
+ ] })
20195
+ }
20196
+ )
20197
+ }
20198
+ )
20199
+ ] }),
20200
+ /* @__PURE__ */ jsx(
20201
+ "button",
20202
+ {
20203
+ type: "button",
20204
+ className: preCallJoinButtonClass,
20205
+ onClick: onJoin,
20206
+ "data-testid": "join-button",
20207
+ children: joinLabel
20208
+ }
20209
+ )
20210
+ ]
20211
+ }
20212
+ );
20213
+ }
20214
+ );
20215
+ PreCallLobby.displayName = "PreCallLobby";
20216
+
20217
+ // ../infinite-canvas/dist/index.js
20218
+ function clampZoom(zoom, min = 0.25, max = 4) {
20219
+ return Math.min(Math.max(zoom, min), max);
20220
+ }
20221
+ function fitTransform(bounds, viewportW, viewportH, padding = 32) {
20222
+ const contentW = bounds.maxX - bounds.minX;
20223
+ const contentH = bounds.maxY - bounds.minY;
20224
+ if (contentW <= 0 || contentH <= 0 || viewportW <= 0 || viewportH <= 0) {
20225
+ return { zoom: 1, x: 0, y: 0 };
20226
+ }
20227
+ const availW = viewportW - padding * 2;
20228
+ const availH = viewportH - padding * 2;
20229
+ const rawZoom = Math.min(availW / contentW, availH / contentH);
20230
+ const zoom = clampZoom(rawZoom);
20231
+ const scaledW = contentW * zoom;
20232
+ const scaledH = contentH * zoom;
20233
+ const x = (viewportW - scaledW) / 2 - bounds.minX * zoom;
20234
+ const y = (viewportH - scaledH) / 2 - bounds.minY * zoom;
20235
+ return { zoom, x, y };
20236
+ }
20237
+ function transformToCss(t) {
20238
+ return `translate(${t.x}px, ${t.y}px) scale(${t.zoom})`;
20239
+ }
20240
+ function createInfiniteCanvas(options = {}) {
20241
+ const { zoom = 1 } = options;
20242
+ return {
20243
+ ariaProps: {
20244
+ role: "group",
20245
+ "aria-label": "Canvas"
20246
+ },
20247
+ dataAttributes: {
20248
+ "data-zoom": zoom
20249
+ }
20250
+ };
20251
+ }
20252
+ var infiniteCanvasVariants = cva({
20253
+ base: "relative overflow-hidden bg-background",
20254
+ variants: {
20255
+ grid: {
20256
+ "true": [
20257
+ "bg-[radial-gradient(circle,hsl(var(--border))_1px,transparent_1px)]",
20258
+ "[background-size:24px_24px]"
20259
+ ].join(" "),
20260
+ "false": ""
20261
+ }
20262
+ },
20263
+ defaultVariants: {
20264
+ grid: "false"
20265
+ }
20266
+ });
20267
+ var canvasContentClass = "absolute inset-0 origin-top-left will-change-transform";
20268
+ var canvasControlsClass = "absolute bottom-4 right-4 z-10 flex items-center gap-1";
20269
+ var canvasZoomButtonVariants = cva({
20270
+ base: [
20271
+ "inline-flex h-8 w-8 items-center justify-center rounded-md border border-border",
20272
+ "bg-card text-foreground text-sm font-medium",
20273
+ "hover:bg-muted transition-colors",
20274
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
20275
+ "disabled:pointer-events-none disabled:opacity-50"
20276
+ ].join(" "),
20277
+ variants: {},
20278
+ defaultVariants: {}
20279
+ });
20280
+ var InfiniteCanvas = React11.forwardRef(
20281
+ ({
20282
+ zoom: zoomProp,
20283
+ x: xProp,
20284
+ y: yProp,
20285
+ pan = true,
20286
+ minZoom = 0.25,
20287
+ maxZoom = 4,
20288
+ showGrid = false,
20289
+ showControls = false,
20290
+ onTransformChange,
20291
+ contentBounds: contentBounds2,
20292
+ className,
20293
+ children,
20294
+ ...props
20295
+ }, ref) => {
20296
+ const isControlled = zoomProp !== void 0 || xProp !== void 0 || yProp !== void 0;
20297
+ const [internal, setInternal] = React11.useState({
20298
+ zoom: 1,
20299
+ x: 0,
20300
+ y: 0
20301
+ });
20302
+ const transform = isControlled ? { zoom: zoomProp ?? 1, x: xProp ?? 0, y: yProp ?? 0 } : internal;
20303
+ const containerRef = React11.useRef(null);
20304
+ const dragging = React11.useRef(false);
20305
+ const dragStart = React11.useRef({ px: 0, py: 0, tx: 0, ty: 0 });
20306
+ const applyTransform = React11.useCallback(
20307
+ (next) => {
20308
+ if (!isControlled) setInternal(next);
20309
+ onTransformChange?.(next);
20310
+ },
20311
+ [isControlled, onTransformChange]
20312
+ );
20313
+ React11.useEffect(() => {
20314
+ const el = containerRef.current;
20315
+ if (!el) return;
20316
+ const onWheel = (e) => {
20317
+ e.preventDefault();
20318
+ setInternal((prev) => {
20319
+ const delta = -e.deltaY * 1e-3;
20320
+ const next = {
20321
+ ...prev,
20322
+ zoom: clampZoom(prev.zoom + prev.zoom * delta, minZoom, maxZoom)
20323
+ };
20324
+ onTransformChange?.(next);
20325
+ return next;
20326
+ });
20327
+ };
20328
+ el.addEventListener("wheel", onWheel, { passive: false });
20329
+ return () => el.removeEventListener("wheel", onWheel);
20330
+ }, [minZoom, maxZoom, onTransformChange]);
20331
+ React11.useEffect(() => {
20332
+ if (!pan || isControlled) return;
20333
+ const el = containerRef.current;
20334
+ if (!el) return;
20335
+ const onPointerDown = (e) => {
20336
+ dragging.current = true;
20337
+ dragStart.current = {
20338
+ px: e.clientX,
20339
+ py: e.clientY,
20340
+ tx: internal.x,
20341
+ ty: internal.y
20342
+ };
20343
+ el.setPointerCapture(e.pointerId);
20344
+ };
20345
+ const onPointerMove = (e) => {
20346
+ if (!dragging.current) return;
20347
+ const dx = e.clientX - dragStart.current.px;
20348
+ const dy = e.clientY - dragStart.current.py;
20349
+ setInternal((prev) => {
20350
+ const next = {
20351
+ ...prev,
20352
+ x: dragStart.current.tx + dx,
20353
+ y: dragStart.current.ty + dy
20354
+ };
20355
+ onTransformChange?.(next);
20356
+ return next;
20357
+ });
20358
+ };
20359
+ const onPointerUp = () => {
20360
+ dragging.current = false;
20361
+ };
20362
+ el.addEventListener("pointerdown", onPointerDown);
20363
+ el.addEventListener("pointermove", onPointerMove);
20364
+ el.addEventListener("pointerup", onPointerUp);
20365
+ el.addEventListener("pointercancel", onPointerUp);
20366
+ return () => {
20367
+ el.removeEventListener("pointerdown", onPointerDown);
20368
+ el.removeEventListener("pointermove", onPointerMove);
20369
+ el.removeEventListener("pointerup", onPointerUp);
20370
+ el.removeEventListener("pointercancel", onPointerUp);
20371
+ };
20372
+ }, [pan, isControlled, onTransformChange, internal.x, internal.y]);
20373
+ const handleZoomIn = () => {
20374
+ const next = { ...transform, zoom: clampZoom(transform.zoom * 1.25, minZoom, maxZoom) };
20375
+ applyTransform(next);
20376
+ };
20377
+ const handleZoomOut = () => {
20378
+ const next = { ...transform, zoom: clampZoom(transform.zoom / 1.25, minZoom, maxZoom) };
20379
+ applyTransform(next);
20380
+ };
20381
+ const handleFit = () => {
20382
+ const el = containerRef.current;
20383
+ if (!el) return;
20384
+ const { width, height } = el.getBoundingClientRect();
20385
+ const bounds = contentBounds2 ?? { minX: 0, minY: 0, maxX: width, maxY: height };
20386
+ applyTransform(fitTransform(bounds, width, height));
20387
+ };
20388
+ const api = createInfiniteCanvas({ zoom: transform.zoom });
20389
+ const setRefs = (node) => {
20390
+ containerRef.current = node;
20391
+ if (typeof ref === "function") ref(node);
20392
+ else if (ref) ref.current = node;
20393
+ };
20394
+ return /* @__PURE__ */ jsxs(
20395
+ "div",
20396
+ {
20397
+ ref: setRefs,
20398
+ className: cn(
20399
+ infiniteCanvasVariants({ grid: showGrid ? "true" : "false" }),
20400
+ className
20401
+ ),
20402
+ ...api.ariaProps,
20403
+ ...api.dataAttributes,
20404
+ ...props,
20405
+ children: [
20406
+ /* @__PURE__ */ jsx(
20407
+ "div",
20408
+ {
20409
+ className: canvasContentClass,
20410
+ style: { transform: transformToCss(transform), transformOrigin: "0 0" },
20411
+ children
20412
+ }
20413
+ ),
20414
+ showControls && /* @__PURE__ */ jsxs("div", { className: canvasControlsClass, "aria-label": "Zoom controls", children: [
20415
+ /* @__PURE__ */ jsx(
20416
+ "button",
20417
+ {
20418
+ type: "button",
20419
+ className: canvasZoomButtonVariants(),
20420
+ "aria-label": "Zoom in",
20421
+ onClick: handleZoomIn,
20422
+ children: "+"
20423
+ }
20424
+ ),
20425
+ /* @__PURE__ */ jsx(
20426
+ "button",
20427
+ {
20428
+ type: "button",
20429
+ className: canvasZoomButtonVariants(),
20430
+ "aria-label": "Zoom out",
20431
+ onClick: handleZoomOut,
20432
+ children: "\u2212"
20433
+ }
20434
+ ),
20435
+ /* @__PURE__ */ jsx(
20436
+ "button",
20437
+ {
20438
+ type: "button",
20439
+ className: canvasZoomButtonVariants(),
20440
+ "aria-label": "Fit to content",
20441
+ onClick: handleFit,
20442
+ children: "\u229E"
20443
+ }
20444
+ )
20445
+ ] })
20446
+ ]
20447
+ }
20448
+ );
20449
+ }
20450
+ );
20451
+ InfiniteCanvas.displayName = "InfiniteCanvas";
20452
+
20453
+ // ../sticky-note/dist/index.js
20454
+ var STICKY_NOTE_COLORS = [
20455
+ "yellow",
20456
+ "pink",
20457
+ "blue",
20458
+ "green",
20459
+ "purple",
20460
+ "orange"
20461
+ ];
20462
+ function nextStickyColor(color) {
20463
+ const index = STICKY_NOTE_COLORS.indexOf(color);
20464
+ const next = (index + 1) % STICKY_NOTE_COLORS.length;
20465
+ return STICKY_NOTE_COLORS[next];
20466
+ }
20467
+ function createStickyNote(options) {
20468
+ return {
20469
+ dataAttributes: { "data-color": options.color },
20470
+ ariaProps: { role: "group" }
20471
+ };
20472
+ }
20473
+ var stickyNoteVariants = cva({
20474
+ base: [
20475
+ "relative inline-flex flex-col gap-2 rounded-md p-4",
20476
+ "shadow-md",
20477
+ "min-w-[160px] min-h-[120px]"
20478
+ ].join(" "),
20479
+ variants: {
20480
+ color: {
20481
+ yellow: "bg-yellow-100 text-yellow-900",
20482
+ pink: "bg-pink-100 text-pink-900",
20483
+ blue: "bg-blue-100 text-blue-900",
20484
+ green: "bg-green-100 text-green-900",
20485
+ purple: "bg-purple-100 text-purple-900",
20486
+ orange: "bg-orange-100 text-orange-900"
20487
+ }
20488
+ },
20489
+ defaultVariants: {
20490
+ color: "yellow"
20491
+ }
20492
+ });
20493
+ var stickyNoteTextClass = "flex-1 w-full resize-none bg-transparent text-sm leading-relaxed placeholder:opacity-60 outline-none";
20494
+ var stickyNoteAuthorClass = "mt-auto text-xs font-medium opacity-70 truncate";
20495
+ var StickyNote = React11.forwardRef(
20496
+ ({
20497
+ color = "yellow",
20498
+ text,
20499
+ onTextChange,
20500
+ author,
20501
+ x,
20502
+ y,
20503
+ draggable = false,
20504
+ onMove,
20505
+ className,
20506
+ style,
20507
+ children,
20508
+ ...props
20509
+ }, ref) => {
20510
+ const { ariaProps, dataAttributes } = createStickyNote({ color });
20511
+ const dragOrigin = React11.useRef(null);
20512
+ const positionStyle = x !== void 0 && y !== void 0 ? { position: "absolute", left: x, top: y } : {};
20513
+ const handlePointerDown = React11.useCallback(
20514
+ (e) => {
20515
+ if (!draggable || !onMove) return;
20516
+ if (e.button !== 0) return;
20517
+ e.currentTarget.setPointerCapture(e.pointerId);
20518
+ dragOrigin.current = {
20519
+ pointerX: e.clientX,
20520
+ pointerY: e.clientY,
20521
+ noteX: x ?? 0,
20522
+ noteY: y ?? 0
20523
+ };
20524
+ },
20525
+ [draggable, onMove, x, y]
20526
+ );
20527
+ const handlePointerMove = React11.useCallback(
20528
+ (e) => {
20529
+ if (!dragOrigin.current || !onMove) return;
20530
+ const dx = e.clientX - dragOrigin.current.pointerX;
20531
+ const dy = e.clientY - dragOrigin.current.pointerY;
20532
+ onMove({ x: dragOrigin.current.noteX + dx, y: dragOrigin.current.noteY + dy });
20533
+ },
20534
+ [onMove]
20535
+ );
20536
+ const handlePointerUp = React11.useCallback(() => {
20537
+ dragOrigin.current = null;
20538
+ }, []);
20539
+ return /* @__PURE__ */ jsxs(
20540
+ "div",
20541
+ {
20542
+ ref,
20543
+ className: cn(stickyNoteVariants({ color }), className),
20544
+ style: { ...positionStyle, ...style },
20545
+ ...ariaProps,
20546
+ ...dataAttributes,
20547
+ onPointerDown: draggable && onMove ? handlePointerDown : void 0,
20548
+ onPointerMove: draggable && onMove ? handlePointerMove : void 0,
20549
+ onPointerUp: draggable && onMove ? handlePointerUp : void 0,
20550
+ ...props,
20551
+ children: [
20552
+ onTextChange != null ? /* @__PURE__ */ jsx(
20553
+ "textarea",
20554
+ {
20555
+ className: stickyNoteTextClass,
20556
+ value: text ?? "",
20557
+ onChange: (e) => onTextChange(e.target.value),
20558
+ placeholder: "Type a note\u2026"
20559
+ }
20560
+ ) : /* @__PURE__ */ jsx("p", { className: `${stickyNoteTextClass} whitespace-pre-wrap`, children: text ?? children }),
20561
+ author != null && /* @__PURE__ */ jsx("span", { className: stickyNoteAuthorClass, children: author })
20562
+ ]
20563
+ }
20564
+ );
20565
+ }
20566
+ );
20567
+ StickyNote.displayName = "StickyNote";
20568
+
20569
+ // ../flow-editor/dist/index.js
20570
+ var DEFAULT_NODE_WIDTH = 160;
20571
+ var DEFAULT_NODE_HEIGHT = 48;
20572
+ function nodeById(nodes, id) {
20573
+ return nodes.find((n) => n.id === id);
20574
+ }
20575
+ function edgePath(source, target) {
20576
+ const sw = source.width ?? DEFAULT_NODE_WIDTH;
20577
+ const sh = source.height ?? DEFAULT_NODE_HEIGHT;
20578
+ const th = target.height ?? DEFAULT_NODE_HEIGHT;
20579
+ const x1 = source.x + sw;
20580
+ const y1 = source.y + sh / 2;
20581
+ const x2 = target.x;
20582
+ const y2 = target.y + th / 2;
20583
+ const dx = Math.abs(x2 - x1);
20584
+ const handleLen = Math.max(dx * 0.5, 40);
20585
+ const cx1 = x1 + handleLen;
20586
+ const cy1 = y1;
20587
+ const cx2 = x2 - handleLen;
20588
+ const cy2 = y2;
20589
+ return `M ${x1} ${y1} C ${cx1} ${cy1}, ${cx2} ${cy2}, ${x2} ${y2}`;
20590
+ }
20591
+ function createFlowEditor() {
20592
+ return {
20593
+ ariaProps: {
20594
+ role: "group",
20595
+ "aria-label": "Flow editor"
20596
+ },
20597
+ dataAttributes: {
20598
+ "data-flow-editor": "true"
20599
+ }
20600
+ };
20601
+ }
20602
+ var flowEditorVariants = cva({
20603
+ base: "relative w-full overflow-hidden bg-background border border-border rounded-lg",
20604
+ variants: {
20605
+ size: {
20606
+ sm: "h-64",
20607
+ md: "h-96",
20608
+ lg: "h-[32rem]"
20609
+ }
20610
+ },
20611
+ defaultVariants: {
20612
+ size: "md"
20613
+ }
20614
+ });
20615
+ var flowNodeVariants = cva({
20616
+ base: [
20617
+ "absolute flex items-center justify-center rounded-md border",
20618
+ "bg-card border-border text-card-foreground text-sm font-medium",
20619
+ "cursor-pointer select-none transition-shadow",
20620
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
20621
+ ].join(" "),
20622
+ variants: {
20623
+ selected: {
20624
+ true: "ring-2 ring-ring ring-primary shadow-md",
20625
+ false: "hover:border-primary/50 hover:shadow-sm"
20626
+ }
20627
+ },
20628
+ defaultVariants: {
20629
+ selected: "false"
20630
+ }
20631
+ });
20632
+ var flowNodeLabelClass = "px-3 py-2 truncate pointer-events-none";
20633
+ var flowEdgePathClass = "fill-none stroke-current stroke-2 transition-opacity";
20634
+ var flowEdgeLabelClass = "text-xs fill-muted-foreground select-none pointer-events-none";
20635
+ var FlowEditor = React11.forwardRef(
20636
+ ({
20637
+ nodes,
20638
+ edges,
20639
+ onNodeClick,
20640
+ onNodeMove,
20641
+ renderNode,
20642
+ selectedId,
20643
+ showGrid = true,
20644
+ showControls = true,
20645
+ className,
20646
+ ...props
20647
+ }, ref) => {
20648
+ const api = createFlowEditor();
20649
+ const dragRef = React11.useRef(null);
20650
+ const handlePointerDown = React11.useCallback(
20651
+ (event, node) => {
20652
+ if (!onNodeMove) return;
20653
+ event.currentTarget.setPointerCapture(event.pointerId);
20654
+ dragRef.current = {
20655
+ id: node.id,
20656
+ startPointerX: event.clientX,
20657
+ startPointerY: event.clientY,
20658
+ startNodeX: node.x,
20659
+ startNodeY: node.y
20660
+ };
20661
+ },
20662
+ [onNodeMove]
20663
+ );
20664
+ const handlePointerMove = React11.useCallback(
20665
+ (event) => {
20666
+ const drag = dragRef.current;
20667
+ if (!drag || !onNodeMove) return;
20668
+ const dx = event.clientX - drag.startPointerX;
20669
+ const dy = event.clientY - drag.startPointerY;
20670
+ onNodeMove(drag.id, drag.startNodeX + dx, drag.startNodeY + dy);
20671
+ },
20672
+ [onNodeMove]
20673
+ );
20674
+ const handlePointerUp = React11.useCallback(() => {
20675
+ dragRef.current = null;
20676
+ }, []);
20677
+ return /* @__PURE__ */ jsx(
20678
+ "div",
20679
+ {
20680
+ ref,
20681
+ className: cn(flowEditorVariants(), className),
20682
+ ...api.ariaProps,
20683
+ ...api.dataAttributes,
20684
+ ...props,
20685
+ children: /* @__PURE__ */ jsxs(InfiniteCanvas, { showGrid, showControls, children: [
20686
+ /* @__PURE__ */ jsx(
20687
+ "svg",
20688
+ {
20689
+ className: "absolute inset-0 w-full h-full overflow-visible text-muted-foreground pointer-events-none",
20690
+ "aria-hidden": "true",
20691
+ children: edges.map((edge) => {
20692
+ const src = nodeById(nodes, edge.source);
20693
+ const tgt = nodeById(nodes, edge.target);
20694
+ if (!src || !tgt) return null;
20695
+ const d = edgePath(src, tgt);
20696
+ const midX = (src.x + (src.width ?? 160) + tgt.x) / 2;
20697
+ const midY = (src.y + (src.height ?? 48) / 2 + tgt.y + (tgt.height ?? 48) / 2) / 2;
20698
+ return /* @__PURE__ */ jsxs("g", { children: [
20699
+ /* @__PURE__ */ jsx("path", { d, className: flowEdgePathClass }),
20700
+ edge.label != null && /* @__PURE__ */ jsx(
20701
+ "text",
20702
+ {
20703
+ x: midX,
20704
+ y: midY - 4,
20705
+ textAnchor: "middle",
20706
+ className: flowEdgeLabelClass,
20707
+ children: edge.label
20708
+ }
20709
+ )
20710
+ ] }, edge.id);
20711
+ })
20712
+ }
20713
+ ),
20714
+ nodes.map((node) => {
20715
+ const isSelected = node.selected || node.id === selectedId;
20716
+ const w = node.width ?? 160;
20717
+ const h4 = node.height ?? 48;
20718
+ return /* @__PURE__ */ jsx(
20719
+ "div",
20720
+ {
20721
+ role: "button",
20722
+ tabIndex: 0,
20723
+ "aria-pressed": isSelected,
20724
+ "aria-label": node.label,
20725
+ className: flowNodeVariants({
20726
+ selected: isSelected ? "true" : "false"
20727
+ }),
20728
+ style: { left: node.x, top: node.y, width: w, height: h4 },
20729
+ onClick: () => onNodeClick?.(node.id),
20730
+ onKeyDown: (e) => {
20731
+ if (e.key === "Enter" || e.key === " ") {
20732
+ e.preventDefault();
20733
+ onNodeClick?.(node.id);
20734
+ }
20735
+ },
20736
+ onPointerDown: (e) => handlePointerDown(e, node),
20737
+ onPointerMove: handlePointerMove,
20738
+ onPointerUp: handlePointerUp,
20739
+ children: renderNode ? renderNode(node) : /* @__PURE__ */ jsx("span", { className: flowNodeLabelClass, children: node.label })
20740
+ },
20741
+ node.id
20742
+ );
20743
+ })
20744
+ ] })
20745
+ }
20746
+ );
20747
+ }
20748
+ );
20749
+ FlowEditor.displayName = "FlowEditor";
20750
+
20751
+ // ../graph-view/dist/index.js
20752
+ function createGraphView() {
20753
+ return {
20754
+ ariaProps: {
20755
+ role: "group",
20756
+ "aria-label": "Knowledge graph"
20757
+ },
20758
+ dataAttributes: {}
20759
+ };
20760
+ }
20761
+ function nodeById2(nodes, id) {
20762
+ return nodes.find((n) => n.id === id);
20763
+ }
20764
+ function graphEdgePath(source, target) {
20765
+ const sx = source.x;
20766
+ const sy = source.y;
20767
+ const tx = target.x;
20768
+ const ty = target.y;
20769
+ const dy = Math.abs(ty - sy);
20770
+ const offset = Math.max(dy * 0.5, 40);
20771
+ return `M ${sx} ${sy} C ${sx} ${sy + offset}, ${tx} ${ty - offset}, ${tx} ${ty}`;
20772
+ }
20773
+ function summarizeStates(nodes) {
20774
+ const counts = {
20775
+ mastered: 0,
20776
+ "in-progress": 0,
20777
+ "not-started": 0,
20778
+ highlight: 0
20779
+ };
20780
+ for (const n of nodes) {
20781
+ const s = n.state ?? "not-started";
20782
+ counts[s] += 1;
20783
+ }
20784
+ return counts;
20785
+ }
20786
+ var graphViewVariants = cva({
20787
+ base: "relative w-full overflow-hidden rounded-lg border border-border bg-background",
20788
+ variants: {},
20789
+ defaultVariants: {}
20790
+ });
20791
+ var graphNodeVariants = cva({
20792
+ base: [
20793
+ "absolute inline-flex items-center justify-center rounded-md border px-2 py-1",
20794
+ "text-xs font-medium leading-none -translate-x-1/2 -translate-y-1/2",
20795
+ "transition-colors focus-visible:outline-none focus-visible:ring-2",
20796
+ "focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
20797
+ "cursor-default select-none"
20798
+ ].join(" "),
20799
+ variants: {
20800
+ state: {
20801
+ mastered: "border-transparent bg-primary text-primary-foreground",
20802
+ "in-progress": "border-transparent bg-accent text-accent-foreground ring-2 ring-ring",
20803
+ "not-started": "border-transparent bg-muted text-muted-foreground",
20804
+ highlight: "border-primary bg-background text-foreground"
20805
+ },
20806
+ interactive: {
20807
+ true: "cursor-pointer hover:opacity-90",
20808
+ false: "cursor-default"
20809
+ }
20810
+ },
20811
+ defaultVariants: {
20812
+ state: "not-started",
20813
+ interactive: "false"
20814
+ }
20815
+ });
20816
+ var graphNodeLabelClass = "pointer-events-none whitespace-nowrap";
20817
+ var graphEdgeClass = "fill-none stroke-border stroke-[1.5] opacity-60";
20818
+ var graphLegendChipVariants = cva({
20819
+ base: "inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium",
20820
+ variants: {
20821
+ state: {
20822
+ mastered: "border-transparent bg-primary text-primary-foreground",
20823
+ "in-progress": "border-transparent bg-accent text-accent-foreground ring-1 ring-ring",
20824
+ "not-started": "border-transparent bg-muted text-muted-foreground",
20825
+ highlight: "border-primary bg-background text-foreground"
20826
+ }
20827
+ },
20828
+ defaultVariants: {
20829
+ state: "not-started"
20830
+ }
20831
+ });
20832
+ var STATE_LABELS = {
20833
+ mastered: "Mastered",
20834
+ "in-progress": "In Progress",
20835
+ "not-started": "Not Started",
20836
+ highlight: "Highlight"
20837
+ };
20838
+ var LEGEND_ORDER = ["mastered", "in-progress", "not-started", "highlight"];
20839
+ var GraphView = React11.forwardRef(
20840
+ ({ nodes, edges, onNodeClick, showLegend = false, className, ...props }, ref) => {
20841
+ const api = createGraphView();
20842
+ const summary = React11.useMemo(() => summarizeStates(nodes), [nodes]);
20843
+ const nodeMap = React11.useMemo(() => {
20844
+ const m = /* @__PURE__ */ new Map();
20845
+ for (const n of nodes) m.set(n.id, n);
20846
+ return m;
20847
+ }, [nodes]);
20848
+ const padding = 80;
20849
+ const xs = nodes.map((n) => n.x);
20850
+ const ys = nodes.map((n) => n.y);
20851
+ const svgWidth = nodes.length === 0 ? 400 : Math.max(...xs) + padding * 2;
20852
+ const svgHeight = nodes.length === 0 ? 300 : Math.max(...ys) + padding * 2;
20853
+ return /* @__PURE__ */ jsxs(
20854
+ "div",
20855
+ {
20856
+ ref,
20857
+ className: cn(graphViewVariants(), className),
20858
+ ...api.ariaProps,
20859
+ ...api.dataAttributes,
20860
+ ...props,
20861
+ children: [
20862
+ /* @__PURE__ */ jsxs(InfiniteCanvas, { showGrid: true, showControls: true, children: [
20863
+ /* @__PURE__ */ jsx(
20864
+ "svg",
20865
+ {
20866
+ width: svgWidth,
20867
+ height: svgHeight,
20868
+ "aria-hidden": "true",
20869
+ style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" },
20870
+ children: edges.map((edge) => {
20871
+ const source = nodeMap.get(edge.source) ?? nodeById2(nodes, edge.source);
20872
+ const target = nodeMap.get(edge.target) ?? nodeById2(nodes, edge.target);
20873
+ if (!source || !target) return null;
20874
+ return /* @__PURE__ */ jsx(
20875
+ "path",
20876
+ {
20877
+ d: graphEdgePath(source, target),
20878
+ className: graphEdgeClass
20879
+ },
20880
+ edge.id
20881
+ );
20882
+ })
20883
+ }
20884
+ ),
20885
+ nodes.map((node) => {
20886
+ const state = node.state ?? "not-started";
20887
+ const interactive = onNodeClick !== void 0;
20888
+ return /* @__PURE__ */ jsx(
20889
+ "button",
20890
+ {
20891
+ type: "button",
20892
+ "aria-label": node.label,
20893
+ "data-state": state,
20894
+ className: cn(
20895
+ graphNodeVariants({ state, interactive: interactive ? "true" : "false" })
20896
+ ),
20897
+ style: { left: node.x, top: node.y },
20898
+ onClick: onNodeClick ? () => onNodeClick(node) : void 0,
20899
+ children: /* @__PURE__ */ jsx("span", { className: graphNodeLabelClass, children: node.label })
20900
+ },
20901
+ node.id
20902
+ );
20903
+ })
20904
+ ] }),
20905
+ showLegend && /* @__PURE__ */ jsx(
20906
+ "div",
20907
+ {
20908
+ role: "list",
20909
+ "aria-label": "Graph legend",
20910
+ className: "absolute bottom-3 left-3 flex flex-wrap gap-1.5",
20911
+ children: LEGEND_ORDER.filter((s) => summary[s] > 0).map((s) => /* @__PURE__ */ jsxs(
20912
+ "span",
20913
+ {
20914
+ role: "listitem",
20915
+ className: graphLegendChipVariants({ state: s }),
20916
+ children: [
20917
+ STATE_LABELS[s],
20918
+ /* @__PURE__ */ jsx("span", { className: "opacity-70", children: summary[s] })
20919
+ ]
20920
+ },
20921
+ s
20922
+ ))
20923
+ }
20924
+ )
20925
+ ]
20926
+ }
20927
+ );
20928
+ }
20929
+ );
20930
+ GraphView.displayName = "GraphView";
20931
+
20932
+ // ../live-cursors/dist/index.js
20933
+ var CURSOR_COLORS = [
20934
+ "#E94560",
20935
+ // red
20936
+ "#F57C00",
20937
+ // orange
20938
+ "#F9C840",
20939
+ // yellow
20940
+ "#4CAF50",
20941
+ // green
20942
+ "#00ACC1",
20943
+ // cyan
20944
+ "#5C6BC0",
20945
+ // indigo
20946
+ "#AB47BC",
20947
+ // purple
20948
+ "#EC407A"
20949
+ // pink
20950
+ ];
20951
+ function assignCursorColor(id, index) {
20952
+ if (index !== void 0) {
20953
+ return CURSOR_COLORS[index % CURSOR_COLORS.length];
20954
+ }
20955
+ let hash = 5381;
20956
+ for (let i = 0; i < id.length; i++) {
20957
+ hash = (hash << 5) + hash ^ id.charCodeAt(i);
20958
+ hash = hash >>> 0;
20959
+ }
20960
+ return CURSOR_COLORS[hash % CURSOR_COLORS.length];
20961
+ }
20962
+ function createLiveCursors() {
20963
+ const ariaProps = {
20964
+ role: "group",
20965
+ "aria-label": "Collaborators",
20966
+ "aria-hidden": true
20967
+ };
20968
+ const dataAttributes = {
20969
+ "data-live-cursors": ""
20970
+ };
20971
+ return { ariaProps, dataAttributes };
20972
+ }
20973
+ var liveCursorsVariants = cva({
20974
+ base: "absolute inset-0 overflow-hidden pointer-events-none",
20975
+ variants: {
20976
+ /** Future variant hook — reserved for theming overrides. */
20977
+ hidden: {
20978
+ true: "invisible",
20979
+ false: ""
20980
+ }
20981
+ },
20982
+ defaultVariants: {
20983
+ hidden: "false"
20984
+ }
20985
+ });
20986
+ var cursorWrapperClass = "absolute flex flex-col items-start transition-[left,top] duration-100 ease-linear";
20987
+ var cursorArrowClass = "h-5 w-5 drop-shadow-sm";
20988
+ var cursorLabelClass = "mt-0.5 ml-2 rounded px-1.5 py-0.5 text-xs font-medium text-white shadow-sm whitespace-nowrap";
20989
+ var Cursor = React11.memo(function Cursor2({
20990
+ name,
20991
+ x,
20992
+ y,
20993
+ color
20994
+ }) {
20995
+ return /* @__PURE__ */ jsxs(
20996
+ "div",
20997
+ {
20998
+ className: cursorWrapperClass,
20999
+ style: { left: `${x}px`, top: `${y}px` },
21000
+ "data-cursor-name": name,
21001
+ children: [
21002
+ /* @__PURE__ */ jsx(
21003
+ "svg",
21004
+ {
21005
+ className: cursorArrowClass,
21006
+ viewBox: "0 0 20 20",
21007
+ fill: "none",
21008
+ xmlns: "http://www.w3.org/2000/svg",
21009
+ "aria-hidden": "true",
21010
+ style: { fill: color },
21011
+ children: /* @__PURE__ */ jsx(
21012
+ "path",
21013
+ {
21014
+ d: "M3 2L17 9.5L10.5 11.5L8 18L3 2Z",
21015
+ stroke: "white",
21016
+ strokeWidth: "1.5",
21017
+ strokeLinejoin: "round"
21018
+ }
21019
+ )
21020
+ }
21021
+ ),
21022
+ /* @__PURE__ */ jsx(
21023
+ "span",
21024
+ {
21025
+ className: cursorLabelClass,
21026
+ style: { backgroundColor: color },
21027
+ children: name
21028
+ }
21029
+ )
21030
+ ]
21031
+ }
21032
+ );
21033
+ });
21034
+ var LiveCursors = React11.forwardRef(
21035
+ ({ cursors, className, ...props }, ref) => {
21036
+ const api = createLiveCursors();
21037
+ return /* @__PURE__ */ jsx(
21038
+ "div",
21039
+ {
21040
+ ref,
21041
+ className: cn(liveCursorsVariants(), className),
21042
+ ...api.ariaProps,
21043
+ ...api.dataAttributes,
21044
+ ...props,
21045
+ children: cursors.map((cursor, index) => /* @__PURE__ */ jsx(
21046
+ Cursor,
21047
+ {
21048
+ name: cursor.name,
21049
+ x: cursor.x,
21050
+ y: cursor.y,
21051
+ color: cursor.color ?? assignCursorColor(cursor.id, index)
21052
+ },
21053
+ cursor.id
21054
+ ))
21055
+ }
21056
+ );
21057
+ }
21058
+ );
21059
+ LiveCursors.displayName = "LiveCursors";
21060
+
21061
+ // ../mini-map/dist/index.js
21062
+ function contentBounds(items) {
21063
+ if (items.length === 0) return { x: 0, y: 0, width: 0, height: 0 };
21064
+ let minX = Infinity;
21065
+ let minY = Infinity;
21066
+ let maxX = -Infinity;
21067
+ let maxY = -Infinity;
21068
+ for (const item of items) {
21069
+ const right = item.x + (item.width ?? 0);
21070
+ const bottom = item.y + (item.height ?? 0);
21071
+ if (item.x < minX) minX = item.x;
21072
+ if (item.y < minY) minY = item.y;
21073
+ if (right > maxX) maxX = right;
21074
+ if (bottom > maxY) maxY = bottom;
21075
+ }
21076
+ return { x: minX, y: minY, width: maxX - minX, height: maxY - minY };
21077
+ }
21078
+ function miniScale(contentRect, miniW, miniH, padding = 8) {
21079
+ const availW = miniW - padding * 2;
21080
+ const availH = miniH - padding * 2;
21081
+ if (availW <= 0 || availH <= 0) return 1;
21082
+ if (contentRect.width === 0 || contentRect.height === 0) return 1;
21083
+ return Math.min(availW / contentRect.width, availH / contentRect.height);
21084
+ }
21085
+ function worldToMini(point, contentRect, scale, padding = 8) {
21086
+ return {
21087
+ x: (point.x - contentRect.x) * scale + padding,
21088
+ y: (point.y - contentRect.y) * scale + padding
21089
+ };
21090
+ }
21091
+ function viewportRectInMini(viewport, contentRect, scale, padding = 8) {
21092
+ const { x, y } = worldToMini(
21093
+ { x: viewport.x, y: viewport.y },
21094
+ contentRect,
21095
+ scale,
21096
+ padding
21097
+ );
21098
+ return {
21099
+ x,
21100
+ y,
21101
+ width: viewport.width * scale,
21102
+ height: viewport.height * scale
21103
+ };
21104
+ }
21105
+ function createMiniMap() {
21106
+ return {
21107
+ ariaProps: { role: "img", "aria-label": "Minimap" },
21108
+ dataAttributes: { "data-component": "mini-map" }
21109
+ };
21110
+ }
21111
+ var miniMapVariants = cva({
21112
+ base: [
21113
+ "relative overflow-hidden rounded-md border border-border bg-card",
21114
+ "select-none"
21115
+ ].join(" "),
21116
+ variants: {
21117
+ interactive: {
21118
+ true: "cursor-grab active:cursor-grabbing",
21119
+ false: ""
21120
+ }
21121
+ },
21122
+ defaultVariants: {
21123
+ interactive: "false"
21124
+ }
21125
+ });
21126
+ var miniMapDotClass = "absolute rounded-sm bg-muted";
21127
+ var miniMapViewportClass = "absolute rounded-sm border border-primary ring-1 ring-primary bg-primary/10";
21128
+ var MiniMap = React11.forwardRef(
21129
+ ({
21130
+ items,
21131
+ viewport,
21132
+ width = 200,
21133
+ height = 140,
21134
+ padding = 8,
21135
+ onViewportChange,
21136
+ className,
21137
+ ...props
21138
+ }, ref) => {
21139
+ const containerRef = React11.useRef(null);
21140
+ const isDragging = React11.useRef(false);
21141
+ const bounds = React11.useMemo(() => contentBounds(items), [items]);
21142
+ const scale = React11.useMemo(
21143
+ () => miniScale(bounds, width, height, padding),
21144
+ [bounds, width, height, padding]
21145
+ );
21146
+ const viewportRect = React11.useMemo(
21147
+ () => viewport != null ? viewportRectInMini(viewport, bounds, scale, padding) : null,
21148
+ [viewport, bounds, scale, padding]
21149
+ );
21150
+ const { ariaProps, dataAttributes } = createMiniMap();
21151
+ const miniToWorld = React11.useCallback(
21152
+ (miniX, miniY) => {
21153
+ return {
21154
+ x: (miniX - padding) / scale + bounds.x,
21155
+ y: (miniY - padding) / scale + bounds.y
21156
+ };
21157
+ },
21158
+ [scale, bounds, padding]
21159
+ );
21160
+ const handlePointerEvent = React11.useCallback(
21161
+ (e) => {
21162
+ if (!onViewportChange) return;
21163
+ const el = containerRef.current;
21164
+ if (!el) return;
21165
+ const rect = el.getBoundingClientRect();
21166
+ const miniX = e.clientX - rect.left;
21167
+ const miniY = e.clientY - rect.top;
21168
+ onViewportChange(miniToWorld(miniX, miniY));
21169
+ },
21170
+ [onViewportChange, miniToWorld]
21171
+ );
21172
+ const handlePointerDown = React11.useCallback(
21173
+ (e) => {
21174
+ if (!onViewportChange) return;
21175
+ isDragging.current = true;
21176
+ e.currentTarget.setPointerCapture(e.pointerId);
21177
+ handlePointerEvent(e);
21178
+ },
21179
+ [onViewportChange, handlePointerEvent]
21180
+ );
21181
+ const handlePointerMove = React11.useCallback(
21182
+ (e) => {
21183
+ if (!isDragging.current) return;
21184
+ handlePointerEvent(e);
21185
+ },
21186
+ [handlePointerEvent]
21187
+ );
21188
+ const handlePointerUp = React11.useCallback(() => {
21189
+ isDragging.current = false;
21190
+ }, []);
21191
+ return /* @__PURE__ */ jsxs(
21192
+ "div",
21193
+ {
21194
+ ref: (node) => {
21195
+ containerRef.current = node;
21196
+ if (typeof ref === "function") {
21197
+ ref(node);
21198
+ } else if (ref) {
21199
+ ref.current = node;
21200
+ }
21201
+ },
21202
+ className: cn(
21203
+ miniMapVariants({ interactive: onViewportChange ? "true" : "false" }),
21204
+ className
21205
+ ),
21206
+ style: { width, height, position: "relative" },
21207
+ ...ariaProps,
21208
+ ...dataAttributes,
21209
+ onPointerDown: onViewportChange ? handlePointerDown : void 0,
21210
+ onPointerMove: onViewportChange ? handlePointerMove : void 0,
21211
+ onPointerUp: onViewportChange ? handlePointerUp : void 0,
21212
+ ...props,
21213
+ children: [
21214
+ items.map((item) => {
21215
+ const pos = worldToMini(item, bounds, scale, padding);
21216
+ const w = (item.width ?? 8) * scale;
21217
+ const h4 = (item.height ?? 8) * scale;
21218
+ return /* @__PURE__ */ jsx(
21219
+ "span",
21220
+ {
21221
+ className: miniMapDotClass,
21222
+ style: {
21223
+ position: "absolute",
21224
+ left: `${pos.x}px`,
21225
+ top: `${pos.y}px`,
21226
+ width: `${Math.max(4, w)}px`,
21227
+ height: `${Math.max(4, h4)}px`
21228
+ },
21229
+ "aria-hidden": "true"
21230
+ },
21231
+ item.id
21232
+ );
21233
+ }),
21234
+ viewportRect != null && /* @__PURE__ */ jsx(
21235
+ "span",
21236
+ {
21237
+ className: miniMapViewportClass,
21238
+ style: {
21239
+ position: "absolute",
21240
+ left: `${viewportRect.x}px`,
21241
+ top: `${viewportRect.y}px`,
21242
+ width: `${viewportRect.width}px`,
21243
+ height: `${viewportRect.height}px`
21244
+ },
21245
+ "aria-hidden": "true"
21246
+ }
21247
+ )
21248
+ ]
21249
+ }
21250
+ );
21251
+ }
21252
+ );
21253
+ MiniMap.displayName = "MiniMap";
21254
+
21255
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, AnalyticsProvider, AnimatedText, AppShell, AudioRoom, AuthGuard, AuthProvider, Avatar2 as Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BadgeDisplay, BottomNav, Breadcrumbs, Button, CATEGORY_LABELS, CURSOR_COLORS, Calendar, CalendarHeader, CallControlButton, CallControls, Callout, CalloutContent, CalloutDescription, CalloutIcon, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselTrigger, Chat, Checkbox, Checklist, CodeBlock, CodeBlockContent, CodeBlockHeader, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, Composer, ConfirmationCard, ContentProtection, CookieConsent, Cursor, DEFAULT_CATEGORIES, DEFAULT_VOICE_PILL_POSITION, DEFAULT_VOICE_PILL_SPEAKER, DEFAULT_WAVEFORM_BAR_COUNT, DEFAULT_WAVEFORM_COLOR, DEFAULT_WAVEFORM_HEIGHT, DEFAULT_WAVEFORM_INTENSITY, DEFAULT_WAVEFORM_SMOOTHING, DataTable, DatePicker, DeviceFrame, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EMOJI_CATEGORIES, EMOJI_DATA, EditorStatusBar, EditorTabs, EmojiPicker, EmptyState, FeedbackButton, FeedbackDialog, FileTree, FileUpload, FloatingReactions, FlowEditor, Footer, GraphView, IconSystem, InfiniteCanvas, InlineEditor, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InstallPrompt, KeyboardShortcut, LanguageSelector, LinkCard, LiveCaptions, LiveCursors, LiveTranscript, MarkdownRenderer, MiniMap, MobileNav, MobileNavContent, MobileNavLink, MobileNavTrigger, Navbar, OtpInput, STATUS_COLORS as PRESENCE_STATUS_COLORS, STATUS_LABELS as PRESENCE_STATUS_LABELS, Pagination, PasswordInput, Payment, Popover, PopoverClose, PopoverContent, PopoverTrigger, PreCallLobby, PresenceIndicator, ProgressBar, RadialGauge, RadioGroup, RadioItem, RatingScale, ReactionBar, ReactionBurst, ResizableDivider, ResizableLayout, ResizablePane, SANE_DEFAULTS, STATUS_INDICATOR_COLORS as STATUS_COLORS, STATUS_INDICATOR_LABELS as STATUS_LABELS, STICKY_NOTE_COLORS, SearchBar, SearchResultItem, SearchResults, SegmentedControl, SegmentedControlItem, Select, SelectContent, SelectItem, SelectTrigger, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, ShortcutBadge, ShortcutContext, ShortcutHint, ShortcutProvider, ShortcutRegistry, Sidebar, Skeleton, SkeletonText, SkipToContent, SlideViewer, SocialAuthButton, SocialAuthRow, SpeakingOrb, StatsGrid, StatusIndicator, Step, StepContent, StepDescription, StepIndicator, StepTitle, Steps, StickyNote, Switch, TableOfContents, Tabs, TabsContent, TabsList, TabsTrigger, TelemetryErrorBoundary, TelemetryProvider, Terminal, TestResults, Textarea, ThreadView, Timeline, TimelineItem, Toast, ToastProvider, Toaster, Tooltip, TooltipContent, TooltipTrigger, TypewriterText, VersionSelector, VideoGrid, VideoPlayer, VideoTile, VoicePill, Waveform, Wizard, altHintState, animatedTextVariants, assignCursorColor, avatarFallbackVariants, avatarImageVariants, avatarTokens, avatarVariants, badgeGridVariants, badgeItemVariants, badgeVariants, bottomNavTabVariants, bottomNavVariants, breadcrumbItemVariants, breadcrumbSeparatorStyles, breadcrumbsVariants, buttonTokens, buttonVariants, calendarVariants, canAccessAdmin, canAccessReviewer, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants, cellVariants, checkIconPath, checkboxTokens, checkboxVariants, clampVoicePillIntensity, codeEditorTokens, codeEditorVariants, collapsibleContentVariants, comboboxContentVariants, comboboxEmptyVariants, comboboxInputVariants, comboboxItemVariants, comboboxListVariants, comboboxTriggerVariants, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants, contentProtectionVariants, controlsVariants, createAnalytics, createAppInsightsSink, createConsoleSink, createConversation, createCookieConsent, createGA4ClientSdkSink, createGA4HttpSink, createGA4Sink, createIntensitySamples, createPostHogClientSdkSink, createPostHogHttpSink, createPostHogSink, createPreCallLobby, createSegmentedControl, createSilentSamples, createTelemetry, createVoicePill, createWaveform, dayVariants, deviceFrameVariants, dialogContentVariants, drawWaveform, editorVariants, emojiPickerContainerStyles, emojiPickerEmojiButtonStyles, emojiPickerGridStyles, feedbackDialogVariants, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, findMessage, footerVariants, formatFileSize, formatRelativeTime, formatShortcut, formatTimestamp, getAssignableRoles, getDefaultPortal, getInitials, getNextSegmentIndex, getReplyCount, getVoicePillAriaLabel, getVoicePillInitials, getVoicePillPosition, getVoicePillPulseStyle, getVoicePillSpeakerKey, getVoicePillSpeakerLabel, getWaveformPeak, globalShortcutRegistry, hasAllRoles, hasAnyRole, hasRole, headerVariants, indeterminateIconPath, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupTokens, inputGroupVariants, inputVariants, installPromptVariants, isWaveformSampleInput, latestBadgeVariants, markdownRendererTokens, menuContentVariants, menuItemVariants, micLevelToBars, mobileNavContentVariants, mobileNavLinkVariants, mobileNavTokens, mobileNavTriggerVariants, mobileNavVariants, navLinkVariants, navbarVariants, nextStickyColor, normalizeBarCount, normalizeIntensity, normalizeSmoothing, normalizeWaveformConfig, normalizeWaveformSamples, optionVariants, otpInputContainerVariants, otpInputSlotVariants, otpInputTokens, overlayStyles, overlayVariants, playerVariants, popoverContentVariants, prepareWaveformCanvas, previewVariants, progressBarVariants, proseVariants, radioCircleVariants, radioGroupVariants, radioItemVariants, reactionAddButtonStyles, reactionBarStyles, reactionCountStyles, reactionEmojiStyles, reactionPillVariants, resampleWaveformSamples, resizableDividerVariants, resizableLayoutTokens, resizableLayoutVariants, resizablePaneVariants, rootIdOf, rowVariants, scaleWaveformSamples, searchBarVariants, searchResultVariants, segmentedControlItemVariants, segmentedControlVariants, selectContentVariants, selectItemVariants, selectMainTimeline, selectReplies, selectRoots, selectThreadMessages, selectTimelineFromState, selectTokens, selectTriggerVariants, selectorVariants, sheetContentVariants, sheetOverlayStyles, shortcutBadgeStyles, shortcutKeyStyles, shortcutSeparatorStyles, sidebarItemVariants, sidebarVariants, skeletonVariants, slideTypeBadgeVariants, slideViewerProgressBarVariants, slideViewerTokens, slideViewerVariants, smoothWaveformSamples, startSessionReplay, statCardVariants, statsGridVariants, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants, switchThumbVariants, switchTokens, switchVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadMessageStyles, threadReactionsStyles, threadTimestampStyles, toCssDimension, toastVariants, toolbarVariants, tooltipContentVariants, typewriterVariants, useAnalytics, useAuth, useConversation, useCookieConsent, useFloatingReactions, useLogger, useShortcut, useSpan, useTelemetry, useToast, useTrackEvent, useWizard, versionSelectorOptionVariants, versionSelectorVariants, voicePillAvatarStyles, voicePillAvatarWrapStyles, voicePillLabelStyles, voicePillMuteButtonStyles, voicePillPositionVariants, voicePillPulseRingStyles, voicePillRootStyles, voicePillSpeakerStyles, voicePillSubStyles, voicePillTextStyles, voicePillTokens, watermarkVariants, waveformCanvasVariants, waveformVariants };
17029
21256
  //# sourceMappingURL=index.js.map
17030
21257
  //# sourceMappingURL=index.js.map