@vettvangur/ai-sdk 0.10.0 → 0.11.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
@@ -134,15 +134,20 @@ antiforgery header and expects `{ transcript, context }`: the transcript is sent
134
134
  opening message and the context goes to the agent, under the `context` the host passes. A failed
135
135
  request hands over without them, so a visitor always reaches a person. It resolves to `live`,
136
136
  `closed` with a reason, `canceled` or `failed`. Every handover starts from the `handoverPrefill`
137
- option, or the `data-ai-chat-live-prefill` attribute as a JSON object of answers, when `prefill` is
138
- not passed; JSON that does not parse is reported to `onError` and left out.
137
+ option, or the `data-ai-chat-live-prefill` attribute as a JSON object of answers, with `prefill`
138
+ over it; JSON that does not parse is reported to `onError` and left out.
139
139
 
140
140
  A `tool_result` with `kind: 'handover'`, or from the `request_human_agent` tool (`HANDOVER_TOOL`)
141
141
  without a kind, is drawn as a handover card when no renderer is registered for the tool:
142
142
  `{ liveChatAvailable, contactUrl }` become a primary `live-chat` button and a `contact` link, in
143
143
  `renderActions` markup. The button's action is `livechat` (`LIVE_CHAT_ACTION`), which the binding
144
- runs as `handover()` unless the host registers its own. `isHandoverPayload` and
145
- `renderHandoverCard(document, data, labels)` are exported for a host that draws it elsewhere.
144
+ runs as `handover()` unless the host registers its own, with the payload's optional `prefill` (survey
145
+ answers by field name or id, such as a department) as the handover's `prefill`. A card that arrives
146
+ in the stream asks the `liveChat` provider's `availability()` at once, and when it is closed the
147
+ button gives way to a `vv-ai-actions__note` with the `live-chat-closed` label; a card drawn again
148
+ from the stored thread keeps its button, and the click asks again. `isHandoverPayload`,
149
+ `renderHandoverCard(document, data, labels)` and `closeHandoverCard(parent, text)` are exported for a
150
+ host that draws it elsewhere.
146
151
 
147
152
  `binding.mode`, also `data-ai-chat-mode` on the root, is `ai`, `handover` (the input is disabled
148
153
  while the survey is asked) or `live`. While live, the composer sends to the provider and the
@@ -228,7 +228,7 @@ type AiChatHandoverOptions = {
228
228
  provider?: AiLiveChatProvider;
229
229
  /** Values for the agent, over those the handover endpoint returns. */
230
230
  context?: Record<string, string>;
231
- /** Survey answers to start with, by field name or id. */
231
+ /** Survey answers to start with, by field name or id, over the binding's `handoverPrefill`. */
232
232
  prefill?: AiLiveChatAnswers;
233
233
  };
