@ray-js/adapter 1.3.0-beta.2-beta-2 → 1.3.0-beta.3

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 (36) hide show
  1. package/CHANGELOG.md +0 -8
  2. package/cjs/hostComponents/Camera/node.js +1 -1
  3. package/cjs/hostComponents/Iframe/node.d.ts +3 -3
  4. package/cjs/hostComponents/Iframe/node.js +1 -1
  5. package/cjs/hostComponents/Map/node.js +1 -1
  6. package/cjs/hostComponents/Navigator/index.d.ts +38 -0
  7. package/cjs/hostComponents/Navigator/index.js +17 -0
  8. package/cjs/hostComponents/Navigator/node.d.ts +23 -0
  9. package/cjs/hostComponents/Navigator/node.js +26 -0
  10. package/cjs/hostComponents/ScrollView/index.d.ts +0 -4
  11. package/cjs/hostComponents/ScrollView/node.d.ts +0 -4
  12. package/cjs/hostComponents/ScrollView/node.js +1 -1
  13. package/cjs/hostComponents/Video/node.js +1 -1
  14. package/cjs/hostComponents/WebView/node.d.ts +3 -3
  15. package/cjs/hostComponents/WebView/node.js +1 -1
  16. package/cjs/hostComponents/index.d.ts +1 -0
  17. package/cjs/hostComponents/index.js +1 -0
  18. package/cjs/hostComponents/node.js +2 -0
  19. package/esm/hostComponents/Camera/node.js +1 -1
  20. package/esm/hostComponents/Iframe/node.d.ts +3 -3
  21. package/esm/hostComponents/Iframe/node.js +1 -1
  22. package/esm/hostComponents/Map/node.js +1 -1
  23. package/esm/hostComponents/Navigator/index.d.ts +38 -0
  24. package/esm/hostComponents/Navigator/index.js +14 -0
  25. package/esm/hostComponents/Navigator/node.d.ts +23 -0
  26. package/esm/hostComponents/Navigator/node.js +23 -0
  27. package/esm/hostComponents/ScrollView/index.d.ts +0 -4
  28. package/esm/hostComponents/ScrollView/node.d.ts +0 -4
  29. package/esm/hostComponents/ScrollView/node.js +1 -1
  30. package/esm/hostComponents/Video/node.js +1 -1
  31. package/esm/hostComponents/WebView/node.d.ts +3 -3
  32. package/esm/hostComponents/WebView/node.js +1 -1
  33. package/esm/hostComponents/index.d.ts +1 -0
  34. package/esm/hostComponents/index.js +1 -0
  35. package/esm/hostComponents/node.js +2 -0
  36. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -2,14 +2,6 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
4
4
 
5
- ## [1.3.0-beta.2-beta-2](./compare/v1.3.0-beta.2-beta-1...v1.3.0-beta.2-beta-2) (2023-05-11)
6
-
7
- **Note:** Version bump only for package @ray-js/adapter
8
-
9
- ## [1.3.0-beta.2-beta-1](./compare/v1.2.9...v1.3.0-beta.2-beta-1) (2023-05-11)
10
-
11
- **Note:** Version bump only for package @ray-js/adapter
12
-
13
5
  ### [0.10.3-beta-1](./compare/v0.9.4...v0.10.3-beta-1) (2023-04-03)
14
6
 
15
7
  **Note:** Version bump only for package @ray-js/adapter
