vite-plugin-taro-runtime 0.7.4 → 0.7.5-beta.1

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/README.md CHANGED
@@ -8,7 +8,7 @@ This is an internal support package. Applications should install `vite-plugin-ta
8
8
 
9
9
  ## Architecture
10
10
 
11
- The package build consumes pinned development dependencies for Taro's runtime, generic APIs, Taro facade, components, router, H5 APIs, React renderer, React framework runtime, and WX, Alipay, and H5 platform packages. It emits only the application runtime files used by VPT, so Taro's compiler packages do not become production dependencies of generated projects.
11
+ The package build consumes pinned development dependencies for Taro's runtime, generic APIs, Taro facade, components, router, H5 APIs, React renderer, React framework runtime, and WX, Alipay, TT (Douyin/ByteDance), and H5 platform packages. It emits only the application runtime files used by VPT, so Taro's compiler packages do not become production dependencies of generated projects.
12
12
 
13
13
  Output directories and exports mirror the upstream Taro package names (`runtime`, `api`, `taro`, `components`, `router`, `taro-h5`, `react`, `plugin-framework-react`, and each `plugin-platform-*` package). The upstream ESM runtime graph is copied unchanged while the unexported CommonJS duplicate is omitted. Its entries are exposed through the explicit `runtime/mini` and `runtime/h5` export names. Application builds therefore load only the selected package entry and retain normal Rolldown tree-shaking.
14
14
 
@@ -0,0 +1,51 @@
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 RtcRoom = 'rtc-room';
43
+ const PayButton = 'pay-button';
44
+ const ConsumeCard = 'consume-card';
45
+ const AwemeData = 'aweme-data';
46
+ const RateButton = 'rate-button';
47
+ const OpenData = 'open-data';
48
+ const AwemeUserCard = 'aweme-user-card';
49
+
50
+ export { Ad, Audio, AwemeData, AwemeUserCard, Block, Button, Camera, Canvas, Checkbox, CheckboxGroup, ConsumeCard, CoverImage, CoverView, CustomWrapper, Form, Icon, Image, Input, Label, LivePlayer, Map, MovableArea, MovableView, NativeSlot, Navigator, OpenData, PayButton, Picker, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RateButton, RichText, RtcRoom, ScrollView, Slider, Slot, Swiper, SwiperItem, Switch, Text, Textarea, Video, View, WebView };
51
+ //# sourceMappingURL=components-react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-react.js","sources":["../../taro-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",null],"names":[],"mappings":"AAAY,MAAC,IAAI,GAAG;AACR,MAAC,IAAI,GAAG;AACR,MAAC,QAAQ,GAAG;AACZ,MAAC,QAAQ,GAAG;AACZ,MAAC,IAAI,GAAG;AACR,MAAC,MAAM,GAAG;AACV,MAAC,QAAQ,GAAG;AACZ,MAAC,aAAa,GAAG;AACjB,MAAC,IAAI,GAAG;AACR,MAAC,KAAK,GAAG;AACT,MAAC,KAAK,GAAG;AACT,MAAC,MAAM,GAAG;AACV,MAAC,UAAU,GAAG;AACd,MAAC,gBAAgB,GAAG;AACpB,MAAC,KAAK,GAAG;AACT,MAAC,UAAU,GAAG;AACd,MAAC,MAAM,GAAG;AACV,MAAC,MAAM,GAAG;AACV,MAAC,UAAU,GAAG;AACd,MAAC,QAAQ,GAAG;AACZ,MAAC,SAAS,GAAG;AACb,MAAC,WAAW,GAAG;AACf,MAAC,WAAW,GAAG;AACf,MAAC,UAAU,GAAG;AACd,MAAC,MAAM,GAAG;AACV,MAAC,UAAU,GAAG;AACd,MAAC,SAAS,GAAG;AACb,MAAC,KAAK,GAAG;AACT,MAAC,MAAM,GAAG;AACV,MAAC,KAAK,GAAG;AACT,MAAC,UAAU,GAAG;AACd,MAAC,KAAK,GAAG;AACT,MAAC,MAAM,GAAG;AACV,MAAC,EAAE,GAAG;AACN,MAAC,OAAO,GAAG;AACX,MAAC,KAAK,GAAG;AACT,MAAC,GAAG,GAAG;AACP,MAAC,IAAI,GAAG;AACR,MAAC,UAAU,GAAG;AACd,MAAC,aAAa,GAAG;;ACtCtB,MAAM,OAAO,GAAG;AAChB,MAAM,SAAS,GAAG;AAClB,MAAM,WAAW,GAAG;AACpB,MAAM,SAAS,GAAG;AAClB,MAAM,UAAU,GAAG;AACnB,MAAM,QAAQ,GAAG;AACjB,MAAM,aAAa,GAAG;;;;"}
@@ -0,0 +1,263 @@
1
+ import { processApis, singleQuote } from '@tarojs/shared';
2
+
3
+ const needPromiseApis = new Set([
4
+ 'applyRefund',
5
+ 'canRateAwemeOrders',
6
+ 'checkFollowAwemeState',
7
+ 'checkFollowState',
8
+ 'continueToPay',
9
+ 'createOrder',
10
+ 'exitMiniProgram',
11
+ 'followAwemeUser',
12
+ 'followOfficialAccount',
13
+ 'getMenuButtonLayout',
14
+ 'getUserProfile',
15
+ 'hideInteractionBar',
16
+ 'navigateToVideoView',
17
+ 'openAwemeUserProfile',
18
+ 'openEcGood',
19
+ 'openWebcastRoom',
20
+ 'pay',
21
+ 'rateAwemeOrder',
22
+ 'showDouyinOpenAuth',
23
+ 'showInteractionBar',
24
+ ]);
25
+
26
+ const apiDiff = {
27
+ showToast: {
28
+ options: {
29
+ set: [
30
+ {
31
+ key: 'icon',
32
+ value(options) {
33
+ return options.icon === 'error' ? 'fail' : options.icon;
34
+ }
35
+ }
36
+ ]
37
+ }
38
+ }
39
+ };
40
+ function transformMeta(api, options) {
41
+ let apiAlias = api;
42
+ Object.keys(apiDiff).forEach(item => {
43
+ const apiItem = apiDiff[item];
44
+ if (api === item) {
45
+ if (apiItem.alias) {
46
+ apiAlias = apiItem.alias;
47
+ }
48
+ if (apiItem.options) {
49
+ const change = apiItem.options.change;
50
+ const set = apiItem.options.set;
51
+ if (change) {
52
+ change.forEach(changeItem => {
53
+ options[changeItem.new] = options[changeItem.old];
54
+ });
55
+ }
56
+ if (set) {
57
+ set.forEach(setItem => {
58
+ options[setItem.key] = typeof setItem.value === 'function' ? setItem.value(options) : setItem.value;
59
+ });
60
+ }
61
+ }
62
+ }
63
+ });
64
+ return {
65
+ key: apiAlias,
66
+ options
67
+ };
68
+ }
69
+ function initNativeApi(taro) {
70
+ processApis(taro, tt, {
71
+ needPromiseApis,
72
+ transformMeta
73
+ });
74
+ }
75
+
76
+ const _true = '!0';
77
+ const _false = '!1';
78
+ const _empty = '';
79
+ const components = {
80
+ // ======== 调整属性 ========
81
+ Icon: {
82
+ size: '24'
83
+ },
84
+ Input: {
85
+ 'adjust-position': _true,
86
+ 'hold-keyboard': _false,
87
+ 'clue-type': '0',
88
+ bindKeyboardHeightChange: _empty,
89
+ },
90
+ Button: {
91
+ bindGetPhoneNumber: _empty,
92
+ 'data-channel': _empty,
93
+ 'data-aweme-id': _empty,
94
+ 'group-id': _empty,
95
+ 'data-is-half-page': _empty,
96
+ bindOpenAwemeUserProfile: _empty,
97
+ bindJoinGroup: _empty,
98
+ },
99
+ Form: {
100
+ 'report-submit-timeout': '0'
101
+ },
102
+ Slider: {
103
+ color: singleQuote('#e9e9e9'),
104
+ 'selected-color': singleQuote('#1aad19')
105
+ },
106
+ WebView: {
107
+ 'progressbar-color': singleQuote('#51a0d8')
108
+ },
109
+ Video: {
110
+ 'play-btn-position': singleQuote('center'),
111
+ 'pre-roll-unit-id': _empty,
112
+ 'post-roll-unit-id': _empty,
113
+ 'vslide-gesture': _false,
114
+ 'vslide-gesture-in-fullscreen': _true,
115
+ 'enable-play-gesture': _false,
116
+ 'show-playback-rate-btn': _false,
117
+ 'enable-play-in-background': _false,
118
+ signature: _empty,
119
+ bindProgress: _empty,
120
+ bindSeekComplete: _empty,
121
+ bindAdLoad: _empty,
122
+ bindAdStart: _empty,
123
+ bindAdEnded: _empty,
124
+ bindAdError: _empty,
125
+ bindAdClose: _empty,
126
+ bindLoadedMetadata: _empty,
127
+ bindPlaybackRateChange: _empty,
128
+ bindMuteChange: _empty,
129
+ bindControlTap: _empty,
130
+ bindEnterBackground: _empty,
131
+ bindCloseBackground: _empty,
132
+ bindLeaveBackground: _empty,
133
+ },
134
+ Ad: {
135
+ fixed: _empty,
136
+ type: singleQuote('banner'),
137
+ scale: '100'
138
+ },
139
+ Textarea: {
140
+ 'disable-default-padding': _false,
141
+ 'confirm-type': singleQuote('return'),
142
+ 'confirm-hold': _false,
143
+ 'show-confirm-bar': _true,
144
+ 'adjust-position': _true,
145
+ 'hold-keyboard': _false
146
+ },
147
+ ScrollView: {
148
+ enhanced: _false,
149
+ bounces: _true,
150
+ 'refresher-enabled': _false,
151
+ 'refresher-threshold': '55',
152
+ 'refresher-default-style': "'black'",
153
+ 'refresher-background': "'#FFF'",
154
+ 'refresher-triggered': _false,
155
+ bindRefresherPulling: _empty,
156
+ bindRefresherRefresh: _empty,
157
+ bindRefresherRestore: _empty,
158
+ bindRefresherAbort: _empty,
159
+ },
160
+ Canvas: {
161
+ type: _empty
162
+ },
163
+ Map: {
164
+ polygons: '[]',
165
+ rotate: '0',
166
+ skew: '0',
167
+ 'max-scale': '19',
168
+ 'min-scale': '3',
169
+ 'enable-3D': _false,
170
+ 'show-compass': _false,
171
+ 'show-scale': _false,
172
+ 'enable-overlooking': _false,
173
+ 'enable-zoom': _true,
174
+ 'enable-scroll': _true,
175
+ 'enable-rotate': _false,
176
+ 'enable-satellite': _false,
177
+ 'enable-traffic': _false,
178
+ 'enable-poi': _true,
179
+ 'enable-building': _true,
180
+ bindLabelTap: _empty,
181
+ bindRegionChange: _empty,
182
+ bindAnchorPointTap: _empty
183
+ },
184
+ // ======== 额外组件 ========
185
+ RtcRoom: {
186
+ 'user-id': _empty,
187
+ mode: 'camera',
188
+ 'device-position': 'front',
189
+ bindError: _empty
190
+ },
191
+ PayButton: {
192
+ mode: '1',
193
+ 'goods-id': _empty,
194
+ 'goods-type': _empty,
195
+ 'order-status': '0',
196
+ 'order-id': _empty,
197
+ 'refund-id': _empty,
198
+ 'refund-total-amount': _empty,
199
+ 'biz-line': '1',
200
+ 'marketing-ready': _false,
201
+ bindGetGoodsInfo: _empty,
202
+ bindPlaceOrder: _empty,
203
+ bindError: _empty,
204
+ bindApplyRefund: _empty,
205
+ bindRefund: _empty,
206
+ bindPay: _empty
207
+ },
208
+ ConsumeCard: {
209
+ 'order-id': _empty,
210
+ bindConsume: _empty,
211
+ bindRefund: _empty,
212
+ bindApplyRefund: _empty,
213
+ bindError: _empty
214
+ },
215
+ AwemeData: {
216
+ 'aweme-id': _empty,
217
+ type: singleQuote('avatar'),
218
+ 'disable-default': _empty,
219
+ 'default-avatar': _empty,
220
+ 'default-text': _empty,
221
+ bindError: _empty
222
+ },
223
+ RateButton: {
224
+ 'order-id': _empty,
225
+ bindInit: _empty,
226
+ bindSuccess: _empty,
227
+ bindError: _empty,
228
+ },
229
+ OpenData: {
230
+ type: _empty,
231
+ 'default-text': _empty,
232
+ 'default-avatar': _empty,
233
+ 'use-empty-value': _false,
234
+ bindError: _empty
235
+ },
236
+ AwemeUserCard: {
237
+ 'aweme-id': _empty,
238
+ width: '504',
239
+ height: '144',
240
+ fixed: _false,
241
+ 'left-right-padding': _empty,
242
+ bindError: _empty
243
+ }
244
+ };
245
+
246
+ const hostConfig = {
247
+ initNativeApi,
248
+ modifyMpEventImpl(event) {
249
+ if (event.type === 'regionchange') {
250
+ event.type = event.detail.type;
251
+ }
252
+ },
253
+ modifyTaroEventReturn(node, event, returnVal) {
254
+ if (node.nodeName === 'pay-button') {
255
+ if (event.type === 'applyrefund' || event.type === 'getgoodsinfo') {
256
+ return returnVal;
257
+ }
258
+ }
259
+ }
260
+ };
261
+
262
+ export { components, hostConfig, initNativeApi, needPromiseApis };
263
+ //# 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":[null,null,null,null],"names":[],"m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M;AACxB,QAAA,iBAAiB,EAAE,MAAM;AACzB,QAAA,SAAS,EAAE;AACZ,KAAA;AACD,IAAA,aAAa,EAAE;AACb,QAAA,UAAU,EAAE,MAAM;AAClB,QAAA,KAAK,EAAE,KAAK;AACZ,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,oBAAoB,EAAE,MAAM;AAC5B,QAAA,SAAS,EAAE;AACZ;;;ACrKU,MAAA,UAAU,GAAG;IACxB,aAAa;AACb,IAAA,iBAAiB,CAAE,KAAK,EAAA;AACtB,QAAA,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE;YACjC,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI;;KAEjC;AACD,IAAA,qBAAqB,CAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAA;AAC3C,QAAA,IAAI,IAAI,CAAC,QAAQ,KAAK,YAAY,EAAE;AAClC,YAAA,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE;AACjE,gBAAA,OAAO,SAAS;;;;;;;;"}
@@ -0,0 +1,264 @@
1
+ import { processApis, singleQuote, mergeReconciler, mergeInternalComponents } from '@tarojs/shared';
2
+
3
+ const needPromiseApis = new Set([
4
+ 'applyRefund',
5
+ 'canRateAwemeOrders',
6
+ 'checkFollowAwemeState',
7
+ 'checkFollowState',
8
+ 'continueToPay',
9
+ 'createOrder',
10
+ 'exitMiniProgram',
11
+ 'followAwemeUser',
12
+ 'followOfficialAccount',
13
+ 'getMenuButtonLayout',
14
+ 'getUserProfile',
15
+ 'hideInteractionBar',
16
+ 'navigateToVideoView',
17
+ 'openAwemeUserProfile',
18
+ 'openEcGood',
19
+ 'openWebcastRoom',
20
+ 'pay',
21
+ 'rateAwemeOrder',
22
+ 'showDouyinOpenAuth',
23
+ 'showInteractionBar',
24
+ ]);
25
+
26
+ const apiDiff = {
27
+ showToast: {
28
+ options: {
29
+ set: [
30
+ {
31
+ key: 'icon',
32
+ value(options) {
33
+ return options.icon === 'error' ? 'fail' : options.icon;
34
+ }
35
+ }
36
+ ]
37
+ }
38
+ }
39
+ };
40
+ function transformMeta(api, options) {
41
+ let apiAlias = api;
42
+ Object.keys(apiDiff).forEach(item => {
43
+ const apiItem = apiDiff[item];
44
+ if (api === item) {
45
+ if (apiItem.alias) {
46
+ apiAlias = apiItem.alias;
47
+ }
48
+ if (apiItem.options) {
49
+ const change = apiItem.options.change;
50
+ const set = apiItem.options.set;
51
+ if (change) {
52
+ change.forEach(changeItem => {
53
+ options[changeItem.new] = options[changeItem.old];
54
+ });
55
+ }
56
+ if (set) {
57
+ set.forEach(setItem => {
58
+ options[setItem.key] = typeof setItem.value === 'function' ? setItem.value(options) : setItem.value;
59
+ });
60
+ }
61
+ }
62
+ }
63
+ });
64
+ return {
65
+ key: apiAlias,
66
+ options
67
+ };
68
+ }
69
+ function initNativeApi(taro) {
70
+ processApis(taro, tt, {
71
+ needPromiseApis,
72
+ transformMeta
73
+ });
74
+ }
75
+
76
+ const _true = '!0';
77
+ const _false = '!1';
78
+ const _empty = '';
79
+ const components = {
80
+ // ======== 调整属性 ========
81
+ Icon: {
82
+ size: '24'
83
+ },
84
+ Input: {
85
+ 'adjust-position': _true,
86
+ 'hold-keyboard': _false,
87
+ 'clue-type': '0',
88
+ bindKeyboardHeightChange: _empty,
89
+ },
90
+ Button: {
91
+ bindGetPhoneNumber: _empty,
92
+ 'data-channel': _empty,
93
+ 'data-aweme-id': _empty,
94
+ 'group-id': _empty,
95
+ 'data-is-half-page': _empty,
96
+ bindOpenAwemeUserProfile: _empty,
97
+ bindJoinGroup: _empty,
98
+ },
99
+ Form: {
100
+ 'report-submit-timeout': '0'
101
+ },
102
+ Slider: {
103
+ color: singleQuote('#e9e9e9'),
104
+ 'selected-color': singleQuote('#1aad19')
105
+ },
106
+ WebView: {
107
+ 'progressbar-color': singleQuote('#51a0d8')
108
+ },
109
+ Video: {
110
+ 'play-btn-position': singleQuote('center'),
111
+ 'pre-roll-unit-id': _empty,
112
+ 'post-roll-unit-id': _empty,
113
+ 'vslide-gesture': _false,
114
+ 'vslide-gesture-in-fullscreen': _true,
115
+ 'enable-play-gesture': _false,
116
+ 'show-playback-rate-btn': _false,
117
+ 'enable-play-in-background': _false,
118
+ signature: _empty,
119
+ bindProgress: _empty,
120
+ bindSeekComplete: _empty,
121
+ bindAdLoad: _empty,
122
+ bindAdStart: _empty,
123
+ bindAdEnded: _empty,
124
+ bindAdError: _empty,
125
+ bindAdClose: _empty,
126
+ bindLoadedMetadata: _empty,
127
+ bindPlaybackRateChange: _empty,
128
+ bindMuteChange: _empty,
129
+ bindControlTap: _empty,
130
+ bindEnterBackground: _empty,
131
+ bindCloseBackground: _empty,
132
+ bindLeaveBackground: _empty,
133
+ },
134
+ Ad: {
135
+ fixed: _empty,
136
+ type: singleQuote('banner'),
137
+ scale: '100'
138
+ },
139
+ Textarea: {
140
+ 'disable-default-padding': _false,
141
+ 'confirm-type': singleQuote('return'),
142
+ 'confirm-hold': _false,
143
+ 'show-confirm-bar': _true,
144
+ 'adjust-position': _true,
145
+ 'hold-keyboard': _false
146
+ },
147
+ ScrollView: {
148
+ enhanced: _false,
149
+ bounces: _true,
150
+ 'refresher-enabled': _false,
151
+ 'refresher-threshold': '55',
152
+ 'refresher-default-style': "'black'",
153
+ 'refresher-background': "'#FFF'",
154
+ 'refresher-triggered': _false,
155
+ bindRefresherPulling: _empty,
156
+ bindRefresherRefresh: _empty,
157
+ bindRefresherRestore: _empty,
158
+ bindRefresherAbort: _empty,
159
+ },
160
+ Canvas: {
161
+ type: _empty
162
+ },
163
+ Map: {
164
+ polygons: '[]',
165
+ rotate: '0',
166
+ skew: '0',
167
+ 'max-scale': '19',
168
+ 'min-scale': '3',
169
+ 'enable-3D': _false,
170
+ 'show-compass': _false,
171
+ 'show-scale': _false,
172
+ 'enable-overlooking': _false,
173
+ 'enable-zoom': _true,
174
+ 'enable-scroll': _true,
175
+ 'enable-rotate': _false,
176
+ 'enable-satellite': _false,
177
+ 'enable-traffic': _false,
178
+ 'enable-poi': _true,
179
+ 'enable-building': _true,
180
+ bindLabelTap: _empty,
181
+ bindRegionChange: _empty,
182
+ bindAnchorPointTap: _empty
183
+ },
184
+ // ======== 额外组件 ========
185
+ RtcRoom: {
186
+ 'user-id': _empty,
187
+ mode: 'camera',
188
+ 'device-position': 'front',
189
+ bindError: _empty
190
+ },
191
+ PayButton: {
192
+ mode: '1',
193
+ 'goods-id': _empty,
194
+ 'goods-type': _empty,
195
+ 'order-status': '0',
196
+ 'order-id': _empty,
197
+ 'refund-id': _empty,
198
+ 'refund-total-amount': _empty,
199
+ 'biz-line': '1',
200
+ 'marketing-ready': _false,
201
+ bindGetGoodsInfo: _empty,
202
+ bindPlaceOrder: _empty,
203
+ bindError: _empty,
204
+ bindApplyRefund: _empty,
205
+ bindRefund: _empty,
206
+ bindPay: _empty
207
+ },
208
+ ConsumeCard: {
209
+ 'order-id': _empty,
210
+ bindConsume: _empty,
211
+ bindRefund: _empty,
212
+ bindApplyRefund: _empty,
213
+ bindError: _empty
214
+ },
215
+ AwemeData: {
216
+ 'aweme-id': _empty,
217
+ type: singleQuote('avatar'),
218
+ 'disable-default': _empty,
219
+ 'default-avatar': _empty,
220
+ 'default-text': _empty,
221
+ bindError: _empty
222
+ },
223
+ RateButton: {
224
+ 'order-id': _empty,
225
+ bindInit: _empty,
226
+ bindSuccess: _empty,
227
+ bindError: _empty,
228
+ },
229
+ OpenData: {
230
+ type: _empty,
231
+ 'default-text': _empty,
232
+ 'default-avatar': _empty,
233
+ 'use-empty-value': _false,
234
+ bindError: _empty
235
+ },
236
+ AwemeUserCard: {
237
+ 'aweme-id': _empty,
238
+ width: '504',
239
+ height: '144',
240
+ fixed: _false,
241
+ 'left-right-padding': _empty,
242
+ bindError: _empty
243
+ }
244
+ };
245
+
246
+ const hostConfig = {
247
+ initNativeApi,
248
+ modifyMpEventImpl(event) {
249
+ if (event.type === 'regionchange') {
250
+ event.type = event.detail.type;
251
+ }
252
+ },
253
+ modifyTaroEventReturn(node, event, returnVal) {
254
+ if (node.nodeName === 'pay-button') {
255
+ if (event.type === 'applyrefund' || event.type === 'getgoodsinfo') {
256
+ return returnVal;
257
+ }
258
+ }
259
+ }
260
+ };
261
+
262
+ mergeReconciler(hostConfig);
263
+ mergeInternalComponents(components);
264
+ //# 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":[null,null,null,null,null],"names":[],"mappings":";;AAAO,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;IACrC,aAAa;IACb,oBAAoB;IACpB,uBAAuB;IACvB,kBAAkB;IAClB,eAAe;IACf,aAAa;IACb,iBAAiB;IACjB,iBAAiB;IACjB,uBAAuB;IACvB,qBAAqB;IACrB,gBAAgB;IAChB,oBAAoB;IACpB,qBAAqB;IACrB,sBAAsB;IACtB,YAAY;IACZ,iBAAiB;IACjB,KAAK;IACL,gBAAgB;IAChB,oBAAoB;IACpB,oBAAoB;AACrB,CAAA,CAAC;;ACbF,MAAM,OAAO,GAAa;AACxB,IAAA,SAAS,EAAE;AACT,QAAA,OAAO,EAAE;AACP,YAAA,GAAG,EAAE;AACH,gBAAA;AACE,oBAAA,GAAG,EAAE,MAAM;AACX,oBAAA,KAAK,CAAE,OAAO,EAAA;AACZ,wBAAA,OAAO,OAAO,CAAC,IAAI,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI;;AAE1D;AACF;AACF;AACF;CACF;AAEe,SAAA,aAAa,CAAE,GAAW,EAAE,OAA4B,EAAA;IACtE,IAAI,QAAQ,GAAG,GAAG;IAClB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,IAAG;AAClC,QAAA,MAAM,OAAO,GAAG,OAAO,CAAC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are const needPromiseApis: Set<string>;
@@ -0,0 +1,5 @@
1
+ export declare function transformMeta(api: string, options: Record<string, any>): {
2
+ key: string;
3
+ options: Record<string, any>;
4
+ };
5
+ export declare function initNativeApi(taro: any): void;
@@ -0,0 +1,8 @@
1
+ export * from '@tarojs/components/mini';
2
+ export declare const RtcRoom = "rtc-room";
3
+ export declare const PayButton = "pay-button";
4
+ export declare const ConsumeCard = "consume-card";
5
+ export declare const AwemeData = "aweme-data";
6
+ export declare const RateButton = "rate-button";
7
+ export declare const OpenData = "open-data";
8
+ export declare const AwemeUserCard = "aweme-user-card";
@@ -0,0 +1,164 @@
1
+ export declare const components: {
2
+ Icon: {
3
+ size: string;
4
+ };
5
+ Input: {
6
+ 'adjust-position': string;
7
+ 'hold-keyboard': string;
8
+ 'clue-type': string;
9
+ bindKeyboardHeightChange: string;
10
+ };
11
+ Button: {
12
+ bindGetPhoneNumber: string;
13
+ 'data-channel': string;
14
+ 'data-aweme-id': string;
15
+ 'group-id': string;
16
+ 'data-is-half-page': string;
17
+ bindOpenAwemeUserProfile: string;
18
+ bindJoinGroup: string;
19
+ };
20
+ Form: {
21
+ 'report-submit-timeout': string;
22
+ };
23
+ Slider: {
24
+ color: string;
25
+ 'selected-color': string;
26
+ };
27
+ WebView: {
28
+ 'progressbar-color': string;
29
+ };
30
+ Video: {
31
+ 'play-btn-position': string;
32
+ 'pre-roll-unit-id': string;
33
+ 'post-roll-unit-id': string;
34
+ 'vslide-gesture': string;
35
+ 'vslide-gesture-in-fullscreen': string;
36
+ 'enable-play-gesture': string;
37
+ 'show-playback-rate-btn': string;
38
+ 'enable-play-in-background': string;
39
+ signature: string;
40
+ bindProgress: string;
41
+ bindSeekComplete: string;
42
+ bindAdLoad: string;
43
+ bindAdStart: string;
44
+ bindAdEnded: string;
45
+ bindAdError: string;
46
+ bindAdClose: string;
47
+ bindLoadedMetadata: string;
48
+ bindPlaybackRateChange: string;
49
+ bindMuteChange: string;
50
+ bindControlTap: string;
51
+ bindEnterBackground: string;
52
+ bindCloseBackground: string;
53
+ bindLeaveBackground: string;
54
+ };
55
+ Ad: {
56
+ fixed: string;
57
+ type: string;
58
+ scale: string;
59
+ };
60
+ Textarea: {
61
+ 'disable-default-padding': string;
62
+ 'confirm-type': string;
63
+ 'confirm-hold': string;
64
+ 'show-confirm-bar': string;
65
+ 'adjust-position': string;
66
+ 'hold-keyboard': string;
67
+ };
68
+ ScrollView: {
69
+ enhanced: string;
70
+ bounces: string;
71
+ 'refresher-enabled': string;
72
+ 'refresher-threshold': string;
73
+ 'refresher-default-style': string;
74
+ 'refresher-background': string;
75
+ 'refresher-triggered': string;
76
+ bindRefresherPulling: string;
77
+ bindRefresherRefresh: string;
78
+ bindRefresherRestore: string;
79
+ bindRefresherAbort: string;
80
+ };
81
+ Canvas: {
82
+ type: string;
83
+ };
84
+ Map: {
85
+ polygons: string;
86
+ rotate: string;
87
+ skew: string;
88
+ 'max-scale': string;
89
+ 'min-scale': string;
90
+ 'enable-3D': string;
91
+ 'show-compass': string;
92
+ 'show-scale': string;
93
+ 'enable-overlooking': string;
94
+ 'enable-zoom': string;
95
+ 'enable-scroll': string;
96
+ 'enable-rotate': string;
97
+ 'enable-satellite': string;
98
+ 'enable-traffic': string;
99
+ 'enable-poi': string;
100
+ 'enable-building': string;
101
+ bindLabelTap: string;
102
+ bindRegionChange: string;
103
+ bindAnchorPointTap: string;
104
+ };
105
+ RtcRoom: {
106
+ 'user-id': string;
107
+ mode: string;
108
+ 'device-position': string;
109
+ bindError: string;
110
+ };
111
+ PayButton: {
112
+ mode: string;
113
+ 'goods-id': string;
114
+ 'goods-type': string;
115
+ 'order-status': string;
116
+ 'order-id': string;
117
+ 'refund-id': string;
118
+ 'refund-total-amount': string;
119
+ 'biz-line': string;
120
+ 'marketing-ready': string;
121
+ bindGetGoodsInfo: string;
122
+ bindPlaceOrder: string;
123
+ bindError: string;
124
+ bindApplyRefund: string;
125
+ bindRefund: string;
126
+ bindPay: string;
127
+ };
128
+ ConsumeCard: {
129
+ 'order-id': string;
130
+ bindConsume: string;
131
+ bindRefund: string;
132
+ bindApplyRefund: string;
133
+ bindError: string;
134
+ };
135
+ AwemeData: {
136
+ 'aweme-id': string;
137
+ type: string;
138
+ 'disable-default': string;
139
+ 'default-avatar': string;
140
+ 'default-text': string;
141
+ bindError: string;
142
+ };
143
+ RateButton: {
144
+ 'order-id': string;
145
+ bindInit: string;
146
+ bindSuccess: string;
147
+ bindError: string;
148
+ };
149
+ OpenData: {
150
+ type: string;
151
+ 'default-text': string;
152
+ 'default-avatar': string;
153
+ 'use-empty-value': string;
154
+ bindError: string;
155
+ };
156
+ AwemeUserCard: {
157
+ 'aweme-id': string;
158
+ width: string;
159
+ height: string;
160
+ fixed: string;
161
+ 'left-right-padding': string;
162
+ bindError: string;
163
+ };
164
+ };
@@ -0,0 +1,5 @@
1
+ import TT from './program';
2
+ import type { IPluginContext } from '@tarojs/service';
3
+ export { TT };
4
+ declare const _default: (ctx: IPluginContext) => void;
5
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import { TaroPlatformBase } from '@tarojs/service';
2
+ import { Template } from './template';
3
+ export default class TT extends TaroPlatformBase {
4
+ platform: string;
5
+ globalObject: string;
6
+ projectConfigJson: string;
7
+ runtimePath: string;
8
+ taroComponentsPath: string;
9
+ fileType: {
10
+ templ: string;
11
+ style: string;
12
+ config: string;
13
+ script: string;
14
+ xs: string;
15
+ };
16
+ template: Template;
17
+ /**
18
+ * 1. setupTransaction - init
19
+ * 2. setup
20
+ * 3. setupTransaction - close
21
+ * 4. buildTransaction - init
22
+ * 5. build
23
+ * 6. buildTransaction - close
24
+ */
25
+ constructor(ctx: any, config: any);
26
+ /**
27
+ * 增加组件或修改组件属性
28
+ */
29
+ modifyTemplate(): void;
30
+ }
@@ -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
+ modifyMpEventImpl(event: any): void;
8
+ modifyTaroEventReturn(node: any, event: any, returnVal: any): any;
9
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import { RecursiveTemplate } from '@tarojs/shared/dist/template';
2
+ export declare class Template extends RecursiveTemplate {
3
+ supportXS: boolean;
4
+ Adapter: {
5
+ if: string;
6
+ else: string;
7
+ elseif: string;
8
+ for: string;
9
+ forItem: string;
10
+ forIndex: string;
11
+ key: string;
12
+ xs: string;
13
+ type: string;
14
+ };
15
+ replacePropName(name: string, value: string): string;
16
+ buildXsTemplate(filePath?: string): string;
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-taro-runtime",
3
- "version": "0.7.4",
3
+ "version": "0.7.5-beta.1",
4
4
  "description": "Taro runtime, React, and platform support for vite-plugin-taro.",
5
5
  "author": "sep2",
6
6
  "license": "MIT",
@@ -89,6 +89,17 @@
89
89
  "import": "./dist/plugin-platform-alipay/runtime-utils.js",
90
90
  "default": "./dist/plugin-platform-alipay/runtime-utils.js"
91
91
  },
92
+ "./plugin-platform-tt/runtime": "./dist/plugin-platform-tt/runtime.js",
93
+ "./plugin-platform-tt/components-react": {
94
+ "types": "./dist/plugin-platform-tt/types/components-react.d.ts",
95
+ "import": "./dist/plugin-platform-tt/components-react.js",
96
+ "default": "./dist/plugin-platform-tt/components-react.js"
97
+ },
98
+ "./plugin-platform-tt/runtime-utils": {
99
+ "types": "./dist/plugin-platform-tt/types/runtime-utils.d.ts",
100
+ "import": "./dist/plugin-platform-tt/runtime-utils.js",
101
+ "default": "./dist/plugin-platform-tt/runtime-utils.js"
102
+ },
92
103
  "./plugin-platform-h5/runtime/apis": {
93
104
  "types": "./dist/plugin-platform-h5/runtime/apis/index.d.ts",
94
105
  "import": "./dist/plugin-platform-h5/runtime/apis/index.js",
@@ -108,6 +119,7 @@
108
119
  "./dist/plugin-html/runtime.js",
109
120
  "./dist/plugin-platform-weapp/runtime.js",
110
121
  "./dist/plugin-platform-alipay/runtime.js",
122
+ "./dist/plugin-platform-tt/runtime.js",
111
123
  "**/*.css",
112
124
  "**/*.css.js",
113
125
  "**/*.scss",
@@ -158,6 +170,7 @@
158
170
  "@tarojs/plugin-platform-alipay": "4.2.1",
159
171
  "@tarojs/plugin-platform-h5": "4.2.1",
160
172
  "@tarojs/plugin-platform-weapp": "4.2.1",
173
+ "@tarojs/plugin-platform-tt": "4.2.1",
161
174
  "@tarojs/react": "4.2.1",
162
175
  "@tarojs/router": "4.2.1",
163
176
  "@tarojs/runtime": "4.2.1",