@nstudio/nativescript-compiler 9.2.0-alpha.16 → 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 (186) hide show
  1. package/README.md +3 -0
  2. package/dist/kit/kit-index.js +9 -0
  3. package/dist/kotlin/access.js +14 -15
  4. package/dist/kotlin/arguments.js +2 -2
  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 +16 -1
  9. package/dist/kotlin/class-methods.js +2 -2
  10. package/dist/kotlin/components.js +2 -7
  11. package/dist/kotlin/core-api.js +3 -22
  12. package/dist/kotlin/declarations.js +86 -9
  13. package/dist/kotlin/expression-statements.js +13 -1
  14. package/dist/kotlin/functions.js +2 -4
  15. package/dist/kotlin/global-calls.js +1 -4
  16. package/dist/kotlin/literals.js +3 -10
  17. package/dist/kotlin/names.js +6 -4
  18. package/dist/kotlin/native/api.js +1 -1
  19. package/dist/kotlin/native/classfiles.js +2 -13
  20. package/dist/kotlin/operators.js +36 -30
  21. package/dist/kotlin/optional-chains.js +3 -10
  22. package/dist/kotlin/overrides.js +5 -17
  23. package/dist/kotlin/placement.js +1 -12
  24. package/dist/kotlin/state-backend.js +6 -2
  25. package/dist/kotlin/statements.js +1 -13
  26. package/dist/kotlin/translator.js +3 -11
  27. package/dist/kotlin/type-tests.js +1 -1
  28. package/dist/kotlin/types.js +6 -23
  29. package/dist/program/core-facts.js +9 -0
  30. package/dist/semantics/classes.js +15 -0
  31. package/dist/semantics/facts.js +38 -2
  32. package/dist/semantics/lang.js +29 -0
  33. package/dist/semantics/lower.js +144 -0
  34. package/dist/semantics/lowering-methods.js +120 -3
  35. package/dist/semantics/marks.js +30 -0
  36. package/dist/semantics/placement.js +9 -3
  37. package/dist/semantics/refusals.js +12 -11
  38. package/dist/semantics/signals.js +11 -0
  39. package/dist/semantics/states/missing.js +7 -0
  40. package/dist/semantics/tdz.js +142 -8
  41. package/dist/semantics/throws.js +1 -1
  42. package/dist/semantics/translator-methods.js +1 -1
  43. package/dist/swift/access.js +13 -17
  44. package/dist/swift/assignment.js +30 -16
  45. package/dist/swift/calls.js +13 -5
  46. package/dist/swift/classes.js +22 -10
  47. package/dist/swift/components.js +3 -7
  48. package/dist/swift/control-flow.js +1 -1
  49. package/dist/swift/conversion.js +5 -2
  50. package/dist/swift/core-api.js +11 -31
  51. package/dist/swift/declarations.js +1 -6
  52. package/dist/swift/expression-statements.js +7 -0
  53. package/dist/swift/expressions.js +6 -2
  54. package/dist/swift/from-any.js +1 -1
  55. package/dist/swift/functions.js +5 -6
  56. package/dist/swift/global-calls.js +1 -5
  57. package/dist/swift/lenient.js +0 -7
  58. package/dist/swift/literals.js +8 -3
  59. package/dist/swift/method-values.js +1 -19
  60. package/dist/swift/modules.js +5 -3
  61. package/dist/swift/names.js +3 -12
  62. package/dist/swift/native/api.js +3 -1
  63. package/dist/swift/native/calls.js +1 -1
  64. package/dist/swift/native/dispatch.js +2 -8
  65. package/dist/swift/object-classes.js +84 -1
  66. package/dist/swift/operators.js +37 -34
  67. package/dist/swift/optional-chains.js +1 -8
  68. package/dist/swift/parameters.js +0 -4
  69. package/dist/swift/placement.js +5 -15
  70. package/dist/swift/results.js +0 -4
  71. package/dist/swift/state-backend.js +3 -2
  72. package/dist/swift/statements.js +1 -13
  73. package/dist/swift/static-calls.js +2 -3
  74. package/dist/swift/syntax.js +9 -5
  75. package/dist/swift/translator.js +1 -11
  76. package/dist/swift/type-facts.js +3 -3
  77. package/dist/swift/types.js +3 -3
  78. package/dist/targets/ios/build.js +1 -1
  79. package/dist/types/adapter-api.d.ts +3 -3
  80. package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +1 -0
  81. package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +525 -99
  82. package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +2 -2
  83. package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +29 -6
  84. package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +14 -0
  85. package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +3 -3
  86. package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +49 -1
  87. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +0 -8
  88. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +0 -16
  89. package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +6 -4
  90. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +19 -7
  91. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +14 -0
  92. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +19 -10
  93. package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +17 -29
  94. package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +144 -22
  95. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +8 -3
  96. package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +2 -10
  97. package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +0 -2
  98. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +6 -10
  99. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +531 -8
  100. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +0 -9
  101. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +3 -3
  102. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +19 -0
  103. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +5 -2
  104. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +232 -174
  105. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +1 -1
  106. package/kit-android/generated/kotlin/org/nativescript/kit/utils_android_runtime_version.kt +75 -0
  107. package/kit-android/generated/manifest.json +21 -18
  108. package/kit-android/generated/source-lines.json +1 -1
  109. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +547 -51
  110. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +1 -1
  111. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +52 -6
  112. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Language.kt +33 -0
  113. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Prototypes.kt +9 -1
  114. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +32 -18
  115. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Values.kt +137 -28
  116. package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +1 -1
  117. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +14 -10
  118. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +3 -9
  119. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +20 -21
  120. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +5 -7
  121. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_.swift +130 -0
  122. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +2 -4
  123. package/kit-apple/Sources/NativeScriptKit/Core/Object_specified_substituted_reads.swift +115 -0
  124. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads.swift +113 -0
  125. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads_.swift +113 -0
  126. package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +348 -330
  127. package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +358 -359
  128. package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +47 -29
  129. package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +3 -1
  130. package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +95 -53
  131. package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1 -1
  132. package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +1 -1
  133. package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +2 -2
  134. package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +52 -43
  135. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +18 -0
  136. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +66 -51
  137. package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +67 -51
  138. package/kit-apple/Sources/NativeScriptKit/Core/js-libs.easysax.easysax.swift +24 -6
  139. package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +143 -32
  140. package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +30 -19
  141. package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +190 -78
  142. package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +1 -1
  143. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +205 -201
  144. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +41 -42
  145. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +1 -1
  146. package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +2 -2
  147. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +77 -65
  148. package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +4 -4
  149. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +1272 -824
  150. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +2 -2
  151. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +8 -8
  152. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +1 -1
  153. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +2 -1
  154. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +6 -6
  155. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +22 -21
  156. package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +202 -188
  157. package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +2 -6
  158. package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +3 -3
  159. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2 -2
  160. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +1 -1
  161. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +1 -1
  162. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +2 -2
  163. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +2 -2
  164. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +869 -838
  165. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +46 -31
  166. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +1 -2
  167. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +1 -1
  168. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +2 -2
  169. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +4 -4
  170. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +2 -2
  171. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +17 -17
  172. package/kit-apple/Sources/NativeScriptKit/Core/utils.android-runtime-version.swift +77 -0
  173. package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +2 -2
  174. package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +62 -61
  175. package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +4 -0
  176. package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +2 -0
  177. package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +1 -1
  178. package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +1 -1
  179. package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +1 -1
  180. package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +413 -73
  181. package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +3 -2
  182. package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +14 -1
  183. package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +1 -0
  184. package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +1 -0
  185. package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +2 -0
  186. package/package.json +2 -2
