@ray-js/adapter 1.6.0-beta.8 → 1.6.0

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.
@@ -19,23 +19,131 @@ export interface IpcPlayerProps extends BaseProps, DiffLayer {
19
19
  borderColor?: string;
20
20
  borderRadius?: number | string;
21
21
  backgroundColor?: string;
22
+ /**
23
+ * 当连接状态发生变化时触发,detail = { state }, state: 0 表示连接成功
24
+ * @param event
25
+ * @param event.state 连接状态
26
+ * @deprecated 请使用 onConnectChange
27
+ */
22
28
  onConnectchange?: (event: {
23
29
  state: number;
24
30
  }) => void;
31
+ /**
32
+ * 当预览状态发生变化时触发,detail = { state }, state: 1 表示开始预览成功, state: 0 表示结束预览成功
33
+ * @param event
34
+ * @param event.state 预览状态
35
+ * @deprecated 请使用 onPreviewChange
36
+ */
25
37
  onPreviewchange?: (event: {
26
38
  state: number;
27
39
  }) => void;
40
+ /**
41
+ * 当 ipc 设备在线状态变化时触发,detail = { online }, online: true 表示在线, online: false 表示离线或断电
42
+ * @param event
43
+ * @param event.online 在线状态
44
+ * @deprecated 请使用 onOnlineChange
45
+ */
28
46
  onOnlinechange?: (event: {
29
47
  online: boolean;
30
48
  }) => void;
49
+ /**
50
+ * 初始化完成时触发
51
+ * @deprecated 请使用 onInitDone
52
+ */
31
53
  onInitdone?: () => void;
54
+ /**
55
+ * 视频缩放比例及当前倍数变化,detail = { zoomLevel }, zoomLevel 为缩放比例
56
+ * @param event
57
+ * @param event.zoomLevel 缩放比例
58
+ * @deprecated 请使用 onZoomChange
59
+ */
32
60
  onZoomchange?: (event: {
33
61
  zoomLevel: number;
34
62
  }) => void;
63
+ /**
64
+ * 点击视频时触发
65
+ * @deprecated 请使用 onVideoTap
66
+ */
35
67
  onVideotap?: () => void;
68
+ /**
69
+ * 当连接状态发生变化时触发,detail = { state }, state: 0 表示连接成功
70
+ * @param event
71
+ * @param event.state 连接状态
72
+ */
73
+ onConnectChange?: (event: {
74
+ state: number;
75
+ }) => void;
76
+ /**
77
+ * 当预览状态发生变化时触发,detail = { state }, state: 1 表示开始预览成功, state: 0 表示结束预览成功
78
+ * @param event
79
+ * @param event.state 预览状态
80
+ */
81
+ onPreviewChange?: (event: {
82
+ state: number;
83
+ }) => void;
84
+ /**
85
+ * 当 ipc 设备在线状态变化时触发,detail = { online }, online: true 表示在线, online: false 表示离线或断电
86
+ * @param event
87
+ * @param event.online 在线状态
88
+ */
89
+ onOnlineChange?: (event: {
90
+ online: boolean;
91
+ }) => void;
92
+ /**
93
+ * 初始化完成时触发
94
+ */
95
+ onInitDone?: () => void;
96
+ /**
97
+ * 视频缩放比例及当前倍数变化,detail = { zoomLevel }, zoomLevel 为缩放比例
98
+ * @param event
99
+ * @param event.zoomLevel 缩放比例
100
+ */
101
+ onZoomChange?: (event: {
102
+ zoomLevel: number;
103
+ }) => void;
104
+ /**
105
+ * 点击视频时触发
106
+ */
107
+ onVideoTap?: () => void;
108
+ /**
109
+ * 当状态异层时触发 error 事件,detail = { "errCode": 错误码 , "errMsg": 错误描述 }
110
+ * @param event
111
+ * @param event.errCode 错误码
112
+ * @param event.errMsg 错误描述
113
+ */
36
114
  onError?: (event: {
37
115
  errCode: number | string;
38
116
  errMsg: string;
39
117
  }) => void;
118
+ /**
119
+ * 断开连接
120
+ * @param event
121
+ * @param event.errCode 错误码
122
+ * @param event.devId 设备id
123
+ */
124
+ onSessionDidDisconnected?: (event: {
125
+ errCode: number;
126
+ devId: string;
127
+ }) => void;
128
+ /**
129
+ * 预览失败
130
+ * @param event
131
+ * @param event.errCode 错误码
132
+ * @param event.devId 设备id
133
+ */
134
+ onCameraPreviewFailure?: (event: {
135
+ errCode: number;
136
+ devId: string;
137
+ }) => void;
138
+ /**
139
+ * 弱网通知
140
+ * @param event
141
+ * @param event.netValue 网络值
142
+ * @param event.devId 设备id
143
+ */
144
+ onCameraNotifyWeakNetwork?: (event: {
145
+ netValue: number;
146
+ devId: string;
147
+ }) => void;
40
148
  }
