@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.
Files changed (162) hide show
  1. package/README.md +3 -0
  2. package/dist/kotlin/access.js +8 -7
  3. package/dist/kotlin/assignment.js +22 -13
  4. package/dist/kotlin/builtins.js +67 -0
  5. package/dist/kotlin/calls.js +3 -2
  6. package/dist/kotlin/class-declaration.js +4 -9
  7. package/dist/kotlin/class-methods.js +2 -2
  8. package/dist/kotlin/core-api.js +1 -1
  9. package/dist/kotlin/declarations.js +1 -1
  10. package/dist/kotlin/expression-statements.js +13 -1
  11. package/dist/kotlin/functions.js +1 -0
  12. package/dist/kotlin/literals.js +4 -8
  13. package/dist/kotlin/names.js +4 -4
  14. package/dist/kotlin/native/api.js +1 -1
  15. package/dist/kotlin/operators.js +25 -25
  16. package/dist/kotlin/optional-chains.js +1 -1
  17. package/dist/kotlin/overrides.js +2 -2
  18. package/dist/kotlin/state-backend.js +6 -2
  19. package/dist/kotlin/translator.js +1 -1
  20. package/dist/kotlin/types.js +4 -4
  21. package/dist/semantics/classes.js +15 -0
  22. package/dist/semantics/facts.js +1 -1
  23. package/dist/semantics/lang.js +10 -0
  24. package/dist/semantics/lower.js +54 -0
  25. package/dist/semantics/lowering-methods.js +5 -0
  26. package/dist/semantics/placement.js +9 -3
  27. package/dist/semantics/signals.js +11 -0
  28. package/dist/semantics/states/missing.js +7 -0
  29. package/dist/semantics/tdz.js +54 -15
  30. package/dist/semantics/throws.js +1 -1
  31. package/dist/semantics/translator-methods.js +1 -1
  32. package/dist/swift/access.js +7 -9
  33. package/dist/swift/assignment.js +20 -14
  34. package/dist/swift/calls.js +6 -3
  35. package/dist/swift/classes.js +7 -9
  36. package/dist/swift/components.js +3 -3
  37. package/dist/swift/control-flow.js +1 -1
  38. package/dist/swift/conversion.js +5 -2
  39. package/dist/swift/core-api.js +2 -2
  40. package/dist/swift/declarations.js +1 -1
  41. package/dist/swift/expressions.js +6 -2
  42. package/dist/swift/from-any.js +1 -1
  43. package/dist/swift/functions.js +5 -6
  44. package/dist/swift/global-calls.js +1 -1
  45. package/dist/swift/lenient.js +1 -6
  46. package/dist/swift/literals.js +8 -3
  47. package/dist/swift/modules.js +3 -3
  48. package/dist/swift/names.js +3 -3
  49. package/dist/swift/native/calls.js +1 -1
  50. package/dist/swift/object-classes.js +84 -1
  51. package/dist/swift/operators.js +31 -29
  52. package/dist/swift/placement.js +4 -3
  53. package/dist/swift/state-backend.js +3 -2
  54. package/dist/swift/static-calls.js +2 -3
  55. package/dist/swift/syntax.js +9 -5
  56. package/dist/swift/translator.js +1 -1
  57. package/dist/swift/type-facts.js +3 -3
  58. package/dist/swift/types.js +3 -3
  59. package/dist/targets/ios/build.js +1 -1
  60. package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +1 -0
  61. package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +525 -99
  62. package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +2 -2
  63. package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +29 -6
  64. package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +14 -0
  65. package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +3 -3
  66. package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +49 -1
  67. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +0 -8
  68. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +0 -16
  69. package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +6 -4
  70. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +19 -7
  71. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +14 -0
  72. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +19 -10
  73. package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +17 -29
  74. package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +144 -22
  75. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +8 -3
  76. package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +2 -10
  77. package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +0 -2
  78. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +6 -10
  79. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +531 -8
  80. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +0 -9
  81. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +3 -3
  82. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +19 -0
  83. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +5 -2
  84. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +232 -174
  85. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +1 -1
  86. package/kit-android/generated/kotlin/org/nativescript/kit/utils_android_runtime_version.kt +75 -0
  87. package/kit-android/generated/manifest.json +21 -18
  88. package/kit-android/generated/source-lines.json +1 -1
  89. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +497 -42
  90. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +1 -1
  91. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +22 -2
  92. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +32 -18
  93. package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +1 -1
  94. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +14 -10
  95. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +3 -9
  96. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +20 -21
  97. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +5 -7
  98. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_.swift +130 -0
  99. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +2 -4
  100. package/kit-apple/Sources/NativeScriptKit/Core/Object_specified_substituted_reads.swift +115 -0
  101. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads.swift +113 -0
  102. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads_.swift +113 -0
  103. package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +348 -330
  104. package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +358 -359
  105. package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +47 -29
  106. package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +3 -1
  107. package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +95 -53
  108. package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1 -1
  109. package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +1 -1
  110. package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +2 -2
  111. package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +52 -43
  112. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +18 -0
  113. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +66 -51
  114. package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +67 -51
  115. package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +143 -32
  116. package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +30 -19
  117. package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +190 -78
  118. package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +1 -1
  119. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +205 -201
  120. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +41 -42
  121. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +1 -1
  122. package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +2 -2
  123. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +77 -65
  124. package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +4 -4
  125. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +1272 -824
  126. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +2 -2
  127. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +8 -8
  128. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +1 -1
  129. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +2 -1
  130. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +6 -6
  131. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +22 -21
  132. package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +202 -188
  133. package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +2 -6
  134. package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +3 -3
  135. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2 -2
  136. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +1 -1
  137. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +1 -1
  138. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +2 -2
  139. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +2 -2
  140. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +869 -838
  141. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +46 -31
  142. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +1 -2
  143. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +1 -1
  144. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +2 -2
  145. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +4 -4
  146. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +2 -2
  147. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +17 -17
  148. package/kit-apple/Sources/NativeScriptKit/Core/utils.android-runtime-version.swift +77 -0
  149. package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +2 -2
  150. package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +62 -61
  151. package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +4 -0
  152. package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +2 -0
  153. package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +1 -1
  154. package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +1 -1
  155. package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +1 -1
  156. package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +280 -9
  157. package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +3 -2
  158. package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +1 -0
  159. package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +1 -0
  160. package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +1 -0
  161. package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +2 -0
  162. package/package.json +2 -2
