@active-reach/web-sdk 1.27.1 → 1.27.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/aegis.min.js +1 -1
- package/dist/aegis.min.js.map +1 -1
- package/dist/inapp/AegisInAppManager.d.ts.map +1 -1
- package/dist/inapp/font.d.ts +16 -0
- package/dist/inapp/font.d.ts.map +1 -0
- package/dist/inapp/renderers/card-template.d.ts +6 -0
- 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/product-recommendation.d.ts.map +1 -1
- package/dist/index.js +77 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AegisInAppManager.d.ts","sourceRoot":"","sources":["../../src/inapp/AegisInAppManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"AegisInAppManager.d.ts","sourceRoot":"","sources":["../../src/inapp/AegisInAppManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,aAAa,CAAC;AA0C5D,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EACA,OAAO,GACP,QAAQ,GACR,SAAS,GACT,aAAa,GACb,mBAAmB,GACnB,OAAO,GACP,KAAK,GACL,OAAO,GAEP,SAAS,GAET,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,gBAAgB,GAChB,wBAAwB,GAGxB,iBAAiB,GACjB,aAAa,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAA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crB,OAAO,CAAC,SAAS;IA0QjB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,WAAW;IASnB;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,aAAa;IA6PrB;;;0BAGsB;IACtB,OAAO,CAAC,aAAa;IAmCrB;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,aAAa;IAqIrB;;+EAE2E;IAC3E,OAAO,CAAC,YAAY;IAyCpB;;;uDAGmD;IACnD,OAAO,CAAC,UAAU;IAWlB;+EAC2E;IAC3E,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,kBAAkB;IAiI1B,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,aAAa;IAqBrB;;;;;;;;;;;OAWG;YACW,UAAU;IA6GxB,OAAO,CAAC,GAAG;IAMX,OAAO,CAAC,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;CA2CpD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared in-app font default — Urbanist (a free, Google-hosted geometric sans
|
|
3
|
+
* used in place of Zepto's commercial "Gilroy"). Used by every storefront-
|
|
4
|
+
* facing in-app renderer (product cards, recommendation rails, carousels) so
|
|
5
|
+
* the look is consistent on the ACS storefront AND on 3rd-party host pages that
|
|
6
|
+
* embed the SDK and don't already ship the font.
|
|
7
|
+
*/
|
|
8
|
+
export declare const IN_APP_FONT_STACK = "'Urbanist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
|
|
9
|
+
/**
|
|
10
|
+
* Lazy-load the Urbanist webfont once (idempotent). The storefront self-hosts
|
|
11
|
+
* Urbanist via `--font-urbanist`, but a 3rd-party host won't — so any renderer
|
|
12
|
+
* that applies {@link IN_APP_FONT_STACK} calls this to guarantee the glyphs are
|
|
13
|
+
* available. No-op outside the browser.
|
|
14
|
+
*/
|
|
15
|
+
export declare function ensureInAppFont(): void;
|
|
16
|
+
//# sourceMappingURL=font.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font.d.ts","sourceRoot":"","sources":["../../src/inapp/font.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,yEAC0C,CAAC;AAEzE;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAStC"}
|
|
@@ -102,6 +102,12 @@ export interface CardFrame {
|
|
|
102
102
|
/** explicit height (px). Default: content-driven (fits its elements). */
|
|
103
103
|
height?: number;
|
|
104
104
|
min_height?: number;
|
|
105
|
+
/** Card font family. Absent ⇒ the default Urbanist stack (a free, license-
|
|
106
|
+
* clean geometric sans in place of Zepto's commercial "Gilroy"); the SDK
|
|
107
|
+
* lazy-loads Urbanist so it renders on ANY host page. The sentinel
|
|
108
|
+
* `'inherit'` opts OUT — the card inherits the host page font instead. Any
|
|
109
|
+
* other value is a CSS font stack (sanitized before use). */
|
|
110
|
+
fontFamily?: string;
|
|
105
111
|
/** Fire the shared `playReaction` once when this card mounts (a hero/delight
|
|
106
112
|
* moment), instead of only on a `progress` element completing. Mirrors
|
|
107
113
|
* CelebrateConfigSchema. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-template.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/card-template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card-template.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/card-template.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,UAAU,GACV,QAAQ,GACR,UAAU,GACV,KAAK,GAEL,MAAM,GACN,MAAM,GACN,QAAQ,GACR,UAAU,GACV,WAAW,GA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IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,sFAAsF;IACtF,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB;AAID;mFACmF;AACnF,eAAO,MAAM,qBAAqB,EAAE,YAenC,CAAC;AA6BF,qFAAqF;AACrF,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,CAU/E;AA+mBD;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE;IACJ,QAAQ,EAAE,YAAY,CAAC;IACvB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,GACA,WAAW,CAwTb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-cards.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/carousel-cards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"carousel-cards.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/carousel-cards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAS7C,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAuN5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-recommendation.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/product-recommendation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"product-recommendation.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/product-recommendation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAW7C,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAiHpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,WAAW,GAClB,OAAO,CA+FT"}
|
package/dist/index.js
CHANGED
|
@@ -265,6 +265,16 @@ function lucideSvg(name, opts = {}) {
|
|
|
265
265
|
}).join("");
|
|
266
266
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${escapeAttr(color)}" stroke-width="${strokeWidth}" stroke-linecap="round" stroke-linejoin="round"${cls} ${a11y}>${children}</svg>`;
|
|
267
267
|
}
|
|
268
|
+
const IN_APP_FONT_STACK = "'Urbanist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif";
|
|
269
|
+
function ensureInAppFont() {
|
|
270
|
+
if (typeof document === "undefined") return;
|
|
271
|
+
if (document.getElementById("aegis-inapp-font-urbanist")) return;
|
|
272
|
+
const link = document.createElement("link");
|
|
273
|
+
link.id = "aegis-inapp-font-urbanist";
|
|
274
|
+
link.rel = "stylesheet";
|
|
275
|
+
link.href = "https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800&display=swap";
|
|
276
|
+
document.head.appendChild(link);
|
|
277
|
+
}
|
|
268
278
|
function npsBandFromScore(score) {
|
|
269
279
|
if (score <= 6) return "detractor";
|
|
270
280
|
if (score <= 8) return "passive";
|
|
@@ -343,6 +353,17 @@ const WEIGHT = {
|
|
|
343
353
|
};
|
|
344
354
|
const ICON_PX = { sm: 22, md: 30, lg: 40 };
|
|
345
355
|
const TEXT_PX = { sm: 11.5, md: 13, lg: 15 };
|
|
356
|
+
function sanitizeFontFamily(v) {
|
|
357
|
+
return v.replace(/[^a-zA-Z0-9 ,"'-]/g, "").slice(0, 120);
|
|
358
|
+
}
|
|
359
|
+
function resolveCardFont(ff) {
|
|
360
|
+
if (ff === "inherit") return "";
|
|
361
|
+
if (ff && ff.trim()) return sanitizeFontFamily(ff);
|
|
362
|
+
return IN_APP_FONT_STACK;
|
|
363
|
+
}
|
|
364
|
+
function ensureCardFontLoaded(resolvedFont) {
|
|
365
|
+
if (/urbanist/i.test(resolvedFont)) ensureInAppFont();
|
|
366
|
+
}
|
|
346
367
|
function interpolateTokens(s, ctx) {
|
|
347
368
|
if (!s || s.indexOf("{") === -1) return s;
|
|
348
369
|
const props = ctx.properties && ctx.properties() || {};
|
|
@@ -917,6 +938,8 @@ function renderCardFromTemplate(card, opts) {
|
|
|
917
938
|
const fg = contrastFg(frame.bg ? sanitizeColor(frame.bg) : "#ffffff");
|
|
918
939
|
const muted = fg === "#ffffff" ? "rgba(255,255,255,0.72)" : "#6b7280";
|
|
919
940
|
const tile = document.createElement("div");
|
|
941
|
+
const cardFont = resolveCardFont(frame.fontFamily);
|
|
942
|
+
ensureCardFontLoaded(cardFont);
|
|
920
943
|
const radius = frame.radius !== void 0 ? `${parseInt(String(frame.radius), 10) || 12}px` : "12px";
|
|
921
944
|
const fLayout = frame.layout;
|
|
922
945
|
const dir = fLayout === "row" ? "row" : "column";
|
|
@@ -925,9 +948,11 @@ function renderCardFromTemplate(card, opts) {
|
|
|
925
948
|
tile.style.cssText = `
|
|
926
949
|
box-sizing:border-box; display:flex; flex-direction:${dir}; ${fLayout === "row" ? "align-items:center;" : ""} gap:${tileGap}px; position:relative;
|
|
927
950
|
color:${fg};
|
|
951
|
+
${cardFont ? `font-family:${cardFont};` : ""}
|
|
928
952
|
background:${frame.bg ? sanitizeColor(frame.bg) : "#ffffff"};
|
|
929
953
|
border:1px solid ${frame.border ? sanitizeColor(frame.border) : "transparent"};
|
|
930
954
|
border-radius:${radius}; padding:8px;
|
|
955
|
+
${fLayout === "row" ? "" : "box-shadow:0 2px 10px rgba(0,0,0,0.12);"}
|
|
931
956
|
${frame.max_width ? `max-width:${frame.max_width}px;` : ""}${frame.min_width ? `min-width:${frame.min_width}px;` : ""}
|
|
932
957
|
${frame.height ? `height:${frame.height}px;` : ""}${frame.min_height ? `min-height:${frame.min_height}px;` : ""}
|
|
933
958
|
${sizing}
|
|
@@ -1177,6 +1202,7 @@ function renderCarouselCards(ctx) {
|
|
|
1177
1202
|
const autoplay = Number(ic.autoplay_ms) || 0;
|
|
1178
1203
|
const loop = ic.loop !== false;
|
|
1179
1204
|
addAnimationStyles();
|
|
1205
|
+
ensureInAppFont();
|
|
1180
1206
|
const bg = "#ffffff";
|
|
1181
1207
|
const fg = "#0f172a";
|
|
1182
1208
|
const accent = sanitizeColor(campaign.background_color || "#4169e1");
|
|
@@ -1187,7 +1213,7 @@ function renderCarouselCards(ctx) {
|
|
|
1187
1213
|
position: fixed; left: 0; right: 0; bottom: 0;
|
|
1188
1214
|
z-index: 99999; padding: 12px 12px 20px;
|
|
1189
1215
|
background: rgba(0,0,0,0.12); backdrop-filter: blur(8px);
|
|
1190
|
-
font-family:
|
|
1216
|
+
font-family: ${IN_APP_FONT_STACK};
|
|
1191
1217
|
animation: aegisSlideInFromBottom 0.3s ease-out;
|
|
1192
1218
|
`;
|
|
1193
1219
|
const card = document.createElement("div");
|
|
@@ -1358,7 +1384,7 @@ function renderStickyBar(ctx) {
|
|
|
1358
1384
|
position: fixed; ${positionCss}
|
|
1359
1385
|
background: ${bg}; color: ${fg};
|
|
1360
1386
|
padding: 10px 14px; z-index: 999998;
|
|
1361
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
1387
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
1362
1388
|
display: flex; align-items: center; gap: 12px; justify-content: center;
|
|
1363
1389
|
box-shadow: 0 ${position === "top" ? "2px" : "-2px"} 8px rgba(0,0,0,0.08);
|
|
1364
1390
|
`;
|
|
@@ -1446,14 +1472,14 @@ function buildProgressBar(ctx, inline) {
|
|
|
1446
1472
|
bar.style.cssText = inline ? `
|
|
1447
1473
|
background: ${bg}; color: ${fg};
|
|
1448
1474
|
padding: 10px 14px;
|
|
1449
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
1475
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
1450
1476
|
` : `
|
|
1451
1477
|
position: fixed; left: 12px; right: 12px; bottom: 12px;
|
|
1452
1478
|
max-width: 540px; margin: 0 auto;
|
|
1453
1479
|
background: ${bg}; color: ${fg}; border-radius: 12px;
|
|
1454
1480
|
padding: 10px 14px; z-index: 999997;
|
|
1455
1481
|
box-shadow: 0 8px 20px rgba(0,0,0,0.08);
|
|
1456
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
1482
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
1457
1483
|
animation: aegisSlideInFromBottom 0.3s ease-out;
|
|
1458
1484
|
`;
|
|
1459
1485
|
const label = document.createElement("div");
|
|
@@ -1722,7 +1748,7 @@ function renderCoachmarkTour(ctx) {
|
|
|
1722
1748
|
padding: 12px 14px; border-radius: 12px;
|
|
1723
1749
|
max-width: 260px;
|
|
1724
1750
|
box-shadow: 0 8px 24px rgba(0,0,0,0.25);
|
|
1725
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
1751
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
1726
1752
|
animation: aegisFadeIn 0.2s ease;
|
|
1727
1753
|
`;
|
|
1728
1754
|
const titleEl = document.createElement("div");
|
|
@@ -1832,6 +1858,7 @@ function renderProductRecommendation(ctx) {
|
|
|
1832
1858
|
const layout = ic.rec_layout || "grid";
|
|
1833
1859
|
const template = resolveGlobalTemplate(ic);
|
|
1834
1860
|
addAnimationStyles();
|
|
1861
|
+
ensureInAppFont();
|
|
1835
1862
|
const bg = "#ffffff";
|
|
1836
1863
|
const fg = "#0f172a";
|
|
1837
1864
|
const accent = sanitizeColor(campaign.background_color || "#4169e1");
|
|
@@ -1850,7 +1877,7 @@ function renderProductRecommendation(ctx) {
|
|
|
1850
1877
|
max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto;
|
|
1851
1878
|
border-radius: 20px 20px 0 0;
|
|
1852
1879
|
padding: 18px 16px 22px;
|
|
1853
|
-
font-family:
|
|
1880
|
+
font-family: ${IN_APP_FONT_STACK};
|
|
1854
1881
|
animation: aegisSlideInFromBottom 0.3s ease-out;
|
|
1855
1882
|
box-shadow: 0 -12px 30px rgba(0,0,0,0.12);
|
|
1856
1883
|
`;
|
|
@@ -1926,11 +1953,12 @@ function renderProductRecommendationInline(ctx, target) {
|
|
|
1926
1953
|
const fg = "#0f172a";
|
|
1927
1954
|
const accent = sanitizeColor(campaign.background_color || "#4169e1");
|
|
1928
1955
|
addAnimationStyles();
|
|
1956
|
+
ensureInAppFont();
|
|
1929
1957
|
const section = document.createElement("section");
|
|
1930
1958
|
section.className = "aegis-in-app-product-rec-inline";
|
|
1931
1959
|
section.setAttribute("data-campaign-id", campaign.id);
|
|
1932
1960
|
section.style.cssText = `
|
|
1933
|
-
font-family:
|
|
1961
|
+
font-family: ${IN_APP_FONT_STACK};
|
|
1934
1962
|
color: ${fg};
|
|
1935
1963
|
`;
|
|
1936
1964
|
if (campaign.title) {
|
|
@@ -2084,14 +2112,14 @@ function renderLauncherBar(ctx, cfg, target) {
|
|
|
2084
2112
|
padding: 14px 18px 16px 20px; scroll-padding-left: 20px;
|
|
2085
2113
|
background: ${surfaceBg}; backdrop-filter: blur(8px);
|
|
2086
2114
|
box-shadow: 0 -4px 16px rgba(0,0,0,0.08); scrollbar-width: none;
|
|
2087
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2115
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2088
2116
|
animation: aegisSlideInFromBottom 0.3s ease-out;
|
|
2089
2117
|
` : `
|
|
2090
2118
|
display: flex; gap: 16px; align-items: flex-start; overflow-x: auto;
|
|
2091
2119
|
padding: 12px 18px 12px 18px; scroll-padding-left: 18px;
|
|
2092
2120
|
background: ${surfaceBg}; ${cfg.branded ? "border-radius: 16px;" : ""}
|
|
2093
2121
|
scrollbar-width: none;
|
|
2094
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2122
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2095
2123
|
`;
|
|
2096
2124
|
cfg.groups.forEach((g, i) => bar.appendChild(buildGroupBubble(ctx, cfg, g, i, labelColor)));
|
|
2097
2125
|
if (floating) {
|
|
@@ -2212,7 +2240,7 @@ function openViewer(ctx, cfg, startGroupIndex, startFrameIndex = 0) {
|
|
|
2212
2240
|
overlay.style.cssText = `
|
|
2213
2241
|
position: fixed; inset: 0; z-index: 100000; background: #000;
|
|
2214
2242
|
display: flex; align-items: center; justify-content: center;
|
|
2215
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2243
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2216
2244
|
animation: aegisFadeIn 0.25s ease;
|
|
2217
2245
|
`;
|
|
2218
2246
|
const stage = document.createElement("div");
|
|
@@ -2342,7 +2370,7 @@ function openViewer(ctx, cfg, startGroupIndex, startFrameIndex = 0) {
|
|
|
2342
2370
|
if (f.title) {
|
|
2343
2371
|
const t = document.createElement("div");
|
|
2344
2372
|
t.textContent = f.title;
|
|
2345
|
-
t.style.cssText = "font-family: '
|
|
2373
|
+
t.style.cssText = "font-family: 'Urbanist', system-ui, sans-serif; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 6px; text-shadow: 0 1px 8px rgba(0,0,0,0.4);";
|
|
2346
2374
|
copy.appendChild(t);
|
|
2347
2375
|
}
|
|
2348
2376
|
if (f.body) {
|
|
@@ -2508,7 +2536,7 @@ function openGameModal(ctx, className, maxWidth = 360) {
|
|
|
2508
2536
|
const overlay = document.createElement("div");
|
|
2509
2537
|
overlay.className = className;
|
|
2510
2538
|
overlay.setAttribute("data-campaign-id", campaign.id);
|
|
2511
|
-
overlay.style.cssText = 'position:fixed;inset:0;z-index:100000;background:rgba(15,23,42,0.55);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:16px;font-family
|
|
2539
|
+
overlay.style.cssText = 'position:fixed;inset:0;z-index:100000;background:rgba(15,23,42,0.55);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:16px;font-family:"Urbanist",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;animation:aegisFadeIn 0.25s ease;';
|
|
2512
2540
|
const card = document.createElement("div");
|
|
2513
2541
|
card.style.cssText = `position:relative;width:100%;max-width:${maxWidth}px;max-height:88vh;overflow-y:auto;background:${bg};color:${fg};border-radius:20px;padding:24px 20px 20px;box-shadow:0 16px 48px rgba(0,0,0,0.22);animation:aegisScaleIn 0.3s ease;text-align:center;`;
|
|
2514
2542
|
let removed = false;
|
|
@@ -2533,7 +2561,7 @@ function openGameModal(ctx, className, maxWidth = 360) {
|
|
|
2533
2561
|
if (campaign.title) {
|
|
2534
2562
|
const t = document.createElement("div");
|
|
2535
2563
|
t.textContent = campaign.title;
|
|
2536
|
-
t.style.cssText = "font-family:'
|
|
2564
|
+
t.style.cssText = "font-family:'Urbanist',system-ui,sans-serif;font-size:18px;font-weight:800;letter-spacing:-0.01em;margin:2px 24px 4px;line-height:1.25;";
|
|
2537
2565
|
card.appendChild(t);
|
|
2538
2566
|
}
|
|
2539
2567
|
if (campaign.body) {
|
|
@@ -3272,7 +3300,7 @@ function caption(ctx, accent, onCard) {
|
|
|
3272
3300
|
if (campaign.title) {
|
|
3273
3301
|
const t = document.createElement("div");
|
|
3274
3302
|
t.textContent = campaign.title;
|
|
3275
|
-
t.style.cssText = `font-family:'
|
|
3303
|
+
t.style.cssText = `font-family:'Urbanist',system-ui,sans-serif;font-size:17px;font-weight:800;letter-spacing:-0.01em;line-height:1.2;${onCard ? "text-shadow:0 1px 8px rgba(0,0,0,0.4);" : ""}`;
|
|
3276
3304
|
box.appendChild(t);
|
|
3277
3305
|
}
|
|
3278
3306
|
if (campaign.body) {
|
|
@@ -3318,7 +3346,7 @@ function renderVideo(ctx) {
|
|
|
3318
3346
|
const overlay = document.createElement("div");
|
|
3319
3347
|
overlay.className = "aegis-in-app-video-overlay";
|
|
3320
3348
|
overlay.setAttribute("data-campaign-id", campaign.id);
|
|
3321
|
-
overlay.style.cssText = 'position:fixed;inset:0;z-index:100000;background:rgba(15,23,42,0.6);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:16px;font-family
|
|
3349
|
+
overlay.style.cssText = 'position:fixed;inset:0;z-index:100000;background:rgba(15,23,42,0.6);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:16px;font-family:"Urbanist",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;animation:aegisFadeIn 0.25s ease;';
|
|
3322
3350
|
const card = document.createElement("div");
|
|
3323
3351
|
card.style.cssText = `position:relative;width:100%;max-width:${o.aspect === "9:16" ? 320 : 460}px;background:#fff;border-radius:18px;overflow:hidden;box-shadow:0 16px 48px rgba(0,0,0,0.28);animation:aegisScaleIn 0.3s ease;`;
|
|
3324
3352
|
const media = buildVideo(ctx, o.aspect, o.autoplay, o.loop);
|
|
@@ -3363,7 +3391,7 @@ function renderVideoInline(ctx, target) {
|
|
|
3363
3391
|
const banner = document.createElement("div");
|
|
3364
3392
|
banner.className = "aegis-in-app-video-banner";
|
|
3365
3393
|
banner.setAttribute("data-campaign-id", ctx.campaign.id);
|
|
3366
|
-
banner.style.cssText = 'width:100%;font-family
|
|
3394
|
+
banner.style.cssText = 'width:100%;font-family:"Urbanist",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;';
|
|
3367
3395
|
const media = buildVideo(ctx, o.aspect, o.autoplay, o.loop);
|
|
3368
3396
|
if (o.overlayCaption) {
|
|
3369
3397
|
const c = caption(ctx, o.accent, true);
|
|
@@ -5014,6 +5042,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
5014
5042
|
if (typeof localStorage !== "undefined") {
|
|
5015
5043
|
localStorage.setItem("aegis_returning_user", "1");
|
|
5016
5044
|
}
|
|
5045
|
+
ensureInAppFont();
|
|
5017
5046
|
await this.refreshCampaigns();
|
|
5018
5047
|
if (this.enableSSE && this.organizationId) {
|
|
5019
5048
|
this.connectSSE();
|
|
@@ -5560,6 +5589,11 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
5560
5589
|
host.setAttribute("data-aegis-slot-rendered", list[0].id);
|
|
5561
5590
|
slot.appendChild(host);
|
|
5562
5591
|
this.renderCampaignIntoSlot(list[0], host);
|
|
5592
|
+
if (host.childElementCount === 0) {
|
|
5593
|
+
host.remove();
|
|
5594
|
+
this.slotSignatures.delete(slot);
|
|
5595
|
+
return;
|
|
5596
|
+
}
|
|
5563
5597
|
if (flush) this._flattenSlotCard(host);
|
|
5564
5598
|
}
|
|
5565
5599
|
this.filledSlots.add(slot);
|
|
@@ -6433,7 +6467,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
6433
6467
|
body.style.cssText = `padding: ${st.padY ?? 22}px ${st.padX ?? 20}px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px;`;
|
|
6434
6468
|
if (campaign.title) {
|
|
6435
6469
|
const t = document.createElement("div");
|
|
6436
|
-
t.style.cssText = `font-size: 18px; font-weight: 800; letter-spacing: -0.01em; text-align: center; font-family: '
|
|
6470
|
+
t.style.cssText = `font-size: 18px; font-weight: 800; letter-spacing: -0.01em; text-align: center; font-family: 'Urbanist', system-ui, -apple-system, sans-serif;`;
|
|
6437
6471
|
t.textContent = campaign.title;
|
|
6438
6472
|
body.appendChild(t);
|
|
6439
6473
|
}
|
|
@@ -6533,7 +6567,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
6533
6567
|
}
|
|
6534
6568
|
const tx = document.createElement("span");
|
|
6535
6569
|
tx.textContent = label;
|
|
6536
|
-
tx.style.cssText = `white-space: nowrap; line-height: 1.05; font-size: ${fontPx}px; font-weight: 900; font-family: '
|
|
6570
|
+
tx.style.cssText = `white-space: nowrap; line-height: 1.05; font-size: ${fontPx}px; font-weight: 900; font-family: 'Urbanist', system-ui, -apple-system, sans-serif; letter-spacing: 0.2px; text-transform: uppercase; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.65), 0 0 1px rgba(0,0,0,0.9); -webkit-font-smoothing: antialiased;`;
|
|
6537
6571
|
lab.appendChild(tx);
|
|
6538
6572
|
wheel.appendChild(lab);
|
|
6539
6573
|
});
|
|
@@ -6586,7 +6620,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
6586
6620
|
}
|
|
6587
6621
|
const btn = document.createElement("button");
|
|
6588
6622
|
btn.textContent = campaign.button_text || "Spin the wheel";
|
|
6589
|
-
btn.style.cssText = `padding: 9px 22px; border-radius: 999px; border: none; background: ${text}; color: ${bg}; font-size: 13px; font-weight: 700; letter-spacing: 0.2px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.20); transition: transform 0.15s, box-shadow 0.15s; font-family: '
|
|
6623
|
+
btn.style.cssText = `padding: 9px 22px; border-radius: 999px; border: none; background: ${text}; color: ${bg}; font-size: 13px; font-weight: 700; letter-spacing: 0.2px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.20); transition: transform 0.15s, box-shadow 0.15s; font-family: 'Urbanist', system-ui, -apple-system, sans-serif;`;
|
|
6590
6624
|
btn.addEventListener("mouseenter", () => {
|
|
6591
6625
|
if (btn.disabled) return;
|
|
6592
6626
|
btn.style.transform = "translateY(-1px)";
|
|
@@ -6683,7 +6717,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
6683
6717
|
eyebrow.style.cssText = "font-size: 13px; font-weight: 700; letter-spacing: 0.3px; opacity: 0.8;";
|
|
6684
6718
|
const big = document.createElement("div");
|
|
6685
6719
|
big.textContent = r.label;
|
|
6686
|
-
big.style.cssText = `font-size: 24px; font-weight: 900; letter-spacing: -0.02em; font-family: '
|
|
6720
|
+
big.style.cssText = `font-size: 24px; font-weight: 900; letter-spacing: -0.02em; font-family: 'Urbanist', system-ui, -apple-system, sans-serif;`;
|
|
6687
6721
|
ov.appendChild(eyebrow);
|
|
6688
6722
|
ov.appendChild(big);
|
|
6689
6723
|
if (r.code) {
|
|
@@ -7347,7 +7381,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
7347
7381
|
eb.style.cssText = "font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; opacity: 0.7;";
|
|
7348
7382
|
const big = document.createElement("div");
|
|
7349
7383
|
big.textContent = label;
|
|
7350
|
-
big.style.cssText = `font-size: 22px; font-weight: 900; letter-spacing: -0.02em; font-family: '
|
|
7384
|
+
big.style.cssText = `font-size: 22px; font-weight: 900; letter-spacing: -0.02em; font-family: 'Urbanist', system-ui, sans-serif;`;
|
|
7351
7385
|
ov.appendChild(eb);
|
|
7352
7386
|
ov.appendChild(big);
|
|
7353
7387
|
if (code) {
|
|
@@ -8275,7 +8309,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
8275
8309
|
};
|
|
8276
8310
|
const heading = (txt, big = false) => {
|
|
8277
8311
|
const t = document.createElement("div");
|
|
8278
|
-
t.style.cssText = `font-size: ${big ? 19 : 14}px; font-weight: ${big ? 800 : 600}; letter-spacing: -0.01em; line-height: 1.3; margin-bottom: ${big ? 6 : 14}px; font-family: '
|
|
8312
|
+
t.style.cssText = `font-size: ${big ? 19 : 14}px; font-weight: ${big ? 800 : 600}; letter-spacing: -0.01em; line-height: 1.3; margin-bottom: ${big ? 6 : 14}px; font-family: 'Urbanist', system-ui, -apple-system, sans-serif;`;
|
|
8279
8313
|
t.textContent = txt;
|
|
8280
8314
|
return t;
|
|
8281
8315
|
};
|
|
@@ -8668,7 +8702,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
8668
8702
|
display: flex;
|
|
8669
8703
|
align-items: center;
|
|
8670
8704
|
justify-content: space-between;
|
|
8671
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
8705
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
8672
8706
|
animation: ${atBottom ? "aegisSlideInFromBottom" : "aegisSlideDown"} 0.3s ease-out;
|
|
8673
8707
|
`;
|
|
8674
8708
|
banner.setAttribute("data-banner-position", atBottom ? "bottom" : "top");
|
|
@@ -8788,7 +8822,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
8788
8822
|
overflow: auto;
|
|
8789
8823
|
box-shadow: 0 16px 48px rgba(0,0,0,0.22);
|
|
8790
8824
|
animation: aegisScaleIn 0.3s ease-out;
|
|
8791
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
8825
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
8792
8826
|
`;
|
|
8793
8827
|
if (videoUrl) {
|
|
8794
8828
|
const mediaWrap = document.createElement("div");
|
|
@@ -8962,7 +8996,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
8962
8996
|
z-index: 1000001; display: flex; flex-direction: column; align-items: center;
|
|
8963
8997
|
justify-content: ${isBg ? "flex-end" : "center"}; padding: ${isBg ? "0" : "40px 20px"};
|
|
8964
8998
|
animation: aegisFadeIn 0.3s ease-out; overflow: hidden;
|
|
8965
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
8999
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
8966
9000
|
`;
|
|
8967
9001
|
if (isBg) {
|
|
8968
9002
|
const media = document.createElement("div");
|
|
@@ -9100,7 +9134,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
9100
9134
|
overflow: auto;
|
|
9101
9135
|
box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
|
|
9102
9136
|
animation: aegisSlideUp 0.3s ease-out;
|
|
9103
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9137
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9104
9138
|
`;
|
|
9105
9139
|
const grabber = document.createElement("div");
|
|
9106
9140
|
grabber.style.cssText = `width: 40px; height: 4px; border-radius: 2px; background: ${st.text}33; margin: 10px auto 0;`;
|
|
@@ -9245,7 +9279,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
9245
9279
|
width: 85%;
|
|
9246
9280
|
box-shadow: 0 16px 48px rgba(0,0,0,0.22);
|
|
9247
9281
|
animation: aegisScaleIn 0.2s ease-out;
|
|
9248
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9282
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9249
9283
|
overflow: hidden;
|
|
9250
9284
|
`;
|
|
9251
9285
|
const content = document.createElement("div");
|
|
@@ -9363,7 +9397,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
9363
9397
|
background: #000; border-radius: 14px; overflow: hidden;
|
|
9364
9398
|
box-shadow: 0 10px 30px rgba(0,0,0,0.38); z-index: 999999;
|
|
9365
9399
|
animation: ${slideAnim} 0.3s ease-out; transition: width 0.25s ease, border-radius 0.25s ease;
|
|
9366
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9400
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9367
9401
|
`;
|
|
9368
9402
|
const mediaWrap = document.createElement("div");
|
|
9369
9403
|
mediaWrap.style.cssText = "position: relative; width: 100%; background: #000; line-height: 0; aspect-ratio: 16 / 9;";
|
|
@@ -9514,7 +9548,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
9514
9548
|
position: fixed; ${cornerCss} width: ${cornerW}px; max-width: calc(100vw - ${gap * 2}px);
|
|
9515
9549
|
background: #000; border-radius: 14px; overflow: hidden;
|
|
9516
9550
|
box-shadow: 0 10px 30px rgba(0,0,0,0.38); z-index: 999999; transition: none;
|
|
9517
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9551
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9518
9552
|
`;
|
|
9519
9553
|
if (expandBtn) {
|
|
9520
9554
|
expandBtn.textContent = "⤢";
|
|
@@ -9534,7 +9568,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
9534
9568
|
width: ${theaterW}px; max-width: calc(100vw - ${gap * 2}px);
|
|
9535
9569
|
background: #000; border-radius: 16px; overflow: hidden;
|
|
9536
9570
|
box-shadow: 0 24px 60px rgba(0,0,0,0.55); z-index: 999999; transition: none;
|
|
9537
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9571
|
+
font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9538
9572
|
`;
|
|
9539
9573
|
if (expandBtn) {
|
|
9540
9574
|
expandBtn.innerHTML = lucideSvg("x", { size: 16 });
|
|
@@ -9664,7 +9698,7 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
9664
9698
|
tooltip.style.cssText = `
|
|
9665
9699
|
position: absolute; z-index: 1000001; max-width: 280px; width: max-content;
|
|
9666
9700
|
background: ${bg}; color: ${textColor}; border-radius: 10px; padding: 14px 16px;
|
|
9667
|
-
box-shadow: 0 8px 24px rgba(0,0,0,0.18); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9701
|
+
box-shadow: 0 8px 24px rgba(0,0,0,0.18); font-family: 'Urbanist', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
9668
9702
|
animation: aegisScaleIn 0.2s ease-out; pointer-events: auto;
|
|
9669
9703
|
`;
|
|
9670
9704
|
const arrow = document.createElement("div");
|
|
@@ -9940,10 +9974,21 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
9940
9974
|
};
|
|
9941
9975
|
const spec = SPEC[intent];
|
|
9942
9976
|
const festive = spec.festive;
|
|
9977
|
+
let px = festive ? 150 : intent === "acknowledge" ? 92 : 124;
|
|
9978
|
+
let ringPx = 60;
|
|
9979
|
+
if (!viewport && host) {
|
|
9980
|
+
const rect = host.getBoundingClientRect();
|
|
9981
|
+
const fit = Math.min(rect.width, rect.height);
|
|
9982
|
+
if (fit > 0 && fit < px) {
|
|
9983
|
+
const scaled = Math.max(44, Math.round(fit * 0.82));
|
|
9984
|
+
ringPx = Math.max(24, Math.round(ringPx * (scaled / px)));
|
|
9985
|
+
px = scaled;
|
|
9986
|
+
}
|
|
9987
|
+
}
|
|
9943
9988
|
if (festive && !reduce) {
|
|
9944
9989
|
for (let i = 0; i < 3; i++) {
|
|
9945
9990
|
const ring = document.createElement("div");
|
|
9946
|
-
ring.style.cssText = `position: absolute; left: 50%; top: 50%; width:
|
|
9991
|
+
ring.style.cssText = `position: absolute; left: 50%; top: 50%; width: ${ringPx}px; height: ${ringPx}px; border-radius: 50%; border: 3px solid ${spec.ring}; animation: aegisRing 1.1s ease-out ${i * 0.18}s forwards;`;
|
|
9947
9992
|
layer.appendChild(ring);
|
|
9948
9993
|
}
|
|
9949
9994
|
}
|
|
@@ -9951,7 +9996,6 @@ const _AegisInAppManager = class _AegisInAppManager {
|
|
|
9951
9996
|
const reactionIcon = svgNode(this._reactionSvg(spec.svg));
|
|
9952
9997
|
if (reactionIcon) g.appendChild(reactionIcon);
|
|
9953
9998
|
const motion = reduce ? "" : intent !== "empathize" ? "animation: aegisReactionPop 0.7s cubic-bezier(.2,.9,.3,1.2) forwards, aegisReactionFloatOut 0.7s ease-in 1.9s forwards;" : "animation: aegisReactionSoft 0.9s ease-out forwards;";
|
|
9954
|
-
const px = festive ? 150 : intent === "acknowledge" ? 92 : 124;
|
|
9955
9999
|
g.style.cssText = `position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: ${px}px; height: ${px}px; display: flex; align-items: center; justify-content: center; line-height: 0; filter: drop-shadow(0 8px 16px rgba(0,0,0,0.30)); ${motion}`;
|
|
9956
10000
|
layer.appendChild(g);
|
|
9957
10001
|
anchor.appendChild(layer);
|