@sonordev/site-kit 7.3.0 → 8.0.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 (239) hide show
  1. package/AGENTS.md +40 -12
  2. package/CHANGELOG.md +73 -0
  3. package/README.md +44 -18
  4. package/agent-manifest.json +111 -56
  5. package/dist/AnalyticsProvider-LYFDQRRJ.js +13 -0
  6. package/dist/{ArticleViewTracker-GFOAXFV7.js → ArticleViewTracker-HG7IIRJY.js} +6 -5
  7. package/dist/{BlocksPopup-AHDU34TL.js → BlocksPopup-GFX3GZIK.js} +6 -5
  8. package/dist/{ChatWidget-FHBAHFZX.js → ChatWidget-DVS7MLBN.js} +8 -5
  9. package/dist/{FileField-J5W5MIAZ.js → FileField-DVN7NUBI.js} +5 -5
  10. package/dist/{FormSpotlight-PE5YZBFZ.js → FormSpotlight-W4SXKKO6.js} +3 -3
  11. package/dist/{FormStage-OOPQC27J.js → FormStage-JTEE5MZD.js} +3 -3
  12. package/dist/ManagedForm-ZAUHIHGP.js +19 -0
  13. package/dist/{ManagedNewsletterForm-TC5542ZG.js → ManagedNewsletterForm-DQIB5Z4Y.js} +9 -6
  14. package/dist/{SignalCore-2YP5FCAS.js → SignalCore-W5PYYMGX.js} +7 -7
  15. package/dist/SiteChat-MY2GATWC.js +6 -0
  16. package/dist/SiteDesignReporter-ICZWEGCY.js +12 -0
  17. package/dist/SitePopups-TGULLAER.js +13 -0
  18. package/dist/SitemapSync-AN2OBJE6.js +9 -0
  19. package/dist/_client/booking-widget.js +6 -5
  20. package/dist/_client/testimonial-section.d.ts +1 -1
  21. package/dist/_client/testimonial-section.js +4 -2
  22. package/dist/affiliates/index.js +6 -6
  23. package/dist/analytics/index.js +73 -7
  24. package/dist/articles/index.js +2 -2
  25. package/dist/articles/server-ui.js +3 -3
  26. package/dist/articles/server.js +2 -2
  27. package/dist/brand.css +1 -1
  28. package/dist/chat/index.d.ts +1 -1
  29. package/dist/chat/index.js +39 -8
  30. package/dist/chunk-3G7YABRA.js +25 -0
  31. package/dist/{chunk-CGWUXUYZ.js → chunk-3RDJKIYO.js} +2 -2
  32. package/dist/{chunk-J4FSB4OG.js → chunk-3YKQLC7J.js} +5 -2
  33. package/dist/{chunk-BEBR4OJD.js → chunk-56VDS2RP.js} +2 -2
  34. package/dist/chunk-5ROTTMBL.js +19 -0
  35. package/dist/{chunk-56KNHB4U.js → chunk-5S2XDG5O.js} +1 -1
  36. package/dist/chunk-5TM3WPCI.js +7 -0
  37. package/dist/{chunk-BR4ZKUHH.js → chunk-6CJGZFOU.js} +18 -2
  38. package/dist/{chunk-RYVDGXC2.js → chunk-6KU7STM3.js} +3 -1
  39. package/dist/{chunk-XLSQTTUE.js → chunk-6QFINXLH.js} +3 -3
  40. package/dist/{chunk-CYUFBKJQ.js → chunk-6ZXJ3SXR.js} +1 -1
  41. package/dist/{chunk-NI2XNEMR.js → chunk-7YEEOIWI.js} +1 -1
  42. package/dist/{chunk-DNPNYWVL.js → chunk-BQ2CXKTQ.js} +5 -20
  43. package/dist/{chunk-X6F6SO4S.js → chunk-C7TLGL3R.js} +21 -1
  44. package/dist/{chunk-43OCZ3JA.js → chunk-CAH4Y4PY.js} +4 -2
  45. package/dist/chunk-CAT235HY.js +13 -0
  46. package/dist/{chunk-PXKIGZ2F.js → chunk-EATJPSTS.js} +1 -1
  47. package/dist/{chunk-O5RGXTWU.js → chunk-GNSXOTIK.js} +6 -4
  48. package/dist/{chunk-UPRSH6Q4.js → chunk-ICAVVF6D.js} +3 -3
  49. package/dist/{chunk-2ECWEUHP.js → chunk-IJQ767JS.js} +3 -5
  50. package/dist/{chunk-MKMD2HJW.js → chunk-J65N34YM.js} +3 -3
  51. package/dist/{chunk-6U3VLV2C.js → chunk-JIH32RH2.js} +4 -4
  52. package/dist/{chunk-T4DLETKR.js → chunk-K22OLAPC.js} +2 -2
  53. package/dist/{chunk-I2YX3HVD.js → chunk-KRBBH64S.js} +3 -3
  54. package/dist/{chunk-VF4F5WXZ.js → chunk-LBIQ5LTC.js} +1 -1
  55. package/dist/{chunk-WGIDC6QP.js → chunk-LKH44GI3.js} +5 -5
  56. package/dist/{chunk-ZTLMPUO6.js → chunk-LNSF6BJC.js} +1 -1
  57. package/dist/{chunk-WDQB4OXY.js → chunk-M62U7TJF.js} +1 -1
  58. package/dist/{chunk-EDYHROQ7.js → chunk-NFRJTOTB.js} +3 -3
  59. package/dist/chunk-OD2ULW5Z.js +57 -0
  60. package/dist/{chunk-Y6LP36UW.js → chunk-OE3NXEOF.js} +2 -2
  61. package/dist/{chunk-L7U23XI2.js → chunk-OGK7OL3T.js} +5 -4
  62. package/dist/{chunk-RDPW4D33.js → chunk-PD7K54EQ.js} +2 -2
  63. package/dist/{chunk-MVR4FY5R.js → chunk-PIX7FAMX.js} +2 -2
  64. package/dist/{chunk-2AD3CDRR.js → chunk-ROAOI6GG.js} +10 -10
  65. package/dist/{chunk-YJLS6JBI.js → chunk-S7SSYGUJ.js} +6 -5
  66. package/dist/{chunk-ZKHI4E2B.js → chunk-SBPAXWLF.js} +1 -1
  67. package/dist/{chunk-ZHS2XFLV.js → chunk-TOSZGJEQ.js} +1 -1
  68. package/dist/{chunk-4NTBQNHA.js → chunk-TYAVHRWH.js} +80 -81
  69. package/dist/{chunk-Z65DHMTW.js → chunk-TZ5RTANX.js} +3 -3
  70. package/dist/{chunk-VX5CMNMM.js → chunk-UAYAJPEP.js} +7 -1
  71. package/dist/{chunk-4YTYGG2C.js → chunk-URJN75ZG.js} +29 -16
  72. package/dist/{chunk-EPT6FJUY.js → chunk-UUWUAMUC.js} +13 -16
  73. package/dist/{chunk-PKGN32AU.js → chunk-XPTJRVL2.js} +1 -1
  74. package/dist/{chunk-662ILEZ6.js → chunk-Y35BWW2C.js} +3 -7
  75. package/dist/{chunk-MRQ2U4LZ.js → chunk-ZHNQFNO3.js} +2 -2
  76. package/dist/chunk-ZKADJNR2.js +52 -0
  77. package/dist/{chunk-WGG6GTKW.js → chunk-ZLFGXKLG.js} +1 -1
  78. package/dist/client/index.js +6 -5
  79. package/dist/contracts/entries.d.ts +1 -1
  80. package/dist/contracts/sentences.d.ts +46 -0
  81. package/dist/contracts/site-cache.d.ts +2 -0
  82. package/dist/cta-bar/index.js +1 -1
  83. package/dist/fleet/index.js +6 -5
  84. package/dist/forms/field-autocomplete.d.ts +16 -8
  85. package/dist/forms/index.d.ts +5 -0
  86. package/dist/forms/index.js +17 -17
  87. package/dist/forms/server.js +7 -7
  88. package/dist/forms/static.js +2 -2
  89. package/dist/forms/submitForm.d.ts +5 -0
  90. package/dist/images/index.js +4 -4
  91. package/dist/index.d.ts +3 -7
  92. package/dist/index.js +1 -1
  93. package/dist/layout/SiteKitLayout.d.ts +2 -1
  94. package/dist/layout/client.js +11 -9
  95. package/dist/layout/index.js +14 -12
  96. package/dist/llms/index.js +8 -7
  97. package/dist/maps/index.js +6 -6
  98. package/dist/mcp/sonor.d.ts +47 -3
  99. package/dist/mcp/sonor.js +31 -21
  100. package/dist/proxy/index.d.ts +3 -3
  101. package/dist/proxy/index.js +1 -1
  102. package/dist/reputation/TestimonialSection.d.ts +1 -1
  103. package/dist/reputation/VisualReviewCard.d.ts +6 -0
  104. package/dist/reputation/index.d.ts +2 -1
  105. package/dist/reputation/index.js +5 -2
  106. package/dist/reputation/review-photo.d.ts +2 -0
  107. package/dist/reputation/server.d.ts +3 -2
  108. package/dist/reputation/server.js +4 -1
  109. package/dist/reputation/types.d.ts +22 -0
  110. package/dist/revalidate/index.js +3 -3
  111. package/dist/robots/indexnow.js +2 -2
  112. package/dist/runtime/index.d.ts +32 -0
  113. package/dist/runtime/index.js +7 -0
  114. package/dist/seo/api.d.ts +0 -4
  115. package/dist/seo/client.js +6 -5
  116. package/dist/seo/getManagedMetadata.d.ts +24 -0
  117. package/dist/seo/index.d.ts +2 -3
  118. package/dist/seo/index.js +14 -132
  119. package/dist/seo/indexnow.js +2 -2
  120. package/dist/seo/llms.js +8 -7
  121. package/dist/seo/register-sitemap-cli.js +2 -2
  122. package/dist/seo/server-api.d.ts +0 -6
  123. package/dist/seo/server.d.ts +1 -1
  124. package/dist/seo/server.js +4 -4
  125. package/dist/seo/sitemap.js +5 -4
  126. package/dist/seo/types.d.ts +9 -30
  127. package/dist/server/index.d.ts +8 -1
  128. package/dist/server/index.js +5 -4
  129. package/dist/server/mint-site-token.d.ts +1 -13
  130. package/dist/server/server-fetch.d.ts +19 -0
  131. package/dist/server-api-EGOKC7Q3.js +9 -0
  132. package/dist/shared/build-entries.d.ts +21 -9
  133. package/dist/shared/clientApiConfig.d.ts +56 -0
  134. package/dist/shared/fresh-fetch.d.ts +9 -3
  135. package/dist/shared/identity-reader.d.ts +26 -0
  136. package/dist/shared/identity-storage.d.ts +30 -0
  137. package/dist/shared/identity.d.ts +13 -13
  138. package/dist/shared/import-specifiers.d.ts +26 -0
  139. package/dist/shared/sonorFetch.d.ts +4 -3
  140. package/dist/shared/version.d.ts +1 -1
  141. package/dist/signal/index.js +2 -2
  142. package/dist/sitemap/index.js +5 -4
  143. package/dist/slots/index.js +3 -3
  144. package/dist/sync/index.js +6 -5
  145. package/dist/types.d.ts +0 -1
  146. package/dist/website/cta-bar.js +1 -1
  147. package/dist/website/images.js +4 -4
  148. package/dist/website/index.js +7 -6
  149. package/dist/website/popups.js +10 -7
  150. package/dist/website/slots.js +3 -3
  151. package/dist/{writeLLMsTxt-2NQVDGYI.js → writeLLMsTxt-UZGN6IBU.js} +4 -3
  152. package/docs/MIGRATING-TO-7.md +5 -2
  153. package/docs/MIGRATING-TO-8.md +183 -0
  154. package/docs.json +4 -8
  155. package/package.json +15 -44
  156. package/skills/site-kit/SKILL.md +41 -11
  157. package/src/analytics/README.md +14 -14
  158. package/src/chat/README.md +7 -7
  159. package/src/forms/README.md +61 -6
  160. package/src/mcp/README.md +61 -20
  161. package/src/proxy/README.md +5 -4
  162. package/src/reputation/README.md +25 -0
  163. package/src/revalidate/README.md +2 -2
  164. package/src/runtime/README.md +51 -0
  165. package/src/seo/README.md +24 -8
  166. package/src/sync/README.md +2 -2
  167. package/src/website/README.md +3 -2
  168. package/dist/AnalyticsProvider-DJQA66AG.js +0 -11
  169. package/dist/ManagedForm-JRZAJ7SZ.js +0 -16
  170. package/dist/SiteChat-EGEZJJVV.js +0 -5
  171. package/dist/SiteDesignReporter-YEEWJKWN.js +0 -11
  172. package/dist/SitePopups-LQBIXIFV.js +0 -10
  173. package/dist/SitemapSync-LSZ2EYOF.js +0 -8
  174. package/dist/chunk-24QZEO3Q.js +0 -41
  175. package/dist/chunk-BU66S5B7.js +0 -1
  176. package/dist/chunk-G3NHWMP5.js +0 -233
  177. package/dist/chunk-HODO5BX5.js +0 -28
  178. package/dist/chunk-L3AQCDCY.js +0 -386
  179. package/dist/chunk-P5GB6NEO.js +0 -66
  180. package/dist/chunk-SWKE6FWH.js +0 -47
  181. package/dist/cms/CmsPage.d.ts +0 -17
  182. package/dist/cms/CmsPreview.d.ts +0 -37
  183. package/dist/cms/CmsSection.d.ts +0 -8
  184. package/dist/cms/PortableTextRenderer.d.ts +0 -7
  185. package/dist/cms/index.d.ts +0 -37
  186. package/dist/cms/index.js +0 -5
  187. package/dist/cms/sanity-image.d.ts +0 -47
  188. package/dist/cms/sections/CtaSection.d.ts +0 -3
  189. package/dist/cms/sections/CustomSection.d.ts +0 -7
  190. package/dist/cms/sections/FaqSection.d.ts +0 -3
  191. package/dist/cms/sections/FormSection.d.ts +0 -8
  192. package/dist/cms/sections/GallerySection.d.ts +0 -3
  193. package/dist/cms/sections/HeroSection.d.ts +0 -3
  194. package/dist/cms/sections/RichTextSection.d.ts +0 -3
  195. package/dist/cms/sections/TestimonialsSection.d.ts +0 -3
  196. package/dist/cms/sections/index.d.ts +0 -8
  197. package/dist/cms/server-api.d.ts +0 -49
  198. package/dist/cms/server.d.ts +0 -1
  199. package/dist/cms/server.js +0 -5
  200. package/dist/cms/types.d.ts +0 -104
  201. package/dist/commerce/CalendarView.d.ts +0 -43
  202. package/dist/commerce/CheckoutForm.d.ts +0 -11
  203. package/dist/commerce/EventCalendar.d.ts +0 -26
  204. package/dist/commerce/EventCheckout.d.ts +0 -42
  205. package/dist/commerce/EventEmbed.d.ts +0 -11
  206. package/dist/commerce/EventModal.d.ts +0 -43
  207. package/dist/commerce/EventTile.d.ts +0 -10
  208. package/dist/commerce/EventsAgenda.d.ts +0 -38
  209. package/dist/commerce/EventsWidget.d.ts +0 -84
  210. package/dist/commerce/OfferingCard.d.ts +0 -9
  211. package/dist/commerce/OfferingList.d.ts +0 -9
  212. package/dist/commerce/ProductDetail.d.ts +0 -38
  213. package/dist/commerce/ProductEmbed.d.ts +0 -11
  214. package/dist/commerce/ProductGrid.d.ts +0 -41
  215. package/dist/commerce/ProductPage.d.ts +0 -39
  216. package/dist/commerce/RegistrationForm.d.ts +0 -9
  217. package/dist/commerce/SizeChart.d.ts +0 -8
  218. package/dist/commerce/UpcomingEvents.d.ts +0 -9
  219. package/dist/commerce/api.d.ts +0 -179
  220. package/dist/commerce/events-extras.d.ts +0 -60
  221. package/dist/commerce/index.d.ts +0 -33
  222. package/dist/commerce/index.js +0 -8022
  223. package/dist/commerce/server.d.ts +0 -161
  224. package/dist/commerce/server.js +0 -2
  225. package/dist/commerce/types.d.ts +0 -340
  226. package/dist/commerce/useEventModal.d.ts +0 -20
  227. package/dist/commerce/utils.d.ts +0 -17
  228. package/dist/engage/EngageWidget.d.ts +0 -21
  229. package/dist/engage/index.d.ts +0 -14
  230. package/dist/engage/index.js +0 -45
  231. package/dist/engage/types.d.ts +0 -33
  232. package/dist/seo/ManagedContent.d.ts +0 -14
  233. package/dist/server-api-BVCBLJKL.js +0 -9
  234. package/dist/website/cms/server.d.ts +0 -2
  235. package/dist/website/cms/server.js +0 -5
  236. package/dist/website/cms-server.d.ts +0 -2
  237. package/dist/website/cms.d.ts +0 -2
  238. package/dist/website/cms.js +0 -5
  239. package/src/commerce/README.md +0 -109