@@ -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), { id: 'id', className: 'class-name', style: 'style', updateLayout: 'update-layout', mode: 'mode', resolution: 'resolution', devicePosition: 'device-position', flash: 'flash', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', borderRadiusTopLeft: 'border-radius-top-left', borderRadiusTopRight: 'border-radius-top-right', borderRadiusBottomLeft: 'border-radius-bottom-left', borderRadiusBottomRight: 'border-radius-bottom-right', backgroundColor: 'background-color', onBindstop: 'bind:bindstop', onError: 'bind:error', onInitdone: 'bind:initdone' });
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { id: 'id', className: 'class', style: 'style', updateLayout: 'update-layout', mode: 'mode', resolution: 'resolution', devicePosition: 'device-position', flash: 'flash', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', borderRadiusTopLeft: 'border-radius-top-left', borderRadiusTopRight: 'border-radius-top-right', borderRadiusBottomLeft: 'border-radius-bottom-left', borderRadiusBottomRight: 'border-radius-bottom-right', backgroundColor: 'background-color', onBindstop: 'bind:bindstop', onError: 'bind:error', onInitdone: 'bind:initdone' });
6
6
  exports.props = Object.values(exports.alias);
@@ -1,18 +1,18 @@
1
1
  export declare const alias: {
2
- id: string;
3
- className: string;
4
- style: string;
5
2
  src: string;
6
3
  onError: string;
7
4
  onLoad: string;
8
5
  onMessage: string;
6
+ id: string;
9
7
  disableScroll: string;
10
8
  hoverClass: string;
11
9
  hoverClassName: string;
12
10
  hoverStartTime: string;
13
11
  hoverStayTime: string;
14
12
  hidden: string;
13
+ className: string;
15
14
  animation: string;
15
+ style: string;
16
16
  hoverStopPropagation: string;
17
17
  onTap: string;
18
18
  onClick: 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), { id: 'id', className: 'class-name', style: 'style', src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindmessage' });
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindmessage' });
6
6
  exports.props = Object.values(exports.alias);
@@ -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), { id: 'id', className: 'class-name', style: 'style', updateLayout: 'update-layout', longitude: 'longitude', latitude: 'latitude', scale: 'scale', minScale: 'min-scale', maxScale: 'max-scale', markers: 'markers', polyline: 'polyline', circles: 'circles', polygons: 'polygons', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', borderRadiusTopLeft: 'border-radius-top-left', borderRadiusTopRight: 'border-radius-top-right', borderRadiusBottomLeft: 'border-radius-bottom-left', borderRadiusBottomRight: 'border-radius-bottom-right', backgroundColor: 'background-color', onMarkertap: 'bind:markertap', onCallouttap: 'bind:callouttap', onRegionchange: 'bind:regionchange', onInitdone: 'bind:initdone' });
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { id: 'id', className: 'class', style: 'style', updateLayout: 'update-layout', longitude: 'longitude', latitude: 'latitude', scale: 'scale', minScale: 'min-scale', maxScale: 'max-scale', markers: 'markers', polyline: 'polyline', circles: 'circles', polygons: 'polygons', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', borderRadiusTopLeft: 'border-radius-top-left', borderRadiusTopRight: 'border-radius-top-right', borderRadiusBottomLeft: 'border-radius-bottom-left', borderRadiusBottomRight: 'border-radius-bottom-right', backgroundColor: 'background-color', onMarkertap: 'bind:markertap', onCallouttap: 'bind:callouttap', onRegionchange: 'bind:regionchange', onInitdone: 'bind:initdone' });
6
6
  exports.props = Object.values(exports.alias);
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import { BaseProps, GenericEvent } from '../../types/component';
3
+ export interface NavigatorProps extends BaseProps {
4
+ /** (default: self) 在哪个目标上发生跳转,默认当前小程序 2.0.7 */
5
+ target?: 'self' | 'miniProgram';
6
+ /** 当前小程序内的跳转链接 1.0.0 */
7
+ url?: string;
8
+ /** (default: navigate) 跳转方式 1.0.0 */
9
+ openType?: 'navigate' | 'redirect' | 'switchTab' | 'reLaunch' | 'navigateBack' | 'exit';
10
+ /** (default: 1) 当 open-type 为 'navigateBack' 时有效,表示回退的层数 1.0.0 */
11
+ delta?: number;
12
+ /** 当target="miniProgram"时有效,要打开的小程序 appId 2.0.7 */
13
+ appId?: string;
14
+ /** 当target="miniProgram"时有效,打开的页面路径,如果为空则打开首页 2.0.7 */
15
+ path?: string;
16
+ /** 当target="miniProgram"时有效,需要传递给目标小程序的数据,目标小程序可在 App.onLaunch(),App.onShow() 中获取到这份数据。详情 2.0.7 */
17
+ extraData?: any;
18
+ /** (default: release) 当target="miniProgram"时有效,要打开的小程序版本 2.0.7 */
19
+ version?: 'develop' | 'trial' | 'release';
20
+ /** (default: navigator-hover) 指定点击时的样式类,当hover-class="none"时,没有点击态效果 1.0.0 */
21
+ hoverClassName?: string;
22
+ /** (default: false) 指定是否阻止本节点的祖先节点出现点击态 1.5.0 */
23
+ hoverStopPropagation?: boolean;
24
+ /** (default: 50) 按住后多久出现点击态,单位毫秒 1.0.0 */
25
+ hoverStartTime?: number;
26
+ /** (default: 600) 手指松开后点击态保留时间,单位毫秒 1.0.0 */
27
+ hoverStayTime?: number;
28
+ /** 当target="miniProgram"时有效,跳转小程序成功 2.0.7 */
29
+ onSuccess?: (event: GenericEvent) => any;
30
+ /** 当target="miniProgram"时有效,跳转小程序失败 2.0.7 */
31
+ onFail?: (event: GenericEvent) => any;
32
+ /** 当target="miniProgram"时有效,跳转小程序完成 2.0.7 */
33
+ onComplete?: (event: GenericEvent) => any;
34
+ }
35
+ /**
36
+ * https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html
37
+ */
38
+ export declare const Navigator: React.ComponentType<NavigatorProps>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Navigator = void 0;
4
+ const runtime_1 = require("@ray-core/runtime");
5
+ /**
6
+ * https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html
7
+ */
8
+ exports.Navigator = (0, runtime_1.createHostComponent)('navigator');
9
+ exports.Navigator.defaultProps = {
10
+ target: 'self',
11
+ openType: 'navigate',
12
+ delta: 1,
13
+ hoverClassName: 'navigator-hover',
14
+ hoverStopPropagation: false,
15
+ hoverStartTime: 50,
16
+ hoverStayTime: 600,
17
+ };
@@ -0,0 +1,23 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ animation: string;
6
+ openType: string;
7
+ hoverClass: string;
8
+ hoverClassName: string;
9
+ hoverStartTime: string;
10
+ hoverStayTime: string;
11
+ url: string;
12
+ target: string;
13
+ delta: string;
14
+ appId: string;
15
+ path: string;
16
+ extraData: string;
17
+ version: string;
18
+ hoverStopPropagation: string;
19
+ onSuccess: string;
20
+ onFail: string;
21
+ onComplete: string;
22
+ };
23
+ export declare const props: string[];
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.props = exports.alias = void 0;
4
+ exports.alias = {
5
+ id: 'id',
6
+ className: 'class',
7
+ style: 'style',
8
+ animation: 'animation',
9
+ openType: 'open-type',
10
+ hoverClass: 'hover-class',
11
+ hoverClassName: 'hover-class',
12
+ hoverStartTime: 'hover-start-time',
13
+ hoverStayTime: 'hover-stay-time',
14
+ url: 'url',
15
+ target: 'target',
16
+ delta: 'delta',
17
+ appId: 'app-id',
18
+ path: 'path',
19
+ extraData: 'extra-data',
20
+ version: 'version',
21
+ hoverStopPropagation: 'hover-stop-propagation',
22
+ onSuccess: 'bindsuccess',
23
+ onFail: 'bindfail',
24
+ onComplete: 'bindcomplete',
25
+ };
26
+ exports.props = Object.values(exports.alias);
@@ -20,12 +20,8 @@ export interface ScrollViewProps extends BaseProps {
20
20
  refresherBackground?: string;
21
21
  refresherTriggered: boolean;
22
22
  onRefresherPulling?: (event: GenericEvent) => void;
23
- onRefresherpulling?: (event: GenericEvent) => void;
24
23
  onRefresherRefresh?: (event: GenericEvent) => void;
25
- onRefresherrefresh?: (event: GenericEvent) => void;
26
24
  onRefresherRestore?: (event: GenericEvent) => void;
27
- onRefresherrestore?: (event: GenericEvent) => void;
28
25
  onRefresherAbort?: (event: GenericEvent) => void;
29
- onRefresherabort?: (event: GenericEvent) => void;
30
26
  }
31
27
  export declare const ScrollView: React.ComponentType<ScrollViewProps>;
@@ -21,13 +21,9 @@ export declare const alias: {
21
21
  refresherDefaultStyle: string;
22
22
  refresherBackground: string;
23
23
  refresherTriggered: string;
24
- onRefresherPulling: string;
25
24
  onRefresherpulling: string;
26
- onRefresherRefresh: string;
27
25
  onRefresherrefresh: string;
28
- onRefresherRestore: string;
29
26
  onRefresherrestore: string;
30
- onRefresherAbort: string;
31
27
  onRefresherabort: string;
32
28
  disableScroll: string;
33
29
  hoverClass: string;
@@ -4,5 +4,5 @@ exports.props = exports.alias = void 0;
4
4
  const universal_1 = require("../universal");
5
5
  exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { id: 'id', className: 'class', animation: 'animation', style: 'style', scrollX: 'scroll-x', scrollY: 'scroll-y', upperThreshold: 'upper-threshold', lowerThreshold: 'lower-threshold', scrollTop: 'scroll-top', scrollLeft: 'scroll-left', scrollIntoView: 'scroll-into-view', scrollWithAnimation: 'scroll-with-animation', enableBackToTop: 'enable-back-to-top', enableFlex: 'enable-flex', onScrollToUpper: 'bindscrolltoupper', onScrollToLower: 'bindscrolltolower', onScroll: 'bindscroll',
6
6
  /* 0.9.3新增 */
7
- refresherEnabled: 'refresher-enabled', refresherThreshold: 'refresher-threshold', refresherDefaultStyle: 'refresher-default-style', refresherBackground: 'refresher-background', refresherTriggered: 'refresher-triggered', onRefresherPulling: 'bindrefresherpulling', onRefresherpulling: 'bindrefresherpulling', onRefresherRefresh: 'bindrefresherrefresh', onRefresherrefresh: 'bindrefresherrefresh', onRefresherRestore: 'bindrefresherrestore', onRefresherrestore: 'bindrefresherrestore', onRefresherAbort: 'bindrefresherabort', onRefresherabort: 'bindrefresherabort' });
7
+ refresherEnabled: 'refresher-enabled', refresherThreshold: 'refresher-threshold', refresherDefaultStyle: 'refresher-default-style', refresherBackground: 'refresher-background', refresherTriggered: 'refresher-triggered', onRefresherpulling: 'bindrefresherpulling', onRefresherrefresh: 'bindrefresherrefresh', onRefresherrestore: 'bindrefresherrestore', onRefresherabort: 'bindrefresherabort' });
8
8
  exports.props = Object.values(exports.alias);
@@ -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-name', 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' });
7
7
  exports.props = (0, shared_1.unique)(Object.values(exports.alias));
