@actioneer/ads 0.7.0 → 1.0.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 (57) hide show
  1. package/DESIGN.md +597 -0
  2. package/components/ai-elements/agent-trace.js +1 -1
  3. package/components/alert.js +3 -3
  4. package/components/answer.js +2 -2
  5. package/components/assistant-ui/action-bar.js +1 -1
  6. package/components/assistant-ui/attachment.js +12 -12
  7. package/components/assistant-ui/badge.js +18 -18
  8. package/components/assistant-ui/composer-harness.js +5 -4
  9. package/components/assistant-ui/composer-trigger-popover.js +9 -9
  10. package/components/assistant-ui/composer.js +32 -32
  11. package/components/assistant-ui/directive-text.js +5 -5
  12. package/components/assistant-ui/image.js +61 -61
  13. package/components/assistant-ui/markdown-text.js +7 -7
  14. package/components/assistant-ui/message-timing.js +1 -1
  15. package/components/assistant-ui/selection-toolbar.js +7 -7
  16. package/components/assistant-ui/sources.js +1 -1
  17. package/components/avatar.d.ts +1 -1
  18. package/components/avatar.js +35 -35
  19. package/components/body-page-header.d.ts +1 -1
  20. package/components/body-page-header.js +1 -1
  21. package/components/chart.js +1 -1
  22. package/components/chip.js +8 -8
  23. package/components/divider.js +25 -25
  24. package/components/drawer.d.ts +2 -14
  25. package/components/drawer.js +103 -109
  26. package/components/field.js +9 -9
  27. package/components/index.d.ts +1 -0
  28. package/components/index.js +466 -465
  29. package/components/infinite-canvas.js +1 -1
  30. package/components/input.js +21 -19
  31. package/components/modal.js +26 -26
  32. package/components/page-body.js +6 -6
  33. package/components/page-header.js +1 -1
  34. package/components/pagination.js +1 -1
  35. package/components/pixel-blast-svg.js +71 -73
  36. package/components/search-disclosure.d.ts +18 -0
  37. package/components/search-disclosure.js +106 -0
  38. package/components/sidebar.js +60 -53
  39. package/components/table.d.ts +1 -1
  40. package/components/table.js +73 -74
  41. package/components/tabs.js +68 -59
  42. package/components/tree.js +17 -17
  43. package/components/typography.d.ts +1 -1
  44. package/components/typography.js +1 -1
  45. package/components/ui/button.d.ts +1 -1
  46. package/components/ui/button.js +4 -4
  47. package/components/ui/dialog.js +23 -23
  48. package/components/viz-charts.js +36 -36
  49. package/demo/components/add-to-artifact.js +3 -2
  50. package/lib/cn.js +7 -7
  51. package/lib/icons.d.ts +4 -0
  52. package/lib/icons.js +105 -104
  53. package/llms.txt +52 -49
  54. package/manifest.json +258 -235
  55. package/package.json +2 -1
  56. package/styles.css +171 -153
  57. package/theme.css +162 -140
@@ -7,7 +7,7 @@ import "@xyflow/react/dist/style.css";
7
7
  import { cn as W } from "../lib/cn.js";
8
8
  import { Minus as q, Plus as J, Maximize as Q, Magnet as X } from "../lib/icons.js";
9
9
  import { Button as a } from "./button.js";
10
- const x = 16, Y = 1.2, $ = [x, x], ee = 1.4, w = 18, oe = 2, te = [8, 4], re = 11, I = 150, ae = 200, ne = 0.28, R = "var(--canvas-edge)";
10
+ const x = 16, Y = 1.2, $ = [x, x], ee = 1.4, w = 18, oe = 2, te = [8, 4], re = "var(--text-xs)", I = 150, ae = 200, ne = 0.28, R = "var(--canvas-edge)";
11
11
  function v(o) {
12
12
  return typeof window > "u" || !window.matchMedia ? o : window.matchMedia("(prefers-reduced-motion: reduce)").matches ? 0 : o;
13
13
  }
@@ -1,62 +1,64 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as v } from "react/jsx-runtime";
3
- import * as d from "react";
4
- import { cn as x } from "../lib/cn.js";
5
- import { EyeOff as h, Eye as w } from "../lib/icons.js";
3
+ import * as l from "react";
4
+ import { cn as h } from "../lib/cn.js";
5
+ import { EyeOff as x, Eye as w } from "../lib/icons.js";
6
6
  import { inputBaseClass as b } from "./field.js";
