@nstudio/nativescript-compiler 9.2.0-alpha.17 → 9.2.0-alpha.19

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.
Files changed (207) hide show
  1. package/README.md +3 -0
  2. package/config.js +1 -0
  3. package/dist/kotlin/access.js +8 -7
  4. package/dist/kotlin/arguments.js +6 -0
  5. package/dist/kotlin/assignment.js +22 -13
  6. package/dist/kotlin/builtins.js +67 -0
  7. package/dist/kotlin/calls.js +3 -2
  8. package/dist/kotlin/class-declaration.js +4 -9
  9. package/dist/kotlin/class-methods.js +2 -2
  10. package/dist/kotlin/core-api.js +1 -1
  11. package/dist/kotlin/declarations.js +1 -1
  12. package/dist/kotlin/expression-statements.js +13 -1
  13. package/dist/kotlin/functions.js +1 -0
  14. package/dist/kotlin/literals.js +4 -8
  15. package/dist/kotlin/names.js +4 -4
  16. package/dist/kotlin/native/api.js +1 -1
  17. package/dist/kotlin/operators.js +25 -25
  18. package/dist/kotlin/optional-chains.js +1 -1
  19. package/dist/kotlin/overrides.js +3 -3
  20. package/dist/kotlin/state-backend.js +6 -2
  21. package/dist/kotlin/translator.js +1 -1
  22. package/dist/kotlin/types.js +4 -4
  23. package/dist/semantics/classes.js +15 -0
  24. package/dist/semantics/conversion.js +9 -1
  25. package/dist/semantics/facts.js +1 -1
  26. package/dist/semantics/lang.js +10 -0
  27. package/dist/semantics/lower.js +54 -0
  28. package/dist/semantics/lowering-methods.js +5 -0
  29. package/dist/semantics/placement.js +9 -3
  30. package/dist/semantics/runtime.js +1 -0
  31. package/dist/semantics/signals.js +11 -0
  32. package/dist/semantics/states/missing.js +7 -0
  33. package/dist/semantics/tdz.js +54 -15
  34. package/dist/semantics/throws.js +2 -2
  35. package/dist/semantics/translator-methods.js +1 -1
  36. package/dist/swift/access.js +7 -9
  37. package/dist/swift/arguments.js +14 -9
  38. package/dist/swift/assignment.js +26 -15
  39. package/dist/swift/calls.js +13 -5
  40. package/dist/swift/class-methods.js +2 -1
  41. package/dist/swift/classes.js +7 -9
  42. package/dist/swift/components.js +3 -3
  43. package/dist/swift/control-flow.js +1 -1
  44. package/dist/swift/conversion.js +5 -2
  45. package/dist/swift/core-api.js +2 -2
  46. package/dist/swift/declarations.js +1 -1
  47. package/dist/swift/expressions.js +6 -2
  48. package/dist/swift/from-any.js +1 -1
  49. package/dist/swift/functions.js +5 -6
  50. package/dist/swift/global-calls.js +1 -1
  51. package/dist/swift/lenient.js +1 -6
  52. package/dist/swift/library.js +2 -2
  53. package/dist/swift/literals.js +8 -3
  54. package/dist/swift/method-values.js +2 -1
  55. package/dist/swift/modules.js +3 -3
  56. package/dist/swift/names.js +7 -7
  57. package/dist/swift/native/calls.js +10 -4
  58. package/dist/swift/object-classes.js +84 -1
  59. package/dist/swift/operators.js +31 -29
  60. package/dist/swift/placement.js +22 -6
  61. package/dist/swift/state-backend.js +3 -2
  62. package/dist/swift/static-calls.js +3 -4
  63. package/dist/swift/syntax.js +10 -6
  64. package/dist/swift/translator.js +1 -1
  65. package/dist/swift/type-facts.js +3 -3
  66. package/dist/swift/types.js +5 -5
  67. package/dist/targets/ios/build.js +1 -1
  68. package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +1 -0
  69. package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +525 -99
  70. package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +2 -2
  71. package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +29 -6
  72. package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +14 -0
  73. package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +3 -3
  74. package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +49 -1
  75. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +0 -8
  76. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +0 -16
  77. package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +6 -4
  78. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +19 -7
  79. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +14 -0
  80. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +19 -10
  81. package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +17 -29
  82. package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +144 -22
  83. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +8 -3
  84. package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +2 -10
  85. package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +0 -2
  86. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +6 -10
  87. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +531 -8
  88. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +0 -9
  89. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +3 -3
  90. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +19 -0
  91. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +5 -2
  92. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +232 -174
  93. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +1 -1
  94. package/kit-android/generated/kotlin/org/nativescript/kit/utils_android_runtime_version.kt +75 -0
  95. package/kit-android/generated/manifest.json +21 -18
  96. package/kit-android/generated/source-lines.json +1 -1
  97. package/kit-android/src/fromcore/kotlin/org/nativescript/kit/NativeScriptApplication.kt +9 -0
  98. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +497 -42
  99. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +1 -1
  100. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +22 -2
  101. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +32 -18
  102. package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +7 -3
  103. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +14 -10
  104. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +3 -9
  105. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +20 -21
  106. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +5 -7
  107. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_.swift +130 -0
  108. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +2 -4
  109. package/kit-apple/Sources/NativeScriptKit/Core/Object_specified_substituted_reads.swift +115 -0
  110. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads.swift +113 -0
  111. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads_.swift +113 -0
  112. package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +348 -330
  113. package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +358 -359
  114. package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +47 -29
  115. package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +3 -1
  116. package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +95 -53
  117. package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1 -1
  118. package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +1 -1
  119. package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +3 -3
  120. package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +58 -49
  121. package/kit-apple/Sources/NativeScriptKit/Core/file-system.index.swift +10 -10
  122. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +18 -0
  123. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +67 -52
  124. package/kit-apple/Sources/NativeScriptKit/Core/http.index.swift +3 -3
  125. package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +69 -53
  126. package/kit-apple/Sources/NativeScriptKit/Core/js-libs.easysax.easysax.swift +4 -22
  127. package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +144 -32
  128. package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +30 -19
  129. package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +190 -78
  130. package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +1 -1
  131. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +205 -201
  132. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +41 -42
  133. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +1 -1
  134. package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +2 -2
  135. package/kit-apple/Sources/NativeScriptKit/Core/ui.action-bar.index.ios.swift +33 -21
  136. package/kit-apple/Sources/NativeScriptKit/Core/ui.activity-indicator.index.ios.swift +12 -6
  137. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +77 -65
  138. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.keyframe-animation.swift +1 -1
  139. package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +10 -6
  140. package/kit-apple/Sources/NativeScriptKit/Core/ui.button.index.ios.swift +14 -13
  141. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +1273 -824
  142. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +2 -2
  143. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +87 -67
  144. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +1 -1
  145. package/kit-apple/Sources/NativeScriptKit/Core/ui.date-picker.index.ios.swift +17 -16
  146. package/kit-apple/Sources/NativeScriptKit/Core/ui.dialogs.index.ios.swift +2 -2
  147. package/kit-apple/Sources/NativeScriptKit/Core/ui.editable-text-base.index.ios.swift +27 -18
  148. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +2 -1
  149. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +6 -6
  150. package/kit-apple/Sources/NativeScriptKit/Core/ui.html-view.index.ios.swift +9 -9
  151. package/kit-apple/Sources/NativeScriptKit/Core/ui.image.index.ios.swift +6 -6
  152. package/kit-apple/Sources/NativeScriptKit/Core/ui.label.index.ios.swift +8 -8
  153. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +22 -21
  154. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.layout-base.ios.swift +4 -3
  155. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass-container.index.ios.swift +1 -1
  156. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass.index.ios.swift +1 -1
  157. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.index.ios.swift +2 -2
  158. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.root-layout-common.swift +9 -9
  159. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-picker.index.ios.swift +9 -6
  160. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-view.index.ios.swift +38 -20
  161. package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +204 -190
  162. package/kit-apple/Sources/NativeScriptKit/Core/ui.progress.index.ios.swift +12 -10
  163. package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +2 -6
  164. package/kit-apple/Sources/NativeScriptKit/Core/ui.scroll-view.index.ios.swift +18 -9
  165. package/kit-apple/Sources/NativeScriptKit/Core/ui.search-bar.index.ios.swift +28 -18
  166. package/kit-apple/Sources/NativeScriptKit/Core/ui.segmented-bar.index.ios.swift +19 -12
  167. package/kit-apple/Sources/NativeScriptKit/Core/ui.slider.index.ios.swift +14 -12
  168. package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +17 -12
  169. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2 -2
  170. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +1 -1
  171. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +1 -1
  172. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +2 -2
  173. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +2 -2
  174. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +869 -838
  175. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +46 -31
  176. package/kit-apple/Sources/NativeScriptKit/Core/ui.switch.index.ios.swift +12 -10
  177. package/kit-apple/Sources/NativeScriptKit/Core/ui.tab-view.index.ios.swift +36 -20
  178. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +3 -4
  179. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.index.ios.swift +25 -22
  180. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.text-base-common.swift +2 -3
  181. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-field.index.ios.swift +21 -14
  182. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.index.ios.swift +33 -21
  183. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +1 -1
  184. package/kit-apple/Sources/NativeScriptKit/Core/ui.time-picker.index.ios.swift +22 -18
  185. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +2 -2
  186. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +4 -4
  187. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +2 -2
  188. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +32 -32
  189. package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.index.ios.swift +1 -1
  190. package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.web-view-common.swift +2 -2
  191. package/kit-apple/Sources/NativeScriptKit/Core/utils.android-runtime-version.swift +77 -0
  192. package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +2 -2
  193. package/kit-apple/Sources/NativeScriptKit/Core/utils.index.ios.swift +2 -2
  194. package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +62 -61
  195. package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +4 -0
  196. package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +2 -0
  197. package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +1 -1
  198. package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +1 -1
  199. package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +1 -1
  200. package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +280 -9
  201. package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +3 -2
  202. package/kit-apple/Sources/NativeScriptKit/Runtime/Native.swift +2 -1
  203. package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +1 -0
  204. package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +1 -0
  205. package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +1 -0
  206. package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +2 -0
  207. package/package.json +6 -4
