@gravity-ai/react 1.1.5 → 1.1.6
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.mts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +1102 -219
- package/dist/index.mjs +1102 -219
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -62,20 +62,46 @@ function fireImpression(impUrl, firedRef, onImpression) {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
// src/components/
|
|
65
|
+
// src/components/renderers.tsx
|
|
66
66
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
67
|
-
var FOCUS_STYLE_KEY = "__gravity_ad_focus__";
|
|
68
|
-
function injectFocusStyle() {
|
|
69
|
-
if (typeof document === "undefined" || document[FOCUS_STYLE_KEY]) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
document[FOCUS_STYLE_KEY] = true;
|
|
73
|
-
const s = document.createElement("style");
|
|
74
|
-
s.textContent = "[data-gravity-ad]:focus-visible{outline:2px solid #2563EB;outline-offset:2px}";
|
|
75
|
-
document.head.appendChild(s);
|
|
76
|
-
}
|
|
77
67
|
var FONT = 'Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
|
78
|
-
|
|
68
|
+
function m(base, ...ov) {
|
|
69
|
+
let r = base;
|
|
70
|
+
for (const o of ov) if (o) r = { ...r, ...o };
|
|
71
|
+
return r;
|
|
72
|
+
}
|
|
73
|
+
function ss(slot, base, sp, extra) {
|
|
74
|
+
return m(base, sp?.[slot]?.style, extra);
|
|
75
|
+
}
|
|
76
|
+
function sc(slot, sp) {
|
|
77
|
+
return sp?.[slot]?.className;
|
|
78
|
+
}
|
|
79
|
+
var ArrowRight = () => /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M2.5 6H9.5M9.5 6L6.5 3M9.5 6L6.5 9", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
80
|
+
var ArrowUpRight = () => /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M3 9L9 3M9 3H4M9 3V8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
81
|
+
var ChevronRight = () => /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", style: { opacity: 0.3 }, children: /* @__PURE__ */ jsx("path", { d: "M5 3L9 7L5 11", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
82
|
+
function WrapLink({
|
|
83
|
+
p,
|
|
84
|
+
containerStyle,
|
|
85
|
+
hoverStyle,
|
|
86
|
+
children
|
|
87
|
+
}) {
|
|
88
|
+
const style = m(containerStyle, p.hovered && hoverStyle ? hoverStyle : void 0, p.style);
|
|
89
|
+
return /* @__PURE__ */ jsx(
|
|
90
|
+
"a",
|
|
91
|
+
{
|
|
92
|
+
...p.linkProps,
|
|
93
|
+
ref: p.containerRef,
|
|
94
|
+
className: p.className,
|
|
95
|
+
style,
|
|
96
|
+
onClick: p.handleClick,
|
|
97
|
+
onMouseEnter: () => p.setHovered(true),
|
|
98
|
+
onMouseLeave: () => p.setHovered(false),
|
|
99
|
+
"data-gravity-ad": true,
|
|
100
|
+
children
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
var D = {
|
|
79
105
|
container: {
|
|
80
106
|
display: "flex",
|
|
81
107
|
flexDirection: "column",
|
|
@@ -99,30 +125,10 @@ var defaults = {
|
|
|
99
125
|
boxShadow: "0 4px 16px 0 rgba(0,0,0,0.10), 0 2px 4px -1px rgba(0,0,0,0.06)",
|
|
100
126
|
transform: "translateY(-1px)"
|
|
101
127
|
},
|
|
102
|
-
inner: {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
padding: "14px 16px 16px"
|
|
107
|
-
},
|
|
108
|
-
header: {
|
|
109
|
-
display: "flex",
|
|
110
|
-
alignItems: "center",
|
|
111
|
-
gap: 8
|
|
112
|
-
},
|
|
113
|
-
favicon: {
|
|
114
|
-
width: 20,
|
|
115
|
-
height: 20,
|
|
116
|
-
borderRadius: 4,
|
|
117
|
-
objectFit: "contain",
|
|
118
|
-
flexShrink: 0
|
|
119
|
-
},
|
|
120
|
-
brand: {
|
|
121
|
-
fontSize: 13,
|
|
122
|
-
fontWeight: 600,
|
|
123
|
-
color: "#18181B",
|
|
124
|
-
lineHeight: 1
|
|
125
|
-
},
|
|
128
|
+
inner: { display: "flex", flexDirection: "column", gap: 10, padding: "14px 16px 16px" },
|
|
129
|
+
header: { display: "flex", alignItems: "center", gap: 8 },
|
|
130
|
+
favicon: { width: 20, height: 20, borderRadius: 4, objectFit: "contain", flexShrink: 0 },
|
|
131
|
+
brand: { fontSize: 13, fontWeight: 600, color: "#18181B", lineHeight: 1 },
|
|
126
132
|
label: {
|
|
127
133
|
fontSize: 10,
|
|
128
134
|
fontWeight: 500,
|
|
@@ -135,24 +141,9 @@ var defaults = {
|
|
|
135
141
|
border: "1px solid #E4E4E7",
|
|
136
142
|
borderRadius: 4
|
|
137
143
|
},
|
|
138
|
-
body: {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
gap: 6
|
|
142
|
-
},
|
|
143
|
-
title: {
|
|
144
|
-
fontSize: 14,
|
|
145
|
-
fontWeight: 500,
|
|
146
|
-
color: "#18181B",
|
|
147
|
-
margin: 0,
|
|
148
|
-
lineHeight: 1.4
|
|
149
|
-
},
|
|
150
|
-
text: {
|
|
151
|
-
fontSize: 13,
|
|
152
|
-
color: "#71717A",
|
|
153
|
-
margin: 0,
|
|
154
|
-
lineHeight: 1.5
|
|
155
|
-
},
|
|
144
|
+
body: { display: "flex", flexDirection: "column", gap: 6 },
|
|
145
|
+
title: { fontSize: 14, fontWeight: 500, color: "#18181B", margin: 0, lineHeight: 1.4 },
|
|
146
|
+
text: { fontSize: 13, color: "#71717A", margin: 0, lineHeight: 1.5 },
|
|
156
147
|
cta: {
|
|
157
148
|
display: "inline-flex",
|
|
158
149
|
alignItems: "center",
|
|
@@ -172,51 +163,1050 @@ var defaults = {
|
|
|
172
163
|
lineHeight: 1,
|
|
173
164
|
fontFamily: "inherit",
|
|
174
165
|
marginTop: 2
|
|
175
|
-
},
|
|
176
|
-
ctaHover: {
|
|
177
|
-
background: "#1E40AF"
|
|
178
166
|
}
|
|
179
167
|
};
|
|
180
|
-
var
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
168
|
+
var inlineLabel = {
|
|
169
|
+
fontSize: 10,
|
|
170
|
+
fontWeight: 600,
|
|
171
|
+
letterSpacing: "0.06em",
|
|
172
|
+
textTransform: "uppercase",
|
|
173
|
+
color: "rgba(0,0,0,0.3)",
|
|
174
|
+
lineHeight: 1
|
|
175
|
+
};
|
|
176
|
+
var linkCta = {
|
|
177
|
+
fontSize: 13,
|
|
178
|
+
fontWeight: 600,
|
|
179
|
+
color: "#2563EB",
|
|
180
|
+
textDecoration: "none",
|
|
181
|
+
display: "inline-flex",
|
|
182
|
+
alignItems: "center",
|
|
183
|
+
gap: 4,
|
|
184
|
+
background: "none",
|
|
185
|
+
border: "none",
|
|
186
|
+
cursor: "pointer",
|
|
187
|
+
fontFamily: "inherit",
|
|
188
|
+
padding: 0
|
|
189
|
+
};
|
|
190
|
+
function renderCard(p) {
|
|
191
|
+
const { ad, slotProps: sp, showLabel, labelText, hovered } = p;
|
|
192
|
+
const containerStyle = ss("container", D.container, sp);
|
|
193
|
+
const hoverExtra = hovered ? D.containerHover : void 0;
|
|
194
|
+
const hasHeader = ad.favicon || ad.brandName || showLabel;
|
|
195
|
+
return /* @__PURE__ */ jsx(WrapLink, { p, containerStyle, hoverStyle: hoverExtra, children: /* @__PURE__ */ jsxs("div", { style: ss("inner", D.inner, sp), className: sc("inner", sp), children: [
|
|
196
|
+
hasHeader && /* @__PURE__ */ jsxs("div", { style: ss("header", D.header, sp), className: sc("header", sp), children: [
|
|
197
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", D.favicon, sp), className: sc("favicon", sp), onError: (e) => {
|
|
198
|
+
e.target.style.display = "none";
|
|
199
|
+
} }),
|
|
200
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", D.brand, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
201
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", D.label, sp), className: sc("label", sp), children: labelText })
|
|
202
|
+
] }),
|
|
203
|
+
/* @__PURE__ */ jsxs("div", { style: ss("body", D.body, sp), className: sc("body", sp), children: [
|
|
204
|
+
ad.title && /* @__PURE__ */ jsx("p", { style: ss("title", D.title, sp), className: sc("title", sp), children: ad.title }),
|
|
205
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", D.text, sp), className: sc("text", sp), children: ad.adText })
|
|
206
|
+
] }),
|
|
207
|
+
ad.cta && /* @__PURE__ */ jsx("span", { style: ss("cta", D.cta, sp), className: sc("cta", sp), children: ad.cta })
|
|
208
|
+
] }) });
|
|
209
|
+
}
|
|
210
|
+
function renderInline(p) {
|
|
211
|
+
const { ad, slotProps: sp, showLabel, labelText, hovered } = p;
|
|
212
|
+
const containerStyle = ss("container", { ...D.container, overflow: "visible" }, sp);
|
|
213
|
+
const hasHeader = ad.favicon || ad.brandName || showLabel;
|
|
214
|
+
return /* @__PURE__ */ jsx(WrapLink, { p, containerStyle, hoverStyle: hovered ? D.containerHover : void 0, children: /* @__PURE__ */ jsxs("div", { style: ss("inner", { ...D.inner, flexDirection: "row", alignItems: "center", gap: 14, padding: "12px 16px", flexWrap: "wrap" }, sp), className: sc("inner", sp), children: [
|
|
215
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: "1 1 140px", minWidth: 0, display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
216
|
+
hasHeader && /* @__PURE__ */ jsxs("div", { style: ss("header", D.header, sp), className: sc("header", sp), children: [
|
|
217
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", D.favicon, sp), className: sc("favicon", sp), onError: (e) => {
|
|
218
|
+
e.target.style.display = "none";
|
|
219
|
+
} }),
|
|
220
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", D.brand, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
221
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...D.label, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText })
|
|
222
|
+
] }),
|
|
223
|
+
/* @__PURE__ */ jsxs("div", { style: ss("body", { ...D.body, gap: 2 }, sp), className: sc("body", sp), children: [
|
|
224
|
+
ad.title && /* @__PURE__ */ jsx("p", { style: ss("title", D.title, sp), className: sc("title", sp), children: ad.title }),
|
|
225
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", D.text, sp), className: sc("text", sp), children: ad.adText })
|
|
226
|
+
] })
|
|
227
|
+
] }),
|
|
228
|
+
ad.cta && /* @__PURE__ */ jsx("span", { style: ss("cta", { ...D.cta, flexShrink: 0, marginTop: 0 }, sp), className: sc("cta", sp), children: ad.cta })
|
|
229
|
+
] }) });
|
|
230
|
+
}
|
|
231
|
+
function renderMinimal(p) {
|
|
232
|
+
const { ad, slotProps: sp, showLabel, labelText, hovered } = p;
|
|
233
|
+
const containerStyle = ss("container", {
|
|
234
|
+
...D.container,
|
|
235
|
+
background: "transparent",
|
|
236
|
+
border: "none",
|
|
237
|
+
boxShadow: "none",
|
|
238
|
+
borderRadius: 0,
|
|
239
|
+
overflow: "visible",
|
|
240
|
+
borderLeft: "2px solid rgba(0,0,0,0.06)"
|
|
241
|
+
}, sp);
|
|
242
|
+
const hoverExtra = hovered ? { boxShadow: "none", transform: "none", borderLeftColor: "rgba(37,99,235,0.3)" } : void 0;
|
|
243
|
+
const hasHeader = ad.favicon || ad.brandName || showLabel;
|
|
244
|
+
return /* @__PURE__ */ jsx(WrapLink, { p, containerStyle, hoverStyle: hoverExtra, children: /* @__PURE__ */ jsxs("div", { style: ss("inner", { ...D.inner, padding: "6px 0 6px 16px", gap: 8 }, sp), className: sc("inner", sp), children: [
|
|
245
|
+
hasHeader && /* @__PURE__ */ jsxs("div", { style: ss("header", D.header, sp), className: sc("header", sp), children: [
|
|
246
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { ...D.favicon, width: 16, height: 16, borderRadius: 4 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
247
|
+
e.target.style.display = "none";
|
|
248
|
+
} }),
|
|
249
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { ...D.brand, fontSize: 12, color: "rgba(0,0,0,0.5)" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
250
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...D.label, fontSize: 9, border: "none", padding: 0, marginLeft: 0, color: "rgba(0,0,0,0.25)" }, sp), className: sc("label", sp), children: labelText.toLowerCase() })
|
|
251
|
+
] }),
|
|
252
|
+
/* @__PURE__ */ jsxs("div", { style: ss("body", D.body, sp), className: sc("body", sp), children: [
|
|
253
|
+
ad.title && /* @__PURE__ */ jsx("p", { style: ss("title", { ...D.title, fontSize: 13.5 }, sp), className: sc("title", sp), children: ad.title }),
|
|
254
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { ...D.text, fontSize: 13 }, sp), className: sc("text", sp), children: ad.adText })
|
|
255
|
+
] }),
|
|
256
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta, fontSize: 13 }, sp), className: sc("cta", sp), children: [
|
|
257
|
+
ad.cta,
|
|
258
|
+
" ",
|
|
259
|
+
/* @__PURE__ */ jsx(ArrowRight, {})
|
|
260
|
+
] })
|
|
261
|
+
] }) });
|
|
262
|
+
}
|
|
263
|
+
function renderBubble(p) {
|
|
264
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
265
|
+
const containerStyle = ss("container", {
|
|
266
|
+
...D.container,
|
|
267
|
+
background: "transparent",
|
|
268
|
+
border: "none",
|
|
269
|
+
boxShadow: "none",
|
|
270
|
+
overflow: "visible",
|
|
271
|
+
borderRadius: 0
|
|
272
|
+
}, sp);
|
|
273
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, children: [
|
|
274
|
+
/* @__PURE__ */ jsxs("div", { style: ss("header", { display: "flex", alignItems: "center", gap: 8, marginBottom: 8 }, sp), className: sc("header", sp), children: [
|
|
275
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { ...D.favicon, borderRadius: 6 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
276
|
+
e.target.style.display = "none";
|
|
277
|
+
} }),
|
|
278
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { ...D.brand, color: "rgba(0,0,0,0.6)" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
279
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", {
|
|
280
|
+
fontSize: 9,
|
|
281
|
+
fontWeight: 600,
|
|
282
|
+
letterSpacing: "0.06em",
|
|
283
|
+
textTransform: "uppercase",
|
|
284
|
+
color: "rgba(0,0,0,0.25)",
|
|
285
|
+
background: "rgba(0,0,0,0.04)",
|
|
286
|
+
padding: "2px 5px",
|
|
287
|
+
borderRadius: 3,
|
|
288
|
+
border: "none",
|
|
289
|
+
lineHeight: 1
|
|
290
|
+
}, sp), className: sc("label", sp), children: labelText })
|
|
291
|
+
] }),
|
|
292
|
+
/* @__PURE__ */ jsxs("div", { style: ss("inner", {
|
|
293
|
+
background: "#F3F3F3",
|
|
294
|
+
borderRadius: "4px 16px 16px 16px",
|
|
295
|
+
padding: "14px 18px"
|
|
296
|
+
}, sp), className: sc("inner", sp), children: [
|
|
297
|
+
ad.title && /* @__PURE__ */ jsx("p", { style: ss("title", { ...D.title, fontWeight: 600, color: "rgba(0,0,0,0.65)", margin: "0 0 4px" }, sp), className: sc("title", sp), children: ad.title }),
|
|
298
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { ...D.text, color: "rgba(0,0,0,0.45)", margin: "0 0 12px" }, sp), className: sc("text", sp), children: ad.adText }),
|
|
299
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta, marginTop: 0 }, sp), className: sc("cta", sp), children: [
|
|
300
|
+
ad.cta,
|
|
301
|
+
" ",
|
|
302
|
+
/* @__PURE__ */ jsx(ArrowUpRight, {})
|
|
303
|
+
] })
|
|
304
|
+
] })
|
|
305
|
+
] });
|
|
306
|
+
}
|
|
307
|
+
function renderContextual(p) {
|
|
308
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
309
|
+
const wrapperStyle = {
|
|
310
|
+
fontFamily: FONT,
|
|
311
|
+
textDecoration: "none",
|
|
312
|
+
color: "#18181B",
|
|
313
|
+
lineHeight: 1.5
|
|
314
|
+
};
|
|
315
|
+
const cardStyle = ss("container", {
|
|
316
|
+
background: "#FAFAFA",
|
|
317
|
+
border: "1px solid rgba(0,0,0,0.07)",
|
|
318
|
+
borderRadius: 12,
|
|
319
|
+
padding: "18px 22px",
|
|
320
|
+
display: "flex",
|
|
321
|
+
gap: 16,
|
|
322
|
+
alignItems: "flex-start"
|
|
323
|
+
}, sp);
|
|
324
|
+
const iconWrapperStyle = ss("iconWrapper", {
|
|
325
|
+
width: 40,
|
|
326
|
+
height: 40,
|
|
327
|
+
borderRadius: 10,
|
|
328
|
+
background: "rgba(0,0,0,0.04)",
|
|
329
|
+
display: "flex",
|
|
330
|
+
alignItems: "center",
|
|
331
|
+
justifyContent: "center",
|
|
332
|
+
flexShrink: 0
|
|
333
|
+
}, sp);
|
|
334
|
+
return /* @__PURE__ */ jsxs("div", { style: m(wrapperStyle, p.style), className: p.className, children: [
|
|
335
|
+
/* @__PURE__ */ jsx("p", { style: ss("contextHeader", {
|
|
336
|
+
fontSize: 11,
|
|
337
|
+
fontWeight: 500,
|
|
338
|
+
color: "rgba(0,0,0,0.3)",
|
|
339
|
+
margin: "0 0 10px"
|
|
340
|
+
}, sp), className: sc("contextHeader", sp), children: "Relevant to this conversation" }),
|
|
341
|
+
/* @__PURE__ */ jsxs(
|
|
342
|
+
"a",
|
|
343
|
+
{
|
|
344
|
+
...p.linkProps,
|
|
345
|
+
ref: p.containerRef,
|
|
346
|
+
style: cardStyle,
|
|
347
|
+
onClick: p.handleClick,
|
|
348
|
+
onMouseEnter: () => p.setHovered(true),
|
|
349
|
+
onMouseLeave: () => p.setHovered(false),
|
|
350
|
+
"data-gravity-ad": true,
|
|
351
|
+
children: [
|
|
352
|
+
/* @__PURE__ */ jsx("div", { style: iconWrapperStyle, className: sc("iconWrapper", sp), children: ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", D.favicon, sp), className: sc("favicon", sp), onError: (e) => {
|
|
353
|
+
e.target.style.display = "none";
|
|
354
|
+
} }) }),
|
|
355
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1 }, children: [
|
|
356
|
+
/* @__PURE__ */ jsxs("div", { style: ss("header", { display: "flex", alignItems: "center", gap: 8, marginBottom: 6 }, sp), className: sc("header", sp), children: [
|
|
357
|
+
ad.title && /* @__PURE__ */ jsx("span", { style: ss("title", { fontSize: 14, fontWeight: 600, color: "#1A1A1A", margin: 0 }, sp), className: sc("title", sp), children: ad.title }),
|
|
358
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText })
|
|
359
|
+
] }),
|
|
360
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { fontSize: 13, color: "rgba(0,0,0,0.5)", margin: "0 0 12px", lineHeight: 1.5 }, sp), className: sc("text", sp), children: ad.adText }),
|
|
361
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", linkCta, sp), className: sc("cta", sp), children: [
|
|
362
|
+
ad.cta,
|
|
363
|
+
" ",
|
|
364
|
+
/* @__PURE__ */ jsx(ArrowUpRight, {})
|
|
365
|
+
] })
|
|
366
|
+
] })
|
|
367
|
+
]
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
/* @__PURE__ */ jsx("p", { style: ss("footer", { fontSize: 10, color: "rgba(0,0,0,0.2)", margin: "8px 0 0", textAlign: "right" }, sp), className: sc("footer", sp), children: "partner" })
|
|
371
|
+
] });
|
|
372
|
+
}
|
|
373
|
+
function renderNative(p) {
|
|
374
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
375
|
+
const containerStyle = ss("container", {
|
|
376
|
+
...D.container,
|
|
377
|
+
background: "rgba(0,0,0,0.02)",
|
|
378
|
+
border: "none",
|
|
379
|
+
borderLeft: "2px solid rgba(0,0,0,0.12)",
|
|
380
|
+
borderRadius: 14,
|
|
381
|
+
boxShadow: "none",
|
|
382
|
+
padding: "20px 24px",
|
|
383
|
+
overflow: "visible"
|
|
384
|
+
}, sp);
|
|
385
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, children: [
|
|
386
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { fontSize: 13.5, color: "rgba(0,0,0,0.65)", margin: "0 0 14px", lineHeight: 1.6 }, sp), className: sc("text", sp), children: ad.adText }),
|
|
387
|
+
/* @__PURE__ */ jsxs("div", { style: ss("footer", { display: "flex", alignItems: "center", justifyContent: "space-between" }, sp), className: sc("footer", sp), children: [
|
|
388
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
389
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { ...D.favicon, width: 14, height: 14, borderRadius: 3 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
390
|
+
e.target.style.display = "none";
|
|
391
|
+
} }),
|
|
392
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontSize: 12, fontWeight: 600, color: "rgba(0,0,0,0.55)" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
393
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 10, color: "rgba(0,0,0,0.3)", border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText })
|
|
394
|
+
] }),
|
|
395
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta, fontSize: 12.5 }, sp), className: sc("cta", sp), children: [
|
|
396
|
+
ad.cta,
|
|
397
|
+
" ",
|
|
398
|
+
/* @__PURE__ */ jsx(ArrowUpRight, {})
|
|
399
|
+
] })
|
|
400
|
+
] })
|
|
401
|
+
] });
|
|
402
|
+
}
|
|
403
|
+
function renderFootnote(p) {
|
|
404
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
405
|
+
const containerStyle = ss("container", {
|
|
406
|
+
...D.container,
|
|
407
|
+
background: "transparent",
|
|
408
|
+
border: "none",
|
|
409
|
+
boxShadow: "none",
|
|
410
|
+
borderRadius: 0,
|
|
411
|
+
overflow: "visible"
|
|
412
|
+
}, sp);
|
|
413
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, children: [
|
|
414
|
+
/* @__PURE__ */ jsx("div", { style: { height: 1, background: "currentColor", opacity: 0.08, marginBottom: 12 } }),
|
|
415
|
+
/* @__PURE__ */ jsxs("div", { style: ss("inner", { display: "flex", alignItems: "flex-start", gap: 10, padding: 0 }, sp), className: sc("inner", sp), children: [
|
|
416
|
+
/* @__PURE__ */ jsx("div", { style: { flexShrink: 0, marginTop: 2, color: "rgba(0,0,0,0.3)" }, children: /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M2 2V8H4L6 10V8H10V2H2Z", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
|
|
417
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
418
|
+
/* @__PURE__ */ jsxs("p", { style: ss("text", { fontSize: 13, color: "rgba(0,0,0,0.5)", margin: 0, lineHeight: 1.55 }, sp), className: sc("text", sp), children: [
|
|
419
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontWeight: 600, color: "rgba(0,0,0,0.6)" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
420
|
+
ad.brandName && " \u2014 ",
|
|
421
|
+
ad.adText,
|
|
422
|
+
" ",
|
|
423
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta, fontSize: 13, padding: 0, display: "inline" }, sp), className: sc("cta", sp), children: [
|
|
424
|
+
ad.cta,
|
|
425
|
+
" ",
|
|
426
|
+
/* @__PURE__ */ jsx(ArrowUpRight, {})
|
|
427
|
+
] })
|
|
428
|
+
] }),
|
|
429
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 9, color: "rgba(0,0,0,0.3)", border: "none", padding: 0, marginLeft: 0, marginTop: 6, display: "block" }, sp), className: sc("label", sp), children: labelText.toLowerCase() })
|
|
430
|
+
] })
|
|
431
|
+
] })
|
|
432
|
+
] });
|
|
433
|
+
}
|
|
434
|
+
function renderQuote(p) {
|
|
435
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
436
|
+
const containerStyle = ss("container", {
|
|
437
|
+
...D.container,
|
|
438
|
+
background: "rgba(0,0,0,0.01)",
|
|
439
|
+
border: "none",
|
|
440
|
+
borderLeft: "3px solid #2563EB",
|
|
441
|
+
borderRadius: "0 10px 10px 0",
|
|
442
|
+
boxShadow: "none",
|
|
443
|
+
padding: "18px 22px",
|
|
444
|
+
overflow: "visible"
|
|
445
|
+
}, sp);
|
|
446
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, children: [
|
|
447
|
+
/* @__PURE__ */ jsxs("p", { style: ss("text", { fontSize: 14, color: "rgba(0,0,0,0.6)", margin: "0 0 12px", lineHeight: 1.6, fontStyle: "italic" }, sp), className: sc("text", sp), children: [
|
|
448
|
+
"\u201C",
|
|
449
|
+
ad.adText,
|
|
450
|
+
"\u201D"
|
|
451
|
+
] }),
|
|
452
|
+
/* @__PURE__ */ jsxs("div", { style: ss("footer", { display: "flex", alignItems: "center", justifyContent: "space-between" }, sp), className: sc("footer", sp), children: [
|
|
453
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
454
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { ...D.favicon, width: 16, height: 16 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
455
|
+
e.target.style.display = "none";
|
|
456
|
+
} }),
|
|
457
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontSize: 13, fontWeight: 600, color: "rgba(0,0,0,0.55)" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
458
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 9, color: "rgba(0,0,0,0.2)", border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText.toLowerCase() })
|
|
459
|
+
] }),
|
|
460
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta, fontSize: 12, display: "inline-flex", alignItems: "center", gap: 4 }, sp), className: sc("cta", sp), children: [
|
|
461
|
+
ad.cta,
|
|
462
|
+
" ",
|
|
463
|
+
/* @__PURE__ */ jsx(ArrowRight, {})
|
|
464
|
+
] })
|
|
465
|
+
] })
|
|
466
|
+
] });
|
|
467
|
+
}
|
|
468
|
+
function renderSuggestion(p) {
|
|
469
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
470
|
+
const wrapperStyle = {
|
|
471
|
+
fontFamily: FONT,
|
|
472
|
+
textDecoration: "none",
|
|
473
|
+
color: "#18181B",
|
|
474
|
+
lineHeight: 1.5
|
|
475
|
+
};
|
|
476
|
+
const pillStyle = ss("container", {
|
|
477
|
+
display: "inline-flex",
|
|
478
|
+
alignItems: "center",
|
|
479
|
+
gap: 14,
|
|
480
|
+
padding: "10px 18px 10px 12px",
|
|
481
|
+
background: "#FFFFFF",
|
|
482
|
+
border: "1px solid rgba(0,0,0,0.08)",
|
|
483
|
+
borderRadius: 100,
|
|
484
|
+
cursor: "pointer",
|
|
485
|
+
fontFamily: FONT,
|
|
486
|
+
textDecoration: "none",
|
|
487
|
+
boxSizing: "border-box",
|
|
488
|
+
transition: "border-color 150ms ease, box-shadow 150ms ease"
|
|
489
|
+
}, sp);
|
|
490
|
+
const iconWrapperStyle = ss("iconWrapper", {
|
|
491
|
+
width: 36,
|
|
492
|
+
height: 36,
|
|
493
|
+
borderRadius: 100,
|
|
494
|
+
background: "rgba(0,0,0,0.03)",
|
|
495
|
+
display: "flex",
|
|
496
|
+
alignItems: "center",
|
|
497
|
+
justifyContent: "center",
|
|
498
|
+
flexShrink: 0
|
|
499
|
+
}, sp);
|
|
500
|
+
return /* @__PURE__ */ jsxs("div", { style: m(wrapperStyle, p.style), className: p.className, children: [
|
|
501
|
+
/* @__PURE__ */ jsx("p", { style: ss("contextHeader", { fontSize: 11, color: "rgba(0,0,0,0.3)", margin: "0 0 10px", fontWeight: 500 }, sp), className: sc("contextHeader", sp), children: "You might also want to try" }),
|
|
502
|
+
/* @__PURE__ */ jsxs(
|
|
503
|
+
"a",
|
|
504
|
+
{
|
|
505
|
+
...p.linkProps,
|
|
506
|
+
ref: p.containerRef,
|
|
507
|
+
style: pillStyle,
|
|
508
|
+
onClick: p.handleClick,
|
|
509
|
+
onMouseEnter: () => p.setHovered(true),
|
|
510
|
+
onMouseLeave: () => p.setHovered(false),
|
|
511
|
+
"data-gravity-ad": true,
|
|
512
|
+
children: [
|
|
513
|
+
/* @__PURE__ */ jsx("div", { style: iconWrapperStyle, className: sc("iconWrapper", sp), children: ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { width: 18, height: 18, borderRadius: 5, objectFit: "contain" }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
514
|
+
e.target.style.display = "none";
|
|
515
|
+
} }) }),
|
|
516
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 1 }, children: [
|
|
517
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
518
|
+
ad.title && /* @__PURE__ */ jsx("span", { style: ss("title", { fontSize: 13.5, fontWeight: 600, color: "#1A1A1A", margin: 0 }, sp), className: sc("title", sp), children: ad.title }),
|
|
519
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 9, color: "rgba(0,0,0,0.3)", border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText.toLowerCase() })
|
|
520
|
+
] }),
|
|
521
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontSize: 12, color: "rgba(0,0,0,0.4)", margin: 0 }, sp), className: sc("brand", sp), children: ad.brandName })
|
|
522
|
+
] }),
|
|
523
|
+
/* @__PURE__ */ jsx(ChevronRight, {})
|
|
524
|
+
]
|
|
525
|
+
}
|
|
526
|
+
)
|
|
527
|
+
] });
|
|
528
|
+
}
|
|
529
|
+
function renderAccent(p) {
|
|
530
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
531
|
+
const containerStyle = ss("container", {
|
|
532
|
+
...D.container,
|
|
533
|
+
overflow: "hidden"
|
|
534
|
+
}, sp);
|
|
535
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, hoverStyle: p.hovered ? D.containerHover : void 0, children: [
|
|
536
|
+
/* @__PURE__ */ jsx("div", { style: ss("accentBar", { height: 3, background: "#2563EB" }, sp), className: sc("accentBar", sp) }),
|
|
537
|
+
/* @__PURE__ */ jsxs("div", { style: ss("inner", { ...D.inner, padding: "18px 22px" }, sp), className: sc("inner", sp), children: [
|
|
538
|
+
/* @__PURE__ */ jsxs("div", { style: ss("header", { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 2 }, sp), className: sc("header", sp), children: [
|
|
539
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
|
|
540
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { ...D.favicon, width: 18, height: 18 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
541
|
+
e.target.style.display = "none";
|
|
542
|
+
} }),
|
|
543
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { ...D.brand, fontSize: 14 }, sp), className: sc("brand", sp), children: ad.brandName })
|
|
544
|
+
] }),
|
|
545
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText })
|
|
546
|
+
] }),
|
|
547
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { ...D.text, fontSize: 14, color: "rgba(0,0,0,0.55)", margin: "0 0 16px", lineHeight: 1.55 }, sp), className: sc("text", sp), children: ad.adText }),
|
|
548
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta }, sp), className: sc("cta", sp), children: [
|
|
549
|
+
ad.cta,
|
|
550
|
+
" ",
|
|
551
|
+
/* @__PURE__ */ jsx(ArrowRight, {})
|
|
552
|
+
] })
|
|
553
|
+
] })
|
|
554
|
+
] });
|
|
555
|
+
}
|
|
556
|
+
function renderSidePanel(p) {
|
|
557
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
558
|
+
const containerStyle = ss("container", {
|
|
559
|
+
...D.container,
|
|
560
|
+
display: "flex",
|
|
561
|
+
flexDirection: "row",
|
|
562
|
+
alignItems: "stretch",
|
|
563
|
+
overflow: "hidden",
|
|
564
|
+
background: "#FAFAFA"
|
|
565
|
+
}, sp);
|
|
566
|
+
const iconWrapperStyle = ss("iconWrapper", {
|
|
567
|
+
width: 64,
|
|
568
|
+
background: "rgba(0,0,0,0.02)",
|
|
569
|
+
display: "flex",
|
|
570
|
+
alignItems: "center",
|
|
571
|
+
justifyContent: "center",
|
|
572
|
+
flexShrink: 0,
|
|
573
|
+
borderRight: "1px solid rgba(0,0,0,0.05)"
|
|
574
|
+
}, sp);
|
|
575
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, hoverStyle: p.hovered ? D.containerHover : void 0, children: [
|
|
576
|
+
/* @__PURE__ */ jsx("div", { style: iconWrapperStyle, className: sc("iconWrapper", sp), children: ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { ...D.favicon, width: 26, height: 26, borderRadius: 7 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
577
|
+
e.target.style.display = "none";
|
|
578
|
+
} }) }),
|
|
579
|
+
/* @__PURE__ */ jsxs("div", { style: ss("inner", { padding: "16px 20px", flex: 1, display: "flex", flexDirection: "column", gap: 6 }, sp), className: sc("inner", sp), children: [
|
|
580
|
+
/* @__PURE__ */ jsxs("div", { style: ss("header", { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 0 }, sp), className: sc("header", sp), children: [
|
|
581
|
+
ad.title && /* @__PURE__ */ jsx("span", { style: ss("title", { fontSize: 14, fontWeight: 600, color: "#1A1A1A", margin: 0 }, sp), className: sc("title", sp), children: ad.title }),
|
|
582
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText })
|
|
583
|
+
] }),
|
|
584
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { fontSize: 13, color: "rgba(0,0,0,0.5)", margin: "0 0 10px", lineHeight: 1.5 }, sp), className: sc("text", sp), children: ad.adText }),
|
|
585
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta, fontSize: 12.5 }, sp), className: sc("cta", sp), children: [
|
|
586
|
+
ad.cta,
|
|
587
|
+
" ",
|
|
588
|
+
/* @__PURE__ */ jsx(ArrowUpRight, {})
|
|
589
|
+
] })
|
|
590
|
+
] })
|
|
591
|
+
] });
|
|
592
|
+
}
|
|
593
|
+
function renderLabeled(p) {
|
|
594
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
595
|
+
const containerStyle = ss("container", {
|
|
596
|
+
...D.container,
|
|
597
|
+
display: "flex",
|
|
598
|
+
flexDirection: "row",
|
|
599
|
+
overflow: "hidden",
|
|
600
|
+
background: "#FFFFFF"
|
|
601
|
+
}, sp);
|
|
602
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, hoverStyle: p.hovered ? D.containerHover : void 0, children: [
|
|
603
|
+
showLabel && /* @__PURE__ */ jsx("div", { style: ss("footer", {
|
|
604
|
+
width: 32,
|
|
605
|
+
flexShrink: 0,
|
|
606
|
+
background: "rgba(0,0,0,0.025)",
|
|
607
|
+
display: "flex",
|
|
185
608
|
alignItems: "center",
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
609
|
+
justifyContent: "center",
|
|
610
|
+
borderRight: "1px solid rgba(0,0,0,0.06)",
|
|
611
|
+
writingMode: "vertical-rl",
|
|
612
|
+
textOrientation: "mixed"
|
|
613
|
+
}, sp), className: sc("footer", sp), children: /* @__PURE__ */ jsx("span", { style: { fontSize: 10, fontWeight: 700, letterSpacing: "0.08em", textTransform: "uppercase", color: "rgba(0,0,0,0.4)", transform: "rotate(180deg)" }, children: labelText }) }),
|
|
614
|
+
/* @__PURE__ */ jsxs("div", { style: ss("inner", { padding: "16px 20px", flex: 1, display: "flex", flexDirection: "column", gap: 10 }, sp), className: sc("inner", sp), children: [
|
|
615
|
+
/* @__PURE__ */ jsxs("div", { style: ss("header", { display: "flex", alignItems: "center", gap: 10 }, sp), className: sc("header", sp), children: [
|
|
616
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { ...D.favicon, borderRadius: 5 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
617
|
+
e.target.style.display = "none";
|
|
618
|
+
} }),
|
|
619
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { ...D.brand, fontSize: 14 }, sp), className: sc("brand", sp), children: ad.brandName })
|
|
620
|
+
] }),
|
|
621
|
+
ad.title && /* @__PURE__ */ jsx("p", { style: ss("title", { fontSize: 14, fontWeight: 600, color: "#111", margin: 0, letterSpacing: "-0.01em" }, sp), className: sc("title", sp), children: ad.title }),
|
|
622
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { fontSize: 13, color: "rgba(0,0,0,0.5)", margin: "0 0 4px", lineHeight: 1.5 }, sp), className: sc("text", sp), children: ad.adText }),
|
|
623
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta, fontSize: 13 }, sp), className: sc("cta", sp), children: [
|
|
624
|
+
ad.cta,
|
|
625
|
+
" ",
|
|
626
|
+
/* @__PURE__ */ jsx(ArrowRight, {})
|
|
627
|
+
] })
|
|
628
|
+
] })
|
|
629
|
+
] });
|
|
630
|
+
}
|
|
631
|
+
function renderSpotlight(p) {
|
|
632
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
633
|
+
const containerStyle = ss("container", {
|
|
634
|
+
...D.container,
|
|
635
|
+
textAlign: "center",
|
|
636
|
+
padding: "32px 28px",
|
|
637
|
+
borderRadius: 16
|
|
638
|
+
}, sp);
|
|
639
|
+
const iconWrapperStyle = ss("iconWrapper", {
|
|
640
|
+
width: 56,
|
|
641
|
+
height: 56,
|
|
642
|
+
borderRadius: 16,
|
|
643
|
+
margin: "0 auto 18px",
|
|
644
|
+
background: "rgba(0,0,0,0.03)",
|
|
645
|
+
display: "flex",
|
|
646
|
+
alignItems: "center",
|
|
647
|
+
justifyContent: "center",
|
|
648
|
+
boxShadow: "0 2px 8px rgba(0,0,0,0.06)"
|
|
649
|
+
}, sp);
|
|
650
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, hoverStyle: p.hovered ? D.containerHover : void 0, children: [
|
|
651
|
+
/* @__PURE__ */ jsx("div", { style: iconWrapperStyle, className: sc("iconWrapper", sp), children: ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { width: 28, height: 28, borderRadius: 7, objectFit: "contain" }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
652
|
+
e.target.style.display = "none";
|
|
653
|
+
} }) }),
|
|
654
|
+
ad.title && /* @__PURE__ */ jsx("p", { style: ss("title", { fontSize: 17, fontWeight: 700, color: "#111", margin: "0 0 8px", letterSpacing: "-0.02em" }, sp), className: sc("title", sp), children: ad.title }),
|
|
655
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { fontSize: 13.5, color: "rgba(0,0,0,0.45)", margin: "0 0 22px", lineHeight: 1.55 }, sp), className: sc("text", sp), children: ad.adText }),
|
|
656
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", {
|
|
657
|
+
...D.cta,
|
|
658
|
+
background: "#1A1A1A",
|
|
659
|
+
borderRadius: 10,
|
|
660
|
+
padding: "11px 28px",
|
|
661
|
+
fontSize: 14,
|
|
662
|
+
fontWeight: 600,
|
|
663
|
+
display: "inline-flex",
|
|
664
|
+
alignItems: "center",
|
|
665
|
+
gap: 7,
|
|
666
|
+
alignSelf: "center"
|
|
667
|
+
}, sp), className: sc("cta", sp), children: [
|
|
668
|
+
ad.cta,
|
|
669
|
+
" ",
|
|
670
|
+
/* @__PURE__ */ jsx(ArrowRight, {})
|
|
671
|
+
] }),
|
|
672
|
+
showLabel && /* @__PURE__ */ jsx("p", { style: ss("label", { fontSize: 9, color: "rgba(0,0,0,0.2)", margin: "14px 0 0", letterSpacing: "0.06em", textTransform: "uppercase", border: "none", padding: 0 }, sp), className: sc("label", sp), children: labelText.toLowerCase() })
|
|
673
|
+
] });
|
|
674
|
+
}
|
|
675
|
+
function renderEmbed(p) {
|
|
676
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
677
|
+
const containerStyle = ss("container", {
|
|
678
|
+
...D.container,
|
|
679
|
+
overflow: "hidden",
|
|
680
|
+
borderRadius: 12
|
|
681
|
+
}, sp);
|
|
682
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, hoverStyle: p.hovered ? D.containerHover : void 0, children: [
|
|
683
|
+
/* @__PURE__ */ jsx("div", { style: ss("iconWrapper", {
|
|
684
|
+
height: 88,
|
|
685
|
+
background: "linear-gradient(135deg, rgba(37,99,235,0.10) 0%, rgba(37,99,235,0.03) 60%, rgba(99,102,241,0.06) 100%)",
|
|
686
|
+
display: "flex",
|
|
687
|
+
alignItems: "center",
|
|
688
|
+
justifyContent: "center",
|
|
689
|
+
borderBottom: "1px solid rgba(0,0,0,0.04)"
|
|
690
|
+
}, sp), className: sc("iconWrapper", sp), children: ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { width: 36, height: 36, borderRadius: 10, objectFit: "contain", boxShadow: "0 2px 8px rgba(0,0,0,0.08)" }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
691
|
+
e.target.style.display = "none";
|
|
692
|
+
} }) }),
|
|
693
|
+
/* @__PURE__ */ jsxs("div", { style: ss("inner", { padding: "14px 18px 16px", display: "flex", flexDirection: "column", gap: 8 }, sp), className: sc("inner", sp), children: [
|
|
694
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
695
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontSize: 12, fontWeight: 600, color: "rgba(0,0,0,0.5)" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
696
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 9, color: "rgba(0,0,0,0.25)", border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText.toLowerCase() })
|
|
697
|
+
] }),
|
|
698
|
+
ad.title && /* @__PURE__ */ jsx("p", { style: ss("title", { fontSize: 14, fontWeight: 600, color: "#1A1A1A", margin: 0 }, sp), className: sc("title", sp), children: ad.title }),
|
|
699
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { fontSize: 13, color: "rgba(0,0,0,0.5)", margin: 0, lineHeight: 1.5 }, sp), className: sc("text", sp), children: ad.adText }),
|
|
700
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta, fontSize: 12.5, marginTop: 2 }, sp), className: sc("cta", sp), children: [
|
|
701
|
+
ad.cta,
|
|
702
|
+
" ",
|
|
703
|
+
/* @__PURE__ */ jsx(ArrowUpRight, {})
|
|
704
|
+
] })
|
|
705
|
+
] })
|
|
706
|
+
] });
|
|
707
|
+
}
|
|
708
|
+
function renderSplitAction(p) {
|
|
709
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
710
|
+
const containerStyle = ss("container", {
|
|
711
|
+
...D.container,
|
|
712
|
+
overflow: "hidden"
|
|
713
|
+
}, sp);
|
|
714
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, hoverStyle: p.hovered ? D.containerHover : void 0, children: [
|
|
715
|
+
/* @__PURE__ */ jsxs("div", { style: ss("inner", { padding: "18px 22px", display: "flex", flexDirection: "column", gap: 10 }, sp), className: sc("inner", sp), children: [
|
|
716
|
+
/* @__PURE__ */ jsxs("div", { style: ss("header", { display: "flex", alignItems: "center", gap: 10 }, sp), className: sc("header", sp), children: [
|
|
717
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { ...D.favicon, width: 18, height: 18 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
718
|
+
e.target.style.display = "none";
|
|
719
|
+
} }),
|
|
720
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { ...D.brand, fontSize: 14 }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
721
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 10, border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText })
|
|
722
|
+
] }),
|
|
723
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { fontSize: 13.5, color: "rgba(0,0,0,0.55)", margin: 0, lineHeight: 1.55 }, sp), className: sc("text", sp), children: ad.adText })
|
|
724
|
+
] }),
|
|
725
|
+
/* @__PURE__ */ jsxs("div", { style: ss("footer", {
|
|
726
|
+
display: "flex",
|
|
727
|
+
borderTop: "1px solid rgba(0,0,0,0.06)"
|
|
728
|
+
}, sp), className: sc("footer", sp), children: [
|
|
729
|
+
/* @__PURE__ */ jsx("span", { style: ss("secondaryCta", {
|
|
730
|
+
flex: 1,
|
|
731
|
+
padding: "11px 16px",
|
|
732
|
+
background: "transparent",
|
|
733
|
+
border: "none",
|
|
734
|
+
borderRight: "1px solid rgba(0,0,0,0.06)",
|
|
735
|
+
color: "rgba(0,0,0,0.35)",
|
|
736
|
+
fontSize: 12.5,
|
|
737
|
+
fontWeight: 500,
|
|
738
|
+
cursor: "pointer",
|
|
739
|
+
textAlign: "center",
|
|
740
|
+
fontFamily: "inherit",
|
|
741
|
+
textDecoration: "none"
|
|
742
|
+
}, sp), className: sc("secondaryCta", sp), children: "Dismiss" }),
|
|
743
|
+
ad.cta && /* @__PURE__ */ jsxs("span", { style: ss("cta", {
|
|
744
|
+
flex: 1,
|
|
745
|
+
padding: "11px 16px",
|
|
746
|
+
background: "rgba(37,99,235,0.04)",
|
|
747
|
+
border: "none",
|
|
748
|
+
color: "#2563EB",
|
|
749
|
+
fontSize: 12.5,
|
|
750
|
+
fontWeight: 600,
|
|
751
|
+
cursor: "pointer",
|
|
752
|
+
textAlign: "center",
|
|
753
|
+
fontFamily: "inherit",
|
|
754
|
+
textDecoration: "none",
|
|
755
|
+
display: "inline-flex",
|
|
756
|
+
alignItems: "center",
|
|
757
|
+
justifyContent: "center",
|
|
758
|
+
gap: 5
|
|
759
|
+
}, sp), className: sc("cta", sp), children: [
|
|
760
|
+
ad.cta,
|
|
761
|
+
" ",
|
|
762
|
+
/* @__PURE__ */ jsx(ArrowRight, {})
|
|
763
|
+
] })
|
|
764
|
+
] })
|
|
765
|
+
] });
|
|
766
|
+
}
|
|
767
|
+
function renderPill(p) {
|
|
768
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
769
|
+
const containerStyle = ss("container", {
|
|
770
|
+
display: "inline-flex",
|
|
771
|
+
alignItems: "center",
|
|
772
|
+
gap: 10,
|
|
773
|
+
padding: "8px 16px 8px 10px",
|
|
774
|
+
background: "rgba(0,0,0,0.03)",
|
|
775
|
+
borderRadius: 100,
|
|
776
|
+
border: "1px solid rgba(0,0,0,0.06)",
|
|
777
|
+
fontFamily: FONT,
|
|
778
|
+
textDecoration: "none",
|
|
779
|
+
cursor: "pointer",
|
|
780
|
+
boxSizing: "border-box",
|
|
781
|
+
lineHeight: 1.5,
|
|
782
|
+
transition: "border-color 150ms ease, background 150ms ease"
|
|
783
|
+
}, sp);
|
|
784
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, children: [
|
|
785
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { width: 16, height: 16, borderRadius: 4, objectFit: "contain", flexShrink: 0 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
786
|
+
e.target.style.display = "none";
|
|
787
|
+
} }),
|
|
788
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontSize: 13, fontWeight: 600, color: "#1A1A1A" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
789
|
+
/* @__PURE__ */ jsx("span", { style: { width: 1, height: 14, background: "currentColor", opacity: 0.15, flexShrink: 0 } }),
|
|
790
|
+
ad.title && /* @__PURE__ */ jsx("span", { style: ss("title", { fontSize: 12.5, color: "rgba(0,0,0,0.5)", margin: 0 }, sp), className: sc("title", sp), children: ad.title }),
|
|
791
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 9, color: "rgba(0,0,0,0.3)", border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText.toLowerCase() }),
|
|
792
|
+
/* @__PURE__ */ jsx(ChevronRight, {})
|
|
793
|
+
] });
|
|
794
|
+
}
|
|
795
|
+
function renderBanner(p) {
|
|
796
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
797
|
+
const containerStyle = ss("container", {
|
|
798
|
+
display: "flex",
|
|
799
|
+
alignItems: "center",
|
|
800
|
+
justifyContent: "space-between",
|
|
801
|
+
width: "100%",
|
|
802
|
+
padding: "10px 18px",
|
|
803
|
+
background: "rgba(0,0,0,0.015)",
|
|
804
|
+
borderRadius: 8,
|
|
805
|
+
border: "1px solid rgba(0,0,0,0.04)",
|
|
806
|
+
fontFamily: FONT,
|
|
807
|
+
textDecoration: "none",
|
|
808
|
+
cursor: "pointer",
|
|
809
|
+
boxSizing: "border-box",
|
|
810
|
+
lineHeight: 1.5,
|
|
811
|
+
transition: "background 150ms ease"
|
|
812
|
+
}, sp);
|
|
813
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, children: [
|
|
814
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10 }, children: [
|
|
815
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { width: 16, height: 16, borderRadius: 3, objectFit: "contain", flexShrink: 0 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
816
|
+
e.target.style.display = "none";
|
|
817
|
+
} }),
|
|
818
|
+
ad.title && /* @__PURE__ */ jsx("span", { style: ss("title", { fontSize: 13, fontWeight: 600, color: "#1A1A1A", margin: 0 }, sp), className: sc("title", sp), children: ad.title }),
|
|
819
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 10, color: "rgba(0,0,0,0.2)", border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText.toLowerCase() })
|
|
820
|
+
] }),
|
|
821
|
+
ad.cta && /* @__PURE__ */ jsx("span", { style: ss("cta", {
|
|
822
|
+
background: "#1A1A1A",
|
|
823
|
+
color: "#FFFFFF",
|
|
195
824
|
border: "none",
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
function merge(base, ...overrides) {
|
|
208
|
-
let result = base;
|
|
209
|
-
for (const o of overrides) {
|
|
210
|
-
if (o) result = { ...result, ...o };
|
|
211
|
-
}
|
|
212
|
-
return result;
|
|
825
|
+
borderRadius: 6,
|
|
826
|
+
padding: "6px 14px",
|
|
827
|
+
fontSize: 12,
|
|
828
|
+
fontWeight: 600,
|
|
829
|
+
cursor: "pointer",
|
|
830
|
+
fontFamily: "inherit",
|
|
831
|
+
textDecoration: "none",
|
|
832
|
+
flexShrink: 0
|
|
833
|
+
}, sp), className: sc("cta", sp), children: ad.cta })
|
|
834
|
+
] });
|
|
213
835
|
}
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
|
|
836
|
+
function renderDivider(p) {
|
|
837
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
838
|
+
const containerStyle = ss("container", {
|
|
839
|
+
display: "flex",
|
|
840
|
+
alignItems: "center",
|
|
841
|
+
gap: 16,
|
|
842
|
+
padding: "8px 0",
|
|
843
|
+
width: "100%",
|
|
844
|
+
background: "transparent",
|
|
845
|
+
border: "none",
|
|
846
|
+
boxShadow: "none",
|
|
847
|
+
borderRadius: 0,
|
|
848
|
+
fontFamily: FONT,
|
|
849
|
+
textDecoration: "none",
|
|
850
|
+
cursor: "pointer",
|
|
851
|
+
boxSizing: "border-box",
|
|
852
|
+
lineHeight: 1.5
|
|
853
|
+
}, sp);
|
|
854
|
+
const lineStyle = { flex: 1, height: 1, background: "currentColor", opacity: 0.08 };
|
|
855
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, children: [
|
|
856
|
+
/* @__PURE__ */ jsx("div", { style: lineStyle }),
|
|
857
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, flexShrink: 0 }, children: [
|
|
858
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { width: 14, height: 14, borderRadius: 3, objectFit: "contain" }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
859
|
+
e.target.style.display = "none";
|
|
860
|
+
} }),
|
|
861
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontSize: 12, fontWeight: 600, color: "rgba(0,0,0,0.45)" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
862
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 10, color: "rgba(0,0,0,0.25)", border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText.toLowerCase() }),
|
|
863
|
+
ad.cta && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
864
|
+
/* @__PURE__ */ jsx("span", { style: { width: 1, height: 12, background: "currentColor", opacity: 0.12 } }),
|
|
865
|
+
/* @__PURE__ */ jsxs("span", { style: ss("cta", { ...linkCta, fontSize: 12, padding: 0, marginTop: 0, display: "inline-flex", alignItems: "center", gap: 3 }, sp), className: sc("cta", sp), children: [
|
|
866
|
+
ad.cta,
|
|
867
|
+
" ",
|
|
868
|
+
/* @__PURE__ */ jsx(ArrowUpRight, {})
|
|
869
|
+
] })
|
|
870
|
+
] })
|
|
871
|
+
] }),
|
|
872
|
+
/* @__PURE__ */ jsx("div", { style: lineStyle })
|
|
873
|
+
] });
|
|
217
874
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
875
|
+
function renderToolbar(p) {
|
|
876
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
877
|
+
const containerStyle = ss("container", {
|
|
878
|
+
display: "flex",
|
|
879
|
+
alignItems: "center",
|
|
880
|
+
gap: 14,
|
|
881
|
+
padding: "12px 18px",
|
|
882
|
+
background: "#FFFFFF",
|
|
883
|
+
borderRadius: 12,
|
|
884
|
+
boxShadow: "0 2px 16px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04)",
|
|
885
|
+
fontFamily: FONT,
|
|
886
|
+
textDecoration: "none",
|
|
887
|
+
cursor: "pointer",
|
|
888
|
+
boxSizing: "border-box",
|
|
889
|
+
lineHeight: 1.5,
|
|
890
|
+
border: "none"
|
|
891
|
+
}, sp);
|
|
892
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, children: [
|
|
893
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { ...D.favicon, borderRadius: 5, flexShrink: 0 }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
894
|
+
e.target.style.display = "none";
|
|
895
|
+
} }),
|
|
896
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
897
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontSize: 13, fontWeight: 600, color: "#1A1A1A" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
898
|
+
ad.title && /* @__PURE__ */ jsx("span", { style: ss("title", { fontSize: 12, color: "rgba(0,0,0,0.35)", margin: 0, marginLeft: 8 }, sp), className: sc("title", sp), children: ad.title })
|
|
899
|
+
] }),
|
|
900
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, flexShrink: 0 }, children: [
|
|
901
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 9, color: "rgba(0,0,0,0.2)", border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: labelText.toLowerCase() }),
|
|
902
|
+
ad.cta && /* @__PURE__ */ jsx("span", { style: ss("cta", {
|
|
903
|
+
background: "#1A1A1A",
|
|
904
|
+
color: "#FFFFFF",
|
|
905
|
+
border: "none",
|
|
906
|
+
borderRadius: 7,
|
|
907
|
+
padding: "7px 14px",
|
|
908
|
+
fontSize: 12,
|
|
909
|
+
fontWeight: 600,
|
|
910
|
+
cursor: "pointer",
|
|
911
|
+
fontFamily: "inherit",
|
|
912
|
+
textDecoration: "none",
|
|
913
|
+
whiteSpace: "nowrap"
|
|
914
|
+
}, sp), className: sc("cta", sp), children: ad.cta })
|
|
915
|
+
] })
|
|
916
|
+
] });
|
|
917
|
+
}
|
|
918
|
+
function renderTooltip(p) {
|
|
919
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
920
|
+
const wrapperStyle = {
|
|
921
|
+
fontFamily: FONT,
|
|
922
|
+
textDecoration: "none",
|
|
923
|
+
color: "#18181B",
|
|
924
|
+
lineHeight: 1.5,
|
|
925
|
+
position: "relative"
|
|
926
|
+
};
|
|
927
|
+
const cardStyle = ss("container", {
|
|
928
|
+
display: "flex",
|
|
929
|
+
flexDirection: "column",
|
|
930
|
+
gap: 10,
|
|
931
|
+
background: "#FFFFFF",
|
|
932
|
+
border: "1px solid rgba(0,0,0,0.08)",
|
|
933
|
+
borderRadius: 12,
|
|
934
|
+
padding: "16px 18px",
|
|
935
|
+
boxShadow: "0 4px 20px rgba(0,0,0,0.08)",
|
|
936
|
+
textDecoration: "none",
|
|
937
|
+
cursor: "pointer",
|
|
938
|
+
boxSizing: "border-box"
|
|
939
|
+
}, sp);
|
|
940
|
+
const arrowStyle = ss("arrow", {
|
|
941
|
+
position: "absolute",
|
|
942
|
+
bottom: -6,
|
|
943
|
+
left: 24,
|
|
944
|
+
width: 12,
|
|
945
|
+
height: 12,
|
|
946
|
+
transform: "rotate(45deg)",
|
|
947
|
+
background: "#FFFFFF",
|
|
948
|
+
border: "1px solid rgba(0,0,0,0.08)",
|
|
949
|
+
borderTop: "none",
|
|
950
|
+
borderLeft: "none"
|
|
951
|
+
}, sp);
|
|
952
|
+
return /* @__PURE__ */ jsxs("div", { style: m(wrapperStyle, p.style), className: p.className, children: [
|
|
953
|
+
/* @__PURE__ */ jsxs(
|
|
954
|
+
"a",
|
|
955
|
+
{
|
|
956
|
+
...p.linkProps,
|
|
957
|
+
ref: p.containerRef,
|
|
958
|
+
style: cardStyle,
|
|
959
|
+
onClick: p.handleClick,
|
|
960
|
+
onMouseEnter: () => p.setHovered(true),
|
|
961
|
+
onMouseLeave: () => p.setHovered(false),
|
|
962
|
+
"data-gravity-ad": true,
|
|
963
|
+
children: [
|
|
964
|
+
/* @__PURE__ */ jsxs("div", { style: ss("header", { display: "flex", alignItems: "center", gap: 8 }, sp), className: sc("header", sp), children: [
|
|
965
|
+
ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { width: 16, height: 16, borderRadius: 4, objectFit: "contain" }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
966
|
+
e.target.style.display = "none";
|
|
967
|
+
} }),
|
|
968
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontSize: 13, fontWeight: 600, color: "#1A1A1A" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
969
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", { ...inlineLabel, fontSize: 9, marginLeft: "auto", border: "none", padding: 0 }, sp), className: sc("label", sp), children: labelText.toLowerCase() })
|
|
970
|
+
] }),
|
|
971
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { fontSize: 12.5, color: "rgba(0,0,0,0.5)", margin: 0, lineHeight: 1.5 }, sp), className: sc("text", sp), children: ad.adText }),
|
|
972
|
+
ad.cta && /* @__PURE__ */ jsx("span", { style: ss("cta", {
|
|
973
|
+
width: "100%",
|
|
974
|
+
background: "#2563EB",
|
|
975
|
+
color: "#FFFFFF",
|
|
976
|
+
border: "none",
|
|
977
|
+
borderRadius: 8,
|
|
978
|
+
padding: "8px 14px",
|
|
979
|
+
fontSize: 12,
|
|
980
|
+
fontWeight: 600,
|
|
981
|
+
cursor: "pointer",
|
|
982
|
+
textAlign: "center",
|
|
983
|
+
fontFamily: "inherit",
|
|
984
|
+
textDecoration: "none",
|
|
985
|
+
display: "block",
|
|
986
|
+
boxSizing: "border-box",
|
|
987
|
+
transition: "background 150ms ease"
|
|
988
|
+
}, sp), className: sc("cta", sp), children: ad.cta })
|
|
989
|
+
]
|
|
990
|
+
}
|
|
991
|
+
),
|
|
992
|
+
/* @__PURE__ */ jsx("div", { style: arrowStyle, className: sc("arrow", sp) })
|
|
993
|
+
] });
|
|
994
|
+
}
|
|
995
|
+
function renderNotification(p) {
|
|
996
|
+
const { ad, slotProps: sp, showLabel, labelText } = p;
|
|
997
|
+
const containerStyle = ss("container", {
|
|
998
|
+
display: "flex",
|
|
999
|
+
alignItems: "flex-start",
|
|
1000
|
+
gap: 14,
|
|
1001
|
+
padding: "16px 20px",
|
|
1002
|
+
background: "#FFFFFF",
|
|
1003
|
+
borderRadius: 14,
|
|
1004
|
+
boxShadow: "0 4px 24px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.04)",
|
|
1005
|
+
fontFamily: FONT,
|
|
1006
|
+
textDecoration: "none",
|
|
1007
|
+
cursor: "pointer",
|
|
1008
|
+
boxSizing: "border-box",
|
|
1009
|
+
lineHeight: 1.5,
|
|
1010
|
+
border: "none"
|
|
1011
|
+
}, sp);
|
|
1012
|
+
const iconWrapperStyle = ss("iconWrapper", {
|
|
1013
|
+
width: 38,
|
|
1014
|
+
height: 38,
|
|
1015
|
+
borderRadius: 10,
|
|
1016
|
+
flexShrink: 0,
|
|
1017
|
+
background: "rgba(0,0,0,0.03)",
|
|
1018
|
+
display: "flex",
|
|
1019
|
+
alignItems: "center",
|
|
1020
|
+
justifyContent: "center"
|
|
1021
|
+
}, sp);
|
|
1022
|
+
return /* @__PURE__ */ jsxs(WrapLink, { p, containerStyle, children: [
|
|
1023
|
+
/* @__PURE__ */ jsx("div", { style: iconWrapperStyle, className: sc("iconWrapper", sp), children: ad.favicon && /* @__PURE__ */ jsx("img", { src: ad.favicon, alt: "", loading: "lazy", style: ss("favicon", { width: 20, height: 20, borderRadius: 5, objectFit: "contain" }, sp), className: sc("favicon", sp), onError: (e) => {
|
|
1024
|
+
e.target.style.display = "none";
|
|
1025
|
+
} }) }),
|
|
1026
|
+
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1027
|
+
/* @__PURE__ */ jsxs("div", { style: ss("header", { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 4 }, sp), className: sc("header", sp), children: [
|
|
1028
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", { fontSize: 13, fontWeight: 700, color: "#1A1A1A" }, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
1029
|
+
showLabel && /* @__PURE__ */ jsxs("span", { style: ss("label", { ...inlineLabel, fontSize: 10, color: "rgba(0,0,0,0.25)", border: "none", padding: 0, marginLeft: 0 }, sp), className: sc("label", sp), children: [
|
|
1030
|
+
labelText.toLowerCase(),
|
|
1031
|
+
" \xB7 now"
|
|
1032
|
+
] })
|
|
1033
|
+
] }),
|
|
1034
|
+
/* @__PURE__ */ jsx("p", { style: ss("text", { fontSize: 13, color: "rgba(0,0,0,0.55)", margin: 0, lineHeight: 1.45 }, sp), className: sc("text", sp), children: ad.title ? `${ad.title} \u2014 ${ad.adText}` : ad.adText })
|
|
1035
|
+
] })
|
|
1036
|
+
] });
|
|
1037
|
+
}
|
|
1038
|
+
function renderHyperlink(p) {
|
|
1039
|
+
const { ad, slotProps: sp, showLabel, labelText, hovered } = p;
|
|
1040
|
+
const containerStyle = ss("container", {
|
|
1041
|
+
display: "inline",
|
|
1042
|
+
fontFamily: FONT,
|
|
1043
|
+
textDecoration: "none",
|
|
1044
|
+
color: "#2563EB",
|
|
1045
|
+
cursor: "pointer",
|
|
1046
|
+
lineHeight: 1.6,
|
|
1047
|
+
background: "none",
|
|
1048
|
+
border: "none",
|
|
1049
|
+
boxShadow: "none",
|
|
1050
|
+
borderRadius: 0,
|
|
1051
|
+
padding: 0,
|
|
1052
|
+
position: "relative"
|
|
1053
|
+
}, sp);
|
|
1054
|
+
return /* @__PURE__ */ jsxs(
|
|
1055
|
+
"a",
|
|
1056
|
+
{
|
|
1057
|
+
...p.linkProps,
|
|
1058
|
+
ref: p.containerRef,
|
|
1059
|
+
className: p.className,
|
|
1060
|
+
style: m(containerStyle, p.style),
|
|
1061
|
+
onClick: p.handleClick,
|
|
1062
|
+
onMouseEnter: () => p.setHovered(true),
|
|
1063
|
+
onMouseLeave: () => p.setHovered(false),
|
|
1064
|
+
"data-gravity-ad": true,
|
|
1065
|
+
children: [
|
|
1066
|
+
/* @__PURE__ */ jsx("span", { style: ss("text", {
|
|
1067
|
+
fontSize: "inherit",
|
|
1068
|
+
color: "inherit",
|
|
1069
|
+
textDecoration: "underline",
|
|
1070
|
+
textUnderlineOffset: 2,
|
|
1071
|
+
textDecorationColor: hovered ? "currentColor" : "rgba(37,99,235,0.4)",
|
|
1072
|
+
transition: "text-decoration-color 150ms ease"
|
|
1073
|
+
}, sp), className: sc("text", sp), children: ad.adText }),
|
|
1074
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", {
|
|
1075
|
+
fontSize: "0.75em",
|
|
1076
|
+
fontWeight: 600,
|
|
1077
|
+
letterSpacing: "0.04em",
|
|
1078
|
+
textTransform: "uppercase",
|
|
1079
|
+
color: "rgba(37,99,235,0.5)",
|
|
1080
|
+
marginLeft: 5,
|
|
1081
|
+
textDecoration: "none",
|
|
1082
|
+
display: "inline",
|
|
1083
|
+
verticalAlign: "super",
|
|
1084
|
+
lineHeight: 1
|
|
1085
|
+
}, sp), className: sc("label", sp), children: labelText })
|
|
1086
|
+
]
|
|
1087
|
+
}
|
|
1088
|
+
);
|
|
1089
|
+
}
|
|
1090
|
+
function renderTextLink(p) {
|
|
1091
|
+
const { ad, slotProps: sp, showLabel, labelText, hovered } = p;
|
|
1092
|
+
const containerStyle = ss("container", {
|
|
1093
|
+
display: "inline",
|
|
1094
|
+
fontFamily: FONT,
|
|
1095
|
+
textDecoration: "none",
|
|
1096
|
+
color: "#2563EB",
|
|
1097
|
+
cursor: "pointer",
|
|
1098
|
+
lineHeight: 1.7,
|
|
1099
|
+
background: "none",
|
|
1100
|
+
border: "none",
|
|
1101
|
+
boxShadow: "none",
|
|
1102
|
+
borderRadius: 0,
|
|
1103
|
+
padding: 0,
|
|
1104
|
+
position: "relative",
|
|
1105
|
+
fontSize: "inherit"
|
|
1106
|
+
}, sp);
|
|
1107
|
+
return /* @__PURE__ */ jsxs(
|
|
1108
|
+
"a",
|
|
1109
|
+
{
|
|
1110
|
+
...p.linkProps,
|
|
1111
|
+
ref: p.containerRef,
|
|
1112
|
+
className: p.className,
|
|
1113
|
+
style: m(containerStyle, p.style),
|
|
1114
|
+
onClick: p.handleClick,
|
|
1115
|
+
onMouseEnter: () => p.setHovered(true),
|
|
1116
|
+
onMouseLeave: () => p.setHovered(false),
|
|
1117
|
+
"data-gravity-ad": true,
|
|
1118
|
+
children: [
|
|
1119
|
+
ad.favicon && /* @__PURE__ */ jsx(
|
|
1120
|
+
"img",
|
|
1121
|
+
{
|
|
1122
|
+
src: ad.favicon,
|
|
1123
|
+
alt: "",
|
|
1124
|
+
loading: "lazy",
|
|
1125
|
+
style: ss("favicon", {
|
|
1126
|
+
width: "1em",
|
|
1127
|
+
height: "1em",
|
|
1128
|
+
borderRadius: 3,
|
|
1129
|
+
objectFit: "contain",
|
|
1130
|
+
verticalAlign: "-0.15em",
|
|
1131
|
+
marginRight: 5,
|
|
1132
|
+
display: "inline"
|
|
1133
|
+
}, sp),
|
|
1134
|
+
className: sc("favicon", sp),
|
|
1135
|
+
onError: (e) => {
|
|
1136
|
+
e.target.style.display = "none";
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
),
|
|
1140
|
+
ad.brandName && /* @__PURE__ */ jsx("span", { style: ss("brand", {
|
|
1141
|
+
fontWeight: 700,
|
|
1142
|
+
color: "#1A1A1A",
|
|
1143
|
+
textDecoration: "none"
|
|
1144
|
+
}, sp), className: sc("brand", sp), children: ad.brandName }),
|
|
1145
|
+
showLabel && /* @__PURE__ */ jsx("span", { style: ss("label", {
|
|
1146
|
+
fontSize: "0.72em",
|
|
1147
|
+
fontWeight: 600,
|
|
1148
|
+
letterSpacing: "0.03em",
|
|
1149
|
+
color: "rgba(0,0,0,0.35)",
|
|
1150
|
+
background: "rgba(0,0,0,0.05)",
|
|
1151
|
+
padding: "2px 6px",
|
|
1152
|
+
borderRadius: 4,
|
|
1153
|
+
marginLeft: 6,
|
|
1154
|
+
marginRight: 4,
|
|
1155
|
+
textDecoration: "none",
|
|
1156
|
+
display: "inline-block",
|
|
1157
|
+
verticalAlign: "middle",
|
|
1158
|
+
lineHeight: 1.3,
|
|
1159
|
+
border: "none",
|
|
1160
|
+
textTransform: "capitalize"
|
|
1161
|
+
}, sp), className: sc("label", sp), children: labelText }),
|
|
1162
|
+
/* @__PURE__ */ jsx("span", { style: ss("text", {
|
|
1163
|
+
color: "inherit",
|
|
1164
|
+
textDecoration: "underline",
|
|
1165
|
+
textUnderlineOffset: 2,
|
|
1166
|
+
textDecorationColor: hovered ? "currentColor" : "rgba(37,99,235,0.4)",
|
|
1167
|
+
transition: "text-decoration-color 150ms ease"
|
|
1168
|
+
}, sp), className: sc("text", sp), children: ad.adText })
|
|
1169
|
+
]
|
|
1170
|
+
}
|
|
1171
|
+
);
|
|
1172
|
+
}
|
|
1173
|
+
var renderers = {
|
|
1174
|
+
card: renderCard,
|
|
1175
|
+
inline: renderInline,
|
|
1176
|
+
minimal: renderMinimal,
|
|
1177
|
+
bubble: renderBubble,
|
|
1178
|
+
contextual: renderContextual,
|
|
1179
|
+
native: renderNative,
|
|
1180
|
+
footnote: renderFootnote,
|
|
1181
|
+
quote: renderQuote,
|
|
1182
|
+
suggestion: renderSuggestion,
|
|
1183
|
+
accent: renderAccent,
|
|
1184
|
+
"side-panel": renderSidePanel,
|
|
1185
|
+
labeled: renderLabeled,
|
|
1186
|
+
spotlight: renderSpotlight,
|
|
1187
|
+
embed: renderEmbed,
|
|
1188
|
+
"split-action": renderSplitAction,
|
|
1189
|
+
pill: renderPill,
|
|
1190
|
+
banner: renderBanner,
|
|
1191
|
+
divider: renderDivider,
|
|
1192
|
+
toolbar: renderToolbar,
|
|
1193
|
+
tooltip: renderTooltip,
|
|
1194
|
+
notification: renderNotification,
|
|
1195
|
+
hyperlink: renderHyperlink,
|
|
1196
|
+
"text-link": renderTextLink
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
// src/components/GravityAd.tsx
|
|
1200
|
+
import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
|
|
1201
|
+
var FOCUS_STYLE_KEY = "__gravity_ad_focus__";
|
|
1202
|
+
function injectFocusStyle() {
|
|
1203
|
+
if (typeof document === "undefined" || document[FOCUS_STYLE_KEY]) {
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
document[FOCUS_STYLE_KEY] = true;
|
|
1207
|
+
const s = document.createElement("style");
|
|
1208
|
+
s.textContent = "[data-gravity-ad]:focus-visible{outline:2px solid #2563EB;outline-offset:2px}";
|
|
1209
|
+
document.head.appendChild(s);
|
|
220
1210
|
}
|
|
221
1211
|
function GravityAd({
|
|
222
1212
|
ad,
|
|
@@ -242,7 +1232,7 @@ function GravityAd({
|
|
|
242
1232
|
onClickTracked
|
|
243
1233
|
});
|
|
244
1234
|
if (!ad) {
|
|
245
|
-
return /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ jsx2(Fragment2, { children: fallback });
|
|
246
1236
|
}
|
|
247
1237
|
const handleClickInternal = (e) => {
|
|
248
1238
|
handleClick();
|
|
@@ -256,134 +1246,27 @@ function GravityAd({
|
|
|
256
1246
|
target: openInNewTab ? "_blank" : void 0,
|
|
257
1247
|
rel: openInNewTab ? "noopener noreferrer sponsored" : "sponsored"
|
|
258
1248
|
} : {};
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
variant !== "card" ? variantOverrides[variant]?.containerHover : void 0
|
|
262
|
-
) : void 0;
|
|
263
|
-
const containerStyle = slotStyle(
|
|
264
|
-
"container",
|
|
265
|
-
defaults.container,
|
|
1249
|
+
const renderProps = {
|
|
1250
|
+
ad,
|
|
266
1251
|
variant,
|
|
267
1252
|
slotProps,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
{
|
|
281
|
-
src: ad.favicon,
|
|
282
|
-
alt: "",
|
|
283
|
-
loading: "lazy",
|
|
284
|
-
style: slotStyle("favicon", defaults.favicon, variant, slotProps),
|
|
285
|
-
className: slotClass("favicon", slotProps),
|
|
286
|
-
onError: (e) => {
|
|
287
|
-
e.target.style.display = "none";
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
),
|
|
291
|
-
ad.brandName && /* @__PURE__ */ jsx(
|
|
292
|
-
"span",
|
|
293
|
-
{
|
|
294
|
-
style: slotStyle("brand", defaults.brand, variant, slotProps),
|
|
295
|
-
className: slotClass("brand", slotProps),
|
|
296
|
-
children: ad.brandName
|
|
297
|
-
}
|
|
298
|
-
),
|
|
299
|
-
showLabel && /* @__PURE__ */ jsx(
|
|
300
|
-
"span",
|
|
301
|
-
{
|
|
302
|
-
style: slotStyle("label", defaults.label, variant, slotProps),
|
|
303
|
-
className: slotClass("label", slotProps),
|
|
304
|
-
children: labelText
|
|
305
|
-
}
|
|
306
|
-
)
|
|
307
|
-
]
|
|
308
|
-
}
|
|
309
|
-
) : null;
|
|
310
|
-
const bodyEl = /* @__PURE__ */ jsxs(
|
|
311
|
-
"div",
|
|
312
|
-
{
|
|
313
|
-
style: slotStyle("body", defaults.body, variant, slotProps),
|
|
314
|
-
className: slotClass("body", slotProps),
|
|
315
|
-
children: [
|
|
316
|
-
ad.title && /* @__PURE__ */ jsx(
|
|
317
|
-
"p",
|
|
318
|
-
{
|
|
319
|
-
style: slotStyle("title", defaults.title, variant, slotProps),
|
|
320
|
-
className: slotClass("title", slotProps),
|
|
321
|
-
children: ad.title
|
|
322
|
-
}
|
|
323
|
-
),
|
|
324
|
-
/* @__PURE__ */ jsx(
|
|
325
|
-
"p",
|
|
326
|
-
{
|
|
327
|
-
style: slotStyle("text", defaults.text, variant, slotProps),
|
|
328
|
-
className: slotClass("text", slotProps),
|
|
329
|
-
children: ad.adText
|
|
330
|
-
}
|
|
331
|
-
)
|
|
332
|
-
]
|
|
333
|
-
}
|
|
334
|
-
);
|
|
335
|
-
const ctaEl = ad.cta ? /* @__PURE__ */ jsx(
|
|
336
|
-
"span",
|
|
337
|
-
{
|
|
338
|
-
style: slotStyle("cta", defaults.cta, variant, slotProps, ctaHoverExtra),
|
|
339
|
-
className: slotClass("cta", slotProps),
|
|
340
|
-
children: ad.cta
|
|
341
|
-
}
|
|
342
|
-
) : null;
|
|
343
|
-
const content = variant === "inline" ? /* @__PURE__ */ jsxs(
|
|
344
|
-
"div",
|
|
345
|
-
{
|
|
346
|
-
style: slotStyle("inner", defaults.inner, variant, slotProps),
|
|
347
|
-
className: slotClass("inner", slotProps),
|
|
348
|
-
children: [
|
|
349
|
-
/* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
350
|
-
headerEl,
|
|
351
|
-
bodyEl
|
|
352
|
-
] }),
|
|
353
|
-
ctaEl
|
|
354
|
-
]
|
|
355
|
-
}
|
|
356
|
-
) : /* @__PURE__ */ jsxs(
|
|
357
|
-
"div",
|
|
358
|
-
{
|
|
359
|
-
style: slotStyle("inner", defaults.inner, variant, slotProps),
|
|
360
|
-
className: slotClass("inner", slotProps),
|
|
361
|
-
children: [
|
|
362
|
-
headerEl,
|
|
363
|
-
bodyEl,
|
|
364
|
-
ctaEl
|
|
365
|
-
]
|
|
366
|
-
}
|
|
367
|
-
);
|
|
368
|
-
return /* @__PURE__ */ jsx(
|
|
369
|
-
"a",
|
|
370
|
-
{
|
|
371
|
-
...linkProps,
|
|
372
|
-
ref: containerRef,
|
|
373
|
-
className,
|
|
374
|
-
style: containerStyle,
|
|
375
|
-
onClick: handleClickInternal,
|
|
376
|
-
onMouseEnter: () => setHovered(true),
|
|
377
|
-
onMouseLeave: () => setHovered(false),
|
|
378
|
-
"data-gravity-ad": true,
|
|
379
|
-
children: content
|
|
380
|
-
}
|
|
381
|
-
);
|
|
1253
|
+
showLabel,
|
|
1254
|
+
labelText,
|
|
1255
|
+
hovered,
|
|
1256
|
+
setHovered,
|
|
1257
|
+
containerRef,
|
|
1258
|
+
handleClick: handleClickInternal,
|
|
1259
|
+
linkProps,
|
|
1260
|
+
className,
|
|
1261
|
+
style
|
|
1262
|
+
};
|
|
1263
|
+
const render = renderers[variant] || renderers.card;
|
|
1264
|
+
return render(renderProps);
|
|
382
1265
|
}
|
|
383
1266
|
GravityAd.displayName = "GravityAd";
|
|
384
1267
|
|
|
385
1268
|
// src/components/AdText.tsx
|
|
386
|
-
import { Fragment as
|
|
1269
|
+
import { Fragment as Fragment3, jsx as jsx3 } from "react/jsx-runtime";
|
|
387
1270
|
function AdText({
|
|
388
1271
|
ad,
|
|
389
1272
|
className,
|
|
@@ -402,7 +1285,7 @@ function AdText({
|
|
|
402
1285
|
onClickTracked
|
|
403
1286
|
});
|
|
404
1287
|
if (!ad) {
|
|
405
|
-
return /* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ jsx3(Fragment3, { children: fallback });
|
|
406
1289
|
}
|
|
407
1290
|
const handleClickInternal = (e) => {
|
|
408
1291
|
handleClick();
|
|
@@ -418,7 +1301,7 @@ function AdText({
|
|
|
418
1301
|
...style
|
|
419
1302
|
};
|
|
420
1303
|
if (ad.clickUrl) {
|
|
421
|
-
return /* @__PURE__ */
|
|
1304
|
+
return /* @__PURE__ */ jsx3(
|
|
422
1305
|
"a",
|
|
423
1306
|
{
|
|
424
1307
|
ref: containerRef,
|
|
@@ -433,7 +1316,7 @@ function AdText({
|
|
|
433
1316
|
}
|
|
434
1317
|
);
|
|
435
1318
|
}
|
|
436
|
-
return /* @__PURE__ */
|
|
1319
|
+
return /* @__PURE__ */ jsx3(
|
|
437
1320
|
"span",
|
|
438
1321
|
{
|
|
439
1322
|
ref: containerRef,
|