@alexkroman1/aai-ui 13.2.0 → 14.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 (83) hide show
  1. package/README.md +159 -69
  2. package/dist/{_colors-j8XMToi9.js → _colors-CpZO-88A.js} +25 -2
  3. package/dist/{_module-url-C_4gRVL0.js → _module-url-C13kAJ87.js} +1 -1
  4. package/dist/_recover-run.d.ts +13 -7
  5. package/dist/_submission-state.d.ts +92 -0
  6. package/dist/_upload-files.d.ts +2 -2
  7. package/dist/_upload-report.d.ts +26 -0
  8. package/dist/{_utils-B6498_bm.js → _utils-DnQDM9Uy.js} +4 -4
  9. package/dist/_utils.d.ts +3 -3
  10. package/dist/_web-storage.d.ts +43 -0
  11. package/dist/_workflow-files.d.ts +1 -1
  12. package/dist/{aai-logo-CXZGPSIY.js → aai-logo-CFlomZlS.js} +1 -1
  13. package/dist/agent-state-labels.d.ts +60 -0
  14. package/dist/audio.js +21 -15
  15. package/dist/{chat-view-DDTtrh7N.js → chat-view-C_3T7Ln8.js} +100 -33
  16. package/dist/{client-config-BT_kWID5.js → client-config-DJQHnYjm.js} +5 -5
  17. package/dist/client-config.d.ts +4 -4
  18. package/dist/client-dir.d.ts +1 -1
  19. package/dist/client-dir.js +2 -2
  20. package/dist/components/_colors.d.ts +23 -0
  21. package/dist/components/_form-readiness.d.ts +1 -1
  22. package/dist/components/bullet-list.d.ts +74 -0
  23. package/dist/components/button.js +4 -4
  24. package/dist/components/chat-view.js +1 -1
  25. package/dist/components/console-shell.d.ts +16 -20
  26. package/dist/components/controls.js +4 -4
  27. package/dist/components/facts.d.ts +81 -0
  28. package/dist/components/form-fields.d.ts +6 -6
  29. package/dist/components/form-types.d.ts +1 -1
  30. package/dist/components/form.d.ts +1 -1
  31. package/dist/components/message-list.js +1 -1
  32. package/dist/components/session-error-banner.d.ts +69 -0
  33. package/dist/components/sidebar-layout.js +1 -1
  34. package/dist/components/start-screen.js +4 -4
  35. package/dist/components/tool-call-block.js +1 -1
  36. package/dist/components/tool-config-context.d.ts +1 -1
  37. package/dist/components/workflow-progress.d.ts +11 -4
  38. package/dist/context.d.ts +142 -19
  39. package/dist/context.js +156 -18
  40. package/dist/default-client/assets/{audio-BuDICbPf.js → audio-9zQsNc1w.js} +1 -1
  41. package/dist/default-client/assets/index-BTv30Z4F.css +2 -0
  42. package/dist/default-client/assets/index-RAZ-29Sz.js +284 -0
  43. package/dist/default-client/index.html +2 -2
  44. package/dist/default-client.d.ts +1 -1
  45. package/dist/define-client.d.ts +19 -19
  46. package/dist/define-client.js +20 -20
  47. package/dist/{eyebrow-C6ZFuiz6.js → eyebrow-UfmSz9yy.js} +1 -1
  48. package/dist/hooks.d.ts +44 -8
  49. package/dist/hooks.js +20 -14
  50. package/dist/index.d.ts +13 -8
  51. package/dist/index.js +1447 -1160
  52. package/dist/internal.d.ts +2 -2
  53. package/dist/internal.js +5 -5
  54. package/dist/{message-list-BJYyuIcR.js → message-list-CdOnSh5m.js} +23 -16
  55. package/dist/page.d.ts +11 -11
  56. package/dist/session-core-audio-setup.d.ts +1 -1
  57. package/dist/session-core-dial.d.ts +0 -2
  58. package/dist/{session-core-DxBYsfHA.js → session-core-gwePM95B.js} +135 -62
  59. package/dist/session-core-messages.d.ts +2 -2
  60. package/dist/session-core-types.d.ts +58 -1
  61. package/dist/session-core.d.ts +6 -6
  62. package/dist/session-core.js +2 -2
  63. package/dist/session-resume-store.d.ts +3 -3
  64. package/dist/{tool-call-block-tcPQAkcP.js → tool-call-block-C2t_5fpp.js} +30 -12
  65. package/dist/{tool-config-context-DzAofqi_.js → tool-config-context-Es4YUzV2.js} +2 -2
  66. package/dist/types.d.ts +19 -4
  67. package/dist/types.js +3 -3
  68. package/dist/{url-chips-YqhCjWfQ.js → url-chips-BxhzZgk2.js} +5 -5
  69. package/dist/use-conversation.d.ts +1 -1
  70. package/dist/use-run-key.d.ts +44 -10
  71. package/dist/{use-user-transcript-C14qWFu2.js → use-user-transcript-uyHhzy4d.js} +4 -3
  72. package/dist/use-workflow-form.d.ts +64 -91
  73. package/dist/{use-workflow-progress-Cu0SxMyg.js → use-workflow-run-CP2ekKPV.js} +254 -257
  74. package/dist/use-workflow-stream.d.ts +5 -2
  75. package/dist/use-workflows.d.ts +77 -0
  76. package/dist/workflow-client.d.ts +1 -1
  77. package/dist/worklets/capture-processor.js +2 -2
  78. package/dist/worklets/playback-processor.js +2 -2
  79. package/package.json +6 -6
  80. package/styles.css +78 -0
  81. package/dist/default-client/assets/index-B1_ROnTJ.js +0 -284
  82. package/dist/default-client/assets/index-S5fkKi6B.css +0 -2
  83. package/dist/tsdown.config.d.ts +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexkroman1/aai-ui",