@@ -111,52 +111,70 @@ public enum Core_application_helpers_common {
111
111
  }
112
112
  #sourceLocation()
113
113
  public static var _toggleApplicationEventListenersHandler: ((Bool, ((Any?) throws -> Void)?) throws -> Void)?
114
+ public static let _pendingApplicationEventListeners: JSSet<Any?> = JSSet<Any?>()
114
115
  public static func toggleApplicationEventListeners(_ toAdd: Bool, _ callback: @escaping (Any?) throws -> Void)
115
116
  throws
116
117
  {
117
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:148)
118
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:150)
118
119
  if jsTruthy(Core_application_helpers_common._toggleApplicationEventListenersHandler) {
119
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:149)
120
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:151)
120
121
  try jsCallable(
121
122
  Core_application_helpers_common._toggleApplicationEventListenersHandler,
122
123
  "_toggleApplicationEventListenersHandler")(toAdd, callback)
124
+ } else if toAdd {
125
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:153)
126
+ _ = try Core_application_helpers_common._pendingApplicationEventListeners.add(
127
+ FunctionCell_AnyOpt_to_Void.scriptOrNil("", 1, FunctionCell_AnyOpt_to_Void.present(callback)))
128
+ } else {
129
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:155)
130
+ _ = try Core_application_helpers_common._pendingApplicationEventListeners.delete(
131
+ FunctionCell_AnyOpt_to_Void.scriptOrNil("", 1, FunctionCell_AnyOpt_to_Void.present(callback)))
123
132
  }
