@nstudio/nativescript-compiler 9.2.0-alpha.17 → 9.2.0-alpha.18
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/README.md +3 -0
- package/dist/kotlin/access.js +8 -7
- package/dist/kotlin/assignment.js +22 -13
- package/dist/kotlin/builtins.js +67 -0
- package/dist/kotlin/calls.js +3 -2
- package/dist/kotlin/class-declaration.js +4 -9
- package/dist/kotlin/class-methods.js +2 -2
- package/dist/kotlin/core-api.js +1 -1
- package/dist/kotlin/declarations.js +1 -1
- package/dist/kotlin/expression-statements.js +13 -1
- package/dist/kotlin/functions.js +1 -0
- package/dist/kotlin/literals.js +4 -8
- package/dist/kotlin/names.js +4 -4
- package/dist/kotlin/native/api.js +1 -1
- package/dist/kotlin/operators.js +25 -25
- package/dist/kotlin/optional-chains.js +1 -1
- package/dist/kotlin/overrides.js +2 -2
- package/dist/kotlin/state-backend.js +6 -2
- package/dist/kotlin/translator.js +1 -1
- package/dist/kotlin/types.js +4 -4
- package/dist/semantics/classes.js +15 -0
- package/dist/semantics/facts.js +1 -1
- package/dist/semantics/lang.js +10 -0
- package/dist/semantics/lower.js +54 -0
- package/dist/semantics/lowering-methods.js +5 -0
- package/dist/semantics/placement.js +9 -3
- package/dist/semantics/signals.js +11 -0
- package/dist/semantics/states/missing.js +7 -0
- package/dist/semantics/tdz.js +54 -15
- package/dist/semantics/throws.js +1 -1
- package/dist/semantics/translator-methods.js +1 -1
- package/dist/swift/access.js +7 -9
- package/dist/swift/assignment.js +20 -14
- package/dist/swift/calls.js +6 -3
- package/dist/swift/classes.js +7 -9
- package/dist/swift/components.js +3 -3
- package/dist/swift/control-flow.js +1 -1
- package/dist/swift/conversion.js +5 -2
- package/dist/swift/core-api.js +2 -2
- package/dist/swift/declarations.js +1 -1
- package/dist/swift/expressions.js +6 -2
- package/dist/swift/from-any.js +1 -1
- package/dist/swift/functions.js +5 -6
- package/dist/swift/global-calls.js +1 -1
- package/dist/swift/lenient.js +1 -6
- package/dist/swift/literals.js +8 -3
- package/dist/swift/modules.js +3 -3
- package/dist/swift/names.js +3 -3
- package/dist/swift/native/calls.js +1 -1
- package/dist/swift/object-classes.js +84 -1
- package/dist/swift/operators.js +31 -29
- package/dist/swift/placement.js +4 -3
- package/dist/swift/state-backend.js +3 -2
- package/dist/swift/static-calls.js +2 -3
- package/dist/swift/syntax.js +9 -5
- package/dist/swift/translator.js +1 -1
- package/dist/swift/type-facts.js +3 -3
- package/dist/swift/types.js +3 -3
- package/dist/targets/ios/build.js +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +1 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +525 -99
- package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +2 -2
- package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +29 -6
- package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +14 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +3 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +49 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +0 -8
- package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +0 -16
- package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +6 -4
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +19 -7
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +14 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +19 -10
- package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +17 -29
- package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +144 -22
- package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +8 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +2 -10
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +0 -2
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +6 -10
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +531 -8
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +0 -9
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +3 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +19 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +5 -2
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +232 -174
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_android_runtime_version.kt +75 -0
- package/kit-android/generated/manifest.json +21 -18
- package/kit-android/generated/source-lines.json +1 -1
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +497 -42
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +1 -1
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +22 -2
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +32 -18
- package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +14 -10
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +3 -9
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +20 -21
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +5 -7
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_.swift +130 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +2 -4
- package/kit-apple/Sources/NativeScriptKit/Core/Object_specified_substituted_reads.swift +115 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads_.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +348 -330
- package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +358 -359
- package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +47 -29
- package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +3 -1
- package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +95 -53
- package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +52 -43
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +66 -51
- package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +67 -51
- package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +143 -32
- package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +30 -19
- package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +190 -78
- package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +205 -201
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +41 -42
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +77 -65
- package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +1272 -824
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +8 -8
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +2 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +6 -6
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +22 -21
- package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +202 -188
- package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +2 -6
- package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +869 -838
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +46 -31
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +1 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +4 -4
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +17 -17
- package/kit-apple/Sources/NativeScriptKit/Core/utils.android-runtime-version.swift +77 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +62 -61
- package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +4 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +2 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +280 -9
- package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +3 -2
- package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +1 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +1 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +1 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +2 -0
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"core": "9.
|
|
3
|
-
"commit": "
|
|
2
|
+
"core": "9.2.0-next.2",
|
|
3
|
+
"commit": "5911fbe4740e816279bce2c34d2ee44bd677ad92",
|
|
4
4
|
"modules": [
|
|
5
5
|
"abortcontroller/",
|
|
6
6
|
"accessibility/",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"utils/constants.ios.ts": "fa1feaf122e6"
|
|
135
135
|
},
|
|
136
136
|
"application.helpers-common.swift": {
|
|
137
|
-
"application/helpers-common.ts": "
|
|
137
|
+
"application/helpers-common.ts": "8addd6c788d5"
|
|
138
138
|
},
|
|
139
139
|
"utils.native-helper.ios.swift": {
|
|
140
140
|
"utils/native-helper.ios.ts": "709c6ad66dd9"
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
"native-window/native-window-interfaces.ts": "1e826cc30c8a"
|
|
249
249
|
},
|
|
250
250
|
"application.application-common.swift": {
|
|
251
|
-
"application/application-common.ts": "
|
|
251
|
+
"application/application-common.ts": "64c831949029"
|
|
252
252
|
},
|
|
253
253
|
"application.scene-delegate-bridge.swift": {
|
|
254
254
|
"application/scene-delegate-bridge.ts": "e4be7aa636d7"
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
"application/application-interfaces.ts": "e91c9009d2bf"
|
|
267
267
|
},
|
|
268
268
|
"application.application.ios.swift": {
|
|
269
|
-
"application/application.ios.ts": "
|
|
269
|
+
"application/application.ios.ts": "7131741fcdb5"
|
|
270
270
|
},
|
|
271
271
|
"application.application-shims.swift": {
|
|
272
272
|
"application/application-shims.ts": "2651f791bae8"
|
|
@@ -311,10 +311,10 @@
|
|
|
311
311
|
"http/http-interfaces.ts": "52b81deb6a54"
|
|
312
312
|
},
|
|
313
313
|
"ui.styling.style.index.swift": {
|
|
314
|
-
"ui/styling/style/index.ts": "
|
|
314
|
+
"ui/styling/style/index.ts": "4951b56aa929"
|
|
315
315
|
},
|
|
316
316
|
"ui.core.properties.index.swift": {
|
|
317
|
-
"ui/core/properties/index.ts": "
|
|
317
|
+
"ui/core/properties/index.ts": "45d078ed05eb"
|
|
318
318
|
},
|
|
319
319
|
"ui.styling.font-common.swift": {
|
|
320
320
|
"ui/styling/font-common.ts": "339b63e8cf3a"
|
|
@@ -323,10 +323,10 @@
|
|
|
323
323
|
"ui/styling/font.ios.ts": "f75cc4fb8aef"
|
|
324
324
|
},
|
|
325
325
|
"http.http-request-internal.http-request-internal-common.swift": {
|
|
326
|
-
"http/http-request-internal/http-request-internal-common.ts": "
|
|
326
|
+
"http/http-request-internal/http-request-internal-common.ts": "9296c1ead038"
|
|
327
327
|
},
|
|
328
328
|
"http.http-request-internal.index.ios.swift": {
|
|
329
|
-
"http/http-request-internal/index.ios.ts": "
|
|
329
|
+
"http/http-request-internal/index.ios.ts": "eca08d39a5b0"
|
|
330
330
|
},
|
|
331
331
|
"image-source.image-source-common.swift": {
|
|
332
332
|
"image-source/image-source-common.ts": "e1591db257c1"
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
"ui/styling/length-shared.ts": "7d3514503a6d"
|
|
372
372
|
},
|
|
373
373
|
"css-mediaquery.index.swift": {
|
|
374
|
-
"css-mediaquery/index.ts": "
|
|
374
|
+
"css-mediaquery/index.ts": "e32cfc6f0b59"
|
|
375
375
|
},
|
|
376
376
|
"css-value.reworkcss-value.swift": {
|
|
377
377
|
"css-value/reworkcss-value.ts": "cb109f55b992"
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
"css/parser.ts": "6b766650593c"
|
|
387
387
|
},
|
|
388
388
|
"xhr.index.swift": {
|
|
389
|
-
"xhr/index.ts": "
|
|
389
|
+
"xhr/index.ts": "181fa1342153"
|
|
390
390
|
},
|
|
391
391
|
"fetch.index.swift": {
|
|
392
392
|
"fetch/index.ts": "c11a9eae01ed"
|
|
@@ -404,7 +404,7 @@
|
|
|
404
404
|
"matrix/index.ts": "9279be2f236f"
|
|
405
405
|
},
|
|
406
406
|
"media-query-list.index.swift": {
|
|
407
|
-
"media-query-list/index.ts": "
|
|
407
|
+
"media-query-list/index.ts": "3a27edf80641"
|
|
408
408
|
},
|
|
409
409
|
"module-name-resolver.non-bundle-workflow-compat.swift": {
|
|
410
410
|
"module-name-resolver/non-bundle-workflow-compat.ts": "a3e7ec1e2efb"
|
|
@@ -413,16 +413,16 @@
|
|
|
413
413
|
"ui/styling/styling-shared.ts": "de4238e723c5"
|
|
414
414
|
},
|
|
415
415
|
"npm.css-what.src.types.swift": {
|
|
416
|
-
"npm/css-what/src/types.ts": "
|
|
416
|
+
"npm/css-what/src/types.ts": "d4b9a5e5534d"
|
|
417
417
|
},
|
|
418
418
|
"npm.css-what.src.parse.swift": {
|
|
419
|
-
"npm/css-what/src/parse.ts": "
|
|
419
|
+
"npm/css-what/src/parse.ts": "8238542f30bb"
|
|
420
420
|
},
|
|
421
421
|
"npm.css-what.src.stringify.swift": {
|
|
422
|
-
"npm/css-what/src/stringify.ts": "
|
|
422
|
+
"npm/css-what/src/stringify.ts": "87dfedf38125"
|
|
423
423
|
},
|
|
424
424
|
"npm.css-what.src.index.swift": {
|
|
425
|
-
"npm/css-what/src/index.ts": "
|
|
425
|
+
"npm/css-what/src/index.ts": "bc33eff9d9db"
|
|
426
426
|
},
|
|
427
427
|
"ui.styling.css-utils.swift": {
|
|
428
428
|
"ui/styling/css-utils.ts": "bfc3a26710c8"
|
|
@@ -464,7 +464,7 @@
|
|
|
464
464
|
"ui/styling/style-properties.ts": "2dbe8f1f2b6c"
|
|
465
465
|
},
|
|
466
466
|
"ui.animation.index.ios.swift": {
|
|
467
|
-
"ui/animation/index.ios.ts": "
|
|
467
|
+
"ui/animation/index.ios.ts": "133e0a61e32c"
|
|
468
468
|
},
|
|
469
469
|
"ui.animation.keyframe-animation.swift": {
|
|
470
470
|
"ui/animation/keyframe-animation.ts": "a90311e2cee1"
|
|
@@ -476,7 +476,7 @@
|
|
|
476
476
|
"ui/styling/css-animation-parser.ts": "80e26c3f26e4"
|
|
477
477
|
},
|
|
478
478
|
"ui.styling.style-scope.swift": {
|
|
479
|
-
"ui/styling/style-scope.ts": "
|
|
479
|
+
"ui/styling/style-scope.ts": "1927a73e61f8"
|
|
480
480
|
},
|
|
481
481
|
"ui.core.view-base.index.swift": {
|
|
482
482
|
"ui/core/view-base/index.ts": "422e4269b053"
|
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
"ui/page/page-common.ts": "a89eb8b4a323"
|
|
738
738
|
},
|
|
739
739
|
"ui.page.index.ios.swift": {
|
|
740
|
-
"ui/page/index.ios.ts": "
|
|
740
|
+
"ui/page/index.ios.ts": "85bd2f328eac"
|
|
741
741
|
},
|
|
742
742
|
"ui.placeholder.placeholder-common.swift": {
|
|
743
743
|
"ui/placeholder/placeholder-common.ts": "05bdc6f1a8e2"
|
|
@@ -832,6 +832,9 @@
|
|
|
832
832
|
"ui.web-view.index.ios.swift": {
|
|
833
833
|
"ui/web-view/index.ios.ts": "a8097f472340"
|
|
834
834
|
},
|
|
835
|
+
"utils.android-runtime-version.swift": {
|
|
836
|
+
"utils/android-runtime-version.ts": "c260e6abbb4e"
|
|
837
|
+
},
|
|
835
838
|
"utils.lazy.swift": {
|
|
836
839
|
"utils/lazy.ts": "8a8e718319ac"
|
|
837
840
|
},
|
|
@@ -1104,6 +1107,7 @@
|
|
|
1104
1107
|
"Object_eventName_object_error.swift": {},
|
|
1105
1108
|
"Object_eventName_object_window.swift": {},
|
|
1106
1109
|
"Object_eventName_object_ios_android.swift": {},
|
|
1110
|
+
"Object_eventName_object_ios_android_.swift": {},
|
|
1107
1111
|
"Object_moduleName.swift": {},
|
|
1108
1112
|
"Object_eventName_rootView.swift": {},
|
|
1109
1113
|
"Object_eventName_object_cssFile.swift": {},
|
|
@@ -1143,6 +1147,9 @@
|
|
|
1143
1147
|
"Object_exists_isDirectory.swift": {},
|
|
1144
1148
|
"Object_message.swift": {},
|
|
1145
1149
|
"Object_folder_path.swift": {},
|
|
1150
|
+
"Object_substituted_values_reads.swift": {},
|
|
1151
|
+
"Object_specified_substituted_reads.swift": {},
|
|
1152
|
+
"Object_substituted_values_reads_.swift": {},
|
|
1146
1153
|
"Object_object_eventName_propertyName_value_oldValue_origin.swift": {},
|
|
1147
1154
|
"Object_enumerable_configurable_get_set.swift": {},
|
|
1148
1155
|
"Object_enumerable_configurable_get_set_.swift": {},
|
|
@@ -2311,6 +2318,7 @@
|
|
|
2311
2318
|
"init": "__init_Core_ui_styling_style_scope",
|
|
2312
2319
|
"imports": [
|
|
2313
2320
|
"application.index.ios.swift",
|
|
2321
|
+
"css-mediaquery.index.swift",
|
|
2314
2322
|
"css.CSS3Parser.swift",
|
|
2315
2323
|
"css.CSSNativeScript.swift",
|
|
2316
2324
|
"file-system.index.swift",
|
|
@@ -3372,6 +3380,9 @@
|
|
|
3372
3380
|
"ui.web-view.web-view-common.swift"
|
|
3373
3381
|
]
|
|
3374
3382
|
},
|
|
3383
|
+
"utils.android-runtime-version.swift": {
|
|
3384
|
+
"imports": []
|
|
3385
|
+
},
|
|
3375
3386
|
"utils.lazy.swift": {
|
|
3376
3387
|
"imports": []
|
|
3377
3388
|
},
|
|
@@ -34,12 +34,12 @@ open class MediaQueryListImpl: Observable {
|
|
|
34
34
|
}
|
|
35
35
|
public override init() throws {
|
|
36
36
|
try super.init()
|
|
37
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
37
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:124)
|
|
38
38
|
if !Core_media_query_list_index.isMediaInitializationEnabled {
|
|
39
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
39
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:125)
|
|
40
40
|
throw JSException(value: JSTypeError("Illegal constructor"))
|
|
41
41
|
}
|
|
42
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
42
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:128)
|
|
43
43
|
_ = try
|
|
44
44
|
({ () throws -> Any? in
|
|
45
45
|
self._onChange = jsNull
|
|
@@ -51,7 +51,7 @@ open class MediaQueryListImpl: Observable {
|
|
|
51
51
|
#sourceLocation()
|
|
52
52
|
open var media: String {
|
|
53
53
|
get throws {
|
|
54
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
54
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:149)
|
|
55
55
|
try
|
|
56
56
|
({ () throws -> Void in
|
|
57
57
|
if let __own1 = jsOwnProperty(self, "_throwInvocationError") {
|
|
@@ -60,14 +60,14 @@ open class MediaQueryListImpl: Observable {
|
|
|
60
60
|
try self._throwInvocationError()
|
|
61
61
|
}
|
|
62
62
|
}())
|
|
63
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
63
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:151)
|
|
64
64
|
return self._media
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
#sourceLocation()
|
|
68
68
|
open var matches: Bool {
|
|
69
69
|
get throws {
|
|
70
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
70
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:155)
|
|
71
71
|
try
|
|
72
72
|
({ () throws -> Void in
|
|
73
73
|
if let __own2 = jsOwnProperty(self, "_throwInvocationError") {
|
|
@@ -76,7 +76,7 @@ open class MediaQueryListImpl: Observable {
|
|
|
76
76
|
try self._throwInvocationError()
|
|
77
77
|
}
|
|
78
78
|
}())
|
|
79
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
79
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:157)
|
|
80
80
|
return self._matches
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -84,7 +84,7 @@ open class MediaQueryListImpl: Observable {
|
|
|
84
84
|
open var onchange: Any? {
|
|
85
85
|
get {
|
|
86
86
|
jsReported { () throws -> Any? in
|
|
87
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
87
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:229)
|
|
88
88
|
try
|
|
89
89
|
({ () throws -> Void in
|
|
90
90
|
if let __own3 = jsOwnProperty(self, "_throwInvocationError") {
|
|
@@ -93,14 +93,14 @@ open class MediaQueryListImpl: Observable {
|
|
|
93
93
|
try self._throwInvocationError()
|
|
94
94
|
}
|
|
95
95
|
}())
|
|
96
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
96
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:231)
|
|
97
97
|
return self._onChange
|
|
98
98
|
} ?? nil
|
|
99
99
|
}
|
|
100
100
|
set {
|
|
101
101
|
let callback = newValue
|
|
102
102
|
jsReport {
|
|
103
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
103
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:235)
|
|
104
104
|
try
|
|
105
105
|
({ () throws -> Void in
|
|
106
106
|
if let __own4 = jsOwnProperty(self, "_throwInvocationError") {
|
|
@@ -109,17 +109,17 @@ open class MediaQueryListImpl: Observable {
|
|
|
109
109
|
try self._throwInvocationError()
|
|
110
110
|
}
|
|
111
111
|
}())
|
|
112
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
112
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:238)
|
|
113
113
|
if jsTruthy(self._onChange) {
|
|
114
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
114
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:239)
|
|
115
115
|
try self.removeListener(self._onChange)
|
|
116
116
|
}
|
|
117
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
117
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:242)
|
|
118
118
|
if jsTruthy(callback) {
|
|
119
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
119
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:243)
|
|
120
120
|
try self.addListener(callback)
|
|
121
121
|
}
|
|
122
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
122
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:246)
|
|
123
123
|
self._onChange = callback
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -129,7 +129,7 @@ open class MediaQueryListImpl: Observable {
|
|
|
129
129
|
_ eventName: String, _ callback: @escaping (EventData?) throws -> Void, _ thisArg: Any? = nil,
|
|
130
130
|
_ once: Bool? = nil
|
|
131
131
|
) throws {
|
|
132
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
132
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:162)
|
|
133
133
|
try
|
|
134
134
|
({ () throws -> Void in
|
|
135
135
|
if let __own5 = jsOwnProperty(self, "_throwInvocationError") {
|
|
@@ -138,17 +138,17 @@ open class MediaQueryListImpl: Observable {
|
|
|
138
138
|
try self._throwInvocationError()
|
|
139
139
|
}
|
|
140
140
|
}())
|
|
141
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
141
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:164)
|
|
142
142
|
let hasChangeListeners: Bool = try self.hasListeners(MediaQueryListImpl.changeEvent)
|
|
143
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
143
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:167)
|
|
144
144
|
try super.addEventListener(eventName, FunctionCell_EventDataOpt_to_Void.present(callback), thisArg, once)
|
|
145
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
145
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:169)
|
|
146
146
|
if jsStringEquals(eventName, MediaQueryListImpl.changeEvent) && !hasChangeListeners {
|
|
147
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
147
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:170)
|
|
148
148
|
_ = Core_media_query_list_index.mediaQueryLists.push(self)
|
|
149
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
149
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:172)
|
|
150
150
|
if Core_media_query_list_index.mediaQueryLists.length == 1 {
|
|
151
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
151
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:173)
|
|
152
152
|
try Core_application_helpers_common.toggleApplicationEventListeners(
|
|
153
153
|
true,
|
|
154
154
|
FunctionCell_AnyOpt_to_Void.declared(
|
|
@@ -161,7 +161,7 @@ open class MediaQueryListImpl: Observable {
|
|
|
161
161
|
open override func removeEventListener(
|
|
162
162
|
_ eventName: String, _ callback: ((EventData?) throws -> Void)? = nil, _ thisArg: Any? = nil
|
|
163
163
|
) throws {
|
|
164
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
164
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:180)
|
|
165
165
|
try
|
|
166
166
|
({ () throws -> Void in
|
|
167
167
|
if let __own6 = jsOwnProperty(self, "_throwInvocationError") {
|
|
@@ -170,23 +170,23 @@ open class MediaQueryListImpl: Observable {
|
|
|
170
170
|
try self._throwInvocationError()
|
|
171
171
|
}
|
|
172
172
|
}())
|
|
173
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
173
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:183)
|
|
174
174
|
try super.removeEventListener(eventName, FunctionCell_EventDataOpt_to_Void.implicit(callback), thisArg)
|
|
175
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
175
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:185)
|
|
176
176
|
if jsStringEquals(eventName, MediaQueryListImpl.changeEvent) {
|
|
177
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
177
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:186)
|
|
178
178
|
let hasChangeListeners: Bool = try self.hasListeners(MediaQueryListImpl.changeEvent)
|
|
179
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
179
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:188)
|
|
180
180
|
if !hasChangeListeners {
|
|
181
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
181
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:189)
|
|
182
182
|
let index: Double = Core_media_query_list_index.mediaQueryLists.indexOf(self)
|
|
183
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
183
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:190)
|
|
184
184
|
if index >= 0 {
|
|
185
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
185
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:191)
|
|
186
186
|
_ = Core_media_query_list_index.mediaQueryLists.splice(index, 1)
|
|
187
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
187
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:193)
|
|
188
188
|
if !jsTruthy(Core_media_query_list_index.mediaQueryLists.length) {
|
|
189
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
189
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:194)
|
|
190
190
|
try Core_application_helpers_common.toggleApplicationEventListeners(
|
|
191
191
|
false,
|
|
192
192
|
FunctionCell_AnyOpt_to_Void.declared(
|
|
@@ -199,7 +199,7 @@ open class MediaQueryListImpl: Observable {
|
|
|
199
199
|
}
|
|
200
200
|
#sourceLocation()
|
|
201
201
|
open func addListener(_ callback: Any?) throws {
|
|
202
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
202
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:202)
|
|
203
203
|
try
|
|
204
204
|
({ () throws -> Void in
|
|
205
205
|
if let __own7 = jsOwnProperty(self, "_throwInvocationError") {
|
|
@@ -208,21 +208,21 @@ open class MediaQueryListImpl: Observable {
|
|
|
208
208
|
try self._throwInvocationError()
|
|
209
209
|
}
|
|
210
210
|
}())
|
|
211
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
211
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:206)
|
|
212
212
|
let wrapperCallback: (Any?) throws -> Void = { (data: Any?) throws -> Void in
|
|
213
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
213
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:207)
|
|
214
214
|
_ = try jsCallMethod(callback, "call", self, JSObject([("matches", self.matches), ("media", self.media)]))
|
|
215
215
|
}
|
|
216
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
216
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:214)
|
|
217
217
|
try self.addEventListener(
|
|
218
218
|
MediaQueryListImpl.changeEvent, FunctionCell_EventDataOpt_to_Void.adapting(wrapperCallback))
|
|
219
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
219
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:215)
|
|
220
220
|
_ = try jsUnwrap(self.mediaQueryChangeListeners, "set").set(
|
|
221
221
|
callback, FunctionCell_AnyOpt_to_Void.scriptOrNil("", 1, wrapperCallback))
|
|
222
222
|
}
|
|
223
223
|
#sourceLocation()
|
|
224
224
|
open func removeListener(_ callback: Any?) throws {
|
|
225
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
225
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:219)
|
|
226
226
|
try
|
|
227
227
|
({ () throws -> Void in
|
|
228
228
|
if let __own8 = jsOwnProperty(self, "_throwInvocationError") {
|
|
@@ -231,20 +231,20 @@ open class MediaQueryListImpl: Observable {
|
|
|
231
231
|
try self._throwInvocationError()
|
|
232
232
|
}
|
|
233
233
|
}())
|
|
234
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
234
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:221)
|
|
235
235
|
if try jsUnwrap(self.mediaQueryChangeListeners, "has").has(callback) {
|
|
236
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
236
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:223)
|
|
237
237
|
try self.removeEventListener(
|
|
238
238
|
MediaQueryListImpl.changeEvent,
|
|
239
239
|
FunctionCell_EventDataOpt_to_Void.fromScriptOrNil(
|
|
240
240
|
(jsUnwrap(self.mediaQueryChangeListeners, "get").get(callback) ?? nil)))
|
|
241
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
241
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:224)
|
|
242
242
|
_ = try jsUnwrap(self.mediaQueryChangeListeners, "delete").delete(callback)
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
#sourceLocation()
|
|
246
246
|
open func _throwInvocationError() throws {
|
|
247
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
247
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:250)
|
|
248
248
|
throw JSException(value: JSTypeError("Illegal invocation"))
|
|
249
249
|
}
|
|
250
250
|
#sourceLocation()
|
|
@@ -363,16 +363,42 @@ open class MediaQueryListImpl: Observable {
|
|
|
363
363
|
public enum Core_media_query_list_index {
|
|
364
364
|
public static let mediaQueryLists: JSArray<MediaQueryListImpl> = JSArray<MediaQueryListImpl>()
|
|
365
365
|
public static var isMediaInitializationEnabled: Bool = false
|
|
366
|
+
public static let matchResultCache: JSMap<String, Bool> = JSMap<String, Bool>()
|
|
367
|
+
public static var isCacheInvalidationRegistered: Bool = false
|
|
368
|
+
public static func clearMatchResultCache() {
|
|
369
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:18)
|
|
370
|
+
Core_media_query_list_index.matchResultCache.clear()
|
|
371
|
+
}
|
|
372
|
+
#sourceLocation()
|
|
373
|
+
public static func registerCacheInvalidation() throws {
|
|
374
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:22)
|
|
375
|
+
if Core_media_query_list_index.isCacheInvalidationRegistered {
|
|
376
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:23)
|
|
377
|
+
return
|
|
378
|
+
}
|
|
379
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:26)
|
|
380
|
+
Core_media_query_list_index.isCacheInvalidationRegistered = true
|
|
381
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:27)
|
|
382
|
+
try Core_application_helpers_common.toggleApplicationEventListeners(
|
|
383
|
+
true,
|
|
384
|
+
FunctionCell_AnyOpt_to_Void.adapting(
|
|
385
|
+
FunctionCell_none_to_Void.declared(
|
|
386
|
+
"Core_media_query_list_index.clearMatchResultCache",
|
|
387
|
+
{ Core_media_query_list_index.clearMatchResultCache() })))
|
|
388
|
+
}
|
|
389
|
+
#sourceLocation()
|
|
366
390
|
public static func onDeviceChange(_ args: Any?) throws {
|
|
367
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
391
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:32)
|
|
392
|
+
Core_media_query_list_index.clearMatchResultCache()
|
|
393
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:34)
|
|
368
394
|
for mql in Core_media_query_list_index.mediaQueryLists {
|
|
369
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
395
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:35)
|
|
370
396
|
let matches: Bool? = try Core_media_query_list_index.checkIfMediaQueryMatches(jsUnwrap(mql, "media").media)
|
|
371
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
397
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:36)
|
|
372
398
|
if try jsUnwrap(mql, "matches").matches != (matches ?? false) {
|
|
373
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
399
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:37)
|
|
374
400
|
try jsUnwrap(mql, setting: "_matches")._matches = (matches ?? false)
|
|
375
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
401
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:39)
|
|
376
402
|
try jsUnwrap(mql, "notify").notify(
|
|
377
403
|
Object_eventName_object_matches_media(
|
|
378
404
|
eventName: MediaQueryListImpl.changeEvent, object: mql,
|
|
@@ -382,49 +408,135 @@ public enum Core_media_query_list_index {
|
|
|
382
408
|
}
|
|
383
409
|
#sourceLocation()
|
|
384
410
|
public static func checkIfMediaQueryMatches(_ mediaQueryString: String) throws -> Bool? {
|
|
385
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
386
|
-
let
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
411
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:50)
|
|
412
|
+
let cachedResult: Bool? = Core_media_query_list_index.matchResultCache.get(mediaQueryString)
|
|
413
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:51)
|
|
414
|
+
if cachedResult != nil {
|
|
415
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:52)
|
|
416
|
+
return cachedResult
|
|
417
|
+
}
|
|
418
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:55)
|
|
390
419
|
var matches: Bool? = nil
|
|
391
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
392
|
-
|
|
393
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
394
|
-
|
|
395
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
420
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:57)
|
|
421
|
+
if try Core_css_mediaquery_index.isEvaluableMediaQuery(mediaQueryString) {
|
|
422
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:58)
|
|
423
|
+
try Core_media_query_list_index.registerCacheInvalidation()
|
|
424
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:61)
|
|
425
|
+
var screenPixels: Any? = nil
|
|
426
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:62)
|
|
427
|
+
var appProperties: Any? = nil
|
|
428
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:63)
|
|
429
|
+
let getScreenPixels: () throws -> Any? = { () throws -> Any? in
|
|
430
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:63)
|
|
431
|
+
return try
|
|
432
|
+
(({ () throws -> Any? in
|
|
433
|
+
if jsIsNullish(screenPixels) {
|
|
434
|
+
try screenPixels = JSObject([
|
|
435
|
+
("width", jsUnwrap(Screen.mainScreen, "widthPixels").widthPixels),
|
|
436
|
+
("height", jsUnwrap(Screen.mainScreen, "heightPixels").heightPixels),
|
|
437
|
+
])
|
|
438
|
+
}
|
|
439
|
+
return screenPixels
|
|
440
|
+
}()))
|
|
441
|
+
}
|
|
442
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:64)
|
|
443
|
+
let getAppProperties: () throws -> Any? = { () throws -> Any? in
|
|
444
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:64)
|
|
445
|
+
return try
|
|
446
|
+
(({ () throws -> Any? in
|
|
447
|
+
if jsIsNullish(appProperties) {
|
|
448
|
+
try appProperties = Core_application_helpers_common.getApplicationProperties()
|
|
449
|
+
}
|
|
450
|
+
return appProperties
|
|
451
|
+
}()))
|
|
452
|
+
}
|
|
453
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:66)
|
|
454
|
+
do {
|
|
455
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:67)
|
|
456
|
+
matches = try Core_css_mediaquery_index.matchQuery(
|
|
457
|
+
mediaQueryString,
|
|
458
|
+
{ () -> JSObject in
|
|
459
|
+
let __o_1 = JSObject()
|
|
460
|
+
__o_1["type"] = MediaQueryType.screen
|
|
461
|
+
_ = try? __o_1.defineProperty(
|
|
462
|
+
"width",
|
|
463
|
+
JSPropertyDescriptor(
|
|
464
|
+
get: { (__this: Any?) throws -> Any? in
|
|
465
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:70)
|
|
466
|
+
return try jsGet(getScreenPixels(), "width")
|
|
467
|
+
}, enumerable: true, configurable: true))
|
|
468
|
+
_ = try? __o_1.defineProperty(
|
|
469
|
+
"height",
|
|
470
|
+
JSPropertyDescriptor(
|
|
471
|
+
get: { (__this: Any?) throws -> Any? in
|
|
472
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:73)
|
|
473
|
+
return try jsGet(getScreenPixels(), "height")
|
|
474
|
+
}, enumerable: true, configurable: true))
|
|
475
|
+
_ = try? __o_1.defineProperty(
|
|
476
|
+
"device-width",
|
|
477
|
+
JSPropertyDescriptor(
|
|
478
|
+
get: { (__this: Any?) throws -> Any? in
|
|
479
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:76)
|
|
480
|
+
return try jsGet(getScreenPixels(), "width")
|
|
481
|
+
}, enumerable: true, configurable: true))
|
|
482
|
+
_ = try? __o_1.defineProperty(
|
|
483
|
+
"device-height",
|
|
484
|
+
JSPropertyDescriptor(
|
|
485
|
+
get: { (__this: Any?) throws -> Any? in
|
|
486
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:79)
|
|
487
|
+
return try jsGet(getScreenPixels(), "height")
|
|
488
|
+
}, enumerable: true, configurable: true))
|
|
489
|
+
_ = try? __o_1.defineProperty(
|
|
490
|
+
"orientation",
|
|
491
|
+
JSPropertyDescriptor(
|
|
492
|
+
get: { (__this: Any?) throws -> Any? in
|
|
493
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:82)
|
|
494
|
+
return try jsGet(getAppProperties(), "orientation")
|
|
495
|
+
}, enumerable: true, configurable: true))
|
|
496
|
+
_ = try? __o_1.defineProperty(
|
|
497
|
+
"prefers-color-scheme",
|
|
498
|
+
JSPropertyDescriptor(
|
|
499
|
+
get: { (__this: Any?) throws -> Any? in
|
|
500
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:85)
|
|
501
|
+
return try jsGet(getAppProperties(), "systemAppearance")
|
|
502
|
+
}, enumerable: true, configurable: true))
|
|
503
|
+
return __o_1
|
|
504
|
+
}())
|
|
505
|
+
} catch {
|
|
506
|
+
#sourceLocation()
|
|
507
|
+
let err: Any? = jsCaught(error)
|
|
508
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:89)
|
|
509
|
+
matches = false
|
|
510
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:90)
|
|
511
|
+
try NativeScriptKit.Trace.write(
|
|
512
|
+
err, NativeScriptKit.Trace.categories.MediaQuery, NativeScriptKit.Trace.messageType.error)
|
|
513
|
+
}
|
|
514
|
+
} else {
|
|
515
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:93)
|
|
407
516
|
matches = false
|
|
408
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
517
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:94)
|
|
409
518
|
try NativeScriptKit.Trace.write(
|
|
410
|
-
|
|
519
|
+
"Media query '\(mediaQueryString)' cannot be evaluated and will never match",
|
|
520
|
+
NativeScriptKit.Trace.categories.MediaQuery, NativeScriptKit.Trace.messageType.warn)
|
|
411
521
|
}
|
|
412
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
522
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:97)
|
|
523
|
+
_ = Core_media_query_list_index.matchResultCache.set(mediaQueryString, (matches ?? false))
|
|
524
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:99)
|
|
413
525
|
return matches
|
|
414
526
|
}
|
|
415
527
|
#sourceLocation()
|
|
416
528
|
public static func matchMedia(_ mediaQueryString: String) throws -> MediaQueryListImpl? {
|
|
417
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
529
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:103)
|
|
418
530
|
Core_media_query_list_index.isMediaInitializationEnabled = true
|
|
419
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
531
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:104)
|
|
420
532
|
let mediaQueryList: MediaQueryListImpl = try MediaQueryListImpl()
|
|
421
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
533
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:105)
|
|
422
534
|
Core_media_query_list_index.isMediaInitializationEnabled = false
|
|
423
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
535
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:107)
|
|
424
536
|
mediaQueryList._media = mediaQueryString
|
|
425
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
537
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:108)
|
|
426
538
|
mediaQueryList._matches = try (Core_media_query_list_index.checkIfMediaQueryMatches(mediaQueryString) ?? false)
|
|
427
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
539
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:109)
|
|
428
540
|
return mediaQueryList
|
|
429
541
|
}
|
|
430
542
|
}
|
|
@@ -432,7 +544,7 @@ public enum Core_media_query_list_index {
|
|
|
432
544
|
#sourceLocation()
|
|
433
545
|
public func __init_Core_media_query_list_index() {
|
|
434
546
|
jsReport {
|
|
435
|
-
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:
|
|
547
|
+
#sourceLocation(file:"@nativescript/core/media-query-list.index.ts",line:112)
|
|
436
548
|
JSPrototypes.declare(
|
|
437
549
|
MediaQueryListImpl.self, "media",
|
|
438
550
|
get: { (__this: Any?) throws -> Any? in
|
|
@@ -71,7 +71,7 @@ open class IOSNativeWindow: NativeWindow {
|
|
|
71
71
|
#sourceLocation(file:"@nativescript/core/native-window.native-window.ios.ts",line:68)
|
|
72
72
|
_ = try
|
|
73
73
|
(jsImplicit(jsUnwrap(NativeScriptEmbedder.sharedInstance(), "delegate").delegate)
|
|
74
|
-
as any NativeScriptEmbedderDelegate?)?.presentNativeScriptApp(controller)
|
|
74
|
+
as (any NativeScriptEmbedderDelegate)?)?.presentNativeScriptApp(controller)
|
|
75
75
|
} else {
|
|
76
76
|
#sourceLocation(file:"@nativescript/core/native-window.native-window.ios.ts",line:70)
|
|
77
77
|
let haveController: Bool =
|