@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.
- package/README.md +4 -1
- package/dist/assets/filler-bg0.webp +0 -0
- package/dist/assets.d.ts +38 -0
- package/dist/fonts.d.ts +0 -1
- package/dist/fonts.js +5 -7
- package/dist/hooks/use-capped-frame.d.ts +0 -1
- package/dist/hooks/use-capped-frame.js +12 -13
- package/dist/hooks/use-css-var-dims.d.ts +0 -1
- package/dist/hooks/use-css-var-dims.js +26 -21
- package/dist/hooks/use-gpu-tier.d.ts +0 -1
- package/dist/hooks/use-gpu-tier.js +90 -110
- package/dist/hooks/use-render-loop.d.ts +0 -1
- package/dist/hooks/use-render-loop.js +58 -58
- package/dist/hooks/use-smooth-controls.d.ts +0 -1
- package/dist/hooks/use-smooth-controls.js +204 -206
- package/dist/index.d.ts +0 -1
- package/dist/index.js +84 -58
- package/dist/ui/basic-page.d.ts +1 -2
- package/dist/ui/basic-page.js +15 -7
- package/dist/ui/components/animated-count.d.ts +1 -2
- package/dist/ui/components/animated-count.js +109 -85
- package/dist/ui/components/ascii.d.ts +2 -3
- package/dist/ui/components/ascii.js +75 -59
- package/dist/ui/components/badge.d.ts +1 -2
- package/dist/ui/components/badge.js +35 -18
- package/dist/ui/components/badges/nous-girl.d.ts +1 -2
- package/dist/ui/components/badges/nous-girl.js +80 -3
- package/dist/ui/components/blend-mode.d.ts +1 -2
- package/dist/ui/components/blend-mode.js +55 -63
- package/dist/ui/components/blink.d.ts +1 -2
- package/dist/ui/components/blink.js +15 -6
- package/dist/ui/components/button.d.ts +2 -3
- package/dist/ui/components/button.js +139 -90
- package/dist/ui/components/command-block.d.ts +2 -3
- package/dist/ui/components/command-block.js +52 -24
- package/dist/ui/components/cursor.d.ts +1 -2
- package/dist/ui/components/cursor.js +93 -54
- package/dist/ui/components/dropdown-menu.d.ts +1 -2
- package/dist/ui/components/dropdown-menu.js +99 -51
- package/dist/ui/components/fit-text/index.d.ts +0 -1
- package/dist/ui/components/fit-text/index.js +21 -13
- package/dist/ui/components/graphs/bar-chart.d.ts +1 -2
- package/dist/ui/components/graphs/bar-chart.js +116 -63
- package/dist/ui/components/graphs/index.d.ts +0 -1
- package/dist/ui/components/graphs/index.js +3 -4
- package/dist/ui/components/graphs/line-chart.d.ts +1 -2
- package/dist/ui/components/graphs/line-chart.js +159 -102
- package/dist/ui/components/graphs/utils.d.ts +2 -3
- package/dist/ui/components/graphs/utils.js +147 -114
- package/dist/ui/components/grid/index.d.ts +0 -1
- package/dist/ui/components/grid/index.js +12 -9
- package/dist/ui/components/hover-bg.d.ts +0 -1
- package/dist/ui/components/hover-bg.js +11 -6
- package/dist/ui/components/icons/arrow.d.ts +1 -2
- package/dist/ui/components/icons/arrow.js +42 -5
- package/dist/ui/components/icons/chevron.d.ts +1 -2
- package/dist/ui/components/icons/chevron.js +49 -5
- package/dist/ui/components/icons/discord.d.ts +1 -2
- package/dist/ui/components/icons/discord.js +12 -4
- package/dist/ui/components/icons/eye.d.ts +1 -2
- package/dist/ui/components/icons/eye.js +5 -3
- package/dist/ui/components/icons/gear.d.ts +1 -2
- package/dist/ui/components/icons/gear.js +28 -14
- package/dist/ui/components/icons/github.d.ts +1 -2
- package/dist/ui/components/icons/github.js +12 -4
- package/dist/ui/components/icons/hamburger.d.ts +1 -2
- package/dist/ui/components/icons/hamburger.js +54 -5
- package/dist/ui/components/icons/heart.d.ts +1 -2
- package/dist/ui/components/icons/heart.js +8 -3
- package/dist/ui/components/icons/index.d.ts +0 -1
- package/dist/ui/components/icons/index.js +11 -12
- package/dist/ui/components/icons/link.d.ts +1 -2
- package/dist/ui/components/icons/link.js +10 -3
- package/dist/ui/components/icons/minus.d.ts +1 -2
- package/dist/ui/components/icons/minus.js +10 -3
- package/dist/ui/components/icons/search.d.ts +1 -2
- package/dist/ui/components/icons/search.js +30 -3
- package/dist/ui/components/image-distortion.d.ts +1 -2
- package/dist/ui/components/image-distortion.js +300 -265
- package/dist/ui/components/leva-client.d.ts +1 -2
- package/dist/ui/components/leva-client.js +9 -10
- package/dist/ui/components/list-item.d.ts +0 -1
- package/dist/ui/components/list-item.js +26 -10
- package/dist/ui/components/modal/index.d.ts +1 -2
- package/dist/ui/components/modal/index.js +33 -14
- package/dist/ui/components/overlays/blend-modes.d.ts +0 -1
- package/dist/ui/components/overlays/blend-modes.js +11 -12
- package/dist/ui/components/overlays/glitch.d.ts +1 -2
- package/dist/ui/components/overlays/glitch.js +115 -110
- package/dist/ui/components/overlays/greys.d.ts +1 -2
- package/dist/ui/components/overlays/greys.js +200 -179
- package/dist/ui/components/overlays/index.d.ts +1 -2
- package/dist/ui/components/overlays/index.js +31 -17
- package/dist/ui/components/overlays/lens-layers.d.ts +1 -2
- package/dist/ui/components/overlays/lens-layers.js +89 -65
- package/dist/ui/components/overlays/lens.d.ts +0 -1
- package/dist/ui/components/overlays/lens.js +46 -52
- package/dist/ui/components/overlays/noise.d.ts +1 -2
- package/dist/ui/components/overlays/noise.js +112 -113
- package/dist/ui/components/overlays/vignette.d.ts +1 -2
- package/dist/ui/components/overlays/vignette.js +44 -38
- package/dist/ui/components/poster.d.ts +1 -2
- package/dist/ui/components/poster.js +240 -87
- package/dist/ui/components/progress.d.ts +1 -2
- package/dist/ui/components/progress.js +52 -12
- package/dist/ui/components/scene-canvas.d.ts +1 -2
- package/dist/ui/components/scene-canvas.js +169 -119
- package/dist/ui/components/scramble.d.ts +1 -2
- package/dist/ui/components/scramble.js +60 -59
- package/dist/ui/components/segmented.d.ts +2 -3
- package/dist/ui/components/segmented.js +47 -12
- package/dist/ui/components/select.d.ts +1 -2
- package/dist/ui/components/select.js +207 -120
- package/dist/ui/components/selection-switcher.d.ts +0 -1
- package/dist/ui/components/selection-switcher.js +29 -25
- package/dist/ui/components/shader.d.ts +1 -2
- package/dist/ui/components/shader.js +56 -38
- package/dist/ui/components/socials.d.ts +1 -2
- package/dist/ui/components/socials.js +18 -7
- package/dist/ui/components/spinner.d.ts +1 -2
- package/dist/ui/components/spinner.js +36 -25
- package/dist/ui/components/stats.d.ts +1 -2
- package/dist/ui/components/stats.js +33 -9
- package/dist/ui/components/switch.d.ts +0 -1
- package/dist/ui/components/switch.js +35 -11
- package/dist/ui/components/tabs.d.ts +3 -4
- package/dist/ui/components/tabs.js +38 -12
- package/dist/ui/components/terminal-demo.d.ts +1 -2
- package/dist/ui/components/terminal-demo.js +119 -74
- package/dist/ui/components/theme-toggle.d.ts +1 -2
- package/dist/ui/components/theme-toggle.js +63 -8
- package/dist/ui/components/tier-card.d.ts +1 -2
- package/dist/ui/components/tier-card.js +144 -24
- package/dist/ui/components/tv.d.ts +1 -2
- package/dist/ui/components/tv.js +138 -90
- package/dist/ui/components/typography/h1.d.ts +0 -1
- package/dist/ui/components/typography/h1.js +17 -8
- package/dist/ui/components/typography/h2.d.ts +0 -1
- package/dist/ui/components/typography/h2.js +17 -8
- package/dist/ui/components/typography/index.d.ts +0 -1
- package/dist/ui/components/typography/index.js +35 -24
- package/dist/ui/components/typography/legend.d.ts +1 -2
- package/dist/ui/components/typography/legend.js +18 -6
- package/dist/ui/components/typography/small.d.ts +0 -1
- package/dist/ui/components/typography/small.js +8 -7
- package/dist/ui/components/watchlist.d.ts +1 -2
- package/dist/ui/components/watchlist.js +77 -25
- package/dist/ui/fonts.css +7 -7
- package/dist/ui/footer.d.ts +1 -2
- package/dist/ui/footer.js +61 -25
- package/dist/ui/header.d.ts +1 -2
- package/dist/ui/header.js +255 -60
- package/dist/ui/layout-wrapper.d.ts +1 -2
- package/dist/ui/layout-wrapper.js +5 -4
- package/dist/utils/color.d.ts +0 -1
- package/dist/utils/color.js +8 -9
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +37 -38
- package/dist/utils/poly.d.ts +0 -1
- package/dist/utils/poly.js +1 -2
- package/package.json +43 -25
- package/dist/assets/filler-bg0.jpg +0 -0
- package/dist/fonts.d.ts.map +0 -1
- package/dist/fonts.js.map +0 -1
- package/dist/hooks/use-capped-frame.d.ts.map +0 -1
- package/dist/hooks/use-capped-frame.js.map +0 -1
- package/dist/hooks/use-css-var-dims.d.ts.map +0 -1
- package/dist/hooks/use-css-var-dims.js.map +0 -1
- package/dist/hooks/use-gpu-tier.d.ts.map +0 -1
- package/dist/hooks/use-gpu-tier.js.map +0 -1
- package/dist/hooks/use-render-loop.d.ts.map +0 -1
- package/dist/hooks/use-render-loop.js.map +0 -1
- package/dist/hooks/use-smooth-controls.d.ts.map +0 -1
- package/dist/hooks/use-smooth-controls.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/ui/basic-page.d.ts.map +0 -1
- package/dist/ui/basic-page.js.map +0 -1
- package/dist/ui/components/animated-count.d.ts.map +0 -1
- package/dist/ui/components/animated-count.js.map +0 -1
- package/dist/ui/components/ascii.d.ts.map +0 -1
- package/dist/ui/components/ascii.js.map +0 -1
- package/dist/ui/components/badge.d.ts.map +0 -1
- package/dist/ui/components/badge.js.map +0 -1
- package/dist/ui/components/badges/nous-girl.d.ts.map +0 -1
- package/dist/ui/components/badges/nous-girl.js.map +0 -1
- package/dist/ui/components/blend-mode.d.ts.map +0 -1
- package/dist/ui/components/blend-mode.js.map +0 -1
- package/dist/ui/components/blink.d.ts.map +0 -1
- package/dist/ui/components/blink.js.map +0 -1
- package/dist/ui/components/button.d.ts.map +0 -1
- package/dist/ui/components/button.js.map +0 -1
- package/dist/ui/components/command-block.d.ts.map +0 -1
- package/dist/ui/components/command-block.js.map +0 -1
- package/dist/ui/components/cursor.d.ts.map +0 -1
- package/dist/ui/components/cursor.js.map +0 -1
- package/dist/ui/components/dropdown-menu.d.ts.map +0 -1
- package/dist/ui/components/dropdown-menu.js.map +0 -1
- package/dist/ui/components/fit-text/index.d.ts.map +0 -1
- package/dist/ui/components/fit-text/index.js.map +0 -1
- package/dist/ui/components/graphs/bar-chart.d.ts.map +0 -1
- package/dist/ui/components/graphs/bar-chart.js.map +0 -1
- package/dist/ui/components/graphs/index.d.ts.map +0 -1
- package/dist/ui/components/graphs/index.js.map +0 -1
- package/dist/ui/components/graphs/line-chart.d.ts.map +0 -1
- package/dist/ui/components/graphs/line-chart.js.map +0 -1
- package/dist/ui/components/graphs/utils.d.ts.map +0 -1
- package/dist/ui/components/graphs/utils.js.map +0 -1
- package/dist/ui/components/grid/index.d.ts.map +0 -1
- package/dist/ui/components/grid/index.js.map +0 -1
- package/dist/ui/components/hover-bg.d.ts.map +0 -1
- package/dist/ui/components/hover-bg.js.map +0 -1
- package/dist/ui/components/icons/arrow.d.ts.map +0 -1
- package/dist/ui/components/icons/arrow.js.map +0 -1
- package/dist/ui/components/icons/chevron.d.ts.map +0 -1
- package/dist/ui/components/icons/chevron.js.map +0 -1
- package/dist/ui/components/icons/discord.d.ts.map +0 -1
- package/dist/ui/components/icons/discord.js.map +0 -1
- package/dist/ui/components/icons/eye.d.ts.map +0 -1
- package/dist/ui/components/icons/eye.js.map +0 -1
- package/dist/ui/components/icons/gear.d.ts.map +0 -1
- package/dist/ui/components/icons/gear.js.map +0 -1
- package/dist/ui/components/icons/github.d.ts.map +0 -1
- package/dist/ui/components/icons/github.js.map +0 -1
- package/dist/ui/components/icons/hamburger.d.ts.map +0 -1
- package/dist/ui/components/icons/hamburger.js.map +0 -1
- package/dist/ui/components/icons/heart.d.ts.map +0 -1
- package/dist/ui/components/icons/heart.js.map +0 -1
- package/dist/ui/components/icons/index.d.ts.map +0 -1
- package/dist/ui/components/icons/index.js.map +0 -1
- package/dist/ui/components/icons/link.d.ts.map +0 -1
- package/dist/ui/components/icons/link.js.map +0 -1
- package/dist/ui/components/icons/minus.d.ts.map +0 -1
- package/dist/ui/components/icons/minus.js.map +0 -1
- package/dist/ui/components/icons/search.d.ts.map +0 -1
- package/dist/ui/components/icons/search.js.map +0 -1
- package/dist/ui/components/image-distortion.d.ts.map +0 -1
- package/dist/ui/components/image-distortion.js.map +0 -1
- package/dist/ui/components/leva-client.d.ts.map +0 -1
- package/dist/ui/components/leva-client.js.map +0 -1
- package/dist/ui/components/list-item.d.ts.map +0 -1
- package/dist/ui/components/list-item.js.map +0 -1
- package/dist/ui/components/modal/index.d.ts.map +0 -1
- package/dist/ui/components/modal/index.js.map +0 -1
- package/dist/ui/components/overlays/blend-modes.d.ts.map +0 -1
- package/dist/ui/components/overlays/blend-modes.js.map +0 -1
- package/dist/ui/components/overlays/glitch.d.ts.map +0 -1
- package/dist/ui/components/overlays/glitch.js.map +0 -1
- package/dist/ui/components/overlays/greys.d.ts.map +0 -1
- package/dist/ui/components/overlays/greys.js.map +0 -1
- package/dist/ui/components/overlays/index.d.ts.map +0 -1
- package/dist/ui/components/overlays/index.js.map +0 -1
- package/dist/ui/components/overlays/lens-layers.d.ts.map +0 -1
- package/dist/ui/components/overlays/lens-layers.js.map +0 -1
- package/dist/ui/components/overlays/lens.d.ts.map +0 -1
- package/dist/ui/components/overlays/lens.js.map +0 -1
- package/dist/ui/components/overlays/noise.d.ts.map +0 -1
- package/dist/ui/components/overlays/noise.js.map +0 -1
- package/dist/ui/components/overlays/vignette.d.ts.map +0 -1
- package/dist/ui/components/overlays/vignette.js.map +0 -1
- package/dist/ui/components/poster.d.ts.map +0 -1
- package/dist/ui/components/poster.js.map +0 -1
- package/dist/ui/components/progress.d.ts.map +0 -1
- package/dist/ui/components/progress.js.map +0 -1
- package/dist/ui/components/scene-canvas.d.ts.map +0 -1
- package/dist/ui/components/scene-canvas.js.map +0 -1
- package/dist/ui/components/scramble.d.ts.map +0 -1
- package/dist/ui/components/scramble.js.map +0 -1
- package/dist/ui/components/segmented.d.ts.map +0 -1
- package/dist/ui/components/segmented.js.map +0 -1
- package/dist/ui/components/select.d.ts.map +0 -1
- package/dist/ui/components/select.js.map +0 -1
- package/dist/ui/components/selection-switcher.d.ts.map +0 -1
- package/dist/ui/components/selection-switcher.js.map +0 -1
- package/dist/ui/components/shader.d.ts.map +0 -1
- package/dist/ui/components/shader.js.map +0 -1
- package/dist/ui/components/socials.d.ts.map +0 -1
- package/dist/ui/components/socials.js.map +0 -1
- package/dist/ui/components/spinner.d.ts.map +0 -1
- package/dist/ui/components/spinner.js.map +0 -1
- package/dist/ui/components/stats.d.ts.map +0 -1
- package/dist/ui/components/stats.js.map +0 -1
- package/dist/ui/components/switch.d.ts.map +0 -1
- package/dist/ui/components/switch.js.map +0 -1
- package/dist/ui/components/tabs.d.ts.map +0 -1
- package/dist/ui/components/tabs.js.map +0 -1
- package/dist/ui/components/terminal-demo.d.ts.map +0 -1
- package/dist/ui/components/terminal-demo.js.map +0 -1
- package/dist/ui/components/theme-toggle.d.ts.map +0 -1
- package/dist/ui/components/theme-toggle.js.map +0 -1
- package/dist/ui/components/tier-card.d.ts.map +0 -1
- package/dist/ui/components/tier-card.js.map +0 -1
- package/dist/ui/components/tv.d.ts.map +0 -1
- package/dist/ui/components/tv.js.map +0 -1
- package/dist/ui/components/typography/h1.d.ts.map +0 -1
- package/dist/ui/components/typography/h1.js.map +0 -1
- package/dist/ui/components/typography/h2.d.ts.map +0 -1
- package/dist/ui/components/typography/h2.js.map +0 -1
- package/dist/ui/components/typography/index.d.ts.map +0 -1
- package/dist/ui/components/typography/index.js.map +0 -1
- package/dist/ui/components/typography/legend.d.ts.map +0 -1
- package/dist/ui/components/typography/legend.js.map +0 -1
- package/dist/ui/components/typography/small.d.ts.map +0 -1
- package/dist/ui/components/typography/small.js.map +0 -1
- package/dist/ui/components/watchlist.d.ts.map +0 -1
- package/dist/ui/components/watchlist.js.map +0 -1
- package/dist/ui/footer.d.ts.map +0 -1
- package/dist/ui/footer.js.map +0 -1
- package/dist/ui/header.d.ts.map +0 -1
- package/dist/ui/header.js.map +0 -1
- package/dist/ui/layout-wrapper.d.ts.map +0 -1
- package/dist/ui/layout-wrapper.js.map +0 -1
- package/dist/utils/color.d.ts.map +0 -1
- package/dist/utils/color.js.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/poly.d.ts.map +0 -1
- package/dist/utils/poly.js.map +0 -1
|
@@ -1,27 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { cn } from
|
|
4
|
-
import { Scramble } from
|
|
5
|
-
import { LinkIcon } from
|
|
6
|
-
import { Typography } from
|
|
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)}${
|
|
9
|
-
export function Watchlist({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
54
|
+
src: url('../fonts/Mondwest-Regular.woff2') format('woff2');
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
:root {
|
package/dist/ui/footer.d.ts
CHANGED
|
@@ -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
|
|
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
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { useRef } from
|
|
4
|
-
import { useCssVarDims } from
|
|
5
|
-
import { Cell, Grid } from
|
|
6
|
-
import { Socials } from
|
|
7
|
-
import { ThemeToggle } from
|
|
8
|
-
import { Small } from
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
package/dist/ui/header.d.ts
CHANGED
|
@@ -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
|
|
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
|
-
|
|
2
|
-
import { jsx
|
|
3
|
-
import { AnimatePresence, motion } from
|
|
4
|
-
import { createElement, useCallback, useRef, useState } from
|
|
5
|
-
import { useCssVarDims } from
|
|
6
|
-
import { useGpuTier } from
|
|
7
|
-
import { cn } from
|
|
8
|
-
import { Blink } from
|
|
9
|
-
import { Cell, Grid } from
|
|
10
|
-
import { HoverBg } from
|
|
11
|
-
import { HamburgerIcon } from
|
|
12
|
-
import { Scramble } from
|
|
13
|
-
import { Socials } from
|
|
14
|
-
import { ThemeToggle } from
|
|
15
|
-
import { H2 } from
|
|
16
|
-
import { Small } from
|
|
17
|
-
const DEFAULT_BRAND = (
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
222
|
+
);
|
|
54
223
|
}
|
|
55
|
-
function MobileNavLink({
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
71
|
-
|
|
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
|
|
2
|
-
//# sourceMappingURL=layout-wrapper.d.ts.map
|
|
1
|
+
export declare function LayoutWrapper({ children }: Readonly<React.PropsWithChildren>): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
export function LayoutWrapper({
|
|
3
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
export function LayoutWrapper({
|
|
3
|
+
children
|
|
4
|
+
}) {
|
|
5
|
+
return /* @__PURE__ */ jsx("html", { lang: "en", children: /* @__PURE__ */ jsx("body", { className: "text-midground font-mondwest bg-black uppercase antialiased", children }) });
|
|
4
6
|
}
|
|
5
|
-
//# sourceMappingURL=layout-wrapper.js.map
|
package/dist/utils/color.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export declare const hexToRgb: (hex: string) => number[];
|
|
|
2
2
|
export declare const rgbToHex: (r: number, g: number, b: number) => string;
|
|
3
3
|
export declare const colorDodge: (base: string, blend: string) => string;
|
|
4
4
|
export declare const colorMix: (color: string, alpha: number) => string;
|
|
5
|
-
//# sourceMappingURL=color.d.ts.map
|