@@ -647,18 +647,26 @@ open class Style: Observable, JSStringConvertible {
647
647
  if jsMadeBits1 & (1 << 58) == 0 { jsMadeNote(&jsMadeBits1, &jsMade, 1 << 58, "_localValueVersion") }
648
648
  }
649
649
  }
650
+ /// Local values specified with var()/calc(), by css name, with the variables their
651
+ /// last substitution read and what it produced. The cascade substitutes them again
652
+ /// when those variables change.
653
+ open var _localCssExpressions: JSMap<String, Any?>? = JSMap<String, Any?>() {
654
+ didSet {
655
+ if jsMadeBits1 & (1 << 59) == 0 { jsMadeNote(&jsMadeBits1, &jsMade, 1 << 59, "_localCssExpressions") }
656
+ }
657
+ }
650
658
  public init(_ ownerView: Any?) throws {
651
659
  try super.init()
652
660
  jsMadeLevel(&jsMade, ["unscopedCssVariables", "scopedCssVariables"])
653
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:45)
661
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:46)
654
662
  if try jsIndexOf(jsLenientString(jsCallMethod(jsConstructor(ownerView), "toString")), "[native code]", nil)
655
663
  != -1 || jsStringEquals(jsLenientString(jsCallMethod(ownerView, "toString")), "[object WeakRef]")
