@akylas/nativescript 8.9.6 → 8.9.9
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/accessibility/font-scale.android.d.ts +1 -0
- package/accessibility/font-scale.android.js +6 -31
- package/accessibility/font-scale.android.js.map +1 -1
- package/animation-frame/index.d.ts +17 -3
- package/application/application-common.d.ts +1 -1
- package/application/application-common.js +2 -1
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +4 -0
- package/application/application.android.js +21 -1
- package/application/application.android.js.map +1 -1
- package/application/application.ios.js +18 -7
- package/application/application.ios.js.map +1 -1
- package/core-types/index.d.ts +2 -2
- package/core-types/index.js +1 -1
- package/core-types/index.js.map +1 -1
- package/debugger/devtools-elements.d.ts +23 -5
- package/debugger/dom-node.d.ts +23 -20
- package/file-system/index.d.ts +382 -98
- package/fps-meter/index.d.ts +24 -7
- package/globals/index.d.ts +4 -19
- package/http/index.d.ts +149 -73
- package/index.d.ts +24 -7
- package/matrix/index.d.ts +32 -5
- package/module-name-resolver/index.d.ts +21 -13
- package/module-name-resolver/qualifier-matcher/index.d.ts +12 -6
- package/package.json +2 -2
- package/platform/index.d.ts +26 -0
- package/platform/screen/index.android.js.map +1 -1
- package/platforms/android/widgets-release.aar +0 -0
- package/profiling/index.d.ts +153 -26
- package/text/formatted-string.d.ts +1 -1
- package/text/span.d.ts +1 -1
- package/trace/index.d.ts +131 -105
- package/ui/animation/keyframe-animation.d.ts +118 -66
- package/ui/builder/binding-builder.d.ts +15 -12
- package/ui/builder/index.d.ts +69 -28
- package/ui/button/index.android.js +2 -0
- package/ui/button/index.android.js.map +1 -1
- package/ui/content-view/index.d.ts +11 -21
- package/ui/core/view-base/index.d.ts +523 -585
- package/ui/core/weak-event-listener/index.d.ts +18 -2
- package/ui/dialogs/index.ios.js +4 -2
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.js +1 -1
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.d.ts +1 -1
- package/ui/editable-text-base/index.android.js +3 -0
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.ios.d.ts +1 -1
- package/ui/editable-text-base/index.ios.js +3 -0
- package/ui/editable-text-base/index.ios.js.map +1 -1
- package/ui/layouts/index.d.ts +1 -2
- package/ui/placeholder/index.d.ts +46 -8
- package/ui/styling/converters.d.ts +2 -2
- package/ui/styling/style-properties.d.ts +109 -92
- package/ui/styling/style-scope.d.ts +48 -79
- package/ui/text-base/formatted-string.d.ts +97 -36
- package/ui/text-base/span.d.ts +115 -38
- package/ui/text-field/index.android.js +3 -0
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/transition/page-transition.android.js +15 -1
- package/ui/transition/page-transition.android.js.map +1 -1
- package/utils/debug.d.ts +61 -17
- package/utils/lazy.d.ts +5 -0
- package/utils/macrotask-scheduler.d.ts +5 -1
- package/utils/types.d.ts +115 -23
- package/xml/index.d.ts +105 -44
package/http/index.d.ts
CHANGED
|
@@ -1,90 +1,166 @@
|
|
|
1
|
-
import { ImageSource } from '../image-source';
|
|
1
|
+
import { ImageSource } from '../image-source';
|
|
2
2
|
import { File } from '../file-system';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Downloads the content from the specified URL as a string.
|
|
6
|
+
* @param url The URL to request from.
|
|
7
|
+
*/
|
|
8
|
+
export function getString(url: string): Promise<string>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Downloads the content from the specified URL as a string.
|
|
12
|
+
* @param options An object that specifies various request options.
|
|
13
|
+
*/
|
|
14
|
+
export function getString(options: HttpRequestOptions): Promise<string>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Downloads the content from the specified URL as a string and returns its JSON.parse representation.
|
|
18
|
+
* @param url The URL to request from.
|
|
19
|
+
*/
|
|
20
|
+
export function getJSON<T>(url: string): Promise<T>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Downloads the content from the specified URL as a string and returns its JSON.parse representation.
|
|
24
|
+
* @param options An object that specifies various request options.
|
|
25
|
+
*/
|
|
26
|
+
export function getJSON<T>(options: HttpRequestOptions): Promise<T>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Downloads the content from the specified URL and attempts to decode it as an image.
|
|
30
|
+
* @param url The URL to request from.
|
|
31
|
+
*/
|
|
32
|
+
export function getImage(url: string): Promise<ImageSource>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Downloads the content from the specified URL and attempts to decode it as an image.
|
|
36
|
+
* @param options An object that specifies various request options.
|
|
37
|
+
*/
|
|
38
|
+
export function getImage(options: HttpRequestOptions): Promise<ImageSource>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Downloads the content from the specified URL and attempts to save it as file.
|
|
42
|
+
* @param url The URL to request from.
|
|
43
|
+
* @param destinationFilePath Optional. The downloaded file path.
|
|
44
|
+
*/
|
|
45
|
+
export function getFile(url: string, destinationFilePath?: string): Promise<File>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Downloads the content from the specified URL and attempts to save it as file.
|
|
49
|
+
* @param options An object that specifies various request options.
|
|
50
|
+
* @param destinationFilePath Optional. The downloaded file path.
|
|
51
|
+
*/
|
|
52
|
+
export function getFile(options: HttpRequestOptions, destinationFilePath?: string): Promise<File>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Downloads the content from the specified URL as binary and returns an ArrayBuffer.
|
|
56
|
+
* @param url The URL to request from.
|
|
57
|
+
*/
|
|
58
|
+
export function getBinary(url: string): Promise<ArrayBuffer>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Downloads the content from the specified URL as binary and returns an ArrayBuffer.
|
|
62
|
+
* @param options An object that specifies various request options.
|
|
63
|
+
*/
|
|
64
|
+
export function getBinary(options: HttpRequestOptions): Promise<ArrayBuffer>;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Makes a generic http request using the provided options and returns a HttpResponse Object.
|
|
68
|
+
* @param options An object that specifies various request options.
|
|
69
|
+
*/
|
|
70
|
+
export function request(options: HttpRequestOptions): Promise<HttpResponse>;
|
|
71
|
+
|
|
4
72
|
/**
|
|
5
73
|
* Provides options for the http requests.
|
|
6
74
|
*/
|
|
7
75
|
export interface HttpRequestOptions {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Gets or sets the request url.
|
|
78
|
+
*/
|
|
79
|
+
url: string;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Gets or sets the request method.
|
|
83
|
+
*/
|
|
84
|
+
method: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Gets or sets the request headers in JSON format.
|
|
88
|
+
*/
|
|
89
|
+
headers?: any;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Gets or sets the request body.
|
|
93
|
+
*/
|
|
94
|
+
content?: string | FormData | ArrayBuffer;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Gets or sets the request timeout in milliseconds.
|
|
98
|
+
*/
|
|
99
|
+
timeout?: number;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Gets or sets wether to *not* follow server's redirection responses.
|
|
103
|
+
*/
|
|
104
|
+
dontFollowRedirects?: boolean;
|
|
32
105
|
}
|
|
106
|
+
|
|
33
107
|
/**
|
|
34
108
|
* Encapsulates HTTP-response information from an HTTP-request.
|
|
35
109
|
*/
|
|
36
110
|
export interface HttpResponse {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Gets the response status code.
|
|
113
|
+
*/
|
|
114
|
+
statusCode: number;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Gets the response headers.
|
|
118
|
+
*/
|
|
119
|
+
headers: Headers;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Gets the response content.
|
|
123
|
+
*/
|
|
124
|
+
content?: HttpContent;
|
|
49
125
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
126
|
+
|
|
127
|
+
export type Headers = { [key: string]: string | string[] };
|
|
128
|
+
|
|
129
|
+
export enum HttpResponseEncoding {
|
|
130
|
+
UTF8,
|
|
131
|
+
GBK,
|
|
56
132
|
}
|
|
57
133
|
/**
|
|
58
134
|
* Encapsulates the content of an HttpResponse.
|
|
59
135
|
*/
|
|
60
136
|
export interface HttpContent {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Gets the response body as raw data.
|
|
139
|
+
*/
|
|
140
|
+
raw: any;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Gets the response body as ArrayBuffer
|
|
144
|
+
*/
|
|
145
|
+
toArrayBuffer: () => ArrayBuffer;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Gets the response body as string.
|
|
149
|
+
*/
|
|
150
|
+
toString: (encoding?: HttpResponseEncoding) => string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Gets the response body as JSON object.
|
|
154
|
+
*/
|
|
155
|
+
toJSON: (encoding?: HttpResponseEncoding) => any;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Gets the response body as ImageSource.
|
|
159
|
+
*/
|
|
160
|
+
toImage: () => Promise<ImageSource>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Gets the response body as file.
|
|
164
|
+
*/
|
|
165
|
+
toFile: (destinationFilePath?: string) => File;
|
|
85
166
|
}
|
|
86
|
-
export declare function getString(arg: any): Promise<string>;
|
|
87
|
-
export declare function getJSON<T>(arg: any): Promise<T>;
|
|
88
|
-
export declare function getImage(arg: any): Promise<ImageSource>;
|
|
89
|
-
export declare function getFile(arg: any, destinationFilePath?: string): Promise<any>;
|
|
90
|
-
export declare function getBinary(arg: any): Promise<ArrayBuffer>;
|
package/index.d.ts
CHANGED
|
@@ -1,21 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference path="./global-types.d.ts" />
|
|
2
|
+
/**
|
|
3
|
+
* IMPORTANT: this is not generated automatically due to this issue:
|
|
4
|
+
* https://github.com/microsoft/TypeScript/issues/36763
|
|
5
|
+
* the reference path above will get rewritten and break on compilation unless kept here
|
|
6
|
+
* Once issue is resolve we can remove this index.d.ts from repo and go back to auto generation on tsc
|
|
7
|
+
*/
|
|
8
|
+
export type { NativeScriptConfig } from './config';
|
|
9
|
+
|
|
2
10
|
export * from './application';
|
|
3
11
|
export * as ApplicationSettings from './application-settings';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
import * as Accessibility from './accessibility';
|
|
13
|
+
export namespace AccessibilityEvents {
|
|
14
|
+
export const accessibilityBlurEvent = Accessibility.accessibilityBlurEvent;
|
|
15
|
+
export const accessibilityFocusEvent = Accessibility.accessibilityFocusEvent;
|
|
16
|
+
export const accessibilityFocusChangedEvent = Accessibility.accessibilityFocusChangedEvent;
|
|
17
|
+
export const accessibilityPerformEscapeEvent = Accessibility.accessibilityPerformEscapeEvent;
|
|
9
18
|
}
|
|
10
19
|
export { AccessibilityLiveRegion, AccessibilityRole, AccessibilityState, AccessibilityTrait, FontScaleCategory } from './accessibility';
|
|
11
20
|
export { Color } from './color';
|
|
12
21
|
export * as Connectivity from './connectivity';
|
|
22
|
+
// import { connectionType, getConnectionType, startMonitoring, stopMonitoring } from './connectivity';
|
|
23
|
+
// export declare const Connectivity: {
|
|
24
|
+
// connectionType: typeof connectionType;
|
|
25
|
+
// getConnectionType: typeof getConnectionType;
|
|
26
|
+
// startMonitoring: typeof startMonitoring;
|
|
27
|
+
// stopMonitoring: typeof stopMonitoring;
|
|
28
|
+
// };
|
|
13
29
|
export * from './core-types';
|
|
14
30
|
export { CSSUtils } from './css/system-classes';
|
|
15
31
|
export { ObservableArray, ChangeType } from './data/observable-array';
|
|
16
32
|
export type { ChangedData } from './data/observable-array';
|
|
17
33
|
export { Observable, WrappedValue, fromObject, fromObjectRecursive } from './data/observable';
|
|
18
|
-
export type { PropertyChangeData, EventData } from './data/observable';
|
|
34
|
+
export type { PropertyChangeData, EventData, EventDataValue } from './data/observable';
|
|
19
35
|
export { VirtualArray } from './data/virtual-array';
|
|
20
36
|
export type { ItemsLoading } from './data/virtual-array';
|
|
21
37
|
export { File, FileSystemEntity, Folder, knownFolders, path, getFileAccess, AndroidDirectory } from './file-system';
|
|
@@ -34,4 +50,5 @@ export { encoding } from './text';
|
|
|
34
50
|
export * from './trace';
|
|
35
51
|
export * from './ui';
|
|
36
52
|
export * as Utils from './utils';
|
|
53
|
+
|
|
37
54
|
export { XmlParser, ParserEventType, ParserEvent } from './xml';
|
package/matrix/index.d.ts
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains utility methods for transforming css matrixes.
|
|
3
|
+
* All methods in this module are experimental and
|
|
4
|
+
* may be changed in a non-major version.
|
|
5
|
+
*/
|
|
6
|
+
|
|
1
7
|
import { TransformFunctionsInfo } from '../ui/animation';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Returns the affine matrix representation of the transformation.
|
|
11
|
+
* @param transformation Property and value of the transformation.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getTransformMatrix: ({ property, value }) => number[];
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Returns the css matrix representation of
|
|
17
|
+
* an affine transformation matrix
|
|
18
|
+
* @param m The flat matrix array to be transformed
|
|
19
|
+
*/
|
|
6
20
|
export declare const matrixArrayToCssMatrix: (m: number[]) => number[];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Multiplies two two-dimensional affine matrices
|
|
24
|
+
* https://jsperf.com/array-vs-object-affine-matrices/
|
|
25
|
+
* @param m1 Left-side matrix array
|
|
26
|
+
* @param m2 Right-side matrix array
|
|
27
|
+
*/
|
|
7
28
|
export declare function multiplyAffine2d(m1: number[], m2: number[]): number[];
|
|
8
|
-
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* QR decomposition using the Gram–Schmidt process.
|
|
32
|
+
* Decomposes a css matrix to simple transforms - translate, rotate and scale.
|
|
33
|
+
* @param matrix The css matrix array to decompose.
|
|
34
|
+
*/
|
|
35
|
+
export function decompose2DTransformMatrix(matrix: number[]): TransformFunctionsInfo;
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides ModuleNameResolver class used for loading files based on device capabilities.
|
|
3
|
+
*/ /** */
|
|
4
|
+
|
|
1
5
|
import { PlatformContext } from './qualifier-matcher';
|
|
2
|
-
|
|
6
|
+
|
|
7
|
+
export { PlatformContext } from './qualifier-matcher';
|
|
8
|
+
|
|
3
9
|
export type ModuleListProvider = () => string[];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
resolveModuleName(path: string, ext: string): string;
|
|
10
|
-
clearCache(): void;
|
|
11
|
-
private resolveModuleNameImpl;
|
|
12
|
-
private getCandidates;
|
|
10
|
+
|
|
11
|
+
export class ModuleNameResolver {
|
|
12
|
+
constructor(context: PlatformContext, moduleListProvider?: ModuleListProvider);
|
|
13
|
+
resolveModuleName(path: string, ext: string): string;
|
|
14
|
+
clearCache(): void;
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export
|
|
16
|
+
|
|
17
|
+
export function resolveModuleName(path: string, ext: string): string;
|
|
18
|
+
export function clearCache(): void;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Used to set a global singular instance of ModuleNameResolver
|
|
22
|
+
* @param resolver instance
|
|
23
|
+
*/
|
|
24
|
+
export function _setResolver(resolver: ModuleNameResolver);
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides ModuleNameResolver class used for loading files based on device capabilities.
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* Used with qualifier matchers and module resolution
|
|
3
7
|
*/
|
|
4
8
|
export interface PlatformContext {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
os: string;
|
|
12
|
+
deviceType: string;
|
|
9
13
|
}
|
|
10
|
-
|
|
11
|
-
export
|
|
14
|
+
|
|
15
|
+
export function findMatch(path: string, ext: string, candidates: Array<string>, context: PlatformContext): string;
|
|
16
|
+
|
|
17
|
+
export function stripQualifiers(path: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akylas/nativescript",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.9",
|
|
4
4
|
"description": "A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
}
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "67c792ef8c6ec7919802121aa16624de56b979c2"
|
|
85
85
|
}
|
package/platform/index.d.ts
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains all kinds of information about the device, its operating system and software.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* tslint:disable:class-name */
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Gets a value indicating if the app is running on the Android platform.
|
|
9
|
+
*/
|
|
10
|
+
export const isAndroid: boolean;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Gets a value indicating if the app is running on the iOS platform.
|
|
14
|
+
*/
|
|
15
|
+
export const isIOS: boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Gets a value indicating if the app is running on an Apple platform.
|
|
19
|
+
*/
|
|
20
|
+
export const isApple: boolean;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Gets a value indicating if the app is running on the iOS platform.
|
|
24
|
+
*/
|
|
25
|
+
export const isVisionOS: boolean;
|
|
26
|
+
|
|
1
27
|
export * from './common';
|
|
2
28
|
export * from './device';
|
|
3
29
|
export * from './screen';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../../packages/core/platform/screen/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU;IAGP,WAAW;QAClB,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../../packages/core/platform/screen/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,UAAU;IAGP,WAAW;QAClB,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAC5D,SAAS,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAgC,CAAC,iBAAiB,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtJ,CAAC;IAED,IAAY,OAAO;QAClB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YAClD,IAAI,CAAC,WAAW,EAAE,CAAC;QACpB,CAAC;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED,IAAI,WAAW;QACd,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;IACjC,CAAC;IACD,IAAI,YAAY;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;IAClC,CAAC;IACD,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC7B,CAAC;IACD,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IACxD,CAAC;IACD,IAAI,UAAU;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IACzD,CAAC;IAEM,cAAc;QACpB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;QACnD,CAAC;QACD,IAAI,CAAC,WAAW,EAAE,CAAC;IACpB,CAAC;CACD;AAED,MAAM,OAAO,MAAM;;AACX,iBAAU,GAAG,IAAI,UAAU,EAAE,CAAC"}
|
|
Binary file
|
package/profiling/index.d.ts
CHANGED
|
@@ -1,33 +1,160 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Counts the number of entry and exits a function had.
|
|
11
|
-
*/
|
|
12
|
-
runCount: number;
|
|
1
|
+
/**
|
|
2
|
+
* Contains contains utility methods for profiling.
|
|
3
|
+
* All methods in this module are experimental and may be changed in a non-major version.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
interface TimerInfo {
|
|
7
|
+
totalTime: number;
|
|
8
|
+
count: number;
|
|
13
9
|
}
|
|
14
|
-
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Profiling mode to use.
|
|
13
|
+
* - `counters` Accumulates method call counts and times until dumpProfiles is called and then prints aggregated statistic in the console. This is the default.
|
|
14
|
+
* - `timeline` Outputs method names along start/end timestamps in the console on the go.
|
|
15
|
+
* - `lifecycle` Outputs basic non-verbose times for startup, navigation, etc.
|
|
16
|
+
*/
|
|
17
|
+
type InstrumentationMode = 'counters' | 'timeline' | 'lifecycle';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Logging levels in order of verbosity.
|
|
21
|
+
*/
|
|
22
|
+
export enum Level {
|
|
23
|
+
none,
|
|
24
|
+
lifecycle,
|
|
25
|
+
timeline,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get the current logging level.
|
|
30
|
+
*/
|
|
31
|
+
export function level(): Level;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Enables profiling.
|
|
35
|
+
*
|
|
36
|
+
* Upon loading of the module it will cache the package.json of the app and check if there is a "profiling" key set,
|
|
37
|
+
* its value can be one of the options available for InstrumentationMode, and if set,
|
|
38
|
+
* enable() will be called in pre app start with the value in the package.json.
|
|
39
|
+
*
|
|
40
|
+
* An example for an `app/package.json` enabling the manual instrumentation profiling is:
|
|
41
|
+
* ```
|
|
42
|
+
* {
|
|
43
|
+
* "main": "main.js",
|
|
44
|
+
* "profiling": "timeline"
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @param type Profiling mode to use.
|
|
49
|
+
* - "counters" - Accumulates method call counts and times until dumpProfiles is called and then prints aggregated statistic in the console. This is the default.
|
|
50
|
+
* - "timeline" - Outputs method names along start/end timestamps in the console on the go.
|
|
51
|
+
* - "lifecycle" - Outputs basic non-verbose times for startup, navigation, etc.
|
|
52
|
+
*/
|
|
53
|
+
export declare function enable(type?: InstrumentationMode): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Disables profiling.
|
|
57
|
+
*/
|
|
58
|
+
export declare function disable(): void;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Gets accurate system timestamp in ms.
|
|
62
|
+
*/
|
|
63
|
+
export declare function time(): number;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Starts a timer with a specific name.
|
|
67
|
+
* Works only if profiling is enabled.
|
|
68
|
+
* @param name Name of the timer.
|
|
69
|
+
*/
|
|
15
70
|
export declare function start(name: string): void;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Pauses a timer with a specific name. This will increase call count and accumulate time.
|
|
74
|
+
* Works only if profiling is enabled.
|
|
75
|
+
* @param name Name of the timer.
|
|
76
|
+
* @returns TimerInfo for the paused timer.
|
|
77
|
+
*/
|
|
16
78
|
export declare function stop(name: string): TimerInfo;
|
|
17
|
-
|
|
18
|
-
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Read a timer info.
|
|
82
|
+
* @param name The name of the timer to obtain information about.
|
|
83
|
+
*/
|
|
84
|
+
export function timer(name: string): TimerInfo;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Returns true if a timer is currently running.
|
|
88
|
+
* @param name Name of the timer.
|
|
89
|
+
* @returns true is the timer is currently running.
|
|
90
|
+
*/
|
|
19
91
|
export declare function isRunning(name: string): boolean;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export declare function
|
|
27
|
-
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Method decorator factory. It will intercept the method call and start and pause a timer before and after the method call.
|
|
95
|
+
* Works only if profiling is enabled.
|
|
96
|
+
* @param name Name of the timer which will be used for method calls. If not provided - the name of the method will be used.
|
|
97
|
+
*/
|
|
98
|
+
export declare function profile(name?: string): MethodDecorator;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Function factory. It will intercept the function call and start and pause a timer before and after the function call. Works only if profiling is enabled.
|
|
102
|
+
* Works only if profiling is enabled.
|
|
103
|
+
* @param fn The function to wrap. Uses the function name to track the times.
|
|
104
|
+
*/
|
|
105
|
+
export declare function profile<F extends Function>(fn: F): F;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Function factory. It will intercept the function call and start and pause a timer before and after the function call. Works only if profiling is enabled.
|
|
109
|
+
* @param name The name used to track calls and times.
|
|
110
|
+
* @param fn The function to wrap.
|
|
111
|
+
*/
|
|
112
|
+
export declare function profile<F extends Function>(name: string, fn: F): F;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Method decorator. It will intercept the method calls and start and pause a timer before and after the method call. Works only if profiling is enabled.
|
|
116
|
+
*/
|
|
117
|
+
export declare function profile<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
|
|
118
|
+
export function profile(): any;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Prints the timer for all methods instrumented with profile decorator.
|
|
122
|
+
*/
|
|
28
123
|
export declare function dumpProfiles(): void;
|
|
29
|
-
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Resets the timers for all methods instrumented with profile decorator.
|
|
127
|
+
*/
|
|
128
|
+
export function resetProfiles(): void;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Starts android cpu profiling.
|
|
132
|
+
* @param name Name of the cpu profiling session.
|
|
133
|
+
*/
|
|
30
134
|
export declare function startCPUProfile(name: string): void;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Stops android cpu profiling.
|
|
138
|
+
* @param name Name of the cpu profiling session.
|
|
139
|
+
*/
|
|
31
140
|
export declare function stopCPUProfile(name: string): void;
|
|
32
|
-
|
|
33
|
-
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Gets the uptime of the current process in milliseconds.
|
|
144
|
+
*/
|
|
145
|
+
export function uptime(): number;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Logs important messages. Contrary to console.log's behavior, the profiling log should output even for release builds.
|
|
149
|
+
*/
|
|
150
|
+
export function log(message: string): void;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Manually output profiling messages. The `@profile` decorator is useful when measuring times that function calls take on the stack
|
|
154
|
+
* but when measuring times between longer periods (startup times, times between the navigatingTo - navigatedTo events etc.)
|
|
155
|
+
* you can call this method and provide manually the times to be logged.
|
|
156
|
+
* @param message A string message
|
|
157
|
+
* @param start The start time (see `time()`)
|
|
158
|
+
* @param end The end time (see `time()`)
|
|
159
|
+
*/
|
|
160
|
+
export function trace(message: string, start: number, end: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../ui/text-base/formatted-string';
|
|
1
|
+
export * from '../ui/text-base/formatted-string';
|
package/text/span.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../ui/text-base/span';
|
|
1
|
+
export * from '../ui/text-base/span';
|