@nous-research/ui 0.13.2 → 0.14.1

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 (320) hide show
  1. package/README.md +16 -0
  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/build.css +1 -0
  21. package/dist/ui/components/animated-count.d.ts +1 -2
  22. package/dist/ui/components/animated-count.js +109 -85
  23. package/dist/ui/components/ascii.d.ts +2 -3
  24. package/dist/ui/components/ascii.js +75 -59
  25. package/dist/ui/components/badge.d.ts +1 -2
  26. package/dist/ui/components/badge.js +35 -18
  27. package/dist/ui/components/badges/nous-girl.d.ts +1 -2
  28. package/dist/ui/components/badges/nous-girl.js +80 -3
  29. package/dist/ui/components/blend-mode.d.ts +1 -2
  30. package/dist/ui/components/blend-mode.js +55 -63
  31. package/dist/ui/components/blink.d.ts +1 -2
  32. package/dist/ui/components/blink.js +15 -6
  33. package/dist/ui/components/button.d.ts +2 -3
  34. package/dist/ui/components/button.js +139 -90
  35. package/dist/ui/components/command-block.d.ts +2 -3
  36. package/dist/ui/components/command-block.js +52 -24
  37. package/dist/ui/components/cursor.d.ts +1 -2
  38. package/dist/ui/components/cursor.js +93 -54
  39. package/dist/ui/components/dropdown-menu.d.ts +1 -2
  40. package/dist/ui/components/dropdown-menu.js +99 -51
  41. package/dist/ui/components/fit-text/index.d.ts +0 -1
  42. package/dist/ui/components/fit-text/index.js +21 -13
  43. package/dist/ui/components/graphs/bar-chart.d.ts +1 -2
  44. package/dist/ui/components/graphs/bar-chart.js +116 -63
  45. package/dist/ui/components/graphs/index.d.ts +0 -1
  46. package/dist/ui/components/graphs/index.js +3 -4
  47. package/dist/ui/components/graphs/line-chart.d.ts +1 -2
  48. package/dist/ui/components/graphs/line-chart.js +159 -102
  49. package/dist/ui/components/graphs/utils.d.ts +2 -3
  50. package/dist/ui/components/graphs/utils.js +147 -114
  51. package/dist/ui/components/grid/index.d.ts +0 -1
  52. package/dist/ui/components/grid/index.js +12 -9
  53. package/dist/ui/components/hover-bg.d.ts +0 -1
  54. package/dist/ui/components/hover-bg.js +11 -6
  55. package/dist/ui/components/icons/arrow.d.ts +1 -2
  56. package/dist/ui/components/icons/arrow.js +42 -5
  57. package/dist/ui/components/icons/chevron.d.ts +1 -2
  58. package/dist/ui/components/icons/chevron.js +49 -5
  59. package/dist/ui/components/icons/discord.d.ts +1 -2
  60. package/dist/ui/components/icons/discord.js +12 -4
  61. package/dist/ui/components/icons/eye.d.ts +1 -2
  62. package/dist/ui/components/icons/eye.js +5 -3
  63. package/dist/ui/components/icons/gear.d.ts +1 -2
  64. package/dist/ui/components/icons/gear.js +28 -14
  65. package/dist/ui/components/icons/github.d.ts +1 -2
  66. package/dist/ui/components/icons/github.js +12 -4
  67. package/dist/ui/components/icons/hamburger.d.ts +1 -2
  68. package/dist/ui/components/icons/hamburger.js +54 -5
  69. package/dist/ui/components/icons/heart.d.ts +1 -2
  70. package/dist/ui/components/icons/heart.js +8 -3
  71. package/dist/ui/components/icons/index.d.ts +0 -1
  72. package/dist/ui/components/icons/index.js +11 -12
  73. package/dist/ui/components/icons/link.d.ts +1 -2
  74. package/dist/ui/components/icons/link.js +10 -3
  75. package/dist/ui/components/icons/minus.d.ts +1 -2
  76. package/dist/ui/components/icons/minus.js +10 -3
  77. package/dist/ui/components/icons/search.d.ts +1 -2
  78. package/dist/ui/components/icons/search.js +30 -3
  79. package/dist/ui/components/image-distortion.d.ts +1 -2
  80. package/dist/ui/components/image-distortion.js +300 -265
  81. package/dist/ui/components/leva-client.d.ts +1 -2
  82. package/dist/ui/components/leva-client.js +9 -10
  83. package/dist/ui/components/list-item.d.ts +0 -1
  84. package/dist/ui/components/list-item.js +26 -10
  85. package/dist/ui/components/modal/index.d.ts +1 -2
  86. package/dist/ui/components/modal/index.js +33 -14
  87. package/dist/ui/components/overlays/blend-modes.d.ts +0 -1
  88. package/dist/ui/components/overlays/blend-modes.js +11 -12
  89. package/dist/ui/components/overlays/glitch.d.ts +1 -2
  90. package/dist/ui/components/overlays/glitch.js +115 -110
  91. package/dist/ui/components/overlays/greys.d.ts +1 -2
  92. package/dist/ui/components/overlays/greys.js +200 -179
  93. package/dist/ui/components/overlays/index.d.ts +1 -2
  94. package/dist/ui/components/overlays/index.js +31 -17
  95. package/dist/ui/components/overlays/lens-layers.d.ts +1 -2
  96. package/dist/ui/components/overlays/lens-layers.js +89 -65
  97. package/dist/ui/components/overlays/lens.d.ts +0 -1
  98. package/dist/ui/components/overlays/lens.js +46 -52
  99. package/dist/ui/components/overlays/noise.d.ts +1 -2
  100. package/dist/ui/components/overlays/noise.js +112 -113
  101. package/dist/ui/components/overlays/vignette.d.ts +1 -2
  102. package/dist/ui/components/overlays/vignette.js +44 -38
  103. package/dist/ui/components/poster.d.ts +1 -2
  104. package/dist/ui/components/poster.js +240 -87
  105. package/dist/ui/components/progress.d.ts +1 -2
  106. package/dist/ui/components/progress.js +52 -12
  107. package/dist/ui/components/scene-canvas.d.ts +1 -2
  108. package/dist/ui/components/scene-canvas.js +169 -119
  109. package/dist/ui/components/scramble.d.ts +1 -2
  110. package/dist/ui/components/scramble.js +60 -59
  111. package/dist/ui/components/segmented.d.ts +2 -3
  112. package/dist/ui/components/segmented.js +47 -12
  113. package/dist/ui/components/select.d.ts +1 -2
  114. package/dist/ui/components/select.js +207 -120
  115. package/dist/ui/components/selection-switcher.d.ts +0 -1
  116. package/dist/ui/components/selection-switcher.js +29 -25
  117. package/dist/ui/components/shader.d.ts +1 -2
  118. package/dist/ui/components/shader.js +56 -38
  119. package/dist/ui/components/socials.d.ts +1 -2
  120. package/dist/ui/components/socials.js +18 -7
  121. package/dist/ui/components/spinner.d.ts +1 -2
  122. package/dist/ui/components/spinner.js +36 -25
  123. package/dist/ui/components/stats.d.ts +1 -2
  124. package/dist/ui/components/stats.js +33 -9
  125. package/dist/ui/components/switch.d.ts +0 -1
  126. package/dist/ui/components/switch.js +35 -11
  127. package/dist/ui/components/tabs.d.ts +3 -4
  128. package/dist/ui/components/tabs.js +38 -12
  129. package/dist/ui/components/terminal-demo.d.ts +1 -2
  130. package/dist/ui/components/terminal-demo.js +119 -74
  131. package/dist/ui/components/theme-toggle.d.ts +1 -2
  132. package/dist/ui/components/theme-toggle.js +63 -8
  133. package/dist/ui/components/tier-card.d.ts +1 -2
  134. package/dist/ui/components/tier-card.js +144 -24
  135. package/dist/ui/components/tv.d.ts +1 -2
  136. package/dist/ui/components/tv.js +138 -90
  137. package/dist/ui/components/typography/h1.d.ts +0 -1
  138. package/dist/ui/components/typography/h1.js +17 -8
  139. package/dist/ui/components/typography/h2.d.ts +0 -1
  140. package/dist/ui/components/typography/h2.js +17 -8
  141. package/dist/ui/components/typography/index.d.ts +0 -1
  142. package/dist/ui/components/typography/index.js +35 -24
  143. package/dist/ui/components/typography/legend.d.ts +1 -2
  144. package/dist/ui/components/typography/legend.js +18 -6
  145. package/dist/ui/components/typography/small.d.ts +0 -1
  146. package/dist/ui/components/typography/small.js +8 -7
  147. package/dist/ui/components/watchlist.d.ts +1 -2
  148. package/dist/ui/components/watchlist.js +77 -25
  149. package/dist/ui/fonts.css +7 -7
  150. package/dist/ui/footer.d.ts +1 -2
  151. package/dist/ui/footer.js +61 -25
  152. package/dist/ui/globals.css +5 -1
  153. package/dist/ui/header.d.ts +1 -2
  154. package/dist/ui/header.js +255 -60
  155. package/dist/ui/layout-wrapper.d.ts +1 -2
  156. package/dist/ui/layout-wrapper.js +5 -4
  157. package/dist/utils/color.d.ts +0 -1
  158. package/dist/utils/color.js +8 -9
  159. package/dist/utils/index.d.ts +0 -1
  160. package/dist/utils/index.js +37 -38
  161. package/dist/utils/poly.d.ts +0 -1
  162. package/dist/utils/poly.js +1 -2
  163. package/package.json +42 -24
  164. package/dist/assets/filler-bg0.jpg +0 -0
  165. package/dist/fonts.d.ts.map +0 -1
  166. package/dist/fonts.js.map +0 -1
  167. package/dist/hooks/use-capped-frame.d.ts.map +0 -1
  168. package/dist/hooks/use-capped-frame.js.map +0 -1
  169. package/dist/hooks/use-css-var-dims.d.ts.map +0 -1
  170. package/dist/hooks/use-css-var-dims.js.map +0 -1
  171. package/dist/hooks/use-gpu-tier.d.ts.map +0 -1
  172. package/dist/hooks/use-gpu-tier.js.map +0 -1
  173. package/dist/hooks/use-render-loop.d.ts.map +0 -1
  174. package/dist/hooks/use-render-loop.js.map +0 -1
  175. package/dist/hooks/use-smooth-controls.d.ts.map +0 -1
  176. package/dist/hooks/use-smooth-controls.js.map +0 -1
  177. package/dist/index.d.ts.map +0 -1
  178. package/dist/index.js.map +0 -1
  179. package/dist/ui/basic-page.d.ts.map +0 -1
  180. package/dist/ui/basic-page.js.map +0 -1
  181. package/dist/ui/components/animated-count.d.ts.map +0 -1
  182. package/dist/ui/components/animated-count.js.map +0 -1
  183. package/dist/ui/components/ascii.d.ts.map +0 -1
  184. package/dist/ui/components/ascii.js.map +0 -1
  185. package/dist/ui/components/badge.d.ts.map +0 -1
  186. package/dist/ui/components/badge.js.map +0 -1
  187. package/dist/ui/components/badges/nous-girl.d.ts.map +0 -1
  188. package/dist/ui/components/badges/nous-girl.js.map +0 -1
  189. package/dist/ui/components/blend-mode.d.ts.map +0 -1
  190. package/dist/ui/components/blend-mode.js.map +0 -1
  191. package/dist/ui/components/blink.d.ts.map +0 -1
  192. package/dist/ui/components/blink.js.map +0 -1
  193. package/dist/ui/components/button.d.ts.map +0 -1
  194. package/dist/ui/components/button.js.map +0 -1
  195. package/dist/ui/components/command-block.d.ts.map +0 -1
  196. package/dist/ui/components/command-block.js.map +0 -1
  197. package/dist/ui/components/cursor.d.ts.map +0 -1
  198. package/dist/ui/components/cursor.js.map +0 -1
  199. package/dist/ui/components/dropdown-menu.d.ts.map +0 -1
  200. package/dist/ui/components/dropdown-menu.js.map +0 -1
  201. package/dist/ui/components/fit-text/index.d.ts.map +0 -1
  202. package/dist/ui/components/fit-text/index.js.map +0 -1
  203. package/dist/ui/components/graphs/bar-chart.d.ts.map +0 -1
  204. package/dist/ui/components/graphs/bar-chart.js.map +0 -1
  205. package/dist/ui/components/graphs/index.d.ts.map +0 -1
  206. package/dist/ui/components/graphs/index.js.map +0 -1
  207. package/dist/ui/components/graphs/line-chart.d.ts.map +0 -1
  208. package/dist/ui/components/graphs/line-chart.js.map +0 -1
  209. package/dist/ui/components/graphs/utils.d.ts.map +0 -1
  210. package/dist/ui/components/graphs/utils.js.map +0 -1
  211. package/dist/ui/components/grid/index.d.ts.map +0 -1
  212. package/dist/ui/components/grid/index.js.map +0 -1
  213. package/dist/ui/components/hover-bg.d.ts.map +0 -1
  214. package/dist/ui/components/hover-bg.js.map +0 -1
  215. package/dist/ui/components/icons/arrow.d.ts.map +0 -1
  216. package/dist/ui/components/icons/arrow.js.map +0 -1
  217. package/dist/ui/components/icons/chevron.d.ts.map +0 -1
  218. package/dist/ui/components/icons/chevron.js.map +0 -1
  219. package/dist/ui/components/icons/discord.d.ts.map +0 -1
  220. package/dist/ui/components/icons/discord.js.map +0 -1
  221. package/dist/ui/components/icons/eye.d.ts.map +0 -1
  222. package/dist/ui/components/icons/eye.js.map +0 -1
  223. package/dist/ui/components/icons/gear.d.ts.map +0 -1
  224. package/dist/ui/components/icons/gear.js.map +0 -1
  225. package/dist/ui/components/icons/github.d.ts.map +0 -1
  226. package/dist/ui/components/icons/github.js.map +0 -1
  227. package/dist/ui/components/icons/hamburger.d.ts.map +0 -1
  228. package/dist/ui/components/icons/hamburger.js.map +0 -1
  229. package/dist/ui/components/icons/heart.d.ts.map +0 -1
  230. package/dist/ui/components/icons/heart.js.map +0 -1
  231. package/dist/ui/components/icons/index.d.ts.map +0 -1
  232. package/dist/ui/components/icons/index.js.map +0 -1
  233. package/dist/ui/components/icons/link.d.ts.map +0 -1
  234. package/dist/ui/components/icons/link.js.map +0 -1
  235. package/dist/ui/components/icons/minus.d.ts.map +0 -1
  236. package/dist/ui/components/icons/minus.js.map +0 -1
  237. package/dist/ui/components/icons/search.d.ts.map +0 -1
  238. package/dist/ui/components/icons/search.js.map +0 -1
  239. package/dist/ui/components/image-distortion.d.ts.map +0 -1
  240. package/dist/ui/components/image-distortion.js.map +0 -1
  241. package/dist/ui/components/leva-client.d.ts.map +0 -1
  242. package/dist/ui/components/leva-client.js.map +0 -1
  243. package/dist/ui/components/list-item.d.ts.map +0 -1
  244. package/dist/ui/components/list-item.js.map +0 -1
  245. package/dist/ui/components/modal/index.d.ts.map +0 -1
  246. package/dist/ui/components/modal/index.js.map +0 -1
  247. package/dist/ui/components/overlays/blend-modes.d.ts.map +0 -1
  248. package/dist/ui/components/overlays/blend-modes.js.map +0 -1
  249. package/dist/ui/components/overlays/glitch.d.ts.map +0 -1
  250. package/dist/ui/components/overlays/glitch.js.map +0 -1
  251. package/dist/ui/components/overlays/greys.d.ts.map +0 -1
  252. package/dist/ui/components/overlays/greys.js.map +0 -1
  253. package/dist/ui/components/overlays/index.d.ts.map +0 -1
  254. package/dist/ui/components/overlays/index.js.map +0 -1
  255. package/dist/ui/components/overlays/lens-layers.d.ts.map +0 -1
  256. package/dist/ui/components/overlays/lens-layers.js.map +0 -1
  257. package/dist/ui/components/overlays/lens.d.ts.map +0 -1
  258. package/dist/ui/components/overlays/lens.js.map +0 -1
  259. package/dist/ui/components/overlays/noise.d.ts.map +0 -1
  260. package/dist/ui/components/overlays/noise.js.map +0 -1
  261. package/dist/ui/components/overlays/vignette.d.ts.map +0 -1
  262. package/dist/ui/components/overlays/vignette.js.map +0 -1
  263. package/dist/ui/components/poster.d.ts.map +0 -1
  264. package/dist/ui/components/poster.js.map +0 -1
  265. package/dist/ui/components/progress.d.ts.map +0 -1
  266. package/dist/ui/components/progress.js.map +0 -1
  267. package/dist/ui/components/scene-canvas.d.ts.map +0 -1
  268. package/dist/ui/components/scene-canvas.js.map +0 -1
  269. package/dist/ui/components/scramble.d.ts.map +0 -1
  270. package/dist/ui/components/scramble.js.map +0 -1
  271. package/dist/ui/components/segmented.d.ts.map +0 -1
  272. package/dist/ui/components/segmented.js.map +0 -1
  273. package/dist/ui/components/select.d.ts.map +0 -1
  274. package/dist/ui/components/select.js.map +0 -1
  275. package/dist/ui/components/selection-switcher.d.ts.map +0 -1
  276. package/dist/ui/components/selection-switcher.js.map +0 -1
  277. package/dist/ui/components/shader.d.ts.map +0 -1
  278. package/dist/ui/components/shader.js.map +0 -1
  279. package/dist/ui/components/socials.d.ts.map +0 -1
  280. package/dist/ui/components/socials.js.map +0 -1
  281. package/dist/ui/components/spinner.d.ts.map +0 -1
  282. package/dist/ui/components/spinner.js.map +0 -1
  283. package/dist/ui/components/stats.d.ts.map +0 -1
  284. package/dist/ui/components/stats.js.map +0 -1
  285. package/dist/ui/components/switch.d.ts.map +0 -1
  286. package/dist/ui/components/switch.js.map +0 -1
  287. package/dist/ui/components/tabs.d.ts.map +0 -1
  288. package/dist/ui/components/tabs.js.map +0 -1
  289. package/dist/ui/components/terminal-demo.d.ts.map +0 -1
  290. package/dist/ui/components/terminal-demo.js.map +0 -1
  291. package/dist/ui/components/theme-toggle.d.ts.map +0 -1
  292. package/dist/ui/components/theme-toggle.js.map +0 -1
  293. package/dist/ui/components/tier-card.d.ts.map +0 -1
  294. package/dist/ui/components/tier-card.js.map +0 -1
  295. package/dist/ui/components/tv.d.ts.map +0 -1
  296. package/dist/ui/components/tv.js.map +0 -1
  297. package/dist/ui/components/typography/h1.d.ts.map +0 -1
  298. package/dist/ui/components/typography/h1.js.map +0 -1
  299. package/dist/ui/components/typography/h2.d.ts.map +0 -1
  300. package/dist/ui/components/typography/h2.js.map +0 -1
  301. package/dist/ui/components/typography/index.d.ts.map +0 -1
  302. package/dist/ui/components/typography/index.js.map +0 -1
  303. package/dist/ui/components/typography/legend.d.ts.map +0 -1
  304. package/dist/ui/components/typography/legend.js.map +0 -1
  305. package/dist/ui/components/typography/small.d.ts.map +0 -1
  306. package/dist/ui/components/typography/small.js.map +0 -1
  307. package/dist/ui/components/watchlist.d.ts.map +0 -1
  308. package/dist/ui/components/watchlist.js.map +0 -1
  309. package/dist/ui/footer.d.ts.map +0 -1
  310. package/dist/ui/footer.js.map +0 -1
  311. package/dist/ui/header.d.ts.map +0 -1
  312. package/dist/ui/header.js.map +0 -1
  313. package/dist/ui/layout-wrapper.d.ts.map +0 -1
  314. package/dist/ui/layout-wrapper.js.map +0 -1
  315. package/dist/utils/color.d.ts.map +0 -1
  316. package/dist/utils/color.js.map +0 -1
  317. package/dist/utils/index.d.ts.map +0 -1
  318. package/dist/utils/index.js.map +0 -1
  319. package/dist/utils/poly.d.ts.map +0 -1
  320. package/dist/utils/poly.js.map +0 -1
