@astralbeam/sdk 0.15.1 → 0.16.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.
package/dist/react.js CHANGED
@@ -1,8 +1,8 @@
1
- import { n as CORE_OPTION_KEYS, r as createAstralBeamChat } from "./core-CQcf1z-y.js";
2
- import { M as DEFAULT_COLOR_SCHEME } from "./api-UjE4fiRE.js";
1
+ import { n as CORE_OPTION_KEYS, r as createAstralBeamChat } from "./core-D84VNYWJ.js";
2
+ import { yt as DEFAULT_COLOR_SCHEME } from "./api-DzeMhfHU.js";
3
3
  import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
- import { defineTool, mountAstralBeamChat, mountAstralBeamTenantList, mountAstralBeamTenantUserList } from "@astralbeam/sdk/client";
5
+ import { defineTool, mountAstralBeamChat, mountAstralBeamTenantList, mountAstralBeamTenantUserList, mountAstralBeamThreadList } from "@astralbeam/sdk/client";
6
6
  import { createPortal } from "react-dom";
7
7
  //#region src/react/listings.tsx
8
8
  const AstralBeamTenantList = forwardRef(function AstralBeamTenantList({ className, style, ...options }, ref) {
@@ -19,6 +19,13 @@ const AstralBeamTenantUserList = forwardRef(function AstralBeamTenantUserList({
19
19
  style
20
20
  });
21
21
  });
22
+ const AstralBeamThreadList = forwardRef(function AstralBeamThreadList({ className, style, ...options }, ref) {
23
+ return /* @__PURE__ */ jsx("div", {
24
+ ref: useListingMount(mountAstralBeamThreadList, options, ref),
25
+ className,
26
+ style
27
+ });
28
+ });
22
29
  function useListingMount(mount, options, ref) {
23
30
  const target = useRef(null);
24
31
  const handle = useRef(null);
@@ -117,7 +124,7 @@ function useAstralBeamChat(options) {
117
124
  core
118
125
  };
119
126
  }
120
- const AstralBeamChat = forwardRef(function AstralBeamChat({ agentId, title, showHeader, header, empty, composerActions, emptyTitle, emptyDescription, apiUrl, fetchAstralBeamToken, tools, widgets = {}, colorScheme = DEFAULT_COLOR_SCHEME, theme, customCss, attachments, sandboxPanel, debug }, ref) {
127
+ const AstralBeamChat = forwardRef(function AstralBeamChat({ agentId, threadId, title, showHeader, showConversationTitle, header, headerActions, empty, composerActions, emptyHeadline, emptyDescription, apiUrl, fetchAstralBeamToken, tools, widgets = {}, colorScheme = DEFAULT_COLOR_SCHEME, theme, customCss, attachments, sandboxPanel, debug }, ref) {
121
128
  const targetRef = useRef(null);
122
129
  const handleRef = useRef(null);
123
130
  const [activeRenders, setActiveRenders] = useState(/* @__PURE__ */ new Map());
@@ -162,6 +169,7 @@ const AstralBeamChat = forwardRef(function AstralBeamChat({ agentId, title, show
162
169
  }])), [widgets]);
163
170
  const [chromeContainers, setChromeContainers] = useState(/* @__PURE__ */ new Map());
164
171
  const hasHeader = header !== void 0;
172
+ const hasHeaderActions = headerActions !== void 0;
165
173
  const hasEmpty = empty !== void 0;
166
174
  const hasComposerActions = composerActions !== void 0;
167
175
  const chromeSlots = useMemo(() => {
@@ -177,21 +185,25 @@ const AstralBeamChat = forwardRef(function AstralBeamChat({ agentId, title, show
177
185
  };
178
186
  return {
179
187
  ...hasHeader ? { header: build("header") } : {},
188
+ ...hasHeaderActions ? { headerActions: build("headerActions") } : {},
180
189
  ...hasEmpty ? { empty: build("empty") } : {},
181
190
  ...hasComposerActions ? { composerActions: build("composerActions") } : {}
182
191
  };
183
192
  }, [
184
193
  hasHeader,
194
+ hasHeaderActions,
185
195
  hasEmpty,
186
196
  hasComposerActions
187
197
  ]);
188
198
  const live = useMemo(() => ({
189
199
  agentId,
200
+ threadId,
190
201
  apiUrl,
191
202
  fetchAstralBeamToken,
192
203
  title,
193
204
  showHeader,
194
- emptyTitle,
205
+ showConversationTitle,
206
+ emptyHeadline,
195
207
  emptyDescription,
196
208
  colorScheme,
197
209
  theme,
@@ -204,11 +216,13 @@ const AstralBeamChat = forwardRef(function AstralBeamChat({ agentId, title, show
204
216
  slots: chromeSlots
205
217
  }), [
206
218
  agentId,
219
+ threadId,
207
220
  apiUrl,
208
221
  fetchAstralBeamToken,
209
222
  title,
210
223
  showHeader,
211
- emptyTitle,
224
+ showConversationTitle,
225
+ emptyHeadline,
212
226
  emptyDescription,
213
227
  colorScheme,
214
228
  theme,
@@ -238,6 +252,7 @@ const AstralBeamChat = forwardRef(function AstralBeamChat({ agentId, title, show
238
252
  }, [live]);
239
253
  const chromeContent = {
240
254
  header,
255
+ headerActions,
241
256
  empty,
242
257
  composerActions
243
258
  };
@@ -251,4 +266,4 @@ const AstralBeamChat = forwardRef(function AstralBeamChat({ agentId, title, show
251
266
  });
252
267
  });
253
268
  //#endregion
254
- export { AstralBeamChat, AstralBeamTenantList, AstralBeamTenantUserList, defineTool, defineWidget, useAstralBeamChat };
269
+ export { AstralBeamChat, AstralBeamTenantList, AstralBeamTenantUserList, AstralBeamThreadList, defineTool, defineWidget, useAstralBeamChat };
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));export{c as n,o as t};