@fayz-ai/storefront 0.79.0 → 0.79.1
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/bus.d.ts +3 -2
- package/dist/analytics/bus.d.ts.map +1 -1
- package/dist/{chunk-3C4WJIOI.js → chunk-6H5VD6OB.js} +8 -15
- package/dist/chunk-6H5VD6OB.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/render.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-3C4WJIOI.js.map +0 -1
package/dist/analytics/bus.d.ts
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* analytics vendor: components report here, and whatever is listening (the
|
|
4
4
|
* PostHog client, a test, nothing) decides what to do with it.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* The page's recent events are kept and handed to every listener when it
|
|
7
|
+
* starts, so the first product view of a page load reaches a client that is
|
|
8
|
+
* still loading — each listener hears each event once.
|
|
8
9
|
*/
|
|
9
10
|
export type StorefrontEventName = 'product_viewed' | 'product_added_to_cart' | 'product_removed_from_cart' | 'cart_viewed' | 'coupon_applied' | 'checkout_started' | 'checkout_step_viewed' | 'checkout_payment_selected' | 'checkout_error' | 'checkout_completed' | 'delivery_exit';
|
|
10
11
|
export type StorefrontEventProperties = Record<string, string | number | boolean | null | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bus.d.ts","sourceRoot":"","sources":["../../src/analytics/bus.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bus.d.ts","sourceRoot":"","sources":["../../src/analytics/bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,mBAAmB,GAC3B,gBAAgB,GAChB,uBAAuB,GACvB,2BAA2B,GAC3B,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,sBAAsB,GACtB,2BAA2B,GAC3B,gBAAgB,GAChB,oBAAoB,GACpB,eAAe,CAAA;AAEnB,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAA;AAEpG,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,CAAA;IACzB,UAAU,EAAE,yBAAyB,CAAA;IACrC,EAAE,EAAE,MAAM,CAAA;CACX;AAED,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;AAChD,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;AAazC,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,EAAE,UAAU,GAAE,yBAA8B,GAAG,IAAI,CAa3G;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI,CAMhE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAS3D;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,IAAI,CAMlE;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI,CAMnE;AAED,kEAAkE;AAClE,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM,CAEvE;AAED,mDAAmD;AACnD,wBAAgB,qBAAqB,IAAI,IAAI,CAQ5C"}
|
|
@@ -464,11 +464,8 @@ function trackStorefront(name, properties = {}) {
|
|
|
464
464
|
if (typeof window === "undefined") return;
|
|
465
465
|
const event = { name, properties, at: Date.now() };
|
|
466
466
|
lastAt.set(name, event.at);
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
if (pending.length > MAX_PENDING) pending = pending.slice(-MAX_PENDING);
|
|
470
|
-
return;
|
|
471
|
-
}
|
|
467
|
+
pending.push(event);
|
|
468
|
+
if (pending.length > MAX_PENDING) pending = pending.slice(-MAX_PENDING);
|
|
472
469
|
for (const listener of listeners) {
|
|
473
470
|
try {
|
|
474
471
|
listener(event);
|
|
@@ -478,14 +475,10 @@ function trackStorefront(name, properties = {}) {
|
|
|
478
475
|
}
|
|
479
476
|
function onStorefrontEvent(listener) {
|
|
480
477
|
listeners.add(listener);
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
try {
|
|
486
|
-
listener(event);
|
|
487
|
-
} catch {
|
|
488
|
-
}
|
|
478
|
+
for (const event of pending) {
|
|
479
|
+
try {
|
|
480
|
+
listener(event);
|
|
481
|
+
} catch {
|
|
489
482
|
}
|
|
490
483
|
}
|
|
491
484
|
return () => {
|
|
@@ -15167,5 +15160,5 @@ ${formatErrors(report.errors)}`;
|
|
|
15167
15160
|
}
|
|
15168
15161
|
|
|
15169
15162
|
export { AddressForm, AddressSheet, AddressStrip, BEFORE_PLACE_ORDER_VALVE, BLOCK_STRUCTURAL_KEYS, BUYER_COUNTRY_COOKIE, BenefitsRow, BlockDataError, CART_LINE_ANNOTATION_POINT, CATALOG_BODY_BLOCK, CHECKOUT_FIELD_POINT, CartDrawer, CatalogPage, CategoryShowcase, CheckoutPage, ClosedStoreDialog, CollectionCta, CollectionHero, ContentPage, CountdownBand, CountrySelect, DeliverToPicker, EmailConfirmationRequiredError, EntityListBlock, FaqSection, FiltersPanel, FormBlock, HeroSection, ImageTiles, ItemSheet, Link, MESSAGES, ManifestoBlock, MediaCarousel, MenuItemRow, MenuPage, MenuToolbar, MotifStrip, MyPurchasesPage, NewsletterBand, ORDER_METADATA_POINT, OrderConfirmationPage, OrderTrackingTimeline, PAGE_DATA_SCRIPT_ID, PLACEHOLDER_ASPECTS, PRODUCT_BODY_BLOCK, PRODUCT_CARD_BADGE_POINT, PageDataScope, PaymentTerms, Price, ProductCard, ProductDetailPage, ProductEnquiryForm, ProductGallery, ProductGrid, ProductOptionSelector, ProductRail, ProductReviews, ProductSlider, ProductSpecs, ProductSpotlight, PromoBanner, QuantityInput, Reveal, STOREFRONT_COMPONENT_KEYS, STOREFRONT_PAGE_KINDS, STOREFRONT_SLOTS, 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, ScheduleSheet, SealsBand, SearchOverlay, ServiceHoursModal, Slot, SmoothImage, StepsSection, StoreCover, StorefrontAnalytics, StorefrontConfigHost, StorefrontConfigProvider, StorefrontFooter, StorefrontHeader, StorefrontPage, StorefrontRouterProvider, StorefrontShell, StorefrontThemeStyle, StoryQuote, THEME_SCALE_FIELDS, THEME_SCALE_VAR_PREFIX, TID, Testimonials, TierCards, applyDeliveryPolicy, applyStoreSettings, bannerPlaceholder, blockInstanceId, buildEnquiryFromForm, checkPageBlocks, collectDataNeeds, collectOrderMetadata, contentPagePath, createStorefront, createStorefrontApp, currentStaticRenderPass, defaultPageBlocks, entityListBlockMeta, establishCustomerSession, exportStore, formatMoney, formatProductOptionSelection, getCartLineAnnotations, getCheckoutFieldContributions, getCustomerAuthAdapter, getProductCardBadges, getProductOptionGroups, hydrateStoreDocument, hydratedEntriesFor, identifyStorefrontBuyer, initStorefrontRuntime, isJsonValue, isKnownPath, isNestedBlockRef, isPublicPath, isRecord, listSlots, marketForCountry, marketUnitPrice, matchContentPage, matchPath, matchesFacets, mergeCollectionFacet, mergePageTheme, navigateTo, nextMilestone, normalizeLanguage, normalizeProductOptionSelection, onStorefrontEvent, orderGalleryImages, overrideComponent, overrideProps, pageSeo, pageThemeSelector, pickProductCardImage, placeStorefrontOrder, prefersReducedMotion, primaryImageUrl, productCardComponentContract, productJsonLd, productOptionSelectionKey, productPlaceholder, productSeo, readHydratedPageData, registerStorefrontBlocks, registerStorefrontEntities, registerStorefrontExtensionPoints, registerStorefrontLoaders, resetPageDiagnostics, resetProductOptionsDeprecationWarnings, resetStorefrontExtensionPoints, resolveAuthAdapter, resolveConfig, resolveDataParams, resolveOverride, resolvePageData, resolvePageDataNeed, resolvePaymentTerms, resolveStorefrontProvider, resolveStorefrontRoute, resolveVariantForSelection, roundCents, routePathParams, runBeforePlaceOrderValve, sectionToJsonSchema, sectionsToBlocks, selectCount, selectDiscountTotal, selectIsOpen, selectRequiresShipping, selectShipping, selectShowsHours, selectSubtotal, selectTotal, selectionPrice, serializePageData, shellRouterAdapter, signInByEmail, signOutCustomer, signUpCustomer, slugifyStoreName, startStorefrontPostHog, storeBuyerId, storefrontComponentContracts, storefrontPaths, themeToCss, toBlockNodes, toFacetMap, trackStorefront, translate, useBlockData, useBuyerCountry, useBuyerStore, useCartStore, useCatalogStore, useCategories, useDeliveryStore, useDiscountValidator, useEnquiry, useHashPath, useInView, useLoader, useMarketProduct, useMarketStore, useMyOrders, useNavigate, usePopOnChange, useProduct, useProducts, useRoutePath, useRouterAdapter, useScrollToTopOnNavigate, useScrolled, useServiceStore, useSessionStore, useSlotContext, useStorefrontActions, useStorefrontConfig, useStorefrontConfigOptional, useStorefrontHead, useStorefrontPage, useStorefrontPageOptional, useT, usedSlots, validateStore, withFacet, withMarketPrice, withStaticRenderPass };
|
|
15170
|
-
//# sourceMappingURL=chunk-
|
|
15171
|
-
//# sourceMappingURL=chunk-
|
|
15163
|
+
//# sourceMappingURL=chunk-6H5VD6OB.js.map
|
|
15164
|
+
//# sourceMappingURL=chunk-6H5VD6OB.js.map
|