@ray-js/adapter 1.1.0 → 1.2.0-beta.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.
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import { BaseProps, DiffLayer, GenericEvent } from '../../types/component';
3
+ export interface IframeProps extends BaseProps, DiffLayer {
4
+ /**
5
+ * webview 指向网页的链接,网页需登录小程序管理后台配置业务域名。
6
+ */
7
+ src?: string;
8
+ /**
9
+ * 网页加载失败的时候触发此事件。e.detail = { url, fullUrl },其中 fullUrl 为加载失败时的完整 url
10
+ */
11
+ onError?: (event: GenericEvent) => any;
12
+ /**
13
+ * 网页加载成功时候触发此事件。e.detail = { src }
14
+ */
15
+ onLoad?: (event: GenericEvent) => any;
16
+ /**
17
+ * 网页向小程序 postMessage 时,会在特定时机(小程序后退、组件销毁、分享)触发并收到消息。e.detail = { data },data是多次 postMessage 的参数组成的数组
18
+ */
19
+ onMessage?: (event: GenericEvent) => any;
20
+ }
21
+ export declare const Iframe: React.ComponentType<IframeProps>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Iframe = void 0;
4
+ const runtime_1 = require("@ray-core/runtime");
5
+ exports.Iframe = (0, runtime_1.createHostComponent)('iframe');
6
+ exports.Iframe.defaultProps = {};
@@ -0,0 +1,31 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ src: string;
6
+ onError: string;
7
+ onLoad: string;
8
+ onMessage: string;
9
+ disableScroll: string;
10
+ hoverClass: string;
11
+ hoverClassName: string;
12
+ hoverStartTime: string;
13
+ hoverStayTime: string;
14
+ hidden: string;
15
+ animation: string;
16
+ hoverStopPropagation: string;
17
+ onTap: string;
18
+ onClick: string;
19
+ onTouchStart: string;
20
+ onTouchMove: string;
21
+ onTouchEnd: string;
22
+ onTouchCancel: string;
23
+ onLongTap: string;
24
+ onLongClick: string;
25
+ onLongPress: string;
26
+ onTransitionEnd: string;
27
+ onAnimationIteration: string;
28
+ onAnimationStart: string;
29
+ onAnimationEnd: string;
30
+ };
31
+ export declare const props: string[];
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.props = exports.alias = void 0;
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' });
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', src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindMessage', updateLayout: 'update-layout' });
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' });
6
6
  exports.props = Object.values(exports.alias);
@@ -27,6 +27,7 @@ export * from './IpcPlayer';
27
27
  export * from './CoverView';
28
28
  export * from './NativeVideo';
29
29
  export * from './WebView';
30
+ export * from './Iframe';
30
31
  export * from './Map';
31
32
  export * from './Camera';
32
33
  export * from './Progress';
@@ -43,6 +43,7 @@ __exportStar(require("./IpcPlayer"), exports);
43
43
  __exportStar(require("./CoverView"), exports);
44
44
  __exportStar(require("./NativeVideo"), exports);
45
45
  __exportStar(require("./WebView"), exports);
46
+ __exportStar(require("./Iframe"), exports);
46
47
  __exportStar(require("./Map"), exports);
47
48
  __exportStar(require("./Camera"), exports);
48
49
  __exportStar(require("./Progress"), exports);
@@ -56,6 +56,7 @@ const WebView = __importStar(require("./WebView/node"));
56
56
  const MapView = __importStar(require("./Map/node"));
57
57
  const Camera = __importStar(require("./Camera/node"));
58
58
  const RichText = __importStar(require("./RichText/node"));
59
+ const Iframe = __importStar(require("./Iframe/node"));
59
60
  const hostComponents = new Map();
60
61
  hostComponents.set('button', Button);
61
62
  hostComponents.set('canvas', Canvas);
@@ -90,4 +91,5 @@ hostComponents.set('map', MapView);
90
91
  hostComponents.set('camera', Camera);
91
92
  hostComponents.set('progress', Progress);
92
93
  hostComponents.set('rich-text', RichText);
