@uptrademedia/site-kit 1.0.28 → 1.0.29

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 (53) hide show
  1. package/dist/{chunk-FRSN2JKU.js → chunk-6NTMCSHP.js} +15 -18
  2. package/dist/chunk-6NTMCSHP.js.map +1 -0
  3. package/dist/{chunk-WMOA3332.js → chunk-FOBATMSH.js} +70 -55
  4. package/dist/chunk-FOBATMSH.js.map +1 -0
  5. package/dist/{chunk-K2PERQLP.mjs → chunk-MLY7AWHG.mjs} +70 -55
  6. package/dist/chunk-MLY7AWHG.mjs.map +1 -0
  7. package/dist/{chunk-HHAJAANV.mjs → chunk-QY7CDW6P.mjs} +189 -34
  8. package/dist/chunk-QY7CDW6P.mjs.map +1 -0
  9. package/dist/{chunk-JOAULVQB.mjs → chunk-WG2SI2UN.mjs} +15 -18
  10. package/dist/chunk-WG2SI2UN.mjs.map +1 -0
  11. package/dist/{chunk-RM4XFDE6.js → chunk-ZGT5ZYQ5.js} +189 -34
  12. package/dist/chunk-ZGT5ZYQ5.js.map +1 -0
  13. package/dist/commerce/index.d.mts +1 -1
  14. package/dist/commerce/index.d.ts +1 -1
  15. package/dist/commerce/index.js +39 -39
  16. package/dist/commerce/index.mjs +1 -1
  17. package/dist/index.d.mts +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +39 -35
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +15 -11
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/{routing-D6bSzuw-.d.ts → routing-CHmSC8p0.d.ts} +1 -1
  24. package/dist/{routing-nObgWX16.d.mts → routing-Cy9vtQq8.d.mts} +1 -1
  25. package/dist/seo/index.d.mts +28 -28
  26. package/dist/seo/index.d.ts +28 -28
  27. package/dist/seo/index.js +96 -245
  28. package/dist/seo/index.js.map +1 -1
  29. package/dist/seo/index.mjs +25 -224
  30. package/dist/seo/index.mjs.map +1 -1
  31. package/dist/seo/register-sitemap-cli.js +3 -3
  32. package/dist/seo/register-sitemap-cli.mjs +2 -2
  33. package/dist/seo/server.d.mts +2 -2
  34. package/dist/seo/server.d.ts +2 -2
  35. package/dist/seo/server.js +185 -44
  36. package/dist/seo/server.js.map +1 -1
  37. package/dist/seo/server.mjs +183 -2
  38. package/dist/seo/server.mjs.map +1 -1
  39. package/dist/{api-EXKDAYGB.mjs → server-api-3HJLLZB7.mjs} +3 -3
  40. package/dist/server-api-3HJLLZB7.mjs.map +1 -0
  41. package/dist/{api-HBENRDUH.js → server-api-RM25RPFH.js} +20 -20
  42. package/dist/server-api-RM25RPFH.js.map +1 -0
  43. package/dist/{types-Cb9d3lkc.d.mts → types-CwyWiHtq.d.mts} +22 -11
  44. package/dist/{types-Cb9d3lkc.d.ts → types-CwyWiHtq.d.ts} +22 -11
  45. package/package.json +1 -1
  46. package/dist/api-EXKDAYGB.mjs.map +0 -1
  47. package/dist/api-HBENRDUH.js.map +0 -1
  48. package/dist/chunk-FRSN2JKU.js.map +0 -1
  49. package/dist/chunk-HHAJAANV.mjs.map +0 -1
  50. package/dist/chunk-JOAULVQB.mjs.map +0 -1
  51. package/dist/chunk-K2PERQLP.mjs.map +0 -1
  52. package/dist/chunk-RM4XFDE6.js.map +0 -1
  53. package/dist/chunk-WMOA3332.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/seo/server-api.ts"],"names":[],"mappings":";;;;AAoBA,SAAS,kBAAA,GAAqB;AAC5B,EAAA,MAAM,SAAS,OAAA,CAAQ,GAAA,CAAI,eAAA,IAAmB,OAAA,CAAQ,IAAI,2BAAA,IAA+B,8BAAA;AACzF,EAAA,MAAM,SAAS,OAAA,CAAQ,GAAA,CAAI,eAAA,IAAmB,OAAA,CAAQ,IAAI,2BAAA,IAA+B,EAAA;AAEzF,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,MAAM,IAAI,MAAM,6HAA6H,CAAA;AAAA,EAC/I;AAEA,EAAA,OAAO,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AACX,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,kBAAA,EAAmB;AACtC,EAAA,MAAM,SAAA,GAAY,oBAAoB,MAAM,CAAA;AAC5C,EAAA,IAAI,CAAC,WAAW,OAAO,IAAA;AACvB,EAAA,OAAO,YAAA,CAAa,CAAA,uBAAA,EAA0B,SAAS,CAAA,QAAA,CAAU,CAAA;AACnE,CAAC","file":"chunk-MLY7AWHG.mjs","sourcesContent":["/**\n * @uptrade/site-kit/seo - Server-Only API Functions\n * \n * SECURITY: These functions use private environment variables\n * and should ONLY be imported in server-side code (RSC, API routes, server actions).\n * \n * DO NOT import this file in client components or it will expose API keys.\n */\n\nimport { cache } from 'react'\nimport 'server-only' // This ensures the module can only be imported server-side\n\n// ============================================\n// Server-Only API Config\n// ============================================\n\n/**\n * Config for portal API calls. Project is resolved by the portal from the API key;\n * sites never send or read project ID.\n */\nfunction getSecureApiConfig() {\n const apiUrl = process.env.UPTRADE_API_URL || process.env.NEXT_PUBLIC_UPTRADE_API_URL || 'https://api.uptrademedia.com'\n const apiKey = process.env.UPTRADE_API_KEY || process.env.NEXT_PUBLIC_UPTRADE_API_KEY || ''\n\n if (!apiKey) {\n throw new Error('@uptrade/seo: UPTRADE_API_KEY or NEXT_PUBLIC_UPTRADE_API_KEY environment variable is required for server-side SEO functions')\n }\n\n return { apiUrl, apiKey }\n}\n\n/** Derive project ID from API key for Signal API only (format: uptrade_{uuid}_{secret}). Not used for portal. */\nfunction getProjectIdFromKey(apiKey: string): string | null {\n const match = apiKey.match(/^uptrade_([0-9a-f-]{36})_/)\n return match ? match[1] : null\n}\n\nasync function secureApiPost<T>(endpoint: string, body: Record<string, any> = {}): Promise<T | null> {\n const { apiUrl, apiKey } = getSecureApiConfig()\n\n try {\n const response = await fetch(`${apiUrl}${endpoint}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'x-api-key': apiKey,\n },\n body: JSON.stringify(body),\n next: { revalidate: 60 }, // Cache for 60 seconds\n })\n\n if (!response.ok) {\n let detail = response.statusText\n try {\n const err = await response.json().catch(() => ({}))\n if (err?.message) detail = err.message\n } catch {\n /* ignore */\n }\n console.error(`@uptrade/seo: API error ${response.status} ${endpoint}: ${detail}`)\n return null\n }\n\n return await response.json()\n } catch (error) {\n console.error('@uptrade/seo: Network error:', error)\n return null\n }\n}\n\nasync function secureApiGet<T>(endpoint: string): Promise<T | null> {\n const { apiUrl, apiKey } = getSecureApiConfig()\n \n try {\n const response = await fetch(`${apiUrl}${endpoint}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'x-api-key': apiKey,\n },\n next: { revalidate: 60 },\n })\n \n if (!response.ok) {\n console.error(`@uptrade/seo: API error ${response.status}: ${response.statusText}`)\n return null\n }\n \n return await response.json()\n } catch (error) {\n console.error('@uptrade/seo: Network error:', error)\n return null\n }\n}\n\n// ============================================\n// Secure Cached Data Fetchers\n// ============================================\n\n/**\n * Fetch SEO page data - cached per request\n * @server-only\n */\nexport const getSEOPageData = cache(async (path: string) => {\n const result = await secureApiPost<{ page: any; project: any }>('/api/public/seo/page', { path })\n return {\n page: result?.page || null,\n project: result?.project || null,\n }\n})\n\n/**\n * Fetch schema markups for a page - cached per request\n * @server-only\n */\nexport const getSchemaMarkups = cache(async (\n path: string,\n options?: { includeTypes?: string[]; excludeTypes?: string[] }\n) => {\n const result = await secureApiPost<{ schemas: any[] }>('/api/public/seo/schemas', {\n path,\n includeTypes: options?.includeTypes,\n excludeTypes: options?.excludeTypes,\n })\n return result?.schemas || []\n})\n\n/**\n * Fetch FAQ data for a page - cached per request\n * @server-only\n */\nexport const getFAQData = cache(async (path: string) => {\n const result = await secureApiPost<{ faq: any }>('/api/public/seo/faq', { path })\n return result?.faq || null\n})\n\n/**\n * Fetch internal links for a page - cached per request\n * @server-only\n */\nexport const getInternalLinks = cache(async (\n sourcePath: string,\n options?: { position?: string; limit?: number }\n) => {\n const result = await secureApiPost<{ links: any[] }>('/api/public/seo/internal-links', {\n sourcePath,\n position: options?.position,\n limit: options?.limit,\n })\n return result?.links || []\n})\n\n/**\n * Fetch content block - cached per request\n * @server-only\n */\nexport const getContentBlock = cache(async (path: string, section: string) => {\n const result = await secureApiPost<{ content: any }>('/api/public/seo/content', { path, section })\n return result?.content || null\n})\n\n/**\n * Fetch A/B test and determine variant - cached per request\n * @server-only\n */\nexport const getABTest = cache(async (path: string, field: string) => {\n const result = await secureApiPost<{ test: any }>('/api/public/seo/ab-test', { path, field })\n return result?.test || null\n})\n\n/**\n * Record A/B test impression\n * @server-only\n */\nexport async function recordABImpression(\n testId: string,\n variant: 'a' | 'b',\n sessionId?: string\n): Promise<void> {\n await secureApiPost('/api/public/seo/ab-impression', { testId, variant, sessionId })\n}\n\n/**\n * Fetch redirect for a path - cached per request\n * @server-only\n */\nexport const getRedirectData = cache(async (path: string) => {\n const result = await secureApiPost<{ redirect: any }>('/api/public/seo/redirect', { path })\n return result?.redirect || null\n})\n\n/**\n * Fetch managed scripts - cached per request\n * @server-only\n */\nexport const getManagedScripts = cache(async (position: string, currentPath?: string) => {\n const result = await secureApiPost<{ scripts: any[] }>('/api/public/seo/scripts', {\n position,\n currentPath,\n })\n return result?.scripts || []\n})\n\n/**\n * Fetch robots directive for a page - cached per request\n * @server-only\n */\nexport const getRobotsData = cache(async (path: string) => {\n const result = await secureApiPost<{ page: any }>('/api/public/seo/page', { path })\n return result?.page?.managed_robots || null\n})\n\n/**\n * Fetch sitemap entries - cached per request\n * @server-only\n */\nexport const getSitemapEntries = cache(async (options?: { publishedOnly?: boolean }) => {\n const result = await secureApiPost<{ entries: any[] }>('/api/public/seo/sitemap', {\n publishedOnly: options?.publishedOnly,\n })\n return result?.entries || []\n})\n\n/**\n * Register/sync sitemap entries from the client site\n * Call this at build time to populate seo_pages from your sitemap.xml\n * @server-only\n * \n * @example\n * ```ts\n * // scripts/register-sitemap.ts (run at build time)\n * import { registerSitemap } from '@uptrade/seo/server'\n * \n * await registerSitemap([\n * { path: '/', priority: 1.0, changefreq: 'daily' },\n * { path: '/about', priority: 0.8, changefreq: 'weekly' },\n * ])\n * ```\n */\nexport async function registerSitemap(\n entries: Array<{\n path: string\n title?: string\n priority?: number\n changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never'\n }>\n): Promise<{ success: boolean; created: number; updated: number }> {\n const { apiUrl, apiKey } = getSecureApiConfig()\n\n try {\n const response = await fetch(`${apiUrl}/api/public/seo/register-sitemap`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'x-api-key': apiKey,\n },\n body: JSON.stringify({ entries }),\n })\n \n if (!response.ok) {\n console.error(`@uptrade/seo: Sitemap registration failed: ${response.statusText}`)\n return { success: false, created: 0, updated: 0 }\n }\n \n return await response.json()\n } catch (error) {\n console.error('@uptrade/seo: Sitemap registration error:', error)\n return { success: false, created: 0, updated: 0 }\n }\n}\n\n// ============================================\n// AI Visibility & Entity Graph API (Signal)\n// ============================================\n\nfunction getSignalApiConfig() {\n const apiUrl = process.env.SIGNAL_API_URL || process.env.NEXT_PUBLIC_SIGNAL_API_URL || 'https://signal.uptrademedia.com'\n const apiKey = process.env.UPTRADE_API_KEY || ''\n return { apiUrl, apiKey }\n}\n\nasync function signalApiGet<T>(endpoint: string): Promise<T | null> {\n const { apiUrl, apiKey } = getSignalApiConfig()\n \n if (!apiKey) {\n return null\n }\n \n try {\n const response = await fetch(`${apiUrl}${endpoint}`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n 'x-api-key': apiKey,\n },\n next: { revalidate: 300 }, // Cache for 5 minutes\n })\n \n if (!response.ok) {\n return null\n }\n \n const result = await response.json()\n return result?.data || result\n } catch (error) {\n console.error('@uptrade/seo: Signal API error:', error)\n return null\n }\n}\n\n/**\n * Entity types for the knowledge graph\n */\nexport type EntityType = \n | 'organization'\n | 'person'\n | 'service'\n | 'product'\n | 'location'\n | 'concept'\n | 'credential'\n\n/**\n * Entity from the knowledge graph\n */\nexport interface SEOEntity {\n id: string\n project_id: string\n entity_type: EntityType\n name: string\n slug: string\n properties: Record<string, unknown>\n knows_about: string[]\n same_as: string[]\n schema_type?: string\n is_primary: boolean\n}\n\n/**\n * Fetch entities for a project - cached per request\n * Returns the entity graph for enhanced schema markup\n * @server-only\n */\nexport const getEntities = cache(async (\n options?: { type?: EntityType }\n): Promise<SEOEntity[]> => {\n const { apiKey } = getSecureApiConfig()\n const projectId = getProjectIdFromKey(apiKey)\n if (!projectId) return []\n let endpoint = `/skills/seo/entities/${projectId}`\n if (options?.type) {\n endpoint += `?type=${options.type}`\n }\n const result = await signalApiGet<SEOEntity[]>(endpoint)\n return result || []\n})\n\n/**\n * Fetch primary entity (the business) - cached per request\n * @server-only\n */\nexport const getPrimaryEntity = cache(async (): Promise<SEOEntity | null> => {\n const { apiKey } = getSecureApiConfig()\n const projectId = getProjectIdFromKey(apiKey)\n if (!projectId) return null\n return signalApiGet<SEOEntity>(`/skills/seo/entities/${projectId}/primary`)\n})\n\n/**\n * Fetch entity-enhanced schema for a page\n * Returns Organization schema with knowsAbout, areaServed, employee, etc.\n * @server-only\n */\nexport const getEntityEnhancedSchema = cache(async (pagePath: string): Promise<object[]> => {\n const { apiKey } = getSecureApiConfig()\n const projectId = getProjectIdFromKey(apiKey)\n if (!projectId) return []\n const result = await signalApiGet<{ schemas: object[] }>(\n `/skills/seo/schema/${projectId}/entity-enhanced?pagePath=${encodeURIComponent(pagePath)}`\n )\n return result?.schemas || []\n})\n\n/**\n * Get AI visibility score for a page\n * @server-only\n */\nexport const getVisibilityScore = cache(async (\n pagePath: string\n): Promise<{\n overall_score: number\n entity_coverage: number\n answer_density: number\n chunk_readability: number\n authority_signals: number\n schema_completeness: number\n} | null> => {\n const { apiKey } = getSecureApiConfig()\n const projectId = getProjectIdFromKey(apiKey)\n if (!projectId) return null\n const result = await signalApiGet<any[]>(`/skills/seo/visibility/${projectId}`)\n if (!result) return null\n return result.find(s => s.page_path === pagePath) || null\n})\n\n/**\n * Get AI visibility summary for project\n * @server-only\n */\nexport const getVisibilitySummary = cache(async (): Promise<{\n overall_score: number\n total_entities: number\n pages_analyzed: number\n top_recommendations: Array<{ priority: string; type: string; message: string }>\n} | null> => {\n const { apiKey } = getSecureApiConfig()\n const projectId = getProjectIdFromKey(apiKey)\n if (!projectId) return null\n return signalApiGet(`/skills/seo/visibility/${projectId}/summary`)\n})\n"]}
