@adstage/web-sdk 2.1.3 → 2.1.5
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.cjs.js
CHANGED
|
@@ -795,11 +795,12 @@ class CarouselSliderManager {
|
|
|
795
795
|
width = `${slot.width}px`;
|
|
796
796
|
}
|
|
797
797
|
containerStyles.width = width;
|
|
798
|
-
containerStyles.display = '
|
|
798
|
+
containerStyles.display = 'block'; // ✅ 하단 공백 제거를 위해 block 사용
|
|
799
799
|
}
|
|
800
800
|
else {
|
|
801
|
-
// 컨텐츠 크기에 맞춤
|
|
802
|
-
containerStyles.display = '
|
|
801
|
+
// 컨텐츠 크기에 맞춤 - fit-content로 컨텐츠에 맞는 크기 설정
|
|
802
|
+
containerStyles.display = 'block';
|
|
803
|
+
containerStyles.width = 'fit-content'; // 컨텐츠 크기에 맞춤
|
|
803
804
|
}
|
|
804
805
|
if (slot.height && slot.height !== 0) {
|
|
805
806
|
const height = typeof slot.height === 'string' ? slot.height : `${slot.height}px`;
|
|
@@ -1119,7 +1120,8 @@ class TextTransitionManager {
|
|
|
1119
1120
|
const containerStyles = {
|
|
1120
1121
|
position: 'relative',
|
|
1121
1122
|
overflow: 'hidden',
|
|
1122
|
-
display: '
|
|
1123
|
+
display: 'block', // ✅ 하단 공백 제거를 위해 block 사용
|
|
1124
|
+
width: 'fit-content', // 컨텐츠 크기에 맞춤
|
|
1123
1125
|
};
|
|
1124
1126
|
// 사용자가 크기를 지정한 경우
|
|
1125
1127
|
if (slot.width && slot.width !== 0) {
|
|
@@ -2054,7 +2056,7 @@ class AdsModule {
|
|
|
2054
2056
|
this.ensureReady();
|
|
2055
2057
|
const adstageOptions = {
|
|
2056
2058
|
width: options?.width || '100%',
|
|
2057
|
-
height: options?.height ||
|
|
2059
|
+
height: options?.height || 'auto', // 🔧 동적 크기 조정 활용
|
|
2058
2060
|
autoSlide: options?.autoSlide || false,
|
|
2059
2061
|
slideInterval: options?.slideInterval || 5000,
|
|
2060
2062
|
onClick: options?.onClick,
|
|
@@ -2260,11 +2262,12 @@ class AdsModule {
|
|
|
2260
2262
|
if (typeof explicitHeight === 'number') {
|
|
2261
2263
|
height = `${explicitHeight}px`;
|
|
2262
2264
|
}
|
|
2263
|
-
else if (typeof explicitHeight === 'string' && explicitHeight !== '100%') {
|
|
2265
|
+
else if (typeof explicitHeight === 'string' && explicitHeight !== '100%' && explicitHeight !== 'auto') {
|
|
2266
|
+
// 명시적인 크기 문자열 (예: '200px', '50vh' 등)
|
|
2264
2267
|
height = explicitHeight;
|
|
2265
2268
|
}
|
|
2266
2269
|
else {
|
|
2267
|
-
// 100
|
|
2270
|
+
// 100%, auto이거나 높이가 지정되지 않은 경우 스마트 계산
|
|
2268
2271
|
const containerHeight = this.getContainerHeight(container);
|
|
2269
2272
|
if (containerHeight > 0) {
|
|
2270
2273
|
// 컨테이너에 높이가 있으면 100% 사용
|
|
@@ -2274,10 +2277,10 @@ class AdsModule {
|
|
|
2274
2277
|
}
|
|
2275
2278
|
}
|
|
2276
2279
|
else {
|
|
2277
|
-
// 컨테이너에 높이가 없으면 타입별 기본값 사용
|
|
2280
|
+
// 컨테이너에 높이가 없으면 타입별 기본값 사용 (나중에 동적 조정됨)
|
|
2278
2281
|
height = this.getDefaultHeightForAdType(type);
|
|
2279
2282
|
if (this._config?.debug) {
|
|
2280
|
-
console.log(`📏 Using default height ${height} (
|
|
2283
|
+
console.log(`📏 Using default height ${height} (will be optimized for ${type})`);
|
|
2281
2284
|
}
|
|
2282
2285
|
}
|
|
2283
2286
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -793,11 +793,12 @@ class CarouselSliderManager {
|
|
|
793
793
|
width = `${slot.width}px`;
|
|
794
794
|
}
|
|
795
795
|
containerStyles.width = width;
|
|
796
|
-
containerStyles.display = '
|
|
796
|
+
containerStyles.display = 'block'; // ✅ 하단 공백 제거를 위해 block 사용
|
|
797
797
|
}
|
|
798
798
|
else {
|
|
799
|
-
// 컨텐츠 크기에 맞춤
|
|
800
|
-
containerStyles.display = '
|
|
799
|
+
// 컨텐츠 크기에 맞춤 - fit-content로 컨텐츠에 맞는 크기 설정
|
|
800
|
+
containerStyles.display = 'block';
|
|
801
|
+
containerStyles.width = 'fit-content'; // 컨텐츠 크기에 맞춤
|
|
801
802
|
}
|
|
802
803
|
if (slot.height && slot.height !== 0) {
|
|
803
804
|
const height = typeof slot.height === 'string' ? slot.height : `${slot.height}px`;
|
|
@@ -1117,7 +1118,8 @@ class TextTransitionManager {
|
|
|
1117
1118
|
const containerStyles = {
|
|
1118
1119
|
position: 'relative',
|
|
1119
1120
|
overflow: 'hidden',
|
|
1120
|
-
display: '
|
|
1121
|
+
display: 'block', // ✅ 하단 공백 제거를 위해 block 사용
|
|
1122
|
+
width: 'fit-content', // 컨텐츠 크기에 맞춤
|
|
1121
1123
|
};
|
|
1122
1124
|
// 사용자가 크기를 지정한 경우
|
|
1123
1125
|
if (slot.width && slot.width !== 0) {
|
|
@@ -2052,7 +2054,7 @@ class AdsModule {
|
|
|
2052
2054
|
this.ensureReady();
|
|
2053
2055
|
const adstageOptions = {
|
|
2054
2056
|
width: options?.width || '100%',
|
|
2055
|
-
height: options?.height ||
|
|
2057
|
+
height: options?.height || 'auto', // 🔧 동적 크기 조정 활용
|
|
2056
2058
|
autoSlide: options?.autoSlide || false,
|
|
2057
2059
|
slideInterval: options?.slideInterval || 5000,
|
|
2058
2060
|
onClick: options?.onClick,
|
|
@@ -2258,11 +2260,12 @@ class AdsModule {
|
|
|
2258
2260
|
if (typeof explicitHeight === 'number') {
|
|
2259
2261
|
height = `${explicitHeight}px`;
|
|
2260
2262
|
}
|
|
2261
|
-
else if (typeof explicitHeight === 'string' && explicitHeight !== '100%') {
|
|
2263
|
+
else if (typeof explicitHeight === 'string' && explicitHeight !== '100%' && explicitHeight !== 'auto') {
|
|
2264
|
+
// 명시적인 크기 문자열 (예: '200px', '50vh' 등)
|
|
2262
2265
|
height = explicitHeight;
|
|
2263
2266
|
}
|
|
2264
2267
|
else {
|
|
2265
|
-
// 100
|
|
2268
|
+
// 100%, auto이거나 높이가 지정되지 않은 경우 스마트 계산
|
|
2266
2269
|
const containerHeight = this.getContainerHeight(container);
|
|
2267
2270
|
if (containerHeight > 0) {
|
|
2268
2271
|
// 컨테이너에 높이가 있으면 100% 사용
|
|
@@ -2272,10 +2275,10 @@ class AdsModule {
|
|
|
2272
2275
|
}
|
|
2273
2276
|
}
|
|
2274
2277
|
else {
|
|
2275
|
-
// 컨테이너에 높이가 없으면 타입별 기본값 사용
|
|
2278
|
+
// 컨테이너에 높이가 없으면 타입별 기본값 사용 (나중에 동적 조정됨)
|
|
2276
2279
|
height = this.getDefaultHeightForAdType(type);
|
|
2277
2280
|
if (this._config?.debug) {
|
|
2278
|
-
console.log(`📏 Using default height ${height} (
|
|
2281
|
+
console.log(`📏 Using default height ${height} (will be optimized for ${type})`);
|
|
2279
2282
|
}
|
|
2280
2283
|
}
|
|
2281
2284
|
}
|
package/dist/index.standalone.js
CHANGED
|
@@ -793,11 +793,12 @@ class CarouselSliderManager {
|
|
|
793
793
|
width = `${slot.width}px`;
|
|
794
794
|
}
|
|
795
795
|
containerStyles.width = width;
|
|
796
|
-
containerStyles.display = '
|
|
796
|
+
containerStyles.display = 'block'; // ✅ 하단 공백 제거를 위해 block 사용
|
|
797
797
|
}
|
|
798
798
|
else {
|
|
799
|
-
// 컨텐츠 크기에 맞춤
|
|
800
|
-
containerStyles.display = '
|
|
799
|
+
// 컨텐츠 크기에 맞춤 - fit-content로 컨텐츠에 맞는 크기 설정
|
|
800
|
+
containerStyles.display = 'block';
|
|
801
|
+
containerStyles.width = 'fit-content'; // 컨텐츠 크기에 맞춤
|
|
801
802
|
}
|
|
802
803
|
if (slot.height && slot.height !== 0) {
|
|
803
804
|
const height = typeof slot.height === 'string' ? slot.height : `${slot.height}px`;
|
|
@@ -1117,7 +1118,8 @@ class TextTransitionManager {
|
|
|
1117
1118
|
const containerStyles = {
|
|
1118
1119
|
position: 'relative',
|
|
1119
1120
|
overflow: 'hidden',
|
|
1120
|
-
display: '
|
|
1121
|
+
display: 'block', // ✅ 하단 공백 제거를 위해 block 사용
|
|
1122
|
+
width: 'fit-content', // 컨텐츠 크기에 맞춤
|
|
1121
1123
|
};
|
|
1122
1124
|
// 사용자가 크기를 지정한 경우
|
|
1123
1125
|
if (slot.width && slot.width !== 0) {
|
|
@@ -2052,7 +2054,7 @@ class AdsModule {
|
|
|
2052
2054
|
this.ensureReady();
|
|
2053
2055
|
const adstageOptions = {
|
|
2054
2056
|
width: options?.width || '100%',
|
|
2055
|
-
height: options?.height ||
|
|
2057
|
+
height: options?.height || 'auto', // 🔧 동적 크기 조정 활용
|
|
2056
2058
|
autoSlide: options?.autoSlide || false,
|
|
2057
2059
|
slideInterval: options?.slideInterval || 5000,
|
|
2058
2060
|
onClick: options?.onClick,
|
|
@@ -2258,11 +2260,12 @@ class AdsModule {
|
|
|
2258
2260
|
if (typeof explicitHeight === 'number') {
|
|
2259
2261
|
height = `${explicitHeight}px`;
|
|
2260
2262
|
}
|
|
2261
|
-
else if (typeof explicitHeight === 'string' && explicitHeight !== '100%') {
|
|
2263
|
+
else if (typeof explicitHeight === 'string' && explicitHeight !== '100%' && explicitHeight !== 'auto') {
|
|
2264
|
+
// 명시적인 크기 문자열 (예: '200px', '50vh' 등)
|
|
2262
2265
|
height = explicitHeight;
|
|
2263
2266
|
}
|
|
2264
2267
|
else {
|
|
2265
|
-
// 100
|
|
2268
|
+
// 100%, auto이거나 높이가 지정되지 않은 경우 스마트 계산
|
|
2266
2269
|
const containerHeight = this.getContainerHeight(container);
|
|
2267
2270
|
if (containerHeight > 0) {
|
|
2268
2271
|
// 컨테이너에 높이가 있으면 100% 사용
|
|
@@ -2272,10 +2275,10 @@ class AdsModule {
|
|
|
2272
2275
|
}
|
|
2273
2276
|
}
|
|
2274
2277
|
else {
|
|
2275
|
-
// 컨테이너에 높이가 없으면 타입별 기본값 사용
|
|
2278
|
+
// 컨테이너에 높이가 없으면 타입별 기본값 사용 (나중에 동적 조정됨)
|
|
2276
2279
|
height = this.getDefaultHeightForAdType(type);
|
|
2277
2280
|
if (this._config?.debug) {
|
|
2278
|
-
console.log(`📏 Using default height ${height} (
|
|
2281
|
+
console.log(`📏 Using default height ${height} (will be optimized for ${type})`);
|
|
2279
2282
|
}
|
|
2280
2283
|
}
|
|
2281
2284
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adstage/web-sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.5",
|
|
4
4
|
"description": "AdStage Web SDK - Production-ready marketing platform SDK with namespace architecture for ads, events, and config management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -39,10 +39,11 @@ export class CarouselSliderManager {
|
|
|
39
39
|
width = `${slot.width}px`;
|
|
40
40
|
}
|
|
41
41
|
containerStyles.width = width;
|
|
42
|
-
containerStyles.display = '
|
|
42
|
+
containerStyles.display = 'block'; // ✅ 하단 공백 제거를 위해 block 사용
|
|
43
43
|
} else {
|
|
44
|
-
// 컨텐츠 크기에 맞춤
|
|
45
|
-
containerStyles.display = '
|
|
44
|
+
// 컨텐츠 크기에 맞춤 - fit-content로 컨텐츠에 맞는 크기 설정
|
|
45
|
+
containerStyles.display = 'block';
|
|
46
|
+
containerStyles.width = 'fit-content'; // 컨텐츠 크기에 맞춤
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
if (slot.height && slot.height !== 0) {
|
|
@@ -25,7 +25,8 @@ export class TextTransitionManager {
|
|
|
25
25
|
const containerStyles: Record<string, string> = {
|
|
26
26
|
position: 'relative',
|
|
27
27
|
overflow: 'hidden',
|
|
28
|
-
display: '
|
|
28
|
+
display: 'block', // ✅ 하단 공백 제거를 위해 block 사용
|
|
29
|
+
width: 'fit-content', // 컨텐츠 크기에 맞춤
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
// 사용자가 크기를 지정한 경우
|
|
@@ -82,7 +82,7 @@ export class AdsModule implements BaseModule {
|
|
|
82
82
|
|
|
83
83
|
const adstageOptions = {
|
|
84
84
|
width: options?.width || '100%',
|
|
85
|
-
height: options?.height ||
|
|
85
|
+
height: options?.height || 'auto', // 🔧 동적 크기 조정 활용
|
|
86
86
|
autoSlide: options?.autoSlide || false,
|
|
87
87
|
slideInterval: options?.slideInterval || 5000,
|
|
88
88
|
onClick: options?.onClick,
|
|
@@ -325,10 +325,11 @@ export class AdsModule implements BaseModule {
|
|
|
325
325
|
let height: string;
|
|
326
326
|
if (typeof explicitHeight === 'number') {
|
|
327
327
|
height = `${explicitHeight}px`;
|
|
328
|
-
} else if (typeof explicitHeight === 'string' && explicitHeight !== '100%') {
|
|
328
|
+
} else if (typeof explicitHeight === 'string' && explicitHeight !== '100%' && explicitHeight !== 'auto') {
|
|
329
|
+
// 명시적인 크기 문자열 (예: '200px', '50vh' 등)
|
|
329
330
|
height = explicitHeight;
|
|
330
331
|
} else {
|
|
331
|
-
// 100
|
|
332
|
+
// 100%, auto이거나 높이가 지정되지 않은 경우 스마트 계산
|
|
332
333
|
const containerHeight = this.getContainerHeight(container);
|
|
333
334
|
|
|
334
335
|
if (containerHeight > 0) {
|
|
@@ -338,10 +339,10 @@ export class AdsModule implements BaseModule {
|
|
|
338
339
|
console.log(`📏 Using 100% height (container: ${containerHeight}px)`);
|
|
339
340
|
}
|
|
340
341
|
} else {
|
|
341
|
-
// 컨테이너에 높이가 없으면 타입별 기본값 사용
|
|
342
|
+
// 컨테이너에 높이가 없으면 타입별 기본값 사용 (나중에 동적 조정됨)
|
|
342
343
|
height = this.getDefaultHeightForAdType(type);
|
|
343
344
|
if (this._config?.debug) {
|
|
344
|
-
console.log(`📏 Using default height ${height} (
|
|
345
|
+
console.log(`📏 Using default height ${height} (will be optimized for ${type})`);
|
|
345
346
|
}
|
|
346
347
|
}
|
|
347
348
|
}
|