@wow-two-beta/ui-vue 0.0.4 → 0.0.5

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 (84) hide show
  1. package/dist/chunks/{BackToTopButton.vue_vue_type_script_setup_true_lang-CkxLllEO.js → BackToTopButton.vue_vue_type_script_setup_true_lang-iLYlhK05.js} +11 -5
  2. package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-iLYlhK05.js.map +1 -0
  3. package/dist/chunks/{Backdrop.vue_vue_type_script_setup_true_lang-DZUhGY9p.js → Backdrop.vue_vue_type_script_setup_true_lang-CKG--_g8.js} +2 -2
  4. package/dist/chunks/{Backdrop.vue_vue_type_script_setup_true_lang-DZUhGY9p.js.map → Backdrop.vue_vue_type_script_setup_true_lang-CKG--_g8.js.map} +1 -1
  5. package/dist/chunks/{BottomSheet.vue_vue_type_script_setup_true_lang-CmNoI4BE.js → BottomSheet.vue_vue_type_script_setup_true_lang-CmNaGird.js} +8 -8
  6. package/dist/chunks/{BottomSheet.vue_vue_type_script_setup_true_lang-CmNoI4BE.js.map → BottomSheet.vue_vue_type_script_setup_true_lang-CmNaGird.js.map} +1 -1
  7. package/dist/chunks/{ChatComposer.vue_vue_type_script_setup_true_lang-lNcRhKIv.js → ChatComposer.vue_vue_type_script_setup_true_lang-DfeVsj9h.js} +1024 -579
  8. package/dist/chunks/ChatComposer.vue_vue_type_script_setup_true_lang-DfeVsj9h.js.map +1 -0
  9. package/dist/chunks/{DateExtensions-QahSUlRy.js → DateExtensions-C6a-h8ji.js} +12 -22
  10. package/dist/chunks/{DateExtensions-QahSUlRy.js.map → DateExtensions-C6a-h8ji.js.map} +1 -1
  11. package/dist/chunks/{DismissableLayer.vue_vue_type_script_setup_true_lang-6nRnzsJW.js → DismissableLayer.vue_vue_type_script_setup_true_lang-ptH1ttBL.js} +3 -3
  12. package/dist/chunks/DismissableLayer.vue_vue_type_script_setup_true_lang-ptH1ttBL.js.map +1 -0
  13. package/dist/chunks/{DrawerContent.vue_vue_type_script_setup_true_lang-DvvrJdF0.js → DrawerContent.vue_vue_type_script_setup_true_lang-4n5w3lg2.js} +5 -5
  14. package/dist/chunks/{DrawerContent.vue_vue_type_script_setup_true_lang-DvvrJdF0.js.map → DrawerContent.vue_vue_type_script_setup_true_lang-4n5w3lg2.js.map} +1 -1
  15. package/dist/chunks/{ModalContent.vue_vue_type_script_setup_true_lang-CLACSqKg.js → ModalContent.vue_vue_type_script_setup_true_lang-Co5jaeXk.js} +5 -5
  16. package/dist/chunks/{ModalContent.vue_vue_type_script_setup_true_lang-CLACSqKg.js.map → ModalContent.vue_vue_type_script_setup_true_lang-Co5jaeXk.js.map} +1 -1
  17. package/dist/chunks/{Navbar.vue_vue_type_script_setup_true_lang-Cl2ejukE.js → Navbar.vue_vue_type_script_setup_true_lang-Cy0zvm5d.js} +7 -7
  18. package/dist/chunks/Navbar.vue_vue_type_script_setup_true_lang-Cy0zvm5d.js.map +1 -0
  19. package/dist/chunks/{NotificationItem.vue_vue_type_script_setup_true_lang-KC5Iusce.js → NotificationItem.vue_vue_type_script_setup_true_lang-DySfo3fD.js} +5 -5
  20. package/dist/chunks/{NotificationItem.vue_vue_type_script_setup_true_lang-KC5Iusce.js.map → NotificationItem.vue_vue_type_script_setup_true_lang-DySfo3fD.js.map} +1 -1
  21. package/dist/chunks/{OptionTileGroup.vue_vue_type_script_setup_true_lang-BGSmXM_u.js → OptionTileGroup.vue_vue_type_script_setup_true_lang-CKSVGCby.js} +51 -30
  22. package/dist/chunks/OptionTileGroup.vue_vue_type_script_setup_true_lang-CKSVGCby.js.map +1 -0
  23. package/dist/chunks/{PopoverContent.vue_vue_type_script_setup_true_lang-D-OiGICS.js → PopoverContent.vue_vue_type_script_setup_true_lang-DYd617X5.js} +4 -4
  24. package/dist/chunks/{PopoverContent.vue_vue_type_script_setup_true_lang-D-OiGICS.js.map → PopoverContent.vue_vue_type_script_setup_true_lang-DYd617X5.js.map} +1 -1
  25. package/dist/chunks/{Presence-C7IJvh_P.js → Presence-DE4MlrJz.js} +45 -27
  26. package/dist/chunks/Presence-DE4MlrJz.js.map +1 -0
  27. package/dist/chunks/{SortableHandle.vue_vue_type_script_setup_true_lang-CWCXGjZG.js → SortableHandle.vue_vue_type_script_setup_true_lang-8WPwGZ5e.js} +141 -130
  28. package/dist/chunks/SortableHandle.vue_vue_type_script_setup_true_lang-8WPwGZ5e.js.map +1 -0
  29. package/dist/chunks/{SurfaceStyles-ChdpGRBO.js → SurfaceStyles-B6W7zdMi.js} +2 -2
  30. package/dist/chunks/{SurfaceStyles-ChdpGRBO.js.map → SurfaceStyles-B6W7zdMi.js.map} +1 -1
  31. package/dist/chunks/{TableOfContents.vue_vue_type_script_setup_true_lang-HVL4lg_f.js → TableOfContents.vue_vue_type_script_setup_true_lang-C9eM0AoG.js} +18 -20
  32. package/dist/chunks/TableOfContents.vue_vue_type_script_setup_true_lang-C9eM0AoG.js.map +1 -0
  33. package/dist/chunks/{Tones-CI65uuq9.js → Tones-WKBNZ_u2.js} +39 -17
  34. package/dist/chunks/Tones-WKBNZ_u2.js.map +1 -0
  35. package/dist/chunks/{index-BD7H9CkO.js → index-CEoYQiWL.js} +3 -3
  36. package/dist/chunks/{index-BD7H9CkO.js.map → index-CEoYQiWL.js.map} +1 -1
  37. package/dist/chunks/{index-Cbydgcdk.js → index-op-kbVUk.js} +3 -3
  38. package/dist/chunks/{index-Cbydgcdk.js.map → index-op-kbVUk.js.map} +1 -1
  39. package/dist/foundation/primitives/index.js +3 -3
  40. package/dist/foundation/primitives/presence/Presence.d.ts +4 -0
  41. package/dist/foundation/utils/index.js +3 -3
  42. package/dist/index.js +111 -109
  43. package/dist/presentation/actions/index.js +2 -2
  44. package/dist/presentation/actions/speedDial/SpeedDialAction.vue.d.ts +6 -5
  45. package/dist/presentation/actions/speedDial/index.d.ts +3 -5
  46. package/dist/presentation/display/audioWaveform/AudioWaveform.vue.d.ts +1 -0
  47. package/dist/presentation/display/diffViewer/DiffViewer.vue.d.ts +2 -0
  48. package/dist/presentation/display/eventCalendar/EventCalendar.vue.d.ts +1 -0
  49. package/dist/presentation/display/frameGlyph/FrameGlyph.vue.d.ts +2 -0
  50. package/dist/presentation/display/gantt/Gantt.vue.d.ts +1 -0
  51. package/dist/presentation/display/heatmapCalendar/HeatmapCalendar.vue.d.ts +1 -0
  52. package/dist/presentation/display/index.js +98 -96
  53. package/dist/presentation/display/list/ListContext.d.ts +16 -0
  54. package/dist/presentation/display/list/ListItem.vue.d.ts +7 -1
  55. package/dist/presentation/display/list/index.d.ts +1 -0
  56. package/dist/presentation/display/metricChip/MetricChip.vue.d.ts +1 -1
  57. package/dist/presentation/display/moduleGlyphs/CellsGlyph.vue.d.ts +1 -0
  58. package/dist/presentation/display/radiusGlyph/RadiusGlyph.vue.d.ts +1 -0
  59. package/dist/presentation/display/reactionBar/ReactionBar.vue.d.ts +1 -0
  60. package/dist/presentation/feedback/index.js +1 -1
  61. package/dist/presentation/feedback/tour/Tour.vue.d.ts +1 -0
  62. package/dist/presentation/forms/TimeColumns.vue.d.ts +22 -0
  63. package/dist/presentation/forms/dateField/DateField.vue.d.ts +12 -0
  64. package/dist/presentation/forms/dateTimeField/DateTimeField.vue.d.ts +17 -0
  65. package/dist/presentation/forms/index.js +2 -2
  66. package/dist/presentation/forms/multiSelect/MultiSelect.vue.d.ts +8 -0
  67. package/dist/presentation/forms/multiSelect/MultiSelectContext.d.ts +9 -0
  68. package/dist/presentation/forms/multiSelect/MultiSelectTags.vue.d.ts +10 -0
  69. package/dist/presentation/forms/multiSelect/MultiSelectTrigger.vue.d.ts +5 -0
  70. package/dist/presentation/forms/timeField/TimeField.vue.d.ts +20 -5
  71. package/dist/presentation/forms/timePicker/TimePicker.vue.d.ts +5 -5
  72. package/dist/presentation/layout/index.js +1 -1
  73. package/dist/presentation/nav/index.js +1 -1
  74. package/dist/presentation/overlays/index.js +5 -5
  75. package/package.json +3 -2
  76. package/dist/chunks/BackToTopButton.vue_vue_type_script_setup_true_lang-CkxLllEO.js.map +0 -1
  77. package/dist/chunks/ChatComposer.vue_vue_type_script_setup_true_lang-lNcRhKIv.js.map +0 -1
  78. package/dist/chunks/DismissableLayer.vue_vue_type_script_setup_true_lang-6nRnzsJW.js.map +0 -1
  79. package/dist/chunks/Navbar.vue_vue_type_script_setup_true_lang-Cl2ejukE.js.map +0 -1
  80. package/dist/chunks/OptionTileGroup.vue_vue_type_script_setup_true_lang-BGSmXM_u.js.map +0 -1
  81. package/dist/chunks/Presence-C7IJvh_P.js.map +0 -1
  82. package/dist/chunks/SortableHandle.vue_vue_type_script_setup_true_lang-CWCXGjZG.js.map +0 -1
  83. package/dist/chunks/TableOfContents.vue_vue_type_script_setup_true_lang-HVL4lg_f.js.map +0 -1
  84. package/dist/chunks/Tones-CI65uuq9.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SortableHandle.vue_vue_type_script_setup_true_lang-8WPwGZ5e.js","sources":["../../src/presentation/display/heading/Heading.variants.ts","../../src/presentation/display/heading/Heading.vue","../../src/presentation/display/text/Text.variants.ts","../../src/presentation/display/text/Text.vue","../../src/presentation/display/code/Code.variants.ts","../../src/presentation/display/code/Code.vue","../../src/presentation/display/image/Image.vue","../../src/presentation/display/avatar/Avatar.variants.ts","../../src/presentation/display/avatar/Avatar.vue","../../src/presentation/display/badge/Badge.variants.ts","../../src/presentation/display/badge/Badge.vue","../../src/presentation/display/separator/Separator.vue","../../src/presentation/display/mark/Mark.vue","../../src/presentation/display/quote/Quote.vue","../../src/presentation/display/card/Card.vue","../../src/presentation/display/card/CardHeader.vue","../../src/presentation/display/card/CardTitle.vue","../../src/presentation/display/card/CardDescription.vue","../../src/presentation/display/card/CardBody.vue","../../src/presentation/display/card/CardFooter.vue","../../src/presentation/display/avatarGroup/AvatarGroup.vue","../../src/presentation/display/tooltip/Tooltip.vue","../../src/presentation/display/emptyState/EmptyState.vue","../../src/presentation/display/stat/Stat.vue","../../src/presentation/display/snippet/Snippet.vue","../../src/presentation/display/notificationDot/NotificationDot.vue","../../src/presentation/display/countBadge/CountBadge.vue","../../src/presentation/display/status/Status.vue","../../src/presentation/display/keyboardShortcut/KeyboardShortcut.vue","../../src/presentation/display/descriptionList/DescriptionList.vue","../../src/presentation/display/infoRow/InfoRow.vue","../../src/presentation/display/metricChip/MetricChip.vue","../../src/presentation/display/eyebrow/Eyebrow.vue","../../src/presentation/display/metaInline/MetaInline.vue","../../src/presentation/display/badgeOverlay/BadgeOverlay.vue","../../src/presentation/display/sectionHeader/SectionHeader.vue","../../src/presentation/display/highlight/Highlight.vue","../../src/presentation/display/collapsible/CollapsibleContext.ts","../../src/presentation/display/collapsible/Collapsible.vue","../../src/presentation/display/collapsible/CollapsibleTrigger.vue","../../src/presentation/display/collapsible/CollapsibleContentInner.vue","../../src/presentation/display/collapsible/CollapsibleContent.vue","../../src/presentation/display/accordion/AccordionContext.ts","../../src/presentation/display/accordion/Accordion.vue","../../src/presentation/display/accordion/AccordionItem.vue","../../src/presentation/display/accordion/AccordionTrigger.vue","../../src/presentation/display/accordion/AccordionContent.vue","../../src/presentation/display/tabs/TabsContext.ts","../../src/presentation/display/tabs/Tabs.vue","../../src/presentation/display/tabs/TabsList.vue","../../src/presentation/display/tabs/TabsTab.vue","../../src/presentation/display/tabs/TabsPanel.vue","../../src/presentation/display/list/List.variants.ts","../../src/presentation/display/list/ListContext.ts","../../src/presentation/display/list/List.vue","../../src/presentation/display/list/ListItem.vue","../../src/presentation/display/timeline/TimelineContext.ts","../../src/presentation/display/timeline/Timeline.vue","../../src/presentation/display/timeline/TimelineItem.vue","../../src/presentation/display/timeline/TimelineTitle.vue","../../src/presentation/display/timeline/TimelineDescription.vue","../../src/presentation/display/tree/TreeContext.ts","../../src/presentation/display/tree/Tree.vue","../../src/presentation/display/tree/TreeGroupContent.vue","../../src/presentation/display/tree/TreeNodeRow.vue","../../src/presentation/display/tree/TreeGroup.vue","../../src/presentation/display/tree/TreeItem.vue","../../src/presentation/display/table/TableContext.ts","../../src/presentation/display/table/Table.vue","../../src/presentation/display/table/TableHead.vue","../../src/presentation/display/table/TableBody.vue","../../src/presentation/display/table/TableFooter.vue","../../src/presentation/display/table/TableRow.vue","../../src/presentation/display/table/TableHeaderCell.vue","../../src/presentation/display/table/TableCell.vue","../../src/presentation/display/table/TableCaption.vue","../../src/presentation/display/dataTable/DataTable.vue","../../src/presentation/display/carousel/CarouselContext.ts","../../src/presentation/display/carousel/Carousel.vue","../../src/presentation/display/carousel/CarouselViewport.vue","../../src/presentation/display/carousel/CarouselSlides.vue","../../src/presentation/display/carousel/CarouselSlide.vue","../../src/presentation/display/carousel/CarouselPrev.vue","../../src/presentation/display/carousel/CarouselNext.vue","../../src/presentation/display/carousel/CarouselDot.vue","../../src/presentation/display/carousel/CarouselDots.vue","../../src/presentation/display/swipeActions/SwipeActions.vue","../../src/presentation/display/diffViewer/DiffViewer.vue","../../src/presentation/display/sparkline/Sparkline.vue","../../src/presentation/display/radiusGlyph/RadiusGlyph.vue","../../src/presentation/display/frameGlyph/FrameGlyph.vue","../../src/presentation/display/moduleGlyphs/ModuleGlyphs.ts","../../src/presentation/display/moduleGlyphs/DotsGlyph.vue","../../src/presentation/display/moduleGlyphs/VerticalBarsGlyph.vue","../../src/presentation/display/moduleGlyphs/HorizontalBarsGlyph.vue","../../src/presentation/display/moduleGlyphs/CellsGlyph.vue","../../src/presentation/display/heatmapCalendar/HeatmapCalendar.vue","../../src/presentation/display/dataGrid/DataGridTypes.ts","../../src/presentation/display/dataGrid/CellEditor.vue","../../src/presentation/display/dataGrid/DataGrid.vue","../../src/presentation/display/nodeEditor/NodeEditor.vue","../../src/presentation/display/audioWaveform/AudioWaveform.vue","../../src/presentation/display/audioPlayer/AudioPlayer.vue","../../src/presentation/display/videoPlayer/VideoPlayer.vue","../../src/presentation/display/pdfViewer/PDFViewer.vue","../../src/presentation/display/scheduleView/ScheduleView.vue","../../src/presentation/display/gantt/Gantt.vue","../../src/presentation/display/eventCalendar/EventCalendarTypes.ts","../../src/presentation/display/eventCalendar/MonthView.vue","../../src/presentation/display/eventCalendar/TimeGridView.vue","../../src/presentation/display/eventCalendar/AgendaView.vue","../../src/presentation/display/eventCalendar/EventCalendar.vue","../../src/presentation/display/gradientText/GradientText.vue","../../src/presentation/display/countUp/CountUp.vue","../../src/presentation/display/animatedNumber/AnimatedNumber.vue","../../src/presentation/display/scrollReveal/ScrollReveal.vue","../../src/presentation/display/tilt/Tilt.vue","../../src/presentation/display/marquee/Marquee.vue","../../src/presentation/display/typewriter/Typewriter.vue","../../src/presentation/display/confetti/Confetti.vue","../../src/presentation/display/annotationMarker/AnnotationMarker.vue","../../src/presentation/display/reactionBar/ReactionBar.vue","../../src/presentation/display/chatBubble/ChatBubble.vue","../../src/presentation/display/messageList/MessageList.vue","../../src/presentation/display/messageList/DaySeparator.vue","../../src/presentation/display/threadView/ThreadView.vue","../../src/presentation/display/commentThread/CommentThread.vue","../../src/presentation/display/commentThread/Comment.vue","../../src/presentation/display/activityFeed/ActivityFeed.vue","../../src/presentation/display/activityFeed/ActivityItem.vue","../../src/presentation/display/featureCard/FeatureCard.vue","../../src/presentation/display/stepCard/StepCard.vue","../../src/presentation/display/pricingCard/PricingCard.vue","../../src/presentation/display/sortable/SortableContext.ts","../../src/presentation/display/sortable/Sortable.vue","../../src/presentation/display/sortable/SortableItem.vue","../../src/presentation/display/sortable/SortableHandle.vue"],"sourcesContent":["import { tv, type VariantProps } from '../../../foundation/utils';\n\n/** Defines the Heading visual size step (independent of semantic level). */\nexport const HeadingSize = {\n /** Refers to the extra-small step. */\n Xs: 'xs',\n /** Refers to the small step. */\n Sm: 'sm',\n /** Refers to the medium step. */\n Md: 'md',\n /** Refers to the large step. */\n Lg: 'lg',\n /** Refers to the extra-large step. */\n Xl: 'xl',\n /** Refers to the 2x-large step. */\n Xxl: '2xl',\n /** Refers to the 3x-large step. */\n Xxxl: '3xl',\n /** Refers to the 4x-large step. */\n Xxxxl: '4xl',\n} as const;\n\nexport type HeadingSize = (typeof HeadingSize)[keyof typeof HeadingSize];\n\n/** Defines the Heading font weight. */\nexport const HeadingWeight = {\n /** Refers to normal weight. */\n Normal: 'normal',\n /** Refers to medium weight. */\n Medium: 'medium',\n /** Refers to semibold weight. */\n Semibold: 'semibold',\n /** Refers to bold weight. */\n Bold: 'bold',\n} as const;\n\nexport type HeadingWeight = (typeof HeadingWeight)[keyof typeof HeadingWeight];\n\n/** Defines the Heading text alignment. */\nexport const HeadingAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to centered alignment. */\n Center: 'center',\n /** Refers to right alignment. */\n Right: 'right',\n} as const;\n\nexport type HeadingAlign = (typeof HeadingAlign)[keyof typeof HeadingAlign];\n\nexport const headingVariants = tv({\n base: 'font-semibold tracking-tight text-foreground',\n variants: {\n size: {\n xs: 'text-sm',\n sm: 'text-base',\n md: 'text-lg',\n lg: 'text-xl',\n xl: 'text-2xl',\n '2xl': 'text-3xl',\n '3xl': 'text-4xl',\n '4xl': 'text-5xl',\n },\n weight: {\n normal: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n },\n defaultVariants: {\n size: 'lg',\n weight: 'semibold',\n },\n});\n\nexport type HeadingVariants = VariantProps<typeof headingVariants>;\n\n/* Compile-time lock: enum values ≡ tv size/weight/align value-sets (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertHeadingSize: AssertExact<\n HeadingSize,\n NonNullable<VariantProps<typeof headingVariants>['size']>\n> = true;\nconst _assertHeadingWeight: AssertExact<\n HeadingWeight,\n NonNullable<VariantProps<typeof headingVariants>['weight']>\n> = true;\nconst _assertHeadingAlign: AssertExact<\n HeadingAlign,\n NonNullable<VariantProps<typeof headingVariants>['align']>\n> = true;\nvoid _assertHeadingSize;\nvoid _assertHeadingWeight;\nvoid _assertHeadingAlign;\n","<script lang=\"ts\">\nimport type { HeadingAlign, HeadingSize, HeadingWeight } from './Heading.variants';\n\ntype HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface HeadingProps {\n /** The semantic heading level (1–6). Default 2. Visual size is independent — set via `size`. */\n level?: HeadingLevel;\n /** The visual size step. */\n size?: HeadingSize;\n /** The font weight. */\n weight?: HeadingWeight;\n /** The text alignment. */\n align?: HeadingAlign;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { headingVariants } from './Heading.variants';\n\n/**\n * Semantic heading. `level` controls the rendered tag (`h1`–`h6`); `size`\n * controls the visual scale independently — so a visually-large heading\n * can still be the right outline level.\n */\ndefineOptions({ name: 'Heading', inheritAttrs: false });\n\n/** The heading copy — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<HeadingProps>(), { level: 2 });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLHeadingElement>('el');\n\nconst tag = computed(() => `h${props.level}` as 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6');\n\nconst classes = computed(() =>\n cn(\n headingVariants({ size: props.size, weight: props.weight, align: props.align }),\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component :is=\"tag\" ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></component>\n</template>\n","import { tv, Size, type VariantProps } from '../../../foundation/utils';\n\n/** Defines the Text font weight. */\nexport const TextWeight = {\n /** Refers to normal weight. */\n Normal: 'normal',\n /** Refers to medium weight. */\n Medium: 'medium',\n /** Refers to semibold weight. */\n Semibold: 'semibold',\n /** Refers to bold weight. */\n Bold: 'bold',\n} as const;\n\nexport type TextWeight = (typeof TextWeight)[keyof typeof TextWeight];\n\n/** Defines the Text color role. */\nexport const TextColor = {\n /** Refers to the default foreground. */\n Default: 'default',\n /** Refers to the muted foreground. */\n Muted: 'muted',\n /** Refers to the subtle foreground. */\n Subtle: 'subtle',\n /** Refers to the primary brand color. */\n Brand: 'brand',\n /** Refers to the positive / confirmation color. */\n Success: 'success',\n /** Refers to the caution color. */\n Warning: 'warning',\n /** Refers to the destructive / error color. */\n Danger: 'danger',\n /** Refers to the informational color. */\n Info: 'info',\n} as const;\n\nexport type TextColor = (typeof TextColor)[keyof typeof TextColor];\n\n/** Defines the Text alignment. */\nexport const TextAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to centered alignment. */\n Center: 'center',\n /** Refers to right alignment. */\n Right: 'right',\n /** Refers to justified alignment. */\n Justify: 'justify',\n} as const;\n\nexport type TextAlign = (typeof TextAlign)[keyof typeof TextAlign];\n\nexport const textVariants = tv({\n base: '',\n variants: {\n size: {\n xs: 'text-xs',\n sm: 'text-sm',\n md: 'text-base',\n lg: 'text-lg',\n xl: 'text-xl',\n },\n weight: {\n normal: 'font-normal',\n medium: 'font-medium',\n semibold: 'font-semibold',\n bold: 'font-bold',\n },\n color: {\n default: 'text-foreground',\n muted: 'text-muted-foreground',\n subtle: 'text-subtle-foreground',\n brand: 'text-primary',\n success: 'text-success',\n warning: 'text-warning',\n danger: 'text-destructive',\n info: 'text-info',\n },\n align: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n justify: 'text-justify',\n },\n isTruncated: {\n true: 'truncate',\n },\n isTabular: {\n true: 'tabular-nums',\n },\n },\n defaultVariants: {\n size: 'md',\n weight: 'normal',\n color: 'default',\n },\n});\n\nexport type TextVariants = VariantProps<typeof textVariants>;\n\n/* Compile-time lock: enum values ≡ tv size/weight/color/align value-sets (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertTextSize: AssertExact<\n Size,\n NonNullable<VariantProps<typeof textVariants>['size']>\n> = true;\nconst _assertTextWeight: AssertExact<\n TextWeight,\n NonNullable<VariantProps<typeof textVariants>['weight']>\n> = true;\nconst _assertTextColor: AssertExact<\n TextColor,\n NonNullable<VariantProps<typeof textVariants>['color']>\n> = true;\nconst _assertTextAlign: AssertExact<\n TextAlign,\n NonNullable<VariantProps<typeof textVariants>['align']>\n> = true;\nvoid _assertTextSize;\nvoid _assertTextWeight;\nvoid _assertTextColor;\nvoid _assertTextAlign;\n","<script lang=\"ts\">\nimport type { ElementType, Size } from '../../../foundation/utils';\nimport type { TextAlign, TextColor, TextWeight } from './Text.variants';\n\nexport interface TextProps {\n as?: ElementType;\n /** The font size step. */\n size?: Size;\n /** The font weight. */\n weight?: TextWeight;\n /** The color role. */\n color?: TextColor;\n /** The text alignment. */\n align?: TextAlign;\n /** The single-line truncation with an ellipsis. */\n isTruncated?: boolean;\n /** The tabular (fixed-width) figures treatment. */\n isTabular?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { textVariants } from './Text.variants';\n\n/**\n * Body text. Renders as `<p>` by default; pass `as=\"span\"` (or any element)\n * to keep semantics consistent with the surrounding markup.\n */\ndefineOptions({ name: 'Text', inheritAttrs: false });\n\n/** The text content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/**\n * `isTruncated` / `isTabular` default to `undefined`, not `false`: Vue casts an\n * absent `Boolean` prop to `false`, which would hand `textVariants` an explicit\n * `false` where React handed it `undefined`. Same rendered class either way for\n * these two, but the tri-state is what the variants config expects.\n */\nconst props = withDefaults(defineProps<TextProps>(), {\n as: 'p',\n isTruncated: undefined,\n isTabular: undefined,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst classes = computed(() =>\n cn(\n textVariants({\n size: props.size,\n weight: props.weight,\n color: props.color,\n align: props.align,\n isTruncated: props.isTruncated,\n isTabular: props.isTabular,\n }),\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component :is=\"props.as\" ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></component>\n</template>\n","import { tv, type VariantProps } from '../../../foundation/utils';\n\n/** Defines the Code rendering mode. */\nexport const CodeVariant = {\n /** Refers to inline code within a text run. */\n Inline: 'inline',\n /** Refers to a full-width block. */\n Block: 'block',\n} as const;\n\nexport type CodeVariant = (typeof CodeVariant)[keyof typeof CodeVariant];\n\nexport const codeVariants = tv({\n base: 'font-mono text-sm',\n variants: {\n variant: {\n inline: 'rounded-sm bg-muted px-1 py-0.5 text-foreground',\n block: 'block w-full overflow-x-auto rounded-md bg-muted p-4 text-foreground',\n },\n },\n defaultVariants: {\n variant: 'inline',\n },\n});\n\nexport type CodeVariants = VariantProps<typeof codeVariants>;\n\n/* Compile-time lock: enum values ≡ tv variant value-set (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertCodeVariant: AssertExact<\n CodeVariant,\n NonNullable<VariantProps<typeof codeVariants>['variant']>\n> = true;\nvoid _assertCodeVariant;\n","<script lang=\"ts\">\nimport type { CodeVariant } from './Code.variants';\n\nexport interface CodeProps {\n /** The rendering mode. */\n variant?: CodeVariant;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { codeVariants } from './Code.variants';\n\n/**\n * Inline or block code. For block, wrap children in a `<pre>` if you need\n * pre-wrap whitespace; this atom only styles. Syntax highlighting is L5.\n */\ndefineOptions({ name: 'Code', inheritAttrs: false });\n\n/** The code text — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/* No default: `codeVariants`' own `defaultVariants` decides, as in React. */\nconst props = defineProps<CodeProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst classes = computed(() =>\n cn(codeVariants({ variant: props.variant }), attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <code ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></code>\n</template>\n","<script lang=\"ts\">\nimport type { ImgHTMLAttributes } from 'vue';\n\n/** React's `fallback` ReactNode became a named slot, leaving the `<img>` attributes. */\nexport type ImageProps = ImgHTMLAttributes;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Image with built-in error fallback. The fallback slot replaces the\n * `<img>` on error (broken `src`, network failure). For aspect-locked\n * images, wrap in `AspectRatio`.\n */\ndefineOptions({ name: 'Image', inheritAttrs: false });\n\ndefineSlots<{\n /** The element rendered when the image fails to load. */\n fallback?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLImageElement>('el');\n\nconst errored = ref(false);\n\n/* A new src deserves a fresh load attempt — reset the error latch. `src` is a\n fallthrough attr here, not a declared prop, so the watch reads it off `attrs`. */\nwatch(\n () => attrs.src,\n () => {\n errored.value = false;\n },\n);\n\n/** React defaulted `alt` to `''`; in Vue it arrives as a fallthrough attr. */\nconst alt = computed(() => (attrs.alt as string | undefined) ?? '');\n\nconst classes = computed(() => cn('block max-w-full', attrs.class as string | undefined));\n\n/** Everything but `class` / `alt`, both re-applied explicitly below. */\nconst rest = computed(() => {\n const { class: _class, alt: _alt, ...others } = attrs;\n return others;\n});\n\n/**\n * A consumer-supplied `onError` rides in `rest`; Vue's `mergeProps` chains it\n * with this one rather than replacing it, matching React's `onError?.(e)` call.\n */\nconst onError = (): void => {\n errored.value = true;\n};\n\ndefineExpose({ el });\n</script>\n\n<template>\n <slot v-if=\"errored && $slots.fallback\" name=\"fallback\" />\n <img v-else ref=\"el\" v-bind=\"rest\" :alt=\"alt\" :class=\"classes\" @error=\"onError\" />\n</template>\n","import { tv, type VariantProps } from '../../../foundation/utils';\n\n/** Defines the Avatar silhouette. */\nexport const AvatarShape = {\n /** Refers to a circular avatar. */\n Circle: 'circle',\n /** Refers to a rounded-square avatar. */\n Square: 'square',\n} as const;\n\nexport type AvatarShape = (typeof AvatarShape)[keyof typeof AvatarShape];\n\n/** Defines the Avatar tone palette (`none` cedes color to autoColor). */\nexport const AvatarTone = {\n /** Refers to no tone — autoColor takes over the cascade. */\n None: 'none',\n /** Refers to the neutral / default palette. */\n Neutral: 'neutral',\n /** Refers to the primary brand palette. */\n Primary: 'primary',\n /** Refers to the destructive / error palette. */\n Danger: 'danger',\n /** Refers to the positive / confirmation palette. */\n Success: 'success',\n /** Refers to the caution palette. */\n Warning: 'warning',\n} as const;\n\nexport type AvatarTone = (typeof AvatarTone)[keyof typeof AvatarTone];\n\n/** Defines the Avatar background fill style. */\nexport const AvatarBackground = {\n /** Refers to a flat, solid fill. */\n Solid: 'solid',\n /** Refers to a tone-gradient fill. */\n Gradient: 'gradient',\n} as const;\n\nexport type AvatarBackground = (typeof AvatarBackground)[keyof typeof AvatarBackground];\n\n/** Defines the Avatar focus/emphasis ring tone. */\nexport const AvatarRing = {\n /** Refers to no ring. */\n None: 'none',\n /** Refers to a neutral border ring. */\n Neutral: 'neutral',\n /** Refers to a primary-toned ring. */\n Primary: 'primary',\n /** Refers to a destructive-toned ring. */\n Danger: 'danger',\n /** Refers to a success-toned ring. */\n Success: 'success',\n /** Refers to a caution-toned ring. */\n Warning: 'warning',\n} as const;\n\nexport type AvatarRing = (typeof AvatarRing)[keyof typeof AvatarRing];\n\nexport const avatarVariants = tv({\n base: 'inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-medium',\n variants: {\n size: {\n xs: 'h-6 w-6 text-xs',\n sm: 'h-8 w-8 text-sm',\n md: 'h-10 w-10 text-base',\n lg: 'h-12 w-12 text-lg',\n xl: 'h-16 w-16 text-xl',\n '2xl': 'h-20 w-20 text-2xl',\n },\n shape: {\n circle: 'rounded-full',\n square: 'rounded-md',\n },\n tone: {\n // 'none' is used when autoColor takes over — prevents theme tokens from competing in the cascade.\n none: '',\n neutral: 'bg-muted text-muted-foreground',\n primary: 'bg-primary-soft text-primary-soft-foreground',\n danger: 'bg-destructive-soft text-destructive-soft-foreground',\n success: 'bg-success-soft text-success-soft-foreground',\n warning: 'bg-warning-soft text-warning-soft-foreground',\n },\n bgStyle: {\n solid: '',\n // Gradient class composed in compoundVariants × tone.\n gradient: '',\n },\n ring: {\n none: '',\n neutral: 'ring-2 ring-offset-2 ring-border ring-offset-background',\n primary: 'ring-2 ring-offset-2 ring-primary ring-offset-background',\n danger: 'ring-2 ring-offset-2 ring-destructive ring-offset-background',\n success: 'ring-2 ring-offset-2 ring-success ring-offset-background',\n warning: 'ring-2 ring-offset-2 ring-warning ring-offset-background',\n },\n isLoading: {\n true: 'animate-pulse !bg-muted text-transparent',\n false: '',\n },\n },\n compoundVariants: [\n // gradient × tone\n { bgStyle: 'gradient', tone: 'neutral', class: 'bg-gradient-to-br from-muted to-muted/40' },\n { bgStyle: 'gradient', tone: 'primary', class: 'bg-gradient-to-br from-primary-soft to-primary text-primary-foreground' },\n { bgStyle: 'gradient', tone: 'danger', class: 'bg-gradient-to-br from-destructive-soft to-destructive text-destructive-foreground' },\n { bgStyle: 'gradient', tone: 'success', class: 'bg-gradient-to-br from-success-soft to-success text-success-foreground' },\n { bgStyle: 'gradient', tone: 'warning', class: 'bg-gradient-to-br from-warning-soft to-warning text-warning-foreground' },\n ],\n defaultVariants: {\n size: 'md',\n shape: 'circle',\n tone: 'neutral',\n bgStyle: 'solid',\n ring: 'none',\n isLoading: false,\n },\n});\n\nexport type AvatarVariants = VariantProps<typeof avatarVariants>;\n\n/* Compile-time lock: enum values ≡ tv shape/tone/bgStyle/ring value-sets (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertAvatarShape: AssertExact<\n AvatarShape,\n NonNullable<VariantProps<typeof avatarVariants>['shape']>\n> = true;\nconst _assertAvatarTone: AssertExact<\n AvatarTone,\n NonNullable<VariantProps<typeof avatarVariants>['tone']>\n> = true;\nconst _assertAvatarBackground: AssertExact<\n AvatarBackground,\n NonNullable<VariantProps<typeof avatarVariants>['bgStyle']>\n> = true;\nconst _assertAvatarRing: AssertExact<\n AvatarRing,\n NonNullable<VariantProps<typeof avatarVariants>['ring']>\n> = true;\nvoid _assertAvatarShape;\nvoid _assertAvatarTone;\nvoid _assertAvatarBackground;\nvoid _assertAvatarRing;\n","<script lang=\"ts\">\nimport type { CSSProperties } from 'vue';\nimport type { SizePreset, SizeUnion } from '../../../foundation/utils';\n/* The four value-sets are imported as values (not `import type`) so the one binding serves\n as both the prop type below and the runtime enum used in the auto-color guard. */\nimport {\n AvatarBackground,\n AvatarRing,\n AvatarShape,\n AvatarTone,\n type AvatarVariants,\n} from './Avatar.variants';\n\n/* Avatar supports the full canonical preset vocabulary. */\ntype AvatarSizePreset = SizePreset;\n\n/**\n * The size union — preset (`xs|sm|md|lg|xl|2xl`) · raw number/string (square inline dims) ·\n * object (explicit dims). Named here so `AvatarGroup` can reuse it.\n */\nexport type AvatarSize = SizeUnion<AvatarSizePreset>;\n\nconst AVATAR_SIZE_PRESETS: ReadonlySet<string> = new Set<AvatarSizePreset>([\n 'xs', 'sm', 'md', 'lg', 'xl', '2xl',\n]);\n\n/* Solid palette for autoColor — 17 distinct hues, dark-mode aware. Light: bg-100/text-800. Dark: bg-900/text-100. No opacity — keeps contrast deterministic across themes. */\nconst AUTO_COLOR_PALETTE = [\n 'bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-100',\n 'bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-100',\n 'bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-100',\n 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100',\n 'bg-lime-100 text-lime-800 dark:bg-lime-900 dark:text-lime-100',\n 'bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100',\n 'bg-emerald-100 text-emerald-800 dark:bg-emerald-900 dark:text-emerald-100',\n 'bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-100',\n 'bg-cyan-100 text-cyan-800 dark:bg-cyan-900 dark:text-cyan-100',\n 'bg-sky-100 text-sky-800 dark:bg-sky-900 dark:text-sky-100',\n 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-100',\n 'bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-100',\n 'bg-violet-100 text-violet-800 dark:bg-violet-900 dark:text-violet-100',\n 'bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-100',\n 'bg-fuchsia-100 text-fuchsia-800 dark:bg-fuchsia-900 dark:text-fuchsia-100',\n 'bg-pink-100 text-pink-800 dark:bg-pink-900 dark:text-pink-100',\n 'bg-rose-100 text-rose-800 dark:bg-rose-900 dark:text-rose-100',\n];\n\nfunction hashName(name: string): number {\n let h = 0;\n for (let i = 0; i < name.length; i++) {\n h = (h * 31 + name.charCodeAt(i)) | 0;\n }\n return Math.abs(h);\n}\n\nfunction pickAutoColor(name: string): string {\n return AUTO_COLOR_PALETTE[hashName(name) % AUTO_COLOR_PALETTE.length]!;\n}\n\nfunction getInitials(name: string): string {\n const parts = name.trim().split(/\\s+/);\n if (parts.length === 0) return '';\n const first = parts[0]?.[0] ?? '';\n const last = parts.length > 1 ? parts[parts.length - 1]?.[0] ?? '' : '';\n return (first + last).toUpperCase();\n}\n\nexport interface AvatarProps {\n /** The silhouette. */\n shape?: AvatarShape;\n\n /** The tone palette (`none` cedes color to autoColor). */\n tone?: AvatarTone;\n\n /** The background fill style. */\n bgStyle?: AvatarBackground;\n\n /** The focus/emphasis ring tone. */\n ring?: AvatarRing;\n\n /** The skeleton state — pulses the tile and hides its content. */\n isLoading?: boolean;\n\n /** The image source; falls back to `name` initials or `fallback` on error. */\n src?: string;\n\n /** The person/entity name — used to derive initials when no image. */\n name?: string;\n\n /** The custom fallback (overrides initials). Rich content goes through the `fallback` slot. */\n fallback?: string | number;\n\n /** The alt text for the underlying `<img>` (defaults to `name`). */\n alt?: string;\n\n /** The auto-color flag — when true (and no explicit non-neutral `tone` / non-solid `bgStyle`), derives a deterministic soft-color tint from `name` hash → 17-color palette. */\n canAutoColor?: boolean;\n\n /** The size — preset (`xs|sm|md|lg|xl|2xl`) → variant class · raw number/string → square inline · object → explicit dims. See `AvatarSize`. */\n size?: AvatarSize;\n}\n\n/* Compile-time lock: the hand-written `isLoading` prop ≡ the tv variant key (drift = type error).\n `shape` / `tone` / `bgStyle` / `ring` need no lock here — they use the named enums the\n variants file already locks against `avatarVariants`. */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertAvatarLoading: AssertExact<\n NonNullable<AvatarProps['isLoading']>,\n NonNullable<AvatarVariants['isLoading']>\n> = true;\nvoid _assertAvatarLoading;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport { cn, CssExtensions } from '../../../foundation/utils';\nimport { avatarVariants } from './Avatar.variants';\n\n/**\n * Image avatar with initials fallback. Supports semantic tones, deterministic\n * auto-color from name hash, gradient bg, ring, and loading skeleton.\n * Composable with `<BadgeOverlay>` for status dots / counts / icons.\n */\ndefineOptions({ name: 'Avatar', inheritAttrs: false });\n\ndefineSlots<{\n /** The custom fallback content — wins over the `fallback` prop and the derived initials. */\n fallback?(): unknown;\n}>();\n\n/**\n * `isLoading` / `canAutoColor` default to `undefined`, not `false`: Vue casts an absent\n * `Boolean` prop to `false`, and `avatarVariants` expects the tri-state React handed it.\n */\nconst props = withDefaults(defineProps<AvatarProps>(), {\n name: '',\n isLoading: undefined,\n canAutoColor: undefined,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLSpanElement>('el');\n\nconst errored = ref(false);\n\n/* A new src deserves a fresh load attempt — reset the error latch. */\nwatch(\n () => props.src,\n () => {\n errored.value = false;\n },\n);\n\nconst showImage = computed(() => !!props.src && !errored.value && !props.isLoading);\n\n/* Parse union-typed `size` — preset routes to variant class, raw/object routes to inline dims. */\nconst parsedSize = computed(() =>\n CssExtensions.parseSizeUnion<AvatarSizePreset>(props.size, AVATAR_SIZE_PRESETS),\n);\n\nconst boxStyle = computed<CSSProperties | undefined>(() =>\n parsedSize.value.box ? CssExtensions.resolveBoxSize(parsedSize.value.box) : undefined,\n);\n\n/* Auto-color fires only when: name set, no explicit non-neutral tone, bgStyle not gradient. Explicit dials win. */\nconst autoColorClass = computed(() =>\n props.canAutoColor &&\n props.name &&\n props.bgStyle !== AvatarBackground.Gradient &&\n (props.tone === undefined || props.tone === AvatarTone.Neutral)\n ? pickAutoColor(props.name)\n : undefined,\n);\n\n/* When auto-color is active, suppress the tone variant so its theme-token classes don't compete in the cascade. */\nconst effectiveTone = computed(() => (autoColorClass.value ? AvatarTone.None : props.tone));\n\nconst initials = computed(() => getInitials(props.name));\n\nconst classes = computed(() =>\n cn(\n avatarVariants({\n size: parsedSize.value.preset,\n shape: props.shape,\n tone: effectiveTone.value,\n bgStyle: props.bgStyle,\n ring: props.ring,\n isLoading: props.isLoading,\n }),\n autoColorClass.value,\n attrs.class as string | undefined,\n ),\n);\n\n/** The consumer's inline style lands last, so it wins over the parsed box dims. */\nconst styles = computed(() => [boxStyle.value, attrs.style as CSSProperties | undefined]);\n\n/** Everything but `class` / `style`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, style: _style, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Own attrs first, `v-bind=\"rest\"` after — a consumer-supplied `data-loading` / `aria-busy`\n still wins, as it did through React's trailing `{...props}` spread. -->\n <span\n ref=\"el\"\n :data-loading=\"props.isLoading ? 'true' : undefined\"\n :aria-busy=\"props.isLoading ? true : undefined\"\n v-bind=\"rest\"\n :class=\"classes\"\n :style=\"styles\"\n >\n <img\n v-if=\"showImage\"\n :src=\"props.src\"\n :alt=\"props.alt ?? props.name\"\n class=\"h-full w-full object-cover\"\n @error=\"errored = true\"\n />\n <slot v-else name=\"fallback\">{{ props.fallback ?? initials }}</slot>\n </span>\n</template>\n","import { tv, Size, type VariantProps } from '../../../foundation/utils';\n\n/** Defines the Badge color treatment. */\nexport const BadgeVariant = {\n /** Refers to the neutral grey fill. */\n Neutral: 'neutral',\n /** Refers to the primary brand tint. */\n Brand: 'brand',\n /** Refers to the positive / confirmation tint. */\n Success: 'success',\n /** Refers to the caution tint. */\n Warning: 'warning',\n /** Refers to the destructive / error tint. */\n Danger: 'danger',\n /** Refers to the informational tint. */\n Info: 'info',\n /** Refers to a bordered, transparent fill. */\n Outline: 'outline',\n} as const;\n\nexport type BadgeVariant = (typeof BadgeVariant)[keyof typeof BadgeVariant];\n\nexport const badgeVariants = tv({\n base: 'inline-flex items-center rounded-full font-medium',\n variants: {\n variant: {\n neutral: 'bg-muted text-foreground',\n brand: 'bg-primary-soft text-primary-soft-foreground',\n success: 'bg-success-soft text-success-soft-foreground',\n warning: 'bg-warning-soft text-warning-soft-foreground',\n danger: 'bg-destructive-soft text-destructive-soft-foreground',\n info: 'bg-info-soft text-info-soft-foreground',\n outline: 'border border-border text-foreground',\n },\n size: {\n sm: 'h-5 px-2 text-xs',\n md: 'h-6 px-2.5 text-xs',\n lg: 'h-7 px-3 text-sm',\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'md',\n },\n});\n\nexport type BadgeVariants = VariantProps<typeof badgeVariants>;\n\n/* Compile-time lock: enum values ≡ tv variant value-set (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertBadgeVariant: AssertExact<\n BadgeVariant,\n NonNullable<VariantProps<typeof badgeVariants>['variant']>\n> = true;\n/* `size` prop adopts the shared 5-member `Size`; the tv axis only styles sm/md/lg (widening is intentional). */\nconst _assertBadgeSize: [NonNullable<VariantProps<typeof badgeVariants>['size']>] extends [Size]\n ? true\n : never = true;\nvoid _assertBadgeVariant;\nvoid _assertBadgeSize;\n","<script lang=\"ts\">\nimport type { Size } from '../../../foundation/utils';\nimport type { BadgeVariant } from './Badge.variants';\n\nexport interface BadgeProps {\n /** The color treatment. */\n variant?: BadgeVariant;\n /** The size step. */\n size?: Size;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { badgeVariants, type BadgeVariants } from './Badge.variants';\n\n/**\n * Pill-shaped status / category indicator. Non-interactive — for clickable\n * use `Tag`. For severity-tinted callouts at message scale, use `Alert*`.\n */\ndefineOptions({ name: 'Badge', inheritAttrs: false });\n\n/** The badge copy — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<BadgeProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLSpanElement>('el');\n\nconst classes = computed(() =>\n cn(\n badgeVariants({\n variant: props.variant,\n size: props.size as BadgeVariants['size'],\n }),\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <span ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></span>\n</template>\n","<script lang=\"ts\">\n/* `Orientation` is imported here (not in `<script setup>`) so the one binding\n serves as both the type below and the runtime value used in `withDefaults`. */\nimport { Orientation } from '../../../foundation/utils';\n\nexport interface SeparatorProps {\n orientation?: Orientation;\n /** The decorative mode — `role=\"none\"`, unannounced. Default `true`; set `false` when meaningful in context. */\n isDecorative?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Visual divider. Defaults to a horizontal hairline; pass `orientation=\"vertical\"`\n * for column dividers (use inside a flex/grid with explicit height).\n */\ndefineOptions({ name: 'Separator', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SeparatorProps>(), {\n orientation: Orientation.Horizontal,\n isDecorative: true,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'bg-border',\n props.orientation === Orientation.Horizontal ? 'h-px w-full' : 'w-px self-stretch',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n :role=\"props.isDecorative ? 'none' : 'separator'\"\n :aria-orientation=\"props.isDecorative ? undefined : props.orientation\"\n v-bind=\"rest\"\n :class=\"classes\"\n />\n</template>\n","<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\n\nexport type MarkProps = HTMLAttributes;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Highlighted text — semantic `<mark>` with a yellow tint. Use for search\n * matches and \"you mentioned this\" affordances.\n */\ndefineOptions({ name: 'Mark', inheritAttrs: false });\n\n/** The highlighted text — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'rounded-sm bg-warning-soft px-0.5 text-warning-soft-foreground',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <mark ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></mark>\n</template>\n","<script lang=\"ts\">\nimport type { HTMLAttributes } from 'vue';\n\nexport type QuoteProps = HTMLAttributes;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Block quote with subtle left border and italic body text.\n */\ndefineOptions({ name: 'Quote', inheritAttrs: false });\n\n/** The quoted copy — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLQuoteElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'border-l-4 border-border pl-4 italic text-muted-foreground',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <blockquote ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></blockquote>\n</template>\n","<script lang=\"ts\">\nimport type {\n SurfaceElevation,\n SurfacePadding,\n SurfaceRadius,\n SurfaceTone,\n SurfaceVariant,\n} from '../../../foundation/utils';\n\n/**\n * Represents the prop surface of `Card`.\n *\n * React declared these by `extends SurfaceVariants`; spelled out here because\n * `defineProps<T>()` needs a type the SFC compiler can resolve to a runtime\n * declaration, and `VariantProps<typeof surfaceVariants>` is opaque to it.\n */\nexport interface CardProps {\n /** The visual recipe — solid · soft · surface · outline · glass · elevated · flat · subtle. */\n variant?: SurfaceVariant;\n /** The color tone the recipe is tinted with. */\n tone?: SurfaceTone;\n /** The corner rounding. */\n radius?: SurfaceRadius;\n /** The inner spacing step. */\n padding?: SurfacePadding;\n /** The shadow depth. */\n elevation?: SurfaceElevation;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn, surfaceVariants } from '../../../foundation/utils';\n\n/**\n * Raised surface for grouped content. The sub-components ship as siblings —\n * `CardHeader` / `CardTitle` / `CardDescription` / `CardBody` / `CardFooter` —\n * rather than statics on this component, since an SFC's default export cannot\n * carry them cleanly.\n */\ndefineOptions({ name: 'Card', inheritAttrs: false });\n\n/** The card content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<CardProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn(\n surfaceVariants({\n variant: props.variant ?? 'surface',\n tone: props.tone,\n radius: props.radius ?? 'lg',\n padding: props.padding ?? 'none',\n elevation: props.elevation ?? 1,\n }),\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — every attribute falls through. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The stacked header region of a `Card` — title + description. */\ndefineOptions({ name: 'CardHeader', inheritAttrs: false });\n\n/** The header content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn('flex flex-col gap-1 p-4 pb-2', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — every attribute falls through. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The `h3` title line of a `Card`. */\ndefineOptions({ name: 'CardTitle', inheritAttrs: false });\n\n/** The title copy — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLHeadingElement>('el');\n\nconst classes = computed(() =>\n cn('text-lg font-semibold tracking-tight', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <h3 ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></h3>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — every attribute falls through. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The muted supporting line under a `CardTitle`. */\ndefineOptions({ name: 'CardDescription', inheritAttrs: false });\n\n/** The description copy — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLParagraphElement>('el');\n\nconst classes = computed(() =>\n cn('text-sm text-muted-foreground', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <p ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></p>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — every attribute falls through. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The main content region of a `Card`. */\ndefineOptions({ name: 'CardBody', inheritAttrs: false });\n\n/** The body content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() => cn('p-4 pt-2', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — every attribute falls through. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The bordered action row at the bottom of a `Card`. */\ndefineOptions({ name: 'CardFooter', inheritAttrs: false });\n\n/** The footer content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn('flex items-center gap-2 border-t border-border p-4', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\nimport type { AvatarSize } from '../avatar/Avatar.vue';\n\nexport interface AvatarGroupProps {\n /** The maximum avatars to render. Excess is shown as a \"+N\" tile. */\n max?: number;\n\n /** The avatar size applied to all children. Default `md`. */\n size?: AvatarSize;\n\n /** The negative-margin overlap class applied between avatars. Default `-ml-2`. */\n overlap?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { cloneVNode, computed, useAttrs, useSlots, useTemplateRef, type VNode } from 'vue';\nimport { cn, SizePreset } from '../../../foundation/utils';\nimport { renderableChildren } from '../../../foundation/primitives';\nimport Avatar from '../avatar/Avatar.vue';\n\n/**\n * Stacked group of `Avatar` children with overlap and an optional \"+N more\"\n * indicator when children exceed `max`.\n */\ndefineOptions({ name: 'AvatarGroup', inheritAttrs: false });\n\n/** The `Avatar` children — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<AvatarGroupProps>(), {\n max: undefined,\n size: SizePreset.Md,\n overlap: '-ml-2',\n});\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/**\n * React rebuilt every child as `<Avatar {...child.props} size={size} />`, which forced the\n * group's size *and* the `Avatar` type. A Vue slot hands over already-rendered vnodes, so\n * each is cloned with `size` instead — same size coercion, and a child that is a wrapped or\n * decorated `Avatar` keeps its own type rather than being flattened into a bare one.\n *\n * A function, not a `computed`: the slot is re-invoked on every render, so the vnodes handed\n * to `v-for` are always fresh rather than a cached array of already-mounted ones.\n */\nfunction sizedChildren(): Array<VNode> {\n const all = renderableChildren(slots.default?.());\n const visible = props.max ? all.slice(0, props.max) : all;\n return visible.map((child) => cloneVNode(child, { size: props.size }));\n}\n\nconst overflow = computed(() => {\n const count = renderableChildren(slots.default?.()).length;\n return props.max ? Math.max(0, count - props.max) : 0;\n});\n\nconst classes = computed(() =>\n cn('inline-flex items-center', attrs.class as string | undefined),\n);\n\nconst itemClasses = (index: number): string =>\n cn('ring-2 ring-background rounded-full', index > 0 && props.overlap);\n\nconst overflowClasses = computed(() => cn(props.overlap, 'ring-2 ring-background'));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div v-for=\"(child, index) in sizedChildren()\" :key=\"index\" :class=\"itemClasses(index)\">\n <!-- Force consistent size -->\n <component :is=\"child\" />\n </div>\n <Avatar\n v-if=\"overflow > 0\"\n :size=\"props.size\"\n :fallback=\"`+${overflow}`\"\n :class=\"overflowClasses\"\n />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Placement } from '@floating-ui/vue';\n\nexport interface TooltipProps {\n /** The tooltip body. Rich content goes through the `content` slot. */\n content?: string | number;\n\n /** The Floating UI placement. Default `top`. */\n placement?: Placement;\n\n /** The delay before opening on hover, in ms. Default 700. */\n openDelay?: number;\n\n /** The delay before closing on leave, in ms. Default 0. */\n closeDelay?: number;\n\n /**\n * The open state, controlled. The `v-model:open` binding target.\n *\n * `open` and `isOpen` are the same state under two names: `open` is React's own\n * spelling, `isOpen` the house boolean spelling that mirrors the rest of the\n * port. `open` wins when both are set. Same pairing as `overlays/modal`.\n */\n open?: boolean;\n\n /** The open state, controlled — the house spelling of `open`; `open` wins when both are set. */\n isOpen?: boolean;\n\n /** The initial open state when uncontrolled. Default `false`. */\n defaultOpen?: boolean;\n\n /** The disabled mode — suppresses rendering even on hover (e.g. when content is empty). */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n cloneVNode,\n computed,\n onBeforeUnmount,\n ref,\n shallowRef,\n useSlots,\n watch,\n} from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled, useEscape, useId, useReducedMotion } from '../../../foundation/hooks';\nimport {\n AnchoredPositioner,\n Portal,\n Presence,\n renderableChildren,\n} from '../../../foundation/primitives';\n\n/**\n * Hover-/focus-triggered tooltip. Wraps a single default-slot child as the\n * trigger; the tooltip body renders into a Portal positioned by Floating UI.\n * Default delays mirror the OS pattern (700ms in, 0 out). Escape dismisses\n * without moving focus (WCAG 1.4.13); the trigger is described by the tooltip\n * via `aria-describedby` while open.\n *\n * `inheritAttrs: false` because the component renders a fragment (trigger +\n * portal) — there is no single root for attrs to land on, exactly as in React.\n */\ndefineOptions({ name: 'Tooltip', inheritAttrs: false });\n\ndefineSlots<{\n /** The single child element — the trigger. Receives the handlers, the ref, and `aria-describedby`. */\n default(): unknown;\n /** The rich override for the `content` prop. */\n content?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<TooltipProps>(), {\n content: undefined,\n placement: 'top',\n openDelay: 700,\n closeDelay: 0,\n open: undefined,\n isOpen: undefined,\n defaultOpen: false,\n isDisabled: undefined,\n});\n\nconst emit = defineEmits<{\n /** The `v-model:open` half. */\n 'update:open': [open: boolean];\n /** Emits the open state on every change (hover, focus, Escape) — React's `onOpenChange`. */\n 'open-change': [open: boolean];\n}>();\n\nconst slots = useSlots();\n\n/* `useControlled` returns a handle, not React's tuple, and takes `controlled` as a getter so the\n controlled branch tracks the prop. */\nconst { value: open, setValue: setOpen } = useControlled<boolean>({\n controlled: () => (props.open !== undefined ? props.open : props.isOpen),\n default: props.defaultOpen,\n onChange: (next) => {\n emit('update:open', next);\n emit('open-change', next);\n },\n});\n\nconst anchor = shallowRef<HTMLElement | null>(null);\nconst tooltipId = useId('tooltip');\n\nlet openTimer: ReturnType<typeof setTimeout> | null = null;\nlet closeTimer: ReturnType<typeof setTimeout> | null = null;\n\nfunction clear(): void {\n if (openTimer) clearTimeout(openTimer);\n if (closeTimer) clearTimeout(closeTimer);\n openTimer = null;\n closeTimer = null;\n}\n\nfunction show(): void {\n clear();\n openTimer = setTimeout(() => setOpen(true), props.openDelay);\n}\n\nfunction hide(): void {\n clear();\n closeTimer = setTimeout(() => setOpen(false), props.closeDelay);\n}\n\n/* Clear pending timers on unmount. */\nonBeforeUnmount(clear);\n\n/* WCAG 1.4.13 — Escape dismisses immediately, without moving focus. */\nuseEscape(() => {\n clear();\n setOpen(false);\n}, open);\n\nconst reducedMotion = useReducedMotion();\n\n/**\n * React gated on `!!content`; a Vue consumer can supply the body through the `content` slot\n * instead, so either source counts. An empty tooltip still never opens.\n */\nconst hasContent = computed(() => !!props.content || !!slots.content);\n\nconst visible = computed(() => !props.isDisabled && open.value && hasContent.value);\n\n/* Keep the Portal + positioner mounted while the exit animation plays.\n Becomes true with `visible`; cleared on the body's pop-out `animationend`\n (see `onAnimationEnd` below). With reduced motion no exit animation runs,\n so tear the shell down immediately on close. */\nconst mounted = ref(false);\nwatch(\n [visible, reducedMotion],\n ([isVisible, isReduced]) => {\n if (isVisible) mounted.value = true;\n else if (isReduced) mounted.value = false;\n },\n { immediate: true },\n);\n\nfunction onAnimationEnd(): void {\n if (!visible.value) mounted.value = false;\n}\n\n/** A function ref may receive a component's public instance; the positioner needs the DOM node. */\nfunction setAnchor(value: unknown): void {\n const node = (value as { $el?: unknown } | null)?.$el ?? value;\n anchor.value = node instanceof HTMLElement ? node : null;\n}\n\n/**\n * React cloned the child element to attach the ref, the handlers and `aria-describedby`.\n * `cloneVNode` is the Vue counterpart and merges through `mergeProps`, so a handler the\n * consumer already put on the trigger is chained rather than replaced — the job React's\n * explicit `trigger.props.onPointerEnter?.(e)` forwarding did.\n *\n * The listener keys are all-lowercase after `on` (`onPointerenter`, not `onPointerEnter`):\n * Vue hyphenates the remainder to derive the DOM event name, so the React casing would\n * register `pointer-enter` and never fire.\n */\nconst trigger = computed(() => {\n const child = renderableChildren(slots.default?.())[0];\n if (!child) return null;\n const own = child.props?.['aria-describedby'] as string | undefined;\n return cloneVNode(\n child,\n {\n ref: setAnchor,\n 'aria-describedby': visible.value ? [own, tooltipId].filter(Boolean).join(' ') : own,\n onPointerenter: show,\n onPointerleave: hide,\n onFocus: show,\n onBlur: hide,\n },\n true,\n );\n});\n\nconst contentClasses = cn(\n 'z-tooltip rounded-md bg-inverse px-2.5 py-1.5 text-xs text-inverse-foreground shadow-md',\n 'motion-safe:data-[state=open]:animate-(--animate-pop-in)',\n 'motion-safe:data-[state=closed]:animate-(--animate-pop-out)',\n);\n</script>\n\n<template>\n <component :is=\"trigger\" v-if=\"trigger\" />\n <slot v-else />\n <Portal v-if=\"mounted\">\n <!-- Exit animation bubbles up from the body; once the closed-state pop-out ends, tear down\n the Portal shell. Also covers the reduced-motion path, where no animation runs and\n `Presence` has already unmounted the body. -->\n <AnchoredPositioner\n :anchor=\"anchor\"\n :placement=\"props.placement\"\n :offset=\"6\"\n @animationend=\"onAnimationEnd\"\n >\n <!-- `Presence` clones `data-state` (\"open\" | \"closed\") + its tracking ref onto the body,\n which is what gates the pop-in / pop-out keyframes. Motion sits behind `motion-safe:`\n so reduced-motion users get an instant show/hide. -->\n <Presence :is-present=\"visible\">\n <div :id=\"tooltipId\" role=\"tooltip\" :class=\"contentClasses\">\n <slot name=\"content\">{{ props.content }}</slot>\n </div>\n </Presence>\n </AnchoredPositioner>\n </Portal>\n</template>\n","<script lang=\"ts\">\n/** Defines the EmptyState visual size. */\nexport const EmptyStateSize = {\n /** Refers to the small layout. */\n Sm: 'sm',\n /** Refers to the medium layout. */\n Md: 'md',\n /** Refers to the large layout. */\n Lg: 'lg',\n} as const;\n\nexport type EmptyStateSize = (typeof EmptyStateSize)[keyof typeof EmptyStateSize];\n\nexport interface EmptyStateProps {\n /**\n * The heading copy. React typed this `ReactNode`; a scalar stays a prop so it\n * remains the discriminator, and the same-named slot is the rich override.\n */\n title: string | number;\n\n /** The body copy below the title. Same prop-plus-slot pairing as `title`. */\n description?: string | number;\n\n /** The visual size. Default `md`. */\n size?: EmptyStateSize;\n}\n\nconst SIZE: Record<EmptyStateSize, { wrap: string; iconBox: string }> = {\n sm: { wrap: 'gap-2 py-6', iconBox: 'h-10 w-10' },\n md: { wrap: 'gap-3 py-10', iconBox: 'h-14 w-14' },\n lg: { wrap: 'gap-4 py-16', iconBox: 'h-20 w-20' },\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport Heading from '../heading/Heading.vue';\nimport Text from '../text/Text.vue';\n\n/**\n * Empty-list / no-results affordance: icon + title + description + actions.\n * Pass any subset; the component centers everything vertically.\n */\ndefineOptions({ name: 'EmptyState', inheritAttrs: false });\n\n/**\n * React's `icon` / `actions` were structural `ReactNode` props — regions with no\n * prop equivalent in Vue, so they become slots. `title` / `description` stay\n * props (scalars) with a same-named slot as the rich override.\n */\ndefineSlots<{\n /** The optional icon, centered in a tinted disc. */\n icon(): unknown;\n /** The heading copy — overrides the `title` prop's rendering. */\n title(): unknown;\n /** The body copy — overrides the `description` prop's rendering. */\n description(): unknown;\n /** The action(s) — usually one or two `Button`s. */\n actions(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<EmptyStateProps>(), {\n description: undefined,\n size: EmptyStateSize.Md,\n});\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst sizing = computed(() => SIZE[props.size]);\n\nconst headingSize = computed(() =>\n props.size === EmptyStateSize.Sm ? 'md' : props.size === EmptyStateSize.Lg ? 'xl' : 'lg',\n);\n\nconst textSize = computed(() => (props.size === EmptyStateSize.Lg ? 'md' : 'sm'));\n\nconst hasDescription = computed(() => props.description !== undefined || !!slots.description);\n\nconst classes = computed(() =>\n cn(\n 'flex flex-col items-center text-center',\n sizing.value.wrap,\n attrs.class as string | undefined,\n ),\n);\n\nconst iconBoxClasses = computed(() =>\n cn(\n 'flex items-center justify-center rounded-full bg-muted text-muted-foreground',\n sizing.value.iconBox,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div v-if=\"$slots.icon\" :class=\"iconBoxClasses\"><slot name=\"icon\" /></div>\n <Heading :level=\"3\" :size=\"headingSize\">\n <slot name=\"title\">{{ props.title }}</slot>\n </Heading>\n <Text v-if=\"hasDescription\" color=\"muted\" :size=\"textSize\">\n <slot name=\"description\">{{ props.description }}</slot>\n </Text>\n <div v-if=\"$slots.actions\" class=\"mt-2 flex items-center gap-2\"><slot name=\"actions\" /></div>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the Stat tile visual size. */\nexport const StatSize = {\n /** Refers to the small tile. */\n Sm: 'sm',\n /** Refers to the medium tile. */\n Md: 'md',\n /** Refers to the large tile. */\n Lg: 'lg',\n} as const;\n\nexport type StatSize = (typeof StatSize)[keyof typeof StatSize];\n\n/** The optional trend readout — positive = up/green, negative = down/red. */\nexport interface StatTrend {\n /** The signed percentage. */\n value: number;\n\n /** The muted caption rendered after the percentage. */\n label?: string | number;\n}\n\nexport interface StatProps {\n /** The label above the value. Rich content goes through the `label` slot. */\n label: string | number;\n\n /** The primary value (large). Rich content goes through the `value` slot. */\n value: string | number;\n\n /** The optional trend — positive = up/green, negative = down/red. */\n trend?: StatTrend;\n\n /** The optional helper / supporting text below. Rich content goes through the `helper` slot. */\n helper?: string | number;\n\n /** The visual size. Default `md`. */\n size?: StatSize;\n}\n\nconst VALUE_SIZE: Record<StatSize, '2xl' | '3xl' | '4xl'> = {\n sm: '2xl',\n md: '3xl',\n lg: '4xl',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { TrendingDown, TrendingUp } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport Heading from '../heading/Heading.vue';\nimport Text from '../text/Text.vue';\n\n/**\n * Single metric tile — label + big value + optional trend + helper. Use\n * inside dashboards / KPI grids.\n */\ndefineOptions({ name: 'Stat', inheritAttrs: false });\n\ndefineSlots<{\n /** The rich override for the `label` prop. */\n label?(): unknown;\n /** The rich override for the `value` prop. */\n value?(): unknown;\n /** The rich override for the `helper` prop. */\n helper?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<StatProps>(), { size: 'md' });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst trendUp = computed(() => (props.trend ? props.trend.value >= 0 : false));\n\nconst valueSize = computed(() => VALUE_SIZE[props.size]);\n\nconst classes = computed(() =>\n cn('flex flex-col gap-1', attrs.class as string | undefined),\n);\n\nconst trendClasses = computed(() =>\n cn(\n 'inline-flex items-center gap-0.5 text-xs font-medium',\n trendUp.value ? 'text-success' : 'text-destructive',\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <Text size=\"sm\" color=\"muted\"><slot name=\"label\">{{ props.label }}</slot></Text>\n <Heading :level=\"3\" :size=\"valueSize\" weight=\"bold\">\n <slot name=\"value\">{{ props.value }}</slot>\n </Heading>\n <div v-if=\"props.trend || props.helper\" class=\"mt-1 flex items-center gap-2\">\n <span v-if=\"props.trend\" :class=\"trendClasses\">\n <Icon :icon=\"trendUp ? TrendingUp : TrendingDown\" :size=\"12\" />\n {{ props.trend.value > 0 ? '+' : '' }}{{ props.trend.value }}%\n <span v-if=\"props.trend.label\" class=\"text-muted-foreground\"> {{ props.trend.label }}</span>\n </span>\n <Text v-if=\"props.helper && !props.trend\" size=\"xs\" color=\"muted\">\n <slot name=\"helper\">{{ props.helper }}</slot>\n </Text>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the Snippet layout variant. */\nexport const SnippetVariant = {\n /** Refers to a single-line inline snippet. */\n Inline: 'inline',\n /** Refers to a multi-line block snippet. */\n Block: 'block',\n} as const;\n\nexport type SnippetVariant = (typeof SnippetVariant)[keyof typeof SnippetVariant];\n\nexport interface SnippetProps {\n /** The code text to display + copy. */\n text: string;\n\n /** The visual variant — `inline` (single line) or `block` (multi-line). Default `inline`. */\n variant?: SnippetVariant;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { Check, Copy } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useClipboard } from '../../../foundation/hooks';\nimport Code from '../code/Code.vue';\n\nconst CopiedIcon = Check;\nconst CopyIcon = Copy;\n\n/**\n * Code text with a built-in copy button. Inline variant for one-liners,\n * block variant for multi-line snippets. Copy logic uses the L1\n * `useClipboard` hook directly (Snippet stays in display, can't import the\n * actions/CopyButton component).\n */\ndefineOptions({ name: 'Snippet', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SnippetProps>(), { variant: SnippetVariant.Inline });\n\nconst { copied, copy } = useClipboard();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'group relative inline-flex w-full items-start',\n props.variant === SnippetVariant.Inline ? 'gap-2' : 'flex-col gap-0',\n attrs.class as string | undefined,\n ),\n);\n\nconst buttonClasses = computed(() =>\n cn(\n 'absolute right-2 grid h-7 w-7 place-items-center rounded text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n props.variant === SnippetVariant.Inline ? 'top-1/2 -translate-y-1/2' : 'top-2',\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\nconst onCopy = (): void => {\n void copy(props.text);\n};\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <Code :variant=\"props.variant\" class=\"flex-1 pr-10\">{{ props.text }}</Code>\n <button\n type=\"button\"\n :aria-label=\"copied ? 'Copied' : 'Copy'\"\n :class=\"buttonClasses\"\n @click=\"onCopy\"\n >\n <Icon :icon=\"copied ? CopiedIcon : CopyIcon\" :size=\"14\" />\n </button>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { CornerPosition } from '../../../foundation/utils';\n\n/** Defines the NotificationDot color tone. */\nexport const NotificationDotTone = {\n /** Refers to the destructive / error color. */\n Destructive: 'destructive',\n /** Refers to the positive / confirmation color. */\n Success: 'success',\n /** Refers to the caution color. */\n Warning: 'warning',\n /** Refers to the informational color. */\n Info: 'info',\n /** Refers to the primary brand color. */\n Primary: 'primary',\n /** Refers to the neutral color. */\n Neutral: 'neutral',\n} as const;\n\nexport type NotificationDotTone =\n (typeof NotificationDotTone)[keyof typeof NotificationDotTone];\n\n/** Defines the NotificationDot size step. */\nexport const NotificationDotSize = {\n /** Refers to the extra-small dot. */\n Xs: 'xs',\n /** Refers to the small dot. */\n Sm: 'sm',\n /** Refers to the medium dot. */\n Md: 'md',\n} as const;\n\nexport type NotificationDotSize =\n (typeof NotificationDotSize)[keyof typeof NotificationDotSize];\n\nexport interface NotificationDotProps {\n /** The color tone. Default `destructive`. */\n tone?: NotificationDotTone;\n\n /** The size step. Default `sm`. */\n size?: NotificationDotSize;\n\n /** The pulsing ring around the dot. */\n hasPulse?: boolean;\n\n /** The corner position — when set, the dot is positioned absolutely relative to its parent. */\n position?: CornerPosition;\n}\n\nconst TONE: Record<NotificationDotTone, string> = {\n destructive: 'bg-destructive',\n success: 'bg-success',\n warning: 'bg-warning',\n info: 'bg-info',\n primary: 'bg-primary',\n neutral: 'bg-muted-foreground',\n};\n\n/* Static literal map — Tailwind must see the complete `after:bg-*` class names. */\nconst PULSE_TONE: Record<NotificationDotTone, string> = {\n destructive: 'after:bg-destructive',\n success: 'after:bg-success',\n warning: 'after:bg-warning',\n info: 'after:bg-info',\n primary: 'after:bg-primary',\n neutral: 'after:bg-muted-foreground',\n};\n\nconst SIZE: Record<NotificationDotSize, string> = {\n xs: 'h-1.5 w-1.5',\n sm: 'h-2 w-2',\n md: 'h-2.5 w-2.5',\n};\n\nconst POS: Record<CornerPosition, string> = {\n 'top-right': 'absolute -top-0.5 -right-0.5',\n 'top-left': 'absolute -top-0.5 -left-0.5',\n 'bottom-right': 'absolute -bottom-0.5 -right-0.5',\n 'bottom-left': 'absolute -bottom-0.5 -left-0.5',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Tiny colored dot — unread/notification indicator. Pass `position` to\n * absolutely-place over a parent (e.g. on an Avatar or `<Button shape=\"square\"/circle\">`).\n */\ndefineOptions({ name: 'NotificationDot', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<NotificationDotProps>(), {\n tone: 'destructive',\n size: 'sm',\n hasPulse: undefined,\n position: undefined,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLSpanElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'inline-flex rounded-full ring-2 ring-background',\n TONE[props.tone],\n SIZE[props.size],\n /* `relative` anchors the ::after ring; POS comes later so its `absolute` wins when positioned. */\n props.hasPulse &&\n `relative after:absolute after:inset-0 after:animate-ping after:rounded-full after:opacity-75 after:content-[\"\"] ${PULSE_TONE[props.tone]}`,\n props.position && POS[props.position],\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <span ref=\"el\" aria-hidden=\"true\" v-bind=\"rest\" :class=\"classes\" />\n</template>\n","<script lang=\"ts\">\nimport type { BadgeVariant } from '../badge/Badge.variants';\n\nexport interface CountBadgeProps {\n /** The numeric count. */\n value: number;\n\n /** The cap value — shows \"max+\" when exceeded. Default 99. */\n max?: number;\n\n /** The hide-when-zero mode — hides entirely when count is 0. Default true. */\n canHideZero?: boolean;\n\n /**\n * The color treatment. React spelled this `BadgeProps['variant']`; the named\n * `BadgeVariant` union it resolves to is used directly, because the SFC\n * compiler cannot follow an indexed access into an imported interface.\n */\n variant?: BadgeVariant;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn, Size } from '../../../foundation/utils';\nimport { BadgeVariant as BadgeVariantValue } from '../badge/Badge.variants';\nimport Badge from '../badge/Badge.vue';\n\n/**\n * Numeric badge for notification / inbox counts. Shows \"{value}\" or \"{max}+\"\n * past the cap. Hides when `value === 0` unless `:can-hide-zero=\"false\"`.\n */\ndefineOptions({ name: 'CountBadge', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<CountBadgeProps>(), {\n max: 99,\n canHideZero: true,\n variant: BadgeVariantValue.Danger,\n});\n\nconst attrs = useAttrs();\nconst inner = useTemplateRef<InstanceType<typeof Badge>>('inner');\n\n/** The inner `Badge`'s root element — the React original's forwarded ref. */\nconst el = computed(() => inner.value?.el ?? null);\n\n/** React returned `null` at zero; Vue renders nothing through `v-if`. */\nconst isVisible = computed(() => !(props.value === 0 && props.canHideZero));\n\nconst display = computed(() => (props.value > props.max ? `${props.max}+` : `${props.value}`));\n\nconst classes = computed(() =>\n cn('min-w-5 justify-center px-1.5', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Badge\n v-if=\"isVisible\"\n ref=\"inner\"\n :variant=\"props.variant\"\n :size=\"Size.Sm\"\n v-bind=\"rest\"\n :class=\"classes\"\n >{{ display }}</Badge\n >\n</template>\n","<script lang=\"ts\">\n/* `StatusTone` is imported here (not in `<script setup>`) so the one binding serves as both\n the prop type below and the runtime value used in `withDefaults`. */\nimport { StatusTone } from '../../../foundation/utils';\n\n/** Defines the Status visual size. */\nexport const StatusSize = {\n /** Refers to the extra-small indicator. */\n Xs: 'xs',\n /** Refers to the small indicator. */\n Sm: 'sm',\n /** Refers to the medium indicator. */\n Md: 'md',\n} as const;\n\nexport type StatusSize = (typeof StatusSize)[keyof typeof StatusSize];\n\nexport interface StatusProps {\n /** The semantic tone of the dot. Default `success`. */\n tone?: StatusTone;\n\n /** The optional pulsing ring around the dot. */\n hasPulse?: boolean;\n\n /** The visual size — drives dot dimensions, text size, and gap. Default `md`. */\n size?: StatusSize;\n}\n\nconst TONE: Record<StatusTone, string> = {\n success: 'bg-success',\n warning: 'bg-warning',\n destructive: 'bg-destructive',\n info: 'bg-info',\n neutral: 'bg-muted-foreground',\n};\n\nconst SIZE: Record<StatusSize, { wrapper: string; dot: string }> = {\n xs: { wrapper: 'gap-1.5 text-xs', dot: 'h-1.5 w-1.5' },\n sm: { wrapper: 'gap-1.5 text-sm', dot: 'h-2 w-2' },\n md: { wrapper: 'gap-2 text-sm', dot: 'h-2 w-2' },\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Colored dot + text label — server status, online presence, build state.\n * Use `Status` (with text) for labelled indicators; `NotificationDot` for\n * the bare positioned dot.\n */\ndefineOptions({ name: 'Status', inheritAttrs: false });\n\n/** The label rendered after the dot — React's optional `children`. */\ndefineSlots<{ default?(): unknown }>();\n\nconst props = withDefaults(defineProps<StatusProps>(), {\n tone: StatusTone.Success,\n size: StatusSize.Md,\n hasPulse: undefined,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLSpanElement>('el');\n\nconst size = computed(() => SIZE[props.size]);\n\nconst classes = computed(() =>\n cn(\n 'inline-flex items-center text-foreground',\n size.value.wrapper,\n attrs.class as string | undefined,\n ),\n);\n\nconst dotClasses = computed(() =>\n cn('inline-block rounded-full', size.value.dot, TONE[props.tone]),\n);\n\nconst pulseClasses = computed(() =>\n cn('absolute inset-0 inline-block rounded-full opacity-75 animate-ping', TONE[props.tone]),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <span ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <span class=\"relative inline-flex\">\n <span :class=\"dotClasses\" />\n <span v-if=\"props.hasPulse\" :class=\"pulseClasses\" />\n </span>\n <slot />\n </span>\n</template>\n","<script lang=\"ts\">\nexport interface KeyboardShortcutProps {\n /** The keys in order — e.g. `['⌘', 'K']` or `['Ctrl', 'Shift', 'P']`. */\n keys: ReadonlyArray<string>;\n\n /** The connector between keys. Default `'+'`; pass `' '` for spaced keys. */\n separator?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport Kbd from '../kbd/Kbd.vue';\n\n/**\n * Render a sequence of `Kbd` keys with connectors between them — e.g.\n * `<KeyboardShortcut :keys=\"['⌘', 'K']\" />` → ⌘ + K.\n */\ndefineOptions({ name: 'KeyboardShortcut', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<KeyboardShortcutProps>(), { separator: '+' });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLSpanElement>('el');\n\nconst classes = computed(() =>\n cn('inline-flex items-center gap-1 text-muted-foreground', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <span ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <template v-for=\"(keyLabel, i) in props.keys\" :key=\"i\">\n <span v-if=\"i > 0\" aria-hidden=\"true\">{{ props.separator }}</span>\n <Kbd>{{ keyLabel }}</Kbd>\n </template>\n </span>\n</template>\n","<script lang=\"ts\">\nexport interface DescriptionListItem {\n /** React typed this `ReactNode`; the scalar form is what an array item can carry. */\n label: string | number;\n value: string | number;\n}\n\n/** Defines the DescriptionList row layout. */\nexport const DescriptionListLayout = {\n /** Refers to label/value on the same line. */\n Inline: 'inline',\n /** Refers to label stacked above its value. */\n Stacked: 'stacked',\n} as const;\n\nexport type DescriptionListLayout =\n (typeof DescriptionListLayout)[keyof typeof DescriptionListLayout];\n\n/** Defines the DescriptionList inter-row density. */\nexport const DescriptionListDensity = {\n /** Refers to tight row spacing. */\n Sm: 'sm',\n /** Refers to medium row spacing. */\n Md: 'md',\n /** Refers to loose row spacing. */\n Lg: 'lg',\n} as const;\n\nexport type DescriptionListDensity =\n (typeof DescriptionListDensity)[keyof typeof DescriptionListDensity];\n\nexport interface DescriptionListProps {\n items: ReadonlyArray<DescriptionListItem>;\n\n /** The layout direction. `inline` renders label/value on the same line; `stacked` puts label above. */\n layout?: DescriptionListLayout;\n\n /** The density between rows. Default `md`. */\n density?: DescriptionListDensity;\n}\n\nconst ROW_GAP: Record<NonNullable<DescriptionListProps['density']>, string> = {\n sm: 'gap-y-1',\n md: 'gap-y-2',\n lg: 'gap-y-3',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Semantic `<dl>` for label-value pairs (settings panels, property lists).\n * Inline layout uses a 2-column grid; stacked puts each value below its label.\n */\ndefineOptions({ name: 'DescriptionList', inheritAttrs: false });\n\n/**\n * React's items carried `ReactNode` cells; a Vue array prop can only carry\n * scalars, so each cell gets a scoped slot as the rich override. Omitting the\n * slot renders `item.label` / `item.value` exactly as React did.\n */\ndefineSlots<{\n /** The rich override for a row's label cell. */\n label?(props: { item: DescriptionListItem; index: number }): unknown;\n\n /** The rich override for a row's value cell. */\n value?(props: { item: DescriptionListItem; index: number }): unknown;\n}>();\n\nconst props = withDefaults(defineProps<DescriptionListProps>(), {\n layout: DescriptionListLayout.Inline,\n density: DescriptionListDensity.Md,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDListElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'text-sm',\n props.layout === DescriptionListLayout.Inline\n ? 'grid grid-cols-[max-content_1fr] gap-x-4'\n : 'flex flex-col gap-1',\n ROW_GAP[props.density],\n attrs.class as string | undefined,\n ),\n);\n\nconst rowClasses = computed(() =>\n cn('contents', props.layout === DescriptionListLayout.Stacked && 'flex flex-col gap-0.5'),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <dl ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div v-for=\"(item, i) in props.items\" :key=\"i\" :class=\"rowClasses\">\n <dt class=\"text-muted-foreground\">\n <slot name=\"label\" :item=\"item\" :index=\"i\">{{ item.label }}</slot>\n </dt>\n <dd class=\"text-foreground\">\n <slot name=\"value\" :item=\"item\" :index=\"i\">{{ item.value }}</slot>\n </dd>\n </div>\n </dl>\n</template>\n","<script lang=\"ts\">\n/** Defines the InfoRow layout. */\nexport const InfoRowLayout = {\n /** Refers to label-value on one line. */\n Inline: 'inline',\n /** Refers to value stacked below its label. */\n Stacked: 'stacked',\n} as const;\n\nexport type InfoRowLayout = (typeof InfoRowLayout)[keyof typeof InfoRowLayout];\n\nexport interface InfoRowProps {\n /**\n * The label copy. React typed this as a required `ReactNode`; here the scalar\n * form is the prop and the same-named slot is the rich override, so it is\n * optional — a consumer filling `#label` need not also pass the prop.\n */\n label?: string | number;\n\n /** The value copy. Optional for the same reason as `label`. */\n value?: string | number;\n\n /** The layout: `inline` puts label-value on one line; `stacked` puts value below. Default `inline`. */\n layout?: InfoRowLayout;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Single row of label + value, with optional leading icon. Reach for this\n * when you have one or two pairs to show (e.g. inside a Card row); use\n * `DescriptionList` for many pairs.\n */\ndefineOptions({ name: 'InfoRow', inheritAttrs: false });\n\ndefineSlots<{\n /** The optional icon rendered before the label. */\n icon?(): unknown;\n\n /** The rich override for the `label` prop. */\n label?(): unknown;\n\n /** The rich override for the `value` prop. */\n value?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<InfoRowProps>(), { layout: InfoRowLayout.Inline });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'flex text-sm',\n props.layout === InfoRowLayout.Inline\n ? 'items-center justify-between gap-3'\n : 'flex-col gap-0.5',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <span class=\"inline-flex items-center gap-1.5 text-muted-foreground\">\n <slot name=\"icon\" />\n <slot name=\"label\">{{ props.label }}</slot>\n </span>\n <span class=\"text-foreground\">\n <slot name=\"value\">{{ props.value }}</slot>\n </span>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the MetricChip icon tint tone. */\nexport const MetricChipTone = {\n /** Refers to the neutral tint. */\n Neutral: 'neutral',\n /** Refers to the positive / confirmation tint. */\n Success: 'success',\n /** Refers to the caution tint. */\n Warning: 'warning',\n /** Refers to the destructive / error tint. */\n Danger: 'danger',\n /** Refers to the informational tint. */\n Info: 'info',\n} as const;\n\nexport type MetricChipTone = (typeof MetricChipTone)[keyof typeof MetricChipTone];\n\n/** Defines the MetricChip visual size. */\nexport const MetricChipSize = {\n /** Refers to the extra-small chip. */\n Xs: 'xs',\n /** Refers to the small chip. */\n Sm: 'sm',\n /** Refers to the medium chip. */\n Md: 'md',\n} as const;\n\nexport type MetricChipSize = (typeof MetricChipSize)[keyof typeof MetricChipSize];\n\nexport interface MetricChipProps {\n /** The uppercase mini-LABEL rendered after the icon. Rich content goes through the `label` slot. */\n label: string | number;\n\n /** The value rendered after the label, tabular-nums. Rich content goes through the `value` slot. */\n value: string | number;\n\n /** The tone tinting the icon and the value. Default `neutral`. */\n tone?: MetricChipTone;\n\n /** The visual size — drives gap + text-size token. Default `sm`. */\n size?: MetricChipSize;\n}\n\n/**\n * Tints the icon *and* the value.\n *\n * Tinting only the icon made `tone` a no-op on the icon-less chip — every tone\n * emitted an identical class string. The value is the part a reader scans, so it\n * carries the tone whether or not an icon is supplied.\n *\n * Coloured tones use `-soft-foreground`, not the full-strength `{tone}`: this text\n * sits on the host surface, where `text-warning` measures 2.15:1.\n */\nconst TONE: Record<MetricChipTone, { icon: string; value: string }> = {\n neutral: { icon: 'text-muted-foreground', value: 'text-foreground' },\n success: { icon: 'text-success-soft-foreground', value: 'text-success-soft-foreground' },\n warning: { icon: 'text-warning-soft-foreground', value: 'text-warning-soft-foreground' },\n danger: { icon: 'text-destructive-soft-foreground', value: 'text-destructive-soft-foreground' },\n info: { icon: 'text-info-soft-foreground', value: 'text-info-soft-foreground' },\n};\n\nconst SIZE: Record<MetricChipSize, { wrapper: string; label: string; value: string }> = {\n xs: { wrapper: 'gap-1 text-[10px]', label: 'text-[10px]', value: 'text-xs' },\n sm: { wrapper: 'gap-1.5 text-xs', label: 'text-xs', value: 'text-xs' },\n md: { wrapper: 'gap-2 text-sm', label: 'text-xs', value: 'text-sm' },\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Horizontal label-value chip with a leading tone-tinted icon and an\n * uppercase mini-LABEL. Used for stat strips. Distinct from `Stat` (large\n * KPI tile), `InfoRow` (justify-between two-column row), and `Status`\n * (dot+text). Renders inline-flex.\n */\ndefineOptions({ name: 'MetricChip', inheritAttrs: false });\n\ndefineSlots<{\n /** The optional leading icon (tone-tinted via the `tone` prop) — React's `icon` node prop. */\n icon?(): unknown;\n /** The rich override for the `label` prop. */\n label?(): unknown;\n /** The rich override for the `value` prop. */\n value?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<MetricChipProps>(), {\n tone: 'neutral',\n size: 'sm',\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLSpanElement>('el');\n\nconst size = computed(() => SIZE[props.size]);\n\nconst classes = computed(() =>\n cn('inline-flex items-center', size.value.wrapper, attrs.class as string | undefined),\n);\n\nconst tone = computed(() => TONE[props.tone]);\n\nconst iconClasses = computed(() =>\n cn('inline-flex shrink-0 items-center', tone.value.icon),\n);\n\nconst labelClasses = computed(() =>\n cn('font-medium uppercase tracking-wide text-muted-foreground', size.value.label),\n);\n\nconst valueClasses = computed(() => cn('tabular-nums', tone.value.value, size.value.value));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <span ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <span v-if=\"$slots.icon\" :class=\"iconClasses\"><slot name=\"icon\" /></span>\n <span :class=\"labelClasses\"><slot name=\"label\">{{ props.label }}</slot></span>\n <span :class=\"valueClasses\"><slot name=\"value\">{{ props.value }}</slot></span>\n </span>\n</template>\n","<script lang=\"ts\">\ntype EyebrowLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\n/** Defines the Eyebrow color tone. */\nexport const EyebrowTone = {\n /** Refers to the muted foreground. */\n Muted: 'muted',\n /** Refers to the subtle foreground. */\n Subtle: 'subtle',\n /** Refers to the default foreground. */\n Default: 'default',\n} as const;\n\nexport type EyebrowTone = (typeof EyebrowTone)[keyof typeof EyebrowTone];\n\nexport interface EyebrowProps {\n /** The semantic heading level (1–6). Default 3. */\n level?: EyebrowLevel;\n\n /** The color tone. Default `muted`. */\n tone?: EyebrowTone;\n}\n\nconst TONE: Record<NonNullable<EyebrowProps['tone']>, string> = {\n muted: 'text-muted-foreground',\n subtle: 'text-subtle-foreground',\n default: 'text-foreground',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Tiny uppercase mini-heading — used above sections in drawers/cards\n * (\"FULL TEXT\", \"SEGMENTS\"). Lighter than `SectionHeader` (which is a\n * chunkier title+description+actions component). Standardised uppercase +\n * tracking treatment.\n */\ndefineOptions({ name: 'Eyebrow', inheritAttrs: false });\n\n/** The eyebrow copy — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<EyebrowProps>(), {\n level: 3,\n tone: EyebrowTone.Muted,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLHeadingElement>('el');\n\nconst tag = computed(() => `h${props.level}` as 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6');\n\nconst classes = computed(() =>\n cn(\n 'text-[10px] font-semibold uppercase tracking-wider',\n TONE[props.tone],\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component :is=\"tag\" ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></component>\n</template>\n","<script lang=\"ts\">\nexport interface MetaInlineProps {\n /** The gap between left-side meta items. Default `2`. */\n gap?: '1' | '2' | '3';\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport Inline from '../../layout/inline/Inline.vue';\n\n/**\n * Horizontal inline row of meta items (Badges, MetricChips, Status, etc.)\n * + an optional trailing actions slot. Captures the recurring \"meta row\"\n * pattern in drawer/card bodies — badges left, action buttons right.\n */\ndefineOptions({ name: 'MetaInline', inheritAttrs: false });\n\ndefineSlots<{\n /** The left-side meta items — React's `children`. */\n default(): unknown;\n\n /** The right-aligned slot — typically small action buttons. */\n actions?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<MetaInlineProps>(), { gap: '2' });\n\nconst attrs = useAttrs();\nconst inner = useTemplateRef<InstanceType<typeof Inline>>('inner');\n\n/** The inner `Inline`'s root element — the React original's forwarded ref. */\nconst el = computed(() => inner.value?.el ?? null);\n\nconst classes = computed(() => cn('w-full', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Inline ref=\"inner\" :gap=\"props.gap\" v-bind=\"rest\" :class=\"classes\">\n <slot />\n <div v-if=\"$slots.actions\" class=\"ml-auto flex items-center gap-1\">\n <slot name=\"actions\" />\n </div>\n </Inline>\n</template>\n","<script lang=\"ts\">\n/* `CornerPosition` is imported here (not in `<script setup>`) so the one binding serves\n as both the type below and the runtime value used in `withDefaults`. */\nimport { CornerPosition } from '../../../foundation/utils';\n\nexport interface BadgeOverlayProps {\n /** The position of the badge relative to the wrapper. Default `top-right`. */\n position?: CornerPosition;\n\n /** The hidden state — hides the badge when truthy (e.g. when count is 0). */\n isHidden?: boolean;\n}\n\nconst POS: Record<NonNullable<BadgeOverlayProps['position']>, string> = {\n 'top-right': 'top-0 right-0 -translate-y-1/2 translate-x-1/2',\n 'top-left': 'top-0 left-0 -translate-y-1/2 -translate-x-1/2',\n 'bottom-right': 'bottom-0 right-0 translate-y-1/2 translate-x-1/2',\n 'bottom-left': 'bottom-0 left-0 translate-y-1/2 -translate-x-1/2',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Decorator that overlays a badge / dot on top of any child. Use to\n * attach `CountBadge`, `NotificationDot`, or arbitrary `Badge` to an\n * `Avatar`, icon, or `<Button shape=\"square\"/circle\">`.\n */\ndefineOptions({ name: 'BadgeOverlay', inheritAttrs: false });\n\n/** Both of React's required `ReactNode` props are structural, so both become slots. */\ndefineSlots<{\n /** The element to overlay on (avatar, button, image). */\n default(): unknown;\n\n /** The badge content (count, dot, icon). */\n badge(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<BadgeOverlayProps>(), {\n position: CornerPosition.TopRight,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() => cn('relative inline-flex', attrs.class as string | undefined));\n\nconst badgeClasses = computed(() => cn('absolute z-raised', POS[props.position]));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <slot />\n <span v-if=\"!props.isHidden\" :class=\"badgeClasses\"><slot name=\"badge\" /></span>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the SectionHeader title size step. */\nexport const SectionHeaderSize = {\n /** Refers to the medium step. */\n Md: 'md',\n /** Refers to the large step. */\n Lg: 'lg',\n /** Refers to the extra-large step. */\n Xl: 'xl',\n /** Refers to the 2x-large step. */\n Xxl: '2xl',\n} as const;\n\nexport type SectionHeaderSize = (typeof SectionHeaderSize)[keyof typeof SectionHeaderSize];\n\ntype SectionHeaderLevel = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface SectionHeaderProps {\n /**\n * The heading copy. React typed this as a required `ReactNode`; here the\n * scalar form is the prop and the same-named slot is the rich override, so\n * it is optional — a consumer filling `#title` need not also pass the prop.\n */\n title?: string | number;\n\n /** The optional description below the title. */\n description?: string | number;\n\n /** The heading element / size. Default level 2, size lg. */\n level?: SectionHeaderLevel;\n size?: SectionHeaderSize;\n\n /** The bottom border's visibility. Default true. */\n isBordered?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { cn, Size } from '../../../foundation/utils';\nimport { TextColor } from '../text/Text.variants';\nimport Heading from '../heading/Heading.vue';\nimport Text from '../text/Text.vue';\n\n/**\n * Section / page header — title + optional description + actions row.\n * Wraps `Heading` (semantic) + `Text` (description) + slot for actions.\n */\ndefineOptions({ name: 'SectionHeader', inheritAttrs: false });\n\ndefineSlots<{\n /** The rich override for the `title` prop. */\n title?(): unknown;\n\n /** The rich override for the `description` prop. */\n description?(): unknown;\n\n /** The right-aligned actions slot — typically Button(s). Cross-domain by design, passed as content. */\n actions?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<SectionHeaderProps>(), {\n level: 2,\n size: SectionHeaderSize.Lg,\n isBordered: true,\n});\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst hasDescription = computed(() => Boolean(props.description) || Boolean(slots.description));\n\nconst classes = computed(() =>\n cn(\n 'flex items-start justify-between gap-4 pb-3',\n props.isBordered && 'border-b border-border',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <header ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div class=\"flex min-w-0 flex-col gap-1\">\n <Heading :level=\"props.level\" :size=\"props.size\">\n <slot name=\"title\">{{ props.title }}</slot>\n </Heading>\n <Text v-if=\"hasDescription\" :size=\"Size.Sm\" :color=\"TextColor.Muted\">\n <slot name=\"description\">{{ props.description }}</slot>\n </Text>\n </div>\n <div v-if=\"$slots.actions\" class=\"flex shrink-0 items-center gap-2\">\n <slot name=\"actions\" />\n </div>\n </header>\n</template>\n","<script lang=\"ts\">\nexport interface HighlightProps {\n /**\n * The source text to render.\n *\n * React took this as `children: string` and split it. A Vue slot renders\n * opaque vnodes that cannot be tokenised, so the text has to arrive as a\n * prop — named `text`, matching the sibling `Snippet`, which faced the same\n * \"string consumed by logic, not rendered as a node\" case.\n */\n text: string;\n\n /** The substring(s) to highlight. Match is case-insensitive. */\n query: string | ReadonlyArray<string>;\n\n /** The whole-word-only matching mode. Default `false`. */\n isWholeWord?: boolean;\n}\n\n/** One run of the source text, flagged for `Mark` wrapping. */\ninterface HighlightSegment {\n text: string;\n isMatch: boolean;\n}\n\nfunction escapeRegExp(re: string): string {\n return re.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport Mark from '../mark/Mark.vue';\n\n/**\n * Wraps each occurrence of `query` (or any of `query[]`) inside the `text`\n * in a `<Mark>`. Case-insensitive; pass `isWholeWord` to avoid partial\n * matches.\n */\ndefineOptions({ name: 'Highlight', inheritAttrs: false });\n\nconst props = defineProps<HighlightProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLSpanElement>('el');\n\n/* `typeof` rather than `Array.isArray` — the latter does not narrow a\n `ReadonlyArray` cleanly, and the two branches are equivalent here. */\nconst queries = computed<Array<string>>(() =>\n (typeof props.query === 'string' ? [props.query] : [...props.query]).filter(Boolean),\n);\n\n/**\n * With no usable query React returned the raw text in a bare span; that is the\n * single non-matching segment below, so both paths share one root element.\n */\nconst segments = computed<Array<HighlightSegment>>(() => {\n const list = queries.value;\n if (list.length === 0) return [{ text: props.text, isMatch: false }];\n\n const pattern = list.map(escapeRegExp).join('|');\n const regex = new RegExp(props.isWholeWord ? `\\\\b(${pattern})\\\\b` : `(${pattern})`, 'gi');\n\n return props.text\n .split(regex)\n .filter((part) => part !== '')\n .map((part) => ({\n text: part,\n isMatch: list.some((q) => part.toLowerCase() === q.toLowerCase()),\n }));\n});\n\nconst classes = computed(() => cn(attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <span ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <template v-for=\"(segment, i) in segments\" :key=\"i\">\n <Mark v-if=\"segment.isMatch\">{{ segment.text }}</Mark>\n <template v-else>{{ segment.text }}</template>\n </template>\n </span>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/** The open / disabled state a `Collapsible` root shares with its trigger and content. */\nexport interface CollapsibleContextValue {\n /** The open state. Live getter — read it, don't destructure it. */\n readonly open: boolean;\n\n /** Sets the open state (and fires the root's `open-change`). */\n setOpen: (open: boolean) => void;\n\n /** The id the content pane carries and the trigger points at through `aria-controls`. */\n contentId: string;\n\n /** The id the trigger carries and the content pane points at through `aria-labelledby`. */\n triggerId: string;\n\n /** The disabled state. Live getter. */\n readonly disabled: boolean;\n}\n\nexport const CollapsibleKey: InjectionKey<CollapsibleContextValue> = Symbol('wow-two.collapsible');\n\n/** Reads the surrounding `Collapsible`. Throws outside one — the parts are not standalone. */\nexport function useCollapsibleContext(): CollapsibleContextValue {\n const context = inject(CollapsibleKey, null);\n if (!context) throw new Error('Collapsible.* must be used inside <Collapsible>');\n return context;\n}\n","<script lang=\"ts\">\n/**\n * `open` and `isOpen` are the same controlled state under two names: `open` is\n * React's own spelling and the `v-model:open` binding target, `isOpen` the house\n * boolean spelling that mirrors the rest of the port. `open` wins when both are\n * set. React's `onOpenChange` is the `open-change` emit; `update:open` fires\n * alongside it so `v-model:open` works. Same pairing as `overlays/modal`.\n */\nexport interface CollapsibleProps {\n /** The open state, controlled. The `v-model:open` binding target. */\n open?: boolean;\n\n /** The open state, controlled — the house spelling of `open`; `open` wins when both are set. */\n isOpen?: boolean;\n\n /** The uncontrolled initial state. Default `false`. */\n defaultOpen?: boolean;\n\n /** The disabled mode — the trigger stops toggling. Default `false`. */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { cn, dataAttr } from '../../../foundation/utils';\nimport { useControlled, useId } from '../../../foundation/hooks';\nimport { CollapsibleKey } from './CollapsibleContext';\n\n/**\n * Disclosure root — owns the open state and the trigger/content id pair, and\n * publishes both to `CollapsibleTrigger` / `CollapsibleContent`.\n */\ndefineOptions({ name: 'Collapsible', inheritAttrs: false });\n\n/** The trigger + content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/* `open: undefined` / `isOpen: undefined` are load-bearing: Vue coerces an absent\n `Boolean` prop to `false` unless the declaration owns a `default` key, which would\n read as explicitly-closed-and-controlled and strand the uncontrolled path. */\nconst props = withDefaults(defineProps<CollapsibleProps>(), {\n open: undefined,\n isOpen: undefined,\n defaultOpen: false,\n isDisabled: false,\n});\n\nconst emit = defineEmits<{\n /** The `v-model:open` half. */\n 'update:open': [open: boolean];\n /** Emits the open state whenever it changes — React's `onOpenChange`. */\n 'open-change': [open: boolean];\n}>();\n\n/* `useControlled` returns a handle, not React's tuple, and takes `controlled` as a getter so the\n controlled branch tracks the prop. */\nconst { value: open, setValue: setOpen } = useControlled<boolean>({\n controlled: () => (props.open !== undefined ? props.open : props.isOpen),\n default: props.defaultOpen,\n onChange: (next) => {\n emit('update:open', next);\n emit('open-change', next);\n },\n});\n\nconst contentId = useId();\nconst triggerId = useId();\n\nprovide(CollapsibleKey, {\n get open() {\n return open.value;\n },\n setOpen,\n contentId,\n triggerId,\n get disabled() {\n return props.isDisabled;\n },\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() => cn(attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Own attrs first, `v-bind=\"rest\"` after — a consumer-supplied `data-state` still wins, as it\n did through React's trailing `{...rest}` spread. -->\n <div\n ref=\"el\"\n :data-state=\"open ? 'open' : 'closed'\"\n :data-disabled=\"dataAttr(props.isDisabled)\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface CollapsibleTriggerProps {\n /** The as-child flag — renders the single slot child instead of a `<button>`, with the trigger's props merged into it (React's `asChild` + `Slot`). */\n asChild?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { shallowRef } from 'vue';\nimport { ButtonType, dataAttr, HtmlElement } from '../../../foundation/utils';\nimport { Primitive } from '../../../foundation/primitives';\nimport { useCollapsibleContext } from './CollapsibleContext';\n\n/** The disclosure toggle — owns `aria-expanded` / `aria-controls` for the pane. */\ndefineOptions({ name: 'CollapsibleTrigger', inheritAttrs: false });\n\n/** The trigger content — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/* Not bound to a `props` const: with every reference now in the template — where the bare\n name compiles to `$props`, which survives a setup throw — the binding would be unused. */\nwithDefaults(defineProps<CollapsibleTriggerProps>(), { asChild: false });\n\nconst context = useCollapsibleContext();\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\nconst el = shallowRef<HTMLElement | null>(null);\nconst setEl = (value: unknown): void => {\n const node = (value as { $el?: unknown } | null)?.$el ?? value;\n el.value = node instanceof HTMLElement ? node : null;\n};\n\n/* Chained after the consumer's own click (attribute fallthrough puts theirs first) and skipped\n when they called `preventDefault()` — the original's `onClick?.(e); if (e.defaultPrevented) return`. */\nfunction handleClick(event: MouseEvent): void {\n if (event.defaultPrevented || context.disabled) return;\n context.setOpen(!context.open);\n}\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Own attrs first, `v-bind=\"$attrs\"` after (consumer wins, as through React's trailing\n `{...rest}`), own handler last so the consumer's click runs first. -->\n <Primitive\n :ref=\"setEl\"\n :as=\"HtmlElement.Button\"\n :as-child=\"asChild\"\n :id=\"context.triggerId\"\n :type=\"ButtonType.Button\"\n :aria-expanded=\"context.open\"\n :aria-controls=\"context.contentId\"\n :data-state=\"context.open ? 'open' : 'closed'\"\n :data-disabled=\"dataAttr(context.disabled)\"\n :disabled=\"context.disabled\"\n v-bind=\"$attrs\"\n @click=\"handleClick\"\n >\n <slot />\n </Primitive>\n</template>\n","<script lang=\"ts\">\n/**\n * Internal — not exported from `index.ts`. The element `<Presence>` mounts and clones\n * `data-state` + its tracking ref onto, split out for exactly the reason React split it:\n * `Presence` needs a single element it can hand `data-state` to.\n */\nexport interface CollapsibleContentInnerProps {\n /** The force-mounted mode — keeps the pane in the DOM while closed. */\n isForceMounted?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useCollapsibleContext } from './CollapsibleContext';\n\n/* Animates content height through grid-template-rows 0fr -> 1fr (gated on data-state) and layers\n a fade on the inner pane. Reduced-motion users get the resolved height/opacity with no\n transition (motion-safe / motion-reduce). */\ndefineOptions({ name: 'CollapsibleContentInner', inheritAttrs: false });\n\n/** The pane content. */\ndefineSlots<{ default(): unknown }>();\n\n/* Not bound to a `props` const: with every reference now in the template — where the bare\n name compiles to `$props`, which survives a setup throw — the binding would be unused. */\nwithDefaults(defineProps<CollapsibleContentInnerProps>(), {\n isForceMounted: undefined,\n});\n\nconst attrs = useAttrs();\nconst context = useCollapsibleContext();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'grid grid-rows-[0fr] motion-safe:transition-[grid-template-rows]',\n 'motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out)',\n 'data-[state=open]:grid-rows-[1fr]',\n attrs.class as string | undefined,\n ),\n);\n\n/**\n * Everything but `class`, which is re-applied through `cn` above. `data-state` rides in here —\n * `Presence` clones it onto this vnode, exactly as React's `{...props}` carried it.\n */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n :id=\"context.contentId\"\n role=\"region\"\n :aria-labelledby=\"context.triggerId\"\n :hidden=\"!context.open && !isForceMounted\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <div\n class=\"min-h-0 overflow-hidden motion-safe:data-[state=open]:animate-(--animate-fade-in) motion-safe:data-[state=closed]:animate-(--animate-fade-out) motion-reduce:animate-none\"\n :data-state=\"context.open ? 'open' : 'closed'\"\n >\n <slot />\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface CollapsibleContentProps {\n /** The force-mounted mode — renders hidden content but keeps it in the DOM (for animations). */\n isForceMounted?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useTemplateRef, type ComponentPublicInstance } from 'vue';\nimport { Presence } from '../../../foundation/primitives';\nimport { useCollapsibleContext } from './CollapsibleContext';\nimport CollapsibleContentInner from './CollapsibleContentInner.vue';\n\n/**\n * The disclosure pane. Force-mounted it renders straight through with an explicit\n * `data-state`; otherwise `Presence` keeps it mounted until the close animation ends and\n * supplies `data-state` itself.\n */\ndefineOptions({ name: 'CollapsibleContent', inheritAttrs: false });\n\n/** The pane content — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/* Not bound to a `props` const: with every reference now in the template — where the bare\n name compiles to `$props`, which survives a setup throw — the binding would be unused. */\nwithDefaults(defineProps<CollapsibleContentProps>(), {\n isForceMounted: undefined,\n});\n\nconst context = useCollapsibleContext();\nconst inner = useTemplateRef<ComponentPublicInstance>('inner');\n\n/** The rendered pane — the Vue stand-in for the React original's forwarded ref. */\nconst el = computed<HTMLElement | null>(() =>\n inner.value?.$el instanceof HTMLElement ? inner.value.$el : null,\n);\n\ndefineExpose({ el });\n</script>\n\n<template>\n <CollapsibleContentInner\n v-if=\"isForceMounted\"\n ref=\"inner\"\n :is-force-mounted=\"isForceMounted\"\n :data-state=\"context.open ? 'open' : 'closed'\"\n v-bind=\"$attrs\"\n >\n <slot />\n </CollapsibleContentInner>\n <Presence v-else :is-present=\"context.open\">\n <CollapsibleContentInner\n ref=\"inner\"\n :is-force-mounted=\"isForceMounted\"\n v-bind=\"$attrs\"\n >\n <slot />\n </CollapsibleContentInner>\n </Presence>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/** Defines the Accordion selection mode. */\nexport const AccordionType = {\n /** Refers to allowing one open panel at a time. */\n Single: 'single',\n /** Refers to allowing multiple open panels. */\n Multiple: 'multiple',\n} as const;\n\nexport type AccordionType = (typeof AccordionType)[keyof typeof AccordionType];\n\n/** The open-set state an `Accordion` root shares with its items. */\nexport interface AccordionContextValue {\n isOpen: (value: string) => boolean;\n toggle: (value: string) => void;\n disabled: boolean;\n}\n\nexport const AccordionKey: InjectionKey<AccordionContextValue> = Symbol('wow-two.accordion');\n\n/** Reads the enclosing `Accordion` state. */\nexport function useAccordionContext(): AccordionContextValue {\n const context = inject(AccordionKey, null);\n if (!context) throw new Error('Accordion.* must be used inside <Accordion>');\n return context;\n}\n\n/** The per-item state an `AccordionItem` shares with its trigger and content. */\nexport interface AccordionItemContextValue {\n value: string;\n open: boolean;\n contentId: string;\n triggerId: string;\n disabled: boolean;\n}\n\nexport const AccordionItemKey: InjectionKey<AccordionItemContextValue> =\n Symbol('wow-two.accordionItem');\n\n/** Reads the enclosing `AccordionItem` state. */\nexport function useAccordionItemContext(): AccordionItemContextValue {\n const context = inject(AccordionItemKey, null);\n if (!context) throw new Error('Accordion.Trigger / Content must be used inside <Accordion.Item>');\n return context;\n}\n","<script lang=\"ts\">\n/* `AccordionType` is imported here (not in `<script setup>`) so the one binding\n serves as both the type below and the runtime value used in `withDefaults`. */\nimport { AccordionType } from './AccordionContext';\n\n/**\n * Represents the prop surface of `Accordion`.\n *\n * React modelled this as a discriminated union — `{ type: 'single'; value?: string }` vs\n * `{ type: 'multiple'; value?: ReadonlyArray<string> }`. `defineProps<T>()` cannot take a\n * union: the SFC compiler resolves the type into a runtime props declaration and has no\n * way to express \"these keys only when `type` is `multiple`\". The two arms are flattened\n * into one interface with widened `value` / `defaultValue`, and the runtime still branches\n * on `type` exactly as before. `isCollapsible` is read only when `type` is `single`.\n */\nexport interface AccordionProps {\n /** The selection mode — one open panel (`single`) or many (`multiple`). Default `single`. */\n type?: AccordionType;\n /** The controlled open value — a string when `single`, an array when `multiple`. */\n value?: string | ReadonlyArray<string>;\n /** The initial open value when uncontrolled. */\n defaultValue?: string | ReadonlyArray<string>;\n /** The click-to-close behaviour for the open panel. `single` mode only. Default `false`. */\n isCollapsible?: boolean;\n /** The disabled state for every item in the group. Default `false`. */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { Orientation, RovingFocusGroup } from '../../../foundation/primitives';\nimport { AccordionKey, type AccordionContextValue } from './AccordionContext';\n\n/**\n * Vertical disclosure group. Arrow-key navigation comes from `RovingFocusGroup`;\n * the open set lives here and reaches items through injection.\n *\n * React attached the parts as `Accordion.Item` / `.Trigger` / `.Content` via\n * `Object.assign`. An SFC's generated default export cannot carry statics\n * cleanly, so they ship as siblings: `AccordionItem`, `AccordionTrigger`,\n * `AccordionContent`.\n */\ndefineOptions({ name: 'Accordion', inheritAttrs: false });\n\n/** The `AccordionItem` children. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<AccordionProps>(), {\n type: AccordionType.Single,\n value: undefined,\n defaultValue: undefined,\n isCollapsible: false,\n isDisabled: false,\n});\n\n/** React's `onValueChange`. Payload is a string in `single` mode, an array in `multiple`. */\nconst emit = defineEmits<{\n 'value-change': [value: string | ReadonlyArray<string>];\n}>();\n\nconst attrs = useAttrs();\nconst group = useTemplateRef<InstanceType<typeof RovingFocusGroup>>('group');\n\n/* Read once, exactly as React's `useState(defaultValue)` seed was. */\nconst initial = props.defaultValue ?? (props.type === AccordionType.Multiple ? [] : '');\n\nconst current = useControlled<string | ReadonlyArray<string>>({\n controlled: () => props.value,\n default: initial,\n onChange: (next) => emit('value-change', next),\n});\n\nfunction isOpen(value: string): boolean {\n const value_ = current.value.value;\n return Array.isArray(value_) ? value_.includes(value) : value_ === value;\n}\n\nfunction toggle(value: string): void {\n const value_ = current.value.value;\n if (props.type === AccordionType.Multiple) {\n const list = Array.isArray(value_) ? value_ : [];\n current.setValue(\n list.includes(value) ? list.filter((entry) => entry !== value) : [...list, value],\n );\n return;\n }\n if (value_ === value) {\n if (props.isCollapsible) current.setValue('');\n } else {\n current.setValue(value);\n }\n}\n\n/* Live getter on `disabled` — a root-level `isDisabled` flip has to reach items\n that are already mounted, which a snapshot would not do. */\nprovide<AccordionContextValue>(AccordionKey, {\n isOpen,\n toggle,\n get disabled() {\n return props.isDisabled;\n },\n});\n\nconst classes = computed(() => cn('flex flex-col', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el: computed(() => group.value?.el ?? null) });\n</script>\n\n<template>\n <RovingFocusGroup\n ref=\"group\"\n :orientation=\"Orientation.Vertical\"\n can-loop\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <slot />\n </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nexport interface AccordionItemProps {\n /** The identity of this panel within the group's open set. */\n value: string;\n /** The disabled state for this item alone. Default `false`. */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { cn, dataAttr } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\nimport {\n AccordionItemKey,\n useAccordionContext,\n type AccordionItemContextValue,\n} from './AccordionContext';\n\n/** One disclosure panel — wraps an `AccordionTrigger` and an `AccordionContent`. */\ndefineOptions({ name: 'AccordionItem', inheritAttrs: false });\n\n/** The trigger + content — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<AccordionItemProps>(), { isDisabled: false });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst accordion = useAccordionContext();\n\nconst contentId = useId();\nconst triggerId = useId();\n\nconst open = computed(() => accordion.isOpen(props.value));\nconst itemDisabled = computed(() => props.isDisabled || accordion.disabled);\n\n/* Live getters — `open` and `disabled` both change after mount. */\nprovide<AccordionItemContextValue>(AccordionItemKey, {\n get value() {\n return props.value;\n },\n get open() {\n return open.value;\n },\n contentId,\n triggerId,\n get disabled() {\n return itemDisabled.value;\n },\n});\n\nconst classes = computed(() => cn('border-b border-border', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n :data-state=\"open ? 'open' : 'closed'\"\n :data-disabled=\"dataAttr(itemDisabled)\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `AccordionTriggerProps` and consumers import it.\n Its only member was `children`, which is the default slot here; every button\n attribute falls through. */\nexport interface AccordionTriggerProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, shallowRef, useAttrs, type ComponentPublicInstance } from 'vue';\nimport { ChevronDown } from 'lucide-vue-next';\nimport { cn, dataAttr } from '../../../foundation/utils';\nimport { useRovingFocusItem } from '../../../foundation/primitives';\nimport { useAccordionContext, useAccordionItemContext } from './AccordionContext';\n\n/** The clickable header of an `AccordionItem`. Toggles its panel and carries the chevron. */\ndefineOptions({ name: 'AccordionTrigger', inheritAttrs: false });\n\n/** The trigger label — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst accordion = useAccordionContext();\nconst item = useAccordionItemContext();\n\n/* Reactive object — bound member-by-member below rather than destructured, since\n `tabindex` tracks the group's tab stop. */\nconst roving = useRovingFocusItem();\n\n/* React composed the roving ref with the forwarded one. Vue has no `composeRefs`,\n so one function ref feeds both the group and `defineExpose`. */\nconst el = shallowRef<HTMLButtonElement | null>(null);\n\nfunction setEl(node: Element | ComponentPublicInstance | null): void {\n el.value = (node as HTMLButtonElement | null) ?? null;\n roving.ref(node);\n}\n\n/* Own handler runs after any consumer `@click` that arrived through `rest`, so\n `defaultPrevented` is the consumer's opt-out — React's `onClick?.(e)` then\n `if (e.defaultPrevented || item.disabled) return` in the same order. */\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented || item.disabled) return;\n accordion.toggle(item.value);\n}\n\nconst classes = computed(() =>\n cn(\n 'flex w-full items-center justify-between gap-2 px-3 py-3 text-left text-sm font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n attrs.class as string | undefined,\n ),\n);\n\nconst chevronClasses = computed(() =>\n cn('h-4 w-4 shrink-0 text-muted-foreground transition-transform', item.open && 'rotate-180'),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <h3 class=\"flex\">\n <button\n :id=\"item.triggerId\"\n :ref=\"setEl\"\n type=\"button\"\n :aria-expanded=\"item.open\"\n :aria-controls=\"item.contentId\"\n :data-state=\"item.open ? 'open' : 'closed'\"\n :data-disabled=\"dataAttr(item.disabled)\"\n :disabled=\"item.disabled\"\n :tabindex=\"roving.tabindex\"\n data-roving-focus-item\n v-bind=\"rest\"\n :class=\"classes\"\n @focus=\"roving.onFocus\"\n @keydown=\"roving.onKeydown\"\n @click=\"onClick\"\n >\n <span class=\"flex-1\"><slot /></span>\n <ChevronDown :class=\"chevronClasses\" />\n </button>\n </h3>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `AccordionContentProps` and consumers import it.\n Its only member was `children`, which is the default slot here; every div\n attribute falls through. */\nexport interface AccordionContentProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { Presence } from '../../../foundation/primitives';\nimport { useAccordionItemContext } from './AccordionContext';\n\n/** The collapsible panel body of an `AccordionItem`. */\ndefineOptions({ name: 'AccordionContent', inheritAttrs: false });\n\n/** The panel body — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst item = useAccordionItemContext();\n\nconst classes = computed(() =>\n cn(\n 'grid text-sm text-foreground',\n 'motion-safe:transition-[grid-template-rows] motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) motion-reduce:transition-none',\n 'data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Presence :is-present=\"item.open\">\n <!--\n Height expand/collapse via grid-template-rows 0fr -> 1fr. The outer\n grid row is what animates; the inner `min-h-0 overflow-hidden` track\n clips the content so it can collapse to zero height. `data-state`\n (and the ref) are injected by Presence so the exit transition can play\n before unmount. Motion-safe-gated; reduced-motion gets an instant snap.\n -->\n <div\n ref=\"el\"\n :id=\"item.contentId\"\n role=\"region\"\n :aria-labelledby=\"item.triggerId\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <!-- Content padding is consumer-owned (no default) — wrap the slot with your own\n padding so each panel sets any value; it collapses cleanly inside this clip. -->\n <div class=\"min-h-0 overflow-hidden\"><slot /></div>\n </div>\n </Presence>\n</template>\n","import { inject, type InjectionKey } from 'vue';\nimport type { Orientation } from '../../../foundation/utils';\n\n/** Defines when a Tabs tab activates on keyboard navigation. */\nexport const TabsActivationMode = {\n /** Refers to activating a tab as soon as it is focused. */\n Automatic: 'automatic',\n /** Refers to requiring Enter/Space to activate a focused tab. */\n Manual: 'manual',\n} as const;\n\nexport type TabsActivationMode = (typeof TabsActivationMode)[keyof typeof TabsActivationMode];\n\n/**\n * The seam between `Tabs` and its `TabsList` / `TabsTab` / `TabsPanel` children.\n *\n * React attached these as `Tabs.List` / `.Tab` / `.Panel` statics over a\n * `createContext`. An SFC's generated default export cannot carry statics\n * cleanly, so they ship as sibling components and share state through\n * provide/inject instead.\n *\n * Every field but `setValue` is a live getter — read them, don't destructure.\n */\nexport interface TabsContextValue {\n /** The active tab value. */\n readonly value: string;\n /** Selects a tab. */\n setValue: (value: string) => void;\n /** The layout axis of the tablist. */\n readonly orientation: Orientation;\n /** Whether focus alone activates a tab. */\n readonly activationMode: TabsActivationMode;\n /** The id prefix shared by every tab / panel pair. */\n readonly baseId: string;\n}\n\nexport const TabsKey: InjectionKey<TabsContextValue> = Symbol('wow-two.tabs');\n\nexport function useTabsContext(): TabsContextValue {\n const context = inject(TabsKey, null);\n if (!context) throw new Error('Tabs.* must be used inside <Tabs>');\n return context;\n}\n","<script lang=\"ts\">\nimport type { Orientation } from '../../../foundation/utils';\nimport type { TabsActivationMode } from './TabsContext';\n\nexport interface TabsProps {\n /** The controlled active tab value. */\n value?: string;\n /** The uncontrolled initial tab value. */\n defaultValue?: string;\n /** The layout axis. Default `horizontal`. */\n orientation?: Orientation;\n /** Whether focus alone activates a tab. Default `automatic`. */\n activationMode?: TabsActivationMode;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { cn, Orientation as OrientationValue } from '../../../foundation/utils';\nimport { useControlled, useId } from '../../../foundation/hooks';\nimport {\n TabsActivationMode as TabsActivationModeValue,\n TabsKey,\n type TabsContextValue,\n} from './TabsContext';\n\n/**\n * Tabs root. Owns the active value and publishes it to `TabsList` / `TabsTab` /\n * `TabsPanel` through injection — React attached those as `Tabs.List` / `.Tab` /\n * `.Panel` statics, which an SFC's default export cannot carry.\n */\ndefineOptions({ name: 'Tabs', inheritAttrs: false });\n\n/** The tablist and panels — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<TabsProps>(), {\n value: undefined,\n defaultValue: undefined,\n orientation: OrientationValue.Horizontal,\n activationMode: TabsActivationModeValue.Automatic,\n});\n\nconst emit = defineEmits<{\n /** Fires with the newly selected tab value. */\n 'value-change': [value: string];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst { value: active, setValue: setActive } = useControlled<string>({\n controlled: () => props.value,\n default: props.defaultValue ?? '',\n onChange: (next) => emit('value-change', next),\n});\n\nconst baseId = useId();\n\n/* Live getters, not a snapshot — an orientation or activation-mode change on\n the root has to reach every already-mounted tab. */\nprovide<TabsContextValue>(TabsKey, {\n get value() {\n return active.value;\n },\n setValue: setActive,\n get orientation() {\n return props.orientation;\n },\n get activationMode() {\n return props.activationMode;\n },\n baseId,\n});\n\nconst classes = computed(() =>\n cn(\n props.orientation === OrientationValue.Vertical ? 'flex gap-2' : 'flex flex-col gap-2',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" :data-orientation=\"orientation\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `TabsListProps` and consumers import it. Its only\n member was `children`, which is the default slot here; every attribute falls through. */\nexport interface TabsListProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn, Orientation } from '../../../foundation/utils';\nimport { RovingFocusGroup } from '../../../foundation/primitives';\nimport { useTabsContext } from './TabsContext';\n\n/** The tablist strip. Arrow-key navigation comes from `RovingFocusGroup`. */\ndefineOptions({ name: 'TabsList', inheritAttrs: false });\n\n/** The `TabsTab` children — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<InstanceType<typeof RovingFocusGroup>>('el');\nconst tabs = useTabsContext();\n\nconst classes = computed(() =>\n cn(\n 'inline-flex border-border',\n tabs.orientation === Orientation.Vertical ? 'flex-col border-r' : 'flex-row border-b',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <RovingFocusGroup\n ref=\"el\"\n :orientation=\"tabs.orientation\"\n can-loop\n role=\"tablist\"\n :aria-orientation=\"tabs.orientation\"\n :data-orientation=\"tabs.orientation\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <slot />\n </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\nexport interface TabsTabProps {\n /** The value this tab selects — pairs it with the `TabsPanel` of the same value. */\n value: string;\n /** The disabled state. Default `false`. */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, mergeProps, shallowRef, useAttrs } from 'vue';\nimport { cn, dataAttr, Orientation } from '../../../foundation/utils';\nimport { useRovingFocusItem } from '../../../foundation/primitives';\nimport { TabsActivationMode, useTabsContext } from './TabsContext';\n\n/** A single tab button. Selected tab is the roving tab stop, per APG. */\ndefineOptions({ name: 'TabsTab', inheritAttrs: false });\n\n/** The tab label — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<TabsTabProps>(), { isDisabled: false });\n\nconst attrs = useAttrs();\nconst tabs = useTabsContext();\n\nconst selected = computed(() => tabs.value === props.value);\n\n// Selected tab is the Tab stop (per APG) — seeds/syncs roving focusedId when focus is outside the tablist.\n// Reactive object: bound with `v-bind`, never destructured.\nconst item = useRovingFocusItem({ isActive: () => selected.value });\n\n/* One element, two consumers of `ref` — the roving group needs the node and\n `defineExpose` publishes it. React composed them with a callback ref; this is\n the same composition, and it wins over `item.ref` by sitting after `v-bind`. */\nconst el = shallowRef<HTMLButtonElement | null>(null);\nfunction setRef(node: unknown): void {\n el.value = (node ?? null) as HTMLButtonElement | null;\n item.ref(node);\n}\n\nconst tabId = computed(() => `${tabs.baseId}-tab-${props.value}`);\nconst panelId = computed(() => `${tabs.baseId}-panel-${props.value}`);\n\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n tabs.setValue(props.value);\n}\n\nfunction onFocus(): void {\n if (tabs.activationMode === TabsActivationMode.Automatic && !props.isDisabled) {\n tabs.setValue(props.value);\n }\n}\n\nconst classes = computed(() =>\n cn(\n 'inline-flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium text-muted-foreground transition-colors',\n 'hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n 'data-[state=active]:text-foreground data-[state=active]:border-primary',\n tabs.orientation === Orientation.Vertical\n ? 'border-r-2 border-transparent data-[state=active]:border-primary'\n : 'border-b-2 border-transparent data-[state=active]:border-primary',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/**\n * The fallthrough attrs merged with the roving-focus item's bindings.\n *\n * `mergeProps` rather than an object spread: both sides can carry `onFocus`, and\n * a spread would drop the consumer's. Reading `item`'s members inside a computed\n * keeps them tracked, so `tabindex` still follows the group's tab stop.\n * `item.ref` is overridden by the explicit `:ref` below, which composes it.\n */\nconst bindings = computed(() =>\n mergeProps(rest.value, item as unknown as Record<string, unknown>),\n);\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Own attrs, then `bindings` (fallthrough attrs + the roving item), then own\n handlers last — a consumer's `click` / `focus` handler therefore runs before\n ours, the order React got from calling `onClick?.(e)` ahead of its own logic,\n which is what makes the `defaultPrevented` check below meaningful. -->\n <button\n :id=\"tabId\"\n role=\"tab\"\n type=\"button\"\n :aria-selected=\"selected\"\n :aria-controls=\"panelId\"\n :data-state=\"selected ? 'active' : 'inactive'\"\n :data-disabled=\"dataAttr(isDisabled)\"\n :disabled=\"isDisabled\"\n v-bind=\"bindings\"\n :ref=\"setRef\"\n :class=\"classes\"\n @click=\"onClick\"\n @focus=\"onFocus\"\n >\n <slot />\n </button>\n</template>\n","<script lang=\"ts\">\nexport interface TabsPanelProps {\n /** The value this panel belongs to — pairs it with the `TabsTab` of the same value. */\n value: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useTabsContext } from './TabsContext';\n\n/**\n * The panel for one tab. Only the active panel is mounted (APG) — there is no\n * `Presence`/exit, the outgoing panel just unmounts, and the incoming one is a\n * fresh mount so the fade-in replays. React forced that with `key={ctx.value}`.\n */\ndefineOptions({ name: 'TabsPanel', inheritAttrs: false });\n\n/** The panel content — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<TabsPanelProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst tabs = useTabsContext();\n\nconst isActive = computed(() => tabs.value === props.value);\n\nconst tabId = computed(() => `${tabs.baseId}-tab-${props.value}`);\nconst panelId = computed(() => `${tabs.baseId}-panel-${props.value}`);\n\nconst classes = computed(() =>\n cn(\n 'flex-1 outline-none focus-visible:ring-2 focus-visible:ring-ring',\n 'motion-safe:animate-(--animate-fade-in)',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n v-if=\"isActive\"\n ref=\"el\"\n v-bind=\"rest\"\n :id=\"panelId\"\n role=\"tabpanel\"\n :aria-labelledby=\"tabId\"\n :tabindex=\"0\"\n :class=\"classes\"\n >\n <slot />\n </div>\n</template>\n","import { tv, type VariantProps } from '../../../foundation/utils';\n\n/** Defines the List item marker style. */\nexport const ListMarker = {\n /** Refers to no marker (flush list). */\n None: 'none',\n /** Refers to a filled-disc bullet. */\n Disc: 'disc',\n /** Refers to a decimal-numbered marker. */\n Decimal: 'decimal',\n /** Refers to a check-mark marker. */\n Check: 'check',\n} as const;\n\nexport type ListMarker = (typeof ListMarker)[keyof typeof ListMarker];\n\n/** Defines the vertical spacing between List items. */\nexport const ListSpacing = {\n /** Refers to tight spacing. */\n Tight: 'tight',\n /** Refers to normal (default) spacing. */\n Normal: 'normal',\n /** Refers to loose spacing. */\n Loose: 'loose',\n} as const;\n\nexport type ListSpacing = (typeof ListSpacing)[keyof typeof ListSpacing];\n\nexport const listVariants = tv({\n base: 'list-outside',\n variants: {\n marker: {\n none: 'list-none pl-0',\n disc: 'list-disc pl-5',\n decimal: 'list-decimal pl-5',\n check: 'list-none pl-0',\n },\n spacing: {\n tight: '[&>li]:py-0.5',\n normal: '[&>li]:py-1',\n loose: '[&>li]:py-2',\n },\n },\n defaultVariants: {\n marker: 'none',\n spacing: 'normal',\n },\n});\n\nexport const listItemVariants = tv({\n base: 'flex items-start gap-3 text-sm text-foreground',\n});\n\nexport type ListVariants = VariantProps<typeof listVariants>;\n\n/* Compile-time lock: enum values ≡ tv marker/spacing value-sets (drift = type error). */\ntype AssertExact<A, B> = [A] extends [B] ? ([B] extends [A] ? true : never) : never;\nconst _assertListMarker: AssertExact<\n ListMarker,\n NonNullable<VariantProps<typeof listVariants>['marker']>\n> = true;\nconst _assertListSpacing: AssertExact<\n ListSpacing,\n NonNullable<VariantProps<typeof listVariants>['spacing']>\n> = true;\nvoid _assertListMarker;\nvoid _assertListSpacing;\n","import { inject, type InjectionKey } from 'vue';\nimport type { ListMarker } from './List.variants';\n\n/** The marker preset a `List` root shares with its items. */\nexport interface ListContextValue {\n /** The root's `marker` prop. Live getter — read it, don't destructure it. */\n readonly marker: ListMarker;\n}\n\nexport const ListKey: InjectionKey<ListContextValue> = Symbol('wow-two.list');\n\n/**\n * Reads the surrounding `List`.\n *\n * Unlike the other compound families in this group this does **not** throw: a bare\n * `<li>` is documented as a valid child, so `ListItem` has to stand alone. Outside a\n * `List` the marker reads as `none`, which is the root's own default.\n */\nexport function useListContext(): ListContextValue {\n return inject(ListKey, { marker: 'none' });\n}\n","<script lang=\"ts\">\nimport type { ListMarker, ListSpacing } from './List.variants';\n\nexport interface ListProps {\n /** The ordered mode — renders `<ol>` instead of `<ul>`. */\n isOrdered?: boolean;\n\n /** The item marker style. */\n marker?: ListMarker;\n\n /** The vertical spacing between items. */\n spacing?: ListSpacing;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { listVariants } from './List.variants';\nimport { ListKey } from './ListContext';\n\n/**\n * Bulleted / numbered / check list container. Pair with `ListItem` for the\n * leading-trailing row shape; a bare `<li>` works too.\n */\ndefineOptions({ name: 'List', inheritAttrs: false });\n\n/** The list items — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<ListProps>(), { isOrdered: undefined });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst tag = computed(() => (props.isOrdered ? 'ol' : 'ul'));\n\n/* `marker=\"check\"` sets `list-none` — the check itself is drawn by `ListItem`, which\n needs the root's marker to know that. A getter keeps the value live. */\nprovide(ListKey, {\n get marker() {\n return props.marker ?? 'none';\n },\n});\n\nconst classes = computed(() =>\n cn(\n listVariants({ marker: props.marker, spacing: props.spacing }),\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component :is=\"tag\" ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></component>\n</template>\n","<script lang=\"ts\">\nexport interface ListItemProps {\n /**\n * The check-marker override.\n *\n * Omitted, it follows the parent `List`'s `marker` — a check appears under\n * `marker=\"check\"` and nowhere else. Set it explicitly to force the marker on or\n * off for one row.\n */\n hasCheckMarker?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { Check } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { listItemVariants } from './List.variants';\nimport { useListContext } from './ListContext';\n\n/** A `List` row — optional check marker, leading and trailing adornments. */\ndefineOptions({ name: 'ListItem', inheritAttrs: false });\n\ndefineSlots<{\n /** The leading slot — icon, avatar, marker. React's `leading` node prop. */\n leading?(): unknown;\n /** The trailing slot — badge, chevron, status. React's `trailing` node prop. */\n trailing?(): unknown;\n /** The row content — React's required `children`. */\n default(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<ListItemProps>(), { hasCheckMarker: undefined });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLLIElement>('el');\nconst list = useListContext();\n\n/* The prop is an override; with it omitted the parent's `marker` decides. */\nconst showCheck = computed(() => props.hasCheckMarker ?? list.marker === 'check');\n\nconst classes = computed(() =>\n cn(listItemVariants(), attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <li ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <span v-if=\"showCheck\" aria-hidden=\"true\" class=\"mt-0.5 shrink-0 text-primary\">\n <Check class=\"h-4 w-4\" />\n </span>\n <span v-if=\"$slots.leading\" aria-hidden=\"true\" class=\"mt-0.5 shrink-0 text-muted-foreground\">\n <slot name=\"leading\" />\n </span>\n <span class=\"flex-1\"><slot /></span>\n <span v-if=\"$slots.trailing\" class=\"shrink-0 text-muted-foreground\"\n ><slot name=\"trailing\"\n /></span>\n </li>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/** Defines the semantic status tone of a Timeline node. */\nexport const TimelineStatus = {\n /** Refers to the neutral / default node. */\n Default: 'default',\n /** Refers to the primary brand node. */\n Primary: 'primary',\n /** Refers to the positive / confirmation node. */\n Success: 'success',\n /** Refers to the caution node. */\n Warning: 'warning',\n /** Refers to the destructive / error node. */\n Destructive: 'destructive',\n /** Refers to the informational node. */\n Info: 'info',\n} as const;\n\nexport type TimelineStatus = (typeof TimelineStatus)[keyof typeof TimelineStatus];\n\n/** Defines which side the Timeline rail sits on. */\nexport const TimelineAlign = {\n /** Refers to a left-anchored rail. */\n Left: 'left',\n /** Refers to a right-anchored rail. */\n Right: 'right',\n} as const;\n\nexport type TimelineAlign = (typeof TimelineAlign)[keyof typeof TimelineAlign];\n\n/** The rail state a `Timeline` root shares with its items. */\nexport interface TimelineContextValue {\n /** The rail side. Live getter — read it, don't destructure it. */\n readonly align: TimelineAlign;\n\n /** The number of rendered items. Live getter. */\n readonly total: number;\n}\n\nexport const TimelineKey: InjectionKey<TimelineContextValue> = Symbol('wow-two.timeline');\n\n/**\n * Reads the enclosing `Timeline`, or `null` when an item renders standalone —\n * React's `createContext(null)` default, preserved so a stray `<TimelineItem>`\n * still renders left-aligned rather than throwing.\n */\nexport function useTimelineContext(): TimelineContextValue | null {\n return inject(TimelineKey, null);\n}\n\nexport const STATUS_BG: Record<TimelineStatus, string> = {\n default: 'bg-muted text-muted-foreground border-border',\n primary: 'bg-primary text-primary-foreground border-primary',\n success: 'bg-success text-success-foreground border-success',\n warning: 'bg-warning text-warning-foreground border-warning',\n destructive: 'bg-destructive text-destructive-foreground border-destructive',\n info: 'bg-info text-info-foreground border-info',\n};\n","<script lang=\"ts\">\n/* `TimelineAlign` is imported here (not in `<script setup>`) so the one binding serves as both\n the prop type below and the runtime value used in `withDefaults` / the rail-side check. */\nimport { TimelineAlign } from './TimelineContext';\n\nexport interface TimelineProps {\n /** The side the rail sits on. Default `left`. */\n align?: TimelineAlign;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n cloneVNode,\n computed,\n provide,\n useAttrs,\n useSlots,\n useTemplateRef,\n type VNode,\n} from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { renderableChildren } from '../../../foundation/primitives';\nimport { TimelineKey } from './TimelineContext';\n\n/**\n * Vertical event rail — an ordered list of `TimelineItem` nodes joined by a\n * connector line. The last item's connector is suppressed.\n */\ndefineOptions({ name: 'Timeline', inheritAttrs: false });\n\n/** The `TimelineItem` nodes — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<TimelineProps>(), { align: TimelineAlign.Left });\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLOListElement>('el');\n\nconst total = computed(() => renderableChildren(slots.default?.()).length);\n\n/**\n * Mark the last item so the connector line is suppressed. React rebuilt the child's props\n * object; a Vue slot hands over vnodes, so the flag is cloned onto the last one — it lands\n * in the item's fallthrough attrs exactly as `data-last` did in React.\n *\n * A function, not a `computed`: the slot is re-invoked on every render, so the vnodes handed\n * to `v-for` are always fresh rather than a cached array of already-mounted ones.\n */\nfunction items(): Array<VNode> {\n const children = renderableChildren(slots.default?.());\n const last = children.length - 1;\n return children.map((child, index) =>\n index === last ? cloneVNode(child, { 'data-last': '' }) : child,\n );\n}\n\nprovide(TimelineKey, {\n get align() {\n return props.align;\n },\n get total() {\n return total.value;\n },\n});\n\nconst classes = computed(() =>\n cn(\n 'flex list-none flex-col',\n props.align === TimelineAlign.Right && 'items-end',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <ol ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <component :is=\"node\" v-for=\"(node, index) in items()\" :key=\"index\" />\n </ol>\n</template>\n","<script lang=\"ts\">\n/* `TimelineStatus` is imported here (not in `<script setup>`) so the one binding serves as\n both the prop type below and the runtime value used in `withDefaults`. */\nimport { TimelineStatus } from './TimelineContext';\n\nexport interface TimelineItemProps {\n /** The semantic tone of the node marker. Default `default`. */\n status?: TimelineStatus;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { STATUS_BG, TimelineAlign, useTimelineContext } from './TimelineContext';\n\n/** One node on the rail — marker + connector column, then the content column. */\ndefineOptions({ name: 'TimelineItem', inheritAttrs: false });\n\ndefineSlots<{\n /** The marker glyph — React's `icon` node prop. Defaults to a filled dot. */\n icon?(): unknown;\n /** The node content — React's required `children`. */\n default(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<TimelineItemProps>(), {\n status: TimelineStatus.Default,\n});\n\nconst attrs = useAttrs();\nconst context = useTimelineContext();\nconst el = useTemplateRef<HTMLLIElement>('el');\n\n/** The root marks its last child with `data-last`; the connector line is dropped there. */\nconst isLast = computed(() => attrs['data-last'] !== undefined);\n\nconst classes = computed(() =>\n cn('relative flex gap-3 pb-6 last:pb-0', attrs.class as string | undefined),\n);\n\nconst markerClasses = computed(() =>\n cn(\n 'relative z-raised grid h-7 w-7 place-items-center rounded-full border-2',\n STATUS_BG[props.status],\n ),\n);\n\nconst contentClasses = computed(() =>\n cn('flex-1 pt-0.5', context?.align === TimelineAlign.Right && 'order-first text-right'),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `data-status` precedes `v-bind=\"rest\"` so a consumer-supplied one still wins, as it did\n through React's trailing `{...rest}` spread. -->\n <li ref=\"el\" :data-status=\"status\" v-bind=\"rest\" :class=\"classes\">\n <!-- Marker + connector column -->\n <div class=\"relative flex flex-col items-center\">\n <span aria-hidden=\"true\" :class=\"markerClasses\">\n <slot name=\"icon\"><span class=\"h-1.5 w-1.5 rounded-full bg-current\" /></slot>\n </span>\n <span\n v-if=\"!isLast\"\n aria-hidden=\"true\"\n class=\"absolute left-1/2 top-7 h-full w-px -translate-x-1/2 bg-border\"\n />\n </div>\n <!-- Content -->\n <div :class=\"contentClasses\"><slot /></div>\n </li>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an exported\n name: React declared `TimelineTitleProps` and consumers import it. Every attribute falls\n through, so the interface carries nothing in Vue. The block itself is load-bearing: in a\n `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\nexport interface TimelineTitleProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The headline of a `TimelineItem`. */\ndefineOptions({ name: 'TimelineTitle', inheritAttrs: false });\n\n/** The title copy — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLHeadingElement>('el');\n\nconst classes = computed(() =>\n cn('text-sm font-medium text-foreground', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <h4 ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></h4>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an exported\n name: React declared `TimelineDescriptionProps` and consumers import it. Every attribute\n falls through, so the interface carries nothing in Vue. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\nexport interface TimelineDescriptionProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The supporting copy under a `TimelineTitle`. */\ndefineOptions({ name: 'TimelineDescription', inheritAttrs: false });\n\n/** The description copy — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLParagraphElement>('el');\n\nconst classes = computed(() =>\n cn('text-xs text-muted-foreground', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <p ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></p>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/**\n * The seam between `Tree` and its `TreeGroup` / `TreeItem` children.\n *\n * React attached those as `Tree.Group` / `.Item` statics over a `createContext`.\n * An SFC's generated default export cannot carry statics cleanly, so they ship\n * as sibling components and share state through provide/inject instead.\n *\n * `selectedValue` and `expanded` are live getters — read them, don't destructure.\n */\nexport interface TreeContextValue {\n /** The selected leaf value, or `null`. */\n readonly selectedValue: string | null;\n /** Selects a leaf. */\n setSelectedValue: (value: string) => void;\n /** The expanded branch values. */\n readonly expanded: ReadonlySet<string>;\n /** Flips one branch open/closed. */\n toggleExpanded: (value: string) => void;\n}\n\nexport const TreeKey: InjectionKey<TreeContextValue> = Symbol('wow-two.tree');\n\nexport function useTreeContext(): TreeContextValue {\n const context = inject(TreeKey, null);\n if (!context) throw new Error('Tree.* must be used inside <Tree>');\n return context;\n}\n\n/** The nesting depth, 1-based — React's `TreeLevelContext`, defaulted to the root level. */\nexport interface TreeLevelValue {\n readonly level: number;\n}\n\nexport const TreeLevelKey: InjectionKey<TreeLevelValue> = Symbol('wow-two.tree.level');\n\n/** Returns the level holder rather than the number, so a nested provide stays live. */\nexport function useTreeLevel(): TreeLevelValue {\n return inject(TreeLevelKey, { level: 1 });\n}\n","<script lang=\"ts\">\nexport interface TreeProps {\n /** The controlled selected leaf value. */\n selectedValue?: string | null;\n /** The uncontrolled initial selected leaf value. */\n defaultSelectedValue?: string | null;\n /** The controlled expanded branch values. */\n expanded?: ReadonlyArray<string>;\n /** The uncontrolled initial expanded branch values. */\n defaultExpanded?: ReadonlyArray<string>;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { RovingFocusGroup } from '../../../foundation/primitives';\nimport { TreeKey, type TreeContextValue } from './TreeContext';\n\n/**\n * Tree root. Owns selection + expansion and publishes them to `TreeGroup` /\n * `TreeItem` through injection — React attached those as `Tree.Group` / `.Item`\n * statics, which an SFC's default export cannot carry.\n */\ndefineOptions({ name: 'Tree', inheritAttrs: false });\n\n/** The `TreeGroup` / `TreeItem` children — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<TreeProps>(), {\n selectedValue: undefined,\n defaultSelectedValue: undefined,\n expanded: undefined,\n defaultExpanded: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires with the newly selected leaf value. */\n 'selection-change': [value: string];\n /** Fires with the full expanded-branch list after a toggle. */\n 'expanded-change': [values: ReadonlyArray<string>];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<InstanceType<typeof RovingFocusGroup>>('el');\n\nconst { value: selected, setValue: setSelected } = useControlled<string | null>({\n controlled: () => props.selectedValue,\n default: props.defaultSelectedValue ?? null,\n /* Only ever called with a string — `setSelectedValue` is the single writer. */\n onChange: (next) => emit('selection-change', next as string),\n});\n\nconst { value: expandedList, setValue: setExpandedList } = useControlled<ReadonlyArray<string>>({\n controlled: () => props.expanded,\n default: props.defaultExpanded ?? [],\n onChange: (next) => emit('expanded-change', next),\n});\n\nconst expandedSet = computed(() => new Set(expandedList.value));\n\nfunction toggleExpanded(value: string): void {\n const next = new Set(expandedSet.value);\n if (next.has(value)) next.delete(value);\n else next.add(value);\n setExpandedList(Array.from(next));\n}\n\n/* Live getters, not a snapshot — selection and expansion have to reach every\n already-mounted row. */\nprovide<TreeContextValue>(TreeKey, {\n get selectedValue() {\n return selected.value;\n },\n setSelectedValue: setSelected,\n get expanded() {\n return expandedSet.value;\n },\n toggleExpanded,\n});\n\nconst classes = computed(() => cn('flex flex-col text-sm', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <RovingFocusGroup\n ref=\"el\"\n orientation=\"vertical\"\n can-loop\n role=\"tree\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <slot />\n </RovingFocusGroup>\n</template>\n","<script lang=\"ts\">\n/** Internal — the animated wrapper `Presence` mounts for an expanded branch. */\nexport interface TreeGroupContentProps {\n /** The nesting depth published to the rows inside. */\n level: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { TreeLevelKey, type TreeLevelValue } from './TreeContext';\n\n/*\n * Inner element rendered by `<Presence>`: it clones this component's vnode with\n * `data-state` + a ref, both of which reach the root `<div>` through `rest`.\n * Expand/collapse animates content HEIGHT via grid-template-rows 0fr -> 1fr; the\n * inner `min-h-0 overflow-hidden` track clips the group so it can shrink to zero.\n * No fade (height only) — the chevron handles the rotate. Motion-safe-gated;\n * reduced-motion gets an instant snap.\n */\ndefineOptions({ name: 'TreeGroupContent', inheritAttrs: false });\n\n/** The nested `TreeGroup` / `TreeItem` children. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<TreeGroupContentProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/* Live getter, not a snapshot — React re-provided on every render. */\nprovide<TreeLevelValue>(TreeLevelKey, {\n get level() {\n return props.level;\n },\n});\n\nconst classes = computed(() =>\n cn(\n 'grid',\n 'motion-safe:transition-[grid-template-rows] motion-safe:duration-(--duration-base) motion-safe:ease-(--ease-out) motion-reduce:transition-none',\n 'data-[state=open]:grid-rows-[1fr] data-[state=closed]:grid-rows-[0fr]',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div class=\"min-h-0 overflow-hidden\">\n <ul role=\"group\" class=\"flex flex-col\">\n <slot />\n </ul>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Internal — the focusable `role=\"treeitem\"` row shared by `TreeGroup` and `TreeItem`. */\nexport interface TreeNodeRowProps {\n /** The 1-based nesting depth. */\n level: number;\n /** The selected state. */\n isSelected: boolean;\n /** The expanded state — only meaningful when `hasChildren`. */\n isExpanded?: boolean;\n /** Whether the row owns a child group. */\n hasChildren: boolean;\n /** The disabled state. */\n isDisabled: boolean;\n /** Toggles a branch or selects a leaf. Required, so it stays a prop rather than an emit. */\n onActivate: () => void;\n}\n\n/* DOM-walking targets for the APG horizontal arrows. Anatomy per branch:\n <li role=presentation> → [row div role=treeitem, content → <ul role=group>].\n The tree root is role=\"tree\", so a root-level row has no `[role=\"group\"]`\n ancestor and ArrowLeft is a no-op there. */\n\n/** First child row of an expanded branch — ArrowRight descends into it. */\nfunction focusFirstChildRow(row: HTMLElement): void {\n row.closest('li')?.querySelector<HTMLElement>('[role=\"group\"] [role=\"treeitem\"]')?.focus();\n}\n\n/** Row of the branch owning this row — ArrowLeft climbs to it. */\nfunction findParentRow(row: HTMLElement): HTMLElement | null {\n return (\n row\n .closest('[role=\"group\"]')\n ?.closest('li')\n ?.querySelector<HTMLElement>(':scope > [role=\"treeitem\"]') ?? null\n );\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { ChevronRight } from 'lucide-vue-next';\nimport { cn, dataAttr } from '../../../foundation/utils';\nimport { useRovingFocusItem } from '../../../foundation/primitives';\n\ndefineOptions({ name: 'TreeNodeRow' });\n\n/** The row label — React passed it as the `label` node prop. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<TreeNodeRowProps>(), {\n // `undefined` is meaningful: a leaf must render no `aria-expanded` at all.\n isExpanded: undefined,\n});\n\n// Reactive object: bound with `v-bind`, never destructured.\nconst item = useRovingFocusItem();\n\n/**\n * Runs after the roving group's own key handler — `v-bind=\"item\"` sits ahead of\n * this binding, so `defaultPrevented` reads exactly what React saw after its\n * explicit `roving.onKeyDown(e)` call.\n */\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || props.isDisabled) return;\n const row = event.currentTarget as HTMLElement;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n props.onActivate();\n return;\n }\n /* APG tree pattern — the vertical roving group above ignores the\n horizontal arrows, so they are free to drive expand/collapse here. */\n if (event.key === 'ArrowRight' && props.hasChildren) {\n event.preventDefault();\n if (props.isExpanded) focusFirstChildRow(row);\n else props.onActivate(); // Expand; focus stays on the branch.\n return;\n }\n if (event.key === 'ArrowLeft') {\n if (props.hasChildren && props.isExpanded) {\n event.preventDefault();\n props.onActivate(); // Collapse; focus stays on the branch.\n return;\n }\n // Leaf or collapsed branch: climb to the parent branch, if any.\n const parentRow = findParentRow(row);\n if (parentRow) {\n event.preventDefault();\n parentRow.focus();\n }\n }\n}\n\nfunction onClick(): void {\n if (!props.isDisabled) props.onActivate();\n}\n\n/** Vue does not append `px` to a numeric `:style` value the way React does — spelled out. */\nconst rowStyle = computed(() => ({ paddingLeft: `${(props.level - 1) * 16}px` }));\n\nconst classes = computed(() =>\n cn(\n 'flex cursor-pointer items-center gap-1 rounded-sm px-2 py-1 transition-colors',\n 'hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n props.isSelected && 'bg-primary-soft text-primary-soft-foreground',\n props.isDisabled && 'pointer-events-none opacity-50',\n ),\n);\n\nconst chevronClasses = computed(() =>\n cn(\n 'h-4 w-4 shrink-0 text-muted-foreground transition-transform',\n props.isExpanded && 'rotate-90',\n ),\n);\n</script>\n\n<template>\n <div\n role=\"treeitem\"\n :aria-level=\"level\"\n :aria-selected=\"isSelected || undefined\"\n :aria-expanded=\"hasChildren ? isExpanded : undefined\"\n :aria-disabled=\"isDisabled || undefined\"\n :data-selected=\"dataAttr(isSelected)\"\n :data-disabled=\"dataAttr(isDisabled)\"\n :style=\"rowStyle\"\n :class=\"classes\"\n v-bind=\"item\"\n @keydown=\"onKeydown\"\n @click=\"onClick\"\n >\n <ChevronRight v-if=\"hasChildren\" :class=\"chevronClasses\" />\n <span v-else class=\"w-4 shrink-0\" />\n <span class=\"flex-1 truncate\"><slot /></span>\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface TreeGroupProps {\n /** The branch value — the key expansion is tracked under. */\n value: string;\n /**\n * The branch label. React took a `ReactNode`; the scalar stays a prop and the\n * same-named `label` slot is the rich override.\n */\n label: string | number;\n /** The disabled state. Default `false`. */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { Presence } from '../../../foundation/primitives';\nimport { useTreeContext, useTreeLevel } from './TreeContext';\nimport TreeGroupContent from './TreeGroupContent.vue';\nimport TreeNodeRow from './TreeNodeRow.vue';\n\n/** An expandable branch. React shipped it as `Tree.Group`. */\ndefineOptions({ name: 'TreeGroup', inheritAttrs: false });\n\ndefineSlots<{\n /** The nested `TreeGroup` / `TreeItem` children — React's required `children`. */\n default(): unknown;\n /** Overrides the branch label. Falls back to the `label` prop. */\n label(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<TreeGroupProps>(), { isDisabled: false });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLLIElement>('el');\nconst tree = useTreeContext();\nconst treeLevel = useTreeLevel();\n\nconst isExpanded = computed(() => tree.expanded.has(props.value));\n\nfunction activate(): void {\n tree.toggleExpanded(props.value);\n}\n\nconst classes = computed(() => cn('list-none', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <li\n ref=\"el\"\n role=\"presentation\"\n :data-state=\"isExpanded ? 'open' : 'closed'\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <TreeNodeRow\n :level=\"treeLevel.level\"\n :is-selected=\"false\"\n :is-expanded=\"isExpanded\"\n has-children\n :is-disabled=\"isDisabled\"\n :on-activate=\"activate\"\n >\n <slot name=\"label\">{{ label }}</slot>\n </TreeNodeRow>\n <!-- Presence keeps the group mounted through the collapse so the exit\n plays before unmount (a plain `v-if` hard-unmount would kill it).\n It injects ref + data-state onto TreeGroupContent, which animates height\n via grid-template-rows 0fr -> 1fr. -->\n <Presence :is-present=\"isExpanded\">\n <TreeGroupContent :level=\"treeLevel.level + 1\">\n <slot />\n </TreeGroupContent>\n </Presence>\n </li>\n</template>\n","<script lang=\"ts\">\nexport interface TreeItemProps {\n /** The leaf value — the key selection is tracked under. */\n value: string;\n /** The disabled state. Default `false`. */\n isDisabled?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useTreeContext, useTreeLevel } from './TreeContext';\nimport TreeNodeRow from './TreeNodeRow.vue';\n\n/** A selectable leaf. React shipped it as `Tree.Item`. */\ndefineOptions({ name: 'TreeItem', inheritAttrs: false });\n\n/** The leaf label — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<TreeItemProps>(), { isDisabled: false });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLLIElement>('el');\nconst tree = useTreeContext();\nconst treeLevel = useTreeLevel();\n\nconst isSelected = computed(() => tree.selectedValue === props.value);\n\nfunction activate(): void {\n tree.setSelectedValue(props.value);\n}\n\nconst classes = computed(() => cn('list-none', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <li ref=\"el\" role=\"presentation\" v-bind=\"rest\" :class=\"classes\">\n <TreeNodeRow\n :level=\"treeLevel.level\"\n :is-selected=\"isSelected\"\n :has-children=\"false\"\n :is-disabled=\"isDisabled\"\n :on-activate=\"activate\"\n >\n <slot />\n </TreeNodeRow>\n </li>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/** Defines the Table row density. */\nexport const TableDensity = {\n /** Refers to the tightest padding. */\n Compact: 'compact',\n /** Refers to the default padding. */\n Cozy: 'cozy',\n /** Refers to relaxed padding. */\n Comfortable: 'comfortable',\n /** Refers to the roomiest padding. */\n Roomy: 'roomy',\n} as const;\n\nexport type TableDensity = (typeof TableDensity)[keyof typeof TableDensity];\n\n/** Defines the corner radius applied to the Table scroll wrapper. */\nexport const TableRadius = {\n /** Refers to square corners. */\n None: 'none',\n /** Refers to a small radius. */\n Sm: 'sm',\n /** Refers to a medium radius. */\n Md: 'md',\n /** Refers to a large radius. */\n Lg: 'lg',\n /** Refers to an extra-large radius. */\n Xl: 'xl',\n /** Refers to a 2x-large radius. */\n Xxl: '2xl',\n} as const;\n\nexport type TableRadius = (typeof TableRadius)[keyof typeof TableRadius];\n\n/** The density / striping state a `Table` root shares with its sections and cells. */\nexport interface TableContextValue {\n isStriped: boolean;\n isHoverable: boolean;\n density: TableDensity;\n}\n\nexport const TableKey: InjectionKey<TableContextValue> = Symbol('wow-two.table');\n\n/**\n * The fallback used when a section or cell renders outside a `Table` root —\n * React's `createContext` default value, preserved so a stray `<TableCell>`\n * still picks the cozy padding rather than throwing.\n */\nexport const DEFAULT_TABLE_CONTEXT: TableContextValue = {\n isStriped: false,\n isHoverable: false,\n density: TableDensity.Cozy,\n};\n\n/** Reads the enclosing `Table` state, falling back to the cozy defaults. */\nexport function useTableContext(): TableContextValue {\n return inject(TableKey, DEFAULT_TABLE_CONTEXT);\n}\n\nexport const DENSITY_CELL: Record<TableDensity, string> = {\n compact: 'px-2 py-1.5 text-sm',\n cozy: 'px-3 py-2 text-sm',\n comfortable: 'px-4 py-3 text-sm',\n roomy: 'px-5 py-4 text-sm',\n};\n\nexport const WRAPPER_RADIUS: Record<TableRadius, string> = {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n};\n","<script lang=\"ts\">\n/* `TableDensity` / `TableRadius` are imported here (not in `<script setup>`) so\n the one binding serves as both the type below and the runtime value used in\n `withDefaults`. */\nimport { TableDensity, TableRadius } from './TableContext';\n\nexport interface TableProps {\n isStriped?: boolean;\n isHoverable?: boolean;\n density?: TableDensity;\n isBare?: boolean;\n /** The corner radius of the scroll wrapper (ignored when `isBare`). */\n radius?: TableRadius;\n\n /** The classes applied to the scroll wrapper (ignored when `isBare`). A fallthrough `class` still lands on the inner `<table>`. */\n containerClassName?: string;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { TableKey, WRAPPER_RADIUS, type TableContextValue } from './TableContext';\n\n/**\n * Data table root. Owns the scroll wrapper (unless `isBare`) and shares density\n * / striping with its sections through injection, so `TableBody`, `TableCell`\n * and `TableHeaderCell` need no props of their own.\n *\n * React attached the sections as `Table.Body` / `.Row` / … via `Object.assign`.\n * An SFC's generated default export cannot carry statics cleanly, so they ship\n * as siblings: `TableHead`, `TableBody`, `TableFooter`, `TableRow`,\n * `TableHeaderCell`, `TableCell`, `TableCaption`.\n */\ndefineOptions({ name: 'Table', inheritAttrs: false });\n\n/** The table sections — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<TableProps>(), {\n isStriped: false,\n isHoverable: false,\n density: TableDensity.Cozy,\n isBare: false,\n radius: TableRadius.Md,\n containerClassName: undefined,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLTableElement>('el');\n\n/* Live getters, not a snapshot — a density change on the root has to reach\n every already-mounted cell, which a plain object literal would not do. */\nprovide<TableContextValue>(TableKey, {\n get isStriped() {\n return props.isStriped;\n },\n get isHoverable() {\n return props.isHoverable;\n },\n get density() {\n return props.density;\n },\n});\n\nconst classes = computed(() =>\n cn('w-full caption-bottom border-collapse text-left', attrs.class as string | undefined),\n);\n\nconst containerClasses = computed(() =>\n cn(\n 'relative w-full overflow-x-auto border border-border',\n WRAPPER_RADIUS[props.radius],\n props.containerClassName,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <table v-if=\"props.isBare\" ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <slot />\n </table>\n <div v-else :class=\"containerClasses\">\n <table ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <slot />\n </table>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the Table header typography treatment. */\nexport const TableHeadVariant = {\n /** Refers to the uppercase, tracked default. */\n Uppercase: 'uppercase',\n /** Refers to normal-case `text-sm` heads. */\n Plain: 'plain',\n} as const;\n\nexport type TableHeadVariant = (typeof TableHeadVariant)[keyof typeof TableHeadVariant];\n\nconst HEAD_VARIANT: Record<TableHeadVariant, string> = {\n uppercase: 'text-xs font-semibold uppercase tracking-wide text-muted-foreground',\n plain: 'text-sm font-semibold text-foreground',\n};\n\nexport interface TableHeadProps {\n /** The typography treatment for the header row. Defaults to `uppercase` (current look). */\n headVariant?: TableHeadVariant;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The `thead` section of a `Table`. */\ndefineOptions({ name: 'TableHead', inheritAttrs: false });\n\n/** The header rows — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<TableHeadProps>(), {\n headVariant: TableHeadVariant.Uppercase,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLTableSectionElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'border-b border-border bg-muted/50',\n HEAD_VARIANT[props.headVariant],\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <thead ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></thead>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — every attribute falls through. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useTableContext } from './TableContext';\n\n/** The `tbody` section of a `Table` — picks up striping / hover from the root. */\ndefineOptions({ name: 'TableBody', inheritAttrs: false });\n\n/** The body rows — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLTableSectionElement>('el');\nconst table = useTableContext();\n\nconst classes = computed(() =>\n cn(\n table.isStriped && '[&>tr:nth-child(even)]:bg-muted/30',\n table.isHoverable && '[&>tr:hover]:bg-muted',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <tbody ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></tbody>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — every attribute falls through. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The `tfoot` section of a `Table`. */\ndefineOptions({ name: 'TableFooter', inheritAttrs: false });\n\n/** The footer rows — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLTableSectionElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'border-t border-border bg-muted/50 font-medium',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <tfoot ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></tfoot>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — every attribute falls through. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** A `tr` in a `Table`. Set `data-selected` to tint it with the selection fill. */\ndefineOptions({ name: 'TableRow', inheritAttrs: false });\n\n/** The row cells — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLTableRowElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'border-b border-border last:border-0 transition-colors data-[selected]:bg-primary-soft',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <tr ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></tr>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `TableHeaderCellProps` and consumers import it. */\nexport interface TableHeaderCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { DENSITY_CELL, useTableContext } from './TableContext';\n\n/** A `th` column header in a `Table` — padding follows the root's density. */\ndefineOptions({ name: 'TableHeaderCell', inheritAttrs: false });\n\n/** The header cell content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLTableCellElement>('el');\nconst table = useTableContext();\n\nconst classes = computed(() =>\n cn(\n DENSITY_CELL[table.density],\n 'font-semibold text-foreground',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <th ref=\"el\" scope=\"col\" v-bind=\"rest\" :class=\"classes\"><slot /></th>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `TableCellProps` and consumers import it. */\nexport interface TableCellProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { DENSITY_CELL, useTableContext } from './TableContext';\n\n/** A `td` in a `Table` — padding follows the root's density. */\ndefineOptions({ name: 'TableCell', inheritAttrs: false });\n\n/** The cell content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLTableCellElement>('el');\nconst table = useTableContext();\n\nconst classes = computed(() =>\n cn(DENSITY_CELL[table.density], 'align-middle', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <td ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></td>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — every attribute falls through. The block itself is load-bearing:\n in a `<script setup>`-only SFC, `vue-eslint-parser` loses `ignoreRestSiblings` and the\n `const { class: _class, ...others }` omission below trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** The `caption` of a `Table`, rendered below the grid. */\ndefineOptions({ name: 'TableCaption', inheritAttrs: false });\n\n/** The caption copy — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLTableCaptionElement>('el');\n\nconst classes = computed(() =>\n cn('mt-2 text-sm text-muted-foreground', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <caption ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></caption>\n</template>\n","<script lang=\"ts\">\nimport { Temporal } from 'temporal-polyfill';\nimport { compareStrings } from '../../../foundation/utils';\nimport type { TableDensity } from '../table';\n\n/** Defines the sort order of a DataTable column. */\nexport const SortDirection = {\n /** Refers to ascending order. */\n Asc: 'asc',\n /** Refers to descending order. */\n Desc: 'desc',\n} as const;\n\nexport type SortDirection = (typeof SortDirection)[keyof typeof SortDirection];\n\n/** Defines the horizontal text alignment of a DataTable column. */\nexport const DataTableColumnAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to centered alignment. */\n Center: 'center',\n /** Refers to right alignment. */\n Right: 'right',\n} as const;\n\nexport type DataTableColumnAlign =\n (typeof DataTableColumnAlign)[keyof typeof DataTableColumnAlign];\n\nexport interface DataTableSort {\n columnKey: string;\n direction: SortDirection;\n}\n\nexport interface DataTableColumn<T> {\n key: string;\n /**\n * The header label. React took a `ReactNode`; a column is an array entry and\n * cannot become its own slot, so the scalar stays here and the `header`\n * scoped slot is the rich override.\n */\n header: string | number;\n accessor?: (row: T) => unknown;\n /**\n * The per-cell renderer. Returns a value rendered as text; for rich markup\n * use the `cell` scoped slot, which receives `{ row, column, index }`.\n */\n cell?: (row: T, index: number) => unknown;\n isSortable?: boolean;\n align?: DataTableColumnAlign;\n width?: string;\n}\n\nexport interface DataTableProps<T> {\n columns: ReadonlyArray<DataTableColumn<T>>;\n data: ReadonlyArray<T>;\n rowKey?: (row: T, index: number) => string | number;\n /**\n * Fires with the clicked row and its index.\n *\n * Kept a prop rather than an emit because its *presence* is load-bearing — it\n * seeds `isHoverable` and the `cursor-pointer` class, and Vue strips declared\n * emit listeners out of `useAttrs()`.\n */\n onRowClick?: (row: T, index: number) => void;\n sortBy?: DataTableSort | null;\n defaultSortBy?: DataTableSort | null;\n isStriped?: boolean;\n isHoverable?: boolean;\n density?: TableDensity;\n isBare?: boolean;\n /** The empty-state text. Default `No results.`; override richly via the `emptyContent` slot. */\n emptyContent?: string | number;\n}\n\nfunction defaultCompare(a: unknown, b: unknown): number {\n if (a === b) return 0;\n if (a === null || a === undefined) return 1;\n if (b === null || b === undefined) return -1;\n if (typeof a === 'number' && typeof b === 'number') return a - b;\n if (a instanceof Temporal.PlainDate && b instanceof Temporal.PlainDate)\n return Temporal.PlainDate.compare(a, b);\n if (a instanceof Temporal.PlainTime && b instanceof Temporal.PlainTime)\n return Temporal.PlainTime.compare(a, b);\n if (a instanceof Temporal.PlainDateTime && b instanceof Temporal.PlainDateTime)\n return Temporal.PlainDateTime.compare(a, b);\n if (a instanceof Temporal.ZonedDateTime && b instanceof Temporal.ZonedDateTime)\n return Temporal.ZonedDateTime.compare(a, b);\n // Native `Date` retained: DataTable cells hold arbitrary consumer values, so a\n // consumer may still put a `Date` in a column — this is a generic value\n // comparator, not a date-value API surface.\n if (a instanceof Date && b instanceof Date) return a.getTime() - b.getTime();\n return compareStrings(String(a), String(b));\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { computed } from 'vue';\nimport { ArrowDown, ArrowUp, ArrowUpDown } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from '../table';\n\n/**\n * Sortable data table driven by a `columns` descriptor. Wraps the `Table`\n * primitives; `class` and `aria-label` reach the inner `<table>` by fallthrough,\n * which is why this component keeps `inheritAttrs` on.\n */\ndefineOptions({ name: 'DataTable' });\n\nconst props = withDefaults(defineProps<DataTableProps<T>>(), {\n rowKey: undefined,\n onRowClick: undefined,\n sortBy: undefined,\n defaultSortBy: undefined,\n // Explicit `undefined` so an absent Boolean prop is not cast to `false` and\n // each one keeps deferring to `Table`'s own default.\n isStriped: undefined,\n isHoverable: undefined,\n density: undefined,\n isBare: undefined,\n emptyContent: 'No results.',\n});\n\nconst emit = defineEmits<{\n /** Fires with the next sort, or `null` once the cycle clears it. */\n 'sort-change': [sort: DataTableSort | null];\n}>();\n\ndefineSlots<{\n /** Overrides a column header. Falls back to the column's own `header`. */\n header(props: { column: DataTableColumn<T> }): unknown;\n /** Overrides a body cell. Falls back to the column's `cell`, then its `accessor`. */\n cell(props: { row: T; column: DataTableColumn<T>; index: number }): unknown;\n /** Overrides the empty-state content. Falls back to the `emptyContent` prop. */\n emptyContent(): unknown;\n}>();\n\nconst { value: sort, setValue: setSort } = useControlled<DataTableSort | null>({\n controlled: () => props.sortBy,\n default: props.defaultSortBy ?? null,\n onChange: (next) => emit('sort-change', next),\n});\n\n/** React seeded `isHoverable` from `!!onRowClick`; kept as an explicit fallback. */\nconst resolvedHoverable = computed(() => props.isHoverable ?? props.onRowClick != null);\n\nconst sortedData = computed<ReadonlyArray<T>>(() => {\n const active = sort.value;\n if (!active) return props.data;\n const column = props.columns.find((entry) => entry.key === active.columnKey);\n const accessor = column?.accessor;\n if (!accessor) return props.data;\n return [...props.data].sort((a, b) => {\n const result = defaultCompare(accessor(a), accessor(b));\n return active.direction === SortDirection.Asc ? result : -result;\n });\n});\n\nfunction cycleSort(columnKey: string): void {\n const active = sort.value;\n if (!active || active.columnKey !== columnKey) {\n setSort({ columnKey, direction: SortDirection.Asc });\n } else if (active.direction === SortDirection.Asc) {\n setSort({ columnKey, direction: SortDirection.Desc });\n } else {\n setSort(null);\n }\n}\n\nfunction alignClass(align: DataTableColumn<T>['align']): string {\n if (align === DataTableColumnAlign.Right) return 'text-right';\n if (align === DataTableColumnAlign.Center) return 'text-center';\n return 'text-left';\n}\n\nconst headerCells = computed(() =>\n props.columns.map((column) => {\n const active = sort.value;\n const isSorted = active?.columnKey === column.key;\n return {\n key: column.key,\n column,\n isSorted,\n isAscending: isSorted && active?.direction === SortDirection.Asc,\n ariaSort: isSorted\n ? active?.direction === SortDirection.Asc\n ? 'ascending'\n : 'descending'\n : column.isSortable\n ? 'none'\n : undefined,\n style: column.width ? { width: column.width } : undefined,\n class: alignClass(column.align),\n };\n }),\n);\n\nconst rows = computed(() =>\n sortedData.value.map((row, index) => ({\n key: props.rowKey ? props.rowKey(row, index) : index,\n row,\n index,\n /* `onClick` only exists when a handler was supplied — React's `onClick={onRowClick ? … : undefined}`. */\n attrs: props.onRowClick\n ? { onClick: (): void => props.onRowClick?.(row, index) }\n : ({} as Record<string, never>),\n class: cn(props.onRowClick && 'cursor-pointer'),\n })),\n);\n\n/** The column's own renderer, then its accessor — the fallback under the `cell` slot. */\nfunction renderCell(column: DataTableColumn<T>, row: T, index: number): unknown {\n if (column.cell) return column.cell(row, index);\n if (column.accessor) return column.accessor(row);\n return null;\n}\n\nconst SORT_BUTTON_CLASS =\n 'inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';\n</script>\n\n<template>\n <Table\n :is-striped=\"isStriped\"\n :is-hoverable=\"resolvedHoverable\"\n :density=\"density\"\n :is-bare=\"isBare\"\n >\n <TableHead>\n <TableRow>\n <TableHeaderCell\n v-for=\"cell in headerCells\"\n :key=\"cell.key\"\n :aria-sort=\"cell.ariaSort\"\n :style=\"cell.style\"\n :class=\"cell.class\"\n >\n <button\n v-if=\"cell.column.isSortable\"\n type=\"button\"\n :class=\"SORT_BUTTON_CLASS\"\n @click=\"cycleSort(cell.key)\"\n >\n <span>\n <slot name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </span>\n <ArrowUp v-if=\"cell.isSorted && cell.isAscending\" class=\"h-3.5 w-3.5\" />\n <ArrowDown v-else-if=\"cell.isSorted\" class=\"h-3.5 w-3.5\" />\n <ArrowUpDown v-else class=\"h-3.5 w-3.5 opacity-50\" />\n </button>\n <slot v-else name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </TableHeaderCell>\n </TableRow>\n </TableHead>\n <TableBody>\n <template v-if=\"rows.length === 0\">\n <TableRow>\n <TableCell\n :colspan=\"columns.length\"\n class=\"py-8 text-center text-muted-foreground\"\n >\n <slot name=\"emptyContent\">{{ emptyContent }}</slot>\n </TableCell>\n </TableRow>\n </template>\n <template v-else>\n <TableRow v-for=\"row in rows\" :key=\"row.key\" v-bind=\"row.attrs\" :class=\"row.class\">\n <TableCell v-for=\"column in columns\" :key=\"column.key\" :class=\"alignClass(column.align)\">\n <slot name=\"cell\" :row=\"row.row\" :column=\"column\" :index=\"row.index\">{{\n renderCell(column, row.row, row.index)\n }}</slot>\n </TableCell>\n </TableRow>\n </template>\n </TableBody>\n </Table>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/**\n * The seam between `Carousel` and its `Viewport` / `Slides` / `Prev` / `Next` /\n * `Dots` / `Dot` children.\n *\n * React attached those as `Carousel.Viewport` / `.Slides` / … statics over a\n * `createContext`. An SFC's generated default export cannot carry statics\n * cleanly, so they ship as sibling components and share state through\n * provide/inject instead.\n *\n * Every non-function field is a live getter — read it, don't destructure.\n */\nexport interface CarouselContextValue {\n /** The active slide index. */\n readonly index: number;\n /** Moves to a slide, clamped or wrapped per `loop`. */\n setIndex: (index: number) => void;\n /** The slide count. */\n readonly count: number;\n /** Publishes the slide count — `CarouselSlides` owns this. */\n setCount: (count: number) => void;\n /** The wrap-around state. */\n readonly loop: boolean;\n /** Moves one slide back. */\n prev: () => void;\n /** Moves one slide forward. */\n next: () => void;\n /** The auto-play pause state — hover / focus sets it. */\n readonly paused: boolean;\n /** Sets the pause state. */\n setPaused: (paused: boolean) => void;\n /** The auto-play interval in ms, when enabled. */\n readonly autoPlay: number | undefined;\n}\n\nexport const CarouselKey: InjectionKey<CarouselContextValue> = Symbol('wow-two.carousel');\n\nexport function useCarouselContext(): CarouselContextValue {\n const context = inject(CarouselKey, null);\n if (!context) throw new Error('Carousel.* must be used inside <Carousel>');\n return context;\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `CarouselNavButtonProps` and consumers import it.\n Its only member was `aria-label`, which stays a FALLTHROUGH attr here — declaring\n a hyphenated prop name would have Vue camelize it to `ariaLabel` and the default\n would never apply. Shared by `CarouselPrev` and `CarouselNext`, so it lives here\n rather than in either SFC. */\nexport interface CarouselNavButtonProps {}\n","<script lang=\"ts\">\nexport interface CarouselProps {\n /** The controlled active slide index. */\n index?: number;\n /** The uncontrolled initial slide index. Default `0`. */\n defaultIndex?: number;\n /** The wrap-around state. Default `false`. */\n canLoop?: boolean;\n /** The auto-advance interval in ms. Omit to disable. */\n autoPlay?: number;\n /** The explicit slide count — overrides the automatic count (use for virtualised slides). */\n slidesCount?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, useAttrs, useTemplateRef, watch, watchEffect } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { CarouselKey, type CarouselContextValue } from './CarouselContext';\n\n/**\n * Carousel root. Owns the index, the slide count and the auto-play pause flag,\n * and publishes them to `CarouselViewport` / `CarouselSlides` / `CarouselPrev` /\n * `CarouselNext` / `CarouselDots` / `CarouselDot` through injection — React\n * attached those as statics, which an SFC's default export cannot carry.\n */\ndefineOptions({ name: 'Carousel', inheritAttrs: false });\n\n/** The viewport, nav buttons and dots — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<CarouselProps>(), {\n index: undefined,\n defaultIndex: 0,\n canLoop: false,\n autoPlay: undefined,\n slidesCount: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires with the newly active slide index. */\n 'index-change': [index: number];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst { value: index, setValue: setIndexState } = useControlled<number>({\n controlled: () => props.index,\n default: props.defaultIndex,\n onChange: (next) => emit('index-change', next),\n});\n\nconst count = ref(props.slidesCount ?? 0);\nconst paused = ref(false);\n\n// External override.\nwatch(\n () => props.slidesCount,\n (value) => {\n if (value != null) count.value = value;\n },\n);\n\nfunction setCount(next: number): void {\n count.value = next;\n}\n\nfunction setIndex(target: number): void {\n if (count.value === 0) {\n setIndexState(0);\n return;\n }\n const next = props.canLoop\n ? ((target % count.value) + count.value) % count.value\n : Math.max(0, Math.min(count.value - 1, target));\n setIndexState(next);\n}\n\nfunction prev(): void {\n setIndex(index.value - 1);\n}\n\nfunction next(): void {\n setIndex(index.value + 1);\n}\n\nfunction setPaused(value: boolean): void {\n paused.value = value;\n}\n\n// Auto-play. `watchEffect` rather than `watch` so the tracked set matches React's\n// dependency array exactly — every value below is read up front, which is what\n// makes the interval restart on an index change the way React's effect did.\nwatchEffect((onCleanup) => {\n const interval = props.autoPlay;\n const loop = props.canLoop;\n const total = count.value;\n const current = index.value;\n if (!interval || paused.value || total === 0) return;\n const handle = window.setInterval(() => {\n setIndex(loop ? current + 1 : Math.min(total - 1, current + 1));\n }, interval);\n onCleanup(() => window.clearInterval(handle));\n});\n\n/* Live getters, not a snapshot — index, count and pause state have to reach\n every already-mounted child. */\nprovide<CarouselContextValue>(CarouselKey, {\n get index() {\n return index.value;\n },\n setIndex,\n get count() {\n return count.value;\n },\n setCount,\n get loop() {\n return props.canLoop;\n },\n prev,\n next,\n get paused() {\n return paused.value;\n },\n setPaused,\n get autoPlay() {\n return props.autoPlay;\n },\n});\n\nconst classes = computed(() => cn('relative', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `focusin` / `focusout`, not `focus` / `blur`: React's `onFocus` / `onBlur`\n on a container bubble from descendants, and the native pair does not. -->\n <div\n ref=\"el\"\n v-bind=\"rest\"\n :class=\"classes\"\n @mouseenter=\"setPaused(true)\"\n @mouseleave=\"setPaused(false)\"\n @focusin=\"setPaused(true)\"\n @focusout=\"setPaused(false)\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `CarouselViewportProps` and consumers import it.\n Its only member was `aria-label`, which stays a FALLTHROUGH attr — declaring a\n hyphenated prop name would have Vue camelize it to `ariaLabel`, so the\n `'Carousel'` default below would never apply. */\nexport interface CarouselViewportProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useCarouselContext } from './CarouselContext';\n\n/** The clipping frame. Owns the arrow-key seam; React shipped it as `Carousel.Viewport`. */\ndefineOptions({ name: 'CarouselViewport', inheritAttrs: false });\n\n/** The `CarouselSlides` content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst carousel = useCarouselContext();\n\n/** The accessible label for the viewport. Default `'Carousel'`. */\nconst ariaLabel = computed(() => (attrs['aria-label'] as string | undefined) ?? 'Carousel');\n\n/**\n * Runs after a consumer's own `keydown` — `rest` sits ahead of this binding in\n * the template, which is what makes the `defaultPrevented` check meaningful, the\n * same way React's explicit `onKeyDown?.(e)` call did.\n */\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n carousel.prev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n carousel.next();\n }\n}\n\nconst classes = computed(() =>\n cn(\n 'relative overflow-hidden rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class` and `aria-label`, both re-applied explicitly above. */\nconst rest = computed(() => {\n const { class: _class, 'aria-label': _ariaLabel, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n role=\"group\"\n aria-roledescription=\"carousel\"\n :aria-label=\"ariaLabel\"\n :tabindex=\"0\"\n v-bind=\"rest\"\n :class=\"classes\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `CarouselSlidesProps` and consumers import it. Its\n only member was `children`, which is the default slot here. */\nexport interface CarouselSlidesProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, onUpdated, useAttrs, useSlots, useTemplateRef, type VNode } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { renderableChildren } from '../../../foundation/primitives';\nimport { useCarouselContext } from './CarouselContext';\n\n/**\n * The sliding track. Each child is wrapped in its own `role=\"group\"` slide frame,\n * exactly as React's `Children.toArray(children).filter(isValidElement)` did.\n */\ndefineOptions({ name: 'CarouselSlides', inheritAttrs: false });\n\n/** The slides — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst carousel = useCarouselContext();\n\n/**\n * A function, not a `computed`: the slot is re-invoked on every render, so the\n * vnodes handed to `v-for` are always fresh rather than a cached array of\n * already-mounted ones. Call it — `v-for` over a bare function iterates nothing.\n */\nfunction slideChildren(): Array<VNode> {\n return renderableChildren(slots.default?.());\n}\n\n/**\n * React published the count from `useEffect([childArray.length])`. Vue has no\n * children array to depend on, so the count is re-read after every render of\n * this component — which is precisely when the slot content can have changed.\n * Writing an unchanged count is a no-op on a ref, so this cannot loop.\n */\nfunction syncCount(): void {\n carousel.setCount(slideChildren().length);\n}\n\nonMounted(syncCount);\nonUpdated(syncCount);\n\nconst classes = computed(() =>\n cn('flex transition-transform duration-300 ease-out', attrs.class as string | undefined),\n);\n\n/** Vue does not append units to a numeric `:style` value the way React does — spelled out. */\nconst trackStyle = computed(() => ({ transform: `translateX(-${carousel.index * 100}%)` }));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n :aria-live=\"carousel.autoPlay ? 'off' : 'polite'\"\n v-bind=\"rest\"\n :class=\"classes\"\n :style=\"trackStyle\"\n >\n <!-- The single-element `v-for` hoists the slot call into a template local, so\n the slot is invoked once per render and `length` is React's\n `childArray.length` rather than the injected count, which lags by a tick. -->\n <template v-for=\"(children, hoist) in [slideChildren()]\" :key=\"hoist\">\n <div\n v-for=\"(child, slideIndex) in children\"\n :key=\"slideIndex\"\n role=\"group\"\n aria-roledescription=\"slide\"\n :aria-label=\"`${slideIndex + 1} of ${children.length}`\"\n :aria-hidden=\"slideIndex !== carousel.index || undefined\"\n class=\"w-full shrink-0\"\n >\n <component :is=\"child\" />\n </div>\n </template>\n </div>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `CarouselSlideProps` (an alias of the div's HTML\n attributes) and consumers import it. Every attribute falls through here. */\nexport interface CarouselSlideProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** One slide's content box. React shipped it as `Carousel.Slide`. */\ndefineOptions({ name: 'CarouselSlide', inheritAttrs: false });\n\n/** The slide content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() => cn('h-full w-full', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — `aria-label` and `type` both stay FALLTHROUGH attrs, and\n the shared `CarouselNavButtonProps` name lives in `CarouselContext.ts`. The block\n itself is load-bearing: in a `<script setup>`-only SFC, `vue-eslint-parser` loses\n `ignoreRestSiblings` and the `const { class: _class, ...others }` omission below\n trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { ChevronLeft } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useCarouselContext } from './CarouselContext';\n\n/** The step-back nav button. React shipped it as `Carousel.Prev`. */\ndefineOptions({ name: 'CarouselPrev', inheritAttrs: false });\n\n/** Overrides the chevron — React's `children ?? <Icon …>`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLButtonElement>('el');\nconst carousel = useCarouselContext();\n\nconst isDisabled = computed(() => !carousel.loop && carousel.index === 0);\n\n/**\n * Runs after a consumer's own `click` — `rest` sits ahead of this binding in the\n * template, which is what makes the `defaultPrevented` check meaningful, the same\n * way React's explicit `onClick?.(e)` call did.\n */\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n carousel.prev();\n}\n\nconst classes = computed(() =>\n cn(\n 'absolute left-2 top-1/2 inline-flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-1 ring-border transition-colors hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `type` and `aria-label` sit ahead of `rest`, so a consumer's own value wins —\n React's `type = 'button'` / `'aria-label' = 'Previous slide'` destructured defaults. -->\n <button\n ref=\"el\"\n type=\"button\"\n aria-label=\"Previous slide\"\n :disabled=\"isDisabled\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"onClick\"\n >\n <slot><Icon :icon=\"ChevronLeft\" :size=\"16\" /></slot>\n </button>\n</template>\n","<script lang=\"ts\">\n/* No props of its own — `aria-label` and `type` both stay FALLTHROUGH attrs, and\n the shared `CarouselNavButtonProps` name lives in `CarouselContext.ts`. The block\n itself is load-bearing: in a `<script setup>`-only SFC, `vue-eslint-parser` loses\n `ignoreRestSiblings` and the `const { class: _class, ...others }` omission below\n trips `no-unused-vars`. */\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { ChevronRight } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { useCarouselContext } from './CarouselContext';\n\n/** The step-forward nav button. React shipped it as `Carousel.Next`. */\ndefineOptions({ name: 'CarouselNext', inheritAttrs: false });\n\n/** Overrides the chevron — React's `children ?? <Icon …>`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLButtonElement>('el');\nconst carousel = useCarouselContext();\n\nconst isDisabled = computed(() => !carousel.loop && carousel.index === carousel.count - 1);\n\n/**\n * Runs after a consumer's own `click` — `rest` sits ahead of this binding in the\n * template, which is what makes the `defaultPrevented` check meaningful, the same\n * way React's explicit `onClick?.(e)` call did.\n */\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n carousel.next();\n}\n\nconst classes = computed(() =>\n cn(\n 'absolute right-2 top-1/2 inline-flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-full bg-background/80 text-foreground shadow ring-1 ring-border transition-colors hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `type` and `aria-label` sit ahead of `rest`, so a consumer's own value wins —\n React's `type = 'button'` / `'aria-label' = 'Next slide'` destructured defaults. -->\n <button\n ref=\"el\"\n type=\"button\"\n aria-label=\"Next slide\"\n :disabled=\"isDisabled\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"onClick\"\n >\n <slot><Icon :icon=\"ChevronRight\" :size=\"16\" /></slot>\n </button>\n</template>\n","<script lang=\"ts\">\nexport interface CarouselDotProps {\n /** The slide this dot jumps to. */\n slideIndex: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useCarouselContext } from './CarouselContext';\n\n/** One pagination dot. React shipped it as `Carousel.Dot`. */\ndefineOptions({ name: 'CarouselDot', inheritAttrs: false });\n\nconst props = defineProps<CarouselDotProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLButtonElement>('el');\nconst carousel = useCarouselContext();\n\nconst isActive = computed(() => carousel.index === props.slideIndex);\n\n/**\n * Runs after a consumer's own `click` — `rest` sits ahead of this binding in the\n * template, which is what makes the `defaultPrevented` check meaningful, the same\n * way React's explicit `onClick?.(e)` call did.\n */\nfunction onClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n carousel.setIndex(props.slideIndex);\n}\n\nconst classes = computed(() =>\n cn(\n 'h-1.5 rounded-full bg-border transition-all hover:bg-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n isActive.value ? 'w-6 bg-primary hover:bg-primary' : 'w-1.5',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- `type` sits ahead of `rest` so a consumer's own value wins — React's `type = 'button'`. -->\n <button\n ref=\"el\"\n type=\"button\"\n :aria-label=\"`Go to slide ${slideIndex + 1}`\"\n :aria-current=\"isActive || undefined\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"onClick\"\n />\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `CarouselDotsProps` (an alias of the div's HTML\n attributes) and consumers import it. Every attribute falls through here. */\nexport interface CarouselDotsProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useCarouselContext } from './CarouselContext';\nimport CarouselDot from './CarouselDot.vue';\n\n/** The pagination dot row, one per slide. React shipped it as `Carousel.Dots`. */\ndefineOptions({ name: 'CarouselDots', inheritAttrs: false });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst carousel = useCarouselContext();\n\nconst slideIndexes = computed(() => Array.from({ length: carousel.count }, (_unused, i) => i));\n\nconst classes = computed(() =>\n cn('mt-3 flex items-center justify-center gap-1.5', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <CarouselDot v-for=\"slideIndex in slideIndexes\" :key=\"slideIndex\" :slide-index=\"slideIndex\" />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface SwipeActionsProps {\n /** The drag distance (px) the user must exceed before the row snaps open. */\n threshold?: number;\n\n /** The width per action button (px) — used to compute snap distance. */\n actionWidth?: number;\n\n /** The gesture-off flag. */\n isDisabled?: boolean;\n}\n\ntype Side = 'left' | 'right' | null;\n\n/** px of pointer travel beyond which the gesture counts as a drag, not a tap. */\nconst CLICK_SUPPRESS_SLOP = 6;\n</script>\n\n<script setup lang=\"ts\">\nimport {\n Comment,\n Fragment,\n Text as TextVNode,\n computed,\n ref,\n useAttrs,\n useSlots,\n useTemplateRef,\n type VNode,\n} from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Drag a row left/right to reveal action slots. Pointer-event based — works\n * with touch and mouse. Tap the row body while open to close.\n */\ndefineOptions({ name: 'SwipeActions', inheritAttrs: false });\n\ndefineSlots<{\n /** The row body — React's required `children`. */\n default(): unknown;\n /** The actions revealed by dragging right. One element per action slot. */\n left?(): unknown;\n /** The actions revealed by dragging left. One element per action slot. */\n right?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<SwipeActionsProps>(), {\n threshold: 60,\n actionWidth: 72,\n});\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/**\n * Number of action slots in a side. React counted `ReactNode` children with\n * `Children.toArray`; here the slot's vnodes are counted, flattening fragments\n * so a `v-for` sizes one slot per iteration — the snap width is\n * `slots × actionWidth` either way.\n */\nfunction countNodes(nodes: ReadonlyArray<VNode> | undefined): number {\n if (!nodes) return 0;\n let count = 0;\n for (const node of nodes) {\n if (node.type === Fragment) {\n count += countNodes(Array.isArray(node.children) ? (node.children as Array<VNode>) : undefined);\n continue;\n }\n // A falsy `v-if` renders a comment placeholder, and condensed whitespace a\n // blank text node — neither is an action.\n if (node.type === Comment) continue;\n if (node.type === TextVNode && typeof node.children === 'string' && !node.children.trim()) {\n continue;\n }\n count += 1;\n }\n return count;\n}\n\n/* Both are first read from the template, i.e. during render — which is what\n keeps the slot call tracked and warning-free. */\nconst leftMax = computed(() => countNodes(slots.left?.()) * props.actionWidth);\nconst rightMax = computed(() => countNodes(slots.right?.()) * props.actionWidth);\n\n/** Reactive, unlike React's `useRef`: the content transition keys off it. */\nconst startX = ref<number | null>(null);\nconst offset = ref(0);\nconst openSide = ref<Side>(null);\n\n/* Mutable non-render values — React's remaining `useRef`s. */\nlet startOffset = 0;\nlet suppressClick = false;\n\nfunction onPointerDown(e: PointerEvent): void {\n if (props.isDisabled) return;\n startX.value = e.clientX;\n startOffset = offset.value;\n suppressClick = false;\n (e.currentTarget as HTMLDivElement).setPointerCapture(e.pointerId);\n}\n\nfunction onPointerMove(e: PointerEvent): void {\n if (props.isDisabled || startX.value == null) return;\n if (Math.abs(e.clientX - startX.value) > CLICK_SUPPRESS_SLOP) {\n suppressClick = true;\n }\n const dx = e.clientX - startX.value + startOffset;\n offset.value = Math.max(-rightMax.value, Math.min(leftMax.value, dx));\n}\n\nfunction onPointerUp(e: PointerEvent): void {\n if (startX.value == null) return;\n startX.value = null;\n (e.currentTarget as HTMLDivElement).releasePointerCapture?.(e.pointerId);\n // Snap.\n if (offset.value > props.threshold && leftMax.value > 0) {\n offset.value = leftMax.value;\n openSide.value = 'left';\n } else if (offset.value < -props.threshold && rightMax.value > 0) {\n offset.value = -rightMax.value;\n openSide.value = 'right';\n } else {\n offset.value = 0;\n openSide.value = null;\n }\n}\n\nfunction close(): void {\n offset.value = 0;\n openSide.value = null;\n}\n\nfunction onClick(): void {\n // Mouse drags always emit a click after pointerup — swallow it so a\n // drag-to-open doesn't instantly close. Plain taps still close.\n if (suppressClick) {\n suppressClick = false;\n return;\n }\n if (openSide.value) close();\n}\n\nconst classes = computed(() =>\n cn('relative overflow-hidden bg-card text-card-foreground', attrs.class as string | undefined),\n);\n\n/** Vue does not append `px` to a numeric `:style` value the way React did, so every length is spelled out. */\nconst leftStyle = computed(() => ({ width: `${leftMax.value}px` }));\nconst rightStyle = computed(() => ({ width: `${rightMax.value}px` }));\n\nconst contentStyle = computed(() => ({\n transform: `translateX(${offset.value}px)`,\n transition: startX.value == null ? 'transform 200ms ease-out' : 'none',\n touchAction: 'pan-y',\n}));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div\n v-if=\"$slots.left\"\n class=\"absolute inset-y-0 left-0 flex\"\n :style=\"leftStyle\"\n :aria-hidden=\"openSide !== 'left'\"\n >\n <slot name=\"left\" />\n </div>\n\n <div\n v-if=\"$slots.right\"\n class=\"absolute inset-y-0 right-0 flex\"\n :style=\"rightStyle\"\n :aria-hidden=\"openSide !== 'right'\"\n >\n <slot name=\"right\" />\n </div>\n\n <div\n class=\"relative bg-card\"\n :style=\"contentStyle\"\n @pointerdown=\"onPointerDown\"\n @pointermove=\"onPointerMove\"\n @pointerup=\"onPointerUp\"\n @pointercancel=\"onPointerUp\"\n @click=\"onClick\"\n >\n <slot />\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the DiffViewer layout mode. */\nexport const DiffView = {\n /** Refers to side-by-side columns. */\n Split: 'split',\n /** Refers to a single interleaved column. */\n Unified: 'unified',\n} as const;\n\nexport type DiffView = (typeof DiffView)[keyof typeof DiffView];\n\n/** Defines a diff row's change operation. */\nconst DiffOp = {\n /** Refers to an unchanged line. */\n Unchanged: 'unchanged',\n /** Refers to an added line. */\n Added: 'added',\n /** Refers to a removed line. */\n Removed: 'removed',\n} as const;\n\ntype DiffOp = (typeof DiffOp)[keyof typeof DiffOp];\n\n/** Defines which side of a split diff a column renders. */\nconst DiffSide = {\n /** Refers to the left (old) column. */\n Left: 'left',\n /** Refers to the right (new) column. */\n Right: 'right',\n} as const;\n\ntype DiffSide = (typeof DiffSide)[keyof typeof DiffSide];\n\ninterface DiffRow {\n op: DiffOp;\n leftNum: number | null;\n rightNum: number | null;\n text: string;\n}\n\nexport interface DiffViewerProps {\n left: string;\n right: string;\n view?: DiffView;\n /** The label for the original text. Default `\"Before\"`. Rich content → the `leftLabel` slot. */\n leftLabel?: string | number;\n /** The label for the modified text. Default `\"After\"`. Rich content → the `rightLabel` slot. */\n rightLabel?: string | number;\n hasStats?: boolean;\n}\n\n/**\n * LCS-based line diff. Returns ordered rows with `unchanged` / `added` /\n * `removed` operations. O(n×m) time + space.\n */\nfunction computeDiff(left: string, right: string): ReadonlyArray<DiffRow> {\n const a = left.split('\\n');\n const b = right.split('\\n');\n const n = a.length;\n const m = b.length;\n\n // LCS table: dp[i][j] = LCS length of a[0..i] and b[0..j].\n const dp: Array<Array<number>> = Array.from({ length: n + 1 }, () => new Array(m + 1).fill(0));\n for (let i = 1; i <= n; i++) {\n for (let j = 1; j <= m; j++) {\n if (a[i - 1] === b[j - 1]) dp[i]![j] = dp[i - 1]![j - 1]! + 1;\n else dp[i]![j] = Math.max(dp[i - 1]![j]!, dp[i]![j - 1]!);\n }\n }\n\n // Backtrack.\n const rows: Array<DiffRow> = [];\n let i = n;\n let j = m;\n while (i > 0 || j > 0) {\n if (i > 0 && j > 0 && a[i - 1] === b[j - 1]) {\n rows.push({ op: DiffOp.Unchanged, leftNum: i, rightNum: j, text: a[i - 1]! });\n i--;\n j--;\n } else if (j > 0 && (i === 0 || dp[i]![j - 1]! >= dp[i - 1]![j]!)) {\n rows.push({ op: DiffOp.Added, leftNum: null, rightNum: j, text: b[j - 1]! });\n j--;\n } else if (i > 0) {\n rows.push({ op: DiffOp.Removed, leftNum: i, rightNum: null, text: a[i - 1]! });\n i--;\n } else {\n break;\n }\n }\n rows.reverse();\n return rows;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Line-level diff viewer (split / unified). Own LCS implementation; no\n * external diff dep. For intra-line word highlighting, install `diff` and\n * post-process — deferred.\n *\n * React's private `SplitView` / `UnifiedView` / `DiffColumn` components render\n * inline here: they held no state and were never exported, so a computed cell\n * model plus two template branches replaces them.\n */\ndefineOptions({ name: 'DiffViewer', inheritAttrs: false });\n\ndefineSlots<{\n /** The left-label override, when a plain string is not enough. */\n leftLabel(): unknown;\n\n /** The right-label override, when a plain string is not enough. */\n rightLabel(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<DiffViewerProps>(), {\n /* Both sides stay declared-required — Vue still warns when one is missing — but\n the defaults keep an absent (or transiently-undefined) value out of\n `computeDiff`, which called `.split` on it and took the whole page down. */\n left: '',\n right: '',\n view: DiffView.Split,\n leftLabel: 'Before',\n rightLabel: 'After',\n hasStats: true,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/** One rendered line of a column. `op: null` marks a filler (the other side has no counterpart). */\ninterface DiffCell {\n key: number;\n op: DiffOp | null;\n num: number | null;\n text: string;\n rowClass: string;\n}\n\n/** One rendered line of the unified column — carries both line numbers and the `+` / `−` marker. */\ninterface UnifiedCell {\n key: number;\n op: DiffOp;\n leftNum: number | null;\n rightNum: number | null;\n sign: string;\n text: string;\n rowClass: string;\n}\n\nconst rows = computed(() => computeDiff(props.left, props.right));\n\nconst stats = computed(() => {\n let added = 0;\n let removed = 0;\n for (const r of rows.value) {\n if (r.op === DiffOp.Added) added += 1;\n if (r.op === DiffOp.Removed) removed += 1;\n }\n return { added, removed };\n});\n\nconst isSplit = computed(() => props.view === DiffView.Split);\n\nconst toCell = (row: DiffRow | undefined, index: number, side: DiffSide): DiffCell => {\n if (!row) return { key: index, op: null, num: null, text: '', rowClass: '' };\n const isChanged =\n (side === DiffSide.Left && row.op === DiffOp.Removed) ||\n (side === DiffSide.Right && row.op === DiffOp.Added);\n return {\n key: index,\n op: row.op,\n num: side === DiffSide.Left ? row.leftNum : row.rightNum,\n text: row.text,\n rowClass: cn(\n 'flex',\n isChanged && side === DiffSide.Left && 'bg-destructive-soft',\n isChanged && side === DiffSide.Right && 'bg-success-soft',\n ),\n };\n};\n\n/**\n * Pair removed/added rows row-by-row when possible to align them.\n * Simple alignment: walk, when we hit \"removed\" followed by \"added\", pair them.\n */\nconst splitColumns = computed<ReadonlyArray<ReadonlyArray<DiffCell>>>(() => {\n const pairs: Array<{ left?: DiffRow; right?: DiffRow }> = [];\n const source = rows.value;\n for (let i = 0; i < source.length; i++) {\n const r = source[i]!;\n if (r.op === DiffOp.Unchanged) {\n pairs.push({ left: r, right: r });\n } else if (r.op === DiffOp.Removed) {\n const next = source[i + 1];\n if (next && next.op === DiffOp.Added) {\n pairs.push({ left: r, right: next });\n i++;\n } else {\n pairs.push({ left: r });\n }\n } else if (r.op === DiffOp.Added) {\n pairs.push({ right: r });\n }\n }\n return [\n pairs.map((p, i) => toCell(p.left, i, DiffSide.Left)),\n pairs.map((p, i) => toCell(p.right, i, DiffSide.Right)),\n ];\n});\n\nconst unifiedRows = computed<ReadonlyArray<UnifiedCell>>(() =>\n rows.value.map((r, i) => ({\n key: i,\n op: r.op,\n leftNum: r.leftNum,\n rightNum: r.rightNum,\n sign: r.op === DiffOp.Added ? '+' : r.op === DiffOp.Removed ? '−' : ' ',\n text: r.text,\n rowClass: cn(\n 'flex',\n r.op === DiffOp.Added && 'bg-success-soft',\n r.op === DiffOp.Removed && 'bg-destructive-soft',\n ),\n })),\n);\n\nconst classes = computed(() =>\n cn(\n 'overflow-hidden rounded-md border border-border bg-card font-mono text-xs text-card-foreground shadow-sm',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div\n v-if=\"props.hasStats\"\n class=\"flex items-center justify-between border-b border-border bg-muted/40 px-3 py-1.5 text-xs\"\n >\n <div class=\"text-muted-foreground\">\n <slot name=\"leftLabel\">{{ props.leftLabel }}</slot> →\n <slot name=\"rightLabel\">{{ props.rightLabel }}</slot>\n </div>\n <div class=\"flex items-center gap-3\">\n <span class=\"text-success font-medium\">+{{ stats.added }}</span>\n <span class=\"text-destructive font-medium\">−{{ stats.removed }}</span>\n </div>\n </div>\n\n <div v-if=\"isSplit\" class=\"grid grid-cols-2 divide-x divide-border\">\n <div v-for=\"(column, columnIndex) in splitColumns\" :key=\"columnIndex\" class=\"overflow-x-auto\">\n <template v-for=\"cell in column\" :key=\"cell.key\">\n <div v-if=\"cell.op === null\" class=\"flex bg-muted/30\">\n <span class=\"select-none w-10 shrink-0 px-2 py-0.5 text-right text-muted-foreground\"\n >·</span\n >\n <span class=\"flex-1 whitespace-pre px-2 py-0.5\">&nbsp;</span>\n </div>\n <div v-else :data-state=\"cell.op\" :class=\"cell.rowClass\">\n <span\n class=\"select-none w-10 shrink-0 border-r border-border px-2 py-0.5 text-right text-muted-foreground tabular-nums\"\n >{{ cell.num ?? '' }}</span\n >\n <span class=\"flex-1 whitespace-pre px-2 py-0.5\">{{ cell.text || ' ' }}</span>\n </div>\n </template>\n </div>\n </div>\n\n <div v-else class=\"overflow-x-auto\">\n <div v-for=\"row in unifiedRows\" :key=\"row.key\" :data-state=\"row.op\" :class=\"row.rowClass\">\n <span\n class=\"select-none w-10 shrink-0 border-r border-border px-2 py-0.5 text-right text-muted-foreground tabular-nums\"\n >{{ row.leftNum ?? '' }}</span\n >\n <span\n class=\"select-none w-10 shrink-0 border-r border-border px-2 py-0.5 text-right text-muted-foreground tabular-nums\"\n >{{ row.rightNum ?? '' }}</span\n >\n <span class=\"w-5 shrink-0 px-1 py-0.5 text-center text-muted-foreground\">{{\n row.sign\n }}</span>\n <span class=\"flex-1 whitespace-pre px-2 py-0.5\">{{ row.text || ' ' }}</span>\n </div>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the Sparkline render style. */\nexport const SparklineVariant = {\n /** Refers to a connected line. */\n Line: 'line',\n /** Refers to a filled area under the line. */\n Area: 'area',\n /** Refers to vertical bars. */\n Bar: 'bar',\n /** Refers to discrete dots. */\n Dot: 'dot',\n} as const;\n\nexport type SparklineVariant = (typeof SparklineVariant)[keyof typeof SparklineVariant];\n\n/** Defines the Sparkline color tone. */\nexport const SparklineTone = {\n /** Refers to the primary brand color. */\n Brand: 'brand',\n /** Refers to the positive / confirmation color. */\n Success: 'success',\n /** Refers to the caution color. */\n Warning: 'warning',\n /** Refers to the destructive / error color. */\n Danger: 'danger',\n /** Refers to the muted color. */\n Muted: 'muted',\n /** Refers to the inherited `currentColor`. */\n Current: 'current',\n} as const;\n\nexport type SparklineTone = (typeof SparklineTone)[keyof typeof SparklineTone];\n\nexport interface SparklineProps {\n /** The series to plot, in order. */\n data: ReadonlyArray<number>;\n\n /** The render style. Default `line`. */\n variant?: SparklineVariant;\n\n /** The px width of the viewBox. Default `120`. */\n width?: number;\n\n /** The px height of the viewBox. Default `32`. */\n height?: number;\n\n /** The color tone. Default `brand`. */\n tone?: SparklineTone;\n\n /** The lower bound of the value scale. Defaults to the series minimum. */\n min?: number;\n\n /** The upper bound of the value scale. Defaults to the series maximum. */\n max?: number;\n\n /** The emphasized dot on the final point. */\n hasLast?: boolean;\n\n /** The accessible label summarizing the trend. */\n ariaLabel?: string;\n}\n\n/** The derived plot geometry — React's `useMemo` payload. */\ninterface SparklineGeometry {\n points: ReadonlyArray<readonly [number, number]>;\n barWidth: number;\n barRenderWidth: number;\n lastX: number;\n lastY: number;\n areaPath: string;\n linePath: string;\n}\n\nconst EMPTY_GEOMETRY: SparklineGeometry = {\n points: [],\n barWidth: 0,\n barRenderWidth: 0,\n lastX: 0,\n lastY: 0,\n areaPath: '',\n linePath: '',\n};\n\nconst TONE_CLASS: Record<SparklineTone, string> = {\n brand: 'text-primary',\n success: 'text-success',\n warning: 'text-warning',\n danger: 'text-destructive',\n muted: 'text-muted-foreground',\n current: '',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\n\n/**\n * Inline trend chart — line / area / bar / dot. SVG, no scales/axes/legend.\n * Color via Tailwind tokens (`text-*`); pair with `currentColor` for parent\n * inheritance.\n */\ndefineOptions({ name: 'Sparkline', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<SparklineProps>(), {\n variant: 'line',\n width: 120,\n height: 32,\n tone: 'brand',\n min: undefined,\n max: undefined,\n hasLast: undefined,\n ariaLabel: 'Trend',\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<SVGSVGElement>('el');\nconst titleId = useId();\n\nconst geometry = computed<SparklineGeometry>(() => {\n const { data, width, height } = props;\n if (data.length === 0) return EMPTY_GEOMETRY;\n\n const min = props.min ?? Math.min(...data);\n const max = props.max ?? Math.max(...data);\n const range = max - min || 1;\n const stepX = data.length === 1 ? 0 : width / (data.length - 1);\n const pad = 1; // keep stroke inside the box\n\n const points = data.map((v, i) => {\n const x = i * stepX;\n const y = height - ((v - min) / range) * (height - pad * 2) - pad;\n return [x, y] as const;\n });\n\n const first = points[0];\n const last = points[points.length - 1];\n if (!first || !last) return EMPTY_GEOMETRY;\n\n const linePath = points.map(([x, y], i) => (i === 0 ? `M${x},${y}` : `L${x},${y}`)).join(' ');\n const areaPath = `${linePath} L${last[0]},${height} L${first[0]},${height} Z`;\n const barWidth = width / data.length - 1;\n\n return {\n points,\n barWidth,\n barRenderWidth: Math.max(1, barWidth),\n lastX: last[0],\n lastY: last[1],\n areaPath,\n linePath,\n };\n});\n\nconst showLast = computed(\n () => Boolean(props.hasLast) && props.data.length > 0 && props.variant !== 'dot',\n);\n\nconst classes = computed(() =>\n cn('inline-block overflow-visible', TONE_CLASS[props.tone], attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <svg\n ref=\"el\"\n role=\"img\"\n :aria-labelledby=\"titleId\"\n :width=\"props.width\"\n :height=\"props.height\"\n :viewBox=\"`0 0 ${props.width} ${props.height}`\"\n preserveAspectRatio=\"none\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <title :id=\"titleId\">{{ props.ariaLabel }}</title>\n\n <template v-if=\"props.variant === 'area'\">\n <path :d=\"geometry.areaPath\" fill=\"currentColor\" fill-opacity=\"0.15\" />\n <path\n :d=\"geometry.linePath\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </template>\n\n <path\n v-if=\"props.variant === 'line'\"\n :d=\"geometry.linePath\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n\n <g v-if=\"props.variant === 'bar'\">\n <rect\n v-for=\"(point, i) in geometry.points\"\n :key=\"i\"\n :x=\"point[0] - geometry.barWidth / 2\"\n :y=\"point[1]\"\n :width=\"geometry.barRenderWidth\"\n :height=\"props.height - point[1]\"\n fill=\"currentColor\"\n rx=\"1\"\n />\n </g>\n\n <g v-if=\"props.variant === 'dot'\">\n <circle\n v-for=\"(point, i) in geometry.points\"\n :key=\"i\"\n :cx=\"point[0]\"\n :cy=\"point[1]\"\n r=\"1.5\"\n fill=\"currentColor\"\n />\n </g>\n\n <circle v-if=\"showLast\" :cx=\"geometry.lastX\" :cy=\"geometry.lastY\" r=\"2.5\" fill=\"currentColor\" />\n </svg>\n</template>\n","<script lang=\"ts\">\n/** Defines props for the radius glyph. */\nexport interface RadiusGlyphProps {\n /** The filled inner disc's radius as a fraction of the outer track (`0..1`). */\n readonly extent: number;\n\n /** The glyph's pixel size. */\n readonly size?: number;\n\n /** The stroke and fill color. */\n readonly color?: string;\n\n /** The outer track's stroke width. */\n readonly strokeWidth?: number;\n\n /** The outer track's opacity. */\n readonly trackOpacity?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useTemplateRef } from 'vue';\n\n/** Renders a concentric-circle glyph whose filled inner disc scales with `extent` (`0..1`) — a compact radial-extent indicator. */\ndefineOptions({ name: 'RadiusGlyph' });\n\nconst props = withDefaults(defineProps<RadiusGlyphProps>(), {\n /* `extent` stays declared-required — Vue still warns when it is missing — but a\n default keeps `undefined` out of `discRadius`, which rendered as `r=\"NaN\"` and\n made the browser reject the `<circle>`. `0` is the low end of its own `0..1`. */\n extent: 0,\n size: 16,\n color: 'currentColor',\n strokeWidth: 1.5,\n trackOpacity: 0.4,\n});\n\nconst el = useTemplateRef<SVGSVGElement>('el');\n\nconst discRadius = computed(() => Math.max(2, 10 * props.extent));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <svg ref=\"el\" viewBox=\"0 0 24 24\" :width=\"props.size\" :height=\"props.size\" aria-hidden=\"true\">\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n fill=\"none\"\n :stroke=\"props.color\"\n :stroke-width=\"props.strokeWidth\"\n :opacity=\"props.trackOpacity\"\n />\n <circle cx=\"12\" cy=\"12\" :r=\"discRadius\" :fill=\"props.color\" />\n </svg>\n</template>\n","<script lang=\"ts\">\n/** Defines props for a frame glyph. */\nexport interface FrameGlyphProps {\n /** The outer frame's corner radius (`0` = square). */\n readonly frameRx: number;\n\n /** The pupil's roundness as a fraction of its size (`0` = square, `0.5` = circle). */\n readonly pupilRoundness: number;\n\n /** The dot-only mode — renders only the enlarged inner pupil instead of the full frame + pupil. */\n readonly isDot?: boolean;\n\n /** The glyph's pixel size. */\n readonly size?: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useTemplateRef } from 'vue';\n\n/** Renders a nested-frame glyph — an outer frame + inner pupil, or (with `isDot`) just the enlarged pupil; a scanner / viewfinder / QR-eye indicator. */\ndefineOptions({ name: 'FrameGlyph' });\n\n/* `isDot` defaults to `undefined`, not `false`: Vue casts an absent `Boolean`\n prop to `false`, and React's original left it genuinely optional. */\n/* `frameRx` / `pupilRoundness` stay declared-required — Vue still warns when one is\n missing — but the defaults keep `undefined` out of the `rx` attributes, which\n rendered as `rx=\"NaN\"` and made the browser reject the `<rect>`. `0` = square for\n both, which is each prop's own documented zero. */\nconst props = withDefaults(defineProps<FrameGlyphProps>(), {\n frameRx: 0,\n pupilRoundness: 0,\n isDot: undefined,\n size: 20,\n});\n\nconst el = useTemplateRef<SVGSVGElement>('el');\n\nconst pupilSize = computed(() => (props.isDot ? 12 : 8));\nconst pupilOffset = computed(() => (props.isDot ? 6 : 8));\n\ndefineExpose({ el });\n</script>\n\n<template>\n <svg ref=\"el\" viewBox=\"0 0 24 24\" :width=\"props.size\" :height=\"props.size\" aria-hidden=\"true\">\n <rect\n v-if=\"!props.isDot\"\n :x=\"2\"\n :y=\"2\"\n :width=\"20\"\n :height=\"20\"\n :rx=\"props.frameRx\"\n fill=\"none\"\n stroke=\"currentColor\"\n :stroke-width=\"2.5\"\n />\n <rect\n :x=\"pupilOffset\"\n :y=\"pupilOffset\"\n :width=\"pupilSize\"\n :height=\"pupilSize\"\n :rx=\"pupilSize * props.pupilRoundness\"\n fill=\"currentColor\"\n />\n </svg>\n</template>\n","// Three-cell preview geometry — cells at these x-positions, each this wide, on a 24-unit canvas.\nexport const CELL_POSITIONS = [3, 9.5, 16];\nexport const CELL_SIZE = 5;\nexport const BAR_CORNER_RX = 2.4;\n\n/**\n * Defines props for a fixed-geometry glyph.\n *\n * React shipped all four glyphs from one `ModuleGlyphs.tsx`. An SFC is one\n * component per file, so the four became `DotsGlyph.vue`, `VerticalBarsGlyph.vue`,\n * `HorizontalBarsGlyph.vue` and `CellsGlyph.vue`, with the shared geometry and\n * this prop type left here.\n */\nexport interface GlyphProps {\n /** The glyph's pixel size. */\n readonly size?: number;\n}\n","<script lang=\"ts\">\nimport type { GlyphProps } from './ModuleGlyphs';\n\nexport type { GlyphProps };\n</script>\n\n<script setup lang=\"ts\">\nimport { useTemplateRef } from 'vue';\nimport { CELL_POSITIONS, CELL_SIZE } from './ModuleGlyphs';\n\n/** Renders a three-dot glyph. */\ndefineOptions({ name: 'DotsGlyph' });\n\nconst props = withDefaults(defineProps<GlyphProps>(), { size: 20 });\n\nconst el = useTemplateRef<SVGSVGElement>('el');\n\ndefineExpose({ el });\n</script>\n\n<template>\n <svg ref=\"el\" viewBox=\"0 0 24 24\" :width=\"props.size\" :height=\"props.size\" aria-hidden=\"true\">\n <circle\n v-for=\"x in CELL_POSITIONS\"\n :key=\"x\"\n :cx=\"x + CELL_SIZE / 2\"\n :cy=\"12\"\n :r=\"2.5\"\n fill=\"currentColor\"\n />\n </svg>\n</template>\n","<script lang=\"ts\">\nimport type { GlyphProps } from './ModuleGlyphs';\n\nexport type { GlyphProps };\n</script>\n\n<script setup lang=\"ts\">\nimport { useTemplateRef } from 'vue';\nimport { BAR_CORNER_RX, CELL_POSITIONS, CELL_SIZE } from './ModuleGlyphs';\n\n/** Renders a three-vertical-bar glyph. */\ndefineOptions({ name: 'VerticalBarsGlyph' });\n\nconst props = withDefaults(defineProps<GlyphProps>(), { size: 20 });\n\nconst el = useTemplateRef<SVGSVGElement>('el');\n\ndefineExpose({ el });\n</script>\n\n<template>\n <svg ref=\"el\" viewBox=\"0 0 24 24\" :width=\"props.size\" :height=\"props.size\" aria-hidden=\"true\">\n <rect\n v-for=\"x in CELL_POSITIONS\"\n :key=\"x\"\n :x=\"x\"\n :y=\"4\"\n :width=\"CELL_SIZE\"\n :height=\"16\"\n :rx=\"BAR_CORNER_RX\"\n fill=\"currentColor\"\n />\n </svg>\n</template>\n","<script lang=\"ts\">\nimport type { GlyphProps } from './ModuleGlyphs';\n\nexport type { GlyphProps };\n</script>\n\n<script setup lang=\"ts\">\nimport { useTemplateRef } from 'vue';\nimport { BAR_CORNER_RX, CELL_POSITIONS, CELL_SIZE } from './ModuleGlyphs';\n\n/** Renders a three-horizontal-bar glyph. */\ndefineOptions({ name: 'HorizontalBarsGlyph' });\n\nconst props = withDefaults(defineProps<GlyphProps>(), { size: 20 });\n\nconst el = useTemplateRef<SVGSVGElement>('el');\n\ndefineExpose({ el });\n</script>\n\n<template>\n <svg ref=\"el\" viewBox=\"0 0 24 24\" :width=\"props.size\" :height=\"props.size\" aria-hidden=\"true\">\n <rect\n v-for=\"y in CELL_POSITIONS\"\n :key=\"y\"\n :x=\"4\"\n :y=\"y\"\n :width=\"16\"\n :height=\"CELL_SIZE\"\n :rx=\"BAR_CORNER_RX\"\n fill=\"currentColor\"\n />\n </svg>\n</template>\n","<script lang=\"ts\">\nimport type { GlyphProps } from './ModuleGlyphs';\n\n/** Defines props for the cells glyph. */\nexport interface CellsGlyphProps extends GlyphProps {\n /** The cells' corner radius. */\n readonly cornerRx: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useTemplateRef } from 'vue';\nimport { CELL_POSITIONS, CELL_SIZE } from './ModuleGlyphs';\n\n/** Renders a three-cell glyph with the given corner radius. */\ndefineOptions({ name: 'CellsGlyph' });\n\n/* `cornerRx` stays declared-required — Vue still warns when it is missing — but a\n default keeps `undefined` out of the `rx` attribute, which rendered as\n `rx=\"NaN\"` and made the browser reject the whole `<rect>`. `0` = square. */\nconst props = withDefaults(defineProps<CellsGlyphProps>(), { cornerRx: 0, size: 20 });\n\nconst el = useTemplateRef<SVGSVGElement>('el');\n\ndefineExpose({ el });\n</script>\n\n<template>\n <svg ref=\"el\" viewBox=\"0 0 24 24\" :width=\"props.size\" :height=\"props.size\" aria-hidden=\"true\">\n <rect\n v-for=\"x in CELL_POSITIONS\"\n :key=\"x\"\n :x=\"x\"\n :y=\"9.5\"\n :width=\"CELL_SIZE\"\n :height=\"CELL_SIZE\"\n :rx=\"props.cornerRx\"\n fill=\"currentColor\"\n />\n </svg>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\n\n// HeatmapCalendar is a date-only surface → its public API is keyed by\n// `Temporal.PlainDate` (calendar math, no time zone). Internally the lookup is\n// keyed by each date's ISO `.toString()` (\"YYYY-MM-DD\") so cell values resolve\n// in O(1); no native `Date`/raw-string leaks into the API.\n\n/** Defines the HeatmapCalendar color ramp tone. */\nexport const HeatmapCalendarTone = {\n /** Refers to the primary brand ramp. */\n Brand: 'brand',\n /** Refers to the positive / confirmation ramp. */\n Success: 'success',\n /** Refers to the caution ramp. */\n Warning: 'warning',\n /** Refers to the destructive / error ramp. */\n Danger: 'danger',\n /** Refers to the muted ramp. */\n Muted: 'muted',\n} as const;\n\nexport type HeatmapCalendarTone = (typeof HeatmapCalendarTone)[keyof typeof HeatmapCalendarTone];\n\nconst TONE_CLASSES: Record<HeatmapCalendarTone, ReadonlyArray<string>> = {\n brand: ['bg-muted/50', 'bg-primary/20', 'bg-primary/40', 'bg-primary/70', 'bg-primary'],\n success: ['bg-muted/50', 'bg-success/20', 'bg-success/40', 'bg-success/70', 'bg-success'],\n warning: ['bg-muted/50', 'bg-warning/20', 'bg-warning/40', 'bg-warning/70', 'bg-warning'],\n danger: [\n 'bg-muted/50',\n 'bg-destructive/20',\n 'bg-destructive/40',\n 'bg-destructive/70',\n 'bg-destructive',\n ],\n muted: [\n 'bg-muted/30',\n 'bg-muted',\n 'bg-muted-foreground/30',\n 'bg-muted-foreground/60',\n 'bg-muted-foreground',\n ],\n};\n\nconst DEFAULT_MONTHS: ReadonlyArray<string> = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\nconst DEFAULT_WEEKDAYS: ReadonlyArray<string> = [\n 'Sun',\n 'Mon',\n 'Tue',\n 'Wed',\n 'Thu',\n 'Fri',\n 'Sat',\n];\n\nexport interface HeatmapCalendarProps {\n /** The per-day counts, keyed by calendar date. */\n values: Map<Temporal.PlainDate, number>;\n /** The rendered calendar year. Defaults to the current ISO year. */\n year?: number;\n /** The first weekday of a column — `0` Sunday, `1` Monday. Default `0`. */\n weekStart?: 0 | 1;\n /** The cell edge length in px. Default `12`. */\n cellSize?: number;\n /** The gap between cells in px. Default `2`. */\n gap?: number;\n /** The intensity buckets (min 2, clamped). Buckets map proportionally onto the fixed 5-step tone palette — counts above 5 share palette classes between adjacent buckets. Default 5. */\n levels?: number;\n /** The color ramp tone. Default `brand`. */\n tone?: HeatmapCalendarTone;\n /**\n * Fires with the clicked day and its value.\n *\n * Kept a prop rather than an emit because its *presence* is load-bearing — it\n * decides whether an in-year cell renders as a `<button>` or an inert `<div>`,\n * and Vue strips declared emit listeners out of `useAttrs()`.\n */\n onCellClick?: (date: Temporal.PlainDate, value: number) => void;\n /** The 12 month labels, January first. */\n monthLabels?: ReadonlyArray<string>;\n /** The 7 weekday labels, Sunday first. */\n weekdayLabels?: ReadonlyArray<string>;\n /** The legend state. Default `true`. */\n hasLegend?: boolean;\n}\n\ninterface HeatmapCell {\n date: Temporal.PlainDate;\n key: string;\n inYear: boolean;\n value: number;\n}\n\ninterface MonthMarker {\n month: number;\n col: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { Temporal as TemporalRuntime } from 'temporal-polyfill';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Year-long heatmap. 53 columns (weeks) × 7 rows (weekdays). Per-cell color\n * intensity from `values[YYYY-MM-DD]`, bucketed into `levels` steps.\n */\ndefineOptions({ name: 'HeatmapCalendar', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<HeatmapCalendarProps>(), {\n /* `values` stays declared-required — Vue still warns when it is missing — but a\n default keeps an absent (or transiently-undefined) value out of the `for...of`\n below, which threw `props.values is not iterable` and took the whole page down. */\n values: () => new Map<Temporal.PlainDate, number>(),\n // `year` stays undefined so the current-year fallback is evaluated lazily —\n // `withDefaults` would freeze a module-eval-time value into the options object.\n year: undefined,\n weekStart: 0,\n cellSize: 12,\n gap: 2,\n levels: 5,\n tone: 'brand',\n onCellClick: undefined,\n monthLabels: () => DEFAULT_MONTHS,\n weekdayLabels: () => DEFAULT_WEEKDAYS,\n hasLegend: true,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst year = computed(() => props.year ?? TemporalRuntime.Now.plainDateISO().year);\n\n// Re-key the PlainDate-keyed API onto ISO strings (\"YYYY-MM-DD\") for O(1)\n// lookup during the grid walk (PlainDate is not usable as a Map identity key).\nconst valueMap = computed(() => {\n const map = new Map<string, number>();\n for (const [date, value] of props.values) map.set(date.toString(), value);\n return map;\n});\n\nconst grid = computed(() => {\n const lookup = valueMap.value;\n const start = TemporalRuntime.PlainDate.from({ year: year.value, month: 1, day: 1 });\n const end = TemporalRuntime.PlainDate.from({ year: year.value, month: 12, day: 31 });\n // Walk back to first weekStart day before/at year start.\n // Temporal `dayOfWeek`: 1 (Mon) … 7 (Sun); map to a Sunday=0 index.\n const sundayIdx = start.dayOfWeek % 7;\n const offset = (sundayIdx - props.weekStart + 7) % 7;\n let cur = start.subtract({ days: offset });\n\n const cols: Array<Array<HeatmapCell>> = [];\n let column: Array<HeatmapCell> = [];\n const months: Array<MonthMarker> = [];\n let lastSeenMonth = -1;\n let max = 0;\n\n while (TemporalRuntime.PlainDate.compare(cur, end) <= 0 || column.length > 0) {\n const inYear = cur.year === year.value;\n const key = cur.toString();\n const value = lookup.get(key) ?? 0;\n if (value > max) max = value;\n column.push({ date: cur, key, inYear, value });\n\n // Temporal `month` is 1-indexed; keep the 0-indexed marker the labels expect.\n if (inYear && cur.month - 1 !== lastSeenMonth) {\n lastSeenMonth = cur.month - 1;\n months.push({ month: cur.month - 1, col: cols.length });\n }\n\n if (column.length === 7) {\n cols.push(column);\n column = [];\n }\n cur = cur.add({ days: 1 });\n if (TemporalRuntime.PlainDate.compare(cur, end) > 0 && column.length === 0) break;\n }\n if (column.length > 0) cols.push(column);\n return { columns: cols as ReadonlyArray<ReadonlyArray<HeatmapCell>>, monthMarkers: months, maxValue: max };\n});\n\nconst toneSteps = computed(() => TONE_CLASSES[props.tone]);\n\n/* Clamp to ≥2 so the zero step plus at least one filled step always exist. */\nconst levelCount = computed(() => Math.max(2, Math.floor(props.levels)));\n\nfunction bucket(value: number): number {\n const max = grid.value.maxValue;\n if (value <= 0 || max === 0) return 0;\n const idx = Math.ceil((value / max) * (levelCount.value - 1));\n return Math.min(levelCount.value - 1, idx);\n}\n\n/* The palette is a fixed 5-step ramp; map any bucket count onto it proportionally (0 → empty step, top bucket → full tone, nonzero buckets never fall back to the empty step). */\nfunction stepClass(level: number): string {\n const steps = toneSteps.value;\n if (level === 0) return steps[0]!;\n const idx = Math.round((level / (levelCount.value - 1)) * (steps.length - 1));\n return steps[Math.max(1, idx)]!;\n}\n\nconst totalWidth = computed(() => grid.value.columns.length * (props.cellSize + props.gap));\nconst colHeight = computed(() => 7 * (props.cellSize + props.gap));\n\n// Order weekdays starting from weekStart.\nconst weekdayOrder = computed(() =>\n Array.from({ length: 7 }, (_unused, i) => props.weekdayLabels[(i + props.weekStart) % 7]!),\n);\n\n/**\n * Per-cell render model. `attrs` carries only the bindings the cell actually\n * needs, so a non-interactive cell never gets a click listener — the Vue\n * equivalent of React's `onClick={interactive ? … : undefined}`.\n */\nconst renderColumns = computed(() =>\n grid.value.columns.map((col, colIdx) => ({\n key: colIdx,\n cells: col.map((cell) => {\n const isInteractive = cell.inYear && props.onCellClick != null;\n return {\n key: cell.key,\n tag: isInteractive ? 'button' : 'div',\n attrs: {\n type: isInteractive ? 'button' : undefined,\n // Value lives in the label; aria-value* is reserved for\n // range widgets and is invalid on button/generic cells.\n role: isInteractive ? undefined : 'img',\n 'aria-label': `${cell.key}: ${cell.value}`,\n onClick: isInteractive\n ? (): void => props.onCellClick?.(cell.date, cell.value)\n : undefined,\n },\n class: cn(\n 'rounded-[2px] transition-colors',\n cell.inYear ? stepClass(bucket(cell.value)) : 'bg-transparent',\n isInteractive &&\n 'cursor-pointer hover:ring-1 hover:ring-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n ),\n };\n }),\n })),\n);\n\n/** Vue does not append `px` to a numeric `:style` value the way React does — every length is spelled out. */\nconst cellStyle = computed(() => ({\n width: `${props.cellSize}px`,\n height: `${props.cellSize}px`,\n}));\n\nconst monthRowStyle = computed(() => ({\n height: `${props.cellSize}px`,\n width: `${totalWidth.value}px`,\n}));\n\nconst gapStyle = computed(() => ({ gap: `${props.gap}px` }));\n\nconst weekdayColumnStyle = computed(() => ({\n width: '28px',\n gap: `${props.gap}px`,\n height: `${colHeight.value}px`,\n}));\n\nconst weekdayLabelStyle = computed(() => ({\n height: `${props.cellSize}px`,\n lineHeight: `${props.cellSize}px`,\n}));\n\nfunction monthMarkerStyle(marker: MonthMarker): Record<string, string> {\n return { left: `${marker.col * (props.cellSize + props.gap)}px` };\n}\n\nconst classes = computed(() => cn('inline-block', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <!-- Month labels -->\n <div class=\"relative ml-8\" :style=\"monthRowStyle\">\n <span\n v-for=\"marker in grid.monthMarkers\"\n :key=\"marker.month\"\n class=\"absolute text-[10px] uppercase text-muted-foreground\"\n :style=\"monthMarkerStyle(marker)\"\n >{{ monthLabels[marker.month] }}</span\n >\n </div>\n <div class=\"flex\" :style=\"gapStyle\">\n <!-- Weekday labels — show every other to avoid clutter. -->\n <div\n class=\"flex flex-col text-[10px] uppercase text-muted-foreground\"\n :style=\"weekdayColumnStyle\"\n >\n <span\n v-for=\"(weekday, index) in weekdayOrder\"\n :key=\"index\"\n :class=\"index % 2 === 0 ? 'opacity-0' : ''\"\n :style=\"weekdayLabelStyle\"\n >{{ weekday }}</span\n >\n </div>\n <!-- Grid -->\n <div class=\"flex\" :style=\"gapStyle\">\n <div\n v-for=\"column in renderColumns\"\n :key=\"column.key\"\n class=\"flex flex-col\"\n :style=\"gapStyle\"\n >\n <component\n :is=\"cell.tag\"\n v-for=\"cell in column.cells\"\n :key=\"cell.key\"\n v-bind=\"cell.attrs\"\n :style=\"cellStyle\"\n :class=\"cell.class\"\n />\n </div>\n </div>\n </div>\n <div\n v-if=\"hasLegend\"\n class=\"mt-2 flex items-center justify-end gap-1.5 text-[10px] text-muted-foreground\"\n >\n <span>Less</span>\n <span\n v-for=\"(stepCls, index) in toneSteps\"\n :key=\"index\"\n aria-hidden=\"true\"\n :style=\"cellStyle\"\n :class=\"cn('rounded-[2px]', stepCls)\"\n />\n <span>More</span>\n </div>\n </div>\n</template>\n","/**\n * Shared vocabulary for the DataGrid folder.\n *\n * React kept these next to the component in `DataGrid.tsx`, where the private\n * `CellEditor` could close over them. Here `CellEditor` is its own SFC, so the\n * enums live in a sibling module both files import — the same split `table/`\n * uses for `TableContext.ts`. `DataGridMove` stays out of the folder barrel,\n * exactly as it was module-private in React.\n */\n\n/** Defines the editable data type of a DataGrid cell. */\nexport const DataGridCellType = {\n /** Refers to a free-text cell. */\n Text: 'text',\n /** Refers to a numeric cell. */\n Number: 'number',\n /** Refers to a single-select cell. */\n Select: 'select',\n /** Refers to a boolean (checkbox) cell. */\n Boolean: 'boolean',\n} as const;\n\nexport type DataGridCellType = (typeof DataGridCellType)[keyof typeof DataGridCellType];\n\n/** Defines the horizontal text alignment of a DataGrid column. */\nexport const DataGridColumnAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to right alignment. */\n Right: 'right',\n /** Refers to centered alignment. */\n Center: 'center',\n} as const;\n\nexport type DataGridColumnAlign =\n (typeof DataGridColumnAlign)[keyof typeof DataGridColumnAlign];\n\n/** Defines the cursor advance after a DataGrid cell edit commits. */\nexport const DataGridMove = {\n /** Refers to advancing to the cell on the right. */\n Right: 'right',\n /** Refers to advancing to the cell below. */\n Down: 'down',\n} as const;\n\nexport type DataGridMove = (typeof DataGridMove)[keyof typeof DataGridMove];\n\nexport interface DataGridColumn<T> {\n key: string;\n /**\n * The header label. React took a `ReactNode`; a column is an array entry and\n * cannot become its own slot, so the scalar stays here and the `header`\n * scoped slot is the rich override.\n */\n header: string | number;\n /** Returns the cell's underlying value. */\n accessor: (row: T) => unknown;\n\n /**\n * Optional custom cell renderer for read mode. Returns a value rendered as\n * text; for rich markup use the `cell` scoped slot, which receives\n * `{ row, column, rowIndex, colIndex }`.\n */\n cell?: (row: T) => unknown;\n type?: DataGridCellType;\n /** The choices for a `select` cell. `label` is rendered as `<option>` text. */\n options?: Array<{ value: string | number; label: string | number }>;\n isEditable?: boolean;\n width?: string;\n align?: DataGridColumnAlign;\n}\n","<script lang=\"ts\">\nimport { DataGridCellType, type DataGridMove } from './DataGridTypes';\n\nexport interface CellEditorProps {\n /** The cell's editable data type — decides which editor renders. Default `text`. */\n type?: DataGridCellType;\n /** The choices for a `select` cell. */\n options?: Array<{ value: string | number; label: string | number }>;\n /** The draft text under edit. */\n value: string;\n}\n\nconst BASE_CLASS =\n 'h-7 w-full rounded-sm border border-input bg-background px-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring';\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, useTemplateRef } from 'vue';\n\n/**\n * The active cell's editor. Private to the folder — React kept it in the same\n * file and never exported it, and the folder barrel still does not.\n *\n * React drove focus from the parent through a forwarded ref; here the editor\n * focuses itself on mount, which removes the ref plumbing and is immune to the\n * mount/unmount ordering of two cells swapping in one patch.\n */\ndefineOptions({ name: 'CellEditor' });\n\nconst props = withDefaults(defineProps<CellEditorProps>(), {\n type: undefined,\n options: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires with the editor's current text on every keystroke or selection. */\n 'update:value': [value: string];\n /** Fires when the edit commits, with the cursor advance and the fresh raw text. */\n commit: [move?: DataGridMove, rawValue?: string];\n /** Fires when the edit is abandoned. */\n cancel: [];\n}>();\n\nconst el = useTemplateRef<HTMLInputElement | HTMLSelectElement>('el');\n\nonMounted(() => {\n const node = el.value;\n if (!node) return;\n node.focus();\n if ('select' in node && typeof node.select === 'function') node.select();\n});\n\nconst isSelect = computed(() => props.type === DataGridCellType.Select && !!props.options);\nconst isBoolean = computed(() => props.type === DataGridCellType.Boolean);\nconst inputType = computed(() => (props.type === DataGridCellType.Number ? 'number' : 'text'));\n\n/** A `<select>` change is both the edit and its commit — React committed with the fresh\n value because the parent's draft state was still stale in the same event. */\nfunction onSelectChange(event: Event): void {\n const next = (event.target as HTMLSelectElement).value;\n emit('update:value', next);\n emit('commit', 'down', next);\n}\n\nfunction onInput(event: Event): void {\n emit('update:value', (event.target as HTMLInputElement).value);\n}\n\nfunction onBlur(): void {\n emit('commit');\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n event.preventDefault();\n emit('cancel');\n }\n}\n</script>\n\n<template>\n <select\n v-if=\"isSelect\"\n ref=\"el\"\n :value=\"value\"\n :class=\"BASE_CLASS\"\n @change=\"onSelectChange\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n >\n <option v-for=\"option in options\" :key=\"String(option.value)\" :value=\"String(option.value)\">\n {{ String(option.label) }}\n </option>\n </select>\n <select\n v-else-if=\"isBoolean\"\n ref=\"el\"\n :value=\"value\"\n :class=\"BASE_CLASS\"\n @change=\"onSelectChange\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n >\n <option value=\"true\">true</option>\n <option value=\"false\">false</option>\n </select>\n <input\n v-else\n ref=\"el\"\n :type=\"inputType\"\n :value=\"value\"\n :class=\"BASE_CLASS\"\n @input=\"onInput\"\n @blur=\"onBlur\"\n @keydown=\"onKeydown\"\n />\n</template>\n","<script lang=\"ts\">\nimport {\n DataGridCellType,\n DataGridColumnAlign,\n DataGridMove,\n type DataGridColumn,\n} from './DataGridTypes';\n\nexport interface DataGridProps<T> {\n columns: ReadonlyArray<DataGridColumn<T>>;\n rows: ReadonlyArray<T>;\n /**\n * Returns the stable key of a row.\n *\n * Kept a prop rather than an emit: React made it required and it is called as\n * a plain function on every render, which is not what an emit models.\n */\n rowKey: (row: T) => string;\n /** The dense row height. Default `false`. */\n isDense?: boolean;\n}\n\ninterface CellPos {\n row: number;\n col: number;\n}\n\nfunction castValue(raw: string, type: DataGridCellType): unknown {\n if (type === DataGridCellType.Number) {\n const parsed = Number(raw);\n return Number.isFinite(parsed) ? parsed : raw;\n }\n if (type === DataGridCellType.Boolean) return raw === 'true';\n return raw;\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { computed, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useId } from '../../../foundation/hooks';\nimport CellEditor from './CellEditor.vue';\n\n/**\n * First-generation editable DataGrid. Keyboard nav between cells; click /\n * Enter / F2 enter edit; Escape reverts. Range select, fill, paste TSV are\n * deferred — log them in a follow-up batch.\n */\ndefineOptions({ name: 'DataGrid', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<DataGridProps<T>>(), {\n /* These three stay declared-required — Vue still warns when one is missing — but\n the defaults keep an absent (or transiently-undefined) value from reaching the\n `.length` reads below, which took the whole page down. An empty grid renders\n its own header-only shell instead. */\n columns: () => [],\n rows: () => [],\n rowKey: (row: unknown) => String(row),\n // Explicit `undefined` so an absent Boolean prop is not cast to `false`.\n isDense: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires per committed cell with the row, the column key, and the cast value. */\n 'row-change': [row: T, colKey: string, value: unknown];\n}>();\n\ndefineSlots<{\n /** Overrides a column header. Falls back to the column's own `header`. */\n header(props: { column: DataGridColumn<T> }): unknown;\n /**\n * Overrides a body cell in read mode. Falls back to the column's `cell`\n * renderer, then to its `accessor`.\n */\n cell(props: {\n row: T;\n column: DataGridColumn<T>;\n rowIndex: number;\n colIndex: number;\n }): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst tableEl = useTemplateRef<HTMLTableElement>('tableEl');\n\nconst active = ref<CellPos>({ row: 0, col: 0 });\nconst editing = ref(false);\nconst draft = ref('');\n\nconst gridId = useId();\nfunction cellId(row: number, col: number): string {\n return `${gridId}-cell-${row}-${col}`;\n}\n\nconst colCount = computed(() => props.columns.length);\nconst rowCount = computed(() => props.rows.length);\n\n// The editor just unmounted — without this, focus drops to <body> and the\n// grid's keyboard navigation goes dead. React did it from the same effect that\n// focused the editor; the editor now focuses itself, so only this half is left.\nwatch(\n editing,\n (isEditing, wasEditing) => {\n if (!isEditing && wasEditing) tableEl.value?.focus();\n },\n { flush: 'post' },\n);\n\nfunction beginEdit(): void {\n const column = props.columns[active.value.col];\n const row = props.rows[active.value.row];\n if (!column || row === undefined) return;\n if (column.isEditable === false) return;\n const raw = column.accessor(row);\n draft.value = raw == null ? '' : String(raw);\n editing.value = true;\n}\n\nfunction commitEdit(move?: DataGridMove, rawValue?: string): void {\n const column = props.columns[active.value.col];\n const row = props.rows[active.value.row];\n if (!column || row === undefined) {\n editing.value = false;\n return;\n }\n // rawValue lets editors commit synchronously with the fresh value — the draft\n // is still the previous text when a select's change and its commit fire in the\n // same event (select/boolean editors).\n const value = castValue(rawValue ?? draft.value, column.type ?? DataGridCellType.Text);\n emit('row-change', row, column.key, value);\n editing.value = false;\n if (move === DataGridMove.Right) {\n active.value = {\n row: active.value.row,\n col: Math.min(colCount.value - 1, active.value.col + 1),\n };\n }\n if (move === DataGridMove.Down) {\n active.value = {\n row: Math.min(rowCount.value - 1, active.value.row + 1),\n col: active.value.col,\n };\n }\n}\n\nfunction cancelEdit(): void {\n editing.value = false;\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (editing.value) {\n if (event.key === 'Enter') {\n event.preventDefault();\n commitEdit(DataGridMove.Down);\n } else if (event.key === 'Tab') {\n event.preventDefault();\n commitEdit(DataGridMove.Right);\n } else if (event.key === 'Escape') {\n event.preventDefault();\n cancelEdit();\n }\n return;\n }\n switch (event.key) {\n case 'ArrowRight':\n event.preventDefault();\n active.value = {\n row: active.value.row,\n col: Math.min(colCount.value - 1, active.value.col + 1),\n };\n break;\n case 'ArrowLeft':\n event.preventDefault();\n active.value = { row: active.value.row, col: Math.max(0, active.value.col - 1) };\n break;\n case 'ArrowDown':\n event.preventDefault();\n active.value = {\n row: Math.min(rowCount.value - 1, active.value.row + 1),\n col: active.value.col,\n };\n break;\n case 'ArrowUp':\n event.preventDefault();\n active.value = { row: Math.max(0, active.value.row - 1), col: active.value.col };\n break;\n case 'Home':\n event.preventDefault();\n active.value = { row: active.value.row, col: 0 };\n break;\n case 'End':\n event.preventDefault();\n active.value = { row: active.value.row, col: colCount.value - 1 };\n break;\n case 'Enter':\n case 'F2':\n event.preventDefault();\n beginEdit();\n break;\n }\n}\n\nfunction onCellClick(rowIndex: number, colIndex: number): void {\n const column = props.columns[colIndex];\n if (!column) return;\n const isEditingThisCell =\n editing.value && active.value.row === rowIndex && active.value.col === colIndex;\n active.value = { row: rowIndex, col: colIndex };\n // React deferred this to a `requestAnimationFrame` because its `active` state\n // was still stale inside the click closure. A Vue ref updates on the line\n // above, so the edit starts here and the frame hop is gone.\n if (column.isEditable !== false && !isEditingThisCell) beginEdit();\n}\n\nfunction isActiveCell(rowIndex: number, colIndex: number): boolean {\n return active.value.row === rowIndex && active.value.col === colIndex;\n}\n\nconst cellPad = computed(() => (props.isDense ? 'px-2 py-1' : 'px-3 py-2'));\n\nconst headerClasses = computed(() =>\n cn('border-b border-border font-medium text-muted-foreground', cellPad.value),\n);\n\n/** `width` is consumer-supplied CSS, so no unit is implied — Vue would not add one. */\nfunction headerStyle(column: DataGridColumn<T>): Record<string, string | undefined> {\n return { width: column.width, textAlign: column.align ?? DataGridColumnAlign.Left };\n}\n\nfunction cellStyle(column: DataGridColumn<T>): Record<string, string> {\n return { textAlign: column.align ?? DataGridColumnAlign.Left };\n}\n\nfunction cellClasses(column: DataGridColumn<T>, rowIndex: number, colIndex: number): string {\n return cn(\n 'relative cursor-cell whitespace-nowrap',\n cellPad.value,\n isActiveCell(rowIndex, colIndex) && 'bg-primary-soft/40 ring-2 ring-inset ring-primary',\n column.isEditable === false && 'cursor-default',\n );\n}\n\n/** The read-mode default under the `cell` slot, for columns without their own renderer. */\nfunction displayValue(column: DataGridColumn<T>, row: T): string {\n const value = column.accessor(row);\n if (column.type === DataGridCellType.Boolean) return value ? '✓' : '·';\n return String(value ?? '');\n}\n\nconst classes = computed(() =>\n cn(\n 'overflow-auto rounded-md border border-border bg-card text-sm',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Scroll container only — the grid role lives on the <table> below.\n A `grid` may own nothing but rows/rowgroups, so putting `role=\"grid\"`\n on a wrapper whose child is a (role `table`) <table> is an illegal\n accessibility tree (axe: aria-required-children). -->\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <table\n ref=\"tableEl\"\n role=\"grid\"\n :aria-rowcount=\"rowCount + 1\"\n :aria-colcount=\"colCount\"\n :tabindex=\"0\"\n :aria-activedescendant=\"rowCount > 0 ? cellId(active.row, active.col) : undefined\"\n class=\"w-full border-collapse focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring\"\n @keydown=\"onKeydown\"\n >\n <thead role=\"rowgroup\">\n <tr role=\"row\" :aria-rowindex=\"1\" class=\"bg-muted/40\">\n <th\n v-for=\"(column, colIndex) in columns\"\n :key=\"column.key\"\n role=\"columnheader\"\n :aria-colindex=\"colIndex + 1\"\n scope=\"col\"\n :style=\"headerStyle(column)\"\n :class=\"headerClasses\"\n >\n <slot name=\"header\" :column=\"column\">{{ column.header }}</slot>\n </th>\n </tr>\n </thead>\n <tbody role=\"rowgroup\">\n <tr\n v-for=\"(row, rowIndex) in rows\"\n :key=\"rowKey(row)\"\n role=\"row\"\n :aria-rowindex=\"rowIndex + 2\"\n class=\"border-b border-border last:border-b-0\"\n >\n <td\n v-for=\"(column, colIndex) in columns\"\n :id=\"cellId(rowIndex, colIndex)\"\n :key=\"column.key\"\n role=\"gridcell\"\n :aria-colindex=\"colIndex + 1\"\n :aria-readonly=\"column.isEditable === false || undefined\"\n :aria-selected=\"isActiveCell(rowIndex, colIndex) || undefined\"\n :tabindex=\"isActiveCell(rowIndex, colIndex) ? 0 : -1\"\n :style=\"cellStyle(column)\"\n :class=\"cellClasses(column, rowIndex, colIndex)\"\n @click=\"onCellClick(rowIndex, colIndex)\"\n >\n <CellEditor\n v-if=\"editing && isActiveCell(rowIndex, colIndex)\"\n v-model:value=\"draft\"\n :type=\"column.type\"\n :options=\"column.options\"\n @commit=\"commitEdit\"\n @cancel=\"cancelEdit\"\n />\n <slot\n v-else\n name=\"cell\"\n :row=\"row\"\n :column=\"column\"\n :row-index=\"rowIndex\"\n :col-index=\"colIndex\"\n >\n <template v-if=\"column.cell\">{{ column.cell(row) }}</template>\n <span v-else class=\"tabular-nums\">{{ displayValue(column, row) }}</span>\n </slot>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface NodeEditorNode {\n id: string;\n x: number;\n y: number;\n data?: Record<string, unknown>;\n /**\n * The node caption. React took a `ReactNode`; a node is an array entry and\n * cannot become its own slot, so the scalar stays here and the `node` scoped\n * slot (React's `renderNode`) is the rich override.\n */\n label?: string | number;\n}\n\nexport interface NodeEditorEdge {\n id: string;\n source: string;\n target: string;\n /** The edge caption, drawn as SVG `<text>` at the curve midpoint. */\n label?: string | number;\n}\n\nexport interface NodeEditorProps {\n nodes: ReadonlyArray<NodeEditorNode>;\n edges?: ReadonlyArray<NodeEditorEdge>;\n /** The node box width in px. Default `160`. */\n nodeWidth?: number;\n /** The node box height in px. Default `60`. */\n nodeHeight?: number;\n /** The lower zoom bound. Default `0.25`. */\n minZoom?: number;\n /** The upper zoom bound. Default `2`. */\n maxZoom?: number;\n}\n\ninterface Viewport {\n x: number;\n y: number;\n zoom: number;\n}\n\ntype DragState =\n | { kind: 'pan'; startX: number; startY: number; viewportX: number; viewportY: number }\n | {\n kind: 'node';\n nodeId: string;\n startX: number;\n startY: number;\n nodeStartX: number;\n nodeStartY: number;\n }\n | null;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, useTemplateRef } from 'vue';\nimport { Maximize, Minus, Plus } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\n\n/**\n * First-generation node graph editor. Drag nodes to reposition; pan the\n * viewport on background drag; wheel-zoom. Drag-to-connect ports + minimap\n * + auto-layout deferred.\n */\ndefineOptions({ name: 'NodeEditor', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<NodeEditorProps>(), {\n edges: () => [],\n nodeWidth: 160,\n nodeHeight: 60,\n minZoom: 0.25,\n maxZoom: 2,\n});\n\nconst emit = defineEmits<{\n /** Fires with the full node list after a drag moves one of them. */\n 'nodes-change': [nodes: ReadonlyArray<NodeEditorNode>];\n /** Fires with the clicked edge. */\n 'edge-click': [edge: NodeEditorEdge];\n}>();\n\ndefineSlots<{\n /** Replaces a node's box. Falls back to the default card with its `label` / `id`. */\n node(props: { node: NodeEditorNode }): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst viewport = ref<Viewport>({ x: 0, y: 0, zoom: 1 });\n\n/** Plain variable, not a ref — React held this in `useRef`; nothing renders off it. */\nlet dragState: DragState = null;\n\nconst nodeIndex = computed(() => new Map(props.nodes.map((node) => [node.id, node])));\n\nfunction onContainerPointerDown(event: PointerEvent): void {\n if (event.button !== 0) return;\n if ((event.target as HTMLElement).closest('[data-node]')) return;\n dragState = {\n kind: 'pan',\n startX: event.clientX,\n startY: event.clientY,\n viewportX: viewport.value.x,\n viewportY: viewport.value.y,\n };\n (event.currentTarget as HTMLElement).setPointerCapture(event.pointerId);\n}\n\nfunction onContainerPointerMove(event: PointerEvent): void {\n const drag = dragState;\n if (!drag) return;\n if (drag.kind === 'pan') {\n const dx = event.clientX - drag.startX;\n const dy = event.clientY - drag.startY;\n viewport.value = { ...viewport.value, x: drag.viewportX + dx, y: drag.viewportY + dy };\n } else {\n const dx = (event.clientX - drag.startX) / viewport.value.zoom;\n const dy = (event.clientY - drag.startY) / viewport.value.zoom;\n const next = props.nodes.map((node) =>\n node.id === drag.nodeId\n ? { ...node, x: drag.nodeStartX + dx, y: drag.nodeStartY + dy }\n : node,\n );\n emit('nodes-change', next);\n }\n}\n\nfunction onContainerPointerUp(event: PointerEvent): void {\n dragState = null;\n (event.currentTarget as HTMLElement).releasePointerCapture?.(event.pointerId);\n}\n\n// Wheel-zoom must be a non-passive native listener — a template `@wheel` binding\n// is attached passively, so `preventDefault` inside it cannot stop the page from\n// scrolling. Registered once and reading `minZoom` / `maxZoom` live, which is\n// what React's `[minZoom, maxZoom]` dependency array re-registered for.\nfunction onWheel(event: WheelEvent): void {\n const node = el.value;\n if (!node) return;\n event.preventDefault();\n const rect = node.getBoundingClientRect();\n // Zoom centered on the cursor.\n const cx = event.clientX - rect.left;\n const cy = event.clientY - rect.top;\n const factor = event.deltaY < 0 ? 1.1 : 1 / 1.1;\n const current = viewport.value;\n const nextZoom = Math.max(props.minZoom, Math.min(props.maxZoom, current.zoom * factor));\n const ratio = nextZoom / current.zoom;\n viewport.value = {\n zoom: nextZoom,\n x: cx - (cx - current.x) * ratio,\n y: cy - (cy - current.y) * ratio,\n };\n}\n\nonMounted(() => {\n el.value?.addEventListener('wheel', onWheel, { passive: false });\n});\n\nonBeforeUnmount(() => {\n el.value?.removeEventListener('wheel', onWheel);\n});\n\nfunction beginNodeDrag(event: PointerEvent, node: NodeEditorNode): void {\n event.stopPropagation();\n dragState = {\n kind: 'node',\n nodeId: node.id,\n startX: event.clientX,\n startY: event.clientY,\n nodeStartX: node.x,\n nodeStartY: node.y,\n };\n (event.currentTarget as HTMLElement).setPointerCapture(event.pointerId);\n}\n\nfunction fitView(): void {\n if (props.nodes.length === 0) {\n viewport.value = { x: 0, y: 0, zoom: 1 };\n return;\n }\n const minX = Math.min(...props.nodes.map((node) => node.x));\n const minY = Math.min(...props.nodes.map((node) => node.y));\n const maxX = Math.max(...props.nodes.map((node) => node.x + props.nodeWidth));\n const maxY = Math.max(...props.nodes.map((node) => node.y + props.nodeHeight));\n const width = maxX - minX;\n const height = maxY - minY;\n const rect = el.value?.getBoundingClientRect();\n if (!rect) return;\n const padding = 40;\n const zoomX = (rect.width - padding * 2) / width;\n const zoomY = (rect.height - padding * 2) / height;\n const zoom = Math.max(props.minZoom, Math.min(props.maxZoom, Math.min(zoomX, zoomY, 1)));\n viewport.value = {\n zoom,\n x: padding - minX * zoom + (rect.width - padding * 2 - width * zoom) / 2,\n y: padding - minY * zoom + (rect.height - padding * 2 - height * zoom) / 2,\n };\n}\n\nfunction zoomIn(): void {\n viewport.value = {\n ...viewport.value,\n zoom: Math.min(props.maxZoom, viewport.value.zoom * 1.2),\n };\n}\n\nfunction zoomOut(): void {\n viewport.value = {\n ...viewport.value,\n zoom: Math.max(props.minZoom, viewport.value.zoom / 1.2),\n };\n}\n\n/** Edges resolved to a cubic path; endpoints that name a missing node are dropped. */\nconst renderEdges = computed(() =>\n props.edges.flatMap((edge) => {\n const a = nodeIndex.value.get(edge.source);\n const b = nodeIndex.value.get(edge.target);\n if (!a || !b) return [];\n const x1 = a.x + props.nodeWidth;\n const y1 = a.y + props.nodeHeight / 2;\n const x2 = b.x;\n const y2 = b.y + props.nodeHeight / 2;\n const mid = (x1 + x2) / 2;\n return [\n {\n edge,\n path: `M${x1},${y1} C${mid},${y1} ${mid},${y2} ${x2},${y2}`,\n labelX: mid,\n labelY: (y1 + y2) / 2 - 6,\n },\n ];\n }),\n);\n\nconst strokeWidth = computed(() => 2 / viewport.value.zoom);\n\n/** Vue does not append `px` to a numeric `:style` value the way React does — every length is spelled out. */\nconst edgeLabelStyle = computed(() => ({ fontSize: `${10 / viewport.value.zoom}px` }));\n\nconst transformStyle = computed(() => ({\n transform: `translate(${viewport.value.x}px, ${viewport.value.y}px) scale(${viewport.value.zoom})`,\n}));\n\nfunction nodeStyle(node: NodeEditorNode): Record<string, string> {\n return {\n position: 'absolute',\n left: `${node.x}px`,\n top: `${node.y}px`,\n width: `${props.nodeWidth}px`,\n height: `${props.nodeHeight}px`,\n };\n}\n\nconst SVG_STYLE = { overflow: 'visible', width: '100%', height: '100%' } as const;\n\nconst classes = computed(() =>\n cn(\n 'relative h-96 w-full overflow-hidden rounded-md border border-border bg-muted/30 select-none',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n v-bind=\"rest\"\n :class=\"classes\"\n @pointerdown=\"onContainerPointerDown\"\n @pointermove=\"onContainerPointerMove\"\n @pointerup=\"onContainerPointerUp\"\n @pointercancel=\"onContainerPointerUp\"\n >\n <!-- Pan/zoom transform -->\n <div class=\"absolute inset-0 origin-top-left\" :style=\"transformStyle\">\n <svg class=\"absolute pointer-events-none\" :style=\"SVG_STYLE\">\n <g\n v-for=\"entry in renderEdges\"\n :key=\"entry.edge.id\"\n class=\"pointer-events-auto cursor-pointer\"\n @click=\"emit('edge-click', entry.edge)\"\n >\n <path\n :d=\"entry.path\"\n fill=\"none\"\n stroke=\"currentColor\"\n :stroke-width=\"strokeWidth\"\n class=\"text-border-strong hover:text-primary\"\n />\n <text\n v-if=\"entry.edge.label\"\n :x=\"entry.labelX\"\n :y=\"entry.labelY\"\n text-anchor=\"middle\"\n class=\"fill-muted-foreground text-[10px]\"\n :style=\"edgeLabelStyle\"\n >\n {{ entry.edge.label }}\n </text>\n </g>\n </svg>\n <div\n v-for=\"node in nodes\"\n :key=\"node.id\"\n data-node=\"true\"\n role=\"group\"\n :aria-label=\"typeof node.label === 'string' ? node.label : node.id\"\n :style=\"nodeStyle(node)\"\n class=\"cursor-grab active:cursor-grabbing\"\n @pointerdown=\"beginNodeDrag($event, node)\"\n >\n <slot name=\"node\" :node=\"node\">\n <div\n class=\"flex h-full w-full items-center justify-center rounded-md border border-border bg-card px-3 text-sm font-medium shadow-sm\"\n >\n {{ node.label ?? node.id }}\n </div>\n </slot>\n </div>\n </div>\n <!-- Controls -->\n <div\n class=\"absolute bottom-3 right-3 flex flex-col gap-1 rounded-md border border-border bg-card p-1 shadow-sm\"\n >\n <button\n type=\"button\"\n aria-label=\"Zoom in\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground\"\n @click=\"zoomIn\"\n >\n <Icon :icon=\"Plus\" :size=\"14\" />\n </button>\n <button\n type=\"button\"\n aria-label=\"Zoom out\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground\"\n @click=\"zoomOut\"\n >\n <Icon :icon=\"Minus\" :size=\"14\" />\n </button>\n <button\n type=\"button\"\n aria-label=\"Fit view\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground\"\n @click=\"fitView\"\n >\n <Icon :icon=\"Maximize\" :size=\"12\" />\n </button>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the AudioWaveform color tone. */\nexport const AudioWaveformTone = {\n /** Refers to the primary brand color. */\n Brand: 'brand',\n /** Refers to the positive / confirmation color. */\n Success: 'success',\n /** Refers to the caution color. */\n Warning: 'warning',\n /** Refers to the destructive / error color. */\n Danger: 'danger',\n /** Refers to the muted color. */\n Muted: 'muted',\n /** Refers to the inherited `currentColor`. */\n Current: 'current',\n} as const;\n\nexport type AudioWaveformTone = (typeof AudioWaveformTone)[keyof typeof AudioWaveformTone];\n\nconst TONE_CLASS: Record<AudioWaveformTone, string> = {\n brand: 'text-primary',\n success: 'text-success',\n warning: 'text-warning',\n danger: 'text-destructive',\n muted: 'text-muted-foreground',\n current: '',\n};\n\nexport interface AudioWaveformProps {\n /** The per-bin amplitudes in 0..1. */\n peaks: ReadonlyArray<number>;\n /** The played fraction in 0..1. Default `0`. */\n progress?: number;\n /** The SVG width in px. Default `320`. */\n width?: number;\n /** The SVG height in px. Default `48`. */\n height?: number;\n /** The width of a single bar in px. Default `2`. */\n barWidth?: number;\n /** The gap between bars in px. Default `1`. */\n gap?: number;\n /** The color tone. Default `brand`. */\n tone?: AudioWaveformTone;\n /**\n * Fires with the seeked progress in 0..1.\n *\n * Kept a prop rather than an emit because its *presence* is load-bearing —\n * it decides `role=\"slider\"` vs `role=\"img\"` when `isInteractive` is omitted,\n * and Vue strips declared emit listeners out of `useAttrs()`, leaving no way\n * to observe them.\n */\n onSeek?: (progress: number) => void;\n /** The interactive state. Defaults to whether `onSeek` was supplied. */\n isInteractive?: boolean;\n}\n\n/** Resample `peaks` to exactly `n` bars by max-pooling consecutive runs. */\nfunction sampleTo(peaks: ReadonlyArray<number>, n: number): ReadonlyArray<number> {\n if (peaks.length === 0) return new Array<number>(n).fill(0);\n if (peaks.length === n) return peaks;\n const out: Array<number> = new Array<number>(n);\n const ratio = peaks.length / n;\n for (let i = 0; i < n; i++) {\n const start = Math.floor(i * ratio);\n const end = Math.max(start + 1, Math.floor((i + 1) * ratio));\n let max = 0;\n for (let j = start; j < end && j < peaks.length; j++) {\n const v = Math.abs(peaks[j]!);\n if (v > max) max = v;\n }\n out[i] = max;\n }\n return out;\n}\n\ninterface Bar {\n index: number;\n x: number;\n y: number;\n height: number;\n isPlayed: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * SVG bar-style audio waveform. `peaks` are per-bin amplitudes in 0..1.\n * Click-to-seek + arrow-key seek when `onSeek` is provided.\n */\ndefineOptions({ name: 'AudioWaveform', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<AudioWaveformProps>(), {\n /* `peaks` stays declared-required — Vue still warns when it is missing — but a\n default keeps an absent (or transiently-undefined) value from reaching\n `sampleTo`, which read `.length` off it and took the whole page down. */\n peaks: () => [],\n progress: 0,\n width: 320,\n height: 48,\n barWidth: 2,\n gap: 1,\n tone: 'brand',\n onSeek: undefined,\n // `undefined` is meaningful — it falls back to `onSeek != null`. Without an\n // explicit default Vue would cast the absent Boolean prop to `false`.\n isInteractive: undefined,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<SVGSVGElement>('el');\n\nconst stepX = computed(() => props.barWidth + props.gap);\nconst barCount = computed(() => Math.max(1, Math.floor(props.width / stepX.value)));\nconst playedBars = computed(() => Math.round(props.progress * barCount.value));\nconst resolvedInteractive = computed(() => props.isInteractive ?? props.onSeek != null);\n\nconst bars = computed<ReadonlyArray<Bar>>(() =>\n sampleTo(props.peaks, barCount.value).map((amp, index) => {\n const height = Math.max(1, amp * props.height);\n return {\n index,\n x: index * stepX.value,\n y: (props.height - height) / 2,\n height,\n isPlayed: index < playedBars.value,\n };\n }),\n);\n\nfunction seekFromX(clientX: number, rect: DOMRect): void {\n const x = Math.max(0, Math.min(rect.width, clientX - rect.left));\n props.onSeek?.(x / rect.width);\n}\n\nfunction onClick(event: MouseEvent): void {\n if (!resolvedInteractive.value) return;\n const rect = el.value?.getBoundingClientRect();\n if (rect) seekFromX(event.clientX, rect);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n const seek = props.onSeek;\n if (!seek) return;\n if (event.key === 'ArrowRight') {\n event.preventDefault();\n seek(Math.min(1, props.progress + 0.05));\n } else if (event.key === 'ArrowLeft') {\n event.preventDefault();\n seek(Math.max(0, props.progress - 0.05));\n } else if (event.key === 'Home') {\n event.preventDefault();\n seek(0);\n } else if (event.key === 'End') {\n event.preventDefault();\n seek(1);\n }\n}\n\nconst classes = computed(() =>\n cn(\n 'inline-block',\n resolvedInteractive.value &&\n 'cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm',\n TONE_CLASS[props.tone],\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Own attrs, then `rest` (a consumer attr wins, as React's trailing `{...rest}` did),\n then own handlers last so a consumer's handler runs first. -->\n <svg\n ref=\"el\"\n :role=\"resolvedInteractive ? 'slider' : 'img'\"\n aria-label=\"Audio waveform\"\n :aria-valuenow=\"Math.round(progress * 100)\"\n :aria-valuemin=\"0\"\n :aria-valuemax=\"100\"\n :tabindex=\"resolvedInteractive ? 0 : -1\"\n :width=\"width\"\n :height=\"height\"\n :viewBox=\"`0 0 ${width} ${height}`\"\n preserveAspectRatio=\"none\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"onClick\"\n @keydown=\"onKeydown\"\n >\n <rect\n v-for=\"bar in bars\"\n :key=\"bar.index\"\n :x=\"bar.x\"\n :y=\"bar.y\"\n :width=\"barWidth\"\n :height=\"bar.height\"\n :rx=\"1\"\n :class=\"bar.isPlayed ? 'fill-current' : 'fill-current opacity-30'\"\n />\n </svg>\n</template>\n","<script lang=\"ts\">\nexport interface AudioPlayerProps {\n /** The audio source URL. */\n src: string;\n /** The pre-computed per-bin amplitudes — swaps the range scrubber for an `AudioWaveform`. */\n peaks?: ReadonlyArray<number>;\n /** The autoplay state, forwarded to the native `<audio>`. */\n autoPlay?: boolean;\n /** The loop state, forwarded to the native `<audio>`. */\n loop?: boolean;\n /** The initial volume in 0..1. Default `1`. */\n defaultVolume?: number;\n /** The initial playback rate. Default `1`. */\n defaultPlaybackRate?: number;\n /** The dense layout. Default `false`. */\n isCompact?: boolean;\n}\n\nconst SPEEDS: ReadonlyArray<number> = [0.5, 0.75, 1, 1.25, 1.5, 2];\n\nfunction formatTime(seconds: number): string {\n if (!Number.isFinite(seconds) || seconds < 0) return '0:00';\n const total = Math.floor(seconds);\n const h = Math.floor(total / 3600);\n const m = Math.floor((total % 3600) / 60);\n const sec = total % 60;\n if (h > 0) return `${h}:${String(m).padStart(2, '0')}:${String(sec).padStart(2, '0')}`;\n return `${m}:${String(sec).padStart(2, '0')}`;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport { Pause, Play, Volume2, VolumeX } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport { AudioWaveform } from '../audioWaveform';\n\n/**\n * Custom-controls audio player. Native `<audio>` underneath; play/pause,\n * scrubber (or `AudioWaveform` if `peaks` provided), volume, speed.\n */\ndefineOptions({ name: 'AudioPlayer', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<AudioPlayerProps>(), {\n peaks: undefined,\n autoPlay: undefined,\n loop: undefined,\n defaultVolume: 1,\n defaultPlaybackRate: 1,\n isCompact: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when playback starts. */\n play: [];\n /** Fires when playback pauses. */\n pause: [];\n /** Fires on every `timeupdate` with the current time and the total duration. */\n 'time-update': [time: number, duration: number];\n /** Fires when playback reaches the end. */\n ended: [];\n}>();\n\nconst attrs = useAttrs();\n/** The native `<audio>` — React exposed it through `useImperativeHandle`. */\nconst el = useTemplateRef<HTMLAudioElement>('el');\n\nconst playing = ref(!!props.autoPlay);\nconst currentTime = ref(0);\nconst duration = ref(0);\nconst volume = ref(props.defaultVolume);\nconst muted = ref(false);\nconst speed = ref(props.defaultPlaybackRate);\n\n/** Push the three imperative settings onto the element — React's `useEffect`. */\nfunction applyAudioSettings(): void {\n const audio = el.value;\n if (!audio) return;\n audio.volume = volume.value;\n audio.muted = muted.value;\n audio.playbackRate = speed.value;\n}\n\nonMounted(applyAudioSettings);\nwatch([volume, muted, speed], applyAudioSettings, { flush: 'post' });\n\nfunction togglePlay(): void {\n const audio = el.value;\n if (!audio) return;\n if (audio.paused) {\n audio.play().catch(() => {\n /* autoplay rejection */\n });\n } else {\n audio.pause();\n }\n}\n\nfunction seekTo(seconds: number): void {\n const audio = el.value;\n if (!audio || !Number.isFinite(seconds)) return;\n audio.currentTime = Math.max(0, Math.min(audio.duration || 0, seconds));\n}\n\nfunction seekProgress(fraction: number): void {\n if (duration.value > 0) seekTo(fraction * duration.value);\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n // Only handle shortcuts aimed at the container itself — never hijack\n // keys from interactive children (seek slider, speed select, buttons).\n if (event.target !== event.currentTarget) return;\n switch (event.key) {\n case ' ':\n case 'Spacebar':\n event.preventDefault();\n togglePlay();\n break;\n case 'ArrowRight':\n event.preventDefault();\n seekTo(currentTime.value + 5);\n break;\n case 'ArrowLeft':\n event.preventDefault();\n seekTo(currentTime.value - 5);\n break;\n case 'ArrowUp':\n event.preventDefault();\n volume.value = Math.min(1, volume.value + 0.1);\n break;\n case 'ArrowDown':\n event.preventDefault();\n volume.value = Math.max(0, volume.value - 0.1);\n break;\n case 'm':\n case 'M':\n event.preventDefault();\n muted.value = !muted.value;\n break;\n }\n}\n\nfunction onNativePlay(): void {\n playing.value = true;\n emit('play');\n}\n\nfunction onNativePause(): void {\n playing.value = false;\n emit('pause');\n}\n\nfunction onNativeTimeUpdate(): void {\n const audio = el.value;\n if (!audio) return;\n currentTime.value = audio.currentTime;\n emit('time-update', audio.currentTime, audio.duration);\n}\n\nfunction onNativeLoadedMetadata(): void {\n const audio = el.value;\n if (audio) duration.value = audio.duration || 0;\n}\n\nfunction onNativeEnded(): void {\n playing.value = false;\n emit('ended');\n}\n\nfunction onRangeInput(event: Event): void {\n seekTo(Number((event.target as HTMLInputElement).value));\n}\n\nconst progress = computed(() => (duration.value > 0 ? currentTime.value / duration.value : 0));\n\nconst classes = computed(() =>\n cn(\n 'flex items-center gap-3 rounded-md border border-border bg-card p-2 text-card-foreground shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n props.isCompact && 'gap-2 p-1.5',\n attrs.class as string | undefined,\n ),\n);\n\n/**\n * Everything but `class` — and, exactly as in the React original, it lands on\n * the inner `<audio>`, not on the wrapper. `class` is re-applied through `cn`.\n */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\nconst TIME_STYLE = { minWidth: '3.5rem' } as const;\nconst DURATION_STYLE = { minWidth: '3.5rem', textAlign: 'right' } as const;\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n role=\"region\"\n aria-label=\"Audio player\"\n :tabindex=\"0\"\n :data-playing=\"playing || undefined\"\n :class=\"classes\"\n @keydown=\"onKeydown\"\n >\n <audio\n ref=\"el\"\n :src=\"src\"\n :autoplay=\"autoPlay\"\n :loop=\"loop\"\n v-bind=\"rest\"\n @play=\"onNativePlay\"\n @pause=\"onNativePause\"\n @timeupdate=\"onNativeTimeUpdate\"\n @loadedmetadata=\"onNativeLoadedMetadata\"\n @ended=\"onNativeEnded\"\n />\n <button\n type=\"button\"\n :aria-label=\"playing ? 'Pause' : 'Play'\"\n :class=\"\n cn(\n 'inline-flex shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n isCompact ? 'h-7 w-7' : 'h-9 w-9',\n )\n \"\n @click=\"togglePlay\"\n >\n <Icon :icon=\"playing ? Pause : Play\" :size=\"isCompact ? 12 : 14\" />\n </button>\n <span class=\"shrink-0 text-xs tabular-nums text-muted-foreground\" :style=\"TIME_STYLE\">{{\n formatTime(currentTime)\n }}</span>\n <div class=\"flex-1\">\n <AudioWaveform\n v-if=\"peaks\"\n :peaks=\"peaks\"\n :progress=\"progress\"\n :on-seek=\"seekProgress\"\n :width=\"isCompact ? 200 : 320\"\n :height=\"isCompact ? 32 : 40\"\n />\n <input\n v-else\n type=\"range\"\n role=\"slider\"\n aria-label=\"Seek\"\n :aria-valuetext=\"formatTime(currentTime)\"\n :min=\"0\"\n :max=\"duration || 0\"\n step=\"any\"\n :value=\"currentTime\"\n class=\"w-full accent-primary\"\n @input=\"onRangeInput\"\n />\n </div>\n <span\n class=\"shrink-0 text-xs tabular-nums text-muted-foreground\"\n :style=\"DURATION_STYLE\"\n >{{ formatTime(duration) }}</span\n >\n <button\n type=\"button\"\n :aria-label=\"muted ? 'Unmute' : 'Mute'\"\n class=\"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground\"\n @click=\"muted = !muted\"\n >\n <Icon :icon=\"muted || volume === 0 ? VolumeX : Volume2\" :size=\"14\" />\n </button>\n <select\n v-model=\"speed\"\n aria-label=\"Playback speed\"\n class=\"h-7 rounded-sm border border-input bg-background px-1 text-xs\"\n >\n <option v-for=\"rate in SPEEDS\" :key=\"rate\" :value=\"rate\">{{ rate }}×</option>\n </select>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines the kind of a video text track. */\nexport const VideoTrackKind = {\n /** Refers to translation subtitles. */\n Subtitles: 'subtitles',\n /** Refers to closed captions. */\n Captions: 'captions',\n /** Refers to audio descriptions. */\n Descriptions: 'descriptions',\n /** Refers to chapter markers. */\n Chapters: 'chapters',\n /** Refers to script-only metadata. */\n Metadata: 'metadata',\n} as const;\n\nexport type VideoTrackKind = (typeof VideoTrackKind)[keyof typeof VideoTrackKind];\n\nexport interface VideoTrack {\n src: string;\n srcLang: string;\n label: string;\n kind?: VideoTrackKind;\n default?: boolean;\n}\n\nexport interface VideoPlayerProps {\n /** The video source URL. */\n src: string;\n /** The preview image shown before playback. */\n poster?: string;\n /** The caption/subtitle tracks rendered as `<track>` children. */\n tracks?: ReadonlyArray<VideoTrack>;\n /** The CSS `aspect-ratio` of the frame. Default `16 / 9`. */\n aspectRatio?: string | number;\n /** The autoplay state, forwarded to the native `<video>`. */\n autoPlay?: boolean;\n /** The loop state, forwarded to the native `<video>`. */\n loop?: boolean;\n /** The initial muted state — seeds the internal toggle, exactly as React's `muted` did. */\n muted?: boolean;\n /** The initial volume in 0..1. Default `1`. */\n defaultVolume?: number;\n /** The initial playback rate. Default `1`. */\n defaultPlaybackRate?: number;\n}\n\nconst SPEEDS: ReadonlyArray<number> = [0.5, 0.75, 1, 1.25, 1.5, 2];\n\nfunction formatTime(seconds: number): string {\n if (!Number.isFinite(seconds) || seconds < 0) return '0:00';\n const total = Math.floor(seconds);\n const h = Math.floor(total / 3600);\n const m = Math.floor((total % 3600) / 60);\n const sec = total % 60;\n if (h > 0) return `${h}:${String(m).padStart(2, '0')}:${String(sec).padStart(2, '0')}`;\n return `${m}:${String(sec).padStart(2, '0')}`;\n}\n\n/** The idle delay, in ms, before the controls bar fades out during playback. */\nconst IDLE_HIDE_MS = 3000;\n\nconst ICON_BUTTON_CLASS =\n 'inline-flex h-7 w-7 items-center justify-center rounded text-white/80 hover:bg-white/20 hover:text-white';\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport {\n Captions,\n CaptionsOff,\n Maximize,\n Minimize,\n Pause,\n PictureInPicture2,\n Play,\n Volume2,\n VolumeX,\n} from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\n\n/**\n * Custom-controls video player. Click video to toggle play; controls\n * auto-hide after 3s during playback; keyboard shortcuts (Space/F/M/C/←/→/↑/↓).\n */\ndefineOptions({ name: 'VideoPlayer', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<VideoPlayerProps>(), {\n poster: undefined,\n tracks: undefined,\n aspectRatio: '16 / 9',\n // Explicit `undefined` so an absent Boolean prop is not cast to `false` and the\n // native element keeps its own default.\n autoPlay: undefined,\n loop: undefined,\n muted: undefined,\n defaultVolume: 1,\n defaultPlaybackRate: 1,\n});\n\nconst attrs = useAttrs();\n/** The wrapper — React held it as `containerRef`; fullscreen and the idle timer target it. */\nconst container = useTemplateRef<HTMLDivElement>('container');\n/** The native `<video>` — React exposed it through `useImperativeHandle`. */\nconst el = useTemplateRef<HTMLVideoElement>('el');\n\nconst playing = ref(!!props.autoPlay);\nconst currentTime = ref(0);\nconst duration = ref(0);\nconst volume = ref(props.defaultVolume);\n/**\n * Named apart from the `muted` prop, which only seeds it. A setup ref and a prop\n * of the same name collapse into one template binding, so the prop keeps its\n * React name and the state gets a distinct one.\n */\nconst isMuted = ref(!!props.muted);\nconst speed = ref(props.defaultPlaybackRate);\nconst fullscreen = ref(false);\nconst captionsOn = ref(false);\nconst showControls = ref(true);\n\nlet idleTimer: number | null = null;\n\n/** Push the three imperative settings onto the element — React's first `useEffect`. */\nfunction applyVideoSettings(): void {\n const video = el.value;\n if (!video) return;\n video.volume = volume.value;\n video.muted = isMuted.value;\n video.playbackRate = speed.value;\n}\n\nonMounted(applyVideoSettings);\nwatch([volume, isMuted, speed], applyVideoSettings, { flush: 'post' });\n\n/** Mirror the caption toggle onto every `TextTrack` — React's second `useEffect`. */\nfunction applyCaptionMode(): void {\n const video = el.value;\n if (!video || !video.textTracks) return;\n for (let i = 0; i < video.textTracks.length; i++) {\n const track = video.textTracks[i];\n if (track) track.mode = captionsOn.value ? 'showing' : 'hidden';\n }\n}\n\nonMounted(applyCaptionMode);\nwatch([captionsOn, () => props.tracks], applyCaptionMode, { flush: 'post' });\n\nfunction onFullscreenChange(): void {\n fullscreen.value = document.fullscreenElement === container.value;\n}\n\nonMounted(() => {\n document.addEventListener('fullscreenchange', onFullscreenChange);\n});\n\nonBeforeUnmount(() => {\n document.removeEventListener('fullscreenchange', onFullscreenChange);\n});\n\nfunction togglePlay(): void {\n const video = el.value;\n if (!video) return;\n if (video.paused) {\n video.play().catch(() => {\n /* autoplay rejection */\n });\n } else {\n video.pause();\n }\n}\n\nfunction seekTo(seconds: number): void {\n const video = el.value;\n if (!video || !Number.isFinite(seconds)) return;\n video.currentTime = Math.max(0, Math.min(video.duration || 0, seconds));\n}\n\nfunction toggleFullscreen(): void {\n const node = container.value;\n if (!node) return;\n if (!document.fullscreenElement) {\n void node.requestFullscreen?.().catch(() => {\n /* denied by the user agent */\n });\n } else {\n void document.exitFullscreen?.().catch(() => {\n /* already exiting */\n });\n }\n}\n\nfunction togglePiP(): void {\n const video = el.value;\n if (!video) return;\n if ('pictureInPictureElement' in document && document.pictureInPictureElement) {\n void (document as unknown as { exitPictureInPicture?: () => Promise<void> })\n .exitPictureInPicture?.()\n ?.catch(() => {\n /* not in picture-in-picture */\n });\n } else if ('requestPictureInPicture' in video) {\n void (video as HTMLVideoElement & { requestPictureInPicture?: () => Promise<unknown> })\n .requestPictureInPicture?.()\n ?.catch(() => {\n /* refused by the user agent */\n });\n }\n}\n\n/** Reveal the controls, and re-arm the idle fade only while playing. */\nfunction bumpControls(): void {\n showControls.value = true;\n if (idleTimer != null) window.clearTimeout(idleTimer);\n if (playing.value) {\n idleTimer = window.setTimeout(() => {\n showControls.value = false;\n }, IDLE_HIDE_MS);\n }\n}\n\nonMounted(bumpControls);\nwatch(playing, bumpControls);\nonBeforeUnmount(() => {\n if (idleTimer != null) window.clearTimeout(idleTimer);\n});\n\nfunction onMouseLeave(): void {\n if (playing.value) showControls.value = false;\n}\n\nfunction onKeydown(event: KeyboardEvent): void {\n // Only handle shortcuts aimed at the container itself — never hijack\n // keys from interactive children (seek slider, speed select, buttons).\n if (event.target !== event.currentTarget) return;\n switch (event.key) {\n case ' ':\n case 'Spacebar':\n event.preventDefault();\n togglePlay();\n break;\n case 'ArrowRight':\n event.preventDefault();\n seekTo(currentTime.value + 5);\n break;\n case 'ArrowLeft':\n event.preventDefault();\n seekTo(currentTime.value - 5);\n break;\n case 'ArrowUp':\n event.preventDefault();\n volume.value = Math.min(1, volume.value + 0.1);\n break;\n case 'ArrowDown':\n event.preventDefault();\n volume.value = Math.max(0, volume.value - 0.1);\n break;\n case 'm':\n case 'M':\n event.preventDefault();\n isMuted.value = !isMuted.value;\n break;\n case 'f':\n case 'F':\n event.preventDefault();\n toggleFullscreen();\n break;\n case 'c':\n case 'C':\n event.preventDefault();\n if (props.tracks && props.tracks.length > 0) captionsOn.value = !captionsOn.value;\n break;\n }\n}\n\n/*\n * The five handlers below sit AFTER `v-bind=\"rest\"` on the `<video>`, so a\n * consumer's own listener for the same event runs first and this one second —\n * the order React's `composeEventHandlers(theirs, ours)` produced. The\n * `defaultPrevented` guard is that helper's `checkForDefaultPrevented`.\n */\nfunction onNativePlay(event: Event): void {\n if (event.defaultPrevented) return;\n playing.value = true;\n}\n\nfunction onNativePause(event: Event): void {\n if (event.defaultPrevented) return;\n playing.value = false;\n}\n\nfunction onNativeTimeUpdate(event: Event): void {\n if (event.defaultPrevented) return;\n const video = el.value;\n if (!video) return;\n currentTime.value = video.currentTime;\n}\n\nfunction onNativeLoadedMetadata(event: Event): void {\n if (event.defaultPrevented) return;\n const video = el.value;\n if (video) duration.value = video.duration || 0;\n}\n\nfunction onVideoClick(event: MouseEvent): void {\n if (event.defaultPrevented) return;\n togglePlay();\n}\n\nfunction onRangeInput(event: Event): void {\n seekTo(Number((event.target as HTMLInputElement).value));\n}\n\nconst classes = computed(() =>\n cn(\n 'group relative overflow-hidden rounded-md bg-black text-white shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as string | undefined,\n ),\n);\n\n/** `aspect-ratio` is unitless, so the numeric form only needs stringifying. */\nconst containerStyle = computed(() => ({\n aspectRatio:\n typeof props.aspectRatio === 'number' ? String(props.aspectRatio) : props.aspectRatio,\n}));\n\nconst controlsClasses = computed(() =>\n cn(\n 'absolute inset-x-0 bottom-0 flex items-center gap-2 bg-gradient-to-t from-black/80 to-transparent px-3 pb-2 pt-6 transition-opacity',\n showControls.value ? 'opacity-100' : 'opacity-0',\n ),\n);\n\nconst hasTracks = computed(() => !!props.tracks && props.tracks.length > 0);\n\n/**\n * Everything but `class` — and, exactly as in the React original, it lands on\n * the inner `<video>`, not on the wrapper. `class` is re-applied through `cn`.\n */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"container\"\n role=\"region\"\n aria-label=\"Video player\"\n :tabindex=\"0\"\n :class=\"classes\"\n :style=\"containerStyle\"\n @keydown=\"onKeydown\"\n @mousemove=\"bumpControls\"\n @mouseleave=\"onMouseLeave\"\n >\n <video\n ref=\"el\"\n :src=\"src\"\n :poster=\"poster\"\n :autoplay=\"autoPlay\"\n :loop=\"loop\"\n :muted=\"isMuted\"\n v-bind=\"rest\"\n class=\"h-full w-full bg-black\"\n @play=\"onNativePlay\"\n @pause=\"onNativePause\"\n @timeupdate=\"onNativeTimeUpdate\"\n @loadedmetadata=\"onNativeLoadedMetadata\"\n @click=\"onVideoClick\"\n >\n <track\n v-for=\"(item, index) in tracks\"\n :key=\"index\"\n :src=\"item.src\"\n :srclang=\"item.srcLang\"\n :label=\"item.label\"\n :kind=\"item.kind ?? 'captions'\"\n :default=\"item.default\"\n />\n </video>\n\n <!-- Big center play button when paused -->\n <button\n v-if=\"!playing\"\n type=\"button\"\n aria-label=\"Play\"\n class=\"absolute inset-0 grid place-items-center bg-black/30 transition-opacity hover:bg-black/40\"\n @click=\"togglePlay\"\n >\n <span\n class=\"grid h-16 w-16 place-items-center rounded-full bg-white/90 text-foreground shadow-lg\"\n >\n <Icon :icon=\"Play\" :size=\"28\" />\n </span>\n </button>\n\n <!-- Controls bar -->\n <div :class=\"controlsClasses\">\n <button\n type=\"button\"\n :aria-label=\"playing ? 'Pause' : 'Play'\"\n class=\"inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/20 text-white hover:bg-white/30\"\n @click=\"togglePlay\"\n >\n <Icon :icon=\"playing ? Pause : Play\" :size=\"14\" />\n </button>\n <span class=\"text-xs tabular-nums\">\n {{ formatTime(currentTime) }} / {{ formatTime(duration) }}\n </span>\n <input\n type=\"range\"\n role=\"slider\"\n aria-label=\"Seek\"\n :aria-valuetext=\"formatTime(currentTime)\"\n :min=\"0\"\n :max=\"duration || 0\"\n step=\"any\"\n :value=\"currentTime\"\n class=\"flex-1 accent-primary\"\n @input=\"onRangeInput\"\n />\n <button\n type=\"button\"\n :aria-label=\"isMuted || volume === 0 ? 'Unmute' : 'Mute'\"\n :class=\"ICON_BUTTON_CLASS\"\n @click=\"isMuted = !isMuted\"\n >\n <Icon :icon=\"isMuted || volume === 0 ? VolumeX : Volume2\" :size=\"14\" />\n </button>\n <select\n v-model=\"speed\"\n aria-label=\"Playback speed\"\n class=\"h-7 rounded-sm border border-white/20 bg-black/40 px-1 text-xs\"\n >\n <option v-for=\"rate in SPEEDS\" :key=\"rate\" :value=\"rate\" class=\"text-foreground\">\n {{ rate }}×\n </option>\n </select>\n <button\n v-if=\"hasTracks\"\n type=\"button\"\n :aria-label=\"captionsOn ? 'Hide captions' : 'Show captions'\"\n :aria-pressed=\"captionsOn\"\n :class=\"ICON_BUTTON_CLASS\"\n @click=\"captionsOn = !captionsOn\"\n >\n <Icon :icon=\"captionsOn ? Captions : CaptionsOff\" :size=\"14\" />\n </button>\n <button\n type=\"button\"\n aria-label=\"Picture in picture\"\n :class=\"ICON_BUTTON_CLASS\"\n @click=\"togglePiP\"\n >\n <Icon :icon=\"PictureInPicture2\" :size=\"14\" />\n </button>\n <button\n type=\"button\"\n :aria-label=\"fullscreen ? 'Exit fullscreen' : 'Enter fullscreen'\"\n :class=\"ICON_BUTTON_CLASS\"\n @click=\"toggleFullscreen\"\n >\n <Icon :icon=\"fullscreen ? Minimize : Maximize\" :size=\"14\" />\n </button>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface PDFViewerProps {\n /** The PDF URL. */\n src: string;\n /** The controlled page number (1-based). */\n page?: number;\n /** The uncontrolled initial page. Default `1`. */\n defaultPage?: number;\n /** The controlled zoom percentage. */\n zoom?: number;\n /** The uncontrolled initial zoom percentage. Default `100`. */\n defaultZoom?: number;\n /** The total page count, when known — enables `n / total` and clamps `next`. */\n pageCount?: number;\n /** The iframe title. Default `PDF document`. */\n title?: string;\n /** The download-link state. Default `true`. */\n canDownload?: boolean;\n /** The CSS height of the document area. Default `70vh`. */\n height?: string;\n}\n\nconst ZOOM_LEVELS: ReadonlyArray<number> = [50, 75, 100, 125, 150, 175, 200, 250, 300, 400];\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { ChevronLeft, ChevronRight, Download, ZoomIn, ZoomOut } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { Icon } from '../../../foundation/icons';\n\n/**\n * Inline PDF viewer. **First-gen** uses the browser's built-in PDF viewer via\n * an `<iframe>` with `#page=N&zoom=Z` URL hash. Real per-page rendering,\n * thumbnails, search, annotations all need a PDF.js wrap — deferred to a\n * follow-up that slots into this contract.\n */\ndefineOptions({ name: 'PDFViewer', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<PDFViewerProps>(), {\n page: undefined,\n defaultPage: 1,\n zoom: undefined,\n defaultZoom: 100,\n pageCount: undefined,\n title: 'PDF document',\n canDownload: true,\n height: '70vh',\n});\n\nconst emit = defineEmits<{\n /** Fires with the next page number. */\n 'page-change': [page: number];\n /** Fires with the next zoom percentage. */\n 'zoom-change': [zoom: number];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst { value: page, setValue: setPage } = useControlled<number>({\n controlled: () => props.page,\n default: props.defaultPage,\n onChange: (next) => emit('page-change', next),\n});\n\nconst { value: zoom, setValue: setZoom } = useControlled<number>({\n controlled: () => props.zoom,\n default: props.defaultZoom,\n onChange: (next) => emit('zoom-change', next),\n});\n\n// Build URL with hash for page/zoom hint to native PDF viewer.\nconst hashedSrc = computed(() => {\n try {\n const url = new URL(\n props.src,\n typeof window !== 'undefined' ? window.location.href : 'http://localhost',\n );\n url.hash = `page=${page.value}&zoom=${zoom.value}`;\n return url.toString();\n } catch {\n return `${props.src}#page=${page.value}&zoom=${zoom.value}`;\n }\n});\n\nconst minZoom = computed(() => ZOOM_LEVELS[0]!);\nconst maxZoom = computed(() => ZOOM_LEVELS[ZOOM_LEVELS.length - 1]!);\n\nfunction goPrev(): void {\n setPage(Math.max(1, page.value - 1));\n}\n\nfunction goNext(): void {\n setPage(props.pageCount ? Math.min(props.pageCount, page.value + 1) : page.value + 1);\n}\n\nfunction zoomIn(): void {\n const next = ZOOM_LEVELS.find((level) => level > zoom.value);\n if (next) setZoom(next);\n}\n\nfunction zoomOut(): void {\n const next = [...ZOOM_LEVELS].reverse().find((level) => level < zoom.value);\n if (next) setZoom(next);\n}\n\nconst classes = computed(() =>\n cn(\n 'flex flex-col overflow-hidden rounded-md border border-border bg-card text-card-foreground shadow-sm',\n attrs.class as string | undefined,\n ),\n);\n\n/** Vue does not append `px` to a numeric `:style` value the way React does — spelled out. */\nconst frameStyle = computed(() => ({ height: props.height, border: '0' }));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div class=\"flex items-center gap-1 border-b border-border bg-muted/40 px-2 py-1.5\">\n <button\n type=\"button\"\n aria-label=\"Previous page\"\n :disabled=\"page <= 1\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-40\"\n @click=\"goPrev\"\n >\n <Icon :icon=\"ChevronLeft\" :size=\"14\" />\n </button>\n <span class=\"px-1 text-xs tabular-nums text-foreground\">{{\n pageCount ? `${page} / ${pageCount}` : `Page ${page}`\n }}</span>\n <button\n type=\"button\"\n aria-label=\"Next page\"\n :disabled=\"pageCount != null && page >= pageCount\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-40\"\n @click=\"goNext\"\n >\n <Icon :icon=\"ChevronRight\" :size=\"14\" />\n </button>\n <span class=\"mx-2 h-4 w-px bg-border\" aria-hidden=\"true\" />\n <button\n type=\"button\"\n aria-label=\"Zoom out\"\n :disabled=\"zoom <= minZoom\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-40\"\n @click=\"zoomOut\"\n >\n <Icon :icon=\"ZoomOut\" :size=\"14\" />\n </button>\n <span class=\"px-1 text-xs tabular-nums text-foreground\">{{ zoom }}%</span>\n <button\n type=\"button\"\n aria-label=\"Zoom in\"\n :disabled=\"zoom >= maxZoom\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground disabled:opacity-40\"\n @click=\"zoomIn\"\n >\n <Icon :icon=\"ZoomIn\" :size=\"14\" />\n </button>\n <div class=\"ml-auto flex items-center gap-1\">\n <a\n v-if=\"canDownload\"\n :href=\"src\"\n download\n aria-label=\"Download PDF\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground\"\n >\n <Icon :icon=\"Download\" :size=\"14\" />\n </a>\n </div>\n </div>\n <iframe :src=\"hashedSrc\" :title=\"title\" :style=\"frameStyle\" class=\"w-full bg-muted\" />\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\n\n// ScheduleView models bookings as absolute instants (a wall-clock time in a\n// specific zone) — `Temporal.ZonedDateTime`, the peer of .NET `DateTimeOffset`.\n// The single-day header projects down to the day's calendar date; the\n// intra-day slot geometry does its math on `ZonedDateTime` (`.hour`, `.add`,\n// `until`) via the shared, Temporal-based `DateExtensions`.\n\nexport interface ScheduleResource {\n id: string;\n /** The row label. React took a `ReactNode`; richer content goes through the `resource` slot. */\n label: string | number;\n color?: string;\n}\n\nexport interface ScheduleBooking {\n id: string;\n resourceId: string;\n start: Temporal.ZonedDateTime;\n end: Temporal.ZonedDateTime;\n /** The booking label. React took a `ReactNode`; richer content goes through the `booking` slot. */\n label?: string | number;\n color?: string;\n}\n\nexport interface ScheduleViewProps {\n resources: ReadonlyArray<ScheduleResource>;\n bookings: ReadonlyArray<ScheduleBooking>;\n /** The day to render; its calendar date + time zone anchor the grid. */\n date?: Temporal.ZonedDateTime;\n hourRange?: [number, number];\n slotMinutes?: number;\n /**\n * Handles a click on an empty slot.\n *\n * Kept a PROP rather than an emit: its presence is what renders the slot overlay at\n * all, and Vue strips a declared emit's listener out of `useAttrs()` — an emit could\n * never be detected, so the overlay would either always or never render.\n */\n onSlotClick?: (resourceId: string, time: Temporal.ZonedDateTime) => void;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef, type StyleValue } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport {\n formatZonedTime,\n minutesBetween,\n nowZoned,\n zonedAtHour,\n} from '../../forms/DateExtensions';\n\n/**\n * Multi-resource single-day schedule. Resources × hours grid; bookings\n * positioned absolutely within each row's timeline by minute offset.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'ScheduleView', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ScheduleViewProps>(), {\n hourRange: () => [8, 20],\n slotMinutes: 30,\n});\n\nconst emit = defineEmits<{\n /** Fires when a booking is clicked. Replaces React's `onBookingClick`. */\n 'booking-click': [booking: ScheduleBooking];\n}>();\n\n/** Replaces React's `renderBooking` render prop, and lifts `label` to rich content. */\ndefineSlots<{\n /** Overrides a resource row's label. Falls back to `resource.label`. */\n resource?(props: { resource: ScheduleResource }): unknown;\n /** Overrides a booking's body. Falls back to the label + time range. */\n booking?(props: { booking: ScheduleBooking }): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* `nowZoned()` reads the host time zone through `Temporal.Now` — universal, not a browser\n global, so it is safe as a computed default on the server. */\nconst day = computed(() => props.date ?? nowZoned());\n\nconst startHour = computed(() => props.hourRange[0]);\nconst endHour = computed(() => props.hourRange[1]);\nconst hourCount = computed(() => endHour.value - startHour.value);\nconst totalMinutes = computed(() => hourCount.value * 60);\nconst slotCount = computed(() => Math.ceil(totalMinutes.value / props.slotMinutes));\n\nconst dayStart = computed(() =>\n zonedAtHour(day.value.toPlainDate(), startHour.value, day.value.timeZoneId),\n);\n\nconst bookingsByResource = computed(() => {\n const map = new Map<string, Array<ScheduleBooking>>();\n for (const b of props.bookings) {\n const list = map.get(b.resourceId);\n if (list) list.push(b);\n else map.set(b.resourceId, [b]);\n }\n return map;\n});\n\nfunction bookingsFor(resourceId: string): Array<ScheduleBooking> {\n return bookingsByResource.value.get(resourceId) ?? [];\n}\n\nconst dayLabel = computed(() =>\n day.value.toLocaleString(undefined, { weekday: 'short', month: 'short', day: 'numeric' }),\n);\n\nconst hourColumns = computed<StyleValue>(() => ({\n gridTemplateColumns: `repeat(${hourCount.value}, 1fr)`,\n}));\n\nconst slotColumns = computed<StyleValue>(() => ({\n gridTemplateColumns: `repeat(${slotCount.value}, 1fr)`,\n}));\n\nfunction hourLabel(index: number): string {\n return `${String((startHour.value + index) % 24).padStart(2, '0')}:00`;\n}\n\nfunction slotTime(index: number): Temporal.ZonedDateTime {\n return dayStart.value.add({ minutes: index * props.slotMinutes });\n}\n\nfunction slotLabel(index: number): string {\n return `Empty slot at ${formatZonedTime(slotTime(index))}`;\n}\n\nfunction onSlot(resourceId: string, index: number): void {\n props.onSlotClick?.(resourceId, slotTime(index));\n}\n\nfunction onBooking(event: MouseEvent, booking: ScheduleBooking): void {\n event.stopPropagation();\n emit('booking-click', booking);\n}\n\nfunction bookingLabel(resource: ScheduleResource, booking: ScheduleBooking): string {\n return `${resource.label} ${formatZonedTime(booking.start)} – ${formatZonedTime(booking.end)}: ${booking.label ?? ''}`;\n}\n\n/* Numeric CSS lengths are spelled with their unit — React's style object auto-appended `px`,\n Vue's does not, so a bare `56` would be dropped as an invalid declaration. */\nfunction bookingStyle(resource: ScheduleResource, booking: ScheduleBooking): StyleValue {\n const offsetMin = Math.max(0, minutesBetween(dayStart.value, booking.start));\n const durMin = Math.max(15, minutesBetween(booking.start, booking.end));\n return {\n left: `${(offsetMin / totalMinutes.value) * 100}%`,\n width: `${(durMin / totalMinutes.value) * 100}%`,\n top: '4px',\n bottom: '4px',\n background: booking.color ?? resource.color,\n };\n}\n\nfunction bookingClass(resource: ScheduleResource, booking: ScheduleBooking): string {\n const color = booking.color ?? resource.color;\n return cn(\n 'absolute overflow-hidden rounded-md border border-border/60 px-2 py-1 text-left text-xs font-medium transition-colors hover:brightness-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n !color && 'bg-primary-soft text-primary-soft-foreground',\n );\n}\n\nconst ROW_STYLE: StyleValue = { height: '56px' };\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'overflow-auto rounded-md border border-border bg-card text-sm shadow-sm',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <!-- Timeline layout, no 2D keyboard nav — ARIA grid (grid > row > gridcell)\n would be a lie; group + labeled slot/booking buttons is honest. -->\n <div\n ref=\"root\"\n role=\"group\"\n aria-label=\"Schedule\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <!-- Hour header -->\n <div class=\"sticky top-0 z-raised flex border-b border-border bg-muted/40\">\n <div\n class=\"w-32 shrink-0 border-r border-border px-3 py-2 text-xs font-medium text-muted-foreground\"\n >\n {{ dayLabel }}\n </div>\n <div class=\"flex-1 grid\" :style=\"hourColumns\">\n <div\n v-for=\"i in hourCount\"\n :key=\"i\"\n class=\"border-l border-border px-2 py-1 text-xs text-muted-foreground tabular-nums\"\n >\n {{ hourLabel(i - 1) }}\n </div>\n </div>\n </div>\n <!-- Rows -->\n <div\n v-for=\"resource in resources\"\n :key=\"resource.id\"\n class=\"flex border-b border-border last:border-b-0\"\n >\n <div\n class=\"w-32 shrink-0 border-r border-border bg-muted/20 px-3 py-2 text-xs font-medium\"\n >\n <slot name=\"resource\" :resource=\"resource\">{{ resource.label }}</slot>\n </div>\n <div class=\"relative flex-1\" :style=\"ROW_STYLE\">\n <!-- Vertical hour gridlines -->\n <div aria-hidden=\"true\" class=\"absolute inset-0 grid pointer-events-none\" :style=\"hourColumns\">\n <div v-for=\"i in hourCount\" :key=\"i\" class=\"border-l border-border\" />\n </div>\n <!-- Slot click overlay -->\n <div v-if=\"onSlotClick\" class=\"absolute inset-0 grid\" :style=\"slotColumns\">\n <button\n v-for=\"i in slotCount\"\n :key=\"i\"\n type=\"button\"\n :aria-label=\"slotLabel(i - 1)\"\n class=\"hover:bg-primary-soft/30\"\n @click=\"onSlot(resource.id, i - 1)\"\n />\n </div>\n <!-- Bookings -->\n <button\n v-for=\"booking in bookingsFor(resource.id)\"\n :key=\"booking.id\"\n type=\"button\"\n :aria-label=\"bookingLabel(resource, booking)\"\n :style=\"bookingStyle(resource, booking)\"\n :class=\"bookingClass(resource, booking)\"\n @click=\"onBooking($event, booking)\"\n >\n <slot name=\"booking\" :booking=\"booking\">\n <div class=\"truncate\">{{ booking.label ?? booking.id }}</div>\n <div class=\"text-[10px] opacity-70 tabular-nums\">\n {{ formatZonedTime(booking.start) }}\n {{ ' – ' }}\n {{ formatZonedTime(booking.end) }}\n </div>\n </slot>\n </button>\n </div>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport { Temporal } from 'temporal-polyfill';\nimport { addDays } from '../../forms/DateExtensions';\n\n// Gantt models tasks/milestones as date-only spans → `Temporal.PlainDate`\n// (calendar math, no time zone), the shape the day-column grid wants. Day\n// counts + iteration go through the shared, Temporal-based `DateExtensions`.\n\nexport interface GanttTask {\n id: string;\n /** The row label. React took a `ReactNode`; richer content goes through the `task` slot. */\n label: string | number;\n start: Temporal.PlainDate;\n end: Temporal.PlainDate;\n color?: string;\n /** 0..1 — fills the bar from the left. */\n progress?: number;\n}\n\nexport interface GanttDependency {\n from: string;\n to: string;\n}\n\nexport interface GanttMilestone {\n id: string;\n /** The milestone label. React took a `ReactNode`; the marker itself renders no text. */\n label: string | number;\n date: Temporal.PlainDate;\n}\n\nexport interface GanttProps {\n tasks: ReadonlyArray<GanttTask>;\n dependencies?: ReadonlyArray<GanttDependency>;\n milestones?: ReadonlyArray<GanttMilestone>;\n from?: Temporal.PlainDate;\n to?: Temporal.PlainDate;\n cellWidth?: number;\n rowHeight?: number;\n labelWidth?: number;\n hasWeekends?: boolean;\n}\n\n/** Earlier of two dates. */\nfunction minDate(a: Temporal.PlainDate, b: Temporal.PlainDate): Temporal.PlainDate {\n return Temporal.PlainDate.compare(a, b) <= 0 ? a : b;\n}\n\n/** Later of two dates. */\nfunction maxDate(a: Temporal.PlainDate, b: Temporal.PlainDate): Temporal.PlainDate {\n return Temporal.PlainDate.compare(a, b) >= 0 ? a : b;\n}\n\nfunction* eachDay(\n from: Temporal.PlainDate,\n to: Temporal.PlainDate,\n): Generator<Temporal.PlainDate> {\n let cur = from;\n while (Temporal.PlainDate.compare(cur, to) <= 0) {\n yield cur;\n cur = addDays(cur, 1);\n }\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef, type StyleValue } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { cn } from '../../../foundation/utils';\nimport { daysBetween, isWeekend, today } from '../../forms/DateExtensions';\n\n/**\n * First-generation Gantt chart. Tasks rendered as horizontal bars positioned\n * by start/end. Optional dependency arrows + \"today\" indicator. Drag-resize,\n * drag-move, critical path, group rows all deferred.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'Gantt', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<GanttProps>(), {\n /* `tasks` stays declared-required — Vue still warns when it is missing — but a\n default keeps an absent (or transiently-undefined) value out of the `.length`\n and `.map().reduce()` reads below. The empty-tasks branch already exists. */\n tasks: () => [],\n dependencies: () => [],\n milestones: () => [],\n cellWidth: 40,\n rowHeight: 36,\n labelWidth: 200,\n hasWeekends: true,\n});\n\nconst emit = defineEmits<{\n /** Fires when a task bar is clicked. Replaces React's `onTaskClick`. */\n 'task-click': [task: GanttTask];\n}>();\n\n/** Replaces React's inline `task.label` rendering with an override hook. */\ndefineSlots<{\n /** Overrides a task's label, in both the label column and the bar. */\n task?(props: { task: GanttTask }): unknown;\n}>();\n\nconst attrs = useAttrs();\n\n/* `today()` reads the host time zone through `Temporal.Now` — universal, not a browser\n global, so it is safe to evaluate on the server. */\nconst range = computed(() => {\n if (props.tasks.length === 0) {\n const now = today();\n return { from: now, to: now, totalDays: 1 };\n }\n const minStart = props.from ?? props.tasks.map((t) => t.start).reduce(minDate);\n const maxEnd = props.to ?? props.tasks.map((t) => t.end).reduce(maxDate);\n return { from: minStart, to: maxEnd, totalDays: daysBetween(minStart, maxEnd) + 1 };\n});\n\nconst rangeFrom = computed(() => range.value.from);\nconst totalDays = computed(() => range.value.totalDays);\n\nconst headerDates = computed(() => Array.from(eachDay(range.value.from, range.value.to)));\nconst todayOffset = computed(() => daysBetween(rangeFrom.value, today()));\nconst todayInRange = computed(\n () => todayOffset.value >= 0 && todayOffset.value < totalDays.value,\n);\n\nconst taskIndex = computed(() => new Map(props.tasks.map((t, i) => [t.id, i])));\n\nconst timelineWidth = computed(() => totalDays.value * props.cellWidth);\n\n/* Numeric CSS lengths are spelled with their unit — React's style object auto-appended `px`,\n Vue's does not, so a bare `36` would be dropped as an invalid declaration. */\nconst labelColumnStyle = computed<StyleValue>(() => ({ width: `${props.labelWidth}px` }));\nconst rowStyle = computed<StyleValue>(() => ({ height: `${props.rowHeight}px` }));\nconst cellStyle = computed<StyleValue>(() => ({ width: `${props.cellWidth}px` }));\nconst timelineStyle = computed<StyleValue>(() => ({ width: `${timelineWidth.value}px` }));\nconst overlayStyle = computed<StyleValue>(() => ({\n left: '0px',\n top: `${props.rowHeight}px`,\n width: `${timelineWidth.value}px`,\n height: `${props.tasks.length * props.rowHeight}px`,\n}));\n\nfunction headerCellClass(d: Temporal.PlainDate): string {\n return cn(\n 'border-r border-border text-[10px] tabular-nums',\n isWeekend(d) && props.hasWeekends && 'bg-muted/40',\n d.day === 1 && 'border-l-2 border-l-border-strong',\n );\n}\n\nfunction gridlineClass(d: Temporal.PlainDate): string {\n return cn('border-r border-border/60', isWeekend(d) && props.hasWeekends && 'bg-muted/30');\n}\n\nfunction monthLabel(d: Temporal.PlainDate): string {\n return d.toLocaleString(undefined, { month: 'short', year: '2-digit' });\n}\n\nfunction barStyle(task: GanttTask): StyleValue {\n const offset = daysBetween(rangeFrom.value, task.start);\n const length = Math.max(1, daysBetween(task.start, task.end) + 1);\n return {\n left: `${offset * props.cellWidth + 4}px`,\n width: `${length * props.cellWidth - 8}px`,\n top: '6px',\n bottom: '6px',\n background: task.color,\n };\n}\n\nfunction barClass(task: GanttTask): string {\n return cn(\n 'absolute overflow-hidden rounded-md border border-border/60 px-2 text-left text-[11px] font-medium transition-colors hover:brightness-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n !task.color && 'bg-primary text-primary-foreground',\n );\n}\n\nfunction progressStyle(task: GanttTask): StyleValue {\n return { width: `${(task.progress ?? 0) * 100}%` };\n}\n\nfunction taskLabel(task: GanttTask): string {\n /* React narrowed a `ReactNode` label to a string before using it as a name; a numeric\n label falls back to the id here for the same reason. */\n return `${typeof task.label === 'string' ? task.label : task.id}: ${task.start.toLocaleString()} – ${task.end.toLocaleString()}`;\n}\n\ninterface DependencyArrow {\n key: number;\n path: string;\n points: string;\n}\n\nconst dependencyArrows = computed<Array<DependencyArrow>>(() => {\n const arrows: Array<DependencyArrow> = [];\n props.dependencies.forEach((dep, i) => {\n const fromIdx = taskIndex.value.get(dep.from);\n const toIdx = taskIndex.value.get(dep.to);\n if (fromIdx === undefined || toIdx === undefined) return;\n const fromTask = props.tasks[fromIdx]!;\n const toTask = props.tasks[toIdx]!;\n const fromX = (daysBetween(rangeFrom.value, fromTask.end) + 1) * props.cellWidth;\n const fromY = fromIdx * props.rowHeight + props.rowHeight / 2;\n const toX = daysBetween(rangeFrom.value, toTask.start) * props.cellWidth;\n const toY = toIdx * props.rowHeight + props.rowHeight / 2;\n const midX = Math.max(fromX + 8, (fromX + toX) / 2);\n arrows.push({\n key: i,\n path: `M ${fromX} ${fromY} L ${midX} ${fromY} L ${midX} ${toY} L ${toX - 4} ${toY}`,\n points: `${toX - 4},${toY - 3} ${toX - 4},${toY + 3} ${toX},${toY}`,\n });\n });\n return arrows;\n});\n\nfunction milestonePoints(m: GanttMilestone): string {\n const x = daysBetween(rangeFrom.value, m.date) * props.cellWidth + props.cellWidth / 2;\n return `${x},2 ${x + 6},10 ${x},18 ${x - 6},10`;\n}\n\nconst todayX = computed(\n () => todayOffset.value * props.cellWidth + props.cellWidth / 2,\n);\nconst todayY2 = computed(() => props.tasks.length * props.rowHeight);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'overflow-auto rounded-md border border-border bg-card text-sm shadow-sm',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div\n ref=\"root\"\n role=\"grid\"\n aria-label=\"Gantt chart\"\n :class=\"rootClass\"\n v-bind=\"passthroughAttrs\"\n >\n <div class=\"flex\">\n <!-- Label column -->\n <div class=\"shrink-0 border-r border-border bg-muted/30\" :style=\"labelColumnStyle\">\n <div\n class=\"border-b border-border px-3 py-2 text-xs font-medium text-muted-foreground\"\n :style=\"rowStyle\"\n >\n Task\n </div>\n <div\n v-for=\"task in tasks\"\n :key=\"task.id\"\n class=\"flex items-center border-b border-border px-3 text-xs last:border-b-0\"\n :style=\"rowStyle\"\n >\n <span class=\"truncate font-medium\">\n <slot name=\"task\" :task=\"task\">{{ task.label }}</slot>\n </span>\n </div>\n </div>\n <!-- Timeline -->\n <div class=\"relative flex-1 overflow-x-auto\" style=\"min-width: 0\">\n <div :style=\"timelineStyle\">\n <!-- Header -->\n <div class=\"flex border-b border-border\" :style=\"rowStyle\">\n <div\n v-for=\"(d, i) in headerDates\"\n :key=\"i\"\n :class=\"headerCellClass(d)\"\n :style=\"cellStyle\"\n >\n <div\n v-if=\"d.day === 1\"\n class=\"border-b border-border bg-muted px-1 py-0.5 text-center font-medium text-muted-foreground\"\n >\n {{ monthLabel(d) }}\n </div>\n <div class=\"px-1 py-0.5 text-center text-muted-foreground\">{{ d.day }}</div>\n </div>\n </div>\n <!-- Rows -->\n <div\n v-for=\"task in tasks\"\n :key=\"task.id\"\n class=\"relative border-b border-border last:border-b-0\"\n :style=\"rowStyle\"\n >\n <!-- Vertical day gridlines + weekend shading -->\n <div class=\"absolute inset-0 flex pointer-events-none\">\n <div\n v-for=\"(d, i) in headerDates\"\n :key=\"i\"\n :style=\"cellStyle\"\n :class=\"gridlineClass(d)\"\n />\n </div>\n <!-- Bar -->\n <button\n type=\"button\"\n :aria-label=\"taskLabel(task)\"\n :style=\"barStyle(task)\"\n :class=\"barClass(task)\"\n @click=\"emit('task-click', task)\"\n >\n <!-- Progress fill -->\n <div\n v-if=\"(task.progress ?? 0) > 0\"\n aria-hidden=\"true\"\n class=\"absolute inset-y-0 left-0 bg-foreground/20\"\n :style=\"progressStyle(task)\"\n />\n <span class=\"relative inline-flex h-full items-center truncate\">\n <slot name=\"task\" :task=\"task\">{{ task.label }}</slot>\n </span>\n </button>\n </div>\n </div>\n <!-- Dependency arrows + today line -->\n <svg class=\"pointer-events-none absolute\" :style=\"overlayStyle\">\n <g v-for=\"arrow in dependencyArrows\" :key=\"arrow.key\">\n <path\n :d=\"arrow.path\"\n fill=\"none\"\n stroke=\"currentColor\"\n :stroke-width=\"1\"\n class=\"text-border-strong\"\n />\n <polygon :points=\"arrow.points\" class=\"fill-border-strong\" />\n </g>\n <g v-for=\"m in milestones\" :key=\"m.id\">\n <polygon\n :points=\"milestonePoints(m)\"\n class=\"fill-warning stroke-warning-foreground\"\n :stroke-width=\"1\"\n />\n </g>\n <line\n v-if=\"todayInRange\"\n :x1=\"todayX\"\n :x2=\"todayX\"\n :y1=\"0\"\n :y2=\"todayY2\"\n class=\"stroke-primary\"\n :stroke-width=\"1.5\"\n stroke-dasharray=\"4 3\"\n />\n </svg>\n </div>\n </div>\n </div>\n</template>\n","/**\n * Shared vocabulary for the EventCalendar folder.\n *\n * React kept these next to the component in `EventCalendar.tsx`, where the private\n * `MonthView` / `TimeGridView` / `AgendaView` closed over them. Here each view is its\n * own SFC, so the enum, the event shape and the two date helpers live in a sibling\n * module all four files import — the same split `dataGrid/` uses for `DataGridTypes.ts`.\n * `startOfWeek` / `startOfCellInstant` stay out of the folder barrel, exactly as they\n * were module-private in React.\n */\nimport type { Temporal } from 'temporal-polyfill';\nimport { zonedAtHour } from '../../forms/DateExtensions';\n\n/** Defines the EventCalendar visible range mode. */\nexport const EventCalendarView = {\n /** Refers to the month grid. */\n Month: 'month',\n /** Refers to the week columns. */\n Week: 'week',\n /** Refers to the single-day view. */\n Day: 'day',\n /** Refers to the chronological agenda list. */\n Agenda: 'agenda',\n} as const;\n\nexport type EventCalendarView = (typeof EventCalendarView)[keyof typeof EventCalendarView];\n\nexport interface EventCalendarEvent {\n id: string;\n /** The event title. React took a `ReactNode`; it is narrowed to a scalar for the port. */\n title?: string | number;\n start: Temporal.ZonedDateTime;\n end: Temporal.ZonedDateTime;\n color?: string;\n isAllDay?: boolean;\n}\n\n/** First visible day of the week that contains `d`, honoring `weekStart`. */\nexport function startOfWeek(d: Temporal.PlainDate, weekStart: 0 | 1): Temporal.PlainDate {\n // Temporal `dayOfWeek`: 1 (Mon) … 7 (Sun). Map to a Sunday=0 index, then shift.\n const sundayIdx = d.dayOfWeek % 7;\n const diff = (sundayIdx - weekStart + 7) % 7;\n return d.subtract({ days: diff });\n}\n\n/** Midnight instant for a calendar day in `timeZone` — the range-anchor for all-day/multi-day spans. */\nexport function startOfCellInstant(\n day: Temporal.PlainDate,\n timeZone: string,\n): Temporal.ZonedDateTime {\n return zonedAtHour(day, 0, timeZone);\n}\n\n/** The order the header's view switcher renders its radios in. */\nexport const EVENT_CALENDAR_VIEWS: ReadonlyArray<EventCalendarView> = [\n EventCalendarView.Month,\n EventCalendarView.Week,\n EventCalendarView.Day,\n EventCalendarView.Agenda,\n];\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { EventCalendarEvent } from './EventCalendarTypes';\n\nexport interface MonthViewProps {\n focusDay: Temporal.PlainDate;\n timeZone: string;\n events: ReadonlyArray<EventCalendarEvent>;\n weekStart: 0 | 1;\n}\n\ninterface MonthCell {\n day: Temporal.PlainDate;\n outOfMonth: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, type StyleValue } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { WEEKDAYS_SHORT, formatZonedTime, isToday, isZonedDayInRange } from '../../forms/DateExtensions';\nimport { startOfCellInstant, startOfWeek } from './EventCalendarTypes';\n\n/* The month grid of an `EventCalendar`. Internal — never exported from the folder. */\ndefineOptions({ name: 'MonthView' });\n\nconst props = defineProps<MonthViewProps>();\n\nconst emit = defineEmits<{\n /** Fires when an event block is clicked. */\n 'event-click': [event: EventCalendarEvent];\n /** Fires when an empty day cell's date button is clicked. */\n 'slot-click': [day: Temporal.PlainDate, hour?: number];\n}>();\n\n/** Reorder weekdays per weekStart. */\nconst weekdayHeaders = computed(() =>\n Array.from({ length: 7 }, (_, i) => WEEKDAYS_SHORT[(i + props.weekStart) % 7]!),\n);\n\n/* Build a 42-cell grid whose first column matches weekStart so dates land\n under the right headers (buildMonthGrid is Sunday-anchored, so build here). */\nconst cells = computed<Array<MonthCell>>(() => {\n const month = props.focusDay.month;\n const first = props.focusDay.with({ day: 1 });\n const gridStart = startOfWeek(first, props.weekStart);\n return Array.from({ length: 42 }, (_, i) => {\n const day = gridStart.add({ days: i });\n return { day, outOfMonth: day.month !== month };\n });\n});\n\nfunction eventsForDay(day: Temporal.PlainDate): Array<EventCalendarEvent> {\n return props.events.filter((e) =>\n isZonedDayInRange(startOfCellInstant(day, props.timeZone), e.start, e.end),\n );\n}\n\nfunction cellClass(cell: MonthCell): string {\n return cn(\n 'flex flex-col border-b border-r border-border p-1 text-xs',\n cell.outOfMonth && 'bg-muted/20',\n isToday(cell.day) && 'bg-primary-soft/20',\n );\n}\n\nfunction dateButtonClass(cell: MonthCell): string {\n return cn(\n 'mb-1 self-start rounded-sm px-1 text-xs tabular-nums transition-colors',\n cell.outOfMonth ? 'text-muted-foreground' : 'text-foreground',\n isToday(cell.day) && 'bg-primary text-primary-foreground',\n 'hover:bg-muted',\n );\n}\n\nfunction eventClass(e: EventCalendarEvent): string {\n return cn(\n 'truncate rounded-sm px-1.5 py-0.5 text-left text-[11px] font-medium transition-colors hover:brightness-95',\n !e.color && 'bg-primary-soft text-primary-soft-foreground',\n );\n}\n\nfunction eventStyle(e: EventCalendarEvent): StyleValue {\n return { background: e.color };\n}\n\nfunction eventLabel(e: EventCalendarEvent): string {\n /* React narrowed a `ReactNode` title to a string before using it as a name; a numeric\n title falls back to the id here for the same reason. */\n return `${typeof e.title === 'string' ? e.title : e.id} at ${formatZonedTime(e.start)}`;\n}\n\nfunction onEvent(ev: MouseEvent, e: EventCalendarEvent): void {\n ev.stopPropagation();\n emit('event-click', e);\n}\n\n/* Numeric CSS lengths are spelled with their unit — React's style object auto-appended `px`,\n Vue's does not, so a bare `96` would be dropped as an invalid declaration. */\nconst CELL_STYLE: StyleValue = { minHeight: '96px' };\n</script>\n\n<template>\n <div class=\"grid h-full grid-cols-7 border-l border-t border-border\">\n <div\n v-for=\"wd in weekdayHeaders\"\n :key=\"wd\"\n class=\"border-b border-r border-border bg-muted/40 px-2 py-1 text-xs font-medium uppercase text-muted-foreground\"\n >\n {{ wd }}\n </div>\n <div v-for=\"(cell, i) in cells\" :key=\"i\" :class=\"cellClass(cell)\" :style=\"CELL_STYLE\">\n <button type=\"button\" :class=\"dateButtonClass(cell)\" @click=\"emit('slot-click', cell.day)\">\n {{ cell.day.day }}\n </button>\n <div class=\"flex flex-col gap-0.5\">\n <button\n v-for=\"e in eventsForDay(cell.day).slice(0, 3)\"\n :key=\"e.id\"\n type=\"button\"\n :style=\"eventStyle(e)\"\n :class=\"eventClass(e)\"\n :aria-label=\"eventLabel(e)\"\n @click=\"onEvent($event, e)\"\n >\n {{ e.isAllDay ? '• ' : '' }}{{ e.title ?? '(no title)' }}\n </button>\n <span\n v-if=\"eventsForDay(cell.day).length > 3\"\n class=\"px-1 text-[10px] text-muted-foreground\"\n >+{{ eventsForDay(cell.day).length - 3 }} more</span\n >\n </div>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { EventCalendarEvent } from './EventCalendarTypes';\n\nexport interface TimeGridViewProps {\n timeZone: string;\n events: ReadonlyArray<EventCalendarEvent>;\n days: number;\n firstDay: Temporal.PlainDate;\n hourRange: [number, number];\n}\n\n/** The fixed pixel height of one hour row. */\nconst HOUR_PX = 48;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, type StyleValue } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport {\n formatZonedTime,\n isToday,\n isZonedDayInRange,\n isZonedOnDay,\n maxZoned,\n minZoned,\n minutesBetween,\n nowZoned,\n zonedAtHour,\n} from '../../forms/DateExtensions';\nimport { startOfCellInstant } from './EventCalendarTypes';\n\n/* The week / day time grid of an `EventCalendar`. Internal — never exported. */\ndefineOptions({ name: 'TimeGridView' });\n\nconst props = defineProps<TimeGridViewProps>();\n\nconst emit = defineEmits<{\n /** Fires when an event block is clicked. */\n 'event-click': [event: EventCalendarEvent];\n /** Fires when an empty hour cell is clicked. */\n 'slot-click': [day: Temporal.PlainDate, hour?: number];\n}>();\n\nconst startHour = computed(() => props.hourRange[0]);\nconst endHour = computed(() => props.hourRange[1]);\nconst visibleHours = computed(() => endHour.value - startHour.value);\n\nconst dayDates = computed(() =>\n Array.from({ length: props.days }, (_, i) => props.firstDay.add({ days: i })),\n);\n\nfunction eventsForDay(day: Temporal.PlainDate): Array<EventCalendarEvent> {\n return props.events.filter((e) => !e.isAllDay && isZonedOnDay(e.start, day));\n}\n\nfunction allDayForDay(day: Temporal.PlainDate): Array<EventCalendarEvent> {\n return props.events.filter(\n (e) =>\n e.isAllDay && isZonedDayInRange(startOfCellInstant(day, props.timeZone), e.start, e.end),\n );\n}\n\n/* Numeric CSS lengths are spelled with their unit — React's style object auto-appended `px`,\n Vue's does not, so a bare `48` would be dropped as an invalid declaration. */\nconst HOUR_STYLE: StyleValue = { height: `${HOUR_PX}px` };\n\nconst gridColumns = computed<StyleValue>(() => ({\n gridTemplateColumns: `repeat(${props.days}, minmax(120px, 1fr))`,\n}));\n\nconst columnStyle = computed<StyleValue>(() => ({\n height: `${visibleHours.value * HOUR_PX}px`,\n}));\n\nfunction hourLabel(index: number): string {\n return `${String((startHour.value + index) % 24).padStart(2, '0')}:00`;\n}\n\nfunction dayHeaderClass(d: Temporal.PlainDate): string {\n return cn(\n 'h-6 border-b border-r border-border bg-muted/40 px-2 text-xs font-medium',\n isToday(d) && 'bg-primary-soft/30',\n );\n}\n\nfunction dayHeaderLabel(d: Temporal.PlainDate): string {\n return d.toLocaleString(undefined, { weekday: 'short', day: 'numeric' });\n}\n\nfunction allDayClass(e: EventCalendarEvent): string {\n return cn(\n 'truncate rounded-sm px-1 py-0.5',\n !e.color && 'bg-primary-soft text-primary-soft-foreground',\n );\n}\n\nfunction eventStyle(e: EventCalendarEvent, d: Temporal.PlainDate): StyleValue {\n const dayStart = zonedAtHour(d, startHour.value, props.timeZone);\n const dayEnd = zonedAtHour(d, endHour.value, props.timeZone);\n const start = maxZoned(e.start, dayStart);\n const end = minZoned(e.end, dayEnd);\n const topMin = minutesBetween(dayStart, start);\n const durMin = Math.max(15, minutesBetween(start, end));\n return {\n top: `${(topMin / 60) * HOUR_PX}px`,\n height: `${(durMin / 60) * HOUR_PX}px`,\n left: '2px',\n right: '2px',\n background: e.color,\n };\n}\n\nfunction eventClass(e: EventCalendarEvent): string {\n return cn(\n 'absolute overflow-hidden rounded-sm border border-border/60 px-1 py-0.5 text-left text-[11px] font-medium transition-colors hover:brightness-95',\n !e.color && 'bg-primary text-primary-foreground',\n );\n}\n\nfunction eventStartLabel(e: EventCalendarEvent, d: Temporal.PlainDate): string {\n const dayStart = zonedAtHour(d, startHour.value, props.timeZone);\n return formatZonedTime(maxZoned(e.start, dayStart));\n}\n\n/* Read on every render, exactly as React's per-render `nowZoned()` was — a `computed` would\n cache the instant for the component's lifetime. `Temporal.Now` is universal, not a browser\n global, so this is SSR-safe. */\nfunction todayLineTop(d: Temporal.PlainDate): string | undefined {\n if (!isToday(d)) return undefined;\n const dayStart = zonedAtHour(d, startHour.value, props.timeZone);\n const minutes = minutesBetween(dayStart, nowZoned());\n if (minutes < 0 || minutes > visibleHours.value * 60) return undefined;\n return `${(minutes / 60) * HOUR_PX}px`;\n}\n\nfunction onEvent(ev: MouseEvent, e: EventCalendarEvent): void {\n ev.stopPropagation();\n emit('event-click', e);\n}\n</script>\n\n<template>\n <div class=\"flex\">\n <!-- Hour gutter -->\n <div class=\"w-14 shrink-0 border-r border-border\">\n <div class=\"h-6 border-b border-border bg-muted/40\" />\n <div class=\"h-7 border-b border-border bg-muted/20\" />\n <div\n v-for=\"i in visibleHours\"\n :key=\"i\"\n class=\"border-b border-border bg-muted/10 px-1 text-[10px] tabular-nums text-muted-foreground\"\n :style=\"HOUR_STYLE\"\n >\n {{ hourLabel(i - 1) }}\n </div>\n </div>\n <div class=\"flex-1 overflow-x-auto\">\n <div class=\"grid\" :style=\"gridColumns\">\n <!-- Day headers -->\n <div v-for=\"(d, i) in dayDates\" :key=\"`h-${i}`\" :class=\"dayHeaderClass(d)\">\n {{ dayHeaderLabel(d) }}\n </div>\n <!-- All-day row -->\n <div\n v-for=\"(d, i) in dayDates\"\n :key=\"`ad-${i}`\"\n class=\"h-7 border-b border-r border-border bg-muted/10 p-0.5 text-[11px]\"\n >\n <div class=\"flex flex-wrap gap-0.5\">\n <button\n v-for=\"e in allDayForDay(d)\"\n :key=\"e.id\"\n type=\"button\"\n :style=\"{ background: e.color }\"\n :class=\"allDayClass(e)\"\n @click=\"onEvent($event, e)\"\n >\n {{ e.title ?? '(no title)' }}\n </button>\n </div>\n </div>\n <!-- Time grid columns -->\n <div\n v-for=\"(d, di) in dayDates\"\n :key=\"`g-${di}`\"\n class=\"relative border-r border-border\"\n :style=\"columnStyle\"\n >\n <!-- Hour grid lines -->\n <div\n v-for=\"i in visibleHours\"\n :key=\"i\"\n class=\"border-b border-border/60\"\n :style=\"HOUR_STYLE\"\n @click=\"emit('slot-click', d, startHour + i - 1)\"\n />\n <!-- Today line -->\n <div\n v-if=\"todayLineTop(d)\"\n aria-hidden=\"true\"\n class=\"absolute inset-x-0 z-raised border-t border-primary\"\n :style=\"{ top: todayLineTop(d) }\"\n />\n <!-- Events -->\n <button\n v-for=\"e in eventsForDay(d)\"\n :key=\"e.id\"\n type=\"button\"\n :style=\"eventStyle(e, d)\"\n :class=\"eventClass(e)\"\n @click=\"onEvent($event, e)\"\n >\n <div class=\"truncate\">{{ e.title ?? '(no title)' }}</div>\n <div class=\"text-[10px] opacity-80 tabular-nums\">\n {{ eventStartLabel(e, d) }}\n </div>\n </button>\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { EventCalendarEvent } from './EventCalendarTypes';\n\nexport interface AgendaViewProps {\n focusDay: Temporal.PlainDate;\n events: ReadonlyArray<EventCalendarEvent>;\n}\n\ninterface AgendaGroup {\n key: string;\n day: Temporal.PlainDate;\n events: Array<EventCalendarEvent>;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, type StyleValue } from 'vue';\nimport { Temporal as TemporalValue } from 'temporal-polyfill';\nimport { cn } from '../../../foundation/utils';\nimport { formatZonedTime, isToday } from '../../forms/DateExtensions';\n\n/* The chronological agenda list of an `EventCalendar`. Internal — never exported. */\ndefineOptions({ name: 'AgendaView' });\n\nconst props = defineProps<AgendaViewProps>();\n\nconst emit = defineEmits<{\n /** Fires when an agenda row is clicked. */\n 'event-click': [event: EventCalendarEvent];\n}>();\n\nconst groups = computed<Array<AgendaGroup>>(() => {\n const horizon = props.focusDay.add({ days: 30 });\n const upcoming = props.events.filter((e) => {\n const startDay = e.start.toPlainDate();\n const endDay = e.end.toPlainDate();\n return (\n TemporalValue.PlainDate.compare(endDay, props.focusDay) >= 0 &&\n TemporalValue.PlainDate.compare(startDay, horizon) <= 0\n );\n });\n /* Group by calendar day of the event start. */\n const map = new Map<string, Array<EventCalendarEvent>>();\n for (const e of upcoming) {\n const key = e.start.toPlainDate().toString();\n const list = map.get(key);\n if (list) list.push(e);\n else map.set(key, [e]);\n }\n return Array.from(map.entries()).map(([key, list]) => ({\n key,\n day: list[0]!.start.toPlainDate(),\n events: list,\n }));\n});\n\nfunction groupHeadingClass(day: Temporal.PlainDate): string {\n return cn(\n 'mb-2 text-xs font-semibold uppercase text-muted-foreground',\n isToday(day) && 'text-primary',\n );\n}\n\nfunction groupLabel(day: Temporal.PlainDate): string {\n return day.toLocaleString(undefined, { weekday: 'long', month: 'short', day: 'numeric' });\n}\n\nfunction dotStyle(e: EventCalendarEvent): StyleValue {\n return { background: e.color || 'var(--color-primary)' };\n}\n\nfunction timeLabel(e: EventCalendarEvent): string {\n return e.isAllDay\n ? 'All day'\n : `${formatZonedTime(e.start)} – ${formatZonedTime(e.end)}`;\n}\n</script>\n\n<template>\n <div v-if=\"groups.length === 0\" class=\"p-6 text-center text-sm text-muted-foreground\">\n No upcoming events.\n </div>\n <ul v-else class=\"divide-y divide-border\">\n <li v-for=\"group in groups\" :key=\"group.key\" class=\"px-4 py-3\">\n <div :class=\"groupHeadingClass(group.day)\">{{ groupLabel(group.day) }}</div>\n <ul class=\"space-y-1\">\n <li v-for=\"e in group.events\" :key=\"e.id\">\n <button\n type=\"button\"\n class=\"flex w-full items-start gap-3 rounded-md p-2 text-left transition-colors hover:bg-muted\"\n @click=\"emit('event-click', e)\"\n >\n <span\n aria-hidden=\"true\"\n class=\"mt-1 h-2 w-2 shrink-0 rounded-full\"\n :style=\"dotStyle(e)\"\n />\n <span class=\"flex-1\">\n <span class=\"block text-sm font-medium\">{{ e.title ?? '(no title)' }}</span>\n <span class=\"block text-xs text-muted-foreground tabular-nums\">\n {{ timeLabel(e) }}\n </span>\n </span>\n </button>\n </li>\n </ul>\n </li>\n </ul>\n</template>\n","<script lang=\"ts\">\nimport type { Temporal } from 'temporal-polyfill';\nimport type { EventCalendarEvent, EventCalendarView } from './EventCalendarTypes';\n\n// EventCalendar models events as absolute instants (a wall-clock time in a\n// specific zone) — `Temporal.ZonedDateTime`, the peer of .NET `DateTimeOffset`.\n// The month/week grid + navigation project down to `Temporal.PlainDate`; the\n// intra-day time-slot geometry does its math on `ZonedDateTime` (`.hour`,\n// `.add`, `until`). Both come from the shared, Temporal-based `DateExtensions`.\n\nexport interface EventCalendarProps {\n events: ReadonlyArray<EventCalendarEvent>;\n\n /** The visible range mode, controlled. The `v-model:view` binding target. */\n view?: EventCalendarView;\n\n /** The initial view when uncontrolled. */\n defaultView?: EventCalendarView;\n\n /**\n * The focused instant, controlled; its calendar day drives the visible month/week/day.\n * The `v-model:date` binding target.\n */\n date?: Temporal.ZonedDateTime;\n\n /** The initial focused instant when uncontrolled. Defaults to now. */\n defaultDate?: Temporal.ZonedDateTime;\n\n weekStart?: 0 | 1;\n hourRange?: [number, number];\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport type { ClassValue } from 'clsx';\nimport { Temporal as TemporalValue } from 'temporal-polyfill';\nimport { ChevronLeft, ChevronRight } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { useControlled } from '../../../foundation/hooks';\nimport { Icon } from '../../../foundation/icons';\nimport { MONTHS_LONG, addDays, nowZoned } from '../../forms/DateExtensions';\nimport {\n EVENT_CALENDAR_VIEWS,\n EventCalendarView as EventCalendarViewValue,\n startOfWeek,\n} from './EventCalendarTypes';\nimport MonthView from './MonthView.vue';\nimport TimeGridView from './TimeGridView.vue';\nimport AgendaView from './AgendaView.vue';\n\n/**\n * First-generation EventCalendar — month / week / day / agenda views.\n * Header: Today / Prev / Next / Title + view switcher. Events as colored\n * blocks. Drag-edit, recurrence, \"+N more\" overflow deferred.\n */\n/* `inheritAttrs: false` so `class` folds into the component's own `cn()` call — plain fallthrough\n appends outside it and loses tailwind-merge conflict resolution. */\ndefineOptions({ name: 'EventCalendar', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<EventCalendarProps>(), {\n /* `events` stays declared-required — Vue still warns when it is missing — but a\n default keeps an absent (or transiently-undefined) value out of the `[...spread]`\n below, which threw `props.events is not iterable` and took the whole page down. */\n events: () => [],\n defaultView: EventCalendarViewValue.Month,\n weekStart: 0,\n hourRange: () => [0, 24],\n});\n\nconst emit = defineEmits<{\n /** The `v-model:view` half. */\n 'update:view': [view: EventCalendarView];\n /** Replaces React's `onViewChange`. */\n 'view-change': [view: EventCalendarView];\n /** The `v-model:date` half. */\n 'update:date': [date: Temporal.ZonedDateTime];\n /** Replaces React's `onDateChange`. */\n 'date-change': [date: Temporal.ZonedDateTime];\n /** Replaces React's `onEventClick`. */\n 'event-click': [event: EventCalendarEvent];\n /** Replaces React's `onSlotClick`. `day` is the calendar day, `hour` the grid hour (time views). */\n 'slot-click': [day: Temporal.PlainDate, hour?: number];\n}>();\n\nconst attrs = useAttrs();\n\nconst viewControlled = useControlled<EventCalendarView>({\n controlled: () => props.view,\n default: () => props.defaultView,\n onChange: (next) => {\n emit('update:view', next);\n emit('view-change', next);\n },\n});\n\n/* `nowZoned()` reads the host time zone through `Temporal.Now` — universal, not a browser\n global, so it is safe as the uncontrolled seed on the server. */\nconst dateControlled = useControlled<Temporal.ZonedDateTime>({\n controlled: () => props.date,\n default: () => props.defaultDate ?? nowZoned(),\n onChange: (next) => {\n emit('update:date', next);\n emit('date-change', next);\n },\n});\n\n/* Named apart from the `view` / `date` props: a setup const sharing a prop name shadows it\n in the template and trips `vue/no-dupe-keys`. */\nconst currentView = viewControlled.value;\nconst currentDate = dateControlled.value;\n\n/** Calendar day the view is anchored on, in the focus instant's own zone. */\nconst focusDay = computed(() => currentDate.value.toPlainDate());\n\nconst timeZone = computed(() => currentDate.value.timeZoneId);\n\nconst sortedEvents = computed(() =>\n [...props.events].sort((a, b) => TemporalValue.ZonedDateTime.compare(a.start, b.start)),\n);\n\nfunction goPrev(): void {\n switch (currentView.value) {\n case EventCalendarViewValue.Month:\n dateControlled.setValue(currentDate.value.add({ months: -1 }));\n break;\n case EventCalendarViewValue.Week:\n dateControlled.setValue(currentDate.value.add({ days: -7 }));\n break;\n case EventCalendarViewValue.Day:\n case EventCalendarViewValue.Agenda:\n dateControlled.setValue(currentDate.value.add({ days: -1 }));\n break;\n }\n}\n\nfunction goNext(): void {\n switch (currentView.value) {\n case EventCalendarViewValue.Month:\n dateControlled.setValue(currentDate.value.add({ months: 1 }));\n break;\n case EventCalendarViewValue.Week:\n dateControlled.setValue(currentDate.value.add({ days: 7 }));\n break;\n case EventCalendarViewValue.Day:\n case EventCalendarViewValue.Agenda:\n dateControlled.setValue(currentDate.value.add({ days: 1 }));\n break;\n }\n}\n\nfunction goToday(): void {\n dateControlled.setValue(nowZoned());\n}\n\nfunction setView(next: EventCalendarView): void {\n viewControlled.setValue(next);\n}\n\nconst title = computed(() => {\n const day = focusDay.value;\n switch (currentView.value) {\n case EventCalendarViewValue.Month:\n return `${MONTHS_LONG[day.month - 1]} ${day.year}`;\n case EventCalendarViewValue.Week: {\n const ws = startOfWeek(day, props.weekStart);\n const we = addDays(ws, 6);\n return `${ws.toLocaleString(undefined, { month: 'short', day: 'numeric' })} – ${we.toLocaleString(undefined, { month: 'short', day: 'numeric', year: 'numeric' })}`;\n }\n case EventCalendarViewValue.Day:\n return day.toLocaleString(undefined, {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n });\n case EventCalendarViewValue.Agenda:\n return `Upcoming from ${day.toLocaleString(undefined, { month: 'short', day: 'numeric' })}`;\n }\n return '';\n});\n\nconst weekFirstDay = computed(() => startOfWeek(focusDay.value, props.weekStart));\n\nfunction viewButtonClass(v: EventCalendarView): string {\n return cn(\n 'inline-flex h-6 items-center rounded px-2 text-xs font-medium transition-colors',\n currentView.value === v\n ? 'bg-primary text-primary-foreground'\n : 'text-muted-foreground hover:text-foreground',\n );\n}\n\nconst isMonth = computed(() => currentView.value === EventCalendarViewValue.Month);\nconst isWeek = computed(() => currentView.value === EventCalendarViewValue.Week);\nconst isDay = computed(() => currentView.value === EventCalendarViewValue.Day);\nconst isAgenda = computed(() => currentView.value === EventCalendarViewValue.Agenda);\n\nconst OWNED_ATTRS: ReadonlySet<string> = new Set(['class']);\nconst passthroughAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !OWNED_ATTRS.has(key))),\n);\n\nconst rootClass = computed(() =>\n cn(\n 'flex flex-col overflow-hidden rounded-md border border-border bg-card text-sm shadow-sm',\n attrs.class as ClassValue,\n ),\n);\n\nconst root = useTemplateRef<HTMLDivElement>('root');\n\n/** The rendered element — the Vue stand-in for the React original's forwarded ref. */\ndefineExpose({ el: root });\n</script>\n\n<template>\n <div ref=\"root\" :class=\"rootClass\" v-bind=\"passthroughAttrs\">\n <!-- Header -->\n <div class=\"flex items-center gap-2 border-b border-border bg-muted/30 px-3 py-2\">\n <button\n type=\"button\"\n class=\"inline-flex h-7 items-center rounded-md border border-border bg-background px-2.5 text-xs font-medium hover:bg-muted\"\n @click=\"goToday\"\n >\n Today\n </button>\n <button\n type=\"button\"\n aria-label=\"Previous\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted\"\n @click=\"goPrev\"\n >\n <Icon :icon=\"ChevronLeft\" :size=\"14\" />\n </button>\n <button\n type=\"button\"\n aria-label=\"Next\"\n class=\"inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted\"\n @click=\"goNext\"\n >\n <Icon :icon=\"ChevronRight\" :size=\"14\" />\n </button>\n <h3 class=\"ml-1 text-base font-semibold\">{{ title }}</h3>\n <div\n role=\"radiogroup\"\n aria-label=\"View\"\n class=\"ml-auto flex items-center gap-0.5 rounded-md bg-card p-0.5 ring-1 ring-border\"\n >\n <button\n v-for=\"v in EVENT_CALENDAR_VIEWS\"\n :key=\"v\"\n type=\"button\"\n role=\"radio\"\n :aria-checked=\"currentView === v\"\n :class=\"viewButtonClass(v)\"\n @click=\"setView(v)\"\n >\n {{ v }}\n </button>\n </div>\n </div>\n <!-- Body -->\n <div class=\"flex-1 overflow-auto\" style=\"min-height: 0\">\n <MonthView\n v-if=\"isMonth\"\n :focus-day=\"focusDay\"\n :time-zone=\"timeZone\"\n :events=\"sortedEvents\"\n :week-start=\"weekStart\"\n @event-click=\"emit('event-click', $event)\"\n @slot-click=\"(day, hour) => emit('slot-click', day, hour)\"\n />\n <TimeGridView\n v-else-if=\"isWeek\"\n :time-zone=\"timeZone\"\n :events=\"sortedEvents\"\n :days=\"7\"\n :first-day=\"weekFirstDay\"\n :hour-range=\"hourRange\"\n @event-click=\"emit('event-click', $event)\"\n @slot-click=\"(day, hour) => emit('slot-click', day, hour)\"\n />\n <TimeGridView\n v-else-if=\"isDay\"\n :time-zone=\"timeZone\"\n :events=\"sortedEvents\"\n :days=\"1\"\n :first-day=\"focusDay\"\n :hour-range=\"hourRange\"\n @event-click=\"emit('event-click', $event)\"\n @slot-click=\"(day, hour) => emit('slot-click', day, hour)\"\n />\n <AgendaView\n v-else-if=\"isAgenda\"\n :focus-day=\"focusDay\"\n :events=\"sortedEvents\"\n @event-click=\"emit('event-click', $event)\"\n />\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { ElementTag } from '../../../foundation/utils';\n\n/** Defines the gradient sweep direction (compass shorthand). */\nexport const GradientTextDirection = {\n /** Refers to a left-to-right sweep. */\n Right: 'r',\n /** Refers to a right-to-left sweep. */\n Left: 'l',\n /** Refers to a bottom-to-top sweep. */\n Top: 't',\n /** Refers to a top-to-bottom sweep. */\n Bottom: 'b',\n /** Refers to a bottom-left-to-top-right sweep. */\n TopRight: 'tr',\n /** Refers to a top-left-to-bottom-right sweep. */\n BottomRight: 'br',\n /** Refers to a top-right-to-bottom-left sweep. */\n TopLeft: 'tl',\n /** Refers to a bottom-right-to-top-left sweep. */\n BottomLeft: 'bl',\n} as const;\n\nexport type GradientTextDirection =\n (typeof GradientTextDirection)[keyof typeof GradientTextDirection];\n\nexport interface GradientTextProps {\n /** The first color stop. Default `var(--color-primary)`. */\n from?: string;\n\n /** The optional middle color stop. */\n via?: string;\n\n /** The last color stop. Default `var(--color-accent, var(--color-primary))`. */\n to?: string;\n\n /** The sweep direction. Default `r`. */\n direction?: GradientTextDirection;\n\n /** The gradient-pan animation, skipped under `prefers-reduced-motion`. */\n isAnimated?: boolean;\n\n /** The rendered tag. Default `span`. */\n as?: ElementTag;\n}\n\nconst DIR_TO_DEG: Record<GradientTextDirection, number> = {\n r: 90,\n l: 270,\n t: 0,\n b: 180,\n tr: 45,\n br: 135,\n bl: 225,\n tl: 315,\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, normalizeStyle, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Decorative gradient-filled text via `background-clip: text`. Optional\n * `isAnimated` pans the gradient on a 4s loop (skipped under\n * `prefers-reduced-motion` via the global `motion-reduce:` CSS guard).\n */\ndefineOptions({ name: 'GradientText', inheritAttrs: false });\n\n/** The gradient-filled copy — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<GradientTextProps>(), {\n from: 'var(--color-primary)',\n via: undefined,\n to: 'var(--color-accent, var(--color-primary))',\n direction: 'r',\n isAnimated: undefined,\n as: 'span',\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n\nconst stops = computed(() =>\n props.via ? `${props.from}, ${props.via}, ${props.to}` : `${props.from}, ${props.to}`,\n);\n\nconst classes = computed(() =>\n cn(\n 'inline-block bg-clip-text text-transparent',\n props.isAnimated && 'motion-safe:animate-[gradient-shift_4s_ease-in-out_infinite]',\n attrs.class as string | undefined,\n ),\n);\n\n/** `normalizeStyle` merges left → right, so a caller's `style` lands last and wins — as React's `{ …, ...style }` did. */\nconst styles = computed(() =>\n normalizeStyle([\n {\n backgroundImage: `linear-gradient(${DIR_TO_DEG[props.direction]}deg, ${stops.value})`,\n backgroundSize: props.isAnimated ? '200% 100%' : undefined,\n },\n attrs.style,\n ]),\n);\n\n/** Everything but `class` / `style`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, style: _style, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component :is=\"props.as\" ref=\"el\" v-bind=\"rest\" :class=\"classes\" :style=\"styles\">\n <slot />\n </component>\n</template>\n","<script lang=\"ts\">\nimport type { ElementTag } from '../../../foundation/utils';\n\nexport interface CountUpProps {\n /** The target value. */\n to: number;\n\n /** The starting value. Default `0`. */\n from?: number;\n\n /** The tween length in ms. Default `1500`. */\n duration?: number;\n\n /** The easing applied to the tween's normalized time. Default `easeOutCubic`. */\n easing?: (t: number) => number;\n\n /** The value formatter. Rich content → the `value` slot. */\n format?: (value: number) => string;\n\n /** The start-when-scrolled-into-view mode. Default `false` (starts on mount). */\n canTriggerOnView?: boolean;\n\n /** The rendered tag. Default `span`. */\n as?: ElementTag;\n}\n\n/* Module scope, not `<script setup>`: `withDefaults` defaults are hoisted into the\n component options object outside `setup()`, so they cannot reference a setup local. */\nconst easeOutCubic = (t: number): number => 1 - Math.pow(1 - t, 3);\nconst defaultFormat = (v: number): string => v.toFixed(0);\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useReducedMotion } from '../../../foundation/hooks';\n\n/**\n * Number that animates up to `to` on mount (or on enter-viewport when\n * `canTriggerOnView`). rAF tween; respects `prefers-reduced-motion` (jumps\n * straight to `to`).\n */\ndefineOptions({ name: 'CountUp', inheritAttrs: false });\n\ndefineSlots<{\n /** The rich override for the formatted number — receives the live tween value. */\n value?(props: { value: number; display: string }): unknown;\n}>();\n\nconst props = withDefaults(defineProps<CountUpProps>(), {\n from: 0,\n duration: 1500,\n easing: easeOutCubic,\n format: defaultFormat,\n canTriggerOnView: false,\n as: 'span',\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n/* Called before the lifecycle hooks below so its own `onMounted` subscription\n lands first and the flag is already settled when `run` fires. */\nconst reducedMotion = useReducedMotion();\n\nconst current = ref(props.canTriggerOnView ? props.from : props.to);\n\n/* React held both in `useRef`s — mutable non-render values, so plain `let`s. */\nlet started = false;\nlet cleanup: (() => void) | undefined;\n\nfunction animate(): () => void {\n const from = props.from;\n const to = props.to;\n const duration = props.duration;\n const easing = props.easing;\n const start = performance.now();\n let raf = 0;\n\n const tick = (now: number): void => {\n const t = Math.min(1, (now - start) / duration);\n current.value = from + (to - from) * easing(t);\n if (t < 1) raf = requestAnimationFrame(tick);\n };\n\n raf = requestAnimationFrame(tick);\n return () => cancelAnimationFrame(raf);\n}\n\n/*\n * React's `useEffect` on `[to, from, duration, easing, canTriggerOnView]`. Kicked\n * off from `onMounted` instead of an `immediate` watcher because the\n * IntersectionObserver branch needs the element, which only exists after mount.\n */\nfunction run(): void {\n cleanup?.();\n cleanup = undefined;\n\n if (reducedMotion.value) {\n current.value = props.to;\n return;\n }\n\n const node = el.value;\n if (props.canTriggerOnView && typeof IntersectionObserver !== 'undefined' && node) {\n let cancel: (() => void) | undefined;\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting && !started) {\n started = true;\n cancel = animate();\n }\n }\n },\n { threshold: 0.2 },\n );\n observer.observe(node);\n cleanup = () => {\n observer.disconnect();\n cancel?.();\n };\n return;\n }\n\n cleanup = animate();\n}\n\nonMounted(run);\n\nwatch(\n [\n () => props.to,\n () => props.from,\n () => props.duration,\n () => props.easing,\n () => props.canTriggerOnView,\n ],\n run,\n);\n\nonBeforeUnmount(() => cleanup?.());\n\nconst display = computed(() => props.format(current.value));\n\nconst classes = computed(() => cn('tabular-nums', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component :is=\"props.as\" ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <slot name=\"value\" :value=\"current\" :display=\"display\">{{ display }}</slot>\n </component>\n</template>\n","<script lang=\"ts\">\nimport type { ElementTag } from '../../../foundation/utils';\n\nexport interface AnimatedNumberProps {\n /** The target value — every change tweens the display from where it currently sits. */\n value: number;\n\n /** The tween length in ms. Default `500`. */\n duration?: number;\n\n /** The easing applied to the tween's normalized time. Default `easeOutCubic`. */\n easing?: (t: number) => number;\n\n /** The value formatter. Rich content → the `value` slot. */\n format?: (value: number) => string;\n\n /** The rendered tag. Default `span`. */\n as?: ElementTag;\n}\n\n/* Module scope, not `<script setup>`: `withDefaults` defaults are hoisted into the\n component options object outside `setup()`, so they cannot reference a setup local. */\nconst easeOutCubic = (t: number): number => 1 - Math.pow(1 - t, 3);\nconst defaultFormat = (v: number): string => v.toFixed(0);\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useReducedMotion } from '../../../foundation/hooks';\n\n/**\n * Animates the displayed number whenever `value` changes. rAF tween between\n * the previous and new value. Respects `prefers-reduced-motion`.\n */\ndefineOptions({ name: 'AnimatedNumber', inheritAttrs: false });\n\ndefineSlots<{\n /** The rich override for the formatted number — receives the live tween value. */\n value?(props: { value: number; display: string }): unknown;\n}>();\n\nconst props = withDefaults(defineProps<AnimatedNumberProps>(), {\n duration: 500,\n easing: easeOutCubic,\n format: defaultFormat,\n as: 'span',\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\nconst reducedMotion = useReducedMotion();\n\n/** The live tween value driving the render. */\nconst current = ref(props.value);\n\n/* React held this in a `useRef` — a mutable non-render value, so a plain `let`. */\nlet from = props.value;\n\n/*\n * React's `useEffect` on `[value, duration, easing]`. `reducedMotion` is read\n * inside the callback rather than watched, matching React's read-at-effect-time\n * (it was never a dependency there either). `immediate` covers the mount run,\n * which short-circuits because `from === to`.\n */\nwatch(\n [() => props.value, () => props.duration, () => props.easing],\n (_next, _previous, onCleanup) => {\n if (reducedMotion.value) {\n current.value = props.value;\n from = props.value;\n return;\n }\n const base = from;\n const to = props.value;\n if (base === to) return;\n\n const duration = props.duration;\n const easing = props.easing;\n const start = performance.now();\n let raf = 0;\n\n const tick = (now: number): void => {\n const t = Math.min(1, (now - start) / duration);\n const eased = easing(t);\n const next = t < 1 ? base + (to - base) * eased : to;\n current.value = next;\n // Track the displayed value so an interrupting tween starts from\n // where the display actually is, not the stale pre-animation base.\n from = next;\n if (t < 1) raf = requestAnimationFrame(tick);\n };\n\n raf = requestAnimationFrame(tick);\n onCleanup(() => cancelAnimationFrame(raf));\n },\n { immediate: true },\n);\n\nconst display = computed(() => props.format(current.value));\n\nconst classes = computed(() => cn('tabular-nums', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component :is=\"props.as\" ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <slot name=\"value\" :value=\"current\" :display=\"display\">{{ display }}</slot>\n </component>\n</template>\n","<script lang=\"ts\">\nimport type { ElementTag } from '../../../foundation/utils';\n\n/** Defines the ScrollReveal enter-viewport animation. */\nexport const ScrollRevealEffect = {\n /** Refers to a plain opacity fade. */\n Fade: 'fade',\n /** Refers to a fade + upward slide. */\n SlideUp: 'slide-up',\n /** Refers to a fade + downward slide. */\n SlideDown: 'slide-down',\n /** Refers to a fade + leftward slide. */\n SlideLeft: 'slide-left',\n /** Refers to a fade + rightward slide. */\n SlideRight: 'slide-right',\n /** Refers to a fade + scale-in zoom. */\n Zoom: 'zoom',\n} as const;\n\nexport type ScrollRevealEffect = (typeof ScrollRevealEffect)[keyof typeof ScrollRevealEffect];\n\nexport interface ScrollRevealProps {\n /** The enter animation. Default `fade`. */\n effect?: ScrollRevealEffect;\n\n /** The transition length in ms. Default `600`. */\n duration?: number;\n\n /** The transition delay in ms. Default `0`. */\n delay?: number;\n\n /** The IntersectionObserver visibility ratio that counts as revealed. Default `0.1`. */\n threshold?: number;\n\n /** The reveal-once flag — `false` re-hides when scrolled back out. Default `true`. */\n isOnce?: boolean;\n\n /** The rendered tag. Default `div`. */\n as?: ElementTag;\n}\n\nconst HIDDEN_TRANSFORMS: Record<ScrollRevealEffect, string> = {\n fade: '',\n 'slide-up': 'translateY(20px)',\n 'slide-down': 'translateY(-20px)',\n 'slide-left': 'translateX(20px)',\n 'slide-right': 'translateX(-20px)',\n zoom: 'scale(0.95)',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, normalizeStyle, onBeforeUnmount, onMounted, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useReducedMotion } from '../../../foundation/hooks';\n\n/**\n * Reveal children on enter-viewport. CSS-driven (opacity + transform);\n * IntersectionObserver toggles `data-revealed`. Honors\n * `prefers-reduced-motion` (no transform / opacity at all — content visible\n * from the start).\n */\ndefineOptions({ name: 'ScrollReveal', inheritAttrs: false });\n\n/** The revealed content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<ScrollRevealProps>(), {\n effect: 'fade',\n duration: 600,\n delay: 0,\n threshold: 0.1,\n isOnce: true,\n as: 'div',\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n/* Called before the lifecycle hooks below so its own `onMounted` subscription\n lands first and the flag is already settled when `observe` fires. */\nconst reducedMotion = useReducedMotion();\n\nconst revealed = ref(false);\n\n/*\n * React's `useEffect` on `[reduced, threshold, isOnce]`. Kicked off from\n * `onMounted` rather than an `immediate` watcher because the observer needs the\n * element, which only exists after mount.\n */\nlet observer: IntersectionObserver | undefined;\n\nfunction disconnect(): void {\n observer?.disconnect();\n observer = undefined;\n}\n\nfunction observe(): void {\n disconnect();\n\n if (reducedMotion.value) {\n revealed.value = true;\n return;\n }\n\n const node = el.value;\n if (!node || typeof IntersectionObserver === 'undefined') {\n revealed.value = true;\n return;\n }\n\n observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n revealed.value = true;\n if (props.isOnce) disconnect();\n } else if (!props.isOnce) {\n revealed.value = false;\n }\n }\n },\n { threshold: props.threshold },\n );\n observer.observe(node);\n}\n\nonMounted(observe);\n\nwatch([reducedMotion, () => props.threshold, () => props.isOnce], observe);\n\nonBeforeUnmount(disconnect);\n\nconst classes = computed(() => cn(attrs.class as string | undefined));\n\n/** `normalizeStyle` merges left → right, so a caller's `style` lands last and wins — as React's `{ …, ...style }` did. */\nconst styles = computed(() =>\n normalizeStyle([\n {\n opacity: revealed.value || reducedMotion.value ? 1 : 0,\n transform:\n revealed.value || reducedMotion.value ? 'none' : HIDDEN_TRANSFORMS[props.effect],\n transition: reducedMotion.value\n ? undefined\n : `opacity ${props.duration}ms ease-out ${props.delay}ms, transform ${props.duration}ms ease-out ${props.delay}ms`,\n },\n attrs.style,\n ]),\n);\n\n/** Everything but `class` / `style`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, style: _style, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component\n :is=\"props.as\"\n ref=\"el\"\n :data-revealed=\"revealed || undefined\"\n v-bind=\"rest\"\n :class=\"classes\"\n :style=\"styles\"\n >\n <slot />\n </component>\n</template>\n","<script lang=\"ts\">\nimport type { ElementTag } from '../../../foundation/utils';\n\nexport interface TiltProps {\n /** The maximum rotation in degrees at the edges. Default `12`. */\n maxAngle?: number;\n\n /** The px perspective depth. Default `800`. */\n perspective?: number;\n\n /** The cursor-following highlight. */\n hasGlare?: boolean;\n\n /** The scale applied while tilted. Default `1`. */\n scale?: number;\n\n /** The rendered tag. Default `div`. */\n as?: ElementTag;\n}\n\ninterface TiltState {\n rotateX: number;\n rotateY: number;\n glareX: number;\n glareY: number;\n active: boolean;\n}\n\nconst RESTING: TiltState = { rotateX: 0, rotateY: 0, glareX: 50, glareY: 50, active: false };\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, normalizeStyle, ref, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useReducedMotion } from '../../../foundation/hooks';\n\n/**\n * 3D card tilt — `rotateX`/`rotateY` from cursor position. Disabled under\n * `prefers-reduced-motion`. `hasGlare` paints a cursor-following highlight.\n */\ndefineOptions({ name: 'Tilt', inheritAttrs: false });\n\n/** The tilted content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<TiltProps>(), {\n maxAngle: 12,\n perspective: 800,\n hasGlare: undefined,\n scale: 1,\n as: 'div',\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\nconst reducedMotion = useReducedMotion();\n\nconst tilt = ref<TiltState>({ ...RESTING });\n\n/*\n * React pulled `onPointerMove` / `onPointerLeave` out of props and called them\n * before its own handling. Here they stay in the fallthrough bag: Vue's\n * `mergeProps` chains a caller's handler with the one bound below, caller first\n * (`v-bind=\"rest\"` precedes `@pointermove` in the template) — same order.\n */\nfunction handleMove(e: PointerEvent): void {\n if (reducedMotion.value) return;\n const node = el.value;\n if (!node) return;\n const rect = node.getBoundingClientRect();\n const x = (e.clientX - rect.left) / rect.width;\n const y = (e.clientY - rect.top) / rect.height;\n tilt.value = {\n rotateX: (0.5 - y) * 2 * props.maxAngle,\n rotateY: (x - 0.5) * 2 * props.maxAngle,\n glareX: x * 100,\n glareY: y * 100,\n active: true,\n };\n}\n\nfunction handleLeave(): void {\n tilt.value = { ...RESTING };\n}\n\nconst classes = computed(() => cn('relative', attrs.class as string | undefined));\n\n/**\n * Vue does not append `px` to a numeric `:style` value the way React did, so\n * `perspective` is spelled out. `normalizeStyle` merges left → right, so a\n * caller's `style` lands last and wins — as React's `{ …, ...style }` did.\n */\nconst styles = computed(() =>\n normalizeStyle([\n {\n perspective: `${props.perspective}px`,\n transform:\n tilt.value.active && !reducedMotion.value\n ? `rotateX(${tilt.value.rotateX}deg) rotateY(${tilt.value.rotateY}deg) scale(${props.scale})`\n : 'rotateX(0) rotateY(0) scale(1)',\n transition: tilt.value.active ? 'transform 80ms ease-out' : 'transform 220ms ease-out',\n transformStyle: 'preserve-3d',\n },\n attrs.style,\n ]),\n);\n\nconst showGlare = computed(() => Boolean(props.hasGlare) && !reducedMotion.value && tilt.value.active);\n\nconst glareStyle = computed(() => ({\n background: `radial-gradient(circle at ${tilt.value.glareX}% ${tilt.value.glareY}%, rgba(255,255,255,0.35) 0%, transparent 50%)`,\n}));\n\n/** Everything but `class` / `style`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, style: _style, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <component\n :is=\"props.as\"\n ref=\"el\"\n v-bind=\"rest\"\n :class=\"classes\"\n :style=\"styles\"\n @pointermove=\"handleMove\"\n @pointerleave=\"handleLeave\"\n >\n <slot />\n <span\n v-if=\"showGlare\"\n aria-hidden=\"true\"\n class=\"pointer-events-none absolute inset-0 rounded-[inherit] mix-blend-overlay\"\n :style=\"glareStyle\"\n />\n </component>\n</template>\n","<script lang=\"ts\">\n/** Defines the Marquee scroll direction. */\nexport const MarqueeDirection = {\n /** Refers to leftward horizontal scroll. */\n Left: 'left',\n /** Refers to rightward horizontal scroll. */\n Right: 'right',\n /** Refers to upward vertical scroll. */\n Up: 'up',\n /** Refers to downward vertical scroll. */\n Down: 'down',\n} as const;\n\nexport type MarqueeDirection = (typeof MarqueeDirection)[keyof typeof MarqueeDirection];\n\nexport interface MarqueeProps {\n /** The scroll direction. Default `left`. */\n direction?: MarqueeDirection;\n\n /** The seconds for one full traversal of the inner content. */\n speed?: number;\n\n /** The pause-while-hovered behaviour. Default `true`. */\n canPauseOnHover?: boolean;\n\n /** The px gap between repeated items. Default `48`. */\n gap?: number;\n}\n\n/* The two track copies. Index `1` is the aria-hidden duplicate that makes the\n -50% keyframes loop seamlessly. */\nconst COPIES = [0, 1] as const;\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, normalizeStyle, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useReducedMotion } from '../../../foundation/hooks';\n\n/**\n * Continuously scrolls children. Content is duplicated once for a seamless\n * loop animated by `-50%`. Pause-on-hover toggles `animation-play-state`.\n */\ndefineOptions({ name: 'Marquee', inheritAttrs: false });\n\n/** The scrolled content — React's required `children`. Rendered once per copy. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = withDefaults(defineProps<MarqueeProps>(), {\n direction: 'left',\n speed: 30,\n canPauseOnHover: true,\n gap: 48,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst reducedMotion = useReducedMotion();\n\nconst horizontal = computed(() => props.direction === 'left' || props.direction === 'right');\nconst reverse = computed(() => props.direction === 'right' || props.direction === 'down');\nconst animationName = computed(() => (horizontal.value ? 'marquee-x' : 'marquee-y'));\n\nconst classes = computed(() =>\n cn(\n 'group/marquee relative overflow-hidden',\n horizontal.value ? 'flex' : 'flex flex-col',\n attrs.class as string | undefined,\n ),\n);\n\n/** `normalizeStyle` merges left → right, so a caller's `style` lands last and wins. */\nconst styles = computed(() =>\n normalizeStyle([{ '--marquee-gap': `${props.gap}px` }, attrs.style]),\n);\n\nconst trackClasses = computed(() =>\n cn(\n 'flex shrink-0',\n horizontal.value ? 'items-center' : 'flex-col items-center',\n props.canPauseOnHover && 'group-hover/marquee:[animation-play-state:paused]',\n ),\n);\n\nconst trackStyle = computed(() => ({\n animation: reducedMotion.value\n ? undefined\n : `${animationName.value} ${props.speed}s linear infinite ${reverse.value ? 'reverse' : 'normal'}`,\n}));\n\nconst copyClasses = computed(() =>\n cn('shrink-0', horizontal.value ? 'flex items-center' : 'flex flex-col items-center'),\n);\n\n/** Vue does not append `px` to a numeric `:style` value, so every length is spelled out. */\nconst copyStyle = computed(() => ({\n gap: `${props.gap}px`,\n paddingInline: horizontal.value ? `${props.gap / 2}px` : '0px',\n paddingBlock: horizontal.value ? '0px' : `${props.gap / 2}px`,\n}));\n\n/** Everything but `class` / `style`, both re-applied above. */\nconst rest = computed(() => {\n const { class: _class, style: _style, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n role=\"marquee\"\n :data-direction=\"props.direction\"\n v-bind=\"rest\"\n :class=\"classes\"\n :style=\"styles\"\n >\n <!-- Single animated track holding both copies — each copy is exactly\n 50% of the track, so the -50% keyframes loop seamlessly. -->\n <div :class=\"trackClasses\" :style=\"trackStyle\">\n <div\n v-for=\"copy in COPIES\"\n :key=\"copy\"\n :aria-hidden=\"copy === 1\"\n :class=\"copyClasses\"\n :style=\"copyStyle\"\n >\n <slot />\n </div>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nimport type { ElementTag } from '../../../foundation/utils';\n\nexport interface TypewriterProps {\n /** The phrase, or the phrases to cycle through. */\n text: string | string[];\n\n /** The ms between typed characters. Default `60`. */\n typeSpeed?: number;\n\n /** The ms between deleted characters. Default `40`. */\n deleteSpeed?: number;\n\n /** The ms held on a completed phrase before deleting. Default `1500`. */\n pauseBetween?: number;\n\n /** The cycle-forever flag. Defaults to `true` when more than one phrase was given. */\n canLoop?: boolean;\n\n /** The blinking caret. Default `true`. */\n hasCursor?: boolean;\n\n /** The caret glyph. Default `│`. */\n cursorChar?: string;\n\n /** The rendered tag. Default `span`. */\n as?: ElementTag;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, onBeforeUnmount, onMounted, ref, useAttrs, useTemplateRef, watch } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { useReducedMotion } from '../../../foundation/hooks';\n\n/**\n * Char-by-char typewriter. Single string types once; array of strings cycles\n * through (type → pause → delete → next). `prefers-reduced-motion` short-\n * circuits to the full string.\n */\ndefineOptions({ name: 'Typewriter', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<TypewriterProps>(), {\n typeSpeed: 60,\n deleteSpeed: 40,\n pauseBetween: 1500,\n // `undefined` is meaningful — it falls back to `phrases.length > 1`, and Vue\n // would otherwise cast an absent Boolean prop to `false`.\n canLoop: undefined,\n hasCursor: true,\n cursorChar: '│',\n as: 'span',\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLElement>('el');\n/* Called before the lifecycle hooks below so its own `onMounted` subscription\n lands first and the flag is already settled when `step` first runs. */\nconst reducedMotion = useReducedMotion();\n\nconst phrases = computed(() => (Array.isArray(props.text) ? props.text : [props.text]));\nconst shouldLoop = computed(() => props.canLoop ?? phrases.value.length > 1);\n\nconst phraseIndex = ref(0);\nconst charIndex = ref(0);\nconst deleting = ref(false);\n\n/* React's `useEffect` re-ran on every state / timing change and cleared its\n pending timeout on the way out. Driven from `onMounted` rather than an\n `immediate` watcher so `window.setTimeout` is never touched on the server. */\nlet timer: number | undefined;\n\nfunction clearTimer(): void {\n if (timer !== undefined) {\n window.clearTimeout(timer);\n timer = undefined;\n }\n}\n\nfunction step(): void {\n clearTimer();\n if (reducedMotion.value) return;\n\n const current = phrases.value[phraseIndex.value] ?? '';\n\n if (!deleting.value) {\n // Typing phase.\n if (charIndex.value < current.length) {\n timer = window.setTimeout(() => {\n charIndex.value += 1;\n }, props.typeSpeed);\n } else {\n // Done typing this phrase.\n if (phrases.value.length === 1 && !shouldLoop.value) return;\n timer = window.setTimeout(() => {\n deleting.value = true;\n }, props.pauseBetween);\n }\n return;\n }\n\n // Deleting phase.\n if (charIndex.value > 0) {\n timer = window.setTimeout(() => {\n charIndex.value -= 1;\n }, props.deleteSpeed);\n return;\n }\n\n // Move to next phrase.\n const nextIndex = (phraseIndex.value + 1) % phrases.value.length;\n if (!shouldLoop.value && nextIndex === 0) return;\n deleting.value = false;\n phraseIndex.value = nextIndex;\n}\n\nonMounted(step);\n\nwatch(\n [\n charIndex,\n deleting,\n phraseIndex,\n phrases,\n shouldLoop,\n reducedMotion,\n () => props.typeSpeed,\n () => props.deleteSpeed,\n () => props.pauseBetween,\n ],\n step,\n);\n\nonBeforeUnmount(clearTimer);\n\nconst fullText = computed(() =>\n reducedMotion.value\n ? Array.isArray(props.text)\n ? (props.text[0] ?? '')\n : props.text\n : (phrases.value[phraseIndex.value] ?? '').slice(0, charIndex.value),\n);\n\nconst hasCursor = computed(() => props.hasCursor && !reducedMotion.value);\n\nconst classes = computed(() => cn('inline-block', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <!-- Text and caret sit flush: a newline between them would condense to a\n rendered space that the React original never emitted. -->\n <component :is=\"props.as\" ref=\"el\" v-bind=\"rest\" :class=\"classes\">{{ fullText\n }}<span\n v-if=\"hasCursor\"\n aria-hidden=\"true\"\n class=\"ml-0.5 inline-block motion-safe:animate-[blink-caret_1s_step-end_infinite]\"\n >{{ props.cursorChar }}</span\n ></component\n >\n</template>\n","<script lang=\"ts\">\nexport interface ConfettiOrigin {\n x?: number;\n y?: number;\n}\n\nexport interface ConfettiFireOptions {\n particleCount?: number;\n colors?: ReadonlyArray<string>;\n spread?: number;\n velocity?: number;\n origin?: ConfettiOrigin;\n}\n\nexport interface ConfettiProps {\n particleCount?: number;\n colors?: ReadonlyArray<string>;\n gravity?: number;\n spread?: number;\n velocity?: number;\n lifetime?: number;\n origin?: ConfettiOrigin;\n /** The auto-fire-on-mount mode. Useful for one-shot confetti on a route landing. */\n canAutoFire?: boolean;\n}\n\n/** The imperative handle — React's `useImperativeHandle`, here `defineExpose`. */\nexport interface ConfettiHandle {\n fire: (opts?: ConfettiFireOptions) => void;\n}\n\n/** Defines a confetti particle's silhouette. */\nconst ConfettiShape = {\n /** Refers to a rectangular particle. */\n Rect: 'rect',\n /** Refers to a circular particle. */\n Circle: 'circle',\n} as const;\n\ntype ConfettiShape = (typeof ConfettiShape)[keyof typeof ConfettiShape];\n\ninterface Particle {\n id: number;\n x: number;\n y: number;\n vx: number;\n vy: number;\n rotation: number;\n rotationSpeed: number;\n size: number;\n color: string;\n shape: ConfettiShape;\n bornAt: number;\n}\n\nconst DEFAULT_COLORS = ['#ef4444', '#f59e0b', '#10b981', '#3b82f6', '#a855f7', '#ec4899'];\n\nlet nextParticleId = 0;\n</script>\n\n<script setup lang=\"ts\">\nimport { onBeforeUnmount, onMounted, shallowRef, watch } from 'vue';\nimport { Portal } from '../../../foundation/primitives';\nimport { useReducedMotion } from '../../../foundation/hooks';\n\n/**\n * Confetti burst. Imperative `fire()` via the exposed handle, or `canAutoFire`\n * on mount. SVG particles animated by rAF. No-op under `prefers-reduced-motion`.\n */\ndefineOptions({ name: 'Confetti', inheritAttrs: false });\n\nconst props = withDefaults(defineProps<ConfettiProps>(), {\n particleCount: 60,\n colors: () => DEFAULT_COLORS,\n gravity: 1200,\n spread: 60,\n velocity: 500,\n lifetime: 3000,\n origin: undefined,\n canAutoFire: undefined,\n});\n\nconst reducedMotion = useReducedMotion();\n\n/* `shallowRef`: the array is replaced wholesale every frame, and deep-proxying\n 60 particle objects per tick would cost far more than the render. */\nconst particles = shallowRef<ReadonlyArray<Particle>>([]);\n\nlet raf: number | null = null;\nlet lastTime = 0;\n\nfunction stop(): void {\n if (raf != null) cancelAnimationFrame(raf);\n raf = null;\n lastTime = 0;\n}\n\n/*\n * React restarted the loop from an effect keyed on `particles.length`. Here the\n * loop owns its own lifetime: it starts when a burst spawns and stops when the\n * last particle has fallen out of view or aged past `lifetime`.\n */\nfunction tick(now: number): void {\n const last = lastTime || now;\n const dt = (now - last) / 1000;\n lastTime = now;\n const viewportH = typeof window !== 'undefined' ? window.innerHeight : 800;\n\n particles.value = particles.value\n .map((p) => ({\n ...p,\n x: p.x + p.vx * dt,\n y: p.y + p.vy * dt,\n vy: p.vy + props.gravity * dt,\n rotation: p.rotation + p.rotationSpeed * dt,\n }))\n .filter((p) => p.y < viewportH + 80 && now - p.bornAt < props.lifetime);\n\n if (particles.value.length === 0) {\n stop();\n return;\n }\n raf = requestAnimationFrame(tick);\n}\n\nfunction start(): void {\n if (raf != null) return;\n lastTime = 0;\n raf = requestAnimationFrame(tick);\n}\n\nfunction fire(opts?: ConfettiFireOptions): void {\n if (reducedMotion.value) return;\n\n const count = opts?.particleCount ?? props.particleCount;\n const palette = opts?.colors ?? props.colors;\n const sp = opts?.spread ?? props.spread;\n const vel = opts?.velocity ?? props.velocity;\n const o = opts?.origin ?? props.origin;\n const x = o?.x ?? (typeof window !== 'undefined' ? window.innerWidth / 2 : 200);\n const y = o?.y ?? (typeof window !== 'undefined' ? window.innerHeight / 2 : 200);\n\n const burst: Array<Particle> = [];\n const now = performance.now();\n for (let i = 0; i < count; i++) {\n // Angle: upward (-90deg) ± spread/2.\n const angle = -Math.PI / 2 + ((Math.random() - 0.5) * (sp * Math.PI)) / 180;\n const speed = vel * (0.7 + Math.random() * 0.6);\n burst.push({\n id: ++nextParticleId,\n x,\n y,\n vx: Math.cos(angle) * speed + (Math.random() - 0.5) * 60,\n vy: Math.sin(angle) * speed,\n rotation: Math.random() * 360,\n rotationSpeed: (Math.random() - 0.5) * 720,\n size: 6 + Math.random() * 6,\n color: palette[Math.floor(Math.random() * palette.length)] ?? '#000',\n shape: Math.random() > 0.5 ? 'rect' : 'circle',\n bornAt: now,\n });\n }\n\n particles.value = [...particles.value, ...burst];\n start();\n}\n\n/*\n * React re-ran the auto-fire effect whenever the memoized `spawn` changed — i.e.\n * on any config-prop change. Here it fires on mount and whenever the flag itself\n * flips on, which is what the prop name promises.\n */\nonMounted(() => {\n if (props.canAutoFire) fire();\n});\n\nwatch(\n () => props.canAutoFire,\n (value) => {\n if (value) fire();\n },\n);\n\nonBeforeUnmount(stop);\n\ndefineExpose<ConfettiHandle>({ fire });\n</script>\n\n<template>\n <Portal v-if=\"particles.length > 0\">\n <svg\n aria-hidden=\"true\"\n class=\"pointer-events-none fixed inset-0 z-toast\"\n :style=\"{ width: '100vw', height: '100vh' }\"\n >\n <template v-for=\"p in particles\" :key=\"p.id\">\n <rect\n v-if=\"p.shape === 'rect'\"\n :x=\"p.x - p.size / 2\"\n :y=\"p.y - p.size / 2\"\n :width=\"p.size\"\n :height=\"p.size * 0.5\"\n :fill=\"p.color\"\n :transform=\"`rotate(${p.rotation} ${p.x} ${p.y})`\"\n />\n <circle v-else :cx=\"p.x\" :cy=\"p.y\" :r=\"p.size / 2\" :fill=\"p.color\" />\n </template>\n </svg>\n </Portal>\n</template>\n","<script lang=\"ts\">\n/** Defines the AnnotationMarker highlight tone. */\nexport const AnnotationTone = {\n /** Refers to an informational note. */\n Note: 'note',\n /** Refers to a comment. */\n Comment: 'comment',\n /** Refers to a suggestion. */\n Suggestion: 'suggestion',\n /** Refers to a flagged issue. */\n Issue: 'issue',\n /** Refers to a resolved annotation. */\n Resolved: 'resolved',\n} as const;\n\nexport type AnnotationTone = (typeof AnnotationTone)[keyof typeof AnnotationTone];\n\nexport interface AnnotationMarkerProps {\n /** The numeric badge / index shown in the pin. Rich content → the `index` slot. */\n index?: number | string;\n\n /** The tone — drives the highlight color. */\n tone?: AnnotationTone;\n\n /** The pin-only mode — a small floating pin without underline. */\n isPinOnly?: boolean;\n\n /** The resolved state (dimmed, struck-through highlight). */\n isResolved?: boolean;\n\n /** The active state — the currently focused / hovered annotation. */\n isActive?: boolean;\n}\n\nconst TONE_HIGHLIGHT: Record<AnnotationTone, string> = {\n note: 'bg-info-soft/60 decoration-info',\n comment: 'bg-primary-soft/60 decoration-primary',\n suggestion: 'bg-success-soft/60 decoration-success',\n issue: 'bg-destructive-soft/60 decoration-destructive',\n resolved: 'bg-muted decoration-muted-foreground',\n};\n\nconst TONE_PIN: Record<AnnotationTone, string> = {\n note: 'bg-info text-info-foreground',\n comment: 'bg-primary text-primary-foreground',\n suggestion: 'bg-success text-success-foreground',\n issue: 'bg-destructive text-destructive-foreground',\n resolved: 'bg-muted-foreground text-background',\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Wraps content (or stands alone) to mark an annotation. Renders as a focusable\n * button; click fires the open-thread flow. `isPinOnly` collapses to just the\n * numbered chip — for margin markers or floating layers (position via `class`).\n */\ndefineOptions({ name: 'AnnotationMarker', inheritAttrs: false });\n\ndefineSlots<{\n /** The wrapped text or content the annotation refers to. Omit for a standalone pin. */\n default?(): unknown;\n /** The rich override for the pin's badge — replaces the `index` prop. */\n index?(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<AnnotationMarkerProps>(), { tone: 'comment' });\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLButtonElement>('el');\n\nconst effectiveTone = computed<AnnotationTone>(() => (props.isResolved ? 'resolved' : props.tone));\n\n/** React branched on `isPinOnly || children == null`; the default slot is Vue's `children`. */\nconst isPin = computed(() => Boolean(props.isPinOnly) || !slots.default);\n\nconst pinClasses = computed(() =>\n cn(\n 'inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full px-1 text-[10px] font-semibold leading-none',\n TONE_PIN[effectiveTone.value],\n ),\n);\n\nconst classes = computed(() =>\n isPin.value\n ? cn(\n 'inline-flex items-center gap-1 align-middle rounded-full ring-1 ring-transparent transition-shadow',\n props.isActive && 'ring-ring',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n attrs.class as string | undefined,\n )\n : cn(\n 'group inline-flex items-baseline gap-1 align-baseline rounded-sm px-0.5 transition-colors',\n 'underline decoration-2 underline-offset-4',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n TONE_HIGHLIGHT[effectiveTone.value],\n props.isResolved && 'line-through opacity-70',\n props.isActive && 'ring-1 ring-ring',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <button\n ref=\"el\"\n type=\"button\"\n :data-tone=\"effectiveTone\"\n :data-active=\"props.isActive ? '' : undefined\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <span v-if=\"!isPin\"><slot /></span>\n <span aria-hidden=\"true\" :class=\"pinClasses\"\n ><slot name=\"index\">{{ props.index ?? '' }}</slot></span\n >\n </button>\n</template>\n","<script lang=\"ts\">\nexport interface Reaction {\n /** Stable id (typically the emoji or shortcode). */\n key: string;\n\n /** Emoji displayed in the chip. Rich content → the `emoji` scoped slot. */\n emoji: string | number;\n\n /** Total count of users who reacted. */\n count: number;\n\n /** Whether the current viewer has reacted with this. */\n isReactedByMe?: boolean;\n\n /** Optional list of user names — surfaced in the chip's `title`. */\n users?: ReadonlyArray<string>;\n}\n\nexport interface ReactionBarProps {\n reactions: ReadonlyArray<Reaction>;\n\n /** The trailing \"add reaction\" button's visibility. Default true. */\n hasAddButton?: boolean;\n\n /** The compact mode — emoji only, no counts. */\n isCompact?: boolean;\n\n /** The empty-chip visibility — renders chips with `count === 0`. Default false. */\n hasEmpty?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, getCurrentInstance, useAttrs, useTemplateRef } from 'vue';\nimport { SmilePlus } from 'lucide-vue-next';\nimport { cn, dataAttr } from '../../../foundation/utils';\n\n/**\n * Row of reaction chips with optional add-reaction button. Each chip emits\n * `@react` with its key; the trailing `+` emits `@add` to open a picker. Pair\n * with `forms/ReactionPicker` to wire the add flow.\n */\ndefineOptions({ name: 'ReactionBar', inheritAttrs: false });\n\n/**\n * React typed `Reaction.emoji` as a `ReactNode`, so a chip could hold a custom\n * glyph. The prop keeps the scalar form and the per-row node becomes a scoped\n * slot whose fallback is the default rendering.\n */\ndefineSlots<{\n /** The chip glyph override, per reaction. */\n emoji(props: { reaction: Reaction; index: number }): unknown;\n}>();\n\nconst props = withDefaults(defineProps<ReactionBarProps>(), {\n /* `reactions` stays declared-required — Vue still warns when it is missing — but a\n default keeps an absent (or transiently-undefined) value out of the `.filter`\n below, which took the whole page down. */\n reactions: () => [],\n hasAddButton: true,\n isCompact: undefined,\n hasEmpty: false,\n});\n\nconst emit = defineEmits<{\n /** Emits the key of the toggled reaction chip. */\n react: [key: string];\n\n /** Fires when the trailing \"add\" button is activated (opens a picker). */\n add: [];\n}>();\n\nconst attrs = useAttrs();\nconst instance = getCurrentInstance();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/**\n * Mirrors React's `hasAddButton && onAdd && <button/>` guard — the button\n * renders only when the consumer bound `@add`. Read through a call, not a\n * cached computed: `instance.vnode` is replaced on every re-render.\n */\nconst hasAdd = () => props.hasAddButton && Boolean(instance?.vnode.props?.onAdd);\n\nconst visible = computed(() =>\n props.hasEmpty ? props.reactions : props.reactions.filter((r) => r.count > 0),\n);\n\n/** Was React's private `ReactionChip` component — a class map is all it carried. */\nconst chipClasses = (reaction: Reaction): string =>\n cn(\n 'inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs leading-none transition-colors',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n reaction.isReactedByMe\n ? 'border-primary bg-primary-soft text-primary-soft-foreground'\n : 'border-border bg-background hover:bg-muted',\n );\n\nconst chipTitle = (reaction: Reaction): string | undefined =>\n reaction.users?.length ? reaction.users.join(', ') : undefined;\n\nconst classes = computed(() =>\n cn('inline-flex flex-wrap items-center gap-1', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" role=\"group\" aria-label=\"Reactions\" v-bind=\"rest\" :class=\"classes\">\n <button\n v-for=\"(reaction, index) in visible\"\n :key=\"reaction.key\"\n type=\"button\"\n :data-active=\"dataAttr(reaction.isReactedByMe)\"\n :title=\"chipTitle(reaction)\"\n :class=\"chipClasses(reaction)\"\n @click=\"emit('react', reaction.key)\"\n >\n <span class=\"text-sm leading-none\">\n <slot name=\"emoji\" :reaction=\"reaction\" :index=\"index\">{{ reaction.emoji }}</slot>\n </span>\n <span v-if=\"!props.isCompact\" class=\"font-medium tabular-nums\">{{ reaction.count }}</span>\n </button>\n <button\n v-if=\"hasAdd()\"\n type=\"button\"\n aria-label=\"Add reaction\"\n class=\"inline-flex items-center justify-center rounded-full border border-dashed border-border px-2 py-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n @click=\"emit('add')\"\n >\n <SmilePlus class=\"h-3.5 w-3.5\" />\n </button>\n </div>\n</template>\n","<script lang=\"ts\">\n/** Defines which side of the conversation a bubble sits on. */\nexport const ChatSide = {\n /** Refers to the inbound side (them). */\n Start: 'start',\n /** Refers to the outbound side (me). */\n End: 'end',\n} as const;\n\nexport type ChatSide = (typeof ChatSide)[keyof typeof ChatSide];\n\n/** Defines the delivery state of a chat message. */\nexport const ChatStatus = {\n /** Refers to a message in flight. */\n Sending: 'sending',\n /** Refers to a message sent to the server. */\n Sent: 'sent',\n /** Refers to a message delivered to the recipient. */\n Delivered: 'delivered',\n /** Refers to a message read by the recipient. */\n Read: 'read',\n /** Refers to a message that failed to send. */\n Failed: 'failed',\n} as const;\n\nexport type ChatStatus = (typeof ChatStatus)[keyof typeof ChatStatus];\n\n/** Defines the chat bubble color tone. */\nexport const ChatTone = {\n /** Refers to the neutral inbound bubble. */\n Default: 'default',\n /** Refers to the primary outbound bubble. */\n Primary: 'primary',\n /** Refers to a centered, muted system row. */\n System: 'system',\n /** Refers to a subtle bordered bubble. */\n Subtle: 'subtle',\n} as const;\n\nexport type ChatTone = (typeof ChatTone)[keyof typeof ChatTone];\n\nexport interface ChatBubbleProps {\n /** The side of the conversation. `start` = them, `end` = me. */\n side?: ChatSide;\n\n /** The bubble color tone. `system` is centered + muted (e.g. \"Alex joined\"). */\n tone?: ChatTone;\n\n /** The author label (rendered above the bubble). Rich content → the `author` slot. */\n author?: string | number;\n\n /** The timestamp (rendered next to the status row). Rich content → the `timestamp` slot. */\n timestamp?: string | number;\n\n /** The delivery state. Hidden when `side === 'start'` by default. */\n status?: ChatStatus;\n\n /** The status-on-inbound override — force-shows status even on the inbound side. */\n canShowStatusOnStart?: boolean;\n\n /** The tailless mode — hides the bubble's tail (for stacked / grouped messages). */\n isTailless?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef, type Component } from 'vue';\nimport { Check, CheckCheck, Clock, AlertTriangle } from 'lucide-vue-next';\nimport { cn, Tones } from '../../../foundation/utils';\n\n/**\n * Single chat message bubble. Compose `<ChatBubble side=\"end\" tone=\"primary\"\n * status=\"read\" timestamp=\"9:42 AM\">…</ChatBubble>` inside a `MessageList`.\n * Use `system` tone for join / leave / metadata rows. Pair the `footer` slot\n * with `display/ReactionBar`.\n *\n * React's `avatar` / `footer` were structural `ReactNode` props with no string\n * form worth keeping; they are slots only. `author` / `timestamp` keep their\n * prop form and gain same-named slots.\n */\ndefineOptions({ name: 'ChatBubble', inheritAttrs: false });\n\ndefineSlots<{\n /** The avatar, rendered next to the bubble on the same side. */\n avatar(): unknown;\n\n /** The author-label override, when a plain string is not enough. */\n author(): unknown;\n\n /** The bubble body — React's required `children`. */\n default(): unknown;\n\n /** The timestamp override, when a plain string is not enough. */\n timestamp(): unknown;\n\n /** The reactions / footer region (e.g. a `ReactionBar`). */\n footer(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<ChatBubbleProps>(), {\n side: ChatSide.Start,\n tone: undefined,\n author: undefined,\n timestamp: undefined,\n status: undefined,\n canShowStatusOnStart: undefined,\n isTailless: undefined,\n});\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/** Maps each chat tone to the shared `Tones` palette (system stays custom — transparent + italic). */\nconst TONE_BASE: Record<ChatTone, string> = {\n default: Tones.soft.neutral,\n primary: Tones.solid.primary,\n system: 'bg-transparent text-muted-foreground italic',\n subtle: `border ${Tones.surface.neutral}`,\n};\n\n/* React inlined the sized JSX per status; Vue splits the component from the class it carries. */\nconst STATUS_ICON: Record<ChatStatus, Component> = {\n sending: Clock,\n sent: Check,\n delivered: CheckCheck,\n read: CheckCheck,\n failed: AlertTriangle,\n};\n\nconst STATUS_ICON_CLASS: Record<ChatStatus, string> = {\n sending: 'h-3 w-3',\n sent: 'h-3 w-3',\n delivered: 'h-3 w-3',\n read: 'h-3 w-3 text-info',\n failed: 'h-3 w-3 text-destructive',\n};\n\nconst isEnd = computed(() => props.side === ChatSide.End);\n\nconst effectiveTone = computed<ChatTone>(\n () => props.tone ?? (isEnd.value ? ChatTone.Primary : ChatTone.Default),\n);\n\nconst isSystem = computed(() => effectiveTone.value === ChatTone.System);\n\nconst showStatus = computed(\n () => Boolean(props.status) && (isEnd.value || Boolean(props.canShowStatusOnStart)),\n);\n\nconst statusIcon = computed(() => (props.status ? STATUS_ICON[props.status] : undefined));\n\nconst statusIconClass = computed(() =>\n props.status ? STATUS_ICON_CLASS[props.status] : undefined,\n);\n\nconst hasAuthor = computed(() => props.author != null || Boolean(slots.author));\n\nconst hasTimestamp = computed(() => props.timestamp != null || Boolean(slots.timestamp));\n\nconst classes = computed(() =>\n isSystem.value\n ? cn('flex w-full justify-center', attrs.class as string | undefined)\n : cn(\n 'flex w-full gap-2',\n isEnd.value ? 'flex-row-reverse' : 'flex-row',\n attrs.class as string | undefined,\n ),\n);\n\nconst systemInnerClasses = computed(() => cn('text-center text-xs', TONE_BASE.system));\n\nconst columnClasses = computed(() =>\n cn('flex max-w-[75%] flex-col gap-1', isEnd.value ? 'items-end' : 'items-start'),\n);\n\nconst bubbleClasses = computed(() =>\n cn(\n 'relative inline-block px-3 py-2 text-sm break-words',\n TONE_BASE[effectiveTone.value],\n props.isTailless\n ? 'rounded-2xl'\n : isEnd.value\n ? 'rounded-2xl rounded-br-sm'\n : 'rounded-2xl rounded-bl-sm',\n ),\n);\n\nconst metaClasses = computed(() =>\n cn(\n 'flex items-center gap-1 text-[11px] text-muted-foreground',\n isEnd.value ? 'flex-row-reverse' : 'flex-row',\n ),\n);\n\nconst footerClasses = computed(() => cn(isEnd.value && 'self-end'));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div v-if=\"isSystem\" ref=\"el\" :data-side=\"props.side\" v-bind=\"rest\" :class=\"classes\">\n <div :class=\"systemInnerClasses\"><slot /></div>\n </div>\n <div v-else ref=\"el\" :data-side=\"props.side\" v-bind=\"rest\" :class=\"classes\">\n <div v-if=\"$slots.avatar\" class=\"shrink-0 self-end\"><slot name=\"avatar\" /></div>\n <div :class=\"columnClasses\">\n <div v-if=\"hasAuthor\" class=\"text-xs font-medium text-muted-foreground\">\n <slot name=\"author\">{{ props.author }}</slot>\n </div>\n <div :class=\"bubbleClasses\"><slot /></div>\n <div v-if=\"hasTimestamp || showStatus\" :class=\"metaClasses\">\n <span v-if=\"hasTimestamp\"><slot name=\"timestamp\">{{ props.timestamp }}</slot></span>\n <!-- aria-label is prohibited on a generic span — img role carries it. -->\n <span v-if=\"showStatus && statusIcon\" role=\"img\" :aria-label=\"`Status: ${props.status}`\">\n <component :is=\"statusIcon\" :class=\"statusIconClass\" />\n </span>\n </div>\n <div v-if=\"$slots.footer\" :class=\"footerClasses\"><slot name=\"footer\" /></div>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\n/** The imperative surface exposed on a `MessageList` template ref. */\nexport interface MessageListHandle {\n scrollToBottom: (behavior?: ScrollBehavior) => void;\n isAtBottom: () => boolean;\n}\n\nexport interface MessageListProps {\n /** The sticky auto-scroll mode — scrolls to bottom when children change *and* the viewer is near the bottom. Default true. */\n isSticky?: boolean;\n\n /** The threshold (px) considered \"at bottom\" for stickiness. Default 32. */\n bottomThreshold?: number;\n\n /** The floating \"jump to bottom\" button's visibility when scrolled away. Default true. */\n hasJumpToBottom?: boolean;\n\n /** The reversed render order (newest at top). v1 keeps natural top→bottom. */\n isReversed?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport {\n computed,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n ref,\n useAttrs,\n useTemplateRef,\n} from 'vue';\nimport { ChevronDown } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Scrolling message stream with sticky auto-scroll and a jump-to-latest\n * affordance. Messages stay in the default slot — `MessageList` owns the\n * viewport, not the rows.\n *\n * React's `header` / `footer` were structural `ReactNode` props with no string\n * form worth keeping; they are slots only.\n */\ndefineOptions({ name: 'MessageList', inheritAttrs: false });\n\ndefineSlots<{\n /** The region above the message stream (e.g. \"load older\"). */\n header(): unknown;\n\n /** The message rows — React's required `children`. */\n default(): unknown;\n\n /** The region below the message stream (e.g. typing indicator). */\n footer(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<MessageListProps>(), {\n isSticky: true,\n bottomThreshold: 32,\n hasJumpToBottom: true,\n isReversed: undefined,\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst scroller = useTemplateRef<HTMLDivElement>('scroller');\n\n/**\n * Near-bottom state recorded *before* a new message commits (in the scroll\n * handler). Measuring inside the post-update hook would see the just-committed\n * message, so anything taller than `bottomThreshold` would defeat stickiness.\n * Plain `let`, not a `ref` — nothing renders off it, exactly like React's ref.\n */\nlet nearBottom = true;\n\nconst atBottom = ref(true);\n\nconst isNearBottom = (): boolean => {\n const node = scroller.value;\n if (!node) return true;\n return node.scrollHeight - node.clientHeight - node.scrollTop <= props.bottomThreshold;\n};\n\nconst scrollToBottom = (behavior: ScrollBehavior = 'smooth'): void => {\n const node = scroller.value;\n if (!node) return;\n node.scrollTo({ top: node.scrollHeight, behavior });\n};\n\nconst onScroll = (): void => {\n nearBottom = isNearBottom();\n atBottom.value = nearBottom;\n};\n\n/**\n * React ran the sticky scroll in a layout effect keyed on `children`, *before*\n * the effect that attached the listener — so the first paint lands at the\n * bottom while `nearBottom` is still its initial `true`. The mount order below\n * preserves that: scroll first, then attach and take the first measurement.\n */\nonMounted(() => {\n if (props.isSticky && nearBottom) scrollToBottom('auto');\n const node = scroller.value;\n if (!node) return;\n node.addEventListener('scroll', onScroll, { passive: true });\n onScroll();\n});\n\nonBeforeUnmount(() => {\n scroller.value?.removeEventListener('scroll', onScroll);\n});\n\n/**\n * Stands in for React's `useLayoutEffect(…, [children])`. A slot's content is\n * not a reactive dependency Vue can watch, but any new message re-renders this\n * component, and `onUpdated` is the hook that fires after that commit.\n */\nonUpdated(() => {\n if (props.isSticky && nearBottom) scrollToBottom('auto');\n});\n\nconst classes = computed(() =>\n cn('relative flex h-full min-h-0 flex-col', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\n/** React's `useImperativeHandle` surface (`MessageListHandle`), plus the root element. */\ndefineExpose({ el, scrollToBottom, isAtBottom: isNearBottom });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\">\n <div v-if=\"$slots.header\" class=\"shrink-0\"><slot name=\"header\" /></div>\n <div\n ref=\"scroller\"\n class=\"flex-1 min-h-0 overflow-y-auto px-3 py-3\"\n role=\"log\"\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n >\n <div class=\"flex flex-col gap-2\"><slot /></div>\n </div>\n <div v-if=\"$slots.footer\" class=\"shrink-0 border-t border-border px-3 py-2\">\n <slot name=\"footer\" />\n </div>\n <button\n v-if=\"props.hasJumpToBottom && !atBottom\"\n type=\"button\"\n aria-label=\"Jump to latest\"\n class=\"absolute bottom-3 right-3 inline-flex h-9 w-9 items-center justify-center rounded-full border border-border bg-background text-foreground shadow-md hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n @click=\"scrollToBottom('smooth')\"\n >\n <ChevronDown class=\"h-4 w-4\" />\n </button>\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface DaySeparatorProps {\n /** The label (e.g. \"Today\", \"Yesterday\", \"Mar 5\"). Rich content → the `label` slot. */\n label: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/** Date divider between message groups in a `MessageList`. */\ndefineOptions({ name: 'DaySeparator', inheritAttrs: false });\n\ndefineSlots<{\n /** The label override, when a plain string is not enough. */\n label(): unknown;\n}>();\n\n/** `label` was required in React and stays required here — the slot is a rich override, not a substitute. */\nconst props = defineProps<DaySeparatorProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() =>\n cn('flex items-center gap-3 py-2', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" role=\"separator\" v-bind=\"rest\" :class=\"classes\">\n <span class=\"h-px flex-1 bg-border\" aria-hidden=\"true\" />\n <span class=\"text-[11px] font-medium uppercase tracking-wide text-muted-foreground\">\n <slot name=\"label\">{{ props.label }}</slot>\n </span>\n <span class=\"h-px flex-1 bg-border\" aria-hidden=\"true\" />\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface ThreadViewProps {\n /** The title for the thread panel header. Default `\"Thread\"`. Rich content → the `title` slot. */\n title?: string | number;\n\n /** The subtitle shown under the title (e.g. \"in #engineering\"). Rich content → the `subtitle` slot. */\n subtitle?: string | number;\n\n /**\n * The reply count label. Left unset it falls back to a count derived from the\n * reply slot; pass `null` to hide the separator row entirely. Rich content →\n * the `replyCount` slot.\n */\n replyCount?: string | number | null;\n\n /** The close button's visibility. Default true. */\n hasCloseButton?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, getCurrentInstance, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { X as CloseIcon } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { renderableChildren } from '../../../foundation/primitives';\n\n/**\n * Side-panel layout for a single thread: parent message + reply count\n * separator + reply list + composer. The actual messages stay in the slots —\n * `ThreadView` only owns the chrome.\n *\n * React's `parent` / `composer` were structural `ReactNode` props with no string\n * form worth keeping; they are slots only. `title` / `subtitle` / `replyCount`\n * keep their prop form and gain same-named slots.\n */\ndefineOptions({ name: 'ThreadView', inheritAttrs: false });\n\ndefineSlots<{\n /** The title override, when a plain string is not enough. */\n title(): unknown;\n\n /** The subtitle override, when a plain string is not enough. */\n subtitle(): unknown;\n\n /** The parent message — typically a `ChatBubble`. Required in React, required here. */\n parent(): unknown;\n\n /** The reply-count label override, when a plain string is not enough. */\n replyCount(): unknown;\n\n /** The reply nodes (typically `ChatBubble` items) — React's `children`. */\n default(): unknown;\n\n /** The composer rendered at the bottom of the panel. */\n composer(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<ThreadViewProps>(), {\n title: 'Thread',\n subtitle: undefined,\n replyCount: undefined,\n hasCloseButton: true,\n});\n\n/** Replaces React's `onClose`; omitting `@close` omits the close button. */\nconst emit = defineEmits<{\n /** Fires when the close button is activated. */\n close: [];\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst instance = getCurrentInstance();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/**\n * Mirrors React's `hasCloseButton && onClose && <button/>` guard — the button\n * renders only when the consumer bound `@close`. Read through a call, not a\n * cached computed: `instance.vnode` is replaced on every re-render.\n */\nconst hasClose = () => props.hasCloseButton && Boolean(instance?.vnode.props?.onClose);\n\n/**\n * Replaces React's `Array.isArray(children) ? children : [children]` count.\n * Called per render rather than cached — a slot's content is only knowable at\n * render time, and `renderableChildren` drops the comment/whitespace vnodes\n * that would otherwise read as replies.\n */\nconst defaultReplyCount = (): string => {\n const count = renderableChildren(slots.default?.()).length;\n if (count === 0) return 'No replies yet';\n return count === 1 ? '1 reply' : `${count} replies`;\n};\n\nconst hasSubtitle = computed(() => props.subtitle != null || Boolean(slots.subtitle));\n\nconst classes = computed(() =>\n cn(\n 'flex h-full min-h-0 flex-col rounded-md border border-border bg-card',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" role=\"complementary\" aria-label=\"Thread\" v-bind=\"rest\" :class=\"classes\">\n <header\n class=\"flex items-start justify-between gap-2 border-b border-border px-4 py-3\"\n >\n <div class=\"min-w-0\">\n <div class=\"text-sm font-semibold text-foreground\">\n <slot name=\"title\">{{ props.title }}</slot>\n </div>\n <div v-if=\"hasSubtitle\" class=\"text-xs text-muted-foreground\">\n <slot name=\"subtitle\">{{ props.subtitle }}</slot>\n </div>\n </div>\n <button\n v-if=\"hasClose()\"\n type=\"button\"\n aria-label=\"Close thread\"\n class=\"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n @click=\"emit('close')\"\n >\n <CloseIcon class=\"h-4 w-4\" />\n </button>\n </header>\n <div class=\"flex-1 min-h-0 overflow-y-auto px-4 py-3\">\n <div><slot name=\"parent\" /></div>\n <div v-if=\"props.replyCount !== null\" class=\"my-3 flex items-center gap-3\">\n <span class=\"text-xs text-muted-foreground\">\n <slot name=\"replyCount\">{{ props.replyCount ?? defaultReplyCount() }}</slot>\n </span>\n <span aria-hidden=\"true\" class=\"h-px flex-1 bg-border\" />\n </div>\n <div class=\"flex flex-col gap-2\"><slot /></div>\n </div>\n <div v-if=\"$slots.composer\" class=\"border-t border-border px-3 py-2\">\n <slot name=\"composer\" />\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `CommentThreadProps` and consumers import it. Its\n only member was `children`, which is the default slot here; the rest of the\n React interface was `HTMLAttributes`, which falls through. */\nexport interface CommentThreadProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\n\n/**\n * Root of a nested comment tree. Owns the ARIA `tree` role only — every row is\n * a `Comment`, and nesting happens through each `Comment`'s `replies` slot.\n */\ndefineOptions({ name: 'CommentThread', inheritAttrs: false });\n\n/** The `Comment` rows — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst classes = computed(() => cn('flex flex-col gap-3', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" role=\"tree\" aria-label=\"Comments\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\nexport interface CommentProps {\n /** The author name. Rich content → the `author` slot. */\n author: string | number;\n\n /** The timestamp / metadata. Rich content → the `timestamp` slot. */\n timestamp?: string | number;\n\n /** The initial collapsed state for replies. */\n defaultCollapsed?: boolean;\n\n /** The highlighted state — marks as the OP / highlighted comment. */\n isHighlighted?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, ref, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { ChevronDown, ChevronRight } from 'lucide-vue-next';\nimport { cn, dataAttr } from '../../../foundation/utils';\nimport { renderableChildren } from '../../../foundation/primitives';\n\n/**\n * A single comment inside a `CommentThread` — avatar + collapse rail, header\n * line, body, actions, and a nested reply group that the rail collapses.\n *\n * React's `avatar` / `badge` / `actions` / `replies` were structural `ReactNode`\n * props with no string form worth keeping; they are slots only. `author` /\n * `timestamp` keep their prop form and gain same-named slots.\n */\ndefineOptions({ name: 'Comment', inheritAttrs: false });\n\ndefineSlots<{\n /** The avatar / author photo. */\n avatar(): unknown;\n\n /** The author-name override, when a plain string is not enough. */\n author(): unknown;\n\n /** The trailing chip for badges (e.g. \"OP\", \"Author\"). */\n badge(): unknown;\n\n /** The timestamp override, when a plain string is not enough. */\n timestamp(): unknown;\n\n /** The body / content — React's required `children`. */\n default(): unknown;\n\n /** The footer actions (e.g. Reply / Vote / Report). */\n actions(): unknown;\n\n /** The nested replies — pass `Comment` items. */\n replies(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<CommentProps>(), {\n timestamp: undefined,\n defaultCollapsed: false,\n isHighlighted: undefined,\n});\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst collapsed = ref(props.defaultCollapsed);\n\n/**\n * Replaces React's `Children.toArray(replies).filter(isValidElement).length`.\n * Called per render rather than cached — a slot's content is only knowable at\n * render time, and `renderableChildren` drops the comment/whitespace vnodes\n * that would otherwise read as replies.\n */\nconst replyCount = (): number => renderableChildren(slots.replies?.()).length;\n\nconst hasReplies = (): boolean => replyCount() > 0;\n\nconst hasTimestamp = computed(() => props.timestamp != null || Boolean(slots.timestamp));\n\nconst classes = computed(() =>\n cn(\n 'flex gap-2 rounded-md',\n props.isHighlighted && 'bg-primary-soft/30 ring-1 ring-primary/20 p-2',\n attrs.class as string | undefined,\n ),\n);\n\nconst repliesWrapClasses = computed(() => cn('mt-2', collapsed.value && 'hidden'));\n\nconst railTrackClasses = computed(() =>\n cn(\n 'mx-auto w-px flex-1 bg-border transition-colors group-hover/rail:bg-foreground/30',\n collapsed.value && 'opacity-40',\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n role=\"treeitem\"\n :aria-expanded=\"hasReplies() ? !collapsed : undefined\"\n :data-highlighted=\"dataAttr(props.isHighlighted)\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <!-- Avatar + collapse rail -->\n <div class=\"flex flex-col items-center gap-1\">\n <div class=\"shrink-0\"><slot name=\"avatar\" /></div>\n <button\n v-if=\"hasReplies()\"\n type=\"button\"\n :aria-label=\"collapsed ? 'Expand replies' : 'Collapse replies'\"\n class=\"flex flex-1 items-stretch -my-1 group/rail focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-full\"\n @click=\"collapsed = !collapsed\"\n >\n <span aria-hidden=\"true\" :class=\"railTrackClasses\" />\n </button>\n </div>\n\n <div class=\"flex-1 min-w-0\">\n <div class=\"flex flex-wrap items-baseline gap-x-2 text-sm\">\n <span class=\"font-medium text-foreground\">\n <slot name=\"author\">{{ props.author }}</slot>\n </span>\n <slot name=\"badge\" />\n <span v-if=\"hasTimestamp\" class=\"text-xs text-muted-foreground\">\n <slot name=\"timestamp\">{{ props.timestamp }}</slot>\n </span>\n </div>\n <div class=\"mt-1 text-sm text-foreground\"><slot /></div>\n <div\n v-if=\"$slots.actions\"\n class=\"mt-1 flex items-center gap-2 text-xs text-muted-foreground\"\n >\n <slot name=\"actions\" />\n </div>\n\n <div v-if=\"hasReplies()\" :class=\"repliesWrapClasses\">\n <!-- treeitem children must sit in a role=group per the ARIA tree pattern -->\n <div role=\"group\" class=\"flex flex-col gap-3 border-l border-border pl-3\">\n <slot name=\"replies\" />\n </div>\n </div>\n\n <button\n v-if=\"hasReplies() && collapsed\"\n type=\"button\"\n class=\"mt-1 inline-flex items-center gap-1 text-xs text-primary hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded\"\n @click=\"collapsed = false\"\n >\n <ChevronRight class=\"h-3 w-3\" />\n Show {{ replyCount() }} {{ replyCount() === 1 ? 'reply' : 'replies' }}\n </button>\n <button\n v-if=\"hasReplies() && !collapsed\"\n type=\"button\"\n class=\"mt-1 inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded\"\n @click=\"collapsed = true\"\n >\n <ChevronDown class=\"h-3 w-3\" />\n Collapse\n </button>\n </div>\n </div>\n</template>\n","<script lang=\"ts\">\nexport interface ActivityFeedProps {\n /** The compact spacing variant. */\n isDense?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn, dataAttr } from '../../../foundation/utils';\n\n/**\n * Ordered feed of `ActivityItem` rows — \"actor + verb + target\" sentences with\n * a connector rail running down the leading column.\n */\ndefineOptions({ name: 'ActivityFeed', inheritAttrs: false });\n\n/** The `ActivityItem` rows — React's required `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/**\n * `isDense` defaults to `undefined`, not `false`: Vue casts an absent `Boolean`\n * prop to `false`, and `data-dense` must stay absent rather than render empty.\n */\nconst props = withDefaults(defineProps<ActivityFeedProps>(), { isDense: undefined });\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLOListElement>('el');\n\nconst classes = computed(() =>\n cn(\n 'flex list-none flex-col',\n props.isDense ? 'gap-3' : 'gap-5',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <ol ref=\"el\" :data-dense=\"dataAttr(props.isDense)\" v-bind=\"rest\" :class=\"classes\"><slot /></ol>\n</template>\n","<script lang=\"ts\">\nexport interface ActivityItemProps {\n /** The timestamp (relative or absolute). Rich content → the `timestamp` slot. */\n timestamp?: string | number;\n\n /** The connector-line suppression under the leading column. */\n isLast?: boolean;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { cn, dataAttr } from '../../../foundation/utils';\n\n/**\n * A single row of an `ActivityFeed` — leading avatar column with its connector\n * rail, the activity sentence, and optional preview / action regions.\n *\n * React's `avatar` / `preview` / `actions` were structural `ReactNode` props\n * with no string form worth keeping; they are slots only. `timestamp` keeps its\n * prop form and gains a same-named slot for rich content.\n */\ndefineOptions({ name: 'ActivityItem', inheritAttrs: false });\n\ndefineSlots<{\n /** The avatar / icon node rendered in the leading column. */\n avatar(): unknown;\n\n /** The activity sentence (actor + verb + target) — React's required `children`. */\n default(): unknown;\n\n /** The timestamp override, when a plain string is not enough. */\n timestamp(): unknown;\n\n /** The content preview rendered under the sentence (quoted comment, file name, image). */\n preview(): unknown;\n\n /** The trailing actions (e.g. Reply / Like). */\n actions(): unknown;\n}>();\n\n/**\n * `isLast` defaults to `undefined`, not `false`: Vue casts an absent `Boolean`\n * prop to `false`, and `data-last` must stay absent rather than render empty.\n */\nconst props = withDefaults(defineProps<ActivityItemProps>(), { isLast: undefined });\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLLIElement>('el');\n\nconst hasTimestamp = computed(() => props.timestamp != null || Boolean(slots.timestamp));\n\nconst classes = computed(() => cn('relative flex gap-3', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <li ref=\"el\" :data-last=\"dataAttr(props.isLast)\" v-bind=\"rest\" :class=\"classes\">\n <div class=\"relative flex flex-col items-center\">\n <div class=\"z-raised shrink-0\"><slot name=\"avatar\" /></div>\n <span v-if=\"!props.isLast\" aria-hidden=\"true\" class=\"mt-1 w-px flex-1 bg-border\" />\n </div>\n <div class=\"min-w-0 flex-1 pb-1\">\n <div class=\"text-sm leading-relaxed text-foreground\">\n <slot />\n <span v-if=\"hasTimestamp\" class=\"ml-2 text-xs text-muted-foreground\">\n <slot name=\"timestamp\">{{ props.timestamp }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.preview\"\n class=\"mt-1.5 rounded-md border border-border bg-muted/40 px-3 py-2 text-sm text-muted-foreground\"\n >\n <slot name=\"preview\" />\n </div>\n <div\n v-if=\"$slots.actions\"\n class=\"mt-1 flex items-center gap-3 text-xs text-muted-foreground\"\n >\n <slot name=\"actions\" />\n </div>\n </div>\n </li>\n</template>\n","<script lang=\"ts\">\nexport interface FeatureCardProps {\n /**\n * The feature title. React typed this `ReactNode`; a scalar stays a prop so it\n * remains the discriminator, and the same-named slot is the rich override.\n */\n title: string | number;\n\n /** The optional supporting copy below the title. Falls back to the default slot when omitted. */\n description?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport Card from '../card/Card.vue';\nimport Heading from '../heading/Heading.vue';\nimport Text from '../text/Text.vue';\n\n/**\n * Marketing feature tile — tinted icon badge + title + description. Outlined\n * card; content-only (no baked routing). Compose the icon slot with any node.\n */\ndefineOptions({ name: 'FeatureCard', inheritAttrs: false });\n\n/**\n * React's `icon` was a structural `ReactNode` prop — a region with no prop\n * equivalent in Vue, so it becomes a slot. `title` / `description` stay props\n * (scalars) with a same-named slot as the rich override; the default slot is\n * the body fallback React spelled `description ?? children`.\n */\ndefineSlots<{\n /** The icon node rendered inside a tinted badge (`bg-primary-soft text-primary`). Size it yourself. */\n icon(): unknown;\n /** The feature title — overrides the `title` prop's rendering. */\n title(): unknown;\n /** The supporting copy — overrides the `description` prop's rendering. */\n description(): unknown;\n /** The body content — used when neither `description` nor its slot is provided. */\n default(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<FeatureCardProps>(), { description: undefined });\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<InstanceType<typeof Card>>('el');\n\nconst hasBody = computed(\n () => props.description !== undefined || !!slots.description || !!slots.default,\n);\n\nconst classes = computed(() => cn('bg-card p-6', attrs.class as string | undefined));\n\nconst headingClasses = computed(() => cn('tracking-normal', !!slots.icon && 'mt-4'));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Card ref=\"el\" variant=\"outline\" radius=\"xl\" :elevation=\"0\" v-bind=\"rest\" :class=\"classes\">\n <span\n v-if=\"$slots.icon\"\n class=\"grid size-11 place-items-center rounded-lg bg-primary-soft text-primary\"\n >\n <slot name=\"icon\" />\n </span>\n <Heading :level=\"3\" size=\"md\" :class=\"headingClasses\">\n <slot name=\"title\">{{ props.title }}</slot>\n </Heading>\n <Text v-if=\"hasBody\" size=\"sm\" color=\"muted\" class=\"mt-2 leading-relaxed\">\n <slot name=\"description\">\n <template v-if=\"props.description !== undefined\">{{ props.description }}</template>\n <slot v-else />\n </slot>\n </Text>\n </Card>\n</template>\n","<script lang=\"ts\">\nexport interface StepCardProps {\n /** The step number — rendered as a large faint overlay top-right. */\n step: number;\n\n /**\n * The step title. React typed this `ReactNode`; a scalar stays a prop so it\n * remains the discriminator, and the same-named slot is the rich override.\n */\n title: string | number;\n\n /** The optional supporting copy below the title. Falls back to the default slot when omitted. */\n description?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport Card from '../card/Card.vue';\nimport Heading from '../heading/Heading.vue';\nimport Text from '../text/Text.vue';\n\n/**\n * Numbered \"how it works\" step — large faint step number overlay + tinted icon\n * badge + title + description. Outlined card; content-only (no baked routing).\n */\ndefineOptions({ name: 'StepCard', inheritAttrs: false });\n\n/**\n * React's `icon` was a structural `ReactNode` prop — a region with no prop\n * equivalent in Vue, so it becomes a slot. `title` / `description` stay props\n * (scalars) with a same-named slot as the rich override; the default slot is\n * the body fallback React spelled `description ?? children`.\n */\ndefineSlots<{\n /** The icon node rendered inside a tinted badge (`bg-primary-soft text-primary`). Size it yourself. */\n icon(): unknown;\n /** The step title — overrides the `title` prop's rendering. */\n title(): unknown;\n /** The supporting copy — overrides the `description` prop's rendering. */\n description(): unknown;\n /** The body content — used when neither `description` nor its slot is provided. */\n default(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<StepCardProps>(), { description: undefined });\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<InstanceType<typeof Card>>('el');\n\nconst hasBody = computed(\n () => props.description !== undefined || !!slots.description || !!slots.default,\n);\n\nconst classes = computed(() =>\n cn('relative overflow-hidden bg-card p-6', attrs.class as string | undefined),\n);\n\nconst headingClasses = computed(() => cn('tracking-normal', !!slots.icon && 'mt-4'));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Card ref=\"el\" variant=\"outline\" radius=\"xl\" :elevation=\"0\" v-bind=\"rest\" :class=\"classes\">\n <span class=\"absolute right-4 top-3 text-5xl font-bold text-foreground/5\">{{ props.step }}</span>\n <span\n v-if=\"$slots.icon\"\n class=\"grid size-11 place-items-center rounded-lg bg-primary-soft text-primary\"\n >\n <slot name=\"icon\" />\n </span>\n <Heading :level=\"3\" size=\"md\" :class=\"headingClasses\">\n <slot name=\"title\">{{ props.title }}</slot>\n </Heading>\n <Text v-if=\"hasBody\" size=\"sm\" color=\"muted\" class=\"mt-2\">\n <slot name=\"description\">\n <template v-if=\"props.description !== undefined\">{{ props.description }}</template>\n <slot v-else />\n </slot>\n </Text>\n </Card>\n</template>\n","<script lang=\"ts\">\nexport interface PricingCardProps {\n /**\n * The tier name (e.g. \"Pro\"). React typed this `ReactNode`; a scalar stays a\n * prop so it remains the discriminator, and the same-named slot is the rich\n * override. The same pairing applies to `price` / `cadence` / `tagline` /\n * `badgeLabel` below.\n */\n name: string | number;\n\n /** The headline price (e.g. \"$9\"). */\n price: string | number;\n\n /** The billing cadence beside the price (e.g. \"/mo\"). */\n cadence?: string | number;\n\n /** The short positioning line below the price. */\n tagline?: string | number;\n\n /** The feature bullets — each rendered with a leading `Check`. Override a row's rendering with the scoped `feature` slot. */\n features: ReadonlyArray<string | number>;\n\n /** The featured state — highlights this tier with a primary border + shadow + a badge. */\n featured?: boolean;\n\n /** The badge label shown when `featured`. Default \"Most popular\". */\n badgeLabel?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { Check } from 'lucide-vue-next';\nimport { cn } from '../../../foundation/utils';\nimport { Icon } from '../../../foundation/icons';\nimport Badge from '../badge/Badge.vue';\nimport Card from '../card/Card.vue';\nimport Heading from '../heading/Heading.vue';\nimport Text from '../text/Text.vue';\n\n/**\n * Pricing tier card — name + price baseline + tagline + checked feature list +\n * bottom-pinned CTA slot. Content-only: the CTA is the default slot, never baked\n * routing. `featured` adds a primary border, shadow, and \"Most popular\" badge.\n */\ndefineOptions({ name: 'PricingCard', inheritAttrs: false });\n\n/**\n * React's `children` was the CTA region; it becomes the default slot. Every\n * scalar prop above pairs with a same-named override slot, and `feature` is\n * scoped so a consumer can render a rich bullet per entry.\n */\ndefineSlots<{\n /** The tier name — overrides the `name` prop's rendering. */\n name(): unknown;\n /** The headline price — overrides the `price` prop's rendering. */\n price(): unknown;\n /** The billing cadence — overrides the `cadence` prop's rendering. */\n cadence(): unknown;\n /** The positioning line — overrides the `tagline` prop's rendering. */\n tagline(): unknown;\n /** The featured badge label — overrides the `badgeLabel` prop's rendering. */\n badgeLabel(): unknown;\n /** One feature bullet — overrides the row body (the leading `Check` stays). */\n feature(props: { feature: string | number; index: number }): unknown;\n /** The CTA pinned to the bottom — pass a `Button`. */\n default(): unknown;\n}>();\n\nconst props = withDefaults(defineProps<PricingCardProps>(), {\n cadence: undefined,\n tagline: undefined,\n featured: false,\n badgeLabel: 'Most popular',\n});\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<InstanceType<typeof Card>>('el');\n\nconst classes = computed(() =>\n cn(\n 'relative flex flex-col bg-card p-6',\n props.featured ? 'border-primary shadow-lg shadow-primary/10' : 'border-border',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <Card ref=\"el\" variant=\"outline\" radius=\"2xl\" :elevation=\"0\" v-bind=\"rest\" :class=\"classes\">\n <Badge\n v-if=\"props.featured\"\n variant=\"brand\"\n size=\"md\"\n class=\"absolute -top-3 left-6 bg-primary px-3 py-1 text-xs font-medium text-primary-foreground\"\n >\n <slot name=\"badgeLabel\">{{ props.badgeLabel }}</slot>\n </Badge>\n <Heading :level=\"3\" size=\"md\" class=\"tracking-normal\">\n <slot name=\"name\">{{ props.name }}</slot>\n </Heading>\n <div class=\"mt-2 flex items-baseline gap-1\">\n <span class=\"text-3xl font-bold tracking-tight\">\n <slot name=\"price\">{{ props.price }}</slot>\n </span>\n <Text v-if=\"props.cadence !== undefined || $slots.cadence\" as=\"span\" size=\"sm\" color=\"muted\">\n <slot name=\"cadence\">{{ props.cadence }}</slot>\n </Text>\n </div>\n <Text v-if=\"props.tagline !== undefined || $slots.tagline\" size=\"sm\" color=\"muted\" class=\"mt-2\">\n <slot name=\"tagline\">{{ props.tagline }}</slot>\n </Text>\n <ul class=\"mt-5 flex flex-1 flex-col gap-2.5\">\n <li\n v-for=\"(feature, index) in props.features\"\n :key=\"index\"\n class=\"flex items-start gap-2 text-sm\"\n >\n <Icon :icon=\"Check\" :size=\"16\" class=\"mt-0.5 text-primary\" />\n <span><slot name=\"feature\" :feature=\"feature\" :index=\"index\">{{ feature }}</slot></span>\n </li>\n </ul>\n <div v-if=\"$slots.default\" class=\"mt-6\"><slot /></div>\n </Card>\n</template>\n","import { inject, type InjectionKey } from 'vue';\n\n/** The drag state a `Sortable` root shares with its items and handles. */\nexport interface SortableContextValue {\n dragIndex: number | null;\n overIndex: number | null;\n begin: (index: number) => void;\n hover: (index: number) => void;\n end: () => void;\n move: (from: number, to: number) => void;\n}\n\nexport const SortableKey: InjectionKey<SortableContextValue> = Symbol('wow-two.sortable');\n\n/** The per-row state a `SortableItem` shares with its handle. */\nexport interface SortableItemContextValue {\n index: number;\n arm: () => void;\n disarm: () => void;\n}\n\nexport const SortableItemKey: InjectionKey<SortableItemContextValue> =\n Symbol('wow-two.sortableItem');\n\n/** Reads the enclosing `Sortable` drag state. */\nexport function useSortableRoot(): SortableContextValue {\n const context = inject(SortableKey, null);\n if (!context) throw new Error('Sortable.Item must be rendered inside <Sortable>.');\n return context;\n}\n\n/** Reads the enclosing `SortableItem` state. */\nexport function useSortableItem(): SortableItemContextValue {\n const context = inject(SortableItemKey, null);\n if (!context) throw new Error('Sortable.Handle must be rendered inside <Sortable.Item>.');\n return context;\n}\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `SortableProps` and consumers import it. Its one\n member, `onReorder`, is the `reorder` emit below; every div attribute falls through. */\nexport interface SortableProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport { SortableKey, type SortableContextValue } from './SortableContext';\n\n/**\n * Drag-to-reorder list. Headless behavior + minimal styling — consumers render their own rows.\n * Reorder fires the `reorder` emit; the consumer owns the array and re-renders.\n * Drag is handle-initiated (the row only becomes draggable while a `SortableHandle` is pressed),\n * so inputs/selects inside a row stay interactive. Keyboard: focus a handle, Arrow Up/Down to move.\n *\n * React attached the parts as `Sortable.Item` / `.Handle` via `Object.assign`. An SFC's\n * generated default export cannot carry statics cleanly, so they ship as siblings:\n * `SortableItem`, `SortableHandle`.\n */\ndefineOptions({ name: 'Sortable', inheritAttrs: false });\n\n/** The `SortableItem` rows — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\n/**\n * React's `onReorder`. Emits the `from`/`to` indices when a drag or keyboard move\n * completes — move the item at `from` to `to`. Indices are raw; clamp in the handler.\n */\nconst emit = defineEmits<{\n reorder: [from: number, to: number];\n}>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\nconst dragIndex = ref<number | null>(null);\nconst overIndex = ref<number | null>(null);\n/* Plain locals, not refs — React held these in `useRef` because the drop handler\n must read the latest values without waiting for a re-render. */\nlet dragged: number | null = null;\nlet over: number | null = null;\n\nfunction begin(index: number): void {\n dragged = index;\n dragIndex.value = index;\n}\n\nfunction hover(index: number): void {\n over = index;\n overIndex.value = index;\n}\n\nfunction end(): void {\n const from = dragged;\n const to = over;\n if (from !== null && to !== null && from !== to) emit('reorder', from, to);\n dragged = null;\n over = null;\n dragIndex.value = null;\n overIndex.value = null;\n}\n\nfunction move(from: number, to: number): void {\n if (from !== to && to >= 0) emit('reorder', from, to);\n}\n\n/* Live getters on the two indices — every mounted item reads them each render. */\nprovide<SortableContextValue>(SortableKey, {\n get dragIndex() {\n return dragIndex.value;\n },\n get overIndex() {\n return overIndex.value;\n },\n begin,\n hover,\n end,\n move,\n});\n\nconst classes = computed(() => cn('flex flex-col', attrs.class as string | undefined));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div ref=\"el\" v-bind=\"rest\" :class=\"classes\"><slot /></div>\n</template>\n","<script lang=\"ts\">\nexport interface SortableItemProps {\n /** The zero-based position of this item in the list. */\n index: number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, provide, ref, useAttrs, useTemplateRef } from 'vue';\nimport { cn } from '../../../foundation/utils';\nimport {\n SortableItemKey,\n useSortableRoot,\n type SortableItemContextValue,\n} from './SortableContext';\n\n/** One reorderable row. Becomes `draggable` only while its `SortableHandle` is pressed. */\ndefineOptions({ name: 'SortableItem', inheritAttrs: false });\n\n/** The row content — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst props = defineProps<SortableItemProps>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst root = useSortableRoot();\n\nconst armed = ref(false);\n\nconst isDragging = computed(() => root.dragIndex === props.index);\nconst isOver = computed(\n () => root.overIndex === props.index && root.dragIndex !== null && root.dragIndex !== props.index,\n);\n\nprovide<SortableItemContextValue>(SortableItemKey, {\n get index() {\n return props.index;\n },\n arm: () => {\n armed.value = true;\n },\n disarm: () => {\n armed.value = false;\n },\n});\n\nfunction onDragStart(event: DragEvent): void {\n if (event.dataTransfer) event.dataTransfer.effectAllowed = 'move';\n root.begin(props.index);\n}\n\nfunction onDragOver(event: DragEvent): void {\n if (root.dragIndex !== null) event.preventDefault();\n}\n\nfunction onDrop(event: DragEvent): void {\n event.preventDefault();\n root.end();\n armed.value = false;\n}\n\nfunction onDragEnd(): void {\n root.end();\n armed.value = false;\n}\n\nconst classes = computed(() =>\n cn('transition-opacity', isDragging.value && 'opacity-50', attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n :draggable=\"armed\"\n :data-dragging=\"isDragging || undefined\"\n :data-over=\"isOver || undefined\"\n v-bind=\"rest\"\n :class=\"classes\"\n @dragstart=\"onDragStart\"\n @dragenter=\"root.hover(props.index)\"\n @dragover=\"onDragOver\"\n @drop=\"onDrop\"\n @dragend=\"onDragEnd\"\n >\n <slot />\n </div>\n</template>\n","<script lang=\"ts\">\n/* eslint-disable-next-line @typescript-eslint/no-empty-object-type -- kept as an\n exported name: React declared `SortableHandleProps` and consumers import it.\n It was an alias for the native button props, all of which fall through here. */\nexport interface SortableHandleProps {}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useTemplateRef } from 'vue';\nimport { cn, Key } from '../../../foundation/utils';\nimport { useSortableItem, useSortableRoot } from './SortableContext';\n\n/** The grab affordance of a `SortableItem`. Pointer arms the drag; Arrow Up/Down moves by one. */\ndefineOptions({ name: 'SortableHandle', inheritAttrs: false });\n\n/** The handle glyph — React's `children`. */\ndefineSlots<{ default(): unknown }>();\n\nconst attrs = useAttrs();\nconst el = useTemplateRef<HTMLButtonElement>('el');\nconst item = useSortableItem();\nconst root = useSortableRoot();\n\n/* Own handler runs after any consumer `@keydown` that arrived through `rest`\n (React called `onKeyDown?.(e)` last instead); `defaultPrevented` is the\n consumer's opt-out either way. */\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented) return;\n if (event.key === Key.ArrowUp) {\n event.preventDefault();\n root.move(item.index, item.index - 1);\n } else if (event.key === Key.ArrowDown) {\n event.preventDefault();\n root.move(item.index, item.index + 1);\n }\n}\n\nconst classes = computed(() =>\n cn(\n 'inline-flex cursor-grab touch-none items-center justify-center text-subtle-foreground transition-colors hover:text-muted-foreground active:cursor-grabbing',\n attrs.class as string | undefined,\n ),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <button\n ref=\"el\"\n type=\"button\"\n aria-label=\"Drag to reorder\"\n aria-roledescription=\"sortable item handle\"\n v-bind=\"rest\"\n :class=\"classes\"\n @pointerdown=\"item.arm\"\n @pointerup=\"item.disarm\"\n @blur=\"item.disarm\"\n @keydown=\"onKeydown\"\n >\n <slot />\n </button>\n</template>\n"],"names":["_createBlock","_resolveDynamicComponent","_mergeProps","_renderSlot","_openBlock","_createElementBlock","$slots","_hoisted_1","_Fragment","_renderList","_normalizeClass","Avatar","_unref","Portal","_createVNode","AnchoredPositioner","_createElementVNode","_createTextVNode","_toDisplayString","SIZE","Heading","Text","Icon","_hoisted_2","Code","TONE","POS","Badge","Kbd","Inline","Mark","$attrs","CollapsibleContentInner","Orientation","_hoisted_3","OrientationValue","_hoisted_4","TreeNodeRow","TreeGroupContent","Table","TableHead","TableRow","TableHeaderCell","_normalizeStyle","TableBody","TableCell","next","CarouselDot","TextVNode","i","j","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_9","_hoisted_10","_hoisted_11","TONE_CLASS","_hoisted_8","TemporalRuntime","CellEditor","SPEEDS","formatTime","AudioWaveform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