656
664
  {
657
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:46)
665
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:47)
658
666
  self.viewRef = (ownerView as? JSWeakRef<ViewBase>)
659
667
  if jsMadeBits1 & (1 << 57) == 0 { jsMadeNote(&jsMadeBits1, &jsMade, 1 << 57, "viewRef") }
660
668
  } else {
661
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:48)
669
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:49)
662
670
  self.viewRef = try JSWeakRef<ViewBase>((jsCastPresent(ownerView) as ViewBase))
663
671
  if jsMadeBits1 & (1 << 57) == 0 { jsMadeNote(&jsMadeBits1, &jsMade, 1 << 57, "viewRef") }
664
672
  }
@@ -666,89 +674,89 @@ open class Style: Observable, JSStringConvertible {
666
674
  #sourceLocation()
667
675
  open var view: ViewBase? {
668
676
  get throws {
669
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:278)
677
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:286)
670
678
  if jsTruthy(self.viewRef) {
671
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:279)
679
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:287)
672
680
  return try (jsUnwrap(self.viewRef, "get").get() as? ViewBase)
673
681
  }
674
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:282)
682
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:290)
675
683
  return nil
676
684
  }
677
685
  }
678
686
  #sourceLocation()
679
687
  open func setScopedCssVariable(_ varName: String, _ value: String) throws {
680
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:53)
688
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:54)
681
689
  _ = try jsUnwrap(self.scopedCssVariables, "set").set(varName, value)
682
690
  }
683
691
  #sourceLocation()
684
692
  open func setUnscopedCssVariable(_ varName: String, _ value: String) throws {
685
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:57)
693
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:58)
686
694
  _ = try jsUnwrap(self.unscopedCssVariables, "set").set(varName, value)
687
695
  }
688
696
  #sourceLocation()
689
697
  open func removeScopedCssVariable(_ varName: String) throws {
690
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:61)
698
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:62)
691
699
  _ = try jsUnwrap(self.scopedCssVariables, "delete").delete(varName)
692
700
  }
693
701
  #sourceLocation()
694
702
  open func removeUnscopedCssVariable(_ varName: String) throws {
695
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:65)
703
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:66)
696
704
  _ = try jsUnwrap(self.unscopedCssVariables, "delete").delete(varName)
697
705
  }
698
706
  #sourceLocation()
699
707
  open func getCssVariable(_ varName: String) throws -> String? {
700
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:69)
701
- let view: ViewBase? = try self.view
702
708
  #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:70)
709
+ let view: ViewBase? = try self.view
710
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:71)
703
711
  if !jsTruthy(view) {
704
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:71)
712
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:72)
705
713
  return nil
706
714
  }
707
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:74)
715
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:75)
708
716
  if try jsUnwrap(self.unscopedCssVariables, "has").has(varName) {
709
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:75)
717
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:76)
710
718
  return try jsUnwrap(self.unscopedCssVariables, "get").get(varName)
711
719
  }
712
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:78)
720
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:79)
713
721
  if try jsUnwrap(self.scopedCssVariables, "has").has(varName) {
714
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:79)
722
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:80)
715
723
  return try jsUnwrap(self.scopedCssVariables, "get").get(varName)
716
724
  }
717
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:82)
725
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:83)
718
726
  if try !(jsTruthy(jsUnwrap(view, "parent").parent))
719
727
  || !(jsTruthy(jsUnwrap(jsUnwrap(view, "parent").parent, "style").style))
720
728
  {
721
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:83)
729
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:84)
722
730
  return nil
723
731
  }