3
- "version": "13.2.0",
3
+ "version": "14.0.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,17 +21,17 @@
21
21
  ],
22
22
  "exports": {
23
23
  ".": {
24
- "@dev/source": "./index.ts",
24
+ "@dev/source": "./src/index.ts",
25
25
  "types": "./dist/index.d.ts",
26
26
  "import": "./dist/index.js"
27
27
  },
28
28
  "./client-dir": {
29
- "@dev/source": "./client-dir.ts",
29
+ "@dev/source": "./src/client-dir.ts",
30
30
  "types": "./dist/client-dir.d.ts",
31
31
  "import": "./dist/client-dir.js"
32
32
  },
33
33
  "./internal": {
34
- "@dev/source": "./internal.ts",
34
+ "@dev/source": "./src/internal.ts",
35
35
  "types": "./dist/internal.d.ts",
36
36
  "import": "./dist/internal.js"
37
37
  },
@@ -46,7 +46,7 @@
46
46
  "use-stick-to-bottom": "^1.1.6",
47
47
  "use-sync-external-store": "^1.6.0",
48
48
  "xstate": "^5.32.6",
49
- "@alexkroman1/aai": "13.2.0"
49
+ "@alexkroman1/aai": "14.0.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tailwindcss/vite": "^4.3.3",
@@ -75,7 +75,7 @@
75
75
  }
76
76
  },
77
77
  "scripts": {
78
- "build": "tsdown && tsc -p tsconfig.build.json && node build-default-client.ts",
78
+ "build": "tsdown && tsc -p tsconfig.build.json && node src/build-default-client.ts",
79
79
  "check:attw": "attw --pack --profile esm-only --exclude-entrypoints styles.css",
80
80
  "check:publint": "publint",
81
81
  "lint": "biome check .",
package/styles.css CHANGED
@@ -85,3 +85,81 @@
85
85
  -webkit-text-fill-color: transparent;
86
86
  animation: aai-shimmer 2s infinite;
87
87
  }
