pds-dev-kit-web-test 0.3.9 → 0.3.10

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.
@@ -707,7 +707,7 @@ export declare const sampleCustomsection1: {
707
707
  };
708
708
  CB_EFFECT_PROP_ENTANIM: {
709
709
  CB_EFFECT_PROP_ENTANIM_SPEC_TYPE: string;
710
- 'CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE': string;
710
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE': null;
711
711
  CB_EFFECT_PROP_ENTANIM_SPEC_DURATION: number;
712
712
  'CB_EFFECT_PROP_ENTANIM_SPEC_DURATION:MOBILE': null;
713
713
  CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT: number;
@@ -666,8 +666,8 @@ exports.sampleCustomsection1 = {
666
666
  CB_CONTENT_PROP_YOUTUBE_SPEC_STARTTIME: 0
667
667
  },
668
668
  CB_EFFECT_PROP_ENTANIM: {
669
- CB_EFFECT_PROP_ENTANIM_SPEC_TYPE: 'SLIDEINLEFT',
670
- 'CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE': 'HEARTBEAT',
669
+ CB_EFFECT_PROP_ENTANIM_SPEC_TYPE: 'NONE',
670
+ 'CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE': null,
671
671
  CB_EFFECT_PROP_ENTANIM_SPEC_DURATION: 1,
672
672
  'CB_EFFECT_PROP_ENTANIM_SPEC_DURATION:MOBILE': null,
673
673
  CB_EFFECT_PROP_ENTANIM_SPEC_REPEAT: 1,
@@ -50,13 +50,23 @@ function Youtube(props) {
50
50
  : CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
51
51
  var hasEffect = !isNoneEffectType;
52
52
  var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
53
- var autoplayEntry = (0, hooks_1.useIntersectionObserver)(cbRef, {
54
- freezeOnceVisible: true
53
+ var autoplayRef = (0, react_1.useRef)(null);
54
+ var autoplayEntry = (0, hooks_1.useIntersectionObserver)(autoplayRef, {
55
+ freezeOnceVisible: youtubeAutoplayMode === 'VIEWPORT-FREEZE' ? true : false
55
56
  });
56
- var shouldAutoPlay = youtubeAutoplayMode === 'ALWAYS' ||
57
- (youtubeAutoplayMode === 'VIEWPORT' && isVisible) ||
58
- (youtubeAutoplayMode === 'VIEWPORT-FREEZE' && (autoplayEntry === null || autoplayEntry === void 0 ? void 0 : autoplayEntry.isIntersecting));
59
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, propsStyle), layoutStyle), effectCssProperties), bgColorStyle), hoverStyle: __assign(__assign({}, propsHoverStyle), bgColorHoverStyle), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device }, { children: isEditMode ? ((0, jsx_runtime_1.jsxs)(S_ThumbnailBox, { children: [(0, jsx_runtime_1.jsx)(YoutubeButton, {}), (0, jsx_runtime_1.jsx)(S_Thumbnail, { src: thumbnailSrc })] })) : ((0, jsx_runtime_1.jsx)(S_Iframe, { title: id, src: shouldAutoPlay ? getAutoplaySrc(youtubeSrc) : youtubeSrc, allow: "accelerometer; encrypted-media; gyroscope; picture-in-picture" })) })) }))] }));
57
+ var shouldAutoPlay = function () {
58
+ if (youtubeAutoplayMode === 'ALWAYS') {
59
+ return true;
60
+ }
61
+ if (youtubeAutoplayMode === 'VIEWPORT' && (autoplayEntry === null || autoplayEntry === void 0 ? void 0 : autoplayEntry.isIntersecting)) {
62
+ return true;
63
+ }
64
+ if (youtubeAutoplayMode === 'VIEWPORT-FREEZE' && (autoplayEntry === null || autoplayEntry === void 0 ? void 0 : autoplayEntry.isIntersecting)) {
65
+ return true;
66
+ }
67
+ return false;
68
+ };
69
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ ref: autoplayRef, className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, propsStyle), layoutStyle), effectCssProperties), bgColorStyle), hoverStyle: __assign(__assign({}, propsHoverStyle), bgColorHoverStyle), cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device }, { children: isEditMode ? ((0, jsx_runtime_1.jsxs)(S_ThumbnailBox, { children: [(0, jsx_runtime_1.jsx)(YoutubeButton, {}), (0, jsx_runtime_1.jsx)(S_Thumbnail, { src: thumbnailSrc })] })) : ((0, jsx_runtime_1.jsx)(S_Iframe, { title: id, src: shouldAutoPlay() ? getAutoplaySrc(youtubeSrc) : youtubeSrc, allow: "accelerometer; encrypted-media; gyroscope; picture-in-picture" })) })) }))] }));
60
70
  }
61
71
  function getBGColorStyles(props, device) {
62
72
  var availableSpecCodes = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # pds-dev-kit-web-test Release Notes
2
- ## [v0.3.9]
2
+ ## [v0.3.10]
3
3
  ## 기준 pds-dev-kit-web 버전 @2.2.34
4
4
  ### sub
5
5
  * DynamicLayout