@actioneer/ads 0.2.4 → 0.3.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/components/ai-elements/chain-of-thought.d.ts +64 -2
  2. package/components/ai-elements/chain-of-thought.js +319 -100
  3. package/components/ai-elements/chart.d.ts +30 -0
  4. package/components/ai-elements/chart.js +303 -0
  5. package/components/ai-elements/index.d.ts +2 -0
  6. package/components/ai-elements/message.d.ts +12 -2
  7. package/components/ai-elements/message.js +133 -100
  8. package/components/ai-elements/research-activity.d.ts +45 -0
  9. package/components/ai-elements/research-activity.js +260 -0
  10. package/components/ai-elements/tool.js +42 -38
  11. package/components/answer.d.ts +16 -0
  12. package/components/answer.js +273 -249
  13. package/components/assistant-ui/attachment.js +5 -1
  14. package/components/assistant-ui/composer-deep-research.js +44 -29
  15. package/components/assistant-ui/composer-harness.js +45 -27
  16. package/components/assistant-ui/composer.js +16 -16
  17. package/components/assistant-ui/index.d.ts +0 -1
  18. package/components/assistant-ui/message.d.ts +7 -0
  19. package/components/assistant-ui/message.js +36 -36
  20. package/components/assistant-ui/thread.js +1 -1
  21. package/components/brand-texture.d.ts +37 -0
  22. package/components/brand-texture.js +54 -0
  23. package/components/code-block.d.ts +36 -0
  24. package/components/code-block.js +136 -0
  25. package/components/drawer.d.ts +1 -1
  26. package/components/file-dropzone.d.ts +32 -0
  27. package/components/file-dropzone.js +134 -0
  28. package/components/index.d.ts +10 -0
  29. package/components/index.js +482 -433
  30. package/components/infinite-canvas.d.ts +50 -0
  31. package/components/infinite-canvas.js +215 -0
  32. package/components/page-header.d.ts +22 -0
  33. package/components/page-header.js +52 -0
  34. package/components/resizable-panel.d.ts +29 -0
  35. package/components/resizable-panel.js +102 -0
  36. package/components/reveal.d.ts +36 -0
  37. package/components/reveal.js +35 -0
  38. package/components/scroll-area.d.ts +19 -0
  39. package/components/scroll-area.js +57 -0
  40. package/components/setting-row.d.ts +35 -0
  41. package/components/setting-row.js +86 -0
  42. package/components/sidebar.js +131 -131
  43. package/components/stepper.d.ts +32 -0
  44. package/components/stepper.js +113 -0
  45. package/components/table.js +16 -15
  46. package/components/tabs.js +1 -1
  47. package/lib/icons.d.ts +12 -0
  48. package/lib/icons.js +98 -95
  49. package/lib/motion.d.ts +5 -3
  50. package/lib/motion.js +28 -27
  51. package/llms.txt +122 -28
  52. package/manifest.json +871 -73
  53. package/package.json +2 -2
  54. package/styles.css +71 -28
  55. package/theme.css +19 -15
  56. package/components/assistant-ui/smart-message-text.d.ts +0 -15
  57. package/components/assistant-ui/smart-message-text.js +0 -29
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actioneer/ads",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "description": "Actioneer Design System 1.0 — React 19 + Tailwind v4 component library.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -38,9 +38,9 @@
38
38
  "@assistant-ui/react-markdown": "^0.14.5",
39
39
  "@hugeicons/core-free-icons": "^4.2.2",
40
40
  "@hugeicons/react": "^1.1.9",
41
- "@openuidev/react-lang": "^0.2.8",
42
41
  "@paper-design/shaders": "^0.0.77",
43
42
  "@paper-design/shaders-react": "^0.0.77",
43
+ "@xyflow/react": "^12.11.2",
44
44
  "class-variance-authority": "^0.7.1",
45
45
  "clsx": "^2.1.1",
46
46
  "motion": "^12.42.2",
package/styles.css CHANGED
@@ -39,23 +39,23 @@
39
39
  --font-sans: "Aribau Grotesk", ui-sans-serif, system-ui, -apple-system,
40
40
  "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
41
41
 