@@ -1,19 +1,19 @@
1
1
  export declare const alias: {
2
- id: string;
3
- className: string;
4
- style: string;
5
2
  src: string;
6
3
  onError: string;
7
4
  onLoad: string;
8
5
  onMessage: string;
9
6
  updateLayout: string;
7
+ id: string;
10
8
  disableScroll: string;
11
9
  hoverClass: string;
12
10
  hoverClassName: string;
13
11
  hoverStartTime: string;
14
12
  hoverStayTime: string;
15
13
  hidden: string;
14
+ className: string;
16
15
  animation: string;
16
+ style: string;
17
17
  hoverStopPropagation: string;
18
18
  onTap: string;
19
19
  onClick: 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), { id: 'id', className: 'class-name', style: 'style', src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindmessage', updateLayout: 'update-layout' });
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindmessage', updateLayout: 'update-layout' });
6
6
  exports.props = Object.values(exports.alias);
@@ -32,3 +32,4 @@ export * from './Map';
32
32
  export * from './Camera';
33
33
  export * from './Progress';
34
34
  export * from './RichText';
35
+ export * from './Navigator';
@@ -48,3 +48,4 @@ __exportStar(require("./Map"), exports);
48
48
  __exportStar(require("./Camera"), exports);
49
49
  __exportStar(require("./Progress"), exports);
50
50
  __exportStar(require("./RichText"), exports);
51
+ __exportStar(require("./Navigator"), exports);
@@ -57,6 +57,7 @@ const MapView = __importStar(require("./Map/node"));
57
57
  const Camera = __importStar(require("./Camera/node"));
58
58
  const RichText = __importStar(require("./RichText/node"));
59
59
  const Iframe = __importStar(require("./Iframe/node"));
60
+ const Navigator = __importStar(require("./Navigator/node"));
60
61
  const hostComponents = new Map();
61
62
  hostComponents.set('button', Button);
62
63
  hostComponents.set('canvas', Canvas);
@@ -92,4 +93,5 @@ hostComponents.set('camera', Camera);
92
93
  hostComponents.set('progress', Progress);
93
94
  hostComponents.set('rich-text', RichText);
94
95
  hostComponents.set('iframe', Iframe);
96
+ hostComponents.set('navigator', Navigator);
95
97
  exports.default = hostComponents;
@@ -1,3 +1,3 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class-name', style: 'style', updateLayout: 'update-layout', mode: 'mode', resolution: 'resolution', devicePosition: 'device-position', flash: 'flash', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', borderRadiusTopLeft: 'border-radius-top-left', borderRadiusTopRight: 'border-radius-top-right', borderRadiusBottomLeft: 'border-radius-bottom-left', borderRadiusBottomRight: 'border-radius-bottom-right', backgroundColor: 'background-color', onBindstop: 'bind:bindstop', onError: 'bind:error', onInitdone: 'bind:initdone' });
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class', style: 'style', updateLayout: 'update-layout', mode: 'mode', resolution: 'resolution', devicePosition: 'device-position', flash: 'flash', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', borderRadiusTopLeft: 'border-radius-top-left', borderRadiusTopRight: 'border-radius-top-right', borderRadiusBottomLeft: 'border-radius-bottom-left', borderRadiusBottomRight: 'border-radius-bottom-right', backgroundColor: 'background-color', onBindstop: 'bind:bindstop', onError: 'bind:error', onInitdone: 'bind:initdone' });
3
3
  export const props = Object.values(alias);
