@sonordev/site-kit 2.8.1 → 2.9.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.
Files changed (81) hide show
  1. package/dist/blog/index.js +2 -1
  2. package/dist/blog/index.js.map +1 -1
  3. package/dist/blog/index.mjs +2 -1
  4. package/dist/blog/index.mjs.map +1 -1
  5. package/dist/{chunk-5SQ4NRPH.mjs → chunk-3AEOGV6V.mjs} +6 -4
  6. package/dist/chunk-3AEOGV6V.mjs.map +1 -0
  7. package/dist/chunk-662YHKWW.mjs +10 -0
  8. package/dist/chunk-662YHKWW.mjs.map +1 -0
  9. package/dist/{chunk-MNOVPHL6.mjs → chunk-72MRAYAS.mjs} +19 -14
  10. package/dist/chunk-72MRAYAS.mjs.map +1 -0
  11. package/dist/{chunk-MWE2HRPU.js → chunk-D5XTX5EB.js} +19 -14
  12. package/dist/chunk-D5XTX5EB.js.map +1 -0
  13. package/dist/{chunk-AT2ZF3TL.mjs → chunk-FMZOZQBV.mjs} +91 -15
  14. package/dist/chunk-FMZOZQBV.mjs.map +1 -0
  15. package/dist/{chunk-ZQINTH5K.js → chunk-I2GTT2DG.js} +91 -15
  16. package/dist/chunk-I2GTT2DG.js.map +1 -0
  17. package/dist/{chunk-PKUTYMN7.js → chunk-J25JPU77.js} +2 -2
  18. package/dist/chunk-J25JPU77.js.map +1 -0
  19. package/dist/chunk-J7QI3GDX.js +12 -0
  20. package/dist/chunk-J7QI3GDX.js.map +1 -0
  21. package/dist/{chunk-L7XPPFSS.mjs → chunk-QDKQZ5XH.mjs} +2 -2
  22. package/dist/chunk-QDKQZ5XH.mjs.map +1 -0
  23. package/dist/{chunk-PAF5IGGF.js → chunk-XNUPJC6R.js} +6 -4
  24. package/dist/chunk-XNUPJC6R.js.map +1 -0
  25. package/dist/commerce/index.d.mts +3 -3
  26. package/dist/commerce/index.d.ts +3 -3
  27. package/dist/commerce/server.d.mts +1 -1
  28. package/dist/commerce/server.d.ts +1 -1
  29. package/dist/index.d.mts +5 -191
  30. package/dist/index.d.ts +5 -191
  31. package/dist/index.js +13 -13
  32. package/dist/index.mjs +1 -1
  33. package/dist/layout/index.js +3 -3
  34. package/dist/layout/index.mjs +1 -1
  35. package/dist/llms/index.d.mts +18 -4
  36. package/dist/llms/index.d.ts +18 -4
  37. package/dist/llms/index.js +26 -51
  38. package/dist/llms/index.js.map +1 -1
  39. package/dist/llms/index.mjs +16 -41
  40. package/dist/llms/index.mjs.map +1 -1
  41. package/dist/seo/index.d.mts +10 -205
  42. package/dist/seo/index.d.ts +10 -205
  43. package/dist/seo/index.js +16 -15
  44. package/dist/seo/index.js.map +1 -1
  45. package/dist/seo/index.mjs +7 -6
  46. package/dist/seo/index.mjs.map +1 -1
  47. package/dist/seo/server.d.mts +2 -106
  48. package/dist/seo/server.d.ts +2 -106
  49. package/dist/seo/server.js +56 -197
  50. package/dist/seo/server.js.map +1 -1
  51. package/dist/seo/server.mjs +2 -183
  52. package/dist/seo/server.mjs.map +1 -1
  53. package/dist/server-l6LMNvF1.d.ts +360 -0
  54. package/dist/server-mX5At_6x.d.mts +360 -0
  55. package/dist/sitemap/index.d.mts +1 -1
  56. package/dist/sitemap/index.d.ts +1 -1
  57. package/dist/sitemap/index.js +2 -2
  58. package/dist/sitemap/index.mjs +1 -1
  59. package/dist/sync/index.d.mts +213 -0
  60. package/dist/sync/index.d.ts +213 -0
  61. package/dist/sync/index.js +13 -13
  62. package/dist/sync/index.mjs +1 -1
  63. package/dist/{types-DYyIAgQg.d.ts → types-DPsbBKiu.d.mts} +1 -1
  64. package/dist/{types-DYyIAgQg.d.mts → types-DPsbBKiu.d.ts} +1 -1
  65. package/dist/{types-J7Z_FqmV.d.mts → types-DhCAWUmd.d.mts} +8 -0
  66. package/dist/{types-B0xmgGw-.d.ts → types-iZM4Lz71.d.mts} +1 -1
  67. package/dist/{types-B0xmgGw-.d.mts → types-iZM4Lz71.d.ts} +1 -1
  68. package/dist/{types-0NuBL1Gg.d.ts → types-xcP_owwn.d.ts} +8 -0
  69. package/dist/{useEventModal-CJLCmH5Y.d.ts → useEventModal-CcxNZOvp.d.ts} +2 -2
  70. package/dist/{useEventModal-4W_y1SYY.d.mts → useEventModal-qJfX_1XG.d.mts} +2 -2
  71. package/package.json +2 -2
  72. package/dist/chunk-5SQ4NRPH.mjs.map +0 -1
  73. package/dist/chunk-AT2ZF3TL.mjs.map +0 -1
  74. package/dist/chunk-L7XPPFSS.mjs.map +0 -1
  75. package/dist/chunk-MNOVPHL6.mjs.map +0 -1
  76. package/dist/chunk-MWE2HRPU.js.map +0 -1
  77. package/dist/chunk-PAF5IGGF.js.map +0 -1
  78. package/dist/chunk-PKUTYMN7.js.map +0 -1
  79. package/dist/chunk-ZQINTH5K.js.map +0 -1
  80. package/dist/routing-C7gmHWm9.d.ts +0 -163
  81. package/dist/routing-trNzR1Pz.d.mts +0 -163
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
- export { d as ManagedFAQData, M as ManagedMetadataResult, c as ManagedSchemaProps } from './types-DYyIAgQg.mjs';
1
+ export { b as ManagedFAQData, M as ManagedMetadataResult, a as ManagedSchemaProps } from './types-DPsbBKiu.mjs';
2
2
  export { c as AnalyticsConfig, b as AnalyticsEvent, P as PageView } from './types-DNSYU7qI.mjs';
