@rsmax/wechat 1.3.14 → 2.0.0-canary.91

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 (217) hide show
  1. package/cjs/hostComponents/ChannelLive/node.d.ts +9 -2
  2. package/cjs/hostComponents/ChannelLive/node.js +8 -1
  3. package/cjs/hostComponents/ChannelVideo/index.d.ts +2 -2
  4. package/cjs/hostComponents/ChannelVideo/index.js +3 -2
  5. package/cjs/hostComponents/ChannelVideo/node.d.ts +11 -0
  6. package/cjs/hostComponents/ChannelVideo/node.js +11 -0
  7. package/cjs/hostComponents/DraggableSheet/index.d.ts +24 -0
  8. package/cjs/hostComponents/DraggableSheet/index.js +12 -0
  9. package/cjs/hostComponents/DraggableSheet/node.d.ts +13 -0
  10. package/cjs/hostComponents/DraggableSheet/node.js +16 -0
  11. package/cjs/hostComponents/EditorPortal/index.d.ts +3 -3
  12. package/cjs/hostComponents/EditorPortal/index.js +0 -3
  13. package/cjs/hostComponents/FunctionalPageNavigator/node.d.ts +5 -0
  14. package/cjs/hostComponents/FunctionalPageNavigator/node.js +5 -0
  15. package/cjs/hostComponents/GridBuilder/index.d.ts +29 -0
  16. package/cjs/hostComponents/GridBuilder/index.js +9 -0
  17. package/cjs/hostComponents/GridBuilder/node.d.ts +17 -0
  18. package/cjs/hostComponents/GridBuilder/node.js +20 -0
  19. package/cjs/hostComponents/GridView/index.d.ts +21 -0
  20. package/cjs/hostComponents/GridView/index.js +9 -0
  21. package/cjs/hostComponents/GridView/node.d.ts +13 -0
  22. package/cjs/hostComponents/GridView/node.js +16 -0
  23. package/cjs/hostComponents/Input/node.d.ts +2 -1
  24. package/cjs/hostComponents/Input/node.js +2 -1
  25. package/cjs/hostComponents/KeyboardAccessory/index.js +1 -1
  26. package/cjs/hostComponents/KeyboardAccessory/node.d.ts +8 -1
  27. package/cjs/hostComponents/KeyboardAccessory/node.js +9 -2
  28. package/cjs/hostComponents/ListBuilder/index.d.ts +25 -0
  29. package/cjs/hostComponents/ListBuilder/index.js +10 -0
  30. package/cjs/hostComponents/ListBuilder/node.d.ts +15 -0
  31. package/cjs/hostComponents/ListBuilder/node.js +18 -0
  32. package/cjs/hostComponents/ListView/index.d.ts +11 -0
  33. package/cjs/hostComponents/ListView/index.js +8 -0
  34. package/cjs/hostComponents/ListView/node.d.ts +8 -0
  35. package/cjs/hostComponents/ListView/node.js +11 -0
  36. package/cjs/hostComponents/MatchMedia/node.d.ts +4 -0
  37. package/cjs/hostComponents/MatchMedia/node.js +4 -0
  38. package/cjs/hostComponents/NavigationBar/node.d.ts +4 -0
  39. package/cjs/hostComponents/NavigationBar/node.js +4 -0
  40. package/cjs/hostComponents/NestedScrollBody/index.d.ts +11 -0
  41. package/cjs/hostComponents/NestedScrollBody/index.js +8 -0
  42. package/cjs/hostComponents/NestedScrollBody/node.d.ts +8 -0
  43. package/cjs/hostComponents/NestedScrollBody/node.js +11 -0
  44. package/cjs/hostComponents/NestedScrollHeader/index.d.ts +9 -0
  45. package/cjs/hostComponents/NestedScrollHeader/index.js +5 -0
  46. package/cjs/hostComponents/NestedScrollHeader/node.d.ts +7 -0
  47. package/cjs/hostComponents/NestedScrollHeader/node.js +10 -0
  48. package/cjs/hostComponents/OfficialAccount/node.d.ts +4 -0
  49. package/cjs/hostComponents/OfficialAccount/node.js +4 -0
  50. package/cjs/hostComponents/OfficialAccountPublish/index.d.ts +24 -0
  51. package/cjs/hostComponents/OfficialAccountPublish/index.js +14 -0
  52. package/cjs/hostComponents/OfficialAccountPublish/node.d.ts +15 -0
  53. package/cjs/hostComponents/OfficialAccountPublish/node.js +18 -0
  54. package/cjs/hostComponents/OpenContainer/index.d.ts +27 -0
  55. package/cjs/hostComponents/OpenContainer/index.js +11 -0
  56. package/cjs/hostComponents/OpenContainer/node.d.ts +16 -0
  57. package/cjs/hostComponents/OpenContainer/node.js +19 -0
  58. package/cjs/hostComponents/OpenData/node.d.ts +4 -0
  59. package/cjs/hostComponents/OpenData/node.js +9 -1
  60. package/cjs/hostComponents/OpenDataItem/index.d.ts +9 -0
  61. package/cjs/hostComponents/OpenDataItem/index.js +5 -0
  62. package/cjs/hostComponents/OpenDataItem/node.d.ts +7 -0
  63. package/cjs/hostComponents/OpenDataItem/node.js +10 -0
  64. package/cjs/hostComponents/OpenDataList/index.d.ts +13 -0
  65. package/cjs/hostComponents/OpenDataList/index.js +5 -0
  66. package/cjs/hostComponents/OpenDataList/node.d.ts +9 -0
  67. package/cjs/hostComponents/OpenDataList/node.js +12 -0
  68. package/cjs/hostComponents/PageContainer/node.d.ts +4 -0
  69. package/cjs/hostComponents/PageContainer/node.js +5 -1
  70. package/cjs/hostComponents/ScrollView/node.d.ts +1 -0
  71. package/cjs/hostComponents/ScrollView/node.js +1 -0
  72. package/cjs/hostComponents/Span/index.d.ts +9 -0
  73. package/cjs/hostComponents/Span/index.js +5 -0
  74. package/cjs/hostComponents/Span/node.d.ts +7 -0
  75. package/cjs/hostComponents/Span/node.js +10 -0
  76. package/cjs/hostComponents/StickyHeader/index.d.ts +17 -0
  77. package/cjs/hostComponents/StickyHeader/index.js +10 -0
  78. package/cjs/hostComponents/StickyHeader/node.d.ts +11 -0
  79. package/cjs/hostComponents/StickyHeader/node.js +14 -0
  80. package/cjs/hostComponents/StickySection/index.d.ts +9 -0
  81. package/cjs/hostComponents/StickySection/index.js +5 -0
  82. package/cjs/hostComponents/StickySection/node.d.ts +7 -0
  83. package/cjs/hostComponents/StickySection/node.js +10 -0
  84. package/cjs/hostComponents/StoreCoupon/index.d.ts +20 -0
  85. package/cjs/hostComponents/StoreCoupon/index.js +8 -0
  86. package/cjs/hostComponents/StoreCoupon/node.d.ts +13 -0
  87. package/cjs/hostComponents/StoreCoupon/node.js +16 -0
  88. package/cjs/hostComponents/StoreGift/index.d.ts +18 -0
  89. package/cjs/hostComponents/StoreGift/index.js +11 -0
  90. package/cjs/hostComponents/StoreGift/node.d.ts +12 -0
  91. package/cjs/hostComponents/StoreGift/node.js +15 -0
  92. package/cjs/hostComponents/StoreHome/index.d.ts +10 -0
  93. package/cjs/hostComponents/StoreHome/index.js +8 -0
  94. package/cjs/hostComponents/StoreHome/node.d.ts +8 -0
  95. package/cjs/hostComponents/StoreHome/node.js +11 -0
  96. package/cjs/hostComponents/StoreProduct/index.d.ts +28 -0
  97. package/cjs/hostComponents/StoreProduct/index.js +13 -0
  98. package/cjs/hostComponents/StoreProduct/node.d.ts +17 -0
  99. package/cjs/hostComponents/StoreProduct/node.js +20 -0
  100. package/cjs/hostComponents/index.d.ts +18 -0
  101. package/cjs/hostComponents/index.js +18 -0
  102. package/cjs/hostComponents/node.js +21 -11
  103. package/cjs/index.d.ts +2 -3
  104. package/cjs/index.js +25 -6
  105. package/cjs/node/index.js +17 -7
  106. package/esm/hostComponents/ChannelLive/node.d.ts +9 -2
  107. package/esm/hostComponents/ChannelLive/node.js +8 -1
  108. package/esm/hostComponents/ChannelVideo/index.d.ts +2 -2
  109. package/esm/hostComponents/ChannelVideo/index.js +3 -2
  110. package/esm/hostComponents/ChannelVideo/node.d.ts +11 -0
  111. package/esm/hostComponents/ChannelVideo/node.js +11 -0
  112. package/esm/hostComponents/DraggableSheet/index.d.ts +24 -0
  113. package/esm/hostComponents/DraggableSheet/index.js +9 -0
  114. package/esm/hostComponents/DraggableSheet/node.d.ts +13 -0
  115. package/esm/hostComponents/DraggableSheet/node.js +13 -0
  116. package/esm/hostComponents/EditorPortal/index.d.ts +3 -3
  117. package/esm/hostComponents/EditorPortal/index.js +0 -3
  118. package/esm/hostComponents/FunctionalPageNavigator/node.d.ts +5 -0
  119. package/esm/hostComponents/FunctionalPageNavigator/node.js +5 -0
  120. package/esm/hostComponents/GridBuilder/index.d.ts +29 -0
  121. package/esm/hostComponents/GridBuilder/index.js +6 -0
  122. package/esm/hostComponents/GridBuilder/node.d.ts +17 -0
  123. package/esm/hostComponents/GridBuilder/node.js +17 -0
  124. package/esm/hostComponents/GridView/index.d.ts +21 -0
  125. package/esm/hostComponents/GridView/index.js +6 -0
  126. package/esm/hostComponents/GridView/node.d.ts +13 -0
  127. package/esm/hostComponents/GridView/node.js +13 -0
  128. package/esm/hostComponents/Input/node.d.ts +2 -1
  129. package/esm/hostComponents/Input/node.js +2 -1
  130. package/esm/hostComponents/KeyboardAccessory/index.js +1 -1
  131. package/esm/hostComponents/KeyboardAccessory/node.d.ts +8 -1
  132. package/esm/hostComponents/KeyboardAccessory/node.js +9 -2
  133. package/esm/hostComponents/ListBuilder/index.d.ts +25 -0
  134. package/esm/hostComponents/ListBuilder/index.js +7 -0
  135. package/esm/hostComponents/ListBuilder/node.d.ts +15 -0
  136. package/esm/hostComponents/ListBuilder/node.js +15 -0
  137. package/esm/hostComponents/ListView/index.d.ts +11 -0
  138. package/esm/hostComponents/ListView/index.js +5 -0
  139. package/esm/hostComponents/ListView/node.d.ts +8 -0
  140. package/esm/hostComponents/ListView/node.js +8 -0
  141. package/esm/hostComponents/MatchMedia/node.d.ts +4 -0
  142. package/esm/hostComponents/MatchMedia/node.js +4 -0
  143. package/esm/hostComponents/NavigationBar/node.d.ts +4 -0
  144. package/esm/hostComponents/NavigationBar/node.js +4 -0
  145. package/esm/hostComponents/NestedScrollBody/index.d.ts +11 -0
  146. package/esm/hostComponents/NestedScrollBody/index.js +5 -0
  147. package/esm/hostComponents/NestedScrollBody/node.d.ts +8 -0
  148. package/esm/hostComponents/NestedScrollBody/node.js +8 -0
  149. package/esm/hostComponents/NestedScrollHeader/index.d.ts +9 -0
  150. package/esm/hostComponents/NestedScrollHeader/index.js +2 -0
  151. package/esm/hostComponents/NestedScrollHeader/node.d.ts +7 -0
  152. package/esm/hostComponents/NestedScrollHeader/node.js +7 -0
  153. package/esm/hostComponents/OfficialAccount/node.d.ts +4 -0
  154. package/esm/hostComponents/OfficialAccount/node.js +4 -0
  155. package/esm/hostComponents/OfficialAccountPublish/index.d.ts +24 -0
  156. package/esm/hostComponents/OfficialAccountPublish/index.js +11 -0
  157. package/esm/hostComponents/OfficialAccountPublish/node.d.ts +15 -0
  158. package/esm/hostComponents/OfficialAccountPublish/node.js +15 -0
  159. package/esm/hostComponents/OpenContainer/index.d.ts +27 -0
  160. package/esm/hostComponents/OpenContainer/index.js +8 -0
  161. package/esm/hostComponents/OpenContainer/node.d.ts +16 -0
  162. package/esm/hostComponents/OpenContainer/node.js +16 -0
  163. package/esm/hostComponents/OpenData/node.d.ts +4 -0
  164. package/esm/hostComponents/OpenData/node.js +9 -1
  165. package/esm/hostComponents/OpenDataItem/index.d.ts +9 -0
  166. package/esm/hostComponents/OpenDataItem/index.js +2 -0
  167. package/esm/hostComponents/OpenDataItem/node.d.ts +7 -0
  168. package/esm/hostComponents/OpenDataItem/node.js +7 -0
  169. package/esm/hostComponents/OpenDataList/index.d.ts +13 -0
  170. package/esm/hostComponents/OpenDataList/index.js +2 -0
  171. package/esm/hostComponents/OpenDataList/node.d.ts +9 -0
  172. package/esm/hostComponents/OpenDataList/node.js +9 -0
  173. package/esm/hostComponents/PageContainer/node.d.ts +4 -0
  174. package/esm/hostComponents/PageContainer/node.js +5 -1
  175. package/esm/hostComponents/ScrollView/node.d.ts +1 -0
  176. package/esm/hostComponents/ScrollView/node.js +1 -0
  177. package/esm/hostComponents/Span/index.d.ts +9 -0
  178. package/esm/hostComponents/Span/index.js +2 -0
  179. package/esm/hostComponents/Span/node.d.ts +7 -0
  180. package/esm/hostComponents/Span/node.js +7 -0
  181. package/esm/hostComponents/StickyHeader/index.d.ts +17 -0
  182. package/esm/hostComponents/StickyHeader/index.js +7 -0
  183. package/esm/hostComponents/StickyHeader/node.d.ts +11 -0
  184. package/esm/hostComponents/StickyHeader/node.js +11 -0
  185. package/esm/hostComponents/StickySection/index.d.ts +9 -0
  186. package/esm/hostComponents/StickySection/index.js +2 -0
  187. package/esm/hostComponents/StickySection/node.d.ts +7 -0
  188. package/esm/hostComponents/StickySection/node.js +7 -0
  189. package/esm/hostComponents/StoreCoupon/index.d.ts +20 -0
  190. package/esm/hostComponents/StoreCoupon/index.js +5 -0
  191. package/esm/hostComponents/StoreCoupon/node.d.ts +13 -0
  192. package/esm/hostComponents/StoreCoupon/node.js +13 -0
  193. package/esm/hostComponents/StoreGift/index.d.ts +18 -0
  194. package/esm/hostComponents/StoreGift/index.js +8 -0
  195. package/esm/hostComponents/StoreGift/node.d.ts +12 -0
  196. package/esm/hostComponents/StoreGift/node.js +12 -0
  197. package/esm/hostComponents/StoreHome/index.d.ts +10 -0
  198. package/esm/hostComponents/StoreHome/index.js +5 -0
  199. package/esm/hostComponents/StoreHome/node.d.ts +8 -0
  200. package/esm/hostComponents/StoreHome/node.js +8 -0
  201. package/esm/hostComponents/StoreProduct/index.d.ts +28 -0
  202. package/esm/hostComponents/StoreProduct/index.js +10 -0
  203. package/esm/hostComponents/StoreProduct/node.d.ts +17 -0
  204. package/esm/hostComponents/StoreProduct/node.js +17 -0
  205. package/esm/hostComponents/index.d.ts +18 -0
  206. package/esm/hostComponents/index.js +18 -0
  207. package/esm/hostComponents/node.js +4 -4
  208. package/esm/index.d.ts +2 -3
  209. package/esm/index.js +2 -3
  210. package/package.json +38 -8
  211. package/templates/base.ejs +34 -18
  212. package/templates/children.ejs +5 -5
  213. package/templates/page.ejs +6 -0
  214. package/cjs/api/index.d.ts +0 -466
  215. package/cjs/api/index.js +0 -587
  216. package/esm/api/index.d.ts +0 -466
  217. package/esm/api/index.js +0 -575
