@jmp-technologies/analytics 0.1.34 → 0.1.35
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.
- package/dist/astro/client.cjs +1 -1
- package/dist/astro/client.cjs.map +1 -1
- package/dist/astro/client.js +1 -1
- package/dist/astro/content.cjs +31 -1
- package/dist/astro/content.cjs.map +1 -1
- package/dist/astro/content.js +4 -2
- package/dist/astro/integration.cjs +1 -1
- package/dist/astro/integration.cjs.map +1 -1
- package/dist/astro/integration.js +2 -2
- package/dist/astro/register.cjs +1 -1
- package/dist/astro/register.cjs.map +1 -1
- package/dist/astro/register.js +2 -2
- package/dist/{chunk-4NUFHUWN.js → chunk-3ET7F6MZ.js} +16 -3
- package/dist/chunk-3ET7F6MZ.js.map +1 -0
- package/dist/{chunk-UL7JTTTB.js → chunk-4ZUW24F6.js} +2 -2
- package/dist/{chunk-NJAMXGIW.js → chunk-6SMPRPQ3.js} +21 -2
- package/dist/{chunk-NJAMXGIW.js.map → chunk-6SMPRPQ3.js.map} +1 -1
- package/dist/{chunk-SIJ4TDRV.js → chunk-G322JCI3.js} +2 -2
- package/dist/{chunk-VUWHDHXS.js → chunk-VUCOCFVE.js} +2 -2
- package/dist/index.cjs +21 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/next/content.cjs +32 -1
- package/dist/next/content.cjs.map +1 -1
- package/dist/next/content.js +5 -2
- package/dist/next/content.js.map +1 -1
- package/dist/next/instrumentation.cjs +1 -1
- package/dist/next/instrumentation.cjs.map +1 -1
- package/dist/next/instrumentation.js +1 -1
- package/dist/next/landing-pages.cjs +1 -1
- package/dist/next/landing-pages.cjs.map +1 -1
- package/dist/next/landing-pages.js +2 -2
- package/dist/next/locations.cjs +1 -1
- package/dist/next/locations.cjs.map +1 -1
- package/dist/next/locations.js +2 -2
- package/dist/next/site-root-server.cjs +1 -1
- package/dist/next/site-root-server.cjs.map +1 -1
- package/dist/next/site-root-server.js +3 -3
- package/dist/next.cjs +1 -1
- package/dist/next.cjs.map +1 -1
- package/dist/next.js +3 -3
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +2 -2
- package/package.json +1 -1
- package/dist/astro/client.d.cts +0 -18
- package/dist/astro/client.d.ts +0 -18
- package/dist/astro/content.d.cts +0 -48
- package/dist/astro/content.d.ts +0 -48
- package/dist/astro/integration.d.cts +0 -36
- package/dist/astro/integration.d.ts +0 -36
- package/dist/astro/middleware.d.cts +0 -19
- package/dist/astro/middleware.d.ts +0 -19
- package/dist/astro/register.d.cts +0 -7
- package/dist/astro/register.d.ts +0 -7
- package/dist/chunk-4NUFHUWN.js.map +0 -1
- package/dist/create-jmp-analytics-CwtcXBd7.d.ts +0 -69
- package/dist/create-jmp-analytics-lkGcysG_.d.cts +0 -69
- package/dist/env-public-B6Y0DG68.d.cts +0 -14
- package/dist/env-public-B6Y0DG68.d.ts +0 -14
- package/dist/index.d.cts +0 -104
- package/dist/index.d.ts +0 -104
- package/dist/landing-capture-C8pyZWuF.d.cts +0 -4
- package/dist/landing-capture-C8pyZWuF.d.ts +0 -4
- package/dist/next/content.d.cts +0 -22
- package/dist/next/content.d.ts +0 -22
- package/dist/next/google-tag.d.cts +0 -17
- package/dist/next/google-tag.d.ts +0 -17
- package/dist/next/instrumentation.d.cts +0 -7
- package/dist/next/instrumentation.d.ts +0 -7
- package/dist/next/landing-capture-script-server.d.cts +0 -14
- package/dist/next/landing-capture-script-server.d.ts +0 -14
- package/dist/next/landing-pages.d.cts +0 -92
- package/dist/next/landing-pages.d.ts +0 -92
- package/dist/next/locations.d.cts +0 -55
- package/dist/next/locations.d.ts +0 -55
- package/dist/next/middleware.d.cts +0 -10
- package/dist/next/middleware.d.ts +0 -10
- package/dist/next/site-root-server.d.cts +0 -24
- package/dist/next/site-root-server.d.ts +0 -24
- package/dist/next.d.cts +0 -50
- package/dist/next.d.ts +0 -50
- package/dist/react.d.cts +0 -22
- package/dist/react.d.ts +0 -22
- package/dist/site-config-BMlEQ_8g.d.cts +0 -74
- package/dist/site-config-BbE6kGDd.d.ts +0 -74
- package/dist/track-page-view-BPWGGoMr.d.ts +0 -12
- package/dist/track-page-view-DaNOaIxF.d.cts +0 -12
- package/dist/types-BdC3SRH-.d.cts +0 -386
- package/dist/types-BdC3SRH-.d.ts +0 -386
- package/dist/utils-B4E-pcQ0.d.ts +0 -15
- package/dist/utils-DIHFgovG.d.cts +0 -15
- /package/dist/{chunk-UL7JTTTB.js.map → chunk-4ZUW24F6.js.map} +0 -0
- /package/dist/{chunk-SIJ4TDRV.js.map → chunk-G322JCI3.js.map} +0 -0
- /package/dist/{chunk-VUWHDHXS.js.map → chunk-VUCOCFVE.js.map} +0 -0
package/dist/astro/content.d.cts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { g as JmpTestimonial, J as JmpBlogPost, a as JmpFaqItem, d as JmpLandingPageKind, c as JmpLandingPageDetail, e as JmpLandingPageSitemapEntry, b as JmpLandingPage, j as JmpWebsiteLocationDetail, i as JmpWebsiteLocation, f as JmpSiteProfile, h as JmpTrustBundle } from '../types-BdC3SRH-.cjs';
|
|
2
|
-
import { J as JmpSiteSocialLinks } from '../site-config-BMlEQ_8g.cjs';
|
|
3
|
-
export { g as getJmpContentConfig } from '../site-config-BMlEQ_8g.cjs';
|
|
4
|
-
|
|
5
|
-
type ResolvedSiteContact = {
|
|
6
|
-
displayName: string;
|
|
7
|
-
email: string;
|
|
8
|
-
founderName: string;
|
|
9
|
-
dashboardDemoUrl: string;
|
|
10
|
-
profilePhotoSrc: string;
|
|
11
|
-
linkedin: string | null;
|
|
12
|
-
social: JmpSiteSocialLinks;
|
|
13
|
-
phone: string | null;
|
|
14
|
-
address: string | null;
|
|
15
|
-
googleMapsUrl: string | null;
|
|
16
|
-
googleMapsEmbedUrl: string | null;
|
|
17
|
-
hours: string | null;
|
|
18
|
-
serviceArea: string | null;
|
|
19
|
-
privacyUrl: string;
|
|
20
|
-
termsUrl: string;
|
|
21
|
-
cta: {
|
|
22
|
-
label: string | null;
|
|
23
|
-
url: string | null;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
/** Resolve a path or URL against {@link defineJmpSite}'s `siteUrl`. */
|
|
27
|
-
declare function absoluteSiteAssetUrl(src: string): string;
|
|
28
|
-
declare function loadSiteProfile(): Promise<JmpSiteProfile | null>;
|
|
29
|
-
declare function resolveSiteContact(profile: JmpSiteProfile | null): ResolvedSiteContact;
|
|
30
|
-
declare function getResolvedSiteContact(): Promise<ResolvedSiteContact>;
|
|
31
|
-
/** Non-null social profile URLs in a stable order for JSON-LD `sameAs`. */
|
|
32
|
-
declare function listResolvedSocialUrls(social: JmpSiteSocialLinks): string[];
|
|
33
|
-
declare function loadBlogPosts(locale?: string): Promise<JmpBlogPost[]>;
|
|
34
|
-
declare function loadBlogPost(slug: string, locale?: string): Promise<JmpBlogPost | null>;
|
|
35
|
-
declare function loadFaqs(locale?: string): Promise<JmpFaqItem[]>;
|
|
36
|
-
declare function loadFaqBySlug(slug: string, locale?: string): Promise<JmpFaqItem | null>;
|
|
37
|
-
declare function loadLandingPages(filters?: {
|
|
38
|
-
kind?: JmpLandingPageKind;
|
|
39
|
-
locale?: string;
|
|
40
|
-
}): Promise<JmpLandingPage[]>;
|
|
41
|
-
declare function loadLandingPageDetail(kind: JmpLandingPageKind, slug: string, locale?: string): Promise<JmpLandingPageDetail | null>;
|
|
42
|
-
declare function loadLandingPageSitemap(): Promise<JmpLandingPageSitemapEntry[]>;
|
|
43
|
-
declare function loadLocations(): Promise<JmpWebsiteLocation[]>;
|
|
44
|
-
declare function loadLocationDetail(slug: string): Promise<JmpWebsiteLocationDetail | null>;
|
|
45
|
-
declare function loadTrustBundle(): Promise<JmpTrustBundle | null>;
|
|
46
|
-
declare function filterFeaturedTrustQuotes(testimonials: JmpTestimonial[], placement: "testimonials" | "reviews", limit?: number): JmpTestimonial[];
|
|
47
|
-
|
|
48
|
-
export { JmpBlogPost, JmpFaqItem, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpSiteProfile, JmpSiteSocialLinks, JmpTestimonial, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, type ResolvedSiteContact, absoluteSiteAssetUrl, filterFeaturedTrustQuotes, getResolvedSiteContact, listResolvedSocialUrls, loadBlogPost, loadBlogPosts, loadFaqBySlug, loadFaqs, loadLandingPageDetail, loadLandingPageSitemap, loadLandingPages, loadLocationDetail, loadLocations, loadSiteProfile, loadTrustBundle, resolveSiteContact };
|
package/dist/astro/content.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { g as JmpTestimonial, J as JmpBlogPost, a as JmpFaqItem, d as JmpLandingPageKind, c as JmpLandingPageDetail, e as JmpLandingPageSitemapEntry, b as JmpLandingPage, j as JmpWebsiteLocationDetail, i as JmpWebsiteLocation, f as JmpSiteProfile, h as JmpTrustBundle } from '../types-BdC3SRH-.js';
|
|
2
|
-
import { J as JmpSiteSocialLinks } from '../site-config-BbE6kGDd.js';
|
|
3
|
-
export { g as getJmpContentConfig } from '../site-config-BbE6kGDd.js';
|
|
4
|
-
|
|
5
|
-
type ResolvedSiteContact = {
|
|
6
|
-
displayName: string;
|
|
7
|
-
email: string;
|
|
8
|
-
founderName: string;
|
|
9
|
-
dashboardDemoUrl: string;
|
|
10
|
-
profilePhotoSrc: string;
|
|
11
|
-
linkedin: string | null;
|
|
12
|
-
social: JmpSiteSocialLinks;
|
|
13
|
-
phone: string | null;
|
|
14
|
-
address: string | null;
|
|
15
|
-
googleMapsUrl: string | null;
|
|
16
|
-
googleMapsEmbedUrl: string | null;
|
|
17
|
-
hours: string | null;
|
|
18
|
-
serviceArea: string | null;
|
|
19
|
-
privacyUrl: string;
|
|
20
|
-
termsUrl: string;
|
|
21
|
-
cta: {
|
|
22
|
-
label: string | null;
|
|
23
|
-
url: string | null;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
/** Resolve a path or URL against {@link defineJmpSite}'s `siteUrl`. */
|
|
27
|
-
declare function absoluteSiteAssetUrl(src: string): string;
|
|
28
|
-
declare function loadSiteProfile(): Promise<JmpSiteProfile | null>;
|
|
29
|
-
declare function resolveSiteContact(profile: JmpSiteProfile | null): ResolvedSiteContact;
|
|
30
|
-
declare function getResolvedSiteContact(): Promise<ResolvedSiteContact>;
|
|
31
|
-
/** Non-null social profile URLs in a stable order for JSON-LD `sameAs`. */
|
|
32
|
-
declare function listResolvedSocialUrls(social: JmpSiteSocialLinks): string[];
|
|
33
|
-
declare function loadBlogPosts(locale?: string): Promise<JmpBlogPost[]>;
|
|
34
|
-
declare function loadBlogPost(slug: string, locale?: string): Promise<JmpBlogPost | null>;
|
|
35
|
-
declare function loadFaqs(locale?: string): Promise<JmpFaqItem[]>;
|
|
36
|
-
declare function loadFaqBySlug(slug: string, locale?: string): Promise<JmpFaqItem | null>;
|
|
37
|
-
declare function loadLandingPages(filters?: {
|
|
38
|
-
kind?: JmpLandingPageKind;
|
|
39
|
-
locale?: string;
|
|
40
|
-
}): Promise<JmpLandingPage[]>;
|
|
41
|
-
declare function loadLandingPageDetail(kind: JmpLandingPageKind, slug: string, locale?: string): Promise<JmpLandingPageDetail | null>;
|
|
42
|
-
declare function loadLandingPageSitemap(): Promise<JmpLandingPageSitemapEntry[]>;
|
|
43
|
-
declare function loadLocations(): Promise<JmpWebsiteLocation[]>;
|
|
44
|
-
declare function loadLocationDetail(slug: string): Promise<JmpWebsiteLocationDetail | null>;
|
|
45
|
-
declare function loadTrustBundle(): Promise<JmpTrustBundle | null>;
|
|
46
|
-
declare function filterFeaturedTrustQuotes(testimonials: JmpTestimonial[], placement: "testimonials" | "reviews", limit?: number): JmpTestimonial[];
|
|
47
|
-
|
|
48
|
-
export { JmpBlogPost, JmpFaqItem, JmpLandingPage, JmpLandingPageDetail, JmpLandingPageKind, JmpLandingPageSitemapEntry, JmpSiteProfile, JmpSiteSocialLinks, JmpTestimonial, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, type ResolvedSiteContact, absoluteSiteAssetUrl, filterFeaturedTrustQuotes, getResolvedSiteContact, listResolvedSocialUrls, loadBlogPost, loadBlogPosts, loadFaqBySlug, loadFaqs, loadLandingPageDetail, loadLandingPageSitemap, loadLandingPages, loadLocationDetail, loadLocations, loadSiteProfile, loadTrustBundle, resolveSiteContact };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
type JmpAstroIntegrationOptions = {
|
|
2
|
-
/**
|
|
3
|
-
* Path to `jmp.config.ts` (site `defineJmpSite`). Resolved from project root.
|
|
4
|
-
* @default "./jmp.config.ts"
|
|
5
|
-
*/
|
|
6
|
-
configPath?: string;
|
|
7
|
-
/** When true (default), inject client analytics on every page. */
|
|
8
|
-
injectClientAnalytics?: boolean;
|
|
9
|
-
};
|
|
10
|
-
type AstroIntegration = {
|
|
11
|
-
name: string;
|
|
12
|
-
hooks: {
|
|
13
|
-
"astro:config:setup"?: (params: {
|
|
14
|
-
injectScript: (stage: string, content: string) => void;
|
|
15
|
-
}) => void;
|
|
16
|
-
"astro:build:start"?: () => void | Promise<void>;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Astro integration: register content wrappers at build + optional client page-view script.
|
|
21
|
-
*
|
|
22
|
-
* ```js
|
|
23
|
-
* // astro.config.mjs
|
|
24
|
-
* import { defineConfig } from "astro/config"
|
|
25
|
-
* import { jmpAnalytics } from "@jmp-technologies/analytics/astro/integration"
|
|
26
|
-
*
|
|
27
|
-
* export default defineConfig({
|
|
28
|
-
* integrations: [jmpAnalytics()],
|
|
29
|
-
* })
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* Still add `import "./jmp.config"` at the top of `astro.config.mjs` so `defineJmpSite` runs in Node.
|
|
33
|
-
*/
|
|
34
|
-
declare function jmpAnalytics(options?: JmpAstroIntegrationOptions): AstroIntegration;
|
|
35
|
-
|
|
36
|
-
export { type JmpAstroIntegrationOptions, jmpAnalytics };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
type JmpAstroIntegrationOptions = {
|
|
2
|
-
/**
|
|
3
|
-
* Path to `jmp.config.ts` (site `defineJmpSite`). Resolved from project root.
|
|
4
|
-
* @default "./jmp.config.ts"
|
|
5
|
-
*/
|
|
6
|
-
configPath?: string;
|
|
7
|
-
/** When true (default), inject client analytics on every page. */
|
|
8
|
-
injectClientAnalytics?: boolean;
|
|
9
|
-
};
|
|
10
|
-
type AstroIntegration = {
|
|
11
|
-
name: string;
|
|
12
|
-
hooks: {
|
|
13
|
-
"astro:config:setup"?: (params: {
|
|
14
|
-
injectScript: (stage: string, content: string) => void;
|
|
15
|
-
}) => void;
|
|
16
|
-
"astro:build:start"?: () => void | Promise<void>;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Astro integration: register content wrappers at build + optional client page-view script.
|
|
21
|
-
*
|
|
22
|
-
* ```js
|
|
23
|
-
* // astro.config.mjs
|
|
24
|
-
* import { defineConfig } from "astro/config"
|
|
25
|
-
* import { jmpAnalytics } from "@jmp-technologies/analytics/astro/integration"
|
|
26
|
-
*
|
|
27
|
-
* export default defineConfig({
|
|
28
|
-
* integrations: [jmpAnalytics()],
|
|
29
|
-
* })
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* Still add `import "./jmp.config"` at the top of `astro.config.mjs` so `defineJmpSite` runs in Node.
|
|
33
|
-
*/
|
|
34
|
-
declare function jmpAnalytics(options?: JmpAstroIntegrationOptions): AstroIntegration;
|
|
35
|
-
|
|
36
|
-
export { type JmpAstroIntegrationOptions, jmpAnalytics };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { j as jmpTrackServerPageView } from '../track-page-view-DaNOaIxF.cjs';
|
|
2
|
-
import '../types-BdC3SRH-.cjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Astro middleware handler — use in `src/middleware.ts`:
|
|
6
|
-
*
|
|
7
|
-
* ```ts
|
|
8
|
-
* import "./jmp.config"
|
|
9
|
-
* import { onRequest } from "@jmp-technologies/analytics/astro/middleware"
|
|
10
|
-
* export { onRequest }
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* Or wrap with `defineMiddleware` from `astro:middleware` if you need custom logic.
|
|
14
|
-
*/
|
|
15
|
-
declare function onRequest(context: {
|
|
16
|
-
request: Request;
|
|
17
|
-
}, next: () => Promise<Response>): Promise<Response>;
|
|
18
|
-
|
|
19
|
-
export { onRequest };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { j as jmpTrackServerPageView } from '../track-page-view-BPWGGoMr.js';
|
|
2
|
-
import '../types-BdC3SRH-.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Astro middleware handler — use in `src/middleware.ts`:
|
|
6
|
-
*
|
|
7
|
-
* ```ts
|
|
8
|
-
* import "./jmp.config"
|
|
9
|
-
* import { onRequest } from "@jmp-technologies/analytics/astro/middleware"
|
|
10
|
-
* export { onRequest }
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* Or wrap with `defineMiddleware` from `astro:middleware` if you need custom logic.
|
|
14
|
-
*/
|
|
15
|
-
declare function onRequest(context: {
|
|
16
|
-
request: Request;
|
|
17
|
-
}, next: () => Promise<Response>): Promise<Response>;
|
|
18
|
-
|
|
19
|
-
export { onRequest };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Register content wrappers with the dashboard (call once per build).
|
|
3
|
-
* Import `./jmp.config` in `astro.config.mjs` before calling this, or use {@link jmpAnalytics} integration.
|
|
4
|
-
*/
|
|
5
|
-
declare function registerJmpAstroContent(): Promise<void>;
|
|
6
|
-
|
|
7
|
-
export { registerJmpAstroContent };
|
package/dist/astro/register.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Register content wrappers with the dashboard (call once per build).
|
|
3
|
-
* Import `./jmp.config` in `astro.config.mjs` before calling this, or use {@link jmpAnalytics} integration.
|
|
4
|
-
*/
|
|
5
|
-
declare function registerJmpAstroContent(): Promise<void>;
|
|
6
|
-
|
|
7
|
-
export { registerJmpAstroContent };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/content/site-content.ts"],"sourcesContent":["import {\n getJmpBlogPost,\n getJmpBlogPosts,\n getJmpFaqs,\n getJmpLandingPageDetail,\n getJmpLandingPageSitemap,\n getJmpLandingPages,\n getJmpLocations,\n getJmpLocationDetail,\n getJmpSiteProfile,\n getJmpTrustBundle,\n type JmpBlogPost,\n type JmpFaqItem,\n type JmpLandingPage,\n type JmpLandingPageDetail,\n type JmpLandingPageKind,\n type JmpLandingPageSitemapEntry,\n type JmpWebsiteLocation,\n type JmpWebsiteLocationDetail,\n type JmpSiteProfile,\n type JmpTestimonial,\n type JmpTrustBundle,\n} from \"../index\"\nimport {\n getJmpContentConfig,\n getJmpSiteDefinition,\n type JmpSiteSocialLinks,\n} from \"../site-config\"\n\nexport type {\n JmpBlogPost,\n JmpFaqItem,\n JmpLandingPage,\n JmpLandingPageDetail,\n JmpLandingPageKind,\n JmpLandingPageSitemapEntry,\n JmpWebsiteLocation,\n JmpWebsiteLocationDetail,\n JmpSiteProfile,\n JmpTestimonial,\n JmpTrustBundle,\n}\n\nexport { getJmpContentConfig } from \"../site-config\"\n\nexport type { JmpSiteSocialLinks } from \"../site-config\"\n\nexport type ResolvedSiteContact = {\n displayName: string\n email: string\n founderName: string\n dashboardDemoUrl: string\n profilePhotoSrc: string\n linkedin: string | null\n social: JmpSiteSocialLinks\n phone: string | null\n address: string | null\n googleMapsUrl: string | null\n googleMapsEmbedUrl: string | null\n hours: string | null\n serviceArea: string | null\n privacyUrl: string\n termsUrl: string\n cta: { label: string | null; url: string | null }\n}\n\nconst DEFAULT_EXTRA_KEYS = {\n founderName: [\"founder-name\", \"founder_name\"],\n dashboardDemoUrl: [\"dashboard-demo-url\", \"sample-dashboard-url\"],\n profilePhotoSrc: [\"profile-photo-url\", \"profile_photo_url\"],\n hours: [\"hours\", \"business-hours\"],\n serviceArea: [\"service-area\", \"service_area\", \"service-area-text\"],\n googleMapsEmbedUrl: [\"google-maps-embed-url\", \"google_maps_embed_url\"],\n} as const\n\nfunction sortBlogPosts(posts: JmpBlogPost[]): JmpBlogPost[] {\n return [...posts].sort((a, b) => {\n const da = a.published_at ?? a.updated_at\n const db = b.published_at ?? b.updated_at\n return db.localeCompare(da)\n })\n}\n\nfunction sortFaqs(items: JmpFaqItem[]): JmpFaqItem[] {\n return [...items].sort((a, b) => a.sort_order - b.sort_order)\n}\n\nfunction readProfileExtra(\n profile: JmpSiteProfile | null,\n keys: readonly string[],\n): string | null {\n for (const key of keys) {\n const value = profile?.extras?.[key]?.trim()\n if (value) {\n return value\n }\n }\n return null\n}\n\n/** Resolve a path or URL against {@link defineJmpSite}'s `siteUrl`. */\nexport function absoluteSiteAssetUrl(src: string): string {\n const trimmed = src.trim()\n if (trimmed.startsWith(\"http://\") || trimmed.startsWith(\"https://\")) {\n return trimmed\n }\n const siteUrl = getJmpSiteDefinition()?.siteUrl?.replace(/\\/$/, \"\")\n if (!siteUrl) {\n return trimmed.startsWith(\"/\") ? trimmed : `/${trimmed}`\n }\n return `${siteUrl}${trimmed.startsWith(\"/\") ? trimmed : `/${trimmed}`}`\n}\n\nexport async function loadSiteProfile(): Promise<JmpSiteProfile | null> {\n const config = getJmpContentConfig()\n if (!config) {\n return null\n }\n try {\n return await getJmpSiteProfile(config)\n } catch {\n return null\n }\n}\n\nexport function resolveSiteContact(profile: JmpSiteProfile | null): ResolvedSiteContact {\n const site = getJmpSiteDefinition()\n const fallback = site?.contactFallback ?? {}\n const extraKeys = {\n ...DEFAULT_EXTRA_KEYS,\n ...site?.contactExtraKeys,\n }\n\n const email = profile?.email?.trim() || fallback.email || \"\"\n const social: JmpSiteSocialLinks = {\n linkedin:\n profile?.social?.linkedin?.trim() || fallback.linkedin || null,\n instagram:\n profile?.social?.instagram?.trim() || fallback.instagram || null,\n facebook:\n profile?.social?.facebook?.trim() || fallback.facebook || null,\n x: profile?.social?.x?.trim() || fallback.x || null,\n youtube:\n profile?.social?.youtube?.trim() || fallback.youtube || null,\n }\n const phone = profile?.phone?.trim() || fallback.phone || null\n\n return {\n displayName:\n profile?.display_name?.trim() ||\n profile?.name?.trim() ||\n fallback.displayName ||\n \"\",\n founderName:\n readProfileExtra(profile, extraKeys.founderName ?? []) ||\n fallback.founderName ||\n \"\",\n dashboardDemoUrl:\n readProfileExtra(profile, extraKeys.dashboardDemoUrl ?? []) ||\n fallback.dashboardDemoUrl ||\n \"\",\n profilePhotoSrc:\n readProfileExtra(profile, extraKeys.profilePhotoSrc ?? []) ||\n fallback.profilePhotoSrc ||\n \"\",\n email,\n linkedin: social.linkedin,\n social,\n phone,\n address: profile?.address?.trim() || fallback.address || null,\n googleMapsUrl:\n profile?.google_maps_url?.trim() || fallback.googleMapsUrl || null,\n googleMapsEmbedUrl:\n readProfileExtra(profile, extraKeys.googleMapsEmbedUrl ?? []) ||\n fallback.googleMapsEmbedUrl ||\n null,\n hours:\n readProfileExtra(profile, extraKeys.hours ?? []) || fallback.hours || null,\n serviceArea:\n readProfileExtra(profile, extraKeys.serviceArea ?? []) ||\n fallback.serviceArea ||\n null,\n privacyUrl: profile?.legal?.privacy_policy_url?.trim() || fallback.privacyUrl || \"/privacy\",\n termsUrl: profile?.legal?.terms_url?.trim() || fallback.termsUrl || \"/terms\",\n cta: {\n label: profile?.cta?.label?.trim() || null,\n url: profile?.cta?.url?.trim() || null,\n },\n }\n}\n\nexport async function getResolvedSiteContact(): Promise<ResolvedSiteContact> {\n const profile = await loadSiteProfile()\n return resolveSiteContact(profile)\n}\n\n/** Non-null social profile URLs in a stable order for JSON-LD `sameAs`. */\nexport function listResolvedSocialUrls(social: JmpSiteSocialLinks): string[] {\n return [\n social.linkedin,\n social.instagram,\n social.facebook,\n social.x,\n social.youtube,\n ].filter((url): url is string => Boolean(url))\n}\n\nexport async function loadBlogPosts(locale?: string): Promise<JmpBlogPost[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n const posts = await getJmpBlogPosts(c, locale ? { locale } : undefined)\n return sortBlogPosts(posts)\n } catch {\n return []\n }\n}\n\nexport async function loadBlogPost(\n slug: string,\n locale?: string\n): Promise<JmpBlogPost | null> {\n const c = getJmpContentConfig()\n if (!c) {\n return null\n }\n try {\n return await getJmpBlogPost(c, slug, locale)\n } catch {\n return null\n }\n}\n\nexport async function loadFaqs(locale?: string): Promise<JmpFaqItem[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n const faqs = await getJmpFaqs(c, locale ? { locale } : undefined)\n return sortFaqs(faqs)\n } catch {\n return []\n }\n}\n\nexport async function loadFaqBySlug(\n slug: string,\n locale?: string\n): Promise<JmpFaqItem | null> {\n const normalized = slug.trim()\n if (!normalized) {\n return null\n }\n const items = await loadFaqs(locale)\n return (\n items.find((item) => item.slug === normalized || item.id === normalized) ?? null\n )\n}\n\nexport async function loadLandingPages(filters?: {\n kind?: JmpLandingPageKind\n locale?: string\n}): Promise<JmpLandingPage[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n return await getJmpLandingPages(c, filters)\n } catch {\n return []\n }\n}\n\nexport async function loadLandingPageDetail(\n kind: JmpLandingPageKind,\n slug: string,\n locale?: string\n): Promise<JmpLandingPageDetail | null> {\n const c = getJmpContentConfig()\n if (!c) {\n return null\n }\n try {\n return await getJmpLandingPageDetail(c, kind, slug, locale)\n } catch {\n return null\n }\n}\n\nexport async function loadLandingPageSitemap(): Promise<JmpLandingPageSitemapEntry[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n return await getJmpLandingPageSitemap(c)\n } catch {\n return []\n }\n}\n\nexport async function loadLocations(): Promise<JmpWebsiteLocation[]> {\n const c = getJmpContentConfig()\n if (!c) {\n return []\n }\n try {\n return await getJmpLocations(c)\n } catch {\n return []\n }\n}\n\nexport async function loadLocationDetail(\n slug: string\n): Promise<JmpWebsiteLocationDetail | null> {\n const c = getJmpContentConfig()\n if (!c) {\n return null\n }\n try {\n return await getJmpLocationDetail(c, slug)\n } catch {\n return null\n }\n}\n\nexport async function loadTrustBundle(): Promise<JmpTrustBundle | null> {\n const c = getJmpContentConfig()\n if (!c) {\n return null\n }\n try {\n return await getJmpTrustBundle(c)\n } catch {\n return null\n }\n}\n\nexport function filterFeaturedTrustQuotes(\n testimonials: JmpTestimonial[],\n placement: \"testimonials\" | \"reviews\",\n limit = 2,\n): JmpTestimonial[] {\n return testimonials\n .filter((item) => {\n if (!item.featured) {\n return false\n }\n const bucket = item.placement?.trim().toLowerCase()\n if (placement === \"reviews\") {\n return bucket === \"reviews\"\n }\n return !bucket || bucket === \"testimonials\"\n })\n .sort((a, b) => a.sort_order - b.sort_order)\n .slice(0, limit)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkEA,IAAM,qBAAqB;AAAA,EACzB,aAAa,CAAC,gBAAgB,cAAc;AAAA,EAC5C,kBAAkB,CAAC,sBAAsB,sBAAsB;AAAA,EAC/D,iBAAiB,CAAC,qBAAqB,mBAAmB;AAAA,EAC1D,OAAO,CAAC,SAAS,gBAAgB;AAAA,EACjC,aAAa,CAAC,gBAAgB,gBAAgB,mBAAmB;AAAA,EACjE,oBAAoB,CAAC,yBAAyB,uBAAuB;AACvE;AAEA,SAAS,cAAc,OAAqC;AAC1D,SAAO,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM;AAC/B,UAAM,KAAK,EAAE,gBAAgB,EAAE;AAC/B,UAAM,KAAK,EAAE,gBAAgB,EAAE;AAC/B,WAAO,GAAG,cAAc,EAAE;AAAA,EAC5B,CAAC;AACH;AAEA,SAAS,SAAS,OAAmC;AACnD,SAAO,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,EAAE,aAAa,EAAE,UAAU;AAC9D;AAEA,SA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,aAAO,WAAW;AAAA,IACpB;AACA,WAAO,CAAC,UAAU,WAAW;AAAA,EAC/B,CAAC,EACA,KAAK,CAAC,GAAG,MAAM,EAAE,aAAa,EAAE,UAAU,EAC1C,MAAM,GAAG,KAAK;AACnB;","names":[]}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { o as JmpAnalyticsConfig, p as JmpEventType, T as TrackPageViewOptions, q as TrackLeadOptions } from './types-BdC3SRH-.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Classify outbound contact links for auto-tracking.
|
|
5
|
-
*
|
|
6
|
-
* Keep channel set in sync with `lib/ingest/contact-click.ts` on the dashboard side.
|
|
7
|
-
*
|
|
8
|
-
* Channels detected from `href` alone (no widget / iframe detection):
|
|
9
|
-
*
|
|
10
|
-
* - `call` — `tel:` (delegates to existing `trackCallClick`)
|
|
11
|
-
* - `email` — `mailto:` (delegates to existing `trackEmailClick`)
|
|
12
|
-
* - `sms` — `sms:` / `smsto:`
|
|
13
|
-
* - `whatsapp` — `wa.me`, `api.whatsapp.com`, `whatsapp.com/send`
|
|
14
|
-
* - `maps` — Google Maps, Apple Maps, `maps.app.goo.gl`, `geo:`
|
|
15
|
-
* - `booking` — fixed allowlist of common scheduling hosts (see {@link BOOKING_LINK_HOSTS})
|
|
16
|
-
*
|
|
17
|
-
* `linkHost` returned in `contact_click` results is the hostname only — never the full URL
|
|
18
|
-
* (avoids leaking phone numbers in `tel:`/`sms:` URLs and PII-laden booking query strings).
|
|
19
|
-
*/
|
|
20
|
-
type ContactLinkChannel = "sms" | "whatsapp" | "maps" | "booking";
|
|
21
|
-
type ClassifiedContactLink = {
|
|
22
|
-
kind: "call";
|
|
23
|
-
} | {
|
|
24
|
-
kind: "email";
|
|
25
|
-
} | {
|
|
26
|
-
kind: "contact_click";
|
|
27
|
-
channel: ContactLinkChannel;
|
|
28
|
-
linkHost: string | null;
|
|
29
|
-
};
|
|
30
|
-
/** v1 booking hosts (~80%+ SMB coverage). Add hosts here when a client uses something rare. */
|
|
31
|
-
declare const BOOKING_LINK_HOSTS: readonly ["calendly.com", "cal.com", "acuityscheduling.com", "calendar.google.com", "calendar.app.google", "bookings.microsoft.com", "outlook.office.com", "outlook.office365.com", "book.ms", "setmore.com", "simplybook.me", "oncehub.com", "scheduleonce.com", "youcanbook.me", "savvycal.com", "tidycal.com", "zohobookings.com", "square.site", "squareup.com", "meetings.hubspot.com", "jobber.com", "housecallpro.com", "servicetitan.com", "thryv.com", "honeybook.com", "dubsado.com", "fresha.com", "booksy.com", "vagaro.com", "mindbodyonline.com", "mindbody.io", "janeapp.com", "cliniko.com", "practicebetter.io"];
|
|
32
|
-
declare function classifyContactHref(href: string): ClassifiedContactLink | null;
|
|
33
|
-
|
|
34
|
-
/** Whether analytics events may be sent (after CMP / cookie banner). */
|
|
35
|
-
declare function isJmpTrackingConsentGranted(): boolean;
|
|
36
|
-
/** Subscribe to consent changes (for React `useSyncExternalStore`). */
|
|
37
|
-
declare function subscribeJmpTrackingConsent(listener: () => void): () => void;
|
|
38
|
-
/**
|
|
39
|
-
* Grant or deny analytics. Persists in `localStorage` when `requireConsent` is used.
|
|
40
|
-
* Call from your cookie banner before tracking runs.
|
|
41
|
-
*/
|
|
42
|
-
declare function setJmpTrackingConsent(granted: boolean): void;
|
|
43
|
-
|
|
44
|
-
declare function createJmpAnalytics(config: JmpAnalyticsConfig): {
|
|
45
|
-
track: (type: JmpEventType, payload: {
|
|
46
|
-
path: string;
|
|
47
|
-
metadata?: Record<string, unknown>;
|
|
48
|
-
source?: string;
|
|
49
|
-
device?: string;
|
|
50
|
-
country?: string;
|
|
51
|
-
}) => Promise<void>;
|
|
52
|
-
trackPageView: (options?: TrackPageViewOptions) => Promise<void>;
|
|
53
|
-
trackFormSubmit: (path: string, metadata?: Record<string, unknown>) => Promise<void>;
|
|
54
|
-
trackCallClick: (path: string, metadata?: Record<string, unknown>) => Promise<void>;
|
|
55
|
-
trackEmailClick: (path: string, metadata?: Record<string, unknown>) => Promise<void>;
|
|
56
|
-
trackContactClick: (path: string, options: {
|
|
57
|
-
channel: ContactLinkChannel;
|
|
58
|
-
linkHost?: string | null;
|
|
59
|
-
metadata?: Record<string, unknown>;
|
|
60
|
-
}) => Promise<void>;
|
|
61
|
-
trackLead: (options?: TrackLeadOptions) => Promise<void>;
|
|
62
|
-
subscribeToSpaNavigation: () => () => void;
|
|
63
|
-
subscribeContactLinkAutoTrack: () => () => void;
|
|
64
|
-
setTrackingConsent: typeof setJmpTrackingConsent;
|
|
65
|
-
isTrackingConsentGranted: typeof isJmpTrackingConsentGranted;
|
|
66
|
-
};
|
|
67
|
-
type JmpAnalytics = ReturnType<typeof createJmpAnalytics>;
|
|
68
|
-
|
|
69
|
-
export { BOOKING_LINK_HOSTS as B, type ClassifiedContactLink as C, type JmpAnalytics as J, subscribeJmpTrackingConsent as a, type ContactLinkChannel as b, classifyContactHref as c, createJmpAnalytics as d, isJmpTrackingConsentGranted as i, setJmpTrackingConsent as s };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { o as JmpAnalyticsConfig, p as JmpEventType, T as TrackPageViewOptions, q as TrackLeadOptions } from './types-BdC3SRH-.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Classify outbound contact links for auto-tracking.
|
|
5
|
-
*
|
|
6
|
-
* Keep channel set in sync with `lib/ingest/contact-click.ts` on the dashboard side.
|
|
7
|
-
*
|
|
8
|
-
* Channels detected from `href` alone (no widget / iframe detection):
|
|
9
|
-
*
|
|
10
|
-
* - `call` — `tel:` (delegates to existing `trackCallClick`)
|
|
11
|
-
* - `email` — `mailto:` (delegates to existing `trackEmailClick`)
|
|
12
|
-
* - `sms` — `sms:` / `smsto:`
|
|
13
|
-
* - `whatsapp` — `wa.me`, `api.whatsapp.com`, `whatsapp.com/send`
|
|
14
|
-
* - `maps` — Google Maps, Apple Maps, `maps.app.goo.gl`, `geo:`
|
|
15
|
-
* - `booking` — fixed allowlist of common scheduling hosts (see {@link BOOKING_LINK_HOSTS})
|
|
16
|
-
*
|
|
17
|
-
* `linkHost` returned in `contact_click` results is the hostname only — never the full URL
|
|
18
|
-
* (avoids leaking phone numbers in `tel:`/`sms:` URLs and PII-laden booking query strings).
|
|
19
|
-
*/
|
|
20
|
-
type ContactLinkChannel = "sms" | "whatsapp" | "maps" | "booking";
|
|
21
|
-
type ClassifiedContactLink = {
|
|
22
|
-
kind: "call";
|
|
23
|
-
} | {
|
|
24
|
-
kind: "email";
|
|
25
|
-
} | {
|
|
26
|
-
kind: "contact_click";
|
|
27
|
-
channel: ContactLinkChannel;
|
|
28
|
-
linkHost: string | null;
|
|
29
|
-
};
|
|
30
|
-
/** v1 booking hosts (~80%+ SMB coverage). Add hosts here when a client uses something rare. */
|
|
31
|
-
declare const BOOKING_LINK_HOSTS: readonly ["calendly.com", "cal.com", "acuityscheduling.com", "calendar.google.com", "calendar.app.google", "bookings.microsoft.com", "outlook.office.com", "outlook.office365.com", "book.ms", "setmore.com", "simplybook.me", "oncehub.com", "scheduleonce.com", "youcanbook.me", "savvycal.com", "tidycal.com", "zohobookings.com", "square.site", "squareup.com", "meetings.hubspot.com", "jobber.com", "housecallpro.com", "servicetitan.com", "thryv.com", "honeybook.com", "dubsado.com", "fresha.com", "booksy.com", "vagaro.com", "mindbodyonline.com", "mindbody.io", "janeapp.com", "cliniko.com", "practicebetter.io"];
|
|
32
|
-
declare function classifyContactHref(href: string): ClassifiedContactLink | null;
|
|
33
|
-
|
|
34
|
-
/** Whether analytics events may be sent (after CMP / cookie banner). */
|
|
35
|
-
declare function isJmpTrackingConsentGranted(): boolean;
|
|
36
|
-
/** Subscribe to consent changes (for React `useSyncExternalStore`). */
|
|
37
|
-
declare function subscribeJmpTrackingConsent(listener: () => void): () => void;
|
|
38
|
-
/**
|
|
39
|
-
* Grant or deny analytics. Persists in `localStorage` when `requireConsent` is used.
|
|
40
|
-
* Call from your cookie banner before tracking runs.
|
|
41
|
-
*/
|
|
42
|
-
declare function setJmpTrackingConsent(granted: boolean): void;
|
|
43
|
-
|
|
44
|
-
declare function createJmpAnalytics(config: JmpAnalyticsConfig): {
|
|
45
|
-
track: (type: JmpEventType, payload: {
|
|
46
|
-
path: string;
|
|
47
|
-
metadata?: Record<string, unknown>;
|
|
48
|
-
source?: string;
|
|
49
|
-
device?: string;
|
|
50
|
-
country?: string;
|
|
51
|
-
}) => Promise<void>;
|
|
52
|
-
trackPageView: (options?: TrackPageViewOptions) => Promise<void>;
|
|
53
|
-
trackFormSubmit: (path: string, metadata?: Record<string, unknown>) => Promise<void>;
|
|
54
|
-
trackCallClick: (path: string, metadata?: Record<string, unknown>) => Promise<void>;
|
|
55
|
-
trackEmailClick: (path: string, metadata?: Record<string, unknown>) => Promise<void>;
|
|
56
|
-
trackContactClick: (path: string, options: {
|
|
57
|
-
channel: ContactLinkChannel;
|
|
58
|
-
linkHost?: string | null;
|
|
59
|
-
metadata?: Record<string, unknown>;
|
|
60
|
-
}) => Promise<void>;
|
|
61
|
-
trackLead: (options?: TrackLeadOptions) => Promise<void>;
|
|
62
|
-
subscribeToSpaNavigation: () => () => void;
|
|
63
|
-
subscribeContactLinkAutoTrack: () => () => void;
|
|
64
|
-
setTrackingConsent: typeof setJmpTrackingConsent;
|
|
65
|
-
isTrackingConsentGranted: typeof isJmpTrackingConsentGranted;
|
|
66
|
-
};
|
|
67
|
-
type JmpAnalytics = ReturnType<typeof createJmpAnalytics>;
|
|
68
|
-
|
|
69
|
-
export { BOOKING_LINK_HOSTS as B, type ClassifiedContactLink as C, type JmpAnalytics as J, subscribeJmpTrackingConsent as a, type ContactLinkChannel as b, classifyContactHref as c, createJmpAnalytics as d, isJmpTrackingConsentGranted as i, setJmpTrackingConsent as s };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public env vars for JMP — supports Next.js (`NEXT_PUBLIC_*`) and Astro (`PUBLIC_*`).
|
|
3
|
-
* Server/build: `process.env`. Astro client bundles: pass overrides from `import.meta.env`.
|
|
4
|
-
*/
|
|
5
|
-
type JmpPublicEnv = {
|
|
6
|
-
analyticsUrl?: string;
|
|
7
|
-
trackingKey?: string;
|
|
8
|
-
requireConsent?: boolean;
|
|
9
|
-
autoContactLinks?: boolean;
|
|
10
|
-
};
|
|
11
|
-
/** Read dashboard URL + tracking key from Node / build-time env. */
|
|
12
|
-
declare function readJmpPublicEnvFromProcess(overrides?: Partial<JmpPublicEnv>): JmpPublicEnv;
|
|
13
|
-
|
|
14
|
-
export { type JmpPublicEnv as J, readJmpPublicEnvFromProcess as r };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public env vars for JMP — supports Next.js (`NEXT_PUBLIC_*`) and Astro (`PUBLIC_*`).
|
|
3
|
-
* Server/build: `process.env`. Astro client bundles: pass overrides from `import.meta.env`.
|
|
4
|
-
*/
|
|
5
|
-
type JmpPublicEnv = {
|
|
6
|
-
analyticsUrl?: string;
|
|
7
|
-
trackingKey?: string;
|
|
8
|
-
requireConsent?: boolean;
|
|
9
|
-
autoContactLinks?: boolean;
|
|
10
|
-
};
|
|
11
|
-
/** Read dashboard URL + tracking key from Node / build-time env. */
|
|
12
|
-
declare function readJmpPublicEnvFromProcess(overrides?: Partial<JmpPublicEnv>): JmpPublicEnv;
|
|
13
|
-
|
|
14
|
-
export { type JmpPublicEnv as J, readJmpPublicEnvFromProcess as r };
|
package/dist/index.d.cts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
export { b as buildLandingCaptureInlineScript } from './landing-capture-C8pyZWuF.cjs';
|
|
2
|
-
import { J as JmpAnalytics } from './create-jmp-analytics-lkGcysG_.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-lkGcysG_.cjs';
|
|
4
|
-
import { m as JmpContentConfig, r as TrackServerPageViewOptions, h as JmpTrustBundle, k as JmpContentWrapper, d as JmpLandingPageKind, b as JmpLandingPage, c as JmpLandingPageDetail, J as JmpBlogPost, s as JmpBlogPostDetail, t as JmpFaqItemDetail, a as JmpFaqItem, e as JmpLandingPageSitemapEntry, j as JmpWebsiteLocationDetail, i as JmpWebsiteLocation, f as JmpSiteProfile, o as JmpAnalyticsConfig } from './types-BdC3SRH-.cjs';
|
|
5
|
-
export { u as JmpContactExtraManifest, v as JmpContentLocaleAlternate, l as JmpContentManifest, w as JmpContentRouteManifest, x as JmpContentWrapperReportMode, y as JmpCredential, p as JmpEventType, z as JmpPartnerLogo, n as JmpServerRequestLike, g as JmpTestimonial, A as JmpTrustBlockManifest, B as JmpTrustSection, C as JmpTrustStat, D as JmpTrustSummary, L as LeadMetadata, E as LeadMetadataValue, q as TrackLeadOptions, T as TrackPageViewOptions, F as normalizeJmpContentManifest, G as stableJmpManifestFingerprint } from './types-BdC3SRH-.cjs';
|
|
6
|
-
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-BMlEQ_8g.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;
|
|
15
|
-
|
|
16
|
-
declare function trackJmpServerPageView(config: JmpContentConfig, options?: TrackServerPageViewOptions): Promise<void>;
|
|
17
|
-
|
|
18
|
-
declare function markContentWrapper(slot: JmpContentWrapper | string): void;
|
|
19
|
-
declare function inferTrustWrapperSlots(bundle: JmpTrustBundle): string[];
|
|
20
|
-
declare function getDiscoveredContentWrappers(): string[];
|
|
21
|
-
declare function resetContentWrapperDiscoveryForTests(): void;
|
|
22
|
-
|
|
23
|
-
declare function getJmpBlogPosts(config: JmpContentConfig, filters?: {
|
|
24
|
-
locale?: string;
|
|
25
|
-
}): Promise<JmpBlogPost[]>;
|
|
26
|
-
declare function getJmpBlogPost(config: JmpContentConfig, slug: string, locale?: string): Promise<JmpBlogPost | null>;
|
|
27
|
-
declare function getJmpBlogPostDetail(config: JmpContentConfig, slug: string, locale?: string): Promise<JmpBlogPostDetail | null>;
|
|
28
|
-
declare function getJmpFaqs(config: JmpContentConfig, filters?: {
|
|
29
|
-
locale?: string;
|
|
30
|
-
}): Promise<JmpFaqItem[]>;
|
|
31
|
-
declare function getJmpFaqDetail(config: JmpContentConfig, slug: string, locale?: string): Promise<JmpFaqItemDetail | null>;
|
|
32
|
-
declare function getJmpLandingPages(config: JmpContentConfig, filters?: {
|
|
33
|
-
kind?: JmpLandingPageKind;
|
|
34
|
-
locale?: string;
|
|
35
|
-
}): Promise<JmpLandingPage[]>;
|
|
36
|
-
declare function getJmpLandingPageDetail(config: JmpContentConfig, kind: JmpLandingPageKind, slug: string, locale?: string): Promise<JmpLandingPageDetail | null>;
|
|
37
|
-
declare function getJmpLandingPageSitemap(config: JmpContentConfig): Promise<JmpLandingPageSitemapEntry[]>;
|
|
38
|
-
declare function getJmpLocations(config: JmpContentConfig): Promise<JmpWebsiteLocation[]>;
|
|
39
|
-
declare function getJmpLocationDetail(config: JmpContentConfig, slug: string): Promise<JmpWebsiteLocationDetail | null>;
|
|
40
|
-
declare function getJmpTrustBundle(config: JmpContentConfig): Promise<JmpTrustBundle>;
|
|
41
|
-
declare function getJmpSiteProfile(config: JmpContentConfig): Promise<JmpSiteProfile>;
|
|
42
|
-
declare function getJmpRobotsTxt(config: JmpContentConfig): Promise<string>;
|
|
43
|
-
/**
|
|
44
|
-
* Tell the JMP dashboard which content wrappers this site wires (blog, faq, trust.*, contact).
|
|
45
|
-
* Uses auto-discovered slots from content API usage unless `contentWrapperMode` is `manual`.
|
|
46
|
-
* Safe to call on every cold start; dedupes by tracking key + wrapper list.
|
|
47
|
-
*/
|
|
48
|
-
declare function registerJmpContentWrappers(config: JmpContentConfig): Promise<{
|
|
49
|
-
ok: true;
|
|
50
|
-
wrappers: string[];
|
|
51
|
-
} | {
|
|
52
|
-
ok: false;
|
|
53
|
-
skipped: true;
|
|
54
|
-
}>;
|
|
55
|
-
|
|
56
|
-
declare function createJmpContentClient(config: JmpContentConfig): {
|
|
57
|
-
getBlogPosts: (filters?: {
|
|
58
|
-
locale?: string;
|
|
59
|
-
}) => Promise<JmpBlogPost[]>;
|
|
60
|
-
getBlogPost: (slug: string, locale?: string) => Promise<JmpBlogPost | null>;
|
|
61
|
-
getFaqs: (filters?: {
|
|
62
|
-
locale?: string;
|
|
63
|
-
}) => Promise<JmpFaqItem[]>;
|
|
64
|
-
getLandingPages: (filters?: Parameters<typeof getJmpLandingPages>[1]) => Promise<JmpLandingPage[]>;
|
|
65
|
-
getLandingPageDetail: (kind: Parameters<typeof getJmpLandingPageDetail>[1], slug: string, locale?: string) => Promise<JmpLandingPageDetail | null>;
|
|
66
|
-
getLandingPageSitemap: () => Promise<JmpLandingPageSitemapEntry[]>;
|
|
67
|
-
getTrustBundle: () => Promise<JmpTrustBundle>;
|
|
68
|
-
getSiteProfile: () => Promise<JmpSiteProfile>;
|
|
69
|
-
getRobotsTxt: () => Promise<string>;
|
|
70
|
-
registerContentWrappers: () => Promise<{
|
|
71
|
-
ok: true;
|
|
72
|
-
wrappers: string[];
|
|
73
|
-
} | {
|
|
74
|
-
ok: false;
|
|
75
|
-
skipped: true;
|
|
76
|
-
}>;
|
|
77
|
-
};
|
|
78
|
-
type JmpContentClient = ReturnType<typeof createJmpContentClient>;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Browser / client bundle: reads `NEXT_PUBLIC_*` or Astro `PUBLIC_*` vars.
|
|
82
|
-
* Use for `createJmpAnalytics` on the client. Returns `null` if incomplete.
|
|
83
|
-
*/
|
|
84
|
-
declare function getJmpBrowserAnalyticsConfigFromEnv(overrides?: Partial<JmpAnalyticsConfig>): JmpAnalyticsConfig | null;
|
|
85
|
-
/**
|
|
86
|
-
* Server / Node (SSR, Route Handlers, `getStaticProps`, etc.):
|
|
87
|
-
* Same **`NEXT_PUBLIC_*`** vars as the browser (`NEXT_PUBLIC_JMP_ANALYTICS_URL` +
|
|
88
|
-
* `NEXT_PUBLIC_JMP_TRACKING_KEY`). Next.js injects these on the server for RSC/fetches.
|
|
89
|
-
* Returns `null` if incomplete.
|
|
90
|
-
*/
|
|
91
|
-
declare function getJmpServerContentConfigFromEnv(overrides?: Partial<JmpContentConfig>): JmpContentConfig | null;
|
|
92
|
-
declare function isJmpBrowserAnalyticsEnvConfigured(): boolean;
|
|
93
|
-
declare function isJmpServerContentEnvConfigured(): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* One `JmpAnalytics` instance per browser tab (module singleton). Safe for page views and events.
|
|
96
|
-
* Returns `null` on the server or when public env vars are missing.
|
|
97
|
-
*/
|
|
98
|
-
declare function getOrCreateJmpAnalyticsFromBrowserEnv(overrides?: Partial<JmpAnalyticsConfig>): JmpAnalytics | null;
|
|
99
|
-
/**
|
|
100
|
-
* `createJmpContentClient` using server env resolution. Returns `null` if env is incomplete.
|
|
101
|
-
*/
|
|
102
|
-
declare function createJmpContentClientFromServerEnv(overrides?: Partial<JmpContentConfig>): JmpContentClient | null;
|
|
103
|
-
|
|
104
|
-
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, JmpSiteProfile, JmpTrustBundle, JmpWebsiteLocation, JmpWebsiteLocationDetail, TrackServerPageViewOptions, createJmpContentClient, createJmpContentClientFromServerEnv, getDiscoveredContentWrappers, getJmpBlogPost, getJmpBlogPostDetail, getJmpBlogPosts, getJmpBrowserAnalyticsConfigFromEnv, getJmpFaqDetail, getJmpFaqs, getJmpLandingPageDetail, getJmpLandingPageSitemap, getJmpLandingPages, getJmpLocationDetail, getJmpLocations, getJmpRobotsTxt, getJmpServerContentConfigFromEnv, getJmpSiteProfile, getJmpTrustBundle, getOrCreateJmpAnalyticsFromBrowserEnv, inferTrustWrapperSlots, isJmpBrowserAnalyticsEnvConfigured, isJmpServerContentEnvConfigured, markContentWrapper, registerJmpContentWrappers, resetContentWrapperDiscoveryForTests, trackJmpServerPageView };
|