@nstudio/nativescript-compiler 9.2.0-alpha.11 → 9.2.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/runtime.cjs +7 -1
- package/dist/css/css.js +30 -6
- package/dist/driver/compile.js +1 -0
- package/dist/driver/paths.js +7 -0
- package/dist/kotlin/access.js +1 -1
- package/dist/kotlin/conversion.js +17 -5
- package/dist/kotlin/expressions.js +8 -3
- package/dist/kotlin/literals.js +7 -9
- package/dist/kotlin/native/calls.js +84 -3
- package/dist/kotlin/overrides.js +7 -5
- package/dist/kotlin/placement.js +3 -1
- package/dist/kotlin/static-calls.js +6 -4
- package/dist/kotlin/translator.js +31 -11
- package/dist/kotlin/type-facts.js +10 -2
- package/dist/plugins/native-android.js +30 -2
- package/dist/program/program.js +35 -26
- package/dist/semantics/facts.js +28 -1
- package/dist/semantics/shapes.js +21 -1
- package/dist/swift/conversion.js +1 -1
- package/dist/swift/from-any.js +2 -2
- package/dist/swift/literals.js +4 -4
- package/dist/swift/modules.js +1 -1
- package/dist/swift/placement.js +2 -3
- package/dist/swift/static-calls.js +5 -3
- package/dist/targets/android/build.js +5 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/application_application.kt +4 -4
- package/kit-android/generated/kotlin/org/nativescript/kit/image_source_index.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_animation_common.kt +7 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_index.kt +3 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +2 -4
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_index.kt +5 -6
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_dialogs_index.kt +11 -6
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_fragment_transitions.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_common.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_helper_for_android.kt +7 -5
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_index.kt +6 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_touch_manager.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_flexbox_layout_index.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_search_bar_index.kt +4 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_segmented_bar_index.kt +2 -2
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_formatted_string.kt +1 -3
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_index.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_fade_transition.kt +1 -1
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_flip_transition.kt +8 -8
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_index.kt +1 -1
- package/kit-android/generated/source-lines.json +1 -1
- package/kit-android/gradlew.bat +94 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/Signals.kt +15 -2
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +2 -15
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +9 -3
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +11 -7
- package/kit-apple/Sources/NativeScriptKit/Core/Object_callback_thisArg_once.swift +1 -1
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +7 -5
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +4 -2
- package/kit-apple/Sources/NativeScriptKit/Core/data.observable.index.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +6 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.weak-event-listener.index.swift +3 -3
- package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.index.ios.swift +2 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +6 -2
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +2 -1
- package/kit-apple/Sources/NativeScriptKit/Signals.swift +20 -2
- package/package.json +2 -1
package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_flexbox_layout_index.kt
CHANGED
|
@@ -184,7 +184,7 @@ open class FlexboxLayout : FlexboxLayoutBase {
|
|
|
184
184
|
(child ?: jsCannotRead("nativeViewProtected")).nativeViewProtected,
|
|
185
185
|
android_view_View::class.java,
|
|
186
186
|
) ?: jsCannotRead("getLayoutParams"))
|
|
187
|
-
.getLayoutParams() as org_nativescript_widgets_FlexboxLayout.LayoutParams)
|
|
187
|
+
.getLayoutParams() as? org_nativescript_widgets_FlexboxLayout.LayoutParams)
|
|
188
188
|
val style: Style? = (child ?: jsCannotRead("style")).style
|
|
189
189
|
(lp ?: jsCannotSet("order")).order =
|
|
190
190
|
(style ?: jsCannotRead("order")).order.toLong().toInt()
|
|
@@ -375,7 +375,7 @@ open class SearchBar : SearchBarBase {
|
|
|
375
375
|
val closeButton: ImageView? =
|
|
376
376
|
((jsCast(this.nativeViewProtected, SearchView::class.java)
|
|
377
377
|
?: jsCannotRead("findViewById"))
|
|
378
|
-
.findViewById(closeButtonId.toLong().toInt()) as ImageView)
|
|
378
|
+
.findViewById<android_view_View>(closeButtonId.toLong().toInt()) as? ImageView)
|
|
379
379
|
val color: Double =
|
|
380
380
|
(if (jsIs<Color>(value)) jsCastCarried(value, Color::class.java).android
|
|
381
381
|
else Color(JSArray<Any?>(listOf<Any?>(value))).android)
|
|
@@ -407,7 +407,8 @@ open class SearchBar : SearchBarBase {
|
|
|
407
407
|
this._searchTextView =
|
|
408
408
|
((jsCast(this.nativeViewProtected, SearchView::class.java)
|
|
409
409
|
?: jsCannotRead("findViewById"))
|
|
410
|
-
.findViewById(id.toLong().toInt())
|
|
410
|
+
.findViewById<android_view_View>(id.toLong().toInt())
|
|
411
|
+
as? android_widget_TextView)
|
|
411
412
|
}
|
|
412
413
|
return this._searchTextView
|
|
413
414
|
}
|
|
@@ -429,7 +430,7 @@ open class SearchBar : SearchBarBase {
|
|
|
429
430
|
this._searchPlate =
|
|
430
431
|
((jsCast(this.nativeViewProtected, SearchView::class.java)
|
|
431
432
|
?: jsCannotRead("findViewById"))
|
|
432
|
-
.findViewById(id.toLong().toInt()) as LinearLayout)
|
|
433
|
+
.findViewById<android_view_View>(id.toLong().toInt()) as? LinearLayout)
|
|
433
434
|
}
|
|
434
435
|
return this._searchPlate
|
|
435
436
|
}
|
|
@@ -232,7 +232,7 @@ open class SegmentedBarItem : SegmentedBarItemBase {
|
|
|
232
232
|
val viewGroup: ViewGroup? =
|
|
233
233
|
((jsCast(this.nativeViewProtected, android_widget_TextView::class.java)
|
|
234
234
|
?: jsCannotRead("getParent"))
|
|
235
|
-
.getParent() as ViewGroup)
|
|
235
|
+
.getParent() as? ViewGroup)
|
|
236
236
|
return (viewGroup ?: jsCannotRead("getBackground")).getBackground()
|
|
237
237
|
}
|
|
238
238
|
|
|
@@ -240,7 +240,7 @@ open class SegmentedBarItem : SegmentedBarItemBase {
|
|
|
240
240
|
val nativeView: android_widget_TextView? =
|
|
241
241
|
jsCast(this.nativeViewProtected, android_widget_TextView::class.java)
|
|
242
242
|
val viewGroup: ViewGroup? =
|
|
243
|
-
((nativeView ?: jsCannotRead("getParent")).getParent() as ViewGroup)
|
|
243
|
+
((nativeView ?: jsCannotRead("getParent")).getParent() as? ViewGroup)
|
|
244
244
|
if ((value is Color)) {
|
|
245
245
|
val color: Double = jsCastCarried(value, Color::class.java).android
|
|
246
246
|
val backgroundDrawable: Drawable? =
|
|
@@ -166,9 +166,7 @@ open class FormattedString : ViewBase {
|
|
|
166
166
|
.getItem(jsConvertedNumberOrZero(jsGet(eventData, "index")) + i),
|
|
167
167
|
Span::class.java,
|
|
168
168
|
)
|
|
169
|
-
this._addView(
|
|
170
|
-
jsCast((span ?: jsObjectRequired()), ViewBase::class.java)
|
|
171
|
-
)
|
|
169
|
+
this._addView(jsCast(span, ViewBase::class.java))
|
|
172
170
|
this.addPropertyChangeHandler(span)
|
|
173
171
|
i += 1.0
|
|
174
172
|
}
|
|
@@ -554,7 +554,7 @@ open class TextBase : TextBaseCommon {
|
|
|
554
554
|
jsCallMethod(
|
|
555
555
|
(nativeView as android_widget_TextView?),
|
|
556
556
|
"setText",
|
|
557
|
-
jsNulled(
|
|
557
|
+
jsNulled(spannableStringBuilder),
|
|
558
558
|
)
|
|
559
559
|
this._setTappableState(Core_ui_text_base_index.isStringTappable(value))
|
|
560
560
|
(Core_ui_text_base_text_base_common.textProperty.nativeValueChange
|
|
@@ -28,7 +28,7 @@ open class FadeTransition : Transition {
|
|
|
28
28
|
}
|
|
29
29
|
val animator: Animator? =
|
|
30
30
|
(ObjectAnimator.ofFloat((null as Any?), "alpha", *(alphaValues as FloatArray))
|
|
31
|
-
as Animator)
|
|
31
|
+
as? Animator)
|
|
32
32
|
val duration: Double = this.getDuration_()
|
|
33
33
|
(animator ?: jsCannotRead("setDuration")).setDuration(duration.toLong())
|
|
34
34
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
@@ -40,7 +40,7 @@ open class FlipTransition : Transition {
|
|
|
40
40
|
"rotationY",
|
|
41
41
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
42
42
|
as FloatArray?) ?: jsObjectRequired()),
|
|
43
|
-
) as Animator)
|
|
43
|
+
) as? Animator)
|
|
44
44
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
45
45
|
interpolator
|
|
46
46
|
)
|
|
@@ -58,7 +58,7 @@ open class FlipTransition : Transition {
|
|
|
58
58
|
"alpha",
|
|
59
59
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
60
60
|
as FloatArray?) ?: jsObjectRequired()),
|
|
61
|
-
) as Animator)
|
|
61
|
+
) as? Animator)
|
|
62
62
|
(animator ?: jsCannotRead("setDuration")).setDuration(
|
|
63
63
|
(fullDuration / 2.0).toLong()
|
|
64
64
|
)
|
|
@@ -75,7 +75,7 @@ open class FlipTransition : Transition {
|
|
|
75
75
|
"rotationY",
|
|
76
76
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
77
77
|
as FloatArray?) ?: jsObjectRequired()),
|
|
78
|
-
) as Animator)
|
|
78
|
+
) as? Animator)
|
|
79
79
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
80
80
|
interpolator
|
|
81
81
|
)
|
|
@@ -93,7 +93,7 @@ open class FlipTransition : Transition {
|
|
|
93
93
|
"alpha",
|
|
94
94
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
95
95
|
as FloatArray?) ?: jsObjectRequired()),
|
|
96
|
-
) as Animator)
|
|
96
|
+
) as? Animator)
|
|
97
97
|
(animator ?: jsCannotRead("setDuration")).setDuration(
|
|
98
98
|
(fullDuration / 2.0).toLong()
|
|
99
99
|
)
|
|
@@ -110,7 +110,7 @@ open class FlipTransition : Transition {
|
|
|
110
110
|
"rotationY",
|
|
111
111
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
112
112
|
as FloatArray?) ?: jsObjectRequired()),
|
|
113
|
-
) as Animator)
|
|
113
|
+
) as? Animator)
|
|
114
114
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
115
115
|
interpolator
|
|
116
116
|
)
|
|
@@ -128,7 +128,7 @@ open class FlipTransition : Transition {
|
|
|
128
128
|
"alpha",
|
|
129
129
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
130
130
|
as FloatArray?) ?: jsObjectRequired()),
|
|
131
|
-
) as Animator)
|
|
131
|
+
) as? Animator)
|
|
132
132
|
(animator ?: jsCannotRead("setDuration")).setDuration(
|
|
133
133
|
(fullDuration / 2.0).toLong()
|
|
134
134
|
)
|
|
@@ -145,7 +145,7 @@ open class FlipTransition : Transition {
|
|
|
145
145
|
"rotationY",
|
|
146
146
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
147
147
|
as FloatArray?) ?: jsObjectRequired()),
|
|
148
|
-
) as Animator)
|
|
148
|
+
) as? Animator)
|
|
149
149
|
(animator ?: jsCannotRead("setInterpolator")).setInterpolator(
|
|
150
150
|
interpolator
|
|
151
151
|
)
|
|
@@ -163,7 +163,7 @@ open class FlipTransition : Transition {
|
|
|
163
163
|
"alpha",
|
|
164
164
|
*(((toJavaValue(values, FloatArray::class.java) as FloatArray?)
|
|
165
165
|
as FloatArray?) ?: jsObjectRequired()),
|
|
166
|
-
) as Animator)
|
|
166
|
+
) as? Animator)
|
|
167
167
|
(animator ?: jsCannotRead("setDuration")).setDuration(
|
|
168
168
|
(fullDuration / 2.0).toLong()
|
|
169
169
|
)
|
|
@@ -265,7 +265,7 @@ object Core_utils_index {
|
|
|
265
265
|
jsCallMethodIfPresent(
|
|
266
266
|
jsGetOptional(
|
|
267
267
|
((Core_ui_frame_frame_stack.topmost()?._modalParent
|
|
268
|
-
?: (
|
|
268
|
+
?: (Core_ui_frame_frame_stack.topmost()?.modal))),
|
|
269
269
|
"_dialogFragment",
|
|
270
270
|
),
|
|
271
271
|
"getDialog",
|