@vllnt/ui 0.1.4 → 0.1.7-canary.2c4792f

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 (225) hide show
  1. package/dist/components/accordion/accordion.js +172 -0
  2. package/dist/components/accordion/index.js +12 -0
  3. package/dist/components/alert/alert.js +53 -0
  4. package/dist/components/alert/index.js +7 -0
  5. package/dist/components/alert-dialog/alert-dialog.js +117 -0
  6. package/dist/components/alert-dialog/index.js +26 -0
  7. package/dist/components/aspect-ratio/aspect-ratio.js +6 -0
  8. package/dist/components/aspect-ratio/index.js +4 -0
  9. package/dist/components/avatar/avatar.js +43 -0
  10. package/dist/components/avatar/index.js +6 -0
  11. package/dist/components/badge/badge.js +26 -0
  12. package/dist/components/badge/index.js +5 -0
  13. package/dist/components/blog-card/blog-card.js +50 -0
  14. package/dist/components/blog-card/index.js +5 -0
  15. package/dist/components/breadcrumb/breadcrumb.js +61 -0
  16. package/dist/components/breadcrumb/index.js +4 -0
  17. package/dist/components/button/button.js +48 -0
  18. package/dist/components/button/index.js +5 -0
  19. package/dist/components/calendar/calendar.js +71 -0
  20. package/dist/components/calendar/index.js +4 -0
  21. package/dist/components/callout/callout.js +59 -0
  22. package/dist/components/callout/index.js +4 -0
  23. package/dist/components/card/card.js +64 -0
  24. package/dist/components/card/index.js +16 -0
  25. package/dist/components/carousel/carousel.js +239 -0
  26. package/dist/components/carousel/index.js +14 -0
  27. package/dist/components/category-filter/category-filter.js +34 -0
  28. package/dist/components/category-filter/index.js +4 -0
  29. package/dist/components/chart/area-chart.js +99 -0
  30. package/dist/components/chart/bar-chart.js +80 -0
  31. package/dist/components/chart/index.js +3 -0
  32. package/dist/components/chart/line-chart.js +97 -0
  33. package/dist/components/checkbox/checkbox.js +28 -0
  34. package/dist/components/checkbox/index.js +4 -0
  35. package/dist/components/checklist/checklist.js +181 -0
  36. package/dist/components/checklist/index.js +6 -0
  37. package/dist/components/code-block/code-block.js +126 -0
  38. package/dist/components/code-block/index.js +4 -0
  39. package/dist/components/code-playground/code-playground.js +86 -0
  40. package/dist/components/code-playground/index.js +8 -0
  41. package/dist/components/collapsible/collapsible.js +10 -0
  42. package/dist/components/collapsible/index.js +10 -0
  43. package/dist/components/command/command.js +123 -0
  44. package/dist/components/command/index.js +22 -0
  45. package/dist/components/comparison/comparison.js +121 -0
  46. package/dist/components/comparison/index.js +8 -0
  47. package/dist/components/completion-dialog/completion-dialog.js +173 -0
  48. package/dist/components/completion-dialog/index.js +6 -0
  49. package/dist/components/content-intro/content-intro.js +144 -0
  50. package/dist/components/content-intro/index.js +6 -0
  51. package/dist/components/context-menu/context-menu.js +154 -0
  52. package/dist/components/context-menu/index.js +34 -0
  53. package/dist/components/cookie-consent/cookie-consent.js +175 -0
  54. package/dist/components/cookie-consent/index.js +8 -0
  55. package/dist/components/dialog/dialog.js +105 -0
  56. package/dist/components/dialog/index.js +24 -0
  57. package/dist/components/drawer/drawer.js +102 -0
  58. package/dist/components/drawer/index.js +24 -0
  59. package/dist/components/dropdown-menu/dropdown-menu.js +151 -0
  60. package/dist/components/dropdown-menu/index.js +34 -0
  61. package/dist/components/exercise/exercise.js +112 -0
  62. package/dist/components/exercise/index.js +4 -0
  63. package/dist/components/faq/faq.js +56 -0
  64. package/dist/components/faq/index.js +5 -0
  65. package/dist/components/filter-bar/filter-bar.js +244 -0
  66. package/dist/components/filter-bar/index.js +6 -0
  67. package/dist/components/floating-action-button/floating-action-button.js +35 -0
  68. package/dist/components/floating-action-button/index.js +6 -0
  69. package/dist/components/flow-diagram/flow-canvas.js +109 -0
  70. package/dist/components/flow-diagram/flow-controls.js +140 -0
  71. package/dist/components/flow-diagram/flow-diagram.js +114 -0
  72. package/dist/components/flow-diagram/flow-error-boundary.js +63 -0
  73. package/dist/components/flow-diagram/flow-fullscreen.js +58 -0
  74. package/dist/components/flow-diagram/index.js +12 -0
  75. package/dist/components/flow-diagram/types.js +0 -0
  76. package/dist/components/flow-diagram/use-flow-diagram.js +146 -0
  77. package/dist/components/horizontal-scroll-row/horizontal-scroll-row.js +66 -0
  78. package/dist/components/horizontal-scroll-row/index.js +6 -0
  79. package/dist/components/hover-card/hover-card.js +26 -0
  80. package/dist/components/hover-card/index.js +6 -0
  81. package/dist/components/index.js +641 -0
  82. package/dist/components/inline-input/index.js +4 -0
  83. package/dist/components/inline-input/inline-input.js +42 -0
  84. package/dist/components/input/index.js +4 -0
  85. package/dist/components/input/input.js +23 -0
  86. package/dist/components/input-otp/index.js +12 -0
  87. package/dist/components/input-otp/input-otp.js +54 -0
  88. package/dist/components/key-concept/index.js +8 -0
  89. package/dist/components/key-concept/key-concept.js +79 -0
  90. package/dist/components/keyboard-shortcuts-help/index.js +6 -0
  91. package/dist/components/keyboard-shortcuts-help/keyboard-shortcuts-help.js +121 -0
  92. package/dist/components/label/index.js +4 -0
  93. package/dist/components/label/label.js +21 -0
  94. package/dist/components/lang-provider/index.js +4 -0
  95. package/dist/components/lang-provider/lang-provider.js +18 -0
  96. package/dist/components/learning-objectives/index.js +10 -0
  97. package/dist/components/learning-objectives/learning-objectives.js +76 -0
  98. package/dist/components/mdx-content/index.js +4 -0
  99. package/dist/components/mdx-content/mdx-content.js +151 -0
  100. package/dist/components/menubar/index.js +36 -0
  101. package/dist/components/menubar/menubar.js +183 -0
  102. package/dist/components/model-selector/index.js +6 -0
  103. package/dist/components/model-selector/model-selector.js +374 -0
  104. package/dist/components/navbar-saas/index.js +6 -0
  105. package/dist/components/navbar-saas/navbar-saas.js +68 -0
  106. package/dist/components/navbar-saas/use-mobile.js +19 -0
  107. package/dist/components/navigation-menu/index.js +22 -0
  108. package/dist/components/navigation-menu/navigation-menu.js +108 -0
  109. package/dist/components/pagination/index.js +4 -0
  110. package/dist/components/pagination/pagination.js +44 -0
  111. package/dist/components/popover/index.js +12 -0
  112. package/dist/components/popover/popover.js +28 -0
  113. package/dist/components/pro-tip/index.js +8 -0
  114. package/dist/components/pro-tip/pro-tip.js +139 -0
  115. package/dist/components/profile-section/index.js +4 -0
  116. package/dist/components/profile-section/profile-section.js +45 -0
  117. package/dist/components/progress-bar/index.js +4 -0
  118. package/dist/components/progress-bar/progress-bar.js +56 -0
  119. package/dist/components/progress-card/index.js +6 -0
  120. package/dist/components/progress-card/progress-card.js +71 -0
  121. package/dist/components/quiz/index.js +4 -0
  122. package/dist/components/quiz/quiz.js +210 -0
  123. package/dist/components/radio-group/index.js +5 -0
  124. package/dist/components/radio-group/radio-group.js +36 -0
  125. package/dist/components/resizable/index.js +10 -0
  126. package/dist/components/resizable/resizable.js +39 -0
  127. package/dist/components/scroll-area/index.js +5 -0
  128. package/dist/components/scroll-area/scroll-area.js +39 -0
  129. package/dist/components/search-bar/index.js +4 -0
  130. package/dist/components/search-bar/search-bar.js +122 -0
  131. package/dist/components/search-dialog/index.js +4 -0
  132. package/dist/components/search-dialog/search-dialog.js +102 -0
  133. package/dist/components/select/index.js +24 -0
  134. package/dist/components/select/select.js +125 -0
  135. package/dist/components/separator/index.js +4 -0
  136. package/dist/components/separator/separator.js +25 -0
  137. package/dist/components/share-dialog/index.js +6 -0
  138. package/dist/components/share-dialog/share-dialog.js +121 -0
  139. package/dist/components/share-section/index.js +6 -0
  140. package/dist/components/share-section/share-section.js +57 -0
  141. package/dist/components/sheet/index.js +24 -0
  142. package/dist/components/sheet/sheet.js +116 -0
  143. package/dist/components/sidebar/index.js +4 -0
  144. package/dist/components/sidebar/sidebar.js +188 -0
  145. package/dist/components/sidebar-provider/index.js +5 -0
  146. package/dist/components/sidebar-provider/sidebar-provider.js +25 -0
  147. package/dist/components/sidebar-toggle/index.js +4 -0
  148. package/dist/components/sidebar-toggle/sidebar-toggle.js +36 -0
  149. package/dist/components/skeleton/index.js +4 -0
  150. package/dist/components/skeleton/skeleton.js +17 -0
  151. package/dist/components/slider/index.js +4 -0
  152. package/dist/components/slider/slider.js +24 -0
  153. package/dist/components/slideshow/index.js +6 -0
  154. package/dist/components/slideshow/slideshow.js +440 -0
  155. package/dist/components/social-fab/index.js +6 -0
  156. package/dist/components/social-fab/social-fab.js +211 -0
  157. package/dist/components/social-fab/use-social-fab.js +111 -0
  158. package/dist/components/spinner/index.js +4 -0
  159. package/dist/components/spinner/spinner.js +23 -0
  160. package/dist/components/step-by-step/index.js +8 -0
  161. package/dist/components/step-by-step/step-by-step.js +194 -0
  162. package/dist/components/step-navigation/index.js +4 -0
  163. package/dist/components/step-navigation/step-navigation.js +119 -0
  164. package/dist/components/switch/index.js +4 -0
  165. package/dist/components/switch/switch.js +28 -0
  166. package/dist/components/table/index.js +20 -0
  167. package/dist/components/table/table.js +87 -0
  168. package/dist/components/table-of-contents/index.js +4 -0
  169. package/dist/components/table-of-contents/table-of-contents.js +71 -0
  170. package/dist/components/table-of-contents-panel/index.js +6 -0
  171. package/dist/components/table-of-contents-panel/table-of-contents-panel.js +202 -0
  172. package/dist/components/tabs/index.js +12 -0
  173. package/dist/components/tabs/tabs.js +84 -0
  174. package/dist/components/terminal/index.js +8 -0
  175. package/dist/components/terminal/terminal.js +119 -0
  176. package/dist/components/textarea/index.js +4 -0
  177. package/dist/components/textarea/textarea.js +22 -0
  178. package/dist/components/theme-provider/index.js +4 -0
  179. package/dist/components/theme-provider/theme-provider.js +11 -0
  180. package/dist/components/theme-toggle/index.js +4 -0
  181. package/dist/components/theme-toggle/theme-toggle.js +170 -0
  182. package/dist/components/thinking-block/index.js +4 -0
  183. package/dist/components/thinking-block/thinking-block.js +56 -0
  184. package/dist/components/tldr-section/index.js +4 -0
  185. package/dist/components/tldr-section/tldr-section.js +101 -0
  186. package/dist/components/toast/index.js +18 -0
  187. package/dist/components/toast/toast.js +84 -0
  188. package/dist/components/toast/toaster.js +38 -0
  189. package/dist/components/toggle/index.js +5 -0
  190. package/dist/components/toggle/toggle.js +39 -0
  191. package/dist/components/toggle-group/index.js +5 -0
  192. package/dist/components/toggle-group/toggle-group.js +46 -0
  193. package/dist/components/tooltip/index.js +12 -0
  194. package/dist/components/tooltip/tooltip.js +27 -0
  195. package/dist/components/truncated-text/index.js +4 -0
  196. package/dist/components/truncated-text/truncated-text.js +25 -0
  197. package/dist/components/tutorial-card/index.js +6 -0
  198. package/dist/components/tutorial-card/tutorial-card.js +78 -0
  199. package/dist/components/tutorial-complete/index.js +6 -0
  200. package/dist/components/tutorial-complete/tutorial-complete.js +134 -0
  201. package/dist/components/tutorial-filters/index.js +6 -0
  202. package/dist/components/tutorial-filters/tutorial-filters.js +205 -0
  203. package/dist/components/tutorial-intro-content/index.js +6 -0
  204. package/dist/components/tutorial-intro-content/tutorial-intro-content.js +141 -0
  205. package/dist/components/tutorial-mdx/index.js +8 -0
  206. package/dist/components/tutorial-mdx/tutorial-mdx.js +219 -0
  207. package/dist/components/video-embed/index.js +4 -0
  208. package/dist/components/video-embed/video-embed.js +77 -0
  209. package/dist/components/view-switcher/index.js +6 -0
  210. package/dist/components/view-switcher/view-switcher.js +92 -0
  211. package/dist/index.d.ts +44 -2
  212. package/dist/index.js +14 -8556
  213. package/dist/lib/types.js +11 -0
  214. package/dist/lib/use-debounce.js +17 -0
  215. package/dist/lib/use-horizontal-scroll.js +60 -0
  216. package/dist/lib/use-mounted.js +17 -0
  217. package/dist/lib/utils.js +8 -0
  218. package/dist/tailwind-preset.d.ts +5 -0
  219. package/dist/tailwind-preset.js +9 -10
  220. package/dist/types/content.js +0 -0
  221. package/dist/types/index.js +0 -0
  222. package/package.json +42 -23
  223. package/LICENSE +0 -21
  224. package/dist/chunk-XRV5RSYH.js +0 -569
  225. package/dist/flow-diagram-N3EHM6VB.js +0 -2
