@gram-ai/elements 1.35.0 → 1.36.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 (34) hide show
  1. package/dist/components/assistant-ui/thinking-indicator.d.ts +8 -0
  2. package/dist/components/ui/tool-ui.d.ts +3 -1
  3. package/dist/elements.cjs +1 -1
  4. package/dist/elements.css +1 -1
  5. package/dist/elements.js +2 -2
  6. package/dist/{index-PXd3rs95.cjs → index-7fTI_vaV.cjs} +48 -48
  7. package/dist/index-7fTI_vaV.cjs.map +1 -0
  8. package/dist/{index-Dz13dSDa.js → index-Bv-yE4G1.js} +2874 -2803
  9. package/dist/index-Bv-yE4G1.js.map +1 -0
  10. package/dist/{index-BhIowiZF.js → index-BziIHO9O.js} +4688 -4579
  11. package/dist/index-BziIHO9O.js.map +1 -0
  12. package/dist/{index-D0jIGQr7.cjs → index-CGBkMd0d.cjs} +48 -48
  13. package/dist/index-CGBkMd0d.cjs.map +1 -0
  14. package/dist/plugins.cjs +1 -1
  15. package/dist/plugins.js +1 -1
  16. package/dist/{profiler-l7_HjTyw.cjs → profiler-DuJEf_S6.cjs} +2 -2
  17. package/dist/{profiler-l7_HjTyw.cjs.map → profiler-DuJEf_S6.cjs.map} +1 -1
  18. package/dist/{profiler-CtGKTWWP.js → profiler-xLXOPfmj.js} +2 -2
  19. package/dist/{profiler-CtGKTWWP.js.map → profiler-xLXOPfmj.js.map} +1 -1
  20. package/dist/{startRecording-DEw2Aeq4.cjs → startRecording-C2XF9-Ol.cjs} +2 -2
  21. package/dist/{startRecording-DEw2Aeq4.cjs.map → startRecording-C2XF9-Ol.cjs.map} +1 -1
  22. package/dist/{startRecording-iYEL0-vr.js → startRecording-qKnXr4lw.js} +2 -2
  23. package/dist/{startRecording-iYEL0-vr.js.map → startRecording-qKnXr4lw.js.map} +1 -1
  24. package/package.json +2 -2
  25. package/src/components/assistant-ui/thinking-indicator.tsx +175 -0
  26. package/src/components/assistant-ui/thread.tsx +2 -16
  27. package/src/components/assistant-ui/tool-fallback.tsx +8 -8
  28. package/src/components/assistant-ui/tool-group.tsx +4 -13
  29. package/src/components/ui/tool-ui.tsx +50 -31
  30. package/src/global.css +55 -16
  31. package/dist/index-BhIowiZF.js.map +0 -1
  32. package/dist/index-D0jIGQr7.cjs.map +0 -1
  33. package/dist/index-Dz13dSDa.js.map +0 -1
  34. package/dist/index-PXd3rs95.cjs.map +0 -1
package/src/global.css CHANGED
@@ -258,14 +258,36 @@
258
258
 
259
259
  /* assistant-ui streaming indicator — rainbow gradient ring matches the
260
260
  Speakeasy brand palette used elsewhere (see `INSIGHTS_AI_RAINBOW_BORDER_CLASS`
261
- and the login page's BrandGradientBar). */
261
+ and the login page's BrandGradientBar). Shared as a variable so the inline
262
+ trailing dot and the standalone "thinking" dot stay in sync. */
263
+ .gram-elements {
264
+ --aui-rainbow: conic-gradient(
265
+ from 0deg,
266
+ #320f1e,
267
+ #c83228,
268
+ #fb873f,
269
+ #d2dc91,
270
+ #5a8250,
271
+ #002314,
272
+ #00143c,
273
+ #2873d7,
274
+ #9bc3ff,
275
+ #320f1e
276
+ );
277
+ /* Spin shorthand shared by both rainbow dots so a single reduced-motion
278
+ override (below) stops all of them at once. */
279
+ --aui-spin: aui-rainbow-spin 1.6s linear infinite;
280
+ }
281
+
262
282
  @keyframes aui-rainbow-spin {
263
283
  to {
264
284
  transform: rotate(360deg);
265
285
  }
266
286
  }
267
287
 
268
- .gram-elements :where(.aui-md[data-status="running"]):empty::after,
288
+ /* Trailing dot that follows answer text as it streams. The "before first
289
+ token" state is handled by <ThinkingIndicator> (cycling verbs), so there is
290
+ deliberately no `:empty::after` rule here. */
269
291
  .gram-elements
270
292
  :where(.aui-md[data-status="running"])
271
293
  > :where(:not(ol):not(ul):not(pre)):last-child::after,
@@ -301,19 +323,29 @@
301
323
  margin-right: 0.15rem;
302
324
  padding: 3px;
303
325
  border-radius: 50%;
304
- background: conic-gradient(
305
- from 0deg,
306
- #320f1e,
307
- #c83228,
308
- #fb873f,
309
- #d2dc91,
310
- #5a8250,
311
- #002314,
312
- #00143c,
313
- #2873d7,
314
- #9bc3ff,
315
- #320f1e
316
- );
326
+ background: var(--aui-rainbow);
327
+ -webkit-mask:
328
+ linear-gradient(#fff 0 0) content-box,
329
+ linear-gradient(#fff 0 0);
330
+ -webkit-mask-composite: xor;
331
+ mask:
332
+ linear-gradient(#fff 0 0) content-box,
333
+ linear-gradient(#fff 0 0);
334
+ mask-composite: exclude;
335
+ animation: var(--aui-spin);
336
+ }
337
+
338
+ /* Standalone rainbow dot for the cycling "thinking" indicator (shown before
339
+ the assistant streams any answer text). Same ring as the inline dot above. */
340
+ .gram-elements .aui-thinking-dot {
341
+ display: inline-block;
342
+ box-sizing: border-box;
343
+ flex-shrink: 0;
344
+ width: 0.95em;
345
+ height: 0.95em;
346
+ padding: 2.5px;
347
+ border-radius: 50%;
348
+ background: var(--aui-rainbow);
317
349
  -webkit-mask:
318
350
  linear-gradient(#fff 0 0) content-box,
319
351
  linear-gradient(#fff 0 0);
@@ -322,7 +354,14 @@
322
354
  linear-gradient(#fff 0 0) content-box,
323
355
  linear-gradient(#fff 0 0);
324
356
  mask-composite: exclude;
325
- animation: aui-rainbow-spin 1.6s linear infinite;
357
+ animation: var(--aui-spin);
358
+ }
359
+
360
+ @media (prefers-reduced-motion: reduce) {
361
+ /* Stops both the trailing streaming dot and the standalone thinking dot. */
362
+ .gram-elements {
363
+ --aui-spin: none;
364
+ }
326
365
  }
327
366
 
328
367
  /* Simple shimmer animation for title text */