@rsmax/types 1.3.14 → 2.0.0-canary.91

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/lib/index.d.ts CHANGED
@@ -14,7 +14,6 @@ export interface PluginOptions {
14
14
  spm: boolean;
15
15
  }
16
16
  export interface BuildOptions {
17
- turboRenders?: boolean;
18
17
  pxToRpx: boolean;
19
18
  cwd: string;
20
19
  progress: boolean;
@@ -23,7 +22,6 @@ export interface BuildOptions {
23
22
  };
24
23
  output: string;
25
24
  rootDir: string;
26
- compressTemplate?: boolean;
27
25
  UNSAFE_wechatTemplateDepth: number | {
28
26
  [key: string]: number;
29
27
  };
@@ -36,12 +34,10 @@ export interface BuildOptions {
36
34
  notify?: boolean;
37
35
  watch?: boolean;
38
36
  target?: Platform;
39
- analyze?: boolean;
40
37
  devtools?: boolean;
41
38
  type?: BuildType;
42
39
  component?: any;
43
40
  web?: WebOptions;
44
- minimize?: boolean;
45
41
  loglevel?: LogLevel;
46
42
  }
47
43
  export type Options = BuildOptions & PluginOptions;
@@ -85,6 +81,246 @@ export interface AppConfig {
85
81
  };
86
82
  plugins?: AppConfigPlugins;
87
83
  }
