@triniwiz/nativescript-masonkit 1.0.0-alpha.0 → 1.0.0-alpha.10
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 +57 -25
- package/common.js +490 -1081
- package/common.js.map +1 -1
- package/helpers.d.ts +116 -94
- package/helpers.js +474 -2538
- package/helpers.js.map +1 -1
- package/index.android.d.ts +28 -20
- package/index.android.js +107 -49
- package/index.android.js.map +1 -1
- package/index.d.ts +112 -18
- package/index.ios.d.ts +42 -21
- package/index.ios.js +313 -81
- package/index.ios.js.map +1 -1
- package/node.d.ts +2 -0
- package/node.js +3 -0
- package/node.js.map +1 -0
- package/package.json +3 -3
- package/platforms/android/include.gradle +18 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/Info.plist +4 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +345 -314
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason.h +11 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +215 -818
- 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 +23676 -16086
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +444 -308
- 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 +444 -308
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/module.modulemap +1 -1
- 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 +1937 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +690 -628
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason.h +11 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +215 -818
- 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 +23676 -16086
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +444 -308
- 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 +444 -308
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +23676 -16086
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +444 -308
- 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 +444 -308
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/module.modulemap +1 -1
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +33 -97
- 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 +1937 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +1888 -0
- package/platforms/ios/Podfile +1 -1
- package/platforms/ios/build.xcconfig +4 -1
- package/platforms/ios/prebuild.sh +101 -0
- 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/src → new_native_src/cpp}/include/mason_native.h +47 -20
- package/platforms/new_native_src/cpp/include/robin_hood.h +2544 -0
- package/src-native/pods/Headers/include/APIDesign.md +72 -0
- package/src-native/pods/Headers/include/DEPS +10 -0
- package/src-native/pods/Headers/include/DIR_METADATA +11 -0
- package/src-native/pods/Headers/include/OWNERS +23 -0
- package/src-native/pods/Headers/include/cppgc/DEPS +8 -0
- package/src-native/pods/Headers/include/cppgc/OWNERS +2 -0
- package/src-native/pods/Headers/include/cppgc/README.md +133 -0
- package/src-native/pods/Headers/include/cppgc/allocation.h +310 -0
- package/src-native/pods/Headers/include/cppgc/common.h +29 -0
- package/src-native/pods/Headers/include/cppgc/cross-thread-persistent.h +465 -0
- package/src-native/pods/Headers/include/cppgc/custom-space.h +97 -0
- package/src-native/pods/Headers/include/cppgc/default-platform.h +67 -0
- package/src-native/pods/Headers/include/cppgc/ephemeron-pair.h +30 -0
- package/src-native/pods/Headers/include/cppgc/explicit-management.h +100 -0
- package/src-native/pods/Headers/include/cppgc/garbage-collected.h +106 -0
- package/src-native/pods/Headers/include/cppgc/heap-consistency.h +266 -0
- package/src-native/pods/Headers/include/cppgc/heap-state.h +82 -0
- package/src-native/pods/Headers/include/cppgc/heap-statistics.h +120 -0
- package/src-native/pods/Headers/include/cppgc/heap.h +206 -0
- package/src-native/pods/Headers/include/cppgc/internal/api-constants.h +55 -0
- package/src-native/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +48 -0
- package/src-native/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +79 -0
- package/src-native/pods/Headers/include/cppgc/internal/compiler-specific.h +38 -0
- package/src-native/pods/Headers/include/cppgc/internal/finalizer-trait.h +93 -0
- package/src-native/pods/Headers/include/cppgc/internal/gc-info.h +156 -0
- package/src-native/pods/Headers/include/cppgc/internal/logging.h +50 -0
- package/src-native/pods/Headers/include/cppgc/internal/name-trait.h +122 -0
- package/src-native/pods/Headers/include/cppgc/internal/persistent-node.h +216 -0
- package/src-native/pods/Headers/include/cppgc/internal/pointer-policies.h +186 -0
- package/src-native/pods/Headers/include/cppgc/internal/write-barrier.h +435 -0
- package/src-native/pods/Headers/include/cppgc/liveness-broker.h +77 -0
- package/src-native/pods/Headers/include/cppgc/macros.h +26 -0
- package/src-native/pods/Headers/include/cppgc/member.h +291 -0
- package/src-native/pods/Headers/include/cppgc/name-provider.h +65 -0
- package/src-native/pods/Headers/include/cppgc/object-size-trait.h +58 -0
- package/src-native/pods/Headers/include/cppgc/persistent.h +370 -0
- package/src-native/pods/Headers/include/cppgc/platform.h +156 -0
- package/src-native/pods/Headers/include/cppgc/prefinalizer.h +75 -0
- package/src-native/pods/Headers/include/cppgc/process-heap-statistics.h +36 -0
- package/src-native/pods/Headers/include/cppgc/sentinel-pointer.h +32 -0
- package/src-native/pods/Headers/include/cppgc/source-location.h +92 -0
- package/src-native/pods/Headers/include/cppgc/testing.h +106 -0
- package/src-native/pods/Headers/include/cppgc/trace-trait.h +116 -0
- package/src-native/pods/Headers/include/cppgc/type-traits.h +240 -0
- package/src-native/pods/Headers/include/cppgc/visitor.h +379 -0
- package/src-native/pods/Headers/include/js_protocol-1.2.json +936 -0
- package/src-native/pods/Headers/include/js_protocol-1.3.json +1112 -0
- package/src-native/pods/Headers/include/js_protocol.pdl +1709 -0
- package/src-native/pods/Headers/include/libffi/arm64/ffi.h +524 -0
- package/src-native/pods/Headers/include/libffi/arm64/ffitarget.h +92 -0
- package/src-native/pods/Headers/include/libffi/x86_64/ffi.h +524 -0
- package/src-native/pods/Headers/include/libffi/x86_64/ffitarget.h +147 -0
- package/src-native/pods/Headers/include/libffi.h +12 -0
- package/src-native/pods/Headers/include/libplatform/DEPS +9 -0
- package/src-native/pods/Headers/include/libplatform/libplatform-export.h +29 -0
- package/src-native/pods/Headers/include/libplatform/libplatform.h +106 -0
- package/src-native/pods/Headers/include/libplatform/v8-tracing.h +333 -0
- package/src-native/pods/Headers/include/v8-array-buffer.h +433 -0
- package/src-native/pods/Headers/include/v8-callbacks.h +397 -0
- package/src-native/pods/Headers/include/v8-container.h +129 -0
- package/src-native/pods/Headers/include/v8-context.h +407 -0
- package/src-native/pods/Headers/include/v8-cppgc.h +215 -0
- package/src-native/pods/Headers/include/v8-data.h +80 -0
- package/src-native/pods/Headers/include/v8-date.h +43 -0
- package/src-native/pods/Headers/include/v8-debug.h +168 -0
- package/src-native/pods/Headers/include/v8-embedder-heap.h +218 -0
- package/src-native/pods/Headers/include/v8-embedder-state-scope.h +51 -0
- package/src-native/pods/Headers/include/v8-exception.h +217 -0
- package/src-native/pods/Headers/include/v8-extension.h +62 -0
- package/src-native/pods/Headers/include/v8-external.h +37 -0
- package/src-native/pods/Headers/include/v8-fast-api-calls.h +939 -0
- package/src-native/pods/Headers/include/v8-forward.h +81 -0
- package/src-native/pods/Headers/include/v8-function-callback.h +475 -0
- package/src-native/pods/Headers/include/v8-function.h +125 -0
- package/src-native/pods/Headers/include/v8-initialization.h +315 -0
- package/src-native/pods/Headers/include/v8-inspector-protocol.h +13 -0
- package/src-native/pods/Headers/include/v8-inspector.h +376 -0
- package/src-native/pods/Headers/include/v8-internal.h +661 -0
- package/src-native/pods/Headers/include/v8-isolate.h +1709 -0
- package/src-native/pods/Headers/include/v8-json.h +47 -0
- package/src-native/pods/Headers/include/v8-local-handle.h +455 -0
- package/src-native/pods/Headers/include/v8-locker.h +149 -0
- package/src-native/pods/Headers/include/v8-maybe.h +137 -0
- package/src-native/pods/Headers/include/v8-memory-span.h +43 -0
- package/src-native/pods/Headers/include/v8-message.h +216 -0
- package/src-native/pods/Headers/include/v8-metrics.h +255 -0
- package/src-native/pods/Headers/include/v8-microtask-queue.h +152 -0
- package/src-native/pods/Headers/include/v8-microtask.h +28 -0
- package/src-native/pods/Headers/include/v8-object.h +775 -0
- package/src-native/pods/Headers/include/v8-persistent-handle.h +590 -0
- package/src-native/pods/Headers/include/v8-platform.h +1092 -0
- package/src-native/pods/Headers/include/v8-primitive-object.h +118 -0
- package/src-native/pods/Headers/include/v8-primitive.h +866 -0
- package/src-native/pods/Headers/include/v8-profiler.h +1198 -0
- package/src-native/pods/Headers/include/v8-promise.h +174 -0
- package/src-native/pods/Headers/include/v8-proxy.h +50 -0
- package/src-native/pods/Headers/include/v8-regexp.h +105 -0
- package/src-native/pods/Headers/include/v8-script.h +748 -0
- package/src-native/pods/Headers/include/v8-snapshot.h +196 -0
- package/src-native/pods/Headers/include/v8-statistics.h +217 -0
- package/src-native/pods/Headers/include/v8-template.h +1079 -0
- package/src-native/pods/Headers/include/v8-traced-handle.h +420 -0
- package/src-native/pods/Headers/include/v8-typed-array.h +282 -0
- package/src-native/pods/Headers/include/v8-unwinder-state.h +31 -0
- package/src-native/pods/Headers/include/v8-unwinder.h +132 -0
- package/src-native/pods/Headers/include/v8-util.h +658 -0
- package/src-native/pods/Headers/include/v8-value-serializer-version.h +24 -0
- package/src-native/pods/Headers/include/v8-value-serializer.h +279 -0
- package/src-native/pods/Headers/include/v8-value.h +526 -0
- package/src-native/pods/Headers/include/v8-version-string.h +38 -0
- package/src-native/pods/Headers/include/v8-version.h +20 -0
- package/src-native/pods/Headers/include/v8-wasm-trap-handler-posix.h +31 -0
- package/src-native/pods/Headers/include/v8-wasm-trap-handler-win.h +28 -0
- package/src-native/pods/Headers/include/v8-wasm.h +257 -0
- package/src-native/pods/Headers/include/v8-weak-callback-info.h +86 -0
- package/src-native/pods/Headers/include/v8.h +88 -0
- package/src-native/pods/Headers/include/v8config.h +605 -0
- package/src-native/pods/Headers/inspector/InspectorServer.h +20 -0
- package/src-native/pods/Headers/inspector/JsV8InspectorClient.h +66 -0
- package/src-native/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +1123 -0
- package/src-native/pods/Headers/inspector/base64.h +9 -0
- package/src-native/pods/Headers/inspector/src/base/address-region.h +95 -0
- package/src-native/pods/Headers/inspector/src/base/atomic-utils.h +219 -0
- package/src-native/pods/Headers/inspector/src/base/atomicops.h +332 -0
- package/src-native/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +89 -0
- package/src-native/pods/Headers/inspector/src/base/base-export.h +31 -0
- package/src-native/pods/Headers/inspector/src/base/bits.h +343 -0
- package/src-native/pods/Headers/inspector/src/base/build_config.h +234 -0
- package/src-native/pods/Headers/inspector/src/base/compiler-specific.h +136 -0
- package/src-native/pods/Headers/inspector/src/base/export-template.h +163 -0
- package/src-native/pods/Headers/inspector/src/base/flags.h +130 -0
- package/src-native/pods/Headers/inspector/src/base/immediate-crash.h +162 -0
- package/src-native/pods/Headers/inspector/src/base/lazy-instance.h +258 -0
- package/src-native/pods/Headers/inspector/src/base/logging.h +417 -0
- package/src-native/pods/Headers/inspector/src/base/macros.h +423 -0
- package/src-native/pods/Headers/inspector/src/base/memory.h +89 -0
- package/src-native/pods/Headers/inspector/src/base/once.h +108 -0
- package/src-native/pods/Headers/inspector/src/base/optional.h +882 -0
- package/src-native/pods/Headers/inspector/src/base/platform/mutex.h +370 -0
- package/src-native/pods/Headers/inspector/src/base/platform/platform.h +476 -0
- package/src-native/pods/Headers/inspector/src/base/platform/semaphore.h +108 -0
- package/src-native/pods/Headers/inspector/src/base/platform/v8-time.h +513 -0
- package/src-native/pods/Headers/inspector/src/base/platform/wrappers.h +73 -0
- package/src-native/pods/Headers/inspector/src/base/safe_conversions.h +389 -0
- package/src-native/pods/Headers/inspector/src/base/safe_conversions_impl.h +822 -0
- package/src-native/pods/Headers/inspector/src/base/template-utils.h +113 -0
- package/src-native/pods/Headers/inspector/src/base/v8-fallthrough.h +21 -0
- package/src-native/pods/Headers/inspector/src/common/checks.h +38 -0
- package/src-native/pods/Headers/inspector/src/common/globals.h +1842 -0
- package/src-native/pods/Headers/inspector/src/debug/debug-interface.h +667 -0
- package/src-native/pods/Headers/inspector/src/debug/interface-types.h +175 -0
- package/src-native/pods/Headers/inspector/src/init/v8.h +52 -0
- package/src-native/pods/Headers/inspector/src/inspector/custom-preview.h +24 -0
- package/src-native/pods/Headers/inspector/src/inspector/injected-script.h +251 -0
- package/src-native/pods/Headers/inspector/src/inspector/inspected-context.h +79 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/CSS.h +2148 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Console.h +211 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/DOM.h +1008 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Debugger.h +892 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Forward.h +75 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +346 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Log.h +342 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Network.h +2528 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Overlay.h +281 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Page.h +1189 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Profiler.h +1001 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Protocol.h +617 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Runtime.h +1696 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Schema.h +146 -0
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Security.h +793 -0
- package/src-native/pods/Headers/inspector/src/inspector/remote-object-id.h +54 -0
- package/src-native/pods/Headers/inspector/src/inspector/search-util.h +26 -0
- package/src-native/pods/Headers/inspector/src/inspector/string-16.h +180 -0
- package/src-native/pods/Headers/inspector/src/inspector/string-util.h +128 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +48 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-console-message.h +147 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-console.h +173 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +62 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +248 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-id.h +44 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-script.h +123 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger.h +257 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +91 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +80 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +191 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +156 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +34 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +71 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +24 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +70 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +88 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +104 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-regex.h +38 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +157 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +38 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +164 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-string-conversions.h +17 -0
- package/src-native/pods/Headers/inspector/src/inspector/v8-value-utils.h +23 -0
- package/src-native/pods/Headers/inspector/src/inspector/value-mirror.h +87 -0
- package/src-native/pods/Headers/inspector/src/libplatform/default-platform.h +92 -0
- package/src-native/pods/Headers/inspector/src/logging/tracing-flags.h +50 -0
- package/src-native/pods/Headers/inspector/src/numbers/conversions.h +183 -0
- package/src-native/pods/Headers/inspector/src/tracing/trace-event.h +664 -0
- package/src-native/pods/Headers/inspector/src/utils/allocation.h +367 -0
- package/src-native/pods/Headers/inspector/src/utils/vector.h +324 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +305 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +314 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +62 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +6 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +58 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +47 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +80 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +52 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +26 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +104 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +39 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +406 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +32 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +158 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +99 -0
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +139 -0
- package/src-native/pods/Headers/inspector/utils.h +32 -0
- package/src-native/pods/Headers/inspector/v8-inspector-platform.h +44 -0
- package/src-native/pods/Headers/jsi/decorator.h +762 -0
- package/src-native/pods/Headers/jsi/instrumentation.h +117 -0
- package/src-native/pods/Headers/jsi/jsi-inl.h +322 -0
- package/src-native/pods/Headers/jsi/jsi.h +1387 -0
- package/src-native/pods/Headers/jsi/jsilib.h +59 -0
- package/src-native/pods/Headers/jsi/threadsafe.h +79 -0
- package/src-native/pods/Headers/runtime/ArgConverter.h +61 -0
- package/src-native/pods/Headers/runtime/ArrayAdapter.h +13 -0
- package/src-native/pods/Headers/runtime/Caches.h +98 -0
- package/src-native/pods/Headers/runtime/ClassBuilder.h +61 -0
- package/src-native/pods/Headers/runtime/Common.h +9 -0
- package/src-native/pods/Headers/runtime/ConcurrentMap.h +55 -0
- package/src-native/pods/Headers/runtime/ConcurrentQueue.h +28 -0
- package/src-native/pods/Headers/runtime/Console.h +27 -0
- package/src-native/pods/Headers/runtime/Constants.h +15 -0
- package/src-native/pods/Headers/runtime/DataWrapper.h +671 -0
- package/src-native/pods/Headers/runtime/DictionaryAdapter.h +13 -0
- package/src-native/pods/Headers/runtime/ExtVector.h +21 -0
- package/src-native/pods/Headers/runtime/FFICall.h +105 -0
- package/src-native/pods/Headers/runtime/FastEnumerationAdapter.h +13 -0
- package/src-native/pods/Headers/runtime/FunctionReference.h +18 -0
- package/src-native/pods/Headers/runtime/Helpers.h +84 -0
- package/src-native/pods/Headers/runtime/InlineFunctions.h +16 -0
- package/src-native/pods/Headers/runtime/Interop.h +202 -0
- package/src-native/pods/Headers/runtime/KnownUnknownClassPair.h +35 -0
- package/src-native/pods/Headers/runtime/Metadata.h +981 -0
- package/src-native/pods/Headers/runtime/MetadataBuilder.h +72 -0
- package/src-native/pods/Headers/runtime/MetadataInlines.h +157 -0
- package/src-native/pods/Headers/runtime/ModuleInternal.h +59 -0
- package/src-native/pods/Headers/runtime/NSDataAdapter.h +13 -0
- package/src-native/pods/Headers/runtime/NativeScriptException.h +27 -0
- package/src-native/pods/Headers/runtime/ObjectManager.h +31 -0
- package/src-native/pods/Headers/runtime/OneByteStringResource.h +21 -0
- package/src-native/pods/Headers/runtime/Pointer.h +26 -0
- package/src-native/pods/Headers/runtime/PromiseProxy.h +15 -0
- package/src-native/pods/Headers/runtime/Reference.h +38 -0
- package/src-native/pods/Headers/runtime/Runtime.h +67 -0
- package/src-native/pods/Headers/runtime/RuntimeConfig.h +17 -0
- package/src-native/pods/Headers/runtime/SetTimeout.h +34 -0
- package/src-native/pods/Headers/runtime/SimpleAllocator.h +23 -0
- package/src-native/pods/Headers/runtime/StringHasher.h +315 -0
- package/src-native/pods/Headers/runtime/SymbolIterator.h +18 -0
- package/src-native/pods/Headers/runtime/SymbolLoader.h +27 -0
- package/src-native/pods/Headers/runtime/TNSDerivedClass.h +8 -0
- package/src-native/pods/Headers/runtime/TSHelpers.h +15 -0
- package/src-native/pods/Headers/runtime/Tasks.h +19 -0
- package/src-native/pods/Headers/runtime/UnmanagedType.h +21 -0
- package/src-native/pods/Headers/runtime/WeakRef.h +15 -0
- package/src-native/pods/Headers/runtime/Worker.h +26 -0
- package/src-native/pods/Headers/runtime/robin_hood.h +2184 -0
- package/src-native/pods/Headers/v8runtime/HostProxy.h +71 -0
- package/src-native/pods/Headers/v8runtime/JSIV8ValueConverter.h +70 -0
- package/src-native/pods/Headers/v8runtime/V8PointerValue.h +44 -0
- package/src-native/pods/Headers/v8runtime/V8Runtime.h +215 -0
- package/src-native/pods/Headers/v8runtime/V8RuntimeConfig.h +26 -0
- package/src-native/pods/Headers/v8runtime/V8RuntimeFactory.h +21 -0
- package/src-native/pods/NativeScript.podspec +68 -0
- package/style.d.ts +166 -0
- package/style.js +1686 -0
- package/style.js.map +1 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/PrivateHeaders/mason_native.h +0 -676
- 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/platforms/ios/src/module.modulemap +0 -4
package/common.js
CHANGED
|
@@ -1,533 +1,195 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
else {
|
|
34
|
-
const oldImpl = derivedCtor.prototype[name];
|
|
35
|
-
if (!oldImpl) {
|
|
36
|
-
derivedCtor.prototype[name] = baseCtor.prototype[name];
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
derivedCtor.prototype[name] = function (...args) {
|
|
40
|
-
if (options) {
|
|
41
|
-
if (options.override) {
|
|
42
|
-
return baseCtor.prototype[name].apply(this, args);
|
|
43
|
-
}
|
|
44
|
-
else if (options.after) {
|
|
45
|
-
return baseCtor.prototype[name].apply(this, args);
|
|
46
|
-
}
|
|
47
|
-
else if (options.overrideIfExists) {
|
|
48
|
-
if (this[options.overrideIfExists]) {
|
|
49
|
-
return baseCtor.prototype[name].apply(this, args);
|
|
50
|
-
}
|
|
51
|
-
return oldImpl.apply(this, args);
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
baseCtor.prototype[name].apply(this, args);
|
|
55
|
-
return oldImpl.apply(this, args);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
baseCtor.prototype[name].apply(this, args);
|
|
60
|
-
return oldImpl.apply(this, args);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.getOwnPropertySymbols(baseCtor.prototype).forEach((symbol) => {
|
|
67
|
-
if (omits.indexOf(symbol) !== -1) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const oldImpl = derivedCtor.prototype[symbol];
|
|
71
|
-
if (!oldImpl) {
|
|
72
|
-
derivedCtor.prototype[symbol] = baseCtor.prototype[symbol];
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
derivedCtor.prototype[symbol] = function (...args) {
|
|
76
|
-
if (options) {
|
|
77
|
-
if (options.override) {
|
|
78
|
-
return baseCtor.prototype[symbol].apply(this, args);
|
|
79
|
-
}
|
|
80
|
-
if (options.overrideIfExists) {
|
|
81
|
-
if (this[options.overrideIfExists]) {
|
|
82
|
-
return baseCtor.prototype[symbol].apply(this, args);
|
|
83
|
-
}
|
|
84
|
-
return oldImpl.apply(this, args);
|
|
85
|
-
}
|
|
86
|
-
else if (options.after) {
|
|
87
|
-
oldImpl.apply(this, args);
|
|
88
|
-
return baseCtor.prototype[symbol].apply(this, args);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
baseCtor.prototype[symbol].apply(this, args);
|
|
92
|
-
return oldImpl.apply(this, args);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
baseCtor.prototype[symbol].apply(this, args);
|
|
97
|
-
return oldImpl.apply(this, args);
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
});
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
3
|
+
import { CSSType, CssProperty, CustomLayoutView, Length as NSLength, ShorthandProperty, Style, View as NSView, getViewById, unsetValue, Property, widthProperty, heightProperty, CoreTypes, Trace, Length as CoreLength, marginLeftProperty, marginRightProperty, marginTopProperty, marginBottomProperty, minWidthProperty, minHeightProperty } from '@nativescript/core';
|
|
4
|
+
import { _forceStyleUpdate, _parseGridTemplates, _setAlignContent, _setColumnGap, _setDisplay, _setFlexDirection, _setGridColumnEnd, _setGridColumnStart, _setGridRowEnd, _setGridRowStart, _setGridTemplateColumns, _setGridTemplateRows, _setHeight, _setJustifyContent, _setMarginBottom, _setMarginLeft, _setMarginRight, _setMarginTop, _setMinHeight, _setMinWidth, _setPaddingBottom, _setPaddingLeft, _setPaddingRight, _setPaddingTop, _setRowGap, _setWidth } from './helpers';
|
|
5
|
+
import { flexDirectionProperty, flexGrowProperty, flexWrapProperty } from '@nativescript/core/ui/layouts/flexbox-layout';
|
|
6
|
+
export const native_ = Symbol('[[native]]');
|
|
7
|
+
export const style_ = Symbol('[[style]]');
|
|
8
|
+
export const scrollBarWidthProperty = new CssProperty({
|
|
9
|
+
name: 'scrollBarWidth',
|
|
10
|
+
cssName: 'scroll-bar-width',
|
|
11
|
+
defaultValue: 0,
|
|
12
|
+
valueConverter: parseFloat,
|
|
13
|
+
});
|
|
14
|
+
function overflowConverter(value) {
|
|
15
|
+
if (typeof value === 'number') {
|
|
16
|
+
switch (value) {
|
|
17
|
+
case 0:
|
|
18
|
+
return 'visible';
|
|
19
|
+
case 1:
|
|
20
|
+
return 'hidden';
|
|
21
|
+
case 2:
|
|
22
|
+
return 'scroll';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
switch (value) {
|
|
26
|
+
case 'visible':
|
|
27
|
+
case 'hidden':
|
|
28
|
+
case 'scroll':
|
|
29
|
+
return value;
|
|
30
|
+
default:
|
|
31
|
+
return 'visible';
|
|
32
|
+
}
|
|
103
33
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return this.
|
|
128
|
-
}
|
|
129
|
-
set gap(value) {
|
|
130
|
-
this.style.gap = value;
|
|
131
|
-
}
|
|
132
|
-
get gap() {
|
|
133
|
-
return this.style.gap;
|
|
134
|
-
}
|
|
135
|
-
set gridArea(value) {
|
|
136
|
-
this.style.gridArea = value;
|
|
137
|
-
}
|
|
138
|
-
get gridArea() {
|
|
139
|
-
return this.style.gridArea;
|
|
140
|
-
}
|
|
141
|
-
set gridColumn(value) {
|
|
142
|
-
this.style.gridColumn = value;
|
|
143
|
-
}
|
|
144
|
-
get gridColumn() {
|
|
145
|
-
return this.style.gridColumn;
|
|
146
|
-
}
|
|
147
|
-
set gridRow(value) {
|
|
148
|
-
this.style.gridRow = value;
|
|
149
|
-
}
|
|
150
|
-
get gridRow() {
|
|
151
|
-
return this.style.gridColumn;
|
|
152
|
-
}
|
|
153
|
-
/* Short Props */
|
|
154
|
-
get display() {
|
|
155
|
-
return _getDisplay(this);
|
|
156
|
-
}
|
|
157
|
-
set display(value) {
|
|
158
|
-
this.style.display = value;
|
|
159
|
-
}
|
|
160
|
-
[displayProperty.setNative](value) {
|
|
161
|
-
_setDisplay(value, this);
|
|
162
|
-
}
|
|
163
|
-
set position(value) {
|
|
164
|
-
this.style.position = value;
|
|
165
|
-
}
|
|
166
|
-
get position() {
|
|
167
|
-
return _getPosition(this);
|
|
168
|
-
}
|
|
169
|
-
[positionProperty.setNative](value) {
|
|
170
|
-
_setPosition(value, this);
|
|
171
|
-
}
|
|
172
|
-
set flexDirection(value) {
|
|
173
|
-
this.style.flexDirection = value;
|
|
174
|
-
}
|
|
175
|
-
get flexDirection() {
|
|
176
|
-
return _getFlexDirection(this);
|
|
177
|
-
}
|
|
178
|
-
[flexDirectionProperty.setNative](value) {
|
|
179
|
-
_setFlexDirection(value, this);
|
|
180
|
-
}
|
|
181
|
-
set flexWrap(value) {
|
|
182
|
-
this.style.flexWrap = value;
|
|
183
|
-
}
|
|
184
|
-
[flexWrapProperty.setNative](value) {
|
|
185
|
-
_setFlexWrap(value, this);
|
|
186
|
-
}
|
|
187
|
-
get flexWrap() {
|
|
188
|
-
return _getFlexWrap(this);
|
|
189
|
-
}
|
|
190
|
-
set alignItems(value) {
|
|
191
|
-
this.style.alignItems = value;
|
|
192
|
-
}
|
|
193
|
-
get alignItems() {
|
|
194
|
-
return _getAlignItems(this);
|
|
195
|
-
}
|
|
196
|
-
[alignItemsProperty.setNative](value) {
|
|
197
|
-
_setAlignItems(value, this);
|
|
198
|
-
}
|
|
199
|
-
//@ts-ignore
|
|
200
|
-
set alignSelf(value) {
|
|
201
|
-
this.style.alignSelf = value;
|
|
202
|
-
}
|
|
203
|
-
//@ts-ignore
|
|
204
|
-
get alignSelf() {
|
|
205
|
-
return _getAlignSelf(this);
|
|
206
|
-
}
|
|
207
|
-
[alignSelfProperty.setNative](value) {
|
|
208
|
-
_setAlignSelf(value, this);
|
|
209
|
-
}
|
|
210
|
-
set alignContent(value) {
|
|
211
|
-
this.style.alignContent = value;
|
|
212
|
-
}
|
|
213
|
-
[alignContentProperty.setNative](value) {
|
|
214
|
-
_setAlignContent(value, this);
|
|
215
|
-
}
|
|
216
|
-
get alignContent() {
|
|
217
|
-
return _getAlignContent(this);
|
|
218
|
-
}
|
|
219
|
-
set justifyItems(value) {
|
|
220
|
-
this.style.justifyItems = value;
|
|
221
|
-
}
|
|
222
|
-
[justifyItemsProperty.setNative](value) {
|
|
223
|
-
_setJustifyItems(value, this);
|
|
224
|
-
}
|
|
225
|
-
get justifyItems() {
|
|
226
|
-
return _getJustifyItems(this);
|
|
227
|
-
}
|
|
228
|
-
set justifySelf(value) {
|
|
229
|
-
this.style.justifySelf = value;
|
|
230
|
-
}
|
|
231
|
-
[justifySelfProperty.setNative](value) {
|
|
232
|
-
_setJustifySelf(value, this);
|
|
233
|
-
}
|
|
234
|
-
get justifySelf() {
|
|
235
|
-
return _getJustifySelf(this);
|
|
236
|
-
}
|
|
237
|
-
set justifyContent(value) {
|
|
238
|
-
this.style.justifyContent = value;
|
|
239
|
-
}
|
|
240
|
-
[justifyContentProperty.setNative](value) {
|
|
241
|
-
_setJustifyContent(value, this);
|
|
242
|
-
}
|
|
243
|
-
get justifyContent() {
|
|
244
|
-
return _getJustifyContent(this);
|
|
245
|
-
}
|
|
246
|
-
//@ts-ignore
|
|
247
|
-
set left(value) {
|
|
248
|
-
this.style.left = value;
|
|
249
|
-
}
|
|
250
|
-
get left() {
|
|
251
|
-
return this.style.left;
|
|
252
|
-
}
|
|
253
|
-
[leftProperty.setNative](value) {
|
|
254
|
-
_setLeft(value, this);
|
|
255
|
-
}
|
|
256
|
-
//@ts-ignore
|
|
257
|
-
set right(value) {
|
|
258
|
-
this.style.right = value;
|
|
259
|
-
}
|
|
260
|
-
get right() {
|
|
261
|
-
return this.style.right;
|
|
262
|
-
}
|
|
263
|
-
[rightProperty.setNative](value) {
|
|
264
|
-
_setRight(value, this);
|
|
265
|
-
}
|
|
266
|
-
//@ts-ignore
|
|
267
|
-
set top(value) {
|
|
268
|
-
this.style.top = value;
|
|
269
|
-
}
|
|
270
|
-
get top() {
|
|
271
|
-
return this.style.top;
|
|
272
|
-
}
|
|
273
|
-
[topProperty.setNative](value) {
|
|
274
|
-
_setTop(value, this);
|
|
275
|
-
}
|
|
276
|
-
//@ts-ignore
|
|
277
|
-
set bottom(value) {
|
|
278
|
-
this.style.bottom = value;
|
|
279
|
-
}
|
|
280
|
-
get bottom() {
|
|
281
|
-
return this.style.bottom;
|
|
282
|
-
}
|
|
283
|
-
[bottomProperty.setNative](value) {
|
|
284
|
-
_setBottom(value, this);
|
|
285
|
-
}
|
|
286
|
-
[marginLeftProperty.setNative](value) {
|
|
287
|
-
_setMarginLeft(value, this);
|
|
288
|
-
}
|
|
289
|
-
[marginRightProperty.setNative](value) {
|
|
290
|
-
_setMarginRight(value, this);
|
|
291
|
-
}
|
|
292
|
-
[marginTopProperty.setNative](value) {
|
|
293
|
-
_setMarginTop(value, this);
|
|
294
|
-
}
|
|
295
|
-
[marginBottomProperty.setNative](value) {
|
|
296
|
-
_setMarginBottom(value, this);
|
|
297
|
-
}
|
|
298
|
-
[borderLeftWidthProperty.setNative](value) {
|
|
299
|
-
_setBorderLeft(value, this);
|
|
300
|
-
}
|
|
301
|
-
[borderRightWidthProperty.setNative](value) {
|
|
302
|
-
_setBorderRight(value, this);
|
|
303
|
-
}
|
|
304
|
-
[borderTopWidthProperty.setNative](value) {
|
|
305
|
-
_setBorderTop(value, this);
|
|
306
|
-
}
|
|
307
|
-
[borderBottomWidthProperty.setNative](value) {
|
|
308
|
-
_setBorderBottom(value, this);
|
|
309
|
-
}
|
|
310
|
-
//@ts-ignore
|
|
311
|
-
get flexGrow() {
|
|
312
|
-
return _getFlexGrow(this);
|
|
313
|
-
}
|
|
314
|
-
set flexGrow(value) {
|
|
315
|
-
this.style.flexGrow = value;
|
|
316
|
-
}
|
|
317
|
-
[flexGrowProperty.setNative](value) {
|
|
318
|
-
_setFlexGrow(value, this);
|
|
319
|
-
}
|
|
320
|
-
//@ts-ignore
|
|
321
|
-
get flexShrink() {
|
|
322
|
-
return _getFlexShrink(this);
|
|
323
|
-
}
|
|
324
|
-
set flexShrink(value) {
|
|
325
|
-
this.style.flexShrink = value;
|
|
326
|
-
}
|
|
327
|
-
[flexShrinkProperty.setNative](value) {
|
|
328
|
-
_setFlexShrink(value, this);
|
|
329
|
-
}
|
|
330
|
-
//@ts-ignore
|
|
331
|
-
get flexBasis() {
|
|
332
|
-
return _getFlexBasis(this);
|
|
333
|
-
}
|
|
334
|
-
[flexBasisProperty.setNative](value) {
|
|
335
|
-
_setFlexBasis(value, this);
|
|
336
|
-
}
|
|
337
|
-
/* faster setter/getter
|
|
338
|
-
//@ts-ignore
|
|
339
|
-
get gap() {
|
|
340
|
-
return _getGap(this as any);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
set gap(value) {
|
|
344
|
-
this.style.gap = value;
|
|
345
|
-
_setGap(value, this as any);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
*/
|
|
349
|
-
set rowGap(value) {
|
|
350
|
-
this.style.rowGap = value;
|
|
351
|
-
}
|
|
352
|
-
get rowGap() {
|
|
353
|
-
return _getRowGap(this);
|
|
354
|
-
}
|
|
355
|
-
[rowGapProperty.setNative](value) {
|
|
356
|
-
_setRowGap(value, this);
|
|
357
|
-
}
|
|
358
|
-
set columnGap(value) {
|
|
359
|
-
this.style.columnGap = value;
|
|
360
|
-
}
|
|
361
|
-
get columnGap() {
|
|
362
|
-
return _getColumnGap(this);
|
|
363
|
-
}
|
|
364
|
-
[columnGapProperty.setNative](value) {
|
|
365
|
-
_setColumnGap(value, this);
|
|
366
|
-
}
|
|
367
|
-
get aspectRatio() {
|
|
368
|
-
return _getAspectRatio(this);
|
|
369
|
-
}
|
|
370
|
-
[aspectRatioProperty.setNative](value) {
|
|
371
|
-
_setAspectRatio(value, this);
|
|
372
|
-
}
|
|
373
|
-
[paddingLeftProperty.setNative](value) {
|
|
374
|
-
_setPaddingLeft(value, this);
|
|
375
|
-
}
|
|
376
|
-
[paddingTopProperty.setNative](value) {
|
|
377
|
-
_setPaddingTop(value, this);
|
|
378
|
-
}
|
|
379
|
-
[paddingRightProperty.setNative](value) {
|
|
380
|
-
_setPaddingRight(value, this);
|
|
381
|
-
}
|
|
382
|
-
[paddingBottomProperty.setNative](value) {
|
|
383
|
-
_setPaddingBottom(value, this);
|
|
384
|
-
}
|
|
385
|
-
//@ts-ignore
|
|
386
|
-
set minWidth(value) {
|
|
387
|
-
this.style.minWidth = value;
|
|
388
|
-
}
|
|
389
|
-
[minWidthProperty.setNative](value) {
|
|
390
|
-
_setMinWidth(value, this);
|
|
391
|
-
}
|
|
392
|
-
//@ts-ignore
|
|
393
|
-
set minHeight(value) {
|
|
394
|
-
this.style.minHeight = value;
|
|
395
|
-
}
|
|
396
|
-
[minHeightProperty.setNative](value) {
|
|
397
|
-
_setMinHeight(value, this);
|
|
398
|
-
}
|
|
399
|
-
//@ts-ignore
|
|
400
|
-
set width(value) {
|
|
401
|
-
this.style.width = value;
|
|
402
|
-
}
|
|
403
|
-
[widthProperty.setNative](value) {
|
|
404
|
-
_setWidth(value, this);
|
|
405
|
-
}
|
|
406
|
-
get width() {
|
|
407
|
-
return _getWidth(this);
|
|
408
|
-
}
|
|
409
|
-
//@ts-ignore
|
|
410
|
-
set height(value) {
|
|
411
|
-
this.style.height = value;
|
|
412
|
-
}
|
|
413
|
-
[heightProperty.setNative](value) {
|
|
414
|
-
_setHeight(value, this);
|
|
415
|
-
}
|
|
416
|
-
//@ts-ignore
|
|
417
|
-
get height() {
|
|
418
|
-
return _getHeight(this);
|
|
419
|
-
}
|
|
420
|
-
set maxWidth(value) {
|
|
421
|
-
this.style.maxWidth = value;
|
|
422
|
-
}
|
|
423
|
-
[maxWidthProperty.setNative](value) {
|
|
424
|
-
_setMaxWidth(value, this);
|
|
425
|
-
}
|
|
426
|
-
//@ts-ignore
|
|
427
|
-
set maxHeight(value) {
|
|
428
|
-
this.style.maxHeight = value;
|
|
429
|
-
}
|
|
430
|
-
[maxHeightProperty.setNative](value) {
|
|
431
|
-
_setMaxHeight(value, this);
|
|
432
|
-
}
|
|
433
|
-
//@ts-ignore
|
|
434
|
-
set gridAutoRows(value) {
|
|
435
|
-
this.style.gridAutoRows = value;
|
|
436
|
-
}
|
|
437
|
-
[gridAutoRowsProperty.setNative](value) {
|
|
438
|
-
_setGridAutoRows(value, this);
|
|
439
|
-
}
|
|
440
|
-
//@ts-ignore
|
|
441
|
-
get gridAutoRows() {
|
|
442
|
-
return this.style.gridAutoRows;
|
|
443
|
-
}
|
|
444
|
-
//@ts-ignore
|
|
445
|
-
set gridAutoColumns(value) {
|
|
446
|
-
this.style.gridAutoColumns = value;
|
|
447
|
-
}
|
|
448
|
-
[gridAutoColumnsProperty.setNative](value) {
|
|
449
|
-
_setGridAutoColumns(value, this);
|
|
450
|
-
}
|
|
451
|
-
get gridAutoColumns() {
|
|
452
|
-
return this.style.gridAutoColumns;
|
|
453
|
-
}
|
|
454
|
-
set gridAutoFlow(value) {
|
|
455
|
-
this.style.gridAutoFlow = value;
|
|
456
|
-
}
|
|
457
|
-
[gridAutoFlowProperty.setNative](value) { }
|
|
458
|
-
get gridAutoFlow() {
|
|
459
|
-
return this.style.gridAutoFlow;
|
|
460
|
-
}
|
|
461
|
-
set gridColumnStart(value) {
|
|
462
|
-
this.style.gridColumnStart = value;
|
|
463
|
-
}
|
|
464
|
-
[gridColumnStartProperty.setNative](value) {
|
|
465
|
-
_setGridColumnStart(value, this);
|
|
466
|
-
}
|
|
467
|
-
get gridColumnStart() {
|
|
468
|
-
return this.style.gridColumnStart;
|
|
469
|
-
}
|
|
470
|
-
set gridColumnEnd(value) {
|
|
471
|
-
this.style.gridColumnEnd = value;
|
|
472
|
-
}
|
|
473
|
-
[gridColumnEndProperty.setNative](value) {
|
|
474
|
-
_setGridColumnEnd(value, this);
|
|
475
|
-
}
|
|
476
|
-
get gridColumnEnd() {
|
|
477
|
-
return this.style.gridColumnEnd;
|
|
34
|
+
export const overflowProperty = new CssProperty({
|
|
35
|
+
name: 'overflow',
|
|
36
|
+
cssName: 'overflow',
|
|
37
|
+
defaultValue: 'visible',
|
|
38
|
+
valueConverter: overflowConverter,
|
|
39
|
+
});
|
|
40
|
+
export const overflowXProperty = new CssProperty({
|
|
41
|
+
name: 'overflowX',
|
|
42
|
+
cssName: 'overflow-x',
|
|
43
|
+
defaultValue: 'visible',
|
|
44
|
+
valueConverter: overflowConverter,
|
|
45
|
+
});
|
|
46
|
+
export const overflowYProperty = new CssProperty({
|
|
47
|
+
name: 'overflow',
|
|
48
|
+
cssName: 'overflow-y',
|
|
49
|
+
defaultValue: 'visible',
|
|
50
|
+
valueConverter: overflowConverter,
|
|
51
|
+
});
|
|
52
|
+
const paddingProperty = new ShorthandProperty({
|
|
53
|
+
name: 'padding',
|
|
54
|
+
cssName: 'padding',
|
|
55
|
+
getter: function () {
|
|
56
|
+
if (CoreLength.equals(this.paddingTop, this.paddingRight) && CoreLength.equals(this.paddingTop, this.paddingBottom) && CoreLength.equals(this.paddingTop, this.paddingLeft)) {
|
|
57
|
+
return this.paddingTop;
|
|
478
58
|
}
|
|
479
|
-
|
|
480
|
-
|
|
59
|
+
return `${CoreLength.convertToString(this.paddingTop)} ${CoreLength.convertToString(this.paddingRight)} ${CoreLength.convertToString(this.paddingBottom)} ${CoreLength.convertToString(this.paddingLeft)}`;
|
|
60
|
+
},
|
|
61
|
+
converter: convertToPaddings,
|
|
62
|
+
});
|
|
63
|
+
export const paddingLeftProperty = new CssProperty({
|
|
64
|
+
name: 'paddingLeft',
|
|
65
|
+
cssName: 'padding-left',
|
|
66
|
+
defaultValue: CoreTypes.zeroLength,
|
|
67
|
+
affectsLayout: global.isIOS,
|
|
68
|
+
equalityComparer: CoreLength.equals,
|
|
69
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
70
|
+
const view = target.viewRef.get();
|
|
71
|
+
if (view) {
|
|
72
|
+
view.effectivePaddingLeft = CoreLength.toDevicePixels(newValue, 0);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
481
76
|
}
|
|
482
|
-
|
|
483
|
-
|
|
77
|
+
},
|
|
78
|
+
valueConverter: CoreLength.parse,
|
|
79
|
+
});
|
|
80
|
+
export const paddingRightProperty = new CssProperty({
|
|
81
|
+
name: 'paddingRight',
|
|
82
|
+
cssName: 'padding-right',
|
|
83
|
+
defaultValue: CoreTypes.zeroLength,
|
|
84
|
+
affectsLayout: global.isIOS,
|
|
85
|
+
equalityComparer: CoreLength.equals,
|
|
86
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
87
|
+
const view = target.viewRef.get();
|
|
88
|
+
if (view) {
|
|
89
|
+
view.effectivePaddingRight = CoreLength.toDevicePixels(newValue, 0);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
484
93
|
}
|
|
485
|
-
|
|
486
|
-
|
|
94
|
+
},
|
|
95
|
+
valueConverter: CoreLength.parse,
|
|
96
|
+
});
|
|
97
|
+
export const paddingTopProperty = new CssProperty({
|
|
98
|
+
name: 'paddingTop',
|
|
99
|
+
cssName: 'padding-top',
|
|
100
|
+
defaultValue: CoreTypes.zeroLength,
|
|
101
|
+
affectsLayout: global.isIOS,
|
|
102
|
+
equalityComparer: CoreLength.equals,
|
|
103
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
104
|
+
const view = target.viewRef.get();
|
|
105
|
+
if (view) {
|
|
106
|
+
view.effectivePaddingTop = CoreLength.toDevicePixels(newValue, 0);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
487
110
|
}
|
|
488
|
-
|
|
489
|
-
|
|
111
|
+
},
|
|
112
|
+
valueConverter: CoreLength.parse,
|
|
113
|
+
});
|
|
114
|
+
export const paddingBottomProperty = new CssProperty({
|
|
115
|
+
name: 'paddingBottom',
|
|
116
|
+
cssName: 'padding-bottom',
|
|
117
|
+
defaultValue: CoreTypes.zeroLength,
|
|
118
|
+
affectsLayout: global.isIOS,
|
|
119
|
+
equalityComparer: CoreLength.equals,
|
|
120
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
121
|
+
const view = target.viewRef.get();
|
|
122
|
+
if (view) {
|
|
123
|
+
view.effectivePaddingBottom = CoreLength.toDevicePixels(newValue, 0);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
490
127
|
}
|
|
491
|
-
|
|
492
|
-
|
|
128
|
+
},
|
|
129
|
+
valueConverter: CoreLength.parse,
|
|
130
|
+
});
|
|
131
|
+
export const rowGapProperty = new CssProperty({
|
|
132
|
+
name: 'rowGap',
|
|
133
|
+
cssName: 'row-gap',
|
|
134
|
+
defaultValue: 0,
|
|
135
|
+
valueConverter(value) {
|
|
136
|
+
const parsed = CoreLength.parse(value);
|
|
137
|
+
if (typeof parsed === 'string') {
|
|
138
|
+
return 0;
|
|
493
139
|
}
|
|
494
|
-
|
|
495
|
-
|
|
140
|
+
return parsed;
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
export const columnGapProperty = new CssProperty({
|
|
144
|
+
name: 'columnGap',
|
|
145
|
+
cssName: 'column-gap',
|
|
146
|
+
defaultValue: 0,
|
|
147
|
+
valueConverter(value) {
|
|
148
|
+
const parsed = CoreLength.parse(value);
|
|
149
|
+
if (typeof parsed === 'string') {
|
|
150
|
+
return 0;
|
|
496
151
|
}
|
|
497
|
-
|
|
498
|
-
|
|
152
|
+
return parsed;
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
export const gapProperty = new ShorthandProperty({
|
|
156
|
+
name: 'gap',
|
|
157
|
+
cssName: 'gap',
|
|
158
|
+
getter: function () {
|
|
159
|
+
if (this.rowGap === this.columnGap) {
|
|
160
|
+
return this.rowGap;
|
|
499
161
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
162
|
+
return `${this.rowGap} ${this.columnGap}`;
|
|
163
|
+
},
|
|
164
|
+
converter(value) {
|
|
165
|
+
const properties = [];
|
|
166
|
+
if (typeof value === 'string') {
|
|
167
|
+
const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
|
|
168
|
+
const length = values.length;
|
|
169
|
+
if (length === 0) {
|
|
170
|
+
return properties;
|
|
504
171
|
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
172
|
+
if (length === 1) {
|
|
173
|
+
const row = values[0];
|
|
174
|
+
properties.push([rowGapProperty, row]);
|
|
175
|
+
properties.push([columnGapProperty, row]);
|
|
176
|
+
}
|
|
177
|
+
if (length > 1) {
|
|
178
|
+
const row = values[0];
|
|
179
|
+
const column = values[1];
|
|
180
|
+
properties.push([rowGapProperty, row]);
|
|
181
|
+
properties.push([columnGapProperty, column]);
|
|
513
182
|
}
|
|
514
183
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
}
|
|
518
|
-
export function installMixins() {
|
|
519
|
-
if (!mixinInstalled) {
|
|
520
|
-
mixinInstalled = true;
|
|
521
|
-
overrideViewBase();
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
const emptyArray = new Array();
|
|
525
|
-
export const flexGrowProperty = new CssProperty({
|
|
526
|
-
name: 'flexGrow',
|
|
527
|
-
cssName: 'flex-grow',
|
|
528
|
-
defaultValue: 0,
|
|
529
|
-
valueConverter: parseFloat,
|
|
184
|
+
return properties;
|
|
185
|
+
},
|
|
530
186
|
});
|
|
187
|
+
// export const flexGrowProperty = new CssProperty<Style, number>({
|
|
188
|
+
// name: 'flexGrow',
|
|
189
|
+
// cssName: 'flex-grow',
|
|
190
|
+
// defaultValue: 0,
|
|
191
|
+
// valueConverter: parseFloat,
|
|
192
|
+
// });
|
|
531
193
|
export const flexShrinkProperty = new CssProperty({
|
|
532
194
|
name: 'flexShrink',
|
|
533
195
|
cssName: 'flex-shrink',
|
|
@@ -537,7 +199,7 @@ export const flexShrinkProperty = new CssProperty({
|
|
|
537
199
|
export const displayProperty = new CssProperty({
|
|
538
200
|
name: 'display',
|
|
539
201
|
cssName: 'display',
|
|
540
|
-
defaultValue: '
|
|
202
|
+
defaultValue: 'block',
|
|
541
203
|
valueConverter(value) {
|
|
542
204
|
if (typeof value === 'number') {
|
|
543
205
|
switch (value) {
|
|
@@ -547,16 +209,19 @@ export const displayProperty = new CssProperty({
|
|
|
547
209
|
return 'flex';
|
|
548
210
|
case 2:
|
|
549
211
|
return 'grid';
|
|
212
|
+
case 3:
|
|
213
|
+
return 'block';
|
|
550
214
|
}
|
|
551
215
|
}
|
|
552
216
|
switch (value) {
|
|
553
217
|
case 'none':
|
|
554
218
|
case 'flex':
|
|
555
219
|
case 'grid':
|
|
220
|
+
case 'block':
|
|
556
221
|
return value;
|
|
557
222
|
default:
|
|
558
223
|
// todo throw???
|
|
559
|
-
return '
|
|
224
|
+
return 'block';
|
|
560
225
|
}
|
|
561
226
|
},
|
|
562
227
|
});
|
|
@@ -564,12 +229,14 @@ export const maxWidthProperty = new CssProperty({
|
|
|
564
229
|
name: 'maxWidth',
|
|
565
230
|
cssName: 'max-width',
|
|
566
231
|
defaultValue: 'auto',
|
|
232
|
+
// @ts-ignore
|
|
567
233
|
equalityComparer: NSLength.equals,
|
|
568
234
|
});
|
|
569
235
|
export const maxHeightProperty = new CssProperty({
|
|
570
236
|
name: 'maxHeight',
|
|
571
237
|
cssName: 'max-height',
|
|
572
238
|
defaultValue: 'auto',
|
|
239
|
+
// @ts-ignore
|
|
573
240
|
equalityComparer: NSLength.equals,
|
|
574
241
|
});
|
|
575
242
|
export const positionProperty = new CssProperty({
|
|
@@ -577,37 +244,41 @@ export const positionProperty = new CssProperty({
|
|
|
577
244
|
cssName: 'position',
|
|
578
245
|
defaultValue: 'relative',
|
|
579
246
|
});
|
|
580
|
-
export const flexDirectionProperty = new CssProperty({
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
});
|
|
584
|
-
export const flexWrapProperty = new CssProperty({
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
});
|
|
247
|
+
// export const flexDirectionProperty = new CssProperty<Style, FlexDirection>({
|
|
248
|
+
// name: 'flexDirection',
|
|
249
|
+
// cssName: 'flex-direction',
|
|
250
|
+
// });
|
|
251
|
+
// export const flexWrapProperty = new CssProperty<Style, FlexWrap>({
|
|
252
|
+
// name: 'flexWrap',
|
|
253
|
+
// cssName: 'flex-wrap',
|
|
254
|
+
// defaultValue: 'no-wrap',
|
|
255
|
+
// });
|
|
589
256
|
export const leftProperty = new CssProperty({
|
|
590
257
|
name: 'left',
|
|
591
258
|
cssName: 'left',
|
|
592
259
|
defaultValue: 'auto',
|
|
260
|
+
// @ts-ignore
|
|
593
261
|
equalityComparer: NSLength.equals,
|
|
594
262
|
});
|
|
595
263
|
export const rightProperty = new CssProperty({
|
|
596
264
|
name: 'right',
|
|
597
265
|
cssName: 'right',
|
|
598
266
|
defaultValue: 'auto',
|
|
267
|
+
// @ts-ignore
|
|
599
268
|
equalityComparer: NSLength.equals,
|
|
600
269
|
});
|
|
601
270
|
export const topProperty = new CssProperty({
|
|
602
271
|
name: 'top',
|
|
603
272
|
cssName: 'top',
|
|
604
273
|
defaultValue: 'auto',
|
|
274
|
+
// @ts-ignore
|
|
605
275
|
equalityComparer: NSLength.equals,
|
|
606
276
|
});
|
|
607
277
|
export const bottomProperty = new CssProperty({
|
|
608
278
|
name: 'bottom',
|
|
609
279
|
cssName: 'bottom',
|
|
610
280
|
defaultValue: 'auto',
|
|
281
|
+
// @ts-ignore
|
|
611
282
|
equalityComparer: NSLength.equals,
|
|
612
283
|
});
|
|
613
284
|
export const flexBasisProperty = new CssProperty({
|
|
@@ -635,86 +306,6 @@ export const gridColumnGapProperty = new ShorthandProperty({
|
|
|
635
306
|
return [[columnGapProperty, value]];
|
|
636
307
|
},
|
|
637
308
|
});
|
|
638
|
-
export const rowGapProperty = new CssProperty({
|
|
639
|
-
name: 'rowGap',
|
|
640
|
-
cssName: 'row-gap',
|
|
641
|
-
defaultValue: 0,
|
|
642
|
-
});
|
|
643
|
-
export const columnGapProperty = new CssProperty({
|
|
644
|
-
name: 'columnGap',
|
|
645
|
-
cssName: 'column-gap',
|
|
646
|
-
defaultValue: 0,
|
|
647
|
-
});
|
|
648
|
-
export const gridGapProperty = new ShorthandProperty({
|
|
649
|
-
name: 'gridGap',
|
|
650
|
-
cssName: 'grid-gap',
|
|
651
|
-
getter: function () {
|
|
652
|
-
if (this.rowGap === this.columnGap) {
|
|
653
|
-
return this.rowGap;
|
|
654
|
-
}
|
|
655
|
-
return `${this.rowGap} ${this.columnGap}`;
|
|
656
|
-
},
|
|
657
|
-
converter(value) {
|
|
658
|
-
if (typeof value === 'string') {
|
|
659
|
-
const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
|
|
660
|
-
const length = values.length;
|
|
661
|
-
if (length === 0) {
|
|
662
|
-
return emptyArray;
|
|
663
|
-
}
|
|
664
|
-
if (length === 1) {
|
|
665
|
-
const row = values[0];
|
|
666
|
-
return [
|
|
667
|
-
[rowGapProperty, row],
|
|
668
|
-
[columnGapProperty, row],
|
|
669
|
-
];
|
|
670
|
-
}
|
|
671
|
-
if (length > 1) {
|
|
672
|
-
const row = values[0];
|
|
673
|
-
const column = values[1];
|
|
674
|
-
return [
|
|
675
|
-
[rowGapProperty, row],
|
|
676
|
-
[columnGapProperty, column],
|
|
677
|
-
];
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
return emptyArray;
|
|
681
|
-
},
|
|
682
|
-
});
|
|
683
|
-
export const gapProperty = new ShorthandProperty({
|
|
684
|
-
name: 'gap',
|
|
685
|
-
cssName: 'gap',
|
|
686
|
-
getter: function () {
|
|
687
|
-
if (this.rowGap === this.columnGap) {
|
|
688
|
-
return this.rowGap;
|
|
689
|
-
}
|
|
690
|
-
return `${this.rowGap} ${this.columnGap}`;
|
|
691
|
-
},
|
|
692
|
-
converter(value) {
|
|
693
|
-
if (typeof value === 'string') {
|
|
694
|
-
const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
|
|
695
|
-
const length = values.length;
|
|
696
|
-
if (length === 0) {
|
|
697
|
-
return emptyArray;
|
|
698
|
-
}
|
|
699
|
-
if (length === 1) {
|
|
700
|
-
const row = values[0];
|
|
701
|
-
return [
|
|
702
|
-
[rowGapProperty, row],
|
|
703
|
-
[columnGapProperty, row],
|
|
704
|
-
];
|
|
705
|
-
}
|
|
706
|
-
if (length > 1) {
|
|
707
|
-
const row = values[0];
|
|
708
|
-
const column = values[1];
|
|
709
|
-
return [
|
|
710
|
-
[rowGapProperty, row],
|
|
711
|
-
[columnGapProperty, column],
|
|
712
|
-
];
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
return emptyArray;
|
|
716
|
-
},
|
|
717
|
-
});
|
|
718
309
|
export const aspectRatioProperty = new CssProperty({
|
|
719
310
|
name: 'aspectRatio',
|
|
720
311
|
cssName: 'aspect-ratio',
|
|
@@ -809,7 +400,7 @@ export const gridAreaProperty = new ShorthandProperty({
|
|
|
809
400
|
// grid-row-start / grid-column-start / grid-row-end / grid-column-end
|
|
810
401
|
const length = values.length;
|
|
811
402
|
if (length === 0) {
|
|
812
|
-
return
|
|
403
|
+
return [];
|
|
813
404
|
}
|
|
814
405
|
if (length === 1) {
|
|
815
406
|
const parsed = parseGridColumnOrRow(values[0]);
|
|
@@ -854,7 +445,7 @@ export const gridAreaProperty = new ShorthandProperty({
|
|
|
854
445
|
];
|
|
855
446
|
}
|
|
856
447
|
}
|
|
857
|
-
return
|
|
448
|
+
return [];
|
|
858
449
|
},
|
|
859
450
|
});
|
|
860
451
|
export const gridColumnStartProperty = new CssProperty({
|
|
@@ -881,7 +472,7 @@ export const gridColumnProperty = new ShorthandProperty({
|
|
|
881
472
|
const values = value.split('/').filter((item) => item.trim().length !== 0);
|
|
882
473
|
const length = values.length;
|
|
883
474
|
if (length === 0) {
|
|
884
|
-
return
|
|
475
|
+
return [];
|
|
885
476
|
}
|
|
886
477
|
if (length === 1) {
|
|
887
478
|
const parsed = parseGridColumnOrRow(values[0]);
|
|
@@ -901,7 +492,7 @@ export const gridColumnProperty = new ShorthandProperty({
|
|
|
901
492
|
];
|
|
902
493
|
}
|
|
903
494
|
}
|
|
904
|
-
return
|
|
495
|
+
return [];
|
|
905
496
|
},
|
|
906
497
|
});
|
|
907
498
|
export const gridRowStartProperty = new CssProperty({
|
|
@@ -928,7 +519,7 @@ export const gridRowProperty = new ShorthandProperty({
|
|
|
928
519
|
const values = value.split('/').filter((item) => item.trim().length !== 0);
|
|
929
520
|
const length = values.length;
|
|
930
521
|
if (length === 0) {
|
|
931
|
-
return
|
|
522
|
+
return [];
|
|
932
523
|
}
|
|
933
524
|
if (length === 1) {
|
|
934
525
|
const parsed = parseGridColumnOrRow(values[0]);
|
|
@@ -948,20 +539,115 @@ export const gridRowProperty = new ShorthandProperty({
|
|
|
948
539
|
];
|
|
949
540
|
}
|
|
950
541
|
}
|
|
951
|
-
return
|
|
542
|
+
return [];
|
|
952
543
|
},
|
|
953
544
|
});
|
|
954
545
|
export const gridTemplateRowsProperty = new CssProperty({
|
|
955
546
|
name: 'gridTemplateRows',
|
|
956
547
|
cssName: 'grid-template-rows',
|
|
957
|
-
defaultValue:
|
|
548
|
+
defaultValue: null,
|
|
958
549
|
});
|
|
959
550
|
export const gridTemplateColumnsProperty = new CssProperty({
|
|
960
551
|
name: 'gridTemplateColumns',
|
|
961
552
|
cssName: 'grid-template-columns',
|
|
553
|
+
defaultValue: null,
|
|
554
|
+
});
|
|
555
|
+
// flex-flow: <flex-direction> || <flex-wrap>
|
|
556
|
+
const flexFlowProperty = new ShorthandProperty({
|
|
557
|
+
name: 'flexFlow',
|
|
558
|
+
cssName: 'flex-flow',
|
|
559
|
+
getter: function () {
|
|
560
|
+
return `${this.flexDirection} ${this.flexWrap}`;
|
|
561
|
+
},
|
|
562
|
+
converter: function (value) {
|
|
563
|
+
const properties = [];
|
|
564
|
+
if (value === unsetValue) {
|
|
565
|
+
properties.push([flexDirectionProperty, value]);
|
|
566
|
+
properties.push([flexWrapProperty, value]);
|
|
567
|
+
}
|
|
568
|
+
else {
|
|
569
|
+
const trimmed = value && value.trim();
|
|
570
|
+
if (trimmed) {
|
|
571
|
+
const values = trimmed.split(/\s+/);
|
|
572
|
+
if (values.length >= 1) {
|
|
573
|
+
properties.push([flexDirectionProperty, values[0]]);
|
|
574
|
+
}
|
|
575
|
+
if (value.length >= 2) {
|
|
576
|
+
properties.push([flexWrapProperty, values[1]]);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
return properties;
|
|
581
|
+
},
|
|
582
|
+
});
|
|
583
|
+
// flex: inital | auto | none | <flex-grow> <flex-shrink> || <flex-basis>
|
|
584
|
+
const flexProperty = new ShorthandProperty({
|
|
585
|
+
name: 'flex',
|
|
586
|
+
cssName: 'flex',
|
|
587
|
+
getter: function () {
|
|
588
|
+
return `${this.flexGrow} ${this.flexShrink} ${this.flexBasis}`;
|
|
589
|
+
},
|
|
590
|
+
converter: function (value) {
|
|
591
|
+
const properties = [];
|
|
592
|
+
if (value === unsetValue) {
|
|
593
|
+
properties.push([flexGrowProperty, value]);
|
|
594
|
+
properties.push([flexShrinkProperty, value]);
|
|
595
|
+
}
|
|
596
|
+
else if (typeof value === 'number') {
|
|
597
|
+
properties.push([flexGrowProperty, value]);
|
|
598
|
+
properties.push([flexShrinkProperty, 1]);
|
|
599
|
+
properties.push([flexBasisProperty, 'auto']);
|
|
600
|
+
}
|
|
601
|
+
else {
|
|
602
|
+
const trimmed = value && value.trim();
|
|
603
|
+
if (trimmed) {
|
|
604
|
+
const values = trimmed.split(/\s+/);
|
|
605
|
+
if (values.length === 1) {
|
|
606
|
+
switch (values[0]) {
|
|
607
|
+
case 'inital':
|
|
608
|
+
properties.push([flexGrowProperty, 0]);
|
|
609
|
+
properties.push([flexShrinkProperty, 1]);
|
|
610
|
+
properties.push([flexBasisProperty, 'auto']);
|
|
611
|
+
break;
|
|
612
|
+
case 'auto':
|
|
613
|
+
properties.push([flexGrowProperty, 1]);
|
|
614
|
+
properties.push([flexShrinkProperty, 1]);
|
|
615
|
+
properties.push([flexBasisProperty, 'auto']);
|
|
616
|
+
break;
|
|
617
|
+
case 'none':
|
|
618
|
+
properties.push([flexGrowProperty, 0]);
|
|
619
|
+
properties.push([flexShrinkProperty, 0]);
|
|
620
|
+
properties.push([flexBasisProperty, 'auto']);
|
|
621
|
+
break;
|
|
622
|
+
default:
|
|
623
|
+
properties.push([flexGrowProperty, values[0]]);
|
|
624
|
+
properties.push([flexShrinkProperty, 1]);
|
|
625
|
+
properties.push([flexBasisProperty, 'auto']);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
if (values.length >= 2) {
|
|
629
|
+
properties.push([flexGrowProperty, values[0]]);
|
|
630
|
+
properties.push([flexShrinkProperty, values[1]]);
|
|
631
|
+
}
|
|
632
|
+
if (value.length >= 3) {
|
|
633
|
+
properties.push({ property: flexBasisProperty, value: values[2] });
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return properties;
|
|
638
|
+
},
|
|
639
|
+
});
|
|
640
|
+
export const textWrapProperty = new Property({
|
|
641
|
+
name: 'textWrap',
|
|
642
|
+
affectsLayout: true,
|
|
643
|
+
defaultValue: 'nowrap',
|
|
644
|
+
});
|
|
645
|
+
export const textProperty = new Property({
|
|
646
|
+
name: 'text',
|
|
647
|
+
affectsLayout: true,
|
|
962
648
|
defaultValue: '',
|
|
963
649
|
});
|
|
964
|
-
let
|
|
650
|
+
let ViewBase = class ViewBase extends CustomLayoutView {
|
|
965
651
|
constructor() {
|
|
966
652
|
super();
|
|
967
653
|
this._children = [];
|
|
@@ -972,541 +658,195 @@ let TSCViewBase = class TSCViewBase extends CustomLayoutView {
|
|
|
972
658
|
forceStyleUpdate() {
|
|
973
659
|
_forceStyleUpdate(this);
|
|
974
660
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
661
|
+
eachLayoutChild(callback) {
|
|
662
|
+
let lastChild = null;
|
|
663
|
+
this.eachChildView((cv) => {
|
|
664
|
+
cv._eachLayoutView((lv) => {
|
|
665
|
+
if (lastChild && !lastChild.isCollapsed) {
|
|
666
|
+
callback(lastChild, false);
|
|
667
|
+
}
|
|
668
|
+
lastChild = lv;
|
|
669
|
+
});
|
|
670
|
+
return true;
|
|
671
|
+
});
|
|
672
|
+
if (lastChild && !lastChild.isCollapsed) {
|
|
673
|
+
callback(lastChild, true);
|
|
674
|
+
}
|
|
986
675
|
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
676
|
+
eachChild(callback) {
|
|
677
|
+
for (const child of this._children) {
|
|
678
|
+
callback(child);
|
|
679
|
+
}
|
|
990
680
|
}
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
681
|
+
eachChildView(callback) {
|
|
682
|
+
for (const view of this._children) {
|
|
683
|
+
callback(view);
|
|
684
|
+
}
|
|
995
685
|
}
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
686
|
+
_addChildFromBuilder(name, value) {
|
|
687
|
+
if (value instanceof NSView) {
|
|
688
|
+
this.addChild(value);
|
|
689
|
+
}
|
|
999
690
|
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
return _getPosition(this as any);
|
|
691
|
+
getChildrenCount() {
|
|
692
|
+
return this._children.length;
|
|
1003
693
|
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
_setPosition(value, this as any);
|
|
694
|
+
get _childrenCount() {
|
|
695
|
+
return this._children.length;
|
|
1007
696
|
}
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
this.style.flexDirection = value;
|
|
697
|
+
getChildAt(index) {
|
|
698
|
+
return this._children[index];
|
|
1011
699
|
}
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
return _getFlexDirection(this as any);
|
|
700
|
+
getChildIndex(child) {
|
|
701
|
+
return this._children.indexOf(child);
|
|
1015
702
|
}
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
_setFlexDirection(value, this as any);
|
|
703
|
+
getChildById(id) {
|
|
704
|
+
return getViewById(this, id);
|
|
1019
705
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
706
|
+
addChild(child) {
|
|
707
|
+
this._children.push(child);
|
|
708
|
+
this._addView(child);
|
|
1023
709
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
710
|
+
insertChild(child, atIndex) {
|
|
711
|
+
this._children.splice(atIndex, 0, child);
|
|
712
|
+
this._addView(child, atIndex);
|
|
1027
713
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
714
|
+
removeChild(child) {
|
|
715
|
+
const index = this._children.indexOf(child);
|
|
716
|
+
if (index > -1) {
|
|
717
|
+
this._children.splice(index, 1);
|
|
718
|
+
this._removeView(child);
|
|
719
|
+
}
|
|
1031
720
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
721
|
+
removeChildren() {
|
|
722
|
+
if (this._children.length === 0) {
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
for (const child of this._children) {
|
|
726
|
+
child._isMasonChild = false;
|
|
727
|
+
this._removeView(child);
|
|
728
|
+
}
|
|
729
|
+
this._children.splice(0);
|
|
1035
730
|
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
return _getAlignItems(this as any);
|
|
731
|
+
[displayProperty.setNative](value) {
|
|
732
|
+
_setDisplay(value, this);
|
|
1039
733
|
}
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
_setAlignItems(value, this as any);
|
|
734
|
+
[flexDirectionProperty.setNative](value) {
|
|
735
|
+
_setFlexDirection(value, this);
|
|
1043
736
|
}
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
set alignSelf(value: AlignSelf) {
|
|
1047
|
-
this.style.alignSelf = value as any;
|
|
737
|
+
[minWidthProperty.setNative](value) {
|
|
738
|
+
_setMinWidth(value, this);
|
|
1048
739
|
}
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
get alignSelf() {
|
|
1052
|
-
return _getAlignSelf(this as any);
|
|
740
|
+
[minHeightProperty.setNative](value) {
|
|
741
|
+
_setMinHeight(value, this);
|
|
1053
742
|
}
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
_setAlignSelf(value, this as any);
|
|
743
|
+
[widthProperty.setNative](value) {
|
|
744
|
+
_setWidth(value, this);
|
|
1057
745
|
}
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
this.style.alignContent = value as any;
|
|
746
|
+
[heightProperty.setNative](value) {
|
|
747
|
+
_setHeight(value, this);
|
|
1061
748
|
}
|
|
1062
|
-
|
|
1063
749
|
[alignContentProperty.setNative](value) {
|
|
1064
|
-
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
get alignContent() {
|
|
1068
|
-
return _getAlignContent(this as any);
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
set justifyItems(value) {
|
|
1072
|
-
this.style.justifyItems = value as any;
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
[justifyItemsProperty.setNative](value) {
|
|
1076
|
-
_setJustifyItems(value, this as any);
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
get justifyItems() {
|
|
1080
|
-
return _getJustifyItems(this as any);
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
set justifySelf(value) {
|
|
1084
|
-
this.style.justifySelf = value as any;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
[justifySelfProperty.setNative](value) {
|
|
1088
|
-
_setJustifySelf(value, this as any);
|
|
750
|
+
_setAlignContent(value, this);
|
|
1089
751
|
}
|
|
1090
|
-
|
|
1091
|
-
get justifySelf() {
|
|
1092
|
-
return _getJustifySelf(this as any);
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
set justifyContent(value) {
|
|
1096
|
-
this.style.justifyContent = value as any;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
752
|
[justifyContentProperty.setNative](value) {
|
|
1100
|
-
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
get justifyContent() {
|
|
1104
|
-
return _getJustifyContent(this as any);
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
//@ts-ignore
|
|
1108
|
-
set left(value) {
|
|
1109
|
-
this.style.left = value;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
get left() {
|
|
1113
|
-
return this.style.left;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
[leftProperty.setNative](value) {
|
|
1117
|
-
_setLeft(value, this as any);
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
//@ts-ignore
|
|
1121
|
-
set right(value) {
|
|
1122
|
-
this.style.right = value;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
get right() {
|
|
1126
|
-
return this.style.right;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
[rightProperty.setNative](value) {
|
|
1130
|
-
_setRight(value, this as any);
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
//@ts-ignore
|
|
1134
|
-
set top(value) {
|
|
1135
|
-
this.style.top = value;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
get top() {
|
|
1139
|
-
return this.style.top;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
[topProperty.setNative](value) {
|
|
1143
|
-
_setTop(value, this as any);
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
//@ts-ignore
|
|
1147
|
-
set bottom(value) {
|
|
1148
|
-
this.style.bottom = value;
|
|
753
|
+
_setJustifyContent(value, this);
|
|
1149
754
|
}
|
|
1150
|
-
|
|
1151
|
-
get bottom() {
|
|
1152
|
-
return this.style.bottom;
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
[bottomProperty.setNative](value) {
|
|
1156
|
-
_setBottom(value, this as any);
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
755
|
[marginLeftProperty.setNative](value) {
|
|
1160
|
-
|
|
756
|
+
_setMarginLeft(value, this);
|
|
1161
757
|
}
|
|
1162
|
-
|
|
1163
758
|
[marginRightProperty.setNative](value) {
|
|
1164
|
-
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
[marginTopProperty.setNative](value) {
|
|
1168
|
-
_setMarginTop(value, this as any);
|
|
759
|
+
_setMarginRight(value, this);
|
|
1169
760
|
}
|
|
1170
|
-
|
|
1171
761
|
[marginBottomProperty.setNative](value) {
|
|
1172
|
-
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
[borderLeftWidthProperty.setNative](value) {
|
|
1176
|
-
_setBorderLeft(value, this as any);
|
|
1177
|
-
}
|
|
1178
|
-
|
|
1179
|
-
[borderRightWidthProperty.setNative](value) {
|
|
1180
|
-
_setBorderRight(value, this as any);
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
[borderTopWidthProperty.setNative](value) {
|
|
1184
|
-
_setBorderTop(value, this as any);
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
[borderBottomWidthProperty.setNative](value) {
|
|
1188
|
-
_setBorderBottom(value, this as any);
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
//@ts-ignore
|
|
1192
|
-
get flexGrow() {
|
|
1193
|
-
return _getFlexGrow(this as any);
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
set flexGrow(value) {
|
|
1197
|
-
this.style.flexGrow = value;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
[flexGrowProperty.setNative](value) {
|
|
1201
|
-
_setFlexGrow(value, this as any);
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
//@ts-ignore
|
|
1205
|
-
get flexShrink() {
|
|
1206
|
-
return _getFlexShrink(this as any);
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
set flexShrink(value) {
|
|
1210
|
-
this.style.flexShrink = value;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
[flexShrinkProperty.setNative](value) {
|
|
1214
|
-
_setFlexShrink(value, this as any);
|
|
762
|
+
_setMarginBottom(value, this);
|
|
1215
763
|
}
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
get flexBasis() {
|
|
1219
|
-
return _getFlexBasis(this as any);
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
[flexBasisProperty.setNative](value) {
|
|
1223
|
-
_setFlexBasis(value, this as any);
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
// faster setter/getter
|
|
1227
|
-
//@ts-ignore
|
|
1228
|
-
get gap() {
|
|
1229
|
-
return _getGap(this as any);
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
set gap(value) {
|
|
1233
|
-
this.style.gap = value;
|
|
1234
|
-
_setGap(value, this as any);
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
set rowGap(value) {
|
|
1240
|
-
this.style.rowGap = value;
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
[rowGapProperty.setNative](value) {
|
|
1244
|
-
_setRowGap(value, this as any);
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
set columnGap(value) {
|
|
1248
|
-
this.style.columnGap = value;
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
[columnGapProperty.setNative](value) {
|
|
1252
|
-
_setColumnGap(value, this as any);
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
get aspectRatio() {
|
|
1256
|
-
return _getAspectRatio(this as any);
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
[aspectRatioProperty.setNative](value) {
|
|
1260
|
-
_setAspectRatio(value, this as any);
|
|
764
|
+
[marginTopProperty.setNative](value) {
|
|
765
|
+
_setMarginTop(value, this);
|
|
1261
766
|
}
|
|
1262
|
-
|
|
1263
767
|
[paddingLeftProperty.setNative](value) {
|
|
1264
|
-
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
[paddingTopProperty.setNative](value) {
|
|
1268
|
-
_setPaddingTop(value, this as any);
|
|
768
|
+
_setPaddingLeft(value, this);
|
|
1269
769
|
}
|
|
1270
|
-
|
|
1271
770
|
[paddingRightProperty.setNative](value) {
|
|
1272
|
-
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
[paddingBottomProperty.setNative](value) {
|
|
1276
|
-
_setPaddingBottom(value, this as any);
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
//@ts-ignore
|
|
1280
|
-
set minWidth(value) {
|
|
1281
|
-
this.style.minWidth = value;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
[minWidthProperty.setNative](value) {
|
|
1285
|
-
_setMinWidth(value, this as any);
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
//@ts-ignore
|
|
1289
|
-
set minHeight(value) {
|
|
1290
|
-
this.style.minHeight = value;
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
[minHeightProperty.setNative](value) {
|
|
1294
|
-
_setMinHeight(value, this as any);
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
//@ts-ignore
|
|
1298
|
-
set width(value) {
|
|
1299
|
-
this.style.width = value;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
[widthProperty.setNative](value) {
|
|
1303
|
-
_setWidth(value, this as any);
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
get width() {
|
|
1307
|
-
return _getWidth(this as any);
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
//@ts-ignore
|
|
1311
|
-
set height(value) {
|
|
1312
|
-
this.style.height = value;
|
|
771
|
+
_setPaddingRight(value, this);
|
|
1313
772
|
}
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
_setHeight(value, this as any);
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
//@ts-ignore
|
|
1320
|
-
get height() {
|
|
1321
|
-
return _getHeight(this as any);
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
set maxWidth(value) {
|
|
1325
|
-
this.style.maxWidth = value;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
[maxWidthProperty.setNative](value) {
|
|
1329
|
-
_setMaxWidth(value, this as any);
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
//@ts-ignore
|
|
1333
|
-
set maxHeight(value) {
|
|
1334
|
-
this.style.maxHeight = value;
|
|
1335
|
-
}
|
|
1336
|
-
|
|
1337
|
-
[maxHeightProperty.setNative](value) {
|
|
1338
|
-
_setMaxHeight(value, this as any);
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
//@ts-ignore
|
|
1342
|
-
set gridAutoRows(value) {
|
|
1343
|
-
this.style.gridAutoRows = value;
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
[gridAutoRowsProperty.setNative](value) {
|
|
1347
|
-
_setGridAutoRows(value, this as any);
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
//@ts-ignore
|
|
1351
|
-
get gridAutoRows() {
|
|
1352
|
-
return this.style.gridAutoRows;
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
//@ts-ignore
|
|
1356
|
-
set gridAutoColumns(value) {
|
|
1357
|
-
this.style.gridAutoColumns = value;
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
[gridAutoColumnsProperty.setNative](value) {
|
|
1361
|
-
_setGridAutoColumns(value, this as any);
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
get gridAutoColumns() {
|
|
1365
|
-
return this.style.gridAutoColumns;
|
|
773
|
+
[paddingTopProperty.setNative](value) {
|
|
774
|
+
_setPaddingTop(value, this);
|
|
1366
775
|
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
this.style.gridAutoFlow = value;
|
|
776
|
+
[paddingBottomProperty.setNative](value) {
|
|
777
|
+
_setPaddingBottom(value, this);
|
|
1370
778
|
}
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
get gridAutoFlow() {
|
|
1375
|
-
return this.style.gridAutoFlow;
|
|
779
|
+
[rowGapProperty.setNative](value) {
|
|
780
|
+
_setRowGap(value, this);
|
|
1376
781
|
}
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
this.style.gridColumnStart = value;
|
|
782
|
+
[columnGapProperty.setNative](value) {
|
|
783
|
+
_setColumnGap(value, this);
|
|
1380
784
|
}
|
|
1381
|
-
|
|
1382
785
|
[gridColumnStartProperty.setNative](value) {
|
|
1383
|
-
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
get gridColumnStart() {
|
|
1387
|
-
return this.style.gridColumnStart;
|
|
786
|
+
_setGridColumnStart(value, this);
|
|
1388
787
|
}
|
|
1389
|
-
|
|
1390
|
-
set gridColumnEnd(value) {
|
|
1391
|
-
this.style.gridColumnEnd = value;
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
788
|
[gridColumnEndProperty.setNative](value) {
|
|
1395
|
-
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
get gridColumnEnd() {
|
|
1399
|
-
return this.style.gridColumnEnd;
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
set gridRowStart(value) {
|
|
1403
|
-
this.style.gridRowStart = value;
|
|
789
|
+
_setGridColumnEnd(value, this);
|
|
1404
790
|
}
|
|
1405
|
-
|
|
1406
791
|
[gridRowStartProperty.setNative](value) {
|
|
1407
|
-
|
|
792
|
+
_setGridRowStart(value, this);
|
|
1408
793
|
}
|
|
1409
|
-
|
|
1410
|
-
get gridRowStart() {
|
|
1411
|
-
return this.style.gridRowStart;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
set gridRowEnd(value) {
|
|
1415
|
-
this.style.gridRowEnd = value;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
794
|
[gridRowEndProperty.setNative](value) {
|
|
1419
|
-
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
get gridRowEnd() {
|
|
1423
|
-
return this.style.gridRowEnd;
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
set gridTemplateRows(value) {
|
|
1427
|
-
this.style.gridTemplateRows = value;
|
|
795
|
+
_setGridRowEnd(value, this);
|
|
1428
796
|
}
|
|
1429
|
-
|
|
1430
797
|
[gridTemplateRowsProperty.setNative](value) {
|
|
1431
|
-
|
|
1432
|
-
if (templates) {
|
|
1433
|
-
_setGridTemplateRows(templates, this as any);
|
|
1434
|
-
}
|
|
798
|
+
_setGridTemplateRows(_parseGridTemplates(value), this);
|
|
1435
799
|
}
|
|
1436
|
-
|
|
1437
|
-
set gridTemplateColumns(value) {
|
|
1438
|
-
this.style.gridTemplateColumns = value;
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
800
|
[gridTemplateColumnsProperty.setNative](value) {
|
|
1442
|
-
|
|
1443
|
-
if (templates) {
|
|
1444
|
-
_setGridTemplateColumns(templates, this as any);
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
*/
|
|
1448
|
-
eachLayoutChild(callback) {
|
|
1449
|
-
let lastChild = null;
|
|
1450
|
-
this.eachChildView((cv) => {
|
|
1451
|
-
cv._eachLayoutView((lv) => {
|
|
1452
|
-
if (lastChild && !lastChild.isCollapsed) {
|
|
1453
|
-
callback(lastChild, false);
|
|
1454
|
-
}
|
|
1455
|
-
lastChild = lv;
|
|
1456
|
-
});
|
|
1457
|
-
return true;
|
|
1458
|
-
});
|
|
1459
|
-
if (lastChild && !lastChild.isCollapsed) {
|
|
1460
|
-
callback(lastChild, true);
|
|
1461
|
-
}
|
|
801
|
+
_setGridTemplateColumns(_parseGridTemplates(value), this);
|
|
1462
802
|
}
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
}
|
|
1473
|
-
_addChildFromBuilder(name, value) {
|
|
1474
|
-
this._children.push(value);
|
|
1475
|
-
value._isMasonChild = true;
|
|
1476
|
-
this._addView(value);
|
|
803
|
+
};
|
|
804
|
+
ViewBase = __decorate([
|
|
805
|
+
CSSType('View'),
|
|
806
|
+
__metadata("design:paramtypes", [])
|
|
807
|
+
], ViewBase);
|
|
808
|
+
export { ViewBase };
|
|
809
|
+
let TextBase = class TextBase extends ViewBase {
|
|
810
|
+
constructor() {
|
|
811
|
+
super();
|
|
1477
812
|
}
|
|
1478
813
|
};
|
|
1479
|
-
|
|
1480
|
-
CSSType('
|
|
814
|
+
TextBase = __decorate([
|
|
815
|
+
CSSType('Text'),
|
|
1481
816
|
__metadata("design:paramtypes", [])
|
|
1482
|
-
],
|
|
1483
|
-
export {
|
|
817
|
+
], TextBase);
|
|
818
|
+
export { TextBase };
|
|
819
|
+
textProperty.register(TextBase);
|
|
820
|
+
textWrapProperty.register(TextBase);
|
|
821
|
+
/**
|
|
822
|
+
* Props are already defined in core flexbox layout,
|
|
823
|
+
* overriding them breaks the core flexbox layout.
|
|
824
|
+
*/
|
|
825
|
+
// flexDirectionProperty.register(Style);
|
|
826
|
+
// flexWrapProperty.register(Style);
|
|
827
|
+
// flexGrowProperty.register(Style);
|
|
828
|
+
// flexShrinkProperty.register(Style);
|
|
829
|
+
alignItemsProperty.register(Style);
|
|
830
|
+
alignSelfProperty.register(Style);
|
|
831
|
+
justifyContentProperty.register(Style);
|
|
1484
832
|
displayProperty.register(Style);
|
|
1485
833
|
maxWidthProperty.register(Style);
|
|
1486
834
|
maxHeightProperty.register(Style);
|
|
1487
835
|
positionProperty.register(Style);
|
|
1488
|
-
flexDirectionProperty.register(Style);
|
|
1489
|
-
flexWrapProperty.register(Style);
|
|
1490
836
|
leftProperty.register(Style);
|
|
1491
837
|
rightProperty.register(Style);
|
|
1492
838
|
topProperty.register(Style);
|
|
1493
839
|
bottomProperty.register(Style);
|
|
1494
840
|
flexBasisProperty.register(Style);
|
|
1495
|
-
flexGrowProperty.register(Style);
|
|
1496
|
-
flexShrinkProperty.register(Style);
|
|
1497
841
|
rowGapProperty.register(Style);
|
|
1498
842
|
columnGapProperty.register(Style);
|
|
1499
843
|
gridRowGapProperty.register(Style);
|
|
1500
844
|
gridColumnGapProperty.register(Style);
|
|
1501
845
|
gapProperty.register(Style);
|
|
1502
|
-
gridGapProperty.register(Style);
|
|
1503
846
|
aspectRatioProperty.register(Style);
|
|
1504
|
-
alignItemsProperty.register(Style);
|
|
1505
|
-
alignSelfProperty.register(Style);
|
|
1506
847
|
alignContentProperty.register(Style);
|
|
1507
848
|
justifyItemsProperty.register(Style);
|
|
1508
849
|
justifySelfProperty.register(Style);
|
|
1509
|
-
justifyContentProperty.register(Style);
|
|
1510
850
|
gridAutoRowsProperty.register(Style);
|
|
1511
851
|
gridAutoColumnsProperty.register(Style);
|
|
1512
852
|
gridAutoFlowProperty.register(Style);
|
|
@@ -1519,5 +859,74 @@ gridRowStartProperty.register(Style);
|
|
|
1519
859
|
gridRowEndProperty.register(Style);
|
|
1520
860
|
gridTemplateRowsProperty.register(Style);
|
|
1521
861
|
gridTemplateColumnsProperty.register(Style);
|
|
1522
|
-
|
|
862
|
+
overflowProperty.register(Style);
|
|
863
|
+
overflowXProperty.register(Style);
|
|
864
|
+
overflowYProperty.register(Style);
|
|
865
|
+
scrollBarWidthProperty.register(Style);
|
|
866
|
+
flexFlowProperty.register(Style);
|
|
867
|
+
flexProperty.register(Style);
|
|
868
|
+
function parseShorthandPositioning(value) {
|
|
869
|
+
const arr = value.split(/[ ,]+/);
|
|
870
|
+
let top;
|
|
871
|
+
let right;
|
|
872
|
+
let bottom;
|
|
873
|
+
let left;
|
|
874
|
+
if (arr.length === 1) {
|
|
875
|
+
top = arr[0];
|
|
876
|
+
right = arr[0];
|
|
877
|
+
bottom = arr[0];
|
|
878
|
+
left = arr[0];
|
|
879
|
+
}
|
|
880
|
+
else if (arr.length === 2) {
|
|
881
|
+
top = arr[0];
|
|
882
|
+
bottom = arr[0];
|
|
883
|
+
right = arr[1];
|
|
884
|
+
left = arr[1];
|
|
885
|
+
}
|
|
886
|
+
else if (arr.length === 3) {
|
|
887
|
+
top = arr[0];
|
|
888
|
+
right = arr[1];
|
|
889
|
+
left = arr[1];
|
|
890
|
+
bottom = arr[2];
|
|
891
|
+
}
|
|
892
|
+
else if (arr.length === 4) {
|
|
893
|
+
top = arr[0];
|
|
894
|
+
right = arr[1];
|
|
895
|
+
bottom = arr[2];
|
|
896
|
+
left = arr[3];
|
|
897
|
+
}
|
|
898
|
+
else {
|
|
899
|
+
throw new Error('Expected 1, 2, 3 or 4 parameters. Actual: ' + value);
|
|
900
|
+
}
|
|
901
|
+
return {
|
|
902
|
+
top: top,
|
|
903
|
+
right: right,
|
|
904
|
+
bottom: bottom,
|
|
905
|
+
left: left,
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
function convertToPaddings(value) {
|
|
909
|
+
if (typeof value === 'string' && value !== 'auto') {
|
|
910
|
+
const thickness = parseShorthandPositioning(value);
|
|
911
|
+
return [
|
|
912
|
+
[paddingTopProperty, CoreLength.parse(thickness.top)],
|
|
913
|
+
[paddingRightProperty, CoreLength.parse(thickness.right)],
|
|
914
|
+
[paddingBottomProperty, CoreLength.parse(thickness.bottom)],
|
|
915
|
+
[paddingLeftProperty, CoreLength.parse(thickness.left)],
|
|
916
|
+
];
|
|
917
|
+
}
|
|
918
|
+
else {
|
|
919
|
+
return [
|
|
920
|
+
[paddingTopProperty, value],
|
|
921
|
+
[paddingRightProperty, value],
|
|
922
|
+
[paddingBottomProperty, value],
|
|
923
|
+
[paddingLeftProperty, value],
|
|
924
|
+
];
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
paddingProperty.register(Style);
|
|
928
|
+
paddingLeftProperty.register(Style);
|
|
929
|
+
paddingRightProperty.register(Style);
|
|
930
|
+
paddingTopProperty.register(Style);
|
|
931
|
+
paddingBottomProperty.register(Style);
|
|
1523
932
|
//# sourceMappingURL=common.js.map
|