@tarojs/plugin-platform-h5 3.7.0-canary.6 → 3.8.0-canary.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/LICENSE +14 -0
- package/build/definition-json/parser.ts +1 -1
- package/build/utils/ast.ts +10 -20
- package/build/utils/helper.ts +2 -2
- package/dist/definition.json +100 -42
- package/dist/dist/definition.json.d.ts +1565 -1501
- package/dist/dist/definition.json.js +1 -1
- package/dist/index.d.ts +4 -7
- package/dist/index.js +123 -145
- package/dist/index.js.map +1 -1
- package/dist/runtime/apis/index.js.map +1 -1
- package/dist/runtime/index.js +5 -0
- package/dist/runtime/index.js.map +1 -1
- package/package.json +16 -16
package/LICENSE
CHANGED
|
@@ -158,3 +158,17 @@ MIT (stencil-vue2-output-target):
|
|
|
158
158
|
The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
|
|
159
159
|
`/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
|
|
160
160
|
See `/LICENSE` for details of the license.
|
|
161
|
+
|
|
162
|
+
==================
|
|
163
|
+
|
|
164
|
+
MIT (weui):
|
|
165
|
+
The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
|
|
166
|
+
`/packages/taro-components/src/components/*.scss`
|
|
167
|
+
See `/LICENSE.txt` for details of the license.
|
|
168
|
+
|
|
169
|
+
==================
|
|
170
|
+
|
|
171
|
+
Apache-2.0 (intersection-observer):
|
|
172
|
+
The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
|
|
173
|
+
`/packages/taro-api/src/polyfill/intersection-observer.ts`
|
|
174
|
+
See `/LICENSE.txt` for details of the license.
|
package/build/utils/ast.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path from 'path'
|
|
2
2
|
import ts from 'typescript'
|
|
3
3
|
|
|
4
4
|
export interface DocEntry {
|
|
@@ -17,15 +17,6 @@ export interface DocEntry {
|
|
|
17
17
|
symbol?: DocEntry
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export function pathsAreEqual (path1: string, path2: string) {
|
|
21
|
-
path1 = path.resolve(path1)
|
|
22
|
-
path2 = path.resolve(path2)
|
|
23
|
-
if (process.platform === 'win32') {
|
|
24
|
-
return path1.toLowerCase() === path2.toLowerCase()
|
|
25
|
-
}
|
|
26
|
-
return path1 === path2
|
|
27
|
-
}
|
|
28
|
-
|
|
29
20
|
export function generateDocumentation (
|
|
30
21
|
filepaths: string[],
|
|
31
22
|
options: ts.CompilerOptions,
|
|
@@ -40,10 +31,9 @@ export function generateDocumentation (
|
|
|
40
31
|
|
|
41
32
|
for (const sourceFile of program.getSourceFiles()) {
|
|
42
33
|
if (param.withDeclaration !== false || !sourceFile.isDeclarationFile) {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
) {
|
|
34
|
+
// 规范化路径,修复window环境无法生成definition.json文件
|
|
35
|
+
const normalSrcFile = path.normalize(sourceFile.fileName)
|
|
36
|
+
if ((param.mapAll === true && filepaths.includes(normalSrcFile)) || normalSrcFile === path.normalize(filepaths[0])) {
|
|
47
37
|
ts.forEachChild(sourceFile, (n) => visitAST(n, output))
|
|
48
38
|
}
|
|
49
39
|
}
|
|
@@ -53,12 +43,12 @@ export function generateDocumentation (
|
|
|
53
43
|
|
|
54
44
|
function visitAST (node: ts.Node, o: DocEntry[]) {
|
|
55
45
|
// Only consider exported nodes
|
|
56
|
-
if (!isNodeExported(node as ts.Declaration) || node.kind === ts.SyntaxKind.EndOfFileToken || node.kind === ts.SyntaxKind.DeclareKeyword
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
if (!isNodeExported(node as ts.Declaration) || node.kind === ts.SyntaxKind.EndOfFileToken || node.kind === ts.SyntaxKind.DeclareKeyword ||
|
|
47
|
+
ts.isImportDeclaration(node) || ts.isImportEqualsDeclaration(node) || ts.isImportClause(node) ||
|
|
48
|
+
ts.isExportAssignment(node) || ts.isExportDeclaration(node) ||
|
|
49
|
+
ts.isExpressionStatement(node) || ts.isEmptyStatement(node) ||
|
|
50
|
+
ts.isStringLiteral(node) ||
|
|
51
|
+
node.kind === ts.SyntaxKind.ExportKeyword) {
|
|
62
52
|
return
|
|
63
53
|
}
|
|
64
54
|
|
package/build/utils/helper.ts
CHANGED
|
@@ -47,8 +47,8 @@ export function isNotAPI (flags?: ts.SymbolFlags): flags is ts.SymbolFlags.Signa
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export function isFunction (flags?: ts.SymbolFlags): flags is ts.SymbolFlags.Function | ts.SymbolFlags.Method {
|
|
50
|
-
return SymbolFlags.includes((flags || -1) - ts.SymbolFlags.Function)
|
|
51
|
-
|
|
50
|
+
return SymbolFlags.includes((flags || -1) - ts.SymbolFlags.Function) ||
|
|
51
|
+
SymbolFlags.includes((flags || -1) - ts.SymbolFlags.Method)
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export function isOptional (flags?: ts.SymbolFlags): flags is ts.SymbolFlags.Optional {
|
package/dist/definition.json
CHANGED
|
@@ -927,46 +927,16 @@
|
|
|
927
927
|
"success": "void",
|
|
928
928
|
"return": "Current"
|
|
929
929
|
},
|
|
930
|
-
"stopLocationUpdate": {
|
|
931
|
-
"object": "*",
|
|
932
|
-
"success": "void",
|
|
933
|
-
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
934
|
-
},
|
|
935
930
|
"startLocationUpdateBackground": {
|
|
936
931
|
"object": "*",
|
|
937
932
|
"success": "void",
|
|
938
933
|
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
939
934
|
},
|
|
940
|
-
"startLocationUpdate": {
|
|
941
|
-
"object": "*",
|
|
942
|
-
"success": "void",
|
|
943
|
-
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
944
|
-
},
|
|
945
935
|
"openLocation": {
|
|
946
936
|
"object": "Partial<{ scale: number; }>",
|
|
947
937
|
"success": "void",
|
|
948
938
|
"return": "Promise<any>"
|
|
949
939
|
},
|
|
950
|
-
"onLocationChangeError": {
|
|
951
|
-
"object": "*",
|
|
952
|
-
"success": "void",
|
|
953
|
-
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
954
|
-
},
|
|
955
|
-
"onLocationChange": {
|
|
956
|
-
"object": "*",
|
|
957
|
-
"success": "void",
|
|
958
|
-
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
959
|
-
},
|
|
960
|
-
"offLocationChangeError": {
|
|
961
|
-
"object": "*",
|
|
962
|
-
"success": "void",
|
|
963
|
-
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
964
|
-
},
|
|
965
|
-
"offLocationChange": {
|
|
966
|
-
"object": "*",
|
|
967
|
-
"success": "void",
|
|
968
|
-
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
969
|
-
},
|
|
970
940
|
"getLocation": {
|
|
971
941
|
"object": "Partial<Option>",
|
|
972
942
|
"success": "void",
|
|
@@ -987,6 +957,20 @@
|
|
|
987
957
|
"success": "void",
|
|
988
958
|
"return": "Promise<SuccessCallbackResult>"
|
|
989
959
|
},
|
|
960
|
+
"onLocationChange": "*",
|
|
961
|
+
"offLocationChange": "*",
|
|
962
|
+
"onLocationChangeError": "*",
|
|
963
|
+
"offLocationChangeError": "*",
|
|
964
|
+
"stopLocationUpdate": {
|
|
965
|
+
"object": "Partial<Option>",
|
|
966
|
+
"success": "void",
|
|
967
|
+
"return": "Promise<CallbackResult>"
|
|
968
|
+
},
|
|
969
|
+
"startLocationUpdate": {
|
|
970
|
+
"object": "Partial<Option>",
|
|
971
|
+
"success": "void",
|
|
972
|
+
"return": "Promise<CallbackResult>"
|
|
973
|
+
},
|
|
990
974
|
"stopVoice": {
|
|
991
975
|
"object": "*",
|
|
992
976
|
"success": "void",
|
|
@@ -1023,7 +1007,7 @@
|
|
|
1023
1007
|
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1024
1008
|
},
|
|
1025
1009
|
"createInnerAudioContext": {
|
|
1026
|
-
"object": "
|
|
1010
|
+
"object": "Option",
|
|
1027
1011
|
"success": "void",
|
|
1028
1012
|
"return": "InnerAudioContext"
|
|
1029
1013
|
},
|
|
@@ -1651,6 +1635,46 @@
|
|
|
1651
1635
|
"success": "void",
|
|
1652
1636
|
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1653
1637
|
},
|
|
1638
|
+
"getQQRunData": {
|
|
1639
|
+
"object": "*",
|
|
1640
|
+
"success": "void",
|
|
1641
|
+
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1642
|
+
},
|
|
1643
|
+
"setOfficialDress": {
|
|
1644
|
+
"object": "*",
|
|
1645
|
+
"success": "void",
|
|
1646
|
+
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1647
|
+
},
|
|
1648
|
+
"setCustomDress": {
|
|
1649
|
+
"object": "*",
|
|
1650
|
+
"success": "void",
|
|
1651
|
+
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1652
|
+
},
|
|
1653
|
+
"updateQQApp": {
|
|
1654
|
+
"object": "*",
|
|
1655
|
+
"success": "void",
|
|
1656
|
+
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1657
|
+
},
|
|
1658
|
+
"addRecentColorSign": {
|
|
1659
|
+
"object": "*",
|
|
1660
|
+
"success": "void",
|
|
1661
|
+
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1662
|
+
},
|
|
1663
|
+
"getGuildInfo": {
|
|
1664
|
+
"object": "*",
|
|
1665
|
+
"success": "void",
|
|
1666
|
+
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1667
|
+
},
|
|
1668
|
+
"applyAddToMyApps": {
|
|
1669
|
+
"object": "*",
|
|
1670
|
+
"success": "void",
|
|
1671
|
+
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1672
|
+
},
|
|
1673
|
+
"isAddedToMyApps": {
|
|
1674
|
+
"object": "*",
|
|
1675
|
+
"success": "void",
|
|
1676
|
+
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1677
|
+
},
|
|
1654
1678
|
"updateShareMenu": {
|
|
1655
1679
|
"object": "*",
|
|
1656
1680
|
"success": "void",
|
|
@@ -1974,22 +1998,14 @@
|
|
|
1974
1998
|
"success": "void",
|
|
1975
1999
|
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1976
2000
|
},
|
|
1977
|
-
"showNavigationBarLoading":
|
|
1978
|
-
"object": "*",
|
|
1979
|
-
"success": "void",
|
|
1980
|
-
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1981
|
-
},
|
|
2001
|
+
"showNavigationBarLoading": "*",
|
|
1982
2002
|
"setNavigationBarTitle": "*",
|
|
1983
2003
|
"setNavigationBarColor": {
|
|
1984
2004
|
"object": "Option",
|
|
1985
2005
|
"success": "void",
|
|
1986
2006
|
"return": "Promise<CallbackResult>"
|
|
1987
2007
|
},
|
|
1988
|
-
"hideNavigationBarLoading":
|
|
1989
|
-
"object": "*",
|
|
1990
|
-
"success": "void",
|
|
1991
|
-
"return": "Promise<Partial<CallbackResult> & Record<string, unknown> & CallbackResult>"
|
|
1992
|
-
},
|
|
2008
|
+
"hideNavigationBarLoading": "*",
|
|
1993
2009
|
"hideHomeButton": {
|
|
1994
2010
|
"object": "*",
|
|
1995
2011
|
"success": "void",
|
|
@@ -2154,10 +2170,12 @@
|
|
|
2154
2170
|
"hoverStayTime": "number"
|
|
2155
2171
|
},
|
|
2156
2172
|
"custom-wrapper": {},
|
|
2173
|
+
"draggable-sheet": {},
|
|
2157
2174
|
"editor": {},
|
|
2158
2175
|
"follow-swan": {},
|
|
2159
2176
|
"form": {},
|
|
2160
2177
|
"functional-page-navigator": {},
|
|
2178
|
+
"grid-builder": {},
|
|
2161
2179
|
"grid-view": {},
|
|
2162
2180
|
"icon": {
|
|
2163
2181
|
"color": "string",
|
|
@@ -2190,12 +2208,40 @@
|
|
|
2190
2208
|
},
|
|
2191
2209
|
"lifestyle": {},
|
|
2192
2210
|
"like": {},
|
|
2211
|
+
"list-builder": {},
|
|
2193
2212
|
"list-view": {},
|
|
2194
2213
|
"live-player": {},
|
|
2195
2214
|
"live-pusher": {},
|
|
2196
2215
|
"login": {},
|
|
2197
2216
|
"lottie": {},
|
|
2198
|
-
"map": {
|
|
2217
|
+
"map": {
|
|
2218
|
+
"circles": "MapProps.circle[]",
|
|
2219
|
+
"enable3D": "boolean",
|
|
2220
|
+
"enableAutoMaxOverlooking": "boolean",
|
|
2221
|
+
"enableBuilding": "boolean",
|
|
2222
|
+
"enableOverlooking": "boolean",
|
|
2223
|
+
"enableRotate": "boolean",
|
|
2224
|
+
"enableSatellite": "boolean",
|
|
2225
|
+
"enableScroll": "boolean",
|
|
2226
|
+
"enableTraffic": "boolean",
|
|
2227
|
+
"enableZoom": "boolean",
|
|
2228
|
+
"height": "string",
|
|
2229
|
+
"latitude": "number",
|
|
2230
|
+
"layerStyle": "number",
|
|
2231
|
+
"longitude": "number",
|
|
2232
|
+
"markers": "MapProps.marker[]",
|
|
2233
|
+
"maxScale": "number",
|
|
2234
|
+
"minScale": "number",
|
|
2235
|
+
"polygons": "MapProps.polygon[]",
|
|
2236
|
+
"polyline": "MapProps.polyline[]",
|
|
2237
|
+
"rotate": "number",
|
|
2238
|
+
"scale": "number",
|
|
2239
|
+
"showCompass": "boolean",
|
|
2240
|
+
"showScale": "boolean",
|
|
2241
|
+
"skew": "number",
|
|
2242
|
+
"subkey": "string",
|
|
2243
|
+
"width": "string"
|
|
2244
|
+
},
|
|
2199
2245
|
"match-media": {},
|
|
2200
2246
|
"movable-area": {
|
|
2201
2247
|
"scaleArea": "boolean"
|
|
@@ -2227,7 +2273,10 @@
|
|
|
2227
2273
|
"openType": "string",
|
|
2228
2274
|
"url": "string"
|
|
2229
2275
|
},
|
|
2276
|
+
"nested-scroll-body": {},
|
|
2277
|
+
"nested-scroll-header": {},
|
|
2230
2278
|
"official-account": {},
|
|
2279
|
+
"open-container": {},
|
|
2231
2280
|
"open-data": {},
|
|
2232
2281
|
"page-container": {},
|
|
2233
2282
|
"page-meta": {},
|
|
@@ -2265,6 +2314,12 @@
|
|
|
2265
2314
|
"showInfo": "boolean",
|
|
2266
2315
|
"strokeWidth": "string | number"
|
|
2267
2316
|
},
|
|
2317
|
+
"pull-to-refresh": {
|
|
2318
|
+
"damping": "number",
|
|
2319
|
+
"distanceToRefresh": "number",
|
|
2320
|
+
"indicator": "{ activate: string; deactivate: string; release: string; finish: string; }",
|
|
2321
|
+
"prefixCls": "string"
|
|
2322
|
+
},
|
|
2268
2323
|
"radio": {
|
|
2269
2324
|
"checked": "boolean",
|
|
2270
2325
|
"disabled": "boolean",
|
|
@@ -2314,12 +2369,14 @@
|
|
|
2314
2369
|
},
|
|
2315
2370
|
"slot": {},
|
|
2316
2371
|
"snapshot": {},
|
|
2372
|
+
"span": {},
|
|
2317
2373
|
"sticky-header": {},
|
|
2318
2374
|
"sticky-section": {},
|
|
2319
2375
|
"swiper": {
|
|
2320
2376
|
"autoplay": "boolean",
|
|
2321
2377
|
"circular": "boolean",
|
|
2322
2378
|
"current": "number",
|
|
2379
|
+
"currentItemId": "string",
|
|
2323
2380
|
"displayMultipleItems": "number",
|
|
2324
2381
|
"duration": "number",
|
|
2325
2382
|
"full": "boolean",
|
|
@@ -2333,6 +2390,7 @@
|
|
|
2333
2390
|
"zoom": "boolean"
|
|
2334
2391
|
},
|
|
2335
2392
|
"swiper-item": {
|
|
2393
|
+
"deep": "boolean",
|
|
2336
2394
|
"itemId": "string"
|
|
2337
2395
|
},
|
|
2338
2396
|
"switch": {
|