@@ -0,0 +1,4 @@
1
+ import { ThemeProvider } from "./theme-provider";
2
+ export {
3
+ ThemeProvider
4
+ };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import {
4
+ ThemeProvider as NextThemesProvider
5
+ } from "next-themes";
6
+ function ThemeProvider({ children, ...props }) {
7
+ return /* @__PURE__ */ jsx(NextThemesProvider, { ...props, children });
8
+ }
9
+ export {
10
+ ThemeProvider
11
+ };
@@ -0,0 +1,4 @@
1
+ import { ThemeToggle } from "./theme-toggle";
2
+ export {
3
+ ThemeToggle
4
+ };
@@ -0,0 +1,170 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useRef, useState } from "react";
4
+ import { useTheme } from "next-themes";
5
+ import { useMounted } from "../../lib/use-mounted";
6
+ import { Button } from "../button/button";
7
+ import {
8
+ DropdownMenu,
9
+ DropdownMenuContent,
10
+ DropdownMenuItem,
11
+ DropdownMenuTrigger
12
+ } from "../dropdown-menu/dropdown-menu";
13
+ function ThemeButton({
14
+ ariaLabel,
15
+ children,
16
+ icon,
17
+ ...props
18
+ }) {
19
+ return /* @__PURE__ */ jsxs(
20
+ Button,
21
+ {
22
+ "aria-label": ariaLabel,
23
+ className: "bg-background text-foreground border border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500 transition-colors",
24
+ size: "icon",
25
+ variant: "outline",
26
+ ...props,
27
+ children: [
28
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-mono", children: icon }),
29
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: ariaLabel }),
30
+ children
31
+ ]
32
+ }
33
+ );
34
+ }
35
+ function ThemeMenuItem({
36
+ icon,
37
+ label,
38
+ onClick
39
+ }) {
40
+ return /* @__PURE__ */ jsxs(
41
+ DropdownMenuItem,
42
+ {
43
+ className: "hover:bg-accent cursor-pointer",
44
+ onClick,
45
+ children: [
46
+ icon,
47
+ " ",
48
+ label
49
+ ]
50
+ }
51
+ );
52
+ }
53
+ function ThemeToggle({ dict }) {
54
+ const { setTheme, theme } = useTheme();
55
+ const mounted = useMounted();
56
+ const [open, setOpen] = useState(false);
57
+ const closeTimerReference = useRef(null);
58
+ const isHoveringOverMenuAreaReference = useRef(false);
59
+ const clearCloseTimer = useCallback(() => {
60
+ if (closeTimerReference.current !== null) {
61
+ window.clearTimeout(closeTimerReference.current);
62
+ closeTimerReference.current = null;
63
+ }
64
+ }, []);
65
+ const scheduleClose = useCallback(() => {
66
+ clearCloseTimer();
67
+ closeTimerReference.current = window.setTimeout(() => {
68
+ setOpen(false);
69
+ }, 250);
70
+ }, [clearCloseTimer]);
71
+ const handleOpenChange = useCallback((nextOpen) => {
72
+ if (!nextOpen && isHoveringOverMenuAreaReference.current) {
73
+ return;
74
+ }
75
+ setOpen(nextOpen);
76
+ }, []);
77
+ const getThemeIcon = useCallback(() => {
78
+ if (!mounted) return "\u2600";
79
+ switch (theme) {
80
+ case "light":
81
+ return "\u2600";
82
+ case "dark":
83
+ return "\u263E";
84
+ case "system":
85
+ return "\u2699";
86
+ case void 0:
87
+ return "\u2699";
88
+ default:
89
+ return "\u2699";
90
+ }
91
+ }, [theme, mounted]);
92
+ const themeIcon = getThemeIcon();
93
+ const handleThemeChange = useCallback(
94
+ (newTheme) => {
95
+ setTheme(newTheme);
96
+ },
97
+ [setTheme]
98
+ );
99
+ if (!mounted) {
100
+ return /* @__PURE__ */ jsx(ThemeButton, { ariaLabel: dict.theme.toggle_theme, icon: "\u2600" });
101
+ }
102
+ return /* @__PURE__ */ jsxs(DropdownMenu, { modal: false, onOpenChange: handleOpenChange, open, children: [
103
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
104
+ ThemeButton,
105
+ {
106
+ ariaLabel: dict.theme.toggle_theme,
107
+ icon: themeIcon,
108
+ onMouseEnter: () => {
109
+ isHoveringOverMenuAreaReference.current = true;
110
+ clearCloseTimer();
111
+ setOpen(true);
112
+ },
113
+ onMouseLeave: () => {
114
+ isHoveringOverMenuAreaReference.current = false;
115
+ scheduleClose();
116
+ }
117
+ }
118
+ ) }),
119
+ /* @__PURE__ */ jsxs(
120
+ DropdownMenuContent,
121
+ {
122
+ align: "end",
123
+ className: "bg-background border border-gray-300 dark:border-gray-600",
124
+ onMouseEnter: () => {
125
+ isHoveringOverMenuAreaReference.current = true;
126
+ clearCloseTimer();
127
+ },
128
+ onMouseLeave: () => {
129
+ isHoveringOverMenuAreaReference.current = false;
130
+ scheduleClose();
131
+ },
132
+ children: [
133
+ /* @__PURE__ */ jsx(
134
+ ThemeMenuItem,
135
+ {
136
+ icon: "\u2600",
137
+ label: dict.theme.light,
138
+ onClick: () => {
139
+ handleThemeChange("light");
140
+ }
141
+ }
142
+ ),
143
+ /* @__PURE__ */ jsx(
144
+ ThemeMenuItem,
145
+ {
146
+ icon: "\u263E",
147
+ label: dict.theme.dark,
148
+ onClick: () => {
149
+ handleThemeChange("dark");
150
+ }
151
+ }
152
+ ),
153
+ /* @__PURE__ */ jsx(
154
+ ThemeMenuItem,
155
+ {
156
+ icon: "\u2699",
157
+ label: dict.theme.system,
158
+ onClick: () => {
159
+ handleThemeChange("system");
160
+ }
161
+ }
162
+ )
163
+ ]
164
+ }
165
+ )
166
+ ] });
167
+ }
168
+ export {
169
+ ThemeToggle
170
+ };
@@ -0,0 +1,4 @@
1
+ import { ThinkingBlock } from "./thinking-block";
2
+ export {
3
+ ThinkingBlock
4
+ };
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useId, useState } from "react";
4
+ import { ChevronDown, ChevronRight } from "lucide-react";
5
+ import { cn } from "../../lib/utils";
6
+ function ThinkingBlock({
7
+ className,
8
+ isStreaming = false,
9
+ thinking
10
+ }) {
11
+ const [isExpanded, setIsExpanded] = useState(isStreaming);
12
+ const contentId = useId();
13
+ useEffect(() => {
14
+ if (isStreaming) {
15
+ requestAnimationFrame(() => {
16
+ setIsExpanded(true);
17
+ });
18
+ }
19
+ }, [isStreaming]);
20
+ const toggleExpanded = useCallback(() => {
21
+ setIsExpanded((previous) => !previous);
22
+ }, []);
23
+ return /* @__PURE__ */ jsxs("div", { className: cn("mb-2", className), children: [
24
+ /* @__PURE__ */ jsxs(
25
+ "button",
26
+ {
27
+ "aria-controls": contentId,
28
+ "aria-expanded": isExpanded,
29
+ className: "flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",
30
+ onClick: toggleExpanded,
31
+ type: "button",
32
+ children: [
33
+ isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3" }),
34
+ /* @__PURE__ */ jsxs("span", { children: [
35
+ "Thinking",
36
+ isStreaming ? /* @__PURE__ */ jsx("span", { className: "ml-1 animate-pulse", children: "..." }) : null
37
+ ] })
38
+ ]
39
+ }
40
+ ),
41
+ isExpanded ? /* @__PURE__ */ jsxs(
42
+ "div",
43
+ {
44
+ className: "mt-2 p-3 bg-muted/50 rounded text-xs text-muted-foreground whitespace-pre-wrap border-l-2 border-muted-foreground/30 max-h-48 overflow-y-auto",
45
+ id: contentId,
46
+ children: [
47
+ thinking,
48
+ isStreaming ? /* @__PURE__ */ jsx("span", { className: "animate-pulse", children: "|" }) : null
49
+ ]
50
+ }
51
+ ) : null
52
+ ] });
53
+ }
54
+ export {
55
+ ThinkingBlock
56
+ };
@@ -0,0 +1,4 @@
1
+ import { TLDRSection } from "./tldr-section";
2
+ export {
3
+ TLDRSection
4
+ };
@@ -0,0 +1,101 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useRef, useState } from "react";
4
+ function TLDRSection({ children, label }) {
5
+ const [isExpanded, setIsExpanded] = useState(false);
6
+ const [isLoading, setIsLoading] = useState(false);
7
+ const [hasBeenOpened, setHasBeenOpened] = useState(false);
8
+ const timerReference = useRef(null);
9
+ useEffect(() => {
10
+ if (isExpanded && !hasBeenOpened) {
11
+ if (timerReference.current) {
12
+ clearTimeout(timerReference.current);
13
+ }
14
+ const rafId = requestAnimationFrame(() => {
15
+ setIsLoading(true);
16
+ setHasBeenOpened(true);
17
+ });
18
+ timerReference.current = setTimeout(() => {
19
+ setIsLoading(false);
20
+ timerReference.current = null;
21
+ }, 800);
22
+ return () => {
23
+ cancelAnimationFrame(rafId);
24
+ if (timerReference.current) {
25
+ clearTimeout(timerReference.current);
26
+ timerReference.current = null;
27
+ }
28
+ };
29
+ }
30
+ return () => {
31
+ if (timerReference.current) {
32
+ clearTimeout(timerReference.current);
33
+ timerReference.current = null;
34
+ }
35
+ };
36
+ }, [isExpanded]);
37
+ return /* @__PURE__ */ jsxs("div", { className: "my-8 rounded-lg border border-border bg-muted/30 overflow-hidden", children: [
38
+ /* @__PURE__ */ jsxs(
39
+ "button",
40
+ {
41
+ className: "flex items-center justify-between w-full px-4 py-3 hover:bg-muted/50 transition-colors",
42
+ onClick: () => {
43
+ setIsExpanded(!isExpanded);
44
+ },
45
+ type: "button",
46
+ children: [
47
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
48
+ /* @__PURE__ */ jsx(
49
+ "svg",
50
+ {
51
+ className: "w-5 h-5 text-muted-foreground",
52
+ fill: "none",
53
+ stroke: "currentColor",
54
+ strokeWidth: "2",
55
+ viewBox: "0 0 24 24",
56
+ xmlns: "http://www.w3.org/2000/svg",
57
+ children: /* @__PURE__ */ jsx(
58
+ "path",
59
+ {
60
+ d: "M4 6h16M4 12h16M4 18h16",
61
+ strokeLinecap: "round",
62
+ strokeLinejoin: "round"
63
+ }
64
+ )
65
+ }
66
+ ),
67
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: label })
68
+ ] }),
69
+ /* @__PURE__ */ jsx(
70
+ "svg",
71
+ {
72
+ className: `w-4 h-4 text-muted-foreground transition-transform ${isExpanded ? "rotate-180" : ""}`,
73
+ fill: "none",
74
+ stroke: "currentColor",
75
+ strokeWidth: "2",
76
+ viewBox: "0 0 24 24",
77
+ xmlns: "http://www.w3.org/2000/svg",
78
+ children: /* @__PURE__ */ jsx(
79
+ "path",
80
+ {
81
+ d: "M19 9l-7 7-7-7",
82
+ strokeLinecap: "round",
83
+ strokeLinejoin: "round"
84
+ }
85
+ )
86
+ }
87
+ )
88
+ ]
89
+ }
90
+ ),
91
+ isExpanded ? /* @__PURE__ */ jsx("div", { className: "px-4 pb-4 pt-2 border-t border-border", children: isLoading ? /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
92
+ /* @__PURE__ */ jsx("div", { className: "relative h-4 bg-muted/50 rounded overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent animate-shimmer" }) }),
93
+ /* @__PURE__ */ jsx("div", { className: "relative h-4 bg-muted/50 rounded overflow-hidden w-5/6", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent animate-shimmer" }) }),
94
+ /* @__PURE__ */ jsx("div", { className: "relative h-4 bg-muted/50 rounded overflow-hidden w-4/5", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent animate-shimmer" }) }),
95
+ /* @__PURE__ */ jsx("div", { className: "relative h-4 bg-muted/50 rounded overflow-hidden w-3/4", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-r from-transparent via-amber-400/40 to-transparent animate-shimmer" }) })
96
+ ] }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground leading-relaxed", children }) }) : null
97
+ ] });
98
+ }
99
+ export {
100
+ TLDRSection
101
+ };
@@ -0,0 +1,18 @@
1
+ import {
2
+ Toast,
3
+ ToastAction,
4
+ ToastClose,
5
+ ToastDescription,
6
+ ToastTitle
7
+ } from "./toast";
8
+ import { Toaster } from "./toaster";
9
+ import { toast } from "sonner";
10
+ export {
11
+ Toast,
12
+ ToastAction,
13
+ ToastClose,
14
+ ToastDescription,
15
+ ToastTitle,
16
+ Toaster,
17
+ toast
18
+ };
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../../lib/utils";
6
+ const toastVariants = cva(
7
+ "group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
8
+ {
9
+ defaultVariants: {
10
+ variant: "default"
11
+ },
12
+ variants: {
13
+ variant: {
14
+ default: "border bg-background text-foreground",
15
+ destructive: "destructive border-destructive bg-destructive text-destructive-foreground"
16
+ }
17
+ }
18
+ }
19
+ );
20
+ const Toast = React.forwardRef(({ className, variant, ...props }, reference) => /* @__PURE__ */ jsx(
21
+ "div",
22
+ {
23
+ className: cn(toastVariants({ variant }), className),
24
+ ref: reference,
25
+ ...props
26
+ }
27
+ ));
28
+ Toast.displayName = "Toast";
29
+ const ToastAction = React.forwardRef(({ altText, className, ...props }, reference) => /* @__PURE__ */ jsx(
30
+ "button",
31
+ {
32
+ className: cn(
33
+ "inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
34
+ className
35
+ ),
36
+ ref: reference,
37
+ type: "button",
38
+ ...props
39
+ }
40
+ ));
41
+ ToastAction.displayName = "ToastAction";
42
+ const ToastClose = React.forwardRef(({ className, ...props }, reference) => /* @__PURE__ */ jsxs(
43
+ "button",
44
+ {
45
+ className: cn(
46
+ "absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
47
+ className
48
+ ),
49
+ "data-toast-close": "true",
50
+ ref: reference,
51
+ type: "button",
52
+ ...props,
53
+ children: [
54
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" }),
55
+ "\u2715"
56
+ ]
57
+ }
58
+ ));
59
+ ToastClose.displayName = "ToastClose";
60
+ const ToastTitle = React.forwardRef(({ className, ...props }, reference) => /* @__PURE__ */ jsx(
61
+ "div",
62
+ {
63
+ className: cn("text-sm font-semibold", className),
64
+ ref: reference,
65
+ ...props
66
+ }
67
+ ));
68
+ ToastTitle.displayName = "ToastTitle";
69
+ const ToastDescription = React.forwardRef(({ className, ...props }, reference) => /* @__PURE__ */ jsx(
70
+ "div",
71
+ {
72
+ className: cn("text-sm opacity-90", className),
73
+ ref: reference,
74
+ ...props
75
+ }
76
+ ));
77
+ ToastDescription.displayName = "ToastDescription";
78
+ export {
79
+ Toast,
80
+ ToastAction,
81
+ ToastClose,
82
+ ToastDescription,
83
+ ToastTitle
84
+ };
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import {
4
+ CircleCheckIcon,
5
+ InfoIcon,
6
+ Loader2Icon,
7
+ OctagonXIcon,
8
+ TriangleAlertIcon
9
+ } from "lucide-react";
10
+ import { useTheme } from "next-themes";
11
+ import { Toaster as Sonner } from "sonner";
12
+ const Toaster = ({ ...props }) => {
13
+ const { theme = "system" } = useTheme();
14
+ return /* @__PURE__ */ jsx(
15
+ Sonner,
16
+ {
17
+ className: "toaster group",
18
+ icons: {
19
+ error: /* @__PURE__ */ jsx(OctagonXIcon, { className: "size-4" }),
20
+ info: /* @__PURE__ */ jsx(InfoIcon, { className: "size-4" }),
21
+ loading: /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin" }),
22
+ success: /* @__PURE__ */ jsx(CircleCheckIcon, { className: "size-4" }),
23
+ warning: /* @__PURE__ */ jsx(TriangleAlertIcon, { className: "size-4" })
24
+ },
25
+ style: {
26
+ "--border-radius": "var(--radius)",
27
+ "--normal-bg": "var(--popover)",
28
+ "--normal-border": "var(--border)",
29
+ "--normal-text": "var(--popover-foreground)"
30
+ },
31
+ theme,
32
+ ...props
33
+ }
34
+ );
35
+ };
36
+ export {
37
+ Toaster
38
+ };
@@ -0,0 +1,5 @@
1
+ import { Toggle, toggleVariants } from "./toggle";
2
+ export {
3
+ Toggle,
4
+ toggleVariants
5
+ };
@@ -0,0 +1,39 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from "react";
4
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
5
+ import { cva } from "class-variance-authority";
6
+ import { cn } from "../../lib/utils";
7
+ const toggleVariants = cva(
8
+ "inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9
+ {
10
+ defaultVariants: {
11
+ size: "default",
12
+ variant: "default"
13
+ },
14
+ variants: {
15
+ size: {
16
+ default: "h-10 px-3 min-w-10",
17
+ lg: "h-11 px-5 min-w-11",
18
+ sm: "h-9 px-2.5 min-w-9"
19
+ },
20
+ variant: {
21
+ default: "bg-transparent",
22
+ outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"
23
+ }
24
+ }
25
+ }
26
+ );
27
+ const Toggle = forwardRef(({ className, size, variant, ...props }, ref) => /* @__PURE__ */ jsx(
28
+ TogglePrimitive.Root,
29
+ {
30
+ className: cn(toggleVariants({ className, size, variant })),
31
+ ref,
32
+ ...props
33
+ }
34
+ ));
35
+ Toggle.displayName = TogglePrimitive.Root.displayName;
36
+ export {
37
+ Toggle,
38
+ toggleVariants
39
+ };
@@ -0,0 +1,5 @@
1
+ import { ToggleGroup, ToggleGroupItem } from "./toggle-group";
2
+ export {
3
+ ToggleGroup,
4
+ ToggleGroupItem
5
+ };
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { createContext, forwardRef, useContext, useMemo } from "react";
4
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
5
+ import { cn } from "../../lib/utils";
6
+ import { toggleVariants } from "../toggle/toggle";
7
+ const ToggleGroupContext = createContext({
8
+ size: "default",
9
+ variant: "default"
10
+ });
11
+ const ToggleGroup = forwardRef(({ children, className, size, variant, ...props }, ref) => {
12
+ const contextValue = useMemo(() => ({ size, variant }), [size, variant]);
13
+ return /* @__PURE__ */ jsx(
14
+ ToggleGroupPrimitive.Root,
15
+ {
16
+ className: cn("flex items-center justify-center gap-1", className),
17
+ ref,
18
+ ...props,
19
+ children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: contextValue, children })
20
+ }
21
+ );
22
+ });
23
+ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
24
+ const ToggleGroupItem = forwardRef(({ children, className, size, variant, ...props }, ref) => {
25
+ const context = useContext(ToggleGroupContext);
26
+ return /* @__PURE__ */ jsx(
27
+ ToggleGroupPrimitive.Item,
28
+ {
29
+ className: cn(
30
+ toggleVariants({
31
+ size: context.size ?? size,
32
+ variant: context.variant ?? variant
33
+ }),
34
+ className
35
+ ),
36
+ ref,
37
+ ...props,
38
+ children
39
+ }
40
+ );
41
+ });
42
+ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
43
+ export {
44
+ ToggleGroup,
45
+ ToggleGroupItem
46
+ };
@@ -0,0 +1,12 @@
1
+ import {
2
+ Tooltip,
3
+ TooltipContent,
4
+ TooltipProvider,
5
+ TooltipTrigger
6
+ } from "./tooltip";
7
+ export {
8
+ Tooltip,
9
+ TooltipContent,
10
+ TooltipProvider,
11
+ TooltipTrigger
12
+ };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from "react";
4
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5
+ import { cn } from "../../lib/utils";
6
+ const TooltipProvider = TooltipPrimitive.Provider;
7
+ const Tooltip = TooltipPrimitive.Root;
8
+ const TooltipTrigger = TooltipPrimitive.Trigger;
9
+ const TooltipContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
10
+ TooltipPrimitive.Content,
11
+ {
12
+ className: cn(
13
+ "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
14
+ className
15
+ ),
16
+ ref,
17
+ sideOffset,
18
+ ...props
19
+ }
20
+ ) }));
21
+ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
22
+ export {
23
+ Tooltip,
24
+ TooltipContent,
25
+ TooltipProvider,
26
+ TooltipTrigger
27
+ };
@@ -0,0 +1,4 @@
1
+ import { TruncatedText } from "./truncated-text";
2
+ export {
3
+ TruncatedText
4
+ };
@@ -0,0 +1,25 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/utils";
3
+ function TruncatedText({
4
+ children,
5
+ className,
6
+ maxWidth = "calc(100vw - 220px)"
7
+ }) {
8
+ return /* @__PURE__ */ jsx(
9
+ "span",
10
+ {
11
+ className: cn(
12
+ "inline-block align-middle overflow-hidden text-ellipsis whitespace-nowrap sm:max-w-none sm:overflow-visible",
13
+ className
14
+ ),
15
+ style: {
16
+ maxWidth
17
+ },
18
+ title: children,
19
+ children
20
+ }
21
+ );
22
+ }
23
+ export {
24
+ TruncatedText
25
+ };