@ray-js/ipc-player-integration 0.0.1-beta-21 → 0.0.1-beta-23

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.
Files changed (72) hide show
  1. package/lib/ctx/ctx.composition.js +19 -9
  2. package/lib/ctx/ctx.d.ts +5 -3
  3. package/lib/ctx/ctx.js +57 -28
  4. package/lib/ctx/store.d.ts +1 -1
  5. package/lib/ctx/store.js +1 -1
  6. package/lib/i18n/index.d.ts +28 -0
  7. package/lib/i18n/strings.d.ts +14 -0
  8. package/lib/i18n/strings.js +16 -2
  9. package/lib/interface.d.ts +18 -8
  10. package/lib/plugins/battery/battery.composition.d.ts +47 -5
  11. package/lib/plugins/battery/battery.composition.js +4 -0
  12. package/lib/plugins/battery/battery.js +9 -9
  13. package/lib/plugins/battery/battery.less +4 -14
  14. package/lib/plugins/battery/batteryFull.d.ts +13 -0
  15. package/lib/plugins/battery/batteryFull.js +46 -0
  16. package/lib/plugins/fullScreen/fullScreen.js +12 -10
  17. package/lib/plugins/fullScreen/fullScreen.less +9 -8
  18. package/lib/plugins/fullScreen/verticalScreen.d.ts +1 -1
  19. package/lib/plugins/fullScreen/verticalScreen.js +8 -5
  20. package/lib/plugins/fullScreen/verticalScreen.less +7 -12
  21. package/lib/plugins/fullScreen/voiceIntercom.js +2 -2
  22. package/lib/plugins/index.d.ts +3 -1
  23. package/lib/plugins/index.js +6 -2
  24. package/lib/plugins/muted/muted.js +4 -4
  25. package/lib/plugins/muted/muted.less +8 -1
  26. package/lib/plugins/ptz/ptz.js +13 -26
  27. package/lib/plugins/ptz/ptz.less +2 -7
  28. package/lib/plugins/ptz/ptzControl.d.ts +0 -1
  29. package/lib/plugins/ptz/ptzControl.js +76 -32
  30. package/lib/plugins/recordVideo/recordVideo.js +154 -26
  31. package/lib/plugins/recordVideo/recordVideo.less +63 -6
  32. package/lib/plugins/resolution/fullResolutionControl.js +2 -2
  33. package/lib/plugins/resolution/resolution.js +9 -3
  34. package/lib/plugins/resolution/resolution.less +5 -5
  35. package/lib/plugins/screenshot/screenshot.js +65 -14
  36. package/lib/plugins/screenshot/screenshot.less +25 -23
  37. package/lib/plugins/smallIntercom/index.d.ts +1 -0
  38. package/lib/plugins/smallIntercom/index.js +1 -0
  39. package/lib/plugins/smallIntercom/smallIntercom.d.ts +6 -0
  40. package/lib/plugins/smallIntercom/smallIntercom.js +49 -0
  41. package/lib/plugins/smallIntercom/smallIntercom.less +50 -0
  42. package/lib/plugins/tempHumidity/tempHumidity.d.ts +1 -1
  43. package/lib/plugins/tempHumidity/tempHumidity.js +12 -4
  44. package/lib/plugins/videoBitKBP/index.d.ts +1 -0
  45. package/lib/plugins/videoBitKBP/index.js +1 -0
  46. package/lib/plugins/{videoBitKbps/videoBitKbps.d.ts → videoBitKBP/videoBitKBP.d.ts} +2 -2
  47. package/lib/plugins/{videoBitKbps/videoBitKbps.js → videoBitKBP/videoBitKBP.js} +14 -7
  48. package/lib/plugins/{videoBitKbps/videoBitKbps.less → videoBitKBP/videoBitKBP.less} +4 -5
  49. package/lib/plugins/voiceIntercom/voiceIntercom.d.ts +1 -1
  50. package/lib/plugins/voiceIntercom/voiceIntercom.js +25 -18
  51. package/lib/ui/bottomLeftContent.d.ts +8 -0
  52. package/lib/ui/bottomLeftContent.js +33 -0
  53. package/lib/ui/bottomRightContent.d.ts +8 -0
  54. package/lib/ui/bottomRightContent.js +33 -0
  55. package/lib/ui/constant.d.ts +1 -0
  56. package/lib/ui/constant.js +2 -1
  57. package/lib/ui/hooks.d.ts +1 -1
  58. package/lib/ui/hooks.js +4 -3
  59. package/lib/ui/{bottomContent.d.ts → topLeftContent.d.ts} +2 -2
  60. package/lib/ui/{bottomContent.js → topLeftContent.js} +9 -8
  61. package/lib/ui/{topContent.d.ts → topRightContent.d.ts} +2 -2
  62. package/lib/ui/{topContent.js → topRightContent.js} +9 -8
  63. package/lib/ui/ui.d.ts +3 -0
  64. package/lib/ui/ui.js +115 -56
  65. package/lib/ui/ui.less +162 -25
  66. package/lib/utils/device/index.d.ts +6 -0
  67. package/lib/utils/device/index.js +52 -0
  68. package/lib/utils/index.d.ts +3 -0
  69. package/lib/utils/index.js +15 -0
  70. package/package.json +7 -9
  71. package/lib/plugins/videoBitKbps/index.d.ts +0 -1
  72. package/lib/plugins/videoBitKbps/index.js +0 -1
