@ray-js/adapter 1.8.0-beta.0 → 1.8.0-beta.2

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.
@@ -1,3 +1,3 @@
1
- import { PluginConstructor } from '@ray-core/types';
1
+ import type { PluginConstructor } from '@ray-core/types';
2
2
  declare const plugin: PluginConstructor;
3
3
  export default plugin;
@@ -1,3 +1,3 @@
1
- import { PluginConstructor } from '@ray-core/types';
1
+ import type { PluginConstructor } from '@ray-core/types';
2
2
  declare const plugin: PluginConstructor;
3
3
  export default plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/adapter",
3
- "version": "1.8.0-beta.0",
3
+ "version": "1.8.0-beta.2",
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.5.0-beta.1",
35
- "@ray-core/shared": "^0.5.0-beta.1",
36
- "@ray-core/types": "^0.5.0-beta.1"
34
+ "@ray-core/runtime": "^0.5.0-beta.2",
35
+ "@ray-core/shared": "^0.5.0-beta.2",
36
+ "@ray-core/types": "^0.5.0-beta.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/types": "1.8.0-beta.0",
39
+ "@ray-js/types": "1.8.0-beta.2",
40
40
  "concurrently": "^6.5.1"
41
41
  },
42
42
  "publishConfig": {
@@ -44,5 +44,5 @@
44
44
  "registry": "https://registry.npmjs.com"
45
45
  },
46
46
  "esnext": "./esm/index.js",
47
- "gitHead": "523885b576e8c52f1d4a209a3d6d61e53183f18c"
47
+ "gitHead": "ce4bcb6ebbf6c1c9608e62f30fc06015aa4b4167"
48
48
  }
@@ -1,6 +1,6 @@
1
1
  <template name="REMAX_TPL">
2
- <block ty:for="{{root.children}}" ty:key="*this">
3
- <template is="{{'REMAX_TPL_' + root.nodes[item].type}}" data="{{i: root.nodes[item]}}" />
2
+ <block ty:for="{{root.CH}}" ty:key="*this">
3
+ <template is="{{'REMAX_TPL_' + root.NS[item].TG}}" data="{{i: root.NS[item]}}" />
4
4
  </block>
5
5
  </template>
6
6
 
@@ -19,5 +19,5 @@
19
19
  <% } -%>
20
20
 
21
21
  <template name="REMAX_TPL_plain-text">
22
- <block>{{i.text}}</block>
22
+ <block>{{i.TX}}</block>
23
23
  </template>
@@ -1,73 +1,73 @@
1
1
  <template name="REMAX_TPL_<%=id%>">
