@active-reach/web-sdk 1.35.0 → 1.35.2

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/react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { createContext, useState, useEffect, useContext } from "react";
2
- import { A as Aegis } from "./analytics-CCDZCnut.mjs";
2
+ import { A as Aegis } from "./analytics-ZwrwqCTJ.mjs";
3
3
  const AegisContext = createContext({
4
4
  aegis: null,
5
5
  isReady: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@active-reach/web-sdk",
3
- "version": "1.35.0",
3
+ "version": "1.35.2",
4
4
  "description": "Web SDK for Active Reach Intelligence — event tracking, identity resolution, in-app messaging, web push, and placements",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,40 +0,0 @@
1
- /**
2
- * Per-SKU rating-capture renderer (G5 — PER_SKU_RATING_CAPTURE_TRACKER).
3
- *
4
- * The CAPTURE counterpart to the `reviews.ts` display wall. A `star_rating`
5
- * campaign running in `interactive_config.rating_mode='per_item'` renders one
6
- * star row per line-item of the customer's order and submits an `items[]` array
7
- * to `POST /v1/in-app/responses`. The server fans this out into the canonical
8
- * per-SKU write path (`persist_item_ratings` → `customer_survey_responses` →
9
- * `external_reviews`) so the ratings feed the PDP review wall — exactly like the
10
- * old hardcoded bill widget, but now campaign-driven and cross-surface.
11
- *
12
- * Like `reviews.ts` this is an I/O-doing inline renderer (the Active-Chat
13
- * precedent). Order context is read from the `[data-aegis-slot]` HOST element
14
- * (not the SDK-injected wrapper), mirroring the reviews binding:
15
- * - `data-rateable-items` JSON `[{product_id, name}]` — the order's lines
16
- * - `data-order-id` trusted on Aegis surfaces (bill / ACS orders)
17
- * - `data-bill-code` bill short-code (Aegis bill)
18
- * - `data-token` campaign_token (Shopify / 3rd-party untrusted origins)
19
- * - `data-accent` host brand colour
20
- * The server NEVER trusts client SKUs on 3rd-party origins — the token resolves
21
- * the real order + verified-buyer flag server-side.
22
- *
23
- * Between fetches it is pure inline-styled DOM (IN_APP_FONT_STACK) so it works on
24
- * any host incl. Shopify themes. No new sub_type, no new endpoint — drift-free.
25
- */
26
- import type { RenderContext } from './types';
27
- /** SDK credentials + identity the submit needs (the campaign payload doesn't
28
- * carry them). Supplied by `AegisInAppManager`, same shape as ReviewsCredentials. */
29
- export interface ProductRatingCredentials {
30
- writeKey: string;
31
- apiHost: string;
32
- organizationId: string;
33
- contactId: string | null;
34
- }
35
- /**
36
- * Render the per-SKU rating card. Returns false (slot collapses) when there's no
37
- * order context to rate — never shows a misleading order-level strip.
38
- */
39
- export declare function renderProductRatingInline(ctx: RenderContext, target: HTMLElement, creds: ProductRatingCredentials): boolean;
40
- //# sourceMappingURL=product-rating.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"product-rating.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/product-rating.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C;sFACsF;AACtF,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAwED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CA6HT"}