@sonordev/site-kit 7.4.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 (227) hide show
  1. package/AGENTS.md +40 -12
  2. package/CHANGELOG.md +67 -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-3DH53RSB.js → ArticleViewTracker-HG7IIRJY.js} +6 -5
  7. package/dist/{BlocksPopup-FGWYVHCH.js → BlocksPopup-GFX3GZIK.js} +6 -5
  8. package/dist/{ChatWidget-CDQZCLVH.js → ChatWidget-DVS7MLBN.js} +8 -5
  9. package/dist/{FileField-IPJ7L2W6.js → FileField-DVN7NUBI.js} +5 -5
  10. package/dist/{FormSpotlight-CQI2DBWI.js → FormSpotlight-W4SXKKO6.js} +3 -3
  11. package/dist/{FormStage-4WHD6ED4.js → FormStage-JTEE5MZD.js} +3 -3
  12. package/dist/ManagedForm-ZAUHIHGP.js +19 -0
  13. package/dist/{ManagedNewsletterForm-3D2BK3KQ.js → ManagedNewsletterForm-DQIB5Z4Y.js} +9 -6
  14. package/dist/{SignalCore-HEQYITTM.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.js +3 -2
  21. package/dist/affiliates/index.js +6 -6
  22. package/dist/analytics/index.js +73 -7
  23. package/dist/articles/index.js +2 -2
  24. package/dist/articles/server-ui.js +3 -3
  25. package/dist/articles/server.js +2 -2
  26. package/dist/brand.css +1 -1
  27. package/dist/chat/index.d.ts +1 -1
  28. package/dist/chat/index.js +39 -8
  29. package/dist/chunk-3G7YABRA.js +25 -0
  30. package/dist/{chunk-CGWUXUYZ.js → chunk-3RDJKIYO.js} +2 -2
  31. package/dist/{chunk-J4FSB4OG.js → chunk-3YKQLC7J.js} +5 -2
  32. package/dist/{chunk-3E3PPSNR.js → chunk-56VDS2RP.js} +2 -2
  33. package/dist/chunk-5ROTTMBL.js +19 -0
  34. package/dist/{chunk-KHQ5GD6T.js → chunk-5S2XDG5O.js} +1 -1
  35. package/dist/chunk-5TM3WPCI.js +7 -0
  36. package/dist/{chunk-7HPZSWS4.js → chunk-6CJGZFOU.js} +1 -1
  37. package/dist/{chunk-RYVDGXC2.js → chunk-6KU7STM3.js} +3 -1
  38. package/dist/{chunk-FUQTV5O6.js → chunk-6QFINXLH.js} +3 -3
  39. package/dist/{chunk-AH4AXO4P.js → chunk-6ZXJ3SXR.js} +1 -1
  40. package/dist/{chunk-XA2BNW5M.js → chunk-7YEEOIWI.js} +1 -1
  41. package/dist/{chunk-IE5SSOCN.js → chunk-BQ2CXKTQ.js} +3 -11
  42. package/dist/{chunk-X6F6SO4S.js → chunk-C7TLGL3R.js} +21 -1
  43. package/dist/{chunk-43OCZ3JA.js → chunk-CAH4Y4PY.js} +4 -2
  44. package/dist/{chunk-PXKIGZ2F.js → chunk-EATJPSTS.js} +1 -1
  45. package/dist/{chunk-OOD6GMT4.js → chunk-GNSXOTIK.js} +6 -4
  46. package/dist/{chunk-EHR4NIMX.js → chunk-ICAVVF6D.js} +3 -3
  47. package/dist/{chunk-MHGAZ3LL.js → chunk-IJQ767JS.js} +3 -5
  48. package/dist/{chunk-CKW4HFJG.js → chunk-J65N34YM.js} +3 -3
  49. package/dist/{chunk-4BHRA7TI.js → chunk-JIH32RH2.js} +3 -3
  50. package/dist/{chunk-D2RGEWHS.js → chunk-K22OLAPC.js} +2 -2
  51. package/dist/{chunk-CG4ETW5Y.js → chunk-KRBBH64S.js} +3 -3
  52. package/dist/{chunk-JRCNUUNG.js → chunk-LBIQ5LTC.js} +1 -1
  53. package/dist/{chunk-MDP7EB4J.js → chunk-LKH44GI3.js} +5 -5
  54. package/dist/{chunk-ZTLMPUO6.js → chunk-LNSF6BJC.js} +1 -1
  55. package/dist/{chunk-5O62CER4.js → chunk-M62U7TJF.js} +1 -1
  56. package/dist/{chunk-EDYHROQ7.js → chunk-NFRJTOTB.js} +3 -3
  57. package/dist/{chunk-4DJMJ4V5.js → chunk-OE3NXEOF.js} +1 -1
  58. package/dist/{chunk-AV4QAK5F.js → chunk-OGK7OL3T.js} +5 -4
  59. package/dist/{chunk-YCFW2OQO.js → chunk-PD7K54EQ.js} +2 -2
  60. package/dist/{chunk-PF64OEXC.js → chunk-PIX7FAMX.js} +2 -2
  61. package/dist/{chunk-XEMHGJEG.js → chunk-ROAOI6GG.js} +10 -10
  62. package/dist/{chunk-6LLTLLEJ.js → chunk-S7SSYGUJ.js} +6 -5
  63. package/dist/{chunk-ATE6IFVK.js → chunk-SBPAXWLF.js} +1 -1
  64. package/dist/{chunk-DA5XC7Y6.js → chunk-TOSZGJEQ.js} +1 -1
  65. package/dist/{chunk-4NTBQNHA.js → chunk-TYAVHRWH.js} +80 -81
  66. package/dist/{chunk-ZTLU3BSW.js → chunk-TZ5RTANX.js} +2 -2
  67. package/dist/{chunk-4YTYGG2C.js → chunk-URJN75ZG.js} +29 -16
  68. package/dist/{chunk-CSN45MHO.js → chunk-UUWUAMUC.js} +13 -16
  69. package/dist/{chunk-PKGN32AU.js → chunk-XPTJRVL2.js} +1 -1
  70. package/dist/{chunk-662ILEZ6.js → chunk-Y35BWW2C.js} +3 -7
  71. package/dist/{chunk-PQDJNIHR.js → chunk-ZHNQFNO3.js} +2 -2
  72. package/dist/chunk-ZKADJNR2.js +52 -0
  73. package/dist/{chunk-GK7TV7EK.js → chunk-ZLFGXKLG.js} +1 -1
  74. package/dist/client/index.js +6 -5
  75. package/dist/contracts/entries.d.ts +1 -1
  76. package/dist/contracts/sentences.d.ts +46 -0
  77. package/dist/contracts/site-cache.d.ts +2 -0
  78. package/dist/cta-bar/index.js +1 -1
  79. package/dist/fleet/index.js +6 -5
  80. package/dist/forms/field-autocomplete.d.ts +16 -8
  81. package/dist/forms/index.d.ts +5 -0
  82. package/dist/forms/index.js +17 -17
  83. package/dist/forms/server.js +7 -7
  84. package/dist/forms/static.js +2 -2
  85. package/dist/forms/submitForm.d.ts +5 -0
  86. package/dist/images/index.js +4 -4
  87. package/dist/index.d.ts +3 -7
  88. package/dist/index.js +1 -1
  89. package/dist/layout/SiteKitLayout.d.ts +2 -1
  90. package/dist/layout/client.js +11 -9
  91. package/dist/layout/index.js +13 -11
  92. package/dist/llms/index.js +7 -6
  93. package/dist/maps/index.js +6 -6
  94. package/dist/mcp/sonor.d.ts +47 -3
  95. package/dist/mcp/sonor.js +30 -20
  96. package/dist/proxy/index.d.ts +3 -3
  97. package/dist/proxy/index.js +1 -1
  98. package/dist/reputation/index.js +3 -2
  99. package/dist/reputation/server.js +2 -1
  100. package/dist/revalidate/index.js +3 -3
  101. package/dist/robots/indexnow.js +2 -2
  102. package/dist/runtime/index.d.ts +32 -0
  103. package/dist/runtime/index.js +7 -0
  104. package/dist/seo/api.d.ts +0 -4
  105. package/dist/seo/client.js +6 -5
  106. package/dist/seo/getManagedMetadata.d.ts +24 -0
  107. package/dist/seo/index.d.ts +2 -3
  108. package/dist/seo/index.js +14 -132
  109. package/dist/seo/indexnow.js +2 -2
  110. package/dist/seo/llms.js +7 -6
  111. package/dist/seo/register-sitemap-cli.js +2 -2
  112. package/dist/seo/server-api.d.ts +0 -6
  113. package/dist/seo/server.d.ts +1 -1
  114. package/dist/seo/server.js +4 -4
  115. package/dist/seo/sitemap.js +4 -3
  116. package/dist/seo/types.d.ts +9 -30
  117. package/dist/server/index.d.ts +8 -1
  118. package/dist/server/index.js +4 -3
  119. package/dist/server/mint-site-token.d.ts +0 -11
  120. package/dist/server/server-fetch.d.ts +19 -0
  121. package/dist/server-api-EGOKC7Q3.js +9 -0
  122. package/dist/shared/build-entries.d.ts +21 -9
  123. package/dist/shared/clientApiConfig.d.ts +56 -0
  124. package/dist/shared/identity-reader.d.ts +26 -0
  125. package/dist/shared/identity-storage.d.ts +30 -0
  126. package/dist/shared/identity.d.ts +13 -13
  127. package/dist/shared/import-specifiers.d.ts +26 -0
  128. package/dist/shared/sonorFetch.d.ts +4 -3
  129. package/dist/shared/version.d.ts +1 -1
  130. package/dist/signal/index.js +2 -2
  131. package/dist/sitemap/index.js +4 -3
  132. package/dist/slots/index.js +3 -3
  133. package/dist/sync/index.js +6 -5
  134. package/dist/types.d.ts +0 -1
  135. package/dist/website/cta-bar.js +1 -1
  136. package/dist/website/images.js +4 -4
  137. package/dist/website/index.js +7 -6
  138. package/dist/website/popups.js +10 -7
  139. package/dist/website/slots.js +3 -3
  140. package/dist/{writeLLMsTxt-OL4KQERZ.js → writeLLMsTxt-UZGN6IBU.js} +3 -2
  141. package/docs/MIGRATING-TO-7.md +5 -2
  142. package/docs/MIGRATING-TO-8.md +183 -0
  143. package/docs.json +4 -8
  144. package/package.json +15 -44
  145. package/skills/site-kit/SKILL.md +41 -11
  146. package/src/analytics/README.md +14 -14
  147. package/src/chat/README.md +7 -7
  148. package/src/forms/README.md +61 -6
  149. package/src/mcp/README.md +61 -20
  150. package/src/proxy/README.md +5 -4
  151. package/src/revalidate/README.md +2 -2
  152. package/src/runtime/README.md +51 -0
  153. package/src/seo/README.md +24 -8
  154. package/src/sync/README.md +2 -2
  155. package/src/website/README.md +3 -2
  156. package/dist/AnalyticsProvider-BQXV3ZF3.js +0 -11
  157. package/dist/ManagedForm-7FZNH4L2.js +0 -16
  158. package/dist/SiteChat-DMPDXY3W.js +0 -5
  159. package/dist/SiteDesignReporter-Y2IOJE52.js +0 -11
  160. package/dist/SitePopups-HD2LDKVU.js +0 -10
  161. package/dist/SitemapSync-OKPZHRX6.js +0 -8
  162. package/dist/chunk-24QZEO3Q.js +0 -41
  163. package/dist/chunk-BU66S5B7.js +0 -1
  164. package/dist/chunk-G3NHWMP5.js +0 -233
  165. package/dist/chunk-HODO5BX5.js +0 -28
  166. package/dist/chunk-L3AQCDCY.js +0 -386
  167. package/dist/chunk-P5GB6NEO.js +0 -66
  168. package/dist/chunk-SWKE6FWH.js +0 -47
  169. package/dist/cms/CmsPage.d.ts +0 -17
  170. package/dist/cms/CmsPreview.d.ts +0 -37
  171. package/dist/cms/CmsSection.d.ts +0 -8
  172. package/dist/cms/PortableTextRenderer.d.ts +0 -7
  173. package/dist/cms/index.d.ts +0 -37
  174. package/dist/cms/index.js +0 -5
  175. package/dist/cms/sanity-image.d.ts +0 -47
  176. package/dist/cms/sections/CtaSection.d.ts +0 -3
  177. package/dist/cms/sections/CustomSection.d.ts +0 -7
  178. package/dist/cms/sections/FaqSection.d.ts +0 -3
  179. package/dist/cms/sections/FormSection.d.ts +0 -8
  180. package/dist/cms/sections/GallerySection.d.ts +0 -3
  181. package/dist/cms/sections/HeroSection.d.ts +0 -3
  182. package/dist/cms/sections/RichTextSection.d.ts +0 -3
  183. package/dist/cms/sections/TestimonialsSection.d.ts +0 -3
  184. package/dist/cms/sections/index.d.ts +0 -8
  185. package/dist/cms/server-api.d.ts +0 -49
  186. package/dist/cms/server.d.ts +0 -1
  187. package/dist/cms/server.js +0 -5
  188. package/dist/cms/types.d.ts +0 -104
  189. package/dist/commerce/CalendarView.d.ts +0 -43
  190. package/dist/commerce/CheckoutForm.d.ts +0 -11
  191. package/dist/commerce/EventCalendar.d.ts +0 -26
  192. package/dist/commerce/EventCheckout.d.ts +0 -42
  193. package/dist/commerce/EventEmbed.d.ts +0 -11
  194. package/dist/commerce/EventModal.d.ts +0 -43
  195. package/dist/commerce/EventTile.d.ts +0 -10
  196. package/dist/commerce/EventsAgenda.d.ts +0 -38
  197. package/dist/commerce/EventsWidget.d.ts +0 -84
  198. package/dist/commerce/OfferingCard.d.ts +0 -9
  199. package/dist/commerce/OfferingList.d.ts +0 -9
  200. package/dist/commerce/ProductDetail.d.ts +0 -38
  201. package/dist/commerce/ProductEmbed.d.ts +0 -11
  202. package/dist/commerce/ProductGrid.d.ts +0 -41
  203. package/dist/commerce/ProductPage.d.ts +0 -39
  204. package/dist/commerce/RegistrationForm.d.ts +0 -9
  205. package/dist/commerce/SizeChart.d.ts +0 -8
  206. package/dist/commerce/UpcomingEvents.d.ts +0 -9
  207. package/dist/commerce/api.d.ts +0 -179
  208. package/dist/commerce/events-extras.d.ts +0 -60
  209. package/dist/commerce/index.d.ts +0 -33
  210. package/dist/commerce/index.js +0 -8022
  211. package/dist/commerce/server.d.ts +0 -161
  212. package/dist/commerce/server.js +0 -2
  213. package/dist/commerce/types.d.ts +0 -340
  214. package/dist/commerce/useEventModal.d.ts +0 -20
  215. package/dist/commerce/utils.d.ts +0 -17
  216. package/dist/engage/EngageWidget.d.ts +0 -21
  217. package/dist/engage/index.d.ts +0 -14
  218. package/dist/engage/index.js +0 -45
  219. package/dist/engage/types.d.ts +0 -33
  220. package/dist/seo/ManagedContent.d.ts +0 -14
  221. package/dist/server-api-BVCBLJKL.js +0 -9
  222. package/dist/website/cms/server.d.ts +0 -2
  223. package/dist/website/cms/server.js +0 -5
  224. package/dist/website/cms-server.d.ts +0 -2
  225. package/dist/website/cms.d.ts +0 -2
  226. package/dist/website/cms.js +0 -5
  227. package/src/commerce/README.md +0 -109
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import type { SectionRendererProps } from '../types';
3
- /**
4
- * Custom section — passes props to a named component.
5
- * Sites must provide their own component map via sectionComponents override.
6
- */
7
- export declare function CustomSection({ data, displayName }: SectionRendererProps): React.JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { SectionRendererProps } from '../types';
3
- export declare function FaqSection({ data, portableTextComponents }: SectionRendererProps): React.JSX.Element | null;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { SectionRendererProps } from '../types';
3
- /**
4
- * Form section — renders a heading and a placeholder for the managed form.
5
- * The actual form rendering depends on ManagedForm from the forms module.
6
- * Sites should override this section renderer to integrate with their form setup.
7
- */
8
- export declare function FormSection({ data, portableTextComponents }: SectionRendererProps): React.JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { SectionRendererProps } from '../types';
3
- export declare function GallerySection({ data, portableTextComponents }: SectionRendererProps): React.JSX.Element | null;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { SectionRendererProps } from '../types';
3
- export declare function HeroSection({ data, portableTextComponents }: SectionRendererProps): React.JSX.Element;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { SectionRendererProps } from '../types';
3
- export declare function RichTextSection({ data, portableTextComponents }: SectionRendererProps): React.JSX.Element | null;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- import type { SectionRendererProps } from '../types';
3
- export declare function TestimonialsSection({ data, portableTextComponents }: SectionRendererProps): React.JSX.Element | null;
@@ -1,8 +0,0 @@
1
- export { HeroSection } from './HeroSection';
2
- export { RichTextSection } from './RichTextSection';
3
- export { CtaSection } from './CtaSection';
4
- export { GallerySection } from './GallerySection';
5
- export { TestimonialsSection } from './TestimonialsSection';
6
- export { FaqSection } from './FaqSection';
7
- export { FormSection } from './FormSection';
8
- export { CustomSection } from './CustomSection';
@@ -1,49 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/cms - Server-Only API Functions
3
- *
4
- * Fetches CMS page/section data from Sonor API.
5
- * Uses the same secure API pattern as seo/server-api.ts — both delegate config
6
- * resolution + fetch/retry to the shared server-fetch primitive (single source
7
- * of truth — see ../server/server-fetch).
8
- */
9
- import 'server-only';
10
- import type { CmsPageData, CmsSectionData } from './types';
11
- /**
12
- * Fetch a published CMS page by path — cached per request.
13
- * Returns the full page with all sections and their Portable Text content.
14
- * @server-only
15
- * @deprecated Since 7.1. Sonor retired the Sanity CMS and no longer serves CMS pages, so this resolves to null. Use managed copy from `@sonordev/site-kit/website/slots`. Removed in 8.0.
16
- */
17
- export declare const getCmsPage: (path: string) => Promise<CmsPageData | null>;
18
- /**
19
- * Fetch a single published CMS section by ID — cached per request.
20
- * @server-only
21
- * @deprecated Since 7.1. Sonor retired the Sanity CMS and no longer serves CMS pages, so this resolves to null. Use managed copy from `@sonordev/site-kit/website/slots`. Removed in 8.0.
22
- */
23
- export declare const getCmsSection: (sectionId: string) => Promise<CmsSectionData | null>;
24
- /**
25
- * Fetch CMS page and return Next.js Metadata object.
26
- * Use in generateMetadata() for CMS-managed pages.
27
- *
28
- * @example
29
- * ```ts
30
- * import { getCmsPageMetadata } from '@sonordev/site-kit/cms/server'
31
- *
32
- * export async function generateMetadata({ params }) {
33
- * return getCmsPageMetadata(`/${params.slug}`)
34
- * }
35
- * ```
36
- * @server-only
37
- * @deprecated Since 7.1. Sonor retired the Sanity CMS and no longer serves CMS pages, so this resolves to null. Use managed copy from `@sonordev/site-kit/website/slots`. Removed in 8.0.
38
- */
39
- export declare const getCmsPageMetadata: (path: string) => Promise<{
40
- title?: string;
41
- description?: string;
42
- robots?: {
43
- index: boolean;
44
- };
45
- openGraph?: {
46
- title?: string;
47
- description?: string;
48
- };
49
- } | null>;
@@ -1 +0,0 @@
1
- export { getCmsPage, getCmsSection, getCmsPageMetadata } from './server-api';
@@ -1,5 +0,0 @@
1
- import '../chunk-BU66S5B7.js';
2
- export { getCmsPage, getCmsPageMetadata, getCmsSection } from '../chunk-SWKE6FWH.js';
3
- import '../chunk-X6F6SO4S.js';
4
- import '../chunk-MH2DSGC6.js';
5
- import '../chunk-PKBMQBKP.js';
@@ -1,104 +0,0 @@
1
- /**
2
- * CMS Types for site-kit — mirrors Sonor API response shapes.
3
- * Portable Text is the canonical content format.
4
- */
5
- export interface PortableTextBlock {
6
- _type: string;
7
- _key: string;
8
- style?: string;
9
- listItem?: string;
10
- level?: number;
11
- children?: Array<{
12
- _type: string;
13
- _key: string;
14
- text?: string;
15
- marks?: string[];
16
- }>;
17
- markDefs?: Array<{
18
- _type: string;
19
- _key: string;
20
- [key: string]: unknown;
21
- }>;
22
- [key: string]: unknown;
23
- }
24
- export type PortableTextContent = PortableTextBlock[];
25
- export interface SanityImageRef {
26
- _type: 'image';
27
- asset: {
28
- _type: 'reference';
29
- _ref: string;
30
- };
31
- hotspot?: {
32
- x: number;
33
- y: number;
34
- height: number;
35
- width: number;
36
- };
37
- crop?: {
38
- top: number;
39
- bottom: number;
40
- left: number;
41
- right: number;
42
- };
43
- alt?: string;
44
- }
45
- export type SectionType = 'hero' | 'richText' | 'cta' | 'gallery' | 'testimonials' | 'faq' | 'form' | 'custom';
46
- export interface CmsSectionData {
47
- _id: string;
48
- sectionType: SectionType;
49
- displayName: string;
50
- data: Record<string, unknown>;
51
- }
52
- export interface CmsPageSeo {
53
- title?: string;
54
- description?: string;
55
- ogImage?: SanityImageRef;
56
- noindex?: boolean;
57
- }
58
- export interface CmsPageData {
59
- _id: string;
60
- path: string;
61
- title: string;
62
- status: string;
63
- seo?: CmsPageSeo;
64
- sections: CmsSectionData[];
65
- metadata?: {
66
- createdBy?: string;
67
- lastEditedBy?: string;
68
- publishedAt?: string;
69
- };
70
- }
71
- export interface CmsPageProps {
72
- /** Page path to fetch (e.g., '/about') */
73
- path: string;
74
- /** Override default section renderers by type */
75
- sectionComponents?: Partial<Record<SectionType, React.ComponentType<SectionRendererProps>>>;
76
- /** Override Portable Text components */
77
- portableTextComponents?: Record<string, React.ComponentType<any>>;
78
- /** Fallback if page not found */
79
- fallback?: React.ReactNode;
80
- /** Wrapper className */
81
- className?: string;
82
- }
83
- export interface CmsSectionProps {
84
- section: CmsSectionData;
85
- /** Override default section renderers by type */
86
- sectionComponents?: Partial<Record<SectionType, React.ComponentType<SectionRendererProps>>>;
87
- /** Override Portable Text components */
88
- portableTextComponents?: Record<string, React.ComponentType<any>>;
89
- }
90
- export interface SectionRendererProps {
91
- data: Record<string, unknown>;
92
- sectionType: SectionType;
93
- displayName: string;
94
- /** Portable Text components override */
95
- portableTextComponents?: Record<string, React.ComponentType<any>>;
96
- }
97
- export interface PortableTextRendererProps {
98
- /** Portable Text blocks to render */
99
- value: PortableTextContent;
100
- /** Override default components */
101
- components?: Record<string, React.ComponentType<any>>;
102
- /** Wrapper className */
103
- className?: string;
104
- }
@@ -1,43 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - CalendarView
3
- *
4
- * Monthly calendar view for displaying events.
5
- */
6
- import React from 'react';
7
- import type { CommerceOffering, CommerceSchedule } from './types';
8
- export interface CalendarViewProps {
9
- /** Pre-loaded events (optional - will fetch if not provided) */
10
- events?: CommerceOffering[];
11
- /** Initial month to display (defaults to current) */
12
- initialDate?: Date;
13
- /** Category filter */
14
- category?: string;
15
- /** Callback when event is clicked */
16
- onEventClick?: (event: CommerceOffering, schedule: CommerceSchedule) => void;
17
- /** Callback when day is clicked */
18
- onDayClick?: (date: Date, events: EventOnDay[]) => void;
19
- /** Show navigation arrows */
20
- showNavigation?: boolean;
21
- /** Show month/year header */
22
- showHeader?: boolean;
23
- /** First day of week (0 = Sunday, 1 = Monday) */
24
- weekStartsOn?: 0 | 1;
25
- /** Minimum date to show */
26
- minDate?: Date;
27
- /** Maximum date to show */
28
- maxDate?: Date;
29
- /** How to display events in cells: 'title' = text, 'image' = thumbnail with details on hover */
30
- eventDisplay?: 'title' | 'image';
31
- /** Custom class names */
32
- className?: string;
33
- headerClassName?: string;
34
- dayClassName?: string;
35
- eventClassName?: string;
36
- todayClassName?: string;
37
- }
38
- export interface EventOnDay {
39
- event: CommerceOffering;
40
- schedule: CommerceSchedule;
41
- }
42
- export declare function CalendarView({ events: propEvents, initialDate, category, onEventClick, onDayClick, showNavigation, showHeader, weekStartsOn, minDate, maxDate, eventDisplay, className, headerClassName, dayClassName, eventClassName, todayClassName, }: CalendarViewProps): React.JSX.Element;
43
- export default CalendarView;
@@ -1,11 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - CheckoutForm
3
- *
4
- * Checkout/registration form for purchasing products or registering for events.
5
- * Supports shipping flow when shipping_enabled and product type.
6
- */
7
- import React from 'react';
8
- import type { CheckoutFormProps } from './types';
9
- export declare function CheckoutForm({ offering, scheduleId, variantId, quantity: initialQuantity, mode, // 'checkout' | 'register'
10
- showQuantity, submitText, onSuccess, onError, className, formClassName, inputClassName, buttonClassName, }: CheckoutFormProps): React.JSX.Element;
11
- export default CheckoutForm;
@@ -1,26 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - EventCalendar
3
- *
4
- * Calendar view with built-in registration modal.
5
- * Clicking an event opens a popup for registration/checkout.
6
- */
7
- import React from 'react';
8
- import type { CheckoutResult } from './types';
9
- import type { CalendarViewProps } from './CalendarView';
10
- import type { AdditionalField } from './EventModal';
11
- export interface EventCalendarProps extends Omit<CalendarViewProps, 'onEventClick'> {
12
- /** Callback when registration/checkout succeeds */
13
- onRegistrationSuccess?: (result: CheckoutResult) => void;
14
- /** Callback when registration/checkout fails */
15
- onRegistrationError?: (error: string) => void;
16
- /** Collect phone number in registration form */
17
- collectPhone?: boolean;
18
- /** Additional form fields for registration */
19
- additionalFields?: AdditionalField[];
20
- /** Custom modal class names */
21
- modalClassName?: string;
22
- modalOverlayClassName?: string;
23
- modalContentClassName?: string;
24
- }
25
- export declare function EventCalendar({ onRegistrationSuccess, onRegistrationError, collectPhone, additionalFields, modalClassName, modalOverlayClassName, modalContentClassName, ...calendarProps }: EventCalendarProps): React.JSX.Element;
26
- export default EventCalendar;
@@ -1,42 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - EventCheckout
3
- *
4
- * Multi-variant inline event checkout. Renders a tier selector (one row per variant
5
- * with qty controls), customer info, and a Square card element. Submits a single
6
- * lineItems[] payload to Sonor multi-line checkout endpoint — one charge for
7
- * the aggregate total, no redirect.
8
- *
9
- * v1: Square inline only. For single-tier events without variants, the component
10
- * gracefully falls back to a single "ticket" row using the offering's base price.
11
- */
12
- import React from 'react';
13
- import type { CommerceOffering, CommerceSchedule, CheckoutResult } from './types';
14
- export interface EventCheckoutProps {
15
- /** Event offering — must include `variants` (multi-tier) or have a base price (single-tier). */
16
- event: CommerceOffering;
17
- /** Specific schedule to book. Defaults to first upcoming schedule on the event. */
18
- schedule?: CommerceSchedule;
19
- /** Collect a phone number (defaults to true; tickets often need contact). */
20
- collectPhone?: boolean;
21
- /** Maximum quantity per individual variant row (default 10). */
22
- maxPerVariant?: number;
23
- /**
24
- * Seed per-variant quantities on mount, keyed by variant id — lets a tier
25
- * card or deep link open checkout with that tier already selected. Values
26
- * clamp to [0, maxPerVariant]; unknown ids are ignored. Multi-tier events
27
- * only (single-ticket events already start at 1). Initial state only: to
28
- * re-seed an already-mounted checkout, remount it (e.g. `key={variantId}`).
29
- */
30
- initialQuantities?: Record<string, number>;
31
- /** Card label override (e.g. "Card details" vs "Payment"). */
32
- cardLabel?: string;
33
- /** Submit button text override. Falls back to "Buy {total}". */
34
- submitText?: string;
35
- /** Success callback after a successful charge. */
36
- onSuccess?: (result: CheckoutResult) => void;
37
- /** Error callback. */
38
- onError?: (error: string) => void;
39
- className?: string;
40
- }
41
- export declare function EventCheckout({ event, schedule: propSchedule, collectPhone, maxPerVariant, initialQuantities, cardLabel, submitText, onSuccess, onError, className, }: EventCheckoutProps): React.JSX.Element;
42
- export default EventCheckout;
@@ -1,11 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - EventEmbed
3
- *
4
- * Embeddable widget for displaying an event on a homepage or landing page.
5
- * Great for featuring the next upcoming event.
6
- */
7
- import React from 'react';
8
- import type { EventEmbedProps } from './types';
9
- export declare function EventEmbed({ event: propEvent, slug, mode, // 'specific', 'next'
10
- category, variant, showDate, showTime, showLocation, showCapacity, showPrice, showCta, ctaText, onRegister, onCtaClick, className, }: EventEmbedProps): React.JSX.Element | null;
11
- export default EventEmbed;
@@ -1,43 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - EventModal
3
- *
4
- * Modal popup for event registration and checkout.
5
- * Handles both free registration and paid tickets via Stripe/Square.
6
- */
7
- import React from 'react';
8
- import type { CommerceOffering, CommerceSchedule, CheckoutResult } from './types';
9
- export interface EventModalProps {
10
- /** Event to display */
11
- event: CommerceOffering | null;
12
- /** Specific schedule (optional - uses first upcoming if not provided) */
13
- schedule?: CommerceSchedule | null;
14
- /** Whether modal is open */
15
- isOpen: boolean;
16
- /** Close modal callback */
17
- onClose: () => void;
18
- /** Success callback */
19
- onSuccess?: (result: CheckoutResult) => void;
20
- /** Error callback */
21
- onError?: (error: string) => void;
22
- /** Collect phone number */
23
- collectPhone?: boolean;
24
- /** Additional form fields */
25
- additionalFields?: AdditionalField[];
26
- /** Custom class names */
27
- className?: string;
28
- overlayClassName?: string;
29
- contentClassName?: string;
30
- }
31
- export interface AdditionalField {
32
- name: string;
33
- label: string;
34
- type?: 'text' | 'email' | 'tel' | 'textarea' | 'select' | 'number';
35
- required?: boolean;
36
- placeholder?: string;
37
- options?: {
38
- value: string;
39
- label: string;
40
- }[];
41
- }
42
- export declare function EventModal({ event, schedule: propSchedule, isOpen, onClose, onSuccess, onError, collectPhone, additionalFields, className, overlayClassName, contentClassName, }: EventModalProps): React.JSX.Element | null;
43
- export default EventModal;
@@ -1,10 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - EventTile
3
- *
4
- * Compact tile for displaying an event with date, title, and registration button.
5
- * Great for embedding on homepages or sidebars.
6
- */
7
- import React from 'react';
8
- import type { EventTileProps } from './types';
9
- export declare function EventTile({ event, variant, showDate, showTime, showLocation, showCapacity, showPrice, showCta, ctaText, onRegister, onCtaClick, className, dateClassName, titleClassName, ctaClassName, }: EventTileProps): React.JSX.Element;
10
- export default EventTile;
@@ -1,38 +0,0 @@
1
- /**
2
- * EventsAgenda — month-grouped event list.
3
- *
4
- * For sparse community/event calendars an agenda reads far better than a
5
- * month grid, especially on phones, which is why community sites kept
6
- * forking the grid into one. Headless-first: every element carries
7
- * data-sk-part, rows carry data-category / data-offering-type (same contract
8
- * as CalendarView chips), so two-scheme coloring is site CSS:
9
- *
10
- * [data-sk-part="agenda-date"][data-category="pto"] { background: red }
11
- *
12
- * Handles what the grid historically couldn't: multi-day ranges (an event
13
- * appears once per month it overlaps, "Sep 21-25"), and all-day events
14
- * (schedule.all_day when the API provides it, falling back to the
15
- * offering-level metadata.all_day convention).
16
- *
17
- * No hooks, no browser APIs — renders fully at SSR. Interactivity
18
- * (filter pills etc.) belongs to the site around it.
19
- */
20
- import React from 'react';
21
- import type { CommerceOffering, CommerceSchedule } from './types';
22
- export interface AgendaItem {
23
- offering: CommerceOffering;
24
- schedule: CommerceSchedule;
25
- }
26
- export interface EventsAgendaProps {
27
- events: CommerceOffering[];
28
- /** IANA zone for grouping/formatting. Default: each schedule's own timezone, else UTC. */
29
- timeZone?: string;
30
- locale?: string;
31
- /** Hide events that already ended. Default true. */
32
- upcomingOnly?: boolean;
33
- className?: string;
34
- emptyLabel?: string;
35
- /** Replace a row's meta line (time · location · blurb). */
36
- renderMeta?: (item: AgendaItem) => React.ReactNode;
37
- }
38
- export declare function EventsAgenda({ events, timeZone, locale, upcomingOnly, className, emptyLabel, renderMeta, }: EventsAgendaProps): React.JSX.Element;
@@ -1,84 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - EventsWidget
3
- *
4
- * Comprehensive events widget with calendar/list toggle and integrated booking.
5
- * Plug-and-play component for displaying commerce events.
6
- *
7
- * @example
8
- * ```tsx
9
- * // Basic usage - automatically fetches events
10
- * <EventsWidget />
11
- *
12
- * // With calendar view as default
13
- * <EventsWidget defaultView="calendar" />
14
- *
15
- * // Custom styling
16
- * <EventsWidget
17
- * className="my-events-section"
18
- * title="Upcoming Events"
19
- * showViewToggle={true}
20
- * onRegistrationSuccess={(result) => console.log('Registered!', result)}
21
- * />
22
- * ```
23
- */
24
- import React from 'react';
25
- import type { CommerceOffering, CommerceSchedule, CheckoutResult } from './types';
26
- export type EventsViewMode = 'list' | 'grid' | 'calendar';
27
- export interface EventsWidgetProps {
28
- /** Pre-loaded events (optional - will fetch if not provided) */
29
- events?: CommerceOffering[];
30
- /** Initial view mode */
31
- defaultView?: EventsViewMode;
32
- /** Which view modes to show in the toggle (e.g. ['list', 'grid'] when calendar is embedded above) */
33
- availableViews?: EventsViewMode[];
34
- /** Show view toggle buttons */
35
- showViewToggle?: boolean;
36
- /** Section title */
37
- title?: string;
38
- /** Subtitle or description */
39
- subtitle?: string;
40
- /** Category filter */
41
- category?: string;
42
- /** Maximum events to show in list view */
43
- limit?: number;
44
- /** Show "View All" link */
45
- showViewAll?: boolean;
46
- /** URL for "View All" link */
47
- viewAllUrl?: string;
48
- /** Text for "View All" link */
49
- viewAllText?: string;
50
- /** Message when no events */
51
- emptyMessage?: string;
52
- /** Show empty state with icon */
53
- showEmptyIcon?: boolean;
54
- /** Collect phone number in registration */
55
- collectPhone?: boolean;
56
- /** Additional form fields */
57
- additionalFields?: AdditionalField[];
58
- /** Called when registration/checkout succeeds */
59
- onRegistrationSuccess?: (result: CheckoutResult) => void;
60
- /** Called when registration/checkout fails */
61
- onRegistrationError?: (error: string) => void;
62
- /** Called when event is clicked (before modal opens) */
63
- onEventClick?: (event: CommerceOffering, schedule: CommerceSchedule) => void;
64
- className?: string;
65
- headerClassName?: string;
66
- toggleClassName?: string;
67
- listClassName?: string;
68
- calendarClassName?: string;
69
- eventCardClassName?: string;
70
- modalClassName?: string;
71
- }
72
- export interface AdditionalField {
73
- name: string;
74
- label: string;
75
- type?: 'text' | 'email' | 'tel' | 'textarea' | 'select' | 'number';
76
- required?: boolean;
77
- placeholder?: string;
78
- options?: {
79
- value: string;
80
- label: string;
81
- }[];
82
- }
83
- export declare function EventsWidget({ events: propEvents, defaultView, availableViews, showViewToggle, title, subtitle, category, limit, showViewAll, viewAllUrl, viewAllText, emptyMessage, showEmptyIcon, collectPhone, additionalFields, onRegistrationSuccess, onRegistrationError, onEventClick, className, headerClassName, toggleClassName, listClassName, calendarClassName, eventCardClassName, modalClassName, }: EventsWidgetProps): React.JSX.Element;
84
- export default EventsWidget;
@@ -1,9 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - OfferingCard
3
- *
4
- * Displays a single product, service, event, or class with image, title, price, and CTA.
5
- */
6
- import React from 'react';
7
- import type { OfferingCardProps } from './types';
8
- export declare function OfferingCard({ offering, variant, showImage, showPrice, showDescription, showCta, ctaText, onCtaClick, className, imageClassName, titleClassName, priceClassName, descriptionClassName, ctaClassName, }: OfferingCardProps): React.JSX.Element;
9
- export default OfferingCard;
@@ -1,9 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - OfferingList
3
- *
4
- * Displays a grid or list of offerings with optional filtering.
5
- */
6
- import React from 'react';
7
- import type { OfferingListProps } from './types';
8
- export declare function OfferingList({ offerings: propOfferings, type, category, limit, status, layout, columns, cardVariant, showFilters, emptyMessage, showImage, showPrice, showDescription, showCta, ctaText, onCtaClick, className, cardClassName, filterClassName, renderCard, renderEmpty, }: OfferingListProps): React.JSX.Element;
9
- export default OfferingList;
@@ -1,38 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - ProductDetail
3
- *
4
- * World-class product detail component with full inline checkout.
5
- * Supports products, services, events, and subscriptions.
6
- * Zero external dependencies — Square and Stripe SDKs loaded dynamically.
7
- */
8
- import React from 'react';
9
- import type { CommerceOffering, CommerceVariant, CheckoutResult } from './types';
10
- interface TrustBadge {
11
- icon?: 'lock' | 'truck' | 'return' | 'shield';
12
- label: string;
13
- sublabel?: string;
14
- }
15
- export interface ProductDetailProps {
16
- product?: CommerceOffering;
17
- slug?: string;
18
- successUrl?: string;
19
- cancelUrl?: string;
20
- showGallery?: boolean;
21
- showVariants?: boolean;
22
- showQuantity?: boolean;
23
- showSizeChart?: boolean;
24
- showFeatures?: boolean;
25
- showSpecifications?: boolean;
26
- showDescription?: boolean;
27
- showTrustBadges?: boolean;
28
- showInventory?: boolean;
29
- trustBadges?: TrustBadge[];
30
- onAddToCart?: (product: CommerceOffering, variant?: CommerceVariant, quantity?: number) => void;
31
- onCheckoutSuccess?: (result: CheckoutResult) => void;
32
- onCheckoutError?: (error: string) => void;
33
- className?: string;
34
- style?: React.CSSProperties;
35
- layout?: 'horizontal' | 'stacked';
36
- }
37
- export declare function ProductDetail({ product: propProduct, slug, successUrl, cancelUrl, showGallery, showVariants, showQuantity, showSizeChart, showFeatures, showSpecifications, showDescription, showTrustBadges, showInventory, trustBadges, onAddToCart, onCheckoutSuccess, onCheckoutError, className, style: customStyle, layout, }: ProductDetailProps): React.JSX.Element;
38
- export default ProductDetail;
@@ -1,11 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - ProductEmbed
3
- *
4
- * Embeddable widget for displaying a single product on a homepage or landing page.
5
- * Supports showing latest product, specific product by slug, or a random featured product.
6
- */
7
- import React from 'react';
8
- import type { ProductEmbedProps } from './types';
9
- export declare function ProductEmbed({ product: propProduct, slug, mode, // 'specific', 'latest', 'featured'
10
- category, variant, showImage, showPrice, showDescription, showCta, ctaText, onCtaClick, className, }: ProductEmbedProps): React.JSX.Element | null;
11
- export default ProductEmbed;
@@ -1,41 +0,0 @@
1
- /**
2
- * @sonordev/site-kit/commerce - ProductGrid
3
- *
4
- * Grid layout for displaying multiple products with filtering and sorting.
5
- * Ideal for shop pages, category pages, and product listings.
6
- */
7
- import React from 'react';
8
- import type { CommerceOffering } from './types';
9
- export interface ProductGridProps {
10
- /** Pre-loaded products (for SSR) */
11
- products?: CommerceOffering[];
12
- /** Limit number of products */
13
- limit?: number;
14
- /** Category to filter by */
15
- category?: string;
16
- /** Show category filter */
17
- showCategoryFilter?: boolean;
18
- /** Show sort dropdown */
19
- showSort?: boolean;
20
- /** Show search input */
21
- showSearch?: boolean;
22
- /** Number of columns (responsive) */
23
- columns?: 2 | 3 | 4;
24
- /** Loading skeleton count */
25
- skeletonCount?: number;
26
- /** Custom empty state message */
27
- emptyMessage?: string;
28
- /** Callback when product is clicked */
29
- onProductClick?: (product: CommerceOffering) => void;
30
- /** Navigate to product page on click */
31
- linkToProduct?: boolean;
32
- /** Base path for product links */
33
- productBasePath?: string;
34
- /** Additional class names */
35
- className?: string;
36
- /** Card variant style */
37
- cardVariant?: 'card' | 'minimal' | 'horizontal';
38
- /** Custom styles */
39
- style?: React.CSSProperties;
40
- }
41
- export declare function ProductGrid({ products: propProducts, limit, category: propCategory, showCategoryFilter, showSort, showSearch, columns, skeletonCount, emptyMessage, onProductClick, linkToProduct, productBasePath, className, cardVariant, style, }: ProductGridProps): React.JSX.Element;