2
2
  <%_ if (id === 'view') { -%>
3
- <block ty:if="{{i.props['catchtouchmove']}}">
4
- <<%=id%>
3
+ <block ty:if="{{i.PS['catchtouchmove']}}">
4
+ <<%=id%> data-sid="{{i.PS['data-sid']}}"
5
5
  <%# view 标签需要区分是否含 catchtouchmove 事件,区分渲染模板 避免冲突 -%>
6
6
  <%pp1 = props.filter(k => k !== 'bindtouchmove')-%>
7
7
  <%_ for(let i=0;i < pp1.length; i++) { -%>
8
- <%=pp1[i]%>="{{i.props['<%=pp1[i]%>']}}"
8
+ <%=pp1[i]%>="{{i.PS['<%=pp1[i]%>']}}"
9
9
  <%_ } -%>
10
10
  >
11
- <block ty:for="{{i.children}}" ty:key="*this">
12
- <template is="{{'REMAX_TPL_' + i.nodes[item].type}}" data="{{i: i.nodes[item]}}" />
11
+ <block ty:for="{{i.CH}}" ty:key="*this">
12
+ <template is="{{'REMAX_TPL_' + i.NS[item].TG}}" data="{{i: i.NS[item]}}" />
13
13
  </block>
14
14
  </<%=id%>>
15
15
  </block>
16
16
  <block ty:else>
17
- <<%=id%>
17
+ <<%=id%> data-sid="{{i.PS['data-sid']}}"
18
18
  <%pp2 = props.filter(k => k !== 'catchtouchmove')-%>
19
19
  <%_ for(let i=0;i < pp2.length; i++) { -%>
20
- <%=pp2[i]%>="{{i.props['<%=pp2[i]%>']}}"
20
+ <%=pp2[i]%>="{{i.PS['<%=pp2[i]%>']}}"
21
21
  <%_ } -%>
22
22
  >
23
- <block ty:for="{{i.children}}" ty:key="*this">
24
- <template is="{{'REMAX_TPL_' + i.nodes[item].type}}" data="{{i: i.nodes[item]}}" />
23
+ <block ty:for="{{i.CH}}" ty:key="*this">
24
+ <template is="{{'REMAX_TPL_' + i.NS[item].TG}}" data="{{i: i.NS[item]}}" />
25
25
  </block>
26
26
  </<%=id%>>
27
27
  </block>
28
28
  <%_ } else { -%>
29
- <<%=id%>
29
+ <<%=id%> data-sid="{{i.PS['data-sid']}}"
30
30
  <%_ for(let i=0;i < props.length; i++) { -%>
31
- <%=props[i]%>="{{i.props['<%=props[i]%>']}}"
31
+ <%=props[i]%>="{{i.PS['<%=props[i]%>']}}"
32
32
  <%_ } -%>
33
33
  >
34
34
  <%_ if (id === 'swiper') { -%>
35
- <block ty:for="{{i.children}}" ty:key="*this">
36
- <swiper-item key="{{i.nodes[item].props.key}}">
37
- <block ty:for="{{i.nodes[item].children}}" ty:key="*this" ty:for-item="sItem">
38
- <template is="{{'REMAX_TPL_' + i.nodes[item].nodes[sItem].type}}" data="{{i: i.nodes[item].nodes[sItem]}}" />
35
+ <block ty:for="{{i.CH}}" ty:key="*this">
36
+ <swiper-item key="{{i.NS[item].PS.key}}">
37
+ <block ty:for="{{i.NS[item].CH}}" ty:key="*this" ty:for-item="sItem">
38
+ <template is="{{'REMAX_TPL_' + i.NS[item].NS[sItem].TG}}" data="{{i: i.NS[item].NS[sItem]}}" />
39
39
  </block>
40
40
  </swiper-item>
41
41
  </block>
42
42
  <%_ } else if (id === 'picker-view') { -%>
43
- <block ty:for="{{i.children}}" ty:key="*this">
43
+ <block ty:for="{{i.CH}}" ty:key="*this">
44
44
  <picker-view-column>
45
- <block ty:for="{{i.nodes[item].children}}" ty:for-item="sItem">
46
- <template is="{{'REMAX_TPL_' + i.nodes[item].nodes[sItem].type}}" data="{{i: i.nodes[item].nodes[sItem]}}" />
45
+ <block ty:for="{{i.NS[item].CH}}" ty:for-item="sItem">
46
+ <template is="{{'REMAX_TPL_' + i.NS[item].NS[sItem].TG}}" data="{{i: i.NS[item].NS[sItem]}}" />
47
47
  </block>
48
48
  </picker-view-column>
49
49
  </block>
50
50
  <%_ } else if (type === 'native') { -%>
51
- <block ty:for="{{i.children}}" ty:key="*this">
52
- <block ty:if="{{i.nodes[item].props['slot']}}">
51
+ <block ty:for="{{i.CH}}" ty:key="*this">
52
+ <block ty:if="{{i.NS[item].PS['slot']}}">
53
53
  <view
54
- slot="{{i.nodes[item].props['slot']}}"
54
+ slot="{{i.NS[item].PS['slot']}}"
55
55
  <%_ for(let i=0;i < slotView.props.length; i++) { -%>
56
- <%=slotView.props[i]%>="{{i.nodes[item].props['<%=slotView.props[i]%>']}}"
56
+ <%=slotView.props[i]%>="{{i.NS[item].PS['<%=slotView.props[i]%>']}}"
57
57
  <%_ } -%>
58
58
  >
59
- <block ty:for="{{i.nodes[item].children}}" ty:key="*this" ty:for-item="sItem">
60
- <template is="{{'REMAX_TPL_' + i.nodes[item].nodes[sItem].type}}" data="{{i: i.nodes[item].nodes[sItem]}}" />
59
+ <block ty:for="{{i.NS[item].CH}}" ty:key="*this" ty:for-item="sItem">
60
+ <template is="{{'REMAX_TPL_' + i.NS[item].NS[sItem].TG}}" data="{{i: i.NS[item].NS[sItem]}}" />
61
61
  </block>
62
62
  </view>
63
63
  </block>
64
64
  <block ty:else>
65
- <template is="{{'REMAX_TPL_' + i.nodes[item].type}}" data="{{i: i.nodes[item]}}" />
65
+ <template is="{{'REMAX_TPL_' + i.NS[item].TG}}" data="{{i: i.NS[item]}}" />
66
66
  </block>
67
67
  </block>
68
68
  <%_ } else { -%>
69
- <block ty:for="{{i.children}}" ty:key="*this">
70
- <template is="{{'REMAX_TPL_' + i.nodes[item].type}}" data="{{i: i.nodes[item]}}" />
69
+ <block ty:for="{{i.CH}}" ty:key="*this">
70
+ <template is="{{'REMAX_TPL_' + i.NS[item].TG}}" data="{{i: i.NS[item]}}" />
71
71
  </block>
72
72
  <%_ } -%>
73
73
  </<%=id%>>