@thead-vantage/react 2.24.0 → 2.25.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thead-vantage/react",
3
- "version": "2.24.0",
3
+ "version": "2.25.0",
4
4
  "description": "React components and utilities for TheAd Vantage ad platform integration",
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
@@ -238,67 +238,79 @@ export function AdBanner({
238
238
 
239
239
  return (
240
240
  <div className={`relative ${className}`}>
241
+ <div className="relative">
242
+ <a
243
+ href={ad.targetUrl}
244
+ onClick={handleClick}
245
+ target="_blank"
246
+ rel="noopener noreferrer"
247
+ className="block"
248
+ >
249
+ {(ad.type === 'image' || ad.type === 'standard') && ad.contentUrl ? (
250
+ <Image
251
+ src={ad.contentUrl}
252
+ alt={ad.name}
253
+ width={ad.width || 300}
254
+ height={ad.height || 250}
255
+ className="rounded-t"
256
+ unoptimized
257
+ />
258
+ ) : (
259
+ <div className="flex items-center justify-center bg-gray-200 dark:bg-gray-700 rounded-t" style={{ width: ad.width || 300, height: ad.height || 250 }}>
260
+ <span className="text-sm text-gray-500">Ad content</span>
261
+ </div>
262
+ )}
263
+ </a>
264
+ {showImpressionFinished && impressionStatus !== 'pending' && (
265
+ <div className="absolute top-2 right-2">
266
+ {impressionStatus === 'counting' ? (
267
+ <svg
268
+ className="w-5 h-5 text-gray-400 animate-spin"
269
+ xmlns="http://www.w3.org/2000/svg"
270
+ fill="none"
271
+ viewBox="0 0 24 24"
272
+ >
273
+ <circle
274
+ className="opacity-25"
275
+ cx="12"
276
+ cy="12"
277
+ r="10"
278
+ stroke="currentColor"
279
+ strokeWidth="4"
280
+ />
281
+ <path
282
+ className="opacity-75"
283
+ fill="currentColor"
284
+ d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
285
+ />
286
+ </svg>
287
+ ) : impressionStatus === 'completed' ? (
288
+ <svg
289
+ className="w-5 h-5 text-green-500"
290
+ xmlns="http://www.w3.org/2000/svg"
291
+ viewBox="0 0 20 20"
292
+ fill="currentColor"
293
+ >
294
+ <path
295
+ fillRule="evenodd"
296
+ d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
297
+ clipRule="evenodd"
298
+ />
299
+ </svg>
300
+ ) : null}
301
+ </div>
302
+ )}
303
+ </div>
304
+ {/* TheAd Vantage branding bar */}
241
305
  <a
242
- href={ad.targetUrl}
243
- onClick={handleClick}
306
+ href="https://www.thead-vantage.com"
244
307
  target="_blank"
245
308
  rel="noopener noreferrer"
246
- className="block"
309
+ className="block bg-black text-yellow-400 hover:text-yellow-300 text-xs font-medium py-1.5 px-2 text-center rounded-b transition-colors"
310
+ style={{ width: ad.width || 300 }}
247
311
  >
248
- {(ad.type === 'image' || ad.type === 'standard') && ad.contentUrl ? (
249
- <Image
250
- src={ad.contentUrl}
251
- alt={ad.name}
252
- width={ad.width || 300}
253
- height={ad.height || 250}
254
- className="rounded"
255
- unoptimized
256
- />
257
- ) : (
258
- <div className="flex items-center justify-center bg-gray-200 dark:bg-gray-700 rounded" style={{ width: ad.width || 300, height: ad.height || 250 }}>
259
- <span className="text-sm text-gray-500">Ad content</span>
260
- </div>
261
- )}
312
+ Advertise with thead-vantage.com
262
313
  </a>
263
- {showImpressionFinished && impressionStatus !== 'pending' && (
264
- <div className="absolute top-2 right-2">
265
- {impressionStatus === 'counting' ? (
266
- <svg
267
- className="w-5 h-5 text-gray-400 animate-spin"
268
- xmlns="http://www.w3.org/2000/svg"
269
- fill="none"
270
- viewBox="0 0 24 24"
271
- >
272
- <circle
273
- className="opacity-25"
274
- cx="12"
275
- cy="12"
276
- r="10"
277
- stroke="currentColor"
278
- strokeWidth="4"
279
- />
280
- <path
281
- className="opacity-75"
282
- fill="currentColor"
283
- d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
284
- />
285
- </svg>
286
- ) : impressionStatus === 'completed' ? (
287
- <svg
288
- className="w-5 h-5 text-green-500"
289
- xmlns="http://www.w3.org/2000/svg"
290
- viewBox="0 0 20 20"
291
- fill="currentColor"
292
- >
293
- <path
294
- fillRule="evenodd"
295
- d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
296
- clipRule="evenodd"
297
- />
298
- </svg>
299
- ) : null}
300
- </div>
301
- )}
302
314
  {devMode && (
303
315
  <p className="text-xs text-gray-500 mt-1">[DEV] No tracking active</p>
304
316
  )}