@vllnt/ui 0.1.4 → 0.1.6

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 (217) 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 +65 -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 +235 -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 +123 -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 +109 -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 +171 -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 +141 -0
  77. package/dist/components/hover-card/hover-card.js +26 -0
  78. package/dist/components/hover-card/index.js +6 -0
  79. package/dist/components/index.js +633 -0
  80. package/dist/components/inline-input/index.js +4 -0
  81. package/dist/components/inline-input/inline-input.js +42 -0
  82. package/dist/components/input/index.js +4 -0
  83. package/dist/components/input/input.js +23 -0
  84. package/dist/components/input-otp/index.js +12 -0
  85. package/dist/components/input-otp/input-otp.js +54 -0
  86. package/dist/components/key-concept/index.js +8 -0
  87. package/dist/components/key-concept/key-concept.js +79 -0
  88. package/dist/components/keyboard-shortcuts-help/index.js +6 -0
  89. package/dist/components/keyboard-shortcuts-help/keyboard-shortcuts-help.js +121 -0
  90. package/dist/components/label/index.js +4 -0
  91. package/dist/components/label/label.js +21 -0
  92. package/dist/components/lang-provider/index.js +4 -0
  93. package/dist/components/lang-provider/lang-provider.js +18 -0
  94. package/dist/components/learning-objectives/index.js +10 -0
  95. package/dist/components/learning-objectives/learning-objectives.js +76 -0
  96. package/dist/components/mdx-content/index.js +4 -0
  97. package/dist/components/mdx-content/mdx-content.js +140 -0
  98. package/dist/components/menubar/index.js +36 -0
  99. package/dist/components/menubar/menubar.js +183 -0
  100. package/dist/components/model-selector/index.js +6 -0
  101. package/dist/components/model-selector/model-selector.js +374 -0
  102. package/dist/components/navbar-saas/index.js +6 -0
  103. package/dist/components/navbar-saas/navbar-saas.js +68 -0
  104. package/dist/components/navbar-saas/use-mobile.js +19 -0
  105. package/dist/components/navigation-menu/index.js +22 -0
  106. package/dist/components/navigation-menu/navigation-menu.js +108 -0
  107. package/dist/components/pagination/index.js +4 -0
  108. package/dist/components/pagination/pagination.js +44 -0
  109. package/dist/components/popover/index.js +12 -0
  110. package/dist/components/popover/popover.js +28 -0
  111. package/dist/components/pro-tip/index.js +8 -0
  112. package/dist/components/pro-tip/pro-tip.js +139 -0
  113. package/dist/components/profile-section/index.js +4 -0
  114. package/dist/components/profile-section/profile-section.js +45 -0
  115. package/dist/components/progress-bar/index.js +4 -0
  116. package/dist/components/progress-bar/progress-bar.js +56 -0
  117. package/dist/components/progress-card/index.js +6 -0
  118. package/dist/components/progress-card/progress-card.js +68 -0
  119. package/dist/components/quiz/index.js +4 -0
  120. package/dist/components/quiz/quiz.js +210 -0
  121. package/dist/components/radio-group/index.js +5 -0
  122. package/dist/components/radio-group/radio-group.js +36 -0
  123. package/dist/components/resizable/index.js +10 -0
  124. package/dist/components/resizable/resizable.js +39 -0
  125. package/dist/components/scroll-area/index.js +5 -0
  126. package/dist/components/scroll-area/scroll-area.js +39 -0
  127. package/dist/components/search-bar/index.js +4 -0
  128. package/dist/components/search-bar/search-bar.js +120 -0
  129. package/dist/components/search-dialog/index.js +4 -0
  130. package/dist/components/search-dialog/search-dialog.js +102 -0
  131. package/dist/components/select/index.js +24 -0
  132. package/dist/components/select/select.js +125 -0
  133. package/dist/components/separator/index.js +4 -0
  134. package/dist/components/separator/separator.js +25 -0
  135. package/dist/components/share-dialog/index.js +6 -0
  136. package/dist/components/share-dialog/share-dialog.js +121 -0
  137. package/dist/components/share-section/index.js +6 -0
  138. package/dist/components/share-section/share-section.js +57 -0
  139. package/dist/components/sheet/index.js +24 -0
  140. package/dist/components/sheet/sheet.js +116 -0
  141. package/dist/components/sidebar/index.js +4 -0
  142. package/dist/components/sidebar/sidebar.js +188 -0
  143. package/dist/components/sidebar-provider/index.js +5 -0
  144. package/dist/components/sidebar-provider/sidebar-provider.js +25 -0
  145. package/dist/components/sidebar-toggle/index.js +4 -0
  146. package/dist/components/sidebar-toggle/sidebar-toggle.js +36 -0
  147. package/dist/components/skeleton/index.js +4 -0
  148. package/dist/components/skeleton/skeleton.js +17 -0
  149. package/dist/components/slider/index.js +4 -0
  150. package/dist/components/slider/slider.js +24 -0
  151. package/dist/components/slideshow/index.js +6 -0
  152. package/dist/components/slideshow/slideshow.js +442 -0
  153. package/dist/components/social-fab/index.js +6 -0
  154. package/dist/components/social-fab/social-fab.js +211 -0
  155. package/dist/components/social-fab/use-social-fab.js +111 -0
  156. package/dist/components/spinner/index.js +4 -0
  157. package/dist/components/spinner/spinner.js +23 -0
  158. package/dist/components/step-by-step/index.js +8 -0
  159. package/dist/components/step-by-step/step-by-step.js +194 -0
  160. package/dist/components/step-navigation/index.js +4 -0
  161. package/dist/components/step-navigation/step-navigation.js +119 -0
  162. package/dist/components/switch/index.js +4 -0
  163. package/dist/components/switch/switch.js +28 -0
  164. package/dist/components/table/index.js +20 -0
  165. package/dist/components/table/table.js +87 -0
  166. package/dist/components/table-of-contents/index.js +4 -0
  167. package/dist/components/table-of-contents/table-of-contents.js +71 -0
  168. package/dist/components/table-of-contents-panel/index.js +6 -0
  169. package/dist/components/table-of-contents-panel/table-of-contents-panel.js +202 -0
  170. package/dist/components/tabs/index.js +12 -0
  171. package/dist/components/tabs/tabs.js +84 -0
  172. package/dist/components/terminal/index.js +8 -0
  173. package/dist/components/terminal/terminal.js +119 -0
  174. package/dist/components/textarea/index.js +4 -0
  175. package/dist/components/textarea/textarea.js +22 -0
  176. package/dist/components/theme-provider/index.js +4 -0
  177. package/dist/components/theme-provider/theme-provider.js +11 -0
  178. package/dist/components/theme-toggle/index.js +4 -0
  179. package/dist/components/theme-toggle/theme-toggle.js +172 -0
  180. package/dist/components/thinking-block/index.js +4 -0
  181. package/dist/components/thinking-block/thinking-block.js +52 -0
  182. package/dist/components/tldr-section/index.js +4 -0
  183. package/dist/components/tldr-section/tldr-section.js +92 -0
  184. package/dist/components/toast/index.js +18 -0
  185. package/dist/components/toast/toast.js +84 -0
  186. package/dist/components/toast/toaster.js +38 -0
  187. package/dist/components/toggle/index.js +5 -0
  188. package/dist/components/toggle/toggle.js +39 -0
  189. package/dist/components/toggle-group/index.js +5 -0
  190. package/dist/components/toggle-group/toggle-group.js +46 -0
  191. package/dist/components/tooltip/index.js +12 -0
  192. package/dist/components/tooltip/tooltip.js +27 -0
  193. package/dist/components/truncated-text/index.js +4 -0
  194. package/dist/components/truncated-text/truncated-text.js +25 -0
  195. package/dist/components/tutorial-card/index.js +6 -0
  196. package/dist/components/tutorial-card/tutorial-card.js +75 -0
  197. package/dist/components/tutorial-complete/index.js +6 -0
  198. package/dist/components/tutorial-complete/tutorial-complete.js +134 -0
  199. package/dist/components/tutorial-filters/index.js +6 -0
  200. package/dist/components/tutorial-filters/tutorial-filters.js +205 -0
  201. package/dist/components/tutorial-intro-content/index.js +6 -0
  202. package/dist/components/tutorial-intro-content/tutorial-intro-content.js +141 -0
  203. package/dist/components/tutorial-mdx/index.js +8 -0
  204. package/dist/components/tutorial-mdx/tutorial-mdx.js +219 -0
  205. package/dist/components/video-embed/index.js +4 -0
  206. package/dist/components/video-embed/video-embed.js +77 -0
  207. package/dist/index.js +12 -8556
  208. package/dist/lib/types.js +11 -0
  209. package/dist/lib/use-debounce.js +17 -0
  210. package/dist/lib/utils.js +8 -0
  211. package/dist/tailwind-preset.d.ts +5 -0
  212. package/dist/tailwind-preset.js +9 -10
  213. package/dist/types/content.js +0 -0
  214. package/dist/types/index.js +0 -0
  215. package/package.json +1 -1
  216. package/dist/chunk-XRV5RSYH.js +0 -569
  217. 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,172 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef, useState } from "react";