94
+ hostComponents.set('iframe', Iframe);
93
95
  exports.default = hostComponents;
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import { BaseProps, DiffLayer, GenericEvent } from '../../types/component';
3
+ export interface IframeProps extends BaseProps, DiffLayer {
4
+ /**
5
+ * webview 指向网页的链接,网页需登录小程序管理后台配置业务域名。
6
+ */
7
+ src?: string;
8
+ /**
9
+ * 网页加载失败的时候触发此事件。e.detail = { url, fullUrl },其中 fullUrl 为加载失败时的完整 url
10
+ */
11
+ onError?: (event: GenericEvent) => any;
12
+ /**
13
+ * 网页加载成功时候触发此事件。e.detail = { src }
14
+ */
15
+ onLoad?: (event: GenericEvent) => any;
16
+ /**
17
+ * 网页向小程序 postMessage 时,会在特定时机(小程序后退、组件销毁、分享)触发并收到消息。e.detail = { data },data是多次 postMessage 的参数组成的数组
18
+ */
19
+ onMessage?: (event: GenericEvent) => any;
20
+ }
21
+ export declare const Iframe: React.ComponentType<IframeProps>;
@@ -0,0 +1,3 @@
1
+ import { createHostComponent } from '@ray-core/runtime';
2
+ export const Iframe = createHostComponent('iframe');
3
+ Iframe.defaultProps = {};
@@ -0,0 +1,31 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ src: string;
6
+ onError: string;
7
+ onLoad: string;
8
+ onMessage: string;
9
+ disableScroll: string;
10
+ hoverClass: string;
11
+ hoverClassName: string;
12
+ hoverStartTime: string;
13
+ hoverStayTime: string;
14
+ hidden: string;
15
+ animation: string;
16
+ hoverStopPropagation: string;
17
+ onTap: string;
18
+ onClick: string;
19
+ onTouchStart: string;
20
+ onTouchMove: string;
21
+ onTouchEnd: string;
22
+ onTouchCancel: string;
23
+ onLongTap: string;
24
+ onLongClick: string;
25
+ onLongPress: string;
26
+ onTransitionEnd: string;
27
+ onAnimationIteration: string;
28
+ onAnimationStart: string;
29
+ onAnimationEnd: string;
30
+ };
31
+ export declare const props: string[];
@@ -0,0 +1,3 @@
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' });
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', src: 'src', onError: 'binderror', onLoad: 'bindload', onMessage: 'bindMessage', updateLayout: 'update-layout' });
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' });
3
3
  export const props = Object.values(alias);
@@ -27,6 +27,7 @@ export * from './IpcPlayer';
27
27
  export * from './CoverView';
28
28
  export * from './NativeVideo';
29
29
  export * from './WebView';
30
+ export * from './Iframe';
30
31
  export * from './Map';
31
32
  export * from './Camera';
32
33
  export * from './Progress';
@@ -27,6 +27,7 @@ export * from './IpcPlayer';
27
27
  export * from './CoverView';
28
28
  export * from './NativeVideo';
29
29
  export * from './WebView';
30
+ export * from './Iframe';
30
31
  export * from './Map';
31
32
  export * from './Camera';
32
33
  export * from './Progress';
@@ -31,6 +31,7 @@ import * as WebView from './WebView/node';
31
31
  import * as MapView from './Map/node';
32
32
  import * as Camera from './Camera/node';
33
33
  import * as RichText from './RichText/node';
34
+ import * as Iframe from './Iframe/node';
34
35
  const hostComponents = new Map();
35
36
  hostComponents.set('button', Button);
36
37
  hostComponents.set('canvas', Canvas);
@@ -65,4 +66,5 @@ hostComponents.set('map', MapView);
65
66
  hostComponents.set('camera', Camera);
66
67
  hostComponents.set('progress', Progress);
67
68
  hostComponents.set('rich-text', RichText);
69
+ hostComponents.set('iframe', Iframe);
68
70
  export default hostComponents;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/adapter",
3
- "version": "1.1.0",
3
+ "version": "1.2.0-beta.0",
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.1.0",
24
+ "@ray-js/types": "^1.2.0-beta.0",
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.1",
35
- "@ray-core/shared": "^0.2.1",
36
- "@ray-core/types": "^0.2.1"
34
+ "@ray-core/runtime": "^0.3.0-beta.1",
35
+ "@ray-core/shared": "^0.3.0-beta.1",
36
+ "@ray-core/types": "^0.3.0-beta.1"
37
37
  },
38
- "gitHead": "83c5c44c333e21ebc00fe395d03f2d4eed1e84ba",
38
+ "gitHead": "7e74c61f91edf7d331396664808b5223f8a73950",
39
39
  "repository": {}
40
40
  }