@nativescript/core 8.5.7 → 8.5.8-next-07-10-2023-5505429656
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/application/application.android.js +70 -46
- package/application/application.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/js-libs/easysax/LICENSE +20 -0
- package/js-libs/easysax/README.md +46 -0
- package/package.json +1 -1
- package/platforms/README.md +1 -0
|
@@ -1,27 +1,40 @@
|
|
|
1
1
|
import { profile } from '../profiling';
|
|
2
2
|
import { ApplicationCommon } from './application-common';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
let BroadcastReceiver_;
|
|
4
|
+
function initBroadcastReceiver() {
|
|
5
|
+
if (BroadcastReceiver_) {
|
|
6
|
+
return BroadcastReceiver_;
|
|
7
|
+
}
|
|
8
|
+
var BroadcastReceiverImpl = /** @class */ (function (_super) {
|
|
9
|
+
__extends(BroadcastReceiverImpl, _super);
|
|
10
|
+
function BroadcastReceiverImpl(onReceiveCallback) {
|
|
6
11
|
var _this = _super.call(this) || this;
|
|
7
12
|
_this._onReceiveCallback = onReceiveCallback;
|
|
8
13
|
return global.__native(_this);
|
|
9
14
|
}
|
|
10
|
-
|
|
15
|
+
BroadcastReceiverImpl.prototype.onReceive = function (context, intent) {
|
|
11
16
|
if (this._onReceiveCallback) {
|
|
12
17
|
this._onReceiveCallback(context, intent);
|
|
13
18
|
}
|
|
14
19
|
};
|
|
15
|
-
return
|
|
20
|
+
return BroadcastReceiverImpl;
|
|
16
21
|
}(android.content.BroadcastReceiver));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
BroadcastReceiver_ = BroadcastReceiverImpl;
|
|
23
|
+
return BroadcastReceiver_;
|
|
24
|
+
}
|
|
25
|
+
let NativeScriptLifecycleCallbacks_;
|
|
26
|
+
function initNativeScriptLifecycleCallbacks() {
|
|
27
|
+
if (NativeScriptLifecycleCallbacks_) {
|
|
28
|
+
return NativeScriptLifecycleCallbacks_;
|
|
29
|
+
}
|
|
30
|
+
var NativeScriptLifecycleCallbacksImpl = /** @class */ (function (_super) {
|
|
31
|
+
__extends(NativeScriptLifecycleCallbacksImpl, _super);
|
|
32
|
+
function NativeScriptLifecycleCallbacksImpl() {
|
|
20
33
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
21
34
|
_this.activitiesCount = 0;
|
|
22
35
|
return _this;
|
|
23
36
|
}
|
|
24
|
-
|
|
37
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityCreated = function (activity, savedInstanceState) {
|
|
25
38
|
// console.log('NativeScriptLifecycleCallbacks onActivityCreated');
|
|
26
39
|
this.setThemeOnLaunch(activity);
|
|
27
40
|
if (!Application.android.startActivity) {
|
|
@@ -35,7 +48,7 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
35
48
|
this.subscribeForGlobalLayout(activity);
|
|
36
49
|
}
|
|
37
50
|
};
|
|
38
|
-
|
|
51
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityDestroyed = function (activity) {
|
|
39
52
|
// console.log('NativeScriptLifecycleCallbacks onActivityDestroyed');
|
|
40
53
|
if (activity === Application.android.foregroundActivity) {
|
|
41
54
|
Application.android.setForegroundActivity(undefined);
|
|
@@ -58,7 +71,7 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
58
71
|
// TODO: This is a temporary workaround to force the V8's Garbage Collector, which will force the related Java Object to be collected.
|
|
59
72
|
gc();
|
|
60
73
|
};
|
|
61
|
-
|
|
74
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityPaused = function (activity) {
|
|
62
75
|
// console.log('NativeScriptLifecycleCallbacks onActivityPaused');
|
|
63
76
|
if ('isNativeScriptActivity' in activity) {
|
|
64
77
|
Application.setSuspended(true, {
|
|
@@ -73,7 +86,7 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
73
86
|
activity: activity,
|
|
74
87
|
});
|
|
75
88
|
};
|
|
76
|
-
|
|
89
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityResumed = function (activity) {
|
|
77
90
|
// console.log('NativeScriptLifecycleCallbacks onActivityResumed');
|
|
78
91
|
Application.android.setForegroundActivity(activity);
|
|
79
92
|
// NOTE: setSuspended(false) is called in frame/index.android.ts inside onPostResume
|
|
@@ -84,7 +97,7 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
84
97
|
activity: activity,
|
|
85
98
|
});
|
|
86
99
|
};
|
|
87
|
-
|
|
100
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivitySaveInstanceState = function (activity, bundle) {
|
|
88
101
|
// console.log('NativeScriptLifecycleCallbacks onActivitySaveInstanceState');
|
|
89
102
|
Application.android.notify({
|
|
90
103
|
eventName: Application.android.saveActivityStateEvent,
|
|
@@ -93,7 +106,7 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
93
106
|
bundle: bundle,
|
|
94
107
|
});
|
|
95
108
|
};
|
|
96
|
-
|
|
109
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityStarted = function (activity) {
|
|
97
110
|
// console.log('NativeScriptLifecycleCallbacks onActivityStarted');
|
|
98
111
|
this.activitiesCount++;
|
|
99
112
|
if (this.activitiesCount === 1) {
|
|
@@ -109,7 +122,7 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
109
122
|
activity: activity,
|
|
110
123
|
});
|
|
111
124
|
};
|
|
112
|
-
|
|
125
|
+
NativeScriptLifecycleCallbacksImpl.prototype.onActivityStopped = function (activity) {
|
|
113
126
|
// console.log('NativeScriptLifecycleCallbacks onActivityStopped');
|
|
114
127
|
this.activitiesCount--;
|
|
115
128
|
if (this.activitiesCount === 0) {
|
|
@@ -125,7 +138,7 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
125
138
|
activity: activity,
|
|
126
139
|
});
|
|
127
140
|
};
|
|
128
|
-
|
|
141
|
+
NativeScriptLifecycleCallbacksImpl.prototype.setThemeOnLaunch = function (activity) {
|
|
129
142
|
// Set app theme after launch screen was used during startup
|
|
130
143
|
var activityInfo = activity.getPackageManager().getActivityInfo(activity.getComponentName(), android.content.pm.PackageManager.GET_META_DATA);
|
|
131
144
|
if (activityInfo.metaData) {
|
|
@@ -135,7 +148,7 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
135
148
|
}
|
|
136
149
|
}
|
|
137
150
|
};
|
|
138
|
-
|
|
151
|
+
NativeScriptLifecycleCallbacksImpl.prototype.notifyActivityCreated = function (activity, bundle) {
|
|
139
152
|
Application.android.notify({
|
|
140
153
|
eventName: Application.android.activityCreatedEvent,
|
|
141
154
|
object: Application.android,
|
|
@@ -143,7 +156,7 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
143
156
|
bundle: bundle,
|
|
144
157
|
});
|
|
145
158
|
};
|
|
146
|
-
|
|
159
|
+
NativeScriptLifecycleCallbacksImpl.prototype.subscribeForGlobalLayout = function (activity) {
|
|
147
160
|
var rootView = activity.getWindow().getDecorView().getRootView();
|
|
148
161
|
// store the listener not to trigger GC collection before collecting the method
|
|
149
162
|
global.onGlobalLayoutListener = new android.view.ViewTreeObserver.OnGlobalLayoutListener({
|
|
@@ -162,45 +175,53 @@ var NativeScriptLifecycleCallbacks = /** @class */ (function (_super) {
|
|
|
162
175
|
};
|
|
163
176
|
__decorate([
|
|
164
177
|
profile
|
|
165
|
-
],
|
|
178
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityCreated", null);
|
|
166
179
|
__decorate([
|
|
167
180
|
profile
|
|
168
|
-
],
|
|
181
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityDestroyed", null);
|
|
169
182
|
__decorate([
|
|
170
183
|
profile
|
|
171
|
-
],
|
|
184
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityPaused", null);
|
|
172
185
|
__decorate([
|
|
173
186
|
profile
|
|
174
|
-
],
|
|
187
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityResumed", null);
|
|
175
188
|
__decorate([
|
|
176
189
|
profile
|
|
177
|
-
],
|
|
190
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivitySaveInstanceState", null);
|
|
178
191
|
__decorate([
|
|
179
192
|
profile
|
|
180
|
-
],
|
|
193
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStarted", null);
|
|
181
194
|
__decorate([
|
|
182
195
|
profile
|
|
183
|
-
],
|
|
196
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "onActivityStopped", null);
|
|
184
197
|
__decorate([
|
|
185
198
|
profile
|
|
186
|
-
],
|
|
199
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "setThemeOnLaunch", null);
|
|
187
200
|
__decorate([
|
|
188
201
|
profile
|
|
189
|
-
],
|
|
202
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "notifyActivityCreated", null);
|
|
190
203
|
__decorate([
|
|
191
204
|
profile
|
|
192
|
-
],
|
|
193
|
-
|
|
205
|
+
], NativeScriptLifecycleCallbacksImpl.prototype, "subscribeForGlobalLayout", null);
|
|
206
|
+
NativeScriptLifecycleCallbacksImpl = __decorate([
|
|
194
207
|
JavaProxy('org.nativescript.NativeScriptLifecycleCallbacks')
|
|
195
|
-
],
|
|
196
|
-
return
|
|
208
|
+
], NativeScriptLifecycleCallbacksImpl);
|
|
209
|
+
return NativeScriptLifecycleCallbacksImpl;
|
|
197
210
|
}(android.app.Application.ActivityLifecycleCallbacks));
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
211
|
+
NativeScriptLifecycleCallbacks_ = NativeScriptLifecycleCallbacksImpl;
|
|
212
|
+
return NativeScriptLifecycleCallbacks_;
|
|
213
|
+
}
|
|
214
|
+
let NativeScriptComponentCallbacks_;
|
|
215
|
+
function initNativeScriptComponentCallbacks() {
|
|
216
|
+
if (NativeScriptComponentCallbacks_) {
|
|
217
|
+
return NativeScriptComponentCallbacks_;
|
|
218
|
+
}
|
|
219
|
+
var NativeScriptComponentCallbacksImpl = /** @class */ (function (_super) {
|
|
220
|
+
__extends(NativeScriptComponentCallbacksImpl, _super);
|
|
221
|
+
function NativeScriptComponentCallbacksImpl() {
|
|
201
222
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
202
223
|
}
|
|
203
|
-
|
|
224
|
+
NativeScriptComponentCallbacksImpl.prototype.onLowMemory = function () {
|
|
204
225
|
gc();
|
|
205
226
|
java.lang.System.gc();
|
|
206
227
|
Application.notify({
|
|
@@ -209,26 +230,29 @@ var NativeScriptComponentCallbacks = /** @class */ (function (_super) {
|
|
|
209
230
|
android: this,
|
|
210
231
|
});
|
|
211
232
|
};
|
|
212
|
-
|
|
233
|
+
NativeScriptComponentCallbacksImpl.prototype.onTrimMemory = function (level) {
|
|
213
234
|
// TODO: This is skipped for now, test carefully for OutOfMemory exceptions
|
|
214
235
|
};
|
|
215
|
-
|
|
236
|
+
NativeScriptComponentCallbacksImpl.prototype.onConfigurationChanged = function (newConfiguration) {
|
|
216
237
|
Application.android.onConfigurationChanged(newConfiguration);
|
|
217
238
|
};
|
|
218
239
|
__decorate([
|
|
219
240
|
profile
|
|
220
|
-
],
|
|
241
|
+
], NativeScriptComponentCallbacksImpl.prototype, "onLowMemory", null);
|
|
221
242
|
__decorate([
|
|
222
243
|
profile
|
|
223
|
-
],
|
|
244
|
+
], NativeScriptComponentCallbacksImpl.prototype, "onTrimMemory", null);
|
|
224
245
|
__decorate([
|
|
225
246
|
profile
|
|
226
|
-
],
|
|
227
|
-
|
|
247
|
+
], NativeScriptComponentCallbacksImpl.prototype, "onConfigurationChanged", null);
|
|
248
|
+
NativeScriptComponentCallbacksImpl = __decorate([
|
|
228
249
|
JavaProxy('org.nativescript.NativeScriptComponentCallbacks')
|
|
229
|
-
],
|
|
230
|
-
return
|
|
250
|
+
], NativeScriptComponentCallbacksImpl);
|
|
251
|
+
return NativeScriptComponentCallbacksImpl;
|
|
231
252
|
}(android.content.ComponentCallbacks2));
|
|
253
|
+
NativeScriptComponentCallbacks_ = NativeScriptComponentCallbacksImpl;
|
|
254
|
+
return NativeScriptComponentCallbacks_;
|
|
255
|
+
}
|
|
232
256
|
export class AndroidApplication extends ApplicationCommon {
|
|
233
257
|
constructor() {
|
|
234
258
|
super(...arguments);
|
|
@@ -257,9 +281,9 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
257
281
|
this._context = nativeApp.getApplicationContext();
|
|
258
282
|
this._packageName = nativeApp.getPackageName();
|
|
259
283
|
// we store those callbacks and add a function for clearing them later so that the objects will be eligable for GC
|
|
260
|
-
this.lifecycleCallbacks = new
|
|
284
|
+
this.lifecycleCallbacks = new (initNativeScriptLifecycleCallbacks())();
|
|
261
285
|
this.nativeApp.registerActivityLifecycleCallbacks(this.lifecycleCallbacks);
|
|
262
|
-
this.componentCallbacks = new
|
|
286
|
+
this.componentCallbacks = new (initNativeScriptComponentCallbacks())();
|
|
263
287
|
this.nativeApp.registerComponentCallbacks(this.componentCallbacks);
|
|
264
288
|
this._registerPendingReceivers();
|
|
265
289
|
}
|
|
@@ -338,7 +362,7 @@ export class AndroidApplication extends ApplicationCommon {
|
|
|
338
362
|
}
|
|
339
363
|
registerBroadcastReceiver(intentFilter, onReceiveCallback) {
|
|
340
364
|
const registerFunc = (context) => {
|
|
341
|
-
const receiver = new
|
|
365
|
+
const receiver = new (initBroadcastReceiver())(onReceiveCallback);
|
|
342
366
|
context.registerReceiver(receiver, new android.content.IntentFilter(intentFilter));
|
|
343
367
|
this._registeredReceivers[intentFilter] = receiver;
|
|
344
368
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.android.js","sourceRoot":"","sources":["../../../../packages/core/application/application.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC
|
|
1
|
+
{"version":3,"file":"application.android.js","sourceRoot":"","sources":["../../../../packages/core/application/application.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAIvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAezD,IAAI,kBAA4C,CAAC;AACjD,SAAS,qBAAqB;IAC7B,IAAI,kBAAkB,EAAE;QACvB,OAAO,kBAAkB,CAAC;KAC1B;;;;;;;;;;;;;;;IAoBD,kBAAkB,GAAG,qBAAqB,CAAC;IAC3C,OAAO,kBAAkB,CAAC;AAC3B,CAAC;AAID,IAAI,+BAAsE,CAAC;AAC3E,SAAS,kCAAkC;IAC1C,IAAI,+BAA+B,EAAE;QACpC,OAAO,+BAA+B,CAAC;KACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwLD,+BAA+B,GAAG,kCAAkC,CAAC;IACrE,OAAO,+BAA+B,CAAC;AACxC,CAAC;AAID,IAAI,+BAAsE,CAAC;AAC3E,SAAS,kCAAkC;IAC1C,IAAI,+BAA+B,EAAE;QACpC,OAAO,+BAA+B,CAAC;KACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BD,+BAA+B,GAAG,kCAAkC,CAAC;IACrE,OAAO,+BAA+B,CAAC;AACxC,CAAC;AAED,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IAAzD;;QAaU,yBAAoB,GAAG,kBAAkB,CAAC,oBAAoB,CAAC;QAC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mB,CAAC,aAAa,CAAC,CAAC;IAChD,CAAC;IAEO,mBAAmB,CAAC,aAAgD;QAC3E,MAAM,WAAW,GAAG,aAAa,CAAC,WAAW,CAAC;QAE9C,QAAQ,WAAW,EAAE;YACpB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,qBAAqB;gBAC3D,OAAO,WAAW,CAAC;YACpB,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,oBAAoB;gBAC1D,OAAO,UAAU,CAAC;YACnB;gBACC,OAAO,SAAS,CAAC;SAClB;IACF,CAAC;IAED,IAAI,OAAO;QACV,iEAAiE;QACjE,OAAO,IAAI,CAAC;IACb,CAAC;;AAvPe,uCAAoB,GAAG,iBAAiB,CAAC;AACzC,yCAAsB,GAAG,mBAAmB,CAAC;AAC7C,uCAAoB,GAAG,iBAAiB,CAAC;AACzC,sCAAmB,GAAG,gBAAgB,CAAC;AACvC,uCAAoB,GAAG,iBAAiB,CAAC;AACzC,uCAAoB,GAAG,iBAAiB,CAAC;AACzC,yCAAsB,GAAG,mBAAmB,CAAC;AAC7C,sCAAmB,GAAG,gBAAgB,CAAC;AACvC,2CAAwB,GAAG,qBAAqB,CAAC;AACjD,yCAAsB,GAAG,mBAAmB,CAAC;AAC7C,kDAA+B,GAAG,4BAA4B,CAAC;AA+OhF,cAAc,sBAAsB,CAAC;AACrC,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,kBAAkB,EAAE,CAAC;AACpD,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC"}
|
package/css/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
Copyright (c) 2012 Vopilovskii Constantine <flash.vkv@gmail.com>
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
5
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
the Software without restriction, including without limitation the rights to
|
|
7
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
8
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
9
|
+
so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
EASYSAX - pure javascript sax-style parser for xml
|
|
2
|
+
==================================================
|
|
3
|
+
Простой и быстрый SAX парсер XML файлов.
|
|
4
|
+
Реализован по принципу парсить только то что нужно и как можно быстрее.
|
|
5
|
+
Парсер не потоковый, и не расчитан на гиганские файлы. Весь XML должен быть в памяти.
|
|
6
|
+
Встроенный уникальный механизм работы с пространсвами имен.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Парсер был написан для RSS ридера http://zzreader.com
|
|
10
|
+
На конец 2012 года остается самым быстрым SAX парсером под NODE.JS
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
BENCHMARK
|
|
15
|
+
---------------------------------------------------
|
|
16
|
+
|
|
17
|
+
**benchmark/test.js, parse file #1**
|
|
18
|
+
```
|
|
19
|
+
sax-js: 12671ms
|
|
20
|
+
libxmljs: 11311ms
|
|
21
|
+
expat: 6118ms
|
|
22
|
+
expat buffer: 5278ms
|
|
23
|
+
easysax : 1739ms // namespace--on, attr()--on , entity_decode--on
|
|
24
|
+
easysax: 1035ms // namespace--off, attr()--on , entity_decode--on
|
|
25
|
+
easysax: 740ms // namespace--off, attr()--off , entity_decode--off
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
**benchmark/test.js, parse file #2 (много атрибутов)**
|
|
30
|
+
```
|
|
31
|
+
sax-js: 84060ms
|
|
32
|
+
libxmljs: 48919ms
|
|
33
|
+
expat: 39444ms
|
|
34
|
+
expat buffer: 35375ms
|
|
35
|
+
easysax: 14655ms // namespace--on, attr()--on , entity_decode--on
|
|
36
|
+
easysax: 9874ms // namespace--off, attr()--on , entity_decode--on
|
|
37
|
+
easysax: 3531ms // namespace--off, attr()--off , entity_decode--on
|
|
38
|
+
easysax: 2954ms // namespace--off, attr()--off , entity_decode--off
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
**demo/example.js, parse file #2**
|
|
43
|
+
```
|
|
44
|
+
1,000 pages for: 13335ms - attr()--all
|
|
45
|
+
1,000 pages for: 7300ms - attr()--on_request
|
|
46
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript/core",
|
|
3
|
-
"version": "8.5.
|
|
3
|
+
"version": "8.5.8-next-07-10-2023-5505429656",
|
|
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",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
## Platform specific native code
|