4
+ import { useTheme } from "next-themes";
5
+ import { Button } from "../button/button";
6
+ import {
7
+ DropdownMenu,
8
+ DropdownMenuContent,
9
+ DropdownMenuItem,
10
+ DropdownMenuTrigger
11
+ } from "../dropdown-menu/dropdown-menu";
12
+ function ThemeButton({
13
+ ariaLabel,
14
+ children,
15
+ icon,
16
+ ...props
17
+ }) {
18
+ return /* @__PURE__ */ jsxs(
19
+ Button,
20
+ {
21
+ "aria-label": ariaLabel,
22
+ className: "bg-background text-foreground border border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500 transition-colors",
23
+ size: "icon",
24
+ variant: "outline",
25
+ ...props,
26
+ children: [
27
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-mono", children: icon }),
28
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: ariaLabel }),
29
+ children
30
+ ]
31
+ }
32
+ );
33
+ }
34
+ function ThemeMenuItem({
35
+ icon,
36
+ label,
37
+ onClick
38
+ }) {
39
+ return /* @__PURE__ */ jsxs(
40
+ DropdownMenuItem,
41
+ {
42
+ className: "hover:bg-accent cursor-pointer",
43
+ onClick,
44
+ children: [
45
+ icon,
46
+ " ",
47
+ label
48
+ ]
49
+ }
50
+ );
51
+ }
52
+ function ThemeToggle({ dict }) {
53
+ const { setTheme, theme } = useTheme();
54
+ const [mounted, setMounted] = useState(false);
55
+ const [open, setOpen] = useState(false);
56
+ const closeTimerReference = useRef(null);
57
+ const isHoveringOverMenuAreaReference = useRef(false);
58
+ const clearCloseTimer = useCallback(() => {
59
+ if (closeTimerReference.current !== null) {
60
+ window.clearTimeout(closeTimerReference.current);
61
+ closeTimerReference.current = null;
62
+ }
63
+ }, []);
64
+ const scheduleClose = useCallback(() => {
65
+ clearCloseTimer();
66
+ closeTimerReference.current = window.setTimeout(() => {
67
+ setOpen(false);
68
+ }, 250);
69
+ }, [clearCloseTimer]);
70
+ const handleOpenChange = useCallback((nextOpen) => {
71
+ if (!nextOpen && isHoveringOverMenuAreaReference.current) {
72
+ return;
73
+ }
74
+ setOpen(nextOpen);
75
+ }, []);
76
+ useEffect(() => {
77
+ setMounted(true);
78
+ }, []);
79
+ const getThemeIcon = useCallback(() => {
80
+ if (!mounted) return "\u2600";
81
+ switch (theme) {
82
+ case "light":
83
+ return "\u2600";
84
+ case "dark":
85
+ return "\u263E";
86
+ case "system":
87
+ return "\u2699";
88
+ case void 0:
89
+ return "\u2699";
90
+ default:
91
+ return "\u2699";
92
+ }
93
+ }, [theme, mounted]);
94
+ const themeIcon = getThemeIcon();
95
+ const handleThemeChange = useCallback(
96
+ (newTheme) => {
97
+ setTheme(newTheme);
98
+ },
99
+ [setTheme]
100
+ );
101
+ if (!mounted) {
102
+ return /* @__PURE__ */ jsx(ThemeButton, { ariaLabel: dict.theme.toggle_theme, icon: "\u2600" });
103
+ }
104
+ return /* @__PURE__ */ jsxs(DropdownMenu, { modal: false, onOpenChange: handleOpenChange, open, children: [
105
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
106
+ ThemeButton,
107
+ {
108
+ ariaLabel: dict.theme.toggle_theme,
109
+ icon: themeIcon,
110
+ onMouseEnter: () => {
111
+ isHoveringOverMenuAreaReference.current = true;
112
+ clearCloseTimer();
113
+ setOpen(true);
114
+ },
115
+ onMouseLeave: () => {
116
+ isHoveringOverMenuAreaReference.current = false;
117
+ scheduleClose();
118
+ }
119
+ }
120
+ ) }),
121
+ /* @__PURE__ */ jsxs(
122
+ DropdownMenuContent,
123
+ {
124
+ align: "end",
125
+ className: "bg-background border border-gray-300 dark:border-gray-600",
126
+ onMouseEnter: () => {
127
+ isHoveringOverMenuAreaReference.current = true;
128
+ clearCloseTimer();
129
+ },
130
+ onMouseLeave: () => {
131
+ isHoveringOverMenuAreaReference.current = false;
132
+ scheduleClose();
133
+ },
134
+ children: [
135
+ /* @__PURE__ */ jsx(
136
+ ThemeMenuItem,
137
+ {
138
+ icon: "\u2600",
139
+ label: dict.theme.light,
140
+ onClick: () => {
141
+ handleThemeChange("light");
142
+ }
143
+ }
144
+ ),
145
+ /* @__PURE__ */ jsx(
146
+ ThemeMenuItem,
147
+ {
148
+ icon: "\u263E",
149
+ label: dict.theme.dark,
150
+ onClick: () => {
151
+ handleThemeChange("dark");
152
+ }
153
+ }
154
+ ),
155
+ /* @__PURE__ */ jsx(
156
+ ThemeMenuItem,
157
+ {
158
+ icon: "\u2699",
159
+ label: dict.theme.system,
160
+ onClick: () => {
161
+ handleThemeChange("system");
162
+ }
163
+ }
164
+ )
165
+ ]
166
+ }
167
+ )
168
+ ] });
169
+ }
170
+ export {
171
+ ThemeToggle
172
+ };
@@ -0,0 +1,4 @@
1
+ import { ThinkingBlock } from "./thinking-block";
2
+ export {
3
+ ThinkingBlock
4
+ };
@@ -0,0 +1,52 @@
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) setIsExpanded(true);
15
+ }, [isStreaming]);
16
+ const toggleExpanded = useCallback(() => {
17
+ setIsExpanded((previous) => !previous);
18
+ }, []);
19
+ return /* @__PURE__ */ jsxs("div", { className: cn("mb-2", className), children: [
20
+ /* @__PURE__ */ jsxs(
21
+ "button",
22
+ {
23
+ "aria-controls": contentId,
24
+ "aria-expanded": isExpanded,
25
+ className: "flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",
26
+ onClick: toggleExpanded,
27
+ type: "button",
28
+ children: [
29
+ isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-3 w-3" }),
30
+ /* @__PURE__ */ jsxs("span", { children: [
31
+ "Thinking",
32
+ isStreaming ? /* @__PURE__ */ jsx("span", { className: "ml-1 animate-pulse", children: "..." }) : null
33
+ ] })
34
+ ]
35
+ }
36
+ ),
37
+ isExpanded ? /* @__PURE__ */ jsxs(
38
+ "div",
39
+ {
40
+ 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",
41
+ id: contentId,
42
+ children: [
43
+ thinking,
44
+ isStreaming ? /* @__PURE__ */ jsx("span", { className: "animate-pulse", children: "|" }) : null
45
+ ]
46
+ }
47
+ ) : null
48
+ ] });
49
+ }
50
+ export {
51
+ ThinkingBlock
52
+ };
@@ -0,0 +1,4 @@
1
+ import { TLDRSection } from "./tldr-section";
2
+ export {
3
+ TLDRSection
4
+ };
@@ -0,0 +1,92 @@
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
+ setIsLoading(true);
12
+ setHasBeenOpened(true);
13
+ if (timerReference.current) {
14
+ clearTimeout(timerReference.current);
15
+ }
16
+ timerReference.current = setTimeout(() => {
17
+ setIsLoading(false);
18
+ timerReference.current = null;
19
+ }, 800);
20
+ }
21
+ return () => {
22
+ if (timerReference.current) {
23
+ clearTimeout(timerReference.current);
24
+ timerReference.current = null;
25
+ }
26
+ };
27
+ }, [isExpanded]);
28
+ return /* @__PURE__ */ jsxs("div", { className: "my-8 rounded-lg border border-border bg-muted/30 overflow-hidden", children: [
29
+ /* @__PURE__ */ jsxs(
30
+ "button",
31
+ {
32
+ className: "flex items-center justify-between w-full px-4 py-3 hover:bg-muted/50 transition-colors",
33
+ onClick: () => {
34
+ setIsExpanded(!isExpanded);
35
+ },
36
+ type: "button",
37
+ children: [
38
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
39
+ /* @__PURE__ */ jsx(
40
+ "svg",
41
+ {
42
+ className: "w-5 h-5 text-muted-foreground",
43
+ fill: "none",
44
+ stroke: "currentColor",
45
+ strokeWidth: "2",
46
+ viewBox: "0 0 24 24",
47
+ xmlns: "http://www.w3.org/2000/svg",
48
+ children: /* @__PURE__ */ jsx(
49
+ "path",
50
+ {
51
+ d: "M4 6h16M4 12h16M4 18h16",
52
+ strokeLinecap: "round",
53
+ strokeLinejoin: "round"
54
+ }
55
+ )
56
+ }
57
+ ),
58
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: label })
59
+ ] }),
60
+ /* @__PURE__ */ jsx(
61
+ "svg",
62
+ {
63
+ className: `w-4 h-4 text-muted-foreground transition-transform ${isExpanded ? "rotate-180" : ""}`,
64
+ fill: "none",
65
+ stroke: "currentColor",
66
+ strokeWidth: "2",
67
+ viewBox: "0 0 24 24",
68
+ xmlns: "http://www.w3.org/2000/svg",
69
+ children: /* @__PURE__ */ jsx(
70
+ "path",
71
+ {
72
+ d: "M19 9l-7 7-7-7",
73
+ strokeLinecap: "round",
74
+ strokeLinejoin: "round"
75
+ }
76
+ )
77
+ }
78
+ )
79
+ ]
80
+ }
81
+ ),
82
+ 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: [
83
+ /* @__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" }) }),
84
+ /* @__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" }) }),
85
+ /* @__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" }) }),
86
+ /* @__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" }) })
87
+ ] }) : /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground leading-relaxed", children }) }) : null
88
+ ] });
89
+ }
90
+ export {
91
+ TLDRSection
92
+ };
@@ -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
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ TutorialCard
3
+ } from "./tutorial-card";
4
+ export {
5
+ TutorialCard
6
+ };