3
3
  export { C as ChatConfig, c as EngageElement, d as WidgetConfig } from './types-BnCwwUX3.mjs';
4
4
  export { a as FormField, F as FormSubmission, M as ManagedFormConfig } from './types-0dmq3k20.mjs';
5
5
  export { a as BlogAuthor, b as BlogCategory, B as BlogPostType } from './types-5P5B9RgV.mjs';
6
- export { g as Cart, f as CartItem, e as CommerceCategory, C as CommerceOffering, c as CommerceSchedule, a as CommerceVariant, O as OfferingType } from './types-B0xmgGw-.mjs';
7
- export { A as CalendarView, x as CheckoutForm, s as CheckoutLineItem, F as EventCalendar, y as EventCheckout, z as EventCheckoutProps, w as EventEmbed, B as EventModal, E as EventTile, O as OfferingCard, t as OfferingList, u as ProductEmbed, R as RegistrationForm, U as UpcomingEvents, l as createCheckoutSession, j as fetchNextEvent, a as fetchOffering, f as fetchOfferings, c as fetchProducts, h as fetchServices, i as fetchUpcomingEvents, I as formatDate, J as formatDateTime, H as formatPrice, T as getOfferingUrl, r as registerForEvent, G as useEventModal } from './useEventModal-4W_y1SYY.mjs';
6
+ export { d as Cart, e as CartItem, a as CommerceCategory, C as CommerceOffering, c as CommerceSchedule, b as CommerceVariant, O as OfferingType } from './types-iZM4Lz71.mjs';
7
+ export { d as CalendarView, C as CheckoutForm, t as CheckoutLineItem, f as EventCalendar, c as EventCheckout, s as EventCheckoutProps, b as EventEmbed, e as EventModal, E as EventTile, O as OfferingCard, a as OfferingList, P as ProductEmbed, R as RegistrationForm, U as UpcomingEvents, m as createCheckoutSession, l as fetchNextEvent, h as fetchOffering, g as fetchOfferings, i as fetchProducts, j as fetchServices, k as fetchUpcomingEvents, o as formatDate, p as formatDateTime, n as formatPrice, q as getOfferingUrl, r as registerForEvent, u as useEventModal } from './useEventModal-qJfX_1XG.mjs';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
9
  import React__default from 'react';
10
10
  export { RedirectConfig, RedirectRule, clearRedirectCache, fetchRedirectRules, generateNextRedirects, handleManagedRedirects } from './redirects/index.mjs';