@@ -0,0 +1,11 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ animation: string;
6
+ offsetTop: string;
7
+ allowOverlapping: string;
8
+ padding: string;
9
+ onStickOnTopChange: string;
10
+ };
11
+ export declare const props: string[];
@@ -0,0 +1,11 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ animation: 'animation',
6
+ offsetTop: 'offset-top',
7
+ allowOverlapping: 'allow-overlapping',
8
+ padding: 'padding',
9
+ onStickOnTopChange: 'bind:stickontopchange',
10
+ };
11
+ export const props = Object.values(alias);
@@ -0,0 +1,9 @@
1
+ import type * as React from 'react';
2
+ import type { BaseProps } from '../../types/component';
3
+ /**
4
+ * Skyline 吸顶布局分区容器
5
+ * https://developers.weixin.qq.com/miniprogram/dev/component/sticky-section.html
6
+ */
7
+ export interface StickySectionProps extends BaseProps {
8
+ }
9
+ export declare const StickySection: React.ComponentType<StickySectionProps>;
@@ -0,0 +1,2 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ export const StickySection = createHostComponent('sticky-section');
@@ -0,0 +1,7 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ animation: string;
6
+ };
7
+ export declare const props: string[];
@@ -0,0 +1,7 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ animation: 'animation',
6
+ };
7
+ export const props = Object.values(alias);
@@ -0,0 +1,20 @@
1
+ import type React from 'react';
2
+ import type { BaseProps, GenericEvent } from '../../types/component';
3
+ export interface StoreCouponProps extends BaseProps {
4
+ /** 小店appid 3.8.3 */
5
+ appid?: string;
6
+ /** 优惠券id */
7
+ couponId?: string;
8
+ /** 自定义样式。支持的样式项参见 custom-style 说明 */
9
+ customStyle?: Record<string, string | number>;
10
+ /** 推客参数。用于机构推广券染色 3.8.11 */
11
+ promoterShareLink?: string;
12
+ /** 跳转小店成功的回调 */
13
+ onEnterSuccess?: (event: GenericEvent) => void;
14
+ /** 跳转小店失败的回调,event.detail={code,message} */
15
+ onEnterError?: (event: GenericEvent) => void;
16
+ }
17
+ /**
18
+ * https://developers.weixin.qq.com/miniprogram/dev/component/store-coupon.html
19
+ */
20
+ export declare const StoreCoupon: React.ComponentType<StoreCouponProps>;
@@ -0,0 +1,5 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ /**
3
+ * https://developers.weixin.qq.com/miniprogram/dev/component/store-coupon.html
4
+ */
5
+ export const StoreCoupon = createHostComponent('store-coupon');
@@ -0,0 +1,13 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ animation: string;
6
+ appid: string;
7
+ couponId: string;
8
+ customStyle: string;
9
+ promoterShareLink: string;
10
+ onEnterSuccess: string;
11
+ onEnterError: string;
12
+ };
13
+ export declare const props: string[];
@@ -0,0 +1,13 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ animation: 'animation',
6
+ appid: 'appid',
7
+ couponId: 'coupon-id',
8
+ customStyle: 'custom-style',
9
+ promoterShareLink: 'promoter-share-link',
10
+ onEnterSuccess: 'bindentersuccess',
11
+ onEnterError: 'bindentererror',
12
+ };
13
+ export const props = Object.values(alias);
@@ -0,0 +1,18 @@
1
+ import type React from 'react';
2
+ import type { BaseProps, GenericEvent } from '../../types/component';
3
+ export interface StoreGiftProps extends BaseProps {
4
+ /** 礼物订单id 3.8.10 */
5
+ presentOrderId?: string;
6
+ /** 用户openid 3.8.10 */
7
+ openId?: string;
8
+ /** 是否展示礼物卡片,默认展示 3.8.10 */
9
+ showGiftCard?: boolean;
10
+ /** 打开礼物成功的回调,event.detail={code,message} */
11
+ onSuccess?: (event: GenericEvent) => void;
12
+ /** 打开礼物失败的回调,event.detail={code,message} */
13
+ onError?: (event: GenericEvent) => void;
14
+ }
15
+ /**
16
+ * https://developers.weixin.qq.com/miniprogram/dev/component/store-gift.html
17
+ */
18
+ export declare const StoreGift: React.ComponentType<StoreGiftProps>;
@@ -0,0 +1,8 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ /**
3
+ * https://developers.weixin.qq.com/miniprogram/dev/component/store-gift.html
4
+ */
5
+ export const StoreGift = createHostComponent('store-gift');
6
+ StoreGift.defaultProps = {
7
+ showGiftCard: true,
8
+ };
@@ -0,0 +1,12 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ animation: string;
6
+ presentOrderId: string;
7
+ openId: string;
8
+ showGiftCard: string;
9
+ onSuccess: string;
10
+ onError: string;
11
+ };
12
+ export declare const props: string[];
@@ -0,0 +1,12 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ animation: 'animation',
6
+ presentOrderId: 'present-order-id',
7
+ openId: 'open-id',
8
+ showGiftCard: 'show-gift-card',
9
+ onSuccess: 'bindsuccess',
10
+ onError: 'binderror',
11
+ };
12
+ export const props = Object.values(alias);
@@ -0,0 +1,10 @@
1
+ import type React from 'react';
2
+ import type { BaseProps } from '../../types/component';
3
+ export interface StoreHomeProps extends BaseProps {
4
+ /** 小店appid 3.5.5 */
5
+ appid?: string;
6
+ }
7
+ /**
8
+ * https://developers.weixin.qq.com/miniprogram/dev/component/store-home.html
9
+ */
10
+ export declare const StoreHome: React.ComponentType<StoreHomeProps>;
@@ -0,0 +1,5 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ /**
3
+ * https://developers.weixin.qq.com/miniprogram/dev/component/store-home.html
4
+ */
5
+ export const StoreHome = createHostComponent('store-home');
@@ -0,0 +1,8 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ animation: string;
6
+ appid: string;
7
+ };
8
+ export declare const props: string[];
@@ -0,0 +1,8 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ animation: 'animation',
6
+ appid: 'appid',
7
+ };
8
+ export const props = Object.values(alias);
@@ -0,0 +1,28 @@
1
+ import type React from 'react';
2
+ import type { BaseProps, GenericEvent } from '../../types/component';
3
+ export interface StoreProductProps extends BaseProps {
4
+ /** 小店appid 3.5.5 */
5
+ appid?: string;
6
+ /** 商品id 3.5.5 */
7
+ productId?: string;
8
+ /** 带货商品跟佣信息 3.5.5 */
9
+ productPromotionLink?: string;
10
+ /** 媒体文件id 3.7.1 */
11
+ mediaId?: string;
12
+ /** 自定义样式 3.7.1 */
13
+ customStyle?: Record<string, string | number>;
14
+ /** 开启自定义插槽 3.7.2 */
15
+ customContent?: boolean;
16
+ /** 设置点击打开的页面(同时开启 custom-content 后生效)3.7.4 */
17
+ openPage?: 'product-detail' | 'gift-product-detail' | 'buy';
18
+ /** 设置小店标识的位置(同时开启 custom-content 后生效)3.7.2 */
19
+ logoPosition?: 'bottom-left' | 'bottom-right';
20
+ /** 跳转小店成功的回调 3.7.1 */
21
+ onEnterSuccess?: (event: GenericEvent) => void;
22
+ /** 跳转小店失败的回调,event.detail={code,message} 3.7.1 */
23
+ onEnterError?: (event: GenericEvent) => void;
24
+ }
25
+ /**
26
+ * https://developers.weixin.qq.com/miniprogram/dev/component/store-product.html
27
+ */
28
+ export declare const StoreProduct: React.ComponentType<StoreProductProps>;
@@ -0,0 +1,10 @@
1
+ import { createHostComponent } from '@rsmax/runtime';
2
+ /**
3
+ * https://developers.weixin.qq.com/miniprogram/dev/component/store-product.html
4
+ */
5
+ export const StoreProduct = createHostComponent('store-product');
6
+ StoreProduct.defaultProps = {
7
+ customContent: false,
8
+ openPage: 'product-detail',
9
+ logoPosition: 'bottom-left',
10
+ };
@@ -0,0 +1,17 @@
1
+ export declare const alias: {
2
+ id: string;
3
+ className: string;
4
+ style: string;
5
+ animation: string;
6
+ appid: string;
7
+ productId: string;
8
+ productPromotionLink: string;
9
+ mediaId: string;
10
+ customStyle: string;
11
+ customContent: string;
12
+ openPage: string;
13
+ logoPosition: string;
14
+ onEnterSuccess: string;
15
+ onEnterError: string;
16
+ };
17
+ export declare const props: string[];
@@ -0,0 +1,17 @@
1
+ export const alias = {
2
+ id: 'id',
3
+ className: 'class',
4
+ style: 'style',
5
+ animation: 'animation',
6
+ appid: 'appid',
7
+ productId: 'product-id',
8
+ productPromotionLink: 'product-promotion-link',
9
+ mediaId: 'media-id',
10
+ customStyle: 'custom-style',
11
+ customContent: 'custom-content',
12
+ openPage: 'open-page',
13
+ logoPosition: 'logo-position',
14
+ onEnterSuccess: 'bindentersuccess',
15
+ onEnterError: 'bindentererror',
16
+ };
17
+ export const props = Object.values(alias);
@@ -53,3 +53,21 @@ export * from './AdCustom';
53
53
  export * from './PageMeta';