@@ -1,18 +1,18 @@
1
1
  export declare const alias: {
2
- id: string;
3
- className: string;
4
- style: string;
5
2
  src: string;
6
3
  onError: string;
7
4
  onLoad: string;
8
5
  onMessage: string;
6
+ id: string;
9
7
  disableScroll: string;
10
8
  hoverClass: string;
11
9
  hoverClassName: string;
12
10
  hoverStartTime: string;
13
11
  hoverStayTime: string;
14
12
  hidden: string;
13
+ className: string;
15
14
  animation: string;
15
+ style: string;
16
16
  hoverStopPropagation: string;
17
17
  onTap: string;
18
18
  onClick: string;
@@ -1,3 +1,3 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class-name', style: 'style', src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindmessage' });
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindmessage' });
3
3
  export const props = Object.values(alias);
@@ -1,3 +1,3 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class-name', style: 'style', updateLayout: 'update-layout', longitude: 'longitude', latitude: 'latitude', scale: 'scale', minScale: 'min-scale', maxScale: 'max-scale', markers: 'markers', polyline: 'polyline', circles: 'circles', polygons: 'polygons', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', borderRadiusTopLeft: 'border-radius-top-left', borderRadiusTopRight: 'border-radius-top-right', borderRadiusBottomLeft: 'border-radius-bottom-left', borderRadiusBottomRight: 'border-radius-bottom-right', backgroundColor: 'background-color', onMarkertap: 'bind:markertap', onCallouttap: 'bind:callouttap', onRegionchange: 'bind:regionchange', onInitdone: 'bind:initdone' });
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class', style: 'style', updateLayout: 'update-layout', longitude: 'longitude', latitude: 'latitude', scale: 'scale', minScale: 'min-scale', maxScale: 'max-scale', markers: 'markers', polyline: 'polyline', circles: 'circles', polygons: 'polygons', borderWidth: 'border-width', borderStyle: 'border-style', borderColor: 'border-color', borderRadius: 'border-radius', borderRadiusTopLeft: 'border-radius-top-left', borderRadiusTopRight: 'border-radius-top-right', borderRadiusBottomLeft: 'border-radius-bottom-left', borderRadiusBottomRight: 'border-radius-bottom-right', backgroundColor: 'background-color', onMarkertap: 'bind:markertap', onCallouttap: 'bind:callouttap', onRegionchange: 'bind:regionchange', onInitdone: 'bind:initdone' });
3
3
  export const props = Object.values(alias);
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ import { BaseProps, GenericEvent } from '../../types/component';
3
+ export interface NavigatorProps extends BaseProps {
4
+ /** (default: self) 在哪个目标上发生跳转,默认当前小程序 2.0.7 */
5
+ target?: 'self' | 'miniProgram';
6
+ /** 当前小程序内的跳转链接 1.0.0 */
7
+ url?: string;
8
+ /** (default: navigate) 跳转方式 1.0.0 */
9
+ openType?: 'navigate' | 'redirect' | 'switchTab' | 'reLaunch' | 'navigateBack' | 'exit';
10
+ /** (default: 1) 当 open-type 为 'navigateBack' 时有效,表示回退的层数 1.0.0 */
11
+ delta?: number;
12
+ /** 当target="miniProgram"时有效,要打开的小程序 appId 2.0.7 */
13
+ appId?: string;
14
+ /** 当target="miniProgram"时有效,打开的页面路径,如果为空则打开首页 2.0.7 */
15
+ path?: string;
16
+ /** 当target="miniProgram"时有效,需要传递给目标小程序的数据,目标小程序可在 App.onLaunch(),App.onShow() 中获取到这份数据。详情 2.0.7 */
17
+ extraData?: any;
18
+ /** (default: release) 当target="miniProgram"时有效,要打开的小程序版本 2.0.7 */
19
+ version?: 'develop' | 'trial' | 'release';
20
+ /** (default: navigator-hover) 指定点击时的样式类,当hover-class="none"时,没有点击态效果 1.0.0 */
21
+ hoverClassName?: string;
22
+ /** (default: false) 指定是否阻止本节点的祖先节点出现点击态 1.5.0 */
23
+ hoverStopPropagation?: boolean;
24
+ /** (default: 50) 按住后多久出现点击态,单位毫秒 1.0.0 */
25
+ hoverStartTime?: number;
26
+ /** (default: 600) 手指松开后点击态保留时间,单位毫秒 1.0.0 */
27
+ hoverStayTime?: number;
28
+ /** 当target="miniProgram"时有效,跳转小程序成功 2.0.7 */
29
+ onSuccess?: (event: GenericEvent) => any;
30
+ /** 当target="miniProgram"时有效,跳转小程序失败 2.0.7 */
31
+ onFail?: (event: GenericEvent) => any;
32
+ /** 当target="miniProgram"时有效,跳转小程序完成 2.0.7 */
33
+ onComplete?: (event: GenericEvent) => any;
34
+ }
35
+ /**
36
+ * https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html
37
+ */
38
+ export declare const Navigator: React.ComponentType<NavigatorProps>;
@@ -0,0 +1,14 @@
1
+ import { createHostComponent } from '@ray-core/runtime';
2
+ /**
3
+ * https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html
4
+ */
5
+ export const Navigator = createHostComponent('navigator');
6
+ Navigator.defaultProps = {
7
+ target: 'self',
8
+ openType: 'navigate',
9
+ delta: 1,
10
+ hoverClassName: 'navigator-hover',
11
+ hoverStopPropagation: false,
12
+ hoverStartTime: 50,
13
+ hoverStayTime: 600,
14
+ };
@@ -0,0 +1,23 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ animation: string;
6
+ openType: string;
7
+ hoverClass: string;
8
+ hoverClassName: string;
9
+ hoverStartTime: string;
10
+ hoverStayTime: string;
11
+ url: string;
12
+ target: string;
13
+ delta: string;
14
+ appId: string;
15
+ path: string;
16
+ extraData: string;
17
+ version: string;
18
+ hoverStopPropagation: string;
19
+ onSuccess: string;
20
+ onFail: string;
21
+ onComplete: string;
22
+ };
23
+ export declare const props: string[];
@@ -0,0 +1,23 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ animation: 'animation',
6
+ openType: 'open-type',
7
+ hoverClass: 'hover-class',
8
+ hoverClassName: 'hover-class',
9
+ hoverStartTime: 'hover-start-time',
10
+ hoverStayTime: 'hover-stay-time',
11
+ url: 'url',
12
+ target: 'target',
13
+ delta: 'delta',
14
+ appId: 'app-id',
15
+ path: 'path',
16
+ extraData: 'extra-data',
17
+ version: 'version',
18
+ hoverStopPropagation: 'hover-stop-propagation',
19
+ onSuccess: 'bindsuccess',
20
+ onFail: 'bindfail',
21
+ onComplete: 'bindcomplete',
22
+ };
23
+ export const props = Object.values(alias);
@@ -20,12 +20,8 @@ export interface ScrollViewProps extends BaseProps {
20
20
  refresherBackground?: string;
21
21
  refresherTriggered: boolean;
22
22
  onRefresherPulling?: (event: GenericEvent) => void;
23
- onRefresherpulling?: (event: GenericEvent) => void;
24
23
  onRefresherRefresh?: (event: GenericEvent) => void;
25
- onRefresherrefresh?: (event: GenericEvent) => void;
26
24
  onRefresherRestore?: (event: GenericEvent) => void;
27
- onRefresherrestore?: (event: GenericEvent) => void;
28
25
  onRefresherAbort?: (event: GenericEvent) => void;
29
- onRefresherabort?: (event: GenericEvent) => void;
30
26
  }