41
149
  export declare const IpcPlayer: React.ComponentType<IpcPlayerProps>;
@@ -27,8 +27,17 @@ export declare const alias: {
27
27
  onOnlinechange: string;
28
28
  onZoomchange: string;
29
29
  onVideotap: string;
30
+ onConnectChange: string;
31
+ onPreviewChange: string;
32
+ onInitDone: string;
33
+ onOnlineChange: string;
34
+ onZoomChange: string;
35
+ onVideoTap: string;
30
36
  onError: string;
31
37
  updateLayout: string;
38
+ onSessionDidDisconnected: string;
39
+ onCameraPreviewFailure: string;
40
+ onCameraNotifyWeakNetwork: string;
32
41
  disableScroll: string;
33
42
  hoverClass: string;
34
43
  hoverClassName: string;
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.props = exports.alias = void 0;
4
4
  const universal_1 = require("../universal");
5
- exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { className: 'class', animation: 'animation', style: 'style', id: 'id', deviceId: 'device-id', autoplay: 'autoplay', muted: 'muted', clarity: 'clarity', soundMode: 'sound-mode', orientation: 'orientation', objectFit: 'object-fit', autoPauseIfNavigate: 'auto-pause-if-navigate', autoPauseIfOpenNative: 'auto-pause-if-open-native', rotateZ: 'rotate-z', scalable: 'scalable', scaleMultiple: 'scale-multiple', ptzControllable: 'ptz-controllable', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', backgroundColor: 'background-color', onConnectchange: 'bind:connectchange', onPreviewchange: 'bind:previewchange', onInitdone: 'bind:initdone', onOnlinechange: 'bind:onlinechange', onZoomchange: 'bind:zoomchange', onVideotap: 'bind:videotap', onError: 'bind:error', updateLayout: 'update-layout' });
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { className: 'class', animation: 'animation', style: 'style', id: 'id', deviceId: 'device-id', autoplay: 'autoplay', muted: 'muted', clarity: 'clarity', soundMode: 'sound-mode', orientation: 'orientation', objectFit: 'object-fit', autoPauseIfNavigate: 'auto-pause-if-navigate', autoPauseIfOpenNative: 'auto-pause-if-open-native', rotateZ: 'rotate-z', scalable: 'scalable', scaleMultiple: 'scale-multiple', ptzControllable: 'ptz-controllable', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', backgroundColor: 'background-color', onConnectchange: 'bind:connectchange', onPreviewchange: 'bind:previewchange', onInitdone: 'bind:initdone', onOnlinechange: 'bind:onlinechange', onZoomchange: 'bind:zoomchange', onVideotap: 'bind:videotap', onConnectChange: 'bind:connectchange', onPreviewChange: 'bind:previewchange', onInitDone: 'bind:initdone', onOnlineChange: 'bind:onlinechange', onZoomChange: 'bind:zoomchange', onVideoTap: 'bind:videotap', onError: 'bind:error', updateLayout: 'update-layout', onSessionDidDisconnected: 'bind:sessionDidDisconnected', onCameraPreviewFailure: 'bind:cameraPreviewFailure', onCameraNotifyWeakNetwork: 'bind:cameraNotifyWeakNetwork' });
6
6
  exports.props = Object.values(exports.alias);
@@ -9,23 +9,64 @@ export interface ScrollViewProps extends BaseProps {
9
9
  scrollLeft?: number | string;
10
10
  scrollIntoView?: string;
11
11
  scrollWithAnimation?: boolean;
12
- onScroll?: (event: GenericEvent) => void;
13
- onScrollToUpper?: (event: GenericEvent) => void;
14
- onScrollToLower?: (event: GenericEvent) => void;
12
+ onScroll?: (event: GenericEvent & {
13
+ type: 'scroll';
14
+ scrollLeft: number;
15
+ scrollTop: number;
16
+ scrollHeight: number;
17
+ scrollWidth: number;
18
+ deltaX: number;
19
+ deltaY: number;
20
+ origin: any;
21
+ }) => void;
22
+ onScrollToUpper?: (event: GenericEvent & {
23
+ type: 'scrolltoupper';
24
+ direction: 'top' | 'left';
25
+ origin: any;
26
+ }) => void;
27
+ onScrollToLower?: (event: GenericEvent & {
28
+ type: 'scrolltolower';
29
+ direction: 'bottom' | 'right';
30
+ origin: any;
31
+ }) => void;
15
32
  enableBackToTop?: boolean;
16
33
  enableFlex?: boolean;
17
34
  refresherEnabled?: boolean;
18
35
  refresherThreshold?: number;
19
36
  refresherDefaultStyle?: string;
20
37
  refresherBackground?: string;
21
- refresherTriggered: boolean;
22
- onRefresherPulling?: (event: GenericEvent) => void;
23
- onRefresherpulling?: (event: GenericEvent) => void;
24
- onRefresherRefresh?: (event: GenericEvent) => void;
25
- onRefresherrefresh?: (event: GenericEvent) => void;
26
- onRefresherRestore?: (event: GenericEvent) => void;
27
- onRefresherrestore?: (event: GenericEvent) => void;
28
- onRefresherAbort?: (event: GenericEvent) => void;
29
- onRefresherabort?: (event: GenericEvent) => void;
38
+ refresherTriggered?: boolean;
39
+ onRefresherPulling?: (event: GenericEvent & {
40
+ type: 'refresherpulling';
41
+ origin: any;
42
+ }) => void;
43
+ onRefresherpulling?: (event: GenericEvent & {
44
+ type: 'refresherpulling';
45
+ origin: any;
46
+ }) => void;
47
+ onRefresherRefresh?: (event: GenericEvent & {
48
+ type: 'refresherrefresh';
49
+ origin: any;
50
+ }) => void;
51
+ onRefresherrefresh?: (event: GenericEvent & {
52
+ type: 'refresherrefresh';
53
+ origin: any;
54
+ }) => void;
55
+ onRefresherRestore?: (event: GenericEvent & {
56
+ type: 'refresherrestore';
57
+ origin: any;
58
+ }) => void;
59
+ onRefresherrestore?: (event: GenericEvent & {
60
+ type: 'refresherrestore';
61
+ origin: any;
62
+ }) => void;
63
+ onRefresherAbort?: (event: GenericEvent & {
64
+ type: 'refresherabort';
65
+ origin: any;
66
+ }) => void;
67
+ onRefresherabort?: (event: GenericEvent & {
68
+ type: 'refresherabort';
69
+ origin: any;
70
+ }) => void;
30
71
  }
31
72
  export declare const ScrollView: React.ComponentType<ScrollViewProps>;
@@ -28,16 +28,19 @@ export interface VideoProps {
28
28
  onPause?: (event: any) => void;
29
29
  onEnded?: (event: any) => void;
30
30
  onTimeUpdate?: (event: any) => void;
31
+ onTimeupdate?: (event: any) => void;
31
32
  onWaiting?: (event: any) => void;
32
33
  onError?: (event: any) => void;
33
34
  onProgress?: (event: any) => void;
34
35
  onLoadedMetadata?: (event: any) => void;
36
+ onLoadedmetadata?: (event: any) => void;
35
37
  onCanplay?: (event: any) => void;
36
38
  onCanplayThrough?: (event: any) => void;
37
39
  onPlaying?: (event: any) => void;
38
40
  onRateChange?: (event: any) => void;
39
41
  onVolumeChange?: (event: any) => void;
40
42
  onSeekComplete?: (event: any) => void;
43
+ onSeekcomplete?: (event: any) => void;
41
44
  /** 非可视区域是否自动暂停 */
42
45
  autoPause?: boolean;
43
46
  /** 指定视频 border-radius */
@@ -22,16 +22,19 @@ export declare const alias: {
22
22
  onPause: string;
23
23
  onEnded: string;
24
24
  onTimeUpdate: string;
25
+ onTimeupdate: string;
25
26
  onWaiting: string;
26
27
  onError: string;
27
28
  onProgress: string;
28
29
  onLoadedMetadata: string;
30
+ onLoadedmetadata: string;
29
31
  onCanplay: string;
30
32
  onCanplayThrough: string;
31
33
  onPlaying: string;
32
34
  onRateChange: string;
33
35
  onVolumeChange: string;
34
36
  onSeekComplete: string;
37
+ onSeekcomplete: string;
35
38
  autoPause: string;
36
39
  borderRadius: string;
37
40
  disableScroll: string;
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.props = exports.alias = void 0;
4
4
  const shared_1 = require("@ray-core/shared");
5
5
  const universal_1 = require("../universal");
6
- exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { id: 'id', className: 'class', style: 'style', src: 'src', duration: 'duration', controls: 'controls', danmuList: 'danmu-list', danmuBtn: 'danmu-btn', enableDanmu: 'enable-danmu', autoplay: 'autoplay', loop: 'loop', muted: 'muted', initialTime: 'initial-time', showFullscreenBtn: 'show-fullscreen-btn', showPlayBtn: 'show-play-btn', showCenterPlayBtn: 'show-center-play-btn', objectFit: 'object-fit', poster: 'poster', showMuteBtn: 'show-mute-btn', onPlay: 'bindplay', onPause: 'bindpause', onEnded: 'bindended', onTimeUpdate: 'bindtimeupdate', onWaiting: 'bindwaiting', onError: 'binderror', onProgress: 'bindprogress', onLoadedMetadata: 'bindloadedmetadata', onCanplay: 'bindcanplay', onCanplayThrough: 'bindcanplaythrough', onPlaying: 'bindplaying', onRateChange: 'bindratechange', onVolumeChange: 'bindvolumechange', onSeekComplete: 'bindseekcomplete', autoPause: 'auto-pause', borderRadius: 'border-radius' });
6
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { id: 'id', className: 'class', style: 'style', src: 'src', duration: 'duration', controls: 'controls', danmuList: 'danmu-list', danmuBtn: 'danmu-btn', enableDanmu: 'enable-danmu', autoplay: 'autoplay', loop: 'loop', muted: 'muted', initialTime: 'initial-time', showFullscreenBtn: 'show-fullscreen-btn', showPlayBtn: 'show-play-btn', showCenterPlayBtn: 'show-center-play-btn', objectFit: 'object-fit', poster: 'poster', showMuteBtn: 'show-mute-btn', onPlay: 'bindplay', onPause: 'bindpause', onEnded: 'bindended', onTimeUpdate: 'bindtimeupdate', onTimeupdate: 'bindtimeupdate', onWaiting: 'bindwaiting', onError: 'binderror', onProgress: 'bindprogress', onLoadedMetadata: 'bindloadedmetadata', onLoadedmetadata: 'bindloadedmetadata', onCanplay: 'bindcanplay', onCanplayThrough: 'bindcanplaythrough', onPlaying: 'bindplaying', onRateChange: 'bindratechange', onVolumeChange: 'bindvolumechange', onSeekComplete: 'bindseekcomplete', onSeekcomplete: 'bindseekcomplete', autoPause: 'auto-pause', borderRadius: 'border-radius' });
7
7
  exports.props = (0, shared_1.unique)(Object.values(exports.alias));
@@ -16,6 +16,7 @@ export interface ViewProps extends BaseProps {
16
16
  onTouchEnd?: (event: TouchEvent) => any;
17
17
  onTouchCancel?: (event: TouchEvent) => any;
18
18
  onLongClick?: (event: TouchEvent) => any;
19
+ onLongPress?: (event: TouchEvent) => any;
19
20
  onTransitionEnd?: (event: any) => any;
20
21
  onAnimationIteration?: (event: any) => any;
21
22
  onAnimationStart?: (event: any) => any;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  const Button = __importStar(require("./Button/node"));
27
37
  const Canvas = __importStar(require("./Canvas/node"));
package/cjs/node/index.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -19,23 +19,131 @@ export interface IpcPlayerProps extends BaseProps, DiffLayer {
19
19
  borderColor?: string;
20
20
  borderRadius?: number | string;
21
21
  backgroundColor?: string;
22
+ /**
23
+ * 当连接状态发生变化时触发,detail = { state }, state: 0 表示连接成功
24
+ * @param event
25
+ * @param event.state 连接状态
26
+ * @deprecated 请使用 onConnectChange
27
+ */
22
28
  onConnectchange?: (event: {
23
29
  state: number;
24
30
  }) => void;
31
+ /**
32
+ * 当预览状态发生变化时触发,detail = { state }, state: 1 表示开始预览成功, state: 0 表示结束预览成功
33
+ * @param event
34
+ * @param event.state 预览状态
35
+ * @deprecated 请使用 onPreviewChange
36
+ */
25
37
  onPreviewchange?: (event: {
26
38
  state: number;
27
39
  }) => void;
40
+ /**
41
+ * 当 ipc 设备在线状态变化时触发,detail = { online }, online: true 表示在线, online: false 表示离线或断电
42
+ * @param event
43
+ * @param event.online 在线状态
44
+ * @deprecated 请使用 onOnlineChange
45
+ */
28
46
  onOnlinechange?: (event: {
29
47
  online: boolean;
30
48
  }) => void;
49
+ /**
50
+ * 初始化完成时触发
51
+ * @deprecated 请使用 onInitDone
52
+ */
31
53
  onInitdone?: () => void;
54
+ /**
55
+ * 视频缩放比例及当前倍数变化,detail = { zoomLevel }, zoomLevel 为缩放比例
56
+ * @param event
57
+ * @param event.zoomLevel 缩放比例
58
+ * @deprecated 请使用 onZoomChange
59
+ */
32
60
  onZoomchange?: (event: {
33
61
  zoomLevel: number;
34
62
  }) => void;
63
+ /**
64
+ * 点击视频时触发
65
+ * @deprecated 请使用 onVideoTap
66
+ */
35
67
  onVideotap?: () => void;
68
+ /**
69
+ * 当连接状态发生变化时触发,detail = { state }, state: 0 表示连接成功
70
+ * @param event
71
+ * @param event.state 连接状态
72
+ */
73
+ onConnectChange?: (event: {
74
+ state: number;
75
+ }) => void;
76
+ /**
77
+ * 当预览状态发生变化时触发,detail = { state }, state: 1 表示开始预览成功, state: 0 表示结束预览成功
78
+ * @param event
79
+ * @param event.state 预览状态
80
+ */
81
+ onPreviewChange?: (event: {
82
+ state: number;
83
+ }) => void;
84
+ /**
85
+ * 当 ipc 设备在线状态变化时触发,detail = { online }, online: true 表示在线, online: false 表示离线或断电
86
+ * @param event
87
+ * @param event.online 在线状态
88
+ */
89
+ onOnlineChange?: (event: {
90
+ online: boolean;
91
+ }) => void;
92
+ /**
93
+ * 初始化完成时触发
94
+ */
95
+ onInitDone?: () => void;
96
+ /**
97
+ * 视频缩放比例及当前倍数变化,detail = { zoomLevel }, zoomLevel 为缩放比例
98
+ * @param event
99
+ * @param event.zoomLevel 缩放比例
100
+ */
101
+ onZoomChange?: (event: {
102
+ zoomLevel: number;
103
+ }) => void;
104
+ /**
105
+ * 点击视频时触发
106
+ */
107
+ onVideoTap?: () => void;
108
+ /**
109
+ * 当状态异层时触发 error 事件,detail = { "errCode": 错误码 , "errMsg": 错误描述 }
110
+ * @param event
111
+ * @param event.errCode 错误码
112
+ * @param event.errMsg 错误描述
113
+ */
36
114
  onError?: (event: {
37
115
  errCode: number | string;
38
116
  errMsg: string;
39
117
  }) => void;
118
+ /**
119
+ * 断开连接
120
+ * @param event
121
+ * @param event.errCode 错误码
122
+ * @param event.devId 设备id
123
+ */
124
+ onSessionDidDisconnected?: (event: {
125
+ errCode: number;
126
+ devId: string;
127
+ }) => void;
128
+ /**
129
+ * 预览失败
130
+ * @param event
131
+ * @param event.errCode 错误码
132
+ * @param event.devId 设备id
133
+ */
134
+ onCameraPreviewFailure?: (event: {
135
+ errCode: number;
136
+ devId: string;
137
+ }) => void;
138
+ /**
139
+ * 弱网通知
140
+ * @param event
141
+ * @param event.netValue 网络值
142
+ * @param event.devId 设备id
143
+ */
144
+ onCameraNotifyWeakNetwork?: (event: {
145
+ netValue: number;
146
+ devId: string;
147
+ }) => void;
40
148
  }
41
149
  export declare const IpcPlayer: React.ComponentType<IpcPlayerProps>;
@@ -27,8 +27,17 @@ export declare const alias: {
27
27
  onOnlinechange: string;
28
28
  onZoomchange: string;
29
29
  onVideotap: string;
30
+ onConnectChange: string;
31
+ onPreviewChange: string;
32
+ onInitDone: string;
33
+ onOnlineChange: string;
34
+ onZoomChange: string;
35
+ onVideoTap: string;
30
36
  onError: string;
31
37
  updateLayout: string;
38
+ onSessionDidDisconnected: string;
39
+ onCameraPreviewFailure: string;
40
+ onCameraNotifyWeakNetwork: string;
32
41
  disableScroll: string;
33
42
  hoverClass: string;
34
43
  hoverClassName: string;
@@ -1,3 +1,3 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = Object.assign(Object.assign({}, universalAlias), { className: 'class', animation: 'animation', style: 'style', id: 'id', deviceId: 'device-id', autoplay: 'autoplay', muted: 'muted', clarity: 'clarity', soundMode: 'sound-mode', orientation: 'orientation', objectFit: 'object-fit', autoPauseIfNavigate: 'auto-pause-if-navigate', autoPauseIfOpenNative: 'auto-pause-if-open-native', rotateZ: 'rotate-z', scalable: 'scalable', scaleMultiple: 'scale-multiple', ptzControllable: 'ptz-controllable', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', backgroundColor: 'background-color', onConnectchange: 'bind:connectchange', onPreviewchange: 'bind:previewchange', onInitdone: 'bind:initdone', onOnlinechange: 'bind:onlinechange', onZoomchange: 'bind:zoomchange', onVideotap: 'bind:videotap', onError: 'bind:error', updateLayout: 'update-layout' });
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { className: 'class', animation: 'animation', style: 'style', id: 'id', deviceId: 'device-id', autoplay: 'autoplay', muted: 'muted', clarity: 'clarity', soundMode: 'sound-mode', orientation: 'orientation', objectFit: 'object-fit', autoPauseIfNavigate: 'auto-pause-if-navigate', autoPauseIfOpenNative: 'auto-pause-if-open-native', rotateZ: 'rotate-z', scalable: 'scalable', scaleMultiple: 'scale-multiple', ptzControllable: 'ptz-controllable', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', backgroundColor: 'background-color', onConnectchange: 'bind:connectchange', onPreviewchange: 'bind:previewchange', onInitdone: 'bind:initdone', onOnlinechange: 'bind:onlinechange', onZoomchange: 'bind:zoomchange', onVideotap: 'bind:videotap', onConnectChange: 'bind:connectchange', onPreviewChange: 'bind:previewchange', onInitDone: 'bind:initdone', onOnlineChange: 'bind:onlinechange', onZoomChange: 'bind:zoomchange', onVideoTap: 'bind:videotap', onError: 'bind:error', updateLayout: 'update-layout', onSessionDidDisconnected: 'bind:sessionDidDisconnected', onCameraPreviewFailure: 'bind:cameraPreviewFailure', onCameraNotifyWeakNetwork: 'bind:cameraNotifyWeakNetwork' });
3
3
  export const props = Object.values(alias);
@@ -9,23 +9,64 @@ export interface ScrollViewProps extends BaseProps {
9
9
  scrollLeft?: number | string;
10
10
  scrollIntoView?: string;
11
11
  scrollWithAnimation?: boolean;
12
- onScroll?: (event: GenericEvent) => void;
13
- onScrollToUpper?: (event: GenericEvent) => void;
14
- onScrollToLower?: (event: GenericEvent) => void;
12
+ onScroll?: (event: GenericEvent & {
13
+ type: 'scroll';
14
+ scrollLeft: number;
15
+ scrollTop: number;
16
+ scrollHeight: number;
17
+ scrollWidth: number;
18
+ deltaX: number;
19
+ deltaY: number;
20
+ origin: any;
21
+ }) => void;
22
+ onScrollToUpper?: (event: GenericEvent & {
23
+ type: 'scrolltoupper';
24
+ direction: 'top' | 'left';
25
+ origin: any;
26
+ }) => void;
27
+ onScrollToLower?: (event: GenericEvent & {
28
+ type: 'scrolltolower';
29
+ direction: 'bottom' | 'right';
30
+ origin: any;
31
+ }) => void;
15
32
  enableBackToTop?: boolean;
16
33
  enableFlex?: boolean;
17
34
  refresherEnabled?: boolean;
18
35
  refresherThreshold?: number;
19
36
  refresherDefaultStyle?: string;
20
37
  refresherBackground?: string;
21
- refresherTriggered: boolean;
22
- onRefresherPulling?: (event: GenericEvent) => void;
23
- onRefresherpulling?: (event: GenericEvent) => void;
24
- onRefresherRefresh?: (event: GenericEvent) => void;
25
- onRefresherrefresh?: (event: GenericEvent) => void;
26
- onRefresherRestore?: (event: GenericEvent) => void;
27
- onRefresherrestore?: (event: GenericEvent) => void;
28
- onRefresherAbort?: (event: GenericEvent) => void;
29
- onRefresherabort?: (event: GenericEvent) => void;
38
+ refresherTriggered?: boolean;
39
+ onRefresherPulling?: (event: GenericEvent & {
40
+ type: 'refresherpulling';
41
+ origin: any;
42
+ }) => void;
43
+ onRefresherpulling?: (event: GenericEvent & {
44
+ type: 'refresherpulling';
45
+ origin: any;
46
+ }) => void;
47
+ onRefresherRefresh?: (event: GenericEvent & {
48
+ type: 'refresherrefresh';
49
+ origin: any;
50
+ }) => void;
51
+ onRefresherrefresh?: (event: GenericEvent & {
52
+ type: 'refresherrefresh';
53
+ origin: any;
54
+ }) => void;
55
+ onRefresherRestore?: (event: GenericEvent & {
56
+ type: 'refresherrestore';
57
+ origin: any;
58
+ }) => void;
59
+ onRefresherrestore?: (event: GenericEvent & {
60
+ type: 'refresherrestore';
61
+ origin: any;
62
+ }) => void;
63
+ onRefresherAbort?: (event: GenericEvent & {
64
+ type: 'refresherabort';
65
+ origin: any;
66
+ }) => void;
67
+ onRefresherabort?: (event: GenericEvent & {
68
+ type: 'refresherabort';
69
+ origin: any;
70
+ }) => void;
30
71
  }
31
72
  export declare const ScrollView: React.ComponentType<ScrollViewProps>;
@@ -28,16 +28,19 @@ export interface VideoProps {
28
28
  onPause?: (event: any) => void;
29
29
  onEnded?: (event: any) => void;
30
30
  onTimeUpdate?: (event: any) => void;
31
+ onTimeupdate?: (event: any) => void;
31
32
  onWaiting?: (event: any) => void;
32
33
  onError?: (event: any) => void;
33
34
  onProgress?: (event: any) => void;
34
35
  onLoadedMetadata?: (event: any) => void;
36
+ onLoadedmetadata?: (event: any) => void;
35
37
  onCanplay?: (event: any) => void;
36
38
  onCanplayThrough?: (event: any) => void;
37
39
  onPlaying?: (event: any) => void;
38
40
  onRateChange?: (event: any) => void;
39
41
  onVolumeChange?: (event: any) => void;
40
42
  onSeekComplete?: (event: any) => void;
43
+ onSeekcomplete?: (event: any) => void;
41
44
  /** 非可视区域是否自动暂停 */
42
45
  autoPause?: boolean;
43
46
  /** 指定视频 border-radius */
@@ -22,16 +22,19 @@ export declare const alias: {
22
22
  onPause: string;
23
23
  onEnded: string;
24
24
  onTimeUpdate: string;
25
+ onTimeupdate: string;
25
26
  onWaiting: string;
26
27
  onError: string;
27
28
  onProgress: string;
28
29
  onLoadedMetadata: string;
30
+ onLoadedmetadata: string;
29
31
  onCanplay: string;
30
32
  onCanplayThrough: string;
31
33
  onPlaying: string;
32
34
  onRateChange: string;
33
35
  onVolumeChange: string;
34
36
  onSeekComplete: string;
37
+ onSeekcomplete: string;
35
38
  autoPause: string;
36
39
  borderRadius: string;
37
40
  disableScroll: string;
@@ -1,4 +1,4 @@
1
1
  import { unique } from '@ray-core/shared';
2
2
  import { universalAlias } from '../universal';
3
- export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class', style: 'style', src: 'src', duration: 'duration', controls: 'controls', danmuList: 'danmu-list', danmuBtn: 'danmu-btn', enableDanmu: 'enable-danmu', autoplay: 'autoplay', loop: 'loop', muted: 'muted', initialTime: 'initial-time', showFullscreenBtn: 'show-fullscreen-btn', showPlayBtn: 'show-play-btn', showCenterPlayBtn: 'show-center-play-btn', objectFit: 'object-fit', poster: 'poster', showMuteBtn: 'show-mute-btn', onPlay: 'bindplay', onPause: 'bindpause', onEnded: 'bindended', onTimeUpdate: 'bindtimeupdate', onWaiting: 'bindwaiting', onError: 'binderror', onProgress: 'bindprogress', onLoadedMetadata: 'bindloadedmetadata', onCanplay: 'bindcanplay', onCanplayThrough: 'bindcanplaythrough', onPlaying: 'bindplaying', onRateChange: 'bindratechange', onVolumeChange: 'bindvolumechange', onSeekComplete: 'bindseekcomplete', autoPause: 'auto-pause', borderRadius: 'border-radius' });
3
+ export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class', style: 'style', src: 'src', duration: 'duration', controls: 'controls', danmuList: 'danmu-list', danmuBtn: 'danmu-btn', enableDanmu: 'enable-danmu', autoplay: 'autoplay', loop: 'loop', muted: 'muted', initialTime: 'initial-time', showFullscreenBtn: 'show-fullscreen-btn', showPlayBtn: 'show-play-btn', showCenterPlayBtn: 'show-center-play-btn', objectFit: 'object-fit', poster: 'poster', showMuteBtn: 'show-mute-btn', onPlay: 'bindplay', onPause: 'bindpause', onEnded: 'bindended', onTimeUpdate: 'bindtimeupdate', onTimeupdate: 'bindtimeupdate', onWaiting: 'bindwaiting', onError: 'binderror', onProgress: 'bindprogress', onLoadedMetadata: 'bindloadedmetadata', onLoadedmetadata: 'bindloadedmetadata', onCanplay: 'bindcanplay', onCanplayThrough: 'bindcanplaythrough', onPlaying: 'bindplaying', onRateChange: 'bindratechange', onVolumeChange: 'bindvolumechange', onSeekComplete: 'bindseekcomplete', onSeekcomplete: 'bindseekcomplete', autoPause: 'auto-pause', borderRadius: 'border-radius' });
4
4
  export const props = unique(Object.values(alias));
@@ -16,6 +16,7 @@ export interface ViewProps extends BaseProps {
16
16
  onTouchEnd?: (event: TouchEvent) => any;
17
17
  onTouchCancel?: (event: TouchEvent) => any;
18
18
  onLongClick?: (event: TouchEvent) => any;
19
+ onLongPress?: (event: TouchEvent) => any;
19
20
  onTransitionEnd?: (event: any) => any;
20
21
  onAnimationIteration?: (event: any) => any;
21
22
  onAnimationStart?: (event: any) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/adapter",
3
- "version": "1.6.0-beta.8",
3
+ "version": "1.6.0",
4
4
  "description": "Ray adapter for tuya",
5
5
  "keywords": [
6
6
  "ray"
@@ -31,18 +31,18 @@
31
31
  "watch": "concurrently 'yarn build:cjs --watch' 'yarn build:esm --watch'"
32
32
  },
33
33
  "dependencies": {
34
- "@ray-core/runtime": "^0.4.5",
35
- "@ray-core/shared": "^0.4.5",
36
- "@ray-core/types": "^0.4.5"
34
+ "@ray-core/runtime": "^0.4.8",
35
+ "@ray-core/shared": "^0.4.8",
36
+ "@ray-core/types": "^0.4.8"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/types": "^1.6.0-beta.8",
39
+ "@ray-js/types": "1.6.0",
40
40
  "concurrently": "^6.5.1"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public",
44
- "registry": "https://registry.npmjs.org"
44
+ "registry": "https://registry.npmjs.com"
45
45
  },
46
46
  "esnext": "./esm/index.js",
47
- "gitHead": "b1d4118961bba4f3f2a889ec5bb9444d165df0dc"
47
+ "gitHead": "b5b10947abcec036f88b73320491fb4e0a4cbe52"
48
48
  }