@@ -1,27 +1,79 @@
1
- 'use client';
2
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cn } from '../../utils';
4
- import { Scramble } from './ascii';
5
- import { LinkIcon } from './icons';
6
- import { Typography } from './typography';
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { cn } from "../../utils/index.js";
4
+ import { Scramble } from "./ascii.js";
5
+ import { LinkIcon } from "./icons/index.js";
6
+ import { Typography } from "./typography/index.js";
7
7
  const ETH_RE = /^0x[a-fA-F0-9]{40}$/;
8
- const truncate = (a) => `${a.slice(0, 6)}${'·'.repeat(8)}${a.slice(-4)}`;
9
- export function Watchlist({ className, counter = false, items, scramble = false, ...props }) {
10
- return (_jsx("div", { className: cn('flex flex-col gap-3', className), ...props, children: items.map(({ label, right, url }, i) => {
11
- const isStr = typeof label === 'string';
12
- const eth = isStr && ETH_RE.test(label);
13
- const text = eth ? truncate(label) : label;
14
- return (_jsxs("a", { className: cn('grid items-center gap-2.5 px-2.5 py-1.5', 'leading-[1.4] uppercase', 'hover:bg-midground/10! hover:ring-2 hover:ring-current/20', 'transition-all duration-500 hover:duration-0', 'opacity-(--midground-alpha)'), href: url, rel: "noopener noreferrer", style: {
15
- background: `color-mix(in oklch, var(--color-midground) ${10 * Math.max(0, 1 - i / 9)}%, transparent)`,
16
- gridTemplateColumns: [
17
- counter && 'auto auto',
18
- '1fr',
19
- right && 'auto',
20
- url && 'auto auto'
21
- ]
22
- .filter(Boolean)
23
- .join(' ')
24
- }, target: "_blank", children: [counter && (_jsxs(_Fragment, { children: [_jsx(Typography, { className: "text-lg tracking-[0.35em] opacity-40", compressed: true, children: String(i + 1).padStart(2, '0') }), _jsx("span", { className: "text-[0.8125rem] font-bold tracking-[0.4em] opacity-20", children: ":" })] })), isStr ? (_jsx(Typography, { className: "min-w-0 overflow-hidden text-lg font-bold tracking-[0.35em]", ...(eth ? { mono: true } : { compressed: true }), children: scramble ? _jsx(Scramble, { delay: i * 80, text: text }) : text })) : (label), right && (_jsx(Typography, { className: "text-right text-sm tracking-widest opacity-40", mono: true, children: right })), url && (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-[0.8125rem] tracking-[0.4em] opacity-20", children: ":" }), _jsx(LinkIcon, { className: "text-midground size-3.5" })] }))] }, i));
25
- }) }));
8
+ const truncate = (a) => `${a.slice(0, 6)}${"\xB7".repeat(8)}${a.slice(-4)}`;
9
+ export function Watchlist({
10
+ className,
11
+ counter = false,
12
+ items,
13
+ scramble = false,
14
+ ...props
15
+ }) {
16
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-3", className), ...props, children: items.map(({ label, right, url }, i) => {
17
+ const isStr = typeof label === "string";
18
+ const eth = isStr && ETH_RE.test(label);
19
+ const text = eth ? truncate(label) : label;
20
+ return /* @__PURE__ */ jsxs(
21
+ "a",
22
+ {
23
+ className: cn(
24
+ "grid items-center gap-2.5 px-2.5 py-1.5",
25
+ "leading-[1.4] uppercase",
26
+ "hover:bg-midground/10! hover:ring-2 hover:ring-current/20",
27
+ "transition-all duration-500 hover:duration-0",
28
+ "opacity-(--midground-alpha)"
29
+ ),
30
+ href: url,
31
+ rel: "noopener noreferrer",
32
+ style: {
33
+ background: `color-mix(in oklch, var(--color-midground) ${10 * Math.max(0, 1 - i / 9)}%, transparent)`,
34
+ gridTemplateColumns: [
35
+ counter && "auto auto",
36
+ "1fr",
37
+ right && "auto",
38
+ url && "auto auto"
39
+ ].filter(Boolean).join(" ")
40
+ },
41
+ target: "_blank",
42
+ children: [
43
+ counter && /* @__PURE__ */ jsxs(Fragment, { children: [
44
+ /* @__PURE__ */ jsx(
45
+ Typography,
46
+ {
47
+ className: "text-lg tracking-[0.35em] opacity-40",
48
+ compressed: true,
49
+ children: String(i + 1).padStart(2, "0")
50
+ }
51
+ ),
52
+ /* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] font-bold tracking-[0.4em] opacity-20", children: ":" })
53
+ ] }),
54
+ isStr ? /* @__PURE__ */ jsx(
55
+ Typography,
56
+ {
57
+ className: "min-w-0 overflow-hidden text-lg font-bold tracking-[0.35em]",
58
+ ...eth ? { mono: true } : { compressed: true },
59
+ children: scramble ? /* @__PURE__ */ jsx(Scramble, { delay: i * 80, text }) : text
60
+ }
61
+ ) : label,
62
+ right && /* @__PURE__ */ jsx(
63
+ Typography,
64
+ {
65
+ className: "text-right text-sm tracking-widest opacity-40",
66
+ mono: true,
67
+ children: right
68
+ }
69
+ ),
70
+ url && /* @__PURE__ */ jsxs(Fragment, { children: [
71
+ /* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] tracking-[0.4em] opacity-20", children: ":" }),
72
+ /* @__PURE__ */ jsx(LinkIcon, { className: "text-midground size-3.5" })
73
+ ] })
74
+ ]
75
+ },
76
+ i
77
+ );
78
+ }) });
26
79
  }
27
- //# sourceMappingURL=watchlist.js.map
package/dist/ui/fonts.css CHANGED
@@ -3,7 +3,7 @@
3
3
  font-style: normal;
4
4
  font-weight: 400;
5
5
  font-display: swap;
6
- src: url(/fonts/Collapse-Regular.woff2) format('woff2');
6
+ src: url('../fonts/Collapse-Regular.woff2') format('woff2');
7
7
  }
8
8
 
9
9
  @font-face {
@@ -11,7 +11,7 @@
11
11
  font-style: normal;
12
12
  font-weight: 700;
13
13
  font-display: swap;
14
- src: url(/fonts/Collapse-Bold.woff2) format('woff2');
14
+ src: url('../fonts/Collapse-Bold.woff2') format('woff2');
15
15
  }
16
16
 
17
17
  @font-face {
@@ -19,7 +19,7 @@
19
19
  font-style: normal;
20
20
  font-weight: 400;
21
21
  font-display: swap;
22
- src: url(/fonts/RulesCompressed-Regular.woff2) format('woff2');
22
+ src: url('../fonts/RulesCompressed-Regular.woff2') format('woff2');
23
23
  }
24
24
 
25
25
  @font-face {
@@ -27,7 +27,7 @@
27
27
  font-style: normal;
28
28
  font-weight: 600;
29
29
  font-display: swap;
30
- src: url(/fonts/RulesCompressed-Medium.woff2) format('woff2');
30
+ src: url('../fonts/RulesCompressed-Medium.woff2') format('woff2');
31
31
  }
32
32
 
33
33
  @font-face {
@@ -35,7 +35,7 @@
35
35
  font-style: normal;
36
36
  font-weight: 400;
37
37
  font-display: swap;
38
- src: url(/fonts/RulesExpanded-Regular.woff2) format('woff2');
38
+ src: url('../fonts/RulesExpanded-Regular.woff2') format('woff2');
39
39
  }
40
40
 
41
41
  @font-face {
@@ -43,7 +43,7 @@
43
43
  font-style: normal;
44
44
  font-weight: 700;
45
45
  font-display: swap;
46
- src: url(/fonts/RulesExpanded-Bold.woff2) format('woff2');
46
+ src: url('../fonts/RulesExpanded-Bold.woff2') format('woff2');
47
47
  }
48
48
 
49
49
  @font-face {
@@ -51,7 +51,7 @@
51
51
  font-style: normal;
52
52
  font-weight: 400;
53
53
  font-display: swap;
54
- src: url(/fonts/Mondwest-Regular.woff2) format('woff2');
54
+ src: url('../fonts/Mondwest-Regular.woff2') format('woff2');
55
55
  }
56
56
 
57
57
  :root {
@@ -1,5 +1,5 @@
1
1
  import { type SocialLink } from './components/socials';
2
- export declare function Footer({ className, groups, LinkComponent, socials, socialsLabel, style, themeLabel, themeToggle }: FooterProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Footer({ className, groups, LinkComponent, socials, socialsLabel, style, themeLabel, themeToggle }: FooterProps): import("react").JSX.Element;
3
3
  export interface FooterGroup {
4
4
  label: string;
5
5
  links: (FooterLink | string)[];
@@ -18,4 +18,3 @@ export interface FooterProps {
18
18
  themeLabel?: string;
19
19
  themeToggle?: boolean;
20
20
  }
21
- //# sourceMappingURL=footer.d.ts.map
package/dist/ui/footer.js CHANGED
@@ -1,28 +1,64 @@
1
- 'use client';
2
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
- import { useRef } from 'react';
4
- import { useCssVarDims } from '../hooks/use-css-var-dims';
5
- import { Cell, Grid } from './components/grid';
6
- import { Socials } from './components/socials';
7
- import { ThemeToggle } from './components/theme-toggle';
8
- import { Small } from './components/typography/small';
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useRef } from "react";
4
+ import { useCssVarDims } from "../hooks/use-css-var-dims.js";
5
+ import { Cell, Grid } from "./components/grid/index.js";
6
+ import { Socials } from "./components/socials.js";
7
+ import { ThemeToggle } from "./components/theme-toggle.js";
8
+ import { Small } from "./components/typography/small.js";
9
9
  const DEFAULT_GROUPS = [
10
- { label: 'Product', links: ['Overview', 'Features', 'Pricing'] },
11
- { label: 'Resources', links: ['Docs', 'Blog', 'Support'] },
12
- { label: 'Company', links: ['About', 'Careers', 'Contact'] },
13
- { label: 'Legal', links: ['Privacy', 'Terms', 'License'] }
10
+ { label: "Product", links: ["Overview", "Features", "Pricing"] },
11
+ { label: "Resources", links: ["Docs", "Blog", "Support"] },
12
+ { label: "Company", links: ["About", "Careers", "Contact"] },
13
+ { label: "Legal", links: ["Privacy", "Terms", "License"] }
14
14
  ];
15
- export function Footer({ className, groups = DEFAULT_GROUPS, LinkComponent = 'a', socials, socialsLabel = 'Socials', style, themeLabel = 'Theme', themeToggle = false }) {
16
- const ref = useRef(null);
17
- useCssVarDims('footer', ref);
18
- const hasSocials = (socials?.length ?? 0) > 0;
19
- const hasChrome = hasSocials || themeToggle;
20
- return (_jsxs("footer", { className: className, ref: ref, style: style, children: [_jsxs(Grid, { children: [_jsx(Cell, { children: _jsxs(Small, { className: "opacity-50", children: ["\u00A9", new Date().getFullYear()] }) }), groups.map(({ label, links }) => (_jsxs(Cell, { children: [_jsx(Small, { className: "opacity-50", children: label }), _jsx("nav", { className: "mt-3 flex flex-col gap-2", children: links.map(link => {
21
- const href = typeof link === 'string'
22
- ? `/${link.toLowerCase()}`
23
- : link.href;
24
- const label = typeof link === 'string' ? link : link.label;
25
- return (_jsx(Small, { as: LinkComponent, className: "underline", href: href, children: label }, label));
26
- }) })] }, label)))] }), hasChrome && (_jsxs(Grid, { children: [hasSocials && (_jsxs(Cell, { className: "flex items-start justify-between", children: [_jsx(Small, { className: "opacity-50", children: socialsLabel }), _jsx(Socials, { items: socials })] })), themeToggle && (_jsxs(Cell, { className: "flex items-start justify-between", children: [_jsx(Small, { className: "opacity-50", children: themeLabel }), _jsx(ThemeToggle, {})] }))] }))] }));
15
+ export function Footer({
16
+ className,
17
+ groups = DEFAULT_GROUPS,
18
+ LinkComponent = "a",
19
+ socials,
20
+ socialsLabel = "Socials",
21
+ style,
22
+ themeLabel = "Theme",
23
+ themeToggle = false
24
+ }) {
25
+ const ref = useRef(null);
26
+ useCssVarDims("footer", ref);
27
+ const hasSocials = (socials?.length ?? 0) > 0;
28
+ const hasChrome = hasSocials || themeToggle;
29
+ return /* @__PURE__ */ jsxs("footer", { className, ref, style, children: [
30
+ /* @__PURE__ */ jsxs(Grid, { children: [
31
+ /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsxs(Small, { className: "opacity-50", children: [
32
+ "\xA9",
33
+ (/* @__PURE__ */ new Date()).getFullYear()
34
+ ] }) }),
35
+ groups.map(({ label, links }) => /* @__PURE__ */ jsxs(Cell, { children: [
36
+ /* @__PURE__ */ jsx(Small, { className: "opacity-50", children: label }),
37
+ /* @__PURE__ */ jsx("nav", { className: "mt-3 flex flex-col gap-2", children: links.map((link) => {
38
+ const href = typeof link === "string" ? `/${link.toLowerCase()}` : link.href;
39
+ const label2 = typeof link === "string" ? link : link.label;
40
+ return /* @__PURE__ */ jsx(
41
+ Small,
42
+ {
43
+ as: LinkComponent,
44
+ className: "underline",
45
+ href,
46
+ children: label2
47
+ },
48
+ label2
49
+ );
50
+ }) })
51
+ ] }, label))
52
+ ] }),
53
+ hasChrome && /* @__PURE__ */ jsxs(Grid, { children: [
54
+ hasSocials && /* @__PURE__ */ jsxs(Cell, { className: "flex items-start justify-between", children: [
55
+ /* @__PURE__ */ jsx(Small, { className: "opacity-50", children: socialsLabel }),
56
+ /* @__PURE__ */ jsx(Socials, { items: socials })
57
+ ] }),
58
+ themeToggle && /* @__PURE__ */ jsxs(Cell, { className: "flex items-start justify-between", children: [
59
+ /* @__PURE__ */ jsx(Small, { className: "opacity-50", children: themeLabel }),
60
+ /* @__PURE__ */ jsx(ThemeToggle, {})
61
+ ] })
62
+ ] })
63
+ ] });
27
64
  }
28
- //# sourceMappingURL=footer.js.map
@@ -1,5 +1,4 @@
1
1
  @source ".";
2
- @import './fonts.css';
3
2
  @import './components/fit-text/fit-text.css' layer(components);
4
3
  @import './components/grid/grid.css' layer(components);
5
4
  @import './components/modal/modal.css' layer(components);
@@ -145,6 +144,11 @@
145
144
  --foreground: color-mix(in srgb, #fff 100%, transparent);
146
145
  --foreground-base: #fff;
147
146
  --foreground-alpha: 1;
147
+ --font-sans: 'Collapse', sans-serif;
148
+ --font-mono: 'Courier Prime', monospace;
149
+ --font-rules-compressed: 'Rules Compressed', sans-serif;
150
+ --font-rules-expanded: 'Rules Expanded', sans-serif;
151
+ --font-mondwest: 'Mondwest', sans-serif;
148
152
  --vsq: calc(0.5vw + 0.5vh);
149
153
  }
150
154
 
@@ -1,5 +1,5 @@
1
1
  import { type SocialLink } from './components/socials';
2
- export declare function Header({ brand, brandHref, className, desktopGridStyle, links, LinkComponent, scramble: scrambleProp, socials, socialsLabel, style, themeLabel, themeToggle }: HeaderProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Header({ brand, brandHref, className, desktopGridStyle, links, LinkComponent, scramble: scrambleProp, socials, socialsLabel, style, themeLabel, themeToggle }: HeaderProps): import("react").JSX.Element;
3
3
  export interface HeaderLink {
4
4
  external?: boolean;
5
5
  href: string;
@@ -39,4 +39,3 @@ export interface HeaderProps {
39
39
  }
40
40
  /** @deprecated Use `SocialLink` from `@nous-research/ui`. Same shape. */
41
41
  export type HeaderSocial = SocialLink;
42
- //# sourceMappingURL=header.d.ts.map
package/dist/ui/header.js CHANGED
@@ -1,74 +1,269 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { AnimatePresence, motion } from 'motion/react';
4
- import { createElement, useCallback, useRef, useState } from 'react';
5
- import { useCssVarDims } from '../hooks/use-css-var-dims';
6
- import { useGpuTier } from '../hooks/use-gpu-tier';
7
- import { cn } from '../utils';
8
- import { Blink } from './components/blink';
9
- import { Cell, Grid } from './components/grid';
10
- import { HoverBg } from './components/hover-bg';
11
- import { HamburgerIcon } from './components/icons/hamburger';
12
- import { Scramble } from './components/scramble';
13
- import { Socials } from './components/socials';
14
- import { ThemeToggle } from './components/theme-toggle';
15
- import { H2 } from './components/typography/h2';
16
- import { Small } from './components/typography/small';
17
- const DEFAULT_BRAND = (_jsxs("hgroup", { className: "flex flex-col gap-2", children: [_jsx(Small, { children: "Nous" }), _jsx(H2, { children: "Research" })] }));
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { AnimatePresence, motion } from "motion/react";
4
+ import { createElement, useCallback, useRef, useState } from "react";
5
+ import { useCssVarDims } from "../hooks/use-css-var-dims.js";
6
+ import { useGpuTier } from "../hooks/use-gpu-tier.js";
7
+ import { cn } from "../utils/index.js";
8
+ import { Blink } from "./components/blink.js";
9
+ import { Cell, Grid } from "./components/grid/index.js";
10
+ import { HoverBg } from "./components/hover-bg.js";
11
+ import { HamburgerIcon } from "./components/icons/hamburger.js";
12
+ import { Scramble } from "./components/scramble.js";
13
+ import { Socials } from "./components/socials.js";
14
+ import { ThemeToggle } from "./components/theme-toggle.js";
15
+ import { H2 } from "./components/typography/h2.js";
16
+ import { Small } from "./components/typography/small.js";
17
+ const DEFAULT_BRAND = /* @__PURE__ */ jsxs("hgroup", { className: "flex flex-col gap-2", children: [
18
+ /* @__PURE__ */ jsx(Small, { children: "Nous" }),
19
+ /* @__PURE__ */ jsx(H2, { children: "Research" })
20
+ ] });
18
21
  const DEFAULT_LINKS = [
19
- { href: '/projects', label: 'Projects' },
20
- { href: '/participants', label: 'Participants' },
21
- { href: '/provenance', label: 'Provenance' },
22
- { href: '/contribute', label: 'Contribute' }
22
+ { href: "/projects", label: "Projects" },
23
+ { href: "/participants", label: "Participants" },
24
+ { href: "/provenance", label: "Provenance" },
25
+ { href: "/contribute", label: "Contribute" }
23
26
  ];
24
- export function Header({ brand = DEFAULT_BRAND, brandHref = '/', className, desktopGridStyle, links = DEFAULT_LINKS, LinkComponent = 'a', scramble: scrambleProp = true, socials, socialsLabel = 'Socials', style, themeLabel = 'Theme', themeToggle = false }) {
25
- const ref = useRef(null);
26
- useCssVarDims('header', ref);
27
- // Skip the hover-Scramble rAF loop on tier-0 devices (no GPU / software
28
- // renderer / `prefers-reduced-motion: reduce`) regardless of the prop.
29
- const gpuTier = useGpuTier();
30
- const scramble = scrambleProp && gpuTier > 0;
31
- const [open, setOpen] = useState(false);
32
- const close = useCallback(() => setOpen(false), []);
33
- const hasSocials = (socials?.length ?? 0) > 0;
34
- const hasMobileChrome = themeToggle || hasSocials;
35
- return (_jsxs("header", { className: className, ref: ref, style: style, children: [_jsxs(Grid, { className: "hidden border-t border-b lg:grid", style: desktopGridStyle, children: [_jsx(BrandCell, { brand: brand, href: brandHref, LinkComponent: LinkComponent }), links.map(link => (_jsx(NavCell, { link: link, LinkComponent: LinkComponent, scramble: scramble }, link.href))), hasSocials && (_jsxs(Cell, { className: "flex items-start justify-between", children: [_jsx(Small, { className: "opacity-50", children: socialsLabel }), _jsx(Socials, { items: socials })] })), themeToggle && (_jsxs(Cell, { className: "flex items-start justify-between", children: [_jsx(Small, { className: "opacity-50", children: themeLabel }), _jsx(ThemeToggle, {})] }))] }), _jsxs("div", { className: cn('flex items-center justify-between border border-current/20 p-4', 'lg:hidden'), children: [_jsx(BrandLink, { brand: brand, href: brandHref, LinkComponent: LinkComponent }), _jsxs("div", { className: "flex items-center gap-3", children: [themeToggle && _jsx(ThemeToggle, {}), _jsx("button", { "aria-label": open ? 'Close menu' : 'Open menu', className: "relative z-50 cursor-pointer bg-transparent p-2", onClick: () => setOpen(v => !v), type: "button", children: _jsx(HamburgerIcon, { open: open }) })] })] }), _jsx(AnimatePresence, { children: open && (_jsx(motion.div, { animate: { opacity: 1 }, className: cn('bg-background/95 fixed inset-0 z-50 flex flex-col backdrop-blur-sm', 'p-8 lg:hidden'), exit: { opacity: 0 }, initial: { opacity: 0 }, transition: { duration: 0.2 }, children: _jsxs("div", { className: "flex flex-col border border-current/20", children: [_jsxs("div", { className: "flex items-center justify-between border-b border-current/20 p-4", children: [_jsx(BrandLink, { brand: brand, href: brandHref, LinkComponent: LinkComponent, onClick: close }), _jsx("button", { "aria-label": "Close menu", className: "cursor-pointer bg-transparent p-2", onClick: close, type: "button", children: _jsx(HamburgerIcon, { open: true }) })] }), links.map(link => (_jsx(MobileNavLink, { link: link, LinkComponent: LinkComponent, onNavigate: close, scramble: scramble }, link.href))), hasMobileChrome && (_jsxs("div", { className: "flex items-center gap-3 border-b border-current/20 p-4", children: [hasSocials && (_jsxs(_Fragment, { children: [_jsx(Small, { className: "opacity-50", children: socialsLabel }), _jsx(Socials, { items: socials, onNavigate: close })] })), themeToggle && hasSocials && _jsx("span", { className: "flex-1" }), themeToggle && (_jsxs(_Fragment, { children: [_jsx(Small, { className: "opacity-50", children: themeLabel }), _jsx(ThemeToggle, {})] }))] }))] }) })) })] }));
27
+ export function Header({
28
+ brand = DEFAULT_BRAND,
29
+ brandHref = "/",
30
+ className,
31
+ desktopGridStyle,
32
+ links = DEFAULT_LINKS,
33
+ LinkComponent = "a",
34
+ scramble: scrambleProp = true,
35
+ socials,
36
+ socialsLabel = "Socials",
37
+ style,
38
+ themeLabel = "Theme",
39
+ themeToggle = false
40
+ }) {
41
+ const ref = useRef(null);
42
+ useCssVarDims("header", ref);
43
+ const gpuTier = useGpuTier();
44
+ const scramble = scrambleProp && gpuTier > 0;
45
+ const [open, setOpen] = useState(false);
46
+ const close = useCallback(() => setOpen(false), []);
47
+ const hasSocials = (socials?.length ?? 0) > 0;
48
+ const hasMobileChrome = themeToggle || hasSocials;
49
+ return /* @__PURE__ */ jsxs("header", { className, ref, style, children: [
50
+ /* @__PURE__ */ jsxs(
51
+ Grid,
52
+ {
53
+ className: "hidden border-t border-b lg:grid",
54
+ style: desktopGridStyle,
55
+ children: [
56
+ /* @__PURE__ */ jsx(
57
+ BrandCell,
58
+ {
59
+ brand,
60
+ href: brandHref,
61
+ LinkComponent
62
+ }
63
+ ),
64
+ links.map((link) => /* @__PURE__ */ jsx(
65
+ NavCell,
66
+ {
67
+ link,
68
+ LinkComponent,
69
+ scramble
70
+ },
71
+ link.href
72
+ )),
73
+ hasSocials && /* @__PURE__ */ jsxs(Cell, { className: "flex items-start justify-between", children: [
74
+ /* @__PURE__ */ jsx(Small, { className: "opacity-50", children: socialsLabel }),
75
+ /* @__PURE__ */ jsx(Socials, { items: socials })
76
+ ] }),
77
+ themeToggle && /* @__PURE__ */ jsxs(Cell, { className: "flex items-start justify-between", children: [
78
+ /* @__PURE__ */ jsx(Small, { className: "opacity-50", children: themeLabel }),
79
+ /* @__PURE__ */ jsx(ThemeToggle, {})
80
+ ] })
81
+ ]
82
+ }
83
+ ),
84
+ /* @__PURE__ */ jsxs(
85
+ "div",
86
+ {
87
+ className: cn(
88
+ "flex items-center justify-between border border-current/20 p-4",
89
+ "lg:hidden"
90
+ ),
91
+ children: [
92
+ /* @__PURE__ */ jsx(
93
+ BrandLink,
94
+ {
95
+ brand,
96
+ href: brandHref,
97
+ LinkComponent
98
+ }
99
+ ),
100
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
101
+ themeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
102
+ /* @__PURE__ */ jsx(
103
+ "button",
104
+ {
105
+ "aria-label": open ? "Close menu" : "Open menu",
106
+ className: "relative z-50 cursor-pointer bg-transparent p-2",
107
+ onClick: () => setOpen((v) => !v),
108
+ type: "button",
109
+ children: /* @__PURE__ */ jsx(HamburgerIcon, { open })
110
+ }
111
+ )
112
+ ] })
113
+ ]
114
+ }
115
+ ),
116
+ /* @__PURE__ */ jsx(AnimatePresence, { children: open && /* @__PURE__ */ jsx(
117
+ motion.div,
118
+ {
119
+ animate: { opacity: 1 },
120
+ className: cn(
121
+ "bg-background/95 fixed inset-0 z-50 flex flex-col backdrop-blur-sm",
122
+ "p-8 lg:hidden"
123
+ ),
124
+ exit: { opacity: 0 },
125
+ initial: { opacity: 0 },
126
+ transition: { duration: 0.2 },
127
+ children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col border border-current/20", children: [
128
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-b border-current/20 p-4", children: [
129
+ /* @__PURE__ */ jsx(
130
+ BrandLink,
131
+ {
132
+ brand,
133
+ href: brandHref,
134
+ LinkComponent,
135
+ onClick: close
136
+ }
137
+ ),
138
+ /* @__PURE__ */ jsx(
139
+ "button",
140
+ {
141
+ "aria-label": "Close menu",
142
+ className: "cursor-pointer bg-transparent p-2",
143
+ onClick: close,
144
+ type: "button",
145
+ children: /* @__PURE__ */ jsx(HamburgerIcon, { open: true })
146
+ }
147
+ )
148
+ ] }),
149
+ links.map((link) => /* @__PURE__ */ jsx(
150
+ MobileNavLink,
151
+ {
152
+ link,
153
+ LinkComponent,
154
+ onNavigate: close,
155
+ scramble
156
+ },
157
+ link.href
158
+ )),
159
+ hasMobileChrome && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 border-b border-current/20 p-4", children: [
160
+ hasSocials && /* @__PURE__ */ jsxs(Fragment, { children: [
161
+ /* @__PURE__ */ jsx(Small, { className: "opacity-50", children: socialsLabel }),
162
+ /* @__PURE__ */ jsx(Socials, { items: socials, onNavigate: close })
163
+ ] }),
164
+ themeToggle && hasSocials && /* @__PURE__ */ jsx("span", { className: "flex-1" }),
165
+ themeToggle && /* @__PURE__ */ jsxs(Fragment, { children: [
166
+ /* @__PURE__ */ jsx(Small, { className: "opacity-50", children: themeLabel }),
167
+ /* @__PURE__ */ jsx(ThemeToggle, {})
168
+ ] })
169
+ ] })
170
+ ] })
171
+ }
172
+ ) })
173
+ ] });
36
174
  }
