@triniwiz/nativescript-masonkit 1.0.0-alpha.9 → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/index.android.d.ts +13 -0
- package/button/index.android.js +56 -0
- package/button/index.android.js.map +1 -0
- package/button/index.ios.d.ts +21 -0
- package/button/index.ios.js +216 -0
- package/button/index.ios.js.map +1 -0
- package/common.d.ts +78 -33
- package/common.js +1121 -251
- package/common.js.map +1 -1
- package/img/index.android.d.ts +10 -0
- package/img/index.android.js +40 -0
- package/img/index.android.js.map +1 -0
- package/img/index.ios.d.ts +13 -0
- package/img/index.ios.js +102 -0
- package/img/index.ios.js.map +1 -0
- package/index.android.d.ts +6 -34
- package/index.android.js +6 -139
- package/index.android.js.map +1 -1
- package/index.d.ts +88 -60
- package/index.ios.d.ts +6 -48
- package/index.ios.js +6 -355
- package/index.ios.js.map +1 -1
- package/package.json +5 -2
- package/platforms/android/include.gradle +5 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +794 -284
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason.h +0 -5
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +118 -93
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +58079 -23135
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +1234 -255
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +1234 -255
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4252 -1932
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +1588 -568
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason.h +0 -5
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/NSObject+MasonElement_Defaults.h +100 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +118 -93
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +58076 -23132
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +58076 -23132
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1211 -232
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +31 -31
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +4246 -1932
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +4124 -1883
- package/scroll/index.android.d.ts +12 -0
- package/scroll/index.android.js +50 -0
- package/scroll/index.android.js.map +1 -0
- package/scroll/index.ios.d.ts +14 -0
- package/scroll/index.ios.js +120 -0
- package/scroll/index.ios.js.map +1 -0
- package/style.d.ts +110 -53
- package/style.js +1176 -110
- package/style.js.map +1 -1
- package/text/index.android.d.ts +30 -0
- package/text/index.android.js +124 -0
- package/text/index.android.js.map +1 -0
- package/text/index.ios.d.ts +38 -0
- package/text/index.ios.js +251 -0
- package/text/index.ios.js.map +1 -0
- package/tree/index.android.d.ts +28 -0
- package/tree/index.android.js +77 -0
- package/tree/index.android.js.map +1 -0
- package/tree/index.ios.d.ts +29 -0
- package/tree/index.ios.js +76 -0
- package/tree/index.ios.js.map +1 -0
- package/utils/index.android.d.ts +187 -0
- package/utils/index.android.js +514 -0
- package/utils/index.android.js.map +1 -0
- package/utils/index.ios.d.ts +198 -0
- package/utils/index.ios.js +710 -0
- package/utils/index.ios.js.map +1 -0
- package/view/index.android.d.ts +12 -0
- package/view/index.android.js +50 -0
- package/view/index.android.js.map +1 -0
- package/view/index.ios.d.ts +16 -0
- package/view/index.ios.js +124 -0
- package/view/index.ios.js.map +1 -0
- package/web.d.ts +55 -0
- package/web.js +189 -0
- package/web.js.map +1 -0
- package/helpers.d.ts +0 -255
- package/helpers.js +0 -1318
- package/helpers.js.map +0 -1
- package/node.d.ts +0 -2
- package/node.js +0 -3
- package/node.js.map +0 -1
- package/platforms/ios/Podfile +0 -1
- package/platforms/ios/build.xcconfig +0 -5
- package/platforms/ios/prebuild.sh +0 -101
- package/platforms/new_native_src/cpp/Caches.cpp +0 -36
- package/platforms/new_native_src/cpp/Caches.h +0 -42
- package/platforms/new_native_src/cpp/Common.h +0 -34
- package/platforms/new_native_src/cpp/ConcurrentMap.h +0 -57
- package/platforms/new_native_src/cpp/Helpers.cpp +0 -101
- package/platforms/new_native_src/cpp/Helpers.h +0 -364
- package/platforms/new_native_src/cpp/MasonImpl.cpp +0 -68
- package/platforms/new_native_src/cpp/MasonImpl.h +0 -40
- package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +0 -89
- package/platforms/new_native_src/cpp/MasonNodeImpl.h +0 -47
- package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +0 -2181
- package/platforms/new_native_src/cpp/MasonStyleImpl.h +0 -420
- package/platforms/new_native_src/cpp/include/mason_native.h +0 -972
- package/platforms/new_native_src/cpp/include/robin_hood.h +0 -2544
- package/src-native/pods/Headers/include/APIDesign.md +0 -72
- package/src-native/pods/Headers/include/DEPS +0 -10
- package/src-native/pods/Headers/include/DIR_METADATA +0 -11
- package/src-native/pods/Headers/include/OWNERS +0 -23
- package/src-native/pods/Headers/include/cppgc/DEPS +0 -8
- package/src-native/pods/Headers/include/cppgc/OWNERS +0 -2
- package/src-native/pods/Headers/include/cppgc/README.md +0 -133
- package/src-native/pods/Headers/include/cppgc/allocation.h +0 -310
- package/src-native/pods/Headers/include/cppgc/common.h +0 -29
- package/src-native/pods/Headers/include/cppgc/cross-thread-persistent.h +0 -465
- package/src-native/pods/Headers/include/cppgc/custom-space.h +0 -97
- package/src-native/pods/Headers/include/cppgc/default-platform.h +0 -67
- package/src-native/pods/Headers/include/cppgc/ephemeron-pair.h +0 -30
- package/src-native/pods/Headers/include/cppgc/explicit-management.h +0 -100
- package/src-native/pods/Headers/include/cppgc/garbage-collected.h +0 -106
- package/src-native/pods/Headers/include/cppgc/heap-consistency.h +0 -266
- package/src-native/pods/Headers/include/cppgc/heap-state.h +0 -82
- package/src-native/pods/Headers/include/cppgc/heap-statistics.h +0 -120
- package/src-native/pods/Headers/include/cppgc/heap.h +0 -206
- package/src-native/pods/Headers/include/cppgc/internal/api-constants.h +0 -55
- package/src-native/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -48
- package/src-native/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -79
- package/src-native/pods/Headers/include/cppgc/internal/compiler-specific.h +0 -38
- package/src-native/pods/Headers/include/cppgc/internal/finalizer-trait.h +0 -93
- package/src-native/pods/Headers/include/cppgc/internal/gc-info.h +0 -156
- package/src-native/pods/Headers/include/cppgc/internal/logging.h +0 -50
- package/src-native/pods/Headers/include/cppgc/internal/name-trait.h +0 -122
- package/src-native/pods/Headers/include/cppgc/internal/persistent-node.h +0 -216
- package/src-native/pods/Headers/include/cppgc/internal/pointer-policies.h +0 -186
- package/src-native/pods/Headers/include/cppgc/internal/write-barrier.h +0 -435
- package/src-native/pods/Headers/include/cppgc/liveness-broker.h +0 -77
- package/src-native/pods/Headers/include/cppgc/macros.h +0 -26
- package/src-native/pods/Headers/include/cppgc/member.h +0 -291
- package/src-native/pods/Headers/include/cppgc/name-provider.h +0 -65
- package/src-native/pods/Headers/include/cppgc/object-size-trait.h +0 -58
- package/src-native/pods/Headers/include/cppgc/persistent.h +0 -370
- package/src-native/pods/Headers/include/cppgc/platform.h +0 -156
- package/src-native/pods/Headers/include/cppgc/prefinalizer.h +0 -75
- package/src-native/pods/Headers/include/cppgc/process-heap-statistics.h +0 -36
- package/src-native/pods/Headers/include/cppgc/sentinel-pointer.h +0 -32
- package/src-native/pods/Headers/include/cppgc/source-location.h +0 -92
- package/src-native/pods/Headers/include/cppgc/testing.h +0 -106
- package/src-native/pods/Headers/include/cppgc/trace-trait.h +0 -116
- package/src-native/pods/Headers/include/cppgc/type-traits.h +0 -240
- package/src-native/pods/Headers/include/cppgc/visitor.h +0 -379
- package/src-native/pods/Headers/include/js_protocol-1.2.json +0 -936
- package/src-native/pods/Headers/include/js_protocol-1.3.json +0 -1112
- package/src-native/pods/Headers/include/js_protocol.pdl +0 -1709
- package/src-native/pods/Headers/include/libffi/arm64/ffi.h +0 -524
- package/src-native/pods/Headers/include/libffi/arm64/ffitarget.h +0 -92
- package/src-native/pods/Headers/include/libffi/x86_64/ffi.h +0 -524
- package/src-native/pods/Headers/include/libffi/x86_64/ffitarget.h +0 -147
- package/src-native/pods/Headers/include/libffi.h +0 -12
- package/src-native/pods/Headers/include/libplatform/DEPS +0 -9
- package/src-native/pods/Headers/include/libplatform/libplatform-export.h +0 -29
- package/src-native/pods/Headers/include/libplatform/libplatform.h +0 -106
- package/src-native/pods/Headers/include/libplatform/v8-tracing.h +0 -333
- package/src-native/pods/Headers/include/v8-array-buffer.h +0 -433
- package/src-native/pods/Headers/include/v8-callbacks.h +0 -397
- package/src-native/pods/Headers/include/v8-container.h +0 -129
- package/src-native/pods/Headers/include/v8-context.h +0 -407
- package/src-native/pods/Headers/include/v8-cppgc.h +0 -215
- package/src-native/pods/Headers/include/v8-data.h +0 -80
- package/src-native/pods/Headers/include/v8-date.h +0 -43
- package/src-native/pods/Headers/include/v8-debug.h +0 -168
- package/src-native/pods/Headers/include/v8-embedder-heap.h +0 -218
- package/src-native/pods/Headers/include/v8-embedder-state-scope.h +0 -51
- package/src-native/pods/Headers/include/v8-exception.h +0 -217
- package/src-native/pods/Headers/include/v8-extension.h +0 -62
- package/src-native/pods/Headers/include/v8-external.h +0 -37
- package/src-native/pods/Headers/include/v8-fast-api-calls.h +0 -939
- package/src-native/pods/Headers/include/v8-forward.h +0 -81
- package/src-native/pods/Headers/include/v8-function-callback.h +0 -475
- package/src-native/pods/Headers/include/v8-function.h +0 -125
- package/src-native/pods/Headers/include/v8-initialization.h +0 -315
- package/src-native/pods/Headers/include/v8-inspector-protocol.h +0 -13
- package/src-native/pods/Headers/include/v8-inspector.h +0 -376
- package/src-native/pods/Headers/include/v8-internal.h +0 -661
- package/src-native/pods/Headers/include/v8-isolate.h +0 -1709
- package/src-native/pods/Headers/include/v8-json.h +0 -47
- package/src-native/pods/Headers/include/v8-local-handle.h +0 -455
- package/src-native/pods/Headers/include/v8-locker.h +0 -149
- package/src-native/pods/Headers/include/v8-maybe.h +0 -137
- package/src-native/pods/Headers/include/v8-memory-span.h +0 -43
- package/src-native/pods/Headers/include/v8-message.h +0 -216
- package/src-native/pods/Headers/include/v8-metrics.h +0 -255
- package/src-native/pods/Headers/include/v8-microtask-queue.h +0 -152
- package/src-native/pods/Headers/include/v8-microtask.h +0 -28
- package/src-native/pods/Headers/include/v8-object.h +0 -775
- package/src-native/pods/Headers/include/v8-persistent-handle.h +0 -590
- package/src-native/pods/Headers/include/v8-platform.h +0 -1092
- package/src-native/pods/Headers/include/v8-primitive-object.h +0 -118
- package/src-native/pods/Headers/include/v8-primitive.h +0 -866
- package/src-native/pods/Headers/include/v8-profiler.h +0 -1198
- package/src-native/pods/Headers/include/v8-promise.h +0 -174
- package/src-native/pods/Headers/include/v8-proxy.h +0 -50
- package/src-native/pods/Headers/include/v8-regexp.h +0 -105
- package/src-native/pods/Headers/include/v8-script.h +0 -748
- package/src-native/pods/Headers/include/v8-snapshot.h +0 -196
- package/src-native/pods/Headers/include/v8-statistics.h +0 -217
- package/src-native/pods/Headers/include/v8-template.h +0 -1079
- package/src-native/pods/Headers/include/v8-traced-handle.h +0 -420
- package/src-native/pods/Headers/include/v8-typed-array.h +0 -282
- package/src-native/pods/Headers/include/v8-unwinder-state.h +0 -31
- package/src-native/pods/Headers/include/v8-unwinder.h +0 -132
- package/src-native/pods/Headers/include/v8-util.h +0 -658
- package/src-native/pods/Headers/include/v8-value-serializer-version.h +0 -24
- package/src-native/pods/Headers/include/v8-value-serializer.h +0 -279
- package/src-native/pods/Headers/include/v8-value.h +0 -526
- package/src-native/pods/Headers/include/v8-version-string.h +0 -38
- package/src-native/pods/Headers/include/v8-version.h +0 -20
- package/src-native/pods/Headers/include/v8-wasm-trap-handler-posix.h +0 -31
- package/src-native/pods/Headers/include/v8-wasm-trap-handler-win.h +0 -28
- package/src-native/pods/Headers/include/v8-wasm.h +0 -257
- package/src-native/pods/Headers/include/v8-weak-callback-info.h +0 -86
- package/src-native/pods/Headers/include/v8.h +0 -88
- package/src-native/pods/Headers/include/v8config.h +0 -605
- package/src-native/pods/Headers/inspector/InspectorServer.h +0 -20
- package/src-native/pods/Headers/inspector/JsV8InspectorClient.h +0 -66
- package/src-native/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -1123
- package/src-native/pods/Headers/inspector/base64.h +0 -9
- package/src-native/pods/Headers/inspector/src/base/address-region.h +0 -95
- package/src-native/pods/Headers/inspector/src/base/atomic-utils.h +0 -219
- package/src-native/pods/Headers/inspector/src/base/atomicops.h +0 -332
- package/src-native/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -89
- package/src-native/pods/Headers/inspector/src/base/base-export.h +0 -31
- package/src-native/pods/Headers/inspector/src/base/bits.h +0 -343
- package/src-native/pods/Headers/inspector/src/base/build_config.h +0 -234
- package/src-native/pods/Headers/inspector/src/base/compiler-specific.h +0 -136
- package/src-native/pods/Headers/inspector/src/base/export-template.h +0 -163
- package/src-native/pods/Headers/inspector/src/base/flags.h +0 -130
- package/src-native/pods/Headers/inspector/src/base/immediate-crash.h +0 -162
- package/src-native/pods/Headers/inspector/src/base/lazy-instance.h +0 -258
- package/src-native/pods/Headers/inspector/src/base/logging.h +0 -417
- package/src-native/pods/Headers/inspector/src/base/macros.h +0 -423
- package/src-native/pods/Headers/inspector/src/base/memory.h +0 -89
- package/src-native/pods/Headers/inspector/src/base/once.h +0 -108
- package/src-native/pods/Headers/inspector/src/base/optional.h +0 -882
- package/src-native/pods/Headers/inspector/src/base/platform/mutex.h +0 -370
- package/src-native/pods/Headers/inspector/src/base/platform/platform.h +0 -476
- package/src-native/pods/Headers/inspector/src/base/platform/semaphore.h +0 -108
- package/src-native/pods/Headers/inspector/src/base/platform/v8-time.h +0 -513
- package/src-native/pods/Headers/inspector/src/base/platform/wrappers.h +0 -73
- package/src-native/pods/Headers/inspector/src/base/safe_conversions.h +0 -389
- package/src-native/pods/Headers/inspector/src/base/safe_conversions_impl.h +0 -822
- package/src-native/pods/Headers/inspector/src/base/template-utils.h +0 -113
- package/src-native/pods/Headers/inspector/src/base/v8-fallthrough.h +0 -21
- package/src-native/pods/Headers/inspector/src/common/checks.h +0 -38
- package/src-native/pods/Headers/inspector/src/common/globals.h +0 -1842
- package/src-native/pods/Headers/inspector/src/debug/debug-interface.h +0 -667
- package/src-native/pods/Headers/inspector/src/debug/interface-types.h +0 -175
- package/src-native/pods/Headers/inspector/src/init/v8.h +0 -52
- package/src-native/pods/Headers/inspector/src/inspector/custom-preview.h +0 -24
- package/src-native/pods/Headers/inspector/src/inspector/injected-script.h +0 -251
- package/src-native/pods/Headers/inspector/src/inspector/inspected-context.h +0 -79
- package/src-native/pods/Headers/inspector/src/inspector/protocol/CSS.h +0 -2148
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Console.h +0 -211
- package/src-native/pods/Headers/inspector/src/inspector/protocol/DOM.h +0 -1008
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Debugger.h +0 -892
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Forward.h +0 -75
- package/src-native/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -346
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Log.h +0 -342
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Network.h +0 -2528
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Overlay.h +0 -281
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Page.h +0 -1189
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Profiler.h +0 -1001
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Protocol.h +0 -617
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Runtime.h +0 -1696
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Schema.h +0 -146
- package/src-native/pods/Headers/inspector/src/inspector/protocol/Security.h +0 -793
- package/src-native/pods/Headers/inspector/src/inspector/remote-object-id.h +0 -54
- package/src-native/pods/Headers/inspector/src/inspector/search-util.h +0 -26
- package/src-native/pods/Headers/inspector/src/inspector/string-16.h +0 -180
- package/src-native/pods/Headers/inspector/src/inspector/string-util.h +0 -128
- package/src-native/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -48
- package/src-native/pods/Headers/inspector/src/inspector/v8-console-message.h +0 -147
- package/src-native/pods/Headers/inspector/src/inspector/v8-console.h +0 -173
- package/src-native/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -62
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -248
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-id.h +0 -44
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger-script.h +0 -123
- package/src-native/pods/Headers/inspector/src/inspector/v8-debugger.h +0 -257
- package/src-native/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -91
- package/src-native/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -80
- package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -191
- package/src-native/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -156
- package/src-native/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -34
- package/src-native/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -71
- package/src-native/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -24
- package/src-native/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -70
- package/src-native/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -88
- package/src-native/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -104
- package/src-native/pods/Headers/inspector/src/inspector/v8-regex.h +0 -38
- package/src-native/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -157
- package/src-native/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -38
- package/src-native/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -164
- package/src-native/pods/Headers/inspector/src/inspector/v8-string-conversions.h +0 -17
- package/src-native/pods/Headers/inspector/src/inspector/v8-value-utils.h +0 -23
- package/src-native/pods/Headers/inspector/src/inspector/value-mirror.h +0 -87
- package/src-native/pods/Headers/inspector/src/libplatform/default-platform.h +0 -92
- package/src-native/pods/Headers/inspector/src/logging/tracing-flags.h +0 -50
- package/src-native/pods/Headers/inspector/src/numbers/conversions.h +0 -183
- package/src-native/pods/Headers/inspector/src/tracing/trace-event.h +0 -664
- package/src-native/pods/Headers/inspector/src/utils/allocation.h +0 -367
- package/src-native/pods/Headers/inspector/src/utils/vector.h +0 -324
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -305
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -314
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -62
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -6
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -58
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -47
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -80
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -52
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -26
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -104
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -39
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -406
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -32
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -158
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -99
- package/src-native/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -139
- package/src-native/pods/Headers/inspector/utils.h +0 -32
- package/src-native/pods/Headers/inspector/v8-inspector-platform.h +0 -44
- package/src-native/pods/Headers/jsi/decorator.h +0 -762
- package/src-native/pods/Headers/jsi/instrumentation.h +0 -117
- package/src-native/pods/Headers/jsi/jsi-inl.h +0 -322
- package/src-native/pods/Headers/jsi/jsi.h +0 -1387
- package/src-native/pods/Headers/jsi/jsilib.h +0 -59
- package/src-native/pods/Headers/jsi/threadsafe.h +0 -79
- package/src-native/pods/Headers/runtime/ArgConverter.h +0 -61
- package/src-native/pods/Headers/runtime/ArrayAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/Caches.h +0 -98
- package/src-native/pods/Headers/runtime/ClassBuilder.h +0 -61
- package/src-native/pods/Headers/runtime/Common.h +0 -9
- package/src-native/pods/Headers/runtime/ConcurrentMap.h +0 -55
- package/src-native/pods/Headers/runtime/ConcurrentQueue.h +0 -28
- package/src-native/pods/Headers/runtime/Console.h +0 -27
- package/src-native/pods/Headers/runtime/Constants.h +0 -15
- package/src-native/pods/Headers/runtime/DataWrapper.h +0 -671
- package/src-native/pods/Headers/runtime/DictionaryAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/ExtVector.h +0 -21
- package/src-native/pods/Headers/runtime/FFICall.h +0 -105
- package/src-native/pods/Headers/runtime/FastEnumerationAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/FunctionReference.h +0 -18
- package/src-native/pods/Headers/runtime/Helpers.h +0 -84
- package/src-native/pods/Headers/runtime/InlineFunctions.h +0 -16
- package/src-native/pods/Headers/runtime/Interop.h +0 -202
- package/src-native/pods/Headers/runtime/KnownUnknownClassPair.h +0 -35
- package/src-native/pods/Headers/runtime/Metadata.h +0 -981
- package/src-native/pods/Headers/runtime/MetadataBuilder.h +0 -72
- package/src-native/pods/Headers/runtime/MetadataInlines.h +0 -157
- package/src-native/pods/Headers/runtime/ModuleInternal.h +0 -59
- package/src-native/pods/Headers/runtime/NSDataAdapter.h +0 -13
- package/src-native/pods/Headers/runtime/NativeScriptException.h +0 -27
- package/src-native/pods/Headers/runtime/ObjectManager.h +0 -31
- package/src-native/pods/Headers/runtime/OneByteStringResource.h +0 -21
- package/src-native/pods/Headers/runtime/Pointer.h +0 -26
- package/src-native/pods/Headers/runtime/PromiseProxy.h +0 -15
- package/src-native/pods/Headers/runtime/Reference.h +0 -38
- package/src-native/pods/Headers/runtime/Runtime.h +0 -67
- package/src-native/pods/Headers/runtime/RuntimeConfig.h +0 -17
- package/src-native/pods/Headers/runtime/SetTimeout.h +0 -34
- package/src-native/pods/Headers/runtime/SimpleAllocator.h +0 -23
- package/src-native/pods/Headers/runtime/StringHasher.h +0 -315
- package/src-native/pods/Headers/runtime/SymbolIterator.h +0 -18
- package/src-native/pods/Headers/runtime/SymbolLoader.h +0 -27
- package/src-native/pods/Headers/runtime/TNSDerivedClass.h +0 -8
- package/src-native/pods/Headers/runtime/TSHelpers.h +0 -15
- package/src-native/pods/Headers/runtime/Tasks.h +0 -19
- package/src-native/pods/Headers/runtime/UnmanagedType.h +0 -21
- package/src-native/pods/Headers/runtime/WeakRef.h +0 -15
- package/src-native/pods/Headers/runtime/Worker.h +0 -26
- package/src-native/pods/Headers/runtime/robin_hood.h +0 -2184
- package/src-native/pods/Headers/v8runtime/HostProxy.h +0 -71
- package/src-native/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -70
- package/src-native/pods/Headers/v8runtime/V8PointerValue.h +0 -44
- package/src-native/pods/Headers/v8runtime/V8Runtime.h +0 -215
- package/src-native/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
- package/src-native/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
- package/src-native/pods/NativeScript.podspec +0 -68
package/common.js
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
|
+
var _a, _b, _c;
|
|
1
2
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
3
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
3
|
-
import {
|
|
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';
|
|
4
|
+
import { CssProperty, CustomLayoutView, Length as NSLength, ShorthandProperty, Style, View as NSView, getViewById, unsetValue, Property, widthProperty, heightProperty, CoreTypes, Trace, Length as CoreLength, PercentLength as CorePercentLength, marginLeftProperty, marginRightProperty, marginTopProperty, marginBottomProperty, minWidthProperty, minHeightProperty, fontSizeProperty, fontWeightProperty, fontStyleProperty, colorProperty, Color, lineHeightProperty, letterSpacingProperty, textAlignmentProperty, borderLeftWidthProperty, borderTopWidthProperty, borderRightWidthProperty, borderBottomWidthProperty } from '@nativescript/core';
|
|
5
5
|
import { flexDirectionProperty, flexGrowProperty, flexWrapProperty } from '@nativescript/core/ui/layouts/flexbox-layout';
|
|
6
|
+
import { _forceStyleUpdate } from './utils';
|
|
6
7
|
export const native_ = Symbol('[[native]]');
|
|
7
8
|
export const style_ = Symbol('[[style]]');
|
|
9
|
+
export const isTextChild_ = Symbol('[[isTextChild]]');
|
|
10
|
+
export const isText_ = Symbol('[[isText]]');
|
|
11
|
+
export const isMasonView_ = Symbol('[[isMasonView]]');
|
|
12
|
+
export const text_ = Symbol('[[text]]');
|
|
13
|
+
function getViewStyle(view) {
|
|
14
|
+
const ret = (__ANDROID__ ? view.get() : view.deref());
|
|
15
|
+
return ret._styleHelper;
|
|
16
|
+
}
|
|
17
|
+
var FrameWork;
|
|
18
|
+
(function (FrameWork) {
|
|
19
|
+
FrameWork[FrameWork["Core"] = 0] = "Core";
|
|
20
|
+
FrameWork[FrameWork["Angular"] = 1] = "Angular";
|
|
21
|
+
FrameWork[FrameWork["Vue"] = 2] = "Vue";
|
|
22
|
+
FrameWork[FrameWork["React"] = 3] = "React";
|
|
23
|
+
FrameWork[FrameWork["Svelte"] = 4] = "Svelte";
|
|
24
|
+
FrameWork[FrameWork["Solid"] = 5] = "Solid";
|
|
25
|
+
})(FrameWork || (FrameWork = {}));
|
|
26
|
+
let frameWork = FrameWork.Core;
|
|
27
|
+
try {
|
|
28
|
+
global.VUE3_ELEMENT_REF = require('nativescript-vue').ELEMENT_REF;
|
|
29
|
+
frameWork = FrameWork.Vue;
|
|
30
|
+
}
|
|
31
|
+
catch (e) { }
|
|
8
32
|
export const scrollBarWidthProperty = new CssProperty({
|
|
9
33
|
name: 'scrollBarWidth',
|
|
10
34
|
cssName: 'scroll-bar-width',
|
|
@@ -17,37 +41,122 @@ function overflowConverter(value) {
|
|
|
17
41
|
case 0:
|
|
18
42
|
return 'visible';
|
|
19
43
|
case 1:
|
|
20
|
-
return '
|
|
44
|
+
return 'clip';
|
|
21
45
|
case 2:
|
|
46
|
+
return 'hidden';
|
|
47
|
+
case 3:
|
|
22
48
|
return 'scroll';
|
|
23
49
|
}
|
|
24
50
|
}
|
|
25
51
|
switch (value) {
|
|
26
52
|
case 'visible':
|
|
27
53
|
case 'hidden':
|
|
54
|
+
case 'clip':
|
|
28
55
|
case 'scroll':
|
|
29
56
|
return value;
|
|
30
57
|
default:
|
|
31
|
-
return
|
|
58
|
+
return undefined;
|
|
32
59
|
}
|
|
33
60
|
}
|
|
34
|
-
|
|
61
|
+
function masonLengthParse(value) {
|
|
62
|
+
try {
|
|
63
|
+
return CoreLength.parse(value);
|
|
64
|
+
}
|
|
65
|
+
catch (e) {
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function masonLengthPercentParse(value) {
|
|
70
|
+
try {
|
|
71
|
+
return CorePercentLength.parse(value);
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const filterProperty = new CssProperty({
|
|
78
|
+
name: 'filter',
|
|
79
|
+
cssName: 'filter',
|
|
80
|
+
});
|
|
81
|
+
filterProperty.register(Style);
|
|
82
|
+
const borderProperty = new CssProperty({
|
|
83
|
+
name: 'border',
|
|
84
|
+
cssName: 'border',
|
|
85
|
+
});
|
|
86
|
+
borderProperty.register(Style);
|
|
87
|
+
const backgroundProperty = new CssProperty({
|
|
88
|
+
name: 'background',
|
|
89
|
+
cssName: 'background',
|
|
90
|
+
});
|
|
91
|
+
backgroundProperty.register(Style);
|
|
92
|
+
const overFlow = /^\s*(visible|hidden|clip|scroll|auto)(?:\s+(visible|hidden|clip|scroll|auto))?\s*$/;
|
|
93
|
+
export const overflowProperty = new ShorthandProperty({
|
|
35
94
|
name: 'overflow',
|
|
36
95
|
cssName: 'overflow',
|
|
37
|
-
|
|
38
|
-
|
|
96
|
+
getter: function () {
|
|
97
|
+
if (this.overflowX === this.overflowY) {
|
|
98
|
+
return this.overflowX;
|
|
99
|
+
}
|
|
100
|
+
return `${this.overflowX} ${this.overflowY}`;
|
|
101
|
+
},
|
|
102
|
+
converter(value) {
|
|
103
|
+
const properties = [];
|
|
104
|
+
if (typeof value === 'string') {
|
|
105
|
+
const values = value.match(overFlow);
|
|
106
|
+
const length = values?.length ?? 0;
|
|
107
|
+
if (length === 0) {
|
|
108
|
+
return properties;
|
|
109
|
+
}
|
|
110
|
+
if (length === 1) {
|
|
111
|
+
const xy = values[0];
|
|
112
|
+
properties.push([overflowXProperty, xy]);
|
|
113
|
+
properties.push([overflowYProperty, xy]);
|
|
114
|
+
}
|
|
115
|
+
if (length > 1) {
|
|
116
|
+
const x = values[0];
|
|
117
|
+
const y = values[1];
|
|
118
|
+
properties.push([overflowXProperty, x]);
|
|
119
|
+
properties.push([overflowYProperty, y]);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return properties;
|
|
123
|
+
},
|
|
39
124
|
});
|
|
40
125
|
export const overflowXProperty = new CssProperty({
|
|
41
126
|
name: 'overflowX',
|
|
42
127
|
cssName: 'overflow-x',
|
|
43
128
|
defaultValue: 'visible',
|
|
44
129
|
valueConverter: overflowConverter,
|
|
130
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
131
|
+
const view = getViewStyle(target.viewRef);
|
|
132
|
+
if (view) {
|
|
133
|
+
if (newValue) {
|
|
134
|
+
view.overflowX = newValue;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
// Revert to old value if newValue is invalid
|
|
138
|
+
view.view.style.overflowX = oldValue;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
45
142
|
});
|
|
46
143
|
export const overflowYProperty = new CssProperty({
|
|
47
|
-
name: '
|
|
144
|
+
name: 'overflowY',
|
|
48
145
|
cssName: 'overflow-y',
|
|
49
146
|
defaultValue: 'visible',
|
|
50
147
|
valueConverter: overflowConverter,
|
|
148
|
+
valueChanged(target, oldValue, newValue) {
|
|
149
|
+
const view = getViewStyle(target.viewRef);
|
|
150
|
+
if (view) {
|
|
151
|
+
if (newValue) {
|
|
152
|
+
view.overflowY = newValue;
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
// Revert to old value if newValue is invalid
|
|
156
|
+
view.view.style.overflowY = oldValue;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
51
160
|
});
|
|
52
161
|
const paddingProperty = new ShorthandProperty({
|
|
53
162
|
name: 'padding',
|
|
@@ -67,15 +176,15 @@ export const paddingLeftProperty = new CssProperty({
|
|
|
67
176
|
affectsLayout: global.isIOS,
|
|
68
177
|
equalityComparer: CoreLength.equals,
|
|
69
178
|
valueChanged: (target, oldValue, newValue) => {
|
|
70
|
-
const view = target.viewRef
|
|
179
|
+
const view = getViewStyle(target.viewRef);
|
|
71
180
|
if (view) {
|
|
72
|
-
view.
|
|
181
|
+
view.paddingLeft = CoreLength.toDevicePixels(newValue, 0);
|
|
73
182
|
}
|
|
74
183
|
else {
|
|
75
184
|
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
76
185
|
}
|
|
77
186
|
},
|
|
78
|
-
valueConverter:
|
|
187
|
+
valueConverter: masonLengthParse,
|
|
79
188
|
});
|
|
80
189
|
export const paddingRightProperty = new CssProperty({
|
|
81
190
|
name: 'paddingRight',
|
|
@@ -84,15 +193,15 @@ export const paddingRightProperty = new CssProperty({
|
|
|
84
193
|
affectsLayout: global.isIOS,
|
|
85
194
|
equalityComparer: CoreLength.equals,
|
|
86
195
|
valueChanged: (target, oldValue, newValue) => {
|
|
87
|
-
const view = target.viewRef
|
|
196
|
+
const view = getViewStyle(target.viewRef);
|
|
88
197
|
if (view) {
|
|
89
|
-
view.
|
|
198
|
+
view.paddingRight = CoreLength.toDevicePixels(newValue, 0);
|
|
90
199
|
}
|
|
91
200
|
else {
|
|
92
201
|
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
93
202
|
}
|
|
94
203
|
},
|
|
95
|
-
valueConverter:
|
|
204
|
+
valueConverter: masonLengthParse,
|
|
96
205
|
});
|
|
97
206
|
export const paddingTopProperty = new CssProperty({
|
|
98
207
|
name: 'paddingTop',
|
|
@@ -101,15 +210,15 @@ export const paddingTopProperty = new CssProperty({
|
|
|
101
210
|
affectsLayout: global.isIOS,
|
|
102
211
|
equalityComparer: CoreLength.equals,
|
|
103
212
|
valueChanged: (target, oldValue, newValue) => {
|
|
104
|
-
const view = target.viewRef
|
|
213
|
+
const view = getViewStyle(target.viewRef);
|
|
105
214
|
if (view) {
|
|
106
|
-
view.
|
|
215
|
+
view.paddingTop = CoreLength.toDevicePixels(newValue, 0);
|
|
107
216
|
}
|
|
108
217
|
else {
|
|
109
218
|
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
110
219
|
}
|
|
111
220
|
},
|
|
112
|
-
valueConverter:
|
|
221
|
+
valueConverter: masonLengthParse,
|
|
113
222
|
});
|
|
114
223
|
export const paddingBottomProperty = new CssProperty({
|
|
115
224
|
name: 'paddingBottom',
|
|
@@ -118,15 +227,15 @@ export const paddingBottomProperty = new CssProperty({
|
|
|
118
227
|
affectsLayout: global.isIOS,
|
|
119
228
|
equalityComparer: CoreLength.equals,
|
|
120
229
|
valueChanged: (target, oldValue, newValue) => {
|
|
121
|
-
const view = target.viewRef
|
|
230
|
+
const view = getViewStyle(target.viewRef);
|
|
122
231
|
if (view) {
|
|
123
|
-
view.
|
|
232
|
+
view.paddingBottom = CoreLength.toDevicePixels(newValue, 0);
|
|
124
233
|
}
|
|
125
234
|
else {
|
|
126
235
|
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
127
236
|
}
|
|
128
237
|
},
|
|
129
|
-
valueConverter:
|
|
238
|
+
valueConverter: masonLengthParse,
|
|
130
239
|
});
|
|
131
240
|
export const rowGapProperty = new CssProperty({
|
|
132
241
|
name: 'rowGap',
|
|
@@ -139,6 +248,12 @@ export const rowGapProperty = new CssProperty({
|
|
|
139
248
|
}
|
|
140
249
|
return parsed;
|
|
141
250
|
},
|
|
251
|
+
valueChanged(target, oldValue, newValue) {
|
|
252
|
+
const view = getViewStyle(target.viewRef);
|
|
253
|
+
if (view) {
|
|
254
|
+
view.rowGap = newValue;
|
|
255
|
+
}
|
|
256
|
+
},
|
|
142
257
|
});
|
|
143
258
|
export const columnGapProperty = new CssProperty({
|
|
144
259
|
name: 'columnGap',
|
|
@@ -151,6 +266,48 @@ export const columnGapProperty = new CssProperty({
|
|
|
151
266
|
}
|
|
152
267
|
return parsed;
|
|
153
268
|
},
|
|
269
|
+
valueChanged(target, oldValue, newValue) {
|
|
270
|
+
const view = getViewStyle(target.viewRef);
|
|
271
|
+
if (view) {
|
|
272
|
+
view.columnGap = newValue;
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
});
|
|
276
|
+
export const gridGapProperty = new ShorthandProperty({
|
|
277
|
+
name: 'gridGap',
|
|
278
|
+
cssName: 'grid-gap',
|
|
279
|
+
getter: function () {
|
|
280
|
+
if (this.rowGap === this.columnGap) {
|
|
281
|
+
return this.rowGap;
|
|
282
|
+
}
|
|
283
|
+
return `${this.rowGap} ${this.columnGap}`;
|
|
284
|
+
},
|
|
285
|
+
converter(gap) {
|
|
286
|
+
const properties = [];
|
|
287
|
+
let value = gap;
|
|
288
|
+
if (typeof value === 'number') {
|
|
289
|
+
value = `${value}`;
|
|
290
|
+
}
|
|
291
|
+
if (typeof value === 'string') {
|
|
292
|
+
const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
|
|
293
|
+
const length = values.length;
|
|
294
|
+
if (length === 0) {
|
|
295
|
+
return properties;
|
|
296
|
+
}
|
|
297
|
+
if (length === 1) {
|
|
298
|
+
const row = values[0];
|
|
299
|
+
properties.push([rowGapProperty, row]);
|
|
300
|
+
properties.push([columnGapProperty, row]);
|
|
301
|
+
}
|
|
302
|
+
if (length > 1) {
|
|
303
|
+
const row = values[0];
|
|
304
|
+
const column = values[1];
|
|
305
|
+
properties.push([rowGapProperty, row]);
|
|
306
|
+
properties.push([columnGapProperty, column]);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return properties;
|
|
310
|
+
},
|
|
154
311
|
});
|
|
155
312
|
export const gapProperty = new ShorthandProperty({
|
|
156
313
|
name: 'gap',
|
|
@@ -161,8 +318,12 @@ export const gapProperty = new ShorthandProperty({
|
|
|
161
318
|
}
|
|
162
319
|
return `${this.rowGap} ${this.columnGap}`;
|
|
163
320
|
},
|
|
164
|
-
converter(
|
|
321
|
+
converter(gap) {
|
|
165
322
|
const properties = [];
|
|
323
|
+
let value = gap;
|
|
324
|
+
if (typeof value === 'number') {
|
|
325
|
+
value = `${value}`;
|
|
326
|
+
}
|
|
166
327
|
if (typeof value === 'string') {
|
|
167
328
|
const values = value.split(/\s+/).filter((item) => item.trim().length !== 0);
|
|
168
329
|
const length = values.length;
|
|
@@ -200,7 +361,17 @@ export const displayProperty = new CssProperty({
|
|
|
200
361
|
name: 'display',
|
|
201
362
|
cssName: 'display',
|
|
202
363
|
defaultValue: 'block',
|
|
203
|
-
|
|
364
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
365
|
+
const view = getViewStyle(target.viewRef);
|
|
366
|
+
if (view && newValue) {
|
|
367
|
+
view.display = newValue;
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
// Revert to old value if newValue is invalid
|
|
371
|
+
view.view.style.display = oldValue;
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
valueConverter: function (value) {
|
|
204
375
|
if (typeof value === 'number') {
|
|
205
376
|
switch (value) {
|
|
206
377
|
case 0:
|
|
@@ -211,6 +382,14 @@ export const displayProperty = new CssProperty({
|
|
|
211
382
|
return 'grid';
|
|
212
383
|
case 3:
|
|
213
384
|
return 'block';
|
|
385
|
+
case 4:
|
|
386
|
+
return 'inline';
|
|
387
|
+
case 5:
|
|
388
|
+
return 'inline-block';
|
|
389
|
+
case 6:
|
|
390
|
+
return 'inline-flex';
|
|
391
|
+
case 7:
|
|
392
|
+
return 'inline-grid';
|
|
214
393
|
}
|
|
215
394
|
}
|
|
216
395
|
switch (value) {
|
|
@@ -218,10 +397,13 @@ export const displayProperty = new CssProperty({
|
|
|
218
397
|
case 'flex':
|
|
219
398
|
case 'grid':
|
|
220
399
|
case 'block':
|
|
400
|
+
case 'inline':
|
|
401
|
+
case 'inline-block':
|
|
402
|
+
case 'inline-flex':
|
|
403
|
+
case 'inline-grid':
|
|
221
404
|
return value;
|
|
222
405
|
default:
|
|
223
|
-
|
|
224
|
-
return 'block';
|
|
406
|
+
return undefined;
|
|
225
407
|
}
|
|
226
408
|
},
|
|
227
409
|
});
|
|
@@ -231,6 +413,16 @@ export const maxWidthProperty = new CssProperty({
|
|
|
231
413
|
defaultValue: 'auto',
|
|
232
414
|
// @ts-ignore
|
|
233
415
|
equalityComparer: NSLength.equals,
|
|
416
|
+
valueConverter: masonLengthParse,
|
|
417
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
418
|
+
const view = getViewStyle(target.viewRef);
|
|
419
|
+
if (view) {
|
|
420
|
+
view.maxWidth = newValue;
|
|
421
|
+
}
|
|
422
|
+
else {
|
|
423
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
424
|
+
}
|
|
425
|
+
},
|
|
234
426
|
});
|
|
235
427
|
export const maxHeightProperty = new CssProperty({
|
|
236
428
|
name: 'maxHeight',
|
|
@@ -238,11 +430,24 @@ export const maxHeightProperty = new CssProperty({
|
|
|
238
430
|
defaultValue: 'auto',
|
|
239
431
|
// @ts-ignore
|
|
240
432
|
equalityComparer: NSLength.equals,
|
|
433
|
+
valueConverter: masonLengthParse,
|
|
434
|
+
valueChanged(target, oldValue, newValue) {
|
|
435
|
+
const view = getViewStyle(target.viewRef);
|
|
436
|
+
if (view) {
|
|
437
|
+
view.maxHeight = newValue;
|
|
438
|
+
}
|
|
439
|
+
},
|
|
241
440
|
});
|
|
242
441
|
export const positionProperty = new CssProperty({
|
|
243
442
|
name: 'position',
|
|
244
443
|
cssName: 'position',
|
|
245
444
|
defaultValue: 'relative',
|
|
445
|
+
valueChanged(target, oldValue, newValue) {
|
|
446
|
+
const view = getViewStyle(target.viewRef);
|
|
447
|
+
if (view) {
|
|
448
|
+
view.position = newValue;
|
|
449
|
+
}
|
|
450
|
+
},
|
|
246
451
|
});
|
|
247
452
|
// export const flexDirectionProperty = new CssProperty<Style, FlexDirection>({
|
|
248
453
|
// name: 'flexDirection',
|
|
@@ -253,12 +458,63 @@ export const positionProperty = new CssProperty({
|
|
|
253
458
|
// cssName: 'flex-wrap',
|
|
254
459
|
// defaultValue: 'no-wrap',
|
|
255
460
|
// });
|
|
461
|
+
const insetProperty = new ShorthandProperty({
|
|
462
|
+
name: 'inset',
|
|
463
|
+
cssName: 'inset',
|
|
464
|
+
getter: function () {
|
|
465
|
+
if (this.top === this.right && this.top === this.bottom && this.top === this.left) {
|
|
466
|
+
if (typeof this.top === 'string') {
|
|
467
|
+
if (this.top === 'auto') {
|
|
468
|
+
return this.top;
|
|
469
|
+
}
|
|
470
|
+
const value = CorePercentLength.parse(this.top);
|
|
471
|
+
if (Number.isNaN(value)) {
|
|
472
|
+
return this.top;
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
return CorePercentLength.convertToString(value);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (CorePercentLength.equals(this.top, this.right) && CorePercentLength.equals(this.top, this.bottom) && CorePercentLength.equals(this.top, this.left)) {
|
|
480
|
+
return this.top;
|
|
481
|
+
}
|
|
482
|
+
return `${CorePercentLength.convertToString(this.paddingTop)} ${CorePercentLength.convertToString(this.paddingRight)} ${CorePercentLength.convertToString(this.paddingBottom)} ${CorePercentLength.convertToString(this.paddingLeft)}`;
|
|
483
|
+
},
|
|
484
|
+
converter: convertToInsets,
|
|
485
|
+
});
|
|
486
|
+
function convertToInsets(value) {
|
|
487
|
+
if (typeof value === 'string' && value !== 'auto') {
|
|
488
|
+
const thickness = parseShorthandPositioning(value);
|
|
489
|
+
return [
|
|
490
|
+
[topProperty, masonLengthPercentParse(thickness.top)],
|
|
491
|
+
[rightProperty, masonLengthPercentParse(thickness.right)],
|
|
492
|
+
[bottomProperty, masonLengthPercentParse(thickness.bottom)],
|
|
493
|
+
[leftProperty, masonLengthPercentParse(thickness.left)],
|
|
494
|
+
];
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
return [
|
|
498
|
+
[topProperty, value],
|
|
499
|
+
[rightProperty, value],
|
|
500
|
+
[bottomProperty, value],
|
|
501
|
+
[leftProperty, value],
|
|
502
|
+
];
|
|
503
|
+
}
|
|
504
|
+
}
|
|
256
505
|
export const leftProperty = new CssProperty({
|
|
257
506
|
name: 'left',
|
|
258
507
|
cssName: 'left',
|
|
259
508
|
defaultValue: 'auto',
|
|
260
509
|
// @ts-ignore
|
|
261
510
|
equalityComparer: NSLength.equals,
|
|
511
|
+
valueConverter: masonLengthParse,
|
|
512
|
+
valueChanged(target, oldValue, newValue) {
|
|
513
|
+
const view = getViewStyle(target.viewRef);
|
|
514
|
+
if (view) {
|
|
515
|
+
view.left = newValue;
|
|
516
|
+
}
|
|
517
|
+
},
|
|
262
518
|
});
|
|
263
519
|
export const rightProperty = new CssProperty({
|
|
264
520
|
name: 'right',
|
|
@@ -266,6 +522,13 @@ export const rightProperty = new CssProperty({
|
|
|
266
522
|
defaultValue: 'auto',
|
|
267
523
|
// @ts-ignore
|
|
268
524
|
equalityComparer: NSLength.equals,
|
|
525
|
+
valueConverter: masonLengthParse,
|
|
526
|
+
valueChanged(target, oldValue, newValue) {
|
|
527
|
+
const view = getViewStyle(target.viewRef);
|
|
528
|
+
if (view) {
|
|
529
|
+
view.right = newValue;
|
|
530
|
+
}
|
|
531
|
+
},
|
|
269
532
|
});
|
|
270
533
|
export const topProperty = new CssProperty({
|
|
271
534
|
name: 'top',
|
|
@@ -273,6 +536,13 @@ export const topProperty = new CssProperty({
|
|
|
273
536
|
defaultValue: 'auto',
|
|
274
537
|
// @ts-ignore
|
|
275
538
|
equalityComparer: NSLength.equals,
|
|
539
|
+
valueConverter: masonLengthParse,
|
|
540
|
+
valueChanged(target, oldValue, newValue) {
|
|
541
|
+
const view = getViewStyle(target.viewRef);
|
|
542
|
+
if (view) {
|
|
543
|
+
view.top = newValue;
|
|
544
|
+
}
|
|
545
|
+
},
|
|
276
546
|
});
|
|
277
547
|
export const bottomProperty = new CssProperty({
|
|
278
548
|
name: 'bottom',
|
|
@@ -280,11 +550,26 @@ export const bottomProperty = new CssProperty({
|
|
|
280
550
|
defaultValue: 'auto',
|
|
281
551
|
// @ts-ignore
|
|
282
552
|
equalityComparer: NSLength.equals,
|
|
553
|
+
valueConverter: masonLengthParse,
|
|
554
|
+
valueChanged(target, oldValue, newValue) {
|
|
555
|
+
const view = getViewStyle(target.viewRef);
|
|
556
|
+
if (view) {
|
|
557
|
+
view.bottom = newValue;
|
|
558
|
+
}
|
|
559
|
+
},
|
|
283
560
|
});
|
|
284
561
|
export const flexBasisProperty = new CssProperty({
|
|
285
562
|
name: 'flexBasis',
|
|
286
563
|
cssName: 'flex-basis',
|
|
287
564
|
defaultValue: 'auto',
|
|
565
|
+
equalityComparer: NSLength.equals,
|
|
566
|
+
valueConverter: masonLengthParse,
|
|
567
|
+
valueChanged(target, oldValue, newValue) {
|
|
568
|
+
const view = getViewStyle(target.viewRef);
|
|
569
|
+
if (view) {
|
|
570
|
+
view.flexBasis = newValue;
|
|
571
|
+
}
|
|
572
|
+
},
|
|
288
573
|
});
|
|
289
574
|
export const gridRowGapProperty = new ShorthandProperty({
|
|
290
575
|
name: 'gridRowGap',
|
|
@@ -310,247 +595,221 @@ export const aspectRatioProperty = new CssProperty({
|
|
|
310
595
|
name: 'aspectRatio',
|
|
311
596
|
cssName: 'aspect-ratio',
|
|
312
597
|
defaultValue: Number.NaN,
|
|
598
|
+
valueChanged(target, oldValue, newValue) {
|
|
599
|
+
const view = getViewStyle(target.viewRef);
|
|
600
|
+
if (view) {
|
|
601
|
+
view.aspectRatio = newValue;
|
|
602
|
+
}
|
|
603
|
+
},
|
|
313
604
|
});
|
|
314
605
|
export const alignItemsProperty = new CssProperty({
|
|
315
606
|
name: 'alignItems',
|
|
316
607
|
cssName: 'align-items',
|
|
317
608
|
defaultValue: 'normal',
|
|
609
|
+
valueChanged(target, oldValue, newValue) {
|
|
610
|
+
const view = getViewStyle(target.viewRef);
|
|
611
|
+
if (view) {
|
|
612
|
+
view.alignItems = newValue;
|
|
613
|
+
}
|
|
614
|
+
},
|
|
318
615
|
});
|
|
319
616
|
export const alignSelfProperty = new CssProperty({
|
|
320
617
|
name: 'alignSelf',
|
|
321
618
|
cssName: 'align-self',
|
|
322
619
|
defaultValue: 'normal',
|
|
620
|
+
valueChanged(target, oldValue, newValue) {
|
|
621
|
+
const view = getViewStyle(target.viewRef);
|
|
622
|
+
if (view) {
|
|
623
|
+
view.alignSelf = newValue;
|
|
624
|
+
}
|
|
625
|
+
},
|
|
323
626
|
});
|
|
324
627
|
export const alignContentProperty = new CssProperty({
|
|
325
628
|
name: 'alignContent',
|
|
326
629
|
cssName: 'align-content',
|
|
327
630
|
defaultValue: 'normal',
|
|
631
|
+
valueChanged(target, oldValue, newValue) {
|
|
632
|
+
const view = getViewStyle(target.viewRef);
|
|
633
|
+
if (view) {
|
|
634
|
+
view.alignContent = newValue;
|
|
635
|
+
}
|
|
636
|
+
},
|
|
328
637
|
});
|
|
329
638
|
export const justifyItemsProperty = new CssProperty({
|
|
330
639
|
name: 'justifyItems',
|
|
331
640
|
cssName: 'justify-items',
|
|
332
641
|
defaultValue: 'normal',
|
|
642
|
+
valueChanged(target, oldValue, newValue) {
|
|
643
|
+
const view = getViewStyle(target.viewRef);
|
|
644
|
+
if (view) {
|
|
645
|
+
view.justifyItems = newValue;
|
|
646
|
+
}
|
|
647
|
+
},
|
|
333
648
|
});
|
|
334
649
|
export const justifySelfProperty = new CssProperty({
|
|
335
650
|
name: 'justifySelf',
|
|
336
651
|
cssName: 'justify-self',
|
|
337
652
|
defaultValue: 'normal',
|
|
653
|
+
valueChanged(target, oldValue, newValue) {
|
|
654
|
+
const view = getViewStyle(target.viewRef);
|
|
655
|
+
if (view) {
|
|
656
|
+
view.justifySelf = newValue;
|
|
657
|
+
}
|
|
658
|
+
},
|
|
338
659
|
});
|
|
339
660
|
export const justifyContentProperty = new CssProperty({
|
|
340
661
|
name: 'justifyContent',
|
|
341
662
|
cssName: 'justify-content',
|
|
342
663
|
defaultValue: 'normal',
|
|
664
|
+
valueChanged(target, oldValue, newValue) {
|
|
665
|
+
const view = getViewStyle(target.viewRef);
|
|
666
|
+
if (view) {
|
|
667
|
+
view.justifyContent = newValue;
|
|
668
|
+
}
|
|
669
|
+
},
|
|
343
670
|
});
|
|
344
671
|
export const gridAutoRowsProperty = new CssProperty({
|
|
345
672
|
name: 'gridAutoRows',
|
|
346
673
|
cssName: 'grid-auto-rows',
|
|
347
674
|
defaultValue: '',
|
|
675
|
+
valueChanged(target, oldValue, newValue) {
|
|
676
|
+
const view = getViewStyle(target.viewRef);
|
|
677
|
+
if (view) {
|
|
678
|
+
view.gridAutoRows = newValue;
|
|
679
|
+
}
|
|
680
|
+
},
|
|
348
681
|
});
|
|
349
682
|
export const gridAutoColumnsProperty = new CssProperty({
|
|
350
683
|
name: 'gridAutoColumns',
|
|
351
684
|
cssName: 'grid-auto-columns',
|
|
352
685
|
defaultValue: '',
|
|
686
|
+
valueChanged(target, oldValue, newValue) {
|
|
687
|
+
const view = getViewStyle(target.viewRef);
|
|
688
|
+
if (view) {
|
|
689
|
+
view.gridAutoColumns = newValue;
|
|
690
|
+
}
|
|
691
|
+
},
|
|
353
692
|
});
|
|
354
693
|
export const gridAutoFlowProperty = new CssProperty({
|
|
355
694
|
name: 'gridAutoFlow',
|
|
356
695
|
cssName: 'grid-auto-flow',
|
|
357
696
|
defaultValue: 'row',
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
363
|
-
else {
|
|
364
|
-
const split = value.split(/\s+/).filter((item) => item.trim().length !== 0);
|
|
365
|
-
const length = split.length;
|
|
366
|
-
if (length === 0) {
|
|
367
|
-
return undefined;
|
|
368
|
-
}
|
|
369
|
-
const first = split[0];
|
|
370
|
-
if (length === 1) {
|
|
371
|
-
const parsedValue = Number(first);
|
|
372
|
-
if (Number.isNaN(parsedValue)) {
|
|
373
|
-
return undefined;
|
|
374
|
-
}
|
|
375
|
-
return first;
|
|
376
|
-
}
|
|
377
|
-
if (length === 2) {
|
|
378
|
-
if (first === 'span') {
|
|
379
|
-
const second = split[1];
|
|
380
|
-
const parsedValue = Number(second);
|
|
381
|
-
if (Number.isNaN(parsedValue)) {
|
|
382
|
-
return undefined;
|
|
383
|
-
}
|
|
384
|
-
return `${first} ${second}`;
|
|
385
|
-
}
|
|
697
|
+
valueChanged(target, oldValue, newValue) {
|
|
698
|
+
const view = getViewStyle(target.viewRef);
|
|
699
|
+
if (view) {
|
|
700
|
+
view.gridAutoFlow = newValue;
|
|
386
701
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
export const gridAreaProperty = new ShorthandProperty({
|
|
702
|
+
},
|
|
703
|
+
});
|
|
704
|
+
export const gridAreaProperty = new CssProperty({
|
|
392
705
|
name: 'gridArea',
|
|
393
706
|
cssName: 'grid-area',
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
// grid-row-start / grid-column-start / grid-row-end / grid-column-end
|
|
401
|
-
const length = values.length;
|
|
402
|
-
if (length === 0) {
|
|
403
|
-
return [];
|
|
404
|
-
}
|
|
405
|
-
if (length === 1) {
|
|
406
|
-
const parsed = parseGridColumnOrRow(values[0]);
|
|
407
|
-
return [
|
|
408
|
-
[gridRowStartProperty, parsed],
|
|
409
|
-
[gridRowEndProperty, parsed],
|
|
410
|
-
[gridColumnStartProperty, parsed],
|
|
411
|
-
[gridColumnEndProperty, parsed],
|
|
412
|
-
];
|
|
413
|
-
}
|
|
414
|
-
if (length === 2) {
|
|
415
|
-
const row = parseGridColumnOrRow(values[0]);
|
|
416
|
-
const column = parseGridColumnOrRow(values[1]);
|
|
417
|
-
return [
|
|
418
|
-
[gridRowStartProperty, row],
|
|
419
|
-
[gridRowEndProperty, row],
|
|
420
|
-
[gridColumnStartProperty, column],
|
|
421
|
-
[gridColumnEndProperty, column],
|
|
422
|
-
];
|
|
423
|
-
}
|
|
424
|
-
if (length === 3) {
|
|
425
|
-
const rowStart = parseGridColumnOrRow(values[0]);
|
|
426
|
-
const rowEnd = parseGridColumnOrRow(values[2]);
|
|
427
|
-
const columnStart = parseGridColumnOrRow(values[1]);
|
|
428
|
-
return [
|
|
429
|
-
[gridRowStartProperty, rowStart],
|
|
430
|
-
[gridRowEndProperty, rowEnd],
|
|
431
|
-
[gridColumnStartProperty, columnStart],
|
|
432
|
-
[gridColumnEndProperty, columnStart],
|
|
433
|
-
];
|
|
434
|
-
}
|
|
435
|
-
if (length >= 4) {
|
|
436
|
-
const rowStart = parseGridColumnOrRow(values[0]);
|
|
437
|
-
const rowEnd = parseGridColumnOrRow(values[2]);
|
|
438
|
-
const columnStart = parseGridColumnOrRow(values[1]);
|
|
439
|
-
const columnEnd = parseGridColumnOrRow(values[3]);
|
|
440
|
-
return [
|
|
441
|
-
[gridRowStartProperty, rowStart],
|
|
442
|
-
[gridRowEndProperty, rowEnd],
|
|
443
|
-
[gridColumnStartProperty, columnStart],
|
|
444
|
-
[gridColumnEndProperty, columnEnd],
|
|
445
|
-
];
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
return [];
|
|
707
|
+
defaultValue: '',
|
|
708
|
+
valueChanged(target, oldValue, newValue) {
|
|
709
|
+
const view = getViewStyle(target.viewRef);
|
|
710
|
+
if (view) {
|
|
711
|
+
view.gridArea = newValue;
|
|
712
|
+
}
|
|
449
713
|
},
|
|
450
714
|
});
|
|
451
715
|
export const gridColumnStartProperty = new CssProperty({
|
|
452
716
|
name: 'gridColumnStart',
|
|
453
717
|
cssName: 'grid-column-start',
|
|
454
718
|
defaultValue: 'auto',
|
|
719
|
+
valueChanged(target, oldValue, newValue) {
|
|
720
|
+
const view = getViewStyle(target.viewRef);
|
|
721
|
+
if (view) {
|
|
722
|
+
view.gridColumnStart = newValue;
|
|
723
|
+
}
|
|
724
|
+
},
|
|
455
725
|
});
|
|
456
726
|
export const gridColumnEndProperty = new CssProperty({
|
|
457
727
|
name: 'gridColumnEnd',
|
|
458
728
|
cssName: 'grid-column-end',
|
|
459
729
|
defaultValue: 'auto',
|
|
730
|
+
valueChanged(target, oldValue, newValue) {
|
|
731
|
+
const view = getViewStyle(target.viewRef);
|
|
732
|
+
if (view) {
|
|
733
|
+
view.gridColumnEnd = newValue;
|
|
734
|
+
}
|
|
735
|
+
},
|
|
460
736
|
});
|
|
461
|
-
export const gridColumnProperty = new
|
|
737
|
+
export const gridColumnProperty = new CssProperty({
|
|
462
738
|
name: 'gridColumn',
|
|
463
739
|
cssName: 'grid-column',
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
},
|
|
470
|
-
converter(value) {
|
|
471
|
-
if (typeof value === 'string') {
|
|
472
|
-
const values = value.split('/').filter((item) => item.trim().length !== 0);
|
|
473
|
-
const length = values.length;
|
|
474
|
-
if (length === 0) {
|
|
475
|
-
return [];
|
|
476
|
-
}
|
|
477
|
-
if (length === 1) {
|
|
478
|
-
const parsed = parseGridColumnOrRow(values[0]);
|
|
479
|
-
return [
|
|
480
|
-
[gridColumnStartProperty, parsed],
|
|
481
|
-
[gridColumnEndProperty, parsed],
|
|
482
|
-
];
|
|
483
|
-
}
|
|
484
|
-
if (length > 1) {
|
|
485
|
-
const start = values[0];
|
|
486
|
-
const end = values[1];
|
|
487
|
-
const parsedStart = parseGridColumnOrRow(start);
|
|
488
|
-
const parsedEnd = parseGridColumnOrRow(end);
|
|
489
|
-
return [
|
|
490
|
-
[gridColumnStartProperty, parsedStart],
|
|
491
|
-
[gridColumnEndProperty, parsedEnd],
|
|
492
|
-
];
|
|
493
|
-
}
|
|
740
|
+
defaultValue: '',
|
|
741
|
+
valueChanged(target, oldValue, newValue) {
|
|
742
|
+
const view = getViewStyle(target.viewRef);
|
|
743
|
+
if (view) {
|
|
744
|
+
view.gridColumn = newValue;
|
|
494
745
|
}
|
|
495
|
-
return [];
|
|
496
746
|
},
|
|
497
747
|
});
|
|
498
748
|
export const gridRowStartProperty = new CssProperty({
|
|
499
749
|
name: 'gridRowStart',
|
|
500
750
|
cssName: 'grid-row-start',
|
|
501
751
|
defaultValue: 'auto',
|
|
752
|
+
valueChanged(target, oldValue, newValue) {
|
|
753
|
+
const view = getViewStyle(target.viewRef);
|
|
754
|
+
if (view) {
|
|
755
|
+
view.gridRowStart = newValue;
|
|
756
|
+
}
|
|
757
|
+
},
|
|
502
758
|
});
|
|
503
759
|
export const gridRowEndProperty = new CssProperty({
|
|
504
760
|
name: 'gridRowEnd',
|
|
505
761
|
cssName: 'grid-row-end',
|
|
506
762
|
defaultValue: 'auto',
|
|
763
|
+
valueChanged(target, oldValue, newValue) {
|
|
764
|
+
const view = getViewStyle(target.viewRef);
|
|
765
|
+
if (view) {
|
|
766
|
+
view.gridRowEnd = newValue;
|
|
767
|
+
}
|
|
768
|
+
},
|
|
507
769
|
});
|
|
508
|
-
export const gridRowProperty = new
|
|
770
|
+
export const gridRowProperty = new CssProperty({
|
|
509
771
|
name: 'gridRow',
|
|
510
772
|
cssName: 'grid-row',
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
773
|
+
defaultValue: '',
|
|
774
|
+
valueChanged(target, oldValue, newValue) {
|
|
775
|
+
const view = getViewStyle(target.viewRef);
|
|
776
|
+
if (view) {
|
|
777
|
+
view.gridRow = newValue;
|
|
514
778
|
}
|
|
515
|
-
return `${this.gridRowStart} / ${this.gridRowStart}`;
|
|
516
779
|
},
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
return [
|
|
527
|
-
[gridRowStartProperty, parsed],
|
|
528
|
-
[gridRowEndProperty, parsed],
|
|
529
|
-
];
|
|
530
|
-
}
|
|
531
|
-
if (length > 1) {
|
|
532
|
-
const start = values[0];
|
|
533
|
-
const end = values[1];
|
|
534
|
-
const parsedStart = parseGridColumnOrRow(start);
|
|
535
|
-
const parsedEnd = parseGridColumnOrRow(end);
|
|
536
|
-
return [
|
|
537
|
-
[gridRowStartProperty, parsedStart],
|
|
538
|
-
[gridRowEndProperty, parsedEnd],
|
|
539
|
-
];
|
|
540
|
-
}
|
|
780
|
+
});
|
|
781
|
+
export const gridTemplateAreasProperty = new CssProperty({
|
|
782
|
+
name: 'gridTemplateAreas',
|
|
783
|
+
cssName: 'grid-template-areas',
|
|
784
|
+
defaultValue: null,
|
|
785
|
+
valueChanged(target, oldValue, newValue) {
|
|
786
|
+
const view = getViewStyle(target.viewRef);
|
|
787
|
+
if (view) {
|
|
788
|
+
view.gridTemplateAreas = newValue;
|
|
541
789
|
}
|
|
542
|
-
return [];
|
|
543
790
|
},
|
|
544
791
|
});
|
|
545
792
|
export const gridTemplateRowsProperty = new CssProperty({
|
|
546
793
|
name: 'gridTemplateRows',
|
|
547
794
|
cssName: 'grid-template-rows',
|
|
548
795
|
defaultValue: null,
|
|
796
|
+
valueChanged(target, oldValue, newValue) {
|
|
797
|
+
const view = getViewStyle(target.viewRef);
|
|
798
|
+
if (view) {
|
|
799
|
+
view.gridTemplateRows = newValue;
|
|
800
|
+
}
|
|
801
|
+
},
|
|
549
802
|
});
|
|
550
803
|
export const gridTemplateColumnsProperty = new CssProperty({
|
|
551
804
|
name: 'gridTemplateColumns',
|
|
552
805
|
cssName: 'grid-template-columns',
|
|
553
806
|
defaultValue: null,
|
|
807
|
+
valueChanged(target, oldValue, newValue) {
|
|
808
|
+
const view = getViewStyle(target.viewRef);
|
|
809
|
+
if (view) {
|
|
810
|
+
view.gridTemplateColumns = newValue;
|
|
811
|
+
}
|
|
812
|
+
},
|
|
554
813
|
});
|
|
555
814
|
// flex-flow: <flex-direction> || <flex-wrap>
|
|
556
815
|
const flexFlowProperty = new ShorthandProperty({
|
|
@@ -637,27 +896,74 @@ const flexProperty = new ShorthandProperty({
|
|
|
637
896
|
return properties;
|
|
638
897
|
},
|
|
639
898
|
});
|
|
640
|
-
|
|
899
|
+
// @ts-ignore
|
|
900
|
+
export const textWrapProperty = new CssProperty({
|
|
641
901
|
name: 'textWrap',
|
|
642
902
|
affectsLayout: true,
|
|
643
903
|
defaultValue: 'nowrap',
|
|
904
|
+
valueChanged(target, oldValue, newValue) {
|
|
905
|
+
const view = target?.viewRef ? getViewStyle(target.viewRef) : target.view;
|
|
906
|
+
if (view) {
|
|
907
|
+
view.textWrap = newValue;
|
|
908
|
+
}
|
|
909
|
+
},
|
|
644
910
|
});
|
|
645
|
-
|
|
646
|
-
|
|
911
|
+
// @ts-ignore
|
|
912
|
+
export const textOverFlowProperty = new CssProperty({
|
|
913
|
+
name: 'textOverflow',
|
|
914
|
+
defaultValue: 'text-overflow',
|
|
915
|
+
valueChanged(target, oldValue, newValue) {
|
|
916
|
+
const view = target?.viewRef ? getViewStyle(target.viewRef) : target.view;
|
|
917
|
+
if (view) {
|
|
918
|
+
view.textOverflow = newValue;
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
});
|
|
922
|
+
export const textContentProperty = new Property({
|
|
923
|
+
name: 'textContent',
|
|
647
924
|
affectsLayout: true,
|
|
648
925
|
defaultValue: '',
|
|
649
926
|
});
|
|
650
|
-
|
|
927
|
+
export const boxSizingProperty = new CssProperty({
|
|
928
|
+
name: 'boxSizing',
|
|
929
|
+
cssName: 'box-sizing',
|
|
930
|
+
defaultValue: 'border-box',
|
|
931
|
+
valueChanged(target, oldValue, newValue) {
|
|
932
|
+
const view = getViewStyle(target.viewRef);
|
|
933
|
+
if (view) {
|
|
934
|
+
if (newValue) {
|
|
935
|
+
view.boxSizing = newValue;
|
|
936
|
+
}
|
|
937
|
+
else {
|
|
938
|
+
// Revert to old value if newValue is invalid
|
|
939
|
+
view.view.style.boxSizing = oldValue;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
},
|
|
943
|
+
valueConverter(value) {
|
|
944
|
+
switch (value) {
|
|
945
|
+
case 'content-box':
|
|
946
|
+
case 'border-box':
|
|
947
|
+
return value;
|
|
948
|
+
default:
|
|
949
|
+
return undefined;
|
|
950
|
+
}
|
|
951
|
+
},
|
|
952
|
+
});
|
|
953
|
+
export class ViewBase extends CustomLayoutView {
|
|
651
954
|
constructor() {
|
|
652
955
|
super();
|
|
653
956
|
this._children = [];
|
|
654
|
-
this
|
|
655
|
-
this
|
|
656
|
-
this
|
|
957
|
+
this[_a] = false;
|
|
958
|
+
this[_b] = false;
|
|
959
|
+
this[_c] = false;
|
|
657
960
|
}
|
|
658
961
|
forceStyleUpdate() {
|
|
659
962
|
_forceStyleUpdate(this);
|
|
660
963
|
}
|
|
964
|
+
get _viewChildren() {
|
|
965
|
+
return this._children.filter((child) => child instanceof NSView);
|
|
966
|
+
}
|
|
661
967
|
eachLayoutChild(callback) {
|
|
662
968
|
let lastChild = null;
|
|
663
969
|
this.eachChildView((cv) => {
|
|
@@ -674,42 +980,96 @@ let ViewBase = class ViewBase extends CustomLayoutView {
|
|
|
674
980
|
}
|
|
675
981
|
}
|
|
676
982
|
eachChild(callback) {
|
|
677
|
-
for (const child of this.
|
|
983
|
+
for (const child of this._viewChildren) {
|
|
678
984
|
callback(child);
|
|
679
985
|
}
|
|
680
986
|
}
|
|
681
987
|
eachChildView(callback) {
|
|
682
|
-
for (const view of this.
|
|
988
|
+
for (const view of this._viewChildren) {
|
|
683
989
|
callback(view);
|
|
684
990
|
}
|
|
685
991
|
}
|
|
686
992
|
_addChildFromBuilder(name, value) {
|
|
687
|
-
|
|
688
|
-
this.addChild(value);
|
|
689
|
-
}
|
|
993
|
+
this.addChild(value);
|
|
690
994
|
}
|
|
691
995
|
getChildrenCount() {
|
|
692
|
-
return this.
|
|
996
|
+
return this._viewChildren.length;
|
|
693
997
|
}
|
|
694
998
|
get _childrenCount() {
|
|
695
|
-
return this.
|
|
999
|
+
return this._viewChildren.length;
|
|
696
1000
|
}
|
|
697
1001
|
getChildAt(index) {
|
|
698
|
-
return this.
|
|
1002
|
+
return this._viewChildren[index];
|
|
699
1003
|
}
|
|
700
1004
|
getChildIndex(child) {
|
|
701
|
-
return this.
|
|
1005
|
+
return this._viewChildren.indexOf(child);
|
|
702
1006
|
}
|
|
703
1007
|
getChildById(id) {
|
|
704
1008
|
return getViewById(this, id);
|
|
705
1009
|
}
|
|
706
1010
|
addChild(child) {
|
|
707
|
-
|
|
708
|
-
|
|
1011
|
+
if (child instanceof NSView) {
|
|
1012
|
+
this._children.push(child);
|
|
1013
|
+
if (this[isText_]) {
|
|
1014
|
+
child[isTextChild_] = true;
|
|
1015
|
+
}
|
|
1016
|
+
this._addView(child);
|
|
1017
|
+
}
|
|
1018
|
+
else {
|
|
1019
|
+
if (text_ in child) {
|
|
1020
|
+
//@ts-ignore
|
|
1021
|
+
if (this._view) {
|
|
1022
|
+
if (__ANDROID__) {
|
|
1023
|
+
//@ts-ignore
|
|
1024
|
+
this._view.addChildAt(child[text_] || '', this._children.length);
|
|
1025
|
+
}
|
|
1026
|
+
if (__APPLE__) {
|
|
1027
|
+
//@ts-ignore
|
|
1028
|
+
this._view.mason_addChildAtText(child[text_] || '', this._children.length);
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
this._children.push(child);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
709
1034
|
}
|
|
710
1035
|
insertChild(child, atIndex) {
|
|
711
|
-
|
|
712
|
-
|
|
1036
|
+
if (child instanceof NSView) {
|
|
1037
|
+
this._children.splice(atIndex, 0, child);
|
|
1038
|
+
if (this[isText_]) {
|
|
1039
|
+
child[isTextChild_] = true;
|
|
1040
|
+
}
|
|
1041
|
+
this._addView(child, atIndex);
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
replaceChild(child, atIndex) {
|
|
1045
|
+
if (child instanceof NSView) {
|
|
1046
|
+
this._children[atIndex] = child;
|
|
1047
|
+
if (this[isText_]) {
|
|
1048
|
+
child[isTextChild_] = true;
|
|
1049
|
+
}
|
|
1050
|
+
this._addView(child, atIndex);
|
|
1051
|
+
}
|
|
1052
|
+
else {
|
|
1053
|
+
if (text_ in child) {
|
|
1054
|
+
//@ts-ignore
|
|
1055
|
+
if (this._view) {
|
|
1056
|
+
if (__ANDROID__) {
|
|
1057
|
+
//@ts-ignore
|
|
1058
|
+
this._view.replaceChildAt(child[text_] || '', atIndex);
|
|
1059
|
+
}
|
|
1060
|
+
if (__APPLE__) {
|
|
1061
|
+
//@ts-ignore
|
|
1062
|
+
this._view.mason_replaceChildAtText(child[text_] || '', atIndex);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
if (this._children.length >= atIndex) {
|
|
1066
|
+
this._children[atIndex] = { text: child[text_] || '' };
|
|
1067
|
+
}
|
|
1068
|
+
else {
|
|
1069
|
+
this._children.push({ text: child[text_] || '' });
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
713
1073
|
}
|
|
714
1074
|
removeChild(child) {
|
|
715
1075
|
const index = this._children.indexOf(child);
|
|
@@ -719,105 +1079,497 @@ let ViewBase = class ViewBase extends CustomLayoutView {
|
|
|
719
1079
|
}
|
|
720
1080
|
}
|
|
721
1081
|
removeChildren() {
|
|
722
|
-
if (this.
|
|
1082
|
+
if (this._viewChildren.length === 0) {
|
|
723
1083
|
return;
|
|
724
1084
|
}
|
|
725
|
-
for (const child of this.
|
|
1085
|
+
for (const child of this._viewChildren) {
|
|
1086
|
+
// @ts-ignore
|
|
726
1087
|
child._isMasonChild = false;
|
|
727
|
-
|
|
1088
|
+
if (child instanceof NSView) {
|
|
1089
|
+
this._removeView(child);
|
|
1090
|
+
}
|
|
728
1091
|
}
|
|
729
1092
|
this._children.splice(0);
|
|
730
1093
|
}
|
|
731
|
-
|
|
732
|
-
|
|
1094
|
+
set text(value) {
|
|
1095
|
+
if (frameWork === FrameWork.Vue && global.VUE3_ELEMENT_REF) {
|
|
1096
|
+
const view_ref = this[global.VUE3_ELEMENT_REF];
|
|
1097
|
+
if (Array.isArray(view_ref.childNodes)) {
|
|
1098
|
+
if (view_ref.childNodes.length === 0) {
|
|
1099
|
+
this.addChild({ [text_]: value });
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
if (view_ref.childNodes.length === 1) {
|
|
1103
|
+
const node = view_ref.childNodes[0];
|
|
1104
|
+
if (node && node.nodeType === 'text') {
|
|
1105
|
+
this.addChild({ [text_]: node.text });
|
|
1106
|
+
}
|
|
1107
|
+
return;
|
|
1108
|
+
}
|
|
1109
|
+
view_ref.childNodes.forEach((node, index) => {
|
|
1110
|
+
if (node.nodeType === 'text') {
|
|
1111
|
+
// nativeView.replaceChildAt(node.text, index);
|
|
1112
|
+
this.replaceChild({ [text_]: node.text }, index);
|
|
1113
|
+
}
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
return;
|
|
1117
|
+
}
|
|
1118
|
+
if ('firstChild' in this) {
|
|
1119
|
+
function getTextNodes(root) {
|
|
1120
|
+
const result = [];
|
|
1121
|
+
let node = root.firstChild;
|
|
1122
|
+
while (node) {
|
|
1123
|
+
result.push(node);
|
|
1124
|
+
node = node.nextSibling;
|
|
1125
|
+
}
|
|
1126
|
+
return result;
|
|
1127
|
+
}
|
|
1128
|
+
const nodes = getTextNodes(this);
|
|
1129
|
+
for (const [index, node] of nodes.entries()) {
|
|
1130
|
+
if (node.nodeType === 'text' || node.nodeName === 'TextNode' || node.constructor.name === 'TextNode') {
|
|
1131
|
+
const existing = this._children[index];
|
|
1132
|
+
if (existing && Object.is(existing['node'], node)) {
|
|
1133
|
+
// todo direct set text
|
|
1134
|
+
this.replaceChild({ [text_]: node.text, node }, index);
|
|
1135
|
+
continue;
|
|
1136
|
+
}
|
|
1137
|
+
this.replaceChild({ [text_]: node.text, node }, index);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
[(_a = isMasonView_, _b = isTextChild_, _c = isText_, filterProperty.setNative)](value) {
|
|
1143
|
+
// @ts-ignore
|
|
1144
|
+
const style = this._styleHelper;
|
|
1145
|
+
if (style) {
|
|
1146
|
+
// @ts-ignore
|
|
1147
|
+
style.filter = value;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
[borderProperty.setNative](value) {
|
|
1151
|
+
// @ts-ignore
|
|
1152
|
+
const style = this._styleHelper;
|
|
1153
|
+
if (style) {
|
|
1154
|
+
// @ts-ignore
|
|
1155
|
+
style.border = value;
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
[backgroundProperty.setNative](value) {
|
|
1159
|
+
// @ts-ignore
|
|
1160
|
+
const style = this._styleHelper;
|
|
1161
|
+
if (style) {
|
|
1162
|
+
// @ts-ignore
|
|
1163
|
+
style.background = value;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
[borderLeftWidthProperty.setNative](value) {
|
|
1167
|
+
// @ts-ignore
|
|
1168
|
+
const style = this._styleHelper;
|
|
1169
|
+
if (style) {
|
|
1170
|
+
// @ts-ignore
|
|
1171
|
+
style.borderLeftWidth = value;
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
[borderTopWidthProperty.setNative](value) {
|
|
1175
|
+
// @ts-ignore
|
|
1176
|
+
const style = this._styleHelper;
|
|
1177
|
+
if (style) {
|
|
1178
|
+
// @ts-ignore
|
|
1179
|
+
style.borderTopWidth = value;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
[borderRightWidthProperty.setNative](value) {
|
|
1183
|
+
// @ts-ignore
|
|
1184
|
+
const style = this._styleHelper;
|
|
1185
|
+
if (style) {
|
|
1186
|
+
// @ts-ignore
|
|
1187
|
+
style.borderRightWidth = value;
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
[borderBottomWidthProperty.setNative](value) {
|
|
1191
|
+
// @ts-ignore
|
|
1192
|
+
const style = this._styleHelper;
|
|
1193
|
+
if (style) {
|
|
1194
|
+
// @ts-ignore
|
|
1195
|
+
style.borderBottomWidth = value;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
[lineHeightProperty.setNative](value) {
|
|
1199
|
+
// @ts-ignore
|
|
1200
|
+
const style = this._styleHelper;
|
|
1201
|
+
if (style) {
|
|
1202
|
+
// @ts-ignore
|
|
1203
|
+
style.lineHeight = value;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
[letterSpacingProperty.setNative](value) {
|
|
1207
|
+
// @ts-ignore
|
|
1208
|
+
const style = this._styleHelper;
|
|
1209
|
+
if (style) {
|
|
1210
|
+
// @ts-ignore
|
|
1211
|
+
style.letterSpacing = value;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
[textAlignmentProperty.setNative](value) {
|
|
1215
|
+
// @ts-ignore
|
|
1216
|
+
const style = this._styleHelper;
|
|
1217
|
+
if (style) {
|
|
1218
|
+
// @ts-ignore
|
|
1219
|
+
style.textAlignment = value;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
get boxSizing() {
|
|
1223
|
+
return this.style.boxSizing;
|
|
1224
|
+
}
|
|
1225
|
+
set boxSizing(value) {
|
|
1226
|
+
this.style.boxSizing = value;
|
|
1227
|
+
}
|
|
1228
|
+
get display() {
|
|
1229
|
+
return this.style.display;
|
|
1230
|
+
}
|
|
1231
|
+
set display(value) {
|
|
1232
|
+
this.style.display = value;
|
|
1233
|
+
}
|
|
1234
|
+
get overflowX() {
|
|
1235
|
+
return this.style.overflowX;
|
|
1236
|
+
}
|
|
1237
|
+
set overflowX(value) {
|
|
1238
|
+
this.style.overflowX = value;
|
|
1239
|
+
}
|
|
1240
|
+
get overflowY() {
|
|
1241
|
+
return this.style.overflowY;
|
|
1242
|
+
}
|
|
1243
|
+
set overflowY(value) {
|
|
1244
|
+
this.style.overflowY = value;
|
|
1245
|
+
}
|
|
1246
|
+
get scrollBarWidth() {
|
|
1247
|
+
return this.style.scrollBarWidth;
|
|
1248
|
+
}
|
|
1249
|
+
set scrollBarWidth(value) {
|
|
1250
|
+
this.style.scrollBarWidth = value;
|
|
1251
|
+
}
|
|
1252
|
+
get position() {
|
|
1253
|
+
return this.style.position;
|
|
1254
|
+
}
|
|
1255
|
+
set position(value) {
|
|
1256
|
+
// @ts-ignore
|
|
1257
|
+
const style = this._styleHelper;
|
|
1258
|
+
if (style) {
|
|
1259
|
+
// @ts-ignore
|
|
1260
|
+
style.position = value;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
[colorProperty.setNative](value) {
|
|
1264
|
+
if (value instanceof Color) {
|
|
1265
|
+
// @ts-ignore
|
|
1266
|
+
const style = this._styleHelper;
|
|
1267
|
+
if (style) {
|
|
1268
|
+
// @ts-ignore
|
|
1269
|
+
style.color = value.argb;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
[flexWrapProperty.setNative](value) {
|
|
1274
|
+
// @ts-ignore
|
|
1275
|
+
const style = this._styleHelper;
|
|
1276
|
+
if (style) {
|
|
1277
|
+
style.flexWrap = value;
|
|
1278
|
+
}
|
|
733
1279
|
}
|
|
734
1280
|
[flexDirectionProperty.setNative](value) {
|
|
735
|
-
|
|
1281
|
+
// @ts-ignore
|
|
1282
|
+
const style = this._styleHelper;
|
|
1283
|
+
if (style) {
|
|
1284
|
+
style.flexDirection = value;
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
[flexGrowProperty.setNative](value) {
|
|
1288
|
+
// @ts-ignore
|
|
1289
|
+
const style = this._styleHelper;
|
|
1290
|
+
if (style) {
|
|
1291
|
+
style.flexGrow = value;
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
[flexShrinkProperty.setNative](value) {
|
|
1295
|
+
// @ts-ignore
|
|
1296
|
+
const style = this._styleHelper;
|
|
1297
|
+
if (style) {
|
|
1298
|
+
style.flexShrink = value;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
[flexBasisProperty.setNative](value) {
|
|
1302
|
+
// @ts-ignore
|
|
1303
|
+
const style = this._styleHelper;
|
|
1304
|
+
if (style) {
|
|
1305
|
+
style.flexBasis = value;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
[alignItemsProperty.setNative](value) {
|
|
1309
|
+
// @ts-ignore
|
|
1310
|
+
const style = this._styleHelper;
|
|
1311
|
+
if (style) {
|
|
1312
|
+
style.alignItems = value;
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
[alignSelfProperty.setNative](value) {
|
|
1316
|
+
// @ts-ignore
|
|
1317
|
+
const style = this._styleHelper;
|
|
1318
|
+
if (style) {
|
|
1319
|
+
style.alignSelf = value;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
[alignContentProperty.setNative](value) {
|
|
1323
|
+
// @ts-ignore
|
|
1324
|
+
const style = this._styleHelper;
|
|
1325
|
+
if (style) {
|
|
1326
|
+
style.alignContent = value;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
[justifyItemsProperty.setNative](value) {
|
|
1330
|
+
// @ts-ignore
|
|
1331
|
+
const style = this._styleHelper;
|
|
1332
|
+
if (style) {
|
|
1333
|
+
style.justifyItems = value;
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
[justifySelfProperty.setNative](value) {
|
|
1337
|
+
// @ts-ignore
|
|
1338
|
+
const style = this._styleHelper;
|
|
1339
|
+
if (style) {
|
|
1340
|
+
style.justifySelf = value;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
[justifyContentProperty.setNative](value) {
|
|
1344
|
+
// @ts-ignore
|
|
1345
|
+
const style = this._styleHelper;
|
|
1346
|
+
if (style) {
|
|
1347
|
+
style.justifyContent = value;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
[leftProperty.setNative](value) {
|
|
1351
|
+
// @ts-ignore
|
|
1352
|
+
const style = this._styleHelper;
|
|
1353
|
+
if (style) {
|
|
1354
|
+
style.left = value;
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
[rightProperty.setNative](value) {
|
|
1358
|
+
// @ts-ignore
|
|
1359
|
+
const style = this._styleHelper;
|
|
1360
|
+
if (style) {
|
|
1361
|
+
style.right = value;
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
[bottomProperty.setNative](value) {
|
|
1365
|
+
// @ts-ignore
|
|
1366
|
+
const style = this._styleHelper;
|
|
1367
|
+
if (style) {
|
|
1368
|
+
style.bottom = value;
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
[topProperty.setNative](value) {
|
|
1372
|
+
// @ts-ignore
|
|
1373
|
+
const style = this._styleHelper;
|
|
1374
|
+
if (style) {
|
|
1375
|
+
style.top = value;
|
|
1376
|
+
}
|
|
736
1377
|
}
|
|
737
1378
|
[minWidthProperty.setNative](value) {
|
|
738
|
-
|
|
1379
|
+
// @ts-ignore
|
|
1380
|
+
const style = this._styleHelper;
|
|
1381
|
+
if (style) {
|
|
1382
|
+
style.minWidth = value;
|
|
1383
|
+
}
|
|
739
1384
|
}
|
|
740
1385
|
[minHeightProperty.setNative](value) {
|
|
741
|
-
|
|
1386
|
+
// @ts-ignore
|
|
1387
|
+
const style = this._styleHelper;
|
|
1388
|
+
if (style) {
|
|
1389
|
+
style.minHeight = value;
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
[heightProperty.setNative](value) {
|
|
1393
|
+
// @ts-ignore
|
|
1394
|
+
const style = this._styleHelper;
|
|
1395
|
+
if (style) {
|
|
1396
|
+
style.height = value;
|
|
1397
|
+
}
|
|
742
1398
|
}
|
|
743
1399
|
[widthProperty.setNative](value) {
|
|
744
|
-
|
|
1400
|
+
// @ts-ignore
|
|
1401
|
+
const style = this._styleHelper;
|
|
1402
|
+
if (style) {
|
|
1403
|
+
style.width = value;
|
|
1404
|
+
}
|
|
745
1405
|
}
|
|
746
|
-
|
|
747
|
-
|
|
1406
|
+
set maxWidth(value) {
|
|
1407
|
+
this.style.maxWidth = value;
|
|
748
1408
|
}
|
|
749
|
-
|
|
750
|
-
|
|
1409
|
+
get maxWidth() {
|
|
1410
|
+
return this.style.maxWidth;
|
|
751
1411
|
}
|
|
752
|
-
|
|
753
|
-
|
|
1412
|
+
set maxHeight(value) {
|
|
1413
|
+
this.style.maxHeight = value;
|
|
754
1414
|
}
|
|
1415
|
+
get maxHeight() {
|
|
1416
|
+
return this.style.maxHeight;
|
|
1417
|
+
}
|
|
1418
|
+
_redrawNativeBackground(value) { }
|
|
755
1419
|
[marginLeftProperty.setNative](value) {
|
|
756
|
-
|
|
1420
|
+
// @ts-ignore
|
|
1421
|
+
const style = this._styleHelper;
|
|
1422
|
+
if (style) {
|
|
1423
|
+
style.marginLeft = value;
|
|
1424
|
+
}
|
|
757
1425
|
}
|
|
758
1426
|
[marginRightProperty.setNative](value) {
|
|
759
|
-
|
|
1427
|
+
// @ts-ignore
|
|
1428
|
+
const style = this._styleHelper;
|
|
1429
|
+
if (style) {
|
|
1430
|
+
style.marginRight = value;
|
|
1431
|
+
}
|
|
760
1432
|
}
|
|
761
1433
|
[marginBottomProperty.setNative](value) {
|
|
762
|
-
|
|
1434
|
+
// @ts-ignore
|
|
1435
|
+
const style = this._styleHelper;
|
|
1436
|
+
if (style) {
|
|
1437
|
+
style.marginBottom = value;
|
|
1438
|
+
}
|
|
763
1439
|
}
|
|
764
1440
|
[marginTopProperty.setNative](value) {
|
|
765
|
-
|
|
1441
|
+
// @ts-ignore
|
|
1442
|
+
const style = this._styleHelper;
|
|
1443
|
+
if (style) {
|
|
1444
|
+
style.marginTop = value;
|
|
1445
|
+
}
|
|
766
1446
|
}
|
|
767
1447
|
[paddingLeftProperty.setNative](value) {
|
|
768
|
-
|
|
1448
|
+
// @ts-ignore
|
|
1449
|
+
const style = this._styleHelper;
|
|
1450
|
+
if (style) {
|
|
1451
|
+
style.paddingLeft = value;
|
|
1452
|
+
}
|
|
769
1453
|
}
|
|
770
1454
|
[paddingRightProperty.setNative](value) {
|
|
771
|
-
|
|
1455
|
+
// @ts-ignore
|
|
1456
|
+
const style = this._styleHelper;
|
|
1457
|
+
if (style) {
|
|
1458
|
+
style.paddingRight = value;
|
|
1459
|
+
}
|
|
772
1460
|
}
|
|
773
1461
|
[paddingTopProperty.setNative](value) {
|
|
774
|
-
|
|
1462
|
+
// @ts-ignore
|
|
1463
|
+
const style = this._styleHelper;
|
|
1464
|
+
if (style) {
|
|
1465
|
+
style.paddingTop = value;
|
|
1466
|
+
}
|
|
775
1467
|
}
|
|
776
1468
|
[paddingBottomProperty.setNative](value) {
|
|
777
|
-
|
|
1469
|
+
// @ts-ignore
|
|
1470
|
+
const style = this._styleHelper;
|
|
1471
|
+
if (style) {
|
|
1472
|
+
style.paddingBottom = value;
|
|
1473
|
+
}
|
|
778
1474
|
}
|
|
779
|
-
|
|
780
|
-
|
|
1475
|
+
set rowGap(value) {
|
|
1476
|
+
this.style.rowGap = value;
|
|
781
1477
|
}
|
|
782
|
-
|
|
783
|
-
|
|
1478
|
+
get rowGap() {
|
|
1479
|
+
return this.style.rowGap;
|
|
784
1480
|
}
|
|
785
|
-
|
|
786
|
-
|
|
1481
|
+
set columnGap(value) {
|
|
1482
|
+
this.style.columnGap = value;
|
|
787
1483
|
}
|
|
788
|
-
|
|
789
|
-
|
|
1484
|
+
get columnGap() {
|
|
1485
|
+
return this.style.columnGap;
|
|
790
1486
|
}
|
|
791
|
-
|
|
792
|
-
|
|
1487
|
+
set gridColumnStart(value) {
|
|
1488
|
+
this.style.gridColumnStart = value;
|
|
793
1489
|
}
|
|
794
|
-
|
|
795
|
-
|
|
1490
|
+
get gridColumnStart() {
|
|
1491
|
+
return this.style.gridColumnStart;
|
|
796
1492
|
}
|
|
797
|
-
|
|
798
|
-
|
|
1493
|
+
set gridColumnEnd(value) {
|
|
1494
|
+
this.style.gridColumnEnd = value;
|
|
799
1495
|
}
|
|
800
|
-
|
|
801
|
-
|
|
1496
|
+
get gridColumnEnd() {
|
|
1497
|
+
return this.style.gridColumnEnd;
|
|
802
1498
|
}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
1499
|
+
set gridRowStart(value) {
|
|
1500
|
+
this.style.gridRowStart = value;
|
|
1501
|
+
}
|
|
1502
|
+
get gridRowStart() {
|
|
1503
|
+
return this.style.gridRowStart;
|
|
1504
|
+
}
|
|
1505
|
+
set gridRowEnd(value) {
|
|
1506
|
+
this.style.gridRowEnd = value;
|
|
1507
|
+
}
|
|
1508
|
+
get gridRowEnd() {
|
|
1509
|
+
return this.style.gridRowEnd;
|
|
1510
|
+
}
|
|
1511
|
+
set gridTemplateRows(value) {
|
|
1512
|
+
this.style.gridTemplateRows = value;
|
|
1513
|
+
}
|
|
1514
|
+
get gridTemplateRows() {
|
|
1515
|
+
return this.style.gridTemplateRows;
|
|
1516
|
+
}
|
|
1517
|
+
set gridTemplateColumns(value) {
|
|
1518
|
+
this.style.gridTemplateColumns = value;
|
|
812
1519
|
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
1520
|
+
get gridTemplateColumns() {
|
|
1521
|
+
return this.style.gridTemplateColumns;
|
|
1522
|
+
}
|
|
1523
|
+
set gridAutoColumns(value) {
|
|
1524
|
+
this.style.gridAutoColumns = value;
|
|
1525
|
+
}
|
|
1526
|
+
get gridAutoColumns() {
|
|
1527
|
+
return this.style.gridAutoColumns;
|
|
1528
|
+
}
|
|
1529
|
+
set gridAutoRows(value) {
|
|
1530
|
+
this.style.gridAutoRows = value;
|
|
1531
|
+
}
|
|
1532
|
+
get gridAutoRows() {
|
|
1533
|
+
return this.style.gridAutoRows;
|
|
1534
|
+
}
|
|
1535
|
+
// @ts-ignore
|
|
1536
|
+
[fontSizeProperty.setNative](value) {
|
|
1537
|
+
// @ts-ignore
|
|
1538
|
+
if (this._styleHelper) {
|
|
1539
|
+
//@ts-ignore
|
|
1540
|
+
this._styleHelper.fontSize = value;
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
[fontWeightProperty.setNative](value) {
|
|
1544
|
+
// @ts-ignore
|
|
1545
|
+
if (this._styleHelper) {
|
|
1546
|
+
//@ts-ignore
|
|
1547
|
+
this._styleHelper.fontWeight = value;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
[fontStyleProperty.setNative](value) {
|
|
1551
|
+
// @ts-ignore
|
|
1552
|
+
if (this._styleHelper) {
|
|
1553
|
+
//@ts-ignore
|
|
1554
|
+
this._styleHelper.fontStyle = value;
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
export class TextBase extends ViewBase {
|
|
1559
|
+
}
|
|
1560
|
+
textContentProperty.register(TextBase);
|
|
1561
|
+
textWrapProperty.register(Style);
|
|
1562
|
+
textOverFlowProperty.register(Style);
|
|
1563
|
+
export class ButtonBase extends TextBase {
|
|
1564
|
+
}
|
|
1565
|
+
// @ts-ignore
|
|
1566
|
+
export const srcProperty = new Property({
|
|
1567
|
+
name: 'src',
|
|
1568
|
+
defaultValue: '',
|
|
1569
|
+
});
|
|
1570
|
+
export class ImageBase extends ViewBase {
|
|
1571
|
+
}
|
|
1572
|
+
srcProperty.register(ImageBase);
|
|
821
1573
|
/**
|
|
822
1574
|
* Props are already defined in core flexbox layout,
|
|
823
1575
|
* overriding them breaks the core flexbox layout.
|
|
@@ -825,7 +1577,123 @@ textWrapProperty.register(TextBase);
|
|
|
825
1577
|
// flexDirectionProperty.register(Style);
|
|
826
1578
|
// flexWrapProperty.register(Style);
|
|
827
1579
|
// flexGrowProperty.register(Style);
|
|
828
|
-
|
|
1580
|
+
flexShrinkProperty.register(Style);
|
|
1581
|
+
// revert valueConverter if causing issues with core components
|
|
1582
|
+
fontSizeProperty.overrideHandlers({
|
|
1583
|
+
name: 'fontSize',
|
|
1584
|
+
cssName: 'font-size',
|
|
1585
|
+
valueConverter: function (value) {
|
|
1586
|
+
return value;
|
|
1587
|
+
},
|
|
1588
|
+
valueChanged(target, oldValue, newValue) {
|
|
1589
|
+
const view = getViewStyle(target.viewRef);
|
|
1590
|
+
if (view) {
|
|
1591
|
+
if (newValue) {
|
|
1592
|
+
if (typeof newValue === 'string') {
|
|
1593
|
+
// @ts-ignore
|
|
1594
|
+
if (newValue.indexOf('%') !== -1) {
|
|
1595
|
+
view.fontSize = {
|
|
1596
|
+
value: parseFloat(newValue) / 100,
|
|
1597
|
+
unit: '%',
|
|
1598
|
+
};
|
|
1599
|
+
// @ts-ignore
|
|
1600
|
+
}
|
|
1601
|
+
else if (newValue.indexOf('dip') !== -1) {
|
|
1602
|
+
view.fontSize = parseFloat(newValue);
|
|
1603
|
+
// @ts-ignore
|
|
1604
|
+
}
|
|
1605
|
+
else if (newValue.indexOf('px') !== -1) {
|
|
1606
|
+
view.fontSize = {
|
|
1607
|
+
value: parseFloat(newValue),
|
|
1608
|
+
unit: 'px',
|
|
1609
|
+
};
|
|
1610
|
+
}
|
|
1611
|
+
else {
|
|
1612
|
+
view.fontSize = parseFloat(newValue);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
else {
|
|
1616
|
+
view.fontSize = newValue;
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
else {
|
|
1620
|
+
// Revert to old value if newValue is invalid
|
|
1621
|
+
// @ts-ignore
|
|
1622
|
+
view.view.style.fontSize = oldValue;
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
},
|
|
1626
|
+
});
|
|
1627
|
+
paddingLeftProperty.overrideHandlers({
|
|
1628
|
+
name: 'paddingLeft',
|
|
1629
|
+
cssName: 'padding-left',
|
|
1630
|
+
valueChanged(target, oldValue, newValue) {
|
|
1631
|
+
const view = getViewStyle(target.viewRef);
|
|
1632
|
+
if (view) {
|
|
1633
|
+
if (newValue) {
|
|
1634
|
+
view.paddingLeft = newValue;
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
// Revert to old value if newValue is invalid
|
|
1638
|
+
// @ts-ignore
|
|
1639
|
+
view.view.style.paddingLeft = oldValue;
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1643
|
+
});
|
|
1644
|
+
paddingTopProperty.overrideHandlers({
|
|
1645
|
+
name: 'paddingTop',
|
|
1646
|
+
cssName: 'padding-top',
|
|
1647
|
+
valueChanged(target, oldValue, newValue) {
|
|
1648
|
+
const view = getViewStyle(target.viewRef);
|
|
1649
|
+
if (view) {
|
|
1650
|
+
if (newValue) {
|
|
1651
|
+
view.paddingTop = newValue;
|
|
1652
|
+
}
|
|
1653
|
+
else {
|
|
1654
|
+
// Revert to old value if newValue is invalid
|
|
1655
|
+
// @ts-ignore
|
|
1656
|
+
view.view.style.paddingTop = oldValue;
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
},
|
|
1660
|
+
});
|
|
1661
|
+
paddingRightProperty.overrideHandlers({
|
|
1662
|
+
name: 'paddingRight',
|
|
1663
|
+
cssName: 'padding-right',
|
|
1664
|
+
valueChanged(target, oldValue, newValue) {
|
|
1665
|
+
const view = getViewStyle(target.viewRef);
|
|
1666
|
+
if (view) {
|
|
1667
|
+
if (newValue) {
|
|
1668
|
+
view.paddingRight = newValue;
|
|
1669
|
+
}
|
|
1670
|
+
else {
|
|
1671
|
+
// Revert to old value if newValue is invalid
|
|
1672
|
+
// @ts-ignore
|
|
1673
|
+
view.view.style.paddingRight = oldValue;
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
},
|
|
1677
|
+
});
|
|
1678
|
+
paddingBottomProperty.overrideHandlers({
|
|
1679
|
+
name: 'paddingBottom',
|
|
1680
|
+
cssName: 'padding-bottom',
|
|
1681
|
+
valueChanged(target, oldValue, newValue) {
|
|
1682
|
+
const view = getViewStyle(target.viewRef);
|
|
1683
|
+
if (view) {
|
|
1684
|
+
if (newValue) {
|
|
1685
|
+
view.paddingBottom = newValue;
|
|
1686
|
+
}
|
|
1687
|
+
else {
|
|
1688
|
+
// Revert to old value if newValue is invalid
|
|
1689
|
+
// @ts-ignore
|
|
1690
|
+
view.view.style.paddingBottom = oldValue;
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
});
|
|
1695
|
+
insetProperty.register(Style);
|
|
1696
|
+
boxSizingProperty.register(Style);
|
|
829
1697
|
alignItemsProperty.register(Style);
|
|
830
1698
|
alignSelfProperty.register(Style);
|
|
831
1699
|
justifyContentProperty.register(Style);
|
|
@@ -843,6 +1711,7 @@ columnGapProperty.register(Style);
|
|
|
843
1711
|
gridRowGapProperty.register(Style);
|
|
844
1712
|
gridColumnGapProperty.register(Style);
|
|
845
1713
|
gapProperty.register(Style);
|
|
1714
|
+
gridGapProperty.register(Style);
|
|
846
1715
|
aspectRatioProperty.register(Style);
|
|
847
1716
|
alignContentProperty.register(Style);
|
|
848
1717
|
justifyItemsProperty.register(Style);
|
|
@@ -859,6 +1728,7 @@ gridRowStartProperty.register(Style);
|
|
|
859
1728
|
gridRowEndProperty.register(Style);
|
|
860
1729
|
gridTemplateRowsProperty.register(Style);
|
|
861
1730
|
gridTemplateColumnsProperty.register(Style);
|
|
1731
|
+
gridTemplateAreasProperty.register(Style);
|
|
862
1732
|
overflowProperty.register(Style);
|
|
863
1733
|
overflowXProperty.register(Style);
|
|
864
1734
|
overflowYProperty.register(Style);
|