84
+ interface WechatTabItem {
85
+ pagePath: string;
86
+ text: string;
87
+ iconPath?: string;
88
+ selectedIconPath?: string;
89
+ }
90
+ export interface WechatAppConfig {
91
+ entryPagePath?: string;
92
+ pages: string[];
93
+ window?: {
94
+ navigationBarBackgroundColor?: string;
95
+ navigationBarTextStyle?: 'white' | 'black';
96
+ navigationBarTitleText?: string;
97
+ navigationStyle?: 'default' | 'custom';
98
+ backgroundColor?: string;
99
+ backgroundTextStyle?: 'dark' | 'light';
100
+ backgroundColorTop?: string;
101
+ backgroundColorBottom?: string;
102
+ enablePullDownRefresh?: boolean;
103
+ onReachBottomDistance?: number;
104
+ pageOrientation?: 'auto' | 'portrait' | 'landscape';
105
+ };
106
+ tabBar?: {
107
+ color: string;
108
+ selectedColor: string;
109
+ backgroundColor: string;
110
+ borderStyle?: 'black' | 'white';
111
+ list: WechatTabItem[];
112
+ position?: 'bottom' | 'top';
113
+ custom?: boolean;
114
+ };
115
+ networkTimeout?: {
116
+ request?: number;
117
+ connectSocket?: number;
118
+ uploadFile?: number;
119
+ downloadFile?: number;
120
+ };
121
+ debug?: boolean;
122
+ functionalPages?: boolean;
123
+ subpackages?: Array<{
124
+ root: string;
125
+ name?: string;
126
+ pages: string[];
127
+ independent?: boolean;
128
+ }>;
129
+ workers?: string;
130
+ requiredBackgroundModes?: string[];
131
+ plugins?: Record<string, any>;
132
+ preloadRule?: Record<string, any>;
133
+ resizable?: boolean;
134
+ navigateToMiniProgramAppIdList?: string[];
135
+ usingComponents?: Record<string, any>;
136
+ permission?: Record<string, any>;
137
+ sitemapLocation?: string;
138
+ style?: string;
139
+ useExtendedLib?: Record<string, any>;
140
+ cloud?: boolean;
141
+ entranceDeclare?: Record<string, any>;
142
+ darkmode?: boolean;
143
+ themeLocation?: string;
144
+ lazyCodeLoading?: string;
145
+ singlePage?: {
146
+ navigationBarFit?: 'float' | 'squeezed';
147
+ };
148
+ }
149
+ interface AliTabItem {
150
+ pagePath: string;
151
+ name: string;
152
+ icon: string;
153
+ activeIcon?: string;
154
+ }
155
+ interface AliWindowConfig {
156
+ defaultTitle?: string;
157
+ pullRefresh?: 'NO' | 'YES';
158
+ allowsBounceVertical?: 'YES' | 'NO';
159
+ transparentTitle?: 'none' | 'always' | 'auto';
160
+ titlePenetrate?: 'YES' | 'NO';
161
+ showTitleLoading?: 'YES' | 'NO';
162
+ titleImage?: string;
163
+ titleBarColor?: string;
164
+ backgroundColor?: string;
165
+ backgroundImageColor?: string;
166
+ backgroundImageUrl?: string;
167
+ gestureBack?: 'YES' | 'NO';
168
+ enableScrollBar?: 'YES' | 'NO';
169
+ onReachBottomDistance?: number;
170
+ }
171
+ export interface AliAppConfig {
172
+ pages: string[];
173
+ window?: AliWindowConfig;
174
+ tabBar?: {
175
+ textColor?: string;
176
+ selectedColor?: string;
177
+ backgroundColor?: string;
178
+ items: AliTabItem[];
179
+ };
180
+ subPackages?: Array<{
181
+ root: string;
182
+ pages: string[];
183
+ }>;
184
+ plugins?: {
185
+ [name: string]: {
186
+ version: string;
187
+ provider: string;
188
+ };
189
+ };
190
+ }
191
+ interface ToutiaoTabItem {
192
+ pagePath: string;
193
+ text: string;
194
+ iconPath?: string;
195
+ selectedIconPath?: string;
196
+ }
197
+ export interface ToutiaoAppConfig {
198
+ pages: string[];
199
+ window?: {
200
+ navigationBarBackgroundColor?: string;
201
+ navigationBarTextStyle?: 'white' | 'black';
202
+ navigationBarTitleText?: string;
203
+ navigationStyle?: 'default' | 'custom';
204
+ backgroundColor?: string;
205
+ backgroundTextStyle?: 'dark' | 'light';
206
+ backgroundColorTop?: string;
207
+ backgroundColorBottom?: string;
208
+ enablePullDownRefresh?: boolean;
209
+ onReachBottomDistance?: number;
210
+ transparentTitle?: 'none' | 'always' | 'auto';
211
+ };
212
+ tabBar?: {
213
+ color: string;
214
+ selectedColor: string;
215
+ backgroundColor: string;
216
+ borderStyle?: 'black' | 'white';
217
+ list: ToutiaoTabItem[];
218
+ position?: 'bottom' | 'top';
219
+ custom?: boolean;
220
+ };
221
+ navigateToMiniProgramAppIdList?: string[];
222
+ permission?: Record<string, any>;
223
+ }
224
+ export declare enum WebRouterType {
225
+ hash = "hash",
226
+ browser = "browser"
227
+ }
228
+ export interface WebAppConfig {
229
+ pages: string[];
230
+ window?: {
231
+ defaultTitle?: string;
232
+ pullRefresh?: boolean;
233
+ onReachBottomDistance?: number;
234
+ };
235
+ tabBar?: {
236
+ textColor?: string;
237
+ selectedColor?: string;
238
+ backgroundColor?: string;
239
+ items: Array<{
240
+ url: string;
241
+ title: string;
242
+ image: string;
243
+ activeImage?: string;
244
+ }>;
245
+ };
246
+ router?: {
247
+ type: WebRouterType;
248
+ };
249
+ }
250
+ export type PlatformAppConfigMap = {
251
+ wechat: WechatAppConfig;
252
+ ali: AliAppConfig;
253
+ toutiao: ToutiaoAppConfig;
254
+ web: WebAppConfig;
255
+ };
256
+ export interface PageConfig {
257
+ usingComponents?: {
258
+ [key: string]: string;
259
+ };
260
+ navigationBarTitleText?: string;
261
+ enablePullDownRefresh?: boolean;
262
+ [key: string]: any;
263
+ }
264
+ export interface WechatPageConfig {
265
+ navigationBarBackgroundColor?: string;
266
+ navigationBarTextStyle?: 'black' | 'white';
267
+ navigationBarTitleText?: string;
268
+ navigationStyle?: 'default' | 'custom';
269
+ backgroundColor?: string;
270
+ backgroundTextStyle?: 'dark' | 'light';
271
+ backgroundColorTop?: string;
272
+ backgroundColorBottom?: string;
273
+ enablePullDownRefresh?: boolean;
274
+ onReachBottomDistance?: number;
275
+ pageOrientation?: 'auto' | 'portrait' | 'landscape';
276
+ disableScroll?: boolean;
277
+ usingComponents?: Record<string, any>;
278
+ }
279
+ interface AliWindowConfig {
280
+ defaultTitle?: string;
281
+ pullRefresh?: 'NO' | 'YES';
282
+ allowsBounceVertical?: 'YES' | 'NO';
283
+ transparentTitle?: 'none' | 'always' | 'auto';
284
+ titlePenetrate?: 'YES' | 'NO';
285
+ showTitleLoading?: 'YES' | 'NO';
286
+ titleImage?: string;
287
+ titleBarColor?: string;
288
+ backgroundColor?: string;
289
+ backgroundImageColor?: string;
290
+ backgroundImageUrl?: string;
291
+ gestureBack?: 'YES' | 'NO';
292
+ enableScrollBar?: 'YES' | 'NO';
293
+ onReachBottomDistance?: number;
294
+ }
295
+ export interface AliPageConfig extends AliWindowConfig {
296
+ optionMenu?: Record<string, any>;
297
+ barButtonTheme?: 'default' | 'light';
298
+ }
299
+ export interface ToutiaoPageConfig {
300
+ navigationBarBackgroundColor?: string;
301
+ navigationBarTextStyle?: 'black' | 'white';
302
+ navigationBarTitleText?: string;
303
+ navigationStyle?: 'default' | 'custom';
304
+ backgroundColor?: string;
305
+ backgroundTextStyle?: 'dark' | 'light';
306
+ enablePullDownRefresh?: boolean;
307
+ onReachBottomDistance?: number;
308
+ disableScroll?: boolean;
309
+ disableSwipeBack?: boolean;
310
+ usingComponents?: Record<string, any>;
311
+ }
312
+ export interface WebPageConfig {
313
+ defaultTitle?: string;
314
+ enablePullDownRefresh?: boolean;
315
+ onReachBottomDistance?: number;
316
+ usingComponents?: Record<string, any>;
317
+ }
318
+ export type PlatformPageConfigMap = {
319
+ wechat: WechatPageConfig;
320
+ ali: AliPageConfig;
321
+ toutiao: ToutiaoPageConfig;
322
+ web: WebPageConfig;
323
+ };
88
324
  export interface MiniPluginConfig {
89
325
  pages: string[];
90
326
  publicComponents: {
@@ -242,3 +478,4 @@ export interface RuntimePlugin {
242
478
  element: React.ReactElement<any>;
243
479
  }) => React.ReactElement<any>;
244
480
  }
481
+ export {};
package/lib/index.js CHANGED
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebRouterType = void 0;
4
+ // Web AppConfig
5
+ var WebRouterType;
6
+ (function (WebRouterType) {
7
+ WebRouterType["hash"] = "hash";
8
+ WebRouterType["browser"] = "browser";
9
+ })(WebRouterType || (exports.WebRouterType = WebRouterType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsmax/types",
3
- "version": "1.3.14",
3
+ "version": "2.0.0-canary.91+5982cbe",
4
4
  "description": "Rsmax Types",
5
5
  "license": "MIT",
6
6
  "author": "Caihuanyu <eterlf41@gmail.com>",
@@ -21,5 +21,5 @@
21
21
  "publishConfig": {
22
22
  "access": "public"
23
23
  },
24
- "gitHead": "a542ee33a167f862ec9db0f7466a33f1cef31106"
24
+ "gitHead": "5982cbe3e1e3a3bf52fa41d0c31bfb043277f669"
25
25
  }