@nous-research/ui 0.13.2 → 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/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 +41 -24
- 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,11 +1,35 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { cn } from
|
|
3
|
-
import { Typography } from
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
@@ -1,12 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx
|
|
3
|
-
import { forwardRef } from
|
|
4
|
-
import { cn } from
|
|
5
|
-
export const Switch = forwardRef(function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
3
|
-
export declare function TabsList({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react
|
|
4
|
-
export declare function TabsTrigger({ active, className, value: _value, ...props }: TabsTriggerProps): import("react
|
|
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
|
-
|
|
2
|
-
import { jsx
|
|
3
|
-
import {
|
|
4
|
-
|
|
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
|
-
|
|
7
|
-
|
|
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
|
-
|
|
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({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
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
|
-
|
|
2
|
-
import { jsx
|
|
3
|
-
import { useCallback, useEffect, useRef, useState } from
|
|
4
|
-
import { cn } from
|
|
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
|
-
|
|
6
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
7
7
|
}
|
|
8
|
-
export function TerminalDemo({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
await sleep(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
|
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
|
-
|
|
2
|
-
import { jsx
|
|
3
|
-
import { useStore } from
|
|
4
|
-
import { cn } from
|
|
5
|
-
import { $lightMode, toggleLens } from
|
|
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
|
-
|
|
8
|
-
|
|
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
|
|
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
|