@@ -0,0 +1,50 @@
1
+ .ipc-player-plugin-small-intercom-icon {
2
+ color: var(--iconColor);
3
+ font-size: calc(var(--iconPlayerSize) * var(--ipc-player-size-scale, 1)) !important;
4
+ }
5
+ .ipc-player-plugin-screenshot-toast-wrap {
6
+ position: absolute;
7
+ // max-width: 300px;
8
+ // left: 50%;
9
+ // transform: translateX(-50%);
10
+ // top: calc(16px * var(--ipc-player-size-scale, 1));
11
+ }
12
+ .ipc-player-plugin-screenshot-toast {
13
+ border-radius: calc(8px * var(--ipc-player-size-scale, 1));;
14
+ background-color: var(--shot-card-bg-color);
15
+ display: flex;
16
+ align-items: center;
17
+ padding: calc(8px * var(--ipc-player-size-scale, 1)) calc(12px * var(--ipc-player-size-scale, 1));
18
+ z-index: 100;
19
+ .ipc-player-plugin-screenshot-toast-image-box {
20
+ border-radius: calc(4px * var(--ipc-player-size-scale, 1));
21
+ overflow: hidden;
22
+ width: calc(66px * var(--ipc-player-size-scale, 1));
23
+ height: calc(66px * 0.57 * var(--ipc-player-size-scale, 1));
24
+ }
25
+ .ipc-player-plugin-screenshot-toast-image {
26
+ width: 100%;
27
+ height: 100%;
28
+ object-fit: cover;
29
+ }
30
+ .ipc-player-plugin-screenshot-toast-title {
31
+ flex: 1;
32
+ margin-left: calc(12px * var(--ipc-player-size-scale, 1));
33
+ font-size: calc(14px * var(--ipc-player-size-scale, 1));
34
+ color: var(--fontColor);
35
+ margin-right: calc(12px * var(--ipc-player-size-scale, 1));
36
+ word-break: break-word;
37
+
38
+ }
39
+ .ipc-player-plugin-screenshot-toast-bottom {
40
+ border: 1px solid #1989FA;
41
+ min-width: calc(52px * var(--ipc-player-size-scale, 1));
42
+ max-width: calc(100px * var(--ipc-player-size-scale, 1));
43
+ border-radius: calc(4px * var(--ipc-player-size-scale, 1));
44
+ padding: calc(5px * var(--ipc-player-size-scale, 1)) calc(11px * var(--ipc-player-size-scale, 1));
45
+ font-size: calc(14px * var(--ipc-player-size-scale, 1));
46
+ white-space: nowrap;
47
+ overflow: hidden;
48
+ text-overflow: ellipsis;
49
+ }
50
+ }
@@ -4,5 +4,5 @@ import './tempHumidity.less';
4
4
  interface IProp extends ComponentConfigProps {
5
5
  className?: string;
6
6
  }
