@nous-research/ui 0.13.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/README.md +4 -1
  2. package/dist/assets/filler-bg0.webp +0 -0
  3. package/dist/assets.d.ts +38 -0
  4. package/dist/fonts.d.ts +0 -1
  5. package/dist/fonts.js +5 -7
  6. package/dist/hooks/use-capped-frame.d.ts +0 -1
  7. package/dist/hooks/use-capped-frame.js +12 -13
  8. package/dist/hooks/use-css-var-dims.d.ts +0 -1
  9. package/dist/hooks/use-css-var-dims.js +26 -21
  10. package/dist/hooks/use-gpu-tier.d.ts +0 -1
  11. package/dist/hooks/use-gpu-tier.js +90 -110
  12. package/dist/hooks/use-render-loop.d.ts +0 -1
  13. package/dist/hooks/use-render-loop.js +58 -58
  14. package/dist/hooks/use-smooth-controls.d.ts +0 -1
  15. package/dist/hooks/use-smooth-controls.js +204 -206
  16. package/dist/index.d.ts +0 -1
  17. package/dist/index.js +84 -58
  18. package/dist/ui/basic-page.d.ts +1 -2
  19. package/dist/ui/basic-page.js +15 -7
  20. package/dist/ui/components/animated-count.d.ts +1 -2
  21. package/dist/ui/components/animated-count.js +109 -85
  22. package/dist/ui/components/ascii.d.ts +2 -3
  23. package/dist/ui/components/ascii.js +75 -59
  24. package/dist/ui/components/badge.d.ts +1 -2
  25. package/dist/ui/components/badge.js +35 -18
  26. package/dist/ui/components/badges/nous-girl.d.ts +1 -2
  27. package/dist/ui/components/badges/nous-girl.js +80 -3
  28. package/dist/ui/components/blend-mode.d.ts +1 -2
  29. package/dist/ui/components/blend-mode.js +55 -63
  30. package/dist/ui/components/blink.d.ts +1 -2
  31. package/dist/ui/components/blink.js +15 -6
  32. package/dist/ui/components/button.d.ts +2 -3
  33. package/dist/ui/components/button.js +139 -90
  34. package/dist/ui/components/command-block.d.ts +2 -3
  35. package/dist/ui/components/command-block.js +52 -24
  36. package/dist/ui/components/cursor.d.ts +1 -2
  37. package/dist/ui/components/cursor.js +93 -54
  38. package/dist/ui/components/dropdown-menu.d.ts +1 -2
  39. package/dist/ui/components/dropdown-menu.js +99 -51
  40. package/dist/ui/components/fit-text/index.d.ts +0 -1
  41. package/dist/ui/components/fit-text/index.js +21 -13
  42. package/dist/ui/components/graphs/bar-chart.d.ts +1 -2
  43. package/dist/ui/components/graphs/bar-chart.js +116 -63
  44. package/dist/ui/components/graphs/index.d.ts +0 -1
  45. package/dist/ui/components/graphs/index.js +3 -4
  46. package/dist/ui/components/graphs/line-chart.d.ts +1 -2
  47. package/dist/ui/components/graphs/line-chart.js +159 -102
  48. package/dist/ui/components/graphs/utils.d.ts +2 -3
  49. package/dist/ui/components/graphs/utils.js +147 -114
  50. package/dist/ui/components/grid/index.d.ts +0 -1
  51. package/dist/ui/components/grid/index.js +12 -9
  52. package/dist/ui/components/hover-bg.d.ts +0 -1
  53. package/dist/ui/components/hover-bg.js +11 -6
  54. package/dist/ui/components/icons/arrow.d.ts +1 -2
  55. package/dist/ui/components/icons/arrow.js +42 -5
  56. package/dist/ui/components/icons/chevron.d.ts +1 -2
  57. package/dist/ui/components/icons/chevron.js +49 -5
  58. package/dist/ui/components/icons/discord.d.ts +1 -2
  59. package/dist/ui/components/icons/discord.js +12 -4
  60. package/dist/ui/components/icons/eye.d.ts +1 -2
  61. package/dist/ui/components/icons/eye.js +5 -3
  62. package/dist/ui/components/icons/gear.d.ts +1 -2
  63. package/dist/ui/components/icons/gear.js +28 -14
  64. package/dist/ui/components/icons/github.d.ts +1 -2
  65. package/dist/ui/components/icons/github.js +12 -4
  66. package/dist/ui/components/icons/hamburger.d.ts +1 -2
  67. package/dist/ui/components/icons/hamburger.js +54 -5
  68. package/dist/ui/components/icons/heart.d.ts +1 -2
  69. package/dist/ui/components/icons/heart.js +8 -3
  70. package/dist/ui/components/icons/index.d.ts +0 -1
  71. package/dist/ui/components/icons/index.js +11 -12
  72. package/dist/ui/components/icons/link.d.ts +1 -2
  73. package/dist/ui/components/icons/link.js +10 -3
  74. package/dist/ui/components/icons/minus.d.ts +1 -2
  75. package/dist/ui/components/icons/minus.js +10 -3
  76. package/dist/ui/components/icons/search.d.ts +1 -2
  77. package/dist/ui/components/icons/search.js +30 -3
  78. package/dist/ui/components/image-distortion.d.ts +1 -2
  79. package/dist/ui/components/image-distortion.js +300 -265
  80. package/dist/ui/components/leva-client.d.ts +1 -2
  81. package/dist/ui/components/leva-client.js +9 -10
  82. package/dist/ui/components/list-item.d.ts +0 -1
  83. package/dist/ui/components/list-item.js +26 -10
  84. package/dist/ui/components/modal/index.d.ts +1 -2
  85. package/dist/ui/components/modal/index.js +33 -14
  86. package/dist/ui/components/overlays/blend-modes.d.ts +0 -1
  87. package/dist/ui/components/overlays/blend-modes.js +11 -12
  88. package/dist/ui/components/overlays/glitch.d.ts +1 -2
  89. package/dist/ui/components/overlays/glitch.js +115 -110
  90. package/dist/ui/components/overlays/greys.d.ts +1 -2
  91. package/dist/ui/components/overlays/greys.js +200 -179
  92. package/dist/ui/components/overlays/index.d.ts +1 -2
  93. package/dist/ui/components/overlays/index.js +31 -17
  94. package/dist/ui/components/overlays/lens-layers.d.ts +1 -2
  95. package/dist/ui/components/overlays/lens-layers.js +89 -65
  96. package/dist/ui/components/overlays/lens.d.ts +0 -1
  97. package/dist/ui/components/overlays/lens.js +46 -52
  98. package/dist/ui/components/overlays/noise.d.ts +1 -2
  99. package/dist/ui/components/overlays/noise.js +112 -113
  100. package/dist/ui/components/overlays/vignette.d.ts +1 -2
  101. package/dist/ui/components/overlays/vignette.js +44 -38
  102. package/dist/ui/components/poster.d.ts +1 -2
  103. package/dist/ui/components/poster.js +240 -87
  104. package/dist/ui/components/progress.d.ts +1 -2
  105. package/dist/ui/components/progress.js +52 -12
  106. package/dist/ui/components/scene-canvas.d.ts +1 -2
  107. package/dist/ui/components/scene-canvas.js +169 -119
  108. package/dist/ui/components/scramble.d.ts +1 -2
  109. package/dist/ui/components/scramble.js +60 -59
  110. package/dist/ui/components/segmented.d.ts +2 -3
  111. package/dist/ui/components/segmented.js +47 -12
  112. package/dist/ui/components/select.d.ts +1 -2
  113. package/dist/ui/components/select.js +207 -120
  114. package/dist/ui/components/selection-switcher.d.ts +0 -1
  115. package/dist/ui/components/selection-switcher.js +29 -25
  116. package/dist/ui/components/shader.d.ts +1 -2
  117. package/dist/ui/components/shader.js +56 -38
  118. package/dist/ui/components/socials.d.ts +1 -2
  119. package/dist/ui/components/socials.js +18 -7
  120. package/dist/ui/components/spinner.d.ts +1 -2
  121. package/dist/ui/components/spinner.js +36 -25
  122. package/dist/ui/components/stats.d.ts +1 -2
  123. package/dist/ui/components/stats.js +33 -9
  124. package/dist/ui/components/switch.d.ts +0 -1
  125. package/dist/ui/components/switch.js +35 -11
  126. package/dist/ui/components/tabs.d.ts +3 -4
  127. package/dist/ui/components/tabs.js +38 -12
  128. package/dist/ui/components/terminal-demo.d.ts +1 -2
  129. package/dist/ui/components/terminal-demo.js +119 -74
  130. package/dist/ui/components/theme-toggle.d.ts +1 -2
  131. package/dist/ui/components/theme-toggle.js +63 -8
  132. package/dist/ui/components/tier-card.d.ts +1 -2
  133. package/dist/ui/components/tier-card.js +144 -24
  134. package/dist/ui/components/tv.d.ts +1 -2
  135. package/dist/ui/components/tv.js +138 -90
  136. package/dist/ui/components/typography/h1.d.ts +0 -1
  137. package/dist/ui/components/typography/h1.js +17 -8
  138. package/dist/ui/components/typography/h2.d.ts +0 -1
  139. package/dist/ui/components/typography/h2.js +17 -8
  140. package/dist/ui/components/typography/index.d.ts +0 -1
  141. package/dist/ui/components/typography/index.js +35 -24
  142. package/dist/ui/components/typography/legend.d.ts +1 -2
  143. package/dist/ui/components/typography/legend.js +18 -6
  144. package/dist/ui/components/typography/small.d.ts +0 -1
  145. package/dist/ui/components/typography/small.js +8 -7
  146. package/dist/ui/components/watchlist.d.ts +1 -2
  147. package/dist/ui/components/watchlist.js +77 -25
  148. package/dist/ui/fonts.css +7 -7
  149. package/dist/ui/footer.d.ts +1 -2
  150. package/dist/ui/footer.js +61 -25
  151. package/dist/ui/header.d.ts +1 -2
  152. package/dist/ui/header.js +255 -60
  153. package/dist/ui/layout-wrapper.d.ts +1 -2
  154. package/dist/ui/layout-wrapper.js +5 -4
  155. package/dist/utils/color.d.ts +0 -1
  156. package/dist/utils/color.js +8 -9
  157. package/dist/utils/index.d.ts +0 -1
  158. package/dist/utils/index.js +37 -38
  159. package/dist/utils/poly.d.ts +0 -1
  160. package/dist/utils/poly.js +1 -2
  161. package/package.json +43 -25
  162. package/dist/assets/filler-bg0.jpg +0 -0
  163. package/dist/fonts.d.ts.map +0 -1
  164. package/dist/fonts.js.map +0 -1
  165. package/dist/hooks/use-capped-frame.d.ts.map +0 -1
  166. package/dist/hooks/use-capped-frame.js.map +0 -1
  167. package/dist/hooks/use-css-var-dims.d.ts.map +0 -1
  168. package/dist/hooks/use-css-var-dims.js.map +0 -1
  169. package/dist/hooks/use-gpu-tier.d.ts.map +0 -1
  170. package/dist/hooks/use-gpu-tier.js.map +0 -1
  171. package/dist/hooks/use-render-loop.d.ts.map +0 -1
  172. package/dist/hooks/use-render-loop.js.map +0 -1
  173. package/dist/hooks/use-smooth-controls.d.ts.map +0 -1
  174. package/dist/hooks/use-smooth-controls.js.map +0 -1
  175. package/dist/index.d.ts.map +0 -1
  176. package/dist/index.js.map +0 -1
  177. package/dist/ui/basic-page.d.ts.map +0 -1
  178. package/dist/ui/basic-page.js.map +0 -1
  179. package/dist/ui/components/animated-count.d.ts.map +0 -1
  180. package/dist/ui/components/animated-count.js.map +0 -1
  181. package/dist/ui/components/ascii.d.ts.map +0 -1
  182. package/dist/ui/components/ascii.js.map +0 -1
  183. package/dist/ui/components/badge.d.ts.map +0 -1
  184. package/dist/ui/components/badge.js.map +0 -1
  185. package/dist/ui/components/badges/nous-girl.d.ts.map +0 -1
  186. package/dist/ui/components/badges/nous-girl.js.map +0 -1
  187. package/dist/ui/components/blend-mode.d.ts.map +0 -1
  188. package/dist/ui/components/blend-mode.js.map +0 -1
  189. package/dist/ui/components/blink.d.ts.map +0 -1
  190. package/dist/ui/components/blink.js.map +0 -1
  191. package/dist/ui/components/button.d.ts.map +0 -1
  192. package/dist/ui/components/button.js.map +0 -1
  193. package/dist/ui/components/command-block.d.ts.map +0 -1
  194. package/dist/ui/components/command-block.js.map +0 -1
  195. package/dist/ui/components/cursor.d.ts.map +0 -1
  196. package/dist/ui/components/cursor.js.map +0 -1
  197. package/dist/ui/components/dropdown-menu.d.ts.map +0 -1
  198. package/dist/ui/components/dropdown-menu.js.map +0 -1
  199. package/dist/ui/components/fit-text/index.d.ts.map +0 -1
  200. package/dist/ui/components/fit-text/index.js.map +0 -1
  201. package/dist/ui/components/graphs/bar-chart.d.ts.map +0 -1
  202. package/dist/ui/components/graphs/bar-chart.js.map +0 -1
  203. package/dist/ui/components/graphs/index.d.ts.map +0 -1
  204. package/dist/ui/components/graphs/index.js.map +0 -1
  205. package/dist/ui/components/graphs/line-chart.d.ts.map +0 -1
  206. package/dist/ui/components/graphs/line-chart.js.map +0 -1
  207. package/dist/ui/components/graphs/utils.d.ts.map +0 -1
  208. package/dist/ui/components/graphs/utils.js.map +0 -1
  209. package/dist/ui/components/grid/index.d.ts.map +0 -1
  210. package/dist/ui/components/grid/index.js.map +0 -1
  211. package/dist/ui/components/hover-bg.d.ts.map +0 -1
  212. package/dist/ui/components/hover-bg.js.map +0 -1
  213. package/dist/ui/components/icons/arrow.d.ts.map +0 -1
  214. package/dist/ui/components/icons/arrow.js.map +0 -1
  215. package/dist/ui/components/icons/chevron.d.ts.map +0 -1
  216. package/dist/ui/components/icons/chevron.js.map +0 -1
  217. package/dist/ui/components/icons/discord.d.ts.map +0 -1
  218. package/dist/ui/components/icons/discord.js.map +0 -1
  219. package/dist/ui/components/icons/eye.d.ts.map +0 -1
  220. package/dist/ui/components/icons/eye.js.map +0 -1
  221. package/dist/ui/components/icons/gear.d.ts.map +0 -1
  222. package/dist/ui/components/icons/gear.js.map +0 -1
  223. package/dist/ui/components/icons/github.d.ts.map +0 -1
  224. package/dist/ui/components/icons/github.js.map +0 -1
  225. package/dist/ui/components/icons/hamburger.d.ts.map +0 -1
  226. package/dist/ui/components/icons/hamburger.js.map +0 -1
  227. package/dist/ui/components/icons/heart.d.ts.map +0 -1
  228. package/dist/ui/components/icons/heart.js.map +0 -1
  229. package/dist/ui/components/icons/index.d.ts.map +0 -1
  230. package/dist/ui/components/icons/index.js.map +0 -1
  231. package/dist/ui/components/icons/link.d.ts.map +0 -1
  232. package/dist/ui/components/icons/link.js.map +0 -1
  233. package/dist/ui/components/icons/minus.d.ts.map +0 -1
  234. package/dist/ui/components/icons/minus.js.map +0 -1
  235. package/dist/ui/components/icons/search.d.ts.map +0 -1
  236. package/dist/ui/components/icons/search.js.map +0 -1
  237. package/dist/ui/components/image-distortion.d.ts.map +0 -1
  238. package/dist/ui/components/image-distortion.js.map +0 -1
  239. package/dist/ui/components/leva-client.d.ts.map +0 -1
  240. package/dist/ui/components/leva-client.js.map +0 -1
  241. package/dist/ui/components/list-item.d.ts.map +0 -1
  242. package/dist/ui/components/list-item.js.map +0 -1
  243. package/dist/ui/components/modal/index.d.ts.map +0 -1
  244. package/dist/ui/components/modal/index.js.map +0 -1
  245. package/dist/ui/components/overlays/blend-modes.d.ts.map +0 -1
  246. package/dist/ui/components/overlays/blend-modes.js.map +0 -1
  247. package/dist/ui/components/overlays/glitch.d.ts.map +0 -1
  248. package/dist/ui/components/overlays/glitch.js.map +0 -1
  249. package/dist/ui/components/overlays/greys.d.ts.map +0 -1
  250. package/dist/ui/components/overlays/greys.js.map +0 -1
  251. package/dist/ui/components/overlays/index.d.ts.map +0 -1
  252. package/dist/ui/components/overlays/index.js.map +0 -1
  253. package/dist/ui/components/overlays/lens-layers.d.ts.map +0 -1
  254. package/dist/ui/components/overlays/lens-layers.js.map +0 -1
  255. package/dist/ui/components/overlays/lens.d.ts.map +0 -1
  256. package/dist/ui/components/overlays/lens.js.map +0 -1
  257. package/dist/ui/components/overlays/noise.d.ts.map +0 -1
  258. package/dist/ui/components/overlays/noise.js.map +0 -1
  259. package/dist/ui/components/overlays/vignette.d.ts.map +0 -1
  260. package/dist/ui/components/overlays/vignette.js.map +0 -1
  261. package/dist/ui/components/poster.d.ts.map +0 -1
  262. package/dist/ui/components/poster.js.map +0 -1
  263. package/dist/ui/components/progress.d.ts.map +0 -1
  264. package/dist/ui/components/progress.js.map +0 -1
  265. package/dist/ui/components/scene-canvas.d.ts.map +0 -1
  266. package/dist/ui/components/scene-canvas.js.map +0 -1
  267. package/dist/ui/components/scramble.d.ts.map +0 -1
  268. package/dist/ui/components/scramble.js.map +0 -1
  269. package/dist/ui/components/segmented.d.ts.map +0 -1
  270. package/dist/ui/components/segmented.js.map +0 -1
  271. package/dist/ui/components/select.d.ts.map +0 -1
  272. package/dist/ui/components/select.js.map +0 -1
  273. package/dist/ui/components/selection-switcher.d.ts.map +0 -1
  274. package/dist/ui/components/selection-switcher.js.map +0 -1
  275. package/dist/ui/components/shader.d.ts.map +0 -1
  276. package/dist/ui/components/shader.js.map +0 -1
  277. package/dist/ui/components/socials.d.ts.map +0 -1
  278. package/dist/ui/components/socials.js.map +0 -1
  279. package/dist/ui/components/spinner.d.ts.map +0 -1
  280. package/dist/ui/components/spinner.js.map +0 -1
  281. package/dist/ui/components/stats.d.ts.map +0 -1
  282. package/dist/ui/components/stats.js.map +0 -1
  283. package/dist/ui/components/switch.d.ts.map +0 -1
  284. package/dist/ui/components/switch.js.map +0 -1
  285. package/dist/ui/components/tabs.d.ts.map +0 -1
  286. package/dist/ui/components/tabs.js.map +0 -1
  287. package/dist/ui/components/terminal-demo.d.ts.map +0 -1
  288. package/dist/ui/components/terminal-demo.js.map +0 -1
  289. package/dist/ui/components/theme-toggle.d.ts.map +0 -1
  290. package/dist/ui/components/theme-toggle.js.map +0 -1
  291. package/dist/ui/components/tier-card.d.ts.map +0 -1
  292. package/dist/ui/components/tier-card.js.map +0 -1
  293. package/dist/ui/components/tv.d.ts.map +0 -1
  294. package/dist/ui/components/tv.js.map +0 -1
  295. package/dist/ui/components/typography/h1.d.ts.map +0 -1
  296. package/dist/ui/components/typography/h1.js.map +0 -1
  297. package/dist/ui/components/typography/h2.d.ts.map +0 -1
  298. package/dist/ui/components/typography/h2.js.map +0 -1
  299. package/dist/ui/components/typography/index.d.ts.map +0 -1
  300. package/dist/ui/components/typography/index.js.map +0 -1
  301. package/dist/ui/components/typography/legend.d.ts.map +0 -1
  302. package/dist/ui/components/typography/legend.js.map +0 -1
  303. package/dist/ui/components/typography/small.d.ts.map +0 -1
  304. package/dist/ui/components/typography/small.js.map +0 -1
  305. package/dist/ui/components/watchlist.d.ts.map +0 -1
  306. package/dist/ui/components/watchlist.js.map +0 -1
  307. package/dist/ui/footer.d.ts.map +0 -1
  308. package/dist/ui/footer.js.map +0 -1
  309. package/dist/ui/header.d.ts.map +0 -1
  310. package/dist/ui/header.js.map +0 -1
  311. package/dist/ui/layout-wrapper.d.ts.map +0 -1
  312. package/dist/ui/layout-wrapper.js.map +0 -1
  313. package/dist/utils/color.d.ts.map +0 -1
  314. package/dist/utils/color.js.map +0 -1
  315. package/dist/utils/index.d.ts.map +0 -1
  316. package/dist/utils/index.js.map +0 -1
  317. package/dist/utils/poly.d.ts.map +0 -1
  318. package/dist/utils/poly.js.map +0 -1
