@uptrademedia/site-kit 1.0.29 → 1.0.31

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.
Files changed (63) hide show
  1. package/dist/{chunk-ZGT5ZYQ5.js → chunk-7BEMFSF6.js} +53 -30
  2. package/dist/chunk-7BEMFSF6.js.map +1 -0
  3. package/dist/{chunk-QY7CDW6P.mjs → chunk-A37Z47FZ.mjs} +53 -30
  4. package/dist/chunk-A37Z47FZ.mjs.map +1 -0
  5. package/dist/{chunk-WPSRS352.mjs → chunk-BQOFRBGZ.mjs} +3 -3
  6. package/dist/chunk-BQOFRBGZ.mjs.map +1 -0
  7. package/dist/{chunk-HCFPU7TU.js → chunk-G7RSD56P.js} +3 -3
  8. package/dist/chunk-G7RSD56P.js.map +1 -0
  9. package/dist/{chunk-MDOHOEME.mjs → chunk-GM2ZDV2B.mjs} +63 -45
  10. package/dist/chunk-GM2ZDV2B.mjs.map +1 -0
  11. package/dist/{chunk-6J26EHDM.js → chunk-H5PVDCCM.js} +63 -45
  12. package/dist/chunk-H5PVDCCM.js.map +1 -0
  13. package/dist/{chunk-XFRPT5ZX.mjs → chunk-X66VOCWP.mjs} +26 -53
  14. package/dist/chunk-X66VOCWP.mjs.map +1 -0
  15. package/dist/{chunk-5R4R3WDP.js → chunk-Y4BW6XYJ.js} +26 -53
  16. package/dist/chunk-Y4BW6XYJ.js.map +1 -0
  17. package/dist/commerce/index.d.mts +3 -1
  18. package/dist/commerce/index.d.ts +3 -1
  19. package/dist/commerce/index.js +39 -39
  20. package/dist/commerce/index.mjs +1 -1
  21. package/dist/engage/index.d.mts +2 -2
  22. package/dist/engage/index.d.ts +2 -2
  23. package/dist/engage/index.js +4 -4
  24. package/dist/engage/index.mjs +1 -1
  25. package/dist/forms/index.d.mts +1 -1
  26. package/dist/forms/index.d.ts +1 -1
  27. package/dist/forms/index.js +6 -4
  28. package/dist/forms/index.js.map +1 -1
  29. package/dist/forms/index.mjs +6 -4
  30. package/dist/forms/index.mjs.map +1 -1
  31. package/dist/index.d.mts +2 -2
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +52 -38
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +25 -11
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/seo/index.d.mts +6 -18
  38. package/dist/seo/index.d.ts +6 -18
  39. package/dist/seo/index.js +4 -2
  40. package/dist/seo/index.js.map +1 -1
  41. package/dist/seo/index.mjs +3 -1
  42. package/dist/seo/index.mjs.map +1 -1
  43. package/dist/seo/register-sitemap-cli.js +112 -3
  44. package/dist/seo/register-sitemap-cli.js.map +1 -1
  45. package/dist/seo/register-sitemap-cli.mjs +106 -2
  46. package/dist/seo/register-sitemap-cli.mjs.map +1 -1
  47. package/dist/setup/client.js +3 -3
  48. package/dist/setup/client.mjs +1 -1
  49. package/dist/setup/index.js +3 -3
  50. package/dist/setup/index.mjs +1 -1
  51. package/dist/{types-B77UG-p-.d.mts → types-CYPI3-8j.d.mts} +2 -0
  52. package/dist/{types-B77UG-p-.d.ts → types-CYPI3-8j.d.ts} +2 -0
  53. package/dist/{types-CWKw0giL.d.ts → types-C_pfGZhI.d.mts} +1 -2
  54. package/dist/{types-CWKw0giL.d.mts → types-C_pfGZhI.d.ts} +1 -2
  55. package/package.json +1 -1
  56. package/dist/chunk-5R4R3WDP.js.map +0 -1
  57. package/dist/chunk-6J26EHDM.js.map +0 -1
  58. package/dist/chunk-HCFPU7TU.js.map +0 -1
  59. package/dist/chunk-MDOHOEME.mjs.map +0 -1
  60. package/dist/chunk-QY7CDW6P.mjs.map +0 -1
  61. package/dist/chunk-WPSRS352.mjs.map +0 -1
  62. package/dist/chunk-XFRPT5ZX.mjs.map +0 -1
  63. package/dist/chunk-ZGT5ZYQ5.js.map +0 -1
