vite-plugin-taro-runtime 0.8.7 → 0.8.9
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.
- package/dist/plugin-platform-alipay/types/components-react.d.ts +1 -1
- package/dist/plugin-platform-tt/types/components-react.d.ts +1 -1
- package/dist/plugin-platform-weapp/types/components-react.d.ts +1 -1
- package/dist/plugin-platform-xhs/components-react.js +47 -0
- package/dist/plugin-platform-xhs/components-react.js.map +1 -0
- package/dist/plugin-platform-xhs/runtime-utils.js +123 -0
- package/dist/plugin-platform-xhs/runtime-utils.js.map +1 -0
- package/dist/plugin-platform-xhs/runtime.js +124 -0
- package/dist/plugin-platform-xhs/runtime.js.map +1 -0
- package/dist/plugin-platform-xhs/types/apis-list.d.ts +1 -0
- package/dist/plugin-platform-xhs/types/apis.d.ts +1 -0
- package/dist/plugin-platform-xhs/types/components-react.d.ts +4 -0
- package/dist/plugin-platform-xhs/types/components.d.ts +69 -0
- package/dist/plugin-platform-xhs/types/index.d.ts +8 -0
- package/dist/plugin-platform-xhs/types/program.d.ts +27 -0
- package/dist/plugin-platform-xhs/types/runtime-utils.d.ts +9 -0
- package/dist/plugin-platform-xhs/types/runtime.d.ts +1 -0
- package/dist/plugin-platform-xhs/types/template.d.ts +70 -0
- package/package.json +14 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const View = 'view';
|
|
2
|
+
const Icon = 'icon';
|
|
3
|
+
const Progress = 'progress';
|
|
4
|
+
const RichText = 'rich-text';
|
|
5
|
+
const Text = 'text';
|
|
6
|
+
const Button = 'button';
|
|
7
|
+
const Checkbox = 'checkbox';
|
|
8
|
+
const CheckboxGroup = 'checkbox-group';
|
|
9
|
+
const Form = 'form';
|
|
10
|
+
const Input = 'input';
|
|
11
|
+
const Label = 'label';
|
|
12
|
+
const Picker = 'picker';
|
|
13
|
+
const PickerView = 'picker-view';
|
|
14
|
+
const PickerViewColumn = 'picker-view-column';
|
|
15
|
+
const Radio = 'radio';
|
|
16
|
+
const RadioGroup = 'radio-group';
|
|
17
|
+
const Slider = 'slider';
|
|
18
|
+
const Switch = 'switch';
|
|
19
|
+
const CoverImage = 'cover-image';
|
|
20
|
+
const Textarea = 'textarea';
|
|
21
|
+
const CoverView = 'cover-view';
|
|
22
|
+
const MovableArea = 'movable-area';
|
|
23
|
+
const MovableView = 'movable-view';
|
|
24
|
+
const ScrollView = 'scroll-view';
|
|
25
|
+
const Swiper = 'swiper';
|
|
26
|
+
const SwiperItem = 'swiper-item';
|
|
27
|
+
const Navigator = 'navigator';
|
|
28
|
+
const Audio = 'audio';
|
|
29
|
+
const Camera = 'camera';
|
|
30
|
+
const Image = 'image';
|
|
31
|
+
const LivePlayer = 'live-player';
|
|
32
|
+
const Video = 'video';
|
|
33
|
+
const Canvas = 'canvas';
|
|
34
|
+
const Ad = 'ad';
|
|
35
|
+
const WebView = 'web-view';
|
|
36
|
+
const Block = 'block';
|
|
37
|
+
const Map = 'map';
|
|
38
|
+
const Slot = 'slot';
|
|
39
|
+
const NativeSlot = 'native-slot';
|
|
40
|
+
const CustomWrapper = 'custom-wrapper';
|
|
41
|
+
|
|
42
|
+
const VideoPlayer = 'video-player';
|
|
43
|
+
const PostNoteButton = 'post-note-button';
|
|
44
|
+
const GroupChatCard = 'group-chat-card';
|
|
45
|
+
|
|
46
|
+
export { Ad, Audio, Block, Button, Camera, Canvas, Checkbox, CheckboxGroup, CoverImage, CoverView, CustomWrapper, Form, GroupChatCard, Icon, Image, Input, Label, LivePlayer, Map, MovableArea, MovableView, NativeSlot, Navigator, Picker, PickerView, PickerViewColumn, PostNoteButton, Progress, Radio, RadioGroup, RichText, ScrollView, Slider, Slot, Swiper, SwiperItem, Switch, Text, Textarea, Video, VideoPlayer, View, WebView };
|
|
47
|
+
//# sourceMappingURL=components-react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-react.js","sources":["../node_modules/.pnpm/@tarojs+components@3.6.35_@tarojs+helper@3.6.35_@swc+helpers@0.5.15__@tarojs+runtime@3.6.35_@_4winfie2ta3vlpxb2tvdh4rlpu/node_modules/@tarojs/components/mini/index.js","../src/components-react.ts"],"sourcesContent":["export const View = 'view'\nexport const Icon = 'icon'\nexport const Progress = 'progress'\nexport const RichText = 'rich-text'\nexport const Text = 'text'\nexport const Button = 'button'\nexport const Checkbox = 'checkbox'\nexport const CheckboxGroup = 'checkbox-group'\nexport const Form = 'form'\nexport const Input = 'input'\nexport const Label = 'label'\nexport const Picker = 'picker'\nexport const PickerView = 'picker-view'\nexport const PickerViewColumn = 'picker-view-column'\nexport const Radio = 'radio'\nexport const RadioGroup = 'radio-group'\nexport const Slider = 'slider'\nexport const Switch = 'switch'\nexport const CoverImage = 'cover-image'\nexport const Textarea = 'textarea'\nexport const CoverView = 'cover-view'\nexport const MovableArea = 'movable-area'\nexport const MovableView = 'movable-view'\nexport const ScrollView = 'scroll-view'\nexport const Swiper = 'swiper'\nexport const SwiperItem = 'swiper-item'\nexport const Navigator = 'navigator'\nexport const Audio = 'audio'\nexport const Camera = 'camera'\nexport const Image = 'image'\nexport const LivePlayer = 'live-player'\nexport const Video = 'video'\nexport const Canvas = 'canvas'\nexport const Ad = 'ad'\nexport const WebView = 'web-view'\nexport const Block = 'block'\nexport const Map = 'map'\nexport const Slot = 'slot'\nexport const NativeSlot = 'native-slot'\nexport const CustomWrapper = 'custom-wrapper'\n","export * from '@tarojs/components/mini'\nexport const VideoPlayer = 'video-player'\nexport const PostNoteButton = 'post-note-button'\nexport const GroupChatCard = 'group-chat-card'"],"names":[],"mappings":"AAAY,MAAC,IAAI,GAAG,OAAM;AACd,MAAC,IAAI,GAAG,OAAM;AACd,MAAC,QAAQ,GAAG,WAAU;AACtB,MAAC,QAAQ,GAAG,YAAW;AACvB,MAAC,IAAI,GAAG,OAAM;AACd,MAAC,MAAM,GAAG,SAAQ;AAClB,MAAC,QAAQ,GAAG,WAAU;AACtB,MAAC,aAAa,GAAG,iBAAgB;AACjC,MAA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
'followOfficialAccount',
|
|
7
|
+
'getMenuButtonLayout',
|
|
8
|
+
'hideInteractionBar',
|
|
9
|
+
'pay',
|
|
10
|
+
'navigateToVideoView',
|
|
11
|
+
'showInteractionBar',
|
|
12
|
+
'openEcGood'
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
function initNativeApi(taro) {
|
|
16
|
+
processApis(taro, xhs, {
|
|
17
|
+
needPromiseApis
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const _true = 'true';
|
|
22
|
+
const _false = 'false';
|
|
23
|
+
const _empty = '';
|
|
24
|
+
// const _zero = '0'
|
|
25
|
+
const components = {
|
|
26
|
+
// ======== 调整属性 ========
|
|
27
|
+
Icon: {
|
|
28
|
+
size: '23'
|
|
29
|
+
},
|
|
30
|
+
Input: {
|
|
31
|
+
'max-length': '',
|
|
32
|
+
},
|
|
33
|
+
Button: {
|
|
34
|
+
'data-channel': singleQuote(''),
|
|
35
|
+
'share-type': singleQuote('normal'),
|
|
36
|
+
'contact-type': singleQuote('seller'),
|
|
37
|
+
'contact-id': singleQuote(''),
|
|
38
|
+
bindGetPhoneNumber: '',
|
|
39
|
+
bindGetUserInfo: '',
|
|
40
|
+
bindOpenSetting: '',
|
|
41
|
+
bindContact: '',
|
|
42
|
+
bindChooseAddress: '',
|
|
43
|
+
bindChooseInvoiceTitle: '',
|
|
44
|
+
bindLogin: ''
|
|
45
|
+
},
|
|
46
|
+
Form: {
|
|
47
|
+
'report-submit-timeout': '0'
|
|
48
|
+
},
|
|
49
|
+
Slider: {
|
|
50
|
+
color: singleQuote('#e9e9e9'),
|
|
51
|
+
'selected-color': singleQuote('#1aad19')
|
|
52
|
+
},
|
|
53
|
+
WebView: {
|
|
54
|
+
'progressbar-color': singleQuote('#51a0d8')
|
|
55
|
+
},
|
|
56
|
+
Video: {
|
|
57
|
+
'play-btn-position': singleQuote('center'),
|
|
58
|
+
},
|
|
59
|
+
Textarea: {
|
|
60
|
+
'disable-default-padding': 'false'
|
|
61
|
+
},
|
|
62
|
+
Map: {
|
|
63
|
+
bindRegionChange: '',
|
|
64
|
+
bindregionchange: '',
|
|
65
|
+
},
|
|
66
|
+
ScrollView: {
|
|
67
|
+
'enable-flex': _false,
|
|
68
|
+
'refresher-enabled': _false,
|
|
69
|
+
'refresher-threshold': '45',
|
|
70
|
+
'refresher-default-style': "'black'",
|
|
71
|
+
'refresher-background': "'#FFF'",
|
|
72
|
+
'refresher-triggered': _false,
|
|
73
|
+
'show-scrollbar': _true,
|
|
74
|
+
bindRefresherPulling: _empty,
|
|
75
|
+
bindRefresherRefresh: _empty,
|
|
76
|
+
bindRefresherRestore: _empty,
|
|
77
|
+
},
|
|
78
|
+
// 平台组件
|
|
79
|
+
PostNoteButton: {
|
|
80
|
+
type: 'default',
|
|
81
|
+
size: 'default',
|
|
82
|
+
title: _empty,
|
|
83
|
+
content: _empty,
|
|
84
|
+
'media-info': _empty,
|
|
85
|
+
tags: _empty,
|
|
86
|
+
binderror: _empty,
|
|
87
|
+
},
|
|
88
|
+
GroupChatCard: {
|
|
89
|
+
type: 'card',
|
|
90
|
+
'group-ids': _empty,
|
|
91
|
+
bindjoingroup: _empty,
|
|
92
|
+
binderror: _empty,
|
|
93
|
+
},
|
|
94
|
+
VideoPlayer: {},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const hostConfig = {
|
|
98
|
+
initNativeApi,
|
|
99
|
+
getPathIndex(indexOfNode) {
|
|
100
|
+
return `${indexOfNode}`;
|
|
101
|
+
},
|
|
102
|
+
getMiniLifecycle(config) {
|
|
103
|
+
const methods = config.page[5];
|
|
104
|
+
/**
|
|
105
|
+
* 兼容 taro 场景下 onShareChat 不支持的问题
|
|
106
|
+
*
|
|
107
|
+
* @warning 这个变更的缺陷会导致 taro 场景默认都支持 onShareChat (微信好友分享) 的功能
|
|
108
|
+
*
|
|
109
|
+
* 如果需要按照 taro 官方 onShareAppMessage, onShareTimeline 的方式走配置化方式
|
|
110
|
+
* 需要在 taro 底层进行统一,详见 @link {https://github.com/NervJS/taro/issues/12217}
|
|
111
|
+
*/
|
|
112
|
+
if (methods.indexOf('onShareChat') === -1) {
|
|
113
|
+
methods.push('onShareChat');
|
|
114
|
+
}
|
|
115
|
+
if (methods.indexOf('onCopyUrl') === -1) {
|
|
116
|
+
methods.push('onCopyUrl');
|
|
117
|
+
}
|
|
118
|
+
return config;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export { components, hostConfig, initNativeApi, needPromiseApis };
|
|
123
|
+
//# sourceMappingURL=runtime-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-utils.js","sources":["../src/apis-list.ts","../src/apis.ts","../src/components.ts","../src/runtime-utils.ts"],"sourcesContent":["export const needPromiseApis = new Set([\n 'checkFollowState',\n 'exitMiniProgram',\n 'followOfficialAccount',\n 'getMenuButtonLayout',\n 'hideInteractionBar',\n 'pay',\n 'navigateToVideoView',\n 'showInteractionBar',\n 'openEcGood'\n])\n","import { processApis } from '@tarojs/shared'\n\nimport { needPromiseApis } from './apis-list'\n\ndeclare const xhs: any\n\nexport function initNativeApi (taro) {\n processApis(taro, xhs, {\n needPromiseApis\n })\n}\n","import { singleQuote } from '@tarojs/shared'\n\nconst _true = 'true'\nconst _false = 'false'\nconst _empty = ''\n// const _zero = '0'\n\nexport const components = {\n // ======== 调整属性 ========\n Icon: {\n size: '23'\n },\n Input: {\n 'max-length': '',\n },\n Button: {\n 'data-channel': singleQuote(''),\n 'share-type': singleQuote('normal'),\n 'contact-type': singleQuote('seller'),\n 'contact-id': singleQuote(''),\n bindGetPhoneNumber: '',\n bindGetUserInfo: '',\n bindOpenSetting: '',\n bindContact: '',\n bindChooseAddress: '',\n bindChooseInvoiceTitle: '',\n bindLogin: ''\n },\n Form: {\n 'report-submit-timeout': '0'\n },\n Slider: {\n color: singleQuote('#e9e9e9'),\n 'selected-color': singleQuote('#1aad19')\n },\n WebView: {\n 'progressbar-color': singleQuote('#51a0d8')\n },\n Video: {\n 'play-btn-position': singleQuote('center'),\n },\n Textarea: {\n 'disable-default-padding': 'false'\n },\n Map: {\n bindRegionChange: '',\n bindregionchange: '',\n },\n ScrollView: {\n 'enable-flex': _false,\n 'refresher-enabled': _false,\n 'refresher-threshold': '45',\n 'refresher-default-style': \"'black'\",\n 'refresher-background': \"'#FFF'\",\n 'refresher-triggered': _false,\n 'show-scrollbar': _true,\n bindRefresherPulling: _empty,\n bindRefresherRefresh: _empty,\n bindRefresherRestore: _empty,\n },\n // 平台组件\n PostNoteButton: {\n type: 'default',\n size: 'default',\n title: _empty,\n content: _empty,\n 'media-info': _empty,\n tags: _empty,\n binderror: _empty,\n },\n GroupChatCard: {\n type: 'card',\n 'group-ids': _empty,\n bindjoingroup: _empty,\n binderror: _empty,\n },\n VideoPlayer: {},\n}\n","import { initNativeApi } from './apis'\n\nexport { initNativeApi }\n\nexport * from './apis-list'\nexport * from './components'\n\nexport const hostConfig = {\n initNativeApi,\n getPathIndex (indexOfNode) {\n return `${indexOfNode}`\n },\n getMiniLifecycle (config) {\n const methods = config.page[5]\n /**\n * 兼容 taro 场景下 onShareChat 不支持的问题\n *\n * @warning 这个变更的缺陷会导致 taro 场景默认都支持 onShareChat (微信好友分享) 的功能\n *\n * 如果需要按照 taro 官方 onShareAppMessage, onShareTimeline 的方式走配置化方式\n * 需要在 taro 底层进行统一,详见 @link {https://github.com/NervJS/taro/issues/12217}\n */\n if (methods.indexOf('onShareChat') === -1) {\n methods.push('onShareChat')\n }\n if (methods.indexOf('onCopyUrl') === -1) {\n methods.push('onCopyUrl')\n }\n return config\n }\n}\n"],"names":[],"mappings":";;AAAa,MAAA,eAAe,GAAG,IAAI,GAAG,CAAC;IACrC,kBAAkB;IAClB,iBAAiB;IACjB,uBAAuB;IACvB,qBAAqB;IACrB,oBAAoB;IACpB,KAAK;IACL,qBAAqB;IACrB,oBAAoB;IACpB,YAAY;AACb,CAAA;;ACJK,SAAU,aAAa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AC,CAAC,EAAE;AACzC,YAAA,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;AAC5B,SAAA;QACD,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE;AACvC,YAAA,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;AAC1B,SAAA;AACD,QAAA,OAAO,MAAM,CAAA;KACd;;;;;"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { processApis, singleQuote, mergeReconciler, mergeInternalComponents } from '@tarojs/shared';
|
|
2
|
+
|
|
3
|
+
const needPromiseApis = new Set([
|
|
4
|
+
'checkFollowState',
|
|
5
|
+
'exitMiniProgram',
|
|
6
|
+
'followOfficialAccount',
|
|
7
|
+
'getMenuButtonLayout',
|
|
8
|
+
'hideInteractionBar',
|
|
9
|
+
'pay',
|
|
10
|
+
'navigateToVideoView',
|
|
11
|
+
'showInteractionBar',
|
|
12
|
+
'openEcGood'
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
function initNativeApi(taro) {
|
|
16
|
+
processApis(taro, xhs, {
|
|
17
|
+
needPromiseApis
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const _true = 'true';
|
|
22
|
+
const _false = 'false';
|
|
23
|
+
const _empty = '';
|
|
24
|
+
// const _zero = '0'
|
|
25
|
+
const components = {
|
|
26
|
+
// ======== 调整属性 ========
|
|
27
|
+
Icon: {
|
|
28
|
+
size: '23'
|
|
29
|
+
},
|
|
30
|
+
Input: {
|
|
31
|
+
'max-length': '',
|
|
32
|
+
},
|
|
33
|
+
Button: {
|
|
34
|
+
'data-channel': singleQuote(''),
|
|
35
|
+
'share-type': singleQuote('normal'),
|
|
36
|
+
'contact-type': singleQuote('seller'),
|
|
37
|
+
'contact-id': singleQuote(''),
|
|
38
|
+
bindGetPhoneNumber: '',
|
|
39
|
+
bindGetUserInfo: '',
|
|
40
|
+
bindOpenSetting: '',
|
|
41
|
+
bindContact: '',
|
|
42
|
+
bindChooseAddress: '',
|
|
43
|
+
bindChooseInvoiceTitle: '',
|
|
44
|
+
bindLogin: ''
|
|
45
|
+
},
|
|
46
|
+
Form: {
|
|
47
|
+
'report-submit-timeout': '0'
|
|
48
|
+
},
|
|
49
|
+
Slider: {
|
|
50
|
+
color: singleQuote('#e9e9e9'),
|
|
51
|
+
'selected-color': singleQuote('#1aad19')
|
|
52
|
+
},
|
|
53
|
+
WebView: {
|
|
54
|
+
'progressbar-color': singleQuote('#51a0d8')
|
|
55
|
+
},
|
|
56
|
+
Video: {
|
|
57
|
+
'play-btn-position': singleQuote('center'),
|
|
58
|
+
},
|
|
59
|
+
Textarea: {
|
|
60
|
+
'disable-default-padding': 'false'
|
|
61
|
+
},
|
|
62
|
+
Map: {
|
|
63
|
+
bindRegionChange: '',
|
|
64
|
+
bindregionchange: '',
|
|
65
|
+
},
|
|
66
|
+
ScrollView: {
|
|
67
|
+
'enable-flex': _false,
|
|
68
|
+
'refresher-enabled': _false,
|
|
69
|
+
'refresher-threshold': '45',
|
|
70
|
+
'refresher-default-style': "'black'",
|
|
71
|
+
'refresher-background': "'#FFF'",
|
|
72
|
+
'refresher-triggered': _false,
|
|
73
|
+
'show-scrollbar': _true,
|
|
74
|
+
bindRefresherPulling: _empty,
|
|
75
|
+
bindRefresherRefresh: _empty,
|
|
76
|
+
bindRefresherRestore: _empty,
|
|
77
|
+
},
|
|
78
|
+
// 平台组件
|
|
79
|
+
PostNoteButton: {
|
|
80
|
+
type: 'default',
|
|
81
|
+
size: 'default',
|
|
82
|
+
title: _empty,
|
|
83
|
+
content: _empty,
|
|
84
|
+
'media-info': _empty,
|
|
85
|
+
tags: _empty,
|
|
86
|
+
binderror: _empty,
|
|
87
|
+
},
|
|
88
|
+
GroupChatCard: {
|
|
89
|
+
type: 'card',
|
|
90
|
+
'group-ids': _empty,
|
|
91
|
+
bindjoingroup: _empty,
|
|
92
|
+
binderror: _empty,
|
|
93
|
+
},
|
|
94
|
+
VideoPlayer: {},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const hostConfig = {
|
|
98
|
+
initNativeApi,
|
|
99
|
+
getPathIndex(indexOfNode) {
|
|
100
|
+
return `${indexOfNode}`;
|
|
101
|
+
},
|
|
102
|
+
getMiniLifecycle(config) {
|
|
103
|
+
const methods = config.page[5];
|
|
104
|
+
/**
|
|
105
|
+
* 兼容 taro 场景下 onShareChat 不支持的问题
|
|
106
|
+
*
|
|
107
|
+
* @warning 这个变更的缺陷会导致 taro 场景默认都支持 onShareChat (微信好友分享) 的功能
|
|
108
|
+
*
|
|
109
|
+
* 如果需要按照 taro 官方 onShareAppMessage, onShareTimeline 的方式走配置化方式
|
|
110
|
+
* 需要在 taro 底层进行统一,详见 @link {https://github.com/NervJS/taro/issues/12217}
|
|
111
|
+
*/
|
|
112
|
+
if (methods.indexOf('onShareChat') === -1) {
|
|
113
|
+
methods.push('onShareChat');
|
|
114
|
+
}
|
|
115
|
+
if (methods.indexOf('onCopyUrl') === -1) {
|
|
116
|
+
methods.push('onCopyUrl');
|
|
117
|
+
}
|
|
118
|
+
return config;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
mergeReconciler(hostConfig);
|
|
123
|
+
mergeInternalComponents(components);
|
|
124
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sources":["../src/apis-list.ts","../src/apis.ts","../src/components.ts","../src/runtime-utils.ts","../src/runtime.ts"],"sourcesContent":["export const needPromiseApis = new Set([\n 'checkFollowState',\n 'exitMiniProgram',\n 'followOfficialAccount',\n 'getMenuButtonLayout',\n 'hideInteractionBar',\n 'pay',\n 'navigateToVideoView',\n 'showInteractionBar',\n 'openEcGood'\n])\n","import { processApis } from '@tarojs/shared'\n\nimport { needPromiseApis } from './apis-list'\n\ndeclare const xhs: any\n\nexport function initNativeApi (taro) {\n processApis(taro, xhs, {\n needPromiseApis\n })\n}\n","import { singleQuote } from '@tarojs/shared'\n\nconst _true = 'true'\nconst _false = 'false'\nconst _empty = ''\n// const _zero = '0'\n\nexport const components = {\n // ======== 调整属性 ========\n Icon: {\n size: '23'\n },\n Input: {\n 'max-length': '',\n },\n Button: {\n 'data-channel': singleQuote(''),\n 'share-type': singleQuote('normal'),\n 'contact-type': singleQuote('seller'),\n 'contact-id': singleQuote(''),\n bindGetPhoneNumber: '',\n bindGetUserInfo: '',\n bindOpenSetting: '',\n bindContact: '',\n bindChooseAddress: '',\n bindChooseInvoiceTitle: '',\n bindLogin: ''\n },\n Form: {\n 'report-submit-timeout': '0'\n },\n Slider: {\n color: singleQuote('#e9e9e9'),\n 'selected-color': singleQuote('#1aad19')\n },\n WebView: {\n 'progressbar-color': singleQuote('#51a0d8')\n },\n Video: {\n 'play-btn-position': singleQuote('center'),\n },\n Textarea: {\n 'disable-default-padding': 'false'\n },\n Map: {\n bindRegionChange: '',\n bindregionchange: '',\n },\n ScrollView: {\n 'enable-flex': _false,\n 'refresher-enabled': _false,\n 'refresher-threshold': '45',\n 'refresher-default-style': \"'black'\",\n 'refresher-background': \"'#FFF'\",\n 'refresher-triggered': _false,\n 'show-scrollbar': _true,\n bindRefresherPulling: _empty,\n bindRefresherRefresh: _empty,\n bindRefresherRestore: _empty,\n },\n // 平台组件\n PostNoteButton: {\n type: 'default',\n size: 'default',\n title: _empty,\n content: _empty,\n 'media-info': _empty,\n tags: _empty,\n binderror: _empty,\n },\n GroupChatCard: {\n type: 'card',\n 'group-ids': _empty,\n bindjoingroup: _empty,\n binderror: _empty,\n },\n VideoPlayer: {},\n}\n","import { initNativeApi } from './apis'\n\nexport { initNativeApi }\n\nexport * from './apis-list'\nexport * from './components'\n\nexport const hostConfig = {\n initNativeApi,\n getPathIndex (indexOfNode) {\n return `${indexOfNode}`\n },\n getMiniLifecycle (config) {\n const methods = config.page[5]\n /**\n * 兼容 taro 场景下 onShareChat 不支持的问题\n *\n * @warning 这个变更的缺陷会导致 taro 场景默认都支持 onShareChat (微信好友分享) 的功能\n *\n * 如果需要按照 taro 官方 onShareAppMessage, onShareTimeline 的方式走配置化方式\n * 需要在 taro 底层进行统一,详见 @link {https://github.com/NervJS/taro/issues/12217}\n */\n if (methods.indexOf('onShareChat') === -1) {\n methods.push('onShareChat')\n }\n if (methods.indexOf('onCopyUrl') === -1) {\n methods.push('onCopyUrl')\n }\n return config\n }\n}\n","import { mergeInternalComponents, mergeReconciler } from '@tarojs/shared'\n\nimport { components, hostConfig } from './runtime-utils'\n\nmergeReconciler(hostConfig)\nmergeInternalComponents(components)\n"],"names":[],"mappings":";;AAAO,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IACrC,kBAAkB;IAClB,iBAAiB;IACjB,uBAAuB;IACvB,qBAAqB;IACrB,oBAAoB;IACpB,KAAK;IACL,qBAAqB;IACrB,oBAAoB;IACpB,YAAY;AACb,CAAA,CAAC;;ACJI,SAAU,aAAa,CAAE,IAAI,EAAA;AACjC,IAAA,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE;QACrB,eAAe;AAChB,KAAA,CAAC,CAAA;AACJ;;ACRA,MAAM,KAAK,GAAG,MAAM,CAAA;AACpB,MAAM,MAAM,GAAG,OAAO,CAAA;AACtB,MAAM,MAAM,GAAG,EAAE,CAAA;AACjB;AAEO,MAAM,UAAU,GAAG;;AAExB,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,YAAY,EAAE,EAAE;AACjB,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,cAAc,EAAE,WAAW,CAAC,EAAE,CAAC;AAC/B,QAAA,YAAY,EAAE,WAAW,CAAC,QAAQ,CAAC;AACnC,QAAA,cAAc,EAAE,WAAW,CAAC,QAAQ,CAAC;AACrC,QAAA,YAAY,EAAE,WAAW,CAAC,EAAE,CAAC;AAC7B,QAAA,kBAAkB,EAAE,EAAE;AACtB,QAAA,eAA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AA,YAAY,EAAE,MAAM;AACpB,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,SAAS,EAAE,MAAM;AAClB,KAAA;AACD,IAAA,aAAa,EAAE;AACb,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,WAAW,EAAE,MAAM;AACnB,QAAA,aAAa,EAAE,MAAM;AACrB,QAAA,SAAS,EAAE,MAAM;AAClB,KAAA;AACD,IAAA,WAAW,EAAE,EAAE;CAChB;;ACtEM,MAAM,UAAU,GAAG;IACxB,aAAa;AACb,IAAA,YAAY,CAAE,WAAW,EAAA;QACvB,OAAO,CAAA,EAAG,WAAW,CAAA,CAAE,CAAA;KACxB;AACD,IAAA,gBAAgB,CAAE,MAAM,EAAA;QACtB,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AAC9B;;;;;;;AAOG;QACH,IAAI,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE;AACzC,YAAA,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;AAC5B,SAAA;QACD,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE;AACvC,YAAA,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;AAC1B,SAAA;AACD,QAAA,OAAO,MAAM,CAAA;KACd;CACF;;AC1BD,eAAe,CAAC,UAAU,CAAC,CAAA;AAC3B,uBAAuB,CAAC,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const needPromiseApis: Set<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function initNativeApi(taro: any): void;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare const components: {
|
|
2
|
+
Icon: {
|
|
3
|
+
size: string;
|
|
4
|
+
};
|
|
5
|
+
Input: {
|
|
6
|
+
'max-length': string;
|
|
7
|
+
};
|
|
8
|
+
Button: {
|
|
9
|
+
'data-channel': string;
|
|
10
|
+
'share-type': string;
|
|
11
|
+
'contact-type': string;
|
|
12
|
+
'contact-id': string;
|
|
13
|
+
bindGetPhoneNumber: string;
|
|
14
|
+
bindGetUserInfo: string;
|
|
15
|
+
bindOpenSetting: string;
|
|
16
|
+
bindContact: string;
|
|
17
|
+
bindChooseAddress: string;
|
|
18
|
+
bindChooseInvoiceTitle: string;
|
|
19
|
+
bindLogin: string;
|
|
20
|
+
};
|
|
21
|
+
Form: {
|
|
22
|
+
'report-submit-timeout': string;
|
|
23
|
+
};
|
|
24
|
+
Slider: {
|
|
25
|
+
color: string;
|
|
26
|
+
'selected-color': string;
|
|
27
|
+
};
|
|
28
|
+
WebView: {
|
|
29
|
+
'progressbar-color': string;
|
|
30
|
+
};
|
|
31
|
+
Video: {
|
|
32
|
+
'play-btn-position': string;
|
|
33
|
+
};
|
|
34
|
+
Textarea: {
|
|
35
|
+
'disable-default-padding': string;
|
|
36
|
+
};
|
|
37
|
+
Map: {
|
|
38
|
+
bindRegionChange: string;
|
|
39
|
+
bindregionchange: string;
|
|
40
|
+
};
|
|
41
|
+
ScrollView: {
|
|
42
|
+
'enable-flex': string;
|
|
43
|
+
'refresher-enabled': string;
|
|
44
|
+
'refresher-threshold': string;
|
|
45
|
+
'refresher-default-style': string;
|
|
46
|
+
'refresher-background': string;
|
|
47
|
+
'refresher-triggered': string;
|
|
48
|
+
'show-scrollbar': string;
|
|
49
|
+
bindRefresherPulling: string;
|
|
50
|
+
bindRefresherRefresh: string;
|
|
51
|
+
bindRefresherRestore: string;
|
|
52
|
+
};
|
|
53
|
+
PostNoteButton: {
|
|
54
|
+
type: string;
|
|
55
|
+
size: string;
|
|
56
|
+
title: string;
|
|
57
|
+
content: string;
|
|
58
|
+
'media-info': string;
|
|
59
|
+
tags: string;
|
|
60
|
+
binderror: string;
|
|
61
|
+
};
|
|
62
|
+
GroupChatCard: {
|
|
63
|
+
type: string;
|
|
64
|
+
'group-ids': string;
|
|
65
|
+
bindjoingroup: string;
|
|
66
|
+
binderror: string;
|
|
67
|
+
};
|
|
68
|
+
VideoPlayer: {};
|
|
69
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import XHS from './program';
|
|
2
|
+
import type { IPluginContext } from '@tarojs/service';
|
|
3
|
+
export { XHS };
|
|
4
|
+
export interface IOptions {
|
|
5
|
+
template?: 'recursive' | 'unRecursive' | 'recursiveXs' | 'unRecursiveXs';
|
|
6
|
+
}
|
|
7
|
+
declare const _default: (ctx: IPluginContext, options?: IOptions) => void;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IPluginContext, TaroPlatformBase } from '@tarojs/service';
|
|
2
|
+
import { RecursiveTemplate } from './template';
|
|
3
|
+
import type { IOptions } from './index';
|
|
4
|
+
export default class XHS extends TaroPlatformBase {
|
|
5
|
+
platform: string;
|
|
6
|
+
globalObject: string;
|
|
7
|
+
projectConfigJson: string;
|
|
8
|
+
runtimePath: string;
|
|
9
|
+
taroComponentsPath: string;
|
|
10
|
+
fileType: {
|
|
11
|
+
templ: string;
|
|
12
|
+
style: string;
|
|
13
|
+
config: string;
|
|
14
|
+
script: string;
|
|
15
|
+
xs: string;
|
|
16
|
+
};
|
|
17
|
+
template: RecursiveTemplate;
|
|
18
|
+
constructor(ctx: IPluginContext, config: any, options: IOptions);
|
|
19
|
+
/**
|
|
20
|
+
* 增加组件或修改组件属性
|
|
21
|
+
*/
|
|
22
|
+
modifyTemplate(): void;
|
|
23
|
+
/**
|
|
24
|
+
* 在 project.config.json 中添加框架信息,方便产物能被 IDE 消费和上报
|
|
25
|
+
*/
|
|
26
|
+
addFrameworkInfoToProjectConfigJson(): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { initNativeApi } from './apis';
|
|
2
|
+
export { initNativeApi };
|
|
3
|
+
export * from './apis-list';
|
|
4
|
+
export * from './components';
|
|
5
|
+
export declare const hostConfig: {
|
|
6
|
+
initNativeApi: typeof initNativeApi;
|
|
7
|
+
getPathIndex(indexOfNode: any): string;
|
|
8
|
+
getMiniLifecycle(config: any): any;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { RecursiveTemplate as TaroRecursiveTemplate, UnRecursiveTemplate as TaroUnRecursiveTemplate } from '@tarojs/shared/dist/template';
|
|
2
|
+
export declare class RecursiveTemplate extends TaroRecursiveTemplate {
|
|
3
|
+
supportXS: boolean;
|
|
4
|
+
isSupportRecursive: boolean;
|
|
5
|
+
Adapter: {
|
|
6
|
+
if: string;
|
|
7
|
+
else: string;
|
|
8
|
+
elseif: string;
|
|
9
|
+
for: string;
|
|
10
|
+
forItem: string;
|
|
11
|
+
forIndex: string;
|
|
12
|
+
key: string;
|
|
13
|
+
xs: string;
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
constructor();
|
|
17
|
+
replacePropName: (name: string, value: string, componentName: string) => string;
|
|
18
|
+
}
|
|
19
|
+
export declare class RecursiveXsTemplate extends TaroRecursiveTemplate {
|
|
20
|
+
supportXS: boolean;
|
|
21
|
+
Adapter: {
|
|
22
|
+
if: string;
|
|
23
|
+
else: string;
|
|
24
|
+
elseif: string;
|
|
25
|
+
for: string;
|
|
26
|
+
forItem: string;
|
|
27
|
+
forIndex: string;
|
|
28
|
+
key: string;
|
|
29
|
+
xs: string;
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
constructor();
|
|
33
|
+
replacePropName: (name: string, value: string, componentName: string) => string;
|
|
34
|
+
buildXsTemplate: (filePath?: string) => string;
|
|
35
|
+
}
|
|
36
|
+
export declare class UnRecursiveTemplate extends TaroUnRecursiveTemplate {
|
|
37
|
+
supportXS: boolean;
|
|
38
|
+
isSupportRecursive: boolean;
|
|
39
|
+
Adapter: {
|
|
40
|
+
if: string;
|
|
41
|
+
else: string;
|
|
42
|
+
elseif: string;
|
|
43
|
+
for: string;
|
|
44
|
+
forItem: string;
|
|
45
|
+
forIndex: string;
|
|
46
|
+
key: string;
|
|
47
|
+
xs: string;
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
constructor();
|
|
51
|
+
replacePropName: (name: string, value: string, componentName: string) => string;
|
|
52
|
+
}
|
|
53
|
+
export declare class UnRecursiveXsTemplate extends TaroUnRecursiveTemplate {
|
|
54
|
+
supportXS: boolean;
|
|
55
|
+
isSupportRecursive: boolean;
|
|
56
|
+
Adapter: {
|
|
57
|
+
if: string;
|
|
58
|
+
else: string;
|
|
59
|
+
elseif: string;
|
|
60
|
+
for: string;
|
|
61
|
+
forItem: string;
|
|
62
|
+
forIndex: string;
|
|
63
|
+
key: string;
|
|
64
|
+
xs: string;
|
|
65
|
+
type: string;
|
|
66
|
+
};
|
|
67
|
+
constructor();
|
|
68
|
+
replacePropName: (name: string, value: string, componentName: string) => string;
|
|
69
|
+
buildXsTemplate: (filePath?: string) => string;
|
|
70
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-taro-runtime",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.9",
|
|
4
4
|
"description": "Taro runtime, React, and platform support for vite-plugin-taro.",
|
|
5
5
|
"author": "sep2",
|
|
6
6
|
"license": "MIT",
|
|
@@ -110,6 +110,17 @@
|
|
|
110
110
|
"import": "./dist/plugin-platform-tt/runtime-utils.js",
|
|
111
111
|
"default": "./dist/plugin-platform-tt/runtime-utils.js"
|
|
112
112
|
},
|
|
113
|
+
"./plugin-platform-xhs/runtime": "./dist/plugin-platform-xhs/runtime.js",
|
|
114
|
+
"./plugin-platform-xhs/components-react": {
|
|
115
|
+
"types": "./dist/plugin-platform-xhs/types/components-react.d.ts",
|
|
116
|
+
"import": "./dist/plugin-platform-xhs/components-react.js",
|
|
117
|
+
"default": "./dist/plugin-platform-xhs/components-react.js"
|
|
118
|
+
},
|
|
119
|
+
"./plugin-platform-xhs/runtime-utils": {
|
|
120
|
+
"types": "./dist/plugin-platform-xhs/types/runtime-utils.d.ts",
|
|
121
|
+
"import": "./dist/plugin-platform-xhs/runtime-utils.js",
|
|
122
|
+
"default": "./dist/plugin-platform-xhs/runtime-utils.js"
|
|
123
|
+
},
|
|
113
124
|
"./plugin-platform-h5/runtime/apis": {
|
|
114
125
|
"types": "./dist/plugin-platform-h5/runtime/apis/index.d.ts",
|
|
115
126
|
"import": "./dist/plugin-platform-h5/runtime/apis/index.js",
|
|
@@ -132,6 +143,7 @@
|
|
|
132
143
|
"./dist/plugin-platform-weapp/runtime.js",
|
|
133
144
|
"./dist/plugin-platform-alipay/runtime.js",
|
|
134
145
|
"./dist/plugin-platform-tt/runtime.js",
|
|
146
|
+
"./dist/plugin-platform-xhs/runtime.js",
|
|
135
147
|
"**/*.css",
|
|
136
148
|
"**/*.css.js",
|
|
137
149
|
"**/*.scss",
|
|
@@ -183,6 +195,7 @@
|
|
|
183
195
|
"@tarojs/plugin-platform-h5": "4.3.2",
|
|
184
196
|
"@tarojs/plugin-platform-tt": "4.3.2",
|
|
185
197
|
"@tarojs/plugin-platform-weapp": "4.3.2",
|
|
198
|
+
"@tarojs/plugin-platform-xhs": "1.2.2",
|
|
186
199
|
"@tarojs/react": "4.3.2",
|
|
187
200
|
"@tarojs/router": "4.3.2",
|
|
188
201
|
"@tarojs/runtime": "4.3.2",
|