31
27
  export declare const ScrollView: React.ComponentType<ScrollViewProps>;
@@ -21,13 +21,9 @@ export declare const alias: {
21
21
  refresherDefaultStyle: string;
22
22
  refresherBackground: string;
23
23
  refresherTriggered: string;
24
- onRefresherPulling: string;
25
24
  onRefresherpulling: string;
26
- onRefresherRefresh: string;
27
25
  onRefresherrefresh: string;
28
- onRefresherRestore: string;
29
26
  onRefresherrestore: string;
30
- onRefresherAbort: string;
31
27
  onRefresherabort: string;
32
28
  disableScroll: string;
33
29
  hoverClass: string;
@@ -1,5 +1,5 @@
1
1
  import { universalAlias } from '../universal';
2
2
  export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class', animation: 'animation', style: 'style', scrollX: 'scroll-x', scrollY: 'scroll-y', upperThreshold: 'upper-threshold', lowerThreshold: 'lower-threshold', scrollTop: 'scroll-top', scrollLeft: 'scroll-left', scrollIntoView: 'scroll-into-view', scrollWithAnimation: 'scroll-with-animation', enableBackToTop: 'enable-back-to-top', enableFlex: 'enable-flex', onScrollToUpper: 'bindscrolltoupper', onScrollToLower: 'bindscrolltolower', onScroll: 'bindscroll',
3
3
  /* 0.9.3新增 */
4
- refresherEnabled: 'refresher-enabled', refresherThreshold: 'refresher-threshold', refresherDefaultStyle: 'refresher-default-style', refresherBackground: 'refresher-background', refresherTriggered: 'refresher-triggered', onRefresherPulling: 'bindrefresherpulling', onRefresherpulling: 'bindrefresherpulling', onRefresherRefresh: 'bindrefresherrefresh', onRefresherrefresh: 'bindrefresherrefresh', onRefresherRestore: 'bindrefresherrestore', onRefresherrestore: 'bindrefresherrestore', onRefresherAbort: 'bindrefresherabort', onRefresherabort: 'bindrefresherabort' });
4
+ refresherEnabled: 'refresher-enabled', refresherThreshold: 'refresher-threshold', refresherDefaultStyle: 'refresher-default-style', refresherBackground: 'refresher-background', refresherTriggered: 'refresher-triggered', onRefresherpulling: 'bindrefresherpulling', onRefresherrefresh: 'bindrefresherrefresh', onRefresherrestore: 'bindrefresherrestore', onRefresherabort: 'bindrefresherabort' });
5
5
  export const props = Object.values(alias);