package/dist/index.js CHANGED
@@ -4,12 +4,12 @@ var chunkKUGMH4ZF_js = require('./chunk-KUGMH4ZF.js');
4
4
  require('./chunk-MXBDMOVK.js');
5
5
  var chunkUJQ73OS6_js = require('./chunk-UJQ73OS6.js');
6
6
  var chunkVOR53RUR_js = require('./chunk-VOR53RUR.js');
7
- var chunkZGT5ZYQ5_js = require('./chunk-ZGT5ZYQ5.js');
8
- var chunk5R4R3WDP_js = require('./chunk-5R4R3WDP.js');
7
+ var chunk7BEMFSF6_js = require('./chunk-7BEMFSF6.js');
8
+ var chunkY4BW6XYJ_js = require('./chunk-Y4BW6XYJ.js');
9
9
  var chunk4KKQQRZV_js = require('./chunk-4KKQQRZV.js');
10
- var chunkHCFPU7TU_js = require('./chunk-HCFPU7TU.js');
10
+ var chunkG7RSD56P_js = require('./chunk-G7RSD56P.js');
11
11
  var chunkHGTTGJVZ_js = require('./chunk-HGTTGJVZ.js');
12
- var chunk6J26EHDM_js = require('./chunk-6J26EHDM.js');
12
+ var chunkH5PVDCCM_js = require('./chunk-H5PVDCCM.js');
13
13
  var chunkADHVEFWD_js = require('./chunk-ADHVEFWD.js');
14
14
  require('./chunk-ZSMWDLMK.js');
15
15
  var React3 = require('react');
@@ -430,7 +430,7 @@ function SiteKitProvider({
430
430
  content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
431
431
  content,
432
432
  /* @__PURE__ */ jsxRuntime.jsx(
433
- chunk6J26EHDM_js.EngageWidget,
433
+ chunkH5PVDCCM_js.EngageWidget,
434
434
  {
435
435
  apiUrl: finalApiUrl,
436
436
  apiKey,
@@ -442,7 +442,7 @@ function SiteKitProvider({
442
442
  }
443
443
  content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
444
444
  content,
445
- /* @__PURE__ */ jsxRuntime.jsx(chunkHCFPU7TU_js.SitemapSync, { debug })
445
+ /* @__PURE__ */ jsxRuntime.jsx(chunkG7RSD56P_js.SitemapSync, { debug })
446
446
  ] });
447
447
  return /* @__PURE__ */ jsxRuntime.jsx(SiteKitContext.Provider, { value: contextValue, children: content });
448
448
  }
@@ -1869,10 +1869,21 @@ async function fetchAvailability(typeSlug, date, orgSlug, apiUrl, apiKey, timezo
1869
1869
  const endpoint = key ? `${url}/sync/widget/availability/${typeSlug}?${params}` : `${url}/sync/public/${orgSlug}/availability/${typeSlug}?${params}`;
1870
1870
  const response = await fetch(endpoint, { headers: buildHeaders(key) });
1871
1871
  if (!response.ok) {
1872
- throw new Error(`Failed to fetch availability: ${response.statusText}`);
1872
+ const msg = await response.json().catch(() => ({ message: response.statusText }));
1873
+ let detail = msg && typeof msg.message === "string" ? String(msg.message).trim() : (response.statusText || "").trim();
1874
+ if (detail === String(response.status) || /^\d+$/.test(detail)) detail = "";
1875
+ const rest = detail ? `${response.status} ${detail}` : String(response.status);
1876
+ const fallback = response.status === 404 && !detail ? "No times available. In the Portal, check Sync \u2192 Booking Types (Schedule a Tour) has a host assigned and the project API key is set for this site." : null;
1877
+ throw new Error(fallback || `Failed to fetch availability: ${rest}`.trim());
1873
1878
  }
1874
1879
  const data = await response.json();
1875
- return data.slots || [];
1880
+ const raw = data.slots || [];
1881
+ return raw.map((slot) => ({
1882
+ start: slot.startTime ?? slot.start,
1883
+ end: slot.endTime ?? slot.end,
1884
+ hostId: slot.hostId,
1885
+ available: slot.available !== false
1886
+ }));
1876
1887
  }
1877
1888
  async function createSlotHold(holdData, apiUrl, apiKey) {
1878
1889
  const cfg = getApiConfig3();
@@ -2326,7 +2337,8 @@ function BookingWidget({
2326
2337
  groupedSlots.evening.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bw-time-group", children: [
2327
2338
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bw-time-label", children: "Evening" }),
2328
2339
  groupedSlots.evening.map((slot) => /* @__PURE__ */ jsxRuntime.jsx(TimeButton, { slot, selected: selectedSlot?.start === slot.start, confirmed: confirmedSlot && selectedSlot?.start === slot.start, onClick: () => handleSlotSelect(slot), onConfirm: handleSlotConfirm, timezone, loading }, slot.start))
2329
- ] })
2340
+ ] }),
2341
+ (groupedSlots.afternoon.length > 0 || groupedSlots.evening.length > 0) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "bw-times-scroll-hint", children: "Scroll for more times" })
2330
2342
  ] }) })
