@ray-js/ipc-player-integration 0.0.35-beta.14 → 0.0.35-beta.15

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.
@@ -1,4 +1,3 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
1
  import "core-js/modules/esnext.iterator.constructor.js";
3
2
  import "core-js/modules/esnext.iterator.find.js";
4
3
  import React, { useMemo } from 'react';
@@ -9,6 +8,10 @@ import { useComponentHideState } from './hooks';
9
8
  import { TrialBadge, useTrialBadge } from '../widgets/trialBadge';
10
9
  /** 右侧透明渐变宽度,用于提示横向可滑动 */
11
10
  const FADE_MASK = 'linear-gradient(to right, #000 calc(100% - 48px), transparent 100%)';
11
+
12
+ /** TrialBadge 组件高度 40px + 间距 */
13
+ const BADGE_HEIGHT_VERTICAL = 44;
14
+ const BADGE_HEIGHT_FULL = 48;
12
15
  const BottomLeftContent = _ref => {
13
16
  let {
14
17
  ctx,
@@ -53,40 +56,32 @@ const BottomLeftContent = _ref => {
53
56
  handleCountdownEnd
54
57
  } = useTrialBadge(ctx.event, ctx.devId, trialRemainingSec);
55
58
  const paddingLeftPx = screenType === 'vertical' ? 0 : 25;
56
- const containerHeight = screenType === 'vertical' ? '40px' : '58px';
57
- const trialBadgeStyle = screenType === 'vertical' ? {
58
- position: 'absolute',
59
- left: '0px',
60
- bottom: '48px',
61
- marginBottom: 4,
62
- zIndex: 101,
63
- width: 'max-content'
64
- } : {
65
- position: 'absolute',
66
- left: '25px',
67
- bottom: '72px',
68
- marginBottom: 8,
69
- zIndex: 101,
70
- width: 'max-content'
71
- };
72
- return /*#__PURE__*/React.createElement(React.Fragment, null, showSmartImageQuality && showTrialBadge && canOpenSettings && gRawData && !isLowPhone && trialRemainingSec > 0 && /*#__PURE__*/React.createElement(CoverView, {
73
- style: _objectSpread(_objectSpread({}, trialBadgeStyle), {}, {
59
+ const showBadge = showSmartImageQuality && showTrialBadge && canOpenSettings && gRawData && !isLowPhone && trialRemainingSec > 0;
60
+ const bottomBarHeight = screenType === 'vertical' ? 40 : 58;
61
+ const badgeAreaHeight = screenType === 'vertical' ? BADGE_HEIGHT_VERTICAL : BADGE_HEIGHT_FULL;
62
+ const containerHeight = showBadge ? `${bottomBarHeight + badgeAreaHeight}px` : `${bottomBarHeight}px`;
63
+ return /*#__PURE__*/React.createElement(CoverView, {
64
+ className: clsx('ipc-player-bottom-left-content-wrap'),
65
+ style: {
66
+ right: `${reservedRight}px`,
67
+ height: containerHeight,
68
+ display: 'flex',
69
+ flexDirection: 'column',
70
+ justifyContent: 'flex-end',
74
71
  opacity: shouldHide ? 0 : 1,
75
72
  pointerEvents: shouldHide ? 'none' : 'auto'
76
- }),
77
- onClick: e => e.stopPropagation()
73
+ }
74
+ }, showBadge && /*#__PURE__*/React.createElement(View, {
75
+ style: {
76
+ paddingLeft: screenType === 'vertical' ? '0px' : '25px',
77
+ marginBottom: screenType === 'vertical' ? '4px' : '8px'
78
+ }
78
79
  }, /*#__PURE__*/React.createElement(TrialBadge, {
79
80
  brandColor: brandColor,
80
81
  trialRemainingSec: trialRemainingSec,
81
82
  onSubscribe: handleTrialSubscribe,
82
83
  onCountdownEnd: handleCountdownEnd
83
- })), /*#__PURE__*/React.createElement(CoverView, {
84
- className: clsx('ipc-player-bottom-left-content-wrap'),
85
- style: {
86
- right: `${reservedRight}px`,
87
- height: containerHeight
88
- }
89
- }, /*#__PURE__*/React.createElement(View, {
84
+ })), /*#__PURE__*/React.createElement(View, {
90
85
  style: {
91
86
  paddingBottom: screenType === 'vertical' ? '14px' : '32px',
92
87
  paddingLeft: `${paddingLeftPx}px`,
@@ -100,6 +95,6 @@ const BottomLeftContent = _ref => {
100
95
  maskImage: FADE_MASK
101
96
  },
102
97
  className: clsx('ipc-player-bottom-left-content-container')
103
- }, children)));
98
+ }, children));
104
99
  };
105
100
  export default BottomLeftContent;
package/lib/ui/ui.less CHANGED
@@ -157,7 +157,7 @@
157
157
  // 左下角子元素内容区域样式
158
158
  .ipc-player-bottom-left-content-container {
159
159
  display: flex;
160
- flex-direction: inherit;
160
+ flex-direction: row;
161
161
  }
162
162
 
163
163
  // 右下角子元素内容区域样式
@@ -152,7 +152,10 @@ export const TryExperience = props => {
152
152
  if (hideTryExperienceMenu) {
153
153
  return null;
154
154
  }
155
- return /*#__PURE__*/React.createElement(React.Fragment, null, imgSrc && canOpenSettings && gRawData && /*#__PURE__*/React.createElement(View, {
155
+ if (!imgSrc || !canOpenSettings || !gRawData) {
156
+ return null;
157
+ }
158
+ return /*#__PURE__*/React.createElement(View, {
156
159
  className: clsx(className),
157
160
  onClick: onTryExperience
158
161
  }, /*#__PURE__*/React.createElement(View, {
@@ -161,5 +164,5 @@ export const TryExperience = props => {
161
164
  className: "try-experience-icon",
162
165
  src: imgSrc,
163
166
  mode: "heightFix"
164
- }))));
167
+ })));
165
168
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/ipc-player-integration",
3
- "version": "0.0.35-beta.14",
3
+ "version": "0.0.35-beta.15",
4
4
  "description": "IPC 融合播放器",
5
5
  "main": "lib/index",
6
6
  "files": [