@ensembleapp/client-sdk 0.0.23 → 0.0.25

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/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as ai from 'ai';
2
2
  import { UIMessage } from 'ai';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import React$1, { ReactNode } from 'react';
5
4
  import z, { AnyZodObject } from 'zod';
5
+ import React$1 from 'react';
6
6
  import { ClassValue } from 'clsx';
7
7
 
8
8
  /** @minimum 1 */
@@ -201,7 +201,7 @@ interface UIWidgetDefinition<TSchema extends AnyZodObject = AnyZodObject, TEnric
201
201
  * @param payload - The LLM-generated data matching the schema
202
202
  * @param enriched - Enrichment results keyed by name (empty object if no enrich config)
203
203
  */
204
- render(payload: z.infer<TSchema>, enriched: TEnriched): ReactNode;
204
+ render(payload: z.infer<TSchema>, enriched: TEnriched): unknown;
205
205
  }
206
206
  declare const createWidget: <TSchema extends AnyZodObject, TEnriched extends EnrichedResults = EnrichedResults>({ widgetType, schema, enrich, render, }: UIWidgetDefinition<TSchema, TEnriched>) => UIWidgetDefinition<TSchema, TEnriched>;
207
207
 
@@ -341,6 +341,7 @@ declare global {
341
341
  show: () => void;
342
342
  updateConfig: (config: Partial<EmbeddableChatWidgetConfig>) => void;
343
343
  updateToken: (token: string) => void;
344
+ getVendorCardsWidget: (isProd?: boolean) => UIWidgetDefinition[];
344
345
  };
345
346
  }
346
347
  }
package/dist/index.js CHANGED
@@ -24896,7 +24896,7 @@ var vendorCardsSchema = zod_default.object({
24896
24896
  }).describe("The lat/lng coordinates of this vendor. This must come from the vendor's location.coordinates from the previous vendor search tool - do NOT guess")
24897
24897
  }))
24898
24898
  }).describe("displaying a list of vendor cards. Use this widget to represent data from CareNetwork vendor search tool.");
24899
- function VendorCards({ payload, enriched }) {
24899
+ function VendorCards({ payload, enriched, onAddToList }) {
24900
24900
  if (!enriched || !enriched.vendorDetails || !enriched.distanceMatrix) {
24901
24901
  return /* @__PURE__ */ jsx7("div", { children: "Outdated vendor-cards widget" });
24902
24902
  }
@@ -24933,21 +24933,38 @@ function VendorCards({ payload, enriched }) {
24933
24933
  fontSize: "0.875rem"
24934
24934
  },
24935
24935
  children: [
24936
- /* @__PURE__ */ jsx7("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
24937
- /* @__PURE__ */ jsx7("div", { style: {
24938
- width: "2rem",
24939
- height: "2rem",
24940
- borderRadius: "9999px",
24941
- background: "#bfd1f5",
24942
- display: "flex",
24943
- alignItems: "center",
24944
- justifyContent: "center",
24945
- fontWeight: 600,
24946
- fontSize: "0.875rem",
24947
- color: "#374151"
24948
- }, children: name17.charAt(0).toUpperCase() }),
24949
- /* @__PURE__ */ jsx7("span", { style: { fontWeight: 600, fontSize: "1rem", color: "#111827" }, children: name17 })
24950
- ] }) }),
24936
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start" }, children: [
24937
+ /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
24938
+ /* @__PURE__ */ jsx7("div", { style: {
24939
+ width: "2rem",
24940
+ height: "2rem",
24941
+ borderRadius: "9999px",
24942
+ background: "#bfd1f5",
24943
+ display: "flex",
24944
+ alignItems: "center",
24945
+ justifyContent: "center",
24946
+ fontWeight: 600,
24947
+ fontSize: "0.875rem",
24948
+ color: "#374151"
24949
+ }, children: name17.charAt(0).toUpperCase() }),
24950
+ /* @__PURE__ */ jsx7("span", { style: { fontWeight: 600, fontSize: "1rem", color: "#111827" }, children: name17 })
24951
+ ] }),
24952
+ onAddToList && /* @__PURE__ */ jsx7(
24953
+ "button",
24954
+ {
24955
+ onClick: () => onAddToList(v.vendor_id),
24956
+ style: {
24957
+ background: "none",
24958
+ border: "none",
24959
+ color: "#3b82f6",
24960
+ fontSize: "0.875rem",
24961
+ cursor: "pointer",
24962
+ padding: 0
24963
+ },
24964
+ children: "Add to list"
24965
+ }
24966
+ )
24967
+ ] }),
24951
24968
  /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", color: "#6b7280" }, children: [
24952
24969
  /* @__PURE__ */ jsx7("span", { style: { color: "#facc15" }, children: "\u2605" }),
24953
24970
  /* @__PURE__ */ jsx7("span", { children: avgRating?.toFixed(1) ?? "\u2014" }),