37
175
  function BrandCell({ brand, href, LinkComponent }) {
38
- return isExternal(href) ? (_jsx(Cell, { href: href, ...EXTERNAL_REL, as: "a", children: brand })) : (_jsx(Cell, { as: LinkComponent, href: href, children: brand }));
176
+ return isExternal(href) ? /* @__PURE__ */ jsx(Cell, { href, ...EXTERNAL_REL, as: "a", children: brand }) : /* @__PURE__ */ jsx(Cell, { as: LinkComponent, href, children: brand });
39
177
  }
40
178
  function BrandLink({ brand, href, LinkComponent, onClick }) {
41
- if (isExternal(href)) {
42
- return (_jsx("a", { href: href, onClick: onClick, ...EXTERNAL_REL, children: brand }));
43
- }
44
- return createElement(LinkComponent, { href, onClick }, brand);
179
+ if (isExternal(href)) {
180
+ return /* @__PURE__ */ jsx("a", { href, onClick, ...EXTERNAL_REL, children: brand });
181
+ }
182
+ return createElement(
183
+ LinkComponent,
184
+ { href, onClick },
185
+ brand
186
+ );
45
187
  }
46
188
  function NavCell({ link, LinkComponent, scramble }) {
47
- const ref = useRef(null);
48
- const isExt = link.external ?? isExternal(link.href);
49
- const inner = (_jsxs(_Fragment, { children: [_jsxs(Small, { children: [scramble ? (_jsx(Scramble, { target: ref, children: link.label })) : (link.label), _jsx(Blink, {})] }), _jsx(HoverBg, {})] }));
50
- if (isExt) {
51
- return (_jsx(Cell, { as: "a", className: "group relative cursor-pointer", href: link.href, onClick: link.onClick, ref: ref, ...EXTERNAL_REL, children: inner }));
189
+ const ref = useRef(null);
190
+ const isExt = link.external ?? isExternal(link.href);
191
+ const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
192
+ /* @__PURE__ */ jsxs(Small, { children: [
193
+ scramble ? /* @__PURE__ */ jsx(Scramble, { target: ref, children: link.label }) : link.label,
194
+ /* @__PURE__ */ jsx(Blink, {})
195
+ ] }),
196
+ /* @__PURE__ */ jsx(HoverBg, {})
197
+ ] });
198
+ if (isExt) {
199
+ return /* @__PURE__ */ jsx(
200
+ Cell,
201
+ {
202
+ as: "a",
203
+ className: "group relative cursor-pointer",
204
+ href: link.href,
205
+ onClick: link.onClick,
206
+ ref,
207
+ ...EXTERNAL_REL,
208
+ children: inner
209
+ }
210
+ );
211
+ }
212
+ return /* @__PURE__ */ jsx(
213
+ Cell,
214
+ {
215
+ as: LinkComponent,
216
+ className: "group relative cursor-pointer",
217
+ href: link.href,
218
+ onClick: link.onClick,
219
+ ref,
220
+ children: inner
52
221
  }
53
- return (_jsx(Cell, { as: LinkComponent, className: "group relative cursor-pointer", href: link.href, onClick: link.onClick, ref: ref, children: inner }));
222
+ );
54
223
  }
