@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.mjs CHANGED
@@ -2,12 +2,12 @@ export { ManagedImage, assignImageToSlot, clearImageSlot, fetchManagedImage, fet
2
2
  import './chunk-M5VNAX5I.mjs';
3
3
  export { TestimonialSection, fetchReviewStats, fetchReviews } from './chunk-QD66FTXZ.mjs';
4
4
  export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createLLMsFullTxtHandler, createLLMsTxtHandler, createSpeakableSchema, generateLLMsFullTxt, generateLLMsTxt, getBusinessInfo, getFAQItems as getLLMFAQItems, getServices as getLLMServices, getLLMsData, getPageSummaries, getSpeakableSelectorsForPage } from './chunk-CG53ASWX.mjs';
5
- export { CalendarView, CheckoutForm, EventCalendar, EventEmbed, EventModal, EventTile, OfferingCard, OfferingList, ProductEmbed, RegistrationForm, UpcomingEvents, createCheckoutSession, fetchNextEvent, fetchOffering, fetchOfferings, fetchProducts, fetchServices, fetchUpcomingEvents, formatDate, formatDateTime, formatPrice, getOfferingUrl, registerForEvent, useEventModal } from './chunk-QY7CDW6P.mjs';
6
- export { SetupWizard } from './chunk-XFRPT5ZX.mjs';
5
+ export { CalendarView, CheckoutForm, EventCalendar, EventEmbed, EventModal, EventTile, OfferingCard, OfferingList, ProductEmbed, RegistrationForm, UpcomingEvents, createCheckoutSession, fetchNextEvent, fetchOffering, fetchOfferings, fetchProducts, fetchServices, fetchUpcomingEvents, formatDate, formatDateTime, formatPrice, getOfferingUrl, registerForEvent, useEventModal } from './chunk-A37Z47FZ.mjs';
6
+ export { SetupWizard } from './chunk-X66VOCWP.mjs';
7
7
  export { clearRedirectCache, fetchRedirectRules, generateNextRedirects, handleManagedRedirects } from './chunk-ASVFZY6X.mjs';
8
- import { SitemapSync } from './chunk-WPSRS352.mjs';
8
+ import { SitemapSync } from './chunk-BQOFRBGZ.mjs';
9
9
  import { AnalyticsProvider } from './chunk-OW2C3ATV.mjs';
10
- import { EngageWidget } from './chunk-MDOHOEME.mjs';
10
+ import { EngageWidget } from './chunk-GM2ZDV2B.mjs';
11
11
  import { configureFormsApi } from './chunk-SMUFNQLM.mjs';
12
12
  import './chunk-4XPGGLVP.mjs';
13
13
  import React3, { createContext, useContext, useState, useRef, useCallback, useEffect, useMemo, Suspense } from 'react';
@@ -1863,10 +1863,21 @@ async function fetchAvailability(typeSlug, date, orgSlug, apiUrl, apiKey, timezo
1863
1863
  const endpoint = key ? `${url}/sync/widget/availability/${typeSlug}?${params}` : `${url}/sync/public/${orgSlug}/availability/${typeSlug}?${params}`;
1864
1864
  const response = await fetch(endpoint, { headers: buildHeaders(key) });
1865
1865
  if (!response.ok) {
1866
- throw new Error(`Failed to fetch availability: ${response.statusText}`);
1866
+ const msg = await response.json().catch(() => ({ message: response.statusText }));
1867
+ let detail = msg && typeof msg.message === "string" ? String(msg.message).trim() : (response.statusText || "").trim();
1868
+ if (detail === String(response.status) || /^\d+$/.test(detail)) detail = "";
1869
+ const rest = detail ? `${response.status} ${detail}` : String(response.status);
1870
+ 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;
1871
+ throw new Error(fallback || `Failed to fetch availability: ${rest}`.trim());
1867
1872
  }
1868
1873
  const data = await response.json();
1869
- return data.slots || [];
1874
+ const raw = data.slots || [];
1875
+ return raw.map((slot) => ({
1876
+ start: slot.startTime ?? slot.start,
1877
+ end: slot.endTime ?? slot.end,
1878
+ hostId: slot.hostId,
1879
+ available: slot.available !== false
1880
+ }));
1870
1881
  }
