@triniwiz/nativescript-masonkit 1.0.0-alpha.8 → 1.0.0-beta.0
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/button/index.android.d.ts +13 -0
- package/button/index.android.js +56 -0
- package/button/index.android.js.map +1 -0
- package/button/index.ios.d.ts +21 -0
- package/button/index.ios.js +216 -0
- package/button/index.ios.js.map +1 -0
- package/common.d.ts +78 -33
- package/common.js +1121 -251
- package/common.js.map +1 -1
- package/img/index.android.d.ts +10 -0
- package/img/index.android.js +40 -0
- package/img/index.android.js.map +1 -0
- package/img/index.ios.d.ts +13 -0
- package/img/index.ios.js +102 -0
- package/img/index.ios.js.map +1 -0
- package/index.android.d.ts +6 -34
- package/index.android.js +6 -139
- package/index.android.js.map +1 -1
- package/index.d.ts +88 -60
- package/index.ios.d.ts +6 -48
- package/index.ios.js +6 -355
- package/index.ios.js.map +1 -1
- package/package.json +5 -2
- package/platforms/android/include.gradle +5 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +794 -284
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason.h +0 -5
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +118 -93
- 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 +58079 -23135
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +1234 -255
- 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 +1234 -255
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4252 -1932
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +1588 -568
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason.h +0 -5
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +118 -93
- 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 +58076 -23132
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1211 -232
- 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 +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +58076 -23132
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1211 -232
- 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 +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +31 -31
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4246 -1932
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +4124 -1883
- package/scroll/index.android.d.ts +12 -0
- package/scroll/index.android.js +50 -0
- package/scroll/index.android.js.map +1 -0
- package/scroll/index.ios.d.ts +14 -0
- package/scroll/index.ios.js +120 -0
- package/scroll/index.ios.js.map +1 -0
- package/style.d.ts +110 -53
- package/style.js +1176 -110
- package/style.js.map +1 -1
- package/text/index.android.d.ts +30 -0
- package/text/index.android.js +124 -0
- package/text/index.android.js.map +1 -0
- package/text/index.ios.d.ts +38 -0
- package/text/index.ios.js +251 -0
- package/text/index.ios.js.map +1 -0
- package/tree/index.android.d.ts +28 -0
- package/tree/index.android.js +77 -0
- package/tree/index.android.js.map +1 -0
- package/tree/index.ios.d.ts +29 -0
- package/tree/index.ios.js +76 -0
- package/tree/index.ios.js.map +1 -0
- package/utils/index.android.d.ts +187 -0
- package/utils/index.android.js +514 -0
- package/utils/index.android.js.map +1 -0
- package/utils/index.ios.d.ts +198 -0
- package/utils/index.ios.js +710 -0
- package/utils/index.ios.js.map +1 -0
- package/view/index.android.d.ts +12 -0
- package/view/index.android.js +50 -0
- package/view/index.android.js.map +1 -0
- package/view/index.ios.d.ts +16 -0
- package/view/index.ios.js +124 -0
- package/view/index.ios.js.map +1 -0
- package/web.d.ts +55 -0
- package/web.js +189 -0
- package/web.js.map +1 -0
- package/helpers.d.ts +0 -255
- package/helpers.js +0 -1318
- package/helpers.js.map +0 -1
- package/node.d.ts +0 -2
- package/node.js +0 -3
- package/node.js.map +0 -1
- package/platforms/ios/Podfile +0 -1
- package/platforms/ios/build.xcconfig +0 -5
- package/platforms/ios/prebuild.sh +0 -101
- package/platforms/new_native_src/cpp/Caches.cpp +0 -36
- package/platforms/new_native_src/cpp/Caches.h +0 -42
- package/platforms/new_native_src/cpp/Common.h +0 -34
- package/platforms/new_native_src/cpp/ConcurrentMap.h +0 -57
- package/platforms/new_native_src/cpp/Helpers.cpp +0 -101
- package/platforms/new_native_src/cpp/Helpers.h +0 -364
- package/platforms/new_native_src/cpp/MasonImpl.cpp +0 -68
- package/platforms/new_native_src/cpp/MasonImpl.h +0 -40
- package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +0 -89
- package/platforms/new_native_src/cpp/MasonNodeImpl.h +0 -47
- package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +0 -2181
- package/platforms/new_native_src/cpp/MasonStyleImpl.h +0 -420
- package/platforms/new_native_src/cpp/include/mason_native.h +0 -972
- package/platforms/new_native_src/cpp/include/robin_hood.h +0 -2544
- package/src-native/pods/Headers/include/APIDesign.md +0 -72
- package/src-native/pods/Headers/include/DEPS +0 -10
- package/src-native/pods/Headers/include/DIR_METADATA +0 -11
- package/src-native/pods/Headers/include/OWNERS +0 -23
- package/src-native/pods/Headers/include/cppgc/DEPS +0 -8
- package/src-native/pods/Headers/include/cppgc/OWNERS +0 -2
- package/src-native/pods/Headers/include/cppgc/README.md +0 -133
- package/src-native/pods/Headers/include/cppgc/allocation.h +0 -310
- package/src-native/pods/Headers/include/cppgc/common.h +0 -29
- package/src-native/pods/Headers/include/cppgc/cross-thread-persistent.h +0 -465
- package/src-native/pods/Headers/include/cppgc/custom-space.h +0 -97
- package/src-native/pods/Headers/include/cppgc/default-platform.h +0 -67
- package/src-native/pods/Headers/include/cppgc/ephemeron-pair.h +0 -30
- package/src-native/pods/Headers/include/cppgc/explicit-management.h +0 -100
- package/src-native/pods/Headers/include/cppgc/garbage-collected.h +0 -106
- package/src-native/pods/Headers/include/cppgc/heap-consistency.h +0 -266
- package/src-native/pods/Headers/include/cppgc/heap-state.h +0 -82
- package/src-native/pods/Headers/include/cppgc/heap-statistics.h +0 -120
- package/src-native/pods/Headers/include/cppgc/heap.h +0 -206
- package/src-native/pods/Headers/include/cppgc/internal/api-constants.h +0 -55
- package/src-native/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -48
- package/src-native/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -79
- package/src-native/pods/Headers/include/cppgc/internal/compiler-specific.h +0 -38
- package/src-native/pods/Headers/include/cppgc/internal/finalizer-trait.h +0 -93
- package/src-native/pods/Headers/include/cppgc/internal/gc-info.h +0 -156
- package/src-native/pods/Headers/include/cppgc/internal/logging.h +0 -50
- package/src-native/pods/Headers/include/cppgc/internal/name-trait.h +0 -122
- package/src-native/pods/Headers/include/cppgc/internal/persistent-node.h +0 -216
- package/src-native/pods/Headers/include/cppgc/internal/pointer-policies.h +0 -186
- package/src-native/pods/Headers/include/cppgc/internal/write-barrier.h +0 -435
- package/src-native/pods/Headers/include/cppgc/liveness-broker.h +0 -77
- package/src-native/pods/Headers/include/cppgc/macros.h +0 -26
- package/src-native/pods/Headers/include/cppgc/member.h +0 -291
- package/src-native/pods/Headers/include/cppgc/name-provider.h +0 -65
- package/src-native/pods/Headers/include/cppgc/object-size-trait.h +0 -58
- package/src-native/pods/Headers/include/cppgc/persistent.h +0 -370
- package/src-native/pods/Headers/include/cppgc/platform.h +0 -156
- package/src-native/pods/Headers/include/cppgc/prefinalizer.h +0 -75
- package/src-native/pods/Headers/include/cppgc/process-heap-statistics.h +0 -36
- package/src-native/pods/Headers/include/cppgc/sentinel-pointer.h +0 -32
- package/src-native/pods/Headers/include/cppgc/source-location.h +0 -92
- package/src-native/pods/Headers/include/cppgc/testing.h +0 -106
- package/src-native/pods/Headers/include/cppgc/trace-trait.h +0 -116
- package/src-native/pods/Headers/include/cppgc/type-traits.h +0 -240
- package/src-native/pods/Headers/include/cppgc/visitor.h +0 -379
- package/src-native/pods/Headers/include/js_protocol-1.2.json +0 -936
- package/src-native/pods/Headers/include/js_protocol-1.3.json +0 -1112
- package/src-native/pods/Headers/include/js_protocol.pdl +0 -1709
- package/src-native/pods/Headers/include/libffi/arm64/ffi.h +0 -524
- package/src-native/pods/Headers/include/libffi/arm64/ffitarget.h +0 -92
- package/src-native/pods/Headers/include/libffi/x86_64/ffi.h +0 -524
- package/src-native/pods/Headers/include/libffi/x86_64/ffitarget.h +0 -147
- package/src-native/pods/Headers/include/libffi.h +0 -12
- package/src-native/pods/Headers/include/libplatform/DEPS +0 -9
- package/src-native/pods/Headers/include/libplatform/libplatform-export.h +0 -29
- package/src-native/pods/Headers/include/libplatform/libplatform.h +0 -106
- package/src-native/pods/Headers/include/libplatform/v8-tracing.h +0 -333
- package/src-native/pods/Headers/include/v8-array-buffer.h +0 -433
- package/src-native/pods/Headers/include/v8-callbacks.h +0 -397
- package/src-native/pods/Headers/include/v8-container.h +0 -129
- package/src-native/pods/Headers/include/v8-context.h +0 -407
- package/src-native/pods/Headers/include/v8-cppgc.h +0 -215
- package/src-native/pods/Headers/include/v8-data.h +0 -80
- package/src-native/pods/Headers/include/v8-date.h +0 -43
- package/src-native/pods/Headers/include/v8-debug.h +0 -168
- package/src-native/pods/Headers/include/v8-embedder-heap.h +0 -218
- package/src-native/pods/Headers/include/v8-embedder-state-scope.h +0 -51
- package/src-native/pods/Headers/include/v8-exception.h +0 -217
- package/src-native/pods/Headers/include/v8-extension.h +0 -62
- package/src-native/pods/Headers/include/v8-external.h +0 -37
- package/src-native/pods/Headers/include/v8-fast-api-calls.h +0 -939
- package/src-native/pods/Headers/include/v8-forward.h +0 -81
- package/src-native/pods/Headers/include/v8-function-callback.h +0 -475
- package/src-native/pods/Headers/include/v8-function.h +0 -125
- package/src-native/pods/Headers/include/v8-initialization.h +0 -315
- package/src-native/pods/Headers/include/v8-inspector-protocol.h +0 -13
- package/src-native/pods/Headers/include/v8-inspector.h +0 -376
- package/src-native/pods/Headers/include/v8-internal.h +0 -661
- package/src-native/pods/Headers/include/v8-isolate.h +0 -1709
- package/src-native/pods/Headers/include/v8-json.h +0 -47
- package/src-native/pods/Headers/include/v8-local-handle.h +0 -455
- package/src-native/pods/Headers/include/v8-locker.h +0 -149
- package/src-native/pods/Headers/include/v8-maybe.h +0 -137
- package/src-native/pods/Headers/include/v8-memory-span.h +0 -43
- package/src-native/pods/Headers/include/v8-message.h +0 -216
- package/src-native/pods/Headers/include/v8-metrics.h +0 -255
- package/src-native/pods/Headers/include/v8-microtask-queue.h +0 -152
- package/src-native/pods/Headers/include/v8-microtask.h +0 -28
- package/src-native/pods/Headers/include/v8-object.h +0 -775
- package/src-native/pods/Headers/include/v8-persistent-handle.h +0 -590
- package/src-native/pods/Headers/include/v8-platform.h +0 -1092
- package/src-native/pods/Headers/include/v8-primitive-object.h +0 -118
- package/src-native/pods/Headers/include/v8-primitive.h +0 -866
- package/src-native/pods/Headers/include/v8-profiler.h +0 -1198
- package/src-native/pods/Headers/include/v8-promise.h +0 -174
- package/src-native/pods/Headers/include/v8-proxy.h +0 -50
- package/src-native/pods/Headers/include/v8-regexp.h +0 -105
- package/src-native/pods/Headers/include/v8-script.h +0 -748
- package/src-native/pods/Headers/include/v8-snapshot.h +0 -196
- package/src-native/pods/Headers/include/v8-statistics.h +0 -217
- package/src-native/pods/Headers/include/v8-template.h +0 -1079
- package/src-native/pods/Headers/include/v8-traced-handle.h +0 -420
- package/src-native/pods/Headers/include/v8-typed-array.h +0 -282
- package/src-native/pods/Headers/include/v8-unwinder-state.h +0 -31
- package/src-native/pods/Headers/include/v8-unwinder.h +0 -132
- package/src-native/pods/Headers/include/v8-util.h +0 -658
- package/src-native/pods/Headers/include/v8-value-serializer-version.h +0 -24
- package/src-native/pods/Headers/include/v8-value-serializer.h +0 -279
- package/src-native/pods/Headers/include/v8-value.h +0 -526
- package/src-native/pods/Headers/include/v8-version-string.h +0 -38
- package/src-native/pods/Headers/include/v8-version.h +0 -20
- package/src-native/pods/Headers/include/v8-wasm-trap-handler-posix.h +0 -31
- package/src-native/pods/Headers/include/v8-wasm-trap-handler-win.h +0 -28
- package/src-native/pods/Headers/include/v8-wasm.h +0 -257
- package/src-native/pods/Headers/include/v8-weak-callback-info.h +0 -86
- package/src-native/pods/Headers/include/v8.h +0 -88
- package/src-native/pods/Headers/include/v8config.h +0 -605
- package/src-native/pods/Headers/inspector/InspectorServer.h +0 -20
- package/src-native/pods/Headers/inspector/JsV8InspectorClient.h +0 -66
- package/src-native/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -1123
- package/src-native/pods/Headers/inspector/base64.h +0 -9
- package/src-native/pods/Headers/inspector/src/base/address-region.h +0 -95
- package/src-native/pods/Headers/inspector/src/base/atomic-utils.h +0 -219
- package/src-native/pods/Headers/inspector/src/base/atomicops.h +0 -332
- package/src-native/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -89
- package/src-native/pods/Headers/inspector/src/base/base-export.h +0 -31
- package/src-native/pods/Headers/inspector/src/base/bits.h +0 -343
- package/src-native/pods/Headers/inspector/src/base/build_config.h +0 -234
- package/src-native/pods/Headers/inspector/src/base/compiler-specific.h +0 -136
- package/src-native/pods/Headers/inspector/src/base/export-template.h +0 -163
- package/src-native/pods/Headers/inspector/src/base/flags.h +0 -130
- package/src-native/pods/Headers/inspector/src/base/immediate-crash.h +0 -162
- package/src-native/pods/Headers/inspector/src/base/lazy-instance.h +0 -258
- package/src-native/pods/Headers/inspector/src/base/logging.h +0 -417
- package/src-native/pods/Headers/inspector/src/base/macros.h +0 -423
- package/src-native/pods/Headers/inspector/src/base/memory.h +0 -89
- package/src-native/pods/Headers/inspector/src/base/once.h +0 -108
- package/src-native/pods/Headers/inspector/src/base/optional.h +0 -882
- package/src-native/pods/Headers/inspector/src/base/platform/mutex.h +0 -370
- package/src-native/pods/Headers/inspector/src/base/platform/platform.h +0 -476
- package/src-native/pods/Headers/inspector/src/base/platform/semaphore.h +0 -108
- package/src-native/pods/Headers/inspector/src/base/platform/v8-time.h +0 -513
- package/src-native/pods/Headers/inspector/src/base/platform/wrappers.h +0 -73
- package/src-native/pods/Headers/inspector/src/base/safe_conversions.h +0 -389
- package/src-native/pods/Headers/inspector/src/base/safe_conversions_impl.h +0 -822
- package/src-native/pods/Headers/inspector/src/base/template-utils.h +0 -113
- package/src-native/pods/Headers/inspector/src/base/v8-fallthrough.h +0 -21
- package/src-native/pods/Headers/inspector/src/common/checks.h +0 -38
- package/src-native/pods/Headers/inspector/src/common/globals.h +0 -1842
- package/src-native/pods/Headers/inspector/src/debug/debug-interface.h +0 -667
- package/src-native/pods/Headers/inspector/src/debug/interface-types.h +0 -175
- package/src-native/pods/Headers/inspector/src/init/v8.h +0 -52
- package/src-native/pods/Headers/inspector/src/inspector/custom-preview.h +0 -24
- package/src-native/pods/Headers/inspector/src/inspector/injected-script.h +0 -251
- package/src-native/pods/Headers/inspector/src/inspector/inspected-context.h +0 -79
- package/src-native/pods/Headers/inspector/src/inspector/protocol/CSS.h +0 -2148
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Console.h +0 -211
- package/src-native/pods/Headers/inspector/src/inspector/protocol/DOM.h +0 -1008
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Debugger.h +0 -892
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Forward.h +0 -75
- package/src-native/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -346
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Log.h +0 -342
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Network.h +0 -2528
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Overlay.h +0 -281
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Page.h +0 -1189
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Profiler.h +0 -1001
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Protocol.h +0 -617
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Runtime.h +0 -1696
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Schema.h +0 -146
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Security.h +0 -793
- package/src-native/pods/Headers/inspector/src/inspector/remote-object-id.h +0 -54
- package/src-native/pods/Headers/inspector/src/inspector/search-util.h +0 -26
- package/src-native/pods/Headers/inspector/src/inspector/string-16.h +0 -180
- package/src-native/pods/Headers/inspector/src/inspector/string-util.h +0 -128
- package/src-native/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -48
- package/src-native/pods/Headers/inspector/src/inspector/v8-console-message.h +0 -147
- package/src-native/pods/Headers/inspector/src/inspector/v8-console.h +0 -173
- package/src-native/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -62
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -248
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-id.h +0 -44
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-script.h +0 -123
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger.h +0 -257
- package/src-native/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -91
- package/src-native/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -80
- package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -191
- package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -156
- package/src-native/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -34
- package/src-native/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -71
- package/src-native/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -24
- package/src-native/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -70
- package/src-native/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -88
- package/src-native/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -104
- package/src-native/pods/Headers/inspector/src/inspector/v8-regex.h +0 -38
- package/src-native/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -157
- package/src-native/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -38
- package/src-native/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -164
- package/src-native/pods/Headers/inspector/src/inspector/v8-string-conversions.h +0 -17
- package/src-native/pods/Headers/inspector/src/inspector/v8-value-utils.h +0 -23
- package/src-native/pods/Headers/inspector/src/inspector/value-mirror.h +0 -87
- package/src-native/pods/Headers/inspector/src/libplatform/default-platform.h +0 -92
- package/src-native/pods/Headers/inspector/src/logging/tracing-flags.h +0 -50
- package/src-native/pods/Headers/inspector/src/numbers/conversions.h +0 -183
- package/src-native/pods/Headers/inspector/src/tracing/trace-event.h +0 -664
- package/src-native/pods/Headers/inspector/src/utils/allocation.h +0 -367
- package/src-native/pods/Headers/inspector/src/utils/vector.h +0 -324
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -305
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -314
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -62
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -6
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -58
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -47
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -80
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -52
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -26
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -104
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -39
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -406
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -32
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -158
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -99
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -139
- package/src-native/pods/Headers/inspector/utils.h +0 -32
- package/src-native/pods/Headers/inspector/v8-inspector-platform.h +0 -44
- package/src-native/pods/Headers/jsi/decorator.h +0 -762
- package/src-native/pods/Headers/jsi/instrumentation.h +0 -117
- package/src-native/pods/Headers/jsi/jsi-inl.h +0 -322
- package/src-native/pods/Headers/jsi/jsi.h +0 -1387
- package/src-native/pods/Headers/jsi/jsilib.h +0 -59
- package/src-native/pods/Headers/jsi/threadsafe.h +0 -79
- package/src-native/pods/Headers/runtime/ArgConverter.h +0 -61
- package/src-native/pods/Headers/runtime/ArrayAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/Caches.h +0 -98
- package/src-native/pods/Headers/runtime/ClassBuilder.h +0 -61
- package/src-native/pods/Headers/runtime/Common.h +0 -9
- package/src-native/pods/Headers/runtime/ConcurrentMap.h +0 -55
- package/src-native/pods/Headers/runtime/ConcurrentQueue.h +0 -28
- package/src-native/pods/Headers/runtime/Console.h +0 -27
- package/src-native/pods/Headers/runtime/Constants.h +0 -15
- package/src-native/pods/Headers/runtime/DataWrapper.h +0 -671
- package/src-native/pods/Headers/runtime/DictionaryAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/ExtVector.h +0 -21
- package/src-native/pods/Headers/runtime/FFICall.h +0 -105
- package/src-native/pods/Headers/runtime/FastEnumerationAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/FunctionReference.h +0 -18
- package/src-native/pods/Headers/runtime/Helpers.h +0 -84
- package/src-native/pods/Headers/runtime/InlineFunctions.h +0 -16
- package/src-native/pods/Headers/runtime/Interop.h +0 -202
- package/src-native/pods/Headers/runtime/KnownUnknownClassPair.h +0 -35
- package/src-native/pods/Headers/runtime/Metadata.h +0 -981
- package/src-native/pods/Headers/runtime/MetadataBuilder.h +0 -72
- package/src-native/pods/Headers/runtime/MetadataInlines.h +0 -157
- package/src-native/pods/Headers/runtime/ModuleInternal.h +0 -59
- package/src-native/pods/Headers/runtime/NSDataAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/NativeScriptException.h +0 -27
- package/src-native/pods/Headers/runtime/ObjectManager.h +0 -31
- package/src-native/pods/Headers/runtime/OneByteStringResource.h +0 -21
- package/src-native/pods/Headers/runtime/Pointer.h +0 -26
- package/src-native/pods/Headers/runtime/PromiseProxy.h +0 -15
- package/src-native/pods/Headers/runtime/Reference.h +0 -38
- package/src-native/pods/Headers/runtime/Runtime.h +0 -67
- package/src-native/pods/Headers/runtime/RuntimeConfig.h +0 -17
- package/src-native/pods/Headers/runtime/SetTimeout.h +0 -34
- package/src-native/pods/Headers/runtime/SimpleAllocator.h +0 -23
- package/src-native/pods/Headers/runtime/StringHasher.h +0 -315
- package/src-native/pods/Headers/runtime/SymbolIterator.h +0 -18
- package/src-native/pods/Headers/runtime/SymbolLoader.h +0 -27
- package/src-native/pods/Headers/runtime/TNSDerivedClass.h +0 -8
- package/src-native/pods/Headers/runtime/TSHelpers.h +0 -15
- package/src-native/pods/Headers/runtime/Tasks.h +0 -19
- package/src-native/pods/Headers/runtime/UnmanagedType.h +0 -21
- package/src-native/pods/Headers/runtime/WeakRef.h +0 -15
- package/src-native/pods/Headers/runtime/Worker.h +0 -26
- package/src-native/pods/Headers/runtime/robin_hood.h +0 -2184
- package/src-native/pods/Headers/v8runtime/HostProxy.h +0 -71
- package/src-native/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -70
- package/src-native/pods/Headers/v8runtime/V8PointerValue.h +0 -44
- package/src-native/pods/Headers/v8runtime/V8Runtime.h +0 -215
- package/src-native/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
- package/src-native/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
- package/src-native/pods/NativeScript.podspec +0 -68
package/helpers.js
DELETED
|
@@ -1,1318 +0,0 @@
|
|
|
1
|
-
// declare const __non_webpack_require__;
|
|
2
|
-
import { Length, Utils } from '@nativescript/core';
|
|
3
|
-
import { style_ } from './common';
|
|
4
|
-
import { parseUnit } from '@nativescript/core/css/parser';
|
|
5
|
-
// if (__ANDROID__) {
|
|
6
|
-
// try {
|
|
7
|
-
// java.lang.System.loadLibrary('masonnative');
|
|
8
|
-
// __non_webpack_require__('system_lib://libmasonnativev8.so');
|
|
9
|
-
// UseV8Module = true;
|
|
10
|
-
// } catch (error) {
|
|
11
|
-
// console.warn('Failed to enable on FastAPI');
|
|
12
|
-
// }
|
|
13
|
-
// }
|
|
14
|
-
// if (__APPLE__) {
|
|
15
|
-
// NSCMason.alwaysEnable = true;
|
|
16
|
-
// if (!UseV8Module) {
|
|
17
|
-
// try {
|
|
18
|
-
// const installer = MasonV8Module.new();
|
|
19
|
-
// installer.install();
|
|
20
|
-
// UseV8Module = true;
|
|
21
|
-
// } catch (error) {
|
|
22
|
-
// console.warn('Failed to enable on FastAPI');
|
|
23
|
-
// }
|
|
24
|
-
// }
|
|
25
|
-
// }
|
|
26
|
-
function getMasonInstance(instance) {
|
|
27
|
-
const nativeView = instance?.android;
|
|
28
|
-
if (instance._isMasonChild) {
|
|
29
|
-
return org.nativescript.mason.masonkit.Mason.getShared().nodeForView(nativeView);
|
|
30
|
-
}
|
|
31
|
-
return nativeView.getNode();
|
|
32
|
-
}
|
|
33
|
-
function getStyleInstance(instance) {
|
|
34
|
-
const nativeView = instance?.android;
|
|
35
|
-
if (instance._isMasonChild) {
|
|
36
|
-
return org.nativescript.mason.masonkit.Mason.getShared()
|
|
37
|
-
.nodeForView(nativeView)
|
|
38
|
-
.getStyle();
|
|
39
|
-
}
|
|
40
|
-
return nativeView.getStyle();
|
|
41
|
-
}
|
|
42
|
-
function getNode(instance) {
|
|
43
|
-
const nativeView = instance?.ios;
|
|
44
|
-
if (instance._isMasonChild) {
|
|
45
|
-
return NSCMason.shared.nodeForView(nativeView, true);
|
|
46
|
-
}
|
|
47
|
-
return nativeView.node;
|
|
48
|
-
}
|
|
49
|
-
function getStyle(instance) {
|
|
50
|
-
const nativeView = instance?.ios;
|
|
51
|
-
if (instance._isMasonChild) {
|
|
52
|
-
return NSCMason.shared.nodeForView(nativeView, true).style;
|
|
53
|
-
}
|
|
54
|
-
return nativeView.style;
|
|
55
|
-
}
|
|
56
|
-
export function _forceStyleUpdate(instance) {
|
|
57
|
-
if (!instance._hasNativeView) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
// if (__ANDROID__) {
|
|
61
|
-
// const nodeOrView = getMasonInstance(instance) as org.nativescript.mason.masonkit.TextView;
|
|
62
|
-
// nodeOrView.getStyle().updateNodeAndStyle();
|
|
63
|
-
// }
|
|
64
|
-
// if (__APPLE__) {
|
|
65
|
-
// (instance.ios as MasonUIView).node.style.updateNativeStyle();
|
|
66
|
-
// }
|
|
67
|
-
}
|
|
68
|
-
export function _markDirty(instance) {
|
|
69
|
-
if (!instance._hasNativeView) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (__ANDROID__) {
|
|
73
|
-
const nodeOrView = getMasonInstance(instance);
|
|
74
|
-
nodeOrView.dirty();
|
|
75
|
-
}
|
|
76
|
-
if (__APPLE__) {
|
|
77
|
-
getNode(instance).markDirty();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
export function _isDirty(instance) {
|
|
81
|
-
if (!instance._hasNativeView) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
if (__ANDROID__) {
|
|
85
|
-
const nodeOrView = getMasonInstance(instance);
|
|
86
|
-
return nodeOrView.isDirty();
|
|
87
|
-
}
|
|
88
|
-
if (__APPLE__) {
|
|
89
|
-
return getNode(instance).isDirty;
|
|
90
|
-
}
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
export function _intoType(type) {
|
|
94
|
-
switch (type) {
|
|
95
|
-
case 'auto':
|
|
96
|
-
return 0 /* MasonDimensionCompatType.Auto */;
|
|
97
|
-
case 'points':
|
|
98
|
-
return 1 /* MasonDimensionCompatType.Points */;
|
|
99
|
-
case 'percent':
|
|
100
|
-
return 2 /* MasonDimensionCompatType.Percent */;
|
|
101
|
-
default:
|
|
102
|
-
return 0 /* MasonDimensionCompatType.Auto */;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
export function _parseDimension(dim) {
|
|
106
|
-
if (__APPLE__) {
|
|
107
|
-
const type = dim.type;
|
|
108
|
-
const value = dim.value;
|
|
109
|
-
switch (type) {
|
|
110
|
-
case 0 /* MasonDimensionCompatType.Auto */:
|
|
111
|
-
return 'auto';
|
|
112
|
-
case 1 /* MasonDimensionCompatType.Points */:
|
|
113
|
-
return { value: value, unit: 'px' };
|
|
114
|
-
case 2 /* MasonDimensionCompatType.Percent */:
|
|
115
|
-
return { value: value, unit: '%' };
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
const name = dim.getClass().getName();
|
|
119
|
-
switch (name) {
|
|
120
|
-
case 'org.nativescript.mason.masonkit.Dimension$Points':
|
|
121
|
-
return { value: dim.getPoints(), unit: 'px' };
|
|
122
|
-
case 'org.nativescript.mason.masonkit.Dimension$Percent':
|
|
123
|
-
return { value: dim.getPercentage(), unit: '%' };
|
|
124
|
-
case 'org.nativescript.mason.masonkit.Dimension$Auto':
|
|
125
|
-
return 'auto';
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
export function _parseLengthPercentage(dim) {
|
|
129
|
-
if (__APPLE__) {
|
|
130
|
-
const type = dim.type;
|
|
131
|
-
const value = dim.value;
|
|
132
|
-
switch (type) {
|
|
133
|
-
case 0 /* MasonLengthPercentageCompatType.Points */:
|
|
134
|
-
return { value: value, unit: 'px' };
|
|
135
|
-
case 1 /* MasonLengthPercentageCompatType.Percent */:
|
|
136
|
-
return { value: value, unit: '%' };
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
const name = dim.getClass().getName();
|
|
140
|
-
switch (name) {
|
|
141
|
-
case 'org.nativescript.mason.masonkit.LengthPercentage$Points':
|
|
142
|
-
return { value: dim.getPoints(), unit: 'px' };
|
|
143
|
-
case 'org.nativescript.mason.masonkit.LengthPercentage$Percent':
|
|
144
|
-
return { value: dim.getPercentage(), unit: '%' };
|
|
145
|
-
case 'org.nativescript.mason.masonkit.LengthPercentage$Auto':
|
|
146
|
-
return 'auto';
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
export function _parseLengthPercentageAuto(dim) {
|
|
150
|
-
if (__APPLE__) {
|
|
151
|
-
const type = dim.type;
|
|
152
|
-
const value = dim.value;
|
|
153
|
-
switch (type) {
|
|
154
|
-
case 0 /* MasonLengthPercentageAutoCompatType.Auto */:
|
|
155
|
-
return 'auto';
|
|
156
|
-
case 1 /* MasonLengthPercentageAutoCompatType.Points */:
|
|
157
|
-
return { value: value, unit: 'px' };
|
|
158
|
-
case 2 /* MasonLengthPercentageAutoCompatType.Percent */:
|
|
159
|
-
return { value: value, unit: '%' };
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
const name = dim.getClass().getName();
|
|
163
|
-
switch (name) {
|
|
164
|
-
case 'org.nativescript.mason.masonkit.LengthPercentageAuto$Points':
|
|
165
|
-
return { value: dim.getPoints(), unit: 'px' };
|
|
166
|
-
case 'org.nativescript.mason.masonkit.LengthPercentageAuto$Percent':
|
|
167
|
-
return { value: dim.getPercentage(), unit: '%' };
|
|
168
|
-
case 'org.nativescript.mason.masonkit.LengthPercentageAuto$Auto':
|
|
169
|
-
return 'auto';
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
export function _toMasonDimension(value) {
|
|
173
|
-
if (value === undefined || value === null) {
|
|
174
|
-
return value;
|
|
175
|
-
}
|
|
176
|
-
if (value === 'auto') {
|
|
177
|
-
return { value: 0, type: 'auto', native_type: 0 /* MasonDimensionCompatType.Auto */ };
|
|
178
|
-
}
|
|
179
|
-
let typeOf = typeof value;
|
|
180
|
-
if (typeOf === 'number') {
|
|
181
|
-
return { value: Utils.layout.toDevicePixels(value), type: 'points', native_type: 1 /* MasonDimensionCompatType.Points */ };
|
|
182
|
-
}
|
|
183
|
-
if (typeOf === 'string') {
|
|
184
|
-
value = parseUnit(value).value;
|
|
185
|
-
typeOf = 'object';
|
|
186
|
-
}
|
|
187
|
-
if (typeOf === 'object') {
|
|
188
|
-
switch (value?.unit) {
|
|
189
|
-
case '%':
|
|
190
|
-
return { value: value.value, type: 'percent', native_type: 2 /* MasonDimensionCompatType.Percent */ };
|
|
191
|
-
case 'px':
|
|
192
|
-
return { value: value.value, type: 'points', native_type: 1 /* MasonDimensionCompatType.Points */ };
|
|
193
|
-
case 'dip':
|
|
194
|
-
return { value: Utils.layout.toDevicePixels(value.value), type: 'points', native_type: 1 /* MasonDimensionCompatType.Points */ };
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
return { value: value, type: 'points', native_type: 1 /* MasonDimensionCompatType.Points */ };
|
|
198
|
-
}
|
|
199
|
-
export function _intoMasonDimension(value) {
|
|
200
|
-
if (value === undefined || value === null) {
|
|
201
|
-
return null;
|
|
202
|
-
}
|
|
203
|
-
if (__APPLE__) {
|
|
204
|
-
if (value === 'auto') {
|
|
205
|
-
return MasonDimensionCompat.Auto;
|
|
206
|
-
}
|
|
207
|
-
const typeOf = typeof value;
|
|
208
|
-
if (typeOf === 'object') {
|
|
209
|
-
switch (value?.unit) {
|
|
210
|
-
case '%':
|
|
211
|
-
return MasonDimensionCompat.alloc().initWithPercent(value.value);
|
|
212
|
-
case 'px':
|
|
213
|
-
return MasonDimensionCompat.alloc().initWithPoints(value.value);
|
|
214
|
-
case 'dip':
|
|
215
|
-
return MasonDimensionCompat.alloc().initWithPoints(Utils.layout.toDevicePixels(value.value));
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
if (typeOf === 'number') {
|
|
219
|
-
return MasonDimensionCompat.alloc().initWithPoints(Utils.layout.toDevicePixels(value));
|
|
220
|
-
}
|
|
221
|
-
return MasonDimensionCompat.alloc().initWithPoints(Utils.layout.toDevicePixels(value));
|
|
222
|
-
}
|
|
223
|
-
if (__ANDROID__) {
|
|
224
|
-
if (value === 'auto') {
|
|
225
|
-
return org.nativescript.mason.masonkit.Dimension.Auto;
|
|
226
|
-
}
|
|
227
|
-
const typeOf = typeof value;
|
|
228
|
-
if (typeOf === 'object') {
|
|
229
|
-
switch (value?.unit) {
|
|
230
|
-
case '%':
|
|
231
|
-
return new org.nativescript.mason.masonkit.Dimension.Percent(value.value);
|
|
232
|
-
case 'px':
|
|
233
|
-
return new org.nativescript.mason.masonkit.Dimension.Points(value.value);
|
|
234
|
-
case 'dip':
|
|
235
|
-
return new org.nativescript.mason.masonkit.Dimension.Points(Utils.layout.toDevicePixels(value.value));
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
if (typeOf === 'number') {
|
|
239
|
-
return new org.nativescript.mason.masonkit.Dimension.Points(Utils.layout.toDevicePixels(value));
|
|
240
|
-
}
|
|
241
|
-
return new org.nativescript.mason.masonkit.Dimension.Points(Utils.layout.toDevicePixels(value));
|
|
242
|
-
}
|
|
243
|
-
return null;
|
|
244
|
-
}
|
|
245
|
-
export function _toLengthPercentageAuto(value) {
|
|
246
|
-
if (value === undefined || value === null) {
|
|
247
|
-
return value;
|
|
248
|
-
}
|
|
249
|
-
if (value === 'auto') {
|
|
250
|
-
return { value: 0, type: 'auto', native_type: 0 /* MasonLengthPercentageAutoCompatType.Auto */ };
|
|
251
|
-
}
|
|
252
|
-
const typeOf = typeof value;
|
|
253
|
-
if (typeOf === 'object') {
|
|
254
|
-
switch (value?.unit) {
|
|
255
|
-
case '%':
|
|
256
|
-
return { value: value.value, type: 'percent', native_type: 2 /* MasonLengthPercentageAutoCompatType.Percent */ };
|
|
257
|
-
case 'px':
|
|
258
|
-
return { value: value.value, type: 'points', native_type: 1 /* MasonLengthPercentageAutoCompatType.Points */ };
|
|
259
|
-
case 'dip':
|
|
260
|
-
return { value: Utils.layout.toDevicePixels(value.value), type: 'points', native_type: 1 /* MasonLengthPercentageAutoCompatType.Points */ };
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
if (typeOf === 'number') {
|
|
264
|
-
return { value: Utils.layout.toDevicePixels(value), type: 'points', native_type: 1 /* MasonLengthPercentageAutoCompatType.Points */ };
|
|
265
|
-
}
|
|
266
|
-
return { value: value, type: 'points', native_type: 1 /* MasonLengthPercentageAutoCompatType.Points */ };
|
|
267
|
-
}
|
|
268
|
-
export function _toLengthPercentage(value) {
|
|
269
|
-
if (value === undefined || value === null) {
|
|
270
|
-
return value;
|
|
271
|
-
}
|
|
272
|
-
if (typeof value === 'string') {
|
|
273
|
-
const parsed = Length.parse(value);
|
|
274
|
-
if (parsed) {
|
|
275
|
-
value = parsed;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
const typeOf = typeof value;
|
|
279
|
-
if (typeOf === 'object') {
|
|
280
|
-
switch (value?.unit) {
|
|
281
|
-
case '%':
|
|
282
|
-
return { value: value.value, type: 'percent', native_type: 1 /* MasonLengthPercentageCompatType.Percent */ };
|
|
283
|
-
case 'px':
|
|
284
|
-
return { value: value.value, type: 'points', native_type: 0 /* MasonLengthPercentageCompatType.Points */ };
|
|
285
|
-
case 'dip':
|
|
286
|
-
return { value: Utils.layout.toDevicePixels(value.value), type: 'points', native_type: 0 /* MasonLengthPercentageCompatType.Points */ };
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
if (typeOf === 'number') {
|
|
290
|
-
return { value: Utils.layout.toDevicePixels(value), type: 'points', native_type: 0 /* MasonLengthPercentageCompatType.Points */ };
|
|
291
|
-
}
|
|
292
|
-
return { value: value, type: 'points', native_type: 0 /* MasonLengthPercentageCompatType.Points */ };
|
|
293
|
-
}
|
|
294
|
-
function syncStyle(instance) {
|
|
295
|
-
// noop
|
|
296
|
-
}
|
|
297
|
-
export function _setDisplay(value, instance, initial = false) {
|
|
298
|
-
if (initial && value === 'block') {
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
if (instance._hasNativeView) {
|
|
302
|
-
instance._styleHelper.display = value;
|
|
303
|
-
syncStyle(instance);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
export function _getDisplay(instance) {
|
|
307
|
-
return instance._styleHelper.display;
|
|
308
|
-
}
|
|
309
|
-
export function _setMinWidth(value, instance, initial = false) {
|
|
310
|
-
if (!instance._hasNativeView) {
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
instance._styleHelper.minWidth = value;
|
|
314
|
-
syncStyle(instance);
|
|
315
|
-
}
|
|
316
|
-
export function _getMinWidth(instance) {
|
|
317
|
-
if (!instance._hasNativeView) {
|
|
318
|
-
return instance.style.minWidth;
|
|
319
|
-
}
|
|
320
|
-
return instance._styleHelper.minWidth;
|
|
321
|
-
}
|
|
322
|
-
export function _setMinHeight(value, instance, initial = false) {
|
|
323
|
-
if (!instance._hasNativeView) {
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
instance._styleHelper.minHeight = value;
|
|
327
|
-
syncStyle(instance);
|
|
328
|
-
}
|
|
329
|
-
export function _getMinHeight(instance) {
|
|
330
|
-
if (!instance._hasNativeView) {
|
|
331
|
-
return instance.style.minHeight;
|
|
332
|
-
}
|
|
333
|
-
return instance._styleHelper.minHeight;
|
|
334
|
-
}
|
|
335
|
-
export function _setWidth(value, instance, initial = false) {
|
|
336
|
-
if (!instance._hasNativeView) {
|
|
337
|
-
return;
|
|
338
|
-
}
|
|
339
|
-
if (instance._styleHelper) {
|
|
340
|
-
instance._styleHelper.width = value;
|
|
341
|
-
}
|
|
342
|
-
syncStyle(instance);
|
|
343
|
-
}
|
|
344
|
-
export function _getWidth(instance) {
|
|
345
|
-
if (!instance._hasNativeView) {
|
|
346
|
-
return instance.style.width;
|
|
347
|
-
}
|
|
348
|
-
return instance._styleHelper.width;
|
|
349
|
-
}
|
|
350
|
-
export function _setHeight(value, instance, initial = false) {
|
|
351
|
-
if (!instance._hasNativeView) {
|
|
352
|
-
return;
|
|
353
|
-
}
|
|
354
|
-
instance._styleHelper.height = value;
|
|
355
|
-
}
|
|
356
|
-
export function _getHeight(instance) {
|
|
357
|
-
if (!instance._hasNativeView) {
|
|
358
|
-
return instance.style.height;
|
|
359
|
-
}
|
|
360
|
-
return instance._styleHelper.height;
|
|
361
|
-
}
|
|
362
|
-
export function _setMaxWidth(value, instance, initial = false) {
|
|
363
|
-
if (!instance._hasNativeView) {
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
instance._styleHelper.maxWidth = value;
|
|
367
|
-
syncStyle(instance);
|
|
368
|
-
}
|
|
369
|
-
export function _getMaxWidth(instance) {
|
|
370
|
-
if (!instance._hasNativeView) {
|
|
371
|
-
return instance.style.maxWidth;
|
|
372
|
-
}
|
|
373
|
-
return instance._styleHelper.maxWidth;
|
|
374
|
-
}
|
|
375
|
-
export function _setMaxHeight(value, instance, initial = false) {
|
|
376
|
-
if (!instance._hasNativeView) {
|
|
377
|
-
return;
|
|
378
|
-
}
|
|
379
|
-
instance._styleHelper.maxHeight = value;
|
|
380
|
-
syncStyle(instance);
|
|
381
|
-
}
|
|
382
|
-
export function _getMaxHeight(instance) {
|
|
383
|
-
if (!instance._hasNativeView) {
|
|
384
|
-
return instance.style.maxHeight;
|
|
385
|
-
}
|
|
386
|
-
return instance._styleHelper.maxHeight;
|
|
387
|
-
}
|
|
388
|
-
export function _setFlexDirection(value, instance, initial = false) {
|
|
389
|
-
if (initial && value === 'row') {
|
|
390
|
-
return;
|
|
391
|
-
}
|
|
392
|
-
if (instance._hasNativeView) {
|
|
393
|
-
instance._styleHelper.flexDirection = value;
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
export function _getFlexDirection(instance) {
|
|
397
|
-
return instance._styleHelper.flexDirection;
|
|
398
|
-
}
|
|
399
|
-
export function _getPosition(instance) {
|
|
400
|
-
return instance._styleHelper.position;
|
|
401
|
-
}
|
|
402
|
-
export function _setPosition(value, instance, initial = false) {
|
|
403
|
-
if (initial && value === 'relative') {
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
if (instance._hasNativeView) {
|
|
407
|
-
instance._styleHelper.position = value;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
export function _setFlexWrap(value, instance, initial = false) {
|
|
411
|
-
if (initial && value === 'no-wrap') {
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
if (instance._hasNativeView) {
|
|
415
|
-
instance._styleHelper.flexWrap = value;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
export function _getFlexWrap(instance) {
|
|
419
|
-
if (instance._hasNativeView) {
|
|
420
|
-
return instance._styleHelper.flexWrap;
|
|
421
|
-
}
|
|
422
|
-
return instance.style.flexWrap;
|
|
423
|
-
}
|
|
424
|
-
export function _setAlignItems(value, instance, initial = false) {
|
|
425
|
-
if (initial && value === 'normal') {
|
|
426
|
-
return;
|
|
427
|
-
}
|
|
428
|
-
if (instance._hasNativeView) {
|
|
429
|
-
instance._styleHelper.alignItems = value;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
export function _getAlignItems(instance) {
|
|
433
|
-
if (instance._hasNativeView) {
|
|
434
|
-
return instance._styleHelper.alignItems;
|
|
435
|
-
}
|
|
436
|
-
return instance.style.alignItems;
|
|
437
|
-
}
|
|
438
|
-
export function _setAlignSelf(value, instance, initial = false) {
|
|
439
|
-
if (initial && value === 'normal') {
|
|
440
|
-
return;
|
|
441
|
-
}
|
|
442
|
-
if (instance._hasNativeView) {
|
|
443
|
-
instance._styleHelper.alignSelf = value;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
export function _getAlignSelf(instance) {
|
|
447
|
-
if (instance._hasNativeView) {
|
|
448
|
-
return instance._styleHelper.alignSelf;
|
|
449
|
-
}
|
|
450
|
-
return instance.style.alignSelf;
|
|
451
|
-
}
|
|
452
|
-
export function _setAlignContent(value, instance, initial = false) {
|
|
453
|
-
if (initial && value === 'normal') {
|
|
454
|
-
return;
|
|
455
|
-
}
|
|
456
|
-
if (instance._hasNativeView) {
|
|
457
|
-
if (instance._styleHelper) {
|
|
458
|
-
instance._styleHelper.alignContent = value;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
export function _getAlignContent(instance) {
|
|
463
|
-
if (instance._hasNativeView) {
|
|
464
|
-
return instance._styleHelper.alignContent;
|
|
465
|
-
}
|
|
466
|
-
return instance.style.alignContent;
|
|
467
|
-
}
|
|
468
|
-
export function _setJustifyItems(value, instance, initial = false) {
|
|
469
|
-
if (initial && value === 'normal') {
|
|
470
|
-
return;
|
|
471
|
-
}
|
|
472
|
-
if (instance._hasNativeView) {
|
|
473
|
-
instance._styleHelper.justifyItems = value;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
export function _getJustifyItems(instance) {
|
|
477
|
-
if (instance._hasNativeView) {
|
|
478
|
-
return instance._styleHelper.justifyItems;
|
|
479
|
-
}
|
|
480
|
-
return instance.style.justifyItems;
|
|
481
|
-
}
|
|
482
|
-
export function _setJustifySelf(value, instance, initial = false) {
|
|
483
|
-
if (initial && value === 'normal') {
|
|
484
|
-
return;
|
|
485
|
-
}
|
|
486
|
-
if (instance._hasNativeView) {
|
|
487
|
-
instance._styleHelper.justifySelf = value;
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
export function _getJustifySelf(instance) {
|
|
491
|
-
if (instance._hasNativeView) {
|
|
492
|
-
return instance._styleHelper.justifySelf;
|
|
493
|
-
}
|
|
494
|
-
return instance.style.justifySelf;
|
|
495
|
-
}
|
|
496
|
-
export function _setJustifyContent(value, instance, initial = false) {
|
|
497
|
-
if (initial && value === 'normal') {
|
|
498
|
-
return;
|
|
499
|
-
}
|
|
500
|
-
if (!value)
|
|
501
|
-
value = 'normal';
|
|
502
|
-
if (instance._hasNativeView) {
|
|
503
|
-
if (instance._styleHelper) {
|
|
504
|
-
instance._styleHelper.justifyContent = value;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
export function _getJustifyContent(instance) {
|
|
509
|
-
if (instance._hasNativeView) {
|
|
510
|
-
return instance._styleHelper.justifyContent;
|
|
511
|
-
}
|
|
512
|
-
return instance.style.justifyContent;
|
|
513
|
-
}
|
|
514
|
-
export function _setLeft(value, instance, initial = false) {
|
|
515
|
-
if (!instance._hasNativeView) {
|
|
516
|
-
return;
|
|
517
|
-
}
|
|
518
|
-
instance._styleHelper.left = value;
|
|
519
|
-
}
|
|
520
|
-
export function _setRight(value, instance, initial = false) {
|
|
521
|
-
if (!instance._hasNativeView) {
|
|
522
|
-
return;
|
|
523
|
-
}
|
|
524
|
-
instance._styleHelper.right = value;
|
|
525
|
-
}
|
|
526
|
-
export function _setTop(value, instance, initial = false) {
|
|
527
|
-
if (!instance._hasNativeView) {
|
|
528
|
-
return;
|
|
529
|
-
}
|
|
530
|
-
instance._styleHelper.top = value;
|
|
531
|
-
}
|
|
532
|
-
export function _setBottom(value, instance, initial = false) {
|
|
533
|
-
if (!instance._hasNativeView) {
|
|
534
|
-
return;
|
|
535
|
-
}
|
|
536
|
-
instance._styleHelper.bottom = value;
|
|
537
|
-
}
|
|
538
|
-
export function _setMarginLeft(value, instance, initial = false) {
|
|
539
|
-
if (!instance._hasNativeView) {
|
|
540
|
-
return;
|
|
541
|
-
}
|
|
542
|
-
instance._styleHelper.marginLeft = value;
|
|
543
|
-
}
|
|
544
|
-
export function _setMarginRight(value, instance, initial = false) {
|
|
545
|
-
if (!instance._hasNativeView) {
|
|
546
|
-
return;
|
|
547
|
-
}
|
|
548
|
-
instance._styleHelper.marginRight = value;
|
|
549
|
-
}
|
|
550
|
-
export function _setMarginTop(value, instance, initial = false) {
|
|
551
|
-
if (!instance._hasNativeView) {
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
554
|
-
instance._styleHelper.marginTop = value;
|
|
555
|
-
}
|
|
556
|
-
export function _setMarginBottom(value, instance, initial = false) {
|
|
557
|
-
if (!instance._hasNativeView) {
|
|
558
|
-
return;
|
|
559
|
-
}
|
|
560
|
-
instance._styleHelper.marginBottom = value;
|
|
561
|
-
}
|
|
562
|
-
export function _setPaddingLeft(value, instance, initial = false) {
|
|
563
|
-
if (!instance._hasNativeView) {
|
|
564
|
-
return;
|
|
565
|
-
}
|
|
566
|
-
instance._styleHelper.paddingLeft = value;
|
|
567
|
-
}
|
|
568
|
-
export function _setPaddingRight(value, instance, initial = false) {
|
|
569
|
-
if (!instance._hasNativeView) {
|
|
570
|
-
return;
|
|
571
|
-
}
|
|
572
|
-
instance._styleHelper.paddingRight = value;
|
|
573
|
-
}
|
|
574
|
-
export function _setPaddingTop(value, instance, initial = false) {
|
|
575
|
-
if (!instance._hasNativeView) {
|
|
576
|
-
return;
|
|
577
|
-
}
|
|
578
|
-
instance._styleHelper.paddingTop = value;
|
|
579
|
-
}
|
|
580
|
-
export function _setPaddingBottom(value, instance, initial = false) {
|
|
581
|
-
if (!instance._hasNativeView) {
|
|
582
|
-
return;
|
|
583
|
-
}
|
|
584
|
-
instance._styleHelper.paddingBottom = value;
|
|
585
|
-
}
|
|
586
|
-
export function _setBorderLeft(value, instance, initial = false) {
|
|
587
|
-
if (!instance._hasNativeView) {
|
|
588
|
-
return;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
export function _setBorderRight(value, instance, initial = false) {
|
|
592
|
-
if (!instance._hasNativeView) {
|
|
593
|
-
return;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
export function _setBorderTop(value, instance, initial = false) {
|
|
597
|
-
if (!instance._hasNativeView) {
|
|
598
|
-
return;
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
export function _setBorderBottom(value, instance, initial = false) {
|
|
602
|
-
if (!instance._hasNativeView) {
|
|
603
|
-
return;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
export function _setFlexBasis(value, instance, initial = false) {
|
|
607
|
-
if (!instance._hasNativeView) {
|
|
608
|
-
return;
|
|
609
|
-
}
|
|
610
|
-
instance._styleHelper.flexBasis = value;
|
|
611
|
-
}
|
|
612
|
-
export function _getFlexBasis(instance) {
|
|
613
|
-
if (!instance._hasNativeView) {
|
|
614
|
-
return instance.style.flexBasis;
|
|
615
|
-
}
|
|
616
|
-
return instance._styleHelper.flexBasis;
|
|
617
|
-
}
|
|
618
|
-
export function _setGap(value, instance, initial = false) {
|
|
619
|
-
if (!instance._hasNativeView) {
|
|
620
|
-
return;
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
export function _getGap(instance) {
|
|
624
|
-
if (!instance._hasNativeView) {
|
|
625
|
-
return instance.style.gap;
|
|
626
|
-
}
|
|
627
|
-
return {
|
|
628
|
-
row: this._styleHelper.rowGap,
|
|
629
|
-
column: this._styleHelper.columnGap,
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
export function _setOverflow(value, instance) {
|
|
633
|
-
if (!instance._hasNativeView) {
|
|
634
|
-
return;
|
|
635
|
-
}
|
|
636
|
-
instance._styleHelper.overflow = value;
|
|
637
|
-
}
|
|
638
|
-
export function _getOverflow(instance) {
|
|
639
|
-
if (!instance._hasNativeView) {
|
|
640
|
-
return instance.style.flexGrow;
|
|
641
|
-
}
|
|
642
|
-
return instance._styleHelper.overflow;
|
|
643
|
-
}
|
|
644
|
-
export function _setOverflowX(value, instance) {
|
|
645
|
-
if (!instance._hasNativeView) {
|
|
646
|
-
return;
|
|
647
|
-
}
|
|
648
|
-
instance._styleHelper.overflowX = value;
|
|
649
|
-
}
|
|
650
|
-
export function _getOverflowX(instance) {
|
|
651
|
-
if (!instance._hasNativeView) {
|
|
652
|
-
return instance.style.overflowX;
|
|
653
|
-
}
|
|
654
|
-
return instance._styleHelper.overflowX;
|
|
655
|
-
}
|
|
656
|
-
export function _setOverflowY(value, instance, initial = false) {
|
|
657
|
-
if (!instance._hasNativeView) {
|
|
658
|
-
return;
|
|
659
|
-
}
|
|
660
|
-
instance._styleHelper.overflowY = value;
|
|
661
|
-
}
|
|
662
|
-
export function _getOverflowY(instance) {
|
|
663
|
-
if (!instance._hasNativeView) {
|
|
664
|
-
return instance.style.overflowY;
|
|
665
|
-
}
|
|
666
|
-
return instance._styleHelper.overflowY;
|
|
667
|
-
}
|
|
668
|
-
export function _setScrollbarWidth(value, instance, initial = false) {
|
|
669
|
-
if (!instance._hasNativeView) {
|
|
670
|
-
return;
|
|
671
|
-
}
|
|
672
|
-
instance._styleHelper.scrollBarWidth = value;
|
|
673
|
-
}
|
|
674
|
-
export function getScrollbarWidth(instance) {
|
|
675
|
-
if (!instance._hasNativeView) {
|
|
676
|
-
return instance.style.scrollBarWidth;
|
|
677
|
-
}
|
|
678
|
-
return instance._styleHelper.scrollBarWidth;
|
|
679
|
-
}
|
|
680
|
-
export function _setFlexGrow(value, instance, initial = false) {
|
|
681
|
-
if (!instance._hasNativeView) {
|
|
682
|
-
return;
|
|
683
|
-
}
|
|
684
|
-
instance._styleHelper.flexGrow = value;
|
|
685
|
-
}
|
|
686
|
-
export function _getFlexGrow(instance) {
|
|
687
|
-
if (!instance._hasNativeView) {
|
|
688
|
-
return instance.style.flexGrow;
|
|
689
|
-
}
|
|
690
|
-
return instance._styleHelper.flexGrow;
|
|
691
|
-
}
|
|
692
|
-
export function _setFlexShrink(value, instance, initial = false) {
|
|
693
|
-
if (!instance._hasNativeView) {
|
|
694
|
-
return;
|
|
695
|
-
}
|
|
696
|
-
instance._styleHelper.flexShrink = value;
|
|
697
|
-
}
|
|
698
|
-
export function _getFlexShrink(instance) {
|
|
699
|
-
if (!instance._hasNativeView) {
|
|
700
|
-
return instance.style.flexShrink;
|
|
701
|
-
}
|
|
702
|
-
return instance._styleHelper.flexShrink;
|
|
703
|
-
}
|
|
704
|
-
export function _setAspectRatio(value, instance, initial = false) {
|
|
705
|
-
if (!instance._hasNativeView) {
|
|
706
|
-
return;
|
|
707
|
-
}
|
|
708
|
-
instance._styleHelper.aspectRatio = value ? value : Number.NaN;
|
|
709
|
-
}
|
|
710
|
-
export function _getAspectRatio(instance) {
|
|
711
|
-
if (!instance._hasNativeView) {
|
|
712
|
-
return instance.style.aspectRatio;
|
|
713
|
-
}
|
|
714
|
-
const ratio = instance._styleHelper.aspectRatio;
|
|
715
|
-
return Number.isNaN(ratio) ? null : ratio;
|
|
716
|
-
}
|
|
717
|
-
function _parseGridLine(value) {
|
|
718
|
-
let parsedValue = undefined;
|
|
719
|
-
let parsedType = undefined;
|
|
720
|
-
let nativeValue = undefined;
|
|
721
|
-
if (value === 'auto' || value === undefined) {
|
|
722
|
-
parsedValue = 0;
|
|
723
|
-
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
724
|
-
}
|
|
725
|
-
if (typeof value === 'string') {
|
|
726
|
-
if (value.startsWith('span')) {
|
|
727
|
-
parsedValue = Number(value.replace('span', '').trim());
|
|
728
|
-
parsedType = 2 /* GridPlacementCompatType.Span */;
|
|
729
|
-
}
|
|
730
|
-
else {
|
|
731
|
-
parsedValue = Number(value.trim());
|
|
732
|
-
if (parsedValue < 1) {
|
|
733
|
-
parsedValue = 0;
|
|
734
|
-
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
735
|
-
}
|
|
736
|
-
else {
|
|
737
|
-
parsedType = 1 /* GridPlacementCompatType.Line */;
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
if (typeof value === 'number') {
|
|
742
|
-
parsedValue = value;
|
|
743
|
-
if (parsedValue < 1) {
|
|
744
|
-
parsedValue = 0;
|
|
745
|
-
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
746
|
-
}
|
|
747
|
-
else {
|
|
748
|
-
parsedType = 1 /* GridPlacementCompatType.Line */;
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
if (parsedType === 0) {
|
|
752
|
-
if (__ANDROID__) {
|
|
753
|
-
parsedType = org.nativescript.mason.masonkit.GridPlacement.Auto;
|
|
754
|
-
nativeValue = org.nativescript.mason.masonkit.GridPlacement.Auto.INSTANCE;
|
|
755
|
-
}
|
|
756
|
-
if (__APPLE__) {
|
|
757
|
-
parsedType = 0 /* GridPlacementCompatType.Auto */;
|
|
758
|
-
nativeValue = GridPlacementCompat.Auto;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
else if (parsedType === 1) {
|
|
762
|
-
const isValid = !Number.isNaN(parsedValue);
|
|
763
|
-
if (__ANDROID__) {
|
|
764
|
-
parsedType = org.nativescript.mason.masonkit.GridPlacement.Line;
|
|
765
|
-
if (isValid) {
|
|
766
|
-
nativeValue = new org.nativescript.mason.masonkit.GridPlacement.Line(parsedValue);
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
if (__APPLE__) {
|
|
770
|
-
parsedType = 1 /* GridPlacementCompatType.Line */;
|
|
771
|
-
if (isValid) {
|
|
772
|
-
nativeValue = GridPlacementCompat.alloc().initWithLine(parsedValue);
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
else {
|
|
777
|
-
const isValid = !Number.isNaN(parsedValue);
|
|
778
|
-
if (__ANDROID__) {
|
|
779
|
-
parsedType = org.nativescript.mason.masonkit.GridPlacement.Span;
|
|
780
|
-
if (isValid) {
|
|
781
|
-
nativeValue = new org.nativescript.mason.masonkit.GridPlacement.Span(parsedValue);
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
if (__APPLE__) {
|
|
785
|
-
parsedType = 2 /* GridPlacementCompatType.Span */;
|
|
786
|
-
if (isValid) {
|
|
787
|
-
nativeValue = GridPlacementCompat.alloc().initWithSpan(parsedValue);
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
return { value: Number.isNaN(parsedValue) ? undefined : parsedValue, type: parsedType, native_value: nativeValue };
|
|
792
|
-
}
|
|
793
|
-
export function _setGridColumnStart(value, instance, initial = false) {
|
|
794
|
-
if (!instance._hasNativeView) {
|
|
795
|
-
return;
|
|
796
|
-
}
|
|
797
|
-
const val = _parseGridLine(value);
|
|
798
|
-
if (val.value === undefined || val.type === undefined) {
|
|
799
|
-
return;
|
|
800
|
-
}
|
|
801
|
-
if (__ANDROID__) {
|
|
802
|
-
const nodeOrView = getMasonInstance(instance);
|
|
803
|
-
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setGridColumnStart(nodeOrView, val.native_value);
|
|
804
|
-
}
|
|
805
|
-
if (__APPLE__) {
|
|
806
|
-
instance.ios.gridColumnStartCompat = val.native_value;
|
|
807
|
-
}
|
|
808
|
-
}
|
|
809
|
-
export function _setGridColumnEnd(value, instance, initial = false) {
|
|
810
|
-
if (!instance._hasNativeView) {
|
|
811
|
-
return;
|
|
812
|
-
}
|
|
813
|
-
const val = _parseGridLine(value);
|
|
814
|
-
if (val.value === undefined || val.type === undefined) {
|
|
815
|
-
return;
|
|
816
|
-
}
|
|
817
|
-
if (__ANDROID__) {
|
|
818
|
-
const nodeOrView = getMasonInstance(instance);
|
|
819
|
-
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setGridColumnEnd(nodeOrView, val.native_value);
|
|
820
|
-
}
|
|
821
|
-
if (__APPLE__) {
|
|
822
|
-
instance.ios.gridColumnEndCompat = val.native_value;
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
export function _setGridRowStart(value, instance, initial = false) {
|
|
826
|
-
if (!instance._hasNativeView) {
|
|
827
|
-
return;
|
|
828
|
-
}
|
|
829
|
-
const val = _parseGridLine(value);
|
|
830
|
-
if (val.value === undefined || val.type === undefined) {
|
|
831
|
-
return;
|
|
832
|
-
}
|
|
833
|
-
if (__ANDROID__) {
|
|
834
|
-
const nodeOrView = getMasonInstance(instance);
|
|
835
|
-
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setGridRowStart(nodeOrView, val.native_value);
|
|
836
|
-
}
|
|
837
|
-
if (__APPLE__) {
|
|
838
|
-
instance.ios.gridRowStartCompat = val.native_value;
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
export function _setGridRowEnd(value, instance, initial = false) {
|
|
842
|
-
if (!instance._hasNativeView) {
|
|
843
|
-
return;
|
|
844
|
-
}
|
|
845
|
-
const val = _parseGridLine(value);
|
|
846
|
-
if (val.value === undefined || val.type === undefined) {
|
|
847
|
-
return;
|
|
848
|
-
}
|
|
849
|
-
if (__ANDROID__) {
|
|
850
|
-
const nodeOrView = getMasonInstance(instance);
|
|
851
|
-
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setGridRowEnd(nodeOrView, val.native_value);
|
|
852
|
-
}
|
|
853
|
-
if (__APPLE__) {
|
|
854
|
-
instance.ios.gridRowEndCompat = val.native_value;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
export function _setRowGap(value, instance, initial = false) {
|
|
858
|
-
if (!instance._hasNativeView) {
|
|
859
|
-
return;
|
|
860
|
-
}
|
|
861
|
-
instance._styleHelper.rowGap = value;
|
|
862
|
-
}
|
|
863
|
-
export function _getRowGap(instance) {
|
|
864
|
-
if (!instance._hasNativeView) {
|
|
865
|
-
return instance.style.rowGap;
|
|
866
|
-
}
|
|
867
|
-
return instance._styleHelper.rowGap;
|
|
868
|
-
}
|
|
869
|
-
export function _setColumnGap(value, instance, initial = false) {
|
|
870
|
-
if (!instance._hasNativeView) {
|
|
871
|
-
return;
|
|
872
|
-
}
|
|
873
|
-
instance._styleHelper.columnGap = value;
|
|
874
|
-
}
|
|
875
|
-
export function _getColumnGap(instance) {
|
|
876
|
-
if (!instance._hasNativeView) {
|
|
877
|
-
return instance.style.gap;
|
|
878
|
-
}
|
|
879
|
-
return instance._styleHelper.columnGap;
|
|
880
|
-
}
|
|
881
|
-
const Auto = 'auto';
|
|
882
|
-
const None = 'none';
|
|
883
|
-
const MinContent = 'min-content';
|
|
884
|
-
const MaxContent = 'max-content';
|
|
885
|
-
export function _parseMinMaxValue(value) {
|
|
886
|
-
if (typeof value === 'string') {
|
|
887
|
-
if (value === Auto || value === None) {
|
|
888
|
-
return {
|
|
889
|
-
min_type: 0 /* MinSizingType.Auto */,
|
|
890
|
-
min_value: 0,
|
|
891
|
-
max_type: 0 /* MaxSizingType.Auto */,
|
|
892
|
-
max_value: 0,
|
|
893
|
-
};
|
|
894
|
-
}
|
|
895
|
-
else if (value === MinContent) {
|
|
896
|
-
return {
|
|
897
|
-
min_type: 1 /* MinSizingType.MinContent */,
|
|
898
|
-
min_value: 0,
|
|
899
|
-
max_type: 1 /* MaxSizingType.MinContent */,
|
|
900
|
-
max_value: 0,
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
else if (value === MaxContent) {
|
|
904
|
-
return {
|
|
905
|
-
min_type: 2 /* MinSizingType.MaxContent */,
|
|
906
|
-
min_value: 0,
|
|
907
|
-
max_type: 2 /* MaxSizingType.MaxContent */,
|
|
908
|
-
max_value: 0,
|
|
909
|
-
};
|
|
910
|
-
}
|
|
911
|
-
else if (value.indexOf('fr') > -1) {
|
|
912
|
-
const flex = parseInt(value.replace('fr', '').trim());
|
|
913
|
-
return {
|
|
914
|
-
min_type: 0 /* MinSizingType.Auto */,
|
|
915
|
-
min_value: 0,
|
|
916
|
-
max_type: 5 /* MaxSizingType.Fraction */,
|
|
917
|
-
max_value: flex,
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
else if (value.startsWith('minmax')) {
|
|
921
|
-
// todo
|
|
922
|
-
const minMax = parseInt(value.replace('minmax(', '').replace(')', '').trim());
|
|
923
|
-
}
|
|
924
|
-
else if (value.startsWith('fit-content')) {
|
|
925
|
-
const fitContent = value.replace('fit-content(', '').replace(')', '').trim();
|
|
926
|
-
if (fitContent.indexOf('px') > -1) {
|
|
927
|
-
const px = parseInt(fitContent.replace('px', ''));
|
|
928
|
-
return {
|
|
929
|
-
min_type: 0 /* MinSizingType.Auto */,
|
|
930
|
-
min_value: px,
|
|
931
|
-
max_type: 6 /* MaxSizingType.FitContent */,
|
|
932
|
-
max_value: px,
|
|
933
|
-
};
|
|
934
|
-
}
|
|
935
|
-
if (fitContent.indexOf('px') > -1) {
|
|
936
|
-
const dip = Utils.layout.toDevicePixels(parseInt(fitContent.replace('dip', '')));
|
|
937
|
-
return {
|
|
938
|
-
min_type: 0 /* MinSizingType.Auto */,
|
|
939
|
-
min_value: dip,
|
|
940
|
-
max_type: 6 /* MaxSizingType.FitContent */,
|
|
941
|
-
max_value: dip,
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
|
-
if (fitContent.indexOf('%') > -1) {
|
|
945
|
-
const percent = parseFloat(fitContent.replace('%', ''));
|
|
946
|
-
return {
|
|
947
|
-
min_type: 0 /* MinSizingType.Auto */,
|
|
948
|
-
min_value: percent,
|
|
949
|
-
max_type: 7 /* MaxSizingType.FitContentPercent */,
|
|
950
|
-
max_value: percent,
|
|
951
|
-
};
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
else if (value.indexOf('px') > -1) {
|
|
955
|
-
const px = parseInt(value.replace('px', ''));
|
|
956
|
-
return {
|
|
957
|
-
min_type: 3 /* MinSizingType.Points */,
|
|
958
|
-
min_value: px,
|
|
959
|
-
max_type: 3 /* MaxSizingType.Points */,
|
|
960
|
-
max_value: px,
|
|
961
|
-
};
|
|
962
|
-
}
|
|
963
|
-
else if (value.indexOf('dip') > -1) {
|
|
964
|
-
const dip = Utils.layout.toDevicePixels(parseInt(value.replace('dip', '')));
|
|
965
|
-
return {
|
|
966
|
-
min_type: 3 /* MinSizingType.Points */,
|
|
967
|
-
min_value: dip,
|
|
968
|
-
max_type: 3 /* MaxSizingType.Points */,
|
|
969
|
-
max_value: dip,
|
|
970
|
-
};
|
|
971
|
-
}
|
|
972
|
-
else if (value.indexOf('%') > -1) {
|
|
973
|
-
const percent = parseFloat(value.replace('%', ''));
|
|
974
|
-
return {
|
|
975
|
-
min_type: 4 /* MinSizingType.Percent */,
|
|
976
|
-
min_value: percent,
|
|
977
|
-
max_type: 4 /* MaxSizingType.Percent */,
|
|
978
|
-
max_value: percent,
|
|
979
|
-
};
|
|
980
|
-
}
|
|
981
|
-
else {
|
|
982
|
-
const dip = Utils.layout.toDevicePixels(Number(value));
|
|
983
|
-
return {
|
|
984
|
-
min_type: 3 /* MinSizingType.Points */,
|
|
985
|
-
min_value: dip,
|
|
986
|
-
max_type: 3 /* MaxSizingType.Points */,
|
|
987
|
-
max_value: dip,
|
|
988
|
-
};
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
if (typeof value === 'number') {
|
|
992
|
-
const dip = Utils.layout.toDevicePixels(value);
|
|
993
|
-
return {
|
|
994
|
-
min_type: 3 /* MinSizingType.Points */,
|
|
995
|
-
min_value: dip,
|
|
996
|
-
max_type: 3 /* MaxSizingType.Points */,
|
|
997
|
-
max_value: dip,
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
return undefined;
|
|
1001
|
-
}
|
|
1002
|
-
const grid_templates_regex = /[^\s()]+(?:\([^\s()]+(?:\([^()]+\))?(?:, *[^\s()]+(?:\([^()]+\))?)*\))?/g;
|
|
1003
|
-
export function _parseGridTemplates(value) {
|
|
1004
|
-
const array = [];
|
|
1005
|
-
if (typeof value === 'string') {
|
|
1006
|
-
const values = Array.from(value.matchAll(grid_templates_regex), (m) => m[0]);
|
|
1007
|
-
values.forEach((item) => {
|
|
1008
|
-
if (item.startsWith('repeat(')) {
|
|
1009
|
-
const repeatValue = item.replace('repeat(', '').replace(')', '');
|
|
1010
|
-
const trackEnd = repeatValue.indexOf(',');
|
|
1011
|
-
const repetition = repeatValue.substring(0, trackEnd);
|
|
1012
|
-
const tracks = repeatValue
|
|
1013
|
-
.substring(trackEnd + 1)
|
|
1014
|
-
.split(' ')
|
|
1015
|
-
.filter((a) => {
|
|
1016
|
-
return a.length || a.trim() === ',';
|
|
1017
|
-
});
|
|
1018
|
-
let isValid = true;
|
|
1019
|
-
let repeating_type = 0;
|
|
1020
|
-
let repeat_count = 0;
|
|
1021
|
-
switch (repetition) {
|
|
1022
|
-
case 'repeat-fill':
|
|
1023
|
-
repeating_type = 0 /* TSCGridTrackRepetition.AutoFill */;
|
|
1024
|
-
break;
|
|
1025
|
-
case 'repeat-fit':
|
|
1026
|
-
repeating_type = 1 /* TSCGridTrackRepetition.AutoFit */;
|
|
1027
|
-
break;
|
|
1028
|
-
default:
|
|
1029
|
-
{
|
|
1030
|
-
const number = parseInt(repetition);
|
|
1031
|
-
repeating_type = 2 /* TSCGridTrackRepetition.Count */;
|
|
1032
|
-
isValid = !Number.isNaN(number);
|
|
1033
|
-
if (isValid) {
|
|
1034
|
-
repeat_count = number;
|
|
1035
|
-
}
|
|
1036
|
-
}
|
|
1037
|
-
break;
|
|
1038
|
-
}
|
|
1039
|
-
if (isValid) {
|
|
1040
|
-
const tracks_array = [];
|
|
1041
|
-
tracks.forEach((track) => {
|
|
1042
|
-
const minMax = _parseMinMaxValue(track.trim());
|
|
1043
|
-
tracks_array.push(minMax);
|
|
1044
|
-
});
|
|
1045
|
-
array.push({
|
|
1046
|
-
is_repeating: true,
|
|
1047
|
-
repeating_type,
|
|
1048
|
-
repeating_count: repeat_count,
|
|
1049
|
-
value: tracks_array,
|
|
1050
|
-
});
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
else {
|
|
1054
|
-
const value = _parseMinMaxValue(item);
|
|
1055
|
-
array.push({
|
|
1056
|
-
is_repeating: false,
|
|
1057
|
-
repeating_type: 0,
|
|
1058
|
-
value,
|
|
1059
|
-
});
|
|
1060
|
-
}
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
return array;
|
|
1064
|
-
}
|
|
1065
|
-
export function _setGridTemplateRows(value, instance, initial = false) {
|
|
1066
|
-
if (!instance._hasNativeView) {
|
|
1067
|
-
return;
|
|
1068
|
-
}
|
|
1069
|
-
if (__ANDROID__) {
|
|
1070
|
-
const array = Array.create('org.nativescript.mason.masonkit.TrackSizingFunction', value.length);
|
|
1071
|
-
const length = value.length;
|
|
1072
|
-
for (let i = 0; i < length; i++) {
|
|
1073
|
-
const item = value[i];
|
|
1074
|
-
if (item.is_repeating) {
|
|
1075
|
-
const repeating = item.value;
|
|
1076
|
-
const tracks = Array.create('org.nativescript.mason.masonkit.MinMax', repeating.length);
|
|
1077
|
-
let gridTrackRepetition = null;
|
|
1078
|
-
switch (item.repeating_type) {
|
|
1079
|
-
case 0 /* TSCGridTrackRepetition.AutoFill */:
|
|
1080
|
-
gridTrackRepetition = org.nativescript.mason.masonkit.GridTrackRepetition.AutoFill;
|
|
1081
|
-
break;
|
|
1082
|
-
case 1 /* TSCGridTrackRepetition.AutoFit */:
|
|
1083
|
-
gridTrackRepetition = org.nativescript.mason.masonkit.GridTrackRepetition.AutoFit;
|
|
1084
|
-
break;
|
|
1085
|
-
case 2 /* TSCGridTrackRepetition.Count */:
|
|
1086
|
-
gridTrackRepetition = new org.nativescript.mason.masonkit.GridTrackRepetition.Count(item.repeating_count);
|
|
1087
|
-
break;
|
|
1088
|
-
}
|
|
1089
|
-
if (gridTrackRepetition === null) {
|
|
1090
|
-
continue;
|
|
1091
|
-
}
|
|
1092
|
-
const repeatingLength = repeating.length;
|
|
1093
|
-
for (let j = 0; j < repeatingLength; j++) {
|
|
1094
|
-
const repeat = repeating[j];
|
|
1095
|
-
tracks[j] = org.nativescript.mason.masonkit.MinMax.fromTypeValue(repeat.min_type, repeat.min_value, repeat.max_type, repeat.max_value);
|
|
1096
|
-
}
|
|
1097
|
-
const repeat = new org.nativescript.mason.masonkit.TrackSizingFunction.AutoRepeat(gridTrackRepetition, tracks);
|
|
1098
|
-
array[i] = repeat;
|
|
1099
|
-
}
|
|
1100
|
-
else {
|
|
1101
|
-
const single = item.value;
|
|
1102
|
-
const trackSizingFunction = new org.nativescript.mason.masonkit.TrackSizingFunction.Single(org.nativescript.mason.masonkit.MinMax.fromTypeValue(single.min_type, single.min_value, single.max_type, single.max_value));
|
|
1103
|
-
array[i] = trackSizingFunction;
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
const nodeOrView = getMasonInstance(instance);
|
|
1107
|
-
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setGridTemplateRows(nodeOrView, array);
|
|
1108
|
-
}
|
|
1109
|
-
if (__APPLE__) {
|
|
1110
|
-
const length = value.length;
|
|
1111
|
-
const array = NSMutableArray.arrayWithCapacity(length);
|
|
1112
|
-
for (let i = 0; i < length; i++) {
|
|
1113
|
-
const item = value[i];
|
|
1114
|
-
if (item.is_repeating) {
|
|
1115
|
-
const repeating = item.value;
|
|
1116
|
-
const repeatingLength = repeating.length;
|
|
1117
|
-
const tracks = NSMutableArray.arrayWithCapacity(repeatingLength);
|
|
1118
|
-
let gridTrackRepetition = null;
|
|
1119
|
-
switch (item.repeating_type) {
|
|
1120
|
-
case 0 /* TSCGridTrackRepetition.AutoFill */:
|
|
1121
|
-
gridTrackRepetition = 0 /* TSCGridTrackRepetition.AutoFill */;
|
|
1122
|
-
break;
|
|
1123
|
-
case 1 /* TSCGridTrackRepetition.AutoFit */:
|
|
1124
|
-
gridTrackRepetition = 1 /* TSCGridTrackRepetition.AutoFit */;
|
|
1125
|
-
break;
|
|
1126
|
-
case 2 /* TSCGridTrackRepetition.Count */:
|
|
1127
|
-
gridTrackRepetition = GridTrackRepetition.Count(item.repeating_count);
|
|
1128
|
-
break;
|
|
1129
|
-
}
|
|
1130
|
-
if (gridTrackRepetition === null) {
|
|
1131
|
-
continue;
|
|
1132
|
-
}
|
|
1133
|
-
for (let j = 0; j < repeatingLength; j++) {
|
|
1134
|
-
const repeat = repeating[j];
|
|
1135
|
-
tracks.addObject(MinMax.fromTypeValue(repeat.min_type, repeat.min_value, repeat.max_type, repeat.max_value));
|
|
1136
|
-
}
|
|
1137
|
-
const repeat = TrackSizingFunction.AutoRepeat(gridTrackRepetition, tracks);
|
|
1138
|
-
array.addObject(repeat);
|
|
1139
|
-
}
|
|
1140
|
-
else {
|
|
1141
|
-
const single = item.value;
|
|
1142
|
-
const trackSizingFunction = TrackSizingFunction.Single(MinMax.fromTypeValue(single.min_type, single.min_value, single.max_type, single.max_value));
|
|
1143
|
-
array.addObject(trackSizingFunction);
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
instance.ios.gridTemplateRows = array;
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
export function _setGridTemplateColumns(value, instance, initial = false) {
|
|
1150
|
-
if (!instance._hasNativeView) {
|
|
1151
|
-
return;
|
|
1152
|
-
}
|
|
1153
|
-
if (__ANDROID__) {
|
|
1154
|
-
const array = Array.create('org.nativescript.mason.masonkit.TrackSizingFunction', value.length);
|
|
1155
|
-
const length = value.length;
|
|
1156
|
-
for (let i = 0; i < length; i++) {
|
|
1157
|
-
const item = value[i];
|
|
1158
|
-
if (item.is_repeating) {
|
|
1159
|
-
const repeating = item.value;
|
|
1160
|
-
const tracks = Array.create('org.nativescript.mason.masonkit.MinMax', repeating.length);
|
|
1161
|
-
let gridTrackRepetition = null;
|
|
1162
|
-
switch (item.repeating_type) {
|
|
1163
|
-
case 0 /* TSCGridTrackRepetition.AutoFill */:
|
|
1164
|
-
gridTrackRepetition = org.nativescript.mason.masonkit.GridTrackRepetition.AutoFill.INSTANCE;
|
|
1165
|
-
break;
|
|
1166
|
-
case 1 /* TSCGridTrackRepetition.AutoFit */:
|
|
1167
|
-
gridTrackRepetition = org.nativescript.mason.masonkit.GridTrackRepetition.AutoFit.INSTANCE;
|
|
1168
|
-
break;
|
|
1169
|
-
case 2 /* TSCGridTrackRepetition.Count */:
|
|
1170
|
-
gridTrackRepetition = new org.nativescript.mason.masonkit.GridTrackRepetition.Count(item.repeating_count);
|
|
1171
|
-
break;
|
|
1172
|
-
}
|
|
1173
|
-
if (gridTrackRepetition === null) {
|
|
1174
|
-
continue;
|
|
1175
|
-
}
|
|
1176
|
-
const repeatingLength = repeating.length;
|
|
1177
|
-
for (let j = 0; j < repeatingLength; j++) {
|
|
1178
|
-
const repeat = repeating[j];
|
|
1179
|
-
tracks[j] = org.nativescript.mason.masonkit.MinMax.fromTypeValue(repeat.min_type, repeat.min_value, repeat.max_type, repeat.max_value);
|
|
1180
|
-
}
|
|
1181
|
-
const repeat = new org.nativescript.mason.masonkit.TrackSizingFunction.AutoRepeat(gridTrackRepetition, tracks);
|
|
1182
|
-
array[i] = repeat;
|
|
1183
|
-
}
|
|
1184
|
-
else {
|
|
1185
|
-
const single = item.value;
|
|
1186
|
-
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;
|
|
1187
|
-
const trackSizingFunction = new org.nativescript.mason.masonkit.TrackSizingFunction.Single(minMax);
|
|
1188
|
-
array[i] = trackSizingFunction;
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
const nodeOrView = getMasonInstance(instance);
|
|
1192
|
-
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setGridTemplateColumns(nodeOrView, array);
|
|
1193
|
-
}
|
|
1194
|
-
if (__APPLE__) {
|
|
1195
|
-
const length = value.length;
|
|
1196
|
-
const array = NSMutableArray.new();
|
|
1197
|
-
for (let i = 0; i < length; i++) {
|
|
1198
|
-
const item = value[i];
|
|
1199
|
-
if (item.is_repeating) {
|
|
1200
|
-
const repeating = item.value;
|
|
1201
|
-
const repeatingLength = repeating.length;
|
|
1202
|
-
const tracks = NSMutableArray.arrayWithCapacity(repeatingLength);
|
|
1203
|
-
let gridTrackRepetition = null;
|
|
1204
|
-
switch (item.repeating_type) {
|
|
1205
|
-
case 0 /* TSCGridTrackRepetition.AutoFill */:
|
|
1206
|
-
gridTrackRepetition = 0 /* TSCGridTrackRepetition.AutoFill */;
|
|
1207
|
-
break;
|
|
1208
|
-
case 1 /* TSCGridTrackRepetition.AutoFit */:
|
|
1209
|
-
gridTrackRepetition = 1 /* TSCGridTrackRepetition.AutoFit */;
|
|
1210
|
-
break;
|
|
1211
|
-
case 2 /* TSCGridTrackRepetition.Count */:
|
|
1212
|
-
gridTrackRepetition = GridTrackRepetition.Count(item.repeating_count);
|
|
1213
|
-
break;
|
|
1214
|
-
}
|
|
1215
|
-
if (gridTrackRepetition === null) {
|
|
1216
|
-
continue;
|
|
1217
|
-
}
|
|
1218
|
-
for (let j = 0; j < repeatingLength; j++) {
|
|
1219
|
-
const repeat = repeating[j];
|
|
1220
|
-
tracks.addObject(MinMax.fromTypeValue(repeat.min_type, repeat.min_value, repeat.max_type, repeat.max_value));
|
|
1221
|
-
}
|
|
1222
|
-
const repeat = TrackSizingFunction.AutoRepeat(gridTrackRepetition, tracks);
|
|
1223
|
-
array.addObject(repeat);
|
|
1224
|
-
}
|
|
1225
|
-
else {
|
|
1226
|
-
const single = item.value;
|
|
1227
|
-
const trackSizingFunction = TrackSizingFunction.Single(MinMax.fromTypeValue(single.min_type, single.min_value, single.max_type, single.max_value));
|
|
1228
|
-
array.addObject(trackSizingFunction);
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
instance.ios.gridTemplateColumns = array;
|
|
1232
|
-
console.log('gridTemplateColumns', instance.ios.gridTemplateColumns);
|
|
1233
|
-
console.log('gridTemplateColumns', instance.ios.gridTemplateColumns.count);
|
|
1234
|
-
console.log(instance.ios.style);
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
export function _parseGridAutoRowsColumns(value) {
|
|
1238
|
-
const array = [];
|
|
1239
|
-
if (typeof value === 'string') {
|
|
1240
|
-
const values = value.split(' ');
|
|
1241
|
-
values.forEach((item) => {
|
|
1242
|
-
const value = _parseMinMaxValue(item);
|
|
1243
|
-
array.push({
|
|
1244
|
-
is_repeating: false,
|
|
1245
|
-
repeating_type: 0,
|
|
1246
|
-
value,
|
|
1247
|
-
});
|
|
1248
|
-
});
|
|
1249
|
-
}
|
|
1250
|
-
return array;
|
|
1251
|
-
}
|
|
1252
|
-
export function _setGridAutoFlow(value, instance) {
|
|
1253
|
-
if (!instance._hasNativeView) {
|
|
1254
|
-
return;
|
|
1255
|
-
}
|
|
1256
|
-
instance.ios.gridAutoFlow = value;
|
|
1257
|
-
}
|
|
1258
|
-
export function _getGridAutoFlow(instance) {
|
|
1259
|
-
if (!instance._hasNativeView) {
|
|
1260
|
-
return;
|
|
1261
|
-
}
|
|
1262
|
-
return this._styleHelper.gridAutoFlow;
|
|
1263
|
-
}
|
|
1264
|
-
export function _setGridAutoRows(value, instance, initial = false) {
|
|
1265
|
-
if (!instance._hasNativeView) {
|
|
1266
|
-
return;
|
|
1267
|
-
}
|
|
1268
|
-
const values = _parseGridAutoRowsColumns(value);
|
|
1269
|
-
if (__ANDROID__) {
|
|
1270
|
-
const array = Array.create('org.nativescript.mason.masonkit.MinMax', values.length);
|
|
1271
|
-
const length = value.length;
|
|
1272
|
-
for (let i = 0; i < length; i++) {
|
|
1273
|
-
const item = value[i];
|
|
1274
|
-
const minMax = org.nativescript.mason.masonkit.MinMax.fromTypeValue(item.min_type, item.min_value, item.max_type, item.max_value);
|
|
1275
|
-
array[i] = minMax;
|
|
1276
|
-
}
|
|
1277
|
-
const nodeOrView = getMasonInstance(instance);
|
|
1278
|
-
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setGridAutoRows(nodeOrView, array);
|
|
1279
|
-
}
|
|
1280
|
-
if (__APPLE__) {
|
|
1281
|
-
const length = value.length;
|
|
1282
|
-
const array = NSMutableArray.arrayWithCapacity(length);
|
|
1283
|
-
for (let i = 0; i < length; i++) {
|
|
1284
|
-
const item = value[i];
|
|
1285
|
-
const minMax = MinMax.fromTypeValue(item.min_type, item.min_value, item.max_type, item.max_value);
|
|
1286
|
-
array.addObject(minMax);
|
|
1287
|
-
}
|
|
1288
|
-
instance.ios.gridAutoRows = array;
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
export function _setGridAutoColumns(value, instance, initial = false) {
|
|
1292
|
-
if (!instance._hasNativeView) {
|
|
1293
|
-
return;
|
|
1294
|
-
}
|
|
1295
|
-
const values = _parseGridAutoRowsColumns(value);
|
|
1296
|
-
if (__ANDROID__) {
|
|
1297
|
-
const array = Array.create('org.nativescript.mason.masonkit.MinMax', values.length);
|
|
1298
|
-
const length = value.length;
|
|
1299
|
-
for (let i = 0; i < length; i++) {
|
|
1300
|
-
const item = value[i];
|
|
1301
|
-
const minMax = org.nativescript.mason.masonkit.MinMax.fromTypeValue(item.min_type, item.min_value, item.max_type, item.max_value);
|
|
1302
|
-
array[i] = minMax;
|
|
1303
|
-
}
|
|
1304
|
-
const nodeOrView = getMasonInstance(instance);
|
|
1305
|
-
org.nativescript.mason.masonkit.NodeHelper.INSTANCE.setGridAutoColumns(nodeOrView, array);
|
|
1306
|
-
}
|
|
1307
|
-
if (__APPLE__) {
|
|
1308
|
-
const length = value.length;
|
|
1309
|
-
const array = NSMutableArray.arrayWithCapacity(length);
|
|
1310
|
-
for (let i = 0; i < length; i++) {
|
|
1311
|
-
const item = value[i];
|
|
1312
|
-
const minMax = MinMax.fromTypeValue(item.min_type, item.min_value, item.max_type, item.max_value);
|
|
1313
|
-
array.addObject(minMax);
|
|
1314
|
-
}
|
|
1315
|
-
instance.ios.gridAutoColumns = array;
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
//# sourceMappingURL=helpers.js.map
|