@@ -1,161 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - Server-side utilities
3
- *
4
- * Helpers for server-side rendering and dynamic routes.
5
- * Use in Next.js getStaticPaths, getStaticProps, or App Router.
6
- *
7
- * All data fetching goes through the Sonor API.
8
- */
9
- import type { CommerceOffering, OfferingType } from './types';
10
- interface ServerConfig {
11
- apiUrl: string;
12
- apiKey: string;
13
- projectId: string;
14
- }
15
- /**
16
- * Outcome of a server-side fetch.
17
- *
18
- * `ok` is the entire point. A helper that returns an empty array on failure lets
19
- * the calling page state a business fact it does not know: "no upcoming events",
20
- * "no products available" — when the truth is only that the API was unreachable.
21
- * QCR's /public-cruises told customers the business had no cruises during a
22
- * transient failure while three were on sale (2026-08-27).
23
- *
24
- * Branch on `ok` in new code. The legacy helpers returning a bare array or null
25
- * are kept for compatibility, but they cannot express this difference — an empty
26
- * result from them is indistinguishable from an outage.
27
- */
28
- export interface ServerResult<T> {
29
- /** false = the request failed. `ok: true` with empty data means genuinely empty. */
30
- ok: boolean;
31
- data: T;
32
- }
33
- /**
34
- * Get all product slugs for static generation
35
- *
36
- * @example Next.js Pages Router
37
- * export async function getStaticPaths() {
38
- * const paths = await getProductPaths(config)
39
- * return { paths, fallback: 'blocking' }
40
- * }
41
- */
42
- export declare function getProductPaths(config: ServerConfig): Promise<{
43
- params: {
44
- slug: string;
45
- };
46
- }[]>;
47
- /**
48
- * Get all event slugs for static generation
49
- */
50
- export declare function getEventPaths(config: ServerConfig): Promise<{
51
- params: {
52
- slug: string;
53
- };
54
- }[]>;
55
- /**
56
- * Get all offering slugs for static generation (any type)
57
- */
58
- export declare function getOfferingPaths(config: ServerConfig, type?: OfferingType | OfferingType[]): Promise<{
59
- params: {
60
- slug: string;
61
- };
62
- }[]>;
63
- /**
64
- * Fetch a single offering by slug (server-side)
65
- *
66
- * @example Next.js Pages Router
67
- * export async function getStaticProps({ params }) {
68
- * const product = await getOfferingBySlug(config, params.slug)
69
- * if (!product) return { notFound: true }
70
- * return { props: { product }, revalidate: 60 }
71
- * }
72
- */
73
- export declare function getOfferingBySlug(config: ServerConfig, slug: string): Promise<CommerceOffering | null>;
74
- /**
75
- * As getOfferingBySlug, but distinguishes "no such offering" (ok: true, null)
76
- * from "could not reach the API" (ok: false, null). Use this before rendering a
77
- * 404 — a notFound() on a transient failure de-indexes a page that exists.
78
- */
79
- export declare function getOfferingBySlugResult(config: ServerConfig, slug: string): Promise<ServerResult<CommerceOffering | null>>;
80
- /**
81
- * Fetch all offerings of a type (server-side)
82
- */
83
- export declare function getOfferings(config: ServerConfig, options?: {
84
- type?: OfferingType | OfferingType[];
85
- category?: string;
86
- limit?: number;
87
- status?: string;
88
- }): Promise<CommerceOffering[]>;
89
- /**
90
- * As getOfferings, but distinguishes an empty catalogue from a failed request.
91
- * Branch on `ok` before rendering "nothing available" copy.
92
- */
93
- export declare function getOfferingsResult(config: ServerConfig, options?: {
94
- type?: OfferingType | OfferingType[];
95
- category?: string;
96
- limit?: number;
97
- status?: string;
98
- }): Promise<ServerResult<CommerceOffering[]>>;
99
- /**
100
- * Fetch upcoming events (server-side), WITH schedules and category embedded.
101
- *
102
- * Uses POST /api/public/commerce/events — the same endpoint the client fetcher
103
- * uses — because the GET offerings list does NOT embed commerce_schedules,
104
- * which made this helper return events with empty `schedules[]` and forced
105
- * sites to hand-roll their own fetcher for any calendar UI. Falls back to the legacy offerings query if the events endpoint
106
- * is unavailable (older self-hosted API).
107
- */
108
- export declare function getUpcomingEvents(config: ServerConfig, options?: {
109
- limit?: number;
110
- category?: string;
111
- }): Promise<CommerceOffering[]>;
112
- /**
113
- * As getUpcomingEvents, but tells you whether the list is empty because there is
114
- * nothing scheduled or because the API could not be reached.
115
- *
116
- * ALWAYS prefer this when the UI renders copy like "no upcoming events". Doing
117
- * otherwise is what put "No public cruises currently on the schedule" in front
118
- * of QCR's customers while three cruises were on sale — and, because the page
119
- * was statically revalidated, cached that claim for the whole revalidate window.
120
- */
121
- export declare function getUpcomingEventsResult(config: ServerConfig, options?: {
122
- limit?: number;
123
- category?: string;
124
- }): Promise<ServerResult<CommerceOffering[]>>;
125
- /**
126
- * Get next upcoming event (server-side)
127
- */
128
- export declare function getNextEvent(config: ServerConfig, category?: string): Promise<CommerceOffering | null>;
129
- /**
130
- * As getNextEvent, but distinguishes "nothing scheduled" from "fetch failed".
131
- */
132
- export declare function getNextEventResult(config: ServerConfig, category?: string): Promise<ServerResult<CommerceOffering | null>>;
133
- /**
134
- * Generate page metadata for an offering
135
- *
136
- * @example Next.js App Router
137
- * export async function generateMetadata({ params }) {
138
- * const product = await getOfferingBySlug(config, params.slug)
139
- * return generateOfferingMetadata(product, 'https://example.com')
140
- * }
141
- */
142
- export declare function generateOfferingMetadata(offering: CommerceOffering | null, siteUrl: string): {
143
- title: string;
144
- description: string;
145
- openGraph: {
146
- title: string;
147
- description: string;
148
- images: string[];
149
- type: string;
150
- url: string;
151
- };
152
- } | null;
153
- /**
154
- * Create a server config for API calls
155
- *
156
- * @param apiUrl - Sonor API URL (e.g., 'https://api.sonor.io')
157
- * @param apiKey - Project API key
158
- * @param projectId - Project ID
159
- */
160
- export declare function createServerConfig(apiUrl: string, apiKey: string, projectId: string): ServerConfig;
161
- export {};
@@ -1,2 +0,0 @@
1
- export { createServerConfig, generateOfferingMetadata, getEventPaths, getNextEvent, getNextEventResult, getOfferingBySlug, getOfferingBySlugResult, getOfferingPaths, getOfferings, getOfferingsResult, getProductPaths, getUpcomingEvents, getUpcomingEventsResult } from '../chunk-G3NHWMP5.js';
2
- import '../chunk-PKBMQBKP.js';
@@ -1,340 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - Commerce Types
3
- *
4
- * Types for products, services, classes, events, and checkout flows.
5
- */
6
- export type OfferingType = 'product' | 'service' | 'class' | 'event' | 'subscription';
7
- export type OfferingStatus = 'draft' | 'active' | 'archived' | 'sold_out';
8
- export type PriceType = 'fixed' | 'variable' | 'quote' | 'free';
9
- export interface CommerceOffering {
10
- id: string;
11
- project_id: string;
12
- type: OfferingType;
13
- status: OfferingStatus;
14
- name: string;
15
- slug: string;
16
- description?: string;
17
- short_description?: string;
18
- long_description?: string;
19
- featured_image_url?: string;
20
- featured_image_id?: string;
21
- gallery_images?: string[];
22
- /** Gallery image IDs in order, for mapping to metadata like model info */
23
- gallery_image_ids?: string[];
24
- price_type: PriceType;
25
- price?: number;
26
- compare_at_price?: number;
27
- currency: string;
28
- price_is_public: boolean;
29
- billing_period?: 'weekly' | 'monthly' | 'quarterly' | 'yearly';
30
- track_inventory?: boolean;
31
- inventory_count?: number;
32
- allow_backorder?: boolean;
33
- /** Is clothing product - enables size variants and per-size inventory */
34
- is_clothing?: boolean;
35
- /** Size chart measurements for clothing products */
36
- size_chart?: SizeChart;
37
- duration_minutes?: number;
38
- capacity?: number;
39
- location?: string;
40
- is_virtual?: boolean;
41
- virtual_meeting_url?: string;
42
- /** External URL for registration/tickets. When set, site-kit links externally instead of internal checkout. */
43
- external_url?: string;
44
- requires_booking?: boolean;
45
- booking_lead_time_hours?: number;
46
- category?: CommerceCategory;
47
- category_id?: string;
48
- tags?: string[];
49
- seo_title?: string;
50
- seo_description?: string;
51
- features?: string[];
52
- specifications?: Record<string, string>;
53
- metadata?: {
54
- care_instructions?: string;
55
- sizing_notes?: string;
56
- notices?: string[];
57
- /** Model info keyed by gallery image ID */
58
- image_model_info?: Record<string, {
59
- model_name?: string;
60
- height?: string;
61
- weight?: string;
62
- wearing_size?: string;
63
- }>;
64
- [key: string]: any;
65
- };
66
- schedules?: CommerceSchedule[];
67
- next_schedule?: CommerceSchedule;
68
- variants?: CommerceVariant[];
69
- created_at: string;
70
- updated_at?: string;
71
- }
72
- export interface SizeChart {
73
- unit: 'inches' | 'cm';
74
- fit_note?: string;
75
- measurements: string[];
76
- rows: Array<{
77
- size: string;
78
- values: number[];
79
- values_alt?: number[];
80
- }>;
81
- }
82
- export interface CommerceCategory {
83
- id: string;
84
- name: string;
85
- slug: string;
86
- description?: string;
87
- image_url?: string;
88
- parent_id?: string;
89
- }
90
- export interface CommerceVariant {
91
- id: string;
92
- offering_id: string;
93
- name: string;
94
- sku?: string;
95
- price?: number;
96
- inventory_count?: number;
97
- track_inventory?: boolean;
98
- options?: Record<string, string>;
99
- image_url?: string;
100
- is_default?: boolean;
101
- }
102
- export interface CommerceSchedule {
103
- id: string;
104
- offering_id: string;
105
- starts_at: string;
106
- ends_at: string;
107
- timezone: string;
108
- capacity?: number;
109
- spots_remaining?: number;
110
- status: 'scheduled' | 'cancelled' | 'completed';
111
- is_recurring?: boolean;
112
- }
113
- export interface CartItem {
114
- offering: CommerceOffering;
115
- variant?: CommerceVariant;
116
- schedule?: CommerceSchedule;
117
- quantity: number;
118
- unit_price: number;
119
- total_price: number;
120
- }
121
- export interface Cart {
122
- items: CartItem[];
123
- subtotal: number;
124
- tax_amount: number;
125
- discount_amount: number;
126
- total: number;
127
- discount_code?: string;
128
- }
129
- export interface CheckoutCustomer {
130
- name: string;
131
- email: string;
132
- phone?: string;
133
- }
134
- export interface CheckoutResult {
135
- success: boolean;
136
- sale_id?: string;
137
- payment_url?: string;
138
- checkout_url?: string;
139
- confirmation_number?: string;
140
- error?: string;
141
- }
142
- export interface OfferingCardProps {
143
- offering: CommerceOffering;
144
- variant?: 'card' | 'horizontal' | 'minimal' | 'featured';
145
- showImage?: boolean;
146
- showPrice?: boolean;
147
- showDescription?: boolean;
148
- showCta?: boolean;
149
- ctaText?: string;
150
- onCtaClick?: (offering: CommerceOffering) => void;
151
- onSelect?: (offering: CommerceOffering) => void;
152
- className?: string;
153
- imageClassName?: string;
154
- titleClassName?: string;
155
- priceClassName?: string;
156
- descriptionClassName?: string;
157
- ctaClassName?: string;
158
- }
159
- export interface OfferingListProps {
160
- projectId?: string;
161
- offerings?: CommerceOffering[];
162
- type?: OfferingType | OfferingType[];
163
- category?: string;
164
- limit?: number;
165
- status?: OfferingStatus;
166
- layout?: 'grid' | 'list' | 'carousel';
167
- columns?: 2 | 3 | 4;
168
- cardVariant?: 'card' | 'minimal' | 'featured';
169
- showFilters?: boolean;
170
- emptyMessage?: string;
171
- showImage?: boolean;
172
- showPrice?: boolean;
173
- showDescription?: boolean;
174
- showCta?: boolean;
175
- ctaText?: string;
176
- onCtaClick?: (offering: CommerceOffering) => void;
177
- onSelect?: (offering: CommerceOffering) => void;
178
- className?: string;
179
- cardClassName?: string;
180
- filterClassName?: string;
181
- renderCard?: (offering: CommerceOffering) => React.ReactNode;
182
- renderEmpty?: () => React.ReactNode;
183
- }
184
- export interface OfferingDetailProps {
185
- projectId: string;
186
- slug: string;
187
- showBooking?: boolean;
188
- showCheckout?: boolean;
189
- onAddToCart?: (offering: CommerceOffering, variant?: CommerceVariant) => void;
190
- className?: string;
191
- }
192
- export interface EventTileProps {
193
- event: CommerceOffering;
194
- schedule?: CommerceSchedule;
195
- variant?: 'standard' | 'compact' | 'featured';
196
- showDate?: boolean;
197
- showTime?: boolean;
198
- showLocation?: boolean;
199
- showCapacity?: boolean;
200
- showPrice?: boolean;
201
- showCta?: boolean;
202
- ctaText?: string;
203
- showRegistration?: boolean;
204
- compact?: boolean;
205
- onRegister?: (event: CommerceOffering, schedule: CommerceSchedule) => void;
206
- onCtaClick?: (event: CommerceOffering) => void;
207
- className?: string;
208
- dateClassName?: string;
209
- titleClassName?: string;
210
- ctaClassName?: string;
211
- }
212
- export interface UpcomingEventsProps {
213
- projectId?: string;
214
- events?: CommerceOffering[];
215
- limit?: number;
216
- category?: string;
217
- variant?: 'standard' | 'compact';
218
- showPast?: boolean;
219
- layout?: 'list' | 'grid' | 'calendar' | 'vertical' | 'horizontal';
220
- showViewAll?: boolean;
221
- viewAllUrl?: string;
222
- viewAllText?: string;
223
- emptyMessage?: string;
224
- title?: string;
225
- onSelect?: (event: CommerceOffering, schedule: CommerceSchedule) => void;
226
- onRegister?: (event: CommerceOffering) => void;
227
- onCtaClick?: (event: CommerceOffering) => void;
228
- className?: string;
229
- titleClassName?: string;
230
- eventClassName?: string;
231
- }
232
- export interface ProductEmbedProps {
233
- projectId?: string;
234
- product?: CommerceOffering;
235
- /** Specific product slug, or 'latest' for most recent */
236
- slug?: string | 'latest';
237
- mode?: 'specific' | 'latest' | 'featured';
238
- /** Category to filter by (used with 'latest') */
239
- category?: string;
240
- variant?: 'card' | 'horizontal' | 'minimal' | 'featured';
241
- showImage?: boolean;
242
- showPrice?: boolean;
243
- showDescription?: boolean;
244
- showBuyButton?: boolean;
245
- showCta?: boolean;
246
- ctaText?: string;
247
- onCtaClick?: (offering: CommerceOffering) => void;
248
- className?: string;
249
- }
250
- export interface EventEmbedProps {
251
- projectId?: string;
252
- event?: CommerceOffering;
253
- /** Specific event slug, or 'next' for upcoming */
254
- slug?: string | 'next';
255
- mode?: 'specific' | 'next';
256
- /** Category to filter by */
257
- category?: string;
258
- variant?: 'standard' | 'compact' | 'featured';
259
- showDate?: boolean;
260
- showTime?: boolean;
261
- showLocation?: boolean;
262
- showCapacity?: boolean;
263
- showPrice?: boolean;
264
- showCta?: boolean;
265
- ctaText?: string;
266
- showRegistration?: boolean;
267
- compact?: boolean;
268
- onRegister?: (event: CommerceOffering) => void;
269
- onCtaClick?: (event: CommerceOffering) => void;
270
- className?: string;
271
- }
272
- export interface CheckoutFormProps {
273
- projectId?: string;
274
- offering: CommerceOffering;
275
- variant?: CommerceVariant;
276
- schedule?: CommerceSchedule;
277
- scheduleId?: string;
278
- variantId?: string;
279
- quantity?: number;
280
- mode?: 'checkout' | 'register';
281
- showQuantity?: boolean;
282
- submitText?: string;
283
- onSuccess?: (result: CheckoutResult) => void;
284
- onError?: (error: string) => void;
285
- className?: string;
286
- formClassName?: string;
287
- inputClassName?: string;
288
- buttonClassName?: string;
289
- }
290
- export interface AdditionalFieldOption {
291
- value: string;
292
- label: string;
293
- }
294
- export interface AdditionalField {
295
- name: string;
296
- label: string;
297
- type?: 'text' | 'email' | 'tel' | 'select' | 'textarea';
298
- required?: boolean;
299
- options?: AdditionalFieldOption[];
300
- placeholder?: string;
301
- }
302
- export interface RegistrationFormProps {
303
- projectId?: string;
304
- event: CommerceOffering;
305
- schedule?: CommerceSchedule;
306
- scheduleId?: string;
307
- title?: string;
308
- submitText?: string;
309
- successMessage?: string;
310
- collectPhone?: boolean;
311
- additionalFields?: AdditionalField[];
312
- onSuccess?: (result: CheckoutResult) => void;
313
- onError?: (error: string) => void;
314
- className?: string;
315
- formClassName?: string;
316
- inputClassName?: string;
317
- buttonClassName?: string;
318
- }
319
- export interface CommerceApiConfig {
320
- projectId: string;
321
- apiUrl?: string;
322
- getAuthToken?: () => Promise<string> | string;
323
- }
324
- export interface FetchOfferingsOptions {
325
- type?: OfferingType | OfferingType[];
326
- category?: string;
327
- status?: OfferingStatus;
328
- limit?: number;
329
- offset?: number;
330
- orderBy?: 'name' | 'price' | 'created_at' | 'sort_order';
331
- order?: 'asc' | 'desc';
332
- includeSchedules?: boolean;
333
- }
334
- export interface FetchEventsOptions {
335
- upcoming?: boolean;
336
- past?: boolean;
337
- limit?: number;
338
- offset?: number;
339
- category?: string;
340
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - useEventModal hook
3
- *
4
- * Hook for managing event modal state.
5
- */
6
- import type { CommerceOffering, CommerceSchedule } from './types';
7
- export interface UseEventModalReturn {
8
- /** Currently selected event */
9
- event: CommerceOffering | null;
10
- /** Currently selected schedule */
11
- schedule: CommerceSchedule | null;
12
- /** Whether modal is open */
13
- isOpen: boolean;
14
- /** Open modal with event */
15
- openModal: (event: CommerceOffering, schedule?: CommerceSchedule) => void;
16
- /** Close modal */
17
- closeModal: () => void;
18
- }
19
- export declare function useEventModal(): UseEventModalReturn;
20
- export default useEventModal;
@@ -1,17 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - Utility functions
3
- */
4
- export declare function formatPrice(amount: number, currency?: string): string;
5
- export declare function formatDate(dateString: string): string;
6
- export declare function formatDateTime(dateString: string): string;
7
- export declare function formatTime(dateString: string): string;
8
- export declare function formatDateRange(startDate: string, endDate?: string): string;
9
- export declare function getRelativeTimeUntil(dateString: string): string;
10
- export declare function getSpotsRemaining(capacity: number | null | undefined, registrations?: number): number | null;
11
- export declare function isEventSoldOut(capacity: number | null | undefined, registrations?: number): boolean;
12
- export declare function getOfferingUrl(slug: string, type: string, basePaths?: {
13
- product?: string;
14
- service?: string;
15
- event?: string;
16
- class?: string;
17
- }): string;
@@ -1,21 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/engage - EngageWidget: deprecated, kept through 7.x.
3
- *
4
- * Engage was retired in Sonor. SiteKitLayout mounts website chat and popups
5
- * for you (its `chat` and `popups` props). To place them yourself, use
6
- * `SiteChat` from `@sonordev/site-kit/chat` and `SitePopups` from
7
- * `@sonordev/site-kit/website/popups`. This draws exactly those two, so a
8
- * site that still renders <EngageWidget /> keeps working. Removed in 8.0.
9
- */
10
- import React from 'react';
11
- import { type SiteChatProps } from '../chat/SiteChat';
12
- /** @deprecated Use SiteChat and SitePopups, or SiteKitLayout's `chat` and `popups`. */
13
- export interface EngageWidgetProps extends SiteChatProps {
14
- /** Show the chat launcher. Default true. */
15
- chatEnabled?: boolean;
16
- /** Show the site's popups, banners and toasts. Default true. */
17
- popupsEnabled?: boolean;
18
- debug?: boolean;
19
- }
20
- /** @deprecated Use SiteChat and SitePopups, or SiteKitLayout's `chat` and `popups`. */
21
- export declare function EngageWidget({ chatEnabled, popupsEnabled, debug, ...props }: EngageWidgetProps): React.JSX.Element;
@@ -1,14 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/engage — deprecated, kept through 7.x so old imports
3
- * keep building. Removed in 8.0.
4
- *
5
- * Engage was retired in Sonor. Website chat is `@sonordev/site-kit/chat`
6
- * (Sonor → Messages) and popups are `@sonordev/site-kit/website/popups`
7
- * (Sonor → Website). Nothing lives here: this re-exports them under the old
8
- * names, and EngageWidget draws SiteChat and SitePopups.
9
- */
10
- export { EngageWidget, type EngageWidgetProps } from './EngageWidget';
11
- export { ChatWidget } from '../chat/ChatWidget';
12
- export { SONOR_PUBLIC_ECHO_DEFAULTS, getEchoWidgetProps } from '../chat/echo-config';
13
- export type { EchoPublicConfig } from '../chat/echo-config';
14
- export * from './types';
@@ -1,45 +0,0 @@
1
- 'use client';
2
- export { SONOR_PUBLIC_ECHO_DEFAULTS, getEchoWidgetProps } from '../chunk-HODO5BX5.js';
3
- export { ChatWidget } from '../chunk-O5RGXTWU.js';
4
- import { SiteChat } from '../chunk-RDPW4D33.js';
5
- import '../chunk-6T6CQVNL.js';
6
- import '../chunk-JE4A5S4F.js';
7
- import { SitePopups } from '../chunk-YJLS6JBI.js';
8
- import '../chunk-27FISYK4.js';
9
- import '../chunk-EPT6FJUY.js';
10
- import '../chunk-Q6E4OPGG.js';
11
- import '../chunk-C2FZBUSS.js';
12
- import '../chunk-5SQK3D53.js';
13
- import '../chunk-HW7B43E5.js';
14
- import '../chunk-NJCTQH2P.js';
15
- import '../chunk-S22FSH7C.js';
16
- import '../chunk-24QZEO3Q.js';
17
- import '../chunk-L2V5PUFN.js';
18
- import '../chunk-GJWI74ZZ.js';
19
- import '../chunk-43OCZ3JA.js';
20
- import '../chunk-EKBEOXTH.js';
21
- import '../chunk-BEBR4OJD.js';
22
- import '../chunk-WGG6GTKW.js';
23
- import '../chunk-56KNHB4U.js';
24
- import '../chunk-PKBMQBKP.js';
25
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
26
-
27
- function EngageWidget({ chatEnabled = true, popupsEnabled = true, debug, ...props }) {
28
- const { apiUrl, apiKey, zIndex, allowInFrame, allowLocalhost } = props;
29
- return /* @__PURE__ */ jsxs(Fragment, { children: [
30
- popupsEnabled && /* @__PURE__ */ jsx(
31
- SitePopups,
32
- {
33
- apiUrl,
34
- apiKey,
35
- zIndex,
36
- allowInFrame,
37
- allowLocalhost,
38
- debug
39
- }
40
- ),
41
- chatEnabled && /* @__PURE__ */ jsx(SiteChat, { ...props })
42
- ] });
43
- }
44
-
45
- export { EngageWidget };
@@ -1,33 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/engage types: deprecated, kept through 7.x so old
3
- * imports compile. Engage was retired in Sonor. Chat types live in
4
- * `@sonordev/site-kit/chat`, popup types in `@sonordev/site-kit/website/popups`.
5
- * Nothing here has runtime code. Removed in 8.0.
6
- */
7
- import type { ChatLauncherPlacement } from '../chat/types';
8
- export type { ChatAvailability, ChatConfig, ChatConversation, ChatLauncherPlacement, ChatLauncherPosition, ChatMessage, UiAction, UiActionType, } from '../chat/types';
9
- import type { SitePopup, SitePopupConfig, SitePopupTargeting, SitePopupTrigger, SitePopupType } from '../website/popup-types';
10
- /** @deprecated Use `SitePopup` from `@sonordev/site-kit/website/popups`. */
11
- export type EngageElement = SitePopup;
12
- /** @deprecated Use `SitePopupType` from `@sonordev/site-kit/website/popups`. */
13
- export type WidgetType = SitePopupType;
14
- /** @deprecated Use `SitePopupConfig` from `@sonordev/site-kit/website/popups`. */
15
- export type WidgetConfig = SitePopupConfig;
16
- /** @deprecated Use `SitePopupTargeting` from `@sonordev/site-kit/website/popups`. */
17
- export type TargetingRules = SitePopupTargeting;
18
- /** @deprecated Use `SitePopupTrigger` from `@sonordev/site-kit/website/popups`. */
19
- export type TriggerConfig = SitePopupTrigger;
20
- /** @deprecated Use SiteKitLayout's `chat` and `popups` props. */
21
- export interface EngageConfig extends ChatLauncherPlacement {
22
- projectId: string;
23
- chatEnabled?: boolean;
24
- debug?: boolean;
25
- }
26
- /** @deprecated Unused since Engage was retired. */
27
- export interface EngageAnalytics {
28
- element_id: string;
29
- event_type: 'impression' | 'click' | 'close' | 'submit' | 'dismiss';
30
- session_id: string;
31
- metadata?: Record<string, unknown>;
32
- created_at: string;
33
- }
@@ -1,14 +0,0 @@
1
- import * as React from 'react';
2
- import type { ManagedContentProps, ManagedContentBlock } from './types';
3
- /**
4
- * Get content block data without rendering
5
- *
6
- * Useful when you need to access the raw data. `site` is the sub-site host
7
- * override for multi-site projects; it resolves from NEXT_PUBLIC_SITE_URL when
8
- * omitted.
9
- * @deprecated Since 7.1. Content blocks are retired in favour of managed copy: use `<ManagedRichText>` from `@sonordev/site-kit/website/slots`. Removed in 8.0.
10
- */
11
- export declare function getManagedContentData(path: string, section: string, site?: string): Promise<ManagedContentBlock | null>;
12
- /** @deprecated Since 7.1. Content blocks are retired in favour of managed copy: use `<ManagedRichText>` from `@sonordev/site-kit/website/slots`. Removed in 8.0. */
13
- export declare function ManagedContent(props: ManagedContentProps): React.ReactElement;
14
- export default ManagedContent;
@@ -1,9 +0,0 @@
1
- export { ensureMetadata, getABTest, getContentBlock, getEntities, getEntityEnhancedSchema, getFAQData, getInternalLinks, getManagedScripts, getPrimaryEntity, getRedirectData, getRobotsData, getSEOPageData, getSchemaMarkups, getSitemapEntries, getVisibilityScore, getVisibilitySummary, recordABImpression, registerSitemap } from './chunk-662ILEZ6.js';
2
- import './chunk-RYVDGXC2.js';
3
- import './chunk-MJP63SSS.js';
4
- import './chunk-X6F6SO4S.js';
5
- import './chunk-MH2DSGC6.js';
6
- import './chunk-DIKNRN34.js';
7
- import './chunk-FESKKJAS.js';
8
- import './chunk-A4CC4ZG3.js';
9
- import './chunk-PKBMQBKP.js';