124
133
  }
125
134
  #sourceLocation()
126
135
  public static func setToggleApplicationEventListenersCallback(
127
136
  _ callback: @escaping (Bool, ((Any?) throws -> Void)?) throws -> Void
128
- ) {
129
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:153)
137
+ ) throws {
138
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:159)
130
139
  Core_application_helpers_common._toggleApplicationEventListenersHandler = callback
140
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:161)
141
+ for __item1 in Core_application_helpers_common._pendingApplicationEventListeners {
142
+ let listener: (Any?) throws -> Void = try FunctionCell_AnyOpt_to_Void.present(
143
+ FunctionCell_AnyOpt_to_Void.fromScriptOrNil(__item1))
144
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:162)
145
+ try jsCallable(callback, "callback")(true, listener)
146
+ }
147
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:164)
148
+ Core_application_helpers_common._pendingApplicationEventListeners.clear()
131
149
  }
132
150
  #sourceLocation()
133
151
  public static var _applicationPropertiesCallback: (() throws -> Any?)?
134
152
  public static func getApplicationProperties() throws -> Any? {
135
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:160)
153
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:171)
136
154
  if jsTruthy(Core_application_helpers_common._applicationPropertiesCallback) {
137
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:161)
155
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:172)
138
156
  return try jsCallable(
139
157
  Core_application_helpers_common._applicationPropertiesCallback, "_applicationPropertiesCallback")()
