@nstudio/nativescript-compiler 0.0.0-stage → 9.2.0-alpha.9
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/LICENSE +19 -0
- package/README.md +72 -2
- package/bin/build-dist.mjs +145 -0
- package/bin/ns-compiled-adapter.js +46 -0
- package/bin/ns-compiled-doctor.js +15 -0
- package/bin/ns-compiled-retrace.js +16 -0
- package/bin/ns-compiled-verify.js +15 -0
- package/bin/ns-compiled.js +26 -0
- package/bin/strip-types.js +18 -0
- package/config.d.ts +41 -0
- package/dist/adapters/active.js +59 -0
- package/dist/adapters/first-party.js +12 -0
- package/dist/adapters/framework.js +135 -0
- package/dist/adapters/hooks.js +115 -0
- package/dist/adapters/load.js +188 -0
- package/dist/api/adapter-api.js +2 -0
- package/dist/api/binding-api.js +11 -0
- package/dist/api/elements.js +21 -0
- package/dist/api/ir.js +29 -0
- package/dist/api/listview.js +27 -0
- package/dist/api/rewrite.js +98 -0
- package/dist/api/typescript-internal.d.ts +35 -0
- package/dist/cli/commands/compile-android.cjs +79 -0
- package/dist/cli/commands/compile-doctor.cjs +45 -0
- package/dist/cli/commands/compile-ios.cjs +77 -0
- package/dist/cli/commands/compile-retrace.cjs +40 -0
- package/dist/cli/commands/compile-verify.cjs +73 -0
- package/dist/cli/contracts.cjs +36 -0
- package/dist/cli/runtime.cjs +166 -0
- package/dist/css/css.js +118 -0
- package/dist/css/worker.js +242 -0
- package/dist/driver/cli.js +95 -0
- package/dist/driver/compile.js +571 -0
- package/dist/driver/contract.js +136 -0
- package/dist/driver/mirror.js +71 -0
- package/dist/driver/paths.js +19 -0
- package/dist/driver/preflight.js +206 -0
- package/dist/driver/toolchain.js +46 -0
- package/dist/driver/unimplemented.js +326 -0
- package/dist/kit/core-source.js +107 -0
- package/dist/kit/kit-index.js +105 -0
- package/dist/kit/manifest.js +468 -0
- package/dist/kit/overlay.js +56 -0
- package/dist/kit/swift-declarations.js +643 -0
- package/dist/kotlin/access.js +624 -0
- package/dist/kotlin/app-modules.js +111 -0
- package/dist/kotlin/arguments.js +397 -0
- package/dist/kotlin/assignment.js +226 -0
- package/dist/kotlin/builtins.js +575 -0
- package/dist/kotlin/calls.js +516 -0
- package/dist/kotlin/checked.js +61 -0
- package/dist/kotlin/class-accessors.js +129 -0
- package/dist/kotlin/class-constructor.js +117 -0
- package/dist/kotlin/class-declaration.js +308 -0
- package/dist/kotlin/class-fields.js +361 -0
- package/dist/kotlin/class-methods.js +213 -0
- package/dist/kotlin/classes.js +333 -0
- package/dist/kotlin/components.js +445 -0
- package/dist/kotlin/construction.js +228 -0
- package/dist/kotlin/control-flow.js +188 -0
- package/dist/kotlin/conversion.js +513 -0
- package/dist/kotlin/core-api.js +762 -0
- package/dist/kotlin/core-index.js +228 -0
- package/dist/kotlin/declarations.js +461 -0
- package/dist/kotlin/diagnostics.js +28 -0
- package/dist/kotlin/expression-statements.js +227 -0
- package/dist/kotlin/expressions.js +461 -0
- package/dist/kotlin/functions.js +474 -0
- package/dist/kotlin/global-calls.js +307 -0
- package/dist/kotlin/install.js +89 -0
- package/dist/kotlin/key-plans.js +117 -0
- package/dist/kotlin/kit-gen.js +581 -0
- package/dist/kotlin/ktfmt.js +60 -0
- package/dist/kotlin/library.js +62 -0
- package/dist/kotlin/literals.js +593 -0
- package/dist/kotlin/loops.js +184 -0
- package/dist/kotlin/mixins.js +103 -0
- package/dist/kotlin/modules.js +769 -0
- package/dist/kotlin/names.js +274 -0
- package/dist/kotlin/narrowing.js +180 -0
- package/dist/kotlin/native/api.js +117 -0
- package/dist/kotlin/native/bridging.js +254 -0
- package/dist/kotlin/native/calls.js +408 -0
- package/dist/kotlin/native/classfiles.js +524 -0
- package/dist/kotlin/native/classpath.js +32 -0
- package/dist/kotlin/native/conversions.js +280 -0
- package/dist/kotlin/native/extend.js +302 -0
- package/dist/kotlin/native/members.js +240 -0
- package/dist/kotlin/native/overloads.js +253 -0
- package/dist/kotlin/native/subclasses.js +378 -0
- package/dist/kotlin/native/types.js +421 -0
- package/dist/kotlin/operators.js +445 -0
- package/dist/kotlin/optional-chains.js +279 -0
- package/dist/kotlin/overrides.js +825 -0
- package/dist/kotlin/placement.js +746 -0
- package/dist/kotlin/prototype-calls.js +154 -0
- package/dist/kotlin/render.js +363 -0
- package/dist/kotlin/state-backend.js +123 -0
- package/dist/kotlin/statements.js +426 -0
- package/dist/kotlin/static-calls.js +296 -0
- package/dist/kotlin/syntax.js +689 -0
- package/dist/kotlin/translator-types.js +1 -0
- package/dist/kotlin/translator.js +806 -0
- package/dist/kotlin/type-facts.js +414 -0
- package/dist/kotlin/type-tests.js +250 -0
- package/dist/kotlin/types.js +655 -0
- package/dist/kotlin/untyped-values.js +354 -0
- package/dist/plugins/bindings-android.js +69 -0
- package/dist/plugins/bindings.js +93 -0
- package/dist/plugins/native-android.js +582 -0
- package/dist/plugins/native-ios.js +632 -0
- package/dist/plugins/resolve.js +108 -0
- package/dist/plugins/source.js +1040 -0
- package/dist/program/app-modules.js +52 -0
- package/dist/program/app-paths.js +60 -0
- package/dist/program/build-caches.js +14 -0
- package/dist/program/build-context.js +48 -0
- package/dist/program/constructor-factories.js +134 -0
- package/dist/program/core-facts.js +151 -0
- package/dist/program/core-patches.js +59 -0
- package/dist/program/env.js +4 -0
- package/dist/program/module-order.js +123 -0
- package/dist/program/order.js +23 -0
- package/dist/program/patterns.js +99 -0
- package/dist/program/platform.js +401 -0
- package/dist/program/program.js +726 -0
- package/dist/program/properties.js +61 -0
- package/dist/program/reach.js +444 -0
- package/dist/program/source-lines.js +268 -0
- package/dist/program/stable-names.js +112 -0
- package/dist/semantics/apis/api.js +31 -0
- package/dist/semantics/apis/array.js +69 -0
- package/dist/semantics/apis/bigint.js +53 -0
- package/dist/semantics/apis/console.js +29 -0
- package/dist/semantics/apis/date.js +7 -0
- package/dist/semantics/apis/globals.js +40 -0
- package/dist/semantics/apis/json.js +6 -0
- package/dist/semantics/apis/mapset.js +21 -0
- package/dist/semantics/apis/math.js +48 -0
- package/dist/semantics/apis/number.js +33 -0
- package/dist/semantics/apis/object.js +25 -0
- package/dist/semantics/apis/operators.js +316 -0
- package/dist/semantics/apis/promise.js +22 -0
- package/dist/semantics/apis/regexp.js +15 -0
- package/dist/semantics/apis/statics.js +61 -0
- package/dist/semantics/apis/string.js +45 -0
- package/dist/semantics/ast.js +315 -0
- package/dist/semantics/async.js +582 -0
- package/dist/semantics/class-plan.js +168 -0
- package/dist/semantics/classes.js +425 -0
- package/dist/semantics/config.js +29 -0
- package/dist/semantics/constant-init.js +107 -0
- package/dist/semantics/conversion.js +255 -0
- package/dist/semantics/decision-trace.js +304 -0
- package/dist/semantics/facts.js +433 -0
- package/dist/semantics/forms/by-name.js +338 -0
- package/dist/semantics/forms/flow.js +336 -0
- package/dist/semantics/forms/forms.js +311 -0
- package/dist/semantics/forms/observers.js +513 -0
- package/dist/semantics/forms/open.js +218 -0
- package/dist/semantics/forms/place-calls.js +387 -0
- package/dist/semantics/forms/placements.js +296 -0
- package/dist/semantics/forms/results.js +307 -0
- package/dist/semantics/forms/union-find.js +157 -0
- package/dist/semantics/globals.js +46 -0
- package/dist/semantics/lang/arrays.js +238 -0
- package/dist/semantics/lang/fields.js +211 -0
- package/dist/semantics/lang/members.js +277 -0
- package/dist/semantics/lang/prototypes.js +180 -0
- package/dist/semantics/lang/this-args.js +189 -0
- package/dist/semantics/lang.js +232 -0
- package/dist/semantics/ledger.js +157 -0
- package/dist/semantics/limits.js +11 -0
- package/dist/semantics/losses.js +201 -0
- package/dist/semantics/lowering-methods.js +42 -0
- package/dist/semantics/marks.js +39 -0
- package/dist/semantics/nullish.js +918 -0
- package/dist/semantics/observers.js +1 -0
- package/dist/semantics/placement.js +698 -0
- package/dist/semantics/platform-globals.js +20 -0
- package/dist/semantics/read-sites.js +29 -0
- package/dist/semantics/refusals.js +206 -0
- package/dist/semantics/refuse-construction.js +64 -0
- package/dist/semantics/refuse-receivers.js +189 -0
- package/dist/semantics/refuse-scope.js +82 -0
- package/dist/semantics/regexp.js +219 -0
- package/dist/semantics/result-shapes.js +203 -0
- package/dist/semantics/runtime.js +482 -0
- package/dist/semantics/shape-defined-keys.js +146 -0
- package/dist/semantics/shape-instance-keys.js +230 -0
- package/dist/semantics/shape-map.js +72 -0
- package/dist/semantics/shapes.js +660 -0
- package/dist/semantics/sharing.js +406 -0
- package/dist/semantics/signals.js +166 -0
- package/dist/semantics/spelled.js +45 -0
- package/dist/semantics/states/by-name.js +46 -0
- package/dist/semantics/states/elements.js +310 -0
- package/dist/semantics/states/fields.js +308 -0
- package/dist/semantics/states/foreign.js +208 -0
- package/dist/semantics/states/lenient.js +246 -0
- package/dist/semantics/states/missing.js +289 -0
- package/dist/semantics/states/nil.js +223 -0
- package/dist/semantics/states/parameters.js +191 -0
- package/dist/semantics/states/predicates.js +232 -0
- package/dist/semantics/states/reads.js +247 -0
- package/dist/semantics/states/results.js +113 -0
- package/dist/semantics/states/untrusted.js +141 -0
- package/dist/semantics/states/untyped.js +194 -0
- package/dist/semantics/states/value-states.js +422 -0
- package/dist/semantics/tdz.js +106 -0
- package/dist/semantics/threading.js +77 -0
- package/dist/semantics/throws.js +878 -0
- package/dist/semantics/top-names.js +59 -0
- package/dist/semantics/translator-methods.js +597 -0
- package/dist/semantics/trust.js +321 -0
- package/dist/semantics/type-methods.js +168 -0
- package/dist/semantics/type-step.js +116 -0
- package/dist/semantics/types.js +456 -0
- package/dist/semantics/worker-state.js +198 -0
- package/dist/swift/access.js +749 -0
- package/dist/swift/app-modules.js +41 -0
- package/dist/swift/arguments.js +236 -0
- package/dist/swift/assignment.js +270 -0
- package/dist/swift/availability.js +146 -0
- package/dist/swift/builtins.js +822 -0
- package/dist/swift/calls.js +493 -0
- package/dist/swift/casts.js +218 -0
- package/dist/swift/checked.js +433 -0
- package/dist/swift/class-accessors.js +139 -0
- package/dist/swift/class-constructor.js +139 -0
- package/dist/swift/class-declaration.js +282 -0
- package/dist/swift/class-fields.js +360 -0
- package/dist/swift/class-methods.js +229 -0
- package/dist/swift/classes.js +522 -0
- package/dist/swift/components.js +386 -0
- package/dist/swift/construction.js +287 -0
- package/dist/swift/control-flow.js +210 -0
- package/dist/swift/conversion.js +425 -0
- package/dist/swift/core-api.js +1068 -0
- package/dist/swift/declarations.js +389 -0
- package/dist/swift/enums.js +58 -0
- package/dist/swift/expression-statements.js +312 -0
- package/dist/swift/expressions.js +568 -0
- package/dist/swift/from-any.js +316 -0
- package/dist/swift/functions.js +487 -0
- package/dist/swift/generics.js +124 -0
- package/dist/swift/global-calls.js +217 -0
- package/dist/swift/install.js +109 -0
- package/dist/swift/key-plans.js +136 -0
- package/dist/swift/kit-gen.js +605 -0
- package/dist/swift/lenient.js +468 -0
- package/dist/swift/library.js +109 -0
- package/dist/swift/literals.js +509 -0
- package/dist/swift/loops.js +244 -0
- package/dist/swift/marks.js +212 -0
- package/dist/swift/members.js +253 -0
- package/dist/swift/method-values.js +177 -0
- package/dist/swift/mixins.js +113 -0
- package/dist/swift/modules.js +969 -0
- package/dist/swift/names.js +371 -0
- package/dist/swift/narrowing.js +170 -0
- package/dist/swift/native/api.js +269 -0
- package/dist/swift/native/bridging.js +240 -0
- package/dist/swift/native/calls.js +586 -0
- package/dist/swift/native/conversions.js +532 -0
- package/dist/swift/native/dispatch.js +218 -0
- package/dist/swift/native/members.js +416 -0
- package/dist/swift/native/sdk-tables.js +772 -0
- package/dist/swift/native/sdk-types.js +1 -0
- package/dist/swift/native/sdk.js +409 -0
- package/dist/swift/native/subclasses.js +533 -0
- package/dist/swift/object-classes.js +396 -0
- package/dist/swift/operators.js +571 -0
- package/dist/swift/optional-chains.js +405 -0
- package/dist/swift/parameters.js +210 -0
- package/dist/swift/placement.js +896 -0
- package/dist/swift/protocols.js +164 -0
- package/dist/swift/prototype-calls.js +227 -0
- package/dist/swift/render.js +385 -0
- package/dist/swift/results.js +370 -0
- package/dist/swift/state-backend.js +243 -0
- package/dist/swift/statements.js +505 -0
- package/dist/swift/static-calls.js +320 -0
- package/dist/swift/syntax.js +916 -0
- package/dist/swift/translator-types.js +1 -0
- package/dist/swift/translator.js +886 -0
- package/dist/swift/type-facts.js +539 -0
- package/dist/swift/type-tests.js +211 -0
- package/dist/swift/types.js +659 -0
- package/dist/targets/android/build.js +598 -0
- package/dist/targets/android/compose-mapping.js +218 -0
- package/dist/targets/android/deprecations.js +81 -0
- package/dist/targets/android/resources.js +80 -0
- package/dist/targets/ios/build.js +583 -0
- package/dist/targets/ios/core-native.js +149 -0
- package/dist/targets/ios/dependencies.js +464 -0
- package/dist/targets/ios/plist.js +127 -0
- package/dist/targets/ios/resources.js +285 -0
- package/dist/targets/ios/retrace.js +196 -0
- package/dist/targets/ios/signing.js +84 -0
- package/dist/targets/ios/xcodegen.js +39 -0
- package/dist/targets/resources.js +180 -0
- package/dist/template/model.js +38 -0
- package/dist/template/plan.js +576 -0
- package/dist/tools/doctor.js +172 -0
- package/dist/tools/retrace.js +116 -0
- package/dist/tools/verify.js +330 -0
- package/dist/types/adapter-api.d.ts +683 -0
- package/dist/types/binding-api.d.ts +48 -0
- package/dist/types/elements.d.ts +10 -0
- package/dist/types/ir.d.ts +245 -0
- package/dist/types/listview.d.ts +15 -0
- package/dist/types/rewrite.d.ts +18 -0
- package/dist/types/typescript-internal.d.ts +35 -0
- package/dist/xml/app.js +65 -0
- package/dist/xml/bindings.js +308 -0
- package/dist/xml/contexts.js +296 -0
- package/dist/xml/fold.js +170 -0
- package/dist/xml/keys.js +146 -0
- package/dist/xml/pages.js +550 -0
- package/dist/xml/plan.js +650 -0
- package/docs/CLI.md +131 -0
- package/docs/cli/compile-android.md +30 -0
- package/docs/cli/compile-doctor.md +18 -0
- package/docs/cli/compile-ios.md +30 -0
- package/docs/cli/compile-retrace.md +18 -0
- package/docs/cli/compile-verify.md +18 -0
- package/docs/cli/compile.md +15 -0
- package/kit-android/build.gradle.kts +65 -0
- package/kit-android/consumer-rules.pro +7 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/__Exports.kt +966 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +125 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +39497 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/abortcontroller_abortsignal.kt +101 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/abortcontroller_index.kt +109 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +547 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_properties.kt +263 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_index.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_application.kt +2656 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +1932 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_application_interfaces.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_application_shims.kt +111 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers.kt +198 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +270 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_index.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_scene_delegate_bridge.kt +233 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_settings_application_settings_common.kt +28 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/application_settings_index.kt +188 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/color_color_common.kt +707 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/color_color_types.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +368 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/color_index.kt +37 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/color_known_colors.kt +418 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/com.tns.FragmentClass.kt +287 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/com.tns.NativeScriptActivity.kt +263 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/com.tns.OnBackPressedCallback.kt +116 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/connectivity_index.kt +289 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/core_types_animation_types.kt +56 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/core_types_index.kt +427 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/core_types_validators.kt +34 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/css_CSS3Parser.kt +954 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/css_CSSNativeScript.kt +205 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +270 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/css_parser.kt +885 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/css_system_classes.kt +98 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/css_value_reworkcss_value.kt +214 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +798 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +1175 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +271 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/file_system_file_system_access.kt +3828 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/file_system_index.kt +1669 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/fps_meter_fps_native.kt +177 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/fps_meter_index.kt +93 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/globals_global_utils.kt +185 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_interfaces.kt +14 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_http_request_common.kt +41 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +119 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +61 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +237 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/http_index.kt +155 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/image_asset_image_asset_common.kt +201 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/image_asset_index.kt +119 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/image_source_image_source_common.kt +26 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/image_source_index.kt +846 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/js_libs_easysax_easysax.kt +1045 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +166 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +391 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/module_name_resolver_helpers.kt +45 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/module_name_resolver_index.kt +185 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/module_name_resolver_non_bundle_workflow_compat.kt +262 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/module_name_resolver_qualifier_matcher_index.kt +305 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/native_window_index.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/native_window_native_window.kt +397 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/native_window_native_window_common.kt +685 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/native_window_native_window_interfaces.kt +51 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/native_window_window_base.kt +223 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_index.kt +4 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +755 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_stringify.kt +212 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_types.kt +65 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptComponentCallbacks.kt +57 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +579 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/platform_common.kt +20 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/platform_device_index.kt +251 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/platform_index.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/platform_screen_index.kt +183 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/profiling_index.kt +485 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/text_formatted_string.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/text_index.kt +15 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/text_span.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/text_text_common.kt +277 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/trace_index.kt +480 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_action_bar_action_bar_common.kt +1081 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_action_bar_index.kt +1207 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_activity_indicator_activity_indicator_common.kt +89 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_activity_indicator_index.kt +171 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_animation_common.kt +518 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_animation_shared.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_animation_types.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_index.kt +1539 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_animation_keyframe_animation.kt +1081 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_binding_builder.kt +369 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_component_builder_index.kt +487 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +1938 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_button_button_common.kt +70 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_button_index.kt +367 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_content_view_index.kt +220 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_bindable_expressions.kt +735 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_bindable_resources.kt +17 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_bindable_types.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +4970 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_index.kt +1342 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_control_state_change_index.kt +52 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +3578 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_property_shared.kt +44 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +3261 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_utils.kt +16 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_index.kt +4716 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_overflow_edges.kt +82 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_common.kt +3597 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_helper_index.kt +134 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_helper_view_helper_common.kt +360 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_helper_view_helper_shared.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_view_interfaces.kt +349 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +266 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_date_picker_date_picker_common.kt +369 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_date_picker_index.kt +427 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_dialogs_dialogs_common.kt +428 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_dialogs_index.kt +689 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_editable_text_base_editable_text_base_common.kt +421 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_editable_text_base_index.kt +1140 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_embedding_index.kt +34 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_enums_enums.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_enums_index.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_activity.kt +210 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_fragment.kt +88 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_fragment_transitions.kt +1544 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_fragment_transitions_types.kt +25 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_common.kt +1350 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_constants.kt +10 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_helper_for_android.kt +615 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_helpers.kt +42 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_interfaces.kt +22 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_frame_stack.kt +112 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_frame_index.kt +1890 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_gestures_common.kt +208 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_gestures_types.kt +348 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_index.kt +1785 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_gestures_touch_manager.kt +288 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_html_view_html_view_common.kt +121 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_html_view_index.kt +283 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_cache_image_cache_common.kt +450 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_cache_index.kt +225 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_image_common.kt +574 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_index.kt +493 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_symbol_effects.kt +31 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_image_symbol_effects_common.kt +138 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_label_index.kt +108 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_absolute_layout_absolute_layout_common.kt +167 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_absolute_layout_index.kt +94 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_dock_layout_dock_layout_common.kt +157 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_dock_layout_index.kt +124 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_flexbox_layout_flexbox_layout_common.kt +1004 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_flexbox_layout_index.kt +675 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_grid_layout_grid_layout_common.kt +1011 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_grid_layout_index.kt +450 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_index.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_layout_base.kt +123 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_layout_base_common.kt +442 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_liquid_glass_container_index.kt +25 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_liquid_glass_container_liquid_glass_container_common.kt +38 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_liquid_glass_index.kt +30 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_liquid_glass_liquid_glass_common.kt +25 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_root_layout_index.kt +556 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_root_layout_root_layout_common.kt +930 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_root_layout_root_layout_stack.kt +49 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_stack_layout_index.kt +63 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_stack_layout_stack_layout_common.kt +83 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_wrap_layout_index.kt +106 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_layouts_wrap_layout_wrap_layout_common.kt +185 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_list_picker_index.kt +400 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_list_picker_list_picker_common.kt +260 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_list_view_index.kt +2406 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_list_view_list_view_common.kt +912 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_page_events.kt +17 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_page_index.kt +241 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_page_page_common.kt +449 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_placeholder_index.kt +61 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_placeholder_placeholder_common.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_progress_index.kt +204 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_progress_progress_common.kt +129 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_proxy_view_container_index.kt +457 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_repeater_index.kt +523 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_scroll_view_index.kt +400 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_scroll_view_scroll_view_common.kt +402 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_search_bar_index.kt +711 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_search_bar_search_bar_common.kt +186 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_segmented_bar_index.kt +774 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_segmented_bar_segmented_bar_common.kt +409 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_slider_index.kt +477 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_slider_slider_common.kt +234 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_split_view_index.kt +25 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_split_view_split_view_common.kt +446 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_background.kt +268 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_background_common.kt +771 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_box_shadow.kt +108 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_clip_path_function.kt +129 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_converters.kt +92 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_animation_parser.kt +416 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_selector.kt +3532 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_shadow.kt +38 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_stroke.kt +30 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_transform.kt +366 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_css_utils.kt +249 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_font.kt +488 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_font_common.kt +446 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_font_interfaces.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_length_shared.kt +264 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_linear_gradient.kt +136 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +1345 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +2907 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +3031 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_styling_profile.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_styling_shared.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_switch_index.kt +295 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_switch_switch_common.kt +139 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_tab_view_index.kt +1977 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_tab_view_tab_view_common.kt +902 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_formatted_string.kt +471 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_index.kt +1662 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_span.kt +284 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_base_text_base_common.kt +792 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_field_index.kt +211 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_field_text_field_common.kt +115 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_index.kt +94 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +140 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_time_picker_index.kt +225 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_time_picker_time_picker_common.kt +699 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_fade_transition.kt +68 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_flip_transition.kt +209 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_index.kt +160 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_modal_transition.kt +49 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_page_transition.kt +416 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_shared_transition.kt +457 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_shared_transition_helper.kt +46 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_transition_slide_transition.kt +294 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_utils.kt +20 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_web_view_index.kt +595 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_web_view_web_view_common.kt +209 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/ui_web_view_web_view_interfaces.kt +6 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_animation_helpers.kt +76 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_common.kt +224 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_constants.kt +22 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_debug.kt +9 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_debug_source.kt +246 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_index.kt +296 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_layout_helper_index.kt +139 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_layout_helper_layout_helper_common.kt +61 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_layout_helper_layout_helper_shared.kt +23 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_lazy.kt +20 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_macrotask_scheduler.kt +45 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_mainthread_helper.kt +64 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_module_merge.kt +13 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_native_helper.kt +79 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_native_helper_for_android.kt +805 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_number_utils.kt +66 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_platform_check.kt +15 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_shared.kt +65 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_types.kt +229 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/utils_utils_shared.kt +16 -0
- package/kit-android/generated/kotlin/org/nativescript/kit/xml_index.kt +869 -0
- package/kit-android/generated/manifest.json +860 -0
- package/kit-android/generated/source-lines.json +1 -0
- package/kit-android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/kit-android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/kit-android/gradlew +240 -0
- package/kit-android/overlays/xml-free/kotlin/org/nativescript/kit/ui_builder_index.kt +524 -0
- package/kit-android/overlays/xml-free/kotlin/org/nativescript/kit/ui_core_bindable_index.kt +1335 -0
- package/kit-android/overlays/xml-free/overlay.json +20 -0
- package/kit-android/src/fromcore/kotlin/org/nativescript/kit/AnimationFrame.kt +68 -0
- package/kit-android/src/fromcore/kotlin/org/nativescript/kit/CoreBridge.kt +302 -0
- package/kit-android/src/fromcore/kotlin/org/nativescript/kit/Modal.kt +61 -0
- package/kit-android/src/fromcore/kotlin/org/nativescript/kit/NativeScriptApplication.kt +230 -0
- package/kit-android/src/fromcore/kotlin/org/nativescript/kit/Regions.kt +289 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/ChangeDetection.kt +28 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/ColorMix.kt +643 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/JS.kt +10 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/MainThread.kt +10 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/Signals.kt +866 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/UncaughtErrors.kt +51 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +731 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ArrayLike.kt +781 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/BigInt.kt +136 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/CSSCalc.kt +109 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Collections.kt +426 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/CorePackages.kt +13 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Date.kt +573 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Dynamic.kt +668 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ES2023.kt +93 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ErrorOrigin.kt +17 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Errors.kt +270 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/HostObjects.kt +72 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Inspect.kt +814 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +651 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Iterators.kt +746 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +587 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Language.kt +518 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Lowering.kt +70 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Number.kt +367 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Promise.kt +680 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Prototypes.kt +292 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Reactive.kt +36 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Realm.kt +85 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/RegExp.kt +2245 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ShortestDouble.kt +157 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +398 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/ThrownValue.kt +34 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Timers.kt +182 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/TypedArrays.kt +993 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/URI.kt +74 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Values.kt +1237 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Views.kt +52 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Weak.kt +110 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/WinterTC.kt +356 -0
- package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Workers.kt +312 -0
- package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +536 -0
- package/kit-apple/Overlays/xml-free/Core/ui.core.bindable.index.swift +1375 -0
- package/kit-apple/Overlays/xml-free/overlay.json +34 -0
- package/kit-apple/Package.swift +17 -0
- package/kit-apple/Sources/NativeScriptKit/AnimationFrame.swift +41 -0
- package/kit-apple/Sources/NativeScriptKit/AppModules.swift +88 -0
- package/kit-apple/Sources/NativeScriptKit/ApplicationDelegateClass.swift +273 -0
- package/kit-apple/Sources/NativeScriptKit/CSSCalc.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/ChangeDetection.swift +31 -0
- package/kit-apple/Sources/NativeScriptKit/ColorMix.swift +577 -0
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity0.swift +1413 -0
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +6525 -0
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +4713 -0
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +5428 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_Accuracy_AndroidActionBarIconVisibility_AndroidActionItemPosition_AnimationCurve_AutocapitalizationType_BackgroundRepeat_and_26_more_630c32.swift +472 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_ArrayExpression_BinaryExpression_CallExpression_ChainExpression_ConditionalExpression_Identifier_and_10_more_f883bf.swift +359 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_Tab_NewLine_excl_quot_QUOT_num_and_287_more_88aef2.swift +2190 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_Unknown_QuirksMode_IgnoreCase_CaseSensitive.swift +122 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_a_b_c_d_tx_ty.swift +123 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_a_h_s_l.swift +85 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_a_h_s_v.swift +85 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_a_r_g_b.swift +85 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_activate_deactivate_background_foreground_close_attached_and_26_more_127a37.swift +448 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_activeType.swift +65 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_alert_confirm_prompt_login_action.swift +118 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_align_offset.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_android_ios_visionos_apple.swift +109 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_angle_colors.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_animations.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_animations_completion.swift +73 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_axis_value.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_backgroundColor_scale_translate_rotate_opacity_width_height_valueSource_duration_curve_forceLayer.swift +257 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_body.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_boundsChanged_sizeChanged.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_callback_thisArg_once.swift +112 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_collections_createUIDocumentInteractionControllerDelegate_getCurrentAppPath_getRootViewController_getVisibleViewController_getWindow_and_10_more_6713a9.swift +281 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_color.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_color_backgroundColor.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_color_offset.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_component_exports.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_component_exports_.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_connectionOptions.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_constructor_hasOwnProperty_isPrototypeOf_propertyIsEnumerable_toLocaleString_toString_and_21_more_e9ed9b.swift +331 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_content_statusCode_headers.swift +106 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_context_closeCallback_fullscreen_animated_stretched.swift +149 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_context_parent_name_elementName_templateItems_errorFormat_sourceTracker_xmlModule.swift +185 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_counters_timeline.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_create.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_createSelector_SelectorCore_SimpleSelector_InvalidSelector_UniversalSelector_TypeSelector_and_12_more_71e044.swift +315 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_curve.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_defaultValue_name_cssName_affectsLayout.swift +131 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_defaultValue_name_cssName_valueConverter.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_defaultValue_name_cssName_valueConverter_.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_deg_rad_grad_turn.swift +105 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_duration_damping.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_duration_repeatCount_delay_curve_propertyNameToAnimate_subPropertiesToAnimate_fromValue_toValue.swift +211 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_duration_spring.swift +90 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_edge_interaction.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_effectType_onCreate.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_effectType_targetView.swift +73 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_effectType_targetView_toGlassStyleFn.swift +110 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_empty_text_json_blob_arraybuffer.swift +108 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_enterFrom_exitTo.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_entry_isBackNavigation_navigationType.swift +115 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_entry_resolvedPage_navDepth_fragmentTag.swift +133 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_entry_resolvedPage_navDepth_fragmentTag_frameId.swift +162 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_enumerable_configurable_get_set.swift +123 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_enumerable_configurable_get_set_.swift +122 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_enumerable_configurable_get_set__.swift +122 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_android_ios_newValue_object.swift +147 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_data.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_action_index_removed_addedCount.swift +153 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_action_index_removed_addedCount_.swift +154 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_action_index_removed_addedCount__.swift +152 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_android_ios_error.swift +148 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_context_closeCallback.swift +133 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_context_isBackNavigation.swift +132 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_cssFile.swift +110 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_cssFile_.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_cssText.swift +110 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_data.swift +112 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_data_.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_error.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_count.swift +120 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +168 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios.swift +97 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android.swift +129 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_cssFile.swift +138 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_isBack_entry_fromEntry.swift +130 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_key_error.swift +128 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_key_image.swift +129 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_matches_media.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_newValue.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +104 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex_.swift +121 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_propertyName_value_oldValue.swift +147 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_text_ios.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_type_view_ios.swift +117 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_url_navigationType_error.swift +158 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_url_navigationType_error_.swift +160 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_viewController.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_view_context.swift +130 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window.swift +103 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_newValue.swift +123 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene.swift +105 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_.swift +105 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_shortcutItem_completionHandler.swift +157 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_shortcutItem_completionHandler_.swift +158 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_uiWindow_connectionOptions.swift +137 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_uiWindow_connectionOptions_.swift +137 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_urlContexts.swift +120 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_urlContexts_.swift +120 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_userActivity.swift +121 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_window_scene_userActivity_.swift +121 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_rootView.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_type.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_type_object.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_window_object.swift +103 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_eventType_position_prefix_namespace_elementName_attributes_data.swift +169 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_exists_isDirectory.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_f_s_t_a.swift +85 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_folder_path.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_fontFamily_fontSize_fontWeight_fontVariationSettings_isBold_isItalic.swift +130 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_fontStyle_fontVariant_fontWeight.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_h_s_l.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_h_s_v.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_headers_timestamp_headersSize_method_postData_url.swift +173 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_highlighted.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_horizontal_vertical.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_hour_minute.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_id_type.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_id_type_action.swift +108 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_id_type_percent.swift +108 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_import_type.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_inset_color_values.swift +87 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_inset_offsetX_offsetY_blurRadius_spreadRadius_color.swift +147 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_inset_offsetX_offsetY_blurRadius_spreadRadius_color_.swift +126 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_instance.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_instance_instanceModule.swift +97 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_instance_property.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_instance_property_.swift +72 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_interactiveBegan.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_interactiveBegan_interactiveCancelled.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_interactiveCancelled.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_interactive_pageStart_pageEnd_pageOut_pageReturn_instance_activeType.swift +165 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_inverse_type_features.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_ios.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_iosNotificationType.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_iosNotificationType_message.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_ios_.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_ios_scene.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_isMatch_getMatchOccurences_getMatchValue.swift +101 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_iterator_prototype_for_keyFor_hasInstance_isConcatSpreadable_and_19_more_91b5f3.swift +413 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_keepAspectRatio_autoScaleFactor.swift +73 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_key_createView.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_key_createView_.swift +97 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_launchData.swift +68 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_left_right.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_left_right_center_top_bottom.swift +115 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_lifecycle_timeline.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_line_column.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_location.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_location_length.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_m.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_maskPath_shadowPath.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_matches_media.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_measuredWidth_measuredHeight.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_message.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_method.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_method_postData.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_modifier_property_value.swift +87 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_moduleName.swift +65 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_moduleName_.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_moduleName_create_transition.swift +93 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_moduleName_transition.swift +76 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueChanged.swift +103 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueChanged_.swift +98 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueChanged__.swift +100 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueChanged___.swift +102 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueConverter.swift +96 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_affectsLayout_valueConverter_valueChanged.swift +115 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_defaultValue_valueConverter_valueChanged.swift +139 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_defaultValue_valueConverter_valueChanged_.swift +159 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueChanged.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueChanged_valueConverter.swift +130 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueChanged_valueConverter_.swift +134 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueConverter.swift +133 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_affectsLayout_valueConverter_.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_equalityComparer_valueChanged_valueConverter.swift +183 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_equalityComparer_valueConverter.swift +168 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_equalityComparer_valueConverter_.swift +169 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_equalityComparer_valueConverter_valueChanged.swift +181 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_valueConverter.swift +128 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_valueConverter_.swift +128 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_valueConverter__.swift +128 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_affectsLayout_valueConverter_valueChanged.swift +139 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_equalityComparer_valueChanged_valueConverter.swift +162 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_equalityComparer_valueConverter.swift +150 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter_.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter__.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter___.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_defaultValue_valueConverter_valueChanged.swift +121 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_equalityComparer_defaultValue_valueConverter.swift +129 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_equalityComparer_valueConverter.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter.swift +130 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter_.swift +133 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter__.swift +130 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter___.swift +131 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter____.swift +133 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_getter_converter_____.swift +131 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueChanged.swift +99 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueChanged_equalityComparer_valueConverter.swift +153 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueChanged_equalityComparer_valueConverter_.swift +132 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueChanged_valueConverter.swift +118 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueConverter.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueConverter_.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueConverter__.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_cssName_valueConverter_valueChanged.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue__.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue___.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_equalityComparer_valueConverter_valueChanged.swift +163 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueChanged_coerceValue_valueConverter.swift +144 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueChanged_valueConverter.swift +124 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter.swift +135 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter_.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter__.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter___.swift +135 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter____.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_affectsLayout_valueConverter_valueChanged.swift +122 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_coerceValue_valueChanged_valueConverter.swift +125 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_coerceValue_valueConverter.swift +116 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_coerceValue_valueConverter_.swift +115 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_coerceValue_valueChanged_valueConverter.swift +170 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_valueChanged.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_valueConverter.swift +116 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_valueConverter_.swift +139 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_equalityComparer_valueConverter__.swift +136 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged.swift +92 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_.swift +92 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_coerceValue_valueConverter.swift +126 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_equalityComparer_valueConverter.swift +146 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter.swift +107 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter_.swift +107 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter__.swift +108 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter___.swift +108 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter____.swift +128 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter_____.swift +108 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueChanged_valueConverter______.swift +126 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter.swift +98 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter_.swift +96 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter__.swift +97 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter___.swift +98 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter____.swift +100 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter_coerceValue.swift +115 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter_valueChanged.swift +107 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_defaultValue_valueConverter_valueChanged_.swift +107 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_duration.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_equalityComparer_valueConverter.swift +101 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_equalityComparer_valueConverter_.swift +100 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_equalityComparer_valueConverter__.swift +119 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_keyframes_mediaQueryString.swift +117 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged.swift +82 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_.swift +82 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged__.swift +84 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged___.swift +84 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged____.swift +82 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_____.swift +82 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged______.swift +82 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_______.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged________.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_________.swift +92 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged__________.swift +90 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_valueConverter.swift +101 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_valueConverter_.swift +119 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueChanged_valueConverter__.swift +101 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueConverter.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueConverter_.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_name_valueConverter__.swift +82 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_navigatingToEvent_navigatedToEvent_navigatingFromEvent_navigatedFromEvent.swift +116 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_normalState_selectedState.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_num_regexp_string_name_privateId_eof_and_71_more_93cbae.swift +688 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_object_eventName_propertyName_value_oldValue_origin.swift +154 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_object_eventName_scrollX_scrollY.swift +105 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_object_eventName_scrollX_scrollY_.swift +121 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_opacity_color_tapToClose_animation_ignoreShadeRestore.swift +131 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_orientation_systemAppearance.swift +100 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_orientation_systemAppearance_.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_page_toPage.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_page_toPage_.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_parent_name_items.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_path_name.swift +72 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_path_name_extension.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_pattern_flags.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_position_systemIcon.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_prefix_namespace_name.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_presented_presenting_independent.swift +98 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_propName_propValue.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value_.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value__.swift +96 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value___.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value____.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value_____.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value______.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value_______.swift +83 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_property_value________.swift +83 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_r_g_b.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_raw_cooked.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_raw_cooked_.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_raw_requestURL_toNativeImage_toNativeString.swift +114 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_raw_requestURL_toNativeImage_toNativeString_.swift +135 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_recognizer_target.swift +96 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_repeatX_repeatY_posX_posY.swift +93 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_requestTime_proxyStart_proxyEnd_dnsStart_dnsEnd_connectStart_and_9_more_3e958e.swift +248 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_result_text.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_result_userName_password.swift +102 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_right_left.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_row_col.swift +72 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_rules.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_rules_.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_safeArea_fullscreen_inWindow.swift +107 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_scale_translate_rotate.swift +100 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_scale_tx_ty.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_sceneWillConnect_sceneDidActivate_sceneWillResignActive_sceneWillEnterForeground_sceneDidEnterBackground_sceneDidDisconnect_and_1_more_1be9d4.swift +159 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_scene_uiWindow.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_shape_rule.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_sharedElements_presented_presenting.swift +115 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_sharedTransitionTag_zIndex.swift +100 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_showing.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_snap_endFrame_endCornerRadius_srcSharedView.swift +112 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_sourceProperty_expression_twoWay_source_defaultProperty.swift +120 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_sourceProperty_targetProperty_expression.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_sourceProperty_targetProperty_expression_twoWay_compiled.swift +145 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_spans.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value__.swift +89 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value___.swift +100 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value____.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_____.swift +88 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value______.swift +89 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_______.swift +89 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value________.swift +89 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_________.swift +89 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value__________.swift +89 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value___________.swift +87 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value____________.swift +90 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value_____________.swift +89 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_start_end_value______________.swift +90 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_status_headers.swift +83 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_status_statusText.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_status_statusText_headers_url.swift +110 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_targetProperty.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_targetProperty_sourceProperty.swift +73 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_target_backgroundColor_scale_translate_rotate_opacity_width_height_valueSource_duration_curve_forceLayer.swift +264 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_target_opacity_backgroundColor_translate_scale_height_width_rotate_duration_delay_iterations_curve.swift +252 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_target_property_value_duration_delay_iterations_curve.swift +152 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_target_property_value_duration_delay_iterations_curve_.swift +152 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_target_property_value_duration_delay_iterations_curve__.swift +153 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_target_property_value_duration_delay_iterations_curve___.swift +151 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_target_translate_scale_rotate_opacity_duration_curve.swift +165 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_tension_friction_mass_delay_velocity_animateOptions_animations_completion.swift +165 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_tension_friction_mass_velocity.swift +101 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_tension_friction_mass_velocity_delay.swift +118 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_tension_friction_mass_velocity_delay_animations_completion.swift +142 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_textColor_tintColor.swift +72 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_text_iosFont_color_backgroundColor_textDecoration_baselineOffset_index.swift +144 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_title_cancelButtonText.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_title_okButtonText_cancelButtonText.swift +96 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_title_okButtonText_cancelButtonText_inputType.swift +112 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_title_okButtonText_cancelButtonText_message.swift +112 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_title_okButtonText_message.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_title_section.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_toArrayBuffer_toString_toJSON_toImage_toFile.swift +142 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_toString_charAt_charCodeAt_concat_indexOf_lastIndexOf_and_44_more_fc25df.swift +481 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_topLeft_topRight_bottomLeft_bottomRight.swift +110 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_top_bottom.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_top_left_bottom_right.swift +109 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_top_right_bottom_left.swift +122 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_top_right_bottom_left_.swift +109 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_totalTime_count_currentStart_runCount.swift +110 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_touches_event.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_transitionContext.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_translateX_translateY_scaleX_scaleY_rotate_opacity.swift +118 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_translateX_translateY_scaleX_scaleY_rotate_opacity_duration_curve.swift +151 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_translate_rotate_scale.swift +102 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_action_value_namespace_ignoreCase.swift +152 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_action_value_namespace_ignoreCase_.swift +133 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_data.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_data_.swift +92 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_namespace.swift +102 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_prelude_block.swift +120 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_text.swift +104 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_name_text_components.swift +113 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_namespace.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_path.swift +72 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_prelude_block.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_property_value.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_quote_string_value.swift +101 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_selectors_declarations.swift +96 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_start_end.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_start_end_left_right.swift +127 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_start_end_name.swift +118 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_string.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_string_unit_value.swift +101 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_stylesheet.swift +83 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_text.swift +72 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_text_.swift +97 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_text__.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_text_associatedToken_values.swift +125 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_direction_object_eventName.swift +159 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_eventName_object_getPointerCount_getX_getY.swift +187 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_object_eventName.swift +152 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_object_eventName_state.swift +167 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_rotation_object_eventName_state.swift +182 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_scale_getFocusX_getFocusY_object_eventName_state.swift +194 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_type_view_ios_android_startX_startY_deltaX_deltaY_object_eventName_state.swift +201 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_uri_message_time.swift +108 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_url_method.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_url_source.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_url_source_.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_url_status_statusText_headers_mimeType_fromDiskCache_timing_headersSize.swift +201 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_value_unit.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_value_unit_.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_view_index.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_view_index_.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_view_isPresented_startFrame_snapshot_endFrame_startTransform_and_5_more_20e753.swift +234 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_view_options.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_view_options_.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_view_startFrame_endFrame_snapshot_startOpacity_endOpacity_propertiesToMatch_zIndex.swift +186 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_view_startFrame_endFrame_startOpacity_endOpacity_propertiesToMatch_imageSourceChangeListener.swift +181 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_view_type_animation.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_width_color.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_width_height.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_width_height_.swift +95 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_width_height_os_deviceType.swift +109 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_windowOpen_windowClose_primaryWindowChanged.swift +96 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_window_isPrimary.swift +80 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_window_isPrimary_data_ios.swift +118 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_xRadius_yRadius_maxRadius.swift +87 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y.swift +85 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_.swift +72 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y__.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y___.swift +72 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y____.swift +86 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_____.swift +77 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y______.swift +74 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_______.swift +89 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y________.swift +88 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_________.swift +77 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_width_height.swift +101 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_z.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_x_y_z_.swift +78 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_xmlns.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Core/Object_xs_ys_xt_yt_rx_ry_rz.swift +106 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.AndroidApplication.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.AndroidHelper.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.AnimationCurve.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.Application.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.CSSHelper.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.CSSType.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.Device.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.Dialogs.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.Enums.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.NativeWindowEvents.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.PseudoClassHandler.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.SceneEvents.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.WindowEvents.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export._resetRootView.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export._resolveAnimationCurve.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export._setResolver.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export._updateCharactersInRangeReplacementString.swift +23 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.action.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.addCss.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.addTaggedAdditionalCSS.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.addWeakEventListener.swift +22 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.alert.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.android.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.androidDynamicElevationOffsetProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.androidElevationProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.animationTimingFunctionConverter.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.autocapitalizationTypeProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.autocorrectProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundColorProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundImageProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundInternalProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundPositionProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundRepeatProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.backgroundSizeProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.booleanConverter.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderBottomColorProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderBottomLeftRadiusProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderBottomRightRadiusProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderBottomWidthProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderLeftColorProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderLeftWidthProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderRightColorProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderRightWidthProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderTopColorProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderTopLeftRadiusProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderTopRightRadiusProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.borderTopWidthProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.clipPathProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.colorProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.columnGapProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.confirm.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.cornerShapeProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.directionProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.discardedErrorEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.displayedEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.eachDescendant.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.editableProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.ensureA11yClasses.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.exitEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontFamilyProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontInternalProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontScaleChangedEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontScaleInternalProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontSizeProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontStyleProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontVariationSettingsProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fontWeightProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.foregroundEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fromObject.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.fromObjectRecursive.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getAncestor.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getAndroidAccessibilityManager.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getCssFileName.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getCurrentFontScale.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getCurrentPage.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getFileAccess.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getMainEntry.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getNativeApp.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getNativeApplication.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getResources.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getRootLayout.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getRootLayoutById.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getRootView.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getTransformedText.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.getViewById.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.hasLaunched.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.hasListeners.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.heightProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.hintProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.horizontalAlignmentProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.inBackground.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.initAccessibilityCssHelper.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.isAccessibilityServiceEnabled.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.isAndroid.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.isApple.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.isEmbedded.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.isIOS.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.isUserInteractionEnabledProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.isVisionOS.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.keyboardTypeProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.launchEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.layoutDirection.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.layoutDirectionChanged.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.layoutDirectionChangedEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.letterSpacingProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.lineHeightProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.loadAppCss.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.login.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.lowMemoryEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.makeParser.swift +22 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.makeValidator.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.marginBottomProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.marginLeftProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.marginRightProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.marginTopProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.maxHeightProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.maxLengthProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.maxWidthProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.minHeightProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.minWidthProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.notify.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.off.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.on.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.opacityProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.orientation.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.orientationChangedEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingBottomProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingInternalProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingLeftProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingRightProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.paddingTopProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.parseCSSShadow.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.parseCSSStroke.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.parseKeyframeDeclarations.swift +22 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.perspectiveProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.placeholderColorProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.platformNames.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profile.swift +22 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingDisable.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingDumpProfiles.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingEnable.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingIsRunning.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingResetProfiles.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingStart.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingStartCPU.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingStop.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingStopCPU.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.profilingUptime.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.prompt.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.querySelectorAll.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.removeTaggedAdditionalCSS.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.removeWeakEventListener.swift +22 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.resetRootView.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.resolveFileNameFromUrl.swift +23 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.resumeEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.returnKeyTypeProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.rotateProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.rotateXProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.rotateYProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.rowGapProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.run.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.sanitizeModuleName.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.scaleXProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.scaleYProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.sendAccessibilityEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.setActivityCallbacks.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.setAutoSystemAppearanceChanged.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.setCssFileName.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.setMaxRefreshRate.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.setNativeApp.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.setResources.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.suspendEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.suspended.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.systemAppearance.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.systemAppearanceChanged.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.systemAppearanceChangedEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.textAlignmentProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.textDecorationProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.textOverflowProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.textShadowProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.textStrokeProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.textTransformProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.timeConverter.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.translateXProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.translateYProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.uncaughtErrorEvent.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.unsetValue.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.updateAccessibilityProperties.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.updateCurrentHelperClasses.swift +21 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.updateTextTriggerProperty.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.verticalAlignmentProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.visibilityProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.whiteSpaceProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.widthProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Export.zIndexProperty.swift +18 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Modules.swift +17 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Namespace.Http.swift +23 -0
- package/kit-apple/Sources/NativeScriptKit/Core/__Namespace.Utils.swift +201 -0
- package/kit-apple/Sources/NativeScriptKit/Core/abortcontroller.abortsignal.swift +109 -0
- package/kit-apple/Sources/NativeScriptKit/Core/abortcontroller.index.swift +118 -0
- package/kit-apple/Sources/NativeScriptKit/Core/accessibility.accessibility-common.swift +572 -0
- package/kit-apple/Sources/NativeScriptKit/Core/accessibility.accessibility-properties.swift +258 -0
- package/kit-apple/Sources/NativeScriptKit/Core/accessibility.index.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application-settings.application-settings-common.swift +36 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application-settings.index.ios.swift +157 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +2095 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.application-interfaces.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.application-shims.swift +212 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +3854 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +224 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.helpers.ios.swift +57 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.index.ios.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/application.scene-delegate-bridge.swift +234 -0
- package/kit-apple/Sources/NativeScriptKit/Core/color.color-common.swift +756 -0
- package/kit-apple/Sources/NativeScriptKit/Core/color.color-types.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/color.color-utils.swift +388 -0
- package/kit-apple/Sources/NativeScriptKit/Core/color.index.ios.swift +100 -0
- package/kit-apple/Sources/NativeScriptKit/Core/color.known-colors.swift +520 -0
- package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +190 -0
- package/kit-apple/Sources/NativeScriptKit/Core/core-types.animation-types.swift +87 -0
- package/kit-apple/Sources/NativeScriptKit/Core/core-types.index.swift +361 -0
- package/kit-apple/Sources/NativeScriptKit/Core/core-types.validators.swift +62 -0
- package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +220 -0
- package/kit-apple/Sources/NativeScriptKit/Core/css-value.reworkcss-value.swift +280 -0
- package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1012 -0
- package/kit-apple/Sources/NativeScriptKit/Core/css.CSSNativeScript.swift +264 -0
- package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +971 -0
- package/kit-apple/Sources/NativeScriptKit/Core/css.system-classes.swift +120 -0
- package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +700 -0
- package/kit-apple/Sources/NativeScriptKit/Core/data.observable.index.swift +1166 -0
- package/kit-apple/Sources/NativeScriptKit/Core/data.virtual-array.index.swift +326 -0
- package/kit-apple/Sources/NativeScriptKit/Core/fetch.index.swift +1201 -0
- package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +1450 -0
- package/kit-apple/Sources/NativeScriptKit/Core/file-system.index.swift +1756 -0
- package/kit-apple/Sources/NativeScriptKit/Core/fps-meter.fps-native.ios.swift +227 -0
- package/kit-apple/Sources/NativeScriptKit/Core/fps-meter.index.swift +141 -0
- package/kit-apple/Sources/NativeScriptKit/Core/globals.global-utils.swift +252 -0
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-interfaces.swift +24 -0
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +59 -0
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +413 -0
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request.http-request-common.swift +57 -0
- package/kit-apple/Sources/NativeScriptKit/Core/http.http-request.index.ios.swift +101 -0
- package/kit-apple/Sources/NativeScriptKit/Core/http.index.swift +175 -0
- package/kit-apple/Sources/NativeScriptKit/Core/image-asset.image-asset-common.swift +285 -0
- package/kit-apple/Sources/NativeScriptKit/Core/image-asset.index.ios.swift +205 -0
- package/kit-apple/Sources/NativeScriptKit/Core/image-source.image-source-common.swift +40 -0
- package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +1130 -0
- package/kit-apple/Sources/NativeScriptKit/Core/js-libs.easysax.easysax.swift +1388 -0
- package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +30789 -0
- package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +3383 -0
- package/kit-apple/Sources/NativeScriptKit/Core/matrix.index.swift +151 -0
- package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +468 -0
- package/kit-apple/Sources/NativeScriptKit/Core/module-name-resolver.helpers.swift +57 -0
- package/kit-apple/Sources/NativeScriptKit/Core/module-name-resolver.index.swift +220 -0
- package/kit-apple/Sources/NativeScriptKit/Core/module-name-resolver.non-bundle-workflow-compat.swift +262 -0
- package/kit-apple/Sources/NativeScriptKit/Core/module-name-resolver.qualifier-matcher.index.swift +330 -0
- package/kit-apple/Sources/NativeScriptKit/Core/native-window.index.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window-common.swift +730 -0
- package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window-interfaces.swift +46 -0
- package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +521 -0
- package/kit-apple/Sources/NativeScriptKit/Core/native-window.window-base.swift +298 -0
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.index.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +668 -0
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +221 -0
- package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +62 -0
- package/kit-apple/Sources/NativeScriptKit/Core/platform.common.swift +25 -0
- package/kit-apple/Sources/NativeScriptKit/Core/platform.device.index.ios.swift +289 -0
- package/kit-apple/Sources/NativeScriptKit/Core/platform.index.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/platform.screen.index.ios.swift +217 -0
- package/kit-apple/Sources/NativeScriptKit/Core/profiling.index.swift +528 -0
- package/kit-apple/Sources/NativeScriptKit/Core/text.formatted-string.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/text.index.ios.swift +25 -0
- package/kit-apple/Sources/NativeScriptKit/Core/text.span.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/text.text-common.swift +309 -0
- package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +513 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.action-bar.action-bar-common.swift +1270 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.action-bar.index.ios.swift +1480 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.activity-indicator.activity-indicator-common.swift +81 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.activity-indicator.index.ios.swift +175 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.animation-common.swift +581 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.animation-shared.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.animation-types.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +2204 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.keyframe-animation.swift +1213 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.binding-builder.swift +318 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.component-builder.index.swift +387 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +2026 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.button.button-common.swift +75 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.button.index.ios.swift +614 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.content-view.index.swift +291 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.bindable-expressions.swift +770 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.bindable-resources.swift +30 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.bindable-types.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.expression-parser.swift +5297 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.bindable.index.swift +1376 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.control-state-change.index.ios.swift +197 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +3899 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.property-shared.swift +53 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +3522 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.utils.swift +32 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +3318 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +4347 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-helper.index.ios.swift +1417 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-helper.view-helper-common.swift +337 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-helper.view-helper-shared.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-interfaces.swift +272 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.core.weak-event-listener.index.swift +323 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.date-picker.date-picker-common.swift +335 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.date-picker.index.ios.swift +609 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.dialogs.dialogs-common.swift +486 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.dialogs.index.ios.swift +677 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.editable-text-base.editable-text-base-common.swift +378 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.editable-text-base.index.ios.swift +512 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.embedding.index.ios.swift +25 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.enums.enums.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.enums.index.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.fragment.ios.swift +26 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.fragment.transitions.types.swift +23 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +1526 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-constants.swift +21 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-helpers.swift +40 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-interfaces.swift +26 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-stack.swift +138 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +1794 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.gestures-common.swift +269 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.gestures-types.swift +77 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.index.ios.swift +1453 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.gestures.touch-manager.swift +451 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.html-view.html-view-common.swift +106 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.html-view.index.ios.swift +301 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image-cache.image-cache-common.swift +479 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image-cache.index.ios.swift +232 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image.image-common.swift +399 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image.index.ios.swift +499 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image.symbol-effects-common.swift +150 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.image.symbol-effects.ios.swift +148 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.label.index.ios.swift +483 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.absolute-layout.absolute-layout-common.swift +172 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.absolute-layout.index.ios.swift +189 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.dock-layout.dock-layout-common.swift +157 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.dock-layout.index.ios.swift +264 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.flexbox-layout-common.swift +1028 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +3238 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.grid-layout.grid-layout-common.swift +1014 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.grid-layout.index.ios.swift +2435 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.index.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.layout-base-common.swift +591 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.layout-base.ios.swift +135 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass-container.index.ios.swift +364 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass-container.liquid-glass-container-common.swift +49 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass.index.ios.swift +238 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass.liquid-glass-common.swift +34 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.index.ios.swift +347 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.root-layout-common.swift +964 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.root-layout-stack.swift +59 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.stack-layout.index.ios.swift +350 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.stack-layout.stack-layout-common.swift +72 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.wrap-layout.index.ios.swift +357 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.wrap-layout.wrap-layout-common.swift +188 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.list-picker.index.ios.swift +374 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.list-picker.list-picker-common.swift +252 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.list-view.index.ios.swift +2611 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.list-view.list-view-common.swift +950 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.page.events.swift +23 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +1340 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.page.page-common.swift +520 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.placeholder.index.swift +63 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.placeholder.placeholder-common.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.progress.index.ios.swift +173 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.progress.progress-common.swift +111 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.proxy-view-container.index.swift +497 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +535 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.scroll-view.index.ios.swift +699 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.scroll-view.scroll-view-common.swift +414 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.search-bar.index.ios.swift +609 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.search-bar.search-bar-common.swift +162 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.segmented-bar.index.ios.swift +470 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.segmented-bar.segmented-bar-common.swift +448 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.slider.index.ios.swift +593 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.slider.slider-common.swift +211 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +1459 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.split-view-common.swift +410 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background-common.swift +809 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2290 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.box-shadow.swift +138 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +198 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.converters.swift +105 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +493 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +4016 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-shadow.swift +48 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-stroke.swift +41 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-transform.swift +406 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-utils.swift +297 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +477 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-interfaces.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font.ios.swift +416 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.length-shared.swift +343 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.linear-gradient.swift +162 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-properties.swift +2524 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +3330 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +905 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.styling-profile.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.styling-shared.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.switch.index.ios.swift +508 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.switch.switch-common.swift +143 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.tab-view.index.ios.swift +2284 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.tab-view.tab-view-common.swift +985 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +801 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.index.ios.swift +1264 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.span.swift +476 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.text-base-common.swift +1046 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-field.index.ios.swift +912 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-field.text-field-common.swift +121 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.index.ios.swift +1030 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +138 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.time-picker.index.ios.swift +473 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.time-picker.time-picker-common.swift +536 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.fade-transition.ios.swift +265 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +159 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +635 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +1167 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +3673 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition.swift +492 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.slide-transition.ios.swift +328 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.utils.ios.swift +132 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.index.ios.swift +827 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.web-view-common.swift +206 -0
- package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.web-view-interfaces.swift +16 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.animation-helpers.swift +84 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.common.swift +278 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.constants.ios.swift +33 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +271 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.debug.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.index.ios.swift +205 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.layout-helper.index.ios.swift +131 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.layout-helper.layout-helper-common.swift +87 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.layout-helper.layout-helper-shared.swift +28 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.lazy.swift +39 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.macrotask-scheduler.swift +71 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.mainthread-helper.ios.swift +52 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.module-merge.swift +27 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.native-helper.ios.swift +734 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.number-utils.swift +79 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.platform-check.swift +25 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.shared.swift +84 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.types.swift +308 -0
- package/kit-apple/Sources/NativeScriptKit/Core/utils.utils-shared.swift +31 -0
- package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +1726 -0
- package/kit-apple/Sources/NativeScriptKit/Core/xml.index.swift +775 -0
- package/kit-apple/Sources/NativeScriptKit/CoreBridge.swift +388 -0
- package/kit-apple/Sources/NativeScriptKit/CoreConnectivity.swift +46 -0
- package/kit-apple/Sources/NativeScriptKit/CoreLifetimes.swift +15 -0
- package/kit-apple/Sources/NativeScriptKit/CorePackages.swift +59 -0
- package/kit-apple/Sources/NativeScriptKit/JS.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Modal.swift +65 -0
- package/kit-apple/Sources/NativeScriptKit/Probe.swift +97 -0
- package/kit-apple/Sources/NativeScriptKit/Regions.swift +291 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/AbsentModules.swift +64 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +1640 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/ArrayLike.swift +859 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/BigInt.swift +338 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/BuiltinValues.swift +45 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Collections.swift +609 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Date.swift +269 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +470 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/ES2023.swift +105 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Errors.swift +402 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Functions.swift +340 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Inspect.swift +758 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +42 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +728 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +898 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +874 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +588 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Native.swift +819 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/NativeStack.swift +66 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Number.swift +599 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Promise.swift +810 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +471 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Reactive.swift +34 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Record.swift +59 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/RegExp.swift +576 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/RegExpEngine.swift +1918 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Stack.swift +20 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/StringUTF16.swift +179 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +142 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Threads.swift +275 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Timers.swift +240 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/TypedArrays.swift +996 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/URI.swift +94 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +2061 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +97 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Weak.swift +135 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/WinterTC.swift +484 -0
- package/kit-apple/Sources/NativeScriptKit/Signals.swift +952 -0
- package/kit-apple/Sources/NativeScriptKit/UncaughtErrors.swift +37 -0
- package/package.json +94 -4
- package/verify/ui-driver/Host/App.swift +7 -0
- package/verify/ui-driver/Tests/Driver.swift +54 -0
- package/verify/ui-driver/project.yml +35 -0
|
@@ -0,0 +1,896 @@
|
|
|
1
|
+
// Placement and coercion in Swift: a value put into a slot, nullish reads, conditions.
|
|
2
|
+
import { heldLoss } from "../semantics/losses.js";
|
|
3
|
+
import ts from 'typescript';
|
|
4
|
+
import { convertedRead } from "../semantics/states/predicates.js";
|
|
5
|
+
import { place } from "../semantics/placement.js";
|
|
6
|
+
import { THROWING_CODE, escapingFunction, escapingParam, functionParts, hasTopLevelArrow, ident, isFunctionType, isNullish, isOptional, nullishType, numberLiteralBranch, numericLiteralOnly, optionalType, postfixChain, splitTopLevel, swiftString, unwrapFunction, RT, lenientReader } from "./syntax.js";
|
|
7
|
+
import { structural } from "../semantics/conversion.js";
|
|
8
|
+
import { heldOf, isKit, isNamed, isUntyped, parseNativeType, spelledType } from "../semantics/types.js";
|
|
9
|
+
import { isWriteTarget, notIterable } from "../semantics/ast.js";
|
|
10
|
+
import { holdsNil, notedField, resultShapeNamed } from "../semantics/shapes.js";
|
|
11
|
+
import { implementedInterfaces, literalKey, takesReceiver } from "../semantics/lang.js";
|
|
12
|
+
import { slotOf } from "../semantics/trust.js";
|
|
13
|
+
import { isCoreDeclaration } from "../program/core-facts.js";
|
|
14
|
+
import { isStatic } from "../semantics/throws.js";
|
|
15
|
+
import { typedCollection } from "./native/bridging.js";
|
|
16
|
+
import { isLibGlobal } from "../semantics/globals.js";
|
|
17
|
+
import { literalClassOf } from "../semantics/classes.js";
|
|
18
|
+
export const placementMethods = {
|
|
19
|
+
loweredReturn(e, slot) {
|
|
20
|
+
const own = this.typeOf(e).replace(/[?!]$/, ''), promise = `JSPromise<${slot.target}>`;
|
|
21
|
+
// The `try` marks the value: a return through a finally holds it in a block, which a `try` cannot mark.
|
|
22
|
+
if (!isKit(spelledType(own), 'JSPromise'))
|
|
23
|
+
return [this.marks.tryBefore(this.tryPrefix(e), place(this.placement, e, slot)), false];
|
|
24
|
+
// A promise of another type than the function's (`Promise<[Status, boolean]>` returned where `Promise<any>` is): its value converted.
|
|
25
|
+
const adopt = (code) => (own !== promise ? this.convert(code, own, promise) : code);
|
|
26
|
+
const read = this.typeOf(e);
|
|
27
|
+
if (!read.endsWith('?') && !(this.lenient && this.loose(e)))
|
|
28
|
+
return [this.marks.tryBefore(this.tryPrefix(e), adopt(this.expr(e))), true];
|
|
29
|
+
// Lenient code's promise may be missing (a function that falls off its end): the async function then gives undefined.
|
|
30
|
+
const adopted = adopt('__p');
|
|
31
|
+
const mapped = `(${this.expr(e)} as ${own}?).map { (__p: ${own}) -> ${promise} in ${adopted} } ?? ${promise}.resolve(${this.asyncUndefined(slot.target)})`;
|
|
32
|
+
return [this.marks.tryBefore(this.tryPrefix(e), THROWING_CODE.test(adopted) ? this.marks.tryCode(mapped) : mapped), true];
|
|
33
|
+
},
|
|
34
|
+
/** What an async function of result `t` resolves with where it gives undefined, as `asyncReturn` writes a bare `return`. */
|
|
35
|
+
asyncUndefined(t) {
|
|
36
|
+
if (t === 'Void')
|
|
37
|
+
return '()';
|
|
38
|
+
if (isOptional(t) || t.endsWith('!') || isUntyped(spelledType(t)))
|
|
39
|
+
return 'nil';
|
|
40
|
+
return this.zero(t) ?? (/^\(.*\)$/.test(t) && !/->/.test(t) ? `{ () -> ${t} in fatalError("undefined for ${t}") }()` : 'nil');
|
|
41
|
+
},
|
|
42
|
+
/** A returned value's reads before the shared placement front, as Swift reads a value that may be undefined. */
|
|
43
|
+
resultRead(e, slot) {
|
|
44
|
+
const ret = slot.target;
|
|
45
|
+
if (slot.lowered)
|
|
46
|
+
return null;
|
|
47
|
+
// Code checked without strictNullChecks returns undefined from a function of a value type: read as the type's zero, as its fields are.
|
|
48
|
+
if (ret.endsWith('?') && !isUntyped(spelledType(ret))) {
|
|
49
|
+
const maybe = this.maybeUndefined(e);
|
|
50
|
+
if (maybe)
|
|
51
|
+
return maybe;
|
|
52
|
+
}
|
|
53
|
+
// A library call that may give undefined (`map.get(key)`) returned where a value type is declared: as such a slot reads undefined.
|
|
54
|
+
if (!isOptional(ret) && !isUntyped(spelledType(ret)) && ret !== 'Void' && ts.isCallExpression(e) && !(slot.fn && this.states.nullishHeld(slot.fn))) {
|
|
55
|
+
const maybe = this.maybeUndefined(e);
|
|
56
|
+
if (maybe && /^JSMatch[?!]?$/.test(this.typeOf(e)) && /^JSArray<String>[?!]?$/.test(ret))
|
|
57
|
+
return null;
|
|
58
|
+
if (maybe) {
|
|
59
|
+
const value = this.undefinedAs(maybe, ret, this.calledType(e));
|
|
60
|
+
// Lenient code's closure typed to give an object, giving undefined: a TypeError, Swift's closure giving none.
|
|
61
|
+
return this.lenient && !this.looseTolerated(e) ? this.presentCode(value, ret) : value;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
},
|
|
66
|
+
/** An expression body's cell, as Swift writes it: its value placed by the slot's type alone, without `resultRead`. */
|
|
67
|
+
bodyReturned(cell, slot) {
|
|
68
|
+
const i = this.indent;
|
|
69
|
+
switch (cell.step) {
|
|
70
|
+
case 'empty':
|
|
71
|
+
return '';
|
|
72
|
+
case 'drop': {
|
|
73
|
+
const logical = this.voidLogical(cell.e);
|
|
74
|
+
return logical ? i + logical : i + this.tryPrefix(cell.e) + this.exprStatement(cell.e);
|
|
75
|
+
}
|
|
76
|
+
case 'voidCall':
|
|
77
|
+
return `${i}${this.tryPrefix(cell.e)}${this.exprStatement(cell.e)}\n${i}return ${cell.empty}`;
|
|
78
|
+
case 'never':
|
|
79
|
+
throw new Error('unreachable: an expression body never ends the function by its call');
|
|
80
|
+
}
|
|
81
|
+
return cell.code !== undefined ? `${i}return ${cell.code}` : `${i}return ${this.marks.tryBefore(this.tryPrefix(cell.e), this.coerce(cell.e, slot.target))}`;
|
|
82
|
+
},
|
|
83
|
+
/** A read of a signal whose value is held as `JSNullish<T>` (`this.note()`). */
|
|
84
|
+
signalNullishRead(e) {
|
|
85
|
+
const d = this.states.nullishRead(e);
|
|
86
|
+
return !!d && !ts.isFunctionLike(d) && /^Signal<JSNullish</.test(this.typeOf(d.name));
|
|
87
|
+
},
|
|
88
|
+
/** A `nullishHeld` variable's, parameter's or function result's `JSNullish<T>`. */
|
|
89
|
+
nullishSlotType(d) {
|
|
90
|
+
const signal = /^Signal<(JSNullish<.*>)>$/.exec(ts.isPropertyDeclaration(d) || ts.isPropertySignature(d) || ts.isParameter(d) || ts.isVariableDeclaration(d) ? this.typeOf(d.name) : '');
|
|
91
|
+
if (signal)
|
|
92
|
+
return signal[1];
|
|
93
|
+
if (ts.isPropertyDeclaration(d) || ts.isPropertySignature(d))
|
|
94
|
+
return nullishType(this.typeOf(d.name));
|
|
95
|
+
if (ts.isVariableDeclaration(d))
|
|
96
|
+
return this.typeOf(d.name);
|
|
97
|
+
return ts.isParameter(d) ? nullishType(this.typeOf(d.name)) : this.returnTypeOf(d);
|
|
98
|
+
},
|
|
99
|
+
/** Whether a `nullishField` read is read as its `T` (`present`, which throws): a member read on it, or its value placed in a slot holding neither null nor undefined. */
|
|
100
|
+
nullishPresent(e) {
|
|
101
|
+
const use = this.states.nullishFieldUse(e);
|
|
102
|
+
if (use !== 'value')
|
|
103
|
+
return use === 'member';
|
|
104
|
+
const slot = slotOf(e, this.checker);
|
|
105
|
+
if (!slot || this.states.nullishHeld(slot))
|
|
106
|
+
return false;
|
|
107
|
+
// A library's parameter (`indexOf(searchElement: T)`) takes the type its call instantiates.
|
|
108
|
+
const contextual = slot.getSourceFile().isDeclarationFile ? this.checker.getContextualType(e) : undefined;
|
|
109
|
+
const t = contextual ? this.type(contextual, e) : ts.isFunctionLike(slot) ? this.returnTypeOf(slot) : ts.isIdentifier(slot.name ?? slot) ? this.typeOf(slot.name) : 'Any?';
|
|
110
|
+
return !/[?!]$/.test(t);
|
|
111
|
+
},
|
|
112
|
+
/** A `nullishRead` value as its `JSNullish<T>`. */
|
|
113
|
+
nullishCode(e) {
|
|
114
|
+
if (!ts.isCallExpression(e) && !ts.isPropertyAccessExpression(e))
|
|
115
|
+
return this.refName(e);
|
|
116
|
+
this.nullishCalls.add(e);
|
|
117
|
+
try {
|
|
118
|
+
return this.expr(e);
|
|
119
|
+
}
|
|
120
|
+
finally {
|
|
121
|
+
this.nullishCalls.delete(e);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
/** An app generic class's instance where the same class with an `any` type argument is wanted: Swift's generic classes are invariant. */
|
|
125
|
+
checkAnyArgument(e, target) {
|
|
126
|
+
const want = /^(\w+)<(.+)>[?!]?$/.exec(target);
|
|
127
|
+
if (!this.ledger.genericsReified || this.library || !want || !/\bAny\?/.test(want[2]))
|
|
128
|
+
return;
|
|
129
|
+
const have = /^(\w+)<(.+)>[?!]?$/.exec(this.typeOf(e));
|
|
130
|
+
if (!have || have[1] !== want[1] || have[2] === want[2])
|
|
131
|
+
return;
|
|
132
|
+
const cls = this.checker.getNonNullableType(this.checker.getTypeAtLocation(e)).getSymbol()?.valueDeclaration;
|
|
133
|
+
if (!cls || !ts.isClassLike(cls) || !cls.typeParameters?.length || cls.getSourceFile().isDeclarationFile)
|
|
134
|
+
return;
|
|
135
|
+
throw this.limit(e, 'generic-any-argument', `an app generic class's instance held with \`any\` as its type argument (${have[0]} as ${target})`);
|
|
136
|
+
},
|
|
137
|
+
/** A generic class's instance given where its generic interface is wanted, which `fieldByOwnParameter` keeps it from conforming to. */
|
|
138
|
+
checkFieldsMet(e, target) {
|
|
139
|
+
const want = target.replace(/[?!]$/, '');
|
|
140
|
+
if (!this.ledger.genericsReified || this.library || !this.protocols.has(want))
|
|
141
|
+
return;
|
|
142
|
+
const cls = this.checker.getTypeAtLocation(e).getSymbol()?.valueDeclaration;
|
|
143
|
+
if (!cls || !ts.isClassLike(cls) || !cls.typeParameters?.length || cls.getSourceFile().isDeclarationFile)
|
|
144
|
+
return;
|
|
145
|
+
for (const i of implementedInterfaces(this.checker, cls)) {
|
|
146
|
+
const iface = this.checker.getTypeAtLocation(i).getSymbol()?.declarations?.find(ts.isInterfaceDeclaration);
|
|
147
|
+
if (iface && this.topName(iface, iface.name.text) === want && iface.members.some((m) => this.fieldByOwnParameter(cls, m))) {
|
|
148
|
+
throw this.limit(e, 'generic-field-overload', `a generic class whose field typed by its type parameter meets a generic interface's field, held as the interface (${want})`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
/** `nullableEntry`'s read: `jsNulledEntry` of the element or Map value `code` reads, the field by its key, or a static by its written flag. */
|
|
153
|
+
nulledEntry(read, code) {
|
|
154
|
+
if (read.kind === 'static') {
|
|
155
|
+
const owner = this.expr(read.read.expression);
|
|
156
|
+
return `(${owner}.${read.flag} ? ${RT.jsNulled}(${owner}.${ident(read.name)}) : nil)`;
|
|
157
|
+
}
|
|
158
|
+
if (read.kind === 'field') {
|
|
159
|
+
const base = read.read.expression, key = `[jsKey: ${swiftString(read.name)}]`;
|
|
160
|
+
if (this.isAny(base))
|
|
161
|
+
return `${ts.isOptionalChain(read.read) ? RT.jsGetIfPresent : RT.jsGet}(${this.expr(base)}, ${swiftString(read.name)})`;
|
|
162
|
+
return read.read.questionDotToken ? `(${this.expr(base)} as ${optionalType(this.typeOf(base).replace(/[?!]$/, ''))})?${key}` : `${this.receiver(base, read.name) ?? this.expr(base)}${key}`;
|
|
163
|
+
}
|
|
164
|
+
const text = code();
|
|
165
|
+
if (read.kind === 'element') {
|
|
166
|
+
const element = this.marks.boxedElement(text);
|
|
167
|
+
return element ? `${RT.jsNulledEntry}(${element})` : null;
|
|
168
|
+
}
|
|
169
|
+
if (!this.marks.mapEntry(text))
|
|
170
|
+
return null;
|
|
171
|
+
const inner = this.marks.afterTry(text);
|
|
172
|
+
return inner !== null ? this.marks.tryCode(`${RT.jsNulledEntry}(${inner})`) : `${RT.jsNulledEntry}(${text})`;
|
|
173
|
+
},
|
|
174
|
+
/** `nullishShapeField`'s field: one of a shape or interface object class whose Swift type is optional. */
|
|
175
|
+
optionalShapeField(e) {
|
|
176
|
+
const held = this.typeOf(e.expression).replace(/[?!]$/, '');
|
|
177
|
+
const shape = this.shapes.named(held);
|
|
178
|
+
if (!shape) {
|
|
179
|
+
// An interface's object class, whose fields are its property signatures.
|
|
180
|
+
const d = this.checker.getSymbolAtLocation(e.name)?.valueDeclaration;
|
|
181
|
+
if (!d || !ts.isPropertySignature(d) || !ts.isInterfaceDeclaration(d.parent) || d.parent.name.text !== held || !this.interfaces.has(held) || this.protocols.has(held))
|
|
182
|
+
return null;
|
|
183
|
+
const t = this.typeOf(d);
|
|
184
|
+
return (d.questionToken || holdsNil(heldOf(spelledType(t)))) && heldOf(spelledType(t)) !== 'any' ? e.name.text : null;
|
|
185
|
+
}
|
|
186
|
+
const f = shape.fields.find((x) => x.name === e.name.text);
|
|
187
|
+
return f && heldOf(spelledType(f.type)) === 'optional' && !shape.fields.some((x) => x.symbol || x.accessor) ? f.name : null;
|
|
188
|
+
},
|
|
189
|
+
coerceTyped(e, target) {
|
|
190
|
+
const stored = this.storedLiterals.get(e);
|
|
191
|
+
if (stored && (isUntyped(spelledType(target)) || target.replace(/[?!]$/, '') === stored.type))
|
|
192
|
+
return stored.code;
|
|
193
|
+
const awaited = this.awaited(e);
|
|
194
|
+
if (awaited && (isUntyped(spelledType(target)) || awaited.target === target))
|
|
195
|
+
return isUntyped(spelledType(target)) ? this.marks.castCode(awaited.raw, 'Any', 'as') : awaited.raw;
|
|
196
|
+
// A non-strict app's optional member, held optional, placed where its string, number or boolean must be: undefined read as that type.
|
|
197
|
+
const member = ts.skipOuterExpressions(e, ts.OuterExpressionKinds.Parentheses);
|
|
198
|
+
if (ts.isPropertyAccessExpression(member) && target === this.typeOf(member) && this.lenientOptionalMember(member) && !convertedRead(member)) {
|
|
199
|
+
return this.undefinedAs(this.property(member), target, optionalType(target));
|
|
200
|
+
}
|
|
201
|
+
if (isUntyped(spelledType(target))) {
|
|
202
|
+
const chain = this.chainRead(e);
|
|
203
|
+
if (chain)
|
|
204
|
+
return this.marks.castCode(chain, 'Any', 'as');
|
|
205
|
+
if (ts.isPropertyAccessExpression(member) && !isWriteTarget(member) && !member.questionDotToken) {
|
|
206
|
+
const sym = this.checker.getSymbolAtLocation(member.name);
|
|
207
|
+
if (sym && this.states.shapeFieldOptional(sym) && (['String', 'Double', 'Bool'].includes(this.typeOf(member)) || this.states.unsetMember(sym.valueDeclaration ?? sym.declarations?.[0])))
|
|
208
|
+
return `(${this.maybeUndefined(member) ?? this.expr(member)} as Any?)`;
|
|
209
|
+
}
|
|
210
|
+
if (ts.isPropertyAccessExpression(e) && (notedField(this.states, e) || this.absentKeyField(e)) && !isWriteTarget(e)) {
|
|
211
|
+
if (this.isAny(e.expression))
|
|
212
|
+
return `${ts.isOptionalChain(e) ? RT.jsGetIfPresent : RT.jsGet}(${this.expr(e.expression)}, ${swiftString(e.name.text)})`;
|
|
213
|
+
const recv = ts.isOptionalChain(e) ? `(${this.expr(e.expression)} as ${optionalType(this.typeOf(e.expression).replace(/[?!]$/, ''))})?` : (this.receiver(e.expression, e.name.text) ?? this.expr(e.expression));
|
|
214
|
+
return `${recv}[jsKey: ${swiftString(e.name.text)}]`;
|
|
215
|
+
}
|
|
216
|
+
const asserted = this.assertedUntyped(e);
|
|
217
|
+
if (asserted && this.isAny(asserted.expression))
|
|
218
|
+
return this.expr(asserted.expression);
|
|
219
|
+
}
|
|
220
|
+
else if (target.endsWith('?') && optionalType(this.typeOf(e)) === target) {
|
|
221
|
+
const chain = this.chainRead(e, true);
|
|
222
|
+
if (chain)
|
|
223
|
+
return chain;
|
|
224
|
+
const asserted = this.assertedUntyped(e);
|
|
225
|
+
if (asserted)
|
|
226
|
+
return this.assertedOptional(asserted);
|
|
227
|
+
const nonNull = ts.skipOuterExpressions(e, ts.OuterExpressionKinds.Parentheses);
|
|
228
|
+
if (ts.isNonNullExpression(nonNull) && this.typeOf(nonNull.expression) === target)
|
|
229
|
+
return this.expr(nonNull.expression);
|
|
230
|
+
}
|
|
231
|
+
// A conditional's branches each placed in a shape slot: a class's object is read into the shape by itself, and
|
|
232
|
+
// neither branch is held untyped on the way.
|
|
233
|
+
const branched = ts.skipParentheses(e), shape = target.replace(/[?!]$/, '');
|
|
234
|
+
if (ts.isConditionalExpression(branched) && this.isObjectShape(shape) && [branched.whenTrue, branched.whenFalse].some((x) => this.typeOf(x).replace(/[?!]$/, '') !== shape)) {
|
|
235
|
+
return this.ternary(branched, target, (x) => this.coerce(x, target));
|
|
236
|
+
}
|
|
237
|
+
// A choice an optional element takes: each branch as the element takes it, an undefined staying undefined.
|
|
238
|
+
if (ts.isConditionalExpression(branched) && isOptional(target) && !isUntyped(spelledType(target)) && !isOptional(this.typeOf(branched)) && this.states.optionalElementValue(branched)) {
|
|
239
|
+
return this.ternary(branched, target, (x) => this.coerce(x, target));
|
|
240
|
+
}
|
|
241
|
+
// `x as never` (a value the checker is told to take anywhere): the value, as the slot takes it;
|
|
242
|
+
// a number where the slot is a string (`ret.format = parseVertexFormat(ret.format) as never`) converted as script reads it there.
|
|
243
|
+
if (ts.isAsExpression(e) && e.type.kind === ts.SyntaxKind.NeverKeyword) {
|
|
244
|
+
const inner = this.typeOf(e.expression).replace(/[?!]$/, ''), want = target.replace(/[?!]$/, '');
|
|
245
|
+
if (['String', 'Double', 'Bool'].includes(want) && ['String', 'Double', 'Bool'].includes(inner) && inner !== want)
|
|
246
|
+
return `${lenientReader(want)}(${this.expr(e.expression)} as Any?)`;
|
|
247
|
+
return this.coerce(e.expression, target);
|
|
248
|
+
}
|
|
249
|
+
// Lenient code's `let cell;` is untyped, as its own build reads it: the slot's type is read from the value, whatever class the checker narrowed it to.
|
|
250
|
+
if (this.lenient && ts.isIdentifier(e) && !isWriteTarget(e) && !isUntyped(spelledType(target))) {
|
|
251
|
+
const d = this.resolve(e)?.valueDeclaration;
|
|
252
|
+
if (d && ts.isVariableDeclaration(d) && !d.type && !d.initializer && isUntyped(spelledType(this.declaredTypeOf(e))) && this.typeOf(e) !== target) {
|
|
253
|
+
const read = this.fromAny(this.refName(e), target);
|
|
254
|
+
return this.nullableRef(target) !== target && !this.looseTolerated(e) ? this.presentCode(read, target) : read;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
const saved = [this.optionalSlot, this.presentFunction];
|
|
258
|
+
this.optionalSlot = this.lenient && this.looseTolerated(e) && !this.presentSlot;
|
|
259
|
+
this.presentSlot = false;
|
|
260
|
+
this.presentFunction = this.declaredFunction(e) ? e : null;
|
|
261
|
+
let code;
|
|
262
|
+
try {
|
|
263
|
+
code = this.keptOptional(this.coerced(e, target), target);
|
|
264
|
+
}
|
|
265
|
+
finally {
|
|
266
|
+
[this.optionalSlot, this.presentFunction] = saved;
|
|
267
|
+
}
|
|
268
|
+
return this.lenient && this.nullableRef(target) !== target && !this.looseTolerated(e) ? this.presentCode(code, target) : code;
|
|
269
|
+
},
|
|
270
|
+
/**
|
|
271
|
+
* Lenient code: a value converted to an object type (`jsImplicit(x as? T)`, a function cell's `implicit`) where Swift
|
|
272
|
+
* needs it present: the checked form, which throws JavaScript's TypeError where it is missing or of another class.
|
|
273
|
+
*/
|
|
274
|
+
presentCode(code, type) {
|
|
275
|
+
const inner = this.marks.afterTry(code);
|
|
276
|
+
return this.presentValue(inner !== null ? this.marks.tried(inner) : this.marks.valued(code), type).code;
|
|
277
|
+
},
|
|
278
|
+
presentValue(v, type) {
|
|
279
|
+
if (v.mark?.op === 'try') {
|
|
280
|
+
const present = this.presentValue(v.mark.of, type);
|
|
281
|
+
return present.code === v.mark.of.code ? v : this.marks.tried(present.code);
|
|
282
|
+
}
|
|
283
|
+
return this.marks.valued(this.presentUnmarked(v.code));
|
|
284
|
+
},
|
|
285
|
+
presentUnmarked(code) {
|
|
286
|
+
const c = this.marks.markOf(code);
|
|
287
|
+
let now = code;
|
|
288
|
+
if (c?.op === 'cast' && c.implicit && c.spelled) {
|
|
289
|
+
if (c.optional && !c.up && /^(?:[\w.]+|\[[^\[\]]*\])$/.test(c.spelled))
|
|
290
|
+
now = `(${RT.jsCastPresent}(${c.of.code}) as ${c.spelled})`;
|
|
291
|
+
else if (c.up && /^[\w.]+$/.test(c.spelled))
|
|
292
|
+
now = this.marks.helper('jsObjectRequired', `${c.of.code} as ${c.spelled}?`);
|
|
293
|
+
else
|
|
294
|
+
now = this.marks.helper('jsObjectRequired', this.marks.implicitInner(code));
|
|
295
|
+
}
|
|
296
|
+
else if (c?.op === 'implicit')
|
|
297
|
+
now = c.cell ? `${c.cell}.present(${code})` : this.marks.helper('jsObjectRequired', c.of.code);
|
|
298
|
+
else if (c?.op === 'helper' && c.name === 'jsForeign')
|
|
299
|
+
now = `${RT.jsForeignPresent}(${c.of.code}${c.rest})`;
|
|
300
|
+
else if (c?.op === 'helper' && c.name === 'jsArrayOrNil')
|
|
301
|
+
now = this.marks.helper('jsObjectRequired', code);
|
|
302
|
+
return now;
|
|
303
|
+
},
|
|
304
|
+
/** An optional the read unwraps (a native property TypeScript declares non-null), kept optional where one is held. */
|
|
305
|
+
keptOptional(code, held) {
|
|
306
|
+
if (!this.lenient || !(isOptional(held) || held.endsWith('!')) || isUntyped(spelledType(held)))
|
|
307
|
+
return code;
|
|
308
|
+
const c = this.marks.markOf(code), unwrap = c?.op === 'try' ? c.of.mark : c;
|
|
309
|
+
// A chain of reads and calls (`try jsUnwrap(app, "getRootView").getRootView()!`): its last unwrap is the whole value's.
|
|
310
|
+
return unwrap?.op !== 'unwrap' || !postfixChain(unwrap.of.code) ? code : c?.op === 'try' ? this.marks.tryCode(unwrap.of.code) : unwrap.of.code;
|
|
311
|
+
},
|
|
312
|
+
coerced(e, target) {
|
|
313
|
+
if (this.isComputedProperty(e) && /^Signal<.*>[?!]?$/.test(target)) {
|
|
314
|
+
const inner = target.replace(/[?!]$/, '').slice(7, -1);
|
|
315
|
+
return `Signal<${inner}>(computing: { ${this.marks.tryBefore(this.tryPrefix(e), this.coerce(e, inner))} })`;
|
|
316
|
+
}
|
|
317
|
+
// An either-class value (NativeAPI.either) where one of its classes is taken: the object as it.
|
|
318
|
+
const either = /^NSObject[?!]?$/.test(this.typeOf(e)) ? this.native.either(this.checker.getTypeAtLocation(e)) : null;
|
|
319
|
+
const one = target.replace(/[?!]$/, '');
|
|
320
|
+
if (either && one !== 'NSObject' && either.some((c) => c.cls.swift === one)) {
|
|
321
|
+
const code = this.expr(e);
|
|
322
|
+
// Lenient code's narrowed value is cast already, optional as it holds it (see `narrowCast`).
|
|
323
|
+
if (this.lenient && this.marks.alreadyAs(code, one))
|
|
324
|
+
return code;
|
|
325
|
+
return this.marks.castCode(code, one, isOptional(target) ? 'as?' : 'as!');
|
|
326
|
+
}
|
|
327
|
+
// A match where an array of strings is wanted (`return s.match(/x/g)` declared `string[]`).
|
|
328
|
+
if (/^JSArray<String>[?!]?$/.test(target) && /^JSMatch[?!]?$/.test(this.typeOf(e)))
|
|
329
|
+
return this.convert(this.expr(e), 'JSMatch?', target);
|
|
330
|
+
// A member of an untyped object where any value goes: the value as it is, undefined staying undefined
|
|
331
|
+
// (`{ iterations: definition.iterations }`), not converted to the number or string TypeScript declares.
|
|
332
|
+
if (isUntyped(spelledType(target)) && this.lenient) {
|
|
333
|
+
let read = e;
|
|
334
|
+
while (ts.isParenthesizedExpression(read))
|
|
335
|
+
read = read.expression;
|
|
336
|
+
if (ts.isPropertyAccessExpression(read) && !read.questionDotToken && ['Double', 'String', 'Bool'].includes(this.typeOf(read))) {
|
|
337
|
+
const code = this.expr(read);
|
|
338
|
+
const raw = this.marks.lenientGet(code);
|
|
339
|
+
if (raw)
|
|
340
|
+
return raw.mark?.op === 'try' ? `(${raw.code})` : raw.code;
|
|
341
|
+
// A number member declared optional, which a typed object holds as NaN while unset: undefined.
|
|
342
|
+
if (this.typeOf(read) === 'Double' && this.optionalMember(read))
|
|
343
|
+
return `{ (__n: Double) -> Any? in __n.isNaN ? nil : __n }(${code})`;
|
|
344
|
+
}
|
|
345
|
+
const raw = this.untypedMemberValue(read);
|
|
346
|
+
if (raw)
|
|
347
|
+
return raw;
|
|
348
|
+
}
|
|
349
|
+
// A weak reference's target (`weakRef.get()`, typed present) where a value must be: a TypeError's where it is gone.
|
|
350
|
+
{
|
|
351
|
+
let b = e;
|
|
352
|
+
while (ts.isParenthesizedExpression(b))
|
|
353
|
+
b = b.expression;
|
|
354
|
+
if (ts.isCallExpression(b) && ts.isPropertyAccessExpression(b.expression) && ['get', 'deref'].includes(b.expression.name.text) && !b.expression.questionDotToken && isKit(spelledType(this.typeOf(b.expression.expression).replace(/[?!]$/, '')), 'JSWeakRef') && !/[?!]$/.test(target) && !isUntyped(spelledType(target)) && !this.typeOf(b).endsWith('?'))
|
|
355
|
+
return this.marks.unwrappedCode(this.expr(e));
|
|
356
|
+
}
|
|
357
|
+
// A Promise executor's resolve passed on as a function: a function of the promise's value type.
|
|
358
|
+
const resolvers = ts.isIdentifier(e) ? this.resolvers.get(this.resolve(e)) : undefined;
|
|
359
|
+
if (resolvers && (isUntyped(spelledType(target)) || functionParts(target.replace(/^\((.*)\)[?!]$/, '$1')))) {
|
|
360
|
+
const own = `(${resolvers.type === 'Void' ? '' : resolvers.type}) throws -> Void`;
|
|
361
|
+
const fn = resolvers.type === 'Void' ? `{ ${resolvers.name}.resolve() }` : this.expr(e);
|
|
362
|
+
return isUntyped(spelledType(target)) ? this.boxFunction(fn, own) : this.convert(fn, own, target);
|
|
363
|
+
}
|
|
364
|
+
// A value declared `T | undefined` where a `T` goes (`scrollEnabled = this._scrollWasEnabled`): undefined reads as it converts.
|
|
365
|
+
if ((target === 'Bool' || target === 'String' || target === 'Double') && this.typeOf(e) === `${target}?` && this.holdsUndefined(e)) {
|
|
366
|
+
const field = this.states.placedField(e);
|
|
367
|
+
return field ? this.marks.tryCode(`${RT.jsRequired}(${this.expr(e)}, ${swiftString(field.name)})`) : this.undefinedAs(this.expr(e), target);
|
|
368
|
+
}
|
|
369
|
+
// A `lenientNullField` read where a string, number or boolean goes: its null as lenient code places null there.
|
|
370
|
+
if ((target === 'Bool' || target === 'String' || target === 'Double') && this.typeOf(e) === `${target}?` && this.states.lenientNullField(ts.skipOuterExpressions(e)))
|
|
371
|
+
return `(${this.expr(e)} ?? ${this.zero(target)})`;
|
|
372
|
+
const inner = ts.isParenthesizedExpression(e) ? ts.skipOuterExpressions(e, ts.OuterExpressionKinds.Parentheses) : null;
|
|
373
|
+
if (inner && (target === 'Bool' || target === 'String' || target === 'Double') && this.typeOf(inner) === `${target}?` && this.holdsUndefined(inner)) {
|
|
374
|
+
const field = this.states.placedField(inner);
|
|
375
|
+
if (field)
|
|
376
|
+
return this.marks.tryCode(`${RT.jsRequired}(${this.expr(inner)}, ${swiftString(field.name)})`);
|
|
377
|
+
}
|
|
378
|
+
// An iterable where the type names only its iteration: the kit's iterable of it.
|
|
379
|
+
const iterableSlot = /^JS(Async)?Iterable<.*>\??$/.exec(target);
|
|
380
|
+
if (iterableSlot && !/^JS(Async)?(Iterable|Iterator|Generator)</.test(this.typeOf(e)))
|
|
381
|
+
return `${iterableSlot[1] ? RT.jsAsyncIterable : RT.jsIterable}(${this.expr(e)}${!iterableSlot[1] && isUntyped(spelledType(this.typeOf(e))) ? `, ${swiftString(notIterable(e))}` : ''})`;
|
|
382
|
+
if (ts.isNewExpression(e) && ts.isIdentifier(e.expression) && ['Map', 'Set'].includes(e.expression.text) && !e.arguments?.length && /^JS(Map|Set)</.test(target.replace(/\?$/, '')))
|
|
383
|
+
return `${target.replace(/\?$/, '')}()`;
|
|
384
|
+
// `[]` where an array of a type is wanted is an empty array of it.
|
|
385
|
+
let bare = e;
|
|
386
|
+
while (ts.isParenthesizedExpression(bare) || ts.isAsExpression(bare))
|
|
387
|
+
bare = bare.expression;
|
|
388
|
+
if (ts.isArrayLiteralExpression(bare) && !bare.elements.length && /^JSArray<.*>$/.test(target.replace(/\?$/, '')))
|
|
389
|
+
return `${target.replace(/\?$/, '')}()`;
|
|
390
|
+
if (ts.isArrayLiteralExpression(bare) && /^JSArray<(String|Double|Bool)\?>$/.test(target) && this.typeOf(bare) === target.replace('?>', '>'))
|
|
391
|
+
return this.array(bare, target);
|
|
392
|
+
// An empty array held as a map from number to value (`numberKeyedArray`): an empty record.
|
|
393
|
+
if (/^JSRecord<.*>$/.test(target) && ((ts.isArrayLiteralExpression(bare) && !bare.elements.length) || (ts.isNewExpression(bare) && ts.isIdentifier(bare.expression) && bare.expression.text === 'Array' && !bare.arguments?.length)))
|
|
394
|
+
return `${target}()`;
|
|
395
|
+
// An array literal where any value may go holds any value: script may store a string in `const list: any = [1, 2]`,
|
|
396
|
+
// or in `{ list: [1] }` of an untyped object.
|
|
397
|
+
const untypedMember = ts.isPropertyAssignment(bare.parent) && this.dynamicLiterals.has(bare.parent.parent);
|
|
398
|
+
if (ts.isArrayLiteralExpression(bare) && isUntyped(spelledType(target)) && !ts.isAsExpression(e) && (untypedMember || !!(this.checker.getContextualType(bare)?.flags & ts.TypeFlags.Any)))
|
|
399
|
+
return this.array(bare, 'JSArray<Any?>');
|
|
400
|
+
// An array of tuples where the slot's type has them typed (`[[property, color]]` for `[any, any][]` returned as `[CssProperty, Color][]`).
|
|
401
|
+
const tuples = /^(JSArray<)?(\(.*\))>?$/.exec(target.replace(/\?$/, ''));
|
|
402
|
+
const arity = tuples && !hasTopLevelArrow(tuples[2]) ? splitTopLevel(tuples[2].slice(1, -1)).length : 0;
|
|
403
|
+
const fits = (x) => ts.isArrayLiteralExpression(x) && x.elements.length === arity && !x.elements.some(ts.isSpreadElement);
|
|
404
|
+
if (ts.isArrayLiteralExpression(bare) && arity > 1 && (tuples[1] ? bare.elements.every(fits) : fits(bare)))
|
|
405
|
+
return this.array(bare, target.replace(/\?$/, ''));
|
|
406
|
+
// A pair the checker types as a tuple (its slot iterable of tuples, as `Headers` is) where an array or untyped value is wanted: made as the array.
|
|
407
|
+
if (ts.isArrayLiteralExpression(bare) && (/^JSArray<.+>$/.test(target.replace(/[?!]$/, '')) || (this.pluginFiles.size > 0 && isUntyped(spelledType(target)))) && /^\(.*\)$/.test(this.typeOf(bare)) && !functionParts(this.typeOf(bare)) && !bare.elements.some(ts.isSpreadElement))
|
|
408
|
+
return this.array(bare, isUntyped(spelledType(target)) ? 'JSArray<Any?>' : target.replace(/[?!]$/, ''));
|
|
409
|
+
// Branches typed otherwise than where the value goes: each as it is taken.
|
|
410
|
+
if (ts.isConditionalExpression(bare) && tuples && arity > 1 && this.typeOf(bare) !== target && ![bare.whenTrue, bare.whenFalse].some(isNullish)) {
|
|
411
|
+
return `(${this.cond(bare.condition)} ? ${this.coerce(bare.whenTrue, target)} : ${this.coerce(bare.whenFalse, target)})`;
|
|
412
|
+
}
|
|
413
|
+
// A literal of another shape than where it goes (`{ spans: [] }` held as `{ spans: any[] }`): made as that shape.
|
|
414
|
+
const wanted = target.replace(/[?!]$/, '');
|
|
415
|
+
if (ts.isObjectLiteralExpression(bare) && /^JSRecord<.*>$/.test(wanted))
|
|
416
|
+
return this.object(bare, wanted);
|
|
417
|
+
const wantedShape = ts.isObjectLiteralExpression(bare) && /^Object_\w+$/.test(wanted) && wanted !== this.typeOf(bare).replace(/[?!]$/, '') ? this.shapes.named(wanted) : undefined;
|
|
418
|
+
// A literal where Swift types the slot as an app interface, or a result interface of core's: made as it, whatever the
|
|
419
|
+
// checker's contextual type (an untyped slot, `(m ??= new Map()).set(k, { … })`; an async function's result, `T | PromiseLike<T>`).
|
|
420
|
+
if (ts.isObjectLiteralExpression(bare) && !this.subst.has(bare) && (this.appInterfaces?.some((i) => i.name === wanted) || (this.library ? resultShapeNamed(this, wanted) : this.core.viewable(wanted))))
|
|
421
|
+
return this.object(bare, wanted);
|
|
422
|
+
if (wantedShape && bare.properties.every((p) => (ts.isPropertyAssignment(p) || ts.isShorthandPropertyAssignment(p)) && wantedShape.fields.some((f) => f.name === (literalKey(p.name, this.checker) ?? p.name.getText())))) {
|
|
423
|
+
return this.object(bare, wanted);
|
|
424
|
+
}
|
|
425
|
+
// `new WeakRef(button)` where a reference to its base class is taken: a reference of that type.
|
|
426
|
+
const weak = /^JSWeakRef<(.+)>[?!]?$/.exec(target)?.[1];
|
|
427
|
+
if (weak && ts.isNewExpression(bare) && ts.isIdentifier(bare.expression) && bare.expression.text === 'WeakRef' && bare.arguments?.length === 1 && this.typeOf(bare) !== target.replace(/[?!]$/, '')) {
|
|
428
|
+
return `JSWeakRef<${weak}>(${this.coerce(bare.arguments[0], weak)})`;
|
|
429
|
+
}
|
|
430
|
+
// `new Array<Base>()` where an array of a subclass is wanted: an empty array of it.
|
|
431
|
+
if (ts.isNewExpression(bare) && ts.isIdentifier(bare.expression) && bare.expression.text === 'Array' && !bare.arguments?.length && /^JSArray<.*>[?!]?$/.test(target))
|
|
432
|
+
return `${target.replace(/[?!]$/, '')}()`;
|
|
433
|
+
// Lenient code passing null or undefined where a string, number or boolean is declared: the type's zero, as such a slot reads it.
|
|
434
|
+
// Library code's undefined number is NaN, as its fields without a value hold it and `x === undefined` tests it.
|
|
435
|
+
if (this.lenient && target === 'Double' && isNullish(bare) && bare.kind !== ts.SyntaxKind.NullKeyword) {
|
|
436
|
+
heldLoss('nullishLiteral', '.nan', { node: bare });
|
|
437
|
+
return '.nan';
|
|
438
|
+
}
|
|
439
|
+
if ((this.lenient || this.lenientApp) && isNullish(bare) && ['String', 'Double', 'Bool'].includes(target)) {
|
|
440
|
+
heldLoss('nullishLiteral', this.zero(target), { node: bare });
|
|
441
|
+
return this.zero(target);
|
|
442
|
+
}
|
|
443
|
+
// Null where a native struct is declared: its zero value, as the iOS runtime marshals null for one.
|
|
444
|
+
if (this.lenient && isNullish(bare) && this.native.isStructType(target))
|
|
445
|
+
return `${target}()`;
|
|
446
|
+
// Null where a native enum is declared: the iOS runtime marshals it as 0.
|
|
447
|
+
if (this.lenient && isNullish(bare) && this.native.isEnumType(target))
|
|
448
|
+
return this.native.isOptionSetType(target) ? '[]' : this.native.enumFromNumber('0', target);
|
|
449
|
+
// Library mode: an object literal of an event type is core's EventData over it.
|
|
450
|
+
if (this.library && ts.isObjectLiteralExpression(bare) && isNamed(spelledType(target), 'EventData'))
|
|
451
|
+
return `EventData(jsObject: ${this.coerce(e, 'Any?')})`;
|
|
452
|
+
// A function literal where its slot takes the arguments as a rest (`callback: (...args: any[]) => void`): each of its parameters from the list.
|
|
453
|
+
const restSlot = functionParts(target.replace(/^\((.*)\)[?!]$/, '$1'));
|
|
454
|
+
if ((ts.isArrowFunction(bare) || ts.isFunctionExpression(bare)) && restSlot && restSlot.rest >= 0 && !bare.parameters.some((p) => p.dotDotDotToken) && !this.carriesMethod(bare) && !this.takesRestArray(bare)) {
|
|
455
|
+
const own = functionParts(this.closureType(bare));
|
|
456
|
+
if (own && own.params.length >= restSlot.rest) {
|
|
457
|
+
const fixed = restSlot.params.slice(0, restSlot.rest).map((p, k) => `__q${k}: ${p.replace(/^@escaping /, '')}`);
|
|
458
|
+
const args = own.params.map((p, k) => (k < restSlot.rest ? this.convert(`__q${k}`, restSlot.params[k].replace(/^@escaping /, ''), p.replace(/^@escaping /, '')) : this.fromAnyCode(`${RT.jsArg}(__r.storage, ${k - restSlot.rest})`, p.replace(/^@escaping /, ''), true)));
|
|
459
|
+
const call = this.marks.tryCode(`(${this.expr(e)})(${args.join(', ')})`);
|
|
460
|
+
return `{ (${[...fixed, `__r: JSArray<Any?>`].join(', ')}) throws -> ${restSlot.result} in ${restSlot.result === 'Void' ? `_ = ${call}` : `return ${this.convert(call, own.result, restSlot.result)}`} }`;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
// Library mode: a function literal for a slot an erased generic types otherwise (`(value: Span) => …` where `(Any?) -> Void` is taken): adapted.
|
|
464
|
+
// Elsewhere where Swift does not convert the function itself: a typed parameter where the slot passes any value,
|
|
465
|
+
// or one declared as an array where the slot passes a tuple (`(views: View[])` for `[T, Page]`).
|
|
466
|
+
const targetFn = unwrapFunction(target);
|
|
467
|
+
if ((ts.isArrowFunction(bare) || ts.isFunctionExpression(bare)) && !this.carriesMethod(bare) && functionParts(targetFn)) {
|
|
468
|
+
const own = this.closureType(bare);
|
|
469
|
+
const want = functionParts(targetFn), have = functionParts(own);
|
|
470
|
+
const p = (t) => t.replace(/^@escaping /, '');
|
|
471
|
+
const differs = (t, k) => p(t) !== p(want.params[k]) && (this.library || isUntyped(spelledType(p(want.params[k]))) || (/^\(.*\)$/.test(p(want.params[k])) && !functionParts(p(want.params[k])) && /^JSArray</.test(p(t))));
|
|
472
|
+
if (have && have.params.length <= want.params.length && (have.params.some(differs) || (this.pluginFiles.has(e.getSourceFile().fileName) && isUntyped(spelledType(want.result)) && !isUntyped(spelledType(have.result)))))
|
|
473
|
+
return this.convert(this.expr(e), own, targetFn);
|
|
474
|
+
}
|
|
475
|
+
// An async function where a function returning nothing is wanted (a callback typed `() => void`): its promise is dropped.
|
|
476
|
+
const want = functionParts(unwrapFunction(target)), have = functionParts(unwrapFunction(this.typeOf(e)));
|
|
477
|
+
const own = want && have && want.result === 'Void' && /^JSPromise</.test(have.result) && (ts.isArrowFunction(bare) || ts.isFunctionExpression(bare)) ? functionParts(this.closureType(bare)) : null;
|
|
478
|
+
if (want && have && want.result === 'Void' && /^JSPromise</.test(have.result) && want.params.length === (own ?? have).params.length) {
|
|
479
|
+
const names = want.params.map((_, k) => `__p${k}`);
|
|
480
|
+
const takes = own && own.params.length === want.params.length ? own.params : have.params;
|
|
481
|
+
const args = names.map((n, k) => {
|
|
482
|
+
const [from, to] = [want.params[k].replace(/^@escaping /, ''), takes[k].replace(/^@escaping /, '')];
|
|
483
|
+
const code = this.convert(n, from, to);
|
|
484
|
+
// Lenient code's optional callback where the function takes one: implicitly unwrapped, as lenient code holds it.
|
|
485
|
+
return code === n && isOptional(from) && !isOptional(to) && !isUntyped(spelledType(to)) ? this.marks.unwrappedCode(n) : code;
|
|
486
|
+
});
|
|
487
|
+
return `{ (${want.params.map((p, k) => `${names[k]}: ${p}`).join(', ')}) throws -> Void in _ = try (${this.expr(e)})(${args.join(', ')}) }`;
|
|
488
|
+
}
|
|
489
|
+
// An array of a type where an array of any value is wanted: the one array.
|
|
490
|
+
if (target === 'JSArray<Any?>' && /^JSArray<.*>$/.test(this.typeOf(e)) && this.typeOf(e) !== 'JSArray<Any?>') {
|
|
491
|
+
// Lenient code's array may be undefined where an optional one is taken: it stays undefined.
|
|
492
|
+
const loose = this.loose(e) && this.looseTolerated(e);
|
|
493
|
+
const shared = this.untypedArray(loose ? `${this.expr(e)} as ${this.typeOf(e)}?` : this.expr(e), this.typeOf(e), target, loose);
|
|
494
|
+
if (shared)
|
|
495
|
+
return shared;
|
|
496
|
+
if (loose)
|
|
497
|
+
return `(${this.expr(e)} as ${this.typeOf(e)}?).map { JSArray<Any?>($0.storage.map { $0 as Any? }) }`;
|
|
498
|
+
return `JSArray<Any?>(${this.expr(e)}.storage.map { $0 as Any? })`;
|
|
499
|
+
}
|
|
500
|
+
// Narrowed to `never` (a branch the checker deems unreachable, which lenient code still takes): as declared where that is the type wanted
|
|
501
|
+
// (`typeof index !== 'number'` of an optional number), otherwise untyped, as it may hold anything.
|
|
502
|
+
const narrowedOut = this.typeOf(e) === 'Never' && !ts.isCallExpression(bare) && !ts.isThrowStatement(e.parent);
|
|
503
|
+
const declaredOut = narrowedOut ? this.declaredTypeOf(bare) : null;
|
|
504
|
+
const source = narrowedOut ? (declaredOut && declaredOut.replace(/[?!]$/, '') === target.replace(/[?!]$/, '') ? declaredOut : 'Any?') : this.typeOf(e);
|
|
505
|
+
// An untyped array where an array of a type is wanted: its elements as that type, in a new array.
|
|
506
|
+
if (source === 'JSArray<Any?>' && /^JSArray<.+>$/.test(target) && target !== source && !ts.isArrayLiteralExpression(bare))
|
|
507
|
+
return this.arrayOf(this.expr(e), target.slice(8, -1));
|
|
508
|
+
if (isOptional(target) && !isUntyped(spelledType(target)) && source === 'Void' && !isNullish(bare)) {
|
|
509
|
+
return `(${RT.jsUndefined}(${this.expr(e)}) as? ${target.replace(/^\((.*)\)\?$/, '$1').replace(/\?$/, '')})`;
|
|
510
|
+
}
|
|
511
|
+
if (target.endsWith('?') && !isUntyped(spelledType(target)) && !source.endsWith('?')) {
|
|
512
|
+
const maybe = this.maybeUndefined(e);
|
|
513
|
+
if (maybe)
|
|
514
|
+
return maybe;
|
|
515
|
+
}
|
|
516
|
+
const box = isUntyped(spelledType(target)) ? this.boxStep(source) : null;
|
|
517
|
+
if (box?.composite === 'enum')
|
|
518
|
+
return this.untypedEnum(this.expr(e), source);
|
|
519
|
+
const timer = box ? this.timerFunction(bare) : null;
|
|
520
|
+
if (timer)
|
|
521
|
+
return timer;
|
|
522
|
+
if (box) {
|
|
523
|
+
// Null kept as untyped values hold it, apart from undefined.
|
|
524
|
+
if (bare.kind === ts.SyntaxKind.NullKeyword)
|
|
525
|
+
return 'jsNull';
|
|
526
|
+
if (box.composite === 'void' && source === 'Void' && !isNullish(bare))
|
|
527
|
+
return `${RT.jsUndefined}(${this.expr(e)})`;
|
|
528
|
+
// A function with a rest parameter (`function count(...args)`) held untyped: called by script, it takes the rest of the arguments.
|
|
529
|
+
const fnType = box.composite === 'function' && !source.endsWith('?') && hasTopLevelArrow(source) ? functionParts(source.replace(/^\((.*)\)!?$/, '$1')) : null;
|
|
530
|
+
if (fnType && (ts.isIdentifier(bare) || ts.isPropertyAccessExpression(bare))) {
|
|
531
|
+
const signature = this.checker.getSignaturesOfType(this.checker.getNonNullableType(this.checker.getTypeAtLocation(bare)), ts.SignatureKind.Call)[0];
|
|
532
|
+
const restAt = signature?.getParameters().findIndex((p) => !!p.valueDeclaration && ts.isParameter(p.valueDeclaration) && !!p.valueDeclaration.dotDotDotToken) ?? -1;
|
|
533
|
+
if (restAt >= 0)
|
|
534
|
+
return this.boxFunction(this.expr(e), fnType.text, restAt);
|
|
535
|
+
}
|
|
536
|
+
// A Promise executor's resolve held untyped: a function resolving the promise.
|
|
537
|
+
const resolvers = ts.isIdentifier(bare) ? this.resolvers.get(this.resolve(bare)) : undefined;
|
|
538
|
+
if (resolvers)
|
|
539
|
+
return `({ (__a: [Any?]) throws -> Any? in ${resolvers.name}.resolve(${resolvers.type === 'Void' ? '' : this.fromAnyCode(`${RT.jsArg}(__a, 0)`, resolvers.type, true)}); return nil } as JSFunction)`;
|
|
540
|
+
if (ts.isConditionalExpression(bare) && ([bare.whenTrue, bare.whenFalse].some((x) => x.kind === ts.SyntaxKind.NullKeyword) || this.states.nullBranches(bare))) {
|
|
541
|
+
return `(${this.cond(bare.condition)} ? ${this.coerce(bare.whenTrue, 'Any?')} : ${this.coerce(bare.whenFalse, 'Any?')})`;
|
|
542
|
+
}
|
|
543
|
+
// A number literal branch takes the conditional's type, which an untyped context would make Swift's `Int`.
|
|
544
|
+
if (ts.isConditionalExpression(bare) && [bare.whenTrue, bare.whenFalse].some(numberLiteralBranch)) {
|
|
545
|
+
return `(${this.cond(bare.condition)} ? (${this.coerce(bare.whenTrue, 'Any?')} as Any?) : (${this.coerce(bare.whenFalse, 'Any?')} as Any?))`;
|
|
546
|
+
}
|
|
547
|
+
const maybe = this.maybeUndefined(e);
|
|
548
|
+
if (maybe) {
|
|
549
|
+
// An optional function (`callback?: (args) => void`) held untyped is a script function, which `callback.call(…)` can call.
|
|
550
|
+
const held = optionalType((this.declaredTypeOf(bare) ?? source).replace(/[?!]$/, ''));
|
|
551
|
+
return functionParts(held.replace(/^\((.*)\)\?$/, '$1')) ? this.convert(maybe, held, 'Any?') : this.marks.castCode(maybe, 'Any', 'as');
|
|
552
|
+
}
|
|
553
|
+
if (source === 'Double' && numericLiteralOnly(e))
|
|
554
|
+
return `Double(${this.expr(e)})`;
|
|
555
|
+
// A method value is untyped already.
|
|
556
|
+
if (ts.isFunctionExpression(bare) && (this.carriesMethod(bare) || (this.library && this.readsArguments(bare))))
|
|
557
|
+
return this.expr(e);
|
|
558
|
+
if (ts.isFunctionExpression(bare) && takesReceiver(bare))
|
|
559
|
+
return this.methodValue(bare);
|
|
560
|
+
if (ts.isPropertyAccessExpression(bare) && bare.expression.kind === ts.SyntaxKind.SuperKeyword && this.isInstanceMethod(bare.name))
|
|
561
|
+
return 'nil';
|
|
562
|
+
const parse = ts.isIdentifier(bare) ? this.parseFunction(bare) : null;
|
|
563
|
+
if (parse)
|
|
564
|
+
return this.boxFunction(parse.code, parse.type);
|
|
565
|
+
// A choice between functions: each boxed as it is.
|
|
566
|
+
if (ts.isConditionalExpression(bare) && [bare.whenTrue, bare.whenFalse].some((x) => ts.isFunctionExpression(x) || ts.isArrowFunction(x) || (ts.isPropertyAccessExpression(x) && x.expression.kind === ts.SyntaxKind.SuperKeyword))) {
|
|
567
|
+
return `(${this.cond(bare.condition)} ? ${this.coerce(bare.whenTrue, 'Any?')} : ${this.coerce(bare.whenFalse, 'Any?')})`;
|
|
568
|
+
}
|
|
569
|
+
if (ts.isArrowFunction(e) || ts.isFunctionExpression(e)) {
|
|
570
|
+
const rest = e.parameters.findIndex((p) => p.dotDotDotToken);
|
|
571
|
+
return rest < 0 ? this.convert(this.expr(e), this.closureType(e), 'Any?') : this.boxFunction(this.expr(e), this.closureType(e), rest);
|
|
572
|
+
}
|
|
573
|
+
if (box.composite === 'function' && functionParts(unwrapFunction(source, false))) {
|
|
574
|
+
const sym = ts.isIdentifier(bare) ? this.resolve(bare) : undefined;
|
|
575
|
+
// An overloaded function is its implementation.
|
|
576
|
+
const d = sym?.valueDeclaration && ts.isFunctionDeclaration(sym.valueDeclaration) && !sym.valueDeclaration.body ? (sym.declarations?.find((x) => ts.isFunctionDeclaration(x) && !!x.body) ?? sym.valueDeclaration) : sym?.valueDeclaration;
|
|
577
|
+
if (d && ts.isFunctionDeclaration(d) && d.body && !d.getSourceFile().isDeclarationFile && !this.takesThis(d))
|
|
578
|
+
return this.boxDeclared(this.expr(e), d);
|
|
579
|
+
return this.convert(this.expr(e), d ? this.boxedGeneric(d, ts.isFunctionDeclaration(d) && d.body && !d.getSourceFile().isDeclarationFile ? escapingFunction(functionParts(this.functionValueType(d))) : source) : source, 'Any?');
|
|
580
|
+
}
|
|
581
|
+
if (/^\(.*\)$/.test(source) && !functionParts(source))
|
|
582
|
+
return this.convert(this.expr(e), source, 'Any?');
|
|
583
|
+
// An object read with an unwrap (`view.parent!`) is undefined where it is missing, as an untyped value can be.
|
|
584
|
+
const code = this.expr(e);
|
|
585
|
+
return this.marks.isUnwrap(code) && this.isObjectRef(e) ? this.marks.unwrapInner(code) : code;
|
|
586
|
+
}
|
|
587
|
+
// A number where Swift has a native enum or option set (`UIMenuOptions.A | UIMenuOptions.B`).
|
|
588
|
+
if (source === 'Double' && target !== 'Double' && this.native.isEnumType(target.replace(/\?$/, '')))
|
|
589
|
+
return this.native.enumFromNumber(this.expr(e), target);
|
|
590
|
+
// A native enum or option set where a number is wanted: its raw value; a missing one is undefined, NaN as a number.
|
|
591
|
+
const enumBase = source.replace(/[?!]$/, '');
|
|
592
|
+
if ((target === 'Double' || target === 'Double?') && enumBase !== 'Double' && this.native.isEnumType(enumBase)) {
|
|
593
|
+
const code = this.expr(e);
|
|
594
|
+
if (source === enumBase)
|
|
595
|
+
return `Double(${code}.rawValue)`;
|
|
596
|
+
return target === 'Double?' ? `(${code}).map { Double($0.rawValue) }` : `((${code}).map { Double($0.rawValue) } ?? .nan)`;
|
|
597
|
+
}
|
|
598
|
+
// A value TypeScript's strict typing calls possibly undefined where the code expects one (`map.get(k)` after `has(k)`).
|
|
599
|
+
// Lenient code: undefined passed where a string is declared stays falsy, as the string's zero.
|
|
600
|
+
if (this.lenient && target === 'String' && source === 'String?')
|
|
601
|
+
return `(${this.expr(e)} ?? "")`;
|
|
602
|
+
if (source === optionalType(target) && !isUntyped(spelledType(target)) && !target.endsWith('?') && !isFunctionType(target)) {
|
|
603
|
+
const field = this.states.placedField(e);
|
|
604
|
+
const code = this.expr(e), m = this.marks.markOf(code);
|
|
605
|
+
return field ? this.marks.tryCode(`${RT.jsRequired}(${m?.op === 'unwrap' ? m.of.code : code}, ${swiftString(field.name)})`) : this.undefinedAs(code, target, source);
|
|
606
|
+
}
|
|
607
|
+
// Lenient code: a library call Swift gives as optional (`map.get(k)`), which the checker reads as its value type.
|
|
608
|
+
const raw = this.lenient && ts.isCallExpression(bare) && source === target && !isUntyped(spelledType(target)) && !isOptional(target) && !isFunctionType(target) ? this.maybeUndefined(bare) : null;
|
|
609
|
+
if (raw)
|
|
610
|
+
return this.undefinedAs(raw, target, this.calledType(bare));
|
|
611
|
+
// A Foundation mutable collection where Swift's bridged collection is declared (`NSDictionary` returned as an `NSMutableDictionary`).
|
|
612
|
+
if (/^NSMutable(Array|Dictionary)[?!]?$/.test(source) && /^\[.*\]$/.test(target))
|
|
613
|
+
return typedCollection(this.expr(e), target) ?? this.marks.castCode(this.expr(e), target, 'as!');
|
|
614
|
+
// A new array of a subclass's objects where one of the base class's is wanted (`this._windows.filter(…)` as `WindowBase[]`).
|
|
615
|
+
if (/^JSArray<\w+>$/.test(source) && /^JSArray<\w+>[?!]?$/.test(target) && source !== target.replace(/[?!]$/, '') && (ts.isCallExpression(bare) || ts.isArrayLiteralExpression(bare))) {
|
|
616
|
+
const cast = this.classCast(this.expr(e), source, target);
|
|
617
|
+
if (cast)
|
|
618
|
+
return cast;
|
|
619
|
+
}
|
|
620
|
+
// A typed array where an untyped one is wanted (an erased generic's `T[]`): a literal built untyped, else a new array of its elements.
|
|
621
|
+
if (!this.library && /^JSArray<Any\?>[?!]?$/.test(target) && /^JSArray<.+>[?!]?$/.test(source) && !isNamed(spelledType(source), 'JSArray<Any?>')) {
|
|
622
|
+
if (ts.isArrayLiteralExpression(bare) && !bare.elements.some(ts.isSpreadElement))
|
|
623
|
+
return this.array(bare, 'JSArray<Any?>');
|
|
624
|
+
return this.convert(this.expr(e), source, target);
|
|
625
|
+
}
|
|
626
|
+
if (/^JSPromise<(Any\?|JSArray<Any\?>)>$/.test(source) && /^JSPromise<.*>[?!]?$/.test(target) && source !== target.replace(/[?!]$/, '')) {
|
|
627
|
+
const all = ts.isCallExpression(bare) && ts.isPropertyAccessExpression(bare.expression) && bare.expression.name.text === 'all' && ts.isIdentifier(bare.expression.expression) && bare.expression.expression.text === 'Promise' && isLibGlobal(this, bare.expression.expression) && bare.arguments.length === 1 && !ts.isArrayLiteralExpression(bare.arguments[0]) ? bare : null;
|
|
628
|
+
return all ? this.untypedAll(all.arguments[0], target) : this.convert(this.expr(e), source, target);
|
|
629
|
+
}
|
|
630
|
+
// A map of typed values where a map of any value is wanted: its entries, in a new map of them.
|
|
631
|
+
const typedMap = /^JSMap<(.+)>$/.exec(source)?.[1], anyMap = /^JSMap<(.+)>[?!]?$/.exec(target)?.[1];
|
|
632
|
+
if (typedMap && anyMap && typedMap !== anyMap) {
|
|
633
|
+
const [sk, sv] = splitTopLevel(typedMap), [tk, tv] = splitTopLevel(anyMap);
|
|
634
|
+
if (sk === tk && isUntyped(spelledType(tv)) && !isUntyped(spelledType(sv)))
|
|
635
|
+
return `JSMap<${tk}, Any?>(${this.expr(e)}.map { ($0.0, $0.1 as Any?) })`;
|
|
636
|
+
}
|
|
637
|
+
if (/^JSRecord<.+>[?!]?$/.test(source) && /^JSRecord<Any\?>[?!]?$/.test(target) && !isNamed(spelledType(source), 'JSRecord<Any?>'))
|
|
638
|
+
return this.convert(this.expr(e), source, target);
|
|
639
|
+
// A promise of a type where a promise of any value is wanted (`let p: Promise<any> = Promise.resolve()`): its value held untyped.
|
|
640
|
+
if (/^JSPromise<.+>$/.test(source) && /^JSPromise<Any\?>[?!]?$/.test(target) && source !== 'JSPromise<Any?>')
|
|
641
|
+
return this.convert(this.expr(e), source, 'JSPromise<Any?>');
|
|
642
|
+
if ((/^Rx(?:Observable|Subject|BehaviorSubject|ReplaySubject)<.+>[?!]?$/.test(source) && /^RxObservable<.+>[?!]?$/.test(target)) || (/^Signal<.+>[?!]?$/.test(source) && /^Signal<.+>[?!]?$/.test(target)))
|
|
643
|
+
return this.convert(this.expr(e), source, target);
|
|
644
|
+
const spread = source !== target ? (this.restFunction(e, source, target) ?? this.defaultedFunction(e, source, target)) : null;
|
|
645
|
+
if (spread)
|
|
646
|
+
return spread;
|
|
647
|
+
// A function declaration giving undefined where its type says a value (lenient code): its Swift result is optional.
|
|
648
|
+
const member = ts.isPropertyAccessExpression(bare) ? this.resolve(bare.name)?.valueDeclaration : undefined;
|
|
649
|
+
const fnDecl = ts.isIdentifier(bare) ? this.resolve(bare)?.valueDeclaration : member && !member.getSourceFile().isDeclarationFile ? member : undefined;
|
|
650
|
+
if (fnDecl && ts.isFunctionDeclaration(fnDecl) && functionParts(unwrapFunction(target, false))) {
|
|
651
|
+
const actual = this.functionValueType(fnDecl);
|
|
652
|
+
if (actual !== target)
|
|
653
|
+
return this.convert(this.expr(e), actual, target);
|
|
654
|
+
}
|
|
655
|
+
if (source !== target && !ts.isArrowFunction(ts.skipParentheses(e)) && !ts.isFunctionExpression(ts.skipParentheses(e)) && functionParts(unwrapFunction(source, false)) && functionParts(unwrapFunction(target, false))) {
|
|
656
|
+
// An optional member (`closeCallback?: …`) holds undefined, which the checker without strictNullChecks leaves out of its type.
|
|
657
|
+
const optionalMember = !!member && (ts.isPropertySignature(member) || ts.isPropertyDeclaration(member)) && !!member.questionToken && !/[?!]$/.test(source);
|
|
658
|
+
// So does an optional parameter (`cb?: …`) it is given to.
|
|
659
|
+
const call = ts.isCallExpression(e.parent) || ts.isNewExpression(e.parent) ? e.parent : undefined;
|
|
660
|
+
const at = call?.arguments?.indexOf(e) ?? -1;
|
|
661
|
+
const sig = at >= 0 ? this.checker.getResolvedSignature(call)?.getDeclaration() : undefined;
|
|
662
|
+
const param = sig && !ts.isJSDocSignature(sig) ? sig.parameters[at] : undefined;
|
|
663
|
+
const optionalParam = !!param && !param.dotDotDotToken && !!(param.questionToken || param.initializer) && !/[?!]$/.test(target);
|
|
664
|
+
return this.convert(this.expr(e), optionalMember ? `(${source})?` : source, optionalParam ? `(${target})?` : target);
|
|
665
|
+
}
|
|
666
|
+
if (isUntyped(spelledType(source)) && target !== 'Void') {
|
|
667
|
+
if (ts.isArrowFunction(e) || ts.isFunctionExpression(e))
|
|
668
|
+
return this.expr(e);
|
|
669
|
+
const code = this.expr(e);
|
|
670
|
+
return this.throwingConverts(() => this.fromAnyChecked(code, target, this.castThrows(e)).code, this.libraryThrowsHere(e), e);
|
|
671
|
+
}
|
|
672
|
+
// Library mode: an object of a literal's shape where a class object literals are typed as goes (`{ ...args, delay: undefined }` as AnimationInfo): one made of its fields.
|
|
673
|
+
const make = !(ts.isObjectLiteralExpression(bare) && literalClassOf(this, bare)) ? this.shapeToClass(source.replace(/[?!]$/, ''), target.replace(/[?!]$/, '')) : null;
|
|
674
|
+
if (make)
|
|
675
|
+
return source.endsWith('?') ? `(${this.expr(e)}).map(${make})` : this.loose(e) && this.looseTolerated(e) ? `${RT.jsImplicit}(${this.expr(e)}).map(${make})` : `${make}(${this.expr(e)})`;
|
|
676
|
+
// An array of such objects where an array of the class is taken: each made so.
|
|
677
|
+
const elements = /^JSArray<(Object_\w+)>\??$/.exec(source)?.[1];
|
|
678
|
+
const each = elements && this.shapeToClass(elements, /^JSArray<(\w+)>\??$/.exec(target)?.[1] ?? '');
|
|
679
|
+
const missing = isOptional(source) || (this.lenient && ts.isConditionalExpression(bare) && [bare.whenTrue, bare.whenFalse].some(isNullish));
|
|
680
|
+
if (each)
|
|
681
|
+
return missing ? `(${this.expr(e)})?.map(${each})` : `${this.expr(e)}.map(${each})`;
|
|
682
|
+
// Library mode: a class where a subclass is declared (`this` of ViewCommon where core's declarations say View).
|
|
683
|
+
if ((this.library || this.pluginFiles.has(e.getSourceFile().fileName)) && this.isSubclassOf(target.replace(/[?!]$/, ''), source.replace(/[?!]$/, ''))) {
|
|
684
|
+
// Lenient code's object may be missing (`measureChild(this, this.layoutView, …)`): it stays missing.
|
|
685
|
+
if ((this.lenient || source.endsWith('!')) && !target.endsWith('?') && !source.endsWith('?'))
|
|
686
|
+
return this.marks.castCode(this.expr(e), target.replace(/[?!]$/, ''), 'as?', true);
|
|
687
|
+
return `(${this.expr(e)} as${target.endsWith('?') || source.endsWith('?') ? '?' : '!'} ${target.replace(/[?!]$/, '')})`;
|
|
688
|
+
}
|
|
689
|
+
// A class's object, or a class, that an object type reads by name (`ValueStates.viewedClass`, `viewedStatics`): a view of it.
|
|
690
|
+
const viewedFrom = this.classNamed(source.replace(/[?!]$/, ''));
|
|
691
|
+
if (viewedFrom && this.states.viewedClass(viewedFrom) && source.replace(/[?!]$/, '') !== target.replace(/[?!]$/, '') && this.isObjectShape(target.replace(/[?!]$/, '')))
|
|
692
|
+
return this.convert(this.expr(e), source, target);
|
|
693
|
+
const viewedStatics = /^(\w+)\.Type$/.exec(source)?.[1];
|
|
694
|
+
if (viewedStatics && this.classNamed(viewedStatics) && this.states.viewedStatics(this.classNamed(viewedStatics)) && /^\w+$/.test(target) && this.isObjectShape(target))
|
|
695
|
+
return this.viewOf(target, this.expr(e));
|
|
696
|
+
// Interfaces structurally equal (`DuoFold` for `StageFold`), or a tuple where an array is wanted.
|
|
697
|
+
if (source.replace(/[?!]$/, '') !== target.replace(/[?!]$/, '') && this.isObjectShape(source.replace(/[?!]$/, '')) && this.isObjectShape(target.replace(/[?!]$/, '')))
|
|
698
|
+
return this.convert(this.expr(e), source, target);
|
|
699
|
+
if (/^\(.*\)$/.test(source) && !functionParts(source) && /^JSArray<.*>[?!]?$/.test(target))
|
|
700
|
+
return this.convert(this.expr(e), source, target);
|
|
701
|
+
// An array literal is made of the slot's element type already.
|
|
702
|
+
const literal = ts.isArrayLiteralExpression(bare) && !bare.elements.some(ts.isSpreadElement);
|
|
703
|
+
if (literal && /^JSArray<.+>[?!]?$/.test(source) && /^JSArray<.+>[?!]?$/.test(target) && ['elements', 'view'].includes(structural(parseNativeType(source), parseNativeType(target), this.structuralFacts())?.step ?? ''))
|
|
704
|
+
return this.expr(e);
|
|
705
|
+
if (/^JSArray<\w+>[?!]?$/.test(source) && /^JSArray<\w+>[?!]?$/.test(target) && source.replace(/[?!]$/, '') !== target.replace(/[?!]$/, ''))
|
|
706
|
+
return this.convert(this.expr(e), source, target);
|
|
707
|
+
if (!this.library && /^JSArray<.+>[?!]?$/.test(source) && /^JSArray<.+>[?!]?$/.test(target) && ['elements', 'view'].includes(structural(parseNativeType(source), parseNativeType(target), this.structuralFacts())?.step ?? ''))
|
|
708
|
+
return this.convert(this.expr(e), source, target);
|
|
709
|
+
// A non-strict app's value that may be missing (a native read typed `T | null`) where one is declared: unwrapped where used.
|
|
710
|
+
if (this.lenientApp && !isUntyped(spelledType(target)) && !isOptional(target) && !target.endsWith('!') && source === optionalType(target) && !isFunctionType(target))
|
|
711
|
+
return this.marks.unwrappedCode(this.expr(e));
|
|
712
|
+
// An object where a number or string is taken (`indexOf(x, { valueOf() { return 1 } })`): converted as script converts it, by its own valueOf or toString.
|
|
713
|
+
const object = source.replace(/[?!]$/, '');
|
|
714
|
+
const primitive = target.replace(/\?$/, '');
|
|
715
|
+
if ((primitive === 'Double' || primitive === 'String') && (this.isObjectShape(object) || this.classNamed(object)))
|
|
716
|
+
return `${primitive === 'Double' ? RT.jsToNumber : RT.jsToString}(${this.expr(e)})`;
|
|
717
|
+
return this.expr(e);
|
|
718
|
+
},
|
|
719
|
+
/** An object member of an untyped object (`componentModule.component`, declared a View, an ActionItem too) where any value goes: the value itself, not cast to the class declared. */
|
|
720
|
+
untypedMemberValue(e) {
|
|
721
|
+
while (ts.isParenthesizedExpression(e))
|
|
722
|
+
e = e.expression;
|
|
723
|
+
if (!this.lenient || !ts.isPropertyAccessExpression(e) || e.questionDotToken || !this.isObjectRef(e))
|
|
724
|
+
return null;
|
|
725
|
+
// Still read from the text: its receiver of at most one level of parentheses decides the core kit's output, where the
|
|
726
|
+
// read's mark would also take `jsGet((xs.element(i) ?? nil), "k")`.
|
|
727
|
+
const m = this.marks.markOf(this.expr(e));
|
|
728
|
+
// A checked cast is read as the conditional cast it stands for.
|
|
729
|
+
const code = m?.op === 'cast' && m.checked && m.implicit ? `${RT.jsImplicit}(${m.of.code} as? ${m.spelled})` : this.expr(e);
|
|
730
|
+
const raw = /^jsImplicit\(((?:try )?jsGet\([^()]*(?:\([^()]*\)[^()]*)*\)) as\? [\w.]+\)$/.exec(code);
|
|
731
|
+
return raw ? (raw[1].startsWith('try ') ? `(${raw[1]})` : raw[1]) : null;
|
|
732
|
+
},
|
|
733
|
+
/** The library's or core's timer functions held as values (`assertNotEqual(timer.setTimeout, undefined)`): script functions calling the runtime's. */
|
|
734
|
+
timerFunction(e) {
|
|
735
|
+
const name = ts.isIdentifier(e) ? e : ts.isPropertyAccessExpression(e) ? e.name : null;
|
|
736
|
+
const decl = name && this.resolve(name)?.declarations?.[0];
|
|
737
|
+
if (!decl || !ts.isFunctionDeclaration(decl) || !decl.name || !(decl.getSourceFile().isDeclarationFile || isCoreDeclaration(decl)))
|
|
738
|
+
return null;
|
|
739
|
+
const call = `{ _ = try ${RT.jsCall}(${RT.jsArg}(__a, 0), spread: Array(__a.dropFirst(2))) }`;
|
|
740
|
+
const body = {
|
|
741
|
+
setTimeout: `return ${RT.jsSetTimeout}({ ${RT.jsReport} ${call} }, ${RT.jsToNumber}(${RT.jsArg}(__a, 1)))`,
|
|
742
|
+
setInterval: `return ${RT.jsSetInterval}({ ${RT.jsReport} ${call} }, ${RT.jsToNumber}(${RT.jsArg}(__a, 1)))`,
|
|
743
|
+
clearTimeout: `${RT.jsClearTimeout}(${RT.jsArg}(__a, 0) as? Double); return nil`,
|
|
744
|
+
clearInterval: `${RT.jsClearInterval}(${RT.jsArg}(__a, 0) as? Double); return nil`,
|
|
745
|
+
requestAnimationFrame: `let __f = ${RT.jsArg}(__a, 0); return ${RT.jsRequestAnimationFrame}({ __t in ${RT.jsReport} { _ = try ${RT.jsCall}(__f, __t) } })`,
|
|
746
|
+
cancelAnimationFrame: `${RT.jsCancelAnimationFrame}(${RT.jsToNumber}(${RT.jsArg}(__a, 0))); return nil`,
|
|
747
|
+
};
|
|
748
|
+
const code = body[decl.name.text];
|
|
749
|
+
return code ? `({ (__a: [Any?]) throws -> Any? in ${code} } as JSFunction)` : null;
|
|
750
|
+
},
|
|
751
|
+
/** A function taking a rest parameter (`(...args) => void`) where a function of fixed parameters is wanted: those past the rest's start packed into its array. */
|
|
752
|
+
restFunction(e, source, target) {
|
|
753
|
+
const sig = this.checker.getTypeAtLocation(e).getCallSignatures()[0];
|
|
754
|
+
const last = sig?.getParameters().at(-1)?.valueDeclaration;
|
|
755
|
+
if (!last || !ts.isParameter(last) || !last.dotDotDotToken)
|
|
756
|
+
return null;
|
|
757
|
+
const have = functionParts(source), want = functionParts(target);
|
|
758
|
+
const fixed = (have?.params.length ?? 0) - 1;
|
|
759
|
+
const element = have && /^JSArray<(.*)>$/.exec(have.params[fixed] ?? '')?.[1];
|
|
760
|
+
if (!have || !want || want.rest >= 0 || !element || want.params.length < fixed)
|
|
761
|
+
return null;
|
|
762
|
+
const p = (t) => t.replace(/^@escaping /, '');
|
|
763
|
+
const params = want.params.map((t, k) => `__q${k}: ${escapingParam(p(t))}`);
|
|
764
|
+
const args = [
|
|
765
|
+
...want.params.slice(0, fixed).map((t, k) => this.convert(`__q${k}`, p(t), p(have.params[k]))),
|
|
766
|
+
`JSArray<${element}>([${want.params
|
|
767
|
+
.slice(fixed)
|
|
768
|
+
.map((t, k) => this.convert(`__q${fixed + k}`, p(t), element))
|
|
769
|
+
.join(', ')}])`,
|
|
770
|
+
];
|
|
771
|
+
const call = this.marks.tryCode(`__h(${args.join(', ')})`);
|
|
772
|
+
const body = want.result === 'Void' ? `_ = ${call}` : `return ${this.convert(call, have.result, want.result)}`;
|
|
773
|
+
// Lenient code's function value may be missing where an optional one is held: it stays missing.
|
|
774
|
+
return this.adapter(this.expr(e), escapingFunction(have), want, params, body, this.loose(e) && this.optionalSlot);
|
|
775
|
+
},
|
|
776
|
+
/** A declared function where a function of fewer parameters is wanted: called by name, so the rest take their defaults. */
|
|
777
|
+
defaultedFunction(e, source, target) {
|
|
778
|
+
if (!ts.isIdentifier(e) && !ts.isPropertyAccessExpression(e))
|
|
779
|
+
return null;
|
|
780
|
+
const decl = this.resolve(ts.isPropertyAccessExpression(e) ? e.name : e)?.valueDeclaration;
|
|
781
|
+
if (!decl || !(ts.isFunctionDeclaration(decl) || ts.isMethodDeclaration(decl)) || !decl.body || decl.getSourceFile().isDeclarationFile)
|
|
782
|
+
return null;
|
|
783
|
+
const have = functionParts(source), want = functionParts(target);
|
|
784
|
+
if (!have || !want || want.params.length >= have.params.length || want.params.length >= decl.parameters.length)
|
|
785
|
+
return null;
|
|
786
|
+
if (!decl.parameters.slice(want.params.length).every((p) => (p.questionToken || p.initializer) && !p.dotDotDotToken))
|
|
787
|
+
return null;
|
|
788
|
+
const p = (t) => t.replace(/^@escaping /, '');
|
|
789
|
+
const params = want.params.map((t, k) => `__q${k}: ${escapingParam(p(t))}`);
|
|
790
|
+
const callee = this.byName(() => this.expr(e));
|
|
791
|
+
const call = this.marks.tryCode(`${callee}(${want.params.map((t, k) => this.convert(`__q${k}`, p(t), p(have.params[k]))).join(', ')})`);
|
|
792
|
+
const body = want.result === 'Void' ? `_ = ${call}` : `return ${this.convert(call, have.result, want.result)}`;
|
|
793
|
+
// A method's value (one per receiver and method), or a declared function's (`declaredValue`), is the identity the adapter takes on.
|
|
794
|
+
const declared = ts.isIdentifier(e) && this.declaredFunctionRead(e) ? this.expr(e) : null;
|
|
795
|
+
const value = ts.isPropertyAccessExpression(e) ? this.methodValueRead(e) : declared?.startsWith('FunctionCell_') ? declared : null;
|
|
796
|
+
const hc = value ? this.functionCell(declared && ts.isFunctionDeclaration(decl) ? escapingFunction(functionParts(this.functionValueType(decl))) : have.text) : null, gc = this.functionCell(want.text);
|
|
797
|
+
if (!value || !hc || !gc)
|
|
798
|
+
return `{ (${params.join(', ')}) throws -> ${want.result} in ${body} }`;
|
|
799
|
+
return `{ (__i: JSFunctionAlias) -> ${want.text} in ${RT.jsIdentified}(${gc}(f: { (${params.join(', ')}) throws -> ${want.result} in ${this.keeping('__i', body, want.result)} }), __i).f }(JSFunctionAlias(cell: ${hc}(f: ${value})))`;
|
|
800
|
+
},
|
|
801
|
+
byName(f) {
|
|
802
|
+
const was = this.namedCall;
|
|
803
|
+
this.namedCall = true;
|
|
804
|
+
try {
|
|
805
|
+
return f();
|
|
806
|
+
}
|
|
807
|
+
finally {
|
|
808
|
+
this.namedCall = was;
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
/**
|
|
812
|
+
* A value of one program class (or an array of them) read as another of its hierarchy: an
|
|
813
|
+
* object as itself, cast; an array of a subclass's objects as the one array viewed as the base's
|
|
814
|
+
* (`arrayView`), one of a base class's (or lenient code's) as a new array of its elements, Swift's
|
|
815
|
+
* generic classes not being covariant. Null when the types are not so related.
|
|
816
|
+
*/
|
|
817
|
+
classCast(code, from, to) {
|
|
818
|
+
const bare = (t) => t.replace(/[?!]$/, '');
|
|
819
|
+
const related = (a, b) => this.isSubclassOf(a, b) || this.isSubclassOf(b, a);
|
|
820
|
+
const fa = /^JSArray<(\w+)>$/.exec(bare(from))?.[1], ta = /^JSArray<(\w+)>$/.exec(bare(to))?.[1];
|
|
821
|
+
if (fa && ta && fa !== ta && related(fa, ta)) {
|
|
822
|
+
const up = this.isSubclassOf(fa, ta);
|
|
823
|
+
const both = isOptional(from) && isOptional(to);
|
|
824
|
+
const view = up && !this.lenient ? this.arrayView(both ? code : `${code}${/[?!]$/.test(from) ? '!' : ''}`, from, to, both) : null;
|
|
825
|
+
if (view)
|
|
826
|
+
return view;
|
|
827
|
+
// Lenient code's array may be missing, which stays undefined; an element of another class is a TypeError.
|
|
828
|
+
if (this.lenient)
|
|
829
|
+
return this.marks.tryIf(!up, `${RT.jsImplicit}(${code}).map { JSArray<${ta}>(${up ? '' : 'try '}$0.storage.map { ${up ? `$0 as ${ta}` : `try (${RT.jsCastPresent}($0) as ${ta})`} }) }`);
|
|
830
|
+
const map = `JSArray<${ta}>(${code}${/[?!]$/.test(from) ? '!' : ''}.storage.map { $0 as${up ? '' : '!'} ${ta} })`;
|
|
831
|
+
return isOptional(from) && isOptional(to) ? `(${code}).map { JSArray<${ta}>($0.storage.map { $0 as${up ? '' : '!'} ${ta} }) }` : map;
|
|
832
|
+
}
|
|
833
|
+
const f = bare(from), t = bare(to);
|
|
834
|
+
if (f !== t && /^\w+$/.test(f) && /^\w+$/.test(t) && related(f, t))
|
|
835
|
+
return this.isSubclassOf(f, t) ? code : `(${code} as${isOptional(to) ? '?' : '!'} ${t})`;
|
|
836
|
+
return null;
|
|
837
|
+
},
|
|
838
|
+
/** Library mode: a function making an instance of a class object literals are typed as from an object of a literal's shape, its fields copied. */
|
|
839
|
+
shapeToClass(source, target) {
|
|
840
|
+
if (!this.library || !/^Object_\w+$/.test(source))
|
|
841
|
+
return null;
|
|
842
|
+
const cls = [...this.literalClasses()].find((c) => this.className(c) === target);
|
|
843
|
+
const shape = cls && this.shapes.named(source);
|
|
844
|
+
if (!cls || !shape)
|
|
845
|
+
return null;
|
|
846
|
+
const type = this.checker.getDeclaredTypeOfSymbol(this.checker.getSymbolAtLocation(cls.name));
|
|
847
|
+
const copies = shape.fields.flatMap((f) => {
|
|
848
|
+
const d = type.getProperty(f.name)?.valueDeclaration;
|
|
849
|
+
return d && ts.isPropertyDeclaration(d) && !isStatic(d) ? [`__o.${ident(f.name)} = ${this.convert(`__s.${ident(f.name)}`, f.type, this.typeOf(d.name))}`] : [];
|
|
850
|
+
});
|
|
851
|
+
return `{ (__s: ${source}) -> ${target} in let __o = ${target}(jsLiteral: ()); ${[...copies, 'return __o'].join('; ')} }`;
|
|
852
|
+
},
|
|
853
|
+
/**
|
|
854
|
+
* An object literal typed as a class: an instance made without the constructor, the literal's keys
|
|
855
|
+
* written in order. A function the literal gives for a method is the instance's own, which calls of it
|
|
856
|
+
* reach; the instance is still of the class (`instanceof` holds, unlike the literal's).
|
|
857
|
+
*/
|
|
858
|
+
classLiteral(e, cls) {
|
|
859
|
+
if (cls.heritageClauses?.some((h) => h.token === ts.SyntaxKind.ExtendsKeyword))
|
|
860
|
+
throw this.error(e, `an object literal of the class ${cls.name?.text} that extends another`);
|
|
861
|
+
const name = this.className(cls);
|
|
862
|
+
const o = this.fresh('__literal');
|
|
863
|
+
const type = this.checker.getDeclaredTypeOfSymbol(this.checker.getSymbolAtLocation(cls.name));
|
|
864
|
+
const write = (key, value) => {
|
|
865
|
+
const decl = type.getProperty(key)?.valueDeclaration;
|
|
866
|
+
if (decl && ts.isPropertyDeclaration(decl) && !isStatic(decl))
|
|
867
|
+
return `${o}.${ident(key)} = ${this.marks.tryBefore(this.tryPrefix(value), this.coerce(value, this.typeOf(decl.name)))}`;
|
|
868
|
+
// A function for a method takes the method's parameters, as its callers pass them.
|
|
869
|
+
if (decl && ts.isMethodDeclaration(decl) && (ts.isArrowFunction(value) || ts.isFunctionExpression(value))) {
|
|
870
|
+
const slot = this.slotOf(value)?.getParameters() ?? [];
|
|
871
|
+
const params = [...value.parameters.map((q) => this.typeOf(q.name)), ...slot.slice(value.parameters.length).map((q) => this.type(this.checker.getTypeOfSymbolAtLocation(q, value), value))];
|
|
872
|
+
return `${RT.jsExpandoSet}(${o}, ${swiftString(key)}, ${this.boxFunction(this.expr(value), `(${params.join(', ')}) throws -> ${this.closureResult(value).target}`)})`;
|
|
873
|
+
}
|
|
874
|
+
return `${RT.jsExpandoSet}(${o}, ${swiftString(key)}, ${this.marks.tryBefore(this.tryPrefix(value), this.coerce(value, 'Any?'))})`;
|
|
875
|
+
};
|
|
876
|
+
const steps = e.properties.flatMap((p) => {
|
|
877
|
+
if (ts.isPropertyAssignment(p) && !ts.isComputedPropertyName(p.name))
|
|
878
|
+
return [write(literalKey(p.name, this.checker) ?? p.name.getText(), p.initializer)];
|
|
879
|
+
if (ts.isShorthandPropertyAssignment(p))
|
|
880
|
+
return [write(p.name.text, p.name)];
|
|
881
|
+
if (ts.isSpreadAssignment(p)) {
|
|
882
|
+
const source = this.checker.getNonNullableType(this.checker.getTypeAtLocation(p.expression));
|
|
883
|
+
if (this.isAny(p.expression) || !source.getSymbol()?.declarations?.some(ts.isClassDeclaration))
|
|
884
|
+
throw this.error(p, 'a spread of anything but a class instance into an object literal of a class');
|
|
885
|
+
const s = this.fresh('__spread');
|
|
886
|
+
const copied = source.getProperties().filter((x) => x.valueDeclaration && ts.isPropertyDeclaration(x.valueDeclaration) && !isStatic(x.valueDeclaration) && type.getProperty(x.name)?.valueDeclaration && ts.isPropertyDeclaration(type.getProperty(x.name).valueDeclaration));
|
|
887
|
+
// Lenient code's spread object may be undefined, which spreads nothing.
|
|
888
|
+
if (this.loose(p.expression))
|
|
889
|
+
return [`if let ${s} = ${this.tryPrefix(p.expression)}${RT.jsImplicit}(${this.expr(p.expression)}) { ${copied.map((x) => `${o}.${ident(x.name)} = ${s}.${ident(x.name)}`).join('; ')} }`];
|
|
890
|
+
return [`let ${s}: ${this.typeOf(p.expression).replace(/[?!]$/, '')} = ${this.marks.tryBefore(this.tryPrefix(p.expression), this.expr(p.expression))}`, ...copied.map((x) => `${o}.${ident(x.name)} = ${s}.${ident(x.name)}`)];
|
|
891
|
+
}
|
|
892
|
+
throw this.error(p, 'this member in an object literal of a class');
|
|
893
|
+
});
|
|
894
|
+
return `{ () ${this.throwsInfo.expr(e) ? 'throws ' : ''}-> ${name} in ${[`let ${o} = ${name}(jsLiteral: ())`, ...steps, `return ${o}`].join('; ')} }()`;
|
|
895
|
+
},
|
|
896
|
+
};
|