724
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:86)
732
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:87)
725
733
  return try jsUnwrap(jsUnwrap(jsUnwrap(view, "parent").parent, "style").style, "getCssVariable").getCssVariable(
726
734
  varName)
727
735
  }
728
736
  #sourceLocation()
729
737
  open func resetScopedCssVariables() throws {
730
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:90)
738
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:91)
731
739
  try jsUnwrap(self.scopedCssVariables, "clear").clear()
732
740
  }
733
741
  #sourceLocation()
734
742
  open func resetUnscopedCssVariables() throws {
735
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:94)
743
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:95)
736
744
  try jsUnwrap(self.unscopedCssVariables, "clear").clear()
737
745
  }
738
746
  #sourceLocation()
739
747
  open func toString() throws -> String {
740
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:98)
741
- let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
742
748
  #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:99)
749
+ let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
750
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:100)
743
751
  if !jsTruthy(view as Any?) {
744
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:100)
752
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:101)
745
753
  try NativeScriptKit.Trace.write(
746
754
  "toString() of Style cannot execute correctly because \".viewRef\" is cleared",
747
755
  NativeScriptKit.Trace.categories.Animation, NativeScriptKit.Trace.messageType.warn)
748
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:102)
756
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:103)
749
757
  return ""
750
758
  }
751
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:105)
759
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:106)
752
760
  return try "\(jsToStringThrowing((view as Any?))).style"
753
761
  }
754
762
  #sourceLocation()
@@ -758,6 +766,7 @@ open class Style: Observable, JSStringConvertible {
758
766
  + (jsMadeBits1 & (1 << 46) != 0 ? ["accessibilityHidden"] : [])
759
767
  + (jsMadeBits1 & (1 << 56) != 0 ? ["PropertyBag"] : []) + (jsMadeBits1 & (1 << 57) != 0 ? ["viewRef"] : [])
760
768
  + (jsMadeBits1 & (1 << 58) != 0 ? ["_localValueVersion"] : [])
769
+ + (jsMadeBits1 & (1 << 59) != 0 ? ["_localCssExpressions"] : [])
761
770
  }
762
771
  open override var jsClassName: String? { "Style" }
763
772
  open override subscript(jsKey key: String) -> Any? {
@@ -802,6 +811,9 @@ open class Style: Observable, JSStringConvertible {
802
811
  case 20:
803
812
  switch key {
804
813
  case "unscopedCssVariables": return self.unscopedCssVariables
814
+ case "_localCssExpressions":
815
+ if !(jsMadeBits1 & (1 << 59) != 0) { return nil }
816
+ return self._localCssExpressions
805
817
  case "setScopedCssVariable":
806
818
  return FunctionCell_String_String_to_Void.script(
807
819
  "setScopedCssVariable", 2, self.setScopedCssVariable)
@@ -875,6 +887,9 @@ open class Style: Observable, JSStringConvertible {
875
887
  case "unscopedCssVariables":
876
888
  self.unscopedCssVariables = (newValue as? JSMap<String, String>)
877
889
  return
890
+ case "_localCssExpressions":
891
+ self._localCssExpressions = (newValue as? JSMap<String, Any?>)
892
+ return
878
893
  default: break
879
894
  }
880
895
  default: break
@@ -887,18 +902,18 @@ open class Style: Observable, JSStringConvertible {
887
902
 
888
903
  public func __init_Core_ui_styling_style_index() {
889
904
  jsReport {
890
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:37)
905
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:38)
891
906
  JSPrototypes.declare(
892
907
  Style.self, "view",
893
908
  get: { (__this: Any?) throws -> Any? in
894
909
  guard let __o = __this as? Style else { throw JSException(JSTypeError("Illegal invocation")) }
895
910
  return try __o.view
896
911
  }, set: nil)
897
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:37)
912
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:38)
898
913
 
899
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:285)
914
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:293)
900
915
  try jsSet(JSPrototypes.of(Style.self), "PropertyBag", JSConstructor { _ in JSObject() })
901
- #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:288)
916
+ #sourceLocation(file:"@nativescript/core/ui.styling.style.index.ts",line:296)
902
917
  try jsSet(JSPrototypes.of(Style.self), "_localValueVersion", Double(0))
903
918
  }
904
919
  }