140
158
  }
141
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:163)
159
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:174)
142
160
  return JSObject([("orientation", "unknown"), ("systemAppearance", jsNull)])
143
161
  }
144
162
  #sourceLocation()
145
163
  public static func setApplicationPropertiesCallback(_ callback: @escaping () throws -> Any?) {
146
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:166)
164
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:177)
147
165
  Core_application_helpers_common._applicationPropertiesCallback = callback
148
166
  }
149
167
  #sourceLocation()
150
168
  public static var _a11yUpdatePropertiesCallback: ((Any?) throws -> Void)?
151
169
  public static func setA11yUpdatePropertiesCallback(_ callback: @escaping (Any?) throws -> Void) {
152
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:171)
170
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:182)
153
171
  Core_application_helpers_common._a11yUpdatePropertiesCallback = callback
154
172
  }
155
173
  #sourceLocation()
156
174
  public static func updateA11yPropertiesCallback(_ view: Any?) throws {
157
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:174)
175
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:185)
158
176
  if jsTruthy(Core_application_helpers_common._a11yUpdatePropertiesCallback) {
159
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:175)
177
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:186)
160
178
  try jsCallable(
161
179
  Core_application_helpers_common._a11yUpdatePropertiesCallback, "_a11yUpdatePropertiesCallback")(view)
162
180
  }
@@ -164,12 +182,12 @@ public enum Core_application_helpers_common {
164
182
  #sourceLocation()
165
183
  public static var _imageFetcher: Any? = nil
166
184
  public static func getImageFetcher() -> Any? {
167
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:184)
185
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:195)
168
186
  return Core_application_helpers_common._imageFetcher
169
187
  }
170
188
  #sourceLocation()
171
189
  public static func setImageFetcher(_ fetcher: Any?) {
172
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:187)
190
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:198)
173
191
  Core_application_helpers_common._imageFetcher = fetcher
174
192
  }
175
193
  #sourceLocation()
@@ -177,47 +195,47 @@ public enum Core_application_helpers_common {
177
195
  public static func initImageCache(
178
196
  _ context: Any?, _ mode: Double? = nil, _ memoryCacheSize: Double = 0.25, _ diskCacheSize: Double? = nil
179
197
  ) throws {
180
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:197)
198
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:208)
181
199
  let mode: Double = mode ?? CacheMode__helpers_common.diskAndMemory
182
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:197)
200
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:208)
183
201
  let diskCacheSize: Double = diskCacheSize ?? 10 * 1024 * 1024
184
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:198)
202
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:209)
185
203
  if jsLenientNumberEquals(Core_application_helpers_common._currentCacheMode, mode) {
186
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:199)
204
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:210)
187
205
  return
188
206
  }
189
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:202)
207
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:213)
190
208
  Core_application_helpers_common._currentCacheMode = mode
191
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:203)
209
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:214)
192
210
  if !jsTruthy(Core_application_helpers_common.getImageFetcher()) {
193
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:204)
211
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:215)
194
212
  try Core_application_helpers_common.setImageFetcher(
195
213
  jsCallMethod(
196
214
  jsGet(jsGet(jsGet(jsGet(jsMoot("org"), "nativescript"), "widgets"), "image"), "Fetcher"),
197
215
  "getInstance", context))
198
216
  } else {
199
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:206)
217
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:217)
200
218
  _ = try jsCallMethod(Core_application_helpers_common.getImageFetcher(), "clearCache")
201
219
  }
202
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:209)
220
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:220)
203
221
  let params: Any? = try NativeScriptKit.jsConstruct(
204
222
  jsGet(jsGet(jsGet(jsGet(jsGet(jsMoot("org"), "nativescript"), "widgets"), "image"), "Cache"), "CacheParams")
205
223
  )
