@akropolys/kiku 1.5.8 → 1.5.9

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.mts CHANGED
@@ -116,8 +116,9 @@ declare function CheckoutModal({ onClose, theme, customStyles, hskThemeAttr }: {
116
116
  interface ComparisonMatrixProps {
117
117
  sources: ChatSource[];
118
118
  defaultCurrency?: string;
119
+ displayConfig?: Record<string, string>;
119
120
  }
120
- declare function ComparisonMatrix({ sources, defaultCurrency }: ComparisonMatrixProps): React.JSX.Element | null;
121
+ declare function ComparisonMatrix({ sources, defaultCurrency, displayConfig }: ComparisonMatrixProps): React.JSX.Element | null;
121
122
 
122
123
  interface VoiceButtonProps {
123
124
  onTranscript: (text: string) => void;
package/dist/index.d.ts CHANGED
@@ -116,8 +116,9 @@ declare function CheckoutModal({ onClose, theme, customStyles, hskThemeAttr }: {
116
116
  interface ComparisonMatrixProps {
117
117
  sources: ChatSource[];
118
118
  defaultCurrency?: string;
119
+ displayConfig?: Record<string, string>;
119
120
  }
120
- declare function ComparisonMatrix({ sources, defaultCurrency }: ComparisonMatrixProps): React.JSX.Element | null;
121
+ declare function ComparisonMatrix({ sources, defaultCurrency, displayConfig }: ComparisonMatrixProps): React.JSX.Element | null;
121
122
 
122
123
  interface VoiceButtonProps {
123
124
  onTranscript: (text: string) => void;
package/dist/index.js CHANGED
@@ -798,66 +798,51 @@ I couldn't find any matching products in the store.`;
798
798
  // src/components/KikuButton.tsx
799
799
  var import_react5 = require("react");
800
800
  var import_react_dom = require("react-dom");
801
- var import_sdk4 = require("@akropolys/sdk");
802
801
  var import_sdk5 = require("@akropolys/sdk");
803
802
  var import_sdk6 = require("@akropolys/sdk");
803
+ var import_sdk7 = require("@akropolys/sdk");
804
804
 
805
805
  // src/components/ComparisonMatrix.tsx
806
+ var import_sdk4 = require("@akropolys/sdk");
806
807
  var import_jsx_runtime6 = require("react/jsx-runtime");
807
- function extractSize(p) {
808
- const name = p.name;
809
- const cat = (p.category || "").toLowerCase();
810
- const mExplicit = name.match(/(\d+(?:\.\d+)?)\s*(?:inch(?:es)?|["'″])/i);
811
- if (mExplicit) {
812
- return `${mExplicit[1]} inches`;
808
+ function normalizeKey(key) {
809
+ let s = key.replace(/[_-]+/g, " ");
810
+ s = s.replace(/([a-z])([A-Z])/g, "$1 $2");
811
+ return s.split(" ").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
812
+ }
813
+ function getBaseGroup(normalized) {
814
+ const norm = normalized.toLowerCase().trim();
815
+ if (norm.startsWith("salary") || norm.startsWith("pay") || norm.startsWith("wage")) {
816
+ return "Salary";
813
817
  }
814
- if (cat.includes("tv") || cat.includes("audio")) {
815
- const mTv = name.match(/\b(\d{2})(?:[a-zA-Z]|\b)/);
816
- if (mTv) {
817
- const size = parseInt(mTv[1], 10);
818
- if (size >= 24 && size <= 120) {
819
- return `${size} inches`;
820
- }
821
- }
818
+ if (norm.startsWith("price") || norm.startsWith("cost") || norm.startsWith("rate")) {
819
+ return "Price";
822
820
  }
823
- return null;
824
- }
825
- function extractResolution(name) {
826
- if (/\b4K\b/i.test(name)) return "4K Ultra HD (2160p)";
827
- if (/\bUHD\b/i.test(name)) return "Ultra HD (2160p)";
828
- if (/\b(?:Full HD|FHD|1080p)\b/i.test(name)) return "Full HD (1080p)";
829
- if (/\b(?:HD|720p)\b/i.test(name)) return "HD (720p)";
830
- return null;
831
- }
832
- function extractStorage(name) {
833
- const m = name.match(/(\d+)\s*GB(?!\s*RAM)/i);
834
- return m ? `${m[1]} GB` : null;
835
- }
836
- function extractRAM(name) {
837
- const m = name.match(/(\d+)\s*GB\s*RAM/i);
838
- return m ? `${m[1]} GB` : null;
839
- }
840
- function extractCamera(name) {
841
- const m = name.match(/(\d+)\s*MP/i);
842
- return m ? `${m[1]} MP` : null;
843
- }
844
- function extractBattery(name) {
845
- const m = name.match(/(\d{3,5})\s*mAh/i);
846
- return m ? `${m[1]} mAh` : null;
821
+ if (norm.startsWith("location") || norm.startsWith("address") || norm.startsWith("city")) {
822
+ return "Location";
823
+ }
824
+ if (norm.startsWith("image") || norm.startsWith("photo") || norm.startsWith("pic") || norm.startsWith("thumb")) {
825
+ return "Image";
826
+ }
827
+ if (norm.startsWith("title") || norm.startsWith("name") || norm.startsWith("label") || norm.startsWith("heading")) {
828
+ return "Title";
829
+ }
830
+ return normalized;
847
831
  }
848
- function buildRows(products, currency) {
832
+ function buildRows(products, displayConfig, defaultCurrency = "KES") {
849
833
  const rows = [];
834
+ const resolved = products.map((p) => (0, import_sdk4.resolveDisplayFields)(p.fields || p, displayConfig));
850
835
  rows.push({
851
836
  label: "Product Preview",
852
- values: products.map((s) => s.image || null),
837
+ values: resolved.map((r) => r.image || null),
853
838
  type: "image"
854
839
  });
855
- const prices = products.map((s) => {
856
- const n = parseFloat(String(s.price ?? "").replace(/[^0-9.]/g, ""));
840
+ const prices = resolved.map((r) => {
841
+ const n = parseFloat(String(r.price ?? "").replace(/[^0-9.]/g, ""));
857
842
  return isNaN(n) ? null : n;
858
843
  });
859
- const priceLabels = products.map((s, i) => {
860
- const c = s.currency || currency;
844
+ const priceLabels = products.map((p, i) => {
845
+ const c = p.fields?.currency || p.currency || defaultCurrency;
861
846
  const n = prices[i];
862
847
  return n !== null ? `${c} ${n.toLocaleString("en-KE", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
863
848
  });
@@ -869,38 +854,101 @@ function buildRows(products, currency) {
869
854
  type: "price",
870
855
  bestIdx: minPrice !== null ? prices.indexOf(minPrice) : void 0
871
856
  });
872
- const brands = products.map((s) => s.brand || null);
873
- if (brands.some(Boolean)) rows.push({ label: "Brand", values: brands });
874
- const specDefs = [
875
- { label: "Display Size", fn: extractSize },
876
- { label: "Resolution", fn: (p) => extractResolution(p.name), higherIsBetter: true },
877
- { label: "Storage", fn: (p) => extractStorage(p.name), higherIsBetter: true },
878
- { label: "RAM", fn: (p) => extractRAM(p.name), higherIsBetter: true },
879
- { label: "Camera", fn: (p) => extractCamera(p.name), higherIsBetter: true },
880
- { label: "Battery", fn: (p) => extractBattery(p.name), higherIsBetter: true }
857
+ const keysToExclude = /* @__PURE__ */ new Set([
858
+ "url",
859
+ "fields",
860
+ "id",
861
+ "score",
862
+ "currency",
863
+ "status",
864
+ "indexed_at",
865
+ "indexedAt"
866
+ ]);
867
+ if (displayConfig) {
868
+ Object.values(displayConfig).forEach((v) => {
869
+ if (v) keysToExclude.add(v);
870
+ });
871
+ }
872
+ const commonKeys = [
873
+ "title",
874
+ "name",
875
+ "label",
876
+ "headline",
877
+ "subject",
878
+ "job_title",
879
+ "listing_title",
880
+ "common_name",
881
+ "product_name",
882
+ "image",
883
+ "images",
884
+ "thumbnail",
885
+ "photo",
886
+ "cover",
887
+ "featured_image",
888
+ "hero_image",
889
+ "listing_image",
890
+ "logo",
891
+ "price",
892
+ "cost",
893
+ "listingPrice",
894
+ "rate",
895
+ "fee",
896
+ "startingFrom",
897
+ "brand",
898
+ "category",
899
+ "location",
900
+ "type",
901
+ "variety",
902
+ "make"
881
903
  ];
882
- const resOrder = ["4K Ultra HD (2160p)", "Ultra HD (2160p)", "Full HD (1080p)", "HD (720p)"];
883
- for (const { label, fn, higherIsBetter } of specDefs) {
884
- const vals = products.map((s) => fn(s));
885
- if (!vals.some(Boolean)) continue;
886
- let bestIdx;
887
- if (higherIsBetter && vals.filter(Boolean).length > 1) {
888
- if (label === "Resolution") {
889
- bestIdx = vals.reduce((best, v, i) => {
890
- const rank = resOrder.indexOf(v ?? "");
891
- const bestRank = resOrder.indexOf(vals[best] ?? "");
892
- return rank !== -1 && (bestRank === -1 || rank < bestRank) ? i : best;
893
- }, 0);
894
- } else {
895
- const nums = vals.map((v) => parseFloat((v ?? "").replace(/[^0-9.]/g, "")));
896
- const max = Math.max(...nums.filter((n) => !isNaN(n)));
897
- bestIdx = nums.indexOf(max);
904
+ commonKeys.forEach((k) => keysToExclude.add(k));
905
+ const allFieldKeys = /* @__PURE__ */ new Set();
906
+ products.forEach((p) => {
907
+ const f = p.fields || p;
908
+ if (f) {
909
+ Object.keys(f).forEach((k) => {
910
+ if (!keysToExclude.has(k)) {
911
+ allFieldKeys.add(k);
912
+ }
913
+ });
914
+ }
915
+ });
916
+ const groupedKeys = /* @__PURE__ */ new Map();
917
+ allFieldKeys.forEach((k) => {
918
+ const norm = normalizeKey(k);
919
+ const base = getBaseGroup(norm);
920
+ if (!groupedKeys.has(base)) {
921
+ groupedKeys.set(base, []);
922
+ }
923
+ groupedKeys.get(base).push(k);
924
+ });
925
+ const sortedGroups = Array.from(groupedKeys.keys()).sort();
926
+ sortedGroups.forEach((group) => {
927
+ const originalKeys = groupedKeys.get(group);
928
+ const values = products.map((p) => {
929
+ const f = p.fields || p;
930
+ if (!f) return null;
931
+ for (const k of originalKeys) {
932
+ if (f[k] !== void 0 && f[k] !== null) {
933
+ if (typeof f[k] === "object") {
934
+ return JSON.stringify(f[k]);
935
+ }
936
+ return String(f[k]);
937
+ }
898
938
  }
939
+ return null;
940
+ });
941
+ if (values.some((v) => v !== null)) {
942
+ rows.push({
943
+ label: group,
944
+ values,
945
+ type: "text"
946
+ });
899
947
  }
900
- rows.push({ label, values: vals, bestIdx });
901
- }
948
+ });
902
949
  const avail = products.map((s) => {
903
- const a = s.availability ?? "";
950
+ const f = s.fields || s;
951
+ const a = f.availability || "";
904
952
  if (!a) return null;
905
953
  if (/in.?stock/i.test(a)) return "In-Stock";
906
954
  if (/out.?of.?stock/i.test(a)) return "Out of Stock";
@@ -909,7 +957,10 @@ function buildRows(products, currency) {
909
957
  if (avail.some(Boolean)) {
910
958
  rows.push({ label: "Availability", values: avail, type: "availability" });
911
959
  }
912
- const cats = products.map((s) => s.category || null);
960
+ const cats = products.map((s) => {
961
+ const f = s.fields || s;
962
+ return f.category || null;
963
+ });
913
964
  if (cats.some(Boolean)) rows.push({ label: "Category", values: cats });
914
965
  return rows;
915
966
  }
@@ -949,16 +1000,15 @@ function AvailabilityCell({ value }) {
949
1000
  value
950
1001
  ] });
951
1002
  }
952
- function ComparisonMatrix({ sources, defaultCurrency = "KES" }) {
953
- if (sources.length < 2) return null;
1003
+ function ComparisonMatrix({ sources, defaultCurrency = "KES", displayConfig }) {
1004
+ if (!sources || sources.length < 2) return null;
954
1005
  const products = sources.slice(0, 3);
955
- const rows = buildRows(products, defaultCurrency);
1006
+ const rows = buildRows(products, displayConfig, defaultCurrency);
956
1007
  const colTemplate = `140px repeat(${products.length}, 1fr)`;
957
1008
  const labelStyle = {
958
1009
  padding: "10px 12px",
959
1010
  fontSize: 11,
960
1011
  fontWeight: 700,
961
- // Solid dark fallback — never inherit a muted ancestor color
962
1012
  color: "var(--hsk-text-muted, #4b5563)",
963
1013
  textTransform: "uppercase",
964
1014
  letterSpacing: "0.05em",
@@ -971,7 +1021,6 @@ function ComparisonMatrix({ sources, defaultCurrency = "KES" }) {
971
1021
  const cellBase = {
972
1022
  padding: "10px 14px",
973
1023
  fontSize: 13,
974
- // Explicit color so cells are always readable regardless of parent theme
975
1024
  color: "var(--hsk-text, #111827)",
976
1025
  borderBottom: "1px solid var(--hsk-border, rgba(0,0,0,0.07))",
977
1026
  verticalAlign: "middle",
@@ -993,27 +1042,30 @@ function ComparisonMatrix({ sources, defaultCurrency = "KES" }) {
993
1042
  children: [
994
1043
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { style: { display: "grid", gridTemplateColumns: colTemplate, background: "var(--hsk-surface2, #f9fafb)", borderBottom: "2px solid var(--hsk-border, rgba(0,0,0,0.09))" }, children: [
995
1044
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { ...labelStyle, borderBottom: "none", color: "var(--hsk-text, #111)", fontSize: 12 }, children: "Feature" }),
996
- products.map((p, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
997
- "a",
998
- {
999
- href: p.url || "#",
1000
- target: "_blank",
1001
- rel: "noopener noreferrer",
1002
- style: {
1003
- display: "flex",
1004
- alignItems: "center",
1005
- padding: "10px 14px",
1006
- fontSize: 12,
1007
- fontWeight: 700,
1008
- color: "var(--hsk-primary, #16a34a)",
1009
- textDecoration: "none",
1010
- lineHeight: 1.3,
1011
- borderLeft: i > 0 ? "1px solid var(--hsk-border, rgba(0,0,0,0.07))" : "none"
1045
+ products.map((p, i) => {
1046
+ const { title } = (0, import_sdk4.resolveDisplayFields)(p.fields || p, displayConfig);
1047
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1048
+ "a",
1049
+ {
1050
+ href: p.url || "#",
1051
+ target: "_blank",
1052
+ rel: "noopener noreferrer",
1053
+ style: {
1054
+ display: "flex",
1055
+ alignItems: "center",
1056
+ padding: "10px 14px",
1057
+ fontSize: 12,
1058
+ fontWeight: 700,
1059
+ color: "var(--hsk-primary, #16a34a)",
1060
+ textDecoration: "none",
1061
+ lineHeight: 1.3,
1062
+ borderLeft: i > 0 ? "1px solid var(--hsk-border, rgba(0,0,0,0.07))" : "none"
1063
+ },
1064
+ children: title
1012
1065
  },
1013
- children: p.name
1014
- },
1015
- i
1016
- ))
1066
+ i
1067
+ );
1068
+ })
1017
1069
  ] }),
1018
1070
  rows.map((row, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1019
1071
  "div",
@@ -1028,8 +1080,9 @@ function ComparisonMatrix({ sources, defaultCurrency = "KES" }) {
1028
1080
  products.map((p, i) => {
1029
1081
  const val = row.values[i];
1030
1082
  const isBest = row.bestIdx === i && row.values.filter(Boolean).length > 1;
1083
+ const { title } = (0, import_sdk4.resolveDisplayFields)(p.fields || p, displayConfig);
1031
1084
  if (row.type === "image") {
1032
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { ...cellBase, justifyContent: "center", padding: "12px", borderLeft: i > 0 ? "1px solid var(--hsk-border, rgba(0,0,0,0.07))" : "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ImageCell, { value: val, name: p.name }) }, i);
1085
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { ...cellBase, justifyContent: "center", padding: "12px", borderLeft: i > 0 ? "1px solid var(--hsk-border, rgba(0,0,0,0.07))" : "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ImageCell, { value: val, name: title }) }, i);
1033
1086
  }
1034
1087
  if (row.type === "availability") {
1035
1088
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { ...cellBase, borderLeft: i > 0 ? "1px solid var(--hsk-border, rgba(0,0,0,0.07))" : "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvailabilityCell, { value: val }) }, i);
@@ -1040,7 +1093,6 @@ function ComparisonMatrix({ sources, defaultCurrency = "KES" }) {
1040
1093
  style: {
1041
1094
  ...cellBase,
1042
1095
  fontWeight: isBest ? 700 : 400,
1043
- // Always use a solid dark fallback — never 'inherit' which can be muted/invisible
1044
1096
  color: isBest ? "var(--hsk-primary, #ea580c)" : row.type === "price" ? "var(--hsk-text, #374151)" : "var(--hsk-text, #111827)",
1045
1097
  borderLeft: i > 0 ? "1px solid var(--hsk-border, rgba(0,0,0,0.07))" : "none"
1046
1098
  },
@@ -1282,7 +1334,7 @@ function ActionPills({ cart, actionType, onSend, loading }) {
1282
1334
  )) });
1283
1335
  }
1284
1336
  function SourcesCarousel({ sources, defaultCurrency, onSelectSource, referencedIds = [] }) {
1285
- const client = (0, import_sdk6.useAkropolysContext)();
1337
+ const client = (0, import_sdk7.useAkropolysContext)();
1286
1338
  const isProperty = client?.vertical === "property";
1287
1339
  const railRef = (0, import_react5.useRef)(null);
1288
1340
  const [showNext, setShowNext] = (0, import_react5.useState)(false);
@@ -1380,7 +1432,7 @@ function SmartContextPills({
1380
1432
  onSend,
1381
1433
  loading
1382
1434
  }) {
1383
- const client = (0, import_sdk6.useAkropolysContext)();
1435
+ const client = (0, import_sdk7.useAkropolysContext)();
1384
1436
  const isProperty = client?.vertical === "property";
1385
1437
  if (!intent) return null;
1386
1438
  const pills = [];
@@ -1598,8 +1650,8 @@ function ChatModal({
1598
1650
  enableVision = false,
1599
1651
  visionCategoryHint
1600
1652
  }) {
1601
- const client = (0, import_sdk6.useAkropolysContext)();
1602
- const { messages, sources, loading, streaming, error, lastAction, lastIntent, send, reset, referencedIds } = (0, import_sdk4.useKiku)();
1653
+ const client = (0, import_sdk7.useAkropolysContext)();
1654
+ const { messages, sources, loading, streaming, error, lastAction, lastIntent, send, reset, referencedIds } = (0, import_sdk5.useKiku)();
1603
1655
  const [input, setInput] = (0, import_react5.useState)("");
1604
1656
  const [attachments, setAttachments] = (0, import_react5.useState)([]);
1605
1657
  const imageInputRef = (0, import_react5.useRef)(null);
@@ -1670,7 +1722,7 @@ function ChatModal({
1670
1722
  const [sessions, setSessions] = (0, import_react5.useState)(() => loadSessions());
1671
1723
  const [sidebarOpen, setSidebarOpen] = (0, import_react5.useState)(false);
1672
1724
  const [replayMessages, setReplayMessages] = (0, import_react5.useState)(null);
1673
- const { status: pollStatus } = (0, import_sdk5.usePaymentPolling)({
1725
+ const { status: pollStatus } = (0, import_sdk6.usePaymentPolling)({
1674
1726
  client: client.api,
1675
1727
  merchantReference: merchantRef,
1676
1728
  onSuccess: () => {
@@ -2264,7 +2316,7 @@ function KikuButton({
2264
2316
  // src/components/Sparkle.tsx
2265
2317
  var import_react6 = require("react");
2266
2318
  var import_react_dom2 = require("react-dom");
2267
- var import_sdk7 = require("@akropolys/sdk");
2319
+ var import_sdk8 = require("@akropolys/sdk");
2268
2320
  var import_jsx_runtime8 = require("react/jsx-runtime");
2269
2321
  var SparkleIcon3 = ({ className, size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
2270
2322
  "svg",
@@ -2375,11 +2427,11 @@ function SparkleModal({
2375
2427
  classNames = {},
2376
2428
  product: initialProduct
2377
2429
  }) {
2378
- const client = (0, import_sdk7.useAkropolysContext)();
2430
+ const client = (0, import_sdk8.useAkropolysContext)();
2379
2431
  const [fetchedProduct, setFetchedProduct] = (0, import_react6.useState)(null);
2380
2432
  const displayProduct = initialProduct || fetchedProduct;
2381
- const { results, loading: searchLoading, search } = (0, import_sdk7.useSearch)({ type: "vector" });
2382
- const { messages, sources, loading: chatLoading, error: chatError, send } = (0, import_sdk7.useKiku)();
2433
+ const { results, loading: searchLoading, search } = (0, import_sdk8.useSearch)({ type: "vector" });
2434
+ const { messages, sources, loading: chatLoading, error: chatError, send } = (0, import_sdk8.useKiku)();
2383
2435
  const [chatInput, setChatInput] = (0, import_react6.useState)("");
2384
2436
  const [isMobile, setIsMobile] = (0, import_react6.useState)(false);
2385
2437
  const [showSpecs, setShowSpecs] = (0, import_react6.useState)(false);
@@ -2865,10 +2917,10 @@ function Sparkle({
2865
2917
  }
2866
2918
 
2867
2919
  // src/components/CartBadge.tsx
2868
- var import_sdk8 = require("@akropolys/sdk");
2920
+ var import_sdk9 = require("@akropolys/sdk");
2869
2921
  var import_jsx_runtime9 = require("react/jsx-runtime");
2870
2922
  function CartBadge({ className }) {
2871
- const { cart } = (0, import_sdk8.useCart)();
2923
+ const { cart } = (0, import_sdk9.useCart)();
2872
2924
  if (!cart || cart.item_count === 0) return null;
2873
2925
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn("hsk-cart-badge", className), children: cart.item_count });
2874
2926
  }
@@ -2876,12 +2928,12 @@ function CartBadge({ className }) {
2876
2928
  // src/components/CartDrawer.tsx
2877
2929
  var import_react8 = require("react");
2878
2930
  var import_react_dom4 = require("react-dom");
2879
- var import_sdk10 = require("@akropolys/sdk");
2931
+ var import_sdk11 = require("@akropolys/sdk");
2880
2932
 
2881
2933
  // src/components/CheckoutModal.tsx
2882
2934
  var import_react7 = require("react");
2883
2935
  var import_react_dom3 = require("react-dom");
2884
- var import_sdk9 = require("@akropolys/sdk");
2936
+ var import_sdk10 = require("@akropolys/sdk");
2885
2937
  var import_jsx_runtime10 = require("react/jsx-runtime");
2886
2938
  function CheckoutModal({
2887
2939
  onClose,
@@ -2889,8 +2941,8 @@ function CheckoutModal({
2889
2941
  customStyles,
2890
2942
  hskThemeAttr
2891
2943
  }) {
2892
- const { cart, loading: cartLoading } = (0, import_sdk9.useCart)();
2893
- const client = (0, import_sdk9.useAkropolysContext)();
2944
+ const { cart, loading: cartLoading } = (0, import_sdk10.useCart)();
2945
+ const client = (0, import_sdk10.useAkropolysContext)();
2894
2946
  const [config, setConfig] = (0, import_react7.useState)(null);
2895
2947
  const [loadingConfig, setLoadingConfig] = (0, import_react7.useState)(true);
2896
2948
  const [phone, setPhone] = (0, import_react7.useState)(() => {
@@ -2920,7 +2972,7 @@ function CheckoutModal({
2920
2972
  const [phase, setPhase] = (0, import_react7.useState)("idle");
2921
2973
  const [merchantRef, setMerchantRef] = (0, import_react7.useState)(null);
2922
2974
  const [payError, setPayError] = (0, import_react7.useState)(null);
2923
- const {} = (0, import_sdk9.usePaymentPolling)({
2975
+ const {} = (0, import_sdk10.usePaymentPolling)({
2924
2976
  client: client.api,
2925
2977
  merchantReference: merchantRef,
2926
2978
  onSuccess: () => {
@@ -3185,11 +3237,11 @@ function CartDrawer({
3185
3237
  className,
3186
3238
  theme
3187
3239
  }) {
3188
- const { cart, loading } = (0, import_sdk10.useCart)();
3240
+ const { cart, loading } = (0, import_sdk11.useCart)();
3189
3241
  const [open, setOpen] = (0, import_react8.useState)(false);
3190
3242
  const [showCheckout, setShowCheckout] = (0, import_react8.useState)(false);
3191
3243
  const [mounted, setMounted] = (0, import_react8.useState)(false);
3192
- const client = (0, import_sdk10.useAkropolysContext)();
3244
+ const client = (0, import_sdk11.useAkropolysContext)();
3193
3245
  (0, import_react8.useEffect)(() => {
3194
3246
  setMounted(true);
3195
3247
  const handleTriggerCheckout = () => {