@nous-research/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/README.md +49 -0
  2. package/dist/assets/filler-bg0.jpg +0 -0
  3. package/dist/fonts/Collapse-Bold.woff2 +0 -0
  4. package/dist/fonts/Collapse-BoldItalic.woff2 +0 -0
  5. package/dist/fonts/Collapse-Italic.woff2 +0 -0
  6. package/dist/fonts/Collapse-Light.woff2 +0 -0
  7. package/dist/fonts/Collapse-LightItalic.woff2 +0 -0
  8. package/dist/fonts/Collapse-Regular.woff2 +0 -0
  9. package/dist/fonts/Collapse-Thin.woff2 +0 -0
  10. package/dist/fonts/Collapse-ThinItalic.woff2 +0 -0
  11. package/dist/fonts/Mondwest-Regular.woff2 +0 -0
  12. package/dist/fonts/Neuebit-Bold.woff2 +0 -0
  13. package/dist/fonts/RulesCompressed-Medium.woff2 +0 -0
  14. package/dist/fonts/RulesCompressed-Regular.woff2 +0 -0
  15. package/dist/fonts/RulesExpanded-Bold.woff2 +0 -0
  16. package/dist/fonts/RulesExpanded-Regular.woff2 +0 -0
  17. package/dist/fonts.d.ts +6 -0
  18. package/dist/fonts.js +7 -0
  19. package/dist/fonts.js.map +1 -0
  20. package/dist/hooks/use-capped-frame.d.ts +2 -0
  21. package/dist/hooks/use-capped-frame.js +15 -0
  22. package/dist/hooks/use-capped-frame.js.map +1 -0
  23. package/dist/hooks/use-css-var-dims.d.ts +1 -0
  24. package/dist/hooks/use-css-var-dims.js +23 -0
  25. package/dist/hooks/use-css-var-dims.js.map +1 -0
  26. package/dist/hooks/use-gpu-tier.d.ts +10 -0
  27. package/dist/hooks/use-gpu-tier.js +92 -0
  28. package/dist/hooks/use-gpu-tier.js.map +1 -0
  29. package/dist/hooks/use-smooth-controls.d.ts +16 -0
  30. package/dist/hooks/use-smooth-controls.js +202 -0
  31. package/dist/hooks/use-smooth-controls.js.map +1 -0
  32. package/dist/index.d.ts +45 -0
  33. package/dist/index.js +48 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/ui/basic-page.d.ts +7 -0
  36. package/dist/ui/basic-page.js +9 -0
  37. package/dist/ui/basic-page.js.map +1 -0
  38. package/dist/ui/components/animated-count.d.ts +10 -0
  39. package/dist/ui/components/animated-count.js +88 -0
  40. package/dist/ui/components/animated-count.js.map +1 -0
  41. package/dist/ui/components/ascii.d.ts +10 -0
  42. package/dist/ui/components/ascii.js +62 -0
  43. package/dist/ui/components/ascii.js.map +1 -0
  44. package/dist/ui/components/badge.d.ts +2 -0
  45. package/dist/ui/components/badge.js +5 -0
  46. package/dist/ui/components/badge.js.map +1 -0
  47. package/dist/ui/components/badges/nous-girl.d.ts +2 -0
  48. package/dist/ui/components/badges/nous-girl.js +5 -0
  49. package/dist/ui/components/badges/nous-girl.js.map +1 -0
  50. package/dist/ui/components/blend-mode.d.ts +28 -0
  51. package/dist/ui/components/blend-mode.js +76 -0
  52. package/dist/ui/components/blend-mode.js.map +1 -0
  53. package/dist/ui/components/blink.d.ts +6 -0
  54. package/dist/ui/components/blink.js +7 -0
  55. package/dist/ui/components/blink.js.map +1 -0
  56. package/dist/ui/components/button.d.ts +11 -0
  57. package/dist/ui/components/button.js +52 -0
  58. package/dist/ui/components/button.js.map +1 -0
  59. package/dist/ui/components/cursor.d.ts +3 -0
  60. package/dist/ui/components/cursor.js +57 -0
  61. package/dist/ui/components/cursor.js.map +1 -0
  62. package/dist/ui/components/dropdown-menu.d.ts +12 -0
  63. package/dist/ui/components/dropdown-menu.js +53 -0
  64. package/dist/ui/components/dropdown-menu.js.map +1 -0
  65. package/dist/ui/components/fit-text/fit-text.css +42 -0
  66. package/dist/ui/components/fit-text/index.d.ts +9 -0
  67. package/dist/ui/components/fit-text/index.js +16 -0
  68. package/dist/ui/components/fit-text/index.js.map +1 -0
  69. package/dist/ui/components/graphs/bar-chart.d.ts +12 -0
  70. package/dist/ui/components/graphs/bar-chart.js +75 -0
  71. package/dist/ui/components/graphs/bar-chart.js.map +1 -0
  72. package/dist/ui/components/graphs/index.d.ts +3 -0
  73. package/dist/ui/components/graphs/index.js +4 -0
  74. package/dist/ui/components/graphs/index.js.map +1 -0
  75. package/dist/ui/components/graphs/line-chart.d.ts +14 -0
  76. package/dist/ui/components/graphs/line-chart.js +117 -0
  77. package/dist/ui/components/graphs/line-chart.js.map +1 -0
  78. package/dist/ui/components/graphs/utils.d.ts +52 -0
  79. package/dist/ui/components/graphs/utils.js +128 -0
  80. package/dist/ui/components/graphs/utils.js.map +1 -0
  81. package/dist/ui/components/grid/grid.css +78 -0
  82. package/dist/ui/components/grid/index.d.ts +2 -0
  83. package/dist/ui/components/grid/index.js +13 -0
  84. package/dist/ui/components/grid/index.js.map +1 -0
  85. package/dist/ui/components/hover-bg.d.ts +1 -0
  86. package/dist/ui/components/hover-bg.js +8 -0
  87. package/dist/ui/components/hover-bg.js.map +1 -0
  88. package/dist/ui/components/icons/arrow.d.ts +6 -0
  89. package/dist/ui/components/icons/arrow.js +6 -0
  90. package/dist/ui/components/icons/arrow.js.map +1 -0
  91. package/dist/ui/components/icons/chevron.d.ts +6 -0
  92. package/dist/ui/components/icons/chevron.js +6 -0
  93. package/dist/ui/components/icons/chevron.js.map +1 -0
  94. package/dist/ui/components/icons/eye.d.ts +2 -0
  95. package/dist/ui/components/icons/eye.js +5 -0
  96. package/dist/ui/components/icons/eye.js.map +1 -0
  97. package/dist/ui/components/icons/gear.d.ts +6 -0
  98. package/dist/ui/components/icons/gear.js +15 -0
  99. package/dist/ui/components/icons/gear.js.map +1 -0
  100. package/dist/ui/components/icons/heart.d.ts +2 -0
  101. package/dist/ui/components/icons/heart.js +5 -0
  102. package/dist/ui/components/icons/heart.js.map +1 -0
  103. package/dist/ui/components/icons/index.d.ts +8 -0
  104. package/dist/ui/components/icons/index.js +9 -0
  105. package/dist/ui/components/icons/index.js.map +1 -0
  106. package/dist/ui/components/icons/link.d.ts +2 -0
  107. package/dist/ui/components/icons/link.js +5 -0
  108. package/dist/ui/components/icons/link.js.map +1 -0
  109. package/dist/ui/components/icons/minus.d.ts +2 -0
  110. package/dist/ui/components/icons/minus.js +5 -0
  111. package/dist/ui/components/icons/minus.js.map +1 -0
  112. package/dist/ui/components/icons/search.d.ts +2 -0
  113. package/dist/ui/components/icons/search.js +5 -0
  114. package/dist/ui/components/icons/search.js.map +1 -0
  115. package/dist/ui/components/leva-client.d.ts +1 -0
  116. package/dist/ui/components/leva-client.js +12 -0
  117. package/dist/ui/components/leva-client.js.map +1 -0
  118. package/dist/ui/components/modal/index.d.ts +8 -0
  119. package/dist/ui/components/modal/index.js +15 -0
  120. package/dist/ui/components/modal/index.js.map +1 -0
  121. package/dist/ui/components/modal/modal.css +36 -0
  122. package/dist/ui/components/overlays/glitch.d.ts +6 -0
  123. package/dist/ui/components/overlays/glitch.js +191 -0
  124. package/dist/ui/components/overlays/glitch.js.map +1 -0
  125. package/dist/ui/components/overlays/greys.d.ts +6 -0
  126. package/dist/ui/components/overlays/greys.js +300 -0
  127. package/dist/ui/components/overlays/greys.js.map +1 -0
  128. package/dist/ui/components/overlays/index.d.ts +44 -0
  129. package/dist/ui/components/overlays/index.js +125 -0
  130. package/dist/ui/components/overlays/index.js.map +1 -0
  131. package/dist/ui/components/overlays/noise.d.ts +6 -0
  132. package/dist/ui/components/overlays/noise.js +115 -0
  133. package/dist/ui/components/overlays/noise.js.map +1 -0
  134. package/dist/ui/components/overlays/vignette.d.ts +6 -0
  135. package/dist/ui/components/overlays/vignette.js +40 -0
  136. package/dist/ui/components/overlays/vignette.js.map +1 -0
  137. package/dist/ui/components/progress.d.ts +9 -0
  138. package/dist/ui/components/progress.js +12 -0
  139. package/dist/ui/components/progress.js.map +1 -0
  140. package/dist/ui/components/scene-canvas.d.ts +15 -0
  141. package/dist/ui/components/scene-canvas.js +117 -0
  142. package/dist/ui/components/scene-canvas.js.map +1 -0
  143. package/dist/ui/components/scramble.d.ts +9 -0
  144. package/dist/ui/components/scramble.js +61 -0
  145. package/dist/ui/components/scramble.js.map +1 -0
  146. package/dist/ui/components/selection-switcher.d.ts +1 -0
  147. package/dist/ui/components/selection-switcher.js +29 -0
  148. package/dist/ui/components/selection-switcher.js.map +1 -0
  149. package/dist/ui/components/shader.d.ts +7 -0
  150. package/dist/ui/components/shader.js +41 -0
  151. package/dist/ui/components/shader.js.map +1 -0
  152. package/dist/ui/components/stats.d.ts +9 -0
  153. package/dist/ui/components/stats.js +7 -0
  154. package/dist/ui/components/stats.js.map +1 -0
  155. package/dist/ui/components/tv.d.ts +3 -0
  156. package/dist/ui/components/tv.js +163 -0
  157. package/dist/ui/components/tv.js.map +1 -0
  158. package/dist/ui/components/typography/h1.d.ts +11 -0
  159. package/dist/ui/components/typography/h1.js +8 -0
  160. package/dist/ui/components/typography/h1.js.map +1 -0
  161. package/dist/ui/components/typography/h2.d.ts +11 -0
  162. package/dist/ui/components/typography/h2.js +8 -0
  163. package/dist/ui/components/typography/h2.js.map +1 -0
  164. package/dist/ui/components/typography/index.d.ts +15 -0
  165. package/dist/ui/components/typography/index.js +29 -0
  166. package/dist/ui/components/typography/index.js.map +1 -0
  167. package/dist/ui/components/typography/legend.d.ts +6 -0
  168. package/dist/ui/components/typography/legend.js +7 -0
  169. package/dist/ui/components/typography/legend.js.map +1 -0
  170. package/dist/ui/components/typography/small.d.ts +2 -0
  171. package/dist/ui/components/typography/small.js +7 -0
  172. package/dist/ui/components/typography/small.js.map +1 -0
  173. package/dist/ui/components/watchlist.d.ts +11 -0
  174. package/dist/ui/components/watchlist.js +27 -0
  175. package/dist/ui/components/watchlist.js.map +1 -0
  176. package/dist/ui/fonts.css +63 -0
  177. package/dist/ui/footer.d.ts +1 -0
  178. package/dist/ui/footer.js +19 -0
  179. package/dist/ui/footer.js.map +1 -0
  180. package/dist/ui/globals.css +340 -0
  181. package/dist/ui/header.d.ts +1 -0
  182. package/dist/ui/header.js +22 -0
  183. package/dist/ui/header.js.map +1 -0
  184. package/dist/ui/layout-wrapper.d.ts +1 -0
  185. package/dist/ui/layout-wrapper.js +5 -0
  186. package/dist/ui/layout-wrapper.js.map +1 -0
  187. package/dist/utils/color.d.ts +4 -0
  188. package/dist/utils/color.js +14 -0
  189. package/dist/utils/color.js.map +1 -0
  190. package/dist/utils/index.d.ts +15 -0
  191. package/dist/utils/index.js +48 -0
  192. package/dist/utils/index.js.map +1 -0
  193. package/dist/utils/poly.d.ts +8 -0
  194. package/dist/utils/poly.js +3 -0
  195. package/dist/utils/poly.js.map +1 -0
  196. package/package.json +95 -0
