@active-reach/web-sdk 1.28.0 → 1.30.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/aegis-push.min.js +2 -0
- package/dist/aegis-push.min.js.map +1 -0
- package/dist/aegis.min.js +1 -1
- package/dist/aegis.min.js.map +1 -1
- package/dist/inapp/AegisInAppManager.d.ts +37 -3
- package/dist/inapp/AegisInAppManager.d.ts.map +1 -1
- package/dist/inapp/actions.d.ts +76 -0
- package/dist/inapp/actions.d.ts.map +1 -0
- package/dist/inapp/index.d.ts +2 -0
- package/dist/inapp/index.d.ts.map +1 -1
- package/dist/inapp/renderers/card-style.d.ts +3 -0
- package/dist/inapp/renderers/card-style.d.ts.map +1 -1
- package/dist/inapp/renderers/card-template.d.ts +27 -6
- package/dist/inapp/renderers/card-template.d.ts.map +1 -1
- package/dist/inapp/renderers/carousel-cards.d.ts.map +1 -1
- package/dist/inapp/renderers/index.d.ts +2 -0
- package/dist/inapp/renderers/index.d.ts.map +1 -1
- package/dist/inapp/renderers/product-recommendation.d.ts.map +1 -1
- package/dist/inapp/renderers/reviews.d.ts +38 -0
- package/dist/inapp/renderers/reviews.d.ts.map +1 -0
- package/dist/inapp/renderers/types.d.ts +8 -0
- package/dist/inapp/renderers/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +897 -262
- package/dist/index.js.map +1 -1
- package/dist/push/cdn-push.d.ts +21 -0
- package/dist/push/cdn-push.d.ts.map +1 -0
- package/dist/runtime/AegisMessageRuntime.d.ts +10 -1
- package/dist/runtime/AegisMessageRuntime.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CDN / proxy-served Web Push IIFE bundle.
|
|
3
|
+
*
|
|
4
|
+
* Exposes `window.AegisWebPush` for SCRIPT-TAG integrations (Shopify /
|
|
5
|
+
* WooCommerce / Magento embeds) that cannot ESM-`import` `@active-reach/web-sdk/push`.
|
|
6
|
+
* ACS (the Next.js storefront) imports the `./push` export directly; this is the
|
|
7
|
+
* proxy-served twin. Kept OUT of the main `aegis.min.js` so only storefronts that
|
|
8
|
+
* actually enable push pay the bytes (the locked "Option B" — see
|
|
9
|
+
* docs/architecture/SHOPIFY_PARITY_AND_STANDARDS_PLAN.md §6.2 / §6.10).
|
|
10
|
+
*
|
|
11
|
+
* Push is canonically VAPID/Web Push API (NOT Firebase) — this bundle carries the
|
|
12
|
+
* same `AegisWebPush` class ACS runs in production.
|
|
13
|
+
*/
|
|
14
|
+
import { AegisWebPush } from './AegisWebPush';
|
|
15
|
+
declare global {
|
|
16
|
+
interface Window {
|
|
17
|
+
AegisWebPush: typeof AegisWebPush;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export { AegisWebPush };
|
|
21
|
+
//# sourceMappingURL=cdn-push.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cdn-push.d.ts","sourceRoot":"","sources":["../../src/push/cdn-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,EAAE,OAAO,YAAY,CAAC;KACnC;CACF;AAID,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* `widgets.renderInteractiveCampaign(campaign)` — no CustomEvent bus,
|
|
23
23
|
* no listeners, no registration-order bugs.
|
|
24
24
|
*/
|
|
25
|
-
import { AegisInAppManager, type AegisInAppConfig, type InAppCampaign, type CartState } from '../inapp';
|
|
25
|
+
import { AegisInAppManager, type AegisInAppConfig, type InAppCampaign, type CartState, type AegisAction } from '../inapp';
|
|
26
26
|
import { AegisWidgetManager, type AegisWidgetConfig } from '../widgets';
|
|
27
27
|
import { IntentRuleEvaluator } from '../triggers/IntentRuleEvaluator';
|
|
28
28
|
import { ContactScoresFetcher } from '../triggers/ContactScoresFetcher';
|
|
@@ -168,6 +168,15 @@ export declare class AegisMessageRuntime {
|
|
|
168
168
|
* feed for headless storefronts; prefer `updateContext` for new code.
|
|
169
169
|
*/
|
|
170
170
|
setCartState(state: CartState): void;
|
|
171
|
+
/**
|
|
172
|
+
* Register the canonical CTA-action handler — the CEP-standard single callback
|
|
173
|
+
* that receives every in-app intent (add_to_cart / open_product / open_cart /
|
|
174
|
+
* open_login / navigate / custom). Return `true` when handled; otherwise the SDK
|
|
175
|
+
* applies the graceful fallback. The construct-time `onAction` config is the
|
|
176
|
+
* equivalent; this lets a host register/replace it once it holds the runtime.
|
|
177
|
+
* See CANONICAL_ACTION_MODEL_TRACKER.md.
|
|
178
|
+
*/
|
|
179
|
+
onAction(handler: (action: AegisAction) => boolean | void): void;
|
|
171
180
|
/**
|
|
172
181
|
* The ONE cart writer. Normalizes any cart-ish shape and funnels it into the
|
|
173
182
|
* single `cart` context namespace (read by the Free-Delivery progress card,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AegisMessageRuntime.d.ts","sourceRoot":"","sources":["../../src/runtime/AegisMessageRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,iBAAiB,EAAqB,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"AegisMessageRuntime.d.ts","sourceRoot":"","sources":["../../src/runtime/AegisMessageRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,iBAAiB,EAAqB,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAC7I,OAAO,EAAE,kBAAkB,EAA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SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAOhG;;;;;;OAMG;IACH,aAAa,CAAC,OAAO,EAAE;QAAE,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,KAAK,IAAI,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI;IAkB/H;;;;;;;OAOG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAK9B;;;;;OAKG;IACH,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IAOzB;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAO1B;;;;;;;;;;;;;;;;OAgBG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAIxC;;;;;OAKG;IACH,OAAO,IAAI,IAAI;IAOf;;;;;OAKG;IACH,YAAY,IAAI,aAAa,EAAE;CAMhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@active-reach/web-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
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",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "vite build && node scripts/build-cdn.js && npm run build:snippet && npm run build:types && npm run sync:web",
|
|
48
|
-
"sync:web": "if [ -d ../../apps/web/public ]; then mkdir -p ../../apps/web/public/sdk && cp dist/aegis.min.js dist/aegis.min.js.map ../../apps/web/public/sdk/; else echo 'sync:web: apps/web not in build context (e.g. turbo-pruned cashier-portal build) — skipped; committed bundle is source of truth'; fi",
|
|
48
|
+
"sync:web": "if [ -d ../../apps/web/public ]; then mkdir -p ../../apps/web/public/sdk && cp dist/aegis.min.js dist/aegis.min.js.map dist/aegis-push.min.js dist/aegis-push.min.js.map ../../apps/web/public/sdk/; else echo 'sync:web: apps/web not in build context (e.g. turbo-pruned cashier-portal build) — skipped; committed bundle is source of truth'; fi",
|
|
49
49
|
"build:snippet": "node scripts/minify-snippet.js",
|
|
50
50
|
"build:types": "tsc --project tsconfig.build.json",
|
|
51
51
|
"test": "vitest run",
|