@nstudio/nativescript-compiler 0.0.0-stage → 9.2.0-alpha.11
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 +35 -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 +97 -0
- package/dist/driver/compile.js +583 -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 +341 -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 +653 -0
- package/dist/kotlin/app-modules.js +111 -0
- package/dist/kotlin/arguments.js +403 -0
- package/dist/kotlin/assignment.js +226 -0
- package/dist/kotlin/builtins.js +571 -0
- package/dist/kotlin/calls.js +523 -0
- package/dist/kotlin/checked.js +61 -0
- package/dist/kotlin/class-accessors.js +129 -0
- package/dist/kotlin/class-constructor.js +129 -0
- package/dist/kotlin/class-declaration.js +337 -0
- package/dist/kotlin/class-fields.js +362 -0
- package/dist/kotlin/class-methods.js +219 -0
- package/dist/kotlin/classes.js +333 -0
- package/dist/kotlin/components.js +455 -0
- package/dist/kotlin/construction.js +235 -0
- package/dist/kotlin/control-flow.js +188 -0
- package/dist/kotlin/conversion.js +513 -0
- package/dist/kotlin/core-api.js +751 -0
- package/dist/kotlin/core-index.js +228 -0
- package/dist/kotlin/declarations.js +463 -0
- package/dist/kotlin/diagnostics.js +28 -0
- package/dist/kotlin/expression-statements.js +228 -0
- package/dist/kotlin/expressions.js +468 -0
- package/dist/kotlin/functions.js +488 -0
- package/dist/kotlin/global-calls.js +318 -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 +639 -0
- package/dist/kotlin/loops.js +185 -0
- package/dist/kotlin/mixins.js +103 -0
- package/dist/kotlin/modules.js +769 -0
- package/dist/kotlin/names.js +273 -0
- package/dist/kotlin/narrowing.js +180 -0
- package/dist/kotlin/native/api.js +125 -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 +379 -0
- package/dist/kotlin/native/types.js +424 -0
- package/dist/kotlin/operators.js +452 -0
- package/dist/kotlin/optional-chains.js +279 -0
- package/dist/kotlin/overrides.js +835 -0
- package/dist/kotlin/placement.js +749 -0
- package/dist/kotlin/prototype-calls.js +159 -0
- package/dist/kotlin/render.js +425 -0
- package/dist/kotlin/state-backend.js +123 -0
- package/dist/kotlin/statements.js +435 -0
- package/dist/kotlin/static-calls.js +297 -0
- package/dist/kotlin/syntax.js +689 -0
- package/dist/kotlin/translator-types.js +1 -0
- package/dist/kotlin/translator.js +810 -0
- package/dist/kotlin/type-facts.js +414 -0
- package/dist/kotlin/type-tests.js +250 -0
- package/dist/kotlin/types.js +662 -0
- package/dist/kotlin/untyped-values.js +356 -0
- package/dist/plugins/bindings-android.js +69 -0
- package/dist/plugins/bindings.js +93 -0
- package/dist/plugins/native-android.js +586 -0
- package/dist/plugins/native-ios.js +634 -0
- package/dist/plugins/resolve.js +108 -0
- package/dist/plugins/source.js +1174 -0
- package/dist/program/app-modules.js +127 -0
- package/dist/program/app-paths.js +128 -0
- package/dist/program/build-caches.js +14 -0
- package/dist/program/build-context.js +48 -0
- package/dist/program/class-mixins.js +463 -0
- package/dist/program/constructor-factories.js +134 -0
- package/dist/program/core-facts.js +158 -0
- package/dist/program/core-patches.js +59 -0
- package/dist/program/env.js +4 -0
- package/dist/program/glob.js +274 -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 +429 -0
- package/dist/program/program.js +918 -0
- package/dist/program/properties.js +61 -0
- package/dist/program/reach.js +444 -0
- package/dist/program/source-lines.js +271 -0
- package/dist/program/stable-names.js +112 -0
- package/dist/program/vite-plugins.js +144 -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 +26 -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 +67 -0
- package/dist/semantics/apis/string.js +45 -0
- package/dist/semantics/ast.js +333 -0
- package/dist/semantics/async.js +582 -0
- package/dist/semantics/class-plan.js +168 -0
- package/dist/semantics/classes.js +597 -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 +49 -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 +262 -0
- package/dist/semantics/lang/this-args.js +189 -0
- package/dist/semantics/lang.js +244 -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 +936 -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 +77 -0
- package/dist/semantics/regexp.js +219 -0
- package/dist/semantics/result-shapes.js +203 -0
- package/dist/semantics/runtime.js +483 -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 +881 -0
- package/dist/semantics/top-names.js +59 -0
- package/dist/semantics/translator-methods.js +602 -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 +478 -0
- package/dist/semantics/worker-state.js +198 -0
- package/dist/swift/access.js +769 -0
- package/dist/swift/app-modules.js +41 -0
- package/dist/swift/arguments.js +245 -0
- package/dist/swift/assignment.js +281 -0
- package/dist/swift/availability.js +146 -0
- package/dist/swift/builtins.js +818 -0
- package/dist/swift/calls.js +497 -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 +144 -0
- package/dist/swift/class-declaration.js +308 -0
- package/dist/swift/class-fields.js +361 -0
- package/dist/swift/class-methods.js +247 -0
- package/dist/swift/classes.js +524 -0
- package/dist/swift/components.js +406 -0
- package/dist/swift/construction.js +295 -0
- package/dist/swift/control-flow.js +210 -0
- package/dist/swift/conversion.js +425 -0
- package/dist/swift/core-api.js +1065 -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 +575 -0
- package/dist/swift/from-any.js +316 -0
- package/dist/swift/functions.js +509 -0
- package/dist/swift/generics.js +128 -0
- package/dist/swift/global-calls.js +219 -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 +556 -0
- package/dist/swift/loops.js +245 -0
- package/dist/swift/marks.js +212 -0
- package/dist/swift/members.js +253 -0
- package/dist/swift/method-values.js +179 -0
- package/dist/swift/mixins.js +113 -0
- package/dist/swift/modules.js +969 -0
- package/dist/swift/names.js +370 -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 +820 -0
- package/dist/swift/native/sdk-types.js +1 -0
- package/dist/swift/native/sdk.js +417 -0
- package/dist/swift/native/subclasses.js +533 -0
- package/dist/swift/object-classes.js +396 -0
- package/dist/swift/operators.js +578 -0
- package/dist/swift/optional-chains.js +405 -0
- package/dist/swift/parameters.js +213 -0
- package/dist/swift/placement.js +941 -0
- package/dist/swift/protocols.js +164 -0
- package/dist/swift/prototype-calls.js +242 -0
- package/dist/swift/render.js +449 -0
- package/dist/swift/results.js +370 -0
- package/dist/swift/state-backend.js +243 -0
- package/dist/swift/statements.js +514 -0
- package/dist/swift/static-calls.js +325 -0
- package/dist/swift/syntax.js +916 -0
- package/dist/swift/translator-types.js +1 -0
- package/dist/swift/translator.js +890 -0
- package/dist/swift/type-facts.js +530 -0
- package/dist/swift/type-tests.js +211 -0
- package/dist/swift/types.js +665 -0
- package/dist/targets/android/build.js +602 -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 +584 -0
- package/dist/targets/ios/core-native.js +149 -0
- package/dist/targets/ios/dependencies.js +476 -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 +194 -0
- package/dist/template/model.js +38 -0
- package/dist/template/plan.js +673 -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 +696 -0
- package/dist/types/binding-api.d.ts +48 -0
- package/dist/types/elements.d.ts +10 -0
- package/dist/types/ir.d.ts +292 -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 +32114 -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 +3595 -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 +368 -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 +689 -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 +702 -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 +526 -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 +318 -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 +1263 -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 +6403 -0
- package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +4432 -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_fa18e1.swift +338 -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_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 +203 -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 +699 -0
- package/kit-apple/Sources/NativeScriptKit/Core/data.observable.index.swift +1166 -0
- package/kit-apple/Sources/NativeScriptKit/Core/data.virtual-array.index.swift +325 -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 +414 -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 +30598 -0
- package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +3382 -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 +4345 -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 +3235 -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 +1047 -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 +454 -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 +78 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +1693 -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 +474 -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 +372 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Inspect.swift +762 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +42 -0
- package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +799 -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 +597 -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 +496 -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 +582 -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 +2069 -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,1263 @@
|
|
|
1
|
+
package org.nativescript.kit
|
|
2
|
+
|
|
3
|
+
import kotlin.contracts.ExperimentalContracts
|
|
4
|
+
import kotlin.contracts.contract
|
|
5
|
+
|
|
6
|
+
// Values as translated TypeScript holds them: `any`/`unknown` is `Any?`, Kotlin's
|
|
7
|
+
// `null` is `undefined`, `jsNull` is `null`, numbers are `Double`, `void` is `Unit`,
|
|
8
|
+
// objects are classes compared by identity, functions are Kotlin function values.
|
|
9
|
+
// Plain JVM: the differential tests run this package on the host.
|
|
10
|
+
|
|
11
|
+
/** JavaScript `null`. `undefined` is Kotlin's `null`. */
|
|
12
|
+
object JSNull {
|
|
13
|
+
override fun toString(): String = "null"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
val jsNull: JSNull get() = JSNull
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* A typed slot that may hold undefined, null or a `T`, where the program tells null from undefined (a
|
|
20
|
+
* `T | null | undefined` whose code compares it with either). It holds its value as script does: Kotlin's null is
|
|
21
|
+
* undefined, `jsNull` null.
|
|
22
|
+
*/
|
|
23
|
+
class JSNullish<out T> private constructor(@JvmField val jsAny: Any?) {
|
|
24
|
+
/** Its value, with null and undefined both Kotlin's null. */
|
|
25
|
+
@Suppress("UNCHECKED_CAST")
|
|
26
|
+
val optional: T? get() = if (jsAny === JSNull) null else jsAny as T?
|
|
27
|
+
|
|
28
|
+
/** Its value where a typed use needs one: JavaScript's TypeError reading `key` when it is null or undefined. */
|
|
29
|
+
@Suppress("UNCHECKED_CAST")
|
|
30
|
+
fun present(key: String): T = if (jsAny == null) jsCannotRead(key) else if (jsAny === JSNull) jsCannotReadNull(key) else jsAny as T
|
|
31
|
+
|
|
32
|
+
/** Its value where a member of it is set: JavaScript's TypeError setting `key` when it is null or undefined. */
|
|
33
|
+
@Suppress("UNCHECKED_CAST")
|
|
34
|
+
fun presentToSet(key: String): T = if (jsAny == null) jsCannotSet(key) else if (jsAny === JSNull) throw JSException(JSTypeError("Cannot set properties of null (setting '$key')")) else jsAny as T
|
|
35
|
+
|
|
36
|
+
/** Strict equality, as `indexOf`, `includes` and a Set's or Map's keys compare: null is only null, undefined only undefined. */
|
|
37
|
+
override fun equals(other: Any?): Boolean = other is JSNullish<*> && jsStrictEquals(jsAny, other.jsAny)
|
|
38
|
+
|
|
39
|
+
override fun hashCode(): Int = jsAny?.hashCode() ?: 0
|
|
40
|
+
|
|
41
|
+
companion object {
|
|
42
|
+
@JvmField val Undefined: JSNullish<Nothing> = JSNullish(null)
|
|
43
|
+
@JvmField val Null: JSNullish<Nothing> = JSNullish(JSNull)
|
|
44
|
+
|
|
45
|
+
/** A typed value whose null is undefined. */
|
|
46
|
+
fun <T> of(value: T?): JSNullish<T> = if (value == null) Undefined else JSNullish(value)
|
|
47
|
+
|
|
48
|
+
/** A typed value whose null is JavaScript's null. */
|
|
49
|
+
fun <T> ofNull(value: T?): JSNullish<T> = if (value == null) Null else JSNullish(value)
|
|
50
|
+
|
|
51
|
+
/** An untyped value: `jsNull` is null and null undefined; a present one is `present`'s (which throws the TypeError for another type). */
|
|
52
|
+
fun <T> ofAny(value: Any?, present: (Any) -> T): JSNullish<T> {
|
|
53
|
+
val v = jsBox(value)
|
|
54
|
+
return if (v == null) Undefined else if (v === JSNull) Null else JSNullish(present(v))
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** A field read untyped: null where the object notes the key as set to null (`jsNulls`), else its value. */
|
|
60
|
+
fun jsNullable(value: Any?, nulls: Set<String>?, key: String): Any? = if (value == null && nulls?.contains(key) == true) jsNull else value
|
|
61
|
+
|
|
62
|
+
/** A value typed `T | null`, which Kotlin holds as a nullable, read untyped: null is JavaScript's null. */
|
|
63
|
+
fun jsNulled(value: Any?): Any? = value ?: jsNull
|
|
64
|
+
|
|
65
|
+
/** A map value of `T | null` values read untyped: a missing one is undefined, a held null null. */
|
|
66
|
+
fun <K, V> jsNulledEntry(map: JSMap<K, V>, key: K): Any? = if (map.has(key)) jsNulled(map.get(key)) else null
|
|
67
|
+
|
|
68
|
+
/** An array element of `T | null` values read untyped: past the end is undefined, a held null null. */
|
|
69
|
+
fun <T> jsNulledElement(array: JSArray<T>, index: Double): Any? {
|
|
70
|
+
val k = index.toInt()
|
|
71
|
+
return if (k.toDouble() == index && k >= 0 && k < array.storage.size) jsNulled(array.storage[k]) else null
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** The keys of `obj` among `keys` that hold null, for a typed object read from it. */
|
|
75
|
+
fun jsNullKeys(obj: Any?, keys: List<String>): MutableSet<String>? {
|
|
76
|
+
val dynamic = obj as? JSDynamic ?: return null
|
|
77
|
+
val nulls = keys.filter { dynamic.jsGet(it) is JSNull }
|
|
78
|
+
return if (nulls.isEmpty()) null else nulls.toMutableSet()
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** The keys of `obj` among `keys` that it holds as undefined, for a typed object read from it. */
|
|
82
|
+
fun jsUnsetKeys(obj: Any?, keys: List<String>): MutableSet<String>? {
|
|
83
|
+
val dynamic = obj as? JSDynamic ?: return null
|
|
84
|
+
val own = dynamic.jsKeys
|
|
85
|
+
val unset = keys.filter { it in own && dynamic.jsGet(it) == null }
|
|
86
|
+
return if (unset.isEmpty()) null else unset.toMutableSet()
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** An object literal's keys that hold null: `known` ones, and those of `values` (untyped values it was given) that are null. */
|
|
90
|
+
fun jsNullKeysOf(known: List<String>, vararg values: Pair<String, Any?>): MutableSet<String>? {
|
|
91
|
+
val nulls = known + values.filter { it.second is JSNull }.map { it.first }
|
|
92
|
+
return if (nulls.isEmpty()) null else nulls.toMutableSet()
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** A field written untyped: the keys noted as holding null once `value` is written at `key`. */
|
|
96
|
+
fun jsNoteNull(nulls: MutableSet<String>?, key: String, value: Any?): MutableSet<String>? =
|
|
97
|
+
if (value is JSNull) (nulls ?: mutableSetOf()).also { it.add(key) } else nulls?.also { it.remove(key) }
|
|
98
|
+
|
|
99
|
+
/** A string, number or boolean field written untyped, whose storage can only hold its zero: the keys noted as holding undefined (`jsUnset`) once `value` is written at `key`. */
|
|
100
|
+
fun jsNoteUnset(unset: MutableSet<String>?, key: String, value: Any?): MutableSet<String>? =
|
|
101
|
+
if (value == null) (unset ?: mutableSetOf()).also { it.add(key) } else unset?.also { it.remove(key) }
|
|
102
|
+
|
|
103
|
+
/** Such a field read untyped: the null or undefined it notes, else its value. */
|
|
104
|
+
fun jsNotedNullish(value: Any?, nulls: Set<String>?, unset: Set<String>?, key: String): Any? =
|
|
105
|
+
if (nulls?.contains(key) == true) jsNull else if (unset?.contains(key) == true) null else value
|
|
106
|
+
|
|
107
|
+
/** An object literal's optional fields given null or undefined, as its values run: the keys its shape notes (`jsNulls`, `jsUnset`). */
|
|
108
|
+
class JSLiteralKeys(var nulls: MutableSet<String>? = null, var unset: MutableSet<String>? = null) {
|
|
109
|
+
/** An untyped value, before it is converted to the field's type, which holds null and undefined both as Kotlin's null. */
|
|
110
|
+
fun untyped(key: String, value: Any?): Any? {
|
|
111
|
+
if (value == null) unset = (unset ?: mutableSetOf()).also { it.add(key) } else if (value is JSNull) nulls = (nulls ?: mutableSetOf()).also { it.add(key) }
|
|
112
|
+
return value
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** A typed value, whose null is undefined. */
|
|
116
|
+
fun <T> typed(key: String, value: T): T {
|
|
117
|
+
if (value == null) unset = (unset ?: mutableSetOf()).also { it.add(key) }
|
|
118
|
+
return value
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** A typed value, whose null is null. */
|
|
122
|
+
fun <T> nulled(key: String, value: T): T {
|
|
123
|
+
if (value == null) nulls = (nulls ?: mutableSetOf()).also { it.add(key) }
|
|
124
|
+
return value
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* A class's instance whose keys a write can make out of its fields' declared order (assign mode's fields without an
|
|
130
|
+
* initializer, a field deleted and written again): `jsOrder` is null while the keys run in `jsFieldKeys`' order.
|
|
131
|
+
*/
|
|
132
|
+
interface JSKeyOrdered {
|
|
133
|
+
var jsOrder: List<String>?
|
|
134
|
+
val jsFieldKeys: List<String>
|
|
135
|
+
/** The keys script gave the object (its expando's), which `jsFieldKeys`' order puts after the fields. */
|
|
136
|
+
val jsAddedKeys: List<String> get() = listOf()
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Whether a key made now needs noting: the fields' order alone no longer places it last. */
|
|
140
|
+
val JSKeyOrdered.jsKeysNoted: Boolean get() = jsOrder != null || jsAddedKeys.isNotEmpty()
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* `key` made just now: last among the keys. `early`: made before its class's level of the constructor started, so before
|
|
144
|
+
* keys its static place is after.
|
|
145
|
+
*/
|
|
146
|
+
fun JSKeyOrdered.jsKeyMade(key: String, early: Boolean = false) {
|
|
147
|
+
val keys = jsOrderedKeys(jsOrder, jsFieldKeys + jsAddedKeys)
|
|
148
|
+
if (jsOrder == null && !early && keys.lastOrNull() == key) return
|
|
149
|
+
jsOrder = keys.filter { it != key } + key
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* A library class's instance whose fields declared without a value are keys from their first write: a bit each tells which
|
|
154
|
+
* are, and `jsMade` is null until one is written, then lists every key made since, in the order made (such a field, a later
|
|
155
|
+
* constructor level's keys, a key script adds).
|
|
156
|
+
*/
|
|
157
|
+
interface JSKeysMade {
|
|
158
|
+
var jsMade: MutableList<String>?
|
|
159
|
+
/** Its declared fields' keys present, in the order its constructor makes them. */
|
|
160
|
+
val jsDeclaredKeys: List<String>
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** A key made now, last in the record (the class's `jsMadeNote<k>` tells a field's first write). */
|
|
164
|
+
fun jsMadeNote(o: JSKeysMade, key: String) {
|
|
165
|
+
val made = o.jsMade
|
|
166
|
+
if (made == null) o.jsMade = ArrayList<String>(4).also { it.add(key) } else made.add(key)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/** A key made anew once the record began (a key script adds, maybe again after a delete): last. */
|
|
170
|
+
fun jsMadeAgain(o: JSKeysMade, key: String) {
|
|
171
|
+
val made = o.jsMade ?: return
|
|
172
|
+
made.remove(key)
|
|
173
|
+
made.add(key)
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** A constructor level's keys, made as it starts: last, where a base level began the record; a key made already keeps its place. */
|
|
177
|
+
fun jsMadeLevel(o: JSKeysMade, keys: List<String>) {
|
|
178
|
+
val made = o.jsMade ?: return
|
|
179
|
+
for (k in keys) if (k !in made) made.add(k)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** An object's present keys `keys` (in their static order) with those its record `made` notes last, in the record's order. */
|
|
183
|
+
fun jsMadeKeys(made: List<String>?, keys: List<String>): List<String> {
|
|
184
|
+
if (made == null) return keys
|
|
185
|
+
return keys.filter { it !in made } + made.filter { it in keys }
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/** An object's present field keys `keys` in the order `order` notes, any it lacks after. */
|
|
189
|
+
fun jsOrderedKeys(order: List<String>?, keys: List<String>): List<String> {
|
|
190
|
+
if (order == null) return keys
|
|
191
|
+
return order.filter { it in keys } + keys.filter { it !in order }
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* An object whose properties dynamic code reaches by name (`o[key]`, JSON, `console.log`):
|
|
196
|
+
* plain objects (`JSObject`) and the classes generated for TypeScript classes and interfaces.
|
|
197
|
+
* A null `jsClassName` prints as a plain object (`{ a: 1 }`), otherwise as `Name { a: 1 }`.
|
|
198
|
+
*/
|
|
199
|
+
interface JSDynamic {
|
|
200
|
+
fun jsGet(key: String): Any?
|
|
201
|
+
fun jsSet(key: String, value: Any?)
|
|
202
|
+
val jsKeys: List<String>
|
|
203
|
+
val jsClassName: String?
|
|
204
|
+
/** A member the class declares (an accessor, a method), which `in` finds though it is no own key. */
|
|
205
|
+
fun jsHasMember(key: String): Boolean = false
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** A class with its own `toString()`, which JavaScript's string conversion calls. */
|
|
209
|
+
interface JSStringConvertible
|
|
210
|
+
|
|
211
|
+
/** A class with its own `valueOf()`, which ToPrimitive calls before `toString()` (arithmetic, comparisons, `+`). */
|
|
212
|
+
interface JSValueOf {
|
|
213
|
+
fun jsValueOf(): Any?
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** A value as JavaScript sees it: `Unit` (a void result) is undefined, a `JSNullish` the value it holds. */
|
|
217
|
+
fun jsBox(value: Any?): Any? = if (value === Unit) null else if (value is JSNullish<*>) value.jsAny else value
|
|
218
|
+
|
|
219
|
+
/** Whether `value` is a function value. */
|
|
220
|
+
fun jsIsFunction(value: Any?): Boolean = value is Function<*> || value is JSFunction || value is JavaMethodRef
|
|
221
|
+
|
|
222
|
+
/** The numeric value of a JVM number a native API returned. */
|
|
223
|
+
fun jsNumeric(value: Any?): Double? = when (value) {
|
|
224
|
+
is Double -> value
|
|
225
|
+
is Int -> value.toDouble()
|
|
226
|
+
is Float -> value.toDouble()
|
|
227
|
+
is Long -> value.toDouble()
|
|
228
|
+
is Short -> value.toDouble()
|
|
229
|
+
is Byte -> value.toDouble()
|
|
230
|
+
else -> null
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** `a < b` for strings: UTF-16 code unit order, which Kotlin's `compareTo` is. */
|
|
234
|
+
fun jsStringLess(a: String, b: String): Boolean = a < b
|
|
235
|
+
|
|
236
|
+
/** The array index a property key names (`"0"`…`"4294967294"`), if it names one. */
|
|
237
|
+
fun jsArrayIndex(key: String): Long? {
|
|
238
|
+
val n = key.length
|
|
239
|
+
if (n == 0 || n > 10) return null
|
|
240
|
+
val first = key[0]
|
|
241
|
+
if (first !in '0'..'9') return null
|
|
242
|
+
if (first == '0') return if (n == 1) 0L else null
|
|
243
|
+
var v = 0L
|
|
244
|
+
for (c in key) {
|
|
245
|
+
if (c !in '0'..'9') return null
|
|
246
|
+
v = v * 10 + (c - '0')
|
|
247
|
+
}
|
|
248
|
+
return if (v < 4_294_967_295L) v else null
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// Plain objects
|
|
252
|
+
|
|
253
|
+
/** An object literal `{ k: v, … }`: its keys defined in the order given. */
|
|
254
|
+
fun jsObjectOf(vararg entries: Pair<String, Any?>): JSObject = JSObject(*entries)
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* A plain JavaScript object. Own keys enumerate in JavaScript order: array-index keys
|
|
258
|
+
* ascending, then the other keys in insertion order.
|
|
259
|
+
*/
|
|
260
|
+
class JSObject() : JSDynamic, JSSymbolKeyed, JSAccessorKeyed, JSReactiveConvertible {
|
|
261
|
+
private val storage = HashMap<String, Any?>()
|
|
262
|
+
private val indexKeys = ArrayList<Long>()
|
|
263
|
+
private val namedKeys = ArrayList<String>()
|
|
264
|
+
/** Properties that are accessors or not plain writable, enumerable, configurable data. */
|
|
265
|
+
private val slots = HashMap<String, JSPropertySlot>()
|
|
266
|
+
var extensible = true
|
|
267
|
+
private set
|
|
268
|
+
var jsTracker: JSTracker? = null
|
|
269
|
+
|
|
270
|
+
/** Created without a prototype (`Object.create(null)`, a match's `groups`): inspect prints `[Object: null prototype]`. */
|
|
271
|
+
var jsNullPrototype = false
|
|
272
|
+
|
|
273
|
+
/** What weak collections hold for this object as their key. */
|
|
274
|
+
internal var weakSlots: JSWeakSlots? = null
|
|
275
|
+
|
|
276
|
+
constructor(entries: List<Pair<String, Any?>>) : this() {
|
|
277
|
+
for ((k, v) in entries) define(k, v)
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
constructor(vararg entries: Pair<String, Any?>) : this() {
|
|
281
|
+
for ((k, v) in entries) define(k, v)
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/** The prototype `Object.create(proto)` gave: a key the object lacks is read from it. */
|
|
285
|
+
var jsPrototype: Any? = null
|
|
286
|
+
|
|
287
|
+
operator fun get(key: String): Any? {
|
|
288
|
+
if (slots.isNotEmpty()) slots[key]?.get?.let { return it(this) }
|
|
289
|
+
jsPrototype?.let { proto -> if (!storage.containsKey(key)) return jsBox(proto).let { p -> if (p is JSObject) p.get(key, this) else jsGet(p, key) } }
|
|
290
|
+
val tracker = jsTracker ?: return storage[key]
|
|
291
|
+
tracker.track()
|
|
292
|
+
return jsReactiveAny(storage[key])
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/** `object[key]` read for `receiver`, which an accessor sees as `this` (an instance reading its prototype's). */
|
|
296
|
+
fun get(key: String, receiver: Any?): Any? {
|
|
297
|
+
if (slots.isNotEmpty()) slots[key]?.let { if (it.isAccessor) return it.get?.invoke(receiver) }
|
|
298
|
+
val proto = jsBox(jsPrototype)
|
|
299
|
+
if (proto is JSObject && !storage.containsKey(key)) return proto.get(key, receiver)
|
|
300
|
+
return this[key]
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/** The object of the prototype chain that has `key`, the object itself excluded. */
|
|
304
|
+
private fun inheritedHolder(key: String): JSObject? {
|
|
305
|
+
var p = jsBox(jsPrototype)
|
|
306
|
+
while (p is JSObject) {
|
|
307
|
+
if (p.storage.containsKey(key)) return p
|
|
308
|
+
p = jsBox(p.jsPrototype)
|
|
309
|
+
}
|
|
310
|
+
return null
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** The setter of an accessor property; it takes the receiver as `this`. */
|
|
314
|
+
fun setter(key: String): ((Any?, Any?) -> Unit)? = slots[key]?.takeIf { it.isAccessor }?.set
|
|
315
|
+
|
|
316
|
+
operator fun set(key: String, value: Any?) = put(key, value)
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* `object[key] = value` in strict code: a read-only property, a getter without a setter
|
|
320
|
+
* or a new key on an object that is not extensible throws a TypeError.
|
|
321
|
+
*/
|
|
322
|
+
fun put(key: String, value: Any?) {
|
|
323
|
+
val slot = slots[key]
|
|
324
|
+
if (slot != null) {
|
|
325
|
+
if (slot.isAccessor) {
|
|
326
|
+
val setter = slot.set ?: throw JSException(JSTypeError("Cannot set property $key of #<Object> which has only a getter"))
|
|
327
|
+
return setter(this, value)
|
|
328
|
+
}
|
|
329
|
+
if (!slot.writable) throw JSException(JSTypeError("Cannot assign to read only property '$key' of object '#<Object>'"))
|
|
330
|
+
} else if (!storage.containsKey(key)) {
|
|
331
|
+
// OrdinarySet: an inherited accessor runs with this object as `this`; an inherited read-only value refuses.
|
|
332
|
+
inheritedHolder(key)?.slots?.get(key)?.let { inherited ->
|
|
333
|
+
if (inherited.isAccessor) {
|
|
334
|
+
val setter = inherited.set ?: throw JSException(JSTypeError("Cannot set property $key of #<Object> which has only a getter"))
|
|
335
|
+
return setter(this, value)
|
|
336
|
+
}
|
|
337
|
+
if (!inherited.writable) throw JSException(JSTypeError("Cannot assign to read only property '$key' of object '#<Object>'"))
|
|
338
|
+
}
|
|
339
|
+
if (!extensible) throw JSException(JSTypeError("Cannot add property $key, object is not extensible"))
|
|
340
|
+
}
|
|
341
|
+
val tracker = jsTracker
|
|
342
|
+
if (tracker == null) { define(key, value); return }
|
|
343
|
+
val had = storage.containsKey(key)
|
|
344
|
+
val old = storage[key]
|
|
345
|
+
define(key, value)
|
|
346
|
+
if (had && jsSameValue(old, value)) return
|
|
347
|
+
tracker.trigger()
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/** `Object.defineProperty(object, key, descriptor)`; attributes the descriptor leaves out are false for a new property. */
|
|
351
|
+
fun defineProperty(key: String, d: JSPropertyDescriptor) {
|
|
352
|
+
val exists = storage.containsKey(key)
|
|
353
|
+
val slot = slots[key] ?: JSPropertySlot(enumerable = exists, writable = exists, configurable = exists)
|
|
354
|
+
if (!exists && !extensible) throw JSException(JSTypeError("Cannot define property $key, object is not extensible"))
|
|
355
|
+
if (exists && !slot.configurable) {
|
|
356
|
+
val changes = d.get != null || d.set != null || d.configurable == true || (d.enumerable != null && d.enumerable != slot.enumerable) ||
|
|
357
|
+
(!slot.writable && (d.writable == true || (d.hasValue && !jsSameValue(d.value, storage[key]))))
|
|
358
|
+
if (changes) throw JSException(JSTypeError("Cannot redefine property: $key"))
|
|
359
|
+
}
|
|
360
|
+
if (d.get != null || d.set != null) {
|
|
361
|
+
slot.get = d.get; slot.set = d.set; slot.isAccessor = true; slot.writable = false
|
|
362
|
+
} else if (d.hasValue || d.writable != null) {
|
|
363
|
+
if (slot.isAccessor) { slot.get = null; slot.set = null; slot.isAccessor = false }
|
|
364
|
+
}
|
|
365
|
+
d.enumerable?.let { slot.enumerable = it }
|
|
366
|
+
d.writable?.let { slot.writable = it }
|
|
367
|
+
d.configurable?.let { slot.configurable = it }
|
|
368
|
+
define(key, if (slot.isAccessor) null else if (d.hasValue) d.value else storage[key])
|
|
369
|
+
if (slot.isPlain) slots.remove(key) else slots[key] = slot
|
|
370
|
+
jsTracker?.trigger()
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/** `Object.getOwnPropertyDescriptor(object, key)`. */
|
|
374
|
+
fun descriptor(key: String): JSObject? {
|
|
375
|
+
if (!storage.containsKey(key)) return null
|
|
376
|
+
val slot = slots[key] ?: JSPropertySlot()
|
|
377
|
+
if (slot.isAccessor) {
|
|
378
|
+
val g = slot.get
|
|
379
|
+
val s = slot.set
|
|
380
|
+
return JSObject(listOf(
|
|
381
|
+
Pair("get", g?.let { { -> it(this) } }), Pair("set", s?.let { { v: Any? -> it(this, v) } }),
|
|
382
|
+
Pair("enumerable", slot.enumerable), Pair("configurable", slot.configurable)))
|
|
383
|
+
}
|
|
384
|
+
return JSObject(listOf(Pair("value", storage[key]), Pair("writable", slot.writable), Pair("enumerable", slot.enumerable), Pair("configurable", slot.configurable)))
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/** `Object.freeze`, `Object.seal`, `Object.preventExtensions`. */
|
|
388
|
+
fun restrict(sealed: Boolean, frozen: Boolean) {
|
|
389
|
+
extensible = false
|
|
390
|
+
if (!sealed && !frozen) return
|
|
391
|
+
for (key in indexKeys.map { it.toString() } + namedKeys) {
|
|
392
|
+
val slot = slots[key] ?: JSPropertySlot()
|
|
393
|
+
slot.configurable = false
|
|
394
|
+
if (frozen && !slot.isAccessor) slot.writable = false
|
|
395
|
+
slots[key] = slot
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
val isSealed: Boolean get() = !extensible && storage.keys.all { !(slots[it] ?: JSPropertySlot()).configurable }
|
|
400
|
+
val isFrozen: Boolean get() = !extensible && storage.keys.all { val s = slots[it] ?: JSPropertySlot(); !s.configurable && (s.isAccessor || !s.writable) }
|
|
401
|
+
|
|
402
|
+
override fun jsAccessorKind(key: String): String? {
|
|
403
|
+
val slot = slots[key] ?: return null
|
|
404
|
+
if (!slot.isAccessor) return null
|
|
405
|
+
return if (slot.get != null && slot.set != null) "Getter/Setter" else if (slot.get != null) "Getter" else "Setter"
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/** `Object.getOwnPropertyNames(object)`: string keys, enumerable or not. */
|
|
409
|
+
val ownPropertyNames: List<String> get() = indexKeys.map { it.toString() } + namedKeys.filter { !jsIsSymbolKey(it) }
|
|
410
|
+
|
|
411
|
+
private fun define(key: String, value: Any?) {
|
|
412
|
+
if (storage.containsKey(key)) { storage[key] = value; return }
|
|
413
|
+
storage[key] = value
|
|
414
|
+
val index = jsArrayIndex(key)
|
|
415
|
+
if (index != null) {
|
|
416
|
+
var low = 0
|
|
417
|
+
var high = indexKeys.size
|
|
418
|
+
while (low < high) {
|
|
419
|
+
val mid = (low + high) / 2
|
|
420
|
+
if (indexKeys[mid] < index) low = mid + 1 else high = mid
|
|
421
|
+
}
|
|
422
|
+
indexKeys.add(low, index)
|
|
423
|
+
} else namedKeys.add(key)
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/** `key in object` for own keys. */
|
|
427
|
+
fun has(key: String): Boolean {
|
|
428
|
+
jsTracker?.track()
|
|
429
|
+
return storage.containsKey(key)
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/** `delete object[key]`. */
|
|
433
|
+
fun delete(key: String): Boolean {
|
|
434
|
+
slots[key]?.let { if (!it.configurable) return false }
|
|
435
|
+
slots.remove(key)
|
|
436
|
+
if (!storage.containsKey(key)) return true
|
|
437
|
+
storage.remove(key)
|
|
438
|
+
val index = jsArrayIndex(key)
|
|
439
|
+
if (index != null) indexKeys.remove(index) else namedKeys.remove(key)
|
|
440
|
+
jsTracker?.trigger()
|
|
441
|
+
return true
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
val keys: List<String>
|
|
445
|
+
get() {
|
|
446
|
+
jsTracker?.track()
|
|
447
|
+
val all = indexKeys.map { it.toString() } + namedKeys.filter { !jsIsSymbolKey(it) }
|
|
448
|
+
return if (slots.isEmpty()) all else all.filter { slots[it]?.enumerable ?: true }
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
override val jsSymbolKeys: List<String>
|
|
452
|
+
get() {
|
|
453
|
+
jsTracker?.track()
|
|
454
|
+
return namedKeys.filter { jsIsSymbolKey(it) }
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
override fun jsGet(key: String): Any? = this[key]
|
|
458
|
+
override fun jsSet(key: String, value: Any?) { this[key] = value }
|
|
459
|
+
override val jsKeys: List<String> get() = keys
|
|
460
|
+
override var jsClassName: String? = null
|
|
461
|
+
|
|
462
|
+
override fun jsMakeReactive() {
|
|
463
|
+
if (jsTracker == null) jsTracker = JSTracker()
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
override fun toString(): String = jsInspect(this)
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// Property access
|
|
470
|
+
|
|
471
|
+
/** `object?.key`: undefined when the object is undefined or null. */
|
|
472
|
+
fun jsGetOptional(target: Any?, key: String): Any? = if (target == null || target === JSNull) null else jsGet(target, key)
|
|
473
|
+
|
|
474
|
+
/** `object[key]` / `object.key` on a dynamic value. Reading from undefined or null throws a TypeError. */
|
|
475
|
+
/** `Object.create(proto)`. */
|
|
476
|
+
fun jsObjectCreate(proto: Any?): JSObject = JSObject().also { if (jsBox(proto) === JSNull) it.jsNullPrototype = true else it.jsPrototype = proto }
|
|
477
|
+
|
|
478
|
+
fun jsGet(target: Any?, key: String): Any? = if (key == "constructor" && target != null && target !== JSNull && target !is JSObject && target !is Class<*>) jsConstructorOf(target) else when (target) {
|
|
479
|
+
null -> throw JSException(JSTypeError("Cannot read properties of undefined (reading '$key')"))
|
|
480
|
+
JSNull -> throw JSException(JSTypeError("Cannot read properties of null (reading '$key')"))
|
|
481
|
+
// What every object inherits (`{}.toString`), where the object has nothing of that name.
|
|
482
|
+
is JSObject -> target.jsGet(key) ?: if (!target.has(key) && !target.jsNullPrototype && JSPrototypes.objectPrototype.has(key)) JSPrototypes.objectPrototype[key] else null
|
|
483
|
+
is JSDynamic -> target.jsGet(key)
|
|
484
|
+
is JSArray<*> -> when {
|
|
485
|
+
key == "length" -> target.size.toDouble()
|
|
486
|
+
// A named property set on the array (`arr.label = …`, Object.defineProperty) before the method of that name.
|
|
487
|
+
else -> {
|
|
488
|
+
val idx = jsArrayIndex(key)
|
|
489
|
+
if (idx != null) { if (idx < target.size) target.storage[idx.toInt()] else null }
|
|
490
|
+
else {
|
|
491
|
+
val props = target.jsProperties
|
|
492
|
+
if (props != null && props.has(key)) props.get(key, target) else jsArrayMethod(target, key) ?: jsArrayGenericMethod(key)
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
is String -> when {
|
|
497
|
+
key == "length" -> target.length.toDouble()
|
|
498
|
+
else -> jsArrayIndex(key)?.let { if (it < target.length) target[it.toInt()].toString() else null } ?: jsStringMethod(target, key)
|
|
499
|
+
}
|
|
500
|
+
is Pair<*, *> -> when (key) { "0" -> target.first; "1" -> target.second; "length" -> 2.0; else -> null }
|
|
501
|
+
is Triple<*, *, *> -> when (key) { "0" -> target.first; "1" -> target.second; "2" -> target.third; "length" -> 3.0; else -> null }
|
|
502
|
+
is JSMap<*, *> -> if (key == "size") target.size else jsMapMethod(target, key)
|
|
503
|
+
is JSSet<*> -> if (key == "size") target.size else jsSetMethod(target, key)
|
|
504
|
+
is JSFunction, is JSMethod, is Function<*> -> jsFunctionGet(target, key)
|
|
505
|
+
is Double -> jsNumberMethod(target, key)
|
|
506
|
+
is Boolean -> jsBooleanMethod(target, key)
|
|
507
|
+
is JSBigInt -> jsBigIntMethod(target, key)
|
|
508
|
+
is JSSymbol, Unit -> null
|
|
509
|
+
is Class<*> -> jsClassGet(target, key)
|
|
510
|
+
else -> jsJavaGet(target, key)
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/** `object[key] = value` on a dynamic value. Writing to undefined or null throws a TypeError. */
|
|
514
|
+
fun jsSet(target: Any?, key: String, value: Any?) {
|
|
515
|
+
when (target) {
|
|
516
|
+
null -> throw JSException(JSTypeError("Cannot set properties of undefined (setting '$key')"))
|
|
517
|
+
JSNull -> throw JSException(JSTypeError("Cannot set properties of null (setting '$key')"))
|
|
518
|
+
is JSObject -> target.put(key, value)
|
|
519
|
+
is JSDynamic -> {
|
|
520
|
+
val level = jsRestriction(target)
|
|
521
|
+
if (level > 0) {
|
|
522
|
+
if (key !in target.jsKeys) throw JSException(JSTypeError("Cannot add property $key, object is not extensible"))
|
|
523
|
+
if (level == 3) throw JSException(JSTypeError("Cannot assign to read only property '$key' of object '#<Object>'"))
|
|
524
|
+
}
|
|
525
|
+
target.jsSet(key, value)
|
|
526
|
+
}
|
|
527
|
+
is JSArray<*> -> {
|
|
528
|
+
@Suppress("UNCHECKED_CAST") val array = target as JSArray<Any?>
|
|
529
|
+
if (key == "length") {
|
|
530
|
+
val length = jsToNumber(value)
|
|
531
|
+
if (length < 0 || length > 4_294_967_295.0 || length != Math.floor(length)) throw JSException(JSRangeError("Invalid array length"))
|
|
532
|
+
array.setLength(length.toInt())
|
|
533
|
+
} else jsArrayIndex(key)?.let { array.setAt(it.toInt(), value) }
|
|
534
|
+
?: run { (array.jsProperties ?: JSObject().also { array.jsProperties = it }).put(key, value) }
|
|
535
|
+
}
|
|
536
|
+
// A function's own `length` and `name` are read-only.
|
|
537
|
+
is Function<*>, is JSFunction -> if ((key == "length" || key == "name") && jsFunctionProperties(target, false)?.has(key) != true)
|
|
538
|
+
throw JSException(JSTypeError("Cannot assign to read only property '$key' of function '${jsToString(target)}'"))
|
|
539
|
+
else jsFunctionProperties(target, true)!!.put(key, value)
|
|
540
|
+
is String, is Double, is Boolean, is JSSymbol, is JSBigInt, Unit -> {}
|
|
541
|
+
else -> jsJavaSet(target, key, value)
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/** Calls a function stored in a dynamic value with JavaScript's argument rules. Anything else throws a TypeError. */
|
|
546
|
+
@Suppress("UNCHECKED_CAST")
|
|
547
|
+
fun jsCall(function: Any?, vararg args: Any?): Any? {
|
|
548
|
+
val a = { i: Int -> if (i < args.size) args[i] else null }
|
|
549
|
+
val result = when (function) {
|
|
550
|
+
is Function0<*> -> (function as () -> Any?)()
|
|
551
|
+
is Function1<*, *> -> (function as (Any?) -> Any?)(a(0))
|
|
552
|
+
is Function2<*, *, *> -> (function as (Any?, Any?) -> Any?)(a(0), a(1))
|
|
553
|
+
is Function3<*, *, *, *> -> (function as (Any?, Any?, Any?) -> Any?)(a(0), a(1), a(2))
|
|
554
|
+
is Function4<*, *, *, *, *> -> (function as (Any?, Any?, Any?, Any?) -> Any?)(a(0), a(1), a(2), a(3))
|
|
555
|
+
is Function5<*, *, *, *, *, *> -> (function as (Any?, Any?, Any?, Any?, Any?) -> Any?)(a(0), a(1), a(2), a(3), a(4))
|
|
556
|
+
is Function6<*, *, *, *, *, *, *> -> (function as (Any?, Any?, Any?, Any?, Any?, Any?) -> Any?)(a(0), a(1), a(2), a(3), a(4), a(5))
|
|
557
|
+
is Function7<*, *, *, *, *, *, *, *> -> (function as (Any?, Any?, Any?, Any?, Any?, Any?, Any?) -> Any?)(a(0), a(1), a(2), a(3), a(4), a(5), a(6))
|
|
558
|
+
is JSFunction -> function.body(args.toList())
|
|
559
|
+
is JSMethod -> function.call(null, args)
|
|
560
|
+
is JavaMethodRef -> function.call(args.toList())
|
|
561
|
+
else -> throw JSException(JSTypeError("${jsInspect(function)} is not a function"))
|
|
562
|
+
}
|
|
563
|
+
return jsBox(result)
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/** `f?.(args)` on an untyped value: undefined when `f` is undefined or null. */
|
|
567
|
+
fun jsCallOptional(function: Any?, vararg args: Any?): Any? = if (jsIsNullish(function)) null else jsCall(function, *args)
|
|
568
|
+
|
|
569
|
+
/** `Object.keys` for what translated code holds: a typed object, an untyped one, an array. */
|
|
570
|
+
fun jsKeysOf(value: Any?): List<String> = when (value) {
|
|
571
|
+
is String -> value.indices.map { it.toString() }
|
|
572
|
+
is JSDynamic -> value.jsKeys
|
|
573
|
+
is Function<*>, is JSFunction -> jsFunctionProperties(value, false)?.jsKeys ?: emptyList()
|
|
574
|
+
is JSArray<*> -> (0 until value.size).filter { value.jsHoles?.get(it) != true }.map { it.toString() } + (value.jsProperties?.jsKeys ?: emptyList())
|
|
575
|
+
else -> emptyList()
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
fun jsObjectKeys(value: Any?): JSArray<String> = JSArray(jsKeysOf(value))
|
|
579
|
+
|
|
580
|
+
fun jsObjectValues(value: Any?): JSArray<Any?> = when (value) {
|
|
581
|
+
is JSDynamic -> JSArray(value.jsKeys.map { value.jsGet(it) })
|
|
582
|
+
is JSArray<*> -> JSArray(jsKeysOf(value).map { jsField(value, it) })
|
|
583
|
+
else -> JSArray()
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
fun jsObjectEntries(value: Any?): JSArray<Pair<String, Any?>> = when (value) {
|
|
587
|
+
is JSDynamic -> JSArray(value.jsKeys.map { Pair(it, value.jsGet(it)) })
|
|
588
|
+
is JSArray<*> -> JSArray(jsKeysOf(value).map { Pair(it, jsField(value, it)) })
|
|
589
|
+
else -> JSArray()
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/** `Object.assign(target, ...sources)`. */
|
|
593
|
+
fun <T : JSDynamic> jsObjectAssign(target: T, vararg sources: Any?): T {
|
|
594
|
+
for (source in sources) {
|
|
595
|
+
when (source) {
|
|
596
|
+
is JSDynamic -> for (key in source.jsKeys) target.jsSet(key, source.jsGet(key))
|
|
597
|
+
is JSArray<*>, is String -> for (key in jsKeysOf(source)) target.jsSet(key, jsField(source, key))
|
|
598
|
+
else -> {}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
return target
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/** `key in object`. A field given a descriptor is the object's own even where hidden from `jsKeys`. */
|
|
605
|
+
fun jsHasKey(target: Any?, key: String): Boolean = jsHasKeyOf(jsIdentity(target), key)
|
|
606
|
+
private fun jsHasKeyOf(target: Any?, key: String): Boolean = if (target is JSError && (key == "message" || key == "name" || jsErrorOwns(target, key))) true else if (target is JSDefinable && !jsIsSymbolKey(key) && target.jsDefined?.has(key) == true) true else when (target) {
|
|
607
|
+
is JSObject -> target.has(key) || when (val p = jsBox(target.jsPrototype) ?: JSPrototypes.prototypeOf(target)) {
|
|
608
|
+
JSNull -> false
|
|
609
|
+
else -> jsHasKeyOf(jsIdentity(p), key)
|
|
610
|
+
}
|
|
611
|
+
// A symbol is no key a class declares: only its own symbol-keyed members (methods its `jsGet` gives) and what was set on it have one (reading `jsKeys` runs accessors).
|
|
612
|
+
is JSExpando -> if (jsIsSymbolKey(key)) jsExpandoHas(target, key) || target.jsSymbolKeys.contains(key) || target.jsGet(key) != null else jsExpandoHas(target, key) || key in target.jsKeys || target.jsHasMember(key) || JSPrototypes.objectPrototype.has(key)
|
|
613
|
+
is JSDynamic -> if (jsIsSymbolKey(key)) ((target as? JSSymbolKeyed)?.jsSymbolKeys?.contains(key) ?: false) || target.jsGet(key) != null else key in target.jsKeys || target.jsHasMember(key) || JSPrototypes.objectPrototype.has(key)
|
|
614
|
+
is JSArray<*> -> key == "length" || (jsArrayIndex(key)?.let { it < target.size && target.jsHoles?.get(it.toInt()) != true } ?: (target.jsProperties?.has(key) == true))
|
|
615
|
+
null, JSNull, is String, is Number, is Boolean, is Function<*>, is JSFunction -> false
|
|
616
|
+
// A Java object (a native view): its methods and fields, as NativeScript's runtime exposes them.
|
|
617
|
+
else -> !jsIsSymbolKey(key) && ((target is Class<*> && JSPrototypes.staticMember(target, key) != null) || (!target.javaClass.name.startsWith("org.nativescript.kit.") && jsJavaHas(target, key)))
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/** A member of an untyped object, or undefined; reading a typed object from JSON never throws. */
|
|
621
|
+
fun jsField(target: Any?, key: String): Any? = if (target == null || target === JSNull) null else jsGet(target, key)
|
|
622
|
+
|
|
623
|
+
// Operators
|
|
624
|
+
|
|
625
|
+
/** `typeof value`. */
|
|
626
|
+
fun jsTypeof(value: Any?): String = when (value) {
|
|
627
|
+
null, Unit -> "undefined"
|
|
628
|
+
// A Java char is a one-character string, as NativeScript marshals it.
|
|
629
|
+
is String, is Char -> "string"
|
|
630
|
+
is Boolean -> "boolean"
|
|
631
|
+
JSNull -> "object"
|
|
632
|
+
is Function<*>, is JSFunction, is JavaMethodRef, is Class<*> -> "function"
|
|
633
|
+
is JSSymbol -> "symbol"
|
|
634
|
+
is JSBigInt -> "bigint"
|
|
635
|
+
else -> if (jsNumeric(value) != null) "number" else "object"
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* `value === undefined || value === null`. Undefined has two forms: `null`, and `Unit`, which a `void` function's
|
|
640
|
+
* result is when read untyped. A test for undefined accepts both, as `jsBox` folds them into one.
|
|
641
|
+
*/
|
|
642
|
+
fun jsIsNullish(value: Any?): Boolean = value == null || value === JSNull || value === Unit
|
|
643
|
+
|
|
644
|
+
/** `value || otherwise`: the value where it is truthy, else what `otherwise` gives, run only then. */
|
|
645
|
+
inline fun <T> jsOr(value: T, otherwise: () -> T): T = if (jsTruthy(value)) value else otherwise()
|
|
646
|
+
|
|
647
|
+
/** `value && then`: what `then` gives where the value is truthy, run only then, else the value. */
|
|
648
|
+
inline fun <T> jsAnd(value: T, then: () -> T): T = if (jsTruthy(value)) then() else value
|
|
649
|
+
|
|
650
|
+
/** JavaScript truthiness: false for undefined, null, false, 0, -0, NaN and "". Where it holds, the value is not null, so Kotlin smart-casts a tested local. */
|
|
651
|
+
@OptIn(ExperimentalContracts::class)
|
|
652
|
+
fun jsTruthy(value: Any?): Boolean {
|
|
653
|
+
contract { returns(true) implies (value != null) }
|
|
654
|
+
return when (value) {
|
|
655
|
+
null, Unit, JSNull -> false
|
|
656
|
+
is Boolean -> value
|
|
657
|
+
is Double -> value != 0.0 && !value.isNaN()
|
|
658
|
+
is String -> value.isNotEmpty()
|
|
659
|
+
is JSBigInt -> !value.isZero
|
|
660
|
+
else -> jsNumeric(value)?.let { it != 0.0 && !it.isNaN() } ?: true
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
/** `a === b`: numbers by value (NaN unequal to itself, -0 equal to +0), strings by code units, objects by identity. */
|
|
665
|
+
fun jsStrictEquals(a: Any?, b: Any?): Boolean {
|
|
666
|
+
val p = jsBox(a)
|
|
667
|
+
val q = jsBox(b)
|
|
668
|
+
if (p == null || q == null) return p == null && q == null
|
|
669
|
+
if (p is String && q is String) return p == q
|
|
670
|
+
if (p is Boolean && q is Boolean) return p == q
|
|
671
|
+
if (p is JSBigInt || q is JSBigInt) return p == q
|
|
672
|
+
val m = jsNumeric(p)
|
|
673
|
+
val n = jsNumeric(q)
|
|
674
|
+
if (m != null || n != null) return m != null && n != null && m == n
|
|
675
|
+
val x = jsIdentity(p)!!
|
|
676
|
+
val y = jsIdentity(q)!!
|
|
677
|
+
if (x is JSAdapted || y is JSAdapted) return jsSameFunction(jsUnadapted(x), jsUnadapted(y))
|
|
678
|
+
if (x is JSFunction || y is JSFunction || x is kotlin.reflect.KCallable<*>) return jsSameFunction(x, y)
|
|
679
|
+
return x === y
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/** Whether two function values are one function: a wrapper is its original's, and references to one function are equal. */
|
|
683
|
+
internal fun jsSameFunction(a: Any, b: Any): Boolean {
|
|
684
|
+
val f = (a as? JSFunction)?.original ?: a
|
|
685
|
+
val g = (b as? JSFunction)?.original ?: b
|
|
686
|
+
return f === g || (f is kotlin.reflect.KCallable<*> && f == g)
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/** SameValueZero (`includes`, `Map` and `Set` keys): `===` except NaN equals NaN. */
|
|
690
|
+
fun jsSameValueZero(a: Any?, b: Any?): Boolean {
|
|
691
|
+
val m = jsNumeric(a)
|
|
692
|
+
val n = jsNumeric(b)
|
|
693
|
+
if (m != null && n != null && m.isNaN() && n.isNaN()) return true
|
|
694
|
+
return jsStrictEquals(a, b)
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/** SameValue (`Object.is`): `===` except NaN equals NaN and -0 differs from +0. */
|
|
698
|
+
fun jsSameValue(a: Any?, b: Any?): Boolean {
|
|
699
|
+
val m = jsNumeric(a)
|
|
700
|
+
val n = jsNumeric(b)
|
|
701
|
+
if (m != null && n != null) {
|
|
702
|
+
if (m.isNaN() && n.isNaN()) return true
|
|
703
|
+
return m == n && (1.0 / m).sign == (1.0 / n).sign
|
|
704
|
+
}
|
|
705
|
+
return jsStrictEquals(a, b)
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
private val Double.sign: Double get() = Math.signum(this)
|
|
709
|
+
|
|
710
|
+
/** `a == b`: null equals undefined; primitives compare after conversion; an object against a primitive through its string form. */
|
|
711
|
+
fun jsLooseEquals(a: Any?, b: Any?): Boolean {
|
|
712
|
+
val x = jsBox(a)
|
|
713
|
+
val y = jsBox(b)
|
|
714
|
+
val xNullish = x == null || x === JSNull
|
|
715
|
+
val yNullish = y == null || y === JSNull
|
|
716
|
+
if (xNullish || yNullish) return xNullish && yNullish
|
|
717
|
+
x!!; y!!
|
|
718
|
+
// ToPrimitive leaves a primitive as it is, and a symbol equals no primitive but itself.
|
|
719
|
+
if (x is JSSymbol || y is JSSymbol) return jsStrictEquals(jsToPrimitive(x), jsToPrimitive(y))
|
|
720
|
+
if (x is JSBigInt) return jsBigIntLooseEquals(x, y)
|
|
721
|
+
if (y is JSBigInt) return jsBigIntLooseEquals(y, x)
|
|
722
|
+
val m = jsNumeric(x)
|
|
723
|
+
val n = jsNumeric(y)
|
|
724
|
+
if (m != null && n != null) return m == n
|
|
725
|
+
if (x is String && y is String) return x == y
|
|
726
|
+
if (x is Boolean && y is Boolean) return x == y
|
|
727
|
+
if (x is Boolean) return jsLooseEquals(jsToNumber(x), y)
|
|
728
|
+
if (y is Boolean) return jsLooseEquals(x, jsToNumber(y))
|
|
729
|
+
if (m != null && y is String) return m == jsNumberFromString(y)
|
|
730
|
+
if (x is String && n != null) return jsNumberFromString(x) == n
|
|
731
|
+
val xPrimitive = x is String || m != null
|
|
732
|
+
val yPrimitive = y is String || n != null
|
|
733
|
+
if (!xPrimitive && yPrimitive) return jsLooseEquals(jsToPrimitive(x), y)
|
|
734
|
+
if (xPrimitive && !yPrimitive) return jsLooseEquals(x, jsToPrimitive(y))
|
|
735
|
+
return jsStrictEquals(x, y)
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/** ToPrimitive: `hint` is "default", "number" or "string"; a date is its time only for "number". */
|
|
739
|
+
fun jsToPrimitive(value: Any?, hint: String = "default"): Any? {
|
|
740
|
+
val v = jsBox(value)
|
|
741
|
+
if (v is JSObject) jsExoticPrimitive(v, hint).let { if (it !== jsNotPrimitive) return it }
|
|
742
|
+
return when (v) {
|
|
743
|
+
null, is String, is Boolean, JSNull, is JSSymbol, is JSBigInt -> v
|
|
744
|
+
is JSToPrimitive -> jsUserPrimitive(v, hint)
|
|
745
|
+
is JSDate -> if (hint == "number") v.valueOf() else jsToString(v)
|
|
746
|
+
is JSObject -> jsOrdinaryToPrimitive(hint, jsMethodOf(v, "valueOf"), jsMethodOf(v, "toString") ?: { jsObjectToString(v) })
|
|
747
|
+
else -> jsNumeric(v) ?: (if (hint == "string") jsNotPrimitive else jsOwnValueOf(v)).let { if (it === jsNotPrimitive) jsToString(v) else it }
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
private val jsNotPrimitive = Any()
|
|
752
|
+
|
|
753
|
+
/** An untyped object's `[Symbol.toPrimitive]` method called with the hint; `jsNotPrimitive` when it has none. */
|
|
754
|
+
private fun jsExoticPrimitive(v: JSObject, hint: String): Any? {
|
|
755
|
+
val exotic = jsBox(v.jsGet(JSSymbol.toPrimitive.key))
|
|
756
|
+
if (exotic == null || exotic === JSNull) return jsNotPrimitive
|
|
757
|
+
if (!jsIsFunction(exotic)) throw JSException(JSTypeError("${jsInspect(exotic)} is not a function"))
|
|
758
|
+
val result = jsCallValue(exotic, v, false, hint)
|
|
759
|
+
if (result == null || result is String || result is Boolean || result === JSNull || result is JSSymbol || result is JSBigInt || jsNumeric(result) != null) return result
|
|
760
|
+
throw JSException(JSTypeError("Cannot convert object to primitive value"))
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* OrdinaryToPrimitive over an object literal's own `valueOf` and `toString`, in the order the hint asks; null stands for
|
|
765
|
+
* Object.prototype's (a `valueOf` giving the object itself, a `toString` giving "[object Object]").
|
|
766
|
+
*/
|
|
767
|
+
fun jsOrdinaryToPrimitive(hint: String, valueOf: (() -> Any?)?, toString: (() -> Any?)?): Any? {
|
|
768
|
+
val inherited: () -> Any? = { "[object Object]" }
|
|
769
|
+
for (method in if (hint == "string") listOf(toString ?: inherited, valueOf) else listOf(valueOf, toString ?: inherited)) {
|
|
770
|
+
val result = jsBox((method ?: continue)())
|
|
771
|
+
if (result == null || result is String || result is Boolean || result === JSNull || result is JSSymbol || result is JSBigInt || jsNumeric(result) != null) return result
|
|
772
|
+
}
|
|
773
|
+
throw JSException(JSTypeError("Cannot convert object to primitive value"))
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
/** A plain object's method `name` (own or inherited), called with it as `this`; null where it has none. */
|
|
777
|
+
private fun jsMethodOf(v: JSObject, name: String): (() -> Any?)? = jsBox(v[name]).takeIf { jsIsFunction(it) }?.let { f -> { jsCallValue(f, v, false) } }
|
|
778
|
+
|
|
779
|
+
/** What a class's own `valueOf()` gives, when that is a primitive; else `jsNotPrimitive`. */
|
|
780
|
+
private fun jsOwnValueOf(v: Any): Any? {
|
|
781
|
+
val result = when (v) {
|
|
782
|
+
is JSValueOf -> jsBox(v.jsValueOf())
|
|
783
|
+
else -> return jsNotPrimitive
|
|
784
|
+
}
|
|
785
|
+
return if (result == null || result is String || result is Boolean || result === JSNull || result is JSSymbol || result is JSBigInt || jsNumeric(result) != null) result else jsNotPrimitive
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/** `a < b` (the Abstract Relational Comparison): two strings by UTF-16 code units, anything else as numbers, false where either is NaN. */
|
|
789
|
+
fun jsLess(a: Any?, b: Any?): Boolean {
|
|
790
|
+
val x = jsToPrimitive(a, "number")
|
|
791
|
+
val y = jsToPrimitive(b, "number")
|
|
792
|
+
return if (x is String && y is String) x < y else jsToNumber(x) < jsToNumber(y)
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
fun jsLessOrEqual(a: Any?, b: Any?): Boolean {
|
|
796
|
+
val x = jsToPrimitive(a, "number")
|
|
797
|
+
val y = jsToPrimitive(b, "number")
|
|
798
|
+
return if (x is String && y is String) x <= y else jsToNumber(x) <= jsToNumber(y)
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
fun jsGreater(a: Any?, b: Any?): Boolean {
|
|
802
|
+
val x = jsToPrimitive(a, "number")
|
|
803
|
+
val y = jsToPrimitive(b, "number")
|
|
804
|
+
return if (x is String && y is String) x > y else jsToNumber(x) > jsToNumber(y)
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
fun jsGreaterOrEqual(a: Any?, b: Any?): Boolean {
|
|
808
|
+
val x = jsToPrimitive(a, "number")
|
|
809
|
+
val y = jsToPrimitive(b, "number")
|
|
810
|
+
return if (x is String && y is String) x >= y else jsToNumber(x) >= jsToNumber(y)
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/** A `+` operand beside a string: ToString(ToPrimitive(value, default)). */
|
|
814
|
+
fun jsToStringDefault(value: Any?): String = jsToString(jsToPrimitive(value))
|
|
815
|
+
|
|
816
|
+
/** `Number(value)` / unary `+`. */
|
|
817
|
+
fun jsToNumber(value: Any?): Double = when (val v = jsBox(value)) {
|
|
818
|
+
null -> Double.NaN
|
|
819
|
+
is Double -> v
|
|
820
|
+
is String -> jsNumberFromString(v)
|
|
821
|
+
is Boolean -> if (v) 1.0 else 0.0
|
|
822
|
+
JSNull -> 0.0
|
|
823
|
+
is JSDate -> v.valueOf()
|
|
824
|
+
is JSBigInt -> v.toDouble()
|
|
825
|
+
is Function<*> -> Double.NaN
|
|
826
|
+
is JSSymbol -> throw JSException(JSTypeError("Cannot convert a Symbol value to a number"))
|
|
827
|
+
is JSToPrimitive -> jsToNumber(jsUserPrimitive(v, "number"))
|
|
828
|
+
is JSValueOf, is JSObject -> jsToNumber(jsToPrimitive(v, "number"))
|
|
829
|
+
else -> jsNumeric(v) ?: jsNumberFromString(jsToString(v))
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
/** An untyped value where code declares a number: a string as `==` and arithmetic read it; anything else not a number, 0. */
|
|
833
|
+
fun jsNumberOrZero(value: Any?): Double = when (value) {
|
|
834
|
+
is Double -> value
|
|
835
|
+
is String -> jsNumberFromString(value)
|
|
836
|
+
// A boxed Java number (a callback's `java.lang.Integer` context) is a number to script.
|
|
837
|
+
is Number -> value.toDouble()
|
|
838
|
+
else -> 0.0
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/** An untyped value where code declares a string: a number or boolean as its string; undefined, null or anything else not a string, "". */
|
|
842
|
+
fun jsStringOrEmpty(value: Any?): String = when (value) {
|
|
843
|
+
is String -> value
|
|
844
|
+
is Double, is Boolean -> jsToString(value)
|
|
845
|
+
else -> ""
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/** As `jsStringOrEmpty`, with undefined and null kept apart from "" for code that tests for them. */
|
|
849
|
+
fun jsStringOrNull(value: Any?): String? = when (value) {
|
|
850
|
+
is String -> value
|
|
851
|
+
is Double, is Boolean -> jsToString(value)
|
|
852
|
+
else -> null
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/** A string, number or boolean where code declares a number, converted as `Number(value)`; null for anything else. */
|
|
856
|
+
fun jsNumberOrNull(value: Any?): Double? = when (value) {
|
|
857
|
+
is Double -> value
|
|
858
|
+
is String -> jsNumberFromString(value)
|
|
859
|
+
is Boolean -> if (value) 1.0 else 0.0
|
|
860
|
+
else -> jsNumeric(value)
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/** A string, number or boolean where code declares a boolean, converted as `Boolean(value)`; null for anything else. */
|
|
864
|
+
fun jsBooleanOrNull(value: Any?): Boolean? = when (value) {
|
|
865
|
+
is Boolean -> value
|
|
866
|
+
is String, is Double -> jsTruthy(value)
|
|
867
|
+
else -> null
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
/** As `jsBooleanOrNull`, false for anything else. */
|
|
871
|
+
fun jsBooleanOrFalse(value: Any?): Boolean = jsBooleanOrNull(value) ?: false
|
|
872
|
+
|
|
873
|
+
// A value asserted to a string, number or boolean (`x as boolean`), an assertion script erases: converted as JavaScript
|
|
874
|
+
// converts it where the type is needed (undefined and null are "" as a string), never refused.
|
|
875
|
+
fun jsAssertedString(value: Any?): String = value as? String ?: if (jsIsNullish(value)) "" else jsToString(value)
|
|
876
|
+
|
|
877
|
+
fun jsAssertedNumber(value: Any?): Double = value as? Double ?: jsToNumber(value)
|
|
878
|
+
|
|
879
|
+
fun jsAssertedBoolean(value: Any?): Boolean = value as? Boolean ?: jsTruthy(value)
|
|
880
|
+
|
|
881
|
+
// As the three above, where the place takes undefined: undefined and null stay null.
|
|
882
|
+
fun jsAssertedStringOrNull(value: Any?): String? = if (jsIsNullish(value)) null else jsAssertedString(value)
|
|
883
|
+
|
|
884
|
+
fun jsAssertedNumberOrNull(value: Any?): Double? = if (jsIsNullish(value)) null else jsAssertedNumber(value)
|
|
885
|
+
|
|
886
|
+
fun jsAssertedBooleanOrNull(value: Any?): Boolean? = if (jsIsNullish(value)) null else jsAssertedBoolean(value)
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* An untyped value asserted to a string, number or boolean: a value `jsTypeof` calls that type passes, in
|
|
890
|
+
* whatever representation it has (an `Int`, a `Char`), an empty state reads as `jsAssertedString`/`jsAssertedNumber`/
|
|
891
|
+
* `jsAssertedBoolean` read it, and any other value is JavaScript's TypeError there rather than a converted one.
|
|
892
|
+
*/
|
|
893
|
+
fun jsCheckedString(value: Any?): String = when (val v = jsBox(value)) {
|
|
894
|
+
is String -> v
|
|
895
|
+
is Char -> v.toString()
|
|
896
|
+
else -> if (jsIsNullish(v)) "" else jsCheckedFailure(v, "string")
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
fun jsCheckedNumber(value: Any?): Double {
|
|
900
|
+
val v = jsBox(value)
|
|
901
|
+
return jsNumeric(v) ?: if (jsIsNullish(v)) jsToNumber(v) else jsCheckedFailure(v, "number")
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
fun jsCheckedBoolean(value: Any?): Boolean {
|
|
905
|
+
val v = jsBox(value)
|
|
906
|
+
return v as? Boolean ?: if (jsIsNullish(v)) false else jsCheckedFailure(v, "boolean")
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
fun jsCheckedStringOrNull(value: Any?): String? = if (jsIsNullish(value)) null else jsCheckedString(value)
|
|
910
|
+
|
|
911
|
+
fun jsCheckedNumberOrNull(value: Any?): Double? = if (jsIsNullish(value)) null else jsCheckedNumber(value)
|
|
912
|
+
|
|
913
|
+
fun jsCheckedBooleanOrNull(value: Any?): Boolean? = if (jsIsNullish(value)) null else jsCheckedBoolean(value)
|
|
914
|
+
|
|
915
|
+
/** As `jsCheckedNumberOrNull` and `jsAssertedNumberOrNull` for a built-in's optional number parameter: null only where the value is undefined, since JavaScript's null converts (to 0). */
|
|
916
|
+
fun jsCheckedNumberOrUndefined(value: Any?): Double? = if (value == null || value === Unit) null else jsCheckedNumber(value)
|
|
917
|
+
|
|
918
|
+
fun jsAssertedNumberOrUndefined(value: Any?): Double? = if (value == null || value === Unit) null else jsAssertedNumber(value)
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* An untyped value asserted to an array of strings, numbers or booleans: an array's elements each checked by
|
|
922
|
+
* `element`, an empty state read as `jsArrayFrom` reads it, and any other value JavaScript's TypeError there.
|
|
923
|
+
*/
|
|
924
|
+
fun <T> jsCheckedArray(value: Any?, element: (Any?) -> T): JSArray<T> {
|
|
925
|
+
if (jsIsNullish(value) || value is JSArray<*> || value!!.javaClass.isArray) return jsArrayFrom(value, element)
|
|
926
|
+
throw JSException(JSTypeError("${jsTypeof(value)} is not an array"))
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
private fun jsCheckedFailure(value: Any?, type: String): Nothing = throw JSException(JSTypeError("${jsTypeof(value)} is not a $type"))
|
|
930
|
+
|
|
931
|
+
private val joinGuards = object : ThreadLocal<ArrayList<Any>>() {
|
|
932
|
+
override fun initialValue() = ArrayList<Any>()
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/** The arrays the calling thread is turning into strings: one met again inside itself is "". */
|
|
936
|
+
internal val jsJoinGuard: ArrayList<Any> get() = joinGuards.get()!!
|
|
937
|
+
|
|
938
|
+
/** `String(value)`: arrays join with ",", plain objects are "[object Object]", errors "Name: message". */
|
|
939
|
+
fun jsToString(value: Any?): String = when (val v = jsBox(value)) {
|
|
940
|
+
null -> "undefined"
|
|
941
|
+
is String -> v
|
|
942
|
+
is Double -> jsNumberToString(v)
|
|
943
|
+
is Boolean -> if (v) "true" else "false"
|
|
944
|
+
JSNull -> "null"
|
|
945
|
+
is JSToPrimitive -> jsToString(jsUserPrimitive(v, "string"))
|
|
946
|
+
is JSStringConvertible -> v.toString()
|
|
947
|
+
is JSSymbol -> v.toString()
|
|
948
|
+
is JSBigInt -> v.toString()
|
|
949
|
+
is JSToStringTag -> "[object ${v.jsToStringTag}]"
|
|
950
|
+
is JSError -> v.jsErrorString
|
|
951
|
+
is JSArray<*> -> jsJoin(v.storage, ",", v)
|
|
952
|
+
is Pair<*, *> -> jsJoin(listOf(v.first, v.second), ",", v)
|
|
953
|
+
is Triple<*, *, *> -> jsJoin(listOf(v.first, v.second, v.third), ",", v)
|
|
954
|
+
is JSMap<*, *> -> "[object Map]"
|
|
955
|
+
is JSSet<*> -> "[object Set]"
|
|
956
|
+
is JSThenable -> "[object Promise]"
|
|
957
|
+
is Function<*> -> "function () { [native code] }"
|
|
958
|
+
is JSObject -> jsToString(jsToPrimitive(v, "string"))
|
|
959
|
+
else -> jsNumeric(v)?.let { jsNumberToString(it) } ?: if (v is JSDynamic) jsObjectToString(v) else v.toString()
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
internal fun jsJoin(elements: List<Any?>, separator: String, owner: Any): String {
|
|
963
|
+
val guard = jsJoinGuard
|
|
964
|
+
if (guard.any { it === owner }) return ""
|
|
965
|
+
guard.add(owner)
|
|
966
|
+
try {
|
|
967
|
+
val out = StringBuilder()
|
|
968
|
+
elements.forEachIndexed { i, element ->
|
|
969
|
+
if (i > 0) out.append(separator)
|
|
970
|
+
val e = jsBox(element)
|
|
971
|
+
if (e != null && e !== JSNull) out.append(jsToString(e))
|
|
972
|
+
}
|
|
973
|
+
return out.toString()
|
|
974
|
+
} finally {
|
|
975
|
+
guard.removeAt(guard.size - 1)
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
/** `a + b` for untyped operands: concatenation when either side is (or converts to) a string, else addition. */
|
|
980
|
+
fun jsAdd(a: Any?, b: Any?): Any? {
|
|
981
|
+
val x = jsToPrimitive(a)
|
|
982
|
+
val y = jsToPrimitive(b)
|
|
983
|
+
if (x is String || y is String) return jsToString(x) + jsToString(y)
|
|
984
|
+
return jsToNumber(x) + jsToNumber(y)
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
// What an operator converts where the compiler holds an operand untyped (the Swift kit's throwing conversions, one name
|
|
988
|
+
// each on both kits): JavaScript's TypeErrors for a BigInt beside a number and a Symbol as a number or string.
|
|
989
|
+
|
|
990
|
+
/** ToNumeric: a BigInt as it is, anything else its number. */
|
|
991
|
+
private fun jsNumericOf(value: Any?): Any = when (val p = jsToPrimitive(value, "number")) {
|
|
992
|
+
is JSBigInt -> p
|
|
993
|
+
else -> jsToNumber(p)
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
private fun jsMixedBigInt() = JSException(JSTypeError("Cannot mix BigInt and other types, use explicit conversions"))
|
|
997
|
+
|
|
998
|
+
/** `a + b`: as `jsAdd`; two BigInts add as BigInts, and a BigInt beside a number is a TypeError. */
|
|
999
|
+
fun jsAddThrowing(a: Any?, b: Any?): Any? {
|
|
1000
|
+
val x = jsToPrimitive(a)
|
|
1001
|
+
val y = jsToPrimitive(b)
|
|
1002
|
+
if (x is String || y is String) return jsToStringThrowing(x) + jsToStringThrowing(y)
|
|
1003
|
+
val m = jsNumericOf(x)
|
|
1004
|
+
val n = jsNumericOf(y)
|
|
1005
|
+
if (m is JSBigInt && n is JSBigInt) return m + n
|
|
1006
|
+
if (m is JSBigInt || n is JSBigInt) throw jsMixedBigInt()
|
|
1007
|
+
return jsToNumber(m) + jsToNumber(n)
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
/** `op` on two operands' numbers: two BigInts give `op` of their numbers, and a BigInt beside a number is a TypeError. */
|
|
1011
|
+
private inline fun jsNumericThrowing(a: Any?, b: Any?, op: (Double, Double) -> Double): Double {
|
|
1012
|
+
val m = jsNumericOf(a)
|
|
1013
|
+
val n = jsNumericOf(b)
|
|
1014
|
+
if (m is JSBigInt && n is JSBigInt) return op(m.toDouble(), n.toDouble())
|
|
1015
|
+
if (m is JSBigInt || n is JSBigInt) throw jsMixedBigInt()
|
|
1016
|
+
return op(jsToNumber(m), jsToNumber(n))
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/** The numeric and bitwise operators where an operand is held untyped. */
|
|
1020
|
+
fun jsSubtractThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b) { x, y -> x - y }
|
|
1021
|
+
fun jsMultiplyThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b) { x, y -> x * y }
|
|
1022
|
+
fun jsDivideThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b) { x, y -> x / y }
|
|
1023
|
+
fun jsRemainderThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b) { x, y -> x % y }
|
|
1024
|
+
fun jsExponentThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b, ::jsPow)
|
|
1025
|
+
fun jsBitAndThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b, ::jsBitAnd)
|
|
1026
|
+
fun jsBitOrThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b, ::jsBitOr)
|
|
1027
|
+
fun jsBitXorThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b, ::jsBitXor)
|
|
1028
|
+
fun jsShiftLeftThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b, ::jsShiftLeft)
|
|
1029
|
+
fun jsShiftRightThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b, ::jsShiftRight)
|
|
1030
|
+
fun jsShiftRightUnsignedThrowing(a: Any?, b: Any?): Double = jsNumericThrowing(a, b, ::jsShiftRightUnsigned)
|
|
1031
|
+
|
|
1032
|
+
/** `op` where its value is held untyped: two BigInts give `big` of them, and a BigInt beside a number is a TypeError. */
|
|
1033
|
+
private inline fun jsNumericUntypedThrowing(a: Any?, b: Any?, op: (Double, Double) -> Double, big: (JSBigInt, JSBigInt) -> JSBigInt): Any? {
|
|
1034
|
+
val m = jsNumericOf(a)
|
|
1035
|
+
val n = jsNumericOf(b)
|
|
1036
|
+
if (m is JSBigInt && n is JSBigInt) return big(m, n)
|
|
1037
|
+
if (m is JSBigInt || n is JSBigInt) throw jsMixedBigInt()
|
|
1038
|
+
return op(jsToNumber(m), jsToNumber(n))
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
/** The numeric and bitwise operators where both operands are held untyped or BigInts and the value is held untyped. */
|
|
1042
|
+
fun jsSubtractUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, { x, y -> x - y }) { x, y -> x - y }
|
|
1043
|
+
fun jsMultiplyUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, { x, y -> x * y }) { x, y -> x * y }
|
|
1044
|
+
fun jsDivideUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, { x, y -> x / y }, { x, y -> JSBigInt.divide(x, y) })
|
|
1045
|
+
fun jsRemainderUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, { x, y -> x % y }, { x, y -> JSBigInt.remainder(x, y) })
|
|
1046
|
+
fun jsExponentUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, ::jsPow, { x, y -> JSBigInt.power(x, y) })
|
|
1047
|
+
fun jsBitAndUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, ::jsBitAnd) { x, y -> x and y }
|
|
1048
|
+
fun jsBitOrUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, ::jsBitOr) { x, y -> x or y }
|
|
1049
|
+
fun jsBitXorUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, ::jsBitXor) { x, y -> x xor y }
|
|
1050
|
+
fun jsShiftLeftUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, ::jsShiftLeft, { x, y -> JSBigInt.shiftLeft(x, y) })
|
|
1051
|
+
fun jsShiftRightUntypedThrowing(a: Any?, b: Any?): Any? = jsNumericUntypedThrowing(a, b, ::jsShiftRight, { x, y -> JSBigInt.shiftRight(x, y) })
|
|
1052
|
+
fun jsShiftRightUnsignedUntypedThrowing(a: Any?, b: Any?): Any? =
|
|
1053
|
+
jsNumericUntypedThrowing(a, b, ::jsShiftRightUnsigned) { _, _ -> throw JSException(JSTypeError("BigInts have no unsigned right shift, use >> instead")) }
|
|
1054
|
+
|
|
1055
|
+
/** Unary `+`: ToNumber, a TypeError for a BigInt. */
|
|
1056
|
+
fun jsToNumberThrowing(value: Any?): Double {
|
|
1057
|
+
val n = jsNumericOf(value)
|
|
1058
|
+
if (n is JSBigInt) throw JSException(JSTypeError("Cannot convert a BigInt value to a number"))
|
|
1059
|
+
return jsToNumber(n)
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/** `n += value` for a number `n`: ToNumeric of value, a BigInt beside the number a TypeError. */
|
|
1063
|
+
fun jsNumberAddendThrowing(value: Any?): Double = jsNumericOf(value).let { if (it is JSBigInt) throw jsMixedBigInt() else jsToNumber(it) }
|
|
1064
|
+
|
|
1065
|
+
/** Unary `-` and `~`: ToNumeric, a BigInt as its number. */
|
|
1066
|
+
fun jsToNumericThrowing(value: Any?): Double = jsNumericOf(value).let { if (it is JSBigInt) it.toDouble() else jsToNumber(it) }
|
|
1067
|
+
|
|
1068
|
+
/** A `+` operand beside a string: ToString(ToPrimitive(value, default)). */
|
|
1069
|
+
fun jsToStringDefaultThrowing(value: Any?): String = jsToStringThrowing(jsToPrimitive(value))
|
|
1070
|
+
|
|
1071
|
+
/** A template literal's substitution: ToString, a TypeError for a Symbol. */
|
|
1072
|
+
fun jsToStringThrowing(value: Any?): String {
|
|
1073
|
+
val v = jsBox(value)
|
|
1074
|
+
if (v is JSSymbol) throw JSException(JSTypeError("Cannot convert a Symbol value to a string"))
|
|
1075
|
+
return jsToString(v)
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
/** `String(value)`: a Symbol its description, anything else ToString (`jsToStringThrowing`). */
|
|
1079
|
+
fun jsStringThrowing(value: Any?): String = jsBox(value).let { if (it is JSSymbol) jsToString(it) else jsToStringThrowing(it) }
|
|
1080
|
+
|
|
1081
|
+
/**
|
|
1082
|
+
* IsLessThan(a, b): ToPrimitive (number) of `a` then `b` where `leftFirst`, else `b` then `a`; two strings by UTF-16 code
|
|
1083
|
+
* units, anything else as numbers (a Symbol a TypeError). Null where either is NaN.
|
|
1084
|
+
*/
|
|
1085
|
+
private fun jsLessThanThrowing(a: Any?, b: Any?, leftFirst: Boolean): Boolean? {
|
|
1086
|
+
val x: Any?
|
|
1087
|
+
val y: Any?
|
|
1088
|
+
if (leftFirst) {
|
|
1089
|
+
x = jsToPrimitive(a, "number")
|
|
1090
|
+
y = jsToPrimitive(b, "number")
|
|
1091
|
+
} else {
|
|
1092
|
+
y = jsToPrimitive(b, "number")
|
|
1093
|
+
x = jsToPrimitive(a, "number")
|
|
1094
|
+
}
|
|
1095
|
+
if (x is String && y is String) return x < y
|
|
1096
|
+
if (x is JSSymbol || y is JSSymbol) throw JSException(JSTypeError("Cannot convert a Symbol value to a number"))
|
|
1097
|
+
val m = jsToNumber(x)
|
|
1098
|
+
val n = jsToNumber(y)
|
|
1099
|
+
return if (m.isNaN() || n.isNaN()) null else m < n
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
/** The relational operators where an operand's conversion may throw. */
|
|
1103
|
+
fun jsLessThrowing(a: Any?, b: Any?): Boolean = jsLessThanThrowing(a, b, true) == true
|
|
1104
|
+
fun jsGreaterThrowing(a: Any?, b: Any?): Boolean = jsLessThanThrowing(b, a, false) == true
|
|
1105
|
+
fun jsLessOrEqualThrowing(a: Any?, b: Any?): Boolean = jsLessThanThrowing(b, a, false) == false
|
|
1106
|
+
fun jsGreaterOrEqualThrowing(a: Any?, b: Any?): Boolean = jsLessThanThrowing(a, b, true) == false
|
|
1107
|
+
|
|
1108
|
+
/** `a ?? b` for an untyped value: null and undefined both give way. */
|
|
1109
|
+
inline fun jsNullishCoalesce(a: Any?, b: () -> Any?): Any? = if (jsIsNullish(a)) b() else a
|
|
1110
|
+
|
|
1111
|
+
/** A number as JavaScript prints it: `4`, not `4.0`. */
|
|
1112
|
+
fun js(value: Double): String = jsNumberToString(value)
|
|
1113
|
+
fun js(value: Int): String = value.toString()
|
|
1114
|
+
fun js(value: Boolean): String = if (value) "true" else "false"
|
|
1115
|
+
fun js(value: String): String = value
|
|
1116
|
+
|
|
1117
|
+
/** `Object.is` for a signal's writes: objects by identity. */
|
|
1118
|
+
fun jsSame(a: Any?, b: Any?): Boolean = jsSameValue(a, b)
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* The key order of an object literal with spreads (`{ ...a, b: 1 }`): each spread source's keys as it holds
|
|
1122
|
+
* them, then the literal's own, a key keeping its first position; integer keys first; only the `fields` it has.
|
|
1123
|
+
*/
|
|
1124
|
+
fun jsLiteralKeyOrder(parts: List<List<String>>, fields: List<String>): List<String> {
|
|
1125
|
+
val keys = LinkedHashSet<String>()
|
|
1126
|
+
for (part in parts) for (key in part) if (key in fields) keys.add(key)
|
|
1127
|
+
val index = { k: String -> k.length <= 10 && (k == "0" || (k[0] != '0' && k.all(Char::isDigit))) && k.toLong() < 4294967295L }
|
|
1128
|
+
return keys.filter(index).sortedBy { it.toLong() } + keys.filter { !index(it) }
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
/** `globalThis` of the running realm: a worker thread's own, else the app's. */
|
|
1132
|
+
val jsGlobalThis: JSObject get() = JSRealm.current().global
|
|
1133
|
+
|
|
1134
|
+
/** `Promise` held as a value (a `PromiseConstructorLike` passed around): `new` through it makes a JSPromise, as the
|
|
1135
|
+
* global Promise is the only promise constructor a compiled program has. */
|
|
1136
|
+
object JSPromiseConstructor
|
|
1137
|
+
|
|
1138
|
+
val jsDateBuiltin: JSObject = JSObject().also { it["now"] = jsFunction(0) { JSDate.now() } }
|
|
1139
|
+
|
|
1140
|
+
val jsStringConstructor: JSFunction by lazy {
|
|
1141
|
+
jsFunction(1) { a -> if (a.isEmpty()) "" else jsToString(a[0]) }.also {
|
|
1142
|
+
jsFunctionProperties(it, true)!!.put("name", "String")
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
val jsNumberConstructor: JSFunction by lazy {
|
|
1146
|
+
jsFunction(1) { a -> if (a.isEmpty()) 0.0 else jsToNumber(a[0]) }.also {
|
|
1147
|
+
jsFunctionProperties(it, true)!!.put("name", "Number")
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
val jsBooleanConstructor: JSFunction by lazy {
|
|
1151
|
+
jsFunction(1) { a -> jsTruthy(a.getOrNull(0)) }.also {
|
|
1152
|
+
jsFunctionProperties(it, true)!!.put("name", "Boolean")
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
val jsFunctionCallMethod: JSMethod by lazy { JSMethod(1) { self, a -> jsCallMethod(self, "call", *a) } }
|
|
1157
|
+
val jsFunctionApplyMethod: JSMethod by lazy { JSMethod(2) { self, a -> jsCallMethod(self, "apply", *a) } }
|
|
1158
|
+
val jsFunctionBindMethod: JSMethod by lazy { JSMethod(1) { self, a -> jsCallMethod(self, "bind", *a) } }
|
|
1159
|
+
|
|
1160
|
+
/** `value.constructor` of a typed object: its own member of that name, else its class. */
|
|
1161
|
+
private fun jsConstructorOf(target: Any): Any? = (if (target is JSDynamic) target.jsGet("constructor") else null) ?: when (target) {
|
|
1162
|
+
is String -> jsStringConstructor
|
|
1163
|
+
is Double -> jsNumberConstructor
|
|
1164
|
+
is Boolean -> jsBooleanConstructor
|
|
1165
|
+
is JSArray<*>, is Function<*> -> null
|
|
1166
|
+
else -> target.javaClass
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
/** A Map's method read by name (`changeMap.forEach(…)` on an untyped map). */
|
|
1170
|
+
@Suppress("UNCHECKED_CAST")
|
|
1171
|
+
private fun jsMapMethod(target: JSMap<*, *>, key: String): Any? {
|
|
1172
|
+
val map = target as JSMap<Any?, Any?>
|
|
1173
|
+
return when (key) {
|
|
1174
|
+
"get" -> JSMethod { _, a -> map.get(a.getOrNull(0)) }
|
|
1175
|
+
"set" -> JSMethod { _, a -> map.set(a.getOrNull(0), a.getOrNull(1)) }
|
|
1176
|
+
"has" -> JSMethod { _, a -> map.has(a.getOrNull(0)) }
|
|
1177
|
+
"delete" -> JSMethod { _, a -> map.delete(a.getOrNull(0)) }
|
|
1178
|
+
"clear" -> JSMethod { _, _ -> map.clear(); null }
|
|
1179
|
+
"keys" -> JSMethod { _, _ -> map.keys() }
|
|
1180
|
+
"values" -> JSMethod { _, _ -> map.values() }
|
|
1181
|
+
"entries" -> JSMethod { _, _ -> map.entries() }
|
|
1182
|
+
"forEach" -> JSMethod { _, a -> val f = a.getOrNull(0); map.forEach { v: Any?, k: Any? -> jsCall(f, v, k, map) }; null }
|
|
1183
|
+
else -> null
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
/** A Set's method read by name. */
|
|
1188
|
+
@Suppress("UNCHECKED_CAST")
|
|
1189
|
+
private fun jsSetMethod(target: JSSet<*>, key: String): Any? {
|
|
1190
|
+
val set = target as JSSet<Any?>
|
|
1191
|
+
return when (key) {
|
|
1192
|
+
"add" -> JSMethod { _, a -> set.add(a.getOrNull(0)) }
|
|
1193
|
+
"has" -> JSMethod { _, a -> set.has(a.getOrNull(0)) }
|
|
1194
|
+
"delete" -> JSMethod { _, a -> set.delete(a.getOrNull(0)) }
|
|
1195
|
+
"clear" -> JSMethod { _, _ -> set.clear(); null }
|
|
1196
|
+
"keys", "values" -> JSMethod { _, _ -> set.values() }
|
|
1197
|
+
"entries" -> JSMethod { _, _ -> set.entries() }
|
|
1198
|
+
"forEach" -> JSMethod { _, a -> val f = a.getOrNull(0); set.forEach { v: Any?, k: Any? -> jsCall(f, v, k, set) }; null }
|
|
1199
|
+
else -> null
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
/** A Kotlin function's parameter count (script's `fn.length`), where its class says. */
|
|
1204
|
+
/**
|
|
1205
|
+
* The properties script gives a function value (`fn.tag = …`, `Object.defineProperty(fn, …)`), which Kotlin's function
|
|
1206
|
+
* objects cannot hold. A function reference (`::fn`) is made anew where it is read, equal to every other of the same
|
|
1207
|
+
* function: those are keyed by equality and held strongly, one per declaration. Any other function is keyed by identity
|
|
1208
|
+
* and held weakly.
|
|
1209
|
+
*/
|
|
1210
|
+
private val referenceProperties = java.util.concurrent.ConcurrentHashMap<Any, JSObject>()
|
|
1211
|
+
private val functionProperties = JSWeakIdentityTable<JSObject>()
|
|
1212
|
+
|
|
1213
|
+
internal fun jsFunctionProperties(function: Any, create: Boolean): JSObject? {
|
|
1214
|
+
val f = (function as? JSFunction)?.original ?: function
|
|
1215
|
+
if (f is kotlin.reflect.KCallable<*>) return if (create) referenceProperties.getOrPut(f) { JSObject() } else referenceProperties[f]
|
|
1216
|
+
if (!create) return if (functionProperties.isEmpty) null else functionProperties.get(f)
|
|
1217
|
+
synchronized(functionProperties) { return functionProperties.get(f) ?: JSObject().also { functionProperties.set(f, it) } }
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
// After the function-property table they write into: a file's top-level values initialize in order.
|
|
1221
|
+
/** `Array` held as a value: callable without `new` (`Array(3)`), as script's is. */
|
|
1222
|
+
val jsArrayBuiltin: JSFunction = jsFunction(1) { a -> jsArrayConstruct(a) }.also {
|
|
1223
|
+
jsFunctionProperties(it, true)!!.put("isArray", jsFunction(1) { a -> JSArray.isArray(jsArg(a, 0)) })
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
/** `Object` held as a value (`const { keys } = Object`): its functions over objects, called as script calls them. */
|
|
1227
|
+
val jsObjectBuiltin: JSFunction = jsFunction(1) { a -> jsArg(a, 0).let { v -> if (jsIsNullish(v)) JSObject() else v } }.also {
|
|
1228
|
+
jsFunctionProperties(it, true)!!.apply {
|
|
1229
|
+
put("keys", jsFunction(1) { a -> jsObjectKeys(jsArg(a, 0)) })
|
|
1230
|
+
put("values", jsFunction(1) { a -> jsObjectValues(jsArg(a, 0)) })
|
|
1231
|
+
put("entries", jsFunction(1) { a -> JSArray.from<Any?>(jsObjectEntries(jsArg(a, 0)).map { (k, v) -> JSArray.of<Any?>(k, v) }) })
|
|
1232
|
+
put("assign", jsFunction(2) { a -> jsAssign(jsArg(a, 0), *a.drop(1).toTypedArray()) })
|
|
1233
|
+
put("getPrototypeOf", jsFunction(1) { a -> jsGetPrototypeOf(jsArg(a, 0)) })
|
|
1234
|
+
put("prototype", JSPrototypes.objectPrototype)
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
/** `fn.key` of a function value: what script set on it, else its `length`. */
|
|
1239
|
+
internal fun jsFunctionGet(f: Any, key: String): Any? {
|
|
1240
|
+
jsFunctionProperties(f, false)?.let { if (it.has(key)) return it.get(key, f) }
|
|
1241
|
+
// A declared function's reference (`::f`) carries its name; a lambda carries none.
|
|
1242
|
+
if (key == "name") return ((f as? JSFunction)?.original ?: f).let { (it as? kotlin.reflect.KCallable<*>)?.name }
|
|
1243
|
+
if (key == "call") return jsFunctionCallMethod
|
|
1244
|
+
if (key == "apply") return jsFunctionApplyMethod
|
|
1245
|
+
if (key == "bind") return jsFunctionBindMethod
|
|
1246
|
+
if (key != "length") return null
|
|
1247
|
+
return when (f) {
|
|
1248
|
+
is JSFunction -> f.length.toDouble()
|
|
1249
|
+
is JSMethod -> f.length.toDouble()
|
|
1250
|
+
is Function<*> -> jsFunctionArity(f)?.toDouble()
|
|
1251
|
+
else -> null
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
fun jsFunctionArity(f: Function<*>): Int? = when (f) {
|
|
1256
|
+
is Function0<*> -> 0
|
|
1257
|
+
is Function1<*, *> -> 1
|
|
1258
|
+
is Function2<*, *, *> -> 2
|
|
1259
|
+
is Function3<*, *, *, *> -> 3
|
|
1260
|
+
is Function4<*, *, *, *, *> -> 4
|
|
1261
|
+
is Function5<*, *, *, *, *, *> -> 5
|
|
1262
|
+
else -> null
|
|
1263
|
+
}
|