234
234
  type AiChatHandoverResult = {
@@ -299,6 +299,8 @@ type AiHandoverPayload = {
299
299
  kind?: 'handover';
300
300
  liveChatAvailable?: boolean;
301
301
  contactUrl?: string | null;
302
+ /** Survey answers the live chat button starts with, by field name or id, such as a department. */
303
+ prefill?: AiLiveChatAnswers | null;
302
304
  };
303
305
  type AiTemplateUrlSurfaceOptions = {
304
306
  /** The `template[data-template]` to clone. */
package/dist/index.d.ts CHANGED
@@ -86,9 +86,15 @@ declare const HANDOVER_TOOL = "request_human_agent";
86
86
  declare function isHandoverPayload(tool: string, data: unknown): data is AiHandoverPayload;
87
87
  /**
88
88
  * The visitor's ways to a person: a primary `liveChat` button that runs the `livechat` action when
89
- * a live chat is available, and a `contact` link to a safe contact URL. Null when neither applies.
89
+ * a live chat is available, and a `contact` link to a safe contact URL. The payload's `prefill`
90
+ * goes on the button as its value. Null when neither applies.
90
91
  */
91
92
  declare function renderHandoverCard(document: Document, data: AiHandoverPayload, labels: Pick<AiChatLabels, 'liveChat' | 'contact'>): HTMLElement | null;
93
+ /**
94
+ * Puts `text` as `vv-ai-actions__note` in place of the live chat button under `parent`, for when
95
+ * no one can take the chat. The contact link stays.
96
+ */
97
+ declare function closeHandoverCard(parent: ParentNode, text: string): void;
92
98
  //#endregion
93
99
  //#region src/protocol.d.ts
94
100
  declare const AI_CHAT_PROTOCOL_VERSION = 1;
@@ -133,4 +139,4 @@ declare function bindChatWindow(binding: AiChatBinding): () => void;
133
139
  */
134
140
  declare function bindLauncherTeaser(binding: AiChatBinding, container: ParentNode, options?: AiLauncherTeaserOptions): () => void;
135
141
  //#endregion
136
- export { ACTIONS_CLASS, AI_CHAT_PROTOCOL_VERSION, ANSWER_CARD_CLASS, type AiAnswerCard, type AiAnswerCardFact, type AiAnswerCardLabels, type AiAnswerCardLink, type AiAnswerCardSection, type AiAnswerCardTable, type AiCardImage, type AiChatAction, type AiChatActionItem, type AiChatBinding, type AiChatBindings, type AiChatContext, type AiChatEventMap, type AiChatExtensionContext, type AiChatHandoverOptions, type AiChatHandoverResult, type AiChatMessage, type AiChatMode, type AiChatRegistry, type AiChatRenderer, type AiChatRequest, type AiChatSession, type AiChatSessionOptions, type AiChatSessionResult, type AiChatSessionStatus, type AiChatStreamEvent, type AiChatSurface, type AiFormContextOptions, type AiHandoverPayload, type AiLauncherTeaserOptions, type AiLiveChatAction, type AiLiveChatAnswers, type AiLiveChatAvailability, type AiLiveChatFactoryContext, type AiLiveChatMessage, type AiLiveChatProvider, type AiLiveChatSheetHost, type AiLiveChatStartOptions, type AiLiveChatSurveyField, type AiTemplateItemSurfaceOptions, type AiTemplateUrlSurfaceOptions, CARD_LIST_CLASS, CHAT_CLASS, HANDOVER_TOOL, LIVE_CHAT_ACTION, MAX_ANSWER_CARD_FACTS, MAX_ANSWER_CARD_LINKS, MAX_ANSWER_CARD_SECTIONS, MAX_ANSWER_CARD_TABLES, MAX_ANSWER_CARD_TABLE_CELLS, MAX_ANSWER_CARD_TABLE_ROWS, MAX_ANSWER_CARD_TEXT_LENGTH, MAX_ANSWER_CARD_TOTAL_STRUCTURAL_ITEMS, MAX_ANSWER_CARD_TOTAL_TABLE_CELLS, MAX_ANSWER_CARD_TOTAL_TEXT_CHARACTERS, MAX_ANSWER_CARD_URL_LENGTH, assertAnswerCardContract, bindChat, bindChatWindow, bindLauncherTeaser, createAiChatRegistry, createChatSession, createPart, createSafeImage, createSafeLink, createSingleSurface, createTemplateItemSurface, isAnswerCard, isHandoverPayload, isSafeLinkUrl, parseStreamEvent, readEventStream, renderActions, renderAnswerCard, renderCardList, renderHandoverCard, watchFormContext };
142
+ export { ACTIONS_CLASS, AI_CHAT_PROTOCOL_VERSION, ANSWER_CARD_CLASS, type AiAnswerCard, type AiAnswerCardFact, type AiAnswerCardLabels, type AiAnswerCardLink, type AiAnswerCardSection, type AiAnswerCardTable, type AiCardImage, type AiChatAction, type AiChatActionItem, type AiChatBinding, type AiChatBindings, type AiChatContext, type AiChatEventMap, type AiChatExtensionContext, type AiChatHandoverOptions, type AiChatHandoverResult, type AiChatMessage, type AiChatMode, type AiChatRegistry, type AiChatRenderer, type AiChatRequest, type AiChatSession, type AiChatSessionOptions, type AiChatSessionResult, type AiChatSessionStatus, type AiChatStreamEvent, type AiChatSurface, type AiFormContextOptions, type AiHandoverPayload, type AiLauncherTeaserOptions, type AiLiveChatAction, type AiLiveChatAnswers, type AiLiveChatAvailability, type AiLiveChatFactoryContext, type AiLiveChatMessage, type AiLiveChatProvider, type AiLiveChatSheetHost, type AiLiveChatStartOptions, type AiLiveChatSurveyField, type AiTemplateItemSurfaceOptions, type AiTemplateUrlSurfaceOptions, CARD_LIST_CLASS, CHAT_CLASS, HANDOVER_TOOL, LIVE_CHAT_ACTION, MAX_ANSWER_CARD_FACTS, MAX_ANSWER_CARD_LINKS, MAX_ANSWER_CARD_SECTIONS, MAX_ANSWER_CARD_TABLES, MAX_ANSWER_CARD_TABLE_CELLS, MAX_ANSWER_CARD_TABLE_ROWS, MAX_ANSWER_CARD_TEXT_LENGTH, MAX_ANSWER_CARD_TOTAL_STRUCTURAL_ITEMS, MAX_ANSWER_CARD_TOTAL_TABLE_CELLS, MAX_ANSWER_CARD_TOTAL_TEXT_CHARACTERS, MAX_ANSWER_CARD_URL_LENGTH, assertAnswerCardContract, bindChat, bindChatWindow, bindLauncherTeaser, closeHandoverCard, createAiChatRegistry, createChatSession, createPart, createSafeImage, createSafeLink, createSingleSurface, createTemplateItemSurface, isAnswerCard, isHandoverPayload, isSafeLinkUrl, parseStreamEvent, readEventStream, renderActions, renderAnswerCard, renderCardList, renderHandoverCard, watchFormContext };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as isSafeLinkUrl, n as createSafeImage, r as createSafeLink, t as createPart } from "./dom.js";
2
- import { A as assertAnswerCardContract, C as MAX_ANSWER_CARD_TABLE_CELLS, D as MAX_ANSWER_CARD_TOTAL_TABLE_CELLS, E as MAX_ANSWER_CARD_TOTAL_STRUCTURAL_ITEMS, M as renderAnswerCard, O as MAX_ANSWER_CARD_TOTAL_TEXT_CHARACTERS, S as MAX_ANSWER_CARD_TABLES, T as MAX_ANSWER_CARD_TEXT_LENGTH, _ as renderCardList, a as createAiChatRegistry, b as MAX_ANSWER_CARD_LINKS, c as isHandoverPayload, d as readEventStream, f as AI_CHAT_PROTOCOL_VERSION, g as renderActions, h as CARD_LIST_CLASS, i as bindChat, j as isAnswerCard, k as MAX_ANSWER_CARD_URL_LENGTH, l as renderHandoverCard, m as ACTIONS_CLASS, n as bindLauncherTeaser, o as HANDOVER_TOOL, p as parseStreamEvent, r as CHAT_CLASS, s as LIVE_CHAT_ACTION, t as bindChatWindow, u as createChatSession, v as ANSWER_CARD_CLASS, w as MAX_ANSWER_CARD_TABLE_ROWS, x as MAX_ANSWER_CARD_SECTIONS, y as MAX_ANSWER_CARD_FACTS } from "./window.js";
2
+ import { A as MAX_ANSWER_CARD_URL_LENGTH, C as MAX_ANSWER_CARD_TABLES, D as MAX_ANSWER_CARD_TOTAL_STRUCTURAL_ITEMS, E as MAX_ANSWER_CARD_TEXT_LENGTH, M as isAnswerCard, N as renderAnswerCard, O as MAX_ANSWER_CARD_TOTAL_TABLE_CELLS, S as MAX_ANSWER_CARD_SECTIONS, T as MAX_ANSWER_CARD_TABLE_ROWS, _ as renderActions, a as createAiChatRegistry, b as MAX_ANSWER_CARD_FACTS, c as closeHandoverCard, d as createChatSession, f as readEventStream, g as CARD_LIST_CLASS, h as ACTIONS_CLASS, i as bindChat, j as assertAnswerCardContract, k as MAX_ANSWER_CARD_TOTAL_TEXT_CHARACTERS, l as isHandoverPayload, m as parseStreamEvent, n as bindLauncherTeaser, o as HANDOVER_TOOL, p as AI_CHAT_PROTOCOL_VERSION, r as CHAT_CLASS, s as LIVE_CHAT_ACTION, t as bindChatWindow, u as renderHandoverCard, v as renderCardList, w as MAX_ANSWER_CARD_TABLE_CELLS, x as MAX_ANSWER_CARD_LINKS, y as ANSWER_CARD_CLASS } from "./window.js";
3
3
  import { n as createTemplateItemSurface, t as createSingleSurface } from "./surfaces.js";
4
4
  //#region src/form-context.ts
5
5
  /**
@@ -31,4 +31,4 @@ function watchFormContext(binding, element, options) {
31
31
  return () => observer.disconnect();
32
32
  }
33
33
  //#endregion
34
- export { ACTIONS_CLASS, AI_CHAT_PROTOCOL_VERSION, ANSWER_CARD_CLASS, CARD_LIST_CLASS, CHAT_CLASS, HANDOVER_TOOL, LIVE_CHAT_ACTION, MAX_ANSWER_CARD_FACTS, MAX_ANSWER_CARD_LINKS, MAX_ANSWER_CARD_SECTIONS, MAX_ANSWER_CARD_TABLES, MAX_ANSWER_CARD_TABLE_CELLS, MAX_ANSWER_CARD_TABLE_ROWS, MAX_ANSWER_CARD_TEXT_LENGTH, MAX_ANSWER_CARD_TOTAL_STRUCTURAL_ITEMS, MAX_ANSWER_CARD_TOTAL_TABLE_CELLS, MAX_ANSWER_CARD_TOTAL_TEXT_CHARACTERS, MAX_ANSWER_CARD_URL_LENGTH, assertAnswerCardContract, bindChat, bindChatWindow, bindLauncherTeaser, createAiChatRegistry, createChatSession, createPart, createSafeImage, createSafeLink, createSingleSurface, createTemplateItemSurface, isAnswerCard, isHandoverPayload, isSafeLinkUrl, parseStreamEvent, readEventStream, renderActions, renderAnswerCard, renderCardList, renderHandoverCard, watchFormContext };
34
+ export { ACTIONS_CLASS, AI_CHAT_PROTOCOL_VERSION, ANSWER_CARD_CLASS, CARD_LIST_CLASS, CHAT_CLASS, HANDOVER_TOOL, LIVE_CHAT_ACTION, MAX_ANSWER_CARD_FACTS, MAX_ANSWER_CARD_LINKS, MAX_ANSWER_CARD_SECTIONS, MAX_ANSWER_CARD_TABLES, MAX_ANSWER_CARD_TABLE_CELLS, MAX_ANSWER_CARD_TABLE_ROWS, MAX_ANSWER_CARD_TEXT_LENGTH, MAX_ANSWER_CARD_TOTAL_STRUCTURAL_ITEMS, MAX_ANSWER_CARD_TOTAL_TABLE_CELLS, MAX_ANSWER_CARD_TOTAL_TEXT_CHARACTERS, MAX_ANSWER_CARD_URL_LENGTH, assertAnswerCardContract, bindChat, bindChatWindow, bindLauncherTeaser, closeHandoverCard, createAiChatRegistry, createChatSession, createPart, createSafeImage, createSafeLink, createSingleSurface, createTemplateItemSurface, isAnswerCard, isHandoverPayload, isSafeLinkUrl, parseStreamEvent, readEventStream, renderActions, renderAnswerCard, renderCardList, renderHandoverCard, watchFormContext };
package/dist/styles.css CHANGED
@@ -447,6 +447,15 @@ body:has(.vv-ai-chat:not(.vv-ai-chat--window)) {
447
447
  background: var(--vv-ai-color-accent);
448
448
  }
449
449
 
450
+ /* In place of the live chat button when no one can take the chat. */
451
+ .vv-ai-actions__note {
452
+ flex-basis: 100%;
453
+ margin: 0;
454
+ font-size: 0.875rem;
455
+ line-height: 1.5;
456
+ color: var(--vv-ai-color-text-muted);
457
+ }
458
+
450
459
  .vv-ai-chat__error {
451
460
  align-self: flex-start;
452
461
  padding: 0.75rem 1rem;
package/dist/window.js CHANGED
@@ -741,20 +741,45 @@ const HANDOVER_TOOL = "request_human_agent";
741
741
  function isHandoverPayload(tool, data) {
742
742
  return isPlainObject(data) && (data.kind === "handover" || tool === "request_human_agent" && data.kind === void 0);
743
743
  }
744
+ function surveyAnswers(value) {
745
+ if (!isPlainObject(value)) return;
746
+ return Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string" || typeof entry[1] === "boolean"));
747
+ }
744
748
  /**
745
749
  * The visitor's ways to a person: a primary `liveChat` button that runs the `livechat` action when
746
- * a live chat is available, and a `contact` link to a safe contact URL. Null when neither applies.
750
+ * a live chat is available, and a `contact` link to a safe contact URL. The payload's `prefill`
751
+ * goes on the button as its value. Null when neither applies.
747
752
  */
748
753
  function renderHandoverCard(document, data, labels) {
754
+ const prefill = surveyAnswers(data.prefill);
755
+ const value = prefill && Object.keys(prefill).length ? JSON.stringify(prefill) : null;
749
756
  return renderActions(document, [...data.liveChatAvailable === true ? [{
750
757
  label: labels.liveChat,
751
758
  action: LIVE_CHAT_ACTION,
759
+ value,
752
760
  primary: true
753
761
  }] : [], ...typeof data.contactUrl === "string" ? [{
754
762
  label: labels.contact,
755
763
  url: data.contactUrl
756
764
  }] : []]);
757
765
  }
766
+ /** The survey answers a live chat button carries, or undefined when it carries none. */
767
+ function buttonPrefill(button) {
768
+ const value = button.dataset.aiActionValue;
769
+ if (!value) return;
770
+ try {
771
+ return surveyAnswers(JSON.parse(value));
772
+ } catch {
773
+ return;
774
+ }
775
+ }
776
+ /**
777
+ * Puts `text` as `vv-ai-actions__note` in place of the live chat button under `parent`, for when
778
+ * no one can take the chat. The contact link stays.
779
+ */
780
+ function closeHandoverCard(parent, text) {
781
+ for (const button of parent.querySelectorAll(`[data-ai-action="${LIVE_CHAT_ACTION}"]`)) button.replaceWith(createPart(button.ownerDocument, "p", ACTIONS_CLASS, "note", text));
782
+ }
758
783
  //#endregion
759
784
  //#region src/registry.ts
760
785
  const entries = /* @__PURE__ */ new WeakMap();
@@ -931,10 +956,6 @@ function readLabels(root, labels) {
931
956
  for (const key of Object.keys(defaultLabels)) read[key] = labels?.[key] || root.getAttribute(`data-ai-chat-label-${kebab(key)}`) || defaultLabels[key];
932
957
  return read;
933
958
  }
934
- function answers(value) {
935
- if (!isPlainObject(value)) return;
936
- return Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string" || typeof entry[1] === "boolean"));
937
- }
938
959
  function stringRecord(value) {
939
960
  if (!isPlainObject(value)) return {};
940
961
  return Object.fromEntries(Object.entries(value).filter((entry) => typeof entry[1] === "string"));
@@ -967,7 +988,7 @@ function bindChat(root, options = {}) {
967
988
  const feedbackEndpoint = options.feedbackEndpoint ?? root.dataset.aiChatFeedbackEndpoint;
968
989
  const handoverEndpoint = options.handoverEndpoint ?? root.dataset.aiChatHandoverEndpoint;
969
990
  const storageKey = options.storageKey ?? root.dataset.aiChatStorageKey;
970
- const handoverPrefill = options.handoverPrefill ?? answers(readJsonAttribute(root, "data-ai-chat-live-prefill", options.onError));
991
+ const handoverPrefill = options.handoverPrefill ?? surveyAnswers(readJsonAttribute(root, "data-ai-chat-live-prefill", options.onError));
971
992
  const liveChat = typeof options.liveChat === "function" ? options.liveChat({
972
993
  root,
973
994
  headers,
@@ -1114,7 +1135,16 @@ function bindChat(root, options = {}) {
1114
1135
  wrapper.append(content);
1115
1136
  parent.append(wrapper);
1116
1137
  options.onEmbedded?.(wrapper);
1117
- } else if (result.reply) appendMarkdown(parent, result.reply);
1138
+ return wrapper;
1139
+ }
1140
+ if (result.reply) appendMarkdown(parent, result.reply);
1141
+ return null;
1142
+ }
1143
+ function checkLiveChat(card) {
1144
+ if (!liveChat || !card.querySelector(`[data-ai-action="livechat"]`)) return;
1145
+ liveChat.availability().then((availability) => {
1146
+ if (!destroyed && availability.status === "closed") closeHandoverCard(card, labels.liveChatClosed);
1147
+ }, (caught) => options.onError?.(caught instanceof Error ? caught : /* @__PURE__ */ new Error("AI chat availability failed")));
1118
1148
  }
1119
1149
  const unsubscribe = session.subscribe((event) => {
1120
1150
  if (destroyed) return;
@@ -1141,7 +1171,8 @@ function bindChat(root, options = {}) {
1141
1171
  data: event.data.data,
1142
1172
  reply: event.data.reply
1143
1173
  };
1144
- renderResult(activeAssistant, result);
1174
+ const card = renderResult(activeAssistant, result);
1175
+ if (card && isHandoverPayload(result.name, result.data)) checkLiveChat(card);
1145
1176
  activeEntry?.parts.push({ result });
1146
1177
  activeEntryText = null;
1147
1178
  }
@@ -1543,7 +1574,10 @@ function bindChat(root, options = {}) {
1543
1574
  intro: labels.surveyIntro,
1544
1575
  prefilled: labels.surveyPrefilled
1545
1576
  },
1546
- prefill: handover.prefill ?? handoverPrefill
1577
+ prefill: {
1578
+ ...handoverPrefill,
1579
+ ...handover.prefill
1580
+ }
1547
1581
  });
1548
1582
  pendingSurvey = survey;
1549
1583
  const wrapper = root.ownerDocument.createElement("div");
@@ -1745,7 +1779,7 @@ function bindChat(root, options = {}) {
1745
1779
  }
1746
1780
  const actionElement = target?.closest("[data-ai-action]");
1747
1781
  const action = actionElement ? registryEntries(options.registry)?.actions.get(actionElement.dataset.aiAction ?? "") : void 0;
1748
- if (!action && actionElement?.dataset.aiAction === "livechat") binding.handover().catch(report);
1782
+ if (!action && actionElement?.dataset.aiAction === "livechat") binding.handover({ prefill: buttonPrefill(actionElement) }).catch(report);
1749
1783
  else if (!action && actionElement?.dataset.aiAction === "sheet") showSheet(actionElement.dataset.aiActionValue ?? "", actionElement.textContent?.trim() ?? "");
1750
1784
  else if (action && actionElement) Promise.resolve(action({
1751
1785
  root,
@@ -2019,4 +2053,4 @@ function bindLauncherTeaser(binding, container, options = {}) {
2019
2053
  };
2020
2054
  }
2021
2055
  //#endregion
2022
- export { assertAnswerCardContract as A, MAX_ANSWER_CARD_TABLE_CELLS as C, MAX_ANSWER_CARD_TOTAL_TABLE_CELLS as D, MAX_ANSWER_CARD_TOTAL_STRUCTURAL_ITEMS as E, renderAnswerCard as M, MAX_ANSWER_CARD_TOTAL_TEXT_CHARACTERS as O, MAX_ANSWER_CARD_TABLES as S, MAX_ANSWER_CARD_TEXT_LENGTH as T, renderCardList as _, createAiChatRegistry as a, MAX_ANSWER_CARD_LINKS as b, isHandoverPayload as c, readEventStream as d, AI_CHAT_PROTOCOL_VERSION as f, renderActions as g, CARD_LIST_CLASS as h, bindChat as i, isAnswerCard as j, MAX_ANSWER_CARD_URL_LENGTH as k, renderHandoverCard as l, ACTIONS_CLASS as m, bindLauncherTeaser as n, HANDOVER_TOOL as o, parseStreamEvent as p, CHAT_CLASS as r, LIVE_CHAT_ACTION as s, bindChatWindow as t, createChatSession as u, ANSWER_CARD_CLASS as v, MAX_ANSWER_CARD_TABLE_ROWS as w, MAX_ANSWER_CARD_SECTIONS as x, MAX_ANSWER_CARD_FACTS as y };
2056
+ export { MAX_ANSWER_CARD_URL_LENGTH as A, MAX_ANSWER_CARD_TABLES as C, MAX_ANSWER_CARD_TOTAL_STRUCTURAL_ITEMS as D, MAX_ANSWER_CARD_TEXT_LENGTH as E, isAnswerCard as M, renderAnswerCard as N, MAX_ANSWER_CARD_TOTAL_TABLE_CELLS as O, MAX_ANSWER_CARD_SECTIONS as S, MAX_ANSWER_CARD_TABLE_ROWS as T, renderActions as _, createAiChatRegistry as a, MAX_ANSWER_CARD_FACTS as b, closeHandoverCard as c, createChatSession as d, readEventStream as f, CARD_LIST_CLASS as g, ACTIONS_CLASS as h, bindChat as i, assertAnswerCardContract as j, MAX_ANSWER_CARD_TOTAL_TEXT_CHARACTERS as k, isHandoverPayload as l, parseStreamEvent as m, bindLauncherTeaser as n, HANDOVER_TOOL as o, AI_CHAT_PROTOCOL_VERSION as p, CHAT_CLASS as r, LIVE_CHAT_ACTION as s, bindChatWindow as t, renderHandoverCard as u, renderCardList as v, MAX_ANSWER_CARD_TABLE_CELLS as w, MAX_ANSWER_CARD_LINKS as x, ANSWER_CARD_CLASS as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vettvangur/ai-sdk",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Framework-agnostic AI chat client for server-rendered shells",
5
5
  "type": "module",
6
6
  "access": "public",