42
- /* ---- Type scale ---- base = 14px (0.875rem). Root stays 16px so the
43
- spacing grid is unaffected; only text sizes are anchored to 14px. */
42
+ /* ---- Type scale ---- base = 15px (0.9375rem). Root stays 16px so the
43
+ spacing grid is unaffected; only text sizes are anchored to 15px. */
44
44
  /* SIX sizes only — a deliberately small ladder (captions → display).
45
45
  Don't reintroduce 2xs/3xl/4xl or in-between steps; if a size feels
46
46
  missing, the answer is weight/color, not a new size. */
47
- --text-xs: 0.75rem; /* 12px — captions, secondary text, table cells, keycaps */
48
- --text-xs--line-height: 1rem;
49
- /* text-sm is aliased to text-xs (both 12px). The scale is intentionally
50
- 12 · 14 · 15 · 21 · 26 with no in-between tier — keeping the token
51
- pointed at 12px stops any stray `text-sm` from falling back to
52
- Tailwind's default 14px, which would silently read as base. */
53
- --text-sm: 0.75rem;
54
- --text-sm--line-height: 1rem;
55
- --text-base: 0.875rem; /* 14px — BASE body */
56
- --text-base--line-height: 1.25rem;
57
- --text-lg: 0.9375rem; /* 15px — emphasized body, section headings */
58
- --text-lg--line-height: 1.375rem;
47
+ --text-xs: 0.8125rem; /* 13px — the FLOOR: captions, secondary text, table cells, keycaps */
48
+ --text-xs--line-height: 1.125rem;
49
+ /* text-sm is aliased to text-xs (both 13px). The scale is intentionally
50
+ 13 · 15 · 17 · 21 · 26 with no in-between tier — keeping the token
51
+ pointed at 13px stops any stray `text-sm` from falling back to
52
+ Tailwind's default 14px, which would land off the scale. */
53
+ --text-sm: 0.8125rem;
54
+ --text-sm--line-height: 1.125rem;
55
+ --text-base: 0.9375rem; /* 15px — BASE body */
56
+ --text-base--line-height: 1.375rem;
57
+ --text-lg: 1.0625rem; /* 17px — emphasized body, section headings */
58
+ --text-lg--line-height: 1.5rem;
59
59
  --text-xl: 1.3125rem; /* 21px — page titles */
60
60
  --text-xl--line-height: 1.75rem;
61
61
  --text-2xl: 1.625rem; /* 26px — display */
@@ -138,7 +138,8 @@
138
138
  to these system-wide. JS mirror: src/lib/motion.ts — keep in sync. */
139
139
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* entrances, exits, presses */
140
140
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* on-screen movement / morphs */
141
- --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* iOS-like drawer slide */
141
+ --ease-expo-out: cubic-bezier(0.16, 1, 0.3, 1); /* side-panel and drawer slide */
142
+ --ease-drawer: var(--ease-expo-out); /* backwards-compatible alias */
142
143
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* playful overshoot (rare) */
143
144
 
144
145
  /* Durations — every animation/transition timing flows from these.
@@ -166,6 +167,8 @@
166
167
  --sidebar-item: 2rem; /* 32px — collapsed rail hit target (square) */
167
168
  --sidebar-logo: 1.25rem; /* 20px — brand mark, centered in a --sidebar-item square */
168
169
  --sidebar-text-indent: 2.375rem; /* px-3 + icon size-4 + gap-2.5 — history rows align to nav-item text */
170
+ --sidebar-navigation-text-size: 0.8125rem; /* 13px — sidebar actions, items, history, and account text */
171
+ --sidebar-section-label-size: 0.8125rem; /* 13px — section and history labels */
169
172
  --panel-header-height: 2.75rem; /* 44px — Panel / toolbar header */
170
173
  --aside-width: 20rem; /* 320px — right-hand panel column */
171
174
 
@@ -180,6 +183,7 @@
180
183
  --composer-bg: color-mix(in oklab, var(--muted) 30%, var(--background));
181
184
  --composer-radius: var(--radius-2xl);
182
185
  --composer-padding: 0.5rem;
186
+ --composer-placeholder-max-h: calc(var(--text-base--line-height) * 2); /* rotating placeholder clamp — two lines of the input's own rhythm, so it can never overlap the accessory row */
183
187
  --chat-texture-opacity: 0.06; /* welcome-state halftone wash */
184
188
  }
185
189
 
@@ -313,10 +317,11 @@
313
317
  display: none;
314
318
  }
315
319
 