55
- function MobileNavLink({ link, LinkComponent, onNavigate, scramble }) {
56
- const ref = useRef(null);
57
- const isExt = link.external ?? isExternal(link.href);
58
- const className = cn('group relative flex cursor-pointer items-center border-b border-current/20 p-4');
59
- const onClick = (e) => {
60
- link.onClick?.(e);
61
- onNavigate();
62
- };
63
- const children = (_jsxs(_Fragment, { children: [_jsxs(Small, { children: [scramble ? (_jsx(Scramble, { target: ref, children: link.label })) : (link.label), _jsx(Blink, {})] }), _jsx(HoverBg, {})] }));
64
- if (isExt) {
65
- return (_jsx("a", { className: className, href: link.href, onClick: onClick, ref: ref, ...EXTERNAL_REL, children: children }));
66
- }
67
- return createElement(LinkComponent, { className, href: link.href, onClick, ref }, children);
224
+ function MobileNavLink({
225
+ link,
226
+ LinkComponent,
227
+ onNavigate,
228
+ scramble
229
+ }) {
230
+ const ref = useRef(null);
231
+ const isExt = link.external ?? isExternal(link.href);
232
+ const className = cn(
233
+ "group relative flex cursor-pointer items-center border-b border-current/20 p-4"
234
+ );
235
+ const onClick = (e) => {
236
+ link.onClick?.(e);
237
+ onNavigate();
238
+ };
239
+ const children = /* @__PURE__ */ jsxs(Fragment, { children: [
240
+ /* @__PURE__ */ jsxs(Small, { children: [
241
+ scramble ? /* @__PURE__ */ jsx(Scramble, { target: ref, children: link.label }) : link.label,
242
+ /* @__PURE__ */ jsx(Blink, {})
243
+ ] }),
244
+ /* @__PURE__ */ jsx(HoverBg, {})
245
+ ] });
246
+ if (isExt) {
247
+ return /* @__PURE__ */ jsx(
248
+ "a",
249
+ {
250
+ className,
251
+ href: link.href,
252
+ onClick,
253
+ ref,
254
+ ...EXTERNAL_REL,
255
+ children
256
+ }
257
+ );
258
+ }
259
+ return createElement(
260
+ LinkComponent,
261
+ { className, href: link.href, onClick, ref },
262
+ children
263
+ );
68
264
  }
69
265
  const EXTERNAL_REL = {
70
- rel: 'noopener noreferrer',
71
- target: '_blank'
266
+ rel: "noopener noreferrer",
267
+ target: "_blank"
72
268
  };
73
269
  const isExternal = (href) => /^(https?:|mailto:|tel:)/i.test(href);
74
- //# sourceMappingURL=header.js.map
@@ -1,2 +1 @@
1
- export declare function LayoutWrapper({ children }: Readonly<React.PropsWithChildren>): import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=layout-wrapper.d.ts.map
1
+ export declare function LayoutWrapper({ children }: Readonly<React.PropsWithChildren>): import("react").JSX.Element;