@@ -1,11 +1,35 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from '../../utils';
3
- import { Typography } from './typography';
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../../utils/index.js";
3
+ import { Typography } from "./typography/index.js";
4
4
  export function Stats({ className, items, flip, ...props }) {
5
- return (_jsx("div", { className: cn('flex w-full flex-col gap-5', className), ...props, children: items.map(({ label, value }) => {
6
- const valueText = (_jsx(Typography, { className: "text-xs leading-[1.4] tracking-widest", expanded: true, children: typeof value === 'string' ? value : value.node }));
7
- const labelText = (_jsx(Typography, { className: "leading-none tracking-[0.2em] opacity-60", mono: true, children: typeof label === 'string' ? label : label.node }));
8
- return (_jsxs("div", { className: "text-midground grid grid-cols-[auto_1fr_auto] items-center gap-2.5 uppercase", children: [flip ? labelText : valueText, _jsx(Typography, { className: "min-w-0 overflow-hidden text-[13px] leading-[1.4] tracking-[0.4em] opacity-20", expanded: true, children: '·'.repeat(100) }), flip ? valueText : labelText] }, (typeof label === 'string' ? label : label.key) + '@@@' + (typeof value === 'string' ? value : value.key)));
9
- }) }));
5
+ return /* @__PURE__ */ jsx("div", { className: cn("flex w-full flex-col gap-5", className), ...props, children: items.map(({ label, value }) => {
6
+ const valueText = /* @__PURE__ */ jsx(
7
+ Typography,
8
+ {
9
+ className: "text-xs leading-[1.4] tracking-widest",
10
+ expanded: true,
11
+ children: typeof value === "string" ? value : value.node
12
+ }
13
+ );
14
+ const labelText = /* @__PURE__ */ jsx(Typography, { className: "leading-none tracking-[0.2em] opacity-60", mono: true, children: typeof label === "string" ? label : label.node });
15
+ return /* @__PURE__ */ jsxs(
16
+ "div",
17
+ {
18
+ className: "text-midground grid grid-cols-[auto_1fr_auto] items-center gap-2.5 uppercase",
19
+ children: [
20
+ flip ? labelText : valueText,
21
+ /* @__PURE__ */ jsx(
22
+ Typography,
23
+ {
24
+ className: "min-w-0 overflow-hidden text-[13px] leading-[1.4] tracking-[0.4em] opacity-20",
25
+ expanded: true,
26
+ children: "\xB7".repeat(100)
27
+ }
28
+ ),
29
+ flip ? valueText : labelText
30
+ ]
31
+ },
32
+ (typeof label === "string" ? label : label.key) + "@@@" + (typeof value === "string" ? value : value.key)
33
+ );
34
+ }) });
10
35
  }
