@gram-ai/elements 1.27.1 → 1.27.3

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.
package/dist/elements.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CP-wWZCV.cjs"),r=require("./index-BpJstUh1.cjs");exports.Calendar=e.Calendar;exports.Chat=e.Chat;exports.ChatHistory=e.ChatHistory;exports.ElementsProvider=e.ElementsProvider;exports.GramElementsProvider=e.ElementsProvider;exports.MODELS=e.MODELS;exports.PRESETS=e.PRESETS;exports.Replay=e.Replay;exports.ShareButton=e.ShareButton;exports.TimeRangePicker=e.TimeRangePicker;exports.defineFrontendTool=e.defineFrontendTool;exports.getPresetRange=e.getPresetRange;exports.trackError=e.trackError;exports.useRecordCassette=e.useRecordCassette;exports.useThreadId=e.useThreadId;exports.useChatId=r.useChatId;exports.useElements=r.useElements;exports.useGramElements=r.useElements;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DxfW52oA.cjs"),r=require("./index-BpJstUh1.cjs");exports.Calendar=e.Calendar;exports.Chat=e.Chat;exports.ChatHistory=e.ChatHistory;exports.ElementsProvider=e.ElementsProvider;exports.GramElementsProvider=e.ElementsProvider;exports.MODELS=e.MODELS;exports.PRESETS=e.PRESETS;exports.Replay=e.Replay;exports.ShareButton=e.ShareButton;exports.TimeRangePicker=e.TimeRangePicker;exports.defineFrontendTool=e.defineFrontendTool;exports.getPresetRange=e.getPresetRange;exports.trackError=e.trackError;exports.useRecordCassette=e.useRecordCassette;exports.useThreadId=e.useThreadId;exports.useChatId=r.useChatId;exports.useElements=r.useElements;exports.useGramElements=r.useElements;
2
2
  //# sourceMappingURL=elements.cjs.map
package/dist/elements.js CHANGED
@@ -1,4 +1,4 @@
1
- import { al as s, aa as r, ab as t, a8 as o, a8 as n, ah as d, ak as m, ad as l, ac as E, ai as i, af as h, aj as u, ag as C, ae as P, a9 as R } from "./index-oO5BAmPI.js";
1
+ import { al as s, aa as r, ab as t, a8 as o, a8 as n, ah as d, ak as m, ad as l, ac as E, ai as i, af as h, aj as u, ag as C, ae as P, a9 as R } from "./index-DBrhzauj.js";
2
2
  import { V as f, H as g, H as S } from "./index-CUitXazZ.js";
3
3
  export {
4
4
  s as Calendar,
@@ -2,13 +2,15 @@ import { ApiConfig } from '../types';
2
2
  export type Auth = {
3
3
  headers: Record<string, string>;
4
4
  isLoading: false;
5
+ ensureValidHeaders: () => Promise<Record<string, string>>;
5
6
  } | {
6
7
  headers?: Record<string, string>;
7
8
  isLoading: true;
9
+ ensureValidHeaders: () => Promise<Record<string, string>>;
8
10
  };
9
11
  /**
10
12
  * Hook to fetch or retrieve the session token for the chat.
11
- * @returns The session token string or null
13
+ * @returns Auth object with headers and ensureValidHeaders for pre-request token refresh
12
14
  */
13
15
  export declare const useAuth: ({ projectSlug, auth, }: {
14
16
  auth?: ApiConfig;
@@ -1,4 +1,5 @@
1
1
  import { GetSessionFn } from '../types';
2
+ export declare function getChatSessionQueryKey(projectSlug: string): readonly ["chatSession", string];
2
3
  /**
3
4
  * Hook to fetch or retrieve the session token for the chat.
4
5
  * @returns The session token string or null