54
54
  export * from './NavigationBar';
55
55
  export * from './Selection';
56
+ export * from './OfficialAccountPublish';
57
+ export * from './StoreCoupon';
58
+ export * from './StoreGift';
59
+ export * from './StoreHome';
60
+ export * from './StoreProduct';
61
+ export * from './DraggableSheet';
62
+ export * from './GridBuilder';
63
+ export * from './ListView';
64
+ export * from './ListBuilder';
65
+ export * from './GridView';
66
+ export * from './OpenContainer';
67
+ export * from './NestedScrollBody';
68
+ export * from './OpenDataList';
69
+ export * from './OpenDataItem';
70
+ export * from './StickyHeader';
71
+ export * from './StickySection';
72
+ export * from './Span';
73
+ export * from './NestedScrollHeader';
@@ -53,3 +53,21 @@ export * from './AdCustom';
53
53
  export * from './PageMeta';
54
54
  export * from './NavigationBar';
55
55
  export * from './Selection';
56
+ export * from './OfficialAccountPublish';
57
+ export * from './StoreCoupon';
58
+ export * from './StoreGift';
59
+ export * from './StoreHome';
60
+ export * from './StoreProduct';
61
+ export * from './DraggableSheet';
62
+ export * from './GridBuilder';
63
+ export * from './ListView';
64
+ export * from './ListBuilder';
65
+ export * from './GridView';
66
+ export * from './OpenContainer';
67
+ export * from './NestedScrollBody';
68
+ export * from './OpenDataList';
69
+ export * from './OpenDataItem';
70
+ export * from './StickyHeader';
71
+ export * from './StickySection';
72
+ export * from './Span';
73
+ export * from './NestedScrollHeader';
@@ -4,8 +4,8 @@ import * as audio from './Audio/node';
4
4
  import * as button from './Button/node';