88
+
89
+ /*
90
+ * Reduced motion is honoured HERE, once, for everything this stylesheet reaches.
91
+ *
92
+ * Roughly nineteen INFINITE animations ship in an aai app and, until this block,
93
+ * not one of them asked: `prefers-reduced-motion` appeared zero times in the
94
+ * repository. `aai-pulse` on the console shell's live dot, `aai-bounce` on the
95
+ * thinking dots, `aai-shimmer` on every streaming tool row, Tailwind's
96
+ * `animate-pulse` on an indeterminate upload bar — all of them running for as
97
+ * long as the page is open. For a reader with a vestibular disorder that is not
98
+ * decoration, it is the reason they close the tab.
99
+ *
100
+ * **The universal selector is the leverage point, and it is the only thing that
101
+ * reaches the TEMPLATES.** Every template's `client.tsx` opens with
102
+ * `import "@alexkroman1/aai-ui/styles.css"`, and several then declare keyframes
103
+ * of their own in an inline `<style>` block: `dc-pulse`/`dc-slide-in`
104
+ * (dispatch-center), `rt-pulse`/`rt-slide-in` (retail), `crisisPulse`
105
+ * (solo-rpg), and `ic-flicker`/`ic-scanline`/`ic-pulse` (infocom-adventure,
106
+ * which flickers the whole viewport's opacity and sweeps a scanline across the
107
+ * page — the worst thing in the repo for a motion-sensitive reader). Nothing in
108
+ * this package knows those names, and no per-component fix could: it would have
109
+ * to be written again in every template, by every author who copies one, and
110
+ * the author who forgets leaves no trace in a diff. A universal selector does
111
+ * not need to know the name of the animation it is stopping. That is also what
112
+ * makes this the right FILE rather than merely a convenient one — the published
113
+ * sheet is the single artifact every client already imports, so a template opts
114
+ * in by existing, and one written next year opts in before it is written.
115
+ *
116
+ * Four properties, because motion arrives four ways:
117
+ *
118
+ * - `animation-duration` and `animation-iteration-count` — the keyframe half.
119
+ * The count carries its own weight: cut the duration alone and an `infinite`
120
+ * animation is still infinite, merely very fast, which is worse than what it
121
+ * replaced.
122
+ * - `transition-duration` — the property-change half, which no search for
123
+ * `@keyframes` would ever turn up.
124
+ * - `scroll-behavior` — the CSS half of scrolling: a host page or template
125
+ * declaring `scroll-behavior: smooth`, and any `scrollIntoView()` /
126
+ * `scrollTo()` that left the behaviour to CSS. Note what it does NOT reach.
127
+ * `AutoScroll`'s `resize: "smooth"` default is a requestAnimationFrame SPRING
128
+ * inside `use-stick-to-bottom` (which reads no media query of its own, and
129
+ * sets `scroll-behavior: auto` inline while it writes `scrollTop` anyway), so
130
+ * silencing that one is a change in `components/auto-scroll.tsx` and is still
131
+ * owed. Recording the gap beats letting the next reader assume it is covered.
132
+ *
133
+ * `0.01ms` rather than `0s` on both durations is deliberate: a zero-duration
134
+ * animation or transition fires no `animationend`/`transitionend`, so anything
135
+ * awaiting one — ours or a consumer's — waits forever. Effectively instant, and
136
+ * still an event.
137
+ *
138
+ * `!important`, and no `@layer`, is what lets this outrank the three ways motion
139
+ * is actually declared here: a Tailwind utility (`animate-pulse`), a template's
140
+ * own `<style>` block, and the inline `style={{ animation: … }}` that
141
+ * `ConsoleShell` and `MessageList` write — an author `!important` beats a normal
142
+ * inline declaration, which is the only reason those last two are covered. A
143
+ * reader who asked their OS for less motion outranks all three.
144
+ *
145
+ * Biome's `noImportantStyles` warns on all four declarations and the warnings
146
+ * STAY. The rule's argument — that `!important` reverses the cascade — is the
147
+ * property being used on purpose here, this block existing precisely to outrank
148
+ * a declaration written closer to the element. It is not suppressed either: a
149
+ * lint suppression is a counted escape hatch (`pnpm check:hatches`), so
150
+ * silencing a warning that is really a design note would spend four of them, and
151
+ * `biome check .` exits 0 on warnings, so nothing is gated on it.
152
+ *
153
+ * `src/styles-motion.test.ts` asserts this block against the stylesheet SOURCE,
154
+ * a spec having no way to render CSS.
155
+ */
156
+ @media (prefers-reduced-motion: reduce) {
157
+ *,
158
+ *::before,
159
+ *::after {
160
+ animation-duration: 0.01ms !important;
161
+ animation-iteration-count: 1 !important;
162
+ transition-duration: 0.01ms !important;
163
+ scroll-behavior: auto !important;
164
+ }
165
+ }