@triniwiz/nativescript-masonkit 1.0.0-alpha.7 → 1.0.0-alpha.8
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 +53 -28
- package/common.js +355 -704
- package/common.js.map +1 -1
- package/helpers.d.ts +98 -98
- package/helpers.js +395 -2945
- package/helpers.js.map +1 -1
- package/index.android.d.ts +28 -24
- package/index.android.js +109 -82
- package/index.android.js.map +1 -1
- package/index.d.ts +56 -19
- package/index.ios.d.ts +42 -24
- package/index.ios.js +279 -121
- 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/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 +251 -267
- 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 +213 -843
- 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 +17822 -19248
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +404 -310
- 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 +404 -310
- 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 +502 -534
- 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 +213 -843
- 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 +17822 -19248
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +404 -310
- 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 +404 -310
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +17822 -19248
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +404 -310
- 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 +404 -310
- 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 +5 -1
- package/platforms/ios/prebuild.sh +101 -0
- package/{pods → src-native/pods}/NativeScript.podspec +1 -1
- package/style.d.ts +166 -0
- package/style.js +1686 -0
- package/style.js.map +1 -0
- package/platforms/ios/src/MasonV8Module.h +0 -583
- package/platforms/ios/src/MasonV8Module.mm +0 -1005
- package/platforms/ios/src/cpp/include/mason_native.h +0 -972
- package/platforms/ios/src/cpp/include/robin_hood.h +0 -2544
- package/platforms/ios/src/module.modulemap +0 -4
- /package/{pods → src-native/pods}/Headers/include/APIDesign.md +0 -0
- /package/{pods → src-native/pods}/Headers/include/DEPS +0 -0
- /package/{pods → src-native/pods}/Headers/include/DIR_METADATA +0 -0
- /package/{pods → src-native/pods}/Headers/include/OWNERS +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/DEPS +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/OWNERS +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/README.md +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/allocation.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/common.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/cross-thread-persistent.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/custom-space.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/default-platform.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/ephemeron-pair.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/explicit-management.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/garbage-collected.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/heap-consistency.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/heap-state.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/heap-statistics.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/heap.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/api-constants.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/compiler-specific.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/finalizer-trait.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/gc-info.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/logging.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/name-trait.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/persistent-node.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/pointer-policies.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/internal/write-barrier.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/liveness-broker.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/macros.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/member.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/name-provider.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/object-size-trait.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/persistent.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/platform.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/prefinalizer.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/process-heap-statistics.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/sentinel-pointer.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/source-location.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/testing.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/trace-trait.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/type-traits.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/cppgc/visitor.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/js_protocol-1.2.json +0 -0
- /package/{pods → src-native/pods}/Headers/include/js_protocol-1.3.json +0 -0
- /package/{pods → src-native/pods}/Headers/include/js_protocol.pdl +0 -0
- /package/{pods → src-native/pods}/Headers/include/libffi/arm64/ffi.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/libffi/arm64/ffitarget.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/libffi/x86_64/ffi.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/libffi/x86_64/ffitarget.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/libffi.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/libplatform/DEPS +0 -0
- /package/{pods → src-native/pods}/Headers/include/libplatform/libplatform-export.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/libplatform/libplatform.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/libplatform/v8-tracing.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-array-buffer.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-callbacks.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-container.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-context.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-cppgc.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-data.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-date.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-debug.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-embedder-heap.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-embedder-state-scope.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-exception.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-extension.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-external.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-fast-api-calls.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-forward.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-function-callback.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-function.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-initialization.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-inspector-protocol.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-inspector.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-internal.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-isolate.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-json.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-local-handle.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-locker.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-maybe.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-memory-span.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-message.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-metrics.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-microtask-queue.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-microtask.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-object.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-persistent-handle.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-platform.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-primitive-object.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-primitive.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-profiler.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-promise.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-proxy.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-regexp.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-script.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-snapshot.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-statistics.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-template.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-traced-handle.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-typed-array.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-unwinder-state.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-unwinder.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-util.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-value-serializer-version.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-value-serializer.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-value.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-version-string.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-version.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-wasm-trap-handler-posix.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-wasm-trap-handler-win.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-wasm.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8-weak-callback-info.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8.h +0 -0
- /package/{pods → src-native/pods}/Headers/include/v8config.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/InspectorServer.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/JsV8InspectorClient.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/base64.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/address-region.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/atomic-utils.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/atomicops.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/base-export.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/bits.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/build_config.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/compiler-specific.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/export-template.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/flags.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/immediate-crash.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/lazy-instance.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/logging.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/macros.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/memory.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/once.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/optional.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/mutex.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/platform.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/semaphore.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/v8-time.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/platform/wrappers.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/safe_conversions.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/safe_conversions_impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/template-utils.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/base/v8-fallthrough.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/common/checks.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/common/globals.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/debug/debug-interface.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/debug/interface-types.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/init/v8.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/custom-preview.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/injected-script.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/inspected-context.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/CSS.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Console.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/DOM.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Debugger.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Forward.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Log.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Network.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Overlay.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Page.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Profiler.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Protocol.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Runtime.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Schema.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/protocol/Security.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/remote-object-id.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/search-util.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/string-16.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/string-util.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-console-message.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-console.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-debugger-id.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-debugger-script.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-debugger.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-regex.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-string-conversions.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/v8-value-utils.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/inspector/value-mirror.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/libplatform/default-platform.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/logging/tracing-flags.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/numbers/conversions.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/tracing/trace-event.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/utils/allocation.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/src/utils/vector.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/utils.h +0 -0
- /package/{pods → src-native/pods}/Headers/inspector/v8-inspector-platform.h +0 -0
- /package/{pods → src-native/pods}/Headers/jsi/decorator.h +0 -0
- /package/{pods → src-native/pods}/Headers/jsi/instrumentation.h +0 -0
- /package/{pods → src-native/pods}/Headers/jsi/jsi-inl.h +0 -0
- /package/{pods → src-native/pods}/Headers/jsi/jsi.h +0 -0
- /package/{pods → src-native/pods}/Headers/jsi/jsilib.h +0 -0
- /package/{pods → src-native/pods}/Headers/jsi/threadsafe.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/ArgConverter.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/ArrayAdapter.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Caches.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/ClassBuilder.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Common.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/ConcurrentMap.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/ConcurrentQueue.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Console.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Constants.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/DataWrapper.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/DictionaryAdapter.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/ExtVector.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/FFICall.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/FastEnumerationAdapter.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/FunctionReference.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Helpers.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/InlineFunctions.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Interop.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/KnownUnknownClassPair.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Metadata.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/MetadataBuilder.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/MetadataInlines.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/ModuleInternal.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/NSDataAdapter.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/NativeScriptException.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/ObjectManager.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/OneByteStringResource.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Pointer.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/PromiseProxy.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Reference.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Runtime.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/RuntimeConfig.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/SetTimeout.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/SimpleAllocator.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/StringHasher.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/SymbolIterator.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/SymbolLoader.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/TNSDerivedClass.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/TSHelpers.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Tasks.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/UnmanagedType.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/WeakRef.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/Worker.h +0 -0
- /package/{pods → src-native/pods}/Headers/runtime/robin_hood.h +0 -0
- /package/{pods → src-native/pods}/Headers/v8runtime/HostProxy.h +0 -0
- /package/{pods → src-native/pods}/Headers/v8runtime/JSIV8ValueConverter.h +0 -0
- /package/{pods → src-native/pods}/Headers/v8runtime/V8PointerValue.h +0 -0
- /package/{pods → src-native/pods}/Headers/v8runtime/V8Runtime.h +0 -0
- /package/{pods → src-native/pods}/Headers/v8runtime/V8RuntimeConfig.h +0 -0
- /package/{pods → src-native/pods}/Headers/v8runtime/V8RuntimeFactory.h +0 -0
package/common.js
CHANGED
|
@@ -1,583 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
3
|
-
import { CSSType, CssProperty, CustomLayoutView, Length as NSLength, ShorthandProperty, Style, View
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// if (!widgetMasonView) {
|
|
9
|
-
// widgetMasonView = org.nativescript.mason.masonkit.View;
|
|
10
|
-
// }
|
|
11
|
-
// }
|
|
12
|
-
// function makeNativeSetter<T>(setter: (lp: org.nativescript.widgets.FlexboxLayout.LayoutParams, value: T) => void) {
|
|
13
|
-
// return function (this: View, value: T) {
|
|
14
|
-
// ensureNativeTypes();
|
|
15
|
-
// const nativeView: android.view.View = this.nativeViewProtected;
|
|
16
|
-
// const lp = nativeView.getLayoutParams() || new widgetLayoutParams();
|
|
17
|
-
// if (lp instanceof widgetLayoutParams) {
|
|
18
|
-
// setter(lp, value);
|
|
19
|
-
// nativeView.setLayoutParams(lp);
|
|
20
|
-
// }
|
|
21
|
-
// };
|
|
22
|
-
// }
|
|
23
|
-
export function applyMixins(derivedCtor, baseCtors, options) {
|
|
24
|
-
const omits = options && options.omit ? options.omit : [];
|
|
25
|
-
baseCtors.forEach((baseCtor) => {
|
|
26
|
-
Object.getOwnPropertyNames(baseCtor.prototype).forEach((name) => {
|
|
27
|
-
if (omits.indexOf(name) !== -1) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const descriptor = Object.getOwnPropertyDescriptor(baseCtor.prototype, name);
|
|
31
|
-
if (name === 'constructor')
|
|
32
|
-
return;
|
|
33
|
-
if (descriptor && (descriptor.get || descriptor.set)) {
|
|
34
|
-
Object.defineProperty(derivedCtor.prototype, name, descriptor);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
const oldImpl = derivedCtor.prototype[name];
|
|
38
|
-
if (!oldImpl) {
|
|
39
|
-
derivedCtor.prototype[name] = baseCtor.prototype[name];
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
derivedCtor.prototype[name] = function (...args) {
|
|
43
|
-
if (options) {
|
|
44
|
-
if (options.override) {
|
|
45
|
-
return baseCtor.prototype[name].apply(this, args);
|
|
46
|
-
}
|
|
47
|
-
else if (options.after) {
|
|
48
|
-
return baseCtor.prototype[name].apply(this, args);
|
|
49
|
-
}
|
|
50
|
-
else if (options.overrideIfExists) {
|
|
51
|
-
if (this[options.overrideIfExists]) {
|
|
52
|
-
return baseCtor.prototype[name].apply(this, args);
|
|
53
|
-
}
|
|
54
|
-
return oldImpl.apply(this, args);
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
baseCtor.prototype[name].apply(this, args);
|
|
58
|
-
return oldImpl.apply(this, args);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
baseCtor.prototype[name].apply(this, args);
|
|
63
|
-
return oldImpl.apply(this, args);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
Object.getOwnPropertySymbols(baseCtor.prototype).forEach((symbol) => {
|
|
70
|
-
if (omits.indexOf(symbol) !== -1) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
const oldImpl = derivedCtor.prototype[symbol];
|
|
74
|
-
if (!oldImpl) {
|
|
75
|
-
derivedCtor.prototype[symbol] = baseCtor.prototype[symbol];
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
derivedCtor.prototype[symbol] = function (...args) {
|
|
79
|
-
if (options) {
|
|
80
|
-
if (options.override) {
|
|
81
|
-
return baseCtor.prototype[symbol].apply(this, args);
|
|
82
|
-
}
|
|
83
|
-
if (options.overrideIfExists) {
|
|
84
|
-
if (this[options.overrideIfExists]) {
|
|
85
|
-
return baseCtor.prototype[symbol].apply(this, args);
|
|
86
|
-
}
|
|
87
|
-
return oldImpl.apply(this, args);
|
|
88
|
-
}
|
|
89
|
-
else if (options.after) {
|
|
90
|
-
oldImpl.apply(this, args);
|
|
91
|
-
return baseCtor.prototype[symbol].apply(this, args);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
baseCtor.prototype[symbol].apply(this, args);
|
|
95
|
-
return oldImpl.apply(this, args);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
baseCtor.prototype[symbol].apply(this, args);
|
|
100
|
-
return oldImpl.apply(this, args);
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
let mixinInstalled = false;
|
|
108
|
-
export function overrideViewBase() {
|
|
109
|
-
const NSView = require('@nativescript/core').View;
|
|
110
|
-
class ViewOverride extends View {
|
|
111
|
-
constructor() {
|
|
112
|
-
super(...arguments);
|
|
113
|
-
this._isMasonView = false;
|
|
114
|
-
this._isMasonChild = false;
|
|
115
|
-
}
|
|
116
|
-
get _isMasonViewOrChild() {
|
|
117
|
-
return this._isMasonView || this._isMasonChild;
|
|
118
|
-
}
|
|
119
|
-
/* Short Props */
|
|
120
|
-
set gridRowGap(value) {
|
|
121
|
-
this.style.gridRowGap = value;
|
|
122
|
-
}
|
|
123
|
-
get gridRowGap() {
|
|
124
|
-
return this.style.gridRowGap;
|
|
125
|
-
}
|
|
126
|
-
set gridGap(value) {
|
|
127
|
-
this.style.gridGap = value;
|
|
128
|
-
}
|
|
129
|
-
get gridGap() {
|
|
130
|
-
return this.style.gridGap;
|
|
131
|
-
}
|
|
132
|
-
set gap(value) {
|
|
133
|
-
this.style.gap = value;
|
|
134
|
-
}
|
|
135
|
-
get gap() {
|
|
136
|
-
return this.style.gap;
|
|
137
|
-
}
|
|
138
|
-
set gridArea(value) {
|
|
139
|
-
this.style.gridArea = value;
|
|
140
|
-
}
|
|
141
|
-
get gridArea() {
|
|
142
|
-
return this.style.gridArea;
|
|
143
|
-
}
|
|
144
|
-
set gridColumn(value) {
|
|
145
|
-
this.style.gridColumn = value;
|
|
146
|
-
}
|
|
147
|
-
get gridColumn() {
|
|
148
|
-
return this.style.gridColumn;
|
|
149
|
-
}
|
|
150
|
-
set gridRow(value) {
|
|
151
|
-
this.style.gridRow = value;
|
|
152
|
-
}
|
|
153
|
-
get gridRow() {
|
|
154
|
-
return this.style.gridColumn;
|
|
155
|
-
}
|
|
156
|
-
/* Short Props */
|
|
157
|
-
get display() {
|
|
158
|
-
return _getDisplay(this);
|
|
159
|
-
}
|
|
160
|
-
set display(value) {
|
|
161
|
-
this.style.display = value;
|
|
162
|
-
}
|
|
163
|
-
[displayProperty.setNative](value) {
|
|
164
|
-
_setDisplay(value, this);
|
|
165
|
-
}
|
|
166
|
-
set position(value) {
|
|
167
|
-
this.style.position = value;
|
|
168
|
-
}
|
|
169
|
-
get position() {
|
|
170
|
-
return _getPosition(this);
|
|
171
|
-
}
|
|
172
|
-
[positionProperty.setNative](value) {
|
|
173
|
-
_setPosition(value, this);
|
|
174
|
-
}
|
|
175
|
-
set flexDirection(value) {
|
|
176
|
-
this.style.flexDirection = value;
|
|
177
|
-
}
|
|
178
|
-
get flexDirection() {
|
|
179
|
-
return _getFlexDirection(this);
|
|
180
|
-
}
|
|
181
|
-
[flexDirectionProperty.setNative](value) {
|
|
182
|
-
_setFlexDirection(value, this);
|
|
183
|
-
}
|
|
184
|
-
set flexWrap(value) {
|
|
185
|
-
this.style.flexWrap = value;
|
|
186
|
-
}
|
|
187
|
-
get flexWrap() {
|
|
188
|
-
return _getFlexWrap(this);
|
|
189
|
-
}
|
|
190
|
-
[flexWrapProperty.setNative](value) {
|
|
191
|
-
_setFlexWrap(value, this);
|
|
192
|
-
}
|
|
193
|
-
set alignItems(value) {
|
|
194
|
-
this.style.alignItems = value;
|
|
195
|
-
}
|
|
196
|
-
get alignItems() {
|
|
197
|
-
return _getAlignItems(this);
|
|
198
|
-
}
|
|
199
|
-
[alignItemsProperty.setNative](value) {
|
|
200
|
-
_setAlignItems(value, this);
|
|
201
|
-
}
|
|
202
|
-
//@ts-ignore
|
|
203
|
-
set alignSelf(value) {
|
|
204
|
-
this.style.alignSelf = value;
|
|
205
|
-
}
|
|
206
|
-
//@ts-ignore
|
|
207
|
-
get alignSelf() {
|
|
208
|
-
return _getAlignSelf(this);
|
|
209
|
-
}
|
|
210
|
-
[alignSelfProperty.setNative](value) {
|
|
211
|
-
_setAlignSelf(value, this);
|
|
212
|
-
}
|
|
213
|
-
set alignContent(value) {
|
|
214
|
-
this.style.alignContent = value;
|
|
215
|
-
}
|
|
216
|
-
get alignContent() {
|
|
217
|
-
return _getAlignContent(this);
|
|
218
|
-
}
|
|
219
|
-
[alignContentProperty.setNative](value) {
|
|
220
|
-
_setAlignContent(value, this);
|
|
221
|
-
}
|
|
222
|
-
set justifyItems(value) {
|
|
223
|
-
this.style.justifyItems = value;
|
|
224
|
-
}
|
|
225
|
-
get justifyItems() {
|
|
226
|
-
return _getJustifyItems(this);
|
|
227
|
-
}
|
|
228
|
-
[justifyItemsProperty.setNative](value) {
|
|
229
|
-
_setJustifyItems(value, this);
|
|
230
|
-
}
|
|
231
|
-
set justifySelf(value) {
|
|
232
|
-
this.style.justifySelf = value;
|
|
233
|
-
}
|
|
234
|
-
get justifySelf() {
|
|
235
|
-
return _getJustifySelf(this);
|
|
236
|
-
}
|
|
237
|
-
[justifySelfProperty.setNative](value) {
|
|
238
|
-
_setJustifySelf(value, this);
|
|
239
|
-
}
|
|
240
|
-
set justifyContent(value) {
|
|
241
|
-
this.style.justifyContent = value;
|
|
242
|
-
}
|
|
243
|
-
get justifyContent() {
|
|
244
|
-
return _getJustifyContent(this);
|
|
245
|
-
}
|
|
246
|
-
[justifyContentProperty.setNative](value) {
|
|
247
|
-
_setJustifyContent(value, this);
|
|
248
|
-
}
|
|
249
|
-
//@ts-ignore
|
|
250
|
-
set left(value) {
|
|
251
|
-
this.style.left = value;
|
|
252
|
-
}
|
|
253
|
-
get left() {
|
|
254
|
-
return this.style.left;
|
|
255
|
-
}
|
|
256
|
-
[leftProperty.setNative](value) {
|
|
257
|
-
_setLeft(value, this);
|
|
258
|
-
}
|
|
259
|
-
//@ts-ignore
|
|
260
|
-
set right(value) {
|
|
261
|
-
this.style.right = value;
|
|
262
|
-
}
|
|
263
|
-
get right() {
|
|
264
|
-
return this.style.right;
|
|
265
|
-
}
|
|
266
|
-
[rightProperty.setNative](value) {
|
|
267
|
-
_setRight(value, this);
|
|
268
|
-
}
|
|
269
|
-
//@ts-ignore
|
|
270
|
-
set top(value) {
|
|
271
|
-
this.style.top = value;
|
|
272
|
-
}
|
|
273
|
-
get top() {
|
|
274
|
-
return this.style.top;
|
|
275
|
-
}
|
|
276
|
-
[topProperty.setNative](value) {
|
|
277
|
-
_setTop(value, this);
|
|
278
|
-
}
|
|
279
|
-
//@ts-ignore
|
|
280
|
-
set bottom(value) {
|
|
281
|
-
this.style.bottom = value;
|
|
282
|
-
}
|
|
283
|
-
get bottom() {
|
|
284
|
-
return this.style.bottom;
|
|
285
|
-
}
|
|
286
|
-
[bottomProperty.setNative](value) {
|
|
287
|
-
_setBottom(value, this);
|
|
288
|
-
}
|
|
289
|
-
[marginLeftProperty.setNative](value) {
|
|
290
|
-
_setMarginLeft(value, this);
|
|
291
|
-
}
|
|
292
|
-
[marginRightProperty.setNative](value) {
|
|
293
|
-
_setMarginRight(value, this);
|
|
294
|
-
}
|
|
295
|
-
[marginTopProperty.setNative](value) {
|
|
296
|
-
_setMarginTop(value, this);
|
|
297
|
-
}
|
|
298
|
-
[marginBottomProperty.setNative](value) {
|
|
299
|
-
_setMarginBottom(value, this);
|
|
300
|
-
}
|
|
301
|
-
[borderLeftWidthProperty.setNative](value) {
|
|
302
|
-
_setBorderLeft(value, this);
|
|
303
|
-
}
|
|
304
|
-
[borderRightWidthProperty.setNative](value) {
|
|
305
|
-
_setBorderRight(value, this);
|
|
306
|
-
}
|
|
307
|
-
[borderTopWidthProperty.setNative](value) {
|
|
308
|
-
_setBorderTop(value, this);
|
|
309
|
-
}
|
|
310
|
-
[borderBottomWidthProperty.setNative](value) {
|
|
311
|
-
_setBorderBottom(value, this);
|
|
312
|
-
}
|
|
313
|
-
//@ts-ignore
|
|
314
|
-
get flexGrow() {
|
|
315
|
-
return _getFlexGrow(this);
|
|
316
|
-
}
|
|
317
|
-
set flexGrow(value) {
|
|
318
|
-
this.style.flexGrow = value;
|
|
319
|
-
}
|
|
320
|
-
[flexGrowProperty.setNative](value) {
|
|
321
|
-
_setFlexGrow(value, this);
|
|
322
|
-
}
|
|
323
|
-
get flex() {
|
|
324
|
-
return this.style.flex;
|
|
325
|
-
}
|
|
326
|
-
set flex(value) {
|
|
327
|
-
this.style.flex = value;
|
|
328
|
-
}
|
|
329
|
-
get flexFlow() {
|
|
330
|
-
return this.style.flexFlow;
|
|
331
|
-
}
|
|
332
|
-
set flexFlow(value) {
|
|
333
|
-
this.style.flexFlow = value;
|
|
334
|
-
}
|
|
335
|
-
//@ts-ignore
|
|
336
|
-
get flexShrink() {
|
|
337
|
-
return _getFlexShrink(this);
|
|
338
|
-
}
|
|
339
|
-
set flexShrink(value) {
|
|
340
|
-
this.style.flexShrink = value;
|
|
341
|
-
}
|
|
342
|
-
[flexShrinkProperty.setNative](value) {
|
|
343
|
-
_setFlexShrink(value, this);
|
|
344
|
-
}
|
|
345
|
-
//@ts-ignore
|
|
346
|
-
get flexBasis() {
|
|
347
|
-
return _getFlexBasis(this);
|
|
348
|
-
}
|
|
349
|
-
set flexBasis(value) {
|
|
350
|
-
this.style.flexBasis = value;
|
|
351
|
-
}
|
|
352
|
-
[flexBasisProperty.setNative](value) {
|
|
353
|
-
_setFlexBasis(value, this);
|
|
354
|
-
}
|
|
355
|
-
/* faster setter/getter
|
|
356
|
-
//@ts-ignore
|
|
357
|
-
get gap() {
|
|
358
|
-
return _getGap(this as any);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
set gap(value) {
|
|
362
|
-
this.style.gap = value;
|
|
363
|
-
_setGap(value, this as any);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
*/
|
|
367
|
-
set rowGap(value) {
|
|
368
|
-
this.style.rowGap = value;
|
|
369
|
-
}
|
|
370
|
-
get rowGap() {
|
|
371
|
-
return _getRowGap(this);
|
|
372
|
-
}
|
|
373
|
-
[rowGapProperty.setNative](value) {
|
|
374
|
-
_setRowGap(value, this);
|
|
375
|
-
}
|
|
376
|
-
set columnGap(value) {
|
|
377
|
-
this.style.columnGap = value;
|
|
378
|
-
}
|
|
379
|
-
get columnGap() {
|
|
380
|
-
return _getColumnGap(this);
|
|
381
|
-
}
|
|
382
|
-
[columnGapProperty.setNative](value) {
|
|
383
|
-
_setColumnGap(value, this);
|
|
384
|
-
}
|
|
385
|
-
get aspectRatio() {
|
|
386
|
-
return _getAspectRatio(this);
|
|
387
|
-
}
|
|
388
|
-
[aspectRatioProperty.setNative](value) {
|
|
389
|
-
_setAspectRatio(value, this);
|
|
390
|
-
}
|
|
391
|
-
[paddingLeftProperty.setNative](value) {
|
|
392
|
-
_setPaddingLeft(value, this);
|
|
393
|
-
}
|
|
394
|
-
[paddingTopProperty.setNative](value) {
|
|
395
|
-
_setPaddingTop(value, this);
|
|
396
|
-
}
|
|
397
|
-
[paddingRightProperty.setNative](value) {
|
|
398
|
-
_setPaddingRight(value, this);
|
|
399
|
-
}
|
|
400
|
-
[paddingBottomProperty.setNative](value) {
|
|
401
|
-
_setPaddingBottom(value, this);
|
|
402
|
-
}
|
|
403
|
-
//@ts-ignore
|
|
404
|
-
set minWidth(value) {
|
|
405
|
-
this.style.minWidth = value;
|
|
406
|
-
}
|
|
407
|
-
[minWidthProperty.setNative](value) {
|
|
408
|
-
_setMinWidth(value, this);
|
|
409
|
-
}
|
|
410
|
-
//@ts-ignore
|
|
411
|
-
set minHeight(value) {
|
|
412
|
-
this.style.minHeight = value;
|
|
413
|
-
}
|
|
414
|
-
[minHeightProperty.setNative](value) {
|
|
415
|
-
_setMinHeight(value, this);
|
|
416
|
-
}
|
|
417
|
-
//@ts-ignore
|
|
418
|
-
set width(value) {
|
|
419
|
-
this.style.width = value;
|
|
420
|
-
}
|
|
421
|
-
get width() {
|
|
422
|
-
return _getWidth(this);
|
|
423
|
-
}
|
|
424
|
-
[widthProperty.setNative](value) {
|
|
425
|
-
_setWidth(value, this);
|
|
426
|
-
}
|
|
427
|
-
//@ts-ignore
|
|
428
|
-
set height(value) {
|
|
429
|
-
this.style.height = value;
|
|
430
|
-
}
|
|
431
|
-
//@ts-ignore
|
|
432
|
-
get height() {
|
|
433
|
-
return _getHeight(this);
|
|
434
|
-
}
|
|
435
|
-
[heightProperty.setNative](value) {
|
|
436
|
-
_setHeight(value, this);
|
|
437
|
-
}
|
|
438
|
-
set maxWidth(value) {
|
|
439
|
-
this.style.maxWidth = value;
|
|
440
|
-
}
|
|
441
|
-
[maxWidthProperty.setNative](value) {
|
|
442
|
-
_setMaxWidth(value, this);
|
|
443
|
-
}
|
|
444
|
-
//@ts-ignore
|
|
445
|
-
set maxHeight(value) {
|
|
446
|
-
this.style.maxHeight = value;
|
|
447
|
-
}
|
|
448
|
-
[maxHeightProperty.setNative](value) {
|
|
449
|
-
_setMaxHeight(value, this);
|
|
450
|
-
}
|
|
451
|
-
//@ts-ignore
|
|
452
|
-
set gridAutoRows(value) {
|
|
453
|
-
this.style.gridAutoRows = value;
|
|
454
|
-
}
|
|
455
|
-
//@ts-ignore
|
|
456
|
-
get gridAutoRows() {
|
|
457
|
-
return this.style.gridAutoRows;
|
|
458
|
-
}
|
|
459
|
-
[gridAutoRowsProperty.setNative](value) {
|
|
460
|
-
_setGridAutoRows(value, this);
|
|
461
|
-
}
|
|
462
|
-
//@ts-ignore
|
|
463
|
-
set gridAutoColumns(value) {
|
|
464
|
-
this.style.gridAutoColumns = value;
|
|
465
|
-
}
|
|
466
|
-
get gridAutoColumns() {
|
|
467
|
-
return this.style.gridAutoColumns;
|
|
468
|
-
}
|
|
469
|
-
[gridAutoColumnsProperty.setNative](value) {
|
|
470
|
-
_setGridAutoColumns(value, this);
|
|
471
|
-
}
|
|
472
|
-
set gridAutoFlow(value) {
|
|
473
|
-
this.style.gridAutoFlow = value;
|
|
474
|
-
}
|
|
475
|
-
get gridAutoFlow() {
|
|
476
|
-
return this.style.gridAutoFlow;
|
|
477
|
-
}
|
|
478
|
-
[gridAutoFlowProperty.setNative](value) {
|
|
479
|
-
_setGridAutoFlow(value, this);
|
|
480
|
-
}
|
|
481
|
-
set gridColumnStart(value) {
|
|
482
|
-
this.style.gridColumnStart = value;
|
|
483
|
-
}
|
|
484
|
-
get gridColumnStart() {
|
|
485
|
-
return this.style.gridColumnStart;
|
|
486
|
-
}
|
|
487
|
-
[gridColumnStartProperty.setNative](value) {
|
|
488
|
-
_setGridColumnStart(value, this);
|
|
489
|
-
}
|
|
490
|
-
set gridColumnEnd(value) {
|
|
491
|
-
this.style.gridColumnEnd = value;
|
|
492
|
-
}
|
|
493
|
-
get gridColumnEnd() {
|
|
494
|
-
return this.style.gridColumnEnd;
|
|
495
|
-
}
|
|
496
|
-
[gridColumnEndProperty.setNative](value) {
|
|
497
|
-
_setGridColumnEnd(value, this);
|
|
498
|
-
}
|
|
499
|
-
set gridRowStart(value) {
|
|
500
|
-
this.style.gridRowStart = value;
|
|
501
|
-
}
|
|
502
|
-
get gridRowStart() {
|
|
503
|
-
return this.style.gridRowStart;
|
|
504
|
-
}
|
|
505
|
-
[gridRowStartProperty.setNative](value) {
|
|
506
|
-
_setGridRowStart(value, this);
|
|
507
|
-
}
|
|
508
|
-
set gridRowEnd(value) {
|
|
509
|
-
this.style.gridRowEnd = value;
|
|
510
|
-
}
|
|
511
|
-
get gridRowEnd() {
|
|
512
|
-
return this.style.gridRowEnd;
|
|
513
|
-
}
|
|
514
|
-
[gridRowEndProperty.setNative](value) {
|
|
515
|
-
_setGridRowEnd(value, this);
|
|
516
|
-
}
|
|
517
|
-
set gridTemplateRows(value) {
|
|
518
|
-
this.style.gridTemplateRows = value;
|
|
519
|
-
}
|
|
520
|
-
[gridTemplateRowsProperty.setNative](value) {
|
|
521
|
-
const templates = _parseGridTemplates(value);
|
|
522
|
-
if (templates) {
|
|
523
|
-
_setGridTemplateRows(templates, this);
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
set gridTemplateColumns(value) {
|
|
527
|
-
this.style.gridTemplateColumns = value;
|
|
528
|
-
}
|
|
529
|
-
[gridTemplateColumnsProperty.setNative](value) {
|
|
530
|
-
const templates = _parseGridTemplates(value);
|
|
531
|
-
if (templates) {
|
|
532
|
-
_setGridTemplateColumns(templates, this);
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
get scrollBarWidth() {
|
|
536
|
-
return getScrollbarWidth(this);
|
|
537
|
-
}
|
|
538
|
-
set scrollBarWidth(value) {
|
|
539
|
-
this.style.scrollBarWidth = value;
|
|
540
|
-
}
|
|
541
|
-
[scrollBarWidthProperty.setNative](value) {
|
|
542
|
-
_setScrollbarWidth(value, this);
|
|
543
|
-
}
|
|
544
|
-
get overflow() {
|
|
545
|
-
return _getOverflow(this);
|
|
546
|
-
}
|
|
547
|
-
set overflow(value) {
|
|
548
|
-
this.style.overflow = value;
|
|
549
|
-
}
|
|
550
|
-
[overflowProperty.setNative](value) {
|
|
551
|
-
_setOverflow(value, this);
|
|
552
|
-
}
|
|
553
|
-
get overflowX() {
|
|
554
|
-
return _getOverflowX(this);
|
|
555
|
-
}
|
|
556
|
-
set overflowX(value) {
|
|
557
|
-
this.style.overflowX = value;
|
|
558
|
-
}
|
|
559
|
-
[overflowXProperty.setNative](value) {
|
|
560
|
-
_setOverflowX(value, this);
|
|
561
|
-
}
|
|
562
|
-
get overflowY() {
|
|
563
|
-
return _getOverflowY(this);
|
|
564
|
-
}
|
|
565
|
-
set overflowY(value) {
|
|
566
|
-
this.style.overflowY = value;
|
|
567
|
-
}
|
|
568
|
-
[overflowYProperty.setNative](value) {
|
|
569
|
-
_setOverflowY(value, this);
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
applyMixins(NSView, [ViewOverride], { overrideIfExists: '_isMasonViewOrChild' });
|
|
573
|
-
}
|
|
574
|
-
export function installMixins() {
|
|
575
|
-
if (!mixinInstalled) {
|
|
576
|
-
mixinInstalled = true;
|
|
577
|
-
overrideViewBase();
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
const emptyArray = [];
|
|
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]]');
|
|
581
8
|
export const scrollBarWidthProperty = new CssProperty({
|
|
582
9
|
name: 'scrollBarWidth',
|
|
583
10
|
cssName: 'scroll-bar-width',
|
|
@@ -622,6 +49,141 @@ export const overflowYProperty = new CssProperty({
|
|
|
622
49
|
defaultValue: 'visible',
|
|
623
50
|
valueConverter: overflowConverter,
|
|
624
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;
|
|
58
|
+
}
|
|
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);
|
|
76
|
+
}
|
|
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);
|
|
93
|
+
}
|
|
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);
|
|
110
|
+
}
|
|
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);
|
|
127
|
+
}
|
|
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;
|
|
139
|
+
}
|
|
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;
|
|
151
|
+
}
|
|
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;
|
|
161
|
+
}
|
|
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;
|
|
171
|
+
}
|
|
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]);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return properties;
|
|
185
|
+
},
|
|
186
|
+
});
|
|
625
187
|
// export const flexGrowProperty = new CssProperty<Style, number>({
|
|
626
188
|
// name: 'flexGrow',
|
|
627
189
|
// cssName: 'flex-grow',
|
|
@@ -637,7 +199,7 @@ export const flexShrinkProperty = new CssProperty({
|
|
|
637
199
|
export const displayProperty = new CssProperty({
|
|
638
200
|
name: 'display',
|
|
639
201
|
cssName: 'display',
|
|
640
|
-
defaultValue: '
|
|
202
|
+
defaultValue: 'block',
|
|
641
203
|
valueConverter(value) {
|
|
642
204
|
if (typeof value === 'number') {
|
|
643
205
|
switch (value) {
|
|
@@ -659,7 +221,7 @@ export const displayProperty = new CssProperty({
|
|
|
659
221
|
return value;
|
|
660
222
|
default:
|
|
661
223
|
// todo throw???
|
|
662
|
-
return '
|
|
224
|
+
return 'block';
|
|
663
225
|
}
|
|
664
226
|
},
|
|
665
227
|
});
|
|
@@ -667,12 +229,14 @@ export const maxWidthProperty = new CssProperty({
|
|
|
667
229
|
name: 'maxWidth',
|
|
668
230
|
cssName: 'max-width',
|
|
669
231
|
defaultValue: 'auto',
|
|
232
|
+
// @ts-ignore
|
|
670
233
|
equalityComparer: NSLength.equals,
|
|
671
234
|
});
|
|
672
235
|
export const maxHeightProperty = new CssProperty({
|
|
673
236
|
name: 'maxHeight',
|
|
674
237
|
cssName: 'max-height',
|
|
675
238
|
defaultValue: 'auto',
|
|
239
|
+
// @ts-ignore
|
|
676
240
|
equalityComparer: NSLength.equals,
|
|
677
241
|
});
|
|
678
242
|
export const positionProperty = new CssProperty({
|
|
@@ -693,24 +257,28 @@ export const leftProperty = new CssProperty({
|
|
|
693
257
|
name: 'left',
|
|
694
258
|
cssName: 'left',
|
|
695
259
|
defaultValue: 'auto',
|
|
260
|
+
// @ts-ignore
|
|
696
261
|
equalityComparer: NSLength.equals,
|
|
697
262
|
});
|
|
698
263
|
export const rightProperty = new CssProperty({
|
|
699
264
|
name: 'right',
|
|
700
265
|
cssName: 'right',
|
|
701
266
|
defaultValue: 'auto',
|
|
267
|
+
// @ts-ignore
|
|
702
268
|
equalityComparer: NSLength.equals,
|
|
703
269
|
});
|
|
704
270
|
export const topProperty = new CssProperty({
|
|
705
271
|
name: 'top',
|
|
706
272
|
cssName: 'top',
|
|
707
273
|
defaultValue: 'auto',
|
|
274
|
+
// @ts-ignore
|
|
708
275
|
equalityComparer: NSLength.equals,
|
|
709
276
|
});
|
|
710
277
|
export const bottomProperty = new CssProperty({
|
|
711
278
|
name: 'bottom',
|
|
712
279
|
cssName: 'bottom',
|
|
713
280
|
defaultValue: 'auto',
|
|
281
|
+
// @ts-ignore
|
|
714
282
|
equalityComparer: NSLength.equals,
|
|
715
283
|
});
|
|
716
284
|
export const flexBasisProperty = new CssProperty({
|
|
@@ -738,101 +306,21 @@ export const gridColumnGapProperty = new ShorthandProperty({
|
|
|
738
306
|
return [[columnGapProperty, value]];
|
|
739
307
|
},
|
|
740
308
|
});
|
|
741
|
-
export const rowGapProperty = new CssProperty({
|
|
742
|
-
name: 'rowGap',
|
|
743
|
-
cssName: 'row-gap',
|
|
744
|
-
defaultValue: 0,
|
|
745
|
-
});
|
|
746
|
-
export const columnGapProperty = new CssProperty({
|
|
747
|
-
name: 'columnGap',
|
|
748
|
-
cssName: 'column-gap',
|
|
749
|
-
defaultValue: 0,
|
|
750
|
-
});
|
|
751
|
-
export const gridGapProperty = new ShorthandProperty({
|
|
752
|
-
name: 'gridGap',
|
|
753
|
-
cssName: 'grid-gap',
|
|
754
|
-
getter: function () {
|
|
755
|
-
if (this.rowGap === this.columnGap) {
|
|
756
|
-
return this.rowGap;
|
|
757
|
-
}
|
|
758
|
-
return `${this.rowGap} ${this.columnGap}`;
|
|
759
|
-
},
|
|
760
|
-
converter(value) {
|
|
761
|
-
if (typeof value === 'string') {
|
|
762
|
-
const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
|
|
763
|
-
const length = values.length;
|
|
764
|
-
if (length === 0) {
|
|
765
|
-
return emptyArray;
|
|
766
|
-
}
|
|
767
|
-
if (length === 1) {
|
|
768
|
-
const row = values[0];
|
|
769
|
-
return [
|
|
770
|
-
[rowGapProperty, row],
|
|
771
|
-
[columnGapProperty, row],
|
|
772
|
-
];
|
|
773
|
-
}
|
|
774
|
-
if (length > 1) {
|
|
775
|
-
const row = values[0];
|
|
776
|
-
const column = values[1];
|
|
777
|
-
return [
|
|
778
|
-
[rowGapProperty, row],
|
|
779
|
-
[columnGapProperty, column],
|
|
780
|
-
];
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
return emptyArray;
|
|
784
|
-
},
|
|
785
|
-
});
|
|
786
|
-
export const gapProperty = new ShorthandProperty({
|
|
787
|
-
name: 'gap',
|
|
788
|
-
cssName: 'gap',
|
|
789
|
-
getter: function () {
|
|
790
|
-
if (this.rowGap === this.columnGap) {
|
|
791
|
-
return this.rowGap;
|
|
792
|
-
}
|
|
793
|
-
return `${this.rowGap} ${this.columnGap}`;
|
|
794
|
-
},
|
|
795
|
-
converter(value) {
|
|
796
|
-
if (typeof value === 'string') {
|
|
797
|
-
const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
|
|
798
|
-
const length = values.length;
|
|
799
|
-
if (length === 0) {
|
|
800
|
-
return emptyArray;
|
|
801
|
-
}
|
|
802
|
-
if (length === 1) {
|
|
803
|
-
const row = values[0];
|
|
804
|
-
return [
|
|
805
|
-
[rowGapProperty, row],
|
|
806
|
-
[columnGapProperty, row],
|
|
807
|
-
];
|
|
808
|
-
}
|
|
809
|
-
if (length > 1) {
|
|
810
|
-
const row = values[0];
|
|
811
|
-
const column = values[1];
|
|
812
|
-
return [
|
|
813
|
-
[rowGapProperty, row],
|
|
814
|
-
[columnGapProperty, column],
|
|
815
|
-
];
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
return emptyArray;
|
|
819
|
-
},
|
|
820
|
-
});
|
|
821
309
|
export const aspectRatioProperty = new CssProperty({
|
|
822
310
|
name: 'aspectRatio',
|
|
823
311
|
cssName: 'aspect-ratio',
|
|
824
312
|
defaultValue: Number.NaN,
|
|
825
313
|
});
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
314
|
+
export const alignItemsProperty = new CssProperty({
|
|
315
|
+
name: 'alignItems',
|
|
316
|
+
cssName: 'align-items',
|
|
317
|
+
defaultValue: 'normal',
|
|
318
|
+
});
|
|
319
|
+
export const alignSelfProperty = new CssProperty({
|
|
320
|
+
name: 'alignSelf',
|
|
321
|
+
cssName: 'align-self',
|
|
322
|
+
defaultValue: 'normal',
|
|
323
|
+
});
|
|
836
324
|
export const alignContentProperty = new CssProperty({
|
|
837
325
|
name: 'alignContent',
|
|
838
326
|
cssName: 'align-content',
|
|
@@ -848,11 +336,11 @@ export const justifySelfProperty = new CssProperty({
|
|
|
848
336
|
cssName: 'justify-self',
|
|
849
337
|
defaultValue: 'normal',
|
|
850
338
|
});
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
339
|
+
export const justifyContentProperty = new CssProperty({
|
|
340
|
+
name: 'justifyContent',
|
|
341
|
+
cssName: 'justify-content',
|
|
342
|
+
defaultValue: 'normal',
|
|
343
|
+
});
|
|
856
344
|
export const gridAutoRowsProperty = new CssProperty({
|
|
857
345
|
name: 'gridAutoRows',
|
|
858
346
|
cssName: 'grid-auto-rows',
|
|
@@ -912,7 +400,7 @@ export const gridAreaProperty = new ShorthandProperty({
|
|
|
912
400
|
// grid-row-start / grid-column-start / grid-row-end / grid-column-end
|
|
913
401
|
const length = values.length;
|
|
914
402
|
if (length === 0) {
|
|
915
|
-
return
|
|
403
|
+
return [];
|
|
916
404
|
}
|
|
917
405
|
if (length === 1) {
|
|
918
406
|
const parsed = parseGridColumnOrRow(values[0]);
|
|
@@ -957,7 +445,7 @@ export const gridAreaProperty = new ShorthandProperty({
|
|
|
957
445
|
];
|
|
958
446
|
}
|
|
959
447
|
}
|
|
960
|
-
return
|
|
448
|
+
return [];
|
|
961
449
|
},
|
|
962
450
|
});
|
|
963
451
|
export const gridColumnStartProperty = new CssProperty({
|
|
@@ -984,7 +472,7 @@ export const gridColumnProperty = new ShorthandProperty({
|
|
|
984
472
|
const values = value.split('/').filter((item) => item.trim().length !== 0);
|
|
985
473
|
const length = values.length;
|
|
986
474
|
if (length === 0) {
|
|
987
|
-
return
|
|
475
|
+
return [];
|
|
988
476
|
}
|
|
989
477
|
if (length === 1) {
|
|
990
478
|
const parsed = parseGridColumnOrRow(values[0]);
|
|
@@ -1004,7 +492,7 @@ export const gridColumnProperty = new ShorthandProperty({
|
|
|
1004
492
|
];
|
|
1005
493
|
}
|
|
1006
494
|
}
|
|
1007
|
-
return
|
|
495
|
+
return [];
|
|
1008
496
|
},
|
|
1009
497
|
});
|
|
1010
498
|
export const gridRowStartProperty = new CssProperty({
|
|
@@ -1031,7 +519,7 @@ export const gridRowProperty = new ShorthandProperty({
|
|
|
1031
519
|
const values = value.split('/').filter((item) => item.trim().length !== 0);
|
|
1032
520
|
const length = values.length;
|
|
1033
521
|
if (length === 0) {
|
|
1034
|
-
return
|
|
522
|
+
return [];
|
|
1035
523
|
}
|
|
1036
524
|
if (length === 1) {
|
|
1037
525
|
const parsed = parseGridColumnOrRow(values[0]);
|
|
@@ -1051,18 +539,18 @@ export const gridRowProperty = new ShorthandProperty({
|
|
|
1051
539
|
];
|
|
1052
540
|
}
|
|
1053
541
|
}
|
|
1054
|
-
return
|
|
542
|
+
return [];
|
|
1055
543
|
},
|
|
1056
544
|
});
|
|
1057
545
|
export const gridTemplateRowsProperty = new CssProperty({
|
|
1058
546
|
name: 'gridTemplateRows',
|
|
1059
547
|
cssName: 'grid-template-rows',
|
|
1060
|
-
defaultValue:
|
|
548
|
+
defaultValue: null,
|
|
1061
549
|
});
|
|
1062
550
|
export const gridTemplateColumnsProperty = new CssProperty({
|
|
1063
551
|
name: 'gridTemplateColumns',
|
|
1064
552
|
cssName: 'grid-template-columns',
|
|
1065
|
-
defaultValue:
|
|
553
|
+
defaultValue: null,
|
|
1066
554
|
});
|
|
1067
555
|
// flex-flow: <flex-direction> || <flex-wrap>
|
|
1068
556
|
const flexFlowProperty = new ShorthandProperty({
|
|
@@ -1149,7 +637,17 @@ const flexProperty = new ShorthandProperty({
|
|
|
1149
637
|
return properties;
|
|
1150
638
|
},
|
|
1151
639
|
});
|
|
1152
|
-
|
|
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,
|
|
648
|
+
defaultValue: '',
|
|
649
|
+
});
|
|
650
|
+
let ViewBase = class ViewBase extends CustomLayoutView {
|
|
1153
651
|
constructor() {
|
|
1154
652
|
super();
|
|
1155
653
|
this._children = [];
|
|
@@ -1176,19 +674,19 @@ let TSCViewBase = class TSCViewBase extends CustomLayoutView {
|
|
|
1176
674
|
}
|
|
1177
675
|
}
|
|
1178
676
|
eachChild(callback) {
|
|
1179
|
-
this._children
|
|
677
|
+
for (const child of this._children) {
|
|
1180
678
|
callback(child);
|
|
1181
|
-
}
|
|
679
|
+
}
|
|
1182
680
|
}
|
|
1183
681
|
eachChildView(callback) {
|
|
1184
|
-
this._children
|
|
682
|
+
for (const view of this._children) {
|
|
1185
683
|
callback(view);
|
|
1186
|
-
}
|
|
684
|
+
}
|
|
1187
685
|
}
|
|
1188
686
|
_addChildFromBuilder(name, value) {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
687
|
+
if (value instanceof NSView) {
|
|
688
|
+
this.addChild(value);
|
|
689
|
+
}
|
|
1192
690
|
}
|
|
1193
691
|
getChildrenCount() {
|
|
1194
692
|
return this._children.length;
|
|
@@ -1215,20 +713,111 @@ let TSCViewBase = class TSCViewBase extends CustomLayoutView {
|
|
|
1215
713
|
}
|
|
1216
714
|
removeChild(child) {
|
|
1217
715
|
const index = this._children.indexOf(child);
|
|
1218
|
-
|
|
1219
|
-
|
|
716
|
+
if (index > -1) {
|
|
717
|
+
this._children.splice(index, 1);
|
|
718
|
+
this._removeView(child);
|
|
719
|
+
}
|
|
1220
720
|
}
|
|
1221
721
|
removeChildren() {
|
|
1222
|
-
|
|
1223
|
-
|
|
722
|
+
if (this._children.length === 0) {
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
for (const child of this._children) {
|
|
726
|
+
child._isMasonChild = false;
|
|
727
|
+
this._removeView(child);
|
|
1224
728
|
}
|
|
729
|
+
this._children.splice(0);
|
|
730
|
+
}
|
|
731
|
+
[displayProperty.setNative](value) {
|
|
732
|
+
_setDisplay(value, this);
|
|
733
|
+
}
|
|
734
|
+
[flexDirectionProperty.setNative](value) {
|
|
735
|
+
_setFlexDirection(value, this);
|
|
736
|
+
}
|
|
737
|
+
[minWidthProperty.setNative](value) {
|
|
738
|
+
_setMinWidth(value, this);
|
|
739
|
+
}
|
|
740
|
+
[minHeightProperty.setNative](value) {
|
|
741
|
+
_setMinHeight(value, this);
|
|
742
|
+
}
|
|
743
|
+
[widthProperty.setNative](value) {
|
|
744
|
+
_setWidth(value, this);
|
|
745
|
+
}
|
|
746
|
+
[heightProperty.setNative](value) {
|
|
747
|
+
_setHeight(value, this);
|
|
748
|
+
}
|
|
749
|
+
[alignContentProperty.setNative](value) {
|
|
750
|
+
_setAlignContent(value, this);
|
|
751
|
+
}
|
|
752
|
+
[justifyContentProperty.setNative](value) {
|
|
753
|
+
_setJustifyContent(value, this);
|
|
754
|
+
}
|
|
755
|
+
[marginLeftProperty.setNative](value) {
|
|
756
|
+
_setMarginLeft(value, this);
|
|
757
|
+
}
|
|
758
|
+
[marginRightProperty.setNative](value) {
|
|
759
|
+
_setMarginRight(value, this);
|
|
760
|
+
}
|
|
761
|
+
[marginBottomProperty.setNative](value) {
|
|
762
|
+
_setMarginBottom(value, this);
|
|
763
|
+
}
|
|
764
|
+
[marginTopProperty.setNative](value) {
|
|
765
|
+
_setMarginTop(value, this);
|
|
766
|
+
}
|
|
767
|
+
[paddingLeftProperty.setNative](value) {
|
|
768
|
+
_setPaddingLeft(value, this);
|
|
769
|
+
}
|
|
770
|
+
[paddingRightProperty.setNative](value) {
|
|
771
|
+
_setPaddingRight(value, this);
|
|
772
|
+
}
|
|
773
|
+
[paddingTopProperty.setNative](value) {
|
|
774
|
+
_setPaddingTop(value, this);
|
|
775
|
+
}
|
|
776
|
+
[paddingBottomProperty.setNative](value) {
|
|
777
|
+
_setPaddingBottom(value, this);
|
|
778
|
+
}
|
|
779
|
+
[rowGapProperty.setNative](value) {
|
|
780
|
+
_setRowGap(value, this);
|
|
781
|
+
}
|
|
782
|
+
[columnGapProperty.setNative](value) {
|
|
783
|
+
_setColumnGap(value, this);
|
|
784
|
+
}
|
|
785
|
+
[gridColumnStartProperty.setNative](value) {
|
|
786
|
+
_setGridColumnStart(value, this);
|
|
787
|
+
}
|
|
788
|
+
[gridColumnEndProperty.setNative](value) {
|
|
789
|
+
_setGridColumnEnd(value, this);
|
|
790
|
+
}
|
|
791
|
+
[gridRowStartProperty.setNative](value) {
|
|
792
|
+
_setGridRowStart(value, this);
|
|
793
|
+
}
|
|
794
|
+
[gridRowEndProperty.setNative](value) {
|
|
795
|
+
_setGridRowEnd(value, this);
|
|
796
|
+
}
|
|
797
|
+
[gridTemplateRowsProperty.setNative](value) {
|
|
798
|
+
_setGridTemplateRows(_parseGridTemplates(value), this);
|
|
799
|
+
}
|
|
800
|
+
[gridTemplateColumnsProperty.setNative](value) {
|
|
801
|
+
_setGridTemplateColumns(_parseGridTemplates(value), this);
|
|
1225
802
|
}
|
|
1226
803
|
};
|
|
1227
|
-
|
|
1228
|
-
CSSType('
|
|
804
|
+
ViewBase = __decorate([
|
|
805
|
+
CSSType('View'),
|
|
1229
806
|
__metadata("design:paramtypes", [])
|
|
1230
|
-
],
|
|
1231
|
-
export {
|
|
807
|
+
], ViewBase);
|
|
808
|
+
export { ViewBase };
|
|
809
|
+
let TextBase = class TextBase extends ViewBase {
|
|
810
|
+
constructor() {
|
|
811
|
+
super();
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
TextBase = __decorate([
|
|
815
|
+
CSSType('Text'),
|
|
816
|
+
__metadata("design:paramtypes", [])
|
|
817
|
+
], TextBase);
|
|
818
|
+
export { TextBase };
|
|
819
|
+
textProperty.register(TextBase);
|
|
820
|
+
textWrapProperty.register(TextBase);
|
|
1232
821
|
/**
|
|
1233
822
|
* Props are already defined in core flexbox layout,
|
|
1234
823
|
* overriding them breaks the core flexbox layout.
|
|
@@ -1237,9 +826,9 @@ export { TSCViewBase };
|
|
|
1237
826
|
// flexWrapProperty.register(Style);
|
|
1238
827
|
// flexGrowProperty.register(Style);
|
|
1239
828
|
// flexShrinkProperty.register(Style);
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
829
|
+
alignItemsProperty.register(Style);
|
|
830
|
+
alignSelfProperty.register(Style);
|
|
831
|
+
justifyContentProperty.register(Style);
|
|
1243
832
|
displayProperty.register(Style);
|
|
1244
833
|
maxWidthProperty.register(Style);
|
|
1245
834
|
maxHeightProperty.register(Style);
|
|
@@ -1254,7 +843,6 @@ columnGapProperty.register(Style);
|
|
|
1254
843
|
gridRowGapProperty.register(Style);
|
|
1255
844
|
gridColumnGapProperty.register(Style);
|
|
1256
845
|
gapProperty.register(Style);
|
|
1257
|
-
gridGapProperty.register(Style);
|
|
1258
846
|
aspectRatioProperty.register(Style);
|
|
1259
847
|
alignContentProperty.register(Style);
|
|
1260
848
|
justifyItemsProperty.register(Style);
|
|
@@ -1277,5 +865,68 @@ overflowYProperty.register(Style);
|
|
|
1277
865
|
scrollBarWidthProperty.register(Style);
|
|
1278
866
|
flexFlowProperty.register(Style);
|
|
1279
867
|
flexProperty.register(Style);
|
|
1280
|
-
|
|
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);
|
|
1281
932
|
//# sourceMappingURL=common.js.map
|