@jmp-technologies/analytics 0.1.37 → 0.1.39

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 (95) hide show
  1. package/README.md +1 -1
  2. package/dist/astro/client.cjs +144 -4
  3. package/dist/astro/client.cjs.map +1 -1
  4. package/dist/astro/client.d.cts +2 -2
  5. package/dist/astro/client.d.ts +2 -2
  6. package/dist/astro/client.js +2 -2
  7. package/dist/astro/content.cjs +190 -8
  8. package/dist/astro/content.cjs.map +1 -1
  9. package/dist/astro/content.d.cts +5 -4
  10. package/dist/astro/content.d.ts +5 -4
  11. package/dist/astro/content.js +5 -3
  12. package/dist/astro/integration.cjs +149 -6
  13. package/dist/astro/integration.cjs.map +1 -1
  14. package/dist/astro/integration.js +3 -3
  15. package/dist/astro/middleware.cjs +5 -2
  16. package/dist/astro/middleware.cjs.map +1 -1
  17. package/dist/astro/middleware.d.cts +2 -2
  18. package/dist/astro/middleware.d.ts +2 -2
  19. package/dist/astro/middleware.js +2 -2
  20. package/dist/astro/register.cjs +149 -6
  21. package/dist/astro/register.cjs.map +1 -1
  22. package/dist/astro/register.js +3 -3
  23. package/dist/{chunk-EMZXL6VF.js → chunk-6WQMWPEY.js} +6 -3
  24. package/dist/chunk-6WQMWPEY.js.map +1 -0
  25. package/dist/{chunk-D43AEUXU.js → chunk-BXPMVR7M.js} +3 -3
  26. package/dist/{chunk-TN6PGIB5.js → chunk-JJ3JP3RV.js} +2 -2
  27. package/dist/{chunk-UHXWHKHJ.js → chunk-M66PHSBO.js} +16 -3
  28. package/dist/chunk-M66PHSBO.js.map +1 -0
  29. package/dist/{chunk-VQF6QYLR.js → chunk-OCIOQIE4.js} +3 -3
  30. package/dist/{chunk-PTXPNIMF.js → chunk-ONIPLMOY.js} +2 -2
  31. package/dist/{chunk-RT2YYDCK.js → chunk-XAEWXWSP.js} +189 -8
  32. package/dist/chunk-XAEWXWSP.js.map +1 -0
  33. package/dist/constants-DTZMYgi4.d.cts +12 -0
  34. package/dist/constants-DTZMYgi4.d.ts +12 -0
  35. package/dist/{create-jmp-analytics-Bz0-K0Af.d.cts → create-jmp-analytics-C1IH32ZF.d.cts} +1 -1
  36. package/dist/{create-jmp-analytics-DRjrlWUn.d.ts → create-jmp-analytics-CjVYSmPJ.d.ts} +1 -1
  37. package/dist/index.cjs +196 -8
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.d.cts +11 -13
  40. package/dist/index.d.ts +11 -13
  41. package/dist/index.js +10 -2
  42. package/dist/next/content.cjs +195 -8
  43. package/dist/next/content.cjs.map +1 -1
  44. package/dist/next/content.d.cts +6 -4
  45. package/dist/next/content.d.ts +6 -4
  46. package/dist/next/content.js +11 -3
  47. package/dist/next/content.js.map +1 -1
  48. package/dist/next/instrumentation.cjs +149 -6
  49. package/dist/next/instrumentation.cjs.map +1 -1
  50. package/dist/next/instrumentation.js +2 -2
  51. package/dist/next/landing-pages.cjs +156 -7
  52. package/dist/next/landing-pages.cjs.map +1 -1
  53. package/dist/next/landing-pages.d.cts +2 -2
  54. package/dist/next/landing-pages.d.ts +2 -2
  55. package/dist/next/landing-pages.js +3 -3
  56. package/dist/next/locations.cjs +156 -7
  57. package/dist/next/locations.cjs.map +1 -1
  58. package/dist/next/locations.d.cts +2 -2
  59. package/dist/next/locations.d.ts +2 -2
  60. package/dist/next/locations.js +3 -3
  61. package/dist/next/middleware.cjs +5 -2
  62. package/dist/next/middleware.cjs.map +1 -1
  63. package/dist/next/middleware.d.cts +2 -2
  64. package/dist/next/middleware.d.ts +2 -2
  65. package/dist/next/middleware.js +2 -2
  66. package/dist/next/site-root-server.cjs +156 -7
  67. package/dist/next/site-root-server.cjs.map +1 -1
  68. package/dist/next/site-root-server.js +4 -4
  69. package/dist/next.cjs +144 -4
  70. package/dist/next.cjs.map +1 -1
  71. package/dist/next.d.cts +3 -3
  72. package/dist/next.d.ts +3 -3
  73. package/dist/next.js +4 -4
  74. package/dist/react.cjs +144 -4
  75. package/dist/react.cjs.map +1 -1
  76. package/dist/react.d.cts +2 -2
  77. package/dist/react.d.ts +2 -2
  78. package/dist/react.js +3 -3
  79. package/dist/{site-config-BxEmJxBB.d.ts → site-config-BEaYpZ3X.d.ts} +9 -3
  80. package/dist/{site-config-Cgq67uQ1.d.cts → site-config-BN6Z2zIf.d.cts} +9 -3
  81. package/dist/{track-page-view-74Su6lQY.d.ts → track-page-view-B3OwUOYl.d.ts} +1 -1
  82. package/dist/{track-page-view-BCX1Dsfk.d.cts → track-page-view-BeVjC-pV.d.cts} +1 -1
  83. package/dist/{types-yNgoakwk.d.ts → types-uwXEaMD6.d.cts} +45 -2
  84. package/dist/{types-yNgoakwk.d.cts → types-uwXEaMD6.d.ts} +45 -2
  85. package/dist/{utils-BLoWWfSw.d.ts → utils-6a6lNKsg.d.ts} +1 -1
  86. package/dist/{utils-UPTIdK1D.d.cts → utils-Cbb3CO3i.d.cts} +1 -1
  87. package/docs/legal-and-privacy.md +2 -2
  88. package/package.json +1 -1
  89. package/dist/chunk-EMZXL6VF.js.map +0 -1
  90. package/dist/chunk-RT2YYDCK.js.map +0 -1
  91. package/dist/chunk-UHXWHKHJ.js.map +0 -1
  92. /package/dist/{chunk-D43AEUXU.js.map → chunk-BXPMVR7M.js.map} +0 -0
  93. /package/dist/{chunk-TN6PGIB5.js.map → chunk-JJ3JP3RV.js.map} +0 -0
  94. /package/dist/{chunk-VQF6QYLR.js.map → chunk-OCIOQIE4.js.map} +0 -0
  95. /package/dist/{chunk-PTXPNIMF.js.map → chunk-ONIPLMOY.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,17 +1,11 @@
1
1
  export { b as buildLandingCaptureInlineScript } from './landing-capture-C8pyZWuF.cjs';
2
- import { J as JmpAnalytics } from './create-jmp-analytics-Bz0-K0Af.cjs';
3
- export { B as BOOKING_LINK_HOSTS, C as ClassifiedContactLink, b as ContactLinkChannel, c as classifyContactHref, d as createJmpAnalytics, i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-Bz0-K0Af.cjs';
4
- import { n as JmpContentConfig, s as TrackServerPageViewOptions, i as JmpTrustBundle, l as JmpContentWrapper, d as JmpLandingPageKind, b as JmpLandingPage, c as JmpLandingPageDetail, f as JmpPopularPagesResult, J as JmpBlogPost, t as JmpBlogPostDetail, u as JmpFaqItemDetail, a as JmpFaqItem, e as JmpLandingPageSitemapEntry, k as JmpWebsiteLocationDetail, j as JmpWebsiteLocation, g as JmpSiteProfile, p as JmpAnalyticsConfig } from './types-yNgoakwk.cjs';
5
- export { v as JmpContactExtraManifest, w as JmpContentLocaleAlternate, m as JmpContentManifest, x as JmpContentRouteManifest, y as JmpContentWrapperReportMode, z as JmpCredential, q as JmpEventType, A as JmpPartnerLogo, B as JmpPopularPage, o as JmpServerRequestLike, h as JmpTestimonial, C as JmpTrustBlockManifest, D as JmpTrustSection, E as JmpTrustStat, F as JmpTrustSummary, L as LeadMetadata, G as LeadMetadataValue, r as TrackLeadOptions, T as TrackPageViewOptions, H as normalizeJmpContentManifest, I as stableJmpManifestFingerprint } from './types-yNgoakwk.cjs';
2
+ import { J as JmpAnalytics } from './create-jmp-analytics-C1IH32ZF.cjs';
3
+ export { B as BOOKING_LINK_HOSTS, C as ClassifiedContactLink, b as ContactLinkChannel, c as classifyContactHref, d as createJmpAnalytics, i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-C1IH32ZF.cjs';
4
+ export { D as DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS, b as JMP_ANALYTICS_SDK_VERSION, J as JMP_CONTENT_CACHE_TAG, a as JMP_CONTENT_REVALIDATE_SECONDS, c as JMP_TRACKING_CONSENT_STORAGE_KEY } from './constants-DTZMYgi4.cjs';
5
+ import { n as JmpContentConfig, t as TrackServerPageViewOptions, j as JmpTrustBundle, m as JmpContentWrapper, d as JmpLandingPageKind, b as JmpLandingPage, c as JmpLandingPageDetail, g as JmpPopularPagesResult, J as JmpBlogPost, u as JmpBlogPostDetail, v as JmpFaqItemDetail, a as JmpFaqItem, e as JmpLandingPageSitemapEntry, f as JmpLegalDocument, l as JmpWebsiteLocationDetail, k as JmpWebsiteLocation, h as JmpSiteProfile, q as JmpAnalyticsConfig } from './types-uwXEaMD6.cjs';
6
+ export { w as JmpContactExtraManifest, x as JmpContentLocaleAlternate, o as JmpContentManifest, y as JmpContentRouteManifest, z as JmpContentWrapperReportMode, A as JmpCredential, r as JmpEventType, B as JmpPartnerLogo, C as JmpPopularPage, p as JmpServerRequestLike, i as JmpTestimonial, D as JmpTrustBlockManifest, E as JmpTrustSection, F as JmpTrustStat, G as JmpTrustSummary, L as LeadMetadata, H as LeadMetadataValue, s as TrackLeadOptions, T as TrackPageViewOptions, I as normalizeJmpContentManifest, K as stableJmpManifestFingerprint } from './types-uwXEaMD6.cjs';
6
7
  export { J as JmpPublicEnv, r as readJmpPublicEnvFromProcess } from './env-public-B6Y0DG68.cjs';
7
- export { a as JmpSiteContactFallback, b as JmpSiteDefinition, d as defineJmpSite, g as getJmpContentConfig, c as getJmpSiteDefinition } from './site-config-Cgq67uQ1.cjs';
8
-
9
- /** Published package version — sent with capabilities for admin readiness. */
10
- declare const JMP_ANALYTICS_SDK_VERSION: string;
11
- /** `localStorage` key when {@link JmpAnalyticsConfig.requireConsent} is enabled. */
12
- declare const JMP_TRACKING_CONSENT_STORAGE_KEY = "jmp_analytics_consent_v1";
13
- /** Default `pageViewDedupeMs` when resolving browser config from env (Strict Mode / SPA). */
14
- declare const DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS = 2500;
8
+ export { a as JmpSiteContactFallback, b as JmpSiteDefinition, d as defineJmpSite, g as getJmpContentConfig, c as getJmpSiteDefinition } from './site-config-BN6Z2zIf.cjs';
15
9
 
16
10
  declare function trackJmpServerPageView(config: JmpContentConfig, options?: TrackServerPageViewOptions): Promise<void>;
17
11
 
@@ -28,6 +22,8 @@ declare function getJmpBlogPostDetail(config: JmpContentConfig, slug: string, lo
28
22
  declare function getJmpFaqs(config: JmpContentConfig, filters?: {
29
23
  locale?: string;
30
24
  }): Promise<JmpFaqItem[]>;
25
+ declare function getJmpLegalDocument(config: JmpContentConfig, slug: string): Promise<JmpLegalDocument | null>;
26
+ declare function getJmpLegalDocuments(config: JmpContentConfig): Promise<JmpLegalDocument[]>;
31
27
  declare function getJmpFaqDetail(config: JmpContentConfig, slug: string, locale?: string): Promise<JmpFaqItemDetail | null>;
32
28
  declare function getJmpLandingPages(config: JmpContentConfig, filters?: {
33
29
  kind?: JmpLandingPageKind;
@@ -66,6 +62,8 @@ declare function createJmpContentClient(config: JmpContentConfig): {
66
62
  getFaqs: (filters?: {
67
63
  locale?: string;
68
64
  }) => Promise<JmpFaqItem[]>;
65
+ getLegalDocument: (slug: string) => Promise<JmpLegalDocument | null>;
66
+ getLegalDocuments: () => Promise<JmpLegalDocument[]>;
69
67
  getLandingPages: (filters?: Parameters<typeof getJmpLandingPages>[1]) => Promise<JmpLandingPage[]>;
70
68
  getLandingPageDetail: (kind: Parameters<typeof getJmpLandingPageDetail>[1], slug: string, locale?: string) => Promise<JmpLandingPageDetail | null>;
71
69
  getLandingPageSitemap: () => Promise<JmpLandingPageSitemapEntry[]>;
@@ -107,4 +105,4 @@ declare function getOrCreateJmpAnalyticsFromBrowserEnv(overrides?: Partial<JmpAn
107
105
  */
108
106
  declare function createJmpContentClientFromServerEnv(overrides?: Partial<JmpContentConfig>): JmpContentClient | null;
109
107
 
110
- export { DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS, JMP_ANALYTICS_SDK_VERSION, JMP_TRACKING_CONSENT_STORAGE_KEY, JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, createJmpContentClient, createJmpContentClientFromServerEnv, getDiscoveredContentWrappers, getJmpBlogPost, getJmpBlogPostDetail, getJmpBlogPosts, getJmpBrowserAnalyticsConfigFromEnv, getJmpFaqDetail, getJmpFaqs, getJmpLandingPageDetail, getJmpLandingPageSitemap, getJmpLandingPages, getJmpLocationDetail, getJmpLocations, getJmpPopularPages, getJmpRobotsTxt, getJmpServerContentConfigFromEnv, getJmpSiteProfile, getJmpTrustBundle, getOrCreateJmpAnalyticsFromBrowserEnv, inferTrustWrapperSlots, isJmpBrowserAnalyticsEnvConfigured, isJmpServerContentEnvConfigured, markContentWrapper, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
108
+ export { JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpLegalDocument, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, createJmpContentClient, createJmpContentClientFromServerEnv, getDiscoveredContentWrappers, getJmpBlogPost, getJmpBlogPostDetail, getJmpBlogPosts, getJmpBrowserAnalyticsConfigFromEnv, getJmpFaqDetail, getJmpFaqs, getJmpLandingPageDetail, getJmpLandingPageSitemap, getJmpLandingPages, getJmpLegalDocument, getJmpLegalDocuments, getJmpLocationDetail, getJmpLocations, getJmpPopularPages, getJmpRobotsTxt, getJmpServerContentConfigFromEnv, getJmpSiteProfile, getJmpTrustBundle, getOrCreateJmpAnalyticsFromBrowserEnv, inferTrustWrapperSlots, isJmpBrowserAnalyticsEnvConfigured, isJmpServerContentEnvConfigured, markContentWrapper, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
package/dist/index.d.ts CHANGED
@@ -1,17 +1,11 @@
1
1
  export { b as buildLandingCaptureInlineScript } from './landing-capture-C8pyZWuF.js';
2
- import { J as JmpAnalytics } from './create-jmp-analytics-DRjrlWUn.js';
3
- export { B as BOOKING_LINK_HOSTS, C as ClassifiedContactLink, b as ContactLinkChannel, c as classifyContactHref, d as createJmpAnalytics, i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-DRjrlWUn.js';
4
- import { n as JmpContentConfig, s as TrackServerPageViewOptions, i as JmpTrustBundle, l as JmpContentWrapper, d as JmpLandingPageKind, b as JmpLandingPage, c as JmpLandingPageDetail, f as JmpPopularPagesResult, J as JmpBlogPost, t as JmpBlogPostDetail, u as JmpFaqItemDetail, a as JmpFaqItem, e as JmpLandingPageSitemapEntry, k as JmpWebsiteLocationDetail, j as JmpWebsiteLocation, g as JmpSiteProfile, p as JmpAnalyticsConfig } from './types-yNgoakwk.js';
5
- export { v as JmpContactExtraManifest, w as JmpContentLocaleAlternate, m as JmpContentManifest, x as JmpContentRouteManifest, y as JmpContentWrapperReportMode, z as JmpCredential, q as JmpEventType, A as JmpPartnerLogo, B as JmpPopularPage, o as JmpServerRequestLike, h as JmpTestimonial, C as JmpTrustBlockManifest, D as JmpTrustSection, E as JmpTrustStat, F as JmpTrustSummary, L as LeadMetadata, G as LeadMetadataValue, r as TrackLeadOptions, T as TrackPageViewOptions, H as normalizeJmpContentManifest, I as stableJmpManifestFingerprint } from './types-yNgoakwk.js';
2
+ import { J as JmpAnalytics } from './create-jmp-analytics-CjVYSmPJ.js';
3
+ export { B as BOOKING_LINK_HOSTS, C as ClassifiedContactLink, b as ContactLinkChannel, c as classifyContactHref, d as createJmpAnalytics, i as isJmpTrackingConsentGranted, s as setJmpTrackingConsent, a as subscribeJmpTrackingConsent } from './create-jmp-analytics-CjVYSmPJ.js';
4
+ export { D as DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS, b as JMP_ANALYTICS_SDK_VERSION, J as JMP_CONTENT_CACHE_TAG, a as JMP_CONTENT_REVALIDATE_SECONDS, c as JMP_TRACKING_CONSENT_STORAGE_KEY } from './constants-DTZMYgi4.js';
5
+ import { n as JmpContentConfig, t as TrackServerPageViewOptions, j as JmpTrustBundle, m as JmpContentWrapper, d as JmpLandingPageKind, b as JmpLandingPage, c as JmpLandingPageDetail, g as JmpPopularPagesResult, J as JmpBlogPost, u as JmpBlogPostDetail, v as JmpFaqItemDetail, a as JmpFaqItem, e as JmpLandingPageSitemapEntry, f as JmpLegalDocument, l as JmpWebsiteLocationDetail, k as JmpWebsiteLocation, h as JmpSiteProfile, q as JmpAnalyticsConfig } from './types-uwXEaMD6.js';
6
+ export { w as JmpContactExtraManifest, x as JmpContentLocaleAlternate, o as JmpContentManifest, y as JmpContentRouteManifest, z as JmpContentWrapperReportMode, A as JmpCredential, r as JmpEventType, B as JmpPartnerLogo, C as JmpPopularPage, p as JmpServerRequestLike, i as JmpTestimonial, D as JmpTrustBlockManifest, E as JmpTrustSection, F as JmpTrustStat, G as JmpTrustSummary, L as LeadMetadata, H as LeadMetadataValue, s as TrackLeadOptions, T as TrackPageViewOptions, I as normalizeJmpContentManifest, K as stableJmpManifestFingerprint } from './types-uwXEaMD6.js';
6
7
  export { J as JmpPublicEnv, r as readJmpPublicEnvFromProcess } from './env-public-B6Y0DG68.js';
7
- export { a as JmpSiteContactFallback, b as JmpSiteDefinition, d as defineJmpSite, g as getJmpContentConfig, c as getJmpSiteDefinition } from './site-config-BxEmJxBB.js';
8
-
9
- /** Published package version — sent with capabilities for admin readiness. */
10
- declare const JMP_ANALYTICS_SDK_VERSION: string;
11
- /** `localStorage` key when {@link JmpAnalyticsConfig.requireConsent} is enabled. */
12
- declare const JMP_TRACKING_CONSENT_STORAGE_KEY = "jmp_analytics_consent_v1";
13
- /** Default `pageViewDedupeMs` when resolving browser config from env (Strict Mode / SPA). */
14
- declare const DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS = 2500;
8
+ export { a as JmpSiteContactFallback, b as JmpSiteDefinition, d as defineJmpSite, g as getJmpContentConfig, c as getJmpSiteDefinition } from './site-config-BEaYpZ3X.js';
15
9
 
16
10
  declare function trackJmpServerPageView(config: JmpContentConfig, options?: TrackServerPageViewOptions): Promise<void>;
17
11
 
@@ -28,6 +22,8 @@ declare function getJmpBlogPostDetail(config: JmpContentConfig, slug: string, lo
28
22
  declare function getJmpFaqs(config: JmpContentConfig, filters?: {
29
23
  locale?: string;
30
24
  }): Promise<JmpFaqItem[]>;
25
+ declare function getJmpLegalDocument(config: JmpContentConfig, slug: string): Promise<JmpLegalDocument | null>;
26
+ declare function getJmpLegalDocuments(config: JmpContentConfig): Promise<JmpLegalDocument[]>;
31
27
  declare function getJmpFaqDetail(config: JmpContentConfig, slug: string, locale?: string): Promise<JmpFaqItemDetail | null>;
32
28
  declare function getJmpLandingPages(config: JmpContentConfig, filters?: {
33
29
  kind?: JmpLandingPageKind;
@@ -66,6 +62,8 @@ declare function createJmpContentClient(config: JmpContentConfig): {
66
62
  getFaqs: (filters?: {
67
63
  locale?: string;
68
64
  }) => Promise<JmpFaqItem[]>;
65
+ getLegalDocument: (slug: string) => Promise<JmpLegalDocument | null>;
66
+ getLegalDocuments: () => Promise<JmpLegalDocument[]>;
69
67
  getLandingPages: (filters?: Parameters<typeof getJmpLandingPages>[1]) => Promise<JmpLandingPage[]>;
70
68
  getLandingPageDetail: (kind: Parameters<typeof getJmpLandingPageDetail>[1], slug: string, locale?: string) => Promise<JmpLandingPageDetail | null>;
71
69
  getLandingPageSitemap: () => Promise<JmpLandingPageSitemapEntry[]>;
@@ -107,4 +105,4 @@ declare function getOrCreateJmpAnalyticsFromBrowserEnv(overrides?: Partial<JmpAn
107
105
  */
108
106
  declare function createJmpContentClientFromServerEnv(overrides?: Partial<JmpContentConfig>): JmpContentClient | null;
109
107
 
110
- export { DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS, JMP_ANALYTICS_SDK_VERSION, JMP_TRACKING_CONSENT_STORAGE_KEY, JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, createJmpContentClient, createJmpContentClientFromServerEnv, getDiscoveredContentWrappers, getJmpBlogPost, getJmpBlogPostDetail, getJmpBlogPosts, getJmpBrowserAnalyticsConfigFromEnv, getJmpFaqDetail, getJmpFaqs, getJmpLandingPageDetail, getJmpLandingPageSitemap, getJmpLandingPages, getJmpLocationDetail, getJmpLocations, getJmpPopularPages, getJmpRobotsTxt, getJmpServerContentConfigFromEnv, getJmpSiteProfile, getJmpTrustBundle, getOrCreateJmpAnalyticsFromBrowserEnv, inferTrustWrapperSlots, isJmpBrowserAnalyticsEnvConfigured, isJmpServerContentEnvConfigured, markContentWrapper, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
108
+ export { JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpLegalDocument, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, createJmpContentClient, createJmpContentClientFromServerEnv, getDiscoveredContentWrappers, getJmpBlogPost, getJmpBlogPostDetail, getJmpBlogPosts, getJmpBrowserAnalyticsConfigFromEnv, getJmpFaqDetail, getJmpFaqs, getJmpLandingPageDetail, getJmpLandingPageSitemap, getJmpLandingPages, getJmpLegalDocument, getJmpLegalDocuments, getJmpLocationDetail, getJmpLocations, getJmpPopularPages, getJmpRobotsTxt, getJmpServerContentConfigFromEnv, getJmpSiteProfile, getJmpTrustBundle, getOrCreateJmpAnalyticsFromBrowserEnv, inferTrustWrapperSlots, isJmpBrowserAnalyticsEnvConfigured, isJmpServerContentEnvConfigured, markContentWrapper, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
package/dist/index.js CHANGED
@@ -2,6 +2,8 @@ import {
2
2
  BOOKING_LINK_HOSTS,
3
3
  DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS,
4
4
  JMP_ANALYTICS_SDK_VERSION,
5
+ JMP_CONTENT_CACHE_TAG,
6
+ JMP_CONTENT_REVALIDATE_SECONDS,
5
7
  JMP_TRACKING_CONSENT_STORAGE_KEY,
6
8
  classifyContactHref,
7
9
  createJmpAnalytics,
@@ -17,6 +19,8 @@ import {
17
19
  getJmpLandingPageDetail,
18
20
  getJmpLandingPageSitemap,
19
21
  getJmpLandingPages,
22
+ getJmpLegalDocument,
23
+ getJmpLegalDocuments,
20
24
  getJmpLocationDetail,
21
25
  getJmpLocations,
22
26
  getJmpPopularPages,
@@ -36,7 +40,7 @@ import {
36
40
  setJmpTrackingConsent,
37
41
  stableJmpManifestFingerprint,
38
42
  subscribeJmpTrackingConsent
39
- } from "./chunk-RT2YYDCK.js";
43
+ } from "./chunk-XAEWXWSP.js";
40
44
  import {
41
45
  buildLandingCaptureInlineScript
42
46
  } from "./chunk-TCZ6TC2L.js";
@@ -46,11 +50,13 @@ import {
46
50
  getJmpSiteDefinition,
47
51
  readJmpPublicEnvFromProcess,
48
52
  trackJmpServerPageView
49
- } from "./chunk-EMZXL6VF.js";
53
+ } from "./chunk-6WQMWPEY.js";
50
54
  export {
51
55
  BOOKING_LINK_HOSTS,
52
56
  DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS,
53
57
  JMP_ANALYTICS_SDK_VERSION,
58
+ JMP_CONTENT_CACHE_TAG,
59
+ JMP_CONTENT_REVALIDATE_SECONDS,
54
60
  JMP_TRACKING_CONSENT_STORAGE_KEY,
55
61
  buildLandingCaptureInlineScript,
56
62
  classifyContactHref,
@@ -69,6 +75,8 @@ export {
69
75
  getJmpLandingPageDetail,
70
76
  getJmpLandingPageSitemap,
71
77
  getJmpLandingPages,
78
+ getJmpLegalDocument,
79
+ getJmpLegalDocuments,
72
80
  getJmpLocationDetail,
73
81
  getJmpLocations,
74
82
  getJmpPopularPages,
@@ -20,6 +20,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/next/content.ts
21
21
  var content_exports = {};
22
22
  __export(content_exports, {
23
+ JMP_CONTENT_CACHE_TAG: () => JMP_CONTENT_CACHE_TAG,
24
+ JMP_CONTENT_REVALIDATE_SECONDS: () => JMP_CONTENT_REVALIDATE_SECONDS,
23
25
  absoluteSiteAssetUrl: () => absoluteSiteAssetUrl2,
24
26
  filterFeaturedTrustQuotes: () => filterFeaturedTrustQuotes2,
25
27
  getJmpContentConfig: () => getJmpContentConfig,
@@ -32,6 +34,7 @@ __export(content_exports, {
32
34
  loadLandingPageDetail: () => loadLandingPageDetail2,
33
35
  loadLandingPageSitemap: () => loadLandingPageSitemap2,
34
36
  loadLandingPages: () => loadLandingPages2,
37
+ loadLegalDocument: () => loadLegalDocument2,
35
38
  loadLocationDetail: () => loadLocationDetail2,
36
39
  loadLocations: () => loadLocations2,
37
40
  loadPopularPages: () => loadPopularPages2,
@@ -46,10 +49,12 @@ var import_react = require("react");
46
49
  var LANDING_REFERER_COOKIE_MAX_AGE_SEC = 30 * 60;
47
50
 
48
51
  // package.json
49
- var version = "0.1.37";
52
+ var version = "0.1.39";
50
53
 
51
54
  // src/constants.ts
52
55
  var JMP_ANALYTICS_SDK_VERSION = version;
56
+ var JMP_CONTENT_CACHE_TAG = "jmp-content";
57
+ var JMP_CONTENT_REVALIDATE_SECONDS = 3600;
53
58
 
54
59
  // src/http.ts
55
60
  function responseLooksLikeHtml(body) {
@@ -116,11 +121,14 @@ function getJmpContentConfig() {
116
121
  return null;
117
122
  }
118
123
  const site = getJmpSiteDefinition();
124
+ const contentWrappers = site?.contentWrappers ?? void 0;
125
+ const inferredMode = contentWrappers && contentWrappers.length > 0 ? "manual" : void 0;
119
126
  return {
120
127
  baseUrl: analyticsUrl,
121
128
  trackingKey,
122
- contentWrappers: site?.contentWrappers ?? void 0,
123
- contentManifest: site?.contentManifest ?? void 0
129
+ contentWrappers,
130
+ contentManifest: site?.contentManifest ?? void 0,
131
+ contentWrapperMode: site?.contentWrapperMode ?? inferredMode
124
132
  };
125
133
  }
126
134
 
@@ -243,7 +251,8 @@ function normalizeJmpContentManifest(input) {
243
251
  const externalSources = normalizeExternalSources(input.externalSources);
244
252
  const trust = normalizeTrust(input.trust);
245
253
  const contact = normalizeContact(input.contact);
246
- if (routes.length === 0 && !externalSources && !trust && !contact) {
254
+ const defaults = normalizeManifestDefaults(input.defaults);
255
+ if (routes.length === 0 && !externalSources && !trust && !contact && !defaults) {
247
256
  return null;
248
257
  }
249
258
  return {
@@ -251,7 +260,8 @@ function normalizeJmpContentManifest(input) {
251
260
  ...routes.length > 0 ? { routes } : {},
252
261
  ...externalSources ? { externalSources } : {},
253
262
  ...trust ? { trust } : {},
254
- ...contact ? { contact } : {}
263
+ ...contact ? { contact } : {},
264
+ ...defaults ? { defaults } : {}
255
265
  };
256
266
  }
257
267
  function normalizeRoutes(routes) {
@@ -315,6 +325,85 @@ function normalizeTrustLabels(labels) {
315
325
  }
316
326
  return Object.keys(out).length > 0 ? out : null;
317
327
  }
328
+ function readDefaultText(value, max = 500) {
329
+ if (typeof value !== "string") return void 0;
330
+ const trimmed = value.trim();
331
+ if (!trimmed) return void 0;
332
+ return trimmed.slice(0, max);
333
+ }
334
+ function normalizeManifestDefaults(defaults) {
335
+ if (!defaults || typeof defaults !== "object") return null;
336
+ const contactRaw = defaults.contact;
337
+ const contact = {};
338
+ if (contactRaw && typeof contactRaw === "object") {
339
+ const displayName = readDefaultText(contactRaw.displayName, 120);
340
+ const email = readDefaultText(contactRaw.email, 200);
341
+ const phone = readDefaultText(contactRaw.phone, 40);
342
+ const address = readDefaultText(contactRaw.address, 400);
343
+ const hours = readDefaultText(contactRaw.hours, 400);
344
+ const serviceArea = readDefaultText(contactRaw.serviceArea, 200);
345
+ const googleMapsUrl = readDefaultText(contactRaw.googleMapsUrl, 2048);
346
+ const linkedinUrl = readDefaultText(contactRaw.linkedinUrl, 2048);
347
+ const instagramUrl = readDefaultText(contactRaw.instagramUrl, 2048);
348
+ const facebookUrl = readDefaultText(contactRaw.facebookUrl, 2048);
349
+ const xUrl = readDefaultText(contactRaw.xUrl, 2048);
350
+ const youtubeUrl = readDefaultText(contactRaw.youtubeUrl, 2048);
351
+ if (displayName) contact.displayName = displayName;
352
+ if (email) contact.email = email;
353
+ if (phone) contact.phone = phone;
354
+ if (address) contact.address = address;
355
+ if (hours) contact.hours = hours;
356
+ if (serviceArea) contact.serviceArea = serviceArea;
357
+ if (googleMapsUrl) contact.googleMapsUrl = googleMapsUrl;
358
+ if (linkedinUrl) contact.linkedinUrl = linkedinUrl;
359
+ if (instagramUrl) contact.instagramUrl = instagramUrl;
360
+ if (facebookUrl) contact.facebookUrl = facebookUrl;
361
+ if (xUrl) contact.xUrl = xUrl;
362
+ if (youtubeUrl) contact.youtubeUrl = youtubeUrl;
363
+ if (contactRaw.extras && typeof contactRaw.extras === "object") {
364
+ const extras = {};
365
+ for (const [rawKey, rawValue] of Object.entries(contactRaw.extras)) {
366
+ if (Object.keys(extras).length >= 10) break;
367
+ const key = normalizeKey(rawKey);
368
+ const value = readDefaultText(rawValue, 200);
369
+ if (key && isValidExtraKey(key) && value) extras[key] = value;
370
+ }
371
+ if (Object.keys(extras).length > 0) contact.extras = extras;
372
+ }
373
+ }
374
+ const faq = [];
375
+ if (Array.isArray(defaults.faq)) {
376
+ for (const raw of defaults.faq) {
377
+ if (!raw || typeof raw !== "object" || faq.length >= 40) continue;
378
+ const question = readDefaultText(raw.question, 300);
379
+ const answer = readDefaultText(raw.answer, 8e3);
380
+ if (!question || !answer) continue;
381
+ const category = readDefaultText(raw.category, 80);
382
+ faq.push({ question, answer, ...category ? { category } : {} });
383
+ }
384
+ }
385
+ const trustRaw = defaults.trust;
386
+ const trust = {};
387
+ if (trustRaw && typeof trustRaw === "object") {
388
+ const assign = (key, max) => {
389
+ const value = readDefaultText(trustRaw[key], max);
390
+ if (value) trust[key] = value;
391
+ };
392
+ assign("googleReviewsUrl", 2048);
393
+ assign("googlePlaceId", 128);
394
+ assign("yelpUrl", 2048);
395
+ assign("trustpilotUrl", 2048);
396
+ assign("disclaimer", 1e3);
397
+ }
398
+ const hasContact = Object.keys(contact).length > 0;
399
+ const hasTrust = Object.keys(trust).length > 0;
400
+ if (!hasContact && faq.length === 0 && !hasTrust) return null;
401
+ return {
402
+ ...hasContact ? { contact } : {},
403
+ ...faq.length > 0 ? { faq } : {},
404
+ ...hasTrust ? { trust } : {}
405
+ };
406
+ }
318
407
  function normalizeContact(contact) {
319
408
  if (!contact || typeof contact !== "object") return null;
320
409
  const extras = normalizeContactExtras(contact.extras);
@@ -382,7 +471,11 @@ async function getContentText(config, path) {
382
471
  }
383
472
  const res = await resolvedFetch(url, {
384
473
  method: "GET",
385
- headers: jmpContentRequestHeaders(config)
474
+ headers: jmpContentRequestHeaders(config),
475
+ next: {
476
+ revalidate: JMP_CONTENT_REVALIDATE_SECONDS,
477
+ tags: [JMP_CONTENT_CACHE_TAG]
478
+ }
386
479
  });
387
480
  const text = await res.text();
388
481
  if (!res.ok) {
@@ -409,6 +502,7 @@ var WRAPPER_SLOT_ORDER = [
409
502
  "blog",
410
503
  "faq",
411
504
  "contact",
505
+ "legal",
412
506
  "trust",
413
507
  "trust.summary",
414
508
  "trust.testimonials",
@@ -435,7 +529,7 @@ function markTrustBundleWrappers(bundle) {
435
529
  }
436
530
  }
437
531
  function inferTrustWrapperSlots(bundle) {
438
- const slots = /* @__PURE__ */ new Set(["trust"]);
532
+ const slots = /* @__PURE__ */ new Set();
439
533
  const { summary, testimonials, stats, logos, credentials } = bundle;
440
534
  const hasSummary = summary.google_rating != null || summary.google_review_count != null || Boolean(summary.google_reviews_url?.trim()) || Boolean(summary.yelp_url?.trim()) || Boolean(summary.trustpilot_url?.trim()) || Boolean(summary.disclaimer?.trim());
441
535
  if (hasSummary) {
@@ -472,7 +566,65 @@ function getDiscoveredContentWrappers() {
472
566
  return sortWrapperSlots([...discovered]);
473
567
  }
474
568
  function resolveContentManifestForReport(config) {
475
- return normalizeJmpContentManifest(config.contentManifest);
569
+ const site = getJmpSiteDefinition();
570
+ const fallback = site?.contactFallback;
571
+ const existing = config.contentManifest;
572
+ const fromFallback = fallbackToManifestDefaults(fallback);
573
+ if (!existing && !fromFallback) {
574
+ return null;
575
+ }
576
+ const merged = {
577
+ ...existing ?? {},
578
+ defaults: {
579
+ ...fromFallback ?? {},
580
+ ...existing?.defaults ?? {},
581
+ contact: {
582
+ ...fromFallback?.contact ?? {},
583
+ ...existing?.defaults?.contact ?? {},
584
+ extras: {
585
+ ...fromFallback?.contact?.extras ?? {},
586
+ ...existing?.defaults?.contact?.extras ?? {}
587
+ }
588
+ },
589
+ trust: {
590
+ ...fromFallback?.trust ?? {},
591
+ ...existing?.defaults?.trust ?? {}
592
+ },
593
+ faq: existing?.defaults?.faq?.length ? existing.defaults.faq : fromFallback?.faq
594
+ }
595
+ };
596
+ return normalizeJmpContentManifest(merged);
597
+ }
598
+ function fallbackToManifestDefaults(fallback) {
599
+ if (!fallback) return null;
600
+ const contact = {};
601
+ if (fallback.displayName?.trim()) contact.displayName = fallback.displayName.trim();
602
+ if (fallback.email?.trim()) contact.email = fallback.email.trim();
603
+ if (typeof fallback.phone === "string" && fallback.phone.trim()) {
604
+ contact.phone = fallback.phone.trim();
605
+ }
606
+ if (fallback.address?.trim()) contact.address = fallback.address.trim();
607
+ if (fallback.hours?.trim()) contact.hours = fallback.hours.trim();
608
+ if (fallback.serviceArea?.trim()) contact.serviceArea = fallback.serviceArea.trim();
609
+ if (fallback.googleMapsUrl?.trim()) {
610
+ contact.googleMapsUrl = fallback.googleMapsUrl.trim();
611
+ }
612
+ if (fallback.linkedin?.trim()) contact.linkedinUrl = fallback.linkedin.trim();
613
+ if (fallback.instagram?.trim()) contact.instagramUrl = fallback.instagram.trim();
614
+ if (fallback.facebook?.trim()) contact.facebookUrl = fallback.facebook.trim();
615
+ if (fallback.x?.trim()) contact.xUrl = fallback.x.trim();
616
+ if (fallback.youtube?.trim()) contact.youtubeUrl = fallback.youtube.trim();
617
+ const trust = {};
618
+ if (fallback.googleMapsUrl?.trim()) {
619
+ trust.googleReviewsUrl = fallback.googleMapsUrl.trim();
620
+ }
621
+ const hasContact = Object.keys(contact).length > 0;
622
+ const hasTrust = Object.keys(trust).length > 0;
623
+ if (!hasContact && !hasTrust) return null;
624
+ return {
625
+ ...hasContact ? { contact } : {},
626
+ ...hasTrust ? { trust } : {}
627
+ };
476
628
  }
477
629
  function resolveContentWrappersForReport(config) {
478
630
  const explicit = config.contentWrappers ?? [];
@@ -582,6 +734,26 @@ async function getJmpFaqs(config, filters) {
582
734
  afterContentWrapperUse(config);
583
735
  return data.faqs;
584
736
  }
737
+ async function getJmpLegalDocument(config, slug) {
738
+ const key = slug.trim().toLowerCase();
739
+ if (!key) {
740
+ return null;
741
+ }
742
+ try {
743
+ const data = await getContent(
744
+ config,
745
+ `/api/content/legal?slug=${encodeURIComponent(key)}`
746
+ );
747
+ markContentWrapper("legal");
748
+ afterContentWrapperUse(config);
749
+ return data.document;
750
+ } catch (error) {
751
+ if (error instanceof Error && error.message.includes("HTTP 404")) {
752
+ return null;
753
+ }
754
+ throw error;
755
+ }
756
+ }
585
757
  async function getJmpLandingPages(config, filters) {
586
758
  const params = new URLSearchParams();
587
759
  if (filters?.kind) {
@@ -883,6 +1055,17 @@ async function loadFaqs(locale) {
883
1055
  return [];
884
1056
  }
885
1057
  }
1058
+ async function loadLegalDocument(slug) {
1059
+ const c = getJmpContentConfig();
1060
+ if (!c) {
1061
+ return null;
1062
+ }
1063
+ try {
1064
+ return await getJmpLegalDocument(c, slug);
1065
+ } catch {
1066
+ return null;
1067
+ }
1068
+ }
886
1069
  async function loadFaqBySlug(slug, locale) {
887
1070
  const normalized = slug.trim();
888
1071
  if (!normalized) {
@@ -990,6 +1173,7 @@ var getResolvedSiteContact2 = (0, import_react.cache)(getResolvedSiteContact);
990
1173
  var loadBlogPosts2 = (0, import_react.cache)(loadBlogPosts);
991
1174
  var loadBlogPost2 = (0, import_react.cache)(loadBlogPost);
992
1175
  var loadFaqs2 = (0, import_react.cache)(loadFaqs);
1176
+ var loadLegalDocument2 = (0, import_react.cache)(loadLegalDocument);
993
1177
  var loadFaqBySlug2 = loadFaqBySlug;
994
1178
  var loadLandingPages2 = (0, import_react.cache)(loadLandingPages);
995
1179
  var loadLandingPageDetail2 = loadLandingPageDetail;
@@ -1000,6 +1184,8 @@ var loadTrustBundle2 = (0, import_react.cache)(loadTrustBundle);
1000
1184
  var loadPopularPages2 = (0, import_react.cache)(loadPopularPages);
1001
1185
  // Annotate the CommonJS export names for ESM import in node:
1002
1186
  0 && (module.exports = {
1187
+ JMP_CONTENT_CACHE_TAG,
1188
+ JMP_CONTENT_REVALIDATE_SECONDS,
1003
1189
  absoluteSiteAssetUrl,
1004
1190
  filterFeaturedTrustQuotes,
1005
1191
  getJmpContentConfig,
@@ -1012,6 +1198,7 @@ var loadPopularPages2 = (0, import_react.cache)(loadPopularPages);
1012
1198
  loadLandingPageDetail,
1013
1199
  loadLandingPageSitemap,
1014
1200
  loadLandingPages,
1201
+ loadLegalDocument,
1015
1202
  loadLocationDetail,
1016
1203
  loadLocations,
1017
1204
  loadPopularPages,