@actioneer/ads 0.3.1 → 0.5.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/theme.css CHANGED
@@ -2,7 +2,7 @@
2
2
  /*
3
3
  * ============================================================
4
4
  * ADS 1.0 — Design Tokens
5
- * Brand: BLACK · Typeface: Aribau Grotesk (Regular + Bold)
5
+ * Brand: Sage (green) · Neutrals: warm greige · Typeface: Aribau Grotesk
6
6
  * ============================================================
7
7
  */
8
8
  @theme {
@@ -40,25 +40,44 @@
40
40
  --text-2xl: 1.625rem; /* 26px — display */
41
41
  --text-2xl--line-height: 2rem;
42
42
 
43
- /* ---- Ink scale (the black brand ramp) ---- */
44
- --color-ink-50: #f6f6f7;
45
- --color-ink-100: #ececed;
46
- --color-ink-200: #d9d9dc;
47
- --color-ink-300: #b8b8bd;
48
- --color-ink-400: #8f8f96;
49
- --color-ink-500: #6e6e75;
50
- --color-ink-600: #55555b;
51
- --color-ink-700: #3f3f44;
52
- --color-ink-800: #262629;
53
- --color-ink-900: #161618;
54
- --color-ink-950: #0a0a0b;
43
+ /* ---- Neutral ramp — warm greige (the workhorse: backgrounds, surfaces,
44
+ text, borders). Kept a touch warm so it sits with Sage without turning
45
+ green — one family, not colour plus grey. The `ink` name is retained so
46
+ every existing reference resolves; the values are now greige. ---- */
47
+ --color-ink-50: #f2f2ed;
48
+ --color-ink-100: #e7e7e1;
49
+ --color-ink-200: #d8d7cf;
50
+ --color-ink-300: #c7c6be;
51
+ --color-ink-400: #a8a79e;
52
+ --color-ink-500: #8c8c84;
53
+ --color-ink-600: #6b6b63;
54
+ --color-ink-700: #4a4a44;
55
+ --color-ink-800: #33322e;
56
+ --color-ink-900: #26251f;
57
+ --color-ink-950: #1a1a17;
58
+
59
+ /* ---- Brand ramp — Sage (one green hue: brand, primary actions, focal
60
+ data). 600 is the primary. On a white/greige ground, colour earns its
61
+ place — the eye always knows where to look. ---- */
62
+ --color-sage-50: #eff5ea;
63
+ --color-sage-100: #dde8cf;
64
+ --color-sage-200: #a9ce86;
65
+ --color-sage-300: #8abb6a;
66
+ --color-sage-400: #6da24e;
67
+ --color-sage-500: #548c41;
68
+ --color-sage-600: #3f7a34;
69
+ --color-sage-700: #2c5724;
70
+ --color-sage-800: #254a1d;
71
+ --color-sage-900: #1e3a16;
55
72
 
56
73
  /* ---- Semantic accent ramps ---- */
57
- --color-success-50: #f0fdf4;
58
- --color-success-100: #dcfce7;
59
- --color-success-500: #22c55e;
60
- --color-success-600: #16a34a;
61
- --color-success-700: #15803d;
74
+ /* Success — shifted cooler (emerald/teal) so positive states stay clearly
75
+ distinct from the warm Sage brand green. */
76
+ --color-success-50: #ecfdf5;
77
+ --color-success-100: #d1fae5;
78
+ --color-success-500: #10b981;
79
+ --color-success-600: #059669;
80
+ --color-success-700: #047857;
62
81
 
63
82
  --color-warning-50: #fffaeb;
64
83
  --color-warning-100: #fef0c7;
@@ -78,6 +97,19 @@
78
97
  --color-info-600: #1570ef;
79
98
  --color-info-700: #175cd3;
80
99
 
100
+ /* ---- Data-viz accents ---- three small ramps for charts & illustration.
101
+ deep = text/lines · base = fills · soft = backgrounds. Separate from the
102
+ semantic status ramps above; these are the "focal data" companions to Sage. */
103
+ --color-cyan-soft: #c7efe9; /* Cyan — vivid cool contrast; 2nd series, links */
104
+ --color-cyan-base: #12b5a5;
105
+ --color-cyan-deep: #0a7e82;
106
+ --color-lime-soft: #e4efcf; /* Lichen lime — energetic pop from the mark */
107
+ --color-lime-base: #a3c765;
108
+ --color-lime-deep: #6e8f30;
109
+ --color-amber-soft: #fce6c0; /* Amber — warm pop; highlights, "new" */
110
+ --color-amber-base: #f3a72e;
111
+ --color-amber-deep: #b57414;
112
+
81
113
  /* ---- Radii ---- */
82
114
  --radius-xs: 0.25rem;
83
115
  --radius-sm: 0.375rem;
@@ -95,8 +127,8 @@
95
127
  /* ---- Elevation ---- ONE soft token (Claude-panel style).
96
128
  Delineate surfaces with fill color first; add this to gently lift them. */
97
129
  --shadow-elevation: 0 0 0 1px rgb(10 10 11 / 0.03),
98
- 0 1px 2px 0 rgb(10 10 11 / 0.05),
99
- 0 8px 24px -6px rgb(10 10 11 / 0.12);
130
+ 0 1px 2px 0 rgb(10 10 11 / 0.04),
131
+ 0 8px 28px -8px rgb(10 10 11 / 0.09);
100
132
 
101
133
  /* ---- CTA inner glow ---- luminous inset highlight for primary buttons
102
134
  (adapted from the "AI button" Figma): a crisp top-edge catch plus a soft
@@ -174,12 +206,16 @@
174
206
  * every comparison series survives production builds.
175
207
  */
176
208
  :root {
177
- --color-chart-1: var(--color-ink-950);
178
- --color-chart-2: var(--color-ink-400);
179
- --color-chart-3: var(--color-ink-300);
180
- --color-chart-4: var(--color-info-500);
181
- --color-chart-5: var(--color-warning-500);
182
- --color-chart-6: var(--color-success-500);
209
+ /* Data-series palette — Sage (brand) leads as the focal/primary series,
210
+ then the three data-viz accents and two deep variants for extended
211
+ series. Explicit hexes (not var()) so every series survives @theme
212
+ pruning, since chart colours are referenced from SVG prop strings. */
213
+ --color-chart-1: #3f7a34; /* sage — primary / focal series */
214
+ --color-chart-2: #12b5a5; /* cyan base */
215
+ --color-chart-3: #f3a72e; /* amber base */
216
+ --color-chart-4: #a3c765; /* lichen lime base */
217
+ --color-chart-5: #0a7e82; /* cyan deep */
218
+ --color-chart-6: #b57414; /* amber deep */
183
219
  }
184
220
 
185
221
  /*
@@ -205,7 +241,7 @@
205
241
  --color-card: var(--card);
206
242
  --color-card-foreground: var(--card-foreground);
207
243
 
208
- /* Brand (black) — used for solid fills, not body text */
244
+ /* Brand (Sage green) — used for solid fills / primary actions, not body text */
209
245
  --color-brand: var(--brand);
210
246
  --color-brand-foreground: var(--brand-foreground);
211
247
  --color-brand-hover: var(--brand-hover);
@@ -247,39 +283,39 @@
247
283
 
248
284
  /* ---- Theme (light only) ---- */
249
285
  :root {
250
- --background: #ffffff;
251
- --foreground: #0a0a0b;
286
+ --background: #f7f7f3;
287
+ --foreground: #1a1a17;
252
288
 
253
- /* Text hierarchy — accessible on #ffffff */
254
- --text-primary: #0a0a0b; /* ~20:1 AAA */
255
- --text-secondary: #52525b; /* ~7.6:1 AAA */
256
- --text-tertiary: #6e6e75; /* ~5.2:1 AA */
289
+ /* Text hierarchy — accessible on the warm greige canvas */
290
+ --text-primary: #1a1a17; /* ~17:1 AAA */
291
+ --text-secondary: #4a4a44; /* ~8.5:1 AAA */
292
+ --text-tertiary: #6b6b63; /* ~4.8:1 AA */
257
293
 
258
- --surface: #f6f6f7;
259
- --surface-foreground: #262629;
294
+ --surface: #f2f2ed; /* warm greige — the tinted canvas */
295
+ --surface-foreground: #33322e;
260
296
  --elevated: #ffffff;
261
297
 
262
- --muted: #f6f6f7;
263
- --muted-foreground: #6e6e75;
298
+ --muted: #e7e7e1;
299
+ --muted-foreground: #6b6b63;
264
300
 
265
301
  --card: #ffffff;
266
- --card-foreground: #0a0a0b;
302
+ --card-foreground: #1a1a17;
267
303
 
268
- /* BLACK brand */
269
- --brand: #0a0a0b;
304
+ /* Sage brand (green) — primary actions, focal moments */
305
+ --brand: #3f7a34;
270
306
  --brand-foreground: #ffffff;
271
- --brand-hover: #262629;
307
+ --brand-hover: #2c5724;
272
308
 
273
309
  /* Quiet fill */
274
- --fill: #ececed;
275
- --fill-foreground: #161618;
310
+ --fill: #e7e7e1;
311
+ --fill-foreground: #1a1a17;
276
312
 
277
- --accent: #f6f6f7;
278
- --accent-foreground: #161618;
313
+ --accent: #edece6;
314
+ --accent-foreground: #1a1a17;
279
315
 
280
- --border: #ececed;
281
- --border-strong: #d9d9dc;
282
- --input: #d9d9dc;
283
- --ring: rgb(10 10 11 / 0.35);
284
- --overlay: rgb(10 10 11 / 0.5);
316
+ --border: #e7e7e1;
317
+ --border-strong: #c7c6be;
318
+ --input: #c7c6be;
319
+ --ring: rgb(63 122 52 / 0.5);
320
+ --overlay: rgb(26 26 23 / 0.5);
285
321
  }
@@ -1,11 +0,0 @@
1
- import { VoiceVisualizerColor, VoiceVisualizerDriver } from '../../hooks/agents-ui/voice-visualizer-types';
2
- import * as React from "react";
3
- export interface AgentAudioVisualizerAuraProps extends Omit<React.ComponentPropsWithoutRef<"div">, "color">, VoiceVisualizerDriver {
4
- /** Normalized RGB shader color. */
5
- color?: VoiceVisualizerColor;
6
- /** Hue variation across aura layers. */
7
- colorShift?: number;
8
- themeMode?: "dark" | "light";
9
- }
10
- /** Internal ADS port of LiveKit Agents UI's Aura visualizer. */
11
- export declare const AgentAudioVisualizerAura: React.ForwardRefExoticComponent<AgentAudioVisualizerAuraProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,277 +0,0 @@
1
- "use client";
2
- import { jsx as d } from "react/jsx-runtime";
3
- import * as x from "react";
4
- import { ReactShaderToy as y } from "./react-shader-toy.js";
5
- import { useAgentAudioVisualizerAura as b } from "../../hooks/agents-ui/use-agent-audio-visualizer-aura.js";
6
- import { cn as S } from "../../lib/cn.js";
7
- const h = [0.122, 0.835, 0.976], A = `
8
- const float TAU = 6.283185;
9
-
10
- // Noise for dithering
11
- vec2 randFibo(vec2 p) {
12
- p = fract(p * vec2(443.897, 441.423));
13
- p += dot(p, p.yx + 19.19);
14
- return fract((p.xx + p.yx) * p.xy);
15
- }
16
-
17
- // Tonemap
18
- vec3 Tonemap(vec3 x) {
19
- x *= 4.0;
20
- return x / (1.0 + x);
21
- }
22
-
23
- // Luma for alpha
24
- float luma(vec3 color) {
25
- return dot(color, vec3(0.299, 0.587, 0.114));
26
- }
27
-
28
- // RGB to HSV
29
- vec3 rgb2hsv(vec3 c) {
30
- vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
31
- vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
32
- vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
33
- float d = q.x - min(q.w, q.y);
34
- float e = 1.0e-10;
35
- return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
36
- }
37
-
38
- // HSV to RGB
39
- vec3 hsv2rgb(vec3 c) {
40
- vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
41
- vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
42
- return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
43
- }
44
-
45
- // SDF shapes
46
- float sdCircle(vec2 st, float r) {
47
- return length(st) - r;
48
- }
49
-
50
- float sdLine(vec2 p, float r) {
51
- float halfLen = r * 2.0;
52
- vec2 a = vec2(-halfLen, 0.0);
53
- vec2 b = vec2(halfLen, 0.0);
54
- vec2 pa = p - a;
55
- vec2 ba = b - a;
56
- float h = clamp(dot(pa, ba) / dot(ba, ba), 0.0, 1.0);
57
- return length(pa - ba * h);
58
- }
59
-
60
- float getSdf(vec2 st) {
61
- if(uShape == 1.0) return sdCircle(st, uScale);
62
- else if(uShape == 2.0) return sdLine(st, uScale);
63
- return sdCircle(st, uScale); // Default
64
- }
65
-
66
- vec2 turb(vec2 pos, float t, float it) {
67
- // Initial rotation matrix for swirl direction
68
- mat2 rotation = mat2(0.6, -0.25, 0.25, 0.9);
69
- // Secondary rotation applied each iteration (approx 53 degree rotation)
70
- mat2 layerRotation = mat2(0.6, -0.8, 0.8, 0.6);
71
-
72
- float frequency = mix(2.0, 15.0, uFrequency);
73
- float amplitude = uAmplitude;
74
- float frequencyGrowth = 1.4;
75
- float animTime = t * 0.1 * uSpeed;
76
-
77
- const int LAYERS = 4;
78
- for(int i = 0; i < LAYERS; i++) {
79
- // Calculate wave displacement for this layer
80
- vec2 rotatedPos = pos * rotation;
81
- vec2 wave = sin(frequency * rotatedPos + float(i) * animTime + it);
82
-
83
- // Apply displacement along rotation direction
84
- pos += (amplitude / frequency) * rotation[0] * wave;
85
-
86
- // Evolve parameters for next layer
87
- rotation *= layerRotation;
88
- amplitude *= mix(1.0, max(wave.x, wave.y), uVariance);
89
- frequency *= frequencyGrowth;
90
- }
91
-
92
- return pos;
93
- }
94
-
95
- const float ITERATIONS = 36.0;
96
-
97
- void mainImage(out vec4 fragColor, in vec2 fragCoord) {
98
- vec2 uv = fragCoord / iResolution.xy;
99
-
100
- vec3 pp = vec3(0.0);
101
- vec3 bloom = vec3(0.0);
102
- float t = iTime * 0.5;
103
- vec2 pos = uv - 0.5;
104
-
105
- vec2 prevPos = turb(pos, t, 0.0 - 1.0 / ITERATIONS);
106
- float spacing = mix(1.0, TAU, uSpacing);
107
-
108
- for(float i = 1.0; i < ITERATIONS + 1.0; i++) {
109
- float iter = i / ITERATIONS;
110
- vec2 st = turb(pos, t, iter * spacing);
111
- float d = abs(getSdf(st));
112
- float pd = distance(st, prevPos);
113
- prevPos = st;
114
- float dynamicBlur = exp2(pd * 2.0 * 1.4426950408889634) - 1.0;
115
- float ds = smoothstep(0.0, uBlur * 0.05 + max(dynamicBlur * uSmoothing, 0.001), d);
116
-
117
- // Shift color based on iteration using uColorScale
118
- vec3 color = uColor;
119
- if(uColorShift > 0.01) {
120
- vec3 hsv = rgb2hsv(color);
121
- // Shift hue by iteration
122
- hsv.x = fract(hsv.x + (1.0 - iter) * uColorShift * 0.3);
123
- color = hsv2rgb(hsv);
124
- }
125
-
126
- float invd = 1.0 / max(d + dynamicBlur, 0.001);
127
- pp += (ds - 1.0) * color;
128
- bloom += clamp(invd, 0.0, 250.0) * color;
129
- }
130
-
131
- pp *= 1.0 / ITERATIONS;
132
-
133
- vec3 color;
134
-
135
- // Dark mode (default)
136
- if(uMode < 0.5) {
137
- // use bloom effect
138
- bloom = bloom / (bloom + 2e4);
139
- color = (-pp + bloom * 3.0 * uBloom) * 1.2;
140
- color += (randFibo(fragCoord).x - 0.5) / 255.0;
141
- color = Tonemap(color);
142
- float alpha = luma(color) * uMix;
143
- fragColor = vec4(color * uMix, alpha);
144
- }
145
-
146
- // Light mode
147
- else {
148
- // no bloom effect
149
- color = -pp;
150
- color += (randFibo(fragCoord).x - 0.5) / 255.0;
151
-
152
- // Preserve hue by tone mapping brightness only
153
- float brightness = length(color);
154
- vec3 direction = brightness > 0.0 ? color / brightness : color;
155
-
156
- // Reinhard on brightness
157
- float factor = 2.0;
158
- float mappedBrightness = (brightness * factor) / (1.0 + brightness * factor);
159
- color = direction * mappedBrightness;
160
-
161
- // Boost saturation to compensate for white background bleed-through
162
- // When alpha < 1.0, white bleeds through making colors look desaturated
163
- // So we increase saturation to maintain vibrant appearance
164
- float gray = dot(color, vec3(0.2, 0.5, 0.1));
165
- float saturationBoost = 3.0;
166
- color = mix(vec3(gray), color, saturationBoost);
167
-
168
- // Clamp between 0-1
169
- color = clamp(color, 0.0, 1.0);
170
-
171
- float alpha = mappedBrightness * clamp(uMix, 1.0, 2.0);
172
- fragColor = vec4(color, alpha);
173
- }
174
- }`;
175
- function g({
176
- shape: m = 1,
177
- speed: e = 1,
178
- amplitude: t = 0.5,
179
- frequency: a = 0.5,
180
- scale: r = 0.2,
181
- blur: l = 1,
182
- color: i = h,
183
- colorShift: c = 1,
184
- brightness: n = 1,
185
- themeMode: u = "light",
186
- reduced: s = !1,
187
- ref: p,
188
- className: f,
189
- ...v
190
- }) {
191
- return /* @__PURE__ */ d("div", { ref: p, className: f, ...v, children: /* @__PURE__ */ d(
192
- y,
193
- {
194
- fs: A,
195
- className: "size-full",
196
- devicePixelRatio: 1,
197
- paused: s || e === 0,
198
- uniforms: {
199
- // Aurora wave speed
200
- uSpeed: { type: "1f", value: e },
201
- // Edge blur/softness
202
- uBlur: { type: "1f", value: l },
203
- // Shape scale
204
- uScale: { type: "1f", value: r },
205
- // Shape type: 1=circle, 2=line
206
- uShape: { type: "1f", value: m },
207
- // Wave frequency and complexity
208
- uFrequency: { type: "1f", value: a },
209
- // Turbulence amplitude
210
- uAmplitude: { type: "1f", value: t },
211
- // Light intensity (bloom)
212
- uBloom: { type: "1f", value: 0 },
213
- // Brightness of the aurora (0-1)
214
- uMix: { type: "1f", value: n },
215
- // Color variation across layers (0-1)
216
- uSpacing: { type: "1f", value: 0.5 },
217
- // Color palette offset - shifts colors along the gradient (0-1)
218
- uColorShift: { type: "1f", value: c },
219
- // Color variation across layers (0-1)
220
- uVariance: { type: "1f", value: 0.1 },
221
- // Smoothing of the aurora (0-1)
222
- uSmoothing: { type: "1f", value: 1 },
223
- // Display mode: 0=dark background, 1=light background
224
- uMode: { type: "1f", value: u === "light" ? 1 : 0 },
225
- // Color
226
- uColor: { type: "3fv", value: i }
227
- },
228
- onError: (o) => {
229
- console.error("Shader error:", o);
230
- },
231
- onWarning: (o) => {
232
- console.warn("Shader warning:", o);
233
- }
234
- }
235
- ) });
236
- }
237
- g.displayName = "AuraShader";
238
- const w = x.forwardRef(function({
239
- state: e = "idle",
240
- volume: t = 0,
241
- reduced: a = !1,
242
- color: r = h,
243
- colorShift: l = 0.05,
244
- themeMode: i = "light",
245
- className: c,
246
- ...n
247
- }, u) {
248
- const { speed: s, scale: p, amplitude: f, frequency: v, brightness: o } = b({
249
- state: e,
250
- volume: t,
251
- reduced: a
252
- });
253
- return /* @__PURE__ */ d(
254
- g,
255
- {
256
- ref: u,
257
- "aria-hidden": !0,
258
- "data-state": e,
259
- blur: 0.2,
260
- color: r,
261
- colorShift: l,
262
- speed: s,
263
- scale: p,
264
- themeMode: i,
265
- amplitude: f,
266
- frequency: v,
267
- brightness: o,
268
- reduced: a,
269
- className: S("size-full", c),
270
- ...n
271
- }
272
- );
273
- });
274
- w.displayName = "AgentAudioVisualizerAura";
275
- export {
276
- w as AgentAudioVisualizerAura
277
- };
@@ -1,12 +0,0 @@
1
- import { VoiceVisualizerColor, VoiceVisualizerDriver } from '../../hooks/agents-ui/voice-visualizer-types';
2
- import * as React from "react";
3
- export interface AgentAudioVisualizerWaveProps extends Omit<React.ComponentPropsWithoutRef<"div">, "color">, VoiceVisualizerDriver {
4
- /** Normalized RGB shader color. */
5
- color?: VoiceVisualizerColor;
6
- /** Hue variation toward the outside of the wave. */
7
- colorShift?: number;
8
- lineWidth?: number;
9
- blur?: number;
10
- }
11
- /** Internal ADS port of LiveKit Agents UI's Wave visualizer. */
12
- export declare const AgentAudioVisualizerWave: React.ForwardRefExoticComponent<AgentAudioVisualizerWaveProps & React.RefAttributes<HTMLDivElement>>;