@actioneer/ads 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.
- package/LICENSE +21 -0
- package/bin/ads-init.mjs +314 -0
- package/components/accordion.d.ts +13 -0
- package/components/accordion.js +91 -0
- package/components/agents-ui/agent-audio-visualizer-aura.d.ts +11 -0
- package/components/agents-ui/agent-audio-visualizer-aura.js +277 -0
- package/components/agents-ui/agent-audio-visualizer-wave.d.ts +12 -0
- package/components/agents-ui/agent-audio-visualizer-wave.js +203 -0
- package/components/agents-ui/react-shader-toy.d.ts +87 -0
- package/components/agents-ui/react-shader-toy.js +531 -0
- package/components/ai-elements/chain-of-thought.d.ts +30 -0
- package/components/ai-elements/chain-of-thought.js +182 -0
- package/components/ai-elements/index.d.ts +11 -0
- package/components/ai-elements/inline-citation.d.ts +44 -0
- package/components/ai-elements/inline-citation.js +314 -0
- package/components/ai-elements/message.d.ts +96 -0
- package/components/ai-elements/message.js +308 -0
- package/components/ai-elements/queue.d.ts +60 -0
- package/components/ai-elements/queue.js +193 -0
- package/components/ai-elements/reasoning.d.ts +26 -0
- package/components/ai-elements/reasoning.js +131 -0
- package/components/ai-elements/shimmer.d.ts +25 -0
- package/components/ai-elements/shimmer.js +44 -0
- package/components/ai-elements/speech-input.d.ts +16 -0
- package/components/ai-elements/speech-input.js +151 -0
- package/components/ai-elements/task-progress.d.ts +41 -0
- package/components/ai-elements/task-progress.js +211 -0
- package/components/ai-elements/task.d.ts +35 -0
- package/components/ai-elements/task.js +73 -0
- package/components/ai-elements/tool.d.ts +53 -0
- package/components/ai-elements/tool.js +116 -0
- package/components/ai-elements/voice.d.ts +74 -0
- package/components/ai-elements/voice.js +875 -0
- package/components/alert.d.ts +21 -0
- package/components/alert.js +76 -0
- package/components/answer.d.ts +984 -0
- package/components/answer.js +543 -0
- package/components/assistant-ui/action-bar.d.ts +3 -0
- package/components/assistant-ui/action-bar.js +57 -0
- package/components/assistant-ui/answer-tool-ui.d.ts +5 -0
- package/components/assistant-ui/answer-tool-ui.js +42 -0
- package/components/assistant-ui/attachment.d.ts +50 -0
- package/components/assistant-ui/attachment.js +353 -0
- package/components/assistant-ui/badge.d.ts +11 -0
- package/components/assistant-ui/badge.js +54 -0
- package/components/assistant-ui/branch-picker.d.ts +3 -0
- package/components/assistant-ui/branch-picker.js +36 -0
- package/components/assistant-ui/chain-of-thought.d.ts +46 -0
- package/components/assistant-ui/composer-add-context.d.ts +50 -0
- package/components/assistant-ui/composer-add-context.js +209 -0
- package/components/assistant-ui/composer-deep-research.d.ts +16 -0
- package/components/assistant-ui/composer-deep-research.js +38 -0
- package/components/assistant-ui/composer-harness.d.ts +18 -0
- package/components/assistant-ui/composer-harness.js +186 -0
- package/components/assistant-ui/composer-trigger-popover.d.ts +47 -0
- package/components/assistant-ui/composer-trigger-popover.js +147 -0
- package/components/assistant-ui/composer.d.ts +8 -0
- package/components/assistant-ui/composer.js +276 -0
- package/components/assistant-ui/directive-text.d.ts +16 -0
- package/components/assistant-ui/directive-text.js +40 -0
- package/components/assistant-ui/error.d.ts +6 -0
- package/components/assistant-ui/error.js +39 -0
- package/components/assistant-ui/file.d.ts +37 -0
- package/components/assistant-ui/file.js +159 -0
- package/components/assistant-ui/follow-up-suggestions.d.ts +7 -0
- package/components/assistant-ui/follow-up-suggestions.js +44 -0
- package/components/assistant-ui/image.d.ts +46 -0
- package/components/assistant-ui/image.js +351 -0
- package/components/assistant-ui/index.d.ts +28 -0
- package/components/assistant-ui/markdown-text.d.ts +1 -0
- package/components/assistant-ui/markdown-text.js +242 -0
- package/components/assistant-ui/message-timing.d.ts +25 -0
- package/components/assistant-ui/message-timing.js +56 -0
- package/components/assistant-ui/message.d.ts +4 -0
- package/components/assistant-ui/message.js +159 -0
- package/components/assistant-ui/primitives.d.ts +2 -0
- package/components/assistant-ui/quote.d.ts +37 -0
- package/components/assistant-ui/quote.js +150 -0
- package/components/assistant-ui/reasoning.d.ts +44 -0
- package/components/assistant-ui/reasoning.js +261 -0
- package/components/assistant-ui/selection-toolbar.d.ts +29 -0
- package/components/assistant-ui/selection-toolbar.js +91 -0
- package/components/assistant-ui/smart-message-text.d.ts +15 -0
- package/components/assistant-ui/smart-message-text.js +29 -0
- package/components/assistant-ui/sources.d.ts +17 -0
- package/components/assistant-ui/sources.js +121 -0
- package/components/assistant-ui/suggestions.d.ts +7 -0
- package/components/assistant-ui/suggestions.js +19 -0
- package/components/assistant-ui/thread-context.d.ts +37 -0
- package/components/assistant-ui/thread-context.js +8 -0
- package/components/assistant-ui/thread.d.ts +5 -0
- package/components/assistant-ui/thread.js +77 -0
- package/components/assistant-ui/tool-fallback.d.ts +36 -0
- package/components/assistant-ui/tool-fallback.js +428 -0
- package/components/assistant-ui/tool-group.d.ts +33 -0
- package/components/assistant-ui/tool-group.js +173 -0
- package/components/assistant-ui/tooltip-icon-button.d.ts +7 -0
- package/components/assistant-ui/tooltip-icon-button.js +31 -0
- package/components/assistant-ui/voice.d.ts +18 -0
- package/components/autocomplete.d.ts +18 -0
- package/components/autocomplete.js +162 -0
- package/components/avatar.d.ts +26 -0
- package/components/avatar.js +92 -0
- package/components/badge.d.ts +10 -0
- package/components/badge.js +83 -0
- package/components/brand-loader.d.ts +16 -0
- package/components/brand-loader.js +64 -0
- package/components/breadcrumbs.d.ts +8 -0
- package/components/breadcrumbs.js +58 -0
- package/components/button.d.ts +13 -0
- package/components/button.js +100 -0
- package/components/card.d.ts +19 -0
- package/components/card.js +82 -0
- package/components/carousel.d.ts +31 -0
- package/components/carousel.js +351 -0
- package/components/chart.d.ts +165 -0
- package/components/chart.js +841 -0
- package/components/checkbox.d.ts +13 -0
- package/components/checkbox.js +84 -0
- package/components/chip.d.ts +13 -0
- package/components/chip.js +112 -0
- package/components/collapsible.d.ts +5 -0
- package/components/collapsible.js +31 -0
- package/components/connector-card.d.ts +62 -0
- package/components/connector-card.js +154 -0
- package/components/divider.d.ts +23 -0
- package/components/divider.js +69 -0
- package/components/drawer.d.ts +45 -0
- package/components/drawer.js +234 -0
- package/components/dropdown.d.ts +33 -0
- package/components/dropdown.js +198 -0
- package/components/empty-state.d.ts +8 -0
- package/components/empty-state.js +30 -0
- package/components/field.d.ts +20 -0
- package/components/field.js +74 -0
- package/components/index.d.ts +56 -0
- package/components/index.js +444 -0
- package/components/input-field.d.ts +22 -0
- package/components/input-field.js +91 -0
- package/components/input.d.ts +8 -0
- package/components/input.js +61 -0
- package/components/kbd.d.ts +6 -0
- package/components/kbd.js +26 -0
- package/components/link.d.ts +14 -0
- package/components/link.js +72 -0
- package/components/modal.d.ts +18 -0
- package/components/modal.js +156 -0
- package/components/navbar.d.ts +15 -0
- package/components/navbar.js +68 -0
- package/components/number-field.d.ts +11 -0
- package/components/number-field.js +89 -0
- package/components/pagination.d.ts +28 -0
- package/components/pagination.js +179 -0
- package/components/panel.d.ts +14 -0
- package/components/panel.js +71 -0
- package/components/pixel-blast-svg.d.ts +22 -0
- package/components/pixel-blast-svg.js +154 -0
- package/components/popover.d.ts +20 -0
- package/components/popover.js +101 -0
- package/components/progress-circle.d.ts +11 -0
- package/components/progress-circle.js +75 -0
- package/components/progress.d.ts +22 -0
- package/components/progress.js +66 -0
- package/components/radio.d.ts +16 -0
- package/components/radio.js +101 -0
- package/components/segmented.d.ts +16 -0
- package/components/segmented.js +103 -0
- package/components/select.d.ts +28 -0
- package/components/select.js +180 -0
- package/components/selection-action-bar.d.ts +11 -0
- package/components/selection-action-bar.js +59 -0
- package/components/sidebar.d.ts +118 -0
- package/components/sidebar.js +375 -0
- package/components/skeleton.d.ts +6 -0
- package/components/skeleton.js +26 -0
- package/components/slider.d.ts +11 -0
- package/components/slider.js +62 -0
- package/components/spinner.d.ts +11 -0
- package/components/spinner.js +62 -0
- package/components/switch.d.ts +7 -0
- package/components/switch.js +61 -0
- package/components/table.d.ts +59 -0
- package/components/table.js +254 -0
- package/components/tabs.d.ts +29 -0
- package/components/tabs.js +371 -0
- package/components/textarea.d.ts +5 -0
- package/components/textarea.js +24 -0
- package/components/timeline.d.ts +7 -0
- package/components/timeline.js +47 -0
- package/components/toast.d.ts +74 -0
- package/components/toast.js +211 -0
- package/components/tooltip.d.ts +11 -0
- package/components/tooltip.js +143 -0
- package/components/tree.d.ts +42 -0
- package/components/tree.js +86 -0
- package/components/typography.d.ts +33 -0
- package/components/typography.js +65 -0
- package/components/ui/avatar.d.ts +11 -0
- package/components/ui/avatar.js +56 -0
- package/components/ui/button.d.ts +10 -0
- package/components/ui/button.js +57 -0
- package/components/ui/collapsible.d.ts +5 -0
- package/components/ui/collapsible.js +35 -0
- package/components/ui/dialog.d.ts +17 -0
- package/components/ui/dialog.js +93 -0
- package/components/ui/tabs.d.ts +22 -0
- package/components/ui/tooltip.d.ts +7 -0
- package/components/ui/tooltip.js +56 -0
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
- package/fonts.css +21 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.d.ts +8 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +62 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.d.ts +7 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +60 -0
- package/hooks/agents-ui/voice-visualizer-types.d.ts +9 -0
- package/lib/cn.d.ts +3 -0
- package/lib/cn.js +9 -0
- package/lib/icons.d.ts +378 -0
- package/lib/icons.js +119 -0
- package/lib/interactive.d.ts +24 -0
- package/lib/interactive.js +36 -0
- package/lib/motion.d.ts +58 -0
- package/lib/motion.js +70 -0
- package/lib/router.d.ts +3 -0
- package/lib/utils.d.ts +6 -0
- package/llms.txt +537 -0
- package/manifest.json +5085 -0
- package/package.json +60 -0
- package/styles.css +653 -0
- package/theme.css +273 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
import { cn as n } from "../lib/cn.js";
|
|
5
|
+
const s = l.forwardRef(
|
|
6
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ o(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
ref: r,
|
|
10
|
+
className: n(
|
|
11
|
+
// Static surface — delineated by color alone (elevation is reserved for
|
|
12
|
+
// actionable surfaces).
|
|
13
|
+
"flex min-h-0 min-w-0 flex-col overflow-hidden rounded-lg bg-card",
|
|
14
|
+
e
|
|
15
|
+
),
|
|
16
|
+
...a
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
s.displayName = "Panel";
|
|
21
|
+
const t = l.forwardRef(
|
|
22
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ o(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
ref: r,
|
|
26
|
+
className: n(
|
|
27
|
+
"flex h-[var(--panel-header-height)] shrink-0 items-center justify-between gap-2",
|
|
28
|
+
"border-b border-border bg-card px-3",
|
|
29
|
+
e
|
|
30
|
+
),
|
|
31
|
+
...a
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
t.displayName = "PanelHeader";
|
|
36
|
+
const d = l.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ o(
|
|
37
|
+
"h2",
|
|
38
|
+
{
|
|
39
|
+
ref: r,
|
|
40
|
+
className: n("flex min-w-0 items-center gap-2 truncate text-xs font-semibold text-foreground", e),
|
|
41
|
+
...a
|
|
42
|
+
}
|
|
43
|
+
));
|
|
44
|
+
d.displayName = "PanelTitle";
|
|
45
|
+
const i = l.forwardRef(
|
|
46
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ o("div", { ref: r, className: n("flex shrink-0 items-center gap-1", e), ...a })
|
|
47
|
+
);
|
|
48
|
+
i.displayName = "PanelToolbar";
|
|
49
|
+
const f = l.forwardRef(
|
|
50
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ o("div", { ref: r, className: n("min-h-0 flex-1 overflow-auto p-4", e), ...a })
|
|
51
|
+
);
|
|
52
|
+
f.displayName = "PanelBody";
|
|
53
|
+
const m = l.forwardRef(
|
|
54
|
+
({ className: e, ...a }, r) => /* @__PURE__ */ o(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
ref: r,
|
|
58
|
+
className: n("flex shrink-0 items-center gap-2 bg-surface/40 px-3 py-2", e),
|
|
59
|
+
...a
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
);
|
|
63
|
+
m.displayName = "PanelFooter";
|
|
64
|
+
export {
|
|
65
|
+
s as Panel,
|
|
66
|
+
f as PanelBody,
|
|
67
|
+
m as PanelFooter,
|
|
68
|
+
t as PanelHeader,
|
|
69
|
+
d as PanelTitle,
|
|
70
|
+
i as PanelToolbar
|
|
71
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type PixelBlastVariant = "square" | "circle" | "triangle" | "diamond" | "custom";
|
|
3
|
+
export interface PixelBlastSVGProps {
|
|
4
|
+
variant?: PixelBlastVariant;
|
|
5
|
+
color?: string;
|
|
6
|
+
pixelSize?: number;
|
|
7
|
+
speed?: number;
|
|
8
|
+
patternScale?: number;
|
|
9
|
+
patternDensity?: number;
|
|
10
|
+
pixelSizeJitter?: number;
|
|
11
|
+
enableRipples?: boolean;
|
|
12
|
+
liquid?: boolean;
|
|
13
|
+
toneAmount?: number;
|
|
14
|
+
edgeFade?: number;
|
|
15
|
+
transparent?: boolean;
|
|
16
|
+
backgroundColor?: string;
|
|
17
|
+
paused?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
export declare const PixelBlastSVG: React.ForwardRefExoticComponent<PixelBlastSVGProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { ditheringFragmentShader as g, getShaderColorFromString as M, ShaderFitOptions as N, DitheringTypes as L, DitheringShapes as m } from "@paper-design/shaders";
|
|
5
|
+
import { ShaderMount as F } from "@paper-design/shaders-react";
|
|
6
|
+
import { useReducedMotion as I } from "motion/react";
|
|
7
|
+
import { cn as P } from "../lib/cn.js";
|
|
8
|
+
const z = {
|
|
9
|
+
alpha: !0,
|
|
10
|
+
antialias: !1,
|
|
11
|
+
depth: !1,
|
|
12
|
+
powerPreference: "low-power",
|
|
13
|
+
preserveDrawingBuffer: !1
|
|
14
|
+
}, O = 1e6, B = `uniform float u_type;
|
|
15
|
+
uniform float u_patternDensity;
|
|
16
|
+
uniform float u_pixelSizeJitter;`, k = " float res = step(.5, shape + dithering);", b = ` vec2 triangleUV = fract(pxSizeUV);
|
|
17
|
+
vec2 triangleCell = floor(pxSizeUV);
|
|
18
|
+
float triangleFlip = mod(triangleCell.x + triangleCell.y, 2.0);
|
|
19
|
+
triangleUV.x = mix(triangleUV.x, 1.0 - triangleUV.x, triangleFlip);
|
|
20
|
+
|
|
21
|
+
float triangleJitter = mix(
|
|
22
|
+
1.0 - 0.18 * u_pixelSizeJitter,
|
|
23
|
+
1.0 + 0.22 * u_pixelSizeJitter,
|
|
24
|
+
hash21(triangleCell)
|
|
25
|
+
);
|
|
26
|
+
triangleUV = (triangleUV - 0.5) / triangleJitter + 0.5;
|
|
27
|
+
|
|
28
|
+
float triangleDiagonal = triangleUV.x + triangleUV.y;
|
|
29
|
+
float triangleMask = 1.0 - step(1.0, triangleDiagonal);
|
|
30
|
+
float densityThreshold = 0.5 - (u_patternDensity - 1.0) * 0.12;
|
|
31
|
+
float res = step(densityThreshold, shape + dithering) * triangleMask;`;
|
|
32
|
+
if (!g.includes("uniform float u_type;") || !g.includes(k))
|
|
33
|
+
throw new Error("The Paper dithering shader no longer exposes the expected cell output.");
|
|
34
|
+
const G = g.replace("uniform float u_type;", B).replace(k, b), d = (e) => Math.max(0, Math.min(1, e)), J = "#0a0a0b", W = "#ffffff";
|
|
35
|
+
function X(e, t) {
|
|
36
|
+
if (typeof document > "u") return t;
|
|
37
|
+
const r = (o, i = 0) => {
|
|
38
|
+
if (i > 4) return o;
|
|
39
|
+
const n = o.trim(), a = n.match(/^var\((--[\w-]+)(?:,\s*(.+))?\)$/);
|
|
40
|
+
if (!a) return n;
|
|
41
|
+
const s = getComputedStyle(document.documentElement).getPropertyValue(a[1]).trim();
|
|
42
|
+
return s ? r(s, i + 1) : a[2] ? r(a[2], i + 1) : t;
|
|
43
|
+
};
|
|
44
|
+
return r(e) || t;
|
|
45
|
+
}
|
|
46
|
+
function E(e, t) {
|
|
47
|
+
const [r, o] = c.useState(
|
|
48
|
+
() => e.startsWith("var(") ? t : e
|
|
49
|
+
);
|
|
50
|
+
return c.useEffect(() => {
|
|
51
|
+
o(X(e, t));
|
|
52
|
+
}, [t, e]), r;
|
|
53
|
+
}
|
|
54
|
+
const $ = c.forwardRef(
|
|
55
|
+
({
|
|
56
|
+
variant: e = "custom",
|
|
57
|
+
color: t = "var(--color-ink-950)",
|
|
58
|
+
pixelSize: r = 7,
|
|
59
|
+
speed: o = 3,
|
|
60
|
+
patternScale: i = 3,
|
|
61
|
+
patternDensity: n = 1.8,
|
|
62
|
+
pixelSizeJitter: a = 0.5,
|
|
63
|
+
enableRipples: s = !1,
|
|
64
|
+
liquid: p = !1,
|
|
65
|
+
toneAmount: h = 0,
|
|
66
|
+
edgeFade: R = 0.25,
|
|
67
|
+
transparent: f = !0,
|
|
68
|
+
backgroundColor: _ = "var(--color-background)",
|
|
69
|
+
paused: x = !1,
|
|
70
|
+
className: V,
|
|
71
|
+
style: D
|
|
72
|
+
}, w) => {
|
|
73
|
+
const S = I(), U = E(t, J), C = E(
|
|
74
|
+
_,
|
|
75
|
+
W
|
|
76
|
+
), l = d(R) * 100, T = `linear-gradient(to right, transparent 0%, black ${l}%, black ${100 - l}%, transparent 100%)`, v = `linear-gradient(to bottom, transparent 0%, black ${l}%, black ${100 - l}%, transparent 100%)`, A = c.useMemo(() => {
|
|
77
|
+
const y = M(U);
|
|
78
|
+
return y[3] *= 1 - d(h), {
|
|
79
|
+
u_colorBack: f ? [0, 0, 0, 0] : M(C),
|
|
80
|
+
u_colorFront: y,
|
|
81
|
+
u_shape: s ? m.ripple : p ? m.warp : m.simplex,
|
|
82
|
+
u_type: L["4x4"],
|
|
83
|
+
u_pxSize: Math.max(1, r),
|
|
84
|
+
u_patternDensity: Math.max(0.1, n),
|
|
85
|
+
u_pixelSizeJitter: d(a),
|
|
86
|
+
u_fit: N.none,
|
|
87
|
+
u_scale: Math.max(0.01, i),
|
|
88
|
+
u_rotation: 0,
|
|
89
|
+
u_offsetX: 0,
|
|
90
|
+
u_offsetY: 0,
|
|
91
|
+
u_originX: 0.5,
|
|
92
|
+
u_originY: 0.5,
|
|
93
|
+
u_worldWidth: 0,
|
|
94
|
+
u_worldHeight: 0
|
|
95
|
+
};
|
|
96
|
+
}, [
|
|
97
|
+
s,
|
|
98
|
+
p,
|
|
99
|
+
n,
|
|
100
|
+
i,
|
|
101
|
+
r,
|
|
102
|
+
a,
|
|
103
|
+
C,
|
|
104
|
+
U,
|
|
105
|
+
h,
|
|
106
|
+
f
|
|
107
|
+
]);
|
|
108
|
+
return /* @__PURE__ */ u(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
ref: w,
|
|
112
|
+
"aria-hidden": !0,
|
|
113
|
+
"data-shader-paused": x || S ? "true" : "false",
|
|
114
|
+
className: P("pixel-blast-svg", V),
|
|
115
|
+
style: {
|
|
116
|
+
...D,
|
|
117
|
+
background: f ? "transparent" : _
|
|
118
|
+
},
|
|
119
|
+
children: /* @__PURE__ */ u(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
className: "size-full",
|
|
123
|
+
style: { WebkitMaskImage: T, maskImage: T },
|
|
124
|
+
children: /* @__PURE__ */ u(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
className: "size-full",
|
|
128
|
+
style: { WebkitMaskImage: v, maskImage: v },
|
|
129
|
+
children: /* @__PURE__ */ u(
|
|
130
|
+
F,
|
|
131
|
+
{
|
|
132
|
+
className: "size-full",
|
|
133
|
+
width: "100%",
|
|
134
|
+
height: "100%",
|
|
135
|
+
fragmentShader: G,
|
|
136
|
+
uniforms: A,
|
|
137
|
+
speed: x || S ? 0 : o,
|
|
138
|
+
minPixelRatio: 1,
|
|
139
|
+
maxPixelCount: O,
|
|
140
|
+
webGlContextAttributes: z
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
$.displayName = "PixelBlastSVG";
|
|
152
|
+
export {
|
|
153
|
+
$ as PixelBlastSVG
|
|
154
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface PopoverProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function Popover({ children, defaultOpen }: PopoverProps): React.JSX.Element;
|
|
7
|
+
export interface PopoverTriggerProps {
|
|
8
|
+
children: React.ReactElement;
|
|
9
|
+
}
|
|
10
|
+
export declare function PopoverTrigger({ children }: PopoverTriggerProps): React.ReactElement<{
|
|
11
|
+
ref?: React.Ref<HTMLElement>;
|
|
12
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
13
|
+
"aria-expanded"?: boolean;
|
|
14
|
+
"aria-haspopup"?: boolean;
|
|
15
|
+
}, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
export interface PopoverContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
17
|
+
align?: "start" | "center" | "end";
|
|
18
|
+
sideOffset?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function PopoverContent({ className, align, sideOffset, children, ...props }: PopoverContentProps): React.ReactPortal;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { createPortal as P } from "react-dom";
|
|
5
|
+
import { MotionConfig as b, AnimatePresence as C, motion as y } from "motion/react";
|
|
6
|
+
import { cn as L } from "../lib/cn.js";
|
|
7
|
+
import { floatVariants as R } from "../lib/motion.js";
|
|
8
|
+
const k = {
|
|
9
|
+
start: "top left",
|
|
10
|
+
center: "top",
|
|
11
|
+
end: "top right"
|
|
12
|
+
}, h = n.createContext(null);
|
|
13
|
+
function x(r) {
|
|
14
|
+
const e = n.useContext(h);
|
|
15
|
+
if (!e)
|
|
16
|
+
throw new Error(`${r} must be used within a <Popover>.`);
|
|
17
|
+
return e;
|
|
18
|
+
}
|
|
19
|
+
function M({ children: r, defaultOpen: e = !1 }) {
|
|
20
|
+
const [d, l] = n.useState(e), u = n.useRef(null);
|
|
21
|
+
return /* @__PURE__ */ g(h.Provider, { value: { open: d, setOpen: l, triggerRef: u }, children: r });
|
|
22
|
+
}
|
|
23
|
+
function S({ children: r }) {
|
|
24
|
+
const { open: e, setOpen: d, triggerRef: l } = x("PopoverTrigger"), u = r;
|
|
25
|
+
return n.cloneElement(u, {
|
|
26
|
+
ref: l,
|
|
27
|
+
"aria-expanded": e,
|
|
28
|
+
"aria-haspopup": !0,
|
|
29
|
+
onClick: (i) => {
|
|
30
|
+
var f, s;
|
|
31
|
+
(s = (f = u.props).onClick) == null || s.call(f, i), d(!e);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function T({
|
|
36
|
+
className: r,
|
|
37
|
+
align: e = "start",
|
|
38
|
+
sideOffset: d = 8,
|
|
39
|
+
children: l,
|
|
40
|
+
...u
|
|
41
|
+
}) {
|
|
42
|
+
const { open: i, setOpen: f, triggerRef: s } = x("PopoverContent"), w = n.useRef(null), [c, E] = n.useState(null);
|
|
43
|
+
return n.useLayoutEffect(() => {
|
|
44
|
+
if (!i) return;
|
|
45
|
+
const p = s.current;
|
|
46
|
+
if (!p) return;
|
|
47
|
+
const o = () => {
|
|
48
|
+
var v;
|
|
49
|
+
const t = p.getBoundingClientRect(), m = ((v = w.current) == null ? void 0 : v.offsetWidth) ?? 0;
|
|
50
|
+
let a = t.left;
|
|
51
|
+
e === "center" ? a = t.left + t.width / 2 - m / 2 : e === "end" && (a = t.right - m), E({ top: t.bottom + d, left: a });
|
|
52
|
+
};
|
|
53
|
+
return o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
|
|
54
|
+
window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
|
|
55
|
+
};
|
|
56
|
+
}, [i, e, d, s]), n.useEffect(() => {
|
|
57
|
+
if (!i) return;
|
|
58
|
+
const p = (t) => {
|
|
59
|
+
t.key === "Escape" && f(!1);
|
|
60
|
+
}, o = (t) => {
|
|
61
|
+
var a, v;
|
|
62
|
+
const m = t.target;
|
|
63
|
+
(a = w.current) != null && a.contains(m) || (v = s.current) != null && v.contains(m) || f(!1);
|
|
64
|
+
};
|
|
65
|
+
return document.addEventListener("keydown", p), document.addEventListener("pointerdown", o), () => {
|
|
66
|
+
document.removeEventListener("keydown", p), document.removeEventListener("pointerdown", o);
|
|
67
|
+
};
|
|
68
|
+
}, [i, f, s]), P(
|
|
69
|
+
/* @__PURE__ */ g(b, { reducedMotion: "user", children: /* @__PURE__ */ g(C, { children: i && /* @__PURE__ */ g(
|
|
70
|
+
y.div,
|
|
71
|
+
{
|
|
72
|
+
ref: w,
|
|
73
|
+
role: "dialog",
|
|
74
|
+
variants: R,
|
|
75
|
+
initial: "hidden",
|
|
76
|
+
animate: "visible",
|
|
77
|
+
exit: "hidden",
|
|
78
|
+
style: {
|
|
79
|
+
position: "fixed",
|
|
80
|
+
top: (c == null ? void 0 : c.top) ?? 0,
|
|
81
|
+
left: (c == null ? void 0 : c.left) ?? 0,
|
|
82
|
+
visibility: c ? "visible" : "hidden",
|
|
83
|
+
transformOrigin: k[e]
|
|
84
|
+
},
|
|
85
|
+
className: L(
|
|
86
|
+
"z-50 min-w-44 rounded-lg border border-border bg-elevated p-3",
|
|
87
|
+
"text-xs text-foreground shadow-elevation",
|
|
88
|
+
r
|
|
89
|
+
),
|
|
90
|
+
...u,
|
|
91
|
+
children: l
|
|
92
|
+
}
|
|
93
|
+
) }) }),
|
|
94
|
+
document.body
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
M as Popover,
|
|
99
|
+
T as PopoverContent,
|
|
100
|
+
S as PopoverTrigger
|
|
101
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ProgressCircleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
value?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
/** Diameter in pixels. */
|
|
6
|
+
size?: number;
|
|
7
|
+
strokeWidth?: number;
|
|
8
|
+
isIndeterminate?: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const ProgressCircle: React.ForwardRefExoticComponent<ProgressCircleProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as c, jsxs as g } from "react/jsx-runtime";
|
|
3
|
+
import * as x from "react";
|
|
4
|
+
import { cn as l } from "../lib/cn.js";
|
|
5
|
+
const w = x.forwardRef(
|
|
6
|
+
({
|
|
7
|
+
className: f,
|
|
8
|
+
value: m = 0,
|
|
9
|
+
max: a = 100,
|
|
10
|
+
size: r = 40,
|
|
11
|
+
strokeWidth: o = 4,
|
|
12
|
+
isIndeterminate: n = !1,
|
|
13
|
+
label: d,
|
|
14
|
+
...u
|
|
15
|
+
}, h) => {
|
|
16
|
+
const i = Math.min(Math.max(m, 0), a), p = a > 0 ? i / a : 0, t = (r - o) / 2, s = 2 * Math.PI * t, v = n ? s * 0.75 : s * (1 - p), e = r / 2;
|
|
17
|
+
return /* @__PURE__ */ c(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
ref: h,
|
|
21
|
+
role: "progressbar",
|
|
22
|
+
"aria-label": d,
|
|
23
|
+
"aria-valuemin": 0,
|
|
24
|
+
"aria-valuemax": a,
|
|
25
|
+
"aria-valuenow": n ? void 0 : i,
|
|
26
|
+
className: l("inline-flex", f),
|
|
27
|
+
style: { width: r, height: r },
|
|
28
|
+
...u,
|
|
29
|
+
children: /* @__PURE__ */ g(
|
|
30
|
+
"svg",
|
|
31
|
+
{
|
|
32
|
+
width: r,
|
|
33
|
+
height: r,
|
|
34
|
+
viewBox: `0 0 ${r} ${r}`,
|
|
35
|
+
className: l(
|
|
36
|
+
"-rotate-90",
|
|
37
|
+
n && "animate-[ads-spin_var(--duration-spin)_linear_infinite]"
|
|
38
|
+
),
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ c(
|
|
41
|
+
"circle",
|
|
42
|
+
{
|
|
43
|
+
className: "stroke-muted",
|
|
44
|
+
fill: "none",
|
|
45
|
+
cx: e,
|
|
46
|
+
cy: e,
|
|
47
|
+
r: t,
|
|
48
|
+
strokeWidth: o
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ c(
|
|
52
|
+
"circle",
|
|
53
|
+
{
|
|
54
|
+
className: "stroke-brand transition-[stroke-dashoffset] duration-(--duration-normal) ease-out motion-reduce:transition-none",
|
|
55
|
+
fill: "none",
|
|
56
|
+
cx: e,
|
|
57
|
+
cy: e,
|
|
58
|
+
r: t,
|
|
59
|
+
strokeWidth: o,
|
|
60
|
+
strokeLinecap: "round",
|
|
61
|
+
strokeDasharray: s,
|
|
62
|
+
strokeDashoffset: v
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
w.displayName = "ProgressCircle";
|
|
73
|
+
export {
|
|
74
|
+
w as ProgressCircle
|
|
75
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const trackSizes: {
|
|
3
|
+
readonly sm: "h-1.5";
|
|
4
|
+
readonly md: "h-2";
|
|
5
|
+
};
|
|
6
|
+
declare const fillColors: {
|
|
7
|
+
readonly primary: "bg-brand";
|
|
8
|
+
readonly success: "bg-success";
|
|
9
|
+
readonly warning: "bg-warning";
|
|
10
|
+
readonly danger: "bg-danger";
|
|
11
|
+
readonly info: "bg-info";
|
|
12
|
+
};
|
|
13
|
+
export interface ProgressProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color"> {
|
|
14
|
+
value?: number;
|
|
15
|
+
max?: number;
|
|
16
|
+
isIndeterminate?: boolean;
|
|
17
|
+
size?: keyof typeof trackSizes;
|
|
18
|
+
color?: keyof typeof fillColors;
|
|
19
|
+
label?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import * as g from "react";
|
|
4
|
+
import { cn as a } from "../lib/cn.js";
|
|
5
|
+
const p = {
|
|
6
|
+
sm: "h-1.5",
|
|
7
|
+
md: "h-2"
|
|
8
|
+
}, s = {
|
|
9
|
+
primary: "bg-brand",
|
|
10
|
+
success: "bg-success",
|
|
11
|
+
warning: "bg-warning",
|
|
12
|
+
danger: "bg-danger",
|
|
13
|
+
info: "bg-info"
|
|
14
|
+
}, b = g.forwardRef(
|
|
15
|
+
({
|
|
16
|
+
className: l,
|
|
17
|
+
value: t = 0,
|
|
18
|
+
max: e = 100,
|
|
19
|
+
isIndeterminate: n = !1,
|
|
20
|
+
size: d = "md",
|
|
21
|
+
color: i = "primary",
|
|
22
|
+
label: m,
|
|
23
|
+
...u
|
|
24
|
+
}, c) => {
|
|
25
|
+
const o = Math.min(Math.max(t, 0), e), f = e > 0 ? o / e * 100 : 0;
|
|
26
|
+
return /* @__PURE__ */ r(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref: c,
|
|
30
|
+
role: "progressbar",
|
|
31
|
+
"aria-label": m,
|
|
32
|
+
"aria-valuemin": 0,
|
|
33
|
+
"aria-valuemax": e,
|
|
34
|
+
"aria-valuenow": n ? void 0 : o,
|
|
35
|
+
className: a(
|
|
36
|
+
"relative w-full overflow-hidden rounded-full bg-muted",
|
|
37
|
+
p[d],
|
|
38
|
+
l
|
|
39
|
+
),
|
|
40
|
+
...u,
|
|
41
|
+
children: n ? /* @__PURE__ */ r(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: a(
|
|
45
|
+
"absolute inset-y-0 left-0 w-2/5 rounded-full animate-[ads-indeterminate_var(--duration-pulse)_linear_infinite] motion-reduce:animate-none",
|
|
46
|
+
s[i]
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ r(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
className: a(
|
|
53
|
+
"h-full w-full origin-left rounded-full transition-transform duration-(--duration-normal) ease-out motion-reduce:transition-none",
|
|
54
|
+
s[i]
|
|
55
|
+
),
|
|
56
|
+
style: { transform: `scaleX(${f / 100})` }
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
b.displayName = "Progress";
|
|
64
|
+
export {
|
|
65
|
+
b as Progress
|
|
66
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
3
|
+
name: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
error?: React.ReactNode;
|
|
9
|
+
orientation?: "vertical" | "horizontal";
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "onChange"> {
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as b } from "react/jsx-runtime";
|
|
3
|
+
import * as i from "react";
|
|
4
|
+
import { cn as p } from "../lib/cn.js";
|
|
5
|
+
import { Field as x } from "./field.js";
|
|
6
|
+
const f = i.createContext(null), y = i.forwardRef(
|
|
7
|
+
({
|
|
8
|
+
className: l,
|
|
9
|
+
name: a,
|
|
10
|
+
value: o,
|
|
11
|
+
onChange: n,
|
|
12
|
+
label: c,
|
|
13
|
+
description: u,
|
|
14
|
+
error: e,
|
|
15
|
+
orientation: s = "vertical",
|
|
16
|
+
disabled: t,
|
|
17
|
+
children: d,
|
|
18
|
+
...m
|
|
19
|
+
}, g) => {
|
|
20
|
+
const h = i.useMemo(
|
|
21
|
+
() => ({ name: a, value: o, onValueChange: n, disabled: t }),
|
|
22
|
+
[a, o, n, t]
|
|
23
|
+
);
|
|
24
|
+
return /* @__PURE__ */ r(
|
|
25
|
+
x,
|
|
26
|
+
{
|
|
27
|
+
ref: g,
|
|
28
|
+
label: c,
|
|
29
|
+
description: u,
|
|
30
|
+
error: e,
|
|
31
|
+
role: "radiogroup",
|
|
32
|
+
className: l,
|
|
33
|
+
...m,
|
|
34
|
+
children: /* @__PURE__ */ r(f.Provider, { value: h, children: /* @__PURE__ */ r(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
className: p(
|
|
38
|
+
"flex gap-3",
|
|
39
|
+
s === "vertical" ? "flex-col" : "flex-row flex-wrap"
|
|
40
|
+
),
|
|
41
|
+
children: d
|
|
42
|
+
}
|
|
43
|
+
) })
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
y.displayName = "RadioGroup";
|
|
49
|
+
const R = i.forwardRef(
|
|
50
|
+
({ className: l, children: a, value: o, disabled: n, ...c }, u) => {
|
|
51
|
+
const e = i.useContext(f), s = n || (e == null ? void 0 : e.disabled);
|
|
52
|
+
return /* @__PURE__ */ b(
|
|
53
|
+
"label",
|
|
54
|
+
{
|
|
55
|
+
className: p(
|
|
56
|
+
"group inline-flex items-center gap-2 text-xs text-foreground select-none",
|
|
57
|
+
s ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
58
|
+
l
|
|
59
|
+
),
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ r(
|
|
62
|
+
"input",
|
|
63
|
+
{
|
|
64
|
+
ref: u,
|
|
65
|
+
type: "radio",
|
|
66
|
+
name: e == null ? void 0 : e.name,
|
|
67
|
+
value: o,
|
|
68
|
+
checked: e ? e.value === o : void 0,
|
|
69
|
+
disabled: s,
|
|
70
|
+
onChange: (t) => {
|
|
71
|
+
var d;
|
|
72
|
+
t.target.checked && ((d = e == null ? void 0 : e.onValueChange) == null || d.call(e, o));
|
|
73
|
+
},
|
|
74
|
+
className: "peer sr-only",
|
|
75
|
+
...c
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ r(
|
|
79
|
+
"span",
|
|
80
|
+
{
|
|
81
|
+
"aria-hidden": !0,
|
|
82
|
+
className: p(
|
|
83
|
+
"flex size-4.5 shrink-0 items-center justify-center rounded-full border border-input bg-elevated",
|
|
84
|
+
"transition-[border-color,box-shadow] duration-(--duration-fast) ease-out",
|
|
85
|
+
"peer-checked:border-brand",
|
|
86
|
+
"peer-focus-visible:ring-3 peer-focus-visible:ring-ring"
|
|
87
|
+
),
|
|
88
|
+
children: /* @__PURE__ */ r("span", { className: "size-2 scale-90 rounded-full bg-brand opacity-0 transition-[opacity,transform] duration-(--duration-fast) ease-out group-has-[:checked]:scale-100 group-has-[:checked]:opacity-100 motion-reduce:transition-none" })
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
a && /* @__PURE__ */ r("span", { children: a })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
R.displayName = "Radio";
|
|
98
|
+
export {
|
|
99
|
+
R as Radio,
|
|
100
|
+
y as RadioGroup
|
|
101
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const segmentedListVariants: (props?: ({
|
|
4
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface SegmentedOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "role">, VariantProps<typeof segmentedListVariants> {
|
|
11
|
+
options: SegmentedOption[];
|
|
12
|
+
value: string;
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export {};
|