@xsolla/backpack-js 1.6.0 → 1.6.1-rc.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/types.d.ts CHANGED
@@ -187,6 +187,30 @@ export interface BackpackElementConfig {
187
187
  * the host's actual page colour to keep the tint and have it match.
188
188
  */
189
189
  pageBackground?: string;
190
+ /**
191
+ * Turns on Xsolla Metrika analytics (`enable-analytics` attribute).
192
+ * Defaults to off.
193
+ *
194
+ * Metrika builds a device fingerprint, and the user's consent belongs to
195
+ * the host, so it stays opt-in. If the page already runs Metrika, Backpack
196
+ * reuses that instance; initialise it before this element mounts.
197
+ * Otherwise Backpack starts its own without automatic page tracking.
198
+ */
199
+ enableAnalytics?: boolean;
200
+ /**
201
+ * Metrika external ID (`external-id` attribute): the ID of the host project
202
+ * Backpack is embedded in, sent as `eid` on every Backpack event. Has no
203
+ * effect unless `enableAnalytics` is on.
204
+ */
205
+ externalId?: string;
206
+ /**
207
+ * Inventory item to open as the element loads (`open-item` attribute).
208
+ * Fetched on its own and shown in the action wheel when that fetch returns
209
+ * it. A missing row, a failed fetch, or a hidden SKU leaves the grid as it
210
+ * is. Clearing it, or the player closing the wheel, returns to the catalog.
211
+ * The same id does not open again until it is cleared and set once more.
212
+ */
213
+ openItem?: string;
190
214
  }
191
215
 
192
216
  /**
@@ -196,10 +220,10 @@ export interface BackpackElementConfig {
196
220
  */
197
221
  export interface BackpackSignInContext {
198
222
  source:
199
- | "guest_banner"
200
- | "guest_item_sheet"
201
- | "signed_out_hero"
202
- | "item_info";
223
+ | "guest_banner"
224
+ | "guest_item_sheet"
225
+ | "signed_out_hero"
226
+ | "item_info";
203
227
  /** The item the guest opened. Set by `guest_item_sheet` only. */
204
228
  itemId?: string;
205
229
  itemSku?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/backpack-js",
3
- "version": "1.6.0",
3
+ "version": "1.6.1-rc.1",
4
4
  "description": "Framework-agnostic Xsolla Backpack Web Component — drop-in custom element for Angular, Vue, or vanilla HTML",
5
5
  "type": "module",
6
6
  "sideEffects": [