@fayz-ai/storefront 0.85.2 → 0.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/index.d.ts +1 -0
- package/dist/analytics/index.d.ts.map +1 -1
- package/dist/analytics/meta-pageview.d.ts +23 -0
- package/dist/analytics/meta-pageview.d.ts.map +1 -0
- package/dist/analytics/meta-pixel.d.ts +11 -5
- package/dist/analytics/meta-pixel.d.ts.map +1 -1
- package/dist/{chunk-BR3XHNVM.js → chunk-2JMPPAXL.js} +3 -3
- package/dist/{chunk-BR3XHNVM.js.map → chunk-2JMPPAXL.js.map} +1 -1
- package/dist/{chunk-ELW7QWDJ.js → chunk-G4WCU526.js} +4 -3
- package/dist/chunk-G4WCU526.js.map +1 -0
- package/dist/{chunk-CE4U65TZ.js → chunk-Z2NKBC42.js} +41 -3
- package/dist/chunk-Z2NKBC42.js.map +1 -0
- package/dist/edge.js +5 -1
- package/dist/edge.js.map +1 -1
- package/dist/host/edge-handler.d.ts.map +1 -1
- package/dist/host/store-host.d.ts +9 -0
- package/dist/host/store-host.d.ts.map +1 -1
- package/dist/host.js +39 -9
- package/dist/host.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/render.js +3 -3
- package/dist/tanstack.js +2 -2
- package/package.json +4 -4
- package/dist/chunk-CE4U65TZ.js.map +0 -1
- package/dist/chunk-ELW7QWDJ.js.map +0 -1
|
@@ -2,5 +2,6 @@ export { trackStorefront, onStorefrontEvent, identifyStorefrontBuyer, onStorefro
|
|
|
2
2
|
export { storeBuyerId } from './identity';
|
|
3
3
|
export { startStorefrontPostHog, type StorefrontAnalyticsConfig, type StorefrontPostHogConfig } from './posthog';
|
|
4
4
|
export { startStorefrontMetaPixel, metaEventFor, type StorefrontMetaPixelConfig, type MetaEvent } from './meta-pixel';
|
|
5
|
+
export { metaPageViewInlineScript, sendMetaPageView } from './meta-pageview';
|
|
5
6
|
export { StorefrontAnalytics, isOrderingPath, cartChanges } from './StorefrontAnalytics';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,sBAAsB,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,WAAW,CAAA;AAChH,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AACrH,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,sBAAsB,EAAE,KAAK,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,WAAW,CAAA;AAChH,OAAO,EAAE,wBAAwB,EAAE,YAAY,EAAE,KAAK,yBAAyB,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AACrH,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare global {
|
|
2
|
+
interface Window {
|
|
3
|
+
/** Sends a PageView for the current URL (inline boot script). Returns its event id. */
|
|
4
|
+
__fzMetaPV?: () => string;
|
|
5
|
+
/** The URL (path + query) the last PageView was sent for. */
|
|
6
|
+
__fzMetaPVLast?: string;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
/** Crawlers and unfurlers are not visits. Real browsers, PageSpeed included, are. */
|
|
10
|
+
export declare const META_PAGEVIEW_BOT_UA = "bot|crawl|spider|slurp|facebookexternalhit|bingpreview|whatsapp|telegram";
|
|
11
|
+
/**
|
|
12
|
+
* The inline <head> script for `pixelId` (digits only — anything else returns
|
|
13
|
+
* an empty string, so a bad id can never become script text).
|
|
14
|
+
*/
|
|
15
|
+
export declare function metaPageViewInlineScript(pixelId: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Report a page view for the URL the visitor is on now. Returns false when the
|
|
18
|
+
* boot script is not on the page (a host that does not inline it), so the
|
|
19
|
+
* caller can fall back to fbevents.js. A second call for the URL the last view
|
|
20
|
+
* was sent for is a no-op: hydration re-running the route effect is not a view.
|
|
21
|
+
*/
|
|
22
|
+
export declare function sendMetaPageView(): boolean;
|
|
23
|
+
//# sourceMappingURL=meta-pageview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta-pageview.d.ts","sourceRoot":"","sources":["../../src/analytics/meta-pageview.ts"],"names":[],"mappings":"AA0BA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,uFAAuF;QACvF,UAAU,CAAC,EAAE,MAAM,MAAM,CAAA;QACzB,6DAA6D;QAC7D,cAAc,CAAC,EAAE,MAAM,CAAA;KACxB;CACF;AAED,qFAAqF;AACrF,eAAO,MAAM,oBAAoB,6EAA6E,CAAA;AAE9G;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4BhE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAK1C"}
|
|
@@ -44,10 +44,11 @@ export declare function metaEventFor(event: StorefrontEvent, currency: string):
|
|
|
44
44
|
* it is deferred to the visitor's first interaction (tap, scroll, key) or 3 s
|
|
45
45
|
* after load, whichever comes first.
|
|
46
46
|
*
|
|
47
|
-
* The
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
47
|
+
* The PageView does not wait for it: the host inlines a boot script
|
|
48
|
+
* (meta-pageview.ts) that sets `_fbp`/`_fbc` and sends the view while the page
|
|
49
|
+
* is still parsing, so a paid visitor who leaves within a second is still
|
|
50
|
+
* counted. Everything else — ViewContent, AddToCart, Purchase — goes through
|
|
51
|
+
* `fbq`, which queues every call until the script runs.
|
|
51
52
|
*/
|
|
52
53
|
export declare const META_PIXEL_DELAY_MS = 3000;
|
|
53
54
|
/**
|
|
@@ -57,7 +58,12 @@ export declare const META_PIXEL_DELAY_MS = 3000;
|
|
|
57
58
|
export declare function startStorefrontMetaPixel(config: StorefrontMetaPixelConfig, context: {
|
|
58
59
|
currency: string;
|
|
59
60
|
}): void;
|
|
60
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* A page view for the current route. Sent by the inline boot script's beacon
|
|
63
|
+
* when the host put it on the page — never by fbevents.js as well, so one view
|
|
64
|
+
* is one event in Meta. Without the boot script (a host that does not inline
|
|
65
|
+
* it), fbevents.js reports it as before.
|
|
66
|
+
*/
|
|
61
67
|
export declare function trackMetaPageView(): void;
|
|
62
68
|
/** Test seam. */
|
|
63
69
|
export declare function resetStorefrontMetaPixel(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta-pixel.d.ts","sourceRoot":"","sources":["../../src/analytics/meta-pixel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,eAAe,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"meta-pixel.d.ts","sourceRoot":"","sources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BAAgB,iBAAiB,IAAI,IAAI,CAIxC;AAED,iBAAiB;AACjB,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registerStorefrontBlocks, THEME_SCALE_FIELDS, THEME_SCALE_VAR_PREFIX } from './chunk-
|
|
1
|
+
import { registerStorefrontBlocks, THEME_SCALE_FIELDS, THEME_SCALE_VAR_PREFIX } from './chunk-G4WCU526.js';
|
|
2
2
|
import { STOREFRONT_SLOTS } from './chunk-OOQRYH3N.js';
|
|
3
3
|
import { toBlockNodes, routePathParams } from './chunk-SLJ4BRXD.js';
|
|
4
4
|
import { listEntityDeclarations, resolveHandle, errorMessage, RESERVED_ENTITY_FIELDS, ENTITY_FIELD_TYPES, handleNameFor, registerHandle, checkBlockConstraints, hasHandle, listHandles, blockRegistry, getBlockMeta, loaderRegistry, listLoaders, isLoaderParamRef, isLoaderPropRef } from '@fayz-ai/core';
|
|
@@ -1333,5 +1333,5 @@ ${formatErrors(report.errors)}`;
|
|
|
1333
1333
|
}
|
|
1334
1334
|
|
|
1335
1335
|
export { STOREFRONT_COMPONENT_KEYS, STOREFRONT_PAGE_KINDS, STORE_BACKEND_PROVIDERS, STORE_COMMERCE_MODES, STORE_DOCUMENT_KIND, STORE_PAYMENT_METHOD_KINDS, STORE_PAYMENT_MODES, STORE_ROUTE_CHROMES, STORE_ROUTE_KINDS, STORE_SECTIONS, STORE_SECTION_NAMES, exportStore, hydrateStoreDocument, isJsonValue, isRecord, sectionToJsonSchema, slugifyStoreName, validateStore };
|
|
1336
|
-
//# sourceMappingURL=chunk-
|
|
1337
|
-
//# sourceMappingURL=chunk-
|
|
1336
|
+
//# sourceMappingURL=chunk-2JMPPAXL.js.map
|
|
1337
|
+
//# sourceMappingURL=chunk-2JMPPAXL.js.map
|