@eazo/sdk 0.13.0 → 0.15.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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/banner-ui/app-info.d.ts +78 -0
- package/dist/internal/banner-ui/app-info.d.ts.map +1 -0
- package/dist/internal/banner-ui/app-info.js +62 -0
- package/dist/internal/banner-ui/app-info.js.map +1 -0
- package/dist/internal/banner-ui/icons.d.ts +18 -4
- package/dist/internal/banner-ui/icons.d.ts.map +1 -1
- package/dist/internal/banner-ui/icons.js +58 -4
- package/dist/internal/banner-ui/icons.js.map +1 -1
- package/dist/internal/banner-ui/index.d.ts +16 -3
- package/dist/internal/banner-ui/index.d.ts.map +1 -1
- package/dist/internal/banner-ui/index.js +377 -41
- package/dist/internal/banner-ui/index.js.map +1 -1
- package/dist/internal/banner-ui/initial-info.d.ts +4 -0
- package/dist/internal/banner-ui/initial-info.d.ts.map +1 -0
- package/dist/internal/banner-ui/initial-info.js +22 -0
- package/dist/internal/banner-ui/initial-info.js.map +1 -0
- package/dist/internal/banner-ui/qr.d.ts +22 -0
- package/dist/internal/banner-ui/qr.d.ts.map +1 -0
- package/dist/internal/banner-ui/qr.js +95 -0
- package/dist/internal/banner-ui/qr.js.map +1 -0
- package/dist/internal/banner-ui/store-links.d.ts +38 -0
- package/dist/internal/banner-ui/store-links.d.ts.map +1 -1
- package/dist/internal/banner-ui/store-links.js +49 -0
- package/dist/internal/banner-ui/store-links.js.map +1 -1
- package/dist/internal/banner-ui/styles.d.ts +4 -2
- package/dist/internal/banner-ui/styles.d.ts.map +1 -1
- package/dist/internal/banner-ui/styles.js +709 -66
- package/dist/internal/banner-ui/styles.js.map +1 -1
- package/dist/react.d.ts +26 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +42 -2
- package/dist/react.js.map +1 -1
- package/dist/react.server.d.ts +22 -0
- package/dist/react.server.d.ts.map +1 -0
- package/dist/react.server.js +118 -0
- package/dist/react.server.js.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13 -1
- package/dist/server.js.map +1 -1
- package/package.json +7 -2
|
@@ -37,75 +37,411 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.EazoBrandBanner = EazoBrandBanner;
|
|
38
38
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
39
39
|
const React = __importStar(require("react"));
|
|
40
|
+
const config_1 = require("../config");
|
|
40
41
|
const env_1 = require("../env");
|
|
41
42
|
const icons_1 = require("./icons");
|
|
43
|
+
const qr_1 = require("./qr");
|
|
44
|
+
const app_info_1 = require("./app-info");
|
|
45
|
+
const initial_info_1 = require("./initial-info");
|
|
42
46
|
const store_links_1 = require("./store-links");
|
|
43
47
|
const styles_1 = require("./styles");
|
|
44
|
-
|
|
48
|
+
// iOS Safari has no native fallback for an unhandled `eazo://` scheme;
|
|
49
|
+
// after this long we assume the app isn't installed and redirect to the
|
|
50
|
+
// store. Matches the value in `store-links.ts`.
|
|
51
|
+
const IOS_FALLBACK_TIMEOUT_MS = 1500;
|
|
45
52
|
const MOBILE_BREAKPOINT_PX = 480;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
// Delay before the center handoff modal appears — gives users a minute
|
|
54
|
+
// to actually use the app before the strong CTA pops up. The top and
|
|
55
|
+
// bottom banners stay visible from first paint; this only gates the
|
|
56
|
+
// center "Open in Eazo app" modal.
|
|
57
|
+
const MODAL_DELAY_MS = 60000;
|
|
58
|
+
function isMobile() {
|
|
59
|
+
if (typeof window === "undefined")
|
|
53
60
|
return false;
|
|
54
|
-
|
|
61
|
+
return window.innerWidth <= MOBILE_BREAKPOINT_PX;
|
|
55
62
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
window.sessionStorage.setItem(DISMISS_KEY, "1");
|
|
59
|
-
}
|
|
60
|
-
catch {
|
|
61
|
-
// Ignore: dismissal still works in-memory via React state.
|
|
62
|
-
}
|
|
63
|
+
function topBannerHeightPx(mobile) {
|
|
64
|
+
return mobile ? styles_1.BANNER_HEIGHT_MOBILE : styles_1.BANNER_HEIGHT_DESKTOP;
|
|
63
65
|
}
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
function bottomBannerHeightPx(mobile) {
|
|
67
|
+
return mobile ? styles_1.BOTTOM_HEIGHT_MOBILE : styles_1.BOTTOM_HEIGHT_DESKTOP;
|
|
68
|
+
}
|
|
69
|
+
function formatStat(n) {
|
|
70
|
+
if (typeof n !== "number" || !Number.isFinite(n) || n < 0)
|
|
71
|
+
return "0";
|
|
72
|
+
if (n < 1000)
|
|
73
|
+
return String(Math.floor(n));
|
|
74
|
+
if (n < 10000)
|
|
75
|
+
return `${(n / 1000).toFixed(1)}k`;
|
|
76
|
+
if (n < 1000000)
|
|
77
|
+
return `${Math.round(n / 1000)}k`;
|
|
78
|
+
return `${(n / 1000000).toFixed(1)}m`;
|
|
70
79
|
}
|
|
71
80
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
81
|
+
* True when the string is shaped like a URL pointing at an image — covers
|
|
82
|
+
* the forms `creator_apps.icon` may carry: absolute http(s) URLs,
|
|
83
|
+
* protocol-relative URLs, server-relative paths, and inline `data:image/...`
|
|
84
|
+
* URIs. Anything else (emoji glyphs, single letters, etc.) renders as
|
|
85
|
+
* text in the monolith.
|
|
86
|
+
*/
|
|
87
|
+
function isImageUrl(s) {
|
|
88
|
+
return (/^https?:\/\//i.test(s) ||
|
|
89
|
+
s.startsWith("//") ||
|
|
90
|
+
s.startsWith("/") ||
|
|
91
|
+
s.startsWith("data:image/"));
|
|
92
|
+
}
|
|
93
|
+
function deriveInitials(name) {
|
|
94
|
+
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
95
|
+
if (parts.length === 0)
|
|
96
|
+
return "·";
|
|
97
|
+
if (parts.length === 1)
|
|
98
|
+
return parts[0].slice(0, 2);
|
|
99
|
+
return (parts[0][0] + parts[1][0]).toUpperCase();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Web-only handoff overlay. Mounted by `<EazoProvider>` and visible only
|
|
103
|
+
* in pure-web environments (not the eazoMobile WebView, not embedded
|
|
104
|
+
* iframes). Three coordinated pieces:
|
|
105
|
+
*
|
|
106
|
+
* 1. Top banner — brand + "MOBILE REQUIRED" pill + domain + "Open in app" CTA.
|
|
107
|
+
* 2. Full-screen scrim with coral spotlight + center modal (orbiting
|
|
108
|
+
* capability icons, app identity, QR + primary CTA). Non-dismissible.
|
|
109
|
+
* 3. Bottom banner — capability rail + likes/comments stats + eazo.ai pill.
|
|
110
|
+
*
|
|
111
|
+
* App identity (name, tagline, likes, comments) is fetched once from
|
|
112
|
+
* `GET /apps-open/:appId`. The CTA + QR encode the `eazo://` deep link;
|
|
113
|
+
* the iOS click-handler falls back to the App Store after a short delay
|
|
114
|
+
* if the app isn't installed.
|
|
115
|
+
*
|
|
116
|
+
* Kept exported as `EazoBrandBanner` for backwards compatibility with
|
|
117
|
+
* `EazoProvider`, which mounts it by that name.
|
|
75
118
|
*/
|
|
76
119
|
function EazoBrandBanner() {
|
|
77
|
-
const [
|
|
78
|
-
const [
|
|
120
|
+
const [mounted, setMounted] = React.useState(false);
|
|
121
|
+
const [cta, setCta] = React.useState(null);
|
|
122
|
+
// Seed `info` from the prefetched value (if the host's Server
|
|
123
|
+
// Component passed `<EazoProvider initialAppInfo>`) so the modal
|
|
124
|
+
// renders real content on first paint without a skeleton flash.
|
|
125
|
+
// `useState(initializer)` runs the lazy initializer once at first
|
|
126
|
+
// render; `getInitialAppInfo()` reads what `EazoProvider` stashed
|
|
127
|
+
// synchronously in the SAME render pass.
|
|
128
|
+
const [info, setInfo] = React.useState(() => (0, initial_info_1.getInitialAppInfo)());
|
|
129
|
+
// `loading === true` until the public app-info fetch settles (success
|
|
130
|
+
// or failure). Skip the loading state entirely when a prefetched value
|
|
131
|
+
// is already in hand — no fetch is going to fire.
|
|
132
|
+
const [loading, setLoading] = React.useState(() => (0, initial_info_1.getInitialAppInfo)() === null);
|
|
133
|
+
const [mobile, setMobile] = React.useState(false);
|
|
134
|
+
// In-memory dismiss for the strong-CTA modal — intentionally NOT
|
|
135
|
+
// persisted. Every page load (navigation, refresh, new tab) re-engages
|
|
136
|
+
// the modal; the X / ESC just hides it for the current session of this
|
|
137
|
+
// page. The top + bottom banners stay regardless.
|
|
138
|
+
const [modalDismissed, setModalDismissed] = React.useState(false);
|
|
139
|
+
// Gate the modal behind a delay so users get to use the app for a
|
|
140
|
+
// minute before the strong CTA interrupts them. Flips once on mount;
|
|
141
|
+
// dismiss state above overrides this — once closed, the modal stays
|
|
142
|
+
// closed for this page load even if the timer hasn't fired yet.
|
|
143
|
+
const [modalReady, setModalReady] = React.useState(false);
|
|
144
|
+
// Resolved on mount in the browser. Encoded by the QR so a desktop
|
|
145
|
+
// scan opens the EXACT page on a phone (which then sends the user
|
|
146
|
+
// through the same handoff via the mobile route).
|
|
147
|
+
const [pageUrl, setPageUrl] = React.useState("");
|
|
79
148
|
React.useEffect(() => {
|
|
80
149
|
if ((0, env_1.getHost)() !== "web")
|
|
81
150
|
return;
|
|
82
|
-
if (readDismissed())
|
|
83
|
-
return;
|
|
84
151
|
(0, styles_1.ensureBannerStylesInjected)();
|
|
85
|
-
|
|
86
|
-
|
|
152
|
+
setCta((0, store_links_1.resolveBannerCta)());
|
|
153
|
+
setMobile(isMobile());
|
|
154
|
+
setPageUrl(typeof window !== "undefined" ? window.location.href : "");
|
|
155
|
+
setMounted(true);
|
|
156
|
+
}, []);
|
|
157
|
+
const dismissModal = React.useCallback(() => {
|
|
158
|
+
setModalDismissed(true);
|
|
87
159
|
}, []);
|
|
160
|
+
// Flip `modalReady` after MODAL_DELAY_MS so the strong CTA only
|
|
161
|
+
// appears once the user has had time to engage with the app. Cleaned
|
|
162
|
+
// up on unmount so a quick navigation doesn't leak a timer that
|
|
163
|
+
// re-renders the (now stale) Provider.
|
|
164
|
+
React.useEffect(() => {
|
|
165
|
+
if (!mounted)
|
|
166
|
+
return;
|
|
167
|
+
const timer = window.setTimeout(() => {
|
|
168
|
+
setModalReady(true);
|
|
169
|
+
}, MODAL_DELAY_MS);
|
|
170
|
+
return () => window.clearTimeout(timer);
|
|
171
|
+
}, [mounted]);
|
|
172
|
+
// ESC closes the modal — same dismiss path as the X button. Only
|
|
173
|
+
// armed while the modal is actually rendered.
|
|
88
174
|
React.useEffect(() => {
|
|
89
|
-
if (!
|
|
175
|
+
if (!mounted || modalDismissed || !modalReady)
|
|
176
|
+
return;
|
|
177
|
+
const onKeyDown = (e) => {
|
|
178
|
+
if (e.key === "Escape")
|
|
179
|
+
dismissModal();
|
|
180
|
+
};
|
|
181
|
+
document.addEventListener("keydown", onKeyDown);
|
|
182
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
183
|
+
}, [mounted, modalDismissed, modalReady, dismissModal]);
|
|
184
|
+
// Three coupled responsibilities, all client-side, all keyed to the
|
|
185
|
+
// banner actually being visible (host === "web", post-mount):
|
|
186
|
+
//
|
|
187
|
+
// 1. Reserve top + bottom padding on `<html>` so the host page's
|
|
188
|
+
// flow-layout content doesn't tuck under the fixed banners.
|
|
189
|
+
//
|
|
190
|
+
// 2. Expose the reserved heights as `--eazo-handoff-top` / `bottom`
|
|
191
|
+
// CSS custom properties on `<html>`. The `.eazo-app-area`
|
|
192
|
+
// wrapper (rendered by `EazoProvider`) reads these for its inset
|
|
193
|
+
// box, and host code can read them too for tooltip / popover
|
|
194
|
+
// coordination (e.g. `bottom: calc(var(--eazo-handoff-bottom) + 12px)`).
|
|
195
|
+
//
|
|
196
|
+
// 3. Add the `eazo-host-web` class on `<html>`. This is the GATE for
|
|
197
|
+
// the `.eazo-app-area` wrapper's effective styling (position:
|
|
198
|
+
// fixed + overflow + containing block). The class is only added
|
|
199
|
+
// here, not in `react.tsx`, so it's coupled to banner visibility
|
|
200
|
+
// — in a mobile WebView or iframe the banner-ui mount-gate above
|
|
201
|
+
// bails out and the class is never set, leaving the wrapper as
|
|
202
|
+
// an inert pass-through `<div>` that doesn't disturb the host's
|
|
203
|
+
// scroll model or fixed-positioning containment.
|
|
204
|
+
//
|
|
205
|
+
// All three are restored on unmount so a Provider that comes and
|
|
206
|
+
// goes leaves no residue.
|
|
207
|
+
React.useEffect(() => {
|
|
208
|
+
if (!mounted)
|
|
90
209
|
return;
|
|
91
210
|
const html = document.documentElement;
|
|
92
|
-
const
|
|
211
|
+
const previousTop = html.style.paddingTop;
|
|
212
|
+
const previousBottom = html.style.paddingBottom;
|
|
213
|
+
const previousVarTop = html.style.getPropertyValue("--eazo-handoff-top");
|
|
214
|
+
const previousVarBottom = html.style.getPropertyValue("--eazo-handoff-bottom");
|
|
215
|
+
html.classList.add("eazo-host-web");
|
|
93
216
|
const apply = () => {
|
|
94
|
-
|
|
217
|
+
const m = isMobile();
|
|
218
|
+
setMobile(m);
|
|
219
|
+
const top = topBannerHeightPx(m);
|
|
220
|
+
const bottom = bottomBannerHeightPx(m);
|
|
221
|
+
html.style.paddingTop = `${top}px`;
|
|
222
|
+
html.style.paddingBottom = `${bottom}px`;
|
|
223
|
+
html.style.setProperty("--eazo-handoff-top", `${top}px`);
|
|
224
|
+
html.style.setProperty("--eazo-handoff-bottom", `${bottom}px`);
|
|
95
225
|
};
|
|
96
226
|
apply();
|
|
97
227
|
window.addEventListener("resize", apply);
|
|
98
228
|
return () => {
|
|
99
229
|
window.removeEventListener("resize", apply);
|
|
100
|
-
html.
|
|
230
|
+
html.classList.remove("eazo-host-web");
|
|
231
|
+
html.style.paddingTop = previousTop;
|
|
232
|
+
html.style.paddingBottom = previousBottom;
|
|
233
|
+
if (previousVarTop) {
|
|
234
|
+
html.style.setProperty("--eazo-handoff-top", previousVarTop);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
html.style.removeProperty("--eazo-handoff-top");
|
|
238
|
+
}
|
|
239
|
+
if (previousVarBottom) {
|
|
240
|
+
html.style.setProperty("--eazo-handoff-bottom", previousVarBottom);
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
html.style.removeProperty("--eazo-handoff-bottom");
|
|
244
|
+
}
|
|
101
245
|
};
|
|
102
|
-
}, [
|
|
103
|
-
|
|
246
|
+
}, [mounted]);
|
|
247
|
+
// Fetch public app info on the client when the host didn't prefetch.
|
|
248
|
+
// If `initialAppInfo` was supplied via the Provider, `info` is already
|
|
249
|
+
// seeded above and `loading` is already false — skip the fetch entirely.
|
|
250
|
+
// The overlay still renders without info — the identity falls back to
|
|
251
|
+
// initials / generic copy. `loading` clears either way so the skeleton
|
|
252
|
+
// doesn't shimmer forever on fetch failure.
|
|
253
|
+
React.useEffect(() => {
|
|
254
|
+
if (!mounted)
|
|
255
|
+
return;
|
|
256
|
+
if (info)
|
|
257
|
+
return;
|
|
258
|
+
const appId = (0, config_1.getAppId)();
|
|
259
|
+
if (!appId) {
|
|
260
|
+
setLoading(false);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
const controller = new AbortController();
|
|
264
|
+
(0, app_info_1.fetchPublicAppInfo)(appId, { signal: controller.signal })
|
|
265
|
+
.then((data) => {
|
|
266
|
+
if (controller.signal.aborted)
|
|
267
|
+
return;
|
|
268
|
+
setInfo(data);
|
|
269
|
+
setLoading(false);
|
|
270
|
+
})
|
|
271
|
+
.catch(() => {
|
|
272
|
+
if (controller.signal.aborted)
|
|
273
|
+
return;
|
|
274
|
+
setLoading(false);
|
|
275
|
+
});
|
|
276
|
+
return () => controller.abort();
|
|
277
|
+
// `info` is captured via closure on first mount; intentionally not in
|
|
278
|
+
// deps — we only want to attempt the client fetch once, on
|
|
279
|
+
// mount, if no prefetch was supplied. Re-fetching when `info` later
|
|
280
|
+
// changes would be pointless.
|
|
281
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
282
|
+
}, [mounted]);
|
|
283
|
+
if (!mounted || !cta)
|
|
104
284
|
return null;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
285
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "eazo-handoff-root", children: [(0, jsx_runtime_1.jsx)(TopBanner, { cta: cta, pageUrl: pageUrl }), modalDismissed || !modalReady ? null : ((0, jsx_runtime_1.jsx)(Overlay, { info: info, cta: cta, loading: loading, pageUrl: pageUrl, onDismiss: dismissModal })), (0, jsx_runtime_1.jsx)(BottomBanner, { info: info, loading: loading, cta: cta })] }));
|
|
286
|
+
}
|
|
287
|
+
// ---------------------------------------------------------------------------
|
|
288
|
+
// CTA click handler — same scheme + iOS-timeout fallback used elsewhere
|
|
289
|
+
// in the SDK. Lives at module scope so both the top-bar button and the
|
|
290
|
+
// modal primary CTA share the exact same behaviour.
|
|
291
|
+
// ---------------------------------------------------------------------------
|
|
292
|
+
function bindCtaClick(cta) {
|
|
293
|
+
return () => {
|
|
294
|
+
if (!cta.needsTimeoutFallback)
|
|
295
|
+
return;
|
|
296
|
+
const start = Date.now();
|
|
297
|
+
let appOpened = false;
|
|
298
|
+
const onVisibilityChange = () => {
|
|
299
|
+
if (document.visibilityState === "hidden")
|
|
300
|
+
appOpened = true;
|
|
301
|
+
};
|
|
302
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
303
|
+
window.setTimeout(() => {
|
|
304
|
+
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
305
|
+
if (!appOpened &&
|
|
306
|
+
document.visibilityState === "visible" &&
|
|
307
|
+
Date.now() - start < IOS_FALLBACK_TIMEOUT_MS + 500) {
|
|
308
|
+
window.location.href = cta.storeUrl;
|
|
309
|
+
}
|
|
310
|
+
}, IOS_FALLBACK_TIMEOUT_MS);
|
|
108
311
|
};
|
|
109
|
-
|
|
312
|
+
}
|
|
313
|
+
function TopBanner({ cta, pageUrl }) {
|
|
314
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "eazo-banner-root", role: "region", "aria-label": "Eazo app promotion", children: [(0, jsx_runtime_1.jsx)("span", { className: "eazo-banner-brand", children: (0, jsx_runtime_1.jsx)(icons_1.EazoLogo, { width: 72, height: 20 }) }), (0, jsx_runtime_1.jsx)("span", { className: "eazo-banner-copy", children: "Get the full Eazo experience in our mobile app." }), (0, jsx_runtime_1.jsx)(TopBannerCta, { cta: cta, pageUrl: pageUrl })] }));
|
|
315
|
+
}
|
|
316
|
+
// Delay before hiding the hover popover after the cursor leaves both
|
|
317
|
+
// the CTA and the popover itself. Short enough to feel responsive but
|
|
318
|
+
// long enough that a user can move from one to the other without the
|
|
319
|
+
// popover snapping shut mid-travel.
|
|
320
|
+
const POPOVER_HIDE_DELAY_MS = 140;
|
|
321
|
+
/**
|
|
322
|
+
* Top-banner CTA with a hover/focus-triggered QR popover. The popover
|
|
323
|
+
* encodes the current page URL — a desktop visitor scanning with their
|
|
324
|
+
* phone lands on the same page on mobile, where the SDK's mobile-path
|
|
325
|
+
* deep-link kicks in (or the App-Store fallback if the app isn't
|
|
326
|
+
* installed). Falls back to a plain link click on touch devices, where
|
|
327
|
+
* `hover` never resolves and the popover stays suppressed by media query.
|
|
328
|
+
*/
|
|
329
|
+
function TopBannerCta({ cta, pageUrl, }) {
|
|
330
|
+
const onClick = React.useMemo(() => bindCtaClick(cta), [cta]);
|
|
331
|
+
const [open, setOpen] = React.useState(false);
|
|
332
|
+
const hideTimerRef = React.useRef(null);
|
|
333
|
+
const show = React.useCallback(() => {
|
|
334
|
+
if (hideTimerRef.current !== null) {
|
|
335
|
+
window.clearTimeout(hideTimerRef.current);
|
|
336
|
+
hideTimerRef.current = null;
|
|
337
|
+
}
|
|
338
|
+
setOpen(true);
|
|
339
|
+
}, []);
|
|
340
|
+
const queueHide = React.useCallback(() => {
|
|
341
|
+
if (hideTimerRef.current !== null) {
|
|
342
|
+
window.clearTimeout(hideTimerRef.current);
|
|
343
|
+
}
|
|
344
|
+
hideTimerRef.current = window.setTimeout(() => {
|
|
345
|
+
setOpen(false);
|
|
346
|
+
hideTimerRef.current = null;
|
|
347
|
+
}, POPOVER_HIDE_DELAY_MS);
|
|
348
|
+
}, []);
|
|
349
|
+
React.useEffect(() => () => {
|
|
350
|
+
if (hideTimerRef.current !== null) {
|
|
351
|
+
window.clearTimeout(hideTimerRef.current);
|
|
352
|
+
}
|
|
353
|
+
}, []);
|
|
354
|
+
return ((0, jsx_runtime_1.jsxs)("span", { className: "eazo-banner-cta-wrap", onMouseEnter: show, onMouseLeave: queueHide, onFocusCapture: show, onBlurCapture: queueHide, children: [(0, jsx_runtime_1.jsx)("a", { className: "eazo-banner-cta", href: cta.href, rel: "noreferrer noopener", onClick: onClick, "aria-describedby": open ? "eazo-banner-cta-popover" : undefined, children: "Open in app" }), open && pageUrl ? ((0, jsx_runtime_1.jsxs)("div", { id: "eazo-banner-cta-popover", className: "eazo-banner-cta-popover", role: "tooltip", children: [(0, jsx_runtime_1.jsx)("span", { className: "eazo-banner-cta-popover-arrow", "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("div", { className: "eazo-banner-cta-popover-qr", children: (0, jsx_runtime_1.jsx)(qr_1.QrSvg, { value: pageUrl, size: 140 }) }), (0, jsx_runtime_1.jsx)("div", { className: "eazo-banner-cta-popover-caption", children: "Scan to open in the Eazo app." })] })) : null] }));
|
|
355
|
+
}
|
|
356
|
+
function Overlay({ cta, info, loading, pageUrl, onDismiss }) {
|
|
357
|
+
const onClick = React.useMemo(() => bindCtaClick(cta), [cta]);
|
|
358
|
+
// While loading we still want SOMETHING in the monolith; initials of
|
|
359
|
+
// "Eazo app" reads better than a literal placeholder. Once `info`
|
|
360
|
+
// resolves, the real name's initials or cover image take over.
|
|
361
|
+
const initials = deriveInitials(info?.app.name ?? "Eazo app");
|
|
362
|
+
// `app.icon` carries either an image URL or a short text glyph (emoji,
|
|
363
|
+
// single letter, etc.). The orbit center swaps in an <img> for URL-shaped
|
|
364
|
+
// values and falls back to the typographic slot for glyphs and when the
|
|
365
|
+
// field is missing altogether. URL detection accepts the full set the
|
|
366
|
+
// backend may emit: absolute http(s), protocol-relative, server-relative,
|
|
367
|
+
// and inline data:image URLs.
|
|
368
|
+
const rawIcon = info?.app.icon?.trim();
|
|
369
|
+
const iconUrl = rawIcon && isImageUrl(rawIcon) ? rawIcon : undefined;
|
|
370
|
+
const iconGlyph = rawIcon && !iconUrl ? rawIcon : undefined;
|
|
371
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "eazo-handoff-overlay", role: "dialog", "aria-modal": "true", "aria-labelledby": "eazo-handoff-title", children: [(0, jsx_runtime_1.jsx)("div", { className: "eazo-handoff-overlay-dim" }), (0, jsx_runtime_1.jsx)("div", { className: "eazo-handoff-overlay-spot" }), (0, jsx_runtime_1.jsxs)("div", { className: "eazo-modal", children: [(0, jsx_runtime_1.jsx)("button", { type: "button", className: "eazo-modal-close", "aria-label": "Dismiss", onClick: onDismiss, children: (0, jsx_runtime_1.jsx)("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: (0, jsx_runtime_1.jsx)("path", { d: "M6 6l12 12M18 6L6 18" }) }) }), (0, jsx_runtime_1.jsx)(Orbit, { initials: iconGlyph ?? initials, iconUrl: iconUrl, loading: loading }), (0, jsx_runtime_1.jsx)("div", { className: "eazo-modal-eyebrow", children: "Now showing in Eazo" }), loading ? (
|
|
372
|
+
// Two-line skeleton stand-in for title + tagline. Width
|
|
373
|
+
// ratios match a typical 2-word app name / one-sentence
|
|
374
|
+
// tagline so the modal doesn't visibly resize when real
|
|
375
|
+
// copy lands.
|
|
376
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "eazo-skel eazo-skel-title", role: "status", "aria-label": "Loading app info" }), (0, jsx_runtime_1.jsxs)("div", { style: { width: "100%", maxWidth: 360, textAlign: "center" }, children: [(0, jsx_runtime_1.jsx)("span", { className: "eazo-skel eazo-skel-sub-1" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("span", { className: "eazo-skel eazo-skel-sub-2" })] })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h2", { id: "eazo-handoff-title", className: "eazo-modal-title", children: info?.app.name ?? "This app" }), (0, jsx_runtime_1.jsx)("p", { className: "eazo-modal-sub", children: info?.app.tagline ??
|
|
377
|
+
info?.app.description ??
|
|
378
|
+
"Open the mobile app for the full experience." })] })), (0, jsx_runtime_1.jsxs)("div", { className: "eazo-cta-row", children: [(0, jsx_runtime_1.jsx)("div", { className: "eazo-qr-tile", children: pageUrl ? (0, jsx_runtime_1.jsx)(qr_1.QrSvg, { value: pageUrl, size: 88 }) : null }), (0, jsx_runtime_1.jsxs)("div", { className: "eazo-cta-body", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "eazo-cta-headline", children: "Scan to open" }), (0, jsx_runtime_1.jsx)("div", { className: "eazo-cta-fine", children: "Scan to continue this page on your phone, or tap to open in Eazo." })] }), (0, jsx_runtime_1.jsxs)("a", { className: "eazo-cta-primary", href: cta.href, rel: "noreferrer noopener", onClick: onClick, children: ["Open in Eazo app", (0, jsx_runtime_1.jsx)(icons_1.ArrowRightIcon, { size: 12 })] })] })] })] })] }));
|
|
379
|
+
}
|
|
380
|
+
function Orbit({ initials, iconUrl, loading = false }) {
|
|
381
|
+
// All geometry runs in a 280-unit coordinate space. The SVG uses
|
|
382
|
+
// `viewBox` so its rings scale to whatever pixel size the parent is
|
|
383
|
+
// (280 desktop / 220 mobile). The capability nodes are positioned via
|
|
384
|
+
// percentage `left/top` on the rotating track, and centered on those
|
|
385
|
+
// points by the negative-margin trick in CSS (margin trick avoids
|
|
386
|
+
// colliding with the track's rotate animation, unlike a transform
|
|
387
|
+
// would).
|
|
388
|
+
const SIDE = 280;
|
|
389
|
+
const RADIUS = 102;
|
|
390
|
+
const CENTER = SIDE / 2;
|
|
391
|
+
// Radius as a percentage of half the box — used to convert polar
|
|
392
|
+
// coordinates to percentage `left/top` on the track.
|
|
393
|
+
const RADIUS_PCT = (RADIUS / CENTER) * 50;
|
|
394
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "eazo-orbit", children: [(0, jsx_runtime_1.jsxs)("svg", { className: "eazo-orbit-rings", viewBox: `0 0 ${SIDE} ${SIDE}`, preserveAspectRatio: "xMidYMid meet", "aria-hidden": "true", children: [(0, jsx_runtime_1.jsx)("circle", { cx: CENTER, cy: CENTER, r: 132, fill: "none", stroke: "rgba(17,19,15,0.06)" }), (0, jsx_runtime_1.jsx)("circle", { cx: CENTER, cy: CENTER, r: 102, fill: "none", stroke: "rgba(17,19,15,0.08)", strokeDasharray: "2 6" }), (0, jsx_runtime_1.jsx)("circle", { cx: CENTER, cy: CENTER, r: 74, fill: "none", stroke: "rgba(212,97,74,0.30)" })] }), (0, jsx_runtime_1.jsx)("div", { className: "eazo-orbit-track", children: icons_1.CAPABILITIES.map((c, i) => {
|
|
395
|
+
// Distribute nodes evenly around the ring, starting from the
|
|
396
|
+
// top (`-Math.PI / 2`).
|
|
397
|
+
const angle = (i / icons_1.CAPABILITIES.length) * Math.PI * 2 - Math.PI / 2;
|
|
398
|
+
const leftPct = 50 + Math.cos(angle) * RADIUS_PCT;
|
|
399
|
+
const topPct = 50 + Math.sin(angle) * RADIUS_PCT;
|
|
400
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "eazo-orbit-node", style: { left: `${leftPct}%`, top: `${topPct}%` }, "aria-label": c.label, children: (0, jsx_runtime_1.jsx)(icons_1.CapIcon, { k: c.key, size: 14 }) }, c.key));
|
|
401
|
+
}) }), (0, jsx_runtime_1.jsx)(Monolith, { initials: initials, iconUrl: iconUrl, loading: loading })] }));
|
|
402
|
+
}
|
|
403
|
+
function Monolith({ initials, iconUrl, loading }) {
|
|
404
|
+
const [imgState, setImgState] = React.useState(iconUrl ? "pending" : "loaded");
|
|
405
|
+
// Reset whenever the URL changes — covers Provider remounts and
|
|
406
|
+
// hot-reload paths where the icon swaps without a fresh component.
|
|
407
|
+
React.useEffect(() => {
|
|
408
|
+
setImgState(iconUrl ? "pending" : "loaded");
|
|
409
|
+
}, [iconUrl]);
|
|
410
|
+
const hasUsableImg = !!iconUrl && imgState !== "errored";
|
|
411
|
+
const showShimmer = loading || (hasUsableImg && imgState === "pending");
|
|
412
|
+
// Text falls in when there's nothing to show as a picture: not loading,
|
|
413
|
+
// and either no URL or the URL failed to load.
|
|
414
|
+
const showText = !loading && !hasUsableImg;
|
|
415
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "eazo-monolith", "aria-hidden": "true", children: [hasUsableImg ? ((0, jsx_runtime_1.jsx)("img", { className: `eazo-monolith-img${imgState === "loaded" ? " is-loaded" : ""}`, src: iconUrl, alt: "", onLoad: () => setImgState("loaded"), onError: () => setImgState("errored") })) : null, showText ? ((0, jsx_runtime_1.jsx)("span", { style: { transform: "translateY(-1px)" }, children: initials })) : null, showShimmer ? (0, jsx_runtime_1.jsx)("div", { className: "eazo-monolith-skel" }) : null] }));
|
|
416
|
+
}
|
|
417
|
+
function BottomBanner({ info, loading, cta, }) {
|
|
418
|
+
// Source-of-truth stats come from the public app endpoint. Surface
|
|
419
|
+
// only metrics the backend exposes today AND that read meaningfully
|
|
420
|
+
// for a host-app promo surface — likes and comments. `uv` is in the
|
|
421
|
+
// DTO but reads as ambient web-traffic, not social proof, so it's
|
|
422
|
+
// intentionally not on this rail. Installs / rating / trend appeared
|
|
423
|
+
// in the V5 design canvas but require new backend fields — adding
|
|
424
|
+
// them is a backend change, not a banner change.
|
|
425
|
+
const stats = [
|
|
426
|
+
{
|
|
427
|
+
key: "likes",
|
|
428
|
+
icon: (0, jsx_runtime_1.jsx)(icons_1.HeartIcon, { size: 16 }),
|
|
429
|
+
filled: true,
|
|
430
|
+
value: loading ? null : formatStat(info?.app.likeNum),
|
|
431
|
+
label: "likes",
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
key: "comments",
|
|
435
|
+
icon: (0, jsx_runtime_1.jsx)(icons_1.ChatIcon, { size: 16 }),
|
|
436
|
+
value: loading ? null : formatStat(info?.app.commentsCount),
|
|
437
|
+
label: "comments",
|
|
438
|
+
},
|
|
439
|
+
];
|
|
440
|
+
// Remix tap reuses the same deeplink + iOS-store-timeout flow as the
|
|
441
|
+
// top banner — both point at `eazo://app/<appId>` so the mobile shell
|
|
442
|
+
// can route to the right surface (the Remix vs Open intent split is
|
|
443
|
+
// up to the host app to wire from the URL params, not this banner).
|
|
444
|
+
const onRemixClick = React.useMemo(() => bindCtaClick(cta), [cta]);
|
|
445
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "eazo-bottom-root", role: "contentinfo", children: [(0, jsx_runtime_1.jsx)("div", { className: "eazo-bottom-stats", "aria-label": loading ? "Loading app stats" : "App stats", children: stats.map((s, i) => ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [i > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "eazo-bottom-stat-divider", "aria-hidden": "true" })), (0, jsx_runtime_1.jsxs)("span", { className: "eazo-bottom-stat", children: [(0, jsx_runtime_1.jsx)("span", { className: `eazo-bottom-stat-icon${s.filled ? "" : " is-line"}`, children: s.icon }), (0, jsx_runtime_1.jsxs)("span", { className: "eazo-bottom-stat-text", children: [s.value === null ? ((0, jsx_runtime_1.jsx)("span", { className: "eazo-bottom-skel" })) : ((0, jsx_runtime_1.jsx)("span", { className: "eazo-bottom-stat-value", children: s.value })), (0, jsx_runtime_1.jsx)("span", { className: "eazo-bottom-stat-label", children: s.label })] })] })] }, s.key))) }), (0, jsx_runtime_1.jsxs)("div", { className: "eazo-bottom-actions", children: [(0, jsx_runtime_1.jsxs)("a", { className: "eazo-bottom-site", href: "https://eazo.ai/", target: "_blank", rel: "noreferrer noopener", children: [(0, jsx_runtime_1.jsx)("b", { children: "eazo.ai" }), (0, jsx_runtime_1.jsx)("svg", { width: 10, height: 10, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 17 17 7M9 7h8v8" }) })] }), (0, jsx_runtime_1.jsxs)("a", { className: "eazo-bottom-remix", href: cta.href, onClick: onRemixClick, "aria-label": "Remix this app", children: [(0, jsx_runtime_1.jsx)(icons_1.RemixIcon, { size: 17 }), "Remix", (0, jsx_runtime_1.jsx)("span", { className: "eazo-bottom-remix-suffix", children: "\u00A0this app" })] })] })] }));
|
|
110
446
|
}
|
|
111
447
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/internal/banner-ui/index.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8Cb,0CA+DC;;AA3GD,6CAA+B;AAE/B,gCAAiC;AACjC,mCAA8C;AAC9C,+CAAgD;AAChD,qCAIkB;AAElB,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAC5C,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAEjC,SAAS,aAAa;IACpB,IAAI,CAAC;QACH,OAAO,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC;IAC5D,CAAC;IAAC,MAAM,CAAC;QACP,sEAAsE;QACtE,0DAA0D;QAC1D,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,cAAc;IACrB,IAAI,CAAC;QACH,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAClD,CAAC;IAAC,MAAM,CAAC;QACP,2DAA2D;IAC7D,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB;IAC1B,IAAI,OAAO,MAAM,KA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IACA,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initial-info.d.ts","sourceRoot":"","sources":["../../../src/internal/banner-ui/initial-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAchD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAElE;AAED,wBAAgB,iBAAiB,IAAI,aAAa,GAAG,IAAI,CAExD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setInitialAppInfo = setInitialAppInfo;
|
|
4
|
+
exports.getInitialAppInfo = getInitialAppInfo;
|
|
5
|
+
/**
|
|
6
|
+
* Optional prefetched `PublicAppInfo` handed in by the host app's server
|
|
7
|
+
* (Next.js layout, Remix loader, etc.) via `<EazoProvider initialAppInfo>`.
|
|
8
|
+
* When present, the handoff banner skips its client-side fetch and renders
|
|
9
|
+
* real content on first paint — no skeleton flash.
|
|
10
|
+
*
|
|
11
|
+
* Module-level state mirrors the `setAppId` / `getAppId` pattern in
|
|
12
|
+
* `internal/config.ts`. Safe because `EazoProvider` is `"use client"`:
|
|
13
|
+
* the setter only runs in the browser, never in a shared server process.
|
|
14
|
+
*/
|
|
15
|
+
let initialAppInfo = null;
|
|
16
|
+
function setInitialAppInfo(info) {
|
|
17
|
+
initialAppInfo = info;
|
|
18
|
+
}
|
|
19
|
+
function getInitialAppInfo() {
|
|
20
|
+
return initialAppInfo;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=initial-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initial-info.js","sourceRoot":"","sources":["../../../src/internal/banner-ui/initial-info.ts"],"names":[],"mappings":";;AAcA,8CAEC;AAED,8CAEC;AAlBD;;;;;;;;;GASG;AACH,IAAI,cAAc,GAAyB,IAAI,CAAC;AAEhD,SAAgB,iBAAiB,CAAC,IAA0B;IAC1D,cAAc,GAAG,IAAI,CAAC;AACxB,CAAC;AAED,SAAgB,iBAAiB;IAC/B,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
interface QrSvgProps {
|
|
3
|
+
/** Payload to encode. URLs work as expected; arbitrary strings encode too. */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Total SVG side length in CSS px. */
|
|
6
|
+
size?: number;
|
|
7
|
+
/** Foreground / module color. */
|
|
8
|
+
fg?: string;
|
|
9
|
+
/** Background color, paints behind the modules. */
|
|
10
|
+
bg?: string;
|
|
11
|
+
/** Border-radius applied to the SVG host. */
|
|
12
|
+
radius?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Renders a real, scannable QR code as inline SVG. Used by the web-only
|
|
16
|
+
* handoff overlay to encode the `eazo://` deep link for the host app so
|
|
17
|
+
* users on a desktop browser can pop their phone over the screen to open
|
|
18
|
+
* the app directly.
|
|
19
|
+
*/
|
|
20
|
+
export declare function QrSvg({ value, size, fg, bg, radius, }: QrSvgProps): React.ReactElement | null;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=qr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qr.d.ts","sourceRoot":"","sources":["../../../src/internal/banner-ui/qr.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,UAAU,UAAU;IAClB,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,IAAS,EACT,EAAc,EACd,EAAc,EACd,MAAU,GACX,EAAE,UAAU,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CA+DxC"}
|