5
5
  import * as camera from './Camera/node';
6
6
  import * as canvas from './Canvas/node';
7
- import * as channelLive from './ChannelLive';
8
- import * as channelVideo from './ChannelVideo';
7
+ import * as channelLive from './ChannelLive/node';
8
+ import * as channelVideo from './ChannelVideo/node';
9
9
  import * as checkbox from './Checkbox/node';
10
10
  import * as checkboxGroup from './CheckboxGroup/node';
11
11
  import * as coverImage from './CoverImage/node';
@@ -40,10 +40,10 @@ import * as radioGroup from './RadioGroup/node';
40
40
  import * as richText from './RichText/node';
41
41
  import * as rootPortal from './RootPortal/node';
42
42
  import * as scrollView from './ScrollView/node';
43
- import * as selection from './Selection';
43
+ import * as selection from './Selection/node';
44
44
  import * as shareElement from './ShareElement/node';
45
45
  import * as slider from './Slider/node';
46
- import * as snapshot from './Snapshot';
46
+ import * as snapshot from './Snapshot/node';
47
47
  import * as swiper from './Swiper/node';
48
48
  import * as swiperItem from './SwiperItem/node';
49
49
  import * as switchComponent from './Switch/node';
package/esm/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- export * from './hostComponents';
2
- export * from './api';
3
- export * from './types';
1
+ export * as component from './hostComponents';
2
+ export * as types from './types';
package/esm/index.js CHANGED
@@ -1,3 +1,2 @@
1
- export * from './hostComponents';
2
- export * from './api';
3
- export * from './types';
1
+ export * as component from './hostComponents';
2
+ export * as types from './types';
package/package.json CHANGED
@@ -1,28 +1,58 @@
1
1
  {
2
2
  "name": "@rsmax/wechat",
3
- "version": "1.3.14",
3
+ "version": "2.0.0-canary.91+5982cbe",
4
4
  "description": "Rsmax for Wechat",
5
5
  "repository": "git+https://github.com/remaxjs/remax.git",
6
6
  "license": "MIT",
7
+ "sideEffects": false,
8
+ "exports": {
9
+ "./types": {
10
+ "types": "./esm/types/index.d.ts",
11
+ "import": "./esm/types/index.js",
12
+ "require": "./cjs/types/index.js"
13
+ },
14
+ "./component": {
15
+ "types": "./esm/hostComponents/index.d.ts",
16
+ "import": "./esm/hostComponents/index.js",
17
+ "require": "./cjs/hostComponents/index.js"
18
+ },
19
+ "./node": {
20
+ "types": "./esm/node/index.d.ts",
21
+ "import": "./esm/node/index.js",
22
+ "require": "./cjs/node/index.js"
23
+ }
24
+ },
7
25
  "main": "./cjs/index.js",
8
26
  "module": "./esm/index.js",
27
+ "typesVersions": {
28
+ "*": {
29
+ "types": [
30
+ "esm/types/index.d.ts"
31
+ ],
32
+ "component": [
33
+ "esm/hostComponents/index.d.ts"
34
+ ],
35
+ "node": [
36
+ "esm/node/index.d.ts"
37
+ ]
38
+ }
39
+ },
9
40
  "typings": "./esm/index.d.ts",
10
41
  "scripts": {
11
42
  "prebuild": "npm run clean",
12
43
  "build": "tsc",
13
44
  "build:cjs": "tsc --module CommonJS --outDir cjs",
14
45
  "clean": "rimraf cjs esm tsconfig.tsbuildinfo",
15
- "dev": "rslib build",
16
46
  "test": "rstest run"
17
47
  },
18
48
  "dependencies": {
19
- "@rsmax/framework-shared": "1.3.14",
20
- "@rsmax/runtime": "1.3.14",
21
- "@rsmax/shared": "1.3.14",
22
- "miniprogram-api-typings": "^4.0.7"
49
+ "@rsmax/framework-shared": "2.0.0-canary.91+5982cbe",
50
+ "@rsmax/runtime": "2.0.0-canary.91+5982cbe",
51
+ "@rsmax/shared": "2.0.0-canary.91+5982cbe",
52
+ "miniprogram-api-typings": "^4.1.0"
23
53
  },
24
54
  "devDependencies": {
25
- "@rsmax/types": "1.3.14",
55
+ "@rsmax/types": "2.0.0-canary.91+5982cbe",
26
56
  "@types/react": "^18.3.0",
27
57
  "@types/react-test-renderer": "^18.3.0",
28
58
  "react": "^18.3.0",
@@ -32,5 +62,5 @@
32
62
  "access": "public"
33
63
  },
34
64
  "esnext": "./esm/index.js",
35
- "gitHead": "a542ee33a167f862ec9db0f7466a33f1cef31106"
65
+ "gitHead": "5982cbe3e1e3a3bf52fa41d0c31bfb043277f669"
36
66
  }