@@ -661,8 +661,7 @@ open class FormattedString: ViewBase {
661
661
  case 6:
662
662
  switch key {
663
663
  case "_spans":
664
- self._spans = jsUnlessNullish(
665
- newValue, { (jsFlat($0) as? ObservableArray) ?? ObservableArray(jsObject: $0) })
664
+ self._spans = (newValue as? ObservableArray)
666
665
  return
667
666
  default: break
668
667
  }
@@ -128,7 +128,7 @@ public func __init_Core_ui_text_view_text_view_common() {
128
128
  Core_ui_text_view_text_view_common.iosWritingToolsAllowedInputProperty = try Property(
129
129
  JSObject([
130
130
  ("name", "iosWritingToolsAllowedInput"),
131
- ("defaultValue", JSArray<Any?>([WritingToolsAllowedInput.Default])),
131
+ ("defaultValue", JSArray<Double>([WritingToolsAllowedInput.Default])),
132
132
  ]))
133
133
  #sourceLocation(file:"@nativescript/core/ui.text-view.text-view-common.ts",line:45)
134
134
  try jsUnwrap(Core_ui_text_view_text_view_common.iosWritingToolsAllowedInputProperty, "register").register(
@@ -63,7 +63,7 @@ open class Transition: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JS
63
63
  }
64
64
  #sourceLocation()
65
65
  open func animateIOSTransition(
66
- _ transitionContext: any UIViewControllerContextTransitioning?, _ fromViewCtrl: UIViewController?,
66
+ _ transitionContext: (any UIViewControllerContextTransitioning)?, _ fromViewCtrl: UIViewController?,
67
67
  _ toViewCtrl: UIViewController?, _ operation: UINavigationController.Operation
68
68
  ) throws {
69
69
  #sourceLocation(file:"@nativescript/core/ui.transition.index.ios.ts",line:31)
@@ -114,7 +114,7 @@ open class Transition: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JS
114
114
  switch key {
115
115
  case "animateIOSTransition":
116
116
  return
117
- FunctionCell_any_UIViewControllerContextTransitioningOpt_UIViewControllerOpt_UIViewControllerOpt_UINavigationController_Operation_to_Void
117
+ FunctionCell_any_UIViewControllerContextTransitioning_Opt_UIViewControllerOpt_UIViewControllerOpt_UINavigationController_Operation_to_Void
118
118
  .script("animateIOSTransition", 4, self.animateIOSTransition)
119
119
  default: break
120
120
  }
@@ -69,7 +69,7 @@ open class ModalTransition: Transition {
69
69
  return self.transitionController
70
70
  }
71
71
  #sourceLocation()
72
- open func iosInteractionDismiss(_ animator: any UIViewControllerAnimatedTransitioning?) throws -> (
72
+ open func iosInteractionDismiss(_ animator: (any UIViewControllerAnimatedTransitioning)?) throws -> (
73
73
  any UIViewControllerInteractiveTransitioning
74
74
  )? {
75
75
  #sourceLocation(file:"@nativescript/core/ui.transition.modal-transition.ios.ts",line:39)
@@ -78,7 +78,7 @@ open class ModalTransition: Transition {
78
78
  return self.interactiveController
79
79
  }
80
80
  #sourceLocation()
81
- open func iosInteractionPresented(_ animator: any UIViewControllerAnimatedTransitioning?) -> (
81
+ open func iosInteractionPresented(_ animator: (any UIViewControllerAnimatedTransitioning)?) -> (
82
82
  any UIViewControllerInteractiveTransitioning
83
83
  )? {
84
84
  #sourceLocation(file:"@nativescript/core/ui.transition.modal-transition.ios.ts",line:45)
@@ -254,7 +254,7 @@ open class ModalTransition: Transition {
254
254
  return self.interactiveController
255
255
  case "iosInteractionDismiss":
256
256
  return
257
- FunctionCell_any_UIViewControllerAnimatedTransitioningOpt_to_any_UIViewControllerInteractiveTransitioning_Opt
257
+ FunctionCell_any_UIViewControllerAnimatedTransitioning_Opt_to_any_UIViewControllerInteractiveTransitioning_Opt
258
258
  .script("iosInteractionDismiss", 1, self.iosInteractionDismiss)
259
259
  default: break
260
260
  }
@@ -273,7 +273,7 @@ open class ModalTransition: Transition {
273
273
  switch key {
274
274
  case "iosInteractionPresented":
275
275
  return
276
- FunctionCell_any_UIViewControllerAnimatedTransitioningOpt_to_any_UIViewControllerInteractiveTransitioning_Opt
276
+ FunctionCell_any_UIViewControllerAnimatedTransitioning_Opt_to_any_UIViewControllerInteractiveTransitioning_Opt
277
277
  .script("iosInteractionPresented", 1, self.iosInteractionPresented)
278
278
  case "setupInteractiveGesture":
279
279
  return FunctionCell_to_Void_ViewOpt_to_Void.script(
@@ -85,7 +85,7 @@ open class PageTransition: Transition {
85
85
  return self.transitionController
86
86
  }
87
87
  #sourceLocation()
88
- open func iosInteractionDismiss(_ animator: any UIViewControllerAnimatedTransitioning?) throws -> (
88
+ open func iosInteractionDismiss(_ animator: (any UIViewControllerAnimatedTransitioning)?) throws -> (
89
89
  any UIViewControllerInteractiveTransitioning
90
90
  )? {
91
91
  #sourceLocation(file:"@nativescript/core/ui.transition.page-transition.ios.ts",line:84)
@@ -708,7 +708,7 @@ open class PageTransition: Transition {
708
708
  return self.interactiveController
709
709
  case "iosInteractionDismiss":
710
710
  return
711
- FunctionCell_any_UIViewControllerAnimatedTransitioningOpt_to_any_UIViewControllerInteractiveTransitioning_Opt
711
+ FunctionCell_any_UIViewControllerAnimatedTransitioning_Opt_to_any_UIViewControllerInteractiveTransitioning_Opt
712
712
  .script("iosInteractionDismiss", 1, self.iosInteractionDismiss)
713
713
  default: break
714
714
  }
@@ -26,9 +26,9 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
26
26
  open var jsExpando: JSObject?
27
27
  open var jsSymbolKeys: [String] { jsExpando?.jsSymbolKeys ?? [] }
28
28
  open func jsDeleteOwn(_ key: String) -> Bool { jsExpando?.delete(key) ?? true }
29
- open class func animate(_ state: Any?, _ transitionContext: any UIViewControllerContextTransitioning?, _ type: Any?)
30
- throws
31
- {
29
+ open class func animate(
30
+ _ state: Any?, _ transitionContext: (any UIViewControllerContextTransitioning)?, _ type: Any?
31
+ ) throws {
32
32
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:123)
33
33
  let transition: Transition? = try jsShaped(jsGet(state, "instance")) { NativeScriptKit.Transition() }
34
34
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:124)
@@ -44,8 +44,8 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
44
44
  } else if __switch1 == SharedTransitionAnimationType.dismiss {
45
45
  __start1 = 1
46
46
  }
47
- let __clause2_end: () -> Void = { __async1.returnValue(()) }
48
- let __clause2: () -> Void = { () -> Void in
47
+ let __clause2_end: @MainActor () -> Void = { __async1.returnValue(()) }
48
+ let __clause2: @MainActor () -> Void = { () -> Void in
49
49
  do {
50
50
  if __start1 > 1 {
51
51
  __clause2_end()
@@ -201,7 +201,7 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
201
201
  })))
202
202
  }
203
203
  #sourceLocation()
204
- let __next1: () -> Void = { () -> Void in
204
+ let __next1: @MainActor () -> Void = { () -> Void in
205
205
  do {
206
206
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:636)
207
207
  do {
@@ -666,14 +666,14 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
666
666
  }
667
667
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:628)
668
668
  let __it10 = try jsIteratorOf(snapshotData)
669
- let __break1: () -> Void = { () -> Void in
669
+ let __break1: @MainActor () -> Void = { () -> Void in
670
670
  __next1()
671
671
  }
672
672
  let __closeError1: (Any?) -> Void = { (__e_1: Any?) -> Void in
673
673
  __it10.jsClose()
674
674
  { __async1.throwValue($0) }(__e_1)
675
675
  }
676
- JSAsyncLoop().run { (__continue1: @escaping () -> Void) -> Void in
676
+ JSAsyncLoop().run { (__continue1: @escaping @MainActor () -> Void) -> Void in
677
677
  do {
678
678
  guard try __it10.jsAdvance() else {
679
679
  __break1()
@@ -718,7 +718,7 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
718
718
  }
719
719
  }
720
720
  #sourceLocation()
721
- let __clause1: () -> Void = { () -> Void in
721
+ let __clause1: @MainActor () -> Void = { () -> Void in
722
722
  do {
723
723
  if __start1 > 0 {
724
724
  __clause2()
@@ -829,10 +829,10 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
829
829
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:176)
830
830
  var __it11 = try jsIterated(sharedElements, "sharedElements is not iterable")
831
831
  .makeIterator()
832
- let __break2: () -> Void = { () -> Void in
832
+ let __break2: @MainActor () -> Void = { () -> Void in
833
833
  __async2.returnValue(())
834
834
  }
835
- JSAsyncLoop().run { (__continue2: @escaping () -> Void) -> Void in
835
+ JSAsyncLoop().run { (__continue2: @escaping @MainActor () -> Void) -> Void in
836
836
  do {
837
837
  guard let __item2 = __it11.next() else {
838
838
  __break2()
@@ -877,7 +877,7 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
877
877
  .sharedTransitionTag]
878
878
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:196)
879
879
  let snapshot: UIImageView = UIImageView()
880
- let __next2: () -> Void = { () -> Void in
880
+ let __next2: @MainActor () -> Void = { () -> Void in
881
881
  do {
882
882
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:202)
883
883
  var imageSourceChangeListener: ((Any?) throws -> Void)?
@@ -1102,10 +1102,10 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
1102
1102
  }
1103
1103
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:296)
1104
1104
  var __it12 = orphanTags.makeIterator()
1105
- let __break3: () -> Void = { () -> Void in
1105
+ let __break3: @MainActor () -> Void = { () -> Void in
1106
1106
  __async3.returnValue(())
1107
1107
  }
1108
- JSAsyncLoop().run { (__continue3: @escaping () -> Void) -> Void in
1108
+ JSAsyncLoop().run { (__continue3: @escaping @MainActor () -> Void) -> Void in
1109
1109
  do {
1110
1110
  guard let __item3 = __it12.next() else {
1111
1111
  __break3()
@@ -1158,7 +1158,7 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
1158
1158
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:310)
1159
1159
  let independentSharedElement: UIView? =
1160
1160
  try jsUnwrap(independentView, "ios").ios as? UIView
1161
- let __next3: () -> Void = { () -> Void in
1161
+ let __next3: @MainActor () -> Void = { () -> Void in
1162
1162
  do {
1163
1163
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:316)
1164
1164
  let snapshot: UIImageView? = try UIImageView(
@@ -2782,8 +2782,8 @@ open class SharedTransitionHelper: JSDynamic, JSExpando, JSStaticKeyed {
2782
2782
  let destSharedIos: UIView? = try (jsGetIfPresent(jsGetIfPresent(destPresented, "view"), "ios") as? UIView)
2783
2783
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:1040)
2784
2784
  let containerView: UIView? = try
2785
- (((jsGet(interactiveState, "transitionContext") as? any UIViewControllerContextTransitioning))
2786
- as any UIViewControllerContextTransitioning?)?.containerView
2785
+ (((jsGet(interactiveState, "transitionContext") as? (any UIViewControllerContextTransitioning)))
2786
+ as (any UIViewControllerContextTransitioning)?)?.containerView
2787
2787
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:1041)
2788
2788
  var targetTransform: Any? = jsNull
2789
2789
  #sourceLocation(file:"@nativescript/core/ui.transition.shared-transition-helper.ios.ts",line:1042)
@@ -0,0 +1,77 @@
1
+ // Generated from @nativescript/core by tools/kit: edit core, not this file.
2
+
3
+ import CFNetwork
4
+ import CoreFoundation
5
+ import CoreGraphics
6
+ import CoreServices
7
+ import CoreText
8
+ import Dispatch
9
+ import Foundation
10
+ import ObjectiveC
11
+ import Photos
12
+ import QuartzCore
13
+ import Symbols
14
+ import SystemConfiguration
15
+ import UIKit
16
+ import WebKit
17
+
18
+ public enum Core_utils_android_runtime_version {
19
+ public static let semverPattern: JSRegExp = jsRegExpLiteral(
20
+ "^(\\d+)\\.(\\d+)\\.(\\d+)(-[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$", "")
21
+ /// Whether a `major.minor.patch[-prerelease]` version string is at or above the given release.
22
+ /// Prereleases of the release itself are lower than it, as in semver.
23
+ /// @param version Version to test; anything that is not a parsable version string yields false.
24
+ /// @returns True only for a parsable version at or above `major.minor.patch`.
25
+ public static func isVersionAtLeast(_ version: Any?, _ major: Double, _ minor: Double, _ patch: Double) throws
26
+ -> Bool
27
+ {
28
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:10)
29
+ if !jsStringEquals(jsTypeof(version), "string") {
30
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:11)
31
+ return false
32
+ }
33
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:13)
34
+ let match: JSMatch? = Core_utils_android_runtime_version.semverPattern.exec(jsLenientString(version))
35
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:14)
36
+ if !jsTruthy(match as Any?) {
37
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:15)
38
+ return false
39
+ }
40
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:17)
41
+ let parts: JSArray<Double> = try JSArray<Double>([
42
+ jsNumberFromString(((jsUnwrap(match, "1").values.element(1) ?? nil) ?? "undefined")),
43
+ jsNumberFromString(((jsUnwrap(match, "2").values.element(2) ?? nil) ?? "undefined")),
44
+ jsNumberFromString(((jsUnwrap(match, "3").values.element(3) ?? nil) ?? "undefined")),
45
+ ])
46
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:18)
47
+ let target: JSArray<Double> = JSArray<Double>([major, minor, patch])
48
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:19)
49
+ var i: Double = 0
50
+ while i < parts.length {
51
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:20)
52
+ if !jsLenientNumberEquals((parts.element(i) ?? .nan), (target.element(i) ?? .nan)) {
53
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:21)
54
+ return (parts.element(i) ?? .nan) > (target.element(i) ?? .nan)
55
+ }
56
+ i += 1
57
+ }
58
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:25)
59
+ return try (jsUnwrap(match, "4").values.element(4) ?? nil) == nil
60
+ }
61
+ #sourceLocation()
62
+ public static var typedArrayToByteArray: Bool? = nil
63
+ /// Whether the Android runtime copies a typed array passed to a Java `byte[]` parameter.
64
+ /// Older runtimes mis-pass it, so this is gated on the version rather than probed.
65
+ public static func runtimeCopiesTypedArraysToByteArrays() throws -> Bool {
66
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:35)
67
+ if Core_utils_android_runtime_version.typedArrayToByteArray == nil {
68
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:36)
69
+ Core_utils_android_runtime_version.typedArrayToByteArray =
70
+ try Core_utils_android_runtime_version.isVersionAtLeast(
71
+ jsGet(jsGlobalThis, "__runtimeVersion"), 9, 1, 2)
72
+ }
73
+ #sourceLocation(file:"@nativescript/core/utils.android-runtime-version.ts",line:39)
74
+ return (Core_utils_android_runtime_version.typedArrayToByteArray ?? false)
75
+ }
76
+ }
77
+ #sourceLocation()
@@ -167,11 +167,11 @@ open class ScopeError: JSError, JSStaticKeyed {
167
167
  return jsTruthy(__v_1 as Any?) ? __v_1 : nil
168
168
  }()) as Any?)
169
169
  }
170
- super.init(jsLenientString(formattedMessage))
170
+ super.init(try jsConvertedString(formattedMessage))
171
171
  #sourceLocation(file:"@nativescript/core/utils.debug-source.ts",line:84)
172
172
  self.stack = try jsUnwrap(inner, "stack").stack
173
173
  #sourceLocation(file:"@nativescript/core/utils.debug-source.ts",line:85)
174
- self.message = jsLenientString(formattedMessage)
174
+ self.message = try jsConvertedString(formattedMessage)
175
175
  }
176
176
  #sourceLocation()
177
177
  open override var jsKeys: [String] { super.jsKeys }