@@ -12,6 +12,7 @@ export { g as ImageApiConfig, I as ImageFile, M as ManagedImage, b as ManagedIma
12
12
  export { EngageOverride, ExperimentAssignment, ExperimentConfig, ExperimentConversion, ExperimentVariant, MetaOverride, PriceOverride, SignalBridge, SignalBridgeProps, SignalConfig, SignalContextValue, SignalEvent, SignalExperiment, SignalOutcome, useExperimentVariant, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome } from './signal/index.mjs';
13
13
  export { TestimonialSection } from './reputation/index.mjs';
14
14
  export { Review, ReviewStats, TestimonialSectionProps, fetchReviewStats, fetchReviews } from './reputation/server.mjs';
15
+ export { BookingResult, BookingType, BookingWidget, BookingWidgetProps, GuestInfo, Host, SlotHold, SyncWidgetConfig, TimeSlot, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, releaseSlotHold } from './sync/index.mjs';
15
16
  import 'next';
16
17
  import 'next/server';
17
18
 
@@ -221,191 +222,4 @@ interface AffiliatesWidgetProps {
221
222
  */
222
223
  declare function AffiliatesWidget({ className, loadingComponent, emptyComponent, errorComponent, showOffers, renderAffiliate, limit, }: AffiliatesWidgetProps): string | number | bigint | true | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
223
224
 
224
- /**
225
- * Sync Module Types - Booking Widget for Client Sites
226
- */
227
- interface BookingType {
228
- id: string;
229
- slug: string;
230
- name: string;
231
- description?: string;
232
- duration_minutes: number;
233
- buffer_before?: number;
234
- buffer_after?: number;
235
- color?: string;
236
- location_type: 'video' | 'phone' | 'in_person' | 'custom';
237
- location_details?: string;
238
- price_cents?: number;
239
- currency?: string;
240
- is_active: boolean;
241
- }
242
- interface TimeSlot {
243
- start: string;
244
- end: string;
245
- hostId?: string;
246
- available: boolean;
247
- }
248
- interface Host {
249
- id: string;
250
- name: string;
251
- email?: string;
252
- avatar?: string;
253
- title?: string;
254
- bio?: string;
255
- }
256
- interface SlotHold {
257
- holdId: string;
258
- expiresAt: string;
259
- expiresInSeconds: number;
260
- }
261
- interface BookingResult {
262
- success: boolean;
263
- booking: {
264
- id: string;
265
- confirmationCode: string;
266
- scheduledAt: string;
267
- durationMinutes: number;
268
- hostName?: string;
269
- timezone: string;
270
- };
271
- cancelUrl: string;
272
- rescheduleUrl: string;
273
- calendarLinks: {
274
- google: string;
275
- outlook: string;
276
- ics: string;
277
- };
278
- }
279
- interface BookingWidgetProps {
280
- /** Organization slug – required for public (unauthenticated) mode, optional with apiKey */
281
- orgSlug?: string;
282
- /** API key – when provided, uses authenticated /sync/widget/* endpoints (no orgSlug needed) */
283
- apiKey?: string;
284
- /** API base URL - defaults to https://api.sonor.io */
285
- apiUrl?: string;
286
- /** Specific booking type slug to show (optional - shows all if not provided) */
287
- bookingTypeSlug?: string;
288
- /** Guest's timezone (auto-detected if not provided) */
289
- timezone?: string;
290
- /** Custom class name for styling */
291
- className?: string;
292
- /** Number of days to show availability for */
293
- daysToShow?: number;
294
- /** Called when booking is completed */
295
- onBookingComplete?: (result: BookingResult) => void;
296
- /** Called when an error occurs */
297
- onError?: (error: Error) => void;
298
- /** Hide the booking type selector (for single type embed) */
299
- hideTypeSelector?: boolean;
300
- /** Custom styles */
301
- styles?: {
302
- primaryColor?: string;
303
- borderRadius?: string;
304
- fontFamily?: string;
305
- /** Dark mode colors */
306
- backgroundColor?: string;
307
- surfaceColor?: string;
308
- elevatedColor?: string;
309
- textPrimary?: string;
310
- textSecondary?: string;
311
- textTertiary?: string;
312
- borderColor?: string;
313
- inputBorderColor?: string;
314
- };
315
- }
316
- interface GuestInfo {
317
- name: string;
318
- email: string;
319
- phone?: string;
320
- notes?: string;
321
- }
322
- interface SyncWidgetConfig {
323
- apiUrl: string;
324
- orgSlug: string;
325
- timezone: string;
326
- }
327
-
328
- declare function BookingWidget({ orgSlug, apiKey: propApiKey, apiUrl: propApiUrl, bookingTypeSlug, timezone: propTimezone, className, daysToShow, onBookingComplete, onError, hideTypeSelector, styles, }: BookingWidgetProps): react_jsx_runtime.JSX.Element;
329
-
330
- /**
331
- * Sync API Functions - Client-side API calls for booking widget
332
- *
333
- * Two modes:
334
- * 1. API-key flow (preferred): Uses x-api-key header → /sync/widget/* endpoints.
335
- * Project is resolved server-side from the key. No orgSlug needed.
336
- * 2. Public/orgSlug flow (legacy): Uses /sync/public/:org/* endpoints. No auth.
337
- */
338
-
339
- /**
340
- * Fetch booking types.
341
- * - With apiKey → GET /sync/widget/types
342
- * - With orgSlug → GET /sync/public/:org/types
343
- */
344
- declare function fetchBookingTypes(orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType[]>;
345
- /**
346
- * Fetch booking type details
347
- */
348
- declare function fetchBookingTypeDetails(typeSlug: string, orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType>;
349
- /**
350
- * Fetch available time slots for a specific date
351
- */
352
- declare function fetchAvailability(typeSlug: string, date: string, // YYYY-MM-DD format
353
- orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string, hostId?: string): Promise<TimeSlot[]>;
354
- /**
355
- * Hold a time slot temporarily (5-10 minutes)
356
- */
357
- declare function createSlotHold(holdData: {
358
- bookingType: string;
359
- slotStart: string;
360
- slotEnd: string;
361
- hostId: string;
362
- sessionId: string;
363
- guestEmail?: string;
364
- }, apiUrl?: string, apiKey?: string): Promise<SlotHold>;
365
- /**
366
- * Release a slot hold
367
- */
368
- declare function releaseSlotHold(holdId: string, apiUrl?: string, apiKey?: string): Promise<void>;
369
- /**
370
- * Create a booking
371
- */
372
- declare function createBooking(bookingData: {
373
- bookingType: string;
374
- scheduledAt: string;
375
- hostId: string;
376
- name: string;
377
- email: string;
378
- phone?: string;
379
- company?: string;
380
- message?: string;
381
- source: string;
382
- timezone?: string;
383
- holdId?: string;
384
- sessionId?: string;
385
- sourceUrl?: string;
386
- }, apiUrl?: string, apiKey?: string): Promise<BookingResult>;
387
- /**
388
- * Get available dates for a month (helper for calendar view)
389
- * Returns dates that have at least one available slot
390
- */
391
- declare function fetchAvailableDates(typeSlug: string, startDate: string, // YYYY-MM-DD
392
- endDate: string, // YYYY-MM-DD
393
- orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string): Promise<string[]>;
394
- /**
395
- * Detect user's timezone
396
- */
397
- declare function detectTimezone(): string;
398
- /**
399
- * Format time for display
400
- */
401
- declare function formatTime(isoString: string, timezone: string): string;
402
- /**
403
- * Format date for display
404
- */
405
- declare function formatDate(isoString: string, timezone: string): string;
406
- /**
407
- * Format duration for display
408
- */
409
- declare function formatDuration(minutes: number): string;
410
-
411
- export { type Affiliate, AffiliateCard, type AffiliateCardProps, type AffiliateOffer, type AffiliateWithOffers, AffiliatesWidget, type AffiliatesWidgetProps, type BookingResult, type BookingType, BookingWidget, type BookingWidgetProps, type GuestInfo, type Host, type SiteKitConfig, type SlotHold, type SyncWidgetConfig, type TimeSlot, type UseAffiliatesResult, createBooking, createSlotHold, detectTimezone, fetchAffiliates, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, getTrackingUrl, releaseSlotHold, useAffiliates };
225
+ export { type Affiliate, AffiliateCard, type AffiliateCardProps, type AffiliateOffer, type AffiliateWithOffers, AffiliatesWidget, type AffiliatesWidgetProps, type SiteKitConfig, type UseAffiliatesResult, fetchAffiliates, getTrackingUrl, useAffiliates };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export { d as ManagedFAQData, M as ManagedMetadataResult, c as ManagedSchemaProps } from './types-DYyIAgQg.js';
1
+ export { b as ManagedFAQData, M as ManagedMetadataResult, a as ManagedSchemaProps } from './types-DPsbBKiu.js';
2
2
  export { c as AnalyticsConfig, b as AnalyticsEvent, P as PageView } from './types-DNSYU7qI.js';
3
3
  export { C as ChatConfig, c as EngageElement, d as WidgetConfig } from './types-BnCwwUX3.js';
4
4
  export { a as FormField, F as FormSubmission, M as ManagedFormConfig } from './types-0dmq3k20.js';
5
5
  export { a as BlogAuthor, b as BlogCategory, B as BlogPostType } from './types-5P5B9RgV.js';
6
- export { g as Cart, f as CartItem, e as CommerceCategory, C as CommerceOffering, c as CommerceSchedule, a as CommerceVariant, O as OfferingType } from './types-B0xmgGw-.js';
7
- export { A as CalendarView, x as CheckoutForm, s as CheckoutLineItem, F as EventCalendar, y as EventCheckout, z as EventCheckoutProps, w as EventEmbed, B as EventModal, E as EventTile, O as OfferingCard, t as OfferingList, u as ProductEmbed, R as RegistrationForm, U as UpcomingEvents, l as createCheckoutSession, j as fetchNextEvent, a as fetchOffering, f as fetchOfferings, c as fetchProducts, h as fetchServices, i as fetchUpcomingEvents, I as formatDate, J as formatDateTime, H as formatPrice, T as getOfferingUrl, r as registerForEvent, G as useEventModal } from './useEventModal-CJLCmH5Y.js';
6
+ export { d as Cart, e as CartItem, a as CommerceCategory, C as CommerceOffering, c as CommerceSchedule, b as CommerceVariant, O as OfferingType } from './types-iZM4Lz71.js';
7
+ export { d as CalendarView, C as CheckoutForm, t as CheckoutLineItem, f as EventCalendar, c as EventCheckout, s as EventCheckoutProps, b as EventEmbed, e as EventModal, E as EventTile, O as OfferingCard, a as OfferingList, P as ProductEmbed, R as RegistrationForm, U as UpcomingEvents, m as createCheckoutSession, l as fetchNextEvent, h as fetchOffering, g as fetchOfferings, i as fetchProducts, j as fetchServices, k as fetchUpcomingEvents, o as formatDate, p as formatDateTime, n as formatPrice, q as getOfferingUrl, r as registerForEvent, u as useEventModal } from './useEventModal-CcxNZOvp.js';
8
8
  import * as react_jsx_runtime from 'react/jsx-runtime';
9
9
  import React__default from 'react';
10
10
  export { RedirectConfig, RedirectRule, clearRedirectCache, fetchRedirectRules, generateNextRedirects, handleManagedRedirects } from './redirects/index.js';
@@ -12,6 +12,7 @@ export { g as ImageApiConfig, I as ImageFile, M as ManagedImage, b as ManagedIma
12
12
  export { EngageOverride, ExperimentAssignment, ExperimentConfig, ExperimentConversion, ExperimentVariant, MetaOverride, PriceOverride, SignalBridge, SignalBridgeProps, SignalConfig, SignalContextValue, SignalEvent, SignalExperiment, SignalOutcome, useExperimentVariant, useSignal, useSignalConfig, useSignalEvent, useSignalExperiment, useSignalOutcome } from './signal/index.js';
13
13
  export { TestimonialSection } from './reputation/index.js';
14
14
  export { Review, ReviewStats, TestimonialSectionProps, fetchReviewStats, fetchReviews } from './reputation/server.js';
15
+ export { BookingResult, BookingType, BookingWidget, BookingWidgetProps, GuestInfo, Host, SlotHold, SyncWidgetConfig, TimeSlot, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, releaseSlotHold } from './sync/index.js';
15
16
  import 'next';
16
17
  import 'next/server';
17
18
 
@@ -221,191 +222,4 @@ interface AffiliatesWidgetProps {
221
222
  */
222
223
  declare function AffiliatesWidget({ className, loadingComponent, emptyComponent, errorComponent, showOffers, renderAffiliate, limit, }: AffiliatesWidgetProps): string | number | bigint | true | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
223
224
 
224
- /**
225
- * Sync Module Types - Booking Widget for Client Sites
226
- */
227
- interface BookingType {
228
- id: string;
229
- slug: string;
230
- name: string;
231
- description?: string;
232
- duration_minutes: number;
233
- buffer_before?: number;
234
- buffer_after?: number;
235
- color?: string;
236
- location_type: 'video' | 'phone' | 'in_person' | 'custom';
237
- location_details?: string;
238
- price_cents?: number;
239
- currency?: string;
240
- is_active: boolean;
241
- }
242
- interface TimeSlot {
243
- start: string;
244
- end: string;
245
- hostId?: string;
246
- available: boolean;
247
- }
248
- interface Host {
249
- id: string;
250
- name: string;
251
- email?: string;
252
- avatar?: string;
253
- title?: string;
254
- bio?: string;
255
- }
256
- interface SlotHold {
257
- holdId: string;
258
- expiresAt: string;
259
- expiresInSeconds: number;
260
- }
261
- interface BookingResult {
262
- success: boolean;
263
- booking: {
264
- id: string;
265
- confirmationCode: string;
266
- scheduledAt: string;
267
- durationMinutes: number;
268
- hostName?: string;
269
- timezone: string;
270
- };
271
- cancelUrl: string;
272
- rescheduleUrl: string;
273
- calendarLinks: {
274
- google: string;
275
- outlook: string;
276
- ics: string;
277
- };
278
- }
279
- interface BookingWidgetProps {
280
- /** Organization slug – required for public (unauthenticated) mode, optional with apiKey */
281
- orgSlug?: string;
282
- /** API key – when provided, uses authenticated /sync/widget/* endpoints (no orgSlug needed) */
283
- apiKey?: string;
284
- /** API base URL - defaults to https://api.sonor.io */
285
- apiUrl?: string;
286
- /** Specific booking type slug to show (optional - shows all if not provided) */
287
- bookingTypeSlug?: string;
288
- /** Guest's timezone (auto-detected if not provided) */
289
- timezone?: string;
290
- /** Custom class name for styling */
291
- className?: string;
292
- /** Number of days to show availability for */
293
- daysToShow?: number;
294
- /** Called when booking is completed */
295
- onBookingComplete?: (result: BookingResult) => void;
296
- /** Called when an error occurs */
297
- onError?: (error: Error) => void;
298
- /** Hide the booking type selector (for single type embed) */
299
- hideTypeSelector?: boolean;
300
- /** Custom styles */
301
- styles?: {
302
- primaryColor?: string;
303
- borderRadius?: string;
304
- fontFamily?: string;
305
- /** Dark mode colors */
306
- backgroundColor?: string;
307
- surfaceColor?: string;
308
- elevatedColor?: string;
309
- textPrimary?: string;
310
- textSecondary?: string;
311
- textTertiary?: string;
312
- borderColor?: string;
313
- inputBorderColor?: string;
314
- };
315
- }
316
- interface GuestInfo {
317
- name: string;
318
- email: string;
319
- phone?: string;
320
- notes?: string;
321
- }
322
- interface SyncWidgetConfig {
323
- apiUrl: string;
324
- orgSlug: string;
325
- timezone: string;
326
- }
327
-
328
- declare function BookingWidget({ orgSlug, apiKey: propApiKey, apiUrl: propApiUrl, bookingTypeSlug, timezone: propTimezone, className, daysToShow, onBookingComplete, onError, hideTypeSelector, styles, }: BookingWidgetProps): react_jsx_runtime.JSX.Element;
329
-
330
- /**
331
- * Sync API Functions - Client-side API calls for booking widget
332
- *
333
- * Two modes:
334
- * 1. API-key flow (preferred): Uses x-api-key header → /sync/widget/* endpoints.
335
- * Project is resolved server-side from the key. No orgSlug needed.
336
- * 2. Public/orgSlug flow (legacy): Uses /sync/public/:org/* endpoints. No auth.
337
- */
338
-
339
- /**
340
- * Fetch booking types.
341
- * - With apiKey → GET /sync/widget/types
342
- * - With orgSlug → GET /sync/public/:org/types
343
- */
344
- declare function fetchBookingTypes(orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType[]>;
345
- /**
346
- * Fetch booking type details
347
- */
348
- declare function fetchBookingTypeDetails(typeSlug: string, orgSlug?: string, apiUrl?: string, apiKey?: string): Promise<BookingType>;
349
- /**
350
- * Fetch available time slots for a specific date
351
- */
352
- declare function fetchAvailability(typeSlug: string, date: string, // YYYY-MM-DD format
353
- orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string, hostId?: string): Promise<TimeSlot[]>;
354
- /**
355
- * Hold a time slot temporarily (5-10 minutes)
356
- */
357
- declare function createSlotHold(holdData: {
358
- bookingType: string;
359
- slotStart: string;
360
- slotEnd: string;
361
- hostId: string;
362
- sessionId: string;
363
- guestEmail?: string;
364
- }, apiUrl?: string, apiKey?: string): Promise<SlotHold>;
365
- /**
366
- * Release a slot hold
367
- */
368
- declare function releaseSlotHold(holdId: string, apiUrl?: string, apiKey?: string): Promise<void>;
369
- /**
370
- * Create a booking
371
- */
372
- declare function createBooking(bookingData: {
373
- bookingType: string;
374
- scheduledAt: string;
375
- hostId: string;
376
- name: string;
377
- email: string;
378
- phone?: string;
379
- company?: string;
380
- message?: string;
381
- source: string;
382
- timezone?: string;
383
- holdId?: string;
384
- sessionId?: string;
385
- sourceUrl?: string;
386
- }, apiUrl?: string, apiKey?: string): Promise<BookingResult>;
387
- /**
388
- * Get available dates for a month (helper for calendar view)
389
- * Returns dates that have at least one available slot
390
- */
391
- declare function fetchAvailableDates(typeSlug: string, startDate: string, // YYYY-MM-DD
392
- endDate: string, // YYYY-MM-DD
393
- orgSlug?: string, apiUrl?: string, apiKey?: string, timezone?: string): Promise<string[]>;
394
- /**
395
- * Detect user's timezone
396
- */
397
- declare function detectTimezone(): string;
398
- /**
399
- * Format time for display
400
- */
401
- declare function formatTime(isoString: string, timezone: string): string;
402
- /**
403
- * Format date for display
404
- */
405
- declare function formatDate(isoString: string, timezone: string): string;
406
- /**
407
- * Format duration for display
408
- */
409
- declare function formatDuration(minutes: number): string;
410
-
411
- export { type Affiliate, AffiliateCard, type AffiliateCardProps, type AffiliateOffer, type AffiliateWithOffers, AffiliatesWidget, type AffiliatesWidgetProps, type BookingResult, type BookingType, BookingWidget, type BookingWidgetProps, type GuestInfo, type Host, type SiteKitConfig, type SlotHold, type SyncWidgetConfig, type TimeSlot, type UseAffiliatesResult, createBooking, createSlotHold, detectTimezone, fetchAffiliates, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, getTrackingUrl, releaseSlotHold, useAffiliates };
225
+ export { type Affiliate, AffiliateCard, type AffiliateCardProps, type AffiliateOffer, type AffiliateWithOffers, AffiliatesWidget, type AffiliatesWidgetProps, type SiteKitConfig, type UseAffiliatesResult, fetchAffiliates, getTrackingUrl, useAffiliates };
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ require('./chunk-GCPPXUAI.js');
7
7
  var chunkEHJANA5C_js = require('./chunk-EHJANA5C.js');
8
8
  var chunkGSRT66PA_js = require('./chunk-GSRT66PA.js');
9
9
  var chunk4LC4KETS_js = require('./chunk-4LC4KETS.js');
10
- var chunkZQINTH5K_js = require('./chunk-ZQINTH5K.js');
10
+ var chunkI2GTT2DG_js = require('./chunk-I2GTT2DG.js');
11
11
  require('./chunk-LPSWITNZ.js');
12
12
  require('./chunk-SYNJOJTP.js');
13
13
  var chunkGQU4LXOP_js = require('./chunk-GQU4LXOP.js');
@@ -315,51 +315,51 @@ Object.defineProperty(exports, "useEventModal", {
315
315
  });
316
316
  Object.defineProperty(exports, "BookingWidget", {
317
317
  enumerable: true,
318
- get: function () { return chunkZQINTH5K_js.BookingWidget; }
318
+ get: function () { return chunkI2GTT2DG_js.BookingWidget; }
319
319
  });
320
320
  Object.defineProperty(exports, "createBooking", {
321
321
  enumerable: true,
322
- get: function () { return chunkZQINTH5K_js.createBooking; }
322
+ get: function () { return chunkI2GTT2DG_js.createBooking; }
323
323
  });
324
324
  Object.defineProperty(exports, "createSlotHold", {
325
325
  enumerable: true,
326
- get: function () { return chunkZQINTH5K_js.createSlotHold; }
326
+ get: function () { return chunkI2GTT2DG_js.createSlotHold; }
327
327
  });
328
328
  Object.defineProperty(exports, "detectTimezone", {
329
329
  enumerable: true,
330
- get: function () { return chunkZQINTH5K_js.detectTimezone; }
330
+ get: function () { return chunkI2GTT2DG_js.detectTimezone; }
331
331
  });
332
332
  Object.defineProperty(exports, "fetchAvailability", {
333
333
  enumerable: true,
334
- get: function () { return chunkZQINTH5K_js.fetchAvailability; }
334
+ get: function () { return chunkI2GTT2DG_js.fetchAvailability; }
335
335
  });
336
336
  Object.defineProperty(exports, "fetchAvailableDates", {
337
337
  enumerable: true,
338
- get: function () { return chunkZQINTH5K_js.fetchAvailableDates; }
338
+ get: function () { return chunkI2GTT2DG_js.fetchAvailableDates; }
339
339
  });
340
340
  Object.defineProperty(exports, "fetchBookingTypeDetails", {
341
341
  enumerable: true,
342
- get: function () { return chunkZQINTH5K_js.fetchBookingTypeDetails; }
342
+ get: function () { return chunkI2GTT2DG_js.fetchBookingTypeDetails; }
343
343
  });
344
344
  Object.defineProperty(exports, "fetchBookingTypes", {
345
345
  enumerable: true,
346
- get: function () { return chunkZQINTH5K_js.fetchBookingTypes; }
346
+ get: function () { return chunkI2GTT2DG_js.fetchBookingTypes; }
347
347
  });
348
348
  Object.defineProperty(exports, "formatBookingDate", {
349
349
  enumerable: true,
350
- get: function () { return chunkZQINTH5K_js.formatDate; }
350
+ get: function () { return chunkI2GTT2DG_js.formatDate; }
351
351
  });
352
352
  Object.defineProperty(exports, "formatBookingTime", {
353
353
  enumerable: true,
354
- get: function () { return chunkZQINTH5K_js.formatTime; }
354
+ get: function () { return chunkI2GTT2DG_js.formatTime; }
355
355
  });
356
356
  Object.defineProperty(exports, "formatDuration", {
357
357
  enumerable: true,
358
- get: function () { return chunkZQINTH5K_js.formatDuration; }
358
+ get: function () { return chunkI2GTT2DG_js.formatDuration; }
359
359
  });
360
360
  Object.defineProperty(exports, "releaseSlotHold", {
361
361
  enumerable: true,
362
- get: function () { return chunkZQINTH5K_js.releaseSlotHold; }
362
+ get: function () { return chunkI2GTT2DG_js.releaseSlotHold; }
363
363
  });
364
364
  Object.defineProperty(exports, "ExperimentConversion", {
365
365
  enumerable: true,
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import './chunk-CU6OGBKK.mjs';
5
5
  export { TestimonialSection } from './chunk-VIGRGMWR.mjs';
6
6
  export { fetchReviewStats, fetchReviews } from './chunk-MU7DTEUF.mjs';
7
7
  export { CalendarView, CheckoutForm, EventCalendar, EventCheckout, EventEmbed, EventModal, EventTile, OfferingCard, OfferingList, ProductEmbed, RegistrationForm, UpcomingEvents, createCheckoutSession, fetchNextEvent, fetchOffering, fetchOfferings, fetchProducts, fetchServices, fetchUpcomingEvents, formatDate, formatDateTime, formatPrice, getOfferingUrl, registerForEvent, useEventModal } from './chunk-RSUNHEBH.mjs';
8
- export { BookingWidget, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, releaseSlotHold } from './chunk-AT2ZF3TL.mjs';
8
+ export { BookingWidget, createBooking, createSlotHold, detectTimezone, fetchAvailability, fetchAvailableDates, fetchBookingTypeDetails, fetchBookingTypes, formatDate as formatBookingDate, formatTime as formatBookingTime, formatDuration, releaseSlotHold } from './chunk-FMZOZQBV.mjs';
9
9
  import './chunk-FO5EUANA.mjs';
10
10
  import './chunk-IM57FXP7.mjs';
11
11
  export { ExperimentConversion, SignalExperiment, useExperimentVariant } from './chunk-LBII2GAF.mjs';
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkHANRPNKG_js = require('../chunk-HANRPNKG.js');
4
4
  var chunkGCPPXUAI_js = require('../chunk-GCPPXUAI.js');
5
- var chunkPKUTYMN7_js = require('../chunk-PKUTYMN7.js');
5
+ var chunkJ25JPU77_js = require('../chunk-J25JPU77.js');
6
6
  require('../chunk-VU4GL5ZG.js');
7
7
  require('../chunk-ZSMWDLMK.js');
8
8
  var jsxRuntime = require('react/jsx-runtime');
@@ -40,7 +40,7 @@ async function SiteKitLayout({
40
40
  /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "preconnect", href: apiOrigin, crossOrigin: "anonymous" }),
41
41
  /* @__PURE__ */ jsxRuntime.jsx("link", { rel: "dns-prefetch", href: apiOrigin }),
42
42
  favicon && /* @__PURE__ */ jsxRuntime.jsx(chunkGCPPXUAI_js.ManagedFavicon, { apiKey: resolvedApiKey, apiUrl: resolvedApiUrl }),
43
- managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunkPKUTYMN7_js.ManagedScripts, { position: "head" }),
43
+ managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunkJ25JPU77_js.ManagedScripts, { position: "head" }),
44
44
  /* @__PURE__ */ jsxRuntime.jsxs(
45
45
  chunkHANRPNKG_js.SiteKitClientProviders,
46
46
  {
@@ -58,7 +58,7 @@ async function SiteKitLayout({
58
58
  ]
59
59
  }
60
60
  ),
61
- managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunkPKUTYMN7_js.ManagedScripts, { position: "body-end" })
61
+ managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunkJ25JPU77_js.ManagedScripts, { position: "body-end" })
62
62
  ] });
63
63
  }
64
64
 
@@ -1,6 +1,6 @@
1
1
  import { SiteKitClientProviders } from '../chunk-5QLM6LZ2.mjs';
2
2
  import { ManagedFavicon } from '../chunk-CU6OGBKK.mjs';
3
- import { ManagedScripts } from '../chunk-L7XPPFSS.mjs';
3
+ import { ManagedScripts } from '../chunk-QDKQZ5XH.mjs';
4
4
  import '../chunk-TUFP3FGI.mjs';
5
5
  import '../chunk-4XPGGLVP.mjs';
6
6
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { G as GenerateLLMSTxtOptions, a as LLMSTxtContent, S as SpeakableSchemaProps, b as SpeakableConfig, A as AEOBlockProps, c as AEOSummaryProps, d as AEODefinitionProps, e as AEOClaimProps, L as LLMsDataResponse, f as LLMBusinessInfo, g as LLMService, h as LLMFAQItem, i as LLMPageSummary } from '../types-J7Z_FqmV.mjs';
2
- export { m as AEOCitedContentProps, k as AEOEntityProps, l as AEOProvenanceListProps, C as ContentProvenance, j as LLMContactInfo, n as LLMPortfolioItem } from '../types-J7Z_FqmV.mjs';
1
+ import { G as GenerateLLMSTxtOptions, a as LLMSTxtContent, S as SpeakableSchemaProps, b as SpeakableConfig, A as AEOBlockProps, c as AEOSummaryProps, d as AEODefinitionProps, e as AEOClaimProps, L as LLMsDataResponse, f as LLMBusinessInfo, g as LLMService, h as LLMFAQItem, i as LLMPageSummary } from '../types-DhCAWUmd.mjs';
2
+ export { m as AEOCitedContentProps, k as AEOEntityProps, l as AEOProvenanceListProps, C as ContentProvenance, j as LLMContactInfo, n as LLMPortfolioItem } from '../types-DhCAWUmd.mjs';
3
3
  import * as React from 'react';
4
4
  export { LLMS_DISCLAIMER_MAX_LENGTH, LLMS_PUBLIC_SUMMARY_MAX_LENGTH, LLM_GEO_CONTRACT_VERSION, LLMsPayloadMeta, MANAGED_LLM_SCHEMA_KNOWN_KEYS, pickManagedLlmSchemaForJsonLd, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary, sanitizePrimaryLanguageTag } from './contract.mjs';
5
5
 
@@ -57,12 +57,22 @@ interface LLMsTxtHandlerOptions extends GenerateLLMSTxtOptions {
57
57
  *
58
58
  * Zero-config by default - uses SONOR_API_KEY from environment.
59
59
  *
60
+ * The returned handler never reads the incoming Request: any access to
61
+ * `request.headers` (etc.) opts the whole route into dynamic rendering, which
62
+ * breaks static prerendering of /llms.txt during `next build` and logs
63
+ * "Dynamic server usage" errors on every consumer site. Conditional-request
64
+ * (ETag/304) handling is left to the Next static layer / CDN, which already
65
+ * does it for prerendered responses.
66
+ *
60
67
  * @example
61
68
  * ```ts
62
69
  * // app/llms.txt/route.ts (zero-config)
63
70
  * import { createLLMsTxtHandler } from '@sonordev/site-kit/llms'
64
71
  *
65
72
  * export const GET = createLLMsTxtHandler()
73
+ * // Next 15+: GET route handlers are dynamic by default; opt into
74
+ * // prerendering so the file is served statically from the CDN:
75
+ * export const revalidate = 3600
66
76
  * ```
67
77
  *
68
78
  * @example
@@ -74,21 +84,25 @@ interface LLMsTxtHandlerOptions extends GenerateLLMSTxtOptions {
74
84
  * })
75
85
  * ```
76
86
  */
77
- declare function createLLMsTxtHandler(options?: LLMsTxtHandlerOptions): (request: Request) => Promise<Response>;
87
+ declare function createLLMsTxtHandler(options?: LLMsTxtHandlerOptions): (request?: Request) => Promise<Response>;
78
88
  /**
79
89
  * Create a route handler for /llms-full.txt
80
90
  *
81
91
  * Zero-config by default - uses SONOR_API_KEY from environment.
82
92
  *
93
+ * Like createLLMsTxtHandler, the returned handler never reads the incoming
94
+ * Request so the route stays statically prerenderable.
95
+ *
83
96
  * @example
84
97
  * ```ts
85
98
  * // app/llms-full.txt/route.ts (zero-config)
86
99
  * import { createLLMsFullTxtHandler } from '@sonordev/site-kit/llms'
87
100
  *
88
101
  * export const GET = createLLMsFullTxtHandler()
102
+ * export const revalidate = 3600
89
103
  * ```
90
104
  */
91
- declare function createLLMsFullTxtHandler(options?: LLMsTxtHandlerOptions): (request: Request) => Promise<Response>;
105
+ declare function createLLMsFullTxtHandler(options?: LLMsTxtHandlerOptions): (request?: Request) => Promise<Response>;
92
106
 
93
107
  /**
94
108
  * Opt-in HTTP headers linking HTML documents to /llms.txt for crawler discovery.