@ray-js/adapter 1.4.50 → 1.4.52

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,7 +60,7 @@ export type Polygon = {
60
60
  longitude: number;
61
61
  }>;
62
62
  strokeWidth?: number;
63
- strokeColor?: number;
64
- fillColor?: number;
63
+ strokeColor?: string;
64
+ fillColor?: string;
65
65
  };
66
66
  export declare const Map: React.ComponentType<MapProps>;
@@ -8,7 +8,7 @@ type RichTextNode = {
8
8
  export interface RichTextProps extends BaseProps {
9
9
  /** 节点列表/HTML String,现支持两种节点,通过 type 来区分,分别是元素节点和文本节点,默认是元素节点,在富文本区域里显示的 HTML 节点。 */
10
10
  nodes?: string | RichTextNode[];
11
- onSelect: (e: any) => void;
11
+ onSelect?: (e: any) => void;
12
12
  }
13
13
  export declare const RichText: React.ComponentType<RichTextProps>;
14
14
  export {};
@@ -1,12 +1,17 @@
1
1
  import * as React from 'react';
2
+ type Danmu = {
3
+ text: string;
4
+ color: string;
5
+ time: number;
6
+ };
2
7
  export interface VideoProps {
3
8
  id?: string;
4
9
  className?: string;
5
10
  style?: React.CSSProperties;
6
- src?: string;
11
+ src: string;
7
12
  duration?: number;
8
13
  controls?: boolean;
9
- danmuList?: string;
14
+ danmuList?: Array<Danmu>;
10
15
  danmuBtn?: boolean;
11
16
  enableDanmu?: boolean;
12
17
  autoplay?: boolean;
@@ -33,5 +38,10 @@ export interface VideoProps {
33
38
  onRateChange?: (event: any) => void;
34
39
  onVolumeChange?: (event: any) => void;
35
40
  onSeekComplete?: (event: any) => void;
41
+ /** 非可视区域是否自动暂停 */
42
+ autoPause?: boolean;
43
+ /** 指定视频 border-radius */
44
+ borderRadius?: number;
36
45
  }
37
46
  export declare const Video: React.ComponentType<VideoProps>;
47
+ export {};
@@ -32,6 +32,8 @@ export declare const alias: {
32
32
  onRateChange: string;
33
33
  onVolumeChange: string;
34
34
  onSeekComplete: string;
35
+ autoPause: string;
36
+ borderRadius: string;
35
37
  disableScroll: string;
36
38
  hoverClass: string;
37
39
  hoverClassName: 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' });
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' });
7
7
  exports.props = (0, shared_1.unique)(Object.values(exports.alias));
@@ -60,7 +60,7 @@ export type Polygon = {
60
60
  longitude: number;
61
61
  }>;
62
62
  strokeWidth?: number;
63
- strokeColor?: number;
64
- fillColor?: number;
63
+ strokeColor?: string;
64
+ fillColor?: string;
65
65
  };
66
66
  export declare const Map: React.ComponentType<MapProps>;
@@ -8,7 +8,7 @@ type RichTextNode = {
8
8
  export interface RichTextProps extends BaseProps {
9
9
  /** 节点列表/HTML String,现支持两种节点,通过 type 来区分,分别是元素节点和文本节点,默认是元素节点,在富文本区域里显示的 HTML 节点。 */
10
10
  nodes?: string | RichTextNode[];
11
- onSelect: (e: any) => void;
11
+ onSelect?: (e: any) => void;
12
12
  }
13
13
  export declare const RichText: React.ComponentType<RichTextProps>;
14
14
  export {};
@@ -1,12 +1,17 @@
1
1
  import * as React from 'react';
2
+ type Danmu = {
3
+ text: string;
4
+ color: string;
5
+ time: number;
6
+ };
2
7
  export interface VideoProps {
3
8
  id?: string;
4
9
  className?: string;
5
10
  style?: React.CSSProperties;
6
- src?: string;
11
+ src: string;
7
12
  duration?: number;
8
13
  controls?: boolean;
9
- danmuList?: string;
14
+ danmuList?: Array<Danmu>;
10
15
  danmuBtn?: boolean;
11
16
  enableDanmu?: boolean;
12
17
  autoplay?: boolean;
@@ -33,5 +38,10 @@ export interface VideoProps {
33
38
  onRateChange?: (event: any) => void;
34
39
  onVolumeChange?: (event: any) => void;
35
40
  onSeekComplete?: (event: any) => void;
41
+ /** 非可视区域是否自动暂停 */
42
+ autoPause?: boolean;
43
+ /** 指定视频 border-radius */
44
+ borderRadius?: number;
36
45
  }
37
46
  export declare const Video: React.ComponentType<VideoProps>;
47
+ export {};
@@ -32,6 +32,8 @@ export declare const alias: {
32
32
  onRateChange: string;
33
33
  onVolumeChange: string;
34
34
  onSeekComplete: string;
35
+ autoPause: string;
36
+ borderRadius: string;
35
37
  disableScroll: string;
36
38
  hoverClass: string;
37
39
  hoverClassName: 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' });
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' });
4
4
  export const props = unique(Object.values(alias));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/adapter",
3
- "version": "1.4.50",
3
+ "version": "1.4.52",
4
4
  "description": "Ray adapter for tuya",
5
5
  "keywords": [
6
6
  "ray"
@@ -31,12 +31,12 @@
31
31
  "watch": "concurrently 'yarn build:cjs --watch' 'yarn build:esm --watch'"
32
32
  },
33
33
  "dependencies": {
34
- "@ray-core/runtime": "^0.3.9",
35
- "@ray-core/shared": "^0.3.9",
36
- "@ray-core/types": "^0.3.9"
34
+ "@ray-core/runtime": "^0.4.0",
35
+ "@ray-core/shared": "^0.4.0",
36
+ "@ray-core/types": "^0.4.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/types": "1.4.50",
39
+ "@ray-js/types": "1.4.52",
40
40
  "concurrently": "^6.5.1"
41
41
  },
42
42
  "publishConfig": {
@@ -44,5 +44,5 @@
44
44
  "registry": "https://registry.npmjs.org"
45
45
  },
46
46
  "esnext": "./esm/index.js",
47
- "gitHead": "636bf104679f0a1e64338bec9bee9c159c9cf9d7"
47
+ "gitHead": "a33185e617507f1a5406e074e3369ce4902dc04a"
48
48
  }