206
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:210)
224
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:221)
207
225
  try jsSet(params, "memoryCacheEnabled", !jsLenientNumberEquals(mode, CacheMode__helpers_common.none))
208
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:211)
226
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:222)
209
227
  _ = try jsCallMethod(params, "setMemCacheSizePercent", memoryCacheSize)
210
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:212)
228
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:223)
211
229
  try jsSet(params, "diskCacheEnabled", jsLenientNumberEquals(mode, CacheMode__helpers_common.diskAndMemory))
212
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:213)
230
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:224)
213
231
  try jsSet(params, "diskCacheSize", diskCacheSize)
214
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:214)
232
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:225)
215
233
  let imageCache: Any? = try jsCallMethod(
216
234
  jsGet(jsGet(jsGet(jsGet(jsMoot("org"), "nativescript"), "widgets"), "image"), "Cache"), "getInstance",
217
235
  params)
218
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:215)
236
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:226)
219
237
  _ = try jsCallMethod(Core_application_helpers_common.getImageFetcher(), "addImageCache", imageCache)
220
- #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:216)
238
+ #sourceLocation(file:"@nativescript/core/application.helpers-common.ts",line:227)
221
239
  _ = try jsCallMethod(Core_application_helpers_common.getImageFetcher(), "initCache")
222
240
  }
223
241
  }
@@ -184,7 +184,9 @@ public func __init_Connectivity() {
184
184
  NativeScriptKit.jsConstruct(
185
185
  interop.FunctionReference,
186
186
  FunctionCell_AnyOpt_Double_AnyOpt_to_Void.script(
187
- "_reachabilityCallback", 3, Connectivity._reachabilityCallback)))
187
+ "_reachabilityCallback", 3,
188
+ FunctionCell_AnyOpt_Double_AnyOpt_to_Void.declared(
189
+ "Connectivity._reachabilityCallback", { try Connectivity._reachabilityCallback($0, $1, $2) }))))
188
190
  }
189
191
  }
190
192
  #sourceLocation()
@@ -34,111 +34,153 @@ public enum Core_css_mediaquery_index {
34
34
  public static let RE_RESOLUTION_UNIT: JSRegExp = jsRegExpLiteral("(dpi|dpcm|dppx)?\\s*$", "")
35
35
  public static let RESERVED_MEDIA_TYPES: JSSet<String> = JSSet<String>(
36
36
  JSArray<String>(["only", "not", "and", "or", "layer"]))
37
+ public static let EVALUABLE_FEATURES: JSSet<String> = JSSet<String>(
38
+ JSArray<String>(["width", "height", "device-width", "device-height", "orientation", "prefers-color-scheme"]))
39
+ public static let parsedQueryCache: JSMap<String, JSArray<Any?>> = JSMap<String, JSArray<Any?>>()
40
+ public static func getParsedQuery(_ mediaQuery: String) throws -> JSArray<Any?>? {
41
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:57)
42
+ var expressions: JSArray<Any?>? = Core_css_mediaquery_index.parsedQueryCache.get(mediaQuery)
43
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:58)
44
+ if !jsTruthy(expressions as Any?) {
45
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:59)
46
+ expressions = try Core_css_mediaquery_index.parseQuery(mediaQuery)
47
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:60)
48
+ _ = try Core_css_mediaquery_index.parsedQueryCache.set(mediaQuery, jsObjectRequired(expressions))
49
+ }
50
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:63)
51
+ return expressions
52
+ }
53
+ #sourceLocation()
54
+ /// Whether a media query is valid and uses only features the runtime can evaluate.
55
+ /// @param mediaQuery The media query string.
56
+ public static func isEvaluableMediaQuery(_ mediaQuery: String) throws -> Bool {
57
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:71)
58
+ var expressions: JSArray<Any?>? = nil
59
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:73)
60
+ do {
61
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:74)
62
+ expressions = try Core_css_mediaquery_index.getParsedQuery(mediaQuery)
63
+ } catch {
64
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:76)
65
+ return false
66
+ }
67
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:79)
68
+ return try jsUnwrap(expressions, "every").every({ (query: Any?) throws -> Bool in
69
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:79)
70
+ return try jsUnwrap(jsArrayOrNil(jsGet(query, "features"), as: JSArray<Any?>.self, { $0 }), "every").every({
71
+ (feature: Any?) throws -> Bool in
72
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:79)
73
+ return try Core_css_mediaquery_index.EVALUABLE_FEATURES.has(
74
+ jsConvertedString(jsGet(feature, "property")))
75
+ })
76
+ })
77
+ }
78
+ #sourceLocation()
37
79
  public static func matchQuery(_ mediaQuery: String, _ values: Any?) throws -> Bool {
38
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:53)
39
- let expressions: JSArray<Any?>? = try Core_css_mediaquery_index.parseQuery(mediaQuery)
40
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:55)
80
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:83)
81
+ let expressions: JSArray<Any?>? = try Core_css_mediaquery_index.getParsedQuery(mediaQuery)
82
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:85)
41
83
  return try jsUnwrap(expressions, "some").some({ (query: Any?) throws -> Bool in
42
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:56)
84
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:86)
43
85
  let __d_1: Any? = query
