@tarojs/plugin-platform-swan 3.5.0-beta.4 → 3.5.0-beta.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/plugin-platform-swan",
3
- "version": "3.5.0-beta.4",
3
+ "version": "3.5.0-beta.7",
4
4
  "description": "百度小程序平台插件",
5
5
  "author": "Chen-jj",
6
6
  "homepage": "https://github.com/nervjs/taro/tree/master/packages/taro-swan#readme",
@@ -19,17 +19,16 @@
19
19
  "type": "git",
20
20
  "url": "git+https://github.com/NervJS/taro.git"
21
21
  },
22
- "scripts": {
23
- "build": "rollup -c",
24
- "dev": "rollup -c -w"
25
- },
26
22
  "bugs": {
27
23
  "url": "https://github.com/NervJS/taro/issues"
28
24
  },
29
25
  "dependencies": {
30
- "@tarojs/components": "3.5.0-beta.4",
31
- "@tarojs/service": "3.5.0-beta.4",
32
- "@tarojs/shared": "3.5.0-beta.4"
26
+ "@tarojs/components": "3.5.0-beta.7",
27
+ "@tarojs/service": "3.5.0-beta.7",
28
+ "@tarojs/shared": "3.5.0-beta.7"
33
29
  },
34
- "gitHead": "7aca7841ed7e2af1b182ff5d24e91f44730ce783"
35
- }
30
+ "scripts": {
31
+ "build": "rollup -c",
32
+ "dev": "rollup -c -w"
33
+ }
34
+ }
@@ -1,10 +1,11 @@
1
- export * from '@tarojs/components/mini';
2
- export declare const Tabs = "tabs";
3
- export declare const TabItem = "tab-item";
4
- export declare const AnimationVideo = "animation-video";
5
- export declare const AnimationView = "animation-view";
6
- export declare const ArCamera = "ar-camera";
7
- export declare const RtcRoom = "rtc-room";
8
- export declare const RtcRoomItem = "rtc-room-item";
9
- export declare const OpenData = "open-data";
10
- export declare const Login = "login";
1
+ declare const Tabs = "tabs";
2
+ declare const TabItem = "tab-item";
3
+ declare const AnimationVideo = "animation-video";
4
+ declare const AnimationView = "animation-view";
5
+ declare const ArCamera = "ar-camera";
6
+ declare const RtcRoom = "rtc-room";
7
+ declare const RtcRoomItem = "rtc-room-item";
8
+ declare const OpenData = "open-data";
9
+ declare const Login = "login";
10
+ export * from '@tarojs/components/mini';
11
+ export { Tabs, TabItem, AnimationVideo, AnimationView, ArCamera, RtcRoom, RtcRoomItem, OpenData, Login };
package/types/index.d.ts CHANGED
@@ -1,5 +1,69 @@
1
- import Swan from './program';
2
- import type { IPluginContext } from '@tarojs/service';
3
- export { Swan };
4
- declare const _default: (ctx: IPluginContext) => void;
5
- export default _default;
1
+ import { IPluginContext, TaroPlatformBase } from '@tarojs/service';
2
+ import { RecursiveTemplate } from "@tarojs/shared/dist/template";
3
+ interface TemplateOptions {
4
+ flattenViewLevel?: number;
5
+ flattenCoverLevel?: number;
6
+ flattenTextLevel?: number;
7
+ }
8
+ declare class Template extends RecursiveTemplate {
9
+ supportXS: boolean;
10
+ Adapter: {
11
+ if: string;
12
+ else: string;
13
+ elseif: string;
14
+ for: string;
15
+ forItem: string;
16
+ forIndex: string;
17
+ key: string;
18
+ xs: string;
19
+ type: string;
20
+ };
21
+ flattenViewLevel: number;
22
+ flattenCoverLevel: number;
23
+ flattenTextLevel: number;
24
+ legacyMiniComponents: {
25
+ [key: string]: Record<string, string>;
26
+ };
27
+ constructor(options?: TemplateOptions);
28
+ createMiniComponents(components: any): any;
29
+ buildXsTemplate(): string;
30
+ dataKeymap(keymap: string): string;
31
+ getAttrValue(value: string, key: string, nodeName: string): string;
32
+ buildFlattenNodeAttributes(nodeName: string): string;
33
+ buildFlattenView: (level?: number) => string;
34
+ buildFlattenCover: (level?: number) => string;
35
+ buildFlattenText: (level?: number) => string;
36
+ modifyLoopBody: (child: string, nodeName: string) => string;
37
+ modifyLoopContainer: (children: string, nodeName: string) => string;
38
+ modifyTemplateResult: (res: string, nodeName: string) => string;
39
+ buildXSTmpExtra(): string;
40
+ }
41
+ declare class Swan extends TaroPlatformBase {
42
+ platform: string;
43
+ globalObject: string;
44
+ runtimePath: string;
45
+ taroComponentsPath: string;
46
+ fileType: {
47
+ templ: string;
48
+ style: string;
49
+ config: string;
50
+ script: string;
51
+ xs: string;
52
+ };
53
+ template: Template;
54
+ /**
55
+ * 1. setupTransaction - init
56
+ * 2. setup
57
+ * 3. setupTransaction - close
58
+ * 4. buildTransaction - init
59
+ * 5. build
60
+ * 6. buildTransaction - close
61
+ */
62
+ constructor(ctx: any, config: any);
63
+ /**
64
+ * 增加组件或修改组件属性
65
+ */
66
+ modifyComponents(): void;
67
+ }
68
+ declare const _default: (ctx: IPluginContext) => void;
69
+ export { _default as default, Swan };
@@ -1,11 +1,165 @@
1
- import { initNativeApi } from './apis';
2
- export { initNativeApi };
3
- export * from './components';
4
- export * from './apis-list';
5
- export declare const hostConfig: {
6
- initNativeApi: typeof initNativeApi;
7
- getPathIndex(indexOfNode: any): string;
8
- getSpecialNodes(): string[];
9
- modifyTaroEvent(event: any, node: any): void;
10
- getMiniLifecycle(config: any): any;
11
- };
1
+ declare function initNativeApi(taro: any): void;
2
+ declare const needPromiseApis: Set<string>;
3
+ declare const components: {
4
+ Progress: {
5
+ "border-radius": string;
6
+ "font-size": string;
7
+ duration: string;
8
+ };
9
+ RichText: {
10
+ selectable: string;
11
+ name: string;
12
+ attrs: string;
13
+ children: string;
14
+ text: string;
15
+ "image-menu-prevent": string;
16
+ preview: string;
17
+ };
18
+ Map: {
19
+ polygons: string;
20
+ "enable-3D": string;
21
+ "show-compass": string;
22
+ "enable-overlooking": string;
23
+ "enable-zoom": string;
24
+ "enable-scroll": string;
25
+ "enable-rotate": string;
26
+ bindRegionChange: string;
27
+ bindPoiTap: string;
28
+ };
29
+ Button: {
30
+ bindGetPhoneNumber: string;
31
+ bindGetUserInfo: string;
32
+ bindOpenSetting: string;
33
+ bindContact: string;
34
+ bindChooseAddress: string;
35
+ bindChooseInvoiceTitle: string;
36
+ bindLogin: string;
37
+ };
38
+ Form: {
39
+ "report-type": string;
40
+ "template-id": string;
41
+ "subscribe-id": string;
42
+ };
43
+ Input: {
44
+ "adjust-position": string;
45
+ };
46
+ Textarea: {
47
+ "confirm-type": string;
48
+ "confirm-hold": string;
49
+ "show-confirm-bar": string;
50
+ "adjust-position": string;
51
+ };
52
+ Navigator: {
53
+ target: string;
54
+ "app-id": string;
55
+ path: string;
56
+ "extra-data": string;
57
+ version: string;
58
+ };
59
+ Image: {
60
+ webp: string;
61
+ "image-menu-prevent": string;
62
+ preview: string;
63
+ "original-src": string;
64
+ };
65
+ Video: {
66
+ title: string;
67
+ "show-no-wifi-tip": string;
68
+ "vslide-gesture": string;
69
+ "vslide-gesture-in-fullscreen": string;
70
+ "enable-play-gesture": string;
71
+ "show-rate-btn": string;
72
+ "show-vslide-btn-in-fullscreen": string;
73
+ "silent-play": string;
74
+ bindLoadedMetadata: string;
75
+ };
76
+ Ad: {
77
+ appid: string;
78
+ apid: string;
79
+ type: string;
80
+ updatetime: string;
81
+ bindStatus: string;
82
+ };
83
+ Tabs: {
84
+ "tabs-background-color": string;
85
+ "tabs-active-text-color": string;
86
+ "tabs-inactive-text-color": string;
87
+ "tabs-underline-color": string;
88
+ "active-name": string;
89
+ "url-query-name": string;
90
+ "max-tab-item-amount": string;
91
+ bindTabChange: string;
92
+ };
93
+ TabItem: {
94
+ label: string;
95
+ name: string;
96
+ "badge-type": string;
97
+ "badge-text": string;
98
+ };
99
+ AnimationVideo: {
100
+ "resource-width": string;
101
+ "resource-height": string;
102
+ "canvas-style": string;
103
+ path: string;
104
+ loop: string;
105
+ autoplay: string;
106
+ bindStarted: string;
107
+ bindEnded: string;
108
+ };
109
+ AnimationView: {
110
+ path: string;
111
+ loop: string;
112
+ autoplay: string;
113
+ action: string;
114
+ hidden: string;
115
+ bindEnded: string;
116
+ };
117
+ ArCamera: {
118
+ key: string;
119
+ type: string;
120
+ flash: string;
121
+ bindError: string;
122
+ bindLoad: string;
123
+ bindMessage: string;
124
+ bindScanCode: string;
125
+ };
126
+ RtcRoom: {
127
+ id: string;
128
+ "enable-camera": string;
129
+ "enable-auto-focus": string;
130
+ "enable-zoom": string;
131
+ "device-position": string;
132
+ "enable-mic": string;
133
+ "enable-agc": string;
134
+ "enable-ans": string;
135
+ bitrate: string;
136
+ "video-width": string;
137
+ "video-height": string;
138
+ "enable-remote-mirror": string;
139
+ "local-mirror": string;
140
+ "sound-mode": string;
141
+ bindStateChange: string;
142
+ bindError: string;
143
+ };
144
+ RtcRoomItem: {
145
+ id: string;
146
+ type: string;
147
+ "user-id": string;
148
+ };
149
+ OpenData: {
150
+ type: string;
151
+ };
152
+ Login: {
153
+ "button-class": string;
154
+ bindGetPhoneNumber: string;
155
+ bindLoadError: string;
156
+ };
157
+ };
158
+ declare const hostConfig: {
159
+ initNativeApi: typeof initNativeApi;
160
+ getPathIndex(indexOfNode: any): string;
161
+ getSpecialNodes(): string[];
162
+ modifyTaroEvent(event: any, node: any): void;
163
+ getMiniLifecycle(config: any): any;
164
+ };
165
+ export { initNativeApi, needPromiseApis, components, hostConfig };
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +0,0 @@
1
- export declare const needPromiseApis: Set<string>;
package/types/apis.d.ts DELETED
@@ -1,5 +0,0 @@
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;
@@ -1,155 +0,0 @@
1
- export declare const components: {
2
- Progress: {
3
- 'border-radius': string;
4
- 'font-size': string;
5
- duration: string;
6
- };
7
- RichText: {
8
- selectable: string;
9
- name: string;
10
- attrs: string;
11
- children: string;
12
- text: string;
13
- 'image-menu-prevent': string;
14
- preview: string;
15
- };
16
- Map: {
17
- polygons: string;
18
- 'enable-3D': string;
19
- 'show-compass': string;
20
- 'enable-overlooking': string;
21
- 'enable-zoom': string;
22
- 'enable-scroll': string;
23
- 'enable-rotate': string;
24
- bindRegionChange: string;
25
- bindPoiTap: string;
26
- };
27
- Button: {
28
- bindGetPhoneNumber: string;
29
- bindGetUserInfo: string;
30
- bindOpenSetting: string;
31
- bindContact: string;
32
- bindChooseAddress: string;
33
- bindChooseInvoiceTitle: string;
34
- bindLogin: string;
35
- };
36
- Form: {
37
- 'report-type': string;
38
- 'template-id': string;
39
- 'subscribe-id': string;
40
- };
41
- Input: {
42
- 'adjust-position': string;
43
- };
44
- Textarea: {
45
- 'confirm-type': string;
46
- 'confirm-hold': string;
47
- 'show-confirm-bar': string;
48
- 'adjust-position': string;
49
- };
50
- Navigator: {
51
- target: string;
52
- 'app-id': string;
53
- path: string;
54
- 'extra-data': string;
55
- version: string;
56
- };
57
- Image: {
58
- webp: string;
59
- 'image-menu-prevent': string;
60
- preview: string;
61
- 'original-src': string;
62
- };
63
- Video: {
64
- title: string;
65
- 'show-no-wifi-tip': string;
66
- 'vslide-gesture': string;
67
- 'vslide-gesture-in-fullscreen': string;
68
- 'enable-play-gesture': string;
69
- 'show-rate-btn': string;
70
- 'show-vslide-btn-in-fullscreen': string;
71
- 'silent-play': string;
72
- bindLoadedMetadata: string;
73
- };
74
- Ad: {
75
- appid: string;
76
- apid: string;
77
- type: string;
78
- updatetime: string;
79
- bindStatus: string;
80
- };
81
- Tabs: {
82
- 'tabs-background-color': string;
83
- 'tabs-active-text-color': string;
84
- 'tabs-inactive-text-color': string;
85
- 'tabs-underline-color': string;
86
- 'active-name': string;
87
- 'url-query-name': string;
88
- 'max-tab-item-amount': string;
89
- bindTabChange: string;
90
- };
91
- TabItem: {
92
- label: string;
93
- name: string;
94
- 'badge-type': string;
95
- 'badge-text': string;
96
- };
97
- AnimationVideo: {
98
- 'resource-width': string;
99
- 'resource-height': string;
100
- 'canvas-style': string;
101
- path: string;
102
- loop: string;
103
- autoplay: string;
104
- bindStarted: string;
105
- bindEnded: string;
106
- };
107
- AnimationView: {
108
- path: string;
109
- loop: string;
110
- autoplay: string;
111
- action: string;
112
- hidden: string;
113
- bindEnded: string;
114
- };
115
- ArCamera: {
116
- key: string;
117
- type: string;
118
- flash: string;
119
- bindError: string;
120
- bindLoad: string;
121
- bindMessage: string;
122
- bindScanCode: string;
123
- };
124
- RtcRoom: {
125
- id: string;
126
- 'enable-camera': string;
127
- 'enable-auto-focus': string;
128
- 'enable-zoom': string;
129
- 'device-position': string;
130
- 'enable-mic': string;
131
- 'enable-agc': string;
132
- 'enable-ans': string;
133
- bitrate: string;
134
- 'video-width': string;
135
- 'video-height': string;
136
- 'enable-remote-mirror': string;
137
- 'local-mirror': string;
138
- 'sound-mode': string;
139
- bindStateChange: string;
140
- bindError: string;
141
- };
142
- RtcRoomItem: {
143
- id: string;
144
- type: string;
145
- 'user-id': string;
146
- };
147
- OpenData: {
148
- type: string;
149
- };
150
- Login: {
151
- 'button-class': string;
152
- bindGetPhoneNumber: string;
153
- bindLoadError: string;
154
- };
155
- };
@@ -1,29 +0,0 @@
1
- import { TaroPlatformBase } from '@tarojs/service';
2
- import { Template } from './template';
3
- export default class Swan extends TaroPlatformBase {
4
- platform: string;
5
- globalObject: string;
6
- runtimePath: string;
7
- taroComponentsPath: string;
8
- fileType: {
9
- templ: string;
10
- style: string;
11
- config: string;
12
- script: string;
13
- xs: string;
14
- };
15
- template: Template;
16
- /**
17
- * 1. setupTransaction - init
18
- * 2. setup
19
- * 3. setupTransaction - close
20
- * 4. buildTransaction - init
21
- * 5. build
22
- * 6. buildTransaction - close
23
- */
24
- constructor(ctx: any, config: any);
25
- /**
26
- * 增加组件或修改组件属性
27
- */
28
- modifyComponents(): void;
29
- }
@@ -1,40 +0,0 @@
1
- import { RecursiveTemplate } from '@tarojs/shared/dist/template';
2
- interface TemplateOptions {
3
- flattenViewLevel?: number;
4
- flattenCoverLevel?: number;
5
- flattenTextLevel?: number;
6
- }
7
- export declare class Template extends RecursiveTemplate {
8
- supportXS: boolean;
9
- Adapter: {
10
- if: string;
11
- else: string;
12
- elseif: string;
13
- for: string;
14
- forItem: string;
15
- forIndex: string;
16
- key: string;
17
- xs: string;
18
- type: string;
19
- };
20
- flattenViewLevel: number;
21
- flattenCoverLevel: number;
22
- flattenTextLevel: number;
23
- legacyMiniComponents: {
24
- [key: string]: Record<string, string>;
25
- };
26
- constructor(options?: TemplateOptions);
27
- createMiniComponents(components: any): any;
28
- buildXsTemplate(): string;
29
- dataKeymap(keymap: string): string;
30
- getAttrValue(value: string, key: string, nodeName: string): string;
31
- buildFlattenNodeAttributes(nodeName: string): string;
32
- buildFlattenView: (level?: number) => string;
33
- buildFlattenCover: (level?: number) => string;
34
- buildFlattenText: (level?: number) => string;
35
- modifyLoopBody: (child: string, nodeName: string) => string;
36
- modifyLoopContainer: (children: string, nodeName: string) => string;
37
- modifyTemplateResult: (res: string, nodeName: string) => string;
38
- buildXSTmpExtra(): string;
39
- }
40
- export {};