@@ -5,24 +5,40 @@
5
5
  </template>
6
6
 
7
7
  <wxs module="_h">
8
- var elements = {};
8
+ var __cache = {};
9
+
9
10
  module.exports = {
10
- v: function(value) {
11
- return value!== undefined ? value : '';
12
- },
13
- tid: function (type, ancestor) {
14
- var items = ancestor.split(',');
15
- var depth = 1;
16
-
17
- for (var i = 0; i < items.length; i++) {
18
- if (type === items[i]) {
19
- depth = depth + 1;
20
- }
21
- }
22
-
23
- var id = 'REMAX_TPL_' + depth + '_' + type;
24
- return id;
25
- }
11
+ v: function (value) {
12
+ return value == null ? '' : value;
13
+ },
14
+
15
+ tid: function (type, ancestor) {
16
+ var chain = ancestor || '';
17
+ var key = type + '::' + chain;
18
+
19
+ var cached = __cache[key];
20
+ if (cached) {
21
+ return cached;
22
+ }
23
+
24
+ var count = 0;
25
+ if (chain) {
26
+ var items = chain.split(',');
27
+ for (var i = 0; i < items.length; i++) {
28
+ if (items[i] === type) {
29
+ count = count + 1;
30
+ }
31
+ }
32
+ }
33
+
34
+ var id = 'REMAX_TPL_' + (1 + count) + '_' + type;
35
+ __cache[key] = id;
36
+ return id;
37
+ },
38
+
39
+ container: function (tid) {
40
+ return 'REMAX_TPL_' + (tid + 1) + '_CONTAINER';
41
+ }
26
42
  };