11
- //# sourceMappingURL=stats.js.map
@@ -5,4 +5,3 @@ interface SwitchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onC
5
5
  onCheckedChange: (checked: boolean) => void;
6
6
  }
7
7
  export {};
8
- //# sourceMappingURL=switch.d.ts.map
@@ -1,12 +1,36 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { forwardRef } from 'react';
4
- import { cn } from '../../utils';
5
- export const Switch = forwardRef(function Switch({ checked, className, disabled, id, onCheckedChange, ...props }, ref) {
6
- return (_jsx("button", { "aria-checked": checked, className: cn('peer inline-flex h-5 w-9 shrink-0 items-center border transition-colors cursor-pointer', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-midground/30', 'disabled:cursor-not-allowed disabled:opacity-50', checked
7
- ? 'bg-midground/15 border-midground/30'
8
- : 'bg-background border-midground/20', className), disabled: disabled, id: id, onClick: () => onCheckedChange(!checked), ref: ref, role: "switch", type: "button", ...props, children: _jsx("span", { "aria-hidden": true, className: cn('pointer-events-none block h-3.5 w-3.5 transition-transform', checked
9
- ? 'translate-x-4 bg-midground'
10
- : 'translate-x-0.5 bg-midground/40') }) }));
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from "react";
4
+ import { cn } from "../../utils/index.js";
5
+ export const Switch = forwardRef(function Switch2({ checked, className, disabled, id, onCheckedChange, ...props }, ref) {
6
+ return /* @__PURE__ */ jsx(
7
+ "button",
8
+ {
9
+ "aria-checked": checked,
10
+ className: cn(
11
+ "peer inline-flex h-5 w-9 shrink-0 items-center border transition-colors cursor-pointer",
12
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-midground/30",
13
+ "disabled:cursor-not-allowed disabled:opacity-50",
14
+ checked ? "bg-midground/15 border-midground/30" : "bg-background border-midground/20",
15
+ className
16
+ ),
17
+ disabled,
18
+ id,
19
+ onClick: () => onCheckedChange(!checked),
20
+ ref,
21
+ role: "switch",
22
+ type: "button",
23
+ ...props,
24
+ children: /* @__PURE__ */ jsx(
25
+ "span",
26
+ {
27
+ "aria-hidden": true,
28
+ className: cn(
29
+ "pointer-events-none block h-3.5 w-3.5 transition-transform",
30
+ checked ? "translate-x-4 bg-midground" : "translate-x-0.5 bg-midground/40"
31
+ )
32
+ }
33
+ )
34
+ }
35
+ );
11
36
  });
12
- //# sourceMappingURL=switch.js.map
@@ -1,7 +1,7 @@
1
1
  import { type ButtonHTMLAttributes, type HTMLAttributes, type ReactNode } from 'react';
2
- export declare function Tabs({ children, className, defaultValue }: TabsProps): import("react/jsx-runtime").JSX.Element;
3
- export declare function TabsList({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
4
- export declare function TabsTrigger({ active, className, value: _value, ...props }: TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Tabs({ children, className, defaultValue }: TabsProps): import("react").JSX.Element;
3
+ export declare function TabsList({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
4
+ export declare function TabsTrigger({ active, className, value: _value, ...props }: TabsTriggerProps): import("react").JSX.Element;
5
5
  interface TabsProps {
6
6
  children: (active: string, setActive: (value: string) => void) => ReactNode;
7
7
  className?: string;
@@ -12,4 +12,3 @@ interface TabsTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
12
12
  value: string;
13
13
  }
14
14
  export {};
15
- //# sourceMappingURL=tabs.d.ts.map
@@ -1,17 +1,43 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useState } from 'react';
4
- import { cn } from '../../utils';
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import {
4
+ useState
5
+ } from "react";
6
+ import { cn } from "../../utils/index.js";
5
7
  export function Tabs({ children, className, defaultValue }) {
6
- const [active, setActive] = useState(defaultValue);
7
- return (_jsx("div", { className: cn('flex flex-col gap-4', className), children: children(active, setActive) }));
8
+ const [active, setActive] = useState(defaultValue);
9
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-4", className), children: children(active, setActive) });
8
10
  }
9
11
  export function TabsList({ className, ...props }) {
10
- return (_jsx("div", { className: cn('inline-flex h-9 items-center justify-start border-b border-midground/15 text-midground/60', className), ...props }));
12
+ return /* @__PURE__ */ jsx(
13
+ "div",
14
+ {
15
+ className: cn(
16
+ "inline-flex h-9 items-center justify-start border-b border-midground/15 text-midground/60",
17
+ className
18
+ ),
19
+ ...props
20
+ }
21
+ );
11
22
  }
12
- export function TabsTrigger({ active, className, value: _value, ...props }) {
13
- return (_jsx("button", { className: cn('relative inline-flex items-center justify-center whitespace-nowrap px-3 py-1.5', 'font-mondwest text-xs tracking-[0.1em] uppercase transition-all cursor-pointer', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-midground/30', active
14
- ? 'text-midground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-midground'
15
- : 'hover:text-midground', className), type: "button", ...props }));
23
+ export function TabsTrigger({
24
+ active,
25
+ className,
26
+ value: _value,
27
+ ...props
28
+ }) {
29
+ return /* @__PURE__ */ jsx(
30
+ "button",
31
+ {
32
+ className: cn(
33
+ "relative inline-flex items-center justify-center whitespace-nowrap px-3 py-1.5",
34
+ "font-mondwest text-xs tracking-[0.1em] uppercase transition-all cursor-pointer",
35
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-midground/30",
36
+ active ? "text-midground after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-midground" : "hover:text-midground",
37
+ className
38
+ ),
39
+ type: "button",
40
+ ...props
41
+ }
42
+ );
16
43
  }
17
- //# sourceMappingURL=tabs.js.map
@@ -1,4 +1,4 @@
1
- export declare function TerminalDemo({ ariaLabel, className, height, label, loopDelayMs, outputLineDelayMs, sequence }: TerminalDemoProps): import("react/jsx-runtime").JSX.Element;
1
+ export declare function TerminalDemo({ ariaLabel, className, height, label, loopDelayMs, outputLineDelayMs, sequence }: TerminalDemoProps): import("react").JSX.Element;
2
2
  interface ClearStep {
3
3
  type: 'clear';
4
4
  }
@@ -30,4 +30,3 @@ interface TypeStep {
30
30
  type: 'type';
31
31
  }
32
32
  export {};
33
- //# sourceMappingURL=terminal-demo.d.ts.map
@@ -1,79 +1,124 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useCallback, useEffect, useRef, useState } from 'react';
4
- import { cn } from '../../utils';
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef, useState } from "react";
4
+ import { cn } from "../../utils/index.js";
5
5
  function sleep(ms) {
6
- return new Promise(resolve => setTimeout(resolve, ms));
6
+ return new Promise((resolve) => setTimeout(resolve, ms));
7
7
  }
8
- export function TerminalDemo({ ariaLabel = 'Terminal Demo', className, height = 320, label = 'Terminal', loopDelayMs = 1000, outputLineDelayMs = 50, sequence }) {
9
- const bodyRef = useRef(null);
10
- const startedRef = useRef(false);
11
- const [html, setHtml] = useState('');
12
- const runDemo = useCallback(async () => {
13
- if (startedRef.current) {
14
- return;
15
- }
16
- startedRef.current = true;
17
- let content = '';
18
- const render = (h) => {
19
- content = h;
20
- setHtml(h);
21
- };
22
- for (;;) {
23
- for (const step of sequence) {
24
- switch (step.type) {
25
- case 'clear':
26
- content = '';
27
- render('');
28
- break;
29
- case 'output':
30
- for (const line of step.lines) {
31
- render(content + '\n' + line);
32
- await sleep(outputLineDelayMs);
33
- }
34
- break;
35
- case 'pause':
36
- await sleep(step.ms);
37
- break;
38
- case 'prompt':
39
- render(content + `<span class="text-midground">${step.text}</span>`);
40
- break;
41
- case 'type':
42
- for (const char of step.text) {
43
- render(content + char);
44
- await sleep(step.delay ?? 30);
45
- }
46
- break;
47
- }
8
+ export function TerminalDemo({
9
+ ariaLabel = "Terminal Demo",
10
+ className,
11
+ height = 320,
12
+ label = "Terminal",
13
+ loopDelayMs = 1e3,
14
+ outputLineDelayMs = 50,
15
+ sequence
16
+ }) {
17
+ const bodyRef = useRef(null);
18
+ const startedRef = useRef(false);
19
+ const [html, setHtml] = useState("");
20
+ const runDemo = useCallback(async () => {
21
+ if (startedRef.current) {
22
+ return;
23
+ }
24
+ startedRef.current = true;
25
+ let content = "";
26
+ const render = (h) => {
27
+ content = h;
28
+ setHtml(h);
29
+ };
30
+ for (; ; ) {
31
+ for (const step of sequence) {
32
+ switch (step.type) {
33
+ case "clear":
34
+ content = "";
35
+ render("");
36
+ break;
37
+ case "output":
38
+ for (const line of step.lines) {
39
+ render(content + "\n" + line);
40
+ await sleep(outputLineDelayMs);
48
41
  }
49
- content = '';
50
- render('');
51
- await sleep(loopDelayMs);
52
- }
53
- }, [loopDelayMs, outputLineDelayMs, sequence]);
54
- useEffect(() => {
55
- const el = bodyRef.current?.closest('[data-demo-root]');
56
- if (!el) {
57
- return;
58
- }
59
- const observer = new IntersectionObserver(entries => {
60
- entries.forEach(entry => {
61
- if (entry.isIntersecting) {
62
- runDemo();
63
- }
64
- });
65
- }, { threshold: 0.3 });
66
- observer.observe(el);
67
- return () => observer.disconnect();
68
- }, [runDemo]);
69
- useEffect(() => {
70
- if (bodyRef.current) {
71
- bodyRef.current.scrollTop = bodyRef.current.scrollHeight;
42
+ break;
43
+ case "pause":
44
+ await sleep(step.ms);
45
+ break;
46
+ case "prompt":
47
+ render(content + `<span class="text-midground">${step.text}</span>`);
48
+ break;
49
+ case "type":
50
+ for (const char of step.text) {
51
+ render(content + char);
52
+ await sleep(step.delay ?? 30);
53
+ }
54
+ break;
72
55
  }
73
- }, [html]);
74
- return (_jsxs("div", { "aria-label": ariaLabel, className: cn('border-4 border-double border-inherit', className), "data-demo-root": true, role: "img", children: [_jsxs("div", { className: "flex items-center gap-3 border-b border-current/10 px-3 py-2", children: [_jsxs("div", { className: "flex gap-1.5", children: [_jsx("span", { className: "bg-midground size-2 rounded-full", style: { mixBlendMode: 'plus-lighter' } }), _jsx("span", { className: "bg-midground/60 size-2 rounded-full" }), _jsx("span", { className: "bg-midground/30 size-2 rounded-full" })] }), _jsx("span", { className: "font-courier text-[0.625rem] tracking-widest uppercase opacity-50", children: label })] }), _jsx("div", { className: cn('overflow-x-hidden overflow-y-auto whitespace-pre-wrap', 'font-courier p-4 text-[0.75rem] leading-[1.7] normal-case'), dangerouslySetInnerHTML: {
75
- __html: html +
76
- '<span class="blink inline-block dither ml-0.5 h-[1em] w-[1ch]"></span>'
77
- }, ref: bodyRef, style: { height } })] }));
56
+ }
57
+ content = "";
58
+ render("");
59
+ await sleep(loopDelayMs);
60
+ }
61
+ }, [loopDelayMs, outputLineDelayMs, sequence]);
62
+ useEffect(() => {
63
+ const el = bodyRef.current?.closest("[data-demo-root]");
64
+ if (!el) {
65
+ return;
66
+ }
67
+ const observer = new IntersectionObserver(
68
+ (entries) => {
69
+ entries.forEach((entry) => {
70
+ if (entry.isIntersecting) {
71
+ runDemo();
72
+ }
73
+ });
74
+ },
75
+ { threshold: 0.3 }
76
+ );
77
+ observer.observe(el);
78
+ return () => observer.disconnect();
79
+ }, [runDemo]);
80
+ useEffect(() => {
81
+ if (bodyRef.current) {
82
+ bodyRef.current.scrollTop = bodyRef.current.scrollHeight;
83
+ }
84
+ }, [html]);
85
+ return /* @__PURE__ */ jsxs(
86
+ "div",
87
+ {
88
+ "aria-label": ariaLabel,
89
+ className: cn("border-4 border-double border-inherit", className),
90
+ "data-demo-root": true,
91
+ role: "img",
92
+ children: [
93
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 border-b border-current/10 px-3 py-2", children: [
94
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5", children: [
95
+ /* @__PURE__ */ jsx(
96
+ "span",
97
+ {
98
+ className: "bg-midground size-2 rounded-full",
99
+ style: { mixBlendMode: "plus-lighter" }
100
+ }
101
+ ),
102
+ /* @__PURE__ */ jsx("span", { className: "bg-midground/60 size-2 rounded-full" }),
103
+ /* @__PURE__ */ jsx("span", { className: "bg-midground/30 size-2 rounded-full" })
104
+ ] }),
105
+ /* @__PURE__ */ jsx("span", { className: "font-courier text-[0.625rem] tracking-widest uppercase opacity-50", children: label })
106
+ ] }),
107
+ /* @__PURE__ */ jsx(
108
+ "div",
109
+ {
110
+ className: cn(
111
+ "overflow-x-hidden overflow-y-auto whitespace-pre-wrap",
112
+ "font-courier p-4 text-[0.75rem] leading-[1.7] normal-case"
113
+ ),
114
+ dangerouslySetInnerHTML: {
115
+ __html: html + '<span class="blink inline-block dither ml-0.5 h-[1em] w-[1ch]"></span>'
116
+ },
117
+ ref: bodyRef,
118
+ style: { height }
119
+ }
120
+ )
121
+ ]
122
+ }
123
+ );
78
124
  }
79
- //# sourceMappingURL=terminal-demo.js.map
@@ -1,7 +1,6 @@
1
- export declare function ThemeToggle({ className, style }: ThemeToggleProps): import("react/jsx-runtime").JSX.Element;
1
+ export declare function ThemeToggle({ className, style }: ThemeToggleProps): import("react").JSX.Element;
2
2
  interface ThemeToggleProps {
3
3
  className?: string;
4
4
  style?: React.CSSProperties;
5
5
  }
6
6
  export {};
7
- //# sourceMappingURL=theme-toggle.d.ts.map
@@ -1,10 +1,65 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useStore } from '@nanostores/react';
4
- import { cn } from '../../utils';
5
- import { $lightMode, toggleLens } from './overlays';
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useStore } from "@nanostores/react";
4
+ import { cn } from "../../utils/index.js";
5
+ import { $lightMode, toggleLens } from "./overlays/index.js";
6
6
  export function ThemeToggle({ className, style }) {
7
- const light = useStore($lightMode);
8
- return (_jsxs("button", { "aria-label": light ? 'Switch to dark mode' : 'Switch to light mode', className: cn('relative flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full', 'border border-current/25 bg-current/8 transition-colors', 'hover:bg-current/15', className), onClick: toggleLens, style: style, type: "button", children: [_jsxs("svg", { className: "absolute left-1 size-3.5 opacity-40", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, viewBox: "0 0 24 24", children: [_jsx("circle", { cx: 12, cy: 12, r: 5 }), _jsx("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })] }), _jsx("svg", { className: "absolute right-1 size-3.5 opacity-40", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, viewBox: "0 0 24 24", children: _jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }), _jsx("span", { "aria-hidden": true, className: cn('bg-midground absolute size-4 rounded-full', 'transition-transform duration-200 ease-out'), style: { transform: `translateX(${light ? 2 : 22}px)` } })] }));
7
+ const light = useStore($lightMode);
8
+ return /* @__PURE__ */ jsxs(
9
+ "button",
10
+ {
11
+ "aria-label": light ? "Switch to dark mode" : "Switch to light mode",
12
+ className: cn(
13
+ "relative flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full",
14
+ "border border-current/25 bg-current/8 transition-colors",
15
+ "hover:bg-current/15",
16
+ className
17
+ ),
18
+ onClick: toggleLens,
19
+ style,
20
+ type: "button",
21
+ children: [
22
+ /* @__PURE__ */ jsxs(
23
+ "svg",
24
+ {
25
+ className: "absolute left-1 size-3.5 opacity-40",
26
+ fill: "none",
27
+ stroke: "currentColor",
28
+ strokeLinecap: "round",
29
+ strokeLinejoin: "round",
30
+ strokeWidth: 2,
31
+ viewBox: "0 0 24 24",
32
+ children: [
33
+ /* @__PURE__ */ jsx("circle", { cx: 12, cy: 12, r: 5 }),
34
+ /* @__PURE__ */ jsx("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })
35
+ ]
36
+ }
37
+ ),
38
+ /* @__PURE__ */ jsx(
39
+ "svg",
40
+ {
41
+ className: "absolute right-1 size-3.5 opacity-40",
42
+ fill: "none",
43
+ stroke: "currentColor",
44
+ strokeLinecap: "round",
45
+ strokeLinejoin: "round",
46
+ strokeWidth: 2,
47
+ viewBox: "0 0 24 24",
48
+ children: /* @__PURE__ */ jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
49
+ }
50
+ ),
51
+ /* @__PURE__ */ jsx(
52
+ "span",
53
+ {
54
+ "aria-hidden": true,
55
+ className: cn(
56
+ "bg-midground absolute size-4 rounded-full",
57
+ "transition-transform duration-200 ease-out"
58
+ ),
59
+ style: { transform: `translateX(${light ? 2 : 22}px)` }
60
+ }
61
+ )
62
+ ]
63
+ }
64
+ );
9
65
  }
10
- //# sourceMappingURL=theme-toggle.js.map
@@ -14,7 +14,7 @@
14
14
  * color` — used for the "highest tier" red treatment on top of any
15
15
  * base tint.
16
16
  */
17
- export declare function TierCard({ badge, bullets, className, image, isCurrent, onSelect, overlay, price, selected, tint, tintStrength, title }: TierCardProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function TierCard({ badge, bullets, className, image, isCurrent, onSelect, overlay, price, selected, tint, tintStrength, title }: TierCardProps): import("react").JSX.Element;
18
18
  export interface TierCardPrice {
19
19
  /** Headline price, e.g. `"$20"` or `"Free"`. */
20
20
  primary: string;
@@ -51,4 +51,3 @@ export interface TierCardProps {
51
51
  /** Tier name / headline. */
52
52
  title: React.ReactNode;
53
53
  }
54
- //# sourceMappingURL=tier-card.d.ts.map