44
86
  _ = (try jsConvertedString((try jsGet(__d_1, "type"))))
45
87
  let inverse: Bool = (try jsConvertedBool((try jsGet(__d_1, "inverse"))))
46
88
  let features: JSArray<Any?>? = jsArrayOrNil((try jsGet(__d_1, "features")), as: JSArray<Any?>.self, { $0 })
47
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:60)
89
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:90)
48
90
  let typeMatch: Bool =
49
91
  try jsStrictEquals(jsGet(query, "type"), "all")
50
92
  || jsStrictEquals(jsGet(values, "type"), jsGet(query, "type"))
51
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:63)
93
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:93)
52
94
  if !typeMatch {
53
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:64)
95
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:94)
54
96
  return inverse
55
97
  }
56
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:67)
98
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:97)
57
99
  let expressionsMatch: Bool = try jsUnwrap(features, "every").every({ (feature: Any?) throws -> Bool in
58
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:68)
100
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:98)
59
101
  let value: Any? = try jsGet(values, jsConvertedString(jsGet(feature, "property")))
60
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:71)
102
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:101)
61
103
  if !jsTruthy(value) && !jsStrictEquals(value, Double(0)) {
62
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:72)
104
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:102)
63
105
  return false
64
106
  }
65
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:75)
107
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:105)
66
108
  switch try jsConvertedString(jsGet(feature, "property")) {
67
109
  case "orientation", "prefers-color-scheme":
68
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:78)
110
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:108)
69
111
  if !jsStringEquals(jsTypeof(value), "string") {
70
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:79)
112
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:109)
71
113
  return false
72
114
  }
73
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:82)
115
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:112)
74
116
  return try jsStringEquals(
75
117
  jsLenientString(value).lowercased(), jsConvertedString(jsGet(feature, "value")).lowercased())
76
118
  default:
77
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:85)
119
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:115)
78
120
  var numVal: Double? = nil
79
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:87)
121
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:117)
80
122
  if !jsStringEquals(jsTypeof(value), "number") {
81
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:88)
123
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:118)
82
124
  try NativeScriptKit.Trace.write(
83
125
  "Unknown CSS media query feature property: '\(jsConvertedString(jsGet(feature, "property")))' on '\(jsToStringThrowing(query))'",
84
126
  NativeScriptKit.Trace.categories.MediaQuery, NativeScriptKit.Trace.messageType.warn)
85
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:89)
127
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:119)
86
128
  return false
87
129
  }
88
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:92)
130
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:122)
89
131
  switch try jsConvertedString(jsGet(feature, "property")) {
90
132
  case "width", "height", "device-width", "device-height":
91
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:97)
133
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:127)
92
134
  numVal = try jsCallable(NativeScriptKit.Length.toDevicePixels, "Length.toDevicePixels")(
93
135
  NativeScriptKit.Length.parse(jsGet(feature, "value")), 0)
94
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:98)
136
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:128)
95
137
  break
96
138
  default:
97
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:101)
139
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:131)
98
140
  try NativeScriptKit.Trace.write(
99
141
  "Unknown CSS media query feature property: '\(jsConvertedString(jsGet(feature, "property")))' on '\(jsToStringThrowing(query))'",
100
142
  NativeScriptKit.Trace.categories.MediaQuery, NativeScriptKit.Trace.messageType.warn)
