@astralbeam/sdk 0.23.6 → 0.24.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/README.md CHANGED
@@ -34,7 +34,7 @@ Without npm or a bundler, import the same entry from jsDelivr in a module script
34
34
  ```html
35
35
  <div id="sidebar" style="height:100dvh"></div>
36
36
  <script type="module">
37
- import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.23.6/dist/client.js"
37
+ import { mountAstralBeamChat } from "https://cdn.jsdelivr.net/npm/@astralbeam/sdk@0.24.0/dist/client.js"
38
38
 
39
39
  mountAstralBeamChat(document.getElementById("sidebar"), {})
40
40
  </script>
@@ -93,15 +93,17 @@ After acquiring a token, components call `POST /api/v1/me` and renew before expi
93
93
 
94
94
  Pass options as React props or apply a subset with `handle.update(options)`. Presentation changes preserve chat. Changing `threadId` selects a conversation, and changing `apiUrl` clears the previous deployment's state. See [Configuration](https://astralbeam.ai/docs/sdk/configuration) for all options, defaults, layout, and chrome slots.
95
95
 
96
- A `ref` on `<AstralBeamChat>` (and the vanilla handle) exposes `reset()` and `stop()` for hosts that draw their own controls.
96
+ Most embeds let `<AstralBeamChat {...options} />` manage the session. For external controls, create `chat` with `useAstralBeamChat(options)` and render `<AstralBeamChat chat={chat} />`. Configure authentication and tools on the hook, with widgets and appearance on the view. Call actions directly on `chat` and read state through `chat.getState()`.
97
+
98
+ **Migration:** replace chat refs and mount-handle commands with session actions. Use `chat` instead of `chat.core`, and `chat.getState()` instead of snapshot fields. Directory handles are unchanged. See Configuration for ownership and JavaScript usage.
97
99
 
98
100
  Conversations are saved automatically and start private. The widget searches saved conversation titles. Reopening history does not execute earlier tool calls. Disconnecting can interrupt the current response.
99
101
 
100
- The headless session exposes conversation navigation, search, and pagination. With `useAstralBeamChat`, access these through `chat.core`, for example `chat.core.openThread(threadId)`. History loads a page at a time. `reset()` starts a new chat and keeps the saved one.
102
+ The headless session exposes conversation navigation, search, and pagination. With `useAstralBeamChat`, access these through `chat`, for example `chat.openThread(threadId)`. History loads a page at a time. `reset()` starts a new chat and keeps the saved one.
101
103
 
102
- Download an attachment with `chat.core.getThreadAttachment({ threadId, fileId })`, which returns a `Blob`. Organization and participant tenant scope come from your credentials. Administrative downloads also pass `tenantId`. Use `{ preview: true }` as the second argument for a thumbnail. Only previews of your unsent uploads may omit `threadId`.
104
+ Download an attachment with `chat.getThreadAttachment({ threadId, fileId })`, which returns a `Blob`. Organization and participant tenant scope come from your credentials. Administrative downloads also pass `tenantId`. Use `{ preview: true }` as the second argument for a thumbnail. Only previews of your unsent uploads may omit `threadId`.
103
105
 
104
- By default, `threadId: "auto"` restores this tab's selection after reload using session storage, scoped to the current account and API. A fresh, independently opened tab starts a new chat. Use `threadId: "new"` to bypass restoration, or pass a saved thread UUID. The widget keeps unsent text and uploaded file references in local storage per account, API, and conversation. Reopening restores the draft without sending it automatically. The host owns sidebar visibility and can persist it separately in session storage.
106
+ By default, `threadId: "auto"` restores this tab's selection after reload using session storage, scoped to the current account, API, and `placementKey ?? agentId ?? "default"`. Use distinct placement keys for independent chats with the same agent. A fresh, independently opened tab starts a new chat. Use `threadId: "new"` to bypass restoration, or pass a saved thread UUID. The widget keeps unsent text and uploaded file references in local storage per placement, account, API, and conversation. Reopening restores the draft without sending it automatically. The host owns sidebar visibility and can persist it separately in session storage.
105
107
 
106
108
  ## Tools and widgets
107
109
 
@@ -52,8 +52,18 @@ async function astralBeamApiFetch(path, options) {
52
52
  function astralBeamJwtFetch(path, options) {
53
53
  return astralBeamApiFetch(path, options);
54
54
  }
55
- function astralBeamResourceFetch(path, options) {
56
- return apiResponse(path, options);
55
+ async function astralBeamResourceFetch(path, options) {
56
+ const response = await apiResponse(path, options);
57
+ const location = response.status === 204 ? response.headers.get("location") : null;
58
+ if (!location) return response;
59
+ const download = await globalThis.fetch(location, {
60
+ credentials: "omit",
61
+ redirect: "error",
62
+ referrerPolicy: "no-referrer",
63
+ signal: options.signal ?? null
64
+ });
65
+ if (!download.ok) throw new Error("The file could not be downloaded. Please try again.");
66
+ return download;
57
67
  }
58
68
  function astralBeamChatFetch(path, options) {
59
69
  return apiResponse(path, options);
@@ -143,6 +153,7 @@ const UploadChatFileBodyType = {
143
153
  document: "document"
144
154
  };
145
155
  const UploadChatFileBodySourceType = { data: "data" };
156
+ const GetThreadAttachmentDelivery = { direct: "direct" };
146
157
  const getListTenantsUrl = (params) => {
147
158
  const normalizedParams = new URLSearchParams();
148
159
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -410,7 +421,7 @@ const getGetThreadAttachmentUrl = (params) => {
410
421
  return stringifiedParams.length > 0 ? `/api/v1/chat/files?${stringifiedParams}` : `/api/v1/chat/files`;
411
422
  };
412
423
  /**
413
- * Pass the fileId from a saved message, its threadId, and an optional download filename. Tenant JWTs require current conversation membership. Administrative reads also pass tenantId and require directory-read permission through an Organization API key, Organization-management JWT, or signed Tenant admin JWT. Send X-File-Preview: true for a cached thumbnail, or 204 when unavailable. Only the uploader's unsent previews may omit threadId. Original downloads verify stored bytes.
424
+ * Pass the fileId from a saved message, its threadId, and an optional download filename. Tenant JWTs require current conversation membership. Administrative reads also pass tenantId and require directory-read permission through an Organization API key, Organization-management JWT, or signed Tenant admin JWT. Send X-File-Preview: true for a cached thumbnail, or 204 when unavailable. Only the uploader's unsent previews may omit threadId. Original proxied downloads verify stored bytes. Request delivery=direct to receive 204 with a short-lived S3 URL in Location after authorization. A preview may still return 204 without Location when unavailable. Fetch storage URLs without application credentials and do not cache these capability responses.
414
425
  * @summary Download a chat file
415
426
  */
416
427
  const getThreadAttachment = (params, options) => {
@@ -834,4 +845,4 @@ const personalMcpCompleteAuthorization = (id, personalMcpCompleteAuthorizationBo
834
845
  });
835
846
  };
836
847
  //#endregion
837
- export { getPersonalMcpSetHeadersUrl as $, getGetChatConfigUrl as A, resolveChatToolResult as At, getListChatParticipantsUrl as B, resolveApiUrl as Bt, getChatThread as C, personalMcpCompleteAuthorization as Ct, getCreateTenantUserUrl as D, personalMcpSetHeaders as Dt, getCreateTenantUrl as E, personalMcpGetCatalog as Et, getGetTenantUrl as F, updateTenant as Ft, getListUsersForTenantUrl as G, getListTenantsUrl as H, DEFAULT_CHAT_AUTH_TOKEN_URL as Ht, getGetTenantUserUrl as I, updateTenantUser as It, getPersonalMcpBindBrowserUrl as J, getOrganization as K, getGetTenantUserUsageUrl as L, uploadChatFile as Lt, getGetChatUsageUrl as M, searchChatTenantUsers as Mt, getGetCurrentUserUrl as N, setChatParticipant as Nt, getCurrentUser as O, personalMcpTestConnection as Ot, getGetOrganizationUrl as P, updateChatThread as Pt, getPersonalMcpGetCatalogUrl as Q, getGetThreadAttachmentUrl as R, astralBeamChatFetch as Rt, getChatConfig as S, personalMcpBindBrowser as St, getCreateChatThreadUrl as T, personalMcpDisconnectConnection as Tt, getListThreadMessagesUrl as U, DEFAULT_COLOR_SCHEME as Ut, getListChatThreadsUrl as V, DEFAULT_API_URL as Vt, getListThreadsUrl as W, getPersonalMcpCreateConnectionUrl as X, getPersonalMcpCompleteAuthorizationUrl as Y, getPersonalMcpDisconnectConnectionUrl as Z, UploadChatFileBodyType as _, listTenants as _t, ChatMessageEncodedRole as a, getSetChatParticipantUrl as at, createTenantUser as b, listUsersForTenant as bt, ChatThreadEncodedRole as c, getTenantUserUsage as ct, ListUsersForTenantFilterAdmin as d, getUpdateTenantUrl as dt, getPersonalMcpTestConnectionUrl as et, McpConnectionEncodedAuthState as f, getUpdateTenantUserUrl as ft, UploadChatFileBodySourceType as g, listChatThreads as gt, SetChatParticipantInputEncodedRole as h, listChatParticipants as ht, ChatHistoryPageEncodedThreadRole as i, getSearchChatTenantUsersUrl as it, getGetChatThreadUrl as j, runChat as jt, getDeleteChatThreadUrl as k, removeChatParticipant as kt, ChatUsageUsageLimitsItemMetric as l, getThreadAttachment as lt, ResolveChatToolResultInputEncodedResultsItemOutcome as m, listChatMessages as mt, ChatHistoryPageEncodedMessagesItemState as n, getResolveChatToolResultUrl as nt, ChatMessageEncodedState as o, getTenant as ot, McpServerEncodedAuthKind as p, getUploadChatFileUrl as pt, getPersonalMcpAuthorizeConnectionUrl as q, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation as r, getRunChatUrl as rt, ChatParticipantEncodedRole as s, getTenantUser as st, ChatHistoryPageEncodedMessagesItemRole as t, getRemoveChatParticipantUrl as tt, ChatUsageUsageLimitsItemScope as u, getUpdateChatThreadUrl as ut, createChatThread as v, listThreadMessages as vt, getChatUsage as w, personalMcpCreateConnection as wt, deleteChatThread as x, personalMcpAuthorizeConnection as xt, createTenant as y, listThreads as yt, getListChatMessagesUrl as z, isAstralBeamApiError as zt };
848
+ export { getPersonalMcpGetCatalogUrl as $, getDeleteChatThreadUrl as A, removeChatParticipant as At, getListChatMessagesUrl as B, isAstralBeamApiError as Bt, getChatConfig as C, personalMcpBindBrowser as Ct, getCreateTenantUrl as D, personalMcpGetCatalog as Dt, getCreateChatThreadUrl as E, personalMcpDisconnectConnection as Et, getGetOrganizationUrl as F, updateChatThread as Ft, getListThreadsUrl as G, getListChatThreadsUrl as H, DEFAULT_API_URL as Ht, getGetTenantUrl as I, updateTenant as It, getPersonalMcpAuthorizeConnectionUrl as J, getListUsersForTenantUrl as K, getGetTenantUserUrl as L, updateTenantUser as Lt, getGetChatThreadUrl as M, runChat as Mt, getGetChatUsageUrl as N, searchChatTenantUsers as Nt, getCreateTenantUserUrl as O, personalMcpSetHeaders as Ot, getGetCurrentUserUrl as P, setChatParticipant as Pt, getPersonalMcpDisconnectConnectionUrl as Q, getGetTenantUserUsageUrl as R, uploadChatFile as Rt, deleteChatThread as S, personalMcpAuthorizeConnection as St, getChatUsage as T, personalMcpCreateConnection as Tt, getListTenantsUrl as U, DEFAULT_CHAT_AUTH_TOKEN_URL as Ut, getListChatParticipantsUrl as V, resolveApiUrl as Vt, getListThreadMessagesUrl as W, DEFAULT_COLOR_SCHEME as Wt, getPersonalMcpCompleteAuthorizationUrl as X, getPersonalMcpBindBrowserUrl as Y, getPersonalMcpCreateConnectionUrl as Z, UploadChatFileBodySourceType as _, listChatThreads as _t, ChatMessageEncodedRole as a, getSearchChatTenantUsersUrl as at, createTenant as b, listThreads as bt, ChatThreadEncodedRole as c, getTenantUser as ct, GetThreadAttachmentDelivery as d, getUpdateChatThreadUrl as dt, getPersonalMcpSetHeadersUrl as et, ListUsersForTenantFilterAdmin as f, getUpdateTenantUrl as ft, SetChatParticipantInputEncodedRole as g, listChatParticipants as gt, ResolveChatToolResultInputEncodedResultsItemOutcome as h, listChatMessages as ht, ChatHistoryPageEncodedThreadRole as i, getRunChatUrl as it, getGetChatConfigUrl as j, resolveChatToolResult as jt, getCurrentUser as k, personalMcpTestConnection as kt, ChatUsageUsageLimitsItemMetric as l, getTenantUserUsage as lt, McpServerEncodedAuthKind as m, getUploadChatFileUrl as mt, ChatHistoryPageEncodedMessagesItemState as n, getRemoveChatParticipantUrl as nt, ChatMessageEncodedState as o, getSetChatParticipantUrl as ot, McpConnectionEncodedAuthState as p, getUpdateTenantUserUrl as pt, getOrganization as q, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation as r, getResolveChatToolResultUrl as rt, ChatParticipantEncodedRole as s, getTenant as st, ChatHistoryPageEncodedMessagesItemRole as t, getPersonalMcpTestConnectionUrl as tt, ChatUsageUsageLimitsItemScope as u, getThreadAttachment as ut, UploadChatFileBodyType as v, listTenants as vt, getChatThread as w, personalMcpCompleteAuthorization as wt, createTenantUser as x, listUsersForTenant as xt, createChatThread as y, listThreadMessages as yt, getGetThreadAttachmentUrl as z, astralBeamChatFetch as zt };
package/dist/api.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as ListChatThreadsParams, $n as personalMcpGetCatalog, $t as getCreateTenantUrl, A as ChatToolResultReceiptEncoded, An as getRunChatUrl, At as TenantUserRecordEncoded, B as CreateTenantUserInputMetadata, Bn as getUploadChatFileUrl, Bt as UploadChatFileBodyMetadata, C as ChatRunInputForwardedProps, Cn as getPersonalMcpCreateConnectionUrl, Ct as SearchChatTenantUsersParams, D as ChatThreadEncoded, Dn as getPersonalMcpTestConnectionUrl, Dt as TenantRecordEncoded, E as ChatTenantUserPage, En as getPersonalMcpSetHeadersUrl, Et as TenantPage, F as ChatUsageUsageLimitsItemScope, Fn as getTenantUserUsage, Ft as UpdateTenantInput, G as DirectoryThreadHistoryPage, Gn as listThreadMessages, Gt as createChatThread, H as DeleteChatThreadParams, Hn as listChatParticipants, Ht as UploadChatFileBodySourceType, I as CreateChatThreadInputEncoded, In as getThreadAttachment, It as UpdateTenantInputMetadata, J as GetChatUsageParams, Jn as personalMcpAuthorizeConnection, Jt as deleteChatThread, K as DirectoryThreadPage, Kn as listThreads, Kt as createTenant, L as CreateTenantInput, Ln as getUpdateChatThreadUrl, Lt as UpdateTenantUserInput, M as ChatUsage, Mn as getSetChatParticipantUrl, Mt as TenantUserUsage, N as ChatUsageUsageLimitsItem, Nn as getTenant, Nt as TenantUserUsageItemsItem, O as ChatThreadEncodedRole, On as getRemoveChatParticipantUrl, Ot as TenantRecordEncodedMetadata, P as ChatUsageUsageLimitsItemMetric, Pn as getTenantUser, Pt as UpdateChatThreadInputEncoded, Q as ListChatParticipantsParams, Qn as personalMcpDisconnectConnection, Qt as getCreateChatThreadUrl, R as CreateTenantInputMetadata, Rn as getUpdateTenantUrl, Rt as UpdateTenantUserInputMetadata, S as ChatRunInput, Sn as getPersonalMcpCompleteAuthorizationUrl, St as ResolveChatToolResultInputEncodedResultsItemOutcome, T as ChatTenantUserEncoded, Tn as getPersonalMcpGetCatalogUrl, Tt as SetChatParticipantInputEncodedRole, U as DirectoryThreadEncoded, Un as listChatThreads, Ut as UploadChatFileBodyType, V as CurrentUser, Vn as listChatMessages, Vt as UploadChatFileBodySource, W as DirectoryThreadEncodedParticipantsItem, Wn as listTenants, Wt as UploadedChatFile, X as GetThreadAttachmentParams, Xn as personalMcpCompleteAuthorization, Xt as getChatThread, Y as GetTenantUserUsageParams, Yn as personalMcpBindBrowser, Yt as getChatConfig, Z as ListChatMessagesParams, Zn as personalMcpCreateConnection, Zt as getChatUsage, _ as ChatMessageEncodedRole, _n as getListThreadsUrl, _t as PersonalMcpSetHeadersBodyHeaders, a as ChatConfigurationCapabilities, an as getGetChatUsageUrl, ar as searchChatTenantUsers, at as McpConnectionEncoded, b as ChatParticipantEncodedRole, bn as getPersonalMcpAuthorizeConnectionUrl, bt as ResolveChatToolResultInputEncoded, c as ChatHistoryPageEncodedMessagesItemPartsItem, cn as getGetTenantUrl, cr as updateTenant, ct as McpServerEncodedAuthKind, d as ChatHistoryPageEncodedPendingInteractionsItem, dn as getGetThreadAttachmentUrl, dr as ApiKeyOptions, dt as PersonalMcpAuthorizeConnection200Attempt, en as getCreateTenantUserUrl, er as personalMcpSetHeaders, et as ListTenantsParams, f as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, fn as getListChatMessagesUrl, fr as ApiOptions, ft as PersonalMcpBindBrowserBody, g as ChatMessageEncodedPartsItem, gn as getListThreadMessagesUrl, gr as isAstralBeamApiError, gt as PersonalMcpSetHeadersBody, h as ChatMessageEncoded, hn as getListTenantsUrl, hr as JwtOptions, ht as PersonalMcpGetCatalog200, i as ChatConfiguration, in as getGetChatThreadUrl, ir as runChat, it as ListUsersForTenantParams, j as ChatToolResultReceiptEncodedUsageLimit, jn as getSearchChatTenantUsersUrl, jt as TenantUserRecordEncodedMetadata, k as ChatThreadPage, kn as getResolveChatToolResultUrl, kt as TenantUserPage, l as ChatHistoryPageEncodedMessagesItemRole, ln as getGetTenantUserUrl, lr as updateTenantUser, lt as Organization, m as ChatHistoryPageEncodedThreadRole, mn as getListChatThreadsUrl, mr as AstralBeamApiError, mt as PersonalMcpCreateConnectionBody, n as AstralBeamApiErrorIssuesItem, nn as getDeleteChatThreadUrl, nr as removeChatParticipant, nt as ListThreadsParams, o as ChatHistoryPageEncoded, on as getGetCurrentUserUrl, or as setChatParticipant, ot as McpConnectionEncodedAuthState, p as ChatHistoryPageEncodedThread, pn as getListChatParticipantsUrl, pr as ApiRequestOptions, pt as PersonalMcpCompleteAuthorizationBody, q as GetChatConfigParams, qn as listUsersForTenant, qt as createTenantUser, r as AstralBeamApiErrorUsageLimit, rn as getGetChatConfigUrl, rr as resolveChatToolResult, rt as ListUsersForTenantFilterAdmin, s as ChatHistoryPageEncodedMessagesItem, sn as getGetOrganizationUrl, sr as updateChatThread, st as McpServerEncoded, t as AstralBeamApiError$1, tn as getCurrentUser, tr as personalMcpTestConnection, tt as ListThreadMessagesParams, u as ChatHistoryPageEncodedMessagesItemState, un as getGetTenantUserUsageUrl, ur as uploadChatFile, ut as PersonalMcpAuthorizeConnection200, v as ChatMessageEncodedState, vn as getListUsersForTenantUrl, vt as PersonalMcpTestConnection200, w as ChatSubmissionReceiptEncoded, wn as getPersonalMcpDisconnectConnectionUrl, wt as SetChatParticipantInputEncoded, x as ChatParticipantPage, xn as getPersonalMcpBindBrowserUrl, xt as ResolveChatToolResultInputEncodedResultsItem, y as ChatParticipantEncoded, yn as getOrganization, yt as RemoveChatParticipantParams, z as CreateTenantUserInput, zn as getUpdateTenantUserUrl, zt as UploadChatFileBody } from "./index-D8X2hDGe.js";
2
- export { type ApiKeyOptions, type ApiOptions, type ApiRequestOptions, AstralBeamApiError, type AstralBeamApiError$1 as AstralBeamApiErrorBody, AstralBeamApiErrorIssuesItem, AstralBeamApiErrorUsageLimit, ChatConfiguration, ChatConfigurationCapabilities, ChatHistoryPageEncoded, ChatHistoryPageEncodedMessagesItem, ChatHistoryPageEncodedMessagesItemPartsItem, ChatHistoryPageEncodedMessagesItemRole, ChatHistoryPageEncodedMessagesItemState, ChatHistoryPageEncodedPendingInteractionsItem, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, ChatHistoryPageEncodedThread, ChatHistoryPageEncodedThreadRole, ChatMessageEncoded, ChatMessageEncodedPartsItem, ChatMessageEncodedRole, ChatMessageEncodedState, ChatParticipantEncoded, ChatParticipantEncodedRole, ChatParticipantPage, ChatRunInput, ChatRunInputForwardedProps, ChatSubmissionReceiptEncoded, ChatTenantUserEncoded, ChatTenantUserPage, ChatThreadEncoded, ChatThreadEncodedRole, ChatThreadPage, ChatToolResultReceiptEncoded, ChatToolResultReceiptEncodedUsageLimit, ChatUsage, ChatUsageUsageLimitsItem, ChatUsageUsageLimitsItemMetric, ChatUsageUsageLimitsItemScope, CreateChatThreadInputEncoded, CreateTenantInput, CreateTenantInputMetadata, CreateTenantUserInput, CreateTenantUserInputMetadata, CurrentUser, DeleteChatThreadParams, DirectoryThreadEncoded, DirectoryThreadEncodedParticipantsItem, DirectoryThreadHistoryPage, DirectoryThreadPage, GetChatConfigParams, GetChatUsageParams, GetTenantUserUsageParams, GetThreadAttachmentParams, type JwtOptions, ListChatMessagesParams, ListChatParticipantsParams, ListChatThreadsParams, ListTenantsParams, ListThreadMessagesParams, ListThreadsParams, ListUsersForTenantFilterAdmin, ListUsersForTenantParams, McpConnectionEncoded, McpConnectionEncodedAuthState, McpServerEncoded, McpServerEncodedAuthKind, Organization, PersonalMcpAuthorizeConnection200, PersonalMcpAuthorizeConnection200Attempt, PersonalMcpBindBrowserBody, PersonalMcpCompleteAuthorizationBody, PersonalMcpCreateConnectionBody, PersonalMcpGetCatalog200, PersonalMcpSetHeadersBody, PersonalMcpSetHeadersBodyHeaders, PersonalMcpTestConnection200, RemoveChatParticipantParams, ResolveChatToolResultInputEncoded, ResolveChatToolResultInputEncodedResultsItem, ResolveChatToolResultInputEncodedResultsItemOutcome, SearchChatTenantUsersParams, SetChatParticipantInputEncoded, SetChatParticipantInputEncodedRole, TenantPage, TenantRecordEncoded, TenantRecordEncodedMetadata, TenantUserPage, TenantUserRecordEncoded, TenantUserRecordEncodedMetadata, TenantUserUsage, TenantUserUsageItemsItem, UpdateChatThreadInputEncoded, UpdateTenantInput, UpdateTenantInputMetadata, UpdateTenantUserInput, UpdateTenantUserInputMetadata, UploadChatFileBody, UploadChatFileBodyMetadata, UploadChatFileBodySource, UploadChatFileBodySourceType, UploadChatFileBodyType, UploadedChatFile, createChatThread, createTenant, createTenantUser, deleteChatThread, getChatConfig, getChatThread, getChatUsage, getCreateChatThreadUrl, getCreateTenantUrl, getCreateTenantUserUrl, getCurrentUser, getDeleteChatThreadUrl, getGetChatConfigUrl, getGetChatThreadUrl, getGetChatUsageUrl, getGetCurrentUserUrl, getGetOrganizationUrl, getGetTenantUrl, getGetTenantUserUrl, getGetTenantUserUsageUrl, getGetThreadAttachmentUrl, getListChatMessagesUrl, getListChatParticipantsUrl, getListChatThreadsUrl, getListTenantsUrl, getListThreadMessagesUrl, getListThreadsUrl, getListUsersForTenantUrl, getOrganization, getPersonalMcpAuthorizeConnectionUrl, getPersonalMcpBindBrowserUrl, getPersonalMcpCompleteAuthorizationUrl, getPersonalMcpCreateConnectionUrl, getPersonalMcpDisconnectConnectionUrl, getPersonalMcpGetCatalogUrl, getPersonalMcpSetHeadersUrl, getPersonalMcpTestConnectionUrl, getRemoveChatParticipantUrl, getResolveChatToolResultUrl, getRunChatUrl, getSearchChatTenantUsersUrl, getSetChatParticipantUrl, getTenant, getTenantUser, getTenantUserUsage, getThreadAttachment, getUpdateChatThreadUrl, getUpdateTenantUrl, getUpdateTenantUserUrl, getUploadChatFileUrl, isAstralBeamApiError, listChatMessages, listChatParticipants, listChatThreads, listTenants, listThreadMessages, listThreads, listUsersForTenant, personalMcpAuthorizeConnection, personalMcpBindBrowser, personalMcpCompleteAuthorization, personalMcpCreateConnection, personalMcpDisconnectConnection, personalMcpGetCatalog, personalMcpSetHeaders, personalMcpTestConnection, removeChatParticipant, resolveChatToolResult, runChat, searchChatTenantUsers, setChatParticipant, updateChatThread, updateTenant, updateTenantUser, uploadChatFile };
1
+ import { $ as ListChatParticipantsParams, $n as personalMcpDisconnectConnection, $t as getCreateChatThreadUrl, A as ChatToolResultReceiptEncoded, An as getResolveChatToolResultUrl, At as TenantUserPage, B as CreateTenantUserInputMetadata, Bn as getUpdateTenantUserUrl, Bt as UploadChatFileBody, C as ChatRunInputForwardedProps, Cn as getPersonalMcpCompleteAuthorizationUrl, Ct as ResolveChatToolResultInputEncodedResultsItemOutcome, D as ChatThreadEncoded, Dn as getPersonalMcpSetHeadersUrl, Dt as TenantPage, E as ChatTenantUserPage, En as getPersonalMcpGetCatalogUrl, Et as SetChatParticipantInputEncodedRole, F as ChatUsageUsageLimitsItemScope, Fn as getTenantUser, Ft as UpdateChatThreadInputEncoded, G as DirectoryThreadHistoryPage, Gn as listTenants, Gt as UploadedChatFile, H as DeleteChatThreadParams, Hn as listChatMessages, Ht as UploadChatFileBodySource, I as CreateChatThreadInputEncoded, In as getTenantUserUsage, It as UpdateTenantInput, J as GetChatUsageParams, Jn as listUsersForTenant, Jt as createTenantUser, K as DirectoryThreadPage, Kn as listThreadMessages, Kt as createChatThread, L as CreateTenantInput, Ln as getThreadAttachment, Lt as UpdateTenantInputMetadata, M as ChatUsage, Mn as getSearchChatTenantUsersUrl, Mt as TenantUserRecordEncodedMetadata, N as ChatUsageUsageLimitsItem, Nn as getSetChatParticipantUrl, Nt as TenantUserUsage, O as ChatThreadEncodedRole, On as getPersonalMcpTestConnectionUrl, Ot as TenantRecordEncoded, P as ChatUsageUsageLimitsItemMetric, Pn as getTenant, Pt as TenantUserUsageItemsItem, Q as ListChatMessagesParams, Qn as personalMcpCreateConnection, Qt as getChatUsage, R as CreateTenantInputMetadata, Rn as getUpdateChatThreadUrl, Rt as UpdateTenantUserInput, S as ChatRunInput, Sn as getPersonalMcpBindBrowserUrl, St as ResolveChatToolResultInputEncodedResultsItem, T as ChatTenantUserEncoded, Tn as getPersonalMcpDisconnectConnectionUrl, Tt as SetChatParticipantInputEncoded, U as DirectoryThreadEncoded, Un as listChatParticipants, Ut as UploadChatFileBodySourceType, V as CurrentUser, Vn as getUploadChatFileUrl, Vt as UploadChatFileBodyMetadata, W as DirectoryThreadEncodedParticipantsItem, Wn as listChatThreads, Wt as UploadChatFileBodyType, X as GetThreadAttachmentDelivery, Xn as personalMcpBindBrowser, Xt as getChatConfig, Y as GetTenantUserUsageParams, Yn as personalMcpAuthorizeConnection, Yt as deleteChatThread, Z as GetThreadAttachmentParams, Zn as personalMcpCompleteAuthorization, Zt as getChatThread, _ as ChatMessageEncodedRole, _n as getListThreadMessagesUrl, _r as isAstralBeamApiError, _t as PersonalMcpSetHeadersBody, a as ChatConfigurationCapabilities, an as getGetChatThreadUrl, ar as runChat, at as ListUsersForTenantParams, b as ChatParticipantEncodedRole, bn as getOrganization, bt as RemoveChatParticipantParams, c as ChatHistoryPageEncodedMessagesItemPartsItem, cn as getGetOrganizationUrl, cr as updateChatThread, ct as McpServerEncoded, d as ChatHistoryPageEncodedPendingInteractionsItem, dn as getGetTenantUserUsageUrl, dr as uploadChatFile, dt as PersonalMcpAuthorizeConnection200, en as getCreateTenantUrl, er as personalMcpGetCatalog, et as ListChatThreadsParams, f as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, fn as getGetThreadAttachmentUrl, fr as ApiKeyOptions, ft as PersonalMcpAuthorizeConnection200Attempt, g as ChatMessageEncodedPartsItem, gn as getListTenantsUrl, gr as JwtOptions, gt as PersonalMcpGetCatalog200, h as ChatMessageEncoded, hn as getListChatThreadsUrl, hr as AstralBeamApiError, ht as PersonalMcpCreateConnectionBody, i as ChatConfiguration, in as getGetChatConfigUrl, ir as resolveChatToolResult, it as ListUsersForTenantFilterAdmin, j as ChatToolResultReceiptEncodedUsageLimit, jn as getRunChatUrl, jt as TenantUserRecordEncoded, k as ChatThreadPage, kn as getRemoveChatParticipantUrl, kt as TenantRecordEncodedMetadata, l as ChatHistoryPageEncodedMessagesItemRole, ln as getGetTenantUrl, lr as updateTenant, lt as McpServerEncodedAuthKind, m as ChatHistoryPageEncodedThreadRole, mn as getListChatParticipantsUrl, mr as ApiRequestOptions, mt as PersonalMcpCompleteAuthorizationBody, n as AstralBeamApiErrorIssuesItem, nn as getCurrentUser, nr as personalMcpTestConnection, nt as ListThreadMessagesParams, o as ChatHistoryPageEncoded, on as getGetChatUsageUrl, or as searchChatTenantUsers, ot as McpConnectionEncoded, p as ChatHistoryPageEncodedThread, pn as getListChatMessagesUrl, pr as ApiOptions, pt as PersonalMcpBindBrowserBody, q as GetChatConfigParams, qn as listThreads, qt as createTenant, r as AstralBeamApiErrorUsageLimit, rn as getDeleteChatThreadUrl, rr as removeChatParticipant, rt as ListThreadsParams, s as ChatHistoryPageEncodedMessagesItem, sn as getGetCurrentUserUrl, sr as setChatParticipant, st as McpConnectionEncodedAuthState, t as AstralBeamApiError$1, tn as getCreateTenantUserUrl, tr as personalMcpSetHeaders, tt as ListTenantsParams, u as ChatHistoryPageEncodedMessagesItemState, un as getGetTenantUserUrl, ur as updateTenantUser, ut as Organization, v as ChatMessageEncodedState, vn as getListThreadsUrl, vt as PersonalMcpSetHeadersBodyHeaders, w as ChatSubmissionReceiptEncoded, wn as getPersonalMcpCreateConnectionUrl, wt as SearchChatTenantUsersParams, x as ChatParticipantPage, xn as getPersonalMcpAuthorizeConnectionUrl, xt as ResolveChatToolResultInputEncoded, y as ChatParticipantEncoded, yn as getListUsersForTenantUrl, yt as PersonalMcpTestConnection200, z as CreateTenantUserInput, zn as getUpdateTenantUrl, zt as UpdateTenantUserInputMetadata } from "./index-DF5gqYlY.js";
2
+ export { type ApiKeyOptions, type ApiOptions, type ApiRequestOptions, AstralBeamApiError, type AstralBeamApiError$1 as AstralBeamApiErrorBody, AstralBeamApiErrorIssuesItem, AstralBeamApiErrorUsageLimit, ChatConfiguration, ChatConfigurationCapabilities, ChatHistoryPageEncoded, ChatHistoryPageEncodedMessagesItem, ChatHistoryPageEncodedMessagesItemPartsItem, ChatHistoryPageEncodedMessagesItemRole, ChatHistoryPageEncodedMessagesItemState, ChatHistoryPageEncodedPendingInteractionsItem, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, ChatHistoryPageEncodedThread, ChatHistoryPageEncodedThreadRole, ChatMessageEncoded, ChatMessageEncodedPartsItem, ChatMessageEncodedRole, ChatMessageEncodedState, ChatParticipantEncoded, ChatParticipantEncodedRole, ChatParticipantPage, ChatRunInput, ChatRunInputForwardedProps, ChatSubmissionReceiptEncoded, ChatTenantUserEncoded, ChatTenantUserPage, ChatThreadEncoded, ChatThreadEncodedRole, ChatThreadPage, ChatToolResultReceiptEncoded, ChatToolResultReceiptEncodedUsageLimit, ChatUsage, ChatUsageUsageLimitsItem, ChatUsageUsageLimitsItemMetric, ChatUsageUsageLimitsItemScope, CreateChatThreadInputEncoded, CreateTenantInput, CreateTenantInputMetadata, CreateTenantUserInput, CreateTenantUserInputMetadata, CurrentUser, DeleteChatThreadParams, DirectoryThreadEncoded, DirectoryThreadEncodedParticipantsItem, DirectoryThreadHistoryPage, DirectoryThreadPage, GetChatConfigParams, GetChatUsageParams, GetTenantUserUsageParams, GetThreadAttachmentDelivery, GetThreadAttachmentParams, type JwtOptions, ListChatMessagesParams, ListChatParticipantsParams, ListChatThreadsParams, ListTenantsParams, ListThreadMessagesParams, ListThreadsParams, ListUsersForTenantFilterAdmin, ListUsersForTenantParams, McpConnectionEncoded, McpConnectionEncodedAuthState, McpServerEncoded, McpServerEncodedAuthKind, Organization, PersonalMcpAuthorizeConnection200, PersonalMcpAuthorizeConnection200Attempt, PersonalMcpBindBrowserBody, PersonalMcpCompleteAuthorizationBody, PersonalMcpCreateConnectionBody, PersonalMcpGetCatalog200, PersonalMcpSetHeadersBody, PersonalMcpSetHeadersBodyHeaders, PersonalMcpTestConnection200, RemoveChatParticipantParams, ResolveChatToolResultInputEncoded, ResolveChatToolResultInputEncodedResultsItem, ResolveChatToolResultInputEncodedResultsItemOutcome, SearchChatTenantUsersParams, SetChatParticipantInputEncoded, SetChatParticipantInputEncodedRole, TenantPage, TenantRecordEncoded, TenantRecordEncodedMetadata, TenantUserPage, TenantUserRecordEncoded, TenantUserRecordEncodedMetadata, TenantUserUsage, TenantUserUsageItemsItem, UpdateChatThreadInputEncoded, UpdateTenantInput, UpdateTenantInputMetadata, UpdateTenantUserInput, UpdateTenantUserInputMetadata, UploadChatFileBody, UploadChatFileBodyMetadata, UploadChatFileBodySource, UploadChatFileBodySourceType, UploadChatFileBodyType, UploadedChatFile, createChatThread, createTenant, createTenantUser, deleteChatThread, getChatConfig, getChatThread, getChatUsage, getCreateChatThreadUrl, getCreateTenantUrl, getCreateTenantUserUrl, getCurrentUser, getDeleteChatThreadUrl, getGetChatConfigUrl, getGetChatThreadUrl, getGetChatUsageUrl, getGetCurrentUserUrl, getGetOrganizationUrl, getGetTenantUrl, getGetTenantUserUrl, getGetTenantUserUsageUrl, getGetThreadAttachmentUrl, getListChatMessagesUrl, getListChatParticipantsUrl, getListChatThreadsUrl, getListTenantsUrl, getListThreadMessagesUrl, getListThreadsUrl, getListUsersForTenantUrl, getOrganization, getPersonalMcpAuthorizeConnectionUrl, getPersonalMcpBindBrowserUrl, getPersonalMcpCompleteAuthorizationUrl, getPersonalMcpCreateConnectionUrl, getPersonalMcpDisconnectConnectionUrl, getPersonalMcpGetCatalogUrl, getPersonalMcpSetHeadersUrl, getPersonalMcpTestConnectionUrl, getRemoveChatParticipantUrl, getResolveChatToolResultUrl, getRunChatUrl, getSearchChatTenantUsersUrl, getSetChatParticipantUrl, getTenant, getTenantUser, getTenantUserUsage, getThreadAttachment, getUpdateChatThreadUrl, getUpdateTenantUrl, getUpdateTenantUserUrl, getUploadChatFileUrl, isAstralBeamApiError, listChatMessages, listChatParticipants, listChatThreads, listTenants, listThreadMessages, listThreads, listUsersForTenant, personalMcpAuthorizeConnection, personalMcpBindBrowser, personalMcpCompleteAuthorization, personalMcpCreateConnection, personalMcpDisconnectConnection, personalMcpGetCatalog, personalMcpSetHeaders, personalMcpTestConnection, removeChatParticipant, resolveChatToolResult, runChat, searchChatTenantUsers, setChatParticipant, updateChatThread, updateTenant, updateTenantUser, uploadChatFile };
package/dist/api.js CHANGED
@@ -1 +1 @@
1
- export { t as ChatHistoryPageEncodedMessagesItemRole, n as ChatHistoryPageEncodedMessagesItemState, r as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, i as ChatHistoryPageEncodedThreadRole, a as ChatMessageEncodedRole, o as ChatMessageEncodedState, s as ChatParticipantEncodedRole, c as ChatThreadEncodedRole, l as ChatUsageUsageLimitsItemMetric, u as ChatUsageUsageLimitsItemScope, d as ListUsersForTenantFilterAdmin, f as McpConnectionEncodedAuthState, p as McpServerEncodedAuthKind, m as ResolveChatToolResultInputEncodedResultsItemOutcome, h as SetChatParticipantInputEncodedRole, g as UploadChatFileBodySourceType, _ as UploadChatFileBodyType, v as createChatThread, y as createTenant, b as createTenantUser, x as deleteChatThread, S as getChatConfig, C as getChatThread, w as getChatUsage, T as getCreateChatThreadUrl, E as getCreateTenantUrl, D as getCreateTenantUserUrl, O as getCurrentUser, k as getDeleteChatThreadUrl, A as getGetChatConfigUrl, j as getGetChatThreadUrl, M as getGetChatUsageUrl, N as getGetCurrentUserUrl, P as getGetOrganizationUrl, F as getGetTenantUrl, I as getGetTenantUserUrl, L as getGetTenantUserUsageUrl, R as getGetThreadAttachmentUrl, z as getListChatMessagesUrl, B as getListChatParticipantsUrl, V as getListChatThreadsUrl, H as getListTenantsUrl, U as getListThreadMessagesUrl, W as getListThreadsUrl, G as getListUsersForTenantUrl, K as getOrganization, q as getPersonalMcpAuthorizeConnectionUrl, J as getPersonalMcpBindBrowserUrl, Y as getPersonalMcpCompleteAuthorizationUrl, X as getPersonalMcpCreateConnectionUrl, Z as getPersonalMcpDisconnectConnectionUrl, Q as getPersonalMcpGetCatalogUrl, $ as getPersonalMcpSetHeadersUrl, et as getPersonalMcpTestConnectionUrl, tt as getRemoveChatParticipantUrl, nt as getResolveChatToolResultUrl, rt as getRunChatUrl, it as getSearchChatTenantUsersUrl, at as getSetChatParticipantUrl, ot as getTenant, st as getTenantUser, ct as getTenantUserUsage, lt as getThreadAttachment, ut as getUpdateChatThreadUrl, dt as getUpdateTenantUrl, ft as getUpdateTenantUserUrl, pt as getUploadChatFileUrl, zt as isAstralBeamApiError, mt as listChatMessages, ht as listChatParticipants, gt as listChatThreads, _t as listTenants, vt as listThreadMessages, yt as listThreads, bt as listUsersForTenant, xt as personalMcpAuthorizeConnection, St as personalMcpBindBrowser, Ct as personalMcpCompleteAuthorization, wt as personalMcpCreateConnection, Tt as personalMcpDisconnectConnection, Et as personalMcpGetCatalog, Dt as personalMcpSetHeaders, Ot as personalMcpTestConnection, kt as removeChatParticipant, At as resolveChatToolResult, jt as runChat, Mt as searchChatTenantUsers, Nt as setChatParticipant, Pt as updateChatThread, Ft as updateTenant, It as updateTenantUser, Lt as uploadChatFile } from "./api-SpkUzEv3.js";
1
+ export { t as ChatHistoryPageEncodedMessagesItemRole, n as ChatHistoryPageEncodedMessagesItemState, r as ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation, i as ChatHistoryPageEncodedThreadRole, a as ChatMessageEncodedRole, o as ChatMessageEncodedState, s as ChatParticipantEncodedRole, c as ChatThreadEncodedRole, l as ChatUsageUsageLimitsItemMetric, u as ChatUsageUsageLimitsItemScope, d as GetThreadAttachmentDelivery, f as ListUsersForTenantFilterAdmin, p as McpConnectionEncodedAuthState, m as McpServerEncodedAuthKind, h as ResolveChatToolResultInputEncodedResultsItemOutcome, g as SetChatParticipantInputEncodedRole, _ as UploadChatFileBodySourceType, v as UploadChatFileBodyType, y as createChatThread, b as createTenant, x as createTenantUser, S as deleteChatThread, C as getChatConfig, w as getChatThread, T as getChatUsage, E as getCreateChatThreadUrl, D as getCreateTenantUrl, O as getCreateTenantUserUrl, k as getCurrentUser, A as getDeleteChatThreadUrl, j as getGetChatConfigUrl, M as getGetChatThreadUrl, N as getGetChatUsageUrl, P as getGetCurrentUserUrl, F as getGetOrganizationUrl, I as getGetTenantUrl, L as getGetTenantUserUrl, R as getGetTenantUserUsageUrl, z as getGetThreadAttachmentUrl, B as getListChatMessagesUrl, V as getListChatParticipantsUrl, H as getListChatThreadsUrl, U as getListTenantsUrl, W as getListThreadMessagesUrl, G as getListThreadsUrl, K as getListUsersForTenantUrl, q as getOrganization, J as getPersonalMcpAuthorizeConnectionUrl, Y as getPersonalMcpBindBrowserUrl, X as getPersonalMcpCompleteAuthorizationUrl, Z as getPersonalMcpCreateConnectionUrl, Q as getPersonalMcpDisconnectConnectionUrl, $ as getPersonalMcpGetCatalogUrl, et as getPersonalMcpSetHeadersUrl, tt as getPersonalMcpTestConnectionUrl, nt as getRemoveChatParticipantUrl, rt as getResolveChatToolResultUrl, it as getRunChatUrl, at as getSearchChatTenantUsersUrl, ot as getSetChatParticipantUrl, st as getTenant, ct as getTenantUser, lt as getTenantUserUsage, ut as getThreadAttachment, dt as getUpdateChatThreadUrl, ft as getUpdateTenantUrl, pt as getUpdateTenantUserUrl, mt as getUploadChatFileUrl, Bt as isAstralBeamApiError, ht as listChatMessages, gt as listChatParticipants, _t as listChatThreads, vt as listTenants, yt as listThreadMessages, bt as listThreads, xt as listUsersForTenant, St as personalMcpAuthorizeConnection, Ct as personalMcpBindBrowser, wt as personalMcpCompleteAuthorization, Tt as personalMcpCreateConnection, Et as personalMcpDisconnectConnection, Dt as personalMcpGetCatalog, Ot as personalMcpSetHeaders, kt as personalMcpTestConnection, At as removeChatParticipant, jt as resolveChatToolResult, Mt as runChat, Nt as searchChatTenantUsers, Pt as setChatParticipant, Ft as updateChatThread, It as updateTenant, Lt as updateTenantUser, Rt as uploadChatFile } from "./api-BYkm7p8c.js";
@@ -1 +1 @@
1
- import{Jn as e,Or as t,Yn as n,qn as r,tt as i,ur as a,wr as o}from"./styles.generated-CW6iaZWa.js";t();var s=r();function c({className:t,size:n=`default`,...r}){return/* @__PURE__ */ (0,s.jsxs)(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,t),"data-slot":`native-select-wrapper`,"data-size":n,children:[/* @__PURE__ */ (0,s.jsx)(`select`,{"data-slot":`native-select`,"data-size":n,className:`h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pe-8 ps-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...r}),/* @__PURE__ */ (0,s.jsx)(o,{className:`pointer-events-none absolute top-1/2 end-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function l({className:t,...n}){return/* @__PURE__ */ (0,s.jsx)(`option`,{"data-slot":`native-select-option`,className:e(`bg-[Canvas] text-[CanvasText]`,t),...n})}const u=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function d({className:t,variant:n=`default`,render:r,...o}){return i({defaultTagName:`span`,props:a({className:e(u({variant:n}),t)},o),render:r,state:{slot:`badge`,variant:n}})}export{c as n,l as r,d as t};
1
+ import{Jn as e,Or as t,Yn as n,qn as r,tt as i,ur as a,wr as o}from"./styles.generated-BBScqnSk.js";t();var s=r();function c({className:t,size:n=`default`,...r}){return/* @__PURE__ */ (0,s.jsxs)(`div`,{className:e(`group/native-select relative w-fit has-[select:disabled]:opacity-50`,t),"data-slot":`native-select-wrapper`,"data-size":n,children:[/* @__PURE__ */ (0,s.jsx)(`select`,{"data-slot":`native-select`,"data-size":n,className:`h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pe-8 ps-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-[size=sm]:py-0.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,...r}),/* @__PURE__ */ (0,s.jsx)(o,{className:`pointer-events-none absolute top-1/2 end-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none`,"aria-hidden":`true`,"data-slot":`native-select-icon`})]})}function l({className:t,...n}){return/* @__PURE__ */ (0,s.jsx)(`option`,{"data-slot":`native-select-option`,className:e(`bg-[Canvas] text-[CanvasText]`,t),...n})}const u=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function d({className:t,variant:n=`default`,render:r,...o}){return i({defaultTagName:`span`,props:a({className:e(u({variant:n}),t)},o),render:r,state:{slot:`badge`,variant:n}})}export{c as n,l as r,d as t};