2331
2343
  ] })
2332
2344
  ] }),
@@ -2426,7 +2438,6 @@ function BookingWidget({
2426
2438
  step === "success" && bookingResult && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bw-step bw-fade-in bw-success", children: [
2427
2439
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bw-success-icon", children: /* @__PURE__ */ jsxRuntime.jsx(CheckCircleIcon, {}) }),
2428
2440
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "bw-heading", children: "You\u2019re Booked!" }),
2429
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "bw-conf-code", children: bookingResult.booking.confirmationCode }),
2430
2441
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bw-details-card", children: [
2431
2442
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bw-detail-row", children: [
2432
2443
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bw-detail-label", children: "When" }),
@@ -2464,7 +2475,7 @@ function BookingWidget({
2464
2475
  ] })
2465
2476
  ] }),
2466
2477
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "bw-email-notice", children: [
2467
- "A confirmation email has been sent to ",
2478
+ "If your host uses Google Calendar, a calendar invite will be sent to ",
2468
2479
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: guestInfo.email }),
2469
2480
  "."
2470
2481
  ] })
@@ -2566,7 +2577,7 @@ var WIDGET_CSS = `
2566
2577
  .bw-datetime-layout { flex-direction: column; }
2567
2578
  }
2568
2579
  @media (min-width: 560px) {
2569
- .bw-datetime-layout { min-height: 340px; }
2580
+ .bw-datetime-layout { min-height: 400px; }
2570
2581
  .bw-calendar { flex: 1 1 auto; padding-right: 16px; border-right: 1px solid #f0f0f0; }
2571
2582
  .bw-times { width: 180px; flex-shrink: 0; padding-left: 16px; }
2572
2583
  }
@@ -2615,9 +2626,12 @@ var WIDGET_CSS = `
2615
2626
  display: flex; align-items: center; justify-content: center;
2616
2627
  height: 100%; min-height: 160px; color: #9ca3af; font-size: 0.8125rem; text-align: center; padding: 16px;
2617
2628
  }