101
143
  }
102
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:105)
144
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:135)
103
145
  switch try jsConvertedString(jsGet(feature, "modifier")) {
104
146
  case "min":
105
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:107)
147
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:137)
106
148
  return jsLenientNumber(value) >= (numVal ?? .nan)
107
149
  case "max":
108
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:109)
150
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:139)
109
151
  return jsLenientNumber(value) <= (numVal ?? .nan)
110
152
  default:
111
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:111)
153
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:141)
112
154
  return jsLenientNumberEquals(jsLenientNumber(value), (numVal ?? .nan))
113
155
  }
114
156
  }
115
157
  return false
116
158
  })
117
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:119)
159
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:149)
118
160
  return (inverse ? !expressionsMatch : expressionsMatch)
119
161
  })
120
162
  }
121
163
  #sourceLocation()
122
164
  public static func parseQuery(_ mediaQuery: String) throws -> JSArray<Any?>? {
123
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:124)
165
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:154)
124
166
  let mediaQueryStrings: JSArray<String>? = jsSplit(mediaQuery, ",", nil)
125
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:126)
167
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:156)
126
168
  return try (jsUnwrap(mediaQueryStrings, "map") as JSArray<String>).map({ (query: String) throws -> Any? in
127
169
  var query = query
128
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:127)
170
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:157)
129
171
  query = jsTrim(query)
130
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:129)
172
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:159)
131
173
  let captures: JSMatch? = jsMatch(query, Core_css_mediaquery_index.RE_MEDIA_QUERY)
132
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:132)
174
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:162)
133
175
  if !jsTruthy(captures as Any?) {
134
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:133)
176
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:163)
135
177
  throw JSException(value: JSSyntaxError("Invalid CSS media query: '\(query)'"))
136
178
  }
137
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:136)
179
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:166)
138
180
  let modifier: String? = try (jsUnwrap(captures, "1").values.element(1) ?? nil)
139
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:137)
181
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:167)
140
182
  let type: String? = try (jsUnwrap(captures, "2").values.element(2) ?? nil)
141
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:138)
183
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:168)
142
184
  let featureString: String = try jsTrim(
143
185
  ((({ () throws -> String in
144
186
  let __v_1 = try (jsUnwrap(captures, "3").values.element(3) ?? nil)
@@ -148,34 +190,34 @@ public enum Core_css_mediaquery_index {
148
190
  let __v_2 = try (jsUnwrap(captures, "4").values.element(4) ?? nil)
149
191
  return jsTruthy(__v_2) ? jsPresent(__v_2) : ""
150
192
  }()))))
151
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:140)
193
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:170)
152
194
  let mediaType: String = (jsTruthy(type as Any?) ? (type ?? "undefined").lowercased() : MediaQueryType.all)
153
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:141)
195
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:171)
154
196
  if Core_css_mediaquery_index.RESERVED_MEDIA_TYPES.has(mediaType) {
155
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:142)
197
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:172)
156
198
  return JSObject([("inverse", true), ("type", MediaQueryType.all), ("features", JSArray<Any?>())])
157
199
  }
158
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:145)
200
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:175)
159
201
  let expression: Any? = JSObject([
160
202
  (
161
203
  "inverse",
162
204
  jsTruthy(modifier as Any?) && jsStringEquals((modifier ?? "undefined").lowercased(), "not")
163
205
  ), ("type", mediaType), ("features", JSArray<Any?>()),
164
206
  ])
165
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:152)
207
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:182)
166
208
  if !jsTruthy(featureString) {
167
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:153)
209
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:183)
168
210
  return expression
169
211
  }
170
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:157)
212
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:187)
171
213
  let features: JSMatch? = jsMatch(featureString, jsRegExpLiteral("\\([^\\)]+\\)", "g"))
172
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:160)
214
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:190)
173
215
  if !jsTruthy(features as Any?) {
174
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:161)
216
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:191)
175
217
  throw JSException(
176
218
  value: JSSyntaxError("Invalid CSS media query features: '\(featureString)' on '\(query)'"))
177
219
  }
