@triniwiz/nativescript-masonkit 1.0.0-alpha.5 → 1.0.0-alpha.6
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/common.d.ts +7 -9
- package/common.js +277 -552
- package/common.js.map +1 -1
- package/helpers.d.ts +32 -10
- package/helpers.js +772 -286
- package/helpers.js.map +1 -1
- package/index.android.d.ts +6 -2
- package/index.android.js +21 -3
- package/index.android.js.map +1 -1
- package/index.d.ts +64 -7
- package/index.ios.d.ts +9 -6
- package/index.ios.js +39 -25
- package/index.ios.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/include.gradle +18 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +108 -64
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +47 -20
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +10744 -1631
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +216 -128
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +47 -20
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +10744 -1631
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +10744 -1631
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +43 -43
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/build.xcconfig +1 -2
- package/platforms/ios/src/MasonV8Module.h +583 -0
- package/platforms/ios/src/MasonV8Module.mm +1005 -0
- package/platforms/ios/src/{include → cpp/include}/mason_native.h +47 -20
- package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
- package/platforms/ios/src/module.modulemap +2 -2
- package/platforms/new_native_src/cpp/Caches.cpp +36 -0
- package/platforms/new_native_src/cpp/Caches.h +42 -0
- package/platforms/new_native_src/cpp/Common.h +34 -0
- package/platforms/new_native_src/cpp/ConcurrentMap.h +57 -0
- package/platforms/new_native_src/cpp/Helpers.cpp +101 -0
- package/platforms/new_native_src/cpp/Helpers.h +364 -0
- package/platforms/new_native_src/cpp/MasonImpl.cpp +68 -0
- package/platforms/new_native_src/cpp/MasonImpl.h +40 -0
- package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +89 -0
- package/platforms/new_native_src/cpp/MasonNodeImpl.h +47 -0
- package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +2181 -0
- package/platforms/new_native_src/cpp/MasonStyleImpl.h +420 -0
- package/platforms/{ios/Mason.xcframework/ios-arm64/Mason.framework/PrivateHeaders → new_native_src/cpp/include}/mason_native.h +464 -168
- package/platforms/new_native_src/cpp/include/robin_hood.h +2544 -0
- package/pods/Headers/include/APIDesign.md +72 -0
- package/pods/Headers/include/DEPS +10 -0
- package/pods/Headers/include/DIR_METADATA +11 -0
- package/pods/Headers/include/OWNERS +23 -0
- package/pods/Headers/include/cppgc/DEPS +8 -0
- package/pods/Headers/include/cppgc/OWNERS +2 -0
- package/pods/Headers/include/cppgc/README.md +133 -0
- package/pods/Headers/include/cppgc/allocation.h +310 -0
- package/pods/Headers/include/cppgc/common.h +29 -0
- package/pods/Headers/include/cppgc/cross-thread-persistent.h +465 -0
- package/pods/Headers/include/cppgc/custom-space.h +97 -0
- package/pods/Headers/include/cppgc/default-platform.h +67 -0
- package/pods/Headers/include/cppgc/ephemeron-pair.h +30 -0
- package/pods/Headers/include/cppgc/explicit-management.h +100 -0
- package/pods/Headers/include/cppgc/garbage-collected.h +106 -0
- package/pods/Headers/include/cppgc/heap-consistency.h +266 -0
- package/pods/Headers/include/cppgc/heap-state.h +82 -0
- package/pods/Headers/include/cppgc/heap-statistics.h +120 -0
- package/pods/Headers/include/cppgc/heap.h +206 -0
- package/pods/Headers/include/cppgc/internal/api-constants.h +55 -0
- package/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +48 -0
- package/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +79 -0
- package/pods/Headers/include/cppgc/internal/compiler-specific.h +38 -0
- package/pods/Headers/include/cppgc/internal/finalizer-trait.h +93 -0
- package/pods/Headers/include/cppgc/internal/gc-info.h +156 -0
- package/pods/Headers/include/cppgc/internal/logging.h +50 -0
- package/pods/Headers/include/cppgc/internal/name-trait.h +122 -0
- package/pods/Headers/include/cppgc/internal/persistent-node.h +216 -0
- package/pods/Headers/include/cppgc/internal/pointer-policies.h +186 -0
- package/pods/Headers/include/cppgc/internal/write-barrier.h +435 -0
- package/pods/Headers/include/cppgc/liveness-broker.h +77 -0
- package/pods/Headers/include/cppgc/macros.h +26 -0
- package/pods/Headers/include/cppgc/member.h +291 -0
- package/pods/Headers/include/cppgc/name-provider.h +65 -0
- package/pods/Headers/include/cppgc/object-size-trait.h +58 -0
- package/pods/Headers/include/cppgc/persistent.h +370 -0
- package/pods/Headers/include/cppgc/platform.h +156 -0
- package/pods/Headers/include/cppgc/prefinalizer.h +75 -0
- package/pods/Headers/include/cppgc/process-heap-statistics.h +36 -0
- package/pods/Headers/include/cppgc/sentinel-pointer.h +32 -0
- package/pods/Headers/include/cppgc/source-location.h +92 -0
- package/pods/Headers/include/cppgc/testing.h +106 -0
- package/pods/Headers/include/cppgc/trace-trait.h +116 -0
- package/pods/Headers/include/cppgc/type-traits.h +240 -0
- package/pods/Headers/include/cppgc/visitor.h +379 -0
- package/pods/Headers/include/js_protocol-1.2.json +936 -0
- package/pods/Headers/include/js_protocol-1.3.json +1112 -0
- package/pods/Headers/include/js_protocol.pdl +1709 -0
- package/pods/Headers/include/libffi/arm64/ffi.h +524 -0
- package/pods/Headers/include/libffi/arm64/ffitarget.h +92 -0
- package/pods/Headers/include/libffi/x86_64/ffi.h +524 -0
- package/pods/Headers/include/libffi/x86_64/ffitarget.h +147 -0
- package/pods/Headers/include/libffi.h +12 -0
- package/pods/Headers/include/libplatform/DEPS +9 -0
- package/pods/Headers/include/libplatform/libplatform-export.h +29 -0
- package/pods/Headers/include/libplatform/libplatform.h +106 -0
- package/pods/Headers/include/libplatform/v8-tracing.h +333 -0
- package/pods/Headers/include/v8-array-buffer.h +433 -0
- package/pods/Headers/include/v8-callbacks.h +397 -0
- package/pods/Headers/include/v8-container.h +129 -0
- package/pods/Headers/include/v8-context.h +407 -0
- package/pods/Headers/include/v8-cppgc.h +215 -0
- package/pods/Headers/include/v8-data.h +80 -0
- package/pods/Headers/include/v8-date.h +43 -0
- package/pods/Headers/include/v8-debug.h +168 -0
- package/pods/Headers/include/v8-embedder-heap.h +218 -0
- package/pods/Headers/include/v8-embedder-state-scope.h +51 -0
- package/pods/Headers/include/v8-exception.h +217 -0
- package/pods/Headers/include/v8-extension.h +62 -0
- package/pods/Headers/include/v8-external.h +37 -0
- package/pods/Headers/include/v8-fast-api-calls.h +939 -0
- package/pods/Headers/include/v8-forward.h +81 -0
- package/pods/Headers/include/v8-function-callback.h +475 -0
- package/pods/Headers/include/v8-function.h +125 -0
- package/pods/Headers/include/v8-initialization.h +315 -0
- package/pods/Headers/include/v8-inspector-protocol.h +13 -0
- package/pods/Headers/include/v8-inspector.h +376 -0
- package/pods/Headers/include/v8-internal.h +661 -0
- package/pods/Headers/include/v8-isolate.h +1709 -0
- package/pods/Headers/include/v8-json.h +47 -0
- package/pods/Headers/include/v8-local-handle.h +455 -0
- package/pods/Headers/include/v8-locker.h +149 -0
- package/pods/Headers/include/v8-maybe.h +137 -0
- package/pods/Headers/include/v8-memory-span.h +43 -0
- package/pods/Headers/include/v8-message.h +216 -0
- package/pods/Headers/include/v8-metrics.h +255 -0
- package/pods/Headers/include/v8-microtask-queue.h +152 -0
- package/pods/Headers/include/v8-microtask.h +28 -0
- package/pods/Headers/include/v8-object.h +775 -0
- package/pods/Headers/include/v8-persistent-handle.h +590 -0
- package/pods/Headers/include/v8-platform.h +1092 -0
- package/pods/Headers/include/v8-primitive-object.h +118 -0
- package/pods/Headers/include/v8-primitive.h +866 -0
- package/pods/Headers/include/v8-profiler.h +1198 -0
- package/pods/Headers/include/v8-promise.h +174 -0
- package/pods/Headers/include/v8-proxy.h +50 -0
- package/pods/Headers/include/v8-regexp.h +105 -0
- package/pods/Headers/include/v8-script.h +748 -0
- package/pods/Headers/include/v8-snapshot.h +196 -0
- package/pods/Headers/include/v8-statistics.h +217 -0
- package/pods/Headers/include/v8-template.h +1079 -0
- package/pods/Headers/include/v8-traced-handle.h +420 -0
- package/pods/Headers/include/v8-typed-array.h +282 -0
- package/pods/Headers/include/v8-unwinder-state.h +31 -0
- package/pods/Headers/include/v8-unwinder.h +132 -0
- package/pods/Headers/include/v8-util.h +658 -0
- package/pods/Headers/include/v8-value-serializer-version.h +24 -0
- package/pods/Headers/include/v8-value-serializer.h +279 -0
- package/pods/Headers/include/v8-value.h +526 -0
- package/pods/Headers/include/v8-version-string.h +38 -0
- package/pods/Headers/include/v8-version.h +20 -0
- package/pods/Headers/include/v8-wasm-trap-handler-posix.h +31 -0
- package/pods/Headers/include/v8-wasm-trap-handler-win.h +28 -0
- package/pods/Headers/include/v8-wasm.h +257 -0
- package/pods/Headers/include/v8-weak-callback-info.h +86 -0
- package/pods/Headers/include/v8.h +88 -0
- package/pods/Headers/include/v8config.h +605 -0
- package/pods/Headers/inspector/InspectorServer.h +20 -0
- package/pods/Headers/inspector/JsV8InspectorClient.h +66 -0
- package/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +1123 -0
- package/pods/Headers/inspector/base64.h +9 -0
- package/pods/Headers/inspector/src/base/address-region.h +95 -0
- package/pods/Headers/inspector/src/base/atomic-utils.h +219 -0
- package/pods/Headers/inspector/src/base/atomicops.h +332 -0
- package/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +89 -0
- package/pods/Headers/inspector/src/base/base-export.h +31 -0
- package/pods/Headers/inspector/src/base/bits.h +343 -0
- package/pods/Headers/inspector/src/base/build_config.h +234 -0
- package/pods/Headers/inspector/src/base/compiler-specific.h +136 -0
- package/pods/Headers/inspector/src/base/export-template.h +163 -0
- package/pods/Headers/inspector/src/base/flags.h +130 -0
- package/pods/Headers/inspector/src/base/immediate-crash.h +162 -0
- package/pods/Headers/inspector/src/base/lazy-instance.h +258 -0
- package/pods/Headers/inspector/src/base/logging.h +417 -0
- package/pods/Headers/inspector/src/base/macros.h +423 -0
- package/pods/Headers/inspector/src/base/memory.h +89 -0
- package/pods/Headers/inspector/src/base/once.h +108 -0
- package/pods/Headers/inspector/src/base/optional.h +882 -0
- package/pods/Headers/inspector/src/base/platform/mutex.h +370 -0
- package/pods/Headers/inspector/src/base/platform/platform.h +476 -0
- package/pods/Headers/inspector/src/base/platform/semaphore.h +108 -0
- package/pods/Headers/inspector/src/base/platform/v8-time.h +513 -0
- package/pods/Headers/inspector/src/base/platform/wrappers.h +73 -0
- package/pods/Headers/inspector/src/base/safe_conversions.h +389 -0
- package/pods/Headers/inspector/src/base/safe_conversions_impl.h +822 -0
- package/pods/Headers/inspector/src/base/template-utils.h +113 -0
- package/pods/Headers/inspector/src/base/v8-fallthrough.h +21 -0
- package/pods/Headers/inspector/src/common/checks.h +38 -0
- package/pods/Headers/inspector/src/common/globals.h +1842 -0
- package/pods/Headers/inspector/src/debug/debug-interface.h +667 -0
- package/pods/Headers/inspector/src/debug/interface-types.h +175 -0
- package/pods/Headers/inspector/src/init/v8.h +52 -0
- package/pods/Headers/inspector/src/inspector/custom-preview.h +24 -0
- package/pods/Headers/inspector/src/inspector/injected-script.h +251 -0
- package/pods/Headers/inspector/src/inspector/inspected-context.h +79 -0
- package/pods/Headers/inspector/src/inspector/protocol/CSS.h +2148 -0
- package/pods/Headers/inspector/src/inspector/protocol/Console.h +211 -0
- package/pods/Headers/inspector/src/inspector/protocol/DOM.h +1008 -0
- package/pods/Headers/inspector/src/inspector/protocol/Debugger.h +892 -0
- package/pods/Headers/inspector/src/inspector/protocol/Forward.h +75 -0
- package/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +346 -0
- package/pods/Headers/inspector/src/inspector/protocol/Log.h +342 -0
- package/pods/Headers/inspector/src/inspector/protocol/Network.h +2528 -0
- package/pods/Headers/inspector/src/inspector/protocol/Overlay.h +281 -0
- package/pods/Headers/inspector/src/inspector/protocol/Page.h +1189 -0
- package/pods/Headers/inspector/src/inspector/protocol/Profiler.h +1001 -0
- package/pods/Headers/inspector/src/inspector/protocol/Protocol.h +617 -0
- package/pods/Headers/inspector/src/inspector/protocol/Runtime.h +1696 -0
- package/pods/Headers/inspector/src/inspector/protocol/Schema.h +146 -0
- package/pods/Headers/inspector/src/inspector/protocol/Security.h +793 -0
- package/pods/Headers/inspector/src/inspector/remote-object-id.h +54 -0
- package/pods/Headers/inspector/src/inspector/search-util.h +26 -0
- package/pods/Headers/inspector/src/inspector/string-16.h +180 -0
- package/pods/Headers/inspector/src/inspector/string-util.h +128 -0
- package/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +48 -0
- package/pods/Headers/inspector/src/inspector/v8-console-message.h +147 -0
- package/pods/Headers/inspector/src/inspector/v8-console.h +173 -0
- package/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +62 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +248 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-id.h +44 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-script.h +123 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger.h +257 -0
- package/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +91 -0
- package/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +80 -0
- package/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +191 -0
- package/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +156 -0
- package/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +34 -0
- package/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +71 -0
- package/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +24 -0
- package/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +70 -0
- package/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +88 -0
- package/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +104 -0
- package/pods/Headers/inspector/src/inspector/v8-regex.h +38 -0
- package/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +157 -0
- package/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +38 -0
- package/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +164 -0
- package/pods/Headers/inspector/src/inspector/v8-string-conversions.h +17 -0
- package/pods/Headers/inspector/src/inspector/v8-value-utils.h +23 -0
- package/pods/Headers/inspector/src/inspector/value-mirror.h +87 -0
- package/pods/Headers/inspector/src/libplatform/default-platform.h +92 -0
- package/pods/Headers/inspector/src/logging/tracing-flags.h +50 -0
- package/pods/Headers/inspector/src/numbers/conversions.h +183 -0
- package/pods/Headers/inspector/src/tracing/trace-event.h +664 -0
- package/pods/Headers/inspector/src/utils/allocation.h +367 -0
- package/pods/Headers/inspector/src/utils/vector.h +324 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +305 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +314 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +62 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +6 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +58 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +47 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +80 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +52 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +26 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +104 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +39 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +406 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +32 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +158 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +99 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +139 -0
- package/pods/Headers/inspector/utils.h +32 -0
- package/pods/Headers/inspector/v8-inspector-platform.h +44 -0
- package/pods/Headers/jsi/decorator.h +762 -0
- package/pods/Headers/jsi/instrumentation.h +117 -0
- package/pods/Headers/jsi/jsi-inl.h +322 -0
- package/pods/Headers/jsi/jsi.h +1387 -0
- package/pods/Headers/jsi/jsilib.h +59 -0
- package/pods/Headers/jsi/threadsafe.h +79 -0
- package/pods/Headers/runtime/ArgConverter.h +61 -0
- package/pods/Headers/runtime/ArrayAdapter.h +13 -0
- package/pods/Headers/runtime/Caches.h +98 -0
- package/pods/Headers/runtime/ClassBuilder.h +61 -0
- package/pods/Headers/runtime/Common.h +9 -0
- package/pods/Headers/runtime/ConcurrentMap.h +55 -0
- package/pods/Headers/runtime/ConcurrentQueue.h +28 -0
- package/pods/Headers/runtime/Console.h +27 -0
- package/pods/Headers/runtime/Constants.h +15 -0
- package/pods/Headers/runtime/DataWrapper.h +671 -0
- package/pods/Headers/runtime/DictionaryAdapter.h +13 -0
- package/pods/Headers/runtime/ExtVector.h +21 -0
- package/pods/Headers/runtime/FFICall.h +105 -0
- package/pods/Headers/runtime/FastEnumerationAdapter.h +13 -0
- package/pods/Headers/runtime/FunctionReference.h +18 -0
- package/pods/Headers/runtime/Helpers.h +84 -0
- package/pods/Headers/runtime/InlineFunctions.h +16 -0
- package/pods/Headers/runtime/Interop.h +202 -0
- package/pods/Headers/runtime/KnownUnknownClassPair.h +35 -0
- package/pods/Headers/runtime/Metadata.h +981 -0
- package/pods/Headers/runtime/MetadataBuilder.h +72 -0
- package/pods/Headers/runtime/MetadataInlines.h +157 -0
- package/pods/Headers/runtime/ModuleInternal.h +59 -0
- package/pods/Headers/runtime/NSDataAdapter.h +13 -0
- package/pods/Headers/runtime/NativeScriptException.h +27 -0
- package/pods/Headers/runtime/ObjectManager.h +31 -0
- package/pods/Headers/runtime/OneByteStringResource.h +21 -0
- package/pods/Headers/runtime/Pointer.h +26 -0
- package/pods/Headers/runtime/PromiseProxy.h +15 -0
- package/pods/Headers/runtime/Reference.h +38 -0
- package/pods/Headers/runtime/Runtime.h +67 -0
- package/pods/Headers/runtime/RuntimeConfig.h +17 -0
- package/pods/Headers/runtime/SetTimeout.h +34 -0
- package/pods/Headers/runtime/SimpleAllocator.h +23 -0
- package/pods/Headers/runtime/StringHasher.h +315 -0
- package/pods/Headers/runtime/SymbolIterator.h +18 -0
- package/pods/Headers/runtime/SymbolLoader.h +27 -0
- package/pods/Headers/runtime/TNSDerivedClass.h +8 -0
- package/pods/Headers/runtime/TSHelpers.h +15 -0
- package/pods/Headers/runtime/Tasks.h +19 -0
- package/pods/Headers/runtime/UnmanagedType.h +21 -0
- package/pods/Headers/runtime/WeakRef.h +15 -0
- package/pods/Headers/runtime/Worker.h +26 -0
- package/pods/Headers/runtime/robin_hood.h +2184 -0
- package/pods/Headers/v8runtime/HostProxy.h +71 -0
- package/pods/Headers/v8runtime/JSIV8ValueConverter.h +70 -0
- package/pods/Headers/v8runtime/V8PointerValue.h +44 -0
- package/pods/Headers/v8runtime/V8Runtime.h +215 -0
- package/pods/Headers/v8runtime/V8RuntimeConfig.h +26 -0
- package/pods/Headers/v8runtime/V8RuntimeFactory.h +21 -0
- package/pods/NativeScript.podspec +68 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/PrivateHeaders/mason_native.h +0 -676
- package/platforms/ios/src/JSIModule.h +0 -217
- package/platforms/ios/src/JSIModule.mm +0 -2788
package/helpers.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { Length, Utils } from '@nativescript/core';
|
|
2
|
-
|
|
1
|
+
import { Length, Utils, isIOS } from '@nativescript/core';
|
|
2
|
+
import { parseUnit } from '@nativescript/core/css/parser';
|
|
3
|
+
export let UseV8Module = false;
|
|
3
4
|
if (global.isAndroid) {
|
|
4
5
|
try {
|
|
6
|
+
java.lang.System.loadLibrary('masonnative');
|
|
5
7
|
__non_webpack_require__('system_lib://libmasonnativev8.so');
|
|
6
|
-
|
|
8
|
+
UseV8Module = true;
|
|
7
9
|
}
|
|
8
10
|
catch (error) {
|
|
9
11
|
console.warn('Failed to enable on FastAPI');
|
|
@@ -11,12 +13,11 @@ if (global.isAndroid) {
|
|
|
11
13
|
}
|
|
12
14
|
if (global.isIOS) {
|
|
13
15
|
TSCMason.alwaysEnable = true;
|
|
14
|
-
if (!
|
|
16
|
+
if (!UseV8Module) {
|
|
15
17
|
try {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// JSIEnabled = true;
|
|
18
|
+
const installer = global.MasonV8ModuleInstaller.new();
|
|
19
|
+
installer.install();
|
|
20
|
+
UseV8Module = true;
|
|
20
21
|
}
|
|
21
22
|
catch (error) {
|
|
22
23
|
console.warn('Failed to enable on FastAPI');
|
|
@@ -35,8 +36,8 @@ export function _forceStyleUpdate(instance) {
|
|
|
35
36
|
if (!instance._hasNativeView) {
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
|
-
if (
|
|
39
|
-
|
|
39
|
+
if (UseV8Module) {
|
|
40
|
+
MasonV8Module.updateNodeAndStyle(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr);
|
|
40
41
|
}
|
|
41
42
|
else {
|
|
42
43
|
if (global.isAndroid) {
|
|
@@ -52,8 +53,8 @@ export function _markDirty(instance) {
|
|
|
52
53
|
if (!instance._hasNativeView) {
|
|
53
54
|
return;
|
|
54
55
|
}
|
|
55
|
-
if (
|
|
56
|
-
|
|
56
|
+
if (UseV8Module) {
|
|
57
|
+
MasonV8Module.markDirty(instance._masonPtr, instance._masonNodePtr);
|
|
57
58
|
}
|
|
58
59
|
else {
|
|
59
60
|
if (global.isAndroid) {
|
|
@@ -74,8 +75,8 @@ export function _isDirty(instance) {
|
|
|
74
75
|
if (!instance._hasNativeView) {
|
|
75
76
|
return;
|
|
76
77
|
}
|
|
77
|
-
if (
|
|
78
|
-
return
|
|
78
|
+
if (UseV8Module) {
|
|
79
|
+
return MasonV8Module.isDirty(instance._masonPtr, instance._masonNodePtr);
|
|
79
80
|
}
|
|
80
81
|
else {
|
|
81
82
|
if (global.isAndroid) {
|
|
@@ -179,7 +180,14 @@ export function _toMasonDimension(value) {
|
|
|
179
180
|
if (value === 'auto') {
|
|
180
181
|
return { value: 0, type: 'auto', native_type: 0 /* MasonDimensionCompatType.Auto */ };
|
|
181
182
|
}
|
|
182
|
-
|
|
183
|
+
let typeOf = typeof value;
|
|
184
|
+
if (typeOf === 'number') {
|
|
185
|
+
return { value: Utils.layout.toDevicePixels(value), type: 'points', native_type: 1 /* MasonDimensionCompatType.Points */ };
|
|
186
|
+
}
|
|
187
|
+
if (typeOf === 'string') {
|
|
188
|
+
value = parseUnit(value).value;
|
|
189
|
+
typeOf = 'object';
|
|
190
|
+
}
|
|
183
191
|
if (typeOf === 'object') {
|
|
184
192
|
switch (value?.unit) {
|
|
185
193
|
case '%':
|
|
@@ -190,9 +198,6 @@ export function _toMasonDimension(value) {
|
|
|
190
198
|
return { value: Utils.layout.toDevicePixels(value.value), type: 'points', native_type: 1 /* MasonDimensionCompatType.Points */ };
|
|
191
199
|
}
|
|
192
200
|
}
|
|
193
|
-
if (typeOf === 'number') {
|
|
194
|
-
return { value: Utils.layout.toDevicePixels(value), type: 'points', native_type: 1 /* MasonDimensionCompatType.Points */ };
|
|
195
|
-
}
|
|
196
201
|
return { value: value, type: 'points', native_type: 1 /* MasonDimensionCompatType.Points */ };
|
|
197
202
|
}
|
|
198
203
|
export function _intoMasonDimension(value) {
|
|
@@ -295,7 +300,7 @@ export function _setDisplay(value, instance, initial = false) {
|
|
|
295
300
|
return;
|
|
296
301
|
}
|
|
297
302
|
if (instance._hasNativeView) {
|
|
298
|
-
if (
|
|
303
|
+
if (UseV8Module) {
|
|
299
304
|
let nativeValue = -1;
|
|
300
305
|
switch (value) {
|
|
301
306
|
case 'none':
|
|
@@ -307,9 +312,12 @@ export function _setDisplay(value, instance, initial = false) {
|
|
|
307
312
|
case 'grid':
|
|
308
313
|
nativeValue = 2 /* Display.Grid */;
|
|
309
314
|
break;
|
|
315
|
+
case 'block':
|
|
316
|
+
nativeValue = 3 /* Display.Block */;
|
|
317
|
+
break;
|
|
310
318
|
}
|
|
311
319
|
if (nativeValue !== -1) {
|
|
312
|
-
|
|
320
|
+
MasonV8Module.setDisplay(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
313
321
|
}
|
|
314
322
|
}
|
|
315
323
|
else {
|
|
@@ -322,11 +330,14 @@ export function _setDisplay(value, instance, initial = false) {
|
|
|
322
330
|
case 'grid':
|
|
323
331
|
nativeValue = org.nativescript.mason.masonkit.Display.Grid;
|
|
324
332
|
break;
|
|
333
|
+
case 'block':
|
|
334
|
+
nativeValue = org.nativescript.mason.masonkit.Display.Block;
|
|
335
|
+
break;
|
|
325
336
|
case 'none':
|
|
326
337
|
nativeValue = org.nativescript.mason.masonkit.Display.None;
|
|
327
338
|
break;
|
|
328
339
|
}
|
|
329
|
-
if (nativeValue) {
|
|
340
|
+
if (!Utils.isNullOrUndefined(nativeValue)) {
|
|
330
341
|
const nodeOrView = getMasonInstance(instance);
|
|
331
342
|
if (instance._isMasonChild) {
|
|
332
343
|
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setDisplay(nodeOrView, nativeValue);
|
|
@@ -345,6 +356,9 @@ export function _setDisplay(value, instance, initial = false) {
|
|
|
345
356
|
case 'grid':
|
|
346
357
|
nativeValue = 2 /* Display.Grid */;
|
|
347
358
|
break;
|
|
359
|
+
case 'block':
|
|
360
|
+
nativeValue = 3 /* Display.Block */;
|
|
361
|
+
break;
|
|
348
362
|
case 'none':
|
|
349
363
|
nativeValue = 0 /* Display.None */;
|
|
350
364
|
break;
|
|
@@ -360,8 +374,8 @@ export function _getDisplay(instance) {
|
|
|
360
374
|
if (!instance._hasNativeView) {
|
|
361
375
|
return instance.style.display;
|
|
362
376
|
}
|
|
363
|
-
if (
|
|
364
|
-
const value =
|
|
377
|
+
if (UseV8Module) {
|
|
378
|
+
const value = MasonV8Module.getDisplay(instance._masonStylePtr);
|
|
365
379
|
switch (value) {
|
|
366
380
|
case 0:
|
|
367
381
|
return 'none';
|
|
@@ -369,6 +383,8 @@ export function _getDisplay(instance) {
|
|
|
369
383
|
return 'flex';
|
|
370
384
|
case 2:
|
|
371
385
|
return 'grid';
|
|
386
|
+
case 3:
|
|
387
|
+
return 'block';
|
|
372
388
|
}
|
|
373
389
|
}
|
|
374
390
|
else {
|
|
@@ -388,6 +404,8 @@ export function _getDisplay(instance) {
|
|
|
388
404
|
return 'flex';
|
|
389
405
|
case org.nativescript.mason.masonkit.Display.Grid:
|
|
390
406
|
return 'grid';
|
|
407
|
+
case org.nativescript.mason.masonkit.Display.Block:
|
|
408
|
+
return 'block';
|
|
391
409
|
}
|
|
392
410
|
}
|
|
393
411
|
if (global.isIOS) {
|
|
@@ -398,6 +416,8 @@ export function _getDisplay(instance) {
|
|
|
398
416
|
return 'flex';
|
|
399
417
|
case 2 /* Display.Grid */:
|
|
400
418
|
return 'grid';
|
|
419
|
+
case 3 /* Display.Block */:
|
|
420
|
+
return 'block';
|
|
401
421
|
}
|
|
402
422
|
}
|
|
403
423
|
}
|
|
@@ -408,8 +428,8 @@ export function _setMinWidth(value, instance, initial = false) {
|
|
|
408
428
|
return;
|
|
409
429
|
}
|
|
410
430
|
const val = _toMasonDimension(value);
|
|
411
|
-
if (
|
|
412
|
-
|
|
431
|
+
if (UseV8Module) {
|
|
432
|
+
MasonV8Module.setMinWidth(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
413
433
|
}
|
|
414
434
|
else {
|
|
415
435
|
if (global.isAndroid) {
|
|
@@ -430,8 +450,8 @@ export function _getMinWidth(instance) {
|
|
|
430
450
|
if (!instance._hasNativeView) {
|
|
431
451
|
return instance.style.minWidth;
|
|
432
452
|
}
|
|
433
|
-
if (
|
|
434
|
-
return
|
|
453
|
+
if (UseV8Module) {
|
|
454
|
+
return MasonV8Module.getMinWidth(instance._masonStylePtr);
|
|
435
455
|
}
|
|
436
456
|
else {
|
|
437
457
|
if (global.isAndroid) {
|
|
@@ -455,8 +475,8 @@ export function _setMinHeight(value, instance, initial = false) {
|
|
|
455
475
|
return;
|
|
456
476
|
}
|
|
457
477
|
const val = _toMasonDimension(value);
|
|
458
|
-
if (
|
|
459
|
-
|
|
478
|
+
if (UseV8Module) {
|
|
479
|
+
MasonV8Module.setMinHeight(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
460
480
|
}
|
|
461
481
|
else {
|
|
462
482
|
if (global.isAndroid) {
|
|
@@ -477,8 +497,8 @@ export function _getMinHeight(instance) {
|
|
|
477
497
|
if (!instance._hasNativeView) {
|
|
478
498
|
return instance.style.minHeight;
|
|
479
499
|
}
|
|
480
|
-
if (
|
|
481
|
-
return
|
|
500
|
+
if (UseV8Module) {
|
|
501
|
+
return MasonV8Module.getMinHeight(instance._masonStylePtr);
|
|
482
502
|
}
|
|
483
503
|
else {
|
|
484
504
|
if (global.isAndroid) {
|
|
@@ -502,8 +522,8 @@ export function _setWidth(value, instance, initial = false) {
|
|
|
502
522
|
return;
|
|
503
523
|
}
|
|
504
524
|
const val = _toMasonDimension(value);
|
|
505
|
-
if (
|
|
506
|
-
|
|
525
|
+
if (UseV8Module) {
|
|
526
|
+
MasonV8Module.setWidth(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
507
527
|
}
|
|
508
528
|
else {
|
|
509
529
|
if (global.isAndroid) {
|
|
@@ -524,8 +544,8 @@ export function _getWidth(instance) {
|
|
|
524
544
|
if (!instance._hasNativeView) {
|
|
525
545
|
return instance.style.width;
|
|
526
546
|
}
|
|
527
|
-
if (
|
|
528
|
-
return
|
|
547
|
+
if (UseV8Module) {
|
|
548
|
+
return MasonV8Module.getWidth(instance._masonStylePtr);
|
|
529
549
|
}
|
|
530
550
|
else {
|
|
531
551
|
if (global.isAndroid) {
|
|
@@ -549,8 +569,8 @@ export function _setHeight(value, instance, initial = false) {
|
|
|
549
569
|
return;
|
|
550
570
|
}
|
|
551
571
|
const val = _toMasonDimension(value);
|
|
552
|
-
if (
|
|
553
|
-
|
|
572
|
+
if (UseV8Module) {
|
|
573
|
+
MasonV8Module.setHeight(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
554
574
|
}
|
|
555
575
|
else {
|
|
556
576
|
if (global.isAndroid) {
|
|
@@ -571,8 +591,8 @@ export function _getHeight(instance) {
|
|
|
571
591
|
if (!instance._hasNativeView) {
|
|
572
592
|
return instance.style.height;
|
|
573
593
|
}
|
|
574
|
-
if (
|
|
575
|
-
return
|
|
594
|
+
if (UseV8Module) {
|
|
595
|
+
return MasonV8Module.getHeight(instance._masonStylePtr);
|
|
576
596
|
}
|
|
577
597
|
else {
|
|
578
598
|
if (global.isAndroid) {
|
|
@@ -596,8 +616,8 @@ export function _setMaxWidth(value, instance, initial = false) {
|
|
|
596
616
|
return;
|
|
597
617
|
}
|
|
598
618
|
const val = _toMasonDimension(value);
|
|
599
|
-
if (
|
|
600
|
-
|
|
619
|
+
if (UseV8Module) {
|
|
620
|
+
MasonV8Module.setMaxWidth(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
601
621
|
}
|
|
602
622
|
else {
|
|
603
623
|
if (global.isAndroid) {
|
|
@@ -618,8 +638,8 @@ export function _getMaxWidth(instance) {
|
|
|
618
638
|
if (!instance._hasNativeView) {
|
|
619
639
|
return instance.style.maxWidth;
|
|
620
640
|
}
|
|
621
|
-
if (
|
|
622
|
-
return
|
|
641
|
+
if (UseV8Module) {
|
|
642
|
+
return MasonV8Module.getMaxWidth(instance._masonStylePtr);
|
|
623
643
|
}
|
|
624
644
|
else {
|
|
625
645
|
if (global.isAndroid) {
|
|
@@ -643,8 +663,8 @@ export function _setMaxHeight(value, instance, initial = false) {
|
|
|
643
663
|
return;
|
|
644
664
|
}
|
|
645
665
|
const val = _toMasonDimension(value);
|
|
646
|
-
if (
|
|
647
|
-
|
|
666
|
+
if (UseV8Module) {
|
|
667
|
+
MasonV8Module.setMaxHeight(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
648
668
|
}
|
|
649
669
|
else {
|
|
650
670
|
if (global.isAndroid) {
|
|
@@ -665,8 +685,8 @@ export function _getMaxHeight(instance) {
|
|
|
665
685
|
if (!instance._hasNativeView) {
|
|
666
686
|
return instance.style.maxHeight;
|
|
667
687
|
}
|
|
668
|
-
if (
|
|
669
|
-
return
|
|
688
|
+
if (UseV8Module) {
|
|
689
|
+
return MasonV8Module.getMaxHeight(instance._masonStylePtr);
|
|
670
690
|
}
|
|
671
691
|
else {
|
|
672
692
|
if (global.isAndroid) {
|
|
@@ -693,7 +713,7 @@ export function _setFlexDirection(value, instance, initial = false) {
|
|
|
693
713
|
let nativeValue = null;
|
|
694
714
|
switch (value) {
|
|
695
715
|
case 'column':
|
|
696
|
-
if (
|
|
716
|
+
if (UseV8Module) {
|
|
697
717
|
nativeValue = 1 /* FlexDirection.Column */;
|
|
698
718
|
}
|
|
699
719
|
else {
|
|
@@ -706,7 +726,7 @@ export function _setFlexDirection(value, instance, initial = false) {
|
|
|
706
726
|
}
|
|
707
727
|
break;
|
|
708
728
|
case 'row':
|
|
709
|
-
if (
|
|
729
|
+
if (UseV8Module) {
|
|
710
730
|
nativeValue = 0 /* FlexDirection.Row */;
|
|
711
731
|
}
|
|
712
732
|
else {
|
|
@@ -719,7 +739,7 @@ export function _setFlexDirection(value, instance, initial = false) {
|
|
|
719
739
|
}
|
|
720
740
|
break;
|
|
721
741
|
case 'column-reverse':
|
|
722
|
-
if (
|
|
742
|
+
if (UseV8Module) {
|
|
723
743
|
nativeValue = 3 /* FlexDirection.ColumnReverse */;
|
|
724
744
|
}
|
|
725
745
|
else {
|
|
@@ -732,7 +752,7 @@ export function _setFlexDirection(value, instance, initial = false) {
|
|
|
732
752
|
}
|
|
733
753
|
break;
|
|
734
754
|
case 'row-reverse':
|
|
735
|
-
if (
|
|
755
|
+
if (UseV8Module) {
|
|
736
756
|
nativeValue = 2 /* FlexDirection.RowReverse */;
|
|
737
757
|
}
|
|
738
758
|
else {
|
|
@@ -745,9 +765,9 @@ export function _setFlexDirection(value, instance, initial = false) {
|
|
|
745
765
|
}
|
|
746
766
|
break;
|
|
747
767
|
}
|
|
748
|
-
if (nativeValue) {
|
|
749
|
-
if (
|
|
750
|
-
|
|
768
|
+
if (!Utils.isNullOrUndefined(nativeValue)) {
|
|
769
|
+
if (UseV8Module) {
|
|
770
|
+
MasonV8Module.setFlexDirection(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
751
771
|
}
|
|
752
772
|
else {
|
|
753
773
|
if (global.isAndroid) {
|
|
@@ -768,8 +788,8 @@ export function _setFlexDirection(value, instance, initial = false) {
|
|
|
768
788
|
}
|
|
769
789
|
export function _getFlexDirection(instance) {
|
|
770
790
|
if (instance._hasNativeView) {
|
|
771
|
-
if (
|
|
772
|
-
const value =
|
|
791
|
+
if (UseV8Module) {
|
|
792
|
+
const value = MasonV8Module.getFlexDirection(instance._masonStylePtr);
|
|
773
793
|
switch (value) {
|
|
774
794
|
case 0 /* FlexDirection.Row */:
|
|
775
795
|
return 'row';
|
|
@@ -823,8 +843,8 @@ export function _getPosition(instance) {
|
|
|
823
843
|
if (!instance._hasNativeView) {
|
|
824
844
|
return instance.style.position;
|
|
825
845
|
}
|
|
826
|
-
if (
|
|
827
|
-
const value =
|
|
846
|
+
if (UseV8Module) {
|
|
847
|
+
const value = MasonV8Module.getPosition(instance._masonStylePtr);
|
|
828
848
|
switch (value) {
|
|
829
849
|
case 0:
|
|
830
850
|
return 'relative';
|
|
@@ -850,7 +870,7 @@ export function _getPosition(instance) {
|
|
|
850
870
|
}
|
|
851
871
|
}
|
|
852
872
|
if (global.isIOS) {
|
|
853
|
-
switch (instance.ios.
|
|
873
|
+
switch (instance.ios._position) {
|
|
854
874
|
case 1 /* Position.Absolute */:
|
|
855
875
|
return 'absolute';
|
|
856
876
|
case 0 /* Position.Relative */:
|
|
@@ -867,25 +887,35 @@ export function _setPosition(value, instance, initial = false) {
|
|
|
867
887
|
let nativeValue = null;
|
|
868
888
|
switch (value) {
|
|
869
889
|
case 'absolute':
|
|
870
|
-
if (
|
|
890
|
+
if (UseV8Module) {
|
|
871
891
|
nativeValue = 1 /* PositionType.Absolute */;
|
|
872
892
|
}
|
|
873
893
|
else {
|
|
874
|
-
|
|
894
|
+
if (global.isAndroid) {
|
|
895
|
+
nativeValue = org.nativescript.mason.masonkit.Position.Absolute;
|
|
896
|
+
}
|
|
897
|
+
else {
|
|
898
|
+
nativeValue = 1;
|
|
899
|
+
}
|
|
875
900
|
}
|
|
876
901
|
break;
|
|
877
902
|
case 'relative':
|
|
878
|
-
if (
|
|
903
|
+
if (UseV8Module) {
|
|
879
904
|
nativeValue = 0 /* PositionType.Relative */;
|
|
880
905
|
}
|
|
881
906
|
else {
|
|
882
|
-
|
|
907
|
+
if (global.isAndroid) {
|
|
908
|
+
nativeValue = org.nativescript.mason.masonkit.Position.Relative;
|
|
909
|
+
}
|
|
910
|
+
else {
|
|
911
|
+
nativeValue = 0;
|
|
912
|
+
}
|
|
883
913
|
}
|
|
884
914
|
break;
|
|
885
915
|
}
|
|
886
|
-
if (nativeValue) {
|
|
887
|
-
if (
|
|
888
|
-
|
|
916
|
+
if (!Utils.isNullOrUndefined(nativeValue)) {
|
|
917
|
+
if (UseV8Module) {
|
|
918
|
+
MasonV8Module.setPosition(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
889
919
|
}
|
|
890
920
|
else {
|
|
891
921
|
if (global.isAndroid) {
|
|
@@ -898,7 +928,7 @@ export function _setPosition(value, instance, initial = false) {
|
|
|
898
928
|
}
|
|
899
929
|
}
|
|
900
930
|
if (global.isIOS) {
|
|
901
|
-
instance.ios.
|
|
931
|
+
instance.ios._position = nativeValue;
|
|
902
932
|
}
|
|
903
933
|
}
|
|
904
934
|
}
|
|
@@ -912,7 +942,7 @@ export function _setFlexWrap(value, instance, initial = false) {
|
|
|
912
942
|
let nativeValue = null;
|
|
913
943
|
switch (value) {
|
|
914
944
|
case 'no-wrap':
|
|
915
|
-
if (
|
|
945
|
+
if (UseV8Module) {
|
|
916
946
|
nativeValue = 0 /* FlexWrap.NoWrap */;
|
|
917
947
|
}
|
|
918
948
|
else {
|
|
@@ -925,7 +955,7 @@ export function _setFlexWrap(value, instance, initial = false) {
|
|
|
925
955
|
}
|
|
926
956
|
break;
|
|
927
957
|
case 'wrap':
|
|
928
|
-
if (
|
|
958
|
+
if (UseV8Module) {
|
|
929
959
|
nativeValue = 1 /* FlexWrap.Wrap */;
|
|
930
960
|
}
|
|
931
961
|
else {
|
|
@@ -938,7 +968,7 @@ export function _setFlexWrap(value, instance, initial = false) {
|
|
|
938
968
|
}
|
|
939
969
|
break;
|
|
940
970
|
case 'wrap-reverse':
|
|
941
|
-
if (
|
|
971
|
+
if (UseV8Module) {
|
|
942
972
|
nativeValue = 2 /* FlexWrap.WrapReverse */;
|
|
943
973
|
}
|
|
944
974
|
else {
|
|
@@ -951,9 +981,9 @@ export function _setFlexWrap(value, instance, initial = false) {
|
|
|
951
981
|
}
|
|
952
982
|
break;
|
|
953
983
|
}
|
|
954
|
-
if (nativeValue) {
|
|
955
|
-
if (
|
|
956
|
-
|
|
984
|
+
if (!Utils.isNullOrUndefined(nativeValue)) {
|
|
985
|
+
if (UseV8Module) {
|
|
986
|
+
MasonV8Module.setFlexWrap(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
957
987
|
}
|
|
958
988
|
else {
|
|
959
989
|
if (global.isAndroid) {
|
|
@@ -974,8 +1004,8 @@ export function _setFlexWrap(value, instance, initial = false) {
|
|
|
974
1004
|
}
|
|
975
1005
|
export function _getFlexWrap(instance) {
|
|
976
1006
|
if (instance._hasNativeView) {
|
|
977
|
-
if (
|
|
978
|
-
const value =
|
|
1007
|
+
if (UseV8Module) {
|
|
1008
|
+
const value = MasonV8Module.getFlexWrap(instance._masonStylePtr);
|
|
979
1009
|
switch (value) {
|
|
980
1010
|
case 0:
|
|
981
1011
|
return 'no-wrap';
|
|
@@ -1027,7 +1057,7 @@ export function _setAlignItems(value, instance, initial = false) {
|
|
|
1027
1057
|
let nativeValue = null;
|
|
1028
1058
|
switch (value) {
|
|
1029
1059
|
case 'normal':
|
|
1030
|
-
if (
|
|
1060
|
+
if (UseV8Module || global.isIOS) {
|
|
1031
1061
|
nativeValue = -1 /* AlignItems.Normal */;
|
|
1032
1062
|
}
|
|
1033
1063
|
else {
|
|
@@ -1035,7 +1065,7 @@ export function _setAlignItems(value, instance, initial = false) {
|
|
|
1035
1065
|
}
|
|
1036
1066
|
break;
|
|
1037
1067
|
case 'baseline':
|
|
1038
|
-
if (
|
|
1068
|
+
if (UseV8Module || global.isIOS) {
|
|
1039
1069
|
nativeValue = 3 /* AlignItems.Baseline */;
|
|
1040
1070
|
}
|
|
1041
1071
|
else {
|
|
@@ -1043,7 +1073,7 @@ export function _setAlignItems(value, instance, initial = false) {
|
|
|
1043
1073
|
}
|
|
1044
1074
|
break;
|
|
1045
1075
|
case 'center':
|
|
1046
|
-
if (
|
|
1076
|
+
if (UseV8Module || global.isIOS) {
|
|
1047
1077
|
nativeValue = 2 /* AlignItems.Center */;
|
|
1048
1078
|
}
|
|
1049
1079
|
else {
|
|
@@ -1051,8 +1081,15 @@ export function _setAlignItems(value, instance, initial = false) {
|
|
|
1051
1081
|
}
|
|
1052
1082
|
break;
|
|
1053
1083
|
case 'flex-end':
|
|
1084
|
+
if (UseV8Module || global.isIOS) {
|
|
1085
|
+
nativeValue = 6 /* AlignItems.FlexEnd */;
|
|
1086
|
+
}
|
|
1087
|
+
else {
|
|
1088
|
+
nativeValue = org.nativescript.mason.masonkit.AlignItems.FlexEnd;
|
|
1089
|
+
}
|
|
1090
|
+
break;
|
|
1054
1091
|
case 'end':
|
|
1055
|
-
if (
|
|
1092
|
+
if (UseV8Module || global.isIOS) {
|
|
1056
1093
|
nativeValue = 1 /* AlignItems.End */;
|
|
1057
1094
|
}
|
|
1058
1095
|
else {
|
|
@@ -1060,8 +1097,15 @@ export function _setAlignItems(value, instance, initial = false) {
|
|
|
1060
1097
|
}
|
|
1061
1098
|
break;
|
|
1062
1099
|
case 'flex-start':
|
|
1100
|
+
if (UseV8Module || global.isIOS) {
|
|
1101
|
+
nativeValue = 5 /* AlignItems.FlexStart */;
|
|
1102
|
+
}
|
|
1103
|
+
else {
|
|
1104
|
+
nativeValue = org.nativescript.mason.masonkit.AlignItems.FlexStart;
|
|
1105
|
+
}
|
|
1106
|
+
break;
|
|
1063
1107
|
case 'start':
|
|
1064
|
-
if (
|
|
1108
|
+
if (UseV8Module || global.isIOS) {
|
|
1065
1109
|
nativeValue = 0 /* AlignItems.Start */;
|
|
1066
1110
|
}
|
|
1067
1111
|
else {
|
|
@@ -1069,7 +1113,7 @@ export function _setAlignItems(value, instance, initial = false) {
|
|
|
1069
1113
|
}
|
|
1070
1114
|
break;
|
|
1071
1115
|
case 'stretch':
|
|
1072
|
-
if (
|
|
1116
|
+
if (UseV8Module || global.isIOS) {
|
|
1073
1117
|
nativeValue = 4 /* AlignItems.Stretch */;
|
|
1074
1118
|
}
|
|
1075
1119
|
else {
|
|
@@ -1077,9 +1121,9 @@ export function _setAlignItems(value, instance, initial = false) {
|
|
|
1077
1121
|
}
|
|
1078
1122
|
break;
|
|
1079
1123
|
}
|
|
1080
|
-
if (nativeValue) {
|
|
1081
|
-
if (
|
|
1082
|
-
|
|
1124
|
+
if (!Utils.isNullOrUndefined(nativeValue)) {
|
|
1125
|
+
if (UseV8Module) {
|
|
1126
|
+
MasonV8Module.setAlignItems(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
1083
1127
|
}
|
|
1084
1128
|
else {
|
|
1085
1129
|
if (global.isAndroid) {
|
|
@@ -1100,8 +1144,8 @@ export function _setAlignItems(value, instance, initial = false) {
|
|
|
1100
1144
|
}
|
|
1101
1145
|
export function _getAlignItems(instance) {
|
|
1102
1146
|
if (instance._hasNativeView) {
|
|
1103
|
-
if (
|
|
1104
|
-
const value =
|
|
1147
|
+
if (UseV8Module) {
|
|
1148
|
+
const value = MasonV8Module.getAlignItems(instance._masonStylePtr);
|
|
1105
1149
|
switch (value) {
|
|
1106
1150
|
case -1 /* AlignItems.Normal */:
|
|
1107
1151
|
return 'normal';
|
|
@@ -1171,7 +1215,7 @@ export function _setAlignSelf(value, instance, initial = false) {
|
|
|
1171
1215
|
let nativeValue = null;
|
|
1172
1216
|
switch (value) {
|
|
1173
1217
|
case 'normal':
|
|
1174
|
-
if (
|
|
1218
|
+
if (UseV8Module || global.isIOS) {
|
|
1175
1219
|
nativeValue = -1 /* AlignSelf.Normal */;
|
|
1176
1220
|
}
|
|
1177
1221
|
else {
|
|
@@ -1179,7 +1223,7 @@ export function _setAlignSelf(value, instance, initial = false) {
|
|
|
1179
1223
|
}
|
|
1180
1224
|
break;
|
|
1181
1225
|
case 'baseline':
|
|
1182
|
-
if (
|
|
1226
|
+
if (UseV8Module || global.isIOS) {
|
|
1183
1227
|
nativeValue = 3 /* AlignSelf.Baseline */;
|
|
1184
1228
|
}
|
|
1185
1229
|
else {
|
|
@@ -1187,7 +1231,7 @@ export function _setAlignSelf(value, instance, initial = false) {
|
|
|
1187
1231
|
}
|
|
1188
1232
|
break;
|
|
1189
1233
|
case 'center':
|
|
1190
|
-
if (
|
|
1234
|
+
if (UseV8Module || global.isIOS) {
|
|
1191
1235
|
nativeValue = 2 /* AlignSelf.Center */;
|
|
1192
1236
|
}
|
|
1193
1237
|
else {
|
|
@@ -1195,8 +1239,15 @@ export function _setAlignSelf(value, instance, initial = false) {
|
|
|
1195
1239
|
}
|
|
1196
1240
|
break;
|
|
1197
1241
|
case 'flex-end':
|
|
1242
|
+
if (UseV8Module || global.isIOS) {
|
|
1243
|
+
nativeValue = 6 /* AlignSelf.FlexEnd */;
|
|
1244
|
+
}
|
|
1245
|
+
else {
|
|
1246
|
+
nativeValue = org.nativescript.mason.masonkit.AlignSelf.FlexEnd;
|
|
1247
|
+
}
|
|
1248
|
+
break;
|
|
1198
1249
|
case 'end':
|
|
1199
|
-
if (
|
|
1250
|
+
if (UseV8Module || global.isIOS) {
|
|
1200
1251
|
nativeValue = 1 /* AlignSelf.End */;
|
|
1201
1252
|
}
|
|
1202
1253
|
else {
|
|
@@ -1204,8 +1255,15 @@ export function _setAlignSelf(value, instance, initial = false) {
|
|
|
1204
1255
|
}
|
|
1205
1256
|
break;
|
|
1206
1257
|
case 'flex-start':
|
|
1258
|
+
if (UseV8Module || global.isIOS) {
|
|
1259
|
+
nativeValue = 5 /* AlignSelf.FlexStart */;
|
|
1260
|
+
}
|
|
1261
|
+
else {
|
|
1262
|
+
nativeValue = org.nativescript.mason.masonkit.AlignSelf.FlexStart;
|
|
1263
|
+
}
|
|
1264
|
+
break;
|
|
1207
1265
|
case 'start':
|
|
1208
|
-
if (
|
|
1266
|
+
if (UseV8Module || global.isIOS) {
|
|
1209
1267
|
nativeValue = 0 /* AlignSelf.Start */;
|
|
1210
1268
|
}
|
|
1211
1269
|
else {
|
|
@@ -1213,7 +1271,7 @@ export function _setAlignSelf(value, instance, initial = false) {
|
|
|
1213
1271
|
}
|
|
1214
1272
|
break;
|
|
1215
1273
|
case 'stretch':
|
|
1216
|
-
if (
|
|
1274
|
+
if (UseV8Module || global.isIOS) {
|
|
1217
1275
|
nativeValue = 4 /* AlignSelf.Stretch */;
|
|
1218
1276
|
}
|
|
1219
1277
|
else {
|
|
@@ -1221,9 +1279,9 @@ export function _setAlignSelf(value, instance, initial = false) {
|
|
|
1221
1279
|
}
|
|
1222
1280
|
break;
|
|
1223
1281
|
}
|
|
1224
|
-
if (nativeValue) {
|
|
1225
|
-
if (
|
|
1226
|
-
|
|
1282
|
+
if (!Utils.isNullOrUndefined(nativeValue)) {
|
|
1283
|
+
if (UseV8Module) {
|
|
1284
|
+
MasonV8Module.setAlignSelf(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
1227
1285
|
}
|
|
1228
1286
|
else {
|
|
1229
1287
|
if (global.isAndroid) {
|
|
@@ -1244,8 +1302,8 @@ export function _setAlignSelf(value, instance, initial = false) {
|
|
|
1244
1302
|
}
|
|
1245
1303
|
export function _getAlignSelf(instance) {
|
|
1246
1304
|
if (instance._hasNativeView) {
|
|
1247
|
-
if (
|
|
1248
|
-
const value =
|
|
1305
|
+
if (UseV8Module) {
|
|
1306
|
+
const value = MasonV8Module.getAlignSelf(instance._masonStylePtr);
|
|
1249
1307
|
switch (value) {
|
|
1250
1308
|
case -1 /* AlignSelf.Normal */:
|
|
1251
1309
|
return 'normal';
|
|
@@ -1315,7 +1373,7 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1315
1373
|
let nativeValue = null;
|
|
1316
1374
|
switch (value) {
|
|
1317
1375
|
case 'normal':
|
|
1318
|
-
if (
|
|
1376
|
+
if (UseV8Module) {
|
|
1319
1377
|
nativeValue = -1 /* AlignContent.Normal */;
|
|
1320
1378
|
}
|
|
1321
1379
|
else {
|
|
@@ -1328,7 +1386,7 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1328
1386
|
}
|
|
1329
1387
|
break;
|
|
1330
1388
|
case 'space-around':
|
|
1331
|
-
if (
|
|
1389
|
+
if (UseV8Module) {
|
|
1332
1390
|
nativeValue = 5 /* AlignContent.SpaceAround */;
|
|
1333
1391
|
}
|
|
1334
1392
|
else {
|
|
@@ -1341,7 +1399,7 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1341
1399
|
}
|
|
1342
1400
|
break;
|
|
1343
1401
|
case 'space-between':
|
|
1344
|
-
if (
|
|
1402
|
+
if (UseV8Module) {
|
|
1345
1403
|
nativeValue = 4 /* AlignContent.SpaceBetween */;
|
|
1346
1404
|
}
|
|
1347
1405
|
else {
|
|
@@ -1354,7 +1412,7 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1354
1412
|
}
|
|
1355
1413
|
break;
|
|
1356
1414
|
case 'space-evenly':
|
|
1357
|
-
if (
|
|
1415
|
+
if (UseV8Module) {
|
|
1358
1416
|
nativeValue = 6 /* AlignContent.SpaceEvenly */;
|
|
1359
1417
|
}
|
|
1360
1418
|
else {
|
|
@@ -1367,7 +1425,7 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1367
1425
|
}
|
|
1368
1426
|
break;
|
|
1369
1427
|
case 'center':
|
|
1370
|
-
if (
|
|
1428
|
+
if (UseV8Module) {
|
|
1371
1429
|
nativeValue = 2 /* AlignContent.Center */;
|
|
1372
1430
|
}
|
|
1373
1431
|
else {
|
|
@@ -1380,8 +1438,20 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1380
1438
|
}
|
|
1381
1439
|
break;
|
|
1382
1440
|
case 'flex-end':
|
|
1441
|
+
if (UseV8Module) {
|
|
1442
|
+
nativeValue = 8 /* AlignContent.FlexEnd */;
|
|
1443
|
+
}
|
|
1444
|
+
else {
|
|
1445
|
+
if (global.isAndroid) {
|
|
1446
|
+
nativeValue = org.nativescript.mason.masonkit.AlignContent.FlexEnd;
|
|
1447
|
+
}
|
|
1448
|
+
if (global.isIOS) {
|
|
1449
|
+
nativeValue = 8 /* AlignContent.FlexEnd */;
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
break;
|
|
1383
1453
|
case 'end':
|
|
1384
|
-
if (
|
|
1454
|
+
if (UseV8Module) {
|
|
1385
1455
|
nativeValue = 1 /* AlignContent.End */;
|
|
1386
1456
|
}
|
|
1387
1457
|
else {
|
|
@@ -1394,8 +1464,20 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1394
1464
|
}
|
|
1395
1465
|
break;
|
|
1396
1466
|
case 'flex-start':
|
|
1467
|
+
if (UseV8Module) {
|
|
1468
|
+
nativeValue = 7 /* AlignContent.FlexStart */;
|
|
1469
|
+
}
|
|
1470
|
+
else {
|
|
1471
|
+
if (global.isAndroid) {
|
|
1472
|
+
nativeValue = org.nativescript.mason.masonkit.AlignContent.FlexStart;
|
|
1473
|
+
}
|
|
1474
|
+
if (global.isIOS) {
|
|
1475
|
+
nativeValue = 7 /* AlignContent.FlexStart */;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
break;
|
|
1397
1479
|
case 'start':
|
|
1398
|
-
if (
|
|
1480
|
+
if (UseV8Module) {
|
|
1399
1481
|
nativeValue = 0 /* AlignContent.Start */;
|
|
1400
1482
|
}
|
|
1401
1483
|
else {
|
|
@@ -1408,7 +1490,7 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1408
1490
|
}
|
|
1409
1491
|
break;
|
|
1410
1492
|
case 'stretch':
|
|
1411
|
-
if (
|
|
1493
|
+
if (UseV8Module) {
|
|
1412
1494
|
nativeValue = 3 /* AlignContent.Stretch */;
|
|
1413
1495
|
}
|
|
1414
1496
|
else {
|
|
@@ -1421,9 +1503,9 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1421
1503
|
}
|
|
1422
1504
|
break;
|
|
1423
1505
|
}
|
|
1424
|
-
if (nativeValue) {
|
|
1425
|
-
if (
|
|
1426
|
-
|
|
1506
|
+
if (!Utils.isNullOrUndefined(nativeValue)) {
|
|
1507
|
+
if (UseV8Module) {
|
|
1508
|
+
MasonV8Module.setAlignContent(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
1427
1509
|
}
|
|
1428
1510
|
else {
|
|
1429
1511
|
if (global.isAndroid) {
|
|
@@ -1444,8 +1526,8 @@ export function _setAlignContent(value, instance, initial = false) {
|
|
|
1444
1526
|
}
|
|
1445
1527
|
export function _getAlignContent(instance) {
|
|
1446
1528
|
if (instance._hasNativeView) {
|
|
1447
|
-
if (
|
|
1448
|
-
const value =
|
|
1529
|
+
if (UseV8Module) {
|
|
1530
|
+
const value = MasonV8Module.getAlignContent(instance._masonStylePtr);
|
|
1449
1531
|
switch (value) {
|
|
1450
1532
|
case -1 /* AlignContent.Normal */:
|
|
1451
1533
|
return 'normal';
|
|
@@ -1527,7 +1609,7 @@ export function _setJustifyItems(value, instance, initial = false) {
|
|
|
1527
1609
|
let nativeValue = null;
|
|
1528
1610
|
switch (value) {
|
|
1529
1611
|
case 'normal':
|
|
1530
|
-
if (
|
|
1612
|
+
if (UseV8Module) {
|
|
1531
1613
|
nativeValue = -1 /* JustifyItems.Normal */;
|
|
1532
1614
|
}
|
|
1533
1615
|
else {
|
|
@@ -1535,7 +1617,7 @@ export function _setJustifyItems(value, instance, initial = false) {
|
|
|
1535
1617
|
}
|
|
1536
1618
|
break;
|
|
1537
1619
|
case 'baseline':
|
|
1538
|
-
if (
|
|
1620
|
+
if (UseV8Module) {
|
|
1539
1621
|
nativeValue = 3 /* JustifyItems.Baseline */;
|
|
1540
1622
|
}
|
|
1541
1623
|
else {
|
|
@@ -1543,7 +1625,7 @@ export function _setJustifyItems(value, instance, initial = false) {
|
|
|
1543
1625
|
}
|
|
1544
1626
|
break;
|
|
1545
1627
|
case 'center':
|
|
1546
|
-
if (
|
|
1628
|
+
if (UseV8Module) {
|
|
1547
1629
|
nativeValue = 2 /* JustifyItems.Center */;
|
|
1548
1630
|
}
|
|
1549
1631
|
else {
|
|
@@ -1551,8 +1633,15 @@ export function _setJustifyItems(value, instance, initial = false) {
|
|
|
1551
1633
|
}
|
|
1552
1634
|
break;
|
|
1553
1635
|
case 'flex-end':
|
|
1636
|
+
if (UseV8Module) {
|
|
1637
|
+
nativeValue = 6 /* JustifyItems.FlexEnd */;
|
|
1638
|
+
}
|
|
1639
|
+
else {
|
|
1640
|
+
nativeValue = org.nativescript.mason.masonkit.JustifyItems.FlexEnd;
|
|
1641
|
+
}
|
|
1642
|
+
break;
|
|
1554
1643
|
case 'end':
|
|
1555
|
-
if (
|
|
1644
|
+
if (UseV8Module) {
|
|
1556
1645
|
nativeValue = 1 /* JustifyItems.End */;
|
|
1557
1646
|
}
|
|
1558
1647
|
else {
|
|
@@ -1560,8 +1649,15 @@ export function _setJustifyItems(value, instance, initial = false) {
|
|
|
1560
1649
|
}
|
|
1561
1650
|
break;
|
|
1562
1651
|
case 'flex-start':
|
|
1652
|
+
if (UseV8Module) {
|
|
1653
|
+
nativeValue = 5 /* JustifyItems.FlexStart */;
|
|
1654
|
+
}
|
|
1655
|
+
else {
|
|
1656
|
+
nativeValue = org.nativescript.mason.masonkit.JustifyItems.FlexStart;
|
|
1657
|
+
}
|
|
1658
|
+
break;
|
|
1563
1659
|
case 'start':
|
|
1564
|
-
if (
|
|
1660
|
+
if (UseV8Module) {
|
|
1565
1661
|
nativeValue = 0 /* JustifyItems.Start */;
|
|
1566
1662
|
}
|
|
1567
1663
|
else {
|
|
@@ -1569,7 +1665,7 @@ export function _setJustifyItems(value, instance, initial = false) {
|
|
|
1569
1665
|
}
|
|
1570
1666
|
break;
|
|
1571
1667
|
case 'stretch':
|
|
1572
|
-
if (
|
|
1668
|
+
if (UseV8Module) {
|
|
1573
1669
|
nativeValue = 4 /* JustifyItems.Stretch */;
|
|
1574
1670
|
}
|
|
1575
1671
|
else {
|
|
@@ -1577,9 +1673,9 @@ export function _setJustifyItems(value, instance, initial = false) {
|
|
|
1577
1673
|
}
|
|
1578
1674
|
break;
|
|
1579
1675
|
}
|
|
1580
|
-
if (nativeValue) {
|
|
1581
|
-
if (
|
|
1582
|
-
|
|
1676
|
+
if (!Utils.isNullOrUndefined(nativeValue)) {
|
|
1677
|
+
if (UseV8Module) {
|
|
1678
|
+
MasonV8Module.setJustifyItems(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
1583
1679
|
}
|
|
1584
1680
|
else {
|
|
1585
1681
|
if (global.isAndroid) {
|
|
@@ -1600,8 +1696,8 @@ export function _setJustifyItems(value, instance, initial = false) {
|
|
|
1600
1696
|
}
|
|
1601
1697
|
export function _getJustifyItems(instance) {
|
|
1602
1698
|
if (instance._hasNativeView) {
|
|
1603
|
-
if (
|
|
1604
|
-
const value =
|
|
1699
|
+
if (UseV8Module) {
|
|
1700
|
+
const value = MasonV8Module.getJustifyItems(instance._masonStylePtr);
|
|
1605
1701
|
switch (value) {
|
|
1606
1702
|
case -1 /* JustifyItems.Normal */:
|
|
1607
1703
|
return 'normal';
|
|
@@ -1671,7 +1767,7 @@ export function _setJustifySelf(value, instance, initial = false) {
|
|
|
1671
1767
|
let nativeValue = null;
|
|
1672
1768
|
switch (value) {
|
|
1673
1769
|
case 'normal':
|
|
1674
|
-
if (
|
|
1770
|
+
if (UseV8Module) {
|
|
1675
1771
|
nativeValue = -1 /* JustifySelf.Normal */;
|
|
1676
1772
|
}
|
|
1677
1773
|
else {
|
|
@@ -1679,7 +1775,7 @@ export function _setJustifySelf(value, instance, initial = false) {
|
|
|
1679
1775
|
}
|
|
1680
1776
|
break;
|
|
1681
1777
|
case 'baseline':
|
|
1682
|
-
if (
|
|
1778
|
+
if (UseV8Module) {
|
|
1683
1779
|
nativeValue = 3 /* JustifySelf.Baseline */;
|
|
1684
1780
|
}
|
|
1685
1781
|
else {
|
|
@@ -1687,7 +1783,7 @@ export function _setJustifySelf(value, instance, initial = false) {
|
|
|
1687
1783
|
}
|
|
1688
1784
|
break;
|
|
1689
1785
|
case 'center':
|
|
1690
|
-
if (
|
|
1786
|
+
if (UseV8Module) {
|
|
1691
1787
|
nativeValue = 2 /* JustifySelf.Center */;
|
|
1692
1788
|
}
|
|
1693
1789
|
else {
|
|
@@ -1695,8 +1791,15 @@ export function _setJustifySelf(value, instance, initial = false) {
|
|
|
1695
1791
|
}
|
|
1696
1792
|
break;
|
|
1697
1793
|
case 'flex-end':
|
|
1794
|
+
if (UseV8Module) {
|
|
1795
|
+
nativeValue = 6 /* JustifySelf.FlexEnd */;
|
|
1796
|
+
}
|
|
1797
|
+
else {
|
|
1798
|
+
nativeValue = org.nativescript.mason.masonkit.JustifySelf.FlexEnd;
|
|
1799
|
+
}
|
|
1800
|
+
break;
|
|
1698
1801
|
case 'end':
|
|
1699
|
-
if (
|
|
1802
|
+
if (UseV8Module) {
|
|
1700
1803
|
nativeValue = 1 /* JustifySelf.End */;
|
|
1701
1804
|
}
|
|
1702
1805
|
else {
|
|
@@ -1704,8 +1807,15 @@ export function _setJustifySelf(value, instance, initial = false) {
|
|
|
1704
1807
|
}
|
|
1705
1808
|
break;
|
|
1706
1809
|
case 'flex-start':
|
|
1810
|
+
if (UseV8Module) {
|
|
1811
|
+
nativeValue = 5 /* JustifySelf.FlexStart */;
|
|
1812
|
+
}
|
|
1813
|
+
else {
|
|
1814
|
+
nativeValue = org.nativescript.mason.masonkit.JustifySelf.FlexStart;
|
|
1815
|
+
}
|
|
1816
|
+
break;
|
|
1707
1817
|
case 'start':
|
|
1708
|
-
if (
|
|
1818
|
+
if (UseV8Module) {
|
|
1709
1819
|
nativeValue = 0 /* JustifySelf.Start */;
|
|
1710
1820
|
}
|
|
1711
1821
|
else {
|
|
@@ -1713,7 +1823,7 @@ export function _setJustifySelf(value, instance, initial = false) {
|
|
|
1713
1823
|
}
|
|
1714
1824
|
break;
|
|
1715
1825
|
case 'stretch':
|
|
1716
|
-
if (
|
|
1826
|
+
if (UseV8Module) {
|
|
1717
1827
|
nativeValue = 4 /* JustifySelf.Stretch */;
|
|
1718
1828
|
}
|
|
1719
1829
|
else {
|
|
@@ -1721,9 +1831,9 @@ export function _setJustifySelf(value, instance, initial = false) {
|
|
|
1721
1831
|
}
|
|
1722
1832
|
break;
|
|
1723
1833
|
}
|
|
1724
|
-
if (nativeValue) {
|
|
1725
|
-
if (
|
|
1726
|
-
|
|
1834
|
+
if (!Utils.isNullOrUndefined(nativeValue)) {
|
|
1835
|
+
if (UseV8Module) {
|
|
1836
|
+
MasonV8Module.setJustifySelf(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
1727
1837
|
}
|
|
1728
1838
|
else {
|
|
1729
1839
|
if (global.isAndroid) {
|
|
@@ -1744,8 +1854,8 @@ export function _setJustifySelf(value, instance, initial = false) {
|
|
|
1744
1854
|
}
|
|
1745
1855
|
export function _getJustifySelf(instance) {
|
|
1746
1856
|
if (instance._hasNativeView) {
|
|
1747
|
-
if (
|
|
1748
|
-
const value =
|
|
1857
|
+
if (UseV8Module) {
|
|
1858
|
+
const value = MasonV8Module.getJustifySelf(instance._masonStylePtr);
|
|
1749
1859
|
switch (value) {
|
|
1750
1860
|
case -1 /* JustifySelf.Normal */:
|
|
1751
1861
|
return 'normal';
|
|
@@ -1811,11 +1921,13 @@ export function _setJustifyContent(value, instance, initial = false) {
|
|
|
1811
1921
|
if (initial && value === 'normal') {
|
|
1812
1922
|
return;
|
|
1813
1923
|
}
|
|
1924
|
+
if (!value)
|
|
1925
|
+
value = 'normal';
|
|
1814
1926
|
if (instance._hasNativeView) {
|
|
1815
1927
|
let nativeValue = null;
|
|
1816
1928
|
switch (value) {
|
|
1817
1929
|
case 'normal':
|
|
1818
|
-
if (
|
|
1930
|
+
if (UseV8Module) {
|
|
1819
1931
|
nativeValue = -1 /* JustifyContent.Normal */;
|
|
1820
1932
|
}
|
|
1821
1933
|
else {
|
|
@@ -1828,7 +1940,7 @@ export function _setJustifyContent(value, instance, initial = false) {
|
|
|
1828
1940
|
}
|
|
1829
1941
|
break;
|
|
1830
1942
|
case 'space-around':
|
|
1831
|
-
if (
|
|
1943
|
+
if (UseV8Module) {
|
|
1832
1944
|
nativeValue = 5 /* JustifyContent.SpaceAround */;
|
|
1833
1945
|
}
|
|
1834
1946
|
else {
|
|
@@ -1841,7 +1953,7 @@ export function _setJustifyContent(value, instance, initial = false) {
|
|
|
1841
1953
|
}
|
|
1842
1954
|
break;
|
|
1843
1955
|
case 'space-between':
|
|
1844
|
-
if (
|
|
1956
|
+
if (UseV8Module) {
|
|
1845
1957
|
nativeValue = 4 /* JustifyContent.SpaceBetween */;
|
|
1846
1958
|
}
|
|
1847
1959
|
else {
|
|
@@ -1854,7 +1966,7 @@ export function _setJustifyContent(value, instance, initial = false) {
|
|
|
1854
1966
|
}
|
|
1855
1967
|
break;
|
|
1856
1968
|
case 'space-evenly':
|
|
1857
|
-
if (
|
|
1969
|
+
if (UseV8Module) {
|
|
1858
1970
|
nativeValue = 6 /* JustifyContent.SpaceEvenly */;
|
|
1859
1971
|
}
|
|
1860
1972
|
else {
|
|
@@ -1867,7 +1979,7 @@ export function _setJustifyContent(value, instance, initial = false) {
|
|
|
1867
1979
|
}
|
|
1868
1980
|
break;
|
|
1869
1981
|
case 'center':
|
|
1870
|
-
if (
|
|
1982
|
+
if (UseV8Module) {
|
|
1871
1983
|
nativeValue = 2 /* JustifyContent.Center */;
|
|
1872
1984
|
}
|
|
1873
1985
|
else {
|
|
@@ -1880,8 +1992,20 @@ export function _setJustifyContent(value, instance, initial = false) {
|
|
|
1880
1992
|
}
|
|
1881
1993
|
break;
|
|
1882
1994
|
case 'flex-end':
|
|
1995
|
+
if (UseV8Module) {
|
|
1996
|
+
nativeValue = 8 /* JustifyContent.FlexEnd */;
|
|
1997
|
+
}
|
|
1998
|
+
else {
|
|
1999
|
+
if (global.isAndroid) {
|
|
2000
|
+
nativeValue = org.nativescript.mason.masonkit.JustifyContent.FlexEnd;
|
|
2001
|
+
}
|
|
2002
|
+
if (global.isIOS) {
|
|
2003
|
+
nativeValue = 8 /* JustifyContent.FlexEnd */;
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
break;
|
|
1883
2007
|
case 'end':
|
|
1884
|
-
if (
|
|
2008
|
+
if (UseV8Module) {
|
|
1885
2009
|
nativeValue = 1 /* JustifyContent.End */;
|
|
1886
2010
|
}
|
|
1887
2011
|
else {
|
|
@@ -1894,8 +2018,20 @@ export function _setJustifyContent(value, instance, initial = false) {
|
|
|
1894
2018
|
}
|
|
1895
2019
|
break;
|
|
1896
2020
|
case 'flex-start':
|
|
2021
|
+
if (UseV8Module) {
|
|
2022
|
+
nativeValue = 7 /* JustifyContent.FlexStart */;
|
|
2023
|
+
}
|
|
2024
|
+
else {
|
|
2025
|
+
if (global.isAndroid) {
|
|
2026
|
+
nativeValue = org.nativescript.mason.masonkit.JustifyContent.FlexStart;
|
|
2027
|
+
}
|
|
2028
|
+
if (global.isIOS) {
|
|
2029
|
+
nativeValue = 7 /* JustifyContent.FlexStart */;
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
break;
|
|
1897
2033
|
case 'start':
|
|
1898
|
-
if (
|
|
2034
|
+
if (UseV8Module) {
|
|
1899
2035
|
nativeValue = 0 /* JustifyContent.Start */;
|
|
1900
2036
|
}
|
|
1901
2037
|
else {
|
|
@@ -1908,7 +2044,7 @@ export function _setJustifyContent(value, instance, initial = false) {
|
|
|
1908
2044
|
}
|
|
1909
2045
|
break;
|
|
1910
2046
|
case 'stretch':
|
|
1911
|
-
if (
|
|
2047
|
+
if (UseV8Module) {
|
|
1912
2048
|
nativeValue = 3 /* JustifyContent.Stretch */;
|
|
1913
2049
|
}
|
|
1914
2050
|
else {
|
|
@@ -1921,31 +2057,29 @@ export function _setJustifyContent(value, instance, initial = false) {
|
|
|
1921
2057
|
}
|
|
1922
2058
|
break;
|
|
1923
2059
|
}
|
|
1924
|
-
if (
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setJustifyContent(nodeOrView, nativeValue);
|
|
1933
|
-
}
|
|
1934
|
-
else {
|
|
1935
|
-
nodeOrView.setJustifyContent(nativeValue);
|
|
1936
|
-
}
|
|
2060
|
+
if (UseV8Module) {
|
|
2061
|
+
MasonV8Module.setJustifyContent(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
2062
|
+
}
|
|
2063
|
+
else {
|
|
2064
|
+
if (global.isAndroid) {
|
|
2065
|
+
const nodeOrView = getMasonInstance(instance);
|
|
2066
|
+
if (instance._isMasonChild) {
|
|
2067
|
+
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setJustifyContent(nodeOrView, nativeValue);
|
|
1937
2068
|
}
|
|
1938
|
-
|
|
1939
|
-
|
|
2069
|
+
else {
|
|
2070
|
+
nodeOrView.setJustifyContent(nativeValue);
|
|
1940
2071
|
}
|
|
1941
2072
|
}
|
|
2073
|
+
if (global.isIOS) {
|
|
2074
|
+
instance.ios.justifyContent = nativeValue;
|
|
2075
|
+
}
|
|
1942
2076
|
}
|
|
1943
2077
|
}
|
|
1944
2078
|
}
|
|
1945
2079
|
export function _getJustifyContent(instance) {
|
|
1946
2080
|
if (instance._hasNativeView) {
|
|
1947
|
-
if (
|
|
1948
|
-
const value =
|
|
2081
|
+
if (UseV8Module) {
|
|
2082
|
+
const value = MasonV8Module.getJustifyContent(instance._masonStylePtr);
|
|
1949
2083
|
switch (value) {
|
|
1950
2084
|
case -1 /* JustifyContent.Normal */:
|
|
1951
2085
|
return 'normal';
|
|
@@ -2022,8 +2156,8 @@ export function _setLeft(value, instance, initial = false) {
|
|
|
2022
2156
|
return;
|
|
2023
2157
|
}
|
|
2024
2158
|
const val = _toLengthPercentageAuto(value);
|
|
2025
|
-
if (
|
|
2026
|
-
|
|
2159
|
+
if (UseV8Module) {
|
|
2160
|
+
MasonV8Module.setInsetLeft(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2027
2161
|
}
|
|
2028
2162
|
else {
|
|
2029
2163
|
if (global.isAndroid) {
|
|
@@ -2045,8 +2179,8 @@ export function _setRight(value, instance, initial = false) {
|
|
|
2045
2179
|
return;
|
|
2046
2180
|
}
|
|
2047
2181
|
const val = _toLengthPercentageAuto(value);
|
|
2048
|
-
if (
|
|
2049
|
-
|
|
2182
|
+
if (UseV8Module) {
|
|
2183
|
+
MasonV8Module.setInsetRight(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2050
2184
|
}
|
|
2051
2185
|
else {
|
|
2052
2186
|
if (global.isAndroid) {
|
|
@@ -2068,8 +2202,8 @@ export function _setTop(value, instance, initial = false) {
|
|
|
2068
2202
|
return;
|
|
2069
2203
|
}
|
|
2070
2204
|
const val = _toLengthPercentageAuto(value);
|
|
2071
|
-
if (
|
|
2072
|
-
|
|
2205
|
+
if (UseV8Module) {
|
|
2206
|
+
MasonV8Module.setInsetTop(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2073
2207
|
}
|
|
2074
2208
|
else {
|
|
2075
2209
|
if (global.isAndroid) {
|
|
@@ -2091,8 +2225,8 @@ export function _setBottom(value, instance, initial = false) {
|
|
|
2091
2225
|
return;
|
|
2092
2226
|
}
|
|
2093
2227
|
const val = _toLengthPercentageAuto(value);
|
|
2094
|
-
if (
|
|
2095
|
-
|
|
2228
|
+
if (UseV8Module) {
|
|
2229
|
+
MasonV8Module.setInsetBottom(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2096
2230
|
}
|
|
2097
2231
|
else {
|
|
2098
2232
|
if (global.isAndroid) {
|
|
@@ -2114,8 +2248,8 @@ export function _setMarginLeft(value, instance, initial = false) {
|
|
|
2114
2248
|
return;
|
|
2115
2249
|
}
|
|
2116
2250
|
const val = _toLengthPercentageAuto(value);
|
|
2117
|
-
if (
|
|
2118
|
-
|
|
2251
|
+
if (UseV8Module) {
|
|
2252
|
+
MasonV8Module.setMarginLeft(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2119
2253
|
}
|
|
2120
2254
|
else {
|
|
2121
2255
|
if (global.isAndroid) {
|
|
@@ -2137,8 +2271,8 @@ export function _setMarginRight(value, instance, initial = false) {
|
|
|
2137
2271
|
return;
|
|
2138
2272
|
}
|
|
2139
2273
|
const val = _toLengthPercentageAuto(value);
|
|
2140
|
-
if (
|
|
2141
|
-
|
|
2274
|
+
if (UseV8Module) {
|
|
2275
|
+
MasonV8Module.setMarginRight(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2142
2276
|
}
|
|
2143
2277
|
else {
|
|
2144
2278
|
if (global.isAndroid) {
|
|
@@ -2160,8 +2294,8 @@ export function _setMarginTop(value, instance, initial = false) {
|
|
|
2160
2294
|
return;
|
|
2161
2295
|
}
|
|
2162
2296
|
const val = _toLengthPercentageAuto(value);
|
|
2163
|
-
if (
|
|
2164
|
-
|
|
2297
|
+
if (UseV8Module) {
|
|
2298
|
+
MasonV8Module.setMarginTop(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2165
2299
|
}
|
|
2166
2300
|
else {
|
|
2167
2301
|
if (global.isAndroid) {
|
|
@@ -2183,8 +2317,8 @@ export function _setMarginBottom(value, instance, initial = false) {
|
|
|
2183
2317
|
return;
|
|
2184
2318
|
}
|
|
2185
2319
|
const val = _toLengthPercentageAuto(value);
|
|
2186
|
-
if (
|
|
2187
|
-
|
|
2320
|
+
if (UseV8Module) {
|
|
2321
|
+
MasonV8Module.setMarginBottom(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2188
2322
|
}
|
|
2189
2323
|
else {
|
|
2190
2324
|
if (global.isAndroid) {
|
|
@@ -2206,8 +2340,8 @@ export function _setPaddingLeft(value, instance, initial = false) {
|
|
|
2206
2340
|
return;
|
|
2207
2341
|
}
|
|
2208
2342
|
const val = _toLengthPercentage(value);
|
|
2209
|
-
if (
|
|
2210
|
-
|
|
2343
|
+
if (UseV8Module) {
|
|
2344
|
+
MasonV8Module.setPaddingLeft(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2211
2345
|
}
|
|
2212
2346
|
else {
|
|
2213
2347
|
if (global.isAndroid) {
|
|
@@ -2229,8 +2363,8 @@ export function _setPaddingRight(value, instance, initial = false) {
|
|
|
2229
2363
|
return;
|
|
2230
2364
|
}
|
|
2231
2365
|
const val = _toLengthPercentage(value);
|
|
2232
|
-
if (
|
|
2233
|
-
|
|
2366
|
+
if (UseV8Module) {
|
|
2367
|
+
MasonV8Module.setPaddingRight(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2234
2368
|
}
|
|
2235
2369
|
else {
|
|
2236
2370
|
if (global.isAndroid) {
|
|
@@ -2252,8 +2386,8 @@ export function _setPaddingTop(value, instance, initial = false) {
|
|
|
2252
2386
|
return;
|
|
2253
2387
|
}
|
|
2254
2388
|
const val = _toLengthPercentage(value);
|
|
2255
|
-
if (
|
|
2256
|
-
|
|
2389
|
+
if (UseV8Module) {
|
|
2390
|
+
MasonV8Module.setPaddingTop(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2257
2391
|
}
|
|
2258
2392
|
else {
|
|
2259
2393
|
if (global.isAndroid) {
|
|
@@ -2275,8 +2409,8 @@ export function _setPaddingBottom(value, instance, initial = false) {
|
|
|
2275
2409
|
return;
|
|
2276
2410
|
}
|
|
2277
2411
|
const val = _toLengthPercentage(value);
|
|
2278
|
-
if (
|
|
2279
|
-
|
|
2412
|
+
if (UseV8Module) {
|
|
2413
|
+
MasonV8Module.setPaddingBottom(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2280
2414
|
}
|
|
2281
2415
|
else {
|
|
2282
2416
|
if (global.isAndroid) {
|
|
@@ -2298,8 +2432,8 @@ export function _setBorderLeft(value, instance, initial = false) {
|
|
|
2298
2432
|
return;
|
|
2299
2433
|
}
|
|
2300
2434
|
const val = _toLengthPercentage(value);
|
|
2301
|
-
if (
|
|
2302
|
-
|
|
2435
|
+
if (UseV8Module) {
|
|
2436
|
+
MasonV8Module.setBorderLeft(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2303
2437
|
}
|
|
2304
2438
|
else {
|
|
2305
2439
|
if (global.isAndroid) {
|
|
@@ -2321,8 +2455,8 @@ export function _setBorderRight(value, instance, initial = false) {
|
|
|
2321
2455
|
return;
|
|
2322
2456
|
}
|
|
2323
2457
|
const val = _toLengthPercentage(value);
|
|
2324
|
-
if (
|
|
2325
|
-
|
|
2458
|
+
if (UseV8Module) {
|
|
2459
|
+
MasonV8Module.setBorderRight(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2326
2460
|
}
|
|
2327
2461
|
else {
|
|
2328
2462
|
if (global.isAndroid) {
|
|
@@ -2344,8 +2478,8 @@ export function _setBorderTop(value, instance, initial = false) {
|
|
|
2344
2478
|
return;
|
|
2345
2479
|
}
|
|
2346
2480
|
const val = _toLengthPercentage(value);
|
|
2347
|
-
if (
|
|
2348
|
-
|
|
2481
|
+
if (UseV8Module) {
|
|
2482
|
+
MasonV8Module.setBorderTop(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2349
2483
|
}
|
|
2350
2484
|
else {
|
|
2351
2485
|
if (global.isAndroid) {
|
|
@@ -2367,8 +2501,8 @@ export function _setBorderBottom(value, instance, initial = false) {
|
|
|
2367
2501
|
return;
|
|
2368
2502
|
}
|
|
2369
2503
|
const val = _toLengthPercentage(value);
|
|
2370
|
-
if (
|
|
2371
|
-
|
|
2504
|
+
if (UseV8Module) {
|
|
2505
|
+
MasonV8Module.setBorderBottom(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2372
2506
|
}
|
|
2373
2507
|
else {
|
|
2374
2508
|
if (global.isAndroid) {
|
|
@@ -2389,9 +2523,9 @@ export function _setFlexBasis(value, instance, initial = false) {
|
|
|
2389
2523
|
if (!instance._hasNativeView) {
|
|
2390
2524
|
return;
|
|
2391
2525
|
}
|
|
2392
|
-
if (
|
|
2526
|
+
if (UseV8Module) {
|
|
2393
2527
|
const val = _toMasonDimension(value);
|
|
2394
|
-
|
|
2528
|
+
MasonV8Module.setFlexBasis(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2395
2529
|
}
|
|
2396
2530
|
else {
|
|
2397
2531
|
if (global.isAndroid) {
|
|
@@ -2413,8 +2547,8 @@ export function _getFlexBasis(instance) {
|
|
|
2413
2547
|
if (!instance._hasNativeView) {
|
|
2414
2548
|
return instance.style.flexBasis;
|
|
2415
2549
|
}
|
|
2416
|
-
if (
|
|
2417
|
-
return
|
|
2550
|
+
if (UseV8Module) {
|
|
2551
|
+
return MasonV8Module.getFlexBasis(instance._masonStylePtr);
|
|
2418
2552
|
}
|
|
2419
2553
|
else {
|
|
2420
2554
|
if (global.isAndroid) {
|
|
@@ -2440,8 +2574,8 @@ export function _setGap(value, instance, initial = false) {
|
|
|
2440
2574
|
}
|
|
2441
2575
|
const width = _toLengthPercentage(value.width);
|
|
2442
2576
|
const height = _toLengthPercentage(value.height);
|
|
2443
|
-
if (
|
|
2444
|
-
|
|
2577
|
+
if (UseV8Module) {
|
|
2578
|
+
MasonV8Module.setGap(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, width.value, width.native_type, height.value, height.native_type, !instance._inBatch);
|
|
2445
2579
|
}
|
|
2446
2580
|
else {
|
|
2447
2581
|
if (global.isAndroid) {
|
|
@@ -2462,8 +2596,8 @@ export function _getGap(instance) {
|
|
|
2462
2596
|
if (!instance._hasNativeView) {
|
|
2463
2597
|
return instance.style.gap;
|
|
2464
2598
|
}
|
|
2465
|
-
if (
|
|
2466
|
-
return
|
|
2599
|
+
if (UseV8Module) {
|
|
2600
|
+
return MasonV8Module.getGap(instance._masonStylePtr);
|
|
2467
2601
|
}
|
|
2468
2602
|
else {
|
|
2469
2603
|
if (global.isAndroid) {
|
|
@@ -2487,12 +2621,255 @@ export function _getGap(instance) {
|
|
|
2487
2621
|
}
|
|
2488
2622
|
}
|
|
2489
2623
|
}
|
|
2624
|
+
function toOverflowValue(value) {
|
|
2625
|
+
let nativeValue = 0;
|
|
2626
|
+
switch (value) {
|
|
2627
|
+
case 0:
|
|
2628
|
+
nativeValue = 0 /* Overflow.Visible */;
|
|
2629
|
+
break;
|
|
2630
|
+
case 1:
|
|
2631
|
+
nativeValue = 1 /* Overflow.Hidden */;
|
|
2632
|
+
break;
|
|
2633
|
+
case 2:
|
|
2634
|
+
nativeValue = 2 /* Overflow.Scroll */;
|
|
2635
|
+
break;
|
|
2636
|
+
default:
|
|
2637
|
+
nativeValue = 0 /* Overflow.Visible */;
|
|
2638
|
+
}
|
|
2639
|
+
return nativeValue;
|
|
2640
|
+
}
|
|
2641
|
+
function toOverflowJSValue(value) {
|
|
2642
|
+
if (__IOS__) {
|
|
2643
|
+
switch (value) {
|
|
2644
|
+
case 0 /* Overflow.Visible */:
|
|
2645
|
+
return 'visible';
|
|
2646
|
+
case 1 /* Overflow.Hidden */:
|
|
2647
|
+
return 'hidden';
|
|
2648
|
+
case 2 /* Overflow.Scroll */:
|
|
2649
|
+
return 'scroll';
|
|
2650
|
+
default:
|
|
2651
|
+
return 'visible';
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
switch (value) {
|
|
2655
|
+
case org.nativescript.mason.masonkit.Overflow.Visible:
|
|
2656
|
+
return 'visible';
|
|
2657
|
+
case org.nativescript.mason.masonkit.Overflow.Hidden:
|
|
2658
|
+
return 'hidden';
|
|
2659
|
+
case org.nativescript.mason.masonkit.Overflow.Scroll:
|
|
2660
|
+
return 'scroll';
|
|
2661
|
+
default:
|
|
2662
|
+
return 'visible';
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2665
|
+
function toOverflowJavaValue(value) {
|
|
2666
|
+
let nativeValue = org.nativescript.mason.masonkit.Overflow.Visible;
|
|
2667
|
+
switch (value) {
|
|
2668
|
+
case 0:
|
|
2669
|
+
nativeValue = org.nativescript.mason.masonkit.Overflow.Visible;
|
|
2670
|
+
break;
|
|
2671
|
+
case 1:
|
|
2672
|
+
nativeValue = org.nativescript.mason.masonkit.Overflow.Hidden;
|
|
2673
|
+
break;
|
|
2674
|
+
case 2:
|
|
2675
|
+
nativeValue = org.nativescript.mason.masonkit.Overflow.Scroll;
|
|
2676
|
+
break;
|
|
2677
|
+
default:
|
|
2678
|
+
nativeValue = org.nativescript.mason.masonkit.Overflow.Visible;
|
|
2679
|
+
}
|
|
2680
|
+
return nativeValue;
|
|
2681
|
+
}
|
|
2682
|
+
export function _setOverflow(value, instance) {
|
|
2683
|
+
if (!instance._hasNativeView) {
|
|
2684
|
+
return;
|
|
2685
|
+
}
|
|
2686
|
+
if (UseV8Module) {
|
|
2687
|
+
const nativeValue = toOverflowValue(value);
|
|
2688
|
+
MasonV8Module.setOverflow(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
2689
|
+
}
|
|
2690
|
+
else {
|
|
2691
|
+
if (global.isAndroid) {
|
|
2692
|
+
const nodeOrView = getMasonInstance(instance);
|
|
2693
|
+
if (instance._isMasonChild) {
|
|
2694
|
+
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setOverflow(nodeOrView, toOverflowJavaValue(value));
|
|
2695
|
+
}
|
|
2696
|
+
else {
|
|
2697
|
+
nodeOrView.setOverflow(toOverflowJavaValue(value));
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
if (global.isIOS) {
|
|
2701
|
+
const nativeValue = toOverflowValue(value);
|
|
2702
|
+
instance.ios.overflow = nativeValue;
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
export function _getOverflow(instance) {
|
|
2707
|
+
if (!instance._hasNativeView) {
|
|
2708
|
+
return instance.style.flexGrow;
|
|
2709
|
+
}
|
|
2710
|
+
if (UseV8Module) {
|
|
2711
|
+
return MasonV8Module.getOverflow(instance._masonStylePtr);
|
|
2712
|
+
}
|
|
2713
|
+
else {
|
|
2714
|
+
if (global.isAndroid) {
|
|
2715
|
+
const nodeOrView = getMasonInstance(instance);
|
|
2716
|
+
if (instance._isMasonChild) {
|
|
2717
|
+
return toOverflowJSValue(org.nativescript.mason.masonkit.NodeHelper.INSTANCE.getOverflow(nodeOrView));
|
|
2718
|
+
}
|
|
2719
|
+
else {
|
|
2720
|
+
return toOverflowJSValue(nodeOrView.getOverflow());
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
if (global.isIOS) {
|
|
2724
|
+
return toOverflowJSValue(instance.ios.overflow);
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
export function _setOverflowX(value, instance) {
|
|
2729
|
+
if (!instance._hasNativeView) {
|
|
2730
|
+
return;
|
|
2731
|
+
}
|
|
2732
|
+
if (UseV8Module) {
|
|
2733
|
+
const nativeValue = toOverflowValue(value);
|
|
2734
|
+
MasonV8Module.setOverflowX(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
2735
|
+
}
|
|
2736
|
+
else {
|
|
2737
|
+
if (global.isAndroid) {
|
|
2738
|
+
const nodeOrView = getMasonInstance(instance);
|
|
2739
|
+
if (instance._isMasonChild) {
|
|
2740
|
+
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setOverflowX(nodeOrView, toOverflowJavaValue(value));
|
|
2741
|
+
}
|
|
2742
|
+
else {
|
|
2743
|
+
nodeOrView.setOverflowX(toOverflowJavaValue(value));
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2746
|
+
if (global.isIOS) {
|
|
2747
|
+
const nativeValue = toOverflowValue(value);
|
|
2748
|
+
// TODO
|
|
2749
|
+
instance.ios.overflowX = nativeValue;
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
export function _getOverflowX(instance) {
|
|
2754
|
+
if (!instance._hasNativeView) {
|
|
2755
|
+
return instance.style.flexGrow;
|
|
2756
|
+
}
|
|
2757
|
+
if (UseV8Module) {
|
|
2758
|
+
return MasonV8Module.getOverflowX(instance._masonStylePtr);
|
|
2759
|
+
}
|
|
2760
|
+
else {
|
|
2761
|
+
if (global.isAndroid) {
|
|
2762
|
+
const nodeOrView = getMasonInstance(instance);
|
|
2763
|
+
if (instance._isMasonChild) {
|
|
2764
|
+
return toOverflowJSValue(org.nativescript.mason.masonkit.NodeHelper.INSTANCE.getOverflowX(nodeOrView));
|
|
2765
|
+
}
|
|
2766
|
+
else {
|
|
2767
|
+
return toOverflowJSValue(nodeOrView.getOverflowX());
|
|
2768
|
+
}
|
|
2769
|
+
}
|
|
2770
|
+
if (global.isIOS) {
|
|
2771
|
+
return toOverflowJSValue(instance.ios.overflowX);
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
}
|
|
2775
|
+
export function _setOverflowY(value, instance, initial = false) {
|
|
2776
|
+
if (!instance._hasNativeView) {
|
|
2777
|
+
return;
|
|
2778
|
+
}
|
|
2779
|
+
if (UseV8Module) {
|
|
2780
|
+
const nativeValue = toOverflowValue(value);
|
|
2781
|
+
MasonV8Module.setOverflowY(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
2782
|
+
}
|
|
2783
|
+
else {
|
|
2784
|
+
if (global.isAndroid) {
|
|
2785
|
+
const nodeOrView = getMasonInstance(instance);
|
|
2786
|
+
if (instance._isMasonChild) {
|
|
2787
|
+
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setOverflowY(nodeOrView, toOverflowJavaValue(value));
|
|
2788
|
+
}
|
|
2789
|
+
else {
|
|
2790
|
+
nodeOrView.setOverflowY(toOverflowJavaValue(value));
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
if (global.isIOS) {
|
|
2794
|
+
const nativeValue = toOverflowValue(value);
|
|
2795
|
+
// TODO
|
|
2796
|
+
instance.ios.overflowY = nativeValue;
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
export function _getOverflowY(instance) {
|
|
2801
|
+
if (!instance._hasNativeView) {
|
|
2802
|
+
return instance.style.flexGrow;
|
|
2803
|
+
}
|
|
2804
|
+
if (UseV8Module) {
|
|
2805
|
+
return MasonV8Module.getOverflowY(instance._masonStylePtr);
|
|
2806
|
+
}
|
|
2807
|
+
else {
|
|
2808
|
+
if (global.isAndroid) {
|
|
2809
|
+
const nodeOrView = getMasonInstance(instance);
|
|
2810
|
+
if (instance._isMasonChild) {
|
|
2811
|
+
return toOverflowJSValue(org.nativescript.mason.masonkit.NodeHelper.INSTANCE.getOverflowY(nodeOrView));
|
|
2812
|
+
}
|
|
2813
|
+
else {
|
|
2814
|
+
return toOverflowJSValue(nodeOrView.getOverflowY());
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
if (global.isIOS) {
|
|
2818
|
+
return toOverflowJSValue(instance.ios.overflowY);
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
export function _setScrollbarWidth(value, instance, initial = false) {
|
|
2823
|
+
if (!instance._hasNativeView) {
|
|
2824
|
+
return;
|
|
2825
|
+
}
|
|
2826
|
+
value = _toMasonDimension(value).value;
|
|
2827
|
+
if (UseV8Module) {
|
|
2828
|
+
MasonV8Module.setScrollbarWidth(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, value, !instance._inBatch);
|
|
2829
|
+
}
|
|
2830
|
+
else {
|
|
2831
|
+
if (global.isAndroid) {
|
|
2832
|
+
const nodeOrView = getMasonInstance(instance);
|
|
2833
|
+
if (instance._isMasonChild) {
|
|
2834
|
+
return org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setScrollBarWidth(nodeOrView, value);
|
|
2835
|
+
}
|
|
2836
|
+
else {
|
|
2837
|
+
return nodeOrView.setScrollBarWidth(value);
|
|
2838
|
+
}
|
|
2839
|
+
}
|
|
2840
|
+
if (global.isIOS) {
|
|
2841
|
+
instance.ios.scrollBarWidthCompat = MasonDimensionCompat.alloc().initWithPoints(value);
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
export function getScrollbarWidth(instance) {
|
|
2846
|
+
if (!instance._hasNativeView) {
|
|
2847
|
+
return instance.style.flexGrow;
|
|
2848
|
+
}
|
|
2849
|
+
if (UseV8Module) {
|
|
2850
|
+
return MasonV8Module.getScrollbarWidth(instance._masonStylePtr);
|
|
2851
|
+
}
|
|
2852
|
+
else {
|
|
2853
|
+
if (global.isAndroid) {
|
|
2854
|
+
const nodeOrView = getMasonInstance(instance);
|
|
2855
|
+
if (instance._isMasonChild) {
|
|
2856
|
+
return org.nativescript.mason.masonkit.NodeHelper.INSTANCE.getScrollBarWidth(nodeOrView);
|
|
2857
|
+
}
|
|
2858
|
+
else {
|
|
2859
|
+
return nodeOrView.getScrollBarWidth();
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
if (global.isIOS) {
|
|
2863
|
+
return _parseDimension(instance.ios.scrollBarWidthCompat);
|
|
2864
|
+
}
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2490
2867
|
export function _setFlexGrow(value, instance, initial = false) {
|
|
2491
2868
|
if (!instance._hasNativeView) {
|
|
2492
2869
|
return;
|
|
2493
2870
|
}
|
|
2494
|
-
if (
|
|
2495
|
-
|
|
2871
|
+
if (UseV8Module) {
|
|
2872
|
+
MasonV8Module.setFlexGrow(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, value, !instance._inBatch);
|
|
2496
2873
|
}
|
|
2497
2874
|
else {
|
|
2498
2875
|
if (global.isAndroid) {
|
|
@@ -2513,8 +2890,8 @@ export function _getFlexGrow(instance) {
|
|
|
2513
2890
|
if (!instance._hasNativeView) {
|
|
2514
2891
|
return instance.style.flexGrow;
|
|
2515
2892
|
}
|
|
2516
|
-
if (
|
|
2517
|
-
return
|
|
2893
|
+
if (UseV8Module) {
|
|
2894
|
+
return MasonV8Module.getFlexGrow(instance._masonStylePtr);
|
|
2518
2895
|
}
|
|
2519
2896
|
else {
|
|
2520
2897
|
if (global.isAndroid) {
|
|
@@ -2538,8 +2915,8 @@ export function _setFlexShrink(value, instance, initial = false) {
|
|
|
2538
2915
|
if (!instance._hasNativeView) {
|
|
2539
2916
|
return;
|
|
2540
2917
|
}
|
|
2541
|
-
if (
|
|
2542
|
-
|
|
2918
|
+
if (UseV8Module) {
|
|
2919
|
+
MasonV8Module.setFlexShrink(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, value, !instance._inBatch);
|
|
2543
2920
|
}
|
|
2544
2921
|
else {
|
|
2545
2922
|
if (global.isAndroid) {
|
|
@@ -2560,8 +2937,8 @@ export function _getFlexShrink(instance) {
|
|
|
2560
2937
|
if (!instance._hasNativeView) {
|
|
2561
2938
|
return instance.style.flexShrink;
|
|
2562
2939
|
}
|
|
2563
|
-
if (
|
|
2564
|
-
return
|
|
2940
|
+
if (UseV8Module) {
|
|
2941
|
+
return MasonV8Module.getFlexShrink(instance._masonStylePtr);
|
|
2565
2942
|
}
|
|
2566
2943
|
else {
|
|
2567
2944
|
if (global.isAndroid) {
|
|
@@ -2585,8 +2962,8 @@ export function _setAspectRatio(value, instance, initial = false) {
|
|
|
2585
2962
|
if (!instance._hasNativeView) {
|
|
2586
2963
|
return;
|
|
2587
2964
|
}
|
|
2588
|
-
if (
|
|
2589
|
-
|
|
2965
|
+
if (UseV8Module) {
|
|
2966
|
+
MasonV8Module.setAspectRatio(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, value, !instance._inBatch);
|
|
2590
2967
|
}
|
|
2591
2968
|
else {
|
|
2592
2969
|
if (global.isAndroid) {
|
|
@@ -2608,8 +2985,8 @@ export function _getAspectRatio(instance) {
|
|
|
2608
2985
|
if (!instance._hasNativeView) {
|
|
2609
2986
|
return instance.style.aspectRatio;
|
|
2610
2987
|
}
|
|
2611
|
-
if (
|
|
2612
|
-
return
|
|
2988
|
+
if (UseV8Module) {
|
|
2989
|
+
return MasonV8Module.getAspectRatio(instance._masonStylePtr);
|
|
2613
2990
|
}
|
|
2614
2991
|
else {
|
|
2615
2992
|
if (global.isAndroid) {
|
|
@@ -2634,76 +3011,83 @@ function _parseGridLine(value) {
|
|
|
2634
3011
|
let parsedValue = undefined;
|
|
2635
3012
|
let parsedType = undefined;
|
|
2636
3013
|
let nativeValue = undefined;
|
|
3014
|
+
if (value === 'auto' || value === undefined) {
|
|
3015
|
+
parsedValue = 0;
|
|
3016
|
+
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
3017
|
+
}
|
|
2637
3018
|
if (typeof value === 'string') {
|
|
2638
|
-
if (value === 'auto') {
|
|
2639
|
-
parsedValue = 0;
|
|
2640
|
-
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
2641
|
-
if (!JSIEnabled) {
|
|
2642
|
-
if (global.isAndroid) {
|
|
2643
|
-
parsedType = org.nativescript.mason.masonkit.GridPlacement.Auto;
|
|
2644
|
-
nativeValue = org.nativescript.mason.masonkit.GridPlacement.Auto;
|
|
2645
|
-
}
|
|
2646
|
-
if (global.isIOS) {
|
|
2647
|
-
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
2648
|
-
nativeValue = GridPlacementCompat.Auto;
|
|
2649
|
-
}
|
|
2650
|
-
}
|
|
2651
|
-
}
|
|
2652
3019
|
if (value.startsWith('span')) {
|
|
2653
3020
|
parsedValue = Number(value.replace('span', '').trim());
|
|
2654
3021
|
parsedType = 2 /* GridPlacementCompatType.Span */;
|
|
2655
|
-
if (!JSIEnabled) {
|
|
2656
|
-
const isValid = !Number.isNaN(parsedValue);
|
|
2657
|
-
if (global.isAndroid) {
|
|
2658
|
-
parsedType = org.nativescript.mason.masonkit.GridPlacement.Span;
|
|
2659
|
-
if (isValid) {
|
|
2660
|
-
nativeValue = new org.nativescript.mason.masonkit.GridPlacement.Span(parsedValue);
|
|
2661
|
-
}
|
|
2662
|
-
}
|
|
2663
|
-
if (global.isIOS) {
|
|
2664
|
-
parsedType = 2 /* GridPlacementCompatType.Span */;
|
|
2665
|
-
if (isValid) {
|
|
2666
|
-
nativeValue = GridPlacementCompat.alloc().initWithSpan(parsedValue);
|
|
2667
|
-
}
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
3022
|
}
|
|
2671
3023
|
else {
|
|
2672
3024
|
parsedValue = Number(value.trim());
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
nativeValue = new org.nativescript.mason.masonkit.GridPlacement.Line(parsedValue);
|
|
2680
|
-
}
|
|
2681
|
-
}
|
|
2682
|
-
if (global.isIOS) {
|
|
2683
|
-
parsedType = 1 /* GridPlacementCompatType.Line */;
|
|
2684
|
-
if (isValid) {
|
|
2685
|
-
nativeValue = GridPlacementCompat.alloc().initWithLine(parsedValue);
|
|
2686
|
-
}
|
|
2687
|
-
}
|
|
3025
|
+
if (parsedValue < 1) {
|
|
3026
|
+
parsedValue = 0;
|
|
3027
|
+
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
3028
|
+
}
|
|
3029
|
+
else {
|
|
3030
|
+
parsedType = 1 /* GridPlacementCompatType.Line */;
|
|
2688
3031
|
}
|
|
2689
3032
|
}
|
|
2690
|
-
return { value: Number.isNaN(parsedValue) ? undefined : parsedValue, type: parsedType, native_value: nativeValue };
|
|
2691
3033
|
}
|
|
2692
3034
|
if (typeof value === 'number') {
|
|
2693
3035
|
parsedValue = value;
|
|
2694
|
-
|
|
2695
|
-
|
|
3036
|
+
if (parsedValue < 1) {
|
|
3037
|
+
parsedValue = 0;
|
|
3038
|
+
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
3039
|
+
}
|
|
3040
|
+
else {
|
|
3041
|
+
parsedType = 1 /* GridPlacementCompatType.Line */;
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
if (parsedType === 0) {
|
|
3045
|
+
if (!UseV8Module) {
|
|
3046
|
+
if (global.isAndroid) {
|
|
3047
|
+
parsedType = org.nativescript.mason.masonkit.GridPlacement.Auto;
|
|
3048
|
+
nativeValue = org.nativescript.mason.masonkit.GridPlacement.Auto.INSTANCE;
|
|
3049
|
+
}
|
|
3050
|
+
if (global.isIOS) {
|
|
3051
|
+
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
3052
|
+
nativeValue = GridPlacementCompat.Auto;
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
else if (parsedType === 1) {
|
|
3057
|
+
if (!UseV8Module) {
|
|
3058
|
+
const isValid = !Number.isNaN(parsedValue);
|
|
2696
3059
|
if (global.isAndroid) {
|
|
2697
3060
|
parsedType = org.nativescript.mason.masonkit.GridPlacement.Line;
|
|
2698
|
-
|
|
3061
|
+
if (isValid) {
|
|
3062
|
+
nativeValue = new org.nativescript.mason.masonkit.GridPlacement.Line(parsedValue);
|
|
3063
|
+
}
|
|
2699
3064
|
}
|
|
2700
3065
|
if (global.isIOS) {
|
|
2701
3066
|
parsedType = 1 /* GridPlacementCompatType.Line */;
|
|
2702
|
-
|
|
3067
|
+
if (isValid) {
|
|
3068
|
+
nativeValue = GridPlacementCompat.alloc().initWithLine(parsedValue);
|
|
3069
|
+
}
|
|
2703
3070
|
}
|
|
2704
3071
|
}
|
|
2705
3072
|
}
|
|
2706
|
-
|
|
3073
|
+
else {
|
|
3074
|
+
if (!UseV8Module) {
|
|
3075
|
+
const isValid = !Number.isNaN(parsedValue);
|
|
3076
|
+
if (global.isAndroid) {
|
|
3077
|
+
parsedType = org.nativescript.mason.masonkit.GridPlacement.Span;
|
|
3078
|
+
if (isValid) {
|
|
3079
|
+
nativeValue = new org.nativescript.mason.masonkit.GridPlacement.Span(parsedValue);
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
if (global.isIOS) {
|
|
3083
|
+
parsedType = 2 /* GridPlacementCompatType.Span */;
|
|
3084
|
+
if (isValid) {
|
|
3085
|
+
nativeValue = GridPlacementCompat.alloc().initWithSpan(parsedValue);
|
|
3086
|
+
}
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
return { value: Number.isNaN(parsedValue) ? undefined : parsedValue, type: parsedType, native_value: nativeValue };
|
|
2707
3091
|
}
|
|
2708
3092
|
export function _setGridColumnStart(value, instance, initial = false) {
|
|
2709
3093
|
if (!instance._hasNativeView) {
|
|
@@ -2713,8 +3097,8 @@ export function _setGridColumnStart(value, instance, initial = false) {
|
|
|
2713
3097
|
if (val.value === undefined || val.type === undefined) {
|
|
2714
3098
|
return;
|
|
2715
3099
|
}
|
|
2716
|
-
if (
|
|
2717
|
-
|
|
3100
|
+
if (UseV8Module) {
|
|
3101
|
+
MasonV8Module.setColumnStart(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val, !instance._inBatch);
|
|
2718
3102
|
}
|
|
2719
3103
|
else {
|
|
2720
3104
|
if (global.isAndroid) {
|
|
@@ -2739,8 +3123,8 @@ export function _setGridColumnEnd(value, instance, initial = false) {
|
|
|
2739
3123
|
if (val.value === undefined || val.type === undefined) {
|
|
2740
3124
|
return;
|
|
2741
3125
|
}
|
|
2742
|
-
if (
|
|
2743
|
-
|
|
3126
|
+
if (UseV8Module) {
|
|
3127
|
+
MasonV8Module.setColumnEnd(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val, !instance._inBatch);
|
|
2744
3128
|
}
|
|
2745
3129
|
else {
|
|
2746
3130
|
if (global.isAndroid) {
|
|
@@ -2765,8 +3149,8 @@ export function _setGridRowStart(value, instance, initial = false) {
|
|
|
2765
3149
|
if (val.value === undefined || val.type === undefined) {
|
|
2766
3150
|
return;
|
|
2767
3151
|
}
|
|
2768
|
-
if (
|
|
2769
|
-
|
|
3152
|
+
if (UseV8Module) {
|
|
3153
|
+
MasonV8Module.setRowStart(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val, !instance._inBatch);
|
|
2770
3154
|
}
|
|
2771
3155
|
else {
|
|
2772
3156
|
if (global.isAndroid) {
|
|
@@ -2791,8 +3175,8 @@ export function _setGridRowEnd(value, instance, initial = false) {
|
|
|
2791
3175
|
if (val.value === undefined || val.type === undefined) {
|
|
2792
3176
|
return;
|
|
2793
3177
|
}
|
|
2794
|
-
if (
|
|
2795
|
-
|
|
3178
|
+
if (UseV8Module) {
|
|
3179
|
+
MasonV8Module.setRowEnd(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val, !instance._inBatch);
|
|
2796
3180
|
}
|
|
2797
3181
|
else {
|
|
2798
3182
|
if (global.isAndroid) {
|
|
@@ -2817,8 +3201,8 @@ export function _setRowGap(value, instance, initial = false) {
|
|
|
2817
3201
|
if (val.value === undefined || val.type === undefined) {
|
|
2818
3202
|
return;
|
|
2819
3203
|
}
|
|
2820
|
-
if (
|
|
2821
|
-
|
|
3204
|
+
if (UseV8Module) {
|
|
3205
|
+
MasonV8Module.setRowGap(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2822
3206
|
}
|
|
2823
3207
|
else {
|
|
2824
3208
|
if (global.isAndroid) {
|
|
@@ -2839,8 +3223,8 @@ export function _getRowGap(instance) {
|
|
|
2839
3223
|
if (!instance._hasNativeView) {
|
|
2840
3224
|
return instance.style.gap;
|
|
2841
3225
|
}
|
|
2842
|
-
if (
|
|
2843
|
-
return
|
|
3226
|
+
if (UseV8Module) {
|
|
3227
|
+
return MasonV8Module.getRowGap(instance._masonStylePtr);
|
|
2844
3228
|
}
|
|
2845
3229
|
else {
|
|
2846
3230
|
if (global.isAndroid) {
|
|
@@ -2868,8 +3252,8 @@ export function _setColumnGap(value, instance, initial = false) {
|
|
|
2868
3252
|
if (val.value === undefined || val.type === undefined) {
|
|
2869
3253
|
return;
|
|
2870
3254
|
}
|
|
2871
|
-
if (
|
|
2872
|
-
|
|
3255
|
+
if (UseV8Module) {
|
|
3256
|
+
MasonV8Module.setColumnGap(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, val.value, val.native_type, !instance._inBatch);
|
|
2873
3257
|
}
|
|
2874
3258
|
else {
|
|
2875
3259
|
if (global.isAndroid) {
|
|
@@ -2890,8 +3274,8 @@ export function _getColumnGap(instance) {
|
|
|
2890
3274
|
if (!instance._hasNativeView) {
|
|
2891
3275
|
return instance.style.gap;
|
|
2892
3276
|
}
|
|
2893
|
-
if (
|
|
2894
|
-
return
|
|
3277
|
+
if (UseV8Module) {
|
|
3278
|
+
return MasonV8Module.getColumnGap(instance._masonStylePtr);
|
|
2895
3279
|
}
|
|
2896
3280
|
else {
|
|
2897
3281
|
if (global.isAndroid) {
|
|
@@ -2941,8 +3325,8 @@ export function _parseMinMaxValue(value) {
|
|
|
2941
3325
|
max_value: 0,
|
|
2942
3326
|
};
|
|
2943
3327
|
}
|
|
2944
|
-
else if (value.
|
|
2945
|
-
const flex = parseInt(value.replace('
|
|
3328
|
+
else if (value.indexOf('fr') > -1) {
|
|
3329
|
+
const flex = parseInt(value.replace('fr', '').trim());
|
|
2946
3330
|
return {
|
|
2947
3331
|
min_type: 0 /* MinSizingType.Auto */,
|
|
2948
3332
|
min_value: 0,
|
|
@@ -3106,8 +3490,8 @@ export function _setGridTemplateRows(value, instance, initial = false) {
|
|
|
3106
3490
|
if (!instance._hasNativeView) {
|
|
3107
3491
|
return;
|
|
3108
3492
|
}
|
|
3109
|
-
if (
|
|
3110
|
-
|
|
3493
|
+
if (UseV8Module) {
|
|
3494
|
+
MasonV8Module.setGridTemplateRows(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, value, !instance._inBatch);
|
|
3111
3495
|
}
|
|
3112
3496
|
else {
|
|
3113
3497
|
if (global.isAndroid) {
|
|
@@ -3200,8 +3584,8 @@ export function _setGridTemplateColumns(value, instance, initial = false) {
|
|
|
3200
3584
|
if (!instance._hasNativeView) {
|
|
3201
3585
|
return;
|
|
3202
3586
|
}
|
|
3203
|
-
if (
|
|
3204
|
-
|
|
3587
|
+
if (UseV8Module) {
|
|
3588
|
+
MasonV8Module.setGridTemplateColumns(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, value, !instance._inBatch);
|
|
3205
3589
|
}
|
|
3206
3590
|
else {
|
|
3207
3591
|
if (global.isAndroid) {
|
|
@@ -3237,7 +3621,8 @@ export function _setGridTemplateColumns(value, instance, initial = false) {
|
|
|
3237
3621
|
}
|
|
3238
3622
|
else {
|
|
3239
3623
|
const single = item.value;
|
|
3240
|
-
const
|
|
3624
|
+
const minMax = single ? org.nativescript.mason.masonkit.MinMax.fromTypeValue(single.min_type, single.min_value, single.max_type, single.max_value) : org.nativescript.mason.masonkit.MinMax.Auto.INSTANCE;
|
|
3625
|
+
const trackSizingFunction = new org.nativescript.mason.masonkit.TrackSizingFunction.Single(minMax);
|
|
3241
3626
|
array[i] = trackSizingFunction;
|
|
3242
3627
|
}
|
|
3243
3628
|
}
|
|
@@ -3305,13 +3690,114 @@ export function _parseGridAutoRowsColumns(value) {
|
|
|
3305
3690
|
}
|
|
3306
3691
|
return array;
|
|
3307
3692
|
}
|
|
3693
|
+
function toGridAutoFlow(value) {
|
|
3694
|
+
if (isIOS || UseV8Module) {
|
|
3695
|
+
switch (value) {
|
|
3696
|
+
case 'row':
|
|
3697
|
+
return 0 /* FlexGridAutoFlowWrap.Row */;
|
|
3698
|
+
case 'column':
|
|
3699
|
+
return 1 /* FlexGridAutoFlowWrap.Column */;
|
|
3700
|
+
case 'row dense':
|
|
3701
|
+
return 2 /* FlexGridAutoFlowWrap.RowDense */;
|
|
3702
|
+
case 'column dense':
|
|
3703
|
+
return 3 /* FlexGridAutoFlowWrap.ColumnDense */;
|
|
3704
|
+
default:
|
|
3705
|
+
return 0 /* FlexGridAutoFlowWrap.Row */;
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
switch (value) {
|
|
3709
|
+
case 'row':
|
|
3710
|
+
return org.nativescript.mason.masonkit.GridAutoFlow.Row;
|
|
3711
|
+
case 'column':
|
|
3712
|
+
return org.nativescript.mason.masonkit.GridAutoFlow.Column;
|
|
3713
|
+
case 'row dense':
|
|
3714
|
+
return org.nativescript.mason.masonkit.GridAutoFlow.RowDense;
|
|
3715
|
+
case 'column dense':
|
|
3716
|
+
return org.nativescript.mason.masonkit.GridAutoFlow.ColumnDense;
|
|
3717
|
+
default:
|
|
3718
|
+
return org.nativescript.mason.masonkit.GridAutoFlow.Row;
|
|
3719
|
+
}
|
|
3720
|
+
}
|
|
3721
|
+
export function _setGridAutoFlow(value, instance) {
|
|
3722
|
+
if (!instance._hasNativeView) {
|
|
3723
|
+
return;
|
|
3724
|
+
}
|
|
3725
|
+
const nativeValue = toGridAutoFlow(value);
|
|
3726
|
+
if (UseV8Module) {
|
|
3727
|
+
MasonV8Module.setGridAutoFlow(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, nativeValue, !instance._inBatch);
|
|
3728
|
+
}
|
|
3729
|
+
else {
|
|
3730
|
+
if (global.isAndroid) {
|
|
3731
|
+
const nodeOrView = getMasonInstance(instance);
|
|
3732
|
+
if (instance._isMasonChild) {
|
|
3733
|
+
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setGridAutoFlow(nodeOrView, nativeValue);
|
|
3734
|
+
}
|
|
3735
|
+
else {
|
|
3736
|
+
nodeOrView.setGridAutoFlow(nativeValue);
|
|
3737
|
+
}
|
|
3738
|
+
}
|
|
3739
|
+
if (isIOS) {
|
|
3740
|
+
instance.ios.gridAutoFlow = nativeValue;
|
|
3741
|
+
}
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
function parseGridAutoFlow(value) {
|
|
3745
|
+
if (isIOS || UseV8Module) {
|
|
3746
|
+
switch (value) {
|
|
3747
|
+
case 0 /* FlexGridAutoFlowWrap.Row */:
|
|
3748
|
+
return 'row';
|
|
3749
|
+
case 1 /* FlexGridAutoFlowWrap.Column */:
|
|
3750
|
+
return 'column';
|
|
3751
|
+
case 2 /* FlexGridAutoFlowWrap.RowDense */:
|
|
3752
|
+
return 'row dense';
|
|
3753
|
+
case 3 /* FlexGridAutoFlowWrap.ColumnDense */:
|
|
3754
|
+
return 'column dense';
|
|
3755
|
+
default:
|
|
3756
|
+
return 'row';
|
|
3757
|
+
}
|
|
3758
|
+
}
|
|
3759
|
+
switch (value) {
|
|
3760
|
+
case org.nativescript.mason.masonkit.GridAutoFlow.Row:
|
|
3761
|
+
return 'row';
|
|
3762
|
+
case org.nativescript.mason.masonkit.GridAutoFlow.Column:
|
|
3763
|
+
return 'column';
|
|
3764
|
+
case org.nativescript.mason.masonkit.GridAutoFlow.RowDense:
|
|
3765
|
+
return 'row dense';
|
|
3766
|
+
case org.nativescript.mason.masonkit.GridAutoFlow.ColumnDense:
|
|
3767
|
+
return 'column dense';
|
|
3768
|
+
default:
|
|
3769
|
+
return 'row';
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
export function _getGridAutoFlow(instance) {
|
|
3773
|
+
if (!instance._hasNativeView) {
|
|
3774
|
+
return;
|
|
3775
|
+
}
|
|
3776
|
+
if (UseV8Module) {
|
|
3777
|
+
return parseGridAutoFlow(MasonV8Module.getGridAutoFlow(instance._masonStylePtr));
|
|
3778
|
+
}
|
|
3779
|
+
else {
|
|
3780
|
+
if (global.isAndroid) {
|
|
3781
|
+
const nodeOrView = getMasonInstance(instance);
|
|
3782
|
+
if (instance._isMasonChild) {
|
|
3783
|
+
return parseGridAutoFlow(org.nativescript.mason.masonkit.NodeHelper.INSTANCE.getGridAutoFlow(nodeOrView));
|
|
3784
|
+
}
|
|
3785
|
+
else {
|
|
3786
|
+
return parseGridAutoFlow(nodeOrView.getGridAutoFlow());
|
|
3787
|
+
}
|
|
3788
|
+
}
|
|
3789
|
+
if (isIOS) {
|
|
3790
|
+
return parseGridAutoFlow(instance.ios.gridAutoFlow);
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
}
|
|
3308
3794
|
export function _setGridAutoRows(value, instance, initial = false) {
|
|
3309
3795
|
if (!instance._hasNativeView) {
|
|
3310
3796
|
return;
|
|
3311
3797
|
}
|
|
3312
3798
|
const values = _parseGridAutoRowsColumns(value);
|
|
3313
|
-
if (
|
|
3314
|
-
|
|
3799
|
+
if (UseV8Module) {
|
|
3800
|
+
MasonV8Module.setGridAutoRows(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, values, !instance._inBatch);
|
|
3315
3801
|
}
|
|
3316
3802
|
else {
|
|
3317
3803
|
if (global.isAndroid) {
|
|
@@ -3347,8 +3833,8 @@ export function _setGridAutoColumns(value, instance, initial = false) {
|
|
|
3347
3833
|
return;
|
|
3348
3834
|
}
|
|
3349
3835
|
const values = _parseGridAutoRowsColumns(value);
|
|
3350
|
-
if (
|
|
3351
|
-
|
|
3836
|
+
if (UseV8Module) {
|
|
3837
|
+
MasonV8Module.setGridAutoColumns(instance._masonPtr, instance._masonNodePtr, instance._masonStylePtr, values, !instance._inBatch);
|
|
3352
3838
|
}
|
|
3353
3839
|
else {
|
|
3354
3840
|
if (global.isAndroid) {
|