@adstage/web-sdk 2.1.3 β†’ 2.1.4

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
@@ -2054,7 +2054,7 @@ class AdsModule {
2054
2054
  this.ensureReady();
2055
2055
  const adstageOptions = {
2056
2056
  width: options?.width || '100%',
2057
- height: options?.height || 250,
2057
+ height: options?.height || 'auto', // πŸ”§ 동적 크기 μ‘°μ • ν™œμš©
2058
2058
  autoSlide: options?.autoSlide || false,
2059
2059
  slideInterval: options?.slideInterval || 5000,
2060
2060
  onClick: options?.onClick,
@@ -2260,11 +2260,12 @@ class AdsModule {
2260
2260
  if (typeof explicitHeight === 'number') {
2261
2261
  height = `${explicitHeight}px`;
2262
2262
  }
2263
- else if (typeof explicitHeight === 'string' && explicitHeight !== '100%') {
2263
+ else if (typeof explicitHeight === 'string' && explicitHeight !== '100%' && explicitHeight !== 'auto') {
2264
+ // λͺ…μ‹œμ μΈ 크기 λ¬Έμžμ—΄ (예: '200px', '50vh' λ“±)
2264
2265
  height = explicitHeight;
2265
2266
  }
2266
2267
  else {
2267
- // 100%μ΄κ±°λ‚˜ 높이가 μ§€μ •λ˜μ§€ μ•Šμ€ 경우 슀마트 계산
2268
+ // 100%, autoμ΄κ±°λ‚˜ 높이가 μ§€μ •λ˜μ§€ μ•Šμ€ 경우 슀마트 계산
2268
2269
  const containerHeight = this.getContainerHeight(container);
2269
2270
  if (containerHeight > 0) {
2270
2271
  // μ»¨ν…Œμ΄λ„ˆμ— 높이가 있으면 100% μ‚¬μš©
@@ -2274,10 +2275,10 @@ class AdsModule {
2274
2275
  }
2275
2276
  }
2276
2277
  else {
2277
- // μ»¨ν…Œμ΄λ„ˆμ— 높이가 μ—†μœΌλ©΄ νƒ€μž…λ³„ κΈ°λ³Έκ°’ μ‚¬μš©
2278
+ // μ»¨ν…Œμ΄λ„ˆμ— 높이가 μ—†μœΌλ©΄ νƒ€μž…λ³„ κΈ°λ³Έκ°’ μ‚¬μš© (λ‚˜μ€‘μ— 동적 쑰정됨)
2278
2279
  height = this.getDefaultHeightForAdType(type);
2279
2280
  if (this._config?.debug) {
2280
- console.log(`πŸ“ Using default height ${height} (no container height)`);
2281
+ console.log(`πŸ“ Using default height ${height} (will be optimized for ${type})`);
2281
2282
  }
2282
2283
  }
2283
2284
  }
package/dist/index.esm.js CHANGED
@@ -2052,7 +2052,7 @@ class AdsModule {
2052
2052
  this.ensureReady();
2053
2053
  const adstageOptions = {
2054
2054
  width: options?.width || '100%',
2055
- height: options?.height || 250,
2055
+ height: options?.height || 'auto', // πŸ”§ 동적 크기 μ‘°μ • ν™œμš©
2056
2056
  autoSlide: options?.autoSlide || false,
2057
2057
  slideInterval: options?.slideInterval || 5000,
2058
2058
  onClick: options?.onClick,
@@ -2258,11 +2258,12 @@ class AdsModule {
2258
2258
  if (typeof explicitHeight === 'number') {
2259
2259
  height = `${explicitHeight}px`;
2260
2260
  }
2261
- else if (typeof explicitHeight === 'string' && explicitHeight !== '100%') {
2261
+ else if (typeof explicitHeight === 'string' && explicitHeight !== '100%' && explicitHeight !== 'auto') {
2262
+ // λͺ…μ‹œμ μΈ 크기 λ¬Έμžμ—΄ (예: '200px', '50vh' λ“±)
2262
2263
  height = explicitHeight;
2263
2264
  }
2264
2265
  else {
2265
- // 100%μ΄κ±°λ‚˜ 높이가 μ§€μ •λ˜μ§€ μ•Šμ€ 경우 슀마트 계산
2266
+ // 100%, autoμ΄κ±°λ‚˜ 높이가 μ§€μ •λ˜μ§€ μ•Šμ€ 경우 슀마트 계산
2266
2267
  const containerHeight = this.getContainerHeight(container);
2267
2268
  if (containerHeight > 0) {
2268
2269
  // μ»¨ν…Œμ΄λ„ˆμ— 높이가 있으면 100% μ‚¬μš©
@@ -2272,10 +2273,10 @@ class AdsModule {
2272
2273
  }
2273
2274
  }
2274
2275
  else {
2275
- // μ»¨ν…Œμ΄λ„ˆμ— 높이가 μ—†μœΌλ©΄ νƒ€μž…λ³„ κΈ°λ³Έκ°’ μ‚¬μš©
2276
+ // μ»¨ν…Œμ΄λ„ˆμ— 높이가 μ—†μœΌλ©΄ νƒ€μž…λ³„ κΈ°λ³Έκ°’ μ‚¬μš© (λ‚˜μ€‘μ— 동적 쑰정됨)
2276
2277
  height = this.getDefaultHeightForAdType(type);
2277
2278
  if (this._config?.debug) {
2278
- console.log(`πŸ“ Using default height ${height} (no container height)`);
2279
+ console.log(`πŸ“ Using default height ${height} (will be optimized for ${type})`);
2279
2280
  }
2280
2281
  }
2281
2282
  }
@@ -2052,7 +2052,7 @@ class AdsModule {
2052
2052
  this.ensureReady();
2053
2053
  const adstageOptions = {
2054
2054
  width: options?.width || '100%',
2055
- height: options?.height || 250,
2055
+ height: options?.height || 'auto', // πŸ”§ 동적 크기 μ‘°μ • ν™œμš©
2056
2056
  autoSlide: options?.autoSlide || false,
2057
2057
  slideInterval: options?.slideInterval || 5000,
2058
2058
  onClick: options?.onClick,
@@ -2258,11 +2258,12 @@ class AdsModule {
2258
2258
  if (typeof explicitHeight === 'number') {
2259
2259
  height = `${explicitHeight}px`;
2260
2260
  }
2261
- else if (typeof explicitHeight === 'string' && explicitHeight !== '100%') {
2261
+ else if (typeof explicitHeight === 'string' && explicitHeight !== '100%' && explicitHeight !== 'auto') {
2262
+ // λͺ…μ‹œμ μΈ 크기 λ¬Έμžμ—΄ (예: '200px', '50vh' λ“±)
2262
2263
  height = explicitHeight;
2263
2264
  }
2264
2265
  else {
2265
- // 100%μ΄κ±°λ‚˜ 높이가 μ§€μ •λ˜μ§€ μ•Šμ€ 경우 슀마트 계산
2266
+ // 100%, autoμ΄κ±°λ‚˜ 높이가 μ§€μ •λ˜μ§€ μ•Šμ€ 경우 슀마트 계산
2266
2267
  const containerHeight = this.getContainerHeight(container);
2267
2268
  if (containerHeight > 0) {
2268
2269
  // μ»¨ν…Œμ΄λ„ˆμ— 높이가 있으면 100% μ‚¬μš©
@@ -2272,10 +2273,10 @@ class AdsModule {
2272
2273
  }
2273
2274
  }
2274
2275
  else {
2275
- // μ»¨ν…Œμ΄λ„ˆμ— 높이가 μ—†μœΌλ©΄ νƒ€μž…λ³„ κΈ°λ³Έκ°’ μ‚¬μš©
2276
+ // μ»¨ν…Œμ΄λ„ˆμ— 높이가 μ—†μœΌλ©΄ νƒ€μž…λ³„ κΈ°λ³Έκ°’ μ‚¬μš© (λ‚˜μ€‘μ— 동적 쑰정됨)
2276
2277
  height = this.getDefaultHeightForAdType(type);
2277
2278
  if (this._config?.debug) {
2278
- console.log(`πŸ“ Using default height ${height} (no container height)`);
2279
+ console.log(`πŸ“ Using default height ${height} (will be optimized for ${type})`);
2279
2280
  }
2280
2281
  }
2281
2282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adstage/web-sdk",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
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",
@@ -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 || 250,
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} (no container height)`);
345
+ console.log(`πŸ“ Using default height ${height} (will be optimized for ${type})`);
345
346
  }
346
347
  }
347
348
  }