@@ -5216,6 +5216,117 @@ class Object_eventName_object_ios_android(
5216
5216
  }
5217
5217
  }
5218
5218
 
5219
+ class Object_eventName_object_ios_android_(
5220
+ var eventName: String,
5221
+ `object`: Any? = null,
5222
+ ios: Any? = null,
5223
+ android: Any? = null,
5224
+ jsOrder: List<String>? = null,
5225
+ ) : JSDynamic {
5226
+ private var jsOrder: List<String>? = jsOrder
5227
+ var `object`: Any? = `object`
5228
+ set(value) {
5229
+ field = jsKeySet(field, value, "object")
5230
+ }
5231
+
5232
+ var ios: Any? = ios
5233
+ set(value) {
5234
+ field = jsKeySet(field, value, "ios")
5235
+ }
5236
+
5237
+ var android: Any? = android
5238
+ set(value) {
5239
+ field = jsKeySet(field, value, "android")
5240
+ }
5241
+
5242
+ private fun <T> jsKeySet(old: T?, value: T?, key: String): T? = value.also {
5243
+ val was = old != null || jsNulls?.contains(key) == true || jsUnset?.contains(key) == true
5244
+ if (it == null) {
5245
+ jsNulls?.remove(key)
5246
+ jsUnset = (jsUnset ?: mutableSetOf()).also { s -> s.add(key) }
5247
+ } else jsUnset?.remove(key)
5248
+ if (!was)
5249
+ jsOrder =
5250
+ (jsOrder ?: listOf("eventName", "object", "ios", "android")).filter { k ->
5251
+ k != key && jsHas(k)
5252
+ } + key
5253
+ }
5254
+
5255
+ var jsUnset: MutableSet<String>? = null
5256
+ private var jsExtra: JSDynamic? = null
5257
+ var jsNulls: MutableSet<String>? = null
5258
+
5259
+ companion object {
5260
+ fun fromJS(o: Any?): Object_eventName_object_ios_android_ =
5261
+ Object_eventName_object_ios_android_(
5262
+ eventName = jsConvertedString(jsField(o, "eventName"), "eventName"),
5263
+ `object` = jsField(o, "object"),
5264
+ ios = jsField(o, "ios"),
5265
+ android = jsField(o, "android"),
5266
+ jsOrder = (o as? JSDynamic)?.jsKeys,
5267
+ )
5268
+ .also {
5269
+ it.jsExtra = o as? JSDynamic
5270
+ it.jsNulls = jsNullKeys(o, listOf("object", "ios", "android"))
5271
+ it.jsUnset = jsUnsetKeys(o, listOf("object", "ios", "android"))
5272
+ }
5273
+ }
5274
+
5275
+ private fun jsHas(key: String): Boolean =
5276
+ when (key) {
5277
+ "object" ->
5278
+ this.`object` != null ||
5279
+ jsNulls?.contains("object") == true ||
5280
+ jsUnset?.contains("object") == true
5281
+ "ios" ->
5282
+ this.ios != null ||
5283
+ jsNulls?.contains("ios") == true ||
5284
+ jsUnset?.contains("ios") == true
5285
+ "android" ->
5286
+ this.android != null ||
5287
+ jsNulls?.contains("android") == true ||
5288
+ jsUnset?.contains("android") == true
5289
+ else -> true
5290
+ }
5291
+
5292
+ override val jsKeys: List<String>
5293
+ get() =
5294
+ (jsOrder ?: listOf("eventName", "object", "ios", "android"))
5295
+ .let { order -> order + (jsExtra?.jsKeys ?: listOf()).filter { it !in order } }
5296
+ .filter(::jsHas)
5297
+
5298
+ override val jsClassName: String?
5299
+ get() = null
5300
+
5301
+ override fun jsGet(key: String): Any? =
5302
+ when (key) {
5303
+ "eventName" -> this.eventName
5304
+ "object" -> jsNullable(jsUnsetIsUndefined { this.`object` }, jsNulls, "object")
5305
+ "ios" -> jsNullable(jsUnsetIsUndefined { this.ios }, jsNulls, "ios")
5306
+ "android" -> jsNullable(jsUnsetIsUndefined { this.android }, jsNulls, "android")
5307
+ else -> jsExtra?.jsGet(key)
5308
+ }
5309
+
5310
+ override fun jsSet(key: String, value: Any?) {
5311
+ when (key) {
5312
+ "eventName" -> this.eventName = jsConvertedString(value, "eventName")
5313
+ "object" -> {
5314
+ this.`object` = value
5315
+ jsNulls = jsNoteNull(jsNulls, "object", value)
5316
+ }
5317
+ "ios" -> {
5318
+ this.ios = value
5319
+ jsNulls = jsNoteNull(jsNulls, "ios", value)
5320
+ }
5321
+ "android" -> {
5322
+ this.android = value
5323
+ jsNulls = jsNoteNull(jsNulls, "android", value)
5324
+ }
5325
+ else -> (jsExtra ?: JSObject().also { jsExtra = it }).jsSet(key, value)
5326
+ }
5327
+ }
5328
+ }
5329
+
5219
5330
  class Object_moduleName(var moduleName: String, private val jsOrder: List<String>? = null) :