27
43
  </wxs>
28
44
 
@@ -48,7 +64,7 @@ slotView: slotView
48
64
  <block>{{i.text}}</block>
49
65
  </template>
50
66
 
51
- <% for (var i = 1; i <= depth['view']; i++) { -%>
67
+ <% for (var i = 1; i <= depth['view'] + 1; i++) { -%>
52
68
  <template name="REMAX_TPL_<%=i%>_CONTAINER" data="{{i: i}}">
53
69
  <template is="{{_h.tid(i.type, a)}}" data="{{i: i, a: a + ',' + i.type, tid: <%=i%>}}" />
54
70
  </template>
@@ -2,7 +2,7 @@
2
2
  <block wx:for="{{i.children}}" wx:key="*this">
3
3
  <swiper-item class="{{i.nodes[item].props.class}}" item-id="{{i.nodes[item].props.itemId}}" key="{{i.nodes[item].props.key}}">
4
4
  <block wx:for="{{i.nodes[item].children}}" wx:key="*this" wx:for-item="sItem">
5
- <template is="{{'REMAX_TPL_' + (tid + 1) + '_CONTAINER'}}" data="{{i: i.nodes[item].nodes[sItem], a: a, tid: tid + 1 }}" />
5
+ <template is="{{_h.container(tid)}}" data="{{i: i.nodes[item].nodes[sItem], a: a, tid: tid + 1 }}" />
6
6
  </block>
7
7
  </swiper-item>
8
8
  </block>
@@ -11,20 +11,20 @@
11
11
  <block wx:if="{{i.nodes[item].props['slot']}}">
12
12
  <view slot="{{i.nodes[item].props['slot']}}"
13
13
  <%_ for(let i=0;i < slotView.props.length; i++) { %>
14
- <%=slotView.props[i]%>="{{i.nodes[item].props['<%=slotView.props[i]%>']}}"
14
+ <%=slotView.props[i]%>="{{_h.v(i.nodes[item].props['<%=slotView.props[i]%>'])}}"
15
15
  <%_ } -%>
16
16
  >
17
17
  <block wx:for="{{i.nodes[item].children}}" wx:key="*this" wx:for-item="sItem">
18
- <template is="{{'REMAX_TPL_' + (tid + 1) + '_CONTAINER'}}" data="{{i: i.nodes[item].nodes[sItem], a: a, tid: tid + 1 }}" />
18
+ <template is="{{_h.container(tid)}}" data="{{i: i.nodes[item].nodes[sItem], a: a, tid: tid + 1 }}" />
19
19
  </block>
20
20
  </view>
21
21
  </block>
22
22
  <block wx:else>
23
- <template is="{{'REMAX_TPL_' + (tid + 1) + '_CONTAINER'}}" data="{{i: i.nodes[item], a: a, tid: tid + 1 }}" />
23
+ <template is="{{_h.container(tid)}}" data="{{i: i.nodes[item], a: a, tid: tid + 1 }}" />
24
24
  </block>
25
25
  </block>
26
26
  <% } else { -%>
27
27
  <block wx:for="{{i.children}}" wx:key="*this">
28
- <template is="{{'REMAX_TPL_' + (tid + 1) + '_CONTAINER'}}" data="{{i: i.nodes[item], a: a, tid: tid + 1 }}" />
28
+ <template is="{{_h.container(tid)}}" data="{{i: i.nodes[item], a: a, tid: tid + 1 }}" />
29
29
  </block>
30
30
  <% } -%>
@@ -1,3 +1,9 @@
1
1
  <import src="<%= baseTemplate %>"/>
2
+ <%_ if (typeof skeleton !== 'undefined' && skeleton.importSrc) { -%>
3
+ <import src="<%= skeleton.importSrc %>" />
4
+ <%_ } -%>
5
+ <%_ if (typeof skeleton !== 'undefined' && skeleton.templateName) { -%>
6
+ <template is="<%= skeleton.templateName %>" wx:if="{{root.children.length === 0}}" />
7
+ <%_ } -%>
2
8
  <template is="REMAX_TPL" data="{{root: root}}" />
3
9
  <template is="REMAX_TPL" data="{{ root: modalRoot }}" />