@vio-live/web-sdk 0.4.2 → 0.5.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/{chunk-D6IA4ZWL.js → chunk-5CKG3F56.js} +93 -3
- package/dist/chunk-5CKG3F56.js.map +1 -0
- package/dist/{chunk-KMIARP6X.js → chunk-HNQG56SD.js} +511 -6
- package/dist/chunk-HNQG56SD.js.map +1 -0
- package/dist/chunk-QYQQ5J6E.js +3 -0
- package/dist/{chunk-PBQSHIID.js.map → chunk-QYQQ5J6E.js.map} +1 -1
- package/dist/core/index.d.ts +166 -1
- package/dist/core/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +3 -3
- package/dist/{tokens-DjVcB-RL.d.ts → tokens-TIH4RkPl.d.ts} +8 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-D6IA4ZWL.js.map +0 -1
- package/dist/chunk-KMIARP6X.js.map +0 -1
- package/dist/chunk-PBQSHIID.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-QYQQ5J6E.js"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ interface VioConfig {
|
|
|
20
20
|
apiBase?: string;
|
|
21
21
|
/** Override GraphQL base. Defaults are env-aware. */
|
|
22
22
|
graphQLBase?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Override the analytics collector base (vio-analytics service).
|
|
25
|
+
* Defaults are env-aware (`events-dev`/`events-staging`/`events.vio.live`).
|
|
26
|
+
*/
|
|
27
|
+
eventsBase?: string;
|
|
23
28
|
/**
|
|
24
29
|
* Stripe **publishable** key (`pk_test_xxx` or `pk_live_xxx`). Used for
|
|
25
30
|
* Apple Pay (via Payment Request) and Card flows. Public-safe — fine
|
|
@@ -45,6 +50,7 @@ interface ResolvedConfig {
|
|
|
45
50
|
environment: Environment;
|
|
46
51
|
apiBase: string;
|
|
47
52
|
graphQLBase: string;
|
|
53
|
+
eventsBase: string;
|
|
48
54
|
stripePublishableKey?: string;
|
|
49
55
|
klarnaClientId?: string;
|
|
50
56
|
klarnaEnvironment: 'playground' | 'production';
|
|
@@ -929,6 +935,150 @@ declare class CheckoutManager extends EventTarget {
|
|
|
929
935
|
private emit;
|
|
930
936
|
}
|
|
931
937
|
|
|
938
|
+
/**
|
|
939
|
+
* Vio.analytics — the web SDK's half of the Vio Analytics pipeline.
|
|
940
|
+
*
|
|
941
|
+
* Events flow to the Vio collector (`POST <eventsBase>/v1/events`, repo
|
|
942
|
+
* vio-live/vio-analytics) which owns raw storage (ClickHouse) and vendor
|
|
943
|
+
* fan-out (Mixpanel today). THE SDK NEVER TALKS TO VENDORS — swapping or
|
|
944
|
+
* dropping a vendor is a server-side change, zero client releases.
|
|
945
|
+
* Wire contract: vio-analytics `docs/EVENTS_CONTRACT.md` (v1, snake_case).
|
|
946
|
+
*
|
|
947
|
+
* Design rules:
|
|
948
|
+
* - SIDE-EFFECT-FREE MODULE. Nothing runs at import time (tsup/tree-shaking
|
|
949
|
+
* contract, see lessons/web-sdk-tsup-singleton-and-build). Listeners are
|
|
950
|
+
* installed by an explicit `Vio.analytics.start()`.
|
|
951
|
+
* - `track()` works BEFORE `Vio.init()` — events queue and flush once the
|
|
952
|
+
* SDK is configured (transport resolves at flush time, not at track time).
|
|
953
|
+
* - SSR-safe: without `window` every call is a silent no-op.
|
|
954
|
+
* - Retries are safe: `event_id` is stable per event, the collector
|
|
955
|
+
* dedupes. Queue is bounded (drop-oldest) so a dead collector can never
|
|
956
|
+
* grow memory unbounded.
|
|
957
|
+
* - Anti-double-count: the SDK only reports what the server can't see.
|
|
958
|
+
* Votes/participations are server truth; `ad_activation`/`cart_intent`
|
|
959
|
+
* are mirrored server-side, never from here.
|
|
960
|
+
*
|
|
961
|
+
* Three sinks, matching the Vev precedent (vio-vev analytics.ts, which
|
|
962
|
+
* becomes an adapter over this in F3):
|
|
963
|
+
* 1. collector (default ON once started)
|
|
964
|
+
* 2. window.dataLayer — GA4/GTM (opt-in `start({ dataLayer: true })`,
|
|
965
|
+
* the publisher-facing feature; NOT part of the Vio pipeline)
|
|
966
|
+
* 3. `vio:analytics` DOM event — always when started (inspector/bridges)
|
|
967
|
+
*/
|
|
968
|
+
declare const ANALYTICS_EVENT_NAMES: readonly ["view_item_list", "select_item", "view_item", "add_to_cart", "view_cart", "begin_checkout", "purchase", "component_impression", "component_click", "ad_impression", "ad_click", "poll_impression", "contest_impression", "session_start", "session_end"];
|
|
969
|
+
type AnalyticsEventName = (typeof ANALYTICS_EVENT_NAMES)[number];
|
|
970
|
+
/** Camel-case for DX; mapped to the snake_case wire format at build time. */
|
|
971
|
+
interface AnalyticsContext {
|
|
972
|
+
campaignId?: number;
|
|
973
|
+
broadcastId?: string;
|
|
974
|
+
campaignComponentId?: number;
|
|
975
|
+
appPlacementId?: number;
|
|
976
|
+
locationId?: string;
|
|
977
|
+
componentTemplateId?: string;
|
|
978
|
+
sponsorId?: number;
|
|
979
|
+
activationId?: number;
|
|
980
|
+
contentUrl?: string;
|
|
981
|
+
variant?: string;
|
|
982
|
+
}
|
|
983
|
+
interface AnalyticsItemInput {
|
|
984
|
+
productId: number | string;
|
|
985
|
+
name?: string;
|
|
986
|
+
brand?: string;
|
|
987
|
+
variantId?: number | string;
|
|
988
|
+
price?: number;
|
|
989
|
+
quantity?: number;
|
|
990
|
+
}
|
|
991
|
+
interface AnalyticsCommerce {
|
|
992
|
+
items?: AnalyticsItemInput[];
|
|
993
|
+
value?: number;
|
|
994
|
+
currency?: string;
|
|
995
|
+
orderId?: string;
|
|
996
|
+
paymentMethod?: string;
|
|
997
|
+
}
|
|
998
|
+
interface TrackOptions {
|
|
999
|
+
context?: AnalyticsContext;
|
|
1000
|
+
commerce?: AnalyticsCommerce;
|
|
1001
|
+
props?: Record<string, unknown>;
|
|
1002
|
+
}
|
|
1003
|
+
interface AnalyticsStartOptions {
|
|
1004
|
+
/** Where the SDK is embedded: 'vev' | 'replit' | 'custom' | … Default 'custom'. */
|
|
1005
|
+
host?: string;
|
|
1006
|
+
/**
|
|
1007
|
+
* Install the automatic funnel listeners (vio:added-to-cart,
|
|
1008
|
+
* vio:checkout-open, vio:open-cart, vio:payment-success). Default true.
|
|
1009
|
+
* Hosts with their OWN instrumentation choke point (e.g. the Vev module,
|
|
1010
|
+
* which forwards every event through trackEvent()) set false so the same
|
|
1011
|
+
* user action is never tracked twice — they keep the session/batching/
|
|
1012
|
+
* transport engine and call track() themselves.
|
|
1013
|
+
*/
|
|
1014
|
+
autoTrack?: boolean;
|
|
1015
|
+
/** Send to the Vio collector. Default true. */
|
|
1016
|
+
collector?: boolean;
|
|
1017
|
+
/** Also push GA4 e-commerce events to window.dataLayer (publisher feature). */
|
|
1018
|
+
dataLayer?: boolean;
|
|
1019
|
+
/** console.debug every event. */
|
|
1020
|
+
debug?: boolean;
|
|
1021
|
+
}
|
|
1022
|
+
declare class AnalyticsManager extends EventTarget {
|
|
1023
|
+
private started;
|
|
1024
|
+
private options;
|
|
1025
|
+
private queue;
|
|
1026
|
+
private flushTimer;
|
|
1027
|
+
private retryAttempt;
|
|
1028
|
+
private retryNotBefore;
|
|
1029
|
+
private externalUserId;
|
|
1030
|
+
private sessionId;
|
|
1031
|
+
private sessionStartedAt;
|
|
1032
|
+
/** Impression once-per-(session, component) guard; reset on session rotation. */
|
|
1033
|
+
private impressedComponents;
|
|
1034
|
+
/** Last NON-EMPTY cart snapshot — `purchase` uses it because several flows
|
|
1035
|
+
* (Apple Pay) clear the cart BEFORE `vio:payment-success` fires. */
|
|
1036
|
+
private lastCartSnapshot;
|
|
1037
|
+
private teardown;
|
|
1038
|
+
/**
|
|
1039
|
+
* Install listeners + begin flushing. Explicit on purpose (no module
|
|
1040
|
+
* side-effects). Safe to call twice (second call only updates options).
|
|
1041
|
+
*/
|
|
1042
|
+
start(options?: AnalyticsStartOptions): void;
|
|
1043
|
+
/** Stop timers + listeners (tests / SPA unmount). Queue survives. */
|
|
1044
|
+
stop(): void;
|
|
1045
|
+
/** Attach the partner's user id (opaque) to all subsequent events. */
|
|
1046
|
+
identify(externalUserId: string | null): void;
|
|
1047
|
+
/** Queue one event. Works pre-init and pre-start (SSR: no-op). */
|
|
1048
|
+
track(name: AnalyticsEventName, opts?: TrackOptions): void;
|
|
1049
|
+
/**
|
|
1050
|
+
* Impression helper: observes an element and tracks ONE
|
|
1051
|
+
* `component_impression` per (session, campaignComponentId) when the
|
|
1052
|
+
* contract's rule is met (≥50% visible, ≥1s dwell). Returns an
|
|
1053
|
+
* unobserve function.
|
|
1054
|
+
*/
|
|
1055
|
+
observeImpression(element: Element, context?: AnalyticsContext, opts?: {
|
|
1056
|
+
name?: Extract<AnalyticsEventName, 'component_impression' | 'ad_impression'>;
|
|
1057
|
+
/** Dedupe key override. Defaults to the strongest id available:
|
|
1058
|
+
* campaignComponentId → locationId → componentTemplateId. */
|
|
1059
|
+
key?: string;
|
|
1060
|
+
/** Called the one time the impression is tracked (e.g. to fire a
|
|
1061
|
+
* companion view_item_list). */
|
|
1062
|
+
onImpression?: () => void;
|
|
1063
|
+
}): () => void;
|
|
1064
|
+
/** Force a flush (mostly for tests). */
|
|
1065
|
+
flush(): Promise<void>;
|
|
1066
|
+
private buildEvent;
|
|
1067
|
+
private anonId;
|
|
1068
|
+
/** Rolling session: renewed by activity, rotated after 30 min idle. */
|
|
1069
|
+
private ensureSession;
|
|
1070
|
+
private trackSessionEnd;
|
|
1071
|
+
private flushWithBeacon;
|
|
1072
|
+
/**
|
|
1073
|
+
* Auto-instrumentation over the SDK's own DOM events — the host app
|
|
1074
|
+
* writes ZERO tracking code for the commerce funnel.
|
|
1075
|
+
*/
|
|
1076
|
+
private installAutoListeners;
|
|
1077
|
+
/** Current cart → commerce payload; falls back to the pre-clear snapshot. */
|
|
1078
|
+
private cartCommerce;
|
|
1079
|
+
private findLine;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
932
1082
|
declare class VioFacade {
|
|
933
1083
|
private apiInstance;
|
|
934
1084
|
private commerceClients;
|
|
@@ -939,6 +1089,7 @@ declare class VioFacade {
|
|
|
939
1089
|
private bootstrapFailedAt;
|
|
940
1090
|
private cartManager;
|
|
941
1091
|
private checkoutManager;
|
|
1092
|
+
private analyticsManager;
|
|
942
1093
|
init(config: VioConfig): void;
|
|
943
1094
|
get isInitialized(): boolean;
|
|
944
1095
|
get config(): ResolvedConfig;
|
|
@@ -946,6 +1097,11 @@ declare class VioFacade {
|
|
|
946
1097
|
get cart(): CartManager;
|
|
947
1098
|
/** Checkout flow manager. Subscribes to cart state via the CartManager. */
|
|
948
1099
|
get checkout(): CheckoutManager;
|
|
1100
|
+
/**
|
|
1101
|
+
* Analytics — track() queues even pre-init; nothing is sent (and no
|
|
1102
|
+
* listeners are installed) until an explicit `Vio.analytics.start()`.
|
|
1103
|
+
*/
|
|
1104
|
+
get analytics(): AnalyticsManager;
|
|
949
1105
|
/** Lazy VioApi for REST endpoints on `api-dev.vio.live`. */
|
|
950
1106
|
get api(): VioApi;
|
|
951
1107
|
/**
|
|
@@ -1064,4 +1220,13 @@ declare function getAvailablePaymentMethods(options?: CartQueryOptions): Promise
|
|
|
1064
1220
|
declare const CREATE_PAYMENT_STRIPE_MUTATION = "\nmutation CreatePaymentStripe($checkoutId: String!, $successUrl: String!, $paymentMethod: String!, $email: String!) {\n Payment {\n CreatePaymentStripe(checkout_id: $checkoutId, success_url: $successUrl, payment_method: $paymentMethod, email: $email) {\n order_id\n checkout_url\n }\n }\n}\n";
|
|
1065
1221
|
declare function createPaymentStripe(variables: Record<string, unknown>, options?: CartQueryOptions): Promise<any>;
|
|
1066
1222
|
|
|
1067
|
-
|
|
1223
|
+
/**
|
|
1224
|
+
* SDK version reported in analytics events (`sdk_version`) and available
|
|
1225
|
+
* to consumers. Kept as a constant (not a package.json import) so the
|
|
1226
|
+
* core stays bundler-agnostic.
|
|
1227
|
+
*
|
|
1228
|
+
* RELEASE CHECKLIST: bump together with package.json (see CONTRIBUTING).
|
|
1229
|
+
*/
|
|
1230
|
+
declare const SDK_VERSION = "0.5.0";
|
|
1231
|
+
|
|
1232
|
+
export { ADD_ITEM_MUTATION, type AddManualOptions, type AddProductOptions, type AnalyticsCommerce, type AnalyticsContext, type AnalyticsEventName, type AnalyticsItemInput, AnalyticsManager, type AnalyticsStartOptions, type ApplePayConfig, type ApplePayResult, type BootstrapResponse, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, type CartChangeDetail, type CartLineItem, CartManager, type CartQueryOptions, type CheckoutAddress, type CheckoutChangeDetail, CheckoutManager, type CheckoutState, CommerceClient, Configuration, type CreatePaymentVippsResponse, type CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, type Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, type GetVippsStatusVariables, type ImageSize, type PaymentCompleteDetail, type PaymentMethod, type PaymentSelectDetail, type PlacementComponent, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductPrice, type ProductVariant, type ResolvedConfig, SDK_VERSION, type Sponsor, type SponsorCartState, type SponsorCommerceBlock, type TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, Vio, VioApi, VioApiError, type VioConfig, type VippsPaymentState, type VippsStatusResult, addItem, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, primaryImageUrl, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier };
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../chunk-
|
|
2
|
-
export { ADD_ITEM_MUTATION, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, Vio, VioApi, VioApiError, addItem, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, primaryImageUrl, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier } from '../chunk-
|
|
1
|
+
import '../chunk-QYQQ5J6E.js';
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, Vio, VioApi, VioApiError, addItem, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, primaryImageUrl, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier } from '../chunk-HNQG56SD.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ADD_ITEM_MUTATION, AddManualOptions, AddProductOptions, ApplePayConfig, ApplePayResult, BootstrapResponse, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartChangeDetail, CartLineItem, CartManager, CartQueryOptions, CheckoutAddress, CheckoutChangeDetail, CheckoutManager, CheckoutState, CommerceClient, Configuration, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GetVippsStatusVariables, ImageSize, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, ResolvedConfig, Sponsor, SponsorCartState, SponsorCommerceBlock, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, Vio, VioApi, VioApiError, VioConfig, VippsPaymentState, VippsStatusResult, addItem, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, primaryImageUrl, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier } from './core/index.js';
|
|
1
|
+
export { ADD_ITEM_MUTATION, AddManualOptions, AddProductOptions, AnalyticsCommerce, AnalyticsContext, AnalyticsEventName, AnalyticsItemInput, AnalyticsManager, AnalyticsStartOptions, ApplePayConfig, ApplePayResult, BootstrapResponse, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartChangeDetail, CartLineItem, CartManager, CartQueryOptions, CheckoutAddress, CheckoutChangeDetail, CheckoutManager, CheckoutState, CommerceClient, Configuration, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GetVippsStatusVariables, ImageSize, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, ResolvedConfig, SDK_VERSION, Sponsor, SponsorCartState, SponsorCommerceBlock, TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, Vio, VioApi, VioApiError, VioConfig, VippsPaymentState, VippsStatusResult, addItem, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, primaryImageUrl, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier } from './core/index.js';
|
|
2
2
|
import 'graphql-request';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
export { ADD_ITEM_MUTATION, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, Vio, VioApi, VioApiError, addItem, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, primaryImageUrl, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier } from './chunk-
|
|
1
|
+
import './chunk-QYQQ5J6E.js';
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CartManager, CheckoutManager, CommerceClient, Configuration, DELETE_ITEM_MUTATION, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, Vio, VioApi, VioApiError, addItem, checkApplePayAvailability, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, executeCartGraphQL, formatPrice, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, primaryImageUrl, showApplePaySheet, updateCheckout, updateItem, updateShippingsBySupplier } from './chunk-HNQG56SD.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _lit_react from '@lit/react';
|
|
2
|
-
import { V as VioCart$1, a as VioCheckout$1, b as VioProduct$1, c as VioProductCarousel$1, d as VioProductDetail$1 } from '../tokens-
|
|
3
|
-
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-
|
|
2
|
+
import { V as VioCart$1, a as VioCheckout$1, b as VioProduct$1, c as VioProductCarousel$1, d as VioProductDetail$1 } from '../tokens-TIH4RkPl.js';
|
|
3
|
+
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-TIH4RkPl.js';
|
|
4
4
|
import 'lit-html';
|
|
5
5
|
import 'lit';
|
|
6
6
|
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerVioElements, VioProduct, VioProductCarousel, VioProductDetail, VioCart, VioCheckout } from '../chunk-
|
|
2
|
-
export { VioTokens, applyVioTheme } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { registerVioElements, VioProduct, VioProductCarousel, VioProductDetail, VioCart, VioCheckout } from '../chunk-5CKG3F56.js';
|
|
2
|
+
export { VioTokens, applyVioTheme } from '../chunk-5CKG3F56.js';
|
|
3
|
+
import '../chunk-HNQG56SD.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
// node_modules/@lit/react/node/create-component.js
|
|
@@ -90,8 +90,16 @@ declare class VioProductCarousel extends LitElement {
|
|
|
90
90
|
private fetchError;
|
|
91
91
|
static styles: lit.CSSResult;
|
|
92
92
|
connectedCallback(): void;
|
|
93
|
+
disconnectedCallback(): void;
|
|
93
94
|
updated(changed: Map<string, unknown>): void;
|
|
94
95
|
private autoFetch;
|
|
96
|
+
private unobserveImpression;
|
|
97
|
+
private impressed;
|
|
98
|
+
private listTracked;
|
|
99
|
+
private observeForAnalytics;
|
|
100
|
+
/** view_item_list needs BOTH the viewport dwell and loaded products —
|
|
101
|
+
* whichever lands last fires it (once). */
|
|
102
|
+
private maybeTrackList;
|
|
95
103
|
private parseRefs;
|
|
96
104
|
private scrollByDirection;
|
|
97
105
|
private renderScrollerContent;
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { V as VioCart, a as VioCheckout, b as VioProduct, c as VioProductCarousel, d as VioProductDetail, e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-
|
|
1
|
+
export { V as VioCart, a as VioCheckout, b as VioProduct, c as VioProductCarousel, d as VioProductDetail, e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-TIH4RkPl.js';
|
|
2
2
|
import 'lit-html';
|
|
3
3
|
import 'lit';
|
|
4
4
|
|
package/dist/ui/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerVioElements } from '../chunk-
|
|
2
|
-
export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { registerVioElements } from '../chunk-5CKG3F56.js';
|
|
2
|
+
export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-5CKG3F56.js';
|
|
3
|
+
import '../chunk-HNQG56SD.js';
|
|
4
4
|
|
|
5
5
|
// src/ui/index.ts
|
|
6
6
|
registerVioElements();
|