5220
5331
  JSDynamic {
5221
5332
  private var jsExtra: JSDynamic? = null
@@ -5947,12 +6058,8 @@ class Object_eventName_object_window_activity_(
5947
6058
  }
5948
6059
  }
5949
6060
 
5950
- class Object_eventName_object_android(
5951
- var eventName: String,
5952
- var `object`: AndroidApplication,
5953
- android: AppCompatActivity? = null,
5954
- jsOrder: List<String>? = null,
5955
- ) : JSDynamic {
6061
+ class Object_android(android: AppCompatActivity? = null, jsOrder: List<String>? = null) :
6062
+ JSDynamic {
5956
6063
  private var jsOrder: List<String>? = jsOrder
5957
6064
  var android: AppCompatActivity? = android
5958
6065
  set(value) {
@@ -5966,10 +6073,7 @@ class Object_eventName_object_android(
5966
6073
  jsUnset = (jsUnset ?: mutableSetOf()).also { s -> s.add(key) }
5967
6074
  } else jsUnset?.remove(key)
5968
6075
  if (!was)
5969
- jsOrder =
5970
- (jsOrder ?: listOf("eventName", "object", "android")).filter { k ->
5971
- k != key && jsHas(k)
5972
- } + key
6076
+ jsOrder = (jsOrder ?: listOf("android")).filter { k -> k != key && jsHas(k) } + key
5973
6077
  }
5974
6078
 
5975
6079
  var jsUnset: MutableSet<String>? = null
@@ -5977,10 +6081,8 @@ class Object_eventName_object_android(
5977
6081
  var jsNulls: MutableSet<String>? = null
5978
6082
 
5979
6083
  companion object {
5980
- fun fromJS(o: Any?): Object_eventName_object_android =
5981
- Object_eventName_object_android(
5982
- eventName = jsConvertedString(jsField(o, "eventName"), "eventName"),
5983
- `object` = jsCastCarried(jsField(o, "object"), AndroidApplication::class.java),
6084
+ fun fromJS(o: Any?): Object_android =
6085
+ Object_android(
5984
6086
  android = jsCast(jsField(o, "android"), AppCompatActivity::class.java),
5985
6087
  jsOrder = (o as? JSDynamic)?.jsKeys,
5986
6088
  )
@@ -6002,7 +6104,7 @@ class Object_eventName_object_android(
6002
6104
 
6003
6105
  override val jsKeys: List<String>
6004
6106
  get() =
6005
- (jsOrder ?: listOf("eventName", "object", "android"))
6107
+ (jsOrder ?: listOf("android"))
6006
6108
  .let { order -> order + (jsExtra?.jsKeys ?: listOf()).filter { it !in order } }
6007
6109
  .filter(::jsHas)
6008
6110
 
@@ -6011,16 +6113,12 @@ class Object_eventName_object_android(
6011
6113
 
6012
6114
  override fun jsGet(key: String): Any? =
6013
6115
  when (key) {
6014
- "eventName" -> this.eventName
6015
- "object" -> this.`object`
6016
6116
  "android" -> jsNullable(jsUnsetIsUndefined { this.android }, jsNulls, "android")
6017
6117
  else -> jsExtra?.jsGet(key)
6018
6118
  }
6019
6119
 
6020
6120
  override fun jsSet(key: String, value: Any?) {
6021
6121
  when (key) {
6022
- "eventName" -> this.eventName = jsConvertedString(value, "eventName")
6023
- "object" -> this.`object` = jsCastCarried(value, AndroidApplication::class.java)
6024
6122
  "android" -> {
6025
6123
  this.android = jsCast(value, AppCompatActivity::class.java)
6026
6124
  jsNulls = jsNoteNull(jsNulls, "android", value)
@@ -6623,7 +6721,7 @@ class Object_eventName_object_android_activity(
6623
6721
  }
6624
6722
  }
6625
6723
 
6626
- class Object_eventName_object_android_(
6724
+ class Object_eventName_object_android(
6627
6725
  var eventName: String,
6628
6726
  var `object`: AndroidApplication,
6629
6727
  android: org.nativescript.NativeScriptComponentCallbacks? = null,
@@ -6653,8 +6751,8 @@ class Object_eventName_object_android_(
6653
6751
  var jsNulls: MutableSet<String>? = null
6654
6752
 
6655
6753
  companion object {
6656
- fun fromJS(o: Any?): Object_eventName_object_android_ =
6657
- Object_eventName_object_android_(
6754
+ fun fromJS(o: Any?): Object_eventName_object_android =
6755
+ Object_eventName_object_android(
6658
6756
  eventName = jsConvertedString(jsField(o, "eventName"), "eventName"),
6659
6757
  `object` = jsCastCarried(jsField(o, "object"), AndroidApplication::class.java),
6660
6758
  android =
@@ -7999,6 +8097,318 @@ class Object_url_contentHandler_resolveCallback_rejectCallback(
7999
8097
  }
8000
8098
  }
8001
8099
 
8100
+ class Object_substituted_values_reads(
8101
+ substituted: Any? = null,
8102
+ var values: JSRecord<Any?>,
8103
+ reads: Any? = null,
8104
+ jsOrder: List<String>? = null,
8105
+ ) : JSDynamic {
8106
+ private var jsOrder: List<String>? = jsOrder
8107
+ var substituted: Any? = substituted
8108
+ set(value) {
8109
+ field = jsKeySet(field, value, "substituted")
8110
+ }
8111
+
8112
+ var reads: Any? = reads
8113
+ set(value) {
8114
+ field = jsKeySet(field, value, "reads")
8115
+ }
8116
+
8117
+ private fun <T> jsKeySet(old: T?, value: T?, key: String): T? = value.also {
8118
+ val was = old != null || jsNulls?.contains(key) == true || jsUnset?.contains(key) == true
8119
+ if (it == null) {
8120
+ jsNulls?.remove(key)
8121
+ jsUnset = (jsUnset ?: mutableSetOf()).also { s -> s.add(key) }
8122
+ } else jsUnset?.remove(key)
8123
+ if (!was)
8124
+ jsOrder =
8125
+ (jsOrder ?: listOf("substituted", "values", "reads")).filter { k ->
8126
+ k != key && jsHas(k)
8127
+ } + key
8128
+ }
8129
+
8130
+ var jsUnset: MutableSet<String>? = null
8131
+ private var jsExtra: JSDynamic? = null
8132
+ var jsNulls: MutableSet<String>? = null
8133
+
8134
+ companion object {
8135
+ fun fromJS(o: Any?): Object_substituted_values_reads =
8136
+ Object_substituted_values_reads(
8137
+ substituted = jsField(o, "substituted"),
8138
+ values = jsRecord<Any?>(jsField(o, "values")),
8139
+ reads = jsField(o, "reads"),
8140
+ jsOrder = (o as? JSDynamic)?.jsKeys,
8141
+ )
8142
+ .also {
8143
+ it.jsExtra = o as? JSDynamic
8144
+ it.jsNulls = jsNullKeys(o, listOf("substituted", "reads"))
8145
+ it.jsUnset = jsUnsetKeys(o, listOf("substituted", "reads"))
8146
+ }
8147
+ }
8148
+
8149
+ private fun jsHas(key: String): Boolean =
8150
+ when (key) {
8151
+ "substituted" ->
8152
+ this.substituted != null ||
8153
+ jsNulls?.contains("substituted") == true ||
8154
+ jsUnset?.contains("substituted") == true
8155
+ "reads" ->
8156
+ this.reads != null ||
8157
+ jsNulls?.contains("reads") == true ||
8158
+ jsUnset?.contains("reads") == true
8159
+ else -> true
8160
+ }
8161
+
8162
+ override val jsKeys: List<String>
8163
+ get() =
8164
+ (jsOrder ?: listOf("substituted", "values", "reads"))
8165
+ .let { order -> order + (jsExtra?.jsKeys ?: listOf()).filter { it !in order } }
8166
+ .filter(::jsHas)
8167
+
8168
+ override val jsClassName: String?
8169
+ get() = null
8170
+
8171
+ override fun jsGet(key: String): Any? =
8172
+ when (key) {
8173
+ "substituted" ->
8174
+ jsNullable(jsUnsetIsUndefined { this.substituted }, jsNulls, "substituted")
8175
+ "values" -> this.values
8176
+ "reads" -> jsNullable(jsUnsetIsUndefined { this.reads }, jsNulls, "reads")
8177
+ else -> jsExtra?.jsGet(key)
8178
+ }
8179
+
8180
+ override fun jsSet(key: String, value: Any?) {
8181
+ when (key) {
8182
+ "substituted" -> {
8183
+ this.substituted = value
8184
+ jsNulls = jsNoteNull(jsNulls, "substituted", value)
8185
+ }
8186
+ "values" -> this.values = jsRecord<Any?>(value)
8187
+ "reads" -> {
8188
+ this.reads = value
8189
+ jsNulls = jsNoteNull(jsNulls, "reads", value)
8190
+ }
8191
+ else -> (jsExtra ?: JSObject().also { jsExtra = it }).jsSet(key, value)
8192
+ }
8193
+ }
8194
+ }
8195
+
8196
+ class Object_specified_substituted_reads(
8197
+ specified: Any? = null,
8198
+ substituted: Any? = null,
8199
+ reads: Any? = null,
8200
+ jsOrder: List<String>? = null,
8201
+ ) : JSDynamic {
8202
+ private var jsOrder: List<String>? = jsOrder
8203
+ var specified: Any? = specified
8204
+ set(value) {
8205
+ field = jsKeySet(field, value, "specified")
8206
+ }
8207
+
8208
+ var substituted: Any? = substituted
8209
+ set(value) {
8210
+ field = jsKeySet(field, value, "substituted")
8211
+ }
8212
+
8213
+ var reads: Any? = reads
8214
+ set(value) {
8215
+ field = jsKeySet(field, value, "reads")
8216
+ }
8217
+
8218
+ private fun <T> jsKeySet(old: T?, value: T?, key: String): T? = value.also {
8219
+ val was = old != null || jsNulls?.contains(key) == true || jsUnset?.contains(key) == true
8220
+ if (it == null) {
8221
+ jsNulls?.remove(key)
8222
+ jsUnset = (jsUnset ?: mutableSetOf()).also { s -> s.add(key) }
8223
+ } else jsUnset?.remove(key)
8224
+ if (!was)
8225
+ jsOrder =
8226
+ (jsOrder ?: listOf("specified", "substituted", "reads")).filter { k ->
8227
+ k != key && jsHas(k)
8228
+ } + key
8229
+ }
8230
+
8231
+ var jsUnset: MutableSet<String>? = null
8232
+ private var jsExtra: JSDynamic? = null
8233
+ var jsNulls: MutableSet<String>? = null
8234
+
8235
+ companion object {
8236
+ fun fromJS(o: Any?): Object_specified_substituted_reads =
8237
+ Object_specified_substituted_reads(
8238
+ specified = jsField(o, "specified"),
8239
+ substituted = jsField(o, "substituted"),
8240
+ reads = jsField(o, "reads"),
8241
+ jsOrder = (o as? JSDynamic)?.jsKeys,
8242
+ )
8243
+ .also {
8244
+ it.jsExtra = o as? JSDynamic
8245
+ it.jsNulls = jsNullKeys(o, listOf("specified", "substituted", "reads"))
8246
+ it.jsUnset = jsUnsetKeys(o, listOf("specified", "substituted", "reads"))
8247
+ }
8248
+ }
8249
+
8250
+ private fun jsHas(key: String): Boolean =
8251
+ when (key) {
8252
+ "specified" ->
8253
+ this.specified != null ||
8254
+ jsNulls?.contains("specified") == true ||
8255
+ jsUnset?.contains("specified") == true
8256
+ "substituted" ->
8257
+ this.substituted != null ||
8258
+ jsNulls?.contains("substituted") == true ||
8259
+ jsUnset?.contains("substituted") == true
8260
+ "reads" ->
8261
+ this.reads != null ||
8262
+ jsNulls?.contains("reads") == true ||
8263
+ jsUnset?.contains("reads") == true
8264
+ else -> true
8265
+ }
8266
+
8267
+ override val jsKeys: List<String>
8268
+ get() =
8269
+ (jsOrder ?: listOf("specified", "substituted", "reads"))
8270
+ .let { order -> order + (jsExtra?.jsKeys ?: listOf()).filter { it !in order } }
8271
+ .filter(::jsHas)
8272
+
8273
+ override val jsClassName: String?
8274
+ get() = null
8275
+
8276
+ override fun jsGet(key: String): Any? =
8277
+ when (key) {
8278
+ "specified" -> jsNullable(jsUnsetIsUndefined { this.specified }, jsNulls, "specified")
8279
+ "substituted" ->
8280
+ jsNullable(jsUnsetIsUndefined { this.substituted }, jsNulls, "substituted")
8281
+ "reads" -> jsNullable(jsUnsetIsUndefined { this.reads }, jsNulls, "reads")
8282
+ else -> jsExtra?.jsGet(key)
8283
+ }
8284
+
8285
+ override fun jsSet(key: String, value: Any?) {
8286
+ when (key) {
8287
+ "specified" -> {
8288
+ this.specified = value
8289
+ jsNulls = jsNoteNull(jsNulls, "specified", value)
8290
+ }
8291
+ "substituted" -> {
8292
+ this.substituted = value
8293
+ jsNulls = jsNoteNull(jsNulls, "substituted", value)
8294
+ }
8295
+ "reads" -> {
8296
+ this.reads = value
8297
+ jsNulls = jsNoteNull(jsNulls, "reads", value)
8298
+ }
8299
+ else -> (jsExtra ?: JSObject().also { jsExtra = it }).jsSet(key, value)
8300
+ }
8301
+ }
8302
+ }
8303
+
8304
+ class Object_substituted_values_reads_(
8305
+ substituted: Any? = null,
8306
+ values: Any? = null,
8307
+ reads: Any? = null,
8308
+ jsOrder: List<String>? = null,
8309
+ ) : JSDynamic {
8310
+ private var jsOrder: List<String>? = jsOrder
8311
+ var substituted: Any? = substituted
8312
+ set(value) {
8313
+ field = jsKeySet(field, value, "substituted")
8314
+ }
8315
+
8316
+ var values: Any? = values
8317
+ set(value) {
8318
+ field = jsKeySet(field, value, "values")
8319
+ }
8320
+
8321
+ var reads: Any? = reads
8322
+ set(value) {
8323
+ field = jsKeySet(field, value, "reads")
8324
+ }
8325
+
8326
+ private fun <T> jsKeySet(old: T?, value: T?, key: String): T? = value.also {
8327
+ val was = old != null || jsNulls?.contains(key) == true || jsUnset?.contains(key) == true
8328
+ if (it == null) {
8329
+ jsNulls?.remove(key)
8330
+ jsUnset = (jsUnset ?: mutableSetOf()).also { s -> s.add(key) }
8331
+ } else jsUnset?.remove(key)
8332
+ if (!was)
8333
+ jsOrder =
8334
+ (jsOrder ?: listOf("substituted", "values", "reads")).filter { k ->
8335
+ k != key && jsHas(k)
8336
+ } + key
8337
+ }
8338
+
8339
+ var jsUnset: MutableSet<String>? = null
8340
+ private var jsExtra: JSDynamic? = null
8341
+ var jsNulls: MutableSet<String>? = null
8342
+
8343
+ companion object {
8344
+ fun fromJS(o: Any?): Object_substituted_values_reads_ =
8345
+ Object_substituted_values_reads_(
8346
+ substituted = jsField(o, "substituted"),
8347
+ values = jsField(o, "values"),
8348
+ reads = jsField(o, "reads"),
8349
+ jsOrder = (o as? JSDynamic)?.jsKeys,
8350
+ )
8351
+ .also {
8352
+ it.jsExtra = o as? JSDynamic
8353
+ it.jsNulls = jsNullKeys(o, listOf("substituted", "values", "reads"))
8354
+ it.jsUnset = jsUnsetKeys(o, listOf("substituted", "values", "reads"))
8355
+ }
8356
+ }
8357
+
8358
+ private fun jsHas(key: String): Boolean =
8359
+ when (key) {
8360
+ "substituted" ->
8361
+ this.substituted != null ||
8362
+ jsNulls?.contains("substituted") == true ||
8363
+ jsUnset?.contains("substituted") == true
8364
+ "values" ->
8365
+ this.values != null ||
8366
+ jsNulls?.contains("values") == true ||
8367
+ jsUnset?.contains("values") == true
8368
+ "reads" ->
8369
+ this.reads != null ||
8370
+ jsNulls?.contains("reads") == true ||
8371
+ jsUnset?.contains("reads") == true
8372
+ else -> true
8373
+ }
8374
+
8375
+ override val jsKeys: List<String>
8376
+ get() =
8377
+ (jsOrder ?: listOf("substituted", "values", "reads"))
8378
+ .let { order -> order + (jsExtra?.jsKeys ?: listOf()).filter { it !in order } }
8379
+ .filter(::jsHas)
8380
+
8381
+ override val jsClassName: String?
8382
+ get() = null
8383
+
8384
+ override fun jsGet(key: String): Any? =
8385
+ when (key) {
8386
+ "substituted" ->
8387
+ jsNullable(jsUnsetIsUndefined { this.substituted }, jsNulls, "substituted")
8388
+ "values" -> jsNullable(jsUnsetIsUndefined { this.values }, jsNulls, "values")
8389
+ "reads" -> jsNullable(jsUnsetIsUndefined { this.reads }, jsNulls, "reads")
8390
+ else -> jsExtra?.jsGet(key)
8391
+ }
8392
+
8393
+ override fun jsSet(key: String, value: Any?) {
8394
+ when (key) {
8395
+ "substituted" -> {
8396
+ this.substituted = value
8397
+ jsNulls = jsNoteNull(jsNulls, "substituted", value)
8398
+ }
8399
+ "values" -> {
8400
+ this.values = value
8401
+ jsNulls = jsNoteNull(jsNulls, "values", value)
8402
+ }
8403
+ "reads" -> {
8404
+ this.reads = value
8405
+ jsNulls = jsNoteNull(jsNulls, "reads", value)
8406
+ }
8407
+ else -> (jsExtra ?: JSObject().also { jsExtra = it }).jsSet(key, value)
8408
+ }
8409
+ }
8410
+ }
8411
+
8002
8412
  class Object_object_eventName_propertyName_value_oldValue_origin(
8003
8413
  `object`: Any? = null,
8004
8414
  var eventName: String,
@@ -12656,83 +13066,6 @@ class Object_eventName_object_matches_media(
12656
13066
  }
12657
13067
  }
12658
13068
 
12659
- class Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme(
12660
- var type: String,
12661
- var width: Double,
12662
- var height: Double,
12663
- var device_width: Double,
12664
- var device_height: Double,
12665
- var orientation: String,
12666
- var prefers_color_scheme: String,
12667
- private val jsOrder: List<String>? = null,
12668
- ) : JSDynamic {
12669
- private var jsExtra: JSDynamic? = null
12670
-
12671
- companion object {
12672
- fun fromJS(
12673
- o: Any?
12674
- ): Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme =
12675
- Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme(
12676
- type = jsConvertedString(jsField(o, "type"), "type"),
12677
- width = jsConvertedNumber(jsField(o, "width"), "width"),
12678
- height = jsConvertedNumber(jsField(o, "height"), "height"),
12679
- device_width = jsConvertedNumber(jsField(o, "device-width"), "device-width"),
12680
- device_height = jsConvertedNumber(jsField(o, "device-height"), "device-height"),
12681
- orientation = jsConvertedString(jsField(o, "orientation"), "orientation"),
12682
- prefers_color_scheme =
12683
- jsConvertedString(
12684
- jsField(o, "prefers-color-scheme"),
12685
- "prefers-color-scheme",
12686
- ),
12687
- jsOrder = (o as? JSDynamic)?.jsKeys,
12688
- )
12689
- .also { it.jsExtra = o as? JSDynamic }
12690
- }
12691
-
12692
- override val jsKeys: List<String>
12693
- get() =
12694
- (jsOrder
12695
- ?: listOf(
12696
- "type",
12697
- "width",
12698
- "height",
12699
- "device-width",
12700
- "device-height",
12701
- "orientation",
12702
- "prefers-color-scheme",
12703
- ))
12704
- .let { order -> order + (jsExtra?.jsKeys ?: listOf()).filter { it !in order } }
12705
-
12706
- override val jsClassName: String?
12707
- get() = null
12708
-
12709
- override fun jsGet(key: String): Any? =
12710
- when (key) {
12711
- "type" -> this.type
12712
- "width" -> this.width
12713
- "height" -> this.height
12714
- "device-width" -> this.device_width
12715
- "device-height" -> this.device_height
12716
- "orientation" -> this.orientation
12717
- "prefers-color-scheme" -> this.prefers_color_scheme
12718
- else -> jsExtra?.jsGet(key)
12719
- }
12720
-
12721
- override fun jsSet(key: String, value: Any?) {
12722
- when (key) {
12723
- "type" -> this.type = jsConvertedString(value, "type")
12724
- "width" -> this.width = jsConvertedNumber(value, "width")
12725
- "height" -> this.height = jsConvertedNumber(value, "height")
12726
- "device-width" -> this.device_width = jsConvertedNumber(value, "device-width")
12727
- "device-height" -> this.device_height = jsConvertedNumber(value, "device-height")
12728
- "orientation" -> this.orientation = jsConvertedString(value, "orientation")
12729
- "prefers-color-scheme" ->
12730
- this.prefers_color_scheme = jsConvertedString(value, "prefers-color-scheme")
12731
- else -> (jsExtra ?: JSObject().also { jsExtra = it }).jsSet(key, value)
12732
- }
12733
- }
12734
- }
12735
-
12736
13069
  class Object_matches_media(
12737
13070
  var matches: Boolean,
12738
13071
  var media: String,
@@ -32112,3 +32445,96 @@ class Object_eventName_object_url_navigationType_error_(
32112
32445
  }
32113
32446
  }
32114
32447
  }
32448
+
32449
+ class Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme(
32450
+ var type: String,
32451
+ private val __get_width:
32452
+ (
32453
+ Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme
32454
+ ) -> Double,
32455
+ private val __get_height:
32456
+ (
32457
+ Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme
32458
+ ) -> Double,
32459
+ private val __get_device_width:
32460
+ (
32461
+ Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme
32462
+ ) -> Double,
32463
+ private val __get_device_height:
32464
+ (
32465
+ Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme
32466
+ ) -> Double,
32467
+ private val __get_orientation:
32468
+ (
32469
+ Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme
32470
+ ) -> String,
32471
+ private val __get_prefers_color_scheme:
32472
+ (
32473
+ Object_type_width_height_devicewidth_deviceheight_orientation_preferscolorscheme
32474
+ ) -> String,
32475
+ private val jsOrder: List<String>? = null,
32476
+ ) : JSDynamic, JSAccessorKeyed {
32477
+ val width: Double
32478
+ get() = __get_width(this)
32479
+
32480
+ val height: Double
32481
+ get() = __get_height(this)
32482
+
32483
+ val device_width: Double
32484
+ get() = __get_device_width(this)
32485
+
32486
+ val device_height: Double
32487
+ get() = __get_device_height(this)
32488
+
32489
+ val orientation: String
32490
+ get() = __get_orientation(this)
32491
+
32492
+ val prefers_color_scheme: String
32493
+ get() = __get_prefers_color_scheme(this)
32494
+
32495
+ override val jsKeys: List<String>
32496
+ get() =
32497
+ jsOrder
32498
+ ?: listOf(
32499
+ "type",
32500
+ "width",
32501
+ "height",
32502
+ "device-width",
32503
+ "device-height",
32504
+ "orientation",
32505
+ "prefers-color-scheme",
32506
+ )
32507
+
32508
+ override val jsClassName: String?
32509
+ get() = null
32510
+
32511
+ override fun jsGet(key: String): Any? =
32512
+ when (key) {
32513
+ "type" -> this.type
32514
+ "width" -> this.width
32515
+ "height" -> this.height
32516
+ "device-width" -> this.device_width
32517
+ "device-height" -> this.device_height
32518
+ "orientation" -> this.orientation
32519
+ "prefers-color-scheme" -> this.prefers_color_scheme
32520
+ else -> null
32521
+ }
32522
+
32523
+ override fun jsSet(key: String, value: Any?) {
32524
+ when (key) {
32525
+ "type" -> this.type = jsConvertedString(value, "type")
32526
+ else -> {}
32527
+ }
32528
+ }
32529
+
32530
+ override fun jsAccessorKind(key: String): String? =
32531
+ when (key) {
32532
+ "width" -> "Getter"
32533
+ "height" -> "Getter"
32534
+ "device-width" -> "Getter"
32535
+ "device-height" -> "Getter"
32536
+ "orientation" -> "Getter"
32537
+ "prefers-color-scheme" -> "Getter"
32538
+ else -> null
32539
+ }
32540
+ }