@vllnt/ui 0.2.1-canary.06f0e84 → 0.2.1-canary.0cc4e50

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 (177) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/components/accordion/accordion.js +2 -2
  3. package/dist/components/activity-heatmap/activity-heatmap.js +17 -14
  4. package/dist/components/activity-log/activity-log.js +6 -6
  5. package/dist/components/agent-activity/agent-activity.js +8 -8
  6. package/dist/components/ai-artifact/ai-artifact.js +16 -16
  7. package/dist/components/ai-chat-input/ai-chat-input.js +3 -3
  8. package/dist/components/ai-message-bubble/ai-message-bubble.js +2 -2
  9. package/dist/components/ai-sidebar/ai-sidebar.js +8 -8
  10. package/dist/components/ai-source-citation/ai-source-citation.js +2 -2
  11. package/dist/components/ai-tool-call-display/ai-tool-call-display.js +5 -5
  12. package/dist/components/animated-text/animated-text.js +7 -7
  13. package/dist/components/annotation/annotation.js +1 -1
  14. package/dist/components/auto-reload/auto-reload.js +14 -4
  15. package/dist/components/avatar/avatar.js +1 -1
  16. package/dist/components/avatar-group/avatar-group.js +5 -5
  17. package/dist/components/banner/banner.js +3 -3
  18. package/dist/components/blog-card/blog-card.js +4 -2
  19. package/dist/components/bottom-activity-strip/bottom-activity-strip.js +3 -3
  20. package/dist/components/breadcrumb/breadcrumb.js +33 -26
  21. package/dist/components/button/button.js +1 -1
  22. package/dist/components/calendar/calendar.js +6 -6
  23. package/dist/components/callout/callout.js +1 -1
  24. package/dist/components/candlestick-chart/candlestick-chart.js +3 -2
  25. package/dist/components/canvas-shell/canvas-foundation-demo.js +5 -5
  26. package/dist/components/carousel/carousel.js +18 -10
  27. package/dist/components/category-filter/category-filter.js +1 -1
  28. package/dist/components/chat-dock-section/chat-dock-section.js +2 -2
  29. package/dist/components/checkbox/checkbox.js +2 -2
  30. package/dist/components/checklist/checklist.js +38 -10
  31. package/dist/components/checklist/index.js +8 -2
  32. package/dist/components/chronological-timeline/chronological-timeline.js +8 -7
  33. package/dist/components/civilization-card/civilization-card.js +1 -1
  34. package/dist/components/code-block/code-block.js +2 -2
  35. package/dist/components/code-playground/code-playground.js +11 -9
  36. package/dist/components/combobox/combobox.js +3 -8
  37. package/dist/components/command/command.js +1 -1
  38. package/dist/components/comment-pin/comment-pin.js +3 -3
  39. package/dist/components/comparison/comparison.js +11 -10
  40. package/dist/components/completion-dialog/completion-dialog.js +20 -12
  41. package/dist/components/connector-edge/connector-edge.js +1 -1
  42. package/dist/components/content-intro/content-intro.js +25 -21
  43. package/dist/components/context-menu/context-menu.js +4 -4
  44. package/dist/components/conversation-thread/conversation-thread.js +9 -9
  45. package/dist/components/cookie-consent/cookie-consent.js +1 -1
  46. package/dist/components/copy-button/copy-button.js +3 -3
  47. package/dist/components/countdown-timer/countdown-timer.js +9 -8
  48. package/dist/components/credit-badge/credit-badge.js +1 -7
  49. package/dist/components/curriculum/curriculum.js +10 -10
  50. package/dist/components/data-list/data-list.js +1 -1
  51. package/dist/components/data-table/data-table.js +6 -5
  52. package/dist/components/date-picker/date-picker.js +2 -7
  53. package/dist/components/dialog/dialog.js +1 -1
  54. package/dist/components/dropdown-menu/dropdown-menu.js +3 -3
  55. package/dist/components/empty-state/empty-state.js +3 -3
  56. package/dist/components/exercise/exercise.js +15 -7
  57. package/dist/components/faq/faq.js +8 -4
  58. package/dist/components/file-upload/file-upload.js +4 -9
  59. package/dist/components/filter-bar/filter-bar.js +9 -8
  60. package/dist/components/flashcard/flashcard.js +2 -2
  61. package/dist/components/floating-action-button/floating-action-button.js +1 -1
  62. package/dist/components/floating-toolbar/floating-toolbar.js +3 -3
  63. package/dist/components/flow-diagram/flow-controls.js +9 -9
  64. package/dist/components/flow-diagram/flow-error-boundary.js +2 -2
  65. package/dist/components/flow-diagram/flow-fullscreen.js +2 -2
  66. package/dist/components/form/form.js +1 -1
  67. package/dist/components/gantt-chart/gantt-chart.js +22 -19
  68. package/dist/components/globe-3d/globe-3d.js +16 -4
  69. package/dist/components/handoff-beacon/handoff-beacon.js +1 -1
  70. package/dist/components/historic-timeline/historic-timeline.js +2 -2
  71. package/dist/components/historical-figure-card/historical-figure-card.js +4 -7
  72. package/dist/components/horizontal-scroll-row/horizontal-scroll-row.js +6 -5
  73. package/dist/components/inline-input/inline-input.js +1 -1
  74. package/dist/components/input-otp/input-otp.js +1 -1
  75. package/dist/components/interactive-timeline/interactive-timeline.js +12 -9
  76. package/dist/components/jarvis-dock/jarvis-dock.js +4 -4
  77. package/dist/components/key-concept/key-concept.js +6 -5
  78. package/dist/components/keyboard-shortcuts-help/keyboard-shortcuts-help.js +4 -3
  79. package/dist/components/knowledge-check/knowledge-check.js +5 -5
  80. package/dist/components/lang-provider/lang-provider.js +3 -3
  81. package/dist/components/learning-objectives/learning-objectives.js +14 -13
  82. package/dist/components/live-feed/live-feed.js +17 -15
  83. package/dist/components/map-2d/map-2d.js +3 -3
  84. package/dist/components/map-timeline/map-timeline.js +5 -5
  85. package/dist/components/market-treemap/market-treemap.js +3 -3
  86. package/dist/components/mdx-content/mdx-content.js +19 -9
  87. package/dist/components/menubar/menubar.js +4 -4
  88. package/dist/components/metric-cluster/metric-cluster.js +1 -1
  89. package/dist/components/metric-gauge/metric-gauge.js +2 -2
  90. package/dist/components/model-comparison/model-comparison.js +2 -2
  91. package/dist/components/model-selector/model-selector.js +3 -3
  92. package/dist/components/multi-select/multi-select.js +4 -4
  93. package/dist/components/navbar-saas/navbar-saas.js +8 -7
  94. package/dist/components/navigation-menu/navigation-menu.js +2 -2
  95. package/dist/components/newsletter-signup/newsletter-signup.js +3 -3
  96. package/dist/components/number-input/number-input.js +2 -2
  97. package/dist/components/number-ticker/number-ticker.js +11 -4
  98. package/dist/components/object-card/object-card.js +1 -1
  99. package/dist/components/object-inspector/object-inspector.js +1 -1
  100. package/dist/components/order-book/order-book.js +2 -2
  101. package/dist/components/overview-board/overview-board.js +1 -1
  102. package/dist/components/parallel-timeline/parallel-timeline.js +2 -2
  103. package/dist/components/password-input/password-input.js +1 -1
  104. package/dist/components/plan-badge/plan-badge.js +1 -7
  105. package/dist/components/policy-delivery-panel/policy-delivery-panel.js +2 -2
  106. package/dist/components/presence-stack/presence-stack.js +2 -2
  107. package/dist/components/presence-sync-indicator/presence-sync-indicator.js +1 -1
  108. package/dist/components/pricing-table/pricing-table.js +3 -3
  109. package/dist/components/pro-tip/pro-tip.js +6 -6
  110. package/dist/components/profile-section/profile-section.js +3 -2
  111. package/dist/components/progress-card/progress-card.js +5 -4
  112. package/dist/components/progress-tracker/progress-tracker.js +24 -14
  113. package/dist/components/prompt-templates/prompt-templates.js +4 -4
  114. package/dist/components/quiz/quiz.js +7 -6
  115. package/dist/components/radio-group/radio-group.js +2 -2
  116. package/dist/components/rating/rating.js +3 -3
  117. package/dist/components/relationship-inspector/relationship-inspector.js +2 -2
  118. package/dist/components/resizable/resizable.js +1 -1
  119. package/dist/components/routing-assignment-panel/routing-assignment-panel.js +2 -2
  120. package/dist/components/run-timeline/run-timeline.js +2 -2
  121. package/dist/components/runtime-overview-panel/runtime-overview-panel.js +1 -1
  122. package/dist/components/scope-selector/scope-selector.js +8 -8
  123. package/dist/components/search-bar/search-bar.js +24 -2
  124. package/dist/components/search-dialog/search-dialog.js +484 -51
  125. package/dist/components/select/select.js +5 -5
  126. package/dist/components/selection-halo/selection-halo.js +1 -1
  127. package/dist/components/severity-badge/severity-badge.js +2 -2
  128. package/dist/components/share-dialog/share-dialog.js +2 -2
  129. package/dist/components/share-section/share-section.js +2 -1
  130. package/dist/components/sheet/sheet.js +1 -1
  131. package/dist/components/sidebar/sidebar.js +31 -26
  132. package/dist/components/sidebar-toggle/sidebar-toggle.js +3 -3
  133. package/dist/components/slider/slider.js +1 -1
  134. package/dist/components/slideshow/slideshow.js +15 -13
  135. package/dist/components/social-fab/social-fab.js +12 -11
  136. package/dist/components/sparkline-grid/sparkline-grid.js +1 -1
  137. package/dist/components/spinner/spinner.js +4 -4
  138. package/dist/components/spinner/unicode-spinner.js +4 -2
  139. package/dist/components/stat-card/stat-card.js +5 -5
  140. package/dist/components/state-badge-overlay/state-badge-overlay.js +1 -1
  141. package/dist/components/status-board/status-board.js +14 -7
  142. package/dist/components/status-indicator/status-indicator.js +3 -3
  143. package/dist/components/step-by-step/step-by-step.js +10 -8
  144. package/dist/components/step-navigation/step-navigation.js +2 -2
  145. package/dist/components/stepper/stepper.js +3 -3
  146. package/dist/components/sticky-metric/sticky-metric.js +1 -1
  147. package/dist/components/subscription-card/subscription-card.js +1 -1
  148. package/dist/components/switch/switch.js +1 -1
  149. package/dist/components/table-of-contents/table-of-contents.js +5 -2
  150. package/dist/components/table-of-contents-panel/table-of-contents-panel.js +8 -6
  151. package/dist/components/tabs/tabs.js +26 -8
  152. package/dist/components/tags-input/tags-input.js +12 -4
  153. package/dist/components/terminal/terminal.js +59 -37
  154. package/dist/components/theme-toggle/theme-toggle.js +2 -2
  155. package/dist/components/thinking-block/thinking-block.js +3 -3
  156. package/dist/components/ticker-tape/ticker-tape.js +4 -4
  157. package/dist/components/timeline/timeline.js +2 -2
  158. package/dist/components/timeline-scrubber/timeline-scrubber.js +2 -2
  159. package/dist/components/tldr-section/tldr-section.js +11 -9
  160. package/dist/components/tour/tour.js +2 -2
  161. package/dist/components/transaction-list/transaction-list.js +30 -9
  162. package/dist/components/tree-view/tree-view.js +2 -2
  163. package/dist/components/tutorial-card/tutorial-card.js +1 -1
  164. package/dist/components/tutorial-complete/tutorial-complete.js +16 -14
  165. package/dist/components/tutorial-filters/tutorial-filters.js +2 -2
  166. package/dist/components/tutorial-intro-content/tutorial-intro-content.js +5 -5
  167. package/dist/components/tutorial-mdx/tutorial-mdx.js +6 -6
  168. package/dist/components/usage-breakdown/usage-breakdown.js +10 -6
  169. package/dist/components/video-embed/video-embed.js +2 -2
  170. package/dist/components/viewport-bookmarks/viewport-bookmarks.js +3 -3
  171. package/dist/components/wallet-card/wallet-card.js +1 -1
  172. package/dist/components/watchlist/watchlist.js +7 -6
  173. package/dist/components/world-breadcrumbs/world-breadcrumbs.js +2 -2
  174. package/dist/components/world-clock-bar/world-clock-bar.js +35 -14
  175. package/dist/components/zoom-hud/zoom-hud.js +1 -1
  176. package/dist/index.d.ts +114 -30
  177. package/package.json +3 -3
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { CalendarIcon } from "lucide-react";
5
5
  import { cn } from "../../lib/utils";