@@ -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-name', 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' });
4
4
  export const props = unique(Object.values(alias));
@@ -1,19 +1,19 @@
1
1
  export declare const alias: {
2
- id: string;
3
- className: string;
4
- style: string;
5
2
  src: string;
6
3
  onError: string;
7
4
  onLoad: string;
8
5
  onMessage: string;
9
6
  updateLayout: string;
7
+ id: string;
10
8
  disableScroll: string;
11
9
  hoverClass: string;
12
10
  hoverClassName: string;
13
11
  hoverStartTime: string;
14
12
  hoverStayTime: string;
15
13
  hidden: string;
14
+ className: string;
16
15
  animation: string;
16
+ style: string;
17
17
  hoverStopPropagation: string;
18
18
  onTap: string;
19
19
  onClick: string;
@@ -1,3 +1,3 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class-name', style: 'style', src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindmessage', updateLayout: 'update-layout' });
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindmessage', updateLayout: 'update-layout' });
3
3
  export const props = Object.values(alias);
@@ -32,3 +32,4 @@ export * from './Map';
32
32
  export * from './Camera';
33
33
  export * from './Progress';
34
34
  export * from './RichText';
35
+ export * from './Navigator';
@@ -32,3 +32,4 @@ export * from './Map';
32
32
  export * from './Camera';