@@ -0,0 +1,41 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useThree } from '@react-three/fiber';
4
+ import { useEffect, useRef } from 'react';
5
+ import * as THREE from 'three';
6
+ import { useCappedFrame } from '../../hooks/use-capped-frame';
7
+ const defaultUniforms = {
8
+ uResolution: new THREE.Uniform(new THREE.Vector4()),
9
+ uTime: new THREE.Uniform(0)
10
+ };
11
+ export function Shader({ children, defines, depthTest, fragmentShader, uniforms, vertexShader, ...props }) {
12
+ const invalidate = useThree(st => st.invalidate);
13
+ const { size, viewport } = useThree();
14
+ const isMobile = size.width < 1024;
15
+ const uniformsRef = useRef({
16
+ ...defaultUniforms,
17
+ ...(uniforms ?? {})
18
+ });
19
+ useCappedFrame(({ clock }) => {
20
+ const w = size.width * viewport.dpr;
21
+ const h = size.height * viewport.dpr;
22
+ uniformsRef.current.uTime.value = clock.getElapsedTime();
23
+ uniformsRef.current.uResolution.value.copy(new THREE.Vector4(w, h, w / h, viewport.dpr));
24
+ }, isMobile ? 0 : 80);
25
+ useEffect(() => void (uniforms && Object.assign(uniformsRef.current, uniforms)), [uniforms]);
26
+ useEffect(() => void (isMobile && invalidate(80)), [invalidate, isMobile]);
27
+ const materialProps = {
28
+ defines: defines ?? {},
29
+ depthTest,
30
+ fragmentShader,
31
+ side: THREE.DoubleSide,
32
+ transparent: true,
33
+ uniforms: uniformsRef.current,
34
+ vertexShader
35
+ };
36
+ if (typeof children === 'function') {
37
+ return children(_jsx("shaderMaterial", { ...materialProps }));
38
+ }
39
+ return (_jsxs("mesh", { ...props, children: [children ?? _jsx("planeGeometry", {}), _jsx("shaderMaterial", { ...materialProps })] }));
40
+ }
41
+ //# sourceMappingURL=shader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shader.js","sourceRoot":"","sources":["../../../src/ui/components/shader.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAsB,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAE7D,MAAM,eAAe,GAAG;IACtB,WAAW,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;IACnD,KAAK,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;CAC5B,CAAA;AAED,MAAM,UAAU,MAAM,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,GAAG,KAAK,EACI;IACZ,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,CAAA;IAChD,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAAA;IAErC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;IAElC,MAAM,WAAW,GAAG,MAAM,CAAC;QACzB,GAAG,eAAe;QAClB,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;KACpB,CAAC,CAAA;IAEF,cAAc,CACZ,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACZ,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,GAAG,QAAQ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Stats({ className, items, ...props }: StatsProps): import("react/jsx-runtime").JSX.Element;
3
+ interface StatsProps extends React.ComponentProps<'div'> {
4
+ items: {
5
+ label: string;
6
+ value: string;
7
+ }[];
8
+ }
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from '../../utils';
3
+ import { Typography } from './typography';
4
+ export function Stats({ className, items, ...props }) {
5
+ return (_jsx("div", { className: cn('flex w-full flex-col gap-5', className), ...props, children: items.map(({ label, value }) => (_jsxs("div", { className: "text-midground grid grid-cols-[auto_1fr_auto] items-center gap-2.5 uppercase", children: [_jsx(Typography, { className: "text-xs leading-[1.4] tracking-widest", expanded: true, children: value }), _jsx(Typography, { className: "min-w-0 overflow-hidden text-[13px] leading-[1.4] tracking-[0.4em] opacity-20", expanded: true, children: '·'.repeat(100) }), _jsx(Typography, { className: "leading-none tracking-[0.2em] opacity-60", mono: true, children: label })] }, label))) }));
6
+ }
7
+ //# sourceMappingURL=stats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats.js","sourceRoot":"","sources":["../../../src/ui/components/stats.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,UAAU,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAc;IAC9D,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAAM,KAAK,YACnE,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC/B,eACE,SAAS,EAAC,8EAA8E,aAGxF,KAAC,UAAU,IACT,SAAS,EAAC,uCAAuC,EACjD,QAAQ,kBAEP,KAAK,GACK,EAEb,KAAC,UAAU,IACT,SAAS,EAAC,+EAA+E,EACzF,QAAQ,kBAEP,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,GACL,EAEb,KAAC,UAAU,IAAC,SAAS,EAAC,0CAA0C,EAAC,IAAI,kBAClE,KAAK,GACK,KAlBR,KAAK,CAmBN,CACP,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function TV({ className }: {
2
+ className?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,163 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useRef } from 'react';
4
+ const VERT = /* glsl */ `attribute vec2 a;void main(){gl_Position=vec4(a,0,1);}`;
5
+ const FRAG = /* glsl */ `precision highp float;
6
+ uniform float t;
7
+ uniform vec2 r;
8
+
9
+ const float FBM_STR = .08;
10
+
11
+ float h(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
12
+
13
+ float n2(vec2 p) {
14
+ vec2 i = floor(p), f = fract(p);
15
+ f = f * f * (3. - 2. * f);
16
+
17
+ return mix(
18
+ mix(h(i), h(i + vec2(1, 0)), f.x),
19
+ mix(h(i + vec2(0, 1)), h(i + vec2(1, 1)), f.x),
20
+ f.y
21
+ );
22
+ }
23
+
24
+ float fbm(vec2 p) {
25
+ float v = 0., a = .5;
26
+
27
+ for (int i = 0; i < 4; i++) {
28
+ v += a * n2(p);
29
+ p *= 2.1;
30
+ a *= .45;
31
+ }
32
+
33
+ return v;
34
+ }
35
+
36
+ float drift(float speed, float s) {
37
+ return fract(t * speed + s + .02 * sin(t * .4 + s * 3.));
38
+ }
39
+
40
+ float brushAt(vec2 uv, float y, float th, float s) {
41
+ float hw = .34 + .08 * h(vec2(s, 77.));
42
+ float cx = .5;
43
+ float xn = (uv.x - (cx - hw)) / (2. * hw);
44
+ float env = smoothstep(0., .03, xn) * smoothstep(1., .97, xn);
45
+ float localTh = th * env;
46
+
47
+ if (localTh < .002) return 0.;
48
+
49
+ float morph = floor(t * 8.) * .7 + s;
50
+ float top = y - localTh * .5 + fbm(vec2(uv.x * 6., morph)) * FBM_STR;
51
+ float bot = y + localTh * .5 - fbm(vec2(uv.x * 6., morph + 30.)) * FBM_STR;
52
+ float x0 = cx - hw + fbm(vec2(uv.y * 8., morph + 60.)) * FBM_STR;
53
+ float x1 = cx + hw - fbm(vec2(uv.y * 8., morph + 90.)) * FBM_STR;
54
+
55
+ float dMin = min(min(uv.y - top, bot - uv.y), min(uv.x - x0, x1 - uv.x));
56
+
57
+ float bristle = n2(vec2(uv.x * 60., uv.y * 8. + s)) * .4
58
+ + n2(vec2(uv.x * 25., (uv.y - y) * 120. + s)) * .35
59
+ + n2(vec2(uv.x * 90., uv.y * 3. + s * 2.)) * .25;
60
+
61
+ float eaten = smoothstep(.03, 0., dMin) * (1. - smoothstep(.2, .5, bristle));
62
+
63
+ return clamp(smoothstep(0., .003, dMin) * (1. - eaten), 0., 1.);
64
+ }
65
+
66
+ void main() {
67
+ vec2 uv = gl_FragCoord.xy / r;
68
+ uv = vec2(uv.x * cos(.095) - uv.y * sin(.095), uv.x * sin(.095) + uv.y * cos(.095));
69
+ uv += vec2(fbm(uv * 4. + t * .06), fbm(uv * 4. + 8. + t * .05)) * .012;
70
+
71
+ vec3 c = vec3(.992, .992, .051);
72
+
73
+ float smScroll = -drift(.04, 5.) * 2.;
74
+ float sm = 0.;
75
+
76
+ for (int i = 0; i < 20; i++) {
77
+ sm = max(sm, brushAt(uv, mod(float(i) * .1 + smScroll, 2.) - .5, .04, float(i) + 10.));
78
+ }
79
+
80
+ float d1 = drift(.15, 1.), d2 = drift(.15, 1.37), d3 = drift(.15, 1.58), d4 = drift(.15, 1.82);
81
+ float big = max(
82
+ max(brushAt(uv, 1.1 - d1 * 1.4, .28, 1.), brushAt(uv, 1.1 - d2 * 1.4, .18, 2.)),
83
+ max(brushAt(uv, 1.1 - d3 * 1.4, .3, 3.), brushAt(uv, 1.1 - d4 * 1.4, .15, 4.))
84
+ );
85
+
86
+ c = mix(c, vec3(0.), clamp(max(sm, big), 0., 1.));
87
+ c *= .94 + .06 * sin(uv.y * r.y * 6.283);
88
+
89
+ vec2 raw = gl_FragCoord.xy / r;
90
+ float dx = min(raw.x - .22, .90 - raw.x);
91
+ float dy = min(raw.y - .29, .86 - raw.y);
92
+ float cycle = floor(t * .4);
93
+ float edge = mix(smoothstep(.22, 0., max(min(dx, dy), 0.)), 1., step(.75, h(vec2(cycle, 13.))))
94
+ * smoothstep(.85, 1., sin(t * 2.5) * .5 + .5)
95
+ * (.7 + .3 * h(vec2(cycle, 7.)));
96
+
97
+ float scanY = floor(gl_FragCoord.y);
98
+ float rowNoise = h(vec2(scanY, floor(t * 30.)));
99
+ c *= 1. - edge * max(step(.45, rowNoise), step(.3, h(vec2(gl_FragCoord.x + scanY * 7., floor(t * 45.)))) * step(.2, rowNoise));
100
+
101
+ gl_FragColor = vec4(clamp(c, 0., 1.), 1.);
102
+ }`;
103
+ function useGL(ref) {
104
+ const raf = useRef(0);
105
+ useEffect(() => {
106
+ const c = ref.current;
107
+ if (!c) {
108
+ return;
109
+ }
110
+ const gl = c.getContext('webgl');
111
+ if (!gl) {
112
+ return;
113
+ }
114
+ const sh = (type, src) => {
115
+ const s = gl.createShader(type);
116
+ gl.shaderSource(s, src);
117
+ gl.compileShader(s);
118
+ return s;
119
+ };
120
+ const p = gl.createProgram();
121
+ gl.attachShader(p, sh(gl.VERTEX_SHADER, VERT));
122
+ gl.attachShader(p, sh(gl.FRAGMENT_SHADER, FRAG));
123
+ gl.linkProgram(p);
124
+ gl.useProgram(p);
125
+ gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());
126
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]), gl.STATIC_DRAW);
127
+ const a = gl.getAttribLocation(p, 'a');
128
+ gl.enableVertexAttribArray(a);
129
+ gl.vertexAttribPointer(a, 2, gl.FLOAT, false, 0, 0);
130
+ const uT = gl.getUniformLocation(p, 't');
131
+ const uR = gl.getUniformLocation(p, 'r');
132
+ const resize = () => {
133
+ const rect = c.getBoundingClientRect();
134
+ const dpr = Math.min(devicePixelRatio, 2);
135
+ c.width = rect.width * dpr;
136
+ c.height = rect.height * dpr;
137
+ gl.viewport(0, 0, c.width, c.height);
138
+ };
139
+ resize();
140
+ const ro = new ResizeObserver(resize);
141
+ ro.observe(c);
142
+ const t0 = performance.now();
143
+ const loop = () => {
144
+ gl.uniform1f(uT, (performance.now() - t0) / 1e3);
145
+ gl.uniform2f(uR, c.width, c.height);
146
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
147
+ raf.current = requestAnimationFrame(loop);
148
+ };
149
+ raf.current = requestAnimationFrame(loop);
150
+ return () => {
151
+ cancelAnimationFrame(raf.current);
152
+ ro.disconnect();
153
+ };
154
+ }, [ref]);
155
+ }
156
+ export function TV({ className }) {
157
+ const canvasRef = useRef(null);
158
+ useGL(canvasRef);
159
+ return (_jsxs("div", { className: ['relative', className].filter(Boolean).join(' '), children: [_jsxs("svg", { className: "relative h-full w-full", fill: "none", viewBox: "0 0 210 173", children: [_jsx("path", { d: "M30.8342 2.44471 6.08268 36.683c-.24437.338-.38254.7412-.39689 1.158L1.57754 157.126c-.03891 1.129.82339 2.087 1.95096 2.167l162.4835 11.463c.433.031.866-.074 1.238-.3l35.718-21.69c.607-.369.986-1.02 1.008-1.73l4.102-130.9871c.035-1.1269-.826-2.0806-1.951-2.1604L32.6847 1.58029c-.7248-.05144-1.4247.27551-1.8505.86442Z", fill: "#FDFD0D", stroke: "#FDFD0D", strokeWidth: "3.15" }), _jsx("path", { d: "M203.09 17.1483 35.6844 5.83395l-4.2 121.94805 168.4906 13.076z", fill: "#000", stroke: "#FDFD0D", strokeWidth: "4.2" }), _jsx("path", { d: "M190.491 29.7483 48.2859 18.434l-4.2 98.848 143.2901 10.976z", fill: "#FDFD0D" })] }), _jsx("canvas", { className: "absolute inset-0 h-full w-full", ref: canvasRef, style: {
160
+ clipPath: 'polygon(23% 10.65%, 90.71% 17.2%, 89.23% 74.13%, 20.99% 67.79%)'
161
+ } })] }));
162
+ }
163
+ //# sourceMappingURL=tv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tv.js","sourceRoot":"","sources":["../../../src/ui/components/tv.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAEzC,MAAM,IAAI,GAAG,UAAU,CAAC,wDAAwD,CAAA;AAEhF,MAAM,IAAI,GAAG,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiGtB,CAAA;AAEF,SAAS,KAAK,CAAC,GAA8C;IAC3D,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;IAErB,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAA;QAErB,IAAI,CAAC,CAAC,EAAE,CAAC;YACP,OAAM;QACR,CAAC;QAED,MAAM,EAAE,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAEhC,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,OAAM;QACR,CAAC;QAED,MAAM,EAAE,GAAG,CAAC,IAAY,EAAE,GAAW,EAAE,EAAE;YACvC,MAAM,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAE,CAAA;YAChC,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;YACvB,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;YAEnB,OAAO,CAAC,CAAA;QACV,CAAC,CAAA;QAED,MAAM,CAAC,GAAG,EAAE,CAAC,aAAa,EAAG,CAAA;QAC7B,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE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E,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAC/D,eAAK,SAAS,EAAC,wBAAwB,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,aAAa,aACvE,eACE,CAAC,EAAC,iUAAiU,EACnU,IAAI,EAAC,SAAS,EACd,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,MAAM,GAClB,EAEF,eACE,CAAC,EAAC,iEAAiE,EACnE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,KAAK,GACjB,EAEF,eACE,CAAC,EAAC,8DAA8D,EAChE,IAAI,EAAC,SAAS,GACd,IACE,EAEN,iBACE,SAAS,EAAC,gCAAgC,EAC1C,GAAG,EAAE,SAAS,EACd,KAAK,EAAE;oBACL,QAAQ,EACN,iEAAiE;iBACpE,GACD,IACE,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const H1: import("react").ForwardRefExoticComponent<{
2
+ as?: "h1" | undefined;
3
+ } & {
4
+ expanded?: boolean | null | undefined;
5
+ compressed?: boolean | null | undefined;
6
+ courier?: boolean | null | undefined;
7
+ mondwest?: boolean | null | undefined;
8
+ mono?: boolean | null | undefined;
9
+ sans?: boolean | null | undefined;
10
+ variant?: "lg" | "md" | "sm" | "xl" | null | undefined;
11
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref">, "as" | "expanded" | "compressed" | "courier" | "mondwest" | "mono" | "sans" | "variant"> & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { cn } from '../../../utils';
4
+ import { Typography } from '.';
5
+ export const H1 = forwardRef(({ className, ...props }, ref) => {
6
+ return (_jsx(Typography, { as: "h1", className: cn('font-bold', className), variant: "xl", ref, ...props }));
7
+ });
8
+ //# sourceMappingURL=h1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"h1.js","sourceRoot":"","sources":["../../../../src/ui/components/typography/h1.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AAEnC,OAAO,EAAE,UAAU,EAAwB,MAAM,GAAG,CAAA;AAEpD,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAC1B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/B,OAAO,CACL,KAAC,UAAU,IACT,EAAE,EAAC,IAAI,EACP,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,EACrC,OAAO,EAAC,IAAI,EACN,GAAG,EAAE,GAAG,KAAK,GACnB,CACH,CAAA;AACH,CAAC,CACF,CAAA"}
@@ -0,0 +1,11 @@
1
+ export declare const H2: import("react").ForwardRefExoticComponent<{
2
+ as?: "h2" | undefined;
3
+ } & {
4
+ expanded?: boolean | null | undefined;
5
+ compressed?: boolean | null | undefined;
6
+ courier?: boolean | null | undefined;
7
+ mondwest?: boolean | null | undefined;
8
+ mono?: boolean | null | undefined;
9
+ sans?: boolean | null | undefined;
10
+ variant?: "lg" | "md" | "sm" | "xl" | null | undefined;
11
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref">, "as" | "expanded" | "compressed" | "courier" | "mondwest" | "mono" | "sans" | "variant"> & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { cn } from '../../../utils';
4
+ import { Typography } from '.';
5
+ export const H2 = forwardRef(({ className, ...props }, ref) => {
6
+ return (_jsx(Typography, { as: "h2", className: cn('font-bold', className), variant: "lg", ref, ...props }));
7
+ });
8
+ //# sourceMappingURL=h2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"h2.js","sourceRoot":"","sources":["../../../../src/ui/components/typography/h2.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AAEnC,OAAO,EAAE,UAAU,EAAwB,MAAM,GAAG,CAAA;AAEpD,MAAM,CAAC,MAAM,EAAE,GAAG,UAAU,CAC1B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/B,OAAO,CACL,KAAC,UAAU,IACT,EAAE,EAAC,IAAI,EACP,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,EACrC,OAAO,EAAC,IAAI,EACN,GAAG,EAAE,GAAG,KAAK,GACnB,CACH,CAAA;AACH,CAAC,CACF,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import { type PolyProps } from '../../../utils';
3
+ declare const typographyVariants: (props?: ({
4
+ compressed?: boolean | null | undefined;
5
+ courier?: boolean | null | undefined;
6
+ expanded?: boolean | null | undefined;
7
+ mondwest?: boolean | null | undefined;
8
+ mono?: boolean | null | undefined;
9
+ sans?: boolean | null | undefined;
10
+ variant?: "lg" | "md" | "sm" | "xl" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
+ export declare const Typography: import("../../..").PolyComponent<"span", OwnProps>;
13
+ type OwnProps = VariantProps<typeof typographyVariants>;
14
+ export type TypographyProps<T extends React.ElementType = 'span'> = PolyProps<T, OwnProps>;
15
+ export {};
@@ -0,0 +1,29 @@
1
+ import { cva } from 'class-variance-authority';
2
+ import { createElement } from 'react';
3
+ import { cn, polyRef } from '../../../utils';
4
+ const typographyVariants = cva('font-sans', {
5
+ variants: {
6
+ compressed: { true: 'font-compressed' },
7
+ courier: { true: 'font-courier' },
8
+ expanded: { true: 'font-expanded' },
9
+ mondwest: { true: 'font-mondwest tracking-[0.1875rem]' },
10
+ mono: { true: 'font-mono' },
11
+ sans: { true: 'font-sans' },
12
+ variant: {
13
+ lg: 'text-[2.625rem] leading-[1] tracking-[0.0525rem]',
14
+ md: 'text-[2.625rem] leading-[1] tracking-[0.0525rem]',
15
+ sm: 'leading-1.4 text-[.9375rem] tracking-[0.1875rem]',
16
+ xl: 'text-[4.5rem] leading-[1] tracking-[0.135rem]'
17
+ }
18
+ }
19
+ });
20
+ export const Typography = polyRef(({ as, className, compressed, courier, expanded, mondwest, mono, variant, ...rest }, ref) => {
21
+ const fonts = { compressed, courier, expanded, mondwest, mono };
22
+ const fontVariant = { ...fonts, sans: !Object.values(fonts).some(Boolean) };
23
+ return createElement((as ?? 'span'), {
24
+ ...rest,
25
+ className: cn(typographyVariants({ ...fontVariant, variant }), className),
26
+ ref
27
+ });
28
+ });
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/components/typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,OAAO,EAAE,EAAE,EAAkB,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAE5D,MAAM,kBAAkB,GAAG,GAAG,CAAC,WAAW,EAAE;IAC1C,QAAQ,EAAE;QACR,UAAU,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE;QACvC,OAAO,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;QACjC,QAAQ,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;QACnC,QAAQ,EAAE,EAAE,IAAI,EAAE,oCAAoC,EAAE;QACxD,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;QAC3B,OAAO,EAAE;YACP,EAAE,EAAE,kDAAkD;YACtD,EAAE,EAAE,kDAAkD;YACtD,EAAE,EAAE,kDAAkD;YACtD,EAAE,EAAE,+CAA+C;SACpD;KACF;CACF,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,CAC/B,CACE,EACE,EAAE,EACF,SAAS,EACT,UAAU,EACV,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,MAAM,KAAK,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;IAC/D,MAAM,WAAW,GAAG,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAA;IAE3E,OAAO,aAAa,CAAC,CAAC,EAAE,IAAI,MAAM,CAAsB,EAAE;QACxD,GAAG,IAAI;QACP,SAAS,EAAE,EAAE,CAAC,kBAAkB,CAAC,EAAE,GAAG,WAAW,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC;QACzE,GAAG;KACJ,CAAC,CAAA;AACJ,CAAC,CACF,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare function Legend({ children, className, label, sub, ...props }: LegendProps): import("react/jsx-runtime").JSX.Element;
2
+ interface LegendProps extends React.ComponentProps<'hgroup'> {
3
+ label: React.ReactNode;
4
+ sub?: React.ReactNode;
5
+ }
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from '../../../utils';
3
+ import { Small } from './small';
4
+ export function Legend({ children, className, label, sub, ...props }) {
5
+ return (_jsxs("hgroup", { className: cn('flex flex-col gap-2', className), ...props, children: [_jsx(Small, { children: label }), sub && _jsxs(Small, { className: "opacity-50", children: ["- ", sub] }), children] }));
6
+ }
7
+ //# sourceMappingURL=legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legend.js","sourceRoot":"","sources":["../../../../src/ui/components/typography/legend.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,UAAU,MAAM,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACI;IACZ,OAAO,CACL,kBAAQ,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAAM,KAAK,aAChE,KAAC,KAAK,cAAE,KAAK,GAAS,EACrB,GAAG,IAAI,MAAC,KAAK,IAAC,SAAS,EAAC,YAAY,mBAAI,GAAG,IAAS,EACpD,QAAQ,IACF,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type TypographyProps } from '.';
2
+ export declare const Small: import("react").ForwardRefExoticComponent<Omit<TypographyProps<any>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from 'react';
3
+ import { Typography } from '.';
4
+ export const Small = forwardRef((props, ref) => {
5
+ return (_jsx(Typography, { as: "small", mondwest: true, variant: "sm", ref, ...props }));
6
+ });
7
+ //# sourceMappingURL=small.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"small.js","sourceRoot":"","sources":["../../../../src/ui/components/typography/small.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,OAAO,EAAE,UAAU,EAAwB,MAAM,GAAG,CAAA;AAEpD,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,OAAO,CACL,KAAC,UAAU,IAAC,EAAE,EAAC,OAAO,EAAC,QAAQ,QAAC,OAAO,EAAC,IAAI,EAAO,GAAG,EAAE,GAAG,KAAK,GAAM,CACvE,CAAA;AACH,CAAC,CACF,CAAA"}
@@ -0,0 +1,11 @@
1
+ export declare function Watchlist({ className, counter, items, scramble, ...props }: WatchlistProps): import("react/jsx-runtime").JSX.Element;
2
+ interface WatchlistProps extends React.ComponentProps<'div'> {
3
+ counter?: boolean;
4
+ items: {
5
+ label?: React.ReactNode;
6
+ right?: React.ReactNode;
7
+ url?: string;
8
+ }[];
9
+ scramble?: boolean;
10
+ }
11
+ export {};
@@ -0,0 +1,27 @@
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';
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
+ }) }));
26
+ }
27
+ //# sourceMappingURL=watchlist.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchlist.js","sourceRoot":"","sources":["../../../src/ui/components/watchlist.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,MAAM,GAAG,qBAAqB,CAAA;AACpC,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAEhF,MAAM,UAAU,SAAS,CAAC,EACxB,SAAS,EACT,OAAO,GAAG,KAAK,EACf,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,GAAG,KAAK,EACO;IACf,OAAO,CACL,cAAK,SAAS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AC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,YAEhD,QAAQ,CAAC,CAAC,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,GAC/C,CACd,CAAC,CAAC,CAAC,CACF,KAAK,CACN,EAEA,KAAK,IAAI,CACR,KAAC,UAAU,IACT,SAAS,EAAC,+CAA+C,EACzD,IAAI,kBAEH,KAAK,GACK,CACd,EAEA,GAAG,IAAI,CACN,8BACE,eAAM,SAAS,EAAC,8CAA8C,kBAEvD,EACP,KAAC,QAAQ,IAAC,SAAS,EAAC,yBAAyB,GAAG,IAC/C,CACJ,KAzDI,CAAC,CA0DJ,CACL,CAAA;QACH,CAAC,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,63 @@
1
+ @font-face {
2
+ font-family: 'Collapse';
3
+ font-style: normal;
4
+ font-weight: 400;
5
+ font-display: swap;
6
+ src: url(/fonts/Collapse-Regular.woff2) format('woff2');
7
+ }
8
+
9
+ @font-face {
10
+ font-family: 'Collapse';
11
+ font-style: normal;
12
+ font-weight: 700;
13
+ font-display: swap;
14
+ src: url(/fonts/Collapse-Bold.woff2) format('woff2');
15
+ }
16
+
17
+ @font-face {
18
+ font-family: 'Rules Compressed';
19
+ font-style: normal;
20
+ font-weight: 400;
21
+ font-display: swap;
22
+ src: url(/fonts/RulesCompressed-Regular.woff2) format('woff2');
23
+ }
24
+
25
+ @font-face {
26
+ font-family: 'Rules Compressed';
27
+ font-style: normal;
28
+ font-weight: 600;
29
+ font-display: swap;
30
+ src: url(/fonts/RulesCompressed-Medium.woff2) format('woff2');
31
+ }
32
+
33
+ @font-face {
34
+ font-family: 'Rules Expanded';
35
+ font-style: normal;
36
+ font-weight: 400;
37
+ font-display: swap;
38
+ src: url(/fonts/RulesExpanded-Regular.woff2) format('woff2');
39
+ }
40
+
41
+ @font-face {
42
+ font-family: 'Rules Expanded';
43
+ font-style: normal;
44
+ font-weight: 700;
45
+ font-display: swap;
46
+ src: url(/fonts/RulesExpanded-Bold.woff2) format('woff2');
47
+ }
48
+
49
+ @font-face {
50
+ font-family: 'Mondwest';
51
+ font-style: normal;
52
+ font-weight: 400;
53
+ font-display: swap;
54
+ src: url(/fonts/Mondwest-Regular.woff2) format('woff2');
55
+ }
56
+
57
+ :root {
58
+ --font-sans: 'Collapse', sans-serif;
59
+ --font-mono: 'Courier Prime', monospace;
60
+ --font-rules-compressed: 'Rules Compressed', sans-serif;
61
+ --font-rules-expanded: 'Rules Expanded', sans-serif;
62
+ --font-mondwest: 'Mondwest', sans-serif;
63
+ }
@@ -0,0 +1 @@
1
+ export declare function Footer(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ 'use client';
2
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
+ import { Link } from 'next-view-transitions';
4
+ import { useRef } from 'react';
5
+ import { useCssVarDims } from '../hooks/use-css-var-dims';
6
+ import { Cell, Grid } from './components/grid';
7
+ import { Small } from './components/typography/small';
8
+ const GROUPS = [
9
+ { label: 'Product', links: ['Overview', 'Features', 'Pricing'] },
10
+ { label: 'Resources', links: ['Docs', 'Blog', 'Support'] },
11
+ { label: 'Company', links: ['About', 'Careers', 'Contact'] },
12
+ { label: 'Legal', links: ['Privacy', 'Terms', 'License'] }
13
+ ];
14
+ export function Footer() {
15
+ const ref = useRef(null);
16
+ useCssVarDims('footer', ref);
17
+ return (_jsxs(Grid, { as: "footer", ref, 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 => (_jsx(Small, { as: Link, className: "underline", href: `/${link.toLowerCase()}`, children: link }, link))) })] }, label)))] }));
18
+ }
19
+ //# sourceMappingURL=footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer.js","sourceRoot":"","sources":["../../src/ui/footer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AAErD,MAAM,MAAM,GAAG;IACb,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE;IAChE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE;IAC1D,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE;IAC5D,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE;CAC3D,CAAA;AAED,MAAM,UAAU,MAAM;IACpB,MAAM,GAAG,GAAG,MAAM,CAAc,IAAI,CAAC,CAAA;IACrC,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;IAE5B,OAAO,CACL,MAAC,IAAI,IAAC,EAAE,EAAC,QAAQ,EAAO,GAAG,aACzB,KAAC,IAAI,cACH,MAAC,KAAK,IAAC,SAAS,EAAC,YAAY,uBAAQ,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,IAAS,GACjE,EAEN,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE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