6
- import { Button } from "../button";
6
+ import { Button } from "../button/button";
7
7
  import { Calendar } from "../calendar";
8
8
  import { Popover, PopoverContent, PopoverTrigger } from "../popover";
9
9
  const defaultDateFormatter = new Intl.DateTimeFormat("en-US", {
@@ -25,11 +25,6 @@ const DatePicker = React.forwardRef(
25
25
  value
26
26
  );
27
27
  const selectedDate = value ?? internalValue;
28
- React.useEffect(() => {
29
- if (value !== void 0) {
30
- setInternalValue(value);
31
- }
32
- }, [value]);
33
28
  const handleSelect = (nextDate) => {
34
29
  if (value === void 0) {
35
30
  setInternalValue(nextDate);
@@ -51,7 +46,7 @@ const DatePicker = React.forwardRef(
51
46
  ref: reference,
52
47
  variant: "outline",
53
48
  children: [
54
- /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
49
+ /* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 size-4" }),
55
50
  selectedDate ? defaultDateFormatter.format(selectedDate) : placeholder
56
51
  ]
57
52
  }
@@ -34,7 +34,7 @@ const DialogContent = React.forwardRef(({ children, className, ...props }, refer
34
34
  children: [
35
35
  children,
36
36
  /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
37
- /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
37
+ /* @__PURE__ */ jsx(X, { className: "size-4" }),
38
38
  /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
39
39
  ] })
40
40
  ]
@@ -75,7 +75,7 @@ const DropdownMenuCheckboxItem = React.forwardRef(({ checked, children, classNam
75
75
  ref: reference,
76
76
  ...props,
77
77
  children: [
78
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u2713" }) }) }),
78
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u2713" }) }) }),
79
79
  children
80
80
  ]
81
81
  }
@@ -91,7 +91,7 @@ const DropdownMenuRadioItem = React.forwardRef(({ children, className, ...props
91
91
  ref: reference,
92
92
  ...props,
93
93
  children: [
94
- /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u25CB" }) }) }),
94
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u25CB" }) }) }),
95
95
  children
96
96
  ]
97
97
  }
@@ -113,7 +113,7 @@ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
113
113
  const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, reference) => /* @__PURE__ */ jsx(
114
114
  DropdownMenuPrimitive.Separator,
115
115
  {
116
- className: cn("-mx-1 my-1 h-px bg-muted", className),
116
+ className: cn("-m-1 h-px bg-muted", className),
117
117
  ref: reference,
118
118
  ...props
119
119
  }
@@ -51,9 +51,9 @@ const iconVariants = cva(
51
51
  },
52
52
  variants: {
53
53
  size: {
54
- lg: "h-16 w-16",
55
- md: "h-12 w-12",
56
- sm: "h-8 w-8"
54
+ lg: "size-16",
55
+ md: "size-12",
56
+ sm: "size-8"
57
57
  }
58
58
  }
59
59
  }
@@ -3,18 +3,24 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import { Check, Dumbbell, Eye, EyeOff } from "lucide-react";
5
5
  import { cn } from "../../lib/utils";
6
- import { Button } from "../button";
6
+ import { Button } from "../button/button";
7
7
  const difficultyConfig = {
8
8
  easy: { className: "text-green-600 dark:text-green-400", label: "Easy" },
9
9
  hard: { className: "text-red-600 dark:text-red-400", label: "Hard" },
10
10
  medium: { className: "text-amber-600 dark:text-amber-400", label: "Medium" }
11
11
  };
12
- function ExerciseHeader({ completed, config, onToggle, title }) {
12
+ function ExerciseHeader({
13
+ completed,
14
+ config,
15
+ Heading,
16
+ onToggle,
17
+ title
18
+ }) {
13
19
  return /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 mb-4", children: [
14
20
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
15
- /* @__PURE__ */ jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ jsx(Dumbbell, { className: "h-5 w-5 text-primary" }) }),
21
+ /* @__PURE__ */ jsx("div", { className: "flex size-10 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ jsx(Dumbbell, { className: "size-5 text-primary" }) }),
16
22
  /* @__PURE__ */ jsxs("div", { children: [
17
- /* @__PURE__ */ jsx("h4", { className: "font-semibold text-foreground", children: title }),
23
+ /* @__PURE__ */ jsx(Heading, { className: "font-semibold text-foreground", children: title }),
18
24
  /* @__PURE__ */ jsx("span", { className: cn("text-xs font-medium", config.className), children: config.label })
19
25
  ] })
20
26
  ] }),
@@ -26,7 +32,7 @@ function ExerciseHeader({ completed, config, onToggle, title }) {
26
32
  size: "sm",
27
33
  variant: completed ? "default" : "outline",
28
34
  children: completed ? /* @__PURE__ */ jsxs(Fragment, { children: [
29
- /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 mr-1" }),
35
+ /* @__PURE__ */ jsx(Check, { className: "size-4 mr-1" }),
30
36
  "Done"
31
37
  ] }) : "Mark Complete"
32
38
  }
@@ -50,10 +56,10 @@ function ExerciseHint({ hint, onShow, showHint }) {
50
56
  function ExerciseSolution({ onToggle, showSolution, solution }) {
51
57
  return /* @__PURE__ */ jsxs("div", { children: [
52
58
  /* @__PURE__ */ jsx(Button, { className: "mb-3", onClick: onToggle, size: "sm", variant: "outline", children: showSolution ? /* @__PURE__ */ jsxs(Fragment, { children: [
53
- /* @__PURE__ */ jsx(EyeOff, { className: "h-4 w-4 mr-1" }),
59
+ /* @__PURE__ */ jsx(EyeOff, { className: "size-4 mr-1" }),
54
60
  "Hide Solution"
55
61
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
56
- /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4 mr-1" }),
62
+ /* @__PURE__ */ jsx(Eye, { className: "size-4 mr-1" }),
57
63
  "Show Solution"
58
64
  ] }) }),
59
65
  showSolution ? /* @__PURE__ */ jsxs("div", { className: "p-4 rounded-lg bg-card border text-sm [&>pre]:my-0", children: [
@@ -63,6 +69,7 @@ function ExerciseSolution({ onToggle, showSolution, solution }) {
63
69
  ] });
64
70
  }
65
71
  function Exercise({
72
+ as: Heading = "h4",
66
73
  children,
67
74
  difficulty = "medium",
68
75
  hint,
@@ -78,6 +85,7 @@ function Exercise({
78
85
  {
79
86
  completed,
80
87
  config: difficultyConfig[difficulty],
88
+ Heading,
81
89
  onToggle: () => {
82
90
  setCompleted(!completed);
83
91
  },
@@ -20,7 +20,7 @@ function FAQItem({ children, defaultOpen = false, question }) {
20
20
  ChevronDown,
21
21
  {
22
22
  className: cn(
23
- "h-4 w-4 flex-shrink-0 transition-transform duration-200",
23
+ "size-4 flex-shrink-0 transition-transform duration-200",
24
24
  isOpen && "rotate-180"
25
25
  )
26
26
  }
@@ -40,11 +40,15 @@ function FAQItem({ children, defaultOpen = false, question }) {
40
40
  )
41
41
  ] });
42
42
  }
43
- function FAQ({ children, title = "Frequently Asked Questions" }) {
43
+ function FAQ({
44
+ as: Heading = "h4",
45
+ children,
46
+ title = "Frequently Asked Questions"
47
+ }) {
44
48
  return /* @__PURE__ */ jsxs("div", { className: "my-6 rounded-lg border bg-card", children: [
45
49
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 p-4 border-b border-border", children: [
46
- /* @__PURE__ */ jsx(HelpCircle, { className: "h-5 w-5 text-primary" }),
47
- /* @__PURE__ */ jsx("h4", { className: "font-semibold", children: title })
50
+ /* @__PURE__ */ jsx(HelpCircle, { className: "size-5 text-primary" }),
51
+ /* @__PURE__ */ jsx(Heading, { className: "font-semibold", children: title })
48
52
  ] }),
49
53
  /* @__PURE__ */ jsx("div", { className: "px-4", children })
50
54
  ] });
@@ -3,16 +3,11 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { FileUp, UploadCloud, X } from "lucide-react";
5
5
  import { cn } from "../../lib/utils";
6
- import { Button } from "../button";
6
+ import { Button } from "../button/button";
7
7
  function useFileUploadState(controlledFiles, multiple, onFilesChange) {
8
8
  const [internalFiles, setInternalFiles] = React.useState(
9
9
  controlledFiles ?? []
10
10
  );
11
- React.useEffect(() => {
12
- if (controlledFiles !== void 0) {
13
- setInternalFiles(controlledFiles);
14
- }
15
- }, [controlledFiles]);
16
11
  const resolvedFiles = controlledFiles ?? internalFiles;
17
12
  const updateFiles = React.useCallback(
18
13
  (nextFiles) => {
@@ -73,7 +68,7 @@ function FileListItem({
73
68
  size: "icon",
74
69
  type: "button",
75
70
  variant: "ghost",
76
- children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
71
+ children: /* @__PURE__ */ jsx(X, { className: "size-4" })
77
72
  }
78
73
  )
79
74
  ] });
@@ -127,13 +122,13 @@ function FileUploadDropzone({
127
122
  role: "button",
128
123
  tabIndex: disabled ? -1 : 0,
129
124
  children: [
130
- /* @__PURE__ */ jsx(UploadCloud, { className: "mb-3 h-10 w-10 text-muted-foreground" }),
125
+ /* @__PURE__ */ jsx(UploadCloud, { className: "mb-3 size-10 text-muted-foreground" }),
131
126
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
132
127
  /* @__PURE__ */ jsx("p", { className: "font-medium", children: dropzoneText }),
133
128
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: helperText })
134
129
  ] }),
135
130
  /* @__PURE__ */ jsxs("span", { className: "mt-4 inline-flex h-10 items-center justify-center rounded-md border border-input bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground shadow-sm", children: [
136
- /* @__PURE__ */ jsx(FileUp, { className: "mr-2 h-4 w-4" }),
131
+ /* @__PURE__ */ jsx(FileUp, { className: "mr-2 size-4" }),
137
132
  browseLabel
138
133
  ] }),
139
134
  children
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { memo, useCallback, useState } from "react";
3
+ import { memo, useCallback, useTransition } from "react";
4
4
  import { cn } from "../../lib/utils";
5
- import { Badge } from "../badge";
5
+ import { Badge } from "../badge/badge";
6
6
  function SearchInput({
7
7
  disabled,
8
8
  label,
@@ -149,25 +149,26 @@ const DEFAULT_LABELS = {
149
149
  searchPlaceholder: "Search...",
150
150
  tagsLabel: "Tags:"
151
151
  };
152
+ const EMPTY_FILTER_BAR_LABELS = {};
152
153
  function FilterBarImpl({
153
154
  className,
154
155
  currentDifficulty,
155
156
  currentTags,
156
157
  difficultyOptions,
157
- labels = {},
158
+ labels = EMPTY_FILTER_BAR_LABELS,
158
159
  onFiltersChange,
159
160
  searchQuery,
160
161
  tags
161
162
  }) {
162
- const [isPending, setIsPending] = useState(false);
163
+ const [isPending, startTransition] = useTransition();
163
164
  const mergedLabels = { ...DEFAULT_LABELS, ...labels };
164
165
  const handleDifficultyChange = useCallback(
165
166
  (difficulty) => {
166
- setIsPending(true);
167
- onFiltersChange({ difficulty });
168
- setIsPending(false);
167
+ startTransition(() => {
168
+ onFiltersChange({ difficulty });
169
+ });
169
170
  },
170
- [onFiltersChange]
171
+ [onFiltersChange, startTransition]
171
172
  );
172
173
  const handleSearchChange = useCallback(
173
174
  (search) => {
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import { RefreshCcw } from "lucide-react";
5
5
  import { cn } from "../../lib/utils";
6
- import { Badge } from "../badge";
6
+ import { Badge } from "../badge/badge";
7
7
  import { Button } from "../button";
8
8
  import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "../card";
9
9
  function Flashcard({
@@ -39,7 +39,7 @@ function Flashcard({
39
39
  /* @__PURE__ */ jsx(CardTitle, { children: title })
40
40
  ] }),
41
41
  /* @__PURE__ */ jsxs(Button, { onClick: toggleFlipped, size: "sm", variant: "outline", children: [
42
- /* @__PURE__ */ jsx(RefreshCcw, { className: "mr-2 h-4 w-4" }),
42
+ /* @__PURE__ */ jsx(RefreshCcw, { className: "mr-2 size-4" }),
43
43
  "Flip"
44
44
  ] })
45
45
  ] }),
@@ -14,7 +14,7 @@ function FloatingActionButtonImpl({
14
14
  {
15
15
  "aria-label": ariaLabel,
16
16
  className: cn(
17
- "fixed z-40 flex h-12 w-12 items-center justify-center rounded-full",
17
+ "fixed z-40 flex size-12 items-center justify-center rounded-full",
18
18
  "bg-primary text-primary-foreground shadow-lg",
19
19
  "transition-transform hover:scale-110",
20
20
  "focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
@@ -31,7 +31,7 @@ const FloatingToolbar = forwardRef(
31
31
  ...rest,
32
32
  children: actions.map((action) => {
33
33
  const variant = action.variant ?? "ghost";
34
- const handleClick = () => {
34
+ const handleActivateToolbarAction = () => {
35
35
  action.onActivate();
36
36
  };
37
37
  return /* @__PURE__ */ jsxs(
@@ -46,10 +46,10 @@ const FloatingToolbar = forwardRef(
46
46
  "data-action-id": action.id,
47
47
  "data-variant": variant,
48
48
  disabled: action.disabled,
49
- onClick: handleClick,
49
+ onClick: handleActivateToolbarAction,
50
50
  type: "button",
51
51
  children: [
52
- action.glyph ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "inline-flex h-3 w-3", children: action.glyph }) : null,
52
+ action.glyph ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: "inline-flex size-3", children: action.glyph }) : null,
53
53
  /* @__PURE__ */ jsx("span", { children: action.label })
54
54
  ]
55
55
  },
@@ -12,7 +12,7 @@ import {
12
12
  X
13
13
  } from "lucide-react";
14
14
  import { cn } from "../../lib/utils";
15
- const BUTTON_CLASS = "flex h-8 w-8 items-center justify-center rounded hover:bg-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed";
15
+ const BUTTON_CLASS = "flex size-8 items-center justify-center rounded hover:bg-muted transition-colors disabled:opacity-50 disabled:cursor-not-allowed";
16
16
  function ControlButton({
17
17
  disabled,
18
18
  icon,
@@ -36,14 +36,14 @@ function ControlButton({
36
36
  function getCopyIcon(status) {
37
37
  switch (status) {
38
38
  case "copying":
39
- return /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" });
39
+ return /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" });
40
40
  case "success":
41
- return /* @__PURE__ */ jsx(Check, { className: "h-4 w-4 text-green-500" });
41
+ return /* @__PURE__ */ jsx(Check, { className: "size-4 text-green-500" });
42
42
  case "error":
43
- return /* @__PURE__ */ jsx(X, { className: "h-4 w-4 text-destructive" });
43
+ return /* @__PURE__ */ jsx(X, { className: "size-4 text-destructive" });
44
44
  case "idle":
45
45
  case void 0:
46
- return /* @__PURE__ */ jsx(Copy, { className: "h-4 w-4" });
46
+ return /* @__PURE__ */ jsx(Copy, { className: "size-4" });
47
47
  }
48
48
  }
49
49
  function getCopyTitle(status) {
@@ -81,7 +81,7 @@ const FlowControls = memo(function FlowControls2({
81
81
  /* @__PURE__ */ jsx(
82
82
  ControlButton,
83
83
  {
84
- icon: /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4" }),
84
+ icon: /* @__PURE__ */ jsx(Plus, { className: "size-4" }),
85
85
  label: "Zoom in",
86
86
  onClick: onZoomIn,
87
87
  title: "Zoom in"
@@ -90,7 +90,7 @@ const FlowControls = memo(function FlowControls2({
90
90
  /* @__PURE__ */ jsx(
91
91
  ControlButton,
92
92
  {
93
- icon: /* @__PURE__ */ jsx(Minus, { className: "h-4 w-4" }),
93
+ icon: /* @__PURE__ */ jsx(Minus, { className: "size-4" }),
94
94
  label: "Zoom out",
95
95
  onClick: onZoomOut,
96
96
  title: "Zoom out"
@@ -100,7 +100,7 @@ const FlowControls = memo(function FlowControls2({
100
100
  /* @__PURE__ */ jsx(
101
101
  ControlButton,
102
102
  {
103
- icon: /* @__PURE__ */ jsx(Move, { className: "h-4 w-4" }),
103
+ icon: /* @__PURE__ */ jsx(Move, { className: "size-4" }),
104
104
  label: "Fit view",
105
105
  onClick: onFitView,
106
106
  title: "Fit view"
@@ -124,7 +124,7 @@ const FlowControls = memo(function FlowControls2({
124
124
  /* @__PURE__ */ jsx(
125
125
  ControlButton,
126
126
  {
127
- icon: /* @__PURE__ */ jsx(Maximize2, { className: "h-4 w-4" }),
127
+ icon: /* @__PURE__ */ jsx(Maximize2, { className: "size-4" }),
128
128
  label: "Fullscreen",
129
129
  onClick: onFullscreen,
130
130
  title: "Toggle fullscreen"
@@ -34,7 +34,7 @@ class FlowErrorBoundary extends Component {
34
34
  ),
35
35
  style: { height },
36
36
  children: [
37
- /* @__PURE__ */ jsx("div", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10", children: /* @__PURE__ */ jsx(AlertTriangle, { className: "h-6 w-6 text-destructive" }) }),
37
+ /* @__PURE__ */ jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-destructive/10", children: /* @__PURE__ */ jsx(AlertTriangle, { className: "size-6 text-destructive" }) }),
38
38
  /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
39
39
  /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium text-foreground", children: "Failed to render diagram" }),
40
40
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: error?.message ?? "An unexpected error occurred while rendering the flow diagram." })
@@ -46,7 +46,7 @@ class FlowErrorBoundary extends Component {
46
46
  onClick: this.handleRetry,
47
47
  type: "button",
48
48
  children: [
49
- /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" }),
49
+ /* @__PURE__ */ jsx(RefreshCw, { className: "size-4" }),
50
50
  "Try again"
51
51
  ]
52
52
  }
@@ -39,11 +39,11 @@ const FlowFullscreen = memo(function FlowFullscreen2({
39
39
  "button",
40
40
  {
41
41
  "aria-label": "Close fullscreen",
42
- className: "flex h-8 w-8 items-center justify-center rounded hover:bg-muted transition-colors",
42
+ className: "flex size-8 items-center justify-center rounded hover:bg-muted transition-colors",
43
43
  onClick: onClose,
44
44
  title: "Close fullscreen (Esc)",
45
45
  type: "button",
46
- children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
46
+ children: /* @__PURE__ */ jsx(X, { className: "size-5" })
47
47
  }
48
48
  ) }),
49
49
  /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-hidden", children })
@@ -10,7 +10,7 @@ import {
10
10
  useFormContext
11
11
  } from "react-hook-form";
12
12
  import { cn } from "../../lib/utils";
13
- import { Label } from "../label";
13
+ import { Label } from "../label/label";
14
14
  const FormRootContext = React.createContext(
15
15
  void 0
16
16
  );
@@ -50,23 +50,25 @@ function clamp(value, min, max) {
50
50
  function diffInDays(later, earlier) {
51
51
  return (later.getTime() - earlier.getTime()) / MS_PER_DAY;
52
52
  }
53
+ const TICK_FORMATTER_CACHE = /* @__PURE__ */ new Map();
54
+ function getTickDateTimeFormatter(locale, scale) {
55
+ const key = `${locale}|${scale}`;
56
+ let formatter = TICK_FORMATTER_CACHE.get(key);
57
+ if (!formatter) {
58
+ const options = scale === "month" ? { month: "short", year: "numeric" } : { day: "2-digit", month: "short" };
59
+ formatter = Intl.DateTimeFormat(locale, options);
60
+ TICK_FORMATTER_CACHE.set(key, formatter);
61
+ }
62
+ return formatter;
63
+ }
53
64
  function buildTickFormatter(scale, locale) {
54
65
  switch (scale) {
55
66
  case "day":
56
- return new Intl.DateTimeFormat(locale, {
57
- day: "2-digit",
58
- month: "short"
59
- }).format;
67
+ return getTickDateTimeFormatter(locale, "day").format;
60
68
  case "week":
61
- return new Intl.DateTimeFormat(locale, {
62
- day: "2-digit",
63
- month: "short"
64
- }).format;
69
+ return getTickDateTimeFormatter(locale, "week").format;
65
70
  case "month":
66
- return new Intl.DateTimeFormat(locale, {
67
- month: "short",
68
- year: "numeric"
69
- }).format;
71
+ return getTickDateTimeFormatter(locale, "month").format;
70
72
  case "quarter":
71
73
  return (date) => {
72
74
  const quarter = Math.floor(date.getMonth() / 3) + 1;
@@ -91,13 +93,14 @@ function buildTicks(input) {
91
93
  const formatter = buildTickFormatter(scale, locale);
92
94
  const stepDays = getTickStep(scale);
93
95
  const tickCount = Math.floor(totalDays / stepDays);
94
- return Array.from({ length: tickCount + 1 }).map((_, index) => {
96
+ return Array.from({ length: tickCount + 1 }).reduce((ticks, _, index) => {
95
97
  const day = index * stepDays;
96
- return {
97
- date: new Date(start.getTime() + day * MS_PER_DAY),
98
- offset: day
99
- };
100
- }).filter((tick) => tick.date.getTime() <= end.getTime()).map((tick) => ({ label: formatter(tick.date), offset: tick.offset }));
98
+ const date = new Date(start.getTime() + day * MS_PER_DAY);
99
+ if (date.getTime() <= end.getTime()) {
100
+ ticks.push({ label: formatter(date), offset: day });
101
+ }
102
+ return ticks;
103
+ }, []);
101
104
  }
102
105
  function useChartGeometry(options) {
103
106
  const { endDate, locale, scale, startDate } = options;
@@ -175,7 +178,7 @@ function MilestoneMarker({
175
178
  "div",
176
179
  {
177
180
  "aria-hidden": "true",
178
- className: "h-3 w-3 rotate-45 bg-amber-500 ring-2 ring-background"
181
+ className: "size-3 rotate-45 bg-amber-500 ring-2 ring-background"
179
182
  }
180
183
  ),
181
184
  titleText ? /* @__PURE__ */ jsx("span", { className: "mt-0.5 whitespace-nowrap rounded bg-amber-500/20 px-1 text-[10px] font-medium text-amber-900 dark:text-amber-200", children: titleText }) : null
@@ -161,9 +161,12 @@ const GlobeArc = forwardRef(
161
161
  GlobeArc.displayName = "GlobeArc";
162
162
  function buildLine(arguments_) {
163
163
  const { points, rotationLat, rotationLng } = arguments_;
164
- return points.map((coord) => project(coord, rotationLng, rotationLat)).reduce(
165
- (state, projected) => {
166
- if (!projected.visible) return { path: state.path, pen: "up" };
164
+ return points.reduce(
165
+ (state, coord) => {
166
+ const projected = project(coord, rotationLng, rotationLat);
167
+ if (!projected.visible) {
168
+ return { path: state.path, pen: "up" };
169
+ }
167
170
  const head = state.pen === "up" ? "M" : "L";
168
171
  const separator = state.path.length > 0 ? " " : "";
169
172
  return {
@@ -185,7 +188,16 @@ function Graticule({ rotationLat, rotationLng }) {
185
188
  const meridians = range(-150, 180, 30).map(
186
189
  (lng) => range(-85, 85, 5).map((lat) => ({ lat, lng }))
187
190
  );
188
- const lines = [...parallels, ...meridians].map((points) => buildLine({ points, rotationLat, rotationLng })).filter((path) => path.length > 0);
191
+ const lines = [...parallels, ...meridians].reduce(
192
+ (paths, points) => {
193
+ const path = buildLine({ points, rotationLat, rotationLng });
194
+ if (path.length > 0) {
195
+ paths.push(path);
196
+ }
197
+ return paths;
198
+ },
199
+ []
200
+ );
189
201
  return /* @__PURE__ */ jsx(
190
202
  "g",
191
203
  {
@@ -49,7 +49,7 @@ const HandoffBeacon = forwardRef(
49
49
  {
50
50
  "aria-hidden": "true",
51
51
  className: cn(
52
- "block h-3 w-3 rounded-full ring-2 ring-offset-2 ring-offset-background",
52
+ "block size-3 rounded-full ring-2 ring-offset-2 ring-offset-background",
53
53
  LEVEL_DOT[level],
54
54
  LEVEL_RING[level]
55
55
  )
@@ -201,7 +201,7 @@ function EventMarker({
201
201
  {
202
202
  "aria-hidden": "true",
203
203
  className: cn(
204
- "h-3 w-3 rounded-full border-2 ring-2 ring-background",
204
+ "size-3 rounded-full border-2 ring-2 ring-background",
205
205
  palette.marker
206
206
  )
207
207
  }
@@ -264,7 +264,7 @@ function Legend({ categories }) {
264
264
  "span",
265
265
  {
266
266
  "aria-hidden": "true",
267
- className: cn("h-2 w-2 rounded-full", palette.marker)
267
+ className: cn("size-2 rounded-full", palette.marker)
268
268
  }
269
269
  ),
270
270
  category.label
@@ -120,10 +120,7 @@ function FigureQuote({ quote }) {
120
120
  "\u201C",
121
121
  quote.text,
122
122
  "\u201D",
123
- quote.source ? /* @__PURE__ */ jsxs("footer", { className: "mt-1 text-xs not-italic text-muted-foreground/80", children: [
124
- "\u2014 ",
125
- quote.source
126
- ] }) : null
123
+ quote.source ? /* @__PURE__ */ jsx("footer", { className: "mt-1 text-xs not-italic text-muted-foreground/80", children: quote.source }) : null
127
124
  ] });
128
125
  }
129
126
  function FigureBio({
@@ -150,7 +147,7 @@ function FigureBio({
150
147
  {
151
148
  "aria-hidden": "true",
152
149
  className: cn(
153
- "h-4 w-4 transition-transform",
150
+ "size-4 transition-transform",
154
151
  open ? "rotate-180" : "rotate-0"
155
152
  )
156
153
  }
@@ -170,9 +167,9 @@ function FigureHeader({
170
167
  const initials = getInitials(name);
171
168
  const altName = typeof name === "string" ? name : void 0;
172
169
  return /* @__PURE__ */ jsxs("header", { className: "flex items-start gap-4", children: [
173
- /* @__PURE__ */ jsxs(Avatar, { className: "h-14 w-14 shrink-0 ring-2 ring-border", children: [
170
+ /* @__PURE__ */ jsxs(Avatar, { className: "size-14 shrink-0 ring-2 ring-border", children: [
174
171
  portrait ? /* @__PURE__ */ jsx(AvatarImage, { alt: altName, src: portrait }) : null,
175
- /* @__PURE__ */ jsx(AvatarFallback, { className: "text-sm", children: initials || /* @__PURE__ */ jsx(User, { "aria-hidden": "true", className: "h-5 w-5" }) })
172
+ /* @__PURE__ */ jsx(AvatarFallback, { className: "text-sm", children: initials || /* @__PURE__ */ jsx(User, { "aria-hidden": "true", className: "size-5" }) })
176
173
  ] }),
177
174
  /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
178
175
  /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold leading-tight tracking-tight", children: name }),
@@ -6,6 +6,7 @@ import { useHorizontalScroll } from "../../lib/use-horizontal-scroll";
6
6
  import { cn } from "../../lib/utils";
7
7
  import { Button } from "../button/button";
8
8
  const HorizontalScrollRow = memo(function HorizontalScrollRow2({
9
+ as: Heading = "h3",
9
10
  children,
10
11
  className,
11
12
  description,
@@ -16,7 +17,7 @@ const HorizontalScrollRow = memo(function HorizontalScrollRow2({
16
17
  return /* @__PURE__ */ jsxs("section", { className: cn("space-y-4", className), children: [
17
18
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
18
19
  /* @__PURE__ */ jsxs("div", { children: [
19
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: title }),
20
+ /* @__PURE__ */ jsx(Heading, { className: "text-lg font-semibold", children: title }),
20
21
  description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null
21
22
  ] }),
22
23
  showControls ? /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
@@ -24,28 +25,28 @@ const HorizontalScrollRow = memo(function HorizontalScrollRow2({
24
25
  Button,
25
26
  {
26
27
  "aria-label": "Scroll left",
27
- className: "h-8 w-8",
28
+ className: "size-8",
28
29
  disabled: !canScrollLeft,
29
30
  onClick: () => {
30
31
  scroll("left");
31
32
  },
32
33
  size: "icon",
33
34
  variant: "outline",
34
- children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
35
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4" })
35
36
  }
36
37
  ),
37
38
  /* @__PURE__ */ jsx(
38
39
  Button,
39
40
  {
40
41
  "aria-label": "Scroll right",
41
- className: "h-8 w-8",
42
+ className: "size-8",
42
43
  disabled: !canScrollRight,
43
44
  onClick: () => {
44
45
  scroll("right");
45
46
  },
46
47
  size: "icon",
47
48
  variant: "outline",
48
- children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
49
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-4" })
49
50
  }
50
51
  )
51
52
  ] }) : null