7
- const y = {
7
+ const N = {
8
8
  sm: "h-8 rounded-sm",
9
9
  md: "h-8 rounded-md",
10
10
  lg: "h-11 rounded-md"
11
- }, N = d.forwardRef(
11
+ }, y = l.forwardRef(
12
12
  ({
13
- className: l,
13
+ className: d,
14
14
  size: a = "md",
15
15
  startContent: o,
16
16
  endContent: u,
17
17
  isInvalid: f,
18
- type: i,
18
+ type: s,
19
19
  ...c
20
20
  }, m) => {
21
- const [s, p] = d.useState(!1), t = i === "password", r = u ?? (t ? /* @__PURE__ */ e(
21
+ const [i, p] = l.useState(!1), n = s === "password", r = u ?? (n ? /* @__PURE__ */ e(
22
22
  "button",
23
23
  {
24
24
  type: "button",
25
- "aria-label": s ? "Hide password" : "Show password",
25
+ "aria-label": i ? "Hide password" : "Show password",
26
26
  onClick: () => p((g) => !g),
27
27
  className: "-mr-1 flex items-center rounded-xs p-1 outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring",
28
- children: s ? /* @__PURE__ */ e(h, {}) : /* @__PURE__ */ e(w, {})
28
+ children: i ? /* @__PURE__ */ e(x, {}) : /* @__PURE__ */ e(w, {})
29
29
  }
30
- ) : void 0), n = /* @__PURE__ */ e(
30
+ ) : void 0), t = /* @__PURE__ */ e(
31
31
  "input",
32
32
  {
33
33
  ref: m,
34
- type: t && s ? "text" : i,
34
+ type: n && i ? "text" : s,
35
35
  "aria-invalid": f || void 0,
36
- className: x(
36
+ className: h(
37
37
  b,
38
+ // Search controls are flat, stroke-only surfaces with regular copy.
39
+ s === "search" && "font-normal [--glow-inset:none]",
38
40
  "leading-none",
39
- y[a],
41
+ N[a],
40
42
  o && "pl-9",
41
43
  r && "pr-9",
42
- l
44
+ d
43
45
  ),
44
46
  ...c
45
47
  }
46
48
  );
47
- return !o && !r ? n : (
49
+ return !o && !r ? t : (
48
50
  // group/field: adornment icons follow the field's interactive states —
49
51
  // muted at rest, readable on hover, and G12 green while the
50
52
  // control is focused. Important keeps focus green while still hovered.
51
53
  /* @__PURE__ */ v("div", { className: "group/field relative w-full", children: [
52
54
  o && /* @__PURE__ */ e("span", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-g12! [&_svg]:size-4", children: o }),
53
- n,
55
+ t,
54
56
  r && /* @__PURE__ */ e("span", { className: "absolute inset-y-0 right-0 flex items-center pr-3 text-muted-foreground transition-colors duration-150 group-hover/field:text-foreground group-focus-within/field:text-g12! [&_svg]:size-4", children: r })
55
57
  ] })
56
58
  );
57
59
  }
58
60
  );
59
- N.displayName = "Input";
61
+ y.displayName = "Input";
60
62
  export {
61
- N as Input
63
+ y as Input
62
64
  };
@@ -2,7 +2,7 @@
2
2
  import { jsx as t, jsxs as y } from "react/jsx-runtime";
3
3
  import * as r from "react";
4
4
  import { MotionConfig as T, AnimatePresence as B, motion as g } from "motion/react";
5
- import { Dialog as c } from "radix-ui";
5
+ import { Dialog as m } from "radix-ui";
6
6
  import { cva as H } from "class-variance-authority";
7
7
  import { Close as S } from "../lib/icons.js";
8
8
  import { cn as n } from "../lib/cn.js";
@@ -11,7 +11,7 @@ const A = H(
11
11
  [
12
12
  "pointer-events-auto relative flex w-full min-w-0 flex-col overflow-hidden",
13
13
  "max-h-[calc(100dvh-2rem)] bg-elevated text-foreground outline-none",
14
- "rounded-xl shadow-[0_2px_4px_-1px_rgb(0_0_0/0.34),0_16px_32px_-8px_rgb(0_0_0/0.46)]",
14
+ "rounded-xl shadow-400",
15
15
  "max-sm:max-h-[calc(100dvh-1rem)] max-sm:rounded-lg"
16
16
  ],
17
17
  {
@@ -52,17 +52,17 @@ function ee({
52
52
  className: l,
53
53
  children: d,
54
54
  showCloseButton: C = !0,
55
- closeOnOverlayClick: _ = !0,
56
- closeOnEscape: D = !0,
57
- container: z,
58
- initialFocusRef: m,
59
- onAfterClose: I,
55
+ closeOnOverlayClick: D = !0,
56
+ closeOnEscape: z = !0,
57
+ container: I,
58
+ initialFocusRef: c,
59
+ onAfterClose: R,
60
60
  onAfterOpen: u,
61
- overlayClassName: R,
62
- viewportClassName: j,
61
+ overlayClassName: j,
62
+ viewportClassName: V,
63
63
  "aria-label": v,
64
- "aria-labelledby": k,
65
- "aria-describedby": V
64
+ "aria-labelledby": _,
65
+ "aria-describedby": k
66
66
  }) {
67
67
  const b = r.useRef(null), f = r.useId(), p = r.useId(), P = r.useMemo(
68
68
  () => M(d),
@@ -71,8 +71,8 @@ function ee({
71
71
  () => ({ titleId: f, descriptionId: p }),
72
72
  [p, f]
73
73
  );
74
- return /* @__PURE__ */ t(c.Root, { open: o, onOpenChange: e, children: /* @__PURE__ */ t(x.Provider, { value: E, children: /* @__PURE__ */ t(T, { reducedMotion: "user", children: /* @__PURE__ */ t(B, { initial: !1, onExitComplete: I, children: o ? /* @__PURE__ */ y(c.Portal, { forceMount: !0, container: z ?? void 0, children: [
75
- /* @__PURE__ */ t(c.Overlay, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ t(
74
+ return /* @__PURE__ */ t(m.Root, { open: o, onOpenChange: e, children: /* @__PURE__ */ t(x.Provider, { value: E, children: /* @__PURE__ */ t(T, { reducedMotion: "user", children: /* @__PURE__ */ t(B, { initial: !1, onExitComplete: R, children: o ? /* @__PURE__ */ y(m.Portal, { forceMount: !0, container: I ?? void 0, children: [
75
+ /* @__PURE__ */ t(m.Overlay, { forceMount: !0, asChild: !0, children: /* @__PURE__ */ t(
76
76
  g.div,
77
77
  {
78
78
  "data-slot": "modal-overlay",
@@ -81,8 +81,8 @@ function ee({
81
81
  animate: "visible",
82
82
  exit: "hidden",
83
83
  className: n(
84
- "fixed inset-0 z-50 bg-black/50",
85
- R
84
+ "fixed inset-0 z-50 bg-overlay",
85
+ j
86
86
  )
87
87
  },
88
88
  "modal-overlay"
@@ -95,25 +95,25 @@ function ee({
95
95
  "pointer-events-none fixed inset-0 z-50 grid overflow-y-auto p-4",
96
96
  i === "top" ? "place-items-start justify-items-center pt-[max(1rem,8dvh)]" : "place-items-center",
97
97
  "max-sm:p-2",
98
- j
98
+ V
99
99
  ),
100
100
  children: /* @__PURE__ */ t(
101
- c.Content,
101
+ m.Content,
102
102
  {
103
103
  forceMount: !0,
104
104
  asChild: !0,
105
105
  "aria-label": v,
106
- "aria-labelledby": k ?? (v ? void 0 : f),
107
- "aria-describedby": V ?? (P ? p : void 0),
106
+ "aria-labelledby": _ ?? (v ? void 0 : f),
107
+ "aria-describedby": k ?? (P ? p : void 0),
108
108
  onEscapeKeyDown: (s) => {
109
- D || s.preventDefault();
109
+ z || s.preventDefault();
110
110
  },
111
111
  onPointerDownOutside: (s) => {
112
- _ || s.preventDefault();
112
+ D || s.preventDefault();
113
113
  },
114
114
  onOpenAutoFocus: (s) => {
115
115
  var h;
116
- s.preventDefault(), (h = (m == null ? void 0 : m.current) ?? b.current) == null || h.focus();
116
+ s.preventDefault(), (h = (c == null ? void 0 : c.current) ?? b.current) == null || h.focus();
117
117
  },
118
118
  onFocusOutside: (s) => s.preventDefault(),
119
119
  children: /* @__PURE__ */ y(
@@ -146,7 +146,7 @@ function ee({
146
146
  )
147
147
  ] }) : null }) }) }) });
148
148
  }
149
- const w = r.forwardRef(({ className: o, children: e, "aria-label": a = "Close", ...i }, l) => /* @__PURE__ */ t(c.Close, { asChild: !0, children: /* @__PURE__ */ t(
149
+ const w = r.forwardRef(({ className: o, children: e, "aria-label": a = "Close", ...i }, l) => /* @__PURE__ */ t(m.Close, { asChild: !0, children: /* @__PURE__ */ t(
150
150
  "button",
151
151
  {
152
152
  ref: l,
@@ -182,11 +182,11 @@ const F = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
182
182
  F.displayName = "ModalHeader";
183
183
  const G = r.forwardRef(({ className: o, id: e, ...a }, i) => {
184
184
  const l = r.useContext(x), d = n(
185
- "text-[15px] font-semibold leading-5 text-foreground",
185
+ "text-l font-semibold leading-5 text-foreground",
186
186
  o
187
187
  );
188
188
  return l ? /* @__PURE__ */ t(
189
- c.Title,
189
+ m.Title,
190
190
  {
191
191
  ref: i,
192
192
  id: e ?? l.titleId,
@@ -203,7 +203,7 @@ const N = r.forwardRef(({ className: o, id: e, ...a }, i) => {
203
203
  o
204
204
  );
205
205
  return l ? /* @__PURE__ */ t(
206
- c.Description,
206
+ m.Description,
207
207
  {
208
208
  ref: i,
209
209
  id: e ?? l.descriptionId,
@@ -1,15 +1,15 @@
1
1
  "use client";
2
2
  import * as e from "react";
3
- import { cn as t } from "../lib/cn.js";
3
+ import { cn as r } from "../lib/cn.js";
4
4
  const d = e.forwardRef(
5
- ({ as: a = "main", className: o, ...r }, l) => e.createElement(a, {
6
- ref: l,
5
+ ({ as: a = "main", className: o, ...l }, t) => e.createElement(a, {
6
+ ref: t,
7
7
  "data-slot": "page-body",
8
- className: t(
9
- "relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-card shadow-[0_0_16px_-8px_rgb(32_32_32_/_0.22)]",
8
+ className: r(
9
+ "relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-card shadow-elevation",
10
10
  o
11
11
  ),
12
- ...r
12
+ ...l
13
13
  })
14
14
  );
15
15
  d.displayName = "PageBody";
@@ -37,7 +37,7 @@ const x = o.forwardRef(
37
37
  }
38
38
  ),
39
39
  /* @__PURE__ */ t("div", { className: "min-w-0", children: [
40
- /* @__PURE__ */ e("h1", { className: "flex min-h-8 items-center text-xl font-medium tracking-tight text-foreground", children: s }),
40
+ /* @__PURE__ */ e("h1", { className: "flex min-h-8 items-center text-2xl font-medium tracking-tight text-foreground", children: s }),
41
41
  r && /* @__PURE__ */ e("p", { className: "mt-1 max-w-2xl text-xs text-muted-foreground", children: r })
42
42
  ] })
43
43
  ] }),
@@ -141,7 +141,7 @@ const A = () => o(
141
141
  onClick: () => r(n),
142
142
  className: o(
143
143
  f,
144
- v ? "bg-ng10 text-white" : "text-foreground hover:bg-muted"
144
+ v ? "bg-wg10 text-brand-foreground" : "text-foreground hover:bg-muted"
145
145
  ),
146
146
  children: n
147
147
  },
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  import { jsx as u } from "react/jsx-runtime";
3
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 = {
4
+ import { ditheringFragmentShader as h, getShaderColorFromString as T, ShaderFitOptions as P, DitheringTypes as z, DitheringShapes as g } from "@paper-design/shaders";
5
+ import { ShaderMount as D } from "@paper-design/shaders-react";
6
+ import { useReducedMotion as F } from "motion/react";
7
+ import { cn as L } from "../lib/cn.js";
8
+ const A = {
9
9
  alpha: !0,
10
10
  antialias: !1,
11
11
  depth: !1,
12
12
  powerPreference: "low-power",
13
13
  preserveDrawingBuffer: !1
14
- }, O = 1e6, B = `uniform float u_type;
14
+ }, B = 1e6, b = `uniform float u_type;
15
15
  uniform float u_patternDensity;
16
- uniform float u_pixelSizeJitter;`, k = " float res = step(.5, shape + dithering);", G = ` vec2 triangleUV = fract(pxSizeUV);
16
+ uniform float u_pixelSizeJitter;`, V = " float res = step(.5, shape + dithering);", G = ` vec2 triangleUV = fract(pxSizeUV);
17
17
  vec2 triangleCell = floor(pxSizeUV);
18
18
  float triangleFlip = mod(triangleCell.x + triangleCell.y, 2.0);
19
19
  triangleUV.x = mix(triangleUV.x, 1.0 - triangleUV.x, triangleFlip);
@@ -29,61 +29,59 @@ uniform float u_pixelSizeJitter;`, k = " float res = step(.5, shape + dithering
29
29
  float triangleMask = 1.0 - step(1.0, triangleDiagonal);
30
30
  float densityThreshold = 0.5 - (u_patternDensity - 1.0) * 0.12;
31
31
  float res = step(densityThreshold, shape + dithering) * triangleMask;`;
32
- if (!g.includes("uniform float u_type;") || !g.includes(k))
32
+ if (!h.includes("uniform float u_type;") || !h.includes(V))
33
33
  throw new Error("The Paper dithering shader no longer exposes the expected cell output.");
34
- const b = g.replace("uniform float u_type;", B).replace(k, G), d = (e) => Math.max(0, Math.min(1, e)), J = "#202020", 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;
34
+ const O = h.replace("uniform float u_type;", b).replace(V, G), d = (e) => Math.max(0, Math.min(1, e));
35
+ function J(e) {
36
+ if (typeof document > "u") return null;
37
+ const t = (r, o = 0) => {
38
+ if (o > 4) return r;
39
+ const i = r.trim(), a = i.match(/^var\((--[\w-]+)(?:,\s*(.+))?\)$/);
40
+ if (!a) return i;
41
+ const l = getComputedStyle(document.documentElement).getPropertyValue(a[1]).trim();
42
+ return l ? t(l, o + 1) : a[2] ? t(a[2], o + 1) : null;
43
43
  };
44
- return r(e) || t;
44
+ return t(e);
45
45
  }
46
- function E(e, t) {
47
- const [r, o] = c.useState(
48
- () => e.startsWith("var(") ? t : e
46
+ function k(e) {
47
+ const [t, r] = c.useState(
48
+ () => e.startsWith("var(") ? null : e
49
49
  );
50
50
  return c.useEffect(() => {
51
- o(X(e, t));
52
- }, [t, e]), r;
51
+ r(J(e));
52
+ }, [e]), t;
53
53
  }
54
- const $ = c.forwardRef(
54
+ const W = c.forwardRef(
55
55
  ({
56
56
  variant: e = "custom",
57
57
  color: t = "var(--texture-ink)",
58
58
  pixelSize: r = 7,
59
59
  speed: o = 3,
60
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"],
61
+ patternDensity: a = 1.8,
62
+ pixelSizeJitter: l = 0.5,
63
+ enableRipples: p = !1,
64
+ liquid: _ = !1,
65
+ toneAmount: x = 0,
66
+ edgeFade: E = 0.25,
67
+ transparent: n = !0,
68
+ backgroundColor: v = "var(--color-background)",
69
+ paused: S = !1,
70
+ className: N,
71
+ style: R
72
+ }, I) => {
73
+ const y = F(), f = k(t), m = k(v), s = d(E) * 100, C = `linear-gradient(to right, transparent 0%, var(--color-wg12) ${s}%, var(--color-wg12) ${100 - s}%, transparent 100%)`, M = `linear-gradient(to bottom, transparent 0%, var(--color-wg12) ${s}%, var(--color-wg12) ${100 - s}%, transparent 100%)`, U = c.useMemo(() => {
74
+ if (!f || !n && !m) return null;
75
+ const w = T(f);
76
+ return w[3] *= 1 - d(x), {
77
+ u_colorBack: n ? [0, 0, 0, 0] : T(m),
78
+ u_colorFront: w,
79
+ u_shape: p ? g.ripple : _ ? g.warp : g.simplex,
80
+ u_type: z["4x4"],
83
81
  u_pxSize: Math.max(1, r),
84
- u_patternDensity: Math.max(0.1, n),
85
- u_pixelSizeJitter: d(a),
86
- u_fit: N.none,
82
+ u_patternDensity: Math.max(0.1, a),
83
+ u_pixelSizeJitter: d(l),
84
+ u_fit: P.none,
87
85
  u_scale: Math.max(0.01, i),
88
86
  u_rotation: 0,
89
87
  u_offsetX: 0,
@@ -94,52 +92,52 @@ const $ = c.forwardRef(
94
92
  u_worldHeight: 0
95
93
  };
96
94
  }, [
97
- s,
98
95
  p,
99
- n,
96
+ _,
97
+ a,
100
98
  i,
101
99
  r,
102
- a,
103
- C,
104
- U,
105
- h,
106
- f
100
+ l,
101
+ m,
102
+ f,
103
+ x,
104
+ n
107
105
  ]);
108
106
  return /* @__PURE__ */ u(
109
107
  "div",
110
108
  {
111
- ref: w,
109
+ ref: I,
112
110
  "aria-hidden": !0,
113
- "data-shader-paused": x || S ? "true" : "false",
114
- className: P("pixel-blast-svg", V),
111
+ "data-shader-paused": S || y ? "true" : "false",
112
+ className: L("pixel-blast-svg", N),
115
113
  style: {
116
- ...D,
117
- background: f ? "transparent" : _
114
+ ...R,
115
+ background: n ? "transparent" : v
118
116
  },
119
117
  children: /* @__PURE__ */ u(
120
118
  "div",
121
119
  {
122
120
  className: "size-full",
123
- style: { WebkitMaskImage: T, maskImage: T },
121
+ style: { WebkitMaskImage: C, maskImage: C },
124
122
  children: /* @__PURE__ */ u(
125
123
  "div",
126
124
  {
127
125
  className: "size-full",
128
- style: { WebkitMaskImage: v, maskImage: v },
129
- children: /* @__PURE__ */ u(
130
- F,
126
+ style: { WebkitMaskImage: M, maskImage: M },
127
+ children: U ? /* @__PURE__ */ u(
128
+ D,
131
129
  {
132
130
  className: "size-full",
133
131
  width: "100%",
134
132
  height: "100%",
135
- fragmentShader: b,
136
- uniforms: A,
137
- speed: x || S ? 0 : o,
133
+ fragmentShader: O,
134
+ uniforms: U,
135
+ speed: S || y ? 0 : o,
138
136
  minPixelRatio: 1,
139
- maxPixelCount: O,
140
- webGlContextAttributes: z
137
+ maxPixelCount: B,
138
+ webGlContextAttributes: A
141
139
  }
142
- )
140
+ ) : null
143
141
  }
144
142
  )
145
143
  }
@@ -148,7 +146,7 @@ const $ = c.forwardRef(
148
146
  );
149
147
  }
150
148
  );
151
- $.displayName = "PixelBlastSVG";
149
+ W.displayName = "PixelBlastSVG";
152
150
  export {
153
- $ as PixelBlastSVG
151
+ W as PixelBlastSVG
154
152
  };
@@ -0,0 +1,18 @@
1
+ import { HTMLMotionProps } from 'motion/react';
2
+ import * as React from "react";
3
+ export interface SearchDisclosureProps extends Omit<HTMLMotionProps<"div">, "onChange"> {
4
+ value: string;
5
+ onValueChange: (value: string) => void;
6
+ open?: boolean;
7
+ defaultOpen?: boolean;
8
+ onOpenChange?: (open: boolean) => void;
9
+ placeholder?: string;
10
+ inputLabel?: string;
11
+ triggerLabel?: string;
12
+ }
13
+ /**
14
+ * A compact search action that reveals an inline field from its anchored right
15
+ * edge. The field keeps its full width while the container clips it, avoiding
16
+ * squeezed text and malformed borders during the disclosure spring.
17
+ */
18
+ export declare const SearchDisclosure: React.ForwardRefExoticComponent<Omit<SearchDisclosureProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,106 @@
1
+ "use client";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import * as o from "react";
4
+ import { MotionConfig as S, motion as n, AnimatePresence as g } from "motion/react";
5
+ import { Close as k, Search as u } from "../lib/icons.js";
6
+ import { springDisclosure as s } from "../lib/motion.js";
7
+ import { cn as D } from "../lib/cn.js";
8
+ import { Button as C } from "./button.js";
9
+ import { Input as z } from "./input.js";
10
+ import { Tooltip as j } from "./tooltip.js";
11
+ const I = o.forwardRef(
12
+ ({
13
+ className: f,
14
+ value: c,
15
+ onValueChange: h,
16
+ open: l,
17
+ defaultOpen: p = !1,
18
+ onOpenChange: t,
19
+ placeholder: y = "Search…",
20
+ inputLabel: v = "Search",
21
+ triggerLabel: m = "Search",
22
+ ...b
23
+ }, x) => {
24
+ const [w, N] = o.useState(p), r = l !== void 0, d = r ? l : w, a = o.useCallback(
25
+ (i) => {
26
+ r || N(i), t == null || t(i);
27
+ },
28
+ [r, t]
29
+ );
30
+ return /* @__PURE__ */ e(S, { reducedMotion: "user", children: /* @__PURE__ */ e(
31
+ n.div,
32
+ {
33
+ ref: x,
34
+ initial: !1,
35
+ animate: { width: d ? 256 : 32 },
36
+ transition: s,
37
+ className: D("relative h-8 shrink-0 overflow-hidden", f),
38
+ ...b,
39
+ children: /* @__PURE__ */ e(g, { initial: !1, mode: "popLayout", children: d ? /* @__PURE__ */ e(
40
+ n.div,
41
+ {
42
+ initial: { opacity: 0 },
43
+ animate: { opacity: 1 },
44
+ exit: { opacity: 0 },
45
+ transition: s,
46
+ className: "absolute inset-y-0 right-0 w-64",
47
+ children: /* @__PURE__ */ e(
48
+ z,
49
+ {
50
+ autoFocus: !0,
51
+ type: "search",
52
+ size: "sm",
53
+ className: "w-full",
54
+ startContent: /* @__PURE__ */ e(u, { "aria-hidden": "true" }),
55
+ endContent: /* @__PURE__ */ e(
56
+ "button",
57
+ {
58
+ type: "button",
59
+ "aria-label": "Close search",
60
+ onClick: () => a(!1),
61
+ className: "-mr-1 inline-flex size-6 items-center justify-center rounded-xs outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring",
62
+ children: /* @__PURE__ */ e(k, { "aria-hidden": "true" })
63
+ }
64
+ ),
65
+ value: c,
66
+ onChange: (i) => h(i.currentTarget.value),
67
+ onKeyDown: (i) => {
68
+ i.key === "Escape" && (i.preventDefault(), a(!1));
69
+ },
70
+ placeholder: y,
71
+ "aria-label": v
72
+ }
73
+ )
74
+ },
75
+ "search-field"
76
+ ) : /* @__PURE__ */ e(
77
+ n.div,
78
+ {
79
+ initial: { opacity: 0 },
80
+ animate: { opacity: 1 },
81
+ exit: { opacity: 0 },
82
+ transition: s,
83
+ className: "absolute inset-y-0 right-0 w-8",
84
+ children: /* @__PURE__ */ e(j, { content: m, children: /* @__PURE__ */ e(
85
+ C,
86
+ {
87
+ variant: "outline",
88
+ size: "icon-sm",
89
+ "aria-label": m,
90
+ "data-active": c.trim() || void 0,
91
+ onClick: () => a(!0),
92
+ className: "data-[active=true]:text-action-primary-text",
93
+ children: /* @__PURE__ */ e(u, { "aria-hidden": "true" })
94
+ }
95
+ ) })
96
+ },
97
+ "search-trigger"
98
+ ) })
99
+ }
100
+ ) });
101
+ }
102
+ );
103
+ I.displayName = "SearchDisclosure";
104
+ export {
105
+ I as SearchDisclosure
106
+ };