@jmp-technologies/analytics 0.1.38 → 0.1.40

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 (89) hide show
  1. package/README.md +6 -2
  2. package/ai-crawler-agents.json +63 -0
  3. package/dist/astro/client.cjs +257 -6
  4. package/dist/astro/client.cjs.map +1 -1
  5. package/dist/astro/client.d.cts +2 -2
  6. package/dist/astro/client.d.ts +2 -2
  7. package/dist/astro/client.js +1 -1
  8. package/dist/astro/content.cjs +264 -7
  9. package/dist/astro/content.cjs.map +1 -1
  10. package/dist/astro/content.d.cts +3 -3
  11. package/dist/astro/content.d.ts +3 -3
  12. package/dist/astro/content.js +2 -2
  13. package/dist/astro/integration.cjs +257 -6
  14. package/dist/astro/integration.cjs.map +1 -1
  15. package/dist/astro/integration.js +2 -2
  16. package/dist/astro/middleware.d.cts +2 -2
  17. package/dist/astro/middleware.d.ts +2 -2
  18. package/dist/astro/register.cjs +257 -6
  19. package/dist/astro/register.cjs.map +1 -1
  20. package/dist/astro/register.js +2 -2
  21. package/dist/{chunk-WHUHCTBQ.js → chunk-34LFIP3R.js} +2 -2
  22. package/dist/{chunk-NCF3J4HV.js → chunk-BRLCGVFJ.js} +2 -2
  23. package/dist/{chunk-PQOTEV6O.js → chunk-IY6Y636W.js} +2 -2
  24. package/dist/{chunk-EBU4DKHW.js → chunk-JC3G4XNR.js} +333 -8
  25. package/dist/chunk-JC3G4XNR.js.map +1 -0
  26. package/dist/{chunk-JVFN7MF2.js → chunk-VSZRQSUN.js} +2 -2
  27. package/dist/constants-DTZMYgi4.d.cts +12 -0
  28. package/dist/constants-DTZMYgi4.d.ts +12 -0
  29. package/dist/{create-jmp-analytics-DMSXmVIH.d.cts → create-jmp-analytics-B7VqQJca.d.cts} +1 -1
  30. package/dist/{create-jmp-analytics-JZ3pqNBQ.d.ts → create-jmp-analytics-BGt16QGY.d.ts} +1 -1
  31. package/dist/index.cjs +340 -7
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +31 -13
  34. package/dist/index.d.ts +31 -13
  35. package/dist/index.js +17 -1
  36. package/dist/next/content.cjs +268 -7
  37. package/dist/next/content.cjs.map +1 -1
  38. package/dist/next/content.d.cts +3 -2
  39. package/dist/next/content.d.ts +3 -2
  40. package/dist/next/content.js +7 -2
  41. package/dist/next/content.js.map +1 -1
  42. package/dist/next/instrumentation.cjs +257 -6
  43. package/dist/next/instrumentation.cjs.map +1 -1
  44. package/dist/next/instrumentation.js +1 -1
  45. package/dist/next/landing-pages.cjs +264 -7
  46. package/dist/next/landing-pages.cjs.map +1 -1
  47. package/dist/next/landing-pages.d.cts +2 -2
  48. package/dist/next/landing-pages.d.ts +2 -2
  49. package/dist/next/landing-pages.js +2 -2
  50. package/dist/next/locations.cjs +265 -8
  51. package/dist/next/locations.cjs.map +1 -1
  52. package/dist/next/locations.d.cts +3 -3
  53. package/dist/next/locations.d.ts +3 -3
  54. package/dist/next/locations.js +3 -3
  55. package/dist/next/locations.js.map +1 -1
  56. package/dist/next/middleware.cjs.map +1 -1
  57. package/dist/next/middleware.d.cts +2 -2
  58. package/dist/next/middleware.d.ts +2 -2
  59. package/dist/next/middleware.js.map +1 -1
  60. package/dist/next/site-root-server.cjs +264 -7
  61. package/dist/next/site-root-server.cjs.map +1 -1
  62. package/dist/next/site-root-server.d.cts +1 -1
  63. package/dist/next/site-root-server.d.ts +1 -1
  64. package/dist/next/site-root-server.js +3 -3
  65. package/dist/next/site-root-server.js.map +1 -1
  66. package/dist/next.cjs +257 -6
  67. package/dist/next.cjs.map +1 -1
  68. package/dist/next.d.cts +3 -3
  69. package/dist/next.d.ts +3 -3
  70. package/dist/next.js +3 -3
  71. package/dist/react.cjs +257 -6
  72. package/dist/react.cjs.map +1 -1
  73. package/dist/react.d.cts +2 -2
  74. package/dist/react.d.ts +2 -2
  75. package/dist/react.js +2 -2
  76. package/dist/{site-config-BZJS8Hp_.d.cts → site-config-CZl4PIbg.d.cts} +1 -1
  77. package/dist/{site-config-BLnwuRC2.d.ts → site-config-Cq5K8hUp.d.ts} +1 -1
  78. package/dist/{track-page-view-DGKRUIxm.d.ts → track-page-view-BSlE0yI9.d.ts} +1 -1
  79. package/dist/{track-page-view-BJQqn2Bg.d.cts → track-page-view-M9y_5WqT.d.cts} +1 -1
  80. package/dist/{types-CYrgEwUF.d.ts → types-DH_8sBu9.d.cts} +35 -0
  81. package/dist/{types-CYrgEwUF.d.cts → types-DH_8sBu9.d.ts} +35 -0
  82. package/dist/{utils-B1Nt3sBU.d.ts → utils-C2JRomti.d.ts} +1 -1
  83. package/dist/{utils-U6TGMIAB.d.cts → utils-JfjoqC-z.d.cts} +1 -1
  84. package/package.json +2 -1
  85. package/dist/chunk-EBU4DKHW.js.map +0 -1
  86. /package/dist/{chunk-WHUHCTBQ.js.map → chunk-34LFIP3R.js.map} +0 -0
  87. /package/dist/{chunk-NCF3J4HV.js.map → chunk-BRLCGVFJ.js.map} +0 -0
  88. /package/dist/{chunk-PQOTEV6O.js.map → chunk-IY6Y636W.js.map} +0 -0
  89. /package/dist/{chunk-JVFN7MF2.js.map → chunk-VSZRQSUN.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-DMSXmVIH.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-DMSXmVIH.cjs';
4
- 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-CYrgEwUF.cjs';
5
- 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-CYrgEwUF.cjs';
2
+ import { J as JmpAnalytics } from './create-jmp-analytics-B7VqQJca.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-B7VqQJca.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-DH_8sBu9.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-DH_8sBu9.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-BZJS8Hp_.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-CZl4PIbg.cjs';
15
9
 
16
10
  declare function trackJmpServerPageView(config: JmpContentConfig, options?: TrackServerPageViewOptions): Promise<void>;
17
11
 
@@ -60,6 +54,30 @@ declare function registerJmpContentWrappers(config: JmpContentConfig): Promise<{
60
54
  skipped: true;
61
55
  }>;
62
56
 
57
+ declare const AI_CRAWLER_ROBOTS_USER_AGENTS: string[];
58
+ /** UA tokens denied at the Vercel WAF. Omits generic Applebot so Apple Search can still crawl. */
59
+ declare const JMP_AI_CRAWLER_WAF_USER_AGENTS: string[];
60
+ declare function buildAiCrawlerRobotsTxt(blockAiCrawlers: boolean): string;
61
+ declare function jmpAiCrawlerWafUserAgentPattern(): string;
62
+ /** `vercel.json` mitigate route. Safe for Googlebot / generic Applebot. */
63
+ declare function jmpAiCrawlerVercelWafRoute(): {
64
+ src: string;
65
+ has: Array<{
66
+ type: "header";
67
+ key: string;
68
+ value: string;
69
+ }>;
70
+ mitigate: {
71
+ action: "deny";
72
+ };
73
+ };
74
+ declare function mergeJmpRobotsTxt(jmpBody: string, options: {
75
+ siteUrl: string;
76
+ privatePathPrefixes?: readonly string[];
77
+ /** When true, always include AI Disallow rules even if JMP left blocking off. */
78
+ ensureAiCrawlerDisallows?: boolean;
79
+ }): string;
80
+
63
81
  declare function createJmpContentClient(config: JmpContentConfig): {
64
82
  getBlogPosts: (filters?: {
65
83
  locale?: string;
@@ -111,4 +129,4 @@ declare function getOrCreateJmpAnalyticsFromBrowserEnv(overrides?: Partial<JmpAn
111
129
  */
112
130
  declare function createJmpContentClientFromServerEnv(overrides?: Partial<JmpContentConfig>): JmpContentClient | null;
113
131
 
114
- 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, 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 };
132
+ export { AI_CRAWLER_ROBOTS_USER_AGENTS, JMP_AI_CRAWLER_WAF_USER_AGENTS, JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpLegalDocument, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, buildAiCrawlerRobotsTxt, 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, jmpAiCrawlerVercelWafRoute, jmpAiCrawlerWafUserAgentPattern, markContentWrapper, mergeJmpRobotsTxt, 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-JZ3pqNBQ.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-JZ3pqNBQ.js';
4
- 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-CYrgEwUF.js';
5
- 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-CYrgEwUF.js';
2
+ import { J as JmpAnalytics } from './create-jmp-analytics-BGt16QGY.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-BGt16QGY.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-DH_8sBu9.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-DH_8sBu9.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-BLnwuRC2.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-Cq5K8hUp.js';
15
9
 
16
10
  declare function trackJmpServerPageView(config: JmpContentConfig, options?: TrackServerPageViewOptions): Promise<void>;
17
11
 
@@ -60,6 +54,30 @@ declare function registerJmpContentWrappers(config: JmpContentConfig): Promise<{
60
54
  skipped: true;
61
55
  }>;
62
56
 
57
+ declare const AI_CRAWLER_ROBOTS_USER_AGENTS: string[];
58
+ /** UA tokens denied at the Vercel WAF. Omits generic Applebot so Apple Search can still crawl. */
59
+ declare const JMP_AI_CRAWLER_WAF_USER_AGENTS: string[];
60
+ declare function buildAiCrawlerRobotsTxt(blockAiCrawlers: boolean): string;
61
+ declare function jmpAiCrawlerWafUserAgentPattern(): string;
62
+ /** `vercel.json` mitigate route. Safe for Googlebot / generic Applebot. */
63
+ declare function jmpAiCrawlerVercelWafRoute(): {
64
+ src: string;
65
+ has: Array<{
66
+ type: "header";
67
+ key: string;
68
+ value: string;
69
+ }>;
70
+ mitigate: {
71
+ action: "deny";
72
+ };
73
+ };
74
+ declare function mergeJmpRobotsTxt(jmpBody: string, options: {
75
+ siteUrl: string;
76
+ privatePathPrefixes?: readonly string[];
77
+ /** When true, always include AI Disallow rules even if JMP left blocking off. */
78
+ ensureAiCrawlerDisallows?: boolean;
79
+ }): string;
80
+
63
81
  declare function createJmpContentClient(config: JmpContentConfig): {
64
82
  getBlogPosts: (filters?: {
65
83
  locale?: string;
@@ -111,4 +129,4 @@ declare function getOrCreateJmpAnalyticsFromBrowserEnv(overrides?: Partial<JmpAn
111
129
  */
112
130
  declare function createJmpContentClientFromServerEnv(overrides?: Partial<JmpContentConfig>): JmpContentClient | null;
113
131
 
114
- 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, 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 };
132
+ export { AI_CRAWLER_ROBOTS_USER_AGENTS, JMP_AI_CRAWLER_WAF_USER_AGENTS, JmpAnalytics, JmpAnalyticsConfig, JmpBlogPost, JmpBlogPostDetail, type JmpContentClient, JmpContentConfig, JmpContentWrapper, JmpFaqItem, JmpFaqItemDetail, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpLegalDocument, JmpPopularPagesResult, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, buildAiCrawlerRobotsTxt, 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, jmpAiCrawlerVercelWafRoute, jmpAiCrawlerWafUserAgentPattern, markContentWrapper, mergeJmpRobotsTxt, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
package/dist/index.js CHANGED
@@ -1,8 +1,13 @@
1
1
  import {
2
+ AI_CRAWLER_ROBOTS_USER_AGENTS,
2
3
  BOOKING_LINK_HOSTS,
3
4
  DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS,
5
+ JMP_AI_CRAWLER_WAF_USER_AGENTS,
4
6
  JMP_ANALYTICS_SDK_VERSION,
7
+ JMP_CONTENT_CACHE_TAG,
8
+ JMP_CONTENT_REVALIDATE_SECONDS,
5
9
  JMP_TRACKING_CONSENT_STORAGE_KEY,
10
+ buildAiCrawlerRobotsTxt,
6
11
  classifyContactHref,
7
12
  createJmpAnalytics,
8
13
  createJmpContentClient,
@@ -31,14 +36,17 @@ import {
31
36
  isJmpBrowserAnalyticsEnvConfigured,
32
37
  isJmpServerContentEnvConfigured,
33
38
  isJmpTrackingConsentGranted,
39
+ jmpAiCrawlerVercelWafRoute,
40
+ jmpAiCrawlerWafUserAgentPattern,
34
41
  markContentWrapper,
42
+ mergeJmpRobotsTxt,
35
43
  normalizeJmpContentManifest,
36
44
  registerJmpContentWrappers,
37
45
  resetContentWrapperDiscoveryForTests,
38
46
  setJmpTrackingConsent,
39
47
  stableJmpManifestFingerprint,
40
48
  subscribeJmpTrackingConsent
41
- } from "./chunk-EBU4DKHW.js";
49
+ } from "./chunk-JC3G4XNR.js";
42
50
  import {
43
51
  buildLandingCaptureInlineScript
44
52
  } from "./chunk-TCZ6TC2L.js";
@@ -50,10 +58,15 @@ import {
50
58
  trackJmpServerPageView
51
59
  } from "./chunk-6WQMWPEY.js";
52
60
  export {
61
+ AI_CRAWLER_ROBOTS_USER_AGENTS,
53
62
  BOOKING_LINK_HOSTS,
54
63
  DEFAULT_JMP_BROWSER_PAGE_VIEW_DEDUPE_MS,
64
+ JMP_AI_CRAWLER_WAF_USER_AGENTS,
55
65
  JMP_ANALYTICS_SDK_VERSION,
66
+ JMP_CONTENT_CACHE_TAG,
67
+ JMP_CONTENT_REVALIDATE_SECONDS,
56
68
  JMP_TRACKING_CONSENT_STORAGE_KEY,
69
+ buildAiCrawlerRobotsTxt,
57
70
  buildLandingCaptureInlineScript,
58
71
  classifyContactHref,
59
72
  createJmpAnalytics,
@@ -86,7 +99,10 @@ export {
86
99
  isJmpBrowserAnalyticsEnvConfigured,
87
100
  isJmpServerContentEnvConfigured,
88
101
  isJmpTrackingConsentGranted,
102
+ jmpAiCrawlerVercelWafRoute,
103
+ jmpAiCrawlerWafUserAgentPattern,
89
104
  markContentWrapper,
105
+ mergeJmpRobotsTxt,
90
106
  normalizeJmpContentManifest,
91
107
  readJmpPublicEnvFromProcess,
92
108
  registerJmpContentWrappers,
@@ -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,
@@ -47,10 +49,12 @@ var import_react = require("react");
47
49
  var LANDING_REFERER_COOKIE_MAX_AGE_SEC = 30 * 60;
48
50
 
49
51
  // package.json
50
- var version = "0.1.38";
52
+ var version = "0.1.40";
51
53
 
52
54
  // src/constants.ts
53
55
  var JMP_ANALYTICS_SDK_VERSION = version;
56
+ var JMP_CONTENT_CACHE_TAG = "jmp-content";
57
+ var JMP_CONTENT_REVALIDATE_SECONDS = 3600;
54
58
 
55
59
  // src/http.ts
56
60
  function responseLooksLikeHtml(body) {
@@ -247,7 +251,8 @@ function normalizeJmpContentManifest(input) {
247
251
  const externalSources = normalizeExternalSources(input.externalSources);
248
252
  const trust = normalizeTrust(input.trust);
249
253
  const contact = normalizeContact(input.contact);
250
- if (routes.length === 0 && !externalSources && !trust && !contact) {
254
+ const defaults = normalizeManifestDefaults(input.defaults);
255
+ if (routes.length === 0 && !externalSources && !trust && !contact && !defaults) {
251
256
  return null;
252
257
  }
253
258
  return {
@@ -255,7 +260,8 @@ function normalizeJmpContentManifest(input) {
255
260
  ...routes.length > 0 ? { routes } : {},
256
261
  ...externalSources ? { externalSources } : {},
257
262
  ...trust ? { trust } : {},
258
- ...contact ? { contact } : {}
263
+ ...contact ? { contact } : {},
264
+ ...defaults ? { defaults } : {}
259
265
  };
260
266
  }
261
267
  function normalizeRoutes(routes) {
@@ -319,10 +325,132 @@ function normalizeTrustLabels(labels) {
319
325
  }
320
326
  return Object.keys(out).length > 0 ? out : null;
321
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
+ }
322
407
  function normalizeContact(contact) {
323
408
  if (!contact || typeof contact !== "object") return null;
324
409
  const extras = normalizeContactExtras(contact.extras);
325
- return extras.length > 0 ? { extras } : null;
410
+ const leadInbox = normalizeLeadInbox(contact.leadInbox);
411
+ if (extras.length === 0 && !leadInbox) return null;
412
+ return {
413
+ ...extras.length > 0 ? { extras } : {},
414
+ ...leadInbox ? { leadInbox } : {}
415
+ };
416
+ }
417
+ function normalizeLeadInbox(raw) {
418
+ if (!raw || typeof raw !== "object") return null;
419
+ const list = normalizeInboxKeyList(raw.list, 8);
420
+ const detail = normalizeInboxKeyList(raw.detail, 24);
421
+ const labels = normalizeInboxLabels(raw.labels);
422
+ if (!list && !detail && !labels) return null;
423
+ return {
424
+ ...list ? { list } : {},
425
+ ...detail ? { detail } : {},
426
+ ...labels ? { labels } : {}
427
+ };
428
+ }
429
+ function normalizeInboxKeyList(raw, max) {
430
+ if (!Array.isArray(raw)) return void 0;
431
+ const seen = /* @__PURE__ */ new Set();
432
+ const out = [];
433
+ for (const item of raw) {
434
+ if (typeof item !== "string" || out.length >= max) continue;
435
+ const key = item.trim();
436
+ const token = key.replace(/[^a-zA-Z0-9]+/g, "").toLowerCase();
437
+ if (!key || !token || seen.has(token)) continue;
438
+ seen.add(token);
439
+ out.push(key);
440
+ }
441
+ return out.length > 0 ? out : void 0;
442
+ }
443
+ function normalizeInboxLabels(raw) {
444
+ if (!raw || typeof raw !== "object") return void 0;
445
+ const out = {};
446
+ for (const [key, value] of Object.entries(raw)) {
447
+ if (typeof value !== "string") continue;
448
+ const label = value.trim().slice(0, 60);
449
+ const token = key.trim();
450
+ if (!token || !label) continue;
451
+ out[token] = label;
452
+ }
453
+ return Object.keys(out).length > 0 ? out : void 0;
326
454
  }
327
455
  function normalizeContactExtras(extras) {
328
456
  if (!Array.isArray(extras)) return [];
@@ -352,7 +480,7 @@ function inferWrapperSlotsFromManifest(manifest) {
352
480
  slots.add(`trust.${block.section}`);
353
481
  slots.add("trust");
354
482
  }
355
- if (manifest?.contact?.extras?.length) {
483
+ if (manifest?.contact?.extras?.length || manifest?.contact?.leadInbox) {
356
484
  slots.add("contact");
357
485
  }
358
486
  return [...slots];
@@ -386,7 +514,11 @@ async function getContentText(config, path) {
386
514
  }
387
515
  const res = await resolvedFetch(url, {
388
516
  method: "GET",
389
- headers: jmpContentRequestHeaders(config)
517
+ headers: jmpContentRequestHeaders(config),
518
+ next: {
519
+ revalidate: JMP_CONTENT_REVALIDATE_SECONDS,
520
+ tags: [JMP_CONTENT_CACHE_TAG]
521
+ }
390
522
  });
391
523
  const text = await res.text();
392
524
  if (!res.ok) {
@@ -477,7 +609,65 @@ function getDiscoveredContentWrappers() {
477
609
  return sortWrapperSlots([...discovered]);
478
610
  }
479
611
  function resolveContentManifestForReport(config) {
480
- return normalizeJmpContentManifest(config.contentManifest);
612
+ const site = getJmpSiteDefinition();
613
+ const fallback = site?.contactFallback;
614
+ const existing = config.contentManifest;
615
+ const fromFallback = fallbackToManifestDefaults(fallback);
616
+ if (!existing && !fromFallback) {
617
+ return null;
618
+ }
619
+ const merged = {
620
+ ...existing ?? {},
621
+ defaults: {
622
+ ...fromFallback ?? {},
623
+ ...existing?.defaults ?? {},
624
+ contact: {
625
+ ...fromFallback?.contact ?? {},
626
+ ...existing?.defaults?.contact ?? {},
627
+ extras: {
628
+ ...fromFallback?.contact?.extras ?? {},
629
+ ...existing?.defaults?.contact?.extras ?? {}
630
+ }
631
+ },
632
+ trust: {
633
+ ...fromFallback?.trust ?? {},
634
+ ...existing?.defaults?.trust ?? {}
635
+ },
636
+ faq: existing?.defaults?.faq?.length ? existing.defaults.faq : fromFallback?.faq
637
+ }
638
+ };
639
+ return normalizeJmpContentManifest(merged);
640
+ }
641
+ function fallbackToManifestDefaults(fallback) {
642
+ if (!fallback) return null;
643
+ const contact = {};
644
+ if (fallback.displayName?.trim()) contact.displayName = fallback.displayName.trim();
645
+ if (fallback.email?.trim()) contact.email = fallback.email.trim();
646
+ if (typeof fallback.phone === "string" && fallback.phone.trim()) {
647
+ contact.phone = fallback.phone.trim();
648
+ }
649
+ if (fallback.address?.trim()) contact.address = fallback.address.trim();
650
+ if (fallback.hours?.trim()) contact.hours = fallback.hours.trim();
651
+ if (fallback.serviceArea?.trim()) contact.serviceArea = fallback.serviceArea.trim();
652
+ if (fallback.googleMapsUrl?.trim()) {
653
+ contact.googleMapsUrl = fallback.googleMapsUrl.trim();
654
+ }
655
+ if (fallback.linkedin?.trim()) contact.linkedinUrl = fallback.linkedin.trim();
656
+ if (fallback.instagram?.trim()) contact.instagramUrl = fallback.instagram.trim();
657
+ if (fallback.facebook?.trim()) contact.facebookUrl = fallback.facebook.trim();
658
+ if (fallback.x?.trim()) contact.xUrl = fallback.x.trim();
659
+ if (fallback.youtube?.trim()) contact.youtubeUrl = fallback.youtube.trim();
660
+ const trust = {};
661
+ if (fallback.googleMapsUrl?.trim()) {
662
+ trust.googleReviewsUrl = fallback.googleMapsUrl.trim();
663
+ }
664
+ const hasContact = Object.keys(contact).length > 0;
665
+ const hasTrust = Object.keys(trust).length > 0;
666
+ if (!hasContact && !hasTrust) return null;
667
+ return {
668
+ ...hasContact ? { contact } : {},
669
+ ...hasTrust ? { trust } : {}
670
+ };
481
671
  }
482
672
  function resolveContentWrappersForReport(config) {
483
673
  const explicit = config.contentWrappers ?? [];
@@ -772,6 +962,75 @@ async function registerJmpContentWrappers(config) {
772
962
  }
773
963
  setContentWrapperSyncHandler(registerJmpContentWrappers);
774
964
 
965
+ // ai-crawler-agents.json
966
+ var ai_crawler_agents_default = {
967
+ robotsUserAgents: [
968
+ "GPTBot",
969
+ "ChatGPT-User",
970
+ "OAI-SearchBot",
971
+ "OAI-AdsBot",
972
+ "ClaudeBot",
973
+ "Claude-User",
974
+ "Claude-SearchBot",
975
+ "Claude-Web",
976
+ "PerplexityBot",
977
+ "Perplexity-User",
978
+ "Google-Extended",
979
+ "GoogleOther",
980
+ "GoogleOther-Image",
981
+ "GoogleOther-Video",
982
+ "Google-CloudVertexBot",
983
+ "Meta-ExternalAgent",
984
+ "Meta-ExternalFetcher",
985
+ "FacebookBot",
986
+ "Applebot",
987
+ "Applebot-Extended",
988
+ "CCBot",
989
+ "Bytespider",
990
+ "cohere-ai",
991
+ "cohere-training-data-crawler",
992
+ "YouBot",
993
+ "MistralAI-User",
994
+ "GrokBot",
995
+ "Grok-DeepSearch",
996
+ "xAI-Grok",
997
+ "xAI-Bot"
998
+ ],
999
+ wafUserAgents: [
1000
+ "GPTBot",
1001
+ "ChatGPT-User",
1002
+ "OAI-SearchBot",
1003
+ "OAI-AdsBot",
1004
+ "ClaudeBot",
1005
+ "Claude-User",
1006
+ "Claude-SearchBot",
1007
+ "Claude-Web",
1008
+ "PerplexityBot",
1009
+ "Perplexity-User",
1010
+ "Google-Extended",
1011
+ "GoogleOther",
1012
+ "Google-CloudVertexBot",
1013
+ "Meta-ExternalAgent",
1014
+ "Meta-ExternalFetcher",
1015
+ "FacebookBot",
1016
+ "Applebot-Extended",
1017
+ "CCBot",
1018
+ "Bytespider",
1019
+ "cohere-ai",
1020
+ "cohere-training-data-crawler",
1021
+ "YouBot",
1022
+ "MistralAI-User",
1023
+ "GrokBot",
1024
+ "Grok-DeepSearch",
1025
+ "xAI-Grok",
1026
+ "xAI-Bot"
1027
+ ]
1028
+ };
1029
+
1030
+ // src/ai-crawlers.ts
1031
+ var AI_CRAWLER_ROBOTS_USER_AGENTS = ai_crawler_agents_default.robotsUserAgents;
1032
+ var JMP_AI_CRAWLER_WAF_USER_AGENTS = ai_crawler_agents_default.wafUserAgents;
1033
+
775
1034
  // src/content/site-content.ts
776
1035
  var DEFAULT_EXTRA_KEYS = {
777
1036
  founderName: ["founder-name", "founder_name"],
@@ -1037,6 +1296,8 @@ var loadTrustBundle2 = (0, import_react.cache)(loadTrustBundle);
1037
1296
  var loadPopularPages2 = (0, import_react.cache)(loadPopularPages);
1038
1297
  // Annotate the CommonJS export names for ESM import in node:
1039
1298
  0 && (module.exports = {
1299
+ JMP_CONTENT_CACHE_TAG,
1300
+ JMP_CONTENT_REVALIDATE_SECONDS,
1040
1301
  absoluteSiteAssetUrl,
1041
1302
  filterFeaturedTrustQuotes,
1042
1303
  getJmpContentConfig,