1871
1882
  async function createSlotHold(holdData, apiUrl, apiKey) {
1872
1883
  const cfg = getApiConfig3();
@@ -2320,7 +2331,8 @@ function BookingWidget({
2320
2331
  groupedSlots.evening.length > 0 && /* @__PURE__ */ jsxs("div", { className: "bw-time-group", children: [
2321
2332
  /* @__PURE__ */ jsx("span", { className: "bw-time-label", children: "Evening" }),
2322
2333
  groupedSlots.evening.map((slot) => /* @__PURE__ */ jsx(TimeButton, { slot, selected: selectedSlot?.start === slot.start, confirmed: confirmedSlot && selectedSlot?.start === slot.start, onClick: () => handleSlotSelect(slot), onConfirm: handleSlotConfirm, timezone, loading }, slot.start))
2323
- ] })
2334
+ ] }),
2335
+ (groupedSlots.afternoon.length > 0 || groupedSlots.evening.length > 0) && /* @__PURE__ */ jsx("p", { className: "bw-times-scroll-hint", children: "Scroll for more times" })
2324
2336
  ] }) })
2325
2337
  ] })
2326
2338
  ] }),
@@ -2420,7 +2432,6 @@ function BookingWidget({
2420
2432
  step === "success" && bookingResult && /* @__PURE__ */ jsxs("div", { className: "bw-step bw-fade-in bw-success", children: [
2421
2433
  /* @__PURE__ */ jsx("div", { className: "bw-success-icon", children: /* @__PURE__ */ jsx(CheckCircleIcon, {}) }),
2422
2434
  /* @__PURE__ */ jsx("h2", { className: "bw-heading", children: "You\u2019re Booked!" }),
2423
- /* @__PURE__ */ jsx("p", { className: "bw-conf-code", children: bookingResult.booking.confirmationCode }),
2424
2435
  /* @__PURE__ */ jsxs("div", { className: "bw-details-card", children: [
2425
2436
  /* @__PURE__ */ jsxs("div", { className: "bw-detail-row", children: [
2426
2437
  /* @__PURE__ */ jsx("span", { className: "bw-detail-label", children: "When" }),
@@ -2458,7 +2469,7 @@ function BookingWidget({
2458
2469
  ] })
2459
2470
  ] }),
2460
2471
  /* @__PURE__ */ jsxs("p", { className: "bw-email-notice", children: [
2461
- "A confirmation email has been sent to ",
2472
+ "If your host uses Google Calendar, a calendar invite will be sent to ",
2462
2473
  /* @__PURE__ */ jsx("strong", { children: guestInfo.email }),
2463
2474
  "."
2464
2475
  ] })
@@ -2560,7 +2571,7 @@ var WIDGET_CSS = `
2560
2571
  .bw-datetime-layout { flex-direction: column; }
2561
2572
  }
2562
2573
  @media (min-width: 560px) {
2563
- .bw-datetime-layout { min-height: 340px; }
2574
+ .bw-datetime-layout { min-height: 400px; }
2564
2575
  .bw-calendar { flex: 1 1 auto; padding-right: 16px; border-right: 1px solid #f0f0f0; }
2565
2576
  .bw-times { width: 180px; flex-shrink: 0; padding-left: 16px; }
2566
2577
  }
@@ -2609,9 +2620,12 @@ var WIDGET_CSS = `
2609
2620
  display: flex; align-items: center; justify-content: center;
2610
2621
  height: 100%; min-height: 160px; color: #9ca3af; font-size: 0.8125rem; text-align: center; padding: 16px;
2611
2622
  }
2612
- .bw-times-scroll { overflow-y: auto; max-height: 340px; }
2623
+ .bw-times-scroll { overflow-y: auto; max-height: 400px; overflow-x: hidden; }
2613
2624
  .bw-times-date { font-weight: 600; font-size: 0.8125rem; color: #374151; margin: 0 0 12px 0; }
2614
2625
  .bw-time-group { margin-bottom: 16px; }
2626
+ .bw-times-scroll-hint {
2627
+ font-size: 0.6875rem; color: #9ca3af; text-align: center; margin: 8px 0 0 0; padding-bottom: 8px;
2628
+ }
2615
2629
  .bw-time-label { display: block; font-size: 0.6875rem; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
2616
2630
 
2617
2631
  .bw-time-btn {