@@ -3350,6 +3350,12 @@ var ListIcon = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/200
3350
3350
  /* @__PURE__ */ jsx("line", { x1: "3", y1: "12", x2: "3.01", y2: "12" }),
3351
3351
  /* @__PURE__ */ jsx("line", { x1: "3", y1: "18", x2: "3.01", y2: "18" })
3352
3352
  ] });
3353
+ var GridIcon = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
3354
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "3", width: "7", height: "7" }),
3355
+ /* @__PURE__ */ jsx("rect", { x: "14", y: "3", width: "7", height: "7" }),
3356
+ /* @__PURE__ */ jsx("rect", { x: "14", y: "14", width: "7", height: "7" }),
3357
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "14", width: "7", height: "7" })
3358
+ ] });
3353
3359
  var ClockIcon = () => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
3354
3360
  /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
3355
3361
  /* @__PURE__ */ jsx("polyline", { points: "12 6 12 12 16 14" })
@@ -3504,7 +3510,7 @@ function EventsWidget({
3504
3510
  ] })
3505
3511
  ] });
3506
3512
  }
3507
- const displayEvents = viewMode === "list" ? events.slice(0, limit) : events;
3513
+ const displayEvents = viewMode === "list" || viewMode === "grid" ? events.slice(0, limit) : events;
3508
3514
  return /* @__PURE__ */ jsxs("div", { className: `site-kit-events-widget ${className}`, children: [
3509
3515
  (title || subtitle || showViewToggle) && /* @__PURE__ */ jsxs(
3510
3516
  "div",
@@ -3560,6 +3566,31 @@ function EventsWidget({
3560
3566
  ]
3561
3567
  }
3562
3568
  ),
3569
+ /* @__PURE__ */ jsxs(
3570
+ "button",
3571
+ {
3572
+ onClick: () => setViewMode("grid"),
3573
+ style: {
3574
+ display: "flex",
3575
+ alignItems: "center",
3576
+ gap: "0.5rem",
3577
+ padding: "0.5rem 1rem",
3578
+ border: "none",
3579
+ borderRadius: "0.375rem",
3580
+ background: viewMode === "grid" ? "#fff" : "transparent",
3581
+ color: viewMode === "grid" ? "#1f2937" : "#6b7280",
3582
+ fontWeight: 500,
3583
+ fontSize: "0.875rem",
3584
+ cursor: "pointer",
3585
+ boxShadow: viewMode === "grid" ? "0 1px 2px rgba(0,0,0,0.05)" : "none",
3586
+ transition: "all 150ms"
3587
+ },
3588
+ children: [
3589
+ /* @__PURE__ */ jsx(GridIcon, {}),
3590
+ "Grid"
3591
+ ]
3592
+ }
3593
+ ),
3563
3594
  /* @__PURE__ */ jsxs(
3564
3595
  "button",
3565
3596
  {
@@ -3595,6 +3626,7 @@ function EventsWidget({
3595
3626
  /* @__PURE__ */ jsx("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" }, children: displayEvents.map((eventItem) => {
3596
3627
  const nextSchedule = eventItem.next_schedule || eventItem.schedules?.[0];
3597
3628
  const isFree = !eventItem.price || eventItem.price === 0;
3629
+ const imageUrl = eventItem.featured_image_url;
3598
3630
  return /* @__PURE__ */ jsxs(
3599
3631
  "div",
3600
3632
  {
@@ -3602,14 +3634,15 @@ function EventsWidget({
3602
3634
  onClick: () => nextSchedule && handleEventClick(eventItem, nextSchedule),
3603
3635
  style: {
3604
3636
  display: "flex",
3605
- flexDirection: "column",
3606
- gap: "0.75rem",
3607
- padding: "1.25rem",
3637
+ flexDirection: "row",
3638
+ gap: 0,
3639
+ padding: 0,
3608
3640
  background: "#fff",
3609
3641
  border: "1px solid #e5e7eb",
3610
3642
  borderRadius: "0.75rem",
3611
3643
  cursor: nextSchedule ? "pointer" : "default",
3612
- transition: "all 150ms"
3644
+ transition: "all 150ms",
3645
+ overflow: "hidden"
3613
3646
  },
3614
3647
  onMouseEnter: (e) => {
3615
3648
  if (nextSchedule) {
@@ -3622,38 +3655,160 @@ function EventsWidget({
3622
3655
  e.currentTarget.style.boxShadow = "none";
3623
3656
  },
3624
3657
  children: [
3625
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: "1rem" }, children: [
3626
- /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
3627
- /* @__PURE__ */ jsx("h3", { style: { margin: 0, fontSize: "1.125rem", fontWeight: 600, color: "#1f2937" }, children: eventItem.name }),
3628
- eventItem.short_description && /* @__PURE__ */ jsx("p", { style: { margin: "0.5rem 0 0", color: "#6b7280", fontSize: "0.875rem", lineHeight: 1.5 }, children: eventItem.short_description })
3658
+ /* @__PURE__ */ jsx("div", { style: {
3659
+ width: "160px",
3660
+ minWidth: "160px",
3661
+ flexShrink: 0,
3662
+ background: "#f3f4f6"
3663
+ }, children: imageUrl ? /* @__PURE__ */ jsx(
3664
+ "img",
3665
+ {
3666
+ src: imageUrl,
3667
+ alt: eventItem.name,
3668
+ style: {
3669
+ width: "100%",
3670
+ height: "100%",
3671
+ minHeight: "120px",
3672
+ objectFit: "cover",
3673
+ display: "block"
3674
+ }
3675
+ }
3676
+ ) : /* @__PURE__ */ jsx("div", { style: {
3677
+ width: "100%",
3678
+ minHeight: "120px",
3679
+ display: "flex",
3680
+ alignItems: "center",
3681
+ justifyContent: "center",
3682
+ color: "#9ca3af"
3683
+ }, children: /* @__PURE__ */ jsx(CalendarIcon, {}) }) }),
3684
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, display: "flex", flexDirection: "column", gap: "0.75rem", padding: "1.25rem" }, children: [
3685
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "flex-start", gap: "1rem" }, children: [
3686
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
3687
+ /* @__PURE__ */ jsx("h3", { style: { margin: 0, fontSize: "1.125rem", fontWeight: 600, color: "#1f2937" }, children: eventItem.name }),
3688
+ eventItem.short_description && /* @__PURE__ */ jsx("p", { style: { margin: "0.5rem 0 0", color: "#6b7280", fontSize: "0.875rem", lineHeight: 1.5 }, children: eventItem.short_description })
3689
+ ] }),
3690
+ eventItem.price_is_public && /* @__PURE__ */ jsx("div", { style: {
3691
+ padding: "0.375rem 0.75rem",
3692
+ background: isFree ? "#dcfce7" : "#dbeafe",
3693
+ color: isFree ? "#166534" : "#1e40af",
3694
+ borderRadius: "9999px",
3695
+ fontSize: "0.875rem",
3696
+ fontWeight: 600,
3697
+ whiteSpace: "nowrap"
3698
+ }, children: isFree ? "Free" : formatPrice(eventItem.price ?? 0, eventItem.currency) })
3699
+ ] }),
3700
+ nextSchedule && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexWrap: "wrap", gap: "1rem", fontSize: "0.875rem", color: "#6b7280" }, children: [
3701
+ /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
3702
+ /* @__PURE__ */ jsx(CalendarIcon, {}),
3703
+ formatDate(nextSchedule.starts_at)
3704
+ ] }),
3705
+ /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
3706
+ /* @__PURE__ */ jsx(ClockIcon, {}),
3707
+ formatTime(nextSchedule.starts_at)
3708
+ ] }),
3709
+ eventItem.location && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
3710
+ /* @__PURE__ */ jsx(LocationIcon, {}),
3711
+ eventItem.location
3712
+ ] }),
3713
+ nextSchedule.spots_remaining !== null && nextSchedule.spots_remaining !== void 0 && /* @__PURE__ */ jsx("span", { style: {
3714
+ color: nextSchedule.spots_remaining < 5 ? "#dc2626" : "#6b7280",
3715
+ fontWeight: nextSchedule.spots_remaining < 5 ? 500 : 400
3716
+ }, children: nextSchedule.spots_remaining === 0 ? "Sold Out" : `${nextSchedule.spots_remaining} spots left` })
3717
+ ] })
3718
+ ] })
3719
+ ]
3720
+ },
3721
+ eventItem.id
3722
+ );
3723
+ }) }),
3724
+ showViewAll && events.length > limit && /* @__PURE__ */ jsx("div", { style: { textAlign: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx(
3725
+ "a",
3726
+ {
3727
+ href: viewAllUrl,
3728
+ style: {
3729
+ display: "inline-block",
3730
+ padding: "0.75rem 1.5rem",
3731
+ background: "#f3f4f6",
3732
+ color: "#1f2937",
3733
+ borderRadius: "0.5rem",
3734
+ textDecoration: "none",
3735
+ fontWeight: 500,
3736
+ fontSize: "0.875rem",
3737
+ transition: "all 150ms"
3738
+ },
3739
+ children: viewAllText
3740
+ }
3741
+ ) })
3742
+ ] }) : viewMode === "grid" ? /* @__PURE__ */ jsxs("div", { className: `site-kit-events-grid ${listClassName}`, children: [
3743
+ /* @__PURE__ */ jsx("div", { style: {
3744
+ display: "grid",
3745
+ gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
3746
+ gap: "1.25rem"
3747
+ }, children: displayEvents.map((eventItem) => {
3748
+ const nextSchedule = eventItem.next_schedule || eventItem.schedules?.[0];
3749
+ const isFree = !eventItem.price || eventItem.price === 0;
3750
+ const imageUrl = eventItem.featured_image_url;
3751
+ return /* @__PURE__ */ jsxs(
3752
+ "div",
3753
+ {
3754
+ className: `site-kit-event-card site-kit-event-card--grid ${eventCardClassName}`,
3755
+ onClick: () => nextSchedule && handleEventClick(eventItem, nextSchedule),
3756
+ style: {
3757
+ position: "relative",
3758
+ minHeight: "220px",
3759
+ borderRadius: "0.75rem",
3760
+ overflow: "hidden",
3761
+ cursor: nextSchedule ? "pointer" : "default",
3762
+ transition: "all 150ms",
3763
+ border: "1px solid #e5e7eb"
3764
+ },
3765
+ onMouseEnter: (e) => {
3766
+ if (nextSchedule) {
3767
+ e.currentTarget.style.boxShadow = "0 10px 25px -5px rgba(0, 0, 0, 0.15)";
3768
+ e.currentTarget.style.transform = "translateY(-2px)";
3769
+ }
3770
+ },
3771
+ onMouseLeave: (e) => {
3772
+ e.currentTarget.style.boxShadow = "none";
3773
+ e.currentTarget.style.transform = "none";
3774
+ },
3775
+ children: [
3776
+ /* @__PURE__ */ jsx("div", { style: {
3777
+ position: "absolute",
3778
+ inset: 0,
3779
+ background: imageUrl ? `linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.15) 70%), url(${imageUrl}) center/cover` : "linear-gradient(135deg, #4b5563 0%, #6b7280 100%)"
3780
+ } }),
3781
+ /* @__PURE__ */ jsxs("div", { style: {
3782
+ position: "relative",
3783
+ height: "100%",
3784
+ display: "flex",
3785
+ flexDirection: "column",
3786
+ justifyContent: "flex-end",
3787
+ padding: "1.25rem",
3788
+ color: "#fff"
3789
+ }, children: [
3790
+ /* @__PURE__ */ jsx("h3", { style: { margin: 0, fontSize: "1.125rem", fontWeight: 600, color: "#fff", textShadow: "0 1px 2px rgba(0,0,0,0.5)" }, children: eventItem.name }),
3791
+ eventItem.short_description && /* @__PURE__ */ jsx("p", { style: { margin: "0.25rem 0 0", fontSize: "0.8125rem", opacity: 0.95, lineHeight: 1.4, overflow: "hidden", textOverflow: "ellipsis", maxHeight: "2.8em" }, children: eventItem.short_description }),
3792
+ nextSchedule && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexWrap: "wrap", gap: "0.75rem", marginTop: "0.75rem", fontSize: "0.8125rem", opacity: 0.95 }, children: [
3793
+ /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "0.25rem" }, children: [
3794
+ /* @__PURE__ */ jsx(CalendarIcon, {}),
3795
+ formatDate(nextSchedule.starts_at)
3796
+ ] }),
3797
+ /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "0.25rem" }, children: [
3798
+ /* @__PURE__ */ jsx(ClockIcon, {}),
3799
+ formatTime(nextSchedule.starts_at)
3800
+ ] }),
3801
+ nextSchedule.spots_remaining !== null && nextSchedule.spots_remaining !== void 0 && /* @__PURE__ */ jsx("span", { children: nextSchedule.spots_remaining === 0 ? "Sold Out" : `${nextSchedule.spots_remaining} spots left` })
3629
3802
  ] }),
3630
3803
  eventItem.price_is_public && /* @__PURE__ */ jsx("div", { style: {
3631
- padding: "0.375rem 0.75rem",
3632
- background: isFree ? "#dcfce7" : "#dbeafe",
3633
- color: isFree ? "#166534" : "#1e40af",
3804
+ marginTop: "0.5rem",
3805
+ display: "inline-block",
3806
+ padding: "0.25rem 0.5rem",
3807
+ background: "rgba(255,255,255,0.2)",
3634
3808
  borderRadius: "9999px",
3635
3809
  fontSize: "0.875rem",
3636
- fontWeight: 600,
3637
- whiteSpace: "nowrap"
3810
+ fontWeight: 600
3638
3811
  }, children: isFree ? "Free" : formatPrice(eventItem.price ?? 0, eventItem.currency) })
3639
- ] }),
3640
- nextSchedule && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexWrap: "wrap", gap: "1rem", fontSize: "0.875rem", color: "#6b7280" }, children: [
3641
- /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
3642
- /* @__PURE__ */ jsx(CalendarIcon, {}),
3643
- formatDate(nextSchedule.starts_at)
3644
- ] }),
3645
- /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
3646
- /* @__PURE__ */ jsx(ClockIcon, {}),
3647
- formatTime(nextSchedule.starts_at)
3648
- ] }),
3649
- eventItem.location && /* @__PURE__ */ jsxs("span", { style: { display: "flex", alignItems: "center", gap: "0.375rem" }, children: [
3650
- /* @__PURE__ */ jsx(LocationIcon, {}),
3651
- eventItem.location
3652
- ] }),
3653
- nextSchedule.spots_remaining !== null && nextSchedule.spots_remaining !== void 0 && /* @__PURE__ */ jsx("span", { style: {
3654
- color: nextSchedule.spots_remaining < 5 ? "#dc2626" : "#6b7280",
3655
- fontWeight: nextSchedule.spots_remaining < 5 ? 500 : 400
3656
- }, children: nextSchedule.spots_remaining === 0 ? "Sold Out" : `${nextSchedule.spots_remaining} spots left` })
3657
3812
  ] })
3658
3813
  ]
3659
3814
  },
@@ -3717,5 +3872,5 @@ function getApiKey() {
3717
3872
  }
3718
3873
 
3719
3874
  export { CalendarView, CheckoutForm, EventCalendar, EventEmbed, EventModal, EventTile, EventsWidget, OfferingCard, OfferingList, ProductDetail, ProductEmbed, ProductGrid, ProductPage, RegistrationForm, UpcomingEvents, createCheckoutSession, fetchActiveProcessor, fetchCategories, fetchLatestOffering, fetchNextEvent, fetchOffering, fetchOfferings, fetchProductBySlug, fetchProducts, fetchProductsPublic, fetchServices, fetchUpcomingEvents, formatDate, formatDateRange, formatDateTime, formatPrice, formatTime, getOfferingUrl, getRelativeTimeUntil, getSpotsRemaining, isEventSoldOut, registerForEvent, useEventModal };
3720
- //# sourceMappingURL=chunk-HHAJAANV.mjs.map
3721
- //# sourceMappingURL=chunk-HHAJAANV.mjs.map
3875
+ //# sourceMappingURL=chunk-QY7CDW6P.mjs.map
3876
+ //# sourceMappingURL=chunk-QY7CDW6P.mjs.map