@vio-live/web-sdk 0.23.0 → 0.24.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.
@@ -36,6 +36,13 @@ declare class VioProduct extends LitElement {
36
36
  vioScope: string;
37
37
  /** Human label of the scope (` · Title` in the slot name); inherited from `data-vio-scope-name`. */
38
38
  vioScopeName: string;
39
+ /**
40
+ * The campaign this element's PAGE belongs to (ADR-0034, amendment 3).
41
+ * Inherited: this attribute, else the nearest ancestor's `data-vio-campaign`,
42
+ * else `Vio.init({ campaignId })`. A dashboard assignment of the slot wins
43
+ * over it. Optional.
44
+ */
45
+ vioCampaign: string;
39
46
  /** Per-element override of the content (article) id the events carry; see `Vio.content()`. */
40
47
  vioContentId: string;
41
48
  /** Per-element override of the content title. */
@@ -43,6 +50,8 @@ declare class VioProduct extends LitElement {
43
50
  private readonly slotRegistration;
44
51
  /** The slot id in effect: `vio-slot`, else the auto id (`card-N`). Read-only. */
45
52
  get effectiveSlot(): string;
53
+ /** The element's own page campaign (`vio-campaign` / ancestor), if any; `Vio.init`'s applies otherwise. */
54
+ get effectiveCampaignId(): number | undefined;
46
55
  /** The slot campaign's sponsor as the string the attributes use ('' when unknown). */
47
56
  private sponsorFromAttribution;
48
57
  private slotAttributes;
@@ -139,6 +148,13 @@ declare class VioProductCarousel extends LitElement {
139
148
  vioScope: string;
140
149
  /** Human label of the scope (` · Title` in the slot name); inherited from `data-vio-scope-name`. */
141
150
  vioScopeName: string;
151
+ /**
152
+ * The campaign this element's PAGE belongs to (ADR-0034, amendment 3).
153
+ * Inherited: this attribute, else the nearest ancestor's `data-vio-campaign`,
154
+ * else `Vio.init({ campaignId })`. A dashboard assignment of the slot wins
155
+ * over it. Optional.
156
+ */
157
+ vioCampaign: string;
142
158
  /** Per-element override of the content (article) id the events carry; see `Vio.content()`. */
143
159
  vioContentId: string;
144
160
  /** Per-element override of the content title. */
@@ -146,6 +162,8 @@ declare class VioProductCarousel extends LitElement {
146
162
  private readonly slotRegistration;
147
163
  /** The slot id in effect: `vio-slot`, else the auto id (`carousel-N`). Read-only. */
148
164
  get effectiveSlot(): string;
165
+ /** The element's own page campaign (`vio-campaign` / ancestor), if any; `Vio.init`'s applies otherwise. */
166
+ get effectiveCampaignId(): number | undefined;
149
167
  private slotAttributes;
150
168
  /** Attribution every analytics event of this carousel carries (`Vio.attribution` + the content overrides). */
151
169
  private attribution;
@@ -207,19 +225,34 @@ declare class VioProductDetail extends LitElement {
207
225
  vioScope: string;
208
226
  /** Human label of the scope (` · Title` in the slot name); inherited from `data-vio-scope-name`. */
209
227
  vioScopeName: string;
228
+ /**
229
+ * The campaign this element's PAGE belongs to (ADR-0034, amendment 3).
230
+ * Inherited: this attribute, else the nearest ancestor's `data-vio-campaign`,
231
+ * else `Vio.init({ campaignId })`. A dashboard assignment of the slot wins
232
+ * over it. Optional.
233
+ */
234
+ vioCampaign: string;
210
235
  /** Per-element override of the content (article) id the events carry; see `Vio.content()`. */
211
236
  vioContentId: string;
212
237
  /** Per-element override of the content title. */
213
238
  vioContentTitle: string;
214
239
  private readonly slotRegistration;
215
- /** What the click that opened the detail carried ('' when nothing). */
240
+ /** What the click that opened the detail carried ('' when nothing), and for which product. */
216
241
  private eventSlot;
217
242
  private eventContentId;
218
243
  private eventContentTitle;
244
+ private eventCampaignId;
245
+ private eventProductId;
246
+ /** The card's context applies to the product it opened — not to one the host opened by hand later. */
247
+ private get fromCard();
219
248
  /** The slot id in effect for this element: `vio-slot`, else the auto id (`detail-N`). Read-only. */
220
249
  get effectiveSlot(): string;
250
+ /** The element's own page campaign (`vio-campaign` / ancestor), if any; `Vio.init`'s applies otherwise. */
251
+ get effectiveCampaignId(): number | undefined;
221
252
  /** The slot the open product is attributed to: the opening card's, else this element's. */
222
253
  private get activeSlot();
254
+ /** The page-campaign candidates of the open product: the opening card's, then this element's own and its ancestor's. */
255
+ private get activeCampaignHint();
223
256
  private slotAttributes;
224
257
  /** Attribution every event of the open product carries (`Vio.attribution` of the opening card's slot, else this element's). */
225
258
  private attribution;
@@ -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-DSYvrBsB.js';
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-C3qiGvLV.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-COCHGJ2K.js';
2
- export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-COCHGJ2K.js';
3
- import '../chunk-AMDI7KH3.js';
1
+ import { registerVioElements } from '../chunk-N6U65DWG.js';
2
+ export { VioCart, VioCheckout, VioProduct, VioProductCarousel, VioProductDetail, VioTokens, applyVioTheme, registerVioElements } from '../chunk-N6U65DWG.js';
3
+ import '../chunk-AXJKB2CW.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.23.0",
3
+ "version": "0.24.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",
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=chunk-25QECQDS.js.map
3
- //# sourceMappingURL=chunk-25QECQDS.js.map