@tarojs/components 3.5.6 → 3.5.7-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/helper-db78e01a.js +19 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-ad-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-ad-custom-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-camera-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-editor-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-live-player-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-live-pusher-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-map-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-match-media-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-view-core.cjs.entry.js +2 -2
- package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-official-account-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-open-data-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-page-container-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-page-meta-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-root-portal-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-share-element-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-slot-core.cjs.entry.js +3 -1
- package/dist/cjs/taro-voip-room-core.cjs.entry.js +3 -1
- package/dist/collection/components/ad/ad.js +2 -2
- package/dist/collection/components/ad-custom/ad-custom.js +2 -2
- package/dist/collection/components/camera/camera.js +2 -2
- package/dist/collection/components/editor/editor.js +2 -2
- package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +2 -2
- package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +2 -2
- package/dist/collection/components/live-player/live-player.js +2 -2
- package/dist/collection/components/live-pusher/live-pusher.js +2 -2
- package/dist/collection/components/map/map.js +2 -2
- package/dist/collection/components/match-media/match-media.js +2 -2
- package/dist/collection/components/movable-area/area.css +2 -2
- package/dist/collection/components/movable-area/movable-view.js +2 -4
- package/dist/collection/components/navigation-bar/navigation-bar.js +2 -2
- package/dist/collection/components/official-account/official-account.js +2 -2
- package/dist/collection/components/open-data/open-data.js +2 -2
- package/dist/collection/components/page-container/page-container.js +2 -2
- package/dist/collection/components/page-meta/page-meta.js +2 -2
- package/dist/collection/components/root-portal/root-portal.js +2 -2
- package/dist/collection/components/share-element/share-element.js +2 -2
- package/dist/collection/components/slot/slot.js +2 -2
- package/dist/collection/components/voip-room/voip-room.js +2 -2
- package/dist/collection/utils/helper.js +10 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/esm/helper-3d0ecf0f.js +13 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-ad-core.entry.js +3 -1
- package/dist/esm/taro-ad-custom-core.entry.js +3 -1
- package/dist/esm/taro-camera-core.entry.js +3 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-editor-core.entry.js +3 -1
- package/dist/esm/taro-functional-page-navigator-core.entry.js +3 -1
- package/dist/esm/taro-keyboard-accessory-core.entry.js +3 -1
- package/dist/esm/taro-live-player-core.entry.js +3 -1
- package/dist/esm/taro-live-pusher-core.entry.js +3 -1
- package/dist/esm/taro-map-core.entry.js +3 -1
- package/dist/esm/taro-match-media-core.entry.js +3 -1
- package/dist/esm/taro-movable-area-core.entry.js +1 -1
- package/dist/esm/taro-movable-view-core.entry.js +3 -3
- package/dist/esm/taro-navigation-bar-core.entry.js +3 -1
- package/dist/esm/taro-official-account-core.entry.js +3 -1
- package/dist/esm/taro-open-data-core.entry.js +3 -1
- package/dist/esm/taro-page-container-core.entry.js +3 -1
- package/dist/esm/taro-page-meta-core.entry.js +3 -1
- package/dist/esm/taro-root-portal-core.entry.js +3 -1
- package/dist/esm/taro-share-element-core.entry.js +3 -1
- package/dist/esm/taro-slot-core.entry.js +3 -1
- package/dist/esm/taro-voip-room-core.entry.js +3 -1
- package/dist/esm-es5/helper-3d0ecf0f.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-ad-core.entry.js +1 -1
- package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -1
- package/dist/esm-es5/taro-camera-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-editor-core.entry.js +1 -1
- package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-player-core.entry.js +1 -1
- package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -1
- package/dist/esm-es5/taro-map-core.entry.js +1 -1
- package/dist/esm-es5/taro-match-media-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -1
- package/dist/esm-es5/taro-official-account-core.entry.js +1 -1
- package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-container-core.entry.js +1 -1
- package/dist/esm-es5/taro-page-meta-core.entry.js +1 -1
- package/dist/esm-es5/taro-root-portal-core.entry.js +1 -1
- package/dist/esm-es5/taro-share-element-core.entry.js +1 -1
- package/dist/esm-es5/taro-slot-core.entry.js +1 -1
- package/dist/esm-es5/taro-voip-room-core.entry.js +1 -1
- package/dist/taro-components/p-028e2728.entry.js +1 -0
- package/dist/taro-components/p-0380841f.system.js +1 -1
- package/dist/taro-components/p-06178a0c.entry.js +1 -0
- package/dist/taro-components/p-07294134.system.entry.js +1 -0
- package/dist/taro-components/p-075458e5.system.entry.js +1 -0
- package/dist/taro-components/p-15e45ed6.system.js +1 -0
- package/dist/taro-components/p-2ec47545.entry.js +1 -0
- package/dist/taro-components/p-3e11c8cc.system.entry.js +1 -0
- package/dist/taro-components/{p-f8b9c4b0.entry.js → p-42630f45.entry.js} +1 -1
- package/dist/taro-components/p-4cf436f9.entry.js +1 -0
- package/dist/taro-components/p-4d826fb7.entry.js +1 -0
- package/dist/taro-components/p-55266a1f.entry.js +1 -0
- package/dist/taro-components/p-57a2a441.entry.js +1 -0
- package/dist/taro-components/p-59d93770.entry.js +1 -0
- package/dist/taro-components/p-5a374cb9.entry.js +1 -0
- package/dist/taro-components/p-62fc514e.entry.js +1 -0
- package/dist/taro-components/p-6800ac6f.entry.js +1 -0
- package/dist/taro-components/p-6a96da58.js +1 -0
- package/dist/taro-components/p-6aa557f0.entry.js +1 -0
- package/dist/taro-components/p-6ad59489.system.entry.js +1 -0
- package/dist/taro-components/p-733cc64a.system.entry.js +1 -0
- package/dist/taro-components/p-7374537f.entry.js +1 -0
- package/dist/taro-components/p-7d329ab0.entry.js +1 -0
- package/dist/taro-components/p-7e960ac3.system.entry.js +1 -0
- package/dist/taro-components/p-8e2b048e.system.entry.js +1 -0
- package/dist/taro-components/p-9234cc1d.entry.js +1 -0
- package/dist/taro-components/p-93eed5d7.system.entry.js +1 -0
- package/dist/taro-components/p-9e1572c5.system.entry.js +1 -0
- package/dist/taro-components/p-afbcd093.entry.js +1 -0
- package/dist/taro-components/p-b11aaf69.system.entry.js +1 -0
- package/dist/taro-components/p-b1ae9401.entry.js +1 -0
- package/dist/taro-components/p-b60820b4.entry.js +1 -0
- package/dist/taro-components/p-b7681c76.system.entry.js +1 -0
- package/dist/taro-components/p-c5fd5c7f.system.entry.js +1 -0
- package/dist/taro-components/p-c92bafb6.system.entry.js +1 -0
- package/dist/taro-components/p-c93bb915.system.entry.js +1 -0
- package/dist/taro-components/p-cf048af9.entry.js +1 -0
- package/dist/taro-components/p-d075934f.system.entry.js +1 -0
- package/dist/taro-components/p-d4da725f.system.entry.js +1 -0
- package/dist/taro-components/p-d5f3080c.entry.js +1 -0
- package/dist/taro-components/p-d6662ab3.system.entry.js +1 -0
- package/dist/taro-components/p-f2803c2e.system.entry.js +1 -0
- package/dist/taro-components/p-f4ea8a56.system.entry.js +1 -0
- package/dist/taro-components/{p-1c775a11.system.entry.js → p-f5f1c3b7.system.entry.js} +1 -1
- package/dist/taro-components/p-f7c80795.system.entry.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/ad/ad.d.ts +2 -1
- package/dist/types/components/ad-custom/ad-custom.d.ts +2 -1
- package/dist/types/components/camera/camera.d.ts +2 -1
- package/dist/types/components/editor/editor.d.ts +2 -1
- package/dist/types/components/functional-page-navigator/functional-page-navigator.d.ts +2 -1
- package/dist/types/components/keyboard-accessory/keyboard-accessory.d.ts +2 -1
- package/dist/types/components/live-player/live-player.d.ts +2 -1
- package/dist/types/components/live-pusher/live-pusher.d.ts +2 -1
- package/dist/types/components/map/map.d.ts +2 -1
- package/dist/types/components/match-media/match-media.d.ts +2 -1
- package/dist/types/components/navigation-bar/navigation-bar.d.ts +2 -1
- package/dist/types/components/official-account/official-account.d.ts +2 -1
- package/dist/types/components/open-data/open-data.d.ts +2 -1
- package/dist/types/components/page-container/page-container.d.ts +2 -1
- package/dist/types/components/page-meta/page-meta.d.ts +2 -1
- package/dist/types/components/root-portal/root-portal.d.ts +2 -1
- package/dist/types/components/share-element/share-element.d.ts +2 -1
- package/dist/types/components/slot/slot.d.ts +2 -1
- package/dist/types/components/voip-room/voip-room.d.ts +2 -1
- package/dist/types/utils/helper.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/mini/index.js +1 -0
- package/package.json +8 -7
- package/types/Ad.d.ts +0 -1
- package/types/Button.d.ts +3 -7
- package/types/Camera.d.ts +40 -8
- package/types/Canvas.d.ts +1 -17
- package/types/CoverImage.d.ts +0 -1
- package/types/CoverView.d.ts +0 -1
- package/types/Image.d.ts +0 -11
- package/types/Input.d.ts +3 -4
- package/types/LivePlayer.d.ts +6 -0
- package/types/Map.d.ts +13 -46
- package/types/MovableView.d.ts +21 -33
- package/types/NavigationBar.d.ts +1 -1
- package/types/PageContainer.d.ts +1 -4
- package/types/Picker.d.ts +1 -5
- package/types/PickerView.d.ts +2 -14
- package/types/ScrollView.d.ts +22 -23
- package/types/Swiper.d.ts +0 -9
- package/types/Switch.d.ts +0 -1
- package/types/Textarea.d.ts +0 -2
- package/types/Video.d.ts +14 -18
- package/types/View.d.ts +1 -20
- package/types/VoipRoom.d.ts +1 -1
- package/types/WebView.d.ts +6 -0
- package/dist/collection/utils/json-schema-to-types.js +0 -224
- package/dist/taro-components/p-0414632d.system.entry.js +0 -1
- package/dist/taro-components/p-10e5df98.system.entry.js +0 -1
- package/dist/taro-components/p-14058364.system.entry.js +0 -1
- package/dist/taro-components/p-1a638246.system.entry.js +0 -1
- package/dist/taro-components/p-1e530acd.entry.js +0 -1
- package/dist/taro-components/p-22e33350.entry.js +0 -1
- package/dist/taro-components/p-24a66088.system.entry.js +0 -1
- package/dist/taro-components/p-2fd0250d.system.entry.js +0 -1
- package/dist/taro-components/p-3c7cdf6f.entry.js +0 -1
- package/dist/taro-components/p-410d449f.entry.js +0 -1
- package/dist/taro-components/p-443fb8b0.entry.js +0 -1
- package/dist/taro-components/p-44fa48b9.system.entry.js +0 -1
- package/dist/taro-components/p-481a8bc1.system.entry.js +0 -1
- package/dist/taro-components/p-49b64020.entry.js +0 -1
- package/dist/taro-components/p-4e8d4a72.system.entry.js +0 -1
- package/dist/taro-components/p-4f0e98c0.system.entry.js +0 -1
- package/dist/taro-components/p-4f805045.entry.js +0 -1
- package/dist/taro-components/p-5e3bd0db.system.entry.js +0 -1
- package/dist/taro-components/p-6da73376.entry.js +0 -1
- package/dist/taro-components/p-7325d380.entry.js +0 -1
- package/dist/taro-components/p-77ad7941.entry.js +0 -1
- package/dist/taro-components/p-7ab91097.entry.js +0 -1
- package/dist/taro-components/p-7b96cec3.system.entry.js +0 -1
- package/dist/taro-components/p-7e23b551.entry.js +0 -1
- package/dist/taro-components/p-7f0a12a9.entry.js +0 -1
- package/dist/taro-components/p-840ef0c3.system.entry.js +0 -1
- package/dist/taro-components/p-89c876a6.system.entry.js +0 -1
- package/dist/taro-components/p-90a6c15a.entry.js +0 -1
- package/dist/taro-components/p-95a36917.entry.js +0 -1
- package/dist/taro-components/p-9965cf11.system.entry.js +0 -1
- package/dist/taro-components/p-9fcb40a3.entry.js +0 -1
- package/dist/taro-components/p-a8c9b126.system.entry.js +0 -1
- package/dist/taro-components/p-aa5d45de.system.entry.js +0 -1
- package/dist/taro-components/p-b3693ca2.system.entry.js +0 -1
- package/dist/taro-components/p-b83c3eca.system.entry.js +0 -1
- package/dist/taro-components/p-c0c8b2be.entry.js +0 -1
- package/dist/taro-components/p-c8da5c10.entry.js +0 -1
- package/dist/taro-components/p-d72075ef.system.entry.js +0 -1
- package/dist/taro-components/p-db1f2db7.entry.js +0 -1
- package/dist/taro-components/p-e3f39099.entry.js +0 -1
- package/dist/types/utils/json-schema-to-types.d.ts +0 -25
package/types/View.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ interface ViewProps extends StandardProps {
|
|
|
34
34
|
hoverStayTime?: number
|
|
35
35
|
|
|
36
36
|
/** 是否阻止区域内滚动页面。
|
|
37
|
-
* 默认值: false
|
|
38
37
|
* 说明: 如果 view 中嵌套 view,外层 view 设置 disable-scroll 为 true 时禁止内部的滚动。
|
|
39
38
|
* @supported alipay
|
|
40
39
|
* @default false
|
|
@@ -42,25 +41,14 @@ interface ViewProps extends StandardProps {
|
|
|
42
41
|
disableScroll?: string
|
|
43
42
|
|
|
44
43
|
/** 是否隐藏。
|
|
45
|
-
* 默认值: false
|
|
46
44
|
* @supported alipay
|
|
47
45
|
* @default false
|
|
48
46
|
*/
|
|
49
47
|
hidden?: boolean
|
|
50
48
|
|
|
51
|
-
/** 自定义样式名。
|
|
52
|
-
* @supported alipay
|
|
53
|
-
*/
|
|
54
|
-
class?: string
|
|
55
|
-
|
|
56
|
-
/** 内联样式。
|
|
57
|
-
* @supported alipay
|
|
58
|
-
*/
|
|
59
|
-
style?: string
|
|
60
|
-
|
|
61
49
|
/** 用于动画,详见 my.createAnimation 。使用 my.createAnimation 生成的动画是通过过渡(Transition)实现的,只会触发 onTransitionEnd,不会触发 onAnimationStart, onAnimationIteration, onAnimationEnd。
|
|
62
|
-
* 默认值:{}
|
|
63
50
|
* @supported alipay
|
|
51
|
+
* @default {}
|
|
64
52
|
*/
|
|
65
53
|
animation?: TaroGeneral.IAnyObject
|
|
66
54
|
|
|
@@ -95,43 +83,36 @@ interface ViewProps extends StandardProps {
|
|
|
95
83
|
onLongTap?: CommonEventFunction
|
|
96
84
|
|
|
97
85
|
/** 过渡(Transition)结束时触发。
|
|
98
|
-
* 版本要求: 基础库 1.8.0 及以上
|
|
99
86
|
* @supported alipay
|
|
100
87
|
*/
|
|
101
88
|
onTransitionEnd?: CommonEventFunction
|
|
102
89
|
|
|
103
90
|
/** 每开启一次新的动画过程时触发。(第一次不触发)
|
|
104
|
-
* 版本要求: 基础库 1.8.0 及以上
|
|
105
91
|
* @supported alipay
|
|
106
92
|
*/
|
|
107
93
|
onAnimationIteration?: CommonEventFunction
|
|
108
94
|
|
|
109
95
|
/** 动画开始时触发。
|
|
110
|
-
* 版本要求: 基础库 1.8.0 及以上
|
|
111
96
|
* @supported alipay
|
|
112
97
|
*/
|
|
113
98
|
onAnimationStart?: CommonEventFunction
|
|
114
99
|
|
|
115
100
|
/** 动画结束时触发。
|
|
116
|
-
* 版本要求: 基础库 1.8.0 及以上
|
|
117
101
|
* @supported alipay
|
|
118
102
|
*/
|
|
119
103
|
onAnimationEnd?: CommonEventFunction
|
|
120
104
|
|
|
121
105
|
/** 当前元素可见面积超过50%时触发。
|
|
122
|
-
* 版本要求: 基础库 1.9.0 及以上
|
|
123
106
|
* @supported alipay
|
|
124
107
|
*/
|
|
125
108
|
onAppear?: CommonEventFunction
|
|
126
109
|
|
|
127
110
|
/** 当前元素不可见面积超过50%时触发。
|
|
128
|
-
* 版本要求: 基础库 1.9.0 及以上
|
|
129
111
|
* @supported alipay
|
|
130
112
|
*/
|
|
131
113
|
onDisappear?: CommonEventFunction
|
|
132
114
|
|
|
133
115
|
/** 当前元素首次可见面积达到50%时触发。
|
|
134
|
-
* 版本要求: 基础库 1.9.4 及以上
|
|
135
116
|
* @supported alipay
|
|
136
117
|
*/
|
|
137
118
|
onFirstAppear?: CommonEventFunction
|
package/types/VoipRoom.d.ts
CHANGED
package/types/WebView.d.ts
CHANGED
|
@@ -25,6 +25,12 @@ interface WebViewProps extends StandardProps {
|
|
|
25
25
|
* @supported tt
|
|
26
26
|
*/
|
|
27
27
|
progressbarColor?: string
|
|
28
|
+
|
|
29
|
+
/** 若使用web-view组件引入第三方客服,必须填写type="im"
|
|
30
|
+
* @supported tt
|
|
31
|
+
* @default default
|
|
32
|
+
*/
|
|
33
|
+
type?: string
|
|
28
34
|
}
|
|
29
35
|
declare namespace WebViewProps {
|
|
30
36
|
interface onMessageEventDetail {
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import generator from '@babel/generator';
|
|
2
|
-
import * as parser from '@babel/parser';
|
|
3
|
-
import traverse from '@babel/traverse';
|
|
4
|
-
import * as t from '@babel/types';
|
|
5
|
-
import * as fs from 'fs';
|
|
6
|
-
import * as humps from 'humps';
|
|
7
|
-
import { flattenDeep, isEmpty, toArray, xorWith } from 'lodash';
|
|
8
|
-
import * as path from 'path';
|
|
9
|
-
import { format as prettify } from 'prettier';
|
|
10
|
-
const MINI_APP_TYPES = ['weapp', 'alipay', 'swan', 'tt', 'qq', 'jd'];
|
|
11
|
-
const OMIT_PROPS = ['generic:simple-component'];
|
|
12
|
-
class GenerateTypes {
|
|
13
|
-
constructor(componentName) {
|
|
14
|
-
this.jsonSchemas = {};
|
|
15
|
-
this.componentName = componentName;
|
|
16
|
-
MINI_APP_TYPES.forEach((type) => {
|
|
17
|
-
try {
|
|
18
|
-
const json = require(`miniapp-types/dist/schema/${type}/${componentName === 'AD' ? 'ad' : humps.decamelize(componentName, { separator: '-' })}.json`);
|
|
19
|
-
if (!json) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (!this.jsonSchemas[componentName]) {
|
|
23
|
-
this.jsonSchemas[componentName] = {};
|
|
24
|
-
}
|
|
25
|
-
this.jsonSchemas[componentName][type] = json;
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
// console.log(error)
|
|
29
|
-
if (!this.jsonSchemas[componentName]) {
|
|
30
|
-
this.jsonSchemas[componentName] = {};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
// 获取不存在的属性
|
|
36
|
-
getMissingProps(props) {
|
|
37
|
-
const obj = {};
|
|
38
|
-
const jsonSchema = this.jsonSchemas[this.componentName];
|
|
39
|
-
if (!jsonSchema) {
|
|
40
|
-
return obj;
|
|
41
|
-
}
|
|
42
|
-
Object.keys(this.jsonSchemas[this.componentName]).forEach((key) => {
|
|
43
|
-
const filteredList = xorWith(props[key], Object.keys(this.jsonSchemas[this.componentName][key].properties));
|
|
44
|
-
if (filteredList.length > 0) {
|
|
45
|
-
obj[key] = filteredList.map((item) => item.match(/^bind/) ? humps.camelize(item.replace(/^bind/, 'on')) : item);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
return obj;
|
|
49
|
-
}
|
|
50
|
-
// 转换不存在的属性,便于添加到已有的类型声明中
|
|
51
|
-
convertProps(props) {
|
|
52
|
-
const array = [...new Set(flattenDeep(toArray(props)))];
|
|
53
|
-
const reverseProps = {};
|
|
54
|
-
array.forEach((prop) => {
|
|
55
|
-
reverseProps[prop] = Object.keys(props).filter((key) => props[key].includes(prop));
|
|
56
|
-
});
|
|
57
|
-
return reverseProps;
|
|
58
|
-
}
|
|
59
|
-
updateComment(ast) {
|
|
60
|
-
const componentName = this.componentName;
|
|
61
|
-
const jsonSchemas = this.jsonSchemas[this.componentName];
|
|
62
|
-
const existProps = {};
|
|
63
|
-
traverse(ast, {
|
|
64
|
-
TSInterfaceDeclaration(astPath) {
|
|
65
|
-
if (astPath.node.id.name !== `${componentName}Props`) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
astPath.traverse({
|
|
69
|
-
TSPropertySignature(astPath) {
|
|
70
|
-
var _a, _b, _c, _d;
|
|
71
|
-
const { name } = astPath.node.key;
|
|
72
|
-
if (!name) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const supportedPlatforms = [];
|
|
76
|
-
const covertedName = name.match(/^on/)
|
|
77
|
-
? name.replace(/^on/, 'bind')
|
|
78
|
-
: humps.decamelize(name, { separator: '-' });
|
|
79
|
-
MINI_APP_TYPES.forEach((type) => {
|
|
80
|
-
var _a, _b, _c, _d;
|
|
81
|
-
if ((_a = jsonSchemas[type]) === null || _a === void 0 ? void 0 : _a.properties[name]) {
|
|
82
|
-
if (isEmpty(existProps[type])) {
|
|
83
|
-
existProps[type] = [name];
|
|
84
|
-
}
|
|
85
|
-
(_b = existProps[type]) === null || _b === void 0 ? void 0 : _b.push(name);
|
|
86
|
-
supportedPlatforms.push(type);
|
|
87
|
-
}
|
|
88
|
-
if (name !== covertedName && ((_c = jsonSchemas[type]) === null || _c === void 0 ? void 0 : _c.properties[covertedName])) {
|
|
89
|
-
if (isEmpty(existProps[type])) {
|
|
90
|
-
existProps[type] = [covertedName];
|
|
91
|
-
}
|
|
92
|
-
(_d = existProps[type]) === null || _d === void 0 ? void 0 : _d.push(covertedName);
|
|
93
|
-
supportedPlatforms.push(type);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
if (isEmpty(astPath.node.leadingComments) || !((_b = (_a = astPath.node.leadingComments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.value)) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const value = (_d = (_c = astPath.node.leadingComments) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.value;
|
|
100
|
-
// 保留原有 h5 类型
|
|
101
|
-
if (value.toLowerCase().indexOf('h5') > -1) {
|
|
102
|
-
supportedPlatforms.push('h5');
|
|
103
|
-
}
|
|
104
|
-
// 保留原有 rn 类型
|
|
105
|
-
if (value.toLowerCase().indexOf('rn') > -1) {
|
|
106
|
-
supportedPlatforms.push('rn');
|
|
107
|
-
}
|
|
108
|
-
if (isEmpty(supportedPlatforms)) {
|
|
109
|
-
astPath.remove();
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
astPath.node.leadingComments[0].value = value.replace(/@supported .*?\n/, `@supported ${supportedPlatforms.join(', ')}\n`);
|
|
113
|
-
if (value.match(/@deprecated/)) {
|
|
114
|
-
astPath.node.leadingComments[0].value = value.replace(/\* @deprecated.*?\n/, '');
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
});
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
return {
|
|
122
|
-
existProps,
|
|
123
|
-
ast,
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
// 添加不存在的属性
|
|
127
|
-
addProps(ast, props) {
|
|
128
|
-
const componentName = this.componentName;
|
|
129
|
-
const jsonSchemas = this.jsonSchemas[this.componentName];
|
|
130
|
-
traverse(ast, {
|
|
131
|
-
TSInterfaceDeclaration(astPath) {
|
|
132
|
-
if (astPath.node.id.name !== `${componentName}Props`) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
const addedProps = [];
|
|
136
|
-
astPath.traverse({
|
|
137
|
-
TSInterfaceBody(astPath) {
|
|
138
|
-
Object.keys(props).forEach((prop) => {
|
|
139
|
-
var _a, _b, _c;
|
|
140
|
-
if (OMIT_PROPS.includes(prop)) {
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
const node = t.cloneNode(astPath.node.body[0]);
|
|
144
|
-
node.key = t.identifier(humps.camelize(prop, { separator: '-' }));
|
|
145
|
-
const platform = props[prop][0];
|
|
146
|
-
const json = jsonSchemas[platform];
|
|
147
|
-
const propSchema = json.properties[prop] || json.properties[prop.replace(/^on/, 'bind')];
|
|
148
|
-
const { type, tsType, enum: enumArray } = propSchema;
|
|
149
|
-
let value;
|
|
150
|
-
if (type === 'string') {
|
|
151
|
-
if (!enumArray) {
|
|
152
|
-
value = t.tsTypeReference(t.identifier(type));
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
value = t.tsUnionType(enumArray.map((item) => t.tsLiteralType(t.stringLiteral(item))));
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
else if (type instanceof Array) {
|
|
159
|
-
value = t.tsTypeReference(t.identifier(type.join('|')));
|
|
160
|
-
}
|
|
161
|
-
else if (tsType === '() => void') {
|
|
162
|
-
value = t.tsTypeReference(t.identifier('CommonEventFunction'));
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
value = t.tsTypeReference(t.identifier('string'));
|
|
166
|
-
}
|
|
167
|
-
node.typeAnnotation = t.tsTypeAnnotation(value);
|
|
168
|
-
node.optional = !((_a = json.required) === null || _a === void 0 ? void 0 : _a[prop]) || !((_b = json.required) === null || _b === void 0 ? void 0 : _b[prop.replace(/^on/, 'bind')]);
|
|
169
|
-
if (node.leadingComments) {
|
|
170
|
-
let commentValue = `* ${(_c = propSchema.description) === null || _c === void 0 ? void 0 : _c.replace(/\n/g, '\n * ')} \n`;
|
|
171
|
-
commentValue += `* @supported ${props[prop].join(', ')}\n`;
|
|
172
|
-
const defaultValue = propSchema.defaultValue;
|
|
173
|
-
if (defaultValue) {
|
|
174
|
-
if (defaultValue instanceof Array) {
|
|
175
|
-
commentValue += `* @default ${propSchema.defaultValue.join(',')}\n`;
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
commentValue += `* @default ${propSchema.defaultValue}\n`;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
node.leadingComments[0].value = commentValue;
|
|
182
|
-
}
|
|
183
|
-
astPath.node.body.push(node);
|
|
184
|
-
addedProps.push(prop);
|
|
185
|
-
});
|
|
186
|
-
},
|
|
187
|
-
});
|
|
188
|
-
},
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
formatJSDoc(ast) {
|
|
192
|
-
traverse(ast, {
|
|
193
|
-
enter(astPath) {
|
|
194
|
-
if (astPath.node.trailingComments) {
|
|
195
|
-
astPath.node.trailingComments = [];
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
exec() {
|
|
201
|
-
const filePath = path.join(process.cwd(), 'types', `${this.componentName}.d.ts`);
|
|
202
|
-
const codeStr = fs.readFileSync(filePath, 'utf8');
|
|
203
|
-
const ast = parser.parse(codeStr, {
|
|
204
|
-
sourceType: 'module',
|
|
205
|
-
strictMode: false,
|
|
206
|
-
plugins: ['typescript'],
|
|
207
|
-
});
|
|
208
|
-
const { existProps } = this.updateComment(ast);
|
|
209
|
-
const missingProps = this.getMissingProps(existProps);
|
|
210
|
-
const props = this.convertProps(missingProps);
|
|
211
|
-
this.addProps(ast, props);
|
|
212
|
-
this.formatJSDoc(ast);
|
|
213
|
-
const result = generator(ast);
|
|
214
|
-
const code = prettify(result.code, { parser: 'typescript', singleQuote: true, semi: false });
|
|
215
|
-
fs.writeFileSync(filePath, code);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
const typesFiles = fs.readdirSync(path.join(process.cwd(), 'types'));
|
|
219
|
-
typesFiles.forEach((fileName) => {
|
|
220
|
-
const componentName = fileName.replace(/\.d\.ts$/, '');
|
|
221
|
-
const generateTypes = new GenerateTypes(componentName);
|
|
222
|
-
generateTypes.exec();
|
|
223
|
-
});
|
|
224
|
-
export default GenerateTypes;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var r,e,n;return{setters:[function(t){r=t.r;e=t.h;n=t.H}],execute:function(){var o=t("taro_camera_core",function(){function t(t){r(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 Camera 组件!")};t.prototype.render=function(){return e(n,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_ad_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 Ad 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_map_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 Map 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(e){"use strict";var t,r,n;return{setters:[function(e){t=e.r;r=e.h;n=e.H}],execute:function(){var o=e("taro_live_player_core",function(){function e(e){t(this,e)}e.prototype.componentDidLoad=function(){console.error("H5 暂不支持 LivePlayer 组件!")};e.prototype.render=function(){return r(n,null)};return e}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as h,g as e}from"./p-059912fd.js";var n=function(t,s,i,h){return new(i||(i=Promise))((function(e,n){function a(t){try{r(h.next(t))}catch(t){n(t)}}function o(t){try{r(h.throw(t))}catch(t){n(t)}}function r(t){var s;t.done?e(t.value):(s=t.value,s instanceof i?s:new i((function(t){t(s)}))).then(a,o)}r((h=h.apply(t,s||[])).next())}))};let a=class{constructor(i){t(this,i),this.onChange=s(this,"change",7),this.onScale=s(this,"scale",7),this.onHTouchMove=s(this,"htouchmove",7),this.onVTouchMove=s(this,"vtouchmove",7),this.x=0,this.y=0,this.direction="none",this.outOfBounds=!1,this.inertia=!1,this.friction=2,this.damping=20,this.disabled=!1,this.scale=!1,this.scaleMin=.5,this.scaleMax=10,this.scaleValue=1,this.animation=!0,this.translateX=0,this.translateY=0,this.origin={x:0,y:0},this.area={width:0,height:0},this.originScale=1,this.currentScale=1,this.width=0,this.height=0,this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.baseX=0,this.baseY=0,this.offset={x:0,y:0},this.scaleOffset={x:0,y:0},this.getLimitXY=(t,s)=>{let i=!1;return t>this.maxX?(t=this.maxX,i=!0):t<this.minX&&(t=this.minX,i=!0),s>this.maxY?(s=this.maxY,i=!0):s<this.minY&&(s=this.minY,i=!0),{x:t,y:s,outOfBounds:i}},this.animationTo=(t,s,i,h,e,n,a)=>{this.animation?(this.setTransform(t,s,i,h,e,n),null==a||a()):this.setTransform(t,s,i,h,e,n)},this.setTransform=(t,s,i,h,e,n)=>{if(t=Number(t.toFixed(1)),s=Number(s.toFixed(1)),i=Number((null!=i?i:this.currentScale).toFixed(3)),!this.outOfBounds){const i=this.getLimitXY(t,s);t=i.x,s=i.y}const a=(t,s)=>+((1e3*t-1e3*s)/1e3).toFixed(1),o=a(t,this.scaleOffset.x),r=a(s,this.scaleOffset.y);this.translateX===t&&this.translateY===s||!e&&this.onChange.emit({x:o,y:r,source:h}),i!==this.currentScale&&n&&this.onScale.emit({scale:i,x:o,y:r});const c=`translateX(${t}px) translateY(${s}) translateZ(0px) scale(${i})`;this.element.style.transform=c,this.element.style.webkitTransform=c,this.translateX=t,this.translateY=s,this.currentScale=i},this.updateOffset=()=>{const t=(s,i)=>{if(s===i||!s.offsetParent)return{left:0,top:0};const h=t(s.offsetParent,i);return{left:s.offsetLeft+h.left,top:s.offsetTop+h.top}};if(!this.parent)return;const s=t(this.element,this.parent);this.offset.x=s.left,this.offset.y=s.top},this.updateScaleOffset=(t=this.currentScale)=>{const s=this.element.getBoundingClientRect();this.height=s.height/this.currentScale,this.width=s.width/this.currentScale,this.scaleOffset.x=(this.width*t-this.width)/2,this.scaleOffset.y=(this.height*t-this.height)/2},this.updateBoundary=()=>{const t=0-this.offset.x+this.scaleOffset.x,s=this.area.width-this.width-this.offset.x-this.scaleOffset.x;this.minX=Math.min(t,s),this.maxX=Math.max(t,s);const i=0-this.offset.y+this.scaleOffset.y,h=this.area.height-this.height-this.offset.y-this.scaleOffset.y;this.minY=Math.min(i,h),this.maxY=Math.max(i,h)},this.updateScale=(t,s,i)=>{if(!this.scale)return;const h=this.adjustScale(t);this.updateScaleOffset(h),this.updateBoundary();const{x:e,y:n}=this.getLimitXY(this.translateX,this.translateY);s?this.animationTo(e,n,h,"",!0,!0,i):this.updating||(this.updating=!0,requestAnimationFrame((()=>{this.setTransform(e,n,h,"",!0,!0),this.updating=!1})))},this.setOriginScale=t=>{this.originScale=t},this.adjustScale=t=>Math.min(10,this.scaleMax,Math.max(.5,this.scaleMin,t)),this.handleTouchStart=t=>{const s=t.touches;if(this.disabled||s.length>1||!this.element)return;const i=s[0];this.touching=!0,this.firstMoveFireEvent=!1,this.origin.x=i.screenX,this.origin.y=i.screenY,this.baseX=this.translateX,this.baseY=this.translateY,this.element.style.willChange="transform"},this.handleTouchMove=t=>{const s=t.touches;if(this.disabled||!this.element||this.scaling||!this.touching||s.length>1)return;t.preventDefault();const i=s[0],h=i.screenX-this.origin.x,e=i.screenY-this.origin.y;this.setTransform(this.xMove?h+this.baseX:0,this.yMove?e+this.baseY:0),this.firstMoveFireEvent||(this.firstMoveFireEvent=!0,(Math.abs(h)>Math.abs(e)?this.onHTouchMove:this.onVTouchMove).emit({originalEvent:t,bubbles:!1,capturePhase:!1,composed:!0,extraFields:{touches:t.touches||{},changedTouches:t.changedTouches||{}}}))},this.handleTouchEnd=t=>{const s=t.changedTouches[0];!this.disabled&&this.touching&&s&&(this.touching=!1,this.setTransform(this.xMove?s.screenX-this.origin.x+this.baseX:0,this.yMove?s.screenY-this.origin.y+this.baseY:0))}}watchX(t){this.setTransform(parseFloat(`${t||0}`),this.translateY)}watchY(t){this.setTransform(this.translateX,parseFloat(`${t||0}`))}watchScaleMinOrMax(){if(!this.scale)return!1;this.updateScale(this.currentScale,!0),this.setOriginScale(this.currentScale)}watchScaleValue(t){return!!this.scale&&(this.updateScale(t,!0),this.setOriginScale(t),t)}setParent({element:t,area:s}){return n(this,void 0,void 0,(function*(){const i=this.scale?this.scaleValue:1;this.area=s,this.parent=t,this.updateOffset(),this.updateScaleOffset(i),this.updateBoundary(),this.setTransform(Number(this.x)+this.scaleOffset.x,Number(this.y)+this.scaleOffset.y,i,"",!0),this.setOriginScale(i)}))}endScale(){return n(this,void 0,void 0,(function*(){this.scaling=!1,this.setOriginScale(this.currentScale)}))}setScale(t){return n(this,void 0,void 0,(function*(){this.scale&&(this.scaling=!0,this.updateScale(t*this.originScale))}))}connectedCallback(){this.observer=new MutationObserver((t=>{t.forEach((t=>{const s=t.attributeName;if(s&&["class","style"].includes(s)){const i=t.oldValue,h=t.target.getAttribute(s);if(i===h)return;const e=t=>null==t?void 0:t.split(";").filter((t=>!["transform","will-change"].find((s=>t.trim().startsWith(s))))).join(";");if("style"===s&&e(h)===e(i))return;this.updateOffset(),this.updateScaleOffset(),this.updateBoundary(),this.setTransform(this.translateX,this.translateY)}}))})),this.observer.observe(this.element,{attributes:!0,attributeOldValue:!0})}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}componentDidLoad(){if(this.element.style.transformOrigin="center",this.xMove=["horizontal","all"].includes(this.direction),this.yMove=["vertical","all"].includes(this.direction),this.friction<=0&&(this.friction=2),this.x||this.y){const t=parseFloat(`${this.x||0}`),s=parseFloat(`${this.y||0}`);this.setTransform(t,s)}}render(){return i(h,null,i("div",{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},i("slot",null)))}get element(){return e(this)}static get watchers(){return{x:["watchX"],y:["watchY"],scaleMin:["watchScaleMinOrMax"],scaleMax:["watchScaleMinOrMax"],scaleValue:["watchScaleValue"]}}};a.style="taro-movable-view-core{display:inline-block;position:absolute;left:0;top:0;width:10px;height:10px}";export{a as taro_movable_view_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as t}from"./p-059912fd.js";let a=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 MatchMedia 组件!")}render(){return r(t,null)}};export{a as taro_match_media_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return u([t,e])}}function u(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];r=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var e,n,i,r,a;return{setters:[function(t){e=t.r;n=t.c;i=t.h;r=t.H;a=t.g}],execute:function(){var s="taro-movable-view-core{display:inline-block;position:absolute;left:0;top:0;width:10px;height:10px}";var o=undefined&&undefined.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function s(t){try{u(i.next(t))}catch(t){a(t)}}function o(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?n(t.value):r(t.value).then(s,o)}u((i=i.apply(t,e||[])).next())}))};var u=t("taro_movable_view_core",function(){function t(t){var i=this;e(this,t);this.onChange=n(this,"change",7);this.onScale=n(this,"scale",7);this.onHTouchMove=n(this,"htouchmove",7);this.onVTouchMove=n(this,"vtouchmove",7);this.x=0;this.y=0;this.direction="none";this.outOfBounds=false;this.inertia=false;this.friction=2;this.damping=20;this.disabled=false;this.scale=false;this.scaleMin=.5;this.scaleMax=10;this.scaleValue=1;this.animation=true;this.translateX=0;this.translateY=0;this.origin={x:0,y:0};this.area={width:0,height:0};this.originScale=1;this.currentScale=1;this.width=0;this.height=0;this.minX=0;this.minY=0;this.maxX=0;this.maxY=0;this.baseX=0;this.baseY=0;this.offset={x:0,y:0};this.scaleOffset={x:0,y:0};this.getLimitXY=function(t,e){var n=false;t>i.maxX?(t=i.maxX,n=true):t<i.minX&&(t=i.minX,n=true);e>i.maxY?(e=i.maxY,n=true):e<i.minY&&(e=i.minY,n=true);return{x:t,y:e,outOfBounds:n}};this.animationTo=function(t,e,n,r,a,s,o){if(i.animation){i.setTransform(t,e,n,r,a,s);o===null||o===void 0?void 0:o()}else{i.setTransform(t,e,n,r,a,s)}};this.setTransform=function(t,e,n,r,a,s){t=Number(t.toFixed(1));e=Number(e.toFixed(1));n=Number((n!==null&&n!==void 0?n:i.currentScale).toFixed(3));if(!i.outOfBounds){var o=i.getLimitXY(t,e);t=o.x;e=o.y}var u=function(t,e){return+((1e3*t-1e3*e)/1e3).toFixed(1)};var c=u(t,i.scaleOffset.x);var l=u(e,i.scaleOffset.y);if(i.translateX!==t||i.translateY!==e){!a&&i.onChange.emit({x:c,y:l,source:r})}if(n!==i.currentScale){s&&i.onScale.emit({scale:n,x:c,y:l})}var h="translateX("+t+"px) translateY("+e+") translateZ(0px) scale("+n+")";i.element.style.transform=h;i.element.style.webkitTransform=h;i.translateX=t;i.translateY=e;i.currentScale=n};this.updateOffset=function(){var t=function(e,n){if(e===n||!e.offsetParent){return{left:0,top:0}}var i=t(e.offsetParent,n);return{left:e.offsetLeft+i.left,top:e.offsetTop+i.top}};if(!i.parent){return}var e=t(i.element,i.parent);i.offset.x=e.left;i.offset.y=e.top};this.updateScaleOffset=function(t){if(t===void 0){t=i.currentScale}var e=i.element.getBoundingClientRect();i.height=e.height/i.currentScale;i.width=e.width/i.currentScale;i.scaleOffset.x=(i.width*t-i.width)/2;i.scaleOffset.y=(i.height*t-i.height)/2};this.updateBoundary=function(){var t=0-i.offset.x+i.scaleOffset.x;var e=i.area.width-i.width-i.offset.x-i.scaleOffset.x;i.minX=Math.min(t,e);i.maxX=Math.max(t,e);var n=0-i.offset.y+i.scaleOffset.y;var r=i.area.height-i.height-i.offset.y-i.scaleOffset.y;i.minY=Math.min(n,r);i.maxY=Math.max(n,r)};this.updateScale=function(t,e,n){if(!i.scale){return}var r=i.adjustScale(t);i.updateScaleOffset(r);i.updateBoundary();var a=i.getLimitXY(i.translateX,i.translateY),s=a.x,o=a.y;if(e){i.animationTo(s,o,r,"",true,true,n)}else if(!i.updating){i.updating=true;requestAnimationFrame((function(){i.setTransform(s,o,r,"",true,true);i.updating=false}))}};this.setOriginScale=function(t){i.originScale=t};this.adjustScale=function(t){return Math.min(10,i.scaleMax,Math.max(.5,i.scaleMin,t))};this.handleTouchStart=function(t){var e=t.touches;if(i.disabled||e.length>1||!i.element){return}var n=e[0];i.touching=true;i.firstMoveFireEvent=false;i.origin.x=n.screenX;i.origin.y=n.screenY;i.baseX=i.translateX;i.baseY=i.translateY;i.element.style.willChange="transform"};this.handleTouchMove=function(t){var e=t.touches;if(i.disabled||!i.element||i.scaling||!i.touching||e.length>1){return}t.preventDefault();var n=e[0];var r=n.screenX-i.origin.x;var a=n.screenY-i.origin.y;i.setTransform(i.xMove?r+i.baseX:0,i.yMove?a+i.baseY:0);if(!i.firstMoveFireEvent){i.firstMoveFireEvent=true;var s=Math.abs(r)>Math.abs(a)?i.onHTouchMove:i.onVTouchMove;s.emit({originalEvent:t,bubbles:false,capturePhase:false,composed:true,extraFields:{touches:t.touches||{},changedTouches:t.changedTouches||{}}})}};this.handleTouchEnd=function(t){var e=t.changedTouches[0];if(i.disabled||!i.touching||!e){return}i.touching=false;var n=e.screenX-i.origin.x;var r=e.screenY-i.origin.y;i.setTransform(i.xMove?n+i.baseX:0,i.yMove?r+i.baseY:0)}}t.prototype.watchX=function(t){this.setTransform(parseFloat(""+(t||0)),this.translateY)};t.prototype.watchY=function(t){this.setTransform(this.translateX,parseFloat(""+(t||0)))};t.prototype.watchScaleMinOrMax=function(){if(!this.scale)return false;this.updateScale(this.currentScale,true);this.setOriginScale(this.currentScale)};t.prototype.watchScaleValue=function(t){if(!this.scale){return false}this.updateScale(t,true);this.setOriginScale(t);return t};t.prototype.setParent=function(t){var e=t.element,n=t.area;return o(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){t=this.scale?this.scaleValue:1;this.area=n;this.parent=e;this.updateOffset();this.updateScaleOffset(t);this.updateBoundary();this.setTransform(Number(this.x)+this.scaleOffset.x,Number(this.y)+this.scaleOffset.y,t,"",true);this.setOriginScale(t);return[2]}))}))};t.prototype.endScale=function(){return o(this,void 0,void 0,(function(){return __generator(this,(function(t){this.scaling=false;this.setOriginScale(this.currentScale);return[2]}))}))};t.prototype.setScale=function(t){return o(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.scale){return[2]}this.scaling=true;this.updateScale(t*this.originScale);return[2]}))}))};t.prototype.connectedCallback=function(){var t=this;this.observer=new MutationObserver((function(e){e.forEach((function(e){var n=e.attributeName;if(n&&["class","style"].includes(n)){var i=e.oldValue;var r=e.target.getAttribute(n);if(i===r){return}var a=function(t){return t===null||t===void 0?void 0:t.split(";").filter((function(t){return!["transform","will-change"].find((function(e){return t.trim().startsWith(e)}))})).join(";")};if(n==="style"&&a(r)===a(i)){return}t.updateOffset();t.updateScaleOffset();t.updateBoundary();t.setTransform(t.translateX,t.translateY)}}))}));this.observer.observe(this.element,{attributes:true,attributeOldValue:true})};t.prototype.disconnectedCallback=function(){var t;(t=this.observer)===null||t===void 0?void 0:t.disconnect()};t.prototype.componentDidLoad=function(){this.element.style.transformOrigin="center";this.xMove=["horizontal","all"].includes(this.direction);this.yMove=["vertical","all"].includes(this.direction);if(this.friction<=0){this.friction=2}if(this.x||this.y){var t=parseFloat(""+(this.x||0));var e=parseFloat(""+(this.y||0));this.setTransform(t,e)}};t.prototype.render=function(){return i(r,null,i("div",{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},i("slot",null)))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{x:["watchX"],y:["watchY"],scaleMin:["watchScaleMinOrMax"],scaleMax:["watchScaleMinOrMax"],scaleValue:["watchScaleValue"]}},enumerable:false,configurable:true});return t}());u.style=s}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_slot_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 Slot 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as s}from"./p-059912fd.js";let t=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 Map 组件!")}render(){return r(s,null)}};export{t as taro_map_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as t}from"./p-059912fd.js";let s=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 RootPortal 组件!")}render(){return r(t,null)}};export{s as taro_root_portal_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as s}from"./p-059912fd.js";let e=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 KeyboardAccessory 组件!")}render(){return r(s,null)}};export{e as taro_keyboard_accessory_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(e){"use strict";var t,r,n;return{setters:[function(e){t=e.r;r=e.h;n=e.H}],execute:function(){var o=e("taro_live_pusher_core",function(){function e(e){t(this,e)}e.prototype.componentDidLoad=function(){console.error("H5 暂不支持 LivePusher 组件!")};e.prototype.render=function(){return r(n,null)};return e}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var n,e,r;return{setters:[function(t){n=t.r;e=t.h;r=t.H}],execute:function(){var o=t("taro_open_data_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 OpenData 组件!")};t.prototype.render=function(){return e(r,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as s}from"./p-059912fd.js";let t=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 VoipRoom 组件!")}render(){return r(s,null)}};export{t as taro_voip_room_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var o,r,n;return{setters:[function(t){o=t.r;r=t.h;n=t.H}],execute:function(){var e=t("taro_root_portal_core",function(){function t(t){o(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 RootPortal 组件!")};t.prototype.render=function(){return r(n,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var n,o,r;return{setters:[function(t){n=t.r;o=t.h;r=t.H}],execute:function(){var e=t("taro_official_account_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 OfficialAccount 组件!")};t.prototype.render=function(){return o(r,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as o,H as a}from"./p-059912fd.js";let e=class{constructor(o){r(this,o)}componentDidLoad(){console.error("H5 暂不支持 Camera 组件!")}render(){return o(a,null)}};export{e as taro_camera_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_functional_page_navigator_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 FunctionalPageNavigator 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as o,H as r}from"./p-059912fd.js";let t=class{constructor(o){e(this,o)}componentDidLoad(){console.error("H5 暂不支持 PageMeta 组件!")}render(){return o(r,null)}};export{t as taro_page_meta_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as r,H as o}from"./p-059912fd.js";let t=class{constructor(r){e(this,r)}componentDidLoad(){console.error("H5 暂不支持 ShareElement 组件!")}render(){return r(o,null)}};export{t as taro_share_element_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as e}from"./p-059912fd.js";let n=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 PageContainer 组件!")}render(){return r(e,null)}};export{n as taro_page_container_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as s}from"./p-059912fd.js";let t=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 Ad 组件!")}render(){return r(s,null)}};export{t as taro_ad_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.r;n=e.h;r=e.H}],execute:function(){var o=e("taro_share_element_core",function(){function e(e){t(this,e)}e.prototype.componentDidLoad=function(){console.error("H5 暂不支持 ShareElement 组件!")};e.prototype.render=function(){return n(r,null)};return e}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as a}from"./p-059912fd.js";let t=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 NavigationBar 组件!")}render(){return r(a,null)}};export{t as taro_navigation_bar_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as t}from"./p-059912fd.js";let s=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 Slot 组件!")}render(){return r(t,null)}};export{s as taro_slot_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(o){"use strict";var t,r,n;return{setters:[function(o){t=o.r;r=o.h;n=o.H}],execute:function(){var e=o("taro_voip_room_core",function(){function o(o){t(this,o)}o.prototype.componentDidLoad=function(){console.error("H5 暂不支持 VoipRoom 组件!")};o.prototype.render=function(){return r(n,null)};return o}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var e,n,r;return{setters:[function(t){e=t.r;n=t.h;r=t.H}],execute:function(){var o=t("taro_match_media_core",function(){function t(t){e(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 MatchMedia 组件!")};t.prototype.render=function(){return n(r,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as c,H as r}from"./p-059912fd.js";let t=class{constructor(c){o(this,c)}componentDidLoad(){console.error("H5 暂不支持 OfficialAccount 组件!")}render(){return c(r,null)}};export{t as taro_official_account_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as a,H as r}from"./p-059912fd.js";let t=class{constructor(a){o(this,a)}componentDidLoad(){console.error("H5 暂不支持 FunctionalPageNavigator 组件!")}render(){return a(r,null)}};export{t as taro_functional_page_navigator_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_navigation_bar_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 NavigationBar 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as s}from"./p-059912fd.js";let t=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 AdCustom 组件!")}render(){return r(s,null)}};export{t as taro_ad_custom_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var r,e,n;return{setters:[function(t){r=t.r;e=t.h;n=t.H}],execute:function(){var o=t("taro_editor_core",function(){function t(t){r(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 Editor 组件!")};t.prototype.render=function(){return e(n,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var e,n,r;return{setters:[function(t){e=t.r;n=t.h;r=t.H}],execute:function(){var o=t("taro_page_meta_core",function(){function t(t){e(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 PageMeta 组件!")};t.prototype.render=function(){return n(r,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(r){"use strict";var e,t,o;return{setters:[function(r){e=r.r;t=r.h;o=r.H}],execute:function(){var n=r("taro_keyboard_accessory_core",function(){function r(r){e(this,r)}r.prototype.componentDidLoad=function(){console.error("H5 暂不支持 KeyboardAccessory 组件!")};r.prototype.render=function(){return t(o,null)};return r}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_ad_custom_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 AdCustom 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as e,H as o}from"./p-059912fd.js";let s=class{constructor(e){r(this,e)}componentDidLoad(){console.error("H5 暂不支持 LivePlayer 组件!")}render(){return e(o,null)}};export{s as taro_live_player_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as t}from"./p-059912fd.js";let a=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 OpenData 组件!")}render(){return r(t,null)}};export{a as taro_open_data_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var n,e,r;return{setters:[function(t){n=t.r;e=t.h;r=t.H}],execute:function(){var o=t("taro_page_container_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 PageContainer 组件!")};t.prototype.render=function(){return e(r,null)};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as r,H as t}from"./p-059912fd.js";let e=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 Editor 组件!")}render(){return r(t,null)}};export{e as taro_editor_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,h as e,H as o}from"./p-059912fd.js";let s=class{constructor(e){r(this,e)}componentDidLoad(){console.error("H5 暂不支持 LivePusher 组件!")}render(){return e(o,null)}};export{s as taro_live_pusher_core}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
declare const MINI_APP_TYPES: readonly ["weapp", "alipay", "swan", "tt", "qq", "jd"];
|
|
2
|
-
declare class GenerateTypes {
|
|
3
|
-
jsonSchemas: any;
|
|
4
|
-
componentName: any;
|
|
5
|
-
constructor(componentName: any);
|
|
6
|
-
getMissingProps(props: {
|
|
7
|
-
[key in typeof MINI_APP_TYPES[number]]?: string[];
|
|
8
|
-
}): {};
|
|
9
|
-
convertProps(props: any): {};
|
|
10
|
-
updateComment(ast: any): {
|
|
11
|
-
existProps: {
|
|
12
|
-
weapp?: string[] | undefined;
|
|
13
|
-
alipay?: string[] | undefined;
|
|
14
|
-
swan?: string[] | undefined;
|
|
15
|
-
tt?: string[] | undefined;
|
|
16
|
-
qq?: string[] | undefined;
|
|
17
|
-
jd?: string[] | undefined;
|
|
18
|
-
};
|
|
19
|
-
ast: any;
|
|
20
|
-
};
|
|
21
|
-
addProps(ast: any, props: any): void;
|
|
22
|
-
formatJSDoc(ast: any): void;
|
|
23
|
-
exec(): void;
|
|
24
|
-
}
|
|
25
|
-
export default GenerateTypes;
|