316
- /* Ask Actioneer texture entrance: a radial bloom — the halftone reveals from
317
- the centre out to the corners (clip-path circle) while gently scaling up to
318
- rest. `from{}`-only keyframe, so it settles into the element's own opacity. */
319
- @keyframes chat-texture-reveal {
320
+ /* BrandTexture entrance (src/components/brand-texture.tsx): a radial bloom —
321
+ the halftone reveals from the centre out to the corners (clip-path circle)
322
+ while gently scaling up to rest. `from{}`-only keyframe, so it settles into
323
+ the element's own opacity. */
324
+ @keyframes ads-texture-reveal {
320
325
  from {
321
326
  clip-path: circle(10% at 50% 50%);
322
327
  opacity: 0;
@@ -326,8 +331,8 @@
326
331
  clip-path: circle(102% at 50% 50%);
327
332
  }
328
333
  }
329
- .chat-texture-reveal {
330
- animation: chat-texture-reveal var(--duration-bloom) var(--ease-out) both;
334
+ .ads-texture-reveal {
335
+ animation: ads-texture-reveal var(--duration-bloom) var(--ease-out) both;
331
336
  }
332
337
 
333
338
  /* Paper's WebGL shader owns the halftone animation. The canvas is bounded to
@@ -371,7 +376,7 @@
371
376
  animation-direction: reverse;
372
377
  }
373
378
  @media (prefers-reduced-motion: reduce) {
374
- .chat-texture-reveal {
379
+ .ads-texture-reveal {
375
380
  animation: none;
376
381
  }
377
382
  .voice-surface-drift {
@@ -379,13 +384,13 @@
379
384
  }
380
385
  }
381
386
 
382
- /* Ask Actioneer texture exit — cloud lift. When the conversation starts the
387
+ /* BrandTexture exit — cloud lift. When the conversation starts the
383
388
  halftone dissolves from the BOTTOM upward (a soft mask band sweeps up
384
389
  through it) while the whole layer drifts up and fades — cloud cover
385
390
  breaking and rising, not a curtain covering it. The mask rests fully
386
391
  opaque (element aligned with the black end of an oversized gradient), and
387
392
  the lifted state slides the element to the transparent end. */
388
- .chat-texture-lift {
393
+ .ads-texture-lift {
389
394
  mask-image: linear-gradient(to top, transparent 0%, transparent 42%, black 58%, black 100%);
390
395
  -webkit-mask-image: linear-gradient(to top, transparent 0%, transparent 42%, black 58%, black 100%);
391
396
  mask-repeat: no-repeat;
@@ -400,16 +405,16 @@
400
405
  translate 1s var(--ease-out),
401
406
  opacity 1s var(--ease-out);
402
407
  }
403
- .chat-texture-lifted {
408
+ .ads-texture-lifted {
404
409
  mask-position: 0% 100%;
405
410
  -webkit-mask-position: 0% 100%;
406
411
  translate: 0 -3.5rem;
407
412
  }
408
413
  @media (prefers-reduced-motion: reduce) {
409
- .chat-texture-lift {
414
+ .ads-texture-lift {
410
415
  transition: opacity var(--duration-normal) var(--ease-out);
411
416
  }
412
- .chat-texture-lifted {
417
+ .ads-texture-lifted {
413
418
  mask-position: 0% 0%;
414
419
  -webkit-mask-position: 0% 0%;
415
420
  translate: none;
@@ -470,7 +475,7 @@
470
475
  background-color: var(--background);
471
476
  color: var(--foreground);
472
477
  font-family: var(--font-sans);
473
- font-size: var(--text-base); /* 14px base */
478
+ font-size: var(--text-base); /* 15px base */
474
479
  font-feature-settings: "cv01", "ss01";
475
480
  font-synthesis-weight: none;
476
481
  }
@@ -533,6 +538,44 @@
533
538
  @keyframes ads-shimmer {
534
539
  100% { transform: translateX(100%); }
535
540
  }
541
+
542
+ /* Reveal — the "data draws itself" entrance (src/components/reveal.tsx).
543
+ The real layout lands instantly; content arrives in hierarchy — shells
544
+ rise, labels/values ink in, visualizations wipe left→right — each slot
545
+ delayed by --reveal-order × --reveal-step. The wipe runs longer than UI
546
+ chrome on purpose: data drawing is explanatory motion, not chrome. */
547
+ @keyframes ads-reveal-ink {
548
+ from { opacity: 0; filter: blur(4px); }
549
+ to { opacity: 1; filter: blur(0); }
550
+ }
551
+ @keyframes ads-reveal-rise {
552
+ from { opacity: 0; transform: translate3d(0, 8px, 0); }
553
+ to { opacity: 1; transform: translate3d(0, 0, 0); }
554
+ }
555
+ @keyframes ads-reveal-wipe {
556
+ from { clip-path: inset(0 100% 0 0); }
557
+ to { clip-path: inset(0 0 0 0); }
558
+ }
559
+ @keyframes ads-reveal-fade {
560
+ from { opacity: 0; }
561
+ to { opacity: 1; }
562
+ }
563
+ .ads-reveal {
564
+ animation: ads-reveal-rise var(--reveal-duration, 0.45s) var(--ease-out) both;
565
+ animation-delay: calc(var(--reveal-step, 70ms) * var(--reveal-order, 0));
566
+ }
567
+ .ads-reveal-ink { animation-name: ads-reveal-ink; }
568
+ .ads-reveal-wipe {
569
+ animation-name: ads-reveal-wipe;
570
+ animation-duration: var(--reveal-duration-draw, 0.9s);
571
+ }
572
+ @media (prefers-reduced-motion: reduce) {
573
+ .ads-reveal,
574
+ .ads-reveal-ink,
575
+ .ads-reveal-wipe {
576
+ animation-name: ads-reveal-fade;
577
+ }
578
+ }
536
579
  @keyframes ads-indeterminate {
537
580
  0% { transform: translate3d(-100%, 0, 0); }
538
581
  60%, 100% { transform: translate3d(250%, 0, 0); }
package/theme.css CHANGED
@@ -12,23 +12,23 @@
12
12
  --font-sans: "Aribau Grotesk", ui-sans-serif, system-ui, -apple-system,
13
13
  "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
14
14
 
15
- /* ---- Type scale ---- base = 14px (0.875rem). Root stays 16px so the
16
- spacing grid is unaffected; only text sizes are anchored to 14px. */
15
+ /* ---- Type scale ---- base = 15px (0.9375rem). Root stays 16px so the
16
+ spacing grid is unaffected; only text sizes are anchored to 15px. */
17
17
  /* SIX sizes only — a deliberately small ladder (captions → display).
18
18
  Don't reintroduce 2xs/3xl/4xl or in-between steps; if a size feels
19
19
  missing, the answer is weight/color, not a new size. */
20
- --text-xs: 0.75rem; /* 12px — captions, secondary text, table cells, keycaps */
21
- --text-xs--line-height: 1rem;
22
- /* text-sm is aliased to text-xs (both 12px). The scale is intentionally
23
- 12 · 14 · 15 · 21 · 26 with no in-between tier — keeping the token
24
- pointed at 12px stops any stray `text-sm` from falling back to
25
- Tailwind's default 14px, which would silently read as base. */
26
- --text-sm: 0.75rem;
27
- --text-sm--line-height: 1rem;
28
- --text-base: 0.875rem; /* 14px — BASE body */
29
- --text-base--line-height: 1.25rem;
30
- --text-lg: 0.9375rem; /* 15px — emphasized body, section headings */
31
- --text-lg--line-height: 1.375rem;
20
+ --text-xs: 0.8125rem; /* 13px — the FLOOR: captions, secondary text, table cells, keycaps */
21
+ --text-xs--line-height: 1.125rem;
22
+ /* text-sm is aliased to text-xs (both 13px). The scale is intentionally
23
+ 13 · 15 · 17 · 21 · 26 with no in-between tier — keeping the token
24
+ pointed at 13px stops any stray `text-sm` from falling back to
25
+ Tailwind's default 14px, which would land off the scale. */
26
+ --text-sm: 0.8125rem;
27
+ --text-sm--line-height: 1.125rem;
28
+ --text-base: 0.9375rem; /* 15px — BASE body */
29
+ --text-base--line-height: 1.375rem;
30
+ --text-lg: 1.0625rem; /* 17px — emphasized body, section headings */
31
+ --text-lg--line-height: 1.5rem;
32
32
  --text-xl: 1.3125rem; /* 21px — page titles */
33
33
  --text-xl--line-height: 1.75rem;
34
34
  --text-2xl: 1.625rem; /* 26px — display */
@@ -111,7 +111,8 @@
111
111
  to these system-wide. JS mirror: src/lib/motion.ts — keep in sync. */
112
112
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* entrances, exits, presses */
113
113
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* on-screen movement / morphs */
114
- --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* iOS-like drawer slide */
114
+ --ease-expo-out: cubic-bezier(0.16, 1, 0.3, 1); /* side-panel and drawer slide */
115
+ --ease-drawer: var(--ease-expo-out); /* backwards-compatible alias */
115
116
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* playful overshoot (rare) */
116
117
 
117
118
  /* Durations — every animation/transition timing flows from these.
@@ -139,6 +140,8 @@
139
140
  --sidebar-item: 2rem; /* 32px — collapsed rail hit target (square) */
140
141
  --sidebar-logo: 1.25rem; /* 20px — brand mark, centered in a --sidebar-item square */
141
142
  --sidebar-text-indent: 2.375rem; /* px-3 + icon size-4 + gap-2.5 — history rows align to nav-item text */
143
+ --sidebar-navigation-text-size: 0.8125rem; /* 13px — sidebar actions, items, history, and account text */
144
+ --sidebar-section-label-size: 0.8125rem; /* 13px — section and history labels */
142
145
  --panel-header-height: 2.75rem; /* 44px — Panel / toolbar header */
143
146
  --aside-width: 20rem; /* 320px — right-hand panel column */
144
147
 
@@ -153,6 +156,7 @@
153
156
  --composer-bg: color-mix(in oklab, var(--muted) 30%, var(--background));
154
157
  --composer-radius: var(--radius-2xl);
155
158
  --composer-padding: 0.5rem;
159
+ --composer-placeholder-max-h: calc(var(--text-base--line-height) * 2); /* rotating placeholder clamp — two lines of the input's own rhythm, so it can never overlap the accessory row */
156
160
  --chat-texture-opacity: 0.06; /* welcome-state halftone wash */
157
161
  }
158
162
 
@@ -1,15 +0,0 @@
1
- import { ComponentProps, ReactNode } from 'react';
2
- import { Renderer } from '@openuidev/react-lang';
3
- /**
4
- * The OpenUI Lang library used to render fenced `openui-lang` answers. ADS
5
- * ships no default library — the host injects its own component registry via
6
- * {@link OpenUiLibraryProvider}. Absent a provider, structured answers fall
7
- * back to Markdown (see {@link SmartMessageText}).
8
- */
9
- type OpenUiLibrary = ComponentProps<typeof Renderer>["library"];
10
- export declare function OpenUiLibraryProvider({ library, children, }: {
11
- library: OpenUiLibrary;
12
- children: ReactNode;
13
- }): import("react").JSX.Element;
14
- export declare const SmartMessageText: import('react').MemoExoticComponent<() => import("react").JSX.Element>;
15
- export {};
@@ -1,29 +0,0 @@
1
- "use client";
2
- import { jsx as t } from "react/jsx-runtime";
3
- import { createContext as c, memo as p, useContext as m } from "react";
4
- import { useMessagePartText as u } from "@assistant-ui/react";
5
- import { Renderer as d } from "@openuidev/react-lang";
6
- import { MarkdownText as l } from "./markdown-text.js";
7
- const i = c(null);
8
- function M({
9
- library: e,
10
- children: r
11
- }) {
12
- return /* @__PURE__ */ t(i.Provider, { value: e, children: r });
13
- }
14
- const x = /```openui-lang\r?\n([\s\S]*?)(?:\r?\n```|$)/;
15
- function f(e) {
16
- const r = e.match(x);
17
- return r ? r[1].replace(/```$/, "").trimEnd() : null;
18
- }
19
- const g = () => {
20
- var o;
21
- const e = u(), r = m(i), s = e.type === "text" ? e.text : "", n = f(s), a = e.status.type === "running";
22
- return n && r ? /* @__PURE__ */ t("div", { className: "ads-openui my-1", children: /* @__PURE__ */ t(d, { response: n, library: r, isStreaming: a }) }) : (n && typeof process < "u" && ((o = process.env) == null ? void 0 : o.NODE_ENV) !== "production" && console.warn(
23
- "[ADS] SmartMessageText got an openui-lang answer but no OpenUiLibraryProvider is present; falling back to Markdown. Wrap the Thread in <OpenUiLibraryProvider library={…}>."
24
- ), /* @__PURE__ */ t(l, {}));
25
- }, P = p(g);
26
- export {
27
- M as OpenUiLibraryProvider,
28
- P as SmartMessageText
29
- };