@tarojs/plugin-platform-h5 4.0.0-alpha.0 → 4.0.0-alpha.10
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 +11 -4
- package/build/definition-json/parser.ts +1 -1
- package/build/utils/ast.ts +6 -6
- package/build/utils/helper.ts +2 -2
- package/dist/definition.json +65 -41
- package/dist/index.d.ts +5 -26
- package/dist/index.js +11 -311
- package/dist/index.js.map +1 -1
- package/dist/program.d.ts +25 -0
- package/dist/runtime/apis/index.d.ts +5 -5
- package/dist/runtime/apis/index.js +1 -1
- package/dist/runtime/apis/index.js.map +1 -1
- package/dist/runtime/apis/taro.d.ts +1 -1
- package/dist/runtime/components/index.d.ts +1 -0
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +5 -0
- package/dist/runtime/index.js.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/package.json +14 -23
- package/dist/dist/definition.json.d.ts +0 -3627
- package/dist/dist/definition.json.js +0 -4
- package/dist/dist/definition.json.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -154,7 +154,14 @@ See `/LICENSE` for details of the license.
|
|
|
154
154
|
|
|
155
155
|
==================
|
|
156
156
|
|
|
157
|
-
MIT (
|
|
158
|
-
The following files embed [
|
|
159
|
-
`/packages/taro-components
|
|
160
|
-
See `/LICENSE` for details of the license.
|
|
157
|
+
MIT (weui):
|
|
158
|
+
The following files embed [weui](https://github.com/Tencent/weui) MIT:
|
|
159
|
+
`/packages/taro-components/src/components/*.scss`
|
|
160
|
+
See `/LICENSE.txt` for details of the license.
|
|
161
|
+
|
|
162
|
+
==================
|
|
163
|
+
|
|
164
|
+
Apache-2.0 (intersection-observer):
|
|
165
|
+
The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
|
|
166
|
+
`/packages/taro-api/src/polyfill/intersection-observer.ts`
|
|
167
|
+
See `/LICENSE.txt` for details of the license.
|
package/build/utils/ast.ts
CHANGED
|
@@ -52,12 +52,12 @@ export function generateDocumentation (
|
|
|
52
52
|
|
|
53
53
|
function visitAST (node: ts.Node, o: DocEntry[]) {
|
|
54
54
|
// Only consider exported nodes
|
|
55
|
-
if (!isNodeExported(node as ts.Declaration) || node.kind === ts.SyntaxKind.EndOfFileToken || node.kind === ts.SyntaxKind.DeclareKeyword
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
if (!isNodeExported(node as ts.Declaration) || node.kind === ts.SyntaxKind.EndOfFileToken || node.kind === ts.SyntaxKind.DeclareKeyword ||
|
|
56
|
+
ts.isImportDeclaration(node) || ts.isImportEqualsDeclaration(node) || ts.isImportClause(node) ||
|
|
57
|
+
ts.isExportAssignment(node) || ts.isExportDeclaration(node) ||
|
|
58
|
+
ts.isExpressionStatement(node) || ts.isEmptyStatement(node) ||
|
|
59
|
+
ts.isStringLiteral(node) ||
|
|
60
|
+
node.kind === ts.SyntaxKind.ExportKeyword) {
|
|
61
61
|
return
|
|
62
62
|
}
|
|
63
63
|
|
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,6 +2208,7 @@
|
|
|
2190
2208
|
},
|
|
2191
2209
|
"lifestyle": {},
|
|
2192
2210
|
"like": {},
|
|
2211
|
+
"list-builder": {},
|
|
2193
2212
|
"list-view": {},
|
|
2194
2213
|
"live-player": {},
|
|
2195
2214
|
"live-pusher": {},
|
|
@@ -2227,7 +2246,10 @@
|
|
|
2227
2246
|
"openType": "string",
|
|
2228
2247
|
"url": "string"
|
|
2229
2248
|
},
|
|
2249
|
+
"nested-scroll-body": {},
|
|
2250
|
+
"nested-scroll-header": {},
|
|
2230
2251
|
"official-account": {},
|
|
2252
|
+
"open-container": {},
|
|
2231
2253
|
"open-data": {},
|
|
2232
2254
|
"page-container": {},
|
|
2233
2255
|
"page-meta": {},
|
|
@@ -2320,12 +2342,14 @@
|
|
|
2320
2342
|
},
|
|
2321
2343
|
"slot": {},
|
|
2322
2344
|
"snapshot": {},
|
|
2345
|
+
"span": {},
|
|
2323
2346
|
"sticky-header": {},
|
|
2324
2347
|
"sticky-section": {},
|
|
2325
2348
|
"swiper": {
|
|
2326
2349
|
"autoplay": "boolean",
|
|
2327
2350
|
"circular": "boolean",
|
|
2328
2351
|
"current": "number",
|
|
2352
|
+
"currentItemId": "string",
|
|
2329
2353
|
"displayMultipleItems": "number",
|
|
2330
2354
|
"duration": "number",
|
|
2331
2355
|
"full": "boolean",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
runtimePath: string[] | string;
|
|
5
|
-
constructor(ctx: IPluginContext, config: TConfig);
|
|
6
|
-
get framework(): "vue3" | "react" | "preact" | "nerv" | "vue";
|
|
7
|
-
get useHtmlComponents(): boolean;
|
|
8
|
-
get useDeprecatedAdapterComponent(): boolean;
|
|
9
|
-
get apiLibrary(): string;
|
|
10
|
-
get aliasFramework(): string;
|
|
11
|
-
protected mainFields: string[];
|
|
12
|
-
get componentLibrary(): string;
|
|
13
|
-
get componentAdapter(): string;
|
|
14
|
-
get routerLibrary(): string;
|
|
15
|
-
get libraryDefinition(): string;
|
|
16
|
-
/**
|
|
17
|
-
* 修改 Webpack 配置
|
|
18
|
-
*/
|
|
19
|
-
modifyWebpackConfig(): void;
|
|
20
|
-
/**
|
|
21
|
-
* 修改 Vite 配置
|
|
22
|
-
*/
|
|
23
|
-
modifyViteConfig(): void;
|
|
24
|
-
}
|
|
1
|
+
import H5 from './program';
|
|
2
|
+
import type { IPluginContext } from '@tarojs/service';
|
|
3
|
+
export { H5 };
|
|
25
4
|
declare const _default: (ctx: IPluginContext) => void;
|
|
26
|
-
export
|
|
27
|
-
export
|
|
5
|
+
export default _default;
|
|
6
|
+
export * from './utils';
|