2618
- .bw-times-scroll { overflow-y: auto; max-height: 340px; }
2629
+ .bw-times-scroll { overflow-y: auto; max-height: 400px; overflow-x: hidden; }
2619
2630
  .bw-times-date { font-weight: 600; font-size: 0.8125rem; color: #374151; margin: 0 0 12px 0; }
2620
2631
  .bw-time-group { margin-bottom: 16px; }
2632
+ .bw-times-scroll-hint {
2633
+ font-size: 0.6875rem; color: #9ca3af; text-align: center; margin: 8px 0 0 0; padding-bottom: 8px;
2634
+ }
2621
2635
  .bw-time-label { display: block; font-size: 0.6875rem; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
2622
2636
 
2623
2637
  .bw-time-btn {
@@ -2854,103 +2868,103 @@ Object.defineProperty(exports, "getSpeakableSelectorsForPage", {
2854
2868
  });
2855
2869
  Object.defineProperty(exports, "CalendarView", {
2856
2870
  enumerable: true,
2857
- get: function () { return chunkZGT5ZYQ5_js.CalendarView; }
2871
+ get: function () { return chunk7BEMFSF6_js.CalendarView; }
2858
2872
  });
2859
2873
  Object.defineProperty(exports, "CheckoutForm", {
2860
2874
  enumerable: true,
2861
- get: function () { return chunkZGT5ZYQ5_js.CheckoutForm; }
2875
+ get: function () { return chunk7BEMFSF6_js.CheckoutForm; }
2862
2876
  });
2863
2877
  Object.defineProperty(exports, "EventCalendar", {
2864
2878
  enumerable: true,
2865
- get: function () { return chunkZGT5ZYQ5_js.EventCalendar; }
2879
+ get: function () { return chunk7BEMFSF6_js.EventCalendar; }
2866
2880
  });
2867
2881
  Object.defineProperty(exports, "EventEmbed", {
2868
2882
  enumerable: true,
2869
- get: function () { return chunkZGT5ZYQ5_js.EventEmbed; }
2883
+ get: function () { return chunk7BEMFSF6_js.EventEmbed; }
2870
2884
  });
2871
2885
  Object.defineProperty(exports, "EventModal", {
2872
2886
  enumerable: true,
2873
- get: function () { return chunkZGT5ZYQ5_js.EventModal; }
2887
+ get: function () { return chunk7BEMFSF6_js.EventModal; }
2874
2888
  });
2875
2889
  Object.defineProperty(exports, "EventTile", {
2876
2890
  enumerable: true,
2877
- get: function () { return chunkZGT5ZYQ5_js.EventTile; }
2891
+ get: function () { return chunk7BEMFSF6_js.EventTile; }
2878
2892
  });
2879
2893
  Object.defineProperty(exports, "OfferingCard", {
2880
2894
  enumerable: true,
2881
- get: function () { return chunkZGT5ZYQ5_js.OfferingCard; }
2895
+ get: function () { return chunk7BEMFSF6_js.OfferingCard; }
2882
2896
  });
2883
2897
  Object.defineProperty(exports, "OfferingList", {
2884
2898
  enumerable: true,
2885
- get: function () { return chunkZGT5ZYQ5_js.OfferingList; }
2899
+ get: function () { return chunk7BEMFSF6_js.OfferingList; }
2886
2900
  });
2887
2901
  Object.defineProperty(exports, "ProductEmbed", {
2888
2902
  enumerable: true,
2889
- get: function () { return chunkZGT5ZYQ5_js.ProductEmbed; }
2903
+ get: function () { return chunk7BEMFSF6_js.ProductEmbed; }
2890
2904
  });
2891
2905
  Object.defineProperty(exports, "RegistrationForm", {
2892
2906
  enumerable: true,
2893
- get: function () { return chunkZGT5ZYQ5_js.RegistrationForm; }
2907
+ get: function () { return chunk7BEMFSF6_js.RegistrationForm; }
2894
2908
  });
2895
2909
  Object.defineProperty(exports, "UpcomingEvents", {
2896
2910
  enumerable: true,
2897
- get: function () { return chunkZGT5ZYQ5_js.UpcomingEvents; }
2911
+ get: function () { return chunk7BEMFSF6_js.UpcomingEvents; }
2898
2912
  });
2899
2913
  Object.defineProperty(exports, "createCheckoutSession", {
2900
2914
  enumerable: true,
2901
- get: function () { return chunkZGT5ZYQ5_js.createCheckoutSession; }
2915
+ get: function () { return chunk7BEMFSF6_js.createCheckoutSession; }
2902
2916
  });
2903
2917
  Object.defineProperty(exports, "fetchNextEvent", {
2904
2918
  enumerable: true,
2905
- get: function () { return chunkZGT5ZYQ5_js.fetchNextEvent; }
2919
+ get: function () { return chunk7BEMFSF6_js.fetchNextEvent; }
2906
2920
  });
2907
2921
  Object.defineProperty(exports, "fetchOffering", {
2908
2922
  enumerable: true,
2909
- get: function () { return chunkZGT5ZYQ5_js.fetchOffering; }
2923
+ get: function () { return chunk7BEMFSF6_js.fetchOffering; }
2910
2924
  });
2911
2925
  Object.defineProperty(exports, "fetchOfferings", {
2912
2926
  enumerable: true,
2913
- get: function () { return chunkZGT5ZYQ5_js.fetchOfferings; }
2927
+ get: function () { return chunk7BEMFSF6_js.fetchOfferings; }
2914
2928
  });
2915
2929
  Object.defineProperty(exports, "fetchProducts", {
2916
2930
  enumerable: true,
2917
- get: function () { return chunkZGT5ZYQ5_js.fetchProducts; }
2931
+ get: function () { return chunk7BEMFSF6_js.fetchProducts; }
2918
2932
  });
2919
2933
  Object.defineProperty(exports, "fetchServices", {
2920
2934
  enumerable: true,
2921
- get: function () { return chunkZGT5ZYQ5_js.fetchServices; }
2935
+ get: function () { return chunk7BEMFSF6_js.fetchServices; }
2922
2936
  });
2923
2937
  Object.defineProperty(exports, "fetchUpcomingEvents", {
2924
2938
  enumerable: true,
2925
- get: function () { return chunkZGT5ZYQ5_js.fetchUpcomingEvents; }
2939
+ get: function () { return chunk7BEMFSF6_js.fetchUpcomingEvents; }
2926
2940
  });
2927
2941
  Object.defineProperty(exports, "formatDate", {
2928
2942
  enumerable: true,
2929
- get: function () { return chunkZGT5ZYQ5_js.formatDate; }
2943
+ get: function () { return chunk7BEMFSF6_js.formatDate; }
2930
2944
  });
2931
2945
  Object.defineProperty(exports, "formatDateTime", {
2932
2946
  enumerable: true,
2933
- get: function () { return chunkZGT5ZYQ5_js.formatDateTime; }
2947
+ get: function () { return chunk7BEMFSF6_js.formatDateTime; }
2934
2948
  });
2935
2949
  Object.defineProperty(exports, "formatPrice", {
2936
2950
  enumerable: true,
2937
- get: function () { return chunkZGT5ZYQ5_js.formatPrice; }
2951
+ get: function () { return chunk7BEMFSF6_js.formatPrice; }
2938
2952
  });
2939
2953
  Object.defineProperty(exports, "getOfferingUrl", {
2940
2954
  enumerable: true,
2941
- get: function () { return chunkZGT5ZYQ5_js.getOfferingUrl; }
2955
+ get: function () { return chunk7BEMFSF6_js.getOfferingUrl; }
2942
2956
  });
2943
2957
  Object.defineProperty(exports, "registerForEvent", {
2944
2958
  enumerable: true,
2945
- get: function () { return chunkZGT5ZYQ5_js.registerForEvent; }
2959
+ get: function () { return chunk7BEMFSF6_js.registerForEvent; }
2946
2960
  });
2947
2961
  Object.defineProperty(exports, "useEventModal", {
2948
2962
  enumerable: true,
2949
- get: function () { return chunkZGT5ZYQ5_js.useEventModal; }
2963
+ get: function () { return chunk7BEMFSF6_js.useEventModal; }
2950
2964
  });
2951
2965
  Object.defineProperty(exports, "SetupWizard", {
2952
2966
  enumerable: true,
2953
- get: function () { return chunk5R4R3WDP_js.SetupWizard; }
2967
+ get: function () { return chunkY4BW6XYJ_js.SetupWizard; }
2954
2968
  });
2955
2969
  Object.defineProperty(exports, "clearRedirectCache", {
2956
2970
  enumerable: true,