@nous-research/ui 0.13.2 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- 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/build.css +1 -0
- 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/globals.css +5 -1
- 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 +42 -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,218 +1,216 @@
|
|
|
1
|
-
|
|
2
|
-
import gsap from
|
|
3
|
-
import { buttonGroup, useControls } from
|
|
4
|
-
import { atom } from
|
|
5
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from
|
|
6
|
-
const atomRegistry = new Map();
|
|
7
|
-
const val = (v) => v && typeof v ===
|
|
1
|
+
"use client";
|
|
2
|
+
import gsap from "gsap";
|
|
3
|
+
import { buttonGroup, useControls } from "leva";
|
|
4
|
+
import { atom } from "nanostores";
|
|
5
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
6
|
+
const atomRegistry = /* @__PURE__ */ new Map();
|
|
7
|
+
const val = (v) => v && typeof v === "object" && "value" in v ? v.value : v;
|
|
8
8
|
const isHex = (v) => /color/i.test(v?.type) || /^#[0-9a-f]{3,8}$/i.test(val(v));
|
|
9
|
-
const randHex = () => `#${Math.floor(Math.random() *
|
|
10
|
-
|
|
11
|
-
.padStart(6, '0')}`;
|
|
12
|
-
const randNum = (v) => typeof v === 'object' && ('min' in v || 'max' in v)
|
|
13
|
-
? gsap.utils.random(v.min ?? 0, v.max ?? 1, v.step ?? 0.01)
|
|
14
|
-
: gsap.utils.random(0, 1);
|
|
9
|
+
const randHex = () => `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`;
|
|
10
|
+
const randNum = (v) => typeof v === "object" && ("min" in v || "max" in v) ? gsap.utils.random(v.min ?? 0, v.max ?? 1, v.step ?? 0.01) : gsap.utils.random(0, 1);
|
|
15
11
|
export function useSmoothControls(label, initialArgs, options, dependencies) {
|
|
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
|
-
}
|
|
42
|
-
else if (!map.has(k)) {
|
|
43
|
-
map.set(k, atom(val(v)));
|
|
44
|
-
}
|
|
45
|
-
else if (freshMount) {
|
|
46
|
-
map.get(k).set(val(v));
|
|
47
|
-
}
|
|
12
|
+
const entries = useMemo(
|
|
13
|
+
() => Object.entries(initialArgs ?? {}),
|
|
14
|
+
[initialArgs]
|
|
15
|
+
);
|
|
16
|
+
const values = useMemo(
|
|
17
|
+
() => entries.filter(([, v]) => !/button|folder/i.test(v?.type)),
|
|
18
|
+
[entries]
|
|
19
|
+
);
|
|
20
|
+
const mountedRef = useRef(false);
|
|
21
|
+
const atoms = useMemo(() => {
|
|
22
|
+
const map = atomRegistry.get(label) ?? /* @__PURE__ */ new Map();
|
|
23
|
+
if (!atomRegistry.has(label)) {
|
|
24
|
+
atomRegistry.set(label, map);
|
|
25
|
+
}
|
|
26
|
+
const freshMount = !mountedRef.current;
|
|
27
|
+
entries.forEach(([k, v]) => {
|
|
28
|
+
if (v?.schema) {
|
|
29
|
+
Object.keys(v.schema).forEach((sk) => {
|
|
30
|
+
const key = `${k}.${sk}`;
|
|
31
|
+
if (!map.has(key)) {
|
|
32
|
+
map.set(key, atom(val(v.schema[sk])));
|
|
33
|
+
} else if (freshMount) {
|
|
34
|
+
map.get(key).set(val(v.schema[sk]));
|
|
35
|
+
}
|
|
48
36
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
entries.forEach(([k, v]) => {
|
|
103
|
-
if (v?.schema) {
|
|
104
|
-
Object.keys(v.schema).forEach(sk => {
|
|
105
|
-
subscribe(`${k}.${sk}`, v => {
|
|
106
|
-
try {
|
|
107
|
-
setRef.current({
|
|
108
|
-
[k]: { ...(args[k] ?? {}), [sk]: v }
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
catch {
|
|
112
|
-
//
|
|
113
|
-
}
|
|
114
|
-
update(st => ({
|
|
115
|
-
...st,
|
|
116
|
-
[k]: { ...(st[k] ?? {}), [sk]: v }
|
|
117
|
-
}));
|
|
118
|
-
});
|
|
119
|
-
});
|
|
37
|
+
} else if (!map.has(k)) {
|
|
38
|
+
map.set(k, atom(val(v)));
|
|
39
|
+
} else if (freshMount) {
|
|
40
|
+
map.get(k).set(val(v));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return map;
|
|
44
|
+
}, [label, entries]);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
mountedRef.current = true;
|
|
47
|
+
}, []);
|
|
48
|
+
const hydrate = useCallback(
|
|
49
|
+
() => Object.fromEntries(
|
|
50
|
+
entries.flatMap(
|
|
51
|
+
([k, v]) => v?.schema ? Object.entries(v.schema).map(([k0, v0]) => [
|
|
52
|
+
k0,
|
|
53
|
+
atoms.get(`${k}.${k0}`)?.get() ?? val(v0)
|
|
54
|
+
]) : [[k, atoms.get(k)?.get() ?? val(v)]]
|
|
55
|
+
)
|
|
56
|
+
),
|
|
57
|
+
[entries, atoms]
|
|
58
|
+
);
|
|
59
|
+
const [args, update] = useState(hydrate);
|
|
60
|
+
const setRef = useRef(null);
|
|
61
|
+
const atomVals = useRef({});
|
|
62
|
+
const fromAtom = useRef(false);
|
|
63
|
+
const fromControl = useRef(/* @__PURE__ */ new Set());
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (Object.keys(args).length !== Object.keys(initialArgs).length) {
|
|
66
|
+
update(hydrate);
|
|
67
|
+
}
|
|
68
|
+
}, [initialArgs, args]);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (!setRef.current) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const unsubs = [];
|
|
74
|
+
let ready = false;
|
|
75
|
+
const initTimeout = setTimeout(() => ready = true, 100);
|
|
76
|
+
const subscribe = (fullKey, updateFn) => {
|
|
77
|
+
const a = atoms.get(fullKey);
|
|
78
|
+
if (!a) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
unsubs.push(
|
|
82
|
+
a.subscribe((v) => {
|
|
83
|
+
const prev = atomVals.current[fullKey];
|
|
84
|
+
atomVals.current[fullKey] = v;
|
|
85
|
+
if (setRef.current && ready && prev !== v && !fromControl.current.has(fullKey)) {
|
|
86
|
+
fromAtom.current = true;
|
|
87
|
+
try {
|
|
88
|
+
updateFn(v);
|
|
89
|
+
} catch {
|
|
120
90
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
91
|
+
setTimeout(() => fromAtom.current = false, 0);
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
);
|
|
95
|
+
atomVals.current[fullKey] = a.get();
|
|
96
|
+
};
|
|
97
|
+
entries.forEach(([k, v]) => {
|
|
98
|
+
if (v?.schema) {
|
|
99
|
+
Object.keys(v.schema).forEach((sk) => {
|
|
100
|
+
subscribe(`${k}.${sk}`, (v2) => {
|
|
101
|
+
try {
|
|
102
|
+
setRef.current({
|
|
103
|
+
[k]: { ...args[k] ?? {}, [sk]: v2 }
|
|
104
|
+
});
|
|
105
|
+
} catch {
|
|
131
106
|
}
|
|
107
|
+
update((st) => ({
|
|
108
|
+
...st,
|
|
109
|
+
[k]: { ...st[k] ?? {}, [sk]: v2 }
|
|
110
|
+
}));
|
|
111
|
+
});
|
|
132
112
|
});
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const sync = (v) => {
|
|
147
|
-
update(st => ({ ...st, [key]: v }));
|
|
148
|
-
a?.set(v);
|
|
149
|
-
orig?.(v, k0);
|
|
150
|
-
};
|
|
151
|
-
if (typeof e === 'number' && args[key] !== e) {
|
|
152
|
-
gsap.to(args, {
|
|
153
|
-
duration: options?.duration ?? 0.35,
|
|
154
|
-
ease: 'circ.out',
|
|
155
|
-
[key]: e,
|
|
156
|
-
onComplete: () => void fromControl.current.delete(fullKey),
|
|
157
|
-
onUpdate: () => {
|
|
158
|
-
fromControl.current.add(fullKey);
|
|
159
|
-
sync(args[key]);
|
|
160
|
-
setTimeout(() => fromControl.current.delete(fullKey), 0);
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
sync(e);
|
|
166
|
-
setTimeout(() => fromControl.current.delete(fullKey), 0);
|
|
167
|
-
}
|
|
113
|
+
} else {
|
|
114
|
+
subscribe(k, (v2) => {
|
|
115
|
+
try {
|
|
116
|
+
setRef.current({ [k]: v2 });
|
|
117
|
+
} catch {
|
|
118
|
+
}
|
|
119
|
+
update((st) => ({ ...st, [k]: v2 }));
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
return () => {
|
|
124
|
+
clearTimeout(initTimeout);
|
|
125
|
+
unsubs.forEach((fn) => fn());
|
|
168
126
|
};
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
127
|
+
}, [label, entries, atoms, args]);
|
|
128
|
+
const onChange = (k, orig) => (e, k0) => {
|
|
129
|
+
if (fromAtom.current) {
|
|
130
|
+
return orig?.(e, k0);
|
|
131
|
+
}
|
|
132
|
+
const key = k0?.split(".")?.pop() ?? k;
|
|
133
|
+
const fullKey = k0 ?? k;
|
|
134
|
+
const a = atoms.get(fullKey);
|
|
135
|
+
fromControl.current.add(fullKey);
|
|
136
|
+
const sync = (v) => {
|
|
137
|
+
update((st) => ({ ...st, [key]: v }));
|
|
138
|
+
a?.set(v);
|
|
139
|
+
orig?.(v, k0);
|
|
140
|
+
};
|
|
141
|
+
if (typeof e === "number" && args[key] !== e) {
|
|
142
|
+
gsap.to(args, {
|
|
143
|
+
duration: options?.duration ?? 0.35,
|
|
144
|
+
ease: "circ.out",
|
|
145
|
+
[key]: e,
|
|
146
|
+
onComplete: () => void fromControl.current.delete(fullKey),
|
|
147
|
+
onUpdate: () => {
|
|
148
|
+
fromControl.current.add(fullKey);
|
|
149
|
+
sync(args[key]);
|
|
150
|
+
setTimeout(() => fromControl.current.delete(fullKey), 0);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
} else {
|
|
154
|
+
sync(e);
|
|
155
|
+
setTimeout(() => fromControl.current.delete(fullKey), 0);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const [, set] = useControls(
|
|
159
|
+
label,
|
|
160
|
+
() => ({
|
|
161
|
+
...Object.fromEntries(
|
|
162
|
+
entries.map(
|
|
163
|
+
([k, v]) => v?.schema ? [
|
|
164
|
+
k,
|
|
165
|
+
{
|
|
166
|
+
...v,
|
|
167
|
+
schema: Object.fromEntries(
|
|
168
|
+
Object.entries(v.schema).map(([sk, sv]) => [
|
|
169
|
+
sk,
|
|
170
|
+
{ ...sv, onChange: onChange(k, sv?.onChange) }
|
|
171
|
+
])
|
|
172
|
+
)
|
|
191
173
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
174
|
+
] : [k, { ...v, onChange: onChange(k, v?.onChange) }]
|
|
175
|
+
)
|
|
176
|
+
),
|
|
177
|
+
" ": buttonGroup({
|
|
178
|
+
flatten: () => void set(Object.fromEntries(values.map(([k]) => [k, 0]))),
|
|
179
|
+
randomize: () => {
|
|
180
|
+
set(
|
|
181
|
+
Object.fromEntries(
|
|
182
|
+
values.map(([k, v]) => [k, isHex(v) ? randHex() : randNum(v)])
|
|
183
|
+
)
|
|
184
|
+
);
|
|
185
|
+
options?.onRandomize?.();
|
|
186
|
+
},
|
|
187
|
+
reset: () => {
|
|
188
|
+
set(Object.fromEntries(values.map(([k, v]) => [k, val(v)])));
|
|
189
|
+
options?.onReset?.();
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
}),
|
|
193
|
+
{ collapsed: true, ...options },
|
|
194
|
+
dependencies ?? []
|
|
195
|
+
);
|
|
196
|
+
setRef.current = set;
|
|
197
|
+
return args;
|
|
196
198
|
}
|
|
197
199
|
export const getControlAtom = (label, key) => atomRegistry.get(label)?.get(key);
|
|
198
200
|
export const setControlValue = (label, key, value, options) => {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
else {
|
|
215
|
-
a.set(value);
|
|
216
|
-
}
|
|
201
|
+
const a = getControlAtom(label, key);
|
|
202
|
+
if (!a) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
if (options?.animate && typeof value === "number" && typeof a.get() === "number") {
|
|
206
|
+
const t = { v: a.get() };
|
|
207
|
+
gsap.to(t, {
|
|
208
|
+
duration: options.duration ?? 0.35,
|
|
209
|
+
ease: "circ.out",
|
|
210
|
+
onUpdate: () => a.set(t.v),
|
|
211
|
+
v: value
|
|
212
|
+
});
|
|
213
|
+
} else {
|
|
214
|
+
a.set(value);
|
|
215
|
+
}
|
|
217
216
|
};
|
|
218
|
-
//# sourceMappingURL=use-smooth-controls.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -66,4 +66,3 @@ export { useCappedFrame } from './hooks/use-capped-frame';
|
|
|
66
66
|
export { useCssVarDims } from './hooks/use-css-var-dims';
|
|
67
67
|
export { $gpuTier, useGpuTier } from './hooks/use-gpu-tier';
|
|
68
68
|
export { useSmoothControls, getControlAtom, setControlValue } from './hooks/use-smooth-controls';
|
|
69
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,58 +1,84 @@
|
|
|
1
|
-
export { AnimatedCount, useAnimatedCount } from
|
|
2
|
-
export { AsciiSkeleton, Scramble as AsciiScramble } from
|
|
3
|
-
export { Badge } from
|
|
4
|
-
export { NousGirlBadge } from
|
|
5
|
-
export { BlendMode, useBlendMode, withBlendMode } from
|
|
6
|
-
export { Blink } from
|
|
7
|
-
export { Button } from
|
|
8
|
-
export { CommandBlock, CopyButton } from
|
|
9
|
-
export { Cursor } from
|
|
10
|
-
export { DropdownMenu } from
|
|
11
|
-
export { FitText } from
|
|
12
|
-
export { BarChart, LineChart } from
|
|
13
|
-
export { Cell, Grid } from
|
|
14
|
-
export { HoverBg } from
|
|
15
|
-
export * as Icons from
|
|
16
|
-
export { DiscordIcon } from
|
|
17
|
-
export { GitHubIcon } from
|
|
18
|
-
export { ImageDistortion } from
|
|
19
|
-
export { LevaClient } from
|
|
20
|
-
export { ListItem } from
|
|
21
|
-
export { Modal } from
|
|
22
|
-
export { FilterGroup, Segmented } from
|
|
23
|
-
export { Switch } from
|
|
24
|
-
export { Tabs, TabsList, TabsTrigger } from
|
|
25
|
-
export { Poster } from
|
|
26
|
-
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export {
|
|
46
|
-
export {
|
|
47
|
-
export {
|
|
48
|
-
export {
|
|
49
|
-
export {
|
|
50
|
-
export {
|
|
51
|
-
export {
|
|
52
|
-
export {
|
|
53
|
-
export {
|
|
54
|
-
export {
|
|
55
|
-
export {
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
58
|
-
|
|
1
|
+
export { AnimatedCount, useAnimatedCount } from "./ui/components/animated-count.js";
|
|
2
|
+
export { AsciiSkeleton, Scramble as AsciiScramble } from "./ui/components/ascii.js";
|
|
3
|
+
export { Badge } from "./ui/components/badge.js";
|
|
4
|
+
export { NousGirlBadge } from "./ui/components/badges/nous-girl.js";
|
|
5
|
+
export { BlendMode, useBlendMode, withBlendMode } from "./ui/components/blend-mode.js";
|
|
6
|
+
export { Blink } from "./ui/components/blink.js";
|
|
7
|
+
export { Button } from "./ui/components/button.js";
|
|
8
|
+
export { CommandBlock, CopyButton } from "./ui/components/command-block.js";
|
|
9
|
+
export { Cursor } from "./ui/components/cursor.js";
|
|
10
|
+
export { DropdownMenu } from "./ui/components/dropdown-menu.js";
|
|
11
|
+
export { FitText } from "./ui/components/fit-text/index.js";
|
|
12
|
+
export { BarChart, LineChart } from "./ui/components/graphs/index.js";
|
|
13
|
+
export { Cell, Grid } from "./ui/components/grid/index.js";
|
|
14
|
+
export { HoverBg } from "./ui/components/hover-bg.js";
|
|
15
|
+
export * as Icons from "./ui/components/icons/index.js";
|
|
16
|
+
export { DiscordIcon } from "./ui/components/icons/discord.js";
|
|
17
|
+
export { GitHubIcon } from "./ui/components/icons/github.js";
|
|
18
|
+
export { ImageDistortion } from "./ui/components/image-distortion.js";
|
|
19
|
+
export { LevaClient } from "./ui/components/leva-client.js";
|
|
20
|
+
export { ListItem } from "./ui/components/list-item.js";
|
|
21
|
+
export { Modal } from "./ui/components/modal/index.js";
|
|
22
|
+
export { FilterGroup, Segmented } from "./ui/components/segmented.js";
|
|
23
|
+
export { Switch } from "./ui/components/switch.js";
|
|
24
|
+
export { Tabs, TabsList, TabsTrigger } from "./ui/components/tabs.js";
|
|
25
|
+
export { Poster } from "./ui/components/poster.js";
|
|
26
|
+
export {
|
|
27
|
+
applyLens,
|
|
28
|
+
BLEND_MODES,
|
|
29
|
+
LENSES,
|
|
30
|
+
LENS_0,
|
|
31
|
+
LENS_5I,
|
|
32
|
+
lens0,
|
|
33
|
+
lens5i,
|
|
34
|
+
toggleLens,
|
|
35
|
+
$lightMode
|
|
36
|
+
} from "./ui/components/overlays";
|
|
37
|
+
export {
|
|
38
|
+
Glitch,
|
|
39
|
+
Greys,
|
|
40
|
+
Lens,
|
|
41
|
+
Noise,
|
|
42
|
+
Overlays,
|
|
43
|
+
Vignette
|
|
44
|
+
} from "./ui/components/overlays/index.js";
|
|
45
|
+
export { Progress } from "./ui/components/progress.js";
|
|
46
|
+
export { SceneCanvas } from "./ui/components/scene-canvas.js";
|
|
47
|
+
export { Scramble } from "./ui/components/scramble.js";
|
|
48
|
+
export { Select, SelectOption } from "./ui/components/select.js";
|
|
49
|
+
export { SelectionSwitcher } from "./ui/components/selection-switcher.js";
|
|
50
|
+
export { Spinner } from "./ui/components/spinner.js";
|
|
51
|
+
export { Stats } from "./ui/components/stats.js";
|
|
52
|
+
export { TerminalDemo } from "./ui/components/terminal-demo.js";
|
|
53
|
+
export { ThemeToggle } from "./ui/components/theme-toggle.js";
|
|
54
|
+
export { TierCard } from "./ui/components/tier-card.js";
|
|
55
|
+
export { TV } from "./ui/components/tv.js";
|
|
56
|
+
export { Watchlist } from "./ui/components/watchlist.js";
|
|
57
|
+
export { Typography } from "./ui/components/typography/index.js";
|
|
58
|
+
export { H1 } from "./ui/components/typography/h1.js";
|
|
59
|
+
export { H2 } from "./ui/components/typography/h2.js";
|
|
60
|
+
export { Legend } from "./ui/components/typography/legend.js";
|
|
61
|
+
export { Small } from "./ui/components/typography/small.js";
|
|
62
|
+
export { BasicPage } from "./ui/basic-page.js";
|
|
63
|
+
export { Header } from "./ui/header.js";
|
|
64
|
+
export { Footer } from "./ui/footer.js";
|
|
65
|
+
export { Socials } from "./ui/components/socials.js";
|
|
66
|
+
export { LayoutWrapper } from "./ui/layout-wrapper.js";
|
|
67
|
+
export {
|
|
68
|
+
FONT_SANS,
|
|
69
|
+
FONT_MONO,
|
|
70
|
+
FONT_RULES_COMPRESSED,
|
|
71
|
+
FONT_RULES_EXPANDED,
|
|
72
|
+
FONT_MONDWEST
|
|
73
|
+
} from "./fonts.js";
|
|
74
|
+
export { cn, clamp, smoothstep, hexToVec3, truncate, stripWpStyles } from "./utils/index.js";
|
|
75
|
+
export { polyRef } from "./utils/index.js";
|
|
76
|
+
export { hexToRgb, rgbToHex, colorDodge, colorMix } from "./utils/color.js";
|
|
77
|
+
export { useCappedFrame } from "./hooks/use-capped-frame.js";
|
|
78
|
+
export { useCssVarDims } from "./hooks/use-css-var-dims.js";
|
|
79
|
+
export { $gpuTier, useGpuTier } from "./hooks/use-gpu-tier.js";
|
|
80
|
+
export {
|
|
81
|
+
useSmoothControls,
|
|
82
|
+
getControlAtom,
|
|
83
|
+
setControlValue
|
|
84
|
+
} from "./hooks/use-smooth-controls.js";
|
package/dist/ui/basic-page.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
export declare function BasicPage({ children, subtitle, title }: BasicPageProps): import("react
|
|
2
|
+
export declare function BasicPage({ children, subtitle, title }: BasicPageProps): import("react").JSX.Element;
|
|
3
3
|
interface BasicPageProps extends React.PropsWithChildren {
|
|
4
4
|
subtitle?: string;
|
|
5
5
|
title?: ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export {};
|
|
8
|
-
//# sourceMappingURL=basic-page.d.ts.map
|
package/dist/ui/basic-page.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import { Cell, Grid } from
|
|
3
|
-
import { Progress } from
|
|
4
|
-
import { H1 } from
|
|
5
|
-
import { Small } from
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Cell, Grid } from "./components/grid/index.js";
|
|
3
|
+
import { Progress } from "./components/progress.js";
|
|
4
|
+
import { H1 } from "./components/typography/h1.js";
|
|
5
|
+
import { Small } from "./components/typography/small.js";
|
|
6
6
|
export function BasicPage({ children, subtitle, title }) {
|
|
7
|
-
|
|
7
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Cell, { children: /* @__PURE__ */ jsx(Progress, { value: 0 }) }) }),
|
|
9
|
+
/* @__PURE__ */ jsxs(Grid, { className: "lg:grid-cols-[max-content_1fr]", children: [
|
|
10
|
+
/* @__PURE__ */ jsx(Cell, { className: "-order-1", children: /* @__PURE__ */ jsxs("div", { className: "sticky top-4 flex flex-col gap-4", children: [
|
|
11
|
+
title ? /* @__PURE__ */ jsx(H1, { className: "-mb-2 pr-10 opacity-90", children: title }) : null,
|
|
12
|
+
subtitle ? /* @__PURE__ */ jsx(Small, { className: "opacity-60", children: subtitle }) : null
|
|
13
|
+
] }) }),
|
|
14
|
+
/* @__PURE__ */ jsx(Cell, { className: "post bg-current/3", children })
|
|
15
|
+
] })
|
|
16
|
+
] });
|
|
8
17
|
}
|
|
9
|
-
//# sourceMappingURL=basic-page.js.map
|
package/dist/ui/build.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function useAnimatedCount(from: number, rate: number, ts?: Date, pausedAt?: Date): number;
|
|
2
|
-
export declare function AnimatedCount({ damping, duration, pausedAt, rate, value }: Props): import("react
|
|
2
|
+
export declare function AnimatedCount({ damping, duration, pausedAt, rate, value }: Props): import("react").JSX.Element;
|
|
3
3
|
interface Props {
|
|
4
4
|
damping?: number;
|
|
5
5
|
duration?: number;
|
|
@@ -8,4 +8,3 @@ interface Props {
|
|
|
8
8
|
value: number;
|
|
9
9
|
}
|
|
10
10
|
export {};
|
|
11
|
-
//# sourceMappingURL=animated-count.d.ts.map
|