178
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:164)
220
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:194)
179
221
  do {
180
222
  let __it1 = try jsIterator(
181
223
  jsIterated(features, "features is not iterable").values.map { (s: String?) in s ?? "" })
@@ -183,19 +225,19 @@ public enum Core_css_mediaquery_index {
183
225
  while try __it1.jsAdvance() {
184
226
  let feature: String = __it1.jsCurrent
185
227
  do {
186
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:165)
228
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:195)
187
229
  let captures: JSMatch? = jsMatch(feature, Core_css_mediaquery_index.RE_MQ_EXPRESSION)
188
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:168)
230
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:198)
189
231
  if !jsTruthy(captures as Any?) {
190
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:169)
232
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:199)
191
233
  throw JSException(
192
234
  value: JSSyntaxError("Invalid CSS media query feature: '\(feature)' on '\(query)'"))
193
235
  }
194
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:172)
236
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:202)
195
237
  let featureData: JSMatch? = try jsMatch(
196
238
  jsUnwrap((jsUnwrap(captures, "1").values.element(1) ?? nil), "toLowerCase")
197
239
  .lowercased(), Core_css_mediaquery_index.RE_MQ_FEATURE)
198
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:174)
240
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:204)
199
241
  _ = try jsUnwrap(
200
242
  jsArrayOrNil(jsGet(expression, "features"), as: JSArray<Any?>.self, { $0 }), "push"
201
243
  ).push(
@@ -212,7 +254,7 @@ public enum Core_css_mediaquery_index {
212
254
  }
213
255
  try __it1.jsCloseChecked()
214
256
  }
215
- #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:181)
257
+ #sourceLocation(file:"@nativescript/core/css-mediaquery.index.ts",line:211)
216
258
  return expression
217
259
  })
218
260
  }
@@ -100,7 +100,7 @@ open class CSS3Parser: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
100
100
  #sourceLocation(file:"@nativescript/core/css.CSS3Parser.ts",line:169)
101
101
  self.nextInputCodePointIndex += 1
102
102
  #sourceLocation(file:"@nativescript/core/css.CSS3Parser.ts",line:171)
103
- return (char ?? "undefined")
103
+ return (char as Any?)
104
104
  case "#":
105
105
  #sourceLocation(file:"@nativescript/core/css.CSS3Parser.ts",line:173)
106
106
  return try
@@ -272,7 +272,7 @@ public enum Core_css_parser {
272
272
  #sourceLocation(file:"@nativescript/core/css.parser.ts",line:195)
273
273
  let unit: Any? = try
274
274
  ({ () throws -> Any? in
275
- let __v_5 = try ((jsUnwrap(result, "2").values.element(2) ?? nil) ?? "undefined")
275
+ let __v_5 = try ((jsUnwrap(result, "2").values.element(2) ?? nil) as Any?)
276
276
  return jsTruthy(__v_5) ? __v_5 : "dip"
277
277
  }())
278
278
  #sourceLocation(file:"@nativescript/core/css.parser.ts",line:197)
@@ -131,10 +131,10 @@ open class ObservableArray: Observable, JSStringConvertible, JSToJSONConvertible
131
131
  return JSGenerator<Any?> { (__gen1: JSGeneratorContext) throws -> Void in
132
132
  #sourceLocation(file:"@nativescript/core/data.observable-array.index.ts",line:98)
133
133
  var __it1 = try jsIterated(self._array, "this._array is not iterable").makeIterator()
134
- let __break1: () -> Void = { () -> Void in
134
+ let __break1: @MainActor () -> Void = { () -> Void in
135
135
  __gen1.returnValue()
136
136
  }
137
- JSAsyncLoop().run { (__continue1: @escaping () -> Void) -> Void in
137
+ JSAsyncLoop().run { (__continue1: @escaping @MainActor () -> Void) -> Void in
138
138
  guard let __item1 = __it1.next() else {
139
139
  __break1()
140
140
  return
@@ -146,7 +146,7 @@ open class ObservableArray: Observable, JSStringConvertible, JSToJSONConvertible
146
146
  { (__t_1: Any?) -> Void in
147
147
  _ = __t_1
148
148
  __continue1()
149
- }, { __gen1.throwValue($0) },
149
+ }, __gen1.throwValue,
150
150
  { (__r_1: Any?) -> Void in
151
151
  __gen1.returnValue(__r_1)
152
152
  })