@gram-ai/elements 1.37.0 → 1.38.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 (38) hide show
  1. package/dist/components/Markdown.d.ts +7 -0
  2. package/dist/components/MessageContent.d.ts +4 -0
  3. package/dist/components/ui/tool-ui.d.ts +52 -3
  4. package/dist/contexts/ThreadMetaContext.d.ts +20 -0
  5. package/dist/elements.cjs +1 -1
  6. package/dist/elements.css +1 -1
  7. package/dist/elements.js +26 -22
  8. package/dist/hooks/useMCPTools.d.ts +1 -1
  9. package/dist/{index-Em1Ot0b6.js → index--UMkUr53.js} +27562 -21884
  10. package/dist/index--UMkUr53.js.map +1 -0
  11. package/dist/index-Cz9y5YHw.cjs +222 -0
  12. package/dist/index-Cz9y5YHw.cjs.map +1 -0
  13. package/dist/index.d.ts +4 -0
  14. package/dist/lib/messageConverter.d.ts +2 -0
  15. package/dist/{profiler-BnInDjd4.js → profiler-BHXyuGiY.js} +2 -2
  16. package/dist/{profiler-BnInDjd4.js.map → profiler-BHXyuGiY.js.map} +1 -1
  17. package/dist/{profiler-DIwReaSQ.cjs → profiler-jAEvoPXB.cjs} +2 -2
  18. package/dist/{profiler-DIwReaSQ.cjs.map → profiler-jAEvoPXB.cjs.map} +1 -1
  19. package/dist/{startRecording-P_J6QFPD.js → startRecording-D8IbKhJo.js} +2 -2
  20. package/dist/{startRecording-P_J6QFPD.js.map → startRecording-D8IbKhJo.js.map} +1 -1
  21. package/dist/{startRecording-Cg4fxzWw.cjs → startRecording-Dw4aGDrV.cjs} +2 -2
  22. package/dist/{startRecording-Cg4fxzWw.cjs.map → startRecording-Dw4aGDrV.cjs.map} +1 -1
  23. package/package.json +11 -13
  24. package/src/components/Markdown.tsx +210 -0
  25. package/src/components/MessageContent.tsx +9 -0
  26. package/src/components/assistant-ui/thinking-indicator.tsx +42 -0
  27. package/src/components/assistant-ui/thread-list.tsx +50 -5
  28. package/src/components/ui/tool-ui.tsx +360 -7
  29. package/src/contexts/ElementsProvider.tsx +2 -1
  30. package/src/contexts/ThreadMetaContext.ts +27 -0
  31. package/src/hooks/useGramThreadListAdapter.tsx +101 -20
  32. package/src/hooks/useMCPTools.ts +1 -1
  33. package/src/index.ts +18 -0
  34. package/src/lib/messageConverter.ts +5 -0
  35. package/src/lib/tools.test.ts +24 -12
  36. package/dist/index-Dpk3C8VH.cjs +0 -194
  37. package/dist/index-Dpk3C8VH.cjs.map +0 -1
  38. package/dist/index-Em1Ot0b6.js.map +0 -1
package/dist/elements.js CHANGED
@@ -1,30 +1,34 @@
1
- import { aj as s, ar as r, aa as t, ab as o, a8 as n, a8 as E, al as m, ae as d, aq as l, af as S, ac as T, ao as c, ad as g, an as i, am as C, ah as h, ak as p, ap as u, ai as I, ag as M, a9 as R } from "./index-Em1Ot0b6.js";
2
- import { s as P, W as f, I as k, I as v } from "./index-Bv-yE4G1.js";
1
+ import { an as e, av as r, aa as o, ab as t, a8 as n, a8 as d, ap as l, af as E, ae as m, au as i, aj as S, ac as T, ai as g, as as c, ad as h, ag as C, ah as I, ar as u, aq as M, al as p, ao as R, at as k, am as v, ak as G, a9 as P } from "./index--UMkUr53.js";
2
+ import { s as x, W as U, I as b, I as y } from "./index-Bv-yE4G1.js";
3
3
  export {
4
- s as CREDITS_EXHAUSTED_MESSAGE,
4
+ e as CREDITS_EXHAUSTED_MESSAGE,
5
5
  r as Calendar,
6
- t as Chat,
7
- o as ChatHistory,
6
+ o as Chat,
7
+ t as ChatHistory,
8
8
  n as ElementsProvider,
9
- E as GramElementsProvider,
10
- m as MODELS,
11
- d as MessageContent,
12
- l as PRESETS,
9
+ d as GramElementsProvider,
10
+ l as MODELS,
11
+ E as Markdown,
12
+ m as MessageContent,
13
+ i as PRESETS,
13
14
  S as Replay,
14
15
  T as ShareButton,
16
+ g as SyntaxHighlightedCode,
15
17
  c as TimeRangePicker,
16
- g as ToolFallback,
17
- i as convertGramMessagesToExported,
18
- C as convertGramMessagesToUIMessages,
19
- h as defineFrontendTool,
20
- p as describeStreamError,
21
- u as getPresetRange,
22
- P as sleep,
23
- I as trackError,
24
- f as useChatId,
25
- k as useElements,
26
- v as useGramElements,
27
- M as useRecordCassette,
28
- R as useThreadId
18
+ h as ToolFallback,
19
+ C as ToolUI,
20
+ I as ToolUISection,
21
+ u as convertGramMessagesToExported,
22
+ M as convertGramMessagesToUIMessages,
23
+ p as defineFrontendTool,
24
+ R as describeStreamError,
25
+ k as getPresetRange,
26
+ x as sleep,
27
+ v as trackError,
28
+ U as useChatId,
29
+ b as useElements,
30
+ y as useGramElements,
31
+ G as useRecordCassette,
32
+ P as useThreadId
29
33
  };
30
34
  //# sourceMappingURL=elements.js.map
@@ -1,5 +1,5 @@
1
1
  import { MCPServerEntry, ToolsFilter } from '../types';
2
- import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
2
+ import { createMCPClient } from '@ai-sdk/mcp';
3
3
  import { UseQueryResult } from '@tanstack/react-query';
4
4
  import { Auth } from './useAuth';
5
5
  type MCPToolsResult = Awaited<ReturnType<Awaited<ReturnType<typeof createMCPClient>>["tools"]>>;