@nativescript/core 8.5.3 → 8.5.4-alpha.0
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/accessibility-css-helper.js +5 -6
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-service.android.js +24 -23
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js +1 -1
- package/accessibility/accessibility-service.ios.js.map +1 -1
- package/accessibility/font-scale.android.js +1 -1
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js +1 -1
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.js +1 -1
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.ios.js +1 -1
- package/accessibility/index.ios.js.map +1 -1
- package/application/application-common.d.ts +197 -41
- package/application/application-common.js +411 -151
- package/application/application-common.js.map +1 -1
- package/application/application-interfaces.d.ts +116 -28
- package/application/application-shims.d.ts +351 -0
- package/application/application-shims.js +353 -0
- package/application/application-shims.js.map +1 -0
- package/application/application.android.d.ts +64 -0
- package/application/application.android.js +434 -0
- package/application/application.android.js.map +1 -0
- package/application/application.d.ts +60 -0
- package/application/application.ios.d.ts +72 -0
- package/application/application.ios.js +375 -0
- package/application/application.ios.js.map +1 -0
- package/application/index.android.d.ts +2 -77
- package/application/index.android.js +2 -455
- package/application/index.android.js.map +1 -1
- package/application/index.d.ts +2 -759
- package/application/index.ios.d.ts +2 -65
- package/application/index.ios.js +2 -516
- package/application/index.ios.js.map +1 -1
- package/application-settings/index.android.js +2 -2
- package/application-settings/index.android.js.map +1 -1
- package/connectivity/index.android.js +4 -5
- package/connectivity/index.android.js.map +1 -1
- package/css/LICENSE +9 -0
- package/css/Readme.md +278 -0
- package/css-value/LICENSE +9 -0
- package/css-value/Readme.md +45 -0
- package/fetch/LICENSE +20 -0
- package/fetch/README.md +1 -0
- package/file-system/file-system-access.android.d.ts +18 -0
- package/file-system/file-system-access.android.js +205 -3
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.d.ts +67 -0
- package/file-system/file-system-access.ios.d.ts +9 -0
- package/file-system/file-system-access.ios.js +106 -0
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.d.ts +60 -0
- package/file-system/index.js +197 -3
- package/file-system/index.js.map +1 -1
- package/image-source/index.android.js +2 -2
- package/image-source/index.android.js.map +1 -1
- package/index.d.ts +22 -139
- package/index.js +15 -156
- package/index.js.map +1 -1
- package/js-libs/easysax/LICENSE +20 -0
- package/js-libs/easysax/README.md +46 -0
- package/module-name-resolver/index.js +5 -5
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js +2 -2
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/package.json +1 -1
- package/platform/index.android.js +5 -5
- package/platform/index.android.js.map +1 -1
- package/platforms/README.md +1 -0
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/ios/TNSWidgets.xcframework/Info.plist +7 -7
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Headers/TNSWidgets.h +1 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +1 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +4 -4
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Headers/TNSWidgets.h +1 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/Resources/Info.plist +4 -4
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/A/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Headers/TNSWidgets.h +1 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/Info.plist +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/TNSWidgets.framework/_CodeSignature/CodeResources +14 -3
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-simulator/dSYMs/TNSWidgets.framework.dSYM/Contents/Resources/DWARF/TNSWidgets +0 -0
- package/ui/action-bar/index.android.js +5 -5
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/core/view/index.android.js +2 -2
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.ios.js +5 -6
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/dialogs/index.ios.js +9 -3
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/frame/activity.android.js +2 -2
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/index.android.d.ts +1 -1
- package/ui/frame/index.android.js +45 -82
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.ios.js +2 -2
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/styling/background.android.js +3 -5
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/style-scope.js +5 -5
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/tab-view/index.android.js +2 -2
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +19 -19
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +1 -2
- package/ui/transition/shared-transition.js.map +1 -1
- package/utils/android/index.d.ts +21 -0
- package/utils/android/index.js +157 -0
- package/utils/android/index.js.map +1 -0
- package/utils/index.android.d.ts +8 -3
- package/utils/index.android.js +15 -10
- package/utils/index.android.js.map +1 -1
- package/utils/index.d.ts +7 -7
- package/utils/index.ios.d.ts +8 -3
- package/utils/index.ios.js +13 -8
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.d.ts +36 -0
- package/utils/ios/index.js +276 -0
- package/utils/ios/index.js.map +1 -0
- package/utils/layout-helper/index.android.js +3 -3
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/mainthread-helper.android.js +2 -2
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/native-helper.android.d.ts +8 -23
- package/utils/native-helper.android.js +10 -169
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.d.ts +272 -255
- package/utils/native-helper.ios.d.ts +8 -38
- package/utils/native-helper.ios.js +10 -295
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/platform-check.d.ts +4 -0
- package/utils/platform-check.js +21 -0
- package/utils/platform-check.js.map +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Application } from '../application';
|
|
2
2
|
import { SDK_VERSION } from '../utils/constants';
|
|
3
3
|
export var connectionType;
|
|
4
4
|
(function (connectionType) {
|
|
@@ -16,7 +16,7 @@ const bluetooth = 'bluetooth';
|
|
|
16
16
|
const vpn = 'vpn';
|
|
17
17
|
// Get Connection Type
|
|
18
18
|
function getConnectivityManager() {
|
|
19
|
-
return getNativeApplication().getApplicationContext().getSystemService(android.content.Context.CONNECTIVITY_SERVICE);
|
|
19
|
+
return Application.android.getNativeApplication().getApplicationContext().getSystemService(android.content.Context.CONNECTIVITY_SERVICE);
|
|
20
20
|
}
|
|
21
21
|
function getActiveNetworkInfo() {
|
|
22
22
|
const connectivityManager = getConnectivityManager();
|
|
@@ -107,7 +107,6 @@ export function startMonitoring(connectionTypeChangedCallback) {
|
|
|
107
107
|
const zoneCallback = zonedCallback(connectionTypeChangedCallback);
|
|
108
108
|
zoneCallback(newConnectionType);
|
|
109
109
|
};
|
|
110
|
-
const ConnectivityManager = android.net.ConnectivityManager;
|
|
111
110
|
if (!networkCallback) {
|
|
112
111
|
var NetworkCallbackImpl = /** @class */ (function (_super) {
|
|
113
112
|
__extends(NetworkCallbackImpl, _super);
|
|
@@ -130,7 +129,7 @@ export function startMonitoring(connectionTypeChangedCallback) {
|
|
|
130
129
|
}
|
|
131
130
|
};
|
|
132
131
|
return NetworkCallbackImpl;
|
|
133
|
-
}(ConnectivityManager.NetworkCallback));
|
|
132
|
+
}(android.net.ConnectivityManager.NetworkCallback));
|
|
134
133
|
networkCallback = NetworkCallbackImpl;
|
|
135
134
|
}
|
|
136
135
|
callback = new networkCallback();
|
|
@@ -152,7 +151,7 @@ export function stopMonitoring() {
|
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
153
|
else {
|
|
155
|
-
|
|
154
|
+
Application.android.unregisterBroadcastReceiver(android.net.ConnectivityManager.CONNECTIVITY_ACTION);
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
157
|
//# sourceMappingURL=index.android.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../packages/core/connectivity/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../packages/core/connectivity/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,CAAN,IAAY,cAOX;AAPD,WAAY,cAAc;IACzB,mDAAQ,CAAA;IACR,mDAAQ,CAAA;IACR,uDAAU,CAAA;IACV,2DAAY,CAAA;IACZ,6DAAa,CAAA;IACb,iDAAO,CAAA;AACR,CAAC,EAPW,cAAc,KAAd,cAAc,QAOzB;AAED,MAAM,IAAI,GAAG,MAAM,CAAC;AACpB,MAAM,MAAM,GAAG,QAAQ,CAAC;AACxB,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,GAAG,GAAG,KAAK,CAAC;AAElB,sBAAsB;AACtB,SAAS,sBAAsB;IAC9B,OAAO,WAAW,CAAC,OAAO,CAAC,oBAAoB,EAAE,CAAC,qBAAqB,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAC1I,CAAC;AAED,SAAS,oBAAoB;IAC5B,MAAM,mBAAmB,GAAG,sBAAsB,EAAE,CAAC;IACrD,IAAI,CAAC,mBAAmB,EAAE;QACzB,OAAO,IAAI,CAAC;KACZ;IAED,OAAO,mBAAmB,CAAC,oBAAoB,EAAE,CAAC;AACnD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
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/css/Readme.md
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# css [](https://travis-ci.org/reworkcss/css)
|
|
2
|
+
|
|
3
|
+
CSS parser / stringifier.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
$ npm install css
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
var css = require('css');
|
|
13
|
+
var obj = css.parse('body { font-size: 12px; }', options);
|
|
14
|
+
css.stringify(obj, options);
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## API
|
|
18
|
+
|
|
19
|
+
### css.parse(code, [options])
|
|
20
|
+
|
|
21
|
+
Accepts a CSS string and returns an AST `object`.
|
|
22
|
+
|
|
23
|
+
`options`:
|
|
24
|
+
|
|
25
|
+
- silent: silently fail on parse errors.
|
|
26
|
+
- source: the path to the file containing `css`. Makes errors and source
|
|
27
|
+
maps more helpful, by letting them know where code comes from.
|
|
28
|
+
|
|
29
|
+
### Example
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
var ast = css.parse('body { font-size: 12px; }', { source: 'source.css' });
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Errors
|
|
37
|
+
|
|
38
|
+
Errors will have `error.position`, just like [`node.position`](#position). The
|
|
39
|
+
error contains the source position in the message. To get the error message
|
|
40
|
+
without the position use `error.reason`.
|
|
41
|
+
|
|
42
|
+
If you create any errors in plugins such as in
|
|
43
|
+
[rework](https://github.com/reworkcss/rework), you __must__ set the `position`
|
|
44
|
+
as well for consistency.
|
|
45
|
+
|
|
46
|
+
## AST
|
|
47
|
+
|
|
48
|
+
### Common properties
|
|
49
|
+
|
|
50
|
+
All nodes have the following properties.
|
|
51
|
+
|
|
52
|
+
#### position
|
|
53
|
+
|
|
54
|
+
Information about the position in the source string that corresponds to
|
|
55
|
+
the node.
|
|
56
|
+
|
|
57
|
+
`Object`:
|
|
58
|
+
|
|
59
|
+
- start: `Object`:
|
|
60
|
+
- line: `Number`.
|
|
61
|
+
- column: `Number`.
|
|
62
|
+
- end: `Object`:
|
|
63
|
+
- line: `Number`.
|
|
64
|
+
- column: `Number`.
|
|
65
|
+
- source: `String` or `undefined`. The value of `options.source` if passed to
|
|
66
|
+
`css.parse`. Otherwise `undefined`.
|
|
67
|
+
- content: `String`. The full source string passed to `css.parse`.
|
|
68
|
+
|
|
69
|
+
The line and column numbers are 1-based: The first line is 1 and the first
|
|
70
|
+
column of a line is 1 (not 0).
|
|
71
|
+
|
|
72
|
+
The `position` property lets you know from which source file the node comes
|
|
73
|
+
from (if available), what that file contains, and what part of that file was
|
|
74
|
+
parsed into the node.
|
|
75
|
+
|
|
76
|
+
#### type
|
|
77
|
+
|
|
78
|
+
`String`. The possible values are the ones listed in the Types section below.
|
|
79
|
+
|
|
80
|
+
#### parent
|
|
81
|
+
|
|
82
|
+
A reference to the parent node, or `null` if the node has no parent.
|
|
83
|
+
|
|
84
|
+
### Types
|
|
85
|
+
|
|
86
|
+
The available values of `node.type` are listed below, as well as the available
|
|
87
|
+
properties of each node (other than the common properties listed above.)
|
|
88
|
+
|
|
89
|
+
#### stylesheet
|
|
90
|
+
|
|
91
|
+
The root node returned by `css.parse`.
|
|
92
|
+
|
|
93
|
+
- stylesheet: `Object`:
|
|
94
|
+
- rules: `Array` of nodes with the types `rule`, `comment` and any of the
|
|
95
|
+
at-rule types.
|
|
96
|
+
|
|
97
|
+
#### rule
|
|
98
|
+
|
|
99
|
+
- selectors: `Array` of `String`s. The list of selectors of the rule, split
|
|
100
|
+
on commas. Each selector is trimmed from whitespace and comments.
|
|
101
|
+
- declarations: `Array` of nodes with the types `declaration` and `comment`.
|
|
102
|
+
|
|
103
|
+
#### declaration
|
|
104
|
+
|
|
105
|
+
- property: `String`. The property name, trimmed from whitespace and
|
|
106
|
+
comments. May not be empty.
|
|
107
|
+
- value: `String`. The value of the property, trimmed from whitespace and
|
|
108
|
+
comments. Empty values are allowed.
|
|
109
|
+
|
|
110
|
+
#### comment
|
|
111
|
+
|
|
112
|
+
A rule-level or declaration-level comment. Comments inside selectors,
|
|
113
|
+
properties and values etc. are lost.
|
|
114
|
+
|
|
115
|
+
- comment: `String`. The part between the starting `/*` and the ending `*/`
|
|
116
|
+
of the comment, including whitespace.
|
|
117
|
+
|
|
118
|
+
#### charset
|
|
119
|
+
|
|
120
|
+
The `@charset` at-rule.
|
|
121
|
+
|
|
122
|
+
- charset: `String`. The part following `@charset `.
|
|
123
|
+
|
|
124
|
+
#### custom-media
|
|
125
|
+
|
|
126
|
+
The `@custom-media` at-rule.
|
|
127
|
+
|
|
128
|
+
- name: `String`. The `--`-prefixed name.
|
|
129
|
+
- media: `String`. The part following the name.
|
|
130
|
+
|
|
131
|
+
#### document
|
|
132
|
+
|
|
133
|
+
The `@document` at-rule.
|
|
134
|
+
|
|
135
|
+
- document: `String`. The part following `@document `.
|
|
136
|
+
- vendor: `String` or `undefined`. The vendor prefix in `@document`, or
|
|
137
|
+
`undefined` if there is none.
|
|
138
|
+
- rules: `Array` of nodes with the types `rule`, `comment` and any of the
|
|
139
|
+
at-rule types.
|
|
140
|
+
|
|
141
|
+
#### font-face
|
|
142
|
+
|
|
143
|
+
The `@font-face` at-rule.
|
|
144
|
+
|
|
145
|
+
- declarations: `Array` of nodes with the types `declaration` and `comment`.
|
|
146
|
+
|
|
147
|
+
#### host
|
|
148
|
+
|
|
149
|
+
The `@host` at-rule.
|
|
150
|
+
|
|
151
|
+
- rules: `Array` of nodes with the types `rule`, `comment` and any of the
|
|
152
|
+
at-rule types.
|
|
153
|
+
|
|
154
|
+
#### import
|
|
155
|
+
|
|
156
|
+
The `@import` at-rule.
|
|
157
|
+
|
|
158
|
+
- import: `String`. The part following `@import `.
|
|
159
|
+
|
|
160
|
+
#### keyframes
|
|
161
|
+
|
|
162
|
+
The `@keyframes` at-rule.
|
|
163
|
+
|
|
164
|
+
- name: `String`. The name of the keyframes rule.
|
|
165
|
+
- vendor: `String` or `undefined`. The vendor prefix in `@keyframes`, or
|
|
166
|
+
`undefined` if there is none.
|
|
167
|
+
- keyframes: `Array` of nodes with the types `keyframe` and `comment`.
|
|
168
|
+
|
|
169
|
+
#### keyframe
|
|
170
|
+
|
|
171
|
+
- values: `Array` of `String`s. The list of “selectors” of the keyframe rule,
|
|
172
|
+
split on commas. Each “selector” is trimmed from whitespace.
|
|
173
|
+
- declarations: `Array` of nodes with the types `declaration` and `comment`.
|
|
174
|
+
|
|
175
|
+
#### media
|
|
176
|
+
|
|
177
|
+
The `@media` at-rule.
|
|
178
|
+
|
|
179
|
+
- media: `String`. The part following `@media `.
|
|
180
|
+
- rules: `Array` of nodes with the types `rule`, `comment` and any of the
|
|
181
|
+
at-rule types.
|
|
182
|
+
|
|
183
|
+
#### namespace
|
|
184
|
+
|
|
185
|
+
The `@namespace` at-rule.
|
|
186
|
+
|
|
187
|
+
- namespace: `String`. The part following `@namespace `.
|
|
188
|
+
|
|
189
|
+
#### page
|
|
190
|
+
|
|
191
|
+
The `@page` at-rule.
|
|
192
|
+
|
|
193
|
+
- selectors: `Array` of `String`s. The list of selectors of the rule, split
|
|
194
|
+
on commas. Each selector is trimmed from whitespace and comments.
|
|
195
|
+
- declarations: `Array` of nodes with the types `declaration` and `comment`.
|
|
196
|
+
|
|
197
|
+
#### supports
|
|
198
|
+
|
|
199
|
+
The `@supports` at-rule.
|
|
200
|
+
|
|
201
|
+
- supports: `String`. The part following `@supports `.
|
|
202
|
+
- rules: `Array` of nodes with the types `rule`, `comment` and any of the
|
|
203
|
+
at-rule types.
|
|
204
|
+
|
|
205
|
+
### Example
|
|
206
|
+
|
|
207
|
+
CSS:
|
|
208
|
+
|
|
209
|
+
```css
|
|
210
|
+
body {
|
|
211
|
+
background: #eee;
|
|
212
|
+
color: #888;
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Parse tree:
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"type": "stylesheet",
|
|
221
|
+
"stylesheet": {
|
|
222
|
+
"rules": [
|
|
223
|
+
{
|
|
224
|
+
"type": "rule",
|
|
225
|
+
"selectors": [
|
|
226
|
+
"body"
|
|
227
|
+
],
|
|
228
|
+
"declarations": [
|
|
229
|
+
{
|
|
230
|
+
"type": "declaration",
|
|
231
|
+
"property": "background",
|
|
232
|
+
"value": "#eee",
|
|
233
|
+
"position": {
|
|
234
|
+
"start": {
|
|
235
|
+
"line": 2,
|
|
236
|
+
"column": 3
|
|
237
|
+
},
|
|
238
|
+
"end": {
|
|
239
|
+
"line": 2,
|
|
240
|
+
"column": 19
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"type": "declaration",
|
|
246
|
+
"property": "color",
|
|
247
|
+
"value": "#888",
|
|
248
|
+
"position": {
|
|
249
|
+
"start": {
|
|
250
|
+
"line": 3,
|
|
251
|
+
"column": 3
|
|
252
|
+
},
|
|
253
|
+
"end": {
|
|
254
|
+
"line": 3,
|
|
255
|
+
"column": 14
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
"position": {
|
|
261
|
+
"start": {
|
|
262
|
+
"line": 1,
|
|
263
|
+
"column": 1
|
|
264
|
+
},
|
|
265
|
+
"end": {
|
|
266
|
+
"line": 4,
|
|
267
|
+
"column": 2
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## License
|
|
277
|
+
|
|
278
|
+
MIT
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013 TJ Holowaychuk <tj@vision-media.ca>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
|
|
2
|
+
# css-value
|
|
3
|
+
|
|
4
|
+
WIP CSS value parser
|
|
5
|
+
|
|
6
|
+
## Example
|
|
7
|
+
|
|
8
|
+
The CSS value string "1px 0 0 5% .5px .10 1.5" yields:
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
[
|
|
12
|
+
{ type: 'number', string: '1px', unit: 'px', value: 1 },
|
|
13
|
+
{ type: 'number', string: '0', unit: '', value: 0 },
|
|
14
|
+
{ type: 'number', string: '0', unit: '', value: 0 },
|
|
15
|
+
{ type: 'number', string: '5%', unit: '%', value: 5 },
|
|
16
|
+
{ type: 'number', string: '.5px', unit: 'px', value: .5 },
|
|
17
|
+
{ type: 'number', string: '.10', unit: '', value: .1 },
|
|
18
|
+
{ type: 'number', string: '1.5', unit: '', value: 1.5 }
|
|
19
|
+
]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## License
|
|
23
|
+
|
|
24
|
+
(The MIT License)
|
|
25
|
+
|
|
26
|
+
Copyright (c) 2013 TJ Holowaychuk <tj@vision-media.ca>
|
|
27
|
+
|
|
28
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
29
|
+
a copy of this software and associated documentation files (the
|
|
30
|
+
'Software'), to deal in the Software without restriction, including
|
|
31
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
32
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
33
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
34
|
+
the following conditions:
|
|
35
|
+
|
|
36
|
+
The above copyright notice and this permission notice shall be
|
|
37
|
+
included in all copies or substantial portions of the Software.
|
|
38
|
+
|
|
39
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
40
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
41
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
42
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
43
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
44
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
45
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/fetch/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2014-2016 GitHub, Inc.
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/fetch/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Implementation of [fetch API](https://fetch.spec.whatwg.org/). Modified version of https://github.com/github/fetch.
|
|
@@ -47,6 +47,12 @@ export declare class FileSystemAccess implements IFileSystemAccess {
|
|
|
47
47
|
readAsync(path: string): Promise<number[]>;
|
|
48
48
|
readSync(path: string, onError?: (error: any) => any): any;
|
|
49
49
|
static getBuffer(buffer: ArrayBuffer | Uint8Array | Uint8ClampedArray): any;
|
|
50
|
+
appendBuffer: any;
|
|
51
|
+
appendBufferAsync(path: string, buffer: ArrayBuffer | Uint8Array | Uint8ClampedArray): Promise<void>;
|
|
52
|
+
appendBufferSync(path: string, buffer: ArrayBuffer | Uint8Array | Uint8ClampedArray, onError?: (error: any) => any): void;
|
|
53
|
+
append: any;
|
|
54
|
+
appendAsync(path: string, bytes: androidNative.Array<number>): Promise<void>;
|
|
55
|
+
appendSync(path: string, bytes: androidNative.Array<number>, onError?: (error: any) => any): void;
|
|
50
56
|
writeBuffer: any;
|
|
51
57
|
writeBufferAsync(path: string, buffer: ArrayBuffer | Uint8Array | Uint8ClampedArray): Promise<void>;
|
|
52
58
|
writeBufferSync(path: string, buffer: ArrayBuffer | Uint8Array | Uint8ClampedArray, onError?: (error: any) => any): void;
|
|
@@ -57,6 +63,9 @@ export declare class FileSystemAccess implements IFileSystemAccess {
|
|
|
57
63
|
readTextAsync(path: string, encoding?: any): Promise<string>;
|
|
58
64
|
readTextSync(path: string, onError?: (error: any) => any, encoding?: any): string;
|
|
59
65
|
private static _removeUtf8Bom;
|
|
66
|
+
appendText: any;
|
|
67
|
+
appendTextAsync(path: string, content: string, encoding?: any): Promise<void>;
|
|
68
|
+
appendTextSync(path: string, content: string, onError?: (error: any) => any, encoding?: any): void;
|
|
60
69
|
writeText: any;
|
|
61
70
|
writeTextAsync(path: string, content: string, encoding?: any): Promise<void>;
|
|
62
71
|
writeTextSync(path: string, content: string, onError?: (error: any) => any, encoding?: any): void;
|
|
@@ -107,6 +116,15 @@ export declare class FileSystemAccess29 extends FileSystemAccess {
|
|
|
107
116
|
getTempFolderPath(): string;
|
|
108
117
|
getLogicalRootPath(): string;
|
|
109
118
|
getCurrentAppPath(): string;
|
|
119
|
+
appendBuffer: any;
|
|
120
|
+
appendBufferAsync(path: string, content: any): Promise<void>;
|
|
121
|
+
appendBufferSync(path: string, content: any, onError?: (error: any) => any): void;
|
|
122
|
+
append: any;
|
|
123
|
+
appendAsync(path: string, content: any): Promise<void>;
|
|
124
|
+
appendSync(path: string, content: any, onError?: (error: any) => any): void;
|
|
125
|
+
appendText: any;
|
|
126
|
+
appendTextAsync(path: string, content: string, encoding?: any): Promise<void>;
|
|
127
|
+
appendTextSync(path: string, content: string, onError?: (error: any) => any, encoding?: any): void;
|
|
110
128
|
readText: any;
|
|
111
129
|
readTextAsync(path: string, encoding?: any): Promise<string>;
|
|
112
130
|
readTextSync(path: string, onError?: (error: any) => any, encoding?: any): string;
|