@gram-ai/elements 1.35.0 → 1.37.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 (42) hide show
  1. package/dist/components/assistant-ui/markdown-text.d.ts +1 -1
  2. package/dist/components/assistant-ui/thinking-indicator.d.ts +8 -0
  3. package/dist/components/ui/tool-ui.d.ts +3 -1
  4. package/dist/elements.cjs +1 -1
  5. package/dist/elements.css +1 -1
  6. package/dist/elements.js +2 -2
  7. package/dist/hooks/useGramThreadListAdapter.d.ts +8 -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-D0jIGQr7.cjs → index-CGBkMd0d.cjs} +48 -48
  11. package/dist/index-CGBkMd0d.cjs.map +1 -0
  12. package/dist/index-Dpk3C8VH.cjs +194 -0
  13. package/dist/index-Dpk3C8VH.cjs.map +1 -0
  14. package/dist/{index-BhIowiZF.js → index-Em1Ot0b6.js} +8665 -8534
  15. package/dist/index-Em1Ot0b6.js.map +1 -0
  16. package/dist/plugins.cjs +1 -1
  17. package/dist/plugins.js +1 -1
  18. package/dist/{profiler-CtGKTWWP.js → profiler-BnInDjd4.js} +2 -2
  19. package/dist/{profiler-CtGKTWWP.js.map → profiler-BnInDjd4.js.map} +1 -1
  20. package/dist/{profiler-l7_HjTyw.cjs → profiler-DIwReaSQ.cjs} +2 -2
  21. package/dist/{profiler-l7_HjTyw.cjs.map → profiler-DIwReaSQ.cjs.map} +1 -1
  22. package/dist/{startRecording-DEw2Aeq4.cjs → startRecording-Cg4fxzWw.cjs} +2 -2
  23. package/dist/{startRecording-DEw2Aeq4.cjs.map → startRecording-Cg4fxzWw.cjs.map} +1 -1
  24. package/dist/{startRecording-iYEL0-vr.js → startRecording-P_J6QFPD.js} +2 -2
  25. package/dist/{startRecording-iYEL0-vr.js.map → startRecording-P_J6QFPD.js.map} +1 -1
  26. package/dist/types/index.d.ts +8 -0
  27. package/package.json +4 -4
  28. package/src/components/ShadowRoot.tsx +26 -0
  29. package/src/components/assistant-ui/thinking-indicator.tsx +175 -0
  30. package/src/components/assistant-ui/thread.tsx +2 -16
  31. package/src/components/assistant-ui/tool-fallback.tsx +8 -8
  32. package/src/components/assistant-ui/tool-group.tsx +4 -13
  33. package/src/components/ui/tool-ui.tsx +50 -31
  34. package/src/contexts/ElementsProvider.tsx +31 -5
  35. package/src/global.css +55 -16
  36. package/src/hooks/useGramThreadListAdapter.tsx +29 -9
  37. package/src/types/index.ts +9 -0
  38. package/dist/index-BhIowiZF.js.map +0 -1
  39. package/dist/index-D0jIGQr7.cjs.map +0 -1
  40. package/dist/index-Dz13dSDa.js.map +0 -1
  41. package/dist/index-PXd3rs95.cjs +0 -194
  42. package/dist/index-PXd3rs95.cjs.map +0 -1
@@ -13,6 +13,14 @@ export type ChatMessageTransform = (message: GramChatMessage) => GramChatMessage
13
13
  export interface ThreadListAdapterOptions {
14
14
  apiUrl: string;
15
15
  headers: Record<string, string>;
16
+ /**
17
+ * Async header resolution that waits for auth to settle (e.g. the session
18
+ * token fetch) before returning. When provided, every adapter request uses
19
+ * this instead of the `headers` snapshot — which lets the runtime mount
20
+ * before auth resolves: the initial `list()` fires immediately on bind and
21
+ * would otherwise go out with incomplete headers.
22
+ */
23
+ getHeaders?: () => Promise<Record<string, string>>;
16
24
  /** Map to translate local thread IDs to UUIDs (shared with transport) */
17
25
  localIdToUuidMap?: Map<string, string>;
18
26
  /**