@akylas/nativescript 8.8.6 → 8.8.7
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/abortcontroller/abortsignal.d.ts +23 -0
- package/abortcontroller/abortsignal.js +57 -0
- package/abortcontroller/abortsignal.js.map +1 -0
- package/abortcontroller/index.d.ts +20 -0
- package/abortcontroller/index.js +52 -0
- package/abortcontroller/index.js.map +1 -0
- package/accessibility/accessibility-common.d.ts +18 -0
- package/accessibility/accessibility-common.js +64 -0
- package/accessibility/accessibility-common.js.map +1 -0
- package/accessibility/accessibility-css-helper.d.ts +1 -0
- package/accessibility/accessibility-css-helper.js +101 -0
- package/accessibility/accessibility-css-helper.js.map +1 -0
- package/accessibility/accessibility-properties.d.ts +24 -0
- package/accessibility/accessibility-properties.js +122 -0
- package/accessibility/accessibility-properties.js.map +1 -0
- package/accessibility/accessibility-service-common.d.ts +8 -0
- package/accessibility/accessibility-service-common.js +26 -0
- package/accessibility/accessibility-service-common.js.map +1 -0
- package/accessibility/accessibility-service.android.d.ts +6 -0
- package/accessibility/accessibility-service.android.js +107 -0
- package/accessibility/accessibility-service.android.js.map +1 -0
- package/accessibility/accessibility-service.ios.d.ts +6 -0
- package/accessibility/accessibility-service.ios.js +61 -0
- package/accessibility/accessibility-service.ios.js.map +1 -0
- package/accessibility/accessibility-types.d.ts +224 -0
- package/accessibility/accessibility-types.js +222 -0
- package/accessibility/accessibility-types.js.map +1 -0
- package/accessibility/font-scale-common.d.ts +7 -0
- package/accessibility/font-scale-common.js +14 -0
- package/accessibility/font-scale-common.js.map +1 -0
- package/accessibility/font-scale.android.d.ts +5 -0
- package/accessibility/font-scale.android.js +56 -0
- package/accessibility/font-scale.android.js.map +1 -0
- package/accessibility/font-scale.ios.d.ts +5 -0
- package/accessibility/font-scale.ios.js +89 -0
- package/accessibility/font-scale.ios.js.map +1 -0
- package/accessibility/index.android.d.ts +10 -0
- package/accessibility/index.android.js +418 -0
- package/accessibility/index.android.js.map +1 -0
- package/accessibility/index.ios.d.ts +9 -0
- package/accessibility/index.ios.js +234 -0
- package/accessibility/index.ios.js.map +1 -0
- package/animation-frame/animation-native.android.d.ts +1 -0
- package/animation-frame/animation-native.android.js +4 -0
- package/animation-frame/animation-native.android.js.map +1 -0
- package/animation-frame/animation-native.ios.d.ts +1 -0
- package/animation-frame/animation-native.ios.js +3 -0
- package/animation-frame/animation-native.ios.js.map +1 -0
- package/animation-frame/index.d.ts +3 -17
- package/animation-frame/index.js +92 -0
- package/animation-frame/index.js.map +1 -0
- package/application/application-common.d.ts +224 -0
- package/application/application-common.js +467 -0
- package/application/application-common.js.map +1 -0
- package/application/application-interfaces.d.ts +217 -0
- package/application/application-interfaces.js +2 -0
- package/application/application-interfaces.js.map +1 -0
- package/application/application-shims.d.ts +351 -0
- package/application/application-shims.js +353 -0
- package/application/application-shims.js.map +1 -0
- package/application/application.android.d.ts +73 -0
- package/application/application.android.js +500 -0
- package/application/application.android.js.map +1 -0
- package/application/application.ios.d.ts +81 -0
- package/application/application.ios.js +455 -0
- package/application/application.ios.js.map +1 -0
- package/application/index.android.d.ts +2 -0
- package/application/index.android.js +3 -0
- package/application/index.android.js.map +1 -0
- package/application/index.ios.d.ts +2 -0
- package/application/index.ios.js +3 -0
- package/application/index.ios.js.map +1 -0
- package/application-settings/application-settings-common.d.ts +2 -0
- package/application-settings/application-settings-common.js +15 -0
- package/application-settings/application-settings-common.js.map +1 -0
- package/application-settings/index.android.d.ts +13 -0
- package/application-settings/index.android.js +175 -0
- package/application-settings/index.android.js.map +1 -0
- package/application-settings/index.ios.d.ts +13 -0
- package/application-settings/index.ios.js +88 -0
- package/application-settings/index.ios.js.map +1 -0
- package/bundle-entry-points.d.ts +1 -0
- package/bundle-entry-points.js +47 -0
- package/bundle-entry-points.js.map +1 -0
- package/color/color-common.d.ts +137 -0
- package/color/color-common.js +520 -0
- package/color/color-common.js.map +1 -0
- package/color/index.android.d.ts +4 -0
- package/color/index.android.js +7 -0
- package/color/index.android.js.map +1 -0
- package/color/index.ios.d.ts +6 -0
- package/color/index.ios.js +19 -0
- package/color/index.ios.js.map +1 -0
- package/color/known-colors.d.ts +144 -0
- package/color/known-colors.js +165 -0
- package/color/known-colors.js.map +1 -0
- package/config/config.interface.d.ts +235 -0
- package/config/config.interface.js +2 -0
- package/config/config.interface.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +2 -0
- package/config/index.js.map +1 -0
- package/connectivity/index.android.d.ts +11 -0
- package/connectivity/index.android.js +156 -0
- package/connectivity/index.android.js.map +1 -0
- package/connectivity/index.ios.d.ts +11 -0
- package/connectivity/index.ios.js +132 -0
- package/connectivity/index.ios.js.map +1 -0
- package/console/index.d.ts +14 -0
- package/console/index.js +33 -0
- package/console/index.js.map +1 -0
- package/core-types/index.d.ts +335 -0
- package/core-types/index.js +287 -0
- package/core-types/index.js.map +1 -0
- package/css/CSS3Parser.d.ts +184 -0
- package/css/CSS3Parser.js +534 -0
- package/css/CSS3Parser.js.map +1 -0
- package/css/CSSNativeScript.d.ts +14 -0
- package/css/CSSNativeScript.js +113 -0
- package/css/CSSNativeScript.js.map +1 -0
- package/css/css-tree-parser.d.ts +1 -0
- package/css/css-tree-parser.js +17 -21
- package/css/css-tree-parser.js.map +1 -0
- package/css/parser.d.ts +70 -0
- package/css/parser.js +516 -0
- package/css/parser.js.map +1 -0
- package/css/system-classes.d.ts +12 -0
- package/css/system-classes.js +47 -0
- package/css/system-classes.js.map +1 -0
- package/css-mediaquery/index.d.ts +27 -0
- package/css-mediaquery/index.js +118 -0
- package/css-mediaquery/index.js.map +1 -0
- package/data/observable/index.d.ts +185 -0
- package/data/observable/index.js +411 -0
- package/data/observable/index.js.map +1 -0
- package/data/observable-array/index.d.ts +215 -0
- package/data/observable-array/index.js +325 -0
- package/data/observable-array/index.js.map +1 -0
- package/data/virtual-array/index.d.ts +72 -0
- package/data/virtual-array/index.js +133 -0
- package/data/virtual-array/index.js.map +1 -0
- package/debugger/InspectorBackendCommands.d.ts +1056 -0
- package/debugger/InspectorBackendCommands.js +578 -0
- package/debugger/InspectorBackendCommands.js.map +1 -0
- package/debugger/devtools-elements-interfaces.d.ts +16 -0
- package/debugger/devtools-elements-interfaces.js +2 -0
- package/debugger/devtools-elements-interfaces.js.map +1 -0
- package/debugger/devtools-elements.common.d.ts +7 -0
- package/debugger/devtools-elements.common.js +84 -0
- package/debugger/devtools-elements.common.js.map +1 -0
- package/debugger/devtools-elements.d.ts +5 -23
- package/debugger/devtools-elements.js +20 -0
- package/debugger/devtools-elements.js.map +1 -0
- package/debugger/dom-node.d.ts +20 -23
- package/debugger/dom-node.js +150 -0
- package/debugger/dom-node.js.map +1 -0
- package/debugger/index.d.ts +87 -0
- package/debugger/index.js +118 -0
- package/debugger/index.js.map +1 -0
- package/debugger/webinspector-css.d.ts +34 -0
- package/debugger/webinspector-css.js +71 -0
- package/debugger/webinspector-css.js.map +1 -0
- package/debugger/webinspector-dom.d.ts +33 -0
- package/debugger/webinspector-dom.js +74 -0
- package/debugger/webinspector-dom.js.map +1 -0
- package/debugger/webinspector-network.android.d.ts +79 -0
- package/debugger/webinspector-network.android.js +207 -0
- package/debugger/webinspector-network.android.js.map +1 -0
- package/debugger/webinspector-network.ios.d.ts +79 -0
- package/debugger/webinspector-network.ios.js +203 -0
- package/debugger/webinspector-network.ios.js.map +1 -0
- package/file-system/file-system-access.android.d.ts +167 -0
- package/file-system/file-system-access.android.js +1309 -0
- package/file-system/file-system-access.android.js.map +1 -0
- package/file-system/file-system-access.ios.d.ts +85 -0
- package/file-system/file-system-access.ios.js +637 -0
- package/file-system/file-system-access.ios.js.map +1 -0
- package/file-system/index.d.ts +98 -382
- package/file-system/index.js +862 -0
- package/file-system/index.js.map +1 -0
- package/fps-meter/fps-native.android.d.ts +12 -0
- package/fps-meter/fps-native.android.js +62 -0
- package/fps-meter/fps-native.android.js.map +1 -0
- package/fps-meter/fps-native.ios.d.ts +11 -0
- package/fps-meter/fps-native.ios.js +56 -0
- package/fps-meter/fps-native.ios.js.map +1 -0
- package/fps-meter/index.d.ts +7 -24
- package/fps-meter/index.js +77 -0
- package/fps-meter/index.js.map +1 -0
- package/globals/index.d.ts +19 -4
- package/globals/index.js +321 -0
- package/globals/index.js.map +1 -0
- package/http/http-request/http-request-common.d.ts +1 -0
- package/http/http-request/http-request-common.js +15 -0
- package/http/http-request/http-request-common.js.map +1 -0
- package/http/http-request/index.android.d.ts +7 -0
- package/http/http-request/index.android.js +290 -0
- package/http/http-request/index.android.js.map +1 -0
- package/http/http-request/index.ios.d.ts +7 -0
- package/http/http-request/index.ios.js +236 -0
- package/http/http-request/index.ios.js.map +1 -0
- package/http/index.d.ts +73 -149
- package/http/index.js +74 -0
- package/http/index.js.map +1 -0
- package/image-asset/image-asset-common.d.ts +26 -0
- package/image-asset/image-asset-common.js +51 -0
- package/image-asset/image-asset-common.js.map +1 -0
- package/image-asset/index.android.d.ts +10 -0
- package/image-asset/index.android.js +42 -0
- package/image-asset/index.android.js.map +1 -0
- package/image-asset/index.ios.d.ts +11 -0
- package/image-asset/index.ios.js +84 -0
- package/image-asset/index.ios.js.map +1 -0
- package/image-source/image-source-common.d.ts +4 -0
- package/image-source/image-source-common.js +21 -0
- package/image-source/image-source-common.js.map +1 -0
- package/image-source/index.android.d.ts +57 -0
- package/image-source/index.android.js +381 -0
- package/image-source/index.android.js.map +1 -0
- package/image-source/index.ios.d.ts +56 -0
- package/image-source/index.ios.js +449 -0
- package/image-source/index.ios.js.map +1 -0
- package/index.d.ts +7 -23
- package/index.js +36 -0
- package/index.js.map +1 -0
- package/inspector_modules.d.ts +1 -0
- package/inspector_modules.js +5 -0
- package/inspector_modules.js.map +1 -0
- package/matrix/index.d.ts +5 -32
- package/matrix/index.js +45 -0
- package/matrix/index.js.map +1 -0
- package/media-query-list/index.d.ts +21 -0
- package/media-query-list/index.js +169 -0
- package/media-query-list/index.js.map +1 -0
- package/module-name-resolver/index.d.ts +13 -21
- package/module-name-resolver/index.js +79 -0
- package/module-name-resolver/index.js.map +1 -0
- package/module-name-resolver/non-bundle-workflow-compat.d.ts +6 -0
- package/module-name-resolver/non-bundle-workflow-compat.js +119 -0
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -0
- package/module-name-resolver/qualifier-matcher/index.d.ts +6 -12
- package/module-name-resolver/qualifier-matcher/index.js +141 -0
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -0
- package/package.json +2 -2
- package/platform/common.d.ts +9 -0
- package/platform/common.js +13 -0
- package/platform/common.js.map +1 -0
- package/platform/device/index.android.d.ts +20 -0
- package/platform/device/index.android.js +78 -0
- package/platform/device/index.android.js.map +1 -0
- package/platform/device/index.ios.d.ts +19 -0
- package/platform/device/index.ios.js +69 -0
- package/platform/device/index.ios.js.map +1 -0
- package/platform/index.d.ts +0 -26
- package/platform/index.js +4 -0
- package/platform/index.js.map +1 -0
- package/platform/screen/index.android.d.ts +15 -0
- package/platform/screen/index.android.js +39 -0
- package/platform/screen/index.android.js.map +1 -0
- package/platform/screen/index.ios.d.ts +15 -0
- package/platform/screen/index.ios.js +35 -0
- package/platform/screen/index.ios.js.map +1 -0
- package/platforms/android/widgets-release.aar +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCCrypto.h +79 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSCWinterCG.h +20 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Headers/NSString+WinterCG.h +21 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/NSCWinterCG +0 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Resources/Info.plist +52 -0
- package/platforms/ios/NSCWinterCG.xcframework/ios-arm64_x86_64-maccatalyst/NSCWinterCG.framework/Versions/Current/NSCWinterCG +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSCCrypto.h +60 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSData+Async.h +24 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSFileHandle+Async.h +22 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/NSString+Async.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSLabel.h +16 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSProcess.h +29 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/TNSWidgets.h +25 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIImage+TNSBlocks.h +26 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Headers/UIView+PassThroughParent.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Modules/module.modulemap +6 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/NSObject+Swizzling.h +17 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/PrivateHeaders/UIView+PropertyBag.h +18 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Resources/Info.plist +52 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/TNSWidgets +0 -0
- package/platforms/ios/TNSWidgets.xcframework/ios-arm64_x86_64-maccatalyst/TNSWidgets.framework/Versions/Current/TNSWidgets +0 -0
- package/polyfills/formdata.d.ts +6 -0
- package/polyfills/formdata.js +16 -0
- package/polyfills/formdata.js.map +1 -0
- package/profiling/index.d.ts +26 -153
- package/profiling/index.js +274 -0
- package/profiling/index.js.map +1 -0
- package/text/formatted-string.d.ts +1 -1
- package/text/formatted-string.js +2 -0
- package/text/formatted-string.js.map +1 -0
- package/text/index.android.d.ts +9 -0
- package/text/index.android.js +11 -0
- package/text/index.android.js.map +1 -0
- package/text/index.ios.d.ts +9 -0
- package/text/index.ios.js +11 -0
- package/text/index.ios.js.map +1 -0
- package/text/span.d.ts +1 -1
- package/text/span.js +2 -0
- package/text/span.js.map +1 -0
- package/text/text-common.d.ts +12 -0
- package/text/text-common.js +111 -0
- package/text/text-common.js.map +1 -0
- package/timer/index.android.d.ts +4 -0
- package/timer/index.android.js +75 -0
- package/timer/index.android.js.map +1 -0
- package/timer/index.ios.d.ts +4 -0
- package/timer/index.ios.js +68 -0
- package/timer/index.ios.js.map +1 -0
- package/trace/index.d.ts +105 -131
- package/trace/index.js +255 -0
- package/trace/index.js.map +1 -0
- package/ui/action-bar/action-bar-common.d.ts +81 -0
- package/ui/action-bar/action-bar-common.js +369 -0
- package/ui/action-bar/action-bar-common.js.map +1 -0
- package/ui/action-bar/index.android.d.ts +47 -0
- package/ui/action-bar/index.android.js +469 -0
- package/ui/action-bar/index.android.js.map +1 -0
- package/ui/action-bar/index.ios.d.ts +38 -0
- package/ui/action-bar/index.ios.js +481 -0
- package/ui/action-bar/index.ios.js.map +1 -0
- package/ui/activity-indicator/activity-indicator-common.d.ts +7 -0
- package/ui/activity-indicator/activity-indicator-common.js +17 -0
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -0
- package/ui/activity-indicator/index.android.d.ts +6 -0
- package/ui/activity-indicator/index.android.js +56 -0
- package/ui/activity-indicator/index.android.js.map +1 -0
- package/ui/activity-indicator/index.ios.d.ts +8 -0
- package/ui/activity-indicator/index.ios.js +48 -0
- package/ui/activity-indicator/index.ios.js.map +1 -0
- package/ui/animation/animation-common.d.ts +40 -0
- package/ui/animation/animation-common.js +186 -0
- package/ui/animation/animation-common.js.map +1 -0
- package/ui/animation/animation-interfaces.d.ts +63 -0
- package/ui/animation/animation-interfaces.js +2 -0
- package/ui/animation/animation-interfaces.js.map +1 -0
- package/ui/animation/index.android.d.ts +25 -0
- package/ui/animation/index.android.js +509 -0
- package/ui/animation/index.android.js.map +1 -0
- package/ui/animation/index.ios.d.ts +46 -0
- package/ui/animation/index.ios.js +906 -0
- package/ui/animation/index.ios.js.map +1 -0
- package/ui/animation/keyframe-animation.d.ts +66 -118
- package/ui/animation/keyframe-animation.js +245 -0
- package/ui/animation/keyframe-animation.js.map +1 -0
- package/ui/builder/binding-builder.d.ts +12 -15
- package/ui/builder/binding-builder.js +171 -0
- package/ui/builder/binding-builder.js.map +1 -0
- package/ui/builder/component-builder/index.d.ts +7 -0
- package/ui/builder/component-builder/index.js +221 -0
- package/ui/builder/component-builder/index.js.map +1 -0
- package/ui/builder/index.d.ts +27 -69
- package/ui/builder/index.js +202 -0
- package/ui/builder/index.js.map +1 -0
- package/ui/builder/xml2ui.d.ts +134 -0
- package/ui/builder/xml2ui.js +393 -0
- package/ui/builder/xml2ui.js.map +1 -0
- package/ui/button/button-common.d.ts +9 -0
- package/ui/button/button-common.js +26 -0
- package/ui/button/button-common.js.map +1 -0
- package/ui/button/index.android.d.ts +14 -0
- package/ui/button/index.android.js +150 -0
- package/ui/button/index.android.js.map +1 -0
- package/ui/button/index.ios.d.ts +13 -0
- package/ui/button/index.ios.js +270 -0
- package/ui/button/index.ios.js.map +1 -0
- package/ui/content-view/index.d.ts +23 -4
- package/ui/content-view/index.js +87 -0
- package/ui/content-view/index.js.map +1 -0
- package/ui/core/bindable/bindable-expressions.d.ts +7 -0
- package/ui/core/bindable/bindable-expressions.js +255 -0
- package/ui/core/bindable/bindable-expressions.js.map +1 -0
- package/ui/core/bindable/bindable-resources.d.ts +2 -0
- package/ui/core/bindable/bindable-resources.js +8 -0
- package/ui/core/bindable/bindable-resources.js.map +1 -0
- package/ui/core/bindable/index.d.ts +89 -0
- package/ui/core/bindable/index.js +556 -0
- package/ui/core/bindable/index.js.map +1 -0
- package/ui/core/control-state-change/index.android.d.ts +6 -0
- package/ui/core/control-state-change/index.android.js +8 -0
- package/ui/core/control-state-change/index.android.js.map +1 -0
- package/ui/core/control-state-change/index.ios.d.ts +14 -0
- package/ui/core/control-state-change/index.ios.js +61 -0
- package/ui/core/control-state-change/index.ios.js.map +1 -0
- package/ui/core/properties/index.d.ts +178 -0
- package/ui/core/properties/index.js +1133 -0
- package/ui/core/properties/index.js.map +1 -0
- package/ui/core/view/index.android.d.ts +98 -0
- package/ui/core/view/index.android.js +1206 -0
- package/ui/core/view/index.android.js.map +1 -0
- package/ui/core/view/index.ios.d.ts +95 -0
- package/ui/core/view/index.ios.js +1015 -0
- package/ui/core/view/index.ios.js.map +1 -0
- package/ui/core/view/view-common.d.ts +288 -0
- package/ui/core/view/view-common.js +1100 -0
- package/ui/core/view/view-common.js.map +1 -0
- package/ui/core/view/view-helper/index.android.d.ts +9 -0
- package/ui/core/view/view-helper/index.android.js +56 -0
- package/ui/core/view/view-helper/index.android.js.map +1 -0
- package/ui/core/view/view-helper/index.ios.d.ts +67 -0
- package/ui/core/view/view-helper/index.ios.js +329 -0
- package/ui/core/view/view-helper/index.ios.js.map +1 -0
- package/ui/core/view/view-helper/view-helper-common.d.ts +11 -0
- package/ui/core/view/view-helper/view-helper-common.js +157 -0
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -0
- package/ui/core/view-base/index.d.ts +483 -524
- package/ui/core/view-base/index.js +1166 -0
- package/ui/core/view-base/index.js.map +1 -0
- package/ui/core/weak-event-listener/index.d.ts +2 -18
- package/ui/core/weak-event-listener/index.js +123 -0
- package/ui/core/weak-event-listener/index.js.map +1 -0
- package/ui/date-picker/date-picker-common.d.ts +27 -0
- package/ui/date-picker/date-picker-common.js +81 -0
- package/ui/date-picker/date-picker-common.js.map +1 -0
- package/ui/date-picker/index.android.d.ts +11 -0
- package/ui/date-picker/index.android.js +131 -0
- package/ui/date-picker/index.android.js.map +1 -0
- package/ui/date-picker/index.ios.d.ts +10 -0
- package/ui/date-picker/index.ios.js +165 -0
- package/ui/date-picker/index.ios.js.map +1 -0
- package/ui/dialogs/dialogs-common.d.ts +215 -0
- package/ui/dialogs/dialogs-common.js +167 -0
- package/ui/dialogs/dialogs-common.js.map +1 -0
- package/ui/dialogs/index.android.d.ts +20 -0
- package/ui/dialogs/index.android.js +329 -0
- package/ui/dialogs/index.android.js.map +1 -0
- package/ui/dialogs/index.ios.d.ts +17 -0
- package/ui/dialogs/index.ios.js +329 -0
- package/ui/dialogs/index.ios.js.map +1 -0
- package/ui/editable-text-base/editable-text-base-common.d.ts +39 -0
- package/ui/editable-text-base/editable-text-base-common.js +82 -0
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -0
- package/ui/editable-text-base/index.android.d.ts +26 -0
- package/ui/editable-text-base/index.android.js +505 -0
- package/ui/editable-text-base/index.android.js.map +1 -0
- package/ui/editable-text-base/index.ios.d.ts +10 -0
- package/ui/editable-text-base/index.ios.js +261 -0
- package/ui/editable-text-base/index.ios.js.map +1 -0
- package/ui/embedding/index.android.d.ts +4 -0
- package/ui/embedding/index.android.js +14 -0
- package/ui/embedding/index.android.js.map +1 -0
- package/ui/embedding/index.ios.d.ts +1 -0
- package/ui/embedding/index.ios.js +4 -0
- package/ui/embedding/index.ios.js.map +1 -0
- package/ui/enums/enums.js +6 -0
- package/ui/enums/enums.js.map +1 -0
- package/ui/enums/index.js +6 -0
- package/ui/enums/index.js.map +1 -0
- package/ui/frame/activity.android.d.ts +1 -0
- package/ui/frame/activity.android.js +110 -0
- package/ui/frame/activity.android.js.map +1 -0
- package/ui/frame/callbacks/activity-callbacks.d.ts +20 -0
- package/ui/frame/callbacks/activity-callbacks.js +301 -0
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -0
- package/ui/frame/callbacks/fragment-callbacks.d.ts +19 -0
- package/ui/frame/callbacks/fragment-callbacks.js +273 -0
- package/ui/frame/callbacks/fragment-callbacks.js.map +1 -0
- package/ui/frame/fragment.android.d.ts +3 -0
- package/ui/frame/fragment.android.js +92 -0
- package/ui/frame/fragment.android.js.map +1 -0
- package/ui/frame/fragment.ios.d.ts +3 -0
- package/ui/frame/fragment.ios.js +4 -0
- package/ui/frame/fragment.ios.js.map +1 -0
- package/ui/frame/fragment.transitions.android.d.ts +36 -0
- package/ui/frame/fragment.transitions.android.js +591 -0
- package/ui/frame/fragment.transitions.android.js.map +1 -0
- package/ui/frame/fragment.transitions.types.d.ts +6 -0
- package/ui/frame/fragment.transitions.types.js +2 -0
- package/ui/frame/fragment.transitions.types.js.map +1 -0
- package/ui/frame/frame-common.d.ts +97 -0
- package/ui/frame/frame-common.js +673 -0
- package/ui/frame/frame-common.js.map +1 -0
- package/ui/frame/frame-helpers.d.ts +16 -0
- package/ui/frame/frame-helpers.js +19 -0
- package/ui/frame/frame-helpers.js.map +1 -0
- package/ui/frame/frame-interfaces.d.ts +95 -0
- package/ui/frame/frame-interfaces.js +7 -0
- package/ui/frame/frame-interfaces.js.map +1 -0
- package/ui/frame/frame-stack.d.ts +6 -0
- package/ui/frame/frame-stack.js +38 -0
- package/ui/frame/frame-stack.js.map +1 -0
- package/ui/frame/index.android.d.ts +65 -0
- package/ui/frame/index.android.js +685 -0
- package/ui/frame/index.android.js.map +1 -0
- package/ui/frame/index.ios.d.ts +57 -0
- package/ui/frame/index.ios.js +648 -0
- package/ui/frame/index.ios.js.map +1 -0
- package/ui/gestures/gestures-common.d.ts +279 -0
- package/ui/gestures/gestures-common.js +199 -0
- package/ui/gestures/gestures-common.js.map +1 -0
- package/ui/gestures/index.android.d.ts +21 -0
- package/ui/gestures/index.android.js +595 -0
- package/ui/gestures/index.android.js.map +1 -0
- package/ui/gestures/index.ios.d.ts +36 -0
- package/ui/gestures/index.ios.js +512 -0
- package/ui/gestures/index.ios.js.map +1 -0
- package/ui/gestures/touch-manager.d.ts +82 -0
- package/ui/gestures/touch-manager.js +269 -0
- package/ui/gestures/touch-manager.js.map +1 -0
- package/ui/html-view/html-view-common.d.ts +13 -0
- package/ui/html-view/html-view-common.js +35 -0
- package/ui/html-view/html-view-common.js.map +1 -0
- package/ui/html-view/index.android.d.ts +7 -0
- package/ui/html-view/index.android.js +86 -0
- package/ui/html-view/index.android.js.map +1 -0
- package/ui/html-view/index.ios.d.ts +11 -0
- package/ui/html-view/index.ios.js +103 -0
- package/ui/html-view/index.ios.js.map +1 -0
- package/ui/image/image-common.d.ts +43 -0
- package/ui/image/image-common.js +191 -0
- package/ui/image/image-common.js.map +1 -0
- package/ui/image/index.android.d.ts +13 -0
- package/ui/image/index.android.js +167 -0
- package/ui/image/index.android.js.map +1 -0
- package/ui/image/index.ios.d.ts +17 -0
- package/ui/image/index.ios.js +186 -0
- package/ui/image/index.ios.js.map +1 -0
- package/ui/image/symbol-effects-common.d.ts +36 -0
- package/ui/image/symbol-effects-common.js +35 -0
- package/ui/image/symbol-effects-common.js.map +1 -0
- package/ui/image/symbol-effects.android.d.ts +5 -0
- package/ui/image/symbol-effects.android.js +8 -0
- package/ui/image/symbol-effects.android.js.map +1 -0
- package/ui/image/symbol-effects.ios.d.ts +6 -0
- package/ui/image/symbol-effects.ios.js +79 -0
- package/ui/image/symbol-effects.ios.js.map +1 -0
- package/ui/image-cache/image-cache-common.d.ts +40 -0
- package/ui/image-cache/image-cache-common.js +176 -0
- package/ui/image-cache/image-cache-common.js.map +1 -0
- package/ui/image-cache/index.android.d.ts +11 -0
- package/ui/image-cache/index.android.js +76 -0
- package/ui/image-cache/index.android.js.map +1 -0
- package/ui/image-cache/index.ios.d.ts +11 -0
- package/ui/image-cache/index.ios.js +84 -0
- package/ui/image-cache/index.ios.js.map +1 -0
- package/ui/index.d.ts +78 -0
- package/ui/index.js +62 -0
- package/ui/index.js.map +1 -0
- package/ui/label/index.android.d.ts +11 -0
- package/ui/label/index.android.js +40 -0
- package/ui/label/index.android.js.map +1 -0
- package/ui/label/index.ios.d.ts +16 -0
- package/ui/label/index.ios.js +220 -0
- package/ui/label/index.ios.js.map +1 -0
- package/ui/layouts/absolute-layout/absolute-layout-common.d.ts +16 -0
- package/ui/layouts/absolute-layout/absolute-layout-common.js +70 -0
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -0
- package/ui/layouts/absolute-layout/index.android.d.ts +6 -0
- package/ui/layouts/absolute-layout/index.android.js +26 -0
- package/ui/layouts/absolute-layout/index.android.js.map +1 -0
- package/ui/layouts/absolute-layout/index.ios.d.ts +10 -0
- package/ui/layouts/absolute-layout/index.ios.js +48 -0
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -0
- package/ui/layouts/dock-layout/dock-layout-common.d.ts +14 -0
- package/ui/layouts/dock-layout/dock-layout-common.js +51 -0
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -0
- package/ui/layouts/dock-layout/index.android.d.ts +6 -0
- package/ui/layouts/dock-layout/index.android.js +38 -0
- package/ui/layouts/dock-layout/index.android.js.map +1 -0
- package/ui/layouts/dock-layout/index.ios.d.ts +8 -0
- package/ui/layouts/dock-layout/index.ios.js +115 -0
- package/ui/layouts/dock-layout/index.ios.js.map +1 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.d.ts +126 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +402 -0
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -0
- package/ui/layouts/flexbox-layout/index.android.d.ts +12 -0
- package/ui/layouts/flexbox-layout/index.android.js +133 -0
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -0
- package/ui/layouts/flexbox-layout/index.ios.d.ts +44 -0
- package/ui/layouts/flexbox-layout/index.ios.js +1232 -0
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -0
- package/ui/layouts/grid-layout/grid-layout-common.d.ts +72 -0
- package/ui/layouts/grid-layout/grid-layout-common.js +323 -0
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -0
- package/ui/layouts/grid-layout/index.android.d.ts +22 -0
- package/ui/layouts/grid-layout/index.android.js +117 -0
- package/ui/layouts/grid-layout/index.android.js.map +1 -0
- package/ui/layouts/grid-layout/index.ios.d.ts +28 -0
- package/ui/layouts/grid-layout/index.ios.js +777 -0
- package/ui/layouts/grid-layout/index.ios.js.map +1 -0
- package/ui/layouts/index.d.ts +2 -1
- package/ui/layouts/index.js +9 -0
- package/ui/layouts/index.js.map +1 -0
- package/ui/layouts/layout-base-common.d.ts +36 -0
- package/ui/layouts/layout-base-common.js +146 -0
- package/ui/layouts/layout-base-common.js.map +1 -0
- package/ui/layouts/layout-base.android.d.ts +4 -0
- package/ui/layouts/layout-base.android.js +44 -0
- package/ui/layouts/layout-base.android.js.map +1 -0
- package/ui/layouts/layout-base.ios.d.ts +10 -0
- package/ui/layouts/layout-base.ios.js +34 -0
- package/ui/layouts/layout-base.ios.js.map +1 -0
- package/ui/layouts/root-layout/index.android.d.ts +16 -0
- package/ui/layouts/root-layout/index.android.js +115 -0
- package/ui/layouts/root-layout/index.android.js.map +1 -0
- package/ui/layouts/root-layout/index.ios.d.ts +16 -0
- package/ui/layouts/root-layout/index.ios.js +96 -0
- package/ui/layouts/root-layout/index.ios.js.map +1 -0
- package/ui/layouts/root-layout/root-layout-common.d.ts +54 -0
- package/ui/layouts/root-layout/root-layout-common.js +394 -0
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -0
- package/ui/layouts/stack-layout/index.android.d.ts +6 -0
- package/ui/layouts/stack-layout/index.android.js +11 -0
- package/ui/layouts/stack-layout/index.android.js.map +1 -0
- package/ui/layouts/stack-layout/index.ios.d.ts +10 -0
- package/ui/layouts/stack-layout/index.ios.js +151 -0
- package/ui/layouts/stack-layout/index.ios.js.map +1 -0
- package/ui/layouts/stack-layout/stack-layout-common.d.ts +8 -0
- package/ui/layouts/stack-layout/stack-layout-common.js +19 -0
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -0
- package/ui/layouts/wrap-layout/index.android.d.ts +6 -0
- package/ui/layouts/wrap-layout/index.android.js +18 -0
- package/ui/layouts/wrap-layout/index.android.js.map +1 -0
- package/ui/layouts/wrap-layout/index.ios.d.ts +8 -0
- package/ui/layouts/wrap-layout/index.ios.js +170 -0
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.d.ts +15 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.js +38 -0
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -0
- package/ui/list-picker/index.android.d.ts +10 -0
- package/ui/list-picker/index.android.js +177 -0
- package/ui/list-picker/index.android.js.map +1 -0
- package/ui/list-picker/index.ios.d.ts +11 -0
- package/ui/list-picker/index.ios.js +99 -0
- package/ui/list-picker/index.ios.js.map +1 -0
- package/ui/list-picker/list-picker-common.d.ts +22 -0
- package/ui/list-picker/list-picker-common.js +77 -0
- package/ui/list-picker/list-picker-common.js.map +1 -0
- package/ui/list-view/index.android.d.ts +32 -0
- package/ui/list-view/index.android.js +359 -0
- package/ui/list-view/index.android.js.map +1 -0
- package/ui/list-view/index.ios.d.ts +45 -0
- package/ui/list-view/index.ios.js +456 -0
- package/ui/list-view/index.ios.js.map +1 -0
- package/ui/list-view/list-view-common.d.ts +66 -0
- package/ui/list-view/list-view-common.js +210 -0
- package/ui/list-view/list-view-common.js.map +1 -0
- package/ui/page/index.android.d.ts +13 -0
- package/ui/page/index.android.js +148 -0
- package/ui/page/index.android.js.map +1 -0
- package/ui/page/index.ios.d.ts +45 -0
- package/ui/page/index.ios.js +600 -0
- package/ui/page/index.ios.js.map +1 -0
- package/ui/page/page-common.d.ts +77 -0
- package/ui/page/page-common.js +186 -0
- package/ui/page/page-common.js.map +1 -0
- package/ui/placeholder/index.android.d.ts +12 -0
- package/ui/placeholder/index.android.js +21 -0
- package/ui/placeholder/index.android.js.map +1 -0
- package/ui/placeholder/index.d.ts +8 -42
- package/ui/placeholder/index.js +16 -0
- package/ui/placeholder/index.js.map +1 -0
- package/ui/placeholder/placeholder-common.d.ts +12 -0
- package/ui/placeholder/placeholder-common.js +2 -0
- package/ui/placeholder/placeholder-common.js.map +1 -0
- package/ui/progress/index.android.d.ts +6 -0
- package/ui/progress/index.android.js +65 -0
- package/ui/progress/index.android.js.map +1 -0
- package/ui/progress/index.ios.d.ts +7 -0
- package/ui/progress/index.ios.js +45 -0
- package/ui/progress/index.ios.js.map +1 -0
- package/ui/progress/progress-common.d.ts +15 -0
- package/ui/progress/progress-common.js +34 -0
- package/ui/progress/progress-common.js.map +1 -0
- package/ui/proxy-view-container/index.d.ts +31 -0
- package/ui/proxy-view-container/index.js +244 -0
- package/ui/proxy-view-container/index.js.map +1 -0
- package/ui/repeater/index.d.ts +65 -0
- package/ui/repeater/index.js +219 -0
- package/ui/repeater/index.js.map +1 -0
- package/ui/scroll-view/index.android.d.ts +22 -0
- package/ui/scroll-view/index.android.js +157 -0
- package/ui/scroll-view/index.android.js.map +1 -0
- package/ui/scroll-view/index.ios.d.ts +23 -0
- package/ui/scroll-view/index.ios.js +174 -0
- package/ui/scroll-view/index.ios.js.map +1 -0
- package/ui/scroll-view/scroll-view-common.d.ts +32 -0
- package/ui/scroll-view/scroll-view-common.js +93 -0
- package/ui/scroll-view/scroll-view-common.js.map +1 -0
- package/ui/search-bar/index.android.d.ts +14 -0
- package/ui/search-bar/index.android.js +239 -0
- package/ui/search-bar/index.android.js.map +1 -0
- package/ui/search-bar/index.ios.d.ts +14 -0
- package/ui/search-bar/index.ios.js +195 -0
- package/ui/search-bar/index.ios.js.map +1 -0
- package/ui/search-bar/search-bar-common.d.ts +17 -0
- package/ui/search-bar/search-bar-common.js +37 -0
- package/ui/search-bar/search-bar-common.js.map +1 -0
- package/ui/segmented-bar/index.android.d.ts +21 -0
- package/ui/segmented-bar/index.android.js +283 -0
- package/ui/segmented-bar/index.android.js.map +1 -0
- package/ui/segmented-bar/index.ios.d.ts +15 -0
- package/ui/segmented-bar/index.ios.js +140 -0
- package/ui/segmented-bar/index.ios.js.map +1 -0
- package/ui/segmented-bar/segmented-bar-common.d.ts +37 -0
- package/ui/segmented-bar/segmented-bar-common.js +146 -0
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -0
- package/ui/slider/index.android.d.ts +18 -0
- package/ui/slider/index.android.js +118 -0
- package/ui/slider/index.android.js.map +1 -0
- package/ui/slider/index.ios.d.ts +19 -0
- package/ui/slider/index.ios.js +145 -0
- package/ui/slider/index.ios.js.map +1 -0
- package/ui/slider/slider-common.d.ts +26 -0
- package/ui/slider/slider-common.js +68 -0
- package/ui/slider/slider-common.js.map +1 -0
- package/ui/styling/background-common.d.ts +78 -0
- package/ui/styling/background-common.js +222 -0
- package/ui/styling/background-common.js.map +1 -0
- package/ui/styling/background.android.d.ts +9 -0
- package/ui/styling/background.android.js +135 -0
- package/ui/styling/background.android.js.map +1 -0
- package/ui/styling/background.ios.d.ts +34 -0
- package/ui/styling/background.ios.js +1100 -0
- package/ui/styling/background.ios.js.map +1 -0
- package/ui/styling/box-shadow.d.ts +9 -0
- package/ui/styling/box-shadow.js +3 -0
- package/ui/styling/box-shadow.js.map +1 -0
- package/ui/styling/converters.d.ts +2 -2
- package/ui/styling/converters.js +41 -0
- package/ui/styling/converters.js.map +1 -0
- package/ui/styling/css-animation-parser.d.ts +14 -0
- package/ui/styling/css-animation-parser.js +188 -0
- package/ui/styling/css-animation-parser.js.map +1 -0
- package/ui/styling/css-selector.d.ts +270 -0
- package/ui/styling/css-selector.js +928 -0
- package/ui/styling/css-selector.js.map +1 -0
- package/ui/styling/css-shadow.d.ts +19 -0
- package/ui/styling/css-shadow.js +26 -0
- package/ui/styling/css-shadow.js.map +1 -0
- package/ui/styling/css-stroke.d.ts +12 -0
- package/ui/styling/css-stroke.js +19 -0
- package/ui/styling/css-stroke.js.map +1 -0
- package/ui/styling/css-utils.d.ts +7 -0
- package/ui/styling/css-utils.js +65 -0
- package/ui/styling/css-utils.js.map +1 -0
- package/ui/styling/font-common.d.ts +63 -0
- package/ui/styling/font-common.js +241 -0
- package/ui/styling/font-common.js.map +1 -0
- package/ui/styling/font-interfaces.d.ts +15 -0
- package/ui/styling/font-interfaces.js +2 -0
- package/ui/styling/font-interfaces.js.map +1 -0
- package/ui/styling/font.android.d.ts +8 -0
- package/ui/styling/font.android.js +146 -0
- package/ui/styling/font.android.js.map +1 -0
- package/ui/styling/font.ios.d.ts +12 -0
- package/ui/styling/font.ios.js +143 -0
- package/ui/styling/font.ios.js.map +1 -0
- package/ui/styling/linear-gradient.d.ts +13 -0
- package/ui/styling/linear-gradient.js +48 -0
- package/ui/styling/linear-gradient.js.map +1 -0
- package/ui/styling/style/index.d.ts +162 -0
- package/ui/styling/style/index.js +67 -0
- package/ui/styling/style/index.js.map +1 -0
- package/ui/styling/style-properties.d.ts +82 -101
- package/ui/styling/style-properties.js +1331 -0
- package/ui/styling/style-properties.js.map +1 -0
- package/ui/styling/style-scope.d.ts +79 -48
- package/ui/styling/style-scope.js +1017 -0
- package/ui/styling/style-scope.js.map +1 -0
- package/ui/switch/index.android.d.ts +11 -0
- package/ui/switch/index.android.js +111 -0
- package/ui/switch/index.android.js.map +1 -0
- package/ui/switch/index.ios.d.ts +14 -0
- package/ui/switch/index.ios.js +147 -0
- package/ui/switch/index.ios.js.map +1 -0
- package/ui/switch/switch-common.d.ts +12 -0
- package/ui/switch/switch-common.js +38 -0
- package/ui/switch/switch-common.js.map +1 -0
- package/ui/tab-view/index.android.d.ts +37 -0
- package/ui/tab-view/index.android.js +604 -0
- package/ui/tab-view/index.android.js.map +1 -0
- package/ui/tab-view/index.ios.d.ts +49 -0
- package/ui/tab-view/index.ios.js +583 -0
- package/ui/tab-view/index.ios.js.map +1 -0
- package/ui/tab-view/tab-view-common.d.ts +71 -0
- package/ui/tab-view/tab-view-common.js +263 -0
- package/ui/tab-view/tab-view-common.js.map +1 -0
- package/ui/text-base/formatted-string.d.ts +36 -73
- package/ui/text-base/formatted-string.js +163 -0
- package/ui/text-base/formatted-string.js.map +1 -0
- package/ui/text-base/index.android.d.ts +16 -0
- package/ui/text-base/index.android.js +500 -0
- package/ui/text-base/index.android.js.map +1 -0
- package/ui/text-base/index.ios.d.ts +30 -0
- package/ui/text-base/index.ios.js +569 -0
- package/ui/text-base/index.ios.js.map +1 -0
- package/ui/text-base/span.d.ts +36 -81
- package/ui/text-base/span.js +113 -0
- package/ui/text-base/span.js.map +1 -0
- package/ui/text-base/text-base-common.d.ts +98 -0
- package/ui/text-base/text-base-common.js +323 -0
- package/ui/text-base/text-base-common.js.map +1 -0
- package/ui/text-field/index.android.d.ts +7 -0
- package/ui/text-field/index.android.js +95 -0
- package/ui/text-field/index.android.js.map +1 -0
- package/ui/text-field/index.ios.d.ts +25 -0
- package/ui/text-field/index.ios.js +277 -0
- package/ui/text-field/index.ios.js.map +1 -0
- package/ui/text-field/text-field-common.d.ts +11 -0
- package/ui/text-field/text-field-common.js +25 -0
- package/ui/text-field/text-field-common.js.map +1 -0
- package/ui/text-view/index.android.d.ts +6 -0
- package/ui/text-view/index.android.js +19 -0
- package/ui/text-view/index.android.js.map +1 -0
- package/ui/text-view/index.ios.d.ts +24 -0
- package/ui/text-view/index.ios.js +366 -0
- package/ui/text-view/index.ios.js.map +1 -0
- package/ui/text-view/text-view-common.d.ts +6 -0
- package/ui/text-view/text-view-common.js +5 -0
- package/ui/text-view/text-view-common.js.map +1 -0
- package/ui/time-picker/index.android.d.ts +8 -0
- package/ui/time-picker/index.android.js +79 -0
- package/ui/time-picker/index.android.js.map +1 -0
- package/ui/time-picker/index.ios.d.ts +11 -0
- package/ui/time-picker/index.ios.js +138 -0
- package/ui/time-picker/index.ios.js.map +1 -0
- package/ui/time-picker/time-picker-common.d.ts +30 -0
- package/ui/time-picker/time-picker-common.js +175 -0
- package/ui/time-picker/time-picker-common.js.map +1 -0
- package/ui/transition/fade-transition.android.d.ts +4 -0
- package/ui/transition/fade-transition.android.js +28 -0
- package/ui/transition/fade-transition.android.js.map +1 -0
- package/ui/transition/fade-transition.ios.d.ts +17 -0
- package/ui/transition/fade-transition.ios.js +65 -0
- package/ui/transition/fade-transition.ios.js.map +1 -0
- package/ui/transition/flip-transition.android.d.ts +6 -0
- package/ui/transition/flip-transition.android.js +90 -0
- package/ui/transition/flip-transition.android.js.map +1 -0
- package/ui/transition/index.android.d.ts +19 -0
- package/ui/transition/index.android.js +37 -0
- package/ui/transition/index.android.js.map +1 -0
- package/ui/transition/index.ios.d.ts +14 -0
- package/ui/transition/index.ios.js +30 -0
- package/ui/transition/index.ios.js.map +1 -0
- package/ui/transition/modal-transition.android.d.ts +5 -0
- package/ui/transition/modal-transition.android.js +7 -0
- package/ui/transition/modal-transition.android.js.map +1 -0
- package/ui/transition/modal-transition.ios.d.ts +34 -0
- package/ui/transition/modal-transition.ios.js +182 -0
- package/ui/transition/modal-transition.ios.js.map +1 -0
- package/ui/transition/page-transition.android.d.ts +10 -0
- package/ui/transition/page-transition.android.js +305 -0
- package/ui/transition/page-transition.android.js.map +1 -0
- package/ui/transition/page-transition.ios.d.ts +35 -0
- package/ui/transition/page-transition.ios.js +199 -0
- package/ui/transition/page-transition.ios.js.map +1 -0
- package/ui/transition/shared-transition-helper.android.d.ts +9 -0
- package/ui/transition/shared-transition-helper.android.js +10 -0
- package/ui/transition/shared-transition-helper.android.js.map +1 -0
- package/ui/transition/shared-transition-helper.ios.d.ts +14 -0
- package/ui/transition/shared-transition-helper.ios.js +539 -0
- package/ui/transition/shared-transition-helper.ios.js.map +1 -0
- package/ui/transition/shared-transition.d.ts +271 -0
- package/ui/transition/shared-transition.js +233 -0
- package/ui/transition/shared-transition.js.map +1 -0
- package/ui/transition/slide-transition.android.d.ts +7 -0
- package/ui/transition/slide-transition.android.js +116 -0
- package/ui/transition/slide-transition.android.js.map +1 -0
- package/ui/transition/slide-transition.ios.d.ts +19 -0
- package/ui/transition/slide-transition.ios.js +95 -0
- package/ui/transition/slide-transition.ios.js.map +1 -0
- package/ui/utils.android.d.ts +5 -0
- package/ui/utils.android.js +16 -0
- package/ui/utils.android.js.map +1 -0
- package/ui/utils.ios.d.ts +12 -0
- package/ui/utils.ios.js +66 -0
- package/ui/utils.ios.js.map +1 -0
- package/ui/web-view/index.android.d.ts +17 -0
- package/ui/web-view/index.android.js +180 -0
- package/ui/web-view/index.android.js.map +1 -0
- package/ui/web-view/index.ios.d.ts +26 -0
- package/ui/web-view/index.ios.js +247 -0
- package/ui/web-view/index.ios.js.map +1 -0
- package/ui/web-view/web-view-common.d.ts +28 -0
- package/ui/web-view/web-view-common.js +75 -0
- package/ui/web-view/web-view-common.js.map +1 -0
- package/ui/web-view/web-view-interfaces.d.ts +12 -0
- package/ui/web-view/web-view-interfaces.js +2 -0
- package/ui/web-view/web-view-interfaces.js.map +1 -0
- package/utils/android/index.d.ts +21 -0
- package/utils/android/index.js +169 -0
- package/utils/android/index.js.map +1 -0
- package/utils/common.d.ts +65 -0
- package/utils/common.js +253 -0
- package/utils/common.js.map +1 -0
- package/utils/constants.android.d.ts +1 -0
- package/utils/constants.android.js +2 -0
- package/utils/constants.android.js.map +1 -0
- package/utils/constants.ios.d.ts +1 -0
- package/utils/constants.ios.js +2 -0
- package/utils/constants.ios.js.map +1 -0
- package/utils/debug.d.ts +17 -61
- package/utils/debug.js +61 -0
- package/utils/debug.js.map +1 -0
- package/utils/index.android.d.ts +24 -0
- package/utils/index.android.js +177 -0
- package/utils/index.android.js.map +1 -0
- package/utils/index.ios.d.ts +19 -0
- package/utils/index.ios.js +75 -0
- package/utils/index.ios.js.map +1 -0
- package/utils/ios/index.d.ts +39 -0
- package/utils/ios/index.js +257 -0
- package/utils/ios/index.js.map +1 -0
- package/utils/layout-helper/index.android.d.ts +24 -0
- package/utils/layout-helper/index.android.js +77 -0
- package/utils/layout-helper/index.android.js.map +1 -0
- package/utils/layout-helper/index.ios.d.ts +24 -0
- package/utils/layout-helper/index.ios.js +64 -0
- package/utils/layout-helper/index.ios.js.map +1 -0
- package/utils/layout-helper/layout-helper-common.d.ts +14 -0
- package/utils/layout-helper/layout-helper-common.js +57 -0
- package/utils/layout-helper/layout-helper-common.js.map +1 -0
- package/utils/lazy.d.ts +0 -5
- package/utils/lazy.js +5 -0
- package/utils/lazy.js.map +1 -0
- package/utils/macrotask-scheduler.d.ts +1 -5
- package/utils/macrotask-scheduler.js +26 -0
- package/utils/macrotask-scheduler.js.map +1 -0
- package/utils/mainthread-helper.android.d.ts +3 -0
- package/utils/mainthread-helper.android.js +28 -0
- package/utils/mainthread-helper.android.js.map +1 -0
- package/utils/mainthread-helper.ios.d.ts +3 -0
- package/utils/mainthread-helper.ios.js +17 -0
- package/utils/mainthread-helper.ios.js.map +1 -0
- package/utils/module-merge.d.ts +1 -0
- package/utils/module-merge.js +8 -0
- package/utils/module-merge.js.map +1 -0
- package/utils/native-helper.android.d.ts +10 -0
- package/utils/native-helper.android.js +139 -0
- package/utils/native-helper.android.js.map +1 -0
- package/utils/native-helper.ios.d.ts +10 -0
- package/utils/native-helper.ios.js +91 -0
- package/utils/native-helper.ios.js.map +1 -0
- package/utils/number-utils.d.ts +19 -0
- package/utils/number-utils.js +37 -0
- package/utils/number-utils.js.map +1 -0
- package/utils/platform-check.d.ts +4 -0
- package/utils/platform-check.js +21 -0
- package/utils/platform-check.js.map +1 -0
- package/utils/types.d.ts +23 -115
- package/utils/types.js +104 -0
- package/utils/types.js.map +1 -0
- package/wgc/atob.d.ts +1 -0
- package/wgc/atob.js +9 -0
- package/wgc/atob.js.map +1 -0
- package/wgc/btoa.d.ts +1 -0
- package/wgc/btoa.js +9 -0
- package/wgc/btoa.js.map +1 -0
- package/wgc/crypto/SubtleCrypto.d.ts +63 -0
- package/wgc/crypto/SubtleCrypto.js +551 -0
- package/wgc/crypto/SubtleCrypto.js.map +1 -0
- package/wgc/crypto/index.d.ts +8 -0
- package/wgc/crypto/index.js +31 -0
- package/wgc/crypto/index.js.map +1 -0
- package/wgc/index.d.ts +2 -0
- package/wgc/index.js +3 -0
- package/wgc/index.js.map +1 -0
- package/xhr/index.d.ts +107 -0
- package/xhr/index.js +472 -0
- package/xhr/index.js.map +1 -0
- package/xml/index.d.ts +44 -105
- package/xml/index.js +89 -124
- package/xml/index.js.map +1 -0
|
@@ -0,0 +1,1331 @@
|
|
|
1
|
+
// Types
|
|
2
|
+
import { unsetValue, CssProperty, CssAnimationProperty, ShorthandProperty, InheritedCssProperty } from '../core/properties';
|
|
3
|
+
import { Style } from './style';
|
|
4
|
+
import { Color } from '../../color';
|
|
5
|
+
import { Font, parseFont, FontStyle, FontWeight, FontVariationSettings } from './font';
|
|
6
|
+
import { Background } from './background';
|
|
7
|
+
import { layout, hasDuplicates } from '../../utils';
|
|
8
|
+
import { radiansToDegrees } from '../../utils/number-utils';
|
|
9
|
+
import { decompose2DTransformMatrix, getTransformMatrix, matrixArrayToCssMatrix, multiplyAffine2d } from '../../matrix';
|
|
10
|
+
import { Trace } from '../../trace';
|
|
11
|
+
import { CoreTypes } from '../../core-types';
|
|
12
|
+
import { parseBackground } from '../../css/parser';
|
|
13
|
+
import { LinearGradient } from './linear-gradient';
|
|
14
|
+
import { parseCSSShadow } from './css-shadow';
|
|
15
|
+
function equalsCommon(a, b) {
|
|
16
|
+
if (a == 'auto') {
|
|
17
|
+
// tslint:disable-line
|
|
18
|
+
return b == 'auto'; // tslint:disable-line
|
|
19
|
+
}
|
|
20
|
+
if (typeof a === 'number') {
|
|
21
|
+
if (b == 'auto') {
|
|
22
|
+
// tslint:disable-line
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
if (typeof b === 'number') {
|
|
26
|
+
return a == b; // tslint:disable-line
|
|
27
|
+
}
|
|
28
|
+
if (!b) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return b.unit == 'dip' && a == b.value; // tslint:disable-line
|
|
32
|
+
}
|
|
33
|
+
if (b == 'auto') {
|
|
34
|
+
// tslint:disable-line
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
if (typeof b === 'number') {
|
|
38
|
+
return a ? a.unit == 'dip' && a.value == b : false; // tslint:disable-line
|
|
39
|
+
}
|
|
40
|
+
if (!a || !b) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return a.value == b.value && a.unit == b.unit; // tslint:disable-line
|
|
44
|
+
}
|
|
45
|
+
function convertToStringCommon(length) {
|
|
46
|
+
if (length == 'auto' || length === null || length === undefined) {
|
|
47
|
+
// tslint:disable-line
|
|
48
|
+
return 'auto';
|
|
49
|
+
}
|
|
50
|
+
if (typeof length === 'number') {
|
|
51
|
+
return length.toString();
|
|
52
|
+
}
|
|
53
|
+
let val = length.value;
|
|
54
|
+
if (length.unit === '%') {
|
|
55
|
+
val *= 100;
|
|
56
|
+
}
|
|
57
|
+
return val + length.unit;
|
|
58
|
+
}
|
|
59
|
+
function toDevicePixelsCommon(length, auto = Number.NaN, parentAvailableWidth = Number.NaN) {
|
|
60
|
+
if (length === 'auto' || length === null || length === undefined) {
|
|
61
|
+
return auto;
|
|
62
|
+
}
|
|
63
|
+
if (typeof length === 'number') {
|
|
64
|
+
return layout.round(layout.toDevicePixels(length));
|
|
65
|
+
}
|
|
66
|
+
switch (length.unit) {
|
|
67
|
+
case 'px':
|
|
68
|
+
return layout.round(length.value);
|
|
69
|
+
case '%':
|
|
70
|
+
return layout.round(parentAvailableWidth * length.value);
|
|
71
|
+
case 'dip':
|
|
72
|
+
default:
|
|
73
|
+
return layout.round(layout.toDevicePixels(length.value));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export function colorConverter(v) {
|
|
77
|
+
if (!v || v instanceof Color) {
|
|
78
|
+
return v;
|
|
79
|
+
}
|
|
80
|
+
return new Color(v);
|
|
81
|
+
}
|
|
82
|
+
export var PercentLength;
|
|
83
|
+
(function (PercentLength) {
|
|
84
|
+
function parse(fromValue) {
|
|
85
|
+
if (fromValue == 'auto') {
|
|
86
|
+
// tslint:disable-line
|
|
87
|
+
return 'auto';
|
|
88
|
+
}
|
|
89
|
+
if (typeof fromValue === 'string') {
|
|
90
|
+
let stringValue = fromValue.trim();
|
|
91
|
+
if (stringValue.endsWith('%')) {
|
|
92
|
+
// Normalize result to values between -1 and 1
|
|
93
|
+
const value = parseFloat(stringValue.substring(0, stringValue.length - 1).trim()) / 100;
|
|
94
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
95
|
+
throw new Error(`Invalid value: ${fromValue}`);
|
|
96
|
+
}
|
|
97
|
+
return { unit: '%', value };
|
|
98
|
+
}
|
|
99
|
+
else if (stringValue.endsWith('px')) {
|
|
100
|
+
const value = parseFloat(stringValue.slice(-2).trim());
|
|
101
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
102
|
+
throw new Error(`Invalid value: ${fromValue}`);
|
|
103
|
+
}
|
|
104
|
+
return { unit: 'px', value };
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
const value = parseFloat(stringValue);
|
|
108
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
109
|
+
throw new Error(`Invalid value: ${fromValue}`);
|
|
110
|
+
}
|
|
111
|
+
return value;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
return fromValue;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
PercentLength.parse = parse;
|
|
119
|
+
PercentLength.equals = equalsCommon;
|
|
120
|
+
PercentLength.toDevicePixels = toDevicePixelsCommon;
|
|
121
|
+
PercentLength.convertToString = convertToStringCommon;
|
|
122
|
+
})(PercentLength || (PercentLength = {}));
|
|
123
|
+
export var Length;
|
|
124
|
+
(function (Length) {
|
|
125
|
+
function parse(fromValue) {
|
|
126
|
+
if (typeof fromValue === 'string') {
|
|
127
|
+
if (fromValue === 'auto') {
|
|
128
|
+
return 'auto';
|
|
129
|
+
}
|
|
130
|
+
let stringValue = fromValue.trim();
|
|
131
|
+
if (stringValue.endsWith('px')) {
|
|
132
|
+
stringValue = stringValue.slice(0, -2).trim();
|
|
133
|
+
const value = parseFloat(stringValue);
|
|
134
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
135
|
+
throw new Error(`Invalid value: ${stringValue}`);
|
|
136
|
+
}
|
|
137
|
+
return { unit: 'px', value };
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
const value = parseFloat(stringValue);
|
|
141
|
+
if (isNaN(value) || !isFinite(value)) {
|
|
142
|
+
throw new Error(`Invalid value: ${stringValue}`);
|
|
143
|
+
}
|
|
144
|
+
return value;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
return fromValue;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
Length.parse = parse;
|
|
152
|
+
Length.equals = equalsCommon;
|
|
153
|
+
Length.toDevicePixels = toDevicePixelsCommon;
|
|
154
|
+
Length.convertToString = convertToStringCommon;
|
|
155
|
+
})(Length || (Length = {}));
|
|
156
|
+
export const minWidthProperty = new CssProperty({
|
|
157
|
+
name: 'minWidth',
|
|
158
|
+
cssName: 'min-width',
|
|
159
|
+
defaultValue: CoreTypes.zeroLength,
|
|
160
|
+
affectsLayout: __IOS__,
|
|
161
|
+
equalityComparer: Length.equals,
|
|
162
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
163
|
+
const view = target.viewRef.get();
|
|
164
|
+
if (view) {
|
|
165
|
+
view.effectiveMinWidth = Length.toDevicePixels(newValue, 0);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
valueConverter: Length.parse,
|
|
172
|
+
});
|
|
173
|
+
minWidthProperty.register(Style);
|
|
174
|
+
export const minHeightProperty = new CssProperty({
|
|
175
|
+
name: 'minHeight',
|
|
176
|
+
cssName: 'min-height',
|
|
177
|
+
defaultValue: CoreTypes.zeroLength,
|
|
178
|
+
affectsLayout: __IOS__,
|
|
179
|
+
equalityComparer: Length.equals,
|
|
180
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
181
|
+
const view = target.viewRef.get();
|
|
182
|
+
if (view) {
|
|
183
|
+
view.effectiveMinHeight = Length.toDevicePixels(newValue, 0);
|
|
184
|
+
}
|
|
185
|
+
else {
|
|
186
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
valueConverter: Length.parse,
|
|
190
|
+
});
|
|
191
|
+
minHeightProperty.register(Style);
|
|
192
|
+
export const widthProperty = new CssAnimationProperty({
|
|
193
|
+
name: 'width',
|
|
194
|
+
cssName: 'width',
|
|
195
|
+
defaultValue: 'auto',
|
|
196
|
+
affectsLayout: __IOS__,
|
|
197
|
+
equalityComparer: Length.equals,
|
|
198
|
+
valueConverter: PercentLength.parse,
|
|
199
|
+
});
|
|
200
|
+
widthProperty.register(Style);
|
|
201
|
+
export const heightProperty = new CssAnimationProperty({
|
|
202
|
+
name: 'height',
|
|
203
|
+
cssName: 'height',
|
|
204
|
+
defaultValue: 'auto',
|
|
205
|
+
equalityComparer: Length.equals,
|
|
206
|
+
affectsLayout: __IOS__,
|
|
207
|
+
valueConverter: PercentLength.parse,
|
|
208
|
+
});
|
|
209
|
+
heightProperty.register(Style);
|
|
210
|
+
const marginProperty = new ShorthandProperty({
|
|
211
|
+
name: 'margin',
|
|
212
|
+
cssName: 'margin',
|
|
213
|
+
getter: function () {
|
|
214
|
+
if (PercentLength.equals(this.marginTop, this.marginRight) && PercentLength.equals(this.marginTop, this.marginBottom) && PercentLength.equals(this.marginTop, this.marginLeft)) {
|
|
215
|
+
return this.marginTop;
|
|
216
|
+
}
|
|
217
|
+
return `${PercentLength.convertToString(this.marginTop)} ${PercentLength.convertToString(this.marginRight)} ${PercentLength.convertToString(this.marginBottom)} ${PercentLength.convertToString(this.marginLeft)}`;
|
|
218
|
+
},
|
|
219
|
+
converter: convertToMargins,
|
|
220
|
+
});
|
|
221
|
+
marginProperty.register(Style);
|
|
222
|
+
export const marginLeftProperty = new CssProperty({
|
|
223
|
+
name: 'marginLeft',
|
|
224
|
+
cssName: 'margin-left',
|
|
225
|
+
defaultValue: CoreTypes.zeroLength,
|
|
226
|
+
affectsLayout: __IOS__,
|
|
227
|
+
equalityComparer: Length.equals,
|
|
228
|
+
valueConverter: PercentLength.parse,
|
|
229
|
+
});
|
|
230
|
+
marginLeftProperty.register(Style);
|
|
231
|
+
export const marginRightProperty = new CssProperty({
|
|
232
|
+
name: 'marginRight',
|
|
233
|
+
cssName: 'margin-right',
|
|
234
|
+
defaultValue: CoreTypes.zeroLength,
|
|
235
|
+
affectsLayout: __IOS__,
|
|
236
|
+
equalityComparer: Length.equals,
|
|
237
|
+
valueConverter: PercentLength.parse,
|
|
238
|
+
});
|
|
239
|
+
marginRightProperty.register(Style);
|
|
240
|
+
export const marginTopProperty = new CssProperty({
|
|
241
|
+
name: 'marginTop',
|
|
242
|
+
cssName: 'margin-top',
|
|
243
|
+
defaultValue: CoreTypes.zeroLength,
|
|
244
|
+
affectsLayout: __IOS__,
|
|
245
|
+
equalityComparer: Length.equals,
|
|
246
|
+
valueConverter: PercentLength.parse,
|
|
247
|
+
});
|
|
248
|
+
marginTopProperty.register(Style);
|
|
249
|
+
export const marginBottomProperty = new CssProperty({
|
|
250
|
+
name: 'marginBottom',
|
|
251
|
+
cssName: 'margin-bottom',
|
|
252
|
+
defaultValue: CoreTypes.zeroLength,
|
|
253
|
+
affectsLayout: __IOS__,
|
|
254
|
+
equalityComparer: Length.equals,
|
|
255
|
+
valueConverter: PercentLength.parse,
|
|
256
|
+
});
|
|
257
|
+
marginBottomProperty.register(Style);
|
|
258
|
+
const paddingProperty = new ShorthandProperty({
|
|
259
|
+
name: 'padding',
|
|
260
|
+
cssName: 'padding',
|
|
261
|
+
getter: function () {
|
|
262
|
+
if (Length.equals(this.paddingTop, this.paddingRight) && Length.equals(this.paddingTop, this.paddingBottom) && Length.equals(this.paddingTop, this.paddingLeft)) {
|
|
263
|
+
return this.paddingTop;
|
|
264
|
+
}
|
|
265
|
+
return `${Length.convertToString(this.paddingTop)} ${Length.convertToString(this.paddingRight)} ${Length.convertToString(this.paddingBottom)} ${Length.convertToString(this.paddingLeft)}`;
|
|
266
|
+
},
|
|
267
|
+
converter: convertToPaddings,
|
|
268
|
+
});
|
|
269
|
+
paddingProperty.register(Style);
|
|
270
|
+
export const paddingLeftProperty = new CssProperty({
|
|
271
|
+
name: 'paddingLeft',
|
|
272
|
+
cssName: 'padding-left',
|
|
273
|
+
defaultValue: CoreTypes.zeroLength,
|
|
274
|
+
affectsLayout: __IOS__,
|
|
275
|
+
equalityComparer: Length.equals,
|
|
276
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
277
|
+
const view = target.viewRef.get();
|
|
278
|
+
if (view) {
|
|
279
|
+
view.effectivePaddingLeft = Length.toDevicePixels(newValue, 0);
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
valueConverter: Length.parse,
|
|
286
|
+
});
|
|
287
|
+
paddingLeftProperty.register(Style);
|
|
288
|
+
export const paddingRightProperty = new CssProperty({
|
|
289
|
+
name: 'paddingRight',
|
|
290
|
+
cssName: 'padding-right',
|
|
291
|
+
defaultValue: CoreTypes.zeroLength,
|
|
292
|
+
affectsLayout: __IOS__,
|
|
293
|
+
equalityComparer: Length.equals,
|
|
294
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
295
|
+
const view = target.viewRef.get();
|
|
296
|
+
if (view) {
|
|
297
|
+
view.effectivePaddingRight = Length.toDevicePixels(newValue, 0);
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
valueConverter: Length.parse,
|
|
304
|
+
});
|
|
305
|
+
paddingRightProperty.register(Style);
|
|
306
|
+
export const paddingTopProperty = new CssProperty({
|
|
307
|
+
name: 'paddingTop',
|
|
308
|
+
cssName: 'padding-top',
|
|
309
|
+
defaultValue: CoreTypes.zeroLength,
|
|
310
|
+
affectsLayout: __IOS__,
|
|
311
|
+
equalityComparer: Length.equals,
|
|
312
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
313
|
+
const view = target.viewRef.get();
|
|
314
|
+
if (view) {
|
|
315
|
+
view.effectivePaddingTop = Length.toDevicePixels(newValue, 0);
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
valueConverter: Length.parse,
|
|
322
|
+
});
|
|
323
|
+
paddingTopProperty.register(Style);
|
|
324
|
+
export const paddingBottomProperty = new CssProperty({
|
|
325
|
+
name: 'paddingBottom',
|
|
326
|
+
cssName: 'padding-bottom',
|
|
327
|
+
defaultValue: CoreTypes.zeroLength,
|
|
328
|
+
affectsLayout: __IOS__,
|
|
329
|
+
equalityComparer: Length.equals,
|
|
330
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
331
|
+
const view = target.viewRef.get();
|
|
332
|
+
if (view) {
|
|
333
|
+
view.effectivePaddingBottom = Length.toDevicePixels(newValue, 0);
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
valueConverter: Length.parse,
|
|
340
|
+
});
|
|
341
|
+
paddingBottomProperty.register(Style);
|
|
342
|
+
export const horizontalAlignmentProperty = new CssProperty({
|
|
343
|
+
name: 'horizontalAlignment',
|
|
344
|
+
cssName: 'horizontal-align',
|
|
345
|
+
defaultValue: CoreTypes.HorizontalAlignment.stretch,
|
|
346
|
+
affectsLayout: __IOS__,
|
|
347
|
+
valueConverter: CoreTypes.HorizontalAlignment.parse,
|
|
348
|
+
});
|
|
349
|
+
horizontalAlignmentProperty.register(Style);
|
|
350
|
+
export const verticalAlignmentProperty = new CssProperty({
|
|
351
|
+
name: 'verticalAlignment',
|
|
352
|
+
cssName: 'vertical-align',
|
|
353
|
+
defaultValue: CoreTypes.VerticalAlignment.stretch,
|
|
354
|
+
affectsLayout: __IOS__,
|
|
355
|
+
valueConverter: CoreTypes.VerticalAlignment.parse,
|
|
356
|
+
});
|
|
357
|
+
verticalAlignmentProperty.register(Style);
|
|
358
|
+
function parseThickness(value) {
|
|
359
|
+
if (typeof value === 'string') {
|
|
360
|
+
const arr = value.split(' ');
|
|
361
|
+
let top;
|
|
362
|
+
let right;
|
|
363
|
+
let bottom;
|
|
364
|
+
let left;
|
|
365
|
+
if (arr.length === 1) {
|
|
366
|
+
top = arr[0];
|
|
367
|
+
right = arr[0];
|
|
368
|
+
bottom = arr[0];
|
|
369
|
+
left = arr[0];
|
|
370
|
+
}
|
|
371
|
+
else if (arr.length === 2) {
|
|
372
|
+
top = arr[0];
|
|
373
|
+
bottom = arr[0];
|
|
374
|
+
right = arr[1];
|
|
375
|
+
left = arr[1];
|
|
376
|
+
}
|
|
377
|
+
else if (arr.length === 3) {
|
|
378
|
+
top = arr[0];
|
|
379
|
+
right = arr[1];
|
|
380
|
+
left = arr[1];
|
|
381
|
+
bottom = arr[2];
|
|
382
|
+
}
|
|
383
|
+
else if (arr.length === 4) {
|
|
384
|
+
top = arr[0];
|
|
385
|
+
right = arr[1];
|
|
386
|
+
bottom = arr[2];
|
|
387
|
+
left = arr[3];
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
throw new Error('Expected 1, 2, 3 or 4 parameters. Actual: ' + value);
|
|
391
|
+
}
|
|
392
|
+
return {
|
|
393
|
+
top: top,
|
|
394
|
+
right: right,
|
|
395
|
+
bottom: bottom,
|
|
396
|
+
left: left,
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
return value;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
function convertToMargins(value) {
|
|
404
|
+
if (typeof value === 'string' && value !== 'auto') {
|
|
405
|
+
const thickness = parseThickness(value);
|
|
406
|
+
return [
|
|
407
|
+
[marginTopProperty, PercentLength.parse(thickness.top)],
|
|
408
|
+
[marginRightProperty, PercentLength.parse(thickness.right)],
|
|
409
|
+
[marginBottomProperty, PercentLength.parse(thickness.bottom)],
|
|
410
|
+
[marginLeftProperty, PercentLength.parse(thickness.left)],
|
|
411
|
+
];
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
return [
|
|
415
|
+
[marginTopProperty, value],
|
|
416
|
+
[marginRightProperty, value],
|
|
417
|
+
[marginBottomProperty, value],
|
|
418
|
+
[marginLeftProperty, value],
|
|
419
|
+
];
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
function convertToPaddings(value) {
|
|
423
|
+
if (typeof value === 'string' && value !== 'auto') {
|
|
424
|
+
const thickness = parseThickness(value);
|
|
425
|
+
return [
|
|
426
|
+
[paddingTopProperty, Length.parse(thickness.top)],
|
|
427
|
+
[paddingRightProperty, Length.parse(thickness.right)],
|
|
428
|
+
[paddingBottomProperty, Length.parse(thickness.bottom)],
|
|
429
|
+
[paddingLeftProperty, Length.parse(thickness.left)],
|
|
430
|
+
];
|
|
431
|
+
}
|
|
432
|
+
else {
|
|
433
|
+
return [
|
|
434
|
+
[paddingTopProperty, value],
|
|
435
|
+
[paddingRightProperty, value],
|
|
436
|
+
[paddingBottomProperty, value],
|
|
437
|
+
[paddingLeftProperty, value],
|
|
438
|
+
];
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
export const rotateProperty = new CssAnimationProperty({
|
|
442
|
+
name: 'rotate',
|
|
443
|
+
cssName: 'rotate',
|
|
444
|
+
defaultValue: 0,
|
|
445
|
+
valueConverter: parseFloat,
|
|
446
|
+
});
|
|
447
|
+
rotateProperty.register(Style);
|
|
448
|
+
export const rotateXProperty = new CssAnimationProperty({
|
|
449
|
+
name: 'rotateX',
|
|
450
|
+
cssName: 'rotatex',
|
|
451
|
+
defaultValue: 0,
|
|
452
|
+
valueConverter: parseFloat,
|
|
453
|
+
});
|
|
454
|
+
rotateXProperty.register(Style);
|
|
455
|
+
export const rotateYProperty = new CssAnimationProperty({
|
|
456
|
+
name: 'rotateY',
|
|
457
|
+
cssName: 'rotatey',
|
|
458
|
+
defaultValue: 0,
|
|
459
|
+
valueConverter: parseFloat,
|
|
460
|
+
});
|
|
461
|
+
rotateYProperty.register(Style);
|
|
462
|
+
export const perspectiveProperty = new CssAnimationProperty({
|
|
463
|
+
name: 'perspective',
|
|
464
|
+
cssName: 'perspective',
|
|
465
|
+
defaultValue: 1000,
|
|
466
|
+
valueConverter: parseFloat,
|
|
467
|
+
});
|
|
468
|
+
perspectiveProperty.register(Style);
|
|
469
|
+
export const scaleXProperty = new CssAnimationProperty({
|
|
470
|
+
name: 'scaleX',
|
|
471
|
+
cssName: 'scaleX',
|
|
472
|
+
defaultValue: 1,
|
|
473
|
+
valueConverter: parseFloat,
|
|
474
|
+
});
|
|
475
|
+
scaleXProperty.register(Style);
|
|
476
|
+
export const scaleYProperty = new CssAnimationProperty({
|
|
477
|
+
name: 'scaleY',
|
|
478
|
+
cssName: 'scaleY',
|
|
479
|
+
defaultValue: 1,
|
|
480
|
+
valueConverter: parseFloat,
|
|
481
|
+
});
|
|
482
|
+
scaleYProperty.register(Style);
|
|
483
|
+
function parseDIPs(value) {
|
|
484
|
+
if (value.endsWith('px')) {
|
|
485
|
+
return layout.toDeviceIndependentPixels(parseFloat(value.trim().slice(-2).trim()));
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
return parseFloat(value.slice(-3).trim());
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
export const translateXProperty = new CssAnimationProperty({
|
|
492
|
+
name: 'translateX',
|
|
493
|
+
cssName: 'translateX',
|
|
494
|
+
defaultValue: 0,
|
|
495
|
+
valueConverter: parseDIPs,
|
|
496
|
+
});
|
|
497
|
+
translateXProperty.register(Style);
|
|
498
|
+
export const translateYProperty = new CssAnimationProperty({
|
|
499
|
+
name: 'translateY',
|
|
500
|
+
cssName: 'translateY',
|
|
501
|
+
defaultValue: 0,
|
|
502
|
+
valueConverter: parseDIPs,
|
|
503
|
+
});
|
|
504
|
+
translateYProperty.register(Style);
|
|
505
|
+
const transformProperty = new ShorthandProperty({
|
|
506
|
+
name: 'transform',
|
|
507
|
+
cssName: 'transform',
|
|
508
|
+
getter: function () {
|
|
509
|
+
const scaleX = this.scaleX;
|
|
510
|
+
const scaleY = this.scaleY;
|
|
511
|
+
const translateX = this.translateX;
|
|
512
|
+
const translateY = this.translateY;
|
|
513
|
+
const rotate = this.rotate;
|
|
514
|
+
const rotateX = this.rotateX;
|
|
515
|
+
const rotateY = this.rotateY;
|
|
516
|
+
let result = '';
|
|
517
|
+
if (translateX !== 0 || translateY !== 0) {
|
|
518
|
+
result += `translate(${translateX}, ${translateY}) `;
|
|
519
|
+
}
|
|
520
|
+
if (scaleX !== 1 || scaleY !== 1) {
|
|
521
|
+
result += `scale(${scaleX}, ${scaleY}) `;
|
|
522
|
+
}
|
|
523
|
+
if (rotateX !== 0 || rotateY !== 0 || rotate !== 0) {
|
|
524
|
+
result += `rotate(${rotateX}, ${rotateY}, ${rotate}) `;
|
|
525
|
+
result += `rotate (${rotate})`;
|
|
526
|
+
}
|
|
527
|
+
return result.trim();
|
|
528
|
+
},
|
|
529
|
+
converter: convertToTransform,
|
|
530
|
+
});
|
|
531
|
+
transformProperty.register(Style);
|
|
532
|
+
const IDENTITY_TRANSFORMATION = {
|
|
533
|
+
translate: { x: 0, y: 0 },
|
|
534
|
+
rotate: { x: 0, y: 0, z: 0 },
|
|
535
|
+
scale: { x: 1, y: 1 },
|
|
536
|
+
};
|
|
537
|
+
const TRANSFORM_SPLITTER = new RegExp(/\s*(.+?)\((.*?)\)/g);
|
|
538
|
+
const TRANSFORMATIONS = Object.freeze(['rotate', 'rotateX', 'rotateY', 'rotate3d', 'translate', 'translate3d', 'translateX', 'translateY', 'scale', 'scale3d', 'scaleX', 'scaleY']);
|
|
539
|
+
const STYLE_TRANSFORMATION_MAP = Object.freeze({
|
|
540
|
+
scale: (value) => ({ property: 'scale', value }),
|
|
541
|
+
scale3d: (value) => ({ property: 'scale', value }),
|
|
542
|
+
scaleX: ({ x }) => ({
|
|
543
|
+
property: 'scale',
|
|
544
|
+
value: { x, y: IDENTITY_TRANSFORMATION.scale.y },
|
|
545
|
+
}),
|
|
546
|
+
scaleY: ({ y }) => ({
|
|
547
|
+
property: 'scale',
|
|
548
|
+
value: { y, x: IDENTITY_TRANSFORMATION.scale.x },
|
|
549
|
+
}),
|
|
550
|
+
translate: (value) => ({ property: 'translate', value }),
|
|
551
|
+
translate3d: (value) => ({ property: 'translate', value }),
|
|
552
|
+
translateX: ({ x }) => ({
|
|
553
|
+
property: 'translate',
|
|
554
|
+
value: { x, y: IDENTITY_TRANSFORMATION.translate.y },
|
|
555
|
+
}),
|
|
556
|
+
translateY: ({ y }) => ({
|
|
557
|
+
property: 'translate',
|
|
558
|
+
value: { y, x: IDENTITY_TRANSFORMATION.translate.x },
|
|
559
|
+
}),
|
|
560
|
+
rotate3d: (value) => ({ property: 'rotate', value }),
|
|
561
|
+
rotateX: (x) => ({
|
|
562
|
+
property: 'rotate',
|
|
563
|
+
value: {
|
|
564
|
+
x,
|
|
565
|
+
y: IDENTITY_TRANSFORMATION.rotate.y,
|
|
566
|
+
z: IDENTITY_TRANSFORMATION.rotate.z,
|
|
567
|
+
},
|
|
568
|
+
}),
|
|
569
|
+
rotateY: (y) => ({
|
|
570
|
+
property: 'rotate',
|
|
571
|
+
value: {
|
|
572
|
+
x: IDENTITY_TRANSFORMATION.rotate.x,
|
|
573
|
+
y,
|
|
574
|
+
z: IDENTITY_TRANSFORMATION.rotate.z,
|
|
575
|
+
},
|
|
576
|
+
}),
|
|
577
|
+
rotate: (z) => ({
|
|
578
|
+
property: 'rotate',
|
|
579
|
+
value: {
|
|
580
|
+
x: IDENTITY_TRANSFORMATION.rotate.x,
|
|
581
|
+
y: IDENTITY_TRANSFORMATION.rotate.y,
|
|
582
|
+
z,
|
|
583
|
+
},
|
|
584
|
+
}),
|
|
585
|
+
});
|
|
586
|
+
function convertToTransform(value) {
|
|
587
|
+
if (value === unsetValue) {
|
|
588
|
+
value = 'none';
|
|
589
|
+
}
|
|
590
|
+
const { translate, rotate, scale } = transformConverter(value);
|
|
591
|
+
return [
|
|
592
|
+
[translateXProperty, translate.x],
|
|
593
|
+
[translateYProperty, translate.y],
|
|
594
|
+
[scaleXProperty, scale.x],
|
|
595
|
+
[scaleYProperty, scale.y],
|
|
596
|
+
[rotateProperty, rotate.z],
|
|
597
|
+
[rotateXProperty, rotate.x],
|
|
598
|
+
[rotateYProperty, rotate.y],
|
|
599
|
+
];
|
|
600
|
+
}
|
|
601
|
+
export function transformConverter(text) {
|
|
602
|
+
const transformations = parseTransformString(text);
|
|
603
|
+
if (text === 'none' || text === '' || !transformations.length) {
|
|
604
|
+
return IDENTITY_TRANSFORMATION;
|
|
605
|
+
}
|
|
606
|
+
const usedTransforms = transformations.map((t) => t.property);
|
|
607
|
+
if (!hasDuplicates(usedTransforms)) {
|
|
608
|
+
const fullTransformations = { ...IDENTITY_TRANSFORMATION };
|
|
609
|
+
transformations.forEach((transform) => {
|
|
610
|
+
fullTransformations[transform.property] = transform.value;
|
|
611
|
+
});
|
|
612
|
+
return fullTransformations;
|
|
613
|
+
}
|
|
614
|
+
const affineMatrix = transformations.map(getTransformMatrix).reduce(multiplyAffine2d);
|
|
615
|
+
const cssMatrix = matrixArrayToCssMatrix(affineMatrix);
|
|
616
|
+
return decompose2DTransformMatrix(cssMatrix);
|
|
617
|
+
}
|
|
618
|
+
// using general regex and manually checking the matched
|
|
619
|
+
// properties is faster than using more specific regex
|
|
620
|
+
// https://jsperf.com/cssparse
|
|
621
|
+
function parseTransformString(text) {
|
|
622
|
+
const matches = [];
|
|
623
|
+
let match;
|
|
624
|
+
while ((match = TRANSFORM_SPLITTER.exec(text)) !== null) {
|
|
625
|
+
const property = match[1];
|
|
626
|
+
const value = convertTransformValue(property, match[2]);
|
|
627
|
+
if (TRANSFORMATIONS.indexOf(property) !== -1) {
|
|
628
|
+
matches.push(normalizeTransformation({ property, value }));
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
return matches;
|
|
632
|
+
}
|
|
633
|
+
function normalizeTransformation({ property, value }) {
|
|
634
|
+
return STYLE_TRANSFORMATION_MAP[property](value);
|
|
635
|
+
}
|
|
636
|
+
function convertTransformValue(property, stringValue) {
|
|
637
|
+
// eslint-disable-next-line prefer-const
|
|
638
|
+
let [x, y, z] = stringValue.split(',').map(parseFloat);
|
|
639
|
+
if (property === 'translate') {
|
|
640
|
+
y ?? (y = IDENTITY_TRANSFORMATION.translate.y);
|
|
641
|
+
}
|
|
642
|
+
else {
|
|
643
|
+
y ?? (y = x);
|
|
644
|
+
z ?? (z = y);
|
|
645
|
+
}
|
|
646
|
+
if (property === 'rotate' || property === 'rotateX' || property === 'rotateY') {
|
|
647
|
+
return stringValue.slice(-3) === 'rad' ? radiansToDegrees(x) : x;
|
|
648
|
+
}
|
|
649
|
+
return { x, y, z };
|
|
650
|
+
}
|
|
651
|
+
// Background properties.
|
|
652
|
+
const backgroundProperty = new ShorthandProperty({
|
|
653
|
+
name: 'background',
|
|
654
|
+
cssName: 'background',
|
|
655
|
+
getter: function () {
|
|
656
|
+
return `${this.backgroundColor} ${this.backgroundImage} ${this.backgroundRepeat} ${this.backgroundPosition}`;
|
|
657
|
+
},
|
|
658
|
+
converter: convertToBackgrounds,
|
|
659
|
+
});
|
|
660
|
+
backgroundProperty.register(Style);
|
|
661
|
+
export const backgroundInternalProperty = new CssProperty({
|
|
662
|
+
name: 'backgroundInternal',
|
|
663
|
+
cssName: '_backgroundInternal',
|
|
664
|
+
defaultValue: Background.default,
|
|
665
|
+
equalityComparer: (value1, value2, target) => {
|
|
666
|
+
if (value1 === value2) {
|
|
667
|
+
const view = target.viewRef.get();
|
|
668
|
+
// if view layout or updates are suspended we will check the backgroundInternal at the end
|
|
669
|
+
if (value1.isDirty && !view._suspendNativeUpdatesCount) {
|
|
670
|
+
value1.isDirty = false;
|
|
671
|
+
return false;
|
|
672
|
+
}
|
|
673
|
+
return true;
|
|
674
|
+
}
|
|
675
|
+
return Background.equals(value1, value2);
|
|
676
|
+
},
|
|
677
|
+
});
|
|
678
|
+
backgroundInternalProperty.register(Style);
|
|
679
|
+
function backgroundInternalSubPropertyValueChanged(block) {
|
|
680
|
+
return function (target, oldValue, newValue) {
|
|
681
|
+
const newBackgroundInternal = block(target, oldValue, newValue);
|
|
682
|
+
const view = target.viewRef.get();
|
|
683
|
+
if (target.backgroundInternal !== newBackgroundInternal || !view._suspendNativeUpdatesCount) {
|
|
684
|
+
target.backgroundInternal = newBackgroundInternal;
|
|
685
|
+
}
|
|
686
|
+
else {
|
|
687
|
+
// let s not go through another property set which takes time during batch updates
|
|
688
|
+
// we will check and update backgroundInternal once the update is done
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
// const pattern: RegExp = /url\(('|")(.*?)\1\)/;
|
|
693
|
+
export const backgroundImageProperty = new CssProperty({
|
|
694
|
+
name: 'backgroundImage',
|
|
695
|
+
cssName: 'background-image',
|
|
696
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withImage(newValue)),
|
|
697
|
+
equalityComparer: (value1, value2) => {
|
|
698
|
+
if (value1 instanceof LinearGradient && value2 instanceof LinearGradient) {
|
|
699
|
+
return LinearGradient.equals(value1, value2);
|
|
700
|
+
}
|
|
701
|
+
else {
|
|
702
|
+
return value1 === value2;
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
valueConverter: (value) => {
|
|
706
|
+
if (typeof value === 'string') {
|
|
707
|
+
const parsed = parseBackground(value);
|
|
708
|
+
if (parsed) {
|
|
709
|
+
value = typeof parsed.value.image === 'object' ? LinearGradient.parse(parsed.value.image) : value;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
return value;
|
|
713
|
+
},
|
|
714
|
+
});
|
|
715
|
+
backgroundImageProperty.register(Style);
|
|
716
|
+
export const backgroundColorProperty = new CssAnimationProperty({
|
|
717
|
+
name: 'backgroundColor',
|
|
718
|
+
cssName: 'background-color',
|
|
719
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withColor(newValue)),
|
|
720
|
+
equalityComparer: Color.equals,
|
|
721
|
+
valueConverter: colorConverter,
|
|
722
|
+
});
|
|
723
|
+
backgroundColorProperty.register(Style);
|
|
724
|
+
export const backgroundRepeatProperty = new CssProperty({
|
|
725
|
+
name: 'backgroundRepeat',
|
|
726
|
+
cssName: 'background-repeat',
|
|
727
|
+
valueConverter: CoreTypes.BackgroundRepeat.parse,
|
|
728
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withRepeat(newValue)),
|
|
729
|
+
});
|
|
730
|
+
backgroundRepeatProperty.register(Style);
|
|
731
|
+
export const backgroundSizeProperty = new CssProperty({
|
|
732
|
+
name: 'backgroundSize',
|
|
733
|
+
cssName: 'background-size',
|
|
734
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withSize(newValue)),
|
|
735
|
+
});
|
|
736
|
+
backgroundSizeProperty.register(Style);
|
|
737
|
+
export const backgroundPositionProperty = new CssProperty({
|
|
738
|
+
name: 'backgroundPosition',
|
|
739
|
+
cssName: 'background-position',
|
|
740
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withPosition(newValue)),
|
|
741
|
+
});
|
|
742
|
+
backgroundPositionProperty.register(Style);
|
|
743
|
+
function convertToBackgrounds(value) {
|
|
744
|
+
if (typeof value === 'string') {
|
|
745
|
+
const backgrounds = parseBackground(value).value;
|
|
746
|
+
let backgroundColor = unsetValue;
|
|
747
|
+
if (backgrounds.color) {
|
|
748
|
+
backgroundColor = backgrounds.color instanceof Color ? backgrounds.color : new Color(backgrounds.color);
|
|
749
|
+
}
|
|
750
|
+
let backgroundImage;
|
|
751
|
+
if (typeof backgrounds.image === 'object' && backgrounds.image) {
|
|
752
|
+
backgroundImage = LinearGradient.parse(backgrounds.image);
|
|
753
|
+
}
|
|
754
|
+
else {
|
|
755
|
+
backgroundImage = backgrounds.image || unsetValue;
|
|
756
|
+
}
|
|
757
|
+
const backgroundRepeat = backgrounds.repeat || unsetValue;
|
|
758
|
+
const backgroundPosition = backgrounds.position ? backgrounds.position.text : unsetValue;
|
|
759
|
+
return [
|
|
760
|
+
[backgroundColorProperty, backgroundColor],
|
|
761
|
+
[backgroundImageProperty, backgroundImage],
|
|
762
|
+
[backgroundRepeatProperty, backgroundRepeat],
|
|
763
|
+
[backgroundPositionProperty, backgroundPosition],
|
|
764
|
+
];
|
|
765
|
+
}
|
|
766
|
+
else {
|
|
767
|
+
return [
|
|
768
|
+
[backgroundColorProperty, unsetValue],
|
|
769
|
+
[backgroundImageProperty, unsetValue],
|
|
770
|
+
[backgroundRepeatProperty, unsetValue],
|
|
771
|
+
[backgroundPositionProperty, unsetValue],
|
|
772
|
+
];
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
function parseBorderColor(value) {
|
|
776
|
+
const result = {
|
|
777
|
+
top: undefined,
|
|
778
|
+
right: undefined,
|
|
779
|
+
bottom: undefined,
|
|
780
|
+
left: undefined,
|
|
781
|
+
};
|
|
782
|
+
if (value.indexOf('rgb') === 0 || value.indexOf('hsl') === 0) {
|
|
783
|
+
result.top = result.right = result.bottom = result.left = new Color(value);
|
|
784
|
+
return result;
|
|
785
|
+
}
|
|
786
|
+
const arr = value.split(/[ ,]+/);
|
|
787
|
+
if (arr.length === 1) {
|
|
788
|
+
const arr0 = new Color(arr[0]);
|
|
789
|
+
result.top = arr0;
|
|
790
|
+
result.right = arr0;
|
|
791
|
+
result.bottom = arr0;
|
|
792
|
+
result.left = arr0;
|
|
793
|
+
}
|
|
794
|
+
else if (arr.length === 2) {
|
|
795
|
+
const arr0 = new Color(arr[0]);
|
|
796
|
+
const arr1 = new Color(arr[1]);
|
|
797
|
+
result.top = arr0;
|
|
798
|
+
result.right = arr1;
|
|
799
|
+
result.bottom = arr0;
|
|
800
|
+
result.left = arr1;
|
|
801
|
+
}
|
|
802
|
+
else if (arr.length === 3) {
|
|
803
|
+
const arr0 = new Color(arr[0]);
|
|
804
|
+
const arr1 = new Color(arr[1]);
|
|
805
|
+
const arr2 = new Color(arr[2]);
|
|
806
|
+
result.top = arr0;
|
|
807
|
+
result.right = arr1;
|
|
808
|
+
result.bottom = arr2;
|
|
809
|
+
result.left = arr1;
|
|
810
|
+
}
|
|
811
|
+
else if (arr.length === 4) {
|
|
812
|
+
const arr0 = new Color(arr[0]);
|
|
813
|
+
const arr1 = new Color(arr[1]);
|
|
814
|
+
const arr2 = new Color(arr[2]);
|
|
815
|
+
const arr3 = new Color(arr[3]);
|
|
816
|
+
result.top = arr0;
|
|
817
|
+
result.right = arr1;
|
|
818
|
+
result.bottom = arr2;
|
|
819
|
+
result.left = arr3;
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
throw new Error(`Expected 1, 2, 3 or 4 parameters. Actual: ${value}`);
|
|
823
|
+
}
|
|
824
|
+
return result;
|
|
825
|
+
}
|
|
826
|
+
// Border Color properties.
|
|
827
|
+
const borderColorProperty = new ShorthandProperty({
|
|
828
|
+
name: 'borderColor',
|
|
829
|
+
cssName: 'border-color',
|
|
830
|
+
getter: function () {
|
|
831
|
+
if (Color.equals(this.borderTopColor, this.borderRightColor) && Color.equals(this.borderTopColor, this.borderBottomColor) && Color.equals(this.borderTopColor, this.borderLeftColor)) {
|
|
832
|
+
return this.borderTopColor;
|
|
833
|
+
}
|
|
834
|
+
else {
|
|
835
|
+
return `${this.borderTopColor} ${this.borderRightColor} ${this.borderBottomColor} ${this.borderLeftColor}`;
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
converter: function (value) {
|
|
839
|
+
if (typeof value === 'string') {
|
|
840
|
+
const fourColors = parseBorderColor(value);
|
|
841
|
+
return [
|
|
842
|
+
[borderTopColorProperty, fourColors.top],
|
|
843
|
+
[borderRightColorProperty, fourColors.right],
|
|
844
|
+
[borderBottomColorProperty, fourColors.bottom],
|
|
845
|
+
[borderLeftColorProperty, fourColors.left],
|
|
846
|
+
];
|
|
847
|
+
}
|
|
848
|
+
else {
|
|
849
|
+
return [
|
|
850
|
+
[borderTopColorProperty, value],
|
|
851
|
+
[borderRightColorProperty, value],
|
|
852
|
+
[borderBottomColorProperty, value],
|
|
853
|
+
[borderLeftColorProperty, value],
|
|
854
|
+
];
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
});
|
|
858
|
+
borderColorProperty.register(Style);
|
|
859
|
+
export const borderTopColorProperty = new CssProperty({
|
|
860
|
+
name: 'borderTopColor',
|
|
861
|
+
cssName: 'border-top-color',
|
|
862
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withBorderTopColor(newValue)),
|
|
863
|
+
equalityComparer: Color.equals,
|
|
864
|
+
valueConverter: colorConverter,
|
|
865
|
+
});
|
|
866
|
+
borderTopColorProperty.register(Style);
|
|
867
|
+
export const borderRightColorProperty = new CssProperty({
|
|
868
|
+
name: 'borderRightColor',
|
|
869
|
+
cssName: 'border-right-color',
|
|
870
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withBorderRightColor(newValue)),
|
|
871
|
+
equalityComparer: Color.equals,
|
|
872
|
+
valueConverter: colorConverter,
|
|
873
|
+
});
|
|
874
|
+
borderRightColorProperty.register(Style);
|
|
875
|
+
export const borderBottomColorProperty = new CssProperty({
|
|
876
|
+
name: 'borderBottomColor',
|
|
877
|
+
cssName: 'border-bottom-color',
|
|
878
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withBorderBottomColor(newValue)),
|
|
879
|
+
equalityComparer: Color.equals,
|
|
880
|
+
valueConverter: colorConverter,
|
|
881
|
+
});
|
|
882
|
+
borderBottomColorProperty.register(Style);
|
|
883
|
+
export const borderLeftColorProperty = new CssProperty({
|
|
884
|
+
name: 'borderLeftColor',
|
|
885
|
+
cssName: 'border-left-color',
|
|
886
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => target.backgroundInternal.withBorderLeftColor(newValue)),
|
|
887
|
+
equalityComparer: Color.equals,
|
|
888
|
+
valueConverter: colorConverter,
|
|
889
|
+
});
|
|
890
|
+
borderLeftColorProperty.register(Style);
|
|
891
|
+
// Border Width properties.
|
|
892
|
+
const borderWidthProperty = new ShorthandProperty({
|
|
893
|
+
name: 'borderWidth',
|
|
894
|
+
cssName: 'border-width',
|
|
895
|
+
getter: function () {
|
|
896
|
+
if (Length.equals(this.borderTopWidth, this.borderRightWidth) && Length.equals(this.borderTopWidth, this.borderBottomWidth) && Length.equals(this.borderTopWidth, this.borderLeftWidth)) {
|
|
897
|
+
return this.borderTopWidth;
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
return `${Length.convertToString(this.borderTopWidth)} ${Length.convertToString(this.borderRightWidth)} ${Length.convertToString(this.borderBottomWidth)} ${Length.convertToString(this.borderLeftWidth)}`;
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
converter: function (value) {
|
|
904
|
+
if (typeof value === 'string' && value !== 'auto') {
|
|
905
|
+
const borderWidths = parseThickness(value);
|
|
906
|
+
return [
|
|
907
|
+
[borderTopWidthProperty, borderWidths.top],
|
|
908
|
+
[borderRightWidthProperty, borderWidths.right],
|
|
909
|
+
[borderBottomWidthProperty, borderWidths.bottom],
|
|
910
|
+
[borderLeftWidthProperty, borderWidths.left],
|
|
911
|
+
];
|
|
912
|
+
}
|
|
913
|
+
else {
|
|
914
|
+
return [
|
|
915
|
+
[borderTopWidthProperty, value],
|
|
916
|
+
[borderRightWidthProperty, value],
|
|
917
|
+
[borderBottomWidthProperty, value],
|
|
918
|
+
[borderLeftWidthProperty, value],
|
|
919
|
+
];
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
});
|
|
923
|
+
borderWidthProperty.register(Style);
|
|
924
|
+
export const borderTopWidthProperty = new CssProperty({
|
|
925
|
+
name: 'borderTopWidth',
|
|
926
|
+
cssName: 'border-top-width',
|
|
927
|
+
defaultValue: CoreTypes.zeroLength,
|
|
928
|
+
affectsLayout: __IOS__,
|
|
929
|
+
equalityComparer: Length.equals,
|
|
930
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
931
|
+
let value = Length.toDevicePixels(newValue, 0);
|
|
932
|
+
if (!isNonNegativeFiniteNumber(value)) {
|
|
933
|
+
value = 0;
|
|
934
|
+
}
|
|
935
|
+
const view = target.viewRef.get();
|
|
936
|
+
if (view) {
|
|
937
|
+
view.effectiveBorderTopWidth = value;
|
|
938
|
+
}
|
|
939
|
+
else {
|
|
940
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
941
|
+
}
|
|
942
|
+
return target.backgroundInternal.withBorderTopWidth(value);
|
|
943
|
+
}),
|
|
944
|
+
valueConverter: Length.parse,
|
|
945
|
+
});
|
|
946
|
+
borderTopWidthProperty.register(Style);
|
|
947
|
+
export const borderRightWidthProperty = new CssProperty({
|
|
948
|
+
name: 'borderRightWidth',
|
|
949
|
+
cssName: 'border-right-width',
|
|
950
|
+
defaultValue: CoreTypes.zeroLength,
|
|
951
|
+
affectsLayout: __IOS__,
|
|
952
|
+
equalityComparer: Length.equals,
|
|
953
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
954
|
+
let value = Length.toDevicePixels(newValue, 0);
|
|
955
|
+
if (!isNonNegativeFiniteNumber(value)) {
|
|
956
|
+
value = 0;
|
|
957
|
+
}
|
|
958
|
+
const view = target.viewRef.get();
|
|
959
|
+
if (view) {
|
|
960
|
+
view.effectiveBorderRightWidth = value;
|
|
961
|
+
}
|
|
962
|
+
else {
|
|
963
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
964
|
+
}
|
|
965
|
+
return target.backgroundInternal.withBorderRightWidth(value);
|
|
966
|
+
}),
|
|
967
|
+
valueConverter: Length.parse,
|
|
968
|
+
});
|
|
969
|
+
borderRightWidthProperty.register(Style);
|
|
970
|
+
export const borderBottomWidthProperty = new CssProperty({
|
|
971
|
+
name: 'borderBottomWidth',
|
|
972
|
+
cssName: 'border-bottom-width',
|
|
973
|
+
defaultValue: CoreTypes.zeroLength,
|
|
974
|
+
affectsLayout: __IOS__,
|
|
975
|
+
equalityComparer: Length.equals,
|
|
976
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
977
|
+
let value = Length.toDevicePixels(newValue, 0);
|
|
978
|
+
if (!isNonNegativeFiniteNumber(value)) {
|
|
979
|
+
value = 0;
|
|
980
|
+
}
|
|
981
|
+
const view = target.viewRef.get();
|
|
982
|
+
if (view) {
|
|
983
|
+
view.effectiveBorderBottomWidth = value;
|
|
984
|
+
}
|
|
985
|
+
else {
|
|
986
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
987
|
+
}
|
|
988
|
+
return target.backgroundInternal.withBorderBottomWidth(value);
|
|
989
|
+
}),
|
|
990
|
+
valueConverter: Length.parse,
|
|
991
|
+
});
|
|
992
|
+
borderBottomWidthProperty.register(Style);
|
|
993
|
+
export const borderLeftWidthProperty = new CssProperty({
|
|
994
|
+
name: 'borderLeftWidth',
|
|
995
|
+
cssName: 'border-left-width',
|
|
996
|
+
defaultValue: CoreTypes.zeroLength,
|
|
997
|
+
affectsLayout: __IOS__,
|
|
998
|
+
equalityComparer: Length.equals,
|
|
999
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
1000
|
+
let value = Length.toDevicePixels(newValue, 0);
|
|
1001
|
+
if (!isNonNegativeFiniteNumber(value)) {
|
|
1002
|
+
value = 0;
|
|
1003
|
+
}
|
|
1004
|
+
const view = target.viewRef.get();
|
|
1005
|
+
if (view) {
|
|
1006
|
+
view.effectiveBorderLeftWidth = value;
|
|
1007
|
+
}
|
|
1008
|
+
else {
|
|
1009
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
1010
|
+
}
|
|
1011
|
+
return target.backgroundInternal.withBorderLeftWidth(value);
|
|
1012
|
+
}),
|
|
1013
|
+
valueConverter: Length.parse,
|
|
1014
|
+
});
|
|
1015
|
+
borderLeftWidthProperty.register(Style);
|
|
1016
|
+
// Border Radius properties.
|
|
1017
|
+
const borderRadiusProperty = new ShorthandProperty({
|
|
1018
|
+
name: 'borderRadius',
|
|
1019
|
+
cssName: 'border-radius',
|
|
1020
|
+
getter: function () {
|
|
1021
|
+
if (Length.equals(this.borderTopLeftRadius, this.borderTopRightRadius) && Length.equals(this.borderTopLeftRadius, this.borderBottomRightRadius) && Length.equals(this.borderTopLeftRadius, this.borderBottomLeftRadius)) {
|
|
1022
|
+
return this.borderTopLeftRadius;
|
|
1023
|
+
}
|
|
1024
|
+
return `${Length.convertToString(this.borderTopLeftRadius)} ${Length.convertToString(this.borderTopRightRadius)} ${Length.convertToString(this.borderBottomRightRadius)} ${Length.convertToString(this.borderBottomLeftRadius)}`;
|
|
1025
|
+
},
|
|
1026
|
+
converter: function (value) {
|
|
1027
|
+
if (typeof value === 'string') {
|
|
1028
|
+
const borderRadius = parseThickness(value);
|
|
1029
|
+
return [
|
|
1030
|
+
[borderTopLeftRadiusProperty, borderRadius.top],
|
|
1031
|
+
[borderTopRightRadiusProperty, borderRadius.right],
|
|
1032
|
+
[borderBottomRightRadiusProperty, borderRadius.bottom],
|
|
1033
|
+
[borderBottomLeftRadiusProperty, borderRadius.left],
|
|
1034
|
+
];
|
|
1035
|
+
}
|
|
1036
|
+
else {
|
|
1037
|
+
return [
|
|
1038
|
+
[borderTopLeftRadiusProperty, value],
|
|
1039
|
+
[borderTopRightRadiusProperty, value],
|
|
1040
|
+
[borderBottomRightRadiusProperty, value],
|
|
1041
|
+
[borderBottomLeftRadiusProperty, value],
|
|
1042
|
+
];
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
});
|
|
1046
|
+
borderRadiusProperty.register(Style);
|
|
1047
|
+
export const borderTopLeftRadiusProperty = new CssProperty({
|
|
1048
|
+
name: 'borderTopLeftRadius',
|
|
1049
|
+
cssName: 'border-top-left-radius',
|
|
1050
|
+
defaultValue: 0,
|
|
1051
|
+
affectsLayout: __IOS__,
|
|
1052
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
1053
|
+
let value = Length.toDevicePixels(newValue, 0);
|
|
1054
|
+
if (!isNonNegativeFiniteNumber(value)) {
|
|
1055
|
+
value = 0;
|
|
1056
|
+
}
|
|
1057
|
+
return target.backgroundInternal.withBorderTopLeftRadius(value);
|
|
1058
|
+
}),
|
|
1059
|
+
valueConverter: Length.parse,
|
|
1060
|
+
equalityComparer: Length.equals,
|
|
1061
|
+
});
|
|
1062
|
+
borderTopLeftRadiusProperty.register(Style);
|
|
1063
|
+
export const borderTopRightRadiusProperty = new CssProperty({
|
|
1064
|
+
name: 'borderTopRightRadius',
|
|
1065
|
+
cssName: 'border-top-right-radius',
|
|
1066
|
+
defaultValue: 0,
|
|
1067
|
+
affectsLayout: __IOS__,
|
|
1068
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
1069
|
+
let value = Length.toDevicePixels(newValue, 0);
|
|
1070
|
+
if (!isNonNegativeFiniteNumber(value)) {
|
|
1071
|
+
value = 0;
|
|
1072
|
+
}
|
|
1073
|
+
return target.backgroundInternal.withBorderTopRightRadius(value);
|
|
1074
|
+
}),
|
|
1075
|
+
valueConverter: Length.parse,
|
|
1076
|
+
equalityComparer: Length.equals,
|
|
1077
|
+
});
|
|
1078
|
+
borderTopRightRadiusProperty.register(Style);
|
|
1079
|
+
export const borderBottomRightRadiusProperty = new CssProperty({
|
|
1080
|
+
name: 'borderBottomRightRadius',
|
|
1081
|
+
cssName: 'border-bottom-right-radius',
|
|
1082
|
+
defaultValue: 0,
|
|
1083
|
+
affectsLayout: __IOS__,
|
|
1084
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
1085
|
+
let value = Length.toDevicePixels(newValue, 0);
|
|
1086
|
+
if (!isNonNegativeFiniteNumber(value)) {
|
|
1087
|
+
value = 0;
|
|
1088
|
+
}
|
|
1089
|
+
return target.backgroundInternal.withBorderBottomRightRadius(value);
|
|
1090
|
+
}),
|
|
1091
|
+
valueConverter: Length.parse,
|
|
1092
|
+
equalityComparer: Length.equals,
|
|
1093
|
+
});
|
|
1094
|
+
borderBottomRightRadiusProperty.register(Style);
|
|
1095
|
+
export const borderBottomLeftRadiusProperty = new CssProperty({
|
|
1096
|
+
name: 'borderBottomLeftRadius',
|
|
1097
|
+
cssName: 'border-bottom-left-radius',
|
|
1098
|
+
defaultValue: 0,
|
|
1099
|
+
affectsLayout: __IOS__,
|
|
1100
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
1101
|
+
let value = Length.toDevicePixels(newValue, 0);
|
|
1102
|
+
if (!isNonNegativeFiniteNumber(value)) {
|
|
1103
|
+
value = 0;
|
|
1104
|
+
}
|
|
1105
|
+
return target.backgroundInternal.withBorderBottomLeftRadius(value);
|
|
1106
|
+
}),
|
|
1107
|
+
valueConverter: Length.parse,
|
|
1108
|
+
equalityComparer: Length.equals,
|
|
1109
|
+
});
|
|
1110
|
+
borderBottomLeftRadiusProperty.register(Style);
|
|
1111
|
+
const boxShadowProperty = new CssProperty({
|
|
1112
|
+
name: 'boxShadow',
|
|
1113
|
+
cssName: 'box-shadow',
|
|
1114
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
1115
|
+
return target.backgroundInternal.withBoxShadow(newValue
|
|
1116
|
+
? {
|
|
1117
|
+
inset: newValue.inset,
|
|
1118
|
+
offsetX: Length.toDevicePixels(newValue.offsetX, 0),
|
|
1119
|
+
offsetY: Length.toDevicePixels(newValue.offsetY, 0),
|
|
1120
|
+
blurRadius: Length.toDevicePixels(newValue.blurRadius, 0),
|
|
1121
|
+
spreadRadius: Length.toDevicePixels(newValue.spreadRadius, 0),
|
|
1122
|
+
color: newValue.color,
|
|
1123
|
+
}
|
|
1124
|
+
: null);
|
|
1125
|
+
}),
|
|
1126
|
+
valueConverter: (value) => {
|
|
1127
|
+
return parseCSSShadow(value);
|
|
1128
|
+
},
|
|
1129
|
+
});
|
|
1130
|
+
boxShadowProperty.register(Style);
|
|
1131
|
+
function isNonNegativeFiniteNumber(value) {
|
|
1132
|
+
return isFinite(value) && value >= 0;
|
|
1133
|
+
}
|
|
1134
|
+
const supportedPaths = ['rect', 'circle', 'ellipse', 'polygon', 'inset'];
|
|
1135
|
+
function isClipPathValid(value) {
|
|
1136
|
+
if (!value) {
|
|
1137
|
+
return true;
|
|
1138
|
+
}
|
|
1139
|
+
const functionName = value.substring(0, value.indexOf('(')).trim();
|
|
1140
|
+
return supportedPaths.indexOf(functionName) !== -1;
|
|
1141
|
+
}
|
|
1142
|
+
export const clipPathProperty = new CssProperty({
|
|
1143
|
+
name: 'clipPath',
|
|
1144
|
+
cssName: 'clip-path',
|
|
1145
|
+
valueChanged: backgroundInternalSubPropertyValueChanged((target, oldValue, newValue) => {
|
|
1146
|
+
if (!isClipPathValid(newValue)) {
|
|
1147
|
+
throw new Error('clip-path is not valid.');
|
|
1148
|
+
}
|
|
1149
|
+
return target.backgroundInternal.withClipPath(newValue);
|
|
1150
|
+
}),
|
|
1151
|
+
});
|
|
1152
|
+
clipPathProperty.register(Style);
|
|
1153
|
+
function isFloatValueConverter(value) {
|
|
1154
|
+
const newValue = parseFloat(value);
|
|
1155
|
+
if (isNaN(newValue)) {
|
|
1156
|
+
throw new Error(`Invalid value: ${newValue}`);
|
|
1157
|
+
}
|
|
1158
|
+
return newValue;
|
|
1159
|
+
}
|
|
1160
|
+
export const zIndexProperty = new CssProperty({
|
|
1161
|
+
name: 'zIndex',
|
|
1162
|
+
cssName: 'z-index',
|
|
1163
|
+
valueConverter: isFloatValueConverter,
|
|
1164
|
+
});
|
|
1165
|
+
zIndexProperty.register(Style);
|
|
1166
|
+
function opacityConverter(value) {
|
|
1167
|
+
const newValue = parseFloat(value);
|
|
1168
|
+
if (!isNaN(newValue) && 0 <= newValue && newValue <= 1) {
|
|
1169
|
+
return newValue;
|
|
1170
|
+
}
|
|
1171
|
+
throw new Error(`Opacity should be between [0, 1]. Value: ${newValue}`);
|
|
1172
|
+
}
|
|
1173
|
+
export const opacityProperty = new CssAnimationProperty({
|
|
1174
|
+
name: 'opacity',
|
|
1175
|
+
cssName: 'opacity',
|
|
1176
|
+
defaultValue: 1,
|
|
1177
|
+
valueConverter: opacityConverter,
|
|
1178
|
+
});
|
|
1179
|
+
opacityProperty.register(Style);
|
|
1180
|
+
export const colorProperty = new InheritedCssProperty({
|
|
1181
|
+
name: 'color',
|
|
1182
|
+
cssName: 'color',
|
|
1183
|
+
equalityComparer: Color.equals,
|
|
1184
|
+
valueConverter: colorConverter,
|
|
1185
|
+
});
|
|
1186
|
+
colorProperty.register(Style);
|
|
1187
|
+
export const fontInternalProperty = new CssProperty({
|
|
1188
|
+
name: 'fontInternal',
|
|
1189
|
+
defaultValue: Font.default,
|
|
1190
|
+
cssName: '_fontInternal',
|
|
1191
|
+
equalityComparer: (value1, value2, target) => {
|
|
1192
|
+
if (value1 === value2) {
|
|
1193
|
+
const view = target.viewRef.get();
|
|
1194
|
+
// if view layout or updates are suspended we will check the backgroundInternal at the end
|
|
1195
|
+
if (value1.isDirty && !view._suspendNativeUpdatesCount) {
|
|
1196
|
+
value1.isDirty = false;
|
|
1197
|
+
return false;
|
|
1198
|
+
}
|
|
1199
|
+
return true;
|
|
1200
|
+
}
|
|
1201
|
+
return Font.equals(value1, value2);
|
|
1202
|
+
},
|
|
1203
|
+
});
|
|
1204
|
+
fontInternalProperty.register(Style);
|
|
1205
|
+
function fontInternalSubPropertyValueChanged(block, shouldIgnore) {
|
|
1206
|
+
return function (target, oldValue, newValue) {
|
|
1207
|
+
if (shouldIgnore?.(target, oldValue, newValue)) {
|
|
1208
|
+
return;
|
|
1209
|
+
}
|
|
1210
|
+
let newFontInternal = block(target, oldValue, newValue);
|
|
1211
|
+
if (newFontInternal.isEqualToDefaultFont()) {
|
|
1212
|
+
newFontInternal = unsetValue;
|
|
1213
|
+
}
|
|
1214
|
+
const view = target.viewRef.get();
|
|
1215
|
+
if (target.fontInternal !== newFontInternal || !view._suspendNativeUpdatesCount) {
|
|
1216
|
+
target.fontInternal = newFontInternal;
|
|
1217
|
+
}
|
|
1218
|
+
else {
|
|
1219
|
+
// let s not go through another property set which takes time during batch updates
|
|
1220
|
+
// we will check and update fontInternal once the update is done
|
|
1221
|
+
}
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
export const fontFamilyProperty = new InheritedCssProperty({
|
|
1225
|
+
name: 'fontFamily',
|
|
1226
|
+
cssName: 'font-family',
|
|
1227
|
+
affectsLayout: __IOS__,
|
|
1228
|
+
valueChanged: fontInternalSubPropertyValueChanged((target, oldValue, newValue) => target.fontInternal.withFontFamily(newValue)),
|
|
1229
|
+
});
|
|
1230
|
+
fontFamilyProperty.register(Style);
|
|
1231
|
+
export const fontScaleInternalProperty = new InheritedCssProperty({
|
|
1232
|
+
name: 'fontScaleInternal',
|
|
1233
|
+
cssName: '_fontScaleInternal',
|
|
1234
|
+
defaultValue: 1.0,
|
|
1235
|
+
valueConverter: parseFloat,
|
|
1236
|
+
});
|
|
1237
|
+
fontScaleInternalProperty.register(Style);
|
|
1238
|
+
export const fontSizeProperty = new InheritedCssProperty({
|
|
1239
|
+
name: 'fontSize',
|
|
1240
|
+
cssName: 'font-size',
|
|
1241
|
+
affectsLayout: __IOS__,
|
|
1242
|
+
valueChanged: fontInternalSubPropertyValueChanged((target, oldValue, newValue) => target.fontInternal.withFontSize(newValue), (target) => target.viewRef.get()?.['handleFontSize'] === true),
|
|
1243
|
+
valueConverter: (v) => parseFloat(v),
|
|
1244
|
+
});
|
|
1245
|
+
fontSizeProperty.register(Style);
|
|
1246
|
+
export const fontStyleProperty = new InheritedCssProperty({
|
|
1247
|
+
name: 'fontStyle',
|
|
1248
|
+
cssName: 'font-style',
|
|
1249
|
+
affectsLayout: __IOS__,
|
|
1250
|
+
defaultValue: FontStyle.NORMAL,
|
|
1251
|
+
valueConverter: FontStyle.parse,
|
|
1252
|
+
valueChanged: fontInternalSubPropertyValueChanged((target, oldValue, newValue) => target.fontInternal.withFontStyle(newValue)),
|
|
1253
|
+
});
|
|
1254
|
+
fontStyleProperty.register(Style);
|
|
1255
|
+
export const fontWeightProperty = new InheritedCssProperty({
|
|
1256
|
+
name: 'fontWeight',
|
|
1257
|
+
cssName: 'font-weight',
|
|
1258
|
+
affectsLayout: __IOS__,
|
|
1259
|
+
defaultValue: FontWeight.NORMAL,
|
|
1260
|
+
valueConverter: FontWeight.parse,
|
|
1261
|
+
valueChanged: fontInternalSubPropertyValueChanged((target, oldValue, newValue) => target.fontInternal.withFontWeight(newValue)),
|
|
1262
|
+
});
|
|
1263
|
+
fontWeightProperty.register(Style);
|
|
1264
|
+
const fontProperty = new ShorthandProperty({
|
|
1265
|
+
name: 'font',
|
|
1266
|
+
cssName: 'font',
|
|
1267
|
+
getter: function () {
|
|
1268
|
+
return `${this.fontStyle} ${this.fontWeight} ${this.fontSize} ${this.fontFamily}`;
|
|
1269
|
+
},
|
|
1270
|
+
converter: function (value) {
|
|
1271
|
+
if (value === unsetValue) {
|
|
1272
|
+
return [
|
|
1273
|
+
[fontStyleProperty, unsetValue],
|
|
1274
|
+
[fontWeightProperty, unsetValue],
|
|
1275
|
+
[fontSizeProperty, unsetValue],
|
|
1276
|
+
[fontFamilyProperty, unsetValue],
|
|
1277
|
+
];
|
|
1278
|
+
}
|
|
1279
|
+
else {
|
|
1280
|
+
const font = parseFont(value);
|
|
1281
|
+
const fontSize = parseFloat(font.fontSize);
|
|
1282
|
+
return [
|
|
1283
|
+
[fontStyleProperty, font.fontStyle],
|
|
1284
|
+
[fontWeightProperty, font.fontWeight],
|
|
1285
|
+
[fontSizeProperty, fontSize],
|
|
1286
|
+
[fontFamilyProperty, font.fontFamily],
|
|
1287
|
+
];
|
|
1288
|
+
}
|
|
1289
|
+
},
|
|
1290
|
+
});
|
|
1291
|
+
fontProperty.register(Style);
|
|
1292
|
+
export const fontVariationSettingsProperty = new InheritedCssProperty({
|
|
1293
|
+
name: 'fontVariationSettings',
|
|
1294
|
+
cssName: 'font-variation-settings',
|
|
1295
|
+
affectsLayout: __IOS__,
|
|
1296
|
+
valueChanged: fontInternalSubPropertyValueChanged((target, oldValue, newValue) => target.fontInternal.withFontVariationSettings(newValue)),
|
|
1297
|
+
valueConverter: (value) => {
|
|
1298
|
+
return FontVariationSettings.parse(value);
|
|
1299
|
+
},
|
|
1300
|
+
});
|
|
1301
|
+
fontVariationSettingsProperty.register(Style);
|
|
1302
|
+
export const visibilityProperty = new CssProperty({
|
|
1303
|
+
name: 'visibility',
|
|
1304
|
+
cssName: 'visibility',
|
|
1305
|
+
defaultValue: CoreTypes.Visibility.visible,
|
|
1306
|
+
affectsLayout: __IOS__,
|
|
1307
|
+
valueConverter: CoreTypes.Visibility.parse,
|
|
1308
|
+
valueChanged: (target, oldValue, newValue) => {
|
|
1309
|
+
const view = target.viewRef.get();
|
|
1310
|
+
if (view) {
|
|
1311
|
+
view.isCollapsed = newValue === CoreTypes.Visibility.collapse || newValue === CoreTypes.Visibility.collapsed;
|
|
1312
|
+
}
|
|
1313
|
+
else {
|
|
1314
|
+
Trace.write(`${newValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
});
|
|
1318
|
+
visibilityProperty.register(Style);
|
|
1319
|
+
export const androidElevationProperty = new CssProperty({
|
|
1320
|
+
name: 'androidElevation',
|
|
1321
|
+
cssName: 'android-elevation',
|
|
1322
|
+
valueConverter: parseFloat,
|
|
1323
|
+
});
|
|
1324
|
+
androidElevationProperty.register(Style);
|
|
1325
|
+
export const androidDynamicElevationOffsetProperty = new CssProperty({
|
|
1326
|
+
name: 'androidDynamicElevationOffset',
|
|
1327
|
+
cssName: 'android-dynamic-elevation-offset',
|
|
1328
|
+
valueConverter: parseFloat,
|
|
1329
|
+
});
|
|
1330
|
+
androidDynamicElevationOffsetProperty.register(Style);
|
|
1331
|
+
//# sourceMappingURL=style-properties.js.map
|