@adstage/web-sdk 2.3.6 → 2.4.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/README.md +1 -1
- package/dist/index.cjs.js +2239 -2339
- package/dist/index.d.ts +12 -71
- package/dist/index.esm.js +2240 -2337
- package/dist/index.standalone.js +2214 -2383
- package/package.json +1 -1
- package/src/core/AdStage.ts +0 -9
- package/src/index.ts +0 -3
- package/src/managers/ads/advertisement-event-tracker.ts +8 -15
- package/src/managers/ads/carousel-slider-manager.ts +4 -35
- package/src/managers/ads/text-transition-manager.ts +1 -2
- package/src/managers/ads/viewable-event-tracker.ts +1 -5
- package/src/modules/ads/AdRenderer.ts +730 -0
- package/src/modules/ads/AdsModule.ts +27 -718
- package/src/react/AdStageProvider.tsx +0 -117
- package/src/react/index.ts +0 -11
- package/src/renderers/base-renderer.ts +5 -11
- package/src/types/advertisement.ts +17 -4
- package/src/types/api.ts +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
1
|
/**
|
|
5
2
|
* AdStage SDK 모듈 타입
|
|
6
3
|
*/
|
|
@@ -71,8 +68,15 @@ declare enum Platform {
|
|
|
71
68
|
MOBILE = "MOBILE"
|
|
72
69
|
}
|
|
73
70
|
declare enum AdEventType {
|
|
71
|
+
IMPRESSION = "IMPRESSION",
|
|
72
|
+
CLICK = "CLICK",
|
|
73
|
+
HOVER = "HOVER",
|
|
74
74
|
VIEWABLE = "VIEWABLE",
|
|
75
|
-
|
|
75
|
+
VIEWABLE_IMPRESSION = "VIEWABLE_IMPRESSION",
|
|
76
|
+
COMPLETED = "COMPLETED",
|
|
77
|
+
VIDEO_START = "VIDEO_START",
|
|
78
|
+
VIDEO_COMPLETE = "VIDEO_COMPLETE",
|
|
79
|
+
ERROR = "ERROR"
|
|
76
80
|
}
|
|
77
81
|
declare enum DeviceType {
|
|
78
82
|
DESKTOP = "DESKTOP",
|
|
@@ -119,7 +123,7 @@ interface ViewabilityMetrics {
|
|
|
119
123
|
isViewable: boolean;
|
|
120
124
|
visibilityRatio: number;
|
|
121
125
|
duration: number;
|
|
122
|
-
|
|
126
|
+
impressions: number;
|
|
123
127
|
attentionTime: number;
|
|
124
128
|
scrollDepth: number;
|
|
125
129
|
completionRate: number;
|
|
@@ -195,7 +199,7 @@ interface AdSlot {
|
|
|
195
199
|
config?: AdSlotConfig;
|
|
196
200
|
advertisement?: Advertisement;
|
|
197
201
|
isViewable?: boolean;
|
|
198
|
-
|
|
202
|
+
impressionSent?: boolean;
|
|
199
203
|
loadTime?: number;
|
|
200
204
|
renderTime?: number;
|
|
201
205
|
events?: AdEvent[];
|
|
@@ -229,6 +233,7 @@ declare class AdsModule implements BaseModule {
|
|
|
229
233
|
private _config;
|
|
230
234
|
private slots;
|
|
231
235
|
private advertisementEventTracker;
|
|
236
|
+
private adRenderer;
|
|
232
237
|
/**
|
|
233
238
|
* Ads 모듈 초기화 (동기)
|
|
234
239
|
*/
|
|
@@ -281,42 +286,15 @@ declare class AdsModule implements BaseModule {
|
|
|
281
286
|
* 광고 생성 내부 메소드 (동기 + Lazy 로딩)
|
|
282
287
|
*/
|
|
283
288
|
private createAd;
|
|
284
|
-
/**
|
|
285
|
-
* 즉시 광고 슬롯 생성 (placeholder)
|
|
286
|
-
*/
|
|
287
|
-
private createAdSlot;
|
|
288
|
-
/**
|
|
289
|
-
* 컨테이너와 광고 타입에 따른 스마트한 크기 계산
|
|
290
|
-
*/
|
|
291
|
-
private calculateAdSize;
|
|
292
|
-
/**
|
|
293
|
-
* 컨테이너의 실제 높이 계산
|
|
294
|
-
*/
|
|
295
|
-
private getContainerHeight;
|
|
296
|
-
/**
|
|
297
|
-
* 광고 타입별 기본 높이 반환
|
|
298
|
-
*/
|
|
299
|
-
private getDefaultHeightForAdType;
|
|
300
|
-
/**
|
|
301
|
-
* 이미지 크기 정보 로드 (프리로딩)
|
|
302
|
-
*/
|
|
303
|
-
private loadImageDimensions;
|
|
304
289
|
/**
|
|
305
290
|
* 여러 광고의 최적 컨테이너 크기 계산 (동적 크기 조정)
|
|
306
291
|
*/
|
|
307
|
-
private calculateOptimalContainerSize;
|
|
308
292
|
/**
|
|
309
293
|
* 최적 크기 조정 전략 선택
|
|
310
294
|
*/
|
|
311
|
-
private selectOptimalSizeStrategy;
|
|
312
295
|
/**
|
|
313
296
|
* 전략에 따른 최적 높이 계산
|
|
314
297
|
*/
|
|
315
|
-
private calculateOptimalHeight;
|
|
316
|
-
/**
|
|
317
|
-
* 개별 이미지에 최적화된 렌더링 스타일 적용
|
|
318
|
-
*/
|
|
319
|
-
private applyOptimizedImageStyle;
|
|
320
298
|
/**
|
|
321
299
|
* 백그라운드에서 광고 콘텐츠 로드
|
|
322
300
|
*/
|
|
@@ -324,7 +302,6 @@ declare class AdsModule implements BaseModule {
|
|
|
324
302
|
/**
|
|
325
303
|
* 배너 광고를 위한 컨테이너 최적화
|
|
326
304
|
*/
|
|
327
|
-
private optimizeContainerForBannerAds;
|
|
328
305
|
/**
|
|
329
306
|
* 기본 viewability 추적 시작
|
|
330
307
|
*/
|
|
@@ -336,11 +313,9 @@ declare class AdsModule implements BaseModule {
|
|
|
336
313
|
/**
|
|
337
314
|
* Fallback 광고 렌더링 - AdStage 확실한 컨테이너 우선 탐지
|
|
338
315
|
*/
|
|
339
|
-
private renderFallback;
|
|
340
316
|
/**
|
|
341
317
|
* 빈 컨테이너 생성 (컨테이너를 찾지 못한 경우)
|
|
342
318
|
*/
|
|
343
|
-
private createEmptyContainer;
|
|
344
319
|
/**
|
|
345
320
|
* 광고 데이터 가져오기
|
|
346
321
|
*/
|
|
@@ -348,19 +323,12 @@ declare class AdsModule implements BaseModule {
|
|
|
348
323
|
/**
|
|
349
324
|
* 광고 슬라이더 렌더링 (여러 광고 또는 autoSlide 옵션)
|
|
350
325
|
*/
|
|
351
|
-
private renderAdSlider;
|
|
352
326
|
/**
|
|
353
327
|
* 광고 렌더링 (단일 광고용)
|
|
354
328
|
*/
|
|
355
|
-
private renderAd;
|
|
356
329
|
/**
|
|
357
330
|
* 광고 요소 렌더링 (기본 구현)
|
|
358
331
|
*/
|
|
359
|
-
private renderAdElement;
|
|
360
|
-
/**
|
|
361
|
-
* 최적화된 배너 이미지 렌더링
|
|
362
|
-
*/
|
|
363
|
-
private renderOptimizedBannerImage;
|
|
364
332
|
/**
|
|
365
333
|
* 광고 슬롯 새로고침
|
|
366
334
|
*/
|
|
@@ -522,33 +490,6 @@ declare class AdStage {
|
|
|
522
490
|
static reset(): void;
|
|
523
491
|
}
|
|
524
492
|
|
|
525
|
-
interface AdStageContextType {
|
|
526
|
-
isInitialized: boolean;
|
|
527
|
-
config: AdStageConfig | null;
|
|
528
|
-
initialize: (config: AdStageConfig) => void;
|
|
529
|
-
reset: () => void;
|
|
530
|
-
error: string | null;
|
|
531
|
-
}
|
|
532
|
-
interface AdStageProviderProps {
|
|
533
|
-
children: ReactNode;
|
|
534
|
-
/**
|
|
535
|
-
* 자동 초기화를 위한 설정 (선택사항)
|
|
536
|
-
* 제공되면 Provider 마운트 시 자동으로 초기화됩니다.
|
|
537
|
-
*/
|
|
538
|
-
config?: AdStageConfig;
|
|
539
|
-
}
|
|
540
|
-
declare function AdStageProvider({ children, config }: AdStageProviderProps): react_jsx_runtime.JSX.Element;
|
|
541
|
-
/**
|
|
542
|
-
* AdStage Context Hook
|
|
543
|
-
* AdStageProvider 내에서 SDK 상태에 접근할 수 있습니다.
|
|
544
|
-
*/
|
|
545
|
-
declare function useAdStage(): AdStageContextType;
|
|
546
|
-
/**
|
|
547
|
-
* AdStage SDK Hook
|
|
548
|
-
* 초기화된 AdStage 인스턴스에 직접 접근할 수 있습니다.
|
|
549
|
-
*/
|
|
550
|
-
declare function useAdStageSDK(): typeof AdStage;
|
|
551
|
-
|
|
552
493
|
/**
|
|
553
494
|
* AdStage Web SDK
|
|
554
495
|
* 네임스페이스 아키텍처 기반 SDK
|
|
@@ -557,4 +498,4 @@ declare function useAdStageSDK(): typeof AdStage;
|
|
|
557
498
|
declare const SDK_VERSION = "2.0.0";
|
|
558
499
|
declare const SUPPORTED_MODULES: readonly ["ads", "events", "config"];
|
|
559
500
|
|
|
560
|
-
export { AdEventType, AdOptions, AdSlot, AdStage, AdStageConfig,
|
|
501
|
+
export { AdEventType, AdOptions, AdSlot, AdStage, AdStageConfig, AdType, Advertisement, ApiResponse, BaseModule, EventProperties, ModuleName, OrganizationInfo, PageData, SDK_VERSION, SUPPORTED_MODULES };
|