7
- export declare const TempHumidity: (props: IProp) => React.JSX.Element;
7
+ export declare const TempHumidity: (props: IProp) => React.JSX.Element | null;
8
8
  export {};
@@ -27,7 +27,7 @@ export const TempHumidity = props => {
27
27
  className: "ipc-player-plugin-tempHumidity-text-icon icon-panel icon-panel-temperature"
28
28
  }), /*#__PURE__*/React.createElement(Text, null, tempC));
29
29
  }
30
- return /*#__PURE__*/React.createElement(React.Fragment, null);
30
+ return null;
31
31
  };
32
32
  const humRender = () => {
33
33
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
@@ -36,8 +36,16 @@ export const TempHumidity = props => {
36
36
  className: "tempHumidity"
37
37
  }, `${humidity}`));
38
38
  };
39
- return /*#__PURE__*/React.createElement(React.Fragment, null, (tempC || tempF || humidity) && /*#__PURE__*/React.createElement(View, {
40
- className: clsx('ipc-player-plugin-tempHumidity', className)
39
+ console.log(tempC, tempF, humidity);
40
+
41
+ // 当无值时返回null
42
+ if (!tempC && !tempF && !humidity) {
43
+ return null;
44
+ }
45
+ return /*#__PURE__*/React.createElement(View, {
46
+ className: clsx(className)
47
+ }, /*#__PURE__*/React.createElement(View, {
48
+ className: clsx('ipc-player-plugin-tempHumidity')
41
49
  }, (() => {
42
50
  if ((tempC || tempUnit === '1' && tempF) && humidity) {
43
51
  return /*#__PURE__*/React.createElement(React.Fragment, null, tempRender(), /*#__PURE__*/React.createElement(Text, {
@@ -50,6 +58,6 @@ export const TempHumidity = props => {
50
58
  if (humidity) {
51
59
  return /*#__PURE__*/React.createElement(React.Fragment, null, humRender());
52
60
  }
53
- return /*#__PURE__*/React.createElement(React.Fragment, null);
61
+ return null;
54
62
  })()));
55
63
  };
@@ -0,0 +1 @@
1
+ export * from './videoBitKBP';
@@ -0,0 +1 @@
1
+ export * from './videoBitKBP';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import './videoBitKbps.less';
3
2
  import { ComponentConfigProps } from '../../interface';
3
+ import './videoBitKBP.less';
4
4
  type Props = ComponentConfigProps;
5
- export declare const VideoBitKbps: (props: Props) => React.JSX.Element;
5
+ export declare const VideoBitKBP: (props: Props) => React.JSX.Element | null;
6
6
  export {};
@@ -1,15 +1,17 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { View } from '@ray-js/ray';
3
- import './videoBitKbps.less';
3
+ import clsx from 'clsx';
4
4
  import IpcUtils from '@ray-js/ray-ipc-utils';
5
5
  import { PlayState } from '../../interface';
6
+ import './videoBitKBP.less';
6
7
  import { useStore } from '../../ctx/store';
7
- export const VideoBitKbps = props => {
8
+ export const VideoBitKBP = props => {
8
9
  const {
9
10
  devId,
10
- playState
11
+ playState,
12
+ className
11
13
  } = props;
12
- const [bitKbps, setBitKbps] = useState('');
14
+ const [bitKBP, setBitKBP] = useState('');
13
15
  const store = useStore({
14
16
  playState
15
17
  });
@@ -28,10 +30,15 @@ export const VideoBitKbps = props => {
28
30
  const init = async () => {
29
31
  const res = await IpcUtils.getVideoBitrateKbps(devId);
30
32
  if (res.code !== -1) {
31
- setBitKbps(`${res.data.kbps}KB/S`);
33
+ setBitKBP(`${res.data.kbps}KB/S`);
32
34
  }
33
35
  };
36
+ if (bitKBP === '') {
37
+ return null;
38
+ }
34
39
  return /*#__PURE__*/React.createElement(View, {
35
- className: "ipc-player-plugin-videoBitKbps"
36
- }, bitKbps);
40
+ className: clsx(className)
41
+ }, /*#__PURE__*/React.createElement(View, {
42
+ className: "ipc-player-plugin-videoBitKBP"
43
+ }, bitKBP));
37
44
  };
@@ -1,12 +1,11 @@
1
- .ipc-player-plugin-videoBitKbps {
1
+ .ipc-player-plugin-videoBitKBP {
2
2
  display: flex;
3
3
  align-items: center;
4
4
  height: calc(24px * var(--ipc-player-size-scale, 1));
5
- padding: 0 calc(8px * var(--ipc-player-size-scale, 1));
5
+ padding: 0 calc(9px * var(--ipc-player-size-scale, 1));
6
6
  border-radius: calc(24px * var(--ipc-player-size-scale, 1));
7
- opacity: 1;
8
- background: rgba(255, 255, 255, 0.1);
9
- backdrop-filter: blur(10px);
10
7
  color: var(--iconColor);
11
8
  font-size: calc(12px * var(--ipc-player-size-scale, 1));
9
+ background-color: rgba(255, 255, 255, 0.3);
10
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
12
11
  }
@@ -9,5 +9,5 @@ type Props = ComponentConfigProps & {
9
9
  onTouchStart?: TouchEventHandler['onTouchStart'];
10
10
  onTouchEnd?: TouchEventHandler['onTouchEnd'];
11
11
  };
12
- export declare function VoiceIntercom({ style, className, iconClassName, recording: recordingAtom, intercom: intercomAtom, intercomMode: intercomModeAtom, setIntercom, mute: muteAtom, setMute, getStreamStatus, onTouchStart, onTouchEnd, }: Props): React.JSX.Element;
12
+ export declare const VoiceIntercom: (props: Props) => React.JSX.Element;
13
13
  export {};
@@ -7,34 +7,39 @@ import { useStore, getDefaultStore } from '../../ctx/store';
7
7
  import './voiceIntercom.less';
8
8
  import { PlayerStreamStatus, IntercomMode } from '../../interface';
9
9
  import { UIEventContext } from '../../ui/context';
10
+ import { radialGradient } from '../../utils';
10
11
  import { startTimeToHideAllComponent, pauseTimeToHideAllComponent } from '../../ui/constant';
11
12
  const NILL = () => null;
12
- export function VoiceIntercom(_ref) {
13
- let {
13
+ export const VoiceIntercom = props => {
14
+ const {
14
15
  style,
15
16
  className,
16
17
  iconClassName,
17
- recording: recordingAtom,
18
- intercom: intercomAtom,
19
- intercomMode: intercomModeAtom,
18
+ // recording: recordingAtom,
19
+ // intercom: intercomAtom,
20
+ // intercomMode: intercomModeAtom,
20
21
  setIntercom,
21
- mute: muteAtom,
22
+ // mute: muteAtom,
22
23
  setMute,
23
24
  getStreamStatus,
24
25
  onTouchStart = NILL,
25
26
  onTouchEnd = NILL
26
- } = _ref;
27
+ } = props;
27
28
  const {
28
29
  event
29
30
  } = useContext(UIEventContext);
30
31
  const {
32
+ recording,
31
33
  mute,
32
34
  intercom,
33
- intercomMode
35
+ intercomMode,
36
+ brandColor
34
37
  } = useStore({
35
- mute: muteAtom,
36
- intercom: intercomAtom,
37
- intercomMode: intercomModeAtom
38
+ recording: props.recording,
39
+ mute: props.mute,
40
+ intercom: props.intercom,
41
+ intercomMode: props.intercomMode,
42
+ brandColor: props.brandColor
38
43
  });
39
44
  // 对讲开始之前的静音状态
40
45
  const originMuteStatusBeforeVoice = useRef(mute);
@@ -70,17 +75,19 @@ export function VoiceIntercom(_ref) {
70
75
  event.emit(startTimeToHideAllComponent);
71
76
  };
72
77
  return /*#__PURE__*/React.createElement(View, {
73
- style: _objectSpread({}, style),
78
+ style: _objectSpread(_objectSpread({}, style), {
79
+ background: radialGradient(brandColor)
80
+ }),
74
81
  className: clsx('ipc-player-plugin-voice-intercom', className),
75
82
  onTouchStart: async e => {
76
83
  onTouchStart(e);
77
- const store = getDefaultStore();
84
+ getDefaultStore();
78
85
  if (loading.current) return;
79
86
  loading.current = true;
80
- const _intercom = store.get(intercomAtom);
81
- const _recording = store.get(recordingAtom);
82
- const target = !_intercom;
83
- if (target && _recording) {
87
+ // const _intercom = store.get(intercomAtom);
88
+ // const _recording = store.get(recordingAtom);
89
+ const target = !intercom;
90
+ if (target && recording) {
84
91
  console.log('录制中,无法对讲');
85
92
  loading.current = false;
86
93
  return;
@@ -104,4 +111,4 @@ export function VoiceIntercom(_ref) {
104
111
  }) : /*#__PURE__*/React.createElement(View, {
105
112
  className: clsx('icon-panel', 'icon-panel-one-way-intercom', 'intercom-default-icon', iconClassName)
106
113
  }));
107
- }
114
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { UseCtx } from '../interface';
3
+ type Props = {
4
+ ctx: ReturnType<UseCtx>;
5
+ children: React.ReactNode;
6
+ };
7
+ declare const BottomLeftContent: ({ ctx, children }: Props) => React.JSX.Element;
8
+ export default BottomLeftContent;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { CoverView, View } from '@ray-js/ray';
3
+ import clsx from 'clsx';
4
+ import { useStore } from '../ctx/store';
5
+ import { useComponentHideState } from './hooks';
6
+ const BottomLeftContent = _ref => {
7
+ let {
8
+ ctx,
9
+ children
10
+ } = _ref;
11
+ const {
12
+ screenType,
13
+ fullResolutionActive
14
+ } = useStore({
15
+ screenType: ctx.screenType,
16
+ playState: ctx.playState,
17
+ fullResolutionActive: ctx.fullResolutionActive
18
+ });
19
+ const [shouldHide] = useComponentHideState(screenType);
20
+ return /*#__PURE__*/React.createElement(CoverView, {
21
+ className: clsx('ipc-player-bottom-left-content-wrap')
22
+ }, /*#__PURE__*/React.createElement(View, {
23
+ style: {
24
+ paddingBottom: screenType === 'vertical' ? '14px' : '20px',
25
+ paddingLeft: screenType === 'vertical' ? 0 : '25px'
26
+ },
27
+ className: clsx('ipc-player-bottom-left-content-container', {
28
+ 'ipc-player-bottom-left-content-hide': shouldHide || fullResolutionActive,
29
+ 'ipc-player-bottom-left-content-show': !shouldHide && !fullResolutionActive
30
+ })
31
+ }, children));
32
+ };
33
+ export default BottomLeftContent;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { UseCtx } from '../interface';
3
+ type Props = {
4
+ ctx: ReturnType<UseCtx>;
5
+ children: React.ReactNode;
6
+ };
7
+ declare const BottomRightContent: ({ ctx, children }: Props) => React.JSX.Element;
8
+ export default BottomRightContent;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { CoverView, View } from '@ray-js/ray';
3
+ import clsx from 'clsx';
4
+ import { useStore } from '../ctx/store';
5
+ import { useComponentHideState } from './hooks';
6
+ const BottomRightContent = _ref => {
7
+ let {
8
+ ctx,
9
+ children
10
+ } = _ref;
11
+ const {
12
+ screenType,
13
+ fullResolutionActive
14
+ } = useStore({
15
+ screenType: ctx.screenType,
16
+ playState: ctx.playState,
17
+ fullResolutionActive: ctx.fullResolutionActive
18
+ });
19
+ const [shouldHide] = useComponentHideState(screenType);
20
+ return /*#__PURE__*/React.createElement(CoverView, {
21
+ className: clsx('ipc-player-bottom-right-content-wrap')
22
+ }, /*#__PURE__*/React.createElement(View, {
23
+ style: {
24
+ paddingBottom: screenType === 'vertical' ? '14px' : '20px',
25
+ paddingRight: screenType === 'vertical' ? 0 : '25px'
26
+ },
27
+ className: clsx('ipc-player-bottom-right-content-container', {
28
+ 'ipc-player-bottom-right-content-hide': shouldHide || fullResolutionActive,
29
+ 'ipc-player-bottom-right-content-show': !shouldHide && !fullResolutionActive
30
+ })
31
+ }, children));
32
+ };
33
+ export default BottomRightContent;
@@ -7,3 +7,4 @@ export declare const voiceIntercomId = "voiceIntercomId";
7
7
  export declare const verticalScreenId = "verticalScreenId";
8
8
  export declare const ptzControlId = "ptzControlId";
9
9
  export declare const fullResolutionId = "fullResolutionId";
10
+ export declare const batteryId = "Battery";
@@ -6,4 +6,5 @@ export const startTimeToHideAllComponent = 'startTimeToHideAllComponent';
6
6
  export const voiceIntercomId = 'voiceIntercomId';
7
7
  export const verticalScreenId = 'verticalScreenId';
8
8
  export const ptzControlId = 'ptzControlId';
9
- export const fullResolutionId = 'fullResolutionId';
9
+ export const fullResolutionId = 'fullResolutionId';
10
+ export const batteryId = 'Battery';
package/lib/ui/hooks.d.ts CHANGED
@@ -1 +1 @@
1
- export declare function useComponentHideState(screenType: any): boolean[];
1
+ export declare const useComponentHideState: (screenType: any) => boolean[];
package/lib/ui/hooks.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import { useContext, useState, useEffect } from 'react';
2
2
  import { UIEventContext } from './context';
3
3
  import { hideAllComponent, showAllComponent } from './constant';
4
- export function useComponentHideState(screenType) {
4
+ export const useComponentHideState = () => {
5
5
  const {
6
6
  event
7
7
  } = useContext(UIEventContext);
8
8
  const [shouldHide, setShouldHide] = useState(false);
9
9
  const listenHideEvent = () => {
10
- if (screenType === 'vertical') return;
10
+ // 横竖屏都支持点击隐藏
11
+ // if (screenType === 'vertical') return;
11
12
  setShouldHide(true);
12
13
  };
13
14
  const listenShowEvent = () => {
@@ -22,4 +23,4 @@ export function useComponentHideState(screenType) {
22
23
  };
23
24
  }, [listenHideEvent]);
24
25
  return [shouldHide];
25
- }
26
+ };
@@ -4,5 +4,5 @@ type Props = {
4
4
  ctx: ReturnType<UseCtx>;
5
5
  children: React.ReactNode;
6
6
  };
7
- export declare function BottomContent({ ctx, children }: Props): React.JSX.Element;
8
- export {};
7
+ declare const TopLeftContent: ({ ctx, children }: Props) => React.JSX.Element;
8
+ export default TopLeftContent;
@@ -3,7 +3,7 @@ import { CoverView, View } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
4
  import { useStore } from '../ctx/store';
5
5
  import { useComponentHideState } from './hooks';
6
- export function BottomContent(_ref) {
6
+ const TopLeftContent = _ref => {
7
7
  let {
8
8
  ctx,
9
9
  children
@@ -18,15 +18,16 @@ export function BottomContent(_ref) {
18
18
  });
19
19
  const [shouldHide] = useComponentHideState(screenType);
20
20
  return /*#__PURE__*/React.createElement(CoverView, {
21
- className: "ipc-player-bottom-content-warp"
21
+ className: clsx('ipc-player-top-left-content-wrap')
22
22
  }, /*#__PURE__*/React.createElement(View, {
23
23
  style: {
24
- // @ts-ignore
25
- '--height': screenType === 'vertical' ? '48px' : '69px',
26
- '--gap': '25px'
24
+ paddingTop: screenType === 'vertical' ? '12px' : '16px',
25
+ paddingLeft: screenType === 'vertical' ? 0 : '25px'
27
26
  },
28
- className: clsx('ipc-player-content-item', 'ipc-player-bottom-content', {
29
- 'ipc-player-bottom-content-hide': shouldHide || fullResolutionActive
27
+ className: clsx('ipc-player-top-left-content-container', {
28
+ 'ipc-player-top-left-content-hide': shouldHide || fullResolutionActive,
29
+ 'ipc-player-top-left-content-show': !shouldHide && !fullResolutionActive
30
30
  })
31
31
  }, children));
32
- }
32
+ };
33
+ export default TopLeftContent;
@@ -4,5 +4,5 @@ type Props = {
4
4
  ctx: ReturnType<UseCtx>;
5
5
  children: React.ReactNode;
6
6
  };
7
- export declare function TopContent({ ctx, children }: Props): React.JSX.Element;
8
- export {};
7
+ declare const TopRightContent: ({ ctx, children }: Props) => React.JSX.Element;
8
+ export default TopRightContent;
@@ -3,7 +3,7 @@ import { CoverView, View } from '@ray-js/ray';
3
3
  import clsx from 'clsx';
4
4
  import { useStore } from '../ctx/store';
5
5
  import { useComponentHideState } from './hooks';
6
- export function TopContent(_ref) {
6
+ const TopRightContent = _ref => {
7
7
  let {
8
8
  ctx,
9
9
  children
@@ -18,15 +18,16 @@ export function TopContent(_ref) {
18
18
  });
19
19
  const [shouldHide] = useComponentHideState(screenType);
20
20
  return /*#__PURE__*/React.createElement(CoverView, {
21
- className: "ipc-player-top-content-warp"
21
+ className: clsx('ipc-player-top-right-content-wrap')
22
22
  }, /*#__PURE__*/React.createElement(View, {
23
23
  style: {
24
- // @ts-ignore
25
- '--height': screenType === 'vertical' ? '48px' : '69px',
26
- '--gap': '16px'
24
+ paddingTop: screenType === 'vertical' ? '12px' : '16px',
25
+ paddingRight: screenType === 'vertical' ? 0 : '25px'
27
26
  },
28
- className: clsx('ipc-player-content-item', 'ipc-player-top-content', {
29
- 'ipc-player-top-content-hide': shouldHide || fullResolutionActive
27
+ className: clsx('ipc-player-top-right-content-container', {
28
+ 'ipc-player-top-right-content-hide': shouldHide || fullResolutionActive,
29
+ 'ipc-player-top-right-content-show': !shouldHide && !fullResolutionActive
30
30
  })
31
31
  }, children));
32
- }
32
+ };
33
+ export default TopRightContent;
package/lib/ui/ui.d.ts CHANGED
@@ -6,7 +6,10 @@ type CSSVariable = {
6
6
  '--iconColor': string;
7
7
  '--iconActiveColor': string;
8
8
  '--iconFontSize': string;
9
+ '--iconPlayerSize': string;
10
+ '--iconBoxSize': string;
9
11
  '--bg-color': string;
12
+ '--shot-card-bg-color': string;
10
13
  '--fontColor': string;
11
14
  '--fontSize': string;
12
15
  };