33
33
  export * from './Progress';
34
34
  export * from './RichText';
35
+ export * from './Navigator';
@@ -32,6 +32,7 @@ import * as MapView from './Map/node';
32
32
  import * as Camera from './Camera/node';
33
33
  import * as RichText from './RichText/node';
34
34
  import * as Iframe from './Iframe/node';
35
+ import * as Navigator from './Navigator/node';
35
36
  const hostComponents = new Map();
36
37
  hostComponents.set('button', Button);
37
38
  hostComponents.set('canvas', Canvas);
@@ -67,4 +68,5 @@ hostComponents.set('camera', Camera);
67
68
  hostComponents.set('progress', Progress);
68
69
  hostComponents.set('rich-text', RichText);
69
70
  hostComponents.set('iframe', Iframe);
71
+ hostComponents.set('navigator', Navigator);
70
72
  export default hostComponents;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/adapter",
3
- "version": "1.3.0-beta.2-beta-2",
3
+ "version": "1.3.0-beta.3",
4
4
  "description": "Ray adapter for tuya",
5
5
  "keywords": [
6
6
  "ray"
@@ -21,7 +21,7 @@
21
21
  "watch": "concurrently 'yarn build:cjs --watch' 'yarn build:esm --watch'"
22
22
  },
23
23
  "devDependencies": {
24
- "@ray-js/types": "^1.3.0-beta.2-beta-2",
24
+ "@ray-js/types": "^1.3.0-beta.3",
25
25
  "concurrently": "^6.2.1"
26
26
  },
27
27
  "maintainers": [
@@ -31,10 +31,10 @@
31
31
  }
32
32
  ],
33
33
  "dependencies": {
34
- "@ray-core/runtime": "^0.2.6",
35
- "@ray-core/shared": "^0.2.6",
36
- "@ray-core/types": "^0.2.6"
34
+ "@ray-core/runtime": "^0.3.0-beta.4",
35
+ "@ray-core/shared": "^0.3.0-beta.4",
36
+ "@ray-core/types": "^0.3.0-beta.4"
37
37
  },
38
- "gitHead": "067ce2e382196cd995ebc4774fc5e977ac21115c",
38
+ "gitHead": "be72a5dad6214ebf9c6653df02956374c735c98e",
39
39
  "repository": {}
40
40
  }