@vio-live/web-sdk 0.27.0 → 0.28.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/CHANGELOG.md +289 -0
- package/README.md +116 -0
- package/dist/{chunk-HJRIPCWB.js → chunk-AFJ5M53F.js} +233 -29
- package/dist/chunk-AFJ5M53F.js.map +1 -0
- package/dist/{chunk-GLAKUYQA.js → chunk-Q2NALS7P.js} +832 -179
- package/dist/chunk-Q2NALS7P.js.map +1 -0
- package/dist/core/index.d.ts +108 -17
- package/dist/core/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +3 -3
- package/dist/{tokens-CihuCU2l.d.ts → tokens-y0KzN7bP.d.ts} +103 -9
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +3 -2
- package/dist/chunk-GLAKUYQA.js.map +0 -1
- package/dist/chunk-HJRIPCWB.js.map +0 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -193,6 +193,10 @@ interface Sponsor {
|
|
|
193
193
|
logoUrl?: string | null;
|
|
194
194
|
primaryColor?: string | null;
|
|
195
195
|
secondaryColor?: string | null;
|
|
196
|
+
/** The brand's purchase terms (its own page, e.g. its shop's terms of service). */
|
|
197
|
+
termsUrl?: string | null;
|
|
198
|
+
/** The brand's returns / refund policy page. */
|
|
199
|
+
refundPolicyUrl?: string | null;
|
|
196
200
|
commerce: SponsorCommerceBlock;
|
|
197
201
|
}
|
|
198
202
|
/**
|
|
@@ -832,6 +836,10 @@ interface SponsorIdentity {
|
|
|
832
836
|
/** The brand's logo, as the bootstrap gives it (never rewritten); `null` when it has none. */
|
|
833
837
|
logoUrl: string | null;
|
|
834
838
|
avatarUrl: string | null;
|
|
839
|
+
/** The brand's purchase terms page — https only; `null` when it has none. */
|
|
840
|
+
termsUrl?: string | null;
|
|
841
|
+
/** The brand's returns / refund policy page — https only; `null` when it has none. */
|
|
842
|
+
refundPolicyUrl?: string | null;
|
|
835
843
|
}
|
|
836
844
|
/** The sponsor of a checkout / an order as events and `getOrderReference` carry it. */
|
|
837
845
|
type CheckoutSponsor = Pick<SponsorIdentity, 'id' | 'name' | 'logoUrl'>;
|
|
@@ -1229,7 +1237,14 @@ interface AnalyticsCommerce {
|
|
|
1229
1237
|
items?: AnalyticsItemInput[];
|
|
1230
1238
|
value?: number;
|
|
1231
1239
|
currency?: string;
|
|
1240
|
+
/**
|
|
1241
|
+
* `order_id` on the wire. On a `purchase` it is Vio's order number (`4415`,
|
|
1242
|
+
* the number the dashboard and Commerce's cancellations use), else the
|
|
1243
|
+
* checkout id standing in for it (`props.order_id_kind` says which).
|
|
1244
|
+
*/
|
|
1232
1245
|
orderId?: string;
|
|
1246
|
+
/** `checkout_id` on the wire: Vio's checkout id (uuid). Always on the SDK's own `purchase`. */
|
|
1247
|
+
checkoutId?: string;
|
|
1233
1248
|
paymentMethod?: string;
|
|
1234
1249
|
/**
|
|
1235
1250
|
* The buyer reference (`buyer_id` on the wire): shopcart's `buyer_ref`, a
|
|
@@ -1301,6 +1316,12 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1301
1316
|
private client;
|
|
1302
1317
|
/** The landing it was read from — persisted later when consent arrives after the first event. */
|
|
1303
1318
|
private landing;
|
|
1319
|
+
/** Checkouts (`c:<id>`) and orders (`o:<number>`) this page load reported a `purchase` for: one each. */
|
|
1320
|
+
private readonly purchased;
|
|
1321
|
+
/** Purchases still waiting for Vio's order number: each sends at once, with what it has, when called. */
|
|
1322
|
+
private readonly pendingPurchases;
|
|
1323
|
+
/** Between `pagehide` and `pageshow` (bfcache): nothing waits, it all goes out now. */
|
|
1324
|
+
private pageHiding;
|
|
1304
1325
|
/** The landing this manager resolved on this page load (the first event's), or null before it; read only — for the order's entry context when nothing is stored yet. */
|
|
1305
1326
|
get currentLanding(): Landing | null;
|
|
1306
1327
|
private teardown;
|
|
@@ -1319,12 +1340,14 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1319
1340
|
/** ¿Podemos escribir en el dispositivo? */
|
|
1320
1341
|
private get canPersist();
|
|
1321
1342
|
start(options?: AnalyticsStartOptions): void;
|
|
1322
|
-
/** Stop timers + listeners (tests / SPA unmount). Queue survives. */
|
|
1343
|
+
/** Stop timers + listeners (tests / SPA unmount). Queue survives — a purchase still waiting for its order number joins it now. */
|
|
1323
1344
|
stop(): void;
|
|
1324
1345
|
/** Attach the partner's user id (opaque) to all subsequent events. */
|
|
1325
1346
|
identify(externalUserId: string | null): void;
|
|
1326
1347
|
/** Queue one event. Works pre-init and pre-start (SSR: no-op). */
|
|
1327
1348
|
track(name: AnalyticsEventName, opts?: TrackOptions): void;
|
|
1349
|
+
/** The sinks and the queue for one built event — `track`'s second half. */
|
|
1350
|
+
private record;
|
|
1328
1351
|
/**
|
|
1329
1352
|
* Impression helper: observes an element and tracks ONE
|
|
1330
1353
|
* `component_impression` per (session, campaignComponentId) when the
|
|
@@ -1361,6 +1384,37 @@ declare class AnalyticsManager extends EventTarget {
|
|
|
1361
1384
|
* writes ZERO tracking code for the commerce funnel.
|
|
1362
1385
|
*/
|
|
1363
1386
|
private installAutoListeners;
|
|
1387
|
+
/**
|
|
1388
|
+
* Claims the purchase of a payment for this page load: false when its
|
|
1389
|
+
* checkout (or its order) already has one, reported or waiting.
|
|
1390
|
+
*/
|
|
1391
|
+
private claimPurchase;
|
|
1392
|
+
/**
|
|
1393
|
+
* Sends the `purchase` event(s) of one payment — ONCE, with Vio's order
|
|
1394
|
+
* number as `order_id` (`props.order_id_kind: 'order'`) and the checkout id
|
|
1395
|
+
* as `checkout_id`. When the payment event did not bring the number (a
|
|
1396
|
+
* redirect return, an order a webhook creates) the checkout is asked for it
|
|
1397
|
+
* — the receipt's own path, `Vio.checkout.getOrderReference` — at once and
|
|
1398
|
+
* after 0.5 / 1 / 2 / 3 / 3 s, for at most 10 s; nothing else waits for it.
|
|
1399
|
+
* Unanswered, or when the page hides or `stop()` comes first, the events go
|
|
1400
|
+
* out with what they have: the checkout id as `order_id`
|
|
1401
|
+
* (`order_id_kind: 'checkout'`), as before — and the late number adds no
|
|
1402
|
+
* second event. The events are BUILT at the payment — its moment (`ts`),
|
|
1403
|
+
* `event_id`, session, page and content — and only the order number (and a
|
|
1404
|
+
* buyer reference the payment did not bring) is filled in when it comes.
|
|
1405
|
+
*/
|
|
1406
|
+
private reportPurchase;
|
|
1407
|
+
/** Sends every purchase still waiting for its order number, at once, with what it has. */
|
|
1408
|
+
private settlePendingPurchases;
|
|
1409
|
+
/** Whether the page is hidden or going away (`pagehide` until `pageshow`). */
|
|
1410
|
+
private isPageHidden;
|
|
1411
|
+
/**
|
|
1412
|
+
* How a purchase asks a checkout for Vio's order number: through the SDK's
|
|
1413
|
+
* checkout manager (`getOrderReference`, which never throws and shares its
|
|
1414
|
+
* in-flight ask with the receipt's). `null` when there is nothing to ask —
|
|
1415
|
+
* no checkout id, or no checkout manager on this page.
|
|
1416
|
+
*/
|
|
1417
|
+
private orderReferenceAsker;
|
|
1364
1418
|
/** The lines of the cart (current, else the pre-clear snapshot), optionally one sponsor's. */
|
|
1365
1419
|
private cartLines;
|
|
1366
1420
|
/**
|
|
@@ -1421,10 +1475,20 @@ interface PaymentSuccessDetail {
|
|
|
1421
1475
|
/** Per-element content override (`vio-content-id` / `vio-content-title`), when the emitter carries one. */
|
|
1422
1476
|
contentId?: string | number;
|
|
1423
1477
|
contentTitle?: string;
|
|
1424
|
-
/**
|
|
1478
|
+
/**
|
|
1479
|
+
* Redirect return: Vio's checkout id (the name predates `checkoutId`). A
|
|
1480
|
+
* value that is a whole number is read as Vio's order number instead — a
|
|
1481
|
+
* checkout id is a uuid, never one.
|
|
1482
|
+
*/
|
|
1425
1483
|
orderId?: string | number;
|
|
1426
1484
|
/** Vio's checkout id — from the checkout state or the return URL. */
|
|
1427
1485
|
checkoutId?: string | number;
|
|
1486
|
+
/**
|
|
1487
|
+
* Vio's order number (`4415`), when the emitter knows it: the SDK's checkout
|
|
1488
|
+
* adds it when its ask for the buyer reference already found the order.
|
|
1489
|
+
* Becomes the purchase's `order_id`.
|
|
1490
|
+
*/
|
|
1491
|
+
orderNumber?: string | number | null;
|
|
1428
1492
|
/**
|
|
1429
1493
|
* The buyer reference the emitter learned with the payment — shopcart's
|
|
1430
1494
|
* `buyer_ref`, a keyed hash of the email (`buyerRef` from the SDK's own
|
|
@@ -1443,8 +1507,9 @@ interface PaymentSuccessDetail {
|
|
|
1443
1507
|
sponsor?: CheckoutSponsor;
|
|
1444
1508
|
}
|
|
1445
1509
|
/**
|
|
1446
|
-
* What the checkout attaches as `result`. Only `confirmation` carries
|
|
1447
|
-
*
|
|
1510
|
+
* What the checkout attaches as `result`. Only `confirmation` carries Vio
|
|
1511
|
+
* ids: the order `ConfirmPaymentApplePay` created (its number) and the
|
|
1512
|
+
* checkout it paid. `order.orderId` / `orderId`
|
|
1448
1513
|
* are the PROVIDER's references (Qliro's, Walley's — the checkout itself
|
|
1449
1514
|
* shows them as `providerRef`), and `chargedTotal` includes shipping on some
|
|
1450
1515
|
* methods only. Analytics reads none of those.
|
|
@@ -1452,6 +1517,8 @@ interface PaymentSuccessDetail {
|
|
|
1452
1517
|
interface PaymentSuccessResult {
|
|
1453
1518
|
confirmation?: {
|
|
1454
1519
|
orderId?: string | number | null;
|
|
1520
|
+
/** The checkout the confirmation paid (Apple Pay from the cart names no other). */
|
|
1521
|
+
checkoutId?: string | null;
|
|
1455
1522
|
status?: string;
|
|
1456
1523
|
buyerRef?: string | null;
|
|
1457
1524
|
buyer_ref?: string | null;
|
|
@@ -1477,17 +1544,41 @@ declare function buyerRefOf(d: {
|
|
|
1477
1544
|
buyer_ref?: unknown;
|
|
1478
1545
|
result?: PaymentSuccessResult | null;
|
|
1479
1546
|
} | null | undefined): string | undefined;
|
|
1480
|
-
/**
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
*/
|
|
1490
|
-
|
|
1547
|
+
/** The ids of a `purchase`, as a `vio:payment-success` detail gives them (`purchaseIdsOf`). */
|
|
1548
|
+
interface PurchaseIds {
|
|
1549
|
+
/**
|
|
1550
|
+
* `commerce.order_id`: Vio's order number when the detail has it, else the
|
|
1551
|
+
* checkout id standing in for it.
|
|
1552
|
+
*/
|
|
1553
|
+
orderId?: string;
|
|
1554
|
+
/** `commerce.checkout_id`: Vio's checkout id (uuid), when the detail has it. */
|
|
1555
|
+
checkoutId?: string;
|
|
1556
|
+
/** `props.order_id_kind`: what `orderId` is — `'order'` (the number) or `'checkout'` (the stand-in). */
|
|
1557
|
+
orderIdKind?: 'order' | 'checkout';
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1560
|
+
* The ids of a `purchase` — ALWAYS Vio's, never a provider's reference. The
|
|
1561
|
+
* order number: `orderNumber` (an emitter that knows it) →
|
|
1562
|
+
* `result.confirmation.orderId` (Apple Pay: the order `ConfirmPaymentApplePay`
|
|
1563
|
+
* created) → an `orderId` that is a whole number. The checkout id: `orderId`
|
|
1564
|
+
* (the redirect return's, a uuid) → `checkoutId` → `result.confirmation.checkoutId`
|
|
1565
|
+
* (Apple Pay from the cart). `orderId` is the number
|
|
1566
|
+
* when there is one, else the checkout id — the SDK's own `purchase` then
|
|
1567
|
+
* waits for the number (see `AnalyticsManager`); a host with its own sink can
|
|
1568
|
+
* ask `Vio.checkout.getOrderReference(checkoutId)` the same way.
|
|
1569
|
+
*/
|
|
1570
|
+
declare function purchaseIdsOf(d: PaymentSuccessDetail | null | undefined): PurchaseIds;
|
|
1571
|
+
/**
|
|
1572
|
+
* The `order_id`, `checkout_id` and `buyer_id` of a `purchase`, as far as the
|
|
1573
|
+
* detail says them NOW (`purchaseIdsOf`; the SDK's own `purchase` may still
|
|
1574
|
+
* wait for the order number). `value` and `currency` are deliberately NOT
|
|
1575
|
+
* read from the result: on every path they come from the cart snapshot (sum
|
|
1576
|
+
* of the items, no shipping), so revenue stays comparable across payment
|
|
1577
|
+
* methods — the charged total will arrive through the server-side
|
|
1578
|
+
* `order_paid` event. With nothing to say it returns `{}`, so the cart
|
|
1579
|
+
* snapshot keeps its keys.
|
|
1580
|
+
*/
|
|
1581
|
+
declare function purchaseFromPaymentSuccess(d: PaymentSuccessDetail): Pick<AnalyticsCommerce, 'orderId' | 'checkoutId' | 'buyerId'>;
|
|
1491
1582
|
|
|
1492
1583
|
/**
|
|
1493
1584
|
* The cart split per campaign (ADR-0034) — ONE rule, shared by the SDK's own
|
|
@@ -3275,7 +3366,7 @@ declare function normalizeBuyerRef(value: unknown): string | undefined;
|
|
|
3275
3366
|
*
|
|
3276
3367
|
* RELEASE CHECKLIST: bump together with package.json (see CONTRIBUTING).
|
|
3277
3368
|
*/
|
|
3278
|
-
declare const SDK_VERSION = "0.
|
|
3369
|
+
declare const SDK_VERSION = "0.28.0";
|
|
3279
3370
|
|
|
3280
3371
|
/**
|
|
3281
3372
|
* Vipps MobilePay's own button, the way the design guidelines ask for it.
|
|
@@ -3304,4 +3395,4 @@ declare function vippsButtonAttributes(verb?: 'buy' | 'pay' | 'express' | 'conti
|
|
|
3304
3395
|
language?: string;
|
|
3305
3396
|
}): Record<string, string>;
|
|
3306
3397
|
|
|
3307
|
-
export { ADD_ITEM_MUTATION, type AddManualOptions, type AddProductOptions, type AnalyticsCommerce, type AnalyticsContext, type AnalyticsEventName, type AnalyticsItemInput, AnalyticsManager, type AnalyticsStartOptions, type ApplePayConfig, type ApplePayResult, type Attribution, BUYER_REF_MAX_LENGTH, type BootstrapCampaign, type BootstrapCampaignEntry, type BootstrapCampaignStatus, type BootstrapResponse, type BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, type CampaignHint, type CartChangeDetail, type CartLineItem, type CartLineOrigin, CartManager, type CartOrigin, type CartQueryOptions, type CartSlice, type CheckoutAddress, type CheckoutAttributionInput, type CheckoutAttributionWire, type CheckoutChangeDetail, CheckoutManager, type CheckoutManagerDeps, type CheckoutOpenDetail, type CheckoutReference, type CheckoutSponsor, type CheckoutState, type ClientContext, CommerceClient, Configuration, type ContentRef, type CreatePaymentVippsResponse, type CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, type EntryContextWire, type Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, type GatewayFeature, type GetVippsStatusVariables, type ImageSize, LINE_ORIGIN_CAPS, type Landing, type LineOriginWire, type LineOriginWireOptions, type ManifestLocation, type ManifestRequest, type ManifestResult, type OrderReference, type OriginPage, type PaymentCompleteDetail, type PaymentMethod, type PaymentSelectDetail, type PaymentSuccessDetail, type PaymentSuccessResult, type PlacementComponent, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductPrice, type ProductVariant, type RegisterSlotOptions, type ResolvedConfig, SDK_VERSION, type SlotInput, type SlotKind, type Sponsor, type SponsorCartState, type SponsorCommerceBlock, type SponsorIdentity, type SurfacePrivacyMode, type SurfaceResponse, type TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, type VioConfig, type VioItem, type VioPlatform, type VippsPaymentState, type VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature };
|
|
3398
|
+
export { ADD_ITEM_MUTATION, type AddManualOptions, type AddProductOptions, type AnalyticsCommerce, type AnalyticsContext, type AnalyticsEventName, type AnalyticsItemInput, AnalyticsManager, type AnalyticsStartOptions, type ApplePayConfig, type ApplePayResult, type Attribution, BUYER_REF_MAX_LENGTH, type BootstrapCampaign, type BootstrapCampaignEntry, type BootstrapCampaignStatus, type BootstrapResponse, type BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, type CampaignHint, type CartChangeDetail, type CartLineItem, type CartLineOrigin, CartManager, type CartOrigin, type CartQueryOptions, type CartSlice, type CheckoutAddress, type CheckoutAttributionInput, type CheckoutAttributionWire, type CheckoutChangeDetail, CheckoutManager, type CheckoutManagerDeps, type CheckoutOpenDetail, type CheckoutReference, type CheckoutSponsor, type CheckoutState, type ClientContext, CommerceClient, Configuration, type ContentRef, type CreatePaymentVippsResponse, type CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, type EntryContextWire, type Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, type GatewayFeature, type GetVippsStatusVariables, type ImageSize, LINE_ORIGIN_CAPS, type Landing, type LineOriginWire, type LineOriginWireOptions, type ManifestLocation, type ManifestRequest, type ManifestResult, type OrderReference, type OriginPage, type PaymentCompleteDetail, type PaymentMethod, type PaymentSelectDetail, type PaymentSuccessDetail, type PaymentSuccessResult, type PlacementComponent, type Product, type ProductCategory, type ProductImage, type ProductOption, type ProductPrice, type ProductVariant, type PurchaseIds, type RegisterSlotOptions, type ResolvedConfig, SDK_VERSION, type SlotInput, type SlotKind, type Sponsor, type SponsorCartState, type SponsorCommerceBlock, type SponsorIdentity, type SurfacePrivacyMode, type SurfaceResponse, type TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, type VioConfig, type VioItem, type VioPlatform, type VippsPaymentState, type VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature };
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../chunk-67QESEV2.js';
|
|
2
|
-
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_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, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from '../chunk-
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_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, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from '../chunk-AFJ5M53F.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, AnalyticsCommerce, AnalyticsContext, AnalyticsEventName, AnalyticsItemInput, AnalyticsManager, AnalyticsStartOptions, ApplePayConfig, ApplePayResult, Attribution, BUYER_REF_MAX_LENGTH, BootstrapCampaign, BootstrapCampaignEntry, BootstrapCampaignStatus, BootstrapResponse, BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CampaignHint, CartChangeDetail, CartLineItem, CartLineOrigin, CartManager, CartOrigin, CartQueryOptions, CartSlice, CheckoutAddress, CheckoutAttributionInput, CheckoutAttributionWire, CheckoutChangeDetail, CheckoutManager, CheckoutManagerDeps, CheckoutOpenDetail, CheckoutReference, CheckoutSponsor, CheckoutState, ClientContext, CommerceClient, Configuration, ContentRef, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, EntryContextWire, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, GatewayFeature, GetVippsStatusVariables, ImageSize, LINE_ORIGIN_CAPS, Landing, LineOriginWire, LineOriginWireOptions, ManifestLocation, ManifestRequest, ManifestResult, OrderReference, OriginPage, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PaymentSuccessDetail, PaymentSuccessResult, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, RegisterSlotOptions, ResolvedConfig, SDK_VERSION, SlotInput, SlotKind, Sponsor, SponsorCartState, SponsorCommerceBlock, SponsorIdentity, SurfacePrivacyMode, SurfaceResponse, TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, VioConfig, VioItem, VioPlatform, VippsPaymentState, VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './core/index.js';
|
|
1
|
+
export { ADD_ITEM_MUTATION, AddManualOptions, AddProductOptions, AnalyticsCommerce, AnalyticsContext, AnalyticsEventName, AnalyticsItemInput, AnalyticsManager, AnalyticsStartOptions, ApplePayConfig, ApplePayResult, Attribution, BUYER_REF_MAX_LENGTH, BootstrapCampaign, BootstrapCampaignEntry, BootstrapCampaignStatus, BootstrapResponse, BootstrapSlot, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, CREATE_PAYMENT_STRIPE_MUTATION, CREATE_PAYMENT_VIPPS_MUTATION, CampaignHint, CartChangeDetail, CartLineItem, CartLineOrigin, CartManager, CartOrigin, CartQueryOptions, CartSlice, CheckoutAddress, CheckoutAttributionInput, CheckoutAttributionWire, CheckoutChangeDetail, CheckoutManager, CheckoutManagerDeps, CheckoutOpenDetail, CheckoutReference, CheckoutSponsor, CheckoutState, ClientContext, CommerceClient, Configuration, ContentRef, CreatePaymentVippsResponse, CreatePaymentVippsVariables, DELETE_ITEM_MUTATION, EntryContextWire, Environment, GET_AVAILABLE_PAYMENT_METHODS_QUERY, GET_CART_QUERY, GET_CHECKOUT_QUERY, GET_LINE_ITEMS_BY_SUPPLIER_QUERY, GET_VIPPS_STATUS_QUERY, GRAPHQL_INT_MAX, GatewayFeature, GetVippsStatusVariables, ImageSize, LINE_ORIGIN_CAPS, Landing, LineOriginWire, LineOriginWireOptions, ManifestLocation, ManifestRequest, ManifestResult, OrderReference, OriginPage, PaymentCompleteDetail, PaymentMethod, PaymentSelectDetail, PaymentSuccessDetail, PaymentSuccessResult, PlacementComponent, Product, ProductCategory, ProductImage, ProductOption, ProductPrice, ProductVariant, PurchaseIds, RegisterSlotOptions, ResolvedConfig, SDK_VERSION, SlotInput, SlotKind, Sponsor, SponsorCartState, SponsorCommerceBlock, SponsorIdentity, SurfacePrivacyMode, SurfaceResponse, TrackOptions, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, VioConfig, VioItem, VioPlatform, VippsPaymentState, VippsStatusResult, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './core/index.js';
|
|
2
2
|
import 'graphql-request';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './chunk-67QESEV2.js';
|
|
2
|
-
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_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, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './chunk-
|
|
2
|
+
export { ADD_ITEM_MUTATION, AnalyticsManager, BUYER_REF_MAX_LENGTH, CHECKOUT_ATTRIBUTION_CAPS, CHECKOUT_SPONSOR_STORAGE_KEY, CLIENT_LANDING_URL_MAX_LENGTH, CONTENT_URL_MAX_LENGTH, CREATE_CART_MUTATION, CREATE_CHECKOUT_MUTATION, CREATE_CHECKOUT_WITH_ATTRIBUTION_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, GRAPHQL_INT_MAX, LINE_ORIGIN_CAPS, SDK_VERSION, UPDATE_CHECKOUT_MUTATION, UPDATE_CHECKOUT_WITH_ATTRIBUTION_MUTATION, UPDATE_ITEM_MUTATION, UPDATE_ITEM_WITH_ORIGIN_MUTATION, UPDATE_SHIPPINGS_BY_SUPPLIER_MUTATION, VIPPS_BUTTON_SCRIPT, VIPPS_BUTTON_TAG, Vio, VioApi, VioApiError, activeCampaignEntry, addItem, autoSlotDisplayName, autoSlotId, buyerRefOf, campaignCandidates, capContentUrl, cartSlicesFrom, checkApplePayAvailability, checkoutAttributionOf, componentKindOf, createCart, createCheckout, createCommerceClient, createPaymentStripe, createPaymentVipps, createVioApi, deleteItem, displayPrice, dominantCampaignOf, ensureVippsButton, entryContextOf, executeCartGraphQL, formatPrice, gatewayHas, getAvailablePaymentMethods, getCart, getCartGraphQLOptions, getCheckout, getCheckoutReference, getCustomerSessionId, getGlobalCurrency, getLineItemsBySupplier, getVippsStatus, isUnknownFeatureError, isUnknownTokenError, landingUrl, lineOriginWire, lineOrigins, normalizeBuyerRef, normalizeOrigin, normalizeScope, normalizeSlotKind, originAndPath, primaryImageUrl, purchaseFromPaymentSuccess, purchaseIdsOf, resetGatewayFeatures, resolveCampaignId, resolveClientContext, resolveContent, resolveLanding, resolveSlotCampaign, sameOrigin, showApplePaySheet, sponsorCampaignEntry, sponsorIdentityFrom, storedLanding, toCampaignId, updateCheckout, updateItem, updateShippingsBySupplier, vippsButtonAttributes, withGatewayFeature } from './chunk-AFJ5M53F.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-y0KzN7bP.js';
|
|
3
|
+
export { e as VioThemeOverrides, f as VioTokens, g as applyVioTheme } from '../tokens-y0KzN7bP.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-Q2NALS7P.js';
|
|
2
|
+
export { VioTokens, applyVioTheme } from '../chunk-Q2NALS7P.js';
|
|
3
|
+
import '../chunk-AFJ5M53F.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
|
|
6
6
|
// node_modules/@lit/react/node/create-component.js
|
|
@@ -277,6 +277,12 @@ declare class VioProductDetail extends LitElement {
|
|
|
277
277
|
private selectedOptions;
|
|
278
278
|
private quantity;
|
|
279
279
|
private activeImageIndex;
|
|
280
|
+
/** The thumbnail row is wider than its box (arrows shown with a mouse). */
|
|
281
|
+
private thumbsOverflow;
|
|
282
|
+
private thumbsAtStart;
|
|
283
|
+
private thumbsAtEnd;
|
|
284
|
+
/** The top bar's logo file is square-ish: a mark, so its name goes beside it. */
|
|
285
|
+
private logoSquare;
|
|
280
286
|
private adding;
|
|
281
287
|
/** Apple Pay actually usable (real Stripe + registered domain) — set on load. */
|
|
282
288
|
private applePayOk;
|
|
@@ -293,11 +299,21 @@ declare class VioProductDetail extends LitElement {
|
|
|
293
299
|
private applePayHandle;
|
|
294
300
|
/** Keyboard and focus while open: Escape closes, Tab stays inside, focus returns to the opener. */
|
|
295
301
|
private readonly dialogFocus;
|
|
302
|
+
/** Phones: the page behind is locked, and the sheet closes by pulling the bar or the top bar down. */
|
|
303
|
+
private readonly bottomSheet;
|
|
296
304
|
private boundProductClick;
|
|
297
305
|
static styles: lit.CSSResult;
|
|
298
306
|
connectedCallback(): void;
|
|
299
307
|
disconnectedCallback(): void;
|
|
300
308
|
updated(changed: Map<string, unknown>): void;
|
|
309
|
+
private thumbRow;
|
|
310
|
+
/** Arrows only when the row overflows; each one off at its own end. */
|
|
311
|
+
private measureThumbs;
|
|
312
|
+
private onThumbsScroll;
|
|
313
|
+
/** One arrow press moves most of a visible row. */
|
|
314
|
+
private scrollThumbs;
|
|
315
|
+
/** The selected thumbnail is always visible: the row scrolls to it, the page never does. */
|
|
316
|
+
private revealActiveThumb;
|
|
301
317
|
show(): void;
|
|
302
318
|
close(): void;
|
|
303
319
|
private fetchProduct;
|
|
@@ -391,13 +407,22 @@ declare class VioProductDetail extends LitElement {
|
|
|
391
407
|
private headerName;
|
|
392
408
|
private loadSeller;
|
|
393
409
|
/**
|
|
394
|
-
* Who sells the product
|
|
395
|
-
*
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
*
|
|
410
|
+
* Who sells the product, top left beside the close (Mote & Livsstil,
|
|
411
|
+
* 2026-10-22): the logo of the sponsor the product was fetched with — the
|
|
412
|
+
* product's brand, never the article's — with its name as `alt`; without a
|
|
413
|
+
* logo that loads, its name; without an identity, the seller's Company name
|
|
414
|
+
* (or the product's brand) once known. Size: --vio-detail-logo-height.
|
|
399
415
|
*/
|
|
400
|
-
private
|
|
416
|
+
private renderTopbarSponsor;
|
|
417
|
+
/**
|
|
418
|
+
* Under the buy buttons: «Du handler direkte hos {brand}.» — the brand the
|
|
419
|
+
* product was fetched with (the sponsor; its Company name or the product's
|
|
420
|
+
* brand when no identity is known), never the article's. Nothing when no
|
|
421
|
+
* name is known.
|
|
422
|
+
*/
|
|
423
|
+
private renderSellerNote;
|
|
424
|
+
/** Square-ish logo (4:5 to 5:4) → the top bar shows the name beside it. */
|
|
425
|
+
private measureLogo;
|
|
401
426
|
render(): lit_html.TemplateResult<1>;
|
|
402
427
|
private renderBody;
|
|
403
428
|
private renderOptionPickers;
|
|
@@ -437,6 +462,8 @@ declare class VioCart extends LitElement {
|
|
|
437
462
|
private loadingPaymentMethods;
|
|
438
463
|
/** Keyboard and focus while open: Escape closes, Tab stays inside, focus returns to the opener. */
|
|
439
464
|
private readonly dialogFocus;
|
|
465
|
+
/** Phones: the page behind is locked, and the sheet closes by pulling the bar or the header down. */
|
|
466
|
+
private readonly bottomSheet;
|
|
440
467
|
private boundOnCartChange;
|
|
441
468
|
static styles: lit.CSSResult;
|
|
442
469
|
connectedCallback(): void;
|
|
@@ -665,6 +692,8 @@ declare class VioCheckout extends LitElement {
|
|
|
665
692
|
* in flight — Tab stays inside, focus returns to the opener.
|
|
666
693
|
*/
|
|
667
694
|
private readonly dialogFocus;
|
|
695
|
+
/** Phones: the page behind is locked, and the sheet closes by pulling the bar or the top bar down — not mid-payment. */
|
|
696
|
+
private readonly bottomSheet;
|
|
668
697
|
/** A payment is being started or confirmed right now: the overlay must not close under it. */
|
|
669
698
|
private get paymentInFlight();
|
|
670
699
|
/**
|
|
@@ -854,7 +883,9 @@ declare class VioCheckout extends LitElement {
|
|
|
854
883
|
* `visibilitychange`) or the element leaves, the event goes out at once
|
|
855
884
|
* without the reference. Exactly one event per call. `afterwards` runs
|
|
856
885
|
* right after the event, so a path keeps the order it always had (the cart
|
|
857
|
-
* is cleared after the event).
|
|
886
|
+
* is cleared after the event). When that answer already has Vio's order
|
|
887
|
+
* number, the event carries it too (`orderNumber`): it is the purchase's
|
|
888
|
+
* `order_id`, and analytics need not ask again.
|
|
858
889
|
*/
|
|
859
890
|
private emitPaymentSuccess;
|
|
860
891
|
/** Whether asking the checkout for the buyer reference can still help. */
|
|
@@ -864,8 +895,9 @@ declare class VioCheckout extends LitElement {
|
|
|
864
895
|
* failed or has neither the reference nor an order yet (the webhook has not
|
|
865
896
|
* written the checkout), again at 1.2 s — all within 2.5 s. An order
|
|
866
897
|
* without a reference is a settled answer: the backend has none, asking
|
|
867
|
-
* again cannot help.
|
|
868
|
-
*
|
|
898
|
+
* again cannot help. Whatever the answer said of the order number comes
|
|
899
|
+
* back with it. `{}` when the time is up, when the answer stopped mattering
|
|
900
|
+
* (`stopped()`) or on failure.
|
|
869
901
|
*/
|
|
870
902
|
private askBuyerRef;
|
|
871
903
|
/** Waits between asks for the Vio order number: the order is often born a
|
|
@@ -1233,6 +1265,68 @@ interface VioThemeOverrides {
|
|
|
1233
1265
|
spaceMd?: string;
|
|
1234
1266
|
spaceLg?: string;
|
|
1235
1267
|
spaceXl?: string;
|
|
1268
|
+
/** Product detail panel width on desktop (default `440px`). */
|
|
1269
|
+
detailWidth?: string;
|
|
1270
|
+
/** Side padding of the detail (default the `lg` space, `24px`). */
|
|
1271
|
+
detailPaddingX?: string;
|
|
1272
|
+
/** Height of the selling brand's logo in the detail's top bar (default `44px`; width follows its proportions). A square logo gets the brand's name beside it. */
|
|
1273
|
+
detailLogoHeight?: string;
|
|
1274
|
+
/** Zoom on that logo inside its box (default `1`); e.g. `1.8` crops the white around a mark in a square file. */
|
|
1275
|
+
detailLogoZoom?: string;
|
|
1276
|
+
/** Product name size in the detail. */
|
|
1277
|
+
detailTitleSize?: string;
|
|
1278
|
+
/** Price size in the detail (default `24px`). */
|
|
1279
|
+
detailPriceSize?: string;
|
|
1280
|
+
/** How the main image fits its box: `cover` (fills it, crops the overflow — default) or `contain` (whole image, bars where the shapes differ). */
|
|
1281
|
+
detailImageFit?: string;
|
|
1282
|
+
/** Main image box proportion, the same for every image so the panel never jumps: `4 / 5` (default), `1 / 1`, `3 / 4`, or `auto` (each image its own). */
|
|
1283
|
+
detailImageAspect?: string;
|
|
1284
|
+
/** Cap on the main image's height (default `85vh`). */
|
|
1285
|
+
detailImageMaxHeight?: string;
|
|
1286
|
+
/** Zoom on the main image (default `1`); e.g. `1.15` to crop a white margin baked into the file. */
|
|
1287
|
+
detailImageZoom?: string;
|
|
1288
|
+
/** Side margin of the main image (default: the panel's padding, aligned with the text); `0` = edge to edge. */
|
|
1289
|
+
detailImageInset?: string;
|
|
1290
|
+
/** Background behind the main image (default the muted surface). */
|
|
1291
|
+
detailImageBg?: string;
|
|
1292
|
+
/** Thumbnail size (default `64px`). One row, scrolls sideways. */
|
|
1293
|
+
detailThumbSize?: string;
|
|
1294
|
+
/** Space between thumbnails (default `8px`). */
|
|
1295
|
+
detailThumbGap?: string;
|
|
1296
|
+
/** Thumbnail corners (default `0`). */
|
|
1297
|
+
detailThumbRadius?: string;
|
|
1298
|
+
/** Border of the selected thumbnail (default the text colour). */
|
|
1299
|
+
detailThumbActiveColor?: string;
|
|
1300
|
+
/** Height (and min width) of a size / option button (default `36px`). */
|
|
1301
|
+
detailOptionHeight?: string;
|
|
1302
|
+
/** Space between option buttons (default `6px`). */
|
|
1303
|
+
detailOptionGap?: string;
|
|
1304
|
+
/** Option button corners (default `0`). */
|
|
1305
|
+
detailOptionRadius?: string;
|
|
1306
|
+
/** `wrap` (default, several lines) or `nowrap` (one line that scrolls). */
|
|
1307
|
+
detailOptionWrap?: string;
|
|
1308
|
+
/** Height of the quantity stepper and «Legg i handlekurv» (default `52px`). */
|
|
1309
|
+
detailButtonHeight?: string;
|
|
1310
|
+
/** Corners of «Legg i handlekurv» (default `0`). */
|
|
1311
|
+
detailButtonRadius?: string;
|
|
1312
|
+
/** `sticky` or `static`: whether the buy zone (Vipps, quantity, add to cart) stays at the bottom of the panel while scrolling. Default: `static` on phones, `sticky` on desktop (with the description above it). */
|
|
1313
|
+
detailBuyPosition?: string;
|
|
1314
|
+
/** Shadow over a sticky buy zone, e.g. `0 -8px 16px rgba(0,0,0,.06)`. */
|
|
1315
|
+
detailBuyShadow?: string;
|
|
1316
|
+
/** Cart drawer width on desktop (default `440px`). */
|
|
1317
|
+
cartWidth?: string;
|
|
1318
|
+
/** Checkout panel width on desktop (default `440px`). */
|
|
1319
|
+
checkoutWidth?: string;
|
|
1320
|
+
/** Height of the brand's logo on the confirmation (default `40px`). */
|
|
1321
|
+
confirmLogoHeight?: string;
|
|
1322
|
+
/** «Takk for bestillingen!» size (default `24px`). */
|
|
1323
|
+
confirmTitleSize?: string;
|
|
1324
|
+
/** Background of the confirmation's check mark (default green). */
|
|
1325
|
+
confirmCheckBg?: string;
|
|
1326
|
+
/** Background of the «Åpner Vipps …» overlay (default translucent white). */
|
|
1327
|
+
redirectBg?: string;
|
|
1328
|
+
/** Spinner colour of that overlay (default Vipps orange). */
|
|
1329
|
+
redirectSpinner?: string;
|
|
1236
1330
|
}
|
|
1237
1331
|
/**
|
|
1238
1332
|
* Apply (or clear) theme overrides. Pass `null`/`undefined` for a key to
|
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-y0KzN7bP.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-Q2NALS7P.js';
|
|
2
|
+
export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-Q2NALS7P.js';
|
|
3
|
+
import '../chunk-AFJ5M53F.js';
|
|
4
4
|
|
|
5
5
|
// src/ui/index.ts
|
|
6
6
|
registerVioElements();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vio-live/web-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Vio Web SDK — in-site shoppable + native checkout, designed for editorial commerce sites",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"files": [
|
|
32
32
|
"dist",
|
|
33
33
|
"README.md",
|
|
34
|
-
"LICENSE"
|
|
34
|
+
"LICENSE",
|
|
35
|
+
"CHANGELOG.md"
|
|
35
36
|
],
|
